@fuadnafiz98/grab 0.2.0-dev.1c5343a → 0.2.0-dev.9b69eda
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{copy-content-CGMz3X7m.d.cts → copy-content-CAzUtmEY.d.cts} +1 -1
- package/dist/{copy-content-DDha1TvA.d.ts → copy-content-DQZZQZP6.d.ts} +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/{core-D10aG0bT.js → core-D01mr3bY.js} +2 -2
- package/dist/{core-B6ewlEl-.cjs → core-OKLC8Qri.cjs} +2 -2
- package/dist/{execute-context-menu-action-Che0nlbU.cjs → execute-context-menu-action-D9Vfhktq.cjs} +1 -1
- package/dist/{execute-context-menu-action-rLG0Vr3d.js → execute-context-menu-action-VXm_BiJA.js} +1 -1
- package/dist/{freeze-updates-Dq-WbRwR.js → freeze-updates-BagDh7PQ.js} +1 -1
- package/dist/{freeze-updates-DJW5eM-i.cjs → freeze-updates-C5GYFxGi.cjs} +1 -1
- package/dist/{index-WLhSTqMb.d.ts → index-DPeQbi7w.d.ts} +1 -1
- package/dist/{index-Bqe1Iy_L.d.cts → index-DjJuQ7ZY.d.cts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +19 -19
- package/dist/index.js +1 -1
- package/dist/{open-file-R5hAPZtH.cjs → open-file-Bg05P_6c.cjs} +1 -1
- package/dist/{open-file-CYelj0h2.js → open-file-CXoh8pKu.js} +1 -1
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.d.cts +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/primitives.js +1 -1
- package/dist/renderer-7O_3KYuS.js +11 -0
- package/dist/renderer-BNXQ--cX.cjs +11 -0
- package/package.json +3 -3
- package/dist/renderer-KMGRDlFt.cjs +0 -11
- package/dist/renderer-pleCTv1a.js +0 -11
package/dist/index.global.js
CHANGED
|
@@ -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.2.0-dev.1c5343a`,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=
|
|
12
|
-
`).filter(e=>!!e.match(
|
|
13
|
-
`).filter(e=>!e.match(
|
|
14
|
-
`,t))).slice(1),isTrusted:t!==-1}},
|
|
15
|
-
`,a-1)+1,n=t.slice(e,a).match(
|
|
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 P.context.id+(n?String.fromCharCode(96+n):``)+t}function a(e){P.context=e}function o(){return{...P.context,id:P.getNextContextId(),count:0}}function s(e,t){let n=R,r=I,i=e.length===0,a=t===void 0?r:t,o=i?je:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>g(()=>le(o)));I=o,R=null;try{return re(s,!0)}finally{R=n,I=r}}function c(e,t){t=t?Object.assign({},Ee,t):Ee;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[E.bind(n),e=>(typeof e==`function`&&(e=L&&L.running&&L.sources.has(n)?e(n.tValue):e(n.value)),te(n,e))]}function l(e,t,n){let r=k(e,t,!0,ke);Ne&&L&&L.running?Fe.push(r):D(r)}function u(e,t,n){let r=k(e,t,!1,ke);Ne&&L&&L.running?Fe.push(r):D(r)}function d(e,t,n){Oe=oe;let r=k(e,t,!1,ke),i=Be&&T(Be);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),Ie?Ie.push(r):D(r)}function f(e,t,n){n=n?Object.assign({},Ee,n):Ee;let r=k(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ne&&L&&L.running?(r.tState=ke,Fe.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=Me,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`);P.context&&(u=P.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:P.load&&P.has(u)&&(s=P.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=Me,L&&e&&d?(L.promises.delete(e),d=!1,re(()=>{L.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=Be&&T(Be),t=y(),n=x();if(n!==void 0&&!o)throw n;return R&&!R.user&&e&&l(()=>{w(),o&&(e.resolved&&L&&d?L.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=L&&L.running,t==null||t===!1){D(o,g(y));return}L&&o&&L.promises.delete(o);let n,a=s===Me?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=I;return _?l(()=>(ie=I,ne(!1))):ne(!1),[k,{refetch:e=>S(ie,()=>ne(e)),mutate:b}]}function h(e){return re(e,!1)}function g(e){if(!Pe&&R===null)return e();let t=R;R=null;try{return Pe?Pe.untrack(e):e()}finally{R=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 I===null||(I.cleanups===null?I.cleanups=[e]:I.cleanups.push(e)),e}function b(){return R}function x(){return I}function S(e,t){let n=I,r=R;I=e,R=null;try{return re(t,!0)}catch(e){pe(e)}finally{I=n,R=r}}function C(e){if(L&&L.running)return e(),L.done;let t=R,n=I;return Promise.resolve().then(()=>{R=t,I=n;let r;return(Ne||Be)&&(r=L||={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),R=I=null,r?r.done:void 0})}function w(e,t){let n=Symbol(`context`);return{id:n,Provider:me(n),defaultValue:e}}function T(e){let t;return I&&I.context&&(t=I.context[e.id])!==void 0?t:e.defaultValue}function ee(e){let t=f(e),n=f(()=>j(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}function E(){let e=L&&L.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===ke)D(this);else{let e=Fe;Fe=null,re(()=>se(this),!1),Fe=e}if(R){let e=this.observers?this.observers.length:0;R.sources?(R.sources.push(this),R.sourceSlots.push(e)):(R.sources=[this],R.sourceSlots=[e]),this.observers?(this.observers.push(R),this.observerSlots.push(R.sources.length-1)):(this.observers=[R],this.observerSlots=[R.sources.length-1])}return e&&L.sources.has(this)?this.tValue:this.value}function te(e,t,n){let r=L&&L.running&&L.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(L){let r=L.running;(r||!n&&L.sources.has(e))&&(L.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=L&&L.running;r&&L.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?Fe.push(n):Ie.push(n),n.observers&&ce(n)),r?n.tState=ke:n.state=ke)}if(Fe.length>1e6)throw Fe=[],Error()},!1)}return t}function D(e){if(!e.fn)return;le(e);let t=Le;O(e,L&&L.running&&L.sources.has(e)?e.tValue:e.value,t),L&&!L.running&&L.sources.has(e)&&queueMicrotask(()=>{re(()=>{L&&(L.running=!0),R=I=e,O(e,e.tValue,t),R=I=null},!1)})}function O(e,t,n){let r,i=I,a=R;R=I=e;try{r=e.fn(t)}catch(t){return e.pure&&(L&&L.running?(e.tState=ke,e.tOwned&&e.tOwned.forEach(le),e.tOwned=void 0):(e.state=ke,e.owned&&e.owned.forEach(le),e.owned=null)),e.updatedAt=n+1,pe(t)}finally{R=a,I=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?te(e,r,!0):L&&L.running&&e.pure?(L.sources.has(e)||(e.value=r),L.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function k(e,t,n,r=ke,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:I,context:I?I.context:null,pure:n};if(L&&L.running&&(a.state=0,a.tState=r),I===null||I!==je&&(L&&L.running&&I.pure?I.tOwned?I.tOwned.push(a):I.tOwned=[a]:I.owned?I.owned.push(a):I.owned=[a]),Pe&&a.fn){let e=a.fn,[t,n]=c(void 0,{equals:!1}),r=Pe.factory(e,n);y(()=>r.dispose());let i,o=()=>C(n).then(()=>{i&&=(i.dispose(),void 0)});a.fn=n=>(t(),L&&L.running?(i||=Pe.factory(e,o),i.track(n)):r.track(n))}return a}function ne(e){let t=L&&L.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Ae)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<Le);){if(t&&L.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(L.disposed.has(t))return}if((t?e.tState:e.state)===ke)D(e);else if((t?e.tState:e.state)===Ae){let t=Fe;Fe=null,re(()=>se(e,n[0]),!1),Fe=t}}}function re(e,t){if(Fe)return e();let n=!1;t||(Fe=[]),Ie?n=!0:Ie=[],Le++;try{let t=e();return ie(n),t}catch(e){n||(Ie=null),Fe=null,pe(e)}}function ie(e){if(Fe&&=(Ne&&L&&L.running?A(Fe):ae(Fe),null),e)return;let t;if(L){if(!L.promises.size&&!L.queue.size){let e=L.sources,n=L.disposed;Ie.push.apply(Ie,L.effects),t=L.resolve;for(let e of Ie)`tState`in e&&(e.state=e.tState),delete e.tState;L=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}ze(!1)},!1)}else if(L.running){L.running=!1,L.effects.push.apply(L.effects,Ie),Ie=null,ze(!0);return}}let n=Ie;Ie=null,n.length&&re(()=>Oe(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=L.queue;r.has(n)||(r.add(n),Ne(()=>{r.delete(n),re(()=>{L.running=!0,ne(n)},!1),L&&(L.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(P.context){if(P.count){P.effects||=[],P.effects.push(...e.slice(0,n));return}a()}for(P.effects&&(P.done||!P.count)&&(e=[...P.effects,...e],n+=P.effects.length,delete P.effects),t=0;t<n;t++)ne(e[t])}function se(e,t){let n=L&&L.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===ke?i!==t&&(!i.updatedAt||i.updatedAt<Le)&&ne(i):e===Ae&&se(i,t)}}}function ce(e){let t=L&&L.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=Ae:r.state=Ae,r.pure?Fe.push(r):Ie.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(L&&L.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}L&&L.running?e.tState=0:e.state=0}function ue(e,t){if(t||(e.tState=0,L.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=I){let n=De&&t&&t.context&&t.context[De],r=de(e);if(!n)throw r;Ie?Ie.push({fn(){fe(r,n,t)},state:ke}):fe(r,n,t)}function j(e){if(typeof e==`function`&&!e.length)return j(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=j(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function me(e,t){return function(t){let n;return u(()=>n=g(()=>(I.context={...I.context,[e]:t.value},ee(()=>t.children))),void 0),n}}function he(e){for(let t=0;t<e.length;t++)e[t]()}function ge(e,t,n={}){let r=[],i=[],a=[],o=0,l=t.length>1?[]:null;return y(()=>he(a)),()=>{let u=e()||[],d=u.length,f,p;return u[Te],g(()=>{let e,t,c,h,g,_,v,y,b;if(d===0)o!==0&&(he(a),a=[],r=[],i=[],o=0,l&&=[]),n.fallback&&(r=[Ve],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 M(e,t){if(He&&P.context){let n=P.context;a(o());let r=g(()=>e(t||{}));return a(n),r}return g(()=>e(t||{}))}function _e(){return!0}function ve(e){return(e=typeof e==`function`?e():e)?e:{}}function ye(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function be(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&F in r,e[n]=typeof r==`function`?(t=!0,f(r)):r}if(we&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=ve(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in ve(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(ve(e[n])));return[...new Set(t)]}},Ue);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:ye.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 xe(e,...t){let n=t.length;if(we&&F 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)}},Ue));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))}},Ue)),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 Se(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return f(ge(()=>e.each,e.children,t||void 0))}function N(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 We(`Show`);return n()})):a}return e.fallback},void 0,void 0)}var P,Ce,F,we,Te,Ee,De,Oe,ke,Ae,je,Me,I,L,Ne,Pe,R,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,z=n((()=>{P={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return i(this.context.count)},getNextContextId(){return i(this.context.count++)}},Ce=(e,t)=>e===t,F=Symbol(`solid-proxy`),we=typeof Proxy==`function`,Te=Symbol(`solid-track`),Ee={equals:Ce},De=null,Oe=ae,ke=1,Ae=2,je={owned:null,cleanups:null,context:null,owner:null},Me={},I=null,L=null,Ne=null,Pe=null,R=null,Fe=null,Ie=null,Le=0,[Re,ze]=c(!1),Ve=Symbol(`fallback`),He=!1,Ue={get(e,t,n){return t===F?n:e.get(t)},has(e,t){return t===F?!0:e.has(t)},set:_e,deleteProperty:_e,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:_e,deleteProperty:_e}},ownKeys(e){return e.keys()}},We=e=>`Stale read from <${e}>.`}));function Ge(e,t){let n=gt[e];return typeof n==`object`?n[t]?n.$:void 0:n}function Ke(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 qe(e,t,n,r={}){let i;return s(r=>{i=r,t===document?e():G(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?()=>g(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Je(e,t=window.document){let n=t[bt]||(t[bt]=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,ot))}}function V(e,t,n){nt(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Ye(e,t,n,r){nt(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Xe(e,t,n){nt(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function H(e,t){nt(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function U(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 Ze(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]||(it(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||(it(e,i,!0),n[i]=o)}return n}function Qe(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 W(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function $e(e,t={},n,r){let i={};return r||u(()=>i.children=st(e,t.children,i.children)),u(()=>typeof t.ref==`function`&&et(t.ref,e)),u(()=>tt(e,t,n,!0,i,!0)),i}function et(e,t,n){return g(()=>e(t,n))}function G(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return st(e,t,r,n);u(r=>st(e,t(),r,n),r)}function tt(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=at(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||st(e,t.children);continue}let s=t[o];i[o]=at(e,o,s,i[o],n,a,t)}}function nt(e){return!!P.context&&!P.done&&(!e||e.isConnected)}function rt(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function it(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 at(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return Qe(e,n,r);if(t===`classList`)return Ze(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=_t.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(U(e,i,n,a),a&&Je([i]))}else if(t.slice(0,5)===`attr:`)V(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Xe(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=mt.has(t))||!i&&((u=Ge(t,e.tagName))||(c=pt.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(nt(e))return n;t===`class`||t===`className`?H(e,n):s&&!c&&!l?e[rt(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&vt[t.split(`:`)[0]];r?Ye(e,r,t,n):V(e,ht[t]||t,n)}return n}function ot(e){if(P.registry&&P.events&&P.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}}),P.registry&&!P.done&&(P.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 st(e,t,n,r,i){let a=nt(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=ut(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=ut(e,n,r)}else if(o===`function`)return u(()=>{let i=t();for(;typeof i==`function`;)i=i();n=st(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(ct(o,t,n,i))return u(()=>n=st(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=ut(e,n,r),s)return n}else c?n.length===0?lt(e,o,r):Ke(e,n,o):(n&&ut(e),lt(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=ut(e,n,r,t);ut(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function ct(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=ct(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=ct(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 lt(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function ut(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 dt(e,t=!1,n=void 0){return t?document.createElementNS(xt,e):document.createElement(e,{is:n})}function ft(e){let{useShadow:t}=e,n=document.createTextNode(``),r=()=>e.mount||document.body,i=x(),a,o=!!P.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=>G(l,()=>e()?t():a(),null)),y(()=>t(!0))}else{let r=dt(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}),G(i,a),l.appendChild(r),e.ref&&e.ref(r),y(()=>l.removeChild(r))}},void 0,{render:!o}),n}var pt,mt,ht,gt,_t,vt,yt,bt,xt,K=n((()=>{z(),pt=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(`.`)]),mt=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),ht=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),gt=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}}),_t=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),vt={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},yt=e=>f(()=>e()),bt=`_$DX_DELEGATE`,xt=`http://www.w3.org/2000/svg`}));K();var St=`/*! 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 Ct=Symbol(`store-raw`),wt=Symbol(`store-node`),Tt=Symbol(`store-has`),Et=Symbol(`store-self`);function Dt(e){let t=e[F];if(!t&&(Object.defineProperty(e,F,{value:t=new Proxy(e,Pt)}),!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 Ot(e){let t;return typeof e==`object`&&!!e&&(e[F]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function q(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[Ct])return n;if(!Ot(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=q(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=q(i,t))!==i&&(e[a]=r))}return e}function kt(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function At(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 jt(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===F||t===wt?n:(delete n.value,delete n.writable,n.get=()=>e[F][t],n)}function Mt(e){b()&&At(kt(e,wt),Et)()}function Nt(e){return Mt(e),Reflect.ownKeys(e)}let Pt={get(e,t,n){if(t===Ct)return e;if(t===F)return n;if(t===Te)return Mt(e),n;let r=kt(e,wt),i=r[t],a=i?i():e[t];if(t===wt||t===Tt||t===`__proto__`)return a;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);b()&&(typeof a!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(a=At(r,t,a)())}return Ot(a)?Dt(a):a},has(e,t){return t===Ct||t===F||t===Te||t===wt||t===Tt||t===`__proto__`?!0:(b()&&At(kt(e,Tt),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Nt,getOwnPropertyDescriptor:jt};function Ft(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[Tt]&&e[Tt][t]&&i!==void 0&&e[Tt][t].$()):(e[t]=n,e[Tt]&&e[Tt][t]&&i===void 0&&e[Tt][t].$());let o=kt(e,wt),s;if((s=At(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=At(o,`length`,a))&&s.$(e.length)}(s=o[Et])&&s.$()}function It(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];Ft(e,i,t[i])}}function Lt(e,t){if(typeof t==`function`&&(t=t(e)),t=q(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&&Ft(e,n,r)}Ft(e,`length`,r)}else It(e,t)}function Rt(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++)Rt(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&Rt(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)Rt(e,[r].concat(t),n);return}else if(t.length>1){Rt(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=q(a),r===void 0||Ot(i)&&Ot(a)&&!Array.isArray(a)?It(i,a):Ft(e,r,a))}function zt(...[e,t]){let n=q(e||{}),r=Array.isArray(n),i=Dt(n);function a(...e){h(()=>{r&&e.length===1?Lt(n,e[0]):Rt(n,e)})}return[i,a]}let Bt=new WeakMap,Vt={get(e,t){if(t===Ct)return e;let n=e[t],r;return Ot(n)?Bt.get(n)||(Bt.set(n,r=new Proxy(n,Vt)),r):n},set(e,t,n){return Ft(e,t,q(n)),!0},deleteProperty(e,t){return Ft(e,t,void 0,!0),!0}};function Ht(e){return t=>{if(Ot(t)){let n;(n=Bt.get(t))||Bt.set(t,n=new Proxy(t,Vt)),e(n)}return t}}var Ut,Wt,Gt=n((()=>{Ut=null,Wt=()=>{if(Ut!==null)return Ut;try{Ut=window.matchMedia(`(color-gamut: p3)`).matches}catch{Ut=!1}return Ut}})),Kt,qt,Jt,Yt,Xt=n((()=>{Gt(),Kt=Wt(),qt=`210, 57, 192`,Jt=`0.84 0.19 0.78`,Yt=e=>Kt?`color(display-p3 ${Jt} / ${e})`:`rgba(${qt}, ${e})`})),Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,J,un,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,Y,zn,Bn,X=n((()=>{Xt(),Zt=`0.2.0-dev.9b69eda`,Qt=`var(--rg-panel-bg)`,$t=`var(--rg-shadow)`,en=-1e3,tn=.95,nn=1500,rn=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],an=5e3,on=8e3,sn=1e4,cn=.5,ln=2147483647,J=2147483645,un=2147483644,dn=.7,fn=1e3/60,pn=.01,mn=Yt(.4),hn=Yt(.05),gn=Yt(.5),_n=Yt(.08),vn=Yt(.15),yn=.2,bn=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],xn=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),Sn=new Set([`a`,`button`,`code`,`label`,`option`,`pre`,`summary`,`text`]),Cn=new Set([`script`,`style`,`template`,`noscript`]),wn=[`Meta`,`Control`,`Shift`,`Alt`],Tn=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),En=`data-react-grab-frozen`,Dn=`data-react-grab-same-origin-frame`,On=`data-react-grab-hit-test-shield`,kn=.5,An=`data-react-grab-input`,jn=.9,Mn=.5,Nn=`copy`,Pn=`comment`,Fn=`superellipse(1.25)`,In=.01,Ln=1e3,Rn={left:-9999,top:-9999},Y={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},zn=1e3,Bn=-9999})),Vn,Hn=n((()=>{Vn=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE})),Un,Wn=n((()=>{Hn(),Un=e=>Vn(e)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`})),Gn,Kn=n((()=>{Wn(),Gn=e=>Un(e)&&e.tagName===`IFRAME`})),qn,Jn,Yn,Xn=n((()=>{X(),qn=new WeakMap,Jn=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},Yn=e=>{let t=performance.now(),n=qn.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=Jn(r.borderLeftWidth),n=Jn(r.borderRightWidth),a=Jn(r.borderTopWidth),o=Jn(r.borderBottomWidth),s=Jn(r.paddingLeft),c=Jn(r.paddingRight),l=Jn(r.paddingTop),u=Jn(r.paddingBottom),d=Jn(r.width),f=Jn(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 qn.set(e,{metrics:i,timestamp:t}),i}})),Zn,Qn=n((()=>{Zn=(e,t)=>t>0?e/t:1})),$n,er=n((()=>{$n=e=>{if(!e)return null;try{return e.frameElement}catch{return null}}})),tr,nr=n((()=>{Kn(),Xn(),Qn(),er(),tr=(e,t,n)=>{let r=t,i=n,a=1,o=1,s=e;for(;s&&s!==window;){let e=$n(s);if(!e||!Gn(e))break;let t=e.getBoundingClientRect(),n=Yn(e),c=Zn(t.width,n.width),l=Zn(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}}})),rr,ir=n((()=>{rr=e=>{let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e):window.getComputedStyle(e)}})),ar,or,sr=n((()=>{X(),ar=(e,t)=>e.replace(/([\d.]+)px/g,(e,n)=>{let r=Number(n)*Math.abs(t);return`${Number(r.toFixed(3))}px`}),or=(e,t,n)=>{let[r,i]=e.split(`/`).map(e=>e.trim()),a=ar(r,t),o=ar(i??r,n);return i===void 0&&a===o?a:`${a} / ${o}`}})),cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or=n((()=>{cr=`0.7.2`,lr=`bippy-${cr}`,ur=Object.defineProperty,dr=()=>{},fr=e=>Object.assign(e,{[Symbol.dispose]:e}),pr=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{}},mr=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e),hr=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>{if(!e||typeof e.inject!=`function`||mr(e))return!1;try{return Function.prototype.toString.call(e.inject).includes(`(injected)`)}catch{return!1}},gr=new Set,_r=new Set,vr=new Set,yr=()=>{for(let e of gr)e()},br=e=>{for(let t of vr)t(e)},xr=e=>(vr.add(e),fr(()=>{vr.delete(e)})),Sr=e=>(e.renderers instanceof Map||(e.renderers=new Map),e.renderers),Cr=(e,t,n,r)=>{t.set(n,r),_r.add(r),e._instrumentationIsActive||(e._instrumentationIsActive=!0,yr())},wr=e=>{e&&gr.add(e);let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:lr,checkDCE:pr,hasUnsupportedRendererAttached:!1,inject:e=>{let i=++n;return Cr(r,t,i,e),i},on:dr,onCommitFiberRoot:dr,onCommitFiberUnmount:dr,onPostCommitFiberRoot:dr,renderers:t,supportsFiber:!0,supportsFlight:!0};try{if(ur(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=Sr(r);n.forEach((e,t)=>{_r.add(e),i.set(t,e)}),(n.size>0||vr.size>0)&&Tr(e),br(r)}}}),typeof window<`u`){let e=window.hasOwnProperty.bind(window),t=Object.getOwnPropertyDescriptor(window,`hasOwnProperty`),n=!1,r=()=>{t?ur(window,`hasOwnProperty`,t):Reflect.deleteProperty(window,`hasOwnProperty`)};ur(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{Tr(e)}return r},Tr=e=>{e&&gr.add(e);let t=!1,n=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!n)return;let r=Sr(n);if(!n._instrumentationSource){n.checkDCE=pr,n.supportsFiber=!0,n.supportsFlight=!0,n.hasUnsupportedRendererAttached=!1,n._instrumentationSource=lr,n._instrumentationIsActive=!1;let e=mr(n);e||(n.on=dr),r.size?(r.forEach(e=>_r.add(e)),n._instrumentationIsActive=!0,yr(),t=!0):!e&&hr(n)&&(n._instrumentationIsActive=!0,yr(),t=!0);let i=n.inject;n.inject=e=>{let t=i.call(n,e);return Cr(n,r,t,e),t}}!t&&(r.size||n._instrumentationIsActive)&&e?.()},Er=()=>Object.hasOwn(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),Dr=e=>Er()?(Tr(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__??wr(e)):wr(e)})),kr=n((()=>{Or();try{Dr()}catch{}}));function Ar(e,t,n=!1){if(!e)return null;let r=t(e);return li(r)?Promise.resolve(r).then(r=>r===!0?e:ui(e,t,n)):r===!0?e:ui(e,t,n)}var jr,Mr,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=n((()=>{Or(),jr=/^(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-]+)*)?$/,Mr=/^\d+$/,Nr=e=>Pr(e)!==null,Pr=e=>{let t=jr.exec(e);if(!t)return null;let n=t[4]?.split(`.`)??[];return n.some(e=>Mr.test(e)&&e.length>1&&e.startsWith(`0`))?null:{major:t[1],minor:t[2],patch:t[3],prerelease:n}},Fr=(e,t)=>e.length===t.length?e===t?0:e<t?-1:1:e.length<t.length?-1:1,Ir=(e,t)=>{let n=Mr.test(e),r=Mr.test(t);return n&&r?Fr(e,t):n===r?e===t?0:e<t?-1:1:n?-1:1},Lr=(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=Ir(n,i);if(a!==0)return a}return 0},Rr=(e,t)=>{let n=Pr(e),r=Pr(t);if(!n||!r)return null;let i=Fr(n.major,r.major);if(i!==0)return i;let a=Fr(n.minor,r.minor);if(a!==0)return a;let o=Fr(n.patch,r.patch);return o===0?Lr(n.prerelease,r.prerelease):o},zr={ChildDeletion:16,Cloned:8,ContentReset:32,Hydrating:4096,PerformedWork:1,Placement:2,Snapshot:1024,Update:4,Visibility:8192},Br={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)`},Vr=(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}}),Hr=[{isMinimumExcluded:!0,minimumVersion:`17.0.1`,workTags:Vr[`17.0.2`]},{isMinimumExcluded:!1,minimumVersion:`17.0.0-alpha`,workTags:Vr[`17.0.0-alpha`]},{isMinimumExcluded:!1,minimumVersion:`16.6.0-beta.0`,workTags:Vr[`16.6.0-beta.0`]},{isMinimumExcluded:!1,minimumVersion:`16.4.3-alpha`,workTags:Vr[`16.4.3-alpha`]}],Ur=Vr[`17.0.2`],Wr=e=>{if(e===void 0)return Ur;for(let t of Hr){let n=Rr(e,t.minimumVersion);if(n===null)return Ur;if(n===1||n===0&&!t.isMinimumExcluded)return t.workTags}return Vr[`16.0.0`]},Gr=Wr(),Kr=new WeakMap,qr=e=>e.startsWith(`0.0.0-`)?Gr:Wr(e),Jr=e=>{let t=e?.reconcilerVersion;return t&&Nr(t)?qr(t):e?.version?qr(e.version):Gr},Yr=(e,t)=>{let n=Jr(t);Kr.set(e,n),e.alternate&&Kr.set(e.alternate,n)},Xr=e=>{let t=Kr.get(e);if(t)return t;let n=[e],r=e;for(;r.return;)r=r.return,n.push(r);let i=Kr.get(r)??Gr;for(let e of n)Kr.set(e,i),e.alternate&&Kr.set(e.alternate,i);return i},zr.Placement|zr.Update|zr.ChildDeletion|zr.ContentReset|zr.Hydrating|zr.Visibility|zr.Snapshot,Zr=class extends Error{constructor(e,t){super(e,{cause:t}),this.name=`BippyError`}},Qr=class extends Zr{constructor(e,t){super(e,t),this.name=`BippyHookInspectionError`}},$r=class extends Qr{constructor(e,t){super(e,t),this.name=`BippyUnsupportedHookError`}},ei=class extends Zr{constructor(e,t){super(e,t),this.name=`BippySourceMapError`}},ti=e=>typeof e==`function`,ni=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},ri=e=>typeof e==`object`&&!!e&&`tag`in e&&`stateNode`in e&&`return`in e&&`child`in e&&`sibling`in e&&`flags`in e,ii=e=>typeof e==`object`&&!!e&&`current`in e&&ri(e.current),ai=e=>{let t=Xr(e);switch(e.tag){case t.HostComponent:case t.HostText:case t.HostHoistable:case t.HostSingleton:return!0;default:return!1}},oi=e=>{let t=Xr(e);switch(e.tag){case t.ClassComponent:case t.ForwardRef:case t.FunctionComponent:case t.MemoComponent:case t.SimpleMemoComponent:return!0;default:return!1}},si=e=>{let t=e.memoizedProps,n=e.alternate?.memoizedProps||{},r=e.flags??e.effectTag??0,i=Xr(e);switch(e.tag){case i.ClassComponent:case i.ContextConsumer:case i.ForwardRef:case i.FunctionComponent:case i.MemoComponent:case i.SimpleMemoComponent:return(r&zr.PerformedWork)===zr.PerformedWork;default:return!e.alternate||n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref}},ci=e=>{let t=Xr(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===Br.CONCURRENT_MODE_SYMBOL_DESCRIPTION||t.description===Br.DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION;switch(t){case Br.CONCURRENT_MODE_NUMBER:case Br.CONCURRENT_MODE_SYMBOL_STRING:case Br.DEPRECATED_ASYNC_MODE_SYMBOL_STRING:return!0;default:return!1}}}},li=e=>(typeof e==`object`||typeof e==`function`)&&e!==null&&`then`in e&&typeof e.then==`function`,ui=(e,t,n)=>di(n?e.return:e.child,t,n),di=(e,t,n)=>{if(!e)return null;let r=n?null:e.sibling,i=Ar(e,t,n);return li(i)?Promise.resolve(i).then(e=>e??di(r,t,n)):i??di(r,t,n)},fi=e=>ti(e)?e:typeof e!=`object`||!e?null:fi(Reflect.get(e,`type`)??Reflect.get(e,`render`)),pi=e=>{if(typeof e==`string`)return e;if(typeof e!=`function`&&typeof e!=`object`||e===null)return null;let t=ni(e);if(t)return t;let n=fi(e);return n?ni(n):null},mi=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||mr(e)||hr(e)},hi=new Set,gi=new WeakMap,_i=e=>{let t=e.alternate;if(!t)return e;let n=e;for(;n.return;)n=n.return;if(ii(n.stateNode)){let r=Ar(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 hi){let r=Ar(n.current,n=>{if(n===e||n===t)return!0});if(r)return r}return e},vi=0,yi=new WeakMap,bi=(e,t=vi++)=>{yi.set(e,t),Number.isSafeInteger(t)&&t>=vi&&(vi=t+1)},xi=e=>{let t=yi.get(e);return t===void 0&&e.alternate&&(t=yi.get(e.alternate)),t===void 0&&(t=vi++,bi(e,t)),t},Si=(e,t,n)=>{let r=t;for(;r!==null;){if(xi(r),!ci(r)&&si(r)&&e(r,`mount`),r.tag===Xr(r).SuspenseComponent)if(r.memoizedState!==null){let t=r.child,n=t?t.sibling:null;if(n){let t=n.child;t!==null&&Si(e,t,!1)}}else{let t=r.child?.child??null;t!==null&&Si(e,t,!1)}else r.child!==null&&Si(e,r.child,!0);r=n?r.sibling:null}},Ci=(e,t,n)=>{if(xi(t),!n)return;xi(n);let r=t.tag===Xr(t).SuspenseComponent;!ci(t)&&si(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&&Ci(e,r,i)}else if(i&&!a){let n=t.child;n!==null&&Si(e,n,!0)}else if(!i&&a){Ti(e,n);let r=t.child?.sibling??null;r!==null&&Si(e,r,!0)}else if(t.child!==n.child){let n=t.child;for(;n;)n.alternate?Ci(e,n,n.alternate):Si(e,n,!1),n=n.sibling}},wi=(e,t)=>{(t.tag===Xr(t).HostRoot||!ci(t))&&e(t,`unmount`)},Ti=(e,t)=>{let n=t.tag===Xr(t).SuspenseComponent&&t.memoizedState!==null,r=t.child;for(n&&(r=(t.child?.sibling??null)?.child??null);r!==null;)r.return!==null&&(wi(e,r),Ti(e,r)),r=r.sibling},Ei=new Set,Di=new WeakMap,Oi=!1,ki=e=>{let t=Di.get(e)??{};if(Di.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),Di.get(e)?.onCommitFiberRoot!==r)return;Yr(i.current,e.renderers.get(t));let s=i.current.memoizedState;s===null||s!==void 0&&(s.element===null||s.element===void 0)?(hi.delete(i),gi.delete(i)):(hi.add(i),gi.set(i,t));for(let{options:e}of Ei)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(Yr(i,e.renderers.get(t)),n&&n.call(e,t,i),Di.get(e)?.onCommitFiberUnmount===r)for(let{options:e}of Ei)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),Di.get(e)?.onPostCommitFiberRoot===r)for(let{options:e}of Ei)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),Di.get(e)?.onScheduleFiberRoot===r)for(let{options:e}of Ei)e.onScheduleFiberRoot&&e.onScheduleFiberRoot(t,i,a)};t.onScheduleFiberRoot=r,e.onScheduleFiberRoot=r}},Ai=e=>{Oi||=(xr(ki),!0),ki(e)};try{Er()&&Ai(Dr())}catch{}ji=e=>{let t=Dr(e.onActive);t._instrumentationSource=e.name??lr,Ai(t);let n={options:e};return Ei.add(n),fr(()=>{e.onActive&&gr.delete(e.onActive),Ei.delete(n)})},Mi=new Set,Ni=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),Pi=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 ri(i)?i:null},Fi=e=>{let t=Reflect.get(e,`__internalInstanceHandle`)??Reflect.get(e,`_internalInstanceHandle`);return ri(t)?t:null},Ii=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},Li=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=Pi(e);if(t)return t;let n=Fi(e);if(n)return n;for(let t of Mi){let n=Reflect.get(e,t);if(ri(n))return n}for(let t of Object.keys(e))if(Ni(t)){Mi.add(t);let n=Reflect.get(e,t);if(ri(n))return n}}if(e!=null&&(typeof e==`object`||typeof e==`number`))for(let t of hi){let n=Ar(t.current,t=>ai(t)&&Ii(t.stateNode)===e);if(n)return n}return null},Ri=Li})),Bi=r({default:()=>Vi,useEffect:()=>void 0,useReducer:()=>void 0,useRef:()=>void 0,useSyncExternalStore:()=>void 0}),Vi,Hi=n((()=>{Vi={}})),Ui=n((()=>{Or(),kr(),zi(),Hi(),Reflect.get(Bi,`useSyncExternalStore`)})),Wi,Gi,Ki,qi,Ji=n((()=>{Ui(),Wi=new WeakMap,Gi=(e,t)=>{Wi.set(e,t)},Ki=e=>Wi.get(e)??null,qi=e=>Ki(e)?.getFiber()??Ri(e)})),Yi,Xi,Zi,Qi,Z,$i=n((()=>{X(),nr(),ir(),sr(),Ji(),Yi=new WeakMap,Xi=new WeakMap,Zi=()=>{Yi=new WeakMap,Xi=new WeakMap},Qi=(e,t,n)=>{let r=Xi.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??rr(e)).borderRadius||`0px`;return Xi.set(e,{borderRadius:i,timestamp:n}),i},Z=e=>{let t=performance.now(),n=Yi.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=Ki(e);if(r){let n=r.getBounds();return Yi.set(e,{bounds:n,timestamp:t}),n}let i=e.getBoundingClientRect(),a=tr(e.ownerDocument.defaultView,i.left,i.top),o={borderRadius:or(Qi(e,null,t),a.scaleX,a.scaleY),height:i.height*a.scaleY,width:i.width*a.scaleX,x:a.x,y:a.y};return Yi.set(e,{bounds:o,timestamp:t}),o}}));$i();let ea=e=>({x:e.x+e.width/2,y:e.y+e.height/2});var ta,na=n((()=>{Ji(),ta=e=>{if(!e)return!1;let t=Ki(e);return t?t.isConnected():!!(e.isConnected||e.ownerDocument?.contains(e))}}));na();let ra=e=>{let t=0,n=e.previousElementSibling;for(;n;)t+=1,n=n.previousElementSibling;return t};var ia,aa=n((()=>{ia=e=>{let t=e.ownerDocument?.defaultView;return!!(t&&e instanceof t.ShadowRoot)}}));Ui(),aa(),Hn();let oa=new WeakMap,sa=e=>{if(e.anchorElement.isConnected)return e.anchorElement;let t=e.anchorElement.tagName,n=_i(e.anchorParentFiber);if(ai(n)){let r=n.stateNode;if(!Vn(r)||!r.isConnected)return null;let i=r.children[e.anchorIndexInParent];return i&&i.tagName===t?i:null}return ca(n,t)},ca=(e,t)=>{let n=e.child;for(;n;){if(ai(n)){let e=n.stateNode;if(Vn(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},la=(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},ua=e=>{let t=[],n=e,r=Ri(n);for(;n&&!r;){let e=n.parentElement;if(e)t.unshift({childIndex:ra(n),isShadowChild:!1}),n=e;else{let e=n.getRootNode();if(!ia(e))break;t.unshift({childIndex:ra(n),isShadowChild:!0}),n=e.host}r=Ri(n)}let i=r?.return;return!n||!i?null:{anchorElement:n,anchorParentFiber:i,anchorIndexInParent:ra(n),domPath:t,targetTagName:e.tagName}},da=(e,t)=>e.anchorElement.isConnected&&e.anchorIndexInParent===ra(e.anchorElement)&&la(e.anchorElement,e.domPath)===t,fa=e=>{if(!e.isConnected)return;let t=oa.get(e);if(t&&da(t,e))return;let n=ua(e);n&&oa.set(e,n)},pa=e=>{if(e.isConnected)return e;let t=oa.get(e);if(!t)return null;let n=sa(t);if(!n)return null;let r=la(n,t.domPath);return r&&r.isConnected&&r.tagName===t.targetTagName?r:null};z(),X();let ma=e=>{let t=pa(e)??e;return fa(t),t},ha=e=>{for(let t=0;t<e.frozenElements.length;t+=1)e.frozenElements[t]=ma(e.frozenElements[t]);e.frozenElement=e.frozenElement&&ma(e.frozenElement),e.detectedElement=e.detectedElement&&ma(e.detectedElement),e.contextMenuElement=e.contextMenuElement&&ma(e.contextMenuElement);for(let t of e.labelInstances)if(t.element&&=ma(t.element),t.elements)for(let e=0;e<t.elements.length;e+=1)t.elements[e]=ma(t.elements[e]);for(let t of e.grabbedBoxes)t.element&&=ma(t.element)},ga=e=>({selectionInteractionLockDepth:0,wasActivatedByToggle:!1,pendingCommentMode:!1,keyHoldDuration:e.keyHoldDuration,dragStart:{x:en,y:en},copyStart:{x:en,y:en},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}),_a=e=>{let[t,n]=zt(ga(e)),[r,i]=c({x:en,y:en}),[a,o]=c(0),[s,l]=c({state:`idle`}),u=e=>{n(Ht(t=>{e(t),t.frozenElement=t.frozenElements.length>0?t.frozenElements[0]:null,t.frozenDragRect=null;for(let e of t.frozenElements)fa(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(Ht(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&&(fa(e),n(`frozenElement`,e)),f(`frozen`)}},unfreeze:()=>{s().state===`active`&&h(()=>{n(Ht(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:en,y:en}),f(`justDragged`)})},cancelDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&h(()=>{n(`dragStart`,{x:en,y:en}),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}=ea(Z(t));fa(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&&fa(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(Ht(ha))},setCopyStart:(e,t)=>{let{x:r}=ea(Z(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&&fa(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&&fa(e.element);for(let t of e.elements??[])fa(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}=ea(Z(t));fa(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||!ta(e))return;let{x:i,y:a}=ea(Z(e));n(`contextMenuPosition`,{x:i+r.x,y:a+r.y})}};return{store:t,actions:p,pointer:r,viewportVersion:a,current:s}};var va,ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja=n((()=>{va=class extends Error{constructor(e,t){super(e,t),this.name=`ReactGrabError`}},ya=class extends va{constructor(e,t){super(e,{cause:t}),this.name=`RecoverableError`}},ba=class extends va{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},xa=class extends ya{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},Sa=class extends ya{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},Ca=class extends ya{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},wa=class extends ya{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},Ta=class extends ya{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},Ea=class extends ya{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},Da=class extends va{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},Oa=class extends va{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},ka=class extends va{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},Aa=class extends va{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}}})),Ma,Na=n((()=>{Ji(),Ma=e=>Ki(e)?.getTagName()??(e.tagName||``).toLowerCase()})),Pa,Fa,Ia,La,Ra,za=n((()=>{Na(),Pa=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],Fa=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},Ia=e=>{if(document.designMode===`on`)return!0;let t=Fa(e);if(!t)return!1;if(t.isContentEditable)return!0;let n=Ma(t);return Pa.some(e=>e===n||e===t.role)},La=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},Ra=()=>{let e=window.getSelection();return e?e.toString().length>0:!1}})),Ba,Va,Ha=n((()=>{Ba=new WeakMap,Va=(e=document)=>{let t=Ba.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&&Ba.set(e,r),r}})),Ua,Wa,Ga=n((()=>{Ua=[[`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`,``]],Wa=e=>{for(let[t,n]of Ua)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)}})),Ka,qa=n((()=>{X(),Ka=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===9})),Ja,Ya=n((()=>{aa(),qa(),er(),Ja=e=>{if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return ia(t)?t.host:Ka(t)?$n(t.defaultView):null}})),Xa,Za=n((()=>{Ya(),Ji(),Xa=(e,t)=>{let n=Ki(e)?.hostElement??e;for(;n;){if(n===t)return!0;n=Ja(n)}return!1}})),Qa,$a,eo,to,no,ro=n((()=>{Za(),Qa=null,$a=e=>{Qa=e},eo=()=>Qa,to=e=>Qa?e?Xa(e,Qa):!1:!0,no=e=>e})),io,ao=n((()=>{ro(),io=`data-react-grab`}));ja(),za(),X(),Ha(),Ga(),ao();let oo=e=>{if(!document.body)return;let t=document.querySelectorAll(`[${io}]`);for(let n of t)n!==e&&n.parentNode!==e&&(n.shadowRoot||n.remove());document.body.appendChild(e)},so=e=>{if(document.body)return oo(e),()=>{};let t=()=>{document.removeEventListener(`DOMContentLoaded`,t),oo(e)};return document.addEventListener(`DOMContentLoaded`,t,{once:!0}),()=>document.removeEventListener(`DOMContentLoaded`,t)},co=e=>{let t=window.setTimeout(()=>{oo(e)},Ln),n=new MutationObserver(()=>{e.parentNode!==document.body&&oo(e)});return n.observe(document.documentElement,{childList:!0}),()=>{window.clearTimeout(t),n.disconnect()}},lo=e=>{let t=document.querySelectorAll(`[${io}]`);for(let e of t){let t=e.shadowRoot?.querySelector(`[${io}]`);if(t instanceof HTMLDivElement)return{root:t,host:e,cancelPendingAttachment:co(e)};e.remove()}let n=document.createElement(`div`);n.setAttribute(io,`true`),Wa(n),n.style.zIndex=String(ln),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=Va();a&&(i.nonce=a),i.textContent=e??``,r.appendChild(i);let o=document.createElement(`div`);o.setAttribute(io,`true`),r.appendChild(o);let s=so(n),c=co(n);return{root:o,host:n,cancelPendingAttachment:()=>{s(),c()}}};Or(),zi();let uo=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,fo=[`rsc://`,`file:///`,`webpack-internal://`,`webpack://`,`node:`,`turbopack://`,`metro://`,`/app-pages-browser/`,`/(app-pages-browser)/`],po=[`rsc://`,`about://React/`],mo=[`<anonymous>`,`eval`,``],ho=/\.(cjs|cts|js|jsx|mdx|mjs|mts|ts|tsx)$/,go=/(\.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,_o=/^\?[\w~.-]+(?:=[^&#]*)?(?:&[\w~.-]+(?:=[^&#]*)?)*$/,vo=/\(at [^)]+\)$/,yo=[`react_stack_bottom_frame`,`react-stack-bottom-frame`],bo=Error,xo=()=>bo.prepareStackTrace,So=e=>{bo.prepareStackTrace=e},Co=/(^|@)\S+:\d+/,wo=/^\s*at .*(\S+:\d+|\(native\))/m,To=/^(eval@)?(\[native code\])?$/,Eo=(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=Oo(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(Co)){let t=ko(e)[0];t&&n.push(t)}return n}return e.match(wo)?Oo(e):ko(e)},Do=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]},Oo=e=>e.split(`
|
|
12
|
+
`).filter(e=>!!e.match(wo)).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=Do(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}}),ko=e=>e.split(`
|
|
13
|
+
`).filter(e=>!e.match(To)).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=Do(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}}}),Ao=new WeakMap,jo=e=>yo.some(t=>e.includes(t)),Mo=e=>{let t=e.getFunctionName?.()??``;if(t)return t;let n=e.getTypeName?.()??``,r=e.getMethodName?.()??``;return n&&r?`${n}.${r}`:r},No=e=>{let t=[];for(let n=1;n<e.length;n++){let r=e[n],i=Mo(r);if(jo(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}},Po=e=>{let t=-1;for(let n of yo)if(t=e.indexOf(n),t!==-1)break;return{frames:Eo(t===-1?e:e.slice(0,e.lastIndexOf(`
|
|
14
|
+
`,t))).slice(1),isTrusted:t!==-1}},Fo=e=>{let t=Ao.get(e);if(t)return t;let n=null,r=(e,t)=>{n=No(t);let r=`${e.name||`Error`}: ${e.message||``}`;for(let e of t)r+=`\n at ${e.toString()}`;return r},i=xo();So(r);let a;try{a=String(e.stack)}finally{So(i)}let o=n??Po(a);return Ao.set(e,o),o},Io=()=>{let e=Dr(),t=new Set([..._r,...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},Lo=e=>`H`in e?e.H:e.current,Ro=(e,t)=>{`H`in e?e.H=t:e.current=t};var zo=44,Bo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Vo=new Uint8Array(64),Ho=new Uint8Array(128);for(let e=0;e<Bo.length;e++){let t=Bo.charCodeAt(e);Vo[e]=t,Ho[t]=e}function Uo(e,t){let n=0,r=0,i=0;do i=Ho[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 Wo(e,t){return e.pos>=t?!1:e.peek()!==zo}var Go=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 Ko(e){let{length:t}=e,n=new Go(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=Uo(n,i),i<u&&(l=!1),u=i,Wo(n,e)?(a=Uo(n,a),o=Uo(n,o),s=Uo(n,s),Wo(n,e)?(c=Uo(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(Jo)}function Jo(e,t){return e[0]-t[0]}let Yo=/^data:application\/json(?:;[^,]*)?,/i,Xo=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Zo=new Map,Qo=new WeakMap;var $o=class extends Error{};let es=new Map,ts=new WeakMap,ns=new Set([`chrome-extension:`,`moz-extension:`,`safari-web-extension:`]),rs=new Set([`http:`,`https:`,...ns]),is=(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},as=(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:is(s,t,i,a)},os=(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 as(i.map.mappings,i.map.sources,a,o,i.map.ignoredSourceIndices,i.map.names)}return as(e.mappings,e.sources,t-1,n,e.ignoredSourceIndices,e.names)},ss=(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=is(e,t,i,n);if(r){if(!r.isIgnoreListed)return r;o??=r}}return o},cs=(e,t)=>{if(e.sections){let n=null;for(let r of e.sections){let e=ss(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 ss(e.mappings,e.sources,e.names,t,e.ignoredSourceIndices)},ls=(e,t)=>{if(Yo.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}}},us=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}},ds=(e,t,n)=>{let r=n.headers.get(`sourcemap`)??n.headers.get(`x-sourcemap`);if(r)return ls(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(Xo);n&&(i=n[1]||n[2]),a=e-1}return i?ls(i,e):us(e)},fs=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)},ps=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 fs(t)!==(typeof n==`string`&&n.length>0)&&typeof i==`number`&&Number.isInteger(i)&&i>=0&&typeof a==`number`&&Number.isInteger(a)&&a>=0})},ms=e=>{let t=e.ignoreList??e.x_google_ignoreList;return t?.length?new Set(t):void 0},hs=(e,t,n)=>{if(!e||uo.test(t)||t.startsWith(`/`))return t;let r=e.endsWith(`/`)?e:`${e}/`,i=t.replace(/^\.\//,``);try{let e=uo.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(`/`)}},gs=(e,t)=>e.sources.map(n=>hs(e.sourceRoot,n,t)),_s=(e,t)=>{try{return{file:e.file,ignoredSourceIndices:ms(e),mappings:Ko(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:gs(e,t),sourcesContent:e.sourcesContent,version:3}}catch{return null}},vs=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?ls(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:ms(s),mappings:Ko(s.mappings),sources:gs(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}},ys=(e,t=!1)=>{if(!e)return!1;let n=e.trim();if(!n)return!1;let r=n.match(uo);if(!r)return!0;let i=r[0].toLowerCase();return t||rs.has(i)},bs=()=>typeof window>`u`&&typeof process<`u`&&typeof process.versions?.node==`string`,xs=e=>{try{let t=new URL(e);return(t.protocol===`http:`||t.protocol===`https:`)&&!t.username&&!t.password}catch{return!1}},Ss=e=>{try{return new URL(e).protocol}catch{return null}},Cs=e=>{let t=Ss(e);return t!==null&&ns.has(t)},ws=(e,t)=>{try{let n=new URL(e),r=new URL(t);return n.protocol===r.protocol&&n.host===r.host}catch{return!1}},Ts=(e,t,n,r)=>{if(Yo.test(t))return!0;if(!ys(t,r))return!1;let i=Ss(e),a=Ss(t),o=i!==null&&!rs.has(i)||a!==null&&!rs.has(a);return!(n||o||Cs(e)||Cs(t))||ws(e,t)},Es=e=>e===408||e===425||e===429||e>=500,Ds=e=>{if(e.ok)return!0;if(Es(e.status))throw new $o;return!1},Os=(e,t,n)=>!n||t.url.length===0||ws(e,t.url),ks=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 ei(`Source map request timed out`)),e.timeoutMs);return{cleanup:()=>{clearTimeout(r),e.signal?.removeEventListener(`abort`,n)},signal:t.signal}},As=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()}},js=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))},Ms=(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`)?js(i):decodeURIComponent(i);return e===null||new TextEncoder().encode(e).byteLength>t?null:JSON.parse(e)}catch{return null}},Ns=async(e,t,n,r,i)=>{if(Yo.test(e))return Ms(e,r);let a=await t(e,{redirect:i?`error`:`follow`,signal:n});if(!Ds(a)||!Os(e,a,i))return null;let o=await As(a,r);if(o===null)return null;try{return JSON.parse(o)}catch{return null}},Ps=async(e,t,n={})=>{let r=t!==void 0;if(!ys(e,r))return null;let i=bs(),a=i||Cs(e);if(i&&!t&&(!n.allowUnsafeServerFetch||!xs(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=ks(n);try{let t=await o(e,{redirect:a?`error`:`follow`,signal:l.signal});if(!Ds(t)||!Os(e,t,a))return null;let n=await As(t,s);if(n===null)return null;let i=ds(e,n,t);if(!i||!Ts(e,i,a,r))return null;let u=await Ns(i,o,l.signal,c,a);return fs(u)?_s(u,i):ps(u)?vs(u,i,async t=>{if(!Ts(e,t,a,r))return null;let n=await Ns(t,o,l.signal,c,a);return fs(n)?n:null}):null}finally{l.cleanup()}},Fs=(e,t,n)=>{if(!n)return t;let r=e.get(n);return r||(r=new Map,e.set(n,r)),r},Is=e=>Fs(Qo,Zo,e),Ls=e=>Fs(ts,es,e),Rs=(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??``}`,zs=async(e,t=!0,n,r={})=>{let i=t&&r.signal===void 0,a=Is(n),o=Ls(n),s=Rs(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=Ps(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},Bs=async(e,t=!0,n)=>Promise.all(e.map(async e=>{if(!e.fileName)return e;let r=await zs(e.fileName,t,n);if(!r||typeof e.lineNumber!=`number`||typeof e.columnNumber!=`number`)return e;let i=os(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})),Vs=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack==`string`,Hs=e=>`tag`in e&&typeof e.tag==`number`,Us=e=>{let t=null;if(Ar(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}=Fo(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},Ws=()=>{let e=[];for(let t of Io())e.push({currentDispatcherRef:t,value:Lo(t)}),Ro(t,null);return e},Gs=e=>{for(let{currentDispatcherRef:t,value:n}of e)Ro(t,n)},Ks=e=>`\n in ${e}`,qs=(e,t)=>{let n=Ks(e);return t&&(n+=` (at ${t})`),n},Js=!1,Ys=new WeakMap,Xs=(e,t)=>{if(!e||Js)return``;let n=Ys.get(e);if(n!==void 0)return n;let r=xo();So(void 0),Js=!0;let i=Ws(),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]=
|
|
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]=Eo(n);if(!r?.fileName)break;let i=pi(e);return i&&n.includes(`<anonymous>`)&&(n=n.replace(`<anonymous>`,i)),Ys.set(e,n),n}while(a>=1&&o>=0);break}}}finally{Js=!1,So(r),Gs(i),console.error=a,console.warn=o}let s=pi(e),c=s?Ks(s):``;return Ys.set(e,c),c},Zs=(e,t)=>{let n=``,r=Xr(e);switch(e.tag){case r.ActivityComponent:n=Ks(`Activity`);break;case r.ClassComponent:n=Xs(e.type,!0);break;case r.ForwardRef:n=Xs(fi(e.type)??e.type,!1);break;case r.FunctionComponent:case r.SimpleMemoComponent:n=Xs(fi(e.type)??e.type,!1);break;case r.HostComponent:case r.HostHoistable:case r.HostSingleton:typeof e.type==`string`&&(n=Ks(e.type));break;case r.LazyComponent:n=Ks(`Lazy`);break;case r.SuspenseComponent:n=e.child!==t&&t!==null?Ks(`Suspense Fallback`):Ks(`Suspense`);break;case r.SuspenseListComponent:n=Ks(`SuspenseList`);break;case r.ViewTransitionComponent:n=Ks(`ViewTransition`);break;default:return``}return n},Qs=e=>{try{let t=``,n=e,r=null;do{t+=Zs(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}`:``}},$s=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(...
|
|
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,`&`).replace(/</g,`<`).replace(/>/g,`>`)}));Vu();let Hu=e=>Bu(e).replace(/"/g,`"`).replace(/\r/g,` `).replace(/\n/g,` `).replace(/\t/g,`	`),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.2.0-dev.1c5343a`,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
|
-
[${
|
|
25
|
-
[${
|
|
19
|
+
`);n!==-1&&(t=t.slice(n+1));let r=Math.max(...yo.map(e=>t.indexOf(e)));if(r!==-1&&(r=t.lastIndexOf(`
|
|
20
|
+
`,r)),r!==-1)t=t.slice(0,r);else return``;return t},ec=e=>!!(e.functionName&&e.fileName&&ic(e.fileName)),tc=(e,t)=>e.fileName===t.fileName&&e.lineNumber===t.lineNumber&&e.columnNumber===t.columnNumber,nc=e=>{let t=new Map;for(let n of e){if(!ec(n))continue;let e=n.functionName,r=t.get(e)??[];r.some(e=>tc(e,n))||(r.push(n),t.set(e,r))}return t},rc=(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})`)}},ic=e=>po.some(t=>e.startsWith(t)),ac=e=>!e.isServer&&e.fileName&&ic(e.fileName)?{...e,isServer:!0}:e,oc=e=>{let t=[],n=e;for(;n;)if(Hs(n)){let e=n;if(n=e._debugOwner,n&&Vs(e)){let{frames:n,isTrusted:r}=Fo(e._debugStack);if(r)for(let e of n)t.push(ac(e))}}else{let e=n;if(n=e.owner,n&&e.debugStack instanceof Error)for(let n of Fo(e.debugStack).frames)t.push({...n,isServer:!0})}return t},sc=e=>{let t=[];return Ar(e,e=>{if(!Vs(e))return;let{frames:n,isTrusted:r}=Fo(e._debugStack);r&&t.push(...n)},!0),t},cc=e=>{let t=sc(e),n=Eo(Qs(e)),r=nc(t),i=new Map;return n.map(e=>e.source!==void 0&&vo.test(e.source)?rc(e,r,i):e).filter((e,t,n)=>{if(t===0)return!0;let r=n[t-1];return e.functionName!==r.functionName})},lc=async(e,t=!0,n)=>Bs(cc(e),t,n),uc=e=>!!e.fileName&&!e.isIgnoreListed,dc=async(e,t=!0,n)=>{let r=oc(e);if(r.length>0){let i=Us(e)??{};i.functionName=pi(e.type)??i.functionName;let a=await Bs([i,...r],t,n);if(a.some((e,t)=>t>0&&uc(e)))return a}return lc(e,t,n)},fc=e=>{let t=e._debugSource;return t?typeof t==`object`&&typeof t.fileName==`string`&&t.fileName!==`(native)`&&typeof t.lineNumber==`number`:!1},pc=e=>e.fileName?{fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,functionName:e.functionName}:null,mc=e=>{if(!Vs(e))return null;let{frames:t,isTrusted:n}=Fo(e._debugStack);if(!n)return null;for(let e of t)if(e.fileName)return e;return null},hc=async(e,t,n)=>{let r=pi(e.type);if(!r)return null;let i=Eo(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 zs(i,t,n);if(!o)continue;let s=cs(o,r);if(s&&!s.isIgnoreListed)return pc(s)}return null},gc=async(e,t=!0,n)=>{if(fc(e))return e._debugSource;let r=mc(e)??Us(e);if(r){let[e]=await Bs([r],t,n),i=pc(e);if(i)return i}let i=await lc(e,t,n);for(let e of i)if(e.fileName)return pc(e);return hc(e,t,n)},_c=e=>e.split(`/`).filter(Boolean).length,vc=e=>{let t=e.indexOf(`/`,1);if(t===-1||_c(e.slice(0,t))!==1)return e;let n=e.slice(t);if(!ho.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},yc=e=>{if(!e||mo.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=vc(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 fo)if(t.startsWith(e)){t=t.slice(e.length),e===`file:///`&&(t=`/${t.replace(/^\/+/,``)}`),r=!0;break}}if(!n){let e=t.match(uo);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);_o.test(e)&&(t=t.slice(0,i))}return t},bc=e=>{let t=yc(e);return!(!t||!ho.test(t)||go.test(t))},xc=Symbol.for(`react.context`),Sc=[],Cc=null,wc=Error("Suspense interrupted this render. This error is an internal implementation detail of `use`."),Tc=()=>{let e=Cc;return e!==null&&(Cc=e.next),e},Ec=e=>typeof e==`object`&&!!e&&`then`in e&&typeof e.then==`function`,Dc=e=>typeof e==`object`&&!!e&&`current`in e,Oc=e=>typeof e==`object`&&!!e&&`_currentValue`in e,kc=e=>e._currentValue,Ac=(e,t,n,r=null)=>{Sc.push({displayName:r,primitive:e,stackError:Error(),value:t,dispatcherHookName:n})},jc=e=>{if(typeof e==`object`&&e){if(Ec(e)){let t=e,n=Ec(t)?t:e;switch(n.status){case`fulfilled`:return Ac(`Promise`,n.value,`Use`),n.value;case`rejected`:throw n.reason}throw Ac(`Unresolved`,n,`Use`),wc}if(`$$typeof`in e&&e.$$typeof===xc&&Oc(e)){let t={_currentValue:e._currentValue,displayName:typeof e.displayName==`string`?e.displayName:void 0},n=kc(t);return Ac(`Context (use)`,n,`Use`,t.displayName??`Context`),n}}throw new Qr(`use() received an unsupported value: `+String(e))},Mc=e=>{let t=kc(e);return Ac(`Context`,t,`Context`,e.displayName??null),t},Nc=e=>{let t=Tc(),n=t===null?typeof e==`function`?e():e:t.memoizedState;return Ac(`State`,n,`State`),[n,()=>{}]},Pc=(e,t,n)=>{let r=Tc(),i=r===null?n===void 0?t:n(t):r.memoizedState;return Ac(`Reducer`,i,`Reducer`),[i,()=>{}]},Fc=e=>{let t=Tc(),n=Dc(t?.memoizedState)?t.memoizedState:{current:e};return Ac(`Ref`,n.current,`Ref`),n},Ic=()=>{let e=Tc();return Ac(`CacheRefresh`,e===null?()=>{}:e.memoizedState,`CacheRefresh`),()=>{}},Lc=e=>{Tc(),Ac(`LayoutEffect`,e,`LayoutEffect`)},Rc=e=>{Tc(),Ac(`InsertionEffect`,e,`InsertionEffect`)},zc=e=>{Tc(),Ac(`Effect`,e,`Effect`)},Bc=e=>{Tc(),Ac(`ImperativeHandle`,Dc(e)?e.current:void 0,`ImperativeHandle`)},Vc=(e,t)=>{Ac(`DebugValue`,typeof t==`function`?t(e):e,`DebugValue`)},Hc=e=>{let t=Tc();return Ac(`Callback`,Array.isArray(t?.memoizedState)?t.memoizedState[0]:e,`Callback`),e},Uc=e=>{let t=Tc(),n=Array.isArray(t?.memoizedState)?t.memoizedState[0]:e();return Ac(`Memo`,n,`Memo`),n},Wc=(e,t)=>{let n=Tc();Tc();let r=n===null?t():n.memoizedState;return Ac(`SyncExternalStore`,r,`SyncExternalStore`),r},Gc=()=>{let e=Tc();Tc();let t=e?.memoizedState===!0;return Ac(`Transition`,t,`Transition`),[t,()=>{}]},Kc=e=>{let t=Tc(),n=t===null?e:t.memoizedState;return Ac(`DeferredValue`,n,`DeferredValue`),n},qc=()=>{let e=Tc(),t=typeof e?.memoizedState==`string`?e.memoizedState:``;return Ac(`Id`,t,`Id`),t},Jc=e=>[],Yc=e=>{let t=Tc(),n=t===null?e:t.memoizedState;return Ac(`Optimistic`,n,`Optimistic`),[n,()=>{}]},Xc=(e,t)=>{let n,r=null;if(e!==null){let t=e.memoizedState;if(Ec(t))switch(t.status){case`fulfilled`:n=t.value;break;case`rejected`:r=t.reason;break;default:r=wc,n=t}else n=t}else n=t;return{value:n,error:r}},Zc=e=>(t,n)=>{let r=Tc();Tc(),Tc();let{value:i,error:a}=Xc(r,n);if(Ac(e,i,e),a!==null)throw a;return[i,()=>{},!1]},Qc=Zc(`ActionState`),$c={readContext:kc,use:jc,useCallback:Hc,useContext:Mc,useEffect:zc,useImperativeHandle:Bc,useLayoutEffect:Lc,useInsertionEffect:Rc,useMemo:Uc,useReducer:Pc,useRef:Fc,useState:Nc,useDebugValue:Vc,useDeferredValue:Kc,useTransition:Gc,useSyncExternalStore:Wc,useId:qc,useHostTransitionStatus:()=>{let e=kc({_currentValue:null});return Ac(`HostTransitionStatus`,e,`HostTransitionStatus`),e},useFormState:Zc(`FormState`),useActionState:Qc,useOptimistic:Yc,useMemoCache:Jc,useCacheRefresh:Ic,useEffectEvent:e=>(Tc(),Ac(`EffectEvent`,e,`EffectEvent`),e)};new Proxy($c,{get(e,t){if(Object.hasOwn(e,t))return Reflect.get(e,t);throw new $r(`The React dispatcher is missing method `+t)}}),X();let el=e=>e===void 0||!Number.isFinite(e)?3:Math.max(0,Math.floor(e)),tl=/^(?:\.\/)?\/?\([a-z][a-z0-9-]*\)\//,nl=e=>{let t=yc(e);return t=t.replace(tl,``),t.startsWith(`./`)&&(t=t.slice(2)),t},rl=e=>{try{return decodeURIComponent(e)}catch{return e}},il=/(?:^|[/\\])node_modules[/\\]/,al=/[/\\]\.vite[/\\]deps[^/\\]*[/\\]/,ol=/\.[mc]?[jt]sx?$/i,sl=/^chunk-[A-Za-z0-9_-]+$/,cl=/[/\\]/,ll=/^(.+?)@v?\d/,ul=e=>e.split(cl).filter(Boolean),dl=e=>{let[t,n]=ul(e);return!t||t.startsWith(`.`)?null:t.startsWith(`@`)?n?`${t}/${n}`:null:t},fl=e=>{let t=ul(e)[0];if(!t)return null;let n=t.replace(ol,``);if(sl.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)}`},pl=(e,t,n)=>{let r=e.split(t);return r.length>1?n(r[r.length-1]):null},ml=e=>e?.match(ll)?.[1]??null,hl=e=>{let t;try{t=new URL(e)}catch{return null}if(!t.hostname)return null;let n=ul(t.pathname).map(rl);for(let[e,t]of n.entries()){if(t.startsWith(`@`)){let r=ml(n[e+1]);if(r)return`${t}/${r}`;continue}let r=ml(t);if(r)return r}return null},gl=e=>pl(e,al,fl)??pl(e,il,dl),_l=e=>{if(!e)return null;let t=yc(e);return t&&(gl(rl(t))||hl(e))||null},vl=/^@[A-Za-z0-9][A-Za-z0-9._-]*$/,yl=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,bl=new Set([`app`,`web`,`website`,`frontend`,`client`,`src`]),xl=new Set([`app`,`src`,`components`,`pages`,`features`,`modules`,`hooks`,`lib`,`utils`,`ui`,`shared`,`common`,`core`,`styles`,`assets`]),Sl=e=>{let t=e;for(;t.startsWith(`../`)||t.startsWith(`./`);)t=t.slice(t.startsWith(`../`)?3:2);return t},Cl=e=>{let t=Sl(rl(yc(e)));if(t.startsWith(`/`))return null;let[n,r,...i]=ul(t);return!n||!r||i.length===0||!vl.test(n)||xl.has(n.slice(1))||!yl.test(r)||ol.test(r)||bl.has(r)?null:`${n}/${r}`},wl=e=>e?_l(e)??Cl(e):null,Tl=e=>{if(!e)return{origin:`unknown`,packageName:null};let t=wl(e);return t?{origin:`package`,packageName:t}:bc(e)?{origin:`app`,packageName:null}:{origin:`unknown`,packageName:null}};X(),qa(),Hn(),aa();let El=new Set([`role`,`name`,`aria-label`,`rel`,`href`]),Dl=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},Ol=(e,t)=>{let n=El.has(e)||e.startsWith(`data-`)&&Dl(e),r=Dl(t)&&t.length<100||t.startsWith(`#`)&&Dl(t.slice(1));return n&&r},kl=e=>{let t=e[0].name;for(let n=1;n<e.length;n++)t=`${e[n].name} > ${t}`;return t},Al=e=>{let t=0;for(let n of e)t+=n.penalty;return t},jl=(e,t)=>Al(e)-Al(t),Ml=(e,t)=>{let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let i=0;for(;r&&(Vn(r)&&(t===void 0||r.tagName.toLowerCase()===t)&&i++,r!==e);)r=r.nextSibling;return i},Nl=(e,t)=>e===`html`?`html`:`${e}:nth-child(${t})`,Pl=(e,t)=>e===`html`?`html`:`${e}:nth-of-type(${t})`,Fl=(e,t)=>{let n=[],r=e.getAttribute(`id`),i=e.tagName.toLowerCase();r&&Dl(r)&&n.push({name:`#${CSS.escape(r)}`,penalty:0});for(let t of e.classList)Dl(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=Ml(e,i);a!==void 0&&n.push({name:Pl(i,a),penalty:10});let o=Ml(e);return o!==void 0&&n.push({name:Nl(i,o),penalty:50}),n},Il=(e,t=sn,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(...Il(e.slice(1),a,[...n,i]))}return r},Ll=(e,t)=>{let n=t.getRootNode();return ia(n)?n:Ka(e)?e:e.ownerDocument},Rl=(e,t)=>t.querySelectorAll(kl(e)).length===1,zl=(e,t)=>{let n=e,r=[];for(;n&&n!==t;){let e=n.tagName.toLowerCase(),t=Ml(n,e);if(t===void 0)return;r.push({name:Pl(e,t),penalty:10}),n=n.parentElement}return Rl(r,t)?r:void 0},Bl=(e,t,n,r)=>{if(e.nodeType!==Node.ELEMENT_NODE)throw new Da;if(e.tagName.toLowerCase()===`html`)return`html`;let i=Ll(t,e),a=Date.now(),o=[],s=e,c=0,l;for(;s&&s!==i&&!l;)if(o.push(Fl(s,r)),s=s.parentElement,c++,c>=3){let t=Il(o);t.sort(jl);for(let r of t){if(Date.now()-a>n){let t=zl(e,i);if(!t)throw new Oa(n);return kl(t)}if(Rl(r,i)){l=r;break}}}if(!l&&c<3){let e=Il(o);e.sort(jl);for(let t of e){if(Date.now()-a>n)break;if(Rl(t,i)){l=t;break}}}if(!l)throw new ka;return kl(l)};X();let Vl=/^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i,Hl=/:r[a-z0-9]+:/i,Ul=/_r_[a-z0-9]+_(?:$|-)/i,Wl=/«r[a-z0-9]+»/i,Gl=/^(?:downshift-\d+(?:-|$)|headlessui-[a-z-]+-\d+(?:-|$)|mui-\d+(?:-|$)|radix-\d+(?:-|$)|react-aria-\d+(?:-|$)|react-select-\d+(?:-|$))/i,Kl=/^ember\d+$/i,ql=/^\d+$/,Jl=e=>e.length>0&&e.length<=120&&!Hl.test(e)&&!Vl.test(e)&&!Ul.test(e)&&!Wl.test(e)&&!Gl.test(e)&&!Kl.test(e)&&!ql.test(e),Yl=new Set([`data-testid`,`data-test-id`,`data-test`,`data-cy`,`data-qa`,`aria-label`,`href`,`src`,`role`,`name`,`title`,`alt`]),Xl=new Set([`button`,`link`,`checkbox`,`radio`,`switch`,`tab`,`menuitem`,`option`,`textbox`,`combobox`,`slider`,`spinbutton`]);X(),er(),aa(),Hn(),Ji();let Zl=e=>e.ownerDocument.body??e.ownerDocument.documentElement,Ql=e=>e.length>0&&e.length<=120,$l=(e,t)=>Yl.has(e)&&Ql(t)&&(e!==`role`||t.split(/\s+/).some(e=>Xl.has(e))),eu=(e,t)=>{try{let n=e.getRootNode(),r=(ia(n)?n:e.ownerDocument).querySelectorAll(t);return r.length===1&&r[0]===e}catch{return!1}},tu=e=>{let t=e.getAttribute(`id`),n=null;if(t){let r=`#${CSS.escape(t)}`;if(eu(e,r)){if(Jl(t))return{selector:r,isSemantic:!0};n=r}}for(let t of Yl){let n=e.getAttribute(t);if(!n||!$l(t,n))continue;let r=`[${t}=${JSON.stringify(n)}]`;if(eu(e,r))return{selector:r,isSemantic:!0};let i=`${e.tagName.toLowerCase()}${r}`;if(eu(e,i))return{selector:i,isSemantic:!0}}return n?{selector:n,isSemantic:!1}:null},nu=e=>{let t=[],n=e.getRootNode(),r=ia(n)?n:Zl(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){Vn(r)&&t.unshift(r.tagName.toLowerCase());break}i=Vn(n)?n:null}return t.join(` > `)},ru=e=>{let t=tu(e);if(t)return t;try{let t=Bl(e,Zl(e),200,(e,t)=>Ol(e,t)||$l(e,t));if(t)return{selector:t,isSemantic:!1}}catch{}return{selector:nu(e),isSemantic:!1}},iu=e=>{let t=Ki(e);if(t)return{selector:t.getSelector(),isSemantic:!0};let n=tu(e);if(!n?.isSemantic)return null;let r=e.getRootNode();if(ia(r)){let e=iu(r.host);return e?{selector:`${e.selector} >>> ${n.selector}`,isSemantic:!0}:null}let i=$n(e.ownerDocument.defaultView);if(!i)return n;let a=iu(i);return a?{selector:`${a.selector} >>iframe>> ${n.selector}`,isSemantic:!0}:null},au=e=>{let t=Ki(e);if(t)return{selector:t.getSelector(),isSemantic:!0};let n=ru(e),r=e.getRootNode();if(ia(r)){let e=au(r.host);return{selector:`${e.selector} >>> ${n.selector}`,isSemantic:e.isSemantic&&n.isSemantic}}let i=$n(e.ownerDocument.defaultView);if(!i)return n;let a=au(i);return{selector:`${a.selector} >>iframe>> ${n.selector}`,isSemantic:a.isSemantic&&n.isSemantic}},ou=e=>au(e).selector;X(),Ya();let su=[...Array.from(Yl).filter(e=>e!==`role`).map(e=>`[${e}]`),...Array.from(Xl).map(e=>`[role~="${e}"]`)].join(`,`),cu=[`button`,`input`,`select`,`textarea`].join(`,`),lu=e=>{let t=e.getAttribute(`id`);return!!(t&&Jl(t)||e.matches(su))},uu=e=>lu(e)||e.matches(cu),du=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>=cn},fu=(e,t)=>{let n=e.getRootNode(),r=e;for(;r;){let i=uu(r),a=i&&du(r);if(i){if(a&&r!==e)return e;if(!t||t(r)||a||!lu(r)&&r===e)return r}let o=Ja(r);r=o?.getRootNode()===n?o:null}return e};Ji();let pu=e=>{if(Ki(e))return iu(e);let t=null;return fu(e,e=>{let n=iu(e);return n?(t=n,!0):!1}),t},mu=[/\/assets\/[^/?#]+-[a-z0-9_-]{6,}\.(?:c|m)?js(?:[?#]|$)/,/\/_next\/static\/.*\.(?:c|m)?js(?:[?#]|$)/,/\/static\/chunks\/.*\.(?:c|m)?js(?:[?#]|$)/],hu=e=>{if(!e)return!1;let t=`/${nl(e)}`.toLowerCase();return mu.some(e=>e.test(t))};X();let gu=e=>{if(!e)return!1;let t=`/${nl(e)}/`.toLowerCase();return rn.some(e=>t.includes(e))},_u,vu=(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}})},yu=()=>Array.from(document.scripts).some(e=>e.textContent?.includes(`self.__next_f.push`)),bu=e=>(e&&(_u=void 0),_u??=typeof document<`u`&&!!(document.getElementById(`__NEXT_DATA__`)||document.querySelector(`nextjs-portal`)||vu()||yu()&&vu(!0)),_u),xu=e=>e.map(e=>`\n in ${e}`).join(``),Su,Cu=()=>{if(Su!==void 0)return Su;let e=document.querySelector(`script[src*="/_next/"]`)?.src,t=e?new URL(e).pathname:``,n=t.indexOf(`/_next/`);return Su=n>0?t.slice(0,n):``,Su};Ui(),X();let wu=[`about://React/`,`rsc://React/`],Tu=e=>wu.some(t=>e.startsWith(t)),Eu=e=>{for(let t of wu){if(!e.startsWith(t))continue;let n=e.indexOf(`/`,t.length);if(n===-1)continue;let r=n+1,i=e.lastIndexOf(`?`);return rl(i>r?e.slice(r,i):e.slice(r))}return e},Du=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}},Ou=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:Eu(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(),an),o=()=>i.abort();t?.aborted&&i.abort(),t?.addEventListener(`abort`,o);try{let t=await fetch(`${Cu()}/__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=Du(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)}},ku=e=>{let t=new Map;return Ar(e,e=>{if(!Vs(e))return!1;let n=$s(e._debugStack.stack);if(!n)return!1;for(let e of Eo(n))!e.functionName||!e.fileName||Tu(e.fileName)&&(t.has(e.functionName)||t.set(e.functionName,{...e,isServer:!0}));return!1},!0),t},Au=(e,t)=>{if(!t.some(e=>e.isServer&&!e.fileName&&e.functionName))return t;let n=ku(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})};X();let ju=0,Mu=[],Nu=e=>e?.aborted?Promise.resolve(!1):ju<3?(ju+=1,Promise.resolve(!0)):new Promise(t=>{let n={abortSignal:e,resolve:t};e&&(n.handleAbort=()=>{let e=Mu.indexOf(n);e!==-1&&(Mu.splice(e,1),t(!1))},e.addEventListener(`abort`,n.handleAbort,{once:!0})),Mu.push(n)}),Pu=()=>{let e=Mu.shift();if(e){e.abortSignal&&e.handleAbort&&e.abortSignal.removeEventListener(`abort`,e.handleAbort),e.resolve(!0);return}--ju},Fu=async(e,t,n=on,r)=>{if(!await Nu(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),Pu()}};var Iu,Lu=n((()=>{Iu=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}));Lu();let Ru=e=>Iu(e).replace(/"/g,`"`).replace(/\r/g,` `).replace(/\n/g,` `).replace(/\t/g,`	`),zu=(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)},Bu=e=>e.startsWith(`data-react-grab-`);X(),Hn();let Vu=e=>e.replace(/\s+/g,` `).trim(),Hu=e=>{let t=[];for(let n of e.childNodes){if(n.nodeType!==Node.TEXT_NODE)continue;let e=Vu(n.textContent??``);e&&t.push(e)}return t.join(` `)},Uu=e=>e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`hidden`)?!0:Cn.has(e.tagName.toLowerCase()),Wu=(e,t,n)=>{if(e.nodeType===Node.TEXT_NODE){let r=Vu(e.textContent??``);return r?(t.push(r),n-r.length):n}if(!Vn(e)||Uu(e))return n;for(let r of e.childNodes)if(n=Wu(r,t,n),n<=0)break;return n},Gu=(e,t)=>{if(Uu(e))return``;let n=Hu(e);if(!Sn.has(t)||n&&e.children.length===0)return n;let r=[];return Wu(e,r,100),r.join(` `)};X(),Lu(),Na(),Hn(),Wn(),Ji();let Ku=(e,t,n)=>`${e}="${zu(Ru(t),n)}"`,qu=e=>{let t=[];for(let n of bn){if(t.length>=8)break;let r=e.getAttribute(n);if(!r)continue;let i=n===`class`?15:120;t.push(Ku(n,r,i))}return t},Ju=e=>{let t=qu(e);return t.length>0?` ${t.join(` `)}`:``},Yu=e=>e===`class`||e===`className`||e===`style`,Xu=e=>{let t=qu(e).map(e=>` ${e}`),n=[],r=[];for(let{name:t,value:i}of e.attributes)Bu(t)||bn.includes(t)||Yu(t)||(xn.has(t)?n.push(i?` ${Ku(t,i,120)}`:` ${t}`):i&&r.push(` ${Ku(t,i,15)}`));return[...t,...n,...r].slice(0,8).join(``)},Zu=e=>e.length===0?``:e.length<=2?e.map(e=>`<${Ma(e)} ...>`).join(`
|
|
21
|
+
`):`(${e.length} elements)`,Qu=e=>{let t=Ki(e);if(t)return t.getPreview();let n=Ma(e);if(!Un(e)){let t=Ju(e),r=zu(Iu(Gu(e,n)),100);return r?`<${n}${t}>${r}</${n}>`:`<${n}${t} />`}let r=Xu(e),i=zu(Iu(Gu(e,n)),100);return i?`<${n}${r}>${i}</${n}>`:`<${n}${r} />`},$u=e=>{let t=Ki(e);if(t)return t.getPreview();let n=Ma(e),r=Xu(e),i=Gu(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):Vn(t)&&(s?o.push(t):a.push(t)));let c=i.length>0&&Sn.has(n),l=``,u=Zu(a);u&&!c&&(l+=`\n ${u}`),i&&(l+=`\n ${zu(Iu(i),100)}`);let d=Zu(o);return d&&!c&&(l+=`\n ${d}`),l.length>0?`<${n}${r}>${l}\n</${n}>`:`<${n}${r} />`},ed=new Set([`_`,`$`,`motion.`,`styled.`,`chakra.`,`ark.`,`Primitive.`,`Slot.`]),td=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(`.`)),nd=new Set([`<anonymous>`,`<unknown>`,`Anonymous`,`Unknown`]),rd=new Set([`Suspense`,`Fragment`,`StrictMode`,`Profiler`,`SuspenseList`]),id=new Set([`MotionDOMComponent`,`Slot`,`SlotClone`]),ad=[`.Consumer`,`.Context`,`.Provider`,`.Slot`,`.SlotClone`,`.Slottable`,`ProviderProvider`],od=(e,t=!1)=>{if(nd.has(e)||t&&td.has(e)||rd.has(e)||id.has(e))return!0;for(let t of ad)if(e.endsWith(t))return!0;for(let t of ed)if(e.startsWith(t))return!0;return!1},sd=(e,t=!1)=>!(!e||od(e,t)),cd=(e,t)=>e||t.isSemantic,ld=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}},ud=(e,t)=>e.length>t?`${e.slice(0,t)}...`:e;X();let dd=e=>JSON.stringify(ud(e,120)),fd=(e,t,n)=>{e.get(t)===n&&e.delete(t)};X();let pd=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()};Ui(),X(),aa(),Ji();let md=(e,t)=>!(e.length<=1||od(e,t)||e[0]!==e[0].toUpperCase()),hd=(e,t)=>e&&md(e,t)?e:null,gd=e=>!gu(e)&&!hu(e),_d=e=>{if(!mi())return e;let t=e;for(;t?.ownerDocument===e.ownerDocument;){if(qi(t))return t;if(t.parentElement){t=t.parentElement;continue}let e=t.getRootNode();t=ia(e)?e.host:null}return e},vd=e=>{let t=e.return?.child??null;for(;t;){if(t!==e&&t.key!==null)return!0;t=t.sibling}return!1},yd=e=>{let t=e,n=0;for(;t;){if(t.key!==null&&vd(t))return String(t.key);if(oi(t)&&(n+=1,n===2))break;t=t.return}return null},bd=e=>{if(!mi())return null;let t=qi(_d(e));return yd(t?_i(t):null)},xd=new WeakMap,Sd=new WeakMap,Cd=e=>{let t=_d(e),n=qi(t);if(!n)return null;let r=_i(n);return{element:t,fiber:r,revision:ld(r)}},wd=(e,t)=>{let n=Cd(e);return!!(n&&n.element===t.element&&t.revision.matches(n.fiber))},Td=(e,t,n)=>pd(()=>{let t=Cd(e);return t?{isCurrent:()=>wd(e,t),valuePromise:n(t)}:null},t),Ed=e=>t=>fetch(t,{signal:e,priority:`high`}),Dd=(e,t)=>Fu(async t=>{try{let n=await dc(e,!0,Ed(t));return bu()?await Ou(Au(e,n),t):n}catch{return null}},null,void 0,t),Od=e=>{if(!mi())return Promise.resolve([]);let t=xd.get(e.element);if(t?.revision.matches(e.fiber))return t.promise;let n=new AbortController,r=Dd(e.fiber,n.signal);if(!wd(e.element,e))return r;let i={controller:n,promise:r,revision:e.revision};return xd.set(e.element,i),t?.controller.abort(),i.promise.then(t=>{t===null&&fd(xd,e.element,i)}),i.promise},kd=e=>mi()?Td(e,()=>null,Od):Promise.resolve([]),Ad=async e=>{if(!mi())return null;let t=bu(),n=hd(Ki(e)?Rd(e):null,t);if(n)return n;let r=await kd(e);if(!r)return null;for(let e of r){let n=hd(e.functionName,t);if(n)return n}return null},jd=e=>e[0]??null,Md=(e,t)=>!ri(e)||!oi(e)?null:hd(pi(e.type),t),Nd=(e,t)=>Fu(async t=>{try{let n=await gc(e,!0,Ed(t));if(!n?.fileName)return null;let r=bu();return{filePath:nl(n.fileName),lineNumber:n.lineNumber??null,columnNumber:n.columnNumber??null,componentName:hd(n.functionName,r)??Md(e._debugOwner,r),origin:Tl(n.fileName).origin}}catch{return null}},null,void 0,t),Pd=e=>{let t=Sd.get(e.element);if(t?.revision.matches(e.fiber))return t.promise;let n=new AbortController,r=Nd(e.fiber,n.signal);if(!wd(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||fd(Sd,e.element,i)}),i.promise},Fd=async e=>{let[t,n]=await Promise.all([Pd(e),Od(e)]);return{fiber:e.fiber,fiberSource:t,stack:n}},Id=(e,t)=>{let n=bu(),r=(e,t)=>{let r=jd(e);return r?.fileName?{filePath:nl(r.fileName),lineNumber:r.lineNumber??null,columnNumber:r.columnNumber??null,componentName:hd(r.functionName,n),origin:t}:null},i=t.filter(e=>Tl(e.fileName).origin===`app`),a=i.filter(e=>gd(e.fileName));return e?.origin===`app`&&gd(e.filePath)?e:r(a,`app`)||(e?.origin===`app`&&!hu(e.filePath)?e:r(i,`app`)||(e?.origin===`app`||e?.origin===`package`?e:r(t.filter(e=>Tl(e.fileName).origin===`package`),`package`)))},Ld=async e=>Td(e,()=>null,async e=>{let t=await Pd(e);return t?.origin===`app`&&gd(t.filePath)?t:Id(t,await Od(e)??[])}),Rd=e=>zd(_d(e),1)[0]??null,zd=(e,t,n=()=>!0)=>{if(!mi())return[];let r=qi(e);if(!r)return[];let i=bu(),a=[];return Ar(_i(r),e=>{if(a.length>=t)return!0;if(oi(e)){let t=pi(e.type);t&&sd(t,i)&&n(t)&&a.push(t)}return!1},!0),a},Bd=[`/src/app/`,`/src/pages/`,`/app/`,`/pages/`],Vd=(e,t)=>{let n=nl(e);if(!t||!n.startsWith(`/`))return n;for(let e of Bd){let t=n.indexOf(e);if(t!==-1)return`/./${n.slice(t+1)}`}return n},Hd=(e,t)=>{let n=Vd(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}`},Ud={isAppSource:!1,consumesBudget:!1},Wd=(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})`,...Ud}}return!a&&n?{text:i?`\n in ${n} (${i})`:`\n in ${n}`,...Ud}:i?{text:`\n in ${i}`,...Ud}:a?{text:Hd({componentName:n,filePath:a,lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null},r),isAppSource:!0,consumesBudget:gd(a)}:null},Gd=(e,t={},n=null)=>{let r=el(t.maxLines),i=Math.max(r,20),a=bu(),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`&&gd(n.filePath);u=e,e&&(f+=1),p(n.componentName),o.push(Hd(n,a))}for(let t of e){if(!r||o.length>=i)break;let e=Tl(t.fileName),s=hd(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=Wd(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)}},Kd=(e,t)=>{let n=Id(e,t);return n?.origin===`app`?n:null},qd=(e,t,n)=>{let r=Math.min(n,t.remainingHardLineCapacity);if(r===0)return t;let i=bu(),a=zd(_d(e),r,e=>md(e,i)&&!t.renderedComponentNames.has(e));return a.length===0?t:{...t,text:`${t.text}${xu(a)}`,remainingHardLineCapacity:t.remainingHardLineCapacity-a.length}},Jd=(e,t,n)=>{let r=n.stack??[],i=Kd(n.fiberSource,r),a=el(t.maxLines),o=Gd(r,t,i);if(o.text)return o.hasBudgetedStackFrame?o:qd(e,o,a);let s=zd(_d(e),a),c=Math.max(a,20);return{text:xu(s),shouldAppendSelectorHint:!0,hasBudgetedStackFrame:!1,renderedComponentNames:new Set(s),remainingHardLineCapacity:Math.max(0,c-s.length)}},Yd=(e,t={})=>Td(e,()=>Jd(e,t,{fiber:null,fiberSource:null,stack:[]}),async n=>Jd(e,t,await Fd(n))),Xd=async(e,t={})=>(await Yd(e,t)).text,Zd=(e,t)=>{let n=bd(e),r=n===null?``:`\n key: ${dd(n)}`,i=t.shouldAppendSelectorHint?au(fu(e)):pu(e),a=i&&cd(t.shouldAppendSelectorHint,i)?i.selector:null,o=a?`\n selector: ${a}`:``;return{selector:a,text:`${t.text}${r}${o}`}},Qd=async(e,t={})=>{let n=_d(e);return`${$u(n)}${Zd(n,await Yd(n,t)).text}`},$d=(e,t,n)=>{let r=t.stack??[],i=Id(t.fiberSource,r);return{componentName:Rd(e),fiber:t.fiber,source:i,stack:r,stackContext:n.text}},ef=(e,t,n)=>{let r=Jd(e,t,n),i=Zd(e,r);return{...$d(e,n,r),referenceContext:`${Qu(e)}${i.text.replace(/\n\s+/g,` `)}`}},tf=(e,t,n)=>Td(e,()=>n(e,t,{fiber:null,fiberSource:null,stack:[]}),async r=>n(e,t,await Fd(r))),nf=(e,t={})=>tf(e,t,ef);z();let rf=e=>{let[t,n]=c(void 0),r=0;return d(_(e,e=>{let t=++r;if(!e){n(void 0);return}let i=Rd(e)??void 0;n(i),Ad(e).then(e=>{r===t&&n(e??i)}).catch(()=>{r===t&&n(i)})})),[t,n]};var af,of,sf,cf,lf,uf,df=n((()=>{af=typeof window<`u`,of=e=>0,sf=e=>{},cf=af?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):of,lf=af?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):sf,uf=()=>af?new Promise(e=>cf(()=>e())):Promise.resolve()}));df();let ff=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,pf=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),mf=(e,t,n,r=1)=>{let i=pf(e),a=pf(t),o=pf(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${pf(r*255)}`},hf=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}},gf=e=>{let t=e.match(ff);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 mf(Number(t[1]),Number(t[2]),Number(t[3]),n)},_f=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,vf=e=>{let t=e.match(_f);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}`},yf=`rgba(0, 0, 0, 0)`,bf=`#00000000`,xf=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,Sf=180/Math.PI,Cf=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),wf=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*Sf:t===`turn`?n*360:n},Tf=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},Ef=e=>{let t=e.match(xf);if(!t)return null;let n=Cf(t[1],1),r=Cf(t[2],.4),i=wf(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:Cf(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 mf(Tf(m),Tf(h),Tf(g),Math.max(0,Math.min(1,a)))},Df=null,Of=()=>Df||(typeof document>`u`?null:(Df=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),Df)),kf=(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?bf:mf(n[0],n[1],n[2],n[3]/255)},Af=e=>{let t=e.trim();if(!t)return null;if(t.toLowerCase()===`transparent`)return bf;let n=vf(t);if(n)return n;let r=Ef(t);if(r)return r;let i=Of();if(!i)return null;i.fillStyle=yf,i.fillStyle=t;let a=i.fillStyle;return typeof a==`string`?a.toLowerCase()===yf?t.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?bf:null:a.startsWith(`#`)&&a.length===7?a:a.startsWith(`rgb`)?gf(a):kf(i,t):null};X();let jf=[`data-theme`,`data-mode`,`data-color-scheme`,`data-bs-theme`,`data-mui-color-scheme`,`data-mantine-color-scheme`],Mf=[{attribute:`data-dark`,theme:`dark`},{attribute:`data-light`,theme:`light`}],Nf=(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},Pf=(e,t=0)=>{let n=Af(e),r=n?hf(n):null;return!r||r.alpha<=t?null:Nf(r.red,r.green,r.blue)},Ff=e=>{let t=Pf(e);return t===null?null:t<.18?`dark`:`light`},If=e=>Ff(getComputedStyle(e).backgroundColor),Lf=()=>{let e=Pf(getComputedStyle(document.documentElement).color,kn);return e===null?null:e>.6?`dark`:null},Rf=()=>{let e=document.createElement(`div`);e.style.cssText=`position:fixed;width:0;height:0;background-color:Canvas!important`,document.documentElement.appendChild(e);let t=Ff(getComputedStyle(e).backgroundColor);return e.remove(),t},zf=e=>{let t=e.toLowerCase();return t===`dark`?`dark`:t===`light`?`light`:null},Bf=e=>{let t=e.style.colorScheme||getComputedStyle(e).colorScheme;return t?t.trim().toLowerCase().split(/\s+/):[]},Vf=e=>{let t=Bf(e),n=t.includes(`dark`);return n===t.includes(`light`)?null:n?`dark`:`light`},Hf=e=>{if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of jf){let n=e.getAttribute(t);if(!n)continue;let r=zf(n);if(r)return r}for(let{attribute:t,theme:n}of Mf)if(e.hasAttribute(t))return n;return null},Uf=(e,t)=>{for(let n of e){if(!n)continue;let e=t(n);if(e)return e}return null},Wf=()=>{let e=[document.documentElement,document.body],t=[document.body,document.documentElement];return Uf(e,Hf)??Uf(e,Vf)??Uf(t,If)??Lf()??Rf()??`light`},Gf=e=>e===`dark`?`light`:`dark`,Kf=()=>{let e=[];for(let t of[document.documentElement,document.body]){if(!t)continue;e.push(t.className);for(let n of jf)e.push(t.getAttribute(n)??``);for(let{attribute:n}of Mf)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(`|`)},qf={attributes:!0,attributeFilter:[`class`,`style`,...jf,...Mf.map(({attribute:e})=>e)]},Jf=(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=Gf(Wf());return a!==n&&(n=a,e.setAttribute(`data-rg-theme`,a),t?.(a)),a},o=()=>a(Kf()),s=()=>{i!==null&&(lf(i),i=null)},c=()=>{i===null&&(i=cf(()=>{i=null,o()}))},l=o(),u=()=>{let e=Kf();if(e===r){c();return}s(),a(e)},d=new MutationObserver(u);d.observe(document.documentElement,qf);let f=null;document.body?d.observe(document.body,qf):(f=new MutationObserver((e,t)=>{document.body&&(t.disconnect(),f=null,d.observe(document.body,qf),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()}}},Yf=()=>{},Xf=()=>({activate:Yf,deactivate:Yf,toggle:Yf,comment:Yf,isActive:()=>!1,isEnabled:()=>!1,setEnabled:Yf,getToolbarState:()=>null,setToolbarState:Yf,onToolbarStateChange:()=>Yf,reset:Yf,dispose:Yf,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:Yf,registerPlugin:Yf,unregisterPlugin:Yf,getPlugins:()=>[],getDisplayName:()=>null}),Zf=()=>{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 Qf,$f,ep=n((()=>{X(),Lu(),ro(),Qf=`application/x-react-grab`,$f=(e,t)=>{let n=t?.componentName??`div`,r={version:Zt,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>${Iu(e)}</code></pre>`),t.clipboardData?.setData(Qf,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()}}}));ep();let tp=(e,t=`Unknown error`)=>e instanceof Error&&e.message?e.message:t,np=e=>e instanceof Error?e:Error(String(e)),rp=Symbol(`aborted-promise-result`),ip=async(e,t)=>{if(!t)return e;if(t.aborted)return rp;let n=()=>{},r=new Promise(e=>{n=()=>e(rp)});t.addEventListener(`abort`,n,{once:!0});try{return await Promise.race([e,r])}finally{t.removeEventListener(`abort`,n)}};Na();let ap={status:`cancelled`},op=e=>({functionName:e.functionName,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,isServer:e.isServer,isSymbolicated:e.isSymbolicated}),sp=async(e,t)=>{let n=await nf(e,{maxLines:t});return{tagName:Ma(e),componentName:n.componentName??n.source?.componentName??void 0,content:`[${n.referenceContext}]`,source:n.source,stackContext:n.stackContext,frames:n.stack.map(op)}},cp=async(e,t)=>{let n=[...new Set(e)],r=await Promise.all(n.map(e=>sp(e,t)));return r.length>0?{content:r.map(e=>e.content).join(`
|
|
22
|
+
`),entries:r}:null},lp=(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}))},up=async(e,t,n,r)=>{if(e.signal?.aborted||await ip(t.onBeforeCopy(n),e.signal)===rp)return ap;let i=!1,a=!1,o=``;try{let s=await ip(e.getContent?Promise.resolve(e.getContent(n)).then(e=>({content:e})):cp(n,e.maxContextLines),e.signal);if(s===rp)return ap;let c=s?.content;if(c?.trim()){let l=await ip(t.transformCopyContent(c,n),e.signal);if(l===rp)return ap;o=r?`${r}\n${l}`:l,o.trim()&&(a=!0,i=$f(o,{componentName:e.componentName,entries:lp(s,o,r)}))}}catch(n){if(!a&&e.signal?.aborted)return ap;t.onCopyError(np(n))}return!a&&e.signal?.aborted?ap:(i&&t.onCopySuccess(n,o,{prompt:r}),t.onAfterCopy(n,i),{status:i?`succeeded`:`failed`})};var dp,fp=n((()=>{dp=e=>{try{return e.contentDocument}catch{return null}}})),pp,mp=n((()=>{Xn(),Qn(),pp=(e,t,n)=>{let r=e.getBoundingClientRect(),i=Yn(e),a=Zn(r.width,i.width),o=Zn(r.height,i.height);return{x:(t-r.left)/a-i.contentOffsetX,y:(n-r.top)/o-i.contentOffsetY}}})),hp,gp,_p=n((()=>{mp(),fp(),Kn(),hp=(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(Gn(r)){let e=dp(r);if(!e)return r;let i=pp(r,t,n);return hp(e,i.x,i.y)??r}return r}return null},gp=(e,t)=>hp(document,e,t)})),vp,yp=n((()=>{X(),Ya(),vp=e=>{let t=e;for(;t;){if(t.hasAttribute(`data-react-grab-ignore`))return!0;t=Ja(t)}return!1}})),bp,xp,Sp,Cp,wp=n((()=>{ir(),bp=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,xp={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},Sp={checkVisibilityCSS:!0,visibilityProperty:!0},Cp=(e,t)=>{if(bp&&!t)return e.checkVisibility(xp)?!0:e.checkVisibility(Sp)?rr(e).opacity!==`0`:!1;let n=t??rr(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`}})),Tp,Ep=n((()=>{Na(),Tp=e=>{let t=Ma(e);return t===`html`||t===`body`}})),Dp,Op,kp=n((()=>{Dp=[`data-react-grab`,`data-react-grab-demo`],Op=e=>Dp.some(t=>e.hasAttribute(t))})),Ap,jp=n((()=>{X(),kp(),aa(),Ap=e=>{if(Op(e)||e.hasAttribute(`data-react-grab-hit-test-shield`))return!0;let t=e.getRootNode();return ia(t)&&Op(t.host)}})),Mp,Np,Pp,Fp,Ip,Lp,Rp=n((()=>{X(),wp(),Ep(),ir(),jp(),yp(),Ji(),Mp=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},Np=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},Pp=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(Np(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3},Fp=new WeakMap,Ip=()=>{Fp=new WeakMap},Lp=e=>{let t=Ki(e);if(t)return t.isConnected();if(Tp(e)||Ap(e)||vp(e))return!1;let n=performance.now(),r=Fp.get(e);if(r&&n-r.timestamp<50)return r.isVisible;if(!Cp(e))return Fp.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=rr(e);if(Mp(t)||Pp(t))return!1}return Fp.set(e,{isVisible:!0,timestamp:n}),!0}})),zp,Bp=n((()=>{zp=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}})),Vp,Hp=n((()=>{Bp(),Vp=e=>{let t=e.ownerDocument.defaultView?.getComputedStyle?.(e);if(!t)return!1;let n=t.backgroundClip!==`text`&&(t.backgroundImage!==`none`||!zp(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`}})),Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp=n((()=>{X(),nr(),Hp(),Hn(),Wn(),Up=new Set([`A`,`AUDIO`,`BUTTON`,`CANVAS`,`DETAILS`,`EMBED`,`IFRAME`,`IMG`,`INPUT`,`METER`,`OBJECT`,`OPTION`,`PROGRESS`,`SELECT`,`SUMMARY`,`SVG`,`TEXTAREA`,`VIDEO`]),Wp=new Set([`button`,`checkbox`,`combobox`,`gridcell`,`link`,`listbox`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`scrollbar`,`searchbox`,`slider`,`spinbutton`,`switch`,`tab`,`textbox`,`treeitem`]),Gp=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(`.`)),Kp=new WeakMap,qp=new WeakMap,Jp=()=>{Kp=new WeakMap,qp=new WeakMap},Yp=(e,t,n)=>(Kp.set(e,t),qp.set(e,n),t),Xp=e=>Up.has(e.tagName)||Wp.has(e.getAttribute(`role`)??``)||Un(e)&&e.isContentEditable,Zp=e=>{let t=performance.now(),n=qp.get(e);if(n!==void 0&&t-n<16)return Kp.get(e)??null;if(Xp(e)||e.childNodes.length>64)return Yp(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 Yp(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 Yp(e,null,t);continue}if(!Vn(n)||!Gp.has(n.tagName)||a+i.length+n.childNodes.length>64)return Yp(e,null,t);for(let e=n.childNodes.length-1;e>=0;--e)i.push(n.childNodes[e])}}if(r.length===0||Vp(e))return Yp(e,null,t);try{let n=e.ownerDocument.createRange(),i=tr(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 Yp(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 Yp(e,a.length>0?a:null,t)}catch{return Yp(e,null,t)}}})),$p,em=n((()=>{Qp(),$p=(e,t,n)=>{let r=Zp(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}})),tm,nm,rm=n((()=>{mp(),fp(),Kn(),yp(),Rp(),em(),ro(),tm=(e,t,n,r,i)=>{let a=!0;for(let o of e.elementsFromPoint(t,n)){if(vp(o)&&(a=!1),!to(o))continue;let s=o.shadowRoot;if(a&&s&&s!==e){let e=tm(s,t,n,r,i);if(e)return e}if(a&&Gn(o)){let e=dp(o);if(e){let a=pp(o,t,n),s=tm(e,a.x,a.y,r,i);if(s)return s}}if(Lp(o)&&$p(o,r,i))return o}return null},nm=(e,t)=>tm(document,e,t,e,t)})),im,am,om=n((()=>{mp(),fp(),Kn(),yp(),im=(e,t,n,r)=>{let i=e.elementsFromPoint(t,n),a=!0;for(let o of i){if(vp(o)&&(a=!1),a&&o.shadowRoot&&o.shadowRoot!==e&&im(o.shadowRoot,t,n,r),a&&Gn(o)){let e=dp(o);if(e){let i=pp(o,t,n);im(e,i.x,i.y,r)}}r.add(o)}},am=(e,t)=>{let n=new Set;return im(document,e,t,n),[...n]}})),sm,cm=n((()=>{mp(),er(),Kn(),sm=(e,t,n)=>{let r=[],i=e;for(;i&&i!==window;){let e=$n(i);if(!e||!Gn(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=pp(r[e],a,o);a=t.x,o=t.y}return{x:a,y:o}}})),lm,um,dm,fm,pm=n((()=>{cm(),ir(),Hn(),Ep(),aa(),lm=`http://www.w3.org/2000/svg`,um=e=>{if(e.localName===`svg`)return e;let t=e,n=e.parentElement;for(;n?.namespaceURI===lm&&(t=n,n.localName!==`svg`);)n=n.parentElement;return t},dm=(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},fm=(e,t,n)=>{if(Tp(e))return null;let r=e.ownerDocument,i=r.defaultView;if(!i)return null;let a=sm(i,t,n),o=e.getRootNode(),s=dm(r,a.x,a.y,ia(o)?o:null);if(!s)return null;let c=Vn(s)?s:s.parentElement;if(!c||c===e)return null;let l=e.namespaceURI===lm;return!(l?um(e):e).contains(c)||!l&&rr(c).pointerEvents!==`none`?null:c}})),mm,hm=n((()=>{mm=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom})),gm,_m,vm,ym=n((()=>{X(),Ya(),gm=new Set([`auto`,`scroll`,`overlay`]),_m=(e,t,n,r,i)=>gm.has(e)?i<0?t>1:t+n<r-1:!1,vm=(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&&_m(a.overflowY,r.scrollTop,r.clientHeight,r.scrollHeight,n)||i&&_m(a.overflowX,r.scrollLeft,r.clientWidth,r.scrollWidth,t))return r}r=Ja(r)}return null}})),bm,xm=n((()=>{bm=(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}})),Sm,Cm,wm,Tm,Em,Dm=n((()=>{X(),ym(),_p(),Ga(),xm(),Sm=`full-viewport`,Cm=(e,t)=>{let n=e.createElement(`div`);return n.setAttribute(On,``),n.style.position=`absolute`,n.style.pointerEvents=t,n.style.background=`transparent`,n},wm=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},Tm=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},Em=(e,t)=>{let n=e.createElement(`div`);n.setAttribute(On,``),n.setAttribute(`aria-hidden`,`true`),Wa(n),n.style.cssText=`position:fixed;inset:0;pointer-events:none;contain:strict;background:transparent;z-index:${un};`;let r=!1,i=()=>r?`none`:`auto`,a=Cm(e,i());a.style.inset=`0`,n.appendChild(a),(e.body??e.documentElement).appendChild(n);let o=[a],s=Sm,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=hp(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=vm(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=wm(t());if(r.length===0){if(s===Sm)return;s=Sm,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=bm([c],r[0]);for(let e=1;e<r.length;e++)l=bm(l,r[e]);l.length>12&&(l=bm([c],Tm(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=Cm(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()}}}})),Om,km=n((()=>{Ha(),Ga(),Om=(e,t,n=document)=>{let r=n.createElement(`style`);r.setAttribute(e,``);let i=Va(n);return i&&(r.nonce=i),Wa(r),r.textContent=t,n.head.appendChild(r),r}})),Am,jm,Mm,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,Um,Wm,Gm=n((()=>{X(),Dm(),km(),er(),Am=`html, body { pointer-events: auto !important; }
|
|
23
|
+
iframe[${Dn}] { pointer-events: auto !important; }`,jm=new Set,Mm=new Map,Nm=!1,Pm=0,Fm=e=>{let t=new Set(e.querySelectorAll(`iframe[${Dn}]`));for(let n of jm){let r=$n(n.defaultView);r?.ownerDocument===e&&t.add(r)}return t},Im=e=>{if(Mm.has(e))return;let t=Om(`data-react-grab-frozen-pseudo`,Am,e),n=Em(e,()=>Fm(e));n.refreshHoles(),Pm>0&&n.openForHitTest(),Mm.set(e,{style:t,shield:n})},Lm=e=>{let t=Mm.get(e);t&&(t.style.remove(),t.shield.remove(),Mm.delete(e))},Rm=()=>Nm,zm=e=>(jm.add(e),Nm&&(Im(e),Wm()),()=>{jm.delete(e),Lm(e),Wm()}),Bm=()=>{if(!Nm){Nm=!0,Pm=0,jm.add(document);for(let e of jm)Im(e)}},Vm=()=>{if(Nm){Nm=!1,Pm=0;for(let e of[...Mm.keys()])Lm(e)}},Hm=()=>{if(Nm&&(Pm++,!(Pm>1)))for(let e of Mm.values())e.shield.openForHitTest()},Um=()=>{if(!(!Nm||Pm===0)&&(Pm--,!(Pm>0)))for(let e of Mm.values())e.shield.closeAfterHitTest()},Wm=()=>{if(Nm)for(let e of Mm.values())e.shield.refreshHoles()}})),Km,qm=n((()=>{Km=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)}})),Jm,Ym,Xm,Zm,Qm,$m,eh,th=n((()=>{ro(),qm(),Jm=new Set,Ym=new Set,Xm=!1,Zm=(e,t)=>{if(Ym.has(e))try{e.unfreeze()}catch(e){t.push(e)}finally{Ym.delete(e)}},Qm=e=>{Jm.add(e);try{Xm&&e.isConnected()&&(e.freeze(),Ym.add(e))}catch(t){throw Jm.delete(e),t}return()=>{let t=[];Zm(e,t),Jm.delete(e),Km(t,`Unregistering renderer freeze failed`)}},$m=()=>{if(!Xm){Xm=!0;try{for(let e of Jm)e.isConnected()&&(e.freeze(),Ym.add(e))}catch(e){Xm=!1;let t=[];for(let e of[...Ym].reverse())Zm(e,t);throw t.length===0?e:AggregateError([e,...t],`Rolling back renderer freeze failed`)}}},eh=()=>{if(!Xm)return;Xm=!1;let e=[];for(let t of[...Ym].reverse())Zm(t,e);Km(e,`Unfreezing renderers failed`)}})),nh,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=n((()=>{Ui(),X(),$i(),th(),Ji(),nh=new WeakMap,rh=new WeakMap,ih=new WeakMap,ah=new WeakMap,oh=new WeakMap,sh=[`name`,`position`,`rotation`,`scale`,`color`,`visible`,`args`],ch=e=>typeof e==`object`&&!!e,lh=e=>typeof e==`object`&&!!e||typeof e==`function`,uh=(e,t)=>typeof e[t]==`function`,dh=e=>ch(e)&&typeof e.x==`number`&&typeof e.y==`number`&&typeof e.z==`number`&&uh(e,`set`)&&uh(e,`clone`)&&uh(e,`applyMatrix4`)&&uh(e,`project`),fh=e=>ch(e)&&uh(e,`clone`)&&uh(e,`premultiply`),ph=e=>ch(e)&&`boundingBox`in e&&uh(e,`computeBoundingBox`),mh=e=>ch(e)&&typeof e.type==`string`&&ch(e.props)&&hh(e.object),hh=e=>ch(e)&&e.isObject3D===!0&&typeof e.uuid==`string`&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.visible==`boolean`&&fh(e.matrixWorld)&&uh(e,`updateWorldMatrix`),gh=e=>ch(e)&&e.isCamera===!0,_h=e=>hh(e)&&e.isScene===!0&&Array.isArray(e.children),vh=e=>ch(e)&&typeof e.tagName==`string`&&e.tagName.toLowerCase()===`canvas`&&uh(e,`getContext`),yh=e=>ch(e)&&vh(e.domElement),bh=e=>ch(e)&&uh(e,`set`),xh=e=>ch(e)&&uh(e,`setFromCamera`)&&uh(e,`intersectObjects`),Sh=e=>ch(e)&&yh(e.gl)&&_h(e.scene)&&gh(e.camera)&&xh(e.raycaster)&&bh(e.pointer),Ch=e=>e===`always`||e===`demand`||e===`never`,wh=e=>ch(e)&&typeof e.elapsedTime==`number`,Th=(e,t)=>{let n=e.getState();if(typeof n.setFrameloop!=`function`)return;let r=wh(n.clock)?n.clock.elapsedTime:null;n.setFrameloop(t);let i=e.getState().clock;r!==null&&wh(i)&&(i.elapsedTime=r)},Eh=e=>{if(ah.has(e))return;let t=null,n=Qm({freeze:()=>{let n=ih.get(e);if(!n)return;let r=n.getState();if(Ch(r.frameloop)&&typeof r.setFrameloop==`function`){let e=r.frameloop;Th(n,`never`),t=()=>Th(n,e)}},isConnected:()=>e.isConnected,unfreeze:()=>{t?.(),t=null}});ah.set(e,n)},Dh=e=>{let t=ah.get(e);t&&(ah.delete(e),t())},Oh=e=>mh(e.__r3f)?e.__r3f:null,kh=e=>{let t=e.current.stateNode;if(!ch(t)||!lh(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 Sh(i)?()=>{let e=Reflect.apply(r,n,[]);return Sh(e)?e:i}:null},Ah=e=>{let t=oh.get(e);t&&(oh.delete(e),ih.get(t.canvas)===t.root&&(ih.delete(t.canvas),Dh(t.canvas)))},jh=e=>{let t=kh(e);if(!t){Ah(e);return}let n=t().gl.domElement;if(!n.isConnected||!e.current.child){Ah(e);return}let r=oh.get(e);r&&r.canvas!==n&&(Ah(e),r=void 0),r?(r.root.getState=t,r.root.selectableObjects=null):(r={canvas:n,root:{getState:t,selectableObjects:null}},oh.set(e,r)),ih.set(n,r.root),Eh(n)},ji({name:`react-grab-three-selection`,onCommitFiberRoot:(e,t)=>jh(t)}),Mh=e=>{let t=e;for(;t;){if(Oh(t))return t;t=t.parent}return null},Nh=e=>{let t=e;for(;t;){let e=Oh(t);if(e&&typeof e.eventCount==`number`&&e.eventCount>0)return!0;t=t.parent}return!1},Ph=(e,t)=>{let n=e;for(;n;){if(n===t)return!0;n=n.parent}return!1},Fh=e=>{let t=e;for(;t;){if(!t.visible)return!1;t=t.parent}return!0},Ih=e=>!!Oh(e)&&(ph(e.geometry)||e.type.toLowerCase()===`sprite`),Lh=e=>e.isInstancedMesh!==!0||typeof e.count!=`number`||!Number.isInteger(e.count)||e.count<=0||!e.getMatrixAt?0:e.count,Rh=(e,t,n,r)=>{try{let i={object:n};r!==void 0&&(i.instanceId=r);let a=zh(t,n,i);a&&e.push(a)}catch{}},zh=(e,t,n)=>{let r=typeof n.instanceId==`number`&&Number.isInteger(n.instanceId)?n.instanceId:null,i=nh.get(t);i||(i=new Map,nh.set(t,i));let a=i.get(r);if(a)return a.canvas=e.gl.domElement,a.intersectionPoint=dh(n.point)?n.point:null,a.object=t,a.rootState=e,a.element;let o=Oh(t),s=o?Ri(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:dh(n.point)?n.point:null,object:t,rootState:e,tagName:c},d=l.getBoundingClientRect.bind(l);return l.getBoundingClientRect=()=>{let e=Xh(u),t=l.ownerDocument.defaultView?.DOMRect;return t?new t(e.x,e.y,e.width,e.height):d()},Gi(l,{hostElement:u.canvas,supportsDomEditing:!1,getBounds:()=>Xh(u),getFiber:()=>u.fiber?_i(u.fiber):null,getPreview:()=>Uh(u),getSelector:()=>Wh(u),getTagName:()=>u.tagName,isConnected:()=>u.canvas.isConnected&&Ph(u.object,u.rootState.scene)}),i.set(r,u),rh.set(l,u),l},Bh=(e,t,n)=>{if(!vh(e))return e;let r=ih.get(e);if(!r)return e;try{let i=r.getState(),a=Z(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(!Nh(e.object))continue;let t=Mh(e.object);if(!t||t.visible===!1)continue;let n=zh(i,t,e);if(n)return n}for(let e of c){let t=Mh(e.object);if(!t||t.visible===!1)continue;let n=zh(i,t,e);if(n)return n}}catch{}return e},Vh=(e,t)=>{if(!vh(e))return[];let n=ih.get(e);if(!n)return[];try{let e=n.getState(),r=t?rh.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);Ih(n)&&t.push(n)}n.selectableObjects=t}let i=[];for(let t of n.selectableObjects){if(!Fh(t)||!Ph(t,e.scene)||t.isInstancedMesh===!0&&t.count===0)continue;let n=Lh(t);if(n>0&&n<=512){for(let r=0;r<n;r+=1)Rh(i,e,t,r);continue}if(n>512&&r?.object===t&&r.instanceId!==null){i.push(r.element);continue}Rh(i,e,t)}return i}catch{return[]}},Hh=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,Uh=e=>{let t=e.instance?.props??{},n=[];for(let r of sh){let i=t[r];r===`name`&&i===void 0&&e.object.name&&(i=e.object.name);let a=Hh(i);a&&n.push(`${r}=${a}`)}return e.instanceId!==null&&n.push(`instanceId={${e.instanceId}}`),`<${e.tagName}${n.length>0?` ${n.join(` `)}`:``} />`},Wh=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}`)}]`},Gh=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)},Kh=e=>{if(!ph(e.geometry))return null;if(!e.geometry.boundingBox)try{e.geometry.computeBoundingBox()}catch{return null}let t=e.geometry.boundingBox;return!t||!dh(t.min)||!dh(t.max)?null:t},qh=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||!dh(t.min)||!dh(t.max)?null:t},Jh=e=>e.instanceId===null?qh(e.object)??Kh(e.object):Kh(e.object),Yh=(e,t)=>{let n=t.x+t.width/2,r=t.y+t.height/2;try{let i=e.intersectionPoint?e.intersectionPoint.clone():dh(e.object.position)?e.object.position.clone().set(0,0,0).applyMatrix4(Gh(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`}},Xh=e=>{let t=Z(e.canvas);try{let n=Jh(e);if(!n)return Yh(e,t);let r=Gh(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 Yh(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?Yh(e,t):{x:f,y:p,width:m-f,height:h-p,borderRadius:`0px`}}catch{return Yh(e,t)}}})),Qh,$h,eg,tg,ng,rg,ig,ag=n((()=>{X(),$i(),fp(),_p(),rm(),om(),Ya(),Qp(),pm(),ro(),Kn(),hm(),em(),Rp(),Gm(),Zh(),Qh=null,$h=null,eg=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},tg=(e,t,n)=>{let r=Bh(e,t,n);return Lp(r)&&to(e)&&$p(e,t,n)?r:null},ng=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];Hm();try{let n=am(e,t),r=eo()?n.filter(to):n,i=[],a=new Set,o=!1;for(let n of r){let r=n,s=$p(n,e,t);if(!o){let i=fm(n,e,t);i&&to(i)&&Lp(i)&&$p(i,e,t)?(r=i,s=!0,o=!0):Lp(n)&&s&&(o=!0)}let c=Bh(r,e,t);if(s&&!a.has(c)&&(a.add(c),i.push(c)),r===n)continue;let l=Ja(r);for(;l&&to(l);){let n=Bh(l,e,t);$p(l,e,t)&&!a.has(n)&&(a.add(n),i.push(n)),l=Ja(l)}break}return i}finally{Um()}},rg=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();Hm();try{if($h){let r=$h.element,i=n-$h.timestamp<16;if(r.isConnected&&i&&mm(e,t,$h.bounds)&&!dp(r))return r;$h=null,Qh?.element===r&&(Qh=null)}if(Qh){let r=eg(e,t,Qh.clientX,Qh.clientY),i=n-Qh.timestamp<16;if(r&&i){if(!Qh.preciseHitElement)return Qh.element;let n=fm(Qh.preciseHitElement,e,t);if(n){let r=tg(n,e,t);if(r)return r}return Qh.usesTextHitTesting?tg(Qh.preciseHitElement,e,t)??nm(e,t):Qh.fallbackElement}}let r=null,i=gp(e,t),a=i?Zp(i)!==null:!1,o=i?fm(i,e,t):null,s=o?tg(o,e,t):null,c=(i?tg(i,e,t):null)??nm(e,t);if(r=s??c,r&&Gn(r)&&!dp(r)){let e=Z(r);$h={element:r,timestamp:n,bounds:{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height}}}else $h=null;return Qh={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{Um()}},ig=()=>{Qh=null,$h=null}})),og,sg=n((()=>{og=(e,t,n)=>Math.max(t,Math.min(e,n))}));ag(),sg(),qa(),aa(),er();let cg=e=>{let t=[],n=e;for(;n;){t.unshift(n);let e=n.getRootNode();if(ia(e)){n=e.host;continue}if(!Ka(e))break;n=$n(e.defaultView)}return t},lg=(e,t)=>{if(e===t)return 0;let n=cg(e),r=cg(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};Gm(),X(),Ep(),ro(),om(),pm(),$i(),Qp(),Ya(),fp(),Kn(),aa(),Zh();let ug=e=>e.sort(lg),dg=e=>Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>0&&e.height>0,fg=(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,pg=(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=Ja(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=Z(s),n.set(s,c)),!(!dg(c)||!fg(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(Tp(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)}},mg=(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=og(Math.ceil(e.width/32),3,20),d=og(Math.ceil(e.height/32),3,20),f=u*d,p=f>100?Math.sqrt(100/f):1,m=og(Math.floor(u*p),3,20),h=og(Math.floor(d*p),3,20),g=new Set,_=[],v=(e,t)=>{let i=og(Math.round(e),0,n-1),a=og(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 _},hg=(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=mg(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};Hm();try{for(let e=0;e<p.length;e+=2){let t=am(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=Bh(n,p[e],p[e+1])}catch{}let r=Vh(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=fm(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{Um()}for(let e of d)s.delete(e);pg(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*jn,C=b*jn;for(let e of s){if(Gn(e)&&dp(e)||Tp(e)||!to(e)||!m(e))continue;let n=c.get(e)??Z(e);if(!dg(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=Zp(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?ug(h):g?[g]:[]},gg=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=Ja(a),s=!1;for(;o;){let e=a.getRootNode();if(t.has(o)&&ia(e)&&e.host===o)t.delete(o);else if(t.has(o)){s=!0;break}a=o,o=Ja(a)}s||n.push(i)}return n.reverse()},_g=(e,t,n)=>gg(hg(e,t,n));X(),sg();let vg=(e,t)=>e.width<=0?0:og((t.x-e.x)/e.width,0,1);var yg,bg,xg,Sg,Cg,wg,Tg=n((()=>{X(),ro(),yg={width:0,height:0,offsetLeft:0,offsetTop:0},bg=null,xg=-1/0,Sg=()=>{xg=-1/0},Cg=e=>{if(e){let t=e.getBoundingClientRect();yg.width=t.width,yg.height=t.height,yg.offsetLeft=t.left,yg.offsetTop=t.top;return}let t=window.visualViewport;yg.width=t?.width??window.innerWidth,yg.height=t?.height??window.innerHeight,yg.offsetLeft=t?.offsetLeft??0,yg.offsetTop=t?.offsetTop??0},wg=()=>{let e=eo(),t=performance.now();return(e!==bg||t-xg>=16)&&(bg=e,xg=t,Cg(e)),{width:yg.width,height:yg.height,offsetLeft:yg.offsetLeft,offsetTop:yg.offsetTop}}}));$i(),Qp(),Tg();let Eg=()=>{Zi(),Jp(),ig(),Sg()},Dg=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}),Og=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),kg=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.x,y:e.y});X(),Ya();let Ag=(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(Ja(e),Ja,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};X();let jg=e=>e.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName!==`svg`,Mg=e=>{let t=e.getBoundingClientRect();return t.width>=16||t.height>=16},Ng=(e,t)=>t(e)&&!jg(e)&&Mg(e);X();let Pg=e=>e===`edit`?Nn:e,Fg=new Set([`c`,`C`,`с`,`С`,`ȼ`,`Ȼ`,`ↄ`,`Ↄ`,`ᴄ`,`ᶜ`,`ⱼ`,`ⅽ`,`Ⅽ`,`ç`,`Ç`,`ć`,`Ć`,`č`,`Č`,`ĉ`,`Ĉ`,`ċ`,`Ċ`]),Ig=(e,t)=>t===`KeyC`?!0:!e||e.length!==1?!1:Fg.has(e);var Lg,Rg,zg,Bg=n((()=>{Lg=null,Rg=()=>{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},zg=()=>{if(Lg===null){if(typeof navigator>`u`)return Lg=!1,Lg;let e=navigator.platform??Rg()??navigator.userAgent;Lg=/Mac|iPhone|iPad|iPod/i.test(e)}return Lg}}));Bg();let Vg=(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},Hg={meta:`metaKey`,cmd:`metaKey`,command:`metaKey`,win:`metaKey`,windows:`metaKey`,ctrl:`ctrlKey`,control:`ctrlKey`,shift:`shiftKey`,alt:`altKey`,option:`altKey`,opt:`altKey`},Ug=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=Hg[e];t?n[t]=!0:n.key=e}return n},Wg=e=>{if(typeof e==`function`)return t=>{try{return e(t)}catch{return!1}};let t=Ug(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||Vg(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}},Gg=e=>!e||typeof e==`function`?{metaKey:zg(),ctrlKey:!zg(),shiftKey:!1,altKey:!1,key:null}:Ug(e);Bg();let Kg=(e,t)=>{if(t.activationKey)return Wg(t.activationKey)(e);let n=(zg()?e.metaKey:e.ctrlKey)&&!e.shiftKey&&!e.altKey;return!!(e.key&&n&&Ig(e.key,e.code))};var qg,Jg=n((()=>{Wn(),qg=(e,t)=>{try{return e.composedPath().some(e=>Un(e)&&e.hasAttribute(t))}catch{return!1}}}));Jg(),ja();let Yg=async(e,t)=>{let n=bu(),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?`${Cu()}/__nextjs_launch-editor`:`/__open-in-editor`;return(await fetch(`${o}?${r}`)).ok},Xg=async(e,t,n)=>{try{let r=nl(e);if(await Yg(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 xa?n:new xa(e,t,n)}};var Q,Zg=n((()=>{Q=e=>{console.warn(`[react-grab]`,e)}}));ja(),Zg();let Qg=(e,t,n)=>{Q(e instanceof xa?e:new xa(t,n,e))},$g=(e,t,n)=>{try{if(n.onOpenFile(e,t))return;Xg(e,t,n.transformOpenFileUrl).catch(n=>{Qg(n,e,t)})}catch(n){Qg(n,e,t)}},e_=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}},t_={enabled:!0,hue:0,selectionBox:{enabled:!0},dragBox:{enabled:!0},grabbedBoxes:{enabled:!0},elementLabel:{enabled:!0},toolbar:{enabled:!0}},n_=(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(),X(),ja(),Zg();let r_={activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,activationKey:void 0,getContent:void 0,maxContextLines:3,freezeReactUpdates:!0},i_=(e={})=>{let t=new Map,n=[],r={},i=!1,[a,o]=zt({theme:t_,options:{...r_,...e},actions:[]}),s=t=>{let n=t_,r={...r_,...e},i=[];for(let{config:e}of t)if(e.theme&&(n=n_(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 Ca(e.name,t))})}catch(t){Q(new Ca(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?n_(n_(t_,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 wa(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 wa(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=>{Q(new Sa(r.name,String(e),t))})}catch(t){Q(new Sa(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){Q(new Sa(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){Q(new Sa(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){Q(new Sa(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){Q(new Sa(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=>(Q(new Sa(i.name,`onElementSelect`,e)),!1)))}}catch(e){Q(new Sa(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 a_,o_=n((()=>{a_=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}));X(),$i(),o_();let s_=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:a_(`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}},c_=(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)},nn);r.set(t,n)};return{createInstance:(t,n,r,i,a)=>{o();let s=s_({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=s_({bounds:Z(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)}}}},l_=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}};X(),ag(),Qp(),na();let u_=(e,t,n)=>{let r=[],i=(t,r)=>{let i=Zp(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=l_(a),s=ng(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(ta(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=[]}}},d_=()=>{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)}}};X(),df();let f_=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),p_=(e,t,n)=>{let r=null,i=()=>{if(!t()){a();return}let o=e(),s=f_(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?cf(i):null},a=()=>{r!==null&&(lf(r),r=null)};return{start:i,stop:a,isActive:()=>r!==null}},m_=()=>{let e=globalThis;return!!(e.chrome?.runtime?.id||e.browser?.runtime?.id)},h_=e=>{try{let t=`0.2.0-dev.9b69eda`,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&&!m_()&&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{}},g_=e=>typeof e==`object`&&!!e,__=e=>{if(!g_(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},v_=()=>{if(typeof window>`u`)return null;try{let e=(document.currentScript instanceof HTMLScriptElement?document.currentScript:null)?.getAttribute(`data-options`);return e?__(JSON.parse(e)):null}catch{return null}},y_=e=>e===`Enter`||e===`NumpadEnter`,b_=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height;var x_,S_,C_,w_=n((()=>{X(),ro(),x_=`react-grab-toolbar-state`,S_=()=>{try{let e=localStorage.getItem(x_);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:Mn,collapsed:r,enabled:!r,defaultAction:typeof n.defaultAction==`string`?n.defaultAction:Nn}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},C_=e=>{try{localStorage.setItem(x_,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}}}));w_(),z(),ro();let T_=e=>{let[t,n]=c(!1);return v(()=>{let t=no(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},E_={name:`copy`,actions:[{id:`copy`,label:`Copy`,shortcut:`C`,showInToolbarMenu:!0,onAction:e=>{e.copy?.()}}]},D_={name:`comment`,actions:[{id:`comment`,label:`Comment`,shortcut:`Enter`,showInToolbarMenu:!0,onAction:e=>{e.enterPromptMode?.()}}]},O_={name:`open`,actions:[{id:`open`,label:`Open`,shortcut:`O`,enabled:e=>!!e.filePath,onAction:e=>{e.filePath&&($g(e.filePath,e.lineNumber,e.hooks),e.hideContextMenu(),e.cleanup())}}]};var k_,A_,j_,M_,N_,P_=n((()=>{k_=`react-grab-comment-items`,A_=1e3,j_=60*A_,M_=60*j_,N_=24*M_})),F_,I_,L_,R_,z_,B_,V_,H_,U_,W_,G_,K_,q_,J_=n((()=>{o_(),P_(),F_=new Set,I_=null,L_=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:a_(`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}},R_=()=>{if(typeof window>`u`)return[];try{let e=sessionStorage.getItem(k_);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.map(e=>L_(e)).filter(e=>e!==null).slice(0,50):[]}catch{return[]}},z_=()=>(I_??=R_(),I_),B_=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[]},V_=e=>{I_=B_(e);try{sessionStorage.setItem(k_,JSON.stringify(I_))}catch{}for(let e of F_)e(I_);return I_},H_=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),U_=()=>[...z_()],W_=e=>{let t=z_().filter(t=>t.commentText!==e.commentText||!H_(t.elementSelectors,e.elementSelectors));return V_([{...e,id:a_(`comment`)},...t].slice(0,50))},G_=e=>V_(z_().filter(t=>t.id!==e)),K_=()=>V_([]),q_=e=>(F_.add(e),()=>{F_.delete(e)})}));Na(),J_();let Y_={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 ou(fu(e))}catch{return``}});W_({content:n,tagName:Ma(a)??`div`,componentName:o,elementsCount:t.length,elementSelectors:s,commentText:i,timestamp:Date.now()})}}})};var X_,Z_=n((()=>{X_=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n])})),Q_,$_,ev,tv,nv,rv,iv,av,ov,sv,cv,lv,uv,dv=n((()=>{X(),df(),Q_=!1,$_=null,ev=!1,tv=new Map,nv=-1,rv=new WeakSet,iv=new WeakSet,av=new WeakMap,ov=new Map,sv=new Map,cv=e=>{if($_===e&&(ev=!0),rv.has(e))return!0;if(!Q_&&$_===e){let t=(av.get(e)??0)+1;return av.set(e,t),t<4?!1:(rv.add(e),!0)}return!Q_||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(rv.add(e),iv.add(e),!0)},typeof window<`u`&&(window.requestAnimationFrame=e=>{let t=cv(e);if(Q_&&t){let t=nv--;return tv.set(t,e),t}let n=cf(t=>{if(Q_&&cv(e)){let t=nv--;tv.set(t,e),ov.set(n,t);return}let r=$_,i=ev;$_=e,ev=!1;try{e(t)}finally{let t=ev;$_=r,ev=i,!t&&!iv.has(e)&&(rv.delete(e),av.delete(e))}});return n},window.cancelAnimationFrame=e=>{if(tv.has(e)){tv.delete(e);return}let t=sv.get(e);if(t!==void 0){lf(t.nativeId),sv.delete(e);return}let n=ov.get(e);if(n!==void 0){tv.delete(n),ov.delete(e);return}lf(e)}),lv=()=>{if(!Q_){Q_=!0,tv.clear(),ov.clear();for(let[e,{nativeId:t,callback:n}]of sv)lf(t),tv.set(e,n);sv.clear()}},uv=()=>{if(Q_){Q_=!1;for(let[e,t]of tv.entries()){let n=cf(n=>{sv.delete(e);let r=$_,i=ev;$_=t,ev=!1;try{t(n)}finally{let e=ev;$_=r,ev=i,!e&&!iv.has(t)&&(rv.delete(t),av.delete(t))}});sv.set(e,{nativeId:n,callback:t})}tv.clear(),ov.clear()}}})),fv,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=n((()=>{X(),Z_(),km(),dv(),Hn(),kp(),aa(),ro(),qm(),fv=`
|
|
24
|
+
[${En}],
|
|
25
|
+
[${En}] * {
|
|
26
26
|
animation-play-state: paused !important;
|
|
27
27
|
transition: none !important;
|
|
28
28
|
}
|
|
29
|
-
`,
|
|
29
|
+
`,pv=`
|
|
30
30
|
*, *::before, *::after {
|
|
31
31
|
animation-play-state: paused !important;
|
|
32
32
|
transition: none !important;
|
|
33
33
|
}
|
|
34
|
-
`,
|
|
34
|
+
`,mv=`svg`,hv=e=>e?.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName===`svg`,gv=null,_v=[],vv=[],yv=[],bv=new Set,xv=new Map,Sv=new Map,Cv=[],wv=()=>xv.size>0,Tv=()=>{gv||=Om(`data-react-grab-frozen-styles`,fv)},Ev=e=>{let t=new Set;for(let n of e){let e=hv(n)?n:n.closest(`svg`);hv(e)&&t.add(e);for(let e of n.querySelectorAll(mv))hv(e)&&t.add(e)}return[...t]},Dv=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},Ov=(e,t)=>{for(let n of e){let e=Sv.get(n)??0;if(e===0){Sv.set(n,1),t.push(n),Dv(n,`pauseAnimations`);continue}Sv.set(n,e+1),t.push(n)}},kv=(e,t)=>{let n=[];for(let r of e){let e=Sv.get(r);if(e){if(e===1){try{Dv(r,`unpauseAnimations`),Sv.delete(r)}catch(e){n.push(r),t.push(e)}continue}Sv.set(r,e-1)}}return n},Av=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},jv=e=>{for(let t of e)try{t.finish()}catch{}},Mv=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},Nv=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;if(!Vn(t))return!1;let n=t.getRootNode();return ia(n)&&Op(n.host)},Pv=e=>{if(e.length===0||X_(e,yv))return;Fv();let t=[...e];Tv(),_v=t,vv=[];try{Ov(Ev(_v),vv);for(let e of _v)e.setAttribute(En,``);let e=Av(_v);Cv=[];for(let t of e)t.pause(),Cv.push(t);yv=t}catch(e){try{Fv()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},Fv=()=>{if(_v.length===0&&vv.length===0&&Cv.length===0)return;let e=_v,t=vv,n=Cv,r=[],i=[];yv=[];for(let t of e)try{t.removeAttribute(En)}catch(e){i.push(t),r.push(e)}_v=i,vv=kv(t,r),Mv(n),Cv=[],Km(r,`Unfreezing element animations failed`)},Iv=e=>e.length===0?(Fv(),()=>{}):(Pv(e),Fv),Lv=e=>{let t=[];for(let n of e.getAnimations())Nv(n)||n.playState===`running`&&t.push(n);return{targetDocument:e,runningAnimations:t}},Rv=e=>{let t=xv.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())Nv(n)||t.push(n);jv(t)}else Mv(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=kv(t.frozenSvgElements,n),t.styleElement===null&&t.frozenSvgElements.length===0&&t.frozenWaapiAnimations.length===0&&xv.delete(e),n},zv=e=>{if(xv.has(e.targetDocument))return;let t=Om(`data-react-grab-global-freeze`,``,e.targetDocument),n={styleElement:t,frozenSvgElements:[],frozenWaapiAnimations:[],didUseCssFreeze:!1};if(xv.set(e.targetDocument,n),e.runningAnimations.length>200)t.textContent=pv,n.didUseCssFreeze=!0;else for(let t of e.runningAnimations)t.pause(),n.frozenWaapiAnimations.push(t);Ov(Ev(Array.from(e.targetDocument.querySelectorAll(mv))),n.frozenSvgElements)},Bv=e=>{bv.add(e);try{wv()&&zv(Lv(e))}catch(t){bv.delete(e);let n=Rv(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{bv.delete(e),Km(Rv(e),`Unfreezing frame animations failed`)}},Vv=()=>wv()?[]:(bv.add(document),[...bv].map(Lv)),Hv=e=>{if(!wv()){for(let t of e)zv(t);lv()}},Uv=()=>{if(!wv())return;let e=[];for(let t of[...xv.keys()])e.push(...Rv(t));try{uv()}catch(t){e.push(t)}Km(e,`Unfreezing global animations failed`)}})),Gv,Kv,qv=n((()=>{fp(),Wn(),Kn(),jp(),Gv=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!Ap(n)&&(Un(n)&&t.add(n),n.shadowRoot&&Gv(n.shadowRoot,t),Gn(n))){let e=dp(n);e&&Gv(e,t)}},Kv=()=>{let e=new Set;return Gv(document,e),[...e]}})),Jv,Yv,Xv,Zv,Qv,$v,ey,ty,ny,ry,iy,ay,oy,sy,cy,ly,uy,dy,fy,py,my,hy=n((()=>{ag(),fp(),Ya(),_p(),qv(),Wn(),Kn(),jp(),ro(),Gm(),qm(),Jv=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],Yv=[`focus`,`blur`,`focusin`,`focusout`],Xv=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],Zv=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],Qv=new Map,$v=new Map,ey=new Set,ty=!1,ny=e=>{e.stopImmediatePropagation()},ry=e=>{e.preventDefault(),e.stopImmediatePropagation()},iy=e=>{for(let t of Jv)e.addEventListener(t,ny,!0);for(let t of Yv)e.addEventListener(t,ry,!0)},ay=e=>{for(let t of Jv)e.removeEventListener(t,ny,!0);for(let t of Yv)e.removeEventListener(t,ry,!0)},oy=e=>{ey.add(e);let t=zm(e);return ty&&iy(e),()=>{ty&&ay(e),ey.delete(e),t()}},sy=(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}},cy=(e,t)=>{let n=[],r=gp(e,t);for(;r&&r!==document.documentElement&&!Ap(r);)Un(r)&&n.push(r),r=Ja(r);return n},ly=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;){if(Un(t)&&e.push(t),t.shadowRoot?.activeElement){t=t.shadowRoot.activeElement;continue}if(Gn(t)){t=dp(t)?.activeElement??null;continue}t=null}return e},uy=(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`)}},dy=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},fy=(e,t)=>{if(Rm())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?cy(e,t):Kv();for(let e of r){let t=sy(e,Xv);t&&n.push(t)}let i=[];for(let e of ly()){let t=sy(e,Zv,$v);t&&i.push(t)}return{hoverStates:n,focusStates:i}},py=e=>{if(e){ty=!0,ey.add(document);for(let e of ey)iy(e);uy(e.hoverStates,Qv),uy(e.focusStates,$v),Bm()}},my=()=>{ig(),ty=!1;for(let e of ey)ay(e);let e=[...dy(Qv),...dy($v)];try{Vm()}catch(t){e.push(t)}Km(e,`Unfreezing pseudo states failed`)}})),gy,_y,vy,yy=n((()=>{Wv(),hy(),th(),qm(),gy=()=>{let e=[];try{eh()}catch(t){e.push(t)}try{my()}catch(t){e.push(t)}try{Uv()}catch(t){e.push(t)}return e},_y=(e,t)=>{let n=fy(e,t),r=Vv();try{py(n),Hv(r),$m()}catch(e){let t=gy();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},vy=()=>{Km(gy(),`Unfreezing global interactions failed`)}})),by,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=n((()=>{Ui(),ja(),Zg(),ro(),by=!1,xy=0,Sy=0,Cy=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},wy=new WeakMap,Ty=new WeakMap,Ey=new WeakMap,Dy=new Set,Oy=[],ky=[],Ay=new WeakMap,jy=new WeakMap,My=new WeakSet,Ny=new Set,Py=new WeakMap,ji({name:`react-grab-freeze-updates`,onCommitFiberRoot:(e,t)=>{let n=Dr().renderers.get(e);n&&Py.set(t,n)}}),Fy=e=>{try{let t=e.rendererPackageName;return typeof t==`string`&&t.startsWith(`react-dom`)}catch{return!1}},Iy=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},Ly=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},Ry=e=>{let t=Py.get(e);if(t)return Fy(t)?t:null;let n=Array.from(Dr().renderers.values()).filter(Fy);if(n.length===1){let t=n[0];return t&&Py.set(e,t),t??null}let r=Ly(e);if(!r)return null;for(let t of n)try{let n=t.findFiberByHostInstance?.(r);if(n&&Iy(n)===e)return Py.set(e,t),t}catch{}return null},zy=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`)},By=()=>{if(hi.size>0){let e=new Set;for(let t of hi)zy(t)&&e.add(t);return e}let e=new Set,t=n=>{let r=Ri(n);if(r){let t=Iy(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},Vy=(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},Hy=e=>{if(!e||Ay.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=()=>by?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>by?null:n,set:e=>{if(by){e!==null&&(t.bufferedPending=Vy(t.bufferedPending??null,e));return}n=e}}),Ay.set(e,t)},Uy=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},Wy=e=>{let t=Ay.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=Uy(t.pendingValueAtPause??null),r=Uy(t.bufferedPending??null);for(let t of[...e,...r])ky.push(()=>n(t))}Ay.delete(e)},Gy=e=>{if(jy.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return by?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(by){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),jy.set(e,t)},Ky=e=>{let t=jy.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),jy.delete(e))},qy=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Hy(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Gy(n),n=n.next},Jy=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Wy(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;for(;t;){if(oi(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}},Xy=e=>{let t=e;for(;t;){if(oi(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=>{if(wy.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};wy.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!by||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Cy(Ty,a,()=>(...e)=>{by?ky.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!by||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Cy(Ty,a,()=>(...e)=>{by?ky.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!by||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Cy(Ey,a,()=>e=>{by?Oy.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>by?n.useSyncExternalStore(t=>e(()=>{by?Dy.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},Qy=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`&&Zy(r),r),set:e=>{r=e}})},$y=(e,t)=>{queueMicrotask(()=>{if(!(by||Sy!==t))try{for(let t of e){let e=Ry(t);if(t.current&&e?.scheduleUpdate)try{e.scheduleUpdate(t.current)}catch(e){Q(new ya(`scheduleUpdate failed during unfreeze`,e))}}}catch(e){Q(new ya(`scheduleReactUpdate failed`,e))}})},eb=e=>{for(let t of e)try{t()}catch(e){Q(new ya(`Callback failed during state replay`,e))}},tb=()=>{for(let e of Dr().renderers.values())Fy(e)&&(My.has(e)||(Qy(e),My.add(e)))},nb=()=>{Dy.clear(),Oy.length=0,ky.length=0},rb=()=>{let e=Sy,t=new Set(Ny);try{for(let e of By())t.add(e)}catch(e){Q(new ya(`Collecting fiber roots failed during unfreeze`,e))}Ny.clear(),by=!1;for(let e of t)try{Xy(e.current)}catch(e){Q(new ya(`Resuming a fiber root failed during unfreeze`,e))}let n=Array.from(Dy),r=Oy.slice(),i=ky.slice();nb(),eb(n),eb(r),eb(i),!by&&Sy===e&&$y(t,e)},ib=()=>{let e=xy===0;if(xy+=1,e)try{tb(),Sy+=1,by=!0;let e=By();for(let t of e)Ny.add(t),Yy(t.current)}catch(e){throw--xy,by&&rb(),e}let t=!1;return()=>{t||(t=!0,--xy,xy===0&&rb())}},ab=()=>{try{return ib()}catch(e){return Q(new ya(`Pausing React updates failed`,e)),()=>{}}}}));yy(),ob();let sb=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 cb,lb,ub,db=n((()=>{cb=e=>e.key===`Enter`,lb=e=>e.metaKey||e.ctrlKey,ub=(e,t,n={})=>{if(!t.key)return null;if(cb(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return lb(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}}));db();let fb=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}};z(),na();let pb=()=>{let[e,t]=c(!1),[n,r]=c(null),i=fb(),a=()=>{let e=n();return ta(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()??(ta(e)?e:null);return o(),t}}};var mb,hb,gb=n((()=>{ja(),Zg(),mb=e=>e??!0,hb=(e,t)=>{if(typeof e.enabled==`function`){if(!t)return!1;try{return e.enabled(t)}catch(t){return Q(new Ea(e.id,t)),!1}}return mb(e.enabled)}})),_b,vb=n((()=>{ja(),gb(),Zg(),_b=(e,t)=>{if(!hb(e,t))return!1;try{let n=e.onAction(t);n&&n.catch(t=>{Q(new Ta(e.id,t))})}catch(t){Q(new Ta(e.id,t))}return!0}}));vb(),ja(),Zg();let yb=e=>{Q(new ya(`Toolbar state change subscriber failed`,e))},bb=(e,t)=>{for(let n of e)try{Promise.resolve(n(t)).catch(yb)}catch(e){yb(e)}},$=(e,t)=>{try{e()}catch(e){t.push(e)}};X(),fp(),Hn(),Kn(),jp(),qm();let xb=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(Dn),t),n.document&&a(n.document,t))},c=(e,t)=>{Gn(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=dp(e);if(t.document&&t.document!==r&&a(t.document,n),t.document=r,!r){e.removeAttribute(Dn),Km(n,`Cleaning up replaced frame document failed`);return}e.setAttribute(Dn,``),u(r),Km(n,`Cleaning up replaced frame document failed`)};e.addEventListener(`load`,n,{signal:t.abortController.signal}),n()},p=e=>{Ap(e)||(Gn(e)&&f(e),e.shadowRoot&&h(e.shadowRoot))},m=e=>{if(p(e),!Ap(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)Vn(e)&&l(e,t);for(let e of n.addedNodes)Vn(e)&&m(e)}Km(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);Km(e,`Cleaning up same-origin frame documents failed`)}};nr(),Wv(),hy(),qm();let Sb=(e,t)=>{window.dispatchEvent(t),t.defaultPrevented&&(e.preventDefault(),e.stopImmediatePropagation())},Cb=(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}),wb=e=>{let t=tr(e.view,e.clientX,e.clientY);Sb(e,new PointerEvent(e.type,{...Cb(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}))},Tb=e=>{let t=tr(e.view,e.clientX,e.clientY);Sb(e,new MouseEvent(e.type,Cb(e,t.x,t.y)))},Eb=e=>{Sb(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}))},Db=e=>xb(t=>{if(t===document)return;let n=t.defaultView;if(!n)return;let r=new AbortController,i=Bv(t),a=oy(t),o={capture:!0,signal:r.signal},s=t=>{e.shouldForwardInteraction()&&wb(t)},c=t=>{e.shouldForwardInteraction()&&Tb(t)},l=t=>{(e.shouldForwardInteraction()||e.shouldForwardKeyboardEvent(t))&&Eb(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)}Km(e,`Cleaning up frame event forwarding failed`)}});er();let Ob=(e,t)=>{let n=t.ownerDocument;for(;n;){if(n===e)return!0;n=$n(n.defaultView)?.ownerDocument??null}return!1};ja(),Zg();let kb=null,Ab=new Map,jb=()=>typeof window>`u`?kb:window.__REACT_GRAB__??kb??null,Mb=e=>{if(kb=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__),e)for(let[t,n]of Ab){Ab.delete(t);try{e.registerPlugin(n)}catch(e){Q(e instanceof wa?e:new wa(t,e))}}},Nb=e=>{kb===e&&(kb=null),typeof window<`u`&&window.__REACT_GRAB__===e&&delete window.__REACT_GRAB__},Pb=e=>{let t=jb();if(t){t.registerPlugin(e);return}Ab.set(e.name,e)},Fb=e=>{let t=jb();if(t){t.unregisterPlugin(e);return}Ab.delete(e)},Ib=async(e,t={})=>(await Promise.allSettled(e.map(e=>Qd(e,t)))).map(e=>e.status===`fulfilled`?e.value:``);var Lb,Rb=n((()=>{Lb=(e,t,n)=>e+(t-e)*n})),zb,Bb=n((()=>{X(),zb=(e,t)=>{let n=Math.max(t,1);return 1-(1-e)**(n/fn)}})),Vb,Hb,Ub,Wb,Gb=n((()=>{z(),Rb(),X(),df(),Gt(),Bb(),Vb=B(`<canvas data-react-grab-overlay-canvas style=position:fixed;top:0;left:0;pointer-events:none>`),Hb={borderColor:gn,fillColor:_n,lerpFactor:tn},Ub={drag:{borderColor:mn,fillColor:hn,lerpFactor:dn},selection:Hb,grabbed:Hb},Wb=e=>{let t,n=null,r=0,i=0,a=1,o=null,s=null,c=null,l=[],f=null,p=[],m=Wt()?`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=Ub.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=Ub.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=Ub.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=Lb(e.current.x,e.target.x,t),i=Lb(e.current.y,e.target.y,t),a=Lb(e.current.width,e.target.width,t),o=Lb(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=Lb(e.opacity,e.targetOpacity,t);c=Math.abs(n-e.targetOpacity)<pn,e.opacity=c?e.targetOpacity:n}return!s||!c},D=()=>{let e=performance.now(),t=c===null?fn:e-c;c=e;let n=zb(Ub.drag.lerpFactor,t),r=zb(Ub.selection.lerpFactor,t),i=zb(Ub.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-nn)/125);t.opacity=1-(1-(1-n)*(1-n)),a=!0}else{let t=nn-e;u=u===null?t:Math.min(u,t)}return!0}return n?!0:t.opacity>0}),E(),a?o=cf(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=cf(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&&lf(o),s!==null&&window.clearTimeout(s)})}),(()=>{var e=Vb(),n=t;return typeof n==`function`?et(n,e):t=e,u(t=>W(e,`z-index`,String(J))),e})()}})),Kb,qb,Jb=n((()=>{K(),z(),X(),ro(),Kb=B(`<div style=position:fixed;pointer-events:none;will-change:opacity;contain:strict;transform:translateZ(0)>`),qb=e=>{let t=eo(),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=Kb();return W(t,`border-radius`,n),W(t,`z-index`,J),W(t,`transition`,`opacity 125ms ease-out`),W(t,`box-shadow`,`inset 0 0 50px ${vn}`),u(n=>{var r=o(),i=s(),a=l(),c=f(),u=+!!e.visible;return r!==n.e&&W(t,`top`,n.e=r),i!==n.t&&W(t,`left`,n.t=i),a!==n.a&&W(t,`width`,n.a=a),c!==n.o&&W(t,`height`,n.o=c),u!==n.i&&W(t,`opacity`,n.i=u),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t})()}})),Yb,Xb=n((()=>{Yb=(e,t)=>{e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,t)}px`}})),Zb,Qb=n((()=>{ro(),Zb=(e,t)=>{e&&e.focus(t)}})),$b,ex=n((()=>{X(),$b=e=>{if(e<=0)return 8;let t=e*yn;return Math.round(Math.max(4,Math.min(8,t)))}})),tx,nx=n((()=>{X(),tx=e=>e.isComposing||e.keyCode===229})),rx,ix,ax=n((()=>{rx=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=rx(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},ix=(...e)=>{let t=``;for(let n of e){if(!n)continue;let e=rx(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((()=>{K(),cx=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">`),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&&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})()}})),dx,fx,px=n((()=>{K(),dx=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>`),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&&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})()}})),mx,hx,gx=n((()=>{K(),X(),ex(),mx=B(`<svg data-react-grab-arrow class="absolute block z-10"><path>`),hx=e=>{let t=()=>e.position===`bottom`,n=()=>$b(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 V(o,`fill`,Qt),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&&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&&W(n,`left`,s.o=d),f!==s.i&&W(n,`top`,s.i=f),p!==s.n&&W(n,`bottom`,s.n=p),m!==s.s&&W(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})()}})),_x,vx,yx,bx,xx,Sx,Cx,wx=n((()=>{K(),z(),ax(),_x=B(`<span> `),vx=B(`<span class=text-[var(--rg-text-secondary)]> `),yx=B(`<span class=text-[var(--rg-text-primary)]> `),bx=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">`),xx=B(`<button type=button>`),Sx=B(`<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 G(t,M(N,{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),G(t,M(N,{get when(){return!e.componentName},get children(){var t=yx(),n=t.firstChild;return u(()=>n.data=e.tagName),t}}),null),t})();return M(N,{get when(){return e.isClickable},get fallback(){return(()=>{var r=Sx();return U(r,`click`,e.onClick,!0),r.addEventListener(`mouseleave`,n),r.addEventListener(`mouseenter`,t),G(r,i),u(()=>H(r,ix(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden`,e.shrink&&`shrink-0`))),r})()},get children(){var a=xx();return U(a,`click`,e.onClick,!0),a.addEventListener(`mouseleave`,n),a.addEventListener(`mouseenter`,t),G(a,i),u(t=>{var n=`Open source for ${r()}`,i=ix(`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&&H(a,t.t=i),t},{e:void 0,t:void 0}),a}})},Je([`click`])})),Tx,Ex,Dx=n((()=>{K(),Tx=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">`),Ex=e=>(()=>{var t=Tx();return G(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 ix(...i)}})),Ax,jx,Mx,Nx=n((()=>{K(),z(),ax(),kx(),Ax=B(`<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]=xe(e,[`shape`,`class`]);return(()=>{var e=Ax();return $e(e,be({get class(){return ix(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((()=>{z(),Ix(),ro(),Lx=e=>{let t=Symbol(),n=no(n=>{Fx.isActive(t)&&(Ia(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((()=>{K(),zx=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">`),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&&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,Ux,Wx,Gx=n((()=>{K(),z(),ax(),kx(),Hx=B(`<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]=xe(e,[`variant`,`class`,`type`]);return(()=>{var e=Hx();return $e(e,be({get type(){return t.type??`button`},get class(){return ix(Ux({variant:t.variant}),t.class)}},n),!1,!1),e})()}})),Kx,qx,Jx,Yx,Xx,Zx,Qx=n((()=>{K(),z(),Rx(),Vx(),Gx(),Dx(),Kx=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">No`),qx=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Copy`),Jx=B(`<span class="text-[var(--rg-error-text)] text-[13px] leading-3.5 font-sans font-medium">Yes`),Yx=B(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),Xx=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"> `),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 U(r,`click`,n,!0),U(r,`pointerdown`,n,!0),G(r,M(Ex,{get children(){var n=Yx();return G(n,M(N,{get when(){return t()},get children(){return M(Wx,{"data-react-grab-discard-no":!0,get onClick(){return e.onCancel},get children(){return Kx()}})}}),null),G(n,M(N,{get when(){return e.onCopy},get children(){return M(Wx,{"data-react-grab-discard-copy":!0,get onClick(){return e.onCopy},get children(){return qx()}})}}),null),G(n,M(Wx,{variant:`destructive`,class:`gap-0.5`,"data-react-grab-discard-yes":!0,get onClick(){return e.onConfirm},get children(){return[Jx(),M(Bx,{size:10,class:`text-[var(--rg-error-text)] opacity-50`})]}}),null),n}}),null),u(()=>i.data=e.label??`Discard?`),r})()},Je([`pointerdown`,`click`])})),$x,eS,tS=n((()=>{K(),$x=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">`),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&&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})()}})),nS,rS,iS,aS,oS,sS=n((()=>{K(),z(),Rx(),tS(),Gx(),Dx(),nS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Retry`),rS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Ok`),iS=B(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),aS=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"> `),oS=e=>{let{claimFocus:t}=Lx({onEnter:t=>{if(qg(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 U(r,`click`,t,!0),U(r,`pointerdown`,t,!0),G(r,M(N,{get when(){return n()},get children(){return M(Ex,{get children(){var t=iS();return G(t,M(N,{get when(){return e.onRetry},get children(){return M(Wx,{"data-react-grab-retry":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,get onClick(){return e.onRetry},get children(){return[nS(),M(eS,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-text-secondary)]`})]}})}}),null),G(t,M(N,{get when(){return e.onAcknowledge},get children(){return M(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=Ze(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})()},Je([`pointerdown`,`click`])})),cS,lS,uS=n((()=>{K(),cS=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">`),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&&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})()}})),dS,fS,pS=n((()=>{K(),dS=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">`),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&&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})()}})),mS,hS,gS,_S,vS,yS,bS=n((()=>{K(),z(),X(),Rx(),Jg(),Vx(),uS(),ax(),Gx(),Nx(),pS(),mS=B(`<button type=button data-react-grab-ignore-events data-react-grab-more-options aria-label="More options">`),hS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Keep`),gS=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">`),_S=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"> `),vS=e=>(()=>{var t=mS();return U(t,`click`,t=>{t.stopImmediatePropagation(),e.onClick()}),U(t,`pointerdown`,e=>{e.stopImmediatePropagation()}),G(t,M(lS,{size:14,"aria-hidden":`true`,class:`opacity-50 group-hover:opacity-100 transition-opacity`})),u(()=>H(t,ix(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)},nn-125))},{claimFocus:f}=Lx({onEnter:e=>{if(qg(e,`data-react-grab-more-options`)){e.preventDefault(),e.stopPropagation(),l();return}qg(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)}),M(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[M(N,{get when(){return yt(()=>!r())()&&e.onDismiss},get children(){var t=gS(),n=t.firstChild,i=n.firstChild,a=n.nextSibling;return G(a,M(N,{get when(){return e.onShowContextMenu},get children(){return M(vS,{onClick:l})}}),null),G(a,M(N,{get when(){return e.onDismiss},get children(){return M(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(),M(N,{get when(){return!r()},get children(){return M(Bx,{size:10,class:`text-[var(--rg-text-secondary)]`})}})]}})}}),null),u(()=>i.data=s()),t}}),M(N,{get when(){return r()||!e.onDismiss},get children(){var t=_S(),n=t.firstChild,r=n.firstChild;return G(t,M(fS,{size:14,"aria-hidden":`true`,class:`text-[var(--rg-text-primary-85)] shrink-0`}),n),G(t,M(N,{get when(){return e.onShowContextMenu},get children(){return M(vS,{onClick:l})}}),null),u(()=>r.data=s()),t}})]}})}})),xS,SS,CS,wS,TS,ES,DS,OS,kS=n((()=>{K(),z(),X(),Xb(),Qb(),ex(),Tg(),nx(),ro(),ax(),sx(),ux(),px(),gx(),wx(),Dx(),Nx(),Qx(),sS(),bS(),xS=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"> `),SS=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">`),CS=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">`),wS=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>`),TS=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">`),ES=B(`<div data-react-grab-ignore-events data-react-grab-selection-label class="fixed font-sans text-[13px] antialiased select-none">`),DS={left:Bn,top:Bn,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=eo();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=wg(),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:$b(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(tx(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&&(Yb(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&&Zb(r,{preventScroll:!0})},le=()=>re()&&(T()||e.status===`error`);return M(N,{get when(){return yt(()=>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`?et(a,i):t=i,W(i,`z-index`,`${ln}`),W(i,`transition`,`opacity 125ms ease-out, filter 125ms ease-out`),G(i,M(N,{get when(){return!e.hideArrow},get children(){return M(hx,{get position(){return ne()},get leftPercent(){return k().position.arrowLeftPercent},get leftOffsetPx(){return k().position.arrowLeftOffset},get labelWidth(){return p()}})}}),null),G(i,M(N,{get when(){return yt(()=>!!T())()&&!e.error},get children(){return M(yS,{get statusText(){return e.statusText??`Copied`},get onDismiss(){return e.onDismiss},onFadingChange:x,get onShowContextMenu(){return e.onShowContextMenu}})}}),null),G(i,M(Mx,{ref:e=>n=e,get shape(){return oe()?`pill`:`panel`},get class(){return ix(`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[M(N,{get when(){return e.status===`copying`},get children(){var t=xS(),n=t.firstChild,r=n.firstChild,i=r.firstChild;return G(n,M(fx,{size:13,class:`text-[var(--rg-text-secondary)] shrink-0`}),r),u(()=>i.data=e.statusText??`Grabbing…`),t}}),M(N,{get when(){return yt(()=>!!(w()&&!e.isPromptMode))()&&!e.discardPrompt},get children(){var t=SS(),n=t.firstChild;return G(n,M(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}}),M(N,{get when(){return yt(()=>!!(w()&&e.isPromptMode))()&&!e.discardPrompt},get children(){var t=TS(),n=t.firstChild;return G(n,M(Cx,{get tagName(){return A().tagName},get componentName(){return A().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:se,onHoverChange:te})),G(t,M(Ex,{get children(){var t=wS(),n=t.firstChild;return n.$$keydown=ie,n.$$input=ae,et(t=>{r=t,e.onSubmit&&queueMicrotask(()=>{Zb(t,{preventScroll:!0}),Yb(t,95)})},n),W(n,`max-height`,`95px`),G(t,M(N,{get when(){return e.onSubmit},get children(){var t=CS();return t.$$click=()=>e.onSubmit?.(),G(t,M(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}}),M(N,{get when(){return e.discardPrompt},keyed:!0,children:e=>M(Zx,{get label(){return yt(()=>!!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?.(),Zb(r,{preventScroll:!0})}})}),M(N,{get when(){return e.error},get children(){return M(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(${$t}) blur(${e.status===`fading`||b()?`3px`:`0`})`;return n!==t.e&&W(i,`top`,t.e=n),r!==t.t&&W(i,`left`,t.t=r),a!==t.a&&W(i,`transform`,t.a=a),o!==t.o&&W(i,`pointer-events`,t.o=o),s!==t.i&&W(i,`opacity`,t.i=s),c!==t.n&&W(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}})},Je([`pointerdown`,`click`,`input`,`keydown`])})),AS,jS,MS=n((()=>{K(),ax(),X(),AS=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">`),jS=e=>{let t=()=>e.size??14,n=()=>e.rotationDeg??0;return(()=>{var r=AS(),i=r.firstChild;return W(r,`transition-duration`,`180ms`),u(a=>{var o=ix(`inline-flex items-center justify-center will-change-transform`,e.class),s=`rotate(${n()}deg)`,c=t(),l=t();return o!==a.e&&H(r,a.e=o),s!==a.t&&W(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})()}})),NS,PS,FS=n((()=>{K(),NS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 12 12"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M1 6C1 3.239 3.239 1 6 1C8.761 1 11 3.239 11 6C11 8.761 8.761 11 6 11C5.103 11 4.261 10.764 3.532 10.35C2.959 10.759 2.257 11 1.5 11C1.376 11 1.253 10.993 1.132 10.981C0.923 10.959 0.75 10.809 0.699 10.605C0.648 10.402 0.729 10.188 0.903 10.07C1.347 9.768 1.688 9.328 1.865 8.812C1.319 8.011 1 7.042 1 6Z">`),PS=e=>{let t=()=>e.size??14;return(()=>{var n=NS();return u(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})()}})),IS,LS,RS,zS,BS=n((()=>{K(),z(),ax(),X(),IS=B(`<div> `),LS=0,RS=()=>Date.now()-LS<800,zS=e=>{let[t,n]=c(!1),[r,i]=c(!0),a;d(_(()=>e.visible,e=>{a!==void 0&&(clearTimeout(a),a=void 0),e?RS()?(i(!1),n(!0)):(i(!0),a=setTimeout(()=>{n(!0)},400)):(t()&&(LS=Date.now()),n(!1))})),y(()=>{a!==void 0&&clearTimeout(a),t()&&(LS=Date.now())});let o=()=>e.position===`top`||e.position===`bottom`?{left:`50%`,translate:`-50%`,"z-index":`${ln}`}:{top:`50%`,translate:`0 -50%`,"z-index":`${ln}`};return M(N,{get when(){return t()},get children(){var t=IS(),n=t.firstChild;return u(i=>{var a=ix(`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&&H(t,i.e=a),i.t=Qe(t,s,i.t),c!==i.a&&(n.data=i.a=c),i},{e:void 0,t:void 0,a:void 0}),t}})}})),VS,HS,US=n((()=>{K(),z(),BS(),VS=B(`<div><button data-react-grab-ignore-events type=button>`),HS=e=>(()=>{var t=VS(),n=t.firstChild;U(n,`mouseleave`,e.onMouseLeave),U(n,`mouseenter`,e.onMouseEnter),U(n,`contextmenu`,t=>e.onContextMenu?.(t)),U(n,`click`,e.onClick,!0);var r=e.ref;return typeof r==`function`?et(r,n):e.ref=n,G(n,()=>e.icon),G(t,M(N,{get when(){return e.tooltip},children:t=>M(zS,{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&&H(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&&H(n,r.n=l),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})(),Je([`click`])})),WS,GS,KS,qS,JS,YS,XS,ZS=n((()=>{X(),Tg(),sg(),WS=e=>e===`top`||e===`bottom`,GS=e=>{let t=WS(e);return{width:t?30:16,height:t?16:30}},KS=(e,t,n,r)=>{let i=wg(),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(WS(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}},qS=(e,t,n,r,i)=>{let a=wg(),o=a.width,s=a.height;if(WS(e)){let e=o-r-32;return e<=0?Mn:Math.max(0,Math.min(1,(t-a.offsetLeft-16)/e))}let c=s-i-32;return c<=0?Mn:Math.max(0,Math.min(1,(n-a.offsetTop-16)/c))},JS=(e,t,n,r,i)=>{let a=wg(),o=a.width,s=a.height,{width:c,height:l}=n,u;if(WS(t)){let n=(c-r)/2;u={x:og(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=og(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=qS(t,u.x,u.y,c,l);return{position:u,ratio:d}},YS=(e,t,n,r)=>{let i=wg(),{width:a,height:o}=n,{width:s,height:c}=r;switch(e){case`top`:case`bottom`:{let n=(a-s)/2;return{x:og(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=og(t.y+n,i.offsetTop,i.offsetTop+i.height-c);return{x:e===`left`?i.offsetLeft:i.offsetLeft+i.width-s,y:r}}}},XS=(e,t,n,r,i,a)=>{let o=wg(),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=>og(e,o.offsetLeft+16,o.offsetLeft+s-n-16),_=e=>og(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}}})),QS,$S,eC=n((()=>{K(),QS=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">`),$S=e=>{let t=()=>e.size??14;return(()=>{var n=QS();return u(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})()}})),tC,nC,rC=n((()=>{K(),ax(),ZS(),eC(),tC=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">`),nC=e=>{let t=()=>e.snapEdge??`bottom`,n=()=>!WS(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=tC(),r=t.firstChild,d=r.firstChild,f=d.firstChild,p=r.nextSibling;return U(t,`click`,e.onPanelClick,!0),U(t,`animationend`,e.onAnimationEnd),G(f,()=>e.actionButtons),U(p,`pointercancel`,e.onCollapsePointerLeave),U(p,`pointerleave`,e.onCollapsePointerLeave),U(p,`pointerup`,e.onCollapsePointerUp,!0),U(p,`pointerdown`,e.onCollapsePointerDown),U(p,`click`,e.onCollapseClick,!0),G(p,M($S,{size:18,get class(){return ix(`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=ix(`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=ix(`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]`),_=ix(`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=ix(`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&&H(t,s.e=u),m!==s.t&&W(t,`transform-origin`,s.t=m),h!==s.a&&W(t,`transform`,s.a=h),g!==s.o&&H(r,s.o=g),_!==s.i&&H(d,s.i=_),v!==s.n&&H(f,s.n=v),y!==s.s&&V(p,`aria-label`,s.s=y),b!==s.h&&V(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})()},Je([`click`,`pointerup`])})),iC,aC=n((()=>{z(),X(),df(),ro(),ZS(),iC=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&&(lf(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=XS(o.left,o.top,o.width,o.height,c.x,c.y),u=qS(l.edge,l.x,l.y,o.width,o.height);e.onSnapEdgeChange(l.edge,u),i(!0),v(),m=cf(()=>{let t=r?.getBoundingClientRect(),n=t?{width:t.width,height:t.height}:e.getExpandedDimensions();m=cf(()=>{m=void 0;let t=KS(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=no(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()}}}})),oC,sC,cC=n((()=>{oC=360,sC=(e,t)=>{let n=t-e;return e+(n-Math.round(n/oC)*oC)}})),lC,uC=n((()=>{lC=e=>{e.type===`contextmenu`&&e.preventDefault(),e.stopImmediatePropagation()}})),dC,fC=n((()=>{dC=(e,t,n,r)=>Math.max(r,Math.min(e,n-t-r))})),pC,mC=n((()=>{fC(),pC=({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+dC(u-r,t,a,c),top:i+dC(d-i,n,o,c)}}})),hC,gC=n((()=>{z(),X(),mC(),Tg(),ro(),df(),hC=(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&&(lf(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&&lf(b),b=cf(()=>{S(),e()?.offsetHeight,u(!0)})):(b!==void 0&&lf(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=eo(),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=wg(),a=pC({anchor:t(),measuredWidth:n(),measuredHeight:i(),viewportLeft:r.offsetLeft,viewportTop:r.offsetTop,viewportWidth:r.width,viewportHeight:r.height,anchorGapPx:8,viewportPaddingPx:8,offscreenPosition:Rn});return a.left===Rn.left?e:a},Rn),measure:S,clearAnimationHandles:x}}})),_C,vC=n((()=>{ro(),Jg(),za(),df(),_C=e=>{let t=no(t=>{e.isOpen()&&(e.shouldIgnoreKeyboardEvent?.(t)||e.shouldIgnoreInputEvents&&Ia(t)||t.code===`Escape`&&(t.preventDefault(),t.stopImmediatePropagation(),e.onDismiss(`keyboard`)))}),n=no(t=>{e.isOpen()&&(qg(t,`data-react-grab-ignore-events`)||e.shouldIgnoreRightClick&&t instanceof MouseEvent&&t.button===2||e.onDismiss(`pointer`))}),r=cf(()=>{window.addEventListener(`mousedown`,n,{capture:!0}),window.addEventListener(`touchstart`,n,{capture:!0})});return window.addEventListener(`keydown`,t,{capture:!0}),()=>{lf(r),window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`mousedown`,n,{capture:!0}),window.removeEventListener(`touchstart`,n,{capture:!0})}}})),yC,bC,xC=n((()=>{K(),z(),X(),ax(),uC(),gC(),vC(),yC=B(`<div data-react-grab-ignore-events>`),bC=e=>{let t,n=()=>e.interactive!==!1,r=hC(()=>t,()=>e.position);return v(()=>{r.measure();let t=e.onDismiss?_C({isOpen:()=>!!e.position,onDismiss:e.onDismiss}):void 0;y(()=>{r.clearAnimationHandles(),t?.()})}),M(N,{get when(){return r.shouldMount()},get children(){var i=yC(),a=t;return typeof a==`function`?et(a,i):t=i,$e(i,be(()=>({[e.dataAttribute]:``}),{get class(){return ix(`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":`${ln}`,"pointer-events":n()&&r.isAnimatedIn()?`auto`:`none`,"transform-origin":Y[r.lastAnchorEdge()],opacity:r.isAnimatedIn()?`1`:`0`,transform:r.isAnimatedIn()?`scale(1)`:`scale(0.92)`}},onPointerDown:lC,onMouseDown:lC,onClick:lC,onContextMenu:lC}),!1,!0),G(i,()=>e.children),i}})}})),SC,CC=n((()=>{P_(),SC=e=>{let t=Math.max(0,Date.now()-e);return t<6e4?`now`:t<36e5?`${Math.floor(t/j_)}m`:t<864e5?`${Math.floor(t/M_)}h`:`${Math.floor(t/N_)}d`}})),wC,TC=n((()=>{wC=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
|
+
`)})),EC,DC,OC,kC,AC=n((()=>{K(),z(),ep(),Nx(),xC(),Gx(),pS(),J_(),P_(),CC(),TC(),EC=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">`),DC=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">`),OC=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">×`),kC=e=>{let[t,n]=c(!1),r,i=()=>{e.items.length!==0&&$f(wC(e.items))&&(n(!0),clearTimeout(r),r=setTimeout(()=>n(!1),900))};return y(()=>clearTimeout(r)),M(bC,{get position(){return e.position},dataAttribute:`data-react-grab-comment-history`,get onDismiss(){return e.onDismiss},get children(){return M(Mx,{class:`overflow-hidden`,style:{width:`260px`,"max-width":`360px`,"max-height":`320px`},get children(){return[(()=>{var n=EC(),r=n.firstChild.nextSibling;return G(r,M(Wx,{"data-react-grab-comment-history-clear":!0,variant:`destructive`,"aria-label":`Clear comments`,onClick:()=>{K_(),e.onDismiss()},children:`Clear`}),null),G(r,M(Wx,{"data-react-grab-comment-history-copy-all":!0,"aria-label":`Copy all comments`,onClick:i,get children(){return M(N,{get when(){return t()},fallback:`Copy all`,get children(){return M(fS,{size:11})}})}}),null),n})(),(()=>{var t=DC(),n=t.firstChild;return G(n,M(Se,{get each(){return e.items},children:e=>(()=>{var t=OC(),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=()=>$f(e.content),G(s,()=>SC(e.timestamp)),c.$$click=()=>G_(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&&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})()]}})}})},Je([`click`])})),jC,MC,NC=n((()=>{K(),P_(),jC=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>`),MC=e=>{let t=()=>e.size??14;return(()=>{var n=jC();return u(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})()}})),PC,FC=n((()=>{K(),z(),df(),ao(),US(),AC(),J_(),NC(),P_(),PC=e=>{let t,n=null,[r,i]=c(U_()),[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(`[${io}]`)??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=cf(h)},g=()=>{n!==null&&(lf(n),n=null)},_=()=>{g(),d(null),o(!1)},b=e.createDragAwareHandler(()=>{if(a()){_();return}o(!0),h()});return v(()=>{m();let e=q_(e=>{i([...e]),e.length===0&&_()});y(()=>{e(),g()})}),M(N,{get when(){return r().length>0},get children(){return[M(HS,{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 M(MC,{size:14,get class(){return e.iconClass}})},tooltip:`Comments`,get tooltipVisible(){return yt(()=>!!s())()&&!a()},get tooltipPosition(){return e.tooltipPosition}}),M(N,{get when(){return f()},children:e=>M(ft,{get mount(){return e()},get children(){return M(kC,{get position(){return u()},get items(){return r()},onDismiss:_})}})})]}})}})),IC,LC,RC=n((()=>{K(),z(),ax(),MS(),FS(),US(),X(),rC(),Tg(),ro(),df(),ZS(),aC(),cC(),FC(),IC=B(`<div data-react-grab-ignore-events data-react-grab-toolbar>`),LC=e=>{let t,n,r=null,i=S_(),[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||vy()},A=iC({getContainerRef:()=>t,isCollapsed:s,getExpandedDimensions:()=>j,onDragStart:()=>{ie(null),r&&ae()},onPositionUpdate:e=>S(e),onSnapEdgeChange:(e,t)=>{ge(m(),e),h(e),b(t)},onSnapComplete:e=>{j=e.expandedDimensions,S(e.position),L({edge:e.edge,ratio:e.ratio,collapsed:s(),enabled:!s()})}}),oe=()=>!WS(m()),se=()=>oe()?`mb-1.5`:`mr-1.5`,ce=()=>e.defaultActionId??`copy`,le=t=>!!e.isActive&&(e.activeActionId??`copy`)===t,ue=t=>re()===t&&!e.isActive&&!s()&&!A.isDragging()&&!A.isSnapping()&&!e.isContextMenuOpen,de=()=>{switch(m()){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`;default:return`top`}},fe=e=>{e.stopImmediatePropagation()},pe=t=>({onMouseEnter:e=>{A.isDragging()||(ie(t()),r||(r=ab(),_y(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(_(()=>le(Nn),e=>{if(!e){ne(e=>sC(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=>sC(e,l))},o=no(e=>{r=e.clientX,i=e.clientY,t===null&&(t=cf(a))});window.addEventListener(`pointermove`,o,{passive:!0}),y(()=>{window.removeEventListener(`pointermove`,o),t!==null&&lf(t)})}));let j={width:38,height:28},[me,he]=c(GS(m())),ge=(e,t)=>{WS(e)!==WS(t)&&he(GS(t))},_e=(e,n)=>{let r=t?.getBoundingClientRect(),i=GS(n);return JS(e,n,j,r?.width??i.width,r?.height??i.height)},ve=()=>{S(KS(m(),g(),j.width,j.height))},ye=A.createDragAwareHandler(()=>{if(e.onActivateAction){e.onActivateAction(Nn);return}e.onToggle?.()}),xe=A.createDragAwareHandler(()=>e.onActivateAction?.(Pn)),Se=`group contain-layout flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox`,N=()=>ix(`relative contain-layout flex items-center justify-center`,se()),P=e=>e?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)]`,Ce=A.createDragAwareHandler(()=>{if(s()){ke();return}let e=t?.getBoundingClientRect(),n=g();e&&(j={width:e.width,height:e.height}),ee(!0),l(!0),L({edge:m(),ratio:n,collapsed:!0,enabled:!1}),Oe()}),F=()=>YS(m(),x(),j,me()),we,Te,Ee=null,De=()=>{let e=t?.getBoundingClientRect();!e||e.width===0||e.height===0||(s()?he({width:e.width,height:e.height}):(j={width:e.width,height:e.height},Ee={width:e.width,height:e.height}))},Oe=()=>{Te&&clearTimeout(Te),Te=setTimeout(()=>{ee(!1),De()},260)},ke=()=>{let{position:e,ratio:t}=_e(Ne(),m());S(e),b(t),ee(!0),l(!1),L({edge:m(),ratio:t,collapsed:!1,enabled:!0}),Oe()},Ae=(e,t)=>{if(!(e===0||t===0)&&!(A.isDragging()||A.isSnapping())&&!T()){if(s()){let n=me();if(n.width===e&&n.height===t)return;he({width:e,height:t});return}Ee&&Ee.width===e&&Ee.height===t||(Ee={width:e,height:t},j={width:e,height:t},S(KS(m(),g(),e,t)))}},je=null,Me=()=>{A.isDragging()||A.isSnapping()||je===null&&(je=cf(()=>{je=null,ve()}))},I=()=>{A.isDragging()||(p(!0),ve(),we&&clearTimeout(we),we=setTimeout(()=>{p(!1);let e=qS(m(),x().x,x().y,j.width,j.height);b(e),L({edge:m(),ratio:e,collapsed:s(),enabled:!s()})},500))},L=t=>{let n={...t,defaultAction:ce()};C_(n),e.onStateChange?.(n)};v(()=>{t&&e.onContainerRef?.(t);let n=t?.getBoundingClientRect(),r=wg(),a=!!(n&&n.width>0&&n.height>0);i?(a&&n&&(j={width:n.width,height:n.height}),l(i.collapsed),S(KS(i.edge,i.ratio,j.width,j.height))):a&&n?(j={width:n.width,height:n.height},S({x:r.offsetLeft+(r.width-n.width)/2,y:r.offsetTop+r.height-n.height-16}),b(Mn)):(S(KS(`bottom`,Mn,j.width,j.height)),b(Mn)),e.onSubscribeToStateChanges&&y(e.onSubscribeToStateChanges(e=>{if(T()||!t?.getBoundingClientRect())return;let n=s()!==e.collapsed;if(ge(m(),e.edge),h(e.edge),n&&!e.collapsed){let t=Ne();ee(!0),l(e.collapsed);let{position:n,ratio:r}=_e(t,e.edge);S(n),b(r),Oe()}else n&&(ee(!0),Oe()),l(e.collapsed),S(KS(e.edge,e.ratio,j.width,j.height)),b(e.ratio)})),window.addEventListener(`resize`,I),window.visualViewport?.addEventListener(`resize`,I),window.visualViewport?.addEventListener(`scroll`,I);let c=eo();if(c&&(window.addEventListener(`scroll`,Me,{passive:!0,capture:!0}),typeof ResizeObserver<`u`)){let e=new ResizeObserver(Me);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}Ae(i,a)});e.observe(t),y(()=>e.disconnect())}let u=setTimeout(()=>{o(!0)},500);y(()=>{clearTimeout(u)})}),y(()=>{window.removeEventListener(`resize`,I),window.visualViewport?.removeEventListener(`resize`,I),window.visualViewport?.removeEventListener(`scroll`,I),window.removeEventListener(`scroll`,Me,{capture:!0}),je!==null&&lf(je),clearTimeout(we),clearTimeout(Te),r&&ae()});let Ne=()=>s()?F():x(),Pe=()=>s()?`cursor-pointer`:A.isDragging()?`cursor-grabbing`:`cursor-grab`,R=()=>D()||!!e.isContextMenuOpen||A.isDragging()||A.isSnapping()||T()||E(),Fe=()=>!!e.isActive&&!R(),Ie=()=>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`,Le=()=>{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=IC();r.addEventListener(`mouseleave`,()=>{O(!1),e.onSelectHoverChange?.(!1)}),r.addEventListener(`mouseenter`,()=>{O(!0),s()||e.onSelectHoverChange?.(!0)}),U(r,`mousedown`,fe),U(r,`pointerdown`,e=>{fe(e),A.handlePointerDown(e)});var i=t;return typeof i==`function`?et(i,r):t=r,G(r,M(nC,{get isCollapsed(){return s()},get snapEdge(){return m()},get isShaking(){return C()},get isChevronPressed(){return E()},get transformOrigin(){return Le()},onAnimationEnd:()=>w(!1),onCollapseClick:Ce,onCollapsePointerDown:()=>te(!0),onCollapsePointerUp:()=>te(!1),onCollapsePointerLeave:()=>te(!1),onPanelClick:e=>{s()&&(e.stopPropagation(),ke())},get actionButtons(){return[M(HS,be({actionId:Nn,isToggle:!0,ref:e=>n=e,get label(){return le(`copy`)?`Stop selecting element`:`Copy element`},get isActive(){return le(Nn)},class:Se,get wrapperClass(){return N()},onClick:ye,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),ie(null),e.onToggleToolbarMenu?.()}},()=>pe(()=>Nn),{get icon(){return M(jS,{size:14,get rotationDeg(){return k()},get class(){return P(le(Nn))}})},get tooltipVisible(){return ue(Nn)},get tooltipPosition(){return de()},tooltip:`Copy`})),M(HS,be({actionId:Pn,get label(){return le(`comment`)?`Stop commenting`:`Comment on element`},get isActive(){return le(Pn)},class:Se,get wrapperClass(){return N()},onClick:xe},()=>pe(()=>Pn),{get icon(){return M(PS,{size:14,get class(){return P(le(Pn))}})},get tooltipVisible(){return ue(Pn)},get tooltipPosition(){return de()},tooltip:`Comment`})),M(PC,be({get edge(){return m()},buttonClass:Se,get wrapperClass(){return N()},get iconClass(){return P(!1)},get tooltipPosition(){return de()},get createDragAwareHandler(){return A.createDragAwareHandler}},()=>pe(()=>`comment-history`)))]}})),u(e=>{var t=ix(`fixed left-0 top-0 font-sans text-[13px] antialiased select-none`,Pe(),Ie(),a()?`pointer-events-auto`:`pointer-events-none`),n=String(ln),i=`translate(${Ne().x}px, ${Ne().y}px) scale(${Fe()?.97:1})`,o=Le(),s=a()?Fe()?.55:1:0;return t!==e.e&&H(r,e.e=t),n!==e.t&&W(r,`z-index`,e.t=n),i!==e.a&&W(r,`transform`,e.a=i),o!==e.o&&W(r,`transform-origin`,e.o=o),s!==e.i&&W(r,`opacity`,e.i=s),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),r})()}})),zC,BC,VC=n((()=>{z(),zC=w(),BC=()=>{let e=T(zC);if(!e)throw Error(`Menu subcomponents must be rendered inside <Menu.Provider>`);return e}})),HC,UC=n((()=>{K(),VC(),HC=e=>M(zC.Provider,{get value(){return e.store},get children(){return e.children}})})),WC,GC=n((()=>{K(),ax(),Nx(),WC=e=>M(Mx,{get class(){return ix(`flex flex-col w-fit h-fit`,e.class)},get style(){return e.style},get children(){return e.children}})})),KC,qC,JC=n((()=>{K(),ax(),VC(),KC=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)]">`),qC=e=>{let t=BC();return(()=>{var n=KC(),r=n.firstChild;n.$$pointermove=()=>t.notePointerMove(),et(n=>{t.setHighlightContainer(n),e.ref?.(n)},n);var i=t.setHighlightRail;return typeof i==`function`?et(i,r):t.setHighlightRail=r,G(n,()=>e.children,null),u(r=>{var i=e.label,a=t.keyboardNavigation?t.activeDescendantId():void 0,o=t.keyboardNavigation?-1:void 0,s=ix(`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&&H(n,r.o=s),r},{e:void 0,t:void 0,a:void 0,o:void 0}),n})()},Je([`pointermove`])})),YC,XC,ZC=n((()=>{K(),z(),ax(),VC(),YC=B(`<button data-react-grab-ignore-events type=button>`),XC=e=>{let t=BC(),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=YC();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`?et(l,c):s=c,V(c,`id`,n),G(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=ix(`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&&H(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})()},Je([`pointerdown`,`click`])})),QC,$C,ew=n((()=>{K(),ax(),QC=B(`<span> `),$C=e=>(()=>{var t=QC(),n=t.firstChild;return u(r=>{var i=ix(`text-[13px] leading-4 font-sans font-medium`,e.class),a=e.textContent;return i!==r.e&&H(t,r.e=i),a!==r.t&&(n.data=r.t=a),r},{e:void 0,t:void 0}),t})()})),tw,nw,rw=n((()=>{K(),tw=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">`),nw=e=>{let t=()=>e.size??11;return(()=>{var n=tw();return u(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})()}})),iw,aw,ow,sw=n((()=>{K(),z(),Bg(),rw(),Vx(),iw=B(`<span> `),aw=B(`<span style=display:inline-flex;align-items:center;gap:2px>`),ow=e=>{let t=()=>e.shortcut===`Enter`,n=()=>e.modifier!==!1,r=zg();return(()=>{var i=aw();return G(i,M(N,{get when(){return t()},get children(){return M(Bx,{size:8})}}),null),G(i,M(N,{get when(){return!t()},get children(){return M(N,{get when(){return n()},get fallback(){return(()=>{var t=iw(),n=t.firstChild;return u(()=>n.data=e.shortcut),t})()},get children(){return M(N,{when:r,get fallback(){return(()=>{var t=iw(),n=t.firstChild;return u(()=>n.data=`Ctrl+${e.shortcut}`),t})()},get children(){return[M(nw,{size:9}),(()=>{var t=iw(),n=t.firstChild;return u(()=>n.data=e.shortcut),t})()]}})}})}}),null),u(()=>H(i,e.class)),i})()}})),cw,lw=n((()=>{K(),ax(),sw(),cw=e=>M(ow,{get shortcut(){return e.shortcut},get modifier(){return e.modifier},get class(){return ix(`text-[11px] font-sans text-[var(--rg-text-secondary)] ml-4`,e.class)}})})),uw,dw,fw,pw,mw,hw,gw=n((()=>{z(),uw=`0`,dw=`1`,fw=({hiddenOpacity:e=uw,visibleOpacity:t=dw}={})=>{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}},pw=(e,t)=>e!==t&&e instanceof HTMLElement,mw=(e,t)=>{let n=[];for(let r of Array.from(e.children))pw(r,t)&&n.push(r);return n},hw=(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=mw(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}=fw();return{containerRef:c,highlightRef:e=>{a=e,o=!1,l(e)},updateHighlight:e=>{u(e),e&&s(e)},clearHighlight:d}}})),_w,vw=n((()=>{z(),gw(),_w=(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=hw(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}}})),yw,bw=n((()=>{UC(),GC(),JC(),ZC(),ew(),lw(),vw(),yw={Provider:HC,Panel:WC,List:qC,Item:XC,Label:$C,Shortcut:cw}})),xw,Sw,Cw,ww=n((()=>{K(),z(),X(),gx(),wx(),Dx(),bw(),sx(),gb(),df(),uC(),vC(),ro(),xw=B(`<div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">`),Sw=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>`),Cw=e=>{let t,n,r=null,i=_w({keyboardNavigation:!0,highlight:{bottomCornerRadiusPx:14,cornerShape:Fn}}),[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()&&cf(h)});let g=f(()=>{let t=e.selectionBounds,n=e.position,r=a(),i=s();if(r===0||i===0||!t||!n)return{left:Rn.left,top:Rn.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&&_b(e,n)},enabled:hb(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))&&cf(()=>{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&&_b(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=ub(c,t,{includeModifierShortcuts:!0});d&&u(d)},n=_C({isOpen:p,onDismiss:e.onDismiss,shouldIgnoreRightClick:!0}),r=no(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 M(N,{get when(){return p()},get children(){var r=Sw();U(r,`contextmenu`,lC,!0),U(r,`click`,lC,!0),U(r,`mousedown`,lC,!0),U(r,`pointerdown`,lC,!0);var a=t;return typeof a==`function`?et(a,r):t=r,W(r,`z-index`,`${ln}`),G(r,M(hx,{get position(){return g().arrowPosition},leftPercent:0,get leftOffsetPx(){return g().arrowLeft}}),null),G(r,M(yw.Panel,{class:`justify-center items-start min-w-[100px]`,get children(){return[(()=>{var t=xw();return G(t,M(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&&_b(t,e.actionContext)}},shrink:!0})),t})(),M(Ex,{get children(){return M(yw.Provider,{store:i,get children(){return M(yw.List,{ref:e=>n=e,get label(){return x()},class:`w-[calc(100%+16px)] -mx-2 -my-1.5 outline-none`,get children(){return M(Se,{get each(){return b()},children:t=>M(yw.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[M(yw.Label,{class:`text-[var(--rg-text-primary)]`,get textContent(){return t.label}}),M(N,{get when(){return t.shortcut},children:e=>M(yw.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&&W(r,`top`,e.e=t),n!==e.t&&W(r,`left`,e.t=n),e},{e:void 0,t:void 0}),r}})},Je([`pointerdown`,`mousedown`,`click`,`contextmenu`])})),Tw,Ew=n((()=>{K(),z(),X(),bw(),xC(),Tw=e=>{let t=_w({clearActiveOnPointerLeave:!0,highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:Fn}});return M(bC,{get position(){return e.position},dataAttribute:`data-react-grab-toolbar-menu`,get onDismiss(){return e.onDismiss},get children(){return M(yw.Panel,{class:`overflow-hidden`,style:{"min-width":`100px`},get children(){return M(yw.Provider,{store:t,get children(){return M(yw.List,{label:`Default action`,get children(){return M(Se,{get each(){return e.actions},children:t=>{let n=()=>t.id===e.defaultActionId;return M(yw.Item,{get value(){return t.id},role:`menuitemradio`,get checked(){return n()},onSelect:()=>{e.onSetDefaultAction(t.id),e.onDismiss()},get children(){return[M(yw.Label,{get class(){return n()?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)]`},get textContent(){return t.label}}),M(N,{get when(){return t.shortcut},children:e=>M(yw.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})}})}})}})}})}})}})),Dw,Ow,kw,Aw,jw,Mw=n((()=>{K(),z(),X(),bw(),xC(),Dw=B(`<span aria-hidden=true class="shrink-0 font-mono text-[11px] leading-4 text-[var(--rg-text-secondary)] opacity-60 mr-1"> `),Ow=B(`<span> `),kw=B(`<span class=text-[var(--rg-text-secondary)]>.`),Aw=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> `),jw=e=>{let t=()=>e.state?.activeIndex??0,n=_w({value:()=>String(t()),highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:Fn}});return M(bC,{get position(){return e.position},dataAttribute:`data-react-grab-hierarchy-menu`,interactive:!1,get children(){return M(yw.Panel,{class:`overflow-hidden`,style:{"min-width":`160px`},get children(){return M(yw.Provider,{store:n,get children(){return M(yw.List,{label:`Navigate element hierarchy`,get children(){return M(Se,{get each(){return e.state?.items??[]},children:(e,n)=>M(yw.Item,{get value(){return String(n())},role:`menuitemradio`,get checked(){return n()===t()},get children(){var r=Aw(),i=r.firstChild,a=i.firstChild,o=a.firstChild;return G(r,M(N,{get when(){return e.depth>0},get children(){var t=Dw(),n=t.firstChild;return u(r=>{var i=`${(e.depth-1)*12}px`,a=e.isLast?`└─`:`├─`;return i!==r.e&&W(t,`padding-left`,r.e=i),a!==r.t&&(n.data=r.t=a),r},{e:void 0,t:void 0}),t}}),i),G(i,M(N,{get when(){return e.componentName},get children(){return[(()=>{var t=Ow(),n=t.firstChild;return u(()=>n.data=e.componentName),t})(),kw()]}}),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}})})}})}})}})}})}})),Nw=r({ReactGrabRenderer:()=>Pw}),Pw,Fw=n((()=>{K(),z(),X(),na(),Gb(),Jb(),kS(),RC(),ww(),Ew(),Mw(),Pw=e=>[M(Wb,{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}}),M(qb,{get visible(){return e.isFrozen??!1}}),M(N,{get when(){return yt(()=>!!e.selectionLabelVisible)()&&(e.frozenLabelEntryAccessors?.length??0)>0},get children(){return M(Se,{get each(){return e.frozenLabelEntryAccessors??[]},children:e=>M(N,{get when(){return e.read()},children:e=>M(OS,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})})})}}),M(N,{get when(){return yt(()=>!!e.selectionLabelVisible)()&&e.pendingShiftPreviewEntry},children:e=>M(OS,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})}),M(N,{get when(){return yt(()=>!!(e.selectionLabelVisible&&e.selectionBounds))()&&(e.frozenLabelEntryAccessors?.length??0)===0},get children(){return M(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}})}}),M(Se,{get each(){return e.labelInstanceAccessors??[]},children:t=>M(N,{get when(){return t.read()},children:t=>M(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`)||!ta(n.element)))return()=>e.onShowContextMenuInstance?.(n.id)},onRetry:()=>e.onRetryInstance?.(t().id),onAcknowledgeError:()=>e.onAcknowledgeErrorInstance?.(t().id),onHoverChange:n=>e.onLabelInstanceHoverChange?.(t().id,n)})})}),M(N,{get when(){return e.toolbarVisible!==!1},get children(){return M(LC,{get isActive(){return e.isActive},get isContextMenuOpen(){return e.contextMenuPosition!==null},get onToggle(){return e.onToggleActive},get onActivateAction(){return e.onActivateAction},get activeActionId(){return e.activeActionId},get defaultActionId(){return e.defaultActionId},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}})}}),M(Cw,{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??(()=>{})}}),M(Tw,{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??(()=>{})}}),M(jw,{get position(){return e.hierarchyMenuPosition??null},get state(){return e.hierarchyState}})]}));K(),z(),ja(),za(),ro(),df(),ag(),Rp(),Ep(),na(),$i(),Gm(),Na(),X(),Ga(),Ha(),Jg(),ao(),Bg(),w_(),Wv(),yy(),ob(),o_(),Zg(),db(),vb(),Wn(),qm(),Ui(),ep();let Iw=[E_,D_,O_,Y_],Lw={status:`cancelled`},Rw=!1,zw=e=>{if(typeof window>`u`)return Xf();let t={enabled:!0,activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,...v_(),...e};if(t.enabled===!1||Rw)return Xf();Rw=!0,$a(t.container??null),h_(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=i_(a),{store:l,actions:u,pointer:p,viewportVersion:h,current:v}=_a({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?(_y(p().x,p().y),ie(`touchAction`,`none`)):!e&&t&&(vy(),ae(`touchAction`))}));let A=S_(),[oe,se]=c(A?!A.collapsed:!0),[ce,le]=c(0),[ue,de]=c(0),[fe,pe]=c(A),[j,me]=c(!1),he=T_(e=>e.shiftKey),[_e,ve]=c(null),[ye,be]=c(null),xe=f(()=>l.contextMenuPosition!==null),Se=f(()=>xe()||_e()!==null),N,P=null,Ce=new WeakMap,F=pb(),we=()=>!oe()||O()||te()||xe()||F.isPendingDismiss(),Te=()=>{Ge(!1),Ce=new WeakMap},Ee=e=>{let t=fe()??S_(),n={edge:t?.edge??`bottom`,ratio:t?.ratio??.5,collapsed:t?.collapsed??!1,enabled:t?.enabled??!0,defaultAction:t?.defaultAction??`copy`,...e};C_(n),pe(n),bb(o,n)},De=()=>{Ue.timerId!==null&&(clearTimeout(Ue.timerId),Ue.timerId=null)},Oe=()=>{Ue.copyWaiting=!1,Ue.holdTimerFired=!1,Ue.startTimestamp=null};d(()=>{if(v().state!==`holding`){De();return}Ue.startTimestamp=Date.now(),Ue.timerId=window.setTimeout(()=>{if(Ue.timerId=null,Ue.copyWaiting){Ue.holdTimerFired=!0;return}u.activate()},l.keyHoldDuration),y(De)}),d(()=>{let e=v();if(e.state!==`active`||e.phase!==`justDragged`)return;let t=setTimeout(()=>{u.finishJustDragged()},nn);y(()=>clearTimeout(t))}),d(()=>{if(v().state!==`justCopied`)return;let e=setTimeout(()=>{u.finishJustCopied()},nn);y(()=>clearTimeout(e))}),d(_(b,(e,t=!1)=>{!t||e||!x()||(s.store.options.activationMode!==`hold`&&u.setWasActivatedByToggle(!0),s.hooks.onActivate())}));let ke=(e,t,n)=>{u.setCopyStart({x:t,y:n},e),u.clearInputText()},Ae=()=>{let e=l.frozenElement||q();e&&u.enterPromptMode({x:p().x,y:p().y},e)},je={lastDetectionTimestamp:0,pendingDetectionScheduledAt:0,latestPointerX:0,latestPointerY:0},Me=null,I={x:0,y:0},L=0,Ne=0,[Pe,R]=c(null),[Fe,Ie]=c(0),Le=()=>{Me!==null&&(clearTimeout(Me),Me=null)},Re=e=>{R({x:I.x,y:I.y}),L=e},ze=(e,t)=>{if(!w())return;I.x=e,I.y=t;let n=performance.now(),r=n-L,i=Ne>=16;if(L===0||!i&&r>=100){Le(),Re(n);return}Le(),Me=window.setTimeout(()=>{w()&&Re(performance.now()),Me=null},i?32:Math.min(32,100-r))},Be=(e,t,n)=>(Le(),_g(e,{x:t,y:n},Lp)),Ve=()=>{Le(),L=0,Ne=0,R(null),Yt()},He=null,Ue={timerId:null,startTimestamp:null,copyWaiting:!1,holdTimerFired:!1},We=null,[z,Ge]=c(!1),Ke=0,B=!1,Je=null,V=()=>{B=!0,Je!==null&&window.clearTimeout(Je),Je=window.setTimeout(()=>{B=!1,Je=null},nn)},Ye=()=>{Je!==null&&(window.clearTimeout(Je),Je=null),B=!1},Xe=0,H=null,U=null,[Ze,Qe]=c(!1),[W,$e]=c(null),[et,G]=c(null),[tt,nt]=rf(et),rt=f(()=>k()?Pn:Ze()?W():x()?Nn:null),it=e=>Ng(e,Lp),at=u_(Lp,it,Z),ot=p_(p,()=>C(),e=>{if(T()){if(u.shiftDragStart(e),We){We={x:We.x+e.x,y:We.y+e.y};return}let{pageX:t,pageY:n}=Ht(p().x,p().y);We={x:t,y:n}}}),st=f(()=>x()&&!E()),ct=new Map,lt=(e,t)=>{let n=a_(`grabbed`),r={id:n,bounds:e,createdAt:Date.now(),element:t};u.addGrabbedBox(r),s.hooks.onGrabbedBox(e,t);let i=window.setTimeout(()=>{ct.delete(n),u.removeGrabbedBox(n)},nn+125);ct.set(n,i)},ut=async e=>{let n=await Promise.all(e.map(async e=>{let t=await Ld(e),n=t?.componentName??null,r=t?.filePath,i=t?.lineNumber??void 0,a=t?.columnNumber??void 0;n||=Rd(e);let o=Un(e)?e.innerText?.slice(0,100):void 0;return{tagName:Ma(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}}))},dt=new Map,ft=c_(u,()=>l.labelInstances,()=>dt.clear()),pt=e=>{for(let t of e)l.labelInstances.find(e=>e.id===t)?.status===`copying`&&(dt.delete(t),ft.dismissInstance(t))},mt=()=>{n.abort()},ht=()=>(n.signal.aborted&&!t&&(n=new AbortController),n.signal),gt=()=>(mt(),ht()),_t=()=>{mt(),r=null,pt(l.labelInstances.filter(e=>e.status===`copying`).map(e=>e.id))},vt=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 Lw;r={status:`failed`},i=tp(e,`Action failed`)}if(t)for(let e of t)ft.updateAfterCopy(e,r.status===`succeeded`,i);return r},bt=(e,t,n,r)=>{if(e){for(let e of n)dt.delete(e);return}let i={operation:t,siblingIds:new Set(n),shouldDeactivateAfter:r};for(let e of n)dt.set(e,i)},xt=async(e,t,n,r=gt())=>{if(r.aborted)return!1;Ye(),v().state!==`copying`&&u.startCopy();let i=await vt(e,t,r);if(i.status===`cancelled`)return!1;let a=i.status===`succeeded`;return t&&bt(a,e,t,!!n),v().state===`copying`?(a&&u.completeCopy(),n?J():a?(u.activate(),V()):(u.activate(),u.unfreeze()),!0):!0},K=e=>{let t=dt.get(e);if(!t)return;let n=[...t.siblingIds];for(let e of n)ft.markRetrying(e),dt.delete(e);xt(t.operation,n,t.shouldDeactivateAfter).then(e=>{e||pt(n)})},Ct=e=>{dt.get(e)?.siblingIds.delete(e),dt.delete(e),ft.dismissInstance(e)},wt=(e,t,n,r)=>{let i=e[0],a=r??(i?Rd(i):null),o=i?Ma(i):null,c=a??o??void 0;return up({getContent:s.store.options.getContent,componentName:c,maxContextLines:s.store.options.maxContextLines,signal:t},s.hooks,e,n)},Tt=async(e,t,n,r=ht())=>{if(e.length===0||r.aborted)return Lw;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&<(Z(t),t)}if(await uf(),r.aborted)return Lw;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 ip(Promise.all(a),r);if(e===rp)return o?.status===`succeeded`?o:Lw;if(!e.every(Boolean))throw new Aa}return r.aborted&&!o?Lw:(ut(e).catch(e=>{Q(new ya(`Element selection notification failed`,e))}),o??{status:`succeeded`})},Et=e=>{let n=gt(),i={},a=!1;r=i,Ad(e.primaryElement).then(async t=>{if(n.aborted||r!==i){pt(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?.():pt(e.labelInstanceIds)}).catch(o=>{if(n.aborted){pt(e.labelInstanceIds);return}if(t||!a&&r!==i)return;Q(new ya(`Copy operation failed`,o));let s=tp(o,`Action failed`);for(let t of e.labelInstanceIds)ft.updateAfterCopy(t,!1,s);e.labelInstanceIds.length>0&&bt(!1,t=>Ad(e.primaryElement).then(n=>t.aborted?Lw:Tt(e.targetElements,e.extraPrompt,n??void 0,t)),e.labelInstanceIds,!!e.shouldDeactivateAfter),v().state===`copying`&&(e.shouldDeactivateAfter?J():(u.activate(),u.unfreeze()))}).finally(()=>{r===i&&(r=null)})},Dt=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===Ft()?Vt():void 0,m=d&&f?Dg(d):p??Z(t),h=f?m.x+m.width/2:n,g=Ma(t);Ye(),u.startCopy();let _=g?ft.createInstance(m,g,void 0,`copying`,{element:t,mouseX:h,elements:r}):null;Et({primaryElement:t,targetElements:c,labelInstanceIds:_?[_]:[],extraPrompt:i,shouldDeactivateAfter:a,onComplete:o})},Ot=e=>{let{elements:t,labelEntries:n,shouldDeactivateAfter:r,onComplete:i}=e,a=t[0];Ye(),u.startCopy(),Et({primaryElement:a,targetElements:t,labelInstanceIds:ft.createPerElementInstances(n,`copying`),shouldDeactivateAfter:r,onComplete:i})},q=f(()=>{if(h(),!st()||w()||te()||F.isPendingDismiss())return null;let e=l.detectedElement;return ta(e)?e:null}),kt=f(()=>l.frozenElement||(S()?null:q())),At=f(()=>!x()||O()||z()||E()||Se()||F.isPendingDismiss()?null:he()?S()?kt():q()??l.frozenElement:F.selectedElement()),jt=f(()=>{let e=At();return e?Ag(e,Lp,it):[]}),Mt=f(()=>{let e=At();return e?Math.max(0,jt().findIndex(t=>t.element===e)):0}),Nt=f(()=>At()!==null);d(()=>{if(!l.detectedElement)return;let e=1,t=setInterval(()=>{if(ta(l.detectedElement)||u.relinkLiveElements(),!ta(l.detectedElement)){if(e>0){--e;return}sr()}},100);y(()=>clearInterval(t))}),d(_(kt,e=>{if(H!==null&&(clearTimeout(H),H=null),!e){G(null);return}H=window.setTimeout(()=>{H=null,G(e)},100)})),y(()=>{H!==null&&(clearTimeout(H),H=null)}),d(()=>{let e=l.frozenElements;y(Iv(e))}),d(_(x,e=>{e&&s.store.options.freezeReactUpdates&&y(ab())}));let Pt=()=>{if(l.isTouchMode&&C()){let e=l.detectedElement;return!ta(e)||Tp(e)?void 0:e}let e=kt();if(!(!e||Tp(e)))return e},Ft=f(()=>Pt()),It=()=>Ft()?l.isTouchMode&&C()?st():st()&&!w():!1,Lt=ge(()=>l.frozenElements,e=>f(()=>(h(),Z(e)))),Rt=f(()=>{let e=l.frozenElements;if(e.length===0)return[];let t=l.frozenDragRect;return t&&e.length>1?[Dg(t)]:Lt().map(e=>e())}),zt=f(()=>{if(!z()||l.pendingCommentMode||Ze())return null;let e=l.detectedElement;return!ta(e)||Tp(e)||l.frozenElements.includes(e)?null:e}),Bt=f(()=>{h();let e=zt();if(e)return Z(e)}),Vt=f(()=>{h();let e=l.frozenElements;if(e.length>0){let t=Rt();if(e.length===1){let e=t[0];if(e)return e}let n=l.frozenDragRect;return n?t[0]??Dg(n):kg(e_(t))}let t=Ft();if(t)return Z(t)}),Ht=(e,t)=>({pageX:e+window.scrollX,pageY:t+window.scrollY}),Ut=(e,t)=>{let{pageX:n,pageY:r}=Ht(e,t);return{x:Math.abs(n-l.dragStart.x),y:Math.abs(r-l.dragStart.y)}},Wt=(e,t)=>{let{pageX:n,pageY:r}=Ht(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}},Gt=e=>e.code===`Space`||e.key===` `,Kt=()=>{if(!C())return;u.startDragReposition();let{pageX:e,pageY:t}=Ht(p().x,p().y);We={x:e,y:t}},qt=()=>{u.stopDragReposition(),We=null},Jt=f(()=>{if(h(),w())return kg(Wt(p().x,p().y))}),Yt=f(()=>{if(Fe(),!w())return[];let e=Pe();if(!e)return[];let t=Wt(e.x,e.y),n=performance.now(),r=_g(t,e,Lp);return Ne=performance.now()-n,r}),Xt=f(()=>(h(),Yt().map(e=>Z(e)))),Zt=f(()=>{let e=Xt();if(e.length>0)return e;let t=Bt();return t?[...Rt(),t]:Rt()}),Qt=ge(()=>l.frozenElements,e=>{let t=Ma(e)||`element`,n=Rd(e)??void 0;return{read:f(()=>{if(h(),!ta(e))return null;let r=Z(e),i=Ce.get(e);return{tagName:t,componentName:n,bounds:r,mouseX:i===void 0?void 0:r.x+r.width*i}})}}),$t=f(()=>{if(O()||l.frozenElements.length<2)return[];let e=[];for(let t of Qt())t.read()!==null&&e.push(t);return e}),en=f(()=>{if(O())return null;let e=zt();return e?(h(),{tagName:Ma(e)||`element`,componentName:Rd(e)??void 0,bounds:Z(e),mouseX:p().x}):null}),tn=f(()=>{if(E()||O()){h();let e=l.frozenElement||q();return e?{x:ea(Z(e)).x+l.copyOffsetFromCenterX,y:l.copyStart.y}:{x:l.copyStart.x,y:l.copyStart.y}}return{x:p().x,y:p().y}}),rn=f(()=>{if(!z()||l.frozenElements.length!==1)return;h();let e=l.frozenElements[0];if(!ta(e))return;let t=Ce.get(e);if(t===void 0)return;let n=Z(e);return n.x+n.width*t});d(_(()=>[q(),l.lastGrabbedElement],([e,t])=>{t&&e&&t!==e&&u.setLastGrabbed(null),e&&s.hooks.onElementHover(e)})),d(_(()=>q(),e=>{let t=++Xe,n=()=>{Xe===t&&u.setSelectionSource(null,null)};if(!e){n();return}Ld(e).then(e=>{if(Xe===t){if(!e){n();return}u.setSelectionSource(e.filePath,e.lineNumber)}}).catch(()=>{Xe===t&&u.setSelectionSource(null,null)})}));let an=f(()=>l.grabbedBoxes.map(e=>({id:e.id,bounds:e.bounds,createdAt:e.createdAt}))),on=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=q(),a=Jt(),o=s.store.theme.enabled,c=s.store.theme.selectionBox.enabled,u=s.store.theme.dragBox.enabled,d=w(),f=kt(),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:[...an()],labelInstances:[...on()],selectionFilePath:l.selectionFilePath,toolbarState:fe()}}),e=>{s.hooks.onStateChange(e)})),d(_(()=>{let e=O();return{inputMode:e,position:e?p():g(p),target:e?q():g(q)}},({inputMode:e,position:t,target:n})=>{s.hooks.onPromptModeChange(e,{x:t.x,y:t.y,targetElement:n})})),d(_(()=>[Dr(),Vt(),q()],([e,t,n])=>{s.hooks.onSelectionBox(!!e,t??null,n)})),d(_(()=>[Lr(),Jt()],([e,t])=>{s.hooks.onDragBox(!!e,t??null)})),d(_(()=>{let e=zr();return[e,Rr(),e?tn():g(tn),e?q():g(q),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&&Ma(r)||void 0,filePath:i??void 0,lineNumber:a??void 0})}));let sn=null,cn=e=>{if(e){if(!sn){sn=document.createElement(`style`),sn.setAttribute(`data-react-grab-cursor`,``);let e=Va();e&&(sn.nonce=e),Wa(sn),document.head.appendChild(sn)}sn.textContent=`* { cursor: ${e} !important; }`}else sn&&=(sn.remove(),null)};d(_(()=>[x(),E(),O()],([e,t,n])=>{cn(t?`progress`:e&&!n?`crosshair`:null)}));let ln=()=>{let e=b();u.activate(),e||s.hooks.onActivate()},J=()=>{_t();let e=C(),t=l.previouslyFocusedElement;qt(),u.deactivate(),$r(),Te(),Hn(),F.clear(),Qe(!1),$e(null),e&&(ae(`userSelect`),Ve()),He&&window.clearTimeout(He),ot.stop(),Un(t)&&t!==document.body&&t!==document.activeElement&&ta(t)&&t.focus({preventScroll:!0}),s.hooks.onDeactivate()},un=()=>{b()&&u.releaseHold(),x()||E()?J():_t(),Ye()},dn=()=>{u.setWasActivatedByToggle(!0),ln()},fn=()=>{let e=[...l.frozenElements],t=l.frozenElement||q(),n=O()?l.inputText.trim():``;if(!t){J();return}let r=e.length>0?e:[t],i=r.map(e=>Z(e))[0],{x:a,y:o}=ea(i),s=a+l.copyOffsetFromCenterX;u.setPointer({x:a,y:o}),u.exitPromptMode(),u.clearInputText(),Dt({element:t,cursorX:s,selectedElements:r,extraPrompt:n||void 0,shouldDeactivateAfter:!0})},pn=()=>{if(O()){if(ne()){u.clearInputText(),J();return}u.setPendingDismiss(!0),de(e=>e+1)}},mn=()=>{if(F.isPendingDismiss()){Kn();return}u.clearInputText(),J()},hn=()=>{u.setPendingDismiss(!1)},gn=()=>{U=null,Qe(!1),u.setPendingCommentMode(!1),$e(null)},_n=e=>{U=e,$e(e),Qe(!0)},vn=e=>{let t=l.frozenElement||q();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(),gn(),_b(r,Qn(t,n))||xn(t,n),!0):(u.clearInputText(),u.exitPromptMode(),gn(),xn(t,n),!0)},yn=e=>{if(E()){J();return}if(x()){if(rt()!==e){if(O()){if(vn(e))return;J();return}u.setPendingCommentMode(!1),_n(e);return}J();return}oe()&&(_n(e),dn())},bn=(e,t,n)=>{gn(),u.clearInputText(),u.enterPromptMode({x:t,y:n},e)},xn=(e,t)=>{Te(),ei(),u.showContextMenu(t,e),Hn(),s.hooks.onContextMenu(e,t)},Sn=(e,t)=>{let n=U;if(U=null,$e(null),!n)return;let r=s.store.actions.find(e=>e.id===n);if(!r){xn(e,t);return}_b(r,Qn(e,t))||xn(e,t)},Cn=()=>{if(oe()){if(x()&&k()){J();return}u.setPendingCommentMode(!0),x()||dn()}},En=(e,t,n)=>{let r=n&&z()&&!C()&&!l.pendingCommentMode&&!Ze();if(we()||S()&&!r)return;if(u.setPointer({x:e,y:t}),je.latestPointerX=e,je.latestPointerY=t,r){let n=rg(e,t);n!==l.detectedElement&&u.setDetectedElement(n);return}let i=performance.now(),a=je.pendingDetectionScheduledAt>0&&i-je.pendingDetectionScheduledAt<200;if(!w()&&!a){je.pendingDetectionScheduledAt=i;let e=Math.max(0,32-(i-je.lastDetectionTimestamp));setTimeout(()=>{if(we()||S()||w()){je.pendingDetectionScheduledAt=0;return}l.detectedElement&&!ta(l.detectedElement)&&(u.relinkLiveElements(),ig()),je.lastDetectionTimestamp=performance.now();let e=rg(je.latestPointerX,je.latestPointerY);e!==l.detectedElement&&u.setDetectedElement(e),je.pendingDetectionScheduledAt=0},e)}if(C()){if(T()){let{pageX:n,pageY:r}=Ht(e,t);We&&u.shiftDragStart({x:n-We.x,y:r-We.y}),We={x:n,y:r}}ze(e,t);let n=f_(e,t),r=n.top||n.bottom||n.left||n.right;r&&!ot.isActive()?ot.start():!r&&ot.isActive()&&ot.stop()}},Dn=(e,t,n)=>{if(!st()||te())return!1;!n&&z()&&Te();let r=F.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},On=(e,t)=>{let n=l.frozenElements.includes(e),r=l.frozenElements.length===0;if(!n){let n=vg(Z(e),t);Ce.set(e,n),r&&nt(Rd(e)??void 0)}u.toggleFrozenElement(e),ig();let i=l.frozenElements.includes(e);if(i||Ce.delete(e),l.frozenElements.length===0){Te(),u.unfreeze();return}Pv(l.frozenElements),Ge(!0),u.setPointer(t),u.setLastGrabbed(i?e:l.frozenElements[l.frozenElements.length-1]),u.freeze(),Hn()},kn=()=>{let e=l.frozenElements.filter(ta),t=e.map(e=>{let t=Ma(e)||`element`,n=Rd(e)??void 0,r=Ce.get(e),i=Z(e);return{element:e,tagName:t,componentName:n,mouseX:r===void 0?i.x+i.width/2:i.x+i.width*r}});if(Te(),e.length===0){u.unfreeze();return}if(e.length===1){Dt({element:e[0],cursorX:t[0].mouseX,selectedElements:e,shouldDeactivateAfter:l.wasActivatedByToggle});return}Ot({elements:e,labelEntries:t,shouldDeactivateAfter:l.wasActivatedByToggle})},jn=(e,t,n,r)=>{if(t.length===0)return;let i=r&&!l.pendingCommentMode&&!Ze();if(i&&u.addFrozenElements(t),Pv(i?l.frozenElements:t),s.hooks.onDragEnd(t,e),i){let e=t[t.length-1];Ge(!0),ig(),u.setPointer(ea(Z(e))),u.setLastGrabbed(e),u.freeze(),Hn();return}let a=t[0],o=ea(Z(a));u.setPointer(o),u.setFrozenElements(t);let c=Og(e);if(u.setFrozenDragRect(c),u.freeze(),u.setLastGrabbed(a),l.pendingCommentMode){bn(a,o.x,o.y);return}if(Ze()){Qe(!1),U?Sn(a,o):xn(a,o);return}let d=l.wasActivatedByToggle&&!n;Dt({element:a,cursorX:o.x,selectedElements:t,shouldDeactivateAfter:d,dragRect:c})},Mn=e=>{for(let t of l.frozenElements)if(ta(t)&&b_(e,Z(t)))return t;return null},Fn=(e,t,n,r)=>{let i=ta(l.frozenElement)?l.frozenElement:null,a=F.selectedElement(),o=()=>ng(e,t).find(Lp)??null;if(r&&!l.pendingCommentMode&&!Ze()){let n=o();n!==null&&On(n,{x:e,y:t});return}let c=o()??(ta(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=ea(Z(d));f=e.x,m=e.y}else f=e,m=t;if(l.pendingCommentMode){bn(d,f,m),F.clear();return}if(Ze()){Qe(!1);let{wasIntercepted:e}=s.hooks.onElementSelect(d);if(e)return;F.clear(),Pv([d]),u.setFrozenElement(d);let t={x:f,y:m};u.setPointer(t),u.freeze(),U?Sn(d,t):xn(d,t);return}let _=l.wasActivatedByToggle&&!n;u.setLastGrabbed(d),Dt({element:d,cursorX:f,shouldDeactivateAfter:_}),F.clear()},Ln=()=>{C()&&(qt(),Ve(),u.cancelDrag(),ot.stop(),ae(`userSelect`),sr())},Rn=(e,t,n,r)=>{if(!C())return;let i=Ut(e,t),a=i.x>2||i.y>2,o=a?Wt(e,t):null,s=o?Be(o,e,t):[];Ve(),a?u.endDrag():u.cancelDrag(),qt(),ot.stop(),ae(`userSelect`),o?jn(o,s,n,r):Fn(e,t,n,r)},Y=Zf(),Bn=Db({shouldForwardInteraction:()=>x()||b()||C()||te(),shouldForwardKeyboardEvent:e=>Kg(e,s.store.options),shouldForwardViewportEvent:e=>{let t=l.frozenElement??q();return t&&Ob(e,t)?!0:l.frozenElements.some(t=>Ob(e,t))}}),X=d_(),Vn=e=>{let t;try{t=X.originalKeyDescriptor?.get?X.originalKeyDescriptor.get.call(e):e.key}catch{return!1}let n=t===`Enter`||y_(e.code),r=x()||b();return n&&r&&!O()&&!F.isPendingDismiss()&&!l.wasActivatedByToggle?qg(e,`data-react-grab-input`)?!1:(X.claimedEvents.add(e),e.preventDefault(),e.stopImmediatePropagation(),!0):!1};Y.addDocumentListener(`keydown`,no(Vn),{capture:!0}),Y.addDocumentListener(`keyup`,no(Vn),{capture:!0}),Y.addDocumentListener(`keypress`,no(Vn),{capture:!0});let Hn=()=>{at.clearHistory(),F.clear()},Wn=(e,t=!1)=>{u.setFrozenElement(e),u.freeze(),F.select(e,{shouldPromptBeforeMouseHandoff:t});let n=ea(Z(e));u.setPointer(n),l.contextMenuPosition!==null&&u.showContextMenu(n,e)},Gn=()=>{F.showDismissPrompt()&&de(e=>e+1)},Kn=()=>{F.clear(),u.unfreeze(),Hn()},qn=()=>{let e=F.takeSelection(l.frozenElement);if(!e){Kn();return}let t=ea(Z(e));Hn(),u.setLastGrabbed(e),Dt({element:e,cursorX:t.x,shouldDeactivateAfter:l.wasActivatedByToggle})},Jn=e=>Tn.has(e.key)?e.key:e.key===`Tab`?e.shiftKey?`ArrowLeft`:`ArrowRight`:null,Yn=(e,t={})=>{if(!x()||O()||z()||F.isPendingDismiss()&&!t.allowPendingKeyboardSelection)return!1;let n=Jn(e);if(!n||Se())return!1;let r=kt(),i=!r;if(!r){let e=eo()?.getBoundingClientRect();r=e?rg(e.left+e.width/2,e.top+e.height/2):rg(window.innerWidth/2,window.innerHeight/2)}if(!r)return!1;let a=n===`ArrowUp`||n===`ArrowDown`,o=at.findNext(n,r);if(!o&&!a&&!i)return!1;let s=o??r;return e.preventDefault(),e.stopPropagation(),Wn(s,!0),!0},Xn=e=>e.metaKey||e.ctrlKey||e.altKey||e.repeat||Ia(e)||!x()||E()||te()||Se()?null:l.frozenElement||q(),Zn=e=>{let t=Xn(e);if(!t)return null;let n=ub(s.store.actions,e);return n?{element:t,action:n}:null},Qn=(e,t)=>{let n=Z(e);return Jr({element:e,filePath:l.selectionFilePath??void 0,lineNumber:l.selectionLineNumber??void 0,tagName:Ma(e)||void 0,componentName:tt(),position:t,shouldDeferHideContextMenu:!1,performWithFeedbackOptions:{fallbackBounds:n,fallbackSelectionBounds:[n],position:t}})},$n=e=>{let t=Zn(e);if(!t)return!1;let{element:n,action:r}=t;return O()?vn(r.id)?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1:_b(r,Qn(n,{x:p().x,y:p().y}))?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1},er=()=>{let e=l.selectionFilePath,t=l.selectionLineNumber;e&&$g(e,t??void 0,s.hooks)},tr=e=>e.key?.toLowerCase()!==`o`||!x()||!(e.metaKey||e.ctrlKey)||!l.selectionFilePath?!1:(e.preventDefault(),e.stopPropagation(),er(),!0),nr=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||q();if(!a)return!1;e.preventDefault(),e.stopPropagation();let o=ea(Z(a));return i?Pv(r):(Pv([a]),u.setFrozenElement(a)),u.setPointer(o),u.freeze(),xn(a,o),!0},rr=f(()=>jt().map(e=>({tagName:Ma(e.element)||`element`,componentName:Rd(e.element)??void 0,depth:e.depth,isLast:e.isLast}))),ir=f(()=>({items:rr(),activeIndex:Mt()})),ar=e=>{if(!(!s.store.options.allowActivationInsideInput&&Ia(e))&&!(!Kg(e,s.store.options)&&((e.metaKey||e.ctrlKey)&&!wn.includes(e.key)&&!y_(e.code)&&(x()&&!l.wasActivatedByToggle?J():b()&&(De(),Oe(),u.releaseHold())),!y_(e.code)||!b()))){if((x()||b())&&!O()&&(e.preventDefault(),y_(e.code)&&e.stopImmediatePropagation()),x()){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e.repeat)return;He!==null&&window.clearTimeout(He),He=window.setTimeout(()=>{J()},200);return}if(b()&&e.repeat){if(Ue.copyWaiting){let e=Ue.holdTimerFired;Oe(),e&&u.activate()}return}if(!(E()||D())&&!b()){let t=s.store.options.keyHoldDuration??100;Ia(e)?La(e)?t+=600:t+=400:Ra()&&(t+=600),Oe(),u.startHold(t)}}},or=e=>{if(!F.isPendingDismiss())return!1;if(y_(e.code))return!0;let t=Tn.has(e.key),n=Zn(e)!==null;return!t&&!n?!1:t?Yn(e,{allowPendingKeyboardSelection:!0}):$n(e)?(Hn(),!0):!1};Y.addWindowListener(`keydown`,no(e=>{if(Jn(e)&&Ia(e)||or(e))return;if(Vn(e),!oe()){Kg(e,s.store.options)&&!e.repeat&&le(e=>e+1);return}let t=y_(e.code)&&b()&&!O(),n=qg(e,An);if(O()&&Kg(e,s.store.options)&&!e.repeat&&!n){e.preventDefault(),e.stopPropagation(),pn();return}if(e.key===`Escape`&&E()){J();return}if(e.key===`Escape`&&Se()){_e()!==null&&$r();return}let r=qg(e,`data-react-grab-ignore-events`)&&!t;if(O()||r)return O()&&!n&&$n(e)||(e.key===`Escape`&&(O()?pn():l.wasActivatedByToggle&&J()),r&&Tn.has(e.key)&&Yn(e)),void 0;if(C()&&Gt(e)){e.repeat||Kt(),e.preventDefault(),e.stopPropagation();return}if(e.key===`Escape`&&(b()||l.wasActivatedByToggle)){J();return}x()&&!wn.includes(e.key)&&e.preventDefault();let i=Date.now()-Ke<200;Yn(e)||tr(e)||nr(e)||$n(e)||i||ar(e)}),{capture:!0}),Y.addWindowListener(`keyup`,no(e=>{if(Vn(e))return;if(Gt(e)&&T()&&(qt(),e.preventDefault(),e.stopPropagation()),e.key===`Shift`&&z()){C()&&Ln(),kn();return}if(qg(e,`data-react-grab-ignore-events`))return;let t=Gg(s.store.options.activationKey),n=t.metaKey||t.ctrlKey?zg()?!e.metaKey:!e.ctrlKey:t.shiftKey&&!e.shiftKey||t.altKey&&!e.altKey,r=s.store.options.activationKey?Wg(s.store.options.activationKey)(e):Ig(e.key,e.code);if(D()||B){(r||n)&&(Ye(),J());return}if(!b()&&!x()||O())return;let i=!!s.store.options.activationKey,a=s.store.options.activationMode===`hold`,o=C();if(x()){let e=xe();if(n){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e)return;J()}else if(a&&r){if(He!==null&&(window.clearTimeout(He),He=null),e||o)return;J()}else !i&&r&&He!==null&&(window.clearTimeout(He),He=null);return}if(r||n){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`)return;if(b()||Ue.holdTimerFired&&n){De();let t=(Ue.startTimestamp?Date.now()-Ue.startTimestamp:0)>=200,n=Ue.holdTimerFired&&t&&(s.store.options.allowActivationInsideInput||!Ia(e));Oe(),n?u.activate():u.releaseHold()}else J()}}),{capture:!0}),Y.addDocumentListener(`copy`,()=>{b()&&(Ue.copyWaiting=!0)}),Y.addWindowListener(`keypress`,no(Vn),{capture:!0}),Y.addWindowListener(`pointermove`,no(e=>{if(!e.isPrimary)return;let t=e.pointerType===`touch`;if(u.setTouchMode(t),!qg(e,`data-react-grab-ignore-events`)&&!we()&&!(t&&!b()&&!x())){if((t?b():x())&&!O()&&S()&&!e.shiftKey&&!z()){if(F.consumeMouseHandoff()){Gn();return}u.unfreeze(),Hn()}En(e.clientX,e.clientY,e.shiftKey)}}),{passive:!0,capture:!0}),Y.addWindowListener(`pointerdown`,no(e=>{if(e.button===0&&e.isPrimary&&(u.setTouchMode(e.pointerType===`touch`),!(!C()&&qg(e,`data-react-grab-ignore-events`))&&!xe())){if(O()){let t=Vt();t&&e.clientX>=t.x&&e.clientX<=t.x+t.width&&e.clientY>=t.y&&e.clientY<=t.y+t.height?fn():pn();return}if(F.isPendingDismiss()){e.preventDefault(),e.stopImmediatePropagation();return}if(te()){e.preventDefault(),e.stopImmediatePropagation();return}if(Dn(e.clientX,e.clientY,e.shiftKey)){if(e.pointerId!==void 0)try{document.documentElement.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),e.stopImmediatePropagation()}}}),{capture:!0}),Y.addWindowListener(`pointerup`,no(e=>{if(e.button!==0||!e.isPrimary||qg(e,`data-react-grab-ignore-events`)||xe())return;let t=st()||te()||C(),n=e.metaKey||e.ctrlKey;Rn(e.clientX,e.clientY,n,e.shiftKey),t&&(e.preventDefault(),e.stopImmediatePropagation())}),{capture:!0}),Y.addWindowListener(`contextmenu`,no(e=>{if(!st()||E()||O())return;let t=qg(e,`data-react-grab-ignore-events`),n={x:e.clientX,y:e.clientY},r=t&&l.frozenElements.length>1?Mn(n):null,i=F.isPendingDismiss();if(t&&!r&&!i&&!Nt())return;if(xe()){e.preventDefault();return}e.preventDefault(),e.stopPropagation();let a=r??rg(e.clientX,e.clientY);if(!a)return;let o=l.frozenElements;o.length>1&&o.includes(a)?Pv(o):(Pv([a]),u.setFrozenElement(a)),u.setPointer(n),u.freeze(),xn(a,n)}),{capture:!0}),Y.addWindowListener(`pointercancel`,no(e=>{e.isPrimary&&Ln()}),{capture:!0}),Y.addWindowListener(`click`,no(e=>{qg(e,`data-react-grab-ignore-events`)||xe()||(st()||ee())&&(e.preventDefault(),e.stopImmediatePropagation(),l.wasActivatedByToggle&&!O()&&!e.shiftKey&&(b()?u.setWasActivatedByToggle(!1):J()))}),{capture:!0}),Y.addDocumentListener(`visibilitychange`,()=>{if(document.hidden){u.clearGrabbedBoxes();let e=l.activationTimestamp;x()&&!O()&&e!==null&&Date.now()-e>500&&J()}}),Y.addWindowListener(`blur`,()=>{Ln(),b()&&(De(),u.releaseHold(),Oe()),Te()}),Y.addWindowListener(`focus`,()=>{Ke=Date.now()}),Y.addWindowListener(`focusin`,e=>{qg(e,io)&&e.stopPropagation()},{capture:!0});let sr=()=>{if(!(l.isTouchMode&&!b()&&!x())&&!we()&&!S()&&!C()&&l.frozenElements.length===0){let e=rg(p().x,p().y);u.setDetectedElement(e)}},cr=null,lr=null,ur=null,dr=()=>{Eg(),Wm(),sr(),Ie(e=>e+1),u.incrementViewportVersion(),u.updateContextMenuPosition()},fr=()=>{Eg(),ur===null&&(ur=cf(()=>{ur=null,dr()}))},pr=()=>{Ip(),dr()};Y.addWindowListener(`scroll`,fr,{capture:!0,passive:!0});let mr=window.innerWidth,hr=window.innerHeight;Y.addWindowListener(`resize`,()=>{let e=window.innerWidth,t=window.innerHeight;if(mr>0&&hr>0){let n=e/mr,r=t/hr,i=Math.abs(n-r)<In,a=Math.abs(n-1)>In;i&&a&&u.setPointer({x:p().x*n,y:p().y*r})}mr=e,hr=t,pr()});let gr=window.visualViewport;if(gr){let{signal:e}=Y;gr.addEventListener(`resize`,pr,{signal:e}),gr.addEventListener(`scroll`,fr,{signal:e})}let _r=()=>{lr===null&&(lr=cf(()=>{lr=null,u.incrementViewportVersion()}))};d(()=>{if(s.store.theme.enabled&&(x()||E()||l.labelInstances.length>0||l.grabbedBoxes.length>0)){if(cr!==null)return;cr=window.setInterval(()=>{u.relinkLiveElements(),_r()},100);return}cr!==null&&(window.clearInterval(cr),cr=null),lr!==null&&(lf(lr),lr=null)}),y(()=>{cr!==null&&window.clearInterval(cr),lr!==null&&lf(lr),ur!==null&&lf(ur)}),Y.addDocumentListener(`copy`,no(e=>{O()||qg(e,`data-react-grab-ignore-events`)||st()&&e.preventDefault()}),{capture:!0}),y(()=>{let e=[];$(Bn,e),$(()=>Y.abort(),e),Le(),He&&window.clearTimeout(He),$(Ye,e),P&&$(P,e),P=null,ct.forEach(e=>window.clearTimeout(e)),ct.clear(),$(ft.cancelAllFades,e),dt.clear(),$(ot.stop,e),$(vy,e),$(()=>ae(`userSelect`),e),$(()=>ae(`touchAction`),e),$(()=>cn(null),e),$(X.restore,e),$(()=>$a(null),e),Km(e,`Disposing React Grab failed`)});let{root:vr,host:yr,cancelPendingAttachment:br}=lo(St);y(br),y(Jf(yr).cleanup);let xr=f(()=>s.store.theme.enabled),Sr=f(()=>s.store.theme.selectionBox.enabled),Cr=f(()=>s.store.theme.elementLabel.enabled),wr=f(()=>s.store.theme.dragBox.enabled),Tr=f(()=>D()||j()&&!S()),Er=f(()=>Xt().length>0),Dr=f(()=>!xr()||!Sr()||Tr()?!1:Er()?!0:It()),Or=f(()=>{let e=Ft();if(e)return Ma(e)||void 0}),kr=f(()=>!xr()||xe()||!Cr()||Tr()?!1:It()),Ar=new Map,jr=e=>{let t=e.elements?.filter(ta)??[],n=e.element,r=null;t.length>0?r=t.map(Z):n&&ta(n)&&(r=[Z(n)]);let i=e.bounds,a=e.boundsMultiple;r&&(i=r.length>1?kg(e_(r)):r[0],e.boundsMultiple!==void 0&&(a=e.boundsMultiple.length>1&&e.boundsMultiple.length===e.elements?.length?r:[i]));let o=Ar.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 Ar.set(e.id,f),f},Mr=f(()=>{if(!xr()||!s.store.theme.grabbedBoxes.enabled)return[];h();let e=new Set(l.labelInstances.map(e=>e.id));for(let t of Ar.keys())e.has(t)||Ar.delete(t);return l.labelInstances.map(jr)}),Nr=f(()=>new Map(Mr().map(e=>[e.id,e]))),Pr=new Map,Fr=f(()=>{let e=Mr(),t=new Set(e.map(e=>e.id));for(let e of Pr.keys())t.has(e)||Pr.delete(e);return e.map(e=>{let t=Pr.get(e.id);if(t)return t;let n=e.id,r={read:()=>Nr().get(n)??null};return Pr.set(n,r),r})}),Ir=f(()=>!xr()||!s.store.theme.grabbedBoxes.enabled?[]:(h(),l.grabbedBoxes.map(e=>ta(e.element)?{...e,bounds:Z(e.element)}:e))),Lr=f(()=>xr()&&wr()&&st()&&w()),Rr=f(()=>E()?`processing`:`hover`),zr=f(()=>{if(!xr())return!1;let e=Cr(),t=O(),n=E(),r=st(),i=C(),a=!!kt(),o=j(),s=S();return!e||t||o&&!s?!1:n?!0:r&&!i&&a}),Br=f(()=>{h();let e=l.contextMenuElement;return e?Z(e):null}),Vr=f(()=>(h(),l.contextMenuPosition)),Hr=f(()=>{let e=l.contextMenuElement;if(!e)return;let t=l.frozenElements.length;return t>1?`${t} elements`:Ma(e)||void 0}),[Ur]=rf(()=>l.frozenElements.length>1?null:l.contextMenuElement),[Wr]=m(()=>l.contextMenuElement,async e=>e?Ld(e):null),Gr=async e=>{u.incrementSelectionInteractionLockDepth();try{return await e()}finally{u.decrementSelectionInteractionLockDepth()}},Kr=(e,t,n,r,i)=>async a=>{await Gr(async()=>{let o=i?.fallbackBounds??null,s=i?.fallbackSelectionBounds??[],c=i?.position??l.contextMenuPosition??p(),d=Rt(),f=Br()??o,m=t.length>1,h=m?kg(e_(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=ft.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=tp(e,`Action failed`)}ft.updateAfterCopy(o,s,l)}else try{await a()}catch(e){Q(new ya(`Action failed without feedback bounds`,e))}g?J():u.unfreeze()})},qr=()=>{setTimeout(()=>{u.hideContextMenu()},0)},Jr=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?qr:u.hideContextMenu,_={element:t,elements:h,filePath:n,lineNumber:r,componentName:a,tagName:i,enterPromptMode:m??(()=>{ft.clearAll(),gn(),p?.(),ke(t,o.x,o.y),u.setPointer({x:o.x,y:o.y}),u.setFrozenElement(t),Ae(),x()||ln(),g()}),copy:()=>{gn(),f?.(),Dt({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:Kr(t,h,i,a,c),hideContextMenu:g,cleanup:()=>{l.wasActivatedByToggle?J():u.unfreeze()}},v=s.hooks.transformActionContext(_);return{..._,...v}},Yr=f(()=>{let e=l.contextMenuElement;if(!e)return;let t=Wr(),n=l.contextMenuPosition??p();return Jr({element:e,filePath:t?.filePath,lineNumber:t?.lineNumber??void 0,tagName:Hr(),componentName:Ur(),position:n,shouldDeferHideContextMenu:!0,onBeforeCopy:()=>{F.clear()},customEnterPromptMode:()=>{ft.clearAll(),gn(),u.clearInputText(),u.enterPromptMode(n,e),qr()}})}),Xr=()=>{setTimeout(()=>{u.hideContextMenu(),J()},0)},Zr=()=>{if(!N)return null;let e=N.getBoundingClientRect(),t=sb(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}},Qr=(e,t)=>{let n=null,r=()=>{let i=e();i&&t(i),n=cf(r)};return r(),()=>{n!==null&&(lf(n),n=null)}};d(()=>{if(!Nt())return;let e=Qr(Zr,be);y(()=>{e(),be(null)})});let $r=()=>{P?.(),P=null,ve(null)},ei=()=>{u.hideContextMenu(),$r()},ti=()=>{_e()===null?(u.hideContextMenu(),P?.(),P=Qr(Zr,ve)):$r()},ni=e=>{Ee({defaultAction:e}),Ze()&&_n(e)},ri=e=>{let t=l.labelInstances.find(t=>t.id===e);if(!t?.element||!ta(t.element))return;let n=t.element,r=ea(Z(n)),i={x:t.mouseX??r.x,y:r.y},a=t.elements&&t.elements.length>0?t.elements.filter(e=>ta(e)):[n];setTimeout(()=>{$r(),x()||(u.setWasActivatedByToggle(!0),ln()),u.setPointer(i),u.setFrozenElements(a),a.length>1&&t.bounds&&u.setFrozenDragRect(Og(t.bounds)),u.freeze(),u.showContextMenu(i,n)},0)};d(()=>{let e=s.store.theme.hue;e===0?vr.style.filter=``:vr.style.filter=`hue-rotate(${e}deg)`}),s.store.theme.enabled&&Promise.resolve().then(()=>(Fw(),Nw)).then(({ReactGrabRenderer:e})=>{t||(i=qe(()=>M(e,{get selectionVisible(){return Dr()},get selectionBounds(){return Vt()},get selectionBoundsMultiple(){return Zt()},get selectionShouldSnap(){return l.frozenElements.length>0||Xt().length>0},get selectionElementsCount(){return l.frozenElements.length},get frozenLabelEntryAccessors(){return $t()},get pendingShiftPreviewEntry(){return en()??void 0},get selectionFilePath(){return l.selectionFilePath??void 0},get selectionTagName(){return Or()},get selectionComponentName(){return tt()},get selectionLabelVisible(){return kr()},selectionLabelStatus:`idle`,get hierarchyState(){return ir()},get hierarchyMenuPosition(){return ye()},get labelInstances(){return Mr()},get labelInstanceAccessors(){return Fr()},get dragVisible(){return Lr()},get dragBounds(){return Jt()},get grabbedBoxes(){return Ir()},get mouseX(){return yt(()=>l.frozenElements.length>1)()?void 0:rn()??tn().x},get isFrozen(){return S()||x()||j()},get inputValue(){return l.inputText},get isPromptMode(){return O()},onShowContextMenuInstance:ri,onRetryInstance:K,onAcknowledgeErrorInstance:Ct,get onLabelInstanceHoverChange(){return ft.handleHoverChange},get onInputChange(){return u.setInputText},onInputSubmit:()=>void fn(),get selectionLabelShakeCount(){return ue()},onConfirmDismiss:mn,onOpenSelectionFile:er,get discardPrompt(){return yt(()=>!!F.isPendingDismiss())()?{isKeyboardSelection:!0,onConfirm:mn,onCopy:qn}:ne()?{onConfirm:mn,onCancel:hn}:void 0},get toolbarVisible(){return s.store.theme.toolbar.enabled},get isActive(){return x()},onActivateAction:yn,get activeActionId(){return rt()},get enabled(){return oe()},get shakeCount(){return ce()},onToolbarStateChange:e=>{pe(e),e.enabled!==oe()&&(se(e.enabled),e.enabled||(un(),ei())),bb(o,e)},onSubscribeToToolbarStateChanges:e=>(o.add(e),()=>{o.delete(e)}),onToolbarSelectHoverChange:me,onToolbarRef:e=>{N=e},get contextMenuPosition(){return Vr()},get contextMenuBounds(){return Br()},get contextMenuTagName(){return Hr()},get contextMenuComponentName(){return Ur()},get contextMenuHasFilePath(){return!!Wr()?.filePath},get actions(){return s.store.actions},get actionContext(){return Yr()},onContextMenuDismiss:Xr,onContextMenuHide:qr,get toolbarMenuPosition(){return _e()},get toolbarMenuActions(){return s.store.actions.filter(e=>e.showInToolbarMenu===!0)},get defaultActionId(){return fe()?.defaultAction??`copy`},onSetDefaultAction:ni,onToggleToolbarMenu:ti,onToolbarMenuDismiss:$r}),vr))}).catch(e=>{console.warn(`[react-grab] Failed to load renderer:`,e)});let ii={activate:()=>{u.setPendingCommentMode(!1),!x()&&oe()&&dn()},deactivate:()=>{x()||E()?J():_t()},toggle:()=>{x()||E()?J():oe()&&dn()},comment:Cn,isActive:()=>x(),isEnabled:()=>oe(),setEnabled:e=>{e!==oe()&&(se(e),Ee({enabled:e,collapsed:!e}),e||(un(),ei()))},getToolbarState:()=>fe()??S_(),setToolbarState:e=>{let t=fe()??S_(),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:Pg(r)};C_(i),pe(i),i.enabled!==oe()&&(se(i.enabled),i.enabled||(un(),ei())),bb(o,i)},onToolbarStateChange:e=>(o.add(e),()=>{o.delete(e)}),reset:()=>{un(),ei(),u.clearGrabbedBoxes(),ft.clearAll(),u.setSelectionSource(null,null)},dispose:()=>{if(t)return;let n=[];t=!0,Rw=!1,$(_t,n),$(ft.clearAll,n),i&&$(i,n),i=void 0,P&&$(P,n),P=null,o.clear(),$(e,n),$(()=>Nb(ii),n),Km(n,`Disposing React Grab failed`)},copyElement:async e=>{let t=Array.isArray(e)?e:[e];return t.length===0?!1:(await wt(t,ht())).status===`succeeded`},getSource:async e=>{let t=await Ld(e);return t?{filePath:t.filePath,lineNumber:t.lineNumber,columnNumber:t.columnNumber??null,componentName:t.componentName}:null},getStackContext:e=>Xd(e,{maxLines:s.store.options.maxContextLines}),getState:()=>({isActive:x(),isDragging:C(),isCopying:E(),isPromptMode:O(),isSelectionBoxVisible:!!Dr(),isDragBoxVisible:!!Lr(),targetElement:q(),dragBounds:Jt()??null,grabbedBoxes:[...an()],labelInstances:[...on()],selectionFilePath:l.selectionFilePath,toolbarState:fe()}),setOptions:e=>{s.setOptions(e)},registerPlugin:e=>{s.register(e,ii)},unregisterPlugin:e=>{s.unregister(e)},getPlugins:()=>s.getPluginNames(),getDisplayName:Rd};for(let e of Iw)s.register(e,ii);return queueMicrotask(()=>{if(t)return;let e=fe();if(!e)return;let n=Pg(e.defaultAction??`copy`);n!==e.defaultAction&&Ee({defaultAction:n})}),setTimeout(()=>{bu(!0)},zn),ii})};return ja(),typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(Mb((window.__REACT_GRAB__??(()=>{if(typeof window>`u`||window.parent===window)return null;try{return window.parent.__REACT_GRAB__??null}catch{return null}})())||zw()),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:jb()}))),e.DEFAULT_THEME=t_,e.FreezeError=ba,e.OpenFileError=xa,e.PluginSetupError=wa,e.ReactGrabError=va,e.commentPlugin=D_,e.formatElementInfo=Qd,e.generateSnippet=Ib,e.getGlobalApi=jb,e.getStack=kd,e.init=zw,e.isInstrumentationActive=mi,e.openPlugin=O_,e.registerPlugin=Pb,e.setGlobalApi=Mb,e.unregisterPlugin=Fb,e})({});
|