react-grab 0.2.0-dev.23bce0e → 0.2.0-dev.38d4995
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-BwBAqbRh.d.cts → copy-content-CljOvmB4.d.cts} +294 -132
- package/dist/{copy-content-lkRiqdFh.d.ts → copy-content-DDLzIgnG.d.ts} +294 -132
- 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-C1CGyUJw.js +11 -0
- package/dist/core-CYC_DsQ_.cjs +11 -0
- package/dist/{execute-context-menu-action-DjY3nHFh.js → execute-context-menu-action-Dd-oxJiJ.js} +1 -1
- package/dist/{execute-context-menu-action-CTLj2Bxi.cjs → execute-context-menu-action-R9qh8DM8.cjs} +1 -1
- package/dist/freeze-updates-Bg6XBOxo.js +43 -0
- package/dist/freeze-updates-DsB9dRQe.cjs +43 -0
- package/dist/{index-CvAuGVjl.d.cts → index-BlldPSOG.d.cts} +1 -1
- package/dist/{index-BX45N3Oq.d.ts → index-VLefE6H1.d.ts} +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-CP_S-b2f.cjs +20 -0
- package/dist/open-file-DYWtuLPq.js +29 -0
- 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-BYVRT521.cjs +9 -0
- package/dist/renderer-COtU0rkU.js +9 -0
- package/package.json +3 -3
- package/dist/core-BDARLOT5.cjs +0 -11
- package/dist/core-hRyDkVes.js +0 -11
- package/dist/freeze-updates-BMJYZMBU.cjs +0 -43
- package/dist/freeze-updates-CXjHiBEI.js +0 -43
- package/dist/open-file-C_RX8tk-.cjs +0 -20
- package/dist/open-file-D-QVk1oz.js +0 -29
- package/dist/renderer-BhlTRrcm.cjs +0 -9
- package/dist/renderer-DoXaOa_p.js +0 -9
package/dist/{execute-context-menu-action-DjY3nHFh.js → execute-context-menu-action-Dd-oxJiJ.js}
RENAMED
|
@@ -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
|
-
import{B as e,V as t,_t as n,l as r,nt as i,sn as a,wt as o,z as s}from"./freeze-updates-CXjHiBEI.js";const c={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return l(this.context.count)},getNextContextId(){return l(this.context.count++)}};function l(e){let t=String(e),n=t.length-1;return c.context.id+(n?String.fromCharCode(96+n):``)+t}function u(e){c.context=e}const d=(e,t)=>e===t,f=Symbol(`solid-proxy`),p=typeof Proxy==`function`,m=Symbol(`solid-track`),h={equals:d};let g=me;const _={owned:null,cleanups:null,context:null,owner:null},v={};var y=null;let b=null,x=null,S=null,C=null,w=0;function T(e,t){let n=x,r=y,i=e.length===0,a=t===void 0?r:t,o=i?_:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>M(()=>H(o)));y=o,x=null;try{return B(s,!0)}finally{x=n,y=r}}function E(e,t){t=t?Object.assign({},h,t):h;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[ue.bind(n),e=>(typeof e==`function`&&(e=b&&b.running&&b.sources.has(n)?e(n.tValue):e(n.value)),de(n,e))]}function ee(e,t,n){L(R(e,t,!0,1))}function D(e,t,n){L(R(e,t,!1,1))}function O(e,t,n){g=he;let r=R(e,t,!1,1),i=I&&F(I);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),C?C.push(r):L(r)}function k(e,t,n){n=n?Object.assign({},h,n):h;let r=R(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,L(r),ue.bind(r)}function te(e){return e&&typeof e==`object`&&`then`in e}function A(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=v,l=null,u=!1,d=!1,f=`initialValue`in a,p=typeof r==`function`&&k(r),m=new Set,[h,g]=(a.storage||E)(a.initialValue),[_,S]=E(void 0),[C,w]=E(void 0,{equals:!1}),[T,D]=E(f?`ready`:`unresolved`);c.context&&(l=c.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:c.load&&c.has(l)&&(s=c.load(l)));function O(e,t,n,r){return o===e&&(o=null,r!==void 0&&(f=!0),(e===s||t===s)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(r,{value:t})),s=v,b&&e&&u?(b.promises.delete(e),u=!1,B(()=>{b.running=!0,A(t,n)},!1)):A(t,n)),t}function A(e,t){B(()=>{t===void 0&&g(()=>e),D(t===void 0?f?`ready`:`unresolved`:`errored`),S(t);for(let e of m.keys())e.decrement();m.clear()},!1)}function j(){let e=I&&F(I),t=h(),n=_();if(n!==void 0&&!o)throw n;return x&&!x.user&&e&&ee(()=>{C(),o&&(e.resolved&&b&&u?b.promises.add(o):m.has(e)||(e.increment(),m.add(e)))}),t}function N(e=!0){if(e!==!1&&d)return;d=!1;let t=p?p():r;if(u=b&&b.running,t==null||t===!1){O(o,M(h));return}b&&o&&b.promises.delete(o);let n,a=s===v?M(()=>{try{return i(t,{value:h(),refetching:e})}catch(e){n=e}}):s;if(n!==void 0){O(o,void 0,U(n),t);return}else if(!te(a))return O(o,a,void 0,t),a;return o=a,`v`in a?(a.s===1?O(o,a.v,void 0,t):O(o,void 0,U(a.v),t),a):(d=!0,queueMicrotask(()=>d=!1),B(()=>{D(f?`refreshing`:`pending`),w()},!1),a.then(e=>O(a,e,void 0,t),e=>O(a,void 0,U(e),t)))}Object.defineProperties(j,{state:{get:()=>T()},error:{get:()=>_()},loading:{get(){let e=T();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return j();let e=_();if(e&&!o)throw e;return h()}}});let P=y;return p?ee(()=>(P=y,N(!1))):N(!1),[j,{refetch:e=>ae(P,()=>N(e)),mutate:g}]}function j(e){return B(e,!1)}function M(e){if(x===null)return e();let t=x;x=null;try{return e()}finally{x=t}}function N(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=M(()=>t(o,i,n));return i=o,s}}function P(e){O(()=>M(e))}function ne(e){return y===null||(y.cleanups===null?y.cleanups=[e]:y.cleanups.push(e)),e}function re(){return x}function ie(){return y}function ae(e,t){let n=y,r=x;y=e,x=null;try{return B(t,!0)}catch(e){W(e)}finally{y=n,x=r}}const[oe,se]=E(!1);function ce(e,t){let n=Symbol(`context`);return{id:n,Provider:ve(n),defaultValue:e}}function F(e){let t;return y&&y.context&&(t=y.context[e.id])!==void 0?t:e.defaultValue}function le(e){let t=k(e),n=k(()=>G(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}let I;function ue(){let e=b&&b.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===1)L(this);else{let e=S;S=null,B(()=>V(this),!1),S=e}if(x){let e=this.observers?this.observers.length:0;x.sources?(x.sources.push(this),x.sourceSlots.push(e)):(x.sources=[this],x.sourceSlots=[e]),this.observers?(this.observers.push(x),this.observerSlots.push(x.sources.length-1)):(this.observers=[x],this.observerSlots=[x.sources.length-1])}return e&&b.sources.has(this)?this.tValue:this.value}function de(e,t,n){let r=b&&b.running&&b.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(b){let r=b.running;(r||!n&&b.sources.has(e))&&(b.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&B(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=b&&b.running;r&&b.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?S.push(n):C.push(n),n.observers&&ge(n)),r?n.tState=1:n.state=1)}if(S.length>1e6)throw S=[],Error()},!1)}return t}function L(e){if(!e.fn)return;H(e);let t=w;fe(e,b&&b.running&&b.sources.has(e)?e.tValue:e.value,t),b&&!b.running&&b.sources.has(e)&&queueMicrotask(()=>{B(()=>{b&&(b.running=!0),x=y=e,fe(e,e.tValue,t),x=y=null},!1)})}function fe(e,t,n){let r,i=y,a=x;x=y=e;try{r=e.fn(t)}catch(t){return e.pure&&(b&&b.running?(e.tState=1,e.tOwned&&e.tOwned.forEach(H),e.tOwned=void 0):(e.state=1,e.owned&&e.owned.forEach(H),e.owned=null)),e.updatedAt=n+1,W(t)}finally{x=a,y=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?de(e,r,!0):b&&b.running&&e.pure?(b.sources.has(e)||(e.value=r),b.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function R(e,t,n,r=1,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:y,context:y?y.context:null,pure:n};return b&&b.running&&(a.state=0,a.tState=r),y===null||y!==_&&(b&&b.running&&y.pure?y.tOwned?y.tOwned.push(a):y.tOwned=[a]:y.owned?y.owned.push(a):y.owned=[a]),a}function z(e){let t=b&&b.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===2)return V(e);if(e.suspense&&M(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<w);){if(t&&b.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(b.disposed.has(t))return}if((t?e.tState:e.state)===1)L(e);else if((t?e.tState:e.state)===2){let t=S;S=null,B(()=>V(e,n[0]),!1),S=t}}}function B(e,t){if(S)return e();let n=!1;t||(S=[]),C?n=!0:C=[],w++;try{let t=e();return pe(n),t}catch(e){n||(C=null),S=null,W(e)}}function pe(e){if(S&&=(me(S),null),e)return;let t;if(b){if(!b.promises.size&&!b.queue.size){let e=b.sources,n=b.disposed;C.push.apply(C,b.effects),t=b.resolve;for(let e of C)`tState`in e&&(e.state=e.tState),delete e.tState;b=null,B(()=>{for(let e of n)H(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)H(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}se(!1)},!1)}else if(b.running){b.running=!1,b.effects.push.apply(b.effects,C),C=null,se(!0);return}}let n=C;C=null,n.length&&B(()=>g(n),!1),t&&t()}function me(e){for(let t=0;t<e.length;t++)z(e[t])}function he(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:z(r)}if(c.context){if(c.count){c.effects||=[],c.effects.push(...e.slice(0,n));return}u()}for(c.effects&&(c.done||!c.count)&&(e=[...c.effects,...e],n+=c.effects.length,delete c.effects),t=0;t<n;t++)z(e[t])}function V(e,t){let n=b&&b.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===1?i!==t&&(!i.updatedAt||i.updatedAt<w)&&z(i):e===2&&V(i,t)}}}function ge(e){let t=b&&b.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=2:r.state=2,r.pure?S.push(r):C.push(r),r.observers&&ge(r))}}function H(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--)H(e.tOwned[t]);delete e.tOwned}if(b&&b.running&&e.pure)_e(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)H(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}b&&b.running?e.tState=0:e.state=0}function _e(e,t){if(t||(e.tState=0,b.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)_e(e.owned[t])}function U(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function W(e,t=y){throw U(e)}function G(e){if(typeof e==`function`&&!e.length)return G(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=G(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function ve(e,t){return function(t){let n;return D(()=>n=M(()=>(y.context={...y.context,[e]:t.value},le(()=>t.children))),void 0),n}}const ye=Symbol(`fallback`);function be(e){for(let t=0;t<e.length;t++)e[t]()}function xe(e,t,n={}){let r=[],i=[],a=[],o=0,s=t.length>1?[]:null;return ne(()=>be(a)),()=>{let c=e()||[],l=c.length,u,d;return c[m],M(()=>{let e,t,p,m,h,g,_,v,y;if(l===0)o!==0&&(be(a),a=[],r=[],i=[],o=0,s&&=[]),n.fallback&&(r=[ye],i[0]=T(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]=T(f);o=l}else{for(p=Array(l),m=Array(l),s&&(h=Array(l)),g=0,_=Math.min(o,l);g<_&&r[g]===c[g];g++);for(_=o-1,v=l-1;_>=g&&v>=g&&r[_]===c[v];_--,v--)p[v]=i[_],m[v]=a[_],s&&(h[v]=s[_]);for(e=new Map,t=Array(v+1),d=v;d>=g;d--)y=c[d],u=e.get(y),t[d]=u===void 0?-1:u,e.set(y,d);for(u=g;u<=_;u++)y=r[u],d=e.get(y),d!==void 0&&d!==-1?(p[d]=i[u],m[d]=a[u],s&&(h[d]=s[u]),d=t[d],e.set(y,d)):a[u]();for(d=g;d<l;d++)d in p?(i[d]=p[d],a[d]=m[d],s&&(s[d]=h[d],s[d](d))):i[d]=T(f);i=i.slice(0,o=l),r=c.slice(0)}return i});function f(e){if(a[d]=e,s){let[e,n]=E(d);return s[d]=n,t(c[d],e)}return t(c[d])}}}function Se(e,t){return M(()=>e(t||{}))}function K(){return!0}const q={get(e,t,n){return t===f?n:e.get(t)},has(e,t){return t===f?!0:e.has(t)},set:K,deleteProperty:K,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:K,deleteProperty:K}},ownKeys(e){return e.keys()}};function J(e){return(e=typeof e==`function`?e():e)?e:{}}function Ce(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function we(...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,k(r)):r}if(p&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=J(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in J(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(J(e[n])));return[...new Set(t)]}},q);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:Ce.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 Te(e,...t){let n=t.length;if(p&&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)}},q));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))}},q)),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}const Ee=e=>`Stale read from <${e}>.`;function De(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return k(xe(()=>e.each,e.children,t||void 0))}function Oe(e){let t=e.keyed,n=k(()=>e.when,void 0,void 0),r=t?n:k(n,void 0,{equals:(e,t)=>!e==!t});return k(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?M(()=>a(t?i:()=>{if(!M(r))throw Ee(`Show`);return n()})):a}return e.fallback},void 0,void 0)}const ke=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(`.`)]),Ae=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),je=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Me=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Ne(e,t){let n=Me[e];return typeof n==`object`?n[t]?n.$:void 0:n}const Pe=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Fe={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},Ie=e=>k(()=>e());function Le(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()}}}const Re=`_$DX_DELEGATE`;function ze(e,t,n,r={}){let i;return T(r=>{i=r,t===document?e():Ze(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Be(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?()=>M(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Ve(e,t=window.document){let n=t[Re]||(t[Re]=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,nt))}}function Y(e,t,n){X(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function He(e,t,n,r){X(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Ue(e,t,n){X(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function We(e,t){X(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function Ge(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 Ke(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]||(et(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||(et(e,i,!0),n[i]=o)}return n}function qe(e,t,n){if(!t)return n?Y(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 Je(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Ye(e,t={},n,r){let i={};return r||D(()=>i.children=Z(e,t.children,i.children)),D(()=>typeof t.ref==`function`&&Xe(t.ref,e)),D(()=>Qe(e,t,n,!0,i,!0)),i}function Xe(e,t,n){return M(()=>e(t,n))}function Ze(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return Z(e,t,r,n);D(r=>Z(e,t(),r,n),r)}function Qe(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=tt(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||Z(e,t.children);continue}let s=t[o];i[o]=tt(e,o,s,i[o],n,a,t)}}function X(e){return!!c.context&&!c.done&&(!e||e.isConnected)}function $e(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function et(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 tt(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 Ke(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=Pe.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(Ge(e,i,n,a),a&&Ve([i]))}else if(t.slice(0,5)===`attr:`)Y(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Ue(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Ae.has(t))||!i&&((u=Ne(t,e.tagName))||(c=ke.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(X(e))return n;t===`class`||t===`className`?We(e,n):s&&!c&&!l?e[$e(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Fe[t.split(`:`)[0]];r?He(e,r,t,n):Y(e,je[t]||t,n)}return n}function nt(e){if(c.registry&&c.events&&c.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}}),c.registry&&!c.done&&(c.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 Z(e,t,n,r,i){let a=X(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=Q(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=Q(e,n,r)}else if(o===`function`)return D(()=>{let i=t();for(;typeof i==`function`;)i=i();n=Z(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(rt(o,t,n,i))return D(()=>n=Z(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=Q(e,n,r),s)return n}else c?n.length===0?it(e,o,r):Le(e,n,o):(n&&Q(e),it(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=Q(e,n,r,t);Q(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function rt(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=rt(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=rt(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 it(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Q(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]}const at=e=>{if(!e)return!1;let t=i(e);return t?t.isConnected():!!(e.isConnected||e.ownerDocument?.contains(e))},ot=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],st=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},ct=e=>{if(document.designMode===`on`)return!0;let t=st(e);if(!t)return!1;if(t.isContentEditable)return!0;let n=s(t);return ot.some(e=>e===n||e===t.role)},lt=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},ut=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},dt=(e,t,n)=>Math.max(t,Math.min(e,n));let $=null;const ft=()=>{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},pt=()=>{if($===null){if(typeof navigator>`u`)return $=!1,$;let e=navigator.platform??ft()??navigator.userAgent;$=/Mac|iPhone|iPad|iPod/i.test(e)}return $},mt=(e,t)=>{try{return e.composedPath().some(e=>n(e)&&e.hasAttribute(t))}catch{return!1}},ht=`react-grab-toolbar-state`,gt=()=>{try{let e=localStorage.getItem(ht);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:a,collapsed:r,enabled:!r,defaultAction:typeof n.defaultAction==`string`?n.defaultAction:o}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},_t=e=>{try{localStorage.setItem(ht,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},vt=e=>e.key===`Enter`,yt=e=>e.metaKey||e.ctrlKey,bt=(e,t,n={})=>{if(!t.key)return null;if(vt(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return yt(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},xt=e=>e??!0,St=(t,n)=>{if(typeof t.enabled==`function`){if(!n)return!1;try{return t.enabled(n)}catch(n){return r(new e(t.id,n)),!1}}return xt(t.enabled)},Ct=(e,n)=>{if(!St(e,n))return!1;try{let i=e.onAction(n);i&&i.catch(n=>{r(new t(e.id,n))})}catch(n){r(new t(e.id,n))}return!0};export{j as A,ie as B,qe as C,m as D,f as E,D as F,P as G,we as H,A as I,F as J,Te as K,T as L,ce as M,O as N,De as O,k as P,E as R,Ye as S,Xe as T,N as U,xe as V,ne as W,Ze as _,_t as a,Y as b,dt as c,ct as d,at as f,Ve as g,We as h,gt as i,Se as j,Oe as k,lt as l,Ke as m,St as n,mt as o,Ge as p,M as q,bt as r,pt as s,Ct as t,ut as u,Ie as v,Be as w,Je as x,ze as y,re as z};
|
|
9
|
+
import{B as e,St as t,V as n,fn as r,kt as i,l as a,nt as o,z as s}from"./freeze-updates-Bg6XBOxo.js";const c={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return l(this.context.count)},getNextContextId(){return l(this.context.count++)}};function l(e){let t=String(e),n=t.length-1;return c.context.id+(n?String.fromCharCode(96+n):``)+t}function u(e){c.context=e}const d=(e,t)=>e===t,f=Symbol(`solid-proxy`),p=typeof Proxy==`function`,m=Symbol(`solid-track`),h={equals:d};let g=me;const _={owned:null,cleanups:null,context:null,owner:null},v={};var y=null;let b=null,x=null,S=null,C=null,w=0;function T(e,t){let n=x,r=y,i=e.length===0,a=t===void 0?r:t,o=i?_:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>M(()=>H(o)));y=o,x=null;try{return B(s,!0)}finally{x=n,y=r}}function E(e,t){t=t?Object.assign({},h,t):h;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[ue.bind(n),e=>(typeof e==`function`&&(e=b&&b.running&&b.sources.has(n)?e(n.tValue):e(n.value)),de(n,e))]}function ee(e,t,n){L(R(e,t,!0,1))}function D(e,t,n){L(R(e,t,!1,1))}function O(e,t,n){g=he;let r=R(e,t,!1,1),i=I&&F(I);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),C?C.push(r):L(r)}function k(e,t,n){n=n?Object.assign({},h,n):h;let r=R(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,L(r),ue.bind(r)}function te(e){return e&&typeof e==`object`&&`then`in e}function A(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=v,l=null,u=!1,d=!1,f=`initialValue`in a,p=typeof r==`function`&&k(r),m=new Set,[h,g]=(a.storage||E)(a.initialValue),[_,S]=E(void 0),[C,w]=E(void 0,{equals:!1}),[T,D]=E(f?`ready`:`unresolved`);c.context&&(l=c.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:c.load&&c.has(l)&&(s=c.load(l)));function O(e,t,n,r){return o===e&&(o=null,r!==void 0&&(f=!0),(e===s||t===s)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(r,{value:t})),s=v,b&&e&&u?(b.promises.delete(e),u=!1,B(()=>{b.running=!0,A(t,n)},!1)):A(t,n)),t}function A(e,t){B(()=>{t===void 0&&g(()=>e),D(t===void 0?f?`ready`:`unresolved`:`errored`),S(t);for(let e of m.keys())e.decrement();m.clear()},!1)}function j(){let e=I&&F(I),t=h(),n=_();if(n!==void 0&&!o)throw n;return x&&!x.user&&e&&ee(()=>{C(),o&&(e.resolved&&b&&u?b.promises.add(o):m.has(e)||(e.increment(),m.add(e)))}),t}function N(e=!0){if(e!==!1&&d)return;d=!1;let t=p?p():r;if(u=b&&b.running,t==null||t===!1){O(o,M(h));return}b&&o&&b.promises.delete(o);let n,a=s===v?M(()=>{try{return i(t,{value:h(),refetching:e})}catch(e){n=e}}):s;if(n!==void 0){O(o,void 0,U(n),t);return}else if(!te(a))return O(o,a,void 0,t),a;return o=a,`v`in a?(a.s===1?O(o,a.v,void 0,t):O(o,void 0,U(a.v),t),a):(d=!0,queueMicrotask(()=>d=!1),B(()=>{D(f?`refreshing`:`pending`),w()},!1),a.then(e=>O(a,e,void 0,t),e=>O(a,void 0,U(e),t)))}Object.defineProperties(j,{state:{get:()=>T()},error:{get:()=>_()},loading:{get(){let e=T();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return j();let e=_();if(e&&!o)throw e;return h()}}});let P=y;return p?ee(()=>(P=y,N(!1))):N(!1),[j,{refetch:e=>ae(P,()=>N(e)),mutate:g}]}function j(e){return B(e,!1)}function M(e){if(x===null)return e();let t=x;x=null;try{return e()}finally{x=t}}function N(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=M(()=>t(o,i,n));return i=o,s}}function P(e){O(()=>M(e))}function ne(e){return y===null||(y.cleanups===null?y.cleanups=[e]:y.cleanups.push(e)),e}function re(){return x}function ie(){return y}function ae(e,t){let n=y,r=x;y=e,x=null;try{return B(t,!0)}catch(e){W(e)}finally{y=n,x=r}}const[oe,se]=E(!1);function ce(e,t){let n=Symbol(`context`);return{id:n,Provider:ve(n),defaultValue:e}}function F(e){let t;return y&&y.context&&(t=y.context[e.id])!==void 0?t:e.defaultValue}function le(e){let t=k(e),n=k(()=>G(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}let I;function ue(){let e=b&&b.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===1)L(this);else{let e=S;S=null,B(()=>V(this),!1),S=e}if(x){let e=this.observers?this.observers.length:0;x.sources?(x.sources.push(this),x.sourceSlots.push(e)):(x.sources=[this],x.sourceSlots=[e]),this.observers?(this.observers.push(x),this.observerSlots.push(x.sources.length-1)):(this.observers=[x],this.observerSlots=[x.sources.length-1])}return e&&b.sources.has(this)?this.tValue:this.value}function de(e,t,n){let r=b&&b.running&&b.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(b){let r=b.running;(r||!n&&b.sources.has(e))&&(b.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&B(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=b&&b.running;r&&b.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?S.push(n):C.push(n),n.observers&&ge(n)),r?n.tState=1:n.state=1)}if(S.length>1e6)throw S=[],Error()},!1)}return t}function L(e){if(!e.fn)return;H(e);let t=w;fe(e,b&&b.running&&b.sources.has(e)?e.tValue:e.value,t),b&&!b.running&&b.sources.has(e)&&queueMicrotask(()=>{B(()=>{b&&(b.running=!0),x=y=e,fe(e,e.tValue,t),x=y=null},!1)})}function fe(e,t,n){let r,i=y,a=x;x=y=e;try{r=e.fn(t)}catch(t){return e.pure&&(b&&b.running?(e.tState=1,e.tOwned&&e.tOwned.forEach(H),e.tOwned=void 0):(e.state=1,e.owned&&e.owned.forEach(H),e.owned=null)),e.updatedAt=n+1,W(t)}finally{x=a,y=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?de(e,r,!0):b&&b.running&&e.pure?(b.sources.has(e)||(e.value=r),b.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function R(e,t,n,r=1,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:y,context:y?y.context:null,pure:n};return b&&b.running&&(a.state=0,a.tState=r),y===null||y!==_&&(b&&b.running&&y.pure?y.tOwned?y.tOwned.push(a):y.tOwned=[a]:y.owned?y.owned.push(a):y.owned=[a]),a}function z(e){let t=b&&b.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===2)return V(e);if(e.suspense&&M(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<w);){if(t&&b.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(b.disposed.has(t))return}if((t?e.tState:e.state)===1)L(e);else if((t?e.tState:e.state)===2){let t=S;S=null,B(()=>V(e,n[0]),!1),S=t}}}function B(e,t){if(S)return e();let n=!1;t||(S=[]),C?n=!0:C=[],w++;try{let t=e();return pe(n),t}catch(e){n||(C=null),S=null,W(e)}}function pe(e){if(S&&=(me(S),null),e)return;let t;if(b){if(!b.promises.size&&!b.queue.size){let e=b.sources,n=b.disposed;C.push.apply(C,b.effects),t=b.resolve;for(let e of C)`tState`in e&&(e.state=e.tState),delete e.tState;b=null,B(()=>{for(let e of n)H(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)H(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}se(!1)},!1)}else if(b.running){b.running=!1,b.effects.push.apply(b.effects,C),C=null,se(!0);return}}let n=C;C=null,n.length&&B(()=>g(n),!1),t&&t()}function me(e){for(let t=0;t<e.length;t++)z(e[t])}function he(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:z(r)}if(c.context){if(c.count){c.effects||=[],c.effects.push(...e.slice(0,n));return}u()}for(c.effects&&(c.done||!c.count)&&(e=[...c.effects,...e],n+=c.effects.length,delete c.effects),t=0;t<n;t++)z(e[t])}function V(e,t){let n=b&&b.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===1?i!==t&&(!i.updatedAt||i.updatedAt<w)&&z(i):e===2&&V(i,t)}}}function ge(e){let t=b&&b.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=2:r.state=2,r.pure?S.push(r):C.push(r),r.observers&&ge(r))}}function H(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--)H(e.tOwned[t]);delete e.tOwned}if(b&&b.running&&e.pure)_e(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)H(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}b&&b.running?e.tState=0:e.state=0}function _e(e,t){if(t||(e.tState=0,b.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)_e(e.owned[t])}function U(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function W(e,t=y){throw U(e)}function G(e){if(typeof e==`function`&&!e.length)return G(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=G(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function ve(e,t){return function(t){let n;return D(()=>n=M(()=>(y.context={...y.context,[e]:t.value},le(()=>t.children))),void 0),n}}const ye=Symbol(`fallback`);function be(e){for(let t=0;t<e.length;t++)e[t]()}function xe(e,t,n={}){let r=[],i=[],a=[],o=0,s=t.length>1?[]:null;return ne(()=>be(a)),()=>{let c=e()||[],l=c.length,u,d;return c[m],M(()=>{let e,t,p,m,h,g,_,v,y;if(l===0)o!==0&&(be(a),a=[],r=[],i=[],o=0,s&&=[]),n.fallback&&(r=[ye],i[0]=T(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]=T(f);o=l}else{for(p=Array(l),m=Array(l),s&&(h=Array(l)),g=0,_=Math.min(o,l);g<_&&r[g]===c[g];g++);for(_=o-1,v=l-1;_>=g&&v>=g&&r[_]===c[v];_--,v--)p[v]=i[_],m[v]=a[_],s&&(h[v]=s[_]);for(e=new Map,t=Array(v+1),d=v;d>=g;d--)y=c[d],u=e.get(y),t[d]=u===void 0?-1:u,e.set(y,d);for(u=g;u<=_;u++)y=r[u],d=e.get(y),d!==void 0&&d!==-1?(p[d]=i[u],m[d]=a[u],s&&(h[d]=s[u]),d=t[d],e.set(y,d)):a[u]();for(d=g;d<l;d++)d in p?(i[d]=p[d],a[d]=m[d],s&&(s[d]=h[d],s[d](d))):i[d]=T(f);i=i.slice(0,o=l),r=c.slice(0)}return i});function f(e){if(a[d]=e,s){let[e,n]=E(d);return s[d]=n,t(c[d],e)}return t(c[d])}}}function Se(e,t){return M(()=>e(t||{}))}function K(){return!0}const q={get(e,t,n){return t===f?n:e.get(t)},has(e,t){return t===f?!0:e.has(t)},set:K,deleteProperty:K,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:K,deleteProperty:K}},ownKeys(e){return e.keys()}};function J(e){return(e=typeof e==`function`?e():e)?e:{}}function Ce(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function we(...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,k(r)):r}if(p&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=J(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in J(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(J(e[n])));return[...new Set(t)]}},q);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:Ce.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 Te(e,...t){let n=t.length;if(p&&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)}},q));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))}},q)),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}const Ee=e=>`Stale read from <${e}>.`;function De(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return k(xe(()=>e.each,e.children,t||void 0))}function Oe(e){let t=e.keyed,n=k(()=>e.when,void 0,void 0),r=t?n:k(n,void 0,{equals:(e,t)=>!e==!t});return k(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?M(()=>a(t?i:()=>{if(!M(r))throw Ee(`Show`);return n()})):a}return e.fallback},void 0,void 0)}const ke=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(`.`)]),Ae=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),je=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Me=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Ne(e,t){let n=Me[e];return typeof n==`object`?n[t]?n.$:void 0:n}const Pe=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Fe={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},Ie=e=>k(()=>e());function Le(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()}}}const Re=`_$DX_DELEGATE`;function ze(e,t,n,r={}){let i;return T(r=>{i=r,t===document?e():Ze(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Be(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?()=>M(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Ve(e,t=window.document){let n=t[Re]||(t[Re]=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,nt))}}function Y(e,t,n){X(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function He(e,t,n,r){X(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Ue(e,t,n){X(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function We(e,t){X(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function Ge(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 Ke(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]||(et(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||(et(e,i,!0),n[i]=o)}return n}function qe(e,t,n){if(!t)return n?Y(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 Je(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Ye(e,t={},n,r){let i={};return r||D(()=>i.children=Z(e,t.children,i.children)),D(()=>typeof t.ref==`function`&&Xe(t.ref,e)),D(()=>Qe(e,t,n,!0,i,!0)),i}function Xe(e,t,n){return M(()=>e(t,n))}function Ze(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return Z(e,t,r,n);D(r=>Z(e,t(),r,n),r)}function Qe(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=tt(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||Z(e,t.children);continue}let s=t[o];i[o]=tt(e,o,s,i[o],n,a,t)}}function X(e){return!!c.context&&!c.done&&(!e||e.isConnected)}function $e(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function et(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 tt(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 Ke(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=Pe.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(Ge(e,i,n,a),a&&Ve([i]))}else if(t.slice(0,5)===`attr:`)Y(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Ue(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Ae.has(t))||!i&&((u=Ne(t,e.tagName))||(c=ke.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(X(e))return n;t===`class`||t===`className`?We(e,n):s&&!c&&!l?e[$e(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Fe[t.split(`:`)[0]];r?He(e,r,t,n):Y(e,je[t]||t,n)}return n}function nt(e){if(c.registry&&c.events&&c.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}}),c.registry&&!c.done&&(c.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 Z(e,t,n,r,i){let a=X(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=Q(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=Q(e,n,r)}else if(o===`function`)return D(()=>{let i=t();for(;typeof i==`function`;)i=i();n=Z(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(rt(o,t,n,i))return D(()=>n=Z(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=Q(e,n,r),s)return n}else c?n.length===0?it(e,o,r):Le(e,n,o):(n&&Q(e),it(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=Q(e,n,r,t);Q(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function rt(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=rt(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=rt(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 it(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Q(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]}const at=e=>{if(!e)return!1;let t=o(e);return t?t.isConnected():!!(e.isConnected||e.ownerDocument?.contains(e))},ot=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],st=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},ct=e=>{if(document.designMode===`on`)return!0;let t=st(e);if(!t)return!1;if(t.isContentEditable)return!0;let n=s(t);return ot.some(e=>e===n||e===t.role)},lt=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},ut=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},dt=(e,t,n)=>Math.max(t,Math.min(e,n));let $=null;const ft=()=>{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},pt=()=>{if($===null){if(typeof navigator>`u`)return $=!1,$;let e=navigator.platform??ft()??navigator.userAgent;$=/Mac|iPhone|iPad|iPod/i.test(e)}return $},mt=(e,n)=>{try{return e.composedPath().some(e=>t(e)&&e.hasAttribute(n))}catch{return!1}},ht=`react-grab-toolbar-state`,gt=()=>{try{let e=localStorage.getItem(ht);if(!e)return null;let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t,a=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:r,collapsed:a,enabled:!a,defaultAction:typeof n.defaultAction==`string`?n.defaultAction:i}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},_t=e=>{try{localStorage.setItem(ht,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},vt=e=>e.key===`Enter`,yt=e=>e.metaKey||e.ctrlKey,bt=(e,t,n={})=>{if(!t.key)return null;if(vt(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return yt(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},xt=e=>e??!0,St=(t,n)=>{if(typeof t.enabled==`function`){if(!n)return!1;try{return t.enabled(n)}catch(n){return a(new e(t.id,n)),!1}}return xt(t.enabled)},Ct=(e,t)=>{if(!St(e,t))return!1;try{let r=e.onAction(t);r&&r.catch(t=>{a(new n(e.id,t))})}catch(t){a(new n(e.id,t))}return!0};export{j as A,ie as B,qe as C,m as D,f as E,D as F,P as G,we as H,A as I,F as J,Te as K,T as L,ce as M,O as N,De as O,k as P,E as R,Ye as S,Xe as T,N as U,xe as V,ne as W,Ze as _,_t as a,Y as b,dt as c,ct as d,at as f,Ve as g,We as h,gt as i,Se as j,Oe as k,lt as l,Ke as m,St as n,mt as o,Ge as p,M as q,bt as r,pt as s,Ct as t,ut as u,Ie as v,Be as w,Je as x,ze as y,re as z};
|
package/dist/{execute-context-menu-action-CTLj2Bxi.cjs → execute-context-menu-action-R9qh8DM8.cjs}
RENAMED
|
@@ -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
|
-
const e=require(`./freeze-updates-BMJYZMBU.cjs`),t=Symbol(`error`);function n(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function r(e,i=a){let o=i&&i.context&&i.context[t],s=n(e);if(!o)throw s;try{for(let e of o)e(s)}catch(e){r(e,i&&i.owner||null)}}const i={context:null,owner:null,owned:null,cleanups:null};let a=null;function o(){let e={owner:a,context:a?a.context:null,owned:null,cleanups:null};return a&&(a.owned?a.owned.push(e):a.owned=[e]),e}function s(e,t){let n=a,o=t===void 0?n:t,s=e.length===0?i:{context:o?o.context:null,owner:o,owned:null,cleanups:null};a=s;let c;try{c=e(e.length===0?()=>{}:()=>g(s))}catch(e){r(e)}finally{a=n}return c}function c(e,t){return[()=>e,t=>e=typeof t==`function`?t(e):t]}function l(e,t){a=o();try{e(t)}catch(e){r(e)}finally{a=a.owner}}const u=l;function d(e,t){}function f(e,t){a=o();let n;try{n=e(t)}catch(e){r(e)}finally{a=a.owner}return()=>n}function p(e){return e()}const m=p;function ee(e,t,n={}){let r=Array.isArray(e),i=n.defer;return()=>{if(i)return;let n;if(r){n=[];for(let t=0;t<e.length;t++)n.push(e[t]())}else n=e();return t(n)}}function h(e){}function te(e){return a&&(a.cleanups?a.cleanups.push(e):a.cleanups=[e]),e}function g(e){if(e.owned){for(let t=0;t<e.owned.length;t++)g(e.owned[t]);e.owned=null}if(e.cleanups){for(let t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}}function _(e){let t=Symbol(`context`);return{id:t,Provider:b(t),defaultValue:e}}function v(e){return a&&a.context&&a.context[e.id]!==void 0?a.context[e.id]:e.defaultValue}function ne(){return a}function re(e){let t=f(()=>y(e()));return t.toArray=()=>{let e=t();return Array.isArray(e)?e:e==null?[]:[e]},t}function y(e){if(typeof e==`function`&&!e.length)return y(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=y(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function b(e){return function(t){return f(()=>(a.context={...a.context,[e]:t.value},re(()=>t.children)))}}function x(e,t,n={}){let r=e(),i=[];if(r&&r.length)for(let e=0,n=r.length;e<n;e++)i.push(t(r[e],()=>e));else n.fallback&&(i=[n.fallback()]);return()=>i}const S={context:void 0,getContextId(){if(!this.context)throw Error(`getContextId cannot be used under non-hydrating context`);return C(this.context.count)},getNextContextId(){if(!this.context)throw Error(`getNextContextId cannot be used under non-hydrating context`);return C(this.context.count++)}};function C(e){let t=String(e),n=t.length-1;return S.context.id+(n?String.fromCharCode(96+n):``)+t}function w(e){S.context=e}function ie(){return S.context?{...S.context,id:S.getNextContextId(),count:0}:void 0}function ae(e,t){if(S.context&&!S.context.noHydrate){let n=S.context;w(ie());let r=e(t||{});return w(n),r}return e(t||{})}function oe(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`&&(r=r()),r){let n=Object.getOwnPropertyDescriptors(r);for(let r in n)r in t||Object.defineProperty(t,r,{enumerable:!0,get(){for(let t=e.length-1;t>=0;t--){let n,i=e[t];if(typeof i==`function`&&(i=i()),n=(i||{})[r],n!==void 0)return n}}})}}return t}function se(e,...t){let n=Object.getOwnPropertyDescriptors(e),r=e=>{let t={};for(let r=0;r<e.length;r++){let i=e[r];n[i]&&(Object.defineProperty(t,i,n[i]),delete n[i])}return t};return t.map(r).concat(r(Object.keys(n)))}function ce(e,t){let n=e.each||[],r=n.length,i=e.children;if(r){let e=Array(r);for(let a=0;a<r;a++)e[a]=t(i,n[a],a);return e}return e.fallback}function le(e){return ce(e,(e,t,n)=>e(t,()=>n))}function ue(e){let t;return e.when?typeof(t=e.children)==`function`?t(e.keyed?e.when:()=>e.when):t:e.fallback||``}const de=_();let T=null;function fe(e,t,r={}){typeof t!=`function`&&(r=t||{},t=e,e=!0);let i=new Set,a=S.getNextContextId(),o={},s=r.storage?r.storage(r.initialValue)[0]():r.initialValue,c,l;if(S.context.async&&r.ssrLoadFrom!==`initial`&&(o=S.context.resources[a]||(S.context.resources[a]={}),o.ref))return!o.data&&!o.ref[0]._loading&&!o.ref[0].error&&o.ref[1].refetch(),o.ref;let u=()=>{if(l)throw l;let e=r.ssrLoadFrom!==`initial`&&S.context.async&&`data`in S.context.resources[a];if(!e&&T&&T.push(a),!e&&d._loading){let e=v(de);e&&(e.resources.set(a,d),i.add(e))}return e},d=()=>u()?S.context.resources[a].data:s,f=()=>(u(),d._loading);d._loading=!1,d.error=void 0,d.state=`initialValue`in r?`ready`:`unresolved`,Object.defineProperties(d,{latest:{get(){return d()}},loading:{get(){return f()}}});function p(){let o=S.context;if(!o.async)return d._loading=!!(typeof e==`function`?e():e);if(o.resources&&a in o.resources&&`data`in o.resources[a]){s=o.resources[a].data;return}let u;try{if(T=[],u=typeof e==`function`?e():e,T.length)return}finally{T=null}if(!c){if(u==null||u===!1)return;c=t(u,{value:s})}return typeof c==`object`&&c&&`then`in c?(d._loading=!0,d.state=`pending`,c=c.then(e=>(d._loading=!1,d.state=`ready`,o.resources[a].data=e,c=null,E(i),e)).catch(e=>{throw d._loading=!1,d.state=`errored`,d.error=l=n(e),c=null,E(i),l}),o.serialize&&o.serialize(a,c,r.deferStream),c):(o.resources[a].data=c,o.serialize&&o.serialize(a,c),c=null,o.resources[a].data)}r.ssrLoadFrom!==`initial`&&p();let m=[d,{refetch:p,mutate:e=>s=e}];return c&&(o.ref=m),m}function pe(e){for(let t of e.resources.values())if(t._loading)return!1;return!0}function E(e){for(let t of e)pe(t)&&(t.completed(),e.delete(t))}const me=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(`.`)]),he=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),ge=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),_e=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function D(e,t){let n=_e[e];return typeof n==`object`?n[t]?n.$:void 0:n}const O=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),k={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},A=e=>f(()=>e());function j(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()}}}const M=`_$DX_DELEGATE`;function N(e,t,n,r={}){let i;return s(r=>{i=r,t===document?e():H(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function P(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?()=>m(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function F(e,t=window.document){let n=t[M]||(t[M]=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,we))}}function I(e,t,n){U(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function ve(e,t,n,r){U(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function ye(e,t,n){U(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function L(e,t){U(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function R(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 z(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]||(W(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||(W(e,i,!0),n[i]=o)}return n}function B(e,t,n){if(!t)return n?I(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 be(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function xe(e,t={},n,r){let i={};return r||u(()=>i.children=K(e,t.children,i.children)),u(()=>typeof t.ref==`function`&&V(t.ref,e)),u(()=>Se(e,t,n,!0,i,!0)),i}function V(e,t,n){return m(()=>e(t,n))}function H(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return K(e,t,r,n);u(r=>K(e,t(),r,n),r)}function Se(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=G(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||K(e,t.children);continue}let s=t[o];i[o]=G(e,o,s,i[o],n,a,t)}}function U(e){return!!S.context&&!S.done&&(!e||e.isConnected)}function Ce(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function W(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 G(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return B(e,n,r);if(t===`classList`)return z(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=O.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(R(e,i,n,a),a&&F([i]))}else if(t.slice(0,5)===`attr:`)I(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)ye(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=he.has(t))||!i&&((u=D(t,e.tagName))||(c=me.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(U(e))return n;t===`class`||t===`className`?L(e,n):s&&!c&&!l?e[Ce(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&k[t.split(`:`)[0]];r?ve(e,r,t,n):I(e,ge[t]||t,n)}return n}function we(e){if(S.registry&&S.events&&S.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}}),S.registry&&!S.done&&(S.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 K(e,t,n,r,i){let a=U(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=Y(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=Y(e,n,r)}else if(o===`function`)return u(()=>{let i=t();for(;typeof i==`function`;)i=i();n=K(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(q(o,t,n,i))return u(()=>n=K(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=Y(e,n,r),s)return n}else c?n.length===0?J(e,o,r):j(e,n,o):(n&&Y(e),J(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=Y(e,n,r,t);Y(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function q(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=q(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=q(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 J(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Y(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]}const Te=t=>{if(!t)return!1;let n=e.nt(t);return n?n.isConnected():!!(t.isConnected||t.ownerDocument?.contains(t))},Ee=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],De=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},Oe=t=>{if(document.designMode===`on`)return!0;let n=De(t);if(!n)return!1;if(n.isContentEditable)return!0;let r=e.z(n);return Ee.some(e=>e===r||e===n.role)},ke=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},Ae=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},X=(e,t,n)=>Math.max(t,Math.min(e,n));let Z=null;const je=()=>{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},Me=()=>{if(Z===null){if(typeof navigator>`u`)return Z=!1,Z;let e=navigator.platform??je()??navigator.userAgent;Z=/Mac|iPhone|iPad|iPod/i.test(e)}return Z},Ne=(t,n)=>{try{return t.composedPath().some(t=>e._t(t)&&t.hasAttribute(n))}catch{return!1}},Q=`react-grab-toolbar-state`,Pe=()=>{try{let t=localStorage.getItem(Q);if(!t)return null;let n=JSON.parse(t);if(typeof n!=`object`||!n)return null;let r=n,i=typeof r.collapsed==`boolean`?r.collapsed:!1;return{edge:r.edge===`top`||r.edge===`bottom`||r.edge===`left`||r.edge===`right`?r.edge:`bottom`,ratio:typeof r.ratio==`number`?r.ratio:e.sn,collapsed:i,enabled:!i,defaultAction:typeof r.defaultAction==`string`?r.defaultAction:e.wt}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},Fe=e=>{try{localStorage.setItem(Q,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},Ie=e=>e.key===`Enter`,Le=e=>e.metaKey||e.ctrlKey,Re=(e,t,n={})=>{if(!t.key)return null;if(Ie(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return Le(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},ze=e=>e??!0,$=(t,n)=>{if(typeof t.enabled==`function`){if(!n)return!1;try{return t.enabled(n)}catch(n){return e.l(new e.B(t.id,n)),!1}}return ze(t.enabled)},Be=(t,n)=>{if(!$(t,n))return!1;try{let r=t.onAction(n);r&&r.catch(n=>{e.l(new e.V(t.id,n))})}catch(n){e.l(new e.V(t.id,n))}return!0};Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return oe}});
|
|
9
|
+
const e=require(`./freeze-updates-DsB9dRQe.cjs`),t=Symbol(`error`);function n(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function r(e,i=a){let o=i&&i.context&&i.context[t],s=n(e);if(!o)throw s;try{for(let e of o)e(s)}catch(e){r(e,i&&i.owner||null)}}const i={context:null,owner:null,owned:null,cleanups:null};let a=null;function o(){let e={owner:a,context:a?a.context:null,owned:null,cleanups:null};return a&&(a.owned?a.owned.push(e):a.owned=[e]),e}function s(e,t){let n=a,o=t===void 0?n:t,s=e.length===0?i:{context:o?o.context:null,owner:o,owned:null,cleanups:null};a=s;let c;try{c=e(e.length===0?()=>{}:()=>g(s))}catch(e){r(e)}finally{a=n}return c}function c(e,t){return[()=>e,t=>e=typeof t==`function`?t(e):t]}function l(e,t){a=o();try{e(t)}catch(e){r(e)}finally{a=a.owner}}const u=l;function d(e,t){}function f(e,t){a=o();let n;try{n=e(t)}catch(e){r(e)}finally{a=a.owner}return()=>n}function p(e){return e()}const m=p;function ee(e,t,n={}){let r=Array.isArray(e),i=n.defer;return()=>{if(i)return;let n;if(r){n=[];for(let t=0;t<e.length;t++)n.push(e[t]())}else n=e();return t(n)}}function h(e){}function te(e){return a&&(a.cleanups?a.cleanups.push(e):a.cleanups=[e]),e}function g(e){if(e.owned){for(let t=0;t<e.owned.length;t++)g(e.owned[t]);e.owned=null}if(e.cleanups){for(let t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}}function _(e){let t=Symbol(`context`);return{id:t,Provider:b(t),defaultValue:e}}function v(e){return a&&a.context&&a.context[e.id]!==void 0?a.context[e.id]:e.defaultValue}function ne(){return a}function re(e){let t=f(()=>y(e()));return t.toArray=()=>{let e=t();return Array.isArray(e)?e:e==null?[]:[e]},t}function y(e){if(typeof e==`function`&&!e.length)return y(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=y(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function b(e){return function(t){return f(()=>(a.context={...a.context,[e]:t.value},re(()=>t.children)))}}function x(e,t,n={}){let r=e(),i=[];if(r&&r.length)for(let e=0,n=r.length;e<n;e++)i.push(t(r[e],()=>e));else n.fallback&&(i=[n.fallback()]);return()=>i}const S={context:void 0,getContextId(){if(!this.context)throw Error(`getContextId cannot be used under non-hydrating context`);return C(this.context.count)},getNextContextId(){if(!this.context)throw Error(`getNextContextId cannot be used under non-hydrating context`);return C(this.context.count++)}};function C(e){let t=String(e),n=t.length-1;return S.context.id+(n?String.fromCharCode(96+n):``)+t}function w(e){S.context=e}function ie(){return S.context?{...S.context,id:S.getNextContextId(),count:0}:void 0}function ae(e,t){if(S.context&&!S.context.noHydrate){let n=S.context;w(ie());let r=e(t||{});return w(n),r}return e(t||{})}function oe(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`&&(r=r()),r){let n=Object.getOwnPropertyDescriptors(r);for(let r in n)r in t||Object.defineProperty(t,r,{enumerable:!0,get(){for(let t=e.length-1;t>=0;t--){let n,i=e[t];if(typeof i==`function`&&(i=i()),n=(i||{})[r],n!==void 0)return n}}})}}return t}function se(e,...t){let n=Object.getOwnPropertyDescriptors(e),r=e=>{let t={};for(let r=0;r<e.length;r++){let i=e[r];n[i]&&(Object.defineProperty(t,i,n[i]),delete n[i])}return t};return t.map(r).concat(r(Object.keys(n)))}function ce(e,t){let n=e.each||[],r=n.length,i=e.children;if(r){let e=Array(r);for(let a=0;a<r;a++)e[a]=t(i,n[a],a);return e}return e.fallback}function le(e){return ce(e,(e,t,n)=>e(t,()=>n))}function ue(e){let t;return e.when?typeof(t=e.children)==`function`?t(e.keyed?e.when:()=>e.when):t:e.fallback||``}const de=_();let T=null;function fe(e,t,r={}){typeof t!=`function`&&(r=t||{},t=e,e=!0);let i=new Set,a=S.getNextContextId(),o={},s=r.storage?r.storage(r.initialValue)[0]():r.initialValue,c,l;if(S.context.async&&r.ssrLoadFrom!==`initial`&&(o=S.context.resources[a]||(S.context.resources[a]={}),o.ref))return!o.data&&!o.ref[0]._loading&&!o.ref[0].error&&o.ref[1].refetch(),o.ref;let u=()=>{if(l)throw l;let e=r.ssrLoadFrom!==`initial`&&S.context.async&&`data`in S.context.resources[a];if(!e&&T&&T.push(a),!e&&d._loading){let e=v(de);e&&(e.resources.set(a,d),i.add(e))}return e},d=()=>u()?S.context.resources[a].data:s,f=()=>(u(),d._loading);d._loading=!1,d.error=void 0,d.state=`initialValue`in r?`ready`:`unresolved`,Object.defineProperties(d,{latest:{get(){return d()}},loading:{get(){return f()}}});function p(){let o=S.context;if(!o.async)return d._loading=!!(typeof e==`function`?e():e);if(o.resources&&a in o.resources&&`data`in o.resources[a]){s=o.resources[a].data;return}let u;try{if(T=[],u=typeof e==`function`?e():e,T.length)return}finally{T=null}if(!c){if(u==null||u===!1)return;c=t(u,{value:s})}return typeof c==`object`&&c&&`then`in c?(d._loading=!0,d.state=`pending`,c=c.then(e=>(d._loading=!1,d.state=`ready`,o.resources[a].data=e,c=null,E(i),e)).catch(e=>{throw d._loading=!1,d.state=`errored`,d.error=l=n(e),c=null,E(i),l}),o.serialize&&o.serialize(a,c,r.deferStream),c):(o.resources[a].data=c,o.serialize&&o.serialize(a,c),c=null,o.resources[a].data)}r.ssrLoadFrom!==`initial`&&p();let m=[d,{refetch:p,mutate:e=>s=e}];return c&&(o.ref=m),m}function pe(e){for(let t of e.resources.values())if(t._loading)return!1;return!0}function E(e){for(let t of e)pe(t)&&(t.completed(),e.delete(t))}const me=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(`.`)]),he=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),ge=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),_e=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function D(e,t){let n=_e[e];return typeof n==`object`?n[t]?n.$:void 0:n}const O=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),k={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},A=e=>f(()=>e());function j(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()}}}const M=`_$DX_DELEGATE`;function N(e,t,n,r={}){let i;return s(r=>{i=r,t===document?e():H(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function P(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?()=>m(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function F(e,t=window.document){let n=t[M]||(t[M]=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,we))}}function I(e,t,n){U(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function ve(e,t,n,r){U(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function ye(e,t,n){U(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function L(e,t){U(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function R(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 z(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]||(W(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||(W(e,i,!0),n[i]=o)}return n}function B(e,t,n){if(!t)return n?I(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 be(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function xe(e,t={},n,r){let i={};return r||u(()=>i.children=K(e,t.children,i.children)),u(()=>typeof t.ref==`function`&&V(t.ref,e)),u(()=>Se(e,t,n,!0,i,!0)),i}function V(e,t,n){return m(()=>e(t,n))}function H(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return K(e,t,r,n);u(r=>K(e,t(),r,n),r)}function Se(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=G(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||K(e,t.children);continue}let s=t[o];i[o]=G(e,o,s,i[o],n,a,t)}}function U(e){return!!S.context&&!S.done&&(!e||e.isConnected)}function Ce(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function W(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 G(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return B(e,n,r);if(t===`classList`)return z(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=O.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(R(e,i,n,a),a&&F([i]))}else if(t.slice(0,5)===`attr:`)I(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)ye(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=he.has(t))||!i&&((u=D(t,e.tagName))||(c=me.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(U(e))return n;t===`class`||t===`className`?L(e,n):s&&!c&&!l?e[Ce(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&k[t.split(`:`)[0]];r?ve(e,r,t,n):I(e,ge[t]||t,n)}return n}function we(e){if(S.registry&&S.events&&S.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}}),S.registry&&!S.done&&(S.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 K(e,t,n,r,i){let a=U(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=Y(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=Y(e,n,r)}else if(o===`function`)return u(()=>{let i=t();for(;typeof i==`function`;)i=i();n=K(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(q(o,t,n,i))return u(()=>n=K(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=Y(e,n,r),s)return n}else c?n.length===0?J(e,o,r):j(e,n,o):(n&&Y(e),J(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=Y(e,n,r,t);Y(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function q(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=q(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=q(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 J(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Y(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]}const Te=t=>{if(!t)return!1;let n=e.nt(t);return n?n.isConnected():!!(t.isConnected||t.ownerDocument?.contains(t))},Ee=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],De=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},Oe=t=>{if(document.designMode===`on`)return!0;let n=De(t);if(!n)return!1;if(n.isContentEditable)return!0;let r=e.z(n);return Ee.some(e=>e===r||e===n.role)},ke=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},Ae=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},X=(e,t,n)=>Math.max(t,Math.min(e,n));let Z=null;const je=()=>{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},Me=()=>{if(Z===null){if(typeof navigator>`u`)return Z=!1,Z;let e=navigator.platform??je()??navigator.userAgent;Z=/Mac|iPhone|iPad|iPod/i.test(e)}return Z},Ne=(t,n)=>{try{return t.composedPath().some(t=>e.St(t)&&t.hasAttribute(n))}catch{return!1}},Q=`react-grab-toolbar-state`,Pe=()=>{try{let t=localStorage.getItem(Q);if(!t)return null;let n=JSON.parse(t);if(typeof n!=`object`||!n)return null;let r=n,i=typeof r.collapsed==`boolean`?r.collapsed:!1;return{edge:r.edge===`top`||r.edge===`bottom`||r.edge===`left`||r.edge===`right`?r.edge:`bottom`,ratio:typeof r.ratio==`number`?r.ratio:e.fn,collapsed:i,enabled:!i,defaultAction:typeof r.defaultAction==`string`?r.defaultAction:e.kt}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},Fe=e=>{try{localStorage.setItem(Q,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},Ie=e=>e.key===`Enter`,Le=e=>e.metaKey||e.ctrlKey,Re=(e,t,n={})=>{if(!t.key)return null;if(Ie(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return Le(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},ze=e=>e??!0,$=(t,n)=>{if(typeof t.enabled==`function`){if(!n)return!1;try{return t.enabled(n)}catch(n){return e.l(new e.B(t.id,n)),!1}}return ze(t.enabled)},Be=(t,n)=>{if(!$(t,n))return!1;try{let r=t.onAction(n);r&&r.catch(n=>{e.l(new e.V(t.id,n))})}catch(n){e.l(new e.V(t.id,n))}return!0};Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return oe}});
|
|
@@ -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
|
+
import*as e from"react";let t=null;const n=()=>{if(t!==null)return t;try{t=window.matchMedia(`(color-gamut: p3)`).matches}catch{t=!1}return t},r=n(),i=e=>r?`color(display-p3 0.84 0.19 0.78 / ${e})`:`rgba(210, 57, 192, ${e})`,a=`0.2.0-dev.38d4995`,o=`var(--rg-panel-bg)`,s=`var(--rg-shadow)`,c=-1e3,l=.95,u=1500,d=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],f=5e3,ee=8e3,te=1e4,ne=.5,re=2147483647,ie=2147483645,ae=.7,oe=1e3/60,se=.5,ce=.01,le=i(.4),ue=i(.05),de=i(.5),fe=i(.08),pe=i(.15),me=.2,he=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],ge=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),_e=new Set([`a`,`button`,`code`,`label`,`option`,`pre`,`summary`,`text`]),ve=new Set([`script`,`style`,`template`,`noscript`]),ye=[`Meta`,`Control`,`Shift`,`Alt`],be=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),xe=`data-react-grab-frozen`,Se=`data-react-grab-same-origin-frame`,Ce=.18,we=.6,Te=.5,Ee=`data-react-grab-input`,De=.9,Oe=.5,ke=`copy`,Ae=`comment`,je=`edit`,Me=`superellipse(1.25)`,Ne=.75,Pe=.01,Fe=1e3,Ie={left:-9999,top:-9999},Le={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},Re=1e3,ze=-9999,Be=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(`.`)),Ve=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE,He=e=>Ve(e)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`,p=e=>He(e)&&e.tagName===`IFRAME`,Ue=new WeakMap,m=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},We=e=>{let t=performance.now(),n=Ue.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=m(r.borderLeftWidth),n=m(r.borderRightWidth),a=m(r.borderTopWidth),o=m(r.borderBottomWidth),s=m(r.paddingLeft),c=m(r.paddingRight),l=m(r.paddingTop),u=m(r.paddingBottom),d=m(r.width),f=m(r.height),ee=t+n+s+c,te=a+o+l+u,ne=r.boxSizing===`border-box`?d:d+ee,re=r.boxSizing===`border-box`?f:f+te;i={contentOffsetX:t+s,contentOffsetY:a+l,height:re>0?re:e.offsetHeight,width:ne>0?ne:e.offsetWidth}}return Ue.set(e,{metrics:i,timestamp:t}),i},Ge=(e,t)=>t>0?e/t:1,Ke=e=>{if(!e)return null;try{return e.frameElement}catch{return null}},qe=(e,t,n)=>{let r=t,i=n,a=1,o=1,s=e;for(;s&&s!==window;){let e=Ke(s);if(!e||!p(e))break;let t=e.getBoundingClientRect(),n=We(e),c=Ge(t.width,n.width),l=Ge(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}},Je=e=>{let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e):window.getComputedStyle(e)},Ye=(e,t)=>e.replace(/([\d.]+)px/g,(e,n)=>{let r=Number(n)*Math.abs(t);return`${Number(r.toFixed(3))}px`}),Xe=(e,t,n)=>{let[r,i]=e.split(`/`).map(e=>e.trim()),a=Ye(r,t),o=Ye(i??r,n);return i===void 0&&a===o?a:`${a} / ${o}`},Ze=`bippy-0.7.2`,Qe=Object.defineProperty,$e=()=>{},et=e=>Object.assign(e,{[Symbol.dispose]:e}),tt=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{}},nt=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e),rt=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>{if(!e||typeof e.inject!=`function`||nt(e))return!1;try{return Function.prototype.toString.call(e.inject).includes(`(injected)`)}catch{return!1}},it=new Set,at=new Set,ot=new Set,st=()=>{for(let e of it)e()},ct=e=>{for(let t of ot)t(e)},lt=e=>(ot.add(e),et(()=>{ot.delete(e)})),ut=e=>(e.renderers instanceof Map||(e.renderers=new Map),e.renderers),dt=(e,t,n,r)=>{t.set(n,r),at.add(r),e._instrumentationIsActive||(e._instrumentationIsActive=!0,st())},ft=e=>{e&&it.add(e);let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:Ze,checkDCE:tt,hasUnsupportedRendererAttached:!1,inject:e=>{let i=++n;return dt(r,t,i,e),i},on:$e,onCommitFiberRoot:$e,onCommitFiberUnmount:$e,onPostCommitFiberRoot:$e,renderers:t,supportsFiber:!0,supportsFlight:!0};try{if(Qe(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=ut(r);n.forEach((e,t)=>{at.add(e),i.set(t,e)}),(n.size>0||ot.size>0)&&pt(e),ct(r)}}}),typeof window<`u`){let e=window.hasOwnProperty.bind(window),t=Object.getOwnPropertyDescriptor(window,`hasOwnProperty`),n=!1,r=()=>{t?Qe(window,`hasOwnProperty`,t):Reflect.deleteProperty(window,`hasOwnProperty`)};Qe(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{pt(e)}return r},pt=e=>{e&&it.add(e);let t=!1,n=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!n)return;let r=ut(n);if(!n._instrumentationSource){n.checkDCE=tt,n.supportsFiber=!0,n.supportsFlight=!0,n.hasUnsupportedRendererAttached=!1,n._instrumentationSource=Ze,n._instrumentationIsActive=!1;let e=nt(n);e||(n.on=$e),r.size?(r.forEach(e=>at.add(e)),n._instrumentationIsActive=!0,st(),t=!0):!e&&rt(n)&&(n._instrumentationIsActive=!0,st(),t=!0);let i=n.inject;n.inject=e=>{let t=i.call(n,e);return dt(n,r,t,e),t}}!t&&(r.size||n._instrumentationIsActive)&&e?.()},mt=()=>Object.hasOwn(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),h=e=>mt()?(pt(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__??ft(e)):ft(e);
|
|
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{h()}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 ht=/^(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-]+)*)?$/,gt=/^\d+$/,_t=e=>vt(e)!==null,vt=e=>{let t=ht.exec(e);if(!t)return null;let n=t[4]?.split(`.`)??[];return n.some(e=>gt.test(e)&&e.length>1&&e.startsWith(`0`))?null:{major:t[1],minor:t[2],patch:t[3],prerelease:n}},yt=(e,t)=>e.length===t.length?e===t?0:e<t?-1:1:e.length<t.length?-1:1,bt=(e,t)=>{let n=gt.test(e),r=gt.test(t);return n&&r?yt(e,t):n===r?e===t?0:e<t?-1:1:n?-1:1},xt=(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=bt(n,i);if(a!==0)return a}return 0},St=(e,t)=>{let n=vt(e),r=vt(t);if(!n||!r)return null;let i=yt(n.major,r.major);if(i!==0)return i;let a=yt(n.minor,r.minor);if(a!==0)return a;let o=yt(n.patch,r.patch);return o===0?xt(n.prerelease,r.prerelease):o},g={ChildDeletion:16,Cloned:8,ContentReset:32,Hydrating:4096,PerformedWork:1,Placement:2,Snapshot:1024,Update:4,Visibility:8192},Ct={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)`},_=(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}}),wt=[{isMinimumExcluded:!0,minimumVersion:`17.0.1`,workTags:_[`17.0.2`]},{isMinimumExcluded:!1,minimumVersion:`17.0.0-alpha`,workTags:_[`17.0.0-alpha`]},{isMinimumExcluded:!1,minimumVersion:`16.6.0-beta.0`,workTags:_[`16.6.0-beta.0`]},{isMinimumExcluded:!1,minimumVersion:`16.4.3-alpha`,workTags:_[`16.4.3-alpha`]}],Tt=_[`17.0.2`],Et=e=>{if(e===void 0)return Tt;for(let t of wt){let n=St(e,t.minimumVersion);if(n===null)return Tt;if(n===1||n===0&&!t.isMinimumExcluded)return t.workTags}return _[`16.0.0`]},Dt=Et(),v=new WeakMap,Ot=e=>e.startsWith(`0.0.0-`)?Dt:Et(e),kt=e=>{let t=e?.reconcilerVersion;return t&&_t(t)?Ot(t):e?.version?Ot(e.version):Dt},At=(e,t)=>{let n=kt(t);v.set(e,n),e.alternate&&v.set(e.alternate,n)},y=e=>{let t=v.get(e);if(t)return t;let n=[e],r=e;for(;r.return;)r=r.return,n.push(r);let i=v.get(r)??Dt;for(let e of n)v.set(e,i),e.alternate&&v.set(e.alternate,i);return i};g.Placement|g.Update|g.ChildDeletion|g.ContentReset|g.Hydrating|g.Visibility|g.Snapshot;var jt=class extends Error{constructor(e,t){super(e,{cause:t}),this.name=`BippyError`}},Mt=class extends jt{constructor(e,t){super(e,t),this.name=`BippyHookInspectionError`}},Nt=class extends Mt{constructor(e,t){super(e,t),this.name=`BippyUnsupportedHookError`}},Pt=class extends jt{constructor(e,t){super(e,t),this.name=`BippySourceMapError`}};const Ft=e=>typeof e==`function`,It=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},b=e=>typeof e==`object`&&!!e&&`tag`in e&&`stateNode`in e&&`return`in e&&`child`in e&&`sibling`in e&&`flags`in e,Lt=e=>typeof e==`object`&&!!e&&`current`in e&&b(e.current),Rt=e=>{let t=y(e);switch(e.tag){case t.HostComponent:case t.HostText:case t.HostHoistable:case t.HostSingleton:return!0;default:return!1}},zt=e=>{let t=y(e);switch(e.tag){case t.ClassComponent:case t.ForwardRef:case t.FunctionComponent:case t.MemoComponent:case t.SimpleMemoComponent:return!0;default:return!1}},Bt=e=>{let t=e.memoizedProps,n=e.alternate?.memoizedProps||{},r=e.flags??e.effectTag??0,i=y(e);switch(e.tag){case i.ClassComponent:case i.ContextConsumer:case i.ForwardRef:case i.FunctionComponent:case i.MemoComponent:case i.SimpleMemoComponent:return(r&g.PerformedWork)===g.PerformedWork;default:return!e.alternate||n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref}},Vt=e=>{let t=y(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===Ct.CONCURRENT_MODE_SYMBOL_DESCRIPTION||t.description===Ct.DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION;switch(t){case Ct.CONCURRENT_MODE_NUMBER:case Ct.CONCURRENT_MODE_SYMBOL_STRING:case Ct.DEPRECATED_ASYNC_MODE_SYMBOL_STRING:return!0;default:return!1}}}};function Ht(e,t,n=!1){if(!e)return null;let r=t(e);return Ut(r)?Promise.resolve(r).then(r=>r===!0?e:Wt(e,t,n)):r===!0?e:Wt(e,t,n)}const Ut=e=>(typeof e==`object`||typeof e==`function`)&&e!==null&&`then`in e&&typeof e.then==`function`,Wt=(e,t,n)=>Gt(n?e.return:e.child,t,n),Gt=(e,t,n)=>{if(!e)return null;let r=n?null:e.sibling,i=Ht(e,t,n);return Ut(i)?Promise.resolve(i).then(e=>e??Gt(r,t,n)):i??Gt(r,t,n)},Kt=e=>Ft(e)?e:typeof e!=`object`||!e?null:Kt(Reflect.get(e,`type`)??Reflect.get(e,`render`)),qt=e=>{if(typeof e==`string`)return e;if(typeof e!=`function`&&typeof e!=`object`||e===null)return null;let t=It(e);if(t)return t;let n=Kt(e);return n?It(n):null},Jt=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||nt(e)||rt(e)},x=new Set,Yt=new WeakMap,Xt=e=>{let t=e.alternate;if(!t)return e;let n=e;for(;n.return;)n=n.return;if(Lt(n.stateNode)){let r=Ht(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 x){let r=Ht(n.current,n=>{if(n===e||n===t)return!0});if(r)return r}return e};let Zt=0;const Qt=new WeakMap,$t=(e,t=Zt++)=>{Qt.set(e,t),Number.isSafeInteger(t)&&t>=Zt&&(Zt=t+1)},en=e=>{let t=Qt.get(e);return t===void 0&&e.alternate&&(t=Qt.get(e.alternate)),t===void 0&&(t=Zt++,$t(e,t)),t},S=(e,t,n)=>{let r=t;for(;r!==null;){if(en(r),!Vt(r)&&Bt(r)&&e(r,`mount`),r.tag===y(r).SuspenseComponent)if(r.memoizedState!==null){let t=r.child,n=t?t.sibling:null;if(n){let t=n.child;t!==null&&S(e,t,!1)}}else{let t=r.child?.child??null;t!==null&&S(e,t,!1)}else r.child!==null&&S(e,r.child,!0);r=n?r.sibling:null}},tn=(e,t,n)=>{if(en(t),!n)return;en(n);let r=t.tag===y(t).SuspenseComponent;!Vt(t)&&Bt(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&&tn(e,r,i)}else if(i&&!a){let n=t.child;n!==null&&S(e,n,!0)}else if(!i&&a){rn(e,n);let r=t.child?.sibling??null;r!==null&&S(e,r,!0)}else if(t.child!==n.child){let n=t.child;for(;n;)n.alternate?tn(e,n,n.alternate):S(e,n,!1),n=n.sibling}},nn=(e,t)=>{(t.tag===y(t).HostRoot||!Vt(t))&&e(t,`unmount`)},rn=(e,t)=>{let n=t.tag===y(t).SuspenseComponent&&t.memoizedState!==null,r=t.child;for(n&&(r=(t.child?.sibling??null)?.child??null);r!==null;)r.return!==null&&(nn(e,r),rn(e,r)),r=r.sibling},C=new Set,w=new WeakMap;let an=!1;const on=e=>{let t=w.get(e)??{};if(w.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),w.get(e)?.onCommitFiberRoot!==r)return;At(i.current,e.renderers.get(t));let s=i.current.memoizedState;s===null||s!==void 0&&(s.element===null||s.element===void 0)?(x.delete(i),Yt.delete(i)):(x.add(i),Yt.set(i,t));for(let{options:e}of C)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(At(i,e.renderers.get(t)),n&&n.call(e,t,i),w.get(e)?.onCommitFiberUnmount===r)for(let{options:e}of C)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),w.get(e)?.onPostCommitFiberRoot===r)for(let{options:e}of C)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),w.get(e)?.onScheduleFiberRoot===r)for(let{options:e}of C)e.onScheduleFiberRoot&&e.onScheduleFiberRoot(t,i,a)};t.onScheduleFiberRoot=r,e.onScheduleFiberRoot=r}},sn=e=>{an||=(lt(on),!0),on(e)};try{mt()&&sn(h())}catch{}const cn=e=>{let t=h(e.onActive);t._instrumentationSource=e.name??Ze,sn(t);let n={options:e};return C.add(n),et(()=>{e.onActive&&it.delete(e.onActive),C.delete(n)})},ln=new Set,un=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),dn=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 b(i)?i:null},fn=e=>{let t=Reflect.get(e,`__internalInstanceHandle`)??Reflect.get(e,`_internalInstanceHandle`);return b(t)?t:null},pn=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},mn=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=dn(e);if(t)return t;let n=fn(e);if(n)return n;for(let t of ln){let n=Reflect.get(e,t);if(b(n))return n}for(let t of Object.keys(e))if(un(t)){ln.add(t);let n=Reflect.get(e,t);if(b(n))return n}}if(e!=null&&(typeof e==`object`||typeof e==`number`))for(let t of x){let n=Ht(t.current,t=>Rt(t)&&pn(t.stateNode)===e);if(n)return n}return null};Reflect.get(e,`useSyncExternalStore`);const hn=new WeakMap,gn=(e,t)=>{hn.set(e,t)},T=e=>hn.get(e)??null,_n=e=>T(e)?.getFiber()??mn(e);let vn=new WeakMap,yn=new WeakMap;const bn=()=>{vn=new WeakMap,yn=new WeakMap},xn=(e,t,n)=>{let r=yn.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??Je(e)).borderRadius||`0px`;return yn.set(e,{borderRadius:i,timestamp:n}),i},Sn=e=>{let t=performance.now(),n=vn.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=T(e);if(r){let n=r.getBounds();return vn.set(e,{bounds:n,timestamp:t}),n}let i=e.getBoundingClientRect(),a=qe(e.ownerDocument.defaultView,i.left,i.top),o={borderRadius:Xe(xn(e,null,t),a.scaleX,a.scaleY),height:i.height*a.scaleY,width:i.width*a.scaleX,x:a.x,y:a.y};return vn.set(e,{bounds:o,timestamp:t}),o},Cn=e=>{let t=e.ownerDocument?.defaultView;return!!(t&&e instanceof t.ShadowRoot)};var E=class extends Error{constructor(e,t){super(e,t),this.name=`ReactGrabError`}},D=class extends E{constructor(e,t){super(e,{cause:t}),this.name=`RecoverableError`}},wn=class extends E{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},Tn=class extends D{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},En=class extends D{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},Dn=class extends D{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},On=class extends D{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},kn=class extends D{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},An=class extends D{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},jn=class extends E{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},Mn=class extends E{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},Nn=class extends E{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},Pn=class extends E{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}};const Fn=e=>T(e)?.getTagName()??(e.tagName||``).toLowerCase(),In=new WeakMap,Ln=(e=document)=>{let t=In.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&&In.set(e,r),r},Rn=[[`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`,``]],zn=e=>{for(let[t,n]of Rn)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)},Bn=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===9,O=e=>{if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return Cn(t)?t.host:Bn(t)?Ke(t.defaultView):null},Vn=(e,t)=>{let n=T(e)?.hostElement??e;for(;n;){if(n===t)return!0;n=O(n)}return!1};let Hn=null;const Un=e=>{Hn=e},Wn=()=>Hn,k=e=>Hn?e?Vn(e,Hn):!1:!0,Gn=e=>e,Kn=typeof window<`u`,qn=e=>0,Jn=e=>{},Yn=Kn?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):qn,Xn=Kn?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):Jn,Zn=()=>Kn?new Promise(e=>Yn(()=>e())):Promise.resolve(),A=e=>{try{return e.contentDocument}catch{return null}},Qn=(e,t,n)=>{let r=e.getBoundingClientRect(),i=We(e),a=Ge(r.width,i.width),o=Ge(r.height,i.height);return{x:(t-r.left)/a-i.contentOffsetX,y:(n-r.top)/o-i.contentOffsetY}},$n=(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(p(r)){let e=A(r);if(!e)return r;let i=Qn(r,t,n);return $n(e,i.x,i.y)??r}return r}return null},er=(e,t)=>$n(document,e,t),tr=e=>{let t=e;for(;t;){if(t.hasAttribute(`data-react-grab-ignore`))return!0;t=O(t)}return!1},nr=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,rr={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},ir={checkVisibilityCSS:!0,visibilityProperty:!0},ar=(e,t)=>{if(nr&&!t)return e.checkVisibility(rr)?!0:e.checkVisibility(ir)?Je(e).opacity!==`0`:!1;let n=t??Je(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`},or=e=>{let t=Fn(e);return t===`html`||t===`body`},sr=[`data-react-grab`,`data-react-grab-demo`],cr=e=>sr.some(t=>e.hasAttribute(t)),lr=e=>{if(cr(e))return!0;let t=e.getRootNode();return Cn(t)&&cr(t.host)},ur=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},dr=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},fr=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(dr(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3};let pr=new WeakMap;const mr=()=>{pr=new WeakMap},hr=e=>{let t=T(e);if(t)return t.isConnected();if(or(e)||lr(e)||tr(e))return!1;let n=performance.now(),r=pr.get(e);if(r&&n-r.timestamp<50)return r.isVisible;if(!ar(e))return pr.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=Je(e);if(ur(t)||fr(t))return!1}return pr.set(e,{isVisible:!0,timestamp:n}),!0},gr=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},_r=e=>{let t=e.ownerDocument.defaultView?.getComputedStyle?.(e);if(!t)return!1;let n=t.backgroundClip!==`text`&&(t.backgroundImage!==`none`||!gr(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`},vr=new Set([`A`,`AUDIO`,`BUTTON`,`CANVAS`,`DETAILS`,`EMBED`,`IFRAME`,`IMG`,`INPUT`,`METER`,`OBJECT`,`OPTION`,`PROGRESS`,`SELECT`,`SUMMARY`,`SVG`,`TEXTAREA`,`VIDEO`]),yr=new Set([`button`,`checkbox`,`combobox`,`gridcell`,`link`,`listbox`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`scrollbar`,`searchbox`,`slider`,`spinbutton`,`switch`,`tab`,`textbox`,`treeitem`]),br=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 xr=new WeakMap,Sr=new WeakMap;const Cr=()=>{xr=new WeakMap,Sr=new WeakMap},j=(e,t,n)=>(xr.set(e,t),Sr.set(e,n),t),wr=e=>vr.has(e.tagName)||yr.has(e.getAttribute(`role`)??``)||He(e)&&e.isContentEditable,Tr=e=>{let t=performance.now(),n=Sr.get(e);if(n!==void 0&&t-n<16)return xr.get(e)??null;if(wr(e)||e.childNodes.length>64)return j(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 j(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 j(e,null,t);continue}if(!Ve(n)||!br.has(n.tagName)||a+i.length+n.childNodes.length>64)return j(e,null,t);for(let e=n.childNodes.length-1;e>=0;--e)i.push(n.childNodes[e])}}if(r.length===0||_r(e))return j(e,null,t);try{let n=e.ownerDocument.createRange(),i=qe(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 j(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 j(e,a.length>0?a:null,t)}catch{return j(e,null,t)}},Er=(e,t,n)=>{let r=Tr(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},Dr=(e,t,n,r,i)=>{let a=!0;for(let o of e.elementsFromPoint(t,n)){if(tr(o)&&(a=!1),!k(o))continue;let s=o.shadowRoot;if(a&&s&&s!==e){let e=Dr(s,t,n,r,i);if(e)return e}if(a&&p(o)){let e=A(o);if(e){let a=Qn(o,t,n),s=Dr(e,a.x,a.y,r,i);if(s)return s}}if(hr(o)&&Er(o,r,i))return o}return null},Or=(e,t)=>Dr(document,e,t,e,t),kr=(e,t,n,r)=>{let i=e.elementsFromPoint(t,n),a=!0;for(let o of i){if(tr(o)&&(a=!1),a&&o.shadowRoot&&o.shadowRoot!==e&&kr(o.shadowRoot,t,n,r),a&&p(o)){let e=A(o);if(e){let i=Qn(o,t,n);kr(e,i.x,i.y,r)}}r.add(o)}},Ar=(e,t)=>{let n=new Set;return kr(document,e,t,n),[...n]},jr=(e,t,n)=>{let r=[],i=e;for(;i&&i!==window;){let e=Ke(i);if(!e||!p(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=Qn(r[e],a,o);a=t.x,o=t.y}return{x:a,y:o}},Mr=`http://www.w3.org/2000/svg`,Nr=e=>{if(e.localName===`svg`)return e;let t=e,n=e.parentElement;for(;n?.namespaceURI===Mr&&(t=n,n.localName!==`svg`);)n=n.parentElement;return t},Pr=(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},Fr=(e,t,n)=>{if(or(e))return null;let r=e.ownerDocument,i=r.defaultView;if(!i)return null;let a=jr(i,t,n),o=e.getRootNode(),s=Pr(r,a.x,a.y,Cn(o)?o:null);if(!s)return null;let c=Ve(s)?s:s.parentElement;if(!c||c===e)return null;let l=e.namespaceURI===Mr;return!(l?Nr(e):e).contains(c)||!l&&Je(c).pointerEvents!==`none`?null:c},Ir=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom,Lr=(e,t,n=document)=>{let r=n.createElement(`style`);r.setAttribute(e,``);let i=Ln(n);return i&&(r.nonce=i),zn(r),r.textContent=t,n.head.appendChild(r),r},Rr=`html { pointer-events: none !important; }
|
|
28
|
+
iframe[${Se}] { pointer-events: auto !important; }`,zr=new Set,M=new Map;let N=!1;const Br=e=>{if(M.has(e))return;let t=Lr(`data-react-grab-frozen-pseudo`,Rr,e),n=Lr(`data-react-grab-hittest-override`,`html, body { pointer-events: auto !important; }`,e);n.disabled=!0,M.set(e,{pointerEventsStyle:t,hitTestOverrideStyle:n})},Vr=e=>{let t=M.get(e);t&&(t.pointerEventsStyle.remove(),t.hitTestOverrideStyle.remove(),M.delete(e))},Hr=()=>N,Ur=e=>(zr.add(e),N&&Br(e),()=>{zr.delete(e),Vr(e)}),Wr=()=>{if(!N){N=!0,zr.add(document);for(let e of zr)Br(e)}},Gr=()=>{if(N){N=!1;for(let e of[...M.keys()])Vr(e)}},Kr=()=>{if(N)for(let e of M.values())e.pointerEventsStyle.disabled||(e.pointerEventsStyle.disabled=!0),e.hitTestOverrideStyle.disabled&&(e.hitTestOverrideStyle.disabled=!1)},qr=()=>{if(N)for(let e of M.values())e.pointerEventsStyle.disabled&&(e.pointerEventsStyle.disabled=!1),e.hitTestOverrideStyle.disabled||(e.hitTestOverrideStyle.disabled=!0)},P=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)},Jr=new Set,F=new Set;let I=!1;const Yr=(e,t)=>{if(F.has(e))try{e.unfreeze()}catch(e){t.push(e)}finally{F.delete(e)}},Xr=e=>{Jr.add(e);try{I&&e.isConnected()&&(e.freeze(),F.add(e))}catch(t){throw Jr.delete(e),t}return()=>{let t=[];Yr(e,t),Jr.delete(e),P(t,`Unregistering renderer freeze failed`)}},Zr=()=>{if(!I){I=!0;try{for(let e of Jr)e.isConnected()&&(e.freeze(),F.add(e))}catch(e){I=!1;let t=[];for(let e of[...F].reverse())Yr(e,t);throw t.length===0?e:AggregateError([e,...t],`Rolling back renderer freeze failed`)}}},Qr=()=>{if(!I)return;I=!1;let e=[];for(let t of[...F].reverse())Yr(t,e);P(e,`Unfreezing renderers failed`)},$r=new WeakMap,ei=new WeakMap,L=new WeakMap,ti=new WeakMap,ni=new WeakMap,ri=[`name`,`position`,`rotation`,`scale`,`color`,`visible`,`args`],R=e=>typeof e==`object`&&!!e,ii=e=>typeof e==`object`&&!!e||typeof e==`function`,z=(e,t)=>typeof e[t]==`function`,B=e=>R(e)&&typeof e.x==`number`&&typeof e.y==`number`&&typeof e.z==`number`&&z(e,`set`)&&z(e,`clone`)&&z(e,`applyMatrix4`)&&z(e,`project`),ai=e=>R(e)&&z(e,`clone`)&&z(e,`premultiply`),oi=e=>R(e)&&`boundingBox`in e&&z(e,`computeBoundingBox`),si=e=>R(e)&&typeof e.type==`string`&&R(e.props)&&ci(e.object),ci=e=>R(e)&&e.isObject3D===!0&&typeof e.uuid==`string`&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.visible==`boolean`&&ai(e.matrixWorld)&&z(e,`updateWorldMatrix`),li=e=>R(e)&&e.isCamera===!0,ui=e=>ci(e)&&e.isScene===!0&&Array.isArray(e.children),di=e=>R(e)&&typeof e.tagName==`string`&&e.tagName.toLowerCase()===`canvas`&&z(e,`getContext`),fi=e=>R(e)&&di(e.domElement),pi=e=>R(e)&&z(e,`set`),mi=e=>R(e)&&z(e,`setFromCamera`)&&z(e,`intersectObjects`),hi=e=>R(e)&&fi(e.gl)&&ui(e.scene)&&li(e.camera)&&mi(e.raycaster)&&pi(e.pointer),gi=e=>e===`always`||e===`demand`||e===`never`,_i=e=>R(e)&&typeof e.elapsedTime==`number`,vi=(e,t)=>{let n=e.getState();if(typeof n.setFrameloop!=`function`)return;let r=_i(n.clock)?n.clock.elapsedTime:null;n.setFrameloop(t);let i=e.getState().clock;r!==null&&_i(i)&&(i.elapsedTime=r)},yi=e=>{if(ti.has(e))return;let t=null,n=Xr({freeze:()=>{let n=L.get(e);if(!n)return;let r=n.getState();if(gi(r.frameloop)&&typeof r.setFrameloop==`function`){let e=r.frameloop;vi(n,`never`),t=()=>vi(n,e)}},isConnected:()=>e.isConnected,unfreeze:()=>{t?.(),t=null}});ti.set(e,n)},bi=e=>{let t=ti.get(e);t&&(ti.delete(e),t())},xi=e=>si(e.__r3f)?e.__r3f:null,Si=e=>{let t=e.current.stateNode;if(!R(t)||!ii(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 hi(i)?()=>{let e=Reflect.apply(r,n,[]);return hi(e)?e:i}:null},Ci=e=>{let t=ni.get(e);t&&(ni.delete(e),L.get(t.canvas)===t.root&&(L.delete(t.canvas),bi(t.canvas)))},wi=e=>{let t=Si(e);if(!t){Ci(e);return}let n=t().gl.domElement;if(!n.isConnected||!e.current.child){Ci(e);return}let r=ni.get(e);r&&r.canvas!==n&&(Ci(e),r=void 0),r?(r.root.getState=t,r.root.selectableObjects=null):(r={canvas:n,root:{getState:t,selectableObjects:null}},ni.set(e,r)),L.set(n,r.root),yi(n)};cn({name:`react-grab-three-selection`,onCommitFiberRoot:(e,t)=>wi(t)});const Ti=e=>{let t=e;for(;t;){if(xi(t))return t;t=t.parent}return null},Ei=e=>{let t=e;for(;t;){let e=xi(t);if(e&&typeof e.eventCount==`number`&&e.eventCount>0)return!0;t=t.parent}return!1},Di=(e,t)=>{let n=e;for(;n;){if(n===t)return!0;n=n.parent}return!1},Oi=e=>{let t=e;for(;t;){if(!t.visible)return!1;t=t.parent}return!0},ki=e=>!!xi(e)&&(oi(e.geometry)||e.type.toLowerCase()===`sprite`),Ai=e=>e.isInstancedMesh!==!0||typeof e.count!=`number`||!Number.isInteger(e.count)||e.count<=0||!e.getMatrixAt?0:e.count,ji=(e,t,n,r)=>{try{let i={object:n};r!==void 0&&(i.instanceId=r);let a=Mi(t,n,i);a&&e.push(a)}catch{}},Mi=(e,t,n)=>{let r=typeof n.instanceId==`number`&&Number.isInteger(n.instanceId)?n.instanceId:null,i=$r.get(t);i||(i=new Map,$r.set(t,i));let a=i.get(r);if(a)return a.canvas=e.gl.domElement,a.intersectionPoint=B(n.point)?n.point:null,a.object=t,a.rootState=e,a.element;let o=xi(t),s=o?mn(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:B(n.point)?n.point:null,object:t,rootState:e,tagName:c},d=l.getBoundingClientRect.bind(l);return l.getBoundingClientRect=()=>{let e=Ui(u),t=l.ownerDocument.defaultView?.DOMRect;return t?new t(e.x,e.y,e.width,e.height):d()},gn(l,{hostElement:u.canvas,supportsDomEditing:!1,getBounds:()=>Ui(u),getFiber:()=>u.fiber?Xt(u.fiber):null,getPreview:()=>Ii(u),getSelector:()=>Li(u),getTagName:()=>u.tagName,isConnected:()=>u.canvas.isConnected&&Di(u.object,u.rootState.scene)}),i.set(r,u),ei.set(l,u),l},Ni=(e,t,n)=>{if(!di(e))return e;let r=L.get(e);if(!r)return e;try{let i=r.getState(),a=Sn(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(!Ei(e.object))continue;let t=Ti(e.object);if(!t||t.visible===!1)continue;let n=Mi(i,t,e);if(n)return n}for(let e of c){let t=Ti(e.object);if(!t||t.visible===!1)continue;let n=Mi(i,t,e);if(n)return n}}catch{}return e},Pi=(e,t)=>{if(!di(e))return[];let n=L.get(e);if(!n)return[];try{let e=n.getState(),r=t?ei.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);ki(n)&&t.push(n)}n.selectableObjects=t}let i=[];for(let t of n.selectableObjects){if(!Oi(t)||!Di(t,e.scene)||t.isInstancedMesh===!0&&t.count===0)continue;let n=Ai(t);if(n>0&&n<=512){for(let r=0;r<n;r+=1)ji(i,e,t,r);continue}if(n>512&&r?.object===t&&r.instanceId!==null){i.push(r.element);continue}ji(i,e,t)}return i}catch{return[]}},Fi=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,Ii=e=>{let t=e.instance?.props??{},n=[];for(let r of ri){let i=t[r];r===`name`&&i===void 0&&e.object.name&&(i=e.object.name);let a=Fi(i);a&&n.push(`${r}=${a}`)}return e.instanceId!==null&&n.push(`instanceId={${e.instanceId}}`),`<${e.tagName}${n.length>0?` ${n.join(` `)}`:``} />`},Li=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}`)}]`},Ri=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)},zi=e=>{if(!oi(e.geometry))return null;if(!e.geometry.boundingBox)try{e.geometry.computeBoundingBox()}catch{return null}let t=e.geometry.boundingBox;return!t||!B(t.min)||!B(t.max)?null:t},Bi=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||!B(t.min)||!B(t.max)?null:t},Vi=e=>e.instanceId===null?Bi(e.object)??zi(e.object):zi(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():B(e.object.position)?e.object.position.clone().set(0,0,0).applyMatrix4(Ri(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`}},Ui=e=>{let t=Sn(e.canvas);try{let n=Vi(e);if(!n)return Hi(e,t);let r=Ri(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),ee=Math.max(t.y,c),te=Math.min(t.x+t.width,l),ne=Math.min(t.y+t.height,u);return te<=f||ne<=ee?Hi(e,t):{x:f,y:ee,width:te-f,height:ne-ee,borderRadius:`0px`}}catch{return Hi(e,t)}};let V=null,H=null,U=null;const Wi=()=>{U!==null&&clearTimeout(U),U=setTimeout(()=>{U=null,qr()},100)},Gi=()=>{U!==null&&(clearTimeout(U),U=null)},Ki=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},qi=(e,t,n)=>{let r=Ni(e,t,n);return hr(r)&&k(e)&&Er(e,t,n)?r:null},Ji=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];Gi(),Kr();try{let n=Ar(e,t),r=Wn()?n.filter(k):n,i=[],a=new Set,o=!1;for(let n of r){let r=n,s=Er(n,e,t);if(!o){let i=Fr(n,e,t);i&&k(i)&&hr(i)&&Er(i,e,t)?(r=i,s=!0,o=!0):hr(n)&&s&&(o=!0)}let c=Ni(r,e,t);if(s&&!a.has(c)&&(a.add(c),i.push(c)),r===n)continue;let l=O(r);for(;l&&k(l);){let n=Ni(l,e,t);Er(l,e,t)&&!a.has(n)&&(a.add(n),i.push(n)),l=O(l)}break}return i}finally{Wi()}},Yi=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();if(H){let r=H.element,i=n-H.timestamp<16;if(r.isConnected&&i&&Ir(e,t,H.bounds)&&!A(r))return r;H=null,V?.element===r&&(V=null)}if(V){let r=Ki(e,t,V.clientX,V.clientY),i=n-V.timestamp<16;if(r&&i){if(!V.preciseHitElement)return V.element;let n=Fr(V.preciseHitElement,e,t);if(n){let r=qi(n,e,t);if(r)return r}return V.usesTextHitTesting?qi(V.preciseHitElement,e,t)??Or(e,t):V.fallbackElement}}Gi(),Kr();try{let r=null,i=er(e,t),a=i?Tr(i)!==null:!1,o=i?Fr(i,e,t):null,s=o?qi(o,e,t):null,c=(i?qi(i,e,t):null)??Or(e,t);if(r=s??c,r&&p(r)&&!A(r)){let e=Sn(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 V={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{Wi()}},Xi=()=>{Gi(),qr(),V=null,H=null},W=e=>{console.warn(`[react-grab]`,e)},Zi=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]);let G=!1,K=null,q=!1;const J=new Map;let Qi=-1;const $i=new WeakSet,ea=new WeakSet,ta=new WeakMap,na=new Map,Y=new Map,ra=e=>{if(K===e&&(q=!0),$i.has(e))return!0;if(!G&&K===e){let t=(ta.get(e)??0)+1;return ta.set(e,t),t<4?!1:($i.add(e),!0)}return!G||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:($i.add(e),ea.add(e),!0)};typeof window<`u`&&(window.requestAnimationFrame=e=>{let t=ra(e);if(G&&t){let t=Qi--;return J.set(t,e),t}let n=Yn(t=>{if(G&&ra(e)){let t=Qi--;J.set(t,e),na.set(n,t);return}let r=K,i=q;K=e,q=!1;try{e(t)}finally{let t=q;K=r,q=i,!t&&!ea.has(e)&&($i.delete(e),ta.delete(e))}});return n},window.cancelAnimationFrame=e=>{if(J.has(e)){J.delete(e);return}let t=Y.get(e);if(t!==void 0){Xn(t.nativeId),Y.delete(e);return}let n=na.get(e);if(n!==void 0){J.delete(n),na.delete(e);return}Xn(e)});const ia=()=>{if(!G){G=!0,J.clear(),na.clear();for(let[e,{nativeId:t,callback:n}]of Y)Xn(t),J.set(e,n);Y.clear()}},aa=()=>{if(G){G=!1;for(let[e,t]of J.entries()){let n=Yn(n=>{Y.delete(e);let r=K,i=q;K=t,q=!1;try{t(n)}finally{let e=q;K=r,q=i,!e&&!ea.has(t)&&($i.delete(t),ta.delete(t))}});Y.set(e,{nativeId:n,callback:t})}J.clear(),na.clear()}},oa=`
|
|
29
|
+
[${xe}],
|
|
30
|
+
[${xe}] * {
|
|
31
|
+
animation-play-state: paused !important;
|
|
32
|
+
transition: none !important;
|
|
33
|
+
}
|
|
34
|
+
`,sa=e=>e?.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName===`svg`;let ca=null,X=[],la=[],ua=[];const da=new Set,Z=new Map,Q=new Map;let fa=[];const pa=()=>Z.size>0,ma=()=>{ca||=Lr(`data-react-grab-frozen-styles`,oa)},ha=e=>{let t=new Set;for(let n of e){let e=sa(n)?n:n.closest(`svg`);sa(e)&&t.add(e);for(let e of n.querySelectorAll(`svg`))sa(e)&&t.add(e)}return[...t]},ga=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},_a=(e,t)=>{for(let n of e){let e=Q.get(n)??0;if(e===0){Q.set(n,1),t.push(n),ga(n,`pauseAnimations`);continue}Q.set(n,e+1),t.push(n)}},va=(e,t)=>{let n=[];for(let r of e){let e=Q.get(r);if(e){if(e===1){try{ga(r,`unpauseAnimations`),Q.delete(r)}catch(e){n.push(r),t.push(e)}continue}Q.set(r,e-1)}}return n},ya=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},ba=e=>{for(let t of e)try{t.finish()}catch{}},xa=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},Sa=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;if(!Ve(t))return!1;let n=t.getRootNode();return Cn(n)&&cr(n.host)},Ca=e=>{if(e.length===0||Zi(e,ua))return;wa();let t=[...e];ma(),X=t,la=[];try{_a(ha(X),la);for(let e of X)e.setAttribute(xe,``);let e=ya(X);fa=[];for(let t of e)t.pause(),fa.push(t);ua=t}catch(e){try{wa()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},wa=()=>{if(X.length===0&&la.length===0&&fa.length===0)return;let e=X,t=la,n=fa,r=[],i=[];ua=[];for(let t of e)try{t.removeAttribute(xe)}catch(e){i.push(t),r.push(e)}X=i,la=va(t,r),xa(n),fa=[],P(r,`Unfreezing element animations failed`)},Ta=e=>e.length===0?(wa(),()=>{}):(Ca(e),wa),Ea=e=>{let t=[];for(let n of e.getAnimations())Sa(n)||n.playState===`running`&&t.push(n);return{targetDocument:e,runningAnimations:t}},Da=e=>{let t=Z.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())Sa(n)||t.push(n);ba(t)}else xa(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=va(t.frozenSvgElements,n),t.styleElement===null&&t.frozenSvgElements.length===0&&t.frozenWaapiAnimations.length===0&&Z.delete(e),n},Oa=e=>{if(Z.has(e.targetDocument))return;let t=Lr(`data-react-grab-global-freeze`,``,e.targetDocument),n={styleElement:t,frozenSvgElements:[],frozenWaapiAnimations:[],didUseCssFreeze:!1};if(Z.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);_a(ha(Array.from(e.targetDocument.querySelectorAll(`svg`))),n.frozenSvgElements)},ka=e=>{da.add(e);try{pa()&&Oa(Ea(e))}catch(t){da.delete(e);let n=Da(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{da.delete(e),P(Da(e),`Unfreezing frame animations failed`)}},Aa=()=>pa()?[]:(da.add(document),[...da].map(Ea)),ja=e=>{if(!pa()){for(let t of e)Oa(t);ia()}},Ma=()=>{if(!pa())return;let e=[];for(let t of[...Z.keys()])e.push(...Da(t));try{aa()}catch(t){e.push(t)}P(e,`Unfreezing global animations failed`)},Na=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!lr(n)&&(He(n)&&t.add(n),n.shadowRoot&&Na(n.shadowRoot,t),p(n))){let e=A(n);e&&Na(e,t)}},Pa=()=>{let e=new Set;return Na(document,e),[...e]},Fa=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],Ia=[`focus`,`blur`,`focusin`,`focusout`],La=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],Ra=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],za=new Map,Ba=new Map,Va=new Set;let Ha=!1;const Ua=e=>{e.stopImmediatePropagation()},Wa=e=>{e.preventDefault(),e.stopImmediatePropagation()},Ga=e=>{for(let t of Fa)e.addEventListener(t,Ua,!0);for(let t of Ia)e.addEventListener(t,Wa,!0)},Ka=e=>{for(let t of Fa)e.removeEventListener(t,Ua,!0);for(let t of Ia)e.removeEventListener(t,Wa,!0)},qa=e=>{Va.add(e);let t=Ur(e);return Ha&&Ga(e),()=>{Ha&&Ka(e),Va.delete(e),t()}},Ja=(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}},Ya=(e,t)=>{let n=[],r=er(e,t);for(;r&&r!==document.documentElement&&!lr(r);)He(r)&&n.push(r),r=O(r);return n},Xa=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;){if(He(t)&&e.push(t),t.shadowRoot?.activeElement){t=t.shadowRoot.activeElement;continue}if(p(t)){t=A(t)?.activeElement??null;continue}t=null}return e},Za=(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`)}},Qa=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},$a=(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?Ya(e,t):Pa();for(let e of r){let t=Ja(e,La);t&&n.push(t)}let i=[];for(let e of Xa()){let t=Ja(e,Ra,Ba);t&&i.push(t)}return{hoverStates:n,focusStates:i}},eo=e=>{if(e){Ha=!0,Va.add(document);for(let e of Va)Ga(e);Za(e.hoverStates,za),Za(e.focusStates,Ba),Wr()}},to=()=>{Xi(),Ha=!1;for(let e of Va)Ka(e);let e=[...Qa(za),...Qa(Ba)];try{Gr()}catch(t){e.push(t)}P(e,`Unfreezing pseudo states failed`)},no=()=>{let e=[];try{Qr()}catch(t){e.push(t)}try{to()}catch(t){e.push(t)}try{Ma()}catch(t){e.push(t)}return e},ro=(e,t)=>{let n=$a(e,t),r=Aa();try{eo(n),ja(r),Zr()}catch(e){let t=no();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},io=()=>{P(no(),`Unfreezing global interactions failed`)};let $=!1,ao=0,oo=0;const so=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},co=new WeakMap,lo=new WeakMap,uo=new WeakMap,fo=new Set,po=[],mo=[],ho=new WeakMap,go=new WeakMap,_o=new WeakSet,vo=new Set,yo=new WeakMap;cn({name:`react-grab-freeze-updates`,onCommitFiberRoot:(e,t)=>{let n=h().renderers.get(e);n&&yo.set(t,n)}});const bo=e=>{try{let t=e.rendererPackageName;return typeof t==`string`&&t.startsWith(`react-dom`)}catch{return!1}},xo=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},So=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},Co=e=>{let t=yo.get(e);if(t)return bo(t)?t:null;let n=Array.from(h().renderers.values()).filter(bo);if(n.length===1){let t=n[0];return t&&yo.set(e,t),t??null}let r=So(e);if(!r)return null;for(let t of n)try{let n=t.findFiberByHostInstance?.(r);if(n&&xo(n)===e)return yo.set(e,t),t}catch{}return null},wo=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`)},To=()=>{if(x.size>0){let e=new Set;for(let t of x)wo(t)&&e.add(t);return e}let e=new Set,t=n=>{let r=mn(n);if(r){let t=xo(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},Eo=(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},Do=e=>{if(!e||ho.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=()=>$?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>$?null:n,set:e=>{if($){e!==null&&(t.bufferedPending=Eo(t.bufferedPending??null,e));return}n=e}}),ho.set(e,t)},Oo=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},ko=e=>{let t=ho.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=Oo(t.pendingValueAtPause??null),r=Oo(t.bufferedPending??null);for(let t of[...e,...r])mo.push(()=>n(t))}ho.delete(e)},Ao=e=>{if(go.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return $?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if($){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),go.set(e,t)},jo=e=>{let t=go.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),go.delete(e))},Mo=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Do(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Ao(n),n=n.next},No=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&ko(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)jo(n),n=n.next},Po=e=>{let t=e;for(;t;){if(zt(t)&&Mo(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}},Fo=e=>{let t=e;for(;t;){if(zt(t)&&No(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}},Io=e=>{if(co.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};co.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!$||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,so(lo,a,()=>(...e)=>{$?mo.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!$||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,so(lo,a,()=>(...e)=>{$?mo.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!$||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,so(uo,a,()=>e=>{$?po.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>$?n.useSyncExternalStore(t=>e(()=>{$?fo.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},Lo=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`&&Io(r),r),set:e=>{r=e}})},Ro=(e,t)=>{queueMicrotask(()=>{if(!($||oo!==t))try{for(let t of e){let e=Co(t);if(t.current&&e?.scheduleUpdate)try{e.scheduleUpdate(t.current)}catch(e){W(new D(`scheduleUpdate failed during unfreeze`,e))}}}catch(e){W(new D(`scheduleReactUpdate failed`,e))}})},zo=e=>{for(let t of e)try{t()}catch(e){W(new D(`Callback failed during state replay`,e))}},Bo=()=>{for(let e of h().renderers.values())bo(e)&&(_o.has(e)||(Lo(e),_o.add(e)))},Vo=()=>{fo.clear(),po.length=0,mo.length=0},Ho=()=>{let e=oo,t=new Set(vo);try{for(let e of To())t.add(e)}catch(e){W(new D(`Collecting fiber roots failed during unfreeze`,e))}vo.clear(),$=!1;for(let e of t)try{Fo(e.current)}catch(e){W(new D(`Resuming a fiber root failed during unfreeze`,e))}let n=Array.from(fo),r=po.slice(),i=mo.slice();Vo(),zo(n),zo(r),zo(i),!$&&oo===e&&Ro(t,e)},Uo=()=>{let e=ao===0;if(ao+=1,e)try{Bo(),oo+=1,$=!0;let e=To();for(let t of e)vo.add(t),Po(t.current)}catch(e){throw--ao,$&&Ho(),e}let t=!1;return()=>{t||(t=!0,--ao,ao===0&&Ho())}},Wo=()=>{try{return Uo()}catch(e){return W(new D(`Pausing React updates failed`,e)),()=>{}}};export{Cn as $,s as $t,Wn as A,ae as At,An as B,te as Bt,hr as C,Ve as Ct,Xn as D,ne as Dt,A as E,oe as Et,O as F,pe as Ft,Tn as G,c as Gt,Pn as H,ye as Ht,Bn as I,je as It,On as J,de as Jt,Dn as K,ce as Kt,zn as L,se as Lt,k as M,Le as Mt,Un as N,Ie as Nt,Yn as O,Ae as Ot,Vn as P,u as Pt,Mn as Q,o as Qt,Ln as R,we as Rt,mr as S,He as St,or as T,me as Tt,wn as U,Fe as Ut,kn as V,Me as Vt,jn as W,Re as Wt,D as X,fe as Xt,E as Y,le as Yt,Nn as Z,ue as Zt,Kr as _,ie as _n,h as _t,qa as a,Be as an,y as at,Tr as b,Ke as bt,ka as c,l as cn,Kt as ct,Yi as d,f as dn,Nt as dt,_e as en,Sn as et,Ji as f,Oe as fn,Xt as ft,qr as g,re as gn,zt as gt,P as h,Pe as hn,Pt as ht,io as i,Ee as in,Rt as it,Gn as j,Ne as jt,Zn as k,ke as kt,W as l,d as ln,Ht as lt,Ni as m,De as mn,qt as mt,Uo as n,he as nn,T as nt,Ca as o,Se as on,mn as ot,Pi as p,a as pn,Jt as pt,En as q,Te as qt,ro as r,ve as rn,_n as rt,Ta as s,ze as sn,Mt as st,Wo as t,ge as tn,bn as tt,Xi as u,ee as un,b as ut,Fr as v,n as vn,at as vt,lr as w,be as wt,Cr as x,p as xt,Ar as y,qe as yt,Fn as z,Ce as zt};
|