react-grab 0.1.48-dev.a036acc → 0.1.48-dev.ac9f548
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/README.md +1 -1
- package/dist/{copy-content-BPB8MmpL.d.cts → copy-content-3sDfOP1b.d.ts} +54 -34
- package/dist/{copy-content-C7lFyXsY.d.ts → copy-content-TZDC2S2A.d.cts} +54 -34
- 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-B0lTGjhs.cjs +14 -0
- package/dist/core-F4U8oWT_.js +14 -0
- package/dist/errors-BEgowzRA.d.ts +29 -0
- package/dist/errors-CTlIFDQs.d.cts +29 -0
- package/dist/execute-context-menu-action-Cqp9WXtB.js +9 -0
- package/dist/execute-context-menu-action-fTmac_ns.cjs +9 -0
- package/dist/freeze-updates-BVSfZssI.js +51 -0
- package/dist/freeze-updates-D2h3w4xO.cjs +51 -0
- package/dist/{index-DMyJsiaz.d.cts → index-DDf5jObx.d.cts} +1 -1
- package/dist/{index-VkohC_Hw.d.ts → index-DWvC_uKW.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +10 -7
- package/dist/index.d.ts +10 -7
- package/dist/index.global.js +20 -19
- package/dist/index.js +1 -1
- package/dist/open-file-B_sRLFmL.js +29 -0
- package/dist/open-file-BrBrRUg0.cjs +20 -0
- package/dist/primitives.cjs +2 -2
- package/dist/primitives.d.cts +3 -2
- package/dist/primitives.d.ts +3 -2
- package/dist/primitives.js +2 -2
- package/dist/renderer-Czij1mfU.cjs +9 -0
- package/dist/renderer-DGTM0iNN.js +9 -0
- package/package.json +3 -3
- package/dist/copy-content-HtjEd7D4.js +0 -10
- package/dist/copy-content-i_57jcU1.cjs +0 -10
- package/dist/core-Cs4nKfRj.cjs +0 -14
- package/dist/core-DtDBp7P-.js +0 -14
- package/dist/create-pointer-move-prompt-handoff-D4JZbeiE.cjs +0 -9
- package/dist/create-pointer-move-prompt-handoff-DRZp7pT5.js +0 -9
- package/dist/freeze-updates-2TTw39qB.js +0 -51
- package/dist/freeze-updates-m7dy-Od3.cjs +0 -51
- package/dist/renderer-D07SadMO.cjs +0 -9
- package/dist/renderer-DhsYpO42.js +0 -9
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
const e=require(`./freeze-updates-D2h3w4xO.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?()=>{}:()=>h(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 te(e){}function ne(e){return a&&(a.cleanups?a.cleanups.push(e):a.cleanups=[e]),e}function h(e){if(e.owned){for(let t=0;t<e.owned.length;t++)h(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 g(e){let t=Symbol(`context`);return{id:t,Provider:oe(t),defaultValue:e}}function re(e){return a&&a.context&&a.context[e.id]!==void 0?a.context[e.id]:e.defaultValue}function ie(){return a}function ae(e){let t=f(()=>_(e()));return t.toArray=()=>{let e=t();return Array.isArray(e)?e:e==null?[]:[e]},t}function _(e){if(typeof e==`function`&&!e.length)return _(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=_(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function oe(e){return function(t){return f(()=>(a.context={...a.context,[e]:t.value},ae(()=>t.children)))}}function se(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 v={context:void 0,getContextId(){if(!this.context)throw Error(`getContextId cannot be used under non-hydrating context`);return ce(this.context.count)},getNextContextId(){if(!this.context)throw Error(`getNextContextId cannot be used under non-hydrating context`);return ce(this.context.count++)}};function ce(e){let t=String(e),n=t.length-1;return v.context.id+(n?String.fromCharCode(96+n):``)+t}function le(e){v.context=e}function ue(){return v.context?{...v.context,id:v.getNextContextId(),count:0}:void 0}function de(e,t){if(v.context&&!v.context.noHydrate){let n=v.context;le(ue());let r=e(t||{});return le(n),r}return e(t||{})}function fe(...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 pe(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 me(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 he(e){return me(e,(e,t,n)=>e(t,()=>n))}function ge(e){return me(e,(e,t,n)=>e(()=>t,n))}function _e(e){let t;return e.when?typeof(t=e.children)==`function`?t(e.keyed?e.when:()=>e.when):t:e.fallback||``}function ve(e){let t=e.children;Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++){let n=t[e].when;if(n){let r=t[e].children;return typeof r==`function`?r(t[e].keyed?n:()=>n):r}}return e.fallback||``}function ye(e){return e}const be=g();let y=null;function xe(e,t,r={}){typeof t!=`function`&&(r=t||{},t=e,e=!0);let i=new Set,a=v.getNextContextId(),o={},s=r.storage?r.storage(r.initialValue)[0]():r.initialValue,c,l;if(v.context.async&&r.ssrLoadFrom!==`initial`&&(o=v.context.resources[a]||(v.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`&&v.context.async&&`data`in v.context.resources[a];if(!e&&y&&y.push(a),!e&&d._loading){let e=re(be);e&&(e.resources.set(a,d),i.add(e))}return e},d=()=>u()?v.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=v.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(y=[],u=typeof e==`function`?e():e,y.length)return}finally{y=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,b(i),e)).catch(e=>{throw d._loading=!1,d.state=`errored`,d.error=l=n(e),c=null,b(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 Se(e){for(let t of e.resources.values())if(t._loading)return!1;return!0}function b(e){for(let t of e)Se(t)&&(t.completed(),e.delete(t))}const Ce=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(`.`)]),we=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Te=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Ee=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 De(e,t){let n=Ee[e];return typeof n==`object`?n[t]?n.$:void 0:n}const Oe=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),ke={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},Ae=e=>f(()=>e());function je(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 x=`_$DX_DELEGATE`;function Me(e,t,n,r={}){let i;return s(r=>{i=r,t===document?e():k(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Ne(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 S(e,t=window.document){let n=t[x]||(t[x]=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,Ve))}}function C(e,t,n){A(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Pe(e,t,n,r){A(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Fe(e,t,n){A(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function w(e,t){A(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function T(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 E(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]||(j(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||(j(e,i,!0),n[i]=o)}return n}function D(e,t,n){if(!t)return n?C(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 Ie(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Le(e,t={},n,r){let i={};return r||u(()=>i.children=M(e,t.children,i.children)),u(()=>typeof t.ref==`function`&&O(t.ref,e)),u(()=>Re(e,t,n,!0,i,!0)),i}function O(e,t,n){return m(()=>e(t,n))}function k(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return M(e,t,r,n);u(r=>M(e,t(),r,n),r)}function Re(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=Be(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||M(e,t.children);continue}let s=t[o];i[o]=Be(e,o,s,i[o],n,a,t)}}function A(e){return!!v.context&&!v.done&&(!e||e.isConnected)}function ze(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function j(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 Be(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return D(e,n,r);if(t===`classList`)return E(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=Oe.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(T(e,i,n,a),a&&S([i]))}else if(t.slice(0,5)===`attr:`)C(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Fe(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=we.has(t))||!i&&((u=De(t,e.tagName))||(c=Ce.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(A(e))return n;t===`class`||t===`className`?w(e,n):s&&!c&&!l?e[ze(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&ke[t.split(`:`)[0]];r?Pe(e,r,t,n):C(e,Te[t]||t,n)}return n}function Ve(e){if(v.registry&&v.events&&v.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}}),v.registry&&!v.done&&(v.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 M(e,t,n,r,i){let a=A(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=P(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=P(e,n,r)}else if(o===`function`)return u(()=>{let i=t();for(;typeof i==`function`;)i=i();n=M(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(N(o,t,n,i))return u(()=>n=M(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=P(e,n,r),s)return n}else c?n.length===0?He(e,o,r):je(e,n,o):(n&&P(e),He(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=P(e,n,r,t);P(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function N(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=N(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=N(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 He(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function P(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 Ue=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e)),We=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],Ge=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},Ke=t=>{if(document.designMode===`on`)return!0;let n=Ge(t);if(!n)return!1;if(n.isContentEditable)return!0;let r=e.x(n);return We.some(e=>e===r||e===n.role)},qe=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},Je=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},F=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,I=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),L=(e,t,n,r=1)=>{let i=I(e),a=I(t),o=I(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${I(r*255)}`},Ye=e=>{if(!e.startsWith(`#`))return null;let t=e.slice(1);if(t.length!==6&&t.length!==8)return null;let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{red:n,green:r,blue:i,alpha:a}},Xe=e=>{let t=e.match(F);if(!t)return null;let n=1;if(t[4]!==void 0){let e=t[4];n=e.endsWith(`%`)?Number(e.slice(0,-1))/100:Number(e)}return L(Number(t[1]),Number(t[2]),Number(t[3]),n)},Ze=e=>{let t=e.match(F);return!t||t[4]===void 0?!1:(t[4].endsWith(`%`)?Number(t[4].slice(0,-1))/100:Number(t[4]))===0},Qe=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,$e=e=>{let t=e.match(Qe);if(!t)return null;let n=t[1];return n.length===3?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n.length===4?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:`#${n}`},et=`rgba(0, 0, 0, 0)`,tt=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,nt=180/Math.PI,R=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),rt=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*nt:t===`turn`?n*360:n},z=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},it=e=>{let t=e.match(tt);if(!t)return null;let n=R(t[1],1),r=R(t[2],.4),i=rt(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:R(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,ee=-1.2684380046*d+2.6097574011*f-.3413193965*p,te=-.0041960863*d-.7034186147*f+1.707614701*p;return L(z(m),z(ee),z(te),Math.max(0,Math.min(1,a)))};let B=null;const at=()=>B||(typeof document>`u`?null:(B=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),B)),ot=(t,n)=>{t.clearRect(0,0,1,1),t.fillStyle=n,t.fillRect(0,0,1,1);let r=t.getImageData(0,0,1,1).data;return r[3]===0?e.dt:L(r[0],r[1],r[2],r[3]/255)},st=t=>{let n=t.trim();if(!n)return null;if(n.toLowerCase()===`transparent`)return e.dt;let r=$e(n);if(r)return r;let i=it(n);if(i)return i;let a=at();if(!a)return null;a.fillStyle=et,a.fillStyle=n;let o=a.fillStyle;return typeof o==`string`?o.toLowerCase()===et?n.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?e.dt:null:o.startsWith(`#`)&&o.length===7?o:o.startsWith(`rgb`)?Xe(o):ot(a,n):null},ct=(e,t,n)=>Math.max(t,Math.min(e,n));let V=null;const lt=()=>{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},ut=()=>{if(V===null){if(typeof navigator>`u`)return V=!1,V;let e=navigator.platform??lt()??navigator.userAgent;V=/Mac|iPhone|iPad|iPod/i.test(e)}return V},dt=(e,t)=>{try{return e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute(t))}catch{return!1}},ft=`padding-top.padding-right.padding-bottom.padding-left.margin-top.margin-right.margin-bottom.margin-left.gap.row-gap.column-gap.font-size.line-height.letter-spacing.border-radius.border-top-left-radius.border-top-right-radius.border-bottom-right-radius.border-bottom-left-radius.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.opacity.width.height.min-width.min-height.max-width.max-height.top.right.bottom.left.z-index`.split(`.`),pt=new Set([`letter-spacing`,`gap`,`row-gap`,`column-gap`]),mt=new Set([`z-index`]),ht=[{key:`padding`,label:`padding`,longhands:[`padding-top`,`padding-right`,`padding-bottom`,`padding-left`]},{key:`padding-top,padding-bottom`,label:`padding-y`,longhands:[`padding-top`,`padding-bottom`]},{key:`padding-left,padding-right`,label:`padding-x`,longhands:[`padding-left`,`padding-right`]},{key:`padding-top`,label:`padding top`,longhands:[`padding-top`]},{key:`padding-right`,label:`padding right`,longhands:[`padding-right`]},{key:`padding-bottom`,label:`padding bottom`,longhands:[`padding-bottom`]},{key:`padding-left`,label:`padding left`,longhands:[`padding-left`]}],gt=[{key:`margin`,label:`margin`,longhands:[`margin-top`,`margin-right`,`margin-bottom`,`margin-left`]},{key:`margin-top,margin-bottom`,label:`margin-y`,longhands:[`margin-top`,`margin-bottom`]},{key:`margin-left,margin-right`,label:`margin-x`,longhands:[`margin-left`,`margin-right`]},{key:`margin-top`,label:`margin top`,longhands:[`margin-top`]},{key:`margin-right`,label:`margin right`,longhands:[`margin-right`]},{key:`margin-bottom`,label:`margin bottom`,longhands:[`margin-bottom`]},{key:`margin-left`,label:`margin left`,longhands:[`margin-left`]}],_t=[{key:`gap`,label:`gap`,longhands:[`row-gap`,`column-gap`]},{key:`row-gap`,label:`row gap`,longhands:[`row-gap`]},{key:`column-gap`,label:`column gap`,longhands:[`column-gap`]}],vt=[{key:`border-radius`,label:`border radius`,longhands:[`border-top-left-radius`,`border-top-right-radius`,`border-bottom-right-radius`,`border-bottom-left-radius`]},{key:`border-top-left-radius,border-top-right-radius`,label:`top corners`,longhands:[`border-top-left-radius`,`border-top-right-radius`]},{key:`border-bottom-left-radius,border-bottom-right-radius`,label:`bottom corners`,longhands:[`border-bottom-left-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius,border-bottom-left-radius`,label:`left corners`,longhands:[`border-top-left-radius`,`border-bottom-left-radius`]},{key:`border-top-right-radius,border-bottom-right-radius`,label:`right corners`,longhands:[`border-top-right-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius`,label:`top left radius`,longhands:[`border-top-left-radius`]},{key:`border-top-right-radius`,label:`top right radius`,longhands:[`border-top-right-radius`]},{key:`border-bottom-right-radius`,label:`bottom right radius`,longhands:[`border-bottom-right-radius`]},{key:`border-bottom-left-radius`,label:`bottom left radius`,longhands:[`border-bottom-left-radius`]}],yt=[{key:`top,right,bottom,left`,label:`inset`,longhands:[`top`,`right`,`bottom`,`left`]},{key:`top,bottom`,label:`inset-y`,longhands:[`top`,`bottom`]},{key:`left,right`,label:`inset-x`,longhands:[`left`,`right`]},{key:`top`,label:`top`,longhands:[`top`]},{key:`right`,label:`right`,longhands:[`right`]},{key:`bottom`,label:`bottom`,longhands:[`bottom`]},{key:`left`,label:`left`,longhands:[`left`]}],bt=new Set(yt.map(e=>e.key)),xt=[ht,gt,_t,vt,[{key:`border-width`,label:`border width`,longhands:[`border-top-width`,`border-right-width`,`border-bottom-width`,`border-left-width`]},{key:`border-top-width`,label:`border top width`,longhands:[`border-top-width`]},{key:`border-right-width`,label:`border right width`,longhands:[`border-right-width`]},{key:`border-bottom-width`,label:`border bottom width`,longhands:[`border-bottom-width`]},{key:`border-left-width`,label:`border left width`,longhands:[`border-left-width`]}],[{key:`width,height`,label:`size`,longhands:[`width`,`height`]},{key:`width`,label:`width`,longhands:[`width`]},{key:`height`,label:`height`,longhands:[`height`]}],yt],St=[{key:`font-size`,label:`font size`},{key:`line-height`,label:`line height`},{key:`letter-spacing`,label:`letter spacing`},{key:`min-width`,label:`min width`},{key:`min-height`,label:`min height`},{key:`max-width`,label:`max width`},{key:`max-height`,label:`max height`},{key:`z-index`,label:`z-index`},{key:`opacity`,label:`opacity`}],Ct=[{key:`color`,label:`text color`,alwaysShow:!0},{key:`background-color`,label:`background`,alwaysShow:!0},{key:`border-color`,label:`border color`},{key:`fill`,label:`fill`},{key:`stroke`,label:`stroke`}],H=[{value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,label:`sans`},{value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`,label:`serif`},{value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,label:`mono`},{value:`system-ui, sans-serif`,label:`system`},{value:`serif`,label:`serif`},{value:`monospace`,label:`mono`}],wt=e=>{let t=e.trim();return H.some(e=>e.value===t)?H:[{value:t,label:`current`},...H]},Tt={key:`font-family`,label:`font family`},Et=[{key:`display`,label:`display`,options:[{value:`block`,label:`block`},{value:`flex`,label:`flex`},{value:`inline-block`,label:`inline-block`},{value:`inline`,label:`inline`},{value:`grid`,label:`grid`},{value:`none`,label:`none`}]},{key:`text-align`,label:`text align`,options:[{value:`left`,label:`left`},{value:`center`,label:`center`},{value:`right`,label:`right`},{value:`justify`,label:`justify`}]},{key:`font-style`,label:`font style`,options:[{value:`normal`,label:`normal`},{value:`italic`,label:`italic`}]},{key:`text-transform`,label:`text transform`,options:[{value:`none`,label:`none`},{value:`uppercase`,label:`uppercase`},{value:`lowercase`,label:`lowercase`},{value:`capitalize`,label:`capitalize`}]},{key:`white-space`,label:`white space`,options:[{value:`normal`,label:`normal`},{value:`nowrap`,label:`nowrap`},{value:`pre`,label:`pre`},{value:`pre-wrap`,label:`pre-wrap`},{value:`pre-line`,label:`pre-line`},{value:`break-spaces`,label:`break-spaces`}]},{key:`word-break`,label:`word break`,options:[{value:`normal`,label:`normal`},{value:`break-all`,label:`break-all`},{value:`keep-all`,label:`keep-all`}]},{key:`overflow-wrap`,label:`wrap`,options:[{value:`normal`,label:`normal`},{value:`break-word`,label:`break-word`},{value:`anywhere`,label:`anywhere`}]},{key:`font-variant-numeric`,label:`number style`,options:[{value:`normal`,label:`normal`},{value:`tabular-nums`,label:`tabular`},{value:`proportional-nums`,label:`proportional`},{value:`lining-nums`,label:`lining`},{value:`oldstyle-nums`,label:`oldstyle`},{value:`slashed-zero`,label:`slashed zero`}]},{key:`text-decoration-line`,label:`decoration`,options:[{value:`none`,label:`none`},{value:`underline`,label:`underline`},{value:`line-through`,label:`strike`}]},{key:`border-style`,label:`border style`,options:[{value:`none`,label:`none`},{value:`solid`,label:`solid`},{value:`dashed`,label:`dashed`},{value:`dotted`,label:`dotted`}]},{key:`visibility`,label:`visibility`,options:[{value:`visible`,label:`visible`},{value:`hidden`,label:`hidden`}]},{key:`align-items`,label:`align items`,options:[{value:`stretch`,label:`stretch`},{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`baseline`,label:`baseline`}]},{key:`justify-content`,label:`justify content`,options:[{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`space-between`,label:`between`},{value:`space-around`,label:`around`},{value:`space-evenly`,label:`evenly`}]},{key:`font-weight`,label:`font weight`,options:[{value:`100`,label:`thin`},{value:`200`,label:`extra-light`},{value:`300`,label:`light`},{value:`400`,label:`normal`},{value:`500`,label:`medium`},{value:`600`,label:`semibold`},{value:`700`,label:`bold`},{value:`800`,label:`extra-bold`},{value:`900`,label:`black`}]}],Dt=[...ft,`color`,`background-color`,`border-color`,`fill`,`stroke`,`font-family`,`display`,`text-align`,`font-style`,`text-transform`,`white-space`,`word-break`,`overflow-wrap`,`font-variant-numeric`,`text-decoration-line`,`border-style`,`visibility`,`align-items`,`justify-content`,`font-weight`],U=e=>Number.isInteger(e)?e:Math.round(e*100)/100,W=e=>Number.isInteger(e)?String(e):e.toFixed(2).replace(/\.?0+$/,``),Ot=e=>Number.isFinite(e)?W(U(e)):String(e),kt=e=>Math.round(e),At=(e,t)=>{if(e.kind===`color`||e.kind===`enum`)return typeof t==`string`?t:e.value;let n=typeof t==`number`?t:e.value;return e.key===`opacity`&&e.unit===`%`?W(U(n/100)):`${W(U(n))}${e.unit}`},jt={slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`}},G={p:`padding`,px:`padding-left,padding-right`,py:`padding-top,padding-bottom`,pt:`padding-top`,pr:`padding-right`,pb:`padding-bottom`,pl:`padding-left`,ps:`padding-left`,pe:`padding-right`,m:`margin`,mx:`margin-left,margin-right`,my:`margin-top,margin-bottom`,mt:`margin-top`,mr:`margin-right`,mb:`margin-bottom`,ml:`margin-left`,ms:`margin-left`,me:`margin-right`,gap:`gap`,"gap-x":`column-gap`,"gap-y":`row-gap`,text:`font-size`,leading:`line-height`,tracking:`letter-spacing`,rounded:`border-radius`,"rounded-t":`border-top-left-radius,border-top-right-radius`,"rounded-b":`border-bottom-left-radius,border-bottom-right-radius`,"rounded-l":`border-top-left-radius,border-bottom-left-radius`,"rounded-r":`border-top-right-radius,border-bottom-right-radius`,"rounded-tl":`border-top-left-radius`,"rounded-tr":`border-top-right-radius`,"rounded-bl":`border-bottom-left-radius`,"rounded-br":`border-bottom-right-radius`,border:`border-width`,"border-t":`border-top-width`,"border-r":`border-right-width`,"border-b":`border-bottom-width`,"border-l":`border-left-width`,w:`width`,h:`height`,size:`width,height`,"max-w":`max-width`,"max-h":`max-height`,"min-w":`min-width`,"min-h":`min-height`,opacity:`opacity`,inset:`top,right,bottom,left`,"inset-x":`left,right`,"inset-y":`top,bottom`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,z:`z-index`,items:`align-items`,justify:`justify-content`,font:`font-weight`,whitespace:`white-space`},Mt={"font-size":[`font-size`,`font size`,`text-size`,`text size`],color:[`color`,`text-color`,`text color`,`text-colour`,`text colour`,`foreground`,`fg`],"background-color":[`background`,`background-color`,`background color`,`bg`,`bg-color`,`bg color`],"border-color":[`border-color`,`border color`],fill:[`fill`,`fill-color`,`fill color`],stroke:[`stroke`,`stroke-color`,`stroke color`],"font-family":[`font`,`font-sans`,`font-serif`,`font-mono`,`family`,`sans`,`serif`,`mono`],"font-style":[`italic`,`not-italic`],"text-align":[`text-left`,`text-center`,`text-right`,`text-justify`],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-decoration-line":[`underline`,`line-through`,`no-underline`],"white-space":[`whitespace`,`whitespace-normal`,`whitespace-nowrap`,`whitespace-pre`],"word-break":[`break-normal`,`break-all`,`break-keep`],"overflow-wrap":[`break-words`,`break-anywhere`],"font-variant-numeric":[`tabular-nums`,`proportional-nums`,`lining-nums`,`oldstyle-nums`],"border-style":[`border-solid`,`border-dashed`,`border-dotted`,`border-none`]},Nt=(()=>{let e={};for(let[t,n]of Object.entries(G))n!==void 0&&(e[n]??=new Set).add(t);let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=Array.from(r));for(let[e,n]of Object.entries(Mt)){let r=new Set([...t[e]??[],...n]);t[e]=Array.from(r)}return t})(),K={text:`color`,bg:`background-color`,border:`border-color`,"border-x":`border-color`,"border-y":`border-color`,"border-t":`border-color`,"border-r":`border-color`,"border-b":`border-color`,"border-l":`border-color`,"border-s":`border-color`,"border-e":`border-color`,fill:`fill`,stroke:`stroke`},Pt=e=>G[e]!==void 0||K[e]!==void 0,q=e=>{let t=0,n=-1;for(let r=0;r<e.length;r++){let i=e[r];i===`[`?t++:i===`]`?t--:i===`:`&&t===0&&(n=r)}let r=n>=0?e.slice(n+1):e;return r.startsWith(`!`)?r.slice(1):r},J=e=>{let t=q(e);if(!t)return null;let n=t.indexOf(`[`);if(n>0)return t.slice(0,n).replace(/-$/,``)||null;let r=t.split(`-`).filter(Boolean);if(r.length===0)return null;for(let e=r.length;e>=1;e--){let t=r.slice(0,e).join(`-`);if(Pt(t))return t}return r[0]},Ft=/-(red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone|black|white|transparent|current|inherit)\b/,It=(e,t)=>e!==`text`&&e!==`bg`&&e!==`border`&&!e.startsWith(`border-`)?!1:Ft.test(t),Lt=new Set(`color.red.orange.amber.yellow.lime.green.emerald.teal.cyan.sky.blue.indigo.violet.purple.fuchsia.pink.rose.slate.gray.grey.zinc.neutral.stone.black.white.transparent.current.currentcolor.inherit.primary.secondary.accent.muted.foreground.background.destructive.success.warning.error.info.card.popover.input.ring`.split(`.`)),Rt=new Set([`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`]),zt=/^(#|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color:|color\(|var\(--.*color)/,Bt=/^(-?\d|length:|size:)/,Y=e=>e.trim().toLowerCase().replace(/\s+/g,`-`).replace(/([a-z])(\d)/g,`$1-$2`),Vt=e=>zt.test(e)&&!Bt.test(e),X=(e,t)=>{if(e===t)return``;let n=`${t}-`;return e.startsWith(n)?e.slice(n.length):null},Ht=e=>{let t=q(Y(e)),n=J(t);if(!n)return null;let r=K[n];if(!r)return null;let i=t.indexOf(`[`);if(i>=0)return Vt(t.slice(i+1).replace(/\]$/,``))?r:null;let a=X(t,n);if(a===null)return null;if(n===`bg`&&a===``||(n===`fill`||n===`stroke`)&&a===``)return r;let o=a.split(`-`)[0];return n===`text`&&Rt.has(o)?null:Lt.has(o)?r:null},Ut={black:`#000000`,white:`#ffffff`,transparent:e.dt},Wt=e=>{let t=q(Y(e)),n=J(t);if(!n||K[n]===void 0||t.includes(`[`))return null;let r=X(t,n);if(!r)return null;let i=Ut[r];if(i)return i;let a=r.lastIndexOf(`-`);if(a<0)return null;let o=r.slice(0,a),s=o===`grey`?`gray`:o,c=Number.parseInt(r.slice(a+1),10);return jt[s]?.[c]??null},Gt=/^-?\d/,Kt=(e,t)=>{if(t===``||t.startsWith(`[`)||Gt.test(t))return!0;let n=t.split(`-`)[0];return e===`text`?Rt.has(n):e===`font`||e===`border`||e.startsWith(`border-`)?!1:(e===`rounded`||e.startsWith(`rounded-`),!0)},qt={"font-sans":{property:`font-family`,value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`},"font-serif":{property:`font-family`,value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`},"font-mono":{property:`font-family`,value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`},"font-thin":{property:`font-weight`,value:`100`},"font-extralight":{property:`font-weight`,value:`200`},"font-light":{property:`font-weight`,value:`300`},"font-normal":{property:`font-weight`,value:`400`},"font-medium":{property:`font-weight`,value:`500`},"font-semibold":{property:`font-weight`,value:`600`},"font-bold":{property:`font-weight`,value:`700`},"font-extrabold":{property:`font-weight`,value:`800`},"font-black":{property:`font-weight`,value:`900`},"text-left":{property:`text-align`,value:`left`},"text-center":{property:`text-align`,value:`center`},"text-right":{property:`text-align`,value:`right`},"text-justify":{property:`text-align`,value:`justify`},italic:{property:`font-style`,value:`italic`},"not-italic":{property:`font-style`,value:`normal`},uppercase:{property:`text-transform`,value:`uppercase`},lowercase:{property:`text-transform`,value:`lowercase`},capitalize:{property:`text-transform`,value:`capitalize`},"normal-case":{property:`text-transform`,value:`none`},underline:{property:`text-decoration-line`,value:`underline`},"line-through":{property:`text-decoration-line`,value:`line-through`},"no-underline":{property:`text-decoration-line`,value:`none`},"whitespace-normal":{property:`white-space`,value:`normal`},"whitespace-nowrap":{property:`white-space`,value:`nowrap`},"whitespace-pre":{property:`white-space`,value:`pre`},"whitespace-pre-line":{property:`white-space`,value:`pre-line`},"whitespace-pre-wrap":{property:`white-space`,value:`pre-wrap`},"whitespace-break-spaces":{property:`white-space`,value:`break-spaces`},"break-normal":{property:`word-break`,value:`normal`},"break-all":{property:`word-break`,value:`break-all`},"break-keep":{property:`word-break`,value:`keep-all`},"break-words":{property:`overflow-wrap`,value:`break-word`},"break-anywhere":{property:`overflow-wrap`,value:`anywhere`},"tabular-nums":{property:`font-variant-numeric`,value:`tabular-nums`},"proportional-nums":{property:`font-variant-numeric`,value:`proportional-nums`},"lining-nums":{property:`font-variant-numeric`,value:`lining-nums`},"oldstyle-nums":{property:`font-variant-numeric`,value:`oldstyle-nums`},"slashed-zero":{property:`font-variant-numeric`,value:`slashed-zero`},"border-solid":{property:`border-style`,value:`solid`},"border-dashed":{property:`border-style`,value:`dashed`},"border-dotted":{property:`border-style`,value:`dotted`},"border-none":{property:`border-style`,value:`none`}},Jt=e=>{let t=Y(e);if(!t)return[];let n=Q(t);if(n)return[n.property];let r=Ht(t);return r?[r]:[]},Yt=e=>{let t=Y(e);if(!t)return[];let n=J(t);if(!n)return[];let r=X(q(t),n);if(r===null||!Kt(n,r))return[];let i=Z(n);return i?[i]:[]},Xt=e=>{let t=e.getAttribute(`class`);if(!t)return new Set;let n=t.split(/\s+/).filter(Boolean),r=new Set;for(let e of n){let t=J(e);if(!t||It(t,e))continue;let n=Q(e);if(n){r.add(n.property);continue}let i=Z(t);i&&r.add(i)}return r},Zt=e=>Nt[e]??[],Z=e=>{let t=G[e];return t===void 0?null:t},Q=e=>{let t=qt[q(e)];return t===void 0?null:t},Qt=`react-grab-toolbar-state`,$t=()=>{try{let t=localStorage.getItem(Qt);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.Wt,collapsed:i,enabled:!i,defaultAction:typeof r.defaultAction==`string`?r.defaultAction:e.Z}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},en=e=>{try{localStorage.setItem(Qt,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},tn=e=>{let[t,n]=c(!1);return t},nn=e=>e.key===`Enter`,rn=e=>e.metaKey||e.ctrlKey,an=(e,t,n={})=>{if(!t.key)return null;if(nn(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return rn(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},on=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}},sn=e=>e??!0,$=(t,n)=>{if(typeof t.enabled==`function`){if(!n)return!1;try{return t.enabled(n)}catch(n){return new e.S(t.id,n),!1}}return sn(t.enabled)},cn=(t,n)=>{if(!$(t,n))return!1;try{let r=t.onAction(n);r&&r.catch(n=>{new e.C(t.id,n)})}catch(n){new e.C(t.id,n)}return!0};Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return-128}}),Object.defineProperty(exports,`Dt`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,`Et`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return-9999}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,`Ot`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return 9999}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,`Tt`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return tn}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Xt}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return an}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return 384}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return-512}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return on}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return en}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return cn}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return At}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return ct}});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 Aiden Bai
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
let e=null;const t=()=>{if(e!==null)return e;try{e=window.matchMedia(`(color-gamut: p3)`).matches}catch{e=!1}return e},n=t(),r=e=>n?`color(display-p3 0.84 0.19 0.78 / ${e})`:`rgba(210, 57, 192, ${e})`;let i=null;const a=e=>{i=e},o=()=>i,s=e=>i?e!==null&&i.contains(e):!0,ee=e=>e,te=`data-react-grab`,ne=`0.1.48-dev.ac9f548`,re=`var(--rg-panel-bg)`,ie=`var(--rg-shadow)`,ae=-1e3,oe=.95,se=1500,ce=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],le=5e3,ue=8e3,de=1e4,fe=.5,pe=2147483647,me=2147483645,he=.7,ge=1e3/60,_e=.5,ve=.01,ye=r(.4),be=r(.05),xe=r(.5),Se=r(.08),Ce=r(.15),we=.2,Te=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],Ee=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),De=new Set([`a`,`code`,`pre`]),Oe=new Set([`script`,`style`,`template`,`noscript`]),ke=[`Meta`,`Control`,`Shift`,`Alt`],Ae=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),c=`data-react-grab-frozen`,je=.18,Me=.6,Ne=.5,Pe=`data-react-grab-input`,Fe=.5,Ie=`copy`,Le=`comment`,Re=`edit`,ze=`superellipse(1.25)`,Be=.75,Ve=.01,He=1e3,Ue={left:-9999,top:-9999},We={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},Ge=1e3,Ke=`#00000000`,qe=`transparent`,Je=2e3,Ye=`cubic-bezier(0.34, 1.56, 0.64, 1)`,Xe=12e3,Ze=9e3,Qe=1e4,$e=8e3,et=5e3,tt=1e3,nt=1e7,rt=1.2,it=-9999,at=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(`.`)),ot=`bippy-0.6.0`,st=Object.defineProperty,ct=Object.prototype.hasOwnProperty,l=()=>{},lt=e=>{try{Function.prototype.toString.call(e).indexOf(`^_^`)>-1&&setTimeout(()=>{throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build`)})}catch{}},ut=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e);let dt=!1,ft;const u=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>dt?!0:(e&&typeof e.inject==`function`&&(ft=e.inject.toString()),!!ft?.includes(`(injected)`)),d=new Set,f=new Set,pt=e=>{e&&d.add(e);let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:ot,checkDCE:lt,hasUnsupportedRendererAttached:!1,inject(e){let i=++n;return t.set(i,e),f.add(e),r._instrumentationIsActive||(r._instrumentationIsActive=!0,d.forEach(e=>e())),i},on:l,onCommitFiberRoot:l,onCommitFiberUnmount:l,onPostCommitFiberRoot:l,renderers:t,supportsFiber:!0,supportsFlight:!0};try{st(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`,{configurable:!0,enumerable:!0,get(){return r},set(t){if(t&&typeof t==`object`){let n=r.renderers;r=t,n.size>0&&(n.forEach((e,n)=>{f.add(e),t.renderers.set(n,e)}),mt(e))}}});let t=window.hasOwnProperty,n=!1;st(window,`hasOwnProperty`,{configurable:!0,value:function(...e){try{if(!n&&e[0]===`__REACT_DEVTOOLS_GLOBAL_HOOK__`)return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,n=!0,-0}catch{}return t.apply(this,e)},writable:!0})}catch{mt(e)}return r},mt=e=>{e&&d.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=lt,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=ot,t._instrumentationIsActive=!1;let e=ut(t);if(e||(t.on=l),t.renderers.size){t._instrumentationIsActive=!0,d.forEach(e=>e());return}let n=t.inject,r=u(t);r&&!e&&(dt=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=e=>{let i=n(e);return f.add(e),r&&t.renderers.set(i,e),t._instrumentationIsActive=!0,d.forEach(e=>e()),i}}(t.renderers.size||t._instrumentationIsActive||u())&&e?.()}catch{}},ht=()=>ct.call(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),p=e=>ht()?(mt(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):pt(e),gt=()=>!!(typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`));
|
|
10
|
+
/**
|
|
11
|
+
* @license bippy
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Aiden Bai
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
(()=>{try{gt()&&p()}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 m=e=>{switch(e.tag){case 5:case 26:case 27:return!0;default:return typeof e.type==`string`}},h=e=>{switch(e.tag){case 1:case 11:case 0:case 14:case 15:return!0;default:return!1}},_t=e=>!e||typeof e!=`object`?!1:`pendingProps`in e&&!(`containerInfo`in e),vt=e=>{let t=e.memoizedProps,n=e.alternate?.memoizedProps||{},r=e.flags??e.effectTag??0;switch(e.tag){case 1:case 9:case 11:case 0:case 14:case 15:return(r&1)==1;default:return e.alternate?n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref:!0}},yt=e=>{switch(e.tag){case 18:return!0;case 7:case 6:case 23:case 22:return!0;case 3:return!1;default:{let t=typeof e.type==`object`&&e.type!==null?e.type.$$typeof:e.type;if(typeof t==`symbol`)return t.description===`react.concurrent_mode`||t.description===`react.async_mode`;switch(t){case 60111:case`Symbol(react.concurrent_mode)`:case`Symbol(react.async_mode)`:return!0;default:return!1}}}},bt=e=>{let t=[],n=[];for(m(e)?t.push(e):e.child&&n.push(e.child);n.length;){let e=n.pop();if(!e)break;m(e)?t.push(e):e.child&&n.push(e.child),e.sibling&&n.push(e.sibling)}return t};function xt(e,t,n=!1){if(!e)return null;let r=t(e);if(r instanceof Promise)return(async()=>{if(await r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=await Ct(i,t,n);if(e)return e;i=n?null:i.sibling}return null})();if(r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=St(i,t,n);if(e)return e;i=n?null:i.sibling}return null}const St=(e,t,n=!1)=>{if(!e)return null;if(t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=St(r,t,n);if(e)return e;r=n?null:r.sibling}return null},Ct=async(e,t,n=!1)=>{if(!e)return null;if(await t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=await Ct(r,t,n);if(e)return e;r=n?null:r.sibling}return null},wt=e=>{let t=e;return typeof t==`function`?t:typeof t==`object`&&t?wt(t.type||t.render):null},Tt=e=>{let t=e;if(typeof t==`string`)return t;if(typeof t!=`function`&&!(typeof t==`object`&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=wt(t);return r&&(r.displayName||r.name)||null},Et=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||ut(e)||u(e)},Dt=new Set,Ot=e=>{let t=e.alternate;if(!t)return e;if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let t of Dt){let n=xt(t.current,t=>{if(t===e)return!0});if(n)return n}return e};let kt=0;const g=new WeakMap,At=(e,t=kt++)=>{g.set(e,t)},_=e=>{let t=g.get(e);return!t&&e.alternate&&(t=g.get(e.alternate)),t||(t=kt++,At(e,t)),t},v=(e,t,n)=>{let r=t;for(;r!=null;){if(g.has(r)||_(r),!yt(r)&&vt(r)&&e(r,`mount`),r.tag===13)if(r.memoizedState!==null){let t=r.child,n=t?t.sibling:null;if(n){let t=n.child;t!==null&&v(e,t,!1)}}else{let t=null;r.child!==null&&(t=r.child.child),t!==null&&v(e,t,!1)}else r.child!=null&&v(e,r.child,!0);r=n?r.sibling:null}},jt=(e,t,n,r)=>{if(g.has(t)||_(t),!n)return;g.has(n)||_(n);let i=t.tag===13,a=!yt(t);a&&vt(t)&&e(t,`update`);let o=i&&n.memoizedState!==null,s=i&&t.memoizedState!==null;if(o&&s){let r=t.child?.sibling??null,i=n.child?.sibling??null;r!==null&&i!==null&&jt(e,r,i,t)}else if(o&&!s){let n=t.child;n!==null&&v(e,n,!0)}else if(!o&&s){Nt(e,n);let r=t.child?.sibling??null;r!==null&&v(e,r,!0)}else if(t.child!==n.child){let n=t.child;for(;n;){if(n.alternate){let i=n.alternate;jt(e,n,i,a?t:r)}else v(e,n,!1);n=n.sibling}}},Mt=(e,t)=>{(t.tag===3||!yt(t))&&e(t,`unmount`)},Nt=(e,t)=>{let n=t.tag===13&&t.memoizedState!==null,r=t.child;for(n&&(r=(t.child?.sibling??null)?.child??null);r!==null;)r.return!==null&&(Mt(e,r),Nt(e,r)),r=r.sibling},Pt=e=>Object.prototype.toString.call(e)===`[object Object]`&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),Ft=(e,t=[])=>{if(!Pt(e))return[{path:t,value:e}];let n=[];for(let r in e){let i=e[r],a=t.concat(r);Pt(i)?n.push(...Ft(i,a)):n.push({path:a,value:i})}return n},It=new Set,Lt=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),Rt=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t?.renderers)for(let n of t.renderers.values())try{let t=n.findFiberByHostInstance?.(e);if(t)return t}catch{}if(typeof e==`object`&&e){if(`_reactRootContainer`in e)return e._reactRootContainer?._internalRoot?.current?.child;let t=e.__internalInstanceHandle??e._internalInstanceHandle;if(_t(t))return t;let n=e;for(let e of It){let t=n[e];if(t)return t}for(let e of Object.keys(n))if(Lt(e))return It.add(e),n[e]||null}return null};
|
|
28
|
+
/**
|
|
29
|
+
* @license bippy
|
|
30
|
+
*
|
|
31
|
+
* Copyright (c) Aiden Bai
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the MIT license found in the
|
|
34
|
+
* LICENSE file in the root directory of this source tree.
|
|
35
|
+
*/
|
|
36
|
+
var y=class extends Error{constructor(e,t){super(e,t),this.name=`ReactGrabError`}},b=class extends y{constructor(e,t){super(e,{cause:t}),this.name=`RecoverableError`}},zt=class extends y{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},Bt=class extends b{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},Vt=class extends b{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},Ht=class extends b{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},Ut=class extends b{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},Wt=class extends b{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},Gt=class extends b{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},Kt=class extends y{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},qt=class extends y{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},Jt=class extends y{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},Yt=class extends y{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}};const Xt=e=>(e.tagName||``).toLowerCase();let Zt;const Qt=()=>{if(Zt!==void 0)return Zt;let e=document.querySelector(`script[nonce], style[nonce]`),t=e?.nonce||e?.getAttribute(`nonce`)||null;return t&&(Zt=t),t},$t=[[`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`,``]],en=e=>{for(let[t,n]of $t)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)},x=typeof window<`u`,tn=e=>0,nn=e=>{},S=x?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):tn,C=x?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):nn,rn=()=>x?new Promise(e=>S(()=>e())):Promise.resolve(),an=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,on={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},sn={checkVisibilityCSS:!0,visibilityProperty:!0},cn=(e,t)=>{if(an&&!t)return e.checkVisibility(on)?!0:e.checkVisibility(sn)?window.getComputedStyle(e).opacity!==`0`:!1;let n=t??window.getComputedStyle(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`},ln=e=>{let t=Xt(e);return t===`html`||t===`body`},un=[`data-react-grab`,`data-react-grab-demo`],dn=e=>un.some(t=>e.hasAttribute(t)),fn=e=>{if(dn(e))return!0;let t=e.getRootNode();return t instanceof ShadowRoot&&dn(t.host)},pn=e=>e.hasAttribute(`data-react-grab-ignore`)||e.closest(`[data-react-grab-ignore]`)!==null,mn=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},hn=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},gn=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(hn(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3};let w=new WeakMap;const _n=()=>{w=new WeakMap},vn=e=>{if(ln(e)||fn(e)||pn(e))return!1;let t=performance.now(),n=w.get(e);if(n&&t-n.timestamp<50)return n.isVisible;if(!cn(e))return w.set(e,{isVisible:!1,timestamp:t}),!1;if(e.clientWidth/window.innerWidth>=.9&&e.clientHeight/window.innerHeight>=.9){let t=window.getComputedStyle(e);if(mn(t)||gn(t))return!1}return w.set(e,{isVisible:!0,timestamp:t}),!0},T=(e,t)=>{let n=document.createElement(`style`);n.setAttribute(e,``);let r=Qt();return r&&(n.nonce=r),en(n),n.textContent=t,document.head.appendChild(n),n};let E=null,D=null;const yn=()=>E!==null,bn=()=>{E||(E=T(`data-react-grab-frozen-pseudo`,`html { pointer-events: none !important; }`),D=T(`data-react-grab-hittest-override`,`html, body { pointer-events: auto !important; }`),D.disabled=!0)},xn=()=>{E?.remove(),E=null,D?.remove(),D=null},Sn=()=>{E&&(E.disabled||=!0,D?.disabled&&(D.disabled=!1))},O=()=>{E&&(E.disabled&&=!1,D&&!D.disabled&&(D.disabled=!0))};let k=null,A=null,j=null;const Cn=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom,wn=()=>{j!==null&&clearTimeout(j),j=setTimeout(()=>{j=null,O()},100)},M=()=>{j!==null&&(clearTimeout(j),j=null)},Tn=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},En=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];M(),Sn();try{let n=document.elementsFromPoint(e,t);return o()?n.filter(s):n}finally{wn()}},Dn=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();if(A){let r=A.element,i=n-A.timestamp<16;if(r.isConnected&&i&&Cn(e,t,A.rect))return r;A=null,k?.element===r&&(k=null)}if(k){let r=Tn(e,t,k.clientX,k.clientY),i=n-k.timestamp<16;if(r||i)return k.element}M(),Sn();try{let r=null,i=document.elementFromPoint(e,t);if(i&&vn(i)&&s(i))r=i;else{let n=document.elementsFromPoint(e,t);for(let e of n)if(e!==i&&vn(e)&&s(e)){r=e;break}}return A=r instanceof HTMLIFrameElement?{element:r,rect:r.getBoundingClientRect(),timestamp:n}:null,k={clientX:e,clientY:t,element:r,timestamp:n},r}finally{wn()}},On=()=>{M(),O(),k=null,A=null},kn=e=>{};let N=!1;const P=new Map;let An=-1;const jn=new WeakSet,F=new Map,I=new Map,Mn=e=>jn.has(e)?!0:!N||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(jn.add(e),!0);typeof window<`u`&&(window.requestAnimationFrame=e=>{if(!Mn(e))return S(e);if(N){let t=An--;return P.set(t,e),t}let t=S(n=>{if(N){let n=An--;P.set(n,e),F.set(t,n);return}e(n)});return t},window.cancelAnimationFrame=e=>{if(P.has(e)){P.delete(e);return}let t=I.get(e);if(t!==void 0){C(t.nativeId),I.delete(e);return}let n=F.get(e);if(n!==void 0){P.delete(n),F.delete(e);return}C(e)});const Nn=()=>{if(!N){N=!0,P.clear(),F.clear();for(let[e,{nativeId:t,callback:n}]of I)C(t),P.set(e,n);I.clear()}},Pn=()=>{if(N){N=!1;for(let[e,t]of P.entries()){let n=S(n=>{I.delete(e),t(n)});I.set(e,{nativeId:n,callback:t})}P.clear(),F.clear()}},L=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)},Fn=`
|
|
37
|
+
[${c}],
|
|
38
|
+
[${c}] * {
|
|
39
|
+
animation-play-state: paused !important;
|
|
40
|
+
transition: none !important;
|
|
41
|
+
}
|
|
42
|
+
`;let In=null,R=[],z=[],B=[],V=null,H=[],U=[],W=!1;const G=new Map;let K=[];const Ln=()=>V!==null||H.length>0||U.length>0,Rn=()=>{In||=T(`data-react-grab-frozen-styles`,Fn)},zn=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),Bn=e=>{let t=new Set;for(let n of e){n instanceof SVGSVGElement?t.add(n):n instanceof SVGElement&&n.ownerSVGElement&&t.add(n.ownerSVGElement);for(let e of n.querySelectorAll(`svg`))e instanceof SVGSVGElement&&t.add(e)}return[...t]},Vn=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},Hn=(e,t)=>{for(let n of e){let e=G.get(n)??0;if(e===0){G.set(n,1),t.push(n),Vn(n,`pauseAnimations`);continue}G.set(n,e+1),t.push(n)}},Un=(e,t)=>{let n=[];for(let r of e){let e=G.get(r);if(e){if(e===1){try{Vn(r,`unpauseAnimations`),G.delete(r)}catch(e){n.push(r),t.push(e)}continue}G.set(r,e-1)}}return n},Wn=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},Gn=e=>{for(let t of e)try{t.finish()}catch{}},Kn=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},qn=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;return t instanceof Element&&t.getRootNode()instanceof ShadowRoot},Jn=e=>{if(e.length===0||zn(e,B))return;q();let t=[...e];Rn(),R=t,z=[];try{Hn(Bn(R),z);for(let e of R)e.setAttribute(c,``);let e=Wn(R);K=[];for(let t of e)t.pause(),K.push(t);B=t}catch(e){try{q()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},q=()=>{if(R.length===0&&z.length===0&&K.length===0)return;let e=R,t=z,n=K,r=[],i=[];B=[];for(let t of e)try{t.removeAttribute(c)}catch(e){i.push(t),r.push(e)}R=i,z=Un(t,r),Kn(n),K=[],L(r,`Unfreezing element animations failed`)},Yn=e=>e.length===0?(q(),()=>{}):(Jn(e),q),Xn=()=>{if(Ln())return[];let e=[];for(let t of document.getAnimations())qn(t)||t.playState===`running`&&e.push(t);return e},Zn=e=>{if(Ln())return;if(V=T(`data-react-grab-global-freeze`,``),e.length>200)V.textContent=`
|
|
43
|
+
*, *::before, *::after {
|
|
44
|
+
animation-play-state: paused !important;
|
|
45
|
+
transition: none !important;
|
|
46
|
+
}
|
|
47
|
+
`,W=!0,U=[];else{U=[];for(let t of e)t.pause(),U.push(t);W=!1}let t=Bn(Array.from(document.querySelectorAll(`svg`)));H=[],Hn(t,H),Nn()},Qn=()=>{if(!Ln())return;let e=V,t=W,n=U,r=H,i=[];if(e){try{if(t){e.textContent=`
|
|
48
|
+
*, *::before, *::after {
|
|
49
|
+
transition: none !important;
|
|
50
|
+
}
|
|
51
|
+
`;let t=[];for(let e of document.getAnimations())qn(e)||t.push(e);Gn(t)}else Kn(n)}catch(e){i.push(e)}W=!1,U=[];try{e.remove(),V=null}catch(e){i.push(e)}}H=Un(r,i);try{Pn()}catch(e){i.push(e)}L(i,`Unfreezing global animations failed`)},$n=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],er=[`focus`,`blur`,`focusin`,`focusout`],tr=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],nr=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],rr=new Map,ir=new Map,ar=e=>{e.stopImmediatePropagation()},or=e=>{e.preventDefault(),e.stopImmediatePropagation()},sr=(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}},cr=(e,t)=>{let n=[],r=document.elementFromPoint(e,t);for(;r&&r!==document.documentElement;)r instanceof HTMLElement&&n.push(r),r=r.parentElement;return n},lr=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;)t instanceof HTMLElement&&e.push(t),t=t.shadowRoot?.activeElement??null;return e},ur=(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`)}},dr=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},fr=(e,t)=>{if(yn())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?cr(e,t):Array.from(document.querySelectorAll(`:hover`)).filter(e=>e instanceof HTMLElement);for(let e of r){let t=sr(e,tr);t&&n.push(t)}let i=[];for(let e of lr()){let t=sr(e,nr,ir);t&&i.push(t)}return{hoverStates:n,focusStates:i}},pr=e=>{if(e){for(let e of $n)document.addEventListener(e,ar,!0);for(let e of er)document.addEventListener(e,or,!0);ur(e.hoverStates,rr),ur(e.focusStates,ir),bn()}},mr=()=>{On();for(let e of $n)document.removeEventListener(e,ar,!0);for(let e of er)document.removeEventListener(e,or,!0);let e=[...dr(rr),...dr(ir)];try{xn()}catch(t){e.push(t)}L(e,`Unfreezing pseudo states failed`)},hr=()=>{let e=[];try{mr()}catch(t){e.push(t)}try{Qn()}catch(t){e.push(t)}return e},gr=(e,t)=>{let n=fr(e,t),r=Xn();try{pr(n),Zn(r)}catch(e){let t=hr();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},_r=()=>{L(hr(),`Unfreezing global interactions failed`)};let J=!1,Y=0;const vr=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},yr=new WeakMap,br=new WeakMap,xr=new WeakMap,X=new Set,Sr=[],Z=[],Q=new WeakMap,$=new WeakMap,Cr=new WeakSet,wr=Dt,Tr=new Set,Er=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},Dr=()=>{if(wr.size>0)return wr;let e=new Set,t=n=>{let r=Rt(n);if(r){let t=Er(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},Or=(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},kr=e=>{if(!e||Q.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=()=>J?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>J?null:n,set:e=>{if(J){e!==null&&(t.bufferedPending=Or(t.bufferedPending??null,e));return}n=e}}),Q.set(e,t)},Ar=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},jr=e=>{let t=Q.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=Ar(t.pendingValueAtPause??null),r=Ar(t.bufferedPending??null);for(let t of[...e,...r])Z.push(()=>n(t))}Q.delete(e)},Mr=e=>{if($.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return J?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(J){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),$.set(e,t)},Nr=e=>{let t=$.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),$.delete(e))},Pr=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&kr(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Mr(n),n=n.next},Fr=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&jr(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Nr(n),n=n.next},Ir=e=>{let t=e;for(;t;){if(h(t)&&Pr(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}},Lr=e=>{let t=e;for(;t;){if(h(t)&&Fr(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}},Rr=e=>{if(yr.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};yr.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!J||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,vr(br,a,()=>(...e)=>{J?Z.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!J||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,vr(br,a,()=>(...e)=>{J?Z.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!J||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,vr(xr,a,()=>e=>{J?Sr.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>J?n.useSyncExternalStore(t=>e(()=>{J?X.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},zr=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`&&Rr(r),r),set:e=>{r=e}})},Br=e=>{queueMicrotask(()=>{try{for(let t of p().renderers.values())if(typeof t.scheduleUpdate==`function`){for(let n of e)if(n.current)try{t.scheduleUpdate(n.current)}catch(e){new b(`scheduleUpdate failed during unfreeze`,e)}}}catch(e){new b(`scheduleReactUpdate failed`,e)}})},Vr=e=>{for(let t of e)try{t()}catch(e){new b(`Callback failed during state replay`,e)}},Hr=()=>{for(let e of p().renderers.values())Cr.has(e)||(zr(e),Cr.add(e))},Ur=()=>{X.clear(),Sr.length=0,Z.length=0},Wr=()=>{let e=new Set(Tr);try{for(let t of Dr())e.add(t)}catch(e){new b(`Collecting fiber roots failed during unfreeze`,e)}Tr.clear(),J=!1;for(let t of e)try{Lr(t.current)}catch(e){new b(`Resuming a fiber root failed during unfreeze`,e)}let t=Array.from(X),n=Sr.slice(),r=Z.slice();Ur(),Vr(t),Vr(n),Vr(r),J||Br(e)},Gr=()=>{let e=Y===0;if(Y+=1,e)try{Hr(),J=!0;let e=Dr();for(let t of e)Tr.add(t),Ir(t.current)}catch(e){throw--Y,J&&Wr(),e}let t=!1;return()=>{t||(t=!0,--Y,Y===0&&Wr())}},Kr=()=>{try{return Gr()}catch(e){return new b(`Pausing React updates failed`,e),()=>{}}};export{Be as $,a as $t,Ut as A,be as At,xt as B,oe as Bt,Wt as C,Ge as Ct,Bt as D,xe as Dt,Kt as E,Ne as Et,h as F,Te as Ft,Ae as G,ne as Gt,m as H,ue as Ht,Tt as I,Oe as It,fe as J,me as Jt,we as K,Ve as Kt,Et as L,Pe as Lt,b as M,ie as Mt,Jt as N,De as Nt,Ht as O,ye as Ot,qt as P,Ee as Pt,he as Q,s as Qt,bt as R,at as Rt,Gt as S,He as St,zt as T,ve as Tt,f as U,le as Ut,Rt as V,ce as Vt,p as W,Fe as Wt,nt as X,o as Xt,Le as Y,te as Yt,Ie as Z,ee as Zt,S as _,Me as _t,Jn as a,$e as at,Qt as b,ze as bt,On as c,Xe as ct,O as d,Ke as dt,t as en,We as et,Sn as f,qe as ft,C as g,_e as gt,ln as h,Ce as ht,_r as i,Qe as it,y as j,re as jt,Vt as k,Se as kt,Dn as l,Ze as lt,vn as m,rt as mt,Gr as n,Re as nt,Yn as o,et as ot,_n as p,se as pt,ge as q,pe as qt,gr as r,Je as rt,kn as s,tt as st,Kr as t,Ue as tt,En as u,Ye as ut,rn as v,je as vt,Yt as w,ae as wt,Xt as x,ke as xt,en as y,de as yt,Ot as z,it as zt};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 Aiden Bai
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
let e=null;const t=()=>{if(e!==null)return e;try{e=window.matchMedia(`(color-gamut: p3)`).matches}catch{e=!1}return e},n=t(),r=e=>n?`color(display-p3 0.84 0.19 0.78 / ${e})`:`rgba(210, 57, 192, ${e})`;let i=null;const a=e=>{i=e},o=()=>i,s=e=>i?e!==null&&i.contains(e):!0,ee=e=>e,te=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],ne=r(.4),re=r(.05),ie=r(.5),ae=r(.08),oe=r(.15),se=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],ce=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),le=new Set([`a`,`code`,`pre`]),ue=new Set([`script`,`style`,`template`,`noscript`]),de=[`Meta`,`Control`,`Shift`,`Alt`],fe=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),c=`data-react-grab-frozen`,pe={left:-9999,top:-9999},me={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},he=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(`.`)),ge=`bippy-0.6.0`,_e=Object.defineProperty,ve=Object.prototype.hasOwnProperty,l=()=>{},ye=e=>{try{Function.prototype.toString.call(e).indexOf(`^_^`)>-1&&setTimeout(()=>{throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build`)})}catch{}},be=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e);let xe=!1,Se;const u=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>xe?!0:(e&&typeof e.inject==`function`&&(Se=e.inject.toString()),!!Se?.includes(`(injected)`)),d=new Set,f=new Set,Ce=e=>{e&&d.add(e);let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:ge,checkDCE:ye,hasUnsupportedRendererAttached:!1,inject(e){let i=++n;return t.set(i,e),f.add(e),r._instrumentationIsActive||(r._instrumentationIsActive=!0,d.forEach(e=>e())),i},on:l,onCommitFiberRoot:l,onCommitFiberUnmount:l,onPostCommitFiberRoot:l,renderers:t,supportsFiber:!0,supportsFlight:!0};try{_e(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`,{configurable:!0,enumerable:!0,get(){return r},set(t){if(t&&typeof t==`object`){let n=r.renderers;r=t,n.size>0&&(n.forEach((e,n)=>{f.add(e),t.renderers.set(n,e)}),we(e))}}});let t=window.hasOwnProperty,n=!1;_e(window,`hasOwnProperty`,{configurable:!0,value:function(...e){try{if(!n&&e[0]===`__REACT_DEVTOOLS_GLOBAL_HOOK__`)return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,n=!0,-0}catch{}return t.apply(this,e)},writable:!0})}catch{we(e)}return r},we=e=>{e&&d.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=ye,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=ge,t._instrumentationIsActive=!1;let e=be(t);if(e||(t.on=l),t.renderers.size){t._instrumentationIsActive=!0,d.forEach(e=>e());return}let n=t.inject,r=u(t);r&&!e&&(xe=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=e=>{let i=n(e);return f.add(e),r&&t.renderers.set(i,e),t._instrumentationIsActive=!0,d.forEach(e=>e()),i}}(t.renderers.size||t._instrumentationIsActive||u())&&e?.()}catch{}},Te=()=>ve.call(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),p=e=>Te()?(we(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Ce(e),Ee=()=>!!(typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`));
|
|
10
|
+
/**
|
|
11
|
+
* @license bippy
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Aiden Bai
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
(()=>{try{Ee()&&p()}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 De=e=>{switch(e.tag){case 5:case 26:case 27:return!0;default:return typeof e.type==`string`}},Oe=e=>{switch(e.tag){case 1:case 11:case 0:case 14:case 15:return!0;default:return!1}},ke=e=>!e||typeof e!=`object`?!1:`pendingProps`in e&&!(`containerInfo`in e),Ae=e=>{let t=e.memoizedProps,n=e.alternate?.memoizedProps||{},r=e.flags??e.effectTag??0;switch(e.tag){case 1:case 9:case 11:case 0:case 14:case 15:return(r&1)==1;default:return e.alternate?n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref:!0}},je=e=>{switch(e.tag){case 18:return!0;case 7:case 6:case 23:case 22:return!0;case 3:return!1;default:{let t=typeof e.type==`object`&&e.type!==null?e.type.$$typeof:e.type;if(typeof t==`symbol`)return t.description===`react.concurrent_mode`||t.description===`react.async_mode`;switch(t){case 60111:case`Symbol(react.concurrent_mode)`:case`Symbol(react.async_mode)`:return!0;default:return!1}}}},Me=e=>{let t=[],n=[];for(De(e)?t.push(e):e.child&&n.push(e.child);n.length;){let e=n.pop();if(!e)break;De(e)?t.push(e):e.child&&n.push(e.child),e.sibling&&n.push(e.sibling)}return t};function Ne(e,t,n=!1){if(!e)return null;let r=t(e);if(r instanceof Promise)return(async()=>{if(await r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=await Fe(i,t,n);if(e)return e;i=n?null:i.sibling}return null})();if(r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=Pe(i,t,n);if(e)return e;i=n?null:i.sibling}return null}const Pe=(e,t,n=!1)=>{if(!e)return null;if(t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=Pe(r,t,n);if(e)return e;r=n?null:r.sibling}return null},Fe=async(e,t,n=!1)=>{if(!e)return null;if(await t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=await Fe(r,t,n);if(e)return e;r=n?null:r.sibling}return null},Ie=e=>{let t=e;return typeof t==`function`?t:typeof t==`object`&&t?Ie(t.type||t.render):null},Le=e=>{let t=e;if(typeof t==`string`)return t;if(typeof t!=`function`&&!(typeof t==`object`&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=Ie(t);return r&&(r.displayName||r.name)||null},Re=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||be(e)||u(e)},ze=new Set,Be=e=>{let t=e.alternate;if(!t)return e;if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let t of ze){let n=Ne(t.current,t=>{if(t===e)return!0});if(n)return n}return e};let Ve=0;const m=new WeakMap,He=(e,t=Ve++)=>{m.set(e,t)},h=e=>{let t=m.get(e);return!t&&e.alternate&&(t=m.get(e.alternate)),t||(t=Ve++,He(e,t)),t},g=(e,t,n)=>{let r=t;for(;r!=null;){if(m.has(r)||h(r),!je(r)&&Ae(r)&&e(r,`mount`),r.tag===13)if(r.memoizedState!==null){let t=r.child,n=t?t.sibling:null;if(n){let t=n.child;t!==null&&g(e,t,!1)}}else{let t=null;r.child!==null&&(t=r.child.child),t!==null&&g(e,t,!1)}else r.child!=null&&g(e,r.child,!0);r=n?r.sibling:null}},Ue=(e,t,n,r)=>{if(m.has(t)||h(t),!n)return;m.has(n)||h(n);let i=t.tag===13,a=!je(t);a&&Ae(t)&&e(t,`update`);let o=i&&n.memoizedState!==null,s=i&&t.memoizedState!==null;if(o&&s){let r=t.child?.sibling??null,i=n.child?.sibling??null;r!==null&&i!==null&&Ue(e,r,i,t)}else if(o&&!s){let n=t.child;n!==null&&g(e,n,!0)}else if(!o&&s){Ge(e,n);let r=t.child?.sibling??null;r!==null&&g(e,r,!0)}else if(t.child!==n.child){let n=t.child;for(;n;){if(n.alternate){let i=n.alternate;Ue(e,n,i,a?t:r)}else g(e,n,!1);n=n.sibling}}},We=(e,t)=>{(t.tag===3||!je(t))&&e(t,`unmount`)},Ge=(e,t)=>{let n=t.tag===13&&t.memoizedState!==null,r=t.child;for(n&&(r=(t.child?.sibling??null)?.child??null);r!==null;)r.return!==null&&(We(e,r),Ge(e,r)),r=r.sibling},Ke=e=>Object.prototype.toString.call(e)===`[object Object]`&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),qe=(e,t=[])=>{if(!Ke(e))return[{path:t,value:e}];let n=[];for(let r in e){let i=e[r],a=t.concat(r);Ke(i)?n.push(...qe(i,a)):n.push({path:a,value:i})}return n},Je=new Set,Ye=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),Xe=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t?.renderers)for(let n of t.renderers.values())try{let t=n.findFiberByHostInstance?.(e);if(t)return t}catch{}if(typeof e==`object`&&e){if(`_reactRootContainer`in e)return e._reactRootContainer?._internalRoot?.current?.child;let t=e.__internalInstanceHandle??e._internalInstanceHandle;if(ke(t))return t;let n=e;for(let e of Je){let t=n[e];if(t)return t}for(let e of Object.keys(n))if(Ye(e))return Je.add(e),n[e]||null}return null};
|
|
28
|
+
/**
|
|
29
|
+
* @license bippy
|
|
30
|
+
*
|
|
31
|
+
* Copyright (c) Aiden Bai
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the MIT license found in the
|
|
34
|
+
* LICENSE file in the root directory of this source tree.
|
|
35
|
+
*/
|
|
36
|
+
var _=class extends Error{constructor(e,t){super(e,t),this.name=`ReactGrabError`}},v=class extends _{constructor(e,t){super(e,{cause:t}),this.name=`RecoverableError`}},Ze=class extends _{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},Qe=class extends v{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},$e=class extends v{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},et=class extends v{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},tt=class extends v{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},nt=class extends v{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},rt=class extends v{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},it=class extends _{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},at=class extends _{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},ot=class extends _{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},st=class extends _{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}};const ct=e=>(e.tagName||``).toLowerCase();let y;const lt=()=>{if(y!==void 0)return y;let e=document.querySelector(`script[nonce], style[nonce]`),t=e?.nonce||e?.getAttribute(`nonce`)||null;return t&&(y=t),t},ut=[[`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`,``]],dt=e=>{for(let[t,n]of ut)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)},b=typeof window<`u`,ft=e=>0,pt=e=>{},x=b?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):ft,S=b?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):pt,mt=()=>b?new Promise(e=>x(()=>e())):Promise.resolve(),ht=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,gt={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},_t={checkVisibilityCSS:!0,visibilityProperty:!0},vt=(e,t)=>{if(ht&&!t)return e.checkVisibility(gt)?!0:e.checkVisibility(_t)?window.getComputedStyle(e).opacity!==`0`:!1;let n=t??window.getComputedStyle(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`},yt=e=>{let t=ct(e);return t===`html`||t===`body`},bt=[`data-react-grab`,`data-react-grab-demo`],xt=e=>bt.some(t=>e.hasAttribute(t)),St=e=>{if(xt(e))return!0;let t=e.getRootNode();return t instanceof ShadowRoot&&xt(t.host)},Ct=e=>e.hasAttribute(`data-react-grab-ignore`)||e.closest(`[data-react-grab-ignore]`)!==null,wt=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},Tt=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},Et=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(Tt(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3};let C=new WeakMap;const Dt=()=>{C=new WeakMap},w=e=>{if(yt(e)||St(e)||Ct(e))return!1;let t=performance.now(),n=C.get(e);if(n&&t-n.timestamp<50)return n.isVisible;if(!vt(e))return C.set(e,{isVisible:!1,timestamp:t}),!1;if(e.clientWidth/window.innerWidth>=.9&&e.clientHeight/window.innerHeight>=.9){let t=window.getComputedStyle(e);if(wt(t)||Et(t))return!1}return C.set(e,{isVisible:!0,timestamp:t}),!0},T=(e,t)=>{let n=document.createElement(`style`);n.setAttribute(e,``);let r=lt();return r&&(n.nonce=r),dt(n),n.textContent=t,document.head.appendChild(n),n};let E=null,D=null;const Ot=()=>E!==null,kt=()=>{E||(E=T(`data-react-grab-frozen-pseudo`,`html { pointer-events: none !important; }`),D=T(`data-react-grab-hittest-override`,`html, body { pointer-events: auto !important; }`),D.disabled=!0)},At=()=>{E?.remove(),E=null,D?.remove(),D=null},O=()=>{E&&(E.disabled||=!0,D?.disabled&&(D.disabled=!1))},k=()=>{E&&(E.disabled&&=!1,D&&!D.disabled&&(D.disabled=!0))};let A=null,j=null,M=null;const jt=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom,Mt=()=>{M!==null&&clearTimeout(M),M=setTimeout(()=>{M=null,k()},100)},N=()=>{M!==null&&(clearTimeout(M),M=null)},Nt=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},Pt=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];N(),O();try{let n=document.elementsFromPoint(e,t);return o()?n.filter(s):n}finally{Mt()}},Ft=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();if(j){let r=j.element,i=n-j.timestamp<16;if(r.isConnected&&i&&jt(e,t,j.rect))return r;j=null,A?.element===r&&(A=null)}if(A){let r=Nt(e,t,A.clientX,A.clientY),i=n-A.timestamp<16;if(r||i)return A.element}N(),O();try{let r=null,i=document.elementFromPoint(e,t);if(i&&w(i)&&s(i))r=i;else{let n=document.elementsFromPoint(e,t);for(let e of n)if(e!==i&&w(e)&&s(e)){r=e;break}}return j=r instanceof HTMLIFrameElement?{element:r,rect:r.getBoundingClientRect(),timestamp:n}:null,A={clientX:e,clientY:t,element:r,timestamp:n},r}finally{Mt()}},It=()=>{N(),k(),A=null,j=null},Lt=e=>{};let P=!1;const F=new Map;let Rt=-1;const zt=new WeakSet,I=new Map,L=new Map,Bt=e=>zt.has(e)?!0:!P||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(zt.add(e),!0);typeof window<`u`&&(window.requestAnimationFrame=e=>{if(!Bt(e))return x(e);if(P){let t=Rt--;return F.set(t,e),t}let t=x(n=>{if(P){let n=Rt--;F.set(n,e),I.set(t,n);return}e(n)});return t},window.cancelAnimationFrame=e=>{if(F.has(e)){F.delete(e);return}let t=L.get(e);if(t!==void 0){S(t.nativeId),L.delete(e);return}let n=I.get(e);if(n!==void 0){F.delete(n),I.delete(e);return}S(e)});const Vt=()=>{if(!P){P=!0,F.clear(),I.clear();for(let[e,{nativeId:t,callback:n}]of L)S(t),F.set(e,n);L.clear()}},Ht=()=>{if(P){P=!1;for(let[e,t]of F.entries()){let n=x(n=>{L.delete(e),t(n)});L.set(e,{nativeId:n,callback:t})}F.clear(),I.clear()}},R=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)},Ut=`
|
|
37
|
+
[${c}],
|
|
38
|
+
[${c}] * {
|
|
39
|
+
animation-play-state: paused !important;
|
|
40
|
+
transition: none !important;
|
|
41
|
+
}
|
|
42
|
+
`;let Wt=null,z=[],B=[],Gt=[],V=null,H=[],U=[],W=!1;const G=new Map;let K=[];const Kt=()=>V!==null||H.length>0||U.length>0,qt=()=>{Wt||=T(`data-react-grab-frozen-styles`,Ut)},Jt=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),Yt=e=>{let t=new Set;for(let n of e){n instanceof SVGSVGElement?t.add(n):n instanceof SVGElement&&n.ownerSVGElement&&t.add(n.ownerSVGElement);for(let e of n.querySelectorAll(`svg`))e instanceof SVGSVGElement&&t.add(e)}return[...t]},Xt=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},Zt=(e,t)=>{for(let n of e){let e=G.get(n)??0;if(e===0){G.set(n,1),t.push(n),Xt(n,`pauseAnimations`);continue}G.set(n,e+1),t.push(n)}},Qt=(e,t)=>{let n=[];for(let r of e){let e=G.get(r);if(e){if(e===1){try{Xt(r,`unpauseAnimations`),G.delete(r)}catch(e){n.push(r),t.push(e)}continue}G.set(r,e-1)}}return n},$t=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},en=e=>{for(let t of e)try{t.finish()}catch{}},tn=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},nn=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;return t instanceof Element&&t.getRootNode()instanceof ShadowRoot},rn=e=>{if(e.length===0||Jt(e,Gt))return;q();let t=[...e];qt(),z=t,B=[];try{Zt(Yt(z),B);for(let e of z)e.setAttribute(c,``);let e=$t(z);K=[];for(let t of e)t.pause(),K.push(t);Gt=t}catch(e){try{q()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},q=()=>{if(z.length===0&&B.length===0&&K.length===0)return;let e=z,t=B,n=K,r=[],i=[];Gt=[];for(let t of e)try{t.removeAttribute(c)}catch(e){i.push(t),r.push(e)}z=i,B=Qt(t,r),tn(n),K=[],R(r,`Unfreezing element animations failed`)},an=e=>e.length===0?(q(),()=>{}):(rn(e),q),on=()=>{if(Kt())return[];let e=[];for(let t of document.getAnimations())nn(t)||t.playState===`running`&&e.push(t);return e},sn=e=>{if(Kt())return;if(V=T(`data-react-grab-global-freeze`,``),e.length>200)V.textContent=`
|
|
43
|
+
*, *::before, *::after {
|
|
44
|
+
animation-play-state: paused !important;
|
|
45
|
+
transition: none !important;
|
|
46
|
+
}
|
|
47
|
+
`,W=!0,U=[];else{U=[];for(let t of e)t.pause(),U.push(t);W=!1}let t=Yt(Array.from(document.querySelectorAll(`svg`)));H=[],Zt(t,H),Vt()},cn=()=>{if(!Kt())return;let e=V,t=W,n=U,r=H,i=[];if(e){try{if(t){e.textContent=`
|
|
48
|
+
*, *::before, *::after {
|
|
49
|
+
transition: none !important;
|
|
50
|
+
}
|
|
51
|
+
`;let t=[];for(let e of document.getAnimations())nn(e)||t.push(e);en(t)}else tn(n)}catch(e){i.push(e)}W=!1,U=[];try{e.remove(),V=null}catch(e){i.push(e)}}H=Qt(r,i);try{Ht()}catch(e){i.push(e)}R(i,`Unfreezing global animations failed`)},ln=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],un=[`focus`,`blur`,`focusin`,`focusout`],dn=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],fn=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],pn=new Map,mn=new Map,hn=e=>{e.stopImmediatePropagation()},gn=e=>{e.preventDefault(),e.stopImmediatePropagation()},_n=(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}},vn=(e,t)=>{let n=[],r=document.elementFromPoint(e,t);for(;r&&r!==document.documentElement;)r instanceof HTMLElement&&n.push(r),r=r.parentElement;return n},yn=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;)t instanceof HTMLElement&&e.push(t),t=t.shadowRoot?.activeElement??null;return e},bn=(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`)}},xn=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},Sn=(e,t)=>{if(Ot())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?vn(e,t):Array.from(document.querySelectorAll(`:hover`)).filter(e=>e instanceof HTMLElement);for(let e of r){let t=_n(e,dn);t&&n.push(t)}let i=[];for(let e of yn()){let t=_n(e,fn,mn);t&&i.push(t)}return{hoverStates:n,focusStates:i}},Cn=e=>{if(e){for(let e of ln)document.addEventListener(e,hn,!0);for(let e of un)document.addEventListener(e,gn,!0);bn(e.hoverStates,pn),bn(e.focusStates,mn),kt()}},wn=()=>{It();for(let e of ln)document.removeEventListener(e,hn,!0);for(let e of un)document.removeEventListener(e,gn,!0);let e=[...xn(pn),...xn(mn)];try{At()}catch(t){e.push(t)}R(e,`Unfreezing pseudo states failed`)},Tn=()=>{let e=[];try{wn()}catch(t){e.push(t)}try{cn()}catch(t){e.push(t)}return e},En=(e,t)=>{let n=Sn(e,t),r=on();try{Cn(n),sn(r)}catch(e){let t=Tn();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},Dn=()=>{R(Tn(),`Unfreezing global interactions failed`)};let J=!1,Y=0;const On=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},kn=new WeakMap,An=new WeakMap,jn=new WeakMap,Mn=new Set,Nn=[],X=[],Z=new WeakMap,Q=new WeakMap,Pn=new WeakSet,Fn=ze,In=new Set,Ln=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},Rn=()=>{if(Fn.size>0)return Fn;let e=new Set,t=n=>{let r=Xe(n);if(r){let t=Ln(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},zn=(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},Bn=e=>{if(!e||Z.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=()=>J?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>J?null:n,set:e=>{if(J){e!==null&&(t.bufferedPending=zn(t.bufferedPending??null,e));return}n=e}}),Z.set(e,t)},Vn=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},Hn=e=>{let t=Z.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=Vn(t.pendingValueAtPause??null),r=Vn(t.bufferedPending??null);for(let t of[...e,...r])X.push(()=>n(t))}Z.delete(e)},Un=e=>{if(Q.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return J?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(J){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),Q.set(e,t)},Wn=e=>{let t=Q.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),Q.delete(e))},Gn=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Bn(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Un(n),n=n.next},Kn=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Hn(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Wn(n),n=n.next},qn=e=>{let t=e;for(;t;){if(Oe(t)&&Gn(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}},Jn=e=>{let t=e;for(;t;){if(Oe(t)&&Kn(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}},Yn=e=>{if(kn.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};kn.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!J||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,On(An,a,()=>(...e)=>{J?X.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!J||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,On(An,a,()=>(...e)=>{J?X.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!J||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,On(jn,a,()=>e=>{J?Nn.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>J?n.useSyncExternalStore(t=>e(()=>{J?Mn.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},Xn=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`&&Yn(r),r),set:e=>{r=e}})},Zn=e=>{queueMicrotask(()=>{try{for(let t of p().renderers.values())if(typeof t.scheduleUpdate==`function`){for(let n of e)if(n.current)try{t.scheduleUpdate(n.current)}catch(e){new v(`scheduleUpdate failed during unfreeze`,e)}}}catch(e){new v(`scheduleReactUpdate failed`,e)}})},$=e=>{for(let t of e)try{t()}catch(e){new v(`Callback failed during state replay`,e)}},Qn=()=>{for(let e of p().renderers.values())Pn.has(e)||(Xn(e),Pn.add(e))},$n=()=>{Mn.clear(),Nn.length=0,X.length=0},er=()=>{let e=new Set(In);try{for(let t of Rn())e.add(t)}catch(e){new v(`Collecting fiber roots failed during unfreeze`,e)}In.clear(),J=!1;for(let t of e)try{Jn(t.current)}catch(e){new v(`Resuming a fiber root failed during unfreeze`,e)}let t=Array.from(Mn),n=Nn.slice(),r=X.slice();$n(),$(t),$(n),$(r),J||Zn(e)},tr=()=>{let e=Y===0;if(Y+=1,e)try{Qn(),J=!0;let e=Rn();for(let t of e)In.add(t),qn(t.current)}catch(e){throw--Y,J&&er(),e}let t=!1;return()=>{t||(t=!0,--Y,Y===0&&er())}},nr=()=>{try{return tr()}catch(e){return new v(`Pausing React updates failed`,e),()=>{}}};Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return .75}}),Object.defineProperty(exports,`$t`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return tt}}),Object.defineProperty(exports,`At`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`Bt`,{enumerable:!0,get:function(){return .95}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,`Dt`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return it}}),Object.defineProperty(exports,`Et`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,`Ft`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`Gt`,{enumerable:!0,get:function(){return`0.1.48-dev.ac9f548`}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,`Ht`,{enumerable:!0,get:function(){return 8e3}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,`It`,{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`Jt`,{enumerable:!0,get:function(){return 2147483645}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return .2}}),Object.defineProperty(exports,`Kt`,{enumerable:!0,get:function(){return .01}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`Lt`,{enumerable:!0,get:function(){return`data-react-grab-input`}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`Mt`,{enumerable:!0,get:function(){return`var(--rg-shadow)`}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,`Nt`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,`Ot`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return at}}),Object.defineProperty(exports,`Pt`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return .7}}),Object.defineProperty(exports,`Qt`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`Rt`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return rt}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,`Tt`,{enumerable:!0,get:function(){return .01}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`Ut`,{enumerable:!0,get:function(){return 5e3}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,`Vt`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`Wt`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return 1e7}}),Object.defineProperty(exports,`Xt`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return`comment`}}),Object.defineProperty(exports,`Yt`,{enumerable:!0,get:function(){return`data-react-grab`}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return`copy`}}),Object.defineProperty(exports,`Zt`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return .6}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return rn}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return 8e3}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return`superellipse(1.25)`}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return 12e3}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return`#00000000`}}),Object.defineProperty(exports,`en`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return`transparent`}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Dn}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return 1e4}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`jt`,{enumerable:!0,get:function(){return`var(--rg-panel-bg)`}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,`kt`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return 9e3}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return 1.2}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return tr}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return`edit`}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return an}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return 5e3}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return 1500}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return 16.666666666666668}}),Object.defineProperty(exports,`qt`,{enumerable:!0,get:function(){return 2147483647}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return En}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return 2e3}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return nr}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return`cubic-bezier(0.34, 1.56, 0.64, 1)`}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return .18}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return-1e3}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return 1e4}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,`zt`,{enumerable:!0,get:function(){return-9999}});
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import { M as Theme, T as ReactGrabAPI, r as StackFrame, v as Options } from "./copy-content-TZDC2S2A.cjs";
|
|
10
10
|
|
|
11
11
|
//#region src/core/context.d.ts
|
|
12
12
|
declare const getStack: (element: Element) => Promise<StackFrame[] | null>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import { M as Theme, T as ReactGrabAPI, r as StackFrame, v as Options } from "./copy-content-3sDfOP1b.js";
|
|
10
10
|
|
|
11
11
|
//#region src/core/context.d.ts
|
|
12
12
|
declare const getStack: (element: Element) => Promise<StackFrame[] | null>;
|
package/dist/index.cjs
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./core-
|
|
9
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./core-B0lTGjhs.cjs`),t=require(`./freeze-updates-D2h3w4xO.cjs`),n=require(`./open-file-BrBrRUg0.cjs`);let r=null;const i=new Map,a=()=>typeof window>`u`?r:window.__REACT_GRAB__??r??null,o=e=>{if(r=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__),e)for(let[n,r]of i){i.delete(n);try{e.registerPlugin(r)}catch(e){e instanceof t.A||new t.A(n,e)}}},s=e=>{let t=a();if(t){t.registerPlugin(e);return}i.set(e.name,e)},c=e=>{let t=a();if(t){t.unregisterPlugin(e);return}i.delete(e)};typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(window.__REACT_GRAB__?o(window.__REACT_GRAB__):o(e.t()),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:a()}))),exports.DEFAULT_THEME=e.a,exports.FreezeError=t.T,exports.OpenFileError=t.D,exports.PluginSetupError=t.A,exports.ReactGrabError=t.j,exports.commentPlugin=e.i,exports.formatElementInfo=n.r,exports.generateSnippet=e.n,exports.getGlobalApi=a,exports.getStack=n.s,exports.init=e.t,exports.isInstrumentationActive=t.L,exports.openPlugin=e.r,exports.registerPlugin=s,exports.setGlobalApi=o,exports.unregisterPlugin=c;
|
package/dist/index.d.cts
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
import { A as
|
|
10
|
-
import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-
|
|
9
|
+
import { A as SettableOptions, C as Position, D as ReactGrabState, M as Theme, N as ToolbarState, O as Rect, S as PluginHooks, T as ReactGrabAPI, _ as OpenFileActionHooks, a as ActionContext, b as Plugin, c as AgentContext, d as DeepPartial, f as DragRect, g as GrabbedBox, h as ElementSelectedEventDetail, j as SourceInfo, k as SelectedElementPayload, l as ContextMenuAction, m as ElementLabelVariant, n as isInstrumentationActive, o as ActionContextHooks, p as ElementLabelContext, s as ActivationMode, u as ContextMenuActionContext, v as Options, w as PromptModeContext, x as PluginConfig, y as OverlayBounds } from "./copy-content-TZDC2S2A.cjs";
|
|
10
|
+
import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-DDf5jObx.cjs";
|
|
11
|
+
import { i as ReactGrabError, n as OpenFileError, r as PluginSetupError, t as FreezeError } from "./errors-CTlIFDQs.cjs";
|
|
11
12
|
|
|
12
13
|
//#region src/core/plugins/comment.d.ts
|
|
13
14
|
declare const commentPlugin: Plugin;
|
|
@@ -15,6 +16,12 @@ declare const commentPlugin: Plugin;
|
|
|
15
16
|
//#region src/core/plugins/open.d.ts
|
|
16
17
|
declare const openPlugin: Plugin;
|
|
17
18
|
//#endregion
|
|
19
|
+
//#region src/global-api.d.ts
|
|
20
|
+
declare const getGlobalApi: () => ReactGrabAPI | null;
|
|
21
|
+
declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
|
|
22
|
+
declare const registerPlugin: (plugin: Plugin) => void;
|
|
23
|
+
declare const unregisterPlugin: (name: string) => void;
|
|
24
|
+
//#endregion
|
|
18
25
|
//#region src/index.d.ts
|
|
19
26
|
declare global {
|
|
20
27
|
interface Window {
|
|
@@ -22,9 +29,5 @@ declare global {
|
|
|
22
29
|
__REACT_GRAB_DISABLED__?: boolean;
|
|
23
30
|
}
|
|
24
31
|
}
|
|
25
|
-
declare const getGlobalApi: () => ReactGrabAPI | null;
|
|
26
|
-
declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
|
|
27
|
-
declare const registerPlugin: (plugin: Plugin) => void;
|
|
28
|
-
declare const unregisterPlugin: (name: string) => void;
|
|
29
32
|
//#endregion
|
|
30
|
-
export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type ElementSelectedEventDetail, type GrabbedBox, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, type Position, type PromptModeContext, type ReactGrabAPI, type ReactGrabState, type Rect, type SelectedElementPayload, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };
|
|
33
|
+
export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type ElementSelectedEventDetail, FreezeError, type GrabbedBox, type OpenFileActionHooks, OpenFileError, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, PluginSetupError, type Position, type PromptModeContext, type ReactGrabAPI, ReactGrabError, type ReactGrabState, type Rect, type SelectedElementPayload, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
import { A as
|
|
10
|
-
import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-
|
|
9
|
+
import { A as SettableOptions, C as Position, D as ReactGrabState, M as Theme, N as ToolbarState, O as Rect, S as PluginHooks, T as ReactGrabAPI, _ as OpenFileActionHooks, a as ActionContext, b as Plugin, c as AgentContext, d as DeepPartial, f as DragRect, g as GrabbedBox, h as ElementSelectedEventDetail, j as SourceInfo, k as SelectedElementPayload, l as ContextMenuAction, m as ElementLabelVariant, n as isInstrumentationActive, o as ActionContextHooks, p as ElementLabelContext, s as ActivationMode, u as ContextMenuActionContext, v as Options, w as PromptModeContext, x as PluginConfig, y as OverlayBounds } from "./copy-content-3sDfOP1b.js";
|
|
10
|
+
import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-DWvC_uKW.js";
|
|
11
|
+
import { i as ReactGrabError, n as OpenFileError, r as PluginSetupError, t as FreezeError } from "./errors-BEgowzRA.js";
|
|
11
12
|
|
|
12
13
|
//#region src/core/plugins/comment.d.ts
|
|
13
14
|
declare const commentPlugin: Plugin;
|
|
@@ -15,6 +16,12 @@ declare const commentPlugin: Plugin;
|
|
|
15
16
|
//#region src/core/plugins/open.d.ts
|
|
16
17
|
declare const openPlugin: Plugin;
|
|
17
18
|
//#endregion
|
|
19
|
+
//#region src/global-api.d.ts
|
|
20
|
+
declare const getGlobalApi: () => ReactGrabAPI | null;
|
|
21
|
+
declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
|
|
22
|
+
declare const registerPlugin: (plugin: Plugin) => void;
|
|
23
|
+
declare const unregisterPlugin: (name: string) => void;
|
|
24
|
+
//#endregion
|
|
18
25
|
//#region src/index.d.ts
|
|
19
26
|
declare global {
|
|
20
27
|
interface Window {
|
|
@@ -22,9 +29,5 @@ declare global {
|
|
|
22
29
|
__REACT_GRAB_DISABLED__?: boolean;
|
|
23
30
|
}
|
|
24
31
|
}
|
|
25
|
-
declare const getGlobalApi: () => ReactGrabAPI | null;
|
|
26
|
-
declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
|
|
27
|
-
declare const registerPlugin: (plugin: Plugin) => void;
|
|
28
|
-
declare const unregisterPlugin: (name: string) => void;
|
|
29
32
|
//#endregion
|
|
30
|
-
export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type ElementSelectedEventDetail, type GrabbedBox, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, type Position, type PromptModeContext, type ReactGrabAPI, type ReactGrabState, type Rect, type SelectedElementPayload, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };
|
|
33
|
+
export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type ElementSelectedEventDetail, FreezeError, type GrabbedBox, type OpenFileActionHooks, OpenFileError, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, PluginSetupError, type Position, type PromptModeContext, type ReactGrabAPI, ReactGrabError, type ReactGrabState, type Rect, type SelectedElementPayload, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };
|