react-grab 0.1.50-dev.65db899 → 0.1.50-dev.f350003
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{copy-content-CcSwO8vJ.d.ts → copy-content-BwBAqbRh.d.cts} +1 -88
- package/dist/{copy-content-Dxdqj7pl.d.cts → copy-content-lkRiqdFh.d.ts} +1 -88
- 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-Cc1el00a.js +11 -0
- package/dist/core-Ds3sjKE1.cjs +11 -0
- package/dist/execute-context-menu-action-Dzjyult6.cjs +9 -0
- package/dist/execute-context-menu-action-Ez2AKvZb.js +9 -0
- package/dist/{freeze-updates-giOP_Nph.cjs → freeze-updates-BOaH41eE.cjs} +1 -1
- package/dist/freeze-updates-K6zUt3iB.js +43 -0
- package/dist/{index-Cd-ADR9Q.d.ts → index-BX45N3Oq.d.ts} +1 -1
- package/dist/{index-DdYffA2X.d.cts → index-CvAuGVjl.d.cts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +17 -20
- package/dist/index.js +1 -1
- package/dist/open-file-BA-IcI4n.js +29 -0
- package/dist/open-file-DR73qcD1.cjs +20 -0
- package/dist/primitives.cjs +2 -2
- package/dist/primitives.d.cts +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/primitives.js +2 -2
- package/dist/renderer-2q73qKK6.js +9 -0
- package/dist/renderer-BdvHhkYY.cjs +9 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/dist/core-CLv44ij4.js +0 -14
- package/dist/core-DMQiEALv.cjs +0 -14
- package/dist/freeze-updates-0VsHStYd.js +0 -43
- package/dist/is-type-to-edit-key-bBZ6E0Hm.js +0 -9
- package/dist/is-type-to-edit-key-jm_sNrrD.cjs +0 -9
- package/dist/open-file-63p5-ajX.js +0 -29
- package/dist/open-file-BavF8qWS.cjs +0 -20
- package/dist/renderer-DVnVdlCe.js +0 -9
- package/dist/renderer-DvalxS2H.cjs +0 -9
|
@@ -0,0 +1,11 @@
|
|
|
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(`./execute-context-menu-action-Dzjyult6.cjs`),t=require(`./freeze-updates-BOaH41eE.cjs`),n=require(`./open-file-DR73qcD1.cjs`);var r=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
10
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:"Geist", ui-sans-serif, system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:4px;--font-weight-medium:500;--radius-sm:4px;--ease-out:cubic-bezier(0, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--ease-drawer:cubic-bezier(.32, .72, 0, 1);--ease-spring:cubic-bezier(.34, 1.56, .64, 1)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.a11y-hitbox{position:relative}.a11y-hitbox:before{content:"";pointer-events:auto;width:100%;min-width:24px;height:100%;min-height:24px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.top-0{top:calc(var(--spacing) * 0)}.top-full{top:100%}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.-m-0\\.5{margin:calc(var(--spacing) * -.5)}.m-0{margin:calc(var(--spacing) * 0)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-my-1\\.5{margin-block:calc(var(--spacing) * -1.5)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2\\.5{margin-right:calc(var(--spacing) * 2.5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2\\.5{margin-left:calc(var(--spacing) * 2.5)}.ml-4{margin-left:calc(var(--spacing) * 4)}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.96)}.press-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}.press-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.97)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[var\\(--rg-border-button\\)\\]{border-color:var(--rg-border-button)}.border-t-\\[var\\(--rg-border-subtle\\)\\]{border-top-color:var(--rg-border-subtle)}.bg-\\[var\\(--rg-error-bg\\)\\]{background-color:var(--rg-error-bg)}.bg-\\[var\\(--rg-panel-bg\\)\\]{background-color:var(--rg-panel-bg)}.bg-\\[var\\(--rg-submit-bg\\)\\]{background-color:var(--rg-submit-bg)}.bg-\\[var\\(--rg-surface-hover\\)\\]{background-color:var(--rg-surface-hover)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing) * 0)}.px-0\\.25{padding-inline:calc(var(--spacing) * .25)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-\\[3px\\]{padding-inline:3px}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-0\\.25{padding-block:calc(var(--spacing) * .25)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.leading-3\\.5{--tw-leading:calc(var(--spacing) * 3.5);line-height:calc(var(--spacing) * 3.5)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[var\\(--rg-error-text\\)\\]{color:var(--rg-error-text)}.text-\\[var\\(--rg-submit-fg\\)\\]{color:var(--rg-submit-fg)}.text-\\[var\\(--rg-text-primary\\)\\]{color:var(--rg-text-primary)}.text-\\[var\\(--rg-text-primary-85\\)\\]{color:var(--rg-text-primary-85)}.text-\\[var\\(--rg-text-secondary\\)\\]{color:var(--rg-text-secondary)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.\\[box-shadow\\:var\\(--rg-shadow\\)\\]{box-shadow:var(--rg-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\\[filter\\:var\\(--rg-drop-shadow\\)\\]{filter:var(--rg-drop-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\]{transition-property:grid-template-columns;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[padding\\,border-radius\\,transform\\]{transition-property:padding,border-radius,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\,border-radius\\]{transition-property:top,left,width,height,opacity,border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,color\\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-\\[80ms\\]{transition-delay:80ms}.duration-60{--tw-duration:60ms;transition-duration:60ms}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-140{--tw-duration:.14s;transition-duration:.14s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-180{--tw-duration:.18s;transition-duration:.18s}.duration-220{--tw-duration:.22s;transition-duration:.22s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-drawer{--tw-ease:var(--ease-drawer);transition-timing-function:var(--ease-drawer)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.ease-spring{--tw-ease:var(--ease-spring);transition-timing-function:var(--ease-spring)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.will-change-transform{will-change:transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.group-hover\\:text-\\[var\\(--rg-text-primary\\)\\]:is(:where(.group):hover *){color:var(--rg-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:bg-\\[var\\(--rg-error-bg-hover\\)\\]:hover{background-color:var(--rg-error-bg-hover)}.hover\\:bg-\\[var\\(--rg-surface-active\\)\\]:hover{background-color:var(--rg-surface-active)}.hover\\:bg-\\[var\\(--rg-surface-hover\\)\\]:hover{background-color:var(--rg-surface-hover)}.hover\\:text-\\[var\\(--rg-text-primary\\)\\]:hover{color:var(--rg-text-primary)}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}:host,[data-rg-theme=dark]{--rg-panel-bg:#161616;--rg-text-primary:#fff;--rg-text-secondary:#a7a7a7;--rg-surface-hover:#ffffff1a;--rg-surface-active:#ffffff26;--rg-border-subtle:#ffffff1a;--rg-border-button:#fff3;--rg-submit-bg:#fff;--rg-submit-fg:#161616;--rg-error-text:#f87171;--rg-error-bg:#3d1515;--rg-error-bg-hover:#4d1f1f;--rg-shadow:0 2px 8px #00000014;--rg-drop-shadow:drop-shadow(0px 2px 8px #00000014);--rg-shimmer-from:#a1a1aa;--rg-shimmer-to:#d4d4d8;--rg-text-primary-85:#ffffffd9}@media (prefers-color-scheme:dark){:host:not([data-rg-theme]){--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}}:host([data-rg-theme=light]),[data-rg-theme=light]{--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}@media (prefers-reduced-motion:reduce){:host,:host *,:host :before,:host :after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}:host :focus{box-shadow:none!important;outline:none!important}@keyframes shake{0%,to{translate:0}15%,45%{translate:calc(-3px * var(--rg-shake-x,1)) calc(-3px * var(--rg-shake-y,0))}30%,60%{translate:calc(3px * var(--rg-shake-x,1)) calc(3px * var(--rg-shake-y,0))}75%{translate:calc(-2px * var(--rg-shake-x,1)) calc(-2px * var(--rg-shake-y,0))}90%{translate:calc(2px * var(--rg-shake-x,1)) calc(2px * var(--rg-shake-y,0))}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{background:linear-gradient(90deg, var(--rg-shimmer-from) 0%, var(--rg-shimmer-to) 25%, var(--rg-shimmer-from) 50%, var(--rg-shimmer-to) 75%, var(--rg-shimmer-from) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake,.animate-shake-vertical{will-change:translate;animation:.3s ease-out shake}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.animate-tooltip-fade-in{will-change:transform, opacity;animation:.1s ease-out tooltip-fade-in}.animate-shake-vertical{--rg-shake-x:0;--rg-shake-y:1}@supports (-webkit-touch-callout:none){textarea[data-react-grab-input]{font-size:16px}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}`;function i(e){return typeof e==`object`&&!!e&&(Object.getPrototypeOf(e)===Object.prototype||Array.isArray(e))}function a(e,t,n,r){!r&&e[t]===n||(n===void 0?delete e[t]:e[t]=n)}function o(e,t,n){let r=Object.keys(t);for(let i=0;i<r.length;i+=1){let o=r[i];a(e,o,t[o],n)}}function s(e,t){if(typeof t==`function`&&(t=t(e)),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&a(e,n,r)}a(e,`length`,r)}else o(e,t)}function c(e,t,n=[]){let r,s=e;if(t.length>1){r=t.shift();let i=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)c(e,[r[i]].concat(t),n);return}else if(a&&i===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&c(e,[i].concat(t),n);return}else if(a&&i===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)c(e,[r].concat(t),n);return}else if(t.length>1){c(e[r],t,[r].concat(n));return}s=e[r],n=[r].concat(n)}let l=t[0];typeof l==`function`&&(l=l(s,n),l===s)||r===void 0&&l==null||(r===void 0||i(s)&&i(l)&&!Array.isArray(l)?o(s,l):a(e,r,l))}function l(e){let t=Array.isArray(e);function n(...n){t&&n.length===1?s(e,n[0]):c(e,n)}return[e,n]}function u(e){return t=>(i(t)&&e(t),t)}const d=e=>({x:e.x+e.width/2,y:e.y+e.height/2}),f=e=>{let t=0,n=e.previousElementSibling;for(;n;)t+=1,n=n.previousElementSibling;return t},p=new WeakMap,m=e=>{if(e.anchorElement.isConnected)return e.anchorElement;let n=e.anchorElement.tagName,r=t.ot(e.anchorParentFiber);if(t.it(r)){let i=r.stateNode;if(!t.pt(i)||!i.isConnected)return null;let a=i.children[e.anchorIndexInParent];return a&&a.tagName===n?a:null}for(let e of t.et(r)){let r=e.stateNode;if(t.pt(r)&&r.isConnected&&r.tagName===n)return r}return null},h=(e,t)=>{let n=e;for(let e of t){let t=(e.isShadowChild?n.shadowRoot?.children:n.children)?.[e.childIndex];if(!t)return null;n=t}return n},g=e=>{let n=[],r=e,i=t.rt(r);for(;r&&!i;){let e=r.parentElement;if(e)n.unshift({childIndex:f(r),isShadowChild:!1}),r=e;else{let e=r.getRootNode();if(!t.J(e))break;n.unshift({childIndex:f(r),isShadowChild:!0}),r=e.host}i=t.rt(r)}let a=i?.return;return!r||!a?null:{anchorElement:r,anchorParentFiber:a,anchorIndexInParent:f(r),domPath:n,targetTagName:e.tagName}},_=(e,t)=>e.anchorElement.isConnected&&e.anchorIndexInParent===f(e.anchorElement)&&h(e.anchorElement,e.domPath)===t,v=e=>{if(!e.isConnected)return;let t=p.get(e);if(t&&_(t,e))return;let n=g(e);n&&p.set(e,n)},y=e=>{if(e.isConnected)return e;let t=p.get(e);if(!t)return null;let n=m(t);if(!n)return null;let r=h(n,t.domPath);return r&&r.isConnected&&r.tagName===t.targetTagName?r:null},b=e=>{let t=y(e)??e;return v(t),t},x=e=>{for(let t=0;t<e.frozenElements.length;t+=1)e.frozenElements[t]=b(e.frozenElements[t]);e.frozenElement=e.frozenElement&&b(e.frozenElement),e.detectedElement=e.detectedElement&&b(e.detectedElement),e.contextMenuElement=e.contextMenuElement&&b(e.contextMenuElement);for(let t of e.labelInstances)if(t.element&&=b(t.element),t.elements)for(let e=0;e<t.elements.length;e+=1)t.elements[e]=b(t.elements[e]);for(let t of e.grabbedBoxes)t.element&&=b(t.element)},S=e=>({selectionInteractionLockDepth:0,wasActivatedByToggle:!1,pendingCommentMode:!1,keyHoldDuration:e.keyHoldDuration,dragStart:{x:t.Ft,y:t.Ft},copyStart:{x:t.Ft,y:t.Ft},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:``,grabbedBoxes:[],labelInstances:[],isTouchMode:!1,activationTimestamp:null,previouslyFocusedElement:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null}),ee=n=>{let[r,i]=l(S(n)),[a,o]=e.I({x:t.Ft,y:t.Ft}),[s,c]=e.I(0),[f,p]=e.I({state:`idle`}),m=e=>{i(u(t=>{e(t),t.frozenElement=t.frozenElements.length>0?t.frozenElements[0]:null,t.frozenDragRect=null;for(let e of t.frozenElements)v(e)}))},h=()=>{m(e=>{e.frozenElements=[]})},g=e=>{p(t=>t.state===`active`?{...t,phase:e}:t)},_={startHold:e=>{e!==void 0&&i(`keyHoldDuration`,e),p({state:`holding`,startedAt:Date.now()})},releaseHold:()=>{f().state===`holding`&&p({state:`idle`})},activate:()=>{e.O(()=>{p({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1}),i(`activationTimestamp`,Date.now()),i(`previouslyFocusedElement`,document.activeElement)})},deactivate:()=>{e.O(()=>{p({state:`idle`}),i(u(e=>{e.wasActivatedByToggle=!1,e.pendingCommentMode=!1,e.inputText=``,e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null,e.activationTimestamp=null,e.previouslyFocusedElement=null,e.contextMenuPosition=null,e.contextMenuElement=null,e.contextMenuClickOffset=null,e.isTouchMode&&(e.detectedElement=null)}))})},toggle:()=>{r.activationTimestamp===null?(i(`wasActivatedByToggle`,!0),_.activate()):_.deactivate()},freeze:()=>{if(f().state===`active`){let e=r.frozenElement??r.detectedElement;e&&(v(e),i(`frozenElement`,e)),g(`frozen`)}},unfreeze:()=>{f().state===`active`&&e.O(()=>{i(u(e=>{e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null})),g(`hovering`)})},startDrag:(t,n)=>{f().state===`active`&&e.O(()=>{n||h(),i(`dragStart`,{x:t.x+window.scrollX,y:t.y+window.scrollY}),g(`dragging-select`)})},startDragReposition:()=>{let e=f();e.state===`active`&&e.phase===`dragging-select`&&g(`dragging-reposition`)},stopDragReposition:()=>{let e=f();e.state===`active`&&e.phase===`dragging-reposition`&&g(`dragging-select`)},shiftDragStart:e=>{let t=f();t.state===`active`&&t.phase===`dragging-reposition`&&i(`dragStart`,t=>({x:t.x+e.x,y:t.y+e.y}))},endDrag:()=>{let n=f();n.state===`active`&&(n.phase===`dragging-select`||n.phase===`dragging-reposition`)&&e.O(()=>{i(`dragStart`,{x:t.Ft,y:t.Ft}),g(`justDragged`)})},cancelDrag:()=>{let n=f();n.state===`active`&&(n.phase===`dragging-select`||n.phase===`dragging-reposition`)&&e.O(()=>{i(`dragStart`,{x:t.Ft,y:t.Ft}),g(`hovering`)})},finishJustDragged:()=>{let e=f();e.state===`active`&&e.phase===`justDragged`&&g(`hovering`)},startCopy:()=>{let e=f().state===`active`;p({state:`copying`,startedAt:Date.now(),wasActive:e})},completeCopy:()=>{let e=f(),t=e.state===`copying`?e.wasActive:!1;p({state:`justCopied`,copiedAt:Date.now(),wasActive:t})},finishJustCopied:()=>{let t=f();t.state===`justCopied`&&(t.wasActive&&!r.wasActivatedByToggle?e.O(()=>{h(),p({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1})}):_.deactivate())},enterPromptMode:(n,r)=>{let{x:a}=d(t.Y(r));v(r),e.O(()=>{i(`copyStart`,n),i(`copyOffsetFromCenterX`,n.x-a),o(n),i(`frozenElement`,r),i(`wasActivatedByToggle`,!0),f().state===`active`?p(e=>e.state===`active`?{...e,isPromptMode:!0,phase:`frozen`}:e):(p({state:`active`,phase:`frozen`,isPromptMode:!0,isPendingDismiss:!1}),i(`activationTimestamp`,Date.now()),i(`previouslyFocusedElement`,document.activeElement))})},exitPromptMode:()=>{p(e=>e.state===`active`?{...e,isPromptMode:!1,isPendingDismiss:!1}:e)},setInputText:e=>{i(`inputText`,e)},clearInputText:()=>{i(`inputText`,``)},setPendingDismiss:e=>{p(t=>t.state===`active`?{...t,isPendingDismiss:e}:t)},setPointer:e=>{o(t=>t.x===e.x&&t.y===e.y?t:e)},setDetectedElement:e=>{e&&v(e),i(`detectedElement`,e)},setFrozenElement:e=>{m(t=>{t.frozenElements=[e]})},setFrozenElements:e=>{m(t=>{t.frozenElements=e})},toggleFrozenElement:e=>{m(t=>{let n=t.frozenElements.indexOf(e);n>=0?t.frozenElements.splice(n,1):t.frozenElements.push(e)})},addFrozenElements:e=>{m(t=>{for(let n of e)t.frozenElements.includes(n)||t.frozenElements.push(n)})},setFrozenDragRect:e=>{i(`frozenDragRect`,e)},relinkLiveElements:()=>{i(u(x))},setCopyStart:(e,n)=>{let{x:r}=d(t.Y(n));i(`copyStart`,e),i(`copyOffsetFromCenterX`,e.x-r)},setLastGrabbed:e=>{i(`lastGrabbedElement`,e)},setWasActivatedByToggle:e=>{i(`wasActivatedByToggle`,e)},setPendingCommentMode:e=>{i(`pendingCommentMode`,e)},setTouchMode:e=>{i(`isTouchMode`,e)},incrementSelectionInteractionLockDepth:()=>{i(`selectionInteractionLockDepth`,e=>e+1)},decrementSelectionInteractionLockDepth:()=>{i(`selectionInteractionLockDepth`,e=>Math.max(0,e-1))},setSelectionSource:(t,n)=>{e.O(()=>{i(`selectionFilePath`,t),i(`selectionLineNumber`,n)})},incrementViewportVersion:()=>{c(e=>e+1)},addGrabbedBox:e=>{e.element&&v(e.element),i(`grabbedBoxes`,t=>[...t,e])},removeGrabbedBox:e=>{i(`grabbedBoxes`,t=>t.filter(t=>t.id!==e))},clearGrabbedBoxes:()=>{i(`grabbedBoxes`,[])},addLabelInstance:e=>{e.element&&v(e.element);for(let t of e.elements??[])v(t);i(`labelInstances`,t=>[...t,e])},updateLabelInstance:(t,n,a)=>{let o=r.labelInstances.findIndex(e=>e.id===t);o!==-1&&e.O(()=>{i(`labelInstances`,o,`status`,n),a===void 0?n!==`error`&&i(`labelInstances`,o,`errorMessage`,void 0):i(`labelInstances`,o,`errorMessage`,a)})},removeLabelInstance:e=>{i(`labelInstances`,t=>t.filter(t=>t.id!==e))},clearLabelInstances:()=>{i(`labelInstances`,[])},showContextMenu:(n,r)=>{let{x:a,y:o}=d(t.Y(r));v(r),e.O(()=>{i(`contextMenuPosition`,n),i(`contextMenuElement`,r),i(`contextMenuClickOffset`,{x:n.x-a,y:n.y-o})})},hideContextMenu:()=>{e.O(()=>{i(`contextMenuPosition`,null),i(`contextMenuElement`,null),i(`contextMenuClickOffset`,null)})},updateContextMenuPosition:()=>{let n=r.contextMenuElement,a=r.contextMenuClickOffset;if(!n||!a||!e.f(n))return;let{x:o,y:s}=d(t.Y(n));i(`contextMenuPosition`,{x:o+a.x,y:s+a.y})}};return{store:r,actions:_,pointer:a,viewportVersion:s,current:f}},te=`data-react-grab`,C=e=>{if(!document.body)return;let t=document.querySelectorAll(`[${te}]`);for(let n of t)n!==e&&n.parentNode!==e&&(n.shadowRoot||n.remove());document.body.appendChild(e)},ne=e=>{if(document.body)return C(e),()=>{};let t=()=>{document.removeEventListener(`DOMContentLoaded`,t),C(e)};return document.addEventListener(`DOMContentLoaded`,t,{once:!0}),()=>document.removeEventListener(`DOMContentLoaded`,t)},w=e=>{let n=window.setTimeout(()=>{C(e)},t.Nt),r=new MutationObserver(()=>{e.parentNode!==document.body&&C(e)});return r.observe(document.documentElement,{childList:!0}),()=>{window.clearTimeout(n),r.disconnect()}},re=e=>{let n=document.querySelectorAll(`[${te}]`);for(let e of n){let t=e.shadowRoot?.querySelector(`[${te}]`);if(t instanceof HTMLDivElement)return{root:t,host:e,cancelPendingAttachment:w(e)};e.remove()}let r=document.createElement(`div`);r.setAttribute(te,`true`),t.M(r),r.style.zIndex=String(t.an),r.style.position=`fixed`,r.style.inset=`0`,r.style.pointerEvents=`none`,r.style.contain=`strict`;let i=r.attachShadow({mode:`open`}),a=document.createElement(`style`),o=t.N();o&&(a.nonce=o),a.textContent=`@import url("https://fonts.googleapis.com/css2?family=Geist:wght@500&display=swap");\n${e??``}`,i.appendChild(a);let s=document.createElement(`div`);s.setAttribute(te,`true`),i.appendChild(s);let c=ne(r),l=w(r);return{root:s,host:r,cancelPendingAttachment:()=>{c(),l()}}},ie=t=>{let[r,i]=e.I(void 0),a=0;return e.j(e.B(t,e=>{let t=++a;if(!e){i(void 0);return}let r=n.i(e)??void 0;i(r),n.a(e).then(e=>{a===t&&i(e??r)}).catch(()=>{a===t&&i(r)})})),[r,i]},ae=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,oe=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),T=(e,t,n,r=1)=>{let i=oe(e),a=oe(t),o=oe(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${oe(r*255)}`},se=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}},ce=e=>{let t=e.match(ae);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 T(Number(t[1]),Number(t[2]),Number(t[3]),n)},le=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,ue=e=>{let t=e.match(le);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}`},E=`rgba(0, 0, 0, 0)`,de=`#00000000`,D=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,fe=180/Math.PI,pe=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),me=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*fe:t===`turn`?n*360:n},he=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},ge=e=>{let t=e.match(D);if(!t)return null;let n=pe(t[1],1),r=pe(t[2],.4),i=me(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:pe(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,h=-1.2684380046*d+2.6097574011*f-.3413193965*p,g=-.0041960863*d-.7034186147*f+1.707614701*p;return T(he(m),he(h),he(g),Math.max(0,Math.min(1,a)))};let O=null;const _e=()=>O||(typeof document>`u`?null:(O=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),O)),ve=(e,t)=>{e.clearRect(0,0,1,1),e.fillStyle=t,e.fillRect(0,0,1,1);let n=e.getImageData(0,0,1,1).data;return n[3]===0?de:T(n[0],n[1],n[2],n[3]/255)},ye=e=>{let t=e.trim();if(!t)return null;if(t.toLowerCase()===`transparent`)return de;let n=ue(t);if(n)return n;let r=ge(t);if(r)return r;let i=_e();if(!i)return null;i.fillStyle=E,i.fillStyle=t;let a=i.fillStyle;return typeof a==`string`?a.toLowerCase()===E?t.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?de:null:a.startsWith(`#`)&&a.length===7?a:a.startsWith(`rgb`)?ce(a):ve(i,t):null},be=[`data-theme`,`data-mode`,`data-color-scheme`,`data-bs-theme`,`data-mui-color-scheme`,`data-mantine-color-scheme`],xe=[{attribute:`data-dark`,theme:`dark`},{attribute:`data-light`,theme:`light`}],Se=(e,t,n)=>{let[r,i,a]=[e,t,n].map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a},Ce=(e,t=0)=>{let n=ye(e),r=n?se(n):null;return!r||r.alpha<=t?null:Se(r.red,r.green,r.blue)},we=e=>{let t=Ce(e);return t===null?null:t<.18?`dark`:`light`},k=e=>we(getComputedStyle(e).backgroundColor),Te=()=>{let e=Ce(getComputedStyle(document.documentElement).color,t.Lt);return e===null?null:e>.6?`dark`:null},Ee=()=>{let e=document.createElement(`div`);e.style.cssText=`position:fixed;width:0;height:0;background-color:Canvas!important`,document.documentElement.appendChild(e);let t=we(getComputedStyle(e).backgroundColor);return e.remove(),t},A=e=>{let t=e.toLowerCase();return t===`dark`?`dark`:t===`light`?`light`:null},De=e=>{let t=e.style.colorScheme||getComputedStyle(e).colorScheme;return t?t.trim().toLowerCase().split(/\s+/):[]},j=e=>{let t=De(e),n=t.includes(`dark`);return n===t.includes(`light`)?null:n?`dark`:`light`},Oe=e=>{if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of be){let n=e.getAttribute(t);if(!n)continue;let r=A(n);if(r)return r}for(let{attribute:t,theme:n}of xe)if(e.hasAttribute(t))return n;return null},M=(e,t)=>{for(let n of e){if(!n)continue;let e=t(n);if(e)return e}return null},ke=()=>{let e=[document.documentElement,document.body],t=[document.body,document.documentElement];return M(e,Oe)??M(e,j)??M(t,k)??Te()??Ee()??`light`},Ae=e=>e===`dark`?`light`:`dark`,je=()=>{let e=[];for(let t of[document.documentElement,document.body]){if(!t)continue;e.push(t.className);for(let n of be)e.push(t.getAttribute(n)??``);for(let{attribute:n}of xe)e.push(t.hasAttribute(n)?`1`:``);let n=t.style;e.push(n.colorScheme,n.backgroundColor,n.color);for(let t=0;t<n.length;t++){let r=n[t];r.startsWith(`--`)&&e.push(`${r}:${n.getPropertyValue(r)}`)}}return e.join(`|`)},Me={attributes:!0,attributeFilter:[`class`,`style`,...be,...xe.map(({attribute:e})=>e)]},Ne=(e,n)=>{let r=null,i=null,a=null,o=t=>{if(t===i&&r!==null)return getComputedStyle(document.body??document.documentElement).backgroundColor,r;i=t;let a=Ae(ke());return a!==r&&(r=a,e.setAttribute(`data-rg-theme`,a),n?.(a)),a},s=()=>o(je()),c=()=>{a!==null&&(t.C(a),a=null)},l=()=>{a===null&&(a=t.w(()=>{a=null,s()}))},u=s(),d=()=>{let e=je();if(e===i){l();return}c(),o(e)},f=new MutationObserver(d);f.observe(document.documentElement,Me);let p=null;document.body?f.observe(document.body,Me):(p=new MutationObserver((e,t)=>{document.body&&(t.disconnect(),p=null,f.observe(document.body,Me),d())}),p.observe(document.documentElement,{childList:!0}));let m=()=>{i=null,l()},h=window.matchMedia(`(prefers-color-scheme: dark)`);return h.addEventListener(`change`,m),{theme:u,cleanup:()=>{p?.disconnect(),f.disconnect(),h.removeEventListener(`change`,m),c()}}},N=()=>{},P=()=>({activate:N,deactivate:N,toggle:N,comment:N,isActive:()=>!1,isEnabled:()=>!1,setEnabled:N,getToolbarState:()=>null,setToolbarState:N,onToolbarStateChange:()=>N,reset:N,dispose:N,copyElement:()=>Promise.resolve(!1),getSource:()=>Promise.resolve(null),getStackContext:()=>Promise.resolve(``),getState:()=>({isActive:!1,isDragging:!1,isCopying:!1,isPromptMode:!1,isSelectionBoxVisible:!1,isDragBoxVisible:!1,targetElement:null,dragBounds:null,grabbedBoxes:[],labelInstances:[],selectionFilePath:null,toolbarState:null}),setOptions:N,registerPlugin:N,unregisterPlugin:N,getPlugins:()=>[],getDisplayName:()=>null}),Pe=()=>{let e=new AbortController;return{signal:e.signal,abort:()=>e.abort(),addWindowListener:(t,n,r={})=>{window.addEventListener(t,n,{...r,signal:e.signal})},addDocumentListener:(t,n,r={})=>{document.addEventListener(t,n,{...r,signal:e.signal})}}},Fe=(e,t=`Unknown error`)=>e instanceof Error&&e.message?e.message:t,F=e=>e instanceof Error?e:Error(String(e)),Ie=Symbol(`aborted-promise-result`),Le=async(e,t)=>{if(!t)return e;if(t.aborted)return Ie;let n=()=>{},r=new Promise(e=>{n=()=>e(Ie)});t.addEventListener(`abort`,n,{once:!0});try{return await Promise.race([e,r])}finally{t.removeEventListener(`abort`,n)}},Re={status:`cancelled`},ze=e=>({functionName:e.functionName,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,isServer:e.isServer,isSymbolicated:e.isSymbolicated}),Be=async(e,r)=>{let i=await n.l(e,{maxLines:r});return{tagName:t.P(e),componentName:i.componentName??i.source?.componentName??void 0,content:`[${i.referenceContext}]`,source:i.source,stackContext:i.stackContext,frames:i.stack.map(ze)}},Ve=async(e,t)=>{let n=[...new Set(e)],r=await Promise.all(n.map(e=>Be(e,t)));return r.length>0?{content:r.map(e=>e.content).join(`
|
|
11
|
+
`),entries:r}:null},He=(e,t,n)=>{if(e?.entries)return t===e.content?e.entries:e.entries.length===1?[{...e.entries[0],content:t,commentText:n}]:e.entries.map(e=>({...e,commentText:n}))},Ue=async(e,t,r,i)=>{if(e.signal?.aborted||await Le(t.onBeforeCopy(r),e.signal)===Ie)return Re;let a=!1,o=!1,s=``;try{let c=await Le(e.getContent?Promise.resolve(e.getContent(r)).then(e=>({content:e})):Ve(r,e.maxContextLines),e.signal);if(c===Ie)return Re;let l=c?.content;if(l?.trim()){let u=await Le(t.transformCopyContent(l,r),e.signal);if(u===Ie)return Re;s=i?`${i}\n${u}`:u,s.trim()&&(o=!0,a=n.n(s,{componentName:e.componentName,entries:He(c,s,i)}))}}catch(n){if(!o&&e.signal?.aborted)return Re;t.onCopyError(F(n))}return!o&&e.signal?.aborted?Re:(a&&t.onCopySuccess(r,s),t.onAfterCopy(r,a),{status:a?`succeeded`:`failed`})},We=e=>{let n=[],r=e;for(;r;){n.unshift(r);let e=r.getRootNode();if(t.J(e)){r=e.host;continue}if(!t.j(e))break;r=t.ut(e.defaultView)}return n},I=(e,t)=>{if(e===t)return 0;let n=We(e),r=We(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=n[e],i=r[e];if(t===i)continue;let a=t.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0}return n.length-r.length},L=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return Math.max(0,i-n)*Math.max(0,a-r)},R=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,z=e=>e.sort(I),Ge=t=>{if(t.width<=0||t.height<=0)return[];let n=window.innerWidth,r=window.innerHeight,i=t.x,a=t.y,o=t.x+t.width,s=t.y+t.height,c=i+t.width/2,l=a+t.height/2,u=e.c(Math.ceil(t.width/32),3,20),d=e.c(Math.ceil(t.height/32),3,20),f=u*d,p=f>100?Math.sqrt(100/f):1,m=e.c(Math.floor(u*p),3,20),h=e.c(Math.floor(d*p),3,20),g=new Set,_=[],v=(t,i)=>{let a=e.c(Math.round(t),0,n-1),o=e.c(Math.round(i),0,r-1),s=`${a}:${o}`;g.has(s)||(g.add(s),_.push({x:a,y:o}))};v(i+1,a+1),v(o-1,a+1),v(i+1,s-1),v(o-1,s-1),v(c,a+1),v(c,s-1),v(i+1,l),v(o-1,l),v(c,l);for(let e=0;e<m;e+=1){let n=i+(e+.5)/m*t.width;for(let e=0;e<h;e+=1)v(n,a+(e+.5)/h*t.height)}return _},Ke=(e,n,r)=>{let i={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height},a=new Set,o=Ge(e);t.g();try{for(let e of o){let n=t._(e.x,e.y);for(let e of n)a.add(e)}}finally{t.h()}let s=[];for(let e of a){if(t.dt(e)&&t.S(e)||!r&&t.x(e)||!t.O(e)||!n(e))continue;let a=t.Y(e);if(a.width<=0||a.height<=0)continue;let o={left:a.x,top:a.y,right:a.x+a.width,bottom:a.y+a.height};r?L(i,o)/(a.width*a.height)>=.75&&s.push(e):R(o,i)&&s.push(e)}return z(s)},qe=e=>{let n=new Set(e),r=[];for(let i=e.length-1;i>=0;--i){let a=e[i];if(!n.has(a))continue;let o=a,s=t.A(o),c=!1;for(;s;){let e=o.getRootNode();if(n.has(s)&&t.J(e)&&e.host===s)n.delete(s);else if(n.has(s)){c=!0;break}o=s,s=t.A(o)}c||r.push(a)}return r.reverse()},Je=(e,t,n=!0)=>qe(Ke(e,t,n)),Ye=(t,n)=>t.width<=0?0:e.c((n.x-t.x)/t.width,0,1),Xe=()=>{t.X(),t.u()},Ze=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}),Qe=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),$e=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.x,y:e.y}),et=(e,n,r)=>{let i=(e,t,n,r)=>{let i=[],a=e,o=0;for(;a&&i.length<n&&o<100;)r(a)&&i.push(a),a=t(a),o+=1;return i},a=i(t.A(e),t.A,6,n);a.reverse();let o=a.map((e,t)=>({element:e,depth:t,isLast:!0})),s=a.length,c=i(e.previousElementSibling,e=>e.previousElementSibling,7,r),l=i(e.nextElementSibling,e=>e.nextElementSibling,7,r),u=Math.min(c.length,Math.max(3,7-l.length)),d=Math.min(l.length,7-u),f=[...c.slice(0,u).reverse(),e,...l.slice(0,d)],p=i(e.firstElementChild,e=>e.nextElementSibling,6,n),m=f.length-1,h=p.length-1;return f.forEach((t,n)=>{o.push({element:t,depth:s,isLast:n===m}),t===e&&p.forEach((e,t)=>{o.push({element:e,depth:s+1,isLast:t===h})})}),o},tt=e=>e.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName!==`svg`,nt=e=>{let t=e.getBoundingClientRect();return t.width>=16||t.height>=16},rt=(e,t)=>t(e)&&!tt(e)&&nt(e),it=e=>e===`edit`?t.yt:e,at=new Set([`c`,`C`,`с`,`С`,`ȼ`,`Ȼ`,`ↄ`,`Ↄ`,`ᴄ`,`ᶜ`,`ⱼ`,`ⅽ`,`Ⅽ`,`ç`,`Ç`,`ć`,`Ć`,`č`,`Č`,`ĉ`,`Ĉ`,`ċ`,`Ċ`]),ot=(e,t)=>t===`KeyC`?!0:!e||e.length!==1?!1:at.has(e),st=(e,t)=>{if(!e||!t)return!1;let n=e.toLowerCase();return t===`Space`?n===`space`||n===` `:t.startsWith(`Key`)?t.slice(3).toLowerCase()===n:t.startsWith(`Digit`)?t.slice(5)===n:!1},B={meta:`metaKey`,cmd:`metaKey`,command:`metaKey`,win:`metaKey`,windows:`metaKey`,ctrl:`ctrlKey`,control:`ctrlKey`,shift:`shiftKey`,alt:`altKey`,option:`altKey`,opt:`altKey`},ct=e=>{let t=e.split(`+`).map(e=>e.trim().toLowerCase()),n={metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1,key:null};for(let e of t){let t=B[e];t?n[t]=!0:n.key=e}return n},lt=e=>{if(typeof e==`function`)return t=>{try{return e(t)}catch{return!1}};let t=ct(e),n=t.key;return e=>{if(n===null){let n=t.metaKey?e.metaKey||e.key===`Meta`:!0,r=t.ctrlKey?e.ctrlKey||e.key===`Control`:!0,i=t.shiftKey?e.shiftKey||e.key===`Shift`:!0,a=t.altKey?e.altKey||e.key===`Alt`:!0,o=n&&r&&i&&a,s=[t.metaKey,t.ctrlKey,t.shiftKey,t.altKey].filter(Boolean).length,c=[e.metaKey||e.key===`Meta`,e.ctrlKey||e.key===`Control`,e.shiftKey||e.key===`Shift`,e.altKey||e.key===`Alt`].filter(Boolean).length;return o&&c>=s}let r=e.key?.toLowerCase()===n||st(n,e.code),i=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?(t.metaKey?e.metaKey:!0)&&(t.ctrlKey?e.ctrlKey:!0)&&(t.shiftKey?e.shiftKey:!0)&&(t.altKey?e.altKey:!0):!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey;return r&&i}},ut=t=>!t||typeof t==`function`?{metaKey:e.s(),ctrlKey:!e.s(),shiftKey:!1,altKey:!1,key:null}:ct(t),dt=(t,n)=>{if(n.activationKey)return lt(n.activationKey)(t);let r=(e.s()?t.metaKey:t.ctrlKey)&&!t.shiftKey&&!t.altKey;return!!(t.key&&r&&ot(t.key,t.code))},V=(e,n,r)=>{t.l(e instanceof t.B?e:new t.B(n,r,e))},ft=(e,t,r)=>{try{if(r.onOpenFile(e,t))return;n.t(e,t,r.transformOpenFileUrl).catch(n=>{V(n,e,t)})}catch(n){V(n,e,t)}},pt=e=>{if(e.length===0)return{x:0,y:0,width:0,height:0};if(e.length===1)return e[0];let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),i=Math.max(i,a.y+a.height);return{x:t,y:n,width:r-t,height:i-n}},H={enabled:!0,hue:0,selectionBox:{enabled:!0},dragBox:{enabled:!0},grabbedBoxes:{enabled:!0},elementLabel:{enabled:!0},toolbar:{enabled:!0}},mt=(e,t)=>({enabled:t.enabled??e.enabled,hue:t.hue??e.hue,selectionBox:{enabled:t.selectionBox?.enabled??e.selectionBox.enabled},dragBox:{enabled:t.dragBox?.enabled??e.dragBox.enabled},grabbedBoxes:{enabled:t.grabbedBoxes?.enabled??e.grabbedBoxes.enabled},elementLabel:{enabled:t.elementLabel?.enabled??e.elementLabel.enabled},toolbar:{enabled:t.toolbar?.enabled??e.toolbar.enabled}}),ht={activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,activationKey:void 0,getContent:void 0,maxContextLines:3,freezeReactUpdates:!0},gt=(n={})=>{let r=new Map,i=[],a={},o=!1,[s,c]=l({theme:H,options:{...ht,...n},actions:[]}),u=e=>{let t=H,r={...ht,...n},i=[];for(let{config:n}of e)if(n.theme&&(t=mt(t,n.theme)),n.options&&(r={...r,...n.options}),n.actions)for(let e of n.actions)i.push(e);return{theme:t,options:r,actions:i}},d=e=>{c(`theme`,e.theme),c(`options`,{...e.options,...a}),c(`actions`,e.actions)},f=()=>{d(u(i))},p=(e,t)=>{a[e]=t,c(`options`,e,()=>t)},m=[`activationMode`,`keyHoldDuration`,`allowActivationInsideInput`,`activationKey`,`getContent`,`maxContextLines`,`freezeReactUpdates`],h=e=>{if(!o)for(let t of m)e[t]!==void 0&&p(t,e[t])},g=({plugin:e,config:n})=>{try{let r=n.cleanup?.();Promise.resolve(r).catch(n=>{t.l(new t.V(e.name,n))})}catch(n){t.l(new t.V(e.name,n))}},_=(e,n)=>{let r;try{r=e.setup?.(n,w)??{};let t=r.cleanup?.bind(r);return{...r,cleanup:t,theme:e.theme?r.theme?mt(mt(H,e.theme),r.theme):e.theme:r.theme,options:e.options?{...e.options,...r.options}:r.options,actions:e.actions?[...e.actions,...r.actions??[]]:r.actions,hooks:e.hooks?{...e.hooks,...r.hooks}:r.hooks}}catch(n){throw r&&g({plugin:e,config:r}),new t.U(e.name,n)}},v=(e,n)=>{if(o)return;let a={plugin:e,config:_(e,n)},s=r.get(e.name),c=new Map(r);c.set(e.name,a);let l;try{l=u(c.values())}catch(n){throw g(a),new t.U(e.name,n)}r.set(e.name,a),i=Array.from(r.values()),d(l),s&&g(s)},y=e=>{if(o)return;let t=r.get(e);t&&(r.delete(e),i=Array.from(r.values()),g(t),f())},b=()=>{if(o)return;o=!0;let e=i;r.clear(),i=[],e.forEach(g),f()},x=()=>i.map(({plugin:e})=>e.name),S=(e,...n)=>{for(let{plugin:r,config:a}of i){let i=a.hooks?.[e];if(i)try{let a=i(...n);a&&Promise.resolve(a).catch(n=>{t.l(new t.H(r.name,String(e),n))})}catch(n){t.l(new t.H(r.name,String(e),n))}}},ee=(e,...n)=>{let r=!1;for(let{plugin:a,config:o}of i){let i=o.hooks?.[e];if(i)try{i(...n)===!0&&(r=!0)}catch(n){t.l(new t.H(a.name,String(e),n))}}return r},te=async(e,...n)=>{for(let{plugin:r,config:a}of i){let i=a.hooks?.[e];if(i)try{await i(...n)}catch(n){t.l(new t.H(r.name,String(e),n))}}},C=async(e,n,...r)=>{let a=n;for(let{plugin:n,config:o}of i){let i=o.hooks?.[e];if(i)try{a=await i(a,...r)}catch(r){t.l(new t.H(n.name,String(e),r))}}return a},ne=(e,n,...r)=>{let a=n;for(let{plugin:n,config:o}of i){let i=o.hooks?.[e];if(i)try{a=i(a,...r)}catch(r){t.l(new t.H(n.name,String(e),r))}}return a},w={onActivate:()=>S(`onActivate`),onDeactivate:()=>S(`onDeactivate`),onElementHover:e=>S(`onElementHover`,e),onElementSelect:e=>{let n=!1,r=[];for(let{plugin:a,config:o}of i){let i=o.hooks?.onElementSelect;if(i)try{let o=i(e);if(o){if(n=!0,o===!0)continue;r.push(o.catch(e=>(t.l(new t.H(a.name,`onElementSelect`,e)),!1)))}}catch(e){t.l(new t.H(a.name,`onElementSelect`,e))}}let a=r.length>0?Promise.all(r).then(e=>e.every(Boolean)):void 0;return{wasIntercepted:n,pendingResult:a}},onDragStart:(e,t)=>S(`onDragStart`,e,t),onDragEnd:(e,t)=>S(`onDragEnd`,e,t),onBeforeCopy:async e=>te(`onBeforeCopy`,e),transformCopyContent:async(e,t)=>C(`transformCopyContent`,e,t),onAfterCopy:(e,t)=>S(`onAfterCopy`,e,t),onCopySuccess:(e,t)=>S(`onCopySuccess`,e,t),onCopyError:e=>S(`onCopyError`,e),onStateChange:e=>S(`onStateChange`,e),onPromptModeChange:(e,t)=>S(`onPromptModeChange`,e,t),onSelectionBox:(e,t,n)=>S(`onSelectionBox`,e,t,n),onDragBox:(e,t)=>S(`onDragBox`,e,t),onGrabbedBox:(e,t)=>S(`onGrabbedBox`,e,t),onElementLabel:(e,t,n)=>S(`onElementLabel`,e,t,n),onContextMenu:(e,t)=>S(`onContextMenu`,e,t),onOpenFile:(e,t)=>ee(`onOpenFile`,e,t),transformHtmlContent:async(e,t)=>C(`transformHtmlContent`,e,t),transformAgentContext:async(e,t)=>C(`transformAgentContext`,e,t),transformActionContext:e=>ne(`transformActionContext`,e),transformOpenFileUrl:(e,t,n)=>ne(`transformOpenFileUrl`,e,t,n)};return e.L()&&e.V(b),{register:v,unregister:y,getPluginNames:x,setOptions:h,dispose:b,store:s,hooks:w}},_t=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,vt=e=>{let t=e.bounds.x+e.bounds.width/2,n=e.bounds.width/2,r=e.mouseX===void 0?void 0:e.mouseX-t;return{id:_t(`label`),bounds:e.bounds,boundsMultiple:e.boundsMultiple,tagName:e.tagName,componentName:e.componentName,status:e.status,createdAt:Date.now(),element:e.element,elements:e.elements,mouseX:e.mouseX,mouseXOffsetFromCenter:r,mouseXOffsetRatio:r!==void 0&&n>0?r/n:void 0,hideArrow:e.hideArrow}},yt=(e,n,r)=>{let i=new Map,a=e=>{let t=i.get(e);t!==void 0&&(window.clearTimeout(t),i.delete(e))},o=()=>{for(let e of i.values())window.clearTimeout(e);i.clear()},s=()=>{o(),e.clearLabelInstances(),r?.()},c=n=>{a(n);let r=window.setTimeout(()=>{e.updateLabelInstance(n,`fading`);let t=window.setTimeout(()=>{i.delete(n),e.removeLabelInstance(n)},125);i.set(n,t)},t.wt);i.set(n,r)};return{createInstance:(t,n,r,i,a)=>{s();let o=vt({bounds:t,tagName:n,componentName:r,status:i,element:a?.element,mouseX:a?.mouseX,elements:a?.elements,boundsMultiple:a?.boundsMultiple,hideArrow:a?.hideArrow});return e.addLabelInstance(o),o.id},createPerElementInstances:(n,r)=>{s();let i=[];for(let a of n){let n=vt({bounds:t.Y(a.element),tagName:a.tagName,componentName:a.componentName,status:r,element:a.element,mouseX:a.mouseX});e.addLabelInstance(n),i.push(n.id)}return i},updateAfterCopy:(t,n,r)=>{n?(e.updateLabelInstance(t,`copied`),c(t)):(a(t),e.updateLabelInstance(t,`error`,r||`Unknown error`))},markRetrying:t=>{a(t),e.updateLabelInstance(t,`copying`)},dismissInstance:t=>{a(t),e.removeLabelInstance(t)},cancelAllFades:o,clearAll:s,handleHoverChange:(t,r)=>{let i=n().find(e=>e.id===t);if(i){if(r){a(t),i.status===`fading`&&e.updateLabelInstance(t,`copied`);return}(i.status===`copied`||i.status===`fading`)&&c(t)}}}},bt=e=>{let t=window.innerWidth,n=window.innerHeight,r=Math.max(0,e.x),i=Math.min(t,e.x+e.width),a=Math.max(0,e.y),o=Math.min(n,e.y+e.height);return{x:(r+i)/2,y:(a+o)/2}},xt=(n,r,i)=>{let a=[],o=(e,r)=>{let a=bt(i(e)),o=t.f(a.x,a.y).filter(n),s=o.indexOf(e);return s===-1?null:o[s+r]??null},s=e=>{let t=o(e,1);return t&&(a.push(e),a.length>50&&(a=a.slice(-50))),t},c=t=>{if(a.length>0){let t=a.pop();if(e.f(t))return t}return o(t,-1)},l=(e,t)=>{let n=e=>t?e.nextElementSibling:e.previousElementSibling,i=n(e);for(;i;){if(r(i))return a=[],i;i=n(i)}return null};return{findNext:(e,t)=>{switch(e){case`ArrowUp`:return s(t);case`ArrowDown`:return c(t);case`ArrowRight`:return l(t,!0);case`ArrowLeft`:return l(t,!1);default:return null}},clearHistory:()=>{a=[]}}},St=()=>{let e=new WeakSet,t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,`key`),n=!1;if(t?.get&&!t.get.__reactGrabPatched){n=!0;let r=t.get,i=function(){return e.has(this)?``:r.call(this)};i.__reactGrabPatched=!0,Object.defineProperty(KeyboardEvent.prototype,`key`,{get:i,configurable:!0})}return{claimedEvents:e,originalKeyDescriptor:t,restore:()=>{n&&t&&Object.defineProperty(KeyboardEvent.prototype,`key`,t)}}},Ct=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),wt=(e,n,r)=>{let i=null,a=()=>{if(!n()){o();return}let s=e(),c=Ct(s.x,s.y),l=0,u=0;c.top&&(u-=10),c.bottom&&(u+=10),c.left&&(l-=10),c.right&&(l+=10);let d=!1;if(l!==0||u!==0){let e=window.scrollX,t=window.scrollY;window.scrollBy({behavior:`instant`,left:l,top:u});let n=window.scrollX-e,i=window.scrollY-t;d=n!==0||i!==0,d&&r?.({x:n,y:i})}i=d?t.w(a):null},o=()=>{i!==null&&(t.C(i),i=null)};return{start:a,stop:o,isActive:()=>i!==null}},Tt=()=>{let e=globalThis;return!!(e.chrome?.runtime?.id||e.browser?.runtime?.id)},Et=e=>{try{let t=`0.1.50-dev.f350003`,n=`data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 294 294"><path fill="#ff40e0" d="M145 47c25-20 50-27 67-17 16 9 23 30 20 60 0 2-1 5-1 7l-2 13h-1l-12-4c-8-3-17-5-25-6l-17-3c-10-1-20-1-29-1-10 0-20 0-29 1-6 8-11 16-16 24-5 9-9 17-13 26 4 9 8 18 13 26s10 16 16 24l11 14c5 7 11 13 18 19l10 8s-1 0 0 0l-11 9c-17 14-35 22-49 22-6 0-13-2-18-5-16-9-23-30-20-59 1-3 1-5 1-8-30-12-48-29-48-50 0-18 14-35 41-47 2-1 5-2 7-3 0-2 0-5-1-7-3-30 4-51 20-60 18-10 42-3 68 17M71 201c-1 2-1 4-1 5-2 24 3 41 13 47h1c11 7 30 1 51-15-10-9-18-18-26-29-13-1-26-4-38-8m9-38c-3 9-5 17-7 26 8 2 17 4 25 6-3-5-6-10-9-16-3-5-6-10-9-16m-19-53c-2 1-3 1-5 2-21 10-34 23-34 35 0 13 14 27 39 37 3-12 7-25 12-37-5-12-9-24-12-37m37-10c-8 1-17 3-25 6 2 8 4 16 7 25 3-5 6-11 9-16zm-3-61c-4-1-8 0-12 2-10 7-15 24-13 47 0 2 0 3 1 5 12-4 25-6 38-8 8-10 16-20 26-29-15-11-29-17-40-17m111 2c-4-2-8-3-12-2-11 0-25 5-40 17 10 9 19 19 26 29 13 2 26 4 39 8v-5c3-23-2-40-13-47m-61 23c-7 6-13 13-19 19h37c-6-6-12-13-18-19"/><mask id="a"><path fill="#fff" d="m235 85-133 27 28 133 133-27Z"/></mask><path fill="#ff40e0" d="m137 130 76 11c8 1 9 11 3 15l-28 16-4 32c-1 8-10 10-14 4l-41-66c-3-6 1-13 8-12" mask="url(#a)"/></svg>`)}`;console.log(`%cReact Grab${` v${t}`}%c\nhttps://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${n}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,``),e&&navigator.onLine&&!Tt()&&fetch(`https://www.react-grab.com/api/version?source=browser&v=${t}&t=${Date.now()}`,{referrerPolicy:`origin`,keepalive:!0,priority:`low`,cache:`no-store`}).then(e=>e.text()).then(e=>{e&&e!==t&&console.warn(`[React Grab] v${t} is outdated (latest: v${e}). Run \`npx grab@latest upgrade\` to upgrade.`)}).catch(()=>null)}catch{}},Dt=e=>typeof e==`object`&&!!e,Ot=e=>{if(!Dt(e))return null;let t={};return typeof e.enabled==`boolean`&&(t.enabled=e.enabled),(e.activationMode===`toggle`||e.activationMode===`hold`)&&(t.activationMode=e.activationMode),typeof e.keyHoldDuration==`number`&&Number.isFinite(e.keyHoldDuration)&&(t.keyHoldDuration=e.keyHoldDuration),typeof e.allowActivationInsideInput==`boolean`&&(t.allowActivationInsideInput=e.allowActivationInsideInput),typeof e.activationKey==`string`&&(t.activationKey=e.activationKey),typeof e.maxContextLines==`number`&&Number.isFinite(e.maxContextLines)&&(t.maxContextLines=e.maxContextLines),typeof e.freezeReactUpdates==`boolean`&&(t.freezeReactUpdates=e.freezeReactUpdates),typeof e.telemetry==`boolean`&&(t.telemetry=e.telemetry),Object.keys(t).length===0?null:t},kt=()=>{if(typeof window>`u`)return null;try{let e=(document.currentScript instanceof HTMLScriptElement?document.currentScript:null)?.getAttribute(`data-options`);return e?Ot(JSON.parse(e)):null}catch{return null}},At=e=>e===`Enter`||e===`NumpadEnter`,jt=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height,Mt=n=>{let[r,i]=e.I(!1);return e.H(()=>{let r=t.D(e=>i(n(e))),a=()=>i(!1);window.addEventListener(`keydown`,r,{capture:!0}),window.addEventListener(`keyup`,r,{capture:!0}),window.addEventListener(`blur`,a),e.V(()=>{window.removeEventListener(`keydown`,r,{capture:!0}),window.removeEventListener(`keyup`,r,{capture:!0}),window.removeEventListener(`blur`,a)})}),r},U={name:`copy`,actions:[{id:`copy`,label:`Copy`,shortcut:`C`,showInToolbarMenu:!0,onAction:e=>{e.copy?.()}}]},W={name:`comment`,actions:[{id:`comment`,label:`Comment`,shortcut:`Enter`,showInToolbarMenu:!0,onAction:e=>{e.enterPromptMode?.()}}]},Nt={name:`open`,actions:[{id:`open`,label:`Open`,shortcut:`O`,enabled:e=>!!e.filePath,onAction:e=>{e.filePath&&(ft(e.filePath,e.lineNumber,e.hooks),e.hideContextMenu(),e.cleanup())}}]},Pt=e=>{let t=e.left+e.width/2,n=e.top+e.height/2,r=n,i=window.innerHeight-n,a=t,o=window.innerWidth-t,s=Math.min(r,i,a,o);return s===r?`top`:s===a?`left`:s===o?`right`:`bottom`},Ft=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}},It=()=>{let[t,n]=e.I(!1),[r,i]=e.I(null),a=Ft(),o=()=>{let t=r();return e.f(t)?t:null},s=()=>{i(null),a.clear(),n(!1)};return{selectedElement:o,isPendingDismiss:t,select:(e,t)=>{i(e),n(!1),t?.shouldPromptBeforeMouseHandoff?a.arm():a.clear()},clear:s,consumeMouseHandoff:()=>a.consume()&&o()!==null,showDismissPrompt:()=>o()?t()?!1:(n(!0),!0):(s(),!1),takeSelection:t=>{let n=o()??(e.f(t)?t:null);return s(),n}}},Lt=e=>{t.l(new t.G(`Toolbar state change subscriber failed`,e))},Rt=(e,t)=>{for(let n of e)try{Promise.resolve(n(t)).catch(Lt)}catch(e){Lt(e)}},G=(e,t)=>{try{e()}catch(e){t.push(e)}},K=e=>{let n=new Map,r=new Map,i=new Map,a=new Map,o=(e,t)=>{let o=i.get(e);o&&(i.delete(e),G(()=>o.disconnect(),t));for(let n of[...i.keys()])`host`in n&&n.ownerDocument===e&&s(n,t);for(let n of[...a.keys()])n.ownerDocument===e&&c(n,t);let l=r.get(e);r.delete(e),l&&G(l,t);let u=n.get(e);n.delete(e),u&&G(u,t)},s=(e,t)=>{let n=i.get(e);if(n){i.delete(e),G(()=>n.disconnect(),t);for(let n of e.querySelectorAll(`*`))l(n,t)}},c=(e,n)=>{let r=a.get(e);r&&(a.delete(e),G(()=>r.abortController.abort(),n),G(()=>e.removeAttribute(t.Xt),n),r.document&&o(r.document,n))},l=(e,n)=>{t.dt(e)&&c(e,n),e.shadowRoot&&s(e.shadowRoot,n)},u=(e,t)=>{for(let n of e.querySelectorAll(`*`))l(n,t);l(e,t)},d=t=>{n.has(t)||(n.set(t,e(t)),f(t),g(t))},f=e=>{let t=e.defaultView?.Element.prototype;if(!t)return;let i=t.attachShadow,a=new Proxy(i,{apply:(t,r,i)=>{let a=Reflect.apply(t,r,i);return a.mode===`open`&&r.isConnected&&n.has(e)&&g(a),a}});t.attachShadow=a,r.set(e,()=>{t.attachShadow===a&&(t.attachShadow=i)})},p=e=>{if(a.has(e))return;let n={abortController:new AbortController,document:null};a.set(e,n);let r=()=>{let r=[],i=t.S(e);if(n.document&&n.document!==i&&o(n.document,r),n.document=i,!i){e.removeAttribute(t.Xt),t.m(r,`Cleaning up replaced frame document failed`);return}e.setAttribute(t.Xt,``),d(i),t.m(r,`Cleaning up replaced frame document failed`)};e.addEventListener(`load`,r,{signal:n.abortController.signal}),r()},m=e=>{t.b(e)||(t.dt(e)&&p(e),e.shadowRoot&&g(e.shadowRoot))},h=e=>{if(m(e),!t.b(e))for(let t of e.querySelectorAll(`*`))m(t)},g=e=>{if(i.has(e))return;let n=`defaultView`in e?e.defaultView:e.ownerDocument.defaultView;if(!n)return;let r=new n.MutationObserver(e=>{let n=[];for(let r of e){for(let e of r.removedNodes)t.pt(e)&&u(e,n);for(let e of r.addedNodes)t.pt(e)&&h(e)}t.m(n,`Cleaning up removed frame documents failed`)});i.set(e,r),r.observe(e,{childList:!0,subtree:!0});for(let t of e.querySelectorAll(`*`))m(t)};return d(document),()=>{let e=[];for(let t of[...a.keys()])c(t,e);for(let[t,n]of i)i.delete(t),G(()=>n.disconnect(),e);for(let[t,n]of r)r.delete(t),G(n,e);for(let[t,r]of n)n.delete(t),r&&G(r,e);t.m(e,`Cleaning up same-origin frame documents failed`)}},q=(e,t)=>{window.dispatchEvent(t),t.defaultPrevented&&(e.preventDefault(),e.stopImmediatePropagation())},zt=(e,t,n)=>({bubbles:!0,cancelable:!0,composed:!0,clientX:t,clientY:n,screenX:e.screenX,screenY:e.screenY,button:e.button,buttons:e.buttons,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}),Bt=e=>{let n=t.lt(e.view,e.clientX,e.clientY);q(e,new PointerEvent(e.type,{...zt(e,n.x,n.y),pointerId:e.pointerId,pointerType:e.pointerType,isPrimary:e.isPrimary,pressure:e.pressure,tangentialPressure:e.tangentialPressure,tiltX:e.tiltX,tiltY:e.tiltY,twist:e.twist,width:e.width,height:e.height}))},Vt=e=>{let n=t.lt(e.view,e.clientX,e.clientY);q(e,new MouseEvent(e.type,zt(e,n.x,n.y)))},Ht=e=>{q(e,new KeyboardEvent(e.type,{bubbles:!0,cancelable:!0,composed:!0,key:e.key,code:e.code,location:e.location,repeat:e.repeat,isComposing:e.isComposing,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}))},Ut=e=>K(n=>{if(n===document)return;let r=n.defaultView;if(!r)return;let i=new AbortController,a=t.c(n),o=t.a(n),s={capture:!0,signal:i.signal},c=t=>{e.shouldForwardInteraction()&&Bt(t)},l=t=>{e.shouldForwardInteraction()&&Vt(t)},u=t=>{(e.shouldForwardInteraction()||e.shouldForwardKeyboardEvent(t))&&Ht(t)},d=t=>{e.shouldForwardInteraction()&&e.shouldForwardViewportEvent(n)&&window.dispatchEvent(new Event(t.type))};return r.addEventListener(`pointermove`,c,s),r.addEventListener(`pointerdown`,c,s),r.addEventListener(`pointerup`,c,s),r.addEventListener(`pointercancel`,c,s),r.addEventListener(`contextmenu`,l,s),r.addEventListener(`click`,l,s),r.addEventListener(`keydown`,u,s),r.addEventListener(`keyup`,u,s),r.addEventListener(`keypress`,u,s),r.addEventListener(`scroll`,d,s),r.addEventListener(`resize`,d,s),()=>{i.abort();let e=[];for(let t of[a,o])try{t()}catch(t){e.push(t)}t.m(e,`Cleaning up frame event forwarding failed`)}}),Wt=(e,n)=>{let r=n.ownerDocument;for(;r;){if(r===e)return!0;r=t.ut(r.defaultView)?.ownerDocument??null}return!1};let J=null;const Gt=new Map,Kt=()=>typeof window>`u`?J:window.__REACT_GRAB__??J??null,qt=e=>{if(J=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__),e)for(let[n,r]of Gt){Gt.delete(n);try{e.registerPlugin(r)}catch(e){t.l(e instanceof t.U?e:new t.U(n,e))}}},Jt=e=>{J===e&&(J=null),typeof window<`u`&&window.__REACT_GRAB__===e&&delete window.__REACT_GRAB__},Yt=e=>{let t=Kt();if(t){t.registerPlugin(e);return}Gt.set(e.name,e)},Xt=e=>{let t=Kt();if(t){t.unregisterPlugin(e);return}Gt.delete(e)},Zt=async(e,t={})=>(await Promise.allSettled(e.map(e=>n.r(e,t)))).map(e=>e.status===`fulfilled`?e.value:``),Qt=[U,W,Nt],$t={status:`cancelled`};let en=!1;const tn=i=>{if(typeof window>`u`)return P();let a={enabled:!0,activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,...kt(),...i};if(a.enabled===!1||en)return P();en=!0,t.k(a.container??null),Et(a.telemetry!==!1);let{enabled:o,telemetry:s,container:c,...l}=a;return e.F(i=>{let a=!1,o=new AbortController,s=null,c,u=new Set,f=gt(l),{store:p,actions:m,pointer:h,viewportVersion:g,current:_}=ee({keyHoldDuration:f.store.options.keyHoldDuration??100}),v=e.M(()=>_().state===`holding`),y=e.M(()=>_().state===`active`),b=e.M(()=>{let e=_();return e.state===`active`&&e.phase===`frozen`}),x=e.M(()=>{let e=_();return e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)}),S=e.M(()=>{if(!x())return!1;let e=Math.abs(h().x+window.scrollX-p.dragStart.x),t=Math.abs(h().y+window.scrollY-p.dragStart.y);return e>2||t>2}),C=e.M(()=>{let e=_();return e.state===`active`&&e.phase===`dragging-reposition`}),ne=e.M(()=>{let e=_();return e.state===`active`&&e.phase===`justDragged`}),w=e.M(()=>_().state===`copying`),ae=e.M(()=>p.selectionInteractionLockDepth>0),oe=e.M(()=>_().state===`justCopied`),T=e.M(()=>{let e=_();return e.state===`active`&&!!e.isPromptMode}),se=e.M(()=>p.pendingCommentMode||T()),ce=e.M(()=>{let e=_();return e.state===`active`&&!!e.isPromptMode&&!!e.isPendingDismiss}),le=new Map,ue=(e,t)=>{le.has(e)||le.set(e,document.body.style[e]),document.body.style[e]=t},E=e=>{let t=le.get(e);t!==void 0&&(document.body.style[e]=t,le.delete(e))};e.j(e.B(y,(e,n)=>{e&&!n?(t.r(h().x,h().y),ue(`touchAction`,`none`)):!e&&n&&(t.i(),E(`touchAction`))}));let de=e.i(),[D,fe]=e.I(de?!de.collapsed:!0),[pe,me]=e.I(0),[he,ge]=e.I(0),[O,_e]=e.I(de),[ve,ye]=e.I(!1),be=Mt(e=>e.shiftKey),[xe,Se]=e.I(null),[Ce,we]=e.I(null),k=e.M(()=>p.contextMenuPosition!==null),Te=e.M(()=>k()||xe()!==null),Ee,A=null,De=new WeakMap,j=It(),Oe=()=>!D()||T()||ae()||k()||j.isPendingDismiss(),M=()=>{Ge(!1),De=new WeakMap},ke=t=>{let n=O()??e.i(),r={edge:n?.edge??`bottom`,ratio:n?.ratio??.5,collapsed:n?.collapsed??!1,enabled:n?.enabled??!0,defaultAction:n?.defaultAction??`copy`,...t};e.a(r),_e(r),Rt(u,r)},Ae=()=>{L.timerId!==null&&(clearTimeout(L.timerId),L.timerId=null)},je=()=>{L.copyWaiting=!1,L.holdTimerFired=!1,L.startTimestamp=null};e.j(()=>{if(_().state!==`holding`){Ae();return}L.startTimestamp=Date.now(),L.timerId=window.setTimeout(()=>{if(L.timerId=null,L.copyWaiting){L.holdTimerFired=!0;return}m.activate()},p.keyHoldDuration),e.V(Ae)}),e.j(()=>{let n=_();if(n.state!==`active`||n.phase!==`justDragged`)return;let r=setTimeout(()=>{m.finishJustDragged()},t.wt);e.V(()=>clearTimeout(r))}),e.j(()=>{if(_().state!==`justCopied`)return;let n=setTimeout(()=>{m.finishJustCopied()},t.wt);e.V(()=>clearTimeout(n))}),e.j(e.B(v,(e,t=!1)=>{!t||e||!y()||(f.store.options.activationMode!==`hold`&&m.setWasActivatedByToggle(!0),f.hooks.onActivate())}));let Me=(e,t,n)=>{m.setCopyStart({x:t,y:n},e),m.clearInputText()},N=()=>{let e=p.frozenElement||Y();e&&m.enterPromptMode({x:h().x,y:h().y},e)},P={lastDetectionTimestamp:0,pendingDetectionScheduledAt:0,latestPointerX:0,latestPointerY:0},F=null,[Re,ze]=e.I(null),[Be,Ve]=e.I(0),He=(e,t)=>{F!==null&&clearTimeout(F),ze(null),F=window.setTimeout(()=>{ze({x:e,y:t}),F=null},32)},We=()=>{F!==null&&(clearTimeout(F),F=null),ze(null),En()},I=null,L={timerId:null,startTimestamp:null,copyWaiting:!1,holdTimerFired:!1},R=null,[z,Ge]=e.I(!1),Ke=0,qe=!1,tt=null,nt=()=>{qe=!0,tt!==null&&window.clearTimeout(tt),tt=window.setTimeout(()=>{qe=!1,tt=null},t.wt)},at=()=>{tt!==null&&(window.clearTimeout(tt),tt=null),qe=!1},st=0,B=null,ct=null,[V,H]=e.I(!1),[mt,ht]=e.I(null),[vt,bt]=e.I(null),[Tt,Et]=ie(vt),Dt=e.M(()=>se()?t.vt:V()?mt():y()?t.yt:null),Ot=e=>rt(e,t.y),kt=xt(t.y,Ot,t.Y),U=wt(h,()=>x(),e=>{if(C()){if(m.shiftDragStart(e),R){R={x:R.x+e.x,y:R.y+e.y};return}let{pageX:t,pageY:n}=yn(h().x,h().y);R={x:t,y:n}}}),W=e.M(()=>y()&&!w()),Nt=new Map,Ft=(e,n)=>{let r=_t(`grabbed`),i={id:r,bounds:e,createdAt:Date.now(),element:n};m.addGrabbedBox(i),f.hooks.onGrabbedBox(e,n);let a=window.setTimeout(()=>{Nt.delete(r),m.removeGrabbedBox(r)},t.wt+125);Nt.set(r,a)},Lt=async e=>{let r=await Promise.all(e.map(async e=>{let r=await n.u(e),i=r?.componentName??null,a=r?.filePath,o=r?.lineNumber??void 0,s=r?.columnNumber??void 0;i||=n.i(e);let c=t.ft(e)?e.innerText?.slice(0,100):void 0;return{tagName:t.P(e),id:e.id||void 0,className:e.getAttribute(`class`)||void 0,textContent:c,componentName:i??void 0,filePath:a,lineNumber:o,columnNumber:s}}));a||window.dispatchEvent(new CustomEvent(`react-grab:element-selected`,{detail:{elements:r}}))},K=new Map,q=yt(m,()=>p.labelInstances,()=>K.clear()),zt=e=>{for(let t of e)p.labelInstances.find(e=>e.id===t)?.status===`copying`&&(K.delete(t),q.dismissInstance(t))},Bt=()=>{o.abort()},Vt=()=>(o.signal.aborted&&!a&&(o=new AbortController),o.signal),Ht=()=>(Bt(),Vt()),J=()=>{Bt(),s=null,zt(p.labelInstances.filter(e=>e.status===`copying`).map(e=>e.id))},Gt=async(e,t,n)=>{let r,i;try{if(r=await e(n),r.status===`cancelled`)return r;r.status===`failed`&&(i=`Failed to copy`)}catch(e){if(n.aborted)return $t;r={status:`failed`},i=Fe(e,`Action failed`)}if(t)for(let e of t)q.updateAfterCopy(e,r.status===`succeeded`,i);return r},Kt=(e,t,n,r)=>{if(e){for(let e of n)K.delete(e);return}let i={operation:t,siblingIds:new Set(n),shouldDeactivateAfter:r};for(let e of n)K.set(e,i)},qt=async(e,t,n,r=Ht())=>{if(r.aborted)return!1;at(),_().state!==`copying`&&m.startCopy();let i=await Gt(e,t,r);if(i.status===`cancelled`)return!1;let a=i.status===`succeeded`;return t&&Kt(a,e,t,!!n),_().state===`copying`?(a&&m.completeCopy(),n?Z():a?(m.activate(),nt()):(m.activate(),m.unfreeze()),!0):!0},Yt=e=>{let t=K.get(e);if(!t)return;let n=[...t.siblingIds];for(let e of n)q.markRetrying(e),K.delete(e);qt(t.operation,n,t.shouldDeactivateAfter).then(e=>{e||zt(n)})},Xt=e=>{K.get(e)?.siblingIds.delete(e),K.delete(e),q.dismissInstance(e)},Zt=(e,r,i,a)=>{let o=e[0],s=a??(o?n.i(o):null),c=o?t.P(o):null,l=s??c??void 0;return Ue({getContent:f.store.options.getContent,componentName:l,maxContextLines:f.store.options.maxContextLines,signal:r},f.hooks,e,i)},tn=async(e,n,r,i=Vt())=>{if(e.length===0||i.aborted)return $t;let a=[],o=[];for(let n of e){let{wasIntercepted:e,pendingResult:r}=f.hooks.onElementSelect(n);e||a.push(n),r&&o.push(r),f.store.theme.grabbedBoxes.enabled&&Ft(t.Y(n),n)}if(await t.T(),i.aborted)return $t;let s;if(a.length>0&&(s=await Zt(a,i,n,r),s.status===`cancelled`))return s;if(o.length>0){let e=await Le(Promise.all(o),i);if(e===Ie)return s?.status===`succeeded`?s:$t;if(!e.every(Boolean))throw new t.L}return i.aborted&&!s?$t:(Lt(e).catch(e=>{t.l(new t.G(`Element selection notification failed`,e))}),s??{status:`succeeded`})},nn=e=>{let r=Ht(),i={},o=!1;s=i,n.a(e.primaryElement).then(async t=>{if(r.aborted||s!==i){zt(e.labelInstanceIds);return}s=null,o=!0,await qt(n=>tn(e.targetElements,e.extraPrompt,t??void 0,n),e.labelInstanceIds.length>0?e.labelInstanceIds:null,e.shouldDeactivateAfter,r)?e.onComplete?.():zt(e.labelInstanceIds)}).catch(c=>{if(r.aborted){zt(e.labelInstanceIds);return}if(a||!o&&s!==i)return;t.l(new t.G(`Copy operation failed`,c));let l=Fe(c,`Action failed`);for(let t of e.labelInstanceIds)q.updateAfterCopy(t,!1,l);e.labelInstanceIds.length>0&&Kt(!1,t=>n.a(e.primaryElement).then(n=>t.aborted?$t:tn(e.targetElements,e.extraPrompt,n??void 0,t)),e.labelInstanceIds,!!e.shouldDeactivateAfter),_().state===`copying`&&(e.shouldDeactivateAfter?Z():(m.activate(),m.unfreeze()))}).finally(()=>{s===i&&(s=null)})},rn=e=>{let{element:n,cursorX:r,selectedElements:i,extraPrompt:a,shouldDeactivateAfter:o,onComplete:s,dragRect:c}=e,l=i??[n],u=c??p.frozenDragRect,d=l.length>1,f=!d&&n===fn()?vn():void 0,h=u&&d?Ze(u):f??t.Y(n),g=d?h.x+h.width/2:r,_=t.P(n);at(),m.startCopy();let v=_?q.createInstance(h,_,void 0,`copying`,{element:n,mouseX:g,elements:i}):null;nn({primaryElement:n,targetElements:l,labelInstanceIds:v?[v]:[],extraPrompt:a,shouldDeactivateAfter:o,onComplete:s})},an=e=>{let{elements:t,labelEntries:n,shouldDeactivateAfter:r,onComplete:i}=e,a=t[0];at(),m.startCopy(),nn({primaryElement:a,targetElements:t,labelInstanceIds:q.createPerElementInstances(n,`copying`),shouldDeactivateAfter:r,onComplete:i})},Y=e.M(()=>{if(g(),!W()||S()||ae()||j.isPendingDismiss())return null;let t=p.detectedElement;return e.f(t)?t:null}),on=e.M(()=>p.frozenElement||(b()?null:Y())),sn=e.M(()=>!y()||T()||z()||w()||Te()||j.isPendingDismiss()?null:be()?b()?on():Y()??p.frozenElement:j.selectedElement()),cn=e.M(()=>{let e=sn();return e?et(e,t.y,Ot):[]}),ln=e.M(()=>{let e=sn();return e?Math.max(0,cn().findIndex(t=>t.element===e)):0}),un=e.M(()=>sn()!==null);e.j(()=>{if(!p.detectedElement)return;let t=1,n=setInterval(()=>{if(e.f(p.detectedElement)||m.relinkLiveElements(),!e.f(p.detectedElement)){if(t>0){--t;return}Ar()}},100);e.V(()=>clearInterval(n))}),e.j(e.B(on,e=>{if(B!==null&&(clearTimeout(B),B=null),!e){bt(null);return}B=window.setTimeout(()=>{B=null,bt(e)},100)})),e.V(()=>{B!==null&&(clearTimeout(B),B=null)}),e.j(()=>{let n=p.frozenElements;e.V(t.s(n))}),e.j(e.B(y,n=>{n&&f.store.options.freezeReactUpdates&&e.V(t.t())}));let dn=()=>{if(p.isTouchMode&&x()){let n=p.detectedElement;return!e.f(n)||t.x(n)?void 0:n}let n=on();if(!(!n||t.x(n)))return n},fn=e.M(()=>dn()),pn=()=>fn()?p.isTouchMode&&x()?W():W()&&!S():!1,mn=e.R(()=>p.frozenElements,n=>e.M(()=>(g(),t.Y(n)))),hn=e.M(()=>{let e=p.frozenElements;if(e.length===0)return[];let t=p.frozenDragRect;return t&&e.length>1?[Ze(t)]:mn().map(e=>e())}),gn=e.M(()=>{if(!z()||p.pendingCommentMode||V())return null;let n=p.detectedElement;return!e.f(n)||t.x(n)||p.frozenElements.includes(n)?null:n}),_n=e.M(()=>{g();let e=gn();if(e)return t.Y(e)}),vn=e.M(()=>{g();let e=p.frozenElements;if(e.length>0){let t=hn();if(e.length===1){let e=t[0];if(e)return e}let n=p.frozenDragRect;return n?t[0]??Ze(n):$e(pt(t))}let n=fn();if(n)return t.Y(n)}),yn=(e,t)=>({pageX:e+window.scrollX,pageY:t+window.scrollY}),bn=(e,t)=>{let{pageX:n,pageY:r}=yn(e,t);return{x:Math.abs(n-p.dragStart.x),y:Math.abs(r-p.dragStart.y)}},xn=(e,t)=>{let{pageX:n,pageY:r}=yn(e,t),i=Math.min(p.dragStart.x,n),a=Math.min(p.dragStart.y,r),o=Math.abs(n-p.dragStart.x),s=Math.abs(r-p.dragStart.y);return{x:i-window.scrollX,y:a-window.scrollY,width:o,height:s}},Sn=e=>e.code===`Space`||e.key===` `,Cn=()=>{if(!x())return;m.startDragReposition();let{pageX:e,pageY:t}=yn(h().x,h().y);R={x:e,y:t}},wn=()=>{m.stopDragReposition(),R=null},Tn=e.M(()=>{if(g(),S())return $e(xn(h().x,h().y))}),En=e.M(()=>{if(Be(),!S())return[];let e=Re();if(!e)return[];let n=xn(e.x,e.y),r=Je(n,t.y);return r.length>0?r:Je(n,t.y,!1)}),Dn=e.M(()=>(g(),En().map(e=>t.Y(e)))),On=e.M(()=>{let e=Dn();if(e.length>0)return e;let t=_n();return t?[...hn(),t]:hn()}),kn=e.R(()=>p.frozenElements,r=>{let i=t.P(r)||`element`,a=n.i(r)??void 0;return{read:e.M(()=>{if(g(),!e.f(r))return null;let n=t.Y(r),o=De.get(r);return{tagName:i,componentName:a,bounds:n,mouseX:o===void 0?void 0:n.x+n.width*o}})}}),An=e.M(()=>{if(T()||p.frozenElements.length<2)return[];let e=[];for(let t of kn())t.read()!==null&&e.push(t);return e}),jn=e.M(()=>{if(T())return null;let e=gn();return e?(g(),{tagName:t.P(e)||`element`,componentName:n.i(e)??void 0,bounds:t.Y(e),mouseX:h().x}):null}),Mn=e.M(()=>{if(w()||T()){g();let e=p.frozenElement||Y();return e?{x:d(t.Y(e)).x+p.copyOffsetFromCenterX,y:p.copyStart.y}:{x:p.copyStart.x,y:p.copyStart.y}}return{x:h().x,y:h().y}}),Nn=e.M(()=>{if(!z()||p.frozenElements.length!==1)return;g();let n=p.frozenElements[0];if(!e.f(n))return;let r=De.get(n);if(r===void 0)return;let i=t.Y(n);return i.x+i.width*r});e.j(e.B(()=>[Y(),p.lastGrabbedElement],([e,t])=>{t&&e&&t!==e&&m.setLastGrabbed(null),e&&f.hooks.onElementHover(e)})),e.j(e.B(()=>Y(),e=>{let t=++st,r=()=>{st===t&&m.setSelectionSource(null,null)};if(!e){r();return}n.u(e).then(e=>{if(st===t){if(!e){r();return}m.setSelectionSource(e.filePath,e.lineNumber)}}).catch(()=>{st===t&&m.setSelectionSource(null,null)})}));let Pn=e.M(()=>p.grabbedBoxes.map(e=>({id:e.id,bounds:e.bounds,createdAt:e.createdAt}))),Fn=e.M(()=>p.labelInstances.map(e=>({id:e.id,status:e.status,tagName:e.tagName,componentName:e.componentName,createdAt:e.createdAt})));e.j(e.B(e.M(()=>{let e=y(),t=x(),n=w(),r=T(),i=Y(),a=Tn(),o=f.store.theme.enabled,s=f.store.theme.selectionBox.enabled,c=f.store.theme.dragBox.enabled,l=S(),u=on(),d=oe();return{isActive:e,isDragging:t,isCopying:n,isPromptMode:r,isSelectionBoxVisible:!!(o&&s&&e&&!n&&!d&&!t&&u!=null),isDragBoxVisible:!!(o&&c&&e&&!n&&l),targetElement:i,dragBounds:a?{x:a.x,y:a.y,width:a.width,height:a.height}:null,grabbedBoxes:[...Pn()],labelInstances:[...Fn()],selectionFilePath:p.selectionFilePath,toolbarState:O()}}),e=>{f.hooks.onStateChange(e)})),e.j(e.B(()=>{let t=T();return{inputMode:t,position:t?h():e.W(h),target:t?Y():e.W(Y)}},({inputMode:e,position:t,target:n})=>{f.hooks.onPromptModeChange(e,{x:t.x,y:t.y,targetElement:n})})),e.j(e.B(()=>[qr(),vn(),Y()],([e,t,n])=>{f.hooks.onSelectionBox(!!e,t??null,n)})),e.j(e.B(()=>[ri(),Tn()],([e,t])=>{f.hooks.onDragBox(!!e,t??null)})),e.j(e.B(()=>{let t=ai();return[t,ii(),t?Mn():e.W(Mn),t?Y():e.W(Y),p.selectionFilePath,p.selectionLineNumber]},([e,n,r,i,a,o])=>{f.hooks.onElementLabel(e,n,{x:r.x,y:r.y,content:``,element:i??void 0,tagName:i&&t.P(i)||void 0,filePath:a??void 0,lineNumber:o??void 0})}));let X=null,In=e=>{if(e){if(!X){X=document.createElement(`style`),X.setAttribute(`data-react-grab-cursor`,``);let e=t.N();e&&(X.nonce=e),t.M(X),document.head.appendChild(X)}X.textContent=`* { cursor: ${e} !important; }`}else X&&=(X.remove(),null)};e.j(e.B(()=>[y(),w(),T()],([e,t,n])=>{In(t?`progress`:e&&!n?`crosshair`:null)}));let Ln=()=>{let e=v();m.activate(),e||f.hooks.onActivate()},Z=()=>{J();let n=x(),r=p.previouslyFocusedElement;wn(),m.deactivate(),yi(),M(),fr(),j.clear(),H(!1),ht(null),n&&(E(`userSelect`),We()),I&&window.clearTimeout(I),U.stop(),t.ft(r)&&r!==document.body&&r!==document.activeElement&&e.f(r)&&r.focus({preventScroll:!0}),f.hooks.onDeactivate()},Rn=()=>{v()&&m.releaseHold(),y()||w()?Z():J(),at()},zn=()=>{m.setWasActivatedByToggle(!0),Ln()},Bn=()=>{let e=[...p.frozenElements],n=p.frozenElement||Y(),r=T()?p.inputText.trim():``;if(!n){Z();return}let i=e.length>0?e:[n],a=i.map(e=>t.Y(e))[0],{x:o,y:s}=d(a),c=o+p.copyOffsetFromCenterX;m.setPointer({x:o,y:s}),m.exitPromptMode(),m.clearInputText(),rn({element:n,cursorX:c,selectedElements:i,extraPrompt:r||void 0,shouldDeactivateAfter:!0})},Vn=()=>{if(T()){if(ce()){m.clearInputText(),Z();return}m.setPendingDismiss(!0),ge(e=>e+1)}},Hn=()=>{if(j.isPendingDismiss()){hr();return}m.clearInputText(),Z()},Un=()=>{m.setPendingDismiss(!1)},Wn=()=>{ct=null,H(!1),m.setPendingCommentMode(!1),ht(null)},Gn=e=>{ct=e,ht(e),H(!0)},Kn=t=>{let n=p.frozenElement||Y();if(!n)return!1;let r={x:h().x,y:h().y},i=f.store.actions.find(e=>e.id===t);return i?(m.clearInputText(),m.exitPromptMode(),Wn(),e.t(i,xr(n,r))||Zn(n,r),!0):(m.clearInputText(),m.exitPromptMode(),Wn(),Zn(n,r),!0)},qn=e=>{if(w()){Z();return}if(y()){if(Dt()!==e){if(T()){if(Kn(e))return;Z();return}m.setPendingCommentMode(!1),Gn(e);return}Z();return}D()&&(Gn(e),zn())},Jn=()=>{qn(O()?.defaultAction??`copy`)},Yn=()=>{let e=O()?.defaultAction??`copy`;return f.store.actions.find(t=>t.id===e)?.label??`Copy`},Xn=(e,t,n)=>{Wn(),m.clearInputText(),m.enterPromptMode({x:t,y:n},e)},Zn=(e,t)=>{M(),bi(),m.showContextMenu(t,e),fr(),f.hooks.onContextMenu(e,t)},Qn=(t,n)=>{let r=ct;if(ct=null,ht(null),!r)return;let i=f.store.actions.find(e=>e.id===r);if(!i){Zn(t,n);return}e.t(i,xr(t,n))||Zn(t,n)},$n=()=>{if(D()){if(y()&&se()){Z();return}m.setPendingCommentMode(!0),y()||zn()}},er=(e,n,r)=>{let i=r&&z()&&!x()&&!p.pendingCommentMode&&!V();if(Oe()||b()&&!i)return;if(m.setPointer({x:e,y:n}),P.latestPointerX=e,P.latestPointerY=n,i){let r=t.d(e,n);r!==p.detectedElement&&m.setDetectedElement(r);return}let a=performance.now(),o=P.pendingDetectionScheduledAt>0&&a-P.pendingDetectionScheduledAt<200;if(!S()&&a-P.lastDetectionTimestamp>=32&&!o&&(P.lastDetectionTimestamp=a,P.pendingDetectionScheduledAt=a,setTimeout(()=>{if(Oe()||S()){P.pendingDetectionScheduledAt=0;return}let e=t.d(P.latestPointerX,P.latestPointerY);e!==p.detectedElement&&m.setDetectedElement(e),P.pendingDetectionScheduledAt=0})),x()){if(C()){let{pageX:t,pageY:r}=yn(e,n);R&&m.shiftDragStart({x:t-R.x,y:r-R.y}),R={x:t,y:r}}He(e,n);let t=Ct(e,n),r=t.top||t.bottom||t.left||t.right;r&&!U.isActive()?U.start():!r&&U.isActive()&&U.stop()}},tr=(e,t,n)=>{if(!W()||ae())return!1;!n&&z()&&M();let r=j.selectedElement()!==null;return m.startDrag({x:e,y:t},n||r),m.setPointer({x:e,y:t}),ue(`userSelect`,`none`),He(e,t),f.hooks.onDragStart(e+window.scrollX,t+window.scrollY),!0},nr=(e,r)=>{let i=p.frozenElements.includes(e),a=p.frozenElements.length===0;if(!i){let i=Ye(t.Y(e),r);De.set(e,i),a&&Et(n.i(e)??void 0)}m.toggleFrozenElement(e),t.u();let o=p.frozenElements.includes(e);if(o||De.delete(e),p.frozenElements.length===0){M(),m.unfreeze();return}t.o(p.frozenElements),Ge(!0),m.setPointer(r),m.setLastGrabbed(o?e:p.frozenElements[p.frozenElements.length-1]),m.freeze(),fr()},rr=()=>{let r=p.frozenElements.filter(e.f),i=r.map(e=>{let r=t.P(e)||`element`,i=n.i(e)??void 0,a=De.get(e),o=t.Y(e);return{element:e,tagName:r,componentName:i,mouseX:a===void 0?o.x+o.width/2:o.x+o.width*a}});if(M(),r.length===0){m.unfreeze();return}if(r.length===1){rn({element:r[0],cursorX:i[0].mouseX,selectedElements:r,shouldDeactivateAfter:p.wasActivatedByToggle});return}an({elements:r,labelEntries:i,shouldDeactivateAfter:p.wasActivatedByToggle})},ir=(e,n,r)=>{let i=Je(e,t.y),a=i.length>0?i:Je(e,t.y,!1);if(a.length===0)return;let o=r&&!p.pendingCommentMode&&!V();if(o&&m.addFrozenElements(a),t.o(o?p.frozenElements:a),f.hooks.onDragEnd(a,e),o){let e=a[a.length-1];Ge(!0),t.u(),m.setPointer(d(t.Y(e))),m.setLastGrabbed(e),m.freeze(),fr();return}let s=a[0],c=d(t.Y(s));m.setPointer(c),m.setFrozenElements(a);let l=Qe(e);if(m.setFrozenDragRect(l),m.freeze(),m.setLastGrabbed(s),p.pendingCommentMode){Xn(s,c.x,c.y);return}if(V()){H(!1),ct?Qn(s,c):Zn(s,c);return}let u=p.wasActivatedByToggle&&!n;rn({element:s,cursorX:c.x,selectedElements:a,shouldDeactivateAfter:u,dragRect:l})},ar=n=>{for(let r of p.frozenElements)if(e.f(r)&&jt(n,t.Y(r)))return r;return null},or=(n,r,i,a)=>{let o=e.f(p.frozenElement)?p.frozenElement:null,s=j.selectedElement(),c=()=>t.f(n,r).find(t.y)??null;if(a&&!p.pendingCommentMode&&!V()){let e=c();e!==null&&nr(e,{x:n,y:r});return}let l=c()??(e.f(p.detectedElement)?p.detectedElement:null),u=s??l??o;if(!u)return;let g,_,v=l===null&&o===u,y=s===u;if(v)g=h().x,_=h().y;else if(y){let e=d(t.Y(u));g=e.x,_=e.y}else g=n,_=r;if(p.pendingCommentMode){Xn(u,g,_),j.clear();return}if(V()){H(!1);let{wasIntercepted:e}=f.hooks.onElementSelect(u);if(e)return;j.clear(),t.o([u]),m.setFrozenElement(u);let n={x:g,y:_};m.setPointer(n),m.freeze(),ct?Qn(u,n):Zn(u,n);return}let b=p.wasActivatedByToggle&&!i;m.setLastGrabbed(u),rn({element:u,cursorX:g,shouldDeactivateAfter:b}),j.clear()},sr=()=>{x()&&(wn(),We(),m.cancelDrag(),U.stop(),E(`userSelect`),Ar())},cr=(e,t,n,r)=>{if(!x())return;We();let i=bn(e,t),a=i.x>2||i.y>2,o=a?xn(e,t):null;a?m.endDrag():m.cancelDrag(),wn(),U.stop(),E(`userSelect`),o?ir(o,n,r):or(e,t,n,r)},Q=Pe(),lr=Ut({shouldForwardInteraction:()=>y()||v()||x()||ae(),shouldForwardKeyboardEvent:e=>dt(e,f.store.options),shouldForwardViewportEvent:e=>{let t=p.frozenElement??Y();return t&&Wt(e,t)?!0:p.frozenElements.some(t=>Wt(e,t))}}),ur=St(),dr=t=>{let n;try{n=ur.originalKeyDescriptor?.get?ur.originalKeyDescriptor.get.call(t):t.key}catch{return!1}let r=n===`Enter`||At(t.code),i=y()||v();return r&&i&&!T()&&!j.isPendingDismiss()&&!p.wasActivatedByToggle?e.o(t,`data-react-grab-input`)?!1:(ur.claimedEvents.add(t),t.preventDefault(),t.stopImmediatePropagation(),!0):!1};Q.addDocumentListener(`keydown`,t.D(dr),{capture:!0}),Q.addDocumentListener(`keyup`,t.D(dr),{capture:!0}),Q.addDocumentListener(`keypress`,t.D(dr),{capture:!0});let fr=()=>{kt.clearHistory(),j.clear()},pr=(e,n=!1)=>{m.setFrozenElement(e),m.freeze(),j.select(e,{shouldPromptBeforeMouseHandoff:n});let r=d(t.Y(e));m.setPointer(r),p.contextMenuPosition!==null&&m.showContextMenu(r,e)},mr=()=>{j.showDismissPrompt()&&ge(e=>e+1)},hr=()=>{j.clear(),m.unfreeze(),fr()},gr=()=>{let e=j.takeSelection(p.frozenElement);if(!e){hr();return}let n=d(t.Y(e));fr(),m.setLastGrabbed(e),rn({element:e,cursorX:n.x,shouldDeactivateAfter:p.wasActivatedByToggle})},_r=e=>t.mt.has(e.key)?e.key:e.key===`Tab`?e.shiftKey?`ArrowLeft`:`ArrowRight`:null,vr=(e,n={})=>{if(!y()||T()||z()||j.isPendingDismiss()&&!n.allowPendingKeyboardSelection)return!1;let r=_r(e);if(!r||Te())return!1;let i=on(),a=!i;if(!i){let e=t.E()?.getBoundingClientRect();i=e?t.d(e.left+e.width/2,e.top+e.height/2):t.d(window.innerWidth/2,window.innerHeight/2)}if(!i)return!1;let o=r===`ArrowUp`||r===`ArrowDown`,s=kt.findNext(r,i);if(!s&&!o&&!a)return!1;let c=s??i;return e.preventDefault(),e.stopPropagation(),pr(c,!0),!0},yr=t=>t.metaKey||t.ctrlKey||t.altKey||t.repeat||e.d(t)||!y()||w()||ae()||Te()?null:p.frozenElement||Y(),br=t=>{let n=yr(t);if(!n)return null;let r=e.r(f.store.actions,t);return r?{element:n,action:r}:null},xr=(e,n)=>{let r=t.Y(e);return mi({element:e,filePath:p.selectionFilePath??void 0,lineNumber:p.selectionLineNumber??void 0,tagName:t.P(e)||void 0,componentName:Tt(),position:n,shouldDeferHideContextMenu:!1,performWithFeedbackOptions:{fallbackBounds:r,fallbackSelectionBounds:[r],position:n}})},Sr=t=>{let n=br(t);if(!n)return!1;let{element:r,action:i}=n;return T()?Kn(i.id)?(t.preventDefault(),t.stopImmediatePropagation(),!0):!1:e.t(i,xr(r,{x:h().x,y:h().y}))?(t.preventDefault(),t.stopImmediatePropagation(),!0):!1},Cr=()=>{let e=p.selectionFilePath,t=p.selectionLineNumber;e&&ft(e,t??void 0,f.hooks)},wr=e=>e.key?.toLowerCase()!==`o`||!y()||!(e.metaKey||e.ctrlKey)||!p.selectionFilePath?!1:(e.preventDefault(),e.stopPropagation(),Cr(),!0),Tr=e=>{if(!y()||w()||p.contextMenuPosition!==null)return!1;let n=e.key===`F10`&&e.shiftKey,r=e.key===`ContextMenu`;if(!n&&!r)return!1;let i=p.frozenElements,a=i.length>1,o=(a?i[0]:null)||p.frozenElement||Y();if(!o)return!1;e.preventDefault(),e.stopPropagation();let s=d(t.Y(o));return a?t.o(i):(t.o([o]),m.setFrozenElement(o)),m.setPointer(s),m.freeze(),Zn(o,s),!0},Er=e.M(()=>cn().map(e=>({tagName:t.P(e.element)||`element`,componentName:n.i(e.element)??void 0,depth:e.depth,isLast:e.isLast}))),Dr=e.M(()=>({items:Er(),activeIndex:ln()})),Or=n=>{if(!(!f.store.options.allowActivationInsideInput&&e.d(n))&&!(!dt(n,f.store.options)&&((n.metaKey||n.ctrlKey)&&!t.Mt.includes(n.key)&&!At(n.code)&&(y()&&!p.wasActivatedByToggle?Z():v()&&(Ae(),je(),m.releaseHold())),!At(n.code)||!v()))){if((y()||v())&&!T()&&(n.preventDefault(),At(n.code)&&n.stopImmediatePropagation()),y()){if(p.wasActivatedByToggle&&f.store.options.activationMode!==`hold`||n.repeat)return;I!==null&&window.clearTimeout(I),I=window.setTimeout(()=>{Z()},200);return}if(v()&&n.repeat){if(L.copyWaiting){let e=L.holdTimerFired;je(),e&&m.activate()}return}if(!(w()||oe())&&!v()){let t=f.store.options.keyHoldDuration??100;e.d(n)?e.l(n)?t+=600:t+=400:e.u()&&(t+=600),je(),m.startHold(t)}}},kr=e=>{if(!j.isPendingDismiss())return!1;if(At(e.code))return!0;let n=t.mt.has(e.key),r=br(e)!==null;return!n&&!r?!1:n?vr(e,{allowPendingKeyboardSelection:!0}):Sr(e)?(fr(),!0):!1};Q.addWindowListener(`keydown`,t.D(n=>{if(_r(n)&&e.d(n)||kr(n))return;if(dr(n),!D()){dt(n,f.store.options)&&!n.repeat&&me(e=>e+1);return}let r=At(n.code)&&v()&&!T(),i=e.o(n,t.Jt);if(T()&&dt(n,f.store.options)&&!n.repeat&&!i){n.preventDefault(),n.stopPropagation(),Vn();return}if(n.key===`Escape`&&w()){Z();return}if(n.key===`Escape`&&Te()){xe()!==null&&yi();return}let a=e.o(n,`data-react-grab-ignore-events`)&&!r;if(T()||a)return T()&&!i&&Sr(n)||(n.key===`Escape`&&(T()?Vn():p.wasActivatedByToggle&&Z()),a&&t.mt.has(n.key)&&vr(n)),void 0;if(x()&&Sn(n)){n.repeat||Cn(),n.preventDefault(),n.stopPropagation();return}if(n.key===`Escape`&&(v()||p.wasActivatedByToggle)){Z();return}y()&&!t.Mt.includes(n.key)&&n.preventDefault();let o=Date.now()-Ke<200;vr(n)||wr(n)||Tr(n)||Sr(n)||o||Or(n)}),{capture:!0}),Q.addWindowListener(`keyup`,t.D(t=>{if(dr(t))return;if(Sn(t)&&C()&&(wn(),t.preventDefault(),t.stopPropagation()),t.key===`Shift`&&z()){x()&&sr(),rr();return}if(e.o(t,`data-react-grab-ignore-events`))return;let n=ut(f.store.options.activationKey),r=n.metaKey||n.ctrlKey?e.s()?!t.metaKey:!t.ctrlKey:n.shiftKey&&!t.shiftKey||n.altKey&&!t.altKey,i=f.store.options.activationKey?lt(f.store.options.activationKey)(t):ot(t.key,t.code);if(oe()||qe){(i||r)&&(at(),Z());return}if(!v()&&!y()||T())return;let a=!!f.store.options.activationKey,o=f.store.options.activationMode===`hold`,s=x();if(y()){let e=k();if(r){if(p.wasActivatedByToggle&&f.store.options.activationMode!==`hold`||e)return;Z()}else if(o&&i){if(I!==null&&(window.clearTimeout(I),I=null),e||s)return;Z()}else !a&&i&&I!==null&&(window.clearTimeout(I),I=null);return}if(i||r){if(p.wasActivatedByToggle&&f.store.options.activationMode!==`hold`)return;if(v()||L.holdTimerFired&&r){Ae();let n=(L.startTimestamp?Date.now()-L.startTimestamp:0)>=200,r=L.holdTimerFired&&n&&(f.store.options.allowActivationInsideInput||!e.d(t));je(),r?m.activate():m.releaseHold()}else Z()}}),{capture:!0}),Q.addDocumentListener(`copy`,()=>{v()&&(L.copyWaiting=!0)}),Q.addWindowListener(`keypress`,t.D(dr),{capture:!0}),Q.addWindowListener(`pointermove`,t.D(t=>{if(!t.isPrimary)return;let n=t.pointerType===`touch`;if(m.setTouchMode(n),!e.o(t,`data-react-grab-ignore-events`)&&!Oe()&&!(n&&!v()&&!y())){if((n?v():y())&&!T()&&b()&&!t.shiftKey&&!z()){if(j.consumeMouseHandoff()){mr();return}m.unfreeze(),fr()}er(t.clientX,t.clientY,t.shiftKey)}}),{passive:!0,capture:!0}),Q.addWindowListener(`pointerdown`,t.D(t=>{if(t.button===0&&t.isPrimary&&(m.setTouchMode(t.pointerType===`touch`),!(!x()&&e.o(t,`data-react-grab-ignore-events`))&&!k())){if(T()){let e=vn();e&&t.clientX>=e.x&&t.clientX<=e.x+e.width&&t.clientY>=e.y&&t.clientY<=e.y+e.height?Bn():Vn();return}if(j.isPendingDismiss()){t.preventDefault(),t.stopImmediatePropagation();return}if(ae()){t.preventDefault(),t.stopImmediatePropagation();return}if(tr(t.clientX,t.clientY,t.shiftKey)){if(t.pointerId!==void 0)try{document.documentElement.setPointerCapture(t.pointerId)}catch{}t.preventDefault(),t.stopImmediatePropagation()}}}),{capture:!0}),Q.addWindowListener(`pointerup`,t.D(t=>{if(t.button!==0||!t.isPrimary||e.o(t,`data-react-grab-ignore-events`)||k())return;let n=W()||ae()||x(),r=t.metaKey||t.ctrlKey;cr(t.clientX,t.clientY,r,t.shiftKey),n&&(t.preventDefault(),t.stopImmediatePropagation())}),{capture:!0}),Q.addWindowListener(`contextmenu`,t.D(n=>{if(!W()||w()||T())return;let r=e.o(n,`data-react-grab-ignore-events`),i={x:n.clientX,y:n.clientY},a=r&&p.frozenElements.length>1?ar(i):null,o=j.isPendingDismiss();if(r&&!a&&!o&&!un())return;if(k()){n.preventDefault();return}n.preventDefault(),n.stopPropagation();let s=a??t.d(n.clientX,n.clientY);if(!s)return;let c=p.frozenElements;c.length>1&&c.includes(s)?t.o(c):(t.o([s]),m.setFrozenElement(s)),m.setPointer(i),m.freeze(),Zn(s,i)}),{capture:!0}),Q.addWindowListener(`pointercancel`,t.D(e=>{e.isPrimary&&sr()}),{capture:!0}),Q.addWindowListener(`click`,t.D(t=>{e.o(t,`data-react-grab-ignore-events`)||k()||(W()||ne())&&(t.preventDefault(),t.stopImmediatePropagation(),p.wasActivatedByToggle&&!T()&&!t.shiftKey&&(v()?m.setWasActivatedByToggle(!1):Z()))}),{capture:!0}),Q.addDocumentListener(`visibilitychange`,()=>{if(document.hidden){m.clearGrabbedBoxes();let e=p.activationTimestamp;y()&&!T()&&e!==null&&Date.now()-e>500&&Z()}}),Q.addWindowListener(`blur`,()=>{sr(),v()&&(Ae(),m.releaseHold(),je()),M()}),Q.addWindowListener(`focus`,()=>{Ke=Date.now()}),Q.addWindowListener(`focusin`,t=>{e.o(t,te)&&t.stopPropagation()},{capture:!0});let Ar=()=>{if(!(p.isTouchMode&&!v()&&!y())&&!Oe()&&!b()&&!x()&&p.frozenElements.length===0){let e=t.d(h().x,h().y);m.setDetectedElement(e)}},jr=null,$=null,Mr=()=>{Xe(),Ar(),Ve(e=>e+1),m.incrementViewportVersion(),m.updateContextMenuPosition()},Nr=()=>{t.v(),Mr()};Q.addWindowListener(`scroll`,Mr,{capture:!0});let Pr=window.innerWidth,Fr=window.innerHeight;Q.addWindowListener(`resize`,()=>{let e=window.innerWidth,n=window.innerHeight;if(Pr>0&&Fr>0){let r=e/Pr,i=n/Fr,a=Math.abs(r-i)<t.in,o=Math.abs(r-1)>t.in;a&&o&&m.setPointer({x:h().x*r,y:h().y*i})}Pr=e,Fr=n,Nr()});let Ir=window.visualViewport;if(Ir){let{signal:e}=Q;Ir.addEventListener(`resize`,Nr,{signal:e}),Ir.addEventListener(`scroll`,Mr,{signal:e})}let Lr=()=>{$===null&&($=t.w(()=>{$=null,m.incrementViewportVersion()}))};e.j(()=>{if(f.store.theme.enabled&&(y()||w()||p.labelInstances.length>0||p.grabbedBoxes.length>0)){if(jr!==null)return;jr=window.setInterval(()=>{m.relinkLiveElements(),Lr()},100);return}jr!==null&&(window.clearInterval(jr),jr=null),$!==null&&(t.C($),$=null)}),e.V(()=>{jr!==null&&window.clearInterval(jr),$!==null&&t.C($)}),Q.addDocumentListener(`copy`,t.D(t=>{T()||e.o(t,`data-react-grab-ignore-events`)||W()&&t.preventDefault()}),{capture:!0}),e.V(()=>{let e=[];G(lr,e),G(()=>Q.abort(),e),F!==null&&window.clearTimeout(F),I&&window.clearTimeout(I),G(at,e),A&&G(A,e),A=null,Nt.forEach(e=>window.clearTimeout(e)),Nt.clear(),G(q.cancelAllFades,e),K.clear(),G(U.stop,e),G(t.i,e),G(()=>E(`userSelect`),e),G(()=>E(`touchAction`),e),G(()=>In(null),e),G(ur.restore,e),G(()=>t.k(null),e),t.m(e,`Disposing React Grab failed`)});let{root:Rr,host:zr,cancelPendingAttachment:Br}=re(r);e.V(Br),e.V(Ne(zr).cleanup);let Vr=e.M(()=>f.store.theme.enabled),Hr=e.M(()=>f.store.theme.selectionBox.enabled),Ur=e.M(()=>f.store.theme.elementLabel.enabled),Wr=e.M(()=>f.store.theme.dragBox.enabled),Gr=e.M(()=>oe()||ve()&&!b()),Kr=e.M(()=>Dn().length>0),qr=e.M(()=>!Vr()||!Hr()||Gr()?!1:Kr()?!0:pn()),Jr=e.M(()=>{let e=fn();if(e)return t.P(e)||void 0}),Yr=e.M(()=>!Vr()||k()||!Ur()||Gr()?!1:pn()),Xr=new Map,Zr=n=>{let r=n.elements?.filter(e.f)??[],i=n.element,a=null;r.length>0?a=r.map(t.Y):i&&e.f(i)&&(a=[t.Y(i)]);let o=n.bounds,s=n.boundsMultiple;a&&(o=a.length>1?$e(pt(a)):a[0],n.boundsMultiple!==void 0&&(s=n.boundsMultiple.length>1&&n.boundsMultiple.length===n.elements?.length?a:[o]));let c=Xr.get(n.id),l=c?.boundsMultiple,u=l===s||l!==void 0&&s!==void 0&&l.length===s.length&&l.every((e,t)=>e.x===s[t].x&&e.y===s[t].y&&e.width===s[t].width&&e.height===s[t].height);if(c&&c.status===n.status&&c.errorMessage===n.errorMessage&&c.bounds.x===o.x&&c.bounds.y===o.y&&c.bounds.width===o.width&&c.bounds.height===o.height&&u)return c;let d=o.x+o.width/2,f=o.width/2,p;p=n.mouseXOffsetRatio!==void 0&&f>0?d+n.mouseXOffsetRatio*f:n.mouseXOffsetFromCenter===void 0?n.mouseX??d:d+n.mouseXOffsetFromCenter;let m={...n,bounds:o,boundsMultiple:s,mouseX:p};return Xr.set(n.id,m),m},Qr=e.M(()=>{if(!Vr()||!f.store.theme.grabbedBoxes.enabled)return[];g();let e=new Set(p.labelInstances.map(e=>e.id));for(let t of Xr.keys())e.has(t)||Xr.delete(t);return p.labelInstances.map(Zr)}),$r=e.M(()=>new Map(Qr().map(e=>[e.id,e]))),ei=new Map,ti=e.M(()=>{let e=Qr(),t=new Set(e.map(e=>e.id));for(let e of ei.keys())t.has(e)||ei.delete(e);return e.map(e=>{let t=ei.get(e.id);if(t)return t;let n=e.id,r={read:()=>$r().get(n)??null};return ei.set(n,r),r})}),ni=e.M(()=>!Vr()||!f.store.theme.grabbedBoxes.enabled?[]:(g(),p.grabbedBoxes.map(n=>e.f(n.element)?{...n,bounds:t.Y(n.element)}:n))),ri=e.M(()=>Vr()&&Wr()&&W()&&S()),ii=e.M(()=>w()?`processing`:`hover`),ai=e.M(()=>{if(!Vr())return!1;let e=Ur(),t=T(),n=w(),r=W(),i=x(),a=!!on(),o=ve(),s=b();return!e||t||o&&!s?!1:n?!0:r&&!i&&a}),oi=e.M(()=>{g();let e=p.contextMenuElement;return e?t.Y(e):null}),si=e.M(()=>(g(),p.contextMenuPosition)),ci=e.M(()=>{let e=p.contextMenuElement;if(!e)return;let n=p.frozenElements.length;return n>1?`${n} elements`:t.P(e)||void 0}),[li]=ie(()=>p.frozenElements.length>1?null:p.contextMenuElement),[ui]=e.P(()=>p.contextMenuElement,async e=>e?n.u(e):null),di=async e=>{m.incrementSelectionInteractionLockDepth();try{return await e()}finally{m.decrementSelectionInteractionLockDepth()}},fi=(e,n,r,i,a)=>async o=>{await di(async()=>{let s=a?.fallbackBounds??null,c=a?.fallbackSelectionBounds??[],l=a?.position??p.contextMenuPosition??h(),u=hn(),d=oi()??s,f=n.length>1,g=f?$e(pt(u)):d,_=p.wasActivatedByToggle,v;if(v=f?u:d?[d]:c,m.hideContextMenu(),g){let t=f?g.x+g.width/2:l.x,a=q.createInstance(g,r||`element`,i,`copying`,{element:e,mouseX:t,elements:f?n:void 0,boundsMultiple:v}),s=!1,c;try{s=await o(),s||(c=`Failed to copy`)}catch(e){c=Fe(e,`Action failed`)}q.updateAfterCopy(a,s,c)}else try{await o()}catch(e){t.l(new t.G(`Action failed without feedback bounds`,e))}_?Z():m.unfreeze()})},pi=()=>{setTimeout(()=>{m.hideContextMenu()},0)},mi=e=>{let{element:t,filePath:n,lineNumber:r,tagName:i,componentName:a,position:o,performWithFeedbackOptions:s,shouldDeferHideContextMenu:c,onBeforeCopy:l,onBeforePrompt:u,customEnterPromptMode:d}=e,h=p.frozenElements.length>0?p.frozenElements:[t],g=c?pi:m.hideContextMenu,_={element:t,elements:h,filePath:n,lineNumber:r,componentName:a,tagName:i,enterPromptMode:d??(()=>{q.clearAll(),Wn(),u?.(),Me(t,o.x,o.y),m.setPointer({x:o.x,y:o.y}),m.setFrozenElement(t),N(),y()||Ln(),g()}),copy:()=>{Wn(),l?.(),rn({element:t,cursorX:o.x,selectedElements:h.length>1?h:void 0,shouldDeactivateAfter:p.wasActivatedByToggle}),g()},hooks:{transformHtmlContent:f.hooks.transformHtmlContent,onOpenFile:f.hooks.onOpenFile,transformOpenFileUrl:f.hooks.transformOpenFileUrl},performWithFeedback:fi(t,h,i,a,s),hideContextMenu:g,cleanup:()=>{p.wasActivatedByToggle?Z():m.unfreeze()}},v=f.hooks.transformActionContext(_);return{..._,...v}},hi=e.M(()=>{let e=p.contextMenuElement;if(!e)return;let t=ui(),n=p.contextMenuPosition??h();return mi({element:e,filePath:t?.filePath,lineNumber:t?.lineNumber??void 0,tagName:ci(),componentName:li(),position:n,shouldDeferHideContextMenu:!0,onBeforeCopy:()=>{j.clear()},customEnterPromptMode:()=>{q.clearAll(),Wn(),m.clearInputText(),m.enterPromptMode(n,e),pi()}})}),gi=()=>{setTimeout(()=>{m.hideContextMenu(),Z()},0)},_i=()=>{if(!Ee)return null;let e=Ee.getBoundingClientRect(),t=Pt(e);return t===`left`||t===`right`?{x:t===`left`?e.right:e.left,y:e.top+e.height/2,edge:t}:{x:e.left+e.width/2,y:t===`top`?e.bottom:e.top,edge:t}},vi=(e,n)=>{let r=null,i=()=>{let a=e();a&&n(a),r=t.w(i)};return i(),()=>{r!==null&&(t.C(r),r=null)}};e.j(()=>{if(!un())return;let t=vi(_i,we);e.V(()=>{t(),we(null)})});let yi=()=>{A?.(),A=null,Se(null)},bi=()=>{m.hideContextMenu(),yi()},xi=()=>{xe()===null?(m.hideContextMenu(),A?.(),A=vi(_i,Se)):yi()},Si=e=>{ke({defaultAction:e}),V()&&Gn(e)},Ci=n=>{let r=p.labelInstances.find(e=>e.id===n);if(!r?.element||!e.f(r.element))return;let i=r.element,a=d(t.Y(i)),o={x:r.mouseX??a.x,y:a.y},s=r.elements&&r.elements.length>0?r.elements.filter(t=>e.f(t)):[i];setTimeout(()=>{yi(),y()||(m.setWasActivatedByToggle(!0),Ln()),m.setPointer(o),m.setFrozenElements(s),s.length>1&&r.bounds&&m.setFrozenDragRect(Qe(r.bounds)),m.freeze(),m.showContextMenu(o,i)},0)};e.j(()=>{let e=f.store.theme.hue;e===0?Rr.style.filter=``:Rr.style.filter=`hue-rotate(${e}deg)`}),f.store.theme.enabled&&Promise.resolve().then(()=>require(`./renderer-BdvHhkYY.cjs`)).then(({ReactGrabRenderer:t})=>{a||(c=e.y(()=>e.k(t,{get selectionVisible(){return qr()},get selectionBounds(){return vn()},get selectionBoundsMultiple(){return On()},get selectionShouldSnap(){return p.frozenElements.length>0||Dn().length>0},get selectionElementsCount(){return p.frozenElements.length},get frozenLabelEntryAccessors(){return An()},get pendingShiftPreviewEntry(){return jn()??void 0},get selectionFilePath(){return p.selectionFilePath??void 0},get selectionTagName(){return Jr()},get selectionComponentName(){return Tt()},get selectionLabelVisible(){return Yr()},selectionLabelStatus:`idle`,get hierarchyState(){return Dr()},get hierarchyMenuPosition(){return Ce()},get labelInstances(){return Qr()},get labelInstanceAccessors(){return ti()},get dragVisible(){return ri()},get dragBounds(){return Tn()},get grabbedBoxes(){return ni()},get mouseX(){return e.v(()=>p.frozenElements.length>1)()?void 0:Nn()??Mn().x},get isFrozen(){return b()||y()||ve()},get inputValue(){return p.inputText},get isPromptMode(){return T()},onShowContextMenuInstance:Ci,onRetryInstance:Yt,onAcknowledgeErrorInstance:Xt,get onLabelInstanceHoverChange(){return q.handleHoverChange},get onInputChange(){return m.setInputText},onInputSubmit:()=>void Bn(),get selectionLabelShakeCount(){return he()},onConfirmDismiss:Hn,onOpenSelectionFile:Cr,get discardPrompt(){return e.v(()=>!!j.isPendingDismiss())()?{isKeyboardSelection:!0,onConfirm:Hn,onCopy:gr}:ce()?{onConfirm:Hn,onCancel:Un}:void 0},get toolbarVisible(){return f.store.theme.toolbar.enabled},get isActive(){return y()},onToggleActive:Jn,get activeActionId(){return Dt()},get enabled(){return D()},get shakeCount(){return pe()},onToolbarStateChange:e=>{_e(e),e.enabled!==D()&&(fe(e.enabled),e.enabled||(Rn(),bi())),Rt(u,e)},onSubscribeToToolbarStateChanges:e=>(u.add(e),()=>{u.delete(e)}),onToolbarSelectHoverChange:ye,onToolbarRef:e=>{Ee=e},get contextMenuPosition(){return si()},get contextMenuBounds(){return oi()},get contextMenuTagName(){return ci()},get contextMenuComponentName(){return li()},get contextMenuHasFilePath(){return!!ui()?.filePath},get actions(){return f.store.actions},get actionContext(){return hi()},onContextMenuDismiss:gi,onContextMenuHide:pi,get toolbarMenuPosition(){return xe()},get toolbarMenuActions(){return f.store.actions.filter(e=>e.showInToolbarMenu===!0)},get defaultActionId(){return O()?.defaultAction??`copy`},get defaultActionLabel(){return Yn()},onSetDefaultAction:Si,onToggleToolbarMenu:xi,onToolbarMenuDismiss:yi}),Rr))}).catch(e=>{console.warn(`[react-grab] Failed to load renderer:`,e)});let wi={activate:()=>{m.setPendingCommentMode(!1),!y()&&D()&&zn()},deactivate:()=>{y()||w()?Z():J()},toggle:()=>{y()||w()?Z():D()&&zn()},comment:$n,isActive:()=>y(),isEnabled:()=>D(),setEnabled:e=>{e!==D()&&(fe(e),ke({enabled:e,collapsed:!e}),e||(Rn(),bi()))},getToolbarState:()=>O()??e.i(),setToolbarState:t=>{let n=O()??e.i(),r=t.collapsed??n?.collapsed??!1,i=t.defaultAction??n?.defaultAction??`copy`,a={edge:t.edge??n?.edge??`bottom`,ratio:t.ratio??n?.ratio??.5,collapsed:r,enabled:t.enabled??!r,defaultAction:it(i)};e.a(a),_e(a),a.enabled!==D()&&(fe(a.enabled),a.enabled||(Rn(),bi())),Rt(u,a)},onToolbarStateChange:e=>(u.add(e),()=>{u.delete(e)}),reset:()=>{Rn(),bi(),m.clearGrabbedBoxes(),q.clearAll(),m.setSelectionSource(null,null)},dispose:()=>{if(a)return;let e=[];a=!0,en=!1,G(J,e),G(q.clearAll,e),c&&G(c,e),c=void 0,A&&G(A,e),A=null,u.clear(),G(i,e),G(()=>Jt(wi),e),t.m(e,`Disposing React Grab failed`)},copyElement:async e=>{let t=Array.isArray(e)?e:[e];return t.length===0?!1:(await Zt(t,Vt())).status===`succeeded`},getSource:async e=>{let t=await n.u(e);return t?{filePath:t.filePath,lineNumber:t.lineNumber,columnNumber:t.columnNumber??null,componentName:t.componentName}:null},getStackContext:e=>n.s(e,{maxLines:f.store.options.maxContextLines}),getState:()=>({isActive:y(),isDragging:x(),isCopying:w(),isPromptMode:T(),isSelectionBoxVisible:!!qr(),isDragBoxVisible:!!ri(),targetElement:Y(),dragBounds:Tn()??null,grabbedBoxes:[...Pn()],labelInstances:[...Fn()],selectionFilePath:p.selectionFilePath,toolbarState:O()}),setOptions:e=>{f.setOptions(e)},registerPlugin:e=>{f.register(e,wi)},unregisterPlugin:e=>{f.unregister(e)},getPlugins:()=>f.getPluginNames(),getDisplayName:n.i};for(let e of Qt)f.register(e,wi);return queueMicrotask(()=>{if(a)return;let e=O();if(!e)return;let t=it(e.defaultAction??`copy`);t!==e.defaultAction&&ke({defaultAction:t})}),setTimeout(()=>{n.f(!0)},t.Pt),wi})};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Xt}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return tn}});
|
|
@@ -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-BOaH41eE.cjs`),t=Symbol(`error`);function n(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function r(e,i=a){let o=i&&i.context&&i.context[t],s=n(e);if(!o)throw s;try{for(let e of o)e(s)}catch(e){r(e,i&&i.owner||null)}}const i={context:null,owner:null,owned:null,cleanups:null};let a=null;function o(){let e={owner:a,context:a?a.context:null,owned:null,cleanups:null};return a&&(a.owned?a.owned.push(e):a.owned=[e]),e}function s(e,t){let n=a,o=t===void 0?n:t,s=e.length===0?i:{context:o?o.context:null,owner:o,owned:null,cleanups:null};a=s;let c;try{c=e(e.length===0?()=>{}:()=>g(s))}catch(e){r(e)}finally{a=n}return c}function c(e,t){return[()=>e,t=>e=typeof t==`function`?t(e):t]}function l(e,t){a=o();try{e(t)}catch(e){r(e)}finally{a=a.owner}}const u=l;function d(e,t){}function f(e,t){a=o();let n;try{n=e(t)}catch(e){r(e)}finally{a=a.owner}return()=>n}function p(e){return e()}const m=p;function ee(e,t,n={}){let r=Array.isArray(e),i=n.defer;return()=>{if(i)return;let n;if(r){n=[];for(let t=0;t<e.length;t++)n.push(e[t]())}else n=e();return t(n)}}function h(e){}function te(e){return a&&(a.cleanups?a.cleanups.push(e):a.cleanups=[e]),e}function g(e){if(e.owned){for(let t=0;t<e.owned.length;t++)g(e.owned[t]);e.owned=null}if(e.cleanups){for(let t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}}function _(e){let t=Symbol(`context`);return{id:t,Provider:b(t),defaultValue:e}}function v(e){return a&&a.context&&a.context[e.id]!==void 0?a.context[e.id]:e.defaultValue}function ne(){return a}function re(e){let t=f(()=>y(e()));return t.toArray=()=>{let e=t();return Array.isArray(e)?e:e==null?[]:[e]},t}function y(e){if(typeof e==`function`&&!e.length)return y(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=y(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function b(e){return function(t){return f(()=>(a.context={...a.context,[e]:t.value},re(()=>t.children)))}}function x(e,t,n={}){let r=e(),i=[];if(r&&r.length)for(let e=0,n=r.length;e<n;e++)i.push(t(r[e],()=>e));else n.fallback&&(i=[n.fallback()]);return()=>i}const S={context:void 0,getContextId(){if(!this.context)throw Error(`getContextId cannot be used under non-hydrating context`);return C(this.context.count)},getNextContextId(){if(!this.context)throw Error(`getNextContextId cannot be used under non-hydrating context`);return C(this.context.count++)}};function C(e){let t=String(e),n=t.length-1;return S.context.id+(n?String.fromCharCode(96+n):``)+t}function w(e){S.context=e}function ie(){return S.context?{...S.context,id:S.getNextContextId(),count:0}:void 0}function ae(e,t){if(S.context&&!S.context.noHydrate){let n=S.context;w(ie());let r=e(t||{});return w(n),r}return e(t||{})}function oe(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`&&(r=r()),r){let n=Object.getOwnPropertyDescriptors(r);for(let r in n)r in t||Object.defineProperty(t,r,{enumerable:!0,get(){for(let t=e.length-1;t>=0;t--){let n,i=e[t];if(typeof i==`function`&&(i=i()),n=(i||{})[r],n!==void 0)return n}}})}}return t}function se(e,...t){let n=Object.getOwnPropertyDescriptors(e),r=e=>{let t={};for(let r=0;r<e.length;r++){let i=e[r];n[i]&&(Object.defineProperty(t,i,n[i]),delete n[i])}return t};return t.map(r).concat(r(Object.keys(n)))}function ce(e,t){let n=e.each||[],r=n.length,i=e.children;if(r){let e=Array(r);for(let a=0;a<r;a++)e[a]=t(i,n[a],a);return e}return e.fallback}function le(e){return ce(e,(e,t,n)=>e(t,()=>n))}function ue(e){let t;return e.when?typeof(t=e.children)==`function`?t(e.keyed?e.when:()=>e.when):t:e.fallback||``}const de=_();let T=null;function fe(e,t,r={}){typeof t!=`function`&&(r=t||{},t=e,e=!0);let i=new Set,a=S.getNextContextId(),o={},s=r.storage?r.storage(r.initialValue)[0]():r.initialValue,c,l;if(S.context.async&&r.ssrLoadFrom!==`initial`&&(o=S.context.resources[a]||(S.context.resources[a]={}),o.ref))return!o.data&&!o.ref[0]._loading&&!o.ref[0].error&&o.ref[1].refetch(),o.ref;let u=()=>{if(l)throw l;let e=r.ssrLoadFrom!==`initial`&&S.context.async&&`data`in S.context.resources[a];if(!e&&T&&T.push(a),!e&&d._loading){let e=v(de);e&&(e.resources.set(a,d),i.add(e))}return e},d=()=>u()?S.context.resources[a].data:s,f=()=>(u(),d._loading);d._loading=!1,d.error=void 0,d.state=`initialValue`in r?`ready`:`unresolved`,Object.defineProperties(d,{latest:{get(){return d()}},loading:{get(){return f()}}});function p(){let o=S.context;if(!o.async)return d._loading=!!(typeof e==`function`?e():e);if(o.resources&&a in o.resources&&`data`in o.resources[a]){s=o.resources[a].data;return}let u;try{if(T=[],u=typeof e==`function`?e():e,T.length)return}finally{T=null}if(!c){if(u==null||u===!1)return;c=t(u,{value:s})}return typeof c==`object`&&c&&`then`in c?(d._loading=!0,d.state=`pending`,c=c.then(e=>(d._loading=!1,d.state=`ready`,o.resources[a].data=e,c=null,E(i),e)).catch(e=>{throw d._loading=!1,d.state=`errored`,d.error=l=n(e),c=null,E(i),l}),o.serialize&&o.serialize(a,c,r.deferStream),c):(o.resources[a].data=c,o.serialize&&o.serialize(a,c),c=null,o.resources[a].data)}r.ssrLoadFrom!==`initial`&&p();let m=[d,{refetch:p,mutate:e=>s=e}];return c&&(o.ref=m),m}function pe(e){for(let t of e.resources.values())if(t._loading)return!1;return!0}function E(e){for(let t of e)pe(t)&&(t.completed(),e.delete(t))}const me=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),he=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),ge=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),_e=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function D(e,t){let n=_e[e];return typeof n==`object`?n[t]?n.$:void 0:n}const O=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),k={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},A=e=>f(()=>e());function j(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}const M=`_$DX_DELEGATE`;function N(e,t,n,r={}){let i;return s(r=>{i=r,t===document?e():H(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function P(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>m(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function F(e,t=window.document){let n=t[M]||(t[M]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,we))}}function I(e,t,n){U(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function ve(e,t,n,r){U(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function ye(e,t,n){U(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function L(e,t){U(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function R(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function z(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(W(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(W(e,i,!0),n[i]=o)}return n}function B(e,t,n){if(!t)return n?I(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function be(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function xe(e,t={},n,r){let i={};return r||u(()=>i.children=K(e,t.children,i.children)),u(()=>typeof t.ref==`function`&&V(t.ref,e)),u(()=>Se(e,t,n,!0,i,!0)),i}function V(e,t,n){return m(()=>e(t,n))}function H(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return K(e,t,r,n);u(r=>K(e,t(),r,n),r)}function Se(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=G(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||K(e,t.children);continue}let s=t[o];i[o]=G(e,o,s,i[o],n,a,t)}}function U(e){return!!S.context&&!S.done&&(!e||e.isConnected)}function Ce(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function W(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function G(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return B(e,n,r);if(t===`classList`)return z(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=O.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(R(e,i,n,a),a&&F([i]))}else if(t.slice(0,5)===`attr:`)I(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)ye(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=he.has(t))||!i&&((u=D(t,e.tagName))||(c=me.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(U(e))return n;t===`class`||t===`className`?L(e,n):s&&!c&&!l?e[Ce(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&k[t.split(`:`)[0]];r?ve(e,r,t,n):I(e,ge[t]||t,n)}return n}function we(e){if(S.registry&&S.events&&S.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,`target`,{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,`currentTarget`,{configurable:!0,get(){return t||document}}),S.registry&&!S.done&&(S.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function K(e,t,n,r,i){let a=U(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=Y(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=Y(e,n,r)}else if(o===`function`)return u(()=>{let i=t();for(;typeof i==`function`;)i=i();n=K(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(q(o,t,n,i))return u(()=>n=K(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=Y(e,n,r),s)return n}else c?n.length===0?J(e,o,r):j(e,n,o):(n&&Y(e),J(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Y(e,n,r,t);Y(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function q(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=q(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=q(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function J(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Y(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}const Te=t=>{if(!t)return!1;let n=e.Z(t);return n?n.isConnected():!!(t.isConnected||t.ownerDocument?.contains(t))},Ee=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],De=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},Oe=t=>{if(document.designMode===`on`)return!0;let n=De(t);if(!n)return!1;if(n.isContentEditable)return!0;let r=e.P(n);return Ee.some(e=>e===r||e===n.role)},ke=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},Ae=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},X=(e,t,n)=>Math.max(t,Math.min(e,n));let Z=null;const je=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},Me=()=>{if(Z===null){if(typeof navigator>`u`)return Z=!1,Z;let e=navigator.platform??je()??navigator.userAgent;Z=/Mac|iPhone|iPad|iPod/i.test(e)}return Z},Ne=(t,n)=>{try{return t.composedPath().some(t=>e.ft(t)&&t.hasAttribute(n))}catch{return!1}},Q=`react-grab-toolbar-state`,Pe=()=>{try{let t=localStorage.getItem(Q);if(!t)return null;let n=JSON.parse(t);if(typeof n!=`object`||!n)return null;let r=n,i=typeof r.collapsed==`boolean`?r.collapsed:!1;return{edge:r.edge===`top`||r.edge===`bottom`||r.edge===`left`||r.edge===`right`?r.edge:`bottom`,ratio:typeof r.ratio==`number`?r.ratio:e.nn,collapsed:i,enabled:!i,defaultAction:typeof r.defaultAction==`string`?r.defaultAction:e.yt}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},Fe=e=>{try{localStorage.setItem(Q,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},Ie=e=>e.key===`Enter`,Le=e=>e.metaKey||e.ctrlKey,Re=(e,t,n={})=>{if(!t.key)return null;if(Ie(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return Le(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null},ze=e=>e??!0,$=(t,n)=>{if(typeof t.enabled==`function`){if(!n)return!1;try{return t.enabled(n)}catch(n){return e.l(new e.F(t.id,n)),!1}}return ze(t.enabled)},Be=(t,n)=>{if(!$(t,n))return!1;try{let r=t.onAction(n);r&&r.catch(n=>{e.l(new e.I(t.id,n))})}catch(n){e.l(new e.I(t.id,n))}return!0};Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return oe}});
|
|
@@ -0,0 +1,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
|
+
import{F as e,I as t,P as n,Z as r,ft as i,l as a,nn as o,yt as s}from"./freeze-updates-K6zUt3iB.js";const c={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return l(this.context.count)},getNextContextId(){return l(this.context.count++)}};function l(e){let t=String(e),n=t.length-1;return c.context.id+(n?String.fromCharCode(96+n):``)+t}function u(e){c.context=e}const d=(e,t)=>e===t,f=Symbol(`solid-proxy`),p=typeof Proxy==`function`,m=Symbol(`solid-track`),h={equals:d};let g=me;const _={owned:null,cleanups:null,context:null,owner:null},v={};var y=null;let b=null,x=null,S=null,C=null,w=0;function T(e,t){let n=x,r=y,i=e.length===0,a=t===void 0?r:t,o=i?_:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>M(()=>H(o)));y=o,x=null;try{return B(s,!0)}finally{x=n,y=r}}function E(e,t){t=t?Object.assign({},h,t):h;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[ue.bind(n),e=>(typeof e==`function`&&(e=b&&b.running&&b.sources.has(n)?e(n.tValue):e(n.value)),de(n,e))]}function ee(e,t,n){L(R(e,t,!0,1))}function D(e,t,n){L(R(e,t,!1,1))}function O(e,t,n){g=he;let r=R(e,t,!1,1),i=I&&F(I);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),C?C.push(r):L(r)}function k(e,t,n){n=n?Object.assign({},h,n):h;let r=R(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,L(r),ue.bind(r)}function te(e){return e&&typeof e==`object`&&`then`in e}function A(e,t,n){let r,i,a;typeof t==`function`?(r=e,i=t,a=n||{}):(r=!0,i=e,a=t||{});let o=null,s=v,l=null,u=!1,d=!1,f=`initialValue`in a,p=typeof r==`function`&&k(r),m=new Set,[h,g]=(a.storage||E)(a.initialValue),[_,S]=E(void 0),[C,w]=E(void 0,{equals:!1}),[T,D]=E(f?`ready`:`unresolved`);c.context&&(l=c.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:c.load&&c.has(l)&&(s=c.load(l)));function O(e,t,n,r){return o===e&&(o=null,r!==void 0&&(f=!0),(e===s||t===s)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(r,{value:t})),s=v,b&&e&&u?(b.promises.delete(e),u=!1,B(()=>{b.running=!0,A(t,n)},!1)):A(t,n)),t}function A(e,t){B(()=>{t===void 0&&g(()=>e),D(t===void 0?f?`ready`:`unresolved`:`errored`),S(t);for(let e of m.keys())e.decrement();m.clear()},!1)}function j(){let e=I&&F(I),t=h(),n=_();if(n!==void 0&&!o)throw n;return x&&!x.user&&e&&ee(()=>{C(),o&&(e.resolved&&b&&u?b.promises.add(o):m.has(e)||(e.increment(),m.add(e)))}),t}function N(e=!0){if(e!==!1&&d)return;d=!1;let t=p?p():r;if(u=b&&b.running,t==null||t===!1){O(o,M(h));return}b&&o&&b.promises.delete(o);let n,a=s===v?M(()=>{try{return i(t,{value:h(),refetching:e})}catch(e){n=e}}):s;if(n!==void 0){O(o,void 0,U(n),t);return}else if(!te(a))return O(o,a,void 0,t),a;return o=a,`v`in a?(a.s===1?O(o,a.v,void 0,t):O(o,void 0,U(a.v),t),a):(d=!0,queueMicrotask(()=>d=!1),B(()=>{D(f?`refreshing`:`pending`),w()},!1),a.then(e=>O(a,e,void 0,t),e=>O(a,void 0,U(e),t)))}Object.defineProperties(j,{state:{get:()=>T()},error:{get:()=>_()},loading:{get(){let e=T();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return j();let e=_();if(e&&!o)throw e;return h()}}});let P=y;return p?ee(()=>(P=y,N(!1))):N(!1),[j,{refetch:e=>ae(P,()=>N(e)),mutate:g}]}function j(e){return B(e,!1)}function M(e){if(x===null)return e();let t=x;x=null;try{return e()}finally{x=t}}function N(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=M(()=>t(o,i,n));return i=o,s}}function P(e){O(()=>M(e))}function ne(e){return y===null||(y.cleanups===null?y.cleanups=[e]:y.cleanups.push(e)),e}function re(){return x}function ie(){return y}function ae(e,t){let n=y,r=x;y=e,x=null;try{return B(t,!0)}catch(e){W(e)}finally{y=n,x=r}}const[oe,se]=E(!1);function ce(e,t){let n=Symbol(`context`);return{id:n,Provider:ve(n),defaultValue:e}}function F(e){let t;return y&&y.context&&(t=y.context[e.id])!==void 0?t:e.defaultValue}function le(e){let t=k(e),n=k(()=>G(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}let I;function ue(){let e=b&&b.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===1)L(this);else{let e=S;S=null,B(()=>V(this),!1),S=e}if(x){let e=this.observers?this.observers.length:0;x.sources?(x.sources.push(this),x.sourceSlots.push(e)):(x.sources=[this],x.sourceSlots=[e]),this.observers?(this.observers.push(x),this.observerSlots.push(x.sources.length-1)):(this.observers=[x],this.observerSlots=[x.sources.length-1])}return e&&b.sources.has(this)?this.tValue:this.value}function de(e,t,n){let r=b&&b.running&&b.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(b){let r=b.running;(r||!n&&b.sources.has(e))&&(b.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&B(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=b&&b.running;r&&b.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?S.push(n):C.push(n),n.observers&&ge(n)),r?n.tState=1:n.state=1)}if(S.length>1e6)throw S=[],Error()},!1)}return t}function L(e){if(!e.fn)return;H(e);let t=w;fe(e,b&&b.running&&b.sources.has(e)?e.tValue:e.value,t),b&&!b.running&&b.sources.has(e)&&queueMicrotask(()=>{B(()=>{b&&(b.running=!0),x=y=e,fe(e,e.tValue,t),x=y=null},!1)})}function fe(e,t,n){let r,i=y,a=x;x=y=e;try{r=e.fn(t)}catch(t){return e.pure&&(b&&b.running?(e.tState=1,e.tOwned&&e.tOwned.forEach(H),e.tOwned=void 0):(e.state=1,e.owned&&e.owned.forEach(H),e.owned=null)),e.updatedAt=n+1,W(t)}finally{x=a,y=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?de(e,r,!0):b&&b.running&&e.pure?(b.sources.has(e)||(e.value=r),b.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function R(e,t,n,r=1,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:y,context:y?y.context:null,pure:n};return b&&b.running&&(a.state=0,a.tState=r),y===null||y!==_&&(b&&b.running&&y.pure?y.tOwned?y.tOwned.push(a):y.tOwned=[a]:y.owned?y.owned.push(a):y.owned=[a]),a}function z(e){let t=b&&b.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===2)return V(e);if(e.suspense&&M(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<w);){if(t&&b.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(b.disposed.has(t))return}if((t?e.tState:e.state)===1)L(e);else if((t?e.tState:e.state)===2){let t=S;S=null,B(()=>V(e,n[0]),!1),S=t}}}function B(e,t){if(S)return e();let n=!1;t||(S=[]),C?n=!0:C=[],w++;try{let t=e();return pe(n),t}catch(e){n||(C=null),S=null,W(e)}}function pe(e){if(S&&=(me(S),null),e)return;let t;if(b){if(!b.promises.size&&!b.queue.size){let e=b.sources,n=b.disposed;C.push.apply(C,b.effects),t=b.resolve;for(let e of C)`tState`in e&&(e.state=e.tState),delete e.tState;b=null,B(()=>{for(let e of n)H(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)H(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}se(!1)},!1)}else if(b.running){b.running=!1,b.effects.push.apply(b.effects,C),C=null,se(!0);return}}let n=C;C=null,n.length&&B(()=>g(n),!1),t&&t()}function me(e){for(let t=0;t<e.length;t++)z(e[t])}function he(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:z(r)}if(c.context){if(c.count){c.effects||=[],c.effects.push(...e.slice(0,n));return}u()}for(c.effects&&(c.done||!c.count)&&(e=[...c.effects,...e],n+=c.effects.length,delete c.effects),t=0;t<n;t++)z(e[t])}function V(e,t){let n=b&&b.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===1?i!==t&&(!i.updatedAt||i.updatedAt<w)&&z(i):e===2&&V(i,t)}}}function ge(e){let t=b&&b.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=2:r.state=2,r.pure?S.push(r):C.push(r),r.observers&&ge(r))}}function H(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)H(e.tOwned[t]);delete e.tOwned}if(b&&b.running&&e.pure)_e(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)H(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}b&&b.running?e.tState=0:e.state=0}function _e(e,t){if(t||(e.tState=0,b.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)_e(e.owned[t])}function U(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function W(e,t=y){throw U(e)}function G(e){if(typeof e==`function`&&!e.length)return G(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=G(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function ve(e,t){return function(t){let n;return D(()=>n=M(()=>(y.context={...y.context,[e]:t.value},le(()=>t.children))),void 0),n}}const ye=Symbol(`fallback`);function be(e){for(let t=0;t<e.length;t++)e[t]()}function xe(e,t,n={}){let r=[],i=[],a=[],o=0,s=t.length>1?[]:null;return ne(()=>be(a)),()=>{let c=e()||[],l=c.length,u,d;return c[m],M(()=>{let e,t,p,m,h,g,_,v,y;if(l===0)o!==0&&(be(a),a=[],r=[],i=[],o=0,s&&=[]),n.fallback&&(r=[ye],i[0]=T(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(l),d=0;d<l;d++)r[d]=c[d],i[d]=T(f);o=l}else{for(p=Array(l),m=Array(l),s&&(h=Array(l)),g=0,_=Math.min(o,l);g<_&&r[g]===c[g];g++);for(_=o-1,v=l-1;_>=g&&v>=g&&r[_]===c[v];_--,v--)p[v]=i[_],m[v]=a[_],s&&(h[v]=s[_]);for(e=new Map,t=Array(v+1),d=v;d>=g;d--)y=c[d],u=e.get(y),t[d]=u===void 0?-1:u,e.set(y,d);for(u=g;u<=_;u++)y=r[u],d=e.get(y),d!==void 0&&d!==-1?(p[d]=i[u],m[d]=a[u],s&&(h[d]=s[u]),d=t[d],e.set(y,d)):a[u]();for(d=g;d<l;d++)d in p?(i[d]=p[d],a[d]=m[d],s&&(s[d]=h[d],s[d](d))):i[d]=T(f);i=i.slice(0,o=l),r=c.slice(0)}return i});function f(e){if(a[d]=e,s){let[e,n]=E(d);return s[d]=n,t(c[d],e)}return t(c[d])}}}function Se(e,t){return M(()=>e(t||{}))}function K(){return!0}const q={get(e,t,n){return t===f?n:e.get(t)},has(e,t){return t===f?!0:e.has(t)},set:K,deleteProperty:K,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:K,deleteProperty:K}},ownKeys(e){return e.keys()}};function J(e){return(e=typeof e==`function`?e():e)?e:{}}function Ce(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function we(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&f in r,e[n]=typeof r==`function`?(t=!0,k(r)):r}if(p&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=J(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in J(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(J(e[n])));return[...new Set(t)]}},q);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:Ce.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},a=Object.keys(r);for(let e=a.length-1;e>=0;e--){let t=a[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function Te(e,...t){let n=t.length;if(p&&f in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},q));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return r.includes(t)?!1:t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},q)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}const Ee=e=>`Stale read from <${e}>.`;function De(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return k(xe(()=>e.each,e.children,t||void 0))}function Oe(e){let t=e.keyed,n=k(()=>e.when,void 0,void 0),r=t?n:k(n,void 0,{equals:(e,t)=>!e==!t});return k(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?M(()=>a(t?i:()=>{if(!M(r))throw Ee(`Show`);return n()})):a}return e.fallback},void 0,void 0)}const ke=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Ae=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),je=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Me=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Ne(e,t){let n=Me[e];return typeof n==`object`?n[t]?n.$:void 0:n}const Pe=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Fe={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},Ie=e=>k(()=>e());function Le(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}const Re=`_$DX_DELEGATE`;function ze(e,t,n,r={}){let i;return T(r=>{i=r,t===document?e():Ze(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Be(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>M(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Ve(e,t=window.document){let n=t[Re]||(t[Re]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,nt))}}function Y(e,t,n){X(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function He(e,t,n,r){X(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Ue(e,t,n){X(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function We(e,t){X(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function Ge(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function Ke(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(et(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(et(e,i,!0),n[i]=o)}return n}function qe(e,t,n){if(!t)return n?Y(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function Je(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Ye(e,t={},n,r){let i={};return r||D(()=>i.children=Z(e,t.children,i.children)),D(()=>typeof t.ref==`function`&&Xe(t.ref,e)),D(()=>Qe(e,t,n,!0,i,!0)),i}function Xe(e,t,n){return M(()=>e(t,n))}function Ze(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return Z(e,t,r,n);D(r=>Z(e,t(),r,n),r)}function Qe(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=tt(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||Z(e,t.children);continue}let s=t[o];i[o]=tt(e,o,s,i[o],n,a,t)}}function X(e){return!!c.context&&!c.done&&(!e||e.isConnected)}function $e(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function et(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function tt(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return qe(e,n,r);if(t===`classList`)return Ke(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=Pe.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(Ge(e,i,n,a),a&&Ve([i]))}else if(t.slice(0,5)===`attr:`)Y(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Ue(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Ae.has(t))||!i&&((u=Ne(t,e.tagName))||(c=ke.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(X(e))return n;t===`class`||t===`className`?We(e,n):s&&!c&&!l?e[$e(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Fe[t.split(`:`)[0]];r?He(e,r,t,n):Y(e,je[t]||t,n)}return n}function nt(e){if(c.registry&&c.events&&c.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,`target`,{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,`currentTarget`,{configurable:!0,get(){return t||document}}),c.registry&&!c.done&&(c.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function Z(e,t,n,r,i){let a=X(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=Q(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=Q(e,n,r)}else if(o===`function`)return D(()=>{let i=t();for(;typeof i==`function`;)i=i();n=Z(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(rt(o,t,n,i))return D(()=>n=Z(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=Q(e,n,r),s)return n}else c?n.length===0?it(e,o,r):Le(e,n,o):(n&&Q(e),it(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Q(e,n,r,t);Q(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function rt(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=rt(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=rt(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function it(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Q(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}const at=e=>{if(!e)return!1;let t=r(e);return t?t.isConnected():!!(e.isConnected||e.ownerDocument?.contains(e))},ot=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],st=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},ct=e=>{if(document.designMode===`on`)return!0;let t=st(e);if(!t)return!1;if(t.isContentEditable)return!0;let r=n(t);return ot.some(e=>e===r||e===t.role)},lt=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},ut=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},dt=(e,t,n)=>Math.max(t,Math.min(e,n));let $=null;const ft=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},pt=()=>{if($===null){if(typeof navigator>`u`)return $=!1,$;let e=navigator.platform??ft()??navigator.userAgent;$=/Mac|iPhone|iPad|iPod/i.test(e)}return $},mt=(e,t)=>{try{return e.composedPath().some(e=>i(e)&&e.hasAttribute(t))}catch{return!1}},ht=`react-grab-toolbar-state`,gt=()=>{try{let e=localStorage.getItem(ht);if(!e)return null;let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.collapsed==`boolean`?n.collapsed:!1;return{edge:n.edge===`top`||n.edge===`bottom`||n.edge===`left`||n.edge===`right`?n.edge:`bottom`,ratio:typeof n.ratio==`number`?n.ratio:o,collapsed:r,enabled:!r,defaultAction:typeof n.defaultAction==`string`?n.defaultAction:s}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},_t=e=>{try{localStorage.setItem(ht,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},vt=e=>e.key===`Enter`,yt=e=>e.metaKey||e.ctrlKey,bt=(e,t,n={})=>{if(!t.key)return null;if(vt(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return yt(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null},xt=e=>e??!0,St=(t,n)=>{if(typeof t.enabled==`function`){if(!n)return!1;try{return t.enabled(n)}catch(n){return a(new e(t.id,n)),!1}}return xt(t.enabled)},Ct=(e,n)=>{if(!St(e,n))return!1;try{let r=e.onAction(n);r&&r.catch(n=>{a(new t(e.id,n))})}catch(n){a(new t(e.id,n))}return!0};export{j as A,ie as B,qe as C,m as D,f as E,D as F,P as G,we as H,A as I,F as J,Te as K,T as L,ce as M,O as N,De as O,k as P,E as R,Ye as S,Xe as T,N as U,xe as V,ne as W,Ze as _,_t as a,Y as b,dt as c,ct as d,at as f,Ve as g,We as h,gt as i,Se as j,Oe as k,lt as l,Ke as m,St as n,mt as o,Ge as p,M as q,bt as r,pt as s,Ct as t,ut as u,Ie as v,Be as w,Je as x,ze as y,re as z};
|
|
@@ -40,4 +40,4 @@ iframe[${te}] { pointer-events: auto !important; }`,_n=new Set,k=new Map;let A=!
|
|
|
40
40
|
animation-play-state: paused !important;
|
|
41
41
|
transition: none !important;
|
|
42
42
|
}
|
|
43
|
-
`,n.didUseCssFreeze=!0;else for(let t of e.runningAnimations)t.pause(),n.frozenWaapiAnimations.push(t);Rr(Ir(Array.from(e.targetDocument.querySelectorAll(`svg`))),n.frozenSvgElements)},Xr=e=>{Mr.add(e);try{Pr()&&Yr(qr(e))}catch(t){Mr.delete(e);let n=Jr(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{Mr.delete(e),j(Jr(e),`Unfreezing frame animations failed`)}},Zr=()=>Pr()?[]:(Mr.add(document),[...Mr].map(qr)),Qr=e=>{if(!Pr()){for(let t of e)Yr(t);Er()}},$r=()=>{if(!Pr())return;let e=[];for(let t of[...X.keys()])e.push(...Jr(t));try{Dr()}catch(t){e.push(t)}j(e,`Unfreezing global animations failed`)},ei=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!nn(n)&&(g(n)&&t.add(n),n.shadowRoot&&ei(n.shadowRoot,t),_(n))){let e=O(n);e&&ei(e,t)}},ti=()=>{let e=new Set;return ei(document,e),[...e]},ni=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],ri=[`focus`,`blur`,`focusin`,`focusout`],ii=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],ai=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],oi=new Map,si=new Map,ci=new Set;let li=!1;const ui=e=>{e.stopImmediatePropagation()},di=e=>{e.preventDefault(),e.stopImmediatePropagation()},fi=e=>{for(let t of ni)e.addEventListener(t,ui,!0);for(let t of ri)e.addEventListener(t,di,!0)},pi=e=>{for(let t of ni)e.removeEventListener(t,ui,!0);for(let t of ri)e.removeEventListener(t,di,!0)},mi=e=>{ci.add(e);let t=xn(e);return li&&fi(e),()=>{li&&pi(e),ci.delete(e),t()}},hi=(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}},gi=(e,t)=>{let n=[],r=qt(e,t);for(;r&&r!==document.documentElement&&!nn(r);)g(r)&&n.push(r),r=Nt(r);return n},_i=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;){if(g(t)&&e.push(t),t.shadowRoot?.activeElement){t=t.shadowRoot.activeElement;continue}if(_(t)){t=O(t)?.activeElement??null;continue}t=null}return e},vi=(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`)}},yi=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},bi=(e,t)=>{if(bn())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?gi(e,t):ti();for(let e of r){let t=hi(e,ii);t&&n.push(t)}let i=[];for(let e of _i()){let t=hi(e,ai,si);t&&i.push(t)}return{hoverStates:n,focusStates:i}},xi=e=>{if(e){li=!0,ci.add(document);for(let e of ci)fi(e);vi(e.hoverStates,oi),vi(e.focusStates,si),Sn()}},Si=()=>{br(),li=!1;for(let e of ci)pi(e);let e=[...yi(oi),...yi(si)];try{Cn()}catch(t){e.push(t)}j(e,`Unfreezing pseudo states failed`)},Ci=()=>{let e=[];try{An()}catch(t){e.push(t)}try{Si()}catch(t){e.push(t)}try{$r()}catch(t){e.push(t)}return e},wi=(e,t)=>{let n=bi(e,t),r=Zr();try{xi(n),Qr(r),kn()}catch(e){let t=Ci();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},Ti=()=>{j(Ci(),`Unfreezing global interactions failed`)};let Q=!1,Ei=0;const Di=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},Oi=new WeakMap,ki=new WeakMap,Ai=new WeakMap,ji=new Set,Mi=[],$=[],Ni=new WeakMap,Pi=new WeakMap,Fi=new WeakSet,Ii=Be,Li=new Set,Ri=e=>e.rendererPackageName.startsWith(`react-dom`),zi=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},Bi=e=>{let t=e.current?.stateNode;if(!t||typeof t!=`object`)return!1;let n=Reflect.get(t,`containerInfo`);return!!(n&&typeof n==`object`&&typeof Reflect.get(n,`nodeType`)==`number`)},Vi=()=>{if(Ii.size>0){let e=new Set;for(let t of Ii)Bi(t)&&e.add(t);return e}let e=new Set,t=n=>{let r=ot(n);if(r){let t=zi(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},Hi=(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},Ui=e=>{if(!e||Ni.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=()=>Q?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>Q?null:n,set:e=>{if(Q){e!==null&&(t.bufferedPending=Hi(t.bufferedPending??null,e));return}n=e}}),Ni.set(e,t)},Wi=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},Gi=e=>{let t=Ni.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=Wi(t.pendingValueAtPause??null),r=Wi(t.bufferedPending??null);for(let t of[...e,...r])$.push(()=>n(t))}Ni.delete(e)},Ki=e=>{if(Pi.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return Q?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(Q){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),Pi.set(e,t)},qi=e=>{let t=Pi.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),Pi.delete(e))},Ji=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Ui(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Ki(n),n=n.next},Yi=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Gi(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)qi(n),n=n.next},Xi=e=>{let t=e;for(;t;){if(ke(t)&&Ji(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}},Zi=e=>{let t=e;for(;t;){if(ke(t)&&Yi(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}},Qi=e=>{if(Oi.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};Oi.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!Q||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Di(ki,a,()=>(...e)=>{Q?$.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!Q||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Di(ki,a,()=>(...e)=>{Q?$.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!Q||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Di(Ai,a,()=>e=>{Q?Mi.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>Q?n.useSyncExternalStore(t=>e(()=>{Q?ji.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},$i=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`&&Qi(r),r),set:e=>{r=e}})},ea=e=>{queueMicrotask(()=>{try{for(let t of x().renderers.values())if(Ri(t)&&typeof t.scheduleUpdate==`function`){for(let n of e)if(n.current)try{t.scheduleUpdate(n.current)}catch(e){B(new D(`scheduleUpdate failed during unfreeze`,e))}}}catch(e){B(new D(`scheduleReactUpdate failed`,e))}})},ta=e=>{for(let t of e)try{t()}catch(e){B(new D(`Callback failed during state replay`,e))}},na=()=>{for(let e of x().renderers.values())Ri(e)&&(Fi.has(e)||($i(e),Fi.add(e)))},ra=()=>{ji.clear(),Mi.length=0,$.length=0},ia=()=>{let e=new Set(Li);try{for(let t of Vi())e.add(t)}catch(e){B(new D(`Collecting fiber roots failed during unfreeze`,e))}Li.clear(),Q=!1;for(let t of e)try{Zi(t.current)}catch(e){B(new D(`Resuming a fiber root failed during unfreeze`,e))}let t=Array.from(ji),n=Mi.slice(),r=$.slice();ra(),ta(t),ta(n),ta(r),Q||ea(e)},aa=()=>{let e=Ei===0;if(Ei+=1,e)try{na(),Q=!0;let e=Vi();for(let t of e)Li.add(t),Xi(t.current)}catch(e){throw--Ei,Q&&ia(),e}let t=!1;return()=>{t||(t=!0,--Ei,Ei===0&&ia())}},oa=()=>{try{return aa()}catch(e){return B(new D(`Pausing React updates failed`,e)),()=>{}}};Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,`$t`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(exports,`At`,{enumerable:!0,get:function(){return 5e3}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,`Bt`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return .75}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,`Dt`,{enumerable:!0,get:function(){return 2e3}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(exports,`Et`,{enumerable:!0,get:function(){return`edit`}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`Ft`,{enumerable:!0,get:function(){return`#00000000`}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`Gt`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,`Ht`,{enumerable:!0,get:function(){return .18}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,`It`,{enumerable:!0,get:function(){return`transparent`}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`Jt`,{enumerable:!0,get:function(){return-1e3}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`Kt`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`Lt`,{enumerable:!0,get:function(){return 1500}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(exports,`Mt`,{enumerable:!0,get:function(){return 12e3}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return jt}}),Object.defineProperty(exports,`Nt`,{enumerable:!0,get:function(){return 9e3}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,`Ot`,{enumerable:!0,get:function(){return 1e4}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,`Pt`,{enumerable:!0,get:function(){return`cubic-bezier(0.34, 1.56, 0.64, 1)`}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`Qt`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,`Rt`,{enumerable:!0,get:function(){return 1.2}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return .7}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`Tt`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`Ut`,{enumerable:!0,get:function(){return 1e4}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,`Vt`,{enumerable:!0,get:function(){return .6}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,`Wt`,{enumerable:!0,get:function(){return`superellipse(1.25)`}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,`Xt`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,`Yt`,{enumerable:!0,get:function(){return .01}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`Zt`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return wn}}),Object.defineProperty(exports,`_n`,{enumerable:!0,get:function(){return .01}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return 16.666666666666668}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return mi}}),Object.defineProperty(exports,`an`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return ln}}),Object.defineProperty(exports,`bn`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return 1e7}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Xr}}),Object.defineProperty(exports,`cn`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return br}}),Object.defineProperty(exports,`dn`,{enumerable:!0,get:function(){return .95}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`en`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return yr}}),Object.defineProperty(exports,`fn`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Tn}}),Object.defineProperty(exports,`gn`,{enumerable:!0,get:function(){return`0.1.50-dev.65db899`}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return .2}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`hn`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Ti}}),Object.defineProperty(exports,`in`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,`jt`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,`kt`,{enumerable:!0,get:function(){return 8e3}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return xr}}),Object.defineProperty(exports,`ln`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return sr}}),Object.defineProperty(exports,`mn`,{enumerable:!0,get:function(){return 5e3}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return aa}}),Object.defineProperty(exports,`nn`,{enumerable:!0,get:function(){return`var(--rg-shadow)`}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Wr}}),Object.defineProperty(exports,`on`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return vr}}),Object.defineProperty(exports,`pn`,{enumerable:!0,get:function(){return 8e3}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,`qt`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return wi}}),Object.defineProperty(exports,`rn`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Kr}}),Object.defineProperty(exports,`sn`,{enumerable:!0,get:function(){return`data-react-grab-input`}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return oa}}),Object.defineProperty(exports,`tn`,{enumerable:!0,get:function(){return`var(--rg-panel-bg)`}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`un`,{enumerable:!0,get:function(){return-9999}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return pn}}),Object.defineProperty(exports,`vn`,{enumerable:!0,get:function(){return 2147483647}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return`copy`}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return cn}}),Object.defineProperty(exports,`yn`,{enumerable:!0,get:function(){return 2147483645}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return`comment`}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return gt}}),Object.defineProperty(exports,`zt`,{enumerable:!0,get:function(){return l}});
|
|
43
|
+
`,n.didUseCssFreeze=!0;else for(let t of e.runningAnimations)t.pause(),n.frozenWaapiAnimations.push(t);Rr(Ir(Array.from(e.targetDocument.querySelectorAll(`svg`))),n.frozenSvgElements)},Xr=e=>{Mr.add(e);try{Pr()&&Yr(qr(e))}catch(t){Mr.delete(e);let n=Jr(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{Mr.delete(e),j(Jr(e),`Unfreezing frame animations failed`)}},Zr=()=>Pr()?[]:(Mr.add(document),[...Mr].map(qr)),Qr=e=>{if(!Pr()){for(let t of e)Yr(t);Er()}},$r=()=>{if(!Pr())return;let e=[];for(let t of[...X.keys()])e.push(...Jr(t));try{Dr()}catch(t){e.push(t)}j(e,`Unfreezing global animations failed`)},ei=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!nn(n)&&(g(n)&&t.add(n),n.shadowRoot&&ei(n.shadowRoot,t),_(n))){let e=O(n);e&&ei(e,t)}},ti=()=>{let e=new Set;return ei(document,e),[...e]},ni=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],ri=[`focus`,`blur`,`focusin`,`focusout`],ii=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],ai=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],oi=new Map,si=new Map,ci=new Set;let li=!1;const ui=e=>{e.stopImmediatePropagation()},di=e=>{e.preventDefault(),e.stopImmediatePropagation()},fi=e=>{for(let t of ni)e.addEventListener(t,ui,!0);for(let t of ri)e.addEventListener(t,di,!0)},pi=e=>{for(let t of ni)e.removeEventListener(t,ui,!0);for(let t of ri)e.removeEventListener(t,di,!0)},mi=e=>{ci.add(e);let t=xn(e);return li&&fi(e),()=>{li&&pi(e),ci.delete(e),t()}},hi=(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}},gi=(e,t)=>{let n=[],r=qt(e,t);for(;r&&r!==document.documentElement&&!nn(r);)g(r)&&n.push(r),r=Nt(r);return n},_i=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;){if(g(t)&&e.push(t),t.shadowRoot?.activeElement){t=t.shadowRoot.activeElement;continue}if(_(t)){t=O(t)?.activeElement??null;continue}t=null}return e},vi=(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`)}},yi=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},bi=(e,t)=>{if(bn())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?gi(e,t):ti();for(let e of r){let t=hi(e,ii);t&&n.push(t)}let i=[];for(let e of _i()){let t=hi(e,ai,si);t&&i.push(t)}return{hoverStates:n,focusStates:i}},xi=e=>{if(e){li=!0,ci.add(document);for(let e of ci)fi(e);vi(e.hoverStates,oi),vi(e.focusStates,si),Sn()}},Si=()=>{br(),li=!1;for(let e of ci)pi(e);let e=[...yi(oi),...yi(si)];try{Cn()}catch(t){e.push(t)}j(e,`Unfreezing pseudo states failed`)},Ci=()=>{let e=[];try{An()}catch(t){e.push(t)}try{Si()}catch(t){e.push(t)}try{$r()}catch(t){e.push(t)}return e},wi=(e,t)=>{let n=bi(e,t),r=Zr();try{xi(n),Qr(r),kn()}catch(e){let t=Ci();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},Ti=()=>{j(Ci(),`Unfreezing global interactions failed`)};let Q=!1,Ei=0;const Di=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},Oi=new WeakMap,ki=new WeakMap,Ai=new WeakMap,ji=new Set,Mi=[],$=[],Ni=new WeakMap,Pi=new WeakMap,Fi=new WeakSet,Ii=Be,Li=new Set,Ri=e=>e.rendererPackageName.startsWith(`react-dom`),zi=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},Bi=e=>{let t=e.current?.stateNode;if(!t||typeof t!=`object`)return!1;let n=Reflect.get(t,`containerInfo`);return!!(n&&typeof n==`object`&&typeof Reflect.get(n,`nodeType`)==`number`)},Vi=()=>{if(Ii.size>0){let e=new Set;for(let t of Ii)Bi(t)&&e.add(t);return e}let e=new Set,t=n=>{let r=ot(n);if(r){let t=zi(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},Hi=(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},Ui=e=>{if(!e||Ni.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=()=>Q?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>Q?null:n,set:e=>{if(Q){e!==null&&(t.bufferedPending=Hi(t.bufferedPending??null,e));return}n=e}}),Ni.set(e,t)},Wi=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},Gi=e=>{let t=Ni.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=Wi(t.pendingValueAtPause??null),r=Wi(t.bufferedPending??null);for(let t of[...e,...r])$.push(()=>n(t))}Ni.delete(e)},Ki=e=>{if(Pi.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return Q?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(Q){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),Pi.set(e,t)},qi=e=>{let t=Pi.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),Pi.delete(e))},Ji=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Ui(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Ki(n),n=n.next},Yi=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Gi(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)qi(n),n=n.next},Xi=e=>{let t=e;for(;t;){if(ke(t)&&Ji(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}},Zi=e=>{let t=e;for(;t;){if(ke(t)&&Yi(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}},Qi=e=>{if(Oi.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};Oi.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!Q||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Di(ki,a,()=>(...e)=>{Q?$.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!Q||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Di(ki,a,()=>(...e)=>{Q?$.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!Q||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Di(Ai,a,()=>e=>{Q?Mi.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>Q?n.useSyncExternalStore(t=>e(()=>{Q?ji.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},$i=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`&&Qi(r),r),set:e=>{r=e}})},ea=e=>{queueMicrotask(()=>{try{for(let t of x().renderers.values())if(Ri(t)&&typeof t.scheduleUpdate==`function`){for(let n of e)if(n.current)try{t.scheduleUpdate(n.current)}catch(e){B(new D(`scheduleUpdate failed during unfreeze`,e))}}}catch(e){B(new D(`scheduleReactUpdate failed`,e))}})},ta=e=>{for(let t of e)try{t()}catch(e){B(new D(`Callback failed during state replay`,e))}},na=()=>{for(let e of x().renderers.values())Ri(e)&&(Fi.has(e)||($i(e),Fi.add(e)))},ra=()=>{ji.clear(),Mi.length=0,$.length=0},ia=()=>{let e=new Set(Li);try{for(let t of Vi())e.add(t)}catch(e){B(new D(`Collecting fiber roots failed during unfreeze`,e))}Li.clear(),Q=!1;for(let t of e)try{Zi(t.current)}catch(e){B(new D(`Resuming a fiber root failed during unfreeze`,e))}let t=Array.from(ji),n=Mi.slice(),r=$.slice();ra(),ta(t),ta(n),ta(r),Q||ea(e)},aa=()=>{let e=Ei===0;if(Ei+=1,e)try{na(),Q=!0;let e=Vi();for(let t of e)Li.add(t),Xi(t.current)}catch(e){throw--Ei,Q&&ia(),e}let t=!1;return()=>{t||(t=!0,--Ei,Ei===0&&ia())}},oa=()=>{try{return aa()}catch(e){return B(new D(`Pausing React updates failed`,e)),()=>{}}};Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`$t`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,`At`,{enumerable:!0,get:function(){return 1e4}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,`Bt`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,`Dt`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,`Et`,{enumerable:!0,get:function(){return`edit`}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,`Ft`,{enumerable:!0,get:function(){return-1e3}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`Gt`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`Ht`,{enumerable:!0,get:function(){return`var(--rg-panel-bg)`}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`It`,{enumerable:!0,get:function(){return .01}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,`Jt`,{enumerable:!0,get:function(){return`data-react-grab-input`}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,`Kt`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,`Lt`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return jt}}),Object.defineProperty(exports,`Mt`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,`Nt`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,`Ot`,{enumerable:!0,get:function(){return .6}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`Pt`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,`Qt`,{enumerable:!0,get:function(){return .95}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return gt}}),Object.defineProperty(exports,`Rt`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(exports,`Tt`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,`Ut`,{enumerable:!0,get:function(){return`var(--rg-shadow)`}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,`Vt`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`Wt`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`Xt`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,`Yt`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`Zt`,{enumerable:!0,get:function(){return-9999}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return pn}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return mi}}),Object.defineProperty(exports,`an`,{enumerable:!0,get:function(){return 2147483647}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return .7}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Xr}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return yr}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`en`,{enumerable:!0,get:function(){return 8e3}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return vr}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return wn}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return 16.666666666666668}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Tn}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return .2}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Ti}}),Object.defineProperty(exports,`in`,{enumerable:!0,get:function(){return .01}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(exports,`jt`,{enumerable:!0,get:function(){return`superellipse(1.25)`}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(exports,`kt`,{enumerable:!0,get:function(){return .18}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return aa}}),Object.defineProperty(exports,`nn`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Wr}}),Object.defineProperty(exports,`on`,{enumerable:!0,get:function(){return 2147483645}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return sr}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`qt`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return wi}}),Object.defineProperty(exports,`rn`,{enumerable:!0,get:function(){return`0.1.50-dev.f350003`}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Kr}}),Object.defineProperty(exports,`sn`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return oa}}),Object.defineProperty(exports,`tn`,{enumerable:!0,get:function(){return 5e3}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return br}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return cn}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return`comment`}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return 1500}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return .75}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return ln}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return`copy`}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,`zt`,{enumerable:!0,get:function(){return a}});
|