@fuadnafiz98/grab 0.1.0 → 0.2.0-dev.6fa4e51

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.
@@ -6,35 +6,35 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- this.globalThis=this.globalThis||{},this.globalThis.__REACT_GRAB_MODULE__=(function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>()=>(e&&(t=e(e=0)),t),l=(e,t)=>{let n={};for(var i in e)r(n,i,{get:e[i],enumerable:!0});return t||r(n,Symbol.toStringTag,{value:`Module`}),n},u=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e};t=((e,t,i)=>(i=e==null?{}:n(o(e)),u(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)))(t,1);function d(e){let t=String(e),n=t.length-1;return N.context.id+(n?String.fromCharCode(96+n):``)+t}function f(e){N.context=e}function p(){return{...N.context,id:N.getNextContextId(),count:0}}function m(e,t){let n=I,r=P,i=e.length===0,a=t===void 0?r:t,o=i?Be:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>S(()=>_e(o)));P=o,I=null;try{return ue(s,!0)}finally{I=n,P=r}}function h(e,t){t=t?Object.assign({},Fe,t):Fe;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[ae.bind(n),e=>(typeof e==`function`&&(e=F&&F.running&&F.sources.has(n)?e(n.tValue):e(n.value)),oe(n,e))]}function g(e,t,n){let r=ce(e,t,!0,Re);He&&F&&F.running?L.push(r):k(r)}function _(e,t,n){let r=ce(e,t,!1,Re);He&&F&&F.running?L.push(r):k(r)}function v(e,t,n){Le=me;let r=ce(e,t,!1,Re),i=qe&&re(qe);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),R?R.push(r):k(r)}function y(e,t,n){n=n?Object.assign({},Fe,n):Fe;let r=ce(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,He&&F&&F.running?(r.tState=Re,L.push(r)):k(r),ae.bind(r)}function b(e){return e&&typeof e==`object`&&`then`in e}function ee(e,t,n){let r,i,a;typeof t==`function`?(r=e,i=t,a=n||{}):(r=!0,i=e,a=t||{});let o=null,s=Ve,c=null,l=!1,u=!1,d=`initialValue`in a,f=typeof r==`function`&&y(r),p=new Set,[m,_]=(a.storage||h)(a.initialValue),[v,ee]=h(void 0),[x,C]=h(void 0,{equals:!1}),[te,w]=h(d?`ready`:`unresolved`);N.context&&(c=N.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:N.load&&N.has(c)&&(s=N.load(c)));function T(e,t,n,r){return o===e&&(o=null,r!==void 0&&(d=!0),(e===s||t===s)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(r,{value:t})),s=Ve,F&&e&&l?(F.promises.delete(e),l=!1,ue(()=>{F.running=!0,E(t,n)},!1)):E(t,n)),t}function E(e,t){ue(()=>{t===void 0&&_(()=>e),w(t===void 0?d?`ready`:`unresolved`:`errored`),ee(t);for(let e of p.keys())e.decrement();p.clear()},!1)}function O(){let e=qe&&re(qe),t=m(),n=v();if(n!==void 0&&!o)throw n;return I&&!I.user&&e&&g(()=>{x(),o&&(e.resolved&&F&&l?F.promises.add(o):p.has(e)||(e.increment(),p.add(e)))}),t}function ne(e=!0){if(e!==!1&&u)return;u=!1;let t=f?f():r;if(l=F&&F.running,t==null||t===!1){T(o,S(m));return}F&&o&&F.promises.delete(o);let n,a=s===Ve?S(()=>{try{return i(t,{value:m(),refetching:e})}catch(e){n=e}}):s;if(n!==void 0){T(o,void 0,ye(n),t);return}else if(!b(a))return T(o,a,void 0,t),a;return o=a,`v`in a?(a.s===1?T(o,a.v,void 0,t):T(o,void 0,ye(a.v),t),a):(u=!0,queueMicrotask(()=>u=!1),ue(()=>{w(d?`refreshing`:`pending`),C()},!1),a.then(e=>T(a,e,void 0,t),e=>T(a,void 0,ye(e),t)))}Object.defineProperties(O,{state:{get:()=>te()},error:{get:()=>v()},loading:{get(){let e=te();return e===`pending`||e===`refreshing`}},latest:{get(){if(!d)return O();let e=v();if(e&&!o)throw e;return m()}}});let ie=P;return f?g(()=>(ie=P,ne(!1))):ne(!1),[O,{refetch:e=>D(ie,()=>ne(e)),mutate:_}]}function x(e){return ue(e,!1)}function S(e){if(!Ue&&I===null)return e();let t=I;I=null;try{return Ue?Ue.untrack(e):e()}finally{I=t}}function C(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=S(()=>t(o,i,n));return i=o,s}}function te(e){v(()=>S(e))}function w(e){return P===null||(P.cleanups===null?P.cleanups=[e]:P.cleanups.push(e)),e}function T(){return I}function E(){return P}function D(e,t){let n=P,r=I;P=e,I=null;try{return ue(t,!0)}catch(e){xe(e)}finally{P=n,I=r}}function O(e){if(F&&F.running)return e(),F.done;let t=I,n=P;return Promise.resolve().then(()=>{I=t,P=n;let r;return(He||qe)&&(r=F||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||=new Promise(e=>r.resolve=e),r.running=!0),ue(e,!1),I=P=null,r?r.done:void 0})}function ne(e,t){let n=Symbol(`context`);return{id:n,Provider:Ce(n),defaultValue:e}}function re(e){let t;return P&&P.context&&(t=P.context[e.id])!==void 0?t:e.defaultValue}function ie(e){let t=y(e),n=y(()=>Se(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}function ae(){let e=F&&F.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Re)k(this);else{let e=L;L=null,ue(()=>he(this),!1),L=e}if(I){let e=this.observers?this.observers.length:0;I.sources?(I.sources.push(this),I.sourceSlots.push(e)):(I.sources=[this],I.sourceSlots=[e]),this.observers?(this.observers.push(I),this.observerSlots.push(I.sources.length-1)):(this.observers=[I],this.observerSlots=[I.sources.length-1])}return e&&F.sources.has(this)?this.tValue:this.value}function oe(e,t,n){let r=F&&F.running&&F.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(F){let r=F.running;(r||!n&&F.sources.has(e))&&(F.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&ue(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=F&&F.running;r&&F.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?L.push(n):R.push(n),n.observers&&ge(n)),r?n.tState=Re:n.state=Re)}if(L.length>1e6)throw L=[],Error()},!1)}return t}function k(e){if(!e.fn)return;_e(e);let t=We;se(e,F&&F.running&&F.sources.has(e)?e.tValue:e.value,t),F&&!F.running&&F.sources.has(e)&&queueMicrotask(()=>{ue(()=>{F&&(F.running=!0),I=P=e,se(e,e.tValue,t),I=P=null},!1)})}function se(e,t,n){let r,i=P,a=I;I=P=e;try{r=e.fn(t)}catch(t){return e.pure&&(F&&F.running?(e.tState=Re,e.tOwned&&e.tOwned.forEach(_e),e.tOwned=void 0):(e.state=Re,e.owned&&e.owned.forEach(_e),e.owned=null)),e.updatedAt=n+1,xe(t)}finally{I=a,P=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?oe(e,r,!0):F&&F.running&&e.pure?(F.sources.has(e)||(e.value=r),F.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function ce(e,t,n,r=Re,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:P,context:P?P.context:null,pure:n};if(F&&F.running&&(a.state=0,a.tState=r),P===null||P!==Be&&(F&&F.running&&P.pure?P.tOwned?P.tOwned.push(a):P.tOwned=[a]:P.owned?P.owned.push(a):P.owned=[a]),Ue&&a.fn){let e=a.fn,[t,n]=h(void 0,{equals:!1}),r=Ue.factory(e,n);w(()=>r.dispose());let i,o=()=>O(n).then(()=>{i&&=(i.dispose(),void 0)});a.fn=n=>(t(),F&&F.running?(i||=Ue.factory(e,o),i.track(n)):r.track(n))}return a}function le(e){let t=F&&F.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===ze)return he(e);if(e.suspense&&S(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<We);){if(t&&F.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(F.disposed.has(t))return}if((t?e.tState:e.state)===Re)k(e);else if((t?e.tState:e.state)===ze){let t=L;L=null,ue(()=>he(e,n[0]),!1),L=t}}}function ue(e,t){if(L)return e();let n=!1;t||(L=[]),R?n=!0:R=[],We++;try{let t=e();return de(n),t}catch(e){n||(R=null),L=null,xe(e)}}function de(e){if(L&&=(He&&F&&F.running?pe(L):fe(L),null),e)return;let t;if(F){if(!F.promises.size&&!F.queue.size){let e=F.sources,n=F.disposed;R.push.apply(R,F.effects),t=F.resolve;for(let e of R)`tState`in e&&(e.state=e.tState),delete e.tState;F=null,ue(()=>{for(let e of n)_e(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)_e(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}Ke(!1)},!1)}else if(F.running){F.running=!1,F.effects.push.apply(F.effects,R),R=null,Ke(!0);return}}let n=R;R=null,n.length&&ue(()=>Le(n),!1),t&&t()}function fe(e){for(let t=0;t<e.length;t++)le(e[t])}function pe(e){for(let t=0;t<e.length;t++){let n=e[t],r=F.queue;r.has(n)||(r.add(n),He(()=>{r.delete(n),ue(()=>{F.running=!0,le(n)},!1),F&&(F.running=!1)}))}}function me(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:le(r)}if(N.context){if(N.count){N.effects||=[],N.effects.push(...e.slice(0,n));return}f()}for(N.effects&&(N.done||!N.count)&&(e=[...N.effects,...e],n+=N.effects.length,delete N.effects),t=0;t<n;t++)le(e[t])}function he(e,t){let n=F&&F.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===Re?i!==t&&(!i.updatedAt||i.updatedAt<We)&&le(i):e===ze&&he(i,t)}}}function ge(e){let t=F&&F.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=ze:r.state=ze,r.pure?L.push(r):R.push(r),r.observers&&ge(r))}}function _e(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)_e(e.tOwned[t]);delete e.tOwned}if(F&&F.running&&e.pure)ve(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)_e(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}F&&F.running?e.tState=0:e.state=0}function ve(e,t){if(t||(e.tState=0,F.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)ve(e.owned[t])}function ye(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function be(e,t,n){try{for(let n of t)n(e)}catch(e){xe(e,n&&n.owner||null)}}function xe(e,t=P){let n=Ie&&t&&t.context&&t.context[Ie],r=ye(e);if(!n)throw r;R?R.push({fn(){be(r,n,t)},state:Re}):be(r,n,t)}function Se(e){if(typeof e==`function`&&!e.length)return Se(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Se(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Ce(e,t){return function(t){let n;return _(()=>n=S(()=>(P.context={...P.context,[e]:t.value},ie(()=>t.children))),void 0),n}}function we(e){for(let t=0;t<e.length;t++)e[t]()}function Te(e,t,n={}){let r=[],i=[],a=[],o=0,s=t.length>1?[]:null;return w(()=>we(a)),()=>{let c=e()||[],l=c.length,u,d;return c[Pe],S(()=>{let e,t,p,h,g,_,v,y,b;if(l===0)o!==0&&(we(a),a=[],r=[],i=[],o=0,s&&=[]),n.fallback&&(r=[Je],i[0]=m(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(l),d=0;d<l;d++)r[d]=c[d],i[d]=m(f);o=l}else{for(p=Array(l),h=Array(l),s&&(g=Array(l)),_=0,v=Math.min(o,l);_<v&&r[_]===c[_];_++);for(v=o-1,y=l-1;v>=_&&y>=_&&r[v]===c[y];v--,y--)p[y]=i[v],h[y]=a[v],s&&(g[y]=s[v]);for(e=new Map,t=Array(y+1),d=y;d>=_;d--)b=c[d],u=e.get(b),t[d]=u===void 0?-1:u,e.set(b,d);for(u=_;u<=v;u++)b=r[u],d=e.get(b),d!==void 0&&d!==-1?(p[d]=i[u],h[d]=a[u],s&&(g[d]=s[u]),d=t[d],e.set(b,d)):a[u]();for(d=_;d<l;d++)d in p?(i[d]=p[d],a[d]=h[d],s&&(s[d]=g[d],s[d](d))):i[d]=m(f);i=i.slice(0,o=l),r=c.slice(0)}return i});function f(e){if(a[d]=e,s){let[e,n]=h(d);return s[d]=n,t(c[d],e)}return t(c[d])}}}function A(e,t){if(Ye&&N.context){let n=N.context;f(p());let r=S(()=>e(t||{}));return f(n),r}return S(()=>e(t||{}))}function Ee(){return!0}function De(e){return(e=typeof e==`function`?e():e)?e:{}}function j(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function Oe(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&Me in r,e[n]=typeof r==`function`?(t=!0,y(r)):r}if(Ne&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=De(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in De(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(De(e[n])));return[...new Set(t)]}},Xe);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:j.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},a=Object.keys(r);for(let e=a.length-1;e>=0;e--){let t=a[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function ke(e,...t){let n=t.length;if(Ne&&Me in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},Xe));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return r.includes(t)?!1:t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},Xe)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}function Ae(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return y(Te(()=>e.each,e.children,t||void 0))}function M(e){let t=e.keyed,n=y(()=>e.when,void 0,void 0),r=t?n:y(n,void 0,{equals:(e,t)=>!e==!t});return y(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?S(()=>a(t?i:()=>{if(!S(r))throw Ze(`Show`);return n()})):a}return e.fallback},void 0,void 0)}var N,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,P,F,He,Ue,I,L,R,We,Ge,Ke,qe,Je,Ye,Xe,Ze,z=c((()=>{N={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return d(this.context.count)},getNextContextId(){return d(this.context.count++)}},je=(e,t)=>e===t,Me=Symbol(`solid-proxy`),Ne=typeof Proxy==`function`,Pe=Symbol(`solid-track`),Fe={equals:je},Ie=null,Le=fe,Re=1,ze=2,Be={owned:null,cleanups:null,context:null,owner:null},Ve={},P=null,F=null,He=null,Ue=null,I=null,L=null,R=null,We=0,[Ge,Ke]=h(!1),Je=Symbol(`fallback`),Ye=!1,Xe={get(e,t,n){return t===Me?n:e.get(t)},has(e,t){return t===Me?!0:e.has(t)},set:Ee,deleteProperty:Ee,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ee,deleteProperty:Ee}},ownKeys(e){return e.keys()}},Ze=e=>`Stale read from <${e}>.`}));function Qe(e,t){let n=wt[e];return typeof n==`object`?n[t]?n.$:void 0:n}function $e(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}function et(e,t,n,r={}){let i;return m(r=>{i=r,t===document?e():W(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function B(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>S(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function tt(e,t=window.document){let n=t[Ot]||(t[Ot]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,mt))}}function V(e,t,n){ut(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function nt(e,t,n,r){ut(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function rt(e,t,n){ut(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function it(e,t){ut(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function H(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function at(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(ft(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(ft(e,i,!0),n[i]=o)}return n}function ot(e,t,n){if(!t)return n?V(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function U(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function st(e,t={},n,r){let i={};return r||_(()=>i.children=ht(e,t.children,i.children)),_(()=>typeof t.ref==`function`&&ct(t.ref,e)),_(()=>lt(e,t,n,!0,i,!0)),i}function ct(e,t,n){return S(()=>e(t,n))}function W(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return ht(e,t,r,n);_(r=>ht(e,t(),r,n),r)}function lt(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=pt(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||ht(e,t.children);continue}let s=t[o];i[o]=pt(e,o,s,i[o],n,a,t)}}function ut(e){return!!N.context&&!N.done&&(!e||e.isConnected)}function dt(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function ft(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function pt(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return ot(e,n,r);if(t===`classList`)return at(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=Tt.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(H(e,i,n,a),a&&tt([i]))}else if(t.slice(0,5)===`attr:`)V(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)rt(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=St.has(t))||!i&&((u=Qe(t,e.tagName))||(c=xt.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(ut(e))return n;t===`class`||t===`className`?it(e,n):s&&!c&&!l?e[dt(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Et[t.split(`:`)[0]];r?nt(e,r,t,n):V(e,Ct[t]||t,n)}return n}function mt(e){if(N.registry&&N.events&&N.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,`target`,{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,`currentTarget`,{configurable:!0,get(){return t||document}}),N.registry&&!N.done&&(N.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function ht(e,t,n,r,i){let a=ut(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=vt(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=vt(e,n,r)}else if(o===`function`)return _(()=>{let i=t();for(;typeof i==`function`;)i=i();n=ht(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(gt(o,t,n,i))return _(()=>n=ht(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=vt(e,n,r),s)return n}else c?n.length===0?_t(e,o,r):$e(e,n,o):(n&&vt(e),_t(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=vt(e,n,r,t);vt(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function gt(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=gt(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=gt(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function _t(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function vt(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function yt(e,t=!1,n=void 0){return t?document.createElementNS(kt,e):document.createElement(e,{is:n})}function bt(e){let{useShadow:t}=e,n=document.createTextNode(``),r=()=>e.mount||document.body,i=E(),a,o=!!N.context;return v(()=>{o&&(E().user=o=!1),a||=D(i,()=>y(()=>e.children));let s=r();if(s instanceof HTMLHeadElement){let[e,t]=h(!1);m(t=>W(s,()=>e()?t():a(),null)),w(()=>t(!0))}else{let r=yt(e.isSVG?`g`:`div`,e.isSVG),i=t&&r.attachShadow?r.attachShadow({mode:`open`}):r;Object.defineProperty(r,`_$host`,{get(){return n.parentNode},configurable:!0}),W(i,a),s.appendChild(r),e.ref&&e.ref(r),w(()=>s.removeChild(r))}},void 0,{render:!o}),n}var xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,G=c((()=>{z(),xt=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`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`.split(`.`)]),St=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Ct=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),wt=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}}),Tt=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Et={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},Dt=e=>y(()=>e()),Ot=`_$DX_DELEGATE`,kt=`http://www.w3.org/2000/svg`}));G();var At=`/*! tailwindcss v4.3.0 | 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-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}}}@layer theme{:root,:host{--font-sans:"Geist", ui-sans-serif, system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:4px;--font-weight-medium:500;--radius-sm:4px;--ease-out:cubic-bezier(0, 0, .2, 1);--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);--ease-drawer:cubic-bezier(.32, .72, 0, 1);--ease-spring:cubic-bezier(.34, 1.56, .64, 1)}}@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{.a11y-hitbox{position:relative}.a11y-hitbox:before{content:"";pointer-events:auto;width:100%;min-width:24px;height:100%;min-height:24px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.top-0{top:calc(var(--spacing) * 0)}.top-full{top:100%}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.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\\.5{margin:calc(var(--spacing) * -.5)}.m-0{margin:calc(var(--spacing) * 0)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-my-1\\.5{margin-block:calc(var(--spacing) * -1.5)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2\\.5{margin-right:calc(var(--spacing) * 2.5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.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)}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height: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}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.96)}.press-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}.press-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);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,)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.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{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.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-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[14px\\]{border-radius:14px}.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-\\[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-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\\[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-\\[var\\(--rg-border-button\\)\\]{border-color:var(--rg-border-button)}.border-\\[var\\(--rg-border-subtle\\)\\]{border-color:var(--rg-border-subtle)}.border-t-\\[var\\(--rg-border-subtle\\)\\]{border-top-color:var(--rg-border-subtle)}.bg-\\[var\\(--rg-error-bg\\)\\]{background-color:var(--rg-error-bg)}.bg-\\[var\\(--rg-panel-bg\\)\\]{background-color:var(--rg-panel-bg)}.bg-\\[var\\(--rg-submit-bg\\)\\]{background-color:var(--rg-submit-bg)}.bg-\\[var\\(--rg-surface-hover\\)\\]{background-color:var(--rg-surface-hover)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing) * 0)}.px-0\\.25{padding-inline:calc(var(--spacing) * .25)}.px-1{padding-inline:calc(var(--spacing) * 1)}.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)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-1\\.5{padding-bottom:calc(var(--spacing) * 1.5)}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.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-\\[var\\(--rg-error-text\\)\\]{color:var(--rg-error-text)}.text-\\[var\\(--rg-submit-fg\\)\\]{color:var(--rg-submit-fg)}.text-\\[var\\(--rg-text-primary\\)\\]{color:var(--rg-text-primary)}.text-\\[var\\(--rg-text-primary-85\\)\\]{color:var(--rg-text-primary-85)}.text-\\[var\\(--rg-text-secondary\\)\\]{color:var(--rg-text-secondary)}.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-50{opacity:.5}.opacity-60{opacity:.6}.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)}.\\[box-shadow\\:var\\(--rg-shadow\\)\\]{box-shadow:var(--rg-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\\:var\\(--rg-drop-shadow\\)\\]{filter:var(--rg-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,)}.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\\]{transition-property:grid-template-columns;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;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-\\[padding\\,border-radius\\,transform\\]{transition-property:padding,border-radius,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\\,border-radius\\]{transition-property:top,left,width,height,opacity,border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,color\\]{transition-property:transform,color;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))}.delay-\\[80ms\\]{transition-delay:80ms}.duration-60{--tw-duration:60ms;transition-duration:60ms}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-140{--tw-duration:.14s;transition-duration:.14s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-180{--tw-duration:.18s;transition-duration:.18s}.duration-220{--tw-duration:.22s;transition-duration:.22s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-drawer{--tw-ease:var(--ease-drawer);transition-timing-function:var(--ease-drawer)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.ease-spring{--tw-ease:var(--ease-spring);transition-timing-function:var(--ease-spring)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.will-change-transform{will-change: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}@media (hover:hover){.group-hover\\:text-\\[var\\(--rg-text-primary\\)\\]:is(:where(.group):hover *){color:var(--rg-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:bg-\\[var\\(--rg-error-bg-hover\\)\\]:hover{background-color:var(--rg-error-bg-hover)}.hover\\:bg-\\[var\\(--rg-surface-active\\)\\]:hover{background-color:var(--rg-surface-active)}.hover\\:bg-\\[var\\(--rg-surface-hover\\)\\]:hover{background-color:var(--rg-surface-hover)}.hover\\:text-\\[var\\(--rg-text-primary\\)\\]:hover{color:var(--rg-text-primary)}}.focus\\:opacity-100:focus{opacity:1}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}:host,[data-rg-theme=dark]{--rg-panel-bg:#161616;--rg-text-primary:#fff;--rg-text-secondary:#a7a7a7;--rg-surface-hover:#ffffff1a;--rg-surface-active:#ffffff26;--rg-border-subtle:#ffffff1a;--rg-border-button:#fff3;--rg-submit-bg:#fff;--rg-submit-fg:#161616;--rg-error-text:#f87171;--rg-error-bg:#3d1515;--rg-error-bg-hover:#4d1f1f;--rg-shadow:0 2px 8px #00000014;--rg-drop-shadow:drop-shadow(0px 2px 8px #00000014);--rg-shimmer-from:#a1a1aa;--rg-shimmer-to:#d4d4d8;--rg-text-primary-85:#ffffffd9}@media (prefers-color-scheme:dark){:host:not([data-rg-theme]){--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}}:host([data-rg-theme=light]),[data-rg-theme=light]{--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}@media (prefers-reduced-motion:reduce){:host,:host *,:host :before,:host :after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}:host :focus{box-shadow:none!important;outline:none!important}@keyframes shake{0%,to{translate:0}15%,45%{translate:calc(-3px * var(--rg-shake-x,1)) calc(-3px * var(--rg-shake-y,0))}30%,60%{translate:calc(3px * var(--rg-shake-x,1)) calc(3px * var(--rg-shake-y,0))}75%{translate:calc(-2px * var(--rg-shake-x,1)) calc(-2px * var(--rg-shake-y,0))}90%{translate:calc(2px * var(--rg-shake-x,1)) calc(2px * var(--rg-shake-y,0))}}@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{background:linear-gradient(90deg, var(--rg-shimmer-from) 0%, var(--rg-shimmer-to) 25%, var(--rg-shimmer-from) 50%, var(--rg-shimmer-to) 75%, var(--rg-shimmer-from) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake,.animate-shake-vertical{will-change:translate;animation:.3s ease-out shake}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.animate-tooltip-fade-in{will-change:transform, opacity;animation:.1s ease-out tooltip-fade-in}.animate-shake-vertical{--rg-shake-x:0;--rg-shake-y:1}@supports (-webkit-touch-callout:none){textarea[data-react-grab-input]{font-size:16px}}@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}`;z();let jt=Symbol(`store-raw`),Mt=Symbol(`store-node`),Nt=Symbol(`store-has`),Pt=Symbol(`store-self`);function Ft(e){let t=e[Me];if(!t&&(Object.defineProperty(e,Me,{value:t=new Proxy(e,Ut)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,a=n.length;i<a;i++){let a=n[i];r[a].get&&Object.defineProperty(e,a,{enumerable:r[a].enumerable,get:r[a].get.bind(t)})}}return t}function It(e){let t;return typeof e==`object`&&!!e&&(e[Me]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Lt(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[jt])return n;if(!It(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=Lt(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=Lt(i,t))!==i&&(e[a]=r))}return e}function Rt(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function zt(e,t,n){if(e[t])return e[t];let[r,i]=h(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function Bt(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===Me||t===Mt?n:(delete n.value,delete n.writable,n.get=()=>e[Me][t],n)}function Vt(e){T()&&zt(Rt(e,Mt),Pt)()}function Ht(e){return Vt(e),Reflect.ownKeys(e)}let Ut={get(e,t,n){if(t===jt)return e;if(t===Me)return n;if(t===Pe)return Vt(e),n;let r=Rt(e,Mt),i=r[t],a=i?i():e[t];if(t===Mt||t===Nt||t===`__proto__`)return a;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);T()&&(typeof a!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(a=zt(r,t,a)())}return It(a)?Ft(a):a},has(e,t){return t===jt||t===Me||t===Pe||t===Mt||t===Nt||t===`__proto__`?!0:(T()&&zt(Rt(e,Nt),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Ht,getOwnPropertyDescriptor:Bt};function Wt(e,t,n,r=!1){if(!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[Nt]&&e[Nt][t]&&i!==void 0&&e[Nt][t].$()):(e[t]=n,e[Nt]&&e[Nt][t]&&i===void 0&&e[Nt][t].$());let o=Rt(e,Mt),s;if((s=zt(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=zt(o,`length`,a))&&s.$(e.length)}(s=o[Pt])&&s.$()}function Gt(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];Wt(e,i,t[i])}}function Kt(e,t){if(typeof t==`function`&&(t=t(e)),t=Lt(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&Wt(e,n,r)}Wt(e,`length`,r)}else Gt(e,t)}function qt(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)qt(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&qt(e,[i].concat(t),n);return}else if(o&&a===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)qt(e,[r].concat(t),n);return}else if(t.length>1){qt(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let a=t[0];typeof a==`function`&&(a=a(i,n),a===i)||r===void 0&&a==null||(a=Lt(a),r===void 0||It(i)&&It(a)&&!Array.isArray(a)?Gt(i,a):Wt(e,r,a))}function Jt(...[e,t]){let n=Lt(e||{}),r=Array.isArray(n),i=Ft(n);function a(...e){x(()=>{r&&e.length===1?Kt(n,e[0]):qt(n,e)})}return[i,a]}let Yt=new WeakMap,Xt={get(e,t){if(t===jt)return e;let n=e[t],r;return It(n)?Yt.get(n)||(Yt.set(n,r=new Proxy(n,Xt)),r):n},set(e,t,n){return Wt(e,t,Lt(n)),!0},deleteProperty(e,t){return Wt(e,t,void 0,!0),!0}};function Zt(e){return t=>{if(It(t)){let n;(n=Yt.get(t))||Yt.set(t,n=new Proxy(t,Xt)),e(n)}return t}}var Qt,$t,en=c((()=>{Qt=null,$t=()=>{if(Qt!==null)return Qt;try{Qt=window.matchMedia(`(color-gamut: p3)`).matches}catch{Qt=!1}return Qt}})),tn,nn,rn,an,on=c((()=>{en(),tn=$t(),nn=`210, 57, 192`,rn=`0.84 0.19 0.78`,an=e=>tn?`color(display-p3 ${rn} / ${e})`:`rgba(${nn}, ${e})`})),sn,cn,ln,un,K,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,q,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,J=c((()=>{on(),sn=`0.1.0`,cn=`var(--rg-panel-bg)`,ln=`var(--rg-shadow)`,un=-1e3,K=.95,dn=1500,fn=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],pn=5e3,mn=8e3,hn=1e4,gn=.5,_n=2147483647,vn=2147483645,yn=2147483644,bn=.7,xn=1e3/60,Sn=.01,Cn=an(.4),wn=an(.05),Tn=an(.5),En=an(.08),Dn=an(.15),On=.2,kn=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],An=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),jn=new Set([`a`,`button`,`code`,`label`,`option`,`pre`,`summary`,`text`]),Mn=new Set([`script`,`style`,`template`,`noscript`]),Nn=[`Meta`,`Control`,`Shift`,`Alt`],Pn=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),Fn=`data-react-grab-frozen`,In=`data-react-grab-same-origin-frame`,Ln=`data-react-grab-hit-test-shield`,Rn=.5,zn=`data-react-grab-input`,q=.9,Bn=.5,Vn=`copy`,Hn=`comment`,Un=`superellipse(1.25)`,Wn=.01,Gn=1e3,Kn={left:-9999,top:-9999},qn={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},Jn=1e3,Yn=-9999})),Xn,Zn=c((()=>{Xn=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE})),Qn,$n=c((()=>{Zn(),Qn=e=>Xn(e)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`})),er,tr=c((()=>{$n(),er=e=>Qn(e)&&e.tagName===`IFRAME`})),nr,rr,ir,ar=c((()=>{J(),nr=new WeakMap,rr=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},ir=e=>{let t=performance.now(),n=nr.get(e);if(n&&t-n.timestamp<16)return n.metrics;let r=e.ownerDocument.defaultView?.getComputedStyle(e),i;if(!r)i={contentOffsetX:e.clientLeft,contentOffsetY:e.clientTop,height:e.offsetHeight,width:e.offsetWidth};else{let t=rr(r.borderLeftWidth),n=rr(r.borderRightWidth),a=rr(r.borderTopWidth),o=rr(r.borderBottomWidth),s=rr(r.paddingLeft),c=rr(r.paddingRight),l=rr(r.paddingTop),u=rr(r.paddingBottom),d=rr(r.width),f=rr(r.height),p=t+n+s+c,m=a+o+l+u,h=r.boxSizing===`border-box`?d:d+p,g=r.boxSizing===`border-box`?f:f+m;i={contentOffsetX:t+s,contentOffsetY:a+l,height:g>0?g:e.offsetHeight,width:h>0?h:e.offsetWidth}}return nr.set(e,{metrics:i,timestamp:t}),i}})),or,sr=c((()=>{or=(e,t)=>t>0?e/t:1})),cr,lr=c((()=>{cr=e=>{if(!e)return null;try{return e.frameElement}catch{return null}}})),ur,dr=c((()=>{tr(),ar(),sr(),lr(),ur=(e,t,n)=>{let r=t,i=n,a=1,o=1,s=e;for(;s&&s!==window;){let e=cr(s);if(!e||!er(e))break;let t=e.getBoundingClientRect(),n=ir(e),c=or(t.width,n.width),l=or(t.height,n.height);r=t.left+(n.contentOffsetX+r)*c,i=t.top+(n.contentOffsetY+i)*l,a*=c,o*=l,s=e.ownerDocument.defaultView}return{x:r,y:i,scaleX:a,scaleY:o}}})),fr,pr=c((()=>{fr=e=>{let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e):window.getComputedStyle(e)}})),mr,hr,gr=c((()=>{J(),mr=(e,t)=>e.replace(/([\d.]+)px/g,(e,n)=>{let r=Number(n)*Math.abs(t);return`${Number(r.toFixed(3))}px`}),hr=(e,t,n)=>{let[r,i]=e.split(`/`).map(e=>e.trim()),a=mr(r,t),o=mr(i??r,n);return i===void 0&&a===o?a:`${a} / ${o}`}})),_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr=c((()=>{_r=`0.7.2`,vr=`bippy-${_r}`,yr=Object.defineProperty,br=()=>{},xr=e=>Object.assign(e,{[Symbol.dispose]:e}),Sr=e=>{try{Function.prototype.toString.call(e).indexOf(`^_^`)>-1&&setTimeout(()=>{throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://react.dev/link/perf-use-production-build`)})}catch{}},Cr=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e),wr=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>{if(!e||typeof e.inject!=`function`||Cr(e))return!1;try{return Function.prototype.toString.call(e.inject).includes(`(injected)`)}catch{return!1}},Tr=new Set,Er=new Set,Dr=new Set,Or=()=>{for(let e of Tr)e()},kr=e=>{for(let t of Dr)t(e)},Ar=e=>(Dr.add(e),xr(()=>{Dr.delete(e)})),jr=e=>(e.renderers instanceof Map||(e.renderers=new Map),e.renderers),Mr=(e,t,n,r)=>{t.set(n,r),Er.add(r),e._instrumentationIsActive||(e._instrumentationIsActive=!0,Or())},Nr=e=>{e&&Tr.add(e);let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:vr,checkDCE:Sr,hasUnsupportedRendererAttached:!1,inject:e=>{let i=++n;return Mr(r,t,i,e),i},on:br,onCommitFiberRoot:br,onCommitFiberUnmount:br,onPostCommitFiberRoot:br,renderers:t,supportsFiber:!0,supportsFlight:!0};try{if(yr(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`,{configurable:!0,enumerable:!0,get(){return r},set(t){if(t&&typeof t==`object`){let n=r.renderers;r=t;let i=jr(r);n.forEach((e,t)=>{Er.add(e),i.set(t,e)}),(n.size>0||Dr.size>0)&&Pr(e),kr(r)}}}),typeof window<`u`){let e=window.hasOwnProperty.bind(window),t=Object.getOwnPropertyDescriptor(window,`hasOwnProperty`),n=!1,r=()=>{t?yr(window,`hasOwnProperty`,t):Reflect.deleteProperty(window,`hasOwnProperty`)};yr(window,`hasOwnProperty`,{configurable:!0,value:t=>!n&&t===`__REACT_DEVTOOLS_GLOBAL_HOOK__`?(n=!0,r(),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,!1):e(t),writable:!0})}}catch{Pr(e)}return r},Pr=e=>{e&&Tr.add(e);let t=!1,n=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!n)return;let r=jr(n);if(!n._instrumentationSource){n.checkDCE=Sr,n.supportsFiber=!0,n.supportsFlight=!0,n.hasUnsupportedRendererAttached=!1,n._instrumentationSource=vr,n._instrumentationIsActive=!1;let e=Cr(n);e||(n.on=br),r.size?(r.forEach(e=>Er.add(e)),n._instrumentationIsActive=!0,Or(),t=!0):!e&&wr(n)&&(n._instrumentationIsActive=!0,Or(),t=!0);let i=n.inject;n.inject=e=>{let t=i.call(n,e);return Mr(n,r,t,e),t}}!t&&(r.size||n._instrumentationIsActive)&&e?.()},Fr=()=>Object.hasOwn(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),Ir=e=>Fr()?(Pr(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__??Nr(e)):Nr(e)})),Rr=c((()=>{Lr();try{Ir()}catch{}}));function zr(e,t,n=!1){if(!e)return null;let r=t(e);return vi(r)?Promise.resolve(r).then(r=>r===!0?e:yi(e,t,n)):r===!0?e:yi(e,t,n)}var Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji=c((()=>{Lr(),Br=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,Vr=/^\d+$/,Hr=e=>Ur(e)!==null,Ur=e=>{let t=Br.exec(e);if(!t)return null;let n=t[4]?.split(`.`)??[];return n.some(e=>Vr.test(e)&&e.length>1&&e.startsWith(`0`))?null:{major:t[1],minor:t[2],patch:t[3],prerelease:n}},Wr=(e,t)=>e.length===t.length?e===t?0:e<t?-1:1:e.length<t.length?-1:1,Gr=(e,t)=>{let n=Vr.test(e),r=Vr.test(t);return n&&r?Wr(e,t):n===r?e===t?0:e<t?-1:1:n?-1:1},Kr=(e,t)=>{if(e.length===0||t.length===0)return e.length===t.length?0:e.length===0?1:-1;let n=Math.max(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===void 0||i===void 0)return n===void 0?-1:1;let a=Gr(n,i);if(a!==0)return a}return 0},qr=(e,t)=>{let n=Ur(e),r=Ur(t);if(!n||!r)return null;let i=Wr(n.major,r.major);if(i!==0)return i;let a=Wr(n.minor,r.minor);if(a!==0)return a;let o=Wr(n.patch,r.patch);return o===0?Kr(n.prerelease,r.prerelease):o},Jr={ChildDeletion:16,Cloned:8,ContentReset:32,Hydrating:4096,PerformedWork:1,Placement:2,Snapshot:1024,Update:4,Visibility:8192},Yr={CONCURRENT_MODE_NUMBER:60111,CONCURRENT_MODE_SYMBOL_DESCRIPTION:`react.concurrent_mode`,CONCURRENT_MODE_SYMBOL_STRING:`Symbol(react.concurrent_mode)`,DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION:`react.async_mode`,DEPRECATED_ASYNC_MODE_SYMBOL_STRING:`Symbol(react.async_mode)`,ELEMENT_SYMBOL_STRING:`Symbol(react.transitional.element)`,LEGACY_ELEMENT_SYMBOL_STRING:`Symbol(react.element)`},Xr=(e=>e)({"16.0.0":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:2,ContextConsumer:12,ContextProvider:13,CoroutineComponent:7,CoroutineHandlerPhase:8,DehydratedSuspenseComponent:-1,ForwardRef:14,Fragment:10,FunctionComponent:1,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:-1,IncompleteFunctionComponent:-1,IndeterminateComponent:0,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:11,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:9},"16.4.3-alpha":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:2,ContextConsumer:11,ContextProvider:12,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:-1,ForwardRef:13,Fragment:9,FunctionComponent:0,HostComponent:7,HostHoistable:-1,HostPortal:6,HostRoot:5,HostSingleton:-1,HostText:8,IncompleteClassComponent:-1,IncompleteFunctionComponent:-1,IndeterminateComponent:4,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:10,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"16.6.0-beta.0":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:-1,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:-1,MemoComponent:14,Mode:8,OffscreenComponent:-1,Profiler:12,ScopeComponent:-1,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"17.0.0-alpha":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:-1,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:24,MemoComponent:14,Mode:8,OffscreenComponent:23,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"17.0.2":{ActivityComponent:31,CacheComponent:24,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:26,HostPortal:4,HostRoot:3,HostSingleton:27,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:28,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:23,MemoComponent:14,Mode:8,OffscreenComponent:22,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:29,TracingMarkerComponent:25,ViewTransitionComponent:30,YieldComponent:-1}}),Zr=[{isMinimumExcluded:!0,minimumVersion:`17.0.1`,workTags:Xr[`17.0.2`]},{isMinimumExcluded:!1,minimumVersion:`17.0.0-alpha`,workTags:Xr[`17.0.0-alpha`]},{isMinimumExcluded:!1,minimumVersion:`16.6.0-beta.0`,workTags:Xr[`16.6.0-beta.0`]},{isMinimumExcluded:!1,minimumVersion:`16.4.3-alpha`,workTags:Xr[`16.4.3-alpha`]}],Qr=Xr[`17.0.2`],$r=e=>{if(e===void 0)return Qr;for(let t of Zr){let n=qr(e,t.minimumVersion);if(n===null)return Qr;if(n===1||n===0&&!t.isMinimumExcluded)return t.workTags}return Xr[`16.0.0`]},ei=$r(),ti=new WeakMap,ni=e=>e.startsWith(`0.0.0-`)?ei:$r(e),ri=e=>{let t=e?.reconcilerVersion;return t&&Hr(t)?ni(t):e?.version?ni(e.version):ei},ii=(e,t)=>{let n=ri(t);ti.set(e,n),e.alternate&&ti.set(e.alternate,n)},ai=e=>{let t=ti.get(e);if(t)return t;let n=[e],r=e;for(;r.return;)r=r.return,n.push(r);let i=ti.get(r)??ei;for(let e of n)ti.set(e,i),e.alternate&&ti.set(e.alternate,i);return i},Jr.Placement|Jr.Update|Jr.ChildDeletion|Jr.ContentReset|Jr.Hydrating|Jr.Visibility|Jr.Snapshot,oi=class extends Error{constructor(e,t){super(e,{cause:t}),this.name=`BippyError`}},si=class extends oi{constructor(e,t){super(e,t),this.name=`BippyHookInspectionError`}},ci=class extends si{constructor(e,t){super(e,t),this.name=`BippyUnsupportedHookError`}},li=class extends oi{constructor(e,t){super(e,t),this.name=`BippySourceMapError`}},ui=e=>typeof e==`function`,di=e=>{let t=`displayName`in e?e.displayName:null;if(typeof t==`string`&&t)return t;let n=`name`in e?e.name:null;return typeof n==`string`&&n?n:null},fi=e=>typeof e==`object`&&!!e&&`tag`in e&&`stateNode`in e&&`return`in e&&`child`in e&&`sibling`in e&&`flags`in e,pi=e=>typeof e==`object`&&!!e&&`current`in e&&fi(e.current),mi=e=>{let t=ai(e);switch(e.tag){case t.HostComponent:case t.HostText:case t.HostHoistable:case t.HostSingleton:return!0;default:return!1}},hi=e=>{let t=ai(e);switch(e.tag){case t.ClassComponent:case t.ForwardRef:case t.FunctionComponent:case t.MemoComponent:case t.SimpleMemoComponent:return!0;default:return!1}},gi=e=>{let t=e.memoizedProps,n=e.alternate?.memoizedProps||{},r=e.flags??e.effectTag??0,i=ai(e);switch(e.tag){case i.ClassComponent:case i.ContextConsumer:case i.ForwardRef:case i.FunctionComponent:case i.MemoComponent:case i.SimpleMemoComponent:return(r&Jr.PerformedWork)===Jr.PerformedWork;default:return!e.alternate||n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref}},_i=e=>{let t=ai(e);switch(e.tag){case t.DehydratedSuspenseComponent:return!0;case t.Fragment:case t.HostText:case t.LegacyHiddenComponent:case t.OffscreenComponent:return!0;case t.HostRoot:return!1;default:{let t=typeof e.type==`object`&&e.type!==null?e.type.$$typeof:e.type;if(typeof t==`symbol`)return t.description===Yr.CONCURRENT_MODE_SYMBOL_DESCRIPTION||t.description===Yr.DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION;switch(t){case Yr.CONCURRENT_MODE_NUMBER:case Yr.CONCURRENT_MODE_SYMBOL_STRING:case Yr.DEPRECATED_ASYNC_MODE_SYMBOL_STRING:return!0;default:return!1}}}},vi=e=>(typeof e==`object`||typeof e==`function`)&&e!==null&&`then`in e&&typeof e.then==`function`,yi=(e,t,n)=>bi(n?e.return:e.child,t,n),bi=(e,t,n)=>{if(!e)return null;let r=n?null:e.sibling,i=zr(e,t,n);return vi(i)?Promise.resolve(i).then(e=>e??bi(r,t,n)):i??bi(r,t,n)},xi=e=>ui(e)?e:typeof e!=`object`||!e?null:xi(Reflect.get(e,`type`)??Reflect.get(e,`render`)),Si=e=>{if(typeof e==`string`)return e;if(typeof e!=`function`&&typeof e!=`object`||e===null)return null;let t=di(e);if(t)return t;let n=xi(e);return n?di(n):null},Ci=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||Cr(e)||wr(e)},wi=new Set,Ti=new WeakMap,Ei=e=>{let t=e.alternate;if(!t)return e;let n=e;for(;n.return;)n=n.return;if(pi(n.stateNode)){let r=zr(n.stateNode.current,n=>{if(n===e||n===t)return!0});if(r)return r}if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let n of wi){let r=zr(n.current,n=>{if(n===e||n===t)return!0});if(r)return r}return e},Di=0,Oi=new WeakMap,ki=(e,t=Di++)=>{Oi.set(e,t),Number.isSafeInteger(t)&&t>=Di&&(Di=t+1)},Ai=e=>{let t=Oi.get(e);return t===void 0&&e.alternate&&(t=Oi.get(e.alternate)),t===void 0&&(t=Di++,ki(e,t)),t},ji=(e,t,n)=>{let r=t;for(;r!==null;){if(Ai(r),!_i(r)&&gi(r)&&e(r,`mount`),r.tag===ai(r).SuspenseComponent)if(r.memoizedState!==null){let t=r.child,n=t?t.sibling:null;if(n){let t=n.child;t!==null&&ji(e,t,!1)}}else{let t=r.child?.child??null;t!==null&&ji(e,t,!1)}else r.child!==null&&ji(e,r.child,!0);r=n?r.sibling:null}},Mi=(e,t,n)=>{if(Ai(t),!n)return;Ai(n);let r=t.tag===ai(t).SuspenseComponent;!_i(t)&&gi(t)&&e(t,`update`);let i=r&&n.memoizedState!==null,a=r&&t.memoizedState!==null;if(i&&a){let r=t.child?.sibling??null,i=n.child?.sibling??null;r!==null&&i!==null&&Mi(e,r,i)}else if(i&&!a){let n=t.child;n!==null&&ji(e,n,!0)}else if(!i&&a){Pi(e,n);let r=t.child?.sibling??null;r!==null&&ji(e,r,!0)}else if(t.child!==n.child){let n=t.child;for(;n;)n.alternate?Mi(e,n,n.alternate):ji(e,n,!1),n=n.sibling}},Ni=(e,t)=>{(t.tag===ai(t).HostRoot||!_i(t))&&e(t,`unmount`)},Pi=(e,t)=>{let n=t.tag===ai(t).SuspenseComponent&&t.memoizedState!==null,r=t.child;for(n&&(r=(t.child?.sibling??null)?.child??null);r!==null;)r.return!==null&&(Ni(e,r),Pi(e,r)),r=r.sibling},Fi=new Set,Ii=new WeakMap,Li=!1,Ri=e=>{let t=Ii.get(e)??{};if(Ii.set(e,t),!t.onCommitFiberRoot||e.onCommitFiberRoot!==t.onCommitFiberRoot){let n=e.onCommitFiberRoot,r=(t,i,a,o)=>{if(n&&n.call(e,t,i,a,o),Ii.get(e)?.onCommitFiberRoot!==r)return;ii(i.current,e.renderers.get(t));let s=i.current.memoizedState;s===null||s!==void 0&&(s.element===null||s.element===void 0)?(wi.delete(i),Ti.delete(i)):(wi.add(i),Ti.set(i,t));for(let{options:e}of Fi)e.onCommitFiberRoot&&e.onCommitFiberRoot(t,i,a,o)};t.onCommitFiberRoot=r,e.onCommitFiberRoot=r}if(!t.onCommitFiberUnmount||e.onCommitFiberUnmount!==t.onCommitFiberUnmount){let n=e.onCommitFiberUnmount,r=(t,i)=>{if(ii(i,e.renderers.get(t)),n&&n.call(e,t,i),Ii.get(e)?.onCommitFiberUnmount===r)for(let{options:e}of Fi)e.onCommitFiberUnmount&&e.onCommitFiberUnmount(t,i)};t.onCommitFiberUnmount=r,e.onCommitFiberUnmount=r}if(!t.onPostCommitFiberRoot||e.onPostCommitFiberRoot!==t.onPostCommitFiberRoot){let n=e.onPostCommitFiberRoot,r=(t,i)=>{if(n&&n.call(e,t,i),Ii.get(e)?.onPostCommitFiberRoot===r)for(let{options:e}of Fi)e.onPostCommitFiberRoot&&e.onPostCommitFiberRoot(t,i)};t.onPostCommitFiberRoot=r,e.onPostCommitFiberRoot=r}if(!t.onScheduleFiberRoot||e.onScheduleFiberRoot!==t.onScheduleFiberRoot){let n=e.onScheduleFiberRoot,r=(t,i,a)=>{if(n&&n.call(e,t,i,a),Ii.get(e)?.onScheduleFiberRoot===r)for(let{options:e}of Fi)e.onScheduleFiberRoot&&e.onScheduleFiberRoot(t,i,a)};t.onScheduleFiberRoot=r,e.onScheduleFiberRoot=r}},zi=e=>{Li||=(Ar(Ri),!0),Ri(e)};try{Fr()&&zi(Ir())}catch{}Bi=e=>{let t=Ir(e.onActive);t._instrumentationSource=e.name??vr,zi(t);let n={options:e};return Fi.add(n),xr(()=>{e.onActive&&Tr.delete(e.onActive),Fi.delete(n)})},Vi=new Set,Hi=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),Ui=e=>{let t=Reflect.get(e,`_reactRootContainer`);if(typeof t!=`object`||!t)return null;let n=Reflect.get(t,`_internalRoot`);if(typeof n!=`object`||!n)return null;let r=Reflect.get(n,`current`);if(typeof r!=`object`||!r)return null;let i=Reflect.get(r,`child`);return fi(i)?i:null},Wi=e=>{let t=Reflect.get(e,`__internalInstanceHandle`)??Reflect.get(e,`_internalInstanceHandle`);return fi(t)?t:null},Gi=e=>{if(typeof e!=`object`||!e)return e;let t=Reflect.get(e,`canonical`);if(typeof t==`object`&&t){let e=Reflect.get(t,`publicInstance`);if(typeof e==`object`&&e)return e}let n=Reflect.get(e,`_nativeTag`);return typeof n==`number`?n:e},Ki=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t?.renderers)for(let n of t.renderers.values())try{let t=n.findFiberByHostInstance?.(e);if(t)return t}catch{}if(typeof e==`object`&&e){let t=Ui(e);if(t)return t;let n=Wi(e);if(n)return n;for(let t of Vi){let n=Reflect.get(e,t);if(fi(n))return n}for(let t of Object.keys(e))if(Hi(t)){Vi.add(t);let n=Reflect.get(e,t);if(fi(n))return n}}if(e!=null&&(typeof e==`object`||typeof e==`number`))for(let t of wi){let n=zr(t.current,t=>mi(t)&&Gi(t.stateNode)===e);if(n)return n}return null},qi=Ki})),Yi=c((()=>{Lr(),Rr(),Ji(),Reflect.get(t,`useSyncExternalStore`)})),Xi,Zi,Qi,$i,ea=c((()=>{Yi(),Xi=new WeakMap,Zi=(e,t)=>{Xi.set(e,t)},Qi=e=>Xi.get(e)??null,$i=e=>Qi(e)?.getFiber()??qi(e)})),ta,na,ra,ia,Y,aa=c((()=>{J(),dr(),pr(),gr(),ea(),ta=new WeakMap,na=new WeakMap,ra=()=>{ta=new WeakMap,na=new WeakMap},ia=(e,t,n)=>{let r=na.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??fr(e)).borderRadius||`0px`;return na.set(e,{borderRadius:i,timestamp:n}),i},Y=e=>{let t=performance.now(),n=ta.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=Qi(e);if(r){let n=r.getBounds();return ta.set(e,{bounds:n,timestamp:t}),n}let i=e.getBoundingClientRect(),a=ur(e.ownerDocument.defaultView,i.left,i.top),o={borderRadius:hr(ia(e,null,t),a.scaleX,a.scaleY),height:i.height*a.scaleY,width:i.width*a.scaleX,x:a.x,y:a.y};return ta.set(e,{bounds:o,timestamp:t}),o}}));aa();let oa=e=>({x:e.x+e.width/2,y:e.y+e.height/2});var X,sa=c((()=>{ea(),X=e=>{if(!e)return!1;let t=Qi(e);return t?t.isConnected():!!(e.isConnected||e.ownerDocument?.contains(e))}}));sa();let ca=e=>{let t=0,n=e.previousElementSibling;for(;n;)t+=1,n=n.previousElementSibling;return t};var la,ua=c((()=>{la=e=>{let t=e.ownerDocument?.defaultView;return!!(t&&e instanceof t.ShadowRoot)}}));Yi(),ua(),Zn();let da=new WeakMap,fa=e=>{if(e.anchorElement.isConnected)return e.anchorElement;let t=e.anchorElement.tagName,n=Ei(e.anchorParentFiber);if(mi(n)){let r=n.stateNode;if(!Xn(r)||!r.isConnected)return null;let i=r.children[e.anchorIndexInParent];return i&&i.tagName===t?i:null}return pa(n,t)},pa=(e,t)=>{let n=e.child;for(;n;){if(mi(n)){let e=n.stateNode;if(Xn(e)&&e.isConnected&&e.tagName===t)return e}else if(n.child){n=n.child;continue}for(;n!==e&&!n.sibling;)if(n=n.return,!n)return null;if(n===e)return null;n=n.sibling}return null},ma=(e,t)=>{let n=e;for(let e of t){let t=(e.isShadowChild?n.shadowRoot?.children:n.children)?.[e.childIndex];if(!t)return null;n=t}return n},ha=e=>{let t=[],n=e,r=qi(n);for(;n&&!r;){let e=n.parentElement;if(e)t.unshift({childIndex:ca(n),isShadowChild:!1}),n=e;else{let e=n.getRootNode();if(!la(e))break;t.unshift({childIndex:ca(n),isShadowChild:!0}),n=e.host}r=qi(n)}let i=r?.return;return!n||!i?null:{anchorElement:n,anchorParentFiber:i,anchorIndexInParent:ca(n),domPath:t,targetTagName:e.tagName}},ga=(e,t)=>e.anchorElement.isConnected&&e.anchorIndexInParent===ca(e.anchorElement)&&ma(e.anchorElement,e.domPath)===t,_a=e=>{if(!e.isConnected)return;let t=da.get(e);if(t&&ga(t,e))return;let n=ha(e);n&&da.set(e,n)},va=e=>{if(e.isConnected)return e;let t=da.get(e);if(!t)return null;let n=fa(t);if(!n)return null;let r=ma(n,t.domPath);return r&&r.isConnected&&r.tagName===t.targetTagName?r:null};z(),J();let ya=e=>{let t=va(e)??e;return _a(t),t},ba=e=>{for(let t=0;t<e.frozenElements.length;t+=1)e.frozenElements[t]=ya(e.frozenElements[t]);e.frozenElement=e.frozenElement&&ya(e.frozenElement),e.detectedElement=e.detectedElement&&ya(e.detectedElement),e.contextMenuElement=e.contextMenuElement&&ya(e.contextMenuElement);for(let t of e.labelInstances)if(t.element&&=ya(t.element),t.elements)for(let e=0;e<t.elements.length;e+=1)t.elements[e]=ya(t.elements[e]);for(let t of e.grabbedBoxes)t.element&&=ya(t.element)},xa=e=>({selectionInteractionLockDepth:0,wasActivatedByToggle:!1,pendingCommentMode:!1,keyHoldDuration:e.keyHoldDuration,dragStart:{x:un,y:un},copyStart:{x:un,y:un},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:``,grabbedBoxes:[],labelInstances:[],isTouchMode:!1,activationTimestamp:null,previouslyFocusedElement:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null}),Sa=e=>{let[t,n]=Jt(xa(e)),[r,i]=h({x:un,y:un}),[a,o]=h(0),[s,c]=h({state:`idle`}),l=e=>{n(Zt(t=>{e(t),t.frozenElement=t.frozenElements.length>0?t.frozenElements[0]:null,t.frozenDragRect=null;for(let e of t.frozenElements)_a(e)}))},u=()=>{l(e=>{e.frozenElements=[]})},d=e=>{c(t=>t.state===`active`?{...t,phase:e}:t)},f={startHold:e=>{e!==void 0&&n(`keyHoldDuration`,e),c({state:`holding`,startedAt:Date.now()})},releaseHold:()=>{s().state===`holding`&&c({state:`idle`})},activate:()=>{x(()=>{c({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement)})},deactivate:()=>{x(()=>{c({state:`idle`}),n(Zt(e=>{e.wasActivatedByToggle=!1,e.pendingCommentMode=!1,e.inputText=``,e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null,e.activationTimestamp=null,e.previouslyFocusedElement=null,e.contextMenuPosition=null,e.contextMenuElement=null,e.contextMenuClickOffset=null,e.isTouchMode&&(e.detectedElement=null)}))})},toggle:()=>{t.activationTimestamp===null?(n(`wasActivatedByToggle`,!0),f.activate()):f.deactivate()},freeze:()=>{if(s().state===`active`){let e=t.frozenElement??t.detectedElement;e&&(_a(e),n(`frozenElement`,e)),d(`frozen`)}},unfreeze:()=>{s().state===`active`&&x(()=>{n(Zt(e=>{e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null})),d(`hovering`)})},startDrag:(e,t)=>{s().state===`active`&&x(()=>{t||u(),n(`dragStart`,{x:e.x+window.scrollX,y:e.y+window.scrollY}),d(`dragging-select`)})},startDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-select`&&d(`dragging-reposition`)},stopDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-reposition`&&d(`dragging-select`)},shiftDragStart:e=>{let t=s();t.state===`active`&&t.phase===`dragging-reposition`&&n(`dragStart`,t=>({x:t.x+e.x,y:t.y+e.y}))},endDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&x(()=>{n(`dragStart`,{x:un,y:un}),d(`justDragged`)})},cancelDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&x(()=>{n(`dragStart`,{x:un,y:un}),d(`hovering`)})},finishJustDragged:()=>{let e=s();e.state===`active`&&e.phase===`justDragged`&&d(`hovering`)},startCopy:()=>{let e=s().state===`active`;c({state:`copying`,startedAt:Date.now(),wasActive:e})},completeCopy:()=>{let e=s(),t=e.state===`copying`?e.wasActive:!1;c({state:`justCopied`,copiedAt:Date.now(),wasActive:t})},finishJustCopied:()=>{let e=s();e.state===`justCopied`&&(e.wasActive&&!t.wasActivatedByToggle?x(()=>{u(),c({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1})}):f.deactivate())},enterPromptMode:(e,t)=>{let{x:r}=oa(Y(t));_a(t),x(()=>{n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r),i(e),n(`frozenElement`,t),n(`wasActivatedByToggle`,!0),s().state===`active`?c(e=>e.state===`active`?{...e,isPromptMode:!0,phase:`frozen`}:e):(c({state:`active`,phase:`frozen`,isPromptMode:!0,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement))})},exitPromptMode:()=>{c(e=>e.state===`active`?{...e,isPromptMode:!1,isPendingDismiss:!1}:e)},setInputText:e=>{n(`inputText`,e)},clearInputText:()=>{n(`inputText`,``)},setPendingDismiss:e=>{c(t=>t.state===`active`?{...t,isPendingDismiss:e}:t)},setPointer:e=>{i(t=>t.x===e.x&&t.y===e.y?t:e)},setDetectedElement:e=>{e&&_a(e),n(`detectedElement`,e)},setFrozenElement:e=>{l(t=>{t.frozenElements=[e]})},setFrozenElements:e=>{l(t=>{t.frozenElements=e})},toggleFrozenElement:e=>{l(t=>{let n=t.frozenElements.indexOf(e);n>=0?t.frozenElements.splice(n,1):t.frozenElements.push(e)})},addFrozenElements:e=>{l(t=>{for(let n of e)t.frozenElements.includes(n)||t.frozenElements.push(n)})},setFrozenDragRect:e=>{n(`frozenDragRect`,e)},relinkLiveElements:()=>{n(Zt(ba))},setCopyStart:(e,t)=>{let{x:r}=oa(Y(t));n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r)},setLastGrabbed:e=>{n(`lastGrabbedElement`,e)},setWasActivatedByToggle:e=>{n(`wasActivatedByToggle`,e)},setPendingCommentMode:e=>{n(`pendingCommentMode`,e)},setTouchMode:e=>{n(`isTouchMode`,e)},incrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>e+1)},decrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>Math.max(0,e-1))},setSelectionSource:(e,t)=>{x(()=>{n(`selectionFilePath`,e),n(`selectionLineNumber`,t)})},incrementViewportVersion:()=>{o(e=>e+1)},addGrabbedBox:e=>{e.element&&_a(e.element),n(`grabbedBoxes`,t=>[...t,e])},removeGrabbedBox:e=>{n(`grabbedBoxes`,t=>t.filter(t=>t.id!==e))},clearGrabbedBoxes:()=>{n(`grabbedBoxes`,[])},addLabelInstance:e=>{e.element&&_a(e.element);for(let t of e.elements??[])_a(t);n(`labelInstances`,t=>[...t,e])},updateLabelInstance:(e,r,i)=>{let a=t.labelInstances.findIndex(t=>t.id===e);a!==-1&&x(()=>{n(`labelInstances`,a,`status`,r),i===void 0?r!==`error`&&n(`labelInstances`,a,`errorMessage`,void 0):n(`labelInstances`,a,`errorMessage`,i)})},removeLabelInstance:e=>{n(`labelInstances`,t=>t.filter(t=>t.id!==e))},clearLabelInstances:()=>{n(`labelInstances`,[])},showContextMenu:(e,t)=>{let{x:r,y:i}=oa(Y(t));_a(t),x(()=>{n(`contextMenuPosition`,e),n(`contextMenuElement`,t),n(`contextMenuClickOffset`,{x:e.x-r,y:e.y-i})})},hideContextMenu:()=>{x(()=>{n(`contextMenuPosition`,null),n(`contextMenuElement`,null),n(`contextMenuClickOffset`,null)})},updateContextMenuPosition:()=>{let e=t.contextMenuElement,r=t.contextMenuClickOffset;if(!e||!r||!X(e))return;let{x:i,y:a}=oa(Y(e));n(`contextMenuPosition`,{x:i+r.x,y:a+r.y})}};return{store:t,actions:f,pointer:r,viewportVersion:a,current:s}};var Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,Ia=c((()=>{Ca=class extends Error{constructor(e,t){super(e,t),this.name=`ReactGrabError`}},wa=class extends Ca{constructor(e,t){super(e,{cause:t}),this.name=`RecoverableError`}},Ta=class extends Ca{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},Ea=class extends wa{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},Da=class extends wa{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},Oa=class extends wa{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},ka=class extends wa{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},Aa=class extends wa{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},ja=class extends wa{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},Ma=class extends Ca{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},Na=class extends Ca{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},Pa=class extends Ca{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},Fa=class extends Ca{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}}})),La,Ra=c((()=>{ea(),La=e=>Qi(e)?.getTagName()??(e.tagName||``).toLowerCase()})),za,Ba,Va,Ha,Ua,Wa=c((()=>{Ra(),za=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],Ba=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},Va=e=>{if(document.designMode===`on`)return!0;let t=Ba(e);if(!t)return!1;if(t.isContentEditable)return!0;let n=La(t);return za.some(e=>e===n||e===t.role)},Ha=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},Ua=()=>{let e=window.getSelection();return e?e.toString().length>0:!1}})),Ga,Ka,qa=c((()=>{Ga=new WeakMap,Ka=(e=document)=>{let t=Ga.get(e);if(t!==void 0)return t;let n=e.querySelector(`script[nonce], style[nonce]`),r=n?.nonce||n?.getAttribute(`nonce`)||null;return r&&Ga.set(e,r),r}})),Ja,Ya,Xa=c((()=>{Ja=[[`data-rr-block`,``],[`data-rr-ignore`,``],[`data-rr-mask`,``],[`data-sentry-block`,``],[`data-sentry-ignore`,``],[`data-sentry-mask`,``],[`data-dd-privacy`,`hidden`],[`data-fs-exclude`,``],[`data-lr-exclude`,``],[`data-hj-suppress`,``],[`data-recording-disable`,``],[`data-clarity-mask`,`true`],[`data-heap-redact-text`,``]],Ya=e=>{for(let[t,n]of Ja)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)}})),Za,Qa=c((()=>{J(),Za=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===9})),$a,eo=c((()=>{ua(),Qa(),lr(),$a=e=>{if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return la(t)?t.host:Za(t)?cr(t.defaultView):null}})),to,no=c((()=>{eo(),ea(),to=(e,t)=>{let n=Qi(e)?.hostElement??e;for(;n;){if(n===t)return!0;n=$a(n)}return!1}})),ro,io,ao,oo,so,co=c((()=>{no(),ro=null,io=e=>{ro=e},ao=()=>ro,oo=e=>ro?e?to(e,ro):!1:!0,so=e=>e})),lo,uo=c((()=>{co(),lo=`data-react-grab`}));Ia(),Wa(),J(),qa(),Xa(),uo();let fo=e=>{if(!document.body)return;let t=document.querySelectorAll(`[${lo}]`);for(let n of t)n!==e&&n.parentNode!==e&&(n.shadowRoot||n.remove());document.body.appendChild(e)},po=e=>{if(document.body)return fo(e),()=>{};let t=()=>{document.removeEventListener(`DOMContentLoaded`,t),fo(e)};return document.addEventListener(`DOMContentLoaded`,t,{once:!0}),()=>document.removeEventListener(`DOMContentLoaded`,t)},mo=e=>{let t=window.setTimeout(()=>{fo(e)},Gn),n=new MutationObserver(()=>{e.parentNode!==document.body&&fo(e)});return n.observe(document.documentElement,{childList:!0}),()=>{window.clearTimeout(t),n.disconnect()}},ho=e=>{let t=document.querySelectorAll(`[${lo}]`);for(let e of t){let t=e.shadowRoot?.querySelector(`[${lo}]`);if(t instanceof HTMLDivElement)return{root:t,host:e,cancelPendingAttachment:mo(e)};e.remove()}let n=document.createElement(`div`);n.setAttribute(lo,`true`),Ya(n),n.style.zIndex=String(_n),n.style.position=`fixed`,n.style.inset=`0`,n.style.pointerEvents=`none`,n.style.contain=`strict`;let r=n.attachShadow({mode:`open`}),i=document.createElement(`style`),a=Ka();a&&(i.nonce=a),i.textContent=e??``,r.appendChild(i);let o=document.createElement(`div`);o.setAttribute(lo,`true`),r.appendChild(o);let s=po(n),c=mo(n);return{root:o,host:n,cancelPendingAttachment:()=>{s(),c()}}};Lr(),Ji();let go=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,_o=[`rsc://`,`file:///`,`webpack-internal://`,`webpack://`,`node:`,`turbopack://`,`metro://`,`/app-pages-browser/`,`/(app-pages-browser)/`],vo=[`rsc://`,`about://React/`],yo=[`<anonymous>`,`eval`,``],bo=/\.(cjs|cts|js|jsx|mdx|mjs|mts|ts|tsx)$/,xo=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,So=/^\?[\w~.-]+(?:=[^&#]*)?(?:&[\w~.-]+(?:=[^&#]*)?)*$/,Co=/\(at [^)]+\)$/,wo=[`react_stack_bottom_frame`,`react-stack-bottom-frame`],To=Error,Eo=()=>To.prepareStackTrace,Do=e=>{To.prepareStackTrace=e},Oo=/(^|@)\S+:\d+/,ko=/^\s*at .*(\S+:\d+|\(native\))/m,Ao=/^(eval@)?(\[native code\])?$/,jo=(e,t)=>{if(t?.includeInElement!==!1){let t=e.split(`
11
- `),n=[];for(let e of t)if(/^\s*at\s+/.test(e)){let t=No(e)[0];t&&n.push(t)}else if(/^\s*in\s+/.test(e)){let t=e.replace(/^\s*in\s+/,``).replace(/\s*\(at .*\)$/,``);n.push({functionName:t,source:e})}else if(e.match(Oo)){let t=Po(e)[0];t&&n.push(t)}return n}return e.match(ko)?No(e):Po(e)},Mo=e=>{if(!e.includes(`:`))return[e,void 0,void 0];let t=e.startsWith(`(`)&&/:\d+\)$/.test(e)?e.slice(1,-1):e,n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t);return n?[n[1],n[2]||void 0,n[3]||void 0]:[t,void 0,void 0]},No=e=>e.split(`
12
- `).filter(e=>!!e.match(ko)).map(e=>{let t=e;t.includes(`(eval `)&&(t=t.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(,.*$)/g,``));let n=t.replace(/^\s+/,``).replace(/\(eval code/g,`(`).replace(/^.*?\s+/,``),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],``):n;let i=Mo(r?r[1]:n);return{functionName:r&&n||void 0,fileName:[`eval`,`<anonymous>`,`(native)`].includes(i[0])?void 0:i[0],lineNumber:i[1]?+i[1]:void 0,columnNumber:i[2]?+i[2]:void 0,source:t}}),Po=e=>e.split(`
13
- `).filter(e=>!e.match(Ao)).map(e=>{let t=e;if(t.includes(` > eval`)&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),!t.includes(`@`)&&!t.includes(`:`))return{functionName:t};{let e=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,n=t.match(e),r=n&&n[1]?n[1]:void 0,i=Mo(t.replace(e,``));return{functionName:r,fileName:i[0],lineNumber:i[1]?+i[1]:void 0,columnNumber:i[2]?+i[2]:void 0,source:t}}}),Fo=new WeakMap,Io=e=>wo.some(t=>e.includes(t)),Lo=e=>{let t=e.getFunctionName?.()??``;if(t)return t;let n=e.getTypeName?.()??``,r=e.getMethodName?.()??``;return n&&r?`${n}.${r}`:r},Ro=e=>{let t=[];for(let n=1;n<e.length;n++){let r=e[n],i=Lo(r);if(Io(i))return{frames:t,isTrusted:!0};if(r.isNative?.()){t.push({functionName:i||void 0});continue}let a=r.getScriptNameOrSourceURL?.()??``;!a&&r.isEval?.()&&(a=r.getEvalOrigin?.()??``),t.push({functionName:i&&i!==`<anonymous>`?i:void 0,fileName:a&&a!==`<anonymous>`?a:void 0,lineNumber:r.getLineNumber?.()??void 0,columnNumber:r.getColumnNumber?.()??void 0,enclosingLineNumber:r.getEnclosingLineNumber?.()??void 0,enclosingColumnNumber:r.getEnclosingColumnNumber?.()??void 0,source:` at ${r.toString()}`})}return{frames:t,isTrusted:!1}},zo=e=>{let t=-1;for(let n of wo)if(t=e.indexOf(n),t!==-1)break;return{frames:jo(t===-1?e:e.slice(0,e.lastIndexOf(`
14
- `,t))).slice(1),isTrusted:t!==-1}},Bo=e=>{let t=Fo.get(e);if(t)return t;let n=null,r=(e,t)=>{n=Ro(t);let r=`${e.name||`Error`}: ${e.message||``}`;for(let e of t)r+=`\n at ${e.toString()}`;return r},i=Eo();Do(r);let a;try{a=String(e.stack)}finally{Do(i)}let o=n??zo(a);return Fo.set(e,o),o},Vo=()=>{let e=Ir(),t=new Set([...Er,...e.renderers.values()]),n=[],r=new Set;for(let e of t){let t=e.currentDispatcherRef;!t||r.has(t)||(r.add(t),n.push(t))}return n},Ho=e=>`H`in e?e.H:e.current,Uo=(e,t)=>{`H`in e?e.H=t:e.current=t};var Wo=44,Go=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Ko=new Uint8Array(64),qo=new Uint8Array(128);for(let e=0;e<Go.length;e++){let t=Go.charCodeAt(e);Ko[e]=t,qo[t]=e}function Jo(e,t){let n=0,r=0,i=0;do i=qo[e.next()],n|=(i&31)<<r,r+=5;while(i&32);let a=n&1;return n>>>=1,a&&(n=-2147483648|-n),t+n}function Yo(e,t){return e.pos>=t?!1:e.peek()!==Wo}var Xo=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function Zo(e){let{length:t}=e,n=new Xo(e),r=[],i=0,a=0,o=0,s=0,c=0;do{let e=n.indexOf(`;`),t=[],l=!0,u=0;for(i=0;n.pos<e;){let r;i=Jo(n,i),i<u&&(l=!1),u=i,Yo(n,e)?(a=Jo(n,a),o=Jo(n,o),s=Jo(n,s),Yo(n,e)?(c=Jo(n,c),r=[i,a,o,s,c]):r=[i,a,o,s]):r=[i],t.push(r),n.pos++}l||Qo(t),r.push(t),n.pos=e+1}while(n.pos<=t);return r}function Qo(e){e.sort($o)}function $o(e,t){return e[0]-t[0]}let es=/^data:application\/json(?:;[^,]*)?,/i,ts=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,ns=new Map,rs=new WeakMap;var is=class extends Error{};let as=new Map,os=new WeakMap,ss=new Set([`chrome-extension:`,`moz-extension:`,`safari-web-extension:`]),cs=new Set([`http:`,`https:`,...ss]),ls=(e,t,n,r)=>{let[,i,a,o,s]=e;if(i===void 0||a===void 0||o===void 0)return null;let c=t[i];return c?{columnNumber:o,fileName:c,functionName:s===void 0?void 0:r?.[s]||void 0,isIgnoreListed:n?.has(i)??!1,lineNumber:a+1}:null},us=(e,t,n,r,i,a)=>{if(n<0||n>=e.length)return null;let o=e[n];if(!o||o.length===0)return null;let s=null,c=0,l=o.length-1;for(;c<=l;){let e=c+l>>1;o[e][0]<=r?(s=o[e],c=e+1):l=e-1}return!s||s.length<4?null:ls(s,t,i,a)},ds=(e,t,n)=>{if(e.sections){let r=t-1,i=null;for(let t of e.sections)if(r>t.offset.line||r===t.offset.line&&n>=t.offset.column)i=t;else break;if(!i)return null;let a=r-i.offset.line,o=r===i.offset.line?n-i.offset.column:n;return us(i.map.mappings,i.map.sources,a,o,i.map.ignoredSourceIndices,i.map.names)}return us(e.mappings,e.sources,t-1,n,e.ignoredSourceIndices,e.names)},fs=(e,t,n,r,i)=>{if(!n)return null;let a=n.indexOf(r);if(a===-1)return null;let o=null;for(let r of e)for(let e of r){if(e[4]!==a)continue;let r=ls(e,t,i,n);if(r){if(!r.isIgnoreListed)return r;o??=r}}return o},ps=(e,t)=>{if(e.sections){let n=null;for(let r of e.sections){let e=fs(r.map.mappings,r.map.sources,r.map.names,t,r.map.ignoredSourceIndices);if(e){if(!e.isIgnoreListed)return e;n??=e}}return n}return fs(e.mappings,e.sources,e.names,t,e.ignoredSourceIndices)},ms=(e,t)=>{if(es.test(e))return e;try{return new URL(e,t).toString()}catch{try{let n=new URL(e,new URL(t,`https://bippy.invalid/`));return`${n.pathname}${n.search}${n.hash}`}catch{return null}}},hs=e=>{try{let t=new URL(e),n=t.pathname.lastIndexOf(`.bundle`);if(n===-1)return null;let r=t.pathname.slice(n+7);if(r&&!r.startsWith(`//&`))return null;if(t.pathname=`${t.pathname.slice(0,n)}.map`,r){let e=new URLSearchParams(r.slice(3));for(let[n,r]of e)t.searchParams.set(n,r)}return t.hash=``,t.toString()}catch{return null}},gs=(e,t,n)=>{let r=n.headers.get(`sourcemap`)??n.headers.get(`x-sourcemap`);if(r)return ms(r.trim(),e);let i,a=t.length;for(;a>0&&!i;){let e=t.lastIndexOf(`
15
- `,a-1)+1,n=t.slice(e,a).match(ts);n&&(i=n[1]||n[2]),a=e-1}return i?ms(i,e):hs(e)},_s=e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`version`),n=Reflect.get(e,`mappings`),r=Reflect.get(e,`file`),i=Reflect.get(e,`names`),a=Reflect.get(e,`sourceRoot`),o=Reflect.get(e,`sources`),s=Reflect.get(e,`sourcesContent`),c=Reflect.get(e,`ignoreList`),l=Reflect.get(e,`x_google_ignoreList`);if(t!==3||typeof n!=`string`||r!==void 0&&typeof r!=`string`||i!==void 0&&(!Array.isArray(i)||i.some(e=>typeof e!=`string`))||a!==void 0&&typeof a!=`string`||s!==void 0&&(!Array.isArray(s)||s.some(e=>typeof e!=`string`&&e!==null))||c!==void 0&&(!Array.isArray(c)||c.some(e=>!Number.isInteger(e)||e<0))||l!==void 0&&(!Array.isArray(l)||l.some(e=>!Number.isInteger(e)||e<0))||!Array.isArray(o)||o.some(e=>typeof e!=`string`)||s&&s.length!==o.length)return!1;let u=o.length;return[...c??[],...l??[]].every(e=>e<u)},vs=e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`version`),n=Reflect.get(e,`sections`);return t!==3||!Array.isArray(n)?!1:n.every(e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`map`),n=Reflect.get(e,`url`),r=Reflect.get(e,`offset`);if(typeof r!=`object`||!r)return!1;let i=Reflect.get(r,`column`),a=Reflect.get(r,`line`);return _s(t)!==(typeof n==`string`&&n.length>0)&&typeof i==`number`&&Number.isInteger(i)&&i>=0&&typeof a==`number`&&Number.isInteger(a)&&a>=0})},ys=e=>{let t=e.ignoreList??e.x_google_ignoreList;return t?.length?new Set(t):void 0},bs=(e,t,n)=>{if(!e||go.test(t)||t.startsWith(`/`))return t;let r=e.endsWith(`/`)?e:`${e}/`,i=t.replace(/^\.\//,``);try{let e=go.test(r)?r:new URL(r,n).toString();return new URL(i,e).toString()}catch{let e=`${r}${i}`.split(`/`),t=[];for(let n of e)n===`..`?t.pop():n!==`.`&&t.push(n);return t.join(`/`)}},xs=(e,t)=>e.sources.map(n=>bs(e.sourceRoot,n,t)),Ss=(e,t)=>{try{return{file:e.file,ignoredSourceIndices:ys(e),mappings:Zo(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:xs(e,t),sourcesContent:e.sourcesContent,version:3}}catch{return null}},Cs=async(e,t,n)=>{let r=[],i=-1,a=-1;for(let o of e.sections){if(o.offset.line<i||o.offset.line===i&&o.offset.column<=a)return null;i=o.offset.line,a=o.offset.column;let e=o.url?ms(o.url,t):null,s=o.map??(e?await n(e):null);if(!s)return null;let c=e??t;try{r.push({map:{...s,ignoredSourceIndices:ys(s),mappings:Zo(s.mappings),sources:xs(s,c)},offset:o.offset})}catch{return null}}let o=new Set;for(let e of r)for(let t of e.map.sources)o.add(t);return{file:e.file,mappings:[],names:[],sections:r,sourceRoot:void 0,sources:Array.from(o),sourcesContent:void 0,version:3}},ws=(e,t=!1)=>{if(!e)return!1;let n=e.trim();if(!n)return!1;let r=n.match(go);if(!r)return!0;let i=r[0].toLowerCase();return t||cs.has(i)},Ts=()=>typeof window>`u`&&typeof process<`u`&&typeof process.versions?.node==`string`,Es=e=>{try{let t=new URL(e);return(t.protocol===`http:`||t.protocol===`https:`)&&!t.username&&!t.password}catch{return!1}},Ds=e=>{try{return new URL(e).protocol}catch{return null}},Os=e=>{let t=Ds(e);return t!==null&&ss.has(t)},ks=(e,t)=>{try{let n=new URL(e),r=new URL(t);return n.protocol===r.protocol&&n.host===r.host}catch{return!1}},As=(e,t,n,r)=>{if(es.test(t))return!0;if(!ws(t,r))return!1;let i=Ds(e),a=Ds(t),o=i!==null&&!cs.has(i)||a!==null&&!cs.has(a);return!(n||o||Os(e)||Os(t))||ks(e,t)},js=e=>e===408||e===425||e===429||e>=500,Ms=e=>{if(e.ok)return!0;if(js(e.status))throw new is;return!1},Ns=(e,t,n)=>!n||t.url.length===0||ks(e,t.url),Ps=e=>{if(e.timeoutMs===void 0||e.timeoutMs<0)return{cleanup:()=>{},signal:e.signal};let t=new AbortController,n=()=>t.abort(e.signal?.reason);e.signal?.aborted?n():e.signal?.addEventListener(`abort`,n,{once:!0});let r=setTimeout(()=>t.abort(new li(`Source map request timed out`)),e.timeoutMs);return{cleanup:()=>{clearTimeout(r),e.signal?.removeEventListener(`abort`,n)},signal:t.signal}},Fs=async(e,t)=>{let n=Number(e.headers.get(`content-length`));if(Number.isFinite(n)&&n>t)return null;if(!e.body){let n=await e.text();return new TextEncoder().encode(n).byteLength>t?null:n}let r=e.body.getReader(),i=new TextDecoder,a=[],o=0;try{for(;;){let{done:e,value:n}=await r.read();if(e)break;if(o+=n.byteLength,o>t)return await r.cancel(),null;a.push(i.decode(n,{stream:!0}))}return a.push(i.decode()),a.join(``)}finally{r.releaseLock()}},Is=e=>{try{if(typeof globalThis.atob==`function`)return new TextDecoder().decode(Uint8Array.from(globalThis.atob(e),e=>e.charCodeAt(0)))}catch{return null}let t=e.replace(/\s/g,``).replace(/=+$/,``),n=[],r=0,i=0;for(let e of t){let t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.indexOf(e);if(t===-1)return null;r=r*64+t,i+=6,i>=8&&(i-=8,n.push(Math.floor(r/2**i)&255),r%=2**i)}return new TextDecoder().decode(Uint8Array.from(n))},Ls=(e,t)=>{let n=e.indexOf(`,`);if(n===-1)return null;let r=e.slice(0,n),i=e.slice(n+1);if(i.length>t*2)return null;try{let e=r.toLowerCase().includes(`;base64`)?Is(i):decodeURIComponent(i);return e===null||new TextEncoder().encode(e).byteLength>t?null:JSON.parse(e)}catch{return null}},Rs=async(e,t,n,r,i)=>{if(es.test(e))return Ls(e,r);let a=await t(e,{redirect:i?`error`:`follow`,signal:n});if(!Ms(a)||!Ns(e,a,i))return null;let o=await Fs(a,r);if(o===null)return null;try{return JSON.parse(o)}catch{return null}},zs=async(e,t,n={})=>{let r=t!==void 0;if(!ws(e,r))return null;let i=Ts(),a=i||Os(e);if(i&&!t&&(!n.allowUnsafeServerFetch||!Es(e)))return null;let o=t??(typeof globalThis.fetch==`function`?globalThis.fetch.bind(globalThis):void 0);if(!o)return null;let s=n.maxBundleSizeBytes??26214400,c=n.maxSourceMapSizeBytes??104857600;if(s<0||c<0)return null;let l=Ps(n);try{let t=await o(e,{redirect:a?`error`:`follow`,signal:l.signal});if(!Ms(t)||!Ns(e,t,a))return null;let n=await Fs(t,s);if(n===null)return null;let i=gs(e,n,t);if(!i||!As(e,i,a,r))return null;let u=await Rs(i,o,l.signal,c,a);return _s(u)?Ss(u,i):vs(u)?Cs(u,i,async t=>{if(!As(e,t,a,r))return null;let n=await Rs(t,o,l.signal,c,a);return _s(n)?n:null}):null}finally{l.cleanup()}},Bs=(e,t,n)=>{if(!n)return t;let r=e.get(n);return r||(r=new Map,e.set(n,r)),r},Vs=e=>Bs(rs,ns,e),Hs=e=>Bs(os,as,e),Us=(e,t)=>t.allowUnsafeServerFetch===void 0&&t.maxBundleSizeBytes===void 0&&t.maxSourceMapSizeBytes===void 0&&t.timeoutMs===void 0?e:`${e}\0${t.allowUnsafeServerFetch??``}\0${t.maxBundleSizeBytes??``}\0${t.maxSourceMapSizeBytes??``}\0${t.timeoutMs??``}`,Ws=async(e,t=!0,n,r={})=>{let i=t&&r.signal===void 0,a=Vs(n),o=Hs(n),s=Us(e,r);if(i&&a.has(s))return a.get(s)??null;let c=i?o.get(s):void 0;if(c)return(await c).sourceMap;let l=zs(e,n,r).then(e=>({sourceMap:e,isTransientFailure:!1}),()=>({sourceMap:null,isTransientFailure:!0}));i&&o.set(s,l);let{sourceMap:u,isTransientFailure:d}=await l;return i&&(o.delete(s),d||a.set(s,u)),u},Gs=async(e,t=!0,n)=>Promise.all(e.map(async e=>{if(!e.fileName)return e;let r=await Ws(e.fileName,t,n);if(!r||typeof e.lineNumber!=`number`||typeof e.columnNumber!=`number`)return e;let i=ds(r,e.lineNumber,e.columnNumber);return i?{...e,source:i.fileName&&e.source?e.source.replace(e.fileName,i.fileName):e.source,fileName:i.fileName,functionName:i.functionName??e.functionName,lineNumber:i.lineNumber,columnNumber:i.columnNumber,isIgnoreListed:i.isIgnoreListed,isSymbolicated:!0}:e})),Ks=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack==`string`,qs=e=>`tag`in e&&typeof e.tag==`number`,Js=e=>{let t=null;if(zr(e,n=>{if(n===e)return!1;let r=n._debugOwner;return(r===e||e.alternate!==null&&r===e.alternate)&&n._debugStack instanceof Error&&(t=n._debugStack,!0)}),!t)return null;let{frames:n,isTrusted:r}=Bo(t);if(!r)return null;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t.fileName)return{...t,lineNumber:t.enclosingLineNumber||t.lineNumber,columnNumber:t.enclosingColumnNumber||t.columnNumber}}return null},Ys=()=>{let e=[];for(let t of Vo())e.push({currentDispatcherRef:t,value:Ho(t)}),Uo(t,null);return e},Xs=e=>{for(let{currentDispatcherRef:t,value:n}of e)Uo(t,n)},Zs=e=>`\n in ${e}`,Qs=(e,t)=>{let n=Zs(e);return t&&(n+=` (at ${t})`),n},$s=!1,ec=new WeakMap,tc=(e,t)=>{if(!e||$s)return``;let n=ec.get(e);if(n!==void 0)return n;let r=Eo();Do(void 0),$s=!0;let i=Ys(),a=console.error,o=console.warn;console.error=()=>{},console.warn=()=>{};try{let n={DetermineComponentFrameRoot(){let n;try{if(t){let t=function(){throw Error()};if(Object.defineProperty(t.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){n=e}Reflect.construct(e,[],t)}else{try{Function.prototype.apply.call(t,void 0,[])}catch(e){n=e}Function.prototype.apply.call(e,t.prototype,[])}}else{try{throw Error()}catch(e){n=e}let t=Function.prototype.apply.call(e,void 0,[]);typeof t==`object`&&t&&`catch`in t&&typeof t.catch==`function`&&t.catch(()=>void 0)}}catch(e){if(e instanceof Error&&n instanceof Error&&typeof e.stack==`string`)return[e.stack,n.stack]}return[null,null]}};Object.defineProperty(n.DetermineComponentFrameRoot,`displayName`,{value:`DetermineComponentFrameRoot`}),Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,`name`)?.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});let[r,i]=n.DetermineComponentFrameRoot();if(r&&i){let t=r.split(`
9
+ this.globalThis=this.globalThis||{},this.globalThis.__REACT_GRAB_MODULE__=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,t)=>()=>(e&&(t=e(e=0)),t),r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};function i(e){let t=String(e),n=t.length-1;return N.context.id+(n?String.fromCharCode(96+n):``)+t}function a(e){N.context=e}function o(){return{...N.context,id:N.getNextContextId(),count:0}}function s(e,t){let n=L,r=F,i=e.length===0,a=t===void 0?r:t,o=i?Me:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>g(()=>le(o)));F=o,L=null;try{return re(s,!0)}finally{L=n,F=r}}function c(e,t){t=t?Object.assign({},De,t):De;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[E.bind(n),e=>(typeof e==`function`&&(e=I&&I.running&&I.sources.has(n)?e(n.tValue):e(n.value)),te(n,e))]}function l(e,t,n){let r=k(e,t,!0,Ae);Pe&&I&&I.running?Ie.push(r):D(r)}function u(e,t,n){let r=k(e,t,!1,Ae);Pe&&I&&I.running?Ie.push(r):D(r)}function d(e,t,n){ke=oe;let r=k(e,t,!1,Ae),i=Ve&&T(Ve);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),Le?Le.push(r):D(r)}function f(e,t,n){n=n?Object.assign({},De,n):De;let r=k(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Pe&&I&&I.running?(r.tState=Ae,Ie.push(r)):D(r),E.bind(r)}function p(e){return e&&typeof e==`object`&&`then`in e}function m(e,t,n){let r,i,a;typeof t==`function`?(r=e,i=t,a=n||{}):(r=!0,i=e,a=t||{});let o=null,s=Ne,u=null,d=!1,m=!1,h=`initialValue`in a,_=typeof r==`function`&&f(r),v=new Set,[y,b]=(a.storage||c)(a.initialValue),[x,C]=c(void 0),[w,ee]=c(void 0,{equals:!1}),[E,te]=c(h?`ready`:`unresolved`);N.context&&(u=N.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:N.load&&N.has(u)&&(s=N.load(u)));function D(e,t,n,r){return o===e&&(o=null,r!==void 0&&(h=!0),(e===s||t===s)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(r,{value:t})),s=Ne,I&&e&&d?(I.promises.delete(e),d=!1,re(()=>{I.running=!0,O(t,n)},!1)):O(t,n)),t}function O(e,t){re(()=>{t===void 0&&b(()=>e),te(t===void 0?h?`ready`:`unresolved`:`errored`),C(t);for(let e of v.keys())e.decrement();v.clear()},!1)}function k(){let e=Ve&&T(Ve),t=y(),n=x();if(n!==void 0&&!o)throw n;return L&&!L.user&&e&&l(()=>{w(),o&&(e.resolved&&I&&d?I.promises.add(o):v.has(e)||(e.increment(),v.add(e)))}),t}function ne(e=!0){if(e!==!1&&m)return;m=!1;let t=_?_():r;if(d=I&&I.running,t==null||t===!1){D(o,g(y));return}I&&o&&I.promises.delete(o);let n,a=s===Ne?g(()=>{try{return i(t,{value:y(),refetching:e})}catch(e){n=e}}):s;if(n!==void 0){D(o,void 0,de(n),t);return}else if(!p(a))return D(o,a,void 0,t),a;return o=a,`v`in a?(a.s===1?D(o,a.v,void 0,t):D(o,void 0,de(a.v),t),a):(m=!0,queueMicrotask(()=>m=!1),re(()=>{te(h?`refreshing`:`pending`),ee()},!1),a.then(e=>D(a,e,void 0,t),e=>D(a,void 0,de(e),t)))}Object.defineProperties(k,{state:{get:()=>E()},error:{get:()=>x()},loading:{get(){let e=E();return e===`pending`||e===`refreshing`}},latest:{get(){if(!h)return k();let e=x();if(e&&!o)throw e;return y()}}});let ie=F;return _?l(()=>(ie=F,ne(!1))):ne(!1),[k,{refetch:e=>S(ie,()=>ne(e)),mutate:b}]}function h(e){return re(e,!1)}function g(e){if(!Fe&&L===null)return e();let t=L;L=null;try{return Fe?Fe.untrack(e):e()}finally{L=t}}function _(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=g(()=>t(o,i,n));return i=o,s}}function v(e){d(()=>g(e))}function y(e){return F===null||(F.cleanups===null?F.cleanups=[e]:F.cleanups.push(e)),e}function b(){return L}function x(){return F}function S(e,t){let n=F,r=L;F=e,L=null;try{return re(t,!0)}catch(e){pe(e)}finally{F=n,L=r}}function C(e){if(I&&I.running)return e(),I.done;let t=L,n=F;return Promise.resolve().then(()=>{L=t,F=n;let r;return(Pe||Ve)&&(r=I||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||=new Promise(e=>r.resolve=e),r.running=!0),re(e,!1),L=F=null,r?r.done:void 0})}function w(e,t){let n=Symbol(`context`);return{id:n,Provider:he(n),defaultValue:e}}function T(e){let t;return F&&F.context&&(t=F.context[e.id])!==void 0?t:e.defaultValue}function ee(e){let t=f(e),n=f(()=>me(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}function E(){let e=I&&I.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Ae)D(this);else{let e=Ie;Ie=null,re(()=>se(this),!1),Ie=e}if(L){let e=this.observers?this.observers.length:0;L.sources?(L.sources.push(this),L.sourceSlots.push(e)):(L.sources=[this],L.sourceSlots=[e]),this.observers?(this.observers.push(L),this.observerSlots.push(L.sources.length-1)):(this.observers=[L],this.observerSlots=[L.sources.length-1])}return e&&I.sources.has(this)?this.tValue:this.value}function te(e,t,n){let r=I&&I.running&&I.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(I){let r=I.running;(r||!n&&I.sources.has(e))&&(I.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&re(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=I&&I.running;r&&I.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?Ie.push(n):Le.push(n),n.observers&&ce(n)),r?n.tState=Ae:n.state=Ae)}if(Ie.length>1e6)throw Ie=[],Error()},!1)}return t}function D(e){if(!e.fn)return;le(e);let t=Re;O(e,I&&I.running&&I.sources.has(e)?e.tValue:e.value,t),I&&!I.running&&I.sources.has(e)&&queueMicrotask(()=>{re(()=>{I&&(I.running=!0),L=F=e,O(e,e.tValue,t),L=F=null},!1)})}function O(e,t,n){let r,i=F,a=L;L=F=e;try{r=e.fn(t)}catch(t){return e.pure&&(I&&I.running?(e.tState=Ae,e.tOwned&&e.tOwned.forEach(le),e.tOwned=void 0):(e.state=Ae,e.owned&&e.owned.forEach(le),e.owned=null)),e.updatedAt=n+1,pe(t)}finally{L=a,F=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?te(e,r,!0):I&&I.running&&e.pure?(I.sources.has(e)||(e.value=r),I.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function k(e,t,n,r=Ae,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:F,context:F?F.context:null,pure:n};if(I&&I.running&&(a.state=0,a.tState=r),F===null||F!==Me&&(I&&I.running&&F.pure?F.tOwned?F.tOwned.push(a):F.tOwned=[a]:F.owned?F.owned.push(a):F.owned=[a]),Fe&&a.fn){let e=a.fn,[t,n]=c(void 0,{equals:!1}),r=Fe.factory(e,n);y(()=>r.dispose());let i,o=()=>C(n).then(()=>{i&&=(i.dispose(),void 0)});a.fn=n=>(t(),I&&I.running?(i||=Fe.factory(e,o),i.track(n)):r.track(n))}return a}function ne(e){let t=I&&I.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===je)return se(e);if(e.suspense&&g(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Re);){if(t&&I.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(I.disposed.has(t))return}if((t?e.tState:e.state)===Ae)D(e);else if((t?e.tState:e.state)===je){let t=Ie;Ie=null,re(()=>se(e,n[0]),!1),Ie=t}}}function re(e,t){if(Ie)return e();let n=!1;t||(Ie=[]),Le?n=!0:Le=[],Re++;try{let t=e();return ie(n),t}catch(e){n||(Le=null),Ie=null,pe(e)}}function ie(e){if(Ie&&=(Pe&&I&&I.running?A(Ie):ae(Ie),null),e)return;let t;if(I){if(!I.promises.size&&!I.queue.size){let e=I.sources,n=I.disposed;Le.push.apply(Le,I.effects),t=I.resolve;for(let e of Le)`tState`in e&&(e.state=e.tState),delete e.tState;I=null,re(()=>{for(let e of n)le(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)le(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}Be(!1)},!1)}else if(I.running){I.running=!1,I.effects.push.apply(I.effects,Le),Le=null,Be(!0);return}}let n=Le;Le=null,n.length&&re(()=>ke(n),!1),t&&t()}function ae(e){for(let t=0;t<e.length;t++)ne(e[t])}function A(e){for(let t=0;t<e.length;t++){let n=e[t],r=I.queue;r.has(n)||(r.add(n),Pe(()=>{r.delete(n),re(()=>{I.running=!0,ne(n)},!1),I&&(I.running=!1)}))}}function oe(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:ne(r)}if(N.context){if(N.count){N.effects||=[],N.effects.push(...e.slice(0,n));return}a()}for(N.effects&&(N.done||!N.count)&&(e=[...N.effects,...e],n+=N.effects.length,delete N.effects),t=0;t<n;t++)ne(e[t])}function se(e,t){let n=I&&I.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===Ae?i!==t&&(!i.updatedAt||i.updatedAt<Re)&&ne(i):e===je&&se(i,t)}}}function ce(e){let t=I&&I.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=je:r.state=je,r.pure?Ie.push(r):Le.push(r),r.observers&&ce(r))}}function le(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)le(e.tOwned[t]);delete e.tOwned}if(I&&I.running&&e.pure)ue(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)le(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}I&&I.running?e.tState=0:e.state=0}function ue(e,t){if(t||(e.tState=0,I.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)ue(e.owned[t])}function de(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function fe(e,t,n){try{for(let n of t)n(e)}catch(e){pe(e,n&&n.owner||null)}}function pe(e,t=F){let n=Oe&&t&&t.context&&t.context[Oe],r=de(e);if(!n)throw r;Le?Le.push({fn(){fe(r,n,t)},state:Ae}):fe(r,n,t)}function me(e){if(typeof e==`function`&&!e.length)return me(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=me(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function he(e,t){return function(t){let n;return u(()=>n=g(()=>(F.context={...F.context,[e]:t.value},ee(()=>t.children))),void 0),n}}function ge(e){for(let t=0;t<e.length;t++)e[t]()}function _e(e,t,n={}){let r=[],i=[],a=[],o=0,l=t.length>1?[]:null;return y(()=>ge(a)),()=>{let u=e()||[],d=u.length,f,p;return u[Ee],g(()=>{let e,t,c,h,g,_,v,y,b;if(d===0)o!==0&&(ge(a),a=[],r=[],i=[],o=0,l&&=[]),n.fallback&&(r=[He],i[0]=s(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(d),p=0;p<d;p++)r[p]=u[p],i[p]=s(m);o=d}else{for(c=Array(d),h=Array(d),l&&(g=Array(d)),_=0,v=Math.min(o,d);_<v&&r[_]===u[_];_++);for(v=o-1,y=d-1;v>=_&&y>=_&&r[v]===u[y];v--,y--)c[y]=i[v],h[y]=a[v],l&&(g[y]=l[v]);for(e=new Map,t=Array(y+1),p=y;p>=_;p--)b=u[p],f=e.get(b),t[p]=f===void 0?-1:f,e.set(b,p);for(f=_;f<=v;f++)b=r[f],p=e.get(b),p!==void 0&&p!==-1?(c[p]=i[f],h[p]=a[f],l&&(g[p]=l[f]),p=t[p],e.set(b,p)):a[f]();for(p=_;p<d;p++)p in c?(i[p]=c[p],a[p]=h[p],l&&(l[p]=g[p],l[p](p))):i[p]=s(m);i=i.slice(0,o=d),r=u.slice(0)}return i});function m(e){if(a[p]=e,l){let[e,n]=c(p);return l[p]=n,t(u[p],e)}return t(u[p])}}}function j(e,t){if(Ue&&N.context){let n=N.context;a(o());let r=g(()=>e(t||{}));return a(n),r}return g(()=>e(t||{}))}function ve(){return!0}function ye(e){return(e=typeof e==`function`?e():e)?e:{}}function be(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function xe(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&P in r,e[n]=typeof r==`function`?(t=!0,f(r)):r}if(Te&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=ye(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in ye(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(ye(e[n])));return[...new Set(t)]}},We);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:be.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},a=Object.keys(r);for(let e=a.length-1;e>=0;e--){let t=a[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function Se(e,...t){let n=t.length;if(Te&&P in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},We));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return r.includes(t)?!1:t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},We)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}function Ce(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return f(_e(()=>e.each,e.children,t||void 0))}function M(e){let t=e.keyed,n=f(()=>e.when,void 0,void 0),r=t?n:f(n,void 0,{equals:(e,t)=>!e==!t});return f(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?g(()=>a(t?i:()=>{if(!g(r))throw Ge(`Show`);return n()})):a}return e.fallback},void 0,void 0)}var N,we,P,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,F,I,Pe,Fe,L,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,R=n((()=>{N={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return i(this.context.count)},getNextContextId(){return i(this.context.count++)}},we=(e,t)=>e===t,P=Symbol(`solid-proxy`),Te=typeof Proxy==`function`,Ee=Symbol(`solid-track`),De={equals:we},Oe=null,ke=ae,Ae=1,je=2,Me={owned:null,cleanups:null,context:null,owner:null},Ne={},F=null,I=null,Pe=null,Fe=null,L=null,Ie=null,Le=null,Re=0,[ze,Be]=c(!1),He=Symbol(`fallback`),Ue=!1,We={get(e,t,n){return t===P?n:e.get(t)},has(e,t){return t===P?!0:e.has(t)},set:ve,deleteProperty:ve,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ve,deleteProperty:ve}},ownKeys(e){return e.keys()}},Ge=e=>`Stale read from <${e}>.`}));function Ke(e,t){let n=_t[e];return typeof n==`object`?n[t]?n.$:void 0:n}function qe(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}function Je(e,t,n,r={}){let i;return s(r=>{i=r,t===document?e():W(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function z(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>g(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Ye(e,t=window.document){let n=t[xt]||(t[xt]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,st))}}function B(e,t,n){rt(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Xe(e,t,n,r){rt(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Ze(e,t,n){rt(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function V(e,t){rt(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function H(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function Qe(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(at(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(at(e,i,!0),n[i]=o)}return n}function $e(e,t,n){if(!t)return n?B(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function U(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function et(e,t={},n,r){let i={};return r||u(()=>i.children=ct(e,t.children,i.children)),u(()=>typeof t.ref==`function`&&tt(t.ref,e)),u(()=>nt(e,t,n,!0,i,!0)),i}function tt(e,t,n){return g(()=>e(t,n))}function W(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return ct(e,t,r,n);u(r=>ct(e,t(),r,n),r)}function nt(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=ot(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||ct(e,t.children);continue}let s=t[o];i[o]=ot(e,o,s,i[o],n,a,t)}}function rt(e){return!!N.context&&!N.done&&(!e||e.isConnected)}function it(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function at(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function ot(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return $e(e,n,r);if(t===`classList`)return Qe(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=vt.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(H(e,i,n,a),a&&Ye([i]))}else if(t.slice(0,5)===`attr:`)B(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Ze(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=ht.has(t))||!i&&((u=Ke(t,e.tagName))||(c=mt.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(rt(e))return n;t===`class`||t===`className`?V(e,n):s&&!c&&!l?e[it(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&yt[t.split(`:`)[0]];r?Xe(e,r,t,n):B(e,gt[t]||t,n)}return n}function st(e){if(N.registry&&N.events&&N.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,`target`,{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,`currentTarget`,{configurable:!0,get(){return t||document}}),N.registry&&!N.done&&(N.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function ct(e,t,n,r,i){let a=rt(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=dt(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=dt(e,n,r)}else if(o===`function`)return u(()=>{let i=t();for(;typeof i==`function`;)i=i();n=ct(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(lt(o,t,n,i))return u(()=>n=ct(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=dt(e,n,r),s)return n}else c?n.length===0?ut(e,o,r):qe(e,n,o):(n&&dt(e),ut(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=dt(e,n,r,t);dt(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function lt(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=lt(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=lt(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function ut(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function dt(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function ft(e,t=!1,n=void 0){return t?document.createElementNS(St,e):document.createElement(e,{is:n})}function pt(e){let{useShadow:t}=e,n=document.createTextNode(``),r=()=>e.mount||document.body,i=x(),a,o=!!N.context;return d(()=>{o&&(x().user=o=!1),a||=S(i,()=>f(()=>e.children));let l=r();if(l instanceof HTMLHeadElement){let[e,t]=c(!1);s(t=>W(l,()=>e()?t():a(),null)),y(()=>t(!0))}else{let r=ft(e.isSVG?`g`:`div`,e.isSVG),i=t&&r.attachShadow?r.attachShadow({mode:`open`}):r;Object.defineProperty(r,`_$host`,{get(){return n.parentNode},configurable:!0}),W(i,a),l.appendChild(r),e.ref&&e.ref(r),y(()=>l.removeChild(r))}},void 0,{render:!o}),n}var mt,ht,gt,_t,vt,yt,bt,xt,St,G=n((()=>{R(),mt=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`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`.split(`.`)]),ht=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),gt=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),_t=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}}),vt=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),yt={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},bt=e=>f(()=>e()),xt=`_$DX_DELEGATE`,St=`http://www.w3.org/2000/svg`}));G();var Ct=`/*! tailwindcss v4.3.0 | 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-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}}}@layer theme{:root,:host{--font-sans:"Geist", ui-sans-serif, system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:4px;--font-weight-medium:500;--radius-sm:4px;--ease-out:cubic-bezier(0, 0, .2, 1);--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);--ease-drawer:cubic-bezier(.32, .72, 0, 1);--ease-spring:cubic-bezier(.34, 1.56, .64, 1)}}@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{.a11y-hitbox{position:relative}.a11y-hitbox:before{content:"";pointer-events:auto;width:100%;min-width:24px;height:100%;min-height:24px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.top-0{top:calc(var(--spacing) * 0)}.top-full{top:100%}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.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\\.5{margin:calc(var(--spacing) * -.5)}.m-0{margin:calc(var(--spacing) * 0)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-my-1\\.5{margin-block:calc(var(--spacing) * -1.5)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2\\.5{margin-right:calc(var(--spacing) * 2.5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.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)}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height: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}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.96)}.press-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}.press-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);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,)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.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{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.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-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[14px\\]{border-radius:14px}.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-\\[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-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\\[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-\\[var\\(--rg-border-button\\)\\]{border-color:var(--rg-border-button)}.border-\\[var\\(--rg-border-subtle\\)\\]{border-color:var(--rg-border-subtle)}.border-t-\\[var\\(--rg-border-subtle\\)\\]{border-top-color:var(--rg-border-subtle)}.bg-\\[var\\(--rg-error-bg\\)\\]{background-color:var(--rg-error-bg)}.bg-\\[var\\(--rg-panel-bg\\)\\]{background-color:var(--rg-panel-bg)}.bg-\\[var\\(--rg-submit-bg\\)\\]{background-color:var(--rg-submit-bg)}.bg-\\[var\\(--rg-surface-hover\\)\\]{background-color:var(--rg-surface-hover)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing) * 0)}.px-0\\.25{padding-inline:calc(var(--spacing) * .25)}.px-1{padding-inline:calc(var(--spacing) * 1)}.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)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-1\\.5{padding-bottom:calc(var(--spacing) * 1.5)}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.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-\\[var\\(--rg-error-text\\)\\]{color:var(--rg-error-text)}.text-\\[var\\(--rg-submit-fg\\)\\]{color:var(--rg-submit-fg)}.text-\\[var\\(--rg-text-primary\\)\\]{color:var(--rg-text-primary)}.text-\\[var\\(--rg-text-primary-85\\)\\]{color:var(--rg-text-primary-85)}.text-\\[var\\(--rg-text-secondary\\)\\]{color:var(--rg-text-secondary)}.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-50{opacity:.5}.opacity-60{opacity:.6}.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)}.\\[box-shadow\\:var\\(--rg-shadow\\)\\]{box-shadow:var(--rg-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\\:var\\(--rg-drop-shadow\\)\\]{filter:var(--rg-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,)}.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\\]{transition-property:grid-template-columns;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;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-\\[padding\\,border-radius\\,transform\\]{transition-property:padding,border-radius,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\\,border-radius\\]{transition-property:top,left,width,height,opacity,border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,color\\]{transition-property:transform,color;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))}.delay-\\[80ms\\]{transition-delay:80ms}.duration-60{--tw-duration:60ms;transition-duration:60ms}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-140{--tw-duration:.14s;transition-duration:.14s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-180{--tw-duration:.18s;transition-duration:.18s}.duration-220{--tw-duration:.22s;transition-duration:.22s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-drawer{--tw-ease:var(--ease-drawer);transition-timing-function:var(--ease-drawer)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.ease-spring{--tw-ease:var(--ease-spring);transition-timing-function:var(--ease-spring)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.will-change-transform{will-change: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}@media (hover:hover){.group-hover\\:text-\\[var\\(--rg-text-primary\\)\\]:is(:where(.group):hover *){color:var(--rg-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:bg-\\[var\\(--rg-error-bg-hover\\)\\]:hover{background-color:var(--rg-error-bg-hover)}.hover\\:bg-\\[var\\(--rg-surface-active\\)\\]:hover{background-color:var(--rg-surface-active)}.hover\\:bg-\\[var\\(--rg-surface-hover\\)\\]:hover{background-color:var(--rg-surface-hover)}.hover\\:text-\\[var\\(--rg-text-primary\\)\\]:hover{color:var(--rg-text-primary)}}.focus\\:opacity-100:focus{opacity:1}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}:host,[data-rg-theme=dark]{--rg-panel-bg:#161616;--rg-text-primary:#fff;--rg-text-secondary:#a7a7a7;--rg-surface-hover:#ffffff1a;--rg-surface-active:#ffffff26;--rg-border-subtle:#ffffff1a;--rg-border-button:#fff3;--rg-submit-bg:#fff;--rg-submit-fg:#161616;--rg-error-text:#f87171;--rg-error-bg:#3d1515;--rg-error-bg-hover:#4d1f1f;--rg-shadow:0 2px 8px #00000014;--rg-drop-shadow:drop-shadow(0px 2px 8px #00000014);--rg-shimmer-from:#a1a1aa;--rg-shimmer-to:#d4d4d8;--rg-text-primary-85:#ffffffd9}@media (prefers-color-scheme:dark){:host:not([data-rg-theme]){--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}}:host([data-rg-theme=light]),[data-rg-theme=light]{--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}@media (prefers-reduced-motion:reduce){:host,:host *,:host :before,:host :after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}:host :focus{box-shadow:none!important;outline:none!important}@keyframes shake{0%,to{translate:0}15%,45%{translate:calc(-3px * var(--rg-shake-x,1)) calc(-3px * var(--rg-shake-y,0))}30%,60%{translate:calc(3px * var(--rg-shake-x,1)) calc(3px * var(--rg-shake-y,0))}75%{translate:calc(-2px * var(--rg-shake-x,1)) calc(-2px * var(--rg-shake-y,0))}90%{translate:calc(2px * var(--rg-shake-x,1)) calc(2px * var(--rg-shake-y,0))}}@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{background:linear-gradient(90deg, var(--rg-shimmer-from) 0%, var(--rg-shimmer-to) 25%, var(--rg-shimmer-from) 50%, var(--rg-shimmer-to) 75%, var(--rg-shimmer-from) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake,.animate-shake-vertical{will-change:translate;animation:.3s ease-out shake}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.animate-tooltip-fade-in{will-change:transform, opacity;animation:.1s ease-out tooltip-fade-in}.animate-shake-vertical{--rg-shake-x:0;--rg-shake-y:1}@supports (-webkit-touch-callout:none){textarea[data-react-grab-input]{font-size:16px}}@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}`;R();let wt=Symbol(`store-raw`),Tt=Symbol(`store-node`),Et=Symbol(`store-has`),Dt=Symbol(`store-self`);function Ot(e){let t=e[P];if(!t&&(Object.defineProperty(e,P,{value:t=new Proxy(e,Ft)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,a=n.length;i<a;i++){let a=n[i];r[a].get&&Object.defineProperty(e,a,{enumerable:r[a].enumerable,get:r[a].get.bind(t)})}}return t}function kt(e){let t;return typeof e==`object`&&!!e&&(e[P]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function K(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[wt])return n;if(!kt(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=K(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=K(i,t))!==i&&(e[a]=r))}return e}function At(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function jt(e,t,n){if(e[t])return e[t];let[r,i]=c(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function Mt(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===P||t===Tt?n:(delete n.value,delete n.writable,n.get=()=>e[P][t],n)}function Nt(e){b()&&jt(At(e,Tt),Dt)()}function Pt(e){return Nt(e),Reflect.ownKeys(e)}let Ft={get(e,t,n){if(t===wt)return e;if(t===P)return n;if(t===Ee)return Nt(e),n;let r=At(e,Tt),i=r[t],a=i?i():e[t];if(t===Tt||t===Et||t===`__proto__`)return a;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);b()&&(typeof a!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(a=jt(r,t,a)())}return kt(a)?Ot(a):a},has(e,t){return t===wt||t===P||t===Ee||t===Tt||t===Et||t===`__proto__`?!0:(b()&&jt(At(e,Et),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Pt,getOwnPropertyDescriptor:Mt};function It(e,t,n,r=!1){if(!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[Et]&&e[Et][t]&&i!==void 0&&e[Et][t].$()):(e[t]=n,e[Et]&&e[Et][t]&&i===void 0&&e[Et][t].$());let o=At(e,Tt),s;if((s=jt(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=jt(o,`length`,a))&&s.$(e.length)}(s=o[Dt])&&s.$()}function Lt(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];It(e,i,t[i])}}function Rt(e,t){if(typeof t==`function`&&(t=t(e)),t=K(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&It(e,n,r)}It(e,`length`,r)}else Lt(e,t)}function zt(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)zt(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&zt(e,[i].concat(t),n);return}else if(o&&a===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)zt(e,[r].concat(t),n);return}else if(t.length>1){zt(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let a=t[0];typeof a==`function`&&(a=a(i,n),a===i)||r===void 0&&a==null||(a=K(a),r===void 0||kt(i)&&kt(a)&&!Array.isArray(a)?Lt(i,a):It(e,r,a))}function Bt(...[e,t]){let n=K(e||{}),r=Array.isArray(n),i=Ot(n);function a(...e){h(()=>{r&&e.length===1?Rt(n,e[0]):zt(n,e)})}return[i,a]}let Vt=new WeakMap,Ht={get(e,t){if(t===wt)return e;let n=e[t],r;return kt(n)?Vt.get(n)||(Vt.set(n,r=new Proxy(n,Ht)),r):n},set(e,t,n){return It(e,t,K(n)),!0},deleteProperty(e,t){return It(e,t,void 0,!0),!0}};function Ut(e){return t=>{if(kt(t)){let n;(n=Vt.get(t))||Vt.set(t,n=new Proxy(t,Ht)),e(n)}return t}}var Wt,Gt,Kt=n((()=>{Wt=null,Gt=()=>{if(Wt!==null)return Wt;try{Wt=window.matchMedia(`(color-gamut: p3)`).matches}catch{Wt=!1}return Wt}})),qt,Jt,Yt,Xt,Zt=n((()=>{Kt(),qt=Gt(),Jt=`210, 57, 192`,Yt=`0.84 0.19 0.78`,Xt=e=>qt?`color(display-p3 ${Yt} / ${e})`:`rgba(${Jt}, ${e})`})),Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,q,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,J=n((()=>{Zt(),Qt=`0.2.0-dev.6fa4e51`,$t=`var(--rg-panel-bg)`,en=`var(--rg-shadow)`,tn=-1e3,nn=.95,rn=1500,an=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],on=5e3,sn=8e3,cn=1e4,ln=.5,un=2147483647,q=2147483645,dn=2147483644,fn=.7,pn=1e3/60,mn=.01,hn=Xt(.4),gn=Xt(.05),_n=Xt(.5),vn=Xt(.08),yn=Xt(.15),bn=.2,xn=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],Sn=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),Cn=new Set([`a`,`button`,`code`,`label`,`option`,`pre`,`summary`,`text`]),wn=new Set([`script`,`style`,`template`,`noscript`]),Tn=[`Meta`,`Control`,`Shift`,`Alt`],En=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),Dn=`data-react-grab-frozen`,On=`data-react-grab-same-origin-frame`,kn=`data-react-grab-hit-test-shield`,An=.5,jn=`data-react-grab-input`,Mn=.9,Nn=.5,Pn=`copy`,Fn=`comment`,In=`superellipse(1.25)`,Ln=.01,Rn=1e3,zn={left:-9999,top:-9999},Bn={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},Vn=1e3,Hn=-9999})),Un,Wn=n((()=>{Un=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE})),Gn,Kn=n((()=>{Wn(),Gn=e=>Un(e)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`})),qn,Jn=n((()=>{Kn(),qn=e=>Gn(e)&&e.tagName===`IFRAME`})),Yn,Xn,Zn,Qn=n((()=>{J(),Yn=new WeakMap,Xn=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},Zn=e=>{let t=performance.now(),n=Yn.get(e);if(n&&t-n.timestamp<16)return n.metrics;let r=e.ownerDocument.defaultView?.getComputedStyle(e),i;if(!r)i={contentOffsetX:e.clientLeft,contentOffsetY:e.clientTop,height:e.offsetHeight,width:e.offsetWidth};else{let t=Xn(r.borderLeftWidth),n=Xn(r.borderRightWidth),a=Xn(r.borderTopWidth),o=Xn(r.borderBottomWidth),s=Xn(r.paddingLeft),c=Xn(r.paddingRight),l=Xn(r.paddingTop),u=Xn(r.paddingBottom),d=Xn(r.width),f=Xn(r.height),p=t+n+s+c,m=a+o+l+u,h=r.boxSizing===`border-box`?d:d+p,g=r.boxSizing===`border-box`?f:f+m;i={contentOffsetX:t+s,contentOffsetY:a+l,height:g>0?g:e.offsetHeight,width:h>0?h:e.offsetWidth}}return Yn.set(e,{metrics:i,timestamp:t}),i}})),$n,er=n((()=>{$n=(e,t)=>t>0?e/t:1})),tr,nr=n((()=>{tr=e=>{if(!e)return null;try{return e.frameElement}catch{return null}}})),rr,ir=n((()=>{Jn(),Qn(),er(),nr(),rr=(e,t,n)=>{let r=t,i=n,a=1,o=1,s=e;for(;s&&s!==window;){let e=tr(s);if(!e||!qn(e))break;let t=e.getBoundingClientRect(),n=Zn(e),c=$n(t.width,n.width),l=$n(t.height,n.height);r=t.left+(n.contentOffsetX+r)*c,i=t.top+(n.contentOffsetY+i)*l,a*=c,o*=l,s=e.ownerDocument.defaultView}return{x:r,y:i,scaleX:a,scaleY:o}}})),ar,or=n((()=>{ar=e=>{let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e):window.getComputedStyle(e)}})),sr,cr,lr=n((()=>{J(),sr=(e,t)=>e.replace(/([\d.]+)px/g,(e,n)=>{let r=Number(n)*Math.abs(t);return`${Number(r.toFixed(3))}px`}),cr=(e,t,n)=>{let[r,i]=e.split(`/`).map(e=>e.trim()),a=sr(r,t),o=sr(i??r,n);return i===void 0&&a===o?a:`${a} / ${o}`}})),ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar=n((()=>{ur=`0.7.2`,dr=`bippy-${ur}`,fr=Object.defineProperty,pr=()=>{},mr=e=>Object.assign(e,{[Symbol.dispose]:e}),hr=e=>{try{Function.prototype.toString.call(e).indexOf(`^_^`)>-1&&setTimeout(()=>{throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://react.dev/link/perf-use-production-build`)})}catch{}},gr=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e),_r=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>{if(!e||typeof e.inject!=`function`||gr(e))return!1;try{return Function.prototype.toString.call(e.inject).includes(`(injected)`)}catch{return!1}},vr=new Set,yr=new Set,br=new Set,xr=()=>{for(let e of vr)e()},Sr=e=>{for(let t of br)t(e)},Cr=e=>(br.add(e),mr(()=>{br.delete(e)})),wr=e=>(e.renderers instanceof Map||(e.renderers=new Map),e.renderers),Tr=(e,t,n,r)=>{t.set(n,r),yr.add(r),e._instrumentationIsActive||(e._instrumentationIsActive=!0,xr())},Er=e=>{e&&vr.add(e);let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:dr,checkDCE:hr,hasUnsupportedRendererAttached:!1,inject:e=>{let i=++n;return Tr(r,t,i,e),i},on:pr,onCommitFiberRoot:pr,onCommitFiberUnmount:pr,onPostCommitFiberRoot:pr,renderers:t,supportsFiber:!0,supportsFlight:!0};try{if(fr(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`,{configurable:!0,enumerable:!0,get(){return r},set(t){if(t&&typeof t==`object`){let n=r.renderers;r=t;let i=wr(r);n.forEach((e,t)=>{yr.add(e),i.set(t,e)}),(n.size>0||br.size>0)&&Dr(e),Sr(r)}}}),typeof window<`u`){let e=window.hasOwnProperty.bind(window),t=Object.getOwnPropertyDescriptor(window,`hasOwnProperty`),n=!1,r=()=>{t?fr(window,`hasOwnProperty`,t):Reflect.deleteProperty(window,`hasOwnProperty`)};fr(window,`hasOwnProperty`,{configurable:!0,value:t=>!n&&t===`__REACT_DEVTOOLS_GLOBAL_HOOK__`?(n=!0,r(),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,!1):e(t),writable:!0})}}catch{Dr(e)}return r},Dr=e=>{e&&vr.add(e);let t=!1,n=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!n)return;let r=wr(n);if(!n._instrumentationSource){n.checkDCE=hr,n.supportsFiber=!0,n.supportsFlight=!0,n.hasUnsupportedRendererAttached=!1,n._instrumentationSource=dr,n._instrumentationIsActive=!1;let e=gr(n);e||(n.on=pr),r.size?(r.forEach(e=>yr.add(e)),n._instrumentationIsActive=!0,xr(),t=!0):!e&&_r(n)&&(n._instrumentationIsActive=!0,xr(),t=!0);let i=n.inject;n.inject=e=>{let t=i.call(n,e);return Tr(n,r,t,e),t}}!t&&(r.size||n._instrumentationIsActive)&&e?.()},Or=()=>Object.hasOwn(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),kr=e=>Or()?(Dr(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__??Er(e)):Er(e)})),jr=n((()=>{Ar();try{kr()}catch{}}));function Mr(e,t,n=!1){if(!e)return null;let r=t(e);return di(r)?Promise.resolve(r).then(r=>r===!0?e:fi(e,t,n)):r===!0?e:fi(e,t,n)}var Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi=n((()=>{Ar(),Nr=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,Pr=/^\d+$/,Fr=e=>Ir(e)!==null,Ir=e=>{let t=Nr.exec(e);if(!t)return null;let n=t[4]?.split(`.`)??[];return n.some(e=>Pr.test(e)&&e.length>1&&e.startsWith(`0`))?null:{major:t[1],minor:t[2],patch:t[3],prerelease:n}},Lr=(e,t)=>e.length===t.length?e===t?0:e<t?-1:1:e.length<t.length?-1:1,Rr=(e,t)=>{let n=Pr.test(e),r=Pr.test(t);return n&&r?Lr(e,t):n===r?e===t?0:e<t?-1:1:n?-1:1},zr=(e,t)=>{if(e.length===0||t.length===0)return e.length===t.length?0:e.length===0?1:-1;let n=Math.max(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===void 0||i===void 0)return n===void 0?-1:1;let a=Rr(n,i);if(a!==0)return a}return 0},Br=(e,t)=>{let n=Ir(e),r=Ir(t);if(!n||!r)return null;let i=Lr(n.major,r.major);if(i!==0)return i;let a=Lr(n.minor,r.minor);if(a!==0)return a;let o=Lr(n.patch,r.patch);return o===0?zr(n.prerelease,r.prerelease):o},Vr={ChildDeletion:16,Cloned:8,ContentReset:32,Hydrating:4096,PerformedWork:1,Placement:2,Snapshot:1024,Update:4,Visibility:8192},Hr={CONCURRENT_MODE_NUMBER:60111,CONCURRENT_MODE_SYMBOL_DESCRIPTION:`react.concurrent_mode`,CONCURRENT_MODE_SYMBOL_STRING:`Symbol(react.concurrent_mode)`,DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION:`react.async_mode`,DEPRECATED_ASYNC_MODE_SYMBOL_STRING:`Symbol(react.async_mode)`,ELEMENT_SYMBOL_STRING:`Symbol(react.transitional.element)`,LEGACY_ELEMENT_SYMBOL_STRING:`Symbol(react.element)`},Ur=(e=>e)({"16.0.0":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:2,ContextConsumer:12,ContextProvider:13,CoroutineComponent:7,CoroutineHandlerPhase:8,DehydratedSuspenseComponent:-1,ForwardRef:14,Fragment:10,FunctionComponent:1,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:-1,IncompleteFunctionComponent:-1,IndeterminateComponent:0,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:11,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:9},"16.4.3-alpha":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:2,ContextConsumer:11,ContextProvider:12,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:-1,ForwardRef:13,Fragment:9,FunctionComponent:0,HostComponent:7,HostHoistable:-1,HostPortal:6,HostRoot:5,HostSingleton:-1,HostText:8,IncompleteClassComponent:-1,IncompleteFunctionComponent:-1,IndeterminateComponent:4,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:10,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"16.6.0-beta.0":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:-1,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:-1,MemoComponent:14,Mode:8,OffscreenComponent:-1,Profiler:12,ScopeComponent:-1,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"17.0.0-alpha":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:-1,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:24,MemoComponent:14,Mode:8,OffscreenComponent:23,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"17.0.2":{ActivityComponent:31,CacheComponent:24,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:26,HostPortal:4,HostRoot:3,HostSingleton:27,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:28,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:23,MemoComponent:14,Mode:8,OffscreenComponent:22,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:29,TracingMarkerComponent:25,ViewTransitionComponent:30,YieldComponent:-1}}),Wr=[{isMinimumExcluded:!0,minimumVersion:`17.0.1`,workTags:Ur[`17.0.2`]},{isMinimumExcluded:!1,minimumVersion:`17.0.0-alpha`,workTags:Ur[`17.0.0-alpha`]},{isMinimumExcluded:!1,minimumVersion:`16.6.0-beta.0`,workTags:Ur[`16.6.0-beta.0`]},{isMinimumExcluded:!1,minimumVersion:`16.4.3-alpha`,workTags:Ur[`16.4.3-alpha`]}],Gr=Ur[`17.0.2`],Kr=e=>{if(e===void 0)return Gr;for(let t of Wr){let n=Br(e,t.minimumVersion);if(n===null)return Gr;if(n===1||n===0&&!t.isMinimumExcluded)return t.workTags}return Ur[`16.0.0`]},qr=Kr(),Jr=new WeakMap,Yr=e=>e.startsWith(`0.0.0-`)?qr:Kr(e),Xr=e=>{let t=e?.reconcilerVersion;return t&&Fr(t)?Yr(t):e?.version?Yr(e.version):qr},Zr=(e,t)=>{let n=Xr(t);Jr.set(e,n),e.alternate&&Jr.set(e.alternate,n)},Qr=e=>{let t=Jr.get(e);if(t)return t;let n=[e],r=e;for(;r.return;)r=r.return,n.push(r);let i=Jr.get(r)??qr;for(let e of n)Jr.set(e,i),e.alternate&&Jr.set(e.alternate,i);return i},Vr.Placement|Vr.Update|Vr.ChildDeletion|Vr.ContentReset|Vr.Hydrating|Vr.Visibility|Vr.Snapshot,$r=class extends Error{constructor(e,t){super(e,{cause:t}),this.name=`BippyError`}},ei=class extends $r{constructor(e,t){super(e,t),this.name=`BippyHookInspectionError`}},ti=class extends ei{constructor(e,t){super(e,t),this.name=`BippyUnsupportedHookError`}},ni=class extends $r{constructor(e,t){super(e,t),this.name=`BippySourceMapError`}},ri=e=>typeof e==`function`,ii=e=>{let t=`displayName`in e?e.displayName:null;if(typeof t==`string`&&t)return t;let n=`name`in e?e.name:null;return typeof n==`string`&&n?n:null},ai=e=>typeof e==`object`&&!!e&&`tag`in e&&`stateNode`in e&&`return`in e&&`child`in e&&`sibling`in e&&`flags`in e,oi=e=>typeof e==`object`&&!!e&&`current`in e&&ai(e.current),si=e=>{let t=Qr(e);switch(e.tag){case t.HostComponent:case t.HostText:case t.HostHoistable:case t.HostSingleton:return!0;default:return!1}},ci=e=>{let t=Qr(e);switch(e.tag){case t.ClassComponent:case t.ForwardRef:case t.FunctionComponent:case t.MemoComponent:case t.SimpleMemoComponent:return!0;default:return!1}},li=e=>{let t=e.memoizedProps,n=e.alternate?.memoizedProps||{},r=e.flags??e.effectTag??0,i=Qr(e);switch(e.tag){case i.ClassComponent:case i.ContextConsumer:case i.ForwardRef:case i.FunctionComponent:case i.MemoComponent:case i.SimpleMemoComponent:return(r&Vr.PerformedWork)===Vr.PerformedWork;default:return!e.alternate||n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref}},ui=e=>{let t=Qr(e);switch(e.tag){case t.DehydratedSuspenseComponent:return!0;case t.Fragment:case t.HostText:case t.LegacyHiddenComponent:case t.OffscreenComponent:return!0;case t.HostRoot:return!1;default:{let t=typeof e.type==`object`&&e.type!==null?e.type.$$typeof:e.type;if(typeof t==`symbol`)return t.description===Hr.CONCURRENT_MODE_SYMBOL_DESCRIPTION||t.description===Hr.DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION;switch(t){case Hr.CONCURRENT_MODE_NUMBER:case Hr.CONCURRENT_MODE_SYMBOL_STRING:case Hr.DEPRECATED_ASYNC_MODE_SYMBOL_STRING:return!0;default:return!1}}}},di=e=>(typeof e==`object`||typeof e==`function`)&&e!==null&&`then`in e&&typeof e.then==`function`,fi=(e,t,n)=>pi(n?e.return:e.child,t,n),pi=(e,t,n)=>{if(!e)return null;let r=n?null:e.sibling,i=Mr(e,t,n);return di(i)?Promise.resolve(i).then(e=>e??pi(r,t,n)):i??pi(r,t,n)},mi=e=>ri(e)?e:typeof e!=`object`||!e?null:mi(Reflect.get(e,`type`)??Reflect.get(e,`render`)),hi=e=>{if(typeof e==`string`)return e;if(typeof e!=`function`&&typeof e!=`object`||e===null)return null;let t=ii(e);if(t)return t;let n=mi(e);return n?ii(n):null},gi=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||gr(e)||_r(e)},_i=new Set,vi=new WeakMap,yi=e=>{let t=e.alternate;if(!t)return e;let n=e;for(;n.return;)n=n.return;if(oi(n.stateNode)){let r=Mr(n.stateNode.current,n=>{if(n===e||n===t)return!0});if(r)return r}if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let n of _i){let r=Mr(n.current,n=>{if(n===e||n===t)return!0});if(r)return r}return e},bi=0,xi=new WeakMap,Si=(e,t=bi++)=>{xi.set(e,t),Number.isSafeInteger(t)&&t>=bi&&(bi=t+1)},Ci=e=>{let t=xi.get(e);return t===void 0&&e.alternate&&(t=xi.get(e.alternate)),t===void 0&&(t=bi++,Si(e,t)),t},wi=(e,t,n)=>{let r=t;for(;r!==null;){if(Ci(r),!ui(r)&&li(r)&&e(r,`mount`),r.tag===Qr(r).SuspenseComponent)if(r.memoizedState!==null){let t=r.child,n=t?t.sibling:null;if(n){let t=n.child;t!==null&&wi(e,t,!1)}}else{let t=r.child?.child??null;t!==null&&wi(e,t,!1)}else r.child!==null&&wi(e,r.child,!0);r=n?r.sibling:null}},Ti=(e,t,n)=>{if(Ci(t),!n)return;Ci(n);let r=t.tag===Qr(t).SuspenseComponent;!ui(t)&&li(t)&&e(t,`update`);let i=r&&n.memoizedState!==null,a=r&&t.memoizedState!==null;if(i&&a){let r=t.child?.sibling??null,i=n.child?.sibling??null;r!==null&&i!==null&&Ti(e,r,i)}else if(i&&!a){let n=t.child;n!==null&&wi(e,n,!0)}else if(!i&&a){Di(e,n);let r=t.child?.sibling??null;r!==null&&wi(e,r,!0)}else if(t.child!==n.child){let n=t.child;for(;n;)n.alternate?Ti(e,n,n.alternate):wi(e,n,!1),n=n.sibling}},Ei=(e,t)=>{(t.tag===Qr(t).HostRoot||!ui(t))&&e(t,`unmount`)},Di=(e,t)=>{let n=t.tag===Qr(t).SuspenseComponent&&t.memoizedState!==null,r=t.child;for(n&&(r=(t.child?.sibling??null)?.child??null);r!==null;)r.return!==null&&(Ei(e,r),Di(e,r)),r=r.sibling},Oi=new Set,ki=new WeakMap,Ai=!1,ji=e=>{let t=ki.get(e)??{};if(ki.set(e,t),!t.onCommitFiberRoot||e.onCommitFiberRoot!==t.onCommitFiberRoot){let n=e.onCommitFiberRoot,r=(t,i,a,o)=>{if(n&&n.call(e,t,i,a,o),ki.get(e)?.onCommitFiberRoot!==r)return;Zr(i.current,e.renderers.get(t));let s=i.current.memoizedState;s===null||s!==void 0&&(s.element===null||s.element===void 0)?(_i.delete(i),vi.delete(i)):(_i.add(i),vi.set(i,t));for(let{options:e}of Oi)e.onCommitFiberRoot&&e.onCommitFiberRoot(t,i,a,o)};t.onCommitFiberRoot=r,e.onCommitFiberRoot=r}if(!t.onCommitFiberUnmount||e.onCommitFiberUnmount!==t.onCommitFiberUnmount){let n=e.onCommitFiberUnmount,r=(t,i)=>{if(Zr(i,e.renderers.get(t)),n&&n.call(e,t,i),ki.get(e)?.onCommitFiberUnmount===r)for(let{options:e}of Oi)e.onCommitFiberUnmount&&e.onCommitFiberUnmount(t,i)};t.onCommitFiberUnmount=r,e.onCommitFiberUnmount=r}if(!t.onPostCommitFiberRoot||e.onPostCommitFiberRoot!==t.onPostCommitFiberRoot){let n=e.onPostCommitFiberRoot,r=(t,i)=>{if(n&&n.call(e,t,i),ki.get(e)?.onPostCommitFiberRoot===r)for(let{options:e}of Oi)e.onPostCommitFiberRoot&&e.onPostCommitFiberRoot(t,i)};t.onPostCommitFiberRoot=r,e.onPostCommitFiberRoot=r}if(!t.onScheduleFiberRoot||e.onScheduleFiberRoot!==t.onScheduleFiberRoot){let n=e.onScheduleFiberRoot,r=(t,i,a)=>{if(n&&n.call(e,t,i,a),ki.get(e)?.onScheduleFiberRoot===r)for(let{options:e}of Oi)e.onScheduleFiberRoot&&e.onScheduleFiberRoot(t,i,a)};t.onScheduleFiberRoot=r,e.onScheduleFiberRoot=r}},Mi=e=>{Ai||=(Cr(ji),!0),ji(e)};try{Or()&&Mi(kr())}catch{}Ni=e=>{let t=kr(e.onActive);t._instrumentationSource=e.name??dr,Mi(t);let n={options:e};return Oi.add(n),mr(()=>{e.onActive&&vr.delete(e.onActive),Oi.delete(n)})},Pi=new Set,Fi=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),Ii=e=>{let t=Reflect.get(e,`_reactRootContainer`);if(typeof t!=`object`||!t)return null;let n=Reflect.get(t,`_internalRoot`);if(typeof n!=`object`||!n)return null;let r=Reflect.get(n,`current`);if(typeof r!=`object`||!r)return null;let i=Reflect.get(r,`child`);return ai(i)?i:null},Li=e=>{let t=Reflect.get(e,`__internalInstanceHandle`)??Reflect.get(e,`_internalInstanceHandle`);return ai(t)?t:null},Ri=e=>{if(typeof e!=`object`||!e)return e;let t=Reflect.get(e,`canonical`);if(typeof t==`object`&&t){let e=Reflect.get(t,`publicInstance`);if(typeof e==`object`&&e)return e}let n=Reflect.get(e,`_nativeTag`);return typeof n==`number`?n:e},zi=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t?.renderers)for(let n of t.renderers.values())try{let t=n.findFiberByHostInstance?.(e);if(t)return t}catch{}if(typeof e==`object`&&e){let t=Ii(e);if(t)return t;let n=Li(e);if(n)return n;for(let t of Pi){let n=Reflect.get(e,t);if(ai(n))return n}for(let t of Object.keys(e))if(Fi(t)){Pi.add(t);let n=Reflect.get(e,t);if(ai(n))return n}}if(e!=null&&(typeof e==`object`||typeof e==`number`))for(let t of _i){let n=Mr(t.current,t=>si(t)&&Ri(t.stateNode)===e);if(n)return n}return null},Bi=zi})),Hi=r({default:()=>Ui,useEffect:()=>void 0,useReducer:()=>void 0,useRef:()=>void 0,useSyncExternalStore:()=>void 0}),Ui,Wi=n((()=>{Ui={}})),Gi=n((()=>{Ar(),jr(),Vi(),Wi(),Reflect.get(Hi,`useSyncExternalStore`)})),Ki,qi,Ji,Yi,Xi=n((()=>{Gi(),Ki=new WeakMap,qi=(e,t)=>{Ki.set(e,t)},Ji=e=>Ki.get(e)??null,Yi=e=>Ji(e)?.getFiber()??Bi(e)})),Zi,Qi,$i,ea,Y,ta=n((()=>{J(),ir(),or(),lr(),Xi(),Zi=new WeakMap,Qi=new WeakMap,$i=()=>{Zi=new WeakMap,Qi=new WeakMap},ea=(e,t,n)=>{let r=Qi.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??ar(e)).borderRadius||`0px`;return Qi.set(e,{borderRadius:i,timestamp:n}),i},Y=e=>{let t=performance.now(),n=Zi.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=Ji(e);if(r){let n=r.getBounds();return Zi.set(e,{bounds:n,timestamp:t}),n}let i=e.getBoundingClientRect(),a=rr(e.ownerDocument.defaultView,i.left,i.top),o={borderRadius:cr(ea(e,null,t),a.scaleX,a.scaleY),height:i.height*a.scaleY,width:i.width*a.scaleX,x:a.x,y:a.y};return Zi.set(e,{bounds:o,timestamp:t}),o}}));ta();let na=e=>({x:e.x+e.width/2,y:e.y+e.height/2});var X,ra=n((()=>{Xi(),X=e=>{if(!e)return!1;let t=Ji(e);return t?t.isConnected():!!(e.isConnected||e.ownerDocument?.contains(e))}}));ra();let ia=e=>{let t=0,n=e.previousElementSibling;for(;n;)t+=1,n=n.previousElementSibling;return t};var aa,oa=n((()=>{aa=e=>{let t=e.ownerDocument?.defaultView;return!!(t&&e instanceof t.ShadowRoot)}}));Gi(),oa(),Wn();let sa=new WeakMap,ca=e=>{if(e.anchorElement.isConnected)return e.anchorElement;let t=e.anchorElement.tagName,n=yi(e.anchorParentFiber);if(si(n)){let r=n.stateNode;if(!Un(r)||!r.isConnected)return null;let i=r.children[e.anchorIndexInParent];return i&&i.tagName===t?i:null}return la(n,t)},la=(e,t)=>{let n=e.child;for(;n;){if(si(n)){let e=n.stateNode;if(Un(e)&&e.isConnected&&e.tagName===t)return e}else if(n.child){n=n.child;continue}for(;n!==e&&!n.sibling;)if(n=n.return,!n)return null;if(n===e)return null;n=n.sibling}return null},ua=(e,t)=>{let n=e;for(let e of t){let t=(e.isShadowChild?n.shadowRoot?.children:n.children)?.[e.childIndex];if(!t)return null;n=t}return n},da=e=>{let t=[],n=e,r=Bi(n);for(;n&&!r;){let e=n.parentElement;if(e)t.unshift({childIndex:ia(n),isShadowChild:!1}),n=e;else{let e=n.getRootNode();if(!aa(e))break;t.unshift({childIndex:ia(n),isShadowChild:!0}),n=e.host}r=Bi(n)}let i=r?.return;return!n||!i?null:{anchorElement:n,anchorParentFiber:i,anchorIndexInParent:ia(n),domPath:t,targetTagName:e.tagName}},fa=(e,t)=>e.anchorElement.isConnected&&e.anchorIndexInParent===ia(e.anchorElement)&&ua(e.anchorElement,e.domPath)===t,pa=e=>{if(!e.isConnected)return;let t=sa.get(e);if(t&&fa(t,e))return;let n=da(e);n&&sa.set(e,n)},ma=e=>{if(e.isConnected)return e;let t=sa.get(e);if(!t)return null;let n=ca(t);if(!n)return null;let r=ua(n,t.domPath);return r&&r.isConnected&&r.tagName===t.targetTagName?r:null};R(),J();let ha=e=>{let t=ma(e)??e;return pa(t),t},ga=e=>{for(let t=0;t<e.frozenElements.length;t+=1)e.frozenElements[t]=ha(e.frozenElements[t]);e.frozenElement=e.frozenElement&&ha(e.frozenElement),e.detectedElement=e.detectedElement&&ha(e.detectedElement),e.contextMenuElement=e.contextMenuElement&&ha(e.contextMenuElement);for(let t of e.labelInstances)if(t.element&&=ha(t.element),t.elements)for(let e=0;e<t.elements.length;e+=1)t.elements[e]=ha(t.elements[e]);for(let t of e.grabbedBoxes)t.element&&=ha(t.element)},_a=e=>({selectionInteractionLockDepth:0,wasActivatedByToggle:!1,pendingCommentMode:!1,keyHoldDuration:e.keyHoldDuration,dragStart:{x:tn,y:tn},copyStart:{x:tn,y:tn},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:``,grabbedBoxes:[],labelInstances:[],isTouchMode:!1,activationTimestamp:null,previouslyFocusedElement:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null}),va=e=>{let[t,n]=Bt(_a(e)),[r,i]=c({x:tn,y:tn}),[a,o]=c(0),[s,l]=c({state:`idle`}),u=e=>{n(Ut(t=>{e(t),t.frozenElement=t.frozenElements.length>0?t.frozenElements[0]:null,t.frozenDragRect=null;for(let e of t.frozenElements)pa(e)}))},d=()=>{u(e=>{e.frozenElements=[]})},f=e=>{l(t=>t.state===`active`?{...t,phase:e}:t)},p={startHold:e=>{e!==void 0&&n(`keyHoldDuration`,e),l({state:`holding`,startedAt:Date.now()})},releaseHold:()=>{s().state===`holding`&&l({state:`idle`})},activate:()=>{h(()=>{l({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement)})},deactivate:()=>{h(()=>{l({state:`idle`}),n(Ut(e=>{e.wasActivatedByToggle=!1,e.pendingCommentMode=!1,e.inputText=``,e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null,e.activationTimestamp=null,e.previouslyFocusedElement=null,e.contextMenuPosition=null,e.contextMenuElement=null,e.contextMenuClickOffset=null,e.isTouchMode&&(e.detectedElement=null)}))})},toggle:()=>{t.activationTimestamp===null?(n(`wasActivatedByToggle`,!0),p.activate()):p.deactivate()},freeze:()=>{if(s().state===`active`){let e=t.frozenElement??t.detectedElement;e&&(pa(e),n(`frozenElement`,e)),f(`frozen`)}},unfreeze:()=>{s().state===`active`&&h(()=>{n(Ut(e=>{e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null})),f(`hovering`)})},startDrag:(e,t)=>{s().state===`active`&&h(()=>{t||d(),n(`dragStart`,{x:e.x+window.scrollX,y:e.y+window.scrollY}),f(`dragging-select`)})},startDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-select`&&f(`dragging-reposition`)},stopDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-reposition`&&f(`dragging-select`)},shiftDragStart:e=>{let t=s();t.state===`active`&&t.phase===`dragging-reposition`&&n(`dragStart`,t=>({x:t.x+e.x,y:t.y+e.y}))},endDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&h(()=>{n(`dragStart`,{x:tn,y:tn}),f(`justDragged`)})},cancelDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&h(()=>{n(`dragStart`,{x:tn,y:tn}),f(`hovering`)})},finishJustDragged:()=>{let e=s();e.state===`active`&&e.phase===`justDragged`&&f(`hovering`)},startCopy:()=>{let e=s().state===`active`;l({state:`copying`,startedAt:Date.now(),wasActive:e})},completeCopy:()=>{let e=s(),t=e.state===`copying`?e.wasActive:!1;l({state:`justCopied`,copiedAt:Date.now(),wasActive:t})},finishJustCopied:()=>{let e=s();e.state===`justCopied`&&(e.wasActive&&!t.wasActivatedByToggle?h(()=>{d(),l({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1})}):p.deactivate())},enterPromptMode:(e,t)=>{let{x:r}=na(Y(t));pa(t),h(()=>{n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r),i(e),n(`frozenElement`,t),n(`wasActivatedByToggle`,!0),s().state===`active`?l(e=>e.state===`active`?{...e,isPromptMode:!0,phase:`frozen`}:e):(l({state:`active`,phase:`frozen`,isPromptMode:!0,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement))})},exitPromptMode:()=>{l(e=>e.state===`active`?{...e,isPromptMode:!1,isPendingDismiss:!1}:e)},setInputText:e=>{n(`inputText`,e)},clearInputText:()=>{n(`inputText`,``)},setPendingDismiss:e=>{l(t=>t.state===`active`?{...t,isPendingDismiss:e}:t)},setPointer:e=>{i(t=>t.x===e.x&&t.y===e.y?t:e)},setDetectedElement:e=>{e&&pa(e),n(`detectedElement`,e)},setFrozenElement:e=>{u(t=>{t.frozenElements=[e]})},setFrozenElements:e=>{u(t=>{t.frozenElements=e})},toggleFrozenElement:e=>{u(t=>{let n=t.frozenElements.indexOf(e);n>=0?t.frozenElements.splice(n,1):t.frozenElements.push(e)})},addFrozenElements:e=>{u(t=>{for(let n of e)t.frozenElements.includes(n)||t.frozenElements.push(n)})},setFrozenDragRect:e=>{n(`frozenDragRect`,e)},relinkLiveElements:()=>{n(Ut(ga))},setCopyStart:(e,t)=>{let{x:r}=na(Y(t));n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r)},setLastGrabbed:e=>{n(`lastGrabbedElement`,e)},setWasActivatedByToggle:e=>{n(`wasActivatedByToggle`,e)},setPendingCommentMode:e=>{n(`pendingCommentMode`,e)},setTouchMode:e=>{n(`isTouchMode`,e)},incrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>e+1)},decrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>Math.max(0,e-1))},setSelectionSource:(e,t)=>{h(()=>{n(`selectionFilePath`,e),n(`selectionLineNumber`,t)})},incrementViewportVersion:()=>{o(e=>e+1)},addGrabbedBox:e=>{e.element&&pa(e.element),n(`grabbedBoxes`,t=>[...t,e])},removeGrabbedBox:e=>{n(`grabbedBoxes`,t=>t.filter(t=>t.id!==e))},clearGrabbedBoxes:()=>{n(`grabbedBoxes`,[])},addLabelInstance:e=>{e.element&&pa(e.element);for(let t of e.elements??[])pa(t);n(`labelInstances`,t=>[...t,e])},updateLabelInstance:(e,r,i)=>{let a=t.labelInstances.findIndex(t=>t.id===e);a!==-1&&h(()=>{n(`labelInstances`,a,`status`,r),i===void 0?r!==`error`&&n(`labelInstances`,a,`errorMessage`,void 0):n(`labelInstances`,a,`errorMessage`,i)})},removeLabelInstance:e=>{n(`labelInstances`,t=>t.filter(t=>t.id!==e))},clearLabelInstances:()=>{n(`labelInstances`,[])},showContextMenu:(e,t)=>{let{x:r,y:i}=na(Y(t));pa(t),h(()=>{n(`contextMenuPosition`,e),n(`contextMenuElement`,t),n(`contextMenuClickOffset`,{x:e.x-r,y:e.y-i})})},hideContextMenu:()=>{h(()=>{n(`contextMenuPosition`,null),n(`contextMenuElement`,null),n(`contextMenuClickOffset`,null)})},updateContextMenuPosition:()=>{let e=t.contextMenuElement,r=t.contextMenuClickOffset;if(!e||!r||!X(e))return;let{x:i,y:a}=na(Y(e));n(`contextMenuPosition`,{x:i+r.x,y:a+r.y})}};return{store:t,actions:p,pointer:r,viewportVersion:a,current:s}};var ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja,Ma=n((()=>{ya=class extends Error{constructor(e,t){super(e,t),this.name=`ReactGrabError`}},ba=class extends ya{constructor(e,t){super(e,{cause:t}),this.name=`RecoverableError`}},xa=class extends ya{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},Sa=class extends ba{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},Ca=class extends ba{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},wa=class extends ba{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},Ta=class extends ba{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},Ea=class extends ba{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},Da=class extends ba{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},Oa=class extends ya{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},ka=class extends ya{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},Aa=class extends ya{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},ja=class extends ya{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}}})),Na,Pa=n((()=>{Xi(),Na=e=>Ji(e)?.getTagName()??(e.tagName||``).toLowerCase()})),Fa,Ia,La,Ra,za,Ba=n((()=>{Pa(),Fa=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],Ia=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},La=e=>{if(document.designMode===`on`)return!0;let t=Ia(e);if(!t)return!1;if(t.isContentEditable)return!0;let n=Na(t);return Fa.some(e=>e===n||e===t.role)},Ra=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},za=()=>{let e=window.getSelection();return e?e.toString().length>0:!1}})),Va,Ha,Ua=n((()=>{Va=new WeakMap,Ha=(e=document)=>{let t=Va.get(e);if(t!==void 0)return t;let n=e.querySelector(`script[nonce], style[nonce]`),r=n?.nonce||n?.getAttribute(`nonce`)||null;return r&&Va.set(e,r),r}})),Wa,Ga,Ka=n((()=>{Wa=[[`data-rr-block`,``],[`data-rr-ignore`,``],[`data-rr-mask`,``],[`data-sentry-block`,``],[`data-sentry-ignore`,``],[`data-sentry-mask`,``],[`data-dd-privacy`,`hidden`],[`data-fs-exclude`,``],[`data-lr-exclude`,``],[`data-hj-suppress`,``],[`data-recording-disable`,``],[`data-clarity-mask`,`true`],[`data-heap-redact-text`,``]],Ga=e=>{for(let[t,n]of Wa)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)}})),qa,Ja=n((()=>{J(),qa=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===9})),Ya,Xa=n((()=>{oa(),Ja(),nr(),Ya=e=>{if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return aa(t)?t.host:qa(t)?tr(t.defaultView):null}})),Za,Qa=n((()=>{Xa(),Xi(),Za=(e,t)=>{let n=Ji(e)?.hostElement??e;for(;n;){if(n===t)return!0;n=Ya(n)}return!1}})),$a,eo,to,no,ro,io=n((()=>{Qa(),$a=null,eo=e=>{$a=e},to=()=>$a,no=e=>$a?e?Za(e,$a):!1:!0,ro=e=>e})),ao,oo=n((()=>{io(),ao=`data-react-grab`}));Ma(),Ba(),J(),Ua(),Ka(),oo();let so=e=>{if(!document.body)return;let t=document.querySelectorAll(`[${ao}]`);for(let n of t)n!==e&&n.parentNode!==e&&(n.shadowRoot||n.remove());document.body.appendChild(e)},co=e=>{if(document.body)return so(e),()=>{};let t=()=>{document.removeEventListener(`DOMContentLoaded`,t),so(e)};return document.addEventListener(`DOMContentLoaded`,t,{once:!0}),()=>document.removeEventListener(`DOMContentLoaded`,t)},lo=e=>{let t=window.setTimeout(()=>{so(e)},Rn),n=new MutationObserver(()=>{e.parentNode!==document.body&&so(e)});return n.observe(document.documentElement,{childList:!0}),()=>{window.clearTimeout(t),n.disconnect()}},uo=e=>{let t=document.querySelectorAll(`[${ao}]`);for(let e of t){let t=e.shadowRoot?.querySelector(`[${ao}]`);if(t instanceof HTMLDivElement)return{root:t,host:e,cancelPendingAttachment:lo(e)};e.remove()}let n=document.createElement(`div`);n.setAttribute(ao,`true`),Ga(n),n.style.zIndex=String(un),n.style.position=`fixed`,n.style.inset=`0`,n.style.pointerEvents=`none`,n.style.contain=`strict`;let r=n.attachShadow({mode:`open`}),i=document.createElement(`style`),a=Ha();a&&(i.nonce=a),i.textContent=e??``,r.appendChild(i);let o=document.createElement(`div`);o.setAttribute(ao,`true`),r.appendChild(o);let s=co(n),c=lo(n);return{root:o,host:n,cancelPendingAttachment:()=>{s(),c()}}};Ar(),Vi();let fo=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,po=[`rsc://`,`file:///`,`webpack-internal://`,`webpack://`,`node:`,`turbopack://`,`metro://`,`/app-pages-browser/`,`/(app-pages-browser)/`],mo=[`rsc://`,`about://React/`],ho=[`<anonymous>`,`eval`,``],go=/\.(cjs|cts|js|jsx|mdx|mjs|mts|ts|tsx)$/,_o=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,vo=/^\?[\w~.-]+(?:=[^&#]*)?(?:&[\w~.-]+(?:=[^&#]*)?)*$/,yo=/\(at [^)]+\)$/,bo=[`react_stack_bottom_frame`,`react-stack-bottom-frame`],xo=Error,So=()=>xo.prepareStackTrace,Co=e=>{xo.prepareStackTrace=e},wo=/(^|@)\S+:\d+/,To=/^\s*at .*(\S+:\d+|\(native\))/m,Eo=/^(eval@)?(\[native code\])?$/,Do=(e,t)=>{if(t?.includeInElement!==!1){let t=e.split(`
11
+ `),n=[];for(let e of t)if(/^\s*at\s+/.test(e)){let t=ko(e)[0];t&&n.push(t)}else if(/^\s*in\s+/.test(e)){let t=e.replace(/^\s*in\s+/,``).replace(/\s*\(at .*\)$/,``);n.push({functionName:t,source:e})}else if(e.match(wo)){let t=Ao(e)[0];t&&n.push(t)}return n}return e.match(To)?ko(e):Ao(e)},Oo=e=>{if(!e.includes(`:`))return[e,void 0,void 0];let t=e.startsWith(`(`)&&/:\d+\)$/.test(e)?e.slice(1,-1):e,n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t);return n?[n[1],n[2]||void 0,n[3]||void 0]:[t,void 0,void 0]},ko=e=>e.split(`
12
+ `).filter(e=>!!e.match(To)).map(e=>{let t=e;t.includes(`(eval `)&&(t=t.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(,.*$)/g,``));let n=t.replace(/^\s+/,``).replace(/\(eval code/g,`(`).replace(/^.*?\s+/,``),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],``):n;let i=Oo(r?r[1]:n);return{functionName:r&&n||void 0,fileName:[`eval`,`<anonymous>`,`(native)`].includes(i[0])?void 0:i[0],lineNumber:i[1]?+i[1]:void 0,columnNumber:i[2]?+i[2]:void 0,source:t}}),Ao=e=>e.split(`
13
+ `).filter(e=>!e.match(Eo)).map(e=>{let t=e;if(t.includes(` > eval`)&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),!t.includes(`@`)&&!t.includes(`:`))return{functionName:t};{let e=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,n=t.match(e),r=n&&n[1]?n[1]:void 0,i=Oo(t.replace(e,``));return{functionName:r,fileName:i[0],lineNumber:i[1]?+i[1]:void 0,columnNumber:i[2]?+i[2]:void 0,source:t}}}),jo=new WeakMap,Mo=e=>bo.some(t=>e.includes(t)),No=e=>{let t=e.getFunctionName?.()??``;if(t)return t;let n=e.getTypeName?.()??``,r=e.getMethodName?.()??``;return n&&r?`${n}.${r}`:r},Po=e=>{let t=[];for(let n=1;n<e.length;n++){let r=e[n],i=No(r);if(Mo(i))return{frames:t,isTrusted:!0};if(r.isNative?.()){t.push({functionName:i||void 0});continue}let a=r.getScriptNameOrSourceURL?.()??``;!a&&r.isEval?.()&&(a=r.getEvalOrigin?.()??``),t.push({functionName:i&&i!==`<anonymous>`?i:void 0,fileName:a&&a!==`<anonymous>`?a:void 0,lineNumber:r.getLineNumber?.()??void 0,columnNumber:r.getColumnNumber?.()??void 0,enclosingLineNumber:r.getEnclosingLineNumber?.()??void 0,enclosingColumnNumber:r.getEnclosingColumnNumber?.()??void 0,source:` at ${r.toString()}`})}return{frames:t,isTrusted:!1}},Fo=e=>{let t=-1;for(let n of bo)if(t=e.indexOf(n),t!==-1)break;return{frames:Do(t===-1?e:e.slice(0,e.lastIndexOf(`
14
+ `,t))).slice(1),isTrusted:t!==-1}},Io=e=>{let t=jo.get(e);if(t)return t;let n=null,r=(e,t)=>{n=Po(t);let r=`${e.name||`Error`}: ${e.message||``}`;for(let e of t)r+=`\n at ${e.toString()}`;return r},i=So();Co(r);let a;try{a=String(e.stack)}finally{Co(i)}let o=n??Fo(a);return jo.set(e,o),o},Lo=()=>{let e=kr(),t=new Set([...yr,...e.renderers.values()]),n=[],r=new Set;for(let e of t){let t=e.currentDispatcherRef;!t||r.has(t)||(r.add(t),n.push(t))}return n},Ro=e=>`H`in e?e.H:e.current,zo=(e,t)=>{`H`in e?e.H=t:e.current=t};var Bo=44,Vo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Ho=new Uint8Array(64),Uo=new Uint8Array(128);for(let e=0;e<Vo.length;e++){let t=Vo.charCodeAt(e);Ho[e]=t,Uo[t]=e}function Wo(e,t){let n=0,r=0,i=0;do i=Uo[e.next()],n|=(i&31)<<r,r+=5;while(i&32);let a=n&1;return n>>>=1,a&&(n=-2147483648|-n),t+n}function Go(e,t){return e.pos>=t?!1:e.peek()!==Bo}var Ko=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function qo(e){let{length:t}=e,n=new Ko(e),r=[],i=0,a=0,o=0,s=0,c=0;do{let e=n.indexOf(`;`),t=[],l=!0,u=0;for(i=0;n.pos<e;){let r;i=Wo(n,i),i<u&&(l=!1),u=i,Go(n,e)?(a=Wo(n,a),o=Wo(n,o),s=Wo(n,s),Go(n,e)?(c=Wo(n,c),r=[i,a,o,s,c]):r=[i,a,o,s]):r=[i],t.push(r),n.pos++}l||Jo(t),r.push(t),n.pos=e+1}while(n.pos<=t);return r}function Jo(e){e.sort(Yo)}function Yo(e,t){return e[0]-t[0]}let Xo=/^data:application\/json(?:;[^,]*)?,/i,Zo=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Qo=new Map,$o=new WeakMap;var es=class extends Error{};let ts=new Map,ns=new WeakMap,rs=new Set([`chrome-extension:`,`moz-extension:`,`safari-web-extension:`]),is=new Set([`http:`,`https:`,...rs]),as=(e,t,n,r)=>{let[,i,a,o,s]=e;if(i===void 0||a===void 0||o===void 0)return null;let c=t[i];return c?{columnNumber:o,fileName:c,functionName:s===void 0?void 0:r?.[s]||void 0,isIgnoreListed:n?.has(i)??!1,lineNumber:a+1}:null},os=(e,t,n,r,i,a)=>{if(n<0||n>=e.length)return null;let o=e[n];if(!o||o.length===0)return null;let s=null,c=0,l=o.length-1;for(;c<=l;){let e=c+l>>1;o[e][0]<=r?(s=o[e],c=e+1):l=e-1}return!s||s.length<4?null:as(s,t,i,a)},ss=(e,t,n)=>{if(e.sections){let r=t-1,i=null;for(let t of e.sections)if(r>t.offset.line||r===t.offset.line&&n>=t.offset.column)i=t;else break;if(!i)return null;let a=r-i.offset.line,o=r===i.offset.line?n-i.offset.column:n;return os(i.map.mappings,i.map.sources,a,o,i.map.ignoredSourceIndices,i.map.names)}return os(e.mappings,e.sources,t-1,n,e.ignoredSourceIndices,e.names)},cs=(e,t,n,r,i)=>{if(!n)return null;let a=n.indexOf(r);if(a===-1)return null;let o=null;for(let r of e)for(let e of r){if(e[4]!==a)continue;let r=as(e,t,i,n);if(r){if(!r.isIgnoreListed)return r;o??=r}}return o},ls=(e,t)=>{if(e.sections){let n=null;for(let r of e.sections){let e=cs(r.map.mappings,r.map.sources,r.map.names,t,r.map.ignoredSourceIndices);if(e){if(!e.isIgnoreListed)return e;n??=e}}return n}return cs(e.mappings,e.sources,e.names,t,e.ignoredSourceIndices)},us=(e,t)=>{if(Xo.test(e))return e;try{return new URL(e,t).toString()}catch{try{let n=new URL(e,new URL(t,`https://bippy.invalid/`));return`${n.pathname}${n.search}${n.hash}`}catch{return null}}},ds=e=>{try{let t=new URL(e),n=t.pathname.lastIndexOf(`.bundle`);if(n===-1)return null;let r=t.pathname.slice(n+7);if(r&&!r.startsWith(`//&`))return null;if(t.pathname=`${t.pathname.slice(0,n)}.map`,r){let e=new URLSearchParams(r.slice(3));for(let[n,r]of e)t.searchParams.set(n,r)}return t.hash=``,t.toString()}catch{return null}},fs=(e,t,n)=>{let r=n.headers.get(`sourcemap`)??n.headers.get(`x-sourcemap`);if(r)return us(r.trim(),e);let i,a=t.length;for(;a>0&&!i;){let e=t.lastIndexOf(`
15
+ `,a-1)+1,n=t.slice(e,a).match(Zo);n&&(i=n[1]||n[2]),a=e-1}return i?us(i,e):ds(e)},ps=e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`version`),n=Reflect.get(e,`mappings`),r=Reflect.get(e,`file`),i=Reflect.get(e,`names`),a=Reflect.get(e,`sourceRoot`),o=Reflect.get(e,`sources`),s=Reflect.get(e,`sourcesContent`),c=Reflect.get(e,`ignoreList`),l=Reflect.get(e,`x_google_ignoreList`);if(t!==3||typeof n!=`string`||r!==void 0&&typeof r!=`string`||i!==void 0&&(!Array.isArray(i)||i.some(e=>typeof e!=`string`))||a!==void 0&&typeof a!=`string`||s!==void 0&&(!Array.isArray(s)||s.some(e=>typeof e!=`string`&&e!==null))||c!==void 0&&(!Array.isArray(c)||c.some(e=>!Number.isInteger(e)||e<0))||l!==void 0&&(!Array.isArray(l)||l.some(e=>!Number.isInteger(e)||e<0))||!Array.isArray(o)||o.some(e=>typeof e!=`string`)||s&&s.length!==o.length)return!1;let u=o.length;return[...c??[],...l??[]].every(e=>e<u)},ms=e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`version`),n=Reflect.get(e,`sections`);return t!==3||!Array.isArray(n)?!1:n.every(e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`map`),n=Reflect.get(e,`url`),r=Reflect.get(e,`offset`);if(typeof r!=`object`||!r)return!1;let i=Reflect.get(r,`column`),a=Reflect.get(r,`line`);return ps(t)!==(typeof n==`string`&&n.length>0)&&typeof i==`number`&&Number.isInteger(i)&&i>=0&&typeof a==`number`&&Number.isInteger(a)&&a>=0})},hs=e=>{let t=e.ignoreList??e.x_google_ignoreList;return t?.length?new Set(t):void 0},gs=(e,t,n)=>{if(!e||fo.test(t)||t.startsWith(`/`))return t;let r=e.endsWith(`/`)?e:`${e}/`,i=t.replace(/^\.\//,``);try{let e=fo.test(r)?r:new URL(r,n).toString();return new URL(i,e).toString()}catch{let e=`${r}${i}`.split(`/`),t=[];for(let n of e)n===`..`?t.pop():n!==`.`&&t.push(n);return t.join(`/`)}},_s=(e,t)=>e.sources.map(n=>gs(e.sourceRoot,n,t)),vs=(e,t)=>{try{return{file:e.file,ignoredSourceIndices:hs(e),mappings:qo(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:_s(e,t),sourcesContent:e.sourcesContent,version:3}}catch{return null}},ys=async(e,t,n)=>{let r=[],i=-1,a=-1;for(let o of e.sections){if(o.offset.line<i||o.offset.line===i&&o.offset.column<=a)return null;i=o.offset.line,a=o.offset.column;let e=o.url?us(o.url,t):null,s=o.map??(e?await n(e):null);if(!s)return null;let c=e??t;try{r.push({map:{...s,ignoredSourceIndices:hs(s),mappings:qo(s.mappings),sources:_s(s,c)},offset:o.offset})}catch{return null}}let o=new Set;for(let e of r)for(let t of e.map.sources)o.add(t);return{file:e.file,mappings:[],names:[],sections:r,sourceRoot:void 0,sources:Array.from(o),sourcesContent:void 0,version:3}},bs=(e,t=!1)=>{if(!e)return!1;let n=e.trim();if(!n)return!1;let r=n.match(fo);if(!r)return!0;let i=r[0].toLowerCase();return t||is.has(i)},xs=()=>typeof window>`u`&&typeof process<`u`&&typeof process.versions?.node==`string`,Ss=e=>{try{let t=new URL(e);return(t.protocol===`http:`||t.protocol===`https:`)&&!t.username&&!t.password}catch{return!1}},Cs=e=>{try{return new URL(e).protocol}catch{return null}},ws=e=>{let t=Cs(e);return t!==null&&rs.has(t)},Ts=(e,t)=>{try{let n=new URL(e),r=new URL(t);return n.protocol===r.protocol&&n.host===r.host}catch{return!1}},Es=(e,t,n,r)=>{if(Xo.test(t))return!0;if(!bs(t,r))return!1;let i=Cs(e),a=Cs(t),o=i!==null&&!is.has(i)||a!==null&&!is.has(a);return!(n||o||ws(e)||ws(t))||Ts(e,t)},Ds=e=>e===408||e===425||e===429||e>=500,Os=e=>{if(e.ok)return!0;if(Ds(e.status))throw new es;return!1},ks=(e,t,n)=>!n||t.url.length===0||Ts(e,t.url),As=e=>{if(e.timeoutMs===void 0||e.timeoutMs<0)return{cleanup:()=>{},signal:e.signal};let t=new AbortController,n=()=>t.abort(e.signal?.reason);e.signal?.aborted?n():e.signal?.addEventListener(`abort`,n,{once:!0});let r=setTimeout(()=>t.abort(new ni(`Source map request timed out`)),e.timeoutMs);return{cleanup:()=>{clearTimeout(r),e.signal?.removeEventListener(`abort`,n)},signal:t.signal}},js=async(e,t)=>{let n=Number(e.headers.get(`content-length`));if(Number.isFinite(n)&&n>t)return null;if(!e.body){let n=await e.text();return new TextEncoder().encode(n).byteLength>t?null:n}let r=e.body.getReader(),i=new TextDecoder,a=[],o=0;try{for(;;){let{done:e,value:n}=await r.read();if(e)break;if(o+=n.byteLength,o>t)return await r.cancel(),null;a.push(i.decode(n,{stream:!0}))}return a.push(i.decode()),a.join(``)}finally{r.releaseLock()}},Ms=e=>{try{if(typeof globalThis.atob==`function`)return new TextDecoder().decode(Uint8Array.from(globalThis.atob(e),e=>e.charCodeAt(0)))}catch{return null}let t=e.replace(/\s/g,``).replace(/=+$/,``),n=[],r=0,i=0;for(let e of t){let t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.indexOf(e);if(t===-1)return null;r=r*64+t,i+=6,i>=8&&(i-=8,n.push(Math.floor(r/2**i)&255),r%=2**i)}return new TextDecoder().decode(Uint8Array.from(n))},Ns=(e,t)=>{let n=e.indexOf(`,`);if(n===-1)return null;let r=e.slice(0,n),i=e.slice(n+1);if(i.length>t*2)return null;try{let e=r.toLowerCase().includes(`;base64`)?Ms(i):decodeURIComponent(i);return e===null||new TextEncoder().encode(e).byteLength>t?null:JSON.parse(e)}catch{return null}},Ps=async(e,t,n,r,i)=>{if(Xo.test(e))return Ns(e,r);let a=await t(e,{redirect:i?`error`:`follow`,signal:n});if(!Os(a)||!ks(e,a,i))return null;let o=await js(a,r);if(o===null)return null;try{return JSON.parse(o)}catch{return null}},Fs=async(e,t,n={})=>{let r=t!==void 0;if(!bs(e,r))return null;let i=xs(),a=i||ws(e);if(i&&!t&&(!n.allowUnsafeServerFetch||!Ss(e)))return null;let o=t??(typeof globalThis.fetch==`function`?globalThis.fetch.bind(globalThis):void 0);if(!o)return null;let s=n.maxBundleSizeBytes??26214400,c=n.maxSourceMapSizeBytes??104857600;if(s<0||c<0)return null;let l=As(n);try{let t=await o(e,{redirect:a?`error`:`follow`,signal:l.signal});if(!Os(t)||!ks(e,t,a))return null;let n=await js(t,s);if(n===null)return null;let i=fs(e,n,t);if(!i||!Es(e,i,a,r))return null;let u=await Ps(i,o,l.signal,c,a);return ps(u)?vs(u,i):ms(u)?ys(u,i,async t=>{if(!Es(e,t,a,r))return null;let n=await Ps(t,o,l.signal,c,a);return ps(n)?n:null}):null}finally{l.cleanup()}},Is=(e,t,n)=>{if(!n)return t;let r=e.get(n);return r||(r=new Map,e.set(n,r)),r},Ls=e=>Is($o,Qo,e),Rs=e=>Is(ns,ts,e),zs=(e,t)=>t.allowUnsafeServerFetch===void 0&&t.maxBundleSizeBytes===void 0&&t.maxSourceMapSizeBytes===void 0&&t.timeoutMs===void 0?e:`${e}\0${t.allowUnsafeServerFetch??``}\0${t.maxBundleSizeBytes??``}\0${t.maxSourceMapSizeBytes??``}\0${t.timeoutMs??``}`,Bs=async(e,t=!0,n,r={})=>{let i=t&&r.signal===void 0,a=Ls(n),o=Rs(n),s=zs(e,r);if(i&&a.has(s))return a.get(s)??null;let c=i?o.get(s):void 0;if(c)return(await c).sourceMap;let l=Fs(e,n,r).then(e=>({sourceMap:e,isTransientFailure:!1}),()=>({sourceMap:null,isTransientFailure:!0}));i&&o.set(s,l);let{sourceMap:u,isTransientFailure:d}=await l;return i&&(o.delete(s),d||a.set(s,u)),u},Vs=async(e,t=!0,n)=>Promise.all(e.map(async e=>{if(!e.fileName)return e;let r=await Bs(e.fileName,t,n);if(!r||typeof e.lineNumber!=`number`||typeof e.columnNumber!=`number`)return e;let i=ss(r,e.lineNumber,e.columnNumber);return i?{...e,source:i.fileName&&e.source?e.source.replace(e.fileName,i.fileName):e.source,fileName:i.fileName,functionName:i.functionName??e.functionName,lineNumber:i.lineNumber,columnNumber:i.columnNumber,isIgnoreListed:i.isIgnoreListed,isSymbolicated:!0}:e})),Hs=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack==`string`,Us=e=>`tag`in e&&typeof e.tag==`number`,Ws=e=>{let t=null;if(Mr(e,n=>{if(n===e)return!1;let r=n._debugOwner;return(r===e||e.alternate!==null&&r===e.alternate)&&n._debugStack instanceof Error&&(t=n._debugStack,!0)}),!t)return null;let{frames:n,isTrusted:r}=Io(t);if(!r)return null;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t.fileName)return{...t,lineNumber:t.enclosingLineNumber||t.lineNumber,columnNumber:t.enclosingColumnNumber||t.columnNumber}}return null},Gs=()=>{let e=[];for(let t of Lo())e.push({currentDispatcherRef:t,value:Ro(t)}),zo(t,null);return e},Ks=e=>{for(let{currentDispatcherRef:t,value:n}of e)zo(t,n)},qs=e=>`\n in ${e}`,Js=(e,t)=>{let n=qs(e);return t&&(n+=` (at ${t})`),n},Ys=!1,Xs=new WeakMap,Zs=(e,t)=>{if(!e||Ys)return``;let n=Xs.get(e);if(n!==void 0)return n;let r=So();Co(void 0),Ys=!0;let i=Gs(),a=console.error,o=console.warn;console.error=()=>{},console.warn=()=>{};try{let n={DetermineComponentFrameRoot(){let n;try{if(t){let t=function(){throw Error()};if(Object.defineProperty(t.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){n=e}Reflect.construct(e,[],t)}else{try{Function.prototype.apply.call(t,void 0,[])}catch(e){n=e}Function.prototype.apply.call(e,t.prototype,[])}}else{try{throw Error()}catch(e){n=e}let t=Function.prototype.apply.call(e,void 0,[]);typeof t==`object`&&t&&`catch`in t&&typeof t.catch==`function`&&t.catch(()=>void 0)}}catch(e){if(e instanceof Error&&n instanceof Error&&typeof e.stack==`string`)return[e.stack,n.stack]}return[null,null]}};Object.defineProperty(n.DetermineComponentFrameRoot,`displayName`,{value:`DetermineComponentFrameRoot`}),Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,`name`)?.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});let[r,i]=n.DetermineComponentFrameRoot();if(r&&i){let t=r.split(`
16
16
  `),n=i.split(`
17
- `),a=0,o=0;for(;a<t.length&&!t[a].includes(`DetermineComponentFrameRoot`);)a++;for(;o<n.length&&!n[o].includes(`DetermineComponentFrameRoot`);)o++;if(a===t.length||o===n.length)for(a=t.length-1,o=n.length-1;a>=1&&o>=0&&t[a]!==n[o];)o--;for(;a>=1&&o>=0;a--,o--)if(t[a]!==n[o]){if(a!==1||o!==1)do if(a--,o--,o<0||t[a]!==n[o]){let n=`\n${t[a].replace(` at new `,` at `)}`,[r]=jo(n);if(!r?.fileName)break;let i=Si(e);return i&&n.includes(`<anonymous>`)&&(n=n.replace(`<anonymous>`,i)),ec.set(e,n),n}while(a>=1&&o>=0);break}}}finally{$s=!1,Do(r),Xs(i),console.error=a,console.warn=o}let s=Si(e),c=s?Zs(s):``;return ec.set(e,c),c},nc=(e,t)=>{let n=``,r=ai(e);switch(e.tag){case r.ActivityComponent:n=Zs(`Activity`);break;case r.ClassComponent:n=tc(e.type,!0);break;case r.ForwardRef:n=tc(xi(e.type)??e.type,!1);break;case r.FunctionComponent:case r.SimpleMemoComponent:n=tc(xi(e.type)??e.type,!1);break;case r.HostComponent:case r.HostHoistable:case r.HostSingleton:typeof e.type==`string`&&(n=Zs(e.type));break;case r.LazyComponent:n=Zs(`Lazy`);break;case r.SuspenseComponent:n=e.child!==t&&t!==null?Zs(`Suspense Fallback`):Zs(`Suspense`);break;case r.SuspenseListComponent:n=Zs(`SuspenseList`);break;case r.ViewTransitionComponent:n=Zs(`ViewTransition`);break;default:return``}return n},rc=e=>{try{let t=``,n=e,r=null;do{t+=nc(n,r);let e=n._debugInfo;if(e&&Array.isArray(e))for(let n=e.length-1;n>=0;n--){let r=e[n];typeof r.name==`string`&&(t+=Qs(r.name,r.env))}r=n,n=n.return}while(n);return t}catch(e){return e instanceof Error?`\nBippy couldn’t generate the stack: ${e.message}\n${e.stack}`:``}},ic=e=>{let t=e;if(!t)return``;t.startsWith(`Error: react-stack-top-frame
17
+ `),a=0,o=0;for(;a<t.length&&!t[a].includes(`DetermineComponentFrameRoot`);)a++;for(;o<n.length&&!n[o].includes(`DetermineComponentFrameRoot`);)o++;if(a===t.length||o===n.length)for(a=t.length-1,o=n.length-1;a>=1&&o>=0&&t[a]!==n[o];)o--;for(;a>=1&&o>=0;a--,o--)if(t[a]!==n[o]){if(a!==1||o!==1)do if(a--,o--,o<0||t[a]!==n[o]){let n=`\n${t[a].replace(` at new `,` at `)}`,[r]=Do(n);if(!r?.fileName)break;let i=hi(e);return i&&n.includes(`<anonymous>`)&&(n=n.replace(`<anonymous>`,i)),Xs.set(e,n),n}while(a>=1&&o>=0);break}}}finally{Ys=!1,Co(r),Ks(i),console.error=a,console.warn=o}let s=hi(e),c=s?qs(s):``;return Xs.set(e,c),c},Qs=(e,t)=>{let n=``,r=Qr(e);switch(e.tag){case r.ActivityComponent:n=qs(`Activity`);break;case r.ClassComponent:n=Zs(e.type,!0);break;case r.ForwardRef:n=Zs(mi(e.type)??e.type,!1);break;case r.FunctionComponent:case r.SimpleMemoComponent:n=Zs(mi(e.type)??e.type,!1);break;case r.HostComponent:case r.HostHoistable:case r.HostSingleton:typeof e.type==`string`&&(n=qs(e.type));break;case r.LazyComponent:n=qs(`Lazy`);break;case r.SuspenseComponent:n=e.child!==t&&t!==null?qs(`Suspense Fallback`):qs(`Suspense`);break;case r.SuspenseListComponent:n=qs(`SuspenseList`);break;case r.ViewTransitionComponent:n=qs(`ViewTransition`);break;default:return``}return n},$s=e=>{try{let t=``,n=e,r=null;do{t+=Qs(n,r);let e=n._debugInfo;if(e&&Array.isArray(e))for(let n=e.length-1;n>=0;n--){let r=e[n];typeof r.name==`string`&&(t+=Js(r.name,r.env))}r=n,n=n.return}while(n);return t}catch(e){return e instanceof Error?`\nBippy couldn’t generate the stack: ${e.message}\n${e.stack}`:``}},ec=e=>{let t=e;if(!t)return``;t.startsWith(`Error: react-stack-top-frame
18
18
  `)&&(t=t.slice(29));let n=t.indexOf(`
19
- `);n!==-1&&(t=t.slice(n+1));let r=Math.max(...wo.map(e=>t.indexOf(e)));if(r!==-1&&(r=t.lastIndexOf(`
20
- `,r)),r!==-1)t=t.slice(0,r);else return``;return t},ac=e=>!!(e.functionName&&e.fileName&&lc(e.fileName)),oc=(e,t)=>e.fileName===t.fileName&&e.lineNumber===t.lineNumber&&e.columnNumber===t.columnNumber,sc=e=>{let t=new Map;for(let n of e){if(!ac(n))continue;let e=n.functionName,r=t.get(e)??[];r.some(e=>oc(e,n))||(r.push(n),t.set(e,r))}return t},cc=(e,t,n)=>{if(!e.functionName)return{...e,isServer:!0};let r=t.get(e.functionName);if(!r||r.length===0)return{...e,isServer:!0};let i=n.get(e.functionName)??0,a=r[i%r.length];return n.set(e.functionName,i+1),{...e,isServer:!0,fileName:a.fileName,lineNumber:a.lineNumber,columnNumber:a.columnNumber,source:e.source?.replace(`(at Server)`,`(${a.fileName}:${a.lineNumber}:${a.columnNumber})`)}},lc=e=>vo.some(t=>e.startsWith(t)),uc=e=>!e.isServer&&e.fileName&&lc(e.fileName)?{...e,isServer:!0}:e,dc=e=>{let t=[],n=e;for(;n;)if(qs(n)){let e=n;if(n=e._debugOwner,n&&Ks(e)){let{frames:n,isTrusted:r}=Bo(e._debugStack);if(r)for(let e of n)t.push(uc(e))}}else{let e=n;if(n=e.owner,n&&e.debugStack instanceof Error)for(let n of Bo(e.debugStack).frames)t.push({...n,isServer:!0})}return t},fc=e=>{let t=[];return zr(e,e=>{if(!Ks(e))return;let{frames:n,isTrusted:r}=Bo(e._debugStack);r&&t.push(...n)},!0),t},pc=e=>{let t=fc(e),n=jo(rc(e)),r=sc(t),i=new Map;return n.map(e=>e.source!==void 0&&Co.test(e.source)?cc(e,r,i):e).filter((e,t,n)=>{if(t===0)return!0;let r=n[t-1];return e.functionName!==r.functionName})},mc=async(e,t=!0,n)=>Gs(pc(e),t,n),hc=e=>!!e.fileName&&!e.isIgnoreListed,gc=async(e,t=!0,n)=>{let r=dc(e);if(r.length>0){let i=Js(e)??{};i.functionName=Si(e.type)??i.functionName;let a=await Gs([i,...r],t,n);if(a.some((e,t)=>t>0&&hc(e)))return a}return mc(e,t,n)},_c=e=>{let t=e._debugSource;return t?typeof t==`object`&&typeof t.fileName==`string`&&t.fileName!==`(native)`&&typeof t.lineNumber==`number`:!1},vc=e=>e.fileName?{fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,functionName:e.functionName}:null,yc=e=>{if(!Ks(e))return null;let{frames:t,isTrusted:n}=Bo(e._debugStack);if(!n)return null;for(let e of t)if(e.fileName)return e;return null},bc=async(e,t,n)=>{let r=Si(e.type);if(!r)return null;let i=jo(Error().stack??``),a=new Set;for(let e of i){let i=e.fileName;if(!i||a.has(i))continue;a.add(i);let o=await Ws(i,t,n);if(!o)continue;let s=ps(o,r);if(s&&!s.isIgnoreListed)return vc(s)}return null},xc=async(e,t=!0,n)=>{if(_c(e))return e._debugSource;let r=yc(e)??Js(e);if(r){let[e]=await Gs([r],t,n),i=vc(e);if(i)return i}let i=await mc(e,t,n);for(let e of i)if(e.fileName)return vc(e);return bc(e,t,n)},Sc=e=>e.split(`/`).filter(Boolean).length,Cc=e=>{let t=e.indexOf(`/`,1);if(t===-1||Sc(e.slice(0,t))!==1)return e;let n=e.slice(t);if(!bo.test(n))return e;let r=n.split(`/`).filter(Boolean);if(r.length<2)return e;let i=r[0];return i.startsWith(`@`)||i.length>4?e:n},wc=e=>{if(!e||yo.some(t=>t===e))return``;let t=e,n=/^[a-zA-Z]:[\\/]/.test(t);if(t.startsWith(`http://`)||t.startsWith(`https://`)){try{t=new URL(t).pathname}catch{}t=Cc(t)}if(t.startsWith(`about://React/`)){let e=t.slice(14),n=e.indexOf(`/`),r=e.indexOf(`:`);t=n!==-1&&(r===-1||n<r)?e.slice(n+1):e}let r=!0;for(;r;){r=!1;for(let e of _o)if(t.startsWith(e)){t=t.slice(e.length),e===`file:///`&&(t=`/${t.replace(/^\/+/,``)}`),r=!0;break}}if(!n){let e=t.match(go);e&&(t=t.slice(e[0].length))}if(t.startsWith(`//`)){let e=t.indexOf(`/`,2);t=e===-1?``:t.slice(e)}let i=t.indexOf(`?`);if(i!==-1){let e=t.slice(i);So.test(e)&&(t=t.slice(0,i))}return t},Tc=e=>{let t=wc(e);return!(!t||!bo.test(t)||xo.test(t))},Ec=Symbol.for(`react.context`),Dc=[],Oc=null,kc=Error("Suspense interrupted this render. This error is an internal implementation detail of `use`."),Ac=()=>{let e=Oc;return e!==null&&(Oc=e.next),e},jc=e=>typeof e==`object`&&!!e&&`then`in e&&typeof e.then==`function`,Mc=e=>typeof e==`object`&&!!e&&`current`in e,Nc=e=>typeof e==`object`&&!!e&&`_currentValue`in e,Pc=e=>e._currentValue,Z=(e,t,n,r=null)=>{Dc.push({displayName:r,primitive:e,stackError:Error(),value:t,dispatcherHookName:n})},Fc=e=>{if(typeof e==`object`&&e){if(jc(e)){let t=e,n=jc(t)?t:e;switch(n.status){case`fulfilled`:return Z(`Promise`,n.value,`Use`),n.value;case`rejected`:throw n.reason}throw Z(`Unresolved`,n,`Use`),kc}if(`$$typeof`in e&&e.$$typeof===Ec&&Nc(e)){let t={_currentValue:e._currentValue,displayName:typeof e.displayName==`string`?e.displayName:void 0},n=Pc(t);return Z(`Context (use)`,n,`Use`,t.displayName??`Context`),n}}throw new si(`use() received an unsupported value: `+String(e))},Ic=e=>{let t=Pc(e);return Z(`Context`,t,`Context`,e.displayName??null),t},Lc=e=>{let t=Ac(),n=t===null?typeof e==`function`?e():e:t.memoizedState;return Z(`State`,n,`State`),[n,()=>{}]},Rc=(e,t,n)=>{let r=Ac(),i=r===null?n===void 0?t:n(t):r.memoizedState;return Z(`Reducer`,i,`Reducer`),[i,()=>{}]},zc=e=>{let t=Ac(),n=Mc(t?.memoizedState)?t.memoizedState:{current:e};return Z(`Ref`,n.current,`Ref`),n},Bc=()=>{let e=Ac();return Z(`CacheRefresh`,e===null?()=>{}:e.memoizedState,`CacheRefresh`),()=>{}},Vc=e=>{Ac(),Z(`LayoutEffect`,e,`LayoutEffect`)},Hc=e=>{Ac(),Z(`InsertionEffect`,e,`InsertionEffect`)},Uc=e=>{Ac(),Z(`Effect`,e,`Effect`)},Wc=e=>{Ac(),Z(`ImperativeHandle`,Mc(e)?e.current:void 0,`ImperativeHandle`)},Gc=(e,t)=>{Z(`DebugValue`,typeof t==`function`?t(e):e,`DebugValue`)},Kc=e=>{let t=Ac();return Z(`Callback`,Array.isArray(t?.memoizedState)?t.memoizedState[0]:e,`Callback`),e},qc=e=>{let t=Ac(),n=Array.isArray(t?.memoizedState)?t.memoizedState[0]:e();return Z(`Memo`,n,`Memo`),n},Jc=(e,t)=>{let n=Ac();Ac();let r=n===null?t():n.memoizedState;return Z(`SyncExternalStore`,r,`SyncExternalStore`),r},Yc=()=>{let e=Ac();Ac();let t=e?.memoizedState===!0;return Z(`Transition`,t,`Transition`),[t,()=>{}]},Xc=e=>{let t=Ac(),n=t===null?e:t.memoizedState;return Z(`DeferredValue`,n,`DeferredValue`),n},Zc=()=>{let e=Ac(),t=typeof e?.memoizedState==`string`?e.memoizedState:``;return Z(`Id`,t,`Id`),t},Qc=e=>[],$c=e=>{let t=Ac(),n=t===null?e:t.memoizedState;return Z(`Optimistic`,n,`Optimistic`),[n,()=>{}]},el=(e,t)=>{let n,r=null;if(e!==null){let t=e.memoizedState;if(jc(t))switch(t.status){case`fulfilled`:n=t.value;break;case`rejected`:r=t.reason;break;default:r=kc,n=t}else n=t}else n=t;return{value:n,error:r}},tl=e=>(t,n)=>{let r=Ac();Ac(),Ac();let{value:i,error:a}=el(r,n);if(Z(e,i,e),a!==null)throw a;return[i,()=>{},!1]},nl=tl(`ActionState`),rl={readContext:Pc,use:Fc,useCallback:Kc,useContext:Ic,useEffect:Uc,useImperativeHandle:Wc,useLayoutEffect:Vc,useInsertionEffect:Hc,useMemo:qc,useReducer:Rc,useRef:zc,useState:Lc,useDebugValue:Gc,useDeferredValue:Xc,useTransition:Yc,useSyncExternalStore:Jc,useId:Zc,useHostTransitionStatus:()=>{let e=Pc({_currentValue:null});return Z(`HostTransitionStatus`,e,`HostTransitionStatus`),e},useFormState:tl(`FormState`),useActionState:nl,useOptimistic:$c,useMemoCache:Qc,useCacheRefresh:Bc,useEffectEvent:e=>(Ac(),Z(`EffectEvent`,e,`EffectEvent`),e)};new Proxy(rl,{get(e,t){if(Object.hasOwn(e,t))return Reflect.get(e,t);throw new ci(`The React dispatcher is missing method `+t)}}),J();let il=e=>e===void 0||!Number.isFinite(e)?3:Math.max(0,Math.floor(e)),al=/^(?:\.\/)?\/?\([a-z][a-z0-9-]*\)\//,ol=e=>{let t=wc(e);return t=t.replace(al,``),t.startsWith(`./`)&&(t=t.slice(2)),t},sl=e=>{try{return decodeURIComponent(e)}catch{return e}},cl=/(?:^|[/\\])node_modules[/\\]/,ll=/[/\\]\.vite[/\\]deps[^/\\]*[/\\]/,ul=/\.[mc]?[jt]sx?$/i,dl=/^chunk-[A-Za-z0-9_-]+$/,fl=/[/\\]/,pl=/^(.+?)@v?\d/,ml=e=>e.split(fl).filter(Boolean),hl=e=>{let[t,n]=ml(e);return!t||t.startsWith(`.`)?null:t.startsWith(`@`)?n?`${t}/${n}`:null:t},gl=e=>{let t=ml(e)[0];if(!t)return null;let n=t.replace(ul,``);if(dl.test(n))return null;if(!n.startsWith(`@`))return n;let r=n.indexOf(`_`);return r===-1?null:`${n.slice(0,r)}/${n.slice(r+1)}`},_l=(e,t,n)=>{let r=e.split(t);return r.length>1?n(r[r.length-1]):null},vl=e=>e?.match(pl)?.[1]??null,yl=e=>{let t;try{t=new URL(e)}catch{return null}if(!t.hostname)return null;let n=ml(t.pathname).map(sl);for(let[e,t]of n.entries()){if(t.startsWith(`@`)){let r=vl(n[e+1]);if(r)return`${t}/${r}`;continue}let r=vl(t);if(r)return r}return null},bl=e=>_l(e,ll,gl)??_l(e,cl,hl),xl=e=>{if(!e)return null;let t=wc(e);return t&&(bl(sl(t))||yl(e))||null},Sl=/^@[A-Za-z0-9][A-Za-z0-9._-]*$/,Cl=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,wl=new Set([`app`,`web`,`website`,`frontend`,`client`,`src`]),Tl=new Set([`app`,`src`,`components`,`pages`,`features`,`modules`,`hooks`,`lib`,`utils`,`ui`,`shared`,`common`,`core`,`styles`,`assets`]),El=e=>{let t=e;for(;t.startsWith(`../`)||t.startsWith(`./`);)t=t.slice(t.startsWith(`../`)?3:2);return t},Dl=e=>{let t=El(sl(wc(e)));if(t.startsWith(`/`))return null;let[n,r,...i]=ml(t);return!n||!r||i.length===0||!Sl.test(n)||Tl.has(n.slice(1))||!Cl.test(r)||ul.test(r)||wl.has(r)?null:`${n}/${r}`},Ol=e=>e?xl(e)??Dl(e):null,kl=e=>{if(!e)return{origin:`unknown`,packageName:null};let t=Ol(e);return t?{origin:`package`,packageName:t}:Tc(e)?{origin:`app`,packageName:null}:{origin:`unknown`,packageName:null}};J(),Qa(),Zn(),ua();let Al=new Set([`role`,`name`,`aria-label`,`rel`,`href`]),jl=e=>{if(!/^[a-z-]{3,}$/i.test(e))return!1;let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0},Ml=(e,t)=>{let n=Al.has(e)||e.startsWith(`data-`)&&jl(e),r=jl(t)&&t.length<100||t.startsWith(`#`)&&jl(t.slice(1));return n&&r},Nl=e=>{let t=e[0].name;for(let n=1;n<e.length;n++)t=`${e[n].name} > ${t}`;return t},Pl=e=>{let t=0;for(let n of e)t+=n.penalty;return t},Fl=(e,t)=>Pl(e)-Pl(t),Il=(e,t)=>{let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let i=0;for(;r&&(Xn(r)&&(t===void 0||r.tagName.toLowerCase()===t)&&i++,r!==e);)r=r.nextSibling;return i},Ll=(e,t)=>e===`html`?`html`:`${e}:nth-child(${t})`,Rl=(e,t)=>e===`html`?`html`:`${e}:nth-of-type(${t})`,zl=(e,t)=>{let n=[],r=e.getAttribute(`id`),i=e.tagName.toLowerCase();r&&jl(r)&&n.push({name:`#${CSS.escape(r)}`,penalty:0});for(let t of e.classList)jl(t)&&n.push({name:`.${CSS.escape(t)}`,penalty:1});for(let r of e.attributes)t(r.name,r.value)&&n.push({name:`[${CSS.escape(r.name)}="${CSS.escape(r.value)}"]`,penalty:2});n.push({name:i,penalty:5});let a=Il(e,i);a!==void 0&&n.push({name:Rl(i,a),penalty:10});let o=Il(e);return o!==void 0&&n.push({name:Ll(i,o),penalty:50}),n},Bl=(e,t=hn,n=[])=>{if(t<=0)return[];if(e.length===0)return[n];let r=[];for(let i of e[0]){let a=t-r.length;if(a<=0)break;r.push(...Bl(e.slice(1),a,[...n,i]))}return r},Vl=(e,t)=>{let n=t.getRootNode();return la(n)?n:Za(e)?e:e.ownerDocument},Hl=(e,t)=>t.querySelectorAll(Nl(e)).length===1,Ul=(e,t)=>{let n=e,r=[];for(;n&&n!==t;){let e=n.tagName.toLowerCase(),t=Il(n,e);if(t===void 0)return;r.push({name:Rl(e,t),penalty:10}),n=n.parentElement}return Hl(r,t)?r:void 0},Wl=(e,t,n,r)=>{if(e.nodeType!==Node.ELEMENT_NODE)throw new Ma;if(e.tagName.toLowerCase()===`html`)return`html`;let i=Vl(t,e),a=Date.now(),o=[],s=e,c=0,l;for(;s&&s!==i&&!l;)if(o.push(zl(s,r)),s=s.parentElement,c++,c>=3){let t=Bl(o);t.sort(Fl);for(let r of t){if(Date.now()-a>n){let t=Ul(e,i);if(!t)throw new Na(n);return Nl(t)}if(Hl(r,i)){l=r;break}}}if(!l&&c<3){let e=Bl(o);e.sort(Fl);for(let t of e){if(Date.now()-a>n)break;if(Hl(t,i)){l=t;break}}}if(!l)throw new Pa;return Nl(l)};J();let Gl=/^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i,Kl=/:r[a-z0-9]+:/i,ql=/_r_[a-z0-9]+_(?:$|-)/i,Jl=/«r[a-z0-9]+»/i,Yl=/^(?:downshift-\d+(?:-|$)|headlessui-[a-z-]+-\d+(?:-|$)|mui-\d+(?:-|$)|radix-\d+(?:-|$)|react-aria-\d+(?:-|$)|react-select-\d+(?:-|$))/i,Xl=/^ember\d+$/i,Zl=/^\d+$/,Ql=e=>e.length>0&&e.length<=120&&!Kl.test(e)&&!Gl.test(e)&&!ql.test(e)&&!Jl.test(e)&&!Yl.test(e)&&!Xl.test(e)&&!Zl.test(e),$l=new Set([`data-testid`,`data-test-id`,`data-test`,`data-cy`,`data-qa`,`aria-label`,`href`,`src`,`role`,`name`,`title`,`alt`]),eu=new Set([`button`,`link`,`checkbox`,`radio`,`switch`,`tab`,`menuitem`,`option`,`textbox`,`combobox`,`slider`,`spinbutton`]);J(),lr(),ua(),Zn(),ea();let tu=e=>e.ownerDocument.body??e.ownerDocument.documentElement,nu=e=>e.length>0&&e.length<=120,ru=(e,t)=>$l.has(e)&&nu(t)&&(e!==`role`||t.split(/\s+/).some(e=>eu.has(e))),iu=(e,t)=>{try{let n=e.getRootNode(),r=(la(n)?n:e.ownerDocument).querySelectorAll(t);return r.length===1&&r[0]===e}catch{return!1}},au=e=>{let t=e.getAttribute(`id`),n=null;if(t){let r=`#${CSS.escape(t)}`;if(iu(e,r)){if(Ql(t))return{selector:r,isSemantic:!0};n=r}}for(let t of $l){let n=e.getAttribute(t);if(!n||!ru(t,n))continue;let r=`[${t}=${JSON.stringify(n)}]`;if(iu(e,r))return{selector:r,isSemantic:!0};let i=`${e.tagName.toLowerCase()}${r}`;if(iu(e,i))return{selector:i,isSemantic:!0}}return n?{selector:n,isSemantic:!1}:null},ou=e=>{let t=[],n=e.getRootNode(),r=la(n)?n:tu(e),i=e;for(;i;){let e=i.getAttribute(`id`);if(e){t.unshift(`#${CSS.escape(e)}`);break}let n=i.parentNode;if(!n){t.unshift(i.tagName.toLowerCase());break}let a=Array.from(n.children).indexOf(i)+1;if(t.unshift(`${i.tagName.toLowerCase()}:nth-child(${a})`),n===r){Xn(r)&&t.unshift(r.tagName.toLowerCase());break}i=Xn(n)?n:null}return t.join(` > `)},su=e=>{let t=au(e);if(t)return t;try{let t=Wl(e,tu(e),200,(e,t)=>Ml(e,t)||ru(e,t));if(t)return{selector:t,isSemantic:!1}}catch{}return{selector:ou(e),isSemantic:!1}},cu=e=>{let t=Qi(e);if(t)return{selector:t.getSelector(),isSemantic:!0};let n=au(e);if(!n?.isSemantic)return null;let r=e.getRootNode();if(la(r)){let e=cu(r.host);return e?{selector:`${e.selector} >>> ${n.selector}`,isSemantic:!0}:null}let i=cr(e.ownerDocument.defaultView);if(!i)return n;let a=cu(i);return a?{selector:`${a.selector} >>iframe>> ${n.selector}`,isSemantic:!0}:null},lu=e=>{let t=Qi(e);if(t)return{selector:t.getSelector(),isSemantic:!0};let n=su(e),r=e.getRootNode();if(la(r)){let e=lu(r.host);return{selector:`${e.selector} >>> ${n.selector}`,isSemantic:e.isSemantic&&n.isSemantic}}let i=cr(e.ownerDocument.defaultView);if(!i)return n;let a=lu(i);return{selector:`${a.selector} >>iframe>> ${n.selector}`,isSemantic:a.isSemantic&&n.isSemantic}},uu=e=>lu(e).selector;J(),eo();let du=[...Array.from($l).filter(e=>e!==`role`).map(e=>`[${e}]`),...Array.from(eu).map(e=>`[role~="${e}"]`)].join(`,`),fu=[`button`,`input`,`select`,`textarea`].join(`,`),pu=e=>{let t=e.getAttribute(`id`);return!!(t&&Ql(t)||e.matches(du))},mu=e=>pu(e)||e.matches(fu),hu=e=>{let{body:t,documentElement:n}=e.ownerDocument;if(e===t||e===n)return!0;if(!t)return!1;let r=t.getElementsByTagName(`*`).length;return r===0?!1:e.getElementsByTagName(`*`).length/r>=gn},gu=(e,t)=>{let n=e.getRootNode(),r=e;for(;r;){let i=mu(r),a=i&&hu(r);if(i){if(a&&r!==e)return e;if(!t||t(r)||a||!pu(r)&&r===e)return r}let o=$a(r);r=o?.getRootNode()===n?o:null}return e};ea();let _u=e=>{if(Qi(e))return cu(e);let t=null;return gu(e,e=>{let n=cu(e);return n?(t=n,!0):!1}),t},vu=[/\/assets\/[^/?#]+-[a-z0-9_-]{6,}\.(?:c|m)?js(?:[?#]|$)/,/\/_next\/static\/.*\.(?:c|m)?js(?:[?#]|$)/,/\/static\/chunks\/.*\.(?:c|m)?js(?:[?#]|$)/],yu=e=>{if(!e)return!1;let t=`/${ol(e)}`.toLowerCase();return vu.some(e=>e.test(t))};J();let bu=e=>{if(!e)return!1;let t=`/${ol(e)}/`.toLowerCase();return fn.some(e=>t.includes(e))},xu,Su=(e=!1)=>{let t=new URL(document.baseURI);return Array.from(document.scripts).some(n=>{if(!n.src)return!1;try{let r=new URL(n.src,t);return(e||r.origin===t.origin)&&r.pathname.includes(`/_next/static/`)}catch{return!1}})},Cu=()=>Array.from(document.scripts).some(e=>e.textContent?.includes(`self.__next_f.push`)),wu=e=>(e&&(xu=void 0),xu??=typeof document<`u`&&!!(document.getElementById(`__NEXT_DATA__`)||document.querySelector(`nextjs-portal`)||Su()||Cu()&&Su(!0)),xu),Tu=e=>e.map(e=>`\n in ${e}`).join(``),Eu,Du=()=>{if(Eu!==void 0)return Eu;let e=document.querySelector(`script[src*="/_next/"]`)?.src,t=e?new URL(e).pathname:``,n=t.indexOf(`/_next/`);return Eu=n>0?t.slice(0,n):``,Eu};Yi(),J();let Ou=[`about://React/`,`rsc://React/`],ku=e=>Ou.some(t=>e.startsWith(t)),Au=e=>{for(let t of Ou){if(!e.startsWith(t))continue;let n=e.indexOf(`/`,t.length);if(n===-1)continue;let r=n+1,i=e.lastIndexOf(`?`);return sl(i>r?e.slice(r,i):e.slice(r))}return e},ju=e=>{if(typeof e!=`object`||!e||!(`status`in e)||e.status!==`fulfilled`||!(`value`in e)||typeof e.value!=`object`||e.value===null||!(`originalStackFrame`in e.value))return null;let t=e.value.originalStackFrame;return typeof t!=`object`||!t||!(`file`in t)||typeof t.file!=`string`||!t.file||`ignored`in t&&t.ignored?null:{file:t.file,line1:`line1`in t&&typeof t.line1==`number`?t.line1:null,column1:`column1`in t&&typeof t.column1==`number`?t.column1:null}},Mu=async(e,t)=>{let n=[],r=[];for(let t=0;t<e.length;t++){let i=e[t];!i.isServer||!i.fileName||(n.push(t),r.push({file:Au(i.fileName),methodName:i.functionName??`<unknown>`,line1:i.lineNumber??null,column1:i.columnNumber??null,arguments:[]}))}if(r.length===0)return e;let i=new AbortController,a=setTimeout(()=>i.abort(),pn),o=()=>i.abort();t?.aborted&&i.abort(),t?.addEventListener(`abort`,o);try{let t=await fetch(`${Du()}/__nextjs_original-stack-frames`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({frames:r,isServer:!0,isEdgeServer:!1,isAppDirectory:!0}),priority:`high`,signal:i.signal});if(!t.ok)return e;let a=await t.json();if(!Array.isArray(a))return e;let o=[...e];for(let t=0;t<n.length;t++){let r=ju(a[t]);if(!r)continue;let i=n[t];o[i]={...e[i],fileName:r.file,lineNumber:r.line1??void 0,columnNumber:r.column1??void 0,isSymbolicated:!0}}return o}catch{return e}finally{clearTimeout(a),t?.removeEventListener(`abort`,o)}},Nu=e=>{let t=new Map;return zr(e,e=>{if(!Ks(e))return!1;let n=ic(e._debugStack.stack);if(!n)return!1;for(let e of jo(n))!e.functionName||!e.fileName||ku(e.fileName)&&(t.has(e.functionName)||t.set(e.functionName,{...e,isServer:!0}));return!1},!0),t},Pu=(e,t)=>{if(!t.some(e=>e.isServer&&!e.fileName&&e.functionName))return t;let n=Nu(e);return n.size===0?t:t.map(e=>{if(!e.isServer||e.fileName||!e.functionName)return e;let t=n.get(e.functionName);return t?{...e,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber}:e})};J();let Fu=0,Iu=[],Lu=e=>e?.aborted?Promise.resolve(!1):Fu<3?(Fu+=1,Promise.resolve(!0)):new Promise(t=>{let n={abortSignal:e,resolve:t};e&&(n.handleAbort=()=>{let e=Iu.indexOf(n);e!==-1&&(Iu.splice(e,1),t(!1))},e.addEventListener(`abort`,n.handleAbort,{once:!0})),Iu.push(n)}),Ru=()=>{let e=Iu.shift();if(e){e.abortSignal&&e.handleAbort&&e.abortSignal.removeEventListener(`abort`,e.handleAbort),e.resolve(!0);return}--Fu},zu=async(e,t,n=mn,r)=>{if(!await Lu(r))return t;let i=new AbortController,a,o=new Promise(e=>{a=setTimeout(()=>{i.abort(),e(t)},n)}),s,c=new Promise(e=>{r&&(s=()=>{i.abort(),e(t)},r.aborted?s():r.addEventListener(`abort`,s,{once:!0}))});try{let t=e(i.signal);return t.catch(()=>{}),await Promise.race([t,o,c])}finally{clearTimeout(a),s&&r?.removeEventListener(`abort`,s),Ru()}};var Bu,Vu=c((()=>{Bu=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}));Vu();let Hu=e=>Bu(e).replace(/"/g,`&quot;`).replace(/\r/g,`&#13;`).replace(/\n/g,`&#10;`).replace(/\t/g,`&#9;`),Uu=(e,t)=>{if(e.length<=t)return e;let n=Math.max(0,t-3),r=e.slice(0,n),i=r.lastIndexOf(`&`);return`${i>r.lastIndexOf(`;`)?r.slice(0,i):r}...`.slice(0,t)},Wu=e=>e.startsWith(`data-react-grab-`);J(),Zn();let Gu=e=>e.replace(/\s+/g,` `).trim(),Ku=e=>{let t=[];for(let n of e.childNodes){if(n.nodeType!==Node.TEXT_NODE)continue;let e=Gu(n.textContent??``);e&&t.push(e)}return t.join(` `)},qu=e=>e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`hidden`)?!0:Mn.has(e.tagName.toLowerCase()),Ju=(e,t,n)=>{if(e.nodeType===Node.TEXT_NODE){let r=Gu(e.textContent??``);return r?(t.push(r),n-r.length):n}if(!Xn(e)||qu(e))return n;for(let r of e.childNodes)if(n=Ju(r,t,n),n<=0)break;return n},Yu=(e,t)=>{if(qu(e))return``;let n=Ku(e);if(!jn.has(t)||n&&e.children.length===0)return n;let r=[];return Ju(e,r,100),r.join(` `)};J(),Vu(),Ra(),Zn(),$n(),ea();let Xu=(e,t,n)=>`${e}="${Uu(Hu(t),n)}"`,Zu=e=>{let t=[];for(let n of kn){if(t.length>=8)break;let r=e.getAttribute(n);if(!r)continue;let i=n===`class`?15:120;t.push(Xu(n,r,i))}return t},Qu=e=>{let t=Zu(e);return t.length>0?` ${t.join(` `)}`:``},$u=e=>e===`class`||e===`className`||e===`style`,ed=e=>{let t=Zu(e).map(e=>` ${e}`),n=[],r=[];for(let{name:t,value:i}of e.attributes)Wu(t)||kn.includes(t)||$u(t)||(An.has(t)?n.push(i?` ${Xu(t,i,120)}`:` ${t}`):i&&r.push(` ${Xu(t,i,15)}`));return[...t,...n,...r].slice(0,8).join(``)},td=e=>e.length===0?``:e.length<=2?e.map(e=>`<${La(e)} ...>`).join(`
21
- `):`(${e.length} elements)`,nd=e=>{let t=Qi(e);if(t)return t.getPreview();let n=La(e);if(!Qn(e)){let t=Qu(e),r=Uu(Bu(Yu(e,n)),100);return r?`<${n}${t}>${r}</${n}>`:`<${n}${t} />`}let r=ed(e),i=Uu(Bu(Yu(e,n)),100);return i?`<${n}${r}>${i}</${n}>`:`<${n}${r} />`},rd=e=>{let t=Qi(e);if(t)return t.getPreview();let n=La(e),r=ed(e),i=Yu(e,n),a=[],o=[],s=!1;for(let t of e.childNodes)t.nodeType!==Node.COMMENT_NODE&&(t.nodeType===Node.TEXT_NODE?t.textContent&&t.textContent.trim().length>0&&(s=!0):Xn(t)&&(s?o.push(t):a.push(t)));let c=i.length>0&&jn.has(n),l=``,u=td(a);u&&!c&&(l+=`\n ${u}`),i&&(l+=`\n ${Uu(Bu(i),100)}`);let d=td(o);return d&&!c&&(l+=`\n ${d}`),l.length>0?`<${n}${r}>${l}\n</${n}>`:`<${n}${r} />`},id=new Set([`_`,`$`,`motion.`,`styled.`,`chakra.`,`ark.`,`Primitive.`,`Slot.`]),ad=new Set(`AppRouter.AppRouterAnnouncer.AppDevOverlay.AppDevOverlayErrorBoundary.ClientPageRoot.ClientSegmentRoot.DevRootHTTPAccessFallbackBoundary.ErrorBoundary.ErrorBoundaryHandler.GracefulDegradeBoundary.HTTPAccessErrorFallback.HTTPAccessFallbackBoundary.HTTPAccessFallbackErrorBoundary.HandleRedirect.Head.HistoryUpdater.HotReload.InnerLayoutRouter.InnerScrollAndFocusHandler.InnerScrollAndFocusHandlerOld.InnerScrollAndMaybeFocusHandler.InnerScrollHandlerNew.LinkComponent.LoadableComponent.LoadingBoundary.LoadingBoundaryProvider.NotAllowedRootHTTPFallbackError.OfflineProvider.OuterLayoutRouter.RedirectBoundary.RedirectErrorBoundary.RenderFromTemplateContext.RenderValidationBoundaryAtThisLevel.ReplaySsrOnlyErrors.RootErrorBoundary.RootLevelDevOverlayElement.Router.ScrollAndFocusHandler.ScrollAndMaybeFocusHandler.SegmentBoundaryTrigger.SegmentBoundaryTriggerNode.SegmentStateProvider.SegmentTrieNode.SegmentViewNode.SegmentViewStateNode.ServerRoot.body.html`.split(`.`)),od=new Set([`<anonymous>`,`<unknown>`,`Anonymous`,`Unknown`]),sd=new Set([`Suspense`,`Fragment`,`StrictMode`,`Profiler`,`SuspenseList`]),cd=new Set([`MotionDOMComponent`,`Slot`,`SlotClone`]),ld=[`.Consumer`,`.Context`,`.Provider`,`.Slot`,`.SlotClone`,`.Slottable`,`ProviderProvider`],ud=(e,t=!1)=>{if(od.has(e)||t&&ad.has(e)||sd.has(e)||cd.has(e))return!0;for(let t of ld)if(e.endsWith(t))return!0;for(let t of id)if(e.startsWith(t))return!0;return!1},dd=(e,t=!1)=>!(!e||ud(e,t)),fd=(e,t)=>e||t.isSemantic,pd=e=>{let t=e.alternate,n=e._debugOwner,r=e._debugSource,i=e._debugStack;return{matches:a=>(a===e||a===t||a.alternate===e)&&a._debugOwner===n&&a._debugSource===r&&a._debugStack===i}},md=(e,t)=>e.length>t?`${e.slice(0,t)}...`:e;J();let hd=e=>JSON.stringify(md(e,120)),gd=(e,t,n)=>{e.get(t)===n&&e.delete(t)};J();let _d=async(e,t)=>{for(let n=0;n<2;n+=1){let r=e();if(!r)return t();let i=await r.valuePromise;if(r.isCurrent()||n===1)return i}return t()};Yi(),J(),ua(),ea();let vd=(e,t)=>!(e.length<=1||ud(e,t)||e[0]!==e[0].toUpperCase()),yd=(e,t)=>e&&vd(e,t)?e:null,bd=e=>!bu(e)&&!yu(e),xd=e=>{if(!Ci())return e;let t=e;for(;t?.ownerDocument===e.ownerDocument;){if($i(t))return t;if(t.parentElement){t=t.parentElement;continue}let e=t.getRootNode();t=la(e)?e.host:null}return e},Sd=e=>{let t=e.return?.child??null;for(;t;){if(t!==e&&t.key!==null)return!0;t=t.sibling}return!1},Cd=e=>{let t=e,n=0;for(;t;){if(t.key!==null&&Sd(t))return String(t.key);if(hi(t)&&(n+=1,n===2))break;t=t.return}return null},wd=e=>{if(!Ci())return null;let t=$i(xd(e));return Cd(t?Ei(t):null)},Td=new WeakMap,Ed=new WeakMap,Dd=e=>{let t=xd(e),n=$i(t);if(!n)return null;let r=Ei(n);return{element:t,fiber:r,revision:pd(r)}},Od=(e,t)=>{let n=Dd(e);return!!(n&&n.element===t.element&&t.revision.matches(n.fiber))},kd=(e,t,n)=>_d(()=>{let t=Dd(e);return t?{isCurrent:()=>Od(e,t),valuePromise:n(t)}:null},t),Ad=e=>t=>fetch(t,{signal:e,priority:`high`}),jd=(e,t)=>zu(async t=>{try{let n=await gc(e,!0,Ad(t));return wu()?await Mu(Pu(e,n),t):n}catch{return null}},null,void 0,t),Md=e=>{if(!Ci())return Promise.resolve([]);let t=Td.get(e.element);if(t?.revision.matches(e.fiber))return t.promise;let n=new AbortController,r=jd(e.fiber,n.signal);if(!Od(e.element,e))return r;let i={controller:n,promise:r,revision:e.revision};return Td.set(e.element,i),t?.controller.abort(),i.promise.then(t=>{t===null&&gd(Td,e.element,i)}),i.promise},Nd=e=>Ci()?kd(e,()=>null,Md):Promise.resolve([]),Pd=async e=>{if(!Ci())return null;let t=wu(),n=yd(Qi(e)?Hd(e):null,t);if(n)return n;let r=await Nd(e);if(!r)return null;for(let e of r){let n=yd(e.functionName,t);if(n)return n}return null},Fd=e=>e[0]??null,Id=(e,t)=>!fi(e)||!hi(e)?null:yd(Si(e.type),t),Ld=(e,t)=>zu(async t=>{try{let n=await xc(e,!0,Ad(t));if(!n?.fileName)return null;let r=wu();return{filePath:ol(n.fileName),lineNumber:n.lineNumber??null,columnNumber:n.columnNumber??null,componentName:yd(n.functionName,r)??Id(e._debugOwner,r),origin:kl(n.fileName).origin}}catch{return null}},null,void 0,t),Rd=e=>{let t=Ed.get(e.element);if(t?.revision.matches(e.fiber))return t.promise;let n=new AbortController,r=Ld(e.fiber,n.signal);if(!Od(e.element,e))return r;let i={controller:n,promise:r,revision:e.revision};return Ed.set(e.element,i),t?.controller.abort(),i.promise.then(t=>{t||gd(Ed,e.element,i)}),i.promise},zd=async e=>{let[t,n]=await Promise.all([Rd(e),Md(e)]);return{fiber:e.fiber,fiberSource:t,stack:n}},Bd=(e,t)=>{let n=wu(),r=(e,t)=>{let r=Fd(e);return r?.fileName?{filePath:ol(r.fileName),lineNumber:r.lineNumber??null,columnNumber:r.columnNumber??null,componentName:yd(r.functionName,n),origin:t}:null},i=t.filter(e=>kl(e.fileName).origin===`app`),a=i.filter(e=>bd(e.fileName));return e?.origin===`app`&&bd(e.filePath)?e:r(a,`app`)||(e?.origin===`app`&&!yu(e.filePath)?e:r(i,`app`)||(e?.origin===`app`||e?.origin===`package`?e:r(t.filter(e=>kl(e.fileName).origin===`package`),`package`)))},Vd=async e=>kd(e,()=>null,async e=>{let t=await Rd(e);return t?.origin===`app`&&bd(t.filePath)?t:Bd(t,await Md(e)??[])}),Hd=e=>Ud(xd(e),1)[0]??null,Ud=(e,t,n=()=>!0)=>{if(!Ci())return[];let r=$i(e);if(!r)return[];let i=wu(),a=[];return zr(Ei(r),e=>{if(a.length>=t)return!0;if(hi(e)){let t=Si(e.type);t&&dd(t,i)&&n(t)&&a.push(t)}return!1},!0),a},Wd=[`/src/app/`,`/src/pages/`,`/app/`,`/pages/`],Gd=(e,t)=>{let n=ol(e);if(!t||!n.startsWith(`/`))return n;for(let e of Wd){let t=n.indexOf(e);if(t!==-1)return`/./${n.slice(t+1)}`}return n},Kd=(e,t)=>{let n=Gd(e.filePath,t),r=t&&e.lineNumber?`${n}:${e.lineNumber}${e.columnNumber?`:${e.columnNumber}`:``}`:n;return e.componentName?`\n in ${e.componentName} (at ${r})`:`\n in ${r}`},qd={isAppSource:!1,consumesBudget:!1},Jd=(e,t,n,r)=>{let i=t.packageName,a=t.origin===`app`?e.fileName:null;if(e.isServer&&!a&&(n||!e.functionName)){let e=i?`${i} at Server`:`at Server`;return{text:`\n in ${n??`<anonymous>`} (${e})`,...qd}}return!a&&n?{text:i?`\n in ${n} (${i})`:`\n in ${n}`,...qd}:i?{text:`\n in ${i}`,...qd}:a?{text:Kd({componentName:n,filePath:a,lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null},r),isAppSource:!0,consumesBudget:bd(a)}:null},Yd=(e,t={},n=null)=>{let r=il(t.maxLines),i=Math.max(r,20),a=wu(),o=[],s=new Set,c=null,l=!1,u=!1,d=!1,f=0,p=e=>{e&&s.add(e)};if(n){let e=n.origin===`app`&&bd(n.filePath);u=e,e&&(f+=1),p(n.componentName),o.push(Kd(n,a))}for(let t of e){if(!r||o.length>=i)break;let e=kl(t.fileName),s=yd(t.functionName,a),m=e.packageName?`${e.packageName}:${s??``}:${t.isServer?`server`:`client`}`:null;if(m&&m===c)continue;if(!l&&s&&s===n?.componentName){l=!0;continue}let h=Jd(t,e,s,a);h!==null&&(h.consumesBudget&&f>=r||h.text!==o[o.length-1]&&(h.isAppSource&&h.consumesBudget&&(u=!0),h.consumesBudget&&(f+=1,d=!0),p(s),o.push(h.text),c=m))}return{text:o.join(``),shouldAppendSelectorHint:!u,hasBudgetedStackFrame:d,renderedComponentNames:s,remainingHardLineCapacity:Math.max(0,i-o.length)}},Xd=(e,t)=>{let n=Bd(e,t);return n?.origin===`app`?n:null},Zd=(e,t,n)=>{let r=Math.min(n,t.remainingHardLineCapacity);if(r===0)return t;let i=wu(),a=Ud(xd(e),r,e=>vd(e,i)&&!t.renderedComponentNames.has(e));return a.length===0?t:{...t,text:`${t.text}${Tu(a)}`,remainingHardLineCapacity:t.remainingHardLineCapacity-a.length}},Qd=(e,t,n)=>{let r=n.stack??[],i=Xd(n.fiberSource,r),a=il(t.maxLines),o=Yd(r,t,i);if(o.text)return o.hasBudgetedStackFrame?o:Zd(e,o,a);let s=Ud(xd(e),a),c=Math.max(a,20);return{text:Tu(s),shouldAppendSelectorHint:!0,hasBudgetedStackFrame:!1,renderedComponentNames:new Set(s),remainingHardLineCapacity:Math.max(0,c-s.length)}},$d=(e,t={})=>kd(e,()=>Qd(e,t,{fiber:null,fiberSource:null,stack:[]}),async n=>Qd(e,t,await zd(n))),ef=async(e,t={})=>(await $d(e,t)).text,tf=(e,t)=>{let n=wd(e),r=n===null?``:`\n key: ${hd(n)}`,i=t.shouldAppendSelectorHint?lu(gu(e)):_u(e),a=i&&fd(t.shouldAppendSelectorHint,i)?i.selector:null,o=a?`\n selector: ${a}`:``;return{selector:a,text:`${t.text}${r}${o}`}},nf=async(e,t={})=>{let n=xd(e);return`${rd(n)}${tf(n,await $d(n,t)).text}`},rf=(e,t,n)=>{let r=t.stack??[],i=Bd(t.fiberSource,r);return{componentName:Hd(e),fiber:t.fiber,source:i,stack:r,stackContext:n.text}},af=(e,t,n)=>{let r=Qd(e,t,n),i=tf(e,r);return{...rf(e,n,r),referenceContext:`${nd(e)}${i.text.replace(/\n\s+/g,` `)}`}},of=(e,t,n)=>kd(e,()=>n(e,t,{fiber:null,fiberSource:null,stack:[]}),async r=>n(e,t,await zd(r))),sf=(e,t={})=>of(e,t,af);z();let cf=e=>{let[t,n]=h(void 0),r=0;return v(C(e,e=>{let t=++r;if(!e){n(void 0);return}let i=Hd(e)??void 0;n(i),Pd(e).then(e=>{r===t&&n(e??i)}).catch(()=>{r===t&&n(i)})})),[t,n]};var lf,uf,df,ff,pf,mf,hf=c((()=>{lf=typeof window<`u`,uf=e=>0,df=e=>{},ff=lf?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):uf,pf=lf?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):df,mf=()=>lf?new Promise(e=>ff(()=>e())):Promise.resolve()}));hf();let gf=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,_f=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),vf=(e,t,n,r=1)=>{let i=_f(e),a=_f(t),o=_f(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${_f(r*255)}`},yf=e=>{if(!e.startsWith(`#`))return null;let t=e.slice(1);if(t.length!==6&&t.length!==8)return null;let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{red:n,green:r,blue:i,alpha:a}},bf=e=>{let t=e.match(gf);if(!t)return null;let n=1;if(t[4]!==void 0){let e=t[4];n=e.endsWith(`%`)?Number(e.slice(0,-1))/100:Number(e)}return vf(Number(t[1]),Number(t[2]),Number(t[3]),n)},xf=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,Sf=e=>{let t=e.match(xf);if(!t)return null;let n=t[1];return n.length===3?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n.length===4?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:`#${n}`},Cf=`rgba(0, 0, 0, 0)`,wf=`#00000000`,Tf=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,Ef=180/Math.PI,Df=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),Of=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*Ef:t===`turn`?n*360:n},kf=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},Af=e=>{let t=e.match(Tf);if(!t)return null;let n=Df(t[1],1),r=Df(t[2],.4),i=Of(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:Df(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,h=-1.2684380046*d+2.6097574011*f-.3413193965*p,g=-.0041960863*d-.7034186147*f+1.707614701*p;return vf(kf(m),kf(h),kf(g),Math.max(0,Math.min(1,a)))},jf=null,Mf=()=>jf||(typeof document>`u`?null:(jf=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),jf)),Nf=(e,t)=>{e.clearRect(0,0,1,1),e.fillStyle=t,e.fillRect(0,0,1,1);let n=e.getImageData(0,0,1,1).data;return n[3]===0?wf:vf(n[0],n[1],n[2],n[3]/255)},Pf=e=>{let t=e.trim();if(!t)return null;if(t.toLowerCase()===`transparent`)return wf;let n=Sf(t);if(n)return n;let r=Af(t);if(r)return r;let i=Mf();if(!i)return null;i.fillStyle=Cf,i.fillStyle=t;let a=i.fillStyle;return typeof a==`string`?a.toLowerCase()===Cf?t.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?wf:null:a.startsWith(`#`)&&a.length===7?a:a.startsWith(`rgb`)?bf(a):Nf(i,t):null};J();let Ff=[`data-theme`,`data-mode`,`data-color-scheme`,`data-bs-theme`,`data-mui-color-scheme`,`data-mantine-color-scheme`],If=[{attribute:`data-dark`,theme:`dark`},{attribute:`data-light`,theme:`light`}],Lf=(e,t,n)=>{let[r,i,a]=[e,t,n].map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a},Rf=(e,t=0)=>{let n=Pf(e),r=n?yf(n):null;return!r||r.alpha<=t?null:Lf(r.red,r.green,r.blue)},zf=e=>{let t=Rf(e);return t===null?null:t<.18?`dark`:`light`},Bf=e=>zf(getComputedStyle(e).backgroundColor),Vf=()=>{let e=Rf(getComputedStyle(document.documentElement).color,Rn);return e===null?null:e>.6?`dark`:null},Hf=()=>{let e=document.createElement(`div`);e.style.cssText=`position:fixed;width:0;height:0;background-color:Canvas!important`,document.documentElement.appendChild(e);let t=zf(getComputedStyle(e).backgroundColor);return e.remove(),t},Uf=e=>{let t=e.toLowerCase();return t===`dark`?`dark`:t===`light`?`light`:null},Wf=e=>{let t=e.style.colorScheme||getComputedStyle(e).colorScheme;return t?t.trim().toLowerCase().split(/\s+/):[]},Gf=e=>{let t=Wf(e),n=t.includes(`dark`);return n===t.includes(`light`)?null:n?`dark`:`light`},Kf=e=>{if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of Ff){let n=e.getAttribute(t);if(!n)continue;let r=Uf(n);if(r)return r}for(let{attribute:t,theme:n}of If)if(e.hasAttribute(t))return n;return null},qf=(e,t)=>{for(let n of e){if(!n)continue;let e=t(n);if(e)return e}return null},Jf=()=>{let e=[document.documentElement,document.body],t=[document.body,document.documentElement];return qf(e,Kf)??qf(e,Gf)??qf(t,Bf)??Vf()??Hf()??`light`},Yf=e=>e===`dark`?`light`:`dark`,Xf=()=>{let e=[];for(let t of[document.documentElement,document.body]){if(!t)continue;e.push(t.className);for(let n of Ff)e.push(t.getAttribute(n)??``);for(let{attribute:n}of If)e.push(t.hasAttribute(n)?`1`:``);let n=t.style;e.push(n.colorScheme,n.backgroundColor,n.color);for(let t=0;t<n.length;t++){let r=n[t];r.startsWith(`--`)&&e.push(`${r}:${n.getPropertyValue(r)}`)}}return e.join(`|`)},Zf={attributes:!0,attributeFilter:[`class`,`style`,...Ff,...If.map(({attribute:e})=>e)]},Qf=(e,t)=>{let n=null,r=null,i=null,a=i=>{if(i===r&&n!==null)return getComputedStyle(document.body??document.documentElement).backgroundColor,n;r=i;let a=Yf(Jf());return a!==n&&(n=a,e.setAttribute(`data-rg-theme`,a),t?.(a)),a},o=()=>a(Xf()),s=()=>{i!==null&&(pf(i),i=null)},c=()=>{i===null&&(i=ff(()=>{i=null,o()}))},l=o(),u=()=>{let e=Xf();if(e===r){c();return}s(),a(e)},d=new MutationObserver(u);d.observe(document.documentElement,Zf);let f=null;document.body?d.observe(document.body,Zf):(f=new MutationObserver((e,t)=>{document.body&&(t.disconnect(),f=null,d.observe(document.body,Zf),u())}),f.observe(document.documentElement,{childList:!0}));let p=()=>{r=null,c()},m=window.matchMedia(`(prefers-color-scheme: dark)`);return m.addEventListener(`change`,p),{theme:l,cleanup:()=>{f?.disconnect(),d.disconnect(),m.removeEventListener(`change`,p),s()}}},$f=()=>{},ep=()=>({activate:$f,deactivate:$f,toggle:$f,comment:$f,isActive:()=>!1,isEnabled:()=>!1,setEnabled:$f,getToolbarState:()=>null,setToolbarState:$f,onToolbarStateChange:()=>$f,reset:$f,dispose:$f,copyElement:()=>Promise.resolve(!1),getSource:()=>Promise.resolve(null),getStackContext:()=>Promise.resolve(``),getState:()=>({isActive:!1,isDragging:!1,isCopying:!1,isPromptMode:!1,isSelectionBoxVisible:!1,isDragBoxVisible:!1,targetElement:null,dragBounds:null,grabbedBoxes:[],labelInstances:[],selectionFilePath:null,toolbarState:null}),setOptions:$f,registerPlugin:$f,unregisterPlugin:$f,getPlugins:()=>[],getDisplayName:()=>null}),tp=()=>{let e=new AbortController;return{signal:e.signal,abort:()=>e.abort(),addWindowListener:(t,n,r={})=>{window.addEventListener(t,n,{...r,signal:e.signal})},addDocumentListener:(t,n,r={})=>{document.addEventListener(t,n,{...r,signal:e.signal})}}};var np,rp,ip=c((()=>{J(),Vu(),co(),np=`application/x-react-grab`,rp=(e,t)=>{let n=t?.componentName??`div`,r={version:sn,content:e,entries:t?.entries??[{tagName:t?.tagName,componentName:n,content:e,commentText:t?.commentText}],timestamp:Date.now()},i=t=>{t.preventDefault(),t.clipboardData?.setData(`text/plain`,e),t.clipboardData?.setData(`text/html`,`<meta charset='utf-8'><pre><code>${Bu(e)}</code></pre>`),t.clipboardData?.setData(np,JSON.stringify(r))},a=document.createElement(`textarea`);document.addEventListener(`copy`,i);try{return a.value=e,a.style.position=`fixed`,a.style.left=`-9999px`,a.ariaHidden=`true`,document.body.appendChild(a),a.select(),typeof document.execCommand==`function`?document.execCommand(`copy`):!1}finally{document.removeEventListener(`copy`,i),a.remove()}}}));ip();let ap=(e,t=`Unknown error`)=>e instanceof Error&&e.message?e.message:t,op=e=>e instanceof Error?e:Error(String(e)),sp=Symbol(`aborted-promise-result`),cp=async(e,t)=>{if(!t)return e;if(t.aborted)return sp;let n=()=>{},r=new Promise(e=>{n=()=>e(sp)});t.addEventListener(`abort`,n,{once:!0});try{return await Promise.race([e,r])}finally{t.removeEventListener(`abort`,n)}};Ra();let lp={status:`cancelled`},up=e=>({functionName:e.functionName,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,isServer:e.isServer,isSymbolicated:e.isSymbolicated}),dp=async(e,t)=>{let n=await sf(e,{maxLines:t});return{tagName:La(e),componentName:n.componentName??n.source?.componentName??void 0,content:`[${n.referenceContext}]`,source:n.source,stackContext:n.stackContext,frames:n.stack.map(up)}},fp=async(e,t)=>{let n=[...new Set(e)],r=await Promise.all(n.map(e=>dp(e,t)));return r.length>0?{content:r.map(e=>e.content).join(`
22
- `),entries:r}:null},pp=(e,t,n)=>{if(e?.entries)return t===e.content?e.entries:e.entries.length===1?[{...e.entries[0],content:t,commentText:n}]:e.entries.map(e=>({...e,commentText:n}))},mp=async(e,t,n,r)=>{if(e.signal?.aborted||await cp(t.onBeforeCopy(n),e.signal)===sp)return lp;let i=!1,a=!1,o=``;try{let s=await cp(e.getContent?Promise.resolve(e.getContent(n)).then(e=>({content:e})):fp(n,e.maxContextLines),e.signal);if(s===sp)return lp;let c=s?.content;if(c?.trim()){let l=await cp(t.transformCopyContent(c,n),e.signal);if(l===sp)return lp;o=r?`${r}\n${l}`:l,o.trim()&&(a=!0,i=rp(o,{componentName:e.componentName,entries:pp(s,o,r)}))}}catch(n){if(!a&&e.signal?.aborted)return lp;t.onCopyError(op(n))}return!a&&e.signal?.aborted?lp:(i&&t.onCopySuccess(n,o,{prompt:r}),t.onAfterCopy(n,i),{status:i?`succeeded`:`failed`})};var hp,gp=c((()=>{hp=e=>{try{return e.contentDocument}catch{return null}}})),_p,vp=c((()=>{ar(),sr(),_p=(e,t,n)=>{let r=e.getBoundingClientRect(),i=ir(e),a=or(r.width,i.width),o=or(r.height,i.height);return{x:(t-r.left)/a-i.contentOffsetX,y:(n-r.top)/o-i.contentOffsetY}}})),yp,bp,xp=c((()=>{vp(),gp(),tr(),yp=(e,t,n)=>{let r=e.elementFromPoint(t,n);for(;r;){let e=r.shadowRoot?.elementFromPoint(t,n);if(e&&e!==r){r=e;continue}if(er(r)){let e=hp(r);if(!e)return r;let i=_p(r,t,n);return yp(e,i.x,i.y)??r}return r}return null},bp=(e,t)=>yp(document,e,t)})),Sp,Cp=c((()=>{J(),eo(),Sp=e=>{let t=e;for(;t;){if(t.hasAttribute(`data-react-grab-ignore`))return!0;t=$a(t)}return!1}})),wp,Tp,Ep,Dp,Op=c((()=>{pr(),wp=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,Tp={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},Ep={checkVisibilityCSS:!0,visibilityProperty:!0},Dp=(e,t)=>{if(wp&&!t)return e.checkVisibility(Tp)?!0:e.checkVisibility(Ep)?fr(e).opacity!==`0`:!1;let n=t??fr(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`}})),kp,Ap=c((()=>{Ra(),kp=e=>{let t=La(e);return t===`html`||t===`body`}})),jp,Mp,Np=c((()=>{jp=[`data-react-grab`,`data-react-grab-demo`],Mp=e=>jp.some(t=>e.hasAttribute(t))})),Pp,Fp=c((()=>{J(),Np(),ua(),Pp=e=>{if(Mp(e)||e.hasAttribute(`data-react-grab-hit-test-shield`))return!0;let t=e.getRootNode();return la(t)&&Mp(t.host)}})),Ip,Lp,Rp,zp,Bp,Vp,Hp=c((()=>{J(),Op(),Ap(),pr(),Fp(),Cp(),ea(),Ip=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},Lp=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},Rp=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(Lp(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3},zp=new WeakMap,Bp=()=>{zp=new WeakMap},Vp=e=>{let t=Qi(e);if(t)return t.isConnected();if(kp(e)||Pp(e)||Sp(e))return!1;let n=performance.now(),r=zp.get(e);if(r&&n-r.timestamp<50)return r.isVisible;if(!Dp(e))return zp.set(e,{isVisible:!1,timestamp:n}),!1;if(e.clientWidth/(e.ownerDocument.defaultView?.innerWidth??window.innerWidth)>=.9&&e.clientHeight/(e.ownerDocument.defaultView?.innerHeight??window.innerHeight)>=.9){let t=fr(e);if(Ip(t)||Rp(t))return!1}return zp.set(e,{isVisible:!0,timestamp:n}),!0}})),Up,Wp=c((()=>{Up=e=>{if(e===`transparent`)return!0;let t=e.lastIndexOf(`/`);if(t>=0)return Number.parseFloat(e.slice(t+1))===0;if(!e.startsWith(`rgba(`))return!1;let n=e.lastIndexOf(`,`);return n>=0&&Number.parseFloat(e.slice(n+1))===0}})),Gp,Kp=c((()=>{Wp(),Gp=e=>{let t=e.ownerDocument.defaultView?.getComputedStyle?.(e);if(!t)return!1;let n=t.backgroundClip!==`text`&&(t.backgroundImage!==`none`||!Up(t.backgroundColor)),r=t.borderTopStyle!==`none`&&t.borderTopWidth!==`0px`||t.borderRightStyle!==`none`&&t.borderRightWidth!==`0px`||t.borderBottomStyle!==`none`&&t.borderBottomWidth!==`0px`||t.borderLeftStyle!==`none`&&t.borderLeftWidth!==`0px`;return n||r||t.boxShadow!==`none`||t.outlineStyle!==`none`}})),qp,Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm=c((()=>{J(),dr(),Kp(),Zn(),$n(),qp=new Set([`A`,`AUDIO`,`BUTTON`,`CANVAS`,`DETAILS`,`EMBED`,`IFRAME`,`IMG`,`INPUT`,`METER`,`OBJECT`,`OPTION`,`PROGRESS`,`SELECT`,`SUMMARY`,`SVG`,`TEXTAREA`,`VIDEO`]),Jp=new Set([`button`,`checkbox`,`combobox`,`gridcell`,`link`,`listbox`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`scrollbar`,`searchbox`,`slider`,`spinbutton`,`switch`,`tab`,`textbox`,`treeitem`]),Yp=new Set(`A.ABBR.B.BDI.BDO.BR.CITE.CODE.DATA.DEL.DFN.EM.I.INS.KBD.MARK.Q.S.SAMP.SMALL.SPAN.STRONG.SUB.SUP.TIME.U.VAR.WBR`.split(`.`)),Xp=new WeakMap,Zp=new WeakMap,Qp=()=>{Xp=new WeakMap,Zp=new WeakMap},$p=(e,t,n)=>(Xp.set(e,t),Zp.set(e,n),t),em=e=>qp.has(e.tagName)||Jp.has(e.getAttribute(`role`)??``)||Qn(e)&&e.isContentEditable,tm=e=>{let t=performance.now(),n=Zp.get(e);if(n!==void 0&&t-n<16)return Xp.get(e)??null;if(em(e)||e.childNodes.length>64)return $p(e,null,t);let r=[],i=[],a=0;for(let t=e.childNodes.length-1;t>=0;--t)i.push(e.childNodes[t]);for(;i.length>0;){if(a+=1,a>64)return $p(e,null,t);let n=i.pop();if(n){if(n.nodeType===Node.TEXT_NODE){if(n.textContent?.trim()&&(r.push(n),r.length>32))return $p(e,null,t);continue}if(!Xn(n)||!Yp.has(n.tagName)||a+i.length+n.childNodes.length>64)return $p(e,null,t);for(let e=n.childNodes.length-1;e>=0;--e)i.push(n.childNodes[e])}}if(r.length===0||Gp(e))return $p(e,null,t);try{let n=e.ownerDocument.createRange(),i=ur(e.ownerDocument.defaultView,0,0),a=[];for(let o of r){n.selectNodeContents(o);let r=n.getClientRects();if(a.length+r.length>64)return $p(e,null,t);for(let e=0;e<r.length;e+=1){let t=r[e],n=t.width*i.scaleX,o=t.height*i.scaleY;!Number.isFinite(t.left)||!Number.isFinite(t.top)||!Number.isFinite(n)||!Number.isFinite(o)||n<=0||o<=0||a.push({borderRadius:`0px`,height:o,width:n,x:i.x+t.left*i.scaleX,y:i.y+t.top*i.scaleY})}}return $p(e,a.length>0?a:null,t)}catch{return $p(e,null,t)}}})),rm,im=c((()=>{nm(),rm=(e,t,n)=>{let r=tm(e);if(!r)return!0;for(let e of r)if(t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height)return!0;return!1}})),am,om,sm=c((()=>{vp(),gp(),tr(),Cp(),Hp(),im(),co(),am=(e,t,n,r,i)=>{let a=!0;for(let o of e.elementsFromPoint(t,n)){if(Sp(o)&&(a=!1),!oo(o))continue;let s=o.shadowRoot;if(a&&s&&s!==e){let e=am(s,t,n,r,i);if(e)return e}if(a&&er(o)){let e=hp(o);if(e){let a=_p(o,t,n),s=am(e,a.x,a.y,r,i);if(s)return s}}if(Vp(o)&&rm(o,r,i))return o}return null},om=(e,t)=>am(document,e,t,e,t)})),cm,lm,um=c((()=>{vp(),gp(),tr(),Cp(),cm=(e,t,n,r)=>{let i=e.elementsFromPoint(t,n),a=!0;for(let o of i){if(Sp(o)&&(a=!1),a&&o.shadowRoot&&o.shadowRoot!==e&&cm(o.shadowRoot,t,n,r),a&&er(o)){let e=hp(o);if(e){let i=_p(o,t,n);cm(e,i.x,i.y,r)}}r.add(o)}},lm=(e,t)=>{let n=new Set;return cm(document,e,t,n),[...n]}})),dm,fm=c((()=>{vp(),lr(),tr(),dm=(e,t,n)=>{let r=[],i=e;for(;i&&i!==window;){let e=cr(i);if(!e||!er(e))break;r.push(e),i=e.ownerDocument.defaultView}let a=t,o=n;for(let e=r.length-1;e>=0;--e){let t=_p(r[e],a,o);a=t.x,o=t.y}return{x:a,y:o}}})),pm,mm,hm,gm,_m=c((()=>{fm(),pr(),Zn(),Ap(),ua(),pm=`http://www.w3.org/2000/svg`,mm=e=>{if(e.localName===`svg`)return e;let t=e,n=e.parentElement;for(;n?.namespaceURI===pm&&(t=n,n.localName!==`svg`);)n=n.parentElement;return t},hm=(e,t,n,r)=>{if(typeof e.caretPositionFromPoint==`function`){let i=e.caretPositionFromPoint(t,n,{shadowRoots:r?[r]:[]});if(i)return i.offsetNode}return typeof e.caretRangeFromPoint==`function`?e.caretRangeFromPoint(t,n)?.startContainer??null:null},gm=(e,t,n)=>{if(kp(e))return null;let r=e.ownerDocument,i=r.defaultView;if(!i)return null;let a=dm(i,t,n),o=e.getRootNode(),s=hm(r,a.x,a.y,la(o)?o:null);if(!s)return null;let c=Xn(s)?s:s.parentElement;if(!c||c===e)return null;let l=e.namespaceURI===pm;return!(l?mm(e):e).contains(c)||!l&&fr(c).pointerEvents!==`none`?null:c}})),vm,ym=c((()=>{vm=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom})),bm,xm,Sm,Cm=c((()=>{J(),eo(),bm=new Set([`auto`,`scroll`,`overlay`]),xm=(e,t,n,r,i)=>bm.has(e)?i<0?t>1:t+n<r-1:!1,Sm=(e,t,n)=>{let r=e;for(;r;){let e=n!==0&&r.scrollHeight>r.clientHeight,i=t!==0&&r.scrollWidth>r.clientWidth;if(e||i){let a=getComputedStyle(r);if(e&&xm(a.overflowY,r.scrollTop,r.clientHeight,r.scrollHeight,n)||i&&xm(a.overflowX,r.scrollLeft,r.clientWidth,r.scrollWidth,t))return r}r=$a(r)}return null}})),wm,Tm=c((()=>{wm=(e,t)=>{let n=[];for(let r of e){let e=Math.max(r.left,t.left),i=Math.max(r.top,t.top),a=Math.min(r.right,t.right),o=Math.min(r.bottom,t.bottom);if(a<=e||o<=i){n.push(r);continue}i>r.top&&n.push({left:r.left,top:r.top,right:r.right,bottom:i}),o<r.bottom&&n.push({left:r.left,top:o,right:r.right,bottom:r.bottom}),e>r.left&&n.push({left:r.left,top:i,right:e,bottom:o}),a<r.right&&n.push({left:a,top:i,right:r.right,bottom:o})}return n}})),Em,Dm,Om,km,Am,jm=c((()=>{J(),Cm(),xp(),Xa(),Tm(),Em=`full-viewport`,Dm=(e,t)=>{let n=e.createElement(`div`);return n.setAttribute(Ln,``),n.style.position=`absolute`,n.style.pointerEvents=t,n.style.background=`transparent`,n},Om=e=>{let t=[];for(let n of e){let e=n.getBoundingClientRect();e.width<=0||e.height<=0||t.push({left:e.left,top:e.top,right:e.right,bottom:e.bottom})}return t},km=e=>{let t={...e[0]};for(let n of e)n.left<t.left&&(t.left=n.left),n.top<t.top&&(t.top=n.top),n.right>t.right&&(t.right=n.right),n.bottom>t.bottom&&(t.bottom=n.bottom);return t},Am=(e,t)=>{let n=e.createElement(`div`);n.setAttribute(Ln,``),n.setAttribute(`aria-hidden`,`true`),Ya(n),n.style.cssText=`position:fixed;inset:0;pointer-events:none;contain:strict;background:transparent;z-index:${yn};`;let r=!1,i=()=>r?`none`:`auto`,a=Dm(e,i());a.style.inset=`0`,n.appendChild(a),(e.body??e.documentElement).appendChild(n);let o=[a],s=Em,c=e=>{if(r===e)return;r=e;let t=i();for(let e of o)e.style.pointerEvents=t},l=(t,n)=>{let i=r;c(!0);let a=yp(e,t,n);return c(i),a},u=t=>{let n=t.deltaX,r=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?(n*=16,r*=16):t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=e.documentElement.clientWidth,r*=e.documentElement.clientHeight),n===0&&r===0)return;let i=l(t.clientX,t.clientY);if(!i)return;let a=Sm(i,n,r);a&&(t.preventDefault(),a.scrollBy({left:n,top:r,behavior:`instant`}))};return n.addEventListener(`wheel`,u,{passive:!1}),{openForHitTest:()=>{c(!0)},closeAfterHitTest:()=>{c(!1)},refreshHoles:()=>{let r=Om(t());if(r.length===0){if(s===Em)return;s=Em,a.style.pointerEvents=i(),o=[a],n.replaceChildren(a);return}let c={left:0,top:0,right:e.documentElement.clientWidth,bottom:e.documentElement.clientHeight},l=wm([c],r[0]);for(let e=1;e<r.length;e++)l=wm(l,r[e]);l.length>12&&(l=wm([c],km(r)));let u=l.map(e=>`${e.left},${e.top},${e.right},${e.bottom}`).join(`|`);if(u===s)return;s=u;let d=i();o=l.map(t=>{let n=Dm(e,d);return n.style.left=`${t.left}px`,n.style.top=`${t.top}px`,n.style.width=`${t.right-t.left}px`,n.style.height=`${t.bottom-t.top}px`,n}),n.replaceChildren(...o)},remove:()=>{n.removeEventListener(`wheel`,u),n.remove()}}}})),Mm,Nm=c((()=>{qa(),Xa(),Mm=(e,t,n=document)=>{let r=n.createElement(`style`);r.setAttribute(e,``);let i=Ka(n);return i&&(r.nonce=i),Ya(r),r.textContent=t,n.head.appendChild(r),r}})),Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,Um,Wm,Gm,Km,qm,Jm,Ym=c((()=>{J(),jm(),Nm(),lr(),Pm=`html, body { pointer-events: auto !important; }
23
- iframe[${In}] { pointer-events: auto !important; }`,Fm=new Set,Im=new Map,Lm=!1,Rm=0,zm=e=>{let t=new Set(e.querySelectorAll(`iframe[${In}]`));for(let n of Fm){let r=cr(n.defaultView);r?.ownerDocument===e&&t.add(r)}return t},Bm=e=>{if(Im.has(e))return;let t=Mm(`data-react-grab-frozen-pseudo`,Pm,e),n=Am(e,()=>zm(e));n.refreshHoles(),Rm>0&&n.openForHitTest(),Im.set(e,{style:t,shield:n})},Vm=e=>{let t=Im.get(e);t&&(t.style.remove(),t.shield.remove(),Im.delete(e))},Hm=()=>Lm,Um=e=>(Fm.add(e),Lm&&(Bm(e),Jm()),()=>{Fm.delete(e),Vm(e),Jm()}),Wm=()=>{if(!Lm){Lm=!0,Rm=0,Fm.add(document);for(let e of Fm)Bm(e)}},Gm=()=>{if(Lm){Lm=!1,Rm=0;for(let e of[...Im.keys()])Vm(e)}},Km=()=>{if(Lm&&(Rm++,!(Rm>1)))for(let e of Im.values())e.shield.openForHitTest()},qm=()=>{if(!(!Lm||Rm===0)&&(Rm--,!(Rm>0)))for(let e of Im.values())e.shield.closeAfterHitTest()},Jm=()=>{if(Lm)for(let e of Im.values())e.shield.refreshHoles()}})),Xm,Zm=c((()=>{Xm=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)}})),Qm,$m,eh,th,nh,rh,ih,ah=c((()=>{co(),Zm(),Qm=new Set,$m=new Set,eh=!1,th=(e,t)=>{if($m.has(e))try{e.unfreeze()}catch(e){t.push(e)}finally{$m.delete(e)}},nh=e=>{Qm.add(e);try{eh&&e.isConnected()&&(e.freeze(),$m.add(e))}catch(t){throw Qm.delete(e),t}return()=>{let t=[];th(e,t),Qm.delete(e),Xm(t,`Unregistering renderer freeze failed`)}},rh=()=>{if(!eh){eh=!0;try{for(let e of Qm)e.isConnected()&&(e.freeze(),$m.add(e))}catch(e){eh=!1;let t=[];for(let e of[...$m].reverse())th(e,t);throw t.length===0?e:AggregateError([e,...t],`Rolling back renderer freeze failed`)}}},ih=()=>{if(!eh)return;eh=!1;let e=[];for(let t of[...$m].reverse())th(t,e);Xm(e,`Unfreezing renderers failed`)}})),oh,sh,ch,lh,uh,dh,fh,ph,mh,hh,gh,_h,vh,yh,bh,xh,Sh,Ch,wh,Th,Eh,Dh,Oh,kh,Ah,jh,Mh,Nh,Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh,Qh,$h,eg,tg=c((()=>{Yi(),J(),aa(),ah(),ea(),oh=new WeakMap,sh=new WeakMap,ch=new WeakMap,lh=new WeakMap,uh=new WeakMap,dh=[`name`,`position`,`rotation`,`scale`,`color`,`visible`,`args`],fh=e=>typeof e==`object`&&!!e,ph=e=>typeof e==`object`&&!!e||typeof e==`function`,mh=(e,t)=>typeof e[t]==`function`,hh=e=>fh(e)&&typeof e.x==`number`&&typeof e.y==`number`&&typeof e.z==`number`&&mh(e,`set`)&&mh(e,`clone`)&&mh(e,`applyMatrix4`)&&mh(e,`project`),gh=e=>fh(e)&&mh(e,`clone`)&&mh(e,`premultiply`),_h=e=>fh(e)&&`boundingBox`in e&&mh(e,`computeBoundingBox`),vh=e=>fh(e)&&typeof e.type==`string`&&fh(e.props)&&yh(e.object),yh=e=>fh(e)&&e.isObject3D===!0&&typeof e.uuid==`string`&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.visible==`boolean`&&gh(e.matrixWorld)&&mh(e,`updateWorldMatrix`),bh=e=>fh(e)&&e.isCamera===!0,xh=e=>yh(e)&&e.isScene===!0&&Array.isArray(e.children),Sh=e=>fh(e)&&typeof e.tagName==`string`&&e.tagName.toLowerCase()===`canvas`&&mh(e,`getContext`),Ch=e=>fh(e)&&Sh(e.domElement),wh=e=>fh(e)&&mh(e,`set`),Th=e=>fh(e)&&mh(e,`setFromCamera`)&&mh(e,`intersectObjects`),Eh=e=>fh(e)&&Ch(e.gl)&&xh(e.scene)&&bh(e.camera)&&Th(e.raycaster)&&wh(e.pointer),Dh=e=>e===`always`||e===`demand`||e===`never`,Oh=e=>fh(e)&&typeof e.elapsedTime==`number`,kh=(e,t)=>{let n=e.getState();if(typeof n.setFrameloop!=`function`)return;let r=Oh(n.clock)?n.clock.elapsedTime:null;n.setFrameloop(t);let i=e.getState().clock;r!==null&&Oh(i)&&(i.elapsedTime=r)},Ah=e=>{if(lh.has(e))return;let t=null,n=nh({freeze:()=>{let n=ch.get(e);if(!n)return;let r=n.getState();if(Dh(r.frameloop)&&typeof r.setFrameloop==`function`){let e=r.frameloop;kh(n,`never`),t=()=>kh(n,e)}},isConnected:()=>e.isConnected,unfreeze:()=>{t?.(),t=null}});lh.set(e,n)},jh=e=>{let t=lh.get(e);t&&(lh.delete(e),t())},Mh=e=>vh(e.__r3f)?e.__r3f:null,Nh=e=>{let t=e.current.stateNode;if(!fh(t)||!ph(t.containerInfo))return null;let n=t.containerInfo,r=Reflect.get(n,`getState`);if(typeof r!=`function`)return null;let i=Reflect.apply(r,n,[]);return Eh(i)?()=>{let e=Reflect.apply(r,n,[]);return Eh(e)?e:i}:null},Ph=e=>{let t=uh.get(e);t&&(uh.delete(e),ch.get(t.canvas)===t.root&&(ch.delete(t.canvas),jh(t.canvas)))},Fh=e=>{let t=Nh(e);if(!t){Ph(e);return}let n=t().gl.domElement;if(!n.isConnected||!e.current.child){Ph(e);return}let r=uh.get(e);r&&r.canvas!==n&&(Ph(e),r=void 0),r?(r.root.getState=t,r.root.selectableObjects=null):(r={canvas:n,root:{getState:t,selectableObjects:null}},uh.set(e,r)),ch.set(n,r.root),Ah(n)},Bi({name:`react-grab-three-selection`,onCommitFiberRoot:(e,t)=>Fh(t)}),Ih=e=>{let t=e;for(;t;){if(Mh(t))return t;t=t.parent}return null},Lh=e=>{let t=e;for(;t;){let e=Mh(t);if(e&&typeof e.eventCount==`number`&&e.eventCount>0)return!0;t=t.parent}return!1},Rh=(e,t)=>{let n=e;for(;n;){if(n===t)return!0;n=n.parent}return!1},zh=e=>{let t=e;for(;t;){if(!t.visible)return!1;t=t.parent}return!0},Bh=e=>!!Mh(e)&&(_h(e.geometry)||e.type.toLowerCase()===`sprite`),Vh=e=>e.isInstancedMesh!==!0||typeof e.count!=`number`||!Number.isInteger(e.count)||e.count<=0||!e.getMatrixAt?0:e.count,Hh=(e,t,n,r)=>{try{let i={object:n};r!==void 0&&(i.instanceId=r);let a=Uh(t,n,i);a&&e.push(a)}catch{}},Uh=(e,t,n)=>{let r=typeof n.instanceId==`number`&&Number.isInteger(n.instanceId)?n.instanceId:null,i=oh.get(t);i||(i=new Map,oh.set(t,i));let a=i.get(r);if(a)return a.canvas=e.gl.domElement,a.intersectionPoint=hh(n.point)?n.point:null,a.object=t,a.rootState=e,a.element;let o=Mh(t),s=o?qi(o):null;if(o&&!s)return null;let c=(o?.type||t.type||`object-3d`).toLowerCase(),l=e.gl.domElement.ownerDocument.createElement(c),u={canvas:e.gl.domElement,element:l,fiber:s,instance:o,instanceId:r,intersectionPoint:hh(n.point)?n.point:null,object:t,rootState:e,tagName:c},d=l.getBoundingClientRect.bind(l);return l.getBoundingClientRect=()=>{let e=eg(u),t=l.ownerDocument.defaultView?.DOMRect;return t?new t(e.x,e.y,e.width,e.height):d()},Zi(l,{hostElement:u.canvas,supportsDomEditing:!1,getBounds:()=>eg(u),getFiber:()=>u.fiber?Ei(u.fiber):null,getPreview:()=>qh(u),getSelector:()=>Jh(u),getTagName:()=>u.tagName,isConnected:()=>u.canvas.isConnected&&Rh(u.object,u.rootState.scene)}),i.set(r,u),sh.set(l,u),l},Wh=(e,t,n)=>{if(!Sh(e))return e;let r=ch.get(e);if(!r)return e;try{let i=r.getState(),a=Y(e);if(a.width<=0||a.height<=0)return e;let o=(t-a.x)/a.width*2-1,s=-((n-a.y)/a.height)*2+1;if(o<-1||o>1||s<-1||s>1)return e;i.pointer.set(o,s),i.raycaster.setFromCamera(i.pointer,i.camera);let c=i.raycaster.intersectObjects(i.scene.children,!0);for(let e of c){if(!Lh(e.object))continue;let t=Ih(e.object);if(!t||t.visible===!1)continue;let n=Uh(i,t,e);if(n)return n}for(let e of c){let t=Ih(e.object);if(!t||t.visible===!1)continue;let n=Uh(i,t,e);if(n)return n}}catch{}return e},Gh=(e,t)=>{if(!Sh(e))return[];let n=ch.get(e);if(!n)return[];try{let e=n.getState(),r=t?sh.get(t):null;if(!n.selectableObjects){let t=[],r=[...e.scene.children];for(let e=0;e<r.length;e+=1){let n=r[e];if(n.children)for(let e of n.children)r.push(e);Bh(n)&&t.push(n)}n.selectableObjects=t}let i=[];for(let t of n.selectableObjects){if(!zh(t)||!Rh(t,e.scene)||t.isInstancedMesh===!0&&t.count===0)continue;let n=Vh(t);if(n>0&&n<=512){for(let r=0;r<n;r+=1)Hh(i,e,t,r);continue}if(n>512&&r?.object===t&&r.instanceId!==null){i.push(r.element);continue}Hh(i,e,t)}return i}catch{return[]}},Kh=e=>typeof e==`string`?JSON.stringify(e):typeof e==`number`||typeof e==`boolean`?`{${String(e)}}`:Array.isArray(e)&&e.length<=4&&e.every(e=>typeof e==`number`||typeof e==`string`)?`{${JSON.stringify(e)}}`:null,qh=e=>{let t=e.instance?.props??{},n=[];for(let r of dh){let i=t[r];r===`name`&&i===void 0&&e.object.name&&(i=e.object.name);let a=Kh(i);a&&n.push(`${r}=${a}`)}return e.instanceId!==null&&n.push(`instanceId={${e.instanceId}}`),`<${e.tagName}${n.length>0?` ${n.join(` `)}`:``} />`},Jh=e=>{if(e.object.name)return`${e.tagName}[name=${JSON.stringify(e.object.name)}]`;let t=e.instanceId===null?``:`:${e.instanceId}`;return`${e.tagName}[uuid=${JSON.stringify(`${e.object.uuid}${t}`)}]`},Yh=e=>{e.object.updateWorldMatrix(!0,!1);let t=e.object.matrixWorld.clone();if(e.instanceId===null||!e.object.getMatrixAt)return t;let n=e.object.matrixWorld.clone();return e.object.getMatrixAt(e.instanceId,n),n.premultiply(t)},Xh=e=>{if(!_h(e.geometry))return null;if(!e.geometry.boundingBox)try{e.geometry.computeBoundingBox()}catch{return null}let t=e.geometry.boundingBox;return!t||!hh(t.min)||!hh(t.max)?null:t},Zh=e=>{if(e.isInstancedMesh!==!0||typeof e.computeBoundingBox!=`function`)return null;if(!e.boundingBox)try{e.computeBoundingBox()}catch{return null}let t=e.boundingBox;return!t||!hh(t.min)||!hh(t.max)?null:t},Qh=e=>e.instanceId===null?Zh(e.object)??Xh(e.object):Xh(e.object),$h=(e,t)=>{let n=t.x+t.width/2,r=t.y+t.height/2;try{let i=e.intersectionPoint?e.intersectionPoint.clone():hh(e.object.position)?e.object.position.clone().set(0,0,0).applyMatrix4(Yh(e)):null;i&&(i.project(e.rootState.camera),Number.isFinite(i.x)&&Number.isFinite(i.y)&&(n=t.x+(i.x+1)/2*t.width,r=t.y+(1-i.y)/2*t.height))}catch{}return{x:n-16/2,y:r-16/2,width:16,height:16,borderRadius:`0px`}},eg=e=>{let t=Y(e.canvas);try{let n=Qh(e);if(!n)return $h(e,t);let r=Yh(e),i=[n.min.x,n.max.x],a=[n.min.y,n.max.y],o=[n.min.z,n.max.z],s=1/0,c=1/0,l=-1/0,u=-1/0,d=n.min.clone();for(let n of i)for(let i of a)for(let a of o){if(d.set(n,i,a).applyMatrix4(r).project(e.rootState.camera),!Number.isFinite(d.x)||!Number.isFinite(d.y))continue;let o=t.x+(d.x+1)/2*t.width,f=t.y+(1-d.y)/2*t.height;s=Math.min(s,o),c=Math.min(c,f),l=Math.max(l,o),u=Math.max(u,f)}if(!Number.isFinite(s)||!Number.isFinite(c)||!Number.isFinite(l)||!Number.isFinite(u))return $h(e,t);let f=Math.max(t.x,s),p=Math.max(t.y,c),m=Math.min(t.x+t.width,l),h=Math.min(t.y+t.height,u);return m<=f||h<=p?$h(e,t):{x:f,y:p,width:m-f,height:h-p,borderRadius:`0px`}}catch{return $h(e,t)}}})),ng,rg,ig,ag,og,sg,cg,lg=c((()=>{J(),aa(),gp(),xp(),sm(),um(),eo(),nm(),_m(),co(),tr(),ym(),im(),Hp(),Ym(),tg(),ng=null,rg=null,ig=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},ag=(e,t,n)=>{let r=Wh(e,t,n);return Vp(r)&&oo(e)&&rm(e,t,n)?r:null},og=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];Km();try{let n=lm(e,t),r=ao()?n.filter(oo):n,i=[],a=new Set,o=!1;for(let n of r){let r=n,s=rm(n,e,t);if(!o){let i=gm(n,e,t);i&&oo(i)&&Vp(i)&&rm(i,e,t)?(r=i,s=!0,o=!0):Vp(n)&&s&&(o=!0)}let c=Wh(r,e,t);if(s&&!a.has(c)&&(a.add(c),i.push(c)),r===n)continue;let l=$a(r);for(;l&&oo(l);){let n=Wh(l,e,t);rm(l,e,t)&&!a.has(n)&&(a.add(n),i.push(n)),l=$a(l)}break}return i}finally{qm()}},sg=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();Km();try{if(rg){let r=rg.element,i=n-rg.timestamp<16;if(r.isConnected&&i&&vm(e,t,rg.bounds)&&!hp(r))return r;rg=null,ng?.element===r&&(ng=null)}if(ng){let r=ig(e,t,ng.clientX,ng.clientY),i=n-ng.timestamp<16;if(r&&i){if(!ng.preciseHitElement)return ng.element;let n=gm(ng.preciseHitElement,e,t);if(n){let r=ag(n,e,t);if(r)return r}return ng.usesTextHitTesting?ag(ng.preciseHitElement,e,t)??om(e,t):ng.fallbackElement}}let r=null,i=bp(e,t),a=i?tm(i)!==null:!1,o=i?gm(i,e,t):null,s=o?ag(o,e,t):null,c=(i?ag(i,e,t):null)??om(e,t);if(r=s??c,r&&er(r)&&!hp(r)){let e=Y(r);rg={element:r,timestamp:n,bounds:{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height}}}else rg=null;return ng={clientX:e,clientY:t,element:r,fallbackElement:c,preciseHitElement:i?.namespaceURI===`http://www.w3.org/2000/svg`||o||a?i:null,usesTextHitTesting:a,timestamp:n},r}finally{qm()}},cg=()=>{ng=null,rg=null}})),ug,dg=c((()=>{ug=(e,t,n)=>Math.max(t,Math.min(e,n))}));lg(),dg(),Qa(),ua(),lr();let fg=e=>{let t=[],n=e;for(;n;){t.unshift(n);let e=n.getRootNode();if(la(e)){n=e.host;continue}if(!Za(e))break;n=cr(e.defaultView)}return t},pg=(e,t)=>{if(e===t)return 0;let n=fg(e),r=fg(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=n[e],i=r[e];if(t===i)continue;let a=t.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0}return n.length-r.length};Ym(),J(),Ap(),co(),um(),_m(),aa(),nm(),eo(),gp(),tr(),ua(),tg();let mg=e=>e.sort(pg),hg=e=>Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>0&&e.height>0,gg=(e,t)=>e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y,_g=(e,t,n,r)=>{let i=[...e].filter(e=>!r.has(e)),a=i.filter(e=>e.tagName===`TR`),o=0;for(let t=0;t<i.length&&o<64;t+=1){let n=$a(i[t]);!n||n.tagName!==`TR`||e.has(n)||(o+=1,e.add(n),i.push(n),a.push(n))}let s=s=>{if(!s||e.has(s)||r.has(s)||o>=64)return;o+=1;let c=n.get(s);c||(c=Y(s),n.set(s,c)),!(!hg(c)||!gg(c,t))&&(e.add(s),i.push(s),s.tagName===`TR`&&a.push(s))},c=e=>{if(!(e.length>32))for(let t of e){if(o>=64)return;s(t)}};for(let e=0;e<a.length&&o<64;e+=1){let t=a[e];s(t.previousElementSibling),s(t.nextElementSibling)}for(let e=0;e<i.length&&o<64;e+=1){let t=i[e];if(kp(t))continue;let n=t.parentElement?.children.length??0;(t.tagName===`TR`||n<=32)&&(s(t.previousElementSibling),s(t.nextElementSibling)),c(t.children),t.shadowRoot&&c(t.shadowRoot.children)}},vg=(e,t)=>{if(e.width<=0||e.height<=0)return[];let n=Math.max(1,Math.round(window.innerWidth)),r=Math.max(1,Math.round(window.innerHeight)),i=e.x,a=e.y,o=e.x+e.width,s=e.y+e.height,c=i+e.width/2,l=a+e.height/2,u=ug(Math.ceil(e.width/32),3,20),d=ug(Math.ceil(e.height/32),3,20),f=u*d,p=f>100?Math.sqrt(100/f):1,m=ug(Math.floor(u*p),3,20),h=ug(Math.floor(d*p),3,20),g=new Set,_=[],v=(e,t)=>{let i=ug(Math.round(e),0,n-1),a=ug(Math.round(t),0,r-1),o=a*n+i;g.has(o)||(g.add(o),_.push(i,a))};v(t.x,t.y),v(i+1,a+1),v(o-1,a+1),v(i+1,s-1),v(o-1,s-1),v(c,a+1),v(c,s-1),v(i+1,l),v(o-1,l),v(c,l);for(let t=0;t<m;t+=1){let n=i+(t+.5)/m*e.width;for(let t=0;t<h;t+=1)v(n,a+(t+.5)/h*e.height)}return _},yg=(e,t,n)=>{let r=e.x,i=e.y,a=e.x+e.width,o=e.y+e.height,s=new Set,c=new Map,l=new Map,u=new Set,d=new Set,f=new Set,p=vg(e,t),m=e=>{let t=l.get(e);if(t!==void 0)return t;let r=n(e);return l.set(e,r),r};Km();try{for(let e=0;e<p.length;e+=2){let t=lm(p[e],p[e+1]);for(let n of t){if(n.tagName===`CANVAS`){if(d.has(n))continue;if(u.has(n)){s.add(n);continue}u.add(n);let t=n;if(e===0)try{t=Wh(n,p[e],p[e+1])}catch{}let r=Gh(n,t);if(r.length>0||t!==n){d.add(n);for(let e of r)s.add(e);t!==n&&s.add(t);continue}}s.add(n)}let n=!1;for(let r of t){let t=r;if(e===0&&!n){let n=gm(r,p[e],p[e+1]);n&&m(n)&&(s.add(n),n!==r&&f.add(r),t=n)}if(m(t)){if(!n){n=!0;continue}f.add(t)}}}}finally{qm()}for(let e of d)s.delete(e);_g(s,e,c,d);let h=[],g=null,_=1/0,v=1/0,y=window.innerWidth,b=window.innerHeight,ee=y>0&&b>0,x=y*q,S=b*q;for(let e of s){if(er(e)&&hp(e)||kp(e)||!oo(e)||!m(e))continue;let n=c.get(e)??Y(e);if(!hg(n))continue;let s=n.x,l=n.y,u=s+n.width,d=l+n.height;if(ee&&n.width>=x&&n.height>=S&&Math.min(y,u)-Math.max(0,s)>=x&&Math.min(b,d)-Math.max(0,l)>=S)continue;let p=Math.max(0,Math.min(a,u)-Math.max(r,s)),C=Math.max(0,Math.min(o,d)-Math.max(i,l)),te=n.width*n.height;if(p<=0||C<=0||te<=0)continue;let w=tm(e),T=0,E=0,D=1/0;if(w)for(let e of w){let n=e.x,s=e.y,c=n+e.width,l=s+e.height,u=Math.max(0,Math.min(a,c)-Math.max(r,n)),d=Math.max(0,Math.min(o,l)-Math.max(i,s));T+=u*d,E+=e.width*e.height;let f=Math.max(n-t.x,0,t.x-c),p=Math.max(s-t.y,0,t.y-l),m=f*f+p*p;D=Math.min(D,m)}else{T=p*C;let e=Math.max(s-t.x,0,t.x-u),n=Math.max(l-t.y,0,t.y-d);D=e*e+n*n}if(T<=0)continue;let O=w&&!f.has(e)?E:te;if(T/O>=.75){h.push(e);continue}(D<_||D===_&&te<v)&&(g=e,_=D,v=te)}return h.length>0?mg(h):g?[g]:[]},bg=e=>{let t=new Set(e),n=[];for(let r=e.length-1;r>=0;--r){let i=e[r];if(!t.has(i))continue;let a=i,o=$a(a),s=!1;for(;o;){let e=a.getRootNode();if(t.has(o)&&la(e)&&e.host===o)t.delete(o);else if(t.has(o)){s=!0;break}a=o,o=$a(a)}s||n.push(i)}return n.reverse()},xg=(e,t,n)=>bg(yg(e,t,n));J(),dg();let Sg=(e,t)=>e.width<=0?0:ug((t.x-e.x)/e.width,0,1);var Cg,wg,Tg,Eg,Dg,Og,kg=c((()=>{J(),co(),Cg={width:0,height:0,offsetLeft:0,offsetTop:0},wg=null,Tg=-1/0,Eg=()=>{Tg=-1/0},Dg=e=>{if(e){let t=e.getBoundingClientRect();Cg.width=t.width,Cg.height=t.height,Cg.offsetLeft=t.left,Cg.offsetTop=t.top;return}let t=window.visualViewport;Cg.width=t?.width??window.innerWidth,Cg.height=t?.height??window.innerHeight,Cg.offsetLeft=t?.offsetLeft??0,Cg.offsetTop=t?.offsetTop??0},Og=()=>{let e=ao(),t=performance.now();return(e!==wg||t-Tg>=16)&&(wg=e,Tg=t,Dg(e)),{width:Cg.width,height:Cg.height,offsetLeft:Cg.offsetLeft,offsetTop:Cg.offsetTop}}}));aa(),nm(),kg();let Ag=()=>{ra(),Qp(),cg(),Eg()},jg=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}),Mg=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),Ng=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.x,y:e.y});J(),eo();let Pg=(e,t,n)=>{let r=(e,t,n,r)=>{let i=[],a=e,o=0;for(;a&&i.length<n&&o<100;)r(a)&&i.push(a),a=t(a),o+=1;return i},i=r($a(e),$a,6,t);i.reverse();let a=i.map((e,t)=>({element:e,depth:t,isLast:!0})),o=i.length,s=r(e.previousElementSibling,e=>e.previousElementSibling,7,n),c=r(e.nextElementSibling,e=>e.nextElementSibling,7,n),l=Math.min(s.length,Math.max(3,7-c.length)),u=Math.min(c.length,7-l),d=[...s.slice(0,l).reverse(),e,...c.slice(0,u)],f=r(e.firstElementChild,e=>e.nextElementSibling,6,t),p=d.length-1,m=f.length-1;return d.forEach((t,n)=>{a.push({element:t,depth:o,isLast:n===p}),t===e&&f.forEach((e,t)=>{a.push({element:e,depth:o+1,isLast:t===m})})}),a};J();let Fg=e=>e.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName!==`svg`,Ig=e=>{let t=e.getBoundingClientRect();return t.width>=16||t.height>=16},Lg=(e,t)=>t(e)&&!Fg(e)&&Ig(e);J();let Rg=e=>e===`edit`?Vn:e,zg=new Set([`c`,`C`,`с`,`С`,`ȼ`,`Ȼ`,`ↄ`,`Ↄ`,`ᴄ`,`ᶜ`,`ⱼ`,`ⅽ`,`Ⅽ`,`ç`,`Ç`,`ć`,`Ć`,`č`,`Č`,`ĉ`,`Ĉ`,`ċ`,`Ċ`]),Bg=(e,t)=>t===`KeyC`?!0:!e||e.length!==1?!1:zg.has(e);var Vg,Hg,Ug,Wg=c((()=>{Vg=null,Hg=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},Ug=()=>{if(Vg===null){if(typeof navigator>`u`)return Vg=!1,Vg;let e=navigator.platform??Hg()??navigator.userAgent;Vg=/Mac|iPhone|iPad|iPod/i.test(e)}return Vg}}));Wg();let Gg=(e,t)=>{if(!e||!t)return!1;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:!1},Kg={meta:`metaKey`,cmd:`metaKey`,command:`metaKey`,win:`metaKey`,windows:`metaKey`,ctrl:`ctrlKey`,control:`ctrlKey`,shift:`shiftKey`,alt:`altKey`,option:`altKey`,opt:`altKey`},qg=e=>{let t=e.split(`+`).map(e=>e.trim().toLowerCase()),n={metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1,key:null};for(let e of t){let t=Kg[e];t?n[t]=!0:n.key=e}return n},Jg=e=>{if(typeof e==`function`)return t=>{try{return e(t)}catch{return!1}};let t=qg(e),n=t.key;return e=>{if(n===null){let n=t.metaKey?e.metaKey||e.key===`Meta`:!0,r=t.ctrlKey?e.ctrlKey||e.key===`Control`:!0,i=t.shiftKey?e.shiftKey||e.key===`Shift`:!0,a=t.altKey?e.altKey||e.key===`Alt`:!0,o=n&&r&&i&&a,s=[t.metaKey,t.ctrlKey,t.shiftKey,t.altKey].filter(Boolean).length,c=[e.metaKey||e.key===`Meta`,e.ctrlKey||e.key===`Control`,e.shiftKey||e.key===`Shift`,e.altKey||e.key===`Alt`].filter(Boolean).length;return o&&c>=s}let r=e.key?.toLowerCase()===n||Gg(n,e.code),i=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?(t.metaKey?e.metaKey:!0)&&(t.ctrlKey?e.ctrlKey:!0)&&(t.shiftKey?e.shiftKey:!0)&&(t.altKey?e.altKey:!0):!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey;return r&&i}},Yg=e=>!e||typeof e==`function`?{metaKey:Ug(),ctrlKey:!Ug(),shiftKey:!1,altKey:!1,key:null}:qg(e);Wg();let Xg=(e,t)=>{if(t.activationKey)return Jg(t.activationKey)(e);let n=(Ug()?e.metaKey:e.ctrlKey)&&!e.shiftKey&&!e.altKey;return!!(e.key&&n&&Bg(e.key,e.code))};var Zg,Qg=c((()=>{$n(),Zg=(e,t)=>{try{return e.composedPath().some(e=>Qn(e)&&e.hasAttribute(t))}catch{return!1}}}));Qg(),Ia();let $g=async(e,t)=>{let n=wu(),r=new URLSearchParams({file:e}),i=n?`line1`:`line`,a=n?`column1`:`column`;t&&r.set(i,String(t)),r.set(a,`1`);let o=n?`${Du()}/__nextjs_launch-editor`:`/__open-in-editor`;return(await fetch(`${o}?${r}`)).ok},e_=async(e,t,n)=>{try{let r=ol(e);if(await $g(r,t).catch(()=>!1))return;let i=t?`&line=${t}`:``,a=`https://react-grab.com/open-file?url=${encodeURIComponent(r)}${i}`,o=n?n(a,r,t):a;window.open(o,`_blank`,`noopener,noreferrer`)}catch(n){throw n instanceof Ea?n:new Ea(e,t,n)}};var Q,t_=c((()=>{Q=e=>{console.warn(`[react-grab]`,e)}}));Ia(),t_();let n_=(e,t,n)=>{Q(e instanceof Ea?e:new Ea(t,n,e))},r_=(e,t,n)=>{try{if(n.onOpenFile(e,t))return;e_(e,t,n.transformOpenFileUrl).catch(n=>{n_(n,e,t)})}catch(n){n_(n,e,t)}},i_=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,r=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),i=Math.max(i,a.y+a.height);return{x:t,y:n,width:r-t,height:i-n}},a_={enabled:!0,hue:0,selectionBox:{enabled:!0},dragBox:{enabled:!0},grabbedBoxes:{enabled:!0},elementLabel:{enabled:!0},toolbar:{enabled:!0}},o_=(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},toolbar:{enabled:t.toolbar?.enabled??e.toolbar.enabled}});z(),J(),Ia(),t_();let s_={activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,activationKey:void 0,getContent:void 0,maxContextLines:3,freezeReactUpdates:!0},c_=(e={})=>{let t=new Map,n=[],r={},i=!1,[a,o]=Jt({theme:a_,options:{...s_,...e},actions:[]}),s=t=>{let n=a_,r={...s_,...e},i=[];for(let{config:e}of t)if(e.theme&&(n=o_(n,e.theme)),e.options&&(r={...r,...e.options}),e.actions)for(let t of e.actions)i.push(t);return{theme:n,options:r,actions:i}},c=e=>{o(`theme`,e.theme),o(`options`,{...e.options,...r}),o(`actions`,e.actions)},l=()=>{c(s(n))},u=(e,t)=>{r[e]=t,o(`options`,e,()=>t)},d=[`activationMode`,`keyHoldDuration`,`allowActivationInsideInput`,`activationKey`,`getContent`,`maxContextLines`,`freezeReactUpdates`],f=e=>{if(!i)for(let t of d)e[t]!==void 0&&u(t,e[t])},p=({plugin:e,config:t})=>{try{let n=t.cleanup?.();Promise.resolve(n).catch(t=>{Q(new Oa(e.name,t))})}catch(t){Q(new Oa(e.name,t))}},m=(e,t)=>{let n;try{n=e.setup?.(t,C)??{};let r=n.cleanup?.bind(n);return{...n,cleanup:r,theme:e.theme?n.theme?o_(o_(a_,e.theme),n.theme):e.theme:n.theme,options:e.options?{...e.options,...n.options}:n.options,actions:e.actions?[...e.actions,...n.actions??[]]:n.actions,hooks:e.hooks?{...e.hooks,...n.hooks}:n.hooks}}catch(t){throw n&&p({plugin:e,config:n}),new ka(e.name,t)}},h=(e,r)=>{if(i)return;let a={plugin:e,config:m(e,r)},o=t.get(e.name),l=new Map(t);l.set(e.name,a);let u;try{u=s(l.values())}catch(t){throw p(a),new ka(e.name,t)}t.set(e.name,a),n=Array.from(t.values()),c(u),o&&p(o)},g=e=>{if(i)return;let r=t.get(e);r&&(t.delete(e),n=Array.from(t.values()),p(r),l())},_=()=>{if(i)return;i=!0;let e=n;t.clear(),n=[],e.forEach(p),l()},v=()=>n.map(({plugin:e})=>e.name),y=(e,...t)=>{for(let{plugin:r,config:i}of n){let n=i.hooks?.[e];if(n)try{let i=n(...t);i&&Promise.resolve(i).catch(t=>{Q(new Da(r.name,String(e),t))})}catch(t){Q(new Da(r.name,String(e),t))}}},b=(e,...t)=>{let r=!1;for(let{plugin:i,config:a}of n){let n=a.hooks?.[e];if(n)try{n(...t)===!0&&(r=!0)}catch(t){Q(new Da(i.name,String(e),t))}}return r},ee=async(e,...t)=>{for(let{plugin:r,config:i}of n){let n=i.hooks?.[e];if(n)try{await n(...t)}catch(t){Q(new Da(r.name,String(e),t))}}},x=async(e,t,...r)=>{let i=t;for(let{plugin:t,config:a}of n){let n=a.hooks?.[e];if(n)try{i=await n(i,...r)}catch(n){Q(new Da(t.name,String(e),n))}}return i},S=(e,t,...r)=>{let i=t;for(let{plugin:t,config:a}of n){let n=a.hooks?.[e];if(n)try{i=n(i,...r)}catch(n){Q(new Da(t.name,String(e),n))}}return i},C={onActivate:()=>y(`onActivate`),onDeactivate:()=>y(`onDeactivate`),onElementHover:e=>y(`onElementHover`,e),onElementSelect:e=>{let t=!1,r=[];for(let{plugin:i,config:a}of n){let n=a.hooks?.onElementSelect;if(n)try{let a=n(e);if(a){if(t=!0,a===!0)continue;r.push(a.catch(e=>(Q(new Da(i.name,`onElementSelect`,e)),!1)))}}catch(e){Q(new Da(i.name,`onElementSelect`,e))}}let i=r.length>0?Promise.all(r).then(e=>e.every(Boolean)):void 0;return{wasIntercepted:t,pendingResult:i}},onDragStart:(e,t)=>y(`onDragStart`,e,t),onDragEnd:(e,t)=>y(`onDragEnd`,e,t),onBeforeCopy:async e=>ee(`onBeforeCopy`,e),transformCopyContent:async(e,t)=>x(`transformCopyContent`,e,t),onAfterCopy:(e,t)=>y(`onAfterCopy`,e,t),onCopySuccess:(e,t,n)=>y(`onCopySuccess`,e,t,n),onCopyError:e=>y(`onCopyError`,e),onStateChange:e=>y(`onStateChange`,e),onPromptModeChange:(e,t)=>y(`onPromptModeChange`,e,t),onSelectionBox:(e,t,n)=>y(`onSelectionBox`,e,t,n),onDragBox:(e,t)=>y(`onDragBox`,e,t),onGrabbedBox:(e,t)=>y(`onGrabbedBox`,e,t),onElementLabel:(e,t,n)=>y(`onElementLabel`,e,t,n),onContextMenu:(e,t)=>y(`onContextMenu`,e,t),onOpenFile:(e,t)=>b(`onOpenFile`,e,t),transformHtmlContent:async(e,t)=>x(`transformHtmlContent`,e,t),transformAgentContext:async(e,t)=>x(`transformAgentContext`,e,t),transformActionContext:e=>S(`transformActionContext`,e),transformOpenFileUrl:(e,t,n)=>S(`transformOpenFileUrl`,e,t,n)};return E()&&w(_),{register:h,unregister:g,getPluginNames:v,setOptions:f,dispose:_,store:a,hooks:C}};var l_,u_=c((()=>{l_=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}));J(),aa(),u_();let d_=e=>{let t=e.bounds.x+e.bounds.width/2,n=e.bounds.width/2,r=e.mouseX===void 0?void 0:e.mouseX-t;return{id:l_(`label`),bounds:e.bounds,boundsMultiple:e.boundsMultiple,tagName:e.tagName,componentName:e.componentName,status:e.status,createdAt:Date.now(),element:e.element,elements:e.elements,mouseX:e.mouseX,mouseXOffsetFromCenter:r,mouseXOffsetRatio:r!==void 0&&n>0?r/n:void 0,hideArrow:e.hideArrow}},f_=(e,t,n)=>{let r=new Map,i=e=>{let t=r.get(e);t!==void 0&&(window.clearTimeout(t),r.delete(e))},a=()=>{for(let e of r.values())window.clearTimeout(e);r.clear()},o=()=>{a(),e.clearLabelInstances(),n?.()},s=t=>{i(t);let n=window.setTimeout(()=>{e.updateLabelInstance(t,`fading`);let n=window.setTimeout(()=>{r.delete(t),e.removeLabelInstance(t)},125);r.set(t,n)},dn);r.set(t,n)};return{createInstance:(t,n,r,i,a)=>{o();let s=d_({bounds:t,tagName:n,componentName:r,status:i,element:a?.element,mouseX:a?.mouseX,elements:a?.elements,boundsMultiple:a?.boundsMultiple,hideArrow:a?.hideArrow});return e.addLabelInstance(s),s.id},createPerElementInstances:(t,n)=>{o();let r=[];for(let i of t){let t=d_({bounds:Y(i.element),tagName:i.tagName,componentName:i.componentName,status:n,element:i.element,mouseX:i.mouseX});e.addLabelInstance(t),r.push(t.id)}return r},updateAfterCopy:(t,n,r)=>{n?(e.updateLabelInstance(t,`copied`),s(t)):(i(t),e.updateLabelInstance(t,`error`,r||`Unknown error`))},markRetrying:t=>{i(t),e.updateLabelInstance(t,`copying`)},dismissInstance:t=>{i(t),e.removeLabelInstance(t)},cancelAllFades:a,clearAll:o,handleHoverChange:(n,r)=>{let a=t().find(e=>e.id===n);if(a){if(r){i(n),a.status===`fading`&&e.updateLabelInstance(n,`copied`);return}(a.status===`copied`||a.status===`fading`)&&s(n)}}}},p_=e=>{let t=window.innerWidth,n=window.innerHeight,r=Math.max(0,e.x),i=Math.min(t,e.x+e.width),a=Math.max(0,e.y),o=Math.min(n,e.y+e.height);return{x:(r+i)/2,y:(a+o)/2}};J(),lg(),nm(),sa();let m_=(e,t,n)=>{let r=[],i=(t,r)=>{let i=tm(t),a=n(t);if(i){for(let e of i)if(e.x<window.innerWidth&&e.x+e.width>0&&e.y<window.innerHeight&&e.y+e.height>0){a=e;break}}let o=p_(a),s=og(o.x,o.y).filter(e),c=s.indexOf(t);return c===-1?null:s[c+r]??null},a=e=>{let t=i(e,1);return t&&(r.push(e),r.length>50&&(r=r.slice(-50))),t},o=e=>{if(r.length>0){let e=r.pop();if(X(e))return e}return i(e,-1)},s=(e,n)=>{let i=e=>n?e.nextElementSibling:e.previousElementSibling,a=i(e);for(;a;){if(t(a))return r=[],a;a=i(a)}return null};return{findNext:(e,t)=>{switch(e){case`ArrowUp`:return a(t);case`ArrowDown`:return o(t);case`ArrowRight`:return s(t,!0);case`ArrowLeft`:return s(t,!1);default:return null}},clearHistory:()=>{r=[]}}},h_=()=>{let e=new WeakSet,t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,`key`),n=!1;if(t?.get&&!t.get.__reactGrabPatched){n=!0;let r=t.get,i=function(){return e.has(this)?``:r.call(this)};i.__reactGrabPatched=!0,Object.defineProperty(KeyboardEvent.prototype,`key`,{get:i,configurable:!0})}return{claimedEvents:e,originalKeyDescriptor:t,restore:()=>{n&&t&&Object.defineProperty(KeyboardEvent.prototype,`key`,t)}}};J(),hf();let g_=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),__=(e,t,n)=>{let r=null,i=()=>{if(!t()){a();return}let o=e(),s=g_(o.x,o.y),c=0,l=0;s.top&&(l-=10),s.bottom&&(l+=10),s.left&&(c-=10),s.right&&(c+=10);let u=!1;if(c!==0||l!==0){let e=window.scrollX,t=window.scrollY;window.scrollBy({behavior:`instant`,left:c,top:l});let r=window.scrollX-e,i=window.scrollY-t;u=r!==0||i!==0,u&&n?.({x:r,y:i})}r=u?ff(i):null},a=()=>{r!==null&&(pf(r),r=null)};return{start:i,stop:a,isActive:()=>r!==null}},v_=()=>{let e=globalThis;return!!(e.chrome?.runtime?.id||e.browser?.runtime?.id)},y_=e=>{try{let t=`0.1.0`,n=`data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 294 294"><path fill="#ff40e0" d="M145 47c25-20 50-27 67-17 16 9 23 30 20 60 0 2-1 5-1 7l-2 13h-1l-12-4c-8-3-17-5-25-6l-17-3c-10-1-20-1-29-1-10 0-20 0-29 1-6 8-11 16-16 24-5 9-9 17-13 26 4 9 8 18 13 26s10 16 16 24l11 14c5 7 11 13 18 19l10 8s-1 0 0 0l-11 9c-17 14-35 22-49 22-6 0-13-2-18-5-16-9-23-30-20-59 1-3 1-5 1-8-30-12-48-29-48-50 0-18 14-35 41-47 2-1 5-2 7-3 0-2 0-5-1-7-3-30 4-51 20-60 18-10 42-3 68 17M71 201c-1 2-1 4-1 5-2 24 3 41 13 47h1c11 7 30 1 51-15-10-9-18-18-26-29-13-1-26-4-38-8m9-38c-3 9-5 17-7 26 8 2 17 4 25 6-3-5-6-10-9-16-3-5-6-10-9-16m-19-53c-2 1-3 1-5 2-21 10-34 23-34 35 0 13 14 27 39 37 3-12 7-25 12-37-5-12-9-24-12-37m37-10c-8 1-17 3-25 6 2 8 4 16 7 25 3-5 6-11 9-16zm-3-61c-4-1-8 0-12 2-10 7-15 24-13 47 0 2 0 3 1 5 12-4 25-6 38-8 8-10 16-20 26-29-15-11-29-17-40-17m111 2c-4-2-8-3-12-2-11 0-25 5-40 17 10 9 19 19 26 29 13 2 26 4 39 8v-5c3-23-2-40-13-47m-61 23c-7 6-13 13-19 19h37c-6-6-12-13-18-19"/><mask id="a"><path fill="#fff" d="m235 85-133 27 28 133 133-27Z"/></mask><path fill="#ff40e0" d="m137 130 76 11c8 1 9 11 3 15l-28 16-4 32c-1 8-10 10-14 4l-41-66c-3-6 1-13 8-12" mask="url(#a)"/></svg>`)}`;console.log(`%cReact Grab${` v${t}`}%c\nhttps://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${n}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,``),e&&navigator.onLine&&!v_()&&fetch(`https://www.react-grab.com/api/version?source=browser&v=${t}&t=${Date.now()}`,{referrerPolicy:`origin`,keepalive:!0,priority:`low`,cache:`no-store`}).then(e=>e.text()).then(e=>{e&&e!==t&&console.warn(`[React Grab] v${t} is outdated (latest: v${e}). Run \`npx grab@latest upgrade\` to upgrade.`)}).catch(()=>null)}catch{}},b_=e=>typeof e==`object`&&!!e,x_=e=>{if(!b_(e))return null;let t={};return typeof e.enabled==`boolean`&&(t.enabled=e.enabled),(e.activationMode===`toggle`||e.activationMode===`hold`)&&(t.activationMode=e.activationMode),typeof e.keyHoldDuration==`number`&&Number.isFinite(e.keyHoldDuration)&&(t.keyHoldDuration=e.keyHoldDuration),typeof e.allowActivationInsideInput==`boolean`&&(t.allowActivationInsideInput=e.allowActivationInsideInput),typeof e.activationKey==`string`&&(t.activationKey=e.activationKey),typeof e.maxContextLines==`number`&&Number.isFinite(e.maxContextLines)&&(t.maxContextLines=e.maxContextLines),typeof e.freezeReactUpdates==`boolean`&&(t.freezeReactUpdates=e.freezeReactUpdates),typeof e.telemetry==`boolean`&&(t.telemetry=e.telemetry),Object.keys(t).length===0?null:t},S_=()=>{if(typeof window>`u`)return null;try{let e=(document.currentScript instanceof HTMLScriptElement?document.currentScript:null)?.getAttribute(`data-options`);return e?x_(JSON.parse(e)):null}catch{return null}},C_=e=>e===`Enter`||e===`NumpadEnter`,w_=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height;var T_,E_,D_,O_=c((()=>{J(),co(),T_=`react-grab-toolbar-state`,E_=()=>{try{let e=localStorage.getItem(T_);if(!e)return null;let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.collapsed==`boolean`?n.collapsed:!1;return{edge:n.edge===`top`||n.edge===`bottom`||n.edge===`left`||n.edge===`right`?n.edge:`bottom`,ratio:typeof n.ratio==`number`?n.ratio:Bn,collapsed:r,enabled:!r,defaultAction:typeof n.defaultAction==`string`?n.defaultAction:Vn}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},D_=e=>{try{localStorage.setItem(T_,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}}}));O_(),z(),co();let k_=e=>{let[t,n]=h(!1);return te(()=>{let t=so(t=>n(e(t))),r=()=>n(!1);window.addEventListener(`keydown`,t,{capture:!0}),window.addEventListener(`keyup`,t,{capture:!0}),window.addEventListener(`blur`,r),w(()=>{window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`keyup`,t,{capture:!0}),window.removeEventListener(`blur`,r)})}),t},A_={name:`copy`,actions:[{id:`copy`,label:`Copy`,shortcut:`C`,showInToolbarMenu:!0,onAction:e=>{e.copy?.()}}]},j_={name:`comment`,actions:[{id:`comment`,label:`Comment`,shortcut:`Enter`,showInToolbarMenu:!0,onAction:e=>{e.enterPromptMode?.()}}]},M_={name:`open`,actions:[{id:`open`,label:`Open`,shortcut:`O`,enabled:e=>!!e.filePath,onAction:e=>{e.filePath&&(r_(e.filePath,e.lineNumber,e.hooks),e.hideContextMenu(),e.cleanup())}}]};var N_,P_,F_,I_,L_,R_=c((()=>{N_=`react-grab-comment-items`,P_=1e3,F_=60*P_,I_=60*F_,L_=24*I_})),z_,B_,V_,H_,U_,W_,G_,K_,q_,J_,Y_,X_,Z_,Q_=c((()=>{u_(),R_(),z_=new Set,B_=null,V_=e=>{if(typeof e.content!=`string`||typeof e.commentText!=`string`||typeof e.tagName!=`string`||typeof e.timestamp!=`number`||!Number.isFinite(e.timestamp))return null;let t=typeof e.componentName==`string`?e.componentName:typeof e.elementName==`string`?e.elementName:void 0;return{id:typeof e.id==`string`?e.id:l_(`comment`),content:e.content,tagName:e.tagName,componentName:t,elementsCount:typeof e.elementsCount==`number`&&Number.isFinite(e.elementsCount)?Math.max(1,Math.floor(e.elementsCount)):1,elementSelectors:Array.isArray(e.elementSelectors)?e.elementSelectors.filter(e=>typeof e==`string`):[],commentText:e.commentText,timestamp:e.timestamp}},H_=()=>{if(typeof window>`u`)return[];try{let e=sessionStorage.getItem(N_);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.map(e=>V_(e)).filter(e=>e!==null).slice(0,50):[]}catch{return[]}},U_=()=>(B_??=H_(),B_),W_=e=>{let t=e;for(;t.length>0;){let e=JSON.stringify(t);if(new Blob([e]).size<=524288)return t;t=t.slice(0,-1)}return[]},G_=e=>{B_=W_(e);try{sessionStorage.setItem(N_,JSON.stringify(B_))}catch{}for(let e of z_)e(B_);return B_},K_=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),q_=()=>[...U_()],J_=e=>{let t=U_().filter(t=>t.commentText!==e.commentText||!K_(t.elementSelectors,e.elementSelectors));return G_([{...e,id:l_(`comment`)},...t].slice(0,50))},Y_=e=>G_(U_().filter(t=>t.id!==e)),X_=()=>G_([]),Z_=e=>(z_.add(e),()=>{z_.delete(e)})}));Ra(),Q_();let $_={name:`fork-comment-history`,setup:e=>({hooks:{onCopySuccess:(t,n,r)=>{let i=r.prompt?.trim();if(!i||t.length===0)return;let a=t[0],o=e.getDisplayName(a)??void 0,s=t.map(e=>{try{return uu(gu(e))}catch{return``}});J_({content:n,tagName:La(a)??`div`,componentName:o,elementsCount:t.length,elementSelectors:s,commentText:i,timestamp:Date.now()})}}})};var ev,tv=c((()=>{ev=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n])})),nv,rv,iv,av,ov,sv,cv,lv,uv,dv,fv,pv,mv,hv=c((()=>{J(),hf(),nv=!1,rv=null,iv=!1,av=new Map,ov=-1,sv=new WeakSet,cv=new WeakSet,lv=new WeakMap,uv=new Map,dv=new Map,fv=e=>{if(rv===e&&(iv=!0),sv.has(e))return!0;if(!nv&&rv===e){let t=(lv.get(e)??0)+1;return lv.set(e,t),t<4?!1:(sv.add(e),!0)}return!nv||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(sv.add(e),cv.add(e),!0)},typeof window<`u`&&(window.requestAnimationFrame=e=>{let t=fv(e);if(nv&&t){let t=ov--;return av.set(t,e),t}let n=ff(t=>{if(nv&&fv(e)){let t=ov--;av.set(t,e),uv.set(n,t);return}let r=rv,i=iv;rv=e,iv=!1;try{e(t)}finally{let t=iv;rv=r,iv=i,!t&&!cv.has(e)&&(sv.delete(e),lv.delete(e))}});return n},window.cancelAnimationFrame=e=>{if(av.has(e)){av.delete(e);return}let t=dv.get(e);if(t!==void 0){pf(t.nativeId),dv.delete(e);return}let n=uv.get(e);if(n!==void 0){av.delete(n),uv.delete(e);return}pf(e)}),pv=()=>{if(!nv){nv=!0,av.clear(),uv.clear();for(let[e,{nativeId:t,callback:n}]of dv)pf(t),av.set(e,n);dv.clear()}},mv=()=>{if(nv){nv=!1;for(let[e,t]of av.entries()){let n=ff(n=>{dv.delete(e);let r=rv,i=iv;rv=t,iv=!1;try{t(n)}finally{let e=iv;rv=r,iv=i,!e&&!cv.has(t)&&(sv.delete(t),lv.delete(t))}});dv.set(e,{nativeId:n,callback:t})}av.clear(),uv.clear()}}})),gv,_v,vv,yv,bv,xv,Sv,Cv,wv,Tv,Ev,Dv,Ov,kv,Av,jv,Mv,Nv,Pv,Fv,Iv,Lv,Rv,zv,Bv,Vv,Hv,Uv,Wv,Gv,Kv,qv,Jv=c((()=>{J(),tv(),Nm(),hv(),Zn(),Np(),ua(),co(),Zm(),gv=`
24
- [${Fn}],
25
- [${Fn}] * {
19
+ `);n!==-1&&(t=t.slice(n+1));let r=Math.max(...bo.map(e=>t.indexOf(e)));if(r!==-1&&(r=t.lastIndexOf(`
20
+ `,r)),r!==-1)t=t.slice(0,r);else return``;return t},tc=e=>!!(e.functionName&&e.fileName&&ac(e.fileName)),nc=(e,t)=>e.fileName===t.fileName&&e.lineNumber===t.lineNumber&&e.columnNumber===t.columnNumber,rc=e=>{let t=new Map;for(let n of e){if(!tc(n))continue;let e=n.functionName,r=t.get(e)??[];r.some(e=>nc(e,n))||(r.push(n),t.set(e,r))}return t},ic=(e,t,n)=>{if(!e.functionName)return{...e,isServer:!0};let r=t.get(e.functionName);if(!r||r.length===0)return{...e,isServer:!0};let i=n.get(e.functionName)??0,a=r[i%r.length];return n.set(e.functionName,i+1),{...e,isServer:!0,fileName:a.fileName,lineNumber:a.lineNumber,columnNumber:a.columnNumber,source:e.source?.replace(`(at Server)`,`(${a.fileName}:${a.lineNumber}:${a.columnNumber})`)}},ac=e=>mo.some(t=>e.startsWith(t)),oc=e=>!e.isServer&&e.fileName&&ac(e.fileName)?{...e,isServer:!0}:e,sc=e=>{let t=[],n=e;for(;n;)if(Us(n)){let e=n;if(n=e._debugOwner,n&&Hs(e)){let{frames:n,isTrusted:r}=Io(e._debugStack);if(r)for(let e of n)t.push(oc(e))}}else{let e=n;if(n=e.owner,n&&e.debugStack instanceof Error)for(let n of Io(e.debugStack).frames)t.push({...n,isServer:!0})}return t},cc=e=>{let t=[];return Mr(e,e=>{if(!Hs(e))return;let{frames:n,isTrusted:r}=Io(e._debugStack);r&&t.push(...n)},!0),t},lc=e=>{let t=cc(e),n=Do($s(e)),r=rc(t),i=new Map;return n.map(e=>e.source!==void 0&&yo.test(e.source)?ic(e,r,i):e).filter((e,t,n)=>{if(t===0)return!0;let r=n[t-1];return e.functionName!==r.functionName})},uc=async(e,t=!0,n)=>Vs(lc(e),t,n),dc=e=>!!e.fileName&&!e.isIgnoreListed,fc=async(e,t=!0,n)=>{let r=sc(e);if(r.length>0){let i=Ws(e)??{};i.functionName=hi(e.type)??i.functionName;let a=await Vs([i,...r],t,n);if(a.some((e,t)=>t>0&&dc(e)))return a}return uc(e,t,n)},pc=e=>{let t=e._debugSource;return t?typeof t==`object`&&typeof t.fileName==`string`&&t.fileName!==`(native)`&&typeof t.lineNumber==`number`:!1},mc=e=>e.fileName?{fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,functionName:e.functionName}:null,hc=e=>{if(!Hs(e))return null;let{frames:t,isTrusted:n}=Io(e._debugStack);if(!n)return null;for(let e of t)if(e.fileName)return e;return null},gc=async(e,t,n)=>{let r=hi(e.type);if(!r)return null;let i=Do(Error().stack??``),a=new Set;for(let e of i){let i=e.fileName;if(!i||a.has(i))continue;a.add(i);let o=await Bs(i,t,n);if(!o)continue;let s=ls(o,r);if(s&&!s.isIgnoreListed)return mc(s)}return null},_c=async(e,t=!0,n)=>{if(pc(e))return e._debugSource;let r=hc(e)??Ws(e);if(r){let[e]=await Vs([r],t,n),i=mc(e);if(i)return i}let i=await uc(e,t,n);for(let e of i)if(e.fileName)return mc(e);return gc(e,t,n)},vc=e=>e.split(`/`).filter(Boolean).length,yc=e=>{let t=e.indexOf(`/`,1);if(t===-1||vc(e.slice(0,t))!==1)return e;let n=e.slice(t);if(!go.test(n))return e;let r=n.split(`/`).filter(Boolean);if(r.length<2)return e;let i=r[0];return i.startsWith(`@`)||i.length>4?e:n},bc=e=>{if(!e||ho.some(t=>t===e))return``;let t=e,n=/^[a-zA-Z]:[\\/]/.test(t);if(t.startsWith(`http://`)||t.startsWith(`https://`)){try{t=new URL(t).pathname}catch{}t=yc(t)}if(t.startsWith(`about://React/`)){let e=t.slice(14),n=e.indexOf(`/`),r=e.indexOf(`:`);t=n!==-1&&(r===-1||n<r)?e.slice(n+1):e}let r=!0;for(;r;){r=!1;for(let e of po)if(t.startsWith(e)){t=t.slice(e.length),e===`file:///`&&(t=`/${t.replace(/^\/+/,``)}`),r=!0;break}}if(!n){let e=t.match(fo);e&&(t=t.slice(e[0].length))}if(t.startsWith(`//`)){let e=t.indexOf(`/`,2);t=e===-1?``:t.slice(e)}let i=t.indexOf(`?`);if(i!==-1){let e=t.slice(i);vo.test(e)&&(t=t.slice(0,i))}return t},xc=e=>{let t=bc(e);return!(!t||!go.test(t)||_o.test(t))},Sc=Symbol.for(`react.context`),Cc=[],wc=null,Tc=Error("Suspense interrupted this render. This error is an internal implementation detail of `use`."),Ec=()=>{let e=wc;return e!==null&&(wc=e.next),e},Dc=e=>typeof e==`object`&&!!e&&`then`in e&&typeof e.then==`function`,Oc=e=>typeof e==`object`&&!!e&&`current`in e,kc=e=>typeof e==`object`&&!!e&&`_currentValue`in e,Ac=e=>e._currentValue,jc=(e,t,n,r=null)=>{Cc.push({displayName:r,primitive:e,stackError:Error(),value:t,dispatcherHookName:n})},Mc=e=>{if(typeof e==`object`&&e){if(Dc(e)){let t=e,n=Dc(t)?t:e;switch(n.status){case`fulfilled`:return jc(`Promise`,n.value,`Use`),n.value;case`rejected`:throw n.reason}throw jc(`Unresolved`,n,`Use`),Tc}if(`$$typeof`in e&&e.$$typeof===Sc&&kc(e)){let t={_currentValue:e._currentValue,displayName:typeof e.displayName==`string`?e.displayName:void 0},n=Ac(t);return jc(`Context (use)`,n,`Use`,t.displayName??`Context`),n}}throw new ei(`use() received an unsupported value: `+String(e))},Nc=e=>{let t=Ac(e);return jc(`Context`,t,`Context`,e.displayName??null),t},Pc=e=>{let t=Ec(),n=t===null?typeof e==`function`?e():e:t.memoizedState;return jc(`State`,n,`State`),[n,()=>{}]},Fc=(e,t,n)=>{let r=Ec(),i=r===null?n===void 0?t:n(t):r.memoizedState;return jc(`Reducer`,i,`Reducer`),[i,()=>{}]},Ic=e=>{let t=Ec(),n=Oc(t?.memoizedState)?t.memoizedState:{current:e};return jc(`Ref`,n.current,`Ref`),n},Lc=()=>{let e=Ec();return jc(`CacheRefresh`,e===null?()=>{}:e.memoizedState,`CacheRefresh`),()=>{}},Rc=e=>{Ec(),jc(`LayoutEffect`,e,`LayoutEffect`)},zc=e=>{Ec(),jc(`InsertionEffect`,e,`InsertionEffect`)},Bc=e=>{Ec(),jc(`Effect`,e,`Effect`)},Vc=e=>{Ec(),jc(`ImperativeHandle`,Oc(e)?e.current:void 0,`ImperativeHandle`)},Hc=(e,t)=>{jc(`DebugValue`,typeof t==`function`?t(e):e,`DebugValue`)},Uc=e=>{let t=Ec();return jc(`Callback`,Array.isArray(t?.memoizedState)?t.memoizedState[0]:e,`Callback`),e},Wc=e=>{let t=Ec(),n=Array.isArray(t?.memoizedState)?t.memoizedState[0]:e();return jc(`Memo`,n,`Memo`),n},Gc=(e,t)=>{let n=Ec();Ec();let r=n===null?t():n.memoizedState;return jc(`SyncExternalStore`,r,`SyncExternalStore`),r},Kc=()=>{let e=Ec();Ec();let t=e?.memoizedState===!0;return jc(`Transition`,t,`Transition`),[t,()=>{}]},qc=e=>{let t=Ec(),n=t===null?e:t.memoizedState;return jc(`DeferredValue`,n,`DeferredValue`),n},Jc=()=>{let e=Ec(),t=typeof e?.memoizedState==`string`?e.memoizedState:``;return jc(`Id`,t,`Id`),t},Yc=e=>[],Xc=e=>{let t=Ec(),n=t===null?e:t.memoizedState;return jc(`Optimistic`,n,`Optimistic`),[n,()=>{}]},Zc=(e,t)=>{let n,r=null;if(e!==null){let t=e.memoizedState;if(Dc(t))switch(t.status){case`fulfilled`:n=t.value;break;case`rejected`:r=t.reason;break;default:r=Tc,n=t}else n=t}else n=t;return{value:n,error:r}},Qc=e=>(t,n)=>{let r=Ec();Ec(),Ec();let{value:i,error:a}=Zc(r,n);if(jc(e,i,e),a!==null)throw a;return[i,()=>{},!1]},$c=Qc(`ActionState`),el={readContext:Ac,use:Mc,useCallback:Uc,useContext:Nc,useEffect:Bc,useImperativeHandle:Vc,useLayoutEffect:Rc,useInsertionEffect:zc,useMemo:Wc,useReducer:Fc,useRef:Ic,useState:Pc,useDebugValue:Hc,useDeferredValue:qc,useTransition:Kc,useSyncExternalStore:Gc,useId:Jc,useHostTransitionStatus:()=>{let e=Ac({_currentValue:null});return jc(`HostTransitionStatus`,e,`HostTransitionStatus`),e},useFormState:Qc(`FormState`),useActionState:$c,useOptimistic:Xc,useMemoCache:Yc,useCacheRefresh:Lc,useEffectEvent:e=>(Ec(),jc(`EffectEvent`,e,`EffectEvent`),e)};new Proxy(el,{get(e,t){if(Object.hasOwn(e,t))return Reflect.get(e,t);throw new ti(`The React dispatcher is missing method `+t)}}),J();let tl=e=>e===void 0||!Number.isFinite(e)?3:Math.max(0,Math.floor(e)),nl=/^(?:\.\/)?\/?\([a-z][a-z0-9-]*\)\//,rl=e=>{let t=bc(e);return t=t.replace(nl,``),t.startsWith(`./`)&&(t=t.slice(2)),t},il=e=>{try{return decodeURIComponent(e)}catch{return e}},al=/(?:^|[/\\])node_modules[/\\]/,ol=/[/\\]\.vite[/\\]deps[^/\\]*[/\\]/,sl=/\.[mc]?[jt]sx?$/i,cl=/^chunk-[A-Za-z0-9_-]+$/,ll=/[/\\]/,ul=/^(.+?)@v?\d/,dl=e=>e.split(ll).filter(Boolean),fl=e=>{let[t,n]=dl(e);return!t||t.startsWith(`.`)?null:t.startsWith(`@`)?n?`${t}/${n}`:null:t},pl=e=>{let t=dl(e)[0];if(!t)return null;let n=t.replace(sl,``);if(cl.test(n))return null;if(!n.startsWith(`@`))return n;let r=n.indexOf(`_`);return r===-1?null:`${n.slice(0,r)}/${n.slice(r+1)}`},ml=(e,t,n)=>{let r=e.split(t);return r.length>1?n(r[r.length-1]):null},hl=e=>e?.match(ul)?.[1]??null,gl=e=>{let t;try{t=new URL(e)}catch{return null}if(!t.hostname)return null;let n=dl(t.pathname).map(il);for(let[e,t]of n.entries()){if(t.startsWith(`@`)){let r=hl(n[e+1]);if(r)return`${t}/${r}`;continue}let r=hl(t);if(r)return r}return null},_l=e=>ml(e,ol,pl)??ml(e,al,fl),vl=e=>{if(!e)return null;let t=bc(e);return t&&(_l(il(t))||gl(e))||null},yl=/^@[A-Za-z0-9][A-Za-z0-9._-]*$/,bl=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,xl=new Set([`app`,`web`,`website`,`frontend`,`client`,`src`]),Sl=new Set([`app`,`src`,`components`,`pages`,`features`,`modules`,`hooks`,`lib`,`utils`,`ui`,`shared`,`common`,`core`,`styles`,`assets`]),Cl=e=>{let t=e;for(;t.startsWith(`../`)||t.startsWith(`./`);)t=t.slice(t.startsWith(`../`)?3:2);return t},wl=e=>{let t=Cl(il(bc(e)));if(t.startsWith(`/`))return null;let[n,r,...i]=dl(t);return!n||!r||i.length===0||!yl.test(n)||Sl.has(n.slice(1))||!bl.test(r)||sl.test(r)||xl.has(r)?null:`${n}/${r}`},Tl=e=>e?vl(e)??wl(e):null,El=e=>{if(!e)return{origin:`unknown`,packageName:null};let t=Tl(e);return t?{origin:`package`,packageName:t}:xc(e)?{origin:`app`,packageName:null}:{origin:`unknown`,packageName:null}};J(),Ja(),Wn(),oa();let Dl=new Set([`role`,`name`,`aria-label`,`rel`,`href`]),Ol=e=>{if(!/^[a-z-]{3,}$/i.test(e))return!1;let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0},kl=(e,t)=>{let n=Dl.has(e)||e.startsWith(`data-`)&&Ol(e),r=Ol(t)&&t.length<100||t.startsWith(`#`)&&Ol(t.slice(1));return n&&r},Al=e=>{let t=e[0].name;for(let n=1;n<e.length;n++)t=`${e[n].name} > ${t}`;return t},jl=e=>{let t=0;for(let n of e)t+=n.penalty;return t},Ml=(e,t)=>jl(e)-jl(t),Nl=(e,t)=>{let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let i=0;for(;r&&(Un(r)&&(t===void 0||r.tagName.toLowerCase()===t)&&i++,r!==e);)r=r.nextSibling;return i},Pl=(e,t)=>e===`html`?`html`:`${e}:nth-child(${t})`,Fl=(e,t)=>e===`html`?`html`:`${e}:nth-of-type(${t})`,Il=(e,t)=>{let n=[],r=e.getAttribute(`id`),i=e.tagName.toLowerCase();r&&Ol(r)&&n.push({name:`#${CSS.escape(r)}`,penalty:0});for(let t of e.classList)Ol(t)&&n.push({name:`.${CSS.escape(t)}`,penalty:1});for(let r of e.attributes)t(r.name,r.value)&&n.push({name:`[${CSS.escape(r.name)}="${CSS.escape(r.value)}"]`,penalty:2});n.push({name:i,penalty:5});let a=Nl(e,i);a!==void 0&&n.push({name:Fl(i,a),penalty:10});let o=Nl(e);return o!==void 0&&n.push({name:Pl(i,o),penalty:50}),n},Ll=(e,t=cn,n=[])=>{if(t<=0)return[];if(e.length===0)return[n];let r=[];for(let i of e[0]){let a=t-r.length;if(a<=0)break;r.push(...Ll(e.slice(1),a,[...n,i]))}return r},Rl=(e,t)=>{let n=t.getRootNode();return aa(n)?n:qa(e)?e:e.ownerDocument},zl=(e,t)=>t.querySelectorAll(Al(e)).length===1,Bl=(e,t)=>{let n=e,r=[];for(;n&&n!==t;){let e=n.tagName.toLowerCase(),t=Nl(n,e);if(t===void 0)return;r.push({name:Fl(e,t),penalty:10}),n=n.parentElement}return zl(r,t)?r:void 0},Vl=(e,t,n,r)=>{if(e.nodeType!==Node.ELEMENT_NODE)throw new Oa;if(e.tagName.toLowerCase()===`html`)return`html`;let i=Rl(t,e),a=Date.now(),o=[],s=e,c=0,l;for(;s&&s!==i&&!l;)if(o.push(Il(s,r)),s=s.parentElement,c++,c>=3){let t=Ll(o);t.sort(Ml);for(let r of t){if(Date.now()-a>n){let t=Bl(e,i);if(!t)throw new ka(n);return Al(t)}if(zl(r,i)){l=r;break}}}if(!l&&c<3){let e=Ll(o);e.sort(Ml);for(let t of e){if(Date.now()-a>n)break;if(zl(t,i)){l=t;break}}}if(!l)throw new Aa;return Al(l)};J();let Hl=/^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i,Ul=/:r[a-z0-9]+:/i,Wl=/_r_[a-z0-9]+_(?:$|-)/i,Gl=/«r[a-z0-9]+»/i,Kl=/^(?:downshift-\d+(?:-|$)|headlessui-[a-z-]+-\d+(?:-|$)|mui-\d+(?:-|$)|radix-\d+(?:-|$)|react-aria-\d+(?:-|$)|react-select-\d+(?:-|$))/i,ql=/^ember\d+$/i,Jl=/^\d+$/,Yl=e=>e.length>0&&e.length<=120&&!Ul.test(e)&&!Hl.test(e)&&!Wl.test(e)&&!Gl.test(e)&&!Kl.test(e)&&!ql.test(e)&&!Jl.test(e),Xl=new Set([`data-testid`,`data-test-id`,`data-test`,`data-cy`,`data-qa`,`aria-label`,`href`,`src`,`role`,`name`,`title`,`alt`]),Zl=new Set([`button`,`link`,`checkbox`,`radio`,`switch`,`tab`,`menuitem`,`option`,`textbox`,`combobox`,`slider`,`spinbutton`]);J(),nr(),oa(),Wn(),Xi();let Ql=e=>e.ownerDocument.body??e.ownerDocument.documentElement,$l=e=>e.length>0&&e.length<=120,eu=(e,t)=>Xl.has(e)&&$l(t)&&(e!==`role`||t.split(/\s+/).some(e=>Zl.has(e))),tu=(e,t)=>{try{let n=e.getRootNode(),r=(aa(n)?n:e.ownerDocument).querySelectorAll(t);return r.length===1&&r[0]===e}catch{return!1}},nu=e=>{let t=e.getAttribute(`id`),n=null;if(t){let r=`#${CSS.escape(t)}`;if(tu(e,r)){if(Yl(t))return{selector:r,isSemantic:!0};n=r}}for(let t of Xl){let n=e.getAttribute(t);if(!n||!eu(t,n))continue;let r=`[${t}=${JSON.stringify(n)}]`;if(tu(e,r))return{selector:r,isSemantic:!0};let i=`${e.tagName.toLowerCase()}${r}`;if(tu(e,i))return{selector:i,isSemantic:!0}}return n?{selector:n,isSemantic:!1}:null},ru=e=>{let t=[],n=e.getRootNode(),r=aa(n)?n:Ql(e),i=e;for(;i;){let e=i.getAttribute(`id`);if(e){t.unshift(`#${CSS.escape(e)}`);break}let n=i.parentNode;if(!n){t.unshift(i.tagName.toLowerCase());break}let a=Array.from(n.children).indexOf(i)+1;if(t.unshift(`${i.tagName.toLowerCase()}:nth-child(${a})`),n===r){Un(r)&&t.unshift(r.tagName.toLowerCase());break}i=Un(n)?n:null}return t.join(` > `)},iu=e=>{let t=nu(e);if(t)return t;try{let t=Vl(e,Ql(e),200,(e,t)=>kl(e,t)||eu(e,t));if(t)return{selector:t,isSemantic:!1}}catch{}return{selector:ru(e),isSemantic:!1}},au=e=>{let t=Ji(e);if(t)return{selector:t.getSelector(),isSemantic:!0};let n=nu(e);if(!n?.isSemantic)return null;let r=e.getRootNode();if(aa(r)){let e=au(r.host);return e?{selector:`${e.selector} >>> ${n.selector}`,isSemantic:!0}:null}let i=tr(e.ownerDocument.defaultView);if(!i)return n;let a=au(i);return a?{selector:`${a.selector} >>iframe>> ${n.selector}`,isSemantic:!0}:null},ou=e=>{let t=Ji(e);if(t)return{selector:t.getSelector(),isSemantic:!0};let n=iu(e),r=e.getRootNode();if(aa(r)){let e=ou(r.host);return{selector:`${e.selector} >>> ${n.selector}`,isSemantic:e.isSemantic&&n.isSemantic}}let i=tr(e.ownerDocument.defaultView);if(!i)return n;let a=ou(i);return{selector:`${a.selector} >>iframe>> ${n.selector}`,isSemantic:a.isSemantic&&n.isSemantic}},su=e=>ou(e).selector;J(),Xa();let cu=[...Array.from(Xl).filter(e=>e!==`role`).map(e=>`[${e}]`),...Array.from(Zl).map(e=>`[role~="${e}"]`)].join(`,`),lu=[`button`,`input`,`select`,`textarea`].join(`,`),uu=e=>{let t=e.getAttribute(`id`);return!!(t&&Yl(t)||e.matches(cu))},du=e=>uu(e)||e.matches(lu),fu=e=>{let{body:t,documentElement:n}=e.ownerDocument;if(e===t||e===n)return!0;if(!t)return!1;let r=t.getElementsByTagName(`*`).length;return r===0?!1:e.getElementsByTagName(`*`).length/r>=ln},pu=(e,t)=>{let n=e.getRootNode(),r=e;for(;r;){let i=du(r),a=i&&fu(r);if(i){if(a&&r!==e)return e;if(!t||t(r)||a||!uu(r)&&r===e)return r}let o=Ya(r);r=o?.getRootNode()===n?o:null}return e};Xi();let mu=e=>{if(Ji(e))return au(e);let t=null;return pu(e,e=>{let n=au(e);return n?(t=n,!0):!1}),t},hu=[/\/assets\/[^/?#]+-[a-z0-9_-]{6,}\.(?:c|m)?js(?:[?#]|$)/,/\/_next\/static\/.*\.(?:c|m)?js(?:[?#]|$)/,/\/static\/chunks\/.*\.(?:c|m)?js(?:[?#]|$)/],gu=e=>{if(!e)return!1;let t=`/${rl(e)}`.toLowerCase();return hu.some(e=>e.test(t))};J();let _u=e=>{if(!e)return!1;let t=`/${rl(e)}/`.toLowerCase();return an.some(e=>t.includes(e))},vu,yu=(e=!1)=>{let t=new URL(document.baseURI);return Array.from(document.scripts).some(n=>{if(!n.src)return!1;try{let r=new URL(n.src,t);return(e||r.origin===t.origin)&&r.pathname.includes(`/_next/static/`)}catch{return!1}})},bu=()=>Array.from(document.scripts).some(e=>e.textContent?.includes(`self.__next_f.push`)),xu=e=>(e&&(vu=void 0),vu??=typeof document<`u`&&!!(document.getElementById(`__NEXT_DATA__`)||document.querySelector(`nextjs-portal`)||yu()||bu()&&yu(!0)),vu),Su=e=>e.map(e=>`\n in ${e}`).join(``),Cu,wu=()=>{if(Cu!==void 0)return Cu;let e=document.querySelector(`script[src*="/_next/"]`)?.src,t=e?new URL(e).pathname:``,n=t.indexOf(`/_next/`);return Cu=n>0?t.slice(0,n):``,Cu};Gi(),J();let Tu=[`about://React/`,`rsc://React/`],Eu=e=>Tu.some(t=>e.startsWith(t)),Du=e=>{for(let t of Tu){if(!e.startsWith(t))continue;let n=e.indexOf(`/`,t.length);if(n===-1)continue;let r=n+1,i=e.lastIndexOf(`?`);return il(i>r?e.slice(r,i):e.slice(r))}return e},Ou=e=>{if(typeof e!=`object`||!e||!(`status`in e)||e.status!==`fulfilled`||!(`value`in e)||typeof e.value!=`object`||e.value===null||!(`originalStackFrame`in e.value))return null;let t=e.value.originalStackFrame;return typeof t!=`object`||!t||!(`file`in t)||typeof t.file!=`string`||!t.file||`ignored`in t&&t.ignored?null:{file:t.file,line1:`line1`in t&&typeof t.line1==`number`?t.line1:null,column1:`column1`in t&&typeof t.column1==`number`?t.column1:null}},ku=async(e,t)=>{let n=[],r=[];for(let t=0;t<e.length;t++){let i=e[t];!i.isServer||!i.fileName||(n.push(t),r.push({file:Du(i.fileName),methodName:i.functionName??`<unknown>`,line1:i.lineNumber??null,column1:i.columnNumber??null,arguments:[]}))}if(r.length===0)return e;let i=new AbortController,a=setTimeout(()=>i.abort(),on),o=()=>i.abort();t?.aborted&&i.abort(),t?.addEventListener(`abort`,o);try{let t=await fetch(`${wu()}/__nextjs_original-stack-frames`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({frames:r,isServer:!0,isEdgeServer:!1,isAppDirectory:!0}),priority:`high`,signal:i.signal});if(!t.ok)return e;let a=await t.json();if(!Array.isArray(a))return e;let o=[...e];for(let t=0;t<n.length;t++){let r=Ou(a[t]);if(!r)continue;let i=n[t];o[i]={...e[i],fileName:r.file,lineNumber:r.line1??void 0,columnNumber:r.column1??void 0,isSymbolicated:!0}}return o}catch{return e}finally{clearTimeout(a),t?.removeEventListener(`abort`,o)}},Au=e=>{let t=new Map;return Mr(e,e=>{if(!Hs(e))return!1;let n=ec(e._debugStack.stack);if(!n)return!1;for(let e of Do(n))!e.functionName||!e.fileName||Eu(e.fileName)&&(t.has(e.functionName)||t.set(e.functionName,{...e,isServer:!0}));return!1},!0),t},ju=(e,t)=>{if(!t.some(e=>e.isServer&&!e.fileName&&e.functionName))return t;let n=Au(e);return n.size===0?t:t.map(e=>{if(!e.isServer||e.fileName||!e.functionName)return e;let t=n.get(e.functionName);return t?{...e,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber}:e})};J();let Mu=0,Nu=[],Pu=e=>e?.aborted?Promise.resolve(!1):Mu<3?(Mu+=1,Promise.resolve(!0)):new Promise(t=>{let n={abortSignal:e,resolve:t};e&&(n.handleAbort=()=>{let e=Nu.indexOf(n);e!==-1&&(Nu.splice(e,1),t(!1))},e.addEventListener(`abort`,n.handleAbort,{once:!0})),Nu.push(n)}),Fu=()=>{let e=Nu.shift();if(e){e.abortSignal&&e.handleAbort&&e.abortSignal.removeEventListener(`abort`,e.handleAbort),e.resolve(!0);return}--Mu},Iu=async(e,t,n=sn,r)=>{if(!await Pu(r))return t;let i=new AbortController,a,o=new Promise(e=>{a=setTimeout(()=>{i.abort(),e(t)},n)}),s,c=new Promise(e=>{r&&(s=()=>{i.abort(),e(t)},r.aborted?s():r.addEventListener(`abort`,s,{once:!0}))});try{let t=e(i.signal);return t.catch(()=>{}),await Promise.race([t,o,c])}finally{clearTimeout(a),s&&r?.removeEventListener(`abort`,s),Fu()}};var Lu,Ru=n((()=>{Lu=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}));Ru();let zu=e=>Lu(e).replace(/"/g,`&quot;`).replace(/\r/g,`&#13;`).replace(/\n/g,`&#10;`).replace(/\t/g,`&#9;`),Bu=(e,t)=>{if(e.length<=t)return e;let n=Math.max(0,t-3),r=e.slice(0,n),i=r.lastIndexOf(`&`);return`${i>r.lastIndexOf(`;`)?r.slice(0,i):r}...`.slice(0,t)},Vu=e=>e.startsWith(`data-react-grab-`);J(),Wn();let Hu=e=>e.replace(/\s+/g,` `).trim(),Uu=e=>{let t=[];for(let n of e.childNodes){if(n.nodeType!==Node.TEXT_NODE)continue;let e=Hu(n.textContent??``);e&&t.push(e)}return t.join(` `)},Wu=e=>e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`hidden`)?!0:wn.has(e.tagName.toLowerCase()),Gu=(e,t,n)=>{if(e.nodeType===Node.TEXT_NODE){let r=Hu(e.textContent??``);return r?(t.push(r),n-r.length):n}if(!Un(e)||Wu(e))return n;for(let r of e.childNodes)if(n=Gu(r,t,n),n<=0)break;return n},Ku=(e,t)=>{if(Wu(e))return``;let n=Uu(e);if(!Cn.has(t)||n&&e.children.length===0)return n;let r=[];return Gu(e,r,100),r.join(` `)};J(),Ru(),Pa(),Wn(),Kn(),Xi();let qu=(e,t,n)=>`${e}="${Bu(zu(t),n)}"`,Ju=e=>{let t=[];for(let n of xn){if(t.length>=8)break;let r=e.getAttribute(n);if(!r)continue;let i=n===`class`?15:120;t.push(qu(n,r,i))}return t},Yu=e=>{let t=Ju(e);return t.length>0?` ${t.join(` `)}`:``},Xu=e=>e===`class`||e===`className`||e===`style`,Zu=e=>{let t=Ju(e).map(e=>` ${e}`),n=[],r=[];for(let{name:t,value:i}of e.attributes)Vu(t)||xn.includes(t)||Xu(t)||(Sn.has(t)?n.push(i?` ${qu(t,i,120)}`:` ${t}`):i&&r.push(` ${qu(t,i,15)}`));return[...t,...n,...r].slice(0,8).join(``)},Qu=e=>e.length===0?``:e.length<=2?e.map(e=>`<${Na(e)} ...>`).join(`
21
+ `):`(${e.length} elements)`,$u=e=>{let t=Ji(e);if(t)return t.getPreview();let n=Na(e);if(!Gn(e)){let t=Yu(e),r=Bu(Lu(Ku(e,n)),100);return r?`<${n}${t}>${r}</${n}>`:`<${n}${t} />`}let r=Zu(e),i=Bu(Lu(Ku(e,n)),100);return i?`<${n}${r}>${i}</${n}>`:`<${n}${r} />`},ed=e=>{let t=Ji(e);if(t)return t.getPreview();let n=Na(e),r=Zu(e),i=Ku(e,n),a=[],o=[],s=!1;for(let t of e.childNodes)t.nodeType!==Node.COMMENT_NODE&&(t.nodeType===Node.TEXT_NODE?t.textContent&&t.textContent.trim().length>0&&(s=!0):Un(t)&&(s?o.push(t):a.push(t)));let c=i.length>0&&Cn.has(n),l=``,u=Qu(a);u&&!c&&(l+=`\n ${u}`),i&&(l+=`\n ${Bu(Lu(i),100)}`);let d=Qu(o);return d&&!c&&(l+=`\n ${d}`),l.length>0?`<${n}${r}>${l}\n</${n}>`:`<${n}${r} />`},td=new Set([`_`,`$`,`motion.`,`styled.`,`chakra.`,`ark.`,`Primitive.`,`Slot.`]),nd=new Set(`AppRouter.AppRouterAnnouncer.AppDevOverlay.AppDevOverlayErrorBoundary.ClientPageRoot.ClientSegmentRoot.DevRootHTTPAccessFallbackBoundary.ErrorBoundary.ErrorBoundaryHandler.GracefulDegradeBoundary.HTTPAccessErrorFallback.HTTPAccessFallbackBoundary.HTTPAccessFallbackErrorBoundary.HandleRedirect.Head.HistoryUpdater.HotReload.InnerLayoutRouter.InnerScrollAndFocusHandler.InnerScrollAndFocusHandlerOld.InnerScrollAndMaybeFocusHandler.InnerScrollHandlerNew.LinkComponent.LoadableComponent.LoadingBoundary.LoadingBoundaryProvider.NotAllowedRootHTTPFallbackError.OfflineProvider.OuterLayoutRouter.RedirectBoundary.RedirectErrorBoundary.RenderFromTemplateContext.RenderValidationBoundaryAtThisLevel.ReplaySsrOnlyErrors.RootErrorBoundary.RootLevelDevOverlayElement.Router.ScrollAndFocusHandler.ScrollAndMaybeFocusHandler.SegmentBoundaryTrigger.SegmentBoundaryTriggerNode.SegmentStateProvider.SegmentTrieNode.SegmentViewNode.SegmentViewStateNode.ServerRoot.body.html`.split(`.`)),rd=new Set([`<anonymous>`,`<unknown>`,`Anonymous`,`Unknown`]),id=new Set([`Suspense`,`Fragment`,`StrictMode`,`Profiler`,`SuspenseList`]),ad=new Set([`MotionDOMComponent`,`Slot`,`SlotClone`]),od=[`.Consumer`,`.Context`,`.Provider`,`.Slot`,`.SlotClone`,`.Slottable`,`ProviderProvider`],sd=(e,t=!1)=>{if(rd.has(e)||t&&nd.has(e)||id.has(e)||ad.has(e))return!0;for(let t of od)if(e.endsWith(t))return!0;for(let t of td)if(e.startsWith(t))return!0;return!1},cd=(e,t=!1)=>!(!e||sd(e,t)),ld=(e,t)=>e||t.isSemantic,ud=e=>{let t=e.alternate,n=e._debugOwner,r=e._debugSource,i=e._debugStack;return{matches:a=>(a===e||a===t||a.alternate===e)&&a._debugOwner===n&&a._debugSource===r&&a._debugStack===i}},dd=(e,t)=>e.length>t?`${e.slice(0,t)}...`:e;J();let fd=e=>JSON.stringify(dd(e,120)),pd=(e,t,n)=>{e.get(t)===n&&e.delete(t)};J();let md=async(e,t)=>{for(let n=0;n<2;n+=1){let r=e();if(!r)return t();let i=await r.valuePromise;if(r.isCurrent()||n===1)return i}return t()};Gi(),J(),oa(),Xi();let hd=(e,t)=>!(e.length<=1||sd(e,t)||e[0]!==e[0].toUpperCase()),gd=(e,t)=>e&&hd(e,t)?e:null,_d=e=>!_u(e)&&!gu(e),vd=e=>{if(!gi())return e;let t=e;for(;t?.ownerDocument===e.ownerDocument;){if(Yi(t))return t;if(t.parentElement){t=t.parentElement;continue}let e=t.getRootNode();t=aa(e)?e.host:null}return e},yd=e=>{let t=e.return?.child??null;for(;t;){if(t!==e&&t.key!==null)return!0;t=t.sibling}return!1},bd=e=>{let t=e,n=0;for(;t;){if(t.key!==null&&yd(t))return String(t.key);if(ci(t)&&(n+=1,n===2))break;t=t.return}return null},xd=e=>{if(!gi())return null;let t=Yi(vd(e));return bd(t?yi(t):null)},Sd=new WeakMap,Cd=new WeakMap,wd=e=>{let t=vd(e),n=Yi(t);if(!n)return null;let r=yi(n);return{element:t,fiber:r,revision:ud(r)}},Td=(e,t)=>{let n=wd(e);return!!(n&&n.element===t.element&&t.revision.matches(n.fiber))},Ed=(e,t,n)=>md(()=>{let t=wd(e);return t?{isCurrent:()=>Td(e,t),valuePromise:n(t)}:null},t),Dd=e=>t=>fetch(t,{signal:e,priority:`high`}),Od=(e,t)=>Iu(async t=>{try{let n=await fc(e,!0,Dd(t));return xu()?await ku(ju(e,n),t):n}catch{return null}},null,void 0,t),kd=e=>{if(!gi())return Promise.resolve([]);let t=Sd.get(e.element);if(t?.revision.matches(e.fiber))return t.promise;let n=new AbortController,r=Od(e.fiber,n.signal);if(!Td(e.element,e))return r;let i={controller:n,promise:r,revision:e.revision};return Sd.set(e.element,i),t?.controller.abort(),i.promise.then(t=>{t===null&&pd(Sd,e.element,i)}),i.promise},Ad=e=>gi()?Ed(e,()=>null,kd):Promise.resolve([]),jd=async e=>{if(!gi())return null;let t=xu(),n=gd(Ji(e)?zd(e):null,t);if(n)return n;let r=await Ad(e);if(!r)return null;for(let e of r){let n=gd(e.functionName,t);if(n)return n}return null},Md=e=>e[0]??null,Nd=(e,t)=>!ai(e)||!ci(e)?null:gd(hi(e.type),t),Pd=(e,t)=>Iu(async t=>{try{let n=await _c(e,!0,Dd(t));if(!n?.fileName)return null;let r=xu();return{filePath:rl(n.fileName),lineNumber:n.lineNumber??null,columnNumber:n.columnNumber??null,componentName:gd(n.functionName,r)??Nd(e._debugOwner,r),origin:El(n.fileName).origin}}catch{return null}},null,void 0,t),Fd=e=>{let t=Cd.get(e.element);if(t?.revision.matches(e.fiber))return t.promise;let n=new AbortController,r=Pd(e.fiber,n.signal);if(!Td(e.element,e))return r;let i={controller:n,promise:r,revision:e.revision};return Cd.set(e.element,i),t?.controller.abort(),i.promise.then(t=>{t||pd(Cd,e.element,i)}),i.promise},Id=async e=>{let[t,n]=await Promise.all([Fd(e),kd(e)]);return{fiber:e.fiber,fiberSource:t,stack:n}},Ld=(e,t)=>{let n=xu(),r=(e,t)=>{let r=Md(e);return r?.fileName?{filePath:rl(r.fileName),lineNumber:r.lineNumber??null,columnNumber:r.columnNumber??null,componentName:gd(r.functionName,n),origin:t}:null},i=t.filter(e=>El(e.fileName).origin===`app`),a=i.filter(e=>_d(e.fileName));return e?.origin===`app`&&_d(e.filePath)?e:r(a,`app`)||(e?.origin===`app`&&!gu(e.filePath)?e:r(i,`app`)||(e?.origin===`app`||e?.origin===`package`?e:r(t.filter(e=>El(e.fileName).origin===`package`),`package`)))},Rd=async e=>Ed(e,()=>null,async e=>{let t=await Fd(e);return t?.origin===`app`&&_d(t.filePath)?t:Ld(t,await kd(e)??[])}),zd=e=>Bd(vd(e),1)[0]??null,Bd=(e,t,n=()=>!0)=>{if(!gi())return[];let r=Yi(e);if(!r)return[];let i=xu(),a=[];return Mr(yi(r),e=>{if(a.length>=t)return!0;if(ci(e)){let t=hi(e.type);t&&cd(t,i)&&n(t)&&a.push(t)}return!1},!0),a},Vd=[`/src/app/`,`/src/pages/`,`/app/`,`/pages/`],Hd=(e,t)=>{let n=rl(e);if(!t||!n.startsWith(`/`))return n;for(let e of Vd){let t=n.indexOf(e);if(t!==-1)return`/./${n.slice(t+1)}`}return n},Ud=(e,t)=>{let n=Hd(e.filePath,t),r=t&&e.lineNumber?`${n}:${e.lineNumber}${e.columnNumber?`:${e.columnNumber}`:``}`:n;return e.componentName?`\n in ${e.componentName} (at ${r})`:`\n in ${r}`},Wd={isAppSource:!1,consumesBudget:!1},Gd=(e,t,n,r)=>{let i=t.packageName,a=t.origin===`app`?e.fileName:null;if(e.isServer&&!a&&(n||!e.functionName)){let e=i?`${i} at Server`:`at Server`;return{text:`\n in ${n??`<anonymous>`} (${e})`,...Wd}}return!a&&n?{text:i?`\n in ${n} (${i})`:`\n in ${n}`,...Wd}:i?{text:`\n in ${i}`,...Wd}:a?{text:Ud({componentName:n,filePath:a,lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null},r),isAppSource:!0,consumesBudget:_d(a)}:null},Kd=(e,t={},n=null)=>{let r=tl(t.maxLines),i=Math.max(r,20),a=xu(),o=[],s=new Set,c=null,l=!1,u=!1,d=!1,f=0,p=e=>{e&&s.add(e)};if(n){let e=n.origin===`app`&&_d(n.filePath);u=e,e&&(f+=1),p(n.componentName),o.push(Ud(n,a))}for(let t of e){if(!r||o.length>=i)break;let e=El(t.fileName),s=gd(t.functionName,a),m=e.packageName?`${e.packageName}:${s??``}:${t.isServer?`server`:`client`}`:null;if(m&&m===c)continue;if(!l&&s&&s===n?.componentName){l=!0;continue}let h=Gd(t,e,s,a);h!==null&&(h.consumesBudget&&f>=r||h.text!==o[o.length-1]&&(h.isAppSource&&h.consumesBudget&&(u=!0),h.consumesBudget&&(f+=1,d=!0),p(s),o.push(h.text),c=m))}return{text:o.join(``),shouldAppendSelectorHint:!u,hasBudgetedStackFrame:d,renderedComponentNames:s,remainingHardLineCapacity:Math.max(0,i-o.length)}},qd=(e,t)=>{let n=Ld(e,t);return n?.origin===`app`?n:null},Jd=(e,t,n)=>{let r=Math.min(n,t.remainingHardLineCapacity);if(r===0)return t;let i=xu(),a=Bd(vd(e),r,e=>hd(e,i)&&!t.renderedComponentNames.has(e));return a.length===0?t:{...t,text:`${t.text}${Su(a)}`,remainingHardLineCapacity:t.remainingHardLineCapacity-a.length}},Yd=(e,t,n)=>{let r=n.stack??[],i=qd(n.fiberSource,r),a=tl(t.maxLines),o=Kd(r,t,i);if(o.text)return o.hasBudgetedStackFrame?o:Jd(e,o,a);let s=Bd(vd(e),a),c=Math.max(a,20);return{text:Su(s),shouldAppendSelectorHint:!0,hasBudgetedStackFrame:!1,renderedComponentNames:new Set(s),remainingHardLineCapacity:Math.max(0,c-s.length)}},Xd=(e,t={})=>Ed(e,()=>Yd(e,t,{fiber:null,fiberSource:null,stack:[]}),async n=>Yd(e,t,await Id(n))),Zd=async(e,t={})=>(await Xd(e,t)).text,Qd=(e,t)=>{let n=xd(e),r=n===null?``:`\n key: ${fd(n)}`,i=t.shouldAppendSelectorHint?ou(pu(e)):mu(e),a=i&&ld(t.shouldAppendSelectorHint,i)?i.selector:null,o=a?`\n selector: ${a}`:``;return{selector:a,text:`${t.text}${r}${o}`}},$d=async(e,t={})=>{let n=vd(e);return`${ed(n)}${Qd(n,await Xd(n,t)).text}`},ef=(e,t,n)=>{let r=t.stack??[],i=Ld(t.fiberSource,r);return{componentName:zd(e),fiber:t.fiber,source:i,stack:r,stackContext:n.text}},tf=(e,t,n)=>{let r=Yd(e,t,n),i=Qd(e,r);return{...ef(e,n,r),referenceContext:`${$u(e)}${i.text.replace(/\n\s+/g,` `)}`}},nf=(e,t,n)=>Ed(e,()=>n(e,t,{fiber:null,fiberSource:null,stack:[]}),async r=>n(e,t,await Id(r))),rf=(e,t={})=>nf(e,t,tf);R();let af=e=>{let[t,n]=c(void 0),r=0;return d(_(e,e=>{let t=++r;if(!e){n(void 0);return}let i=zd(e)??void 0;n(i),jd(e).then(e=>{r===t&&n(e??i)}).catch(()=>{r===t&&n(i)})})),[t,n]};var of,sf,cf,lf,uf,df,ff=n((()=>{of=typeof window<`u`,sf=e=>0,cf=e=>{},lf=of?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):sf,uf=of?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):cf,df=()=>of?new Promise(e=>lf(()=>e())):Promise.resolve()}));ff();let pf=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,mf=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),hf=(e,t,n,r=1)=>{let i=mf(e),a=mf(t),o=mf(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${mf(r*255)}`},gf=e=>{if(!e.startsWith(`#`))return null;let t=e.slice(1);if(t.length!==6&&t.length!==8)return null;let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{red:n,green:r,blue:i,alpha:a}},_f=e=>{let t=e.match(pf);if(!t)return null;let n=1;if(t[4]!==void 0){let e=t[4];n=e.endsWith(`%`)?Number(e.slice(0,-1))/100:Number(e)}return hf(Number(t[1]),Number(t[2]),Number(t[3]),n)},vf=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,yf=e=>{let t=e.match(vf);if(!t)return null;let n=t[1];return n.length===3?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n.length===4?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:`#${n}`},bf=`rgba(0, 0, 0, 0)`,xf=`#00000000`,Sf=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,Cf=180/Math.PI,wf=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),Tf=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*Cf:t===`turn`?n*360:n},Ef=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},Df=e=>{let t=e.match(Sf);if(!t)return null;let n=wf(t[1],1),r=wf(t[2],.4),i=Tf(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:wf(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,h=-1.2684380046*d+2.6097574011*f-.3413193965*p,g=-.0041960863*d-.7034186147*f+1.707614701*p;return hf(Ef(m),Ef(h),Ef(g),Math.max(0,Math.min(1,a)))},Of=null,kf=()=>Of||(typeof document>`u`?null:(Of=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),Of)),Af=(e,t)=>{e.clearRect(0,0,1,1),e.fillStyle=t,e.fillRect(0,0,1,1);let n=e.getImageData(0,0,1,1).data;return n[3]===0?xf:hf(n[0],n[1],n[2],n[3]/255)},jf=e=>{let t=e.trim();if(!t)return null;if(t.toLowerCase()===`transparent`)return xf;let n=yf(t);if(n)return n;let r=Df(t);if(r)return r;let i=kf();if(!i)return null;i.fillStyle=bf,i.fillStyle=t;let a=i.fillStyle;return typeof a==`string`?a.toLowerCase()===bf?t.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?xf:null:a.startsWith(`#`)&&a.length===7?a:a.startsWith(`rgb`)?_f(a):Af(i,t):null};J();let Mf=[`data-theme`,`data-mode`,`data-color-scheme`,`data-bs-theme`,`data-mui-color-scheme`,`data-mantine-color-scheme`],Nf=[{attribute:`data-dark`,theme:`dark`},{attribute:`data-light`,theme:`light`}],Pf=(e,t,n)=>{let[r,i,a]=[e,t,n].map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a},Ff=(e,t=0)=>{let n=jf(e),r=n?gf(n):null;return!r||r.alpha<=t?null:Pf(r.red,r.green,r.blue)},If=e=>{let t=Ff(e);return t===null?null:t<.18?`dark`:`light`},Lf=e=>If(getComputedStyle(e).backgroundColor),Rf=()=>{let e=Ff(getComputedStyle(document.documentElement).color,An);return e===null?null:e>.6?`dark`:null},zf=()=>{let e=document.createElement(`div`);e.style.cssText=`position:fixed;width:0;height:0;background-color:Canvas!important`,document.documentElement.appendChild(e);let t=If(getComputedStyle(e).backgroundColor);return e.remove(),t},Bf=e=>{let t=e.toLowerCase();return t===`dark`?`dark`:t===`light`?`light`:null},Vf=e=>{let t=e.style.colorScheme||getComputedStyle(e).colorScheme;return t?t.trim().toLowerCase().split(/\s+/):[]},Hf=e=>{let t=Vf(e),n=t.includes(`dark`);return n===t.includes(`light`)?null:n?`dark`:`light`},Uf=e=>{if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of Mf){let n=e.getAttribute(t);if(!n)continue;let r=Bf(n);if(r)return r}for(let{attribute:t,theme:n}of Nf)if(e.hasAttribute(t))return n;return null},Wf=(e,t)=>{for(let n of e){if(!n)continue;let e=t(n);if(e)return e}return null},Gf=()=>{let e=[document.documentElement,document.body],t=[document.body,document.documentElement];return Wf(e,Uf)??Wf(e,Hf)??Wf(t,Lf)??Rf()??zf()??`light`},Kf=e=>e===`dark`?`light`:`dark`,qf=()=>{let e=[];for(let t of[document.documentElement,document.body]){if(!t)continue;e.push(t.className);for(let n of Mf)e.push(t.getAttribute(n)??``);for(let{attribute:n}of Nf)e.push(t.hasAttribute(n)?`1`:``);let n=t.style;e.push(n.colorScheme,n.backgroundColor,n.color);for(let t=0;t<n.length;t++){let r=n[t];r.startsWith(`--`)&&e.push(`${r}:${n.getPropertyValue(r)}`)}}return e.join(`|`)},Jf={attributes:!0,attributeFilter:[`class`,`style`,...Mf,...Nf.map(({attribute:e})=>e)]},Yf=(e,t)=>{let n=null,r=null,i=null,a=i=>{if(i===r&&n!==null)return getComputedStyle(document.body??document.documentElement).backgroundColor,n;r=i;let a=Kf(Gf());return a!==n&&(n=a,e.setAttribute(`data-rg-theme`,a),t?.(a)),a},o=()=>a(qf()),s=()=>{i!==null&&(uf(i),i=null)},c=()=>{i===null&&(i=lf(()=>{i=null,o()}))},l=o(),u=()=>{let e=qf();if(e===r){c();return}s(),a(e)},d=new MutationObserver(u);d.observe(document.documentElement,Jf);let f=null;document.body?d.observe(document.body,Jf):(f=new MutationObserver((e,t)=>{document.body&&(t.disconnect(),f=null,d.observe(document.body,Jf),u())}),f.observe(document.documentElement,{childList:!0}));let p=()=>{r=null,c()},m=window.matchMedia(`(prefers-color-scheme: dark)`);return m.addEventListener(`change`,p),{theme:l,cleanup:()=>{f?.disconnect(),d.disconnect(),m.removeEventListener(`change`,p),s()}}},Xf=()=>{},Zf=()=>({activate:Xf,deactivate:Xf,toggle:Xf,comment:Xf,isActive:()=>!1,isEnabled:()=>!1,setEnabled:Xf,getToolbarState:()=>null,setToolbarState:Xf,onToolbarStateChange:()=>Xf,reset:Xf,dispose:Xf,copyElement:()=>Promise.resolve(!1),getSource:()=>Promise.resolve(null),getStackContext:()=>Promise.resolve(``),getState:()=>({isActive:!1,isDragging:!1,isCopying:!1,isPromptMode:!1,isSelectionBoxVisible:!1,isDragBoxVisible:!1,targetElement:null,dragBounds:null,grabbedBoxes:[],labelInstances:[],selectionFilePath:null,toolbarState:null}),setOptions:Xf,registerPlugin:Xf,unregisterPlugin:Xf,getPlugins:()=>[],getDisplayName:()=>null}),Qf=()=>{let e=new AbortController;return{signal:e.signal,abort:()=>e.abort(),addWindowListener:(t,n,r={})=>{window.addEventListener(t,n,{...r,signal:e.signal})},addDocumentListener:(t,n,r={})=>{document.addEventListener(t,n,{...r,signal:e.signal})}}};var $f,ep,tp=n((()=>{J(),Ru(),io(),$f=`application/x-react-grab`,ep=(e,t)=>{let n=t?.componentName??`div`,r={version:Qt,content:e,entries:t?.entries??[{tagName:t?.tagName,componentName:n,content:e,commentText:t?.commentText}],timestamp:Date.now()},i=t=>{t.preventDefault(),t.clipboardData?.setData(`text/plain`,e),t.clipboardData?.setData(`text/html`,`<meta charset='utf-8'><pre><code>${Lu(e)}</code></pre>`),t.clipboardData?.setData($f,JSON.stringify(r))},a=document.createElement(`textarea`);document.addEventListener(`copy`,i);try{return a.value=e,a.style.position=`fixed`,a.style.left=`-9999px`,a.ariaHidden=`true`,document.body.appendChild(a),a.select(),typeof document.execCommand==`function`?document.execCommand(`copy`):!1}finally{document.removeEventListener(`copy`,i),a.remove()}}}));tp();let np=(e,t=`Unknown error`)=>e instanceof Error&&e.message?e.message:t,rp=e=>e instanceof Error?e:Error(String(e)),ip=Symbol(`aborted-promise-result`),ap=async(e,t)=>{if(!t)return e;if(t.aborted)return ip;let n=()=>{},r=new Promise(e=>{n=()=>e(ip)});t.addEventListener(`abort`,n,{once:!0});try{return await Promise.race([e,r])}finally{t.removeEventListener(`abort`,n)}};Pa();let op={status:`cancelled`},sp=e=>({functionName:e.functionName,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,isServer:e.isServer,isSymbolicated:e.isSymbolicated}),cp=async(e,t)=>{let n=await rf(e,{maxLines:t});return{tagName:Na(e),componentName:n.componentName??n.source?.componentName??void 0,content:`[${n.referenceContext}]`,source:n.source,stackContext:n.stackContext,frames:n.stack.map(sp)}},lp=async(e,t)=>{let n=[...new Set(e)],r=await Promise.all(n.map(e=>cp(e,t)));return r.length>0?{content:r.map(e=>e.content).join(`
22
+ `),entries:r}:null},up=(e,t,n)=>{if(e?.entries)return t===e.content?e.entries:e.entries.length===1?[{...e.entries[0],content:t,commentText:n}]:e.entries.map(e=>({...e,commentText:n}))},dp=async(e,t,n,r)=>{if(e.signal?.aborted||await ap(t.onBeforeCopy(n),e.signal)===ip)return op;let i=!1,a=!1,o=``;try{let s=await ap(e.getContent?Promise.resolve(e.getContent(n)).then(e=>({content:e})):lp(n,e.maxContextLines),e.signal);if(s===ip)return op;let c=s?.content;if(c?.trim()){let l=await ap(t.transformCopyContent(c,n),e.signal);if(l===ip)return op;o=r?`${r}\n${l}`:l,o.trim()&&(a=!0,i=ep(o,{componentName:e.componentName,entries:up(s,o,r)}))}}catch(n){if(!a&&e.signal?.aborted)return op;t.onCopyError(rp(n))}return!a&&e.signal?.aborted?op:(i&&t.onCopySuccess(n,o,{prompt:r}),t.onAfterCopy(n,i),{status:i?`succeeded`:`failed`})};var fp,pp=n((()=>{fp=e=>{try{return e.contentDocument}catch{return null}}})),mp,hp=n((()=>{Qn(),er(),mp=(e,t,n)=>{let r=e.getBoundingClientRect(),i=Zn(e),a=$n(r.width,i.width),o=$n(r.height,i.height);return{x:(t-r.left)/a-i.contentOffsetX,y:(n-r.top)/o-i.contentOffsetY}}})),gp,_p,vp=n((()=>{hp(),pp(),Jn(),gp=(e,t,n)=>{let r=e.elementFromPoint(t,n);for(;r;){let e=r.shadowRoot?.elementFromPoint(t,n);if(e&&e!==r){r=e;continue}if(qn(r)){let e=fp(r);if(!e)return r;let i=mp(r,t,n);return gp(e,i.x,i.y)??r}return r}return null},_p=(e,t)=>gp(document,e,t)})),yp,bp=n((()=>{J(),Xa(),yp=e=>{let t=e;for(;t;){if(t.hasAttribute(`data-react-grab-ignore`))return!0;t=Ya(t)}return!1}})),xp,Sp,Cp,wp,Tp=n((()=>{or(),xp=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,Sp={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},Cp={checkVisibilityCSS:!0,visibilityProperty:!0},wp=(e,t)=>{if(xp&&!t)return e.checkVisibility(Sp)?!0:e.checkVisibility(Cp)?ar(e).opacity!==`0`:!1;let n=t??ar(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`}})),Ep,Dp=n((()=>{Pa(),Ep=e=>{let t=Na(e);return t===`html`||t===`body`}})),Op,kp,Ap=n((()=>{Op=[`data-react-grab`,`data-react-grab-demo`],kp=e=>Op.some(t=>e.hasAttribute(t))})),jp,Mp=n((()=>{J(),Ap(),oa(),jp=e=>{if(kp(e)||e.hasAttribute(`data-react-grab-hit-test-shield`))return!0;let t=e.getRootNode();return aa(t)&&kp(t.host)}})),Np,Pp,Fp,Ip,Lp,Rp,zp=n((()=>{J(),Tp(),Dp(),or(),Mp(),bp(),Xi(),Np=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},Pp=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},Fp=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(Pp(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3},Ip=new WeakMap,Lp=()=>{Ip=new WeakMap},Rp=e=>{let t=Ji(e);if(t)return t.isConnected();if(Ep(e)||jp(e)||yp(e))return!1;let n=performance.now(),r=Ip.get(e);if(r&&n-r.timestamp<50)return r.isVisible;if(!wp(e))return Ip.set(e,{isVisible:!1,timestamp:n}),!1;if(e.clientWidth/(e.ownerDocument.defaultView?.innerWidth??window.innerWidth)>=.9&&e.clientHeight/(e.ownerDocument.defaultView?.innerHeight??window.innerHeight)>=.9){let t=ar(e);if(Np(t)||Fp(t))return!1}return Ip.set(e,{isVisible:!0,timestamp:n}),!0}})),Bp,Vp=n((()=>{Bp=e=>{if(e===`transparent`)return!0;let t=e.lastIndexOf(`/`);if(t>=0)return Number.parseFloat(e.slice(t+1))===0;if(!e.startsWith(`rgba(`))return!1;let n=e.lastIndexOf(`,`);return n>=0&&Number.parseFloat(e.slice(n+1))===0}})),Hp,Up=n((()=>{Vp(),Hp=e=>{let t=e.ownerDocument.defaultView?.getComputedStyle?.(e);if(!t)return!1;let n=t.backgroundClip!==`text`&&(t.backgroundImage!==`none`||!Bp(t.backgroundColor)),r=t.borderTopStyle!==`none`&&t.borderTopWidth!==`0px`||t.borderRightStyle!==`none`&&t.borderRightWidth!==`0px`||t.borderBottomStyle!==`none`&&t.borderBottomWidth!==`0px`||t.borderLeftStyle!==`none`&&t.borderLeftWidth!==`0px`;return n||r||t.boxShadow!==`none`||t.outlineStyle!==`none`}})),Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp,$p=n((()=>{J(),ir(),Up(),Wn(),Kn(),Wp=new Set([`A`,`AUDIO`,`BUTTON`,`CANVAS`,`DETAILS`,`EMBED`,`IFRAME`,`IMG`,`INPUT`,`METER`,`OBJECT`,`OPTION`,`PROGRESS`,`SELECT`,`SUMMARY`,`SVG`,`TEXTAREA`,`VIDEO`]),Gp=new Set([`button`,`checkbox`,`combobox`,`gridcell`,`link`,`listbox`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`scrollbar`,`searchbox`,`slider`,`spinbutton`,`switch`,`tab`,`textbox`,`treeitem`]),Kp=new Set(`A.ABBR.B.BDI.BDO.BR.CITE.CODE.DATA.DEL.DFN.EM.I.INS.KBD.MARK.Q.S.SAMP.SMALL.SPAN.STRONG.SUB.SUP.TIME.U.VAR.WBR`.split(`.`)),qp=new WeakMap,Jp=new WeakMap,Yp=()=>{qp=new WeakMap,Jp=new WeakMap},Xp=(e,t,n)=>(qp.set(e,t),Jp.set(e,n),t),Zp=e=>Wp.has(e.tagName)||Gp.has(e.getAttribute(`role`)??``)||Gn(e)&&e.isContentEditable,Qp=e=>{let t=performance.now(),n=Jp.get(e);if(n!==void 0&&t-n<16)return qp.get(e)??null;if(Zp(e)||e.childNodes.length>64)return Xp(e,null,t);let r=[],i=[],a=0;for(let t=e.childNodes.length-1;t>=0;--t)i.push(e.childNodes[t]);for(;i.length>0;){if(a+=1,a>64)return Xp(e,null,t);let n=i.pop();if(n){if(n.nodeType===Node.TEXT_NODE){if(n.textContent?.trim()&&(r.push(n),r.length>32))return Xp(e,null,t);continue}if(!Un(n)||!Kp.has(n.tagName)||a+i.length+n.childNodes.length>64)return Xp(e,null,t);for(let e=n.childNodes.length-1;e>=0;--e)i.push(n.childNodes[e])}}if(r.length===0||Hp(e))return Xp(e,null,t);try{let n=e.ownerDocument.createRange(),i=rr(e.ownerDocument.defaultView,0,0),a=[];for(let o of r){n.selectNodeContents(o);let r=n.getClientRects();if(a.length+r.length>64)return Xp(e,null,t);for(let e=0;e<r.length;e+=1){let t=r[e],n=t.width*i.scaleX,o=t.height*i.scaleY;!Number.isFinite(t.left)||!Number.isFinite(t.top)||!Number.isFinite(n)||!Number.isFinite(o)||n<=0||o<=0||a.push({borderRadius:`0px`,height:o,width:n,x:i.x+t.left*i.scaleX,y:i.y+t.top*i.scaleY})}}return Xp(e,a.length>0?a:null,t)}catch{return Xp(e,null,t)}}})),em,tm=n((()=>{$p(),em=(e,t,n)=>{let r=Qp(e);if(!r)return!0;for(let e of r)if(t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height)return!0;return!1}})),nm,rm,im=n((()=>{hp(),pp(),Jn(),bp(),zp(),tm(),io(),nm=(e,t,n,r,i)=>{let a=!0;for(let o of e.elementsFromPoint(t,n)){if(yp(o)&&(a=!1),!no(o))continue;let s=o.shadowRoot;if(a&&s&&s!==e){let e=nm(s,t,n,r,i);if(e)return e}if(a&&qn(o)){let e=fp(o);if(e){let a=mp(o,t,n),s=nm(e,a.x,a.y,r,i);if(s)return s}}if(Rp(o)&&em(o,r,i))return o}return null},rm=(e,t)=>nm(document,e,t,e,t)})),am,om,sm=n((()=>{hp(),pp(),Jn(),bp(),am=(e,t,n,r)=>{let i=e.elementsFromPoint(t,n),a=!0;for(let o of i){if(yp(o)&&(a=!1),a&&o.shadowRoot&&o.shadowRoot!==e&&am(o.shadowRoot,t,n,r),a&&qn(o)){let e=fp(o);if(e){let i=mp(o,t,n);am(e,i.x,i.y,r)}}r.add(o)}},om=(e,t)=>{let n=new Set;return am(document,e,t,n),[...n]}})),cm,lm=n((()=>{hp(),nr(),Jn(),cm=(e,t,n)=>{let r=[],i=e;for(;i&&i!==window;){let e=tr(i);if(!e||!qn(e))break;r.push(e),i=e.ownerDocument.defaultView}let a=t,o=n;for(let e=r.length-1;e>=0;--e){let t=mp(r[e],a,o);a=t.x,o=t.y}return{x:a,y:o}}})),um,dm,fm,pm,mm=n((()=>{lm(),or(),Wn(),Dp(),oa(),um=`http://www.w3.org/2000/svg`,dm=e=>{if(e.localName===`svg`)return e;let t=e,n=e.parentElement;for(;n?.namespaceURI===um&&(t=n,n.localName!==`svg`);)n=n.parentElement;return t},fm=(e,t,n,r)=>{if(typeof e.caretPositionFromPoint==`function`){let i=e.caretPositionFromPoint(t,n,{shadowRoots:r?[r]:[]});if(i)return i.offsetNode}return typeof e.caretRangeFromPoint==`function`?e.caretRangeFromPoint(t,n)?.startContainer??null:null},pm=(e,t,n)=>{if(Ep(e))return null;let r=e.ownerDocument,i=r.defaultView;if(!i)return null;let a=cm(i,t,n),o=e.getRootNode(),s=fm(r,a.x,a.y,aa(o)?o:null);if(!s)return null;let c=Un(s)?s:s.parentElement;if(!c||c===e)return null;let l=e.namespaceURI===um;return!(l?dm(e):e).contains(c)||!l&&ar(c).pointerEvents!==`none`?null:c}})),hm,gm=n((()=>{hm=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom})),_m,vm,ym,bm=n((()=>{J(),Xa(),_m=new Set([`auto`,`scroll`,`overlay`]),vm=(e,t,n,r,i)=>_m.has(e)?i<0?t>1:t+n<r-1:!1,ym=(e,t,n)=>{let r=e;for(;r;){let e=n!==0&&r.scrollHeight>r.clientHeight,i=t!==0&&r.scrollWidth>r.clientWidth;if(e||i){let a=getComputedStyle(r);if(e&&vm(a.overflowY,r.scrollTop,r.clientHeight,r.scrollHeight,n)||i&&vm(a.overflowX,r.scrollLeft,r.clientWidth,r.scrollWidth,t))return r}r=Ya(r)}return null}})),xm,Sm=n((()=>{xm=(e,t)=>{let n=[];for(let r of e){let e=Math.max(r.left,t.left),i=Math.max(r.top,t.top),a=Math.min(r.right,t.right),o=Math.min(r.bottom,t.bottom);if(a<=e||o<=i){n.push(r);continue}i>r.top&&n.push({left:r.left,top:r.top,right:r.right,bottom:i}),o<r.bottom&&n.push({left:r.left,top:o,right:r.right,bottom:r.bottom}),e>r.left&&n.push({left:r.left,top:i,right:e,bottom:o}),a<r.right&&n.push({left:a,top:i,right:r.right,bottom:o})}return n}})),Cm,wm,Tm,Em,Dm,Om=n((()=>{J(),bm(),vp(),Ka(),Sm(),Cm=`full-viewport`,wm=(e,t)=>{let n=e.createElement(`div`);return n.setAttribute(kn,``),n.style.position=`absolute`,n.style.pointerEvents=t,n.style.background=`transparent`,n},Tm=e=>{let t=[];for(let n of e){let e=n.getBoundingClientRect();e.width<=0||e.height<=0||t.push({left:e.left,top:e.top,right:e.right,bottom:e.bottom})}return t},Em=e=>{let t={...e[0]};for(let n of e)n.left<t.left&&(t.left=n.left),n.top<t.top&&(t.top=n.top),n.right>t.right&&(t.right=n.right),n.bottom>t.bottom&&(t.bottom=n.bottom);return t},Dm=(e,t)=>{let n=e.createElement(`div`);n.setAttribute(kn,``),n.setAttribute(`aria-hidden`,`true`),Ga(n),n.style.cssText=`position:fixed;inset:0;pointer-events:none;contain:strict;background:transparent;z-index:${dn};`;let r=!1,i=()=>r?`none`:`auto`,a=wm(e,i());a.style.inset=`0`,n.appendChild(a),(e.body??e.documentElement).appendChild(n);let o=[a],s=Cm,c=e=>{if(r===e)return;r=e;let t=i();for(let e of o)e.style.pointerEvents=t},l=(t,n)=>{let i=r;c(!0);let a=gp(e,t,n);return c(i),a},u=t=>{let n=t.deltaX,r=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?(n*=16,r*=16):t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=e.documentElement.clientWidth,r*=e.documentElement.clientHeight),n===0&&r===0)return;let i=l(t.clientX,t.clientY);if(!i)return;let a=ym(i,n,r);a&&(t.preventDefault(),a.scrollBy({left:n,top:r,behavior:`instant`}))};return n.addEventListener(`wheel`,u,{passive:!1}),{openForHitTest:()=>{c(!0)},closeAfterHitTest:()=>{c(!1)},refreshHoles:()=>{let r=Tm(t());if(r.length===0){if(s===Cm)return;s=Cm,a.style.pointerEvents=i(),o=[a],n.replaceChildren(a);return}let c={left:0,top:0,right:e.documentElement.clientWidth,bottom:e.documentElement.clientHeight},l=xm([c],r[0]);for(let e=1;e<r.length;e++)l=xm(l,r[e]);l.length>12&&(l=xm([c],Em(r)));let u=l.map(e=>`${e.left},${e.top},${e.right},${e.bottom}`).join(`|`);if(u===s)return;s=u;let d=i();o=l.map(t=>{let n=wm(e,d);return n.style.left=`${t.left}px`,n.style.top=`${t.top}px`,n.style.width=`${t.right-t.left}px`,n.style.height=`${t.bottom-t.top}px`,n}),n.replaceChildren(...o)},remove:()=>{n.removeEventListener(`wheel`,u),n.remove()}}}})),km,Am=n((()=>{Ua(),Ka(),km=(e,t,n=document)=>{let r=n.createElement(`style`);r.setAttribute(e,``);let i=Ha(n);return i&&(r.nonce=i),Ga(r),r.textContent=t,n.head.appendChild(r),r}})),jm,Mm,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,Um,Wm,Gm,Km=n((()=>{J(),Om(),Am(),nr(),jm=`html, body { pointer-events: auto !important; }
23
+ iframe[${On}] { pointer-events: auto !important; }`,Mm=new Set,Nm=new Map,Pm=!1,Fm=0,Im=e=>{let t=new Set(e.querySelectorAll(`iframe[${On}]`));for(let n of Mm){let r=tr(n.defaultView);r?.ownerDocument===e&&t.add(r)}return t},Lm=e=>{if(Nm.has(e))return;let t=km(`data-react-grab-frozen-pseudo`,jm,e),n=Dm(e,()=>Im(e));n.refreshHoles(),Fm>0&&n.openForHitTest(),Nm.set(e,{style:t,shield:n})},Rm=e=>{let t=Nm.get(e);t&&(t.style.remove(),t.shield.remove(),Nm.delete(e))},zm=()=>Pm,Bm=e=>(Mm.add(e),Pm&&(Lm(e),Gm()),()=>{Mm.delete(e),Rm(e),Gm()}),Vm=()=>{if(!Pm){Pm=!0,Fm=0,Mm.add(document);for(let e of Mm)Lm(e)}},Hm=()=>{if(Pm){Pm=!1,Fm=0;for(let e of[...Nm.keys()])Rm(e)}},Um=()=>{if(Pm&&(Fm++,!(Fm>1)))for(let e of Nm.values())e.shield.openForHitTest()},Wm=()=>{if(!(!Pm||Fm===0)&&(Fm--,!(Fm>0)))for(let e of Nm.values())e.shield.closeAfterHitTest()},Gm=()=>{if(Pm)for(let e of Nm.values())e.shield.refreshHoles()}})),qm,Jm=n((()=>{qm=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)}})),Ym,Xm,Zm,Qm,$m,eh,th,nh=n((()=>{io(),Jm(),Ym=new Set,Xm=new Set,Zm=!1,Qm=(e,t)=>{if(Xm.has(e))try{e.unfreeze()}catch(e){t.push(e)}finally{Xm.delete(e)}},$m=e=>{Ym.add(e);try{Zm&&e.isConnected()&&(e.freeze(),Xm.add(e))}catch(t){throw Ym.delete(e),t}return()=>{let t=[];Qm(e,t),Ym.delete(e),qm(t,`Unregistering renderer freeze failed`)}},eh=()=>{if(!Zm){Zm=!0;try{for(let e of Ym)e.isConnected()&&(e.freeze(),Xm.add(e))}catch(e){Zm=!1;let t=[];for(let e of[...Xm].reverse())Qm(e,t);throw t.length===0?e:AggregateError([e,...t],`Rolling back renderer freeze failed`)}}},th=()=>{if(!Zm)return;Zm=!1;let e=[];for(let t of[...Xm].reverse())Qm(t,e);qm(e,`Unfreezing renderers failed`)}})),rh,ih,ah,oh,sh,ch,lh,uh,dh,fh,ph,mh,hh,gh,_h,vh,yh,bh,xh,Sh,Ch,wh,Th,Eh,Dh,Oh,kh,Ah,jh,Mh,Nh,Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh,Qh=n((()=>{Gi(),J(),ta(),nh(),Xi(),rh=new WeakMap,ih=new WeakMap,ah=new WeakMap,oh=new WeakMap,sh=new WeakMap,ch=[`name`,`position`,`rotation`,`scale`,`color`,`visible`,`args`],lh=e=>typeof e==`object`&&!!e,uh=e=>typeof e==`object`&&!!e||typeof e==`function`,dh=(e,t)=>typeof e[t]==`function`,fh=e=>lh(e)&&typeof e.x==`number`&&typeof e.y==`number`&&typeof e.z==`number`&&dh(e,`set`)&&dh(e,`clone`)&&dh(e,`applyMatrix4`)&&dh(e,`project`),ph=e=>lh(e)&&dh(e,`clone`)&&dh(e,`premultiply`),mh=e=>lh(e)&&`boundingBox`in e&&dh(e,`computeBoundingBox`),hh=e=>lh(e)&&typeof e.type==`string`&&lh(e.props)&&gh(e.object),gh=e=>lh(e)&&e.isObject3D===!0&&typeof e.uuid==`string`&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.visible==`boolean`&&ph(e.matrixWorld)&&dh(e,`updateWorldMatrix`),_h=e=>lh(e)&&e.isCamera===!0,vh=e=>gh(e)&&e.isScene===!0&&Array.isArray(e.children),yh=e=>lh(e)&&typeof e.tagName==`string`&&e.tagName.toLowerCase()===`canvas`&&dh(e,`getContext`),bh=e=>lh(e)&&yh(e.domElement),xh=e=>lh(e)&&dh(e,`set`),Sh=e=>lh(e)&&dh(e,`setFromCamera`)&&dh(e,`intersectObjects`),Ch=e=>lh(e)&&bh(e.gl)&&vh(e.scene)&&_h(e.camera)&&Sh(e.raycaster)&&xh(e.pointer),wh=e=>e===`always`||e===`demand`||e===`never`,Th=e=>lh(e)&&typeof e.elapsedTime==`number`,Eh=(e,t)=>{let n=e.getState();if(typeof n.setFrameloop!=`function`)return;let r=Th(n.clock)?n.clock.elapsedTime:null;n.setFrameloop(t);let i=e.getState().clock;r!==null&&Th(i)&&(i.elapsedTime=r)},Dh=e=>{if(oh.has(e))return;let t=null,n=$m({freeze:()=>{let n=ah.get(e);if(!n)return;let r=n.getState();if(wh(r.frameloop)&&typeof r.setFrameloop==`function`){let e=r.frameloop;Eh(n,`never`),t=()=>Eh(n,e)}},isConnected:()=>e.isConnected,unfreeze:()=>{t?.(),t=null}});oh.set(e,n)},Oh=e=>{let t=oh.get(e);t&&(oh.delete(e),t())},kh=e=>hh(e.__r3f)?e.__r3f:null,Ah=e=>{let t=e.current.stateNode;if(!lh(t)||!uh(t.containerInfo))return null;let n=t.containerInfo,r=Reflect.get(n,`getState`);if(typeof r!=`function`)return null;let i=Reflect.apply(r,n,[]);return Ch(i)?()=>{let e=Reflect.apply(r,n,[]);return Ch(e)?e:i}:null},jh=e=>{let t=sh.get(e);t&&(sh.delete(e),ah.get(t.canvas)===t.root&&(ah.delete(t.canvas),Oh(t.canvas)))},Mh=e=>{let t=Ah(e);if(!t){jh(e);return}let n=t().gl.domElement;if(!n.isConnected||!e.current.child){jh(e);return}let r=sh.get(e);r&&r.canvas!==n&&(jh(e),r=void 0),r?(r.root.getState=t,r.root.selectableObjects=null):(r={canvas:n,root:{getState:t,selectableObjects:null}},sh.set(e,r)),ah.set(n,r.root),Dh(n)},Ni({name:`react-grab-three-selection`,onCommitFiberRoot:(e,t)=>Mh(t)}),Nh=e=>{let t=e;for(;t;){if(kh(t))return t;t=t.parent}return null},Ph=e=>{let t=e;for(;t;){let e=kh(t);if(e&&typeof e.eventCount==`number`&&e.eventCount>0)return!0;t=t.parent}return!1},Fh=(e,t)=>{let n=e;for(;n;){if(n===t)return!0;n=n.parent}return!1},Ih=e=>{let t=e;for(;t;){if(!t.visible)return!1;t=t.parent}return!0},Lh=e=>!!kh(e)&&(mh(e.geometry)||e.type.toLowerCase()===`sprite`),Rh=e=>e.isInstancedMesh!==!0||typeof e.count!=`number`||!Number.isInteger(e.count)||e.count<=0||!e.getMatrixAt?0:e.count,zh=(e,t,n,r)=>{try{let i={object:n};r!==void 0&&(i.instanceId=r);let a=Bh(t,n,i);a&&e.push(a)}catch{}},Bh=(e,t,n)=>{let r=typeof n.instanceId==`number`&&Number.isInteger(n.instanceId)?n.instanceId:null,i=rh.get(t);i||(i=new Map,rh.set(t,i));let a=i.get(r);if(a)return a.canvas=e.gl.domElement,a.intersectionPoint=fh(n.point)?n.point:null,a.object=t,a.rootState=e,a.element;let o=kh(t),s=o?Bi(o):null;if(o&&!s)return null;let c=(o?.type||t.type||`object-3d`).toLowerCase(),l=e.gl.domElement.ownerDocument.createElement(c),u={canvas:e.gl.domElement,element:l,fiber:s,instance:o,instanceId:r,intersectionPoint:fh(n.point)?n.point:null,object:t,rootState:e,tagName:c},d=l.getBoundingClientRect.bind(l);return l.getBoundingClientRect=()=>{let e=Zh(u),t=l.ownerDocument.defaultView?.DOMRect;return t?new t(e.x,e.y,e.width,e.height):d()},qi(l,{hostElement:u.canvas,supportsDomEditing:!1,getBounds:()=>Zh(u),getFiber:()=>u.fiber?yi(u.fiber):null,getPreview:()=>Wh(u),getSelector:()=>Gh(u),getTagName:()=>u.tagName,isConnected:()=>u.canvas.isConnected&&Fh(u.object,u.rootState.scene)}),i.set(r,u),ih.set(l,u),l},Vh=(e,t,n)=>{if(!yh(e))return e;let r=ah.get(e);if(!r)return e;try{let i=r.getState(),a=Y(e);if(a.width<=0||a.height<=0)return e;let o=(t-a.x)/a.width*2-1,s=-((n-a.y)/a.height)*2+1;if(o<-1||o>1||s<-1||s>1)return e;i.pointer.set(o,s),i.raycaster.setFromCamera(i.pointer,i.camera);let c=i.raycaster.intersectObjects(i.scene.children,!0);for(let e of c){if(!Ph(e.object))continue;let t=Nh(e.object);if(!t||t.visible===!1)continue;let n=Bh(i,t,e);if(n)return n}for(let e of c){let t=Nh(e.object);if(!t||t.visible===!1)continue;let n=Bh(i,t,e);if(n)return n}}catch{}return e},Hh=(e,t)=>{if(!yh(e))return[];let n=ah.get(e);if(!n)return[];try{let e=n.getState(),r=t?ih.get(t):null;if(!n.selectableObjects){let t=[],r=[...e.scene.children];for(let e=0;e<r.length;e+=1){let n=r[e];if(n.children)for(let e of n.children)r.push(e);Lh(n)&&t.push(n)}n.selectableObjects=t}let i=[];for(let t of n.selectableObjects){if(!Ih(t)||!Fh(t,e.scene)||t.isInstancedMesh===!0&&t.count===0)continue;let n=Rh(t);if(n>0&&n<=512){for(let r=0;r<n;r+=1)zh(i,e,t,r);continue}if(n>512&&r?.object===t&&r.instanceId!==null){i.push(r.element);continue}zh(i,e,t)}return i}catch{return[]}},Uh=e=>typeof e==`string`?JSON.stringify(e):typeof e==`number`||typeof e==`boolean`?`{${String(e)}}`:Array.isArray(e)&&e.length<=4&&e.every(e=>typeof e==`number`||typeof e==`string`)?`{${JSON.stringify(e)}}`:null,Wh=e=>{let t=e.instance?.props??{},n=[];for(let r of ch){let i=t[r];r===`name`&&i===void 0&&e.object.name&&(i=e.object.name);let a=Uh(i);a&&n.push(`${r}=${a}`)}return e.instanceId!==null&&n.push(`instanceId={${e.instanceId}}`),`<${e.tagName}${n.length>0?` ${n.join(` `)}`:``} />`},Gh=e=>{if(e.object.name)return`${e.tagName}[name=${JSON.stringify(e.object.name)}]`;let t=e.instanceId===null?``:`:${e.instanceId}`;return`${e.tagName}[uuid=${JSON.stringify(`${e.object.uuid}${t}`)}]`},Kh=e=>{e.object.updateWorldMatrix(!0,!1);let t=e.object.matrixWorld.clone();if(e.instanceId===null||!e.object.getMatrixAt)return t;let n=e.object.matrixWorld.clone();return e.object.getMatrixAt(e.instanceId,n),n.premultiply(t)},qh=e=>{if(!mh(e.geometry))return null;if(!e.geometry.boundingBox)try{e.geometry.computeBoundingBox()}catch{return null}let t=e.geometry.boundingBox;return!t||!fh(t.min)||!fh(t.max)?null:t},Jh=e=>{if(e.isInstancedMesh!==!0||typeof e.computeBoundingBox!=`function`)return null;if(!e.boundingBox)try{e.computeBoundingBox()}catch{return null}let t=e.boundingBox;return!t||!fh(t.min)||!fh(t.max)?null:t},Yh=e=>e.instanceId===null?Jh(e.object)??qh(e.object):qh(e.object),Xh=(e,t)=>{let n=t.x+t.width/2,r=t.y+t.height/2;try{let i=e.intersectionPoint?e.intersectionPoint.clone():fh(e.object.position)?e.object.position.clone().set(0,0,0).applyMatrix4(Kh(e)):null;i&&(i.project(e.rootState.camera),Number.isFinite(i.x)&&Number.isFinite(i.y)&&(n=t.x+(i.x+1)/2*t.width,r=t.y+(1-i.y)/2*t.height))}catch{}return{x:n-16/2,y:r-16/2,width:16,height:16,borderRadius:`0px`}},Zh=e=>{let t=Y(e.canvas);try{let n=Yh(e);if(!n)return Xh(e,t);let r=Kh(e),i=[n.min.x,n.max.x],a=[n.min.y,n.max.y],o=[n.min.z,n.max.z],s=1/0,c=1/0,l=-1/0,u=-1/0,d=n.min.clone();for(let n of i)for(let i of a)for(let a of o){if(d.set(n,i,a).applyMatrix4(r).project(e.rootState.camera),!Number.isFinite(d.x)||!Number.isFinite(d.y))continue;let o=t.x+(d.x+1)/2*t.width,f=t.y+(1-d.y)/2*t.height;s=Math.min(s,o),c=Math.min(c,f),l=Math.max(l,o),u=Math.max(u,f)}if(!Number.isFinite(s)||!Number.isFinite(c)||!Number.isFinite(l)||!Number.isFinite(u))return Xh(e,t);let f=Math.max(t.x,s),p=Math.max(t.y,c),m=Math.min(t.x+t.width,l),h=Math.min(t.y+t.height,u);return m<=f||h<=p?Xh(e,t):{x:f,y:p,width:m-f,height:h-p,borderRadius:`0px`}}catch{return Xh(e,t)}}})),$h,eg,tg,ng,rg,ig,ag,og=n((()=>{J(),ta(),pp(),vp(),im(),sm(),Xa(),$p(),mm(),io(),Jn(),gm(),tm(),zp(),Km(),Qh(),$h=null,eg=null,tg=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},ng=(e,t,n)=>{let r=Vh(e,t,n);return Rp(r)&&no(e)&&em(e,t,n)?r:null},rg=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];Um();try{let n=om(e,t),r=to()?n.filter(no):n,i=[],a=new Set,o=!1;for(let n of r){let r=n,s=em(n,e,t);if(!o){let i=pm(n,e,t);i&&no(i)&&Rp(i)&&em(i,e,t)?(r=i,s=!0,o=!0):Rp(n)&&s&&(o=!0)}let c=Vh(r,e,t);if(s&&!a.has(c)&&(a.add(c),i.push(c)),r===n)continue;let l=Ya(r);for(;l&&no(l);){let n=Vh(l,e,t);em(l,e,t)&&!a.has(n)&&(a.add(n),i.push(n)),l=Ya(l)}break}return i}finally{Wm()}},ig=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();Um();try{if(eg){let r=eg.element,i=n-eg.timestamp<16;if(r.isConnected&&i&&hm(e,t,eg.bounds)&&!fp(r))return r;eg=null,$h?.element===r&&($h=null)}if($h){let r=tg(e,t,$h.clientX,$h.clientY),i=n-$h.timestamp<16;if(r&&i){if(!$h.preciseHitElement)return $h.element;let n=pm($h.preciseHitElement,e,t);if(n){let r=ng(n,e,t);if(r)return r}return $h.usesTextHitTesting?ng($h.preciseHitElement,e,t)??rm(e,t):$h.fallbackElement}}let r=null,i=_p(e,t),a=i?Qp(i)!==null:!1,o=i?pm(i,e,t):null,s=o?ng(o,e,t):null,c=(i?ng(i,e,t):null)??rm(e,t);if(r=s??c,r&&qn(r)&&!fp(r)){let e=Y(r);eg={element:r,timestamp:n,bounds:{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height}}}else eg=null;return $h={clientX:e,clientY:t,element:r,fallbackElement:c,preciseHitElement:i?.namespaceURI===`http://www.w3.org/2000/svg`||o||a?i:null,usesTextHitTesting:a,timestamp:n},r}finally{Wm()}},ag=()=>{$h=null,eg=null}})),sg,cg=n((()=>{sg=(e,t,n)=>Math.max(t,Math.min(e,n))}));og(),cg(),Ja(),oa(),nr();let lg=e=>{let t=[],n=e;for(;n;){t.unshift(n);let e=n.getRootNode();if(aa(e)){n=e.host;continue}if(!qa(e))break;n=tr(e.defaultView)}return t},ug=(e,t)=>{if(e===t)return 0;let n=lg(e),r=lg(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=n[e],i=r[e];if(t===i)continue;let a=t.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0}return n.length-r.length};Km(),J(),Dp(),io(),sm(),mm(),ta(),$p(),Xa(),pp(),Jn(),oa(),Qh();let dg=e=>e.sort(ug),fg=e=>Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>0&&e.height>0,pg=(e,t)=>e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y,mg=(e,t,n,r)=>{let i=[...e].filter(e=>!r.has(e)),a=i.filter(e=>e.tagName===`TR`),o=0;for(let t=0;t<i.length&&o<64;t+=1){let n=Ya(i[t]);!n||n.tagName!==`TR`||e.has(n)||(o+=1,e.add(n),i.push(n),a.push(n))}let s=s=>{if(!s||e.has(s)||r.has(s)||o>=64)return;o+=1;let c=n.get(s);c||(c=Y(s),n.set(s,c)),!(!fg(c)||!pg(c,t))&&(e.add(s),i.push(s),s.tagName===`TR`&&a.push(s))},c=e=>{if(!(e.length>32))for(let t of e){if(o>=64)return;s(t)}};for(let e=0;e<a.length&&o<64;e+=1){let t=a[e];s(t.previousElementSibling),s(t.nextElementSibling)}for(let e=0;e<i.length&&o<64;e+=1){let t=i[e];if(Ep(t))continue;let n=t.parentElement?.children.length??0;(t.tagName===`TR`||n<=32)&&(s(t.previousElementSibling),s(t.nextElementSibling)),c(t.children),t.shadowRoot&&c(t.shadowRoot.children)}},hg=(e,t)=>{if(e.width<=0||e.height<=0)return[];let n=Math.max(1,Math.round(window.innerWidth)),r=Math.max(1,Math.round(window.innerHeight)),i=e.x,a=e.y,o=e.x+e.width,s=e.y+e.height,c=i+e.width/2,l=a+e.height/2,u=sg(Math.ceil(e.width/32),3,20),d=sg(Math.ceil(e.height/32),3,20),f=u*d,p=f>100?Math.sqrt(100/f):1,m=sg(Math.floor(u*p),3,20),h=sg(Math.floor(d*p),3,20),g=new Set,_=[],v=(e,t)=>{let i=sg(Math.round(e),0,n-1),a=sg(Math.round(t),0,r-1),o=a*n+i;g.has(o)||(g.add(o),_.push(i,a))};v(t.x,t.y),v(i+1,a+1),v(o-1,a+1),v(i+1,s-1),v(o-1,s-1),v(c,a+1),v(c,s-1),v(i+1,l),v(o-1,l),v(c,l);for(let t=0;t<m;t+=1){let n=i+(t+.5)/m*e.width;for(let t=0;t<h;t+=1)v(n,a+(t+.5)/h*e.height)}return _},gg=(e,t,n)=>{let r=e.x,i=e.y,a=e.x+e.width,o=e.y+e.height,s=new Set,c=new Map,l=new Map,u=new Set,d=new Set,f=new Set,p=hg(e,t),m=e=>{let t=l.get(e);if(t!==void 0)return t;let r=n(e);return l.set(e,r),r};Um();try{for(let e=0;e<p.length;e+=2){let t=om(p[e],p[e+1]);for(let n of t){if(n.tagName===`CANVAS`){if(d.has(n))continue;if(u.has(n)){s.add(n);continue}u.add(n);let t=n;if(e===0)try{t=Vh(n,p[e],p[e+1])}catch{}let r=Hh(n,t);if(r.length>0||t!==n){d.add(n);for(let e of r)s.add(e);t!==n&&s.add(t);continue}}s.add(n)}let n=!1;for(let r of t){let t=r;if(e===0&&!n){let n=pm(r,p[e],p[e+1]);n&&m(n)&&(s.add(n),n!==r&&f.add(r),t=n)}if(m(t)){if(!n){n=!0;continue}f.add(t)}}}}finally{Wm()}for(let e of d)s.delete(e);mg(s,e,c,d);let h=[],g=null,_=1/0,v=1/0,y=window.innerWidth,b=window.innerHeight,x=y>0&&b>0,S=y*Mn,C=b*Mn;for(let e of s){if(qn(e)&&fp(e)||Ep(e)||!no(e)||!m(e))continue;let n=c.get(e)??Y(e);if(!fg(n))continue;let s=n.x,l=n.y,u=s+n.width,d=l+n.height;if(x&&n.width>=S&&n.height>=C&&Math.min(y,u)-Math.max(0,s)>=S&&Math.min(b,d)-Math.max(0,l)>=C)continue;let p=Math.max(0,Math.min(a,u)-Math.max(r,s)),w=Math.max(0,Math.min(o,d)-Math.max(i,l)),T=n.width*n.height;if(p<=0||w<=0||T<=0)continue;let ee=Qp(e),E=0,te=0,D=1/0;if(ee)for(let e of ee){let n=e.x,s=e.y,c=n+e.width,l=s+e.height,u=Math.max(0,Math.min(a,c)-Math.max(r,n)),d=Math.max(0,Math.min(o,l)-Math.max(i,s));E+=u*d,te+=e.width*e.height;let f=Math.max(n-t.x,0,t.x-c),p=Math.max(s-t.y,0,t.y-l),m=f*f+p*p;D=Math.min(D,m)}else{E=p*w;let e=Math.max(s-t.x,0,t.x-u),n=Math.max(l-t.y,0,t.y-d);D=e*e+n*n}if(E<=0)continue;let O=ee&&!f.has(e)?te:T;if(E/O>=.75){h.push(e);continue}(D<_||D===_&&T<v)&&(g=e,_=D,v=T)}return h.length>0?dg(h):g?[g]:[]},_g=e=>{let t=new Set(e),n=[];for(let r=e.length-1;r>=0;--r){let i=e[r];if(!t.has(i))continue;let a=i,o=Ya(a),s=!1;for(;o;){let e=a.getRootNode();if(t.has(o)&&aa(e)&&e.host===o)t.delete(o);else if(t.has(o)){s=!0;break}a=o,o=Ya(a)}s||n.push(i)}return n.reverse()},vg=(e,t,n)=>_g(gg(e,t,n));J(),cg();let yg=(e,t)=>e.width<=0?0:sg((t.x-e.x)/e.width,0,1);var bg,xg,Sg,Cg,wg,Tg,Eg=n((()=>{J(),io(),bg={width:0,height:0,offsetLeft:0,offsetTop:0},xg=null,Sg=-1/0,Cg=()=>{Sg=-1/0},wg=e=>{if(e){let t=e.getBoundingClientRect();bg.width=t.width,bg.height=t.height,bg.offsetLeft=t.left,bg.offsetTop=t.top;return}let t=window.visualViewport;bg.width=t?.width??window.innerWidth,bg.height=t?.height??window.innerHeight,bg.offsetLeft=t?.offsetLeft??0,bg.offsetTop=t?.offsetTop??0},Tg=()=>{let e=to(),t=performance.now();return(e!==xg||t-Sg>=16)&&(xg=e,Sg=t,wg(e)),{width:bg.width,height:bg.height,offsetLeft:bg.offsetLeft,offsetTop:bg.offsetTop}}}));ta(),$p(),Eg();let Dg=()=>{$i(),Yp(),ag(),Cg()},Og=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}),kg=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),Ag=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.x,y:e.y});J(),Xa();let jg=(e,t,n)=>{let r=(e,t,n,r)=>{let i=[],a=e,o=0;for(;a&&i.length<n&&o<100;)r(a)&&i.push(a),a=t(a),o+=1;return i},i=r(Ya(e),Ya,6,t);i.reverse();let a=i.map((e,t)=>({element:e,depth:t,isLast:!0})),o=i.length,s=r(e.previousElementSibling,e=>e.previousElementSibling,7,n),c=r(e.nextElementSibling,e=>e.nextElementSibling,7,n),l=Math.min(s.length,Math.max(3,7-c.length)),u=Math.min(c.length,7-l),d=[...s.slice(0,l).reverse(),e,...c.slice(0,u)],f=r(e.firstElementChild,e=>e.nextElementSibling,6,t),p=d.length-1,m=f.length-1;return d.forEach((t,n)=>{a.push({element:t,depth:o,isLast:n===p}),t===e&&f.forEach((e,t)=>{a.push({element:e,depth:o+1,isLast:t===m})})}),a};J();let Mg=e=>e.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName!==`svg`,Ng=e=>{let t=e.getBoundingClientRect();return t.width>=16||t.height>=16},Pg=(e,t)=>t(e)&&!Mg(e)&&Ng(e);J();let Fg=e=>e===`edit`?Pn:e,Ig=new Set([`c`,`C`,`с`,`С`,`ȼ`,`Ȼ`,`ↄ`,`Ↄ`,`ᴄ`,`ᶜ`,`ⱼ`,`ⅽ`,`Ⅽ`,`ç`,`Ç`,`ć`,`Ć`,`č`,`Č`,`ĉ`,`Ĉ`,`ċ`,`Ċ`]),Lg=(e,t)=>t===`KeyC`?!0:!e||e.length!==1?!1:Ig.has(e);var Rg,zg,Bg,Vg=n((()=>{Rg=null,zg=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},Bg=()=>{if(Rg===null){if(typeof navigator>`u`)return Rg=!1,Rg;let e=navigator.platform??zg()??navigator.userAgent;Rg=/Mac|iPhone|iPad|iPod/i.test(e)}return Rg}}));Vg();let Hg=(e,t)=>{if(!e||!t)return!1;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:!1},Ug={meta:`metaKey`,cmd:`metaKey`,command:`metaKey`,win:`metaKey`,windows:`metaKey`,ctrl:`ctrlKey`,control:`ctrlKey`,shift:`shiftKey`,alt:`altKey`,option:`altKey`,opt:`altKey`},Wg=e=>{let t=e.split(`+`).map(e=>e.trim().toLowerCase()),n={metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1,key:null};for(let e of t){let t=Ug[e];t?n[t]=!0:n.key=e}return n},Gg=e=>{if(typeof e==`function`)return t=>{try{return e(t)}catch{return!1}};let t=Wg(e),n=t.key;return e=>{if(n===null){let n=t.metaKey?e.metaKey||e.key===`Meta`:!0,r=t.ctrlKey?e.ctrlKey||e.key===`Control`:!0,i=t.shiftKey?e.shiftKey||e.key===`Shift`:!0,a=t.altKey?e.altKey||e.key===`Alt`:!0,o=n&&r&&i&&a,s=[t.metaKey,t.ctrlKey,t.shiftKey,t.altKey].filter(Boolean).length,c=[e.metaKey||e.key===`Meta`,e.ctrlKey||e.key===`Control`,e.shiftKey||e.key===`Shift`,e.altKey||e.key===`Alt`].filter(Boolean).length;return o&&c>=s}let r=e.key?.toLowerCase()===n||Hg(n,e.code),i=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?(t.metaKey?e.metaKey:!0)&&(t.ctrlKey?e.ctrlKey:!0)&&(t.shiftKey?e.shiftKey:!0)&&(t.altKey?e.altKey:!0):!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey;return r&&i}},Kg=e=>!e||typeof e==`function`?{metaKey:Bg(),ctrlKey:!Bg(),shiftKey:!1,altKey:!1,key:null}:Wg(e);Vg();let qg=(e,t)=>{if(t.activationKey)return Gg(t.activationKey)(e);let n=(Bg()?e.metaKey:e.ctrlKey)&&!e.shiftKey&&!e.altKey;return!!(e.key&&n&&Lg(e.key,e.code))};var Jg,Yg=n((()=>{Kn(),Jg=(e,t)=>{try{return e.composedPath().some(e=>Gn(e)&&e.hasAttribute(t))}catch{return!1}}}));Yg(),Ma();let Xg=async(e,t)=>{let n=xu(),r=new URLSearchParams({file:e}),i=n?`line1`:`line`,a=n?`column1`:`column`;t&&r.set(i,String(t)),r.set(a,`1`);let o=n?`${wu()}/__nextjs_launch-editor`:`/__open-in-editor`;return(await fetch(`${o}?${r}`)).ok},Zg=async(e,t,n)=>{try{let r=rl(e);if(await Xg(r,t).catch(()=>!1))return;let i=t?`&line=${t}`:``,a=`https://react-grab.com/open-file?url=${encodeURIComponent(r)}${i}`,o=n?n(a,r,t):a;window.open(o,`_blank`,`noopener,noreferrer`)}catch(n){throw n instanceof Sa?n:new Sa(e,t,n)}};var Z,Qg=n((()=>{Z=e=>{console.warn(`[react-grab]`,e)}}));Ma(),Qg();let $g=(e,t,n)=>{Z(e instanceof Sa?e:new Sa(t,n,e))},e_=(e,t,n)=>{try{if(n.onOpenFile(e,t))return;Zg(e,t,n.transformOpenFileUrl).catch(n=>{$g(n,e,t)})}catch(n){$g(n,e,t)}},t_=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,r=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),i=Math.max(i,a.y+a.height);return{x:t,y:n,width:r-t,height:i-n}},n_={enabled:!0,hue:0,selectionBox:{enabled:!0},dragBox:{enabled:!0},grabbedBoxes:{enabled:!0},elementLabel:{enabled:!0},toolbar:{enabled:!0}},r_=(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},toolbar:{enabled:t.toolbar?.enabled??e.toolbar.enabled}});R(),J(),Ma(),Qg();let i_={activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,activationKey:void 0,getContent:void 0,maxContextLines:3,freezeReactUpdates:!0},a_=(e={})=>{let t=new Map,n=[],r={},i=!1,[a,o]=Bt({theme:n_,options:{...i_,...e},actions:[]}),s=t=>{let n=n_,r={...i_,...e},i=[];for(let{config:e}of t)if(e.theme&&(n=r_(n,e.theme)),e.options&&(r={...r,...e.options}),e.actions)for(let t of e.actions)i.push(t);return{theme:n,options:r,actions:i}},c=e=>{o(`theme`,e.theme),o(`options`,{...e.options,...r}),o(`actions`,e.actions)},l=()=>{c(s(n))},u=(e,t)=>{r[e]=t,o(`options`,e,()=>t)},d=[`activationMode`,`keyHoldDuration`,`allowActivationInsideInput`,`activationKey`,`getContent`,`maxContextLines`,`freezeReactUpdates`],f=e=>{if(!i)for(let t of d)e[t]!==void 0&&u(t,e[t])},p=({plugin:e,config:t})=>{try{let n=t.cleanup?.();Promise.resolve(n).catch(t=>{Z(new wa(e.name,t))})}catch(t){Z(new wa(e.name,t))}},m=(e,t)=>{let n;try{n=e.setup?.(t,ee)??{};let r=n.cleanup?.bind(n);return{...n,cleanup:r,theme:e.theme?n.theme?r_(r_(n_,e.theme),n.theme):e.theme:n.theme,options:e.options?{...e.options,...n.options}:n.options,actions:e.actions?[...e.actions,...n.actions??[]]:n.actions,hooks:e.hooks?{...e.hooks,...n.hooks}:n.hooks}}catch(t){throw n&&p({plugin:e,config:n}),new Ta(e.name,t)}},h=(e,r)=>{if(i)return;let a={plugin:e,config:m(e,r)},o=t.get(e.name),l=new Map(t);l.set(e.name,a);let u;try{u=s(l.values())}catch(t){throw p(a),new Ta(e.name,t)}t.set(e.name,a),n=Array.from(t.values()),c(u),o&&p(o)},g=e=>{if(i)return;let r=t.get(e);r&&(t.delete(e),n=Array.from(t.values()),p(r),l())},_=()=>{if(i)return;i=!0;let e=n;t.clear(),n=[],e.forEach(p),l()},v=()=>n.map(({plugin:e})=>e.name),b=(e,...t)=>{for(let{plugin:r,config:i}of n){let n=i.hooks?.[e];if(n)try{let i=n(...t);i&&Promise.resolve(i).catch(t=>{Z(new Ca(r.name,String(e),t))})}catch(t){Z(new Ca(r.name,String(e),t))}}},S=(e,...t)=>{let r=!1;for(let{plugin:i,config:a}of n){let n=a.hooks?.[e];if(n)try{n(...t)===!0&&(r=!0)}catch(t){Z(new Ca(i.name,String(e),t))}}return r},C=async(e,...t)=>{for(let{plugin:r,config:i}of n){let n=i.hooks?.[e];if(n)try{await n(...t)}catch(t){Z(new Ca(r.name,String(e),t))}}},w=async(e,t,...r)=>{let i=t;for(let{plugin:t,config:a}of n){let n=a.hooks?.[e];if(n)try{i=await n(i,...r)}catch(n){Z(new Ca(t.name,String(e),n))}}return i},T=(e,t,...r)=>{let i=t;for(let{plugin:t,config:a}of n){let n=a.hooks?.[e];if(n)try{i=n(i,...r)}catch(n){Z(new Ca(t.name,String(e),n))}}return i},ee={onActivate:()=>b(`onActivate`),onDeactivate:()=>b(`onDeactivate`),onElementHover:e=>b(`onElementHover`,e),onElementSelect:e=>{let t=!1,r=[];for(let{plugin:i,config:a}of n){let n=a.hooks?.onElementSelect;if(n)try{let a=n(e);if(a){if(t=!0,a===!0)continue;r.push(a.catch(e=>(Z(new Ca(i.name,`onElementSelect`,e)),!1)))}}catch(e){Z(new Ca(i.name,`onElementSelect`,e))}}let i=r.length>0?Promise.all(r).then(e=>e.every(Boolean)):void 0;return{wasIntercepted:t,pendingResult:i}},onDragStart:(e,t)=>b(`onDragStart`,e,t),onDragEnd:(e,t)=>b(`onDragEnd`,e,t),onBeforeCopy:async e=>C(`onBeforeCopy`,e),transformCopyContent:async(e,t)=>w(`transformCopyContent`,e,t),onAfterCopy:(e,t)=>b(`onAfterCopy`,e,t),onCopySuccess:(e,t,n)=>b(`onCopySuccess`,e,t,n),onCopyError:e=>b(`onCopyError`,e),onStateChange:e=>b(`onStateChange`,e),onPromptModeChange:(e,t)=>b(`onPromptModeChange`,e,t),onSelectionBox:(e,t,n)=>b(`onSelectionBox`,e,t,n),onDragBox:(e,t)=>b(`onDragBox`,e,t),onGrabbedBox:(e,t)=>b(`onGrabbedBox`,e,t),onElementLabel:(e,t,n)=>b(`onElementLabel`,e,t,n),onContextMenu:(e,t)=>b(`onContextMenu`,e,t),onOpenFile:(e,t)=>S(`onOpenFile`,e,t),transformHtmlContent:async(e,t)=>w(`transformHtmlContent`,e,t),transformAgentContext:async(e,t)=>w(`transformAgentContext`,e,t),transformActionContext:e=>T(`transformActionContext`,e),transformOpenFileUrl:(e,t,n)=>T(`transformOpenFileUrl`,e,t,n)};return x()&&y(_),{register:h,unregister:g,getPluginNames:v,setOptions:f,dispose:_,store:a,hooks:ee}};var o_,s_=n((()=>{o_=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}));J(),ta(),s_();let c_=e=>{let t=e.bounds.x+e.bounds.width/2,n=e.bounds.width/2,r=e.mouseX===void 0?void 0:e.mouseX-t;return{id:o_(`label`),bounds:e.bounds,boundsMultiple:e.boundsMultiple,tagName:e.tagName,componentName:e.componentName,status:e.status,createdAt:Date.now(),element:e.element,elements:e.elements,mouseX:e.mouseX,mouseXOffsetFromCenter:r,mouseXOffsetRatio:r!==void 0&&n>0?r/n:void 0,hideArrow:e.hideArrow}},l_=(e,t,n)=>{let r=new Map,i=e=>{let t=r.get(e);t!==void 0&&(window.clearTimeout(t),r.delete(e))},a=()=>{for(let e of r.values())window.clearTimeout(e);r.clear()},o=()=>{a(),e.clearLabelInstances(),n?.()},s=t=>{i(t);let n=window.setTimeout(()=>{e.updateLabelInstance(t,`fading`);let n=window.setTimeout(()=>{r.delete(t),e.removeLabelInstance(t)},125);r.set(t,n)},rn);r.set(t,n)};return{createInstance:(t,n,r,i,a)=>{o();let s=c_({bounds:t,tagName:n,componentName:r,status:i,element:a?.element,mouseX:a?.mouseX,elements:a?.elements,boundsMultiple:a?.boundsMultiple,hideArrow:a?.hideArrow});return e.addLabelInstance(s),s.id},createPerElementInstances:(t,n)=>{o();let r=[];for(let i of t){let t=c_({bounds:Y(i.element),tagName:i.tagName,componentName:i.componentName,status:n,element:i.element,mouseX:i.mouseX});e.addLabelInstance(t),r.push(t.id)}return r},updateAfterCopy:(t,n,r)=>{n?(e.updateLabelInstance(t,`copied`),s(t)):(i(t),e.updateLabelInstance(t,`error`,r||`Unknown error`))},markRetrying:t=>{i(t),e.updateLabelInstance(t,`copying`)},dismissInstance:t=>{i(t),e.removeLabelInstance(t)},cancelAllFades:a,clearAll:o,handleHoverChange:(n,r)=>{let a=t().find(e=>e.id===n);if(a){if(r){i(n),a.status===`fading`&&e.updateLabelInstance(n,`copied`);return}(a.status===`copied`||a.status===`fading`)&&s(n)}}}},u_=e=>{let t=window.innerWidth,n=window.innerHeight,r=Math.max(0,e.x),i=Math.min(t,e.x+e.width),a=Math.max(0,e.y),o=Math.min(n,e.y+e.height);return{x:(r+i)/2,y:(a+o)/2}};J(),og(),$p(),ra();let d_=(e,t,n)=>{let r=[],i=(t,r)=>{let i=Qp(t),a=n(t);if(i){for(let e of i)if(e.x<window.innerWidth&&e.x+e.width>0&&e.y<window.innerHeight&&e.y+e.height>0){a=e;break}}let o=u_(a),s=rg(o.x,o.y).filter(e),c=s.indexOf(t);return c===-1?null:s[c+r]??null},a=e=>{let t=i(e,1);return t&&(r.push(e),r.length>50&&(r=r.slice(-50))),t},o=e=>{if(r.length>0){let e=r.pop();if(X(e))return e}return i(e,-1)},s=(e,n)=>{let i=e=>n?e.nextElementSibling:e.previousElementSibling,a=i(e);for(;a;){if(t(a))return r=[],a;a=i(a)}return null};return{findNext:(e,t)=>{switch(e){case`ArrowUp`:return a(t);case`ArrowDown`:return o(t);case`ArrowRight`:return s(t,!0);case`ArrowLeft`:return s(t,!1);default:return null}},clearHistory:()=>{r=[]}}},f_=()=>{let e=new WeakSet,t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,`key`),n=!1;if(t?.get&&!t.get.__reactGrabPatched){n=!0;let r=t.get,i=function(){return e.has(this)?``:r.call(this)};i.__reactGrabPatched=!0,Object.defineProperty(KeyboardEvent.prototype,`key`,{get:i,configurable:!0})}return{claimedEvents:e,originalKeyDescriptor:t,restore:()=>{n&&t&&Object.defineProperty(KeyboardEvent.prototype,`key`,t)}}};J(),ff();let p_=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),m_=(e,t,n)=>{let r=null,i=()=>{if(!t()){a();return}let o=e(),s=p_(o.x,o.y),c=0,l=0;s.top&&(l-=10),s.bottom&&(l+=10),s.left&&(c-=10),s.right&&(c+=10);let u=!1;if(c!==0||l!==0){let e=window.scrollX,t=window.scrollY;window.scrollBy({behavior:`instant`,left:c,top:l});let r=window.scrollX-e,i=window.scrollY-t;u=r!==0||i!==0,u&&n?.({x:r,y:i})}r=u?lf(i):null},a=()=>{r!==null&&(uf(r),r=null)};return{start:i,stop:a,isActive:()=>r!==null}},h_=()=>{let e=globalThis;return!!(e.chrome?.runtime?.id||e.browser?.runtime?.id)},g_=e=>{try{let t=`0.2.0-dev.6fa4e51`,n=`data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 294 294"><path fill="#ff40e0" d="M145 47c25-20 50-27 67-17 16 9 23 30 20 60 0 2-1 5-1 7l-2 13h-1l-12-4c-8-3-17-5-25-6l-17-3c-10-1-20-1-29-1-10 0-20 0-29 1-6 8-11 16-16 24-5 9-9 17-13 26 4 9 8 18 13 26s10 16 16 24l11 14c5 7 11 13 18 19l10 8s-1 0 0 0l-11 9c-17 14-35 22-49 22-6 0-13-2-18-5-16-9-23-30-20-59 1-3 1-5 1-8-30-12-48-29-48-50 0-18 14-35 41-47 2-1 5-2 7-3 0-2 0-5-1-7-3-30 4-51 20-60 18-10 42-3 68 17M71 201c-1 2-1 4-1 5-2 24 3 41 13 47h1c11 7 30 1 51-15-10-9-18-18-26-29-13-1-26-4-38-8m9-38c-3 9-5 17-7 26 8 2 17 4 25 6-3-5-6-10-9-16-3-5-6-10-9-16m-19-53c-2 1-3 1-5 2-21 10-34 23-34 35 0 13 14 27 39 37 3-12 7-25 12-37-5-12-9-24-12-37m37-10c-8 1-17 3-25 6 2 8 4 16 7 25 3-5 6-11 9-16zm-3-61c-4-1-8 0-12 2-10 7-15 24-13 47 0 2 0 3 1 5 12-4 25-6 38-8 8-10 16-20 26-29-15-11-29-17-40-17m111 2c-4-2-8-3-12-2-11 0-25 5-40 17 10 9 19 19 26 29 13 2 26 4 39 8v-5c3-23-2-40-13-47m-61 23c-7 6-13 13-19 19h37c-6-6-12-13-18-19"/><mask id="a"><path fill="#fff" d="m235 85-133 27 28 133 133-27Z"/></mask><path fill="#ff40e0" d="m137 130 76 11c8 1 9 11 3 15l-28 16-4 32c-1 8-10 10-14 4l-41-66c-3-6 1-13 8-12" mask="url(#a)"/></svg>`)}`;console.log(`%cReact Grab${` v${t}`}%c\nhttps://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${n}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,``),e&&navigator.onLine&&!h_()&&fetch(`https://www.react-grab.com/api/version?source=browser&v=${t}&t=${Date.now()}`,{referrerPolicy:`origin`,keepalive:!0,priority:`low`,cache:`no-store`}).then(e=>e.text()).then(e=>{e&&e!==t&&console.warn(`[React Grab] v${t} is outdated (latest: v${e}). Run \`npx grab@latest upgrade\` to upgrade.`)}).catch(()=>null)}catch{}},__=e=>typeof e==`object`&&!!e,v_=e=>{if(!__(e))return null;let t={};return typeof e.enabled==`boolean`&&(t.enabled=e.enabled),(e.activationMode===`toggle`||e.activationMode===`hold`)&&(t.activationMode=e.activationMode),typeof e.keyHoldDuration==`number`&&Number.isFinite(e.keyHoldDuration)&&(t.keyHoldDuration=e.keyHoldDuration),typeof e.allowActivationInsideInput==`boolean`&&(t.allowActivationInsideInput=e.allowActivationInsideInput),typeof e.activationKey==`string`&&(t.activationKey=e.activationKey),typeof e.maxContextLines==`number`&&Number.isFinite(e.maxContextLines)&&(t.maxContextLines=e.maxContextLines),typeof e.freezeReactUpdates==`boolean`&&(t.freezeReactUpdates=e.freezeReactUpdates),typeof e.telemetry==`boolean`&&(t.telemetry=e.telemetry),Object.keys(t).length===0?null:t},y_=()=>{if(typeof window>`u`)return null;try{let e=(document.currentScript instanceof HTMLScriptElement?document.currentScript:null)?.getAttribute(`data-options`);return e?v_(JSON.parse(e)):null}catch{return null}},b_=e=>e===`Enter`||e===`NumpadEnter`,x_=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height;var S_,C_,w_,T_=n((()=>{J(),io(),S_=`react-grab-toolbar-state`,C_=()=>{try{let e=localStorage.getItem(S_);if(!e)return null;let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.collapsed==`boolean`?n.collapsed:!1;return{edge:n.edge===`top`||n.edge===`bottom`||n.edge===`left`||n.edge===`right`?n.edge:`bottom`,ratio:typeof n.ratio==`number`?n.ratio:Nn,collapsed:r,enabled:!r,defaultAction:typeof n.defaultAction==`string`?n.defaultAction:Pn}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},w_=e=>{try{localStorage.setItem(S_,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}}}));T_(),R(),io();let E_=e=>{let[t,n]=c(!1);return v(()=>{let t=ro(t=>n(e(t))),r=()=>n(!1);window.addEventListener(`keydown`,t,{capture:!0}),window.addEventListener(`keyup`,t,{capture:!0}),window.addEventListener(`blur`,r),y(()=>{window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`keyup`,t,{capture:!0}),window.removeEventListener(`blur`,r)})}),t},D_={name:`copy`,actions:[{id:`copy`,label:`Copy`,shortcut:`C`,showInToolbarMenu:!0,onAction:e=>{e.copy?.()}}]},O_={name:`comment`,actions:[{id:`comment`,label:`Comment`,shortcut:`Enter`,showInToolbarMenu:!0,onAction:e=>{e.enterPromptMode?.()}}]},k_={name:`open`,actions:[{id:`open`,label:`Open`,shortcut:`O`,enabled:e=>!!e.filePath,onAction:e=>{e.filePath&&(e_(e.filePath,e.lineNumber,e.hooks),e.hideContextMenu(),e.cleanup())}}]};var A_,j_,M_,N_,P_,F_=n((()=>{A_=`react-grab-comment-items`,j_=1e3,M_=60*j_,N_=60*M_,P_=24*N_})),I_,L_,R_,z_,B_,V_,H_,U_,W_,G_,K_,q_,J_,Y_=n((()=>{s_(),F_(),I_=new Set,L_=null,R_=e=>{if(typeof e.content!=`string`||typeof e.commentText!=`string`||typeof e.tagName!=`string`||typeof e.timestamp!=`number`||!Number.isFinite(e.timestamp))return null;let t=typeof e.componentName==`string`?e.componentName:typeof e.elementName==`string`?e.elementName:void 0;return{id:typeof e.id==`string`?e.id:o_(`comment`),content:e.content,tagName:e.tagName,componentName:t,elementsCount:typeof e.elementsCount==`number`&&Number.isFinite(e.elementsCount)?Math.max(1,Math.floor(e.elementsCount)):1,elementSelectors:Array.isArray(e.elementSelectors)?e.elementSelectors.filter(e=>typeof e==`string`):[],commentText:e.commentText,timestamp:e.timestamp}},z_=()=>{if(typeof window>`u`)return[];try{let e=sessionStorage.getItem(A_);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.map(e=>R_(e)).filter(e=>e!==null).slice(0,50):[]}catch{return[]}},B_=()=>(L_??=z_(),L_),V_=e=>{let t=e;for(;t.length>0;){let e=JSON.stringify(t);if(new Blob([e]).size<=524288)return t;t=t.slice(0,-1)}return[]},H_=e=>{L_=V_(e);try{sessionStorage.setItem(A_,JSON.stringify(L_))}catch{}for(let e of I_)e(L_);return L_},U_=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),W_=()=>[...B_()],G_=e=>{let t=B_().filter(t=>t.commentText!==e.commentText||!U_(t.elementSelectors,e.elementSelectors));return H_([{...e,id:o_(`comment`)},...t].slice(0,50))},K_=e=>H_(B_().filter(t=>t.id!==e)),q_=()=>H_([]),J_=e=>(I_.add(e),()=>{I_.delete(e)})}));Pa(),Y_();let X_={name:`fork-comment-history`,setup:e=>({hooks:{onCopySuccess:(t,n,r)=>{let i=r.prompt?.trim();if(!i||t.length===0)return;let a=t[0],o=e.getDisplayName(a)??void 0,s=t.map(e=>{try{return su(pu(e))}catch{return``}});G_({content:n,tagName:Na(a)??`div`,componentName:o,elementsCount:t.length,elementSelectors:s,commentText:i,timestamp:Date.now()})}}})};var Z_,Q_=n((()=>{Z_=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n])})),$_,ev,tv,nv,rv,iv,av,ov,sv,cv,lv,uv,dv,fv=n((()=>{J(),ff(),$_=!1,ev=null,tv=!1,nv=new Map,rv=-1,iv=new WeakSet,av=new WeakSet,ov=new WeakMap,sv=new Map,cv=new Map,lv=e=>{if(ev===e&&(tv=!0),iv.has(e))return!0;if(!$_&&ev===e){let t=(ov.get(e)??0)+1;return ov.set(e,t),t<4?!1:(iv.add(e),!0)}return!$_||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(iv.add(e),av.add(e),!0)},typeof window<`u`&&(window.requestAnimationFrame=e=>{let t=lv(e);if($_&&t){let t=rv--;return nv.set(t,e),t}let n=lf(t=>{if($_&&lv(e)){let t=rv--;nv.set(t,e),sv.set(n,t);return}let r=ev,i=tv;ev=e,tv=!1;try{e(t)}finally{let t=tv;ev=r,tv=i,!t&&!av.has(e)&&(iv.delete(e),ov.delete(e))}});return n},window.cancelAnimationFrame=e=>{if(nv.has(e)){nv.delete(e);return}let t=cv.get(e);if(t!==void 0){uf(t.nativeId),cv.delete(e);return}let n=sv.get(e);if(n!==void 0){nv.delete(n),sv.delete(e);return}uf(e)}),uv=()=>{if(!$_){$_=!0,nv.clear(),sv.clear();for(let[e,{nativeId:t,callback:n}]of cv)uf(t),nv.set(e,n);cv.clear()}},dv=()=>{if($_){$_=!1;for(let[e,t]of nv.entries()){let n=lf(n=>{cv.delete(e);let r=ev,i=tv;ev=t,tv=!1;try{t(n)}finally{let e=tv;ev=r,tv=i,!e&&!av.has(t)&&(iv.delete(t),ov.delete(t))}});cv.set(e,{nativeId:n,callback:t})}nv.clear(),sv.clear()}}})),pv,mv,hv,gv,_v,vv,yv,bv,xv,Sv,Cv,wv,Tv,Ev,Dv,Ov,kv,Av,jv,Mv,Nv,Pv,Fv,Iv,Lv,Rv,zv,Bv,Vv,Hv,Uv,Wv,Gv=n((()=>{J(),Q_(),Am(),fv(),Wn(),Ap(),oa(),io(),Jm(),pv=`
24
+ [${Dn}],
25
+ [${Dn}] * {
26
26
  animation-play-state: paused !important;
27
27
  transition: none !important;
28
28
  }
29
- `,_v=`
29
+ `,mv=`
30
30
  *, *::before, *::after {
31
31
  animation-play-state: paused !important;
32
32
  transition: none !important;
33
33
  }
34
- `,vv=`svg`,yv=e=>e?.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName===`svg`,bv=null,xv=[],Sv=[],Cv=[],wv=new Set,Tv=new Map,Ev=new Map,Dv=[],Ov=()=>Tv.size>0,kv=()=>{bv||=Mm(`data-react-grab-frozen-styles`,gv)},Av=e=>{let t=new Set;for(let n of e){let e=yv(n)?n:n.closest(`svg`);yv(e)&&t.add(e);for(let e of n.querySelectorAll(vv))yv(e)&&t.add(e)}return[...t]},jv=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},Mv=(e,t)=>{for(let n of e){let e=Ev.get(n)??0;if(e===0){Ev.set(n,1),t.push(n),jv(n,`pauseAnimations`);continue}Ev.set(n,e+1),t.push(n)}},Nv=(e,t)=>{let n=[];for(let r of e){let e=Ev.get(r);if(e){if(e===1){try{jv(r,`unpauseAnimations`),Ev.delete(r)}catch(e){n.push(r),t.push(e)}continue}Ev.set(r,e-1)}}return n},Pv=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},Fv=e=>{for(let t of e)try{t.finish()}catch{}},Iv=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},Lv=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;if(!Xn(t))return!1;let n=t.getRootNode();return la(n)&&Mp(n.host)},Rv=e=>{if(e.length===0||ev(e,Cv))return;zv();let t=[...e];kv(),xv=t,Sv=[];try{Mv(Av(xv),Sv);for(let e of xv)e.setAttribute(Fn,``);let e=Pv(xv);Dv=[];for(let t of e)t.pause(),Dv.push(t);Cv=t}catch(e){try{zv()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},zv=()=>{if(xv.length===0&&Sv.length===0&&Dv.length===0)return;let e=xv,t=Sv,n=Dv,r=[],i=[];Cv=[];for(let t of e)try{t.removeAttribute(Fn)}catch(e){i.push(t),r.push(e)}xv=i,Sv=Nv(t,r),Iv(n),Dv=[],Xm(r,`Unfreezing element animations failed`)},Bv=e=>e.length===0?(zv(),()=>{}):(Rv(e),zv),Vv=e=>{let t=[];for(let n of e.getAnimations())Lv(n)||n.playState===`running`&&t.push(n);return{targetDocument:e,runningAnimations:t}},Hv=e=>{let t=Tv.get(e);if(!t)return[];let n=[],r=t.styleElement;if(r){try{if(t.didUseCssFreeze){r.textContent=`
34
+ `,hv=`svg`,gv=e=>e?.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName===`svg`,_v=null,vv=[],yv=[],bv=[],xv=new Set,Sv=new Map,Cv=new Map,wv=[],Tv=()=>Sv.size>0,Ev=()=>{_v||=km(`data-react-grab-frozen-styles`,pv)},Dv=e=>{let t=new Set;for(let n of e){let e=gv(n)?n:n.closest(`svg`);gv(e)&&t.add(e);for(let e of n.querySelectorAll(hv))gv(e)&&t.add(e)}return[...t]},Ov=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},kv=(e,t)=>{for(let n of e){let e=Cv.get(n)??0;if(e===0){Cv.set(n,1),t.push(n),Ov(n,`pauseAnimations`);continue}Cv.set(n,e+1),t.push(n)}},Av=(e,t)=>{let n=[];for(let r of e){let e=Cv.get(r);if(e){if(e===1){try{Ov(r,`unpauseAnimations`),Cv.delete(r)}catch(e){n.push(r),t.push(e)}continue}Cv.set(r,e-1)}}return n},jv=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},Mv=e=>{for(let t of e)try{t.finish()}catch{}},Nv=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},Pv=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;if(!Un(t))return!1;let n=t.getRootNode();return aa(n)&&kp(n.host)},Fv=e=>{if(e.length===0||Z_(e,bv))return;Iv();let t=[...e];Ev(),vv=t,yv=[];try{kv(Dv(vv),yv);for(let e of vv)e.setAttribute(Dn,``);let e=jv(vv);wv=[];for(let t of e)t.pause(),wv.push(t);bv=t}catch(e){try{Iv()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},Iv=()=>{if(vv.length===0&&yv.length===0&&wv.length===0)return;let e=vv,t=yv,n=wv,r=[],i=[];bv=[];for(let t of e)try{t.removeAttribute(Dn)}catch(e){i.push(t),r.push(e)}vv=i,yv=Av(t,r),Nv(n),wv=[],qm(r,`Unfreezing element animations failed`)},Lv=e=>e.length===0?(Iv(),()=>{}):(Fv(e),Iv),Rv=e=>{let t=[];for(let n of e.getAnimations())Pv(n)||n.playState===`running`&&t.push(n);return{targetDocument:e,runningAnimations:t}},zv=e=>{let t=Sv.get(e);if(!t)return[];let n=[],r=t.styleElement;if(r){try{if(t.didUseCssFreeze){r.textContent=`
35
35
  *, *::before, *::after {
36
36
  transition: none !important;
37
37
  }
38
- `;let t=[];for(let n of e.getAnimations())Lv(n)||t.push(n);Fv(t)}else Iv(t.frozenWaapiAnimations);t.didUseCssFreeze=!1,t.frozenWaapiAnimations=[]}catch(e){n.push(e)}try{r.remove(),t.styleElement=null}catch(e){n.push(e)}}return t.frozenSvgElements=Nv(t.frozenSvgElements,n),t.styleElement===null&&t.frozenSvgElements.length===0&&t.frozenWaapiAnimations.length===0&&Tv.delete(e),n},Uv=e=>{if(Tv.has(e.targetDocument))return;let t=Mm(`data-react-grab-global-freeze`,``,e.targetDocument),n={styleElement:t,frozenSvgElements:[],frozenWaapiAnimations:[],didUseCssFreeze:!1};if(Tv.set(e.targetDocument,n),e.runningAnimations.length>200)t.textContent=_v,n.didUseCssFreeze=!0;else for(let t of e.runningAnimations)t.pause(),n.frozenWaapiAnimations.push(t);Mv(Av(Array.from(e.targetDocument.querySelectorAll(vv))),n.frozenSvgElements)},Wv=e=>{wv.add(e);try{Ov()&&Uv(Vv(e))}catch(t){wv.delete(e);let n=Hv(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{wv.delete(e),Xm(Hv(e),`Unfreezing frame animations failed`)}},Gv=()=>Ov()?[]:(wv.add(document),[...wv].map(Vv)),Kv=e=>{if(!Ov()){for(let t of e)Uv(t);pv()}},qv=()=>{if(!Ov())return;let e=[];for(let t of[...Tv.keys()])e.push(...Hv(t));try{mv()}catch(t){e.push(t)}Xm(e,`Unfreezing global animations failed`)}})),Yv,Xv,Zv=c((()=>{gp(),$n(),tr(),Fp(),Yv=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!Pp(n)&&(Qn(n)&&t.add(n),n.shadowRoot&&Yv(n.shadowRoot,t),er(n))){let e=hp(n);e&&Yv(e,t)}},Xv=()=>{let e=new Set;return Yv(document,e),[...e]}})),Qv,$v,ey,ty,ny,ry,iy,ay,oy,sy,cy,ly,uy,dy,fy,py,my,hy,gy,_y,vy,yy=c((()=>{lg(),gp(),eo(),xp(),Zv(),$n(),tr(),Fp(),co(),Ym(),Zm(),Qv=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],$v=[`focus`,`blur`,`focusin`,`focusout`],ey=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],ty=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],ny=new Map,ry=new Map,iy=new Set,ay=!1,oy=e=>{e.stopImmediatePropagation()},sy=e=>{e.preventDefault(),e.stopImmediatePropagation()},cy=e=>{for(let t of Qv)e.addEventListener(t,oy,!0);for(let t of $v)e.addEventListener(t,sy,!0)},ly=e=>{for(let t of Qv)e.removeEventListener(t,oy,!0);for(let t of $v)e.removeEventListener(t,sy,!0)},uy=e=>{iy.add(e);let t=Um(e);return ay&&cy(e),()=>{ay&&ly(e),iy.delete(e),t()}},dy=(e,t,n)=>{if(n?.has(e))return null;let r=getComputedStyle(e),i=new Map,a=new Map;for(let n of t){let t=r.getPropertyValue(n);t&&(i.set(n,t),a.set(n,{value:e.style.getPropertyValue(n),priority:e.style.getPropertyPriority(n)}))}return{element:e,frozenPropertyValues:i,originalPropertyValues:a}},fy=(e,t)=>{let n=[],r=bp(e,t);for(;r&&r!==document.documentElement&&!Pp(r);)Qn(r)&&n.push(r),r=$a(r);return n},py=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;){if(Qn(t)&&e.push(t),t.shadowRoot?.activeElement){t=t.shadowRoot.activeElement;continue}if(er(t)){t=hp(t)?.activeElement??null;continue}t=null}return e},my=(e,t)=>{for(let{element:n,frozenPropertyValues:r,originalPropertyValues:i}of e){t.set(n,i);for(let[e,t]of r)n.style.setProperty(e,t,`important`)}},hy=e=>{let t=[];for(let[n,r]of e){for(let[e,i]of r)try{i.value?n.style.setProperty(e,i.value,i.priority):n.style.removeProperty(e),r.delete(e)}catch(e){t.push(e)}r.size===0&&e.delete(n)}return t},gy=(e,t)=>{if(Hm())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?fy(e,t):Xv();for(let e of r){let t=dy(e,ey);t&&n.push(t)}let i=[];for(let e of py()){let t=dy(e,ty,ry);t&&i.push(t)}return{hoverStates:n,focusStates:i}},_y=e=>{if(e){ay=!0,iy.add(document);for(let e of iy)cy(e);my(e.hoverStates,ny),my(e.focusStates,ry),Wm()}},vy=()=>{cg(),ay=!1;for(let e of iy)ly(e);let e=[...hy(ny),...hy(ry)];try{Gm()}catch(t){e.push(t)}Xm(e,`Unfreezing pseudo states failed`)}})),by,xy,Sy,Cy=c((()=>{Jv(),yy(),ah(),Zm(),by=()=>{let e=[];try{ih()}catch(t){e.push(t)}try{vy()}catch(t){e.push(t)}try{qv()}catch(t){e.push(t)}return e},xy=(e,t)=>{let n=gy(e,t),r=Gv();try{_y(n),Kv(r),rh()}catch(e){let t=by();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},Sy=()=>{Xm(by(),`Unfreezing global interactions failed`)}})),wy,Ty,Ey,Dy,Oy,ky,Ay,jy,My,Ny,Py,Fy,Iy,Ly,Ry,zy,By,Vy,Hy,Uy,Wy,Gy,Ky,qy,Jy,Yy,Xy,Zy,Qy,$y,eb,tb,nb,rb,ib,ab,ob,sb,cb,lb,ub=c((()=>{Yi(),Ia(),t_(),co(),wy=!1,Ty=0,Ey=0,Dy=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},Oy=new WeakMap,ky=new WeakMap,Ay=new WeakMap,jy=new Set,My=[],Ny=[],Py=new WeakMap,Fy=new WeakMap,Iy=new WeakSet,Ly=new Set,Ry=new WeakMap,Bi({name:`react-grab-freeze-updates`,onCommitFiberRoot:(e,t)=>{let n=Ir().renderers.get(e);n&&Ry.set(t,n)}}),zy=e=>{try{let t=e.rendererPackageName;return typeof t==`string`&&t.startsWith(`react-dom`)}catch{return!1}},By=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},Vy=e=>{let t=e.current,n=t;for(;n;){let e=n.stateNode;if(e&&typeof e==`object`&&typeof Reflect.get(e,`nodeType`)==`number`)return e;if(n.child){n=n.child;continue}for(;n!==t&&!n.sibling;)if(n=n.return,!n)return null;if(n===t)return null;n=n.sibling}return null},Hy=e=>{let t=Ry.get(e);if(t)return zy(t)?t:null;let n=Array.from(Ir().renderers.values()).filter(zy);if(n.length===1){let t=n[0];return t&&Ry.set(e,t),t??null}let r=Vy(e);if(!r)return null;for(let t of n)try{let n=t.findFiberByHostInstance?.(r);if(n&&By(n)===e)return Ry.set(e,t),t}catch{}return null},Uy=e=>{let t=e.current?.stateNode;if(!t||typeof t!=`object`)return!1;let n=Reflect.get(t,`containerInfo`);return!!(n&&typeof n==`object`&&typeof Reflect.get(n,`nodeType`)==`number`)},Wy=()=>{if(wi.size>0){let e=new Set;for(let t of wi)Uy(t)&&e.add(t);return e}let e=new Set,t=n=>{let r=qi(n);if(r){let t=By(r);t&&e.add(t);return}for(let r of Array.from(n.children))if(t(r),e.size>0)return};return t(document.body),e},Gy=(e,t)=>{if(!e)return t;if(!t)return e;if(!e.next||!t.next)return t;let n=e.next,r=t.next,i=e===n,a=t===r;return i&&a?(e.next=t,t.next=e):i?(e.next=r,t.next=e):a?(t.next=n,e.next=t):(e.next=r,t.next=n),t},Ky=e=>{if(!e||Py.has(e))return;let t={originalPendingDescriptor:Object.getOwnPropertyDescriptor(e,`pending`),pendingValueAtPause:e.pending,bufferedPending:null};typeof e.getSnapshot==`function`&&(t.originalGetSnapshot=e.getSnapshot,t.snapshotValueAtPause=e.getSnapshot(),e.getSnapshot=()=>wy?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>wy?null:n,set:e=>{if(wy){e!==null&&(t.bufferedPending=Gy(t.bufferedPending??null,e));return}n=e}}),Py.set(e,t)},qy=e=>{if(!e)return[];let t=[],n=e.next;if(!n)return[];let r=n;do r&&=(t.push(r.action),r.next);while(r&&r!==n);return t},Jy=e=>{let t=Py.get(e);if(!t)return;t.originalGetSnapshot&&(e.getSnapshot=t.originalGetSnapshot),t.originalPendingDescriptor?Object.defineProperty(e,`pending`,t.originalPendingDescriptor):delete e.pending,e.pending=null;let n=e.dispatch;if(typeof n==`function`){let e=qy(t.pendingValueAtPause??null),r=qy(t.bufferedPending??null);for(let t of[...e,...r])Ny.push(()=>n(t))}Py.delete(e)},Yy=e=>{if(Fy.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return wy?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(wy){t.pendingValue=e,t.didReceivePendingValue=!0;return}t.originalDescriptor?.set?t.originalDescriptor.set.call(this,e):this._memoizedValue=e}}),t.originalDescriptor?.get||(e._memoizedValue=t.frozenValue),Fy.set(e,t)},Xy=e=>{let t=Fy.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),Fy.delete(e))},Zy=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Ky(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Yy(n),n=n.next},Qy=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Jy(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Xy(n),n=n.next},$y=e=>{let t=e;for(;t;){if(hi(t)&&Zy(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},eb=e=>{let t=e;for(;t;){if(hi(t)&&Qy(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},tb=e=>{if(Oy.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};Oy.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!wy||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Dy(ky,a,()=>(...e)=>{wy?Ny.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!wy||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Dy(ky,a,()=>(...e)=>{wy?Ny.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!wy||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Dy(Ay,a,()=>e=>{wy?My.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>wy?n.useSyncExternalStore(t=>e(()=>{wy?jy.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},nb=e=>{let t=e.currentDispatcherRef;if(!t||typeof t!=`object`)return;let n=`H`in t?`H`:`current`,r=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get:()=>(r&&typeof r==`object`&&tb(r),r),set:e=>{r=e}})},rb=(e,t)=>{queueMicrotask(()=>{if(!(wy||Ey!==t))try{for(let t of e){let e=Hy(t);if(t.current&&e?.scheduleUpdate)try{e.scheduleUpdate(t.current)}catch(e){Q(new wa(`scheduleUpdate failed during unfreeze`,e))}}}catch(e){Q(new wa(`scheduleReactUpdate failed`,e))}})},ib=e=>{for(let t of e)try{t()}catch(e){Q(new wa(`Callback failed during state replay`,e))}},ab=()=>{for(let e of Ir().renderers.values())zy(e)&&(Iy.has(e)||(nb(e),Iy.add(e)))},ob=()=>{jy.clear(),My.length=0,Ny.length=0},sb=()=>{let e=Ey,t=new Set(Ly);try{for(let e of Wy())t.add(e)}catch(e){Q(new wa(`Collecting fiber roots failed during unfreeze`,e))}Ly.clear(),wy=!1;for(let e of t)try{eb(e.current)}catch(e){Q(new wa(`Resuming a fiber root failed during unfreeze`,e))}let n=Array.from(jy),r=My.slice(),i=Ny.slice();ob(),ib(n),ib(r),ib(i),!wy&&Ey===e&&rb(t,e)},cb=()=>{let e=Ty===0;if(Ty+=1,e)try{ab(),Ey+=1,wy=!0;let e=Wy();for(let t of e)Ly.add(t),$y(t.current)}catch(e){throw--Ty,wy&&sb(),e}let t=!1;return()=>{t||(t=!0,--Ty,Ty===0&&sb())}},lb=()=>{try{return cb()}catch(e){return Q(new wa(`Pausing React updates failed`,e)),()=>{}}}}));Cy(),ub();let db=e=>{let t=e.left+e.width/2,n=e.top+e.height/2,r=n,i=window.innerHeight-n,a=t,o=window.innerWidth-t,s=Math.min(r,i,a,o);return s===r?`top`:s===a?`left`:s===o?`right`:`bottom`};var fb,pb,mb,hb=c((()=>{fb=e=>e.key===`Enter`,pb=e=>e.metaKey||e.ctrlKey,mb=(e,t,n={})=>{if(!t.key)return null;if(fb(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return pb(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null}}));hb();let gb=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}};z(),sa();let _b=()=>{let[e,t]=h(!1),[n,r]=h(null),i=gb(),a=()=>{let e=n();return X(e)?e:null},o=()=>{r(null),i.clear(),t(!1)};return{selectedElement:a,isPendingDismiss:e,select:(e,n)=>{r(e),t(!1),n?.shouldPromptBeforeMouseHandoff?i.arm():i.clear()},clear:o,consumeMouseHandoff:()=>i.consume()&&a()!==null,showDismissPrompt:()=>a()?e()?!1:(t(!0),!0):(o(),!1),takeSelection:e=>{let t=a()??(X(e)?e:null);return o(),t}}};var vb,yb,bb=c((()=>{Ia(),t_(),vb=e=>e??!0,yb=(e,t)=>{if(typeof e.enabled==`function`){if(!t)return!1;try{return e.enabled(t)}catch(t){return Q(new ja(e.id,t)),!1}}return vb(e.enabled)}})),xb,Sb=c((()=>{Ia(),bb(),t_(),xb=(e,t)=>{if(!yb(e,t))return!1;try{let n=e.onAction(t);n&&n.catch(t=>{Q(new Aa(e.id,t))})}catch(t){Q(new Aa(e.id,t))}return!0}}));Sb(),Ia(),t_();let Cb=e=>{Q(new wa(`Toolbar state change subscriber failed`,e))},wb=(e,t)=>{for(let n of e)try{Promise.resolve(n(t)).catch(Cb)}catch(e){Cb(e)}},$=(e,t)=>{try{e()}catch(e){t.push(e)}};J(),gp(),Zn(),tr(),Fp(),Zm();let Tb=e=>{let t=new Map,n=new Map,r=new Map,i=new Map,a=(e,a)=>{let c=r.get(e);c&&(r.delete(e),$(()=>c.disconnect(),a));for(let t of[...r.keys()])`host`in t&&t.ownerDocument===e&&o(t,a);for(let t of[...i.keys()])t.ownerDocument===e&&s(t,a);let l=n.get(e);n.delete(e),l&&$(l,a);let u=t.get(e);t.delete(e),u&&$(u,a)},o=(e,t)=>{let n=r.get(e);if(n){r.delete(e),$(()=>n.disconnect(),t);for(let n of e.querySelectorAll(`*`))c(n,t)}},s=(e,t)=>{let n=i.get(e);n&&(i.delete(e),$(()=>n.abortController.abort(),t),$(()=>e.removeAttribute(In),t),n.document&&a(n.document,t))},c=(e,t)=>{er(e)&&s(e,t),e.shadowRoot&&o(e.shadowRoot,t)},l=(e,t)=>{for(let n of e.querySelectorAll(`*`))c(n,t);c(e,t)},u=n=>{t.has(n)||(t.set(n,e(n)),d(n),h(n))},d=e=>{let r=e.defaultView?.Element.prototype;if(!r)return;let i=r.attachShadow,a=new Proxy(i,{apply:(n,r,i)=>{let a=Reflect.apply(n,r,i);return a.mode===`open`&&r.isConnected&&t.has(e)&&h(a),a}});r.attachShadow=a,n.set(e,()=>{r.attachShadow===a&&(r.attachShadow=i)})},f=e=>{if(i.has(e))return;let t={abortController:new AbortController,document:null};i.set(e,t);let n=()=>{let n=[],r=hp(e);if(t.document&&t.document!==r&&a(t.document,n),t.document=r,!r){e.removeAttribute(In),Xm(n,`Cleaning up replaced frame document failed`);return}e.setAttribute(In,``),u(r),Xm(n,`Cleaning up replaced frame document failed`)};e.addEventListener(`load`,n,{signal:t.abortController.signal}),n()},p=e=>{Pp(e)||(er(e)&&f(e),e.shadowRoot&&h(e.shadowRoot))},m=e=>{if(p(e),!Pp(e))for(let t of e.querySelectorAll(`*`))p(t)},h=e=>{if(r.has(e))return;let t=`defaultView`in e?e.defaultView:e.ownerDocument.defaultView;if(!t)return;let n=new t.MutationObserver(e=>{let t=[];for(let n of e){for(let e of n.removedNodes)Xn(e)&&l(e,t);for(let e of n.addedNodes)Xn(e)&&m(e)}Xm(t,`Cleaning up removed frame documents failed`)});r.set(e,n),n.observe(e,{childList:!0,subtree:!0});for(let t of e.querySelectorAll(`*`))p(t)};return u(document),()=>{let e=[];for(let t of[...i.keys()])s(t,e);for(let[t,n]of r)r.delete(t),$(()=>n.disconnect(),e);for(let[t,r]of n)n.delete(t),$(r,e);for(let[n,r]of t)t.delete(n),r&&$(r,e);Xm(e,`Cleaning up same-origin frame documents failed`)}};dr(),Jv(),yy(),Zm();let Eb=(e,t)=>{window.dispatchEvent(t),t.defaultPrevented&&(e.preventDefault(),e.stopImmediatePropagation())},Db=(e,t,n)=>({bubbles:!0,cancelable:!0,composed:!0,clientX:t,clientY:n,screenX:e.screenX,screenY:e.screenY,button:e.button,buttons:e.buttons,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}),Ob=e=>{let t=ur(e.view,e.clientX,e.clientY);Eb(e,new PointerEvent(e.type,{...Db(e,t.x,t.y),pointerId:e.pointerId,pointerType:e.pointerType,isPrimary:e.isPrimary,pressure:e.pressure,tangentialPressure:e.tangentialPressure,tiltX:e.tiltX,tiltY:e.tiltY,twist:e.twist,width:e.width,height:e.height}))},kb=e=>{let t=ur(e.view,e.clientX,e.clientY);Eb(e,new MouseEvent(e.type,Db(e,t.x,t.y)))},Ab=e=>{Eb(e,new KeyboardEvent(e.type,{bubbles:!0,cancelable:!0,composed:!0,key:e.key,code:e.code,location:e.location,repeat:e.repeat,isComposing:e.isComposing,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}))},jb=e=>Tb(t=>{if(t===document)return;let n=t.defaultView;if(!n)return;let r=new AbortController,i=Wv(t),a=uy(t),o={capture:!0,signal:r.signal},s=t=>{e.shouldForwardInteraction()&&Ob(t)},c=t=>{e.shouldForwardInteraction()&&kb(t)},l=t=>{(e.shouldForwardInteraction()||e.shouldForwardKeyboardEvent(t))&&Ab(t)},u=n=>{e.shouldForwardInteraction()&&e.shouldForwardViewportEvent(t)&&window.dispatchEvent(new Event(n.type))};return n.addEventListener(`pointermove`,s,o),n.addEventListener(`pointerdown`,s,o),n.addEventListener(`pointerup`,s,o),n.addEventListener(`pointercancel`,s,o),n.addEventListener(`contextmenu`,c,o),n.addEventListener(`click`,c,o),n.addEventListener(`keydown`,l,o),n.addEventListener(`keyup`,l,o),n.addEventListener(`keypress`,l,o),n.addEventListener(`scroll`,u,o),n.addEventListener(`resize`,u,o),()=>{r.abort();let e=[];for(let t of[i,a])try{t()}catch(t){e.push(t)}Xm(e,`Cleaning up frame event forwarding failed`)}});lr();let Mb=(e,t)=>{let n=t.ownerDocument;for(;n;){if(n===e)return!0;n=cr(n.defaultView)?.ownerDocument??null}return!1};Ia(),t_();let Nb=null,Pb=new Map,Fb=()=>typeof window>`u`?Nb:window.__REACT_GRAB__??Nb??null,Ib=e=>{if(Nb=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__),e)for(let[t,n]of Pb){Pb.delete(t);try{e.registerPlugin(n)}catch(e){Q(e instanceof ka?e:new ka(t,e))}}},Lb=e=>{Nb===e&&(Nb=null),typeof window<`u`&&window.__REACT_GRAB__===e&&delete window.__REACT_GRAB__},Rb=e=>{let t=Fb();if(t){t.registerPlugin(e);return}Pb.set(e.name,e)},zb=e=>{let t=Fb();if(t){t.unregisterPlugin(e);return}Pb.delete(e)},Bb=async(e,t={})=>(await Promise.allSettled(e.map(e=>nf(e,t)))).map(e=>e.status===`fulfilled`?e.value:``);var Vb,Hb=c((()=>{Vb=(e,t,n)=>e+(t-e)*n})),Ub,Wb=c((()=>{J(),Ub=(e,t)=>{let n=Math.max(t,1);return 1-(1-e)**(n/xn)}})),Gb,Kb,qb,Jb,Yb=c((()=>{z(),Hb(),J(),hf(),en(),Wb(),Gb=B(`<canvas data-react-grab-overlay-canvas style=position:fixed;top:0;left:0;pointer-events:none>`),Kb={borderColor:Tn,fillColor:En,lerpFactor:K},qb={drag:{borderColor:Cn,fillColor:wn,lerpFactor:bn},selection:Kb,grabbed:Kb},Jb=e=>{let t,n=null,r=0,i=0,a=1,o=null,s=null,c=null,l=[],u=null,d=[],f=$t()?`display-p3`:`srgb`,p=()=>{t&&(a=Math.max(window.devicePixelRatio||1,2),r=document.documentElement.clientWidth||window.innerWidth,i=document.documentElement.clientHeight||window.innerHeight,t.width=r*a,t.height=i*a,t.style.width=`${r}px`,t.style.height=`${i}px`,n=t.getContext(`2d`,{colorSpace:f}),n&&n.scale(a,a))},m=e=>{if(!e)return 0;let t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):0},h=(e,t,n)=>({id:e,current:{x:t.x,y:t.y,width:t.width,height:t.height},target:{x:t.x,y:t.y,width:t.width,height:t.height},borderRadius:m(t.borderRadius),opacity:n?.opacity??1,targetOpacity:n?.targetOpacity??n?.opacity??1,createdAt:n?.createdAt,fadeStartTimestamp:null,isInitialized:!0}),g=(e,t,n)=>{let r=e.target;r.x=t.x,r.y=t.y,r.width=t.width,r.height=t.height,e.borderRadius=m(t.borderRadius),n!==void 0&&(n>e.targetOpacity&&(e.opacity=n),e.targetOpacity=n)},y=e=>e.boundsMultiple??[e.bounds],b=(e,t,n,r,i,a,o,s,c=1)=>{if(r<=0||i<=0)return;let l=Math.min(r/2,i/2),u=Math.min(a,l),d=c!==1;d&&(e.globalAlpha=c),e.beginPath(),u>0?e.roundRect(t,n,r,i,u):e.rect(t,n,r,i),e.fillStyle=o,e.fill(),e.strokeStyle=s,e.lineWidth=1,e.stroke(),d&&(e.globalAlpha=1)},ee=()=>{if(!n||!e.dragVisible||!u)return;let t=qb.drag;b(n,u.current.x,u.current.y,u.current.width,u.current.height,u.borderRadius,t.fillColor,t.borderColor)},x=()=>{if(!n||!e.selectionVisible)return;let t=qb.selection;for(let e of l)b(n,e.current.x,e.current.y,e.current.width,e.current.height,e.borderRadius,t.fillColor,t.borderColor,e.opacity)},S=e=>{if(!n)return;let t=qb.grabbed;for(let r of e)b(n,r.current.x,r.current.y,r.current.width,r.current.height,r.borderRadius,t.fillColor,t.borderColor,r.opacity)},T=()=>{!n||!t||r<=0||i<=0||(n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.width,t.height),n.setTransform(a,0,0,a,0,0),ee(),x(),S(d))},E=(e,t,n)=>{let r=Vb(e.current.x,e.target.x,t),i=Vb(e.current.y,e.target.y,t),a=Vb(e.current.width,e.target.width,t),o=Vb(e.current.height,e.target.height,t),s=Math.abs(r-e.target.x)<.5&&Math.abs(i-e.target.y)<.5&&Math.abs(a-e.target.width)<.5&&Math.abs(o-e.target.height)<.5;e.current.x=s?e.target.x:r,e.current.y=s?e.target.y:i,e.current.width=s?e.target.width:a,e.current.height=s?e.target.height:o;let c=!0;if(n?.interpolateOpacity){let n=Vb(e.opacity,e.targetOpacity,t);c=Math.abs(n-e.targetOpacity)<Sn,e.opacity=c?e.targetOpacity:n}return!s||!c},D=()=>{let e=performance.now(),t=c===null?xn:e-c;c=e;let n=Ub(qb.drag.lerpFactor,t),r=Ub(qb.selection.lerpFactor,t),i=Ub(qb.grabbed.lerpFactor,t),a=!1,f=null;u?.isInitialized&&E(u,n)&&(a=!0);for(let e of l)e.isInitialized&&E(e,r)&&(a=!0);let p=Date.now();d=d.filter(t=>{let n=t.id.startsWith(`label-`);if(t.isInitialized&&E(t,i)&&(a=!0),n&&t.targetOpacity===0){t.fadeStartTimestamp===null&&(t.fadeStartTimestamp=e);let n=e-t.fadeStartTimestamp,r=Math.min(1,n/125),i=1-(1-r)*(1-r);return t.opacity=Math.max(0,1-i),r>=1?!1:(a=!0,!0)}else n&&(t.fadeStartTimestamp=null);if(t.createdAt!==void 0){let e=p-t.createdAt;if(e>=1625)return!1;if(e>1500){let n=Math.min(1,(e-dn)/125);t.opacity=1-(1-(1-n)*(1-n)),a=!0}else{let t=dn-e;f=f===null?t:Math.min(f,t)}return!0}return n?!0:t.opacity>0}),T(),a?o=ff(D):(o=null,c=null,f!==null&&(s=window.setTimeout(()=>{s=null,O()},Math.max(0,f))))},O=()=>{s!==null&&(window.clearTimeout(s),s=null),o===null&&(o=ff(D))},ne=()=>{p(),O()};return v(C(()=>[e.selectionVisible,e.selectionBounds,e.selectionBoundsMultiple,e.selectionShouldSnap],([e,t,n,r])=>{if(!e||!t&&(!n||n.length===0)){l=[],O();return}let i;i=n&&n.length>0?n:t?[t]:[];let a=new Map;for(let e of l)a.set(e.id,e);l=i.map((e,t)=>{let n=`selection-${t}`,i=a.get(n);return i?(g(i,e),r&&(i.current.x=i.target.x,i.current.y=i.target.y,i.current.width=i.target.width,i.current.height=i.target.height),i):h(n,e)}),O()})),v(C(()=>[e.dragVisible,e.dragBounds],([e,t])=>{if(!e||!t){u=null,O();return}u?g(u,t):u=h(`drag`,t),O()})),v(C(()=>[e.grabbedBoxes,e.labelInstances],([e,t])=>{let n=e??[],r=t??[],i=new Map;for(let e of n)i.set(e.id,e);let a=new Map;for(let e of d)a.set(e.id,e);for(let e of n)if(!a.has(e.id)){let t=h(e.id,e.bounds,{createdAt:e.createdAt});d.push(t),a.set(e.id,t)}for(let e of d){let t=i.get(e.id);t&&g(e,t.bounds)}let o=new Set;for(let e of r){let t=y(e),n=e.status===`fading`?0:1;for(let r=0;r<t.length;r++){let i=t[r],s=`label-${e.id}-${r}`;o.add(s);let c=a.get(s);if(c)g(c,i,n);else{let e=h(s,i,{opacity:1,targetOpacity:n});d.push(e),a.set(s,e)}}}d=d.filter(e=>e.id.startsWith(`label-`)?o.has(e.id):i.has(e.id)),O()})),te(()=>{p(),O(),window.addEventListener(`resize`,ne);let e=null,t=()=>{Math.max(window.devicePixelRatio||1,2)!==a&&(ne(),n())},n=()=>{e&&e.removeEventListener(`change`,t),e=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),e.addEventListener(`change`,t)};n(),w(()=>{window.removeEventListener(`resize`,ne),e&&e.removeEventListener(`change`,t),o!==null&&pf(o),s!==null&&window.clearTimeout(s)})}),(()=>{var e=Gb(),n=t;return typeof n==`function`?ct(n,e):t=e,_(t=>U(e,`z-index`,String(vn))),e})()}})),Xb,Zb,Qb=c((()=>{G(),z(),J(),co(),Xb=B(`<div style=position:fixed;pointer-events:none;will-change:opacity;contain:strict;transform:translateZ(0)>`),Zb=e=>{let t=ao(),n=t?getComputedStyle(t).borderRadius:`0px`,r=()=>t?.getBoundingClientRect()??null,[i,a]=h(r());if(t){let n=()=>a(r());te(()=>{let e=new ResizeObserver(n);e.observe(t),window.addEventListener(`scroll`,n,{capture:!0,passive:!0}),window.addEventListener(`resize`,n),w(()=>{e.disconnect(),window.removeEventListener(`scroll`,n,{capture:!0}),window.removeEventListener(`resize`,n)})}),v(()=>{e.visible&&n()})}let o=()=>{let e=i();return e?`${e.top}px`:`0`},s=()=>{let e=i();return e?`${e.left}px`:`0`},c=()=>{let e=i();return e?`${e.width}px`:`100%`},l=()=>{let e=i();return e?`${e.height}px`:`100%`};return(()=>{var t=Xb();return U(t,`border-radius`,n),U(t,`z-index`,vn),U(t,`transition`,`opacity 125ms ease-out`),U(t,`box-shadow`,`inset 0 0 50px ${Dn}`),_(n=>{var r=o(),i=s(),a=c(),u=l(),d=+!!e.visible;return r!==n.e&&U(t,`top`,n.e=r),i!==n.t&&U(t,`left`,n.t=i),a!==n.a&&U(t,`width`,n.a=a),u!==n.o&&U(t,`height`,n.o=u),d!==n.i&&U(t,`opacity`,n.i=d),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t})()}})),$b,ex=c((()=>{$b=(e,t)=>{e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,t)}px`}})),tx,nx=c((()=>{co(),tx=(e,t)=>{e&&e.focus(t)}})),rx,ix=c((()=>{J(),rx=e=>{if(e<=0)return 8;let t=e*On;return Math.round(Math.max(4,Math.min(8,t)))}})),ax,ox=c((()=>{J(),ax=e=>e.isComposing||e.keyCode===229})),sx,cx,lx=c((()=>{sx=e=>{if(typeof e==`string`||typeof e==`number`)return String(e);if(!e||typeof e!=`object`)return``;if(Array.isArray(e)){let t=``;for(let n of e){if(!n)continue;let e=sx(n);e&&(t=t?`${t} ${e}`:e)}return t}let t=``;for(let n in e)e[n]&&(t=t?`${t} ${n}`:n);return t},cx=(...e)=>{let t=``;for(let n of e){if(!n)continue;let e=sx(n);e&&(t=t?`${t} ${e}`:e)}return t}})),ux,dx=c((()=>{ux=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}})),fx,px,mx=c((()=>{G(),fx=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M19.2929 12.7071C19.6834 13.0976 20.3166 13.0976 20.7071 12.7071C21.0976 12.3166 21.0976 11.6834 20.7071 11.2929L12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3C11.7348 3 11.4804 3.10536 11.2929 3.29289L3.29289 11.2929C2.90237 11.6834 2.90237 12.3166 3.29289 12.7071C3.68342 13.0976 4.31658 13.0976 4.70711 12.7071L11 6.41421L11 20C11 20.5523 11.4477 21 12 21C12.5523 21 13 20.5523 13 20L13 6.41422L19.2929 12.7071Z">`),px=e=>{let t=()=>e.size??10;return(()=>{var n=fx();return _(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),hx,gx,_x=c((()=>{G(),hx=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>`),gx=e=>{let t=()=>e.size??16;return(()=>{var n=hx();return n.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling,_(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),vx,yx,bx=c((()=>{G(),J(),ix(),vx=B(`<svg data-react-grab-arrow class="absolute block z-10"><path>`),yx=e=>{let t=()=>e.position===`bottom`,n=()=>rx(e.labelWidth??0),r=()=>n()*2,i=()=>n(),a=()=>{let e=r(),n=i(),a=1*Math.SQRT1_2,o=e/2,s=t()?n:0,c=t()?a:n-a,l=+!!t();return`M0 ${s} L${o-a} ${c} A1 1 0 0 ${l} ${o+a} ${c} L${e} ${s} Z`};return(()=>{var n=vx(),o=n.firstChild;return V(o,`fill`,cn),_(s=>{var c=r(),l=i(),u=`0 0 ${r()} ${i()}`,d=`calc(${e.leftPercent}% + ${e.leftOffsetPx}px)`,f=t()?`0`:void 0,p=t()?void 0:`0`,m=t()?`translateX(-50%) translateY(calc(-100% + 1px))`:`translateX(-50%) translateY(calc(100% - 1px))`,h=a();return c!==s.e&&V(n,`width`,s.e=c),l!==s.t&&V(n,`height`,s.t=l),u!==s.a&&V(n,`viewBox`,s.a=u),d!==s.o&&U(n,`left`,s.o=d),f!==s.i&&U(n,`top`,s.i=f),p!==s.n&&U(n,`bottom`,s.n=p),m!==s.s&&U(n,`transform`,s.s=m),h!==s.h&&V(o,`d`,s.h=h),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),n})()}})),xx,Sx,Cx,wx,Tx,Ex,Dx,Ox=c((()=>{G(),z(),lx(),xx=B(`<span> `),Sx=B(`<span class=text-[var(--rg-text-secondary)]> `),Cx=B(`<span class=text-[var(--rg-text-primary)]> `),wx=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0">`),Tx=B(`<button type=button>`),Ex=B(`<div>`),Dx=e=>{let t=()=>{e.onHoverChange?.(!0)},n=()=>{e.onHoverChange?.(!1)},r=()=>e.componentName?`${e.componentName}.${e.tagName}`:e.tagName,i=()=>(()=>{var t=wx();return W(t,A(M,{get when(){return e.componentName},get children(){return[(()=>{var t=xx(),n=t.firstChild;return _(()=>n.data=e.componentName),t})(),(()=>{var t=Sx(),n=t.firstChild;return _(()=>n.data=`.${e.tagName}`),t})()]}}),null),W(t,A(M,{get when(){return!e.componentName},get children(){var t=Cx(),n=t.firstChild;return _(()=>n.data=e.tagName),t}}),null),t})();return A(M,{get when(){return e.isClickable},get fallback(){return(()=>{var r=Ex();return H(r,`click`,e.onClick,!0),r.addEventListener(`mouseleave`,n),r.addEventListener(`mouseenter`,t),W(r,i),_(()=>it(r,cx(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden`,e.shrink&&`shrink-0`))),r})()},get children(){var a=Tx();return H(a,`click`,e.onClick,!0),a.addEventListener(`mouseleave`,n),a.addEventListener(`mouseenter`,t),W(a,i),_(t=>{var n=`Open source for ${r()}`,i=cx(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden cursor-pointer bg-transparent border-none p-0 m-0 text-left`,e.shrink&&`shrink-0`);return n!==t.e&&V(a,`aria-label`,t.e=n),i!==t.t&&it(a,t.t=i),t},{e:void 0,t:void 0}),a}})},tt([`click`])})),kx,Ax,jx=c((()=>{G(),kx=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-[var(--rg-border-subtle)] antialiased">`),Ax=e=>(()=>{var t=kx();return W(t,()=>e.children),t})()})),Mx,Nx=c((()=>{lx(),Mx=(e,t={})=>(n={})=>{let r=t.variants;if(!r)return e;let i=[e];for(let e in r){let a=n[e]??t.defaultVariants?.[e];if(a===void 0)continue;let o=r[e][String(a)];o&&i.push(o)}return cx(...i)}})),Px,Fx,Ix,Lx=c((()=>{G(),z(),lx(),Nx(),Px=B(`<div>`),Fx=Mx(`contain-layout antialiased [font-synthesis:none] bg-[var(--rg-panel-bg)]`,{variants:{shape:{panel:`rounded-[14px] [corner-shape:superellipse(1.25)]`,pill:`rounded-full`}},defaultVariants:{shape:`panel`}}),Ix=e=>{let[t,n]=ke(e,[`shape`,`class`]);return(()=>{var e=Px();return st(e,Oe({get class(){return cx(Fx({shape:t.shape}),t.class)}},n),!1,!1),e})()}})),Rx,zx,Bx=c((()=>{Rx=null,zx={claim:e=>{Rx=e},release:e=>{Rx===e&&(Rx=null)},isActive:e=>Rx===e}})),Vx,Hx=c((()=>{z(),Bx(),co(),Vx=e=>{let t=Symbol(),n=so(n=>{zx.isActive(t)&&(Va(n)||(n.code===`Enter`?e.onEnter?.(n):n.code===`Escape`&&e.onEscape?.(n)))});return te(()=>{zx.claim(t),window.addEventListener(`keydown`,n,{capture:!0})}),w(()=>{zx.release(t),window.removeEventListener(`keydown`,n,{capture:!0})}),{claimFocus:()=>zx.claim(t)}}})),Ux,Wx,Gx=c((()=>{G(),Ux=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M10.7071 21.2071C10.3166 21.5976 9.68342 21.5976 9.29289 21.2071L3.29289 15.2071C2.90237 14.8166 2.90237 14.1834 3.29289 13.7929L9.29289 7.79289C9.68342 7.40237 10.3166 7.40237 10.7071 7.79289C11.0976 8.18342 11.0976 8.81658 10.7071 9.20711L6.41421 13.5H16C16.5523 13.5 17 13.0523 17 12.5V3.5C17 2.94772 17.4477 2.5 18 2.5C18.5523 2.5 19 2.94772 19 3.5V12.5C19 14.1569 17.6569 15.5 16 15.5H6.41421L10.7071 19.7929C11.0976 20.1834 11.0976 20.8166 10.7071 21.2071Z">`),Wx=e=>{let t=()=>e.size??10;return(()=>{var n=Ux();return _(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),Kx,qx,Jx,Yx=c((()=>{G(),z(),lx(),Nx(),Kx=B(`<button>`),qx=Mx(`contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all press-scale`,{variants:{variant:{chip:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-surface-hover)] [border-width:0.5px] border-solid border-[var(--rg-border-button)] hover:bg-[var(--rg-surface-active)] text-[var(--rg-text-primary)]`,destructive:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-error-bg)] hover:bg-[var(--rg-error-bg-hover)] text-[var(--rg-error-text)]`,ghost:`rounded-sm bg-transparent hover:bg-[var(--rg-surface-hover)] border-none outline-none p-0`}},defaultVariants:{variant:`chip`}}),Jx=e=>{let[t,n]=ke(e,[`variant`,`class`,`type`]);return(()=>{var e=Kx();return st(e,Oe({get type(){return t.type??`button`},get class(){return cx(qx({variant:t.variant}),t.class)}},n),!1,!1),e})()}})),Xx,Zx,Qx,$x,eS,tS,nS=c((()=>{G(),z(),Hx(),Gx(),Yx(),jx(),Xx=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">No`),Zx=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Copy`),Qx=B(`<span class="text-[var(--rg-error-text)] text-[13px] leading-3.5 font-sans font-medium">Yes`),$x=B(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),eS=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-[var(--rg-text-primary)] text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit"> `),tS=e=>{let t=()=>e.showCancel??!0,{claimFocus:n}=Vx({onEnter:t=>{t.preventDefault(),t.stopPropagation();let n=t.composedPath()[0],r=n instanceof HTMLElement?n:null;if(r?.closest(`[data-react-grab-discard-copy]`)){e.onCopy?.();return}if(r?.closest(`[data-react-grab-discard-no]`)){e.onCancel?.();return}e.onConfirm?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.cancelOnEscape?e.onCancel?.():e.onConfirm?.()}});return(()=>{var r=eS(),i=r.firstChild.firstChild.firstChild;return H(r,`click`,n,!0),H(r,`pointerdown`,n,!0),W(r,A(Ax,{get children(){var n=$x();return W(n,A(M,{get when(){return t()},get children(){return A(Jx,{"data-react-grab-discard-no":!0,get onClick(){return e.onCancel},get children(){return Xx()}})}}),null),W(n,A(M,{get when(){return e.onCopy},get children(){return A(Jx,{"data-react-grab-discard-copy":!0,get onClick(){return e.onCopy},get children(){return Zx()}})}}),null),W(n,A(Jx,{variant:`destructive`,class:`gap-0.5`,"data-react-grab-discard-yes":!0,get onClick(){return e.onConfirm},get children(){return[Qx(),A(Wx,{size:10,class:`text-[var(--rg-error-text)] opacity-50`})]}}),null),n}}),null),_(()=>i.data=e.label??`Discard?`),r})()},tt([`pointerdown`,`click`])})),rS,iS,aS=c((()=>{G(),rS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7 2C4.23858 2 2 4.23858 2 7V15C2 17.7614 4.23858 20 7 20H8C8.55228 20 9 19.5523 9 19C9 18.4477 8.55228 18 8 18H7C5.34315 18 4 16.6569 4 15V7C4 5.34315 5.34315 4 7 4H17C18.6569 4 20 5.34315 20 7V15C20 16.6569 18.6569 18 17 18H14.4142L16.2071 16.2071C16.5976 15.8166 16.5976 15.1834 16.2071 14.7929C15.8166 14.4024 15.1834 14.4024 14.7929 14.7929L11.2929 18.2929C11.197 18.3888 11.1247 18.4993 11.0759 18.6172C11.027 18.7351 11 18.8644 11 19C11 19.2728 11.1093 19.5201 11.2864 19.7005C11.2889 19.7031 11.2914 19.7056 11.2939 19.7081L14.7929 23.2071C15.1834 23.5976 15.8166 23.5976 16.2071 23.2071C16.5976 22.8166 16.5976 22.1834 16.2071 21.7929L14.4142 20H17C19.7614 20 22 17.7614 22 15V7C22 4.23858 19.7614 2 17 2H7Z">`),iS=e=>{let t=()=>e.size??12;return(()=>{var n=rS();return _(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),oS,sS,cS,lS,uS,dS=c((()=>{G(),z(),Hx(),aS(),Yx(),jx(),oS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Retry`),sS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Ok`),cS=B(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),lS=B(`<div data-react-grab-error role=alert aria-live=assertive 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-[var(--rg-error-text)] text-[13px] leading-4 font-sans font-medium overflow-hidden line-clamp-5"> `),uS=e=>{let{claimFocus:t}=Vx({onEnter:t=>{if(Zg(t,`data-react-grab-error-ok`)){t.preventDefault(),t.stopPropagation(),e.onAcknowledge?.();return}t.preventDefault(),t.stopPropagation(),e.onRetry?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onAcknowledge?.()}}),n=()=>!!(e.onRetry||e.onAcknowledge);return(()=>{var r=lS(),i=r.firstChild,a=i.firstChild,o=a.firstChild;return H(r,`click`,t,!0),H(r,`pointerdown`,t,!0),W(r,A(M,{get when(){return n()},get children(){return A(Ax,{get children(){var t=cS();return W(t,A(M,{get when(){return e.onRetry},get children(){return A(Jx,{"data-react-grab-retry":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,get onClick(){return e.onRetry},get children(){return[oS(),A(iS,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-text-secondary)]`})]}})}}),null),W(t,A(M,{get when(){return e.onAcknowledge},get children(){return A(Jx,{"data-react-grab-error-ok":!0,class:`gap-1`,"aria-keyshortcuts":`Escape`,get onClick(){return e.onAcknowledge},get children(){return sS()}})}}),null),t}})}}),null),_(t=>{var r={"pt-1.5 pb-1":n(),"py-1.5":!n()},s=e.error,c=e.error;return t.e=at(i,r,t.e),s!==t.t&&V(a,`title`,t.t=s),c!==t.a&&(o.data=t.a=c),t},{e:void 0,t:void 0,a:void 0}),r})()},tt([`pointerdown`,`click`])})),fS,pS,mS=c((()=>{G(),fS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7.5 12C7.5 13.3807 6.38071 14.5 5 14.5C3.61929 14.5 2.5 13.3807 2.5 12C2.5 10.6193 3.61929 9.5 5 9.5C6.38071 9.5 7.5 10.6193 7.5 12ZM14.5 12C14.5 13.3807 13.3807 14.5 12 14.5C10.6193 14.5 9.5 13.3807 9.5 12C9.5 10.6193 10.6193 9.5 12 9.5C13.3807 9.5 14.5 10.6193 14.5 12ZM19 14.5C20.3807 14.5 21.5 13.3807 21.5 12C21.5 10.6193 20.3807 9.5 19 9.5C17.6193 9.5 16.5 10.6193 16.5 12C16.5 13.3807 17.6193 14.5 19 14.5Z">`),pS=e=>{let t=()=>e.size??14;return(()=>{var n=fS();return _(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),hS,gS,_S=c((()=>{G(),hS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM17.7071 10.7071C18.0976 10.3166 18.0976 9.68342 17.7071 9.29289C17.3166 8.90237 16.6834 8.90237 16.2929 9.29289L11 14.5858L8.70711 12.2929C8.31658 11.9024 7.68342 11.9024 7.29289 12.2929C6.90237 12.6834 6.90237 13.3166 7.29289 13.7071L10.2929 16.7071C10.6834 17.0976 11.3166 17.0976 11.7071 16.7071L17.7071 10.7071Z">`),gS=e=>{let t=()=>e.size??14;return(()=>{var n=hS();return _(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),vS,yS,bS,xS,SS,CS,wS=c((()=>{G(),z(),J(),Hx(),Qg(),Gx(),mS(),lx(),Yx(),Lx(),_S(),vS=B(`<button type=button data-react-grab-ignore-events data-react-grab-more-options aria-label="More options">`),yS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Keep`),bS=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-[var(--rg-text-primary)] 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">`),xS=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-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0"> `),SS=e=>(()=>{var t=vS();return H(t,`click`,t=>{t.stopImmediatePropagation(),e.onClick()}),H(t,`pointerdown`,e=>{e.stopImmediatePropagation()}),W(t,A(pS,{size:14,"aria-hidden":`true`,class:`opacity-50 group-hover:opacity-100 transition-opacity`})),_(()=>it(t,cx(qx({variant:`ghost`}),`group size-4 text-[var(--rg-text-secondary)] hover:text-[var(--rg-text-primary)]`))),t})(),CS=e=>{let t,n,[r,i]=h(!1),[a,o]=h(!1),s=()=>r()?`Copied`:e.statusText,c=()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n),o(!0),e.onFadingChange?.(!0),e.onShowContextMenu?.()},l=()=>{r()||(i(!0),t=window.setTimeout(()=>{o(!0),e.onFadingChange?.(!0),n=window.setTimeout(()=>{e.onDismiss?.()},125)},dn-125))},{claimFocus:u}=Vx({onEnter:e=>{if(Zg(e,`data-react-grab-more-options`)){e.preventDefault(),e.stopPropagation(),c();return}Zg(e,`data-react-grab-context-menu`)||(e.preventDefault(),e.stopPropagation(),l())},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onDismiss?.()}});return w(()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n)}),A(Ix,{shape:`pill`,"data-react-grab-completion":!0,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,class:`shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px] transition-opacity duration-100 ease-out`,get style(){return{opacity:+!a()}},onPointerDown:u,onClick:u,get children(){return[A(M,{get when(){return Dt(()=>!r())()&&e.onDismiss},get children(){var t=bS(),n=t.firstChild,i=n.firstChild,a=n.nextSibling;return W(a,A(M,{get when(){return e.onShowContextMenu},get children(){return A(SS,{onClick:c})}}),null),W(a,A(M,{get when(){return e.onDismiss},get children(){return A(Jx,{"data-react-grab-dismiss":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,onClick:l,get disabled(){return r()},get"aria-disabled"(){return r()},get children(){return[yS(),A(M,{get when(){return!r()},get children(){return A(Wx,{size:10,class:`text-[var(--rg-text-secondary)]`})}})]}})}}),null),_(()=>i.data=s()),t}}),A(M,{get when(){return r()||!e.onDismiss},get children(){var t=xS(),n=t.firstChild,r=n.firstChild;return W(t,A(gS,{size:14,"aria-hidden":`true`,class:`text-[var(--rg-text-primary-85)] shrink-0`}),n),W(t,A(M,{get when(){return e.onShowContextMenu},get children(){return A(SS,{onClick:c})}}),null),_(()=>r.data=s()),t}})]}})}})),TS,ES,DS,OS,kS,AS,jS,MS,NS=c((()=>{G(),z(),J(),ex(),nx(),ix(),kg(),ox(),co(),lx(),dx(),mx(),_x(),bx(),Ox(),jx(),Lx(),nS(),dS(),wS(),TS=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"> `),ES=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 py-1.5">`),DS=B(`<button data-react-grab-submit type=button aria-label="Submit context"class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-[var(--rg-submit-bg)] cursor-pointer ml-1 interactive-scale a11y-hitbox">`),OS=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 aria-label="Add context for selected element"aria-keyshortcuts="Enter Escape"class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-medium bg-transparent border-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;scrollbar-width:none>`),kS=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">`),AS=B(`<div data-react-grab-ignore-events data-react-grab-selection-label class="fixed font-sans text-[13px] antialiased select-none">`),jS={left:Yn,top:Yn,arrowLeftPercent:50,arrowLeftOffset:0,edgeOffsetX:0},MS=e=>{let t,n,r,i=!1,[a,o]=h(0),[s,c]=h(0),[l,u]=h(0),[d,f]=h(0),[p,m]=h(!1),[g,b]=h(!1),ee=()=>e.status!==`copying`&&e.status!==`copied`&&e.status!==`fading`&&e.status!==`error`,x=()=>e.status===`copied`||e.status===`fading`,S=()=>!!(e.isPromptMode||e.discardPrompt||x()&&(e.onDismiss||e.onShowContextMenu)||e.status===`error`&&(e.onAcknowledgeError||e.onRetry)),T,E=e=>{i=e},D=()=>{f(e=>e+1)};te(()=>{let e=ao();if(T=new ResizeObserver(r=>{for(let a of r){let r=a.target.getBoundingClientRect();a.target===t&&!i?(o(r.width),c(r.height)):a.target===n?u(r.width):a.target===e&&D()}}),e&&T.observe(e),t){let e=t.getBoundingClientRect();o(e.width),c(e.height),T.observe(t)}n&&(u(n.getBoundingClientRect().width),T.observe(n)),window.addEventListener(`scroll`,D,!0),window.addEventListener(`resize`,D),window.visualViewport?.addEventListener(`resize`,D),window.visualViewport?.addEventListener(`scroll`,D)}),w(()=>{T?.disconnect(),window.removeEventListener(`scroll`,D,!0),window.removeEventListener(`resize`,D),window.visualViewport?.removeEventListener(`resize`,D),window.visualViewport?.removeEventListener(`scroll`,D)});let O=()=>`${e.tagName??``}:${e.componentName??``}`,ne=y(t=>{d();let n=O(),r=n===t.elementIdentity?t:{position:jS,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:n},i=e.selectionBounds,o=a(),c=s(),u=o>0&&c>0,f=i&&i.width>0&&i.height>0;if(!u||!f)return{position:r.hadValidBounds?r.position:jS,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let p=Og(),m=p.offsetLeft,h=p.offsetTop,g=m+p.width,_=h+p.height;if(!(i.x+i.width>m&&i.x<g&&i.y+i.height>h&&i.y<_))return{position:jS,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let v=i.x+i.width/2,y=e.mouseX??v,b=i.y+i.height,ee=i.y,x=e.hideArrow?0:rx(l()),S=y,C=0,te=b+x+4,w=S-o/2,T=S+o/2;T>g-8&&(C=g-8-T),w+C<m+8&&(C=m+8-w);let E=c+x+4,D=te+c<=_-8;D||(te=ee-E),te<h+8&&(te=h+8);let ne=o/2,re=ne-C,ie=Math.min(16,ne),ae=Math.max(o-16,ne),oe=Math.max(ie,Math.min(ae,re))-ne;return{position:{left:S,top:te,arrowLeftPercent:50,arrowLeftOffset:oe,edgeOffsetX:C},computedArrowPosition:D?`bottom`:`top`,hadValidBounds:!0,elementIdentity:n}},{position:jS,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:``}),re=()=>ne().computedArrowPosition??`bottom`,ie=()=>ne().hadValidBounds;v(C(()=>e.selectionLabelShakeCount,()=>b(!0),{defer:!0}));let ae=t=>{if(ax(t))return;t.stopImmediatePropagation();let n=t.code===`Enter`&&!t.shiftKey,r=t.code===`Escape`;n?(t.preventDefault(),e.onSubmit?.()):r&&(t.preventDefault(),e.onConfirmDismiss?.())},oe=t=>{let n=t.target;n instanceof HTMLTextAreaElement&&($b(n,95),e.onInputChange?.(n.value))},k=()=>ux({tagName:e.tagName,componentName:e.componentName,elementsCount:e.elementsCount}),se=y(()=>!(e.error||e.discardPrompt||ee()&&e.isPromptMode)),ce=t=>{t.stopImmediatePropagation(),e.filePath&&e.onOpen&&e.onOpen()},le=t=>{t.stopImmediatePropagation(),ee()&&e.isPromptMode&&!e.discardPrompt&&e.onSubmit&&r&&tx(r,{preventScroll:!0})},ue=()=>ie()&&(x()||e.status===`error`);return A(M,{get when(){return Dt(()=>e.visible!==!1)()&&(e.selectionBounds||ue())},get children(){var i=AS();i.addEventListener(`mouseleave`,()=>e.onHoverChange?.(!1)),i.addEventListener(`mouseenter`,()=>e.onHoverChange?.(!0)),i.$$click=e=>{e.stopImmediatePropagation()},i.$$pointerdown=le;var a=t;return typeof a==`function`?ct(a,i):t=i,U(i,`z-index`,`${_n}`),U(i,`transition`,`opacity 125ms ease-out, filter 125ms ease-out`),W(i,A(M,{get when(){return!e.hideArrow},get children(){return A(yx,{get position(){return re()},get leftPercent(){return ne().position.arrowLeftPercent},get leftOffsetPx(){return ne().position.arrowLeftOffset},get labelWidth(){return l()}})}}),null),W(i,A(M,{get when(){return Dt(()=>!!x())()&&!e.error},get children(){return A(CS,{get statusText(){return e.statusText??`Copied`},get onDismiss(){return e.onDismiss},onFadingChange:m,get onShowContextMenu(){return e.onShowContextMenu}})}}),null),W(i,A(Ix,{ref:e=>n=e,get shape(){return se()?`pill`:`panel`},get class(){return cx(`flex items-center gap-[5px] w-fit h-fit p-0`,g()&&`animate-shake`)},get style(){return{display:x()&&!e.error?`none`:void 0}},onAnimationEnd:()=>b(!1),get children(){return[A(M,{get when(){return e.status===`copying`},get children(){var t=TS(),n=t.firstChild,r=n.firstChild,i=r.firstChild;return W(n,A(gx,{size:13,class:`text-[var(--rg-text-secondary)] shrink-0`}),r),_(()=>i.data=e.statusText??`Grabbing…`),t}}),A(M,{get when(){return Dt(()=>!!(ee()&&!e.isPromptMode))()&&!e.discardPrompt},get children(){var t=ES(),n=t.firstChild;return W(n,A(Dx,{get tagName(){return k().tagName},get componentName(){return k().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:ce,onHoverChange:E,shrink:!0})),t}}),A(M,{get when(){return Dt(()=>!!(ee()&&e.isPromptMode))()&&!e.discardPrompt},get children(){var t=kS(),n=t.firstChild;return W(n,A(Dx,{get tagName(){return k().tagName},get componentName(){return k().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:ce,onHoverChange:E})),W(t,A(Ax,{get children(){var t=OS(),n=t.firstChild;return n.$$keydown=ae,n.$$input=oe,ct(t=>{r=t,e.onSubmit&&queueMicrotask(()=>{tx(t,{preventScroll:!0}),$b(t,95)})},n),U(n,`max-height`,`95px`),W(t,A(M,{get when(){return e.onSubmit},get children(){var t=DS();return t.$$click=()=>e.onSubmit?.(),W(t,A(px,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-submit-fg)]`})),t}}),null),_(()=>n.readOnly=!e.onSubmit),_(()=>n.value=e.inputValue??``),t}}),null),t}}),A(M,{get when(){return e.discardPrompt},keyed:!0,children:e=>A(tS,{get label(){return Dt(()=>!!e.isKeyboardSelection)()?`Discard selection?`:e.label},get showCancel(){return!e.isKeyboardSelection},get cancelOnEscape(){return e.cancelOnEscape},get onConfirm(){return e.onConfirm},get onCopy(){return e.onCopy},onCancel:()=>{e.isKeyboardSelection||e.onCancel?.(),tx(r,{preventScroll:!0})}})}),A(M,{get when(){return e.error},get children(){return A(uS,{get error(){return e.error},get onAcknowledge(){return e.onAcknowledgeError},get onRetry(){return e.onRetry}})}})]}}),null),_(t=>{var n=`${ne().position.top}px`,r=`${ne().position.left}px`,a=`translateX(calc(-50% + ${ne().position.edgeOffsetX}px))`,o=S()?`auto`:`none`,s=e.status===`fading`||p()?0:1,c=`drop-shadow(${ln}) blur(${e.status===`fading`||p()?`3px`:`0`})`;return n!==t.e&&U(i,`top`,t.e=n),r!==t.t&&U(i,`left`,t.t=r),a!==t.a&&U(i,`transform`,t.a=a),o!==t.o&&U(i,`pointer-events`,t.o=o),s!==t.i&&U(i,`opacity`,t.i=s),c!==t.n&&U(i,`filter`,t.n=c),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),i}})},tt([`pointerdown`,`click`,`input`,`keydown`])})),PS,FS,IS=c((()=>{G(),lx(),J(),PS=B(`<span style="transition-property:transform;transition-timing-function:cubic-bezier(0.32, 0.72, 0, 1)"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M20.8977 4.02356L21.8277 4.39121C22.3784 2.99813 21.0382 1.60206 19.6238 2.09546L3.47334 7.72936C1.38661 8.45728 1.49021 11.443 3.6224 12.0245L10.1289 13.799L11.2331 19.8724C11.638 22.0991 14.7072 22.4019 15.5393 20.2972L21.8277 4.39121L20.8977 4.02356Z">`),FS=e=>{let t=()=>e.size??14,n=()=>e.rotationDeg??0;return(()=>{var r=PS(),i=r.firstChild;return U(r,`transition-duration`,`180ms`),_(a=>{var o=cx(`inline-flex items-center justify-center will-change-transform`,e.class),s=`rotate(${n()}deg)`,c=t(),l=t();return o!==a.e&&it(r,a.e=o),s!==a.t&&U(r,`transform`,a.t=s),c!==a.a&&V(i,`width`,a.a=c),l!==a.o&&V(i,`height`,a.o=l),a},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()}})),LS,RS,zS,BS,VS=c((()=>{G(),z(),lx(),J(),LS=B(`<div> `),RS=0,zS=()=>Date.now()-RS<800,BS=e=>{let[t,n]=h(!1),[r,i]=h(!0),a;v(C(()=>e.visible,e=>{a!==void 0&&(clearTimeout(a),a=void 0),e?zS()?(i(!1),n(!0)):(i(!0),a=setTimeout(()=>{n(!0)},400)):(t()&&(RS=Date.now()),n(!1))})),w(()=>{a!==void 0&&clearTimeout(a),t()&&(RS=Date.now())});let o=()=>e.position===`top`||e.position===`bottom`?{left:`50%`,translate:`-50%`,"z-index":`${_n}`}:{top:`50%`,translate:`0 -50%`,"z-index":`${_n}`};return A(M,{get when(){return t()},get children(){var t=LS(),n=t.firstChild;return _(i=>{var a=cx(`absolute whitespace-nowrap px-2 py-0.5 rounded-full text-[10px] font-sans font-medium leading-4 pointer-events-none`,`bg-[var(--rg-panel-bg)] text-[var(--rg-text-primary)] [box-shadow:var(--rg-shadow)]`,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`,r()&&`animate-tooltip-fade-in`),s=o(),c=e.textContent;return a!==i.e&&it(t,i.e=a),i.t=ot(t,s,i.t),c!==i.a&&(n.data=i.a=c),i},{e:void 0,t:void 0,a:void 0}),t}})}})),HS,US,WS=c((()=>{G(),z(),VS(),HS=B(`<div><button data-react-grab-ignore-events type=button>`),US=e=>(()=>{var t=HS(),n=t.firstChild;H(n,`mouseleave`,e.onMouseLeave),H(n,`mouseenter`,e.onMouseEnter),H(n,`contextmenu`,t=>e.onContextMenu?.(t)),H(n,`click`,e.onClick,!0);var r=e.ref;return typeof r==`function`?ct(r,n):e.ref=n,W(n,()=>e.icon),W(t,A(M,{get when(){return e.tooltip},children:t=>A(BS,{get visible(){return!!e.tooltipVisible},get position(){return e.tooltipPosition??`top`},get textContent(){return t()}})}),null),_(r=>{var i=e.wrapperClass,a=e.isToggle?``:void 0,o=e.actionId,s=e.label,c=!!e.isActive,l=e.class;return i!==r.e&&it(t,r.e=i),a!==r.t&&V(n,`data-react-grab-toolbar-toggle`,r.t=a),o!==r.a&&V(n,`data-react-grab-toolbar-action`,r.a=o),s!==r.o&&V(n,`aria-label`,r.o=s),c!==r.i&&V(n,`aria-pressed`,r.i=c),l!==r.n&&it(n,r.n=l),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})(),tt([`click`])})),GS,KS,qS,JS,YS,XS,ZS,QS=c((()=>{J(),kg(),dg(),GS=e=>e===`top`||e===`bottom`,KS=e=>{let t=GS(e);return{width:t?30:16,height:t?16:30}},qS=(e,t,n,r)=>{let i=Og(),a=i.width,o=i.height,s=i.offsetLeft+16,c=Math.max(s,i.offsetLeft+a-n-16),l=i.offsetTop+16,u=Math.max(l,i.offsetTop+o-r-16);if(GS(e)){let r=Math.max(0,a-n-32);return{x:Math.min(c,Math.max(s,i.offsetLeft+16+r*t)),y:e===`top`?l:u}}let d=Math.max(0,o-r-32),f=Math.min(u,Math.max(l,i.offsetTop+16+d*t));return{x:e===`left`?s:c,y:f}},JS=(e,t,n,r,i)=>{let a=Og(),o=a.width,s=a.height;if(GS(e)){let e=o-r-32;return e<=0?Bn:Math.max(0,Math.min(1,(t-a.offsetLeft-16)/e))}let c=s-i-32;return c<=0?Bn:Math.max(0,Math.min(1,(n-a.offsetTop-16)/c))},YS=(e,t,n,r,i)=>{let a=Og(),o=a.width,s=a.height,{width:c,height:l}=n,u;if(GS(t)){let n=(c-r)/2;u={x:ug(e.x-n,a.offsetLeft+16,a.offsetLeft+o-c-16),y:t===`top`?a.offsetTop+16:a.offsetTop+s-l-16}}else{let n=(l-i)/2,r=ug(e.y-n,a.offsetTop+16,a.offsetTop+s-l-16);u={x:t===`left`?a.offsetLeft+16:a.offsetLeft+o-c-16,y:r}}let d=JS(t,u.x,u.y,c,l);return{position:u,ratio:d}},XS=(e,t,n,r)=>{let i=Og(),{width:a,height:o}=n,{width:s,height:c}=r;switch(e){case`top`:case`bottom`:{let n=(a-s)/2;return{x:ug(t.x+n,i.offsetLeft,i.offsetLeft+i.width-s),y:e===`top`?i.offsetTop:i.offsetTop+i.height-c}}case`left`:case`right`:{let n=(o-c)/2,r=ug(t.y+n,i.offsetTop,i.offsetTop+i.height-c);return{x:e===`left`?i.offsetLeft:i.offsetLeft+i.width-s,y:r}}}},ZS=(e,t,n,r,i,a)=>{let o=Og(),s=o.width,c=o.height,l=e+i*150,u=t+a*150,d=u-o.offsetTop+r/2,f=o.offsetTop+c-u-r/2,p=l-o.offsetLeft+n/2,m=o.offsetLeft+s-l-n/2,h=Math.min(d,f,p,m),g=e=>ug(e,o.offsetLeft+16,o.offsetLeft+s-n-16),_=e=>ug(e,o.offsetTop+16,o.offsetTop+c-r-16);return h===d?{edge:`top`,x:g(l),y:o.offsetTop+16}:h===p?{edge:`left`,x:o.offsetLeft+16,y:_(u)}:h===m?{edge:`right`,x:o.offsetLeft+s-n-16,y:_(u)}:{edge:`bottom`,x:g(l),y:o.offsetTop+c-r-16}}})),$S,eC,tC=c((()=>{G(),$S=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M9.29289 16.7071C8.90237 16.3166 8.90237 15.6834 9.29289 15.2929L12.5858 12L9.29289 8.70711C8.90237 8.31658 8.90237 7.68342 9.29289 7.29289C9.68342 6.90237 10.3166 6.90237 10.7071 7.29289L14.7071 11.2929C14.8946 11.4804 15 11.7348 15 12C15 12.2652 14.8946 12.5196 14.7071 12.7071L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071Z">`),eC=e=>{let t=()=>e.size??14;return(()=>{var n=$S();return _(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),nC,rC,iC=c((()=>{G(),lx(),QS(),tC(),nC=B(`<div data-react-grab-toolbar-panel><div><div><div></div></div></div><button data-react-grab-ignore-events data-react-grab-toolbar-collapse type=button class="group contain-layout shrink-0 flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox">`),rC=e=>{let t=()=>e.snapEdge??`bottom`,n=()=>!GS(t()),r=()=>e.isCollapsed?`duration-140`:`duration-220`,i=()=>n()?`transition-[grid-template-rows] ${r()} ease-drawer`:`transition-[grid-template-columns] ${r()} ease-drawer`,a=()=>n()?`min-h-0`:`min-w-0`,o=()=>e.isCollapsed?`${{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]`}[t()]} ${n()?`px-0.25 py-2`:`px-2 py-0.25`}`:``,s=()=>{let n=e.isCollapsed;switch(t()){case`top`:return n?`rotate-90`:`-rotate-90`;case`bottom`:return n?`-rotate-90`:`rotate-90`;case`left`:return n?`rotate-0`:`rotate-180`;case`right`:return n?`rotate-180`:`rotate-0`;default:return`-rotate-90`}},c=()=>{if(e.isChevronPressed)return n()?`scale(0.97, 1)`:`scale(1, 0.97)`},l=()=>e.isChevronPressed?`transition-[padding,border-radius,transform] duration-60 ease-[cubic-bezier(0,0,0.2,1)]`:`transition-[padding,border-radius,transform] ${r()} ease-drawer`;return(()=>{var t=nC(),r=t.firstChild,u=r.firstChild,d=u.firstChild,f=r.nextSibling;return H(t,`click`,e.onPanelClick,!0),H(t,`animationend`,e.onAnimationEnd),W(d,()=>e.actionButtons),H(f,`pointercancel`,e.onCollapsePointerLeave),H(f,`pointerleave`,e.onCollapsePointerLeave),H(f,`pointerup`,e.onCollapsePointerUp,!0),H(f,`pointerdown`,e.onCollapsePointerDown),H(f,`click`,e.onCollapseClick,!0),W(f,A(eC,{size:18,get class(){return cx(`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)] transition-[transform,color] duration-150 ease-drawer -m-0.5`,s())}})),_(s=>{var p=cx(`flex items-center justify-center rounded-[13px] antialiased relative overflow-visible [font-synthesis:none]`,l(),n()&&`flex-col`,`bg-[var(--rg-panel-bg)] [box-shadow:var(--rg-shadow)]`,!e.isCollapsed&&(n()?`px-1.5 gap-0 py-2`:`py-1.5 gap-0 px-2`),o(),e.isShaking&&(n()?`animate-shake-vertical`:`animate-shake`)),m=e.transformOrigin,h=c(),g=cx(`grid relative overflow-visible`,i(),e.isCollapsed?n()?`grid-rows-[0fr] pointer-events-none`:`grid-cols-[0fr] pointer-events-none`:n()?`grid-rows-[1fr]`:`grid-cols-[1fr]`),_=cx(`flex`,n()?`flex-col items-center min-h-0`:`items-center min-w-0`,e.isCollapsed?`opacity-0`:`opacity-100`,e.isCollapsed?`transition-opacity duration-100 ease-drawer`:`transition-opacity duration-180 ease-drawer delay-[80ms]`),v=cx(`relative overflow-visible flex`,n()?`flex-col items-center`:`items-center`,a()),y=e.isCollapsed?`Expand toolbar`:`Collapse toolbar`,b=!e.isCollapsed;return p!==s.e&&it(t,s.e=p),m!==s.t&&U(t,`transform-origin`,s.t=m),h!==s.a&&U(t,`transform`,s.a=h),g!==s.o&&it(r,s.o=g),_!==s.i&&it(u,s.i=_),v!==s.n&&it(d,s.n=v),y!==s.s&&V(f,`aria-label`,s.s=y),b!==s.h&&V(f,`aria-expanded`,s.h=b),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),t})()},tt([`click`,`pointerup`])})),aC,oC=c((()=>{z(),J(),hf(),co(),QS(),aC=e=>{let[t,n]=h(!1),[r,i]=h(!1),[a,o]=h(!1),[s,c]=h({x:0,y:0}),l={x:0,y:0},u={x:0,y:0,time:0},d={x:0,y:0},f=!1,p,m,g=null,_=()=>{g?.abort(),g=null},v=()=>{p!==void 0&&(pf(p),p=void 0)},y=t=>{if(!a()){if(Math.hypot(t.clientX-d.x,t.clientY-d.y)<=5)return;o(!0),e.onDragStart()}let n=performance.now(),r=n-u.time;r>0&&c({x:(t.clientX-u.x)/r,y:(t.clientY-u.y)/r}),u={x:t.clientX,y:t.clientY,time:n};let i=t.clientX-l.x,s=t.clientY-l.y;e.onPositionUpdate({x:i,y:s})},b=()=>{_();let t=a();if(n(!1),!t)return;f=!0;let r=e.getContainerRef(),o=r?.getBoundingClientRect();if(!o)return;let c=s(),l=ZS(o.left,o.top,o.width,o.height,c.x,c.y),u=JS(l.edge,l.x,l.y,o.width,o.height);e.onSnapEdgeChange(l.edge,u),i(!0),v(),p=ff(()=>{let t=r?.getBoundingClientRect(),n=t?{width:t.width,height:t.height}:e.getExpandedDimensions();p=ff(()=>{p=void 0;let t=qS(l.edge,u,n.width,n.height);e.onSnapComplete({edge:l.edge,ratio:u,position:t,expandedDimensions:n}),m=setTimeout(()=>{i(!1),e.onSnapAnimationEnd?.()},300)})})},ee=so(t=>{if(t.button!==0||e.isCollapsed()||r())return;let i=e.getContainerRef()?.getBoundingClientRect();if(!i)return;d={x:t.clientX,y:t.clientY},l={x:t.clientX-i.left,y:t.clientY-i.top},n(!0),o(!1),c({x:0,y:0}),u={x:t.clientX,y:t.clientY,time:performance.now()},_(),g=new AbortController;let{signal:a}=g;window.addEventListener(`pointermove`,y,{signal:a}),window.addEventListener(`pointerup`,b,{signal:a}),window.addEventListener(`pointercancel`,b,{signal:a})});return w(()=>{_(),v(),clearTimeout(m)}),{isDragging:t,isSnapping:r,handlePointerDown:ee,createDragAwareHandler:e=>t=>{if(t.stopImmediatePropagation(),f){f=!1;return}e()}}}})),sC,cC,lC=c((()=>{sC=360,cC=(e,t)=>{let n=t-e;return e+(n-Math.round(n/sC)*sC)}})),uC,dC=c((()=>{uC=e=>{e.type===`contextmenu`&&e.preventDefault(),e.stopImmediatePropagation()}})),fC,pC=c((()=>{fC=(e,t,n,r)=>Math.max(r,Math.min(e,n-t-r))})),mC,hC=c((()=>{pC(),mC=({anchor:e,measuredWidth:t,measuredHeight:n,viewportLeft:r=0,viewportTop:i=0,viewportWidth:a,viewportHeight:o,anchorGapPx:s,viewportPaddingPx:c,offscreenPosition:l})=>{if(!e||t===0||n===0)return l;let u,d;return e.edge===`left`||e.edge===`right`?(u=e.edge===`left`?e.x+s:e.x-t-s,d=e.y-n/2):(u=e.x-t/2,d=e.edge===`top`?e.y+s:e.y-n-s),{left:r+fC(u-r,t,a,c),top:i+fC(d-i,n,o,c)}}})),gC,_C=c((()=>{z(),J(),hC(),kg(),co(),hf(),gC=(e,t)=>{let[n,r]=h(0),[i,a]=h(0),[o,s]=h(!1),[c,l]=h(!1),[u,d]=h(0),[f,p]=h(`bottom`),m,g,_=()=>{clearTimeout(m),g!==void 0&&(pf(g),g=void 0)},b=()=>{let t=e();t&&(r(t.offsetWidth),a(t.offsetHeight))},ee=()=>{x(()=>{d(e=>e+1),b()})},S=y(()=>t()!==null);return v(()=>{let n=t();n?(p(n.edge),clearTimeout(m),s(!0),g!==void 0&&pf(g),g=ff(()=>{b(),e()?.offsetHeight,l(!0)})):(g!==void 0&&pf(g),l(!1),m=setTimeout(()=>{s(!1)},120)),w(_)}),v(()=>{if(!S())return;window.addEventListener(`resize`,ee),window.visualViewport?.addEventListener(`resize`,ee),window.visualViewport?.addEventListener(`scroll`,ee);let e=ao(),t;e&&typeof ResizeObserver<`u`&&(t=new ResizeObserver(ee),t.observe(e)),w(()=>{window.removeEventListener(`resize`,ee),window.visualViewport?.removeEventListener(`resize`,ee),window.visualViewport?.removeEventListener(`scroll`,ee),t?.disconnect()})}),{shouldMount:o,isAnimatedIn:c,lastAnchorEdge:f,displayPosition:y(e=>{u();let r=Og(),a=mC({anchor:t(),measuredWidth:n(),measuredHeight:i(),viewportLeft:r.offsetLeft,viewportTop:r.offsetTop,viewportWidth:r.width,viewportHeight:r.height,anchorGapPx:8,viewportPaddingPx:8,offscreenPosition:Kn});return a.left===Kn.left?e:a},Kn),measure:b,clearAnimationHandles:_}}})),vC,yC=c((()=>{co(),Qg(),Wa(),hf(),vC=e=>{let t=so(t=>{e.isOpen()&&(e.shouldIgnoreKeyboardEvent?.(t)||e.shouldIgnoreInputEvents&&Va(t)||t.code===`Escape`&&(t.preventDefault(),t.stopImmediatePropagation(),e.onDismiss(`keyboard`)))}),n=so(t=>{e.isOpen()&&(Zg(t,`data-react-grab-ignore-events`)||e.shouldIgnoreRightClick&&t instanceof MouseEvent&&t.button===2||e.onDismiss(`pointer`))}),r=ff(()=>{window.addEventListener(`mousedown`,n,{capture:!0}),window.addEventListener(`touchstart`,n,{capture:!0})});return window.addEventListener(`keydown`,t,{capture:!0}),()=>{pf(r),window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`mousedown`,n,{capture:!0}),window.removeEventListener(`touchstart`,n,{capture:!0})}}})),bC,xC,SC=c((()=>{G(),z(),J(),lx(),dC(),_C(),yC(),bC=B(`<div data-react-grab-ignore-events>`),xC=e=>{let t,n=()=>e.interactive!==!1,r=gC(()=>t,()=>e.position);return te(()=>{r.measure();let t=e.onDismiss?vC({isOpen:()=>!!e.position,onDismiss:e.onDismiss}):void 0;w(()=>{r.clearAnimationHandles(),t?.()})}),A(M,{get when(){return r.shouldMount()},get children(){var i=bC(),a=t;return typeof a==`function`?ct(a,i):t=i,st(i,Oe(()=>({[e.dataAttribute]:``}),{get class(){return cx(`fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none will-change-[opacity,transform]`,r.isAnimatedIn()?`transition-[opacity,transform] duration-220 ease-spring`:`transition-[opacity,transform] duration-120 ease-drawer`)},get style(){return{top:`${r.displayPosition().top}px`,left:`${r.displayPosition().left}px`,"z-index":`${_n}`,"pointer-events":n()&&r.isAnimatedIn()?`auto`:`none`,"transform-origin":qn[r.lastAnchorEdge()],opacity:r.isAnimatedIn()?`1`:`0`,transform:r.isAnimatedIn()?`scale(1)`:`scale(0.92)`}},onPointerDown:uC,onMouseDown:uC,onClick:uC,onContextMenu:uC}),!1,!0),W(i,()=>e.children),i}})}})),CC,wC=c((()=>{R_(),CC=e=>{let t=Math.max(0,Date.now()-e);return t<6e4?`now`:t<36e5?`${Math.floor(t/F_)}m`:t<864e5?`${Math.floor(t/I_)}h`:`${Math.floor(t/L_)}d`}})),TC,EC=c((()=>{TC=e=>e.map((e,t)=>`[${t+1}]\n${e.content}`).join(`
38
+ `;let t=[];for(let n of e.getAnimations())Pv(n)||t.push(n);Mv(t)}else Nv(t.frozenWaapiAnimations);t.didUseCssFreeze=!1,t.frozenWaapiAnimations=[]}catch(e){n.push(e)}try{r.remove(),t.styleElement=null}catch(e){n.push(e)}}return t.frozenSvgElements=Av(t.frozenSvgElements,n),t.styleElement===null&&t.frozenSvgElements.length===0&&t.frozenWaapiAnimations.length===0&&Sv.delete(e),n},Bv=e=>{if(Sv.has(e.targetDocument))return;let t=km(`data-react-grab-global-freeze`,``,e.targetDocument),n={styleElement:t,frozenSvgElements:[],frozenWaapiAnimations:[],didUseCssFreeze:!1};if(Sv.set(e.targetDocument,n),e.runningAnimations.length>200)t.textContent=mv,n.didUseCssFreeze=!0;else for(let t of e.runningAnimations)t.pause(),n.frozenWaapiAnimations.push(t);kv(Dv(Array.from(e.targetDocument.querySelectorAll(hv))),n.frozenSvgElements)},Vv=e=>{xv.add(e);try{Tv()&&Bv(Rv(e))}catch(t){xv.delete(e);let n=zv(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{xv.delete(e),qm(zv(e),`Unfreezing frame animations failed`)}},Hv=()=>Tv()?[]:(xv.add(document),[...xv].map(Rv)),Uv=e=>{if(!Tv()){for(let t of e)Bv(t);uv()}},Wv=()=>{if(!Tv())return;let e=[];for(let t of[...Sv.keys()])e.push(...zv(t));try{dv()}catch(t){e.push(t)}qm(e,`Unfreezing global animations failed`)}})),Kv,qv,Jv=n((()=>{pp(),Kn(),Jn(),Mp(),Kv=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!jp(n)&&(Gn(n)&&t.add(n),n.shadowRoot&&Kv(n.shadowRoot,t),qn(n))){let e=fp(n);e&&Kv(e,t)}},qv=()=>{let e=new Set;return Kv(document,e),[...e]}})),Yv,Xv,Zv,Qv,$v,ey,ty,ny,ry,iy,ay,oy,sy,cy,ly,uy,dy,fy,py,my,hy,gy=n((()=>{og(),pp(),Xa(),vp(),Jv(),Kn(),Jn(),Mp(),io(),Km(),Jm(),Yv=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],Xv=[`focus`,`blur`,`focusin`,`focusout`],Zv=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],Qv=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],$v=new Map,ey=new Map,ty=new Set,ny=!1,ry=e=>{e.stopImmediatePropagation()},iy=e=>{e.preventDefault(),e.stopImmediatePropagation()},ay=e=>{for(let t of Yv)e.addEventListener(t,ry,!0);for(let t of Xv)e.addEventListener(t,iy,!0)},oy=e=>{for(let t of Yv)e.removeEventListener(t,ry,!0);for(let t of Xv)e.removeEventListener(t,iy,!0)},sy=e=>{ty.add(e);let t=Bm(e);return ny&&ay(e),()=>{ny&&oy(e),ty.delete(e),t()}},cy=(e,t,n)=>{if(n?.has(e))return null;let r=getComputedStyle(e),i=new Map,a=new Map;for(let n of t){let t=r.getPropertyValue(n);t&&(i.set(n,t),a.set(n,{value:e.style.getPropertyValue(n),priority:e.style.getPropertyPriority(n)}))}return{element:e,frozenPropertyValues:i,originalPropertyValues:a}},ly=(e,t)=>{let n=[],r=_p(e,t);for(;r&&r!==document.documentElement&&!jp(r);)Gn(r)&&n.push(r),r=Ya(r);return n},uy=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;){if(Gn(t)&&e.push(t),t.shadowRoot?.activeElement){t=t.shadowRoot.activeElement;continue}if(qn(t)){t=fp(t)?.activeElement??null;continue}t=null}return e},dy=(e,t)=>{for(let{element:n,frozenPropertyValues:r,originalPropertyValues:i}of e){t.set(n,i);for(let[e,t]of r)n.style.setProperty(e,t,`important`)}},fy=e=>{let t=[];for(let[n,r]of e){for(let[e,i]of r)try{i.value?n.style.setProperty(e,i.value,i.priority):n.style.removeProperty(e),r.delete(e)}catch(e){t.push(e)}r.size===0&&e.delete(n)}return t},py=(e,t)=>{if(zm())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?ly(e,t):qv();for(let e of r){let t=cy(e,Zv);t&&n.push(t)}let i=[];for(let e of uy()){let t=cy(e,Qv,ey);t&&i.push(t)}return{hoverStates:n,focusStates:i}},my=e=>{if(e){ny=!0,ty.add(document);for(let e of ty)ay(e);dy(e.hoverStates,$v),dy(e.focusStates,ey),Vm()}},hy=()=>{ag(),ny=!1;for(let e of ty)oy(e);let e=[...fy($v),...fy(ey)];try{Hm()}catch(t){e.push(t)}qm(e,`Unfreezing pseudo states failed`)}})),_y,vy,yy,by=n((()=>{Gv(),gy(),nh(),Jm(),_y=()=>{let e=[];try{th()}catch(t){e.push(t)}try{hy()}catch(t){e.push(t)}try{Wv()}catch(t){e.push(t)}return e},vy=(e,t)=>{let n=py(e,t),r=Hv();try{my(n),Uv(r),eh()}catch(e){let t=_y();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},yy=()=>{qm(_y(),`Unfreezing global interactions failed`)}})),xy,Sy,Cy,wy,Ty,Ey,Dy,Oy,ky,Ay,jy,My,Ny,Py,Fy,Iy,Ly,Ry,zy,By,Vy,Hy,Uy,Wy,Gy,Ky,qy,Jy,Yy,Xy,Zy,Qy,$y,eb,tb,nb,rb,ib,ab,ob,sb=n((()=>{Gi(),Ma(),Qg(),io(),xy=!1,Sy=0,Cy=0,wy=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},Ty=new WeakMap,Ey=new WeakMap,Dy=new WeakMap,Oy=new Set,ky=[],Ay=[],jy=new WeakMap,My=new WeakMap,Ny=new WeakSet,Py=new Set,Fy=new WeakMap,Ni({name:`react-grab-freeze-updates`,onCommitFiberRoot:(e,t)=>{let n=kr().renderers.get(e);n&&Fy.set(t,n)}}),Iy=e=>{try{let t=e.rendererPackageName;return typeof t==`string`&&t.startsWith(`react-dom`)}catch{return!1}},Ly=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},Ry=e=>{let t=e.current,n=t;for(;n;){let e=n.stateNode;if(e&&typeof e==`object`&&typeof Reflect.get(e,`nodeType`)==`number`)return e;if(n.child){n=n.child;continue}for(;n!==t&&!n.sibling;)if(n=n.return,!n)return null;if(n===t)return null;n=n.sibling}return null},zy=e=>{let t=Fy.get(e);if(t)return Iy(t)?t:null;let n=Array.from(kr().renderers.values()).filter(Iy);if(n.length===1){let t=n[0];return t&&Fy.set(e,t),t??null}let r=Ry(e);if(!r)return null;for(let t of n)try{let n=t.findFiberByHostInstance?.(r);if(n&&Ly(n)===e)return Fy.set(e,t),t}catch{}return null},By=e=>{let t=e.current?.stateNode;if(!t||typeof t!=`object`)return!1;let n=Reflect.get(t,`containerInfo`);return!!(n&&typeof n==`object`&&typeof Reflect.get(n,`nodeType`)==`number`)},Vy=()=>{if(_i.size>0){let e=new Set;for(let t of _i)By(t)&&e.add(t);return e}let e=new Set,t=n=>{let r=Bi(n);if(r){let t=Ly(r);t&&e.add(t);return}for(let r of Array.from(n.children))if(t(r),e.size>0)return};return t(document.body),e},Hy=(e,t)=>{if(!e)return t;if(!t)return e;if(!e.next||!t.next)return t;let n=e.next,r=t.next,i=e===n,a=t===r;return i&&a?(e.next=t,t.next=e):i?(e.next=r,t.next=e):a?(t.next=n,e.next=t):(e.next=r,t.next=n),t},Uy=e=>{if(!e||jy.has(e))return;let t={originalPendingDescriptor:Object.getOwnPropertyDescriptor(e,`pending`),pendingValueAtPause:e.pending,bufferedPending:null};typeof e.getSnapshot==`function`&&(t.originalGetSnapshot=e.getSnapshot,t.snapshotValueAtPause=e.getSnapshot(),e.getSnapshot=()=>xy?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>xy?null:n,set:e=>{if(xy){e!==null&&(t.bufferedPending=Hy(t.bufferedPending??null,e));return}n=e}}),jy.set(e,t)},Wy=e=>{if(!e)return[];let t=[],n=e.next;if(!n)return[];let r=n;do r&&=(t.push(r.action),r.next);while(r&&r!==n);return t},Gy=e=>{let t=jy.get(e);if(!t)return;t.originalGetSnapshot&&(e.getSnapshot=t.originalGetSnapshot),t.originalPendingDescriptor?Object.defineProperty(e,`pending`,t.originalPendingDescriptor):delete e.pending,e.pending=null;let n=e.dispatch;if(typeof n==`function`){let e=Wy(t.pendingValueAtPause??null),r=Wy(t.bufferedPending??null);for(let t of[...e,...r])Ay.push(()=>n(t))}jy.delete(e)},Ky=e=>{if(My.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return xy?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(xy){t.pendingValue=e,t.didReceivePendingValue=!0;return}t.originalDescriptor?.set?t.originalDescriptor.set.call(this,e):this._memoizedValue=e}}),t.originalDescriptor?.get||(e._memoizedValue=t.frozenValue),My.set(e,t)},qy=e=>{let t=My.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),My.delete(e))},Jy=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Uy(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Ky(n),n=n.next},Yy=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Gy(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)qy(n),n=n.next},Xy=e=>{let t=e;for(;t;){if(ci(t)&&Jy(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},Zy=e=>{let t=e;for(;t;){if(ci(t)&&Yy(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},Qy=e=>{if(Ty.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};Ty.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!xy||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,wy(Ey,a,()=>(...e)=>{xy?Ay.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!xy||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,wy(Ey,a,()=>(...e)=>{xy?Ay.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!xy||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,wy(Dy,a,()=>e=>{xy?ky.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>xy?n.useSyncExternalStore(t=>e(()=>{xy?Oy.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},$y=e=>{let t=e.currentDispatcherRef;if(!t||typeof t!=`object`)return;let n=`H`in t?`H`:`current`,r=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get:()=>(r&&typeof r==`object`&&Qy(r),r),set:e=>{r=e}})},eb=(e,t)=>{queueMicrotask(()=>{if(!(xy||Cy!==t))try{for(let t of e){let e=zy(t);if(t.current&&e?.scheduleUpdate)try{e.scheduleUpdate(t.current)}catch(e){Z(new ba(`scheduleUpdate failed during unfreeze`,e))}}}catch(e){Z(new ba(`scheduleReactUpdate failed`,e))}})},tb=e=>{for(let t of e)try{t()}catch(e){Z(new ba(`Callback failed during state replay`,e))}},nb=()=>{for(let e of kr().renderers.values())Iy(e)&&(Ny.has(e)||($y(e),Ny.add(e)))},rb=()=>{Oy.clear(),ky.length=0,Ay.length=0},ib=()=>{let e=Cy,t=new Set(Py);try{for(let e of Vy())t.add(e)}catch(e){Z(new ba(`Collecting fiber roots failed during unfreeze`,e))}Py.clear(),xy=!1;for(let e of t)try{Zy(e.current)}catch(e){Z(new ba(`Resuming a fiber root failed during unfreeze`,e))}let n=Array.from(Oy),r=ky.slice(),i=Ay.slice();rb(),tb(n),tb(r),tb(i),!xy&&Cy===e&&eb(t,e)},ab=()=>{let e=Sy===0;if(Sy+=1,e)try{nb(),Cy+=1,xy=!0;let e=Vy();for(let t of e)Py.add(t),Xy(t.current)}catch(e){throw--Sy,xy&&ib(),e}let t=!1;return()=>{t||(t=!0,--Sy,Sy===0&&ib())}},ob=()=>{try{return ab()}catch(e){return Z(new ba(`Pausing React updates failed`,e)),()=>{}}}}));by(),sb();let cb=e=>{let t=e.left+e.width/2,n=e.top+e.height/2,r=n,i=window.innerHeight-n,a=t,o=window.innerWidth-t,s=Math.min(r,i,a,o);return s===r?`top`:s===a?`left`:s===o?`right`:`bottom`};var lb,ub,db,fb=n((()=>{lb=e=>e.key===`Enter`,ub=e=>e.metaKey||e.ctrlKey,db=(e,t,n={})=>{if(!t.key)return null;if(lb(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return ub(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null}}));fb();let pb=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}};R(),ra();let mb=()=>{let[e,t]=c(!1),[n,r]=c(null),i=pb(),a=()=>{let e=n();return X(e)?e:null},o=()=>{r(null),i.clear(),t(!1)};return{selectedElement:a,isPendingDismiss:e,select:(e,n)=>{r(e),t(!1),n?.shouldPromptBeforeMouseHandoff?i.arm():i.clear()},clear:o,consumeMouseHandoff:()=>i.consume()&&a()!==null,showDismissPrompt:()=>a()?e()?!1:(t(!0),!0):(o(),!1),takeSelection:e=>{let t=a()??(X(e)?e:null);return o(),t}}};var hb,gb,_b=n((()=>{Ma(),Qg(),hb=e=>e??!0,gb=(e,t)=>{if(typeof e.enabled==`function`){if(!t)return!1;try{return e.enabled(t)}catch(t){return Z(new Da(e.id,t)),!1}}return hb(e.enabled)}})),vb,yb=n((()=>{Ma(),_b(),Qg(),vb=(e,t)=>{if(!gb(e,t))return!1;try{let n=e.onAction(t);n&&n.catch(t=>{Z(new Ea(e.id,t))})}catch(t){Z(new Ea(e.id,t))}return!0}}));yb(),Ma(),Qg();let bb=e=>{Z(new ba(`Toolbar state change subscriber failed`,e))},xb=(e,t)=>{for(let n of e)try{Promise.resolve(n(t)).catch(bb)}catch(e){bb(e)}},Q=(e,t)=>{try{e()}catch(e){t.push(e)}};J(),pp(),Wn(),Jn(),Mp(),Jm();let Sb=e=>{let t=new Map,n=new Map,r=new Map,i=new Map,a=(e,a)=>{let c=r.get(e);c&&(r.delete(e),Q(()=>c.disconnect(),a));for(let t of[...r.keys()])`host`in t&&t.ownerDocument===e&&o(t,a);for(let t of[...i.keys()])t.ownerDocument===e&&s(t,a);let l=n.get(e);n.delete(e),l&&Q(l,a);let u=t.get(e);t.delete(e),u&&Q(u,a)},o=(e,t)=>{let n=r.get(e);if(n){r.delete(e),Q(()=>n.disconnect(),t);for(let n of e.querySelectorAll(`*`))c(n,t)}},s=(e,t)=>{let n=i.get(e);n&&(i.delete(e),Q(()=>n.abortController.abort(),t),Q(()=>e.removeAttribute(On),t),n.document&&a(n.document,t))},c=(e,t)=>{qn(e)&&s(e,t),e.shadowRoot&&o(e.shadowRoot,t)},l=(e,t)=>{for(let n of e.querySelectorAll(`*`))c(n,t);c(e,t)},u=n=>{t.has(n)||(t.set(n,e(n)),d(n),h(n))},d=e=>{let r=e.defaultView?.Element.prototype;if(!r)return;let i=r.attachShadow,a=new Proxy(i,{apply:(n,r,i)=>{let a=Reflect.apply(n,r,i);return a.mode===`open`&&r.isConnected&&t.has(e)&&h(a),a}});r.attachShadow=a,n.set(e,()=>{r.attachShadow===a&&(r.attachShadow=i)})},f=e=>{if(i.has(e))return;let t={abortController:new AbortController,document:null};i.set(e,t);let n=()=>{let n=[],r=fp(e);if(t.document&&t.document!==r&&a(t.document,n),t.document=r,!r){e.removeAttribute(On),qm(n,`Cleaning up replaced frame document failed`);return}e.setAttribute(On,``),u(r),qm(n,`Cleaning up replaced frame document failed`)};e.addEventListener(`load`,n,{signal:t.abortController.signal}),n()},p=e=>{jp(e)||(qn(e)&&f(e),e.shadowRoot&&h(e.shadowRoot))},m=e=>{if(p(e),!jp(e))for(let t of e.querySelectorAll(`*`))p(t)},h=e=>{if(r.has(e))return;let t=`defaultView`in e?e.defaultView:e.ownerDocument.defaultView;if(!t)return;let n=new t.MutationObserver(e=>{let t=[];for(let n of e){for(let e of n.removedNodes)Un(e)&&l(e,t);for(let e of n.addedNodes)Un(e)&&m(e)}qm(t,`Cleaning up removed frame documents failed`)});r.set(e,n),n.observe(e,{childList:!0,subtree:!0});for(let t of e.querySelectorAll(`*`))p(t)};return u(document),()=>{let e=[];for(let t of[...i.keys()])s(t,e);for(let[t,n]of r)r.delete(t),Q(()=>n.disconnect(),e);for(let[t,r]of n)n.delete(t),Q(r,e);for(let[n,r]of t)t.delete(n),r&&Q(r,e);qm(e,`Cleaning up same-origin frame documents failed`)}};ir(),Gv(),gy(),Jm();let Cb=(e,t)=>{window.dispatchEvent(t),t.defaultPrevented&&(e.preventDefault(),e.stopImmediatePropagation())},wb=(e,t,n)=>({bubbles:!0,cancelable:!0,composed:!0,clientX:t,clientY:n,screenX:e.screenX,screenY:e.screenY,button:e.button,buttons:e.buttons,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}),Tb=e=>{let t=rr(e.view,e.clientX,e.clientY);Cb(e,new PointerEvent(e.type,{...wb(e,t.x,t.y),pointerId:e.pointerId,pointerType:e.pointerType,isPrimary:e.isPrimary,pressure:e.pressure,tangentialPressure:e.tangentialPressure,tiltX:e.tiltX,tiltY:e.tiltY,twist:e.twist,width:e.width,height:e.height}))},Eb=e=>{let t=rr(e.view,e.clientX,e.clientY);Cb(e,new MouseEvent(e.type,wb(e,t.x,t.y)))},Db=e=>{Cb(e,new KeyboardEvent(e.type,{bubbles:!0,cancelable:!0,composed:!0,key:e.key,code:e.code,location:e.location,repeat:e.repeat,isComposing:e.isComposing,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}))},Ob=e=>Sb(t=>{if(t===document)return;let n=t.defaultView;if(!n)return;let r=new AbortController,i=Vv(t),a=sy(t),o={capture:!0,signal:r.signal},s=t=>{e.shouldForwardInteraction()&&Tb(t)},c=t=>{e.shouldForwardInteraction()&&Eb(t)},l=t=>{(e.shouldForwardInteraction()||e.shouldForwardKeyboardEvent(t))&&Db(t)},u=n=>{e.shouldForwardInteraction()&&e.shouldForwardViewportEvent(t)&&window.dispatchEvent(new Event(n.type))};return n.addEventListener(`pointermove`,s,o),n.addEventListener(`pointerdown`,s,o),n.addEventListener(`pointerup`,s,o),n.addEventListener(`pointercancel`,s,o),n.addEventListener(`contextmenu`,c,o),n.addEventListener(`click`,c,o),n.addEventListener(`keydown`,l,o),n.addEventListener(`keyup`,l,o),n.addEventListener(`keypress`,l,o),n.addEventListener(`scroll`,u,o),n.addEventListener(`resize`,u,o),()=>{r.abort();let e=[];for(let t of[i,a])try{t()}catch(t){e.push(t)}qm(e,`Cleaning up frame event forwarding failed`)}});nr();let kb=(e,t)=>{let n=t.ownerDocument;for(;n;){if(n===e)return!0;n=tr(n.defaultView)?.ownerDocument??null}return!1};Ma(),Qg();let Ab=null,jb=new Map,Mb=()=>typeof window>`u`?Ab:window.__REACT_GRAB__??Ab??null,Nb=e=>{if(Ab=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__),e)for(let[t,n]of jb){jb.delete(t);try{e.registerPlugin(n)}catch(e){Z(e instanceof Ta?e:new Ta(t,e))}}},Pb=e=>{Ab===e&&(Ab=null),typeof window<`u`&&window.__REACT_GRAB__===e&&delete window.__REACT_GRAB__},Fb=e=>{let t=Mb();if(t){t.registerPlugin(e);return}jb.set(e.name,e)},Ib=e=>{let t=Mb();if(t){t.unregisterPlugin(e);return}jb.delete(e)},Lb=async(e,t={})=>(await Promise.allSettled(e.map(e=>$d(e,t)))).map(e=>e.status===`fulfilled`?e.value:``);var Rb,zb=n((()=>{Rb=(e,t,n)=>e+(t-e)*n})),Bb,Vb=n((()=>{J(),Bb=(e,t)=>{let n=Math.max(t,1);return 1-(1-e)**(n/pn)}})),Hb,Ub,Wb,Gb,Kb=n((()=>{R(),zb(),J(),ff(),Kt(),Vb(),Hb=z(`<canvas data-react-grab-overlay-canvas style=position:fixed;top:0;left:0;pointer-events:none>`),Ub={borderColor:_n,fillColor:vn,lerpFactor:nn},Wb={drag:{borderColor:hn,fillColor:gn,lerpFactor:fn},selection:Ub,grabbed:Ub},Gb=e=>{let t,n=null,r=0,i=0,a=1,o=null,s=null,c=null,l=[],f=null,p=[],m=Gt()?`display-p3`:`srgb`,h=()=>{t&&(a=Math.max(window.devicePixelRatio||1,2),r=document.documentElement.clientWidth||window.innerWidth,i=document.documentElement.clientHeight||window.innerHeight,t.width=r*a,t.height=i*a,t.style.width=`${r}px`,t.style.height=`${i}px`,n=t.getContext(`2d`,{colorSpace:m}),n&&n.scale(a,a))},g=e=>{if(!e)return 0;let t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):0},b=(e,t,n)=>({id:e,current:{x:t.x,y:t.y,width:t.width,height:t.height},target:{x:t.x,y:t.y,width:t.width,height:t.height},borderRadius:g(t.borderRadius),opacity:n?.opacity??1,targetOpacity:n?.targetOpacity??n?.opacity??1,createdAt:n?.createdAt,fadeStartTimestamp:null,isInitialized:!0}),x=(e,t,n)=>{let r=e.target;r.x=t.x,r.y=t.y,r.width=t.width,r.height=t.height,e.borderRadius=g(t.borderRadius),n!==void 0&&(n>e.targetOpacity&&(e.opacity=n),e.targetOpacity=n)},S=e=>e.boundsMultiple??[e.bounds],C=(e,t,n,r,i,a,o,s,c=1)=>{if(r<=0||i<=0)return;let l=Math.min(r/2,i/2),u=Math.min(a,l),d=c!==1;d&&(e.globalAlpha=c),e.beginPath(),u>0?e.roundRect(t,n,r,i,u):e.rect(t,n,r,i),e.fillStyle=o,e.fill(),e.strokeStyle=s,e.lineWidth=1,e.stroke(),d&&(e.globalAlpha=1)},w=()=>{if(!n||!e.dragVisible||!f)return;let t=Wb.drag;C(n,f.current.x,f.current.y,f.current.width,f.current.height,f.borderRadius,t.fillColor,t.borderColor)},T=()=>{if(!n||!e.selectionVisible)return;let t=Wb.selection;for(let e of l)C(n,e.current.x,e.current.y,e.current.width,e.current.height,e.borderRadius,t.fillColor,t.borderColor,e.opacity)},ee=e=>{if(!n)return;let t=Wb.grabbed;for(let r of e)C(n,r.current.x,r.current.y,r.current.width,r.current.height,r.borderRadius,t.fillColor,t.borderColor,r.opacity)},E=()=>{!n||!t||r<=0||i<=0||(n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.width,t.height),n.setTransform(a,0,0,a,0,0),w(),T(),ee(p))},te=(e,t,n)=>{let r=Rb(e.current.x,e.target.x,t),i=Rb(e.current.y,e.target.y,t),a=Rb(e.current.width,e.target.width,t),o=Rb(e.current.height,e.target.height,t),s=Math.abs(r-e.target.x)<.5&&Math.abs(i-e.target.y)<.5&&Math.abs(a-e.target.width)<.5&&Math.abs(o-e.target.height)<.5;e.current.x=s?e.target.x:r,e.current.y=s?e.target.y:i,e.current.width=s?e.target.width:a,e.current.height=s?e.target.height:o;let c=!0;if(n?.interpolateOpacity){let n=Rb(e.opacity,e.targetOpacity,t);c=Math.abs(n-e.targetOpacity)<mn,e.opacity=c?e.targetOpacity:n}return!s||!c},D=()=>{let e=performance.now(),t=c===null?pn:e-c;c=e;let n=Bb(Wb.drag.lerpFactor,t),r=Bb(Wb.selection.lerpFactor,t),i=Bb(Wb.grabbed.lerpFactor,t),a=!1,u=null;f?.isInitialized&&te(f,n)&&(a=!0);for(let e of l)e.isInitialized&&te(e,r)&&(a=!0);let d=Date.now();p=p.filter(t=>{let n=t.id.startsWith(`label-`);if(t.isInitialized&&te(t,i)&&(a=!0),n&&t.targetOpacity===0){t.fadeStartTimestamp===null&&(t.fadeStartTimestamp=e);let n=e-t.fadeStartTimestamp,r=Math.min(1,n/125),i=1-(1-r)*(1-r);return t.opacity=Math.max(0,1-i),r>=1?!1:(a=!0,!0)}else n&&(t.fadeStartTimestamp=null);if(t.createdAt!==void 0){let e=d-t.createdAt;if(e>=1625)return!1;if(e>1500){let n=Math.min(1,(e-rn)/125);t.opacity=1-(1-(1-n)*(1-n)),a=!0}else{let t=rn-e;u=u===null?t:Math.min(u,t)}return!0}return n?!0:t.opacity>0}),E(),a?o=lf(D):(o=null,c=null,u!==null&&(s=window.setTimeout(()=>{s=null,O()},Math.max(0,u))))},O=()=>{s!==null&&(window.clearTimeout(s),s=null),o===null&&(o=lf(D))},k=()=>{h(),O()};return d(_(()=>[e.selectionVisible,e.selectionBounds,e.selectionBoundsMultiple,e.selectionShouldSnap],([e,t,n,r])=>{if(!e||!t&&(!n||n.length===0)){l=[],O();return}let i;i=n&&n.length>0?n:t?[t]:[];let a=new Map;for(let e of l)a.set(e.id,e);l=i.map((e,t)=>{let n=`selection-${t}`,i=a.get(n);return i?(x(i,e),r&&(i.current.x=i.target.x,i.current.y=i.target.y,i.current.width=i.target.width,i.current.height=i.target.height),i):b(n,e)}),O()})),d(_(()=>[e.dragVisible,e.dragBounds],([e,t])=>{if(!e||!t){f=null,O();return}f?x(f,t):f=b(`drag`,t),O()})),d(_(()=>[e.grabbedBoxes,e.labelInstances],([e,t])=>{let n=e??[],r=t??[],i=new Map;for(let e of n)i.set(e.id,e);let a=new Map;for(let e of p)a.set(e.id,e);for(let e of n)if(!a.has(e.id)){let t=b(e.id,e.bounds,{createdAt:e.createdAt});p.push(t),a.set(e.id,t)}for(let e of p){let t=i.get(e.id);t&&x(e,t.bounds)}let o=new Set;for(let e of r){let t=S(e),n=e.status===`fading`?0:1;for(let r=0;r<t.length;r++){let i=t[r],s=`label-${e.id}-${r}`;o.add(s);let c=a.get(s);if(c)x(c,i,n);else{let e=b(s,i,{opacity:1,targetOpacity:n});p.push(e),a.set(s,e)}}}p=p.filter(e=>e.id.startsWith(`label-`)?o.has(e.id):i.has(e.id)),O()})),v(()=>{h(),O(),window.addEventListener(`resize`,k);let e=null,t=()=>{Math.max(window.devicePixelRatio||1,2)!==a&&(k(),n())},n=()=>{e&&e.removeEventListener(`change`,t),e=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),e.addEventListener(`change`,t)};n(),y(()=>{window.removeEventListener(`resize`,k),e&&e.removeEventListener(`change`,t),o!==null&&uf(o),s!==null&&window.clearTimeout(s)})}),(()=>{var e=Hb(),n=t;return typeof n==`function`?tt(n,e):t=e,u(t=>U(e,`z-index`,String(q))),e})()}})),qb,Jb,Yb=n((()=>{G(),R(),J(),io(),qb=z(`<div style=position:fixed;pointer-events:none;will-change:opacity;contain:strict;transform:translateZ(0)>`),Jb=e=>{let t=to(),n=t?getComputedStyle(t).borderRadius:`0px`,r=()=>t?.getBoundingClientRect()??null,[i,a]=c(r());if(t){let n=()=>a(r());v(()=>{let e=new ResizeObserver(n);e.observe(t),window.addEventListener(`scroll`,n,{capture:!0,passive:!0}),window.addEventListener(`resize`,n),y(()=>{e.disconnect(),window.removeEventListener(`scroll`,n,{capture:!0}),window.removeEventListener(`resize`,n)})}),d(()=>{e.visible&&n()})}let o=()=>{let e=i();return e?`${e.top}px`:`0`},s=()=>{let e=i();return e?`${e.left}px`:`0`},l=()=>{let e=i();return e?`${e.width}px`:`100%`},f=()=>{let e=i();return e?`${e.height}px`:`100%`};return(()=>{var t=qb();return U(t,`border-radius`,n),U(t,`z-index`,q),U(t,`transition`,`opacity 125ms ease-out`),U(t,`box-shadow`,`inset 0 0 50px ${yn}`),u(n=>{var r=o(),i=s(),a=l(),c=f(),u=+!!e.visible;return r!==n.e&&U(t,`top`,n.e=r),i!==n.t&&U(t,`left`,n.t=i),a!==n.a&&U(t,`width`,n.a=a),c!==n.o&&U(t,`height`,n.o=c),u!==n.i&&U(t,`opacity`,n.i=u),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t})()}})),Xb,Zb=n((()=>{Xb=(e,t)=>{e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,t)}px`}})),Qb,$b=n((()=>{io(),Qb=(e,t)=>{e&&e.focus(t)}})),ex,tx=n((()=>{J(),ex=e=>{if(e<=0)return 8;let t=e*bn;return Math.round(Math.max(4,Math.min(8,t)))}})),nx,rx=n((()=>{J(),nx=e=>e.isComposing||e.keyCode===229})),ix,$,ax=n((()=>{ix=e=>{if(typeof e==`string`||typeof e==`number`)return String(e);if(!e||typeof e!=`object`)return``;if(Array.isArray(e)){let t=``;for(let n of e){if(!n)continue;let e=ix(n);e&&(t=t?`${t} ${e}`:e)}return t}let t=``;for(let n in e)e[n]&&(t=t?`${t} ${n}`:n);return t},$=(...e)=>{let t=``;for(let n of e){if(!n)continue;let e=ix(n);e&&(t=t?`${t} ${e}`:e)}return t}})),ox,sx=n((()=>{ox=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}})),cx,lx,ux=n((()=>{G(),cx=z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M19.2929 12.7071C19.6834 13.0976 20.3166 13.0976 20.7071 12.7071C21.0976 12.3166 21.0976 11.6834 20.7071 11.2929L12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3C11.7348 3 11.4804 3.10536 11.2929 3.29289L3.29289 11.2929C2.90237 11.6834 2.90237 12.3166 3.29289 12.7071C3.68342 13.0976 4.31658 13.0976 4.70711 12.7071L11 6.41421L11 20C11 20.5523 11.4477 21 12 21C12.5523 21 13 20.5523 13 20L13 6.41422L19.2929 12.7071Z">`),lx=e=>{let t=()=>e.size??10;return(()=>{var n=cx();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&B(n,`width`,r.e=i),a!==r.t&&B(n,`height`,r.t=a),o!==r.a&&B(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),dx,fx,px=n((()=>{G(),dx=z(`<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>`),fx=e=>{let t=()=>e.size??16;return(()=>{var n=dx();return n.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling,u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&B(n,`width`,r.e=i),a!==r.t&&B(n,`height`,r.t=a),o!==r.a&&B(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),mx,hx,gx=n((()=>{G(),J(),tx(),mx=z(`<svg data-react-grab-arrow class="absolute block z-10"><path>`),hx=e=>{let t=()=>e.position===`bottom`,n=()=>ex(e.labelWidth??0),r=()=>n()*2,i=()=>n(),a=()=>{let e=r(),n=i(),a=1*Math.SQRT1_2,o=e/2,s=t()?n:0,c=t()?a:n-a,l=+!!t();return`M0 ${s} L${o-a} ${c} A1 1 0 0 ${l} ${o+a} ${c} L${e} ${s} Z`};return(()=>{var n=mx(),o=n.firstChild;return B(o,`fill`,$t),u(s=>{var c=r(),l=i(),u=`0 0 ${r()} ${i()}`,d=`calc(${e.leftPercent}% + ${e.leftOffsetPx}px)`,f=t()?`0`:void 0,p=t()?void 0:`0`,m=t()?`translateX(-50%) translateY(calc(-100% + 1px))`:`translateX(-50%) translateY(calc(100% - 1px))`,h=a();return c!==s.e&&B(n,`width`,s.e=c),l!==s.t&&B(n,`height`,s.t=l),u!==s.a&&B(n,`viewBox`,s.a=u),d!==s.o&&U(n,`left`,s.o=d),f!==s.i&&U(n,`top`,s.i=f),p!==s.n&&U(n,`bottom`,s.n=p),m!==s.s&&U(n,`transform`,s.s=m),h!==s.h&&B(o,`d`,s.h=h),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),n})()}})),_x,vx,yx,bx,xx,Sx,Cx,wx=n((()=>{G(),R(),ax(),_x=z(`<span> `),vx=z(`<span class=text-[var(--rg-text-secondary)]> `),yx=z(`<span class=text-[var(--rg-text-primary)]> `),bx=z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0">`),xx=z(`<button type=button>`),Sx=z(`<div>`),Cx=e=>{let t=()=>{e.onHoverChange?.(!0)},n=()=>{e.onHoverChange?.(!1)},r=()=>e.componentName?`${e.componentName}.${e.tagName}`:e.tagName,i=()=>(()=>{var t=bx();return W(t,j(M,{get when(){return e.componentName},get children(){return[(()=>{var t=_x(),n=t.firstChild;return u(()=>n.data=e.componentName),t})(),(()=>{var t=vx(),n=t.firstChild;return u(()=>n.data=`.${e.tagName}`),t})()]}}),null),W(t,j(M,{get when(){return!e.componentName},get children(){var t=yx(),n=t.firstChild;return u(()=>n.data=e.tagName),t}}),null),t})();return j(M,{get when(){return e.isClickable},get fallback(){return(()=>{var r=Sx();return H(r,`click`,e.onClick,!0),r.addEventListener(`mouseleave`,n),r.addEventListener(`mouseenter`,t),W(r,i),u(()=>V(r,$(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden`,e.shrink&&`shrink-0`))),r})()},get children(){var a=xx();return H(a,`click`,e.onClick,!0),a.addEventListener(`mouseleave`,n),a.addEventListener(`mouseenter`,t),W(a,i),u(t=>{var n=`Open source for ${r()}`,i=$(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden cursor-pointer bg-transparent border-none p-0 m-0 text-left`,e.shrink&&`shrink-0`);return n!==t.e&&B(a,`aria-label`,t.e=n),i!==t.t&&V(a,t.t=i),t},{e:void 0,t:void 0}),a}})},Ye([`click`])})),Tx,Ex,Dx=n((()=>{G(),Tx=z(`<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-[var(--rg-border-subtle)] antialiased">`),Ex=e=>(()=>{var t=Tx();return W(t,()=>e.children),t})()})),Ox,kx=n((()=>{ax(),Ox=(e,t={})=>(n={})=>{let r=t.variants;if(!r)return e;let i=[e];for(let e in r){let a=n[e]??t.defaultVariants?.[e];if(a===void 0)continue;let o=r[e][String(a)];o&&i.push(o)}return $(...i)}})),Ax,jx,Mx,Nx=n((()=>{G(),R(),ax(),kx(),Ax=z(`<div>`),jx=Ox(`contain-layout antialiased [font-synthesis:none] bg-[var(--rg-panel-bg)]`,{variants:{shape:{panel:`rounded-[14px] [corner-shape:superellipse(1.25)]`,pill:`rounded-full`}},defaultVariants:{shape:`panel`}}),Mx=e=>{let[t,n]=Se(e,[`shape`,`class`]);return(()=>{var e=Ax();return et(e,xe({get class(){return $(jx({shape:t.shape}),t.class)}},n),!1,!1),e})()}})),Px,Fx,Ix=n((()=>{Px=null,Fx={claim:e=>{Px=e},release:e=>{Px===e&&(Px=null)},isActive:e=>Px===e}})),Lx,Rx=n((()=>{R(),Ix(),io(),Lx=e=>{let t=Symbol(),n=ro(n=>{Fx.isActive(t)&&(La(n)||(n.code===`Enter`?e.onEnter?.(n):n.code===`Escape`&&e.onEscape?.(n)))});return v(()=>{Fx.claim(t),window.addEventListener(`keydown`,n,{capture:!0})}),y(()=>{Fx.release(t),window.removeEventListener(`keydown`,n,{capture:!0})}),{claimFocus:()=>Fx.claim(t)}}})),zx,Bx,Vx=n((()=>{G(),zx=z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M10.7071 21.2071C10.3166 21.5976 9.68342 21.5976 9.29289 21.2071L3.29289 15.2071C2.90237 14.8166 2.90237 14.1834 3.29289 13.7929L9.29289 7.79289C9.68342 7.40237 10.3166 7.40237 10.7071 7.79289C11.0976 8.18342 11.0976 8.81658 10.7071 9.20711L6.41421 13.5H16C16.5523 13.5 17 13.0523 17 12.5V3.5C17 2.94772 17.4477 2.5 18 2.5C18.5523 2.5 19 2.94772 19 3.5V12.5C19 14.1569 17.6569 15.5 16 15.5H6.41421L10.7071 19.7929C11.0976 20.1834 11.0976 20.8166 10.7071 21.2071Z">`),Bx=e=>{let t=()=>e.size??10;return(()=>{var n=zx();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&B(n,`width`,r.e=i),a!==r.t&&B(n,`height`,r.t=a),o!==r.a&&B(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),Hx,Ux,Wx,Gx=n((()=>{G(),R(),ax(),kx(),Hx=z(`<button>`),Ux=Ox(`contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all press-scale`,{variants:{variant:{chip:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-surface-hover)] [border-width:0.5px] border-solid border-[var(--rg-border-button)] hover:bg-[var(--rg-surface-active)] text-[var(--rg-text-primary)]`,destructive:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-error-bg)] hover:bg-[var(--rg-error-bg-hover)] text-[var(--rg-error-text)]`,ghost:`rounded-sm bg-transparent hover:bg-[var(--rg-surface-hover)] border-none outline-none p-0`}},defaultVariants:{variant:`chip`}}),Wx=e=>{let[t,n]=Se(e,[`variant`,`class`,`type`]);return(()=>{var e=Hx();return et(e,xe({get type(){return t.type??`button`},get class(){return $(Ux({variant:t.variant}),t.class)}},n),!1,!1),e})()}})),Kx,qx,Jx,Yx,Xx,Zx,Qx=n((()=>{G(),R(),Rx(),Vx(),Gx(),Dx(),Kx=z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">No`),qx=z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Copy`),Jx=z(`<span class="text-[var(--rg-error-text)] text-[13px] leading-3.5 font-sans font-medium">Yes`),Yx=z(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),Xx=z(`<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-[var(--rg-text-primary)] text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit"> `),Zx=e=>{let t=()=>e.showCancel??!0,{claimFocus:n}=Lx({onEnter:t=>{t.preventDefault(),t.stopPropagation();let n=t.composedPath()[0],r=n instanceof HTMLElement?n:null;if(r?.closest(`[data-react-grab-discard-copy]`)){e.onCopy?.();return}if(r?.closest(`[data-react-grab-discard-no]`)){e.onCancel?.();return}e.onConfirm?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.cancelOnEscape?e.onCancel?.():e.onConfirm?.()}});return(()=>{var r=Xx(),i=r.firstChild.firstChild.firstChild;return H(r,`click`,n,!0),H(r,`pointerdown`,n,!0),W(r,j(Ex,{get children(){var n=Yx();return W(n,j(M,{get when(){return t()},get children(){return j(Wx,{"data-react-grab-discard-no":!0,get onClick(){return e.onCancel},get children(){return Kx()}})}}),null),W(n,j(M,{get when(){return e.onCopy},get children(){return j(Wx,{"data-react-grab-discard-copy":!0,get onClick(){return e.onCopy},get children(){return qx()}})}}),null),W(n,j(Wx,{variant:`destructive`,class:`gap-0.5`,"data-react-grab-discard-yes":!0,get onClick(){return e.onConfirm},get children(){return[Jx(),j(Bx,{size:10,class:`text-[var(--rg-error-text)] opacity-50`})]}}),null),n}}),null),u(()=>i.data=e.label??`Discard?`),r})()},Ye([`pointerdown`,`click`])})),$x,eS,tS=n((()=>{G(),$x=z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7 2C4.23858 2 2 4.23858 2 7V15C2 17.7614 4.23858 20 7 20H8C8.55228 20 9 19.5523 9 19C9 18.4477 8.55228 18 8 18H7C5.34315 18 4 16.6569 4 15V7C4 5.34315 5.34315 4 7 4H17C18.6569 4 20 5.34315 20 7V15C20 16.6569 18.6569 18 17 18H14.4142L16.2071 16.2071C16.5976 15.8166 16.5976 15.1834 16.2071 14.7929C15.8166 14.4024 15.1834 14.4024 14.7929 14.7929L11.2929 18.2929C11.197 18.3888 11.1247 18.4993 11.0759 18.6172C11.027 18.7351 11 18.8644 11 19C11 19.2728 11.1093 19.5201 11.2864 19.7005C11.2889 19.7031 11.2914 19.7056 11.2939 19.7081L14.7929 23.2071C15.1834 23.5976 15.8166 23.5976 16.2071 23.2071C16.5976 22.8166 16.5976 22.1834 16.2071 21.7929L14.4142 20H17C19.7614 20 22 17.7614 22 15V7C22 4.23858 19.7614 2 17 2H7Z">`),eS=e=>{let t=()=>e.size??12;return(()=>{var n=$x();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&B(n,`width`,r.e=i),a!==r.t&&B(n,`height`,r.t=a),o!==r.a&&B(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),nS,rS,iS,aS,oS,sS=n((()=>{G(),R(),Rx(),tS(),Gx(),Dx(),nS=z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Retry`),rS=z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Ok`),iS=z(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),aS=z(`<div data-react-grab-error role=alert aria-live=assertive 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-[var(--rg-error-text)] text-[13px] leading-4 font-sans font-medium overflow-hidden line-clamp-5"> `),oS=e=>{let{claimFocus:t}=Lx({onEnter:t=>{if(Jg(t,`data-react-grab-error-ok`)){t.preventDefault(),t.stopPropagation(),e.onAcknowledge?.();return}t.preventDefault(),t.stopPropagation(),e.onRetry?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onAcknowledge?.()}}),n=()=>!!(e.onRetry||e.onAcknowledge);return(()=>{var r=aS(),i=r.firstChild,a=i.firstChild,o=a.firstChild;return H(r,`click`,t,!0),H(r,`pointerdown`,t,!0),W(r,j(M,{get when(){return n()},get children(){return j(Ex,{get children(){var t=iS();return W(t,j(M,{get when(){return e.onRetry},get children(){return j(Wx,{"data-react-grab-retry":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,get onClick(){return e.onRetry},get children(){return[nS(),j(eS,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-text-secondary)]`})]}})}}),null),W(t,j(M,{get when(){return e.onAcknowledge},get children(){return j(Wx,{"data-react-grab-error-ok":!0,class:`gap-1`,"aria-keyshortcuts":`Escape`,get onClick(){return e.onAcknowledge},get children(){return rS()}})}}),null),t}})}}),null),u(t=>{var r={"pt-1.5 pb-1":n(),"py-1.5":!n()},s=e.error,c=e.error;return t.e=Qe(i,r,t.e),s!==t.t&&B(a,`title`,t.t=s),c!==t.a&&(o.data=t.a=c),t},{e:void 0,t:void 0,a:void 0}),r})()},Ye([`pointerdown`,`click`])})),cS,lS,uS=n((()=>{G(),cS=z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7.5 12C7.5 13.3807 6.38071 14.5 5 14.5C3.61929 14.5 2.5 13.3807 2.5 12C2.5 10.6193 3.61929 9.5 5 9.5C6.38071 9.5 7.5 10.6193 7.5 12ZM14.5 12C14.5 13.3807 13.3807 14.5 12 14.5C10.6193 14.5 9.5 13.3807 9.5 12C9.5 10.6193 10.6193 9.5 12 9.5C13.3807 9.5 14.5 10.6193 14.5 12ZM19 14.5C20.3807 14.5 21.5 13.3807 21.5 12C21.5 10.6193 20.3807 9.5 19 9.5C17.6193 9.5 16.5 10.6193 16.5 12C16.5 13.3807 17.6193 14.5 19 14.5Z">`),lS=e=>{let t=()=>e.size??14;return(()=>{var n=cS();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&B(n,`width`,r.e=i),a!==r.t&&B(n,`height`,r.t=a),o!==r.a&&B(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),dS,fS,pS=n((()=>{G(),dS=z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM17.7071 10.7071C18.0976 10.3166 18.0976 9.68342 17.7071 9.29289C17.3166 8.90237 16.6834 8.90237 16.2929 9.29289L11 14.5858L8.70711 12.2929C8.31658 11.9024 7.68342 11.9024 7.29289 12.2929C6.90237 12.6834 6.90237 13.3166 7.29289 13.7071L10.2929 16.7071C10.6834 17.0976 11.3166 17.0976 11.7071 16.7071L17.7071 10.7071Z">`),fS=e=>{let t=()=>e.size??14;return(()=>{var n=dS();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&B(n,`width`,r.e=i),a!==r.t&&B(n,`height`,r.t=a),o!==r.a&&B(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),mS,hS,gS,_S,vS,yS,bS=n((()=>{G(),R(),J(),Rx(),Yg(),Vx(),uS(),ax(),Gx(),Nx(),pS(),mS=z(`<button type=button data-react-grab-ignore-events data-react-grab-more-options aria-label="More options">`),hS=z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Keep`),gS=z(`<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-[var(--rg-text-primary)] 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">`),_S=z(`<div class="contain-layout shrink-0 flex items-center gap-0.5 py-1.5 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0"> `),vS=e=>(()=>{var t=mS();return H(t,`click`,t=>{t.stopImmediatePropagation(),e.onClick()}),H(t,`pointerdown`,e=>{e.stopImmediatePropagation()}),W(t,j(lS,{size:14,"aria-hidden":`true`,class:`opacity-50 group-hover:opacity-100 transition-opacity`})),u(()=>V(t,$(Ux({variant:`ghost`}),`group size-4 text-[var(--rg-text-secondary)] hover:text-[var(--rg-text-primary)]`))),t})(),yS=e=>{let t,n,[r,i]=c(!1),[a,o]=c(!1),s=()=>r()?`Copied`:e.statusText,l=()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n),o(!0),e.onFadingChange?.(!0),e.onShowContextMenu?.()},d=()=>{r()||(i(!0),t=window.setTimeout(()=>{o(!0),e.onFadingChange?.(!0),n=window.setTimeout(()=>{e.onDismiss?.()},125)},rn-125))},{claimFocus:f}=Lx({onEnter:e=>{if(Jg(e,`data-react-grab-more-options`)){e.preventDefault(),e.stopPropagation(),l();return}Jg(e,`data-react-grab-context-menu`)||(e.preventDefault(),e.stopPropagation(),d())},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onDismiss?.()}});return y(()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n)}),j(Mx,{shape:`pill`,"data-react-grab-completion":!0,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,class:`shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px] transition-opacity duration-100 ease-out`,get style(){return{opacity:+!a()}},onPointerDown:f,onClick:f,get children(){return[j(M,{get when(){return bt(()=>!r())()&&e.onDismiss},get children(){var t=gS(),n=t.firstChild,i=n.firstChild,a=n.nextSibling;return W(a,j(M,{get when(){return e.onShowContextMenu},get children(){return j(vS,{onClick:l})}}),null),W(a,j(M,{get when(){return e.onDismiss},get children(){return j(Wx,{"data-react-grab-dismiss":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,onClick:d,get disabled(){return r()},get"aria-disabled"(){return r()},get children(){return[hS(),j(M,{get when(){return!r()},get children(){return j(Bx,{size:10,class:`text-[var(--rg-text-secondary)]`})}})]}})}}),null),u(()=>i.data=s()),t}}),j(M,{get when(){return r()||!e.onDismiss},get children(){var t=_S(),n=t.firstChild,r=n.firstChild;return W(t,j(fS,{size:14,"aria-hidden":`true`,class:`text-[var(--rg-text-primary-85)] shrink-0`}),n),W(t,j(M,{get when(){return e.onShowContextMenu},get children(){return j(vS,{onClick:l})}}),null),u(()=>r.data=s()),t}})]}})}})),xS,SS,CS,wS,TS,ES,DS,OS,kS=n((()=>{G(),R(),J(),Zb(),$b(),tx(),Eg(),rx(),io(),ax(),sx(),ux(),px(),gx(),wx(),Dx(),Nx(),Qx(),sS(),bS(),xS=z(`<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"> `),SS=z(`<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 py-1.5">`),CS=z(`<button data-react-grab-submit type=button aria-label="Submit context"class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-[var(--rg-submit-bg)] cursor-pointer ml-1 interactive-scale a11y-hitbox">`),wS=z(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input aria-label="Add context for selected element"aria-keyshortcuts="Enter Escape"class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-medium bg-transparent border-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;scrollbar-width:none>`),TS=z(`<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">`),ES=z(`<div data-react-grab-ignore-events data-react-grab-selection-label class="fixed font-sans text-[13px] antialiased select-none">`),DS={left:Hn,top:Hn,arrowLeftPercent:50,arrowLeftOffset:0,edgeOffsetX:0},OS=e=>{let t,n,r,i=!1,[a,o]=c(0),[s,l]=c(0),[p,m]=c(0),[h,g]=c(0),[b,x]=c(!1),[S,C]=c(!1),w=()=>e.status!==`copying`&&e.status!==`copied`&&e.status!==`fading`&&e.status!==`error`,T=()=>e.status===`copied`||e.status===`fading`,ee=()=>!!(e.isPromptMode||e.discardPrompt||T()&&(e.onDismiss||e.onShowContextMenu)||e.status===`error`&&(e.onAcknowledgeError||e.onRetry)),E,te=e=>{i=e},D=()=>{g(e=>e+1)};v(()=>{let e=to();if(E=new ResizeObserver(r=>{for(let a of r){let r=a.target.getBoundingClientRect();a.target===t&&!i?(o(r.width),l(r.height)):a.target===n?m(r.width):a.target===e&&D()}}),e&&E.observe(e),t){let e=t.getBoundingClientRect();o(e.width),l(e.height),E.observe(t)}n&&(m(n.getBoundingClientRect().width),E.observe(n)),window.addEventListener(`scroll`,D,!0),window.addEventListener(`resize`,D),window.visualViewport?.addEventListener(`resize`,D),window.visualViewport?.addEventListener(`scroll`,D)}),y(()=>{E?.disconnect(),window.removeEventListener(`scroll`,D,!0),window.removeEventListener(`resize`,D),window.visualViewport?.removeEventListener(`resize`,D),window.visualViewport?.removeEventListener(`scroll`,D)});let O=()=>`${e.tagName??``}:${e.componentName??``}`,k=f(t=>{h();let n=O(),r=n===t.elementIdentity?t:{position:DS,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:n},i=e.selectionBounds,o=a(),c=s(),l=o>0&&c>0,u=i&&i.width>0&&i.height>0;if(!l||!u)return{position:r.hadValidBounds?r.position:DS,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let d=Tg(),f=d.offsetLeft,m=d.offsetTop,g=f+d.width,_=m+d.height;if(!(i.x+i.width>f&&i.x<g&&i.y+i.height>m&&i.y<_))return{position:DS,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let v=i.x+i.width/2,y=e.mouseX??v,b=i.y+i.height,x=i.y,S=e.hideArrow?0:ex(p()),C=y,w=0,T=b+S+4,ee=C-o/2,E=C+o/2;E>g-8&&(w=g-8-E),ee+w<f+8&&(w=f+8-ee);let te=c+S+4,D=T+c<=_-8;D||(T=x-te),T<m+8&&(T=m+8);let k=o/2,ne=k-w,re=Math.min(16,k),ie=Math.max(o-16,k),ae=Math.max(re,Math.min(ie,ne))-k;return{position:{left:C,top:T,arrowLeftPercent:50,arrowLeftOffset:ae,edgeOffsetX:w},computedArrowPosition:D?`bottom`:`top`,hadValidBounds:!0,elementIdentity:n}},{position:DS,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:``}),ne=()=>k().computedArrowPosition??`bottom`,re=()=>k().hadValidBounds;d(_(()=>e.selectionLabelShakeCount,()=>C(!0),{defer:!0}));let ie=t=>{if(nx(t))return;t.stopImmediatePropagation();let n=t.code===`Enter`&&!t.shiftKey,r=t.code===`Escape`;n?(t.preventDefault(),e.onSubmit?.()):r&&(t.preventDefault(),e.onConfirmDismiss?.())},ae=t=>{let n=t.target;n instanceof HTMLTextAreaElement&&(Xb(n,95),e.onInputChange?.(n.value))},A=()=>ox({tagName:e.tagName,componentName:e.componentName,elementsCount:e.elementsCount}),oe=f(()=>!(e.error||e.discardPrompt||w()&&e.isPromptMode)),se=t=>{t.stopImmediatePropagation(),e.filePath&&e.onOpen&&e.onOpen()},ce=t=>{t.stopImmediatePropagation(),w()&&e.isPromptMode&&!e.discardPrompt&&e.onSubmit&&r&&Qb(r,{preventScroll:!0})},le=()=>re()&&(T()||e.status===`error`);return j(M,{get when(){return bt(()=>e.visible!==!1)()&&(e.selectionBounds||le())},get children(){var i=ES();i.addEventListener(`mouseleave`,()=>e.onHoverChange?.(!1)),i.addEventListener(`mouseenter`,()=>e.onHoverChange?.(!0)),i.$$click=e=>{e.stopImmediatePropagation()},i.$$pointerdown=ce;var a=t;return typeof a==`function`?tt(a,i):t=i,U(i,`z-index`,`${un}`),U(i,`transition`,`opacity 125ms ease-out, filter 125ms ease-out`),W(i,j(M,{get when(){return!e.hideArrow},get children(){return j(hx,{get position(){return ne()},get leftPercent(){return k().position.arrowLeftPercent},get leftOffsetPx(){return k().position.arrowLeftOffset},get labelWidth(){return p()}})}}),null),W(i,j(M,{get when(){return bt(()=>!!T())()&&!e.error},get children(){return j(yS,{get statusText(){return e.statusText??`Copied`},get onDismiss(){return e.onDismiss},onFadingChange:x,get onShowContextMenu(){return e.onShowContextMenu}})}}),null),W(i,j(Mx,{ref:e=>n=e,get shape(){return oe()?`pill`:`panel`},get class(){return $(`flex items-center gap-[5px] w-fit h-fit p-0`,S()&&`animate-shake`)},get style(){return{display:T()&&!e.error?`none`:void 0}},onAnimationEnd:()=>C(!1),get children(){return[j(M,{get when(){return e.status===`copying`},get children(){var t=xS(),n=t.firstChild,r=n.firstChild,i=r.firstChild;return W(n,j(fx,{size:13,class:`text-[var(--rg-text-secondary)] shrink-0`}),r),u(()=>i.data=e.statusText??`Grabbing…`),t}}),j(M,{get when(){return bt(()=>!!(w()&&!e.isPromptMode))()&&!e.discardPrompt},get children(){var t=SS(),n=t.firstChild;return W(n,j(Cx,{get tagName(){return A().tagName},get componentName(){return A().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:se,onHoverChange:te,shrink:!0})),t}}),j(M,{get when(){return bt(()=>!!(w()&&e.isPromptMode))()&&!e.discardPrompt},get children(){var t=TS(),n=t.firstChild;return W(n,j(Cx,{get tagName(){return A().tagName},get componentName(){return A().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:se,onHoverChange:te})),W(t,j(Ex,{get children(){var t=wS(),n=t.firstChild;return n.$$keydown=ie,n.$$input=ae,tt(t=>{r=t,e.onSubmit&&queueMicrotask(()=>{Qb(t,{preventScroll:!0}),Xb(t,95)})},n),U(n,`max-height`,`95px`),W(t,j(M,{get when(){return e.onSubmit},get children(){var t=CS();return t.$$click=()=>e.onSubmit?.(),W(t,j(lx,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-submit-fg)]`})),t}}),null),u(()=>n.readOnly=!e.onSubmit),u(()=>n.value=e.inputValue??``),t}}),null),t}}),j(M,{get when(){return e.discardPrompt},keyed:!0,children:e=>j(Zx,{get label(){return bt(()=>!!e.isKeyboardSelection)()?`Discard selection?`:e.label},get showCancel(){return!e.isKeyboardSelection},get cancelOnEscape(){return e.cancelOnEscape},get onConfirm(){return e.onConfirm},get onCopy(){return e.onCopy},onCancel:()=>{e.isKeyboardSelection||e.onCancel?.(),Qb(r,{preventScroll:!0})}})}),j(M,{get when(){return e.error},get children(){return j(oS,{get error(){return e.error},get onAcknowledge(){return e.onAcknowledgeError},get onRetry(){return e.onRetry}})}})]}}),null),u(t=>{var n=`${k().position.top}px`,r=`${k().position.left}px`,a=`translateX(calc(-50% + ${k().position.edgeOffsetX}px))`,o=ee()?`auto`:`none`,s=e.status===`fading`||b()?0:1,c=`drop-shadow(${en}) blur(${e.status===`fading`||b()?`3px`:`0`})`;return n!==t.e&&U(i,`top`,t.e=n),r!==t.t&&U(i,`left`,t.t=r),a!==t.a&&U(i,`transform`,t.a=a),o!==t.o&&U(i,`pointer-events`,t.o=o),s!==t.i&&U(i,`opacity`,t.i=s),c!==t.n&&U(i,`filter`,t.n=c),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),i}})},Ye([`pointerdown`,`click`,`input`,`keydown`])})),AS,jS,MS=n((()=>{G(),ax(),J(),AS=z(`<span style="transition-property:transform;transition-timing-function:cubic-bezier(0.32, 0.72, 0, 1)"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M20.8977 4.02356L21.8277 4.39121C22.3784 2.99813 21.0382 1.60206 19.6238 2.09546L3.47334 7.72936C1.38661 8.45728 1.49021 11.443 3.6224 12.0245L10.1289 13.799L11.2331 19.8724C11.638 22.0991 14.7072 22.4019 15.5393 20.2972L21.8277 4.39121L20.8977 4.02356Z">`),jS=e=>{let t=()=>e.size??14,n=()=>e.rotationDeg??0;return(()=>{var r=AS(),i=r.firstChild;return U(r,`transition-duration`,`180ms`),u(a=>{var o=$(`inline-flex items-center justify-center will-change-transform`,e.class),s=`rotate(${n()}deg)`,c=t(),l=t();return o!==a.e&&V(r,a.e=o),s!==a.t&&U(r,`transform`,a.t=s),c!==a.a&&B(i,`width`,a.a=c),l!==a.o&&B(i,`height`,a.o=l),a},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()}})),NS,PS,FS,IS,LS=n((()=>{G(),R(),ax(),J(),NS=z(`<div> `),PS=0,FS=()=>Date.now()-PS<800,IS=e=>{let[t,n]=c(!1),[r,i]=c(!0),a;d(_(()=>e.visible,e=>{a!==void 0&&(clearTimeout(a),a=void 0),e?FS()?(i(!1),n(!0)):(i(!0),a=setTimeout(()=>{n(!0)},400)):(t()&&(PS=Date.now()),n(!1))})),y(()=>{a!==void 0&&clearTimeout(a),t()&&(PS=Date.now())});let o=()=>e.position===`top`||e.position===`bottom`?{left:`50%`,translate:`-50%`,"z-index":`${un}`}:{top:`50%`,translate:`0 -50%`,"z-index":`${un}`};return j(M,{get when(){return t()},get children(){var t=NS(),n=t.firstChild;return u(i=>{var a=$(`absolute whitespace-nowrap px-2 py-0.5 rounded-full text-[10px] font-sans font-medium leading-4 pointer-events-none`,`bg-[var(--rg-panel-bg)] text-[var(--rg-text-primary)] [box-shadow:var(--rg-shadow)]`,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`,r()&&`animate-tooltip-fade-in`),s=o(),c=e.textContent;return a!==i.e&&V(t,i.e=a),i.t=$e(t,s,i.t),c!==i.a&&(n.data=i.a=c),i},{e:void 0,t:void 0,a:void 0}),t}})}})),RS,zS,BS=n((()=>{G(),R(),LS(),RS=z(`<div><button data-react-grab-ignore-events type=button>`),zS=e=>(()=>{var t=RS(),n=t.firstChild;H(n,`mouseleave`,e.onMouseLeave),H(n,`mouseenter`,e.onMouseEnter),H(n,`contextmenu`,t=>e.onContextMenu?.(t)),H(n,`click`,e.onClick,!0);var r=e.ref;return typeof r==`function`?tt(r,n):e.ref=n,W(n,()=>e.icon),W(t,j(M,{get when(){return e.tooltip},children:t=>j(IS,{get visible(){return!!e.tooltipVisible},get position(){return e.tooltipPosition??`top`},get textContent(){return t()}})}),null),u(r=>{var i=e.wrapperClass,a=e.isToggle?``:void 0,o=e.actionId,s=e.label,c=!!e.isActive,l=e.class;return i!==r.e&&V(t,r.e=i),a!==r.t&&B(n,`data-react-grab-toolbar-toggle`,r.t=a),o!==r.a&&B(n,`data-react-grab-toolbar-action`,r.a=o),s!==r.o&&B(n,`aria-label`,r.o=s),c!==r.i&&B(n,`aria-pressed`,r.i=c),l!==r.n&&V(n,r.n=l),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})(),Ye([`click`])})),VS,HS,US,WS,GS,KS,qS,JS=n((()=>{J(),Eg(),cg(),VS=e=>e===`top`||e===`bottom`,HS=e=>{let t=VS(e);return{width:t?30:16,height:t?16:30}},US=(e,t,n,r)=>{let i=Tg(),a=i.width,o=i.height,s=i.offsetLeft+16,c=Math.max(s,i.offsetLeft+a-n-16),l=i.offsetTop+16,u=Math.max(l,i.offsetTop+o-r-16);if(VS(e)){let r=Math.max(0,a-n-32);return{x:Math.min(c,Math.max(s,i.offsetLeft+16+r*t)),y:e===`top`?l:u}}let d=Math.max(0,o-r-32),f=Math.min(u,Math.max(l,i.offsetTop+16+d*t));return{x:e===`left`?s:c,y:f}},WS=(e,t,n,r,i)=>{let a=Tg(),o=a.width,s=a.height;if(VS(e)){let e=o-r-32;return e<=0?Nn:Math.max(0,Math.min(1,(t-a.offsetLeft-16)/e))}let c=s-i-32;return c<=0?Nn:Math.max(0,Math.min(1,(n-a.offsetTop-16)/c))},GS=(e,t,n,r,i)=>{let a=Tg(),o=a.width,s=a.height,{width:c,height:l}=n,u;if(VS(t)){let n=(c-r)/2;u={x:sg(e.x-n,a.offsetLeft+16,a.offsetLeft+o-c-16),y:t===`top`?a.offsetTop+16:a.offsetTop+s-l-16}}else{let n=(l-i)/2,r=sg(e.y-n,a.offsetTop+16,a.offsetTop+s-l-16);u={x:t===`left`?a.offsetLeft+16:a.offsetLeft+o-c-16,y:r}}let d=WS(t,u.x,u.y,c,l);return{position:u,ratio:d}},KS=(e,t,n,r)=>{let i=Tg(),{width:a,height:o}=n,{width:s,height:c}=r;switch(e){case`top`:case`bottom`:{let n=(a-s)/2;return{x:sg(t.x+n,i.offsetLeft,i.offsetLeft+i.width-s),y:e===`top`?i.offsetTop:i.offsetTop+i.height-c}}case`left`:case`right`:{let n=(o-c)/2,r=sg(t.y+n,i.offsetTop,i.offsetTop+i.height-c);return{x:e===`left`?i.offsetLeft:i.offsetLeft+i.width-s,y:r}}}},qS=(e,t,n,r,i,a)=>{let o=Tg(),s=o.width,c=o.height,l=e+i*150,u=t+a*150,d=u-o.offsetTop+r/2,f=o.offsetTop+c-u-r/2,p=l-o.offsetLeft+n/2,m=o.offsetLeft+s-l-n/2,h=Math.min(d,f,p,m),g=e=>sg(e,o.offsetLeft+16,o.offsetLeft+s-n-16),_=e=>sg(e,o.offsetTop+16,o.offsetTop+c-r-16);return h===d?{edge:`top`,x:g(l),y:o.offsetTop+16}:h===p?{edge:`left`,x:o.offsetLeft+16,y:_(u)}:h===m?{edge:`right`,x:o.offsetLeft+s-n-16,y:_(u)}:{edge:`bottom`,x:g(l),y:o.offsetTop+c-r-16}}})),YS,XS,ZS=n((()=>{G(),YS=z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M9.29289 16.7071C8.90237 16.3166 8.90237 15.6834 9.29289 15.2929L12.5858 12L9.29289 8.70711C8.90237 8.31658 8.90237 7.68342 9.29289 7.29289C9.68342 6.90237 10.3166 6.90237 10.7071 7.29289L14.7071 11.2929C14.8946 11.4804 15 11.7348 15 12C15 12.2652 14.8946 12.5196 14.7071 12.7071L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071Z">`),XS=e=>{let t=()=>e.size??14;return(()=>{var n=YS();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&B(n,`width`,r.e=i),a!==r.t&&B(n,`height`,r.t=a),o!==r.a&&B(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),QS,$S,eC=n((()=>{G(),ax(),JS(),ZS(),QS=z(`<div data-react-grab-toolbar-panel><div><div><div></div></div></div><button data-react-grab-ignore-events data-react-grab-toolbar-collapse type=button class="group contain-layout shrink-0 flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox">`),$S=e=>{let t=()=>e.snapEdge??`bottom`,n=()=>!VS(t()),r=()=>e.isCollapsed?`duration-140`:`duration-220`,i=()=>n()?`transition-[grid-template-rows] ${r()} ease-drawer`:`transition-[grid-template-columns] ${r()} ease-drawer`,a=()=>n()?`min-h-0`:`min-w-0`,o=()=>e.isCollapsed?`${{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]`}[t()]} ${n()?`px-0.25 py-2`:`px-2 py-0.25`}`:``,s=()=>{let n=e.isCollapsed;switch(t()){case`top`:return n?`rotate-90`:`-rotate-90`;case`bottom`:return n?`-rotate-90`:`rotate-90`;case`left`:return n?`rotate-0`:`rotate-180`;case`right`:return n?`rotate-180`:`rotate-0`;default:return`-rotate-90`}},c=()=>{if(e.isChevronPressed)return n()?`scale(0.97, 1)`:`scale(1, 0.97)`},l=()=>e.isChevronPressed?`transition-[padding,border-radius,transform] duration-60 ease-[cubic-bezier(0,0,0.2,1)]`:`transition-[padding,border-radius,transform] ${r()} ease-drawer`;return(()=>{var t=QS(),r=t.firstChild,d=r.firstChild,f=d.firstChild,p=r.nextSibling;return H(t,`click`,e.onPanelClick,!0),H(t,`animationend`,e.onAnimationEnd),W(f,()=>e.actionButtons),H(p,`pointercancel`,e.onCollapsePointerLeave),H(p,`pointerleave`,e.onCollapsePointerLeave),H(p,`pointerup`,e.onCollapsePointerUp,!0),H(p,`pointerdown`,e.onCollapsePointerDown),H(p,`click`,e.onCollapseClick,!0),W(p,j(XS,{size:18,get class(){return $(`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)] transition-[transform,color] duration-150 ease-drawer -m-0.5`,s())}})),u(s=>{var u=$(`flex items-center justify-center rounded-[13px] antialiased relative overflow-visible [font-synthesis:none]`,l(),n()&&`flex-col`,`bg-[var(--rg-panel-bg)] [box-shadow:var(--rg-shadow)]`,!e.isCollapsed&&(n()?`px-1.5 gap-0 py-2`:`py-1.5 gap-0 px-2`),o(),e.isShaking&&(n()?`animate-shake-vertical`:`animate-shake`)),m=e.transformOrigin,h=c(),g=$(`grid relative overflow-visible`,i(),e.isCollapsed?n()?`grid-rows-[0fr] pointer-events-none`:`grid-cols-[0fr] pointer-events-none`:n()?`grid-rows-[1fr]`:`grid-cols-[1fr]`),_=$(`flex`,n()?`flex-col items-center min-h-0`:`items-center min-w-0`,e.isCollapsed?`opacity-0`:`opacity-100`,e.isCollapsed?`transition-opacity duration-100 ease-drawer`:`transition-opacity duration-180 ease-drawer delay-[80ms]`),v=$(`relative overflow-visible flex`,n()?`flex-col items-center`:`items-center`,a()),y=e.isCollapsed?`Expand toolbar`:`Collapse toolbar`,b=!e.isCollapsed;return u!==s.e&&V(t,s.e=u),m!==s.t&&U(t,`transform-origin`,s.t=m),h!==s.a&&U(t,`transform`,s.a=h),g!==s.o&&V(r,s.o=g),_!==s.i&&V(d,s.i=_),v!==s.n&&V(f,s.n=v),y!==s.s&&B(p,`aria-label`,s.s=y),b!==s.h&&B(p,`aria-expanded`,s.h=b),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),t})()},Ye([`click`,`pointerup`])})),tC,nC=n((()=>{R(),J(),ff(),io(),JS(),tC=e=>{let[t,n]=c(!1),[r,i]=c(!1),[a,o]=c(!1),[s,l]=c({x:0,y:0}),u={x:0,y:0},d={x:0,y:0,time:0},f={x:0,y:0},p=!1,m,h,g=null,_=()=>{g?.abort(),g=null},v=()=>{m!==void 0&&(uf(m),m=void 0)},b=t=>{if(!a()){if(Math.hypot(t.clientX-f.x,t.clientY-f.y)<=5)return;o(!0),e.onDragStart()}let n=performance.now(),r=n-d.time;r>0&&l({x:(t.clientX-d.x)/r,y:(t.clientY-d.y)/r}),d={x:t.clientX,y:t.clientY,time:n};let i=t.clientX-u.x,s=t.clientY-u.y;e.onPositionUpdate({x:i,y:s})},x=()=>{_();let t=a();if(n(!1),!t)return;p=!0;let r=e.getContainerRef(),o=r?.getBoundingClientRect();if(!o)return;let c=s(),l=qS(o.left,o.top,o.width,o.height,c.x,c.y),u=WS(l.edge,l.x,l.y,o.width,o.height);e.onSnapEdgeChange(l.edge,u),i(!0),v(),m=lf(()=>{let t=r?.getBoundingClientRect(),n=t?{width:t.width,height:t.height}:e.getExpandedDimensions();m=lf(()=>{m=void 0;let t=US(l.edge,u,n.width,n.height);e.onSnapComplete({edge:l.edge,ratio:u,position:t,expandedDimensions:n}),h=setTimeout(()=>{i(!1),e.onSnapAnimationEnd?.()},300)})})},S=ro(t=>{if(t.button!==0||e.isCollapsed()||r())return;let i=e.getContainerRef()?.getBoundingClientRect();if(!i)return;f={x:t.clientX,y:t.clientY},u={x:t.clientX-i.left,y:t.clientY-i.top},n(!0),o(!1),l({x:0,y:0}),d={x:t.clientX,y:t.clientY,time:performance.now()},_(),g=new AbortController;let{signal:a}=g;window.addEventListener(`pointermove`,b,{signal:a}),window.addEventListener(`pointerup`,x,{signal:a}),window.addEventListener(`pointercancel`,x,{signal:a})});return y(()=>{_(),v(),clearTimeout(h)}),{isDragging:t,isSnapping:r,handlePointerDown:S,createDragAwareHandler:e=>t=>{if(t.stopImmediatePropagation(),p){p=!1;return}e()}}}})),rC,iC,aC=n((()=>{rC=360,iC=(e,t)=>{let n=t-e;return e+(n-Math.round(n/rC)*rC)}})),oC,sC=n((()=>{oC=e=>{e.type===`contextmenu`&&e.preventDefault(),e.stopImmediatePropagation()}})),cC,lC=n((()=>{cC=(e,t,n,r)=>Math.max(r,Math.min(e,n-t-r))})),uC,dC=n((()=>{lC(),uC=({anchor:e,measuredWidth:t,measuredHeight:n,viewportLeft:r=0,viewportTop:i=0,viewportWidth:a,viewportHeight:o,anchorGapPx:s,viewportPaddingPx:c,offscreenPosition:l})=>{if(!e||t===0||n===0)return l;let u,d;return e.edge===`left`||e.edge===`right`?(u=e.edge===`left`?e.x+s:e.x-t-s,d=e.y-n/2):(u=e.x-t/2,d=e.edge===`top`?e.y+s:e.y-n-s),{left:r+cC(u-r,t,a,c),top:i+cC(d-i,n,o,c)}}})),fC,pC=n((()=>{R(),J(),dC(),Eg(),io(),ff(),fC=(e,t)=>{let[n,r]=c(0),[i,a]=c(0),[o,s]=c(!1),[l,u]=c(!1),[p,m]=c(0),[g,_]=c(`bottom`),v,b,x=()=>{clearTimeout(v),b!==void 0&&(uf(b),b=void 0)},S=()=>{let t=e();t&&(r(t.offsetWidth),a(t.offsetHeight))},C=()=>{h(()=>{m(e=>e+1),S()})},w=f(()=>t()!==null);return d(()=>{let n=t();n?(_(n.edge),clearTimeout(v),s(!0),b!==void 0&&uf(b),b=lf(()=>{S(),e()?.offsetHeight,u(!0)})):(b!==void 0&&uf(b),u(!1),v=setTimeout(()=>{s(!1)},120)),y(x)}),d(()=>{if(!w())return;window.addEventListener(`resize`,C),window.visualViewport?.addEventListener(`resize`,C),window.visualViewport?.addEventListener(`scroll`,C);let e=to(),t;e&&typeof ResizeObserver<`u`&&(t=new ResizeObserver(C),t.observe(e)),y(()=>{window.removeEventListener(`resize`,C),window.visualViewport?.removeEventListener(`resize`,C),window.visualViewport?.removeEventListener(`scroll`,C),t?.disconnect()})}),{shouldMount:o,isAnimatedIn:l,lastAnchorEdge:g,displayPosition:f(e=>{p();let r=Tg(),a=uC({anchor:t(),measuredWidth:n(),measuredHeight:i(),viewportLeft:r.offsetLeft,viewportTop:r.offsetTop,viewportWidth:r.width,viewportHeight:r.height,anchorGapPx:8,viewportPaddingPx:8,offscreenPosition:zn});return a.left===zn.left?e:a},zn),measure:S,clearAnimationHandles:x}}})),mC,hC=n((()=>{io(),Yg(),Ba(),ff(),mC=e=>{let t=ro(t=>{e.isOpen()&&(e.shouldIgnoreKeyboardEvent?.(t)||e.shouldIgnoreInputEvents&&La(t)||t.code===`Escape`&&(t.preventDefault(),t.stopImmediatePropagation(),e.onDismiss(`keyboard`)))}),n=ro(t=>{e.isOpen()&&(Jg(t,`data-react-grab-ignore-events`)||e.shouldIgnoreRightClick&&t instanceof MouseEvent&&t.button===2||e.onDismiss(`pointer`))}),r=lf(()=>{window.addEventListener(`mousedown`,n,{capture:!0}),window.addEventListener(`touchstart`,n,{capture:!0})});return window.addEventListener(`keydown`,t,{capture:!0}),()=>{uf(r),window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`mousedown`,n,{capture:!0}),window.removeEventListener(`touchstart`,n,{capture:!0})}}})),gC,_C,vC=n((()=>{G(),R(),J(),ax(),sC(),pC(),hC(),gC=z(`<div data-react-grab-ignore-events>`),_C=e=>{let t,n=()=>e.interactive!==!1,r=fC(()=>t,()=>e.position);return v(()=>{r.measure();let t=e.onDismiss?mC({isOpen:()=>!!e.position,onDismiss:e.onDismiss}):void 0;y(()=>{r.clearAnimationHandles(),t?.()})}),j(M,{get when(){return r.shouldMount()},get children(){var i=gC(),a=t;return typeof a==`function`?tt(a,i):t=i,et(i,xe(()=>({[e.dataAttribute]:``}),{get class(){return $(`fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none will-change-[opacity,transform]`,r.isAnimatedIn()?`transition-[opacity,transform] duration-220 ease-spring`:`transition-[opacity,transform] duration-120 ease-drawer`)},get style(){return{top:`${r.displayPosition().top}px`,left:`${r.displayPosition().left}px`,"z-index":`${un}`,"pointer-events":n()&&r.isAnimatedIn()?`auto`:`none`,"transform-origin":Bn[r.lastAnchorEdge()],opacity:r.isAnimatedIn()?`1`:`0`,transform:r.isAnimatedIn()?`scale(1)`:`scale(0.92)`}},onPointerDown:oC,onMouseDown:oC,onClick:oC,onContextMenu:oC}),!1,!0),W(i,()=>e.children),i}})}})),yC,bC=n((()=>{F_(),yC=e=>{let t=Math.max(0,Date.now()-e);return t<6e4?`now`:t<36e5?`${Math.floor(t/M_)}m`:t<864e5?`${Math.floor(t/N_)}h`:`${Math.floor(t/P_)}d`}})),xC,SC=n((()=>{xC=e=>e.map((e,t)=>`[${t+1}]\n${e.content}`).join(`
39
39
 
40
- `)})),DC,OC,kC,AC,jC=c((()=>{G(),z(),ip(),Lx(),SC(),Yx(),_S(),Q_(),R_(),wC(),EC(),DC=B(`<div class="flex shrink-0 items-center justify-between gap-2 px-2 pt-2 pb-1.5"><span class="text-[11px] font-medium text-[var(--rg-text-secondary)]">Comments</span><div class="flex items-center gap-1">`),OC=B(`<div class="min-h-0 overflow-x-hidden overflow-y-auto border-t border-[var(--rg-border-subtle)] py-1 [scrollbar-width:thin]"><div role=list aria-label="Saved comments"class="relative flex flex-col">`),kC=B(`<div role=listitem class="group flex items-center gap-1 px-1"><button data-react-grab-ignore-events type=button class="flex min-w-0 flex-1 cursor-pointer items-center justify-between gap-2 border-none bg-transparent px-1 py-1.5 text-left hover:bg-[var(--rg-surface-hover)]"><span class="flex min-w-0 flex-1 flex-col"><span class="truncate text-[12px] font-medium text-[var(--rg-text-primary)]"> </span><span class="mt-0.5 truncate text-[11px] text-[var(--rg-text-secondary)]"> </span></span><span class="shrink-0 text-[10px] text-[var(--rg-text-secondary)]"></span></button><button data-react-grab-ignore-events type=button class="flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded-sm border-none bg-transparent text-[13px] opacity-0 transition-opacity hover:bg-[var(--rg-surface-hover)] group-hover:opacity-100 focus:opacity-100">×`),AC=e=>{let[t,n]=h(!1),r,i=()=>{e.items.length!==0&&rp(TC(e.items))&&(n(!0),clearTimeout(r),r=setTimeout(()=>n(!1),900))};return w(()=>clearTimeout(r)),A(xC,{get position(){return e.position},dataAttribute:`data-react-grab-comment-history`,get onDismiss(){return e.onDismiss},get children(){return A(Ix,{class:`overflow-hidden`,style:{width:`260px`,"max-width":`360px`,"max-height":`320px`},get children(){return[(()=>{var n=DC(),r=n.firstChild.nextSibling;return W(r,A(Jx,{"data-react-grab-comment-history-clear":!0,variant:`destructive`,"aria-label":`Clear comments`,onClick:()=>{X_(),e.onDismiss()},children:`Clear`}),null),W(r,A(Jx,{"data-react-grab-comment-history-copy-all":!0,"aria-label":`Copy all comments`,onClick:i,get children(){return A(M,{get when(){return t()},fallback:`Copy all`,get children(){return A(gS,{size:11})}})}}),null),n})(),(()=>{var t=OC(),n=t.firstChild;return W(n,A(Ae,{get each(){return e.items},children:e=>(()=>{var t=kC(),n=t.firstChild,r=n.firstChild,i=r.firstChild,a=i.firstChild,o=i.nextSibling.firstChild,s=r.nextSibling,c=n.nextSibling;return n.$$click=()=>rp(e.content),W(s,()=>CC(e.timestamp)),c.$$click=()=>Y_(e.id),_(r=>{var i=e.id,s=e.id,l=e.elementsCount>1?`${e.elementsCount} elements`:e.componentName??e.tagName,u=e.commentText,d=e.id,f=`Remove ${e.commentText}`;return i!==r.e&&V(t,`data-react-grab-comment-history-item`,r.e=i),s!==r.t&&V(n,`data-react-grab-comment-history-copy`,r.t=s),l!==r.a&&(a.data=r.a=l),u!==r.o&&(o.data=r.o=u),d!==r.i&&V(c,`data-react-grab-comment-history-remove`,r.i=d),f!==r.n&&V(c,`aria-label`,r.n=f),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})()})),t})()]}})}})},tt([`click`])})),MC,NC,PC=c((()=>{G(),R_(),MC=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none><path d="M5 5.75A2.75 2.75 0 0 1 7.75 3h8.5A2.75 2.75 0 0 1 19 5.75v7.5A2.75 2.75 0 0 1 16.25 16H11l-4.35 3.48A1 1 0 0 1 5 18.7V16.3a2.75 2.75 0 0 1-2-2.65v-7.9A2.75 2.75 0 0 1 5 5.75Z"stroke=currentColor stroke-width=1.8 stroke-linejoin=round></path><path d="M8 8h8M8 11.5h5"stroke=currentColor stroke-width=1.8 stroke-linecap=round>`),NC=e=>{let t=()=>e.size??14;return(()=>{var n=MC();return _(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),FC,IC=c((()=>{G(),z(),hf(),uo(),WS(),jC(),Q_(),PC(),R_(),FC=e=>{let t,n=null,[r,i]=h(q_()),[a,o]=h(!1),[s,c]=h(!1),[l,u]=h(null),[d,f]=h(),p=()=>{let e=t?.getRootNode();f(e instanceof ShadowRoot?e.querySelector(`[${lo}]`)??void 0:void 0)},m=()=>{if(!t||!a())return;let r=t.getBoundingClientRect(),i=e.edge,o={x:i===`left`?r.right:i===`right`?r.left:r.left+r.width/2,y:i===`top`?r.bottom:i===`bottom`?r.top:r.top+r.height/2,edge:i};u(e=>e?.x===o.x&&e.y===o.y&&e.edge===o.edge?e:o),n=ff(m)},g=()=>{n!==null&&(pf(n),n=null)},_=()=>{g(),u(null),o(!1)},v=e.createDragAwareHandler(()=>{if(a()){_();return}o(!0),m()});return te(()=>{p();let e=Z_(e=>{i([...e]),e.length===0&&_()});w(()=>{e(),g()})}),A(M,{get when(){return r().length>0},get children(){return[A(US,{actionId:`comment-history`,ref:e=>{t=e,queueMicrotask(p)},get label(){return`Open comments (${r().length})`},get class(){return e.buttonClass},get wrapperClass(){return e.wrapperClass},onClick:v,onMouseEnter:t=>{c(!0),e.onMouseEnter(t)},onMouseLeave:()=>{c(!1),e.onMouseLeave()},get icon(){return A(NC,{size:14,get class(){return e.iconClass}})},tooltip:`Comments`,get tooltipVisible(){return Dt(()=>!!s())()&&!a()},get tooltipPosition(){return e.tooltipPosition}}),A(M,{get when(){return d()},children:e=>A(bt,{get mount(){return e()},get children(){return A(AC,{get position(){return l()},get items(){return r()},onDismiss:_})}})})]}})}})),LC,RC,zC=c((()=>{G(),z(),lx(),IS(),WS(),J(),iC(),kg(),co(),hf(),QS(),oC(),lC(),IC(),LC=B(`<div data-react-grab-ignore-events data-react-grab-toolbar>`),RC=e=>{let t,n,r=null,i=E_(),[a,o]=h(!1),[s,c]=h(!1),[l,u]=h(!1),[d,f]=h(i?.edge??`bottom`),[p,m]=h(i?.ratio??.5),[g,y]=h({x:0,y:0}),[b,ee]=h(!1),[x,S]=h(!1),[T,E]=h(!1),[D,O]=h(!1),[ne,re]=h(0),[ie,ae]=h(null),oe=()=>{r?.(),r=null,e.isActive||Sy()},k=aC({getContainerRef:()=>t,isCollapsed:s,getExpandedDimensions:()=>ge,onDragStart:()=>{ae(null),r&&oe()},onPositionUpdate:e=>y(e),onSnapEdgeChange:(e,t)=>{ye(d(),e),f(e),m(t)},onSnapComplete:e=>{ge=e.expandedDimensions,y(e.position),Ie({edge:e.edge,ratio:e.ratio,collapsed:s(),enabled:!s()})}}),se=()=>!GS(d()),ce=()=>se()?`mb-1.5`:`mr-1.5`,le=()=>e.defaultActionId??`copy`,ue=()=>e.defaultActionLabel??`Copy`,de=()=>!!e.isActive&&(e.activeActionId??`copy`)===le(),fe=t=>ie()===t&&!e.isActive&&!s()&&!k.isDragging()&&!k.isSnapping()&&!e.isContextMenuOpen,pe=()=>{switch(d()){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`;default:return`top`}},me=e=>{e.stopImmediatePropagation()},he=t=>({onMouseEnter:e=>{k.isDragging()||(ae(t()),r||(r=lb(),xy(e.clientX,e.clientY)))},onMouseLeave:()=>{let n=t();ae(e=>e===n?null:e),!e.isActive&&!e.isContextMenuOpen&&oe()}});v(C(()=>e.shakeCount,t=>{t&&!e.enabled&&ee(!0)})),v(C(()=>[e.isActive,e.isContextMenuOpen],([e,t])=>{!e&&!t&&r&&oe()})),v(C(()=>de(),e=>{if(!e){re(e=>cC(e,0));return}let t=null,r=0,i=0,a=()=>{if(t=null,!n)return;let e=n.getBoundingClientRect(),a=e.left+e.width/2,o=e.top+e.height/2,s=r-a,c=i-o;if(Math.hypot(s,c)<4)return;let l=Math.atan2(c,s)*180/Math.PI- -45;re(e=>cC(e,l))},o=so(e=>{r=e.clientX,i=e.clientY,t===null&&(t=ff(a))});window.addEventListener(`pointermove`,o,{passive:!0}),w(()=>{window.removeEventListener(`pointermove`,o),t!==null&&pf(t)})}));let ge={width:38,height:28},[_e,ve]=h(KS(d())),ye=(e,t)=>{GS(e)!==GS(t)&&ve(KS(t))},be=(e,n)=>{let r=t?.getBoundingClientRect(),i=KS(n);return YS(e,n,ge,r?.width??i.width,r?.height??i.height)},xe=()=>{y(qS(d(),p(),ge.width,ge.height))},Se=k.createDragAwareHandler(()=>e.onToggle?.()),Ce=`group contain-layout flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox`,we=()=>cx(`relative contain-layout flex items-center justify-center`,ce()),Te=e=>e?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)]`,Ee=k.createDragAwareHandler(()=>{if(s()){je();return}let e=t?.getBoundingClientRect(),n=p();e&&(ge={width:e.width,height:e.height}),S(!0),c(!0),Ie({edge:d(),ratio:n,collapsed:!0,enabled:!1}),N()}),De=()=>XS(d(),g(),ge,_e()),j,ke,Ae=null,M=()=>{let e=t?.getBoundingClientRect();!e||e.width===0||e.height===0||(s()?ve({width:e.width,height:e.height}):(ge={width:e.width,height:e.height},Ae={width:e.width,height:e.height}))},N=()=>{ke&&clearTimeout(ke),ke=setTimeout(()=>{S(!1),M()},260)},je=()=>{let{position:e,ratio:t}=be(Le(),d());y(e),m(t),S(!0),c(!1),Ie({edge:d(),ratio:t,collapsed:!1,enabled:!0}),N()},Me=(e,t)=>{if(!(e===0||t===0)&&!(k.isDragging()||k.isSnapping())&&!x()){if(s()){let n=_e();if(n.width===e&&n.height===t)return;ve({width:e,height:t});return}Ae&&Ae.width===e&&Ae.height===t||(Ae={width:e,height:t},ge={width:e,height:t},y(qS(d(),p(),e,t)))}},Ne=null,Pe=()=>{k.isDragging()||k.isSnapping()||Ne===null&&(Ne=ff(()=>{Ne=null,xe()}))},Fe=()=>{k.isDragging()||(u(!0),xe(),j&&clearTimeout(j),j=setTimeout(()=>{u(!1);let e=JS(d(),g().x,g().y,ge.width,ge.height);m(e),Ie({edge:d(),ratio:e,collapsed:s(),enabled:!s()})},500))},Ie=t=>{let n={...t,defaultAction:le()};D_(n),e.onStateChange?.(n)};te(()=>{t&&e.onContainerRef?.(t);let n=t?.getBoundingClientRect(),r=Og(),a=!!(n&&n.width>0&&n.height>0);i?(a&&n&&(ge={width:n.width,height:n.height}),c(i.collapsed),y(qS(i.edge,i.ratio,ge.width,ge.height))):a&&n?(ge={width:n.width,height:n.height},y({x:r.offsetLeft+(r.width-n.width)/2,y:r.offsetTop+r.height-n.height-16}),m(Bn)):(y(qS(`bottom`,Bn,ge.width,ge.height)),m(Bn)),e.onSubscribeToStateChanges&&w(e.onSubscribeToStateChanges(e=>{if(x()||!t?.getBoundingClientRect())return;let n=s()!==e.collapsed;if(ye(d(),e.edge),f(e.edge),n&&!e.collapsed){let t=Le();S(!0),c(e.collapsed);let{position:n,ratio:r}=be(t,e.edge);y(n),m(r),N()}else n&&(S(!0),N()),c(e.collapsed),y(qS(e.edge,e.ratio,ge.width,ge.height)),m(e.ratio)})),window.addEventListener(`resize`,Fe),window.visualViewport?.addEventListener(`resize`,Fe),window.visualViewport?.addEventListener(`scroll`,Fe);let l=ao();if(l&&(window.addEventListener(`scroll`,Pe,{passive:!0,capture:!0}),typeof ResizeObserver<`u`)){let e=new ResizeObserver(Pe);e.observe(l),w(()=>e.disconnect())}if(typeof ResizeObserver<`u`&&t){let e=new ResizeObserver(e=>{let n=e[0];if(!n)return;let r=n.borderBoxSize?.[0],i,a;if(r)i=r.inlineSize,a=r.blockSize;else{let e=t?.getBoundingClientRect();if(!e)return;i=e.width,a=e.height}Me(i,a)});e.observe(t),w(()=>e.disconnect())}let u=setTimeout(()=>{o(!0)},500);w(()=>{clearTimeout(u)})}),w(()=>{window.removeEventListener(`resize`,Fe),window.visualViewport?.removeEventListener(`resize`,Fe),window.visualViewport?.removeEventListener(`scroll`,Fe),window.removeEventListener(`scroll`,Pe,{capture:!0}),Ne!==null&&pf(Ne),clearTimeout(j),clearTimeout(ke),r&&oe()});let Le=()=>s()?De():g(),Re=()=>s()?`cursor-pointer`:k.isDragging()?`cursor-grabbing`:`cursor-grab`,ze=()=>D()||!!e.isContextMenuOpen||k.isDragging()||k.isSnapping()||x()||T(),Be=()=>!!e.isActive&&!ze(),Ve=()=>l()||k.isDragging()?``:k.isSnapping()?`transition-[transform,opacity] duration-300 ease-out`:x()?`transition-[transform,opacity] ${s()?`duration-140`:`duration-220`} ease-drawer`:`transition-[transform,opacity] duration-400 ease-drawer`,P=()=>{switch(d()){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 r=LC();r.addEventListener(`mouseleave`,()=>{O(!1),e.onSelectHoverChange?.(!1)}),r.addEventListener(`mouseenter`,()=>{O(!0),s()||e.onSelectHoverChange?.(!0)}),H(r,`mousedown`,me),H(r,`pointerdown`,e=>{me(e),k.handlePointerDown(e)});var i=t;return typeof i==`function`?ct(i,r):t=r,W(r,A(rC,{get isCollapsed(){return s()},get snapEdge(){return d()},get isShaking(){return b()},get isChevronPressed(){return T()},get transformOrigin(){return P()},onAnimationEnd:()=>ee(!1),onCollapseClick:Ee,onCollapsePointerDown:()=>E(!0),onCollapsePointerUp:()=>E(!1),onCollapsePointerLeave:()=>E(!1),onPanelClick:e=>{s()&&(e.stopPropagation(),je())},get actionButtons(){return[A(US,Oe({get actionId(){return le()},isToggle:!0,ref:e=>n=e,get label(){return Dt(()=>!!de())()?`Stop selecting element`:`${ue()} element`},get isActive(){return de()},class:Ce,get wrapperClass(){return we()},onClick:Se,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),ae(null),e.onToggleToolbarMenu?.()}},()=>he(le),{get icon(){return A(FS,{size:14,get rotationDeg(){return ne()},get class(){return Te(de())}})},get tooltipVisible(){return fe(le())},get tooltipPosition(){return pe()},get tooltip(){return ue()}})),A(FC,Oe({get edge(){return d()},buttonClass:Ce,get wrapperClass(){return we()},get iconClass(){return Te(!1)},get tooltipPosition(){return pe()},get createDragAwareHandler(){return k.createDragAwareHandler}},()=>he(()=>`comment-history`)))]}})),_(e=>{var t=cx(`fixed left-0 top-0 font-sans text-[13px] antialiased select-none`,Re(),Ve(),a()?`pointer-events-auto`:`pointer-events-none`),n=String(_n),i=`translate(${Le().x}px, ${Le().y}px) scale(${Be()?.97:1})`,o=P(),s=a()?Be()?.55:1:0;return t!==e.e&&it(r,e.e=t),n!==e.t&&U(r,`z-index`,e.t=n),i!==e.a&&U(r,`transform`,e.a=i),o!==e.o&&U(r,`transform-origin`,e.o=o),s!==e.i&&U(r,`opacity`,e.i=s),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),r})()}})),BC,VC,HC=c((()=>{z(),BC=ne(),VC=()=>{let e=re(BC);if(!e)throw Error(`Menu subcomponents must be rendered inside <Menu.Provider>`);return e}})),UC,WC=c((()=>{G(),HC(),UC=e=>A(BC.Provider,{get value(){return e.store},get children(){return e.children}})})),GC,KC=c((()=>{G(),lx(),Lx(),GC=e=>A(Ix,{get class(){return cx(`flex flex-col w-fit h-fit`,e.class)},get style(){return e.style},get children(){return e.children}})})),qC,JC,YC=c((()=>{G(),lx(),HC(),qC=B(`<div role=menu aria-orientation=vertical><div aria-hidden=true class="pointer-events-none absolute opacity-0 transition-[top,left,width,height,opacity,border-radius] duration-75 ease-out bg-[var(--rg-surface-hover)]">`),JC=e=>{let t=VC();return(()=>{var n=qC(),r=n.firstChild;n.$$pointermove=()=>t.notePointerMove(),ct(n=>{t.setHighlightContainer(n),e.ref?.(n)},n);var i=t.setHighlightRail;return typeof i==`function`?ct(i,r):t.setHighlightRail=r,W(n,()=>e.children,null),_(r=>{var i=e.label,a=t.keyboardNavigation?t.activeDescendantId():void 0,o=t.keyboardNavigation?-1:void 0,s=cx(`relative flex flex-col`,e.class);return i!==r.e&&V(n,`aria-label`,r.e=i),a!==r.t&&V(n,`aria-activedescendant`,r.t=a),o!==r.a&&V(n,`tabindex`,r.a=o),s!==r.o&&it(n,r.o=s),r},{e:void 0,t:void 0,a:void 0,o:void 0}),n})()},tt([`pointermove`])})),XC,ZC,QC=c((()=>{G(),z(),lx(),HC(),XC=B(`<button data-react-grab-ignore-events type=button>`),ZC=e=>{let t=VC(),n=t.createItemId(),r=e.value,i=()=>e.role??`menuitem`,a=()=>!e.disabled,o=()=>t.activeValue()===r,s;return te(()=>{s&&(t.registerItem({value:r,domId:n,element:s,isEnabled:a,onSelect:()=>e.onSelect?.()}),w(()=>t.unregisterItem(r)))}),(()=>{var c=XC();c.$$click=t=>{t.stopPropagation(),a()&&e.onSelect?.()},c.addEventListener(`pointerleave`,()=>{t.clearActiveOnPointerLeave&&t.setActiveItem(null)}),c.addEventListener(`pointerenter`,()=>{a()&&t.canActivateOnHover()&&t.setActiveItem(r)}),c.$$pointerdown=e=>e.stopPropagation();var l=s;return typeof l==`function`?ct(l,c):s=c,V(c,`id`,n),W(c,()=>e.children),_(n=>{var a=e.dataId??r,s=i(),l=i()===`menuitemradio`?!!e.checked:void 0,u=!!e.disabled,d=t.keyboardNavigation?o()?0:-1:void 0,f=e.disabled,p=cx(`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`,e.class);return a!==n.e&&V(c,`data-react-grab-menu-item`,n.e=a),s!==n.t&&V(c,`role`,n.t=s),l!==n.a&&V(c,`aria-checked`,n.a=l),u!==n.o&&V(c,`aria-disabled`,n.o=u),d!==n.i&&V(c,`tabindex`,n.i=d),f!==n.n&&(c.disabled=n.n=f),p!==n.s&&it(c,n.s=p),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),c})()},tt([`pointerdown`,`click`])})),$C,ew,tw=c((()=>{G(),lx(),$C=B(`<span> `),ew=e=>(()=>{var t=$C(),n=t.firstChild;return _(r=>{var i=cx(`text-[13px] leading-4 font-sans font-medium`,e.class),a=e.textContent;return i!==r.e&&it(t,r.e=i),a!==r.t&&(n.data=r.t=a),r},{e:void 0,t:void 0}),t})()})),nw,rw,iw=c((()=>{G(),nw=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M6.5 5C5.67157 5 5 5.67157 5 6.5C5 7.32843 5.67157 8 6.5 8H8V6.5C8 5.67157 7.32843 5 6.5 5ZM10 8V6.5C10 4.567 8.433 3 6.5 3C4.567 3 3 4.567 3 6.5C3 8.433 4.567 10 6.5 10H8V14H6.5C4.567 14 3 15.567 3 17.5C3 19.433 4.567 21 6.5 21C8.433 21 10 19.433 10 17.5V16H14V17.5C14 19.433 15.567 21 17.5 21C19.433 21 21 19.433 21 17.5C21 15.567 19.433 14 17.5 14H16V10H17.5C19.433 10 21 8.433 21 6.5C21 4.567 19.433 3 17.5 3C15.567 3 14 4.567 14 6.5V8H10ZM10 10V14H14V10H10ZM16 8H17.5C18.3284 8 19 7.32843 19 6.5C19 5.67157 18.3284 5 17.5 5C16.6716 5 16 5.67157 16 6.5V8ZM16 16V17.5C16 18.3284 16.6716 19 17.5 19C18.3284 19 19 18.3284 19 17.5C19 16.6716 18.3284 16 17.5 16H16ZM8 16H6.5C5.67157 16 5 16.6716 5 17.5C5 18.3284 5.67157 19 6.5 19C7.32843 19 8 18.3284 8 17.5V16Z">`),rw=e=>{let t=()=>e.size??11;return(()=>{var n=nw();return _(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),aw,ow,sw,cw=c((()=>{G(),z(),Wg(),iw(),Gx(),aw=B(`<span> `),ow=B(`<span style=display:inline-flex;align-items:center;gap:2px>`),sw=e=>{let t=()=>e.shortcut===`Enter`,n=()=>e.modifier!==!1,r=Ug();return(()=>{var i=ow();return W(i,A(M,{get when(){return t()},get children(){return A(Wx,{size:8})}}),null),W(i,A(M,{get when(){return!t()},get children(){return A(M,{get when(){return n()},get fallback(){return(()=>{var t=aw(),n=t.firstChild;return _(()=>n.data=e.shortcut),t})()},get children(){return A(M,{when:r,get fallback(){return(()=>{var t=aw(),n=t.firstChild;return _(()=>n.data=`Ctrl+${e.shortcut}`),t})()},get children(){return[A(rw,{size:9}),(()=>{var t=aw(),n=t.firstChild;return _(()=>n.data=e.shortcut),t})()]}})}})}}),null),_(()=>it(i,e.class)),i})()}})),lw,uw=c((()=>{G(),lx(),cw(),lw=e=>A(sw,{get shortcut(){return e.shortcut},get modifier(){return e.modifier},get class(){return cx(`text-[11px] font-sans text-[var(--rg-text-secondary)] ml-4`,e.class)}})})),dw,fw,pw,mw,hw,gw,_w=c((()=>{z(),dw=`0`,fw=`1`,pw=({hiddenOpacity:e=dw,visibleOpacity:t=fw}={})=>{let n,r,i,a=e=>{r&&(r.style.opacity=t,r.style.top=`${e.offsetTop}px`,r.style.left=`${e.offsetLeft}px`,r.style.width=`${e.offsetWidth}px`,r.style.height=`${e.offsetHeight}px`)},o=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{i&&a(i)});w(()=>o?.disconnect());let s=()=>{i=void 0,o?.disconnect(),r&&(r.style.opacity=e)};return{containerRef:e=>{n=e},followerRef:e=>{r=e},followElement:e=>{if(!(!r||!n)){if(!e){s();return}i=e,a(e),o?.disconnect(),o?.observe(e),o?.observe(n)}},hideFollower:s}},mw=(e,t)=>e!==t&&e instanceof HTMLElement,hw=(e,t)=>{let n=[];for(let r of Array.from(e.children))mw(r,t)&&n.push(r);return n},gw=(e={})=>{let{topCornerRadiusPx:t,bottomCornerRadiusPx:n,cornerShape:r}=e,i=t!==void 0||n!==void 0,a,o=!1,s=e=>{if(!a||!i)return;let s=e.parentElement;if(!s)return;let c=hw(s,a),l=c[0]===e,u=c[c.length-1]===e,d=l&&t!==void 0?`${t}px`:`0px`,f=u&&n!==void 0?`${n}px`:`0px`;a.style.borderTopLeftRadius=d,a.style.borderTopRightRadius=d,a.style.borderBottomLeftRadius=f,a.style.borderBottomRightRadius=f,r&&!o&&(a.style.setProperty(`corner-shape`,r),o=!0)},{containerRef:c,followerRef:l,followElement:u,hideFollower:d}=pw();return{containerRef:c,highlightRef:e=>{a=e,o=!1,l(e)},updateHighlight:e=>{u(e),e&&s(e)},clearHighlight:d}}})),vw,yw=c((()=>{z(),_w(),vw=(e={})=>{let t=new Map,n=[],r=`react-grab-menu-${Math.random().toString(36).slice(2,8)}`,i=0,a=!1,o=e.value!==void 0,[s,c]=h(null),[l,u]=h(0),d=y(()=>o?e.value?.()??null:s()),f=t=>{if(o){e.onValueChange?.(t);return}c(t)},p=gw(e.highlight??{});v(C([d,l],([e])=>{if(e===null){p.clearHighlight();return}let n=t.get(e);n?p.updateHighlight(n.element):p.clearHighlight()}));let m=()=>n.filter(e=>t.get(e)?.isEnabled()),g=()=>{let e=m();e.length>0&&f(e[0])},_=()=>{let e=m();e.length>0&&f(e[e.length-1])},b=()=>{let e=m();if(e.length===0)return;let t=e.indexOf(d()??``);f(e[t===-1?0:(t+1)%e.length])},ee=()=>{let e=m();if(e.length===0)return;let t=e.indexOf(d()??``);f(e[t===-1?e.length-1:(t-1+e.length)%e.length])},x=y(()=>{l();let e=d();if(e!==null)return t.get(e)?.domId});return{keyboardNavigation:e.keyboardNavigation??!1,clearActiveOnPointerLeave:e.clearActiveOnPointerLeave??!1,activeValue:d,activeDescendantId:x,setActiveItem:f,createItemId:()=>`${r}-item-${i++}`,canActivateOnHover:()=>!(e.requirePointerMove??!1)||a,notePointerMove:()=>{a=!0},resetPointerMove:()=>{a=!1},registerItem:e=>{t.set(e.value,e),n.includes(e.value)||n.push(e.value),u(e=>e+1)},unregisterItem:e=>{t.delete(e);let r=n.indexOf(e);r!==-1&&n.splice(r,1),o||c(t=>t===e?null:t),u(e=>e+1)},getActiveItem:()=>{let e=d();return e===null?void 0:t.get(e)},selectFirst:g,selectLast:_,selectNext:b,selectPrevious:ee,setHighlightContainer:p.containerRef,setHighlightRail:p.highlightRef}}})),bw,xw=c((()=>{WC(),KC(),YC(),QC(),tw(),uw(),yw(),bw={Provider:UC,Panel:GC,List:JC,Item:ZC,Label:ew,Shortcut:lw}})),Sw,Cw,ww,Tw=c((()=>{G(),z(),J(),bx(),Ox(),jx(),xw(),dx(),bb(),hf(),dC(),yC(),co(),Sw=B(`<div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">`),Cw=B(`<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none"style=pointer-events:auto>`),ww=e=>{let t,n,r=null,i=vw({keyboardNavigation:!0,highlight:{bottomCornerRadiusPx:14,cornerShape:Un}}),[a,o]=h(0),[s,c]=h(0),l=y(()=>e.position!==null),u=y(()=>ux({tagName:e.tagName,componentName:e.componentName})),d=()=>{if(t){let e=t.getBoundingClientRect();o(e.width),c(e.height)}};v(()=>{l()&&ff(d)});let f=y(()=>{let t=e.selectionBounds,n=e.position,r=a(),i=s();if(r===0||i===0||!t||!n)return{left:Kn.left,top:Kn.top,arrowLeft:0,arrowPosition:`bottom`};let o=n.x??t.x+t.width/2,c=Math.max(4,Math.min(o-r/2,window.innerWidth-r-4)),l=Math.max(8,Math.min(o-c,r-8)),u=t.y+t.height+8+4,d=t.y-i-8-4,f=u+i>window.innerHeight,p=d>=0,m=f&&p,h=m?d:u,g=m?`top`:`bottom`;if(f&&!p){let e=n.y??t.y+t.height/2;h=Math.max(4,Math.min(e+4,window.innerHeight-i-4)),g=`top`}return{left:c,top:h,arrowLeft:l,arrowPosition:g}}),p=y(()=>{let t=e.actions??[],n=e.actionContext;return t.map(e=>({id:e.id,label:e.label,action:()=>{n&&xb(e,n)},enabled:yb(e,n),shortcut:e.shortcut,shortcutModifier:e.shortcutModifier}))});v(C(l,e=>{if(e){let e=t?.getRootNode(),i=e instanceof ShadowRoot?e.activeElement:null,a=document.activeElement;r=a instanceof HTMLElement&&i===null&&!(t instanceof Element&&t.contains(a))?a:null,n?.focus({preventScroll:!0});return}i.setActiveItem(null);let a=r;r=null,!(!(a instanceof HTMLElement)||!document.contains(a))&&ff(()=>{let e=document.activeElement;(e===null||e===document.body)&&a.focus({preventScroll:!0})})})),te(()=>{d();let t=t=>{if(!l())return;let n=t.key===`ArrowDown`,r=t.key===`ArrowUp`,a=t.key===`Home`,o=t.key===`End`,s=t.key===`Tab`;if(n||r||a||o||s){t.preventDefault(),t.stopPropagation();let e=n||s&&!t.shiftKey;a?i.selectFirst():o?i.selectLast():e?i.selectNext():i.selectPrevious();return}let c=e.actions??[],u=e.actionContext,d=n=>{u&&xb(n,u)&&(t.preventDefault(),t.stopPropagation(),e.onHide())};if(t.key===`Enter`){let e=i.getActiveItem();if(e){t.preventDefault(),t.stopPropagation(),e.isEnabled()&&e.onSelect();return}}let f=mb(c,t,{includeModifierShortcuts:!0});f&&d(f)},n=vC({isOpen:l,onDismiss:e.onDismiss,shouldIgnoreRightClick:!0}),r=so(t);window.addEventListener(`keydown`,r,{capture:!0}),w(()=>{n(),window.removeEventListener(`keydown`,r,{capture:!0})})});let m=y(()=>{let{tagName:e,componentName:t}=u();return`Actions for ${t?`${t}.${e}`:e}`});return A(M,{get when(){return l()},get children(){var r=Cw();H(r,`contextmenu`,uC,!0),H(r,`click`,uC,!0),H(r,`mousedown`,uC,!0),H(r,`pointerdown`,uC,!0);var a=t;return typeof a==`function`?ct(a,r):t=r,U(r,`z-index`,`${_n}`),W(r,A(yx,{get position(){return f().arrowPosition},leftPercent:0,get leftOffsetPx(){return f().arrowLeft}}),null),W(r,A(bw.Panel,{class:`justify-center items-start min-w-[100px]`,get children(){return[(()=>{var t=Sw();return W(t,A(Dx,{get tagName(){return u().tagName},get componentName(){return u().componentName},get isClickable(){return e.hasFilePath},onClick:t=>{if(t.stopPropagation(),e.hasFilePath&&e.actionContext){let t=e.actions?.find(e=>e.id===`open`);t&&xb(t,e.actionContext)}},shrink:!0})),t})(),A(Ax,{get children(){return A(bw.Provider,{store:i,get children(){return A(bw.List,{ref:e=>n=e,get label(){return m()},class:`w-[calc(100%+16px)] -mx-2 -my-1.5 outline-none`,get children(){return A(Ae,{get each(){return p()},children:t=>A(bw.Item,{get value(){return t.id},get dataId(){return t.label.toLowerCase()},get disabled(){return!t.enabled},onSelect:()=>{t.action(),e.onHide()},get children(){return[A(bw.Label,{class:`text-[var(--rg-text-primary)]`,get textContent(){return t.label}}),A(M,{get when(){return t.shortcut},children:e=>A(bw.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})})}})}})}})]}}),null),_(e=>{var t=`${f().top}px`,n=`${f().left}px`;return t!==e.e&&U(r,`top`,e.e=t),n!==e.t&&U(r,`left`,e.t=n),e},{e:void 0,t:void 0}),r}})},tt([`pointerdown`,`mousedown`,`click`,`contextmenu`])})),Ew,Dw=c((()=>{G(),z(),J(),xw(),SC(),Ew=e=>{let t=vw({clearActiveOnPointerLeave:!0,highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:Un}});return A(xC,{get position(){return e.position},dataAttribute:`data-react-grab-toolbar-menu`,get onDismiss(){return e.onDismiss},get children(){return A(bw.Panel,{class:`overflow-hidden`,style:{"min-width":`100px`},get children(){return A(bw.Provider,{store:t,get children(){return A(bw.List,{label:`Default action`,get children(){return A(Ae,{get each(){return e.actions},children:t=>{let n=()=>t.id===e.defaultActionId;return A(bw.Item,{get value(){return t.id},role:`menuitemradio`,get checked(){return n()},onSelect:()=>{e.onSetDefaultAction(t.id),e.onDismiss()},get children(){return[A(bw.Label,{get class(){return n()?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)]`},get textContent(){return t.label}}),A(M,{get when(){return t.shortcut},children:e=>A(bw.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})}})}})}})}})}})}})),Ow,kw,Aw,jw,Mw,Nw=c((()=>{G(),z(),J(),xw(),SC(),Ow=B(`<span aria-hidden=true class="shrink-0 font-mono text-[11px] leading-4 text-[var(--rg-text-secondary)] opacity-60 mr-1"> `),kw=B(`<span> `),Aw=B(`<span class=text-[var(--rg-text-secondary)]>.`),jw=B(`<span class="flex items-center min-w-0 w-full"><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0 transition-colors"><span> `),Mw=e=>{let t=()=>e.state?.activeIndex??0,n=vw({value:()=>String(t()),highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:Un}});return A(xC,{get position(){return e.position},dataAttribute:`data-react-grab-hierarchy-menu`,interactive:!1,get children(){return A(bw.Panel,{class:`overflow-hidden`,style:{"min-width":`160px`},get children(){return A(bw.Provider,{store:n,get children(){return A(bw.List,{label:`Navigate element hierarchy`,get children(){return A(Ae,{get each(){return e.state?.items??[]},children:(e,n)=>A(bw.Item,{get value(){return String(n())},role:`menuitemradio`,get checked(){return n()===t()},get children(){var r=jw(),i=r.firstChild,a=i.firstChild,o=a.firstChild;return W(r,A(M,{get when(){return e.depth>0},get children(){var t=Ow(),n=t.firstChild;return _(r=>{var i=`${(e.depth-1)*12}px`,a=e.isLast?`└─`:`├─`;return i!==r.e&&U(t,`padding-left`,r.e=i),a!==r.t&&(n.data=r.t=a),r},{e:void 0,t:void 0}),t}}),i),W(i,A(M,{get when(){return e.componentName},get children(){return[(()=>{var t=kw(),n=t.firstChild;return _(()=>n.data=e.componentName),t})(),Aw()]}}),a),_(r=>{var a=n()===t(),s=n()!==t(),c=e.tagName;return a!==r.e&&i.classList.toggle(`text-[var(--rg-text-primary)]`,r.e=a),s!==r.t&&i.classList.toggle(`text-[var(--rg-text-secondary)]`,r.t=s),c!==r.a&&(o.data=r.a=c),r},{e:void 0,t:void 0,a:void 0}),r}})})}})}})}})}})}})),Pw=l({ReactGrabRenderer:()=>Fw}),Fw,Iw=c((()=>{G(),z(),J(),sa(),Yb(),Qb(),NS(),zC(),Tw(),Dw(),Nw(),Fw=e=>[A(Jb,{get selectionVisible(){return e.selectionVisible},get selectionBounds(){return e.selectionBounds},get selectionBoundsMultiple(){return e.selectionBoundsMultiple},get selectionShouldSnap(){return e.selectionShouldSnap},get dragVisible(){return e.dragVisible},get dragBounds(){return e.dragBounds},get grabbedBoxes(){return e.grabbedBoxes},get labelInstances(){return e.labelInstances}}),A(Zb,{get visible(){return e.isFrozen??!1}}),A(M,{get when(){return Dt(()=>!!e.selectionLabelVisible)()&&(e.frozenLabelEntryAccessors?.length??0)>0},get children(){return A(Ae,{get each(){return e.frozenLabelEntryAccessors??[]},children:e=>A(M,{get when(){return e.read()},children:e=>A(MS,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})})})}}),A(M,{get when(){return Dt(()=>!!e.selectionLabelVisible)()&&e.pendingShiftPreviewEntry},children:e=>A(MS,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})}),A(M,{get when(){return Dt(()=>!!(e.selectionLabelVisible&&e.selectionBounds))()&&(e.frozenLabelEntryAccessors?.length??0)===0},get children(){return A(MS,{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 status(){return e.selectionLabelStatus},get filePath(){return e.selectionFilePath},get onInputChange(){return e.onInputChange},get onSubmit(){return e.onInputSubmit},get selectionLabelShakeCount(){return e.selectionLabelShakeCount},get onConfirmDismiss(){return e.onConfirmDismiss},get discardPrompt(){return e.discardPrompt},get onOpen(){return e.onOpenSelectionFile}})}}),A(Ae,{get each(){return e.labelInstanceAccessors??[]},children:t=>A(M,{get when(){return t.read()},children:t=>A(MS,{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:!0,get status(){return t().status},get statusText(){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`)||!X(n.element)))return()=>e.onShowContextMenuInstance?.(n.id)},onRetry:()=>e.onRetryInstance?.(t().id),onAcknowledgeError:()=>e.onAcknowledgeErrorInstance?.(t().id),onHoverChange:n=>e.onLabelInstanceHoverChange?.(t().id,n)})})}),A(M,{get when(){return e.toolbarVisible!==!1},get children(){return A(RC,{get isActive(){return e.isActive},get isContextMenuOpen(){return e.contextMenuPosition!==null},get onToggle(){return e.onToggleActive},get activeActionId(){return e.activeActionId},get defaultActionId(){return e.defaultActionId},get defaultActionLabel(){return e.defaultActionLabel},get enabled(){return e.enabled},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 onToggleToolbarMenu(){return e.onToggleToolbarMenu}})}}),A(ww,{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??!1},get actions(){return e.actions},get actionContext(){return e.actionContext},get onDismiss(){return e.onContextMenuDismiss??(()=>{})},get onHide(){return e.onContextMenuHide??(()=>{})}}),A(Ew,{get position(){return e.toolbarMenuPosition??null},get actions(){return e.toolbarMenuActions??[]},get defaultActionId(){return e.defaultActionId??`copy`},get onSetDefaultAction(){return e.onSetDefaultAction??(()=>{})},get onDismiss(){return e.onToolbarMenuDismiss??(()=>{})}}),A(Mw,{get position(){return e.hierarchyMenuPosition??null},get state(){return e.hierarchyState}})]}));G(),z(),Ia(),Wa(),co(),hf(),lg(),Hp(),Ap(),sa(),aa(),Ym(),Ra(),J(),Xa(),qa(),Qg(),uo(),Wg(),O_(),Jv(),Cy(),ub(),u_(),t_(),hb(),Sb(),$n(),Zm(),Yi(),ip();let Lw=[A_,j_,M_,$_],Rw={status:`cancelled`},zw=!1,Bw=e=>{if(typeof window>`u`)return ep();let t={enabled:!0,activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,...S_(),...e};if(t.enabled===!1||zw)return ep();zw=!0,io(t.container??null),y_(t.telemetry!==!1);let{enabled:n,telemetry:r,container:i,...a}=t;return m(e=>{let t=!1,n=new AbortController,r=null,i,o=new Set,s=c_(a),{store:c,actions:l,pointer:u,viewportVersion:d,current:f}=Sa({keyHoldDuration:s.store.options.keyHoldDuration??100}),p=y(()=>f().state===`holding`),m=y(()=>f().state===`active`),g=y(()=>{let e=f();return e.state===`active`&&e.phase===`frozen`}),_=y(()=>{let e=f();return e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)}),b=y(()=>{if(!_())return!1;let e=Math.abs(u().x+window.scrollX-c.dragStart.x),t=Math.abs(u().y+window.scrollY-c.dragStart.y);return e>2||t>2}),x=y(()=>{let e=f();return e.state===`active`&&e.phase===`dragging-reposition`}),te=y(()=>{let e=f();return e.state===`active`&&e.phase===`justDragged`}),T=y(()=>f().state===`copying`),E=y(()=>c.selectionInteractionLockDepth>0),D=y(()=>f().state===`justCopied`),O=y(()=>{let e=f();return e.state===`active`&&!!e.isPromptMode}),ne=y(()=>c.pendingCommentMode||O()),re=y(()=>{let e=f();return e.state===`active`&&!!e.isPromptMode&&!!e.isPendingDismiss}),ie=new Map,ae=(e,t)=>{ie.has(e)||ie.set(e,document.body.style[e]),document.body.style[e]=t},oe=e=>{let t=ie.get(e);t!==void 0&&(document.body.style[e]=t,ie.delete(e))};v(C(m,(e,t)=>{e&&!t?(xy(u().x,u().y),ae(`touchAction`,`none`)):!e&&t&&(Sy(),oe(`touchAction`))}));let k=E_(),[se,ce]=h(k?!k.collapsed:!0),[le,ue]=h(0),[de,fe]=h(0),[pe,me]=h(k),[he,ge]=h(!1),_e=k_(e=>e.shiftKey),[ve,ye]=h(null),[be,xe]=h(null),Se=y(()=>c.contextMenuPosition!==null),Ce=y(()=>Se()||ve()!==null),we,Ee=null,De=new WeakMap,j=_b(),Oe=()=>!se()||O()||E()||Se()||j.isPendingDismiss(),ke=()=>{Ke(!1),De=new WeakMap},Ae=e=>{let t=pe()??E_(),n={edge:t?.edge??`bottom`,ratio:t?.ratio??.5,collapsed:t?.collapsed??!1,enabled:t?.enabled??!0,defaultAction:t?.defaultAction??`copy`,...e};D_(n),me(n),wb(o,n)},M=()=>{R.timerId!==null&&(clearTimeout(R.timerId),R.timerId=null)},N=()=>{R.copyWaiting=!1,R.holdTimerFired=!1,R.startTimestamp=null};v(()=>{if(f().state!==`holding`){M();return}R.startTimestamp=Date.now(),R.timerId=window.setTimeout(()=>{if(R.timerId=null,R.copyWaiting){R.holdTimerFired=!0;return}l.activate()},c.keyHoldDuration),w(M)}),v(()=>{let e=f();if(e.state!==`active`||e.phase!==`justDragged`)return;let t=setTimeout(()=>{l.finishJustDragged()},dn);w(()=>clearTimeout(t))}),v(()=>{if(f().state!==`justCopied`)return;let e=setTimeout(()=>{l.finishJustCopied()},dn);w(()=>clearTimeout(e))}),v(C(p,(e,t=!1)=>{!t||e||!m()||(s.store.options.activationMode!==`hold`&&l.setWasActivatedByToggle(!0),s.hooks.onActivate())}));let je=(e,t,n)=>{l.setCopyStart({x:t,y:n},e),l.clearInputText()},Me=()=>{let e=c.frozenElement||G();e&&l.enterPromptMode({x:u().x,y:u().y},e)},Ne={lastDetectionTimestamp:0,pendingDetectionScheduledAt:0,latestPointerX:0,latestPointerY:0},Pe=null,Fe={x:0,y:0},Ie=0,Le=0,[Re,ze]=h(null),[Be,Ve]=h(0),P=()=>{Pe!==null&&(clearTimeout(Pe),Pe=null)},F=e=>{ze({x:Fe.x,y:Fe.y}),Ie=e},He=(e,t)=>{if(!b())return;Fe.x=e,Fe.y=t;let n=performance.now(),r=n-Ie,i=Le>=16;if(Ie===0||!i&&r>=100){P(),F(n);return}P(),Pe=window.setTimeout(()=>{b()&&F(performance.now()),Pe=null},i?32:Math.min(32,100-r))},Ue=(e,t,n)=>(P(),xg(e,{x:t,y:n},Vp)),I=()=>{P(),Ie=0,Le=0,ze(null),Zt()},L=null,R={timerId:null,startTimestamp:null,copyWaiting:!1,holdTimerFired:!1},We=null,[Ge,Ke]=h(!1),qe=0,Je=!1,Ye=null,Xe=()=>{Je=!0,Ye!==null&&window.clearTimeout(Ye),Ye=window.setTimeout(()=>{Je=!1,Ye=null},dn)},Ze=()=>{Ye!==null&&(window.clearTimeout(Ye),Ye=null),Je=!1},z=0,Qe=null,$e=null,[B,tt]=h(!1),[V,nt]=h(null),[rt,it]=h(null),[H,at]=cf(rt),ot=y(()=>ne()?Hn:B()?V():m()?Vn:null),U=e=>Lg(e,Vp),st=m_(Vp,U,Y),ct=__(u,()=>_(),e=>{if(x()){if(l.shiftDragStart(e),We){We={x:We.x+e.x,y:We.y+e.y};return}let{pageX:t,pageY:n}=Wt(u().x,u().y);We={x:t,y:n}}}),W=y(()=>m()&&!T()),lt=new Map,ut=(e,t)=>{let n=l_(`grabbed`),r={id:n,bounds:e,createdAt:Date.now(),element:t};l.addGrabbedBox(r),s.hooks.onGrabbedBox(e,t);let i=window.setTimeout(()=>{lt.delete(n),l.removeGrabbedBox(n)},dn+125);lt.set(n,i)},dt=async e=>{let n=await Promise.all(e.map(async e=>{let t=await Vd(e),n=t?.componentName??null,r=t?.filePath,i=t?.lineNumber??void 0,a=t?.columnNumber??void 0;n||=Hd(e);let o=Qn(e)?e.innerText?.slice(0,100):void 0;return{tagName:La(e),id:e.id||void 0,className:e.getAttribute(`class`)||void 0,textContent:o,componentName:n??void 0,filePath:r,lineNumber:i,columnNumber:a}}));t||window.dispatchEvent(new CustomEvent(`react-grab:element-selected`,{detail:{elements:n}}))},ft=new Map,pt=f_(l,()=>c.labelInstances,()=>ft.clear()),mt=e=>{for(let t of e)c.labelInstances.find(e=>e.id===t)?.status===`copying`&&(ft.delete(t),pt.dismissInstance(t))},ht=()=>{n.abort()},gt=()=>(n.signal.aborted&&!t&&(n=new AbortController),n.signal),_t=()=>(ht(),gt()),vt=()=>{ht(),r=null,mt(c.labelInstances.filter(e=>e.status===`copying`).map(e=>e.id))},yt=async(e,t,n)=>{let r,i;try{if(r=await e(n),r.status===`cancelled`)return r;r.status===`failed`&&(i=`Failed to copy`)}catch(e){if(n.aborted)return Rw;r={status:`failed`},i=ap(e,`Action failed`)}if(t)for(let e of t)pt.updateAfterCopy(e,r.status===`succeeded`,i);return r},bt=(e,t,n,r)=>{if(e){for(let e of n)ft.delete(e);return}let i={operation:t,siblingIds:new Set(n),shouldDeactivateAfter:r};for(let e of n)ft.set(e,i)},xt=async(e,t,n,r=_t())=>{if(r.aborted)return!1;Ze(),f().state!==`copying`&&l.startCopy();let i=await yt(e,t,r);if(i.status===`cancelled`)return!1;let a=i.status===`succeeded`;return t&&bt(a,e,t,!!n),f().state===`copying`?(a&&l.completeCopy(),n?K():a?(l.activate(),Xe()):(l.activate(),l.unfreeze()),!0):!0},St=e=>{let t=ft.get(e);if(!t)return;let n=[...t.siblingIds];for(let e of n)pt.markRetrying(e),ft.delete(e);xt(t.operation,n,t.shouldDeactivateAfter).then(e=>{e||mt(n)})},Ct=e=>{ft.get(e)?.siblingIds.delete(e),ft.delete(e),pt.dismissInstance(e)},wt=(e,t,n,r)=>{let i=e[0],a=r??(i?Hd(i):null),o=i?La(i):null,c=a??o??void 0;return mp({getContent:s.store.options.getContent,componentName:c,maxContextLines:s.store.options.maxContextLines,signal:t},s.hooks,e,n)},Tt=async(e,t,n,r=gt())=>{if(e.length===0||r.aborted)return Rw;let i=[],a=[];for(let t of e){let{wasIntercepted:e,pendingResult:n}=s.hooks.onElementSelect(t);e||i.push(t),n&&a.push(n),s.store.theme.grabbedBoxes.enabled&&ut(Y(t),t)}if(await mf(),r.aborted)return Rw;let o;if(i.length>0&&(o=await wt(i,r,t,n),o.status===`cancelled`))return o;if(a.length>0){let e=await cp(Promise.all(a),r);if(e===sp)return o?.status===`succeeded`?o:Rw;if(!e.every(Boolean))throw new Fa}return r.aborted&&!o?Rw:(dt(e).catch(e=>{Q(new wa(`Element selection notification failed`,e))}),o??{status:`succeeded`})},Et=e=>{let n=_t(),i={},a=!1;r=i,Pd(e.primaryElement).then(async t=>{if(n.aborted||r!==i){mt(e.labelInstanceIds);return}r=null,a=!0,await xt(n=>Tt(e.targetElements,e.extraPrompt,t??void 0,n),e.labelInstanceIds.length>0?e.labelInstanceIds:null,e.shouldDeactivateAfter,n)?e.onComplete?.():mt(e.labelInstanceIds)}).catch(o=>{if(n.aborted){mt(e.labelInstanceIds);return}if(t||!a&&r!==i)return;Q(new wa(`Copy operation failed`,o));let s=ap(o,`Action failed`);for(let t of e.labelInstanceIds)pt.updateAfterCopy(t,!1,s);e.labelInstanceIds.length>0&&bt(!1,t=>Pd(e.primaryElement).then(n=>t.aborted?Rw:Tt(e.targetElements,e.extraPrompt,n??void 0,t)),e.labelInstanceIds,!!e.shouldDeactivateAfter),f().state===`copying`&&(e.shouldDeactivateAfter?K():(l.activate(),l.unfreeze()))}).finally(()=>{r===i&&(r=null)})},Ot=e=>{let{element:t,cursorX:n,selectedElements:r,extraPrompt:i,shouldDeactivateAfter:a,onComplete:o,dragRect:s}=e,u=r??[t],d=s??c.frozenDragRect,f=u.length>1,p=!f&&t===Lt()?Ut():void 0,m=d&&f?jg(d):p??Y(t),h=f?m.x+m.width/2:n,g=La(t);Ze(),l.startCopy();let _=g?pt.createInstance(m,g,void 0,`copying`,{element:t,mouseX:h,elements:r}):null;Et({primaryElement:t,targetElements:u,labelInstanceIds:_?[_]:[],extraPrompt:i,shouldDeactivateAfter:a,onComplete:o})},kt=e=>{let{elements:t,labelEntries:n,shouldDeactivateAfter:r,onComplete:i}=e,a=t[0];Ze(),l.startCopy(),Et({primaryElement:a,targetElements:t,labelInstanceIds:pt.createPerElementInstances(n,`copying`),shouldDeactivateAfter:r,onComplete:i})},G=y(()=>{if(d(),!W()||b()||E()||j.isPendingDismiss())return null;let e=c.detectedElement;return X(e)?e:null}),jt=y(()=>c.frozenElement||(g()?null:G())),Mt=y(()=>!m()||O()||Ge()||T()||Ce()||j.isPendingDismiss()?null:_e()?g()?jt():G()??c.frozenElement:j.selectedElement()),Nt=y(()=>{let e=Mt();return e?Pg(e,Vp,U):[]}),Pt=y(()=>{let e=Mt();return e?Math.max(0,Nt().findIndex(t=>t.element===e)):0}),Ft=y(()=>Mt()!==null);v(()=>{if(!c.detectedElement)return;let e=1,t=setInterval(()=>{if(X(c.detectedElement)||l.relinkLiveElements(),!X(c.detectedElement)){if(e>0){--e;return}dr()}},100);w(()=>clearInterval(t))}),v(C(jt,e=>{if(Qe!==null&&(clearTimeout(Qe),Qe=null),!e){it(null);return}Qe=window.setTimeout(()=>{Qe=null,it(e)},100)})),w(()=>{Qe!==null&&(clearTimeout(Qe),Qe=null)}),v(()=>{let e=c.frozenElements;w(Bv(e))}),v(C(m,e=>{e&&s.store.options.freezeReactUpdates&&w(lb())}));let It=()=>{if(c.isTouchMode&&_()){let e=c.detectedElement;return!X(e)||kp(e)?void 0:e}let e=jt();if(!(!e||kp(e)))return e},Lt=y(()=>It()),Rt=()=>Lt()?c.isTouchMode&&_()?W():W()&&!b():!1,zt=Te(()=>c.frozenElements,e=>y(()=>(d(),Y(e)))),Bt=y(()=>{let e=c.frozenElements;if(e.length===0)return[];let t=c.frozenDragRect;return t&&e.length>1?[jg(t)]:zt().map(e=>e())}),Vt=y(()=>{if(!Ge()||c.pendingCommentMode||B())return null;let e=c.detectedElement;return!X(e)||kp(e)||c.frozenElements.includes(e)?null:e}),Ht=y(()=>{d();let e=Vt();if(e)return Y(e)}),Ut=y(()=>{d();let e=c.frozenElements;if(e.length>0){let t=Bt();if(e.length===1){let e=t[0];if(e)return e}let n=c.frozenDragRect;return n?t[0]??jg(n):Ng(i_(t))}let t=Lt();if(t)return Y(t)}),Wt=(e,t)=>({pageX:e+window.scrollX,pageY:t+window.scrollY}),Gt=(e,t)=>{let{pageX:n,pageY:r}=Wt(e,t);return{x:Math.abs(n-c.dragStart.x),y:Math.abs(r-c.dragStart.y)}},Kt=(e,t)=>{let{pageX:n,pageY:r}=Wt(e,t),i=Math.min(c.dragStart.x,n),a=Math.min(c.dragStart.y,r),o=Math.abs(n-c.dragStart.x),s=Math.abs(r-c.dragStart.y);return{x:i-window.scrollX,y:a-window.scrollY,width:o,height:s}},qt=e=>e.code===`Space`||e.key===` `,Jt=()=>{if(!_())return;l.startDragReposition();let{pageX:e,pageY:t}=Wt(u().x,u().y);We={x:e,y:t}},Yt=()=>{l.stopDragReposition(),We=null},Xt=y(()=>{if(d(),b())return Ng(Kt(u().x,u().y))}),Zt=y(()=>{if(Be(),!b())return[];let e=Re();if(!e)return[];let t=Kt(e.x,e.y),n=performance.now(),r=xg(t,e,Vp);return Le=performance.now()-n,r}),Qt=y(()=>(d(),Zt().map(e=>Y(e)))),$t=y(()=>{let e=Qt();if(e.length>0)return e;let t=Ht();return t?[...Bt(),t]:Bt()}),en=Te(()=>c.frozenElements,e=>{let t=La(e)||`element`,n=Hd(e)??void 0;return{read:y(()=>{if(d(),!X(e))return null;let r=Y(e),i=De.get(e);return{tagName:t,componentName:n,bounds:r,mouseX:i===void 0?void 0:r.x+r.width*i}})}}),tn=y(()=>{if(O()||c.frozenElements.length<2)return[];let e=[];for(let t of en())t.read()!==null&&e.push(t);return e}),nn=y(()=>{if(O())return null;let e=Vt();return e?(d(),{tagName:La(e)||`element`,componentName:Hd(e)??void 0,bounds:Y(e),mouseX:u().x}):null}),rn=y(()=>{if(T()||O()){d();let e=c.frozenElement||G();return e?{x:oa(Y(e)).x+c.copyOffsetFromCenterX,y:c.copyStart.y}:{x:c.copyStart.x,y:c.copyStart.y}}return{x:u().x,y:u().y}}),an=y(()=>{if(!Ge()||c.frozenElements.length!==1)return;d();let e=c.frozenElements[0];if(!X(e))return;let t=De.get(e);if(t===void 0)return;let n=Y(e);return n.x+n.width*t});v(C(()=>[G(),c.lastGrabbedElement],([e,t])=>{t&&e&&t!==e&&l.setLastGrabbed(null),e&&s.hooks.onElementHover(e)})),v(C(()=>G(),e=>{let t=++z,n=()=>{z===t&&l.setSelectionSource(null,null)};if(!e){n();return}Vd(e).then(e=>{if(z===t){if(!e){n();return}l.setSelectionSource(e.filePath,e.lineNumber)}}).catch(()=>{z===t&&l.setSelectionSource(null,null)})}));let on=y(()=>c.grabbedBoxes.map(e=>({id:e.id,bounds:e.bounds,createdAt:e.createdAt}))),sn=y(()=>c.labelInstances.map(e=>({id:e.id,status:e.status,tagName:e.tagName,componentName:e.componentName,createdAt:e.createdAt})));v(C(y(()=>{let e=m(),t=_(),n=T(),r=O(),i=G(),a=Xt(),o=s.store.theme.enabled,l=s.store.theme.selectionBox.enabled,u=s.store.theme.dragBox.enabled,d=b(),f=jt(),p=D();return{isActive:e,isDragging:t,isCopying:n,isPromptMode:r,isSelectionBoxVisible:!!(o&&l&&e&&!n&&!p&&!t&&f!=null),isDragBoxVisible:!!(o&&u&&e&&!n&&d),targetElement:i,dragBounds:a?{x:a.x,y:a.y,width:a.width,height:a.height}:null,grabbedBoxes:[...on()],labelInstances:[...sn()],selectionFilePath:c.selectionFilePath,toolbarState:pe()}}),e=>{s.hooks.onStateChange(e)})),v(C(()=>{let e=O();return{inputMode:e,position:e?u():S(u),target:e?G():S(G)}},({inputMode:e,position:t,target:n})=>{s.hooks.onPromptModeChange(e,{x:t.x,y:t.y,targetElement:n})})),v(C(()=>[jr(),Ut(),G()],([e,t,n])=>{s.hooks.onSelectionBox(!!e,t??null,n)})),v(C(()=>[Vr(),Xt()],([e,t])=>{s.hooks.onDragBox(!!e,t??null)})),v(C(()=>{let e=Ur();return[e,Hr(),e?rn():S(rn),e?G():S(G),c.selectionFilePath,c.selectionLineNumber]},([e,t,n,r,i,a])=>{s.hooks.onElementLabel(e,t,{x:n.x,y:n.y,content:``,element:r??void 0,tagName:r&&La(r)||void 0,filePath:i??void 0,lineNumber:a??void 0})}));let cn=null,ln=e=>{if(e){if(!cn){cn=document.createElement(`style`),cn.setAttribute(`data-react-grab-cursor`,``);let e=Ka();e&&(cn.nonce=e),Ya(cn),document.head.appendChild(cn)}cn.textContent=`* { cursor: ${e} !important; }`}else cn&&=(cn.remove(),null)};v(C(()=>[m(),T(),O()],([e,t,n])=>{ln(t?`progress`:e&&!n?`crosshair`:null)}));let un=()=>{let e=p();l.activate(),e||s.hooks.onActivate()},K=()=>{vt();let e=_(),t=c.previouslyFocusedElement;Yt(),l.deactivate(),ri(),ke(),Kn(),j.clear(),tt(!1),nt(null),e&&(oe(`userSelect`),I()),L&&window.clearTimeout(L),ct.stop(),Qn(t)&&t!==document.body&&t!==document.activeElement&&X(t)&&t.focus({preventScroll:!0}),s.hooks.onDeactivate()},fn=()=>{p()&&l.releaseHold(),m()||T()?K():vt(),Ze()},pn=()=>{l.setWasActivatedByToggle(!0),un()},mn=()=>{let e=[...c.frozenElements],t=c.frozenElement||G(),n=O()?c.inputText.trim():``;if(!t){K();return}let r=e.length>0?e:[t],i=r.map(e=>Y(e))[0],{x:a,y:o}=oa(i),s=a+c.copyOffsetFromCenterX;l.setPointer({x:a,y:o}),l.exitPromptMode(),l.clearInputText(),Ot({element:t,cursorX:s,selectedElements:r,extraPrompt:n||void 0,shouldDeactivateAfter:!0})},hn=()=>{if(O()){if(re()){l.clearInputText(),K();return}l.setPendingDismiss(!0),fe(e=>e+1)}},gn=()=>{if(j.isPendingDismiss()){J();return}l.clearInputText(),K()},_n=()=>{l.setPendingDismiss(!1)},vn=()=>{$e=null,tt(!1),l.setPendingCommentMode(!1),nt(null)},yn=e=>{$e=e,nt(e),tt(!0)},bn=e=>{let t=c.frozenElement||G();if(!t)return!1;let n={x:u().x,y:u().y},r=s.store.actions.find(t=>t.id===e);return r?(l.clearInputText(),l.exitPromptMode(),vn(),xb(r,nr(t,n))||Tn(t,n),!0):(l.clearInputText(),l.exitPromptMode(),vn(),Tn(t,n),!0)},xn=e=>{if(T()){K();return}if(m()){if(ot()!==e){if(O()){if(bn(e))return;K();return}l.setPendingCommentMode(!1),yn(e);return}K();return}se()&&(yn(e),pn())},Sn=()=>{xn(pe()?.defaultAction??`copy`)},Cn=()=>{let e=pe()?.defaultAction??`copy`;return s.store.actions.find(t=>t.id===e)?.label??`Copy`},wn=(e,t,n)=>{vn(),l.clearInputText(),l.enterPromptMode({x:t,y:n},e)},Tn=(e,t)=>{ke(),ii(),l.showContextMenu(t,e),Kn(),s.hooks.onContextMenu(e,t)},En=(e,t)=>{let n=$e;if($e=null,nt(null),!n)return;let r=s.store.actions.find(e=>e.id===n);if(!r){Tn(e,t);return}xb(r,nr(e,t))||Tn(e,t)},Dn=()=>{if(se()){if(m()&&ne()){K();return}l.setPendingCommentMode(!0),m()||pn()}},On=(e,t,n)=>{let r=n&&Ge()&&!_()&&!c.pendingCommentMode&&!B();if(Oe()||g()&&!r)return;if(l.setPointer({x:e,y:t}),Ne.latestPointerX=e,Ne.latestPointerY=t,r){let n=sg(e,t);n!==c.detectedElement&&l.setDetectedElement(n);return}let i=performance.now(),a=Ne.pendingDetectionScheduledAt>0&&i-Ne.pendingDetectionScheduledAt<200;if(!b()&&!a){Ne.pendingDetectionScheduledAt=i;let e=Math.max(0,32-(i-Ne.lastDetectionTimestamp));setTimeout(()=>{if(Oe()||g()||b()){Ne.pendingDetectionScheduledAt=0;return}c.detectedElement&&!X(c.detectedElement)&&(l.relinkLiveElements(),cg()),Ne.lastDetectionTimestamp=performance.now();let e=sg(Ne.latestPointerX,Ne.latestPointerY);e!==c.detectedElement&&l.setDetectedElement(e),Ne.pendingDetectionScheduledAt=0},e)}if(_()){if(x()){let{pageX:n,pageY:r}=Wt(e,t);We&&l.shiftDragStart({x:n-We.x,y:r-We.y}),We={x:n,y:r}}He(e,t);let n=g_(e,t),r=n.top||n.bottom||n.left||n.right;r&&!ct.isActive()?ct.start():!r&&ct.isActive()&&ct.stop()}},kn=(e,t,n)=>{if(!W()||E())return!1;!n&&Ge()&&ke();let r=j.selectedElement()!==null;return l.startDrag({x:e,y:t},n||r),l.setPointer({x:e,y:t}),ae(`userSelect`,`none`),s.hooks.onDragStart(e+window.scrollX,t+window.scrollY),!0},An=(e,t)=>{let n=c.frozenElements.includes(e),r=c.frozenElements.length===0;if(!n){let n=Sg(Y(e),t);De.set(e,n),r&&at(Hd(e)??void 0)}l.toggleFrozenElement(e),cg();let i=c.frozenElements.includes(e);if(i||De.delete(e),c.frozenElements.length===0){ke(),l.unfreeze();return}Rv(c.frozenElements),Ke(!0),l.setPointer(t),l.setLastGrabbed(i?e:c.frozenElements[c.frozenElements.length-1]),l.freeze(),Kn()},jn=()=>{let e=c.frozenElements.filter(X),t=e.map(e=>{let t=La(e)||`element`,n=Hd(e)??void 0,r=De.get(e),i=Y(e);return{element:e,tagName:t,componentName:n,mouseX:r===void 0?i.x+i.width/2:i.x+i.width*r}});if(ke(),e.length===0){l.unfreeze();return}if(e.length===1){Ot({element:e[0],cursorX:t[0].mouseX,selectedElements:e,shouldDeactivateAfter:c.wasActivatedByToggle});return}kt({elements:e,labelEntries:t,shouldDeactivateAfter:c.wasActivatedByToggle})},Mn=(e,t,n,r)=>{if(t.length===0)return;let i=r&&!c.pendingCommentMode&&!B();if(i&&l.addFrozenElements(t),Rv(i?c.frozenElements:t),s.hooks.onDragEnd(t,e),i){let e=t[t.length-1];Ke(!0),cg(),l.setPointer(oa(Y(e))),l.setLastGrabbed(e),l.freeze(),Kn();return}let a=t[0],o=oa(Y(a));l.setPointer(o),l.setFrozenElements(t);let u=Mg(e);if(l.setFrozenDragRect(u),l.freeze(),l.setLastGrabbed(a),c.pendingCommentMode){wn(a,o.x,o.y);return}if(B()){tt(!1),$e?En(a,o):Tn(a,o);return}let d=c.wasActivatedByToggle&&!n;Ot({element:a,cursorX:o.x,selectedElements:t,shouldDeactivateAfter:d,dragRect:u})},Fn=e=>{for(let t of c.frozenElements)if(X(t)&&w_(e,Y(t)))return t;return null},In=(e,t,n,r)=>{let i=X(c.frozenElement)?c.frozenElement:null,a=j.selectedElement(),o=()=>og(e,t).find(Vp)??null;if(r&&!c.pendingCommentMode&&!B()){let n=o();n!==null&&An(n,{x:e,y:t});return}let d=o()??(X(c.detectedElement)?c.detectedElement:null),f=a??d??i;if(!f)return;let p,m,h=d===null&&i===f,g=a===f;if(h)p=u().x,m=u().y;else if(g){let e=oa(Y(f));p=e.x,m=e.y}else p=e,m=t;if(c.pendingCommentMode){wn(f,p,m),j.clear();return}if(B()){tt(!1);let{wasIntercepted:e}=s.hooks.onElementSelect(f);if(e)return;j.clear(),Rv([f]),l.setFrozenElement(f);let t={x:p,y:m};l.setPointer(t),l.freeze(),$e?En(f,t):Tn(f,t);return}let _=c.wasActivatedByToggle&&!n;l.setLastGrabbed(f),Ot({element:f,cursorX:p,shouldDeactivateAfter:_}),j.clear()},Ln=()=>{_()&&(Yt(),I(),l.cancelDrag(),ct.stop(),oe(`userSelect`),dr())},Rn=(e,t,n,r)=>{if(!_())return;let i=Gt(e,t),a=i.x>2||i.y>2,o=a?Kt(e,t):null,s=o?Ue(o,e,t):[];I(),a?l.endDrag():l.cancelDrag(),Yt(),ct.stop(),oe(`userSelect`),o?Mn(o,s,n,r):In(e,t,n,r)},q=tp(),Bn=jb({shouldForwardInteraction:()=>m()||p()||_()||E(),shouldForwardKeyboardEvent:e=>Xg(e,s.store.options),shouldForwardViewportEvent:e=>{let t=c.frozenElement??G();return t&&Mb(e,t)?!0:c.frozenElements.some(t=>Mb(e,t))}}),Un=h_(),Gn=e=>{let t;try{t=Un.originalKeyDescriptor?.get?Un.originalKeyDescriptor.get.call(e):e.key}catch{return!1}let n=t===`Enter`||C_(e.code),r=m()||p();return n&&r&&!O()&&!j.isPendingDismiss()&&!c.wasActivatedByToggle?Zg(e,`data-react-grab-input`)?!1:(Un.claimedEvents.add(e),e.preventDefault(),e.stopImmediatePropagation(),!0):!1};q.addDocumentListener(`keydown`,so(Gn),{capture:!0}),q.addDocumentListener(`keyup`,so(Gn),{capture:!0}),q.addDocumentListener(`keypress`,so(Gn),{capture:!0});let Kn=()=>{st.clearHistory(),j.clear()},qn=(e,t=!1)=>{l.setFrozenElement(e),l.freeze(),j.select(e,{shouldPromptBeforeMouseHandoff:t});let n=oa(Y(e));l.setPointer(n),c.contextMenuPosition!==null&&l.showContextMenu(n,e)},Yn=()=>{j.showDismissPrompt()&&fe(e=>e+1)},J=()=>{j.clear(),l.unfreeze(),Kn()},Xn=()=>{let e=j.takeSelection(c.frozenElement);if(!e){J();return}let t=oa(Y(e));Kn(),l.setLastGrabbed(e),Ot({element:e,cursorX:t.x,shouldDeactivateAfter:c.wasActivatedByToggle})},Zn=e=>Pn.has(e.key)?e.key:e.key===`Tab`?e.shiftKey?`ArrowLeft`:`ArrowRight`:null,$n=(e,t={})=>{if(!m()||O()||Ge()||j.isPendingDismiss()&&!t.allowPendingKeyboardSelection)return!1;let n=Zn(e);if(!n||Ce())return!1;let r=jt(),i=!r;if(!r){let e=ao()?.getBoundingClientRect();r=e?sg(e.left+e.width/2,e.top+e.height/2):sg(window.innerWidth/2,window.innerHeight/2)}if(!r)return!1;let a=n===`ArrowUp`||n===`ArrowDown`,o=st.findNext(n,r);if(!o&&!a&&!i)return!1;let s=o??r;return e.preventDefault(),e.stopPropagation(),qn(s,!0),!0},er=e=>e.metaKey||e.ctrlKey||e.altKey||e.repeat||Va(e)||!m()||T()||E()||Ce()?null:c.frozenElement||G(),tr=e=>{let t=er(e);if(!t)return null;let n=mb(s.store.actions,e);return n?{element:t,action:n}:null},nr=(e,t)=>{let n=Y(e);return Qr({element:e,filePath:c.selectionFilePath??void 0,lineNumber:c.selectionLineNumber??void 0,tagName:La(e)||void 0,componentName:H(),position:t,shouldDeferHideContextMenu:!1,performWithFeedbackOptions:{fallbackBounds:n,fallbackSelectionBounds:[n],position:t}})},rr=e=>{let t=tr(e);if(!t)return!1;let{element:n,action:r}=t;return O()?bn(r.id)?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1:xb(r,nr(n,{x:u().x,y:u().y}))?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1},ir=()=>{let e=c.selectionFilePath,t=c.selectionLineNumber;e&&r_(e,t??void 0,s.hooks)},ar=e=>e.key?.toLowerCase()!==`o`||!m()||!(e.metaKey||e.ctrlKey)||!c.selectionFilePath?!1:(e.preventDefault(),e.stopPropagation(),ir(),!0),or=e=>{if(!m()||T()||c.contextMenuPosition!==null)return!1;let t=e.key===`F10`&&e.shiftKey,n=e.key===`ContextMenu`;if(!t&&!n)return!1;let r=c.frozenElements,i=r.length>1,a=(i?r[0]:null)||c.frozenElement||G();if(!a)return!1;e.preventDefault(),e.stopPropagation();let o=oa(Y(a));return i?Rv(r):(Rv([a]),l.setFrozenElement(a)),l.setPointer(o),l.freeze(),Tn(a,o),!0},sr=y(()=>Nt().map(e=>({tagName:La(e.element)||`element`,componentName:Hd(e.element)??void 0,depth:e.depth,isLast:e.isLast}))),cr=y(()=>({items:sr(),activeIndex:Pt()})),lr=e=>{if(!(!s.store.options.allowActivationInsideInput&&Va(e))&&!(!Xg(e,s.store.options)&&((e.metaKey||e.ctrlKey)&&!Nn.includes(e.key)&&!C_(e.code)&&(m()&&!c.wasActivatedByToggle?K():p()&&(M(),N(),l.releaseHold())),!C_(e.code)||!p()))){if((m()||p())&&!O()&&(e.preventDefault(),C_(e.code)&&e.stopImmediatePropagation()),m()){if(c.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e.repeat)return;L!==null&&window.clearTimeout(L),L=window.setTimeout(()=>{K()},200);return}if(p()&&e.repeat){if(R.copyWaiting){let e=R.holdTimerFired;N(),e&&l.activate()}return}if(!(T()||D())&&!p()){let t=s.store.options.keyHoldDuration??100;Va(e)?Ha(e)?t+=600:t+=400:Ua()&&(t+=600),N(),l.startHold(t)}}},ur=e=>{if(!j.isPendingDismiss())return!1;if(C_(e.code))return!0;let t=Pn.has(e.key),n=tr(e)!==null;return!t&&!n?!1:t?$n(e,{allowPendingKeyboardSelection:!0}):rr(e)?(Kn(),!0):!1};q.addWindowListener(`keydown`,so(e=>{if(Zn(e)&&Va(e)||ur(e))return;if(Gn(e),!se()){Xg(e,s.store.options)&&!e.repeat&&ue(e=>e+1);return}let t=C_(e.code)&&p()&&!O(),n=Zg(e,zn);if(O()&&Xg(e,s.store.options)&&!e.repeat&&!n){e.preventDefault(),e.stopPropagation(),hn();return}if(e.key===`Escape`&&T()){K();return}if(e.key===`Escape`&&Ce()){ve()!==null&&ri();return}let r=Zg(e,`data-react-grab-ignore-events`)&&!t;if(O()||r)return O()&&!n&&rr(e)||(e.key===`Escape`&&(O()?hn():c.wasActivatedByToggle&&K()),r&&Pn.has(e.key)&&$n(e)),void 0;if(_()&&qt(e)){e.repeat||Jt(),e.preventDefault(),e.stopPropagation();return}if(e.key===`Escape`&&(p()||c.wasActivatedByToggle)){K();return}m()&&!Nn.includes(e.key)&&e.preventDefault();let i=Date.now()-qe<200;$n(e)||ar(e)||or(e)||rr(e)||i||lr(e)}),{capture:!0}),q.addWindowListener(`keyup`,so(e=>{if(Gn(e))return;if(qt(e)&&x()&&(Yt(),e.preventDefault(),e.stopPropagation()),e.key===`Shift`&&Ge()){_()&&Ln(),jn();return}if(Zg(e,`data-react-grab-ignore-events`))return;let t=Yg(s.store.options.activationKey),n=t.metaKey||t.ctrlKey?Ug()?!e.metaKey:!e.ctrlKey:t.shiftKey&&!e.shiftKey||t.altKey&&!e.altKey,r=s.store.options.activationKey?Jg(s.store.options.activationKey)(e):Bg(e.key,e.code);if(D()||Je){(r||n)&&(Ze(),K());return}if(!p()&&!m()||O())return;let i=!!s.store.options.activationKey,a=s.store.options.activationMode===`hold`,o=_();if(m()){let e=Se();if(n){if(c.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e)return;K()}else if(a&&r){if(L!==null&&(window.clearTimeout(L),L=null),e||o)return;K()}else !i&&r&&L!==null&&(window.clearTimeout(L),L=null);return}if(r||n){if(c.wasActivatedByToggle&&s.store.options.activationMode!==`hold`)return;if(p()||R.holdTimerFired&&n){M();let t=(R.startTimestamp?Date.now()-R.startTimestamp:0)>=200,n=R.holdTimerFired&&t&&(s.store.options.allowActivationInsideInput||!Va(e));N(),n?l.activate():l.releaseHold()}else K()}}),{capture:!0}),q.addDocumentListener(`copy`,()=>{p()&&(R.copyWaiting=!0)}),q.addWindowListener(`keypress`,so(Gn),{capture:!0}),q.addWindowListener(`pointermove`,so(e=>{if(!e.isPrimary)return;let t=e.pointerType===`touch`;if(l.setTouchMode(t),!Zg(e,`data-react-grab-ignore-events`)&&!Oe()&&!(t&&!p()&&!m())){if((t?p():m())&&!O()&&g()&&!e.shiftKey&&!Ge()){if(j.consumeMouseHandoff()){Yn();return}l.unfreeze(),Kn()}On(e.clientX,e.clientY,e.shiftKey)}}),{passive:!0,capture:!0}),q.addWindowListener(`pointerdown`,so(e=>{if(e.button===0&&e.isPrimary&&(l.setTouchMode(e.pointerType===`touch`),!(!_()&&Zg(e,`data-react-grab-ignore-events`))&&!Se())){if(O()){let t=Ut();t&&e.clientX>=t.x&&e.clientX<=t.x+t.width&&e.clientY>=t.y&&e.clientY<=t.y+t.height?mn():hn();return}if(j.isPendingDismiss()){e.preventDefault(),e.stopImmediatePropagation();return}if(E()){e.preventDefault(),e.stopImmediatePropagation();return}if(kn(e.clientX,e.clientY,e.shiftKey)){if(e.pointerId!==void 0)try{document.documentElement.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),e.stopImmediatePropagation()}}}),{capture:!0}),q.addWindowListener(`pointerup`,so(e=>{if(e.button!==0||!e.isPrimary||Zg(e,`data-react-grab-ignore-events`)||Se())return;let t=W()||E()||_(),n=e.metaKey||e.ctrlKey;Rn(e.clientX,e.clientY,n,e.shiftKey),t&&(e.preventDefault(),e.stopImmediatePropagation())}),{capture:!0}),q.addWindowListener(`contextmenu`,so(e=>{if(!W()||T()||O())return;let t=Zg(e,`data-react-grab-ignore-events`),n={x:e.clientX,y:e.clientY},r=t&&c.frozenElements.length>1?Fn(n):null,i=j.isPendingDismiss();if(t&&!r&&!i&&!Ft())return;if(Se()){e.preventDefault();return}e.preventDefault(),e.stopPropagation();let a=r??sg(e.clientX,e.clientY);if(!a)return;let o=c.frozenElements;o.length>1&&o.includes(a)?Rv(o):(Rv([a]),l.setFrozenElement(a)),l.setPointer(n),l.freeze(),Tn(a,n)}),{capture:!0}),q.addWindowListener(`pointercancel`,so(e=>{e.isPrimary&&Ln()}),{capture:!0}),q.addWindowListener(`click`,so(e=>{Zg(e,`data-react-grab-ignore-events`)||Se()||(W()||te())&&(e.preventDefault(),e.stopImmediatePropagation(),c.wasActivatedByToggle&&!O()&&!e.shiftKey&&(p()?l.setWasActivatedByToggle(!1):K()))}),{capture:!0}),q.addDocumentListener(`visibilitychange`,()=>{if(document.hidden){l.clearGrabbedBoxes();let e=c.activationTimestamp;m()&&!O()&&e!==null&&Date.now()-e>500&&K()}}),q.addWindowListener(`blur`,()=>{Ln(),p()&&(M(),l.releaseHold(),N()),ke()}),q.addWindowListener(`focus`,()=>{qe=Date.now()}),q.addWindowListener(`focusin`,e=>{Zg(e,lo)&&e.stopPropagation()},{capture:!0});let dr=()=>{if(!(c.isTouchMode&&!p()&&!m())&&!Oe()&&!g()&&!_()&&c.frozenElements.length===0){let e=sg(u().x,u().y);l.setDetectedElement(e)}},fr=null,pr=null,mr=null,hr=()=>{Ag(),Jm(),dr(),Ve(e=>e+1),l.incrementViewportVersion(),l.updateContextMenuPosition()},gr=()=>{Ag(),mr===null&&(mr=ff(()=>{mr=null,hr()}))},_r=()=>{Bp(),hr()};q.addWindowListener(`scroll`,gr,{capture:!0,passive:!0});let vr=window.innerWidth,yr=window.innerHeight;q.addWindowListener(`resize`,()=>{let e=window.innerWidth,t=window.innerHeight;if(vr>0&&yr>0){let n=e/vr,r=t/yr,i=Math.abs(n-r)<Wn,a=Math.abs(n-1)>Wn;i&&a&&l.setPointer({x:u().x*n,y:u().y*r})}vr=e,yr=t,_r()});let br=window.visualViewport;if(br){let{signal:e}=q;br.addEventListener(`resize`,_r,{signal:e}),br.addEventListener(`scroll`,gr,{signal:e})}let xr=()=>{pr===null&&(pr=ff(()=>{pr=null,l.incrementViewportVersion()}))};v(()=>{if(s.store.theme.enabled&&(m()||T()||c.labelInstances.length>0||c.grabbedBoxes.length>0)){if(fr!==null)return;fr=window.setInterval(()=>{l.relinkLiveElements(),xr()},100);return}fr!==null&&(window.clearInterval(fr),fr=null),pr!==null&&(pf(pr),pr=null)}),w(()=>{fr!==null&&window.clearInterval(fr),pr!==null&&pf(pr),mr!==null&&pf(mr)}),q.addDocumentListener(`copy`,so(e=>{O()||Zg(e,`data-react-grab-ignore-events`)||W()&&e.preventDefault()}),{capture:!0}),w(()=>{let e=[];$(Bn,e),$(()=>q.abort(),e),P(),L&&window.clearTimeout(L),$(Ze,e),Ee&&$(Ee,e),Ee=null,lt.forEach(e=>window.clearTimeout(e)),lt.clear(),$(pt.cancelAllFades,e),ft.clear(),$(ct.stop,e),$(Sy,e),$(()=>oe(`userSelect`),e),$(()=>oe(`touchAction`),e),$(()=>ln(null),e),$(Un.restore,e),$(()=>io(null),e),Xm(e,`Disposing React Grab failed`)});let{root:Sr,host:Cr,cancelPendingAttachment:wr}=ho(At);w(wr),w(Qf(Cr).cleanup);let Tr=y(()=>s.store.theme.enabled),Er=y(()=>s.store.theme.selectionBox.enabled),Dr=y(()=>s.store.theme.elementLabel.enabled),Or=y(()=>s.store.theme.dragBox.enabled),kr=y(()=>D()||he()&&!g()),Ar=y(()=>Qt().length>0),jr=y(()=>!Tr()||!Er()||kr()?!1:Ar()?!0:Rt()),Mr=y(()=>{let e=Lt();if(e)return La(e)||void 0}),Nr=y(()=>!Tr()||Se()||!Dr()||kr()?!1:Rt()),Pr=new Map,Fr=e=>{let t=e.elements?.filter(X)??[],n=e.element,r=null;t.length>0?r=t.map(Y):n&&X(n)&&(r=[Y(n)]);let i=e.bounds,a=e.boundsMultiple;r&&(i=r.length>1?Ng(i_(r)):r[0],e.boundsMultiple!==void 0&&(a=e.boundsMultiple.length>1&&e.boundsMultiple.length===e.elements?.length?r:[i]));let o=Pr.get(e.id),s=o?.boundsMultiple,c=s===a||s!==void 0&&a!==void 0&&s.length===a.length&&s.every((e,t)=>e.x===a[t].x&&e.y===a[t].y&&e.width===a[t].width&&e.height===a[t].height);if(o&&o.status===e.status&&o.errorMessage===e.errorMessage&&o.bounds.x===i.x&&o.bounds.y===i.y&&o.bounds.width===i.width&&o.bounds.height===i.height&&c)return o;let l=i.x+i.width/2,u=i.width/2,d;d=e.mouseXOffsetRatio!==void 0&&u>0?l+e.mouseXOffsetRatio*u:e.mouseXOffsetFromCenter===void 0?e.mouseX??l:l+e.mouseXOffsetFromCenter;let f={...e,bounds:i,boundsMultiple:a,mouseX:d};return Pr.set(e.id,f),f},Ir=y(()=>{if(!Tr()||!s.store.theme.grabbedBoxes.enabled)return[];d();let e=new Set(c.labelInstances.map(e=>e.id));for(let t of Pr.keys())e.has(t)||Pr.delete(t);return c.labelInstances.map(Fr)}),Lr=y(()=>new Map(Ir().map(e=>[e.id,e]))),Rr=new Map,zr=y(()=>{let e=Ir(),t=new Set(e.map(e=>e.id));for(let e of Rr.keys())t.has(e)||Rr.delete(e);return e.map(e=>{let t=Rr.get(e.id);if(t)return t;let n=e.id,r={read:()=>Lr().get(n)??null};return Rr.set(n,r),r})}),Br=y(()=>!Tr()||!s.store.theme.grabbedBoxes.enabled?[]:(d(),c.grabbedBoxes.map(e=>X(e.element)?{...e,bounds:Y(e.element)}:e))),Vr=y(()=>Tr()&&Or()&&W()&&b()),Hr=y(()=>T()?`processing`:`hover`),Ur=y(()=>{if(!Tr())return!1;let e=Dr(),t=O(),n=T(),r=W(),i=_(),a=!!jt(),o=he(),s=g();return!e||t||o&&!s?!1:n?!0:r&&!i&&a}),Wr=y(()=>{d();let e=c.contextMenuElement;return e?Y(e):null}),Gr=y(()=>(d(),c.contextMenuPosition)),Kr=y(()=>{let e=c.contextMenuElement;if(!e)return;let t=c.frozenElements.length;return t>1?`${t} elements`:La(e)||void 0}),[qr]=cf(()=>c.frozenElements.length>1?null:c.contextMenuElement),[Jr]=ee(()=>c.contextMenuElement,async e=>e?Vd(e):null),Yr=async e=>{l.incrementSelectionInteractionLockDepth();try{return await e()}finally{l.decrementSelectionInteractionLockDepth()}},Xr=(e,t,n,r,i)=>async a=>{await Yr(async()=>{let o=i?.fallbackBounds??null,s=i?.fallbackSelectionBounds??[],d=i?.position??c.contextMenuPosition??u(),f=Bt(),p=Wr()??o,m=t.length>1,h=m?Ng(i_(f)):p,g=c.wasActivatedByToggle,_;if(_=m?f:p?[p]:s,l.hideContextMenu(),h){let i=m?h.x+h.width/2:d.x,o=pt.createInstance(h,n||`element`,r,`copying`,{element:e,mouseX:i,elements:m?t:void 0,boundsMultiple:_}),s=!1,c;try{s=await a(),s||(c=`Failed to copy`)}catch(e){c=ap(e,`Action failed`)}pt.updateAfterCopy(o,s,c)}else try{await a()}catch(e){Q(new wa(`Action failed without feedback bounds`,e))}g?K():l.unfreeze()})},Zr=()=>{setTimeout(()=>{l.hideContextMenu()},0)},Qr=e=>{let{element:t,filePath:n,lineNumber:r,tagName:i,componentName:a,position:o,performWithFeedbackOptions:u,shouldDeferHideContextMenu:d,onBeforeCopy:f,onBeforePrompt:p,customEnterPromptMode:h}=e,g=c.frozenElements.length>0?c.frozenElements:[t],_=d?Zr:l.hideContextMenu,v={element:t,elements:g,filePath:n,lineNumber:r,componentName:a,tagName:i,enterPromptMode:h??(()=>{pt.clearAll(),vn(),p?.(),je(t,o.x,o.y),l.setPointer({x:o.x,y:o.y}),l.setFrozenElement(t),Me(),m()||un(),_()}),copy:()=>{vn(),f?.(),Ot({element:t,cursorX:o.x,selectedElements:g.length>1?g:void 0,shouldDeactivateAfter:c.wasActivatedByToggle}),_()},hooks:{transformHtmlContent:s.hooks.transformHtmlContent,onOpenFile:s.hooks.onOpenFile,transformOpenFileUrl:s.hooks.transformOpenFileUrl},performWithFeedback:Xr(t,g,i,a,u),hideContextMenu:_,cleanup:()=>{c.wasActivatedByToggle?K():l.unfreeze()}},y=s.hooks.transformActionContext(v);return{...v,...y}},$r=y(()=>{let e=c.contextMenuElement;if(!e)return;let t=Jr(),n=c.contextMenuPosition??u();return Qr({element:e,filePath:t?.filePath,lineNumber:t?.lineNumber??void 0,tagName:Kr(),componentName:qr(),position:n,shouldDeferHideContextMenu:!0,onBeforeCopy:()=>{j.clear()},customEnterPromptMode:()=>{pt.clearAll(),vn(),l.clearInputText(),l.enterPromptMode(n,e),Zr()}})}),ei=()=>{setTimeout(()=>{l.hideContextMenu(),K()},0)},ti=()=>{if(!we)return null;let e=we.getBoundingClientRect(),t=db(e);return t===`left`||t===`right`?{x:t===`left`?e.right:e.left,y:e.top+e.height/2,edge:t}:{x:e.left+e.width/2,y:t===`top`?e.bottom:e.top,edge:t}},ni=(e,t)=>{let n=null,r=()=>{let i=e();i&&t(i),n=ff(r)};return r(),()=>{n!==null&&(pf(n),n=null)}};v(()=>{if(!Ft())return;let e=ni(ti,xe);w(()=>{e(),xe(null)})});let ri=()=>{Ee?.(),Ee=null,ye(null)},ii=()=>{l.hideContextMenu(),ri()},ai=()=>{ve()===null?(l.hideContextMenu(),Ee?.(),Ee=ni(ti,ye)):ri()},oi=e=>{Ae({defaultAction:e}),B()&&yn(e)},si=e=>{let t=c.labelInstances.find(t=>t.id===e);if(!t?.element||!X(t.element))return;let n=t.element,r=oa(Y(n)),i={x:t.mouseX??r.x,y:r.y},a=t.elements&&t.elements.length>0?t.elements.filter(e=>X(e)):[n];setTimeout(()=>{ri(),m()||(l.setWasActivatedByToggle(!0),un()),l.setPointer(i),l.setFrozenElements(a),a.length>1&&t.bounds&&l.setFrozenDragRect(Mg(t.bounds)),l.freeze(),l.showContextMenu(i,n)},0)};v(()=>{let e=s.store.theme.hue;e===0?Sr.style.filter=``:Sr.style.filter=`hue-rotate(${e}deg)`}),s.store.theme.enabled&&Promise.resolve().then(()=>(Iw(),Pw)).then(({ReactGrabRenderer:e})=>{t||(i=et(()=>A(e,{get selectionVisible(){return jr()},get selectionBounds(){return Ut()},get selectionBoundsMultiple(){return $t()},get selectionShouldSnap(){return c.frozenElements.length>0||Qt().length>0},get selectionElementsCount(){return c.frozenElements.length},get frozenLabelEntryAccessors(){return tn()},get pendingShiftPreviewEntry(){return nn()??void 0},get selectionFilePath(){return c.selectionFilePath??void 0},get selectionTagName(){return Mr()},get selectionComponentName(){return H()},get selectionLabelVisible(){return Nr()},selectionLabelStatus:`idle`,get hierarchyState(){return cr()},get hierarchyMenuPosition(){return be()},get labelInstances(){return Ir()},get labelInstanceAccessors(){return zr()},get dragVisible(){return Vr()},get dragBounds(){return Xt()},get grabbedBoxes(){return Br()},get mouseX(){return Dt(()=>c.frozenElements.length>1)()?void 0:an()??rn().x},get isFrozen(){return g()||m()||he()},get inputValue(){return c.inputText},get isPromptMode(){return O()},onShowContextMenuInstance:si,onRetryInstance:St,onAcknowledgeErrorInstance:Ct,get onLabelInstanceHoverChange(){return pt.handleHoverChange},get onInputChange(){return l.setInputText},onInputSubmit:()=>void mn(),get selectionLabelShakeCount(){return de()},onConfirmDismiss:gn,onOpenSelectionFile:ir,get discardPrompt(){return Dt(()=>!!j.isPendingDismiss())()?{isKeyboardSelection:!0,onConfirm:gn,onCopy:Xn}:re()?{onConfirm:gn,onCancel:_n}:void 0},get toolbarVisible(){return s.store.theme.toolbar.enabled},get isActive(){return m()},onToggleActive:Sn,get activeActionId(){return ot()},get enabled(){return se()},get shakeCount(){return le()},onToolbarStateChange:e=>{me(e),e.enabled!==se()&&(ce(e.enabled),e.enabled||(fn(),ii())),wb(o,e)},onSubscribeToToolbarStateChanges:e=>(o.add(e),()=>{o.delete(e)}),onToolbarSelectHoverChange:ge,onToolbarRef:e=>{we=e},get contextMenuPosition(){return Gr()},get contextMenuBounds(){return Wr()},get contextMenuTagName(){return Kr()},get contextMenuComponentName(){return qr()},get contextMenuHasFilePath(){return!!Jr()?.filePath},get actions(){return s.store.actions},get actionContext(){return $r()},onContextMenuDismiss:ei,onContextMenuHide:Zr,get toolbarMenuPosition(){return ve()},get toolbarMenuActions(){return s.store.actions.filter(e=>e.showInToolbarMenu===!0)},get defaultActionId(){return pe()?.defaultAction??`copy`},get defaultActionLabel(){return Cn()},onSetDefaultAction:oi,onToggleToolbarMenu:ai,onToolbarMenuDismiss:ri}),Sr))}).catch(e=>{console.warn(`[react-grab] Failed to load renderer:`,e)});let ci={activate:()=>{l.setPendingCommentMode(!1),!m()&&se()&&pn()},deactivate:()=>{m()||T()?K():vt()},toggle:()=>{m()||T()?K():se()&&pn()},comment:Dn,isActive:()=>m(),isEnabled:()=>se(),setEnabled:e=>{e!==se()&&(ce(e),Ae({enabled:e,collapsed:!e}),e||(fn(),ii()))},getToolbarState:()=>pe()??E_(),setToolbarState:e=>{let t=pe()??E_(),n=e.collapsed??t?.collapsed??!1,r=e.defaultAction??t?.defaultAction??`copy`,i={edge:e.edge??t?.edge??`bottom`,ratio:e.ratio??t?.ratio??.5,collapsed:n,enabled:e.enabled??!n,defaultAction:Rg(r)};D_(i),me(i),i.enabled!==se()&&(ce(i.enabled),i.enabled||(fn(),ii())),wb(o,i)},onToolbarStateChange:e=>(o.add(e),()=>{o.delete(e)}),reset:()=>{fn(),ii(),l.clearGrabbedBoxes(),pt.clearAll(),l.setSelectionSource(null,null)},dispose:()=>{if(t)return;let n=[];t=!0,zw=!1,$(vt,n),$(pt.clearAll,n),i&&$(i,n),i=void 0,Ee&&$(Ee,n),Ee=null,o.clear(),$(e,n),$(()=>Lb(ci),n),Xm(n,`Disposing React Grab failed`)},copyElement:async e=>{let t=Array.isArray(e)?e:[e];return t.length===0?!1:(await wt(t,gt())).status===`succeeded`},getSource:async e=>{let t=await Vd(e);return t?{filePath:t.filePath,lineNumber:t.lineNumber,columnNumber:t.columnNumber??null,componentName:t.componentName}:null},getStackContext:e=>ef(e,{maxLines:s.store.options.maxContextLines}),getState:()=>({isActive:m(),isDragging:_(),isCopying:T(),isPromptMode:O(),isSelectionBoxVisible:!!jr(),isDragBoxVisible:!!Vr(),targetElement:G(),dragBounds:Xt()??null,grabbedBoxes:[...on()],labelInstances:[...sn()],selectionFilePath:c.selectionFilePath,toolbarState:pe()}),setOptions:e=>{s.setOptions(e)},registerPlugin:e=>{s.register(e,ci)},unregisterPlugin:e=>{s.unregister(e)},getPlugins:()=>s.getPluginNames(),getDisplayName:Hd};for(let e of Lw)s.register(e,ci);return queueMicrotask(()=>{if(t)return;let e=pe();if(!e)return;let n=Rg(e.defaultAction??`copy`);n!==e.defaultAction&&Ae({defaultAction:n})}),setTimeout(()=>{wu(!0)},Jn),ci})};return Ia(),typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(Ib((window.__REACT_GRAB__??(()=>{if(typeof window>`u`||window.parent===window)return null;try{return window.parent.__REACT_GRAB__??null}catch{return null}})())||Bw()),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:Fb()}))),e.DEFAULT_THEME=a_,e.FreezeError=Ta,e.OpenFileError=Ea,e.PluginSetupError=ka,e.ReactGrabError=Ca,e.commentPlugin=j_,e.formatElementInfo=nf,e.generateSnippet=Bb,e.getGlobalApi=Fb,e.getStack=Nd,e.init=Bw,e.isInstrumentationActive=Ci,e.openPlugin=M_,e.registerPlugin=Rb,e.setGlobalApi=Ib,e.unregisterPlugin=zb,e})({},react);
40
+ `)})),CC,wC,TC,EC,DC=n((()=>{G(),R(),tp(),Nx(),vC(),Gx(),pS(),Y_(),F_(),bC(),SC(),CC=z(`<div class="flex shrink-0 items-center justify-between gap-2 px-2 pt-2 pb-1.5"><span class="text-[11px] font-medium text-[var(--rg-text-secondary)]">Comments</span><div class="flex items-center gap-1">`),wC=z(`<div class="min-h-0 overflow-x-hidden overflow-y-auto border-t border-[var(--rg-border-subtle)] py-1 [scrollbar-width:thin]"><div role=list aria-label="Saved comments"class="relative flex flex-col">`),TC=z(`<div role=listitem class="group flex items-center gap-1 px-1"><button data-react-grab-ignore-events type=button class="flex min-w-0 flex-1 cursor-pointer items-center justify-between gap-2 border-none bg-transparent px-1 py-1.5 text-left hover:bg-[var(--rg-surface-hover)]"><span class="flex min-w-0 flex-1 flex-col"><span class="truncate text-[12px] font-medium text-[var(--rg-text-primary)]"> </span><span class="mt-0.5 truncate text-[11px] text-[var(--rg-text-secondary)]"> </span></span><span class="shrink-0 text-[10px] text-[var(--rg-text-secondary)]"></span></button><button data-react-grab-ignore-events type=button class="flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded-sm border-none bg-transparent text-[13px] opacity-0 transition-opacity hover:bg-[var(--rg-surface-hover)] group-hover:opacity-100 focus:opacity-100">×`),EC=e=>{let[t,n]=c(!1),r,i=()=>{e.items.length!==0&&ep(xC(e.items))&&(n(!0),clearTimeout(r),r=setTimeout(()=>n(!1),900))};return y(()=>clearTimeout(r)),j(_C,{get position(){return e.position},dataAttribute:`data-react-grab-comment-history`,get onDismiss(){return e.onDismiss},get children(){return j(Mx,{class:`overflow-hidden`,style:{width:`260px`,"max-width":`360px`,"max-height":`320px`},get children(){return[(()=>{var n=CC(),r=n.firstChild.nextSibling;return W(r,j(Wx,{"data-react-grab-comment-history-clear":!0,variant:`destructive`,"aria-label":`Clear comments`,onClick:()=>{q_(),e.onDismiss()},children:`Clear`}),null),W(r,j(Wx,{"data-react-grab-comment-history-copy-all":!0,"aria-label":`Copy all comments`,onClick:i,get children(){return j(M,{get when(){return t()},fallback:`Copy all`,get children(){return j(fS,{size:11})}})}}),null),n})(),(()=>{var t=wC(),n=t.firstChild;return W(n,j(Ce,{get each(){return e.items},children:e=>(()=>{var t=TC(),n=t.firstChild,r=n.firstChild,i=r.firstChild,a=i.firstChild,o=i.nextSibling.firstChild,s=r.nextSibling,c=n.nextSibling;return n.$$click=()=>ep(e.content),W(s,()=>yC(e.timestamp)),c.$$click=()=>K_(e.id),u(r=>{var i=e.id,s=e.id,l=e.elementsCount>1?`${e.elementsCount} elements`:e.componentName??e.tagName,u=e.commentText,d=e.id,f=`Remove ${e.commentText}`;return i!==r.e&&B(t,`data-react-grab-comment-history-item`,r.e=i),s!==r.t&&B(n,`data-react-grab-comment-history-copy`,r.t=s),l!==r.a&&(a.data=r.a=l),u!==r.o&&(o.data=r.o=u),d!==r.i&&B(c,`data-react-grab-comment-history-remove`,r.i=d),f!==r.n&&B(c,`aria-label`,r.n=f),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})()})),t})()]}})}})},Ye([`click`])})),OC,kC,AC=n((()=>{G(),F_(),OC=z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none><path d="M5 5.75A2.75 2.75 0 0 1 7.75 3h8.5A2.75 2.75 0 0 1 19 5.75v7.5A2.75 2.75 0 0 1 16.25 16H11l-4.35 3.48A1 1 0 0 1 5 18.7V16.3a2.75 2.75 0 0 1-2-2.65v-7.9A2.75 2.75 0 0 1 5 5.75Z"stroke=currentColor stroke-width=1.8 stroke-linejoin=round></path><path d="M8 8h8M8 11.5h5"stroke=currentColor stroke-width=1.8 stroke-linecap=round>`),kC=e=>{let t=()=>e.size??14;return(()=>{var n=OC();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&B(n,`width`,r.e=i),a!==r.t&&B(n,`height`,r.t=a),o!==r.a&&B(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),jC,MC=n((()=>{G(),R(),ff(),oo(),BS(),DC(),Y_(),AC(),F_(),jC=e=>{let t,n=null,[r,i]=c(W_()),[a,o]=c(!1),[s,l]=c(!1),[u,d]=c(null),[f,p]=c(),m=()=>{let e=t?.getRootNode();p(e instanceof ShadowRoot?e.querySelector(`[${ao}]`)??void 0:void 0)},h=()=>{if(!t||!a())return;let r=t.getBoundingClientRect(),i=e.edge,o={x:i===`left`?r.right:i===`right`?r.left:r.left+r.width/2,y:i===`top`?r.bottom:i===`bottom`?r.top:r.top+r.height/2,edge:i};d(e=>e?.x===o.x&&e.y===o.y&&e.edge===o.edge?e:o),n=lf(h)},g=()=>{n!==null&&(uf(n),n=null)},_=()=>{g(),d(null),o(!1)},b=e.createDragAwareHandler(()=>{if(a()){_();return}o(!0),h()});return v(()=>{m();let e=J_(e=>{i([...e]),e.length===0&&_()});y(()=>{e(),g()})}),j(M,{get when(){return r().length>0},get children(){return[j(zS,{actionId:`comment-history`,ref:e=>{t=e,queueMicrotask(m)},get label(){return`Open comments (${r().length})`},get class(){return e.buttonClass},get wrapperClass(){return e.wrapperClass},onClick:b,onMouseEnter:t=>{l(!0),e.onMouseEnter(t)},onMouseLeave:()=>{l(!1),e.onMouseLeave()},get icon(){return j(kC,{size:14,get class(){return e.iconClass}})},tooltip:`Comments`,get tooltipVisible(){return bt(()=>!!s())()&&!a()},get tooltipPosition(){return e.tooltipPosition}}),j(M,{get when(){return f()},children:e=>j(pt,{get mount(){return e()},get children(){return j(EC,{get position(){return u()},get items(){return r()},onDismiss:_})}})})]}})}})),NC,PC,FC=n((()=>{G(),R(),ax(),MS(),BS(),J(),eC(),Eg(),io(),ff(),JS(),nC(),aC(),MC(),NC=z(`<div data-react-grab-ignore-events data-react-grab-toolbar>`),PC=e=>{let t,n,r=null,i=C_(),[a,o]=c(!1),[s,l]=c(!1),[f,p]=c(!1),[m,h]=c(i?.edge??`bottom`),[g,b]=c(i?.ratio??.5),[x,S]=c({x:0,y:0}),[C,w]=c(!1),[T,ee]=c(!1),[E,te]=c(!1),[D,O]=c(!1),[k,ne]=c(0),[re,ie]=c(null),ae=()=>{r?.(),r=null,e.isActive||yy()},A=tC({getContainerRef:()=>t,isCollapsed:s,getExpandedDimensions:()=>he,onDragStart:()=>{ie(null),r&&ae()},onPositionUpdate:e=>S(e),onSnapEdgeChange:(e,t)=>{ve(m(),e),h(e),b(t)},onSnapComplete:e=>{he=e.expandedDimensions,S(e.position),I({edge:e.edge,ratio:e.ratio,collapsed:s(),enabled:!s()})}}),oe=()=>!VS(m()),se=()=>oe()?`mb-1.5`:`mr-1.5`,ce=()=>e.defaultActionId??`copy`,le=()=>e.defaultActionLabel??`Copy`,ue=()=>!!e.isActive&&(e.activeActionId??`copy`)===ce(),de=t=>re()===t&&!e.isActive&&!s()&&!A.isDragging()&&!A.isSnapping()&&!e.isContextMenuOpen,fe=()=>{switch(m()){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`;default:return`top`}},pe=e=>{e.stopImmediatePropagation()},me=t=>({onMouseEnter:e=>{A.isDragging()||(ie(t()),r||(r=ob(),vy(e.clientX,e.clientY)))},onMouseLeave:()=>{let n=t();ie(e=>e===n?null:e),!e.isActive&&!e.isContextMenuOpen&&ae()}});d(_(()=>e.shakeCount,t=>{t&&!e.enabled&&w(!0)})),d(_(()=>[e.isActive,e.isContextMenuOpen],([e,t])=>{!e&&!t&&r&&ae()})),d(_(()=>ue(),e=>{if(!e){ne(e=>iC(e,0));return}let t=null,r=0,i=0,a=()=>{if(t=null,!n)return;let e=n.getBoundingClientRect(),a=e.left+e.width/2,o=e.top+e.height/2,s=r-a,c=i-o;if(Math.hypot(s,c)<4)return;let l=Math.atan2(c,s)*180/Math.PI- -45;ne(e=>iC(e,l))},o=ro(e=>{r=e.clientX,i=e.clientY,t===null&&(t=lf(a))});window.addEventListener(`pointermove`,o,{passive:!0}),y(()=>{window.removeEventListener(`pointermove`,o),t!==null&&uf(t)})}));let he={width:38,height:28},[ge,_e]=c(HS(m())),ve=(e,t)=>{VS(e)!==VS(t)&&_e(HS(t))},ye=(e,n)=>{let r=t?.getBoundingClientRect(),i=HS(n);return GS(e,n,he,r?.width??i.width,r?.height??i.height)},be=()=>{S(US(m(),g(),he.width,he.height))},Se=A.createDragAwareHandler(()=>e.onToggle?.()),Ce=`group contain-layout flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox`,M=()=>$(`relative contain-layout flex items-center justify-center`,se()),N=e=>e?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)]`,we=A.createDragAwareHandler(()=>{if(s()){Ae();return}let e=t?.getBoundingClientRect(),n=g();e&&(he={width:e.width,height:e.height}),ee(!0),l(!0),I({edge:m(),ratio:n,collapsed:!0,enabled:!1}),ke()}),P=()=>KS(m(),x(),he,ge()),Te,Ee,De=null,Oe=()=>{let e=t?.getBoundingClientRect();!e||e.width===0||e.height===0||(s()?_e({width:e.width,height:e.height}):(he={width:e.width,height:e.height},De={width:e.width,height:e.height}))},ke=()=>{Ee&&clearTimeout(Ee),Ee=setTimeout(()=>{ee(!1),Oe()},260)},Ae=()=>{let{position:e,ratio:t}=ye(Pe(),m());S(e),b(t),ee(!0),l(!1),I({edge:m(),ratio:t,collapsed:!1,enabled:!0}),ke()},je=(e,t)=>{if(!(e===0||t===0)&&!(A.isDragging()||A.isSnapping())&&!T()){if(s()){let n=ge();if(n.width===e&&n.height===t)return;_e({width:e,height:t});return}De&&De.width===e&&De.height===t||(De={width:e,height:t},he={width:e,height:t},S(US(m(),g(),e,t)))}},Me=null,Ne=()=>{A.isDragging()||A.isSnapping()||Me===null&&(Me=lf(()=>{Me=null,be()}))},F=()=>{A.isDragging()||(p(!0),be(),Te&&clearTimeout(Te),Te=setTimeout(()=>{p(!1);let e=WS(m(),x().x,x().y,he.width,he.height);b(e),I({edge:m(),ratio:e,collapsed:s(),enabled:!s()})},500))},I=t=>{let n={...t,defaultAction:ce()};w_(n),e.onStateChange?.(n)};v(()=>{t&&e.onContainerRef?.(t);let n=t?.getBoundingClientRect(),r=Tg(),a=!!(n&&n.width>0&&n.height>0);i?(a&&n&&(he={width:n.width,height:n.height}),l(i.collapsed),S(US(i.edge,i.ratio,he.width,he.height))):a&&n?(he={width:n.width,height:n.height},S({x:r.offsetLeft+(r.width-n.width)/2,y:r.offsetTop+r.height-n.height-16}),b(Nn)):(S(US(`bottom`,Nn,he.width,he.height)),b(Nn)),e.onSubscribeToStateChanges&&y(e.onSubscribeToStateChanges(e=>{if(T()||!t?.getBoundingClientRect())return;let n=s()!==e.collapsed;if(ve(m(),e.edge),h(e.edge),n&&!e.collapsed){let t=Pe();ee(!0),l(e.collapsed);let{position:n,ratio:r}=ye(t,e.edge);S(n),b(r),ke()}else n&&(ee(!0),ke()),l(e.collapsed),S(US(e.edge,e.ratio,he.width,he.height)),b(e.ratio)})),window.addEventListener(`resize`,F),window.visualViewport?.addEventListener(`resize`,F),window.visualViewport?.addEventListener(`scroll`,F);let c=to();if(c&&(window.addEventListener(`scroll`,Ne,{passive:!0,capture:!0}),typeof ResizeObserver<`u`)){let e=new ResizeObserver(Ne);e.observe(c),y(()=>e.disconnect())}if(typeof ResizeObserver<`u`&&t){let e=new ResizeObserver(e=>{let n=e[0];if(!n)return;let r=n.borderBoxSize?.[0],i,a;if(r)i=r.inlineSize,a=r.blockSize;else{let e=t?.getBoundingClientRect();if(!e)return;i=e.width,a=e.height}je(i,a)});e.observe(t),y(()=>e.disconnect())}let u=setTimeout(()=>{o(!0)},500);y(()=>{clearTimeout(u)})}),y(()=>{window.removeEventListener(`resize`,F),window.visualViewport?.removeEventListener(`resize`,F),window.visualViewport?.removeEventListener(`scroll`,F),window.removeEventListener(`scroll`,Ne,{capture:!0}),Me!==null&&uf(Me),clearTimeout(Te),clearTimeout(Ee),r&&ae()});let Pe=()=>s()?P():x(),Fe=()=>s()?`cursor-pointer`:A.isDragging()?`cursor-grabbing`:`cursor-grab`,L=()=>D()||!!e.isContextMenuOpen||A.isDragging()||A.isSnapping()||T()||E(),Ie=()=>!!e.isActive&&!L(),Le=()=>f()||A.isDragging()?``:A.isSnapping()?`transition-[transform,opacity] duration-300 ease-out`:T()?`transition-[transform,opacity] ${s()?`duration-140`:`duration-220`} ease-drawer`:`transition-[transform,opacity] duration-400 ease-drawer`,Re=()=>{switch(m()){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 r=NC();r.addEventListener(`mouseleave`,()=>{O(!1),e.onSelectHoverChange?.(!1)}),r.addEventListener(`mouseenter`,()=>{O(!0),s()||e.onSelectHoverChange?.(!0)}),H(r,`mousedown`,pe),H(r,`pointerdown`,e=>{pe(e),A.handlePointerDown(e)});var i=t;return typeof i==`function`?tt(i,r):t=r,W(r,j($S,{get isCollapsed(){return s()},get snapEdge(){return m()},get isShaking(){return C()},get isChevronPressed(){return E()},get transformOrigin(){return Re()},onAnimationEnd:()=>w(!1),onCollapseClick:we,onCollapsePointerDown:()=>te(!0),onCollapsePointerUp:()=>te(!1),onCollapsePointerLeave:()=>te(!1),onPanelClick:e=>{s()&&(e.stopPropagation(),Ae())},get actionButtons(){return[j(zS,xe({get actionId(){return ce()},isToggle:!0,ref:e=>n=e,get label(){return bt(()=>!!ue())()?`Stop selecting element`:`${le()} element`},get isActive(){return ue()},class:Ce,get wrapperClass(){return M()},onClick:Se,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),ie(null),e.onToggleToolbarMenu?.()}},()=>me(ce),{get icon(){return j(jS,{size:14,get rotationDeg(){return k()},get class(){return N(ue())}})},get tooltipVisible(){return de(ce())},get tooltipPosition(){return fe()},get tooltip(){return le()}})),j(jC,xe({get edge(){return m()},buttonClass:Ce,get wrapperClass(){return M()},get iconClass(){return N(!1)},get tooltipPosition(){return fe()},get createDragAwareHandler(){return A.createDragAwareHandler}},()=>me(()=>`comment-history`)))]}})),u(e=>{var t=$(`fixed left-0 top-0 font-sans text-[13px] antialiased select-none`,Fe(),Le(),a()?`pointer-events-auto`:`pointer-events-none`),n=String(un),i=`translate(${Pe().x}px, ${Pe().y}px) scale(${Ie()?.97:1})`,o=Re(),s=a()?Ie()?.55:1:0;return t!==e.e&&V(r,e.e=t),n!==e.t&&U(r,`z-index`,e.t=n),i!==e.a&&U(r,`transform`,e.a=i),o!==e.o&&U(r,`transform-origin`,e.o=o),s!==e.i&&U(r,`opacity`,e.i=s),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),r})()}})),IC,LC,RC=n((()=>{R(),IC=w(),LC=()=>{let e=T(IC);if(!e)throw Error(`Menu subcomponents must be rendered inside <Menu.Provider>`);return e}})),zC,BC=n((()=>{G(),RC(),zC=e=>j(IC.Provider,{get value(){return e.store},get children(){return e.children}})})),VC,HC=n((()=>{G(),ax(),Nx(),VC=e=>j(Mx,{get class(){return $(`flex flex-col w-fit h-fit`,e.class)},get style(){return e.style},get children(){return e.children}})})),UC,WC,GC=n((()=>{G(),ax(),RC(),UC=z(`<div role=menu aria-orientation=vertical><div aria-hidden=true class="pointer-events-none absolute opacity-0 transition-[top,left,width,height,opacity,border-radius] duration-75 ease-out bg-[var(--rg-surface-hover)]">`),WC=e=>{let t=LC();return(()=>{var n=UC(),r=n.firstChild;n.$$pointermove=()=>t.notePointerMove(),tt(n=>{t.setHighlightContainer(n),e.ref?.(n)},n);var i=t.setHighlightRail;return typeof i==`function`?tt(i,r):t.setHighlightRail=r,W(n,()=>e.children,null),u(r=>{var i=e.label,a=t.keyboardNavigation?t.activeDescendantId():void 0,o=t.keyboardNavigation?-1:void 0,s=$(`relative flex flex-col`,e.class);return i!==r.e&&B(n,`aria-label`,r.e=i),a!==r.t&&B(n,`aria-activedescendant`,r.t=a),o!==r.a&&B(n,`tabindex`,r.a=o),s!==r.o&&V(n,r.o=s),r},{e:void 0,t:void 0,a:void 0,o:void 0}),n})()},Ye([`pointermove`])})),KC,qC,JC=n((()=>{G(),R(),ax(),RC(),KC=z(`<button data-react-grab-ignore-events type=button>`),qC=e=>{let t=LC(),n=t.createItemId(),r=e.value,i=()=>e.role??`menuitem`,a=()=>!e.disabled,o=()=>t.activeValue()===r,s;return v(()=>{s&&(t.registerItem({value:r,domId:n,element:s,isEnabled:a,onSelect:()=>e.onSelect?.()}),y(()=>t.unregisterItem(r)))}),(()=>{var c=KC();c.$$click=t=>{t.stopPropagation(),a()&&e.onSelect?.()},c.addEventListener(`pointerleave`,()=>{t.clearActiveOnPointerLeave&&t.setActiveItem(null)}),c.addEventListener(`pointerenter`,()=>{a()&&t.canActivateOnHover()&&t.setActiveItem(r)}),c.$$pointerdown=e=>e.stopPropagation();var l=s;return typeof l==`function`?tt(l,c):s=c,B(c,`id`,n),W(c,()=>e.children),u(n=>{var a=e.dataId??r,s=i(),l=i()===`menuitemradio`?!!e.checked:void 0,u=!!e.disabled,d=t.keyboardNavigation?o()?0:-1:void 0,f=e.disabled,p=$(`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`,e.class);return a!==n.e&&B(c,`data-react-grab-menu-item`,n.e=a),s!==n.t&&B(c,`role`,n.t=s),l!==n.a&&B(c,`aria-checked`,n.a=l),u!==n.o&&B(c,`aria-disabled`,n.o=u),d!==n.i&&B(c,`tabindex`,n.i=d),f!==n.n&&(c.disabled=n.n=f),p!==n.s&&V(c,n.s=p),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),c})()},Ye([`pointerdown`,`click`])})),YC,XC,ZC=n((()=>{G(),ax(),YC=z(`<span> `),XC=e=>(()=>{var t=YC(),n=t.firstChild;return u(r=>{var i=$(`text-[13px] leading-4 font-sans font-medium`,e.class),a=e.textContent;return i!==r.e&&V(t,r.e=i),a!==r.t&&(n.data=r.t=a),r},{e:void 0,t:void 0}),t})()})),QC,$C,ew=n((()=>{G(),QC=z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M6.5 5C5.67157 5 5 5.67157 5 6.5C5 7.32843 5.67157 8 6.5 8H8V6.5C8 5.67157 7.32843 5 6.5 5ZM10 8V6.5C10 4.567 8.433 3 6.5 3C4.567 3 3 4.567 3 6.5C3 8.433 4.567 10 6.5 10H8V14H6.5C4.567 14 3 15.567 3 17.5C3 19.433 4.567 21 6.5 21C8.433 21 10 19.433 10 17.5V16H14V17.5C14 19.433 15.567 21 17.5 21C19.433 21 21 19.433 21 17.5C21 15.567 19.433 14 17.5 14H16V10H17.5C19.433 10 21 8.433 21 6.5C21 4.567 19.433 3 17.5 3C15.567 3 14 4.567 14 6.5V8H10ZM10 10V14H14V10H10ZM16 8H17.5C18.3284 8 19 7.32843 19 6.5C19 5.67157 18.3284 5 17.5 5C16.6716 5 16 5.67157 16 6.5V8ZM16 16V17.5C16 18.3284 16.6716 19 17.5 19C18.3284 19 19 18.3284 19 17.5C19 16.6716 18.3284 16 17.5 16H16ZM8 16H6.5C5.67157 16 5 16.6716 5 17.5C5 18.3284 5.67157 19 6.5 19C7.32843 19 8 18.3284 8 17.5V16Z">`),$C=e=>{let t=()=>e.size??11;return(()=>{var n=QC();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&B(n,`width`,r.e=i),a!==r.t&&B(n,`height`,r.t=a),o!==r.a&&B(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),tw,nw,rw,iw=n((()=>{G(),R(),Vg(),ew(),Vx(),tw=z(`<span> `),nw=z(`<span style=display:inline-flex;align-items:center;gap:2px>`),rw=e=>{let t=()=>e.shortcut===`Enter`,n=()=>e.modifier!==!1,r=Bg();return(()=>{var i=nw();return W(i,j(M,{get when(){return t()},get children(){return j(Bx,{size:8})}}),null),W(i,j(M,{get when(){return!t()},get children(){return j(M,{get when(){return n()},get fallback(){return(()=>{var t=tw(),n=t.firstChild;return u(()=>n.data=e.shortcut),t})()},get children(){return j(M,{when:r,get fallback(){return(()=>{var t=tw(),n=t.firstChild;return u(()=>n.data=`Ctrl+${e.shortcut}`),t})()},get children(){return[j($C,{size:9}),(()=>{var t=tw(),n=t.firstChild;return u(()=>n.data=e.shortcut),t})()]}})}})}}),null),u(()=>V(i,e.class)),i})()}})),aw,ow=n((()=>{G(),ax(),iw(),aw=e=>j(rw,{get shortcut(){return e.shortcut},get modifier(){return e.modifier},get class(){return $(`text-[11px] font-sans text-[var(--rg-text-secondary)] ml-4`,e.class)}})})),sw,cw,lw,uw,dw,fw,pw=n((()=>{R(),sw=`0`,cw=`1`,lw=({hiddenOpacity:e=sw,visibleOpacity:t=cw}={})=>{let n,r,i,a=e=>{r&&(r.style.opacity=t,r.style.top=`${e.offsetTop}px`,r.style.left=`${e.offsetLeft}px`,r.style.width=`${e.offsetWidth}px`,r.style.height=`${e.offsetHeight}px`)},o=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{i&&a(i)});y(()=>o?.disconnect());let s=()=>{i=void 0,o?.disconnect(),r&&(r.style.opacity=e)};return{containerRef:e=>{n=e},followerRef:e=>{r=e},followElement:e=>{if(!(!r||!n)){if(!e){s();return}i=e,a(e),o?.disconnect(),o?.observe(e),o?.observe(n)}},hideFollower:s}},uw=(e,t)=>e!==t&&e instanceof HTMLElement,dw=(e,t)=>{let n=[];for(let r of Array.from(e.children))uw(r,t)&&n.push(r);return n},fw=(e={})=>{let{topCornerRadiusPx:t,bottomCornerRadiusPx:n,cornerShape:r}=e,i=t!==void 0||n!==void 0,a,o=!1,s=e=>{if(!a||!i)return;let s=e.parentElement;if(!s)return;let c=dw(s,a),l=c[0]===e,u=c[c.length-1]===e,d=l&&t!==void 0?`${t}px`:`0px`,f=u&&n!==void 0?`${n}px`:`0px`;a.style.borderTopLeftRadius=d,a.style.borderTopRightRadius=d,a.style.borderBottomLeftRadius=f,a.style.borderBottomRightRadius=f,r&&!o&&(a.style.setProperty(`corner-shape`,r),o=!0)},{containerRef:c,followerRef:l,followElement:u,hideFollower:d}=lw();return{containerRef:c,highlightRef:e=>{a=e,o=!1,l(e)},updateHighlight:e=>{u(e),e&&s(e)},clearHighlight:d}}})),mw,hw=n((()=>{R(),pw(),mw=(e={})=>{let t=new Map,n=[],r=`react-grab-menu-${Math.random().toString(36).slice(2,8)}`,i=0,a=!1,o=e.value!==void 0,[s,l]=c(null),[u,p]=c(0),m=f(()=>o?e.value?.()??null:s()),h=t=>{if(o){e.onValueChange?.(t);return}l(t)},g=fw(e.highlight??{});d(_([m,u],([e])=>{if(e===null){g.clearHighlight();return}let n=t.get(e);n?g.updateHighlight(n.element):g.clearHighlight()}));let v=()=>n.filter(e=>t.get(e)?.isEnabled()),y=()=>{let e=v();e.length>0&&h(e[0])},b=()=>{let e=v();e.length>0&&h(e[e.length-1])},x=()=>{let e=v();if(e.length===0)return;let t=e.indexOf(m()??``);h(e[t===-1?0:(t+1)%e.length])},S=()=>{let e=v();if(e.length===0)return;let t=e.indexOf(m()??``);h(e[t===-1?e.length-1:(t-1+e.length)%e.length])},C=f(()=>{u();let e=m();if(e!==null)return t.get(e)?.domId});return{keyboardNavigation:e.keyboardNavigation??!1,clearActiveOnPointerLeave:e.clearActiveOnPointerLeave??!1,activeValue:m,activeDescendantId:C,setActiveItem:h,createItemId:()=>`${r}-item-${i++}`,canActivateOnHover:()=>!(e.requirePointerMove??!1)||a,notePointerMove:()=>{a=!0},resetPointerMove:()=>{a=!1},registerItem:e=>{t.set(e.value,e),n.includes(e.value)||n.push(e.value),p(e=>e+1)},unregisterItem:e=>{t.delete(e);let r=n.indexOf(e);r!==-1&&n.splice(r,1),o||l(t=>t===e?null:t),p(e=>e+1)},getActiveItem:()=>{let e=m();return e===null?void 0:t.get(e)},selectFirst:y,selectLast:b,selectNext:x,selectPrevious:S,setHighlightContainer:g.containerRef,setHighlightRail:g.highlightRef}}})),gw,_w=n((()=>{BC(),HC(),GC(),JC(),ZC(),ow(),hw(),gw={Provider:zC,Panel:VC,List:WC,Item:qC,Label:XC,Shortcut:aw}})),vw,yw,bw,xw=n((()=>{G(),R(),J(),gx(),wx(),Dx(),_w(),sx(),_b(),ff(),sC(),hC(),io(),vw=z(`<div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">`),yw=z(`<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none"style=pointer-events:auto>`),bw=e=>{let t,n,r=null,i=mw({keyboardNavigation:!0,highlight:{bottomCornerRadiusPx:14,cornerShape:In}}),[a,o]=c(0),[s,l]=c(0),p=f(()=>e.position!==null),m=f(()=>ox({tagName:e.tagName,componentName:e.componentName})),h=()=>{if(t){let e=t.getBoundingClientRect();o(e.width),l(e.height)}};d(()=>{p()&&lf(h)});let g=f(()=>{let t=e.selectionBounds,n=e.position,r=a(),i=s();if(r===0||i===0||!t||!n)return{left:zn.left,top:zn.top,arrowLeft:0,arrowPosition:`bottom`};let o=n.x??t.x+t.width/2,c=Math.max(4,Math.min(o-r/2,window.innerWidth-r-4)),l=Math.max(8,Math.min(o-c,r-8)),u=t.y+t.height+8+4,d=t.y-i-8-4,f=u+i>window.innerHeight,p=d>=0,m=f&&p,h=m?d:u,g=m?`top`:`bottom`;if(f&&!p){let e=n.y??t.y+t.height/2;h=Math.max(4,Math.min(e+4,window.innerHeight-i-4)),g=`top`}return{left:c,top:h,arrowLeft:l,arrowPosition:g}}),b=f(()=>{let t=e.actions??[],n=e.actionContext;return t.map(e=>({id:e.id,label:e.label,action:()=>{n&&vb(e,n)},enabled:gb(e,n),shortcut:e.shortcut,shortcutModifier:e.shortcutModifier}))});d(_(p,e=>{if(e){let e=t?.getRootNode(),i=e instanceof ShadowRoot?e.activeElement:null,a=document.activeElement;r=a instanceof HTMLElement&&i===null&&!(t instanceof Element&&t.contains(a))?a:null,n?.focus({preventScroll:!0});return}i.setActiveItem(null);let a=r;r=null,!(!(a instanceof HTMLElement)||!document.contains(a))&&lf(()=>{let e=document.activeElement;(e===null||e===document.body)&&a.focus({preventScroll:!0})})})),v(()=>{h();let t=t=>{if(!p())return;let n=t.key===`ArrowDown`,r=t.key===`ArrowUp`,a=t.key===`Home`,o=t.key===`End`,s=t.key===`Tab`;if(n||r||a||o||s){t.preventDefault(),t.stopPropagation();let e=n||s&&!t.shiftKey;a?i.selectFirst():o?i.selectLast():e?i.selectNext():i.selectPrevious();return}let c=e.actions??[],l=e.actionContext,u=n=>{l&&vb(n,l)&&(t.preventDefault(),t.stopPropagation(),e.onHide())};if(t.key===`Enter`){let e=i.getActiveItem();if(e){t.preventDefault(),t.stopPropagation(),e.isEnabled()&&e.onSelect();return}}let d=db(c,t,{includeModifierShortcuts:!0});d&&u(d)},n=mC({isOpen:p,onDismiss:e.onDismiss,shouldIgnoreRightClick:!0}),r=ro(t);window.addEventListener(`keydown`,r,{capture:!0}),y(()=>{n(),window.removeEventListener(`keydown`,r,{capture:!0})})});let x=f(()=>{let{tagName:e,componentName:t}=m();return`Actions for ${t?`${t}.${e}`:e}`});return j(M,{get when(){return p()},get children(){var r=yw();H(r,`contextmenu`,oC,!0),H(r,`click`,oC,!0),H(r,`mousedown`,oC,!0),H(r,`pointerdown`,oC,!0);var a=t;return typeof a==`function`?tt(a,r):t=r,U(r,`z-index`,`${un}`),W(r,j(hx,{get position(){return g().arrowPosition},leftPercent:0,get leftOffsetPx(){return g().arrowLeft}}),null),W(r,j(gw.Panel,{class:`justify-center items-start min-w-[100px]`,get children(){return[(()=>{var t=vw();return W(t,j(Cx,{get tagName(){return m().tagName},get componentName(){return m().componentName},get isClickable(){return e.hasFilePath},onClick:t=>{if(t.stopPropagation(),e.hasFilePath&&e.actionContext){let t=e.actions?.find(e=>e.id===`open`);t&&vb(t,e.actionContext)}},shrink:!0})),t})(),j(Ex,{get children(){return j(gw.Provider,{store:i,get children(){return j(gw.List,{ref:e=>n=e,get label(){return x()},class:`w-[calc(100%+16px)] -mx-2 -my-1.5 outline-none`,get children(){return j(Ce,{get each(){return b()},children:t=>j(gw.Item,{get value(){return t.id},get dataId(){return t.label.toLowerCase()},get disabled(){return!t.enabled},onSelect:()=>{t.action(),e.onHide()},get children(){return[j(gw.Label,{class:`text-[var(--rg-text-primary)]`,get textContent(){return t.label}}),j(M,{get when(){return t.shortcut},children:e=>j(gw.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})})}})}})}})]}}),null),u(e=>{var t=`${g().top}px`,n=`${g().left}px`;return t!==e.e&&U(r,`top`,e.e=t),n!==e.t&&U(r,`left`,e.t=n),e},{e:void 0,t:void 0}),r}})},Ye([`pointerdown`,`mousedown`,`click`,`contextmenu`])})),Sw,Cw=n((()=>{G(),R(),J(),_w(),vC(),Sw=e=>{let t=mw({clearActiveOnPointerLeave:!0,highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:In}});return j(_C,{get position(){return e.position},dataAttribute:`data-react-grab-toolbar-menu`,get onDismiss(){return e.onDismiss},get children(){return j(gw.Panel,{class:`overflow-hidden`,style:{"min-width":`100px`},get children(){return j(gw.Provider,{store:t,get children(){return j(gw.List,{label:`Default action`,get children(){return j(Ce,{get each(){return e.actions},children:t=>{let n=()=>t.id===e.defaultActionId;return j(gw.Item,{get value(){return t.id},role:`menuitemradio`,get checked(){return n()},onSelect:()=>{e.onSetDefaultAction(t.id),e.onDismiss()},get children(){return[j(gw.Label,{get class(){return n()?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)]`},get textContent(){return t.label}}),j(M,{get when(){return t.shortcut},children:e=>j(gw.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})}})}})}})}})}})}})),ww,Tw,Ew,Dw,Ow,kw=n((()=>{G(),R(),J(),_w(),vC(),ww=z(`<span aria-hidden=true class="shrink-0 font-mono text-[11px] leading-4 text-[var(--rg-text-secondary)] opacity-60 mr-1"> `),Tw=z(`<span> `),Ew=z(`<span class=text-[var(--rg-text-secondary)]>.`),Dw=z(`<span class="flex items-center min-w-0 w-full"><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0 transition-colors"><span> `),Ow=e=>{let t=()=>e.state?.activeIndex??0,n=mw({value:()=>String(t()),highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:In}});return j(_C,{get position(){return e.position},dataAttribute:`data-react-grab-hierarchy-menu`,interactive:!1,get children(){return j(gw.Panel,{class:`overflow-hidden`,style:{"min-width":`160px`},get children(){return j(gw.Provider,{store:n,get children(){return j(gw.List,{label:`Navigate element hierarchy`,get children(){return j(Ce,{get each(){return e.state?.items??[]},children:(e,n)=>j(gw.Item,{get value(){return String(n())},role:`menuitemradio`,get checked(){return n()===t()},get children(){var r=Dw(),i=r.firstChild,a=i.firstChild,o=a.firstChild;return W(r,j(M,{get when(){return e.depth>0},get children(){var t=ww(),n=t.firstChild;return u(r=>{var i=`${(e.depth-1)*12}px`,a=e.isLast?`└─`:`├─`;return i!==r.e&&U(t,`padding-left`,r.e=i),a!==r.t&&(n.data=r.t=a),r},{e:void 0,t:void 0}),t}}),i),W(i,j(M,{get when(){return e.componentName},get children(){return[(()=>{var t=Tw(),n=t.firstChild;return u(()=>n.data=e.componentName),t})(),Ew()]}}),a),u(r=>{var a=n()===t(),s=n()!==t(),c=e.tagName;return a!==r.e&&i.classList.toggle(`text-[var(--rg-text-primary)]`,r.e=a),s!==r.t&&i.classList.toggle(`text-[var(--rg-text-secondary)]`,r.t=s),c!==r.a&&(o.data=r.a=c),r},{e:void 0,t:void 0,a:void 0}),r}})})}})}})}})}})}})),Aw=r({ReactGrabRenderer:()=>jw}),jw,Mw=n((()=>{G(),R(),J(),ra(),Kb(),Yb(),kS(),FC(),xw(),Cw(),kw(),jw=e=>[j(Gb,{get selectionVisible(){return e.selectionVisible},get selectionBounds(){return e.selectionBounds},get selectionBoundsMultiple(){return e.selectionBoundsMultiple},get selectionShouldSnap(){return e.selectionShouldSnap},get dragVisible(){return e.dragVisible},get dragBounds(){return e.dragBounds},get grabbedBoxes(){return e.grabbedBoxes},get labelInstances(){return e.labelInstances}}),j(Jb,{get visible(){return e.isFrozen??!1}}),j(M,{get when(){return bt(()=>!!e.selectionLabelVisible)()&&(e.frozenLabelEntryAccessors?.length??0)>0},get children(){return j(Ce,{get each(){return e.frozenLabelEntryAccessors??[]},children:e=>j(M,{get when(){return e.read()},children:e=>j(OS,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})})})}}),j(M,{get when(){return bt(()=>!!e.selectionLabelVisible)()&&e.pendingShiftPreviewEntry},children:e=>j(OS,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})}),j(M,{get when(){return bt(()=>!!(e.selectionLabelVisible&&e.selectionBounds))()&&(e.frozenLabelEntryAccessors?.length??0)===0},get children(){return j(OS,{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 status(){return e.selectionLabelStatus},get filePath(){return e.selectionFilePath},get onInputChange(){return e.onInputChange},get onSubmit(){return e.onInputSubmit},get selectionLabelShakeCount(){return e.selectionLabelShakeCount},get onConfirmDismiss(){return e.onConfirmDismiss},get discardPrompt(){return e.discardPrompt},get onOpen(){return e.onOpenSelectionFile}})}}),j(Ce,{get each(){return e.labelInstanceAccessors??[]},children:t=>j(M,{get when(){return t.read()},children:t=>j(OS,{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:!0,get status(){return t().status},get statusText(){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`)||!X(n.element)))return()=>e.onShowContextMenuInstance?.(n.id)},onRetry:()=>e.onRetryInstance?.(t().id),onAcknowledgeError:()=>e.onAcknowledgeErrorInstance?.(t().id),onHoverChange:n=>e.onLabelInstanceHoverChange?.(t().id,n)})})}),j(M,{get when(){return e.toolbarVisible!==!1},get children(){return j(PC,{get isActive(){return e.isActive},get isContextMenuOpen(){return e.contextMenuPosition!==null},get onToggle(){return e.onToggleActive},get activeActionId(){return e.activeActionId},get defaultActionId(){return e.defaultActionId},get defaultActionLabel(){return e.defaultActionLabel},get enabled(){return e.enabled},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 onToggleToolbarMenu(){return e.onToggleToolbarMenu}})}}),j(bw,{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??!1},get actions(){return e.actions},get actionContext(){return e.actionContext},get onDismiss(){return e.onContextMenuDismiss??(()=>{})},get onHide(){return e.onContextMenuHide??(()=>{})}}),j(Sw,{get position(){return e.toolbarMenuPosition??null},get actions(){return e.toolbarMenuActions??[]},get defaultActionId(){return e.defaultActionId??`copy`},get onSetDefaultAction(){return e.onSetDefaultAction??(()=>{})},get onDismiss(){return e.onToolbarMenuDismiss??(()=>{})}}),j(Ow,{get position(){return e.hierarchyMenuPosition??null},get state(){return e.hierarchyState}})]}));G(),R(),Ma(),Ba(),io(),ff(),og(),zp(),Dp(),ra(),ta(),Km(),Pa(),J(),Ka(),Ua(),Yg(),oo(),Vg(),T_(),Gv(),by(),sb(),s_(),Qg(),fb(),yb(),Kn(),Jm(),Gi(),tp();let Nw=[D_,O_,k_,X_],Pw={status:`cancelled`},Fw=!1,Iw=e=>{if(typeof window>`u`)return Zf();let t={enabled:!0,activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,...y_(),...e};if(t.enabled===!1||Fw)return Zf();Fw=!0,eo(t.container??null),g_(t.telemetry!==!1);let{enabled:n,telemetry:r,container:i,...a}=t;return s(e=>{let t=!1,n=new AbortController,r=null,i,o=new Set,s=a_(a),{store:l,actions:u,pointer:p,viewportVersion:h,current:v}=va({keyHoldDuration:s.store.options.keyHoldDuration??100}),b=f(()=>v().state===`holding`),x=f(()=>v().state===`active`),S=f(()=>{let e=v();return e.state===`active`&&e.phase===`frozen`}),C=f(()=>{let e=v();return e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)}),w=f(()=>{if(!C())return!1;let e=Math.abs(p().x+window.scrollX-l.dragStart.x),t=Math.abs(p().y+window.scrollY-l.dragStart.y);return e>2||t>2}),T=f(()=>{let e=v();return e.state===`active`&&e.phase===`dragging-reposition`}),ee=f(()=>{let e=v();return e.state===`active`&&e.phase===`justDragged`}),E=f(()=>v().state===`copying`),te=f(()=>l.selectionInteractionLockDepth>0),D=f(()=>v().state===`justCopied`),O=f(()=>{let e=v();return e.state===`active`&&!!e.isPromptMode}),k=f(()=>l.pendingCommentMode||O()),ne=f(()=>{let e=v();return e.state===`active`&&!!e.isPromptMode&&!!e.isPendingDismiss}),re=new Map,ie=(e,t)=>{re.has(e)||re.set(e,document.body.style[e]),document.body.style[e]=t},ae=e=>{let t=re.get(e);t!==void 0&&(document.body.style[e]=t,re.delete(e))};d(_(x,(e,t)=>{e&&!t?(vy(p().x,p().y),ie(`touchAction`,`none`)):!e&&t&&(yy(),ae(`touchAction`))}));let A=C_(),[oe,se]=c(A?!A.collapsed:!0),[ce,le]=c(0),[ue,de]=c(0),[fe,pe]=c(A),[me,he]=c(!1),ge=E_(e=>e.shiftKey),[ve,ye]=c(null),[be,xe]=c(null),Se=f(()=>l.contextMenuPosition!==null),Ce=f(()=>Se()||ve()!==null),M,N=null,we=new WeakMap,P=mb(),Te=()=>!oe()||O()||te()||Se()||P.isPendingDismiss(),Ee=()=>{Ke(!1),we=new WeakMap},De=e=>{let t=fe()??C_(),n={edge:t?.edge??`bottom`,ratio:t?.ratio??.5,collapsed:t?.collapsed??!1,enabled:t?.enabled??!0,defaultAction:t?.defaultAction??`copy`,...e};w_(n),pe(n),xb(o,n)},Oe=()=>{We.timerId!==null&&(clearTimeout(We.timerId),We.timerId=null)},ke=()=>{We.copyWaiting=!1,We.holdTimerFired=!1,We.startTimestamp=null};d(()=>{if(v().state!==`holding`){Oe();return}We.startTimestamp=Date.now(),We.timerId=window.setTimeout(()=>{if(We.timerId=null,We.copyWaiting){We.holdTimerFired=!0;return}u.activate()},l.keyHoldDuration),y(Oe)}),d(()=>{let e=v();if(e.state!==`active`||e.phase!==`justDragged`)return;let t=setTimeout(()=>{u.finishJustDragged()},rn);y(()=>clearTimeout(t))}),d(()=>{if(v().state!==`justCopied`)return;let e=setTimeout(()=>{u.finishJustCopied()},rn);y(()=>clearTimeout(e))}),d(_(b,(e,t=!1)=>{!t||e||!x()||(s.store.options.activationMode!==`hold`&&u.setWasActivatedByToggle(!0),s.hooks.onActivate())}));let Ae=(e,t,n)=>{u.setCopyStart({x:t,y:n},e),u.clearInputText()},je=()=>{let e=l.frozenElement||K();e&&u.enterPromptMode({x:p().x,y:p().y},e)},Me={lastDetectionTimestamp:0,pendingDetectionScheduledAt:0,latestPointerX:0,latestPointerY:0},Ne=null,F={x:0,y:0},I=0,Pe=0,[Fe,L]=c(null),[Ie,Le]=c(0),Re=()=>{Ne!==null&&(clearTimeout(Ne),Ne=null)},ze=e=>{L({x:F.x,y:F.y}),I=e},Be=(e,t)=>{if(!w())return;F.x=e,F.y=t;let n=performance.now(),r=n-I,i=Pe>=16;if(I===0||!i&&r>=100){Re(),ze(n);return}Re(),Ne=window.setTimeout(()=>{w()&&ze(performance.now()),Ne=null},i?32:Math.min(32,100-r))},Ve=(e,t,n)=>(Re(),vg(e,{x:t,y:n},Rp)),He=()=>{Re(),I=0,Pe=0,L(null),Xt()},Ue=null,We={timerId:null,startTimestamp:null,copyWaiting:!1,holdTimerFired:!1},Ge=null,[R,Ke]=c(!1),qe=0,z=!1,Ye=null,B=()=>{z=!0,Ye!==null&&window.clearTimeout(Ye),Ye=window.setTimeout(()=>{z=!1,Ye=null},rn)},Xe=()=>{Ye!==null&&(window.clearTimeout(Ye),Ye=null),z=!1},Ze=0,V=null,H=null,[Qe,$e]=c(!1),[U,et]=c(null),[tt,W]=c(null),[nt,rt]=af(tt),it=f(()=>k()?Fn:Qe()?U():x()?Pn:null),at=e=>Pg(e,Rp),ot=d_(Rp,at,Y),st=m_(p,()=>C(),e=>{if(T()){if(u.shiftDragStart(e),Ge){Ge={x:Ge.x+e.x,y:Ge.y+e.y};return}let{pageX:t,pageY:n}=Ut(p().x,p().y);Ge={x:t,y:n}}}),ct=f(()=>x()&&!E()),lt=new Map,ut=(e,t)=>{let n=o_(`grabbed`),r={id:n,bounds:e,createdAt:Date.now(),element:t};u.addGrabbedBox(r),s.hooks.onGrabbedBox(e,t);let i=window.setTimeout(()=>{lt.delete(n),u.removeGrabbedBox(n)},rn+125);lt.set(n,i)},dt=async e=>{let n=await Promise.all(e.map(async e=>{let t=await Rd(e),n=t?.componentName??null,r=t?.filePath,i=t?.lineNumber??void 0,a=t?.columnNumber??void 0;n||=zd(e);let o=Gn(e)?e.innerText?.slice(0,100):void 0;return{tagName:Na(e),id:e.id||void 0,className:e.getAttribute(`class`)||void 0,textContent:o,componentName:n??void 0,filePath:r,lineNumber:i,columnNumber:a}}));t||window.dispatchEvent(new CustomEvent(`react-grab:element-selected`,{detail:{elements:n}}))},ft=new Map,pt=l_(u,()=>l.labelInstances,()=>ft.clear()),mt=e=>{for(let t of e)l.labelInstances.find(e=>e.id===t)?.status===`copying`&&(ft.delete(t),pt.dismissInstance(t))},ht=()=>{n.abort()},gt=()=>(n.signal.aborted&&!t&&(n=new AbortController),n.signal),_t=()=>(ht(),gt()),vt=()=>{ht(),r=null,mt(l.labelInstances.filter(e=>e.status===`copying`).map(e=>e.id))},yt=async(e,t,n)=>{let r,i;try{if(r=await e(n),r.status===`cancelled`)return r;r.status===`failed`&&(i=`Failed to copy`)}catch(e){if(n.aborted)return Pw;r={status:`failed`},i=np(e,`Action failed`)}if(t)for(let e of t)pt.updateAfterCopy(e,r.status===`succeeded`,i);return r},xt=(e,t,n,r)=>{if(e){for(let e of n)ft.delete(e);return}let i={operation:t,siblingIds:new Set(n),shouldDeactivateAfter:r};for(let e of n)ft.set(e,i)},St=async(e,t,n,r=_t())=>{if(r.aborted)return!1;Xe(),v().state!==`copying`&&u.startCopy();let i=await yt(e,t,r);if(i.status===`cancelled`)return!1;let a=i.status===`succeeded`;return t&&xt(a,e,t,!!n),v().state===`copying`?(a&&u.completeCopy(),n?q():a?(u.activate(),B()):(u.activate(),u.unfreeze()),!0):!0},G=e=>{let t=ft.get(e);if(!t)return;let n=[...t.siblingIds];for(let e of n)pt.markRetrying(e),ft.delete(e);St(t.operation,n,t.shouldDeactivateAfter).then(e=>{e||mt(n)})},wt=e=>{ft.get(e)?.siblingIds.delete(e),ft.delete(e),pt.dismissInstance(e)},Tt=(e,t,n,r)=>{let i=e[0],a=r??(i?zd(i):null),o=i?Na(i):null,c=a??o??void 0;return dp({getContent:s.store.options.getContent,componentName:c,maxContextLines:s.store.options.maxContextLines,signal:t},s.hooks,e,n)},Et=async(e,t,n,r=gt())=>{if(e.length===0||r.aborted)return Pw;let i=[],a=[];for(let t of e){let{wasIntercepted:e,pendingResult:n}=s.hooks.onElementSelect(t);e||i.push(t),n&&a.push(n),s.store.theme.grabbedBoxes.enabled&&ut(Y(t),t)}if(await df(),r.aborted)return Pw;let o;if(i.length>0&&(o=await Tt(i,r,t,n),o.status===`cancelled`))return o;if(a.length>0){let e=await ap(Promise.all(a),r);if(e===ip)return o?.status===`succeeded`?o:Pw;if(!e.every(Boolean))throw new ja}return r.aborted&&!o?Pw:(dt(e).catch(e=>{Z(new ba(`Element selection notification failed`,e))}),o??{status:`succeeded`})},Dt=e=>{let n=_t(),i={},a=!1;r=i,jd(e.primaryElement).then(async t=>{if(n.aborted||r!==i){mt(e.labelInstanceIds);return}r=null,a=!0,await St(n=>Et(e.targetElements,e.extraPrompt,t??void 0,n),e.labelInstanceIds.length>0?e.labelInstanceIds:null,e.shouldDeactivateAfter,n)?e.onComplete?.():mt(e.labelInstanceIds)}).catch(o=>{if(n.aborted){mt(e.labelInstanceIds);return}if(t||!a&&r!==i)return;Z(new ba(`Copy operation failed`,o));let s=np(o,`Action failed`);for(let t of e.labelInstanceIds)pt.updateAfterCopy(t,!1,s);e.labelInstanceIds.length>0&&xt(!1,t=>jd(e.primaryElement).then(n=>t.aborted?Pw:Et(e.targetElements,e.extraPrompt,n??void 0,t)),e.labelInstanceIds,!!e.shouldDeactivateAfter),v().state===`copying`&&(e.shouldDeactivateAfter?q():(u.activate(),u.unfreeze()))}).finally(()=>{r===i&&(r=null)})},Ot=e=>{let{element:t,cursorX:n,selectedElements:r,extraPrompt:i,shouldDeactivateAfter:a,onComplete:o,dragRect:s}=e,c=r??[t],d=s??l.frozenDragRect,f=c.length>1,p=!f&&t===It()?Ht():void 0,m=d&&f?Og(d):p??Y(t),h=f?m.x+m.width/2:n,g=Na(t);Xe(),u.startCopy();let _=g?pt.createInstance(m,g,void 0,`copying`,{element:t,mouseX:h,elements:r}):null;Dt({primaryElement:t,targetElements:c,labelInstanceIds:_?[_]:[],extraPrompt:i,shouldDeactivateAfter:a,onComplete:o})},kt=e=>{let{elements:t,labelEntries:n,shouldDeactivateAfter:r,onComplete:i}=e,a=t[0];Xe(),u.startCopy(),Dt({primaryElement:a,targetElements:t,labelInstanceIds:pt.createPerElementInstances(n,`copying`),shouldDeactivateAfter:r,onComplete:i})},K=f(()=>{if(h(),!ct()||w()||te()||P.isPendingDismiss())return null;let e=l.detectedElement;return X(e)?e:null}),At=f(()=>l.frozenElement||(S()?null:K())),jt=f(()=>!x()||O()||R()||E()||Ce()||P.isPendingDismiss()?null:ge()?S()?At():K()??l.frozenElement:P.selectedElement()),Mt=f(()=>{let e=jt();return e?jg(e,Rp,at):[]}),Nt=f(()=>{let e=jt();return e?Math.max(0,Mt().findIndex(t=>t.element===e)):0}),Pt=f(()=>jt()!==null);d(()=>{if(!l.detectedElement)return;let e=1,t=setInterval(()=>{if(X(l.detectedElement)||u.relinkLiveElements(),!X(l.detectedElement)){if(e>0){--e;return}dr()}},100);y(()=>clearInterval(t))}),d(_(At,e=>{if(V!==null&&(clearTimeout(V),V=null),!e){W(null);return}V=window.setTimeout(()=>{V=null,W(e)},100)})),y(()=>{V!==null&&(clearTimeout(V),V=null)}),d(()=>{let e=l.frozenElements;y(Lv(e))}),d(_(x,e=>{e&&s.store.options.freezeReactUpdates&&y(ob())}));let Ft=()=>{if(l.isTouchMode&&C()){let e=l.detectedElement;return!X(e)||Ep(e)?void 0:e}let e=At();if(!(!e||Ep(e)))return e},It=f(()=>Ft()),Lt=()=>It()?l.isTouchMode&&C()?ct():ct()&&!w():!1,Rt=_e(()=>l.frozenElements,e=>f(()=>(h(),Y(e)))),zt=f(()=>{let e=l.frozenElements;if(e.length===0)return[];let t=l.frozenDragRect;return t&&e.length>1?[Og(t)]:Rt().map(e=>e())}),Bt=f(()=>{if(!R()||l.pendingCommentMode||Qe())return null;let e=l.detectedElement;return!X(e)||Ep(e)||l.frozenElements.includes(e)?null:e}),Vt=f(()=>{h();let e=Bt();if(e)return Y(e)}),Ht=f(()=>{h();let e=l.frozenElements;if(e.length>0){let t=zt();if(e.length===1){let e=t[0];if(e)return e}let n=l.frozenDragRect;return n?t[0]??Og(n):Ag(t_(t))}let t=It();if(t)return Y(t)}),Ut=(e,t)=>({pageX:e+window.scrollX,pageY:t+window.scrollY}),Wt=(e,t)=>{let{pageX:n,pageY:r}=Ut(e,t);return{x:Math.abs(n-l.dragStart.x),y:Math.abs(r-l.dragStart.y)}},Gt=(e,t)=>{let{pageX:n,pageY:r}=Ut(e,t),i=Math.min(l.dragStart.x,n),a=Math.min(l.dragStart.y,r),o=Math.abs(n-l.dragStart.x),s=Math.abs(r-l.dragStart.y);return{x:i-window.scrollX,y:a-window.scrollY,width:o,height:s}},Kt=e=>e.code===`Space`||e.key===` `,qt=()=>{if(!C())return;u.startDragReposition();let{pageX:e,pageY:t}=Ut(p().x,p().y);Ge={x:e,y:t}},Jt=()=>{u.stopDragReposition(),Ge=null},Yt=f(()=>{if(h(),w())return Ag(Gt(p().x,p().y))}),Xt=f(()=>{if(Ie(),!w())return[];let e=Fe();if(!e)return[];let t=Gt(e.x,e.y),n=performance.now(),r=vg(t,e,Rp);return Pe=performance.now()-n,r}),Zt=f(()=>(h(),Xt().map(e=>Y(e)))),Qt=f(()=>{let e=Zt();if(e.length>0)return e;let t=Vt();return t?[...zt(),t]:zt()}),$t=_e(()=>l.frozenElements,e=>{let t=Na(e)||`element`,n=zd(e)??void 0;return{read:f(()=>{if(h(),!X(e))return null;let r=Y(e),i=we.get(e);return{tagName:t,componentName:n,bounds:r,mouseX:i===void 0?void 0:r.x+r.width*i}})}}),en=f(()=>{if(O()||l.frozenElements.length<2)return[];let e=[];for(let t of $t())t.read()!==null&&e.push(t);return e}),tn=f(()=>{if(O())return null;let e=Bt();return e?(h(),{tagName:Na(e)||`element`,componentName:zd(e)??void 0,bounds:Y(e),mouseX:p().x}):null}),nn=f(()=>{if(E()||O()){h();let e=l.frozenElement||K();return e?{x:na(Y(e)).x+l.copyOffsetFromCenterX,y:l.copyStart.y}:{x:l.copyStart.x,y:l.copyStart.y}}return{x:p().x,y:p().y}}),an=f(()=>{if(!R()||l.frozenElements.length!==1)return;h();let e=l.frozenElements[0];if(!X(e))return;let t=we.get(e);if(t===void 0)return;let n=Y(e);return n.x+n.width*t});d(_(()=>[K(),l.lastGrabbedElement],([e,t])=>{t&&e&&t!==e&&u.setLastGrabbed(null),e&&s.hooks.onElementHover(e)})),d(_(()=>K(),e=>{let t=++Ze,n=()=>{Ze===t&&u.setSelectionSource(null,null)};if(!e){n();return}Rd(e).then(e=>{if(Ze===t){if(!e){n();return}u.setSelectionSource(e.filePath,e.lineNumber)}}).catch(()=>{Ze===t&&u.setSelectionSource(null,null)})}));let on=f(()=>l.grabbedBoxes.map(e=>({id:e.id,bounds:e.bounds,createdAt:e.createdAt}))),sn=f(()=>l.labelInstances.map(e=>({id:e.id,status:e.status,tagName:e.tagName,componentName:e.componentName,createdAt:e.createdAt})));d(_(f(()=>{let e=x(),t=C(),n=E(),r=O(),i=K(),a=Yt(),o=s.store.theme.enabled,c=s.store.theme.selectionBox.enabled,u=s.store.theme.dragBox.enabled,d=w(),f=At(),p=D();return{isActive:e,isDragging:t,isCopying:n,isPromptMode:r,isSelectionBoxVisible:!!(o&&c&&e&&!n&&!p&&!t&&f!=null),isDragBoxVisible:!!(o&&u&&e&&!n&&d),targetElement:i,dragBounds:a?{x:a.x,y:a.y,width:a.width,height:a.height}:null,grabbedBoxes:[...on()],labelInstances:[...sn()],selectionFilePath:l.selectionFilePath,toolbarState:fe()}}),e=>{s.hooks.onStateChange(e)})),d(_(()=>{let e=O();return{inputMode:e,position:e?p():g(p),target:e?K():g(K)}},({inputMode:e,position:t,target:n})=>{s.hooks.onPromptModeChange(e,{x:t.x,y:t.y,targetElement:n})})),d(_(()=>[jr(),Ht(),K()],([e,t,n])=>{s.hooks.onSelectionBox(!!e,t??null,n)})),d(_(()=>[Vr(),Yt()],([e,t])=>{s.hooks.onDragBox(!!e,t??null)})),d(_(()=>{let e=Ur();return[e,Hr(),e?nn():g(nn),e?K():g(K),l.selectionFilePath,l.selectionLineNumber]},([e,t,n,r,i,a])=>{s.hooks.onElementLabel(e,t,{x:n.x,y:n.y,content:``,element:r??void 0,tagName:r&&Na(r)||void 0,filePath:i??void 0,lineNumber:a??void 0})}));let cn=null,ln=e=>{if(e){if(!cn){cn=document.createElement(`style`),cn.setAttribute(`data-react-grab-cursor`,``);let e=Ha();e&&(cn.nonce=e),Ga(cn),document.head.appendChild(cn)}cn.textContent=`* { cursor: ${e} !important; }`}else cn&&=(cn.remove(),null)};d(_(()=>[x(),E(),O()],([e,t,n])=>{ln(t?`progress`:e&&!n?`crosshair`:null)}));let un=()=>{let e=b();u.activate(),e||s.hooks.onActivate()},q=()=>{vt();let e=C(),t=l.previouslyFocusedElement;Jt(),u.deactivate(),ri(),Ee(),qn(),P.clear(),$e(!1),et(null),e&&(ae(`userSelect`),He()),Ue&&window.clearTimeout(Ue),st.stop(),Gn(t)&&t!==document.body&&t!==document.activeElement&&X(t)&&t.focus({preventScroll:!0}),s.hooks.onDeactivate()},dn=()=>{b()&&u.releaseHold(),x()||E()?q():vt(),Xe()},fn=()=>{u.setWasActivatedByToggle(!0),un()},pn=()=>{let e=[...l.frozenElements],t=l.frozenElement||K(),n=O()?l.inputText.trim():``;if(!t){q();return}let r=e.length>0?e:[t],i=r.map(e=>Y(e))[0],{x:a,y:o}=na(i),s=a+l.copyOffsetFromCenterX;u.setPointer({x:a,y:o}),u.exitPromptMode(),u.clearInputText(),Ot({element:t,cursorX:s,selectedElements:r,extraPrompt:n||void 0,shouldDeactivateAfter:!0})},mn=()=>{if(O()){if(ne()){u.clearInputText(),q();return}u.setPendingDismiss(!0),de(e=>e+1)}},hn=()=>{if(P.isPendingDismiss()){Xn();return}u.clearInputText(),q()},gn=()=>{u.setPendingDismiss(!1)},_n=()=>{H=null,$e(!1),u.setPendingCommentMode(!1),et(null)},vn=e=>{H=e,et(e),$e(!0)},yn=e=>{let t=l.frozenElement||K();if(!t)return!1;let n={x:p().x,y:p().y},r=s.store.actions.find(t=>t.id===e);return r?(u.clearInputText(),u.exitPromptMode(),_n(),vb(r,nr(t,n))||wn(t,n),!0):(u.clearInputText(),u.exitPromptMode(),_n(),wn(t,n),!0)},bn=e=>{if(E()){q();return}if(x()){if(it()!==e){if(O()){if(yn(e))return;q();return}u.setPendingCommentMode(!1),vn(e);return}q();return}oe()&&(vn(e),fn())},xn=()=>{bn(fe()?.defaultAction??`copy`)},Sn=()=>{let e=fe()?.defaultAction??`copy`;return s.store.actions.find(t=>t.id===e)?.label??`Copy`},Cn=(e,t,n)=>{_n(),u.clearInputText(),u.enterPromptMode({x:t,y:n},e)},wn=(e,t)=>{Ee(),ii(),u.showContextMenu(t,e),qn(),s.hooks.onContextMenu(e,t)},Dn=(e,t)=>{let n=H;if(H=null,et(null),!n)return;let r=s.store.actions.find(e=>e.id===n);if(!r){wn(e,t);return}vb(r,nr(e,t))||wn(e,t)},On=()=>{if(oe()){if(x()&&k()){q();return}u.setPendingCommentMode(!0),x()||fn()}},kn=(e,t,n)=>{let r=n&&R()&&!C()&&!l.pendingCommentMode&&!Qe();if(Te()||S()&&!r)return;if(u.setPointer({x:e,y:t}),Me.latestPointerX=e,Me.latestPointerY=t,r){let n=ig(e,t);n!==l.detectedElement&&u.setDetectedElement(n);return}let i=performance.now(),a=Me.pendingDetectionScheduledAt>0&&i-Me.pendingDetectionScheduledAt<200;if(!w()&&!a){Me.pendingDetectionScheduledAt=i;let e=Math.max(0,32-(i-Me.lastDetectionTimestamp));setTimeout(()=>{if(Te()||S()||w()){Me.pendingDetectionScheduledAt=0;return}l.detectedElement&&!X(l.detectedElement)&&(u.relinkLiveElements(),ag()),Me.lastDetectionTimestamp=performance.now();let e=ig(Me.latestPointerX,Me.latestPointerY);e!==l.detectedElement&&u.setDetectedElement(e),Me.pendingDetectionScheduledAt=0},e)}if(C()){if(T()){let{pageX:n,pageY:r}=Ut(e,t);Ge&&u.shiftDragStart({x:n-Ge.x,y:r-Ge.y}),Ge={x:n,y:r}}Be(e,t);let n=p_(e,t),r=n.top||n.bottom||n.left||n.right;r&&!st.isActive()?st.start():!r&&st.isActive()&&st.stop()}},An=(e,t,n)=>{if(!ct()||te())return!1;!n&&R()&&Ee();let r=P.selectedElement()!==null;return u.startDrag({x:e,y:t},n||r),u.setPointer({x:e,y:t}),ie(`userSelect`,`none`),s.hooks.onDragStart(e+window.scrollX,t+window.scrollY),!0},Mn=(e,t)=>{let n=l.frozenElements.includes(e),r=l.frozenElements.length===0;if(!n){let n=yg(Y(e),t);we.set(e,n),r&&rt(zd(e)??void 0)}u.toggleFrozenElement(e),ag();let i=l.frozenElements.includes(e);if(i||we.delete(e),l.frozenElements.length===0){Ee(),u.unfreeze();return}Fv(l.frozenElements),Ke(!0),u.setPointer(t),u.setLastGrabbed(i?e:l.frozenElements[l.frozenElements.length-1]),u.freeze(),qn()},Nn=()=>{let e=l.frozenElements.filter(X),t=e.map(e=>{let t=Na(e)||`element`,n=zd(e)??void 0,r=we.get(e),i=Y(e);return{element:e,tagName:t,componentName:n,mouseX:r===void 0?i.x+i.width/2:i.x+i.width*r}});if(Ee(),e.length===0){u.unfreeze();return}if(e.length===1){Ot({element:e[0],cursorX:t[0].mouseX,selectedElements:e,shouldDeactivateAfter:l.wasActivatedByToggle});return}kt({elements:e,labelEntries:t,shouldDeactivateAfter:l.wasActivatedByToggle})},In=(e,t,n,r)=>{if(t.length===0)return;let i=r&&!l.pendingCommentMode&&!Qe();if(i&&u.addFrozenElements(t),Fv(i?l.frozenElements:t),s.hooks.onDragEnd(t,e),i){let e=t[t.length-1];Ke(!0),ag(),u.setPointer(na(Y(e))),u.setLastGrabbed(e),u.freeze(),qn();return}let a=t[0],o=na(Y(a));u.setPointer(o),u.setFrozenElements(t);let c=kg(e);if(u.setFrozenDragRect(c),u.freeze(),u.setLastGrabbed(a),l.pendingCommentMode){Cn(a,o.x,o.y);return}if(Qe()){$e(!1),H?Dn(a,o):wn(a,o);return}let d=l.wasActivatedByToggle&&!n;Ot({element:a,cursorX:o.x,selectedElements:t,shouldDeactivateAfter:d,dragRect:c})},Rn=e=>{for(let t of l.frozenElements)if(X(t)&&x_(e,Y(t)))return t;return null},zn=(e,t,n,r)=>{let i=X(l.frozenElement)?l.frozenElement:null,a=P.selectedElement(),o=()=>rg(e,t).find(Rp)??null;if(r&&!l.pendingCommentMode&&!Qe()){let n=o();n!==null&&Mn(n,{x:e,y:t});return}let c=o()??(X(l.detectedElement)?l.detectedElement:null),d=a??c??i;if(!d)return;let f,m,h=c===null&&i===d,g=a===d;if(h)f=p().x,m=p().y;else if(g){let e=na(Y(d));f=e.x,m=e.y}else f=e,m=t;if(l.pendingCommentMode){Cn(d,f,m),P.clear();return}if(Qe()){$e(!1);let{wasIntercepted:e}=s.hooks.onElementSelect(d);if(e)return;P.clear(),Fv([d]),u.setFrozenElement(d);let t={x:f,y:m};u.setPointer(t),u.freeze(),H?Dn(d,t):wn(d,t);return}let _=l.wasActivatedByToggle&&!n;u.setLastGrabbed(d),Ot({element:d,cursorX:f,shouldDeactivateAfter:_}),P.clear()},Bn=()=>{C()&&(Jt(),He(),u.cancelDrag(),st.stop(),ae(`userSelect`),dr())},Hn=(e,t,n,r)=>{if(!C())return;let i=Wt(e,t),a=i.x>2||i.y>2,o=a?Gt(e,t):null,s=o?Ve(o,e,t):[];He(),a?u.endDrag():u.cancelDrag(),Jt(),st.stop(),ae(`userSelect`),o?In(o,s,n,r):zn(e,t,n,r)},J=Qf(),Un=Ob({shouldForwardInteraction:()=>x()||b()||C()||te(),shouldForwardKeyboardEvent:e=>qg(e,s.store.options),shouldForwardViewportEvent:e=>{let t=l.frozenElement??K();return t&&kb(e,t)?!0:l.frozenElements.some(t=>kb(e,t))}}),Wn=f_(),Kn=e=>{let t;try{t=Wn.originalKeyDescriptor?.get?Wn.originalKeyDescriptor.get.call(e):e.key}catch{return!1}let n=t===`Enter`||b_(e.code),r=x()||b();return n&&r&&!O()&&!P.isPendingDismiss()&&!l.wasActivatedByToggle?Jg(e,`data-react-grab-input`)?!1:(Wn.claimedEvents.add(e),e.preventDefault(),e.stopImmediatePropagation(),!0):!1};J.addDocumentListener(`keydown`,ro(Kn),{capture:!0}),J.addDocumentListener(`keyup`,ro(Kn),{capture:!0}),J.addDocumentListener(`keypress`,ro(Kn),{capture:!0});let qn=()=>{ot.clearHistory(),P.clear()},Jn=(e,t=!1)=>{u.setFrozenElement(e),u.freeze(),P.select(e,{shouldPromptBeforeMouseHandoff:t});let n=na(Y(e));u.setPointer(n),l.contextMenuPosition!==null&&u.showContextMenu(n,e)},Yn=()=>{P.showDismissPrompt()&&de(e=>e+1)},Xn=()=>{P.clear(),u.unfreeze(),qn()},Zn=()=>{let e=P.takeSelection(l.frozenElement);if(!e){Xn();return}let t=na(Y(e));qn(),u.setLastGrabbed(e),Ot({element:e,cursorX:t.x,shouldDeactivateAfter:l.wasActivatedByToggle})},Qn=e=>En.has(e.key)?e.key:e.key===`Tab`?e.shiftKey?`ArrowLeft`:`ArrowRight`:null,$n=(e,t={})=>{if(!x()||O()||R()||P.isPendingDismiss()&&!t.allowPendingKeyboardSelection)return!1;let n=Qn(e);if(!n||Ce())return!1;let r=At(),i=!r;if(!r){let e=to()?.getBoundingClientRect();r=e?ig(e.left+e.width/2,e.top+e.height/2):ig(window.innerWidth/2,window.innerHeight/2)}if(!r)return!1;let a=n===`ArrowUp`||n===`ArrowDown`,o=ot.findNext(n,r);if(!o&&!a&&!i)return!1;let s=o??r;return e.preventDefault(),e.stopPropagation(),Jn(s,!0),!0},er=e=>e.metaKey||e.ctrlKey||e.altKey||e.repeat||La(e)||!x()||E()||te()||Ce()?null:l.frozenElement||K(),tr=e=>{let t=er(e);if(!t)return null;let n=db(s.store.actions,e);return n?{element:t,action:n}:null},nr=(e,t)=>{let n=Y(e);return Qr({element:e,filePath:l.selectionFilePath??void 0,lineNumber:l.selectionLineNumber??void 0,tagName:Na(e)||void 0,componentName:nt(),position:t,shouldDeferHideContextMenu:!1,performWithFeedbackOptions:{fallbackBounds:n,fallbackSelectionBounds:[n],position:t}})},rr=e=>{let t=tr(e);if(!t)return!1;let{element:n,action:r}=t;return O()?yn(r.id)?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1:vb(r,nr(n,{x:p().x,y:p().y}))?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1},ir=()=>{let e=l.selectionFilePath,t=l.selectionLineNumber;e&&e_(e,t??void 0,s.hooks)},ar=e=>e.key?.toLowerCase()!==`o`||!x()||!(e.metaKey||e.ctrlKey)||!l.selectionFilePath?!1:(e.preventDefault(),e.stopPropagation(),ir(),!0),or=e=>{if(!x()||E()||l.contextMenuPosition!==null)return!1;let t=e.key===`F10`&&e.shiftKey,n=e.key===`ContextMenu`;if(!t&&!n)return!1;let r=l.frozenElements,i=r.length>1,a=(i?r[0]:null)||l.frozenElement||K();if(!a)return!1;e.preventDefault(),e.stopPropagation();let o=na(Y(a));return i?Fv(r):(Fv([a]),u.setFrozenElement(a)),u.setPointer(o),u.freeze(),wn(a,o),!0},sr=f(()=>Mt().map(e=>({tagName:Na(e.element)||`element`,componentName:zd(e.element)??void 0,depth:e.depth,isLast:e.isLast}))),cr=f(()=>({items:sr(),activeIndex:Nt()})),lr=e=>{if(!(!s.store.options.allowActivationInsideInput&&La(e))&&!(!qg(e,s.store.options)&&((e.metaKey||e.ctrlKey)&&!Tn.includes(e.key)&&!b_(e.code)&&(x()&&!l.wasActivatedByToggle?q():b()&&(Oe(),ke(),u.releaseHold())),!b_(e.code)||!b()))){if((x()||b())&&!O()&&(e.preventDefault(),b_(e.code)&&e.stopImmediatePropagation()),x()){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e.repeat)return;Ue!==null&&window.clearTimeout(Ue),Ue=window.setTimeout(()=>{q()},200);return}if(b()&&e.repeat){if(We.copyWaiting){let e=We.holdTimerFired;ke(),e&&u.activate()}return}if(!(E()||D())&&!b()){let t=s.store.options.keyHoldDuration??100;La(e)?Ra(e)?t+=600:t+=400:za()&&(t+=600),ke(),u.startHold(t)}}},ur=e=>{if(!P.isPendingDismiss())return!1;if(b_(e.code))return!0;let t=En.has(e.key),n=tr(e)!==null;return!t&&!n?!1:t?$n(e,{allowPendingKeyboardSelection:!0}):rr(e)?(qn(),!0):!1};J.addWindowListener(`keydown`,ro(e=>{if(Qn(e)&&La(e)||ur(e))return;if(Kn(e),!oe()){qg(e,s.store.options)&&!e.repeat&&le(e=>e+1);return}let t=b_(e.code)&&b()&&!O(),n=Jg(e,jn);if(O()&&qg(e,s.store.options)&&!e.repeat&&!n){e.preventDefault(),e.stopPropagation(),mn();return}if(e.key===`Escape`&&E()){q();return}if(e.key===`Escape`&&Ce()){ve()!==null&&ri();return}let r=Jg(e,`data-react-grab-ignore-events`)&&!t;if(O()||r)return O()&&!n&&rr(e)||(e.key===`Escape`&&(O()?mn():l.wasActivatedByToggle&&q()),r&&En.has(e.key)&&$n(e)),void 0;if(C()&&Kt(e)){e.repeat||qt(),e.preventDefault(),e.stopPropagation();return}if(e.key===`Escape`&&(b()||l.wasActivatedByToggle)){q();return}x()&&!Tn.includes(e.key)&&e.preventDefault();let i=Date.now()-qe<200;$n(e)||ar(e)||or(e)||rr(e)||i||lr(e)}),{capture:!0}),J.addWindowListener(`keyup`,ro(e=>{if(Kn(e))return;if(Kt(e)&&T()&&(Jt(),e.preventDefault(),e.stopPropagation()),e.key===`Shift`&&R()){C()&&Bn(),Nn();return}if(Jg(e,`data-react-grab-ignore-events`))return;let t=Kg(s.store.options.activationKey),n=t.metaKey||t.ctrlKey?Bg()?!e.metaKey:!e.ctrlKey:t.shiftKey&&!e.shiftKey||t.altKey&&!e.altKey,r=s.store.options.activationKey?Gg(s.store.options.activationKey)(e):Lg(e.key,e.code);if(D()||z){(r||n)&&(Xe(),q());return}if(!b()&&!x()||O())return;let i=!!s.store.options.activationKey,a=s.store.options.activationMode===`hold`,o=C();if(x()){let e=Se();if(n){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e)return;q()}else if(a&&r){if(Ue!==null&&(window.clearTimeout(Ue),Ue=null),e||o)return;q()}else !i&&r&&Ue!==null&&(window.clearTimeout(Ue),Ue=null);return}if(r||n){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`)return;if(b()||We.holdTimerFired&&n){Oe();let t=(We.startTimestamp?Date.now()-We.startTimestamp:0)>=200,n=We.holdTimerFired&&t&&(s.store.options.allowActivationInsideInput||!La(e));ke(),n?u.activate():u.releaseHold()}else q()}}),{capture:!0}),J.addDocumentListener(`copy`,()=>{b()&&(We.copyWaiting=!0)}),J.addWindowListener(`keypress`,ro(Kn),{capture:!0}),J.addWindowListener(`pointermove`,ro(e=>{if(!e.isPrimary)return;let t=e.pointerType===`touch`;if(u.setTouchMode(t),!Jg(e,`data-react-grab-ignore-events`)&&!Te()&&!(t&&!b()&&!x())){if((t?b():x())&&!O()&&S()&&!e.shiftKey&&!R()){if(P.consumeMouseHandoff()){Yn();return}u.unfreeze(),qn()}kn(e.clientX,e.clientY,e.shiftKey)}}),{passive:!0,capture:!0}),J.addWindowListener(`pointerdown`,ro(e=>{if(e.button===0&&e.isPrimary&&(u.setTouchMode(e.pointerType===`touch`),!(!C()&&Jg(e,`data-react-grab-ignore-events`))&&!Se())){if(O()){let t=Ht();t&&e.clientX>=t.x&&e.clientX<=t.x+t.width&&e.clientY>=t.y&&e.clientY<=t.y+t.height?pn():mn();return}if(P.isPendingDismiss()){e.preventDefault(),e.stopImmediatePropagation();return}if(te()){e.preventDefault(),e.stopImmediatePropagation();return}if(An(e.clientX,e.clientY,e.shiftKey)){if(e.pointerId!==void 0)try{document.documentElement.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),e.stopImmediatePropagation()}}}),{capture:!0}),J.addWindowListener(`pointerup`,ro(e=>{if(e.button!==0||!e.isPrimary||Jg(e,`data-react-grab-ignore-events`)||Se())return;let t=ct()||te()||C(),n=e.metaKey||e.ctrlKey;Hn(e.clientX,e.clientY,n,e.shiftKey),t&&(e.preventDefault(),e.stopImmediatePropagation())}),{capture:!0}),J.addWindowListener(`contextmenu`,ro(e=>{if(!ct()||E()||O())return;let t=Jg(e,`data-react-grab-ignore-events`),n={x:e.clientX,y:e.clientY},r=t&&l.frozenElements.length>1?Rn(n):null,i=P.isPendingDismiss();if(t&&!r&&!i&&!Pt())return;if(Se()){e.preventDefault();return}e.preventDefault(),e.stopPropagation();let a=r??ig(e.clientX,e.clientY);if(!a)return;let o=l.frozenElements;o.length>1&&o.includes(a)?Fv(o):(Fv([a]),u.setFrozenElement(a)),u.setPointer(n),u.freeze(),wn(a,n)}),{capture:!0}),J.addWindowListener(`pointercancel`,ro(e=>{e.isPrimary&&Bn()}),{capture:!0}),J.addWindowListener(`click`,ro(e=>{Jg(e,`data-react-grab-ignore-events`)||Se()||(ct()||ee())&&(e.preventDefault(),e.stopImmediatePropagation(),l.wasActivatedByToggle&&!O()&&!e.shiftKey&&(b()?u.setWasActivatedByToggle(!1):q()))}),{capture:!0}),J.addDocumentListener(`visibilitychange`,()=>{if(document.hidden){u.clearGrabbedBoxes();let e=l.activationTimestamp;x()&&!O()&&e!==null&&Date.now()-e>500&&q()}}),J.addWindowListener(`blur`,()=>{Bn(),b()&&(Oe(),u.releaseHold(),ke()),Ee()}),J.addWindowListener(`focus`,()=>{qe=Date.now()}),J.addWindowListener(`focusin`,e=>{Jg(e,ao)&&e.stopPropagation()},{capture:!0});let dr=()=>{if(!(l.isTouchMode&&!b()&&!x())&&!Te()&&!S()&&!C()&&l.frozenElements.length===0){let e=ig(p().x,p().y);u.setDetectedElement(e)}},fr=null,pr=null,mr=null,hr=()=>{Dg(),Gm(),dr(),Le(e=>e+1),u.incrementViewportVersion(),u.updateContextMenuPosition()},gr=()=>{Dg(),mr===null&&(mr=lf(()=>{mr=null,hr()}))},_r=()=>{Lp(),hr()};J.addWindowListener(`scroll`,gr,{capture:!0,passive:!0});let vr=window.innerWidth,yr=window.innerHeight;J.addWindowListener(`resize`,()=>{let e=window.innerWidth,t=window.innerHeight;if(vr>0&&yr>0){let n=e/vr,r=t/yr,i=Math.abs(n-r)<Ln,a=Math.abs(n-1)>Ln;i&&a&&u.setPointer({x:p().x*n,y:p().y*r})}vr=e,yr=t,_r()});let br=window.visualViewport;if(br){let{signal:e}=J;br.addEventListener(`resize`,_r,{signal:e}),br.addEventListener(`scroll`,gr,{signal:e})}let xr=()=>{pr===null&&(pr=lf(()=>{pr=null,u.incrementViewportVersion()}))};d(()=>{if(s.store.theme.enabled&&(x()||E()||l.labelInstances.length>0||l.grabbedBoxes.length>0)){if(fr!==null)return;fr=window.setInterval(()=>{u.relinkLiveElements(),xr()},100);return}fr!==null&&(window.clearInterval(fr),fr=null),pr!==null&&(uf(pr),pr=null)}),y(()=>{fr!==null&&window.clearInterval(fr),pr!==null&&uf(pr),mr!==null&&uf(mr)}),J.addDocumentListener(`copy`,ro(e=>{O()||Jg(e,`data-react-grab-ignore-events`)||ct()&&e.preventDefault()}),{capture:!0}),y(()=>{let e=[];Q(Un,e),Q(()=>J.abort(),e),Re(),Ue&&window.clearTimeout(Ue),Q(Xe,e),N&&Q(N,e),N=null,lt.forEach(e=>window.clearTimeout(e)),lt.clear(),Q(pt.cancelAllFades,e),ft.clear(),Q(st.stop,e),Q(yy,e),Q(()=>ae(`userSelect`),e),Q(()=>ae(`touchAction`),e),Q(()=>ln(null),e),Q(Wn.restore,e),Q(()=>eo(null),e),qm(e,`Disposing React Grab failed`)});let{root:Sr,host:Cr,cancelPendingAttachment:wr}=uo(Ct);y(wr),y(Yf(Cr).cleanup);let Tr=f(()=>s.store.theme.enabled),Er=f(()=>s.store.theme.selectionBox.enabled),Dr=f(()=>s.store.theme.elementLabel.enabled),Or=f(()=>s.store.theme.dragBox.enabled),kr=f(()=>D()||me()&&!S()),Ar=f(()=>Zt().length>0),jr=f(()=>!Tr()||!Er()||kr()?!1:Ar()?!0:Lt()),Mr=f(()=>{let e=It();if(e)return Na(e)||void 0}),Nr=f(()=>!Tr()||Se()||!Dr()||kr()?!1:Lt()),Pr=new Map,Fr=e=>{let t=e.elements?.filter(X)??[],n=e.element,r=null;t.length>0?r=t.map(Y):n&&X(n)&&(r=[Y(n)]);let i=e.bounds,a=e.boundsMultiple;r&&(i=r.length>1?Ag(t_(r)):r[0],e.boundsMultiple!==void 0&&(a=e.boundsMultiple.length>1&&e.boundsMultiple.length===e.elements?.length?r:[i]));let o=Pr.get(e.id),s=o?.boundsMultiple,c=s===a||s!==void 0&&a!==void 0&&s.length===a.length&&s.every((e,t)=>e.x===a[t].x&&e.y===a[t].y&&e.width===a[t].width&&e.height===a[t].height);if(o&&o.status===e.status&&o.errorMessage===e.errorMessage&&o.bounds.x===i.x&&o.bounds.y===i.y&&o.bounds.width===i.width&&o.bounds.height===i.height&&c)return o;let l=i.x+i.width/2,u=i.width/2,d;d=e.mouseXOffsetRatio!==void 0&&u>0?l+e.mouseXOffsetRatio*u:e.mouseXOffsetFromCenter===void 0?e.mouseX??l:l+e.mouseXOffsetFromCenter;let f={...e,bounds:i,boundsMultiple:a,mouseX:d};return Pr.set(e.id,f),f},Ir=f(()=>{if(!Tr()||!s.store.theme.grabbedBoxes.enabled)return[];h();let e=new Set(l.labelInstances.map(e=>e.id));for(let t of Pr.keys())e.has(t)||Pr.delete(t);return l.labelInstances.map(Fr)}),Lr=f(()=>new Map(Ir().map(e=>[e.id,e]))),Rr=new Map,zr=f(()=>{let e=Ir(),t=new Set(e.map(e=>e.id));for(let e of Rr.keys())t.has(e)||Rr.delete(e);return e.map(e=>{let t=Rr.get(e.id);if(t)return t;let n=e.id,r={read:()=>Lr().get(n)??null};return Rr.set(n,r),r})}),Br=f(()=>!Tr()||!s.store.theme.grabbedBoxes.enabled?[]:(h(),l.grabbedBoxes.map(e=>X(e.element)?{...e,bounds:Y(e.element)}:e))),Vr=f(()=>Tr()&&Or()&&ct()&&w()),Hr=f(()=>E()?`processing`:`hover`),Ur=f(()=>{if(!Tr())return!1;let e=Dr(),t=O(),n=E(),r=ct(),i=C(),a=!!At(),o=me(),s=S();return!e||t||o&&!s?!1:n?!0:r&&!i&&a}),Wr=f(()=>{h();let e=l.contextMenuElement;return e?Y(e):null}),Gr=f(()=>(h(),l.contextMenuPosition)),Kr=f(()=>{let e=l.contextMenuElement;if(!e)return;let t=l.frozenElements.length;return t>1?`${t} elements`:Na(e)||void 0}),[qr]=af(()=>l.frozenElements.length>1?null:l.contextMenuElement),[Jr]=m(()=>l.contextMenuElement,async e=>e?Rd(e):null),Yr=async e=>{u.incrementSelectionInteractionLockDepth();try{return await e()}finally{u.decrementSelectionInteractionLockDepth()}},Xr=(e,t,n,r,i)=>async a=>{await Yr(async()=>{let o=i?.fallbackBounds??null,s=i?.fallbackSelectionBounds??[],c=i?.position??l.contextMenuPosition??p(),d=zt(),f=Wr()??o,m=t.length>1,h=m?Ag(t_(d)):f,g=l.wasActivatedByToggle,_;if(_=m?d:f?[f]:s,u.hideContextMenu(),h){let i=m?h.x+h.width/2:c.x,o=pt.createInstance(h,n||`element`,r,`copying`,{element:e,mouseX:i,elements:m?t:void 0,boundsMultiple:_}),s=!1,l;try{s=await a(),s||(l=`Failed to copy`)}catch(e){l=np(e,`Action failed`)}pt.updateAfterCopy(o,s,l)}else try{await a()}catch(e){Z(new ba(`Action failed without feedback bounds`,e))}g?q():u.unfreeze()})},Zr=()=>{setTimeout(()=>{u.hideContextMenu()},0)},Qr=e=>{let{element:t,filePath:n,lineNumber:r,tagName:i,componentName:a,position:o,performWithFeedbackOptions:c,shouldDeferHideContextMenu:d,onBeforeCopy:f,onBeforePrompt:p,customEnterPromptMode:m}=e,h=l.frozenElements.length>0?l.frozenElements:[t],g=d?Zr:u.hideContextMenu,_={element:t,elements:h,filePath:n,lineNumber:r,componentName:a,tagName:i,enterPromptMode:m??(()=>{pt.clearAll(),_n(),p?.(),Ae(t,o.x,o.y),u.setPointer({x:o.x,y:o.y}),u.setFrozenElement(t),je(),x()||un(),g()}),copy:()=>{_n(),f?.(),Ot({element:t,cursorX:o.x,selectedElements:h.length>1?h:void 0,shouldDeactivateAfter:l.wasActivatedByToggle}),g()},hooks:{transformHtmlContent:s.hooks.transformHtmlContent,onOpenFile:s.hooks.onOpenFile,transformOpenFileUrl:s.hooks.transformOpenFileUrl},performWithFeedback:Xr(t,h,i,a,c),hideContextMenu:g,cleanup:()=>{l.wasActivatedByToggle?q():u.unfreeze()}},v=s.hooks.transformActionContext(_);return{..._,...v}},$r=f(()=>{let e=l.contextMenuElement;if(!e)return;let t=Jr(),n=l.contextMenuPosition??p();return Qr({element:e,filePath:t?.filePath,lineNumber:t?.lineNumber??void 0,tagName:Kr(),componentName:qr(),position:n,shouldDeferHideContextMenu:!0,onBeforeCopy:()=>{P.clear()},customEnterPromptMode:()=>{pt.clearAll(),_n(),u.clearInputText(),u.enterPromptMode(n,e),Zr()}})}),ei=()=>{setTimeout(()=>{u.hideContextMenu(),q()},0)},ti=()=>{if(!M)return null;let e=M.getBoundingClientRect(),t=cb(e);return t===`left`||t===`right`?{x:t===`left`?e.right:e.left,y:e.top+e.height/2,edge:t}:{x:e.left+e.width/2,y:t===`top`?e.bottom:e.top,edge:t}},ni=(e,t)=>{let n=null,r=()=>{let i=e();i&&t(i),n=lf(r)};return r(),()=>{n!==null&&(uf(n),n=null)}};d(()=>{if(!Pt())return;let e=ni(ti,xe);y(()=>{e(),xe(null)})});let ri=()=>{N?.(),N=null,ye(null)},ii=()=>{u.hideContextMenu(),ri()},ai=()=>{ve()===null?(u.hideContextMenu(),N?.(),N=ni(ti,ye)):ri()},oi=e=>{De({defaultAction:e}),Qe()&&vn(e)},si=e=>{let t=l.labelInstances.find(t=>t.id===e);if(!t?.element||!X(t.element))return;let n=t.element,r=na(Y(n)),i={x:t.mouseX??r.x,y:r.y},a=t.elements&&t.elements.length>0?t.elements.filter(e=>X(e)):[n];setTimeout(()=>{ri(),x()||(u.setWasActivatedByToggle(!0),un()),u.setPointer(i),u.setFrozenElements(a),a.length>1&&t.bounds&&u.setFrozenDragRect(kg(t.bounds)),u.freeze(),u.showContextMenu(i,n)},0)};d(()=>{let e=s.store.theme.hue;e===0?Sr.style.filter=``:Sr.style.filter=`hue-rotate(${e}deg)`}),s.store.theme.enabled&&Promise.resolve().then(()=>(Mw(),Aw)).then(({ReactGrabRenderer:e})=>{t||(i=Je(()=>j(e,{get selectionVisible(){return jr()},get selectionBounds(){return Ht()},get selectionBoundsMultiple(){return Qt()},get selectionShouldSnap(){return l.frozenElements.length>0||Zt().length>0},get selectionElementsCount(){return l.frozenElements.length},get frozenLabelEntryAccessors(){return en()},get pendingShiftPreviewEntry(){return tn()??void 0},get selectionFilePath(){return l.selectionFilePath??void 0},get selectionTagName(){return Mr()},get selectionComponentName(){return nt()},get selectionLabelVisible(){return Nr()},selectionLabelStatus:`idle`,get hierarchyState(){return cr()},get hierarchyMenuPosition(){return be()},get labelInstances(){return Ir()},get labelInstanceAccessors(){return zr()},get dragVisible(){return Vr()},get dragBounds(){return Yt()},get grabbedBoxes(){return Br()},get mouseX(){return bt(()=>l.frozenElements.length>1)()?void 0:an()??nn().x},get isFrozen(){return S()||x()||me()},get inputValue(){return l.inputText},get isPromptMode(){return O()},onShowContextMenuInstance:si,onRetryInstance:G,onAcknowledgeErrorInstance:wt,get onLabelInstanceHoverChange(){return pt.handleHoverChange},get onInputChange(){return u.setInputText},onInputSubmit:()=>void pn(),get selectionLabelShakeCount(){return ue()},onConfirmDismiss:hn,onOpenSelectionFile:ir,get discardPrompt(){return bt(()=>!!P.isPendingDismiss())()?{isKeyboardSelection:!0,onConfirm:hn,onCopy:Zn}:ne()?{onConfirm:hn,onCancel:gn}:void 0},get toolbarVisible(){return s.store.theme.toolbar.enabled},get isActive(){return x()},onToggleActive:xn,get activeActionId(){return it()},get enabled(){return oe()},get shakeCount(){return ce()},onToolbarStateChange:e=>{pe(e),e.enabled!==oe()&&(se(e.enabled),e.enabled||(dn(),ii())),xb(o,e)},onSubscribeToToolbarStateChanges:e=>(o.add(e),()=>{o.delete(e)}),onToolbarSelectHoverChange:he,onToolbarRef:e=>{M=e},get contextMenuPosition(){return Gr()},get contextMenuBounds(){return Wr()},get contextMenuTagName(){return Kr()},get contextMenuComponentName(){return qr()},get contextMenuHasFilePath(){return!!Jr()?.filePath},get actions(){return s.store.actions},get actionContext(){return $r()},onContextMenuDismiss:ei,onContextMenuHide:Zr,get toolbarMenuPosition(){return ve()},get toolbarMenuActions(){return s.store.actions.filter(e=>e.showInToolbarMenu===!0)},get defaultActionId(){return fe()?.defaultAction??`copy`},get defaultActionLabel(){return Sn()},onSetDefaultAction:oi,onToggleToolbarMenu:ai,onToolbarMenuDismiss:ri}),Sr))}).catch(e=>{console.warn(`[react-grab] Failed to load renderer:`,e)});let ci={activate:()=>{u.setPendingCommentMode(!1),!x()&&oe()&&fn()},deactivate:()=>{x()||E()?q():vt()},toggle:()=>{x()||E()?q():oe()&&fn()},comment:On,isActive:()=>x(),isEnabled:()=>oe(),setEnabled:e=>{e!==oe()&&(se(e),De({enabled:e,collapsed:!e}),e||(dn(),ii()))},getToolbarState:()=>fe()??C_(),setToolbarState:e=>{let t=fe()??C_(),n=e.collapsed??t?.collapsed??!1,r=e.defaultAction??t?.defaultAction??`copy`,i={edge:e.edge??t?.edge??`bottom`,ratio:e.ratio??t?.ratio??.5,collapsed:n,enabled:e.enabled??!n,defaultAction:Fg(r)};w_(i),pe(i),i.enabled!==oe()&&(se(i.enabled),i.enabled||(dn(),ii())),xb(o,i)},onToolbarStateChange:e=>(o.add(e),()=>{o.delete(e)}),reset:()=>{dn(),ii(),u.clearGrabbedBoxes(),pt.clearAll(),u.setSelectionSource(null,null)},dispose:()=>{if(t)return;let n=[];t=!0,Fw=!1,Q(vt,n),Q(pt.clearAll,n),i&&Q(i,n),i=void 0,N&&Q(N,n),N=null,o.clear(),Q(e,n),Q(()=>Pb(ci),n),qm(n,`Disposing React Grab failed`)},copyElement:async e=>{let t=Array.isArray(e)?e:[e];return t.length===0?!1:(await Tt(t,gt())).status===`succeeded`},getSource:async e=>{let t=await Rd(e);return t?{filePath:t.filePath,lineNumber:t.lineNumber,columnNumber:t.columnNumber??null,componentName:t.componentName}:null},getStackContext:e=>Zd(e,{maxLines:s.store.options.maxContextLines}),getState:()=>({isActive:x(),isDragging:C(),isCopying:E(),isPromptMode:O(),isSelectionBoxVisible:!!jr(),isDragBoxVisible:!!Vr(),targetElement:K(),dragBounds:Yt()??null,grabbedBoxes:[...on()],labelInstances:[...sn()],selectionFilePath:l.selectionFilePath,toolbarState:fe()}),setOptions:e=>{s.setOptions(e)},registerPlugin:e=>{s.register(e,ci)},unregisterPlugin:e=>{s.unregister(e)},getPlugins:()=>s.getPluginNames(),getDisplayName:zd};for(let e of Nw)s.register(e,ci);return queueMicrotask(()=>{if(t)return;let e=fe();if(!e)return;let n=Fg(e.defaultAction??`copy`);n!==e.defaultAction&&De({defaultAction:n})}),setTimeout(()=>{xu(!0)},Vn),ci})};return Ma(),typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(Nb((window.__REACT_GRAB__??(()=>{if(typeof window>`u`||window.parent===window)return null;try{return window.parent.__REACT_GRAB__??null}catch{return null}})())||Iw()),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:Mb()}))),e.DEFAULT_THEME=n_,e.FreezeError=xa,e.OpenFileError=Sa,e.PluginSetupError=Ta,e.ReactGrabError=ya,e.commentPlugin=O_,e.formatElementInfo=$d,e.generateSnippet=Lb,e.getGlobalApi=Mb,e.getStack=Ad,e.init=Iw,e.isInstrumentationActive=gi,e.openPlugin=k_,e.registerPlugin=Fb,e.setGlobalApi=Nb,e.unregisterPlugin=Ib,e})({});