grab 0.1.22 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,26 @@
1
+ 'use strict';var chunkXWSK4QRO_cjs=require('./chunk-XWSK4QRO.cjs');/**
2
+ * @license MIT
3
+ *
4
+ * Copyright (c) 2025 Aiden Bai
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ var qd=(e,t)=>e===t,nn=Symbol("solid-proxy"),Zd=typeof Proxy=="function",pr=Symbol("solid-track"),ci={equals:qd},hl=Cl,Nt=1,fr=2,bl={owned:null,cleanups:null,context:null,owner:null},Ts={},Ne=null,W=null,Ao=null,je=null,ft=null,xt=null,fi=0;function An(e,t){let n=je,o=Ne,l=e.length===0,a=t===void 0?o:t,i=l?bl:{owned:null,cleanups:null,context:a?a.context:null,owner:a},d=l?e:()=>e(()=>vt(()=>Fn(i)));Ne=i,je=null;try{return It(d,!0)}finally{je=n,Ne=o;}}function L(e,t){t=t?Object.assign({},ci,t):ci;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},o=l=>(typeof l=="function"&&(l=l(n.value)),vl(n,l));return [xl.bind(n),o]}function fl(e,t,n){let o=pi(e,t,true,Nt);To(o);}function J(e,t,n){let o=pi(e,t,false,Nt);To(o);}function pe(e,t,n){hl=nu;let o=pi(e,t,false,Nt);(o.user=true),xt?xt.push(o):To(o);}function oe(e,t,n){n=n?Object.assign({},ci,n):ci;let o=pi(e,t,true,0);return o.observers=null,o.observerSlots=null,o.comparator=n.equals||void 0,To(o),xl.bind(o)}function Jd(e){return e&&typeof e=="object"&&"then"in e}function _s(e,t,n){let o,l,a;typeof t=="function"?(o=e,l=t,a={}):(o=true,l=e,a=t||{});let i=null,d=Ts,g=false,m="initialValue"in a,h=typeof o=="function"&&oe(o),A=new Set,[Y,D]=(a.storage||L)(a.initialValue),[q,f]=L(void 0),[w,x]=L(void 0,{equals:false}),[y,k]=L(m?"ready":"unresolved");function z(le,G,te,C){return i===le&&(i=null,C!==void 0&&(m=true),(le===d||G===d)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(C,{value:G})),d=Ts,ce(G,te)),G}function ce(le,G){It(()=>{G===void 0&&D(()=>le),k(G!==void 0?"errored":m?"ready":"unresolved"),f(G);for(let te of A.keys())te.decrement();A.clear();},false);}function N(){let le=mr,G=Y(),te=q();if(te!==void 0&&!i)throw te;return je&&!je.user&&le,G}function se(le=true){if(le!==false&&g)return;g=false;let G=h?h():o;if(G==null||G===false){z(i,vt(Y));return}let te,C=d!==Ts?d:vt(()=>{try{return l(G,{value:Y(),refetching:le})}catch(M){te=M;}});if(te!==void 0){z(i,void 0,li(te),G);return}else if(!Jd(C))return z(i,C,void 0,G),C;return i=C,"v"in C?(C.s===1?z(i,C.v,void 0,G):z(i,void 0,li(C.v),G),C):(g=true,queueMicrotask(()=>g=false),It(()=>{k(m?"refreshing":"pending"),x();},false),C.then(M=>z(C,M,void 0,G),M=>z(C,void 0,li(M),G)))}Object.defineProperties(N,{state:{get:()=>y()},error:{get:()=>q()},loading:{get(){let le=y();return le==="pending"||le==="refreshing"}},latest:{get(){if(!m)return N();let le=q();if(le&&!i)throw le;return Y()}}});let ae=Ne;return h?fl(()=>(ae=Ne,se(false))):se(false),[N,{refetch:le=>yl(ae,()=>se(le)),mutate:D}]}function mi(e){return It(e,false)}function vt(e){if(je===null)return e();let t=je;je=null;try{return Ao?Ao.untrack(e):e()}finally{je=t;}}function Be(e,t,n){let o=Array.isArray(e),l,a=n&&n.defer;return i=>{let d;if(o){d=Array(e.length);for(let c=0;c<e.length;c++)d[c]=e[c]();}else d=e();if(a)return a=false,i;let s=vt(()=>t(d,l,i));return l=d,s}}function mt(e){pe(()=>vt(e));}function Me(e){return Ne===null||(Ne.cleanups===null?Ne.cleanups=[e]:Ne.cleanups.push(e)),e}function gi(){return je}function yl(e,t){let n=Ne,o=je;Ne=e,je=null;try{return It(t,!0)}catch(l){hi(l);}finally{Ne=n,je=o;}}var[yg,ml]=L(false);var mr;function xl(){let e=W;if(this.sources&&(this.state))if((this.state)===Nt)To(this);else {let t=ft;ft=null,It(()=>di(this),false),ft=t;}if(je){let t=this.observers?this.observers.length:0;je.sources?(je.sources.push(this),je.sourceSlots.push(t)):(je.sources=[this],je.sourceSlots=[t]),this.observers?(this.observers.push(je),this.observerSlots.push(je.sources.length-1)):(this.observers=[je],this.observerSlots=[je.sources.length-1]);}return e&&W.sources.has(this)?this.tValue:this.value}function vl(e,t,n){let o=e.value;if(!e.comparator||!e.comparator(o,t)){e.value=t;e.observers&&e.observers.length&&It(()=>{for(let l=0;l<e.observers.length;l+=1){let a=e.observers[l],i=W&&W.running;i&&W.disposed.has(a)||((i?!a.tState:!a.state)&&(a.pure?ft.push(a):xt.push(a),a.observers&&Sl(a)),i?a.tState=Nt:a.state=Nt);}if(ft.length>1e6)throw ft=[],new Error},false);}return t}function To(e){if(!e.fn)return;Fn(e);let t=fi;gl(e,e.value,t);}function gl(e,t,n){let o,l=Ne,a=je;je=Ne=e;try{o=e.fn(t);}catch(i){return e.pure&&((e.state=Nt,e.owned&&e.owned.forEach(Fn),e.owned=null)),e.updatedAt=n+1,hi(i)}finally{je=a,Ne=l;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?vl(e,o):e.value=o,e.updatedAt=n);}function pi(e,t,n,o=Nt,l){let a={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ne,context:Ne?Ne.context:null,pure:n};if(Ne===null||Ne!==bl&&(Ne.owned?Ne.owned.push(a):Ne.owned=[a]),Ao);return a}function gr(e){let t=W;if((e.state)===0)return;if((e.state)===fr)return di(e);if(e.suspense&&vt(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<fi);){(e.state)&&n.push(e);}for(let o=n.length-1;o>=0;o--){if(e=n[o],t);if((e.state)===Nt)To(e);else if((e.state)===fr){let l=ft;ft=null,It(()=>di(e,n[0]),false),ft=l;}}}function It(e,t){if(ft)return e();let n=false;t||(ft=[]),xt?n=true:xt=[],fi++;try{let o=e();return eu(n),o}catch(o){n||(xt=null),ft=null,hi(o);}}function eu(e){if(ft&&(Cl(ft),ft=null),e)return;let n=xt;xt=null,n.length&&It(()=>hl(n),false);}function Cl(e){for(let t=0;t<e.length;t++)gr(e[t]);}function nu(e){let t,n=0;for(t=0;t<e.length;t++){let o=e[t];o.user?e[n++]=o:gr(o);}for(t=0;t<n;t++)gr(e[t]);}function di(e,t){e.state=0;for(let o=0;o<e.sources.length;o+=1){let l=e.sources[o];if(l.sources){let a=l.state;a===Nt?l!==t&&(!l.updatedAt||l.updatedAt<fi)&&gr(l):a===fr&&di(l,t);}}}function Sl(e){for(let n=0;n<e.observers.length;n+=1){let o=e.observers[n];(!o.state)&&(o.state=fr,o.pure?ft.push(o):xt.push(o),o.observers&&Sl(o));}}function Fn(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),o=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){let a=l.pop(),i=n.observerSlots.pop();o<l.length&&(a.sourceSlots[i]=o,l[o]=a,n.observerSlots[o]=i);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Fn(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Fn(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 li(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function hi(e,t=Ne){let o=li(e);throw o;}var Is=Symbol("fallback");function ui(e){for(let t=0;t<e.length;t++)e[t]();}function ou(e,t,n={}){let o=[],l=[],a=[],i=0,d=t.length>1?[]:null;return Me(()=>ui(a)),()=>{let s=e()||[],c=s.length,g,m;return s[pr],vt(()=>{let A,Y,D,q,f,w,x,y,k;if(c===0)i!==0&&(ui(a),a=[],o=[],l=[],i=0,d&&(d=[])),n.fallback&&(o=[Is],l[0]=An(z=>(a[0]=z,n.fallback())),i=1);else if(i===0){for(l=new Array(c),m=0;m<c;m++)o[m]=s[m],l[m]=An(h);i=c;}else {for(D=new Array(c),q=new Array(c),d&&(f=new Array(c)),w=0,x=Math.min(i,c);w<x&&o[w]===s[w];w++);for(x=i-1,y=c-1;x>=w&&y>=w&&o[x]===s[y];x--,y--)D[y]=l[x],q[y]=a[x],d&&(f[y]=d[x]);for(A=new Map,Y=new Array(y+1),m=y;m>=w;m--)k=s[m],g=A.get(k),Y[m]=g===void 0?-1:g,A.set(k,m);for(g=w;g<=x;g++)k=o[g],m=A.get(k),m!==void 0&&m!==-1?(D[m]=l[g],q[m]=a[g],d&&(f[m]=d[g]),m=Y[m],A.set(k,m)):a[g]();for(m=w;m<c;m++)m in D?(l[m]=D[m],a[m]=q[m],d&&(d[m]=f[m],d[m](m))):l[m]=An(h);l=l.slice(0,i=c),o=s.slice(0);}return l});function h(A){if(a[m]=A,d){let[Y,D]=L(m);return d[m]=D,t(s[m],Y)}return t(s[m])}}}function ru(e,t,n={}){let o=[],l=[],a=[],i=[],d=0,s;return Me(()=>ui(a)),()=>{let c=e()||[],g=c.length;return c[pr],vt(()=>{if(g===0)return d!==0&&(ui(a),a=[],o=[],l=[],d=0,i=[]),n.fallback&&(o=[Is],l[0]=An(h=>(a[0]=h,n.fallback())),d=1),l;for(o[0]===Is&&(a[0](),a=[],o=[],l=[],d=0),s=0;s<g;s++)s<o.length&&o[s]!==c[s]?i[s](()=>c[s]):s>=o.length&&(l[s]=An(m));for(;s<o.length;s++)a[s]();return d=i.length=a.length=g,o=c.slice(0),l=l.slice(0,d)});function m(h){a[s]=h;let[A,Y]=L(c[s]);return i[s]=Y,t(A,s)}}}function T(e,t){return vt(()=>e(t||{}))}function ai(){return true}var su={get(e,t,n){return t===nn?n:e.get(t)},has(e,t){return t===nn?true:e.has(t)},set:ai,deleteProperty:ai,getOwnPropertyDescriptor(e,t){return {configurable:true,enumerable:true,get(){return e.get(t)},set:ai,deleteProperty:ai}},ownKeys(e){return e.keys()}};function ks(e){return (e=typeof e=="function"?e():e)?e:{}}function au(){for(let e=0,t=this.length;e<t;++e){let n=this[e]();if(n!==void 0)return n}}function ko(...e){let t=false;for(let i=0;i<e.length;i++){let d=e[i];t=t||!!d&&nn in d,e[i]=typeof d=="function"?(t=true,oe(d)):d;}if(Zd&&t)return new Proxy({get(i){for(let d=e.length-1;d>=0;d--){let s=ks(e[d])[i];if(s!==void 0)return s}},has(i){for(let d=e.length-1;d>=0;d--)if(i in ks(e[d]))return true;return false},keys(){let i=[];for(let d=0;d<e.length;d++)i.push(...Object.keys(ks(e[d])));return [...new Set(i)]}},su);let n={},o=Object.create(null);for(let i=e.length-1;i>=0;i--){let d=e[i];if(!d)continue;let s=Object.getOwnPropertyNames(d);for(let c=s.length-1;c>=0;c--){let g=s[c];if(g==="__proto__"||g==="constructor")continue;let m=Object.getOwnPropertyDescriptor(d,g);if(!o[g])o[g]=m.get?{enumerable:true,configurable:true,get:au.bind(n[g]=[m.get.bind(d)])}:m.value!==void 0?m:void 0;else {let h=n[g];h&&(m.get?h.push(m.get.bind(d)):m.value!==void 0&&h.push(()=>m.value));}}}let l={},a=Object.keys(o);for(let i=a.length-1;i>=0;i--){let d=a[i],s=o[d];s&&s.get?Object.defineProperty(l,d,s):l[d]=s?s.value:void 0;}return l}var lu=e=>`Stale read from <${e}>.`;function on(e){let t="fallback"in e&&{fallback:()=>e.fallback};return oe(ou(()=>e.each,e.children,t||void 0))}function bi(e){let t="fallback"in e&&{fallback:()=>e.fallback};return oe(ru(()=>e.each,e.children,t||void 0))}function me(e){let t=e.keyed,n=oe(()=>e.when,void 0,void 0),o=t?n:oe(n,void 0,{equals:(l,a)=>!l==!a});return oe(()=>{let l=o();if(l){let a=e.children;return typeof a=="function"&&a.length>0?vt(()=>a(t?l:()=>{if(!vt(o))throw lu("Show");return n()})):a}return e.fallback},void 0,void 0)}var du=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],uu=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...du]),fu=new Set(["innerHTML","textContent","innerText","children"]),mu=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),gu=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function pu(e,t){let n=gu[e];return typeof n=="object"?n[t]?n.$:void 0:n}var hu=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]);var He=e=>oe(()=>e());function yu(e,t,n){let o=n.length,l=t.length,a=o,i=0,d=0,s=t[l-1].nextSibling,c=null;for(;i<l||d<a;){if(t[i]===n[d]){i++,d++;continue}for(;t[l-1]===n[a-1];)l--,a--;if(l===i){let g=a<o?d?n[d-1].nextSibling:n[a-d]:s;for(;d<a;)e.insertBefore(n[d++],g);}else if(a===d)for(;i<l;)(!c||!c.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[a-1]&&n[d]===t[l-1]){let g=t[--l].nextSibling;e.insertBefore(n[d++],t[i++].nextSibling),e.insertBefore(n[--a],g),t[l]=n[a];}else {if(!c){c=new Map;let m=d;for(;m<a;)c.set(n[m],m++);}let g=c.get(t[i]);if(g!=null)if(d<g&&g<a){let m=i,h=1,A;for(;++m<l&&m<a&&!((A=c.get(t[m]))==null||A!==g+h);)h++;if(h>g-d){let Y=t[i];for(;d<g;)e.insertBefore(n[d++],Y);}else e.replaceChild(n[d++],t[i++]);}else i++;else t[i++].remove();}}}var Al="_$DX_DELEGATE";function Ml(e,t,n,o={}){let l;return An(a=>{l=a,t===document?e():O(t,e(),t.firstChild?null:void 0,n);},o.owner),()=>{l(),t.textContent="";}}function B(e,t,n,o){let l,a=()=>{let d=document.createElement("template");return d.innerHTML=e,d.content.firstChild},i=()=>(l||(l=a())).cloneNode(true);return i.cloneNode=i,i}function it(e,t=window.document){let n=t[Al]||(t[Al]=new Set);for(let o=0,l=e.length;o<l;o++){let a=e[o];n.has(a)||(n.add(a),t.addEventListener(a,Eu));}}function re(e,t,n){(n==null?e.removeAttribute(t):e.setAttribute(t,n));}function xu(e,t,n){(n?e.setAttribute(t,""):e.removeAttribute(t));}function Ie(e,t){(t==null?e.removeAttribute("class"):e.className=t);}function Je(e,t,n,o){if(o)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let l=n[0];e.addEventListener(t,n[0]=a=>l.call(e,n[1],a));}else e.addEventListener(t,n,typeof n!="function"&&n);}function to(e,t,n={}){let o=Object.keys(t||{}),l=Object.keys(n),a,i;for(a=0,i=l.length;a<i;a++){let d=l[a];!d||d==="undefined"||t[d]||(Pl(e,d,false),delete n[d]);}for(a=0,i=o.length;a<i;a++){let d=o[a],s=!!t[d];!d||d==="undefined"||n[d]===s||!s||(Pl(e,d,true),n[d]=s);}return n}function vu(e,t,n){if(!t)return n?re(e,"style"):t;let o=e.style;if(typeof t=="string")return o.cssText=t;typeof n=="string"&&(o.cssText=n=void 0),n||(n={}),t||(t={});let l,a;for(a in n)t[a]==null&&o.removeProperty(a),delete n[a];for(a in t)l=t[a],l!==n[a]&&(o.setProperty(a,l),n[a]=l);return n}function he(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function hr(e,t={},n,o){let l={};return J(()=>typeof t.ref=="function"&&We(t.ref,e)),J(()=>Cu(e,t,n,true,l,true)),l}function We(e,t,n){return vt(()=>e(t,n))}function O(e,t,n,o){if(n!==void 0&&!o&&(o=[]),typeof t!="function")return Io(e,t,o,n);J(l=>Io(e,t(),l,n),o);}function Cu(e,t,n,o,l={},a=false){t||(t={});for(let i in l)if(!(i in t)){if(i==="children")continue;l[i]=Tl(e,i,null,l[i],n,a,t);}for(let i in t){if(i==="children"){continue}let d=t[i];l[i]=Tl(e,i,d,l[i],n,a,t);}}function Su(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Pl(e,t,n){let o=t.trim().split(/\s+/);for(let l=0,a=o.length;l<a;l++)e.classList.toggle(o[l],n);}function Tl(e,t,n,o,l,a,i){let d,s,c,g,m;if(t==="style")return vu(e,n,o);if(t==="classList")return to(e,n,o);if(n===o)return o;if(t==="ref")a||n(e);else if(t.slice(0,3)==="on:"){let h=t.slice(3);o&&e.removeEventListener(h,o,typeof o!="function"&&o),n&&e.addEventListener(h,n,typeof n!="function"&&n);}else if(t.slice(0,10)==="oncapture:"){let h=t.slice(10);o&&e.removeEventListener(h,o,true),n&&e.addEventListener(h,n,true);}else if(t.slice(0,2)==="on"){let h=t.slice(2).toLowerCase(),A=hu.has(h);if(!A&&o){let Y=Array.isArray(o)?o[0]:o;e.removeEventListener(h,Y);}(A||n)&&(Je(e,h,n,A),A&&it([h]));}else if(t.slice(0,5)==="attr:")re(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")xu(e,t.slice(5),n);else if((m=t.slice(0,5)==="prop:")||(c=fu.has(t))||((g=pu(t,e.tagName))||(s=uu.has(t)))||(d=e.nodeName.includes("-")||"is"in i)){if(m)t=t.slice(5),s=true;t==="class"||t==="className"?Ie(e,n):d&&!s&&!c?e[Su(t)]=n:e[g||t]=n;}else {re(e,mu[t]||t,n);}return n}function Eu(e){let t=e.target,n=`$$${e.type}`,o=e.target,l=e.currentTarget,a=s=>Object.defineProperty(e,"target",{configurable:true,value:s}),i=()=>{let s=t[n];if(s&&!t.disabled){let c=t[`${n}Data`];if(c!==void 0?s.call(t,c,e):s.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&a(t.host),true},d=()=>{for(;i()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:true,get(){return t||document}}),e.composedPath){let s=e.composedPath();a(s[0]);for(let c=0;c<s.length-2&&(t=s[c],!!i());c++){if(t._$host){t=t._$host,d();break}if(t.parentNode===l)break}}else d();a(o);}function Io(e,t,n,o,l){for(;typeof n=="function";)n=n();if(t===n)return n;let i=typeof t,d=o!==void 0;if(e=d&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(d){let s=n[0];s&&s.nodeType===3?s.data!==t&&(s.data=t):s=document.createTextNode(t),n=Mo(e,n,o,s);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||i==="boolean"){n=Mo(e,n,o);}else {if(i==="function")return J(()=>{let s=t();for(;typeof s=="function";)s=s();n=Io(e,s,n,o);}),()=>n;if(Array.isArray(t)){let s=[],c=n&&Array.isArray(n);if(Os(s,t,n,l))return J(()=>n=Io(e,s,n,o,true)),()=>n;if(s.length===0){if(n=Mo(e,n,o),d)return n}else c?n.length===0?kl(e,s,o):yu(e,n,s):(n&&Mo(e),kl(e,s));n=s;}else if(t.nodeType){if(Array.isArray(n)){if(d)return n=Mo(e,n,o,t);Mo(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function Os(e,t,n,o){let l=false;for(let a=0,i=t.length;a<i;a++){let d=t[a],s=n&&n[e.length],c;if(!(d==null||d===true||d===false))if((c=typeof d)=="object"&&d.nodeType)e.push(d);else if(Array.isArray(d))l=Os(e,d,s)||l;else if(c==="function")if(o){for(;typeof d=="function";)d=d();l=Os(e,Array.isArray(d)?d:[d],Array.isArray(s)?s:[s])||l;}else e.push(d),l=true;else {let g=String(d);s&&s.nodeType===3&&s.data===g?e.push(s):e.push(document.createTextNode(g));}}return l}function kl(e,t,n=null){for(let o=0,l=t.length;o<l;o++)e.insertBefore(t[o],n);}function Mo(e,t,n,o){if(n===void 0)return e.textContent="";let l=o||document.createTextNode("");if(t.length){let a=false;for(let i=t.length-1;i>=0;i--){let d=t[i];if(l!==d){let s=d.parentNode===e;!a&&!i?s?e.replaceChild(l,d):e.insertBefore(l,n):s&&d.remove();}else a=true;}}else e.insertBefore(l,n);return [l]}var Il=`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
10
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Geist",ui-sans-serif,system-ui,sans-serif;--font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;--color-yellow-500:oklch(79.5% .184 86.047);--color-black:#000;--color-white:#fff;--spacing:4px;--text-sm:14px;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--radius-sm:4px;--ease-out:cubic-bezier(0,0,.2,1);--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--transition-fast:.1s;--transition-normal:.15s;--transition-slow:.2s}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.touch-hitbox{position:relative}.touch-hitbox:before{content:"";width:100%;min-width:44px;height:100%;min-height:44px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-0\\.5{top:calc(var(--spacing)*-.5)}.top-0{top:calc(var(--spacing)*0)}.top-0\\.5{top:calc(var(--spacing)*.5)}.top-1\\/2{top:50%}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\.5{left:calc(var(--spacing)*1.5)}.left-1\\/2{left:50%}.left-2\\.5{left:calc(var(--spacing)*2.5)}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.m-0{margin:calc(var(--spacing)*0)}.-mx-2{margin-inline:calc(var(--spacing)*-2)}.mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.-my-1\\.5{margin-block:calc(var(--spacing)*-1.5)}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mr-0\\.5{margin-right:calc(var(--spacing)*.5)}.mr-1\\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2\\.5{margin-right:calc(var(--spacing)*2.5)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.-ml-\\[2px\\]{margin-left:-2px}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2\\.5{margin-left:calc(var(--spacing)*2.5)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-1\\.5{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-\\[18px\\]{width:18px;height:18px}.h-0{height:calc(var(--spacing)*0)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.max-h-\\[240px\\]{max-height:240px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-4{min-height:calc(var(--spacing)*4)}.w-0{width:calc(var(--spacing)*0)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-0{rotate:none}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition-property:transform;transition-duration:var(--transition-normal);transition-timing-function:cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transform:scale(.97)}.press-scale{transition-property:transform;transition-duration:var(--transition-fast);transition-timing-function:ease-out}.press-scale:active{transform:scale(.97)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[10px\\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[\\#B3B3B3\\]{border-color:#b3b3b3}.border-t-\\[\\#D9D9D9\\]{border-top-color:#d9d9d9}.bg-\\[\\#404040\\]{background-color:#404040}.bg-\\[\\#FEF2F2\\]{background-color:#fef2f2}.bg-black{background-color:var(--color-black)}.bg-black\\/5{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/5{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.bg-black\\/25{background-color:#00000040}@supports (color:color-mix(in lab, red, red)){.bg-black\\/25{background-color:color-mix(in oklab,var(--color-black)25%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-0{padding:calc(var(--spacing)*0)}.px-0\\.25{padding-inline:calc(var(--spacing)*.25)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[3px\\]{padding-inline:3px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-0\\.25{padding-block:calc(var(--spacing)*.25)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.text-left{text-align:left}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-3{--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.leading-3\\.5{--tw-leading:calc(var(--spacing)*3.5);line-height:calc(var(--spacing)*3.5)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#71717a\\]{color:#71717a}.text-\\[\\#B3B3B3\\]{color:#b3b3b3}.text-\\[\\#B91C1C\\]{color:#b91c1c}.text-\\[\\#B91C1C\\]\\/50{color:oklab(50.542% .168942 .0880134/.5)}.text-black{color:var(--color-black)}.text-black\\/25{color:#00000040}@supports (color:color-mix(in lab, red, red)){.text-black\\/25{color:color-mix(in oklab,var(--color-black)25%,transparent)}}.text-black\\/30{color:#0000004d}@supports (color:color-mix(in lab, red, red)){.text-black\\/30{color:color-mix(in oklab,var(--color-black)30%,transparent)}}.text-black\\/40{color:#0006}@supports (color:color-mix(in lab, red, red)){.text-black\\/40{color:color-mix(in oklab,var(--color-black)40%,transparent)}}.text-black\\/50{color:#00000080}@supports (color:color-mix(in lab, red, red)){.text-black\\/50{color:color-mix(in oklab,var(--color-black)50%,transparent)}}.text-black\\/60{color:#0009}@supports (color:color-mix(in lab, red, red)){.text-black\\/60{color:color-mix(in oklab,var(--color-black)60%,transparent)}}.text-black\\/70{color:#000000b3}@supports (color:color-mix(in lab, red, red)){.text-black\\/70{color:color-mix(in oklab,var(--color-black)70%,transparent)}}.text-black\\/80{color:#000c}@supports (color:color-mix(in lab, red, red)){.text-black\\/80{color:color-mix(in oklab,var(--color-black)80%,transparent)}}.text-black\\/85{color:#000000d9}@supports (color:color-mix(in lab, red, red)){.text-black\\/85{color:color-mix(in oklab,var(--color-black)85%,transparent)}}.text-white{color:var(--color-white)}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter-\\[drop-shadow\\(0px_1px_2px_\\#51515140\\)\\]{filter:drop-shadow(0 1px 2px #51515140)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\,opacity\\]{transition-property:grid-template-columns,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\,opacity\\]{transition-property:grid-template-rows,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\]{transition-property:top,left,width,height,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}.\\[grid-area\\:1\\/1\\]{grid-area:1/1}.\\[scrollbar-color\\:transparent_transparent\\]{scrollbar-color:transparent transparent}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.group-focus-within\\:invisible:is(:where(.group):focus-within *){visibility:hidden}.group-focus-within\\:visible:is(:where(.group):focus-within *){visibility:visible}@media (hover:hover){.group-hover\\:invisible:is(:where(.group):hover *){visibility:hidden}.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}}.before\\:\\!min-h-full:before{content:var(--tw-content);min-height:100%!important}.before\\:\\!min-w-full:before{content:var(--tw-content);min-width:100%!important}@media (hover:hover){.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#FEE2E2\\]:hover{background-color:#fee2e2}.hover\\:bg-black\\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.hover\\:text-\\[\\#B91C1C\\]:hover{color:#b91c1c}.hover\\:text-black:hover{color:var(--color-black)}.hover\\:text-black\\/60:hover{color:#0009}@supports (color:color-mix(in lab, red, red)){.hover\\:text-black\\/60:hover{color:color-mix(in oklab,var(--color-black)60%,transparent)}}.hover\\:opacity-100:hover{opacity:1}.hover\\:\\[scrollbar-color\\:rgba\\(0\\,0\\,0\\,0\\.15\\)_transparent\\]:hover{scrollbar-color:#00000026 transparent}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}@keyframes shake{0%,to{transform:translate(0)}15%{transform:translate(-3px)}30%{transform:translate(3px)}45%{transform:translate(-3px)}60%{transform:translate(3px)}75%{transform:translate(-2px)}90%{transform:translate(2px)}}@keyframes pop-in{0%{opacity:0;transform:scale(.9)}70%{opacity:1;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}@keyframes pop-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes slide-in-bottom{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-top{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-left{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes slide-in-right{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}@keyframes success-pop{0%{opacity:0;transform:scale(.9)}60%{opacity:1;transform:scale(1.1)}80%{transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{color:#0000;background:linear-gradient(90deg,#71717a 0%,#a1a1aa 25%,#71717a 50%,#a1a1aa 75%,#71717a 100%) 0 0/200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}@keyframes clock-flash{0%{transform:scale(1)}25%{transform:scale(1.2)}50%{transform:scale(.92)}75%{transform:scale(1.05)}to{transform:scale(1)}}.animate-clock-flash{will-change:transform;animation:.4s ease-out clock-flash}.animate-shake{will-change:transform;animation:.3s ease-out shake}.animate-pop-in{animation:pop-in var(--transition-normal)ease-out;will-change:transform,opacity}.animate-pop-out{animation:pop-out var(--transition-normal)ease-out forwards;will-change:transform,opacity}.animate-slide-in-bottom{animation:slide-in-bottom var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-top{animation:slide-in-top var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-left{animation:slide-in-left var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-right{animation:slide-in-right var(--transition-slow)ease-out;will-change:transform,opacity}.animate-success-pop{will-change:transform,opacity;animation:.25s ease-out success-pop}.animate-tooltip-fade-in{animation:tooltip-fade-in var(--transition-fast)ease-out;will-change:transform,opacity}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}`;var yi=Symbol("store-raw"),Oo=Symbol("store-node"),Pn=Symbol("store-has"),_l=Symbol("store-self");function Ol(e){let t=e[nn];if(!t&&(Object.defineProperty(e,nn,{value:t=new Proxy(e,ku)}),!Array.isArray(e))){let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let l=0,a=n.length;l<a;l++){let i=n[l];o[i].get&&Object.defineProperty(e,i,{enumerable:o[i].enumerable,get:o[i].get.bind(t)});}}return t}function Do(e){let t;return e!=null&&typeof e=="object"&&(e[nn]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Lo(e,t=new Set){let n,o,l,a;if(n=e!=null&&e[yi])return n;if(!Do(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let i=0,d=e.length;i<d;i++)l=e[i],(o=Lo(l,t))!==l&&(e[i]=o);}else {Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let i=Object.keys(e),d=Object.getOwnPropertyDescriptors(e);for(let s=0,c=i.length;s<c;s++)a=i[s],!d[a].get&&(l=e[a],(o=Lo(l,t))!==l&&(e[a]=o));}return e}function wi(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function yr(e,t,n){if(e[t])return e[t];let[o,l]=L(n,{equals:false,internal:true});return o.$=l,e[t]=o}function Pu(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return !n||n.get||!n.configurable||t===nn||t===Oo||(delete n.value,delete n.writable,n.get=()=>e[nn][t]),n}function Dl(e){gi()&&yr(wi(e,Oo),_l)();}function Tu(e){return Dl(e),Reflect.ownKeys(e)}var ku={get(e,t,n){if(t===yi)return e;if(t===nn)return n;if(t===pr)return Dl(e),n;let o=wi(e,Oo),l=o[t],a=l?l():e[t];if(t===Oo||t===Pn||t==="__proto__")return a;if(!l){let i=Object.getOwnPropertyDescriptor(e,t);gi()&&(typeof a!="function"||e.hasOwnProperty(t))&&!(i&&i.get)&&(a=yr(o,t,a)());}return Do(a)?Ol(a):a},has(e,t){return t===yi||t===nn||t===pr||t===Oo||t===Pn||t==="__proto__"?true:(gi()&&yr(wi(e,Pn),t)(),t in e)},set(){return true},deleteProperty(){return true},ownKeys:Tu,getOwnPropertyDescriptor:Pu};function Ro(e,t,n,o=false){if(!o&&e[t]===n)return;let l=e[t],a=e.length;n===void 0?(delete e[t],e[Pn]&&e[Pn][t]&&l!==void 0&&e[Pn][t].$()):(e[t]=n,e[Pn]&&e[Pn][t]&&l===void 0&&e[Pn][t].$());let i=wi(e,Oo),d;if((d=yr(i,t,l))&&d.$(()=>n),Array.isArray(e)&&e.length!==a){for(let s=e.length;s<a;s++)(d=i[s])&&d.$();(d=yr(i,"length",a))&&d.$(e.length);}(d=i[_l])&&d.$();}function Ll(e,t){let n=Object.keys(t);for(let o=0;o<n.length;o+=1){let l=n[o];Ro(e,l,t[l]);}}function Mu(e,t){if(typeof t=="function"&&(t=t(e)),t=Lo(t),Array.isArray(t)){if(e===t)return;let n=0,o=t.length;for(;n<o;n++){let l=t[n];e[n]!==l&&Ro(e,n,l);}Ro(e,"length",o);}else Ll(e,t);}function br(e,t,n=[]){let o,l=e;if(t.length>1){o=t.shift();let i=typeof o,d=Array.isArray(e);if(Array.isArray(o)){for(let s=0;s<o.length;s++)br(e,[o[s]].concat(t),n);return}else if(d&&i==="function"){for(let s=0;s<e.length;s++)o(e[s],s)&&br(e,[s].concat(t),n);return}else if(d&&i==="object"){let{from:s=0,to:c=e.length-1,by:g=1}=o;for(let m=s;m<=c;m+=g)br(e,[m].concat(t),n);return}else if(t.length>1){br(e[o],t,[o].concat(n));return}l=e[o],n=[o].concat(n);}let a=t[0];typeof a=="function"&&(a=a(l,n),a===l)||o===void 0&&a==null||(a=Lo(a),o===void 0||Do(l)&&Do(a)&&!Array.isArray(a)?Ll(l,a):Ro(e,o,a));}function vi(...[e,t]){let n=Lo(e||{}),o=Array.isArray(n),l=Ol(n);function a(...i){mi(()=>{o&&i.length===1?Mu(n,i[0]):br(n,i);});}return [l,a]}var xi=new WeakMap,Rl={get(e,t){if(t===yi)return e;let n=e[t],o;return Do(n)?xi.get(n)||(xi.set(n,o=new Proxy(n,Rl)),o):n},set(e,t,n){return Ro(e,t,Lo(n)),true},deleteProperty(e,t){return Ro(e,t,void 0,true),true}};function Gt(e){return t=>{if(Do(t)){let n;(n=xi.get(t))||xi.set(t,n=new Proxy(t,Rl)),e(n);}return t}}var Iu=e=>typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e),_u=e=>{let t=e.trim();if(!t)return null;let n=parseFloat(t);return Iu(n)?n:null},$l=(e,t)=>{let n=e.split(",");if(n.length!==t)return null;let o=[];for(let l of n){let a=_u(l);if(a===null)return null;o.push(a);}return o},Nl=(e,t,n,o)=>e===1&&t===0&&n===0&&o===1,Ou=e=>e[0]===1&&e[1]===0&&e[2]===0&&e[3]===0&&e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0&&e[8]===0&&e[9]===0&&e[10]===1&&e[11]===0&&e[15]===1,Bl=e=>{if(!e||e==="none")return "none";if(e.charCodeAt(0)===109)if(e.charCodeAt(6)===51){let n=e.length-1,o=$l(e.slice(9,n),16);if(o)return o[12]=0,o[13]=0,o[14]=0,Ou(o)?"none":`matrix3d(${o[0]}, ${o[1]}, ${o[2]}, ${o[3]}, ${o[4]}, ${o[5]}, ${o[6]}, ${o[7]}, ${o[8]}, ${o[9]}, ${o[10]}, ${o[11]}, 0, 0, 0, ${o[15]})`}else {let n=e.length-1,o=$l(e.slice(7,n),6);if(o){let l=o[0],a=o[1],i=o[2],d=o[3];return Nl(l,a,i,d)?"none":`matrix(${l}, ${a}, ${i}, ${d}, 0, 0)`}}return "none"},Hl=e=>e.isIdentity?"none":e.is2D?Nl(e.a,e.b,e.c,e.d)?"none":`matrix(${e.a}, ${e.b}, ${e.c}, ${e.d}, 0, 0)`:e.m11===1&&e.m12===0&&e.m13===0&&e.m14===0&&e.m21===0&&e.m22===1&&e.m23===0&&e.m24===0&&e.m31===0&&e.m32===0&&e.m33===1&&e.m34===0&&e.m44===1?"none":`matrix3d(${e.m11}, ${e.m12}, ${e.m13}, ${e.m14}, ${e.m21}, ${e.m22}, ${e.m23}, ${e.m24}, ${e.m31}, ${e.m32}, ${e.m33}, ${e.m34}, 0, 0, 0, ${e.m44})`;var Ds=new WeakMap,Fl=()=>{Ds=new WeakMap;},Lu=(e,t)=>{let n=t&&t!=="none",o=null,l=e.parentElement,a=0;for(;l&&l!==document.documentElement&&a<chunkXWSK4QRO_cjs.N;){let i=window.getComputedStyle(l).transform;if(i&&i!=="none")o=o?new DOMMatrix(i).multiply(o):new DOMMatrix(i);else if(!n&&!o&&a>=chunkXWSK4QRO_cjs.O)return "none";l=l.parentElement,a++;}return o?(n&&(o=o.multiply(new DOMMatrix(t))),Hl(o)):n?Bl(t):"none"},ze=e=>{let t=performance.now(),n=Ds.get(e);if(n&&t-n.timestamp<16)return n.bounds;let o=e.getBoundingClientRect(),l=window.getComputedStyle(e),a=Lu(e,l.transform),i;if(a!=="none"&&e instanceof HTMLElement){let d=e.offsetWidth,s=e.offsetHeight;if(d>0&&s>0){let c=o.left+o.width*.5,g=o.top+o.height*.5;i={borderRadius:l.borderRadius||"0px",height:s,transform:a,width:d,x:c-d*.5,y:g-s*.5};}else i={borderRadius:l.borderRadius||"0px",height:o.height,transform:a,width:o.width,x:o.left,y:o.top};}else i={borderRadius:l.borderRadius||"0px",height:o.height,transform:a,width:o.width,x:o.left,y:o.top};return Ds.set(e,{bounds:i,timestamp:t}),i};var et=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e));var Tn=e=>({x:e.x+e.width/2,y:e.y+e.height/2});var Ci=({currentPosition:e,previousBounds:t,nextBounds:n})=>{if(!t||!n)return e;let o=Tn(t),l=Tn(n),a=t.width/2,i=e.x-o.x,d=a>0?i/a:0,s=n.width/2;return {...e,x:l.x+d*s}};var Ru=e=>({current:{state:"idle"},wasActivatedByToggle:false,pendingCommentMode:false,hasAgentProvider:e.hasAgentProvider,keyHoldDuration:e.keyHoldDuration,pointer:{x:-1e3,y:-1e3},dragStart:{x:-1e3,y:-1e3},copyStart:{x:-1e3,y:-1e3},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,lastCopiedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:"",pendingClickData:null,replySessionId:null,viewportVersion:0,grabbedBoxes:[],labelInstances:[],agentSessions:new Map,sessionElements:new Map,isTouchMode:false,theme:e.theme,activationTimestamp:null,previouslyFocusedElement:null,isAgentConnected:false,supportsUndo:false,supportsFollowUp:false,dismissButtonText:void 0,pendingAbortSessionId:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null,selectedAgent:null}),zl=e=>{let[t,n]=vi(Ru(e)),o=()=>t.current.state==="active",l=()=>t.current.state==="holding",a={startHold:i=>{i!==void 0&&n("keyHoldDuration",i),n("current",{state:"holding",startedAt:Date.now()});},release:()=>{t.current.state==="holding"&&n("current",{state:"idle"});},activate:()=>{n("current",{state:"active",phase:"hovering",isPromptMode:false,isPendingDismiss:false}),n("activationTimestamp",Date.now()),n("previouslyFocusedElement",document.activeElement);},deactivate:()=>{n(Gt(i=>{i.current={state:"idle"},i.wasActivatedByToggle=false,i.pendingCommentMode=false,i.inputText="",i.frozenElement=null,i.frozenElements=[],i.frozenDragRect=null,i.pendingClickData=null,i.replySessionId=null,i.pendingAbortSessionId=null,i.activationTimestamp=null,i.previouslyFocusedElement=null,i.contextMenuPosition=null,i.contextMenuElement=null,i.contextMenuClickOffset=null,i.selectedAgent=null,i.lastCopiedElement=null;}));},toggle:()=>{t.activationTimestamp!==null?a.deactivate():(n("wasActivatedByToggle",true),a.activate());},freeze:()=>{if(t.current.state==="active"){let i=t.frozenElement??t.detectedElement;i&&n("frozenElement",i),n("current",Gt(d=>{d.state==="active"&&(d.phase="frozen");}));}},unfreeze:()=>{t.current.state==="active"&&(n("frozenElement",null),n("frozenElements",[]),n("frozenDragRect",null),n("current",Gt(i=>{i.state==="active"&&(i.phase="hovering");})));},startDrag:i=>{t.current.state==="active"&&(a.clearFrozenElement(),n("dragStart",{x:i.x+window.scrollX,y:i.y+window.scrollY}),n("current",Gt(d=>{d.state==="active"&&(d.phase="dragging");})));},endDrag:()=>{t.current.state==="active"&&t.current.phase==="dragging"&&(n("dragStart",{x:-1e3,y:-1e3}),n("current",Gt(i=>{i.state==="active"&&(i.phase="justDragged");})));},cancelDrag:()=>{t.current.state==="active"&&t.current.phase==="dragging"&&(n("dragStart",{x:-1e3,y:-1e3}),n("current",Gt(i=>{i.state==="active"&&(i.phase="hovering");})));},finishJustDragged:()=>{t.current.state==="active"&&t.current.phase==="justDragged"&&n("current",Gt(i=>{i.state==="active"&&(i.phase="hovering");}));},startCopy:()=>{let i=t.current.state==="active";n("current",{state:"copying",startedAt:Date.now(),wasActive:i});},completeCopy:i=>{n("pendingClickData",null),i&&n("lastCopiedElement",i);let d=t.current.state==="copying"?t.current.wasActive:false;n("current",{state:"justCopied",copiedAt:Date.now(),wasActive:d});},finishJustCopied:()=>{t.current.state==="justCopied"&&(t.current.wasActive&&!t.wasActivatedByToggle?(a.clearFrozenElement(),n("current",{state:"active",phase:"hovering",isPromptMode:false,isPendingDismiss:false})):a.deactivate());},enterPromptMode:(i,d)=>{let s=ze(d),c=s.x+s.width/2;n("copyStart",i),n("copyOffsetFromCenterX",i.x-c),n("pointer",i),n("frozenElement",d),n("wasActivatedByToggle",true),t.current.state!=="active"?(n("current",{state:"active",phase:"frozen",isPromptMode:true,isPendingDismiss:false}),n("activationTimestamp",Date.now()),n("previouslyFocusedElement",document.activeElement)):n("current",Gt(g=>{g.state==="active"&&(g.isPromptMode=true,g.phase="frozen");}));},exitPromptMode:()=>{t.current.state==="active"&&n("current",Gt(i=>{i.state==="active"&&(i.isPromptMode=false,i.isPendingDismiss=false);}));},setInputText:i=>{n("inputText",i);},clearInputText:()=>{n("inputText","");},setPendingDismiss:i=>{t.current.state==="active"&&n("current",Gt(d=>{d.state==="active"&&(d.isPendingDismiss=i);}));},setPointer:i=>{n("pointer",i);},setDetectedElement:i=>{n("detectedElement",i);},setFrozenElement:i=>{n("frozenElement",i),n("frozenElements",[i]),n("frozenDragRect",null);},setFrozenElements:i=>{n("frozenElements",i),n("frozenElement",i.length>0?i[0]:null),n("frozenDragRect",null);},setFrozenDragRect:i=>{n("frozenDragRect",i);},clearFrozenElement:()=>{n("frozenElement",null),n("frozenElements",[]),n("frozenDragRect",null);},setCopyStart:(i,d)=>{let s=ze(d),c=s.x+s.width/2;n("copyStart",i),n("copyOffsetFromCenterX",i.x-c);},setLastGrabbed:i=>{n("lastGrabbedElement",i);},clearLastCopied:()=>{n("lastCopiedElement",null);},setWasActivatedByToggle:i=>{n("wasActivatedByToggle",i);},setPendingCommentMode:i=>{n("pendingCommentMode",i);},setTouchMode:i=>{n("isTouchMode",i);},setSelectionSource:(i,d)=>{n("selectionFilePath",i),n("selectionLineNumber",d);},setPendingClickData:i=>{n("pendingClickData",i);},clearReplySessionId:()=>{n("replySessionId",null);},incrementViewportVersion:()=>{n("viewportVersion",i=>i+1);},addGrabbedBox:i=>{n("grabbedBoxes",d=>[...d,i]);},removeGrabbedBox:i=>{n("grabbedBoxes",d=>d.filter(s=>s.id!==i));},clearGrabbedBoxes:()=>{n("grabbedBoxes",[]);},addLabelInstance:i=>{n("labelInstances",d=>[...d,i]);},updateLabelInstance:(i,d,s)=>{let c=t.labelInstances.findIndex(g=>g.id===i);c!==-1&&n("labelInstances",c,Gt(g=>{g.status=d,s!==void 0&&(g.errorMessage=s);}));},removeLabelInstance:i=>{n("labelInstances",d=>d.filter(s=>s.id!==i));},clearLabelInstances:()=>{n("labelInstances",[]);},setHasAgentProvider:i=>{n("hasAgentProvider",i);},setAgentCapabilities:i=>{n("supportsUndo",i.supportsUndo),n("supportsFollowUp",i.supportsFollowUp),n("dismissButtonText",i.dismissButtonText),n("isAgentConnected",i.isAgentConnected);},setPendingAbortSessionId:i=>{n("pendingAbortSessionId",i);},updateSessionBounds:()=>{let i=t.agentSessions;if(i.size===0)return;let d=new Map(i),s=false;for(let[c,g]of i){let m=t.sessionElements.get(c)??null;if(et(m)){let h=ze(m),A=g.selectionBounds[0],Y=Ci({currentPosition:g.position,previousBounds:A,nextBounds:h});d.set(c,{...g,selectionBounds:[h],position:Y}),s=true;}}s&&n("agentSessions",d);},addAgentSession:(i,d,s)=>{let c=new Map(t.agentSessions);c.set(i,d),n("agentSessions",c);let g=new Map(t.sessionElements);g.set(i,s),n("sessionElements",g);},updateAgentSessionStatus:(i,d)=>{let s=t.agentSessions.get(i);if(!s)return;let c=new Map(t.agentSessions);c.set(i,{...s,lastStatus:d}),n("agentSessions",c);},completeAgentSession:(i,d)=>{let s=t.agentSessions.get(i);if(!s)return;let c=new Map(t.agentSessions);c.set(i,{...s,isStreaming:false,lastStatus:d??s.lastStatus}),n("agentSessions",c);},setAgentSessionError:(i,d)=>{let s=t.agentSessions.get(i);if(!s)return;let c=new Map(t.agentSessions);c.set(i,{...s,isStreaming:false,error:d}),n("agentSessions",c);},removeAgentSession:i=>{let d=new Map(t.agentSessions);d.delete(i),n("agentSessions",d);let s=new Map(t.sessionElements);s.delete(i),n("sessionElements",s);},showContextMenu:(i,d)=>{let s=ze(d),c=s.x+s.width/2,g=s.y+s.height/2;n("contextMenuPosition",i),n("contextMenuElement",d),n("contextMenuClickOffset",{x:i.x-c,y:i.y-g});},hideContextMenu:()=>{n("contextMenuPosition",null),n("contextMenuElement",null),n("contextMenuClickOffset",null);},updateContextMenuPosition:()=>{let i=t.contextMenuElement,d=t.contextMenuClickOffset;if(!i||!d||!et(i))return;let s=ze(i),c=s.x+s.width/2,g=s.y+s.height/2;n("contextMenuPosition",{x:c+d.x,y:g+d.y});},setSelectedAgent:i=>{n("selectedAgent",i);}};return {store:t,setStore:n,actions:a,isActive:o,isHolding:l}};var $u=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox","combobox"],Nu=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},Ct=e=>{if(document.designMode==="on")return true;let t=Nu(e);if(!t)return false;if(t.isContentEditable)return true;let n=chunkXWSK4QRO_cjs.ha(t);return $u.some(o=>o===n||o===t.role)},Vl=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let n=t.selectionStart??0;return (t.selectionEnd??0)-n>0}return false},Kl=()=>{let e=window.getSelection();return e?e.toString().length>0:false};var Si="data-react-grab",Ul="react-grab-fonts",Hu="https://fonts.googleapis.com/css2?family=Geist:wght@500&display=swap",Fu=()=>{if(document.getElementById(Ul)||!document.head)return;let e=document.createElement("link");e.id=Ul,e.rel="stylesheet",e.href=Hu,document.head.appendChild(e);},Wl=e=>{Fu();let t=document.querySelector(`[${Si}]`);if(t){let i=t.shadowRoot?.querySelector(`[${Si}]`);if(i instanceof HTMLDivElement&&t.shadowRoot)return i}let n=document.createElement("div");n.setAttribute(Si,"true"),n.style.zIndex=String(2147483647),n.style.position="fixed",n.style.inset="0",n.style.pointerEvents="none";let o=n.attachShadow({mode:"open"});{let i=document.createElement("style");i.textContent=e,o.appendChild(i);}let l=document.createElement("div");l.setAttribute(Si,"true"),o.appendChild(l);let a=document.body??document.documentElement;return a.appendChild(n),setTimeout(()=>{a.appendChild(n);},chunkXWSK4QRO_cjs.Q),l};var $o=(e,t,n)=>e+(t-e)*n;var Vu=B("<canvas data-react-grab-overlay-canvas style=position:fixed;top:0;left:0;pointer-events:none>"),zn={drag:{borderColor:chunkXWSK4QRO_cjs.c,fillColor:chunkXWSK4QRO_cjs.d,lerpFactor:.7},selection:{borderColor:chunkXWSK4QRO_cjs.e,fillColor:chunkXWSK4QRO_cjs.f,lerpFactor:.95},grabbed:{borderColor:chunkXWSK4QRO_cjs.e,fillColor:chunkXWSK4QRO_cjs.f,lerpFactor:.95},processing:{borderColor:chunkXWSK4QRO_cjs.e,fillColor:chunkXWSK4QRO_cjs.f,lerpFactor:.95}},Xl=e=>{let t,n=null,o=0,l=0,a=1,i=null,d={crosshair:{canvas:null,context:null},drag:{canvas:null,context:null},selection:{canvas:null,context:null},grabbed:{canvas:null,context:null},processing:{canvas:null,context:null}},s={x:0,y:0},c=[],g=null,m=[],h=[],A=(C,M,H)=>{let j=new OffscreenCanvas(C*H,M*H),b=j.getContext("2d");return b&&b.scale(H,H),{canvas:j,context:b}},Y=()=>{if(t){a=Math.max(window.devicePixelRatio||1,2),o=window.innerWidth,l=window.innerHeight,t.width=o*a,t.height=l*a,t.style.width=`${o}px`,t.style.height=`${l}px`,n=t.getContext("2d"),n&&n.scale(a,a);for(let C of Object.keys(d))d[C]=A(o,l,a);}},D=C=>{if(!C)return 0;let M=C.match(/^(\d+(?:\.\d+)?)/);return M?parseFloat(M[1]):0},q=(C,M,H)=>({id:C,current:{x:M.x,y:M.y,width:M.width,height:M.height},target:{x:M.x,y:M.y,width:M.width,height:M.height},borderRadius:D(M.borderRadius),opacity:H?.opacity??1,targetOpacity:H?.targetOpacity??H?.opacity??1,createdAt:H?.createdAt,isInitialized:true}),f=(C,M,H)=>{C.target={x:M.x,y:M.y,width:M.width,height:M.height},C.borderRadius=D(M.borderRadius),H!==void 0&&(C.targetOpacity=H);},w=C=>C.boundsMultiple??[C.bounds],x=(C,M,H,j,b,S,V,$,Q=1)=>{if(j<=0||b<=0)return;let F=Math.min(j/2,b/2),Ee=Math.min(S,F);C.globalAlpha=Q,C.beginPath(),Ee>0?C.roundRect(M,H,j,b,Ee):C.rect(M,H,j,b),C.fillStyle=V,C.fill(),C.strokeStyle=$,C.lineWidth=1,C.stroke(),C.globalAlpha=1;},y=()=>{let C=d.crosshair;if(!C.context)return;let M=C.context;M.clearRect(0,0,o,l),e.crosshairVisible&&(M.strokeStyle=chunkXWSK4QRO_cjs.b,M.lineWidth=1,M.beginPath(),M.moveTo(s.x,0),M.lineTo(s.x,l),M.moveTo(0,s.y),M.lineTo(o,s.y),M.stroke());},k=()=>{let C=d.drag;if(!C.context)return;let M=C.context;if(M.clearRect(0,0,o,l),!e.dragVisible||!g)return;let H=zn.drag;x(M,g.current.x,g.current.y,g.current.width,g.current.height,g.borderRadius,H.fillColor,H.borderColor);},z=()=>{let C=d.selection;if(!C.context)return;let M=C.context;if(M.clearRect(0,0,o,l),!e.selectionVisible)return;let H=zn.selection;for(let j of c){let b=e.selectionIsFading?0:j.opacity;x(M,j.current.x,j.current.y,j.current.width,j.current.height,j.borderRadius,H.fillColor,H.borderColor,b);}},ce=()=>{let C=d.grabbed;if(!C.context)return;let M=C.context;M.clearRect(0,0,o,l);let H=zn.grabbed;for(let j of m)x(M,j.current.x,j.current.y,j.current.width,j.current.height,j.borderRadius,H.fillColor,H.borderColor,j.opacity);},N=()=>{let C=d.processing;if(!C.context)return;let M=C.context;M.clearRect(0,0,o,l);let H=zn.processing;for(let j of h)x(M,j.current.x,j.current.y,j.current.width,j.current.height,j.borderRadius,H.fillColor,H.borderColor,j.opacity);},se=()=>{if(!n||!t)return;n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.width,t.height),n.setTransform(a,0,0,a,0,0),y(),k(),z(),ce(),N();let C=["crosshair","drag","selection","grabbed","processing"];for(let M of C){let H=d[M];H.canvas&&n.drawImage(H.canvas,0,0,o,l);}},ae=(C,M,H)=>{let j=$o(C.current.x,C.target.x,M),b=$o(C.current.y,C.target.y,M),S=$o(C.current.width,C.target.width,M),V=$o(C.current.height,C.target.height,M),$=Math.abs(j-C.target.x)<.5&&Math.abs(b-C.target.y)<.5&&Math.abs(S-C.target.width)<.5&&Math.abs(V-C.target.height)<.5;C.current.x=$?C.target.x:j,C.current.y=$?C.target.y:b,C.current.width=$?C.target.width:S,C.current.height=$?C.target.height:V;let Q=true;if(H?.interpolateOpacity){let F=$o(C.opacity,C.targetOpacity,M);Q=Math.abs(F-C.targetOpacity)<.01,C.opacity=Q?C.targetOpacity:F;}return !$||!Q},le=()=>{let C=false;g?.isInitialized&&ae(g,zn.drag.lerpFactor)&&(C=true);for(let H of c)H.isInitialized&&ae(H,zn.selection.lerpFactor)&&(C=true);let M=Date.now();m=m.filter(H=>{let j=H.id.startsWith("label-");if(H.isInitialized&&ae(H,zn.grabbed.lerpFactor,{interpolateOpacity:j})&&(C=true),H.createdAt){let b=M-H.createdAt,S=1600;if(b>=S)return false;if(b>1500){let V=(b-1500)/100;H.opacity=1-V,C=true;}return true}return j?!(Math.abs(H.opacity-H.targetOpacity)<.01&&H.targetOpacity===0):H.opacity>0});for(let H of h)H.isInitialized&&ae(H,zn.processing.lerpFactor)&&(C=true);se(),C?i=chunkXWSK4QRO_cjs.ia(le):i=null;},G=()=>{i===null&&(i=chunkXWSK4QRO_cjs.ia(le));},te=()=>{Y(),G();};return pe(Be(()=>e.crosshairVisible,()=>{G();})),pe(Be(()=>[e.selectionVisible,e.selectionBounds,e.selectionBoundsMultiple,e.selectionIsFading,e.selectionShouldSnap],([C,M,H,,j])=>{if(!C||!M&&(!H||H.length===0)){c=[],G();return}c=(H&&H.length>0?H:M?[M]:[]).map((S,V)=>{let $=`selection-${V}`,Q=c.find(F=>F.id===$);return Q?(f(Q,S),j&&(Q.current={...Q.target}),Q):q($,S)}),G();})),pe(Be(()=>[e.dragVisible,e.dragBounds],([C,M])=>{if(!C||!M){g=null,G();return}g?f(g,M):g=q("drag",M),G();})),pe(Be(()=>e.grabbedBoxes,C=>{let M=C??[],H=new Set(M.map(b=>b.id)),j=new Set(m.map(b=>b.id));for(let b of M)j.has(b.id)||m.push(q(b.id,b.bounds,{createdAt:b.createdAt}));for(let b of m){let S=M.find(V=>V.id===b.id);S&&f(b,S.bounds);}m=m.filter(b=>b.id.startsWith("label-")?true:H.has(b.id)),G();})),pe(Be(()=>e.agentSessions,C=>{if(!C||C.size===0){h=[],G();return}let M=[];for(let[H,j]of C)for(let b=0;b<j.selectionBounds.length;b++){let S=j.selectionBounds[b],V=`processing-${H}-${b}`,$=h.find(Q=>Q.id===V);$?(f($,S),M.push($)):M.push(q(V,S));}h=M,G();})),pe(Be(()=>e.labelInstances,C=>{let M=C??[];for(let j of M){let b=w(j),S=j.status==="fading"?0:1;for(let V=0;V<b.length;V++){let $=b[V],Q=`label-${j.id}-${V}`,F=m.find(Ee=>Ee.id===Q);F?f(F,$,S):m.push(q(Q,$,{opacity:1,targetOpacity:S}));}}let H=new Set;for(let j of M){let b=w(j);for(let S=0;S<b.length;S++)H.add(`label-${j.id}-${S}`);}m=m.filter(j=>j.id.startsWith("label-")?H.has(j.id):true),G();})),mt(()=>{Y(),G();let C=b=>{b.isPrimary&&(s.x=b.clientX,s.y=b.clientY,G());};window.addEventListener("pointermove",C,{passive:true}),window.addEventListener("resize",te);let M=null,H=()=>{Math.max(window.devicePixelRatio||1,2)!==a&&(te(),j());},j=()=>{M&&M.removeEventListener("change",H),M=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),M.addEventListener("change",H);};j(),Me(()=>{window.removeEventListener("pointermove",C),window.removeEventListener("resize",te),M&&M.removeEventListener("change",H),i!==null&&chunkXWSK4QRO_cjs.ja(i);});}),(()=>{var C=Vu(),M=t;return typeof M=="function"?We(M,C):t=C,J(H=>he(C,"z-index",String(2147483645))),C})()};var Ai=e=>{if(e<=0)return chunkXWSK4QRO_cjs.i;let t=e*chunkXWSK4QRO_cjs.k;return Math.max(chunkXWSK4QRO_cjs.j,Math.min(chunkXWSK4QRO_cjs.i,t))};function Yl(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=Yl(e[t]))&&(o&&(o+=" "),o+=n);}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function ql(){for(var e,t,n=0,o="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=Yl(e))&&(o&&(o+=" "),o+=t);return o}var Bs="-",Ku=e=>{let t=Wu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:i=>{let d=i.split(Bs);return d[0]===""&&d.length!==1&&d.shift(),Ql(d,t)||Uu(i)},getConflictingClassGroupIds:(i,d)=>{let s=n[i]||[];return d&&o[i]?[...s,...o[i]]:s}}},Ql=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],o=t.nextPart.get(n),l=o?Ql(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let a=e.join(Bs);return t.validators.find(({validator:i})=>i(a))?.classGroupId},Zl=/^\[(.+)\]$/,Uu=e=>{if(Zl.test(e)){let t=Zl.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return "arbitrary.."+n}},Wu=e=>{let{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return ju(Object.entries(e.classGroups),n).forEach(([a,i])=>{Ns(i,o,a,t);}),o},Ns=(e,t,n,o)=>{e.forEach(l=>{if(typeof l=="string"){let a=l===""?t:Jl(t,l);a.classGroupId=n;return}if(typeof l=="function"){if(Gu(l)){Ns(l(o),t,n,o);return}t.validators.push({validator:l,classGroupId:n});return}Object.entries(l).forEach(([a,i])=>{Ns(i,Jl(t,a),n,o);});});},Jl=(e,t)=>{let n=e;return t.split(Bs).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o);}),n},Gu=e=>e.isThemeGetter,ju=(e,t)=>t?e.map(([n,o])=>{let l=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,d])=>[t+i,d])):a);return [n,l]}):e,Xu=e=>{if(e<1)return {get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map,l=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,o=n,n=new Map);};return {get(a){let i=n.get(a);if(i!==void 0)return i;if((i=o.get(a))!==void 0)return l(a,i),i},set(a,i){n.has(a)?n.set(a,i):l(a,i);}}},ec="!",Yu=e=>{let{separator:t,experimentalParseClassName:n}=e,o=t.length===1,l=t[0],a=t.length,i=d=>{let s=[],c=0,g=0,m;for(let q=0;q<d.length;q++){let f=d[q];if(c===0){if(f===l&&(o||d.slice(q,q+a)===t)){s.push(d.slice(g,q)),g=q+a;continue}if(f==="/"){m=q;continue}}f==="["?c++:f==="]"&&c--;}let h=s.length===0?d:d.substring(g),A=h.startsWith(ec),Y=A?h.substring(1):h,D=m&&m>g?m-g:void 0;return {modifiers:s,hasImportantModifier:A,baseClassName:Y,maybePostfixModifierPosition:D}};return n?d=>n({className:d,parseClassName:i}):i},qu=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o);}),t.push(...n.sort()),t},Zu=e=>({cache:Xu(e.cacheSize),parseClassName:Yu(e),...Ku(e)}),Ju=/\s+/,Qu=(e,t)=>{let{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:l}=t,a=[],i=e.trim().split(Ju),d="";for(let s=i.length-1;s>=0;s-=1){let c=i[s],{modifiers:g,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:A}=n(c),Y=!!A,D=o(Y?h.substring(0,A):h);if(!D){if(!Y){d=c+(d.length>0?" "+d:d);continue}if(D=o(h),!D){d=c+(d.length>0?" "+d:d);continue}Y=false;}let q=qu(g).join(":"),f=m?q+ec:q,w=f+D;if(a.includes(w))continue;a.push(w);let x=l(D,Y);for(let y=0;y<x.length;++y){let k=x[y];a.push(f+k);}d=c+(d.length>0?" "+d:d);}return d};function ef(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=tc(t))&&(o&&(o+=" "),o+=n);return o}var tc=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=tc(e[o]))&&(n&&(n+=" "),n+=t);return n};function tf(e,...t){let n,o,l,a=i;function i(s){let c=t.reduce((g,m)=>m(g),e());return n=Zu(c),o=n.cache.get,l=n.cache.set,a=d,d(s)}function d(s){let c=o(s);if(c)return c;let g=Qu(s,n);return l(s,g),g}return function(){return a(ef.apply(null,arguments))}}var ot=e=>{let t=n=>n[e]||[];return t.isThemeGetter=true,t},nc=/^\[(?:([a-z-]+):)?(.+)\]$/i,nf=/^\d+\/\d+$/,of=new Set(["px","full","screen"]),rf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,af=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,lf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kn=e=>No(e)||of.has(e)||nf.test(e),Vn=e=>Bo(e,"length",bf),No=e=>!!e&&!Number.isNaN(Number(e)),$s=e=>Bo(e,"number",No),wr=e=>!!e&&Number.isInteger(Number(e)),df=e=>e.endsWith("%")&&No(e.slice(0,-1)),_e=e=>nc.test(e),Kn=e=>rf.test(e),uf=new Set(["length","size","percentage"]),ff=e=>Bo(e,uf,oc),mf=e=>Bo(e,"position",oc),gf=new Set(["image","url"]),pf=e=>Bo(e,gf,wf),hf=e=>Bo(e,"",yf),xr=()=>true,Bo=(e,t,n)=>{let o=nc.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):false},bf=e=>sf.test(e)&&!af.test(e),oc=()=>false,yf=e=>lf.test(e),wf=e=>cf.test(e);var xf=()=>{let e=ot("colors"),t=ot("spacing"),n=ot("blur"),o=ot("brightness"),l=ot("borderColor"),a=ot("borderRadius"),i=ot("borderSpacing"),d=ot("borderWidth"),s=ot("contrast"),c=ot("grayscale"),g=ot("hueRotate"),m=ot("invert"),h=ot("gap"),A=ot("gradientColorStops"),Y=ot("gradientColorStopPositions"),D=ot("inset"),q=ot("margin"),f=ot("opacity"),w=ot("padding"),x=ot("saturate"),y=ot("scale"),k=ot("sepia"),z=ot("skew"),ce=ot("space"),N=ot("translate"),se=()=>["auto","contain","none"],ae=()=>["auto","hidden","clip","visible","scroll"],le=()=>["auto",_e,t],G=()=>[_e,t],te=()=>["",kn,Vn],C=()=>["auto",No,_e],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],b=()=>["start","end","center","between","around","evenly","stretch"],S=()=>["","0",_e],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[No,_e];return {cacheSize:500,separator:":",theme:{colors:[xr],spacing:[kn,Vn],blur:["none","",Kn,_e],brightness:$(),borderColor:[e],borderRadius:["none","","full",Kn,_e],borderSpacing:G(),borderWidth:te(),contrast:$(),grayscale:S(),hueRotate:$(),invert:S(),gap:G(),gradientColorStops:[e],gradientColorStopPositions:[df,Vn],inset:le(),margin:le(),opacity:$(),padding:G(),saturate:$(),scale:$(),sepia:S(),skew:$(),space:G(),translate:G()},classGroups:{aspect:[{aspect:["auto","square","video",_e]}],container:["container"],columns:[{columns:[Kn]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...M(),_e]}],overflow:[{overflow:ae()}],"overflow-x":[{"overflow-x":ae()}],"overflow-y":[{"overflow-y":ae()}],overscroll:[{overscroll:se()}],"overscroll-x":[{"overscroll-x":se()}],"overscroll-y":[{"overscroll-y":se()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[D]}],"inset-x":[{"inset-x":[D]}],"inset-y":[{"inset-y":[D]}],start:[{start:[D]}],end:[{end:[D]}],top:[{top:[D]}],right:[{right:[D]}],bottom:[{bottom:[D]}],left:[{left:[D]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wr,_e]}],basis:[{basis:le()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",_e]}],grow:[{grow:S()}],shrink:[{shrink:S()}],order:[{order:["first","last","none",wr,_e]}],"grid-cols":[{"grid-cols":[xr]}],"col-start-end":[{col:["auto",{span:["full",wr,_e]},_e]}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":[xr]}],"row-start-end":[{row:["auto",{span:[wr,_e]},_e]}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",_e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",_e]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...b()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...b(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...b(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[q]}],mx:[{mx:[q]}],my:[{my:[q]}],ms:[{ms:[q]}],me:[{me:[q]}],mt:[{mt:[q]}],mr:[{mr:[q]}],mb:[{mb:[q]}],ml:[{ml:[q]}],"space-x":[{"space-x":[ce]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ce]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",_e,t]}],"min-w":[{"min-w":[_e,t,"min","max","fit"]}],"max-w":[{"max-w":[_e,t,"none","full","min","max","fit","prose",{screen:[Kn]},Kn]}],h:[{h:[_e,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[_e,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[_e,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Kn,Vn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$s]}],"font-family":[{font:[xr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",_e]}],"line-clamp":[{"line-clamp":["none",No,$s]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",kn,_e]}],"list-image":[{"list-image":["none",_e]}],"list-style-type":[{list:["none","disc","decimal",_e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[f]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",kn,Vn]}],"underline-offset":[{"underline-offset":["auto",kn,_e]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[f]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),mf]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ff]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},pf]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[Y]}],"gradient-via-pos":[{via:[Y]}],"gradient-to-pos":[{to:[Y]}],"gradient-from":[{from:[A]}],"gradient-via":[{via:[A]}],"gradient-to":[{to:[A]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[f]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[f]}],"divide-style":[{divide:H()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[kn,_e]}],"outline-w":[{outline:[kn,Vn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[f]}],"ring-offset-w":[{"ring-offset":[kn,Vn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Kn,hf]}],"shadow-color":[{shadow:[xr]}],opacity:[{opacity:[f]}],"mix-blend":[{"mix-blend":[...j(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",Kn,_e]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[m]}],saturate:[{saturate:[x]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[f]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",_e]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",_e]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",_e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[wr,_e]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[z]}],"skew-y":[{"skew-y":[z]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",_e]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_e]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_e]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[kn,Vn,$s]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var rc=tf(xf);var xe=(...e)=>rc(ql(e));var Pi=e=>e.elementsCount&&e.elementsCount>1?{tagName:`${e.elementsCount} elements`,componentName:void 0}:{tagName:e.tagName||e.componentName||"element",componentName:e.tagName?e.componentName:void 0};var Hs=null,Mn=()=>(Hs===null&&(Hs=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform)),Hs);var Un=e=>e==="Enter"?"\u21B5":Mn()?`\u2318${e}`:`Ctrl+${e.replace("\u21E7","Shift+")}`;var vf=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 12 12"fill=none style=transform:rotate(180deg)><path d="M5 3V1L1 4.5L5 8V6C8 6 10 7 11 10C11 7 9 4 5 3Z"fill=currentColor>'),Ti=e=>{let t=()=>e.size??12;return (()=>{var n=vf();return J(o=>{var l=t(),a=t(),i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var Cf=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 12 12"fill=none><path d="M6 1L6 11M6 1L2 5M6 1L10 5"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>'),ki=e=>{let t=()=>e.size??12;return (()=>{var n=Cf();return J(o=>{var l=t(),a=t(),i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var Sf=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path class=icon-loader-bar d="M12 2v4"style=animation-delay:0ms></path><path class=icon-loader-bar d="M15 6.8l2-3.5"style=animation-delay:-42ms></path><path class=icon-loader-bar d="M17.2 9l3.5-2"style=animation-delay:-83ms></path><path class=icon-loader-bar d="M18 12h4"style=animation-delay:-125ms></path><path class=icon-loader-bar d="M17.2 15l3.5 2"style=animation-delay:-167ms></path><path class=icon-loader-bar d="M15 17.2l2 3.5"style=animation-delay:-208ms></path><path class=icon-loader-bar d="M12 18v4"style=animation-delay:-250ms></path><path class=icon-loader-bar d="M9 17.2l-2 3.5"style=animation-delay:-292ms></path><path class=icon-loader-bar d="M6.8 15l-3.5 2"style=animation-delay:-333ms></path><path class=icon-loader-bar d="M2 12h4"style=animation-delay:-375ms></path><path class=icon-loader-bar d="M6.8 9l-3.5-2"style=animation-delay:-417ms></path><path class=icon-loader-bar d="M9 6.8l-2-3.5"style=animation-delay:-458ms>'),ic=e=>{let t=()=>e.size??16;return (()=>{var n=Sf(),o=n.firstChild,l=o.nextSibling,a=l.nextSibling,i=a.nextSibling,d=i.nextSibling,s=d.nextSibling,c=s.nextSibling,g=c.nextSibling,m=g.nextSibling,h=m.nextSibling,A=h.nextSibling;A.nextSibling;return J(D=>{var q=t(),f=t(),w=e.class;return q!==D.e&&re(n,"width",D.e=q),f!==D.t&&re(n,"height",D.t=f),w!==D.a&&re(n,"class",D.a=w),D},{e:void 0,t:void 0,a:void 0}),n})()};var Ef=B('<div data-react-grab-arrow class="absolute w-0 h-0 z-10">'),Mi=e=>{let t=()=>e.color??"white",n=()=>e.position==="bottom",o=()=>Ai(e.labelWidth??0);return (()=>{var l=Ef();return J(a=>{var i=`calc(${e.leftPercent}% + ${e.leftOffsetPx}px)`,d=n()?"0":void 0,s=n()?void 0:"0",c=n()?"translateX(-50%) translateY(-100%)":"translateX(-50%) translateY(100%)",g=`${o()}px solid transparent`,m=`${o()}px solid transparent`,h=n()?`${o()}px solid ${t()}`:void 0,A=n()?void 0:`${o()}px solid ${t()}`;return i!==a.e&&he(l,"left",a.e=i),d!==a.t&&he(l,"top",a.t=d),s!==a.a&&he(l,"bottom",a.a=s),c!==a.o&&he(l,"transform",a.o=c),g!==a.i&&he(l,"border-left",a.i=g),m!==a.n&&he(l,"border-right",a.n=m),h!==a.s&&he(l,"border-bottom",a.s=h),A!==a.h&&he(l,"border-top",a.h=A),a},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),l})()};var Af=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2><path d="M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6"></path><path d="M11 13l9-9"></path><path d="M15 4h5v5">'),sc=e=>{let t=()=>e.size??12;return (()=>{var n=Af();return J(o=>{var l=t(),a=t(),i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var ac=B("<span class=text-black>"),Pf=B("<span class=text-black/50>."),Tf=B('<div><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0">'),vr=e=>{let[t,n]=L(false),o=()=>{n(true),e.onHoverChange?.(true);},l=()=>{n(false),e.onHoverChange?.(false);};return (()=>{var a=Tf(),i=a.firstChild;return Je(a,"click",e.onClick,true),a.addEventListener("mouseleave",l),a.addEventListener("mouseenter",o),O(i,T(me,{get when(){return e.componentName},get children(){return [(()=>{var d=ac();return O(d,()=>e.componentName),d})(),(()=>{var d=Pf();d.firstChild;return O(d,()=>e.tagName,null),d})()]}}),null),O(i,T(me,{get when(){return !e.componentName},get children(){var d=ac();return O(d,()=>e.tagName),d}}),null),O(a,T(me,{get when(){return e.isClickable||e.forceShowIcon},get children(){return T(sc,{size:10,get class(){return xe("text-black transition-all duration-100 shrink-0",t()||e.forceShowIcon?"opacity-100 scale-100":"opacity-0 scale-75 -ml-[2px] w-0")}})}}),null),J(()=>Ie(a,xe("contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden",e.shrink&&"shrink-0",e.isClickable&&"cursor-pointer"))),a})()};it(["click"]);var kf=B('<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-1.5 w-auto h-fit self-stretch [border-top-width:0.5px] border-t-solid border-t-[#D9D9D9] antialiased rounded-t-none rounded-b-[6px]">'),_t=e=>(()=>{var t=kf();return O(t,()=>e.children),t})();var Ii=null,Et={claim:e=>{Ii=e;},release:e=>{Ii===e&&(Ii=null);},isActive:e=>Ii===e};var Mf=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 22 19"fill=none><path d="M6.76263 18.6626C7.48251 18.6626 7.95474 18.1682 7.95474 17.4895C7.95474 17.1207 7.80474 16.8576 7.58683 16.6361L5.3018 14.4137L2.84621 12.3589L2.44374 13.0037L5.92137 13.1622H17.9232C20.4842 13.1622 21.593 12.021 21.593 9.47237V3.66983C21.593 1.10875 20.4842 0 17.9232 0H12.5414C11.8179 0 11.3018 0.545895 11.3018 1.21695C11.3018 1.888 11.8179 2.43389 12.5414 2.43389H17.8424C18.7937 2.43389 19.1897 2.83653 19.1897 3.78784V9.35747C19.1897 10.3257 18.7937 10.7314 17.8424 10.7314H5.92137L2.44374 10.8832L2.84621 11.5281L5.3018 9.47993L7.58683 7.2606C7.80474 7.03914 7.95474 6.7693 7.95474 6.40049C7.95474 5.72854 7.48251 5.22747 6.76263 5.22747C6.46129 5.22747 6.12975 5.36905 5.89231 5.6096L0.376815 11.0425C0.134921 11.2777 0 11.6141 0 11.9452C0 12.2728 0.134921 12.6158 0.376815 12.848L5.89231 18.2871C6.12975 18.5276 6.46129 18.6626 6.76263 18.6626Z"fill=currentColor>'),_i=e=>{let t=()=>e.size??12;return (()=>{var n=Mf();return J(o=>{var l=t(),a=t()*19/22,i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var If=B('<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit"><button data-react-grab-discard-no class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">No</span></button><button data-react-grab-discard-yes class="contain-layout shrink-0 flex items-center justify-center gap-0.5 px-[3px] py-px rounded-sm bg-[#FEF2F2] cursor-pointer transition-all hover:bg-[#FEE2E2] press-scale h-[17px]"><span class="text-[#B91C1C] text-[13px] leading-3.5 font-sans font-medium">Yes'),_f=B('<div data-react-grab-discard-prompt class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-black text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit">'),Cr=e=>{let t=Symbol(),n=l=>{if(!Et.isActive(t)||Ct(l))return;let a=l.code==="Enter",i=l.code==="Escape";(a||i)&&(l.preventDefault(),l.stopPropagation(),i&&e.cancelOnEscape?e.onCancel?.():e.onConfirm?.());},o=()=>{Et.claim(t);};return mt(()=>{Et.claim(t),window.addEventListener("keydown",n,{capture:true});}),Me(()=>{Et.release(t),window.removeEventListener("keydown",n,{capture:true});}),(()=>{var l=_f(),a=l.firstChild,i=a.firstChild;return l.$$click=o,l.$$pointerdown=o,O(i,()=>e.label??"Discard?"),O(l,T(_t,{get children(){var d=If(),s=d.firstChild,c=s.nextSibling;c.firstChild;return Je(s,"click",e.onCancel,true),Je(c,"click",e.onConfirm,true),O(c,T(_i,{size:10,class:"text-[#B91C1C]/50"}),null),d}}),null),l})()};it(["pointerdown","click"]);var Of=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4C7.58 4 4.01 7.58 4.01 12C4.01 16.42 7.58 20 12 20C15.73 20 18.84 17.45 19.73 14H17.65C16.83 16.33 14.61 18 12 18C8.69 18 6 15.31 6 12C6 8.69 8.69 6 12 6C13.66 6 15.14 6.69 16.22 7.78L13 11H20V4L17.65 6.35Z"fill=currentColor>'),lc=e=>{let t=()=>e.size??12;return (()=>{var n=Of();return J(o=>{var l=t(),a=t(),i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var Df=B('<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit"><button data-react-grab-retry class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">Retry</span></button><button data-react-grab-error-ok class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">Ok'),Lf=B('<div data-react-grab-error class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-start gap-1 px-2 w-full h-fit"><span class="text-[#B91C1C] text-[13px] leading-4 font-sans font-medium overflow-hidden line-clamp-5">'),cc=e=>{let t=Symbol(),n=a=>{if(!Et.isActive(t)||Ct(a))return;let i=a.code==="Enter",d=a.code==="Escape";i?(a.preventDefault(),a.stopPropagation(),e.onRetry?.()):d&&(a.preventDefault(),a.stopPropagation(),e.onAcknowledge?.());},o=()=>{Et.claim(t);};mt(()=>{Et.claim(t),window.addEventListener("keydown",n,{capture:true});}),Me(()=>{Et.release(t),window.removeEventListener("keydown",n,{capture:true});});let l=()=>!!(e.onRetry||e.onAcknowledge);return (()=>{var a=Lf(),i=a.firstChild,d=i.firstChild;return a.$$click=o,a.$$pointerdown=o,O(d,()=>e.error),O(a,T(me,{get when(){return l()},get children(){return T(_t,{get children(){var s=Df(),c=s.firstChild;c.firstChild;var m=c.nextSibling;return Je(c,"click",e.onRetry,true),O(c,T(lc,{size:10,class:"text-black/50"}),null),Je(m,"click",e.onAcknowledge,true),s}})}}),null),J(s=>{var c={"pt-1.5 pb-1":l(),"py-1.5":!l()},g=e.error;return s.e=to(i,c,s.e),g!==s.t&&re(d,"title",s.t=g),s},{e:void 0,t:void 0}),a})()};it(["pointerdown","click"]);var Rf=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><circle cx=5 cy=12 r=2></circle><circle cx=12 cy=12 r=2></circle><circle cx=19 cy=12 r=2>'),Oi=e=>{let t=()=>e.size??12;return (()=>{var n=Rf();return J(o=>{var l=t(),a=t(),i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var $f=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 21 21"fill=none><g clip-path=url(#clip0_icon_check)><path d="M20.1767 10.0875C20.1767 15.6478 15.6576 20.175 10.0875 20.175C4.52715 20.175 0 15.6478 0 10.0875C0 4.51914 4.52715 0 10.0875 0C15.6576 0 20.1767 4.51914 20.1767 10.0875ZM13.0051 6.23867L8.96699 12.7041L7.08476 10.3143C6.83358 9.99199 6.59941 9.88828 6.28984 9.88828C5.79414 9.88828 5.39961 10.2918 5.39961 10.7893C5.39961 11.0367 5.48925 11.2621 5.66386 11.4855L8.05703 14.3967C8.33027 14.7508 8.63183 14.9103 8.99902 14.9103C9.36445 14.9103 9.68105 14.7312 9.90546 14.3896L14.4742 7.27206C14.6107 7.04765 14.7289 6.80898 14.7289 6.58359C14.7289 6.07187 14.281 5.72968 13.7934 5.72968C13.4937 5.72968 13.217 5.90527 13.0051 6.23867Z"fill=currentColor></path></g><defs><clipPath id=clip0_icon_check><rect width=20.5381 height=20.1848 fill=white>'),Sr=e=>{let t=()=>e.size??21;return (()=>{var n=$f();return J(o=>{var l=t(),a=t()*20.1848/20.5381,i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var Nf=B('<button data-react-grab-ignore-events data-react-grab-more-options class="flex items-center justify-center size-[18px] rounded-sm cursor-pointer bg-transparent hover:bg-black/10 text-black/30 hover:text-black border-none outline-none p-0 shrink-0 press-scale">'),Bf=B('<button data-react-grab-undo class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-[#FEF2F2] cursor-pointer transition-all hover:bg-[#FEE2E2] press-scale h-[17px]"><span class="text-[#B91C1C] text-[13px] leading-3.5 font-sans font-medium">Undo'),Hf=B('<button data-react-grab-dismiss class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">'),Ff=B('<div class="contain-layout shrink-0 flex items-center justify-between gap-2 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-black text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0"></span><div class="contain-layout shrink-0 flex items-center gap-2 h-fit">'),zf=B('<div class="contain-layout shrink-0 flex items-center gap-0.5 py-1.5 px-2 w-full h-fit"><span class="text-black text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0">'),Vf=B('<div class="flex items-center gap-1 w-full mb-1 overflow-hidden"><span class="text-black/40 text-[11px] leading-3 font-medium truncate italic">'),Kf=B('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-followup-input class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder=follow-up rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none></textarea><button data-react-grab-followup-submit>'),Uf=B("<div data-react-grab-completion>"),dc=e=>(()=>{var t=Nf();return Je(t,"click",n=>{n.stopImmediatePropagation(),e.onClick();}),Je(t,"pointerdown",n=>{n.stopImmediatePropagation();}),O(t,T(Oi,{size:14})),t})(),uc=e=>{let t=Symbol(),n,o,l,[a,i]=L(false),[d,s]=L(false),[c,g]=L(e.statusText),[m,h]=L(""),A=()=>{o!==void 0&&window.clearTimeout(o),l!==void 0&&window.clearTimeout(l),s(true),e.onFadingChange?.(true),e.onShowContextMenu?.();},Y=()=>{a()||(i(true),g("Copied"),e.onCopyStateChange?.(),o=window.setTimeout(()=>{s(true),e.onFadingChange?.(true),l=window.setTimeout(()=>{e.onDismiss?.();},100);},1400));},D=()=>{let x=m().trim();x&&e.onFollowUpSubmit&&e.onFollowUpSubmit(x);},q=x=>{if(x.isComposing||x.keyCode===229)return;let y=x.code==="KeyZ"&&(x.metaKey||x.ctrlKey),k=x.code==="Enter"&&!x.shiftKey,z=x.code==="Escape";y||x.stopImmediatePropagation(),k?(x.preventDefault(),m().trim()?D():Y()):z&&(x.preventDefault(),e.onDismiss?.());},f=x=>{if(!Et.isActive(t))return;let y=x.code==="KeyZ"&&(x.metaKey||x.ctrlKey)&&!x.shiftKey,k=x.code==="Enter",z=x.code==="Escape";if(y&&e.supportsUndo&&e.onUndo){x.preventDefault(),x.stopPropagation(),e.onUndo();return}Ct(x)||(k?(x.preventDefault(),x.stopPropagation(),Y()):z&&(x.preventDefault(),x.stopPropagation(),e.onDismiss?.()));},w=()=>{Et.claim(t);};return pe(()=>{a()||g(e.statusText);}),mt(()=>{Et.claim(t),window.addEventListener("keydown",f,{capture:true}),e.supportsFollowUp&&e.onFollowUpSubmit&&n&&n.focus();}),Me(()=>{Et.release(t),window.removeEventListener("keydown",f,{capture:true}),o!==void 0&&window.clearTimeout(o),l!==void 0&&window.clearTimeout(l);}),(()=>{var x=Uf();return x.$$click=w,x.$$pointerdown=w,O(x,T(me,{get when(){return He(()=>!a())()&&(e.onDismiss||e.onUndo)},get children(){var y=Ff(),k=y.firstChild,z=k.nextSibling;return O(k,c),O(z,T(me,{get when(){return He(()=>!!e.onShowContextMenu)()&&!e.supportsFollowUp},get children(){return T(dc,{onClick:A})}}),null),O(z,T(me,{get when(){return He(()=>!!e.supportsUndo)()&&e.onUndo},get children(){var ce=Bf();return ce.$$click=()=>e.onUndo?.(),ce}}),null),O(z,T(me,{get when(){return e.onDismiss},get children(){var ce=Hf(),N=ce.firstChild;return ce.$$click=Y,O(N,()=>e.dismissButtonText??"Keep"),O(ce,T(me,{get when(){return !a()},get children(){return T(_i,{size:10,class:"text-black/50"})}}),null),J(()=>ce.disabled=a()),ce}}),null),y}}),null),O(x,T(me,{get when(){return a()||!e.onDismiss&&!e.onUndo},get children(){var y=zf(),k=y.firstChild;return O(y,T(Sr,{size:14,class:"text-black/85 shrink-0 animate-success-pop"}),k),O(k,c),O(y,T(me,{get when(){return He(()=>!!e.onShowContextMenu)()&&!e.supportsFollowUp},get children(){return T(dc,{onClick:A})}}),null),y}}),null),O(x,T(me,{get when(){return He(()=>!!(!a()&&e.supportsFollowUp))()&&e.onFollowUpSubmit},get children(){return T(_t,{get children(){return [T(me,{get when(){return e.previousPrompt},get children(){var y=Vf(),k=y.firstChild;return O(y,T(Ti,{size:10,class:"text-black/30 shrink-0"}),k),O(k,()=>e.previousPrompt),y}}),(()=>{var y=Kf(),k=y.firstChild,z=k.nextSibling;k.$$keydown=q,k.$$input=N=>h(N.target.value);var ce=n;return typeof ce=="function"?We(ce,k):n=k,z.$$click=D,O(z,T(ki,{size:10,class:"text-white"})),J(N=>{var se=e.previousPrompt?"14px":"0",ae=xe("contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-black cursor-pointer ml-1 interactive-scale",!m().trim()&&"opacity-35");return se!==N.e&&he(y,"padding-left",N.e=se),ae!==N.t&&Ie(z,N.t=ae),N},{e:void 0,t:void 0}),J(()=>k.value=m()),y})()]}})}}),null),J(y=>{var k=xe("contain-layout shrink-0 flex flex-col justify-center items-end rounded-[10px] antialiased w-fit h-fit max-w-[280px] transition-opacity duration-100 ease-out [font-synthesis:none] [corner-shape:superellipse(1.25)]",chunkXWSK4QRO_cjs.aa),z=d()?0:1;return k!==y.e&&Ie(x,y.e=k),z!==y.t&&he(x,"opacity",y.t=z),y},{e:void 0,t:void 0}),x})()};it(["pointerdown","click","input","keydown"]);var Wf="0",Gf="1",jf=({hiddenOpacity:e=Wf,visibleOpacity:t=Gf}={})=>{let n,o,l=()=>{o&&(o.style.opacity=e);};return {containerRef:s=>{n=s;},followerRef:s=>{o=s;},followElement:s=>{if(!o||!n)return;if(!s){l();return}let c=n.getBoundingClientRect(),g=s.getBoundingClientRect(),m=g.top-c.top+n.scrollTop,h=g.left-c.left+n.scrollLeft;o.style.opacity=t,o.style.top=`${m}px`,o.style.left=`${h}px`,o.style.width=`${g.width}px`,o.style.height=`${g.height}px`;},hideFollower:l}},Wn=()=>{let{containerRef:e,followerRef:t,followElement:n,hideFollower:o}=jf();return {containerRef:e,highlightRef:t,updateHighlight:n,clearHighlight:o}};var Xf=B('<div class="relative flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">'),Yf=B("<span class=text-black/40>."),qf=B('<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent"><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0 transition-colors">'),fc=e=>{let{containerRef:t,highlightRef:n,updateHighlight:o,clearHighlight:l}=Wn(),a=[];return pe(()=>{let i=a[e.activeIndex];i&&o(i);}),T(_t,{get children(){var i=Xf(),d=i.firstChild;return We(t,i),We(n,d),O(i,T(on,{get each(){return e.items},children:(s,c)=>(()=>{var g=qf(),m=g.firstChild;return g.$$click=h=>{h.stopPropagation(),e.onSelect(c());},g.addEventListener("pointerleave",()=>{let h=a[e.activeIndex];h?o(h):l();}),g.addEventListener("pointerenter",h=>{o(h.currentTarget),e.onSelect(c());}),g.$$pointerdown=h=>h.stopPropagation(),We(h=>{a[c()]=h;},g),O(m,T(me,{get when(){return s.componentName},get children(){return [He(()=>s.componentName),Yf()]}}),null),O(m,()=>s.tagName,null),J(h=>{var A=s.tagName,Y=c()===e.activeIndex,D=c()!==e.activeIndex;return A!==h.e&&re(g,"data-react-grab-arrow-nav-item",h.e=A),Y!==h.t&&m.classList.toggle("text-black",h.t=Y),D!==h.a&&m.classList.toggle("text-black/30",h.a=D),h},{e:void 0,t:void 0,a:void 0}),g})()}),null),i}})};it(["pointerdown","click"]);var Zf=B('<button data-react-grab-ignore-events data-react-grab-abort class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-black cursor-pointer ml-1 interactive-scale"><div class="size-1.5 bg-white rounded-[1px]">'),Jf=B('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 opacity-50 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 disabled style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>'),Qf=B('<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 py-1.5 px-2 w-full h-fit"><span class="shimmer-text text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap">'),em=B('<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">'),tm=B('<div class="contain-layout shrink-0 flex flex-col items-start w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 w-fit h-fit px-2">'),nm=B('<div class="flex items-center gap-1 w-full mb-1 overflow-hidden"><span class="text-black/40 text-[11px] leading-3 font-medium truncate italic">'),om=B('<button data-react-grab-submit class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-black cursor-pointer ml-1 interactive-scale">'),rm=B('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>'),im=B('<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit min-w-[150px] max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2 max-w-full">'),sm=B("<div data-react-grab-ignore-events data-react-grab-selection-label style=z-index:2147483647><div>"),am=B('<span class="text-[11px] font-sans text-black/50 ml-4">'),lm=B('<div class="contain-layout flex items-center justify-between w-full px-2 py-1 transition-colors"><span class="text-[13px] leading-4 font-sans font-medium text-black">'),mc={left:chunkXWSK4QRO_cjs.ga,top:chunkXWSK4QRO_cjs.ga,arrowLeftPercent:chunkXWSK4QRO_cjs.l,arrowLeftOffset:0,edgeOffsetX:0},Li=e=>{let t,n,o,l=false,a=null,i=null,[d,s]=L(0),[c,g]=L(0),[m,h]=L(0),[A,Y]=L("bottom"),[D,q]=L(0),[f,w]=L(false),[x,y]=L(false),k=()=>e.status!=="copying"&&e.status!=="copied"&&e.status!=="fading"&&e.status!=="error",z=()=>e.status==="copied"||e.status==="fading",ce=()=>!!(e.isPromptMode||z()&&(e.onDismiss||e.onShowContextMenu)||e.status==="copying"&&e.onAbort||e.status==="error"&&(e.onAcknowledgeError||e.onRetry)||e.arrowNavigationState?.isVisible),N,se=_=>{l=_;},ae=()=>{q(_=>_+1);},le=_=>{if(Ct(_))return;let R=_.code==="Enter"&&!e.isPromptMode&&k(),Z=_.code==="KeyC"&&_.ctrlKey&&e.status==="copying"&&e.onAbort;R?(_.preventDefault(),_.stopImmediatePropagation(),e.onToggleExpand?.()):Z&&(_.preventDefault(),_.stopImmediatePropagation(),e.onAbort?.());};mt(()=>{if(N=new ResizeObserver(_=>{for(let R of _){let Z=R.target.getBoundingClientRect();R.target===t&&!l?(s(Z.width),g(Z.height)):R.target===n&&h(Z.width);}}),t){let _=t.getBoundingClientRect();s(_.width),g(_.height),N.observe(t);}n&&(h(n.getBoundingClientRect().width),N.observe(n)),window.addEventListener("scroll",ae,true),window.addEventListener("resize",ae),window.addEventListener("keydown",le,{capture:true});}),Me(()=>{N?.disconnect(),window.removeEventListener("scroll",ae,true),window.removeEventListener("resize",ae),window.removeEventListener("keydown",le,{capture:true});}),pe(()=>{let _=`${e.tagName??""}:${e.componentName??""}`;_!==i&&(i=_,a=null);}),pe(()=>{if(e.isPromptMode&&o&&e.onSubmit){let _=setTimeout(()=>{o?.focus();},0);Me(()=>{clearTimeout(_);});}});let G=oe(()=>{D();let _=e.selectionBounds,R=d(),Z=c(),Te=R>0&&Z>0,fe=_&&_.width>0&&_.height>0;if(!Te||!fe)return {position:a??mc,computedArrowPosition:null};let Pe=window.visualViewport?.width??window.innerWidth,de=window.visualViewport?.height??window.innerHeight;if(!(_.x+_.width>0&&_.x<Pe&&_.y+_.height>0&&_.y<de))return {position:mc,computedArrowPosition:null};let Fe=_.x+_.width/2,Le=e.mouseX??Fe,ge=_.y+_.height,Ae=_.y,rt=e.hideArrow?0:Ai(m()),dt=Le,Ve=0,bt=ge+rt+chunkXWSK4QRO_cjs.n;if(R>0){let rn=dt-R/2,Pt=dt+R/2;Pt>Pe-8&&(Ve=Pe-8-Pt),rn+Ve<8&&(Ve=8-rn);}let pn=Z+rt+chunkXWSK4QRO_cjs.n,Bt=bt+Z<=de-8;Bt||(bt=Ae-pn),bt<8&&(bt=8);let Ht=chunkXWSK4QRO_cjs.l,Ot=R/2,hn=Ot-Ve,yt=Math.min(chunkXWSK4QRO_cjs.m,Ot),_n=Math.max(R-chunkXWSK4QRO_cjs.m,Ot),Dt=Math.max(yt,Math.min(_n,hn))-Ot;return {position:{left:dt,top:bt,arrowLeftPercent:Ht,arrowLeftOffset:Dt,edgeOffsetX:Ve},computedArrowPosition:Bt?"bottom":"top"}});pe(()=>{let _=G();_.computedArrowPosition!==null&&(a=_.position,w(true),Y(_.computedArrowPosition));});let te=_=>{if(_.isComposing||_.keyCode===chunkXWSK4QRO_cjs.fa)return;_.stopImmediatePropagation();let R=_.code==="Enter"&&!_.shiftKey,Z=_.code==="Escape";R?(_.preventDefault(),e.onSubmit?.()):Z&&(_.preventDefault(),e.onConfirmDismiss?.());},C=_=>{let R=_.target;R instanceof HTMLTextAreaElement&&e.onInputChange?.(R.value);},M=()=>Pi({tagName:e.tagName,componentName:e.componentName,elementsCount:e.elementsCount}),H=()=>M().tagName,j=()=>M().componentName,b=()=>e.actionCycleState?.items??[],S=()=>e.actionCycleState?.activeIndex??0,V=()=>!!e.actionCycleState?.isVisible,$=()=>!!e.arrowNavigationState?.isVisible,Q=_=>{_.stopImmediatePropagation(),e.filePath&&e.onOpen&&e.onOpen();},F=()=>!!(e.filePath&&e.onOpen),Ee=_=>{_.stopImmediatePropagation(),k()&&e.isPromptMode&&!e.isPendingDismiss&&e.onSubmit&&o&&o.focus();},Ce=()=>f()&&(z()||e.status==="error");return T(me,{get when(){return He(()=>e.visible!==false)()&&(e.selectionBounds||Ce())},get children(){var _=sm(),R=_.firstChild;_.addEventListener("mouseleave",()=>e.onHoverChange?.(false)),_.addEventListener("mouseenter",()=>e.onHoverChange?.(true)),_.$$click=fe=>{fe.stopImmediatePropagation();},_.$$pointerdown=Ee;var Z=t;typeof Z=="function"?We(Z,_):t=_,O(_,T(me,{get when(){return !e.hideArrow},get children(){return T(Mi,{get position(){return A()},get leftPercent(){return G().position.arrowLeftPercent},get leftOffsetPx(){return G().position.arrowLeftOffset},get labelWidth(){return m()}})}}),R),O(_,T(me,{get when(){return He(()=>!!z())()&&!e.error},get children(){return T(uc,{get statusText(){return He(()=>!!e.hasAgent)()?e.statusText??"Completed":"Copied"},get supportsUndo(){return e.supportsUndo},get supportsFollowUp(){return e.supportsFollowUp},get dismissButtonText(){return e.dismissButtonText},get previousPrompt(){return e.previousPrompt},get onDismiss(){return e.onDismiss},get onUndo(){return e.onUndo},get onFollowUpSubmit(){return e.onFollowUpSubmit},onFadingChange:y,get onShowContextMenu(){return e.onShowContextMenu}})}}),R);var Te=n;return typeof Te=="function"?We(Te,R):n=R,O(R,T(me,{get when(){return He(()=>e.status==="copying")()&&!e.isPendingAbort},get children(){var fe=Qf(),Pe=fe.firstChild,de=Pe.firstChild;return O(Pe,T(ic,{size:13,class:"text-[#71717a] shrink-0"}),de),O(de,()=>e.statusText??"Grabbing\u2026"),O(fe,T(me,{get when(){return He(()=>!!e.hasAgent)()&&e.inputValue},get children(){return T(_t,{get children(){var ve=Jf(),Fe=ve.firstChild,Le=o;return typeof Le=="function"?We(Le,Fe):o=Fe,O(ve,T(me,{get when(){return e.onAbort},get children(){var ge=Zf();return ge.$$click=Ae=>{Ae.stopPropagation(),e.onAbort?.();},ge.$$pointerdown=Ae=>Ae.stopPropagation(),ge}}),null),J(()=>Fe.value=e.inputValue??""),ve}})}}),null),J(()=>fe.classList.toggle("min-w-[150px]",!!(e.hasAgent&&e.inputValue))),fe}}),null),O(R,T(me,{get when(){return He(()=>e.status==="copying")()&&e.isPendingAbort},get children(){return T(Cr,{get onConfirm(){return e.onConfirmAbort},get onCancel(){return e.onCancelAbort}})}}),null),O(R,T(me,{get when(){return He(()=>!!k())()&&!e.isPromptMode},get children(){var fe=tm(),Pe=fe.firstChild;return O(Pe,T(vr,{get tagName(){return H()},get componentName(){return j()},get isClickable(){return F()},onClick:Q,onHoverChange:se,shrink:true,get forceShowIcon(){return He(()=>!!$())()?F():!!e.isContextMenuOpen}})),O(fe,T(me,{get when(){return e.arrowNavigationState?.isVisible},get children(){return T(fc,{get items(){return e.arrowNavigationState.items},get activeIndex(){return e.arrowNavigationState.activeIndex},onSelect:de=>e.onArrowNavigationSelect?.(de)})}}),null),O(fe,T(me,{get when(){return He(()=>!$())()&&V()},get children(){return T(_t,{get children(){var de=em();return O(de,T(on,{get each(){return b()},children:(ve,Fe)=>(()=>{var Le=lm(),ge=Le.firstChild;return O(ge,()=>ve.label),O(Le,T(me,{get when(){return ve.shortcut},get children(){var Ae=am();return O(Ae,()=>Un(ve.shortcut)),Ae}}),null),J(Ae=>{var rt=ve.label.toLowerCase(),dt=Fe()===S(),Ve=Fe()===b().length-1;return rt!==Ae.e&&re(Le,"data-react-grab-action-cycle-item",Ae.e=rt),dt!==Ae.t&&Le.classList.toggle("bg-black/5",Ae.t=dt),Ve!==Ae.a&&Le.classList.toggle("rounded-b-[6px]",Ae.a=Ve),Ae},{e:void 0,t:void 0,a:void 0}),Le})()})),de}})}}),null),J(de=>{var ve=!!$(),Fe={"py-1.5":!$(),"pt-1.5 pb-1":$()};return ve!==de.e&&fe.classList.toggle("min-w-[100px]",de.e=ve),de.t=to(Pe,Fe,de.t),de},{e:void 0,t:void 0}),fe}}),null),O(R,T(me,{get when(){return He(()=>!!(k()&&e.isPromptMode))()&&!e.isPendingDismiss},get children(){var fe=im(),Pe=fe.firstChild;return O(Pe,T(vr,{get tagName(){return H()},get componentName(){return j()},get isClickable(){return F()},onClick:Q,onHoverChange:se,forceShowIcon:true})),O(fe,T(_t,{get children(){return [T(me,{get when(){return e.replyToPrompt},get children(){var de=nm(),ve=de.firstChild;return O(de,T(Ti,{size:10,class:"text-black/30 shrink-0"}),ve),O(ve,()=>e.replyToPrompt),de}}),(()=>{var de=rm(),ve=de.firstChild;ve.$$keydown=te,ve.$$input=C;var Fe=o;return typeof Fe=="function"?We(Fe,ve):o=ve,O(de,T(me,{get when(){return e.onSubmit},get children(){var Le=om();return Le.$$click=()=>e.onSubmit?.(),O(Le,T(ki,{size:10,class:"text-white"})),Le}}),null),J(Le=>{var ge=e.replyToPrompt?"14px":"0",Ae=!e.onSubmit;return ge!==Le.e&&he(de,"padding-left",Le.e=ge),Ae!==Le.t&&(ve.readOnly=Le.t=Ae),Le},{e:void 0,t:void 0}),J(()=>ve.value=e.inputValue??""),de})()]}}),null),fe}}),null),O(R,T(me,{get when(){return e.isPendingDismiss},get children(){return T(Cr,{get onConfirm(){return e.onConfirmDismiss},get onCancel(){return e.onCancelDismiss}})}}),null),O(R,T(me,{get when(){return e.error},get children(){return T(cc,{get error(){return e.error},get onAcknowledge(){return e.onAcknowledgeError},get onRetry(){return e.onRetry}})}}),null),J(fe=>{var Pe=xe("fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-100 ease-out"),de=`${G().position.top}px`,ve=`${G().position.left}px`,Fe=`translateX(calc(-50% + ${G().position.edgeOffsetX}px))`,Le=ce()?"auto":"none",ge=e.status==="fading"||x()?0:1,Ae=xe("contain-layout flex items-center gap-[5px] rounded-[10px] antialiased w-fit h-fit p-0 [font-synthesis:none] [corner-shape:superellipse(1.25)]",chunkXWSK4QRO_cjs.aa),rt=z()&&!e.error?"none":void 0;return Pe!==fe.e&&Ie(_,fe.e=Pe),de!==fe.t&&he(_,"top",fe.t=de),ve!==fe.a&&he(_,"left",fe.a=ve),Fe!==fe.o&&he(_,"transform",fe.o=Fe),Le!==fe.i&&he(_,"pointer-events",fe.i=Le),ge!==fe.n&&he(_,"opacity",fe.n=ge),Ae!==fe.s&&Ie(R,fe.s=Ae),rt!==fe.h&&he(R,"display",fe.h=rt),fe},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),_}})};it(["pointerdown","click","input","keydown"]);var gc="react-grab-toolbar-state",oo=()=>{try{let e=localStorage.getItem(gc);if(!e)return null;let t=JSON.parse(e);return {edge:t.edge??"bottom",ratio:t.ratio??.5,collapsed:t.collapsed??!1,enabled:t.enabled??!0}}catch(e){console.warn("[react-grab] Failed to load toolbar state from localStorage:",e);}return null},Er=e=>{try{localStorage.setItem(gc,JSON.stringify(e));}catch(t){console.warn("[react-grab] Failed to save toolbar state to localStorage:",t);}};var cm=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 18"fill=currentColor><path opacity=0.4 d="M7.65631 10.9565C7.31061 10.0014 7.54012 8.96635 8.25592 8.25195C8.74522 7.76615 9.38771 7.49951 10.0694 7.49951C10.3682 7.49951 10.6641 7.55171 10.9483 7.65381L16.0001 9.49902V4.75C16.0001 3.2334 14.7667 2 13.2501 2H4.75012C3.23352 2 2.00012 3.2334 2.00012 4.75V13.25C2.00012 14.7666 3.23352 16 4.75012 16H9.49962L7.65631 10.9565Z"></path><path d="M17.296 11.5694L10.4415 9.06545C10.0431 8.92235 9.61441 9.01658 9.31551 9.31338C9.01671 9.61168 8.92101 10.0429 9.06551 10.4413L11.5704 17.2948C11.7247 17.7191 12.128 18.0004 12.5772 18.0004C12.585 18.0004 12.5918 17.9999 12.5987 17.9999C13.0577 17.9906 13.4591 17.6913 13.5987 17.2543L14.4854 14.4857L17.2559 13.5985C17.6914 13.4589 17.9903 13.057 18 12.599C18.0097 12.141 17.7267 11.7276 17.296 11.5694Z">'),pc=e=>{let t=()=>e.size??14;return (()=>{var n=cm();return J(o=>{var l=t(),a=t(),i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var dm=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><path d="m18 15-6-6-6 6">'),hc=e=>{let t=()=>e.size??12;return (()=>{var n=dm();return J(o=>{var l=t(),a=t(),i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var um=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M12 1.25C6.06294 1.25 1.25 6.06294 1.25 12C1.25 17.9371 6.06294 22.75 12 22.75C17.9371 22.75 22.75 17.9371 22.75 12C22.75 6.06294 17.9371 1.25 12 1.25ZM13 8C13 7.44772 12.5523 7 12 7C11.4477 7 11 7.44772 11 8V12C11 12.2652 11.1054 12.5196 11.2929 12.7071L13.2929 14.7071C13.6834 15.0976 14.3166 15.0976 14.7071 14.7071C15.0976 14.3166 15.0976 13.6834 14.7071 13.2929L13 11.5858V8Z">'),bc=e=>{let t=()=>e.size??14;return (()=>{var n=um();return J(o=>{var l=t(),a=t(),i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var fm=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path d="M16.0549 8.25C17.4225 8.24998 18.5248 8.24996 19.3918 8.36652C20.2919 8.48754 21.0497 8.74643 21.6517 9.34835C22.2536 9.95027 22.5125 10.7081 22.6335 11.6083C22.75 12.4752 22.75 13.5775 22.75 14.9451V14.9451V16.0549V16.0549C22.75 17.4225 22.75 18.5248 22.6335 19.3918C22.5125 20.2919 22.2536 21.0497 21.6517 21.6517C21.0497 22.2536 20.2919 22.5125 19.3918 22.6335C18.5248 22.75 17.4225 22.75 16.0549 22.75H16.0549H14.9451H14.9451C13.5775 22.75 12.4752 22.75 11.6082 22.6335C10.7081 22.5125 9.95027 22.2536 9.34835 21.6516C8.74643 21.0497 8.48754 20.2919 8.36652 19.3918C8.24996 18.5248 8.24998 17.4225 8.25 16.0549V16.0549V14.9451V14.9451C8.24998 13.5775 8.24996 12.4752 8.36652 11.6082C8.48754 10.7081 8.74643 9.95027 9.34835 9.34835C9.95027 8.74643 10.7081 8.48754 11.6083 8.36652C12.4752 8.24996 13.5775 8.24998 14.9451 8.25H14.9451H16.0549H16.0549Z"></path><path d="M6.75 14.8569C6.74991 13.5627 6.74983 12.3758 6.8799 11.4084C7.0232 10.3425 7.36034 9.21504 8.28769 8.28769C9.21504 7.36034 10.3425 7.0232 11.4084 6.8799C12.3758 6.74983 13.5627 6.74991 14.8569 6.75L17.0931 6.75C17.3891 6.75 17.5371 6.75 17.6261 6.65419C17.7151 6.55838 17.7045 6.4142 17.6833 6.12584C17.6648 5.87546 17.6412 5.63892 17.6111 5.41544C17.4818 4.45589 17.2232 3.6585 16.6718 2.98663C16.4744 2.74612 16.2539 2.52558 16.0134 2.3282C15.3044 1.74638 14.4557 1.49055 13.4248 1.36868C12.4205 1.24998 11.1512 1.24999 9.54893 1.25H9.45109C7.84883 1.24999 6.57947 1.24998 5.57525 1.36868C4.54428 1.49054 3.69558 1.74638 2.98663 2.3282C2.74612 2.52558 2.52558 2.74612 2.3282 2.98663C1.74638 3.69558 1.49055 4.54428 1.36868 5.57525C1.24998 6.57947 1.24999 7.84882 1.25 9.45108V9.54891C1.24999 11.1512 1.24998 12.4205 1.36868 13.4247C1.49054 14.4557 1.74638 15.3044 2.3282 16.0134C2.52558 16.2539 2.74612 16.4744 2.98663 16.6718C3.6585 17.2232 4.45589 17.4818 5.41544 17.6111C5.63892 17.6412 5.87546 17.6648 6.12584 17.6833C6.4142 17.7045 6.55838 17.7151 6.65419 17.6261C6.75 17.5371 6.75 17.3891 6.75 17.0931V14.8569Z">'),Ar=e=>{let t=()=>e.size??14;return (()=>{var n=fm();return J(o=>{var l=t(),a=t(),i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var Fs=(e,t,n)=>(e.x-n.x)*(t.y-n.y)-(t.x-n.x)*(e.y-n.y),mm=(e,t,n,o)=>{let l=Fs(e,t,n),a=Fs(e,n,o),i=Fs(e,o,t),d=l<0||a<0||i<0,s=l>0||a>0||i>0;return !d||!s},zs=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height,gm=(e,t)=>{let n=t.y+t.height,o=t.x+t.width;return e.y<=t.y?[{x:t.x,y:n},{x:o,y:n}]:e.y>=n?[{x:t.x,y:t.y},{x:o,y:t.y}]:e.x<=t.x?[{x:o,y:t.y},{x:o,y:n}]:[{x:t.x,y:t.y},{x:t.x,y:n}]},Ri=()=>{let e=null,t=()=>{e?.(),e=null;};return {start:(o,l,a)=>{t();let i=l[0];if(!i||zs(o,i))return;let[d,s]=gm(o,i),c=m=>l.some(h=>zs(m,h)),g=m=>{let h={x:m.clientX,y:m.clientY};if(c(h)){zs(h,i)&&t();return}mm(h,o,d,s)||(t(),a());};window.addEventListener("mousemove",g),e=()=>{window.removeEventListener("mousemove",g);};},stop:t}};var pm=B("<div style=z-index:2147483647>"),Vs=0,hm=()=>Date.now()-Vs<chunkXWSK4QRO_cjs.s,In=e=>{let[t,n]=L(false),[o,l]=L(true),a;return pe(Be(()=>e.visible,i=>{a!==void 0&&(clearTimeout(a),a=void 0),i?hm()?(l(false),n(true)):(l(true),a=setTimeout(()=>{n(true);},chunkXWSK4QRO_cjs.r)):(t()&&(Vs=Date.now()),n(false));})),Me(()=>{a!==void 0&&clearTimeout(a),t()&&(Vs=Date.now());}),T(me,{get when(){return t()},get children(){var i=pm();return O(i,()=>e.children),J(()=>Ie(i,xe("absolute whitespace-nowrap px-1.5 py-0.5 rounded-[10px] text-[10px] text-black/60 pointer-events-none [corner-shape:superellipse(1.25)]",chunkXWSK4QRO_cjs.aa,e.position==="left"||e.position==="right"?"top-1/2 -translate-y-1/2":"left-1/2 -translate-x-1/2",e.position==="top"&&"bottom-full mb-2.5",e.position==="bottom"&&"top-full mt-2.5",e.position==="left"&&"right-full mr-2.5",e.position==="right"&&"left-full ml-2.5",o()&&"animate-tooltip-fade-in"))),i}})};var yc=(e,t,n)=>{if(t)return e?"grid-rows-[1fr] opacity-100":"grid-cols-[1fr] opacity-100";let o=e?"grid-rows-[0fr] opacity-0":"grid-cols-[0fr] opacity-0";return n?`${o} ${n}`:o},wc=e=>e?"mb-1.5":"mr-1.5",xc=e=>e?"min-h-0":"min-w-0",vc=e=>e?"before:!min-h-full":"before:!min-w-full";var bm=B('<span data-react-grab-unread-indicator class="absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full bg-[#404040]">'),ym=B("<div style=z-index:2147483647>Enable to continue"),wm=B('<div data-react-grab-ignore-events data-react-grab-toolbar style=z-index:2147483647><div><div><div><div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-toggle></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-history aria-haspopup=menu><span class="inline-flex relative"></span></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-copy-all aria-label="Copy all history items"></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-menu aria-haspopup=menu></button></div></div></div><div class="relative shrink-0 overflow-visible"><button data-react-grab-ignore-events data-react-grab-toolbar-enabled><div><div></div></div></button></div></div></div><button data-react-grab-ignore-events data-react-grab-toolbar-collapse class="contain-layout shrink-0 flex items-center justify-center cursor-pointer interactive-scale">'),Cc=e=>{let t,n,o=null,l=0,a=0,i=Ri(),d=P=>{if(!t)return null;let X=t.getRootNode().querySelector(P);if(!X)return null;let ee=X.getBoundingClientRect();return {x:ee.x-chunkXWSK4QRO_cjs.X,y:ee.y-chunkXWSK4QRO_cjs.X,width:ee.width+chunkXWSK4QRO_cjs.X*2,height:ee.height+chunkXWSK4QRO_cjs.X*2}},s=(...P)=>{let K=[];for(let X of P){let ee=d(X);ee&&K.push(ee);}return K.length>0?K:null},c=oo(),[g,m]=L(false),[h,A]=L(false),[Y,D]=L(false),[q,f]=L(false),[w,x]=L(false),[y,k]=L(c?.edge??"bottom"),[z,ce]=L(c?.ratio??.5),[N,se]=L({x:0,y:0}),[ae,le]=L({x:0,y:0}),[G,te]=L({x:0,y:0}),[C,M]=L(false),[H,j]=L(false),[b,S]=L(false),[V,$]=L(false),[Q,F]=L(false),[Ee,Ce]=L(false),[_,R]=L(false),[Z,Te]=L(false),[fe,Pe]=L(false),[de,ve]=L(false),[Fe,Le]=L(false),ge,Ae=()=>(e.toolbarActions??[]).length>0,rt=()=>{let P=e.historyItemCount??0;return P>0?`History (${P})`:"History"},dt=()=>xe("transition-colors",e.isHistoryPinned?"text-black/80":"text-[#B3B3B3]"),Ve=()=>y()==="left"||y()==="right",bt=()=>{if(!n)return;let P=n.getBoundingClientRect();Ve()?a=P.height:l=P.width;},pn=()=>!h()&&!e.isHistoryDropdownOpen&&!e.isMenuOpen&&!e.isClearPromptOpen,Bt=()=>{switch(y()){case "top":return "bottom";case "bottom":return "top";case "left":return "right";case "right":return "left"}},Ht=(P,K)=>yc(Ve(),P,K),Ot=()=>Ve()?"transition-[grid-template-rows,opacity] duration-150 ease-out":"transition-[grid-template-columns,opacity] duration-150 ease-out",hn=()=>wc(Ve()),yt=()=>xc(Ve()),_n=()=>vc(Ve()),so=()=>{let P=Bt();return Ve()?`top-1/2 -translate-y-1/2 ${P==="left"?"right-full mr-0.5":"left-full ml-0.5"}`:`left-1/2 -translate-x-1/2 ${P==="top"?"bottom-full mb-0.5":"top-full mt-0.5"}`},Dt=P=>{P.stopImmediatePropagation();},st=(P,K)=>({onMouseEnter:()=>{Y()||(i.stop(),P(true),K?.shouldFreezeInteractions!==false&&!o&&(o=chunkXWSK4QRO_cjs.za(),chunkXWSK4QRO_cjs.Ca(),chunkXWSK4QRO_cjs.Ma()),K?.onHoverChange?.(true));},onMouseLeave:X=>{P(false),K?.shouldFreezeInteractions!==false&&!e.isActive&&!e.isContextMenuOpen&&(o?.(),o=null,chunkXWSK4QRO_cjs.Da(),chunkXWSK4QRO_cjs.Na());let ee=K?.safePolygonTargets?.();if(ee){i.start({x:X.clientX,y:X.clientY},ee,()=>K?.onHoverChange?.(false));return}K?.onHoverChange?.(false);}}),rn=()=>{if(!h())return "";let P=y(),K={top:"rounded-t-none rounded-b-[10px]",bottom:"rounded-b-none rounded-t-[10px]",left:"rounded-l-none rounded-r-[10px]",right:"rounded-r-none rounded-l-[10px]"}[P],X=Ve()?"px-0.25 py-2":"px-2 py-0.25";return `${K} ${X}`},Pt;pe(Be(()=>e.shakeCount,P=>{P&&!e.enabled&&(j(true),Ce(true),Pt&&clearTimeout(Pt),Pt=setTimeout(()=>{Ce(false);},chunkXWSK4QRO_cjs.E));})),pe(Be(()=>e.enabled,P=>{P&&Ee()&&(Ce(false),Pt&&clearTimeout(Pt));})),pe(Be(()=>[e.isActive,e.isContextMenuOpen],([P,K])=>{!P&&!K&&o&&(o(),o=null);}));let ao=()=>{if(!t)return;let P=t.getBoundingClientRect();$e={width:P.width,height:P.height};let K=N(),X=Ft(),ee=y(),be=K.x,ye=K.y;if(ee==="top"||ee==="bottom"){let ke=X.offsetLeft+chunkXWSK4QRO_cjs.t,Ke=Math.max(ke,X.offsetLeft+X.width-P.width-chunkXWSK4QRO_cjs.t);be=Lt(K.x,ke,Ke),ye=ee==="top"?X.offsetTop+chunkXWSK4QRO_cjs.t:X.offsetTop+X.height-P.height-chunkXWSK4QRO_cjs.t;}else {let ke=X.offsetTop+chunkXWSK4QRO_cjs.t,Ke=Math.max(ke,X.offsetTop+X.height-P.height-chunkXWSK4QRO_cjs.t);ye=Lt(K.y,ke,Ke),be=ee==="left"?X.offsetLeft+chunkXWSK4QRO_cjs.t:X.offsetLeft+X.width-P.width-chunkXWSK4QRO_cjs.t;}let ue=Kt(ee,be,ye,P.width,P.height);ce(ue),(be!==K.x||ye!==K.y)&&(S(true),chunkXWSK4QRO_cjs.ia(()=>{chunkXWSK4QRO_cjs.ia(()=>{se({x:be,y:ye}),gt&&clearTimeout(gt),gt=setTimeout(()=>{S(false);},chunkXWSK4QRO_cjs.A);});}));};pe(Be(()=>e.clockFlashTrigger??0,()=>{if(e.isHistoryDropdownOpen)return;ge&&(ge.classList.remove("animate-clock-flash"),ge.offsetHeight,ge.classList.add("animate-clock-flash")),Pe(true);let P=setTimeout(()=>{ge?.classList.remove("animate-clock-flash"),Pe(false);},1500);Me(()=>{clearTimeout(P),Pe(false);});},{defer:true})),pe(Be(()=>e.historyItemCount??0,()=>{h()||(Ln&&clearTimeout(Ln),Ln=setTimeout(()=>{bt(),ao();},chunkXWSK4QRO_cjs.A),Me(()=>{Ln&&clearTimeout(Ln);}));},{defer:true}));let Yt={x:0,y:0,time:0},lo={x:0,y:0},$e={width:chunkXWSK4QRO_cjs.C,height:chunkXWSK4QRO_cjs.D},[qt,sn]=L({width:chunkXWSK4QRO_cjs.y,height:chunkXWSK4QRO_cjs.y}),Lt=(P,K,X)=>Math.max(K,Math.min(P,X)),Ft=()=>{let P=window.visualViewport;return P?{width:P.width,height:P.height,offsetLeft:P.offsetLeft,offsetTop:P.offsetTop}:{width:window.innerWidth,height:window.innerHeight,offsetLeft:0,offsetTop:0}},zt=(P,K)=>{let X=Ft(),ee=X.width,be=X.height,{width:ye,height:ue}=$e,Re=t?.getBoundingClientRect(),ke=Re?.width??chunkXWSK4QRO_cjs.y,Ke=Re?.height??chunkXWSK4QRO_cjs.y,Xe;if(K==="top"||K==="bottom"){let Oe=(ye-ke)/2,ut=P.x-Oe,at=Lt(ut,X.offsetLeft+chunkXWSK4QRO_cjs.t,X.offsetLeft+ee-ye-chunkXWSK4QRO_cjs.t),kt=K==="top"?X.offsetTop+chunkXWSK4QRO_cjs.t:X.offsetTop+be-ue-chunkXWSK4QRO_cjs.t;Xe={x:at,y:kt};}else {let Oe=(ue-Ke)/2,ut=P.y-Oe,at=Lt(ut,X.offsetTop+chunkXWSK4QRO_cjs.t,X.offsetTop+be-ue-chunkXWSK4QRO_cjs.t);Xe={x:K==="left"?X.offsetLeft+chunkXWSK4QRO_cjs.t:X.offsetLeft+ee-ye-chunkXWSK4QRO_cjs.t,y:at};}let tt=Kt(K,Xe.x,Xe.y,ye,ue);return {position:Xe,ratio:tt}},Vt=(P,K,X,ee)=>{let be=Ft(),ye=be.width,ue=be.height,Re=be.offsetLeft+chunkXWSK4QRO_cjs.t,ke=Math.max(Re,be.offsetLeft+ye-X-chunkXWSK4QRO_cjs.t),Ke=be.offsetTop+chunkXWSK4QRO_cjs.t,Xe=Math.max(Ke,be.offsetTop+ue-ee-chunkXWSK4QRO_cjs.t);if(P==="top"||P==="bottom"){let at=Math.max(0,ye-X-chunkXWSK4QRO_cjs.t*2);return {x:Math.min(ke,Math.max(Re,be.offsetLeft+chunkXWSK4QRO_cjs.t+at*K)),y:P==="top"?Ke:Xe}}let tt=Math.max(0,ue-ee-chunkXWSK4QRO_cjs.t*2),Oe=Math.min(Xe,Math.max(Ke,be.offsetTop+chunkXWSK4QRO_cjs.t+tt*K));return {x:P==="left"?Re:ke,y:Oe}},Kt=(P,K,X,ee,be)=>{let ye=Ft(),ue=ye.width,Re=ye.height;if(P==="top"||P==="bottom"){let Ke=ue-ee-chunkXWSK4QRO_cjs.t*2;return Ke<=0?.5:Math.max(0,Math.min(1,(K-ye.offsetLeft-chunkXWSK4QRO_cjs.t)/Ke))}let ke=Re-be-chunkXWSK4QRO_cjs.t*2;return ke<=0?.5:Math.max(0,Math.min(1,(X-ye.offsetTop-chunkXWSK4QRO_cjs.t)/ke))},qi=()=>{let P=Vt(y(),z(),$e.width,$e.height);se(P);},co=false,bn=P=>K=>{if(K.stopImmediatePropagation(),co){co=false;return}P();},Ko=bn(()=>e.onToggle?.()),Uo=bn(()=>e.onToggleHistory?.()),_r=bn(()=>e.onCopyAll?.()),uo=bn(()=>e.onToggleMenu?.()),Or=bn(()=>{let P=t?.getBoundingClientRect(),K=h(),X=z();if(K){let{position:ee,ratio:be}=zt(Zt(),y());X=be,se(ee),ce(X);}else P&&($e={width:P.width,height:P.height});S(true),A(ee=>!ee),wn({edge:y(),ratio:X,collapsed:!K,enabled:e.enabled??true}),gt&&clearTimeout(gt),gt=setTimeout(()=>{if(S(false),h()){let ee=t?.getBoundingClientRect();ee&&sn({width:ee.width,height:ee.height});}},chunkXWSK4QRO_cjs.A);}),On=bn(()=>{let P=!!e.enabled,K=y(),X=N(),ee=K==="left"||K==="right",be=()=>ee?a:l;P&&n&&!_()&&bt();let ye=be(),ue=ye>0,Re=0;if(n){let ke=n.getBoundingClientRect();Re=ee?ke.height:ke.width;}if(!P&&ye===0&&n){let ke=(e.historyItemCount??0)>0,Ke=Ae(),Xe=Array.from(n.children).filter(Oe=>Oe instanceof HTMLElement?Oe.querySelector("[data-react-grab-toolbar-history]")?ke:Oe.querySelector("[data-react-grab-toolbar-copy-all]")?!!e.isHistoryDropdownOpen:Oe.querySelector("[data-react-grab-toolbar-menu]")?Ke:true:false),tt=ee?"gridTemplateRows":"gridTemplateColumns";for(let Oe of Xe)Oe.style.transition="none",Oe.style[tt]="1fr";n.offsetWidth,bt(),ye=be();for(let Oe of Xe)Oe.style[tt]="";n.offsetWidth;for(let Oe of Xe)Oe.style.transition="";ue=ye>0;}if(ue&&(Te(_()),R(true)),e.onToggleEnabled?.(),ue){let ke=P?-ye:ye;ee?$e={width:$e.width,height:$e.height+ke}:$e={width:$e.width+ke,height:$e.height};let Ke=ee?X.y+Re:X.x+Re,Xe=tt=>{let Oe=Ft(),ut=Ke-tt;if(ee){let cn=Oe.offsetTop+chunkXWSK4QRO_cjs.t,xn=Oe.offsetTop+Oe.height-$e.height-chunkXWSK4QRO_cjs.t;return {x:X.x,y:Lt(ut,cn,xn)}}let at=Oe.offsetLeft+chunkXWSK4QRO_cjs.t,kt=Oe.offsetLeft+Oe.width-$e.width-chunkXWSK4QRO_cjs.t;return {x:Lt(ut,at,kt),y:X.y}};if(wt!==void 0&&chunkXWSK4QRO_cjs.ja(wt),Z())se(Xe(P?0:ye)),wt=void 0;else {let tt=performance.now(),Oe=()=>{if(performance.now()-tt>chunkXWSK4QRO_cjs.A+chunkXWSK4QRO_cjs.B){wt=void 0;return}if(n){let at=ee?n.getBoundingClientRect().height:n.getBoundingClientRect().width;se(Xe(at));}wt=chunkXWSK4QRO_cjs.ia(Oe);};wt=chunkXWSK4QRO_cjs.ia(Oe);}clearTimeout(Go),Go=setTimeout(()=>{wt!==void 0&&(chunkXWSK4QRO_cjs.ja(wt),wt=void 0),se(Xe(P?0:ye)),R(false),Te(false);let Oe=Kt(K,N().x,N().y,$e.width,$e.height);ce(Oe),wn({edge:K,ratio:Oe,collapsed:h(),enabled:!P});},chunkXWSK4QRO_cjs.A);}else wn({edge:K,ratio:z(),collapsed:h(),enabled:!P});}),Dr=(P,K,X,ee,be,ye)=>{let ue=Ft(),Re=ue.width,ke=ue.height,Ke=P+be*chunkXWSK4QRO_cjs.x,Xe=K+ye*chunkXWSK4QRO_cjs.x,tt=Xe-ue.offsetTop+ee/2,Oe=ue.offsetTop+ke-Xe-ee/2,ut=Ke-ue.offsetLeft+X/2,at=ue.offsetLeft+Re-Ke-X/2,kt=Math.min(tt,Oe,ut,at);return kt===tt?{edge:"top",x:Math.max(ue.offsetLeft+chunkXWSK4QRO_cjs.t,Math.min(Ke,ue.offsetLeft+Re-X-chunkXWSK4QRO_cjs.t)),y:ue.offsetTop+chunkXWSK4QRO_cjs.t}:kt===ut?{edge:"left",x:ue.offsetLeft+chunkXWSK4QRO_cjs.t,y:Math.max(ue.offsetTop+chunkXWSK4QRO_cjs.t,Math.min(Xe,ue.offsetTop+ke-ee-chunkXWSK4QRO_cjs.t))}:kt===at?{edge:"right",x:ue.offsetLeft+Re-X-chunkXWSK4QRO_cjs.t,y:Math.max(ue.offsetTop+chunkXWSK4QRO_cjs.t,Math.min(Xe,ue.offsetTop+ke-ee-chunkXWSK4QRO_cjs.t))}:{edge:"bottom",x:Math.max(ue.offsetLeft+chunkXWSK4QRO_cjs.t,Math.min(Ke,ue.offsetLeft+Re-X-chunkXWSK4QRO_cjs.t)),y:ue.offsetTop+ke-ee-chunkXWSK4QRO_cjs.t}},Wo=P=>{if(!Y()||(Math.sqrt(Math.pow(P.clientX-lo.x,2)+Math.pow(P.clientY-lo.y,2))>chunkXWSK4QRO_cjs.w&&(M(true),o&&(o(),o=null,chunkXWSK4QRO_cjs.Da(),chunkXWSK4QRO_cjs.Na())),!C()))return;let X=performance.now(),ee=X-Yt.time;if(ee>0){let ue=(P.clientX-Yt.x)/ee,Re=(P.clientY-Yt.y)/ee;te({x:ue,y:Re});}Yt={x:P.clientX,y:P.clientY,time:X};let be=P.clientX-ae().x,ye=P.clientY-ae().y;se({x:be,y:ye});},Dn=()=>{if(!Y())return;window.removeEventListener("pointermove",Wo),window.removeEventListener("pointerup",Dn);let P=C();if(D(false),!P)return;co=true;let K=t?.getBoundingClientRect();if(!K)return;let X=G(),ee=Dr(N().x,N().y,K.width,K.height,X.x,X.y),be=Kt(ee.edge,ee.x,ee.y,K.width,K.height);k(ee.edge),ce(be),f(true),chunkXWSK4QRO_cjs.ia(()=>{let ye=t?.getBoundingClientRect();ye&&($e={width:ye.width,height:ye.height}),chunkXWSK4QRO_cjs.ia(()=>{let ue=Vt(ee.edge,be,$e.width,$e.height);se(ue),wn({edge:ee.edge,ratio:be,collapsed:h(),enabled:e.enabled??true}),Lr=setTimeout(()=>{f(false),e.enabled&&bt();},chunkXWSK4QRO_cjs.v);});});},an=P=>{if(h())return;let K=t?.getBoundingClientRect();K&&(lo={x:P.clientX,y:P.clientY},le({x:P.clientX-K.left,y:P.clientY-K.top}),D(true),M(false),te({x:0,y:0}),Yt={x:P.clientX,y:P.clientY,time:performance.now()},window.addEventListener("pointermove",Wo),window.addEventListener("pointerup",Dn));},ln=()=>{let P=y(),K=N(),{width:X,height:ee}=$e,{width:be,height:ye}=qt(),ue=Ft();switch(P){case "top":case "bottom":{let Re=(X-be)/2,ke=K.x+Re;return {x:Lt(ke,ue.offsetLeft,ue.offsetLeft+ue.width-be),y:P==="top"?ue.offsetTop:ue.offsetTop+ue.height-ye}}case "left":case "right":{let Re=(ee-ye)/2,ke=K.y+Re,Ke=Lt(ke,ue.offsetTop,ue.offsetTop+ue.height-ye);return {x:P==="left"?ue.offsetLeft:ue.offsetLeft+ue.width-be,y:Ke}}default:return K}},Tt=()=>{let P=y(),K=h();switch(P){case "top":return K?"rotate-180":"rotate-0";case "bottom":return K?"rotate-0":"rotate-180";case "left":return K?"rotate-90":"-rotate-90";case "right":return K?"-rotate-90":"rotate-90";default:return "rotate-0"}},yn,gt,Lr,Go,wt,Ln,Ut=()=>{Y()||(x(true),qi(),yn&&clearTimeout(yn),yn=setTimeout(()=>{x(false);let P=Kt(y(),N().x,N().y,$e.width,$e.height);ce(P),wn({edge:y(),ratio:P,collapsed:h(),enabled:e.enabled??true});},chunkXWSK4QRO_cjs.u));},wn=P=>{Er(P),e.onStateChange?.(P);};mt(()=>{t&&e.onContainerRef?.(t);let P=t?.getBoundingClientRect(),K=Ft();if(c){if(P&&($e={width:P.width,height:P.height}),c.collapsed){let be=c.edge==="top"||c.edge==="bottom";sn({width:be?chunkXWSK4QRO_cjs.z:chunkXWSK4QRO_cjs.y,height:be?chunkXWSK4QRO_cjs.y:chunkXWSK4QRO_cjs.z});}A(c.collapsed);let ee=Vt(c.edge,c.ratio,$e.width,$e.height);se(ee);}else if(P)$e={width:P.width,height:P.height},se({x:K.offsetLeft+(K.width-P.width)/2,y:K.offsetTop+K.height-P.height-chunkXWSK4QRO_cjs.t}),ce(.5);else {let ee=Vt("bottom",.5,$e.width,$e.height);se(ee);}if(e.enabled&&bt(),e.onSubscribeToStateChanges){let ee=e.onSubscribeToStateChanges(be=>{if(b()||_()||!t?.getBoundingClientRect())return;let ue=h()!==be.collapsed;if(k(be.edge),ue&&!be.collapsed){let Re=Zt();S(true),A(be.collapsed);let{position:ke,ratio:Ke}=zt(Re,be.edge);se(ke),ce(Ke),clearTimeout(gt),gt=setTimeout(()=>{S(false);},chunkXWSK4QRO_cjs.A);}else {ue&&(S(true),clearTimeout(gt),gt=setTimeout(()=>{S(false);},chunkXWSK4QRO_cjs.A)),A(be.collapsed);let Re=Vt(be.edge,be.ratio,$e.width,$e.height);se(Re),ce(be.ratio);}});Me(ee);}window.addEventListener("resize",Ut),window.visualViewport?.addEventListener("resize",Ut),window.visualViewport?.addEventListener("scroll",Ut);let X=setTimeout(()=>{m(true);},chunkXWSK4QRO_cjs.u);Me(()=>{clearTimeout(X);});}),Me(()=>{window.removeEventListener("resize",Ut),window.visualViewport?.removeEventListener("resize",Ut),window.visualViewport?.removeEventListener("scroll",Ut),window.removeEventListener("pointermove",Wo),window.removeEventListener("pointerup",Dn),clearTimeout(yn),clearTimeout(gt),clearTimeout(Pt),clearTimeout(Lr),clearTimeout(Go),clearTimeout(Ln),wt!==void 0&&chunkXWSK4QRO_cjs.ja(wt),o?.(),i.stop();});let Zt=()=>h()?ln():N(),Zi=()=>h()?"cursor-pointer":Y()?"cursor-grabbing":"cursor-grab",Ji=()=>w()?"":q()?"transition-[transform,opacity] duration-300 ease-out":b()?"transition-[transform,opacity] duration-150 ease-out":_()?"transition-opacity duration-150 ease-out":"transition-opacity duration-300 ease-out",jo=()=>{switch(y()){case "top":return "center top";case "bottom":return "center bottom";case "left":return "left center";case "right":return "right center";default:return "center center"}};return (()=>{var P=wm(),K=P.firstChild,X=K.firstChild,ee=X.firstChild,be=ee.firstChild,ye=be.firstChild,ue=ye.firstChild,Re=ue.firstChild,ke=ye.nextSibling,Ke=ke.firstChild,Xe=Ke.firstChild,tt=Xe.firstChild,Oe=ke.nextSibling,ut=Oe.firstChild,at=ut.firstChild,kt=Oe.nextSibling,cn=kt.firstChild,xn=cn.firstChild,Rr=be.nextSibling,vn=Rr.firstChild,Jt=vn.firstChild,fo=Jt.firstChild,Qt=X.nextSibling;P.addEventListener("mouseleave",()=>e.onSelectHoverChange?.(false)),P.addEventListener("mouseenter",()=>!h()&&e.onSelectHoverChange?.(true)),P.$$pointerdown=an;var $r=t;typeof $r=="function"?We($r,P):t=P,K.$$click=U=>{if(h()){U.stopPropagation();let{position:Xn,ratio:Rn}=zt(Zt(),y());se(Xn),ce(Rn),S(true),A(false),wn({edge:y(),ratio:Rn,collapsed:false,enabled:e.enabled??true}),gt&&clearTimeout(gt),gt=setTimeout(()=>{S(false);},chunkXWSK4QRO_cjs.A);}},K.addEventListener("animationend",()=>j(false));var Qe=n;typeof Qe=="function"?We(Qe,be):n=be,Re.$$click=U=>{$(false),Ko(U);},Je(Re,"mousedown",Dt),Je(Re,"pointerdown",U=>{Dt(U),an(U);}),hr(Re,ko({get"aria-label"(){return e.isActive?"Stop selecting element":"Select element"},get"aria-pressed"(){return !!e.isActive},get class(){return xe("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox",hn(),_n())}},()=>st($)),false),O(Re,T(pc,{size:14,get class(){return xe("transition-colors",e.isActive?"text-black":"text-black/70")}})),O(ue,T(In,{get visible(){return He(()=>!!V())()&&pn()},get position(){return Bt()},get children(){return ["Select element (",He(()=>Un("C")),")"]}}),null),Xe.$$click=U=>{Pe(false),Uo(U);},Je(Xe,"mousedown",Dt),Je(Xe,"pointerdown",U=>{Dt(U),an(U);}),hr(Xe,ko({get"aria-label"(){return `Open history${(e.historyItemCount??0)>0?` (${e.historyItemCount??0} items)`:""}`},get"aria-expanded"(){return !!e.isHistoryDropdownOpen},get class(){return xe("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox",hn(),_n())}},()=>st(U=>{U&&e.isHistoryDropdownOpen||Pe(U);},{onHoverChange:U=>e.onHistoryButtonHover?.(U),shouldFreezeInteractions:false,safePolygonTargets:()=>e.isHistoryDropdownOpen?s("[data-react-grab-history-dropdown]","[data-react-grab-toolbar-copy-all]"):null})),false);var Xo=ge;return typeof Xo=="function"?We(Xo,tt):ge=tt,O(tt,T(bc,{size:14,get class(){return dt()}}),null),O(tt,T(me,{get when(){return e.hasUnreadHistoryItems},get children(){return bm()}}),null),O(Ke,T(In,{get visible(){return He(()=>!!fe())()&&pn()},get position(){return Bt()},get children(){return rt()}}),null),at.$$click=U=>{Le(false),_r(U);},Je(at,"mousedown",Dt),Je(at,"pointerdown",U=>{Dt(U),an(U);}),hr(at,ko({get class(){return xe("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox",hn(),_n())}},()=>st(Le,{onHoverChange:U=>e.onCopyAllHover?.(U),shouldFreezeInteractions:false,safePolygonTargets:()=>e.isHistoryDropdownOpen?s("[data-react-grab-history-dropdown]","[data-react-grab-toolbar-history]"):null})),false),O(at,T(Ar,{size:14,class:"text-[#B3B3B3] transition-colors"})),O(ut,T(In,{get visible(){return He(()=>!!Fe())()&&pn()},get position(){return Bt()},children:"Copy all"}),null),xn.$$click=U=>{ve(false),uo(U);},Je(xn,"mousedown",Dt),Je(xn,"pointerdown",U=>{Dt(U),an(U);}),hr(xn,ko({get"aria-label"(){return e.isMenuOpen?"Close more actions menu":"Open more actions menu"},get"aria-expanded"(){return !!e.isMenuOpen},get class(){return xe("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox",hn(),_n())}},()=>st(U=>{U&&e.isMenuOpen||ve(U);},{shouldFreezeInteractions:false})),false),O(xn,T(Oi,{size:14,get class(){return xe("transition-colors",e.isMenuOpen?"text-black/80":"text-[#B3B3B3]")}})),O(cn,T(In,{get visible(){return He(()=>!!de())()&&pn()},get position(){return Bt()},children:"More actions"}),null),vn.addEventListener("mouseleave",()=>F(false)),vn.addEventListener("mouseenter",()=>F(true)),vn.$$click=U=>{F(false),On(U);},O(Rr,T(In,{get visible(){return He(()=>!!Q())()&&pn()},get position(){return Bt()},get children(){return e.enabled?"Disable":"Enable"}}),null),Je(Qt,"click",Or,true),O(Qt,T(hc,{size:14,get class(){return xe("text-[#B3B3B3] transition-transform duration-150",Tt())}})),O(K,T(me,{get when(){return Ee()},get children(){var U=ym();return J(()=>Ie(U,xe("absolute whitespace-nowrap px-1.5 py-0.5 rounded-[10px] text-[10px] text-black/60 pointer-events-none animate-tooltip-fade-in [corner-shape:superellipse(1.25)]",chunkXWSK4QRO_cjs.aa,so()))),U}}),null),J(U=>{var Xn=xe("fixed left-0 top-0 font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none",Zi(),Ji(),g()?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"),Rn=`translate(${Zt().x}px, ${Zt().y}px)`,mo=jo(),qe=xe("flex items-center justify-center rounded-[10px] antialiased relative overflow-visible [font-synthesis:none] [corner-shape:superellipse(1.25)]",Ve()&&"flex-col",chunkXWSK4QRO_cjs.aa,!h()&&(Ve()?"px-1.5 gap-1.5 py-2":"py-1.5 gap-1.5 px-2"),rn(),H()&&"animate-shake"),Yo=jo(),Yn=xe("grid",!Z()&&Ot(),Ht(!h(),"pointer-events-none")),Nr=xe("flex",Ve()?"flex-col items-center min-h-0":"items-center min-w-0"),Br=xe("flex items-center",Ve()&&"flex-col"),Hr=xe("grid",!Z()&&Ot(),Ht(!!e.enabled)),Fr=xe("relative overflow-visible",yt()),zr=xe("grid",!Z()&&Ot(),Ht(!!e.enabled&&(e.historyItemCount??0)>0,"pointer-events-none")),Vr=xe("relative overflow-visible",yt()),Kr=xe("grid",!Z()&&Ot(),Ht(!!e.isHistoryDropdownOpen,"pointer-events-none")),qo=xe("relative overflow-visible",yt()),go=xe("grid",!Z()&&Ot(),Ht(!!e.enabled&&Ae(),"pointer-events-none")),Ur=xe("relative overflow-visible",yt()),Wr=e.enabled?"Disable React Grab":"Enable React Grab",Gr=!!e.enabled,jr=xe("contain-layout flex items-center justify-center cursor-pointer interactive-scale outline-none",Ve()?"my-0.5":"mx-0.5"),Xr=xe("relative rounded-full transition-colors",Ve()?"w-3.5 h-2.5":"w-5 h-3",e.enabled?"bg-black":"bg-black/25"),Yr=xe("absolute top-0.5 rounded-full bg-white transition-transform",Ve()?"w-1.5 h-1.5":"w-2 h-2",!e.enabled&&"left-0.5",e.enabled&&(Ve()?"left-1.5":"left-2.5")),Zo=h()?"Expand toolbar":"Collapse toolbar";return Xn!==U.e&&Ie(P,U.e=Xn),Rn!==U.t&&he(P,"transform",U.t=Rn),mo!==U.a&&he(P,"transform-origin",U.a=mo),qe!==U.o&&Ie(K,U.o=qe),Yo!==U.i&&he(K,"transform-origin",U.i=Yo),Yn!==U.n&&Ie(X,U.n=Yn),Nr!==U.s&&Ie(ee,U.s=Nr),Br!==U.h&&Ie(be,U.h=Br),Hr!==U.r&&Ie(ye,U.r=Hr),Fr!==U.d&&Ie(ue,U.d=Fr),zr!==U.l&&Ie(ke,U.l=zr),Vr!==U.u&&Ie(Ke,U.u=Vr),Kr!==U.c&&Ie(Oe,U.c=Kr),qo!==U.w&&Ie(ut,U.w=qo),go!==U.m&&Ie(kt,U.m=go),Ur!==U.f&&Ie(cn,U.f=Ur),Wr!==U.y&&re(vn,"aria-label",U.y=Wr),Gr!==U.g&&re(vn,"aria-pressed",U.g=Gr),jr!==U.p&&Ie(vn,U.p=jr),Xr!==U.b&&Ie(Jt,U.b=Xr),Yr!==U.T&&Ie(fo,U.T=Yr),Zo!==U.A&&re(Qt,"aria-label",U.A=Zo),U},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0,T:void 0,A:void 0}),P})()};it(["pointerdown","click"]);var Ks=(e,t,n,o)=>Math.max(o,Math.min(e,n-t-o));var Fo=({anchor:e,measuredWidth:t,measuredHeight:n,viewportWidth:o,viewportHeight:l,anchorGapPx:a,viewportPaddingPx:i,offscreenPosition:d})=>{if(!e||t===0||n===0)return d;let s,c;return e.edge==="left"||e.edge==="right"?(s=e.edge==="left"?e.x+a:e.x-t-a,c=e.y-n/2):(s=e.x-t/2,c=e.edge==="top"?e.y+a:e.y-n-a),{left:Ks(s,t,o,i),top:Ks(c,n,l,i)}};var At=(e,t)=>{try{return e.composedPath().some(n=>n instanceof HTMLElement&&n.hasAttribute(t))}catch{return false}};var Pr=(e,t)=>typeof e.enabled=="function"?t?e.enabled(t):false:e.enabled??true,Tr=e=>typeof e.enabled=="function"?e.enabled():e.enabled??true;var xm=B('<div data-react-grab-ignore-events data-react-grab-toolbar-menu class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><div><div class="relative flex flex-col py-1"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">'),vm=B("<div><div>"),Cm=B('<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default"><span class="text-[13px] leading-4 font-sans font-medium text-black">'),Sm=B('<span class="text-[11px] font-sans text-black/50 ml-4">'),Sc=e=>{let t,{containerRef:n,highlightRef:o,updateHighlight:l,clearHighlight:a}=Wn(),[i,d]=L(0),[s,c]=L(0),[g,m]=L(false),[h,A]=L(false),[Y,D]=L("bottom"),[q,f]=L(0),w,x,y=()=>{t&&(d(t.offsetWidth),c(t.offsetHeight));};pe(()=>{let N=e.position;N?(D(N.edge),clearTimeout(w),m(true),x!==void 0&&chunkXWSK4QRO_cjs.ja(x),x=chunkXWSK4QRO_cjs.ia(()=>{y(),t?.offsetHeight,A(true);})):(x!==void 0&&chunkXWSK4QRO_cjs.ja(x),A(false),w=setTimeout(()=>{m(false);},chunkXWSK4QRO_cjs.T));});let k=oe(N=>{let se=Fo({anchor:e.position,measuredWidth:i(),measuredHeight:s(),viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,anchorGapPx:chunkXWSK4QRO_cjs.W,viewportPaddingPx:chunkXWSK4QRO_cjs.V,offscreenPosition:chunkXWSK4QRO_cjs.ba});return se.left!==chunkXWSK4QRO_cjs.ba.left?se:N},chunkXWSK4QRO_cjs.ba),z=N=>{N.type==="contextmenu"&&N.preventDefault(),N.stopImmediatePropagation();},ce=(N,se)=>{se.stopPropagation(),Tr(N)&&(N.onAction(),N.isActive!==void 0?f(ae=>ae+1):e.onDismiss());};return mt(()=>{y();let N=le=>{!e.position||At(le,"data-react-grab-ignore-events")||e.onDismiss();},se=le=>{e.position&&le.code==="Escape"&&(le.preventDefault(),le.stopPropagation(),e.onDismiss());},ae=chunkXWSK4QRO_cjs.ia(()=>{window.addEventListener("mousedown",N,{capture:true}),window.addEventListener("touchstart",N,{capture:true});});window.addEventListener("keydown",se,{capture:true}),Me(()=>{chunkXWSK4QRO_cjs.ja(ae),clearTimeout(w),x!==void 0&&chunkXWSK4QRO_cjs.ja(x),window.removeEventListener("mousedown",N,{capture:true}),window.removeEventListener("touchstart",N,{capture:true}),window.removeEventListener("keydown",se,{capture:true});});}),T(me,{get when(){return g()},get children(){var N=xm(),se=N.firstChild,ae=se.firstChild,le=ae.firstChild;N.$$contextmenu=z,N.$$click=z,N.$$mousedown=z,N.$$pointerdown=z;var G=t;return typeof G=="function"?We(G,N):t=N,he(se,"min-width",`${chunkXWSK4QRO_cjs.$}px`),We(n,ae),We(o,le),O(ae,T(on,{get each(){return e.actions},children:te=>{let C=()=>Tr(te),M=()=>te.isActive!==void 0,H=()=>(q(),!!te.isActive?.());return (()=>{var j=Cm(),b=j.firstChild;return j.$$click=S=>ce(te,S),Je(j,"pointerleave",a),j.addEventListener("pointerenter",S=>{C()&&l(S.currentTarget);}),j.$$pointerdown=S=>S.stopPropagation(),O(b,()=>te.label),O(j,T(me,{get when(){return He(()=>!M())()&&te.shortcut},children:S=>(()=>{var V=Sm();return O(V,()=>Un(S())),V})()}),null),O(j,T(me,{get when(){return M()},get children(){var S=vm(),V=S.firstChild;return J($=>{var Q=xe("relative rounded-full transition-colors ml-4 shrink-0 w-5 h-3",H()?"bg-black":"bg-black/25"),F=xe("absolute top-0.5 rounded-full bg-white transition-transform w-2 h-2",H()?"left-2.5":"left-0.5");return Q!==$.e&&Ie(S,$.e=Q),F!==$.t&&Ie(V,$.t=F),$},{e:void 0,t:void 0}),S}}),null),J(S=>{var V=te.id,$=!C();return V!==S.e&&re(j,"data-react-grab-menu-item",S.e=V),$!==S.t&&(j.disabled=S.t=$),S},{e:void 0,t:void 0}),j})()}}),null),J(te=>{var C=`${k().top}px`,M=`${k().left}px`,H=h()?"auto":"none",j=chunkXWSK4QRO_cjs.ca[Y()],b=h()?"1":"0",S=h()?"scale(1)":"scale(0.95)",V=xe("contain-layout flex flex-col rounded-[10px] antialiased w-fit h-fit overflow-hidden [font-synthesis:none] [corner-shape:superellipse(1.25)]",chunkXWSK4QRO_cjs.aa);return C!==te.e&&he(N,"top",te.e=C),M!==te.t&&he(N,"left",te.t=M),H!==te.a&&he(N,"pointer-events",te.a=H),j!==te.o&&he(N,"transform-origin",te.o=j),b!==te.i&&he(N,"opacity",te.i=b),S!==te.n&&he(N,"transform",te.n=S),V!==te.s&&Ie(se,te.s=V),te},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),N}})};it(["pointerdown","mousedown","click","contextmenu"]);var Em=B('<div class="relative flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">'),Am=B('<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none"style=z-index:2147483647;pointer-events:auto><div><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">'),Pm=B('<span class="text-[11px] font-sans text-black/50 ml-4">'),Tm=B('<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default"><span class="text-[13px] leading-4 font-sans font-medium text-black">'),Ec=e=>{let t,{containerRef:n,highlightRef:o,updateHighlight:l,clearHighlight:a}=Wn(),[i,d]=L(0),[s,c]=L(0),g=()=>e.position!==null,m=()=>Pi({tagName:e.tagName,componentName:e.componentName}),h=()=>{if(t){let f=t.getBoundingClientRect();d(f.width),c(f.height);}};pe(()=>{g()&&chunkXWSK4QRO_cjs.ia(h);});let A=()=>{let f=e.selectionBounds,w=e.position,x=i(),y=s();if(x===0||y===0||!f||!w)return {left:-9999,top:-9999,arrowLeft:0,arrowPosition:"bottom"};let k=w.x??f.x+f.width/2,z=Math.max(chunkXWSK4QRO_cjs.n,Math.min(k-x/2,window.innerWidth-x-chunkXWSK4QRO_cjs.n)),ce=Math.max(chunkXWSK4QRO_cjs.i,Math.min(k-z,x-chunkXWSK4QRO_cjs.i)),N=f.y+f.height+chunkXWSK4QRO_cjs.i+chunkXWSK4QRO_cjs.n,se=f.y-y-chunkXWSK4QRO_cjs.i-chunkXWSK4QRO_cjs.n,ae=N+y>window.innerHeight,le=se>=0,G=ae&&le,te=G?se:N,C=G?"top":"bottom";if(ae&&!le){let M=w.y??f.y+f.height/2;te=Math.max(chunkXWSK4QRO_cjs.n,Math.min(M+chunkXWSK4QRO_cjs.n,window.innerHeight-y-chunkXWSK4QRO_cjs.n)),C="top";}return {left:z,top:te,arrowLeft:ce,arrowPosition:C}},Y=()=>{let f=e.actions??[],w=e.actionContext;return f.map(x=>({label:x.label,action:()=>{w&&x.onAction(w);},enabled:Pr(x,w),shortcut:x.shortcut}))},D=f=>{f.type==="contextmenu"&&f.preventDefault(),f.stopImmediatePropagation();},q=(f,w)=>{w.stopPropagation(),f.enabled&&(f.action(),e.onHide());};return mt(()=>{h();let f=y=>{!g()||At(y,"data-react-grab-ignore-events")||y instanceof MouseEvent&&y.button===2||e.onDismiss();},w=y=>{if(!g())return;let k=y.code==="Escape",z=y.key==="Enter",ce=y.metaKey||y.ctrlKey,N=y.key.toLowerCase(),se=e.actions??[],ae=e.actionContext,le=te=>!ae||!Pr(te,ae)?false:(y.preventDefault(),y.stopPropagation(),te.onAction(ae),e.onHide(),true);if(k){y.preventDefault(),y.stopPropagation(),e.onDismiss();return}if(z){let te=se.find(C=>C.shortcut==="Enter");te&&le(te);return}if(!ce||y.repeat)return;let G=se.find(te=>te.shortcut&&te.shortcut!=="Enter"&&N===te.shortcut.toLowerCase());G&&le(G);},x=chunkXWSK4QRO_cjs.ia(()=>{window.addEventListener("mousedown",f,{capture:true}),window.addEventListener("touchstart",f,{capture:true});});window.addEventListener("keydown",w,{capture:true}),Me(()=>{chunkXWSK4QRO_cjs.ja(x),window.removeEventListener("mousedown",f,{capture:true}),window.removeEventListener("touchstart",f,{capture:true}),window.removeEventListener("keydown",w,{capture:true});});}),T(me,{get when(){return g()},get children(){var f=Am(),w=f.firstChild,x=w.firstChild;f.$$contextmenu=D,f.$$click=D,f.$$mousedown=D,f.$$pointerdown=D;var y=t;return typeof y=="function"?We(y,f):t=f,O(f,T(Mi,{get position(){return A().arrowPosition},leftPercent:0,get leftOffsetPx(){return A().arrowLeft}}),w),O(x,T(vr,{get tagName(){return m().tagName},get componentName(){return m().componentName},get isClickable(){return e.hasFilePath},onClick:k=>{k.stopPropagation(),e.hasFilePath&&e.actionContext&&e.actions?.find(ce=>ce.id==="open")?.onAction(e.actionContext);},shrink:true,get forceShowIcon(){return e.hasFilePath}})),O(w,T(_t,{get children(){var k=Em(),z=k.firstChild;return We(n,k),We(o,z),O(k,T(on,{get each(){return Y()},children:ce=>(()=>{var N=Tm(),se=N.firstChild;return N.$$click=ae=>q(ce,ae),Je(N,"pointerleave",a),N.addEventListener("pointerenter",ae=>{ce.enabled&&l(ae.currentTarget);}),N.$$pointerdown=ae=>ae.stopPropagation(),O(se,()=>ce.label),O(N,T(me,{get when(){return ce.shortcut},get children(){var ae=Pm();return O(ae,()=>Un(ce.shortcut)),ae}}),null),J(ae=>{var le=ce.label.toLowerCase(),G=!ce.enabled;return le!==ae.e&&re(N,"data-react-grab-menu-item",ae.e=le),G!==ae.t&&(N.disabled=ae.t=G),ae},{e:void 0,t:void 0}),N})()}),null),k}}),null),J(k=>{var z=`${A().top}px`,ce=`${A().left}px`,N=xe("contain-layout flex flex-col justify-center items-start rounded-[10px] antialiased w-fit h-fit min-w-[100px] [font-synthesis:none] [corner-shape:superellipse(1.25)]",chunkXWSK4QRO_cjs.aa);return z!==k.e&&he(f,"top",k.e=z),ce!==k.t&&he(f,"left",k.t=ce),N!==k.a&&Ie(w,k.a=N),k},{e:void 0,t:void 0,a:void 0}),f}})};it(["pointerdown","mousedown","click","contextmenu"]);var km=B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M4.63751 20.1665L3.82444 6.75092L3.73431 5.06621C3.72513 4.89447 3.8619 4.75018 4.03388 4.75018H19.9945C20.1685 4.75018 20.306 4.89769 20.2938 5.07124L20.1756 6.75092L19.3625 20.1665C19.2745 21.618 18.0717 22.7502 16.6176 22.7502H7.38247C5.9283 22.7502 4.72548 21.618 4.63751 20.1665ZM8.74963 16.5002C8.74963 16.9144 9.08542 17.2502 9.49963 17.2502C9.91385 17.2502 10.2496 16.9144 10.2496 16.5002V10.5002C10.2496 10.086 9.91385 9.75018 9.49963 9.75018C9.08542 9.75018 8.74963 10.086 8.74963 10.5002V16.5002ZM14.4996 9.75018C14.9138 9.75018 15.2496 10.086 15.2496 10.5002V16.5002C15.2496 16.9144 14.9138 17.2502 14.4996 17.2502C14.0854 17.2502 13.7496 16.9144 13.7496 16.5002V10.5002C13.7496 10.086 14.0854 9.75018 14.4996 9.75018Z"></path><path fill-rule=evenodd clip-rule=evenodd d="M8.31879 2.46286C8.63394 1.7275 9.35702 1.2507 10.1571 1.2507H13.8383C14.6383 1.2507 15.3614 1.7275 15.6766 2.46286L16.6569 4.75034H19.2239C19.2903 4.75034 19.3523 4.75034 19.4102 4.7507H19.4637C19.4857 4.74973 19.5079 4.74972 19.5303 4.7507H20.9977C21.55 4.7507 21.9977 5.19842 21.9977 5.7507C21.9977 6.30299 21.55 6.7507 20.9977 6.7507H2.99768C2.4454 6.7507 1.99768 6.30299 1.99768 5.7507C1.99768 5.19842 2.4454 4.7507 2.99768 4.7507H4.46507C4.48746 4.74972 4.50968 4.74973 4.53167 4.7507H4.58469C4.6426 4.75034 4.70457 4.75034 4.77093 4.75034H7.33844L8.31879 2.46286ZM13.8903 3.37192L14.481 4.75034H9.5144L10.1052 3.37192C10.1367 3.29838 10.209 3.2507 10.289 3.2507L13.7064 3.2507C13.7864 3.2507 13.8587 3.29838 13.8903 3.37192Z">'),Us=e=>{let t=()=>e.size??14;return (()=>{var n=km();return J(o=>{var l=t(),a=t(),i=e.class;return l!==o.e&&re(n,"width",o.e=l),a!==o.t&&re(n,"height",o.t=a),i!==o.a&&re(n,"class",o.a=i),o},{e:void 0,t:void 0,a:void 0}),n})()};var Mm=B('<div class="flex items-center gap-[5px]"><div class=relative><button data-react-grab-ignore-events data-react-grab-history-clear class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-[#FEF2F2] cursor-pointer transition-all hover:bg-[#FEE2E2] press-scale h-[17px] text-[#B91C1C]"></button></div><div class=relative><button data-react-grab-ignore-events data-react-grab-history-copy-all class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px] text-black/60">'),Im=B('<div data-react-grab-ignore-events data-react-grab-history-dropdown class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><div><div class="contain-layout shrink-0 flex items-center justify-between px-2 pt-1.5 pb-1"><span class="text-[11px] font-medium text-black/40">History</span></div><div class="min-h-0 [border-top-width:0.5px] border-t-solid border-t-[#D9D9D9] px-2 py-1.5"><div class="relative flex flex-col max-h-[240px] overflow-y-auto -mx-2 -my-1.5 [scrollbar-width:thin] [scrollbar-color:transparent_transparent] hover:[scrollbar-color:rgba(0,0,0,0.15)_transparent]"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">'),_m=B('<span class="text-[11px] leading-3 font-sans text-black/40 truncate mt-0.5">'),Om=B('<div data-react-grab-ignore-events data-react-grab-history-item class="group relative z-1 contain-layout flex items-start justify-between w-full px-2 py-1 cursor-pointer text-left gap-2"tabindex=0><span class="flex flex-col min-w-0 flex-1"><span class="text-[12px] leading-4 font-sans font-medium text-black truncate"></span></span><span class="shrink-0 grid"><span class="text-[10px] font-sans text-black/25 group-hover:invisible group-focus-within:invisible [grid-area:1/1] flex items-center justify-end"></span><span class="invisible group-hover:visible group-focus-within:visible [grid-area:1/1] flex items-center justify-end gap-1.5"><button data-react-grab-ignore-events data-react-grab-history-item-remove></button><button data-react-grab-ignore-events data-react-grab-history-item-copy>'),Ac="flex items-center justify-center cursor-pointer text-black/25 transition-colors press-scale",Dm=e=>{let t=Math.floor((Date.now()-e)/1e3);if(t<60)return "now";let n=Math.floor(t/60);if(n<60)return `${n}m`;let o=Math.floor(n/60);return o<24?`${o}h`:`${Math.floor(o/24)}d`},Lm=e=>e.elementsCount&&e.elementsCount>1?`${e.elementsCount} elements`:e.componentName??e.tagName,Pc=e=>{let t,{containerRef:n,highlightRef:o,updateHighlight:l,clearHighlight:a}=Wn(),i=Ri(),d=()=>{if(!t)return null;let V=t.getRootNode().querySelector("[data-react-grab-toolbar]");if(!V)return null;let $=V.getBoundingClientRect();return [{x:$.x-chunkXWSK4QRO_cjs.X,y:$.y-chunkXWSK4QRO_cjs.X,width:$.width+chunkXWSK4QRO_cjs.X*2,height:$.height+chunkXWSK4QRO_cjs.X*2}]},[s,c]=L(0),[g,m]=L(0),[h,A]=L(null),[Y,D]=L(false),[q,f]=L(null),w,x,y,k,z=()=>e.position!==null,[ce,N]=L(false),[se,ae]=L(false),[le,G]=L("bottom"),te=()=>{t&&(c(t.offsetWidth),m(t.offsetHeight));};pe(()=>{z()?(e.position&&G(e.position.edge),clearTimeout(y),N(true),k!==void 0&&chunkXWSK4QRO_cjs.ja(k),k=chunkXWSK4QRO_cjs.ia(()=>{te(),t?.offsetHeight,ae(true);})):(k!==void 0&&chunkXWSK4QRO_cjs.ja(k),ae(false),y=setTimeout(()=>{N(false);},chunkXWSK4QRO_cjs.T));}),pe(Be(se,S=>{S&&t?.matches(":hover")&&e.onDropdownHover?.(true);},{defer:true}));let C=oe(S=>{let V=Fo({anchor:e.position,measuredWidth:s(),measuredHeight:g(),viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,anchorGapPx:chunkXWSK4QRO_cjs.W,viewportPaddingPx:chunkXWSK4QRO_cjs.V,offscreenPosition:chunkXWSK4QRO_cjs.ba});return V.left!==chunkXWSK4QRO_cjs.ba.left?V:S},chunkXWSK4QRO_cjs.ba),M=()=>Math.min(chunkXWSK4QRO_cjs._,window.innerWidth-C().left-chunkXWSK4QRO_cjs.V),H=()=>window.innerHeight-C().top-chunkXWSK4QRO_cjs.V,j=()=>Math.max(chunkXWSK4QRO_cjs.Z,e.position?.toolbarWidth??0),b=S=>{S.type==="contextmenu"&&S.preventDefault(),S.stopImmediatePropagation();};return mt(()=>{te();let S=V=>{z()&&V.code==="Escape"&&(V.preventDefault(),V.stopPropagation(),e.onDismiss?.());};window.addEventListener("keydown",S,{capture:true}),Me(()=>{clearTimeout(w),clearTimeout(x),clearTimeout(y),k!==void 0&&chunkXWSK4QRO_cjs.ja(k),window.removeEventListener("keydown",S,{capture:true}),i.stop();});}),T(me,{get when(){return ce()},get children(){var S=Im(),V=S.firstChild,$=V.firstChild;$.firstChild;var F=$.nextSibling,Ee=F.firstChild,Ce=Ee.firstChild;S.addEventListener("mouseleave",R=>{let Z=d();if(Z){i.start({x:R.clientX,y:R.clientY},Z,()=>e.onDropdownHover?.(false));return}e.onDropdownHover?.(false);}),S.addEventListener("mouseenter",()=>{i.stop(),e.onDropdownHover?.(true);}),S.$$contextmenu=b,S.$$click=b,S.$$mousedown=b,S.$$pointerdown=b;var _=t;return typeof _=="function"?We(_,S):t=S,O($,T(me,{get when(){return e.items.length>0},get children(){var R=Mm(),Z=R.firstChild,Te=Z.firstChild,fe=Z.nextSibling,Pe=fe.firstChild;return Te.addEventListener("mouseleave",()=>A(null)),Te.addEventListener("mouseenter",()=>A("clear")),Te.$$click=de=>{de.stopPropagation(),A(null),e.onClearAll?.();},O(Te,T(Us,{size:chunkXWSK4QRO_cjs.Y})),O(Z,T(In,{get visible(){return h()==="clear"},position:"top",children:"Clear all"}),null),Pe.addEventListener("mouseleave",()=>{A(null),e.onCopyAllHover?.(false);}),Pe.addEventListener("mouseenter",()=>{A("copy"),Y()||e.onCopyAllHover?.(true);}),Pe.$$click=de=>{de.stopPropagation(),A(null),e.onCopyAll?.(),D(true),clearTimeout(w),w=setTimeout(()=>{D(false);},1500);},O(Pe,T(me,{get when(){return Y()},get fallback(){return T(Ar,{size:chunkXWSK4QRO_cjs.Y})},get children(){return T(Sr,{size:chunkXWSK4QRO_cjs.Y,class:"text-black"})}})),O(fe,T(In,{get visible(){return h()==="copy"},position:"top",children:"Copy all"}),null),R}}),null),We(n,Ee),We(o,Ce),O(Ee,T(on,{get each(){return e.items},children:R=>(()=>{var Z=Om(),Te=Z.firstChild,fe=Te.firstChild,Pe=Te.nextSibling,de=Pe.firstChild,ve=de.nextSibling,Fe=ve.firstChild,Le=Fe.nextSibling;return Je(Z,"blur",a),Z.addEventListener("focus",ge=>l(ge.currentTarget)),Z.addEventListener("mouseleave",()=>{e.onItemHover?.(null),a();}),Z.addEventListener("mouseenter",ge=>{e.disconnectedItemIds?.has(R.id)||e.onItemHover?.(R.id),l(ge.currentTarget);}),Z.$$keydown=ge=>{ge.code==="Space"&&ge.currentTarget===ge.target&&(ge.preventDefault(),ge.stopPropagation(),e.onSelectItem?.(R));},Z.$$click=ge=>{ge.stopPropagation(),e.onSelectItem?.(R),f(R.id),clearTimeout(x),x=setTimeout(()=>{f(null);},1500);},Z.$$pointerdown=ge=>ge.stopPropagation(),O(fe,()=>Lm(R)),O(Te,T(me,{get when(){return R.commentText},get children(){var ge=_m();return O(ge,()=>R.commentText),ge}}),null),O(de,()=>Dm(R.timestamp)),Fe.$$click=ge=>{ge.stopPropagation(),e.onRemoveItem?.(R);},O(Fe,T(Us,{size:chunkXWSK4QRO_cjs.Y})),Le.$$click=ge=>{ge.stopPropagation(),e.onCopyItem?.(R),f(R.id),clearTimeout(x),x=setTimeout(()=>{f(null);},1500);},O(Le,T(me,{get when(){return q()===R.id},get fallback(){return T(Ar,{size:chunkXWSK4QRO_cjs.Y})},get children(){return T(Sr,{size:chunkXWSK4QRO_cjs.Y,class:"text-black"})}})),J(ge=>{var Ae={"opacity-40 hover:opacity-100":!!e.disconnectedItemIds?.has(R.id)},rt=xe(Ac,"hover:text-[#B91C1C]"),dt=xe(Ac,"hover:text-black/60");return ge.e=to(Z,Ae,ge.e),rt!==ge.t&&Ie(Fe,ge.t=rt),dt!==ge.a&&Ie(Le,ge.a=dt),ge},{e:void 0,t:void 0,a:void 0}),Z})()}),null),J(R=>{var Z=`${C().top}px`,Te=`${C().left}px`,fe=se()?"auto":"none",Pe=chunkXWSK4QRO_cjs.ca[le()],de=se()?"1":"0",ve=se()?"scale(1)":"scale(0.95)",Fe=xe("contain-layout flex flex-col rounded-[10px] antialiased w-fit h-fit overflow-hidden [font-synthesis:none] [corner-shape:superellipse(1.25)]",chunkXWSK4QRO_cjs.aa),Le=`${j()}px`,ge=`${M()}px`,Ae=`${H()}px`;return Z!==R.e&&he(S,"top",R.e=Z),Te!==R.t&&he(S,"left",R.t=Te),fe!==R.a&&he(S,"pointer-events",R.a=fe),Pe!==R.o&&he(S,"transform-origin",R.o=Pe),de!==R.i&&he(S,"opacity",R.i=de),ve!==R.n&&he(S,"transform",R.n=ve),Fe!==R.s&&Ie(V,R.s=Fe),Le!==R.h&&he(V,"min-width",R.h=Le),ge!==R.r&&he(V,"max-width",R.r=ge),Ae!==R.d&&he(V,"max-height",R.d=Ae),R},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),S}})};it(["pointerdown","mousedown","click","contextmenu","keydown"]);var Rm=B('<div data-react-grab-ignore-events data-react-grab-clear-history-prompt class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><div>'),Tc=e=>{let t,[n,o]=L(0),[l,a]=L(0),[i,d]=L(false),[s,c]=L(false),[g,m]=L("bottom"),h,A,Y=()=>{t&&(o(t.offsetWidth),a(t.offsetHeight));};pe(()=>{let f=e.position;f?(m(f.edge),clearTimeout(h),d(true),A!==void 0&&chunkXWSK4QRO_cjs.ja(A),A=chunkXWSK4QRO_cjs.ia(()=>{Y(),t?.offsetHeight,c(true);})):(A!==void 0&&chunkXWSK4QRO_cjs.ja(A),c(false),h=setTimeout(()=>{d(false);},chunkXWSK4QRO_cjs.T));});let D=oe(f=>{let w=Fo({anchor:e.position,measuredWidth:n(),measuredHeight:l(),viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,anchorGapPx:chunkXWSK4QRO_cjs.W,viewportPaddingPx:chunkXWSK4QRO_cjs.V,offscreenPosition:chunkXWSK4QRO_cjs.ba});return w.left!==chunkXWSK4QRO_cjs.ba.left?w:f},chunkXWSK4QRO_cjs.ba),q=f=>{f.type==="contextmenu"&&f.preventDefault(),f.stopImmediatePropagation();};return mt(()=>{Y();let f=y=>{if(!e.position||Ct(y))return;let k=y.code==="Enter",z=y.code==="Escape";(k||z)&&(y.preventDefault(),y.stopImmediatePropagation(),z?e.onCancel():e.onConfirm());};window.addEventListener("keydown",f,{capture:true});let w=y=>{!e.position||At(y,"data-react-grab-ignore-events")||e.onCancel();},x=chunkXWSK4QRO_cjs.ia(()=>{window.addEventListener("mousedown",w,{capture:true}),window.addEventListener("touchstart",w,{capture:true});});Me(()=>{chunkXWSK4QRO_cjs.ja(x),clearTimeout(h),A!==void 0&&chunkXWSK4QRO_cjs.ja(A),window.removeEventListener("keydown",f,{capture:true}),window.removeEventListener("mousedown",w,{capture:true}),window.removeEventListener("touchstart",w,{capture:true});});}),T(me,{get when(){return i()},get children(){var f=Rm(),w=f.firstChild;f.$$contextmenu=q,f.$$click=q,f.$$mousedown=q,f.$$pointerdown=q;var x=t;return typeof x=="function"?We(x,f):t=f,O(w,T(Cr,{label:"Clear history?",cancelOnEscape:true,get onConfirm(){return e.onConfirm},get onCancel(){return e.onCancel}})),J(y=>{var k=`${D().top}px`,z=`${D().left}px`,ce=s()?"auto":"none",N=chunkXWSK4QRO_cjs.ca[g()],se=s()?"1":"0",ae=s()?"scale(1)":"scale(0.95)",le=xe("contain-layout flex flex-col rounded-[10px] antialiased w-fit h-fit [font-synthesis:none] [corner-shape:superellipse(1.25)]",chunkXWSK4QRO_cjs.aa);return k!==y.e&&he(f,"top",y.e=k),z!==y.t&&he(f,"left",y.t=z),ce!==y.a&&he(f,"pointer-events",y.a=ce),N!==y.o&&he(f,"transform-origin",y.o=N),se!==y.i&&he(f,"opacity",y.i=se),ae!==y.n&&he(f,"transform",y.n=ae),le!==y.s&&Ie(w,y.s=le),y},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),f}})};it(["pointerdown","mousedown","click","contextmenu"]);var $m=B('<div style="position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;transition:opacity 100ms ease-out;will-change:opacity;contain:strict;transform:translateZ(0)">'),kc=e=>[T(Xl,{get crosshairVisible(){return e.crosshairVisible},get selectionVisible(){return e.selectionVisible},get selectionBounds(){return e.selectionBounds},get selectionBoundsMultiple(){return e.selectionBoundsMultiple},get selectionShouldSnap(){return e.selectionShouldSnap},get selectionIsFading(){return e.selectionLabelStatus==="fading"},get dragVisible(){return e.dragVisible},get dragBounds(){return e.dragBounds},get grabbedBoxes(){return e.grabbedBoxes},get agentSessions(){return e.agentSessions},get labelInstances(){return e.labelInstances}}),(()=>{var t=$m();return he(t,"z-index",2147483645),he(t,"box-shadow",`inset 0 0 ${chunkXWSK4QRO_cjs.h}px ${chunkXWSK4QRO_cjs.g}`),J(n=>he(t,"opacity",e.isFrozen?1:0)),t})(),T(bi,{get each(){return He(()=>!!e.agentSessions)()?Array.from(e.agentSessions.values()):[]},children:t=>T(me,{get when(){return t().selectionBounds.length>0},get children(){return T(Li,{get tagName(){return t().tagName},get componentName(){return t().componentName},get selectionBounds(){return t().selectionBounds[0]},get mouseX(){return t().position.x},visible:true,hasAgent:true,isAgentConnected:true,get status(){return t().isFading?"fading":t().isStreaming?"copying":"copied"},get statusText(){return t().lastStatus||"Thinking\u2026"},get inputValue(){return t().context.prompt},get previousPrompt(){return t().context.prompt},get supportsUndo(){return e.supportsUndo},get supportsFollowUp(){return e.supportsFollowUp},get dismissButtonText(){return e.dismissButtonText},onAbort:()=>e.onRequestAbortSession?.(t().id),get onDismiss(){return t().isStreaming?void 0:()=>e.onDismissSession?.(t().id)},get onUndo(){return t().isStreaming?void 0:()=>e.onUndoSession?.(t().id)},get onFollowUpSubmit(){return t().isStreaming?void 0:n=>e.onFollowUpSubmitSession?.(t().id,n)},get error(){return t().error},onAcknowledgeError:()=>e.onAcknowledgeSessionError?.(t().id),onRetry:()=>e.onRetrySession?.(t().id),get isPendingAbort(){return He(()=>!!t().isStreaming)()&&e.pendingAbortSessionId===t().id},onConfirmAbort:()=>e.onAbortSession?.(t().id,true),onCancelAbort:()=>e.onAbortSession?.(t().id,false),onShowContextMenu:void 0})}})}),T(me,{get when(){return He(()=>!!e.selectionLabelVisible)()&&e.selectionBounds},get children(){return T(Li,{get tagName(){return e.selectionTagName},get componentName(){return e.selectionComponentName},get elementsCount(){return e.selectionElementsCount},get selectionBounds(){return e.selectionBounds},get mouseX(){return e.mouseX},get visible(){return e.selectionLabelVisible},get isPromptMode(){return e.isPromptMode},get inputValue(){return e.inputValue},get replyToPrompt(){return e.replyToPrompt},get hasAgent(){return e.hasAgent},get isAgentConnected(){return e.isAgentConnected},get status(){return e.selectionLabelStatus},get actionCycleState(){return e.selectionActionCycleState},get arrowNavigationState(){return e.selectionArrowNavigationState},get onArrowNavigationSelect(){return e.onArrowNavigationSelect},get filePath(){return e.selectionFilePath},get lineNumber(){return e.selectionLineNumber},get onInputChange(){return e.onInputChange},get onSubmit(){return e.onInputSubmit},get onCancel(){return e.onInputCancel},get onToggleExpand(){return e.onToggleExpand},get isPendingDismiss(){return e.isPendingDismiss},get onConfirmDismiss(){return e.onConfirmDismiss},get onCancelDismiss(){return e.onCancelDismiss},onOpen:()=>{e.selectionFilePath&&chunkXWSK4QRO_cjs.ya(e.selectionFilePath,e.selectionLineNumber);},get isContextMenuOpen(){return e.contextMenuPosition!==null}})}}),T(bi,{get each(){return e.labelInstances??[]},children:t=>T(Li,{get tagName(){return t().tagName},get componentName(){return t().componentName},get elementsCount(){return t().elementsCount},get selectionBounds(){return t().bounds},get mouseX(){return t().mouseX},visible:true,get status(){return t().status},get statusText(){return t().statusText},get hasAgent(){return !!t().statusText},get isPromptMode(){return t().isPromptMode},get inputValue(){return t().inputValue},get error(){return t().errorMessage},get hideArrow(){return t().hideArrow},get onShowContextMenu(){let n=t();if(!(!(n.status==="copied"||n.status==="fading")||!et(n.element)))return ()=>e.onShowContextMenuInstance?.(n.id)},onHoverChange:n=>e.onLabelInstanceHoverChange?.(t().id,n)})}),T(me,{get when(){return e.toolbarVisible!==false},get children(){return T(Cc,{get isActive(){return e.isActive},get isContextMenuOpen(){return e.contextMenuPosition!==null},get onToggle(){return e.onToggleActive},get enabled(){return e.enabled},get onToggleEnabled(){return e.onToggleEnabled},get shakeCount(){return e.shakeCount},get onStateChange(){return e.onToolbarStateChange},get onSubscribeToStateChanges(){return e.onSubscribeToToolbarStateChanges},get onSelectHoverChange(){return e.onToolbarSelectHoverChange},get onContainerRef(){return e.onToolbarRef},get historyItemCount(){return e.historyItemCount},get clockFlashTrigger(){return e.clockFlashTrigger},get hasUnreadHistoryItems(){return e.hasUnreadHistoryItems},get onToggleHistory(){return e.onToggleHistory},get onCopyAll(){return e.onCopyAll},get onCopyAllHover(){return e.onCopyAllHover},get onHistoryButtonHover(){return e.onHistoryButtonHover},get isHistoryDropdownOpen(){return !!e.historyDropdownPosition},get isHistoryPinned(){return e.isHistoryPinned},get toolbarActions(){return e.toolbarActions},get onToggleMenu(){return e.onToggleMenu},get isMenuOpen(){return !!e.toolbarMenuPosition},get isClearPromptOpen(){return !!e.clearPromptPosition}})}}),T(Ec,{get position(){return e.contextMenuPosition??null},get selectionBounds(){return e.contextMenuBounds??null},get tagName(){return e.contextMenuTagName},get componentName(){return e.contextMenuComponentName},get hasFilePath(){return e.contextMenuHasFilePath??false},get actions(){return e.actions},get actionContext(){return e.actionContext},get onDismiss(){return e.onContextMenuDismiss??(()=>{})},get onHide(){return e.onContextMenuHide??(()=>{})}}),T(Sc,{get position(){return e.toolbarMenuPosition??null},get actions(){return e.toolbarActions??[]},get onDismiss(){return e.onToolbarMenuDismiss??(()=>{})}}),T(Tc,{get position(){return e.clearPromptPosition??null},get onConfirm(){return e.onClearHistoryConfirm??(()=>{})},get onCancel(){return e.onClearHistoryCancel??(()=>{})}}),T(Pc,{get position(){return e.historyDropdownPosition??null},get items(){return e.historyItems??[]},get disconnectedItemIds(){return e.historyDisconnectedItemIds},get onSelectItem(){return e.onHistoryItemSelect},get onRemoveItem(){return e.onHistoryItemRemove},get onCopyItem(){return e.onHistoryItemCopy},get onItemHover(){return e.onHistoryItemHover},get onCopyAll(){return e.onHistoryCopyAll},get onCopyAllHover(){return e.onHistoryCopyAllHover},get onClearAll(){return e.onHistoryClear},get onDismiss(){return e.onHistoryDismiss},get onDropdownHover(){return e.onHistoryDropdownHover}})];var Ws=()=>({activate:()=>{},deactivate:()=>{},toggle:()=>{},comment:()=>{},isActive:()=>false,isEnabled:()=>false,setEnabled:()=>{},getToolbarState:()=>null,setToolbarState:()=>{},onToolbarStateChange:()=>()=>{},dispose:()=>{},copyElement:()=>Promise.resolve(false),getSource:()=>Promise.resolve(null),getStackContext:()=>Promise.resolve(""),getState:()=>({isActive:false,isDragging:false,isCopying:false,isPromptMode:false,isCrosshairVisible:false,isSelectionBoxVisible:false,isDragBoxVisible:false,targetElement:null,dragBounds:null,grabbedBoxes:[],labelInstances:[],selectionFilePath:null,toolbarState:null}),setOptions:()=>{},registerPlugin:()=>{},unregisterPlugin:()=>{},getPlugins:()=>[],getDisplayName:()=>null});var Mc=()=>{let e=new AbortController,t=(o,l,a={})=>{window.addEventListener(o,l,{...a,signal:e.signal});},n=(o,l,a={})=>{document.addEventListener(o,l,{...a,signal:e.signal});};return {signal:e.signal,abort:()=>e.abort(),addWindowListener:t,addDocumentListener:n}};var Nm="application/x-lexical-editor",Bm="application/x-react-grab",Ic=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return (e==="x"?t:t&3|8).toString(16)}),Hm=(e,t,n,o)=>({detail:1,format:0,mode:"segmented",style:"",text:`@${e}`,type:"mention",version:1,mentionName:e,typeaheadType:n,storedKey:t,metadata:o,source:"chat"}),Fm=e=>({detail:0,format:0,mode:"normal",style:"",text:e,type:"text",version:1}),zm=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),Vm=(e,t)=>{let n=String(Math.floor(Math.random()*1e4)),o=Ic(),l=`<${t}>`,a={case:"file",path:`${l}.tsx`,content:e},i={key:l,type:a,payload:{file:{path:`${l}.tsx`,content:e}},id:Ic(),name:l,_score:20,isSlash:false,labelMatch:[{start:0,end:2}]},d={selection:{type:0},selectedOption:i};return {plainText:`@${l}
11
+
12
+ ${e}
13
+ `,htmlContent:`<meta charset='utf-8'><pre><code>${zm(e)}</code></pre>`,lexicalData:JSON.stringify({namespace:`chat-input${o}-pane`,nodes:[Hm(l,n,a,d),Fm(`
14
+
15
+ ${e}`)]})}},jt=(e,t)=>{let n=t?.componentName??"div",{plainText:o,htmlContent:l,lexicalData:a}=Vm(e,n),i=t?.entries??[{tagName:t?.tagName,componentName:n,content:e,commentText:t?.commentText}],d={version:chunkXWSK4QRO_cjs.a,content:e,entries:i,timestamp:Date.now()},s=g=>{g.preventDefault(),g.clipboardData?.setData("text/plain",o),g.clipboardData?.setData("text/html",l),g.clipboardData?.setData(Nm,a),g.clipboardData?.setData(Bm,JSON.stringify(d));};document.addEventListener("copy",s);let c=document.createElement("textarea");c.value=e,c.style.position="fixed",c.style.left="-9999px",c.ariaHidden="true",document.body.appendChild(c),c.select();try{let g=document.execCommand("copy");return g&&t?.onSuccess?.(),g}finally{document.removeEventListener("copy",s),c.remove();}};var kr=async(e,t={})=>(await Promise.allSettled(e.map(l=>chunkXWSK4QRO_cjs.wa(l,t)))).map(l=>l.status==="fulfilled"?l.value:"");var $i=e=>e.length<=1?e[0]??"":e.map((t,n)=>`[${n+1}]
16
+ ${t}`).join(`
17
+
18
+ `);var _c=async(e,t,n,o)=>{let l=false,a="";await t.onBeforeCopy(n);try{let i,d;if(e.getContent)i=await e.getContent(n);else {let s=await kr(n,{maxLines:e.maxContextLines}),g=(await Promise.all(s.map((m,h)=>m.trim()?t.transformSnippet(m,n[h]):Promise.resolve("")))).map((m,h)=>({snippet:m,element:n[h]})).filter(({snippet:m})=>m.trim());i=$i(g.map(({snippet:m})=>m)),d=g.map(({snippet:m,element:h})=>({tagName:h.localName,content:m,commentText:o}));}if(i.trim()){let s=await t.transformCopyContent(i,n);a=o?`${o}
19
+
20
+ ${s}`:s,l=jt(a,{componentName:e.componentName,entries:d});}}catch(i){let d=i instanceof Error?i:new Error(String(i));t.onCopyError(d);}return l&&t.onCopySuccess(n,a),t.onAfterCopy(n,l),l};var Km=(e,t)=>{let n=Math.max(e.left,t.left),o=Math.max(e.top,t.top),l=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom),i=Math.max(0,l-n),d=Math.max(0,a-o);return i*d},Um=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,zo=(e,t,n)=>Math.min(n,Math.max(t,e)),Wm=e=>e.sort((t,n)=>{if(t===n)return 0;let o=t.compareDocumentPosition(n);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}),Gm=e=>{if(e.width<=0||e.height<=0)return [];let t=window.innerWidth,n=window.innerHeight,o=e.x,l=e.y,a=e.x+e.width,i=e.y+e.height,d=o+e.width/2,s=l+e.height/2,c=zo(Math.ceil(e.width/chunkXWSK4QRO_cjs.G),chunkXWSK4QRO_cjs.H,chunkXWSK4QRO_cjs.I),g=zo(Math.ceil(e.height/chunkXWSK4QRO_cjs.G),chunkXWSK4QRO_cjs.H,chunkXWSK4QRO_cjs.I),m=c*g,h=m>chunkXWSK4QRO_cjs.J?Math.sqrt(chunkXWSK4QRO_cjs.J/m):1,A=zo(Math.floor(c*h),chunkXWSK4QRO_cjs.H,chunkXWSK4QRO_cjs.I),Y=zo(Math.floor(g*h),chunkXWSK4QRO_cjs.H,chunkXWSK4QRO_cjs.I),D=new Set,q=[],f=(w,x)=>{let y=zo(Math.round(w),0,t-1),k=zo(Math.round(x),0,n-1),z=`${y}:${k}`;D.has(z)||(D.add(z),q.push({x:y,y:k}));};f(o+chunkXWSK4QRO_cjs.K,l+chunkXWSK4QRO_cjs.K),f(a-chunkXWSK4QRO_cjs.K,l+chunkXWSK4QRO_cjs.K),f(o+chunkXWSK4QRO_cjs.K,i-chunkXWSK4QRO_cjs.K),f(a-chunkXWSK4QRO_cjs.K,i-chunkXWSK4QRO_cjs.K),f(d,l+chunkXWSK4QRO_cjs.K),f(d,i-chunkXWSK4QRO_cjs.K),f(o+chunkXWSK4QRO_cjs.K,s),f(a-chunkXWSK4QRO_cjs.K,s),f(d,s);for(let w=0;w<A;w+=1){let x=o+(w+.5)/A*e.width;for(let y=0;y<Y;y+=1){let k=l+(y+.5)/Y*e.height;f(x,k);}}return q},jm=(e,t,n)=>{let o={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height},l=new Set,a=Gm(e);chunkXWSK4QRO_cjs.Ka();try{for(let d of a){let s=document.elementsFromPoint(d.x,d.y);for(let c of s)l.add(c);}}finally{chunkXWSK4QRO_cjs.La();}let i=[];for(let d of l){if(!n&&chunkXWSK4QRO_cjs.Ea(d)||!t(d))continue;let s=d.getBoundingClientRect();if(s.width<=0||s.height<=0)continue;let c={left:s.left,top:s.top,right:s.left+s.width,bottom:s.top+s.height};if(n){let g=Km(o,c),m=s.width*s.height;m>0&&g/m>=chunkXWSK4QRO_cjs.F&&i.push(d);}else Um(c,o)&&i.push(d);}return Wm(i)},Xm=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),Mr=(e,t,n=true)=>{let o=jm(e,t,n);return Xm(o)};var Oc=()=>{Fl(),chunkXWSK4QRO_cjs.Ja(),chunkXWSK4QRO_cjs.Fa();};var Ni=e=>({x:e.pageX-window.scrollX,y:e.pageY-window.scrollY,width:e.width,height:e.height,borderRadius:"0px",transform:"none"}),Gs=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),Bi=e=>({...e,borderRadius:"0px",transform:"none"});var Ym=new Set(["c","C","\u0441","\u0421","\u023C","\u023B","\u2184","\u2183","\u1D04","\u1D9C","\u2C7C","\u217D","\u216D","\xE7","\xC7","\u0107","\u0106","\u010D","\u010C","\u0109","\u0108","\u010B","\u010A"]),Hi=(e,t)=>t==="KeyC"?true:!e||e.length!==1?false:Ym.has(e);var Dc=(e,t)=>{let n=e.toLowerCase();return t==="Space"?n==="space"||n===" ":t.startsWith("Key")?t.slice(3).toLowerCase()===n:t.startsWith("Digit")?t.slice(5)===n:false};var qm={meta:"metaKey",cmd:"metaKey",command:"metaKey",win:"metaKey",windows:"metaKey",ctrl:"ctrlKey",control:"ctrlKey",shift:"shiftKey",alt:"altKey",option:"altKey",opt:"altKey"},Lc=e=>{let t=e.split("+").map(o=>o.trim().toLowerCase()),n={metaKey:false,ctrlKey:false,shiftKey:false,altKey:false,key:null};for(let o of t){let l=qm[o];l?n[l]=true:n.key=o;}return n},Fi=e=>{if(typeof e=="function")return e;let t=Lc(e),n=t.key;return o=>{if(n===null){let d=t.metaKey?o.metaKey||o.key==="Meta":true,s=t.ctrlKey?o.ctrlKey||o.key==="Control":true,c=t.shiftKey?o.shiftKey||o.key==="Shift":true,g=t.altKey?o.altKey||o.key==="Alt":true,m=d&&s&&c&&g,h=[t.metaKey,t.ctrlKey,t.shiftKey,t.altKey].filter(Boolean).length,A=[o.metaKey||o.key==="Meta",o.ctrlKey||o.key==="Control",o.shiftKey||o.key==="Shift",o.altKey||o.key==="Alt"].filter(Boolean).length;return m&&A>=h}let l=o.key?.toLowerCase()===n||Dc(n,o.code),i=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?(t.metaKey?o.metaKey:true)&&(t.ctrlKey?o.ctrlKey:true)&&(t.shiftKey?o.shiftKey:true)&&(t.altKey?o.altKey:true):!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&!o.altKey;return l&&i}},Rc=e=>!e||typeof e=="function"?{metaKey:Mn(),ctrlKey:!Mn(),shiftKey:false,altKey:false,key:null}:Lc(e);var zi=(e,t)=>{if(t.activationKey)return Fi(t.activationKey)(e);let o=(Mn()?e.metaKey:e.ctrlKey)&&!e.shiftKey&&!e.altKey;return !!(e.key&&o&&Hi(e.key,e.code))};var js=e=>{if(e.length===0)return {x:0,y:0,width:0,height:0};if(e.length===1)return e[0];let t=1/0,n=1/0,o=-1/0,l=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),o=Math.max(o,a.x+a.width),l=Math.max(l,a.y+a.height);return {x:t,y:n,width:o-t,height:l-n}};var ro={enabled:true,hue:0,selectionBox:{enabled:true},dragBox:{enabled:true},grabbedBoxes:{enabled:true},elementLabel:{enabled:true},crosshair:{enabled:true},toolbar:{enabled:true}},Vi=(e,t)=>({enabled:t.enabled??e.enabled,hue:t.hue??e.hue,selectionBox:{enabled:t.selectionBox?.enabled??e.selectionBox.enabled},dragBox:{enabled:t.dragBox?.enabled??e.dragBox.enabled},grabbedBoxes:{enabled:t.grabbedBoxes?.enabled??e.grabbedBoxes.enabled},elementLabel:{enabled:t.elementLabel?.enabled??e.elementLabel.enabled},crosshair:{enabled:t.crosshair?.enabled??e.crosshair.enabled},toolbar:{enabled:t.toolbar?.enabled??e.toolbar.enabled}});var $c={activationMode:"toggle",keyHoldDuration:100,allowActivationInsideInput:true,maxContextLines:3,activationKey:void 0,getContent:void 0,freezeReactUpdates:true},Nc=(e={})=>{let t=new Map,n={},[o,l]=vi({theme:ro,options:{...$c,...e},actions:[],toolbarActions:[]}),a=f=>f.target==="toolbar",i=()=>{let f=ro,w={...$c,...e},x=[],y=[];for(let{config:k}of t.values())if(k.theme&&(f=Vi(f,k.theme)),k.options&&(w={...w,...k.options}),k.actions)for(let z of k.actions)if(a(z)){let ce=z.onAction;y.push({...z,onAction:()=>{m("cancelPendingToolbarActions"),ce();}});}else x.push(z);w={...w,...n},l("theme",f),l("options",w),l("actions",x),l("toolbarActions",y);},d=f=>{for(let[w,x]of Object.entries(f))x!==void 0&&(n[w]=x,l("options",w,x));},s=(f,w)=>{t.has(f.name)&&c(f.name);let x=f.setup?.(w,q)??{};return f.theme&&(x.theme=x.theme?Vi(Vi(ro,f.theme),x.theme):f.theme),f.actions&&(x.actions=[...f.actions,...x.actions??[]]),f.hooks&&(x.hooks=x.hooks?{...f.hooks,...x.hooks}:f.hooks),f.options&&(x.options=x.options?{...f.options,...x.options}:f.options),t.set(f.name,{plugin:f,config:x}),i(),x},c=f=>{let w=t.get(f);w&&(w.config.cleanup&&w.config.cleanup(),t.delete(f),i());},g=()=>Array.from(t.keys()),m=(f,...w)=>{for(let{config:x}of t.values()){let y=x.hooks?.[f];y&&y(...w);}},h=(f,...w)=>{let x=false;for(let{config:y}of t.values()){let k=y.hooks?.[f];k&&k(...w)===true&&(x=true);}return x},A=async(f,...w)=>{for(let{config:x}of t.values()){let y=x.hooks?.[f];y&&await y(...w);}},Y=async(f,w,...x)=>{let y=w;for(let{config:k}of t.values()){let z=k.hooks?.[f];z&&(y=await z(y,...x));}return y},D=(f,w,...x)=>{let y=w;for(let{config:k}of t.values()){let z=k.hooks?.[f];z&&(y=z(y,...x));}return y},q={onActivate:()=>m("onActivate"),onDeactivate:()=>m("onDeactivate"),onElementHover:f=>m("onElementHover",f),onElementSelect:f=>{let w=false,x;for(let{config:y}of t.values()){let k=y.hooks?.onElementSelect;if(k){let z=k(f);z===true?w=true:z instanceof Promise&&(w=true,x=z);}}return {wasIntercepted:w,pendingResult:x}},onDragStart:(f,w)=>m("onDragStart",f,w),onDragEnd:(f,w)=>m("onDragEnd",f,w),onBeforeCopy:async f=>A("onBeforeCopy",f),transformCopyContent:async(f,w)=>Y("transformCopyContent",f,w),onAfterCopy:(f,w)=>m("onAfterCopy",f,w),onCopySuccess:(f,w)=>m("onCopySuccess",f,w),onCopyError:f=>m("onCopyError",f),onStateChange:f=>m("onStateChange",f),onPromptModeChange:(f,w)=>m("onPromptModeChange",f,w),onSelectionBox:(f,w,x)=>m("onSelectionBox",f,w,x),onDragBox:(f,w)=>m("onDragBox",f,w),onGrabbedBox:(f,w)=>m("onGrabbedBox",f,w),onElementLabel:(f,w,x)=>m("onElementLabel",f,w,x),onCrosshair:(f,w)=>m("onCrosshair",f,w),onContextMenu:(f,w)=>m("onContextMenu",f,w),cancelPendingToolbarActions:()=>m("cancelPendingToolbarActions"),onOpenFile:(f,w)=>h("onOpenFile",f,w),transformHtmlContent:async(f,w)=>Y("transformHtmlContent",f,w),transformAgentContext:async(f,w)=>Y("transformAgentContext",f,w),transformActionContext:f=>D("transformActionContext",f),transformOpenFileUrl:(f,w,x)=>D("transformOpenFileUrl",f,w,x),transformSnippet:async(f,w)=>Y("transformSnippet",f,w)};return {register:s,unregister:c,getPluginNames:g,setOptions:d,store:o,hooks:q}};var Xs="react-grab:agent-sessions",Zm=()=>`session-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,Hc=(e,t,n,o,l)=>{let a=Date.now();return {id:Zm(),context:e,lastStatus:"",isStreaming:true,createdAt:a,lastUpdatedAt:a,position:t,selectionBounds:n,tagName:o,componentName:l}},gn=new Map,Bc=()=>{for(;gn.size>chunkXWSK4QRO_cjs.M;){let e=gn.keys().next().value;e!==void 0&&gn.delete(e);}},Ki=(e,t)=>{if(!t){gn.clear(),e.forEach((n,o)=>gn.set(o,n)),Bc();return}try{let n=Object.fromEntries(e);t.setItem(Xs,JSON.stringify(n));}catch{gn.clear(),e.forEach((n,o)=>gn.set(o,n)),Bc();}},Ui=(e,t)=>{let n=Wi(t);n.set(e.id,e),Ki(n,t);},Wi=e=>{if(!e)return new Map(gn);try{let t=e.getItem(Xs);if(!t)return new Map;let n=JSON.parse(t);return new Map(Object.entries(n))}catch{return new Map}},Gi=e=>{if(!e){gn.clear();return}try{e.removeItem(Xs);}catch{gn.clear();}},Ys=(e,t)=>{let n=Wi(t);n.delete(e),Ki(n,t);},Gn=(e,t,n)=>{let o={...e,...t,lastUpdatedAt:Date.now()};return Ui(o,n),o};var qs=(e,t)=>{let[n,o]=L(new Map),[l,a]=L(false),[i,d]=L(false),s=new Map,c=new Map,g=new Map,m=[],h=[],A=e,Y=b=>g.get(b)?.agent??A,D=b=>g.get(b)?.elements??[],q=b=>{let S=b??A,V=S?.provider?.canUndo?.()??false,$=S?.provider?.canRedo?.()??false;a(V),d($);},f=b=>{A=b,q();},w=()=>A,x=()=>Array.from(n().values()).some(b=>b.isStreaming),y=async(b,S,V,$)=>{let Q=$??A,F=Q?.storage,Ee=false,Ce=()=>s.get(b.id)===V;try{for await(let Z of S){if(!Ce())break;let fe=n().get(b.id);if(!fe)break;let Pe=Gn(fe,{lastStatus:Z},F);o(de=>new Map(de).set(b.id,Pe)),Q?.onStatus?.(Z,Pe);}if(!Ce())return;let R=n().get(b.id);if(R){let Z=Q?.provider?.getCompletionMessage?.(),Te=Gn(R,{isStreaming:!1,...Z?{lastStatus:Z}:{}},F);o(ve=>new Map(ve).set(b.id,Te));let fe=D(b.id),Pe=await Q?.onComplete?.(Te,fe),de=h.findIndex(ve=>ve.session.id===b.id);if(de!==-1&&h.splice(de,1),h.push({session:Te,elements:fe,agent:Q}),q(Q),m.length=0,Pe?.error){let ve=Gn(Te,{error:Pe.error},F);o(Fe=>new Map(Fe).set(b.id,ve));}}}catch(_){if(!Ce())return;let Z=n().get(b.id);if(_ instanceof Error&&_.name==="AbortError"){if(Ee=true,Z){let Te=D(b.id);Q?.onAbort?.(Z,Te);}}else {let Te=_ instanceof Error?_.message:"Unknown error";if(Z){let fe=Gn(Z,{error:Te,isStreaming:false},F);o(Pe=>new Map(Pe).set(b.id,fe)),_ instanceof Error&&Q?.onError?.(_,fe);}}}finally{if(!Ce())return;if(s.delete(b.id),Ee){let _=c.get(b.id);_&&(clearTimeout(_),c.delete(b.id)),g.delete(b.id),Ys(b.id,F),o(R=>{let Z=new Map(R);return Z.delete(b.id),Z});}}},k=b=>{let{selectionBounds:S,tagName:V}=b,$=S[0];if(!$)return;let Q=$.x+$.width/2,F=$.y+$.height/2,Ee=document.elementFromPoint(Q,F);if(!(!Ee||V&&!V.includes(" ")&&chunkXWSK4QRO_cjs.ha(Ee)!==V))return Ee},z=()=>{let b=A?.storage;if(!b)return;let S=Wi(b);if(S.size===0)return;let V=Date.now(),$=Array.from(S.values()).filter(F=>{if(F.isStreaming)return true;let Ee=F.lastUpdatedAt??F.createdAt;return V-Ee<1e4&&!!F.error});if($.length===0){Gi(b);return}if(!A?.provider?.supportsResume||!A.provider.resume){Gi(b);return}c.forEach(F=>clearTimeout(F)),c.clear(),s.forEach(F=>F.abort()),s.clear(),g.clear();let Q=new Map($.map(F=>[F.id,F]));o(Q),Ki(Q,b);for(let F of $){let Ee=k(F);Ee&&A&&g.set(F.id,{elements:[Ee],agent:A});let Ce={...F,isStreaming:true,error:void 0,lastStatus:F.lastStatus||"Resuming...",position:F.position??{x:window.innerWidth/2,y:window.innerHeight/2}};o(Z=>new Map(Z).set(F.id,Ce)),A?.onResume?.(Ce);let _=new AbortController;s.set(F.id,_);let R=A.provider.resume(F.id,_.signal,b);y(F,R,_);}},ce=async b=>{let{elements:S,prompt:V,position:$,selectionBounds:Q,sessionId:F,agent:Ee}=b,Ce=Ee??(F?Y(F):A),_=Ce?.storage;if(!Ce?.provider||S.length===0)return;let R=S[0],Z=F?n().get(F):void 0,Te=!!F,Pe={content:Z?Z.context.content:(await kr(S,{maxLines:1/0})).filter(Ae=>Ae.trim()),prompt:V,options:Ce?.getOptions?.(),sessionId:Te?F:void 0},de;if(Z)de=Gn(Z,{context:Pe,isStreaming:true,lastStatus:"Thinking\u2026"},_);else {let Ae=S.length>1?`${S.length} elements`:chunkXWSK4QRO_cjs.ha(R)||void 0,rt=S.length>1?void 0:await chunkXWSK4QRO_cjs.sa(R)||void 0;de=Hc(Pe,$,Q,Ae,rt),de.lastStatus="Thinking\u2026";}g.set(de.id,{elements:S,agent:Ce}),o(Ae=>new Map(Ae).set(de.id,de)),Ui(de,_),Ce.onStart?.(de,S);let ve=new AbortController;s.set(de.id,ve);let Fe={...Pe,sessionId:F??de.id},Le;try{Le=t?.transformAgentContext?await t.transformAgentContext(Fe,S):Fe;}catch(Ae){let rt=Ae instanceof Error?Ae.message:"Context transformation failed",dt=Gn(de,{error:rt,isStreaming:false},_);o(Ve=>new Map(Ve).set(de.id,dt)),s.delete(de.id),Ae instanceof Error&&Ce.onError?.(Ae,dt);return}let ge=Ce.provider.send(Le,ve.signal);y(de,ge,ve,Ce);},N=b=>{if(b){let S=s.get(b);S&&S.abort();}else s.forEach(S=>S.abort()),s.clear(),c.forEach(S=>clearTimeout(S)),c.clear(),g.clear(),h.length=0,m.length=0,o(new Map),Gi(A?.storage),q();},se=(b,S,V)=>{let Q=n().get(b),F=S??Y(b),Ee=V??D(b);if(Q?.isFading)return;Q&&Ee.length>0&&F?.onDismiss?.(Q,Ee),o(R=>{let Z=new Map(R),Te=Z.get(b);return Te&&Z.set(b,{...Te,isFading:true}),Z});let Ce=c.get(b);Ce&&clearTimeout(Ce);let _=setTimeout(()=>{c.delete(b);let R=s.get(b);R&&(R.abort(),s.delete(b)),g.delete(b),Ys(b,F?.storage),o(Z=>{let Te=new Map(Z);return Te.delete(b),Te});},150);c.set(b,_);};return {sessions:n,isProcessing:x,canUndo:l,canRedo:i,session:{start:ce,abort:N,dismiss:se,retry:b=>{let V=n().get(b),$=Y(b);if(!V||!$?.provider)return;let Q=$.storage,F=D(b),Ee=Gn(V,{error:void 0,isStreaming:true,lastStatus:"Retrying\u2026"},Q);o(Z=>new Map(Z).set(b,Ee)),Ui(Ee,Q),F.length>0&&$.onStart?.(Ee,F);let Ce=new AbortController;s.set(b,Ce);let _={...Ee.context,sessionId:b},R=$.provider.send(_,Ce.signal);y(Ee,R,Ce,$);},undo:b=>{let V=n().get(b),$=Y(b),Q=D(b);if(V){m.push({session:V,elements:Q,agent:$});let F=h.findIndex(Ee=>Ee.session.id===b);F!==-1&&h.splice(F,1),$?.onUndo?.(V,Q),$?.provider?.undo?.();}se(b,$,Q),q($);},getElement:b=>D(b)[0],getElements:b=>D(b),tryResume:z,acknowledgeError:b=>{let $=n().get(b)?.context.prompt;return se(b),$}},history:{undo:()=>{let b=h.pop();if(!b)return;let{session:S,elements:V,agent:$}=b,Q=$??A;m.push(b),Q?.onUndo?.(S,V),Q?.provider?.undo?.(),se(S.id,Q,V),q(Q);},redo:()=>{let b=m.pop();if(!b)return;let S=b.agent??A,{session:V,elements:$}=b;S?.provider?.redo?.();let Q=$.filter(F=>et(F));if(Q.length===0){let F=k(V);F&&(Q=[F]);}if(Q.length>0&&S){h.push(b);let F=Q.map(Ce=>ze(Ce)),Ee={...V,selectionBounds:F};g.set(V.id,{elements:Q,agent:S}),o(Ce=>new Map(Ce).set(V.id,Ee));}q(S);}},_internal:{updateBoundsOnViewportChange:()=>{let b=n();if(b.size===0)return;let S=new Map(b),V=false;for(let[$,Q]of b){let F=D($),Ee=F[0];if(et(Ee)){let Ce=F.filter(_=>et(_)).map(_=>ze(_));if(Ce.length>0){let _=Q.selectionBounds[0],R=Ce[0],Z=Ci({currentPosition:Q.position,previousBounds:_,nextBounds:R});S.set($,{...Q,selectionBounds:Ce,position:Z}),V=true;}}}V&&o(S);},setOptions:f,getOptions:w}}};var Fc=(e,t)=>{let n=[],o=(c,g)=>{let m=t(c),h=chunkXWSK4QRO_cjs.Ha(m.x+m.width/2,m.y+m.height/2).filter(e),A=h.indexOf(c);return A===-1?null:h[A+g]??null},l=c=>{let g=o(c,1);return g&&(n.push(c),n.length>chunkXWSK4QRO_cjs.L&&(n=n.slice(-chunkXWSK4QRO_cjs.L))),g},a=c=>{if(n.length>0){let g=n.pop();if(et(g))return g}return o(c,-1)},i=(c,g)=>{let m=Y=>{let D=Array.from(Y.children),q=g?D:D.reverse();for(let f of q)if(g){if(e(f))return f;let w=m(f);if(w)return w}else {let w=m(f);if(w)return w;if(e(f))return f}return null},h=Y=>g?Y.nextElementSibling:Y.previousElementSibling,A=null;if(g&&(A=m(c)),!A){let Y=c;for(;Y;){let D=h(Y);for(;D;){let f=m(D);if(f){A=f;break}if(e(D)){A=D;break}D=h(D);}if(A)break;let q=Y.parentElement;if(!g&&q&&e(q)){A=q;break}Y=q;}}return A};return {findNext:(c,g)=>{switch(c){case "ArrowUp":return l(g);case "ArrowDown":return a(g);case "ArrowRight":return i(g,true);case "ArrowLeft":return i(g,false);default:return null}},clearHistory:()=>{n=[];}}};var zc=e=>{let{metaKey:t,ctrlKey:n,shiftKey:o,altKey:l}=Rc(e.activationKey);return {metaKey:t,ctrlKey:n,shiftKey:o,altKey:l}},Vc=()=>{let e=new WeakSet,t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,"key"),n=false;if(t?.get&&!t.get.__reactGrabPatched){n=true;let l=t.get,a=function(){return e.has(this)?"":l.call(this)};a.__reactGrabPatched=true,Object.defineProperty(KeyboardEvent.prototype,"key",{get:a,configurable:true});}return {claimedEvents:e,originalKeyDescriptor:t,didPatch:n,restore:()=>{n&&t&&Object.defineProperty(KeyboardEvent.prototype,"key",t);}}};var Zs=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),Kc=(e,t)=>{let n=null,o=()=>{if(!t()){a();return}let d=e(),s=Zs(d.x,d.y);s.top&&window.scrollBy(0,-10),s.bottom&&window.scrollBy(0,10),s.left&&window.scrollBy(-10,0),s.right&&window.scrollBy(10,0),s.top||s.bottom||s.left||s.right?n=chunkXWSK4QRO_cjs.ia(o):n=null;},l=()=>{o();},a=()=>{n!==null&&(chunkXWSK4QRO_cjs.ja(n),n=null);};return {start:l,stop:a,isActive:()=>n!==null}};var Uc=()=>{let e=globalThis;return !!(e.chrome?.runtime?.id||e.browser?.runtime?.id)};var Wc=()=>{try{let e="0.1.24",t=`data:image/svg+xml;base64,${btoa(chunkXWSK4QRO_cjs.da)}`;console.log(`%cReact Grab${e?` v${e}`:""}%c
21
+ https://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${t}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,""),navigator.onLine&&e&&!Uc()&&fetch(`https://www.react-grab.com/api/version?source=browser&t=${Date.now()}`,{referrerPolicy:"origin",keepalive:!0,priority:"low",cache:"no-store"}).then(n=>n.text()).then(n=>{n&&n!==e&&console.warn(`[React Grab] v${e} is outdated (latest: v${n})`);}).catch(()=>null);}catch{}};var Gc=e=>{if("scheduler"in globalThis){globalThis.scheduler.postTask(e,{priority:"background"});return}if(typeof window<"u"&&"requestIdleCallback"in window){requestIdleCallback(e);return}setTimeout(e,0);};var jc=()=>{if(typeof window>"u")return null;try{let e=document.currentScript?.getAttribute("data-options");return e?JSON.parse(e):null}catch{return null}};var io=e=>e==="Enter"||e==="NumpadEnter";var Xc={name:"copy",setup:e=>{let t=false;return {hooks:{onElementSelect:n=>{if(t)return t=false,e.copyElement(n),true},onDeactivate:()=>{t=false;},cancelPendingToolbarActions:()=>{t=false;}},actions:[{id:"copy",label:"Copy",shortcut:"C",onAction:n=>{n.copy?.();}},{id:"copy-toolbar",label:"Copy element",shortcut:"C",target:"toolbar",onAction:()=>{t=true,e.activate();}}]}}};var Yc={name:"comment",setup:e=>({actions:[{id:"comment",label:"Comment",shortcut:"Enter",onAction:t=>{t.enterPromptMode?.();}},{id:"comment-toolbar",label:"Comment",shortcut:"Enter",target:"toolbar",onAction:()=>{e.comment();}}]})};var qc={name:"open",actions:[{id:"open",label:"Open",shortcut:"O",enabled:e=>!!e.filePath,onAction:e=>{if(!e.filePath)return;e.hooks.onOpenFile(e.filePath,e.lineNumber)||chunkXWSK4QRO_cjs.ya(e.filePath,e.lineNumber,e.hooks.transformOpenFileUrl),e.hideContextMenu(),e.cleanup();}}]};var Vo=(e,t)=>t?`${e}
22
+ ${t}`:e;var Zc={name:"copy-html",setup:(e,t)=>{let n=false;return {hooks:{onElementSelect:o=>{if(n)return n=false,Promise.all([t.transformHtmlContent(o.outerHTML,[o]),e.getStackContext(o)]).then(([l,a])=>{l&&jt(Vo(l,a));}).catch(()=>{}),true},onDeactivate:()=>{n=false;},cancelPendingToolbarActions:()=>{n=false;}},actions:[{id:"copy-html",label:"Copy HTML",onAction:async o=>{await o.performWithFeedback(async()=>{let l=o.elements.map(d=>d.outerHTML).join(`
23
+
24
+ `),a=await o.hooks.transformHtmlContent(l,o.elements);if(!a)return false;let i=await e.getStackContext(o.element);return jt(Vo(a,i),{componentName:o.componentName,tagName:o.tagName})});}},{id:"copy-html-toolbar",label:"Copy HTML",target:"toolbar",onAction:()=>{n=true,e.activate();}}]}}};var Jc={name:"copy-styles",setup:e=>{let t=false;return {hooks:{onElementSelect:n=>{if(!t)return;t=false;let o=chunkXWSK4QRO_cjs.Pa(n);return e.getStackContext(n).then(l=>{jt(Vo(o,l));}).catch(()=>{}),true},onDeactivate:()=>{t=false;},cancelPendingToolbarActions:()=>{t=false;}},actions:[{id:"copy-styles",label:"Copy styles",onAction:async n=>{await n.performWithFeedback(async()=>{let o=n.elements.map(chunkXWSK4QRO_cjs.Pa).join(`
25
+
26
+ `),l=await e.getStackContext(n.element);return jt(Vo(o,l),{componentName:n.componentName,tagName:n.tagName})});}},{id:"copy-styles-toolbar",label:"Copy styles",target:"toolbar",onAction:()=>{t=true,e.activate();}}],cleanup:chunkXWSK4QRO_cjs.Qa}}};var Qc="react-grab-history-items",eg=()=>{try{let e=sessionStorage.getItem(Qc);return e?JSON.parse(e).map(n=>({...n,elementsCount:Math.max(1,n.elementsCount??1),previewBounds:n.previewBounds??[],elementSelectors:n.elementSelectors??[]})):[]}catch{return []}},tg=e=>{let t=e;for(;t.length>0;){let n=JSON.stringify(t);if(new Blob([n]).size<=chunkXWSK4QRO_cjs.S)return t;t=t.slice(0,-1);}return t},Js=e=>{try{let t=tg(e);sessionStorage.setItem(Qc,JSON.stringify(t));}catch{}},Xt=eg(),ng=()=>`history-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,Qs=()=>Xt,ed=e=>(Xt=[{...e,id:ng()},...Xt].slice(0,chunkXWSK4QRO_cjs.R),Js(Xt),Xt),ea=e=>(Xt=Xt.filter(t=>t.id!==e),Js(Xt),Xt),td=()=>(Xt=[],Js(Xt),Xt);var pg=[Xc,Yc,Zc,Jc,qc],ta=false,jn=new Set,L1=e=>{if(typeof window>"u")return Ws();let t=jc(),n={enabled:true,activationMode:"toggle",keyHoldDuration:100,allowActivationInsideInput:true,maxContextLines:3,...t,...e};if(n.enabled===false||ta)return Ws();ta=true,Wc();let{enabled:o,...l}=n;return An(a=>{let i=Nc(l),d=()=>{for(let r of i.store.actions)if(r.agent?.provider)return r.agent},{store:s,actions:c}=zl({theme:ro,hasAgentProvider:!!d()?.provider,keyHoldDuration:i.store.options.keyHoldDuration??100}),g=oe(()=>s.current.state==="holding"),m=oe(()=>s.current.state==="active");pe(Be(m,(r,u)=>{r&&!u?(chunkXWSK4QRO_cjs.Ma(),chunkXWSK4QRO_cjs.Ca(),document.body.style.touchAction="none"):!r&&u&&(chunkXWSK4QRO_cjs.Na(),chunkXWSK4QRO_cjs.Da(),document.body.style.touchAction="");}));let h=oe(()=>s.current.state==="active"&&s.current.phase==="frozen"),A=oe(()=>s.current.state==="active"&&s.current.phase==="dragging"),Y=oe(()=>s.current.state==="active"&&s.current.phase==="justDragged"),D=oe(()=>s.current.state==="copying"),q=oe(()=>s.current.state==="justCopied"),f=oe(()=>s.current.state==="active"&&s.current.isPromptMode),w=oe(()=>s.pendingCommentMode||f()),x=oe(()=>s.current.state==="active"&&s.current.isPromptMode&&s.current.isPendingDismiss),y=oo(),[k,z]=L(y?.enabled??true),[ce,N]=L(0),[se,ae]=L(y),[le,G]=L(false),[te,C]=L(Qs()),[M,H]=L(null),[j,b]=L(null),[S,V]=L(null),$,Q=null,F=new Map,[Ee,Ce]=L(false),[_,R]=L(0),[Z,Te]=L(false),fe=[],Pe=r=>F.get(r)??[],de=r=>{let u=r.elementSelectors??[];if(u.length===0)return [];let p=[];for(let v of u)if(v)try{let E=document.querySelector(v);et(E)&&p.push(E);}catch{}return p},ve=r=>{let u=Pe(r.id),p=u.filter(I=>et(I));if(u.length>0&&p.length===u.length)return p;let E=de(r);return E.length>0?(F.set(r.id,E),E):p},Fe=r=>ve(r)[0],Le=oe(()=>{M();let r=new Set;for(let u of te())ve(u).length===0&&r.add(u.id);return r},void 0,{equals:(r,u)=>{if(r.size!==u.size)return false;for(let p of u)if(!r.has(p))return false;return true}}),ge=oe(()=>s.pendingAbortSessionId),Ae=oe(()=>s.hasAgentProvider),rt=()=>{rn!==null&&(clearTimeout(rn),rn=null);},dt=()=>{ao=false,Yt=false,Pt=null;};pe(()=>{if(s.current.state!=="holding"){rt();return}Pt=Date.now(),rn=window.setTimeout(()=>{if(rn=null,ao){Yt=true;return}c.activate();},s.keyHoldDuration),Me(rt);}),pe(()=>{if(s.current.state!=="active"||s.current.phase!=="justDragged")return;let r=setTimeout(()=>{c.finishJustDragged();},1500);Me(()=>clearTimeout(r));}),pe(()=>{if(s.current.state!=="justCopied")return;let r=setTimeout(()=>{c.finishJustCopied();},1500);Me(()=>clearTimeout(r));}),pe(Be(g,(r,u=false)=>{!u||r||!m()||(i.store.options.activationMode!=="hold"&&c.setWasActivatedByToggle(true),i.hooks.onActivate());}));let Ve=(r,u,p)=>{pn(r,u,p),c.clearInputText();},bt=()=>{let r=s.frozenElement||X();r&&c.enterPromptMode({x:s.pointer.x,y:s.pointer.y},r);},pn=(r,u,p)=>(c.setCopyStart({x:u,y:p},r),ze(r)),Bt=0,Ht=0,Ot=0,hn=0,yt=null,[_n,so]=L(null),Dt=(r,u)=>{yt!==null&&clearTimeout(yt),so(null),yt=window.setTimeout(()=>{so({x:r,y:u}),yt=null;},32);},st=null,rn=null,Pt=null,ao=false,Yt=false,lo=0,$e=false,qt=null,sn=null,Lt=0,Ft=0,zt=null,Vt=null,Kt=false,[qi,co]=L(null),[bn,Ko]=L(void 0),[Uo,_r]=L([]),[uo,Or]=L(null),[On,Dr]=L([]),[Wo,Dn]=L(0),an=Fc(chunkXWSK4QRO_cjs.Ga,ze),ln=Kc(()=>s.pointer,()=>A()),Tt=oe(()=>m()&&!D()),yn=oe(()=>i.store.theme.enabled&&i.store.theme.crosshair.enabled&&Tt()&&!A()&&!s.isTouchMode&&!h()&&!f()&&!le()&&s.contextMenuPosition===null),gt=new Map,Lr=(r,u)=>{let p=`grabbed-${Date.now()}-${Math.random()}`,v=Date.now(),E={id:p,bounds:r,createdAt:v,element:u};c.addGrabbedBox(E),i.hooks.onGrabbedBox(r,u);let I=window.setTimeout(()=>{gt.delete(p),c.removeGrabbedBox(p);},1500);gt.set(p,I);},Go=async r=>{let u=await Promise.all(r.map(async p=>{let v=await chunkXWSK4QRO_cjs.ra(p),E=null,I,ne,ie;if(v&&v.length>0)for(let we of v){let Ue=we.functionName&&chunkXWSK4QRO_cjs.qa(we.functionName),nt=we.fileName&&chunkXWSK4QRO_cjs.oa(we.fileName);if(Ue&&!E&&(E=we.functionName),nt&&!I&&(I=chunkXWSK4QRO_cjs.na(we.fileName),ne=we.lineNumber||void 0,ie=we.columnNumber||void 0),E&&I)break}E||(E=chunkXWSK4QRO_cjs.ua(p));let De=p instanceof HTMLElement?p.innerText?.slice(0,chunkXWSK4QRO_cjs.o):void 0;return {tagName:chunkXWSK4QRO_cjs.ha(p),id:p.id||void 0,className:p.getAttribute("class")||void 0,textContent:De,componentName:E??void 0,filePath:I,lineNumber:ne,columnNumber:ie}}));window.dispatchEvent(new CustomEvent("react-grab:element-selected",{detail:{elements:u}}));},wt=(r,u,p,v,E)=>{c.clearLabelInstances();let I=`label-${Date.now()}-${Math.random().toString(36).slice(2)}`,ne=r.x+r.width/2,ie=r.width/2,De=E?.mouseX,we=De!==void 0?De-ne:void 0,Ue={id:I,bounds:r,boundsMultiple:E?.boundsMultiple,tagName:u,componentName:p,status:v,createdAt:Date.now(),element:E?.element,elements:E?.elements,mouseX:De,mouseXOffsetFromCenter:we,mouseXOffsetRatio:we!==void 0&&ie>0?we/ie:void 0,hideArrow:E?.hideArrow};return c.addLabelInstance(Ue),I},Ln=r=>{Ut.delete(r),c.removeLabelInstance(r);},Ut=new Map,wn=r=>{let u=Ut.get(r);u!==void 0&&(window.clearTimeout(u),Ut.delete(r));},Zt=r=>{wn(r);let u=window.setTimeout(()=>{Ut.delete(r),c.updateLabelInstance(r,"fading"),setTimeout(()=>{Ln(r);},150);},1500);Ut.set(r,u);},Zi=(r,u)=>{if(u)wn(r);else {let p=s.labelInstances.find(v=>v.id===r);p&&p.status==="copied"&&Zt(r);}},Ji=async({positionX:r,operation:u,bounds:p,tagName:v,componentName:E,element:I,shouldDeactivateAfter:ne,elements:ie,existingInstanceId:De})=>{$e=false,s.current.state!=="copying"&&c.startCopy();let we=De??null;!we&&p&&v&&(we=wt(p,v,E,"copying",{element:I,mouseX:r,elements:ie}));let Ue=false,nt;try{await u(),Ue=!0;}catch(ct){nt=ct instanceof Error&&ct.message?ct.message:"Action failed";}we&&(Ue?c.updateLabelInstance(we,"copied"):c.updateLabelInstance(we,"error",nt||"Unknown error"),Zt(we)),s.current.state==="copying"&&(Ue&&c.completeCopy(I),ne?Qe():Ue?(c.activate(),$e=true,qt!==null&&window.clearTimeout(qt),qt=window.setTimeout(()=>{$e=false,qt=null;},1500)):c.unfreeze());},jo=(r,u,p)=>{let v=r[0],E=p??(v?chunkXWSK4QRO_cjs.ua(v):null),I=v?chunkXWSK4QRO_cjs.ha(v):null,ne=E??I??void 0;return _c({maxContextLines:i.store.options.maxContextLines,getContent:i.store.options.getContent,componentName:ne},{onBeforeCopy:i.hooks.onBeforeCopy,transformSnippet:i.hooks.transformSnippet,transformCopyContent:i.hooks.transformCopyContent,onAfterCopy:i.hooks.onAfterCopy,onCopySuccess:(ie,De)=>{i.hooks.onCopySuccess(ie,De);let we=ie.length>0,Ue=!!u;if(we){let St=te();for(let[dn,un]of F.entries()){if(!(un.length===ie.length&&un.every((ds,jd)=>ds===ie[jd])))continue;let Nn=St.find(ds=>ds.id===dn);if(!Nn)continue;if(Ue?Nn.isComment&&Nn.commentText===u:!Nn.isComment){ea(dn),F.delete(dn);break}}}let nt=ie.map((St,dn)=>chunkXWSK4QRO_cjs.Oa(St,dn===0)),ct=ed({content:De,elementName:ne??"element",tagName:I??"div",componentName:E??void 0,elementsCount:ie.length,previewBounds:ie.map(St=>ze(St)),elementSelectors:nt,isComment:Ue,commentText:u??void 0,timestamp:Date.now()});C(ct),Ce(true),R(St=>St+1);let Rt=ct[0];Rt&&we&&F.set(Rt.id,[...ie]);let or=new Set(ct.map(St=>St.id));for(let St of F.keys())or.has(St)||F.delete(St);},onCopyError:i.hooks.onCopyError},r,u)},P=async(r,u,p)=>{if(r.length===0)return;let v=[],E=[];for(let I of r){let{wasIntercepted:ne,pendingResult:ie}=i.hooks.onElementSelect(I);ne||v.push(I),ie&&E.push(ie),i.store.theme.grabbedBoxes.enabled&&Lr(ze(I),I);}if(await chunkXWSK4QRO_cjs.ka(),v.length>0)await jo(v,u,p);else if(E.length>0&&!(await Promise.all(E)).every(Boolean))throw new Error("Failed to copy");Go(r);},K=({element:r,positionX:u,elements:p,extraPrompt:v,shouldDeactivateAfter:E,onComplete:I,dragRect:ne})=>{let ie=p??[r],De=ne??s.frozenDragRect,we;De&&ie.length>1?we=Ni(De):we=Bi(ze(r));let Ue=ie.length>1?we.x+we.width/2:u,nt=chunkXWSK4QRO_cjs.ha(r);$e=false,c.startCopy();let ct=nt?wt(we,nt,void 0,"copying",{element:r,mouseX:Ue,elements:p}):null;chunkXWSK4QRO_cjs.sa(r).then(Rt=>{Ji({positionX:Ue,operation:()=>P(ie,v,Rt??void 0),bounds:we,tagName:nt,componentName:Rt??void 0,element:r,shouldDeactivateAfter:E,elements:p,existingInstanceId:ct}).then(()=>{I?.();});});},X=oe(()=>{if(s.viewportVersion,!Tt()||A())return null;let r=s.detectedElement;return et(r)?r:null}),ee=oe(()=>s.frozenElement||(h()?null:X()));pe(()=>{let r=s.detectedElement;if(!r)return;let u=setInterval(()=>{et(r)||c.setDetectedElement(null);},100);Me(()=>clearInterval(u));}),pe(Be(ee,r=>{if(zt!==null&&(clearTimeout(zt),zt=null),!r){co(null);return}zt=window.setTimeout(()=>{zt=null,co(r);},100);})),Me(()=>{zt!==null&&(clearTimeout(zt),zt=null);}),pe(()=>{let r=s.frozenElements,u=chunkXWSK4QRO_cjs.Ba(r);Me(u);}),pe(Be(m,r=>{if(!r||!i.store.options.freezeReactUpdates)return;let u=chunkXWSK4QRO_cjs.za();Me(u);}));let be=()=>{if(s.isTouchMode&&A()){let u=s.detectedElement;return !u||chunkXWSK4QRO_cjs.Ea(u)?void 0:u}let r=ee();if(!(!r||chunkXWSK4QRO_cjs.Ea(r)))return r},ye=oe(()=>be()),ue=()=>ye()?s.isTouchMode&&A()?Tt():Tt()&&!A():false,Re=oe(()=>{s.viewportVersion;let r=s.frozenElements;if(r.length===0)return [];let u=s.frozenDragRect;return u&&r.length>1?[Ni(u)]:r.filter(p=>p!==null).map(p=>ze(p))}),ke=oe(()=>{s.viewportVersion;let r=s.frozenElements;if(r.length>0){let p=Re();if(r.length===1){let E=p[0];if(E)return E}let v=s.frozenDragRect;return v?p[0]??Ni(v):Bi(js(p))}let u=ye();if(u)return ze(u)}),Ke=oe(()=>s.frozenElements.length),Xe=(r,u)=>{let p=r+window.scrollX,v=u+window.scrollY;return {x:Math.abs(p-s.dragStart.x),y:Math.abs(v-s.dragStart.y)}},tt=oe(()=>{if(!A())return false;let r=Xe(s.pointer.x,s.pointer.y);return r.x>2||r.y>2}),Oe=(r,u)=>{let p=r+window.scrollX,v=u+window.scrollY,E=Math.min(s.dragStart.x,p),I=Math.min(s.dragStart.y,v),ne=Math.abs(p-s.dragStart.x),ie=Math.abs(v-s.dragStart.y);return {x:E-window.scrollX,y:I-window.scrollY,width:ne,height:ie}},ut=oe(()=>{if(s.viewportVersion,!tt())return;let r=Oe(s.pointer.x,s.pointer.y);return {borderRadius:"0px",height:r.height,transform:"none",width:r.width,x:r.x,y:r.y}}),at=oe(()=>{if(s.viewportVersion,!tt())return [];let r=_n();if(!r)return [];let u=Oe(r.x,r.y),p=Mr(u,chunkXWSK4QRO_cjs.Ga);return (p.length>0?p:Mr(u,chunkXWSK4QRO_cjs.Ga,false)).map(E=>ze(E))}),kt=oe(()=>{let r=at();return r.length>0?r:Re()}),cn=oe(()=>{if(D()||f()){s.viewportVersion;let r=s.frozenElement||X();if(r){let u=ze(r);return {x:Tn(u).x+s.copyOffsetFromCenterX,y:s.copyStart.y}}return {x:s.copyStart.x,y:s.copyStart.y}}return {x:s.pointer.x,y:s.pointer.y}});pe(Be(()=>[X(),s.lastGrabbedElement],([r,u])=>{u&&r&&u!==r&&c.setLastGrabbed(null),r&&i.hooks.onElementHover(r);})),pe(Be(()=>X(),r=>{let u=++Lt,p=()=>{Lt===u&&c.setSelectionSource(null,null);};if(!r){p();return}chunkXWSK4QRO_cjs.ra(r).then(v=>{if(Lt===u&&v){for(let E of v)if(E.fileName&&chunkXWSK4QRO_cjs.oa(E.fileName)){c.setSelectionSource(chunkXWSK4QRO_cjs.na(E.fileName),E.lineNumber??null);return}p();}}).catch(()=>{Lt===u&&c.setSelectionSource(null,null);});})),pe(Be(()=>s.viewportVersion,()=>qe._internal.updateBoundsOnViewportChange()));let xn=oe(()=>s.grabbedBoxes.map(r=>({id:r.id,bounds:r.bounds,createdAt:r.createdAt}))),Rr=oe(()=>s.labelInstances.map(r=>({id:r.id,status:r.status,tagName:r.tagName,componentName:r.componentName,createdAt:r.createdAt}))),vn=oe(()=>{let r=m(),u=A(),p=D(),v=f(),E=yn(),I=X(),ne=ut(),ie=i.store.theme.enabled,De=i.store.theme.selectionBox.enabled,we=i.store.theme.dragBox.enabled,Ue=tt(),nt=ee(),ct=q(),Rt=!!(ie&&De&&r&&!p&&!ct&&!u&&nt!=null);return {isActive:r,isDragging:u,isCopying:p,isPromptMode:v,isCrosshairVisible:E??false,isSelectionBoxVisible:Rt,isDragBoxVisible:!!(ie&&we&&r&&!p&&Ue),targetElement:I,dragBounds:ne?{x:ne.x,y:ne.y,width:ne.width,height:ne.height}:null,grabbedBoxes:xn(),labelInstances:Rr(),selectionFilePath:s.selectionFilePath,toolbarState:se()}});pe(Be(vn,r=>{i.hooks.onStateChange(r);})),pe(Be(()=>[f(),s.pointer.x,s.pointer.y,X()],([r,u,p,v])=>{i.hooks.onPromptModeChange(r,{x:u,y:p,targetElement:v});})),pe(Be(()=>[rs(),ke(),X()],([r,u,p])=>{i.hooks.onSelectionBox(!!r,u??null,p);})),pe(Be(()=>[is(),ut()],([r,u])=>{i.hooks.onDragBox(!!r,u??null);})),pe(Be(()=>[yn(),s.pointer.x,s.pointer.y],([r,u,p])=>{i.hooks.onCrosshair(!!r,{x:u,y:p});})),pe(Be(()=>[Md(),kd(),cn(),X(),s.selectionFilePath,s.selectionLineNumber],([r,u,p,v,E,I])=>{i.hooks.onElementLabel(!!r,u,{x:p.x,y:p.y,content:"",element:v??void 0,tagName:v&&chunkXWSK4QRO_cjs.ha(v)||void 0,filePath:E??void 0,lineNumber:I??void 0});}));let Jt=null,fo=r=>{r?(Jt||(Jt=document.createElement("style"),Jt.setAttribute("data-react-grab-cursor",""),document.head.appendChild(Jt)),Jt.textContent=`* { cursor: ${r} !important; }`):Jt&&(Jt.remove(),Jt=null);};pe(Be(()=>[m(),D(),f()],([r,u,p])=>{fo(u?"progress":r&&!p?"crosshair":null);}));let Qt=()=>{let r=g();c.activate(),r||i.hooks.onActivate();},$r=()=>{qt!==null&&(window.clearTimeout(qt),qt=null),$e=false;},Qe=()=>{let r=A(),u=s.previouslyFocusedElement;c.deactivate(),Jo(),Vt=null,Kt=false,r&&(document.body.style.userSelect=""),st&&window.clearTimeout(st),ln.stop(),u instanceof HTMLElement&&et(u)&&u.focus(),i.hooks.onDeactivate();},Xo=()=>{g()&&c.release(),m()&&Qe(),$r();},U=()=>{c.setWasActivatedByToggle(true),Qt();},Xn=(r,u,p)=>{let v=u[0];if(et(v)){let E=v.getBoundingClientRect(),I=E.top+E.height/2;c.setPointer({x:r.position.x,y:I}),c.setFrozenElements(u),c.setInputText(r.context.prompt),c.setWasActivatedByToggle(true),p&&c.setSelectedAgent(p),m()||Qt();}},Rn=r=>({...r,onAbort:(u,p)=>{r.onAbort?.(u,p),Xn(u,p,r);},onUndo:(u,p)=>{r.onUndo?.(u,p),Xn(u,p,r);}}),mo=()=>{let r=d();if(r)return Rn(r)},qe=qs(mo(),{transformAgentContext:i.hooks.transformAgentContext}),Yo=()=>{c.clearLastCopied();let r=[...s.frozenElements],u=s.frozenElement||X(),p=f()?s.inputText.trim():"";if(!u){Qe();return}let v=r.length>0?r:u?[u]:[],E=v.map(we=>ze(we)),I=E[0],ne=I.x+I.width/2,ie=I.y+I.height/2,De=ne+s.copyOffsetFromCenterX;if((s.selectedAgent||Ae())&&p){let we=s.replySessionId,Ue=s.selectedAgent;Qe(),c.clearReplySessionId(),c.setSelectedAgent(null),qe.session.start({elements:v,prompt:p,position:{x:De,y:ie},selectionBounds:E,sessionId:we??void 0,agent:Ue?Rn(Ue):void 0});return}c.setPointer({x:ne,y:ie}),c.exitPromptMode(),c.clearInputText(),c.clearReplySessionId(),K({element:u,positionX:De,elements:v,extraPrompt:p||void 0,onComplete:Qe});},Yn=()=>{if(c.clearLastCopied(),!f())return;if(s.inputText.trim()&&!x()){c.setPendingDismiss(true);return}c.clearInputText(),c.clearReplySessionId(),Qe();},Nr=()=>{c.clearInputText(),c.clearReplySessionId(),Qe();},Br=()=>{c.setPendingDismiss(false);},Hr=(r,u)=>{c.setPendingAbortSessionId(null),u&&qe.session.abort(r);},Fr=()=>{let r=s.frozenElement||X();r&&Ve(r,s.pointer.x,s.pointer.y),bt();},zr=(r,u)=>{let p=qe.sessions().get(r),v=qe.session.getElements(r),E=p?.selectionBounds??[],I=E[0];if(p&&v.length>0&&I){let ne=p.position.x,ie=p.context.sessionId??r;qe.session.dismiss(r),qe.session.start({elements:v,prompt:u,position:{x:ne,y:I.y+I.height/2},selectionBounds:E,sessionId:ie});}},Vr=r=>{let u=qe.session.acknowledgeError(r);u&&c.setInputText(u);},Kr=()=>{m()?Qe():k()&&(Kt=true,U());},qo=(r,u,p)=>{c.setPendingCommentMode(false),c.clearInputText(),c.enterPromptMode({x:u,y:p},r);},go=(r,u)=>{c.showContextMenu(u,r),Jo(),pa(),i.hooks.onContextMenu(r,u);},Ur=()=>{if(!k())return;if(m()&&w()){Qe();return}c.setPendingCommentMode(true),m()||U();},Wr=()=>{let r=!k();z(r);let u=oo(),p={edge:u?.edge??"bottom",ratio:u?.ratio??.5,collapsed:u?.collapsed??false,enabled:r};Er(p),ae(p),jn.forEach(v=>v(p)),r||(Xo(),pa());},Gr=(r,u)=>{if(!k()||f()||h()||s.contextMenuPosition!==null)return;c.setPointer({x:r,y:u}),Ot=r,hn=u;let p=performance.now(),v=Ht>0&&p-Ht<200;if(p-Bt>=32&&!v&&(Bt=p,Ht=p,Gc(()=>{let E=chunkXWSK4QRO_cjs.Ia(Ot,hn);E!==s.detectedElement&&c.setDetectedElement(E),Ht=0;})),A()){Dt(r,u);let E=Zs(r,u),I=E.top||E.bottom||E.left||E.right;I&&!ln.isActive()?ln.start():!I&&ln.isActive()&&ln.stop();}},jr=(r,u)=>!Tt()||D()?false:(c.startDrag({x:r,y:u}),c.setPointer({x:r,y:u}),document.body.style.userSelect="none",Dt(r,u),i.hooks.onDragStart(r+window.scrollX,u+window.scrollY),true),Xr=(r,u)=>{let p=Mr(r,chunkXWSK4QRO_cjs.Ga),v=p.length>0?p:Mr(r,chunkXWSK4QRO_cjs.Ga,false);if(v.length===0)return;chunkXWSK4QRO_cjs.Aa(v),i.hooks.onDragEnd(v,r);let E=v[0],I=Tn(ze(E));c.setPointer(I),c.setFrozenElements(v);let ne=Gs(r);if(c.setFrozenDragRect(ne),c.freeze(),c.setLastGrabbed(E),s.pendingCommentMode){qo(E,I.x,I.y);return}if(Kt){Kt=false,go(E,I);return}let ie=s.wasActivatedByToggle&&!u;K({element:E,positionX:I.x,elements:v,shouldDeactivateAfter:ie,dragRect:ne});},Yr=(r,u,p)=>{let v=et(s.frozenElement)?s.frozenElement:null,E=et(Vt)?Vt:null,I=v??E??chunkXWSK4QRO_cjs.Ia(r,u)??(et(s.detectedElement)?s.detectedElement:null);if(!I)return;let ne=!v&&E===I,ie,De;if(v)ie=s.pointer.x,De=s.pointer.y;else if(ne){let Ue=Tn(ze(I));ie=Ue.x,De=Ue.y;}else ie=r,De=u;if(Vt=null,s.pendingCommentMode){qo(I,ie,De);return}if(Kt){Kt=false;let{wasIntercepted:Ue}=i.hooks.onElementSelect(I);if(Ue)return;chunkXWSK4QRO_cjs.Aa([I]),c.setFrozenElement(I);let nt={x:ie,y:De};c.setPointer(nt),c.freeze(),go(I,nt);return}let we=s.wasActivatedByToggle&&!p;c.setLastGrabbed(I),K({element:I,positionX:ie,shouldDeactivateAfter:we});},Zo=()=>{A()&&(c.cancelDrag(),ln.stop(),document.body.style.userSelect="");},rd=(r,u,p)=>{if(!A())return;yt!==null&&(clearTimeout(yt),yt=null),so(null);let v=Xe(r,u),E=v.x>2||v.y>2,I=E?Oe(r,u):null;E?c.endDrag():c.cancelDrag(),ln.stop(),document.body.style.userSelect="",I?Xr(I,p):Yr(r,u,p);},lt=Mc(),qr=Vc(),po=r=>{let u;try{u=qr.originalKeyDescriptor?.get?qr.originalKeyDescriptor.get.call(r):r.key;}catch{return false}let p=u==="Enter"||io(r.code),v=m()||g();return p&&v&&!f()&&!s.wasActivatedByToggle&&S()===null?(qr.claimedEvents.add(r),r.preventDefault(),r.stopImmediatePropagation(),true):false};lt.addDocumentListener("keydown",po,{capture:true}),lt.addDocumentListener("keyup",po,{capture:true}),lt.addDocumentListener("keypress",po,{capture:true});let id=r=>{if(!(r.code==="KeyZ"&&(r.metaKey||r.ctrlKey))||Array.from(qe.sessions().values()).some(E=>!E.isStreaming&&!E.error))return false;let v=r.shiftKey;return v&&qe.canRedo()?(r.preventDefault(),r.stopPropagation(),qe.history.redo(),true):!v&&qe.canUndo()?(r.preventDefault(),r.stopPropagation(),qe.history.undo(),true):false},Jo=()=>{Dr([]),Dn(0),an.clearHistory();},Qi=r=>{c.setFrozenElement(r),c.freeze(),Vt=r;let u=ze(r),p=Tn(u);c.setPointer(p),s.contextMenuPosition!==null&&c.showContextMenu(p,r);},na=r=>{let u=ze(r),p=chunkXWSK4QRO_cjs.Ha(u.x+u.width/2,u.y+u.height/2).filter(chunkXWSK4QRO_cjs.Ga).reverse();Dr(p),Dn(Math.max(0,p.indexOf(r)));},sd=r=>{let u=On()[r];u&&(Dn(r),an.clearHistory(),Qi(u));},oa=r=>{if(!m()||f()||!chunkXWSK4QRO_cjs.q.has(r.key))return false;let u=ee(),p=!u;if(u||(u=chunkXWSK4QRO_cjs.Ia(window.innerWidth/2,window.innerHeight/2)),!u)return false;if(!(r.key==="ArrowUp"||r.key==="ArrowDown")){Jo();let ie=an.findNext(r.key,u);return !ie&&!p?false:(r.preventDefault(),r.stopPropagation(),Qi(ie??u),true)}On().length===0&&na(u);let I=an.findNext(r.key,u)??u;r.preventDefault(),r.stopPropagation(),Qi(I);let ne=On().indexOf(I);return ne!==-1?Dn(ne):na(I),true},ad=r=>{if(!io(r.code)||Ct(r))return false;let u=s.lastCopiedElement;if(!g()&&!f()&&!m()&&u&&et(u)&&!s.labelInstances.some(E=>E.status==="copied"||E.status==="fading")){r.preventDefault(),r.stopImmediatePropagation();let E=Tn(ze(u));return c.setPointer(E),Ve(u,E.x,E.y),c.setFrozenElement(u),c.clearLastCopied(),bt(),m()||Qt(),true}if(g()&&!f()){r.preventDefault(),r.stopImmediatePropagation();let E=s.frozenElement||X();return E&&Ve(E,s.pointer.x,s.pointer.y),c.setPointer({x:s.pointer.x,y:s.pointer.y}),E&&c.setFrozenElement(E),bt(),st!==null&&(window.clearTimeout(st),st=null),m()||Qt(),true}return false},ld=r=>{if(r.key?.toLowerCase()!=="o"||f()||!m()||!(r.metaKey||r.ctrlKey))return false;let u=s.selectionFilePath,p=s.selectionLineNumber;return u?(r.preventDefault(),r.stopPropagation(),i.hooks.onOpenFile(u,p??void 0)||chunkXWSK4QRO_cjs.ya(u,p??void 0,i.hooks.transformOpenFileUrl),true):false},ra=()=>{sn!==null&&(window.clearTimeout(sn),sn=null);},ho=()=>{ra(),_r([]),Or(null);},ia=oe(()=>!!ye()&&Tt()&&!f()&&!A()&&s.contextMenuPosition===null),cd=oe(()=>({items:Uo(),activeIndex:uo(),isVisible:uo()!==null&&Uo().length>0})),dd=oe(()=>On().map(r=>({tagName:chunkXWSK4QRO_cjs.ha(r)||"element",componentName:chunkXWSK4QRO_cjs.ua(r)??void 0}))),ud=oe(()=>({items:dd(),activeIndex:Wo(),isVisible:On().length>0}));pe(Be(ye,()=>{ho();})),pe(Be(ia,r=>{r||ho();}));let fd=r=>i.store.actions.find(u=>u.id===r),md=()=>{let r=ye();if(!r)return;let u=ke();return fa({element:r,filePath:s.selectionFilePath??void 0,lineNumber:s.selectionLineNumber??void 0,tagName:chunkXWSK4QRO_cjs.ha(r)||void 0,componentName:bn(),position:s.pointer,performWithFeedbackOptions:{fallbackBounds:u,fallbackSelectionBounds:u?[u]:[]},shouldDeferHideContextMenu:false,onBeforePrompt:ho})},gd=oe(()=>{if(!ye())return [];let r=[];for(let u of i.store.actions)typeof u.enabled=="boolean"&&!u.enabled||r.push({id:u.id,label:u.label,shortcut:u.shortcut});return r}),pd=()=>{ra(),sn=window.setTimeout(()=>{sn=null;let r=uo(),u=Uo();if(r===null||u.length===0)return;let p=u[r];if(!p)return;let v=fd(p.id);if(!v){ho();return}let E=md();if(!E||!Pr(v,E)){ho();return}ho();v.onAction(E);},600);},hd=()=>{if(!ia())return false;let r=gd();if(r.length===0)return false;_r(r);let u=uo(),v=u!==null&&u<r.length?(u+1)%r.length:0;return Or(v),pd(),true},bd=r=>r.code!=="KeyC"||r.altKey||r.repeat||Ct(r)||!hd()?false:(r.preventDefault(),r.stopPropagation(),(r.metaKey||r.ctrlKey)&&r.stopImmediatePropagation(),true),yd=r=>{if(!(!i.store.options.allowActivationInsideInput&&Ct(r))&&!(!zi(r,i.store.options)&&((r.metaKey||r.ctrlKey)&&!chunkXWSK4QRO_cjs.p.includes(r.key)&&!io(r.code)&&(m()&&!s.wasActivatedByToggle?Qe():g()&&(rt(),dt(),c.release())),!io(r.code)||!g()))){if((m()||g())&&!f()&&(r.preventDefault(),io(r.code)&&r.stopImmediatePropagation()),m()){if(s.wasActivatedByToggle&&i.store.options.activationMode!=="hold"||r.repeat)return;st!==null&&window.clearTimeout(st),st=window.setTimeout(()=>{Qe();},200);return}if(g()&&r.repeat){if(ao){let u=Yt;dt(),u&&c.activate();}return}if(!(D()||q())&&!g()){let p=i.store.options.keyHoldDuration??100;Ct(r)?Vl(r)?p+=600:p+=400:Kl()&&(p+=600),dt(),c.startHold(p);}}};lt.addWindowListener("keydown",r=>{if(po(r),!k()){zi(r,i.store.options)&&!r.repeat&&N(I=>I+1);return}if(id(r))return;let u=io(r.code)&&g()&&!f(),p=At(r,"data-react-grab-input");if(f()&&zi(r,i.store.options)&&!r.repeat&&!p){r.preventDefault(),r.stopPropagation(),Yn();return}if(r.key==="Escape"&&S()!==null)return;if(r.key==="Escape"&&M()!==null){en();return}if(j()!==null){if(r.key==="Escape"){Zn();return}let I=i.store.toolbarActions,ne=(r.metaKey||r.ctrlKey)&&!r.repeat,ie=I.find(De=>De.shortcut?r.key==="Enter"?De.shortcut==="Enter":ne&&r.key.toLowerCase()===De.shortcut.toLowerCase():false);ie&&Tr(ie)&&(r.preventDefault(),r.stopPropagation(),ie.onAction(),Zn());return}let v=At(r,"data-react-grab-ignore-events")&&!u;if(f()||v)return r.key==="Escape"&&(ge()?(r.preventDefault(),r.stopPropagation(),c.setPendingAbortSessionId(null)):f()?Yn():s.wasActivatedByToggle&&Qe()),v&&chunkXWSK4QRO_cjs.q.has(r.key)&&oa(r),void 0;if(r.key==="Escape"){if(ge()){r.preventDefault(),r.stopPropagation(),c.setPendingAbortSessionId(null);return}if(qe.isProcessing())return;if(g()||s.wasActivatedByToggle){Qe();return}}let E=Date.now()-lo<200;!E&&bd(r)||oa(r)||ad(r)||ld(r)||E||yd(r);},{capture:true}),lt.addWindowListener("keyup",r=>{if(po(r))return;let u=zc(i.store.options),p=u.metaKey||u.ctrlKey?Mn()?!r.metaKey:!r.ctrlKey:u.shiftKey&&!r.shiftKey||u.altKey&&!r.altKey,v=i.store.options.activationKey?typeof i.store.options.activationKey=="function"?i.store.options.activationKey(r):Fi(i.store.options.activationKey)(r):Hi(r.key,r.code);if(q()||$e){(v||p)&&($e=false,Qe());return}if(!g()&&!m()||f())return;let E=!!i.store.options.activationKey,I=i.store.options.activationMode==="hold";if(m()){let ne=s.contextMenuPosition!==null;if(p){if(s.wasActivatedByToggle&&i.store.options.activationMode!=="hold"||ne)return;Qe();}else if(I&&v){if(st!==null&&(window.clearTimeout(st),st=null),ne)return;Qe();}else !E&&v&&st!==null&&(window.clearTimeout(st),st=null);return}if(v||p){if(s.wasActivatedByToggle&&i.store.options.activationMode!=="hold")return;if(g()||Yt&&p){rt();let De=(Pt?Date.now()-Pt:0)>=200,we=Yt&&De&&(i.store.options.allowActivationInsideInput||!Ct(r));dt(),we?c.activate():c.release();}else Qe();}},{capture:true}),lt.addDocumentListener("copy",()=>{g()&&(ao=true);}),lt.addWindowListener("keypress",po,{capture:true}),lt.addWindowListener("pointermove",r=>{if(!r.isPrimary)return;let u=r.pointerType==="touch";if(c.setTouchMode(u),At(r,"data-react-grab-ignore-events")||s.contextMenuPosition!==null||u&&!g()&&!m())return;(u?g():m())&&!f()&&h()&&(c.unfreeze(),Jo()),Gr(r.clientX,r.clientY);},{passive:true}),lt.addWindowListener("pointerdown",r=>{if(r.button!==0||!r.isPrimary||(c.setTouchMode(r.pointerType==="touch"),At(r,"data-react-grab-ignore-events"))||s.contextMenuPosition!==null||j()!==null)return;if(f()){let p=ke();p&&r.clientX>=p.x&&r.clientX<=p.x+p.width&&r.clientY>=p.y&&r.clientY<=p.y+p.height?Yo():Yn();return}jr(r.clientX,r.clientY)&&(document.documentElement.setPointerCapture(r.pointerId),r.preventDefault(),r.stopImmediatePropagation());},{capture:true}),lt.addWindowListener("pointerup",r=>{if(r.button!==0||!r.isPrimary||At(r,"data-react-grab-ignore-events")||s.contextMenuPosition!==null)return;let u=Tt()||D()||A(),p=r.metaKey||r.ctrlKey;rd(r.clientX,r.clientY,p),u&&(r.preventDefault(),r.stopImmediatePropagation());},{capture:true}),lt.addWindowListener("contextmenu",r=>{if(!Tt()||D()||f())return;let u=At(r,"data-react-grab-ignore-events");if(u&&On().length>0)Jo();else if(u)return;if(s.contextMenuPosition!==null){r.preventDefault();return}r.preventDefault(),r.stopPropagation();let p=chunkXWSK4QRO_cjs.Ia(r.clientX,r.clientY);if(!p)return;let v=s.frozenElements;v.length>1&&v.includes(p)?chunkXWSK4QRO_cjs.Aa(v):(chunkXWSK4QRO_cjs.Aa([p]),c.setFrozenElement(p));let I={x:r.clientX,y:r.clientY};c.setPointer(I),c.freeze(),go(p,I);},{capture:true}),lt.addWindowListener("pointercancel",r=>{r.isPrimary&&Zo();}),lt.addWindowListener("click",r=>{At(r,"data-react-grab-ignore-events")||s.contextMenuPosition===null&&(Tt()||D()||Y())&&(r.preventDefault(),r.stopImmediatePropagation(),s.wasActivatedByToggle&&!D()&&!f()&&(g()?c.setWasActivatedByToggle(false):Qe()));},{capture:true}),lt.addDocumentListener("visibilitychange",()=>{if(document.hidden){c.clearGrabbedBoxes();let r=s.activationTimestamp;m()&&!f()&&r!==null&&Date.now()-r>500&&Qe();}}),lt.addWindowListener("blur",()=>{Zo(),g()&&(rt(),c.release(),dt());}),lt.addWindowListener("focus",()=>{lo=Date.now();});let wd=()=>{if(!(s.isTouchMode&&!g()&&!m())&&k()&&!f()&&!h()&&!A()&&s.contextMenuPosition===null&&s.frozenElements.length===0){let r=chunkXWSK4QRO_cjs.Ia(s.pointer.x,s.pointer.y);c.setDetectedElement(r);}},Zr=()=>{Oc(),wd(),c.incrementViewportVersion(),c.updateSessionBounds(),c.updateContextMenuPosition();};lt.addWindowListener("scroll",Zr,{capture:true});let es=window.innerWidth,ts=window.innerHeight;lt.addWindowListener("resize",()=>{let r=window.innerWidth,u=window.innerHeight;if(es>0&&ts>0){let p=r/es,v=u/ts,E=Math.abs(p-v)<chunkXWSK4QRO_cjs.P,I=Math.abs(p-1)>chunkXWSK4QRO_cjs.P;E&&I&&c.setPointer({x:s.pointer.x*p,y:s.pointer.y*v});}es=r,ts=u,Zr();});let ns=window.visualViewport;if(ns){let{signal:r}=lt;ns.addEventListener("resize",Zr,{signal:r}),ns.addEventListener("scroll",Zr,{signal:r});}let qn=null,$n=null,xd=()=>{let r=i.store.theme.enabled&&(m()||D()||s.labelInstances.length>0||s.grabbedBoxes.length>0||qe.sessions().size>0);r&&qn===null?qn=window.setInterval(()=>{$n===null&&($n=chunkXWSK4QRO_cjs.ia(()=>{$n=null,c.incrementViewportVersion(),c.updateSessionBounds();}));},100):!r&&qn!==null&&(window.clearInterval(qn),qn=null,$n!==null&&(chunkXWSK4QRO_cjs.ja($n),$n=null));};pe(()=>{i.store.theme.enabled,m(),D(),s.labelInstances.length,s.grabbedBoxes.length,qe.sessions().size,xd();}),Me(()=>{qn!==null&&window.clearInterval(qn),$n!==null&&chunkXWSK4QRO_cjs.ja($n);}),lt.addDocumentListener("copy",r=>{f()||At(r,"data-react-grab-ignore-events")||(Tt()||D())&&r.preventDefault();},{capture:true}),Me(()=>{lt.abort(),yt!==null&&window.clearTimeout(yt),st&&window.clearTimeout(st),qt&&window.clearTimeout(qt),sn&&window.clearTimeout(sn),Q!==null&&chunkXWSK4QRO_cjs.ja(Q),gt.forEach(r=>window.clearTimeout(r)),gt.clear(),ln.stop(),document.body.style.userSelect="",document.body.style.touchAction="",fo(null),qr.restore();});let os=Wl(Il),Qo=oe(()=>i.store.theme.enabled),vd=oe(()=>i.store.theme.selectionBox.enabled),sa=oe(()=>i.store.theme.elementLabel.enabled),Cd=oe(()=>i.store.theme.dragBox.enabled),aa=oe(()=>q()||le()&&!h()),Sd=oe(()=>at().length>0),rs=oe(()=>!Qo()||!vd()||aa()?false:Sd()?true:ue()),Ed=oe(()=>{let r=ye();if(r)return chunkXWSK4QRO_cjs.ha(r)||void 0});pe(Be(()=>qi(),r=>{let u=++Ft;if(!r){Ko(void 0);return}chunkXWSK4QRO_cjs.sa(r).then(p=>{Ft===u&&Ko(p??void 0);}).catch(()=>{Ft===u&&Ko(void 0);});}));let Ad=oe(()=>s.contextMenuPosition!==null||!sa()||aa()?false:ue()),Jr=new Map,Pd=oe(()=>{if(!Qo())return [];if(!i.store.theme.grabbedBoxes.enabled)return [];s.viewportVersion;let r=new Set(s.labelInstances.map(u=>u.id));for(let u of Jr.keys())r.has(u)||Jr.delete(u);return s.labelInstances.map(u=>{let p=u.elements&&u.elements.length>1,v=u.element,I=!p&&v&&document.body.contains(v)?ze(v):u.bounds,ne=Jr.get(u.id),ie=ne&&ne.bounds.x===I.x&&ne.bounds.y===I.y&&ne.bounds.width===I.width&&ne.bounds.height===I.height;if(ne&&ne.status===u.status&&ne.errorMessage===u.errorMessage&&ie)return ne;let De=I.x+I.width/2,we=I.width/2,Ue=u.mouseXOffsetRatio!==void 0&&we>0?De+u.mouseXOffsetRatio*we:u.mouseXOffsetFromCenter!==void 0?De+u.mouseXOffsetFromCenter:u.mouseX,nt={...u,bounds:I,mouseX:Ue};return Jr.set(u.id,nt),nt})}),Td=oe(()=>Qo()?i.store.theme.grabbedBoxes.enabled?(s.viewportVersion,s.grabbedBoxes.map(r=>!r.element||!document.body.contains(r.element)?r:{...r,bounds:ze(r.element)})):[]:[]),is=oe(()=>Qo()&&Cd()&&Tt()&&tt()),kd=oe(()=>D()?"processing":"hover"),Md=oe(()=>{if(!Qo())return false;let r=sa(),u=f(),p=D(),v=Tt(),E=A(),I=!!ee(),ne=le(),ie=h();return !r||u||ne&&!ie?false:p?true:v&&!E&&I}),la=oe(()=>{s.viewportVersion;let r=s.contextMenuElement;return r?ze(r):null}),Id=oe(()=>(s.viewportVersion,s.contextMenuPosition)),ca=oe(()=>{let r=s.contextMenuElement;if(!r)return;let u=s.frozenElements.length;return u>1?`${u} elements`:chunkXWSK4QRO_cjs.ha(r)||void 0}),[da]=_s(()=>({element:s.contextMenuElement,frozenCount:s.frozenElements.length}),async({element:r,frozenCount:u})=>!r||u>1?void 0:await chunkXWSK4QRO_cjs.sa(r)??void 0),[ua]=_s(()=>s.contextMenuElement,async r=>{if(!r)return null;let u=await chunkXWSK4QRO_cjs.ra(r);return chunkXWSK4QRO_cjs.ta(u)}),_d=(r,u,p,v,E)=>async I=>{let ne=E?.fallbackBounds??null,ie=E?.fallbackSelectionBounds??[],De=E?.position??s.contextMenuPosition??s.pointer,we=Re(),Ue=la()??ne,nt=u.length>1,ct=nt?Bi(js(we)):Ue,Rt=s.wasActivatedByToggle,or=nt?we:Ue?[Ue]:ie;if(c.hideContextMenu(),ct){let St=nt?ct.x+ct.width/2:De.x,dn=wt(ct,p||"element",v,"copying",{element:r,mouseX:St,elements:nt?u:void 0,boundsMultiple:or}),un=false,ei;try{un=await I(),un||(ei="Failed to copy");}catch(Nn){ei=Nn instanceof Error&&Nn.message?Nn.message:"Action failed";}c.updateLabelInstance(dn,un?"copied":"error",un?void 0:ei||"Unknown error"),Zt(dn);}else try{await I();}catch{}Rt?Qe():c.unfreeze();},ss=()=>{setTimeout(()=>{c.hideContextMenu();},0);},fa=r=>{let{element:u,filePath:p,lineNumber:v,tagName:E,componentName:I,position:ne,performWithFeedbackOptions:ie,shouldDeferHideContextMenu:De,onBeforeCopy:we,onBeforePrompt:Ue,customEnterPromptMode:nt}=r,ct=s.frozenElements.length>0?s.frozenElements:[u],Rt=De?ss:c.hideContextMenu,dn={element:u,elements:ct,filePath:p,lineNumber:v,componentName:I,tagName:E,enterPromptMode:nt??(un=>{un&&c.setSelectedAgent(un),c.clearLabelInstances(),Ue?.(),Ve(u,ne.x,ne.y),c.setPointer({x:ne.x,y:ne.y}),c.setFrozenElement(u),bt(),m()||Qt(),Rt();}),copy:()=>{we?.(),K({element:u,positionX:ne.x,elements:ct.length>1?ct:void 0,shouldDeactivateAfter:s.wasActivatedByToggle}),Rt();},hooks:{transformHtmlContent:i.hooks.transformHtmlContent,onOpenFile:i.hooks.onOpenFile,transformOpenFileUrl:i.hooks.transformOpenFileUrl},performWithFeedback:_d(u,ct,E,I,ie),hideContextMenu:Rt,cleanup:()=>{s.wasActivatedByToggle?Qe():c.unfreeze();}};return i.hooks.transformActionContext(dn)},Od=oe(()=>{let r=s.contextMenuElement;if(!r)return;let u=ua(),p=s.contextMenuPosition??s.pointer;return fa({element:r,filePath:u?.filePath,lineNumber:u?.lineNumber,tagName:ca(),componentName:da(),position:p,shouldDeferHideContextMenu:true,onBeforeCopy:()=>{Vt=null;},customEnterPromptMode:v=>{v&&c.setSelectedAgent(v),c.clearLabelInstances(),c.clearInputText(),c.enterPromptMode(p,r),ss();}})}),Dd=()=>{setTimeout(()=>{c.hideContextMenu(),Qe();},0);},Cn=()=>{for(let{boxId:r,labelId:u}of fe)c.removeGrabbedBox(r),u&&c.removeLabelInstance(u);fe=[];},Ld=(r,u,p,v)=>{if(u.length===0)return;let E=r.isComment&&r.commentText;for(let[I,ne]of u.entries()){let ie=p[I],De=`${v}-${r.id}-${I}`;c.addGrabbedBox({id:De,bounds:ne,createdAt:0,element:ie});let we=null;I===0&&(we=`${v}-label-${r.id}`,c.addLabelInstance({id:we,bounds:ne,tagName:r.tagName,componentName:r.componentName,elementsCount:r.elementsCount,status:"idle",isPromptMode:!!E,inputValue:E?r.commentText:void 0,createdAt:0,element:ie,mouseX:ne.x+ne.width/2})),fe.push({boxId:De,labelId:we});}},ma=(r,u)=>{let p=ve(r),v=p.map(E=>ze(E));Ld(r,v,p,u);},er=()=>{Q!==null&&(chunkXWSK4QRO_cjs.ja(Q),Q=null);},as=r=>{er();let u=()=>{r(),Q=chunkXWSK4QRO_cjs.ia(u);};u();},Rd=r=>{let u=r.left+r.width/2,p=r.top+r.height/2,v=p,E=window.innerHeight-p,I=u,ne=window.innerWidth-u,ie=Math.min(v,E,I,ne);return ie===v?"top":ie===I?"left":ie===ne?"right":"bottom"},ls=()=>{if(!$)return null;let r=$.getBoundingClientRect(),u=Rd(r);return u==="left"||u==="right"?{x:u==="left"?r.right:r.left,y:r.top+r.height/2,edge:u,toolbarWidth:r.width}:{x:r.left+r.width/2,y:u==="top"?r.bottom:r.top,edge:u,toolbarWidth:r.width}},en=()=>{Qr(),bo(),er(),Cn(),H(null),Te(false);},ga=()=>{c.hideContextMenu(),Zn(),nr(),C(Qs()),Ce(false),as(()=>{let r=ls();r&&H(r);});},tr=null,Sn=null,Qr=()=>{tr!==null&&(clearTimeout(tr),tr=null);},bo=()=>{Sn!==null&&(clearTimeout(Sn),Sn=null);},Zn=()=>{er(),b(null);},$d=()=>{en(),Zn(),as(()=>{let r=ls();r&&V(r);});},nr=()=>{er(),V(null);},pa=()=>{en(),Zn(),nr();},Nd=()=>{j()!==null?Zn():(c.hideContextMenu(),en(),nr(),as(()=>{let r=ls();r&&b(r);}));},Bd=()=>{Qr(),bo(),M()!==null?Z()?(Cn(),Te(false)):en():(Cn(),ga());},ha=r=>{jt(r.content,{tagName:r.tagName,componentName:r.componentName??r.elementName,commentText:r.commentText});let u=Fe(r);u&&(c.clearLabelInstances(),chunkXWSK4QRO_cjs.ia(()=>{if(!et(u))return;let p=ze(u),v=wt(p,r.tagName,r.componentName,"copied",{element:u,mouseX:p.x+p.width/2});Zt(v);}));},Hd=r=>{Cn(),f()&&(c.exitPromptMode(),c.clearInputText());let u=Fe(r);if(r.isComment&&r.commentText&&u){let p=ze(u),v=p.x+p.width/2,E=p.y+p.height/2;c.enterPromptMode({x:v,y:E},u),c.setInputText(r.commentText);}else ha(r);},Fd=r=>{Cn(),F.delete(r.id);let u=ea(r.id);C(u),u.length===0&&(Ce(false),en());},ba=()=>{Cn();let r=te();if(r.length===0)return;let u=$i(r.map(v=>v.content)),p=r[0];jt(u,{componentName:p.componentName??p.tagName,entries:r.map(v=>({tagName:v.tagName,componentName:v.componentName??v.elementName,content:v.content,commentText:v.commentText}))}),$d(),c.clearLabelInstances(),chunkXWSK4QRO_cjs.ia(()=>{mi(()=>{for(let v of r){let E=ve(v);for(let I of E){let ne=ze(I),ie=`label-${Date.now()}-${Math.random().toString(36).slice(2)}`;c.addLabelInstance({id:ie,bounds:ne,tagName:v.tagName,componentName:v.componentName,status:"copied",createdAt:Date.now(),element:I,mouseX:ne.x+ne.width/2}),Zt(ie);}}});});},zd=r=>{if(Cn(),!r)return;let u=te().find(p=>p.id===r);u&&ma(u,"history-hover");},Vd=r=>{Qr(),Cn(),r?(bo(),M()===null&&S()===null&&(wa(),tr=setTimeout(()=>{tr=null,Te(true),ga();},chunkXWSK4QRO_cjs.U))):Z()&&(Sn=setTimeout(()=>{Sn=null,en();},chunkXWSK4QRO_cjs.U));},Kd=r=>{r?bo():Z()&&(Sn=setTimeout(()=>{Sn=null,en();},chunkXWSK4QRO_cjs.U));},ya=r=>{Cn(),r?(bo(),wa()):Z()&&(Sn=setTimeout(()=>{Sn=null,en();},chunkXWSK4QRO_cjs.U));},wa=()=>{for(let r of te())ma(r,"history-all-hover");},xa=()=>{F.clear();let r=td();C(r),Ce(false),en();},Ud=r=>{let u=qe.sessions().get(r);if(!u)return;let p=qe.session.getElement(r);p&&et(p)&&setTimeout(()=>{m()||(c.setWasActivatedByToggle(true),Qt()),c.setPointer(u.position),c.setFrozenElement(p),c.freeze(),c.showContextMenu(u.position,p);},0);},Wd=r=>{let u=s.labelInstances.find(I=>I.id===r);if(!u?.element||!et(u.element))return;let p=ze(u.element),v={x:u.mouseX??p.x+p.width/2,y:p.y+p.height/2},E=u.elements&&u.elements.length>0?u.elements.filter(I=>et(I)):[u.element];setTimeout(()=>{m()||(c.setWasActivatedByToggle(true),Qt()),c.setPointer(v),c.setFrozenElements(E),E.length>1&&u.bounds&&c.setFrozenDragRect(Gs(u.bounds)),c.freeze(),c.showContextMenu(v,u.element);},0);};pe(()=>{let r=i.store.theme.hue;r!==0?os.style.filter=`hue-rotate(${r}deg)`:os.style.filter="";}),i.store.theme.enabled&&Ml(()=>T(kc,{get selectionVisible(){return rs()},get selectionBounds(){return ke()},get selectionBoundsMultiple(){return kt()},get selectionShouldSnap(){return s.frozenElements.length>0||at().length>0},get selectionElementsCount(){return Ke()},get selectionFilePath(){return s.selectionFilePath??void 0},get selectionLineNumber(){return s.selectionLineNumber??void 0},get selectionTagName(){return Ed()},get selectionComponentName(){return bn()},get selectionLabelVisible(){return Ad()},selectionLabelStatus:"idle",get selectionActionCycleState(){return cd()},get selectionArrowNavigationState(){return ud()},onArrowNavigationSelect:sd,get labelInstances(){return Pd()},get dragVisible(){return is()},get dragBounds(){return ut()},get grabbedBoxes(){return Td()},labelZIndex:2147483647,get mouseX(){return He(()=>s.frozenElements.length>1)()?void 0:cn().x},get mouseY(){return cn().y},get crosshairVisible(){return yn()},get isFrozen(){return h()||m()||le()},get inputValue(){return s.inputText},get isPromptMode(){return f()},get hasAgent(){return Ae()},get isAgentConnected(){return s.isAgentConnected},get agentSessions(){return qe.sessions()},get supportsUndo(){return s.supportsUndo},get supportsFollowUp(){return s.supportsFollowUp},get dismissButtonText(){return s.dismissButtonText},get onDismissSession(){return qe.session.dismiss},get onUndoSession(){return qe.session.undo},onFollowUpSubmitSession:zr,onAcknowledgeSessionError:Vr,get onRetrySession(){return qe.session.retry},onShowContextMenuSession:Ud,onShowContextMenuInstance:Wd,onLabelInstanceHoverChange:Zi,get onInputChange(){return c.setInputText},onInputSubmit:()=>void Yo(),onInputCancel:Yn,onToggleExpand:Fr,get isPendingDismiss(){return x()},onConfirmDismiss:Nr,onCancelDismiss:Br,get pendingAbortSessionId(){return ge()},onRequestAbortSession:r=>c.setPendingAbortSessionId(r),onAbortSession:Hr,get theme(){return i.store.theme},get toolbarVisible(){return i.store.theme.toolbar.enabled},get isActive(){return m()},onToggleActive:Kr,get enabled(){return k()},onToggleEnabled:Wr,get shakeCount(){return ce()},onToolbarStateChange:r=>{ae(r),jn.forEach(u=>u(r));},onSubscribeToToolbarStateChanges:r=>(jn.add(r),()=>{jn.delete(r);}),onToolbarSelectHoverChange:G,onToolbarRef:r=>{$=r;},get contextMenuPosition(){return Id()},get contextMenuBounds(){return la()},get contextMenuTagName(){return ca()},get contextMenuComponentName(){return da()},get contextMenuHasFilePath(){return !!ua()?.filePath},get actions(){return i.store.actions},get toolbarActions(){return i.store.toolbarActions},get actionContext(){return Od()},onContextMenuDismiss:Dd,onContextMenuHide:ss,get historyItems(){return te()},get historyDisconnectedItemIds(){return Le()},get historyItemCount(){return te().length},get clockFlashTrigger(){return _()},get hasUnreadHistoryItems(){return Ee()},get historyDropdownPosition(){return M()},get isHistoryPinned(){return He(()=>M()!==null)()&&!Z()},onToggleHistory:Bd,onCopyAll:ba,onCopyAllHover:ya,onHistoryButtonHover:Vd,onHistoryItemSelect:Hd,onHistoryItemRemove:Fd,onHistoryItemCopy:ha,onHistoryItemHover:zd,onHistoryCopyAll:ba,onHistoryCopyAllHover:ya,onHistoryClear:xa,onHistoryDismiss:en,onHistoryDropdownHover:Kd,get toolbarMenuPosition(){return j()},onToggleMenu:Nd,onToolbarMenuDismiss:Zn,get clearPromptPosition(){return S()},onClearHistoryConfirm:()=>{nr(),xa();},onClearHistoryCancel:nr}),os),Ae()&&qe.session.tryResume();let Gd=async r=>{let u=Array.isArray(r)?r:[r];return u.length===0?false:await jo(u)},va=()=>{let r=mo();r&&qe._internal.setOptions(r);let u=!!r?.provider;if(c.setHasAgentProvider(u),u&&r?.provider){let p=r.provider;c.setAgentCapabilities({supportsUndo:!!p.undo,supportsFollowUp:!!p.supportsFollowUp,dismissButtonText:p.dismissButtonText,isAgentConnected:false}),p.checkConnection&&p.checkConnection().then(v=>{mo()?.provider===p&&c.setAgentCapabilities({supportsUndo:!!p.undo,supportsFollowUp:!!p.supportsFollowUp,dismissButtonText:p.dismissButtonText,isAgentConnected:v});}).catch(()=>{}),qe.session.tryResume();}else c.setAgentCapabilities({supportsUndo:false,supportsFollowUp:false,dismissButtonText:void 0,isAgentConnected:false});},cs={activate:()=>{c.setPendingCommentMode(false),!m()&&k()&&U();},deactivate:()=>{(m()||D())&&Qe();},toggle:()=>{m()?Qe():k()&&U();},comment:Ur,isActive:()=>m(),isEnabled:()=>k(),setEnabled:r=>{r!==k()&&(z(r),r||Xo());},getToolbarState:()=>oo(),setToolbarState:r=>{let u=oo(),p={edge:r.edge??u?.edge??"bottom",ratio:r.ratio??u?.ratio??.5,collapsed:r.collapsed??u?.collapsed??false,enabled:r.enabled??u?.enabled??true};Er(p),ae(p),r.enabled!==void 0&&r.enabled!==k()&&z(r.enabled),jn.forEach(v=>v(p));},onToolbarStateChange:r=>(jn.add(r),()=>{jn.delete(r);}),dispose:()=>{ta=false,Qr(),bo(),er(),jn.clear(),a();},copyElement:Gd,getSource:async r=>{let u=await chunkXWSK4QRO_cjs.ra(r),p=chunkXWSK4QRO_cjs.ta(u);return p?{filePath:p.filePath,lineNumber:p.lineNumber??null,componentName:p.componentName}:null},getStackContext:chunkXWSK4QRO_cjs.va,getState:()=>({isActive:m(),isDragging:A(),isCopying:D(),isPromptMode:f(),isCrosshairVisible:yn()??false,isSelectionBoxVisible:rs()??false,isDragBoxVisible:is()??false,targetElement:X(),dragBounds:ut()??null,grabbedBoxes:s.grabbedBoxes.map(r=>({id:r.id,bounds:r.bounds,createdAt:r.createdAt})),labelInstances:s.labelInstances.map(r=>({id:r.id,status:r.status,tagName:r.tagName,componentName:r.componentName,createdAt:r.createdAt})),selectionFilePath:s.selectionFilePath,toolbarState:se()}),setOptions:r=>{i.setOptions(r);},registerPlugin:r=>{i.register(r,cs),va();},unregisterPlugin:r=>{i.unregister(r),va();},getPlugins:()=>i.getPluginNames(),getDisplayName:chunkXWSK4QRO_cjs.ua};for(let r of pg)i.register(r,cs);return setTimeout(()=>{chunkXWSK4QRO_cjs.pa(true);},chunkXWSK4QRO_cjs.ea),cs})};exports.a=jt;exports.b=kr;exports.c=ro;exports.d=Yc;exports.e=qc;exports.f=L1;