react-grab 0.1.50 → 0.2.0

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.
Files changed (39) hide show
  1. package/dist/{copy-content-CcSwO8vJ.d.ts → copy-content-BwBAqbRh.d.cts} +1 -88
  2. package/dist/{copy-content-Dxdqj7pl.d.cts → copy-content-lkRiqdFh.d.ts} +1 -88
  3. package/dist/core/index.cjs +1 -1
  4. package/dist/core/index.d.cts +2 -2
  5. package/dist/core/index.d.ts +2 -2
  6. package/dist/core/index.js +1 -1
  7. package/dist/core-BVAZvGKe.cjs +11 -0
  8. package/dist/core-SItpqkUO.js +11 -0
  9. package/dist/execute-context-menu-action-BMF9MXYD.cjs +9 -0
  10. package/dist/execute-context-menu-action-Bbh74u99.js +9 -0
  11. package/dist/freeze-updates-BFeB7yq2.cjs +43 -0
  12. package/dist/freeze-updates-dBIOHHh-.js +43 -0
  13. package/dist/{index-Cd-ADR9Q.d.ts → index-BX45N3Oq.d.ts} +1 -1
  14. package/dist/{index-DdYffA2X.d.cts → index-CvAuGVjl.d.cts} +1 -1
  15. package/dist/index.cjs +1 -1
  16. package/dist/index.d.cts +2 -2
  17. package/dist/index.d.ts +2 -2
  18. package/dist/index.global.js +15 -18
  19. package/dist/index.js +1 -1
  20. package/dist/open-file-5Szw8z7u.cjs +20 -0
  21. package/dist/open-file-BYqKjxo7.js +29 -0
  22. package/dist/primitives.cjs +2 -2
  23. package/dist/primitives.d.cts +2 -12
  24. package/dist/primitives.d.ts +2 -12
  25. package/dist/primitives.js +2 -2
  26. package/dist/renderer-Ym7FGQIR.js +9 -0
  27. package/dist/renderer-vi8fHTBo.cjs +9 -0
  28. package/dist/styles.css +1 -1
  29. package/package.json +3 -3
  30. package/dist/core-ToKHUuzu.js +0 -14
  31. package/dist/core-ZoLZAlfk.cjs +0 -14
  32. package/dist/execute-context-menu-action-Co9X-bkK.js +0 -9
  33. package/dist/execute-context-menu-action-DKg28ITb.cjs +0 -9
  34. package/dist/freeze-updates-BuDA4bqJ.js +0 -43
  35. package/dist/freeze-updates-XTAVYI_V.cjs +0 -43
  36. package/dist/open-file-BFYiXTGc.js +0 -29
  37. package/dist/open-file-CyQbbgyi.cjs +0 -20
  38. package/dist/renderer-1McgMCx9.cjs +0 -9
  39. package/dist/renderer-C_SB0eBW.js +0 -9
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @license MIT
3
+ *
4
+ * Copyright (c) 2025 Aiden Bai
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ let e=null;const t=()=>{if(e!==null)return e;try{e=window.matchMedia(`(color-gamut: p3)`).matches}catch{e=!1}return e},n=t(),r=e=>n?`color(display-p3 0.84 0.19 0.78 / ${e})`:`rgba(210, 57, 192, ${e})`,i=`0.2.0`,a=`var(--rg-panel-bg)`,o=`var(--rg-shadow)`,s=-1e3,c=.95,l=1500,u=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],d=5e3,f=8e3,p=1e4,ee=.5,m=2147483647,te=2147483645,ne=.7,re=1e3/60,ie=.5,ae=.01,oe=r(.4),se=r(.05),ce=r(.5),le=r(.08),ue=r(.15),de=.2,fe=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],pe=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),me=new Set([`a`,`button`,`code`,`label`,`option`,`pre`,`summary`,`text`]),he=new Set([`script`,`style`,`template`,`noscript`]),ge=[`Meta`,`Control`,`Shift`,`Alt`],_e=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),ve=`data-react-grab-frozen`,ye=`data-react-grab-same-origin-frame`,be=.18,xe=.6,Se=.5,Ce=`data-react-grab-input`,we=.9,Te=.5,Ee=`copy`,De=`comment`,Oe=`edit`,ke=`superellipse(1.25)`,Ae=.75,je=.01,Me=1e3,Ne={left:-9999,top:-9999},Pe={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},Fe=1e3,Ie=-9999,Le=new Set(`display.position.top.right.bottom.left.z-index.overflow.overflow-x.overflow-y.width.height.min-width.min-height.max-width.max-height.margin-top.margin-right.margin-bottom.margin-left.padding-top.padding-right.padding-bottom.padding-left.flex-direction.flex-wrap.justify-content.align-items.align-self.align-content.flex-grow.flex-shrink.flex-basis.order.gap.row-gap.column-gap.grid-template-columns.grid-template-rows.grid-template-areas.font-family.font-size.font-weight.font-style.line-height.letter-spacing.text-align.text-decoration-line.text-decoration-style.text-transform.text-overflow.text-shadow.white-space.word-break.overflow-wrap.vertical-align.color.background-color.background-image.background-position.background-size.background-repeat.border-top-width.border-right-width.border-bottom-width.border-left-width.border-top-style.border-right-style.border-bottom-style.border-left-style.border-top-color.border-right-color.border-bottom-color.border-left-color.border-top-left-radius.border-top-right-radius.border-bottom-left-radius.border-bottom-right-radius.box-shadow.opacity.transform.filter.backdrop-filter.object-fit.object-position`.split(`.`)),Re=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE,h=e=>Re(e)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`,g=e=>h(e)&&e.tagName===`IFRAME`,ze=new WeakMap,_=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},Be=e=>{let t=performance.now(),n=ze.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=_(r.borderLeftWidth),n=_(r.borderRightWidth),a=_(r.borderTopWidth),o=_(r.borderBottomWidth),s=_(r.paddingLeft),c=_(r.paddingRight),l=_(r.paddingTop),u=_(r.paddingBottom),d=_(r.width),f=_(r.height),p=t+n+s+c,ee=a+o+l+u,m=r.boxSizing===`border-box`?d:d+p,te=r.boxSizing===`border-box`?f:f+ee;i={contentOffsetX:t+s,contentOffsetY:a+l,height:te>0?te:e.offsetHeight,width:m>0?m:e.offsetWidth}}return ze.set(e,{metrics:i,timestamp:t}),i},Ve=(e,t)=>t>0?e/t:1,He=e=>{if(!e)return null;try{return e.frameElement}catch{return null}},Ue=(e,t,n)=>{let r=t,i=n,a=1,o=1,s=e;for(;s&&s!==window;){let e=He(s);if(!e||!g(e))break;let t=e.getBoundingClientRect(),n=Be(e),c=Ve(t.width,n.width),l=Ve(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}},We=e=>{let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e):window.getComputedStyle(e)},Ge=(e,t)=>e.replace(/([\d.]+)px/g,(e,n)=>{let r=Number(n)*Math.abs(t);return`${Number(r.toFixed(3))}px`}),Ke=(e,t,n)=>{let[r,i]=e.split(`/`).map(e=>e.trim()),a=Ge(r,t),o=Ge(i??r,n);return i===void 0&&a===o?a:`${a} / ${o}`},qe=e=>Object.assign(e,{[Symbol.dispose]:e}),Je=`bippy-0.6.1`,Ye=Object.defineProperty,Xe=Object.prototype.hasOwnProperty,Ze=()=>{},Qe=e=>{try{Function.prototype.toString.call(e).indexOf(`^_^`)>-1&&setTimeout(()=>{throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build`)})}catch{}},$e=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e);let et=!1,tt;const nt=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>et?!0:(e&&typeof e.inject==`function`&&(tt=e.inject.toString()),!!tt?.includes(`(injected)`)),v=new Set,rt=new Set,it=e=>{e&&v.add(e);let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:Je,checkDCE:Qe,hasUnsupportedRendererAttached:!1,inject(e){let i=++n;return t.set(i,e),rt.add(e),r._instrumentationIsActive||(r._instrumentationIsActive=!0,v.forEach(e=>e())),i},on:Ze,onCommitFiberRoot:Ze,onCommitFiberUnmount:Ze,onPostCommitFiberRoot:Ze,renderers:t,supportsFiber:!0,supportsFlight:!0};try{Ye(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,n.size>0&&(n.forEach((e,n)=>{rt.add(e),t.renderers.set(n,e)}),at(e))}}});let t=window.hasOwnProperty,n=!1;Ye(window,`hasOwnProperty`,{configurable:!0,value:function(...e){try{if(!n&&e[0]===`__REACT_DEVTOOLS_GLOBAL_HOOK__`)return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,n=!0,-0}catch{}return t.apply(this,e)},writable:!0})}catch{at(e)}return r},at=e=>{e&&v.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=Qe,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=Je,t._instrumentationIsActive=!1;let e=$e(t);if(e||(t.on=Ze),t.renderers.size){t._instrumentationIsActive=!0,v.forEach(e=>e());return}let n=t.inject,r=nt(t);r&&!e&&(et=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=e=>{let i=n(e);return rt.add(e),r&&t.renderers.set(i,e),t._instrumentationIsActive=!0,v.forEach(e=>e()),i}}(t.renderers.size||t._instrumentationIsActive||nt())&&e?.()}catch{}},ot=()=>Xe.call(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),y=e=>ot()?(at(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):it(e),st=()=>!!(typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`));
10
+ /**
11
+ * @license bippy
12
+ *
13
+ * Copyright (c) Aiden Bai
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+ (()=>{try{st()&&y()}catch{}})();
19
+ /**
20
+ * @license bippy
21
+ *
22
+ * Copyright (c) Aiden Bai
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */
27
+ const ct=e=>{switch(e.tag){case 5:case 26:case 27:return!0;default:return typeof e.type==`string`}},lt=e=>{switch(e.tag){case 1:case 11:case 0:case 14:case 15:return!0;default:return!1}},ut=e=>!e||typeof e!=`object`?!1:`pendingProps`in e&&!(`containerInfo`in e),dt=e=>{let t=e.memoizedProps,n=e.alternate?.memoizedProps||{},r=e.flags??e.effectTag??0;switch(e.tag){case 1:case 9:case 11:case 0:case 14:case 15:return(r&1)==1;default:return e.alternate?n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref:!0}},ft=e=>{switch(e.tag){case 18:return!0;case 7:case 6:case 23:case 22:return!0;case 3:return!1;default:{let t=typeof e.type==`object`&&e.type!==null?e.type.$$typeof:e.type;if(typeof t==`symbol`)return t.description===`react.concurrent_mode`||t.description===`react.async_mode`;switch(t){case 60111:case`Symbol(react.concurrent_mode)`:case`Symbol(react.async_mode)`:return!0;default:return!1}}}},pt=e=>{let t=[],n=[];for(ct(e)?t.push(e):e.child&&n.push(e.child);n.length;){let e=n.pop();if(!e)break;ct(e)?t.push(e):e.child&&n.push(e.child),e.sibling&&n.push(e.sibling)}return t};function mt(e,t,n=!1){if(!e)return null;let r=t(e);if(r instanceof Promise)return(async()=>{if(await r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=await gt(i,t,n);if(e)return e;i=n?null:i.sibling}return null})();if(r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=ht(i,t,n);if(e)return e;i=n?null:i.sibling}return null}const ht=(e,t,n=!1)=>{if(!e)return null;if(t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=ht(r,t,n);if(e)return e;r=n?null:r.sibling}return null},gt=async(e,t,n=!1)=>{if(!e)return null;if(await t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=await gt(r,t,n);if(e)return e;r=n?null:r.sibling}return null},_t=e=>{let t=e;return typeof t==`function`?t:typeof t==`object`&&t?_t(t.type||t.render):null},vt=e=>{let t=e;if(typeof t==`string`)return t;if(typeof t!=`function`&&!(typeof t==`object`&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=_t(t);return r&&(r.displayName||r.name)||null},yt=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||$e(e)||nt(e)},bt=new Set,xt=e=>{let t=e.alternate;if(!t)return e;if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let t of bt){let n=mt(t.current,t=>{if(t===e)return!0});if(n)return n}return e};let St=0;const b=new WeakMap,Ct=(e,t=St++)=>{b.set(e,t)},wt=e=>{let t=b.get(e);return t===void 0&&e.alternate&&(t=b.get(e.alternate)),t===void 0&&(t=St++,Ct(e,t)),t},x=(e,t,n)=>{let r=t;for(;r!=null;){if(b.has(r)||wt(r),!ft(r)&&dt(r)&&e(r,`mount`),r.tag===13)if(r.memoizedState!==null){let t=r.child,n=t?t.sibling:null;if(n){let t=n.child;t!==null&&x(e,t,!1)}}else{let t=null;r.child!==null&&(t=r.child.child),t!==null&&x(e,t,!1)}else r.child!=null&&x(e,r.child,!0);r=n?r.sibling:null}},Tt=(e,t,n,r)=>{if(b.has(t)||wt(t),!n)return;b.has(n)||wt(n);let i=t.tag===13,a=!ft(t);a&&dt(t)&&e(t,`update`);let o=i&&n.memoizedState!==null,s=i&&t.memoizedState!==null;if(o&&s){let r=t.child?.sibling??null,i=n.child?.sibling??null;r!==null&&i!==null&&Tt(e,r,i,t)}else if(o&&!s){let n=t.child;n!==null&&x(e,n,!0)}else if(!o&&s){Dt(e,n);let r=t.child?.sibling??null;r!==null&&x(e,r,!0)}else if(t.child!==n.child){let n=t.child;for(;n;){if(n.alternate){let i=n.alternate;Tt(e,n,i,a?t:r)}else x(e,n,!1);n=n.sibling}}},Et=(e,t)=>{(t.tag===3||!ft(t))&&e(t,`unmount`)},Dt=(e,t)=>{let n=t.tag===13&&t.memoizedState!==null,r=t.child;for(n&&(r=(t.child?.sibling??null)?.child??null);r!==null;)r.return!==null&&(Et(e,r),Dt(e,r)),r=r.sibling},Ot=e=>{if(!ot())return null;let t=e;for(;t.return;)t=t.return;let n=Ft.get(t.stateNode);return n===void 0?null:y().renderers?.get(n)??null},kt=e=>Object.prototype.toString.call(e)===`[object Object]`&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),At=(e,t=[])=>{if(!kt(e))return[{path:t,value:e}];let n=[];for(let r in e){let i=e[r],a=t.concat(r);kt(i)?n.push(...At(i,a)):n.push({path:a,value:i})}return n},jt=new Set,Mt=new Set,Nt=new Set,Pt=new Set,S=new WeakMap,Ft=new WeakMap,It=e=>{let t=S.get(e)??{};if(S.set(e,t),!t.onCommitFiberRoot||e.onCommitFiberRoot!==t.onCommitFiberRoot){let n=e.onCommitFiberRoot,r=(t,i,a)=>{if(n?.(t,i,a),S.get(e)?.onCommitFiberRoot===r){bt.add(i),Ft.set(i,t);for(let e of jt)e(t,i,a)}};t.onCommitFiberRoot=r,e.onCommitFiberRoot=r}if(!t.onCommitFiberUnmount||e.onCommitFiberUnmount!==t.onCommitFiberUnmount){let n=e.onCommitFiberUnmount,r=(t,i)=>{if(n?.(t,i),S.get(e)?.onCommitFiberUnmount===r)for(let e of Mt)e(t,i)};t.onCommitFiberUnmount=r,e.onCommitFiberUnmount=r}if(!t.onPostCommitFiberRoot||e.onPostCommitFiberRoot!==t.onPostCommitFiberRoot){let n=e.onPostCommitFiberRoot,r=(t,i)=>{if(n?.(t,i),S.get(e)?.onPostCommitFiberRoot===r)for(let e of Nt)e(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?.(t,i,a),S.get(e)?.onScheduleFiberRoot===r)for(let e of Pt)e(t,i,a)};t.onScheduleFiberRoot=r,e.onScheduleFiberRoot=r}},Lt=e=>{let t=y(e.onActive);t._instrumentationSource=e.name??Je,It(t);let{onActive:n,onCommitFiberRoot:r,onCommitFiberUnmount:i,onPostCommitFiberRoot:a,onScheduleFiberRoot:o}=e;return r&&jt.add(r),i&&Mt.add(i),a&&Nt.add(a),o&&Pt.add(o),qe(()=>{n&&v.delete(n),r&&jt.delete(r),i&&Mt.delete(i),a&&Nt.delete(a),o&&Pt.delete(o)})},Rt=new Set,zt=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),Bt=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){if(`_reactRootContainer`in e)return e._reactRootContainer?._internalRoot?.current?.child;let t=e.__internalInstanceHandle??e._internalInstanceHandle;if(ut(t))return t;let n=e;for(let e of Rt){let t=n[e];if(t)return t}for(let e of Object.keys(n))if(zt(e))return Rt.add(e),n[e]||null;for(let t of bt){if(Ot(t.current)?.findFiberByHostInstance)continue;let n=mt(t.current,t=>t.stateNode===e);if(n)return n}}return null},Vt=new WeakMap,Ht=(e,t)=>{Vt.set(e,t)},C=e=>Vt.get(e)??null,Ut=e=>C(e)?.getFiber()??Bt(e);let Wt=new WeakMap,Gt=new WeakMap;const Kt=()=>{Wt=new WeakMap,Gt=new WeakMap},qt=(e,t,n)=>{let r=Gt.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??We(e)).borderRadius||`0px`;return Gt.set(e,{borderRadius:i,timestamp:n}),i},Jt=e=>{let t=performance.now(),n=Wt.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=C(e);if(r){let n=r.getBounds();return Wt.set(e,{bounds:n,timestamp:t}),n}let i=e.getBoundingClientRect(),a=Ue(e.ownerDocument.defaultView,i.left,i.top),o={borderRadius:Ke(qt(e,null,t),a.scaleX,a.scaleY),height:i.height*a.scaleY,width:i.width*a.scaleX,x:a.x,y:a.y};return Wt.set(e,{bounds:o,timestamp:t}),o},Yt=e=>{let t=e.ownerDocument?.defaultView;return!!(t&&e instanceof t.ShadowRoot)};var w=class extends Error{constructor(e,t){super(e,t),this.name=`ReactGrabError`}},T=class extends w{constructor(e,t){super(e,{cause:t}),this.name=`RecoverableError`}},Xt=class extends w{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},Zt=class extends T{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},Qt=class extends T{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},$t=class extends T{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},en=class extends T{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},tn=class extends T{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},nn=class extends T{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},rn=class extends w{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},an=class extends w{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},on=class extends w{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},sn=class extends w{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}};const cn=e=>C(e)?.getTagName()??(e.tagName||``).toLowerCase(),ln=new WeakMap,un=(e=document)=>{let t=ln.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&&ln.set(e,r),r},dn=[[`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`,``]],fn=e=>{for(let[t,n]of dn)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)},pn=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===9,E=e=>{if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return Yt(t)?t.host:pn(t)?He(t.defaultView):null},mn=(e,t)=>{let n=C(e)?.hostElement??e;for(;n;){if(n===t)return!0;n=E(n)}return!1};let hn=null;const gn=e=>{hn=e},_n=()=>hn,D=e=>hn?e?mn(e,hn):!1:!0,vn=e=>e,yn=typeof window<`u`,bn=e=>0,xn=e=>{},Sn=yn?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):bn,Cn=yn?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):xn,wn=()=>yn?new Promise(e=>Sn(()=>e())):Promise.resolve(),O=e=>{try{return e.contentDocument}catch{return null}},Tn=(e,t,n)=>{let r=e.getBoundingClientRect(),i=Be(e),a=Ve(r.width,i.width),o=Ve(r.height,i.height);return{x:(t-r.left)/a-i.contentOffsetX,y:(n-r.top)/o-i.contentOffsetY}},En=(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(g(r)){let e=O(r);if(!e)return r;let i=Tn(r,t,n);return En(e,i.x,i.y)??r}return r}return null},Dn=(e,t)=>En(document,e,t),On=e=>{let t=e;for(;t;){if(t.hasAttribute(`data-react-grab-ignore`))return!0;t=E(t)}return!1},kn=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,An={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},jn={checkVisibilityCSS:!0,visibilityProperty:!0},Mn=(e,t)=>{if(kn&&!t)return e.checkVisibility(An)?!0:e.checkVisibility(jn)?We(e).opacity!==`0`:!1;let n=t??We(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`},Nn=e=>{let t=cn(e);return t===`html`||t===`body`},Pn=[`data-react-grab`,`data-react-grab-demo`],Fn=e=>Pn.some(t=>e.hasAttribute(t)),In=e=>{if(Fn(e))return!0;let t=e.getRootNode();return Yt(t)&&Fn(t.host)},Ln=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},Rn=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},zn=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(Rn(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3};let Bn=new WeakMap;const Vn=()=>{Bn=new WeakMap},Hn=e=>{let t=C(e);if(t)return t.isConnected();if(Nn(e)||In(e)||On(e))return!1;let n=performance.now(),r=Bn.get(e);if(r&&n-r.timestamp<50)return r.isVisible;if(!Mn(e))return Bn.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=We(e);if(Ln(t)||zn(t))return!1}return Bn.set(e,{isVisible:!0,timestamp:n}),!0},Un=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},Wn=e=>{let t=e.ownerDocument.defaultView?.getComputedStyle?.(e);if(!t)return!1;let n=t.backgroundClip!==`text`&&(t.backgroundImage!==`none`||!Un(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`},Gn=new Set([`A`,`AUDIO`,`BUTTON`,`CANVAS`,`DETAILS`,`EMBED`,`IFRAME`,`IMG`,`INPUT`,`METER`,`OBJECT`,`OPTION`,`PROGRESS`,`SELECT`,`SUMMARY`,`SVG`,`TEXTAREA`,`VIDEO`]),Kn=new Set([`button`,`checkbox`,`combobox`,`gridcell`,`link`,`listbox`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`scrollbar`,`searchbox`,`slider`,`spinbutton`,`switch`,`tab`,`textbox`,`treeitem`]),qn=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(`.`));let Jn=new WeakMap,Yn=new WeakMap;const Xn=()=>{Jn=new WeakMap,Yn=new WeakMap},k=(e,t,n)=>(Jn.set(e,t),Yn.set(e,n),t),Zn=e=>Gn.has(e.tagName)||Kn.has(e.getAttribute(`role`)??``)||h(e)&&e.isContentEditable,Qn=e=>{let t=performance.now(),n=Yn.get(e);if(n!==void 0&&t-n<16)return Jn.get(e)??null;if(Zn(e)||e.childNodes.length>64)return k(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 k(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 k(e,null,t);continue}if(!Re(n)||!qn.has(n.tagName)||a+i.length+n.childNodes.length>64)return k(e,null,t);for(let e=n.childNodes.length-1;e>=0;--e)i.push(n.childNodes[e])}}if(r.length===0||Wn(e))return k(e,null,t);try{let n=e.ownerDocument.createRange(),i=Ue(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 k(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 k(e,a.length>0?a:null,t)}catch{return k(e,null,t)}},$n=(e,t,n)=>{let r=Qn(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},er=(e,t,n,r,i)=>{let a=!0;for(let o of e.elementsFromPoint(t,n)){if(On(o)&&(a=!1),!D(o))continue;let s=o.shadowRoot;if(a&&s&&s!==e){let e=er(s,t,n,r,i);if(e)return e}if(a&&g(o)){let e=O(o);if(e){let a=Tn(o,t,n),s=er(e,a.x,a.y,r,i);if(s)return s}}if(Hn(o)&&$n(o,r,i))return o}return null},tr=(e,t)=>er(document,e,t,e,t),nr=(e,t,n,r)=>{let i=e.elementsFromPoint(t,n),a=!0;for(let o of i){if(On(o)&&(a=!1),a&&o.shadowRoot&&o.shadowRoot!==e&&nr(o.shadowRoot,t,n,r),a&&g(o)){let e=O(o);if(e){let i=Tn(o,t,n);nr(e,i.x,i.y,r)}}r.add(o)}},rr=(e,t)=>{let n=new Set;return nr(document,e,t,n),[...n]},ir=(e,t,n)=>{let r=[],i=e;for(;i&&i!==window;){let e=He(i);if(!e||!g(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=Tn(r[e],a,o);a=t.x,o=t.y}return{x:a,y:o}},ar=`http://www.w3.org/2000/svg`,or=e=>{if(e.localName===`svg`)return e;let t=e,n=e.parentElement;for(;n?.namespaceURI===ar&&(t=n,n.localName!==`svg`);)n=n.parentElement;return t},sr=(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},cr=(e,t,n)=>{if(Nn(e))return null;let r=e.ownerDocument,i=r.defaultView;if(!i)return null;let a=ir(i,t,n),o=e.getRootNode(),s=sr(r,a.x,a.y,Yt(o)?o:null);if(!s)return null;let c=Re(s)?s:s.parentElement;if(!c||c===e)return null;let l=e.namespaceURI===ar;return!(l?or(e):e).contains(c)||!l&&We(c).pointerEvents!==`none`?null:c},lr=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom,ur=(e,t,n=document)=>{let r=n.createElement(`style`);r.setAttribute(e,``);let i=un(n);return i&&(r.nonce=i),fn(r),r.textContent=t,n.head.appendChild(r),r},dr=`html { pointer-events: none !important; }
28
+ iframe[${ye}] { pointer-events: auto !important; }`,fr=new Set,A=new Map;let j=!1;const pr=e=>{if(A.has(e))return;let t=ur(`data-react-grab-frozen-pseudo`,dr,e),n=ur(`data-react-grab-hittest-override`,`html, body { pointer-events: auto !important; }`,e);n.disabled=!0,A.set(e,{pointerEventsStyle:t,hitTestOverrideStyle:n})},mr=e=>{let t=A.get(e);t&&(t.pointerEventsStyle.remove(),t.hitTestOverrideStyle.remove(),A.delete(e))},hr=()=>j,gr=e=>(fr.add(e),j&&pr(e),()=>{fr.delete(e),mr(e)}),_r=()=>{if(!j){j=!0,fr.add(document);for(let e of fr)pr(e)}},vr=()=>{if(j){j=!1;for(let e of[...A.keys()])mr(e)}},yr=()=>{if(j)for(let e of A.values())e.pointerEventsStyle.disabled||(e.pointerEventsStyle.disabled=!0),e.hitTestOverrideStyle.disabled&&(e.hitTestOverrideStyle.disabled=!1)},br=()=>{if(j)for(let e of A.values())e.pointerEventsStyle.disabled&&(e.pointerEventsStyle.disabled=!1),e.hitTestOverrideStyle.disabled||(e.hitTestOverrideStyle.disabled=!0)},M=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)},xr=new Set,N=new Set;let P=!1;const Sr=(e,t)=>{if(N.has(e))try{e.unfreeze()}catch(e){t.push(e)}finally{N.delete(e)}},Cr=e=>{xr.add(e);try{P&&e.isConnected()&&(e.freeze(),N.add(e))}catch(t){throw xr.delete(e),t}return()=>{let t=[];Sr(e,t),xr.delete(e),M(t,`Unregistering renderer freeze failed`)}},wr=()=>{if(!P){P=!0;try{for(let e of xr)e.isConnected()&&(e.freeze(),N.add(e))}catch(e){P=!1;let t=[];for(let e of[...N].reverse())Sr(e,t);throw t.length===0?e:AggregateError([e,...t],`Rolling back renderer freeze failed`)}}},Tr=()=>{if(!P)return;P=!1;let e=[];for(let t of[...N].reverse())Sr(t,e);M(e,`Unfreezing renderers failed`)},Er=new WeakMap,Dr=new WeakMap,F=new WeakMap,Or=new WeakMap,kr=new WeakMap,Ar=[`name`,`position`,`rotation`,`scale`,`color`,`visible`,`args`],I=e=>typeof e==`object`&&!!e,jr=e=>typeof e==`object`&&!!e||typeof e==`function`,L=(e,t)=>typeof e[t]==`function`,R=e=>I(e)&&typeof e.x==`number`&&typeof e.y==`number`&&typeof e.z==`number`&&L(e,`set`)&&L(e,`clone`)&&L(e,`applyMatrix4`)&&L(e,`project`),Mr=e=>I(e)&&L(e,`clone`)&&L(e,`premultiply`),Nr=e=>I(e)&&`boundingBox`in e&&L(e,`computeBoundingBox`),Pr=e=>I(e)&&typeof e.type==`string`&&I(e.props)&&Fr(e.object),Fr=e=>I(e)&&e.isObject3D===!0&&typeof e.uuid==`string`&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.visible==`boolean`&&Mr(e.matrixWorld)&&L(e,`updateWorldMatrix`),Ir=e=>I(e)&&e.isCamera===!0,Lr=e=>Fr(e)&&e.isScene===!0&&Array.isArray(e.children),Rr=e=>I(e)&&typeof e.tagName==`string`&&e.tagName.toLowerCase()===`canvas`&&L(e,`getContext`),zr=e=>I(e)&&Rr(e.domElement),Br=e=>I(e)&&L(e,`set`),Vr=e=>I(e)&&L(e,`setFromCamera`)&&L(e,`intersectObjects`),Hr=e=>I(e)&&zr(e.gl)&&Lr(e.scene)&&Ir(e.camera)&&Vr(e.raycaster)&&Br(e.pointer),Ur=e=>e===`always`||e===`demand`||e===`never`,Wr=e=>I(e)&&typeof e.elapsedTime==`number`,Gr=(e,t)=>{let n=e.getState();if(typeof n.setFrameloop!=`function`)return;let r=Wr(n.clock)?n.clock.elapsedTime:null;n.setFrameloop(t);let i=e.getState().clock;r!==null&&Wr(i)&&(i.elapsedTime=r)},Kr=e=>{if(Or.has(e))return;let t=null,n=Cr({freeze:()=>{let n=F.get(e);if(!n)return;let r=n.getState();if(Ur(r.frameloop)&&typeof r.setFrameloop==`function`){let e=r.frameloop;Gr(n,`never`),t=()=>Gr(n,e)}},isConnected:()=>e.isConnected,unfreeze:()=>{t?.(),t=null}});Or.set(e,n)},qr=e=>{let t=Or.get(e);t&&(Or.delete(e),t())},Jr=e=>Pr(e.__r3f)?e.__r3f:null,Yr=e=>{let t=e.current.stateNode;if(!I(t)||!jr(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 Hr(i)?()=>{let e=Reflect.apply(r,n,[]);return Hr(e)?e:i}:null},Xr=e=>{let t=kr.get(e);t&&(kr.delete(e),F.get(t.canvas)===t.root&&(F.delete(t.canvas),qr(t.canvas)))},Zr=e=>{let t=Yr(e);if(!t){Xr(e);return}let n=t().gl.domElement;if(!n.isConnected||!e.current.child){Xr(e);return}let r=kr.get(e);r&&r.canvas!==n&&(Xr(e),r=void 0),r?(r.root.getState=t,r.root.selectableObjects=null):(r={canvas:n,root:{getState:t,selectableObjects:null}},kr.set(e,r)),F.set(n,r.root),Kr(n)};Lt({name:`react-grab-three-selection`,onCommitFiberRoot:(e,t)=>Zr(t)});const Qr=e=>{let t=e;for(;t;){if(Jr(t))return t;t=t.parent}return null},$r=e=>{let t=e;for(;t;){let e=Jr(t);if(e&&typeof e.eventCount==`number`&&e.eventCount>0)return!0;t=t.parent}return!1},ei=(e,t)=>{let n=e;for(;n;){if(n===t)return!0;n=n.parent}return!1},ti=e=>{let t=e;for(;t;){if(!t.visible)return!1;t=t.parent}return!0},ni=e=>!!Jr(e)&&(Nr(e.geometry)||e.type.toLowerCase()===`sprite`),ri=e=>e.isInstancedMesh!==!0||typeof e.count!=`number`||!Number.isInteger(e.count)||e.count<=0||!e.getMatrixAt?0:e.count,ii=(e,t,n,r)=>{try{let i={object:n};r!==void 0&&(i.instanceId=r);let a=ai(t,n,i);a&&e.push(a)}catch{}},ai=(e,t,n)=>{let r=typeof n.instanceId==`number`&&Number.isInteger(n.instanceId)?n.instanceId:null,i=Er.get(t);i||(i=new Map,Er.set(t,i));let a=i.get(r);if(a)return a.canvas=e.gl.domElement,a.intersectionPoint=R(n.point)?n.point:null,a.object=t,a.rootState=e,a.element;let o=Jr(t),s=o?Bt(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:R(n.point)?n.point:null,object:t,rootState:e,tagName:c},d=l.getBoundingClientRect.bind(l);return l.getBoundingClientRect=()=>{let e=gi(u),t=l.ownerDocument.defaultView?.DOMRect;return t?new t(e.x,e.y,e.width,e.height):d()},Ht(l,{hostElement:u.canvas,supportsDomEditing:!1,getBounds:()=>gi(u),getFiber:()=>u.fiber?xt(u.fiber):null,getPreview:()=>li(u),getSelector:()=>ui(u),getTagName:()=>u.tagName,isConnected:()=>u.canvas.isConnected&&ei(u.object,u.rootState.scene)}),i.set(r,u),Dr.set(l,u),l},oi=(e,t,n)=>{if(!Rr(e))return e;let r=F.get(e);if(!r)return e;try{let i=r.getState(),a=Jt(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(!$r(e.object))continue;let t=Qr(e.object);if(!t||t.visible===!1)continue;let n=ai(i,t,e);if(n)return n}for(let e of c){let t=Qr(e.object);if(!t||t.visible===!1)continue;let n=ai(i,t,e);if(n)return n}}catch{}return e},si=(e,t)=>{if(!Rr(e))return[];let n=F.get(e);if(!n)return[];try{let e=n.getState(),r=t?Dr.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);ni(n)&&t.push(n)}n.selectableObjects=t}let i=[];for(let t of n.selectableObjects){if(!ti(t)||!ei(t,e.scene)||t.isInstancedMesh===!0&&t.count===0)continue;let n=ri(t);if(n>0&&n<=512){for(let r=0;r<n;r+=1)ii(i,e,t,r);continue}if(n>512&&r?.object===t&&r.instanceId!==null){i.push(r.element);continue}ii(i,e,t)}return i}catch{return[]}},ci=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,li=e=>{let t=e.instance?.props??{},n=[];for(let r of Ar){let i=t[r];r===`name`&&i===void 0&&e.object.name&&(i=e.object.name);let a=ci(i);a&&n.push(`${r}=${a}`)}return e.instanceId!==null&&n.push(`instanceId={${e.instanceId}}`),`<${e.tagName}${n.length>0?` ${n.join(` `)}`:``} />`},ui=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}`)}]`},di=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)},fi=e=>{if(!Nr(e.geometry))return null;if(!e.geometry.boundingBox)try{e.geometry.computeBoundingBox()}catch{return null}let t=e.geometry.boundingBox;return!t||!R(t.min)||!R(t.max)?null:t},pi=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||!R(t.min)||!R(t.max)?null:t},mi=e=>e.instanceId===null?pi(e.object)??fi(e.object):fi(e.object),hi=(e,t)=>{let n=t.x+t.width/2,r=t.y+t.height/2;try{let i=e.intersectionPoint?e.intersectionPoint.clone():R(e.object.position)?e.object.position.clone().set(0,0,0).applyMatrix4(di(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`}},gi=e=>{let t=Jt(e.canvas);try{let n=mi(e);if(!n)return hi(e,t);let r=di(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 hi(e,t);let f=Math.max(t.x,s),p=Math.max(t.y,c),ee=Math.min(t.x+t.width,l),m=Math.min(t.y+t.height,u);return ee<=f||m<=p?hi(e,t):{x:f,y:p,width:ee-f,height:m-p,borderRadius:`0px`}}catch{return hi(e,t)}};let z=null,B=null,V=null;const _i=()=>{V!==null&&clearTimeout(V),V=setTimeout(()=>{V=null,br()},100)},vi=()=>{V!==null&&(clearTimeout(V),V=null)},yi=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},bi=(e,t,n)=>{let r=oi(e,t,n);return Hn(r)&&D(e)&&$n(e,t,n)?r:null},xi=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];vi(),yr();try{let n=rr(e,t),r=_n()?n.filter(D):n,i=[],a=new Set,o=!1;for(let n of r){let r=n,s=$n(n,e,t);if(!o){let i=cr(n,e,t);i&&D(i)&&Hn(i)&&$n(i,e,t)?(r=i,s=!0,o=!0):Hn(n)&&s&&(o=!0)}let c=oi(r,e,t);if(s&&!a.has(c)&&(a.add(c),i.push(c)),r===n)continue;let l=E(r);for(;l&&D(l);){let n=oi(l,e,t);$n(l,e,t)&&!a.has(n)&&(a.add(n),i.push(n)),l=E(l)}break}return i}finally{_i()}},Si=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();if(B){let r=B.element,i=n-B.timestamp<16;if(r.isConnected&&i&&lr(e,t,B.bounds)&&!O(r))return r;B=null,z?.element===r&&(z=null)}if(z){let r=yi(e,t,z.clientX,z.clientY),i=n-z.timestamp<16;if(r&&i){if(!z.preciseHitElement)return z.element;let n=cr(z.preciseHitElement,e,t);if(n){let r=bi(n,e,t);if(r)return r}return z.usesTextHitTesting?bi(z.preciseHitElement,e,t)??tr(e,t):z.fallbackElement}}vi(),yr();try{let r=null,i=Dn(e,t),a=i?Qn(i)!==null:!1,o=i?cr(i,e,t):null,s=o?bi(o,e,t):null,c=(i?bi(i,e,t):null)??tr(e,t);if(r=s??c,r&&g(r)&&!O(r)){let e=Jt(r);B={element:r,timestamp:n,bounds:{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height}}}else B=null;return z={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{_i()}},Ci=()=>{vi(),br(),z=null,B=null},H=e=>{console.warn(`[react-grab]`,e)},wi=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]);let U=!1,W=null,G=!1;const K=new Map;let Ti=-1;const Ei=new WeakSet,Di=new WeakSet,Oi=new WeakMap,ki=new Map,q=new Map,Ai=e=>{if(W===e&&(G=!0),Ei.has(e))return!0;if(!U&&W===e){let t=(Oi.get(e)??0)+1;return Oi.set(e,t),t<4?!1:(Ei.add(e),!0)}return!U||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(Ei.add(e),Di.add(e),!0)};typeof window<`u`&&(window.requestAnimationFrame=e=>{let t=Ai(e);if(U&&t){let t=Ti--;return K.set(t,e),t}let n=Sn(t=>{if(U&&Ai(e)){let t=Ti--;K.set(t,e),ki.set(n,t);return}let r=W,i=G;W=e,G=!1;try{e(t)}finally{let t=G;W=r,G=i,!t&&!Di.has(e)&&(Ei.delete(e),Oi.delete(e))}});return n},window.cancelAnimationFrame=e=>{if(K.has(e)){K.delete(e);return}let t=q.get(e);if(t!==void 0){Cn(t.nativeId),q.delete(e);return}let n=ki.get(e);if(n!==void 0){K.delete(n),ki.delete(e);return}Cn(e)});const ji=()=>{if(!U){U=!0,K.clear(),ki.clear();for(let[e,{nativeId:t,callback:n}]of q)Cn(t),K.set(e,n);q.clear()}},Mi=()=>{if(U){U=!1;for(let[e,t]of K.entries()){let n=Sn(n=>{q.delete(e);let r=W,i=G;W=t,G=!1;try{t(n)}finally{let e=G;W=r,G=i,!e&&!Di.has(t)&&(Ei.delete(t),Oi.delete(t))}});q.set(e,{nativeId:n,callback:t})}K.clear(),ki.clear()}},Ni=`
29
+ [${ve}],
30
+ [${ve}] * {
31
+ animation-play-state: paused !important;
32
+ transition: none !important;
33
+ }
34
+ `,Pi=e=>e?.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName===`svg`;let Fi=null,J=[],Ii=[],Li=[];const Ri=new Set,Y=new Map,X=new Map;let zi=[];const Bi=()=>Y.size>0,Vi=()=>{Fi||=ur(`data-react-grab-frozen-styles`,Ni)},Hi=e=>{let t=new Set;for(let n of e){let e=Pi(n)?n:n.closest(`svg`);Pi(e)&&t.add(e);for(let e of n.querySelectorAll(`svg`))Pi(e)&&t.add(e)}return[...t]},Ui=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},Wi=(e,t)=>{for(let n of e){let e=X.get(n)??0;if(e===0){X.set(n,1),t.push(n),Ui(n,`pauseAnimations`);continue}X.set(n,e+1),t.push(n)}},Gi=(e,t)=>{let n=[];for(let r of e){let e=X.get(r);if(e){if(e===1){try{Ui(r,`unpauseAnimations`),X.delete(r)}catch(e){n.push(r),t.push(e)}continue}X.set(r,e-1)}}return n},Ki=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},qi=e=>{for(let t of e)try{t.finish()}catch{}},Ji=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},Yi=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;if(!Re(t))return!1;let n=t.getRootNode();return Yt(n)&&Fn(n.host)},Xi=e=>{if(e.length===0||wi(e,Li))return;Zi();let t=[...e];Vi(),J=t,Ii=[];try{Wi(Hi(J),Ii);for(let e of J)e.setAttribute(ve,``);let e=Ki(J);zi=[];for(let t of e)t.pause(),zi.push(t);Li=t}catch(e){try{Zi()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},Zi=()=>{if(J.length===0&&Ii.length===0&&zi.length===0)return;let e=J,t=Ii,n=zi,r=[],i=[];Li=[];for(let t of e)try{t.removeAttribute(ve)}catch(e){i.push(t),r.push(e)}J=i,Ii=Gi(t,r),Ji(n),zi=[],M(r,`Unfreezing element animations failed`)},Qi=e=>e.length===0?(Zi(),()=>{}):(Xi(e),Zi),$i=e=>{let t=[];for(let n of e.getAnimations())Yi(n)||n.playState===`running`&&t.push(n);return{targetDocument:e,runningAnimations:t}},ea=e=>{let t=Y.get(e);if(!t)return[];let n=[],r=t.styleElement;if(r){try{if(t.didUseCssFreeze){r.textContent=`
35
+ *, *::before, *::after {
36
+ transition: none !important;
37
+ }
38
+ `;let t=[];for(let n of e.getAnimations())Yi(n)||t.push(n);qi(t)}else Ji(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=Gi(t.frozenSvgElements,n),t.styleElement===null&&t.frozenSvgElements.length===0&&t.frozenWaapiAnimations.length===0&&Y.delete(e),n},ta=e=>{if(Y.has(e.targetDocument))return;let t=ur(`data-react-grab-global-freeze`,``,e.targetDocument),n={styleElement:t,frozenSvgElements:[],frozenWaapiAnimations:[],didUseCssFreeze:!1};if(Y.set(e.targetDocument,n),e.runningAnimations.length>200)t.textContent=`
39
+ *, *::before, *::after {
40
+ animation-play-state: paused !important;
41
+ transition: none !important;
42
+ }
43
+ `,n.didUseCssFreeze=!0;else for(let t of e.runningAnimations)t.pause(),n.frozenWaapiAnimations.push(t);Wi(Hi(Array.from(e.targetDocument.querySelectorAll(`svg`))),n.frozenSvgElements)},na=e=>{Ri.add(e);try{Bi()&&ta($i(e))}catch(t){Ri.delete(e);let n=ea(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{Ri.delete(e),M(ea(e),`Unfreezing frame animations failed`)}},ra=()=>Bi()?[]:(Ri.add(document),[...Ri].map($i)),ia=e=>{if(!Bi()){for(let t of e)ta(t);ji()}},aa=()=>{if(!Bi())return;let e=[];for(let t of[...Y.keys()])e.push(...ea(t));try{Mi()}catch(t){e.push(t)}M(e,`Unfreezing global animations failed`)},oa=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!In(n)&&(h(n)&&t.add(n),n.shadowRoot&&oa(n.shadowRoot,t),g(n))){let e=O(n);e&&oa(e,t)}},sa=()=>{let e=new Set;return oa(document,e),[...e]},ca=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],la=[`focus`,`blur`,`focusin`,`focusout`],ua=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],da=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],fa=new Map,pa=new Map,ma=new Set;let ha=!1;const ga=e=>{e.stopImmediatePropagation()},_a=e=>{e.preventDefault(),e.stopImmediatePropagation()},va=e=>{for(let t of ca)e.addEventListener(t,ga,!0);for(let t of la)e.addEventListener(t,_a,!0)},ya=e=>{for(let t of ca)e.removeEventListener(t,ga,!0);for(let t of la)e.removeEventListener(t,_a,!0)},ba=e=>{ma.add(e);let t=gr(e);return ha&&va(e),()=>{ha&&ya(e),ma.delete(e),t()}},xa=(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}},Sa=(e,t)=>{let n=[],r=Dn(e,t);for(;r&&r!==document.documentElement&&!In(r);)h(r)&&n.push(r),r=E(r);return n},Ca=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;){if(h(t)&&e.push(t),t.shadowRoot?.activeElement){t=t.shadowRoot.activeElement;continue}if(g(t)){t=O(t)?.activeElement??null;continue}t=null}return e},wa=(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`)}},Ta=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},Ea=(e,t)=>{if(hr())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?Sa(e,t):sa();for(let e of r){let t=xa(e,ua);t&&n.push(t)}let i=[];for(let e of Ca()){let t=xa(e,da,pa);t&&i.push(t)}return{hoverStates:n,focusStates:i}},Da=e=>{if(e){ha=!0,ma.add(document);for(let e of ma)va(e);wa(e.hoverStates,fa),wa(e.focusStates,pa),_r()}},Oa=()=>{Ci(),ha=!1;for(let e of ma)ya(e);let e=[...Ta(fa),...Ta(pa)];try{vr()}catch(t){e.push(t)}M(e,`Unfreezing pseudo states failed`)},ka=()=>{let e=[];try{Tr()}catch(t){e.push(t)}try{Oa()}catch(t){e.push(t)}try{aa()}catch(t){e.push(t)}return e},Aa=(e,t)=>{let n=Ea(e,t),r=ra();try{Da(n),ia(r),wr()}catch(e){let t=ka();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},ja=()=>{M(ka(),`Unfreezing global interactions failed`)};let Z=!1,Q=0,Ma=0;const Na=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},Pa=new WeakMap,Fa=new WeakMap,Ia=new WeakMap,La=new Set,Ra=[],$=[],za=new WeakMap,Ba=new WeakMap,Va=new WeakSet,Ha=bt,Ua=new Set,Wa=new WeakMap;Lt({name:`react-grab-freeze-updates`,onCommitFiberRoot:(e,t)=>{let n=y().renderers.get(e);n&&Wa.set(t,n)}});const Ga=e=>{try{let t=e.rendererPackageName;return typeof t==`string`&&t.startsWith(`react-dom`)}catch{return!1}},Ka=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},qa=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},Ja=e=>{let t=Wa.get(e);if(t)return Ga(t)?t:null;let n=Array.from(y().renderers.values()).filter(Ga);if(n.length===1){let t=n[0];return t&&Wa.set(e,t),t??null}let r=qa(e);if(!r)return null;for(let t of n)try{let n=t.findFiberByHostInstance?.(r);if(n&&Ka(n)===e)return Wa.set(e,t),t}catch{}return null},Ya=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`)},Xa=()=>{if(Ha.size>0){let e=new Set;for(let t of Ha)Ya(t)&&e.add(t);return e}let e=new Set,t=n=>{let r=Bt(n);if(r){let t=Ka(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},Za=(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},Qa=e=>{if(!e||za.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=()=>Z?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>Z?null:n,set:e=>{if(Z){e!==null&&(t.bufferedPending=Za(t.bufferedPending??null,e));return}n=e}}),za.set(e,t)},$a=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},eo=e=>{let t=za.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=$a(t.pendingValueAtPause??null),r=$a(t.bufferedPending??null);for(let t of[...e,...r])$.push(()=>n(t))}za.delete(e)},to=e=>{if(Ba.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return Z?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(Z){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),Ba.set(e,t)},no=e=>{let t=Ba.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),Ba.delete(e))},ro=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Qa(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)to(n),n=n.next},io=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&eo(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)no(n),n=n.next},ao=e=>{let t=e;for(;t;){if(lt(t)&&ro(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}},oo=e=>{let t=e;for(;t;){if(lt(t)&&io(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}},so=e=>{if(Pa.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};Pa.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!Z||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Na(Fa,a,()=>(...e)=>{Z?$.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!Z||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Na(Fa,a,()=>(...e)=>{Z?$.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!Z||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Na(Ia,a,()=>e=>{Z?Ra.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>Z?n.useSyncExternalStore(t=>e(()=>{Z?La.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},co=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`&&so(r),r),set:e=>{r=e}})},lo=(e,t)=>{queueMicrotask(()=>{if(!(Z||Ma!==t))try{for(let t of e){let e=Ja(t);if(t.current&&e?.scheduleUpdate)try{e.scheduleUpdate(t.current)}catch(e){H(new T(`scheduleUpdate failed during unfreeze`,e))}}}catch(e){H(new T(`scheduleReactUpdate failed`,e))}})},uo=e=>{for(let t of e)try{t()}catch(e){H(new T(`Callback failed during state replay`,e))}},fo=()=>{for(let e of y().renderers.values())Ga(e)&&(Va.has(e)||(co(e),Va.add(e)))},po=()=>{La.clear(),Ra.length=0,$.length=0},mo=()=>{let e=Ma,t=new Set(Ua);try{for(let e of Xa())t.add(e)}catch(e){H(new T(`Collecting fiber roots failed during unfreeze`,e))}Ua.clear(),Z=!1;for(let e of t)try{oo(e.current)}catch(e){H(new T(`Resuming a fiber root failed during unfreeze`,e))}let n=Array.from(La),r=Ra.slice(),i=$.slice();po(),uo(n),uo(r),uo(i),!Z&&Ma===e&&lo(t,e)},ho=()=>{let e=Q===0;if(Q+=1,e)try{fo(),Ma+=1,Z=!0;let e=Xa();for(let t of e)Ua.add(t),ao(t.current)}catch(e){throw--Q,Z&&mo(),e}let t=!1;return()=>{t||(t=!0,--Q,Q===0&&mo())}},go=()=>{try{return ho()}catch(e){return H(new T(`Pausing React updates failed`,e)),()=>{}}};export{Yt as $,Ce as $t,_n as A,ue as At,nn as B,s as Bt,Hn as C,De as Ct,Cn as D,Pe as Dt,O as E,Ae as Et,E as F,p as Ft,Zt as G,le as Gt,sn as H,Se as Ht,pn as I,ke as It,en as J,o as Jt,$t as K,se as Kt,fn as L,ge as Lt,D as M,ie as Mt,gn as N,xe as Nt,Sn as O,Ne as Ot,mn as P,be as Pt,an as Q,he as Qt,un as R,Me as Rt,Vn as S,ee as St,Nn as T,ne as Tt,Xt as U,ce as Ut,tn as V,ae as Vt,rn as W,oe as Wt,T as X,pe as Xt,w as Y,me as Yt,on as Z,fe as Zt,yr as _,h as _t,ba as a,f as an,pt as at,Qn as b,de as bt,na as c,i as cn,Bt as ct,Si as d,m as dn,xt as dt,Le as en,Jt as et,xi as f,te as fn,rt as ft,br as g,g as gt,M as h,He as ht,ja as i,u as in,vt as it,vn as j,Oe as jt,wn as k,l as kt,H as l,we as ln,ct as lt,oi as m,Ue as mt,ho as n,Ie as nn,C as nt,Xi as o,d as on,lt as ot,si as p,t as pn,y as pt,Qt as q,a as qt,Aa as r,c as rn,Ut as rt,Qi as s,Te as sn,yt as st,go as t,ye as tn,Kt as tt,Ci as u,je as un,mt as ut,cr as v,Re as vt,In as w,Ee as wt,Xn as x,re as xt,rr as y,_e as yt,cn as z,Fe as zt};
@@ -6,7 +6,7 @@
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
- import { D as ReactGrabAPI, P as Theme, b as Options, r as StackFrame } from "./copy-content-CcSwO8vJ.js";
9
+ import { D as ReactGrabAPI, P as Theme, b as Options, r as StackFrame } from "./copy-content-lkRiqdFh.js";
10
10
 
11
11
  //#region src/core/context.d.ts
12
12
  declare const getStack: (element: Element) => Promise<StackFrame[] | null>;
@@ -6,7 +6,7 @@
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
- import { D as ReactGrabAPI, P as Theme, b as Options, r as StackFrame } from "./copy-content-Dxdqj7pl.cjs";
9
+ import { D as ReactGrabAPI, P as Theme, b as Options, r as StackFrame } from "./copy-content-BwBAqbRh.cjs";
10
10
 
11
11
  //#region src/core/context.d.ts
12
12
  declare const getStack: (element: Element) => Promise<StackFrame[] | null>;
package/dist/index.cjs CHANGED
@@ -6,4 +6,4 @@
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
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./core-ZoLZAlfk.cjs`),t=require(`./freeze-updates-XTAVYI_V.cjs`),n=require(`./open-file-CyQbbgyi.cjs`),r=()=>{if(typeof window>`u`||window.parent===window)return null;try{return window.parent.__REACT_GRAB__??null}catch{return null}};if(typeof window<`u`&&!window.__REACT_GRAB_DISABLED__){let t=window.__REACT_GRAB__??r();t?e.a(t):e.a(e.t()),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:e.r()}))}exports.DEFAULT_THEME=e.l,exports.FreezeError=t.B,exports.OpenFileError=t.H,exports.PluginSetupError=t.G,exports.ReactGrabError=t.K,exports.commentPlugin=e.c,exports.formatElementInfo=n.r,exports.generateSnippet=e.n,exports.getGlobalApi=e.r,exports.getStack=n.s,exports.init=e.t,exports.isInstrumentationActive=t.it,exports.openPlugin=e.s,exports.registerPlugin=e.i,exports.setGlobalApi=e.a,exports.unregisterPlugin=e.o;
9
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./core-BVAZvGKe.cjs`),t=require(`./freeze-updates-BFeB7yq2.cjs`),n=require(`./open-file-5Szw8z7u.cjs`),r=()=>{if(typeof window>`u`||window.parent===window)return null;try{return window.parent.__REACT_GRAB__??null}catch{return null}};if(typeof window<`u`&&!window.__REACT_GRAB_DISABLED__){let t=window.__REACT_GRAB__??r();t?e.a(t):e.a(e.t()),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:e.r()}))}exports.DEFAULT_THEME=e.l,exports.FreezeError=t.U,exports.OpenFileError=t.G,exports.PluginSetupError=t.J,exports.ReactGrabError=t.Y,exports.commentPlugin=e.c,exports.formatElementInfo=n.r,exports.generateSnippet=e.n,exports.getGlobalApi=e.r,exports.getStack=n.o,exports.init=e.t,exports.isInstrumentationActive=t.st,exports.openPlugin=e.s,exports.registerPlugin=e.i,exports.setGlobalApi=e.a,exports.unregisterPlugin=e.o;
package/dist/index.d.cts CHANGED
@@ -6,8 +6,8 @@
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
- import { A as Rect, C as PluginConfig, D as ReactGrabAPI, E as PromptModeContext, F as ToolbarState, M as SettableOptions, N as SourceInfo, P as Theme, S as Plugin, T as Position, _ as ElementSelectedEventDetail, a as ActionContext, b as Options, c as AgentContext, d as DeepPartial, f as DragRect, g as ElementLabelVariant, h as ElementLabelContext, j as SelectedElementPayload, k as ReactGrabState, l as ContextMenuAction, n as isInstrumentationActive, o as ActionContextHooks, s as ActivationMode, u as ContextMenuActionContext, v as GrabbedBox, w as PluginHooks, x as OverlayBounds, y as OpenFileActionHooks } from "./copy-content-Dxdqj7pl.cjs";
10
- import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-DdYffA2X.cjs";
9
+ import { A as Rect, C as PluginConfig, D as ReactGrabAPI, E as PromptModeContext, F as ToolbarState, M as SettableOptions, N as SourceInfo, P as Theme, S as Plugin, T as Position, _ as ElementSelectedEventDetail, a as ActionContext, b as Options, c as AgentContext, d as DeepPartial, f as DragRect, g as ElementLabelVariant, h as ElementLabelContext, j as SelectedElementPayload, k as ReactGrabState, l as ContextMenuAction, n as isInstrumentationActive, o as ActionContextHooks, s as ActivationMode, u as ContextMenuActionContext, v as GrabbedBox, w as PluginHooks, x as OverlayBounds, y as OpenFileActionHooks } from "./copy-content-BwBAqbRh.cjs";
10
+ import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-CvAuGVjl.cjs";
11
11
  import { i as ReactGrabError, n as OpenFileError, r as PluginSetupError, t as FreezeError } from "./errors-CTlIFDQs.cjs";
12
12
 
13
13
  //#region src/core/plugins/comment.d.ts
package/dist/index.d.ts CHANGED
@@ -6,8 +6,8 @@
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
- import { A as Rect, C as PluginConfig, D as ReactGrabAPI, E as PromptModeContext, F as ToolbarState, M as SettableOptions, N as SourceInfo, P as Theme, S as Plugin, T as Position, _ as ElementSelectedEventDetail, a as ActionContext, b as Options, c as AgentContext, d as DeepPartial, f as DragRect, g as ElementLabelVariant, h as ElementLabelContext, j as SelectedElementPayload, k as ReactGrabState, l as ContextMenuAction, n as isInstrumentationActive, o as ActionContextHooks, s as ActivationMode, u as ContextMenuActionContext, v as GrabbedBox, w as PluginHooks, x as OverlayBounds, y as OpenFileActionHooks } from "./copy-content-CcSwO8vJ.js";
10
- import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-Cd-ADR9Q.js";
9
+ import { A as Rect, C as PluginConfig, D as ReactGrabAPI, E as PromptModeContext, F as ToolbarState, M as SettableOptions, N as SourceInfo, P as Theme, S as Plugin, T as Position, _ as ElementSelectedEventDetail, a as ActionContext, b as Options, c as AgentContext, d as DeepPartial, f as DragRect, g as ElementLabelVariant, h as ElementLabelContext, j as SelectedElementPayload, k as ReactGrabState, l as ContextMenuAction, n as isInstrumentationActive, o as ActionContextHooks, s as ActivationMode, u as ContextMenuActionContext, v as GrabbedBox, w as PluginHooks, x as OverlayBounds, y as OpenFileActionHooks } from "./copy-content-lkRiqdFh.js";
10
+ import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-BX45N3Oq.js";
11
11
  import { i as ReactGrabError, n as OpenFileError, r as PluginSetupError, t as FreezeError } from "./errors-BEgowzRA.js";
12
12
 
13
13
  //#region src/core/plugins/comment.d.ts