@yoopta/themes-shadcn 6.0.0-beta.5 → 6.0.0-beta.6
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/{withShadcnUI.d.ts → applyTheme.d.ts} +3 -3
- package/dist/applyTheme.d.ts.map +1 -0
- package/dist/image/elements/image/image-placeholder.d.ts.map +1 -1
- package/dist/image/elements/image/image-render.d.ts +1 -1
- package/dist/image/elements/image/image-render.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/table/components/add-row-button.d.ts.map +1 -1
- package/dist/table/components/column-controls.d.ts.map +1 -1
- package/dist/table/components/row-controls.d.ts.map +1 -1
- package/dist/table/components/table-controls.d.ts.map +1 -1
- package/dist/ui/switch.d.ts +5 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/video/elements/video/video-element.d.ts +3 -0
- package/dist/video/elements/video/video-element.d.ts.map +1 -0
- package/dist/video/elements/video/video-inline-toolbar-settings.d.ts +14 -0
- package/dist/video/elements/video/video-inline-toolbar-settings.d.ts.map +1 -0
- package/dist/video/elements/video/video-inline-toolbar.d.ts +14 -0
- package/dist/video/elements/video/video-inline-toolbar.d.ts.map +1 -0
- package/dist/video/elements/video/video-placeholder.d.ts +16 -0
- package/dist/video/elements/video/video-placeholder.d.ts.map +1 -0
- package/dist/video/elements/video/video-render.d.ts +18 -0
- package/dist/video/elements/video/video-render.d.ts.map +1 -0
- package/dist/video/index.d.ts +6 -0
- package/dist/video/index.d.ts.map +1 -0
- package/dist/video/types.d.ts +4 -0
- package/dist/video/types.d.ts.map +1 -0
- package/package.json +16 -11
- package/dist/withShadcnUI.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import*as n from"react";import o,{forwardRef as i,createElement as a,useReducer as s,useMemo as l,useCallback as c,useRef as d,useState as u,useEffect as p,createContext as f,useContext as h,useLayoutEffect as g,memo as m,PureComponent as v}from"react";import*as b from"react-dom";import w,{flushSync as y}from"react-dom";import{useYooptaEditor as x,Blocks as k,Elements as O,Selection as N,useElementSelected as C,useBlockSelected as S,useYooptaPluginOptions as E,useBlockData as R}from"@yoopta/editor";import{CodeCommands as P,isLanguageSupported as j,SHIKI_CODE_LANGUAGES as D,SHIKI_CODE_THEMES as z,HighlightedCodeOverlay as M,CodeGroupCommands as T}from"@yoopta/code";import{useImageUpload as _,useImageDelete as A,useImagePreview as I}from"@yoopta/image";import{useNumberListCount as L}from"@yoopta/lists";import{StepsCommands as F}from"@yoopta/steps";import{TableCommands as H,TABLE_CELLS_IN_SELECTION as B,TABLE_SLATE_TO_SELECTION_SET as W}from"@yoopta/table";import{Portal as U}from"@yoopta/ui/portal";import{TabsCommands as V}from"@yoopta/tabs";function $(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}$(":root{--background:0 0% 100%;--foreground:0 0% 3.9%;--card:0 0% 100%;--card-foreground:0 0% 3.9%;--popover:0 0% 100%;--popover-foreground:0 0% 3.9%;--primary:0 0% 9%;--primary-foreground:0 0% 98%;--secondary:0 0% 96.1%;--secondary-foreground:0 0% 9%;--muted:0 0% 96.1%;--muted-foreground:0 0% 45.1%;--accent:0 0% 96.1%;--accent-foreground:0 0% 9%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:0 0% 89.8%;--input:0 0% 89.8%;--ring:0 0% 3.9%;--radius:0.5rem}.dark,[data-theme=dark]{--background:0 0% 3.9%;--foreground:0 0% 98%;--card:0 0% 3.9%;--card-foreground:0 0% 98%;--popover:0 0% 3.9%;--popover-foreground:0 0% 98%;--primary:0 0% 98%;--primary-foreground:0 0% 9%;--secondary:0 0% 14.9%;--secondary-foreground:0 0% 98%;--muted:0 0% 14.9%;--muted-foreground:0 0% 63.9%;--accent:0 0% 14.9%;--accent-foreground:0 0% 98%;--destructive:0 62.8% 30.6%;--destructive-foreground:0 0% 98%;--border:0 0% 14.9%;--input:0 0% 14.9%;--ring:0 0% 83.1%}");$("*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,system-ui,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.container{margin-left:auto;margin-right:auto;padding-left:2rem;padding-right:2rem;width:100%}@media (min-width:1400px){.container{max-width:1400px}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-12{bottom:-3rem}.-left-12{left:-3rem}.-right-12{right:-3rem}.-top-12{top:-3rem}.left-0{left:0}.left-1\\/2{left:50%}.left-2{left:.5rem}.right-1{right:.25rem}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-1\\/2{top:50%}.top-2{top:.5rem}.top-\\[2\\.75rem\\]{top:2.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.-ml-3\\.5{margin-left:-.875rem}.-ml-4{margin-left:-1rem}.-mt-4{margin-top:-1rem}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-3\\.5{margin-left:.875rem}.ml-6{margin-left:1.5rem}.ml-\\[-13px\\]{margin-left:-13px}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.\\!block{display:block!important}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.size-2{height:.5rem;width:.5rem}.size-2\\.5{height:.625rem;width:.625rem}.size-3\\.5{height:.875rem;width:.875rem}.size-4{height:1rem;width:1rem}.size-7{height:1.75rem;width:1.75rem}.size-8{height:2rem;width:2rem}.size-full{height:100%;width:100%}.h-10{height:2.5rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[1px\\]{height:1px}.h-\\[2px\\]{height:2px}.h-\\[calc\\(100\\%-2\\.75rem\\)\\]{height:calc(100% - 2.75rem)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-\\[200px\\]{max-height:200px}.min-h-16{min-height:4rem}.min-h-\\[300px\\]{min-height:300px}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[1px\\]{width:1px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y:0.5rem}.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y:calc(-50% - 2px)}.rotate-180,.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.rotate-45{--tw-rotate:45deg}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.scroll-m-20{scroll-margin:5rem}.scroll-my-1{scroll-margin-bottom:.25rem;scroll-margin-top:.25rem}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.125rem*var(--tw-space-y-reverse));margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.text-balance{text-wrap:balance}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-b-lg{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-x-0{border-left-width:0;border-right-width:0}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0}.border-t{border-top-width:1px}.border-t-0{border-top-width:0}.border-t-2{border-top-width:2px}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-border{border-color:hsl(var(--border))}.border-border\\/50{border-color:hsl(var(--border)/.5)}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-background\\/80{background-color:hsl(var(--background)/.8)}.bg-background\\/95{background-color:hsl(var(--background)/.95)}.bg-black\\/70{background-color:rgba(0,0,0,.7)}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-border{background-color:hsl(var(--border))}.bg-border\\/70{background-color:hsl(var(--border)/.7)}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\\/50{background-color:hsl(var(--muted)/.5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\\/20{background-color:hsla(0,0%,100%,.2)}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-border{--tw-gradient-from:hsl(var(--border)) var(--tw-gradient-from-position);--tw-gradient-to:hsl(var(--border)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-80\\%{--tw-gradient-via-position:80%}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-foreground{fill:hsl(var(--foreground))}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-px{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-7{padding-left:1.75rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-8{padding-right:2rem}.pr-px{padding-right:1px}.pt-0{padding-top:0}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-background{color:hsl(var(--background))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\\/60{color:hsla(0,0%,100%,.6)}.text-white\\/80{color:hsla(0,0%,100%,.8)}.text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-ring\\/50{--tw-ring-color:hsl(var(--ring)/0.5)}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.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-blur-sm{--tw-backdrop-blur:blur(4px);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-\\[color\\2c box-shadow\\]{transition-duration:.15s;transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.yoopta-editor::-moz-selection{background:#c6ddf8}.yoopta-editor::selection{background:#c6ddf8}.yoopta-slate{outline:none}.yoopta-block{margin:2px 0;position:relative}.yoopta-block:before{background-color:#2383e224;border-radius:4px;height:100%;inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .2s;width:100%;z-index:0}.yoopta-block[data-block-selected=true]:before{background-color:#2383e224;content:\"\";opacity:1;transition:opacity .2s}.file\\:border-0::file-selector-button{border-width:0}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.first\\:mt-0:first-child{margin-top:0}.last\\:border-b-0:last-child{border-bottom-width:0}.last\\:border-r-0:last-child{border-right-width:0}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-black\\/10:hover{background-color:rgba(0,0,0,.1)}.hover\\:bg-destructive\\/10:hover{background-color:hsl(var(--destructive)/.1)}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\\:bg-muted\\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\\:bg-muted\\/80:hover{background-color:hsl(var(--muted)/.8)}.hover\\:bg-primary\\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-destructive:hover{color:hsl(var(--destructive))}.hover\\:text-foreground:hover{color:hsl(var(--foreground))}.hover\\:text-primary\\/80:hover{color:hsl(var(--primary)/.8)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:ring-4:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\\:text-destructive:focus{color:hsl(var(--destructive))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:border-ring:focus-visible{border-color:hsl(var(--ring))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-1:focus-visible{outline-width:1px}.focus-visible\\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:hsl(var(--ring)/0.5)}.focus-visible\\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group\\/code-block:hover .group-hover\\/code-block\\:opacity-100,.group\\/code-group-content:hover .group-hover\\/code-group-content\\:opacity-100,.group\\/step:hover .group-hover\\/step\\:opacity-100,.group\\/steps-node:hover .group-hover\\/steps-node\\:opacity-100,.group\\/tab:hover .group-hover\\/tab\\:opacity-100{opacity:1}.peer:disabled~.peer-disabled\\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\\:opacity-70{opacity:.7}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal]{height:.375rem}.data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal],.data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:2.25rem}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:2rem}.data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical]{min-height:11rem}.data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical]{width:.375rem}.data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical]{width:auto}.data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical]{width:100%}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\\[align\\=start\\]\\:items-start[data-align=start]{align-items:flex-start}.data-\\[align\\=end\\]\\:items-end[data-align=end]{align-items:flex-end}.data-\\[align\\=center\\]\\:items-center[data-align=center]{align-items:center}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\\[state\\=selected\\]\\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\\[inset\\]\\:pl-8[data-inset]{padding-left:2rem}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\\[state\\=active\\]\\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:hsl(var(--destructive))}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1[data-slot=select-value]>*{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden}.\\*\\:data-\\[slot\\=select-value\\]\\:flex[data-slot=select-value]>*{display:flex}.\\*\\:data-\\[slot\\=select-value\\]\\:items-center[data-slot=select-value]>*{align-items:center}.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2[data-slot=select-value]>*{gap:.5rem}.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10:focus[data-variant=destructive]{background-color:hsl(var(--destructive)/.1)}.data-\\[variant\\=destructive\\]\\:focus\\:text-destructive:focus[data-variant=destructive]{color:hsl(var(--destructive))}.dark\\:border-blue-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.dark\\:border-green-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.dark\\:border-red-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.dark\\:border-yellow-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.dark\\:bg-blue-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.dark\\:bg-green-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.dark\\:bg-input\\/30:is(.dark *){background-color:hsl(var(--input)/.3)}.dark\\:bg-red-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.dark\\:bg-yellow-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.dark\\:text-blue-100:is(.dark *){--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.dark\\:text-green-100:is(.dark *){--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.dark\\:text-red-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.dark\\:text-yellow-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-input\\/50:hover:is(.dark *){background-color:hsl(var(--input)/.5)}.dark\\:hover\\:bg-white\\/10:hover:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:focus[data-variant=destructive]:is(.dark *){background-color:hsl(var(--destructive)/.2)}@media (min-width:768px){.md\\:basis-1\\/2{flex-basis:50%}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\\:basis-1\\/3{flex-basis:33.333333%}.lg\\:text-5xl{font-size:3rem;line-height:1}}.\\[\\&\\:has\\(\\[role\\=checkbox\\]\\)\\]\\:pr-0:has([role=checkbox]){padding-right:0}.\\[\\&\\:not\\(\\:first-child\\)\\]\\:mt-6:not(:first-child){margin-top:1.5rem}.\\[\\&\\>\\[role\\=checkbox\\]\\]\\:translate-y-\\[2px\\]>[role=checkbox]{--tw-translate-y:2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&\\>div\\]\\:contents>div{display:contents}.\\[\\&\\>li\\]\\:mt-2>li{margin-top:.5rem}.\\[\\&\\>p\\]\\:m-0>p{margin:0}.\\[\\&\\>p\\]\\:text-sm>p{font-size:.875rem;line-height:1.25rem}.\\[\\&\\>tr\\]\\:last\\:border-b-0:last-child>tr{border-bottom-width:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){height:1rem;width:1rem}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'text-\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*=text-]){color:hsl(var(--muted-foreground))}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_tr\\:last-child\\]\\:border-0 tr:last-child{border-width:0}.\\[\\&_tr\\]\\:border-b tr{border-bottom-width:1px}");var X=function(){return X=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},X.apply(this,arguments)};function q(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function Y(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((n=n.apply(e,t||[])).next())})}function K(t,r=[]){let o=[];const i=()=>{const e=o.map(e=>n.createContext(e));return function(r){const o=r?.[t]||e;return n.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return i.scopeName=t,[function(r,i){const a=n.createContext(i),s=o.length;o=[...o,i];const l=r=>{const{scope:o,children:i,...l}=r,c=o?.[t]?.[s]||a,d=n.useMemo(()=>l,Object.values(l));return e(c.Provider,{value:d,children:i})};return l.displayName=r+"Provider",[l,function(e,o){const l=o?.[t]?.[s]||a,c=n.useContext(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${e}\` must be used within \`${r}\``)}]},G(i,...r)]}function G(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Z(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function J(...e){return t=>{let r=!1;const n=e.map(e=>{const n=Z(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Z(e[t],null)}}}}function Q(...e){return n.useCallback(J(...e),e)}function ee(t){const r=te(t),o=n.forwardRef((t,o)=>{const{children:i,...a}=t,s=n.Children.toArray(i),l=s.find(ne);if(l){const t=l.props.children,i=s.map(e=>e===l?n.Children.count(t)>1?n.Children.only(null):n.isValidElement(t)?t.props.children:null:e);return e(r,{...a,ref:o,children:n.isValidElement(t)?n.cloneElement(t,void 0,i):null})}return e(r,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}function te(e){const t=n.forwardRef((e,t)=>{const{children:r,...o}=e;if(n.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props);return r.type!==n.Fragment&&(i.ref=t?J(t,e):e),n.cloneElement(r,i)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}"function"==typeof SuppressedError&&SuppressedError;var re=Symbol("radix.slottable");function ne(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===re}function oe(t){const r=t+"CollectionProvider",[n,i]=K(r),[a,s]=n(r,{collectionRef:{current:null},itemMap:new Map}),l=t=>{const{scope:r,children:n}=t,i=o.useRef(null),s=o.useRef(new Map).current;return e(a,{scope:r,itemMap:s,collectionRef:i,children:n})};l.displayName=r;const c=t+"CollectionSlot",d=ee(c),u=o.forwardRef((t,r)=>{const{scope:n,children:o}=t,i=Q(r,s(c,n).collectionRef);return e(d,{ref:i,children:o})});u.displayName=c;const p=t+"CollectionItemSlot",f="data-radix-collection-item",h=ee(p),g=o.forwardRef((t,r)=>{const{scope:n,children:i,...a}=t,l=o.useRef(null),c=Q(r,l),d=s(p,n);return o.useEffect(()=>(d.itemMap.set(l,{ref:l,...a}),()=>{d.itemMap.delete(l)})),e(h,{[f]:"",ref:c,children:i})});return g.displayName=p,[{Provider:l,Slot:u,ItemSlot:g},function(e){const r=s(t+"CollectionConsumer",e);return o.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},i]}function ie(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}var ae=globalThis?.document?n.useLayoutEffect:()=>{},se=n[" useInsertionEffect ".trim().toString()]||ae;function le({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[i,a,s]=function({defaultProp:e,onChange:t}){const[r,o]=n.useState(e),i=n.useRef(r),a=n.useRef(t);return se(()=>{a.current=t},[t]),n.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,o,a]}({defaultProp:t,onChange:r}),l=void 0!==e,c=l?e:i;{const t=n.useRef(void 0!==e);n.useEffect(()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",r=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,o])}const d=n.useCallback(t=>{if(l){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&s.current?.(r)}else a(t)},[l,e,a,s]);return[c,d]}var ce=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const o=ee(`Primitive.${r}`),i=n.forwardRef((t,n)=>{const{asChild:i,...a}=t,s=i?o:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:n})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function de(e,t){e&&b.flushSync(()=>e.dispatchEvent(t))}var ue=e=>{const{present:t,children:r}=e,o=function(e){const[t,r]=n.useState(),o=n.useRef(null),i=n.useRef(e),a=n.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return n.useReducer((e,r)=>t[e][r]??e,e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect(()=>{const e=pe(o.current);a.current="mounted"===l?e:"none"},[l]),ae(()=>{const t=o.current,r=i.current;if(r!==e){const n=a.current,o=pe(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}},[e,c]),ae(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,n=n=>{const a=pe(o.current).includes(CSS.escape(n.animationName));if(n.target===t&&a&&(c("ANIMATION_END"),!i.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},s=e=>{e.target===t&&(a.current=pe(o.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",n),t.addEventListener("animationend",n),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",n),t.removeEventListener("animationend",n)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:n.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(t),i="function"==typeof r?r({present:o.isPresent}):n.Children.only(r),a=Q(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof r||o.isPresent?n.cloneElement(i,{ref:a}):null};function pe(e){return e?.animationName||"none"}ue.displayName="Presence";var fe=n[" useId ".trim().toString()]||(()=>{}),he=0;function ge(e){const[t,r]=n.useState(fe());return ae(()=>{e||r(e=>e??String(he++))},[e]),e||(t?`radix-${t}`:"")}var me="Collapsible",[ve,be]=K(me),[we,ye]=ve(me),xe=n.forwardRef((t,r)=>{const{__scopeCollapsible:o,open:i,defaultOpen:a,disabled:s,onOpenChange:l,...c}=t,[d,u]=le({prop:i,defaultProp:a??!1,onChange:l,caller:me});return e(we,{scope:o,disabled:s,contentId:ge(),open:d,onOpenToggle:n.useCallback(()=>u(e=>!e),[u]),children:e(ce.div,{"data-state":Ee(d),"data-disabled":s?"":void 0,...c,ref:r})})});xe.displayName=me;var ke="CollapsibleTrigger",Oe=n.forwardRef((t,r)=>{const{__scopeCollapsible:n,...o}=t,i=ye(ke,n);return e(ce.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Ee(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...o,ref:r,onClick:ie(t.onClick,i.onOpenToggle)})});Oe.displayName=ke;var Ne="CollapsibleContent",Ce=n.forwardRef((t,r)=>{const{forceMount:n,...o}=t,i=ye(Ne,t.__scopeCollapsible);return e(ue,{present:n||i.open,children:({present:t})=>e(Se,{...o,ref:r,present:t})})});Ce.displayName=Ne;var Se=n.forwardRef((t,r)=>{const{__scopeCollapsible:o,present:i,children:a,...s}=t,l=ye(Ne,o),[c,d]=n.useState(i),u=n.useRef(null),p=Q(r,u),f=n.useRef(0),h=f.current,g=n.useRef(0),m=g.current,v=l.open||c,b=n.useRef(v),w=n.useRef(void 0);return n.useEffect(()=>{const e=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(e)},[]),ae(()=>{const e=u.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();f.current=t.height,g.current=t.width,b.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),d(i)}},[l.open,i]),e(ce.div,{"data-state":Ee(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!v,...s,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...t.style},children:v&&a})});function Ee(e){return e?"open":"closed"}var Re=xe,Pe=Oe,je=Ce,De=n.createContext(void 0);function ze(e){const t=n.useContext(De);return e||t||"ltr"}var Me="Accordion",Te=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[_e,Ae,Ie]=oe(Me),[Le,Fe]=K(Me,[Ie,be]),He=be(),Be=o.forwardRef((t,r)=>{const{type:n,...o}=t,i=o,a=o;return e(_e.Provider,{scope:t.__scopeAccordion,children:"multiple"===n?e(qe,{...a,ref:r}):e(Xe,{...i,ref:r})})});Be.displayName=Me;var[We,Ue]=Le(Me),[Ve,$e]=Le(Me,{collapsible:!1}),Xe=o.forwardRef((t,r)=>{const{value:n,defaultValue:i,onValueChange:a=()=>{},collapsible:s=!1,...l}=t,[c,d]=le({prop:n,defaultProp:i??"",onChange:a,caller:Me});return e(We,{scope:t.__scopeAccordion,value:o.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:o.useCallback(()=>s&&d(""),[s,d]),children:e(Ve,{scope:t.__scopeAccordion,collapsible:s,children:e(Ge,{...l,ref:r})})})}),qe=o.forwardRef((t,r)=>{const{value:n,defaultValue:i,onValueChange:a=()=>{},...s}=t,[l,c]=le({prop:n,defaultProp:i??[],onChange:a,caller:Me}),d=o.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=o.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return e(We,{scope:t.__scopeAccordion,value:l,onItemOpen:d,onItemClose:u,children:e(Ve,{scope:t.__scopeAccordion,collapsible:!0,children:e(Ge,{...s,ref:r})})})}),[Ye,Ke]=Le(Me),Ge=o.forwardRef((t,r)=>{const{__scopeAccordion:n,disabled:i,dir:a,orientation:s="vertical",...l}=t,c=Q(o.useRef(null),r),d=Ae(n),u="ltr"===ze(a),p=ie(t.onKeyDown,e=>{if(!Te.includes(e.key))return;const t=e.target,r=d().filter(e=>!e.ref.current?.disabled),n=r.findIndex(e=>e.ref.current===t),o=r.length;if(-1===n)return;e.preventDefault();let i=n;const a=o-1,l=()=>{i=n+1,i>a&&(i=0)},c=()=>{i=n-1,i<0&&(i=a)};switch(e.key){case"Home":i=0;break;case"End":i=a;break;case"ArrowRight":"horizontal"===s&&(u?l():c());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(u?c():l());break;case"ArrowUp":"vertical"===s&&c()}const p=i%o;r[p].ref.current?.focus()});return e(Ye,{scope:n,disabled:i,direction:a,orientation:s,children:e(_e.Slot,{scope:n,children:e(ce.div,{...l,"data-orientation":s,ref:c,onKeyDown:i?void 0:p})})})}),Ze="AccordionItem",[Je,Qe]=Le(Ze),et=o.forwardRef((t,r)=>{const{__scopeAccordion:n,value:o,...i}=t,a=Ke(Ze,n),s=Ue(Ze,n),l=He(n),c=ge(),d=o&&s.value.includes(o)||!1,u=a.disabled||t.disabled;return e(Je,{scope:n,open:d,disabled:u,triggerId:c,children:e(Re,{"data-orientation":a.orientation,"data-state":at(d),...l,...i,ref:r,disabled:u,open:d,onOpenChange:e=>{e?s.onItemOpen(o):s.onItemClose(o)}})})});et.displayName=Ze;var tt="AccordionHeader";o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,i=Ke(Me,n),a=Qe(tt,n);return e(ce.h3,{"data-orientation":i.orientation,"data-state":at(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:r})}).displayName=tt;var rt="AccordionTrigger",nt=o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,i=Ke(Me,n),a=Qe(rt,n),s=$e(rt,n),l=He(n);return e(_e.ItemSlot,{scope:n,children:e(Pe,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...l,...o,ref:r})})});nt.displayName=rt;var ot="AccordionContent",it=o.forwardRef((t,r)=>{const{__scopeAccordion:n,...o}=t,i=Ke(Me,n),a=Qe(ot,n),s=He(n);return e(je,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...s,...o,ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});function at(e){return e?"open":"closed"}it.displayName=ot;var st=Be,lt=et,ct=nt,dt=it;const ut=i((t,r)=>{var{children:n}=t,o=q(t,["children"]);return e(st,Object.assign({},o,{className:"w-full rounded-md border",ref:r,"data-slot":"accordion"},{children:n}))});ut.displayName="Accordion";const pt=i((t,r)=>{var{children:n}=t,o=q(t,["children"]);return e(lt,Object.assign({},o,{ref:r,"data-slot":"accordion-item",className:"border-b last:border-b-0"},{children:n}))});pt.displayName="AccordionItem";const ft=t=>{var{children:r}=t,n=q(t,["children"]);return e(ct,Object.assign({},n,{type:"button",contentEditable:!1,"data-slot":"accordion-trigger",className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:r}))},ht=i((t,r)=>{var{children:n}=t,o=q(t,["children"]);return e(dt,Object.assign({},o,{ref:r,"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"},{children:e("div",Object.assign({className:"pt-0 pb-4 text-muted-foreground px-5"},{children:n}))}))});ht.displayName="AccordionContent";const gt=(...e)=>e.filter((e,t,r)=>Boolean(e)&&r.indexOf(e)===t).join(" ");
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import*as r from"react";import o,{forwardRef as i,createElement as a,useReducer as s,useMemo as l,useCallback as c,useRef as d,useState as u,useEffect as p,createContext as h,useContext as f,useLayoutEffect as g,memo as m,PureComponent as b}from"react";import*as v from"react-dom";import w,{flushSync as y}from"react-dom";import{useYooptaEditor as x,Blocks as k,Elements as N,Selection as C,useElementSelected as O,useBlockSelected as S,useYooptaPluginOptions as E,useBlockData as j}from"@yoopta/editor";import{Editor as R,Path as z,Transforms as D,Element as P,Text as M}from"slate";import{CodeCommands as T,isLanguageSupported as I,SHIKI_CODE_LANGUAGES as _,SHIKI_CODE_THEMES as A,HighlightedCodeOverlay as L,CodeGroupCommands as H}from"@yoopta/code";import{useImageUpload as F,useImageDelete as W,useImagePreview as B}from"@yoopta/image";import{useNumberListCount as U}from"@yoopta/lists";import{StepsCommands as V}from"@yoopta/steps";import{TableCommands as $,TABLE_CELLS_IN_SELECTION as X,TABLE_SLATE_TO_SELECTION_SET as Y}from"@yoopta/table";import{Portal as K}from"@yoopta/ui/portal";import{TabsCommands as G}from"@yoopta/tabs";import{parseVideoUrl as q,getEmbedUrl as Z,useVideoUpload as J,useVideoDelete as Q,useVideoPreview as ee,buildVideoProvider as te}from"@yoopta/video";function ne(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function re(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}re(":root{--background:0 0% 100%;--foreground:0 0% 3.9%;--card:0 0% 100%;--card-foreground:0 0% 3.9%;--popover:0 0% 100%;--popover-foreground:0 0% 3.9%;--primary:0 0% 9%;--primary-foreground:0 0% 98%;--secondary:0 0% 96.1%;--secondary-foreground:0 0% 9%;--muted:0 0% 96.1%;--muted-foreground:0 0% 45.1%;--accent:0 0% 96.1%;--accent-foreground:0 0% 9%;--destructive:0 84.2% 60.2%;--destructive-foreground:0 0% 98%;--border:0 0% 89.8%;--input:0 0% 89.8%;--ring:0 0% 3.9%;--radius:0.5rem}.dark,[data-theme=dark]{--background:0 0% 3.9%;--foreground:0 0% 98%;--card:0 0% 3.9%;--card-foreground:0 0% 98%;--popover:0 0% 3.9%;--popover-foreground:0 0% 98%;--primary:0 0% 98%;--primary-foreground:0 0% 9%;--secondary:0 0% 14.9%;--secondary-foreground:0 0% 98%;--muted:0 0% 14.9%;--muted-foreground:0 0% 63.9%;--accent:0 0% 14.9%;--accent-foreground:0 0% 98%;--destructive:0 62.8% 30.6%;--destructive-foreground:0 0% 98%;--border:0 0% 14.9%;--input:0 0% 14.9%;--ring:0 0% 83.1%}");re("*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,system-ui,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.container{margin-left:auto;margin-right:auto;padding-left:2rem;padding-right:2rem;width:100%}@media (min-width:1400px){.container{max-width:1400px}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-12{bottom:-3rem}.-left-12{left:-3rem}.-right-12{right:-3rem}.-top-12{top:-3rem}.left-0{left:0}.left-1\\/2{left:50%}.left-2{left:.5rem}.right-1{right:.25rem}.right-2{right:.5rem}.right-3{right:.75rem}.top-0{top:0}.top-1\\/2{top:50%}.top-2{top:.5rem}.top-\\[2\\.75rem\\]{top:2.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.m-0{margin:0}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.-ml-3\\.5{margin-left:-.875rem}.-ml-4{margin-left:-1rem}.-mt-4{margin-top:-1rem}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-3\\.5{margin-left:.875rem}.ml-6{margin-left:1.5rem}.ml-\\[-13px\\]{margin-left:-13px}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.\\!block{display:block!important}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.size-2{height:.5rem;width:.5rem}.size-2\\.5{height:.625rem;width:.625rem}.size-3\\.5{height:.875rem;width:.875rem}.size-4{height:1rem;width:1rem}.size-7{height:1.75rem;width:1.75rem}.size-8{height:2rem;width:2rem}.size-full{height:100%;width:100%}.h-10{height:2.5rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[1px\\]{height:1px}.h-\\[2px\\]{height:2px}.h-\\[calc\\(100\\%-2\\.75rem\\)\\]{height:calc(100% - 2.75rem)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-\\[200px\\]{max-height:200px}.max-h-full{max-height:100%}.min-h-16{min-height:4rem}.min-h-\\[300px\\]{min-height:300px}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\\[1px\\]{width:1px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y:0.5rem}.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y:calc(-50% - 2px)}.rotate-180,.translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.rotate-45{--tw-rotate:45deg}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.scroll-m-20{scroll-margin:5rem}.scroll-my-1{scroll-margin-bottom:.25rem;scroll-margin-top:.25rem}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.125rem*var(--tw-space-y-reverse));margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.375rem*var(--tw-space-y-reverse));margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.text-balance{text-wrap:balance}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-b-lg{border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-x-0{border-left-width:0;border-right-width:0}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-0{border-left-width:0}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0}.border-t{border-top-width:1px}.border-t-0{border-top-width:0}.border-t-2{border-top-width:2px}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.border-border{border-color:hsl(var(--border))}.border-border\\/50{border-color:hsl(var(--border)/.5)}.border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity:1;border-color:rgb(254 240 138/var(--tw-border-opacity,1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-background\\/80{background-color:hsl(var(--background)/.8)}.bg-background\\/95{background-color:hsl(var(--background)/.95)}.bg-black\\/5{background-color:rgba(0,0,0,.05)}.bg-black\\/70{background-color:rgba(0,0,0,.7)}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.bg-border{background-color:hsl(var(--border))}.bg-border\\/70{background-color:hsl(var(--border)/.7)}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\\/50{background-color:hsl(var(--muted)/.5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-white\\/20{background-color:hsla(0,0%,100%,.2)}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity,1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-border{--tw-gradient-from:hsl(var(--border)) var(--tw-gradient-from-position);--tw-gradient-to:hsl(var(--border)/0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-80\\%{--tw-gradient-via-position:80%}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-foreground{fill:hsl(var(--foreground))}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-center{-o-object-position:center;object-position:center}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-px{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-7{padding-left:1.75rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-8{padding-right:2rem}.pr-px{padding-right:1px}.pt-0{padding-top:0}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-background{color:hsl(var(--background))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-white\\/60{color:hsla(0,0%,100%,.6)}.text-white\\/80{color:hsla(0,0%,100%,.8)}.text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-ring\\/50{--tw-ring-color:hsl(var(--ring)/0.5)}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.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-blur-sm{--tw-backdrop-blur:blur(4px);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-\\[color\\2c box-shadow\\]{transition-duration:.15s;transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.yoopta-editor::-moz-selection{background:#c6ddf8}.yoopta-editor::selection{background:#c6ddf8}.yoopta-slate{outline:none}.yoopta-block{margin:2px 0;position:relative}.yoopta-block:before{background-color:#2383e224;border-radius:4px;height:100%;inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .2s;width:100%;z-index:0}.yoopta-block[data-block-selected=true]:before{background-color:#2383e224;content:\"\";opacity:1;transition:opacity .2s}.file\\:border-0::file-selector-button{border-width:0}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.file\\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.first\\:mt-0:first-child{margin-top:0}.last\\:border-b-0:last-child{border-bottom-width:0}.last\\:border-r-0:last-child{border-right-width:0}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-black\\/10:hover{background-color:rgba(0,0,0,.1)}.hover\\:bg-destructive\\/10:hover{background-color:hsl(var(--destructive)/.1)}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\\:bg-muted\\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\\:bg-muted\\/80:hover{background-color:hsl(var(--muted)/.8)}.hover\\:bg-primary\\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-destructive:hover{color:hsl(var(--destructive))}.hover\\:text-foreground:hover{color:hsl(var(--foreground))}.hover\\:text-primary\\/80:hover{color:hsl(var(--primary)/.8)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\\:ring-4:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\\:text-destructive:focus{color:hsl(var(--destructive))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:border-ring:focus-visible{border-color:hsl(var(--ring))}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-1:focus-visible{outline-width:1px}.focus-visible\\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:hsl(var(--ring)/0.5)}.focus-visible\\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.focus-visible\\:ring-offset-background:focus-visible{--tw-ring-offset-color:hsl(var(--background))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group\\/code-block:hover .group-hover\\/code-block\\:opacity-100,.group\\/code-group-content:hover .group-hover\\/code-group-content\\:opacity-100,.group\\/step:hover .group-hover\\/step\\:opacity-100,.group\\/steps-node:hover .group-hover\\/steps-node\\:opacity-100,.group\\/tab:hover .group-hover\\/tab\\:opacity-100{opacity:1}.peer:disabled~.peer-disabled\\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\\:opacity-70{opacity:.7}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal]{height:.375rem}.data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal],.data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:2.25rem}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:2rem}.data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical]{min-height:11rem}.data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical]{width:.375rem}.data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical]{width:auto}.data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical]{width:100%}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked]{--tw-translate-x:1rem}.data-\\[state\\=checked\\]\\:translate-x-4[data-state=checked],.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked]{--tw-translate-x:0px}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\\[align\\=start\\]\\:items-start[data-align=start]{align-items:flex-start}.data-\\[align\\=end\\]\\:items-end[data-align=end]{align-items:flex-end}.data-\\[align\\=center\\]\\:items-center[data-align=center]{align-items:center}.data-\\[state\\=active\\]\\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\\[state\\=checked\\]\\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\\[state\\=selected\\]\\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\\[state\\=unchecked\\]\\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\\[inset\\]\\:pl-8[data-inset]{padding-left:2rem}.data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\\[state\\=active\\]\\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:hsl(var(--destructive))}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1[data-slot=select-value]>*{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden}.\\*\\:data-\\[slot\\=select-value\\]\\:flex[data-slot=select-value]>*{display:flex}.\\*\\:data-\\[slot\\=select-value\\]\\:items-center[data-slot=select-value]>*{align-items:center}.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2[data-slot=select-value]>*{gap:.5rem}.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10:focus[data-variant=destructive]{background-color:hsl(var(--destructive)/.1)}.data-\\[variant\\=destructive\\]\\:focus\\:text-destructive:focus[data-variant=destructive]{color:hsl(var(--destructive))}.dark\\:border-blue-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity,1))}.dark\\:border-green-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity,1))}.dark\\:border-red-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.dark\\:border-yellow-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(133 77 14/var(--tw-border-opacity,1))}.dark\\:bg-blue-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(23 37 84/var(--tw-bg-opacity,1))}.dark\\:bg-green-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(5 46 22/var(--tw-bg-opacity,1))}.dark\\:bg-input\\/30:is(.dark *){background-color:hsl(var(--input)/.3)}.dark\\:bg-red-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(69 10 10/var(--tw-bg-opacity,1))}.dark\\:bg-yellow-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(66 32 6/var(--tw-bg-opacity,1))}.dark\\:text-blue-100:is(.dark *){--tw-text-opacity:1;color:rgb(219 234 254/var(--tw-text-opacity,1))}.dark\\:text-green-100:is(.dark *){--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity,1))}.dark\\:text-green-400:is(.dark *){--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.dark\\:text-red-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 226 226/var(--tw-text-opacity,1))}.dark\\:text-yellow-100:is(.dark *){--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-input\\/50:hover:is(.dark *){background-color:hsl(var(--input)/.5)}.dark\\:hover\\:bg-white\\/10:hover:is(.dark *){background-color:hsla(0,0%,100%,.1)}.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:focus[data-variant=destructive]:is(.dark *){background-color:hsl(var(--destructive)/.2)}@media (min-width:768px){.md\\:basis-1\\/2{flex-basis:50%}.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:1024px){.lg\\:basis-1\\/3{flex-basis:33.333333%}.lg\\:text-5xl{font-size:3rem;line-height:1}}.\\[\\&\\:has\\(\\[role\\=checkbox\\]\\)\\]\\:pr-0:has([role=checkbox]){padding-right:0}.\\[\\&\\:not\\(\\:first-child\\)\\]\\:mt-6:not(:first-child){margin-top:1.5rem}.\\[\\&\\>\\[role\\=checkbox\\]\\]\\:translate-y-\\[2px\\]>[role=checkbox]{--tw-translate-y:2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&\\>div\\]\\:contents>div{display:contents}.\\[\\&\\>li\\]\\:mt-2>li{margin-top:.5rem}.\\[\\&\\>p\\]\\:m-0>p{margin:0}.\\[\\&\\>p\\]\\:text-sm>p{font-size:.875rem;line-height:1.25rem}.\\[\\&\\>tr\\]\\:last\\:border-b-0:last-child>tr{border-bottom-width:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){height:1rem;width:1rem}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'text-\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*=text-]){color:hsl(var(--muted-foreground))}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_tr\\:first-child\\]\\:border-t tr:first-child{border-top-width:1px}.\\[\\&_tr\\]\\:border-b tr{border-bottom-width:1px}.\\[\\&_tr\\]\\:border-border tr{border-color:hsl(var(--border))}");var oe=function(){return oe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},oe.apply(this,arguments)};function ie(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function ae(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function se(t,n=[]){let o=[];const i=()=>{const e=o.map(e=>r.createContext(e));return function(n){const o=n?.[t]||e;return r.useMemo(()=>({[`__scope${t}`]:{...n,[t]:o}}),[n,o])}};return i.scopeName=t,[function(n,i){const a=r.createContext(i),s=o.length;o=[...o,i];const l=n=>{const{scope:o,children:i,...l}=n,c=o?.[t]?.[s]||a,d=r.useMemo(()=>l,Object.values(l));return e(c.Provider,{value:d,children:i})};return l.displayName=n+"Provider",[l,function(e,o){const l=o?.[t]?.[s]||a,c=r.useContext(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},le(i,...n)]}function le(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function ce(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function de(...e){return t=>{let n=!1;const r=e.map(e=>{const r=ce(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():ce(e[t],null)}}}}function ue(...e){return r.useCallback(de(...e),e)}function pe(t){const n=he(t),o=r.forwardRef((t,o)=>{const{children:i,...a}=t,s=r.Children.toArray(i),l=s.find(ge);if(l){const t=l.props.children,i=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...a,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return e(n,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}function he(e){const t=r.forwardRef((e,t)=>{const{children:n,...o}=e;if(r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(i.ref=t?de(t,e):e),r.cloneElement(n,i)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}"function"==typeof SuppressedError&&SuppressedError;var fe=Symbol("radix.slottable");function ge(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===fe}function me(t){const n=t+"CollectionProvider",[r,i]=se(n),[a,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),l=t=>{const{scope:n,children:r}=t,i=o.useRef(null),s=o.useRef(new Map).current;return e(a,{scope:n,itemMap:s,collectionRef:i,children:r})};l.displayName=n;const c=t+"CollectionSlot",d=pe(c),u=o.forwardRef((t,n)=>{const{scope:r,children:o}=t,i=ue(n,s(c,r).collectionRef);return e(d,{ref:i,children:o})});u.displayName=c;const p=t+"CollectionItemSlot",h="data-radix-collection-item",f=pe(p),g=o.forwardRef((t,n)=>{const{scope:r,children:i,...a}=t,l=o.useRef(null),c=ue(n,l),d=s(p,r);return o.useEffect(()=>(d.itemMap.set(l,{ref:l,...a}),()=>{d.itemMap.delete(l)})),e(f,{[h]:"",ref:c,children:i})});return g.displayName=p,[{Provider:l,Slot:u,ItemSlot:g},function(e){const n=s(t+"CollectionConsumer",e);return o.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},i]}function be(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}var ve=globalThis?.document?r.useLayoutEffect:()=>{},we=r[" useInsertionEffect ".trim().toString()]||ve;function ye({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,a,s]=function({defaultProp:e,onChange:t}){const[n,o]=r.useState(e),i=r.useRef(n),a=r.useRef(t);return we(()=>{a.current=t},[t]),r.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,o,a]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:i;{const t=r.useRef(void 0!==e);r.useEffect(()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,o])}const d=r.useCallback(t=>{if(l){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)},[l,e,a,s]);return[c,d]}var xe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=pe(`Primitive.${n}`),i=r.forwardRef((t,r)=>{const{asChild:i,...a}=t,s=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:r})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{});function ke(e,t){e&&v.flushSync(()=>e.dispatchEvent(t))}var Ne=e=>{const{present:t,children:n}=e,o=function(e){const[t,n]=r.useState(),o=r.useRef(null),i=r.useRef(e),a=r.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return r.useReducer((e,n)=>t[e][n]??e,e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return r.useEffect(()=>{const e=Ce(o.current);a.current="mounted"===l?e:"none"},[l]),ve(()=>{const t=o.current,n=i.current;if(n!==e){const r=a.current,o=Ce(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}},[e,c]),ve(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,r=r=>{const a=Ce(o.current).includes(CSS.escape(r.animationName));if(r.target===t&&a&&(c("ANIMATION_END"),!i.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=Ce(o.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",r),t.addEventListener("animationend",r),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",r),t.removeEventListener("animationend",r)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:r.useCallback(e=>{o.current=e?getComputedStyle(e):null,n(e)},[])}}(t),i="function"==typeof n?n({present:o.isPresent}):r.Children.only(n),a=ue(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||o.isPresent?r.cloneElement(i,{ref:a}):null};function Ce(e){return e?.animationName||"none"}Ne.displayName="Presence";var Oe=r[" useId ".trim().toString()]||(()=>{}),Se=0;function Ee(e){const[t,n]=r.useState(Oe());return ve(()=>{e||n(e=>e??String(Se++))},[e]),e||(t?`radix-${t}`:"")}var je="Collapsible",[Re,ze]=se(je),[De,Pe]=Re(je),Me=r.forwardRef((t,n)=>{const{__scopeCollapsible:o,open:i,defaultOpen:a,disabled:s,onOpenChange:l,...c}=t,[d,u]=ye({prop:i,defaultProp:a??!1,onChange:l,caller:je});return e(De,{scope:o,disabled:s,contentId:Ee(),open:d,onOpenToggle:r.useCallback(()=>u(e=>!e),[u]),children:e(xe.div,{"data-state":He(d),"data-disabled":s?"":void 0,...c,ref:n})})});Me.displayName=je;var Te="CollapsibleTrigger",Ie=r.forwardRef((t,n)=>{const{__scopeCollapsible:r,...o}=t,i=Pe(Te,r);return e(xe.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":He(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...o,ref:n,onClick:be(t.onClick,i.onOpenToggle)})});Ie.displayName=Te;var _e="CollapsibleContent",Ae=r.forwardRef((t,n)=>{const{forceMount:r,...o}=t,i=Pe(_e,t.__scopeCollapsible);return e(Ne,{present:r||i.open,children:({present:t})=>e(Le,{...o,ref:n,present:t})})});Ae.displayName=_e;var Le=r.forwardRef((t,n)=>{const{__scopeCollapsible:o,present:i,children:a,...s}=t,l=Pe(_e,o),[c,d]=r.useState(i),u=r.useRef(null),p=ue(n,u),h=r.useRef(0),f=h.current,g=r.useRef(0),m=g.current,b=l.open||c,v=r.useRef(b),w=r.useRef(void 0);return r.useEffect(()=>{const e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),ve(()=>{const e=u.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();h.current=t.height,g.current=t.width,v.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),d(i)}},[l.open,i]),e(xe.div,{"data-state":He(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!b,...s,ref:p,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...t.style},children:b&&a})});function He(e){return e?"open":"closed"}var Fe=Me,We=Ie,Be=Ae,Ue=r.createContext(void 0);function Ve(e){const t=r.useContext(Ue);return e||t||"ltr"}var $e="Accordion",Xe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ye,Ke,Ge]=me($e),[qe,Ze]=se($e,[Ge,ze]),Je=ze(),Qe=o.forwardRef((t,n)=>{const{type:r,...o}=t,i=o,a=o;return e(Ye.Provider,{scope:t.__scopeAccordion,children:"multiple"===r?e(it,{...a,ref:n}):e(ot,{...i,ref:n})})});Qe.displayName=$e;var[et,tt]=qe($e),[nt,rt]=qe($e,{collapsible:!1}),ot=o.forwardRef((t,n)=>{const{value:r,defaultValue:i,onValueChange:a=()=>{},collapsible:s=!1,...l}=t,[c,d]=ye({prop:r,defaultProp:i??"",onChange:a,caller:$e});return e(et,{scope:t.__scopeAccordion,value:o.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:o.useCallback(()=>s&&d(""),[s,d]),children:e(nt,{scope:t.__scopeAccordion,collapsible:s,children:e(lt,{...l,ref:n})})})}),it=o.forwardRef((t,n)=>{const{value:r,defaultValue:i,onValueChange:a=()=>{},...s}=t,[l,c]=ye({prop:r,defaultProp:i??[],onChange:a,caller:$e}),d=o.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=o.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return e(et,{scope:t.__scopeAccordion,value:l,onItemOpen:d,onItemClose:u,children:e(nt,{scope:t.__scopeAccordion,collapsible:!0,children:e(lt,{...s,ref:n})})})}),[at,st]=qe($e),lt=o.forwardRef((t,n)=>{const{__scopeAccordion:r,disabled:i,dir:a,orientation:s="vertical",...l}=t,c=ue(o.useRef(null),n),d=Ke(r),u="ltr"===Ve(a),p=be(t.onKeyDown,e=>{if(!Xe.includes(e.key))return;const t=e.target,n=d().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),o=n.length;if(-1===r)return;e.preventDefault();let i=r;const a=o-1,l=()=>{i=r+1,i>a&&(i=0)},c=()=>{i=r-1,i<0&&(i=a)};switch(e.key){case"Home":i=0;break;case"End":i=a;break;case"ArrowRight":"horizontal"===s&&(u?l():c());break;case"ArrowDown":"vertical"===s&&l();break;case"ArrowLeft":"horizontal"===s&&(u?c():l());break;case"ArrowUp":"vertical"===s&&c()}const p=i%o;n[p].ref.current?.focus()});return e(at,{scope:r,disabled:i,direction:a,orientation:s,children:e(Ye.Slot,{scope:r,children:e(xe.div,{...l,"data-orientation":s,ref:c,onKeyDown:i?void 0:p})})})}),ct="AccordionItem",[dt,ut]=qe(ct),pt=o.forwardRef((t,n)=>{const{__scopeAccordion:r,value:o,...i}=t,a=st(ct,r),s=tt(ct,r),l=Je(r),c=Ee(),d=o&&s.value.includes(o)||!1,u=a.disabled||t.disabled;return e(dt,{scope:r,open:d,disabled:u,triggerId:c,children:e(Fe,{"data-orientation":a.orientation,"data-state":vt(d),...l,...i,ref:n,disabled:u,open:d,onOpenChange:e=>{e?s.onItemOpen(o):s.onItemClose(o)}})})});pt.displayName=ct;var ht="AccordionHeader";o.forwardRef((t,n)=>{const{__scopeAccordion:r,...o}=t,i=st($e,r),a=ut(ht,r);return e(xe.h3,{"data-orientation":i.orientation,"data-state":vt(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:n})}).displayName=ht;var ft="AccordionTrigger",gt=o.forwardRef((t,n)=>{const{__scopeAccordion:r,...o}=t,i=st($e,r),a=ut(ft,r),s=rt(ft,r),l=Je(r);return e(Ye.ItemSlot,{scope:r,children:e(We,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...l,...o,ref:n})})});gt.displayName=ft;var mt="AccordionContent",bt=o.forwardRef((t,n)=>{const{__scopeAccordion:r,...o}=t,i=st($e,r),a=ut(mt,r),s=Je(r);return e(Be,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...s,...o,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});function vt(e){return e?"open":"closed"}bt.displayName=mt;var wt=Qe,yt=pt,xt=gt,kt=bt;const Nt=i((t,n)=>{var{children:r}=t,o=ie(t,["children"]);return e(wt,Object.assign({},o,{className:"w-full rounded-md border",ref:n,"data-slot":"accordion"},{children:r}))});Nt.displayName="Accordion";const Ct=i((t,n)=>{var{children:r}=t,o=ie(t,["children"]);return e(yt,Object.assign({},o,{ref:n,"data-slot":"accordion-item",className:"border-b last:border-b-0"},{children:r}))});Ct.displayName="AccordionItem";const Ot=t=>{var{children:n}=t,r=ie(t,["children"]);return e(xt,Object.assign({},r,{type:"button",contentEditable:!1,"data-slot":"accordion-trigger",className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:n}))},St=i((t,n)=>{var{children:r}=t,o=ie(t,["children"]);return e(kt,Object.assign({},o,{ref:n,"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"},{children:e("div",Object.assign({className:"pt-0 pb-4 text-muted-foreground px-5"},{children:r}))}))});St.displayName="AccordionContent";const Et=(...e)=>e.filter((e,t,n)=>Boolean(e)&&n.indexOf(e)===t).join(" ");
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-react v0.378.0 - ISC
|
|
4
4
|
*
|
|
@@ -11,16 +11,16 @@ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import*as n from
|
|
|
11
11
|
* This source code is licensed under the ISC license.
|
|
12
12
|
* See the LICENSE file in the root directory of this source tree.
|
|
13
13
|
*/
|
|
14
|
-
var
|
|
14
|
+
var jt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-react v0.378.0 - ISC
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/const
|
|
20
|
+
*/const Rt=i(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...l},c)=>a("svg",{ref:c,...jt,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Et("lucide",o),...l},[...s.map(([e,t])=>a(e,t)),...Array.isArray(i)?i:[i]])),zt=(e,t)=>{const n=i(({className:n,...r},o)=>{return a(Rt,{ref:o,iconNode:t,className:Et(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i});return n.displayName=`${e}`,n},Dt=zt("AlignCenter",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"17",x2:"7",y1:"12",y2:"12",key:"rsh8ii"}],["line",{x1:"19",x2:"5",y1:"18",y2:"18",key:"1t0tuv"}]]),Pt=zt("AlignLeft",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}],["line",{x1:"17",x2:"3",y1:"18",y2:"18",key:"1awlsn"}]]),Mt=zt("AlignRight",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}],["line",{x1:"21",x2:"7",y1:"18",y2:"18",key:"1g9eri"}]]),Tt=zt("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),It=zt("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),_t=zt("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),At=zt("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),Lt=zt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ht=zt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Ft=zt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Wt=zt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Bt=zt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Ut=zt("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),Vt=zt("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]),$t=zt("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),Xt=zt("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]),Yt=zt("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),Kt=zt("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),Gt=zt("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),qt=zt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Zt=zt("Merge",[["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22",key:"1hyw0i"}],["path",{d:"m20 22-5-5",key:"1m27yz"}]]),Jt=zt("MoveHorizontal",[["polyline",{points:"18 8 22 12 18 16",key:"1hqrds"}],["polyline",{points:"6 8 2 12 6 16",key:"f0ernq"}],["line",{x1:"2",x2:"22",y1:"12",y2:"12",key:"1dnqot"}]]),Qt=zt("MoveVertical",[["polyline",{points:"8 18 12 22 16 18",key:"1uutw3"}],["polyline",{points:"8 6 12 2 16 6",key:"d60sxy"}],["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}]]),en=zt("Paintbrush",[["path",{d:"M18.37 2.63 14 7l-1.59-1.59a2 2 0 0 0-2.82 0L8 7l9 9 1.59-1.59a2 2 0 0 0 0-2.82L17 10l4.37-4.37a2.12 2.12 0 1 0-3-3Z",key:"m6k5sh"}],["path",{d:"M9 8c-2 3-4 3.5-7 4l8 10c2-1 6-5 6-7",key:"arzq70"}],["path",{d:"M14.5 17.5 4.5 15",key:"s7fvrz"}]]),tn=zt("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]),nn=zt("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),rn=zt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),on=zt("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),an=zt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),sn=zt("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),ln=zt("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),cn=zt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),dn=zt("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),un=zt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),pn=zt("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]),hn=zt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);
|
|
21
21
|
/**
|
|
22
22
|
* @license lucide-react v0.378.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var Qt={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,n=Qt.levels(e,t);return n=r?n.slice(1):n.slice(0,-1)},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n];if(o!==t[n])break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return Qt.equals(n,o)&&i>a},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return Qt.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return Qt.equals(n,o)&&i<a},equals:(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===Qt.compare(e,t),isAncestor:(e,t)=>e.length<t.length&&0===Qt.compare(e,t),isBefore:(e,t)=>-1===Qt.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===Qt.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===Qt.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===Qt.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===Qt.compare(e,t),isPath:e=>Array.isArray(e)&&(0===e.length||"number"==typeof e[0]),isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&Qt.equals(r,n)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!Qt.isAncestor(t,e)&&!Qt.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(0===e.length)return n;switch(t.type){case"insert_node":var{path:i}=t;(Qt.equals(i,n)||Qt.endsBefore(i,n)||Qt.isAncestor(i,n))&&(n[i.length-1]+=1);break;case"remove_node":var{path:a}=t;if(Qt.equals(a,n)||Qt.isAncestor(a,n))return null;Qt.endsBefore(a,n)&&(n[a.length-1]-=1);break;case"merge_node":var{path:s,position:l}=t;Qt.equals(s,n)||Qt.endsBefore(s,n)?n[s.length-1]-=1:Qt.isAncestor(s,n)&&(n[s.length-1]-=1,n[s.length]+=l);break;case"split_node":var{path:c,position:d}=t;if(Qt.equals(c,n)){if("forward"===o)n[n.length-1]+=1;else if("backward"!==o)return null}else Qt.endsBefore(c,n)?n[c.length-1]+=1:Qt.isAncestor(c,n)&&e[c.length]>=d&&(n[c.length-1]+=1,n[c.length]-=d);break;case"move_node":var{path:u,newPath:p}=t;if(Qt.equals(u,p))return n;if(Qt.isAncestor(u,n)||Qt.equals(u,n)){var f=p.slice();return Qt.endsBefore(u,p)&&u.length<p.length&&(f[u.length-1]-=1),f.concat(n.slice(u.length))}Qt.isSibling(u,p)&&(Qt.isAncestor(p,n)||Qt.equals(p,n))?Qt.endsBefore(u,n)?n[u.length-1]-=1:n[u.length-1]+=1:Qt.endsBefore(p,n)||Qt.equals(p,n)||Qt.isAncestor(p,n)?(Qt.endsBefore(u,n)&&(n[u.length-1]-=1),n[p.length-1]+=1):Qt.endsBefore(u,n)&&(Qt.equals(p,n)&&(n[p.length-1]+=1),n[u.length-1]-=1)}return n}};function er(e){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},er(e)}function tr(e){var t=function(e,t){if("object"!==er(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==er(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===er(t)?t:String(t)}function rr(e,t,r){return(t=tr(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nr(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var or=["anchor","focus"];function ir(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var ar={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return ar.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=ar.edges(e);return t},equals:(e,t)=>Nr.equals(e.anchor,t.anchor)&&Nr.equals(e.focus,t.focus),surrounds(e,t){var r=ar.intersection(e,t);return!!r&&ar.equals(r,t)},includes(e,t){if(ar.isRange(t)){if(ar.includes(e,t.anchor)||ar.includes(e,t.focus))return!0;var[r,n]=ar.edges(e),[o,i]=ar.edges(t);return Nr.isBefore(r,o)&&Nr.isAfter(n,i)}var[a,s]=ar.edges(e),l=!1,c=!1;return Nr.isPoint(t)?(l=Nr.compare(t,a)>=0,c=Nr.compare(t,s)<=0):(l=Qt.compare(t,a.path)>=0,c=Qt.compare(t,s.path)<=0),l&&c},intersection(e,t){var r=nr(e,or),[n,o]=ar.edges(e),[i,a]=ar.edges(t),s=Nr.isBefore(n,i)?i:n,l=Nr.isBefore(o,a)?o:a;return Nr.isBefore(l,s)?null:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ir(Object(r),!0).forEach(function(t){rr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ir(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({anchor:s,focus:l},r)},isBackward(e){var{anchor:t,focus:r}=e;return Nr.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Nr.equals(t,r)},isExpanded:e=>!ar.isCollapsed(e),isForward:e=>!ar.isBackward(e),isRange:e=>br(e)&&Nr.isPoint(e.anchor)&&Nr.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=ar.edges(e);return t},transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var n,o,{affinity:i="inward"}=r;if("inward"===i){var a=ar.isCollapsed(e);ar.isForward(e)?(n="forward",o=a?n:"backward"):(n="backward",o=a?n:"forward")}else"outward"===i?ar.isForward(e)?(n="backward",o="forward"):(n="forward",o="backward"):(n=i,o=i);var s=Nr.transform(e.anchor,t,{affinity:n}),l=Nr.transform(e.focus,t,{affinity:o});return s&&l?{anchor:s,focus:l}:null}},sr=function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!br(e)&&("function"!=typeof e.apply&&(t?fr.isNodeList(e.children):Array.isArray(e.children)))},lr={isAncestor(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return br(e)&&fr.isNodeList(e.children,{deep:t})},isElement:sr,isElementList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>lr.isElement(e,{deep:t}))},isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return sr(e)&&e[r]===t},matches(e,t){for(var r in t)if("children"!==r&&e[r]!==t[r])return!1;return!0}},cr=["children"],dr=["text"];function ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function pr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(r),!0).forEach(function(t){rr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ur(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var fr={ancestor(e,t){var r=fr.get(e,t);if(Dr.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Sr.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n of Qt.ancestors(t,r)){var o=[fr.ancestor(e,n),n];yield o}}()},child(e,t){if(Dr.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Sr.stringify(e)));var r=e.children[t];if(null==r)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Sr.stringify(e)));return r},children(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var{reverse:n=!1}=r,o=fr.ancestor(e,t),{children:i}=o,a=n?i.length-1:0;n?a>=0:a<i.length;){var s=fr.child(o,a),l=t.concat(a);yield[s,l],a=n?a-1:a+1}}()},common(e,t,r){var n=Qt.common(t,r);return[fr.get(e,n),n]},descendant(e,t){var r=fr.get(e,t);if(xr.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Sr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of fr.nodes(e,t))0!==n.length&&(yield[r,n])}()},elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of fr.nodes(e,t))lr.isElement(r)&&(yield[r,n])}()},extractProps:e=>lr.isAncestor(e)?nr(e,cr):nr(e,dr),first(e,t){for(var r=t.slice(),n=fr.get(e,r);n&&!Dr.isText(n)&&0!==n.children.length;)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){var r={children:e.children},[n,o]=ar.edges(t),i=fr.nodes(r,{reverse:!0,pass:e=>{var[,r]=e;return!ar.includes(t,r)}}),a=function(){if(!ar.includes(t,s)){var e=s[s.length-1];Lr(r,Qt.parent(s),t=>Ar(t,e,1))}Qt.equals(s,o.path)&&Fr(r,s,e=>{var t=e.text.slice(0,o.offset);return pr(pr({},e),{},{text:t})}),Qt.equals(s,n.path)&&Fr(r,s,e=>{var t=e.text.slice(n.offset);return pr(pr({},e),{},{text:t})})};for(var[,s]of i)a();return r.children},get(e,t){var r=fr.getIf(e,t);if(void 0===r)throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Sr.stringify(e)));return r},getIf(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(Dr.isText(r)||!r.children[o])return;r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(Dr.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Dr.isText(e)||lr.isElement(e,{deep:t})||xr.isEditor(e,{deep:t})},isNodeList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>fr.isNode(e,{deep:t}))},last(e,t){for(var r=t.slice(),n=fr.get(e,r);n&&!Dr.isText(n)&&0!==n.children.length;){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=fr.get(e,t);if(!Dr.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Sr.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n of Qt.levels(t,r)){var o=fr.get(e,n);yield[o,n]}}()},matches:(e,t)=>lr.isElement(e)&&lr.isElementProps(t)&&lr.matches(e,t)||Dr.isText(e)&&Dr.isTextProps(t)&&Dr.matches(e,t),nodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:i}=t,a=new Set,s=[],l=e;!i||!(n?Qt.isBefore(s,i):Qt.isAfter(s,i));)if(a.has(l)||(yield[l,s]),a.has(l)||Dr.isText(l)||0===l.children.length||null!=r&&!1!==r([l,s])){if(0===s.length)break;if(!n){var c=Qt.next(s);if(fr.has(e,c)){s=c,l=fr.get(e,s);continue}}if(n&&0!==s[s.length-1])s=Qt.previous(s),l=fr.get(e,s);else s=Qt.parent(s),l=fr.get(e,s),a.add(l)}else{a.add(l);var d=n?l.children.length-1:0;Qt.isAncestor(s,o)&&(d=o[s.length]),s=s.concat(d),l=fr.get(e,s)}}()},parent(e,t){var r=Qt.parent(t),n=fr.get(e,r);if(Dr.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string:e=>Dr.isText(e)?e.text:e.children.map(fr.string).join(""),texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[r,n]of fr.nodes(e,t))Dr.isText(r)&&(yield[r,n])}()}};function hr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function gr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hr(Object(r),!0).forEach(function(t){rr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var mr,vr={isNodeOperation:e=>vr.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!br(e))return!1;switch(e.type){case"insert_node":case"remove_node":return Qt.isPath(e.path)&&fr.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&Qt.isPath(e.path);case"merge_node":return"number"==typeof e.position&&Qt.isPath(e.path)&&br(e.properties);case"move_node":return Qt.isPath(e.path)&&Qt.isPath(e.newPath);case"set_node":return Qt.isPath(e.path)&&br(e.properties)&&br(e.newProperties);case"set_selection":return null===e.properties&&ar.isRange(e.newProperties)||null===e.newProperties&&ar.isRange(e.properties)||br(e.properties)&&br(e.newProperties);case"split_node":return Qt.isPath(e.path)&&"number"==typeof e.position&&br(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every(e=>vr.isOperation(e)),isSelectionOperation:e=>vr.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>vr.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return gr(gr({},e),{},{type:"remove_node"});case"insert_text":return gr(gr({},e),{},{type:"remove_text"});case"merge_node":return gr(gr({},e),{},{type:"split_node",path:Qt.previous(e.path)});case"move_node":var{newPath:t,path:r}=e;if(Qt.equals(t,r))return e;if(Qt.isSibling(r,t))return gr(gr({},e),{},{path:t,newPath:r});var n=Qt.transform(r,e),o=Qt.transform(Qt.next(r),e);return gr(gr({},e),{},{path:n,newPath:o});case"remove_node":return gr(gr({},e),{},{type:"insert_node"});case"remove_text":return gr(gr({},e),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=e;return gr(gr({},e),{},{properties:a,newProperties:i});case"set_selection":var{properties:s,newProperties:l}=e;return gr(gr({},e),{},null==s?{properties:l,newProperties:null}:null==l?{properties:null,newProperties:s}:{properties:l,newProperties:s});case"split_node":return gr(gr({},e),{},{type:"merge_node",path:Qt.next(e.path)})}}},br=e=>"object"==typeof e&&null!==e,wr=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!==o[i])return!1}else if(br(n)&&br(o)){if(!wr(n,o))return!1}else if(n!==o)return!1}for(var a in t)if(void 0===e[a]&&void 0!==t[a])return!1;return!0},yr=e=>e.selection?e.selection:e.children.length>0?xr.end(e,[]):[0];!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(mr||(mr={})),mr.L,mr.L,mr.V,mr.LV,mr.LVT,mr.LV,mr.V,mr.V,mr.T,mr.LVT,mr.T,mr.T,mr.Any,mr.Extend,mr.ZWJ,mr.Any,mr.SpacingMark,mr.Prepend,mr.Any,mr.ZWJ,mr.ExtPict,mr.RI,mr.RI;var xr={above:(e,t)=>e.above(t),addMark(e,t,r){e.addMark(t,r)},after:(e,t,r)=>e.after(t,r),before:(e,t,r)=>e.before(t,r),deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges:(e,t)=>e.edges(t),elementReadOnly(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.elementReadOnly(t)},end:(e,t)=>e.end(t),first:(e,t)=>e.first(t),fragment:(e,t)=>e.fragment(t),hasBlocks:(e,t)=>e.hasBlocks(t),hasInlines:(e,t)=>e.hasInlines(t),hasPath:(e,t)=>e.hasPath(t),hasTexts:(e,t)=>e.hasTexts(t),insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>e.isBlock(t),isEdge:(e,t,r)=>e.isEdge(t,r),isEditor:e=>function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!br(e))return!1;var r="function"==typeof e.addMark&&"function"==typeof e.apply&&"function"==typeof e.deleteFragment&&"function"==typeof e.insertBreak&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertText&&"function"==typeof e.isElementReadOnly&&"function"==typeof e.isInline&&"function"==typeof e.isSelectable&&"function"==typeof e.isVoid&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.removeMark&&"function"==typeof e.getDirtyPaths&&(null===e.marks||br(e.marks))&&(null===e.selection||ar.isRange(e.selection))&&(!t||fr.isNodeList(e.children))&&vr.isOperationList(e.operations);return r}(e),isElementReadOnly:(e,t)=>e.isElementReadOnly(t),isEmpty:(e,t)=>e.isEmpty(t),isEnd:(e,t,r)=>e.isEnd(t,r),isInline:(e,t)=>e.isInline(t),isNormalizing:e=>e.isNormalizing(),isSelectable:(e,t)=>e.isSelectable(t),isStart:(e,t,r)=>e.isStart(t,r),isVoid:(e,t)=>e.isVoid(t),last:(e,t)=>e.last(t),leaf:(e,t,r)=>e.leaf(t,r),levels:(e,t)=>e.levels(t),marks:e=>e.getMarks(),next:(e,t)=>e.next(t),node:(e,t,r)=>e.node(t,r),nodes:(e,t)=>e.nodes(t),normalize(e,t){e.normalize(t)},parent:(e,t,r)=>e.parent(t,r),path:(e,t,r)=>e.path(t,r),pathRef:(e,t,r)=>e.pathRef(t,r),pathRefs:e=>e.pathRefs(),point:(e,t,r)=>e.point(t,r),pointRef:(e,t,r)=>e.pointRef(t,r),pointRefs:e=>e.pointRefs(),positions:(e,t)=>e.positions(t),previous:(e,t)=>e.previous(t),range:(e,t,r)=>e.range(t,r),rangeRef:(e,t,r)=>e.rangeRef(t,r),rangeRefs:e=>e.rangeRefs(),removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start:(e,t)=>e.start(t),string:(e,t,r)=>e.string(t,r),unhangRange:(e,t,r)=>e.unhangRange(t,r),void:(e,t)=>e.void(t),withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)};function kr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Or(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kr(Object(r),!0).forEach(function(t){rr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Nr={compare(e,t){var r=Qt.compare(e.path,t.path);return 0===r?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter:(e,t)=>1===Nr.compare(e,t),isBefore:(e,t)=>-1===Nr.compare(e,t),equals:(e,t)=>e.offset===t.offset&&Qt.equals(e.path,t.path),isPoint:e=>br(e)&&"number"==typeof e.offset&&Qt.isPath(e.path),transform(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var{affinity:n="forward"}=r,{path:o,offset:i}=e;switch(t.type){case"insert_node":case"move_node":o=Qt.transform(o,t,r);break;case"insert_text":Qt.equals(t.path,o)&&(t.offset<i||t.offset===i&&"forward"===n)&&(i+=t.text.length);break;case"merge_node":Qt.equals(t.path,o)&&(i+=t.position),o=Qt.transform(o,t,r);break;case"remove_text":Qt.equals(t.path,o)&&t.offset<=i&&(i-=Math.min(i-t.offset,t.text.length));break;case"remove_node":if(Qt.equals(t.path,o)||Qt.isAncestor(t.path,o))return null;o=Qt.transform(o,t,r);break;case"split_node":if(Qt.equals(t.path,o)){if(t.position===i&&null==n)return null;(t.position<i||t.position===i&&"forward"===n)&&(i-=t.position,o=Qt.transform(o,t,Or(Or({},r),{},{affinity:"forward"})))}else o=Qt.transform(o,t,r);break;default:return e}return{path:o,offset:i}}},Cr=void 0,Sr={setScrubber(e){Cr=e},stringify:e=>JSON.stringify(e,Cr)},Er=["text"],Rr=["anchor","focus","merge"];function Pr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function jr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pr(Object(r),!0).forEach(function(t){rr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Dr={equals(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{loose:n=!1}=r;function o(e){return nr(e,Er)}return wr(n?o(e):e,n?o(t):t)},isText:e=>br(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every(e=>Dr.isText(e)),isTextProps:e=>void 0!==e.text,matches(e,t){for(var r in t)if("text"!==r&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[{leaf:jr({},e)}];for(var n of t){var{anchor:o,focus:i,merge:a}=n,s=nr(n,Rr),[l,c]=ar.edges(n),d=[],u=0,p=l.offset,f=c.offset,h=null!=a?a:Object.assign;for(var{leaf:g}of r){var{length:m}=g.text,v=u;if(u+=m,p<=v&&u<=f)h(g,s),d.push({leaf:g});else if(p!==f&&(p===u||f===v)||p>u||f<v||f===v&&0!==v)d.push({leaf:g});else{var b=g,w=void 0,y=void 0;if(f<u){var x=f-v;y={leaf:jr(jr({},b),{},{text:b.text.slice(x)})},b=jr(jr({},b),{},{text:b.text.slice(0,x)})}if(p>v){var k=p-v;w={leaf:jr(jr({},b),{},{text:b.text.slice(0,k)})},b=jr(jr({},b),{},{text:b.text.slice(k)})}h(b,s),w&&d.push(w),d.push({leaf:b}),y&&d.push(y)}}r=d}if(r.length>1){var O=0;for(var[N,C]of r.entries()){var S=O,E=S+C.leaf.text.length,R={start:S,end:E};0===N&&(R.isFirst=!0),N===r.length-1&&(R.isLast=!0),C.position=R,O=E}}return r}};function zr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Mr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zr(Object(r),!0).forEach(function(t){rr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Tr=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return[...e.slice(0,t),...n,...e.slice(t)]},_r=function(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return[...e.slice(0,t),...o,...e.slice(t+r)]},Ar=_r,Ir=(e,t,r)=>{if(0===t.length)throw new Error("Cannot modify the editor");for(var n=fr.get(e,t),o=t.slice(),i=r(n);o.length>1;){var a=o.pop(),s=fr.get(e,o);i=Mr(Mr({},s),{},{children:_r(s.children,a,1,i)})}var l=o.pop();e.children=_r(e.children,l,1,i)},Lr=(e,t,r)=>{0===t.length?e.children=r(e.children):Ir(e,t,e=>{if(Dr.isText(e))throw new Error("Cannot get the element at path [".concat(t,"] because it refers to a leaf node: ").concat(Sr.stringify(e)));return Mr(Mr({},e),{},{children:r(e.children)})})},Fr=(e,t,r)=>Ir(e,t,e=>{if(!Dr.isText(e))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Sr.stringify(e)));return r(e)});function Hr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Br(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Hr(Object(r),!0).forEach(function(t){rr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Wr={transform(e,t){var r=!1;switch(t.type){case"insert_node":var{path:n,node:o}=t;Lr(e,Qt.parent(n),e=>{var t=n[n.length-1];if(t>e.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));return Tr(e,t,o)}),r=!0;break;case"insert_text":var{path:i,offset:a,text:s}=t;if(0===s.length)break;Fr(e,i,e=>{var t=e.text.slice(0,a),r=e.text.slice(a);return Br(Br({},e),{},{text:t+s+r})}),r=!0;break;case"merge_node":var{path:l}=t,c=l[l.length-1],d=Qt.previous(l),u=d[d.length-1];Lr(e,Qt.parent(l),e=>{var t,r=e[c],n=e[u];if(Dr.isText(r)&&Dr.isText(n))t=Br(Br({},n),{},{text:n.text+r.text});else{if(Dr.isText(r)||Dr.isText(n))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(l,"] to nodes of different interfaces: ").concat(Sr.stringify(r)," ").concat(Sr.stringify(n)));t=Br(Br({},n),{},{children:n.children.concat(r.children)})}return _r(e,u,2,t)}),r=!0;break;case"move_node":var{path:p,newPath:f}=t,h=p[p.length-1];if(Qt.isAncestor(p,f))throw new Error("Cannot move a path [".concat(p,"] to new path [").concat(f,"] because the destination is inside itself."));var g=fr.get(e,p);Lr(e,Qt.parent(p),e=>Ar(e,h,1));var m=Qt.transform(p,t),v=m[m.length-1];Lr(e,Qt.parent(m),e=>Tr(e,v,g)),r=!0;break;case"remove_node":var{path:b}=t,w=b[b.length-1];if(Lr(e,Qt.parent(b),e=>Ar(e,w,1)),e.selection){var y=Br({},e.selection);for(var[x,k]of ar.points(y)){var O=Nr.transform(x,t);if(null!=y&&null!=O)y[k]=O;else{var N=void 0,C=void 0;for(var[S,E]of fr.texts(e)){if(-1!==Qt.compare(E,b)){C=[S,E];break}N=[S,E]}var R=!1;N&&C&&(R=!Qt.isSibling(N[1],b)&&(!!Qt.equals(C[1],b)||Qt.common(N[1],b).length<Qt.common(C[1],b).length)),N&&!R?y[k]={path:N[1],offset:N[0].text.length}:C?y[k]={path:C[1],offset:0}:y=null}}y&&ar.equals(y,e.selection)||(e.selection=y)}break;case"remove_text":var{path:P,offset:j,text:D}=t;if(0===D.length)break;Fr(e,P,e=>{var t=e.text.slice(0,j),r=e.text.slice(j+D.length);return Br(Br({},e),{},{text:t+r})}),r=!0;break;case"set_node":var{path:z,properties:M,newProperties:T}=t;if(0===z.length)throw new Error("Cannot set properties on the root node!");Ir(e,z,e=>{var t=Br({},e);for(var r in T){if("children"===r||"text"===r)throw new Error('Cannot set the "'.concat(r,'" property of nodes!'));var n=T[r];null==n?delete t[r]:t[r]=n}for(var o in M)T.hasOwnProperty(o)||delete t[o];return t});break;case"set_selection":var{newProperties:_}=t;if(null==_){e.selection=null;break}if(null==e.selection){if(!ar.isRange(_))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Sr.stringify(_)," when there is no current selection."));e.selection=Br({},_);break}var A=Br({},e.selection);for(var I in _){var L=_[I];if(null==L){if("anchor"===I||"focus"===I)throw new Error('Cannot remove the "'.concat(I,'" selection property'));delete A[I]}else A[I]=L}e.selection=A;break;case"split_node":var{path:F,position:H,properties:B}=t,W=F[F.length-1];if(0===F.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(F,"] because the root node cannot be split."));Lr(e,Qt.parent(F),e=>{var t,r,n=e[W];if(Dr.isText(n)){var o=n.text.slice(0,H),i=n.text.slice(H);t=Br(Br({},n),{},{text:o}),r=Br(Br({},B),{},{text:i})}else{var a=n.children.slice(0,H),s=n.children.slice(H);t=Br(Br({},n),{},{children:a}),r=Br(Br({},B),{},{children:s})}return _r(e,W,1,t,r)}),r=!0}if(r&&e.selection){var U=Br({},e.selection);for(var[V,$]of ar.points(U))U[$]=Nr.transform(V,t);ar.equals(U,e.selection)||(e.selection=U)}}},Ur={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},Vr={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},$r={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};xr.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=yr(e)}=r;if(Qt.isPath(o)&&(o=xr.range(e,o)),ar.isRange(o))if(ar.isCollapsed(o))o=o.anchor;else{var i=ar.end(o);if(!n&&xr.void(e,{at:i}))return;var a=ar.start(o),s=xr.pointRef(e,a),l=xr.pointRef(e,i);Yr.delete(e,{at:o,voids:n});var c=s.unref(),d=l.unref();o=c||d,Yr.setSelection(e,{anchor:o,focus:o})}if(!(!n&&xr.void(e,{at:o})||xr.elementReadOnly(e,{at:o}))){var{path:u,offset:p}=o;t.length>0&&e.apply({type:"insert_text",path:u,offset:p,text:t})}})}};function Xr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function qr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xr(Object(r),!0).forEach(function(t){rr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Yr=qr(qr(qr(qr({},Wr),Ur),Vr),$r);$("[data-element-type=accordion-list-item-content] [data-slate-node=element],[data-element-type=accordion-list-item-heading] [data-slate-node=element]{margin:0}");const Kr={"accordion-list":{render:t=>{const{attributes:r,children:n,blockId:o,element:i}=t,a=x(),s=l(()=>{const e=[];return i.children.forEach(t=>{var r;"accordion-list-item"===t.type&&(null===(r=t.props)||void 0===r?void 0:r.isExpanded)&&e.push(t.id)}),e},[i]);return e(ut,Object.assign({},r,{type:"multiple",value:s,onValueChange:e=>{const t=k.getBlockSlate(a,{id:o});if(!t)return;const r=xr.nodes(t,{match:e=>lr.isElement(e)&&"accordion-list-item"===e.type});xr.withoutNormalizing(t,()=>{var n;for(const[o,i]of r){const r=o,a=r.id,s=e.includes(a);(null===(n=r.props)||void 0===n?void 0:n.isExpanded)!==s&&Yr.setNodes(t,{props:Object.assign(Object.assign({},r.props),{isExpanded:s})},{at:i})}})},className:"w-full rounded-md border"},{children:n}))}},"accordion-list-item":{render:t=>{var r;const{attributes:n,children:o,element:i}=t;return e(pt,Object.assign({value:i.id,"data-state":(null===(r=i.props)||void 0===r?void 0:r.isExpanded)?"open":"closed"},n,{children:o}))}},"accordion-list-item-heading":{render:t=>{var n,o;const{attributes:i,children:a,element:d,blockId:u}=t,p=x(),[,f]=s(e=>e+1,0),h=l(()=>{const e=k.getBlockSlate(p,{id:u});if(e)try{const t=O.getElementPath(p,{blockId:u,element:d});return xr.parent(e,t)[0]}catch(e){}},[p,u,d]),g=l(()=>{if(!h)return;if(k.getBlockSlate(p,{id:u}))try{return O.getElementPath(p,{blockId:u,element:h})}catch(e){}},[p,u,h]),m=null!==(o=null===(n=null==h?void 0:h.props)||void 0===n?void 0:n.isExpanded)&&void 0!==o&&o,v=c(()=>{h&&g&&O.updateElement(p,{blockId:u,type:h.type,props:Object.assign(Object.assign({},h.props),{isExpanded:!m}),path:g}),f()},[p,u,h,g,m]),b=c(e=>{if(e.preventDefault(),e.stopPropagation(),!h||!g)return;const t=O.getElementChildren(p,{blockId:u,type:"accordion-list"});1!==(null==t?void 0:t.length)?O.deleteElement(p,{blockId:u,type:"accordion-list-item",path:g}):k.deleteBlock(p,{blockId:u})},[p,u,h,g]),w=c(e=>{e.preventDefault(),e.stopPropagation();const t=k.getBlockSlate(p,{id:u});if(!t||!g)return;const r=p.y("accordion-list-item",{props:{isExpanded:!1},children:[p.y("accordion-list-item-heading"),p.y("accordion-list-item-content")]});xr.withoutNormalizing(t,()=>{const e=Qt.next(g);Yr.insertNodes(t,r,{at:e});const n=[...e,0,0];setTimeout(()=>{Yr.select(t,{offset:0,path:n})},0)})},[p,u,g]);return r("div",Object.assign({},i,{className:"flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all px-5"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:a})),r("div",Object.assign({className:"flex shrink-0 items-center gap-1",contentEditable:!1},{children:[e("button",Object.assign({type:"button",contentEditable:!1,onClick:w,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Add accordion item"},{children:e(Vt,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),e("button",Object.assign({type:"button",contentEditable:!1,onClick:b,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Delete accordion item"},{children:e(Kt,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),e(ft,Object.assign({type:"button",contentEditable:!1,"data-slot":"accordion-trigger",onClick:v,className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:e(Et,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200 "+(m?"rotate-180":"")})}))]}))]}))}},"accordion-list-item-content":{render:t=>{const{attributes:r,children:n}=t;return e(ht,Object.assign({},r,{className:"text-muted-foreground px-5"},{children:n}))}}},Gr={blockquote:{render:t=>{const{attributes:r,children:n}=t;return e("blockquote",Object.assign({},r,{className:"mt-6 border-l-2 pl-6"},{children:n}))}}};function Zr(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Zr(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Jr(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Zr(e))&&(n&&(n+=" "),n+=t);return n}const Qr=e=>{const t=nn(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),en(r,t)||rn(e)},getConflictingClassGroupIds:(e,t)=>{const o=r[e]||[];return t&&n[e]?[...o,...n[e]]:o}}},en=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?en(e.slice(1),n):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},tn=/^\[(.+)\]$/,rn=e=>{if(tn.test(e)){const t=tn.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},nn=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return ln(Object.entries(e.classGroups),r).forEach(([e,r])=>{on(r,n,e,t)}),n},on=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:an(t,e)).classGroupId=r)}if("function"==typeof e)return sn(e)?void on(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,o])=>{on(o,an(t,e),r,n)})})},an=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},sn=e=>e.isThemeGetter,ln=(e,t)=>t?e.map(([e,r])=>[e,r.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,r])=>[t+e,r])):e)]):e,cn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(o(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):o(e,t)}}},dn=e=>{const{separator:t,experimentalParseClassName:r}=e,n=1===t.length,o=t[0],i=t.length,a=e=>{const r=[];let a,s=0,l=0;for(let c=0;c<e.length;c++){let d=e[c];if(0===s){if(d===o&&(n||e.slice(c,c+i)===t)){r.push(e.slice(l,c)),l=c+i;continue}if("/"===d){a=c;continue}}"["===d?s++:"]"===d&&s--}const c=0===r.length?e:e.substring(l),d=c.startsWith("!");return{modifiers:r,hasImportantModifier:d,baseClassName:d?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return r?e=>r({className:e,parseClassName:a}):a},un=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(e=>{"["===e[0]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t},pn=/\s+/;function fn(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=hn(e))&&(n&&(n+=" "),n+=t);return n}const hn=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=hn(e[n]))&&(r&&(r+=" "),r+=t);return r};function gn(e,...t){let r,n,o,i=function(s){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:cn(e.cacheSize),parseClassName:dn(e),...Qr(e)}))(l),n=r.cache.get,o=r.cache.set,i=a,a(s)};function a(e){const t=n(e);if(t)return t;const i=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(pn);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=r(t);let p=Boolean(u),f=n(p?d.substring(0,u):d);if(!f){if(!p){s=t+(s.length>0?" "+s:s);continue}if(f=n(d),!f){s=t+(s.length>0?" "+s:s);continue}p=!1}const h=un(l).join(":"),g=c?h+"!":h,m=g+f;if(i.includes(m))continue;i.push(m);const v=o(f,p);for(let e=0;e<v.length;++e){const t=v[e];i.push(g+t)}s=t+(s.length>0?" "+s:s)}return s})(e,r);return o(e,i),i}return function(){return i(fn.apply(null,arguments))}}const mn=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},vn=/^\[(?:([a-z-]+):)?(.+)\]$/i,bn=/^\d+\/\d+$/,wn=new Set(["px","full","screen"]),yn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,On=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Cn=e=>En(e)||wn.has(e)||bn.test(e),Sn=e=>Hn(e,"length",Bn),En=e=>Boolean(e)&&!Number.isNaN(Number(e)),Rn=e=>Hn(e,"number",En),Pn=e=>Boolean(e)&&Number.isInteger(Number(e)),jn=e=>e.endsWith("%")&&En(e.slice(0,-1)),Dn=e=>vn.test(e),zn=e=>yn.test(e),Mn=new Set(["length","size","percentage"]),Tn=e=>Hn(e,Mn,Wn),_n=e=>Hn(e,"position",Wn),An=new Set(["image","url"]),In=e=>Hn(e,An,Vn),Ln=e=>Hn(e,"",Un),Fn=()=>!0,Hn=(e,t,r)=>{const n=vn.exec(e);return!!n&&(n[1]?"string"==typeof t?n[1]===t:t.has(n[1]):r(n[2]))},Bn=e=>xn.test(e)&&!kn.test(e),Wn=()=>!1,Un=e=>On.test(e),Vn=e=>Nn.test(e),$n=gn(()=>{const e=mn("colors"),t=mn("spacing"),r=mn("blur"),n=mn("brightness"),o=mn("borderColor"),i=mn("borderRadius"),a=mn("borderSpacing"),s=mn("borderWidth"),l=mn("contrast"),c=mn("grayscale"),d=mn("hueRotate"),u=mn("invert"),p=mn("gap"),f=mn("gradientColorStops"),h=mn("gradientColorStopPositions"),g=mn("inset"),m=mn("margin"),v=mn("opacity"),b=mn("padding"),w=mn("saturate"),y=mn("scale"),x=mn("sepia"),k=mn("skew"),O=mn("space"),N=mn("translate"),C=()=>["auto",Dn,t],S=()=>[Dn,t],E=()=>["",Cn,Sn],R=()=>["auto",En,Dn],P=()=>["","0",Dn],j=()=>[En,Dn];return{cacheSize:500,separator:":",theme:{colors:[Fn],spacing:[Cn,Sn],blur:["none","",zn,Dn],brightness:j(),borderColor:[e],borderRadius:["none","","full",zn,Dn],borderSpacing:S(),borderWidth:E(),contrast:j(),grayscale:P(),hueRotate:j(),invert:P(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[jn,Sn],inset:C(),margin:C(),opacity:j(),padding:S(),saturate:j(),scale:j(),sepia:P(),skew:j(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",Dn]}],container:["container"],columns:[{columns:[zn]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Dn]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Pn,Dn]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Dn]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Pn,Dn]}],"grid-cols":[{"grid-cols":[Fn]}],"col-start-end":[{col:["auto",{span:["full",Pn,Dn]},Dn]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Fn]}],"row-start-end":[{row:["auto",{span:[Pn,Dn]},Dn]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Dn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Dn]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Dn,t]}],"min-w":[{"min-w":[Dn,t,"min","max","fit"]}],"max-w":[{"max-w":[Dn,t,"none","full","min","max","fit","prose",{screen:[zn]},zn]}],h:[{h:[Dn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Dn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Dn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Dn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",zn,Sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Rn]}],"font-family":[{font:[Fn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Dn]}],"line-clamp":[{"line-clamp":["none",En,Rn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Cn,Dn]}],"list-image":[{"list-image":["none",Dn]}],"list-style-type":[{list:["none","disc","decimal",Dn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Cn,Sn]}],"underline-offset":[{"underline-offset":["auto",Cn,Dn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Dn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Dn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",_n]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Tn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},In]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Cn,Dn]}],"outline-w":[{outline:[Cn,Sn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Cn,Sn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zn,Ln]}],"shadow-color":[{shadow:[Fn]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",zn,Dn]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Dn]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",Dn]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",Dn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[Pn,Dn]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Dn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Dn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Dn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Cn,Sn,Rn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function Xn(...e){return $n(Jr(e))}const qn=(e="default")=>({default:"bg-muted text-muted-foreground",info:"bg-blue-50 text-blue-900 border-blue-200 dark:bg-blue-950 dark:text-blue-100 dark:border-blue-800",success:"bg-green-50 text-green-900 border-green-200 dark:bg-green-950 dark:text-green-100 dark:border-green-800",warning:"bg-yellow-50 text-yellow-900 border-yellow-200 dark:bg-yellow-950 dark:text-yellow-100 dark:border-yellow-800",error:"bg-red-50 text-red-900 border-red-200 dark:bg-red-950 dark:text-red-100 dark:border-red-800"}[e]),Yn={callout:{render:t=>{var r,n;const{attributes:o,children:i,element:a}=t,s=null!==(n=null===(r=a.props)||void 0===r?void 0:r.theme)&&void 0!==n?n:"default";return e("div",Object.assign({},o,{className:Xn("relative rounded-lg border-l-4 p-4 [&>p]:m-0 [&>p]:text-sm",qn(s))},{children:i}))}}};function Kn(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function Gn(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&r.every(r=>{const n=e[r],o=t[r];return"function"==typeof n?`${n}`==`${o}`:Kn(n)&&Kn(o)?Gn(n,o):n===o})}function Zn(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function Jn(e){return"number"==typeof e}function Qn(e){return"string"==typeof e}function eo(e){return"boolean"==typeof e}function to(e){return"[object Object]"===Object.prototype.toString.call(e)}function ro(e){return Math.abs(e)}function no(e){return Math.sign(e)}function oo(e,t){return ro(e-t)}function io(e){return uo(e).map(Number)}function ao(e){return e[so(e)]}function so(e){return Math.max(0,e.length-1)}function lo(e,t){return t===so(e)}function co(e,t=0){return Array.from(Array(e),(e,r)=>t+r)}function uo(e){return Object.keys(e)}function po(e,t){return[e,t].reduce((e,t)=>(uo(t).forEach(r=>{const n=e[r],o=t[r],i=to(n)&&to(o);e[r]=i?po(n,o):o}),e),{})}function fo(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function ho(){let e=[];const t={add:function(r,n,o,i={passive:!0}){let a;if("addEventListener"in r)r.addEventListener(n,o,i),a=()=>r.removeEventListener(n,o,i);else{const e=r;e.addListener(o),a=()=>e.removeListener(o)}return e.push(a),t},clear:function(){e=e.filter(e=>e())}};return t}function go(e,t,r,n){const o=ho(),i=1e3/60;let a=null,s=0,l=0;function c(e){if(!l)return;a||(a=e,r(),r());const o=e-a;for(a=e,s+=o;s>=i;)r(),s-=i;n(s/i),l&&(l=t.requestAnimationFrame(c))}function d(){t.cancelAnimationFrame(l),a=null,s=0,l=0}return{init:function(){o.add(e,"visibilitychange",()=>{e.hidden&&(a=null,s=0)})},destroy:function(){d(),o.clear()},start:function(){l||(l=t.requestAnimationFrame(c))},stop:d,update:r,render:n}}function mo(e=0,t=0){const r=ro(e-t);function n(t){return t<e}function o(e){return e>t}function i(e){return n(e)||o(e)}return{length:r,max:t,min:e,constrain:function(r){return i(r)?n(r)?e:t:r},reachedAny:i,reachedMax:o,reachedMin:n,removeOffset:function(e){return r?e-r*Math.ceil((e-t)/r):e}}}function vo(e,t,r){const{constrain:n}=mo(0,e),o=e+1;let i=a(t);function a(e){return r?ro((o+e)%o):n(e)}function s(){return i}function l(){return vo(e,s(),r)}const c={get:s,set:function(e){return i=a(e),c},add:function(e){return l().set(s()+e)},clone:l};return c}function bo(e,t,r,n,o,i,a,s,l,c,d,u,p,f,h,g,m,v,b){const{cross:w,direction:y}=e,x=["INPUT","SELECT","TEXTAREA"],k={passive:!1},O=ho(),N=ho(),C=mo(50,225).constrain(f.measure(20)),S={mouse:300,touch:400},E={mouse:500,touch:600},R=h?43:25;let P=!1,j=0,D=0,z=!1,M=!1,T=!1,_=!1;function A(e){if(!fo(e,n)&&e.touches.length>=2)return I(e);const t=i.readPoint(e),r=i.readPoint(e,w),a=oo(t,j),l=oo(r,D);if(!M&&!_){if(!e.cancelable)return I(e);if(M=a>l,!M)return I(e)}const d=i.pointerMove(e);a>g&&(T=!0),c.useFriction(.3).useDuration(.75),s.start(),o.add(y(d)),e.preventDefault()}function I(e){const t=d.byDistance(0,!1).index!==u.get(),r=i.pointerUp(e)*(h?E:S)[_?"mouse":"touch"],n=function(e,t){const r=u.add(-1*no(e)),n=d.byDistance(e,!h).distance;return h||ro(e)<C?n:m&&t?.5*n:d.byIndex(r.get(),0).distance}(y(r),t),o=function(e,t){if(0===e||0===t)return 0;if(ro(e)<=ro(t))return 0;const r=oo(ro(e),ro(t));return ro(r/e)}(r,n),a=R-10*o,s=v+o/50;M=!1,z=!1,N.clear(),c.useDuration(a).useFriction(s),l.distance(n,!h),_=!1,p.emit("pointerUp")}function L(e){T&&(e.stopPropagation(),e.preventDefault(),T=!1)}return{init:function(e){if(!b)return;function s(s){(eo(b)||b(e,s))&&function(e){const s=fo(e,n);if(_=s,T=h&&s&&!e.buttons&&P,P=oo(o.get(),a.get())>=2,s&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return x.includes(t)}(e.target))return;z=!0,i.pointerDown(e),c.useFriction(0).useDuration(0),o.set(a),function(){const e=_?r:t;N.add(e,"touchmove",A,k).add(e,"touchend",I).add(e,"mousemove",A,k).add(e,"mouseup",I)}(),j=i.readPoint(e),D=i.readPoint(e,w),p.emit("pointerDown")}(s)}const l=t;O.add(l,"dragstart",e=>e.preventDefault(),k).add(l,"touchmove",()=>{},k).add(l,"touchend",()=>{}).add(l,"touchstart",s).add(l,"mousedown",s).add(l,"touchcancel",I).add(l,"contextmenu",I).add(l,"click",L,!0)},destroy:function(){O.clear(),N.clear()},pointerDown:function(){return z}}}function wo(e,t){let r,n;function o(e){return e.timeStamp}function i(r,n){const o="client"+("x"===(n||e.scroll)?"X":"Y");return(fo(r,t)?r:r.touches[0])[o]}return{pointerDown:function(e){return r=e,n=e,i(e)},pointerMove:function(e){const t=i(e)-i(n),a=o(e)-o(r)>170;return n=e,a&&(r=e),t},pointerUp:function(e){if(!r||!n)return 0;const t=i(n)-i(r),a=o(e)-o(r),s=o(e)-o(n)>170,l=t/a;return a&&!s&&ro(l)>.1?l:0},readPoint:i}}function yo(e,t,r,n,o,i,a){const s=[e].concat(n);let l,c,d=[],u=!1;function p(e){return o.measureSize(a.measure(e))}return{init:function(o){i&&(c=p(e),d=n.map(p),l=new ResizeObserver(r=>{(eo(i)||i(o,r))&&function(r){for(const i of r){if(u)return;const r=i.target===e,a=n.indexOf(i.target),s=r?c:d[a];if(ro(p(r?e:n[a])-s)>=.5){o.reInit(),t.emit("resize");break}}}(r)}),r.requestAnimationFrame(()=>{s.forEach(e=>l.observe(e))}))},destroy:function(){u=!0,l&&l.disconnect()}}}function xo(e,t,r,n,o){const i=o.measure(10),a=o.measure(50),s=mo(.1,.99);let l=!1;function c(){return!l&&(!!e.reachedAny(r.get())&&!!e.reachedAny(t.get()))}return{shouldConstrain:c,constrain:function(o){if(!c())return;const l=e.reachedMin(t.get())?"min":"max",d=ro(e[l]-t.get()),u=r.get()-t.get(),p=s.constrain(d/a);r.subtract(u*p),!o&&ro(u)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}function ko(e,t,r,n){const o=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:s}=mo(o,i);return{loop:function(t){if(!function(e){return 1===e?s(r.get()):-1===e&&a(r.get())}(t))return;const o=e*(-1*t);n.forEach(e=>e.add(o))}}}function Oo(e,t,r,n,o){const{reachedAny:i,removeOffset:a,constrain:s}=n;function l(e){return e.concat().sort((e,t)=>ro(e)-ro(t))[0]}function c(t,n){const o=[t,t+r,t-r];if(!e)return t;if(!n)return l(o);const i=o.filter(e=>no(e)===n);return i.length?l(i):ao(o)-r}const d={byDistance:function(r,n){const l=o.get()+r,{index:d,distance:u}=function(r){const n=e?a(r):s(r),o=t.map((e,t)=>({diff:c(e-n,0),index:t})).sort((e,t)=>ro(e.diff)-ro(t.diff)),{index:i}=o[0];return{index:i,distance:n}}(l),p=!e&&i(l);return!n||p?{index:d,distance:r}:{index:d,distance:r+c(t[d]-u,0)}},byIndex:function(e,r){return{index:e,distance:c(t[e]-o.get(),r)}},shortcut:c};return d}function No(e,t,r,n,o,i,a,s){const l={passive:!0,capture:!0};let c=0;function d(e){"Tab"===e.code&&(c=(new Date).getTime())}const u={init:function(u){s&&(i.add(document,"keydown",d,!1),t.forEach((t,d)=>{i.add(t,"focus",t=>{(eo(s)||s(u,t))&&function(t){if((new Date).getTime()-c>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const i=r.findIndex(e=>e.includes(t));Jn(i)&&(o.useDuration(0),n.index(i,0),a.emit("slideFocus"))}(d)},l)}))}};return u}function Co(e){let t=e;function r(e){return Jn(e)?e:e.get()}return{get:function(){return t},set:function(e){t=r(e)},add:function(e){t+=r(e)},subtract:function(e){t-=r(e)}}}function So(e,t){const r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},n=t.style;let o=null,i=!1;return{clear:function(){i||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const a=(s=e.direction(t),Math.round(100*s)/100);var s;a!==o&&(n.transform=r(a),o=a)},toggleActive:function(e){i=!e}}}function Eo(e,t,r,n,o,i,a,s,l){const c=io(o),d=io(o).reverse(),u=function(){const e=a[0];return h(f(d,e),r,!1)}().concat(function(){const e=t-a[0]-1;return h(f(c,e),-r,!0)}());function p(e,t){return e.reduce((e,t)=>e-o[t],t)}function f(e,t){return e.reduce((e,r)=>p(e,t)>0?e.concat([r]):e,[])}function h(o,a,c){const d=function(e){return i.map((r,o)=>({start:r-n[o]+.5+e,end:r+t-.5+e}))}(a);return o.map(t=>{const n=c?0:-r,o=c?r:0,i=c?"end":"start",a=d[t][i];return{index:t,loopPoint:a,slideLocation:Co(-1),translate:So(e,l[t]),target:()=>s.get()>a?n:o}})}const g={canLoop:function(){return u.every(({index:e})=>p(c.filter(t=>t!==e),t)<=.1)},clear:function(){u.forEach(e=>e.translate.clear())},loop:function(){u.forEach(e=>{const{target:t,translate:r,slideLocation:n}=e,o=t();o!==n.get()&&(r.to(o),n.set(o))})},loopPoints:u};return g}function Ro(e,t,r){let n,o=!1;return{init:function(i){r&&(n=new MutationObserver(e=>{o||(eo(r)||r(i,e))&&function(e){for(const r of e)if("childList"===r.type){i.reInit(),t.emit("slidesChanged");break}}(e)}),n.observe(e,{childList:!0}))},destroy:function(){n&&n.disconnect(),o=!0}}}function Po(e,t,r,n){const o={};let i,a=null,s=null,l=!1;const c={init:function(){i=new IntersectionObserver(e=>{l||(e.forEach(e=>{const r=t.indexOf(e.target);o[r]=e}),a=null,s=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(e=>i.observe(e))},destroy:function(){i&&i.disconnect(),l=!0},get:function(e=!0){if(e&&a)return a;if(!e&&s)return s;const t=function(e){return uo(o).reduce((t,r)=>{const n=parseInt(r),{isIntersecting:i}=o[n];return(e&&i||!e&&!i)&&t.push(n),t},[])}(e);return e&&(a=t),e||(s=t),t}};return c}function jo(e,t,r,n,o,i,a,s,l){const{startEdge:c,endEdge:d,direction:u}=e,p=Jn(r);const f={groupSlides:function(e){return p?function(e,t){return io(e).filter(e=>e%t===0).map(r=>e.slice(r,r+t))}(e,r):function(e){return e.length?io(e).reduce((r,p,f)=>{const h=ao(r)||0,g=0===h,m=p===so(e),v=o[c]-i[h][c],b=o[c]-i[p][d],w=!n&&g?u(a):0,y=ro(b-(!n&&m?u(s):0)-(v+w));return f&&y>t+l&&r.push(p),m&&r.push(e.length),r},[]).map((t,r,n)=>{const o=Math.max(n[r-1]||0);return e.slice(o,t)}):[]}(e)}};return f}function Do(e,t,r,n,o,i,a){const{align:s,axis:l,direction:c,startIndex:d,loop:u,duration:p,dragFree:f,dragThreshold:h,inViewThreshold:g,slidesToScroll:m,skipSnaps:v,containScroll:b,watchResize:w,watchSlides:y,watchDrag:x,watchFocus:k}=i,O={measure:function(e){const{offsetTop:t,offsetLeft:r,offsetWidth:n,offsetHeight:o}=e;return{top:t,right:r+n,bottom:t+o,left:r,width:n,height:o}}},N=O.measure(t),C=r.map(O.measure),S=function(e,t){const r="rtl"===t,n="y"===e,o=!n&&r?-1:1;return{scroll:n?"y":"x",cross:n?"x":"y",startEdge:n?"top":r?"right":"left",endEdge:n?"bottom":r?"left":"right",measureSize:function(e){const{height:t,width:r}=e;return n?t:r},direction:function(e){return e*o}}}(l,c),E=S.measureSize(N),R=function(e){return{measure:function(t){return e*(t/100)}}}(E),P=function(e,t){const r={start:function(){return 0},center:function(e){return n(e)/2},end:n};function n(e){return t-e}const o={measure:function(n,o){return Qn(e)?r[e](n):e(t,n,o)}};return o}(s,E),j=!u&&!!b,D=u||!!b,{slideSizes:z,slideSizesWithGaps:M,startGap:T,endGap:_}=function(e,t,r,n,o,i){const{measureSize:a,startEdge:s,endEdge:l}=e,c=r[0]&&o,d=function(){if(!c)return 0;const e=r[0];return ro(t[s]-e[s])}(),u=function(){if(!c)return 0;const e=i.getComputedStyle(ao(n));return parseFloat(e.getPropertyValue(`margin-${l}`))}(),p=r.map(a),f=r.map((e,t,r)=>{const n=!t,o=lo(r,t);return n?p[t]+d:o?p[t]+u:r[t+1][s]-e[s]}).map(ro);return{slideSizes:p,slideSizesWithGaps:f,startGap:d,endGap:u}}(S,N,C,r,D,o),A=jo(S,E,m,u,N,C,T,_,2),{snaps:I,snapsAligned:L}=function(e,t,r,n,o){const{startEdge:i,endEdge:a}=e,{groupSlides:s}=o,l=s(n).map(e=>ao(e)[a]-e[0][i]).map(ro).map(t.measure),c=n.map(e=>r[i]-e[i]).map(e=>-ro(e)),d=s(c).map(e=>e[0]).map((e,t)=>e+l[t]);return{snaps:c,snapsAligned:d}}(S,P,N,C,A),F=-ao(I)+ao(M),{snapsContained:H,scrollContainLimit:B}=function(e,t,r,n,o){const i=mo(-t+e,0),a=r.map((e,t)=>{const{min:n,max:o}=i,a=i.constrain(e),s=!t,l=lo(r,t);return s?o:l||c(n,a)?n:c(o,a)?o:a}).map(e=>parseFloat(e.toFixed(3))),s=function(){const e=a[0],t=ao(a);return mo(a.lastIndexOf(e),a.indexOf(t)+1)}(),l=function(){if(t<=e+o)return[i.max];if("keepSnaps"===n)return a;const{min:r,max:l}=s;return a.slice(r,l)}();function c(e,t){return oo(e,t)<=1}return{snapsContained:l,scrollContainLimit:s}}(E,F,L,b,2),W=j?H:L,{limit:U}=function(e,t,r){const n=t[0];return{limit:mo(r?n-e:ao(t),n)}}(F,W,u),V=vo(so(W),d,u),$=V.clone(),X=io(r),q=go(n,o,()=>(({dragHandler:e,scrollBody:t,scrollBounds:r,options:{loop:n}})=>{n||r.constrain(e.pointerDown()),t.seek()})(se),e=>(({scrollBody:e,translate:t,location:r,offsetLocation:n,previousLocation:o,scrollLooper:i,slideLooper:a,dragHandler:s,animation:l,eventHandler:c,scrollBounds:d,options:{loop:u}},p)=>{const f=e.settled(),h=!d.shouldConstrain(),g=u?f:f&&h,m=g&&!s.pointerDown();m&&l.stop();const v=r.get()*p+o.get()*(1-p);n.set(v),u&&(i.loop(e.direction()),a.loop()),t.to(n.get()),m&&c.emit("settle"),g||c.emit("scroll")})(se,e)),Y=W[V.get()],K=Co(Y),G=Co(Y),Z=Co(Y),J=Co(Y),Q=function(e,t,r,n,o,i){let a=0,s=0,l=o,c=i,d=e.get(),u=0;function p(e){return l=e,h}function f(e){return c=e,h}const h={direction:function(){return s},duration:function(){return l},velocity:function(){return a},seek:function(){const t=n.get()-e.get();let o=0;return l?(r.set(e),a+=t/l,a*=c,d+=a,e.add(a),o=d-u):(a=0,r.set(n),e.set(n),o=t),s=no(o),u=d,h},settled:function(){return ro(n.get()-t.get())<.001},useBaseFriction:function(){return f(i)},useBaseDuration:function(){return p(o)},useFriction:f,useDuration:p};return h}(K,Z,G,J,p,.68),ee=Oo(u,W,F,U,J),te=function(e,t,r,n,o,i,a){function s(o){const s=o.distance,l=o.index!==t.get();i.add(s),s&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(r.set(t.get()),t.set(o.index),a.emit("select"))}const l={distance:function(e,t){s(o.byDistance(e,t))},index:function(e,r){const n=t.clone().set(e);s(o.byIndex(n.get(),r))}};return l}(q,V,$,Q,ee,J,a),re=function(e){const{max:t,length:r}=e;return{get:function(e){return r?(e-t)/-r:0}}}(U),ne=ho(),oe=Po(t,r,a,g),{slideRegistry:ie}=function(e,t,r,n,o,i){const{groupSlides:a}=o,{min:s,max:l}=n,c=function(){const n=a(i),o=!e||"keepSnaps"===t;return 1===r.length?[i]:o?n:n.slice(s,l).map((e,t,r)=>{const n=!t,o=lo(r,t);return n?co(ao(r[0])+1):o?co(so(i)-ao(r)[0]+1,ao(r)[0]):e})}();return{slideRegistry:c}}(j,b,W,B,A,X),ae=No(e,r,ie,te,Q,ne,a,k),se={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:N,slideRects:C,animation:q,axis:S,dragHandler:bo(S,e,n,o,J,wo(S,o),K,q,te,Q,ee,V,a,R,f,h,v,.68,x),eventStore:ne,percentOfView:R,index:V,indexPrevious:$,limit:U,location:K,offsetLocation:Z,previousLocation:G,options:i,resizeHandler:yo(t,a,o,r,S,w,O),scrollBody:Q,scrollBounds:xo(U,Z,J,Q,R),scrollLooper:ko(F,U,Z,[K,Z,G,J]),scrollProgress:re,scrollSnapList:W.map(re.get),scrollSnaps:W,scrollTarget:ee,scrollTo:te,slideLooper:Eo(S,E,F,z,M,I,W,Z,r),slideFocus:ae,slidesHandler:Ro(t,a,y),slidesInView:oe,slideIndexes:X,slideRegistry:ie,slidesToScroll:A,target:J,translate:So(S,t)};return se}const zo={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Mo(e){function t(e,t){return po(e,t||{})}const r={mergeOptions:t,optionsAtMedia:function(r){const n=r.breakpoints||{},o=uo(n).filter(t=>e.matchMedia(t).matches).map(e=>n[e]).reduce((e,r)=>t(e,r),{});return t(r,o)},optionsMediaQueries:function(t){return t.map(e=>uo(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}};return r}function To(e,t,r){const n=e.ownerDocument,o=n.defaultView,i=Mo(o),a=function(e){let t=[];const r={init:function(r,n){return t=n.filter(({options:t})=>!1!==e.optionsAtMedia(t).active),t.forEach(t=>t.init(r,e)),n.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){t=t.filter(e=>e.destroy())}};return r}(i),s=ho(),l=function(){let e,t={};function r(e){return t[e]||[]}const n={init:function(t){e=t},emit:function(t){return r(t).forEach(r=>r(e,t)),n},off:function(e,o){return t[e]=r(e).filter(e=>e!==o),n},on:function(e,o){return t[e]=r(e).concat([o]),n},clear:function(){t={}}};return n}(),{mergeOptions:c,optionsAtMedia:d,optionsMediaQueries:u}=i,{on:p,off:f,emit:h}=l,g=S;let m,v,b,w,y=!1,x=c(zo,To.globalOptions),k=c(x),O=[];function N(t){const r=Do(e,b,w,n,o,t,l);if(t.loop&&!r.slideLooper.canLoop()){return N(Object.assign({},t,{loop:!1}))}return r}function C(t,r){y||(x=c(x,t),k=d(x),O=r||O,function(){const{container:t,slides:r}=k,n=Qn(t)?e.querySelector(t):t;b=n||e.children[0];const o=Qn(r)?b.querySelectorAll(r):r;w=[].slice.call(o||b.children)}(),m=N(k),u([x,...O.map(({options:e})=>e)]).forEach(e=>s.add(e,"change",S)),k.active&&(m.translate.to(m.location.get()),m.animation.init(),m.slidesInView.init(),m.slideFocus.init(j),m.eventHandler.init(j),m.resizeHandler.init(j),m.slidesHandler.init(j),m.options.loop&&m.slideLooper.loop(),b.offsetParent&&w.length&&m.dragHandler.init(j),v=a.init(j,O)))}function S(e,t){const r=P();E(),C(c({startIndex:r},e),t),l.emit("reInit")}function E(){m.dragHandler.destroy(),m.eventStore.clear(),m.translate.clear(),m.slideLooper.clear(),m.resizeHandler.destroy(),m.slidesHandler.destroy(),m.slidesInView.destroy(),m.animation.destroy(),a.destroy(),s.clear()}function R(e,t,r){k.active&&!y&&(m.scrollBody.useBaseFriction().useDuration(!0===t?0:k.duration),m.scrollTo.index(e,r||0))}function P(){return m.index.get()}const j={canScrollNext:function(){return m.index.add(1).get()!==P()},canScrollPrev:function(){return m.index.add(-1).get()!==P()},containerNode:function(){return b},internalEngine:function(){return m},destroy:function(){y||(y=!0,s.clear(),E(),l.emit("destroy"),l.clear())},off:f,on:p,emit:h,plugins:function(){return v},previousScrollSnap:function(){return m.indexPrevious.get()},reInit:g,rootNode:function(){return e},scrollNext:function(e){R(m.index.add(1).get(),e,-1)},scrollPrev:function(e){R(m.index.add(-1).get(),e,1)},scrollProgress:function(){return m.scrollProgress.get(m.offsetLocation.get())},scrollSnapList:function(){return m.scrollSnapList},scrollTo:R,selectedScrollSnap:P,slideNodes:function(){return w},slidesInView:function(){return m.slidesInView.get()},slidesNotInView:function(){return m.slidesInView.get(!1)}};return C(t,r),setTimeout(()=>l.emit("init"),0),j}function _o(e={},t=[]){const r=d(e),n=d(t),[o,i]=u(),[a,s]=u(),l=c(()=>{o&&o.reInit(r.current,n.current)},[o]);return p(()=>{Gn(r.current,e)||(r.current=e,l())},[e,l]),p(()=>{(function(e,t){if(e.length!==t.length)return!1;const r=Zn(e),n=Zn(t);return r.every((e,t)=>Gn(e,n[t]))})(n.current,t)||(n.current=t,l())},[t,l]),p(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&a){To.globalOptions=_o.globalOptions;const e=To(a,r.current,n.current);return i(e),()=>e.destroy()}i(void 0)},[a,i]),[s,o]}To.globalOptions=void 0,_o.globalOptions=void 0;const Ao=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Io=Jr,Lo=(e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return Io(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(e=>{const t=null==r?void 0:r[e],n=null==i?void 0:i[e];if(null===t)return null;const a=Ao(t)||Ao(n);return o[e][a]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),l=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...s}[t]):{...i,...s}[t]===r})?[...e,r,n]:e},[]);return Io(e,a,l,null==r?void 0:r.class,null==r?void 0:r.className)},Fo=Lo("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ho=n.forwardRef((t,r)=>{var{className:n,variant:o,size:i}=t,a=q(t,["className","variant","size"]);return e("button",Object.assign({className:Xn(Fo({variant:o,size:i,className:n})),ref:r},a))});Ho.displayName="Button";const Bo=f(null);function Wo(){const e=h(Bo);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const Uo=i((t,r)=>{var{orientation:n="horizontal",opts:o,setApi:i,plugins:a,className:s,children:d}=t,f=q(t,["orientation","opts","setApi","plugins","className","children"]);const[h,g]=_o(Object.assign(Object.assign({},o),{axis:"horizontal"===n?"x":"y"}),a),[m,v]=u(!1),[b,w]=u(!1),y=c(e=>{e&&(v(e.canScrollPrev()),w(e.canScrollNext()))},[]),x=c(()=>{null==g||g.scrollPrev()},[g]),k=c(()=>{null==g||g.scrollNext()},[g]),O=c(e=>{"ArrowLeft"===e.key?(e.preventDefault(),x()):"ArrowRight"===e.key&&(e.preventDefault(),k())},[x,k]);p(()=>{g&&i&&i(g)},[g,i]),p(()=>{if(g)return y(g),g.on("reInit",y),g.on("select",y),()=>{null==g||g.off("select",y)}},[g,y]);const N=l(()=>({carouselRef:h,api:g,opts:o,orientation:n||("y"===(null==o?void 0:o.axis)?"vertical":"horizontal"),scrollPrev:x,scrollNext:k,canScrollPrev:m,canScrollNext:b}),[h,g,o,n,x,k,m,b]);return e(Bo.Provider,Object.assign({value:N},{children:e("div",Object.assign({onKeyDownCapture:O,className:Xn("relative",s),role:"region","aria-roledescription":"carousel","data-slot":"carousel",ref:r},f,{children:d}))}))});Uo.displayName="Carousel";const Vo=i((t,r)=>{var{className:n}=t,o=q(t,["className"]);const{carouselRef:i,orientation:a}=Wo();return e("div",Object.assign({ref:i,className:"overflow-hidden","data-slot":"carousel-content"},{children:e("div",Object.assign({ref:r,className:Xn("flex","horizontal"===a?"-ml-4":"-mt-4 flex-col",n)},o))}))});Vo.displayName="CarouselContent";const $o=i((t,r)=>{var{className:n}=t,o=q(t,["className"]);const{orientation:i}=Wo();return e("div",Object.assign({ref:r,role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:Xn("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",n)},o))});$o.displayName="CarouselItem";const Xo=t=>{var{className:n,variant:o="outline",size:i="icon"}=t,a=q(t,["className","variant","size"]);const{orientation:s,scrollPrev:l,canScrollPrev:c}=Wo();return r(Ho,Object.assign({"data-slot":"carousel-previous",variant:o,size:i,className:Xn("absolute size-8 rounded-full","horizontal"===s?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",n),disabled:!c,onClick:l},a,{children:[e(Ot,{}),e("span",Object.assign({className:"sr-only"},{children:"Previous slide"}))]}))},qo=t=>{var{className:n,variant:o="outline",size:i="icon"}=t,a=q(t,["className","variant","size"]);const{orientation:s,scrollNext:l,canScrollNext:c}=Wo();return r(Ho,Object.assign({"data-slot":"carousel-next",variant:o,size:i,className:Xn("absolute size-8 rounded-full","horizontal"===s?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",n),disabled:!c,onClick:l},a,{children:[e(Nt,{}),e("span",Object.assign({className:"sr-only"},{children:"Next slide"}))]}))},Yo=n.forwardRef((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("div",Object.assign({ref:r,className:Xn("rounded-xl border bg-card text-card-foreground shadow",n)},o))});Yo.displayName="Card";n.forwardRef((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("div",Object.assign({ref:r,className:Xn("flex flex-col space-y-1.5 p-6",n)},o))}).displayName="CardHeader";n.forwardRef((t,r)=>{var{className:n,children:o}=t,i=q(t,["className","children"]);return e("h3",Object.assign({ref:r,className:Xn("font-semibold leading-none tracking-tight",n)},i,{children:o}))}).displayName="CardTitle";n.forwardRef((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("p",Object.assign({ref:r,className:Xn("text-sm text-muted-foreground",n)},o))}).displayName="CardDescription";const Ko=n.forwardRef((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("div",Object.assign({ref:r,className:Xn("p-6 pt-0",n)},o))});Ko.displayName="CardContent";n.forwardRef((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("div",Object.assign({ref:r,className:Xn("flex items-center p-6 pt-0",n)},o))}).displayName="CardFooter";const Go={"carousel-container":{render:t=>{const{attributes:n,children:o}=t,[i,a]=u(),[s,l]=u(0),[c,d]=u(0);return p(()=>{i&&(d(i.scrollSnapList().length),l(i.selectedScrollSnap()+1),i.on("select",()=>{l(i.selectedScrollSnap()+1)}))},[i]),e("div",Object.assign({className:"flex w-full justify-center data-[align=center]:items-center data-[align=end]:items-end data-[align=start]:items-start"},{children:r("div",Object.assign({className:"mx-auto\n "},{children:[r(Uo,Object.assign({},n,{setApi:a,opts:{align:"start",axis:"x",loop:!0},orientation:"horizontal",className:"w-full max-w-lg"},{children:[e(Vo,{children:o}),e(Xo,{contentEditable:!1,className:"select-none"}),e(qo,{contentEditable:!1,className:"select-none"})]})),r("div",Object.assign({contentEditable:!1,className:"select-none text-muted-foreground py-2 text-center text-sm"},{children:["Slide ",s," of ",c]}))]}))}))}},"carousel-list-item":{render:t=>{const{children:r}=t;return e($o,Object.assign({className:"md:basis-1/2 lg:basis-1/3"},{children:e("div",Object.assign({className:"p-1"},{children:e(Yo,{children:e(Ko,Object.assign({className:"flex aspect-square items-center justify-center p-6"},{children:r}))})}))}))}}};function Zo(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var Jo=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||r.forEach(function(t){e.addRange(t)}),t&&t.focus()}},Qo={"text/plain":"Text","text/html":"Url",default:"Text"};var ei=function(e,t){var r,n,o,i,a,s,l=!1;t||(t={}),r=t.debug||!1;try{if(o=Jo(),i=document.createRange(),a=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),void 0===n.clipboardData){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=Qo[t.format]||Qo.default;window.clipboardData.setData(o,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(o){r&&console.error("unable to copy using execCommand: ",o),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(o){r&&console.error("unable to copy using clipboardData: ",o),r&&console.error("falling back to prompt"),n=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(n,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),s&&document.body.removeChild(s),o()}return l};const ti=n.forwardRef((t,r)=>{var{className:n,type:o}=t,i=q(t,["className","type"]);return e("input",Object.assign({type:o,className:Xn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:r},i))});function ri(e){const t=n.useRef(e);return n.useEffect(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}ti.displayName="Input";var ni,oi="dismissableLayer.update",ii="dismissableLayer.pointerDownOutside",ai="dismissableLayer.focusOutside",si=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),li=n.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=t,u=n.useContext(si),[p,f]=n.useState(null),h=p?.ownerDocument??globalThis?.document,[,g]=n.useState({}),m=Q(r,e=>f(e)),v=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),y=p?v.indexOf(p):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,k=y>=w,O=function(e,t=globalThis?.document){const r=ri(e),o=n.useRef(!1),i=n.useRef(()=>{});return n.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let n=function(){di(ii,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,r=[...u.branches].some(e=>e.contains(t));k&&!r&&(a?.(e),l?.(e),e.defaultPrevented||c?.())},h),N=function(e,t=globalThis?.document){const r=ri(e),o=n.useRef(!1);return n.useEffect(()=>{const e=e=>{if(e.target&&!o.current){di(ai,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||c?.())},h);return function(e,t=globalThis?.document){const r=ri(e);n.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{y===u.layers.size-1&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},h),n.useEffect(()=>{if(p)return o&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(ni=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),ci(),()=>{o&&1===u.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=ni)}},[p,h,o,u]),n.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),ci())},[p,u]),n.useEffect(()=>{const e=()=>g({});return document.addEventListener(oi,e),()=>document.removeEventListener(oi,e)},[]),e(ce.div,{...d,ref:m,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:ie(t.onFocusCapture,N.onFocusCapture),onBlurCapture:ie(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:ie(t.onPointerDownCapture,O.onPointerDownCapture)})});li.displayName="DismissableLayer";function ci(){const e=new CustomEvent(oi);document.dispatchEvent(e)}function di(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?de(o,i):o.dispatchEvent(i)}n.forwardRef((t,r)=>{const o=n.useContext(si),i=n.useRef(null),a=Q(r,i);return n.useEffect(()=>{const e=i.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),e(ce.div,{...t,ref:a})}).displayName="DismissableLayerBranch";var ui=0;function pi(){n.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??fi()),document.body.insertAdjacentElement("beforeend",e[1]??fi()),ui++,()=>{1===ui&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ui--}},[])}function fi(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var hi="focusScope.autoFocusOnMount",gi="focusScope.autoFocusOnUnmount",mi={bubbles:!1,cancelable:!0},vi=n.forwardRef((t,r)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=t,[c,d]=n.useState(null),u=ri(a),p=ri(s),f=n.useRef(null),h=Q(r,e=>d(e)),g=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect(()=>{if(i){let e=function(e){if(g.paused||!c)return;const t=e.target;c.contains(t)?f.current=t:xi(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||xi(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&xi(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return c&&n.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[i,c,g.paused]),n.useEffect(()=>{if(c){ki.add(g);const t=document.activeElement;if(!c.contains(t)){const r=new CustomEvent(hi,mi);c.addEventListener(hi,u),c.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(xi(n,{select:t}),document.activeElement!==r)return}((e=bi(c),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&xi(c))}return()=>{c.removeEventListener(hi,u),setTimeout(()=>{const e=new CustomEvent(gi,mi);c.addEventListener(gi,p),c.dispatchEvent(e),e.defaultPrevented||xi(t??document.body,{select:!0}),c.removeEventListener(gi,p),ki.remove(g)},0)}}var e},[c,u,p,g]);const m=n.useCallback(e=>{if(!o&&!i)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[n,i]=function(e){const t=bi(e),r=wi(t,e),n=wi(t.reverse(),e);return[r,n]}(t);n&&i?e.shiftKey||r!==i?e.shiftKey&&r===n&&(e.preventDefault(),o&&xi(i,{select:!0})):(e.preventDefault(),o&&xi(n,{select:!0})):r===t&&e.preventDefault()}},[o,i,g.paused]);return e(ce.div,{tabIndex:-1,...l,ref:h,onKeyDown:m})});function bi(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function wi(e,t){for(const r of e)if(!yi(r,{upTo:t}))return r}function yi(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function xi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}vi.displayName="FocusScope";var ki=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Oi(e,t),e.unshift(t)},remove(t){e=Oi(e,t),e[0]?.resume()}}}();function Oi(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}const Ni=["top","right","bottom","left"],Ci=Math.min,Si=Math.max,Ei=Math.round,Ri=Math.floor,Pi=e=>({x:e,y:e}),ji={left:"right",right:"left",bottom:"top",top:"bottom"},Di={start:"end",end:"start"};function zi(e,t,r){return Si(e,Ci(t,r))}function Mi(e,t){return"function"==typeof e?e(t):e}function Ti(e){return e.split("-")[0]}function _i(e){return e.split("-")[1]}function Ai(e){return"x"===e?"y":"x"}function Ii(e){return"y"===e?"height":"width"}const Li=new Set(["top","bottom"]);function Fi(e){return Li.has(Ti(e))?"y":"x"}function Hi(e){return Ai(Fi(e))}function Bi(e){return e.replace(/start|end/g,e=>Di[e])}const Wi=["left","right"],Ui=["right","left"],Vi=["top","bottom"],$i=["bottom","top"];function Xi(e,t,r,n){const o=_i(e);let i=function(e,t,r){switch(e){case"top":case"bottom":return r?t?Ui:Wi:t?Wi:Ui;case"left":case"right":return t?Vi:$i;default:return[]}}(Ti(e),"start"===r,n);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Bi)))),i}function qi(e){return e.replace(/left|right|bottom|top/g,e=>ji[e])}function Yi(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Ki(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Gi(e,t,r){let{reference:n,floating:o}=e;const i=Fi(t),a=Hi(t),s=Ii(a),l=Ti(t),c="y"===i,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,p=n[s]/2-o[s]/2;let f;switch(l){case"top":f={x:d,y:n.y-o.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-o.width,y:u};break;default:f={x:n.x,y:n.y}}switch(_i(t)){case"start":f[a]-=p*(r&&c?-1:1);break;case"end":f[a]+=p*(r&&c?-1:1)}return f}async function Zi(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=Mi(t,e),h=Yi(f),g=s[p?"floating"===u?"reference":"floating":u],m=Ki(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(g)))||r?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),v="floating"===u?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},y=Ki(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(m.top-y.top+h.top)/w.y,bottom:(y.bottom-m.bottom+h.bottom)/w.y,left:(m.left-y.left+h.left)/w.x,right:(y.right-m.right+h.right)/w.x}}function Ji(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qi(e){return Ni.some(t=>e[t]>=0)}const ea=new Set(["left","top"]);function ta(){return"undefined"!=typeof window}function ra(e){return ia(e)?(e.nodeName||"").toLowerCase():"#document"}function na(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function oa(e){var t;return null==(t=(ia(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ia(e){return!!ta()&&(e instanceof Node||e instanceof na(e).Node)}function aa(e){return!!ta()&&(e instanceof Element||e instanceof na(e).Element)}function sa(e){return!!ta()&&(e instanceof HTMLElement||e instanceof na(e).HTMLElement)}function la(e){return!(!ta()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof na(e).ShadowRoot)}const ca=new Set(["inline","contents"]);function da(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=ka(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!ca.has(o)}const ua=new Set(["table","td","th"]);function pa(e){return ua.has(ra(e))}const fa=[":popover-open",":modal"];function ha(e){return fa.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ga=["transform","translate","scale","rotate","perspective"],ma=["transform","translate","scale","rotate","perspective","filter"],va=["paint","layout","strict","content"];function ba(e){const t=wa(),r=aa(e)?ka(e):e;return ga.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||ma.some(e=>(r.willChange||"").includes(e))||va.some(e=>(r.contain||"").includes(e))}function wa(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ya=new Set(["html","body","#document"]);function xa(e){return ya.has(ra(e))}function ka(e){return na(e).getComputedStyle(e)}function Oa(e){return aa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Na(e){if("html"===ra(e))return e;const t=e.assignedSlot||e.parentNode||la(e)&&e.host||oa(e);return la(t)?t.host:t}function Ca(e){const t=Na(e);return xa(t)?e.ownerDocument?e.ownerDocument.body:e.body:sa(t)&&da(t)?t:Ca(t)}function Sa(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Ca(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=na(o);if(i){const e=Ea(a);return t.concat(a,a.visualViewport||[],da(o)?o:[],e&&r?Sa(e):[])}return t.concat(o,Sa(o,[],r))}function Ea(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ra(e){const t=ka(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=sa(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Ei(r)!==i||Ei(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function Pa(e){return aa(e)?e:e.contextElement}function ja(e){const t=Pa(e);if(!sa(t))return Pi(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Ra(t);let a=(i?Ei(r.width):r.width)/n,s=(i?Ei(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Da=Pi(0);function za(e){const t=na(e);return wa()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Da}function Ma(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Pa(e);let a=Pi(1);t&&(n?aa(n)&&(a=ja(n)):a=ja(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==na(e))&&t}(i,r,n)?za(i):Pi(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){const e=na(i),t=n&&aa(n)?na(n):n;let r=e,o=Ea(r);for(;o&&n&&t!==r;){const e=ja(o),t=o.getBoundingClientRect(),n=ka(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=i,c+=a,r=na(o),o=Ea(r)}}return Ki({width:d,height:u,x:l,y:c})}function Ta(e,t){const r=Oa(e).scrollLeft;return t?t.left+r:Ma(oa(e)).left+r}function _a(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Ta(e,r),y:r.top+t.scrollTop}}const Aa=new Set(["absolute","fixed"]);function Ia(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=na(e),n=oa(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=wa();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=Ta(n);if(c<=0){const e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,a=Math.abs(n.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,r);else if("document"===t)n=function(e){const t=oa(e),r=Oa(e),n=e.ownerDocument.body,o=Si(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Si(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Ta(e);const s=-r.scrollTop;return"rtl"===ka(n).direction&&(a+=Si(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}(oa(e));else if(aa(t))n=function(e,t){const r=Ma(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=sa(e)?ja(e):Pi(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=za(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Ki(n)}function La(e,t){const r=Na(e);return!(r===t||!aa(r)||xa(r))&&("fixed"===ka(r).position||La(r,t))}function Fa(e,t,r){const n=sa(t),o=oa(t),i="fixed"===r,a=Ma(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Pi(0);function c(){l.x=Ta(o)}if(n||!n&&!i)if(("body"!==ra(t)||da(o))&&(s=Oa(t)),n){const e=Ma(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!n&&o&&c();const d=!o||n||i?Pi(0):_a(o,s);return{x:a.left+s.scrollLeft-l.x-d.x,y:a.top+s.scrollTop-l.y-d.y,width:a.width,height:a.height}}function Ha(e){return"static"===ka(e).position}function Ba(e,t){if(!sa(e)||"fixed"===ka(e).position)return null;if(t)return t(e);let r=e.offsetParent;return oa(e)===r&&(r=r.ownerDocument.body),r}function Wa(e,t){const r=na(e);if(ha(e))return r;if(!sa(e)){let t=Na(e);for(;t&&!xa(t);){if(aa(t)&&!Ha(t))return t;t=Na(t)}return r}let n=Ba(e,t);for(;n&&pa(n)&&Ha(n);)n=Ba(n,t);return n&&xa(n)&&Ha(n)&&!ba(n)?r:n||function(e){let t=Na(e);for(;sa(t)&&!xa(t);){if(ba(t))return t;if(ha(t))return null;t=Na(t)}return null}(e)||r}const Ua={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=oa(n),s=!!t&&ha(t.floating);if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Pi(1);const d=Pi(0),u=sa(n);if((u||!u&&!i)&&(("body"!==ra(n)||da(a))&&(l=Oa(n)),sa(n))){const e=Ma(n);c=ja(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}const p=!a||u||i?Pi(0):_a(a,l);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:r.y*c.y-l.scrollTop*c.y+d.y+p.y}},getDocumentElement:oa,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[..."clippingAncestors"===r?ha(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=Sa(e,[],!1).filter(e=>aa(e)&&"body"!==ra(e)),o=null;const i="fixed"===ka(e).position;let a=i?Na(e):e;for(;aa(a)&&!xa(a);){const t=ka(a),r=ba(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&Aa.has(o.position)||da(a)&&!r&&La(e,a))?n=n.filter(e=>e!==a):o=t,a=Na(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=i[0],s=i.reduce((e,r)=>{const n=Ia(t,r,o);return e.top=Si(n.top,e.top),e.right=Ci(n.right,e.right),e.bottom=Ci(n.bottom,e.bottom),e.left=Si(n.left,e.left),e},Ia(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Wa,getElementRects:async function(e){const t=this.getOffsetParent||Wa,r=this.getDimensions,n=await r(e.floating);return{reference:Fa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Ra(e);return{width:t,height:r}},getScale:ja,isElement:aa,isRTL:function(e){return"rtl"===ka(e).direction}};function Va(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $a(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=Pa(e),d=o||i?[...c?Sa(c):[],...Sa(t)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)});const u=c&&s?function(e,t){let r,n=null;const o=oa(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-Ri(u)+"px "+-Ri(o.clientWidth-(d+p))+"px "+-Ri(o.clientHeight-(u+f))+"px "+-Ri(d)+"px",threshold:Si(0,Ci(1,l))||1};let g=!0;function m(t){const n=t[0].intersectionRatio;if(n!==l){if(!g)return a();n?a(!1,n):r=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==n||Va(c,e.getBoundingClientRect())||a(),g=!1}try{n=new IntersectionObserver(m,{...h,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(m,h)}n.observe(e)}(!0),i}(c,r):null;let p,f=-1,h=null;a&&(h=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let g=l?Ma(e):null;return l&&function t(){const n=Ma(e);g&&!Va(g,n)&&r();g=n,p=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)}),null==u||u(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Xa=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=Ti(r),s=_i(r),l="y"===Fi(r),c=ea.has(a)?-1:1,d=i&&l?-1:1,u=Mi(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},qa=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=Mi(e,t),c={x:r,y:n},d=await Zi(t,l),u=Fi(Ti(o)),p=Ai(u);let f=c[p],h=c[u];if(i){const e="y"===p?"bottom":"right";f=zi(f+d["y"===p?"top":"left"],f,f-d[e])}if(a){const e="y"===u?"bottom":"right";h=zi(h+d["y"===u?"top":"left"],h,h-d[e])}const g=s.fn({...t,[p]:f,[u]:h});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[p]:i,[u]:a}}}}}},Ya=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=Mi(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=Ti(o),b=Fi(s),w=Ti(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(w||!g?[qi(s)]:function(e){const t=qi(e);return[Bi(e),t,Bi(t)]}(s)),k="none"!==h;!p&&k&&x.push(...Xi(s,g,h,y));const O=[s,...x],N=await Zi(t,m),C=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(d&&C.push(N[v]),u){const e=function(e,t,r){void 0===r&&(r=!1);const n=_i(e),o=Hi(e),i=Ii(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=qi(a)),[a,qi(a)]}(o,a,y);C.push(N[e[0]],N[e[1]])}if(S=[...S,{placement:o,overflows:C}],!C.every(e=>e<=0)){var E,R;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=O[e];if(t){if(!("alignment"===u&&b!==Fi(t))||S.every(e=>Fi(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let r=null==(R=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:R.placement;if(!r)switch(f){case"bestFit":{var P;const e=null==(P=S.filter(e=>{if(k){const t=Fi(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(r=e);break}case"initialPlacement":r=s}if(o!==r)return{reset:{placement:r}}}return{}}}},Ka=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Mi(e,t),d=await Zi(t,c),u=Ti(o),p=_i(o),f="y"===Fi(o),{width:h,height:g}=i.floating;let m,v;"top"===u||"bottom"===u?(m=u,v=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,m="end"===p?"top":"bottom");const b=g-d.top-d.bottom,w=h-d.left-d.right,y=Ci(g-d[m],b),x=Ci(h-d[v],w),k=!t.middlewareData.shift;let O=y,N=x;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(N=w),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(O=b),k&&!p){const e=Si(d.left,0),t=Si(d.right,0),r=Si(d.top,0),n=Si(d.bottom,0);f?N=h-2*(0!==e||0!==t?e+t:Si(d.left,d.right)):O=g-2*(0!==r||0!==n?r+n:Si(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:O});const C=await a.getDimensions(s.floating);return h!==C.width||g!==C.height?{reset:{rects:!0}}:{}}}},Ga=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Mi(e,t);switch(n){case"referenceHidden":{const e=Ji(await Zi(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Qi(e)}}}case"escaped":{const e=Ji(await Zi(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:Qi(e)}}}default:return{}}}}},Za=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=Mi(e,t)||{};if(null==c)return{};const u=Yi(d),p={x:r,y:n},f=Hi(o),h=Ii(f),g=await a.getDimensions(c),m="y"===f,v=m?"top":"left",b=m?"bottom":"right",w=m?"clientHeight":"clientWidth",y=i.reference[h]+i.reference[f]-p[f]-i.floating[h],x=p[f]-i.reference[f],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let O=k?k[w]:0;O&&await(null==a.isElement?void 0:a.isElement(k))||(O=s.floating[w]||i.floating[h]);const N=y/2-x/2,C=O/2-g[h]/2-1,S=Ci(u[v],C),E=Ci(u[b],C),R=S,P=O-g[h]-E,j=O/2-g[h]/2+N,D=zi(R,j,P),z=!l.arrow&&null!=_i(o)&&j!==D&&i.reference[h]/2-(j<R?S:E)-g[h]/2<0,M=z?j<R?j-R:j-P:0;return{[f]:p[f]+M,data:{[f]:D,centerOffset:j-D-M,...z&&{alignmentOffset:M}},reset:z}}}),Ja=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Mi(e,t),d={x:r,y:n},u=Fi(o),p=Ai(u);let f=d[p],h=d[u];const g=Mi(s,t),m="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+m.mainAxis,r=i.reference[p]+i.reference[e]-m.mainAxis;f<t?f=t:f>r&&(f=r)}if(c){var v,b;const e="y"===p?"width":"height",t=ea.has(Ti(o)),r=i.reference[u]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[u])||0)+(t?0:m.crossAxis),n=i.reference[u]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[u])||0)-(t?m.crossAxis:0);h<r?h=r:h>n&&(h=n)}return{[p]:f,[u]:h}}}},Qa=(e,t,r)=>{const n=new Map,o={platform:Ua,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Gi(c,n,l),p=n,f={},h=0;for(let r=0;r<s.length;r++){const{name:i,fn:g}=s[r],{x:m,y:v,data:b,reset:w}=await g({x:d,y:u,initialPlacement:n,placement:p,strategy:o,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=m?m:d,u=null!=v?v:u,f={...f,[i]:{...f[i],...b}},w&&h<=50&&(h++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:d,y:u}=Gi(c,p,l))),r=-1)}return{x:d,y:u,placement:p,strategy:o,middlewareData:f}})(e,t,{...o,platform:i})};var es="undefined"!=typeof document?g:function(){};function ts(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!==n--;)if(!ts(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!==n--;){const r=o[n];if(("_owner"!==r||!e.$$typeof)&&!ts(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function rs(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ns(e,t){const r=rs(e);return Math.round(t*r)/r}function os(e){const t=n.useRef(e);return es(()=>{t.current=e}),t}function is(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,p]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=n.useState(o);ts(f,o)||h(o);const[g,m]=n.useState(null),[v,w]=n.useState(null),y=n.useCallback(e=>{e!==N.current&&(N.current=e,m(e))},[]),x=n.useCallback(e=>{e!==C.current&&(C.current=e,w(e))},[]),k=a||g,O=s||v,N=n.useRef(null),C=n.useRef(null),S=n.useRef(u),E=null!=c,R=os(c),P=os(i),j=os(d),D=n.useCallback(()=>{if(!N.current||!C.current)return;const e={placement:t,strategy:r,middleware:f};P.current&&(e.platform=P.current),Qa(N.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==j.current};z.current&&!ts(S.current,t)&&(S.current=t,b.flushSync(()=>{p(t)}))})},[f,t,r,P,j]);es(()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const z=n.useRef(!1);es(()=>(z.current=!0,()=>{z.current=!1}),[]),es(()=>{if(k&&(N.current=k),O&&(C.current=O),k&&O){if(R.current)return R.current(k,O,D);D()}},[k,O,D,R,E]);const M=n.useMemo(()=>({reference:N,floating:C,setReference:y,setFloating:x}),[y,x]),T=n.useMemo(()=>({reference:k,floating:O}),[k,O]),_=n.useMemo(()=>{const e={position:r,left:0,top:0};if(!T.floating)return e;const t=ns(T.floating,u.x),n=ns(T.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...rs(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,l,T.floating,u.x,u.y]);return n.useMemo(()=>({...u,update:D,refs:M,elements:T,floatingStyles:_}),[u,D,M,T,_])}const as=e=>({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?Za({element:r.current,padding:n}).fn(t):{}:r?Za({element:r,padding:n}).fn(t):{};var o}}),ss=(e,t)=>({...Xa(e),options:[e,t]}),ls=(e,t)=>({...qa(e),options:[e,t]}),cs=(e,t)=>({...Ja(e),options:[e,t]}),ds=(e,t)=>({...Ya(e),options:[e,t]}),us=(e,t)=>({...Ka(e),options:[e,t]}),ps=(e,t)=>({...Ga(e),options:[e,t]}),fs=(e,t)=>({...as(e),options:[e,t]});var hs=n.forwardRef((t,r)=>{const{children:n,width:o=10,height:i=5,...a}=t;return e(ce.svg,{...a,ref:r,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:e("polygon",{points:"0,0 30,0 15,10"})})});hs.displayName="Arrow";var gs=hs;function ms(e){const[t,r]=n.useState(void 0);return ae(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}var vs="Popper",[bs,ws]=K(vs),[ys,xs]=bs(vs),ks=t=>{const{__scopePopper:r,children:o}=t,[i,a]=n.useState(null);return e(ys,{scope:r,anchor:i,onAnchorChange:a,children:o})};ks.displayName=vs;var Os="PopperAnchor",Ns=n.forwardRef((t,r)=>{const{__scopePopper:o,virtualRef:i,...a}=t,s=xs(Os,o),l=n.useRef(null),c=Q(r,l),d=n.useRef(null);return n.useEffect(()=>{const e=d.current;d.current=i?.current||l.current,e!==d.current&&s.onAnchorChange(d.current)}),i?null:e(ce.div,{...a,ref:c})});Ns.displayName=Os;var Cs="PopperContent",[Ss,Es]=bs(Cs),Rs=n.forwardRef((t,r)=>{const{__scopePopper:o,side:i="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:m,...v}=t,b=xs(Cs,o),[w,y]=n.useState(null),x=Q(r,e=>y(e)),[k,O]=n.useState(null),N=ms(k),C=N?.width??0,S=N?.height??0,E=i+("center"!==s?"-"+s:""),R="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},P=Array.isArray(u)?u:[u],j=P.length>0,D={padding:R,boundary:P.filter(zs),altBoundary:j},{refs:z,floatingStyles:M,placement:T,isPositioned:_,middlewareData:A}=is({strategy:"fixed",placement:E,whileElementsMounted:(...e)=>$a(...e,{animationFrame:"always"===g}),elements:{reference:b.anchor},middleware:[ss({mainAxis:a+S,alignmentAxis:l}),d&&ls({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?cs():void 0,...D}),d&&ds({...D}),us({...D,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),k&&fs({element:k,padding:c}),Ms({arrowWidth:C,arrowHeight:S}),h&&ps({strategy:"referenceHidden",...D})]}),[I,L]=Ts(T),F=ri(m);ae(()=>{_&&F?.()},[_,F]);const H=A.arrow?.x,B=A.arrow?.y,W=0!==A.arrow?.centerOffset,[U,V]=n.useState();return ae(()=>{w&&V(window.getComputedStyle(w).zIndex)},[w]),e("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:_?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(" "),...A.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e(Ss,{scope:o,placedSide:I,onArrowChange:O,arrowX:H,arrowY:B,shouldHideArrow:W,children:e(ce.div,{"data-side":I,"data-align":L,...v,ref:x,style:{...v.style,animation:_?void 0:"none"}})})})});Rs.displayName=Cs;var Ps="PopperArrow",js={top:"bottom",right:"left",bottom:"top",left:"right"},Ds=n.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=Es(Ps,n),a=js[i.placedSide];return e("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:e(gs,{...o,ref:r,style:{...o.style,display:"block"}})})});function zs(e){return null!==e}Ds.displayName=Ps;var Ms=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=Ts(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let f="",h="";return"bottom"===l?(f=i?d:`${u}px`,h=-s+"px"):"top"===l?(f=i?d:`${u}px`,h=`${n.floating.height+s}px`):"right"===l?(f=-s+"px",h=i?d:`${p}px`):"left"===l&&(f=`${n.floating.width+s}px`,h=i?d:`${p}px`),{data:{x:f,y:h}}}});function Ts(e){const[t,r="center"]=e.split("-");return[t,r]}var _s=ks,As=Ns,Is=Rs,Ls=Ds,Fs=n.forwardRef((t,r)=>{const{container:o,...i}=t,[a,s]=n.useState(!1);ae(()=>s(!0),[]);const l=o||a&&globalThis?.document?.body;return l?w.createPortal(e(ce.div,{...i,ref:r}),l):null});Fs.displayName="Portal";var Hs=new WeakMap,Bs=new WeakMap,Ws={},Us=0,Vs=function(e){return e&&(e.host||Vs(e.parentNode))},$s=function(e,t,r,n){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=Vs(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Ws[r]||(Ws[r]=new WeakMap);var i=Ws[r],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,l=(Hs.get(e)||0)+1,c=(i.get(e)||0)+1;Hs.set(e,l),i.set(e,c),a.push(e),1===l&&o&&Bs.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return d(t),s.clear(),Us++,function(){a.forEach(function(e){var t=Hs.get(e)-1,o=i.get(e)-1;Hs.set(e,t),i.set(e,o),t||(Bs.has(e)||e.removeAttribute(n),Bs.delete(e)),o||e.removeAttribute(r)}),--Us||(Hs=new WeakMap,Hs=new WeakMap,Bs=new WeakMap,Ws={})}},Xs=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),$s(n,o,r,"aria-hidden")):function(){return null}},qs="right-scroll-bar-position",Ys="width-before-scroll-bar";function Ks(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Gs="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,Zs=new WeakMap;function Js(e,t){var r,n,o,i=(r=t||null,n=function(t){return e.forEach(function(e){return Ks(e,t)})},(o=u(function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=n,o.facade);return Gs(function(){var t=Zs.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach(function(e){n.has(e)||Ks(e,null)}),n.forEach(function(e){r.has(e)||Ks(e,o)})}Zs.set(i,e)},[e]),i}function Qs(e){return e}var el=function(e){var t=e.sideCar,r=q(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,X({},r))};el.isSideCarExport=!0;var tl=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Qs);var r=[],n=!1;return{read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var i=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),r={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),r}}}}}(null);return t.options=X({async:!0,ssr:!1},e),t}(),rl=function(){},nl=n.forwardRef(function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:rl,onWheelCapture:rl,onTouchMoveCapture:rl}),i=o[0],a=o[1],s=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,p=e.shards,f=e.sideCar,h=e.noRelative,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,y=e.gapMode,x=q(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=f,O=Js([r,t]),N=X(X({},x),i);return n.createElement(n.Fragment,null,u&&n.createElement(k,{sideCar:tl,removeScrollBar:d,shards:p,noRelative:h,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:y}),s?n.cloneElement(n.Children.only(l),X(X({},N),{ref:O})):n.createElement(w,X({},N,{className:c,ref:O}),l))});nl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},nl.classNames={fullWidth:Ys,zeroRight:qs};function ol(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var il=function(){var e=0,t=null;return{add:function(r){var n,o;0==e&&(t=ol())&&(o=r,(n=t).styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},al=function(){var e,t=(e=il(),function(t,r){n.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},sl={left:0,top:0,right:0,gap:0},ll=function(e){return parseInt(e||"",10)||0},cl=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return sl;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[ll(r),ll(n),ll(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},dl=al(),ul="data-scroll-locked",pl=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(ul,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(qs," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(Ys," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(qs," .").concat(qs," {\n right: 0 ").concat(n,";\n }\n \n .").concat(Ys," .").concat(Ys," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(ul,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},fl=function(){var e=parseInt(document.body.getAttribute(ul)||"0",10);return isFinite(e)?e:0},hl=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o;n.useEffect(function(){return document.body.setAttribute(ul,(fl()+1).toString()),function(){var e=fl()-1;e<=0?document.body.removeAttribute(ul):document.body.setAttribute(ul,e.toString())}},[]);var a=n.useMemo(function(){return cl(i)},[i]);return n.createElement(dl,{styles:pl(a,!t,i,r?"":"!important")})},gl=!1;if("undefined"!=typeof window)try{var ml=Object.defineProperty({},"passive",{get:function(){return gl=!0,!0}});window.addEventListener("test",ml,ml),window.removeEventListener("test",ml,ml)}catch(e){gl=!1}var vl=!!gl&&{passive:!1},bl=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},wl=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),yl(e,n)){var o=xl(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},yl=function(e,t){return"v"===e?function(e){return bl(e,"overflowY")}(t):function(e){return bl(e,"overflowX")}(t)},xl=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},kl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ol=function(e){return[e.deltaX,e.deltaY]},Nl=function(e){return e&&"current"in e?e.current:e},Cl=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Sl=0,El=[];function Rl(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Pl,jl=(Pl=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),i=n.useState(Sl++)[0],a=n.useState(al)[0],s=n.useRef(e);n.useEffect(function(){s.current=e},[e]),n.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(Nl),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=n.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,i=kl(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===d||f.contains(d)))return!1;var h=wl(u,d);if(!h)return!0;if(h?n=u:(n="v"===u?"h":"v",h=wl(u,d)),!h)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var g=o.current||n;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,d=a>0,u=0,p=0;do{if(!s)break;var f=xl(e,s),h=f[0],g=f[1]-f[2]-i*h;(h||g)&&yl(e,s)&&(u+=g,p+=h);var m=s.parentNode;s=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(o&&Math.abs(u)<1||!o&&a>u)||!d&&(o&&Math.abs(p)<1||!o&&-a>p))&&(c=!0),c}(g,t,e,"h"===g?l:c,!0)},[]),c=n.useCallback(function(e){var r=e;if(El.length&&El[El.length-1]===a){var n="deltaY"in r?Ol(r):kl(r),o=t.current.filter(function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&(t=e.delta,o=n,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(s.current.shards||[]).map(Nl).filter(Boolean).filter(function(e){return e.contains(r.target)});(i.length>0?l(r,i[0]):!s.current.noIsolation)&&r.cancelable&&r.preventDefault()}}},[]),d=n.useCallback(function(e,r,n,o){var i={name:e,delta:r,target:n,should:o,shadowParent:Rl(n)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),u=n.useCallback(function(e){r.current=kl(e),o.current=void 0},[]),p=n.useCallback(function(t){d(t.type,Ol(t),t.target,l(t,e.lockRef.current))},[]),f=n.useCallback(function(t){d(t.type,kl(t),t.target,l(t,e.lockRef.current))},[]);n.useEffect(function(){return El.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,vl),document.addEventListener("touchmove",c,vl),document.addEventListener("touchstart",u,vl),function(){El=El.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,vl),document.removeEventListener("touchmove",c,vl),document.removeEventListener("touchstart",u,vl)}},[]);var h=e.removeScrollBar,g=e.inert;return n.createElement(n.Fragment,null,g?n.createElement(a,{styles:Cl(i)}):null,h?n.createElement(hl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},tl.useMedium(Pl),el),Dl=n.forwardRef(function(e,t){return n.createElement(nl,X({},e,{ref:t,sideCar:jl}))});Dl.classNames=nl.classNames;var zl=Dl,Ml="Popover",[Tl,_l]=K(Ml,[ws]),Al=ws(),[Il,Ll]=Tl(Ml),Fl=t=>{const{__scopePopover:r,children:o,open:i,defaultOpen:a,onOpenChange:s,modal:l=!1}=t,c=Al(r),d=n.useRef(null),[u,p]=n.useState(!1),[f,h]=le({prop:i,defaultProp:a??!1,onChange:s,caller:Ml});return e(_s,{...c,children:e(Il,{scope:r,contentId:ge(),triggerRef:d,open:f,onOpenChange:h,onOpenToggle:n.useCallback(()=>h(e=>!e),[h]),hasCustomAnchor:u,onCustomAnchorAdd:n.useCallback(()=>p(!0),[]),onCustomAnchorRemove:n.useCallback(()=>p(!1),[]),modal:l,children:o})})};Fl.displayName=Ml;var Hl="PopoverAnchor";n.forwardRef((t,r)=>{const{__scopePopover:o,...i}=t,a=Ll(Hl,o),s=Al(o),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=a;return n.useEffect(()=>(l(),()=>c()),[l,c]),e(As,{...s,...i,ref:r})}).displayName=Hl;var Bl="PopoverTrigger",Wl=n.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=Ll(Bl,n),a=Al(n),s=Q(r,i.triggerRef),l=e(ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ec(i.open),...o,ref:s,onClick:ie(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:e(As,{asChild:!0,...a,children:l})});Wl.displayName=Bl;var Ul="PopoverPortal",[Vl,$l]=Tl(Ul,{forceMount:void 0}),Xl=t=>{const{__scopePopover:r,forceMount:n,children:o,container:i}=t,a=Ll(Ul,r);return e(Vl,{scope:r,forceMount:n,children:e(ue,{present:n||a.open,children:e(Fs,{asChild:!0,container:i,children:o})})})};Xl.displayName=Ul;var ql="PopoverContent",Yl=n.forwardRef((t,r)=>{const n=$l(ql,t.__scopePopover),{forceMount:o=n.forceMount,...i}=t,a=Ll(ql,t.__scopePopover);return e(ue,{present:o||a.open,children:a.modal?e(Gl,{...i,ref:r}):e(Zl,{...i,ref:r})})});Yl.displayName=ql;var Kl=ee("PopoverContent.RemoveScroll"),Gl=n.forwardRef((t,r)=>{const o=Ll(ql,t.__scopePopover),i=n.useRef(null),a=Q(r,i),s=n.useRef(!1);return n.useEffect(()=>{const e=i.current;if(e)return Xs(e)},[]),e(zl,{as:Kl,allowPinchZoom:!0,children:e(Jl,{...t,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ie(t.onCloseAutoFocus,e=>{e.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:ie(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;s.current=n},{checkForDefaultPrevented:!1}),onFocusOutside:ie(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Zl=n.forwardRef((t,r)=>{const o=Ll(ql,t.__scopePopover),i=n.useRef(!1),a=n.useRef(!1);return e(Jl,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(i.current||o.triggerRef.current?.focus(),e.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(i.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const r=e.target,n=o.triggerRef.current?.contains(r);n&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),Jl=n.forwardRef((t,r)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...p}=t,f=Ll(ql,n),h=Al(n);return pi(),e(vi,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:e(li,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:e(Is,{"data-state":ec(f.open),role:"dialog",id:f.contentId,...h,...p,ref:r,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ql="PopoverClose";n.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=Ll(Ql,n);return e(ce.button,{type:"button",...o,ref:r,onClick:ie(t.onClick,()=>i.onOpenChange(!1))})}).displayName=Ql;function ec(e){return e?"open":"closed"}n.forwardRef((t,r)=>{const{__scopePopover:n,...o}=t,i=Al(n);return e(Ls,{...i,...o,ref:r})}).displayName="PopoverArrow";var tc=Xl,rc=Yl;const nc=Fl,oc=Wl,ic=n.forwardRef((t,r)=>{var{className:n,align:o="center",sideOffset:i=4}=t,a=q(t,["className","align","sideOffset"]);return e(tc,{children:e(rc,Object.assign({ref:r,align:o,sideOffset:i,className:Xn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n)},a))})});ic.displayName=rc.displayName;const ac=({value:t,options:n,onValueChange:o,currentLabel:i})=>{const[a,s]=u(!1),[c,d]=u(""),p=l(()=>{if(!c)return n;const e=c.toLowerCase();return n.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},[c,n]);return r(nc,Object.assign({open:a,onOpenChange:s},{children:[e(oc,Object.assign({asChild:!0},{children:r(Ho,Object.assign({variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs font-mono",contentEditable:!1},{children:[i,e(Et,{className:"h-3 w-3 opacity-50"})]}))})),e(ic,Object.assign({className:"w-64 p-0",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:r("div",Object.assign({className:"p-2"},{children:[r("div",Object.assign({className:"relative mb-2"},{children:[e(Xt,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),e(ti,{placeholder:"Search language...",value:c,onChange:e=>d(e.target.value),className:"h-8 pl-7 text-xs",autoFocus:!0})]})),e("div",Object.assign({className:"max-h-[200px] overflow-y-auto"},{children:0===p.length?e("div",Object.assign({className:"px-2 py-4 text-center text-sm text-muted-foreground"},{children:"No languages found"})):e("div",Object.assign({className:"space-y-0.5"},{children:p.map(r=>e("button",Object.assign({type:"button",onClick:()=>{return e=r.value,o(e),s(!1),void d("");var e},className:Xn("w-full rounded-sm px-2 py-1.5 text-left text-xs font-mono transition-colors","hover:bg-accent hover:text-accent-foreground",t===r.value&&"bg-accent text-accent-foreground")},{children:r.label}),r.value))}))}))]}))}))]}))},sc=({value:t,options:n,onValueChange:o,currentLabel:i})=>{const[a,s]=u(!1),[c,d]=u(""),p=l(()=>{if(!c)return n;const e=c.toLowerCase();return n.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},[c,n]);return r(nc,Object.assign({open:a,onOpenChange:s},{children:[e(oc,Object.assign({asChild:!0},{children:r(Ho,Object.assign({variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs",contentEditable:!1},{children:[i,e(Et,{className:"h-3 w-3 opacity-50"})]}))})),e(ic,Object.assign({className:"w-64 p-0",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:r("div",Object.assign({className:"p-2"},{children:[r("div",Object.assign({className:"relative mb-2"},{children:[e(Xt,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),e(ti,{placeholder:"Search theme...",value:c,onChange:e=>d(e.target.value),className:"h-8 pl-7 text-xs",autoFocus:!0})]})),e("div",Object.assign({className:"max-h-[200px] overflow-y-auto"},{children:0===p.length?e("div",Object.assign({className:"px-2 py-4 text-center text-sm text-muted-foreground"},{children:"No themes found"})):e("div",Object.assign({className:"space-y-0.5"},{children:p.map(r=>e("button",Object.assign({type:"button",onClick:()=>{return e=r.value,o(e),s(!1),void d("");var e},className:Xn("w-full rounded-sm px-2 py-1.5 text-left text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",t===r.value&&"bg-accent text-accent-foreground")},{children:r.label}),r.value))}))}))]}))}))]}))},lc=e=>{var t;if(Dr.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const r=e.children;return null!==(t=null==r?void 0:r.map(lc).join("\n"))&&void 0!==t?t:""}return""},cc={code:{render:({attributes:t,children:n,element:o,blockId:i})=>{var a,s,l,f,h,g;const m=x(),v=null!==(s=null===(a=o.props)||void 0===a?void 0:a.language)&&void 0!==s?s:"javascript",b=null!==(f=null===(l=o.props)||void 0===l?void 0:l.theme)&&void 0!==f?f:"github-dark",w=d(null),[y,N]=u(!1),[C,S]=u(!1),[E,R]=u({background:"",foreground:"",caret:"",tabActiveBackground:"",tabInactiveBackground:"",buttonForeground:""});p(()=>{var e,t,r,n,o,i,a,s,l,c,d,u,p,f;if(window.yShiki){const h=window.yShiki.getTheme(b);R({background:h.bg,foreground:h.fg,caret:null!==(t=null===(e=h.colors)||void 0===e?void 0:e["editorCursor.foreground"])&&void 0!==t?t:h.fg,tabActiveBackground:null!==(i=null!==(n=null===(r=h.colors)||void 0===r?void 0:r["editorTab.activeBackground"])&&void 0!==n?n:null===(o=h.colors)||void 0===o?void 0:o["tab.activeBackground"])&&void 0!==i?i:h.bg,tabInactiveBackground:null!==(c=null!==(s=null===(a=h.colors)||void 0===a?void 0:a["editorTab.inactiveBackground"])&&void 0!==s?s:null===(l=h.colors)||void 0===l?void 0:l["tab.inactiveBackground"])&&void 0!==c?c:h.bg,buttonForeground:null!==(f=null!==(u=null===(d=h.colors)||void 0===d?void 0:d["button.foreground"])&&void 0!==u?u:null===(p=h.colors)||void 0===p?void 0:p["icon.foreground"])&&void 0!==f?f:h.fg})}},[b]);const T=c(()=>{const e=lc(o);ei(e)&&(N(!0),setTimeout(()=>N(!1),1500))},[o]),_=c(()=>{const e=k.getBlockSlate(m,{id:i});if(!e)return;const t=O.getElementPath(m,{blockId:i,element:o});if(!t)return;const r=t?xr.parent(e,t):void 0;r&&lr.isElement(r[0])&&!xr.isEditor(r[0])?O.deleteElement(m,{blockId:i,type:"code",path:t}):k.deleteBlock(m,{blockId:i,focus:!0})},[m,i,o]),A=c(e=>{P.updateCodeLanguage(m,i,e)},[m,i]),I=c(e=>{P.updateCodeTheme(m,i,e)},[m,i]),L=c(()=>Y(void 0,void 0,void 0,function*(){if(!C){S(!0);try{yield P.beautifyCode(m,i)}finally{S(!1)}}}),[m,i,C]),F=j(v),H=null!==(h=D.find(e=>e.value===v))&&void 0!==h?h:D[0],B=null!==(g=z.find(e=>e.value===b))&&void 0!==g?g:z[0];return r("div",Object.assign({},t,{className:"relative my-2 group/code-block rounded-lg border border-border bg-muted/50 overflow-hidden"},{children:[r("div",Object.assign({contentEditable:!1,className:"flex items-center justify-between px-4 py-2 border-b border-border select-none",style:{backgroundColor:E.tabActiveBackground||void 0}},{children:[r("div",Object.assign({className:"flex items-center gap-2"},{children:[e(ac,{value:v,options:D,onValueChange:e=>A(e),currentLabel:H.label}),e(sc,{value:b,options:z,onValueChange:e=>I(e),currentLabel:B.label})]})),r("div",Object.assign({className:"flex items-center gap-1 opacity-0 group-hover/code-block:opacity-100 transition-opacity"},{children:[F&&e(Ho,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:L,disabled:C,title:"Beautify code",style:{color:E.buttonForeground||void 0}},{children:e(Yt,{className:"h-4 w-4 "+(C?"animate-pulse":"")})})),e(Ho,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:T,title:y?"Copied!":"Copy code",style:{color:E.buttonForeground||void 0}},{children:e(y?St:jt,{className:"h-4 w-4"})})),e(Ho,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:_,title:"Delete code block",style:{color:E.buttonForeground||void 0}},{children:e(Kt,{className:"h-4 w-4"})}))]}))]})),r("div",Object.assign({className:"relative bg-background overflow-hidden",style:{backgroundColor:E.background,color:E.foreground,caretColor:E.caret}},{children:[e("div",Object.assign({ref:w,className:"absolute inset-0 p-4 font-mono text-sm whitespace-pre overflow-auto pointer-events-none z-10 select-none",style:{lineHeight:"1.6",tabSize:2},contentEditable:!1,"aria-hidden":"true"},{children:e(M,{element:o,language:v,theme:b})})),e("div",Object.assign({className:"relative p-4 font-mono text-sm whitespace-pre overflow-auto",style:{lineHeight:"1.6",tabSize:2,color:"transparent",caretColor:E.caret},onScroll:e=>{w.current&&(w.current.scrollTop=e.currentTarget.scrollTop,w.current.scrollLeft=e.currentTarget.scrollLeft)}},{children:n}))]}))]}))}}};var dc="rovingFocusGroup.onEntryFocus",uc={bubbles:!1,cancelable:!0},pc="RovingFocusGroup",[fc,hc,gc]=oe(pc),[mc,vc]=K(pc,[gc]),[bc,wc]=mc(pc),yc=n.forwardRef((t,r)=>e(fc.Provider,{scope:t.__scopeRovingFocusGroup,children:e(fc.Slot,{scope:t.__scopeRovingFocusGroup,children:e(xc,{...t,ref:r})})}));yc.displayName=pc;var xc=n.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:a=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...f}=t,h=n.useRef(null),g=Q(r,h),m=ze(s),[v,b]=le({prop:l,defaultProp:c??null,onChange:d,caller:pc}),[w,y]=n.useState(!1),x=ri(u),k=hc(o),O=n.useRef(!1),[N,C]=n.useState(0);return n.useEffect(()=>{const e=h.current;if(e)return e.addEventListener(dc,x),()=>e.removeEventListener(dc,x)},[x]),e(bc,{scope:o,orientation:i,dir:m,loop:a,currentTabStopId:v,onItemFocus:n.useCallback(e=>b(e),[b]),onItemShiftTab:n.useCallback(()=>y(!0),[]),onFocusableItemAdd:n.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:n.useCallback(()=>C(e=>e-1),[]),children:e(ce.div,{tabIndex:w||0===N?-1:0,"data-orientation":i,...f,ref:g,style:{outline:"none",...t.style},onMouseDown:ie(t.onMouseDown,()=>{O.current=!0}),onFocus:ie(t.onFocus,e=>{const t=!O.current;if(e.target===e.currentTarget&&t&&!w){const t=new CustomEvent(dc,uc);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=k().filter(e=>e.focusable);Cc([e.find(e=>e.active),e.find(e=>e.id===v),...e].filter(Boolean).map(e=>e.ref.current),p)}}O.current=!1}),onBlur:ie(t.onBlur,()=>y(!1))})})}),kc="RovingFocusGroupItem",Oc=n.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:a=!1,tabStopId:s,children:l,...c}=t,d=ge(),u=s||d,p=wc(kc,o),f=p.currentTabStopId===u,h=hc(o),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:v}=p;return n.useEffect(()=>{if(i)return g(),()=>m()},[i,g,m]),e(fc.ItemSlot,{scope:o,id:u,focusable:i,active:a,children:e(ce.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...c,ref:r,onMouseDown:ie(t.onMouseDown,e=>{i?p.onItemFocus(u):e.preventDefault()}),onFocus:ie(t.onFocus,()=>p.onItemFocus(u)),onKeyDown:ie(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:Nc[n]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=p.loop?(n=i+1,(r=o).map((e,t)=>r[(n+t)%r.length])):o.slice(i+1)}setTimeout(()=>Cc(o))}var r,n}),children:"function"==typeof l?l({isCurrentTabStop:f,hasTabStop:null!=v}):l})})});Oc.displayName=kc;var Nc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cc(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var Sc=yc,Ec=Oc,Rc="Tabs",[Pc,jc]=K(Rc,[vc]),Dc=vc(),[zc,Mc]=Pc(Rc),Tc=n.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...d}=t,u=ze(l),[p,f]=le({prop:o,onChange:i,defaultProp:a??"",caller:Rc});return e(zc,{scope:n,baseId:ge(),value:p,onValueChange:f,orientation:s,dir:u,activationMode:c,children:e(ce.div,{dir:u,"data-orientation":s,...d,ref:r})})});Tc.displayName=Rc;var _c="TabsList",Ac=n.forwardRef((t,r)=>{const{__scopeTabs:n,loop:o=!0,...i}=t,a=Mc(_c,n),s=Dc(n);return e(Sc,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:e(ce.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:r})})});Ac.displayName=_c;var Ic="TabsTrigger",Lc=n.forwardRef((t,r)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...a}=t,s=Mc(Ic,n),l=Dc(n),c=Bc(s.baseId,o),d=Wc(s.baseId,o),u=o===s.value;return e(Ec,{asChild:!0,...l,focusable:!i,active:u,children:e(ce.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:r,onMouseDown:ie(t.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)}),onKeyDown:ie(t.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)}),onFocus:ie(t.onFocus,()=>{const e="manual"!==s.activationMode;u||i||!e||s.onValueChange(o)})})})});Lc.displayName=Ic;var Fc="TabsContent",Hc=n.forwardRef((t,r)=>{const{__scopeTabs:o,value:i,forceMount:a,children:s,...l}=t,c=Mc(Fc,o),d=Bc(c.baseId,i),u=Wc(c.baseId,i),p=i===c.value,f=n.useRef(p);return n.useEffect(()=>{const e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),e(ue,{present:a||p,children:({present:n})=>e(ce.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!n,id:u,tabIndex:0,...l,ref:r,style:{...t.style,animationDuration:f.current?"0s":void 0},children:n&&s})})});function Bc(e,t){return`${e}-trigger-${t}`}function Wc(e,t){return`${e}-content-${t}`}Hc.displayName=Fc;var Uc=Ac,Vc=Lc,$c=Hc;const Xc=Tc,qc=n.forwardRef((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e(Uc,Object.assign({ref:r,className:Xn("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",n)},o))});qc.displayName=Uc.displayName;const Yc=n.forwardRef((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e(Vc,Object.assign({ref:r,className:Xn("inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",n)},o))});Yc.displayName=Vc.displayName;const Kc=n.forwardRef((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e($c,Object.assign({ref:r,className:Xn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n)},o))});Kc.displayName=$c.displayName;const Gc=e=>{var t;if(Dr.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const r=e.children;return null!==(t=null==r?void 0:r.map(Gc).join("\n"))&&void 0!==t?t:""}return""};function Zc(e,[t,r]){return Math.min(r,Math.max(t,e))}var Jc="ScrollArea",[Qc,ed]=K(Jc),[td,rd]=Qc(Jc),nd=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,type:i="hover",dir:a,scrollHideDelay:s=600,...l}=t,[c,d]=n.useState(null),[u,p]=n.useState(null),[f,h]=n.useState(null),[g,m]=n.useState(null),[v,b]=n.useState(null),[w,y]=n.useState(0),[x,k]=n.useState(0),[O,N]=n.useState(!1),[C,S]=n.useState(!1),E=Q(r,e=>d(e)),R=ze(a);return e(td,{scope:o,type:i,dir:R,scrollHideDelay:s,scrollArea:c,viewport:u,onViewportChange:p,content:f,onContentChange:h,scrollbarX:g,onScrollbarXChange:m,scrollbarXEnabled:O,onScrollbarXEnabledChange:N,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:C,onScrollbarYEnabledChange:S,onCornerWidthChange:y,onCornerHeightChange:k,children:e(ce.div,{dir:R,...l,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})})});nd.displayName=Jc;var od="ScrollAreaViewport",id=n.forwardRef((o,i)=>{const{__scopeScrollArea:a,children:s,nonce:l,...c}=o,d=rd(od,a),u=Q(i,n.useRef(null),d.onViewportChange);return r(t,{children:[e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),e(ce.div,{"data-radix-scroll-area-viewport":"",...c,ref:u,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...o.style},children:e("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});id.displayName=od;var ad="ScrollAreaScrollbar",sd=n.forwardRef((t,r)=>{const{forceMount:o,...i}=t,a=rd(ad,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,c="horizontal"===t.orientation;return n.useEffect(()=>(c?s(!0):l(!0),()=>{c?s(!1):l(!1)}),[c,s,l]),"hover"===a.type?e(ld,{...i,ref:r,forceMount:o}):"scroll"===a.type?e(cd,{...i,ref:r,forceMount:o}):"auto"===a.type?e(dd,{...i,ref:r,forceMount:o}):"always"===a.type?e(ud,{...i,ref:r}):null});sd.displayName=ad;var ld=n.forwardRef((t,r)=>{const{forceMount:o,...i}=t,a=rd(ad,t.__scopeScrollArea),[s,l]=n.useState(!1);return n.useEffect(()=>{const e=a.scrollArea;let t=0;if(e){const r=()=>{window.clearTimeout(t),l(!0)},n=()=>{t=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",n),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",n)}}},[a.scrollArea,a.scrollHideDelay]),e(ue,{present:o||s,children:e(dd,{"data-state":s?"visible":"hidden",...i,ref:r})})}),cd=n.forwardRef((t,r)=>{const{forceMount:o,...i}=t,a=rd(ad,t.__scopeScrollArea),s="horizontal"===t.orientation,l=jd(()=>d("SCROLL_END"),100),[c,d]=(u="hidden",p={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},n.useReducer((e,t)=>p[e][t]??e,u));var u,p;return n.useEffect(()=>{if("idle"===c){const e=window.setTimeout(()=>d("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(e)}},[c,a.scrollHideDelay,d]),n.useEffect(()=>{const e=a.viewport,t=s?"scrollLeft":"scrollTop";if(e){let r=e[t];const n=()=>{const n=e[t];r!==n&&(d("SCROLL"),l()),r=n};return e.addEventListener("scroll",n),()=>e.removeEventListener("scroll",n)}},[a.viewport,s,d,l]),e(ue,{present:o||"hidden"!==c,children:e(ud,{"data-state":"hidden"===c?"hidden":"visible",...i,ref:r,onPointerEnter:ie(t.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:ie(t.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),dd=n.forwardRef((t,r)=>{const o=rd(ad,t.__scopeScrollArea),{forceMount:i,...a}=t,[s,l]=n.useState(!1),c="horizontal"===t.orientation,d=jd(()=>{if(o.viewport){const e=o.viewport.offsetWidth<o.viewport.scrollWidth,t=o.viewport.offsetHeight<o.viewport.scrollHeight;l(c?e:t)}},10);return Dd(o.viewport,d),Dd(o.content,d),e(ue,{present:i||s,children:e(ud,{"data-state":s?"visible":"hidden",...a,ref:r})})}),ud=n.forwardRef((t,r)=>{const{orientation:o="vertical",...i}=t,a=rd(ad,t.__scopeScrollArea),s=n.useRef(null),l=n.useRef(0),[c,d]=n.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Nd(c.viewport,c.content),p={...i,sizes:c,onSizesChange:d,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>s.current=e,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:e=>l.current=e};function f(e,t){return function(e,t,r,n="ltr"){const o=Cd(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,d=r.content-r.viewport,u="ltr"===n?[0,d]:[-1*d,0];return Ed([l,c],u)(e)}(e,l.current,c,t)}return"horizontal"===o?e(pd,{...p,ref:r,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=Sd(a.viewport.scrollLeft,c,a.dir);s.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=f(e,a.dir))}}):"vertical"===o?e(fd,{...p,ref:r,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=Sd(a.viewport.scrollTop,c);s.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=f(e))}}):null}),pd=n.forwardRef((t,r)=>{const{sizes:o,onSizesChange:i,...a}=t,s=rd(ad,t.__scopeScrollArea),[l,c]=n.useState(),d=n.useRef(null),u=Q(r,d,s.onScrollbarXChange);return n.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),e(md,{"data-orientation":"horizontal",...a,ref:u,sizes:o,style:{bottom:0,left:"rtl"===s.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===s.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Cd(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.x),onDragScroll:e=>t.onDragScroll(e.x),onWheelScroll:(e,r)=>{if(s.viewport){const n=s.viewport.scrollLeft+e.deltaX;t.onWheelScroll(n),Rd(n,r)&&e.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Od(l.paddingLeft),paddingEnd:Od(l.paddingRight)}})}})}),fd=n.forwardRef((t,r)=>{const{sizes:o,onSizesChange:i,...a}=t,s=rd(ad,t.__scopeScrollArea),[l,c]=n.useState(),d=n.useRef(null),u=Q(r,d,s.onScrollbarYChange);return n.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),e(md,{"data-orientation":"vertical",...a,ref:u,sizes:o,style:{top:0,right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Cd(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.y),onDragScroll:e=>t.onDragScroll(e.y),onWheelScroll:(e,r)=>{if(s.viewport){const n=s.viewport.scrollTop+e.deltaY;t.onWheelScroll(n),Rd(n,r)&&e.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Od(l.paddingTop),paddingEnd:Od(l.paddingBottom)}})}})}),[hd,gd]=Qc(ad),md=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,sizes:i,hasThumb:a,onThumbChange:s,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:u,onWheelScroll:p,onResize:f,...h}=t,g=rd(ad,o),[m,v]=n.useState(null),b=Q(r,e=>v(e)),w=n.useRef(null),y=n.useRef(""),x=g.viewport,k=i.content-i.viewport,O=ri(p),N=ri(d),C=jd(f,10);function S(e){if(w.current){const t=e.clientX-w.current.left,r=e.clientY-w.current.top;u({x:t,y:r})}}return n.useEffect(()=>{const e=e=>{const t=e.target,r=m?.contains(t);r&&O(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[x,m,k,O]),n.useEffect(N,[i,N]),Dd(m,C),Dd(g.content,C),e(hd,{scope:o,scrollbar:m,hasThumb:a,onThumbChange:ri(s),onThumbPointerUp:ri(l),onThumbPositionChange:N,onThumbPointerDown:ri(c),children:e(ce.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:ie(t.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),w.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),S(e)}}),onPointerMove:ie(t.onPointerMove,S),onPointerUp:ie(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),vd="ScrollAreaThumb",bd=n.forwardRef((t,r)=>{const{forceMount:n,...o}=t,i=gd(vd,t.__scopeScrollArea);return e(ue,{present:n||i.hasThumb,children:e(wd,{ref:r,...o})})}),wd=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,style:i,...a}=t,s=rd(vd,o),l=gd(vd,o),{onThumbPositionChange:c}=l,d=Q(r,e=>l.onThumbChange(e)),u=n.useRef(void 0),p=jd(()=>{u.current&&(u.current(),u.current=void 0)},100);return n.useEffect(()=>{const e=s.viewport;if(e){const t=()=>{if(p(),!u.current){const t=Pd(e,c);u.current=t,c()}};return c(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[s.viewport,p,c]),e(ce.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:ie(t.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=e.clientY-t.top;l.onThumbPointerDown({x:r,y:n})}),onPointerUp:ie(t.onPointerUp,l.onThumbPointerUp)})});bd.displayName=vd;var yd="ScrollAreaCorner",xd=n.forwardRef((t,r)=>{const n=rd(yd,t.__scopeScrollArea),o=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&o?e(kd,{...t,ref:r}):null});xd.displayName=yd;var kd=n.forwardRef((t,r)=>{const{__scopeScrollArea:o,...i}=t,a=rd(yd,o),[s,l]=n.useState(0),[c,d]=n.useState(0),u=Boolean(s&&c);return Dd(a.scrollbarX,()=>{const e=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(e),d(e)}),Dd(a.scrollbarY,()=>{const e=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(e),l(e)}),u?e(ce.div,{...i,ref:r,style:{width:s,height:c,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...t.style}}):null});function Od(e){return e?parseInt(e,10):0}function Nd(e,t){const r=e/t;return isNaN(r)?0:r}function Cd(e){const t=Nd(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Sd(e,t,r="ltr"){const n=Cd(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=Zc(e,"ltr"===r?[0,a]:[-1*a,0]);return Ed([0,a],[0,s])(l)}function Ed(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Rd(e,t){return e>0&&e<t}var Pd=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function jd(e,t){const r=ri(e),o=n.useRef(0);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),n.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function Dd(e,t){const r=ri(t);ae(()=>{let t=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}},[e,r])}var zd=nd,Md=id,Td=xd;const _d=t=>{var{className:r,orientation:n="vertical"}=t,o=q(t,["className","orientation"]);return e(sd,Object.assign({"data-slot":"scroll-area-scrollbar",orientation:n,className:Xn("flex touch-none p-px transition-colors select-none","vertical"===n&&"h-full w-2.5 border-l border-l-transparent","horizontal"===n&&"h-2.5 flex-col border-t border-t-transparent",r)},o,{children:e(bd,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})}))},Ad=t=>{var{className:n,children:o}=t,i=q(t,["className","children"]);return r(zd,Object.assign({"data-slot":"scroll-area",className:Xn("relative",n)},i,{children:[e(Md,Object.assign({"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{children:o})),e(_d,{}),e(Td,{})]}))};$("[data-code-group-container] [data-state=active]{background-color:var(--code-group-tab-active-bg)!important;border-bottom-color:var(--code-group-tab-active-fg)!important;color:var(--code-group-tab-active-fg)!important}[data-code-group-container] [data-state=inactive]{background-color:var(--code-group-tab-inactive-bg)!important;color:var(--code-group-tab-inactive-fg)!important}");const Id={"code-group-container":{render:t=>{var r,n;const{attributes:o,children:i,blockId:a,element:s}=t,l=x(),c=null===(r=t.element.props)||void 0===r?void 0:r.theme;p(()=>{var e,t,r,n,o,i,a,s,l,d,u,p,f,h,g,m,v,b,w,y,x,k,O,N,C,S,E,R,P,j,D,z,M,T,_,A;if(window.yShiki){const I=window.yShiki.getTheme(c),L=null!==(n=null!==(t=null===(e=I.colors)||void 0===e?void 0:e["tab.activeBackground"])&&void 0!==t?t:null===(r=I.colors)||void 0===r?void 0:r["editorTab.activeBackground"])&&void 0!==n?n:I.bg,F={"code-group-tab-active-bg":L,"code-group-tab-inactive-bg":null!==(d=null!==(s=null!==(i=null===(o=I.colors)||void 0===o?void 0:o["tab.inactiveBackground"])&&void 0!==i?i:null===(a=I.colors)||void 0===a?void 0:a["editorTab.inactiveBackground"])&&void 0!==s?s:null===(l=I.colors)||void 0===l?void 0:l["editorGroupHeader.tabsBackground"])&&void 0!==d?d:I.bg,"code-group-tab-active-fg":null!==(h=null!==(p=null===(u=I.colors)||void 0===u?void 0:u["tab.activeForeground"])&&void 0!==p?p:null===(f=I.colors)||void 0===f?void 0:f["editorTab.activeForeground"])&&void 0!==h?h:I.fg,"code-group-tab-inactive-fg":null!==(y=null!==(b=null!==(m=null===(g=I.colors)||void 0===g?void 0:g["tab.inactiveForeground"])&&void 0!==m?m:null===(v=I.colors)||void 0===v?void 0:v["editorTab.inactiveForeground"])&&void 0!==b?b:null===(w=I.colors)||void 0===w?void 0:w.foreground)&&void 0!==y?y:I.fg,"code-group-tab-active-border":null!==(N=null!==(k=null===(x=I.colors)||void 0===x?void 0:x["tab.activeBorder"])&&void 0!==k?k:null===(O=I.colors)||void 0===O?void 0:O["editorTab.activeBorder"])&&void 0!==N?N:L,"code-group-tab-border":null!==(j=null!==(R=null!==(S=null===(C=I.colors)||void 0===C?void 0:C["tab.border"])&&void 0!==S?S:null===(E=I.colors)||void 0===E?void 0:E["editorGroupHeader.border"])&&void 0!==R?R:null===(P=I.colors)||void 0===P?void 0:P["editorGroup.border"])&&void 0!==j?j:"transparent","code-group-editor-bg":null!==(z=null===(D=I.colors)||void 0===D?void 0:D["editor.background"])&&void 0!==z?z:I.bg,"code-group-editor-fg":null!==(T=null===(M=I.colors)||void 0===M?void 0:M["editor.foreground"])&&void 0!==T?T:I.fg,"code-group-editor-cursor":null!==(A=null===(_=I.colors)||void 0===_?void 0:_["editorCursor.foreground"])&&void 0!==A?A:I.fg};Object.entries(F).forEach(([e,t])=>{document.documentElement.style.setProperty(`--${e}`,t)})}},[c]);return e("div",Object.assign({},o,{"data-code-group-container":!0,className:"w-full"},{children:e(Xc,Object.assign({value:null===(n=s.props)||void 0===n?void 0:n.activeTabId,onValueChange:e=>{const t=k.getBlockSlate(l,{id:a});t&&Yr.setNodes(t,{props:Object.assign(Object.assign({},s.props),{activeTabId:e})},{at:[0],match:e=>lr.isElement(e)&&"code-group-container"===e.type})},className:"w-full"},{children:i}))}))}},"code-group-list":{render:t=>{const{attributes:n,children:o,blockId:i}=t,a=x();return r(Ad,Object.assign({className:"w-full"},{children:[r(qc,Object.assign({},n,{className:"w-full relative justify-start h-8 rounded-none rounded-t-lg bg-transparent p-0 border-b border-x-0 border-t-0",style:{backgroundColor:"var(--code-group-tab-inactive-bg)",borderBottomColor:"var(--code-group-tab-border)"}},{children:[o,e("button",Object.assign({type:"button",contentEditable:!1,onClick:e=>{e.preventDefault(),e.stopPropagation(),T.addTabItem(a,i)},className:"ml-1 flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1.5 h-7",style:{color:"var(--code-group-tab-inactive-fg)"},title:"Add tab"},{children:e(Vt,{className:"h-3.5 w-3.5 shrink-0"})}))]})),e(_d,{orientation:"horizontal"})]}))}},"code-group-item-heading":{render:t=>{const{attributes:n,children:o,element:i,blockId:a}=t,s=x();return r(Yc,Object.assign({},n,{value:i.id,className:"relative group/tab flex items-center gap-1.5 px-3 h-7 rounded-none rounded-t-lg border-b-2 border-transparent whitespace-nowrap text-xs font-normal transition-colors",style:{backgroundColor:"var(--code-group-tab-inactive-bg, hsl(var(--muted)))",color:"var(--code-group-tab-inactive-fg, hsl(var(--muted-foreground)))"}},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:o})),e("span",Object.assign({contentEditable:!1,onClick:()=>{const e=k.getBlockSlate(s,{id:a});if(!e)return;const t=O.getElementPath(s,{blockId:a,element:i});t&&(Yr.select(e,t),T.deleteTabItem(s,a,{tabId:i.id}))},className:"ml-1 flex items-center justify-center rounded-sm opacity-0 group-hover/tab:opacity-100 transition-opacity hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-0.5",style:{color:"inherit"},title:"Close tab"},{children:e(Jt,{className:"h-3 w-3 shrink-0"})}))]}))}},"code-group-content":{render:t=>{var n,o,i,a;const{attributes:s,children:c,element:f,blockId:h}=t,g=d(null),m=x(),v=null!==(o=null===(n=null==f?void 0:f.props)||void 0===n?void 0:n.language)&&void 0!==o?o:"javascript",b=l(()=>{var e,t,r;const n=k.getBlockSlate(m,{id:h});if(!n)return"github-dark";const o=null===(e=Array.from(xr.nodes(n,{at:[0],match:e=>lr.isElement(e)&&"code-group-container"===e.type})))||void 0===e?void 0:e[0];if(!o)return"github-dark";const[i]=o;return i&&null!==(r=null===(t=i.props)||void 0===t?void 0:t.theme)&&void 0!==r?r:"github-dark"},[m,h]),[w,y]=u(!1),[N,C]=u(!1),[S,E]=u({buttonForeground:""});p(()=>{var e,t,r,n;if(window.yShiki){const o=window.yShiki.getTheme(b);E({buttonForeground:null!==(n=null!==(t=null===(e=o.colors)||void 0===e?void 0:e["button.foreground"])&&void 0!==t?t:null===(r=o.colors)||void 0===r?void 0:r["icon.foreground"])&&void 0!==n?n:o.fg})}},[b]);const R=j(v),P=null!==(i=D.find(e=>e.value===v))&&void 0!==i?i:D[0];return e(Kc,Object.assign({},s,{value:null===(a=f.props)||void 0===a?void 0:a.referenceId,className:"rounded-b-lg mt-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"},{children:r("div",Object.assign({className:"relative group/code-group-content overflow-hidden"},{children:[r("div",Object.assign({contentEditable:!1,className:"absolute top-2 right-2 z-20 flex items-center gap-2 opacity-0 group-hover/code-group-content:opacity-100 transition-opacity",style:{backgroundColor:"var(--code-group-tab-active-bg)",padding:"4px",borderRadius:"4px"}},{children:[e(ac,{value:v,options:D,onValueChange:e=>{const t=O.getElementPath(m,{blockId:h,element:f});t&&O.updateElement(m,{blockId:h,type:"code-group-content",props:Object.assign(Object.assign({},f.props),{language:e}),path:t})},currentLabel:P.label}),R&&e(Ho,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>Y(void 0,void 0,void 0,function*(){var e;if(N)return;const t=null===(e=f.props)||void 0===e?void 0:e.referenceId;if(t){C(!0);try{yield T.beautifyTab(m,h,t)}finally{C(!1)}}}),disabled:N,title:"Beautify code",style:{color:S.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:e(Yt,{className:"h-4 w-4 "+(N?"animate-pulse":"")})})),e(Ho,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{const e=Gc(f);ei(e)&&(y(!0),setTimeout(()=>y(!1),1500))},title:w?"Copied!":"Copy code",style:{color:S.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:e(w?St:jt,{className:"h-4 w-4"})})),e(Ho,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{var e;T.deleteTabItem(m,h,{tabId:null===(e=f.props)||void 0===e?void 0:e.referenceId})},title:"Delete code",style:{color:S.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:e(Kt,{className:"h-4 w-4"})}))]})),r("div",Object.assign({className:"relative bg-background overflow-hidden rounded-lg",style:{backgroundColor:"var(--code-group-editor-bg)",color:"var(--code-group-editor-fg)",caretColor:"var(--code-group-editor-cursor)"}},{children:[e("div",Object.assign({ref:g,className:"absolute inset-0 p-4 font-mono text-sm whitespace-pre overflow-auto pointer-events-none z-10 select-none",style:{lineHeight:"1.6",tabSize:2},contentEditable:!1,"aria-hidden":"true"},{children:e(M,{element:f,language:v,theme:b})})),e("div",Object.assign({className:"relative p-4 font-mono text-sm whitespace-pre overflow-auto",style:{lineHeight:"1.6",tabSize:2,color:"transparent",caretColor:"var(--code-group-editor-cursor)"},onScroll:e=>{g.current&&(g.current.scrollTop=e.currentTarget.scrollTop,g.current.scrollLeft=e.currentTarget.scrollLeft)}},{children:c}))]}))]}))}))}}};var Ld=Symbol.for("react.lazy"),Fd=n[" use ".trim().toString()];function Hd(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===Ld&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function Bd(e){const t=n.forwardRef((e,t)=>{let{children:r,...o}=e;if(Hd(r)&&"function"==typeof Fd&&(r=Fd(r._payload)),n.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props);return r.type!==n.Fragment&&(i.ref=t?J(t,e):e),n.cloneElement(r,i)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wd=Symbol("radix.slottable");function Ud(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Wd}var Vd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const o=function(t){const r=Bd(t),o=n.forwardRef((t,o)=>{let{children:i,...a}=t;Hd(i)&&"function"==typeof Fd&&(i=Fd(i._payload));const s=n.Children.toArray(i),l=s.find(Ud);if(l){const t=l.props.children,i=s.map(e=>e===l?n.Children.count(t)>1?n.Children.only(null):n.isValidElement(t)?t.props.children:null:e);return e(r,{...a,ref:o,children:n.isValidElement(t)?n.cloneElement(t,void 0,i):null})}return e(r,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${r}`),i=n.forwardRef((t,n)=>{const{asChild:i,...a}=t,s=i?o:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:n})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{}),$d="horizontal",Xd=["horizontal","vertical"],qd=n.forwardRef((t,r)=>{const{decorative:n,orientation:o=$d,...i}=t,a=function(e){return Xd.includes(e)}(o)?o:$d,s=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return e(Vd.div,{"data-orientation":a,...s,...i,ref:r})});qd.displayName="Separator";var Yd=qd;const Kd=n.forwardRef((t,r)=>{var{className:n,orientation:o="horizontal",decorative:i=!0}=t,a=q(t,["className","orientation","decorative"]);return e(Yd,Object.assign({ref:r,decorative:i,orientation:o,className:Xn("shrink-0 bg-border","horizontal"===o?"h-[1px] w-full":"h-full w-[1px]",n)},a))});Kd.displayName=Yd.displayName;const Gd={divider:{render:t=>{var n,o,i;const a=x(),{attributes:s,element:l}=t,c=l,d=null!==(o=null===(n=c.props)||void 0===n?void 0:n.theme)&&void 0!==o?o:"solid",u=null===(i=c.props)||void 0===i?void 0:i.color;return r("div",Object.assign({},s,{contentEditable:!1,className:"w-full py-3",onClick:()=>{const e=k.getBlock(a,{id:t.blockId});e&&N.setSelected(a,{at:e.meta.order})}},{children:[e(Kd,{orientation:"horizontal",decorative:!0,className:(()=>{switch(d){case"dashed":return Xn("border-t-2 border-dashed border-b-0 border-l-0 border-r-0 bg-transparent",u?"":"border-border");case"dotted":return Xn("border-t-2 border-dotted border-b-0 border-l-0 border-r-0 bg-transparent",u?"":"border-border");case"gradient":return"h-[2px] bg-transparent border-0";default:return Xn("h-[1px]",u?"":"bg-border")}})(),style:(()=>{if(!u)return{};switch(d){case"dashed":case"dotted":return{borderTopColor:u};case"gradient":return{background:`linear-gradient(to right, transparent, ${u}, transparent)`};default:return{backgroundColor:u}}})()}),t.children]}))}}},Zd={HeadingOne:{"heading-one":{render:t=>{const{attributes:r,children:n,element:o}=t;return e("h1",Object.assign({id:o.id,draggable:!1},r,{className:"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl"},{children:n}))}}},HeadingTwo:{"heading-two":{render:t=>{const{attributes:r,children:n,element:o}=t;return e("h2",Object.assign({id:o.id,draggable:!1},r,{className:"scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0"},{children:n}))}}},HeadingThree:{"heading-three":{render:t=>{const{attributes:r,children:n,element:o}=t;return e("h3",Object.assign({id:o.id,draggable:!1},r,{className:"mt-4 scroll-m-20 text-2xl font-semibold tracking-tight"},{children:n}))}}}},Jd=({onInsertFromUnsplash:t})=>e(Kc,Object.assign({value:"unsplash",className:"mt-4"},{children:r("div",Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[e("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:e("svg",Object.assign({className:"h-6 w-6",viewBox:"0 0 32 32",fill:"currentColor"},{children:e("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})}))})),r("div",Object.assign({className:"text-center"},{children:[e("p",Object.assign({className:"text-sm font-medium"},{children:"Browse free photos"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Powered by Unsplash"}))]})),e(Ho,Object.assign({onClick:t},{children:"Browse photos"}))]}))})),Qd=({preview:t})=>e("div",Object.assign({className:"absolute inset-0 overflow-hidden",style:{width:t.width,height:t.height}},{children:e("img",{src:t.url,alt:"Preview",className:"h-full w-full object-cover object-center",style:{width:t.width,height:t.height},draggable:!1})})),eu=({progress:t})=>e("div",Object.assign({className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-4 bg-black/70 backdrop-blur-sm p-6"},{children:e("div",Object.assign({className:"w-full max-w-md space-y-4"},{children:r("div",Object.assign({className:"space-y-2"},{children:[r("div",Object.assign({className:"flex items-center justify-between text-sm"},{children:[e("span",Object.assign({className:"font-medium text-white"},{children:"Uploading..."})),r("span",Object.assign({className:"text-white/80"},{children:[t.percentage,"%"]}))]})),e("div",Object.assign({className:"h-2 w-full overflow-hidden rounded-full bg-white/20"},{children:e("div",{className:"h-full bg-primary transition-all duration-300 ease-out",style:{width:`${t.percentage}%`}})})),r("div",Object.assign({className:"flex items-center justify-between text-xs text-white/60"},{children:[r("span",{children:[(t.loaded/1024/1024).toFixed(2)," MB /"," ",(t.total/1024/1024).toFixed(2)," MB"]}),e(Lt,{className:"h-3.5 w-3.5 animate-spin"})]}))]}))}))})),tu=({onUpload:t,hasPreview:n})=>{const o=d(null);return r("div",n?Object.assign({className:"flex flex-col items-center justify-center gap-4 py-8"},{children:[r("div",Object.assign({className:"text-center space-y-2"},{children:[e("p",Object.assign({className:"text-sm font-medium text-white"},{children:"Image preview"})),e("p",Object.assign({className:"text-xs text-white/80"},{children:"Uploading your image..."}))]})),e("input",{ref:o,type:"file",accept:"image/*",onChange:t,className:"hidden"})]}):Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[e("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:e(At,{className:"h-6 w-6 text-muted-foreground"})})),r("div",Object.assign({className:"text-center"},{children:[e("p",Object.assign({className:"text-sm font-medium"},{children:"Upload an image"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Click or drag and drop"}))]})),e(Ho,Object.assign({onClick:()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.click()}},{children:"Choose file"})),e("input",{ref:o,type:"file",accept:"image/*",onChange:t,className:"hidden"})]}))},ru=({onInsertUrl:t})=>{const[n,o]=u(""),i=()=>{n.trim()&&(t(n.trim()),o(""))};return r("div",Object.assign({className:"mt-4 space-y-3"},{children:[e(ti,{placeholder:"Paste image URL...",value:n,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&n.trim()&&i()}}),e(Ho,Object.assign({className:"w-full",onClick:i,disabled:!n.trim()},{children:"Embed image"}))]}))},nu=({onInsertFromAI:n})=>{const[o,i]=u(""),[a,s]=u(!1),l=()=>{o.trim()&&!a&&(s(!0),n(o.trim()),s(!1),i(""))};return r("div",Object.assign({className:"mt-4 space-y-3"},{children:[r("div",Object.assign({className:"space-y-2"},{children:[e(ti,{placeholder:"Describe the image...",value:o,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&l()},disabled:a}),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:'Example: "A sunset over mountains with dramatic clouds”'}))]})),e(Ho,Object.assign({className:"w-full gap-2",onClick:l,disabled:!o.trim()||a},{children:r(t,a?{children:[e(Lt,{className:"h-4 w-4 animate-spin"}),"Generating..."]}:{children:[e(Yt,{className:"h-4 w-4"}),"Generate image"]})}))]}))},ou=({onUpload:t,onInsertUrl:n,onInsertFromUnsplash:o,onInsertFromAI:i,hasPreview:a})=>e("div",Object.assign({className:Xn("relative p-4",a&&"min-h-[300px] flex flex-col")},{children:r(Xc,Object.assign({defaultValue:"upload",className:"w-full"},{children:[r(qc,Object.assign({className:Xn("grid w-full grid-cols-4",a&&"bg-background/80 backdrop-blur-sm")},{children:[r(Yc,Object.assign({value:"upload",className:"gap-1.5"},{children:[e(Zt,{className:"h-3.5 w-3.5"}),"Upload"]})),r(Yc,Object.assign({value:"link",className:"gap-1.5"},{children:[e(It,{className:"h-3.5 w-3.5"}),"Link"]})),o&&r(Yc,Object.assign({value:"unsplash",className:"gap-1.5"},{children:[e("svg",Object.assign({className:"h-3.5 w-3.5",viewBox:"0 0 32 32",fill:"currentColor"},{children:e("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})})),"Unsplash"]})),i&&r(Yc,Object.assign({value:"ai",className:"gap-1.5"},{children:[e(Yt,{className:"h-3.5 w-3.5"}),"AI"]}))]})),e(Kc,Object.assign({value:"upload",className:"mt-4"},{children:e(tu,{onUpload:t,hasPreview:a})})),e(Kc,Object.assign({value:"link"},{children:e(ru,{onInsertUrl:n})})),o&&e(Jd,{onInsertFromUnsplash:o}),i&&e(Kc,Object.assign({value:"ai"},{children:e(nu,{onInsertFromAI:i})}))]}))})),iu=({onUpload:t,onInsertUrl:n,onInsertFromUnsplash:o,onInsertFromAI:i,className:a,attributes:s,children:l,preview:c,progress:d,loading:u})=>{const p=null!==c&&!!c.url,f=u&&d;return r("div",Object.assign({className:Xn("relative rounded-lg border bg-background overflow-hidden",p&&"min-h-[300px]",a)},s,{contentEditable:!1},{children:[p&&e(Qd,{preview:c}),!p&&e(ou,{onUpload:t,onInsertUrl:n,onInsertFromUnsplash:o,onInsertFromAI:i,hasPreview:p}),f&&d&&e(eu,{progress:d}),l]}))};var au,su,lu,cu,du={},uu={get exports(){return du},set exports(e){du=e}},pu={},fu={};function hu(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=hu(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function gu(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=hu(e))&&(n&&(n+=" "),n+=t);return n}({get exports(){return fu},set exports(e){fu=e}}).exports=function(){if(cu)return lu;cu=1;var e=su?au:(su=1,au="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function r(){}return r.resetWarningCache=t,lu=function(){function n(t,r,n,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return n}n.isRequired=n;var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i}}()();var mu=Zo(Object.freeze({__proto__:null,clsx:gu,default:gu})),vu={},bu={};Object.defineProperty(bu,"__esModule",{value:!0}),bu.dontSetMe=function(e,t,r){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(r," - do not set this, set it on the child."))},bu.findInArray=function(e,t){for(let r=0,n=e.length;r<n;r++)if(t.apply(t,[e[r],r,e]))return e[r]},bu.int=function(e){return parseInt(e,10)},bu.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},bu.isNum=function(e){return"number"==typeof e&&!isNaN(e)};var wu={};Object.defineProperty(wu,"__esModule",{value:!0}),wu.browserPrefixToKey=ku,wu.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},wu.default=void 0,wu.getPrefix=xu;const yu=["Moz","Webkit","O","ms"];function xu(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=null===(e=window.document)||void 0===e||null===(e=e.documentElement)||void 0===e?void 0:e.style;if(!r)return"";if(t in r)return"";for(let e=0;e<yu.length;e++)if(ku(t,yu[e])in r)return yu[e];return""}function ku(e,t){return t?"".concat(t).concat(function(e){let t="",r=!0;for(let n=0;n<e.length;n++)r?(t+=e[n].toUpperCase(),r=!1):"-"===e[n]?r=!0:t+=e[n];return t}(e)):e}wu.default=xu(),Object.defineProperty(vu,"__esModule",{value:!0}),vu.addClassName=Pu,vu.addEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.addEventListener?e.addEventListener(t,r,o):e.attachEvent?e.attachEvent("on"+t,r):e["on"+t]=r},vu.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&Pu(e.body,"react-draggable-transparent-selection")},vu.createCSSTransform=function(e,t){const r=Ru(e,t,"px");return{[(0,Nu.browserPrefixToKey)("transform",Nu.default)]:r}},vu.createSVGTransform=function(e,t){return Ru(e,t,"")},vu.getTouch=function(e,t){return e.targetTouches&&(0,Ou.findInArray)(e.targetTouches,e=>t===e.identifier)||e.changedTouches&&(0,Ou.findInArray)(e.changedTouches,e=>t===e.identifier)},vu.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},vu.getTranslation=Ru,vu.innerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Ou.int)(r.paddingTop),t-=(0,Ou.int)(r.paddingBottom),t},vu.innerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Ou.int)(r.paddingLeft),t-=(0,Ou.int)(r.paddingRight),t},vu.matchesSelector=Eu,vu.matchesSelectorAndParentsTo=function(e,t,r){let n=e;do{if(Eu(n,t))return!0;if(n===r)return!1;n=n.parentNode}while(n);return!1},vu.offsetXYFromParent=function(e,t,r){const n=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-n.left)/r,i=(e.clientY+t.scrollTop-n.top)/r;return{x:o,y:i}},vu.outerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Ou.int)(r.borderTopWidth),t+=(0,Ou.int)(r.borderBottomWidth),t},vu.outerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Ou.int)(r.borderLeftWidth),t+=(0,Ou.int)(r.borderRightWidth),t},vu.removeClassName=ju,vu.removeEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.removeEventListener?e.removeEventListener(t,r,o):e.detachEvent?e.detachEvent("on"+t,r):e["on"+t]=null},vu.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&ju(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var Ou=bu,Nu=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=Cu(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(wu);function Cu(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(Cu=function(e){return e?r:t})(e)}let Su="";function Eu(e,t){return Su||(Su=(0,Ou.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,Ou.isFunction)(e[t])})),!!(0,Ou.isFunction)(e[Su])&&e[Su](t)}function Ru(e,t,r){let{x:n,y:o}=e,i="translate(".concat(n).concat(r,",").concat(o).concat(r,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+r),n="".concat("string"==typeof t.y?t.y:t.y+r);i="translate(".concat(e,", ").concat(n,")")+i}return i}function Pu(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function ju(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Du={};Object.defineProperty(Du,"__esModule",{value:!0}),Du.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Du.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Du.createCoreData=function(e,t,r){const n=!(0,zu.isNum)(e.lastX),o=Tu(e);return n?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:o,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}},Du.createDraggableData=function(e,t){const r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}},Du.getBoundPosition=function(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:n}=e.props;n="string"==typeof n?n:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(n);const o=Tu(e);if("string"==typeof n){const{ownerDocument:e}=o,t=e.defaultView;let r;if(r="parent"===n?o.parentNode:e.querySelector(n),!(r instanceof t.HTMLElement))throw new Error('Bounds selector "'+n+'" could not find an element.');const i=r,a=t.getComputedStyle(o),s=t.getComputedStyle(i);n={left:-o.offsetLeft+(0,zu.int)(s.paddingLeft)+(0,zu.int)(a.marginLeft),top:-o.offsetTop+(0,zu.int)(s.paddingTop)+(0,zu.int)(a.marginTop),right:(0,Mu.innerWidth)(i)-(0,Mu.outerWidth)(o)-o.offsetLeft+(0,zu.int)(s.paddingRight)-(0,zu.int)(a.marginRight),bottom:(0,Mu.innerHeight)(i)-(0,Mu.outerHeight)(o)-o.offsetTop+(0,zu.int)(s.paddingBottom)-(0,zu.int)(a.marginBottom)}}(0,zu.isNum)(n.right)&&(t=Math.min(t,n.right));(0,zu.isNum)(n.bottom)&&(r=Math.min(r,n.bottom));(0,zu.isNum)(n.left)&&(t=Math.max(t,n.left));(0,zu.isNum)(n.top)&&(r=Math.max(r,n.top));return[t,r]},Du.getControlPosition=function(e,t,r){const n="number"==typeof t?(0,Mu.getTouch)(e,t):null;if("number"==typeof t&&!n)return null;const o=Tu(r),i=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,Mu.offsetXYFromParent)(n||e,i,r.props.scale)},Du.snapToGrid=function(e,t,r){const n=Math.round(t/e[0])*e[0],o=Math.round(r/e[1])*e[1];return[n,o]};var zu=bu,Mu=vu;function Tu(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var _u={},Au={};Object.defineProperty(Au,"__esModule",{value:!0}),Au.default=function(){},Object.defineProperty(_u,"__esModule",{value:!0}),_u.default=void 0;var Iu=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=$u(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(o),Lu=Vu(fu),Fu=Vu(w),Hu=vu,Bu=Du,Wu=bu,Uu=Vu(Au);function Vu(e){return e&&e.__esModule?e:{default:e}}function $u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return($u=function(e){return e?r:t})(e)}function Xu(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const qu={start:"touchstart",move:"touchmove",stop:"touchend"},Yu={start:"mousedown",move:"mousemove",stop:"mouseup"};let Ku=Yu,Gu=class extends Iu.Component{constructor(){super(...arguments),Xu(this,"dragging",!1),Xu(this,"lastX",NaN),Xu(this,"lastY",NaN),Xu(this,"touchIdentifier",null),Xu(this,"mounted",!1),Xu(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=t;if(this.props.disabled||!(e.target instanceof r.defaultView.Node)||this.props.handle&&!(0,Hu.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,Hu.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const n=(0,Hu.getTouchIdentifier)(e);this.touchIdentifier=n;const o=(0,Bu.getControlPosition)(e,n,this);if(null==o)return;const{x:i,y:a}=o,s=(0,Bu.createCoreData)(this,i,a);(0,Uu.default)("DraggableCore: handleDragStart: %j",s),(0,Uu.default)("calling",this.props.onStart);!1!==this.props.onStart(e,s)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,Hu.addUserSelectStyles)(r),this.dragging=!0,this.lastX=i,this.lastY=a,(0,Hu.addEvent)(r,Ku.move,this.handleDrag),(0,Hu.addEvent)(r,Ku.stop,this.handleDragStop))}),Xu(this,"handleDrag",e=>{const t=(0,Bu.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX,t=n-this.lastY;if([e,t]=(0,Bu.snapToGrid)(this.props.grid,e,t),!e&&!t)return;r=this.lastX+e,n=this.lastY+t}const o=(0,Bu.createCoreData)(this,r,n);(0,Uu.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=r,this.lastY=n;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}}),Xu(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,Bu.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX||0,t=n-this.lastY||0;[e,t]=(0,Bu.snapToGrid)(this.props.grid,e,t),r=this.lastX+e,n=this.lastY+t}const o=(0,Bu.createCoreData)(this,r,n);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const i=this.findDOMNode();i&&this.props.enableUserSelectHack&&(0,Hu.removeUserSelectStyles)(i.ownerDocument),(0,Uu.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,i&&((0,Uu.default)("DraggableCore: Removing handlers"),(0,Hu.removeEvent)(i.ownerDocument,Ku.move,this.handleDrag),(0,Hu.removeEvent)(i.ownerDocument,Ku.stop,this.handleDragStop))}),Xu(this,"onMouseDown",e=>(Ku=Yu,this.handleDragStart(e))),Xu(this,"onMouseUp",e=>(Ku=Yu,this.handleDragStop(e))),Xu(this,"onTouchStart",e=>(Ku=qu,this.handleDragStart(e))),Xu(this,"onTouchEnd",e=>(Ku=qu,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,Hu.addEvent)(e,qu.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,Hu.removeEvent)(t,Yu.move,this.handleDrag),(0,Hu.removeEvent)(t,qu.move,this.handleDrag),(0,Hu.removeEvent)(t,Yu.stop,this.handleDragStop),(0,Hu.removeEvent)(t,qu.stop,this.handleDragStop),(0,Hu.removeEvent)(e,qu.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Hu.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:Fu.default.findDOMNode(this)}render(){return Iu.cloneElement(Iu.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};_u.default=Gu,Xu(Gu,"displayName","DraggableCore"),Xu(Gu,"propTypes",{allowAnyClick:Lu.default.bool,children:Lu.default.node.isRequired,disabled:Lu.default.bool,enableUserSelectHack:Lu.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Lu.default.arrayOf(Lu.default.number),handle:Lu.default.string,cancel:Lu.default.string,nodeRef:Lu.default.object,onStart:Lu.default.func,onDrag:Lu.default.func,onStop:Lu.default.func,onMouseDown:Lu.default.func,scale:Lu.default.number,className:Wu.dontSetMe,style:Wu.dontSetMe,transform:Wu.dontSetMe}),Xu(Gu,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(o),r=u(fu),n=u(w),i=u(mu),a=vu,s=Du,l=bu,c=u(_u),d=u(Au);function u(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function h(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class g extends t.Component{static getDerivedStateFromProps(e,t){let{position:r}=e,{prevPropsPosition:n}=t;return!r||n&&r.x===n.x&&r.y===n.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:r,prevPropsPosition:n}),{x:r.x,y:r.y,prevPropsPosition:{...r}})}constructor(e){super(e),h(this,"onDragStart",(e,t)=>{(0,d.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,s.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})}),h(this,"onDrag",(e,t)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",t);const r=(0,s.createDraggableData)(this,t),n={x:r.x,y:r.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=n;n.x+=this.state.slackX,n.y+=this.state.slackY;const[o,i]=(0,s.getBoundPosition)(this,n.x,n.y);n.x=o,n.y=i,n.slackX=this.state.slackX+(e-n.x),n.slackY=this.state.slackY+(t-n.y),r.x=n.x,r.y=n.y,r.deltaX=n.x-this.state.x,r.deltaY=n.y-this.state.y}if(!1===this.props.onDrag(e,r))return!1;this.setState(n)}),h(this,"onDragStop",(e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,s.createDraggableData)(this,t)))return!1;(0,d.default)("Draggable: onDragStop: %j",t);const r={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;r.x=e,r.y=t}this.setState(r)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:n.default.findDOMNode(this)}render(){const{axis:e,bounds:r,children:n,defaultPosition:o,defaultClassName:l,defaultClassNameDragging:d,defaultClassNameDragged:u,position:p,positionOffset:h,scale:g,...m}=this.props;let v={},b=null;const w=!Boolean(p)||this.state.dragging,y=p||o,x={x:(0,s.canDragX)(this)&&w?this.state.x:y.x,y:(0,s.canDragY)(this)&&w?this.state.y:y.y};this.state.isElementSVG?b=(0,a.createSVGTransform)(x,h):v=(0,a.createCSSTransform)(x,h);const k=(0,i.default)(n.props.className||"",l,{[d]:this.state.dragging,[u]:this.state.dragged});return t.createElement(c.default,f({},m,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(n),{className:k,style:{...n.props.style,...v},transform:b}))}}e.default=g,h(g,"displayName","Draggable"),h(g,"propTypes",{...c.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),h(g,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(pu);const{default:Zu,DraggableCore:Ju}=pu;uu.exports=Zu,du.default=Zu,du.DraggableCore=Ju;var Qu=function(){return Qu=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Qu.apply(this,arguments)},ep={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},tp={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},rp={width:"20px",height:"20px",position:"absolute",zIndex:1},np={top:Qu(Qu({},ep),{top:"-5px"}),right:Qu(Qu({},tp),{left:void 0,right:"-5px"}),bottom:Qu(Qu({},ep),{top:void 0,bottom:"-5px"}),left:Qu(Qu({},tp),{left:"-5px"}),topRight:Qu(Qu({},rp),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Qu(Qu({},rp),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Qu(Qu({},rp),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Qu(Qu({},rp),{left:"-10px",top:"-10px",cursor:"nw-resize"})},op=m(function(t){var r=t.onResizeStart,n=t.direction,o=t.children,i=t.replaceStyles,a=t.className,s=c(function(e){r(e,n)},[r,n]),d=c(function(e){r(e,n)},[r,n]),u=l(function(){return Qu(Qu({position:"absolute",userSelect:"none"},np[n]),null!=i?i:{})},[i,n]);return e("div",{className:a||void 0,style:u,onMouseDown:s,onTouchStart:d,children:o})}),ip=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ap=function(){return ap=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ap.apply(this,arguments)},sp={width:"auto",height:"auto"},lp=function(e,t,r){return Math.max(Math.min(e,r),t)},cp=function(e,t,r){var n=Math.round(e/t);return n*t+r*(n-1)},dp=function(e,t){return new RegExp(e,"i").test(t)},up=function(e){return Boolean(e.touches&&e.touches.length)},pp=function(e,t,r){void 0===r&&(r=0);var n=t.reduce(function(r,n,o){return Math.abs(n-e)<Math.abs(t[r]-e)?o:r},0),o=Math.abs(t[n]-e);return 0===r||o<r?t[n]:e},fp=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},hp=function(e,t,r,n){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return r*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return n*(Number(e.replace("vh",""))/100)}return e},gp=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],mp="__resizable_base__",vp=function(t){function n(e){var r,n,o,i,a=t.call(this,e)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.delta={width:0,height:0},a.appendBase=function(){if(!a.resizable||!a.window)return null;var e=a.parentNode;if(!e)return null;var t=a.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(mp):t.className+=mp,e.appendChild(t),t},a.removeBase=function(e){var t=a.parentNode;t&&t.removeChild(e)},a.state={isResizing:!1,width:null!==(n=null===(r=a.propsSize)||void 0===r?void 0:r.width)&&void 0!==n?n:"auto",height:null!==(i=null===(o=a.propsSize)||void 0===o?void 0:o.height)&&void 0!==i?i:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return ip(n,t),Object.defineProperty(n.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||sp},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var r=this.resizable.offsetWidth,n=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:r,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:n,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,r=function(t){var r;if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&(null===(r=e.propsSize[t])||void 0===r?void 0:r.toString().endsWith("%"))){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize(),o=Number(e.state[t].toString().replace("px",""))/n[t]*100;return"".concat(o,"%")}return fp(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?fp(t.width):r("width"),height:t&&void 0!==t.height&&!this.state.isResizing?fp(t.height):r("height")}},enumerable:!1,configurable:!0}),n.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,r=this.parentNode.style.flexWrap;"wrap"!==r&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var n={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=r),this.removeBase(e),n},n.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},n.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},n.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},n.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},n.prototype.createSizeForCssProperty=function(e,t){var r=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==r&&"auto"!==r?e:"auto"},n.prototype.calculateNewMaxFromBoundary=function(e,t){var r,n,o=this.props.boundsByDirection,i=this.state.direction,a=o&&dp("left",i),s=o&&dp("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(r=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),n=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(r=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,n=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(r=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),n=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return r&&Number.isFinite(r)&&(e=e&&e<r?e:r),n&&Number.isFinite(n)&&(t=t&&t<n?t:n),{maxWidth:e,maxHeight:t}},n.prototype.calculateNewSizeFromDirection=function(e,t){var r,n=this.props.scale||1,o=(r=this.props.resizeRatio||1,Array.isArray(r)?r:[r,r]),i=o[0],a=o[1],s=this.state,l=s.direction,c=s.original,d=this.props,u=d.lockAspectRatio,p=d.lockAspectRatioExtraHeight,f=d.lockAspectRatioExtraWidth,h=c.width,g=c.height,m=p||0,v=f||0;return dp("right",l)&&(h=c.width+(e-c.x)*i/n,u&&(g=(h-v)/this.ratio+m)),dp("left",l)&&(h=c.width-(e-c.x)*i/n,u&&(g=(h-v)/this.ratio+m)),dp("bottom",l)&&(g=c.height+(t-c.y)*a/n,u&&(h=(g-m)*this.ratio+v)),dp("top",l)&&(g=c.height-(t-c.y)*a/n,u&&(h=(g-m)*this.ratio+v)),{newWidth:h,newHeight:g}},n.prototype.calculateNewSizeFromAspectRatio=function(e,t,r,n){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l=void 0===n.width?10:n.width,c=void 0===r.width||r.width<0?e:r.width,d=void 0===n.height?10:n.height,u=void 0===r.height||r.height<0?t:r.height,p=a||0,f=s||0;if(i){var h=(d-p)*this.ratio+f,g=(u-p)*this.ratio+f,m=(l-f)/this.ratio+p,v=(c-f)/this.ratio+p,b=Math.max(l,h),w=Math.min(c,g),y=Math.max(d,m),x=Math.min(u,v);e=lp(e,b,w),t=lp(t,y,x)}else e=lp(e,l,c),t=lp(t,d,u);return{newWidth:e,newHeight:t}},n.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if("parent"===this.props.bounds){var t=this.parentNode;if(t){var r=t.getBoundingClientRect();this.parentLeft=r.left*e,this.parentTop=r.top*e}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left*e,this.targetTop=n.top*e}if(this.resizable){var o=this.resizable.getBoundingClientRect(),i=o.left,a=o.top,s=o.right,l=o.bottom;this.resizableLeft=i*e,this.resizableRight=s*e,this.resizableTop=a*e,this.resizableBottom=l*e}},n.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var r,n=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(n=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&up(e.nativeEvent)&&(n=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",r=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:n,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ap(ap({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:r};this.setState(l)}},n.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&up(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var r=this.props,n=r.maxWidth,o=r.maxHeight,i=r.minWidth,a=r.minHeight,s=up(e)?e.touches[0].clientX:e.clientX,l=up(e)?e.touches[0].clientY:e.clientY,c=this.state,d=c.direction,u=c.original,p=c.width,f=c.height,h=this.getParentSize(),g=function(e,t,r,n,o,i,a){return n=hp(n,e.width,t,r),o=hp(o,e.height,t,r),i=hp(i,e.width,t,r),a=hp(a,e.height,t,r),{maxWidth:void 0===n?void 0:Number(n),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}}(h,this.window.innerWidth,this.window.innerHeight,n,o,i,a);n=g.maxWidth,o=g.maxHeight,i=g.minWidth,a=g.minHeight;var m=this.calculateNewSizeFromDirection(s,l),v=m.newHeight,b=m.newWidth,w=this.calculateNewMaxFromBoundary(n,o);this.props.snap&&this.props.snap.x&&(b=pp(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=pp(v,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(b,v,{width:w.maxWidth,height:w.maxHeight},{width:i,height:a});if(b=x.newWidth,v=x.newHeight,this.props.grid){var k=cp(b,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),O=cp(v,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),N=this.props.snapGap||0;b=0===N||Math.abs(k-b)<=N?k:b,v=0===N||Math.abs(O-v)<=N?O:v}var C={width:b-u.width,height:v-u.height};if(this.delta=C,p&&"string"==typeof p)if(p.endsWith("%")){var S=b/h.width*100;b="".concat(S,"%")}else if(p.endsWith("vw")){var E=b/this.window.innerWidth*100;b="".concat(E,"vw")}else if(p.endsWith("vh")){var R=b/this.window.innerHeight*100;b="".concat(R,"vh")}if(f&&"string"==typeof f)if(f.endsWith("%")){S=v/h.height*100;v="".concat(S,"%")}else if(f.endsWith("vw")){E=v/this.window.innerWidth*100;v="".concat(E,"vw")}else if(f.endsWith("vh")){R=v/this.window.innerHeight*100;v="".concat(R,"vh")}var P={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?P.flexBasis=P.width:"column"===this.flexDir&&(P.flexBasis=P.height);var j=this.state.width!==P.width,D=this.state.height!==P.height,z=this.state.flexBasis!==P.flexBasis,M=j||D||z;M&&y(function(){t.setState(P)}),this.props.onResize&&M&&this.props.onResize(e,d,this.resizable,C)}},n.prototype.onMouseUp=function(e){var t,r,n=this.state,o=n.isResizing,i=n.direction;n.original,o&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,this.delta),this.props.size&&this.setState({width:null!==(t=this.props.size.width)&&void 0!==t?t:"auto",height:null!==(r=this.props.size.height)&&void 0!==r?r:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ap(ap({},this.state.backgroundStyle),{cursor:"auto"})}))},n.prototype.updateSize=function(e){var t,r;this.setState({width:null!==(t=e.width)&&void 0!==t?t:"auto",height:null!==(r=e.height)&&void 0!==r?r:"auto"})},n.prototype.renderResizer=function(){var t=this,r=this.props,n=r.enable,o=r.handleStyles,i=r.handleClasses,a=r.handleWrapperStyle,s=r.handleWrapperClass,l=r.handleComponent;if(!n)return null;var c=Object.keys(n).map(function(r){return!1!==n[r]?e(op,{direction:r,onResizeStart:t.onResizeStart,replaceStyles:o&&o[r],className:i&&i[r],children:l&&l[r]?l[r]:null},r):null});return e("div",{className:s,style:a,children:c})},n.prototype.render=function(){var t=this,n=Object.keys(this.props).reduce(function(e,r){return-1!==gp.indexOf(r)||(e[r]=t.props[r]),e},{}),o=ap(ap(ap({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return r(i,ap({style:o,className:this.props.className},n,{ref:function(e){e&&(t.resizable=e)},children:[this.state.isResizing&&e("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},n.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},n}(v),bp=function(e,t){return bp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},bp(e,t)};var wp=function(){return wp=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},wp.apply(this,arguments)};var yp={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},xp=function(e){function t(t){var r=e.call(this,t)||this;return r.resizingPosition={x:0,y:0},r.offsetFromParent={left:0,top:0},r.resizableElement={current:null},r.originalPosition={x:0,y:0},r.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},r.onResizeStart=r.onResizeStart.bind(r),r.onResize=r.onResize.bind(r),r.onResizeStop=r.onResizeStop.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDrag=r.onDrag.bind(r),r.onDragStop=r.onDragStop.bind(r),r.getMaxSizesFromProps=r.getMaxSizesFromProps.bind(r),r}return function(e,t){function r(){this.constructor=e}bp(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.componentDidMount=function(){this.updateOffsetFromParent();var e=this.offsetFromParent,t=e.left,r=e.top,n=this.getDraggablePosition(),o=n.x,i=n.y;this.draggable.setState({x:o-t,y:i-r}),this.forceUpdate()},t.prototype.getDraggablePosition=function(){var e=this.draggable.state;return{x:e.x,y:e.y}},t.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},t.prototype.getParentSize=function(){return this.resizable.getParentSize()},t.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},t.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},t.prototype.getOffsetHeight=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/t;case"body":return document.body.offsetHeight/t;default:return e.offsetHeight}},t.prototype.getOffsetWidth=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/t;case"body":return document.body.offsetWidth/t;default:return e.offsetWidth}},t.prototype.onDragStart=function(e,t){this.props.onDragStart&&this.props.onDragStart(e,t);var r=this.getDraggablePosition();if(this.originalPosition=r,this.props.bounds){var n,o=this.getParent(),i=this.props.scale;if("parent"===this.props.bounds)n=o;else{if("body"===this.props.bounds){var a=o.getBoundingClientRect(),s=a.left,l=a.top,c=document.body.getBoundingClientRect(),d=-(s-o.offsetLeft*i-c.left)/i,u=-(l-o.offsetTop*i-c.top)/i,p=(document.body.offsetWidth-this.resizable.size.width*i)/i+d,f=(document.body.offsetHeight-this.resizable.size.height*i)/i+u;return this.setState({bounds:{top:u,right:p,bottom:f,left:d}})}if("window"===this.props.bounds){if(!this.resizable)return;var h=o.getBoundingClientRect(),g=h.left,m=h.top,v=-(g-o.offsetLeft*i)/i,b=-(m-o.offsetTop*i)/i;p=(window.innerWidth-this.resizable.size.width*i)/i+v,f=(window.innerHeight-this.resizable.size.height*i)/i+b;return this.setState({bounds:{top:b,right:p,bottom:f,left:v}})}"string"==typeof this.props.bounds?n=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(n=this.props.bounds)}if(n instanceof HTMLElement&&o instanceof HTMLElement){var w=n.getBoundingClientRect(),y=w.left,x=w.top,k=o.getBoundingClientRect(),O=(y-k.left)/i,N=x-k.top;if(this.resizable){this.updateOffsetFromParent();var C=this.offsetFromParent;this.setState({bounds:{top:N-C.top,right:O+(n.offsetWidth-this.resizable.size.width)-C.left/i,bottom:N+(n.offsetHeight-this.resizable.size.height)-C.top,left:O-C.left/i}})}}}},t.prototype.onDrag=function(e,t){if(this.props.onDrag){var r=this.offsetFromParent,n=r.left,o=r.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(e,wp(wp({},t),{x:t.x+n,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(e,wp(wp({},t),{x:this.originalPosition.x+n,y:t.y+o,deltaX:0})):void 0:this.props.onDrag(e,wp(wp({},t),{x:t.x+n,y:t.y+o}))}},t.prototype.onDragStop=function(e,t){if(this.props.onDragStop){var r=this.offsetFromParent,n=r.left,o=r.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(e,wp(wp({},t),{x:t.x+n,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(e,wp(wp({},t),{x:this.originalPosition.x+n,y:t.y+o,deltaX:0})):void 0:this.props.onDragStop(e,wp(wp({},t),{x:t.x+n,y:t.y+o}))}},t.prototype.onResizeStart=function(e,t,r){e.stopPropagation(),this.setState({resizing:!0});var n=this.props.scale,o=this.offsetFromParent,i=this.getDraggablePosition();if(this.resizingPosition={x:i.x+o.left,y:i.y+o.top},this.originalPosition=i,this.props.bounds){var a=this.getParent(),s=void 0;"parent"===this.props.bounds?s=a:"body"===this.props.bounds?s=document.body:"window"===this.props.bounds?s=window:"string"==typeof this.props.bounds?s=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(s=this.props.bounds);var l=this.getSelfElement();if(l instanceof Element&&(s instanceof HTMLElement||s===window)&&a instanceof HTMLElement){var c=this.getMaxSizesFromProps(),d=c.maxWidth,u=c.maxHeight,p=this.getParentSize();if(d&&"string"==typeof d)if(d.endsWith("%")){var f=Number(d.replace("%",""))/100;d=p.width*f}else d.endsWith("px")&&(d=Number(d.replace("px","")));if(u&&"string"==typeof u)if(u.endsWith("%")){f=Number(u.replace("%",""))/100;u=p.height*f}else u.endsWith("px")&&(u=Number(u.replace("px","")));var h=l.getBoundingClientRect(),g=h.left,m=h.top,v="window"===this.props.bounds?{left:0,top:0}:s.getBoundingClientRect(),b=v.left,w=v.top,y=this.getOffsetWidth(s),x=this.getOffsetHeight(s),k=t.toLowerCase().endsWith("left"),O=t.toLowerCase().endsWith("right"),N=t.startsWith("top"),C=t.startsWith("bottom");if((k||N)&&this.resizable){var S=(g-b)/n+this.resizable.size.width;this.setState({maxWidth:S>Number(d)?d:S})}if(O||this.props.lockAspectRatio&&!k&&!N){S=y+(b-g)/n;this.setState({maxWidth:S>Number(d)?d:S})}if((N||k)&&this.resizable){S=(m-w)/n+this.resizable.size.height;this.setState({maxHeight:S>Number(u)?u:S})}if(C||this.props.lockAspectRatio&&!N&&!k){S=x+(w-m)/n;this.setState({maxHeight:S>Number(u)?u:S})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(e,t,r)},t.prototype.onResize=function(e,t,r,n){var o=this,i={x:this.originalPosition.x,y:this.originalPosition.y},a=-n.width,s=-n.height;["top","left","topLeft","bottomLeft","topRight"].includes(t)&&("bottomLeft"===t?i.x+=a:("topRight"===t||(i.x+=a),i.y+=s));var l=this.draggable.state;i.x===l.x&&i.y===l.y||y(function(){o.draggable.setState(i)}),this.updateOffsetFromParent();var c=this.offsetFromParent,d=this.getDraggablePosition().x+c.left,u=this.getDraggablePosition().y+c.top;this.resizingPosition={x:d,y:u},this.props.onResize&&this.props.onResize(e,t,r,n,{x:d,y:u})},t.prototype.onResizeStop=function(e,t,r,n){this.setState({resizing:!1});var o=this.getMaxSizesFromProps(),i=o.maxWidth,a=o.maxHeight;this.setState({maxWidth:i,maxHeight:a}),this.props.onResizeStop&&this.props.onResizeStop(e,t,r,n,this.resizingPosition)},t.prototype.updateSize=function(e){this.resizable&&this.resizable.updateSize({width:e.width,height:e.height})},t.prototype.updatePosition=function(e){this.draggable.setState(e)},t.prototype.updateOffsetFromParent=function(){var e=this.props.scale,t=this.getParent(),r=this.getSelfElement();if(!t||null===r)return{top:0,left:0};var n=t.getBoundingClientRect(),o=n.left,i=n.top,a=r.getBoundingClientRect(),s=this.getDraggablePosition(),l=t.scrollLeft,c=t.scrollTop;this.offsetFromParent={left:a.left-o+l-s.x*e,top:a.top-i+c-s.y*e}},t.prototype.render=function(){var e=this,t=this.props,r=t.disableDragging,n=t.style,o=t.dragHandleClassName,i=t.position,s=t.onMouseDown,l=t.onMouseUp,c=t.dragAxis,d=t.dragGrid,u=t.bounds,p=t.enableUserSelectHack,f=t.cancel,h=t.children;t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop;var g=t.resizeHandleStyles,m=t.resizeHandleClasses,v=t.resizeHandleComponent,b=t.enableResizing,w=t.resizeGrid,y=t.resizeHandleWrapperClass,x=t.resizeHandleWrapperStyle,k=t.scale,O=t.allowAnyClick,N=t.dragPositionOffset,C=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick","dragPositionOffset"]),S=this.props.default?wp({},this.props.default):void 0;delete C.default;var E,R=r||o?{cursor:"auto"}:{cursor:"move"},P=wp(wp(wp({},yp),R),n),j=this.offsetFromParent,D=j.left,z=j.top;i&&(E={x:i.x-D,y:i.y-z});var M,T=this.state.resizing?void 0:E,_=this.state.resizing?"both":c;return a(du,{ref:function(t){t&&(e.draggable=t)},handle:o?".".concat(o):void 0,defaultPosition:S,onMouseDown:s,onMouseUp:l,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:_,disabled:r,grid:d,bounds:u?this.state.bounds:void 0,position:T,enableUserSelectHack:p,cancel:f,scale:k,allowAnyClick:O,nodeRef:this.resizableElement,positionOffset:N},a(vp,wp({},C,{ref:function(t){t&&(e.resizable=t,e.resizableElement.current=t.resizable)},defaultSize:S,size:this.props.size,enable:"boolean"==typeof b?(M=b,{bottom:M,bottomLeft:M,bottomRight:M,left:M,right:M,top:M,topLeft:M,topRight:M}):b,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:P,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:w,handleWrapperClass:y,handleWrapperStyle:x,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:g,handleClasses:m,handleComponent:v,scale:this.props.scale}),h))},t.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},t}(v);const kp={...n},Op=kp.useInsertionEffect||(e=>e());var Np="undefined"!=typeof document?g:p;let Cp=!1,Sp=0;const Ep=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Sp++;const Rp=kp.useId||function(){const[e,t]=n.useState(()=>Cp?Ep():void 0);return Np(()=>{null==e&&t(Ep())},[]),n.useEffect(()=>{Cp=!0},[]),e};const Pp=n.createContext(null),jp=n.createContext(null);function Dp(e){const{open:t=!1,onOpenChange:r,elements:o}=e,i=Rp(),a=n.useRef({}),[s]=n.useState(()=>function(){const e=new Map;return{emit(t,r){var n;null==(n=e.get(t))||n.forEach(e=>e(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter(e=>e!==r))||[])}}}()),l=null!=((null==(c=n.useContext(Pp))?void 0:c.id)||null);var c;const[d,u]=n.useState(o.reference),p=function(e){const t=n.useRef(()=>{});return Op(()=>{t.current=e}),n.useCallback(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)},[])}((e,t,n)=>{a.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:n,nested:l}),null==r||r(e,t,n)}),f=n.useMemo(()=>({setPositionReference:u}),[]),h=n.useMemo(()=>({reference:d||o.reference||null,floating:o.floating||null,domReference:o.reference}),[d,o.reference,o.floating]);return n.useMemo(()=>({dataRef:a,open:t,onOpenChange:p,elements:h,events:s,floatingId:i,refs:f}),[t,p,h,s,i,f])}function zp(e){void 0===e&&(e={});const{nodeId:t}=e,r=Dp({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||r,i=o.elements,[a,s]=n.useState(null),[l,c]=n.useState(null),d=(null==i?void 0:i.domReference)||a,u=n.useRef(null),p=n.useContext(jp);Np(()=>{d&&(u.current=d)},[d]);const f=is({...e,elements:{...i,...l&&{reference:l}}}),h=n.useCallback(e=>{const t=aa(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),g=n.useCallback(e=>{(aa(e)||null===e)&&(u.current=e,s(e)),(aa(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!aa(e))&&f.refs.setReference(e)},[f.refs]),m=n.useMemo(()=>({...f.refs,setReference:g,setPositionReference:h,domReference:u}),[f.refs,g,h]),v=n.useMemo(()=>({...f.elements,domReference:d}),[f.elements,d]),b=n.useMemo(()=>({...f,...o,refs:m,elements:v,nodeId:t}),[f,m,v,t,o]);return Np(()=>{o.dataRef.current.floatingContext=b;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=b)}),n.useMemo(()=>({...f,context:b,refs:m,elements:v}),[f,m,v,b])}var Mp=Symbol.for("react.lazy"),Tp=n[" use ".trim().toString()];function _p(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===Mp&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function Ap(e){const t=n.forwardRef((e,t)=>{let{children:r,...o}=e;if(_p(r)&&"function"==typeof Tp&&(r=Tp(r._payload)),n.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,r.props);return r.type!==n.Fragment&&(i.ref=t?J(t,e):e),n.cloneElement(r,i)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ip=Symbol("radix.slottable");function Lp(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Ip}var Fp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const o=function(t){const r=Ap(t),o=n.forwardRef((t,o)=>{let{children:i,...a}=t;_p(i)&&"function"==typeof Tp&&(i=Tp(i._payload));const s=n.Children.toArray(i),l=s.find(Lp);if(l){const t=l.props.children,i=s.map(e=>e===l?n.Children.count(t)>1?n.Children.only(null):n.isValidElement(t)?t.props.children:null:e);return e(r,{...a,ref:o,children:n.isValidElement(t)?n.cloneElement(t,void 0,i):null})}return e(r,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${r}`),i=n.forwardRef((t,n)=>{const{asChild:i,...a}=t,s=i?o:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:n})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{}),Hp=n.forwardRef((t,r)=>e(Fp.label,{...t,ref:r,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));Hp.displayName="Label";var Bp=Hp;const Wp=Lo("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Up=n.forwardRef((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e(Bp,Object.assign({ref:r,className:Xn(Wp(),n)},o))});function Vp(e){const t=n.useRef({value:e,previous:e});return n.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Up.displayName=Bp.displayName;var $p=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Xp=n.forwardRef((t,r)=>e(ce.span,{...t,ref:r,style:{...$p,...t.style}}));Xp.displayName="VisuallyHidden";var qp=Xp,Yp=[" ","Enter","ArrowUp","ArrowDown"],Kp=[" ","Enter"],Gp="Select",[Zp,Jp,Qp]=oe(Gp),[ef,tf]=K(Gp,[Qp,ws]),rf=ws(),[nf,of]=ef(Gp),[af,sf]=ef(Gp),lf=t=>{const{__scopeSelect:o,children:i,open:a,defaultOpen:s,onOpenChange:l,value:c,defaultValue:d,onValueChange:u,dir:p,name:f,autoComplete:h,disabled:g,required:m,form:v}=t,b=rf(o),[w,y]=n.useState(null),[x,k]=n.useState(null),[O,N]=n.useState(!1),C=ze(p),[S,E]=le({prop:a,defaultProp:s??!1,onChange:l,caller:Gp}),[R,P]=le({prop:c,defaultProp:d,onChange:u,caller:Gp}),j=n.useRef(null),D=!w||(v||!!w.closest("form")),[z,M]=n.useState(new Set),T=Array.from(z).map(e=>e.props.value).join(";");return e(_s,{...b,children:r(nf,{required:m,scope:o,trigger:w,onTriggerChange:y,valueNode:x,onValueNodeChange:k,valueNodeHasChildren:O,onValueNodeHasChildrenChange:N,contentId:ge(),value:R,onValueChange:P,open:S,onOpenChange:E,dir:C,triggerPointerDownPosRef:j,disabled:g,children:[e(Zp.Provider,{scope:o,children:e(af,{scope:t.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{M(t=>{const r=new Set(t);return r.delete(e),r})},[]),children:i})}),D?r(qf,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:h,value:R,onChange:e=>P(e.target.value),disabled:g,form:v,children:[void 0===R?e("option",{value:""}):null,Array.from(z)]},T):null]})})};lf.displayName=Gp;var cf="SelectTrigger",df=n.forwardRef((t,r)=>{const{__scopeSelect:o,disabled:i=!1,...a}=t,s=rf(o),l=of(cf,o),c=l.disabled||i,d=Q(r,l.onTriggerChange),u=Jp(o),p=n.useRef("touch"),[f,h,g]=Kf(e=>{const t=u().filter(e=>!e.disabled),r=t.find(e=>e.value===l.value),n=Gf(t,e,r);void 0!==n&&l.onValueChange(n.value)}),m=e=>{c||(l.onOpenChange(!0),g()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return e(As,{asChild:!0,...s,children:e(ce.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Yf(l.value)?"":void 0,...a,ref:d,onClick:ie(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&m(e)}),onPointerDown:ie(a.onPointerDown,e=>{p.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(m(e),e.preventDefault())}),onKeyDown:ie(a.onKeyDown,e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||Yp.includes(e.key)&&(m(),e.preventDefault())})})})});df.displayName=cf;var uf="SelectValue",pf=n.forwardRef((r,n)=>{const{__scopeSelect:o,className:i,style:a,children:s,placeholder:l="",...c}=r,d=of(uf,o),{onValueNodeHasChildrenChange:u}=d,p=void 0!==s,f=Q(n,d.onValueNodeChange);return ae(()=>{u(p)},[u,p]),e(ce.span,{...c,ref:f,style:{pointerEvents:"none"},children:Yf(d.value)?e(t,{children:l}):s})});pf.displayName=uf;var ff=n.forwardRef((t,r)=>{const{__scopeSelect:n,children:o,...i}=t;return e(ce.span,{"aria-hidden":!0,...i,ref:r,children:o||"▼"})});ff.displayName="SelectIcon";var hf=t=>e(Fs,{asChild:!0,...t});hf.displayName="SelectPortal";var gf="SelectContent",mf=n.forwardRef((t,r)=>{const o=of(gf,t.__scopeSelect),[i,a]=n.useState();if(ae(()=>{a(new DocumentFragment)},[]),!o.open){const r=i;return r?b.createPortal(e(bf,{scope:t.__scopeSelect,children:e(Zp.Slot,{scope:t.__scopeSelect,children:e("div",{children:t.children})})}),r):null}return e(xf,{...t,ref:r})});mf.displayName=gf;var vf=10,[bf,wf]=ef(gf),yf=ee("SelectContent.RemoveScroll"),xf=n.forwardRef((t,r)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:d,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:m,hideWhenDetached:v,avoidCollisions:b,...w}=t,y=of(gf,o),[x,k]=n.useState(null),[O,N]=n.useState(null),C=Q(r,e=>k(e)),[S,E]=n.useState(null),[R,P]=n.useState(null),j=Jp(o),[D,z]=n.useState(!1),M=n.useRef(!1);n.useEffect(()=>{if(x)return Xs(x)},[x]),pi();const T=n.useCallback(e=>{const[t,...r]=j().map(e=>e.ref.current),[n]=r.slice(-1),o=document.activeElement;for(const r of e){if(r===o)return;if(r?.scrollIntoView({block:"nearest"}),r===t&&O&&(O.scrollTop=0),r===n&&O&&(O.scrollTop=O.scrollHeight),r?.focus(),document.activeElement!==o)return}},[j,O]),_=n.useCallback(()=>T([S,x]),[T,S,x]);n.useEffect(()=>{D&&_()},[D,_]);const{onOpenChange:A,triggerPointerDownPosRef:I}=y;n.useEffect(()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():x.contains(r.target)||A(!1),document.removeEventListener("pointermove",t),I.current=null};return null!==I.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[x,A,I]),n.useEffect(()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[A]);const[L,F]=Kf(e=>{const t=j().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=Gf(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),H=n.useCallback((e,t,r)=>{const n=!M.current&&!r;(void 0!==y.value&&y.value===t||n)&&(E(e),n&&(M.current=!0))},[y.value]),B=n.useCallback(()=>x?.focus(),[x]),W=n.useCallback((e,t,r)=>{const n=!M.current&&!r;(void 0!==y.value&&y.value===t||n)&&P(e)},[y.value]),U="popper"===i?Of:kf,V=U===Of?{side:c,sideOffset:d,align:u,alignOffset:p,arrowPadding:f,collisionBoundary:h,collisionPadding:g,sticky:m,hideWhenDetached:v,avoidCollisions:b}:{};return e(bf,{scope:o,content:x,viewport:O,onViewportChange:N,itemRefCallback:H,selectedItem:S,onItemLeave:B,itemTextRefCallback:W,focusSelectedItem:_,selectedItemText:R,position:i,isPositioned:D,searchRef:L,children:e(zl,{as:yf,allowPinchZoom:!0,children:e(vi,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ie(a,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:e(li,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:e(U,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault(),...w,...V,onPlaced:()=>z(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:ie(w.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=j().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>T(t)),e.preventDefault()}})})})})})})});xf.displayName="SelectContentImpl";var kf=n.forwardRef((t,r)=>{const{__scopeSelect:o,onPlaced:i,...a}=t,s=of(gf,o),l=wf(gf,o),[c,d]=n.useState(null),[u,p]=n.useState(null),f=Q(r,e=>p(e)),h=Jp(o),g=n.useRef(!1),m=n.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:y}=l,x=n.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&v&&b&&w){const e=s.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=s.valueNode.getBoundingClientRect(),n=w.getBoundingClientRect();if("rtl"!==s.dir){const o=n.left-t.left,i=r.left-o,a=e.left-i,s=e.width+a,l=Math.max(s,t.width),d=window.innerWidth-vf,u=Zc(i,[vf,Math.max(vf,d-l)]);c.style.minWidth=s+"px",c.style.left=u+"px"}else{const o=t.right-n.right,i=window.innerWidth-r.right-o,a=window.innerWidth-e.right-i,s=e.width+a,l=Math.max(s,t.width),d=window.innerWidth-vf,u=Zc(i,[vf,Math.max(vf,d-l)]);c.style.minWidth=s+"px",c.style.right=u+"px"}const o=h(),a=window.innerHeight-2*vf,l=v.scrollHeight,d=window.getComputedStyle(u),p=parseInt(d.borderTopWidth,10),f=parseInt(d.paddingTop,10),m=parseInt(d.borderBottomWidth,10),y=p+f+l+parseInt(d.paddingBottom,10)+m,x=Math.min(5*b.offsetHeight,y),k=window.getComputedStyle(v),O=parseInt(k.paddingTop,10),N=parseInt(k.paddingBottom,10),C=e.top+e.height/2-vf,S=a-C,E=b.offsetHeight/2,R=p+f+(b.offsetTop+E),P=y-R;if(R<=C){const e=o.length>0&&b===o[o.length-1].ref.current;c.style.bottom="0px";const t=u.clientHeight-v.offsetTop-v.offsetHeight,r=R+Math.max(S,E+(e?N:0)+t+m);c.style.height=r+"px"}else{const e=o.length>0&&b===o[0].ref.current;c.style.top="0px";const t=Math.max(C,p+v.offsetTop+(e?O:0)+E)+P;c.style.height=t+"px",v.scrollTop=R-C+v.offsetTop}c.style.margin=`${vf}px 0`,c.style.minHeight=x+"px",c.style.maxHeight=a+"px",i?.(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,c,u,v,b,w,s.dir,i]);ae(()=>x(),[x]);const[k,O]=n.useState();ae(()=>{u&&O(window.getComputedStyle(u).zIndex)},[u]);const N=n.useCallback(e=>{e&&!0===m.current&&(x(),y?.(),m.current=!1)},[x,y]);return e(Nf,{scope:o,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:N,children:e("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:e(ce.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});kf.displayName="SelectItemAlignedPosition";var Of=n.forwardRef((t,r)=>{const{__scopeSelect:n,align:o="start",collisionPadding:i=vf,...a}=t,s=rf(n);return e(Is,{...s,...a,ref:r,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Of.displayName="SelectPopperPosition";var[Nf,Cf]=ef(gf,{}),Sf="SelectViewport",Ef=n.forwardRef((o,i)=>{const{__scopeSelect:a,nonce:s,...l}=o,c=wf(Sf,a),d=Cf(Sf,a),u=Q(i,c.onViewportChange),p=n.useRef(0);return r(t,{children:[e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),e(Zp.Slot,{scope:a,children:e(ce.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:ie(l.onScroll,e=>{const t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=d;if(n?.current&&r){const e=Math.abs(p.current-t.scrollTop);if(e>0){const n=window.innerHeight-2*vf,o=parseFloat(r.style.minHeight),i=parseFloat(r.style.height),a=Math.max(o,i);if(a<n){const o=a+e,i=Math.min(n,o),s=o-i;r.style.height=i+"px","0px"===r.style.bottom&&(t.scrollTop=s>0?s:0,r.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});Ef.displayName=Sf;var Rf="SelectGroup",[Pf,jf]=ef(Rf),Df=n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t,i=ge();return e(Pf,{scope:n,id:i,children:e(ce.div,{role:"group","aria-labelledby":i,...o,ref:r})})});Df.displayName=Rf;var zf="SelectLabel";n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t,i=jf(zf,n);return e(ce.div,{id:i.id,...o,ref:r})}).displayName=zf;var Mf="SelectItem",[Tf,_f]=ef(Mf),Af=n.forwardRef((t,r)=>{const{__scopeSelect:o,value:i,disabled:a=!1,textValue:s,...l}=t,c=of(Mf,o),d=wf(Mf,o),u=c.value===i,[p,f]=n.useState(s??""),[h,g]=n.useState(!1),m=Q(r,e=>d.itemRefCallback?.(e,i,a)),v=ge(),b=n.useRef("touch"),w=()=>{a||(c.onValueChange(i),c.onOpenChange(!1))};if(""===i)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return e(Tf,{scope:o,value:i,disabled:a,textId:v,isSelected:u,onItemTextChange:n.useCallback(e=>{f(t=>t||(e?.textContent??"").trim())},[]),children:e(Zp.ItemSlot,{scope:o,value:i,disabled:a,textValue:p,children:e(ce.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:m,onFocus:ie(l.onFocus,()=>g(!0)),onBlur:ie(l.onBlur,()=>g(!1)),onClick:ie(l.onClick,()=>{"mouse"!==b.current&&w()}),onPointerUp:ie(l.onPointerUp,()=>{"mouse"===b.current&&w()}),onPointerDown:ie(l.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:ie(l.onPointerMove,e=>{b.current=e.pointerType,a?d.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ie(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:ie(l.onKeyDown,e=>{""!==d.searchRef?.current&&" "===e.key||(Kp.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});Af.displayName=Mf;var If="SelectItemText",Lf=n.forwardRef((o,i)=>{const{__scopeSelect:a,className:s,style:l,...c}=o,d=of(If,a),u=wf(If,a),p=_f(If,a),f=sf(If,a),[h,g]=n.useState(null),m=Q(i,e=>g(e),p.onItemTextChange,e=>u.itemTextRefCallback?.(e,p.value,p.disabled)),v=h?.textContent,w=n.useMemo(()=>e("option",{value:p.value,disabled:p.disabled,children:v},p.value),[p.disabled,p.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:x}=f;return ae(()=>(y(w),()=>x(w)),[y,x,w]),r(t,{children:[e(ce.span,{id:p.textId,...c,ref:m}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren?b.createPortal(c.children,d.valueNode):null]})});Lf.displayName=If;var Ff="SelectItemIndicator",Hf=n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t;return _f(Ff,n).isSelected?e(ce.span,{"aria-hidden":!0,...o,ref:r}):null});Hf.displayName=Ff;var Bf="SelectScrollUpButton",Wf=n.forwardRef((t,r)=>{const o=wf(Bf,t.__scopeSelect),i=Cf(Bf,t.__scopeSelect),[a,s]=n.useState(!1),l=Q(r,i.onScrollButtonChange);return ae(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?e($f,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Wf.displayName=Bf;var Uf="SelectScrollDownButton",Vf=n.forwardRef((t,r)=>{const o=wf(Uf,t.__scopeSelect),i=Cf(Uf,t.__scopeSelect),[a,s]=n.useState(!1),l=Q(r,i.onScrollButtonChange);return ae(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;s(r)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?e($f,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Vf.displayName=Uf;var $f=n.forwardRef((t,r)=>{const{__scopeSelect:o,onAutoScroll:i,...a}=t,s=wf("SelectScrollButton",o),l=n.useRef(null),c=Jp(o),d=n.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return n.useEffect(()=>()=>d(),[d]),ae(()=>{const e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),e(ce.div,{"aria-hidden":!0,...a,ref:r,style:{flexShrink:0,...a.style},onPointerDown:ie(a.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(i,50))}),onPointerMove:ie(a.onPointerMove,()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(i,50))}),onPointerLeave:ie(a.onPointerLeave,()=>{d()})})});n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t;return e(ce.div,{"aria-hidden":!0,...o,ref:r})}).displayName="SelectSeparator";var Xf="SelectArrow";n.forwardRef((t,r)=>{const{__scopeSelect:n,...o}=t,i=rf(n),a=of(Xf,n),s=wf(Xf,n);return a.open&&"popper"===s.position?e(Ls,{...i,...o,ref:r}):null}).displayName=Xf;var qf=n.forwardRef(({__scopeSelect:t,value:r,...o},i)=>{const a=n.useRef(null),s=Q(i,a),l=Vp(r);return n.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[l,r]),e(ce.select,{...o,style:{...$p,...o.style},ref:s,defaultValue:r})});function Yf(e){return""===e||void 0===e}function Kf(e){const t=ri(e),r=n.useRef(""),o=n.useRef(0),i=n.useCallback(e=>{const n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),a=n.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,a]}function Gf(e,t,r){const n=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let i=(a=e,s=Math.max(o,0),a.map((e,t)=>a[(s+t)%a.length]));var a,s;1===n.length&&(i=i.filter(e=>e!==r));const l=i.find(e=>e.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}qf.displayName="SelectBubbleInput";var Zf=lf,Jf=df,Qf=pf,eh=ff,th=hf,rh=mf,nh=Ef,oh=Df,ih=Af,ah=Lf,sh=Hf,lh=Wf,ch=Vf;const dh=t=>{var r=q(t,[]);return e(Zf,Object.assign({"data-slot":"select"},r))},uh=t=>{var r=q(t,[]);return e(oh,Object.assign({"data-slot":"select-group"},r))},ph=t=>{var r=q(t,[]);return e(Qf,Object.assign({"data-slot":"select-value"},r))},fh=t=>{var{className:n,size:o="default",children:i}=t,a=q(t,["className","size","children"]);return r(Jf,Object.assign({"data-slot":"select-trigger","data-size":o,className:Xn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n)},a,{children:[i,e(eh,Object.assign({asChild:!0},{children:e(Et,{className:"size-4 opacity-50"})}))]}))},hh=t=>{var{className:r}=t,n=q(t,["className"]);return e(lh,Object.assign({"data-slot":"select-scroll-up-button",className:Xn("flex cursor-default items-center justify-center py-1",r)},n,{children:e(Pt,{className:"size-4"})}))},gh=t=>{var{className:r}=t,n=q(t,["className"]);return e(ch,Object.assign({"data-slot":"select-scroll-down-button",className:Xn("flex cursor-default items-center justify-center py-1",r)},n,{children:e(Et,{className:"size-4"})}))},mh=t=>{var{className:n,children:o,position:i="item-aligned",align:a="center"}=t,s=q(t,["className","children","position","align"]);return e(th,{children:r(rh,Object.assign({"data-slot":"select-content",className:Xn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:i,align:a},s,{children:[e(hh,{}),e(nh,Object.assign({className:Xn("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")},{children:o})),e(gh,{})]}))})},vh=t=>{var{className:n,children:o}=t,i=q(t,["className","children"]);return r(ih,Object.assign({"data-slot":"select-item",className:Xn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n)},i,{children:[e("span",Object.assign({"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center"},{children:e(sh,{children:e(St,{className:"size-4"})})})),e(ah,{children:o})]}))};var bh=["PageUp","PageDown"],wh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],yh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},xh="Slider",[kh,Oh,Nh]=oe(xh),[Ch,Sh]=K(xh,[Nh]),[Eh,Rh]=Ch(xh),Ph=n.forwardRef((t,r)=>{const{name:o,min:i=0,max:a=100,step:s=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:u=[i],value:p,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:g=!1,form:m,...v}=t,b=n.useRef(new Set),w=n.useRef(0),y="horizontal"===l?zh:Mh,[x=[],k]=le({prop:p,defaultProp:u,onChange:e=>{const t=[...b.current];t[w.current]?.focus(),f(e)}}),O=n.useRef(x);function N(e,t,{commit:r}={commit:!1}){const n=function(e){return(String(e).split(".")[1]||"").length}(s),o=function(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}(Math.round((e-i)/s)*s+i,n),l=Zc(o,[i,a]);k((e=[])=>{const n=function(e=[],t,r){const n=[...e];return n[r]=t,n.sort((e,t)=>e-t)}(e,l,t);if(function(e,t){if(t>0){const r=function(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}(e);return Math.min(...r)>=t}return!0}(n,d*s)){w.current=n.indexOf(l);const t=String(n)!==String(e);return t&&r&&h(n),t?n:e}return e})}return e(Eh,{scope:t.__scopeSlider,name:o,disabled:c,min:i,max:a,valueIndexToChangeRef:w,thumbs:b.current,values:x,orientation:l,form:m,children:e(kh.Provider,{scope:t.__scopeSlider,children:e(kh.Slot,{scope:t.__scopeSlider,children:e(y,{"aria-disabled":c,"data-disabled":c?"":void 0,...v,ref:r,onPointerDown:ie(v.onPointerDown,()=>{c||(O.current=x)}),min:i,max:a,inverted:g,onSlideStart:c?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const r=e.map(e=>Math.abs(e-t)),n=Math.min(...r);return r.indexOf(n)}(x,e);N(e,t)},onSlideMove:c?void 0:function(e){N(e,w.current)},onSlideEnd:c?void 0:function(){const e=O.current[w.current];x[w.current]!==e&&h(x)},onHomeKeyDown:()=>!c&&N(i,0,{commit:!0}),onEndKeyDown:()=>!c&&N(a,x.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){const r=bh.includes(e.key)||e.shiftKey&&wh.includes(e.key)?10:1,n=w.current;N(x[n]+s*r*t,n,{commit:!0})}}})})})})});Ph.displayName=xh;var[jh,Dh]=Ch(xh,{startEdge:"left",endEdge:"right",size:"width",direction:1}),zh=n.forwardRef((t,r)=>{const{min:o,max:i,dir:a,inverted:s,onSlideStart:l,onSlideMove:c,onSlideEnd:d,onStepKeyDown:u,...p}=t,[f,h]=n.useState(null),g=Q(r,e=>h(e)),m=n.useRef(void 0),v=ze(a),b="ltr"===v,w=b&&!s||!b&&s;function y(e){const t=m.current||f.getBoundingClientRect(),r=Vh([0,t.width],w?[o,i]:[i,o]);return m.current=t,r(e-t.left)}return e(jh,{scope:t.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:e(Th,{dir:v,"data-orientation":"horizontal",...p,ref:g,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=y(e.clientX);l?.(t)},onSlideMove:e=>{const t=y(e.clientX);c?.(t)},onSlideEnd:()=>{m.current=void 0,d?.()},onStepKeyDown:e=>{const t=yh[w?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),Mh=n.forwardRef((t,r)=>{const{min:o,max:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:d,...u}=t,p=n.useRef(null),f=Q(r,p),h=n.useRef(void 0),g=!a;function m(e){const t=h.current||p.current.getBoundingClientRect(),r=Vh([0,t.height],g?[i,o]:[o,i]);return h.current=t,r(e-t.top)}return e(jh,{scope:t.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:e(Th,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=m(e.clientY);s?.(t)},onSlideMove:e=>{const t=m(e.clientY);l?.(t)},onSlideEnd:()=>{h.current=void 0,c?.()},onStepKeyDown:e=>{const t=yh[g?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),Th=n.forwardRef((t,r)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:c,...d}=t,u=Rh(xh,n);return e(ce.span,{...d,ref:r,onKeyDown:ie(t.onKeyDown,e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):bh.concat(wh).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:ie(t.onPointerDown,e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():o(e)}),onPointerMove:ie(t.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:ie(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),_h="SliderTrack",Ah=n.forwardRef((t,r)=>{const{__scopeSlider:n,...o}=t,i=Rh(_h,n);return e(ce.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...o,ref:r})});Ah.displayName=_h;var Ih="SliderRange",Lh=n.forwardRef((t,r)=>{const{__scopeSlider:o,...i}=t,a=Rh(Ih,o),s=Dh(Ih,o),l=Q(r,n.useRef(null)),c=a.values.length,d=a.values.map(e=>Uh(e,a.min,a.max)),u=c>1?Math.min(...d):0,p=100-Math.max(...d);return e(ce.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...i,ref:l,style:{...t.style,[s.startEdge]:u+"%",[s.endEdge]:p+"%"}})});Lh.displayName=Ih;var Fh="SliderThumb",Hh=n.forwardRef((t,r)=>{const o=Oh(t.__scopeSlider),[i,a]=n.useState(null),s=Q(r,e=>a(e)),l=n.useMemo(()=>i?o().findIndex(e=>e.ref.current===i):-1,[o,i]);return e(Bh,{...t,ref:s,index:l})}),Bh=n.forwardRef((t,o)=>{const{__scopeSlider:i,index:a,name:s,...l}=t,c=Rh(Fh,i),d=Dh(Fh,i),[u,p]=n.useState(null),f=Q(o,e=>p(e)),h=!u||(c.form||!!u.closest("form")),g=ms(u),m=c.values[a],v=void 0===m?0:Uh(m,c.min,c.max),b=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(a,c.values.length),w=g?.[d.size],y=w?function(e,t,r){const n=e/2,o=Vh([0,50],[0,n]);return(n-o(t)*r)*r}(w,v,d.direction):0;return n.useEffect(()=>{if(u)return c.thumbs.add(u),()=>{c.thumbs.delete(u)}},[u,c.thumbs]),r("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${v}% + ${y}px)`},children:[e(kh.ItemSlot,{scope:t.__scopeSlider,children:e(ce.span,{role:"slider","aria-label":t["aria-label"]||b,"aria-valuemin":c.min,"aria-valuenow":m,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...l,ref:f,style:void 0===m?{display:"none"}:t.style,onFocus:ie(t.onFocus,()=>{c.valueIndexToChangeRef.current=a})})}),h&&e(Wh,{name:s??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:m},a)]})});Hh.displayName=Fh;var Wh=n.forwardRef(({__scopeSlider:t,value:r,...o},i)=>{const a=n.useRef(null),s=Q(a,i),l=Vp(r);return n.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("input",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[l,r]),e(ce.input,{style:{display:"none"},...o,ref:s,defaultValue:r})});function Uh(e,t,r){return Zc(100/(r-t)*(e-t),[0,100])}function Vh(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}Wh.displayName="RadioBubbleInput";var $h=Ph,Xh=Ah,qh=Lh,Yh=Hh;const Kh=t=>{var{className:o,defaultValue:i,value:a,min:s=0,max:l=100}=t,c=q(t,["className","defaultValue","value","min","max"]);const d=n.useMemo(()=>Array.isArray(a)?a:Array.isArray(i)?i:[s,l],[a,i,s,l]);return r($h,Object.assign({"data-slot":"slider",defaultValue:i,value:a,min:s,max:l,className:Xn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",o)},c,{children:[e(Xh,Object.assign({"data-slot":"slider-track",className:Xn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5")},{children:e(qh,{"data-slot":"slider-range",className:Xn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})})),Array.from({length:d.length},(t,r)=>e(Yh,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},r))]}))};var[Gh,Zh]=K("Tooltip",[ws]),Jh=ws(),Qh="TooltipProvider",eg=700,tg="tooltip.open",[rg,ng]=Gh(Qh),og=t=>{const{__scopeTooltip:r,delayDuration:o=eg,skipDelayDuration:i=300,disableHoverableContent:a=!1,children:s}=t,l=n.useRef(!0),c=n.useRef(!1),d=n.useRef(0);return n.useEffect(()=>{const e=d.current;return()=>window.clearTimeout(e)},[]),e(rg,{scope:r,isOpenDelayedRef:l,delayDuration:o,onOpen:n.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:n.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,i)},[i]),isPointerInTransitRef:c,onPointerInTransitChange:n.useCallback(e=>{c.current=e},[]),disableHoverableContent:a,children:s})};og.displayName=Qh;var ig="Tooltip",[ag,sg]=Gh(ig),lg=t=>{const{__scopeTooltip:r,children:o,open:i,defaultOpen:a,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,d=ng(ig,t.__scopeTooltip),u=Jh(r),[p,f]=n.useState(null),h=ge(),g=n.useRef(0),m=l??d.disableHoverableContent,v=c??d.delayDuration,b=n.useRef(!1),[w,y]=le({prop:i,defaultProp:a??!1,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(tg))):d.onClose(),s?.(e)},caller:ig}),x=n.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),k=n.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b.current=!1,y(!0)},[y]),O=n.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),N=n.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,y(!0),g.current=0},v)},[v,y]);return n.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),e(_s,{...u,children:e(ag,{scope:r,contentId:h,open:w,stateAttribute:x,trigger:p,onTriggerChange:f,onTriggerEnter:n.useCallback(()=>{d.isOpenDelayedRef.current?N():k()},[d.isOpenDelayedRef,N,k]),onTriggerLeave:n.useCallback(()=>{m?O():(window.clearTimeout(g.current),g.current=0)},[O,m]),onOpen:k,onClose:O,disableHoverableContent:m,children:o})})};lg.displayName=ig;var cg="TooltipTrigger",dg=n.forwardRef((t,r)=>{const{__scopeTooltip:o,...i}=t,a=sg(cg,o),s=ng(cg,o),l=Jh(o),c=Q(r,n.useRef(null),a.onTriggerChange),d=n.useRef(!1),u=n.useRef(!1),p=n.useCallback(()=>d.current=!1,[]);return n.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),e(As,{asChild:!0,...l,children:e(ce.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:ie(t.onPointerMove,e=>{"touch"!==e.pointerType&&(u.current||s.isPointerInTransitRef.current||(a.onTriggerEnter(),u.current=!0))}),onPointerLeave:ie(t.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:ie(t.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:ie(t.onFocus,()=>{d.current||a.onOpen()}),onBlur:ie(t.onBlur,a.onClose),onClick:ie(t.onClick,a.onClose)})})});dg.displayName=cg;var ug="TooltipPortal",[pg,fg]=Gh(ug,{forceMount:void 0}),hg=t=>{const{__scopeTooltip:r,forceMount:n,children:o,container:i}=t,a=sg(ug,r);return e(pg,{scope:r,forceMount:n,children:e(ue,{present:n||a.open,children:e(Fs,{asChild:!0,container:i,children:o})})})};hg.displayName=ug;var gg="TooltipContent",mg=n.forwardRef((t,r)=>{const n=fg(gg,t.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...a}=t,s=sg(gg,t.__scopeTooltip);return e(ue,{present:o||s.open,children:s.disableHoverableContent?e(xg,{side:i,...a,ref:r}):e(vg,{side:i,...a,ref:r})})}),vg=n.forwardRef((t,r)=>{const o=sg(gg,t.__scopeTooltip),i=ng(gg,t.__scopeTooltip),a=n.useRef(null),s=Q(r,a),[l,c]=n.useState(null),{trigger:d,onClose:u}=o,p=a.current,{onPointerInTransitChange:f}=i,h=n.useCallback(()=>{c(null),f(!1)},[f]),g=n.useCallback((e,t)=>{const r=e.currentTarget,n={x:e.clientX,y:e.clientY},o=function(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(n,function(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}(n,r.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const r=[];for(let t=e.length-1;t>=0;t--){const n=e[t];for(;r.length>=2;){const e=r[r.length-1],t=r[r.length-2];if(!((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x)))break;r.pop()}r.push(n)}return r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}(t)}([...o,...function(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}(t.getBoundingClientRect())]);c(i),f(!0)},[f]);return n.useEffect(()=>()=>h(),[h]),n.useEffect(()=>{if(d&&p){const e=e=>g(e,p),t=e=>g(e,d);return d.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{d.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}},[d,p,g,h]),n.useEffect(()=>{if(l){const e=e=>{const t=e.target,r={x:e.clientX,y:e.clientY},n=d?.contains(t)||p?.contains(t),o=!function(e,t){const{x:r,y:n}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],s=t[i],l=a.x,c=a.y,d=s.x,u=s.y;c>n!=u>n&&r<(d-l)*(n-c)/(u-c)+l&&(o=!o)}return o}(r,l);n?h():o&&(h(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[d,p,l,u,h]),e(xg,{...t,ref:s})}),[bg,wg]=Gh(ig,{isInside:!1}),yg=function(r){const n=({children:r})=>e(t,{children:r});return n.displayName=`${r}.Slottable`,n.__radixId=re,n}("TooltipContent"),xg=n.forwardRef((t,o)=>{const{__scopeTooltip:i,children:a,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:c,...d}=t,u=sg(gg,i),p=Jh(i),{onClose:f}=u;return n.useEffect(()=>(document.addEventListener(tg,f),()=>document.removeEventListener(tg,f)),[f]),n.useEffect(()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[u.trigger,f]),e(li,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:r(Is,{"data-state":u.stateAttribute,...p,...d,ref:o,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e(yg,{children:a}),e(bg,{scope:i,isInside:!0,children:e(qp,{id:u.contentId,role:"tooltip",children:s||a})})]})})});mg.displayName=gg;var kg="TooltipArrow",Og=n.forwardRef((t,r)=>{const{__scopeTooltip:n,...o}=t,i=Jh(n);return wg(kg,n).isInside?null:e(Ls,{...i,...o,ref:r})});Og.displayName=kg;var Ng=og,Cg=lg,Sg=dg,Eg=hg,Rg=mg,Pg=Og;const jg=t=>{var{delayDuration:r=0}=t,n=q(t,["delayDuration"]);return e(Ng,Object.assign({"data-slot":"tooltip-provider",delayDuration:r},n))},Dg=t=>{var r=q(t,[]);return e(jg,{children:e(Cg,Object.assign({"data-slot":"tooltip"},r))})},zg=t=>{var r=q(t,[]);return e(Sg,Object.assign({"data-slot":"tooltip-trigger"},r))},Mg=t=>{var{className:n,sideOffset:o=0,children:i}=t,a=q(t,["className","sideOffset","children"]);return e(Eg,{children:r(Rg,Object.assign({"data-slot":"tooltip-content",sideOffset:o,className:Xn("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",n)},a,{children:[i,e(Pg,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]}))})},Tg={contain:{label:"Contain",description:"Fit within bounds"},cover:{label:"Cover",description:"Fill and crop"},fill:{label:"Fill",description:"Stretch to fit"}},_g=({fit:t,alt:n,borderRadius:o,onUpdate:i})=>{var a,s,l,c,d,p,f,h;const[g,m]=u(n),[v,b]=u(!1);return r(nc,Object.assign({open:v,onOpenChange:b},{children:[e(jg,{children:r(Dg,{children:[e(zg,Object.assign({asChild:!0},{children:e(oc,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:v?"secondary":"ghost",size:"icon",className:"h-7 w-7"},{children:e(qt,{className:"h-4 w-4"})}))}))})),e(Mg,{children:"Settings"})]})}),e(ic,Object.assign({className:"w-80 p-3",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:r("div",Object.assign({className:"space-y-3"},{children:[r("div",{children:[e("h4",Object.assign({className:"font-semibold"},{children:"Image settings"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Customize how the image appears"}))]}),e(Kd,{}),r("div",Object.assign({className:"space-y-1"},{children:[e(Up,Object.assign({htmlFor:"alt-text",className:"text-sm font-medium"},{children:"Alt text"})),e(ti,{id:"alt-text",value:g,onChange:e=>m(e.target.value),onBlur:()=>i({alt:g}),placeholder:"Describe this image...",className:"h-9"}),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Important for accessibility and SEO"}))]})),r("div",Object.assign({className:"space-y-1"},{children:[e(Up,Object.assign({htmlFor:"object-fit",className:"text-sm font-medium"},{children:"How image fits"})),r(dh,Object.assign({value:t,onValueChange:e=>i({fit:e})},{children:[e(fh,Object.assign({id:"object-fit",className:"h-9 w-full"},{children:e(ph,Object.assign({placeholder:"Select how image fits"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(a=Tg[t])||void 0===a?void 0:a.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(s=Tg[t])||void 0===s?void 0:s.description}))]}))}))})),e(mh,{children:r(uh,{children:[e(vh,Object.assign({value:"contain",className:"cursor-pointer"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-4 w-3 rounded bg-primary"})})),r("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(l=Tg.contain)||void 0===l?void 0:l.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(c=Tg.contain)||void 0===c?void 0:c.description}))]}))]}))})),e(vh,Object.assign({value:"cover",className:"cursor-pointer"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-8 w-6 rounded bg-primary"})})),r("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(d=Tg.cover)||void 0===d?void 0:d.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(p=Tg.cover)||void 0===p?void 0:p.description}))]}))]}))})),e(vh,Object.assign({value:"fill",className:"cursor-pointer"},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-8 w-8 rounded bg-primary"})})),r("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(f=Tg.fill)||void 0===f?void 0:f.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(h=Tg.fill)||void 0===h?void 0:h.description}))]}))]}))}))]})})]}))]})),r("div",Object.assign({className:"space-y-1"},{children:[r("div",Object.assign({className:"flex items-center justify-between"},{children:[e(Up,Object.assign({className:"text-sm font-medium"},{children:"Border radius"})),r("span",Object.assign({className:"text-sm text-muted-foreground"},{children:[o,"px"]}))]})),e(Kh,{value:[o],onValueChange:([e])=>i({borderRadius:e}),max:50,step:1,className:"w-full"})]}))]}))}))]}))},Ag=({referenceRef:t,elementProps:n,onUpdate:o,onReplace:i,onDelete:a,onDownload:s,onCopy:l})=>{var c,d;const[f,h]=u(!1),{refs:g,floatingStyles:m}=zp({placement:"top-end",strategy:"fixed",middleware:[ss(8),ds({fallbackPlacements:["bottom","top"],padding:10}),ls({padding:10})],whileElementsMounted:$a});return p(()=>{requestAnimationFrame(()=>{h(!0)})},[]),p(()=>{const e=t.current;e&&g.setReference(e)},[t,g]),e("div",Object.assign({ref:g.setFloating,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),className:Xn("pointer-events-auto","flex items-center gap-1 rounded-lg border bg-background/95 backdrop-blur-sm p-1 shadow-lg","transition-all duration-200 ease-out",f?"opacity-100 translate-y-0":"opacity-0 translate-y-2"),style:m},{children:r(jg,Object.assign({delayDuration:0},{children:[r("div",Object.assign({className:"flex items-center gap-0.5 border-r pr-1"},{children:[r(Dg,{children:[e(zg,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:"left"===n.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"left"})},{children:e(yt,{className:"h-4 w-4"})}))})),e(Mg,{children:"Align left"})]}),r(Dg,{children:[e(zg,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:"center"===n.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"center"})},{children:e(wt,{className:"h-4 w-4"})}))})),e(Mg,{children:"Align center"})]}),r(Dg,{children:[e(zg,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:"right"===n.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"right"})},{children:e(xt,{className:"h-4 w-4"})}))})),e(Mg,{children:"Align right"})]})]})),r(Dg,{children:[e(zg,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:i},{children:e($t,{className:"h-4 w-4"})}))})),e(Mg,{children:"Replace"})]}),r(Dg,{children:[e(zg,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:s},{children:e(Dt,{className:"h-4 w-4"})}))})),e(Mg,{children:"Download"})]}),r(Dg,{children:[e(zg,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:l},{children:e(jt,{className:"h-4 w-4"})}))})),e(Mg,{children:"Copy"})]}),e(Kd,{orientation:"vertical",className:"h-4"}),e(_g,{fit:null!==(c=n.fit)&&void 0!==c?c:"contain",alt:n.alt||"",borderRadius:null!==(d=n.borderRadius)&&void 0!==d?d:0,onUpdate:o}),r(Dg,{children:[e(zg,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:a},{children:e(Kt,{className:"h-4 w-4"})}))})),e(Mg,{children:"Delete"})]})]}))}))},Ig=({blockId:t,elementId:n,attributes:o,children:i,elementProps:a,onUpdate:s,onDelete:l,onReplace:c,pluginOptions:f})=>{var h;const[g,m]=u(a.sizes),{isElementSelected:v}=C(),b=S({blockId:t}),w=v&&b,y=d(null),k=x(),[O,N]=u(()=>{var e;const t=(null===(e=k.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||650,r=null==f?void 0:f.maxSizes;return{maxWidth:(null==r?void 0:r.maxWidth)?"number"==typeof r.maxWidth?r.maxWidth:parseInt(String(r.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==r?void 0:r.maxHeight)?"number"==typeof r.maxHeight?r.maxHeight:parseInt(String(r.maxHeight).replace(/[^\d]/g,""),10):550}});p(()=>{const e=()=>{var e;const t=(null===(e=k.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||650,r=null==f?void 0:f.maxSizes;N({maxWidth:(null==r?void 0:r.maxWidth)?"number"==typeof r.maxWidth?r.maxWidth:parseInt(String(r.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==r?void 0:r.maxHeight)?"number"==typeof r.maxHeight?r.maxHeight:parseInt(String(r.maxHeight).replace(/[^\d]/g,""),10):550})};e();const t=new ResizeObserver(e);return k.refElement&&t.observe(k.refElement),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}},[k,f]);const E=(e,t)=>{const r=e=>"number"==typeof e?e:parseInt(String(e).replace(/[^\d]/g,""),10),n=r(e.width),o=r(e.height),i=r(t.width),a=r(t.height);if(n<=i&&o<=a)return{width:n,height:o};const s=n/i,l=o/a,c=Math.max(s,l),d=Math.round(n/c),u=Math.round(o/c);return{width:Math.min(d,i),height:Math.min(u,a)}},R={left:"justify-start",center:"justify-center",right:"justify-end"}[null!==(h=a.alignment)&&void 0!==h?h:"center"];return r("div",Object.assign({},o,{className:Xn("group/image relative transition-all w-full flex",R)},{children:[r("div",Object.assign({className:"relative",contentEditable:!1},{children:[e(xp,Object.assign({ref:e=>{(null==e?void 0:e.resizableElement)&&e.resizableElement instanceof HTMLElement&&(y.current=e.resizableElement)},style:{position:"relative",outline:w?".125rem solid rgba(0, 0, 0, 0)":"none",outlineColor:w?"hsl(var(--primary))":"none"},size:{width:g.width,height:g.height},onResize:(e,t,r)=>{const n=parseInt(r.style.width,10),o=parseInt(r.style.height,10),i=E({width:n,height:o},{width:O.maxWidth,height:O.maxHeight});m(i)},onResizeStop:(e,t,r)=>{const n=parseInt(r.style.width,10),o=parseInt(r.style.height,10),i=E({width:n,height:o},{width:O.maxWidth,height:O.maxHeight});s({sizes:i})},lockAspectRatio:!0,minWidth:100,minHeight:100,maxWidth:O.maxWidth,maxHeight:O.maxHeight,enableResizing:!!w&&{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!0,right:!0,top:!1,topLeft:!1,topRight:!1},disableDragging:!0,resizeHandleStyles:{left:{width:"auto",height:"40px",left:"-5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"},right:{width:"auto",height:"40px",right:"-5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"}},resizeHandleComponent:{left:e("div",{className:"h-10 w-2 rounded-full border border-primary bg-primary shadow-sm"}),right:e("div",{className:"h-10 w-2 rounded-full border border-primary bg-primary shadow-sm"})},className:Xn("rounded-sm")},{children:e("img",{src:a.src,alt:a.alt||"",className:"w-full h-full transition-all duration-200",style:{objectFit:a.fit,borderRadius:`${a.borderRadius}px`},draggable:!1})})),w&&e(Ag,{referenceRef:y,elementProps:a,onUpdate:s,onReplace:c,onDelete:l,onDownload:()=>Y(void 0,void 0,void 0,function*(){try{const e=yield fetch(a.src),t=yield e.blob(),r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=`image-${Date.now()}.jpg`,n.click(),URL.revokeObjectURL(r)}catch(e){}}),onCopy:()=>Y(void 0,void 0,void 0,function*(){try{const e=yield fetch(a.src),t=yield e.blob();navigator.clipboard&&ClipboardItem?yield navigator.clipboard.write([new ClipboardItem({[t.type]:t})]):ei(a.src)}catch(e){ei(a.src)}})})]})),i]}))},Lg={image:{render:({element:t,attributes:r,children:n,blockId:o})=>{const i=x(),a=E("Image"),{upload:s,progress:l,loading:d}=_(a.upload),{deleteImage:u}=A(a.delete),{preview:p,generatePreview:f,clearPreview:h}=I(),g=c(e=>{O.updateElement(i,{blockId:o,type:"image",props:Object.assign(Object.assign({},t.props),e)})},[i,o,t.props]),m=c(()=>{u(t);const e=k.getBlockSlate(i,{id:o});if(!e)return;const r=O.getElementPath(i,{blockId:o,element:t});if(!r)return;const n=r?xr.parent(e,r):void 0;n&&lr.isElement(n[0])&&!xr.isEditor(n[0])?O.deleteElement(i,{blockId:o,type:"image",path:r}):k.deleteBlock(i,{blockId:o,focus:!0})},[i,o,t,u]),v=c(()=>{O.updateElement(i,{blockId:o,type:"image",props:Object.assign(Object.assign({},t.props),{src:null,alt:null})})},[i,o,t.props]),b=c(e=>Y(void 0,void 0,void 0,function*(){var t;const r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!r)return;f(r);const n=yield s(r);g({id:n.id||n.fileId,src:n.url,alt:r.name,sizes:{width:n.width,height:n.height}}),h()}),[s,g,f,h]);return t.props.src?e(Ig,Object.assign({blockId:o,elementId:t.id,onUpdate:g,onDelete:m,attributes:r,onReplace:v,elementProps:t.props,pluginOptions:a},{children:n})):e(iu,Object.assign({onUpload:b,preview:p,progress:l,loading:d,onInsertUrl:()=>{},onInsertFromUnsplash:()=>{},onInsertFromAI:()=>Y(void 0,void 0,void 0,function*(){}),attributes:r},{children:n}))}}},Fg=({textInputRef:t,urlInputRef:n,editedText:o,editedUrl:i,onChangeText:a,onChangeUrl:s,onKeyDown:l,saveEdit:c,cancelEdit:d,deleteLink:u})=>r("div",Object.assign({className:"p-3 space-y-3"},{children:[r("div",Object.assign({className:"space-y-1.5"},{children:[e(Up,Object.assign({htmlFor:"link-text",className:"text-xs"},{children:"Link text"})),e(ti,{id:"link-text",ref:t,value:o,onChange:a,placeholder:"Link text...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),r("div",Object.assign({className:"space-y-1.5"},{children:[e(Up,Object.assign({htmlFor:"link-url",className:"text-xs"},{children:"URL"})),e(ti,{id:"link-url",ref:n,value:i,onChange:s,onKeyDown:l,placeholder:"Enter URL...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),r("div",Object.assign({className:"flex justify-between items-center"},{children:[r("div",Object.assign({className:"flex items-center gap-2"},{children:[e(Ho,Object.assign({size:"sm",variant:"default",className:"h-7 text-xs",onClick:c,disabled:0===i.length||0===o.length},{children:"Save"})),e(Ho,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:d},{children:"Cancel"}))]})),e(Ho,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs text-destructive hover:text-destructive hover:bg-destructive/10",onClick:u},{children:e(Kt,{className:"h-3.5 w-3.5"})}))]}))]})),Hg=({element:t,openLink:n,copyUrl:o,openEdit:i,copied:a})=>{var s;return e("div",Object.assign({className:"px-2 py-1"},{children:r("div",Object.assign({className:"flex items-center gap-1"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:e("div",Object.assign({className:"text-sm truncate text-foreground"},{children:null!==(s=t.props.url)&&void 0!==s?s:"No URL"}))})),e("div",{className:"h-4 w-px bg-border"}),e(Ho,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:n,disabled:!t.props.url,title:"Open link"},{children:e(_t,{className:"h-3.5 w-3.5"})})),e(Ho,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:o,disabled:!t.props.url,title:a?"Copied!":"Copy URL"},{children:e(a?St:jt,{className:"h-3.5 w-3.5"})})),e(Ho,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:i,title:"Edit URL"},{children:e(Ut,{className:"h-3.5 w-3.5"})}))]}))}))};var Bg,Wg="HoverCard",[Ug,Vg]=K(Wg,[ws]),$g=ws(),[Xg,qg]=Ug(Wg),Yg=t=>{const{__scopeHoverCard:r,children:o,open:i,defaultOpen:a,onOpenChange:s,openDelay:l=700,closeDelay:c=300}=t,d=$g(r),u=n.useRef(0),p=n.useRef(0),f=n.useRef(!1),h=n.useRef(!1),[g,m]=le({prop:i,defaultProp:a??!1,onChange:s,caller:Wg}),v=n.useCallback(()=>{clearTimeout(p.current),u.current=window.setTimeout(()=>m(!0),l)},[l,m]),b=n.useCallback(()=>{clearTimeout(u.current),f.current||h.current||(p.current=window.setTimeout(()=>m(!1),c))},[c,m]),w=n.useCallback(()=>m(!1),[m]);return n.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(p.current)},[]),e(Xg,{scope:r,open:g,onOpenChange:m,onOpen:v,onClose:b,onDismiss:w,hasSelectionRef:f,isPointerDownOnContentRef:h,children:e(_s,{...d,children:o})})};Yg.displayName=Wg;var Kg="HoverCardTrigger",Gg=n.forwardRef((t,r)=>{const{__scopeHoverCard:n,...o}=t,i=qg(Kg,n),a=$g(n);return e(As,{asChild:!0,...a,children:e(ce.a,{"data-state":i.open?"open":"closed",...o,ref:r,onPointerEnter:ie(t.onPointerEnter,om(i.onOpen)),onPointerLeave:ie(t.onPointerLeave,om(i.onClose)),onFocus:ie(t.onFocus,i.onOpen),onBlur:ie(t.onBlur,i.onClose),onTouchStart:ie(t.onTouchStart,e=>e.preventDefault())})})});Gg.displayName=Kg;var Zg="HoverCardPortal",[Jg,Qg]=Ug(Zg,{forceMount:void 0}),em=t=>{const{__scopeHoverCard:r,forceMount:n,children:o,container:i}=t,a=qg(Zg,r);return e(Jg,{scope:r,forceMount:n,children:e(ue,{present:n||a.open,children:e(Fs,{asChild:!0,container:i,children:o})})})};em.displayName=Zg;var tm="HoverCardContent",rm=n.forwardRef((t,r)=>{const n=Qg(tm,t.__scopeHoverCard),{forceMount:o=n.forceMount,...i}=t,a=qg(tm,t.__scopeHoverCard);return e(ue,{present:o||a.open,children:e(nm,{"data-state":a.open?"open":"closed",...i,onPointerEnter:ie(t.onPointerEnter,om(a.onOpen)),onPointerLeave:ie(t.onPointerLeave,om(a.onClose)),ref:r})})});rm.displayName=tm;var nm=n.forwardRef((t,r)=>{const{__scopeHoverCard:o,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,...c}=t,d=qg(tm,o),u=$g(o),p=n.useRef(null),f=Q(r,p),[h,g]=n.useState(!1);return n.useEffect(()=>{if(h){const e=document.body;return Bg=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=Bg,e.style.webkitUserSelect=Bg}}},[h]),n.useEffect(()=>{if(p.current){const e=()=>{g(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{if(p.current){(function(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t})(p.current).forEach(e=>e.setAttribute("tabindex","-1"))}}),e(li,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:ie(s,e=>{e.preventDefault()}),onDismiss:d.onDismiss,children:e(Is,{...u,...c,onPointerDown:ie(c.onPointerDown,e=>{e.currentTarget.contains(e.target)&&g(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:f,style:{...c.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})});function om(e){return t=>"touch"===t.pointerType?void 0:e()}n.forwardRef((t,r)=>{const{__scopeHoverCard:n,...o}=t,i=$g(n);return e(Ls,{...i,...o,ref:r})}).displayName="HoverCardArrow";var im=Yg,am=Gg,sm=em,lm=rm;const cm=t=>{var r=q(t,[]);return e(im,Object.assign({"data-slot":"hover-card"},r))},dm=t=>{var r=q(t,[]);return e(am,Object.assign({"data-slot":"hover-card-trigger"},r))},um=t=>{var{className:r,align:n="center",sideOffset:o=4}=t,i=q(t,["className","align","sideOffset"]);return e(sm,Object.assign({"data-slot":"hover-card-portal"},{children:e(lm,Object.assign({"data-slot":"hover-card-content",align:n,sideOffset:o,className:Xn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",r)},i))}))},pm=e=>{var t;if(Dr.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const r=e.children;return null!==(t=null==r?void 0:r.map(pm).join(""))&&void 0!==t?t:""}return""},fm={link:{render:t=>{var n;const{attributes:o,children:i,element:a,blockId:s}=t,l=x(),c=pm(a),[f,h]=u(!1),[g,m]=u(null!==(n=a.props.url)&&void 0!==n?n:""),[v,b]=u(c),[w,y]=u(!1),k=d(null),N=d(null);p(()=>{var e;m(null!==(e=a.props.url)&&void 0!==e?e:""),b(c)},[a.props.url,c]),p(()=>{f&&k.current&&(k.current.focus(),k.current.select())},[f]);return r(cm,Object.assign({openDelay:100,closeDelay:100},{children:[e(dm,Object.assign({asChild:!0},{children:e("a",Object.assign({},o,{href:a.props.url||void 0,target:a.props.target,rel:a.props.rel,title:a.props.title||void 0,className:"text-primary font-medium underline underline-offset-4 cursor-pointer hover:text-primary/80 transition-colors",contentEditable:!1,onClick:e=>{f&&e.preventDefault()}},{children:i}))})),e(um,Object.assign({className:"w-80 p-0",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:f?e(Fg,{textInputRef:N,urlInputRef:k,editedText:v,editedUrl:g,onChangeText:e=>b(e.target.value),onChangeUrl:e=>m(e.target.value),onKeyDown:e=>{var t;"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),O.updateElement(l,{blockId:s,type:"link",text:v,props:{url:g}}),h(!1)):"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),m(null!==(t=a.props.url)&&void 0!==t?t:""),b(c),h(!1))},saveEdit:e=>{e.preventDefault(),e.stopPropagation();const t=O.getElementPath(l,{blockId:s,element:a});t&&(O.updateElement(l,{blockId:s,type:"link",text:v,path:t,props:{url:g}}),h(!1))},cancelEdit:e=>{var t;e.preventDefault(),e.stopPropagation(),m(null!==(t=a.props.url)&&void 0!==t?t:""),b(c),h(!1)},deleteLink:e=>{e.preventDefault(),e.stopPropagation();const t=O.getElementPath(l,{blockId:s,element:a});t&&(O.deleteElement(l,{mode:"unwrap",type:"link",path:t,blockId:s}),h(!1))}}):e(Hg,{element:a,openLink:e=>{var t;e.preventDefault(),e.stopPropagation(),a.props.url&&window.open(a.props.url,null!==(t=a.props.target)&&void 0!==t?t:"_blank",a.props.rel)},copyUrl:e=>{if(e.preventDefault(),e.stopPropagation(),a.props.url){ei(a.props.url)&&(y(!0),setTimeout(()=>y(!1),1500))}},openEdit:e=>{0!==g.length&&(e.preventDefault(),e.stopPropagation(),h(!0))},copied:w})}))]}))}}},hm={"numbered-list":{render:t=>{const{attributes:n,children:o,blockId:i}=t,a=R(i),s=L(a);return r("div",Object.assign({},n,{className:"my-0 ml-6 list-decimal [&>li]:mt-2"},{children:[r("span",Object.assign({contentEditable:!1},{children:[s,"."]})),e("span",Object.assign({},n,{className:"pl-2"},{children:o}))]}))}}},gm={BulletedList:{"bulleted-list":{render:t=>{const{attributes:r,children:n}=t;return e("ul",Object.assign({},r,{className:"my-0 ml-6 list-disc [&>li]:mt-2"},{children:e("li",Object.assign({},r,{className:"pl-2"},{children:n}))}))}}},NumberedList:hm,TodoList:{"todo-list":{render:t=>{const{attributes:n,children:o,element:i,blockId:a}=t,s=i.props.checked,l=x();return e("div",Object.assign({},n,{className:"m-0 mt-2 ml-6 list-none"},{children:r("div",Object.assign({className:"flex items-start gap-2 pl-2"},{children:[e("button",Object.assign({type:"button",contentEditable:!1,onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),O.updateElement(l,{blockId:a,type:"todo-list",props:{checked:!s}})},className:Xn("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-sm border-2 transition-colors",s?"bg-primary border-primary text-primary-foreground":"border-input bg-background"),"aria-label":s?"Mark as unchecked":"Mark as checked"},{children:s&&e(St,{className:"h-3 w-3"})})),e("span",Object.assign({className:Xn("flex-1",s&&"text-muted-foreground line-through")},{children:o}))]}))}))}}}},mm={paragraph:{render:t=>{const{attributes:r,children:n}=t;return e("p",Object.assign({},r,{className:"leading-7 [&:not(:first-child)]:mt-6"},{children:n}))}}};var vm=["Enter"," "],bm=["ArrowUp","PageDown","End"],wm=["ArrowDown","PageUp","Home",...bm],ym={ltr:[...vm,"ArrowRight"],rtl:[...vm,"ArrowLeft"]},xm={ltr:["ArrowLeft"],rtl:["ArrowRight"]},km="Menu",[Om,Nm,Cm]=oe(km),[Sm,Em]=K(km,[Cm,ws,vc]),Rm=ws(),Pm=vc(),[jm,Dm]=Sm(km),[zm,Mm]=Sm(km),Tm=t=>{const{__scopeMenu:r,open:o=!1,children:i,dir:a,onOpenChange:s,modal:l=!0}=t,c=Rm(r),[d,u]=n.useState(null),p=n.useRef(!1),f=ri(s),h=ze(a);return n.useEffect(()=>{const e=()=>{p.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),e(_s,{...c,children:e(jm,{scope:r,open:o,onOpenChange:f,content:d,onContentChange:u,children:e(zm,{scope:r,onClose:n.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:h,modal:l,children:i})})})};Tm.displayName=km;var _m=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t,i=Rm(n);return e(As,{...i,...o,ref:r})});_m.displayName="MenuAnchor";var Am="MenuPortal",[Im,Lm]=Sm(Am,{forceMount:void 0}),Fm=t=>{const{__scopeMenu:r,forceMount:n,children:o,container:i}=t,a=Dm(Am,r);return e(Im,{scope:r,forceMount:n,children:e(ue,{present:n||a.open,children:e(Fs,{asChild:!0,container:i,children:o})})})};Fm.displayName=Am;var Hm="MenuContent",[Bm,Wm]=Sm(Hm),Um=n.forwardRef((t,r)=>{const n=Lm(Hm,t.__scopeMenu),{forceMount:o=n.forceMount,...i}=t,a=Dm(Hm,t.__scopeMenu),s=Mm(Hm,t.__scopeMenu);return e(Om.Provider,{scope:t.__scopeMenu,children:e(ue,{present:o||a.open,children:e(Om.Slot,{scope:t.__scopeMenu,children:s.modal?e(Vm,{...i,ref:r}):e($m,{...i,ref:r})})})})}),Vm=n.forwardRef((t,r)=>{const o=Dm(Hm,t.__scopeMenu),i=n.useRef(null),a=Q(r,i);return n.useEffect(()=>{const e=i.current;if(e)return Xs(e)},[]),e(qm,{...t,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:ie(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),$m=n.forwardRef((t,r)=>{const n=Dm(Hm,t.__scopeMenu);return e(qm,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Xm=ee("MenuContent.ScrollLock"),qm=n.forwardRef((t,r)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:g,disableOutsideScroll:m,...v}=t,b=Dm(Hm,o),w=Mm(Hm,o),y=Rm(o),x=Pm(o),k=Nm(o),[O,N]=n.useState(null),C=n.useRef(null),S=Q(r,C,b.onContentChange),E=n.useRef(0),R=n.useRef(""),P=n.useRef(0),j=n.useRef(null),D=n.useRef("right"),z=n.useRef(0),M=m?zl:n.Fragment,T=m?{as:Xm,allowPinchZoom:!0}:void 0,_=e=>{const t=R.current+e,r=k().filter(e=>!e.disabled),n=document.activeElement,o=r.find(e=>e.ref.current===n)?.textValue,i=function(e,t,r){const n=t.length>1&&Array.from(t).every(e=>e===t[0]),o=n?t[0]:t,i=r?e.indexOf(r):-1;let a=(s=e,l=Math.max(i,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===o.length&&(a=a.filter(e=>e!==r));const c=a.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return c!==r?c:void 0}(r.map(e=>e.textValue),t,o),a=r.find(e=>e.textValue===i)?.ref.current;!function e(t){R.current=t,window.clearTimeout(E.current),""!==t&&(E.current=window.setTimeout(()=>e(""),1e3))}(t),a&&setTimeout(()=>a.focus())};n.useEffect(()=>()=>window.clearTimeout(E.current),[]),pi();const A=n.useCallback(e=>D.current===j.current?.side&&function(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return function(e,t){const{x:r,y:n}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],s=t[i],l=a.x,c=a.y,d=s.x,u=s.y;c>n!=u>n&&r<(d-l)*(n-c)/(u-c)+l&&(o=!o)}return o}(r,t)}(e,j.current?.area),[]);return e(Bm,{scope:o,searchRef:R,onItemEnter:n.useCallback(e=>{A(e)&&e.preventDefault()},[A]),onItemLeave:n.useCallback(e=>{A(e)||(C.current?.focus(),N(null))},[A]),onTriggerLeave:n.useCallback(e=>{A(e)&&e.preventDefault()},[A]),pointerGraceTimerRef:P,onPointerGraceIntentChange:n.useCallback(e=>{j.current=e},[]),children:e(M,{...T,children:e(vi,{asChild:!0,trapped:a,onMountAutoFocus:ie(s,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:e(li,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:h,onDismiss:g,children:e(Sc,{asChild:!0,...x,dir:w.dir,orientation:"vertical",loop:i,currentTabStopId:O,onCurrentTabStopIdChange:N,onEntryFocus:ie(d,e=>{w.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:e(Is,{role:"menu","aria-orientation":"vertical","data-state":xv(b.open),"data-radix-menu-content":"",dir:w.dir,...y,...v,ref:S,style:{outline:"none",...v.style},onKeyDown:ie(v.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!r&&n&&_(e.key));const o=C.current;if(e.target!==o)return;if(!wm.includes(e.key))return;e.preventDefault();const i=k().filter(e=>!e.disabled).map(e=>e.ref.current);bm.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const r of e){if(r===t)return;if(r.focus(),document.activeElement!==t)return}}(i)}),onBlur:ie(t.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),R.current="")}),onPointerMove:ie(t.onPointerMove,Nv(e=>{const t=e.target,r=z.current!==e.clientX;if(e.currentTarget.contains(t)&&r){const t=e.clientX>z.current?"right":"left";D.current=t,z.current=e.clientX}}))})})})})})})});Um.displayName=Hm;var Ym=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t;return e(ce.div,{role:"group",...o,ref:r})});Ym.displayName="MenuGroup";var Km=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t;return e(ce.div,{...o,ref:r})});Km.displayName="MenuLabel";var Gm="MenuItem",Zm="menu.itemSelect",Jm=n.forwardRef((t,r)=>{const{disabled:o=!1,onSelect:i,...a}=t,s=n.useRef(null),l=Mm(Gm,t.__scopeMenu),c=Wm(Gm,t.__scopeMenu),d=Q(r,s),u=n.useRef(!1);return e(Qm,{...a,ref:d,disabled:o,onClick:ie(t.onClick,()=>{const e=s.current;if(!o&&e){const t=new CustomEvent(Zm,{bubbles:!0,cancelable:!0});e.addEventListener(Zm,e=>i?.(e),{once:!0}),de(e,t),t.defaultPrevented?u.current=!1:l.onClose()}}),onPointerDown:e=>{t.onPointerDown?.(e),u.current=!0},onPointerUp:ie(t.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:ie(t.onKeyDown,e=>{const t=""!==c.searchRef.current;o||t&&" "===e.key||vm.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Jm.displayName=Gm;var Qm=n.forwardRef((t,r)=>{const{__scopeMenu:o,disabled:i=!1,textValue:a,...s}=t,l=Wm(Gm,o),c=Pm(o),d=n.useRef(null),u=Q(r,d),[p,f]=n.useState(!1),[h,g]=n.useState("");return n.useEffect(()=>{const e=d.current;e&&g((e.textContent??"").trim())},[s.children]),e(Om.ItemSlot,{scope:o,disabled:i,textValue:a??h,children:e(Ec,{asChild:!0,...c,focusable:!i,children:e(ce.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:u,onPointerMove:ie(t.onPointerMove,Nv(e=>{if(i)l.onItemLeave(e);else if(l.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:ie(t.onPointerLeave,Nv(e=>l.onItemLeave(e))),onFocus:ie(t.onFocus,()=>f(!0)),onBlur:ie(t.onBlur,()=>f(!1))})})})}),ev=n.forwardRef((t,r)=>{const{checked:n=!1,onCheckedChange:o,...i}=t;return e(lv,{scope:t.__scopeMenu,checked:n,children:e(Jm,{role:"menuitemcheckbox","aria-checked":kv(n)?"mixed":n,...i,ref:r,"data-state":Ov(n),onSelect:ie(i.onSelect,()=>o?.(!!kv(n)||!n),{checkForDefaultPrevented:!1})})})});ev.displayName="MenuCheckboxItem";var tv="MenuRadioGroup",[rv,nv]=Sm(tv,{value:void 0,onValueChange:()=>{}}),ov=n.forwardRef((t,r)=>{const{value:n,onValueChange:o,...i}=t,a=ri(o);return e(rv,{scope:t.__scopeMenu,value:n,onValueChange:a,children:e(Ym,{...i,ref:r})})});ov.displayName=tv;var iv="MenuRadioItem",av=n.forwardRef((t,r)=>{const{value:n,...o}=t,i=nv(iv,t.__scopeMenu),a=n===i.value;return e(lv,{scope:t.__scopeMenu,checked:a,children:e(Jm,{role:"menuitemradio","aria-checked":a,...o,ref:r,"data-state":Ov(a),onSelect:ie(o.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});av.displayName=iv;var sv="MenuItemIndicator",[lv,cv]=Sm(sv,{checked:!1}),dv=n.forwardRef((t,r)=>{const{__scopeMenu:n,forceMount:o,...i}=t,a=cv(sv,n);return e(ue,{present:o||kv(a.checked)||!0===a.checked,children:e(ce.span,{...i,ref:r,"data-state":Ov(a.checked)})})});dv.displayName=sv;var uv=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t;return e(ce.div,{role:"separator","aria-orientation":"horizontal",...o,ref:r})});uv.displayName="MenuSeparator";var pv=n.forwardRef((t,r)=>{const{__scopeMenu:n,...o}=t,i=Rm(n);return e(Ls,{...i,...o,ref:r})});pv.displayName="MenuArrow";var fv="MenuSub",[hv,gv]=Sm(fv),mv=t=>{const{__scopeMenu:r,children:o,open:i=!1,onOpenChange:a}=t,s=Dm(fv,r),l=Rm(r),[c,d]=n.useState(null),[u,p]=n.useState(null),f=ri(a);return n.useEffect(()=>(!1===s.open&&f(!1),()=>f(!1)),[s.open,f]),e(_s,{...l,children:e(jm,{scope:r,open:i,onOpenChange:f,content:u,onContentChange:p,children:e(hv,{scope:r,contentId:ge(),triggerId:ge(),trigger:c,onTriggerChange:d,children:o})})})};mv.displayName=fv;var vv="MenuSubTrigger",bv=n.forwardRef((t,r)=>{const o=Dm(vv,t.__scopeMenu),i=Mm(vv,t.__scopeMenu),a=gv(vv,t.__scopeMenu),s=Wm(vv,t.__scopeMenu),l=n.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,u={__scopeMenu:t.__scopeMenu},p=n.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return n.useEffect(()=>p,[p]),n.useEffect(()=>{const e=c.current;return()=>{window.clearTimeout(e),d(null)}},[c,d]),e(_m,{asChild:!0,...u,children:e(Qm,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":a.contentId,"data-state":xv(o.open),...t,ref:J(r,a.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:ie(t.onPointerMove,Nv(e=>{s.onItemEnter(e),e.defaultPrevented||t.disabled||o.open||l.current||(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{o.onOpenChange(!0),p()},100))})),onPointerLeave:ie(t.onPointerLeave,Nv(e=>{p();const t=o.content?.getBoundingClientRect();if(t){const r=o.content?.dataset.side,n="right"===r,i=n?-5:5,a=t[n?"left":"right"],l=t[n?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:a,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:a,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:ie(t.onKeyDown,e=>{const r=""!==s.searchRef.current;t.disabled||r&&" "===e.key||ym[i.dir].includes(e.key)&&(o.onOpenChange(!0),o.content?.focus(),e.preventDefault())})})})});bv.displayName=vv;var wv="MenuSubContent",yv=n.forwardRef((t,r)=>{const o=Lm(Hm,t.__scopeMenu),{forceMount:i=o.forceMount,...a}=t,s=Dm(Hm,t.__scopeMenu),l=Mm(Hm,t.__scopeMenu),c=gv(wv,t.__scopeMenu),d=n.useRef(null),u=Q(r,d);return e(Om.Provider,{scope:t.__scopeMenu,children:e(ue,{present:i||s.open,children:e(Om.Slot,{scope:t.__scopeMenu,children:e(qm,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:"start",side:"rtl"===l.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:ie(t.onFocusOutside,e=>{e.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:ie(t.onEscapeKeyDown,e=>{l.onClose(),e.preventDefault()}),onKeyDown:ie(t.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),r=xm[l.dir].includes(e.key);t&&r&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function xv(e){return e?"open":"closed"}function kv(e){return"indeterminate"===e}function Ov(e){return kv(e)?"indeterminate":e?"checked":"unchecked"}function Nv(e){return t=>"mouse"===t.pointerType?e(t):void 0}yv.displayName=wv;var Cv=Tm,Sv=_m,Ev=Fm,Rv=Um,Pv=Ym,jv=Km,Dv=Jm,zv=ev,Mv=ov,Tv=av,_v=dv,Av=uv,Iv=pv,Lv=mv,Fv=bv,Hv=yv,Bv="DropdownMenu",[Wv,Uv]=K(Bv,[Em]),Vv=Em(),[$v,Xv]=Wv(Bv),qv=t=>{const{__scopeDropdownMenu:r,children:o,dir:i,open:a,defaultOpen:s,onOpenChange:l,modal:c=!0}=t,d=Vv(r),u=n.useRef(null),[p,f]=le({prop:a,defaultProp:s??!1,onChange:l,caller:Bv});return e($v,{scope:r,triggerId:ge(),triggerRef:u,contentId:ge(),open:p,onOpenChange:f,onOpenToggle:n.useCallback(()=>f(e=>!e),[f]),modal:c,children:e(Cv,{...d,open:p,onOpenChange:f,dir:i,modal:c,children:o})})};qv.displayName=Bv;var Yv="DropdownMenuTrigger",Kv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...i}=t,a=Xv(Yv,n),s=Vv(n);return e(Sv,{asChild:!0,...s,children:e(ce.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:J(r,a.triggerRef),onPointerDown:ie(t.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:ie(t.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});Kv.displayName=Yv;var Gv=t=>{const{__scopeDropdownMenu:r,...n}=t,o=Vv(r);return e(Ev,{...o,...n})};Gv.displayName="DropdownMenuPortal";var Zv="DropdownMenuContent",Jv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:o,...i}=t,a=Xv(Zv,o),s=Vv(o),l=n.useRef(!1);return e(Rv,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...i,ref:r,onCloseAutoFocus:ie(t.onCloseAutoFocus,e=>{l.current||a.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:ie(t.onInteractOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;a.modal&&!n||(l.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jv.displayName=Zv;n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Vv(n);return e(Pv,{...i,...o,ref:r})}).displayName="DropdownMenuGroup";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Vv(n);return e(jv,{...i,...o,ref:r})}).displayName="DropdownMenuLabel";var Qv=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Vv(n);return e(Dv,{...i,...o,ref:r})});Qv.displayName="DropdownMenuItem";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Vv(n);return e(zv,{...i,...o,ref:r})}).displayName="DropdownMenuCheckboxItem";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Vv(n);return e(Mv,{...i,...o,ref:r})}).displayName="DropdownMenuRadioGroup";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Vv(n);return e(Tv,{...i,...o,ref:r})}).displayName="DropdownMenuRadioItem";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Vv(n);return e(_v,{...i,...o,ref:r})}).displayName="DropdownMenuItemIndicator";var eb=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Vv(n);return e(Av,{...i,...o,ref:r})});eb.displayName="DropdownMenuSeparator";n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Vv(n);return e(Iv,{...i,...o,ref:r})}).displayName="DropdownMenuArrow";var tb=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Vv(n);return e(Fv,{...i,...o,ref:r})});tb.displayName="DropdownMenuSubTrigger";var rb=n.forwardRef((t,r)=>{const{__scopeDropdownMenu:n,...o}=t,i=Vv(n);return e(Hv,{...i,...o,ref:r,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});rb.displayName="DropdownMenuSubContent";var nb=qv,ob=Kv,ib=Gv,ab=Jv,sb=Qv,lb=eb,cb=t=>{const{__scopeDropdownMenu:r,children:n,open:o,onOpenChange:i,defaultOpen:a}=t,s=Vv(r),[l,c]=le({prop:o,defaultProp:a??!1,onChange:i,caller:"DropdownMenuSub"});return e(Lv,{...s,open:l,onOpenChange:c,children:n})},db=tb,ub=rb;const pb=t=>{var r=q(t,[]);return e(nb,Object.assign({"data-slot":"dropdown-menu"},r))},fb=t=>{var r=q(t,[]);return e(ob,Object.assign({"data-slot":"dropdown-menu-trigger"},r))},hb=t=>{var{className:r,sideOffset:n=4}=t,o=q(t,["className","sideOffset"]);return e(ib,{children:e(ab,Object.assign({"data-slot":"dropdown-menu-content",sideOffset:n,className:Xn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",r)},o))})},gb=t=>{var{className:r,inset:n,variant:o="default"}=t,i=q(t,["className","inset","variant"]);return e(sb,Object.assign({"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":o,className:Xn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r)},i))},mb=t=>{var{className:r}=t,n=q(t,["className"]);return e(lb,Object.assign({"data-slot":"dropdown-menu-separator",className:Xn("bg-border -mx-1 my-1 h-px",r)},n))},vb=t=>{var r=q(t,[]);return e(cb,Object.assign({"data-slot":"dropdown-menu-sub"},r))},bb=t=>{var{className:n,inset:o,children:i}=t,a=q(t,["className","inset","children"]);return r(db,Object.assign({"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:Xn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n)},a,{children:[i,e(Rt,{className:"ml-auto size-4"})]}))},wb=t=>{var{className:r}=t,n=q(t,["className"]);return e(ub,Object.assign({"data-slot":"dropdown-menu-sub-content",className:Xn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",r)},n))},yb={"step-container":{render:t=>{const n=x(),{attributes:o,children:i}=t;return r("div",Object.assign({},o,{role:"list",className:"ml-3.5 my-4 relative group/steps-node"},{children:[i,e("div",Object.assign({contentEditable:!1,className:Xn("-ml-3.5 z-20 absolute left-0 flex","transition-opacity duration-300","opacity-0 group-hover/steps-node:opacity-100"),style:{bottom:"-4px"}},{children:e(Ho,Object.assign({variant:"ghost",size:"icon",className:Xn("w-7 h-7 shrink-0 rounded-lg","bg-muted hover:bg-muted/80","text-sm font-semibold"),onClick:()=>{k.getBlockSlate(n,{id:t.blockId})&&F.addStep(n,{blockId:t.blockId})},"aria-label":"Add more Step"},{children:e(Vt,{className:"w-4 h-4"})}))}))]}))}},"step-list":{render:t=>{const{attributes:r,children:n}=t;return e("div",Object.assign({},r,{className:"[&>div]:contents contents"},{children:n}))}},"step-list-item":{render:t=>{const{attributes:n,children:o,element:i}=t,a=x(),s=l(()=>{const e=O.getElementPath(a,{blockId:t.blockId,element:i}),r=null==e?void 0:e[e.length-1];return r||0},[a,i,t.blockId]),c=s+1,d=s===i.children.length-1,u=0===i.children.length;return e("div",Object.assign({className:"prose dark:prose-invert"},{children:r("div",Object.assign({className:"relative group/component-wrapper group/step"},{children:[r("div",Object.assign({},n,{role:"listitem",className:"step group/step relative flex items-start pb-5"},{children:[e("div",{"data-component-part":"step-line",contentEditable:!1,className:Xn("absolute w-px h-[calc(100%-2.75rem)] top-[2.75rem]",d?"bg-transparent bg-gradient-to-b from-border via-80% to-transparent":"bg-border/70",d&&u&&"hidden")}),e("div",Object.assign({"data-component-part":"step-number",contentEditable:!1,className:"absolute ml-[-13px] py-2 pointer-events-none select-none"},{children:e("div",Object.assign({className:Xn("size-7 shrink-0 rounded-full","bg-muted","text-xs font-semibold","flex items-center justify-center","text-foreground")},{children:c}))})),e("div",Object.assign({className:"w-full overflow-hidden pl-8 pr-px"},{children:o}))]})),e("div",Object.assign({contentEditable:!1,className:Xn("z-20 absolute top-0 right-3 flex","transition-opacity duration-300","opacity-0 hover:opacity-100 group-hover/step:opacity-100")},{children:r(pb,{children:[e(fb,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:"ghost",size:"icon",className:Xn("size-8 shrink-0 rounded-lg","border border-transparent","hover:bg-muted"),"aria-label":"Edit Step attributes"},{children:e(zt,{className:"h-4 w-4"})}))})),r(hb,Object.assign({align:"end"},{children:[r(gb,Object.assign({onClick:()=>{F.moveUp(a,{blockId:t.blockId,stepId:i.id})},className:"cursor-pointer"},{children:[e(Ct,{className:"h-4 w-4"})," Move up"]})),r(gb,Object.assign({onClick:()=>{F.moveDown(a,{blockId:t.blockId,stepId:i.id})},className:"cursor-pointer"},{children:[e(kt,{className:"h-4 w-4"})," Move down"]})),e(mb,{}),r(gb,Object.assign({onClick:()=>{F.deleteStep(a,{blockId:t.blockId,stepId:i.id})},className:"text-destructive focus:text-destructive cursor-pointer"},{children:[e(Kt,{className:"h-4 w-4"})," Delete step"]}))]}))]})}))]}))}))}},"step-list-item-heading":{render:t=>{const{attributes:r,children:n}=t;return e("p",Object.assign({},r,{"data-component-part":"step-title",className:"mt-2 font-semibold prose dark:prose-invert text-foreground"},{children:n}))}},"step-list-item-content":{render:t=>{const{attributes:r,children:n}=t;return e("div",Object.assign({},r,{"data-component-part":"step-content",className:"my-2 prose dark:prose-invert"},{children:n}))}}},xb=i((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("div",Object.assign({"data-slot":"table-container",className:"relative w-full overflow-x-auto border-collapse border border-border rounded-md"},{children:e("table",Object.assign({ref:r,"data-slot":"table",className:Xn("caption-bottom text-sm table-fixed",n)},o))}))});xb.displayName="Table";i((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("thead",Object.assign({ref:r,"data-slot":"table-header",className:Xn("[&_tr]:border-b",n)},o))}).displayName="TableHeader";const kb=i((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("tbody",Object.assign({ref:r,"data-slot":"table-body",className:Xn("[&_tr:last-child]:border-0",n)},o))});kb.displayName="TableBody";i((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("tfoot",Object.assign({ref:r,"data-slot":"table-footer",className:Xn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",n)},o))}).displayName="TableFooter";const Ob=i((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("tr",Object.assign({ref:r,"data-slot":"table-row",className:Xn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",n)},o))});Ob.displayName="TableRow";const Nb=i((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("th",Object.assign({ref:r,"data-slot":"table-head",className:Xn("border-border border-r last:border-r-0 text-foreground h-10 px-2 text-left font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] bg-muted/50",n)},o))});Nb.displayName="TableHead";const Cb=i((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("td",Object.assign({ref:r,"data-slot":"table-cell",className:Xn("border-border border-r last:border-r-0 p-2 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n)},o))});Cb.displayName="TableCell";i((t,r)=>{var{className:n}=t,o=q(t,["className"]);return e("caption",Object.assign({ref:r,"data-slot":"table-caption",className:Xn("text-muted-foreground mt-4 text-sm",n)},o))}).displayName="TableCaption";const Sb=({blockId:t})=>{const r=x(),[n,o]=u(null),[i,a]=u(!1),[s,l]=u(null),[f,h]=u([]),g=d(0),m=d(0),v=d([]),b=d(null),w=d(null),y=d(null);p(()=>{v.current=f},[f]),p(()=>{w.current=n},[n]),p(()=>{b.current=s},[s]);const k=c(()=>{const e=document.querySelector(`[data-yoopta-block-id="${t}"][data-table-container]`);if(!e)return;const r=e.querySelector("table");if(!r)return;const n=r.getBoundingClientRect();o(n);const i=r.querySelector("colgroup");y.current=i;const a=r.querySelectorAll("colgroup col"),s=r.querySelector("tr");if(a.length>0){const e=[];n.left,a.forEach((t,r)=>{const n=window.getComputedStyle(t),o=parseInt(n.width,10)||200;e.push(o)}),h(e)}else if(s){const e=s.querySelectorAll("td, th"),t=[],r=[];e.forEach((e,n)=>{const o=e.getBoundingClientRect();r.push(o.width),t.push({index:n,left:o.left,width:o.width})}),h(r)}},[t]);p(()=>{k();const e=document.querySelector(`[data-yoopta-block-id="${t}"][data-table-container]`);if(!e)return;const r=e.querySelector("table");if(!r)return;const n=new ResizeObserver(()=>{i||k()});n.observe(r);const o=new MutationObserver(()=>{i||k()});o.observe(r,{childList:!0,subtree:!0});const a=()=>{i||k()};return window.addEventListener("scroll",a,!0),()=>{n.disconnect(),o.disconnect(),window.removeEventListener("scroll",a,!0)}},[t,k,i]);const O=c(e=>{if(!y.current)return;y.current.querySelectorAll("col").forEach((t,r)=>{void 0!==e[r]&&(t.style.width=`${e[r]}px`)})},[]),N=c((e,t)=>{if(!t||0===e.length)return[];let r=t.left;return e.map((e,t)=>{const n={index:t,left:r,width:e};return r+=e,n})},[]),C=c((e,t)=>{e.preventDefault(),e.stopPropagation();const r=f[t];void 0!==r&&(a(!0),l(t),g.current=e.clientX,m.current=r,document.body.classList.add("resizing-column"))},[f]),S=c(e=>{const t=b.current;if(null===t)return;const r=e.clientX-g.current,n=Math.max(50,m.current+r),o=[...v.current];o[t]=n,h(o),O(o)},[O]),E=c(()=>{const e=b.current,n=v.current;null!==e&&void 0!==n[e]&&H.setColumnWidth(r,t,e,n[e]),a(!1),l(null),document.body.classList.remove("resizing-column"),setTimeout(k,50)},[r,t,k]);if(p(()=>{if(i)return document.addEventListener("mousemove",S),document.addEventListener("mouseup",E),()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",E)}},[i,S,E]),!n||0===f.length)return null;const R=N(f,n).slice(0,-1).map(t=>{const r=t.left+t.width-3;return e("div",{className:"column-resize-handle",style:{position:"fixed",left:`${r}px`,top:`${n.top}px`,width:"6px",height:`${n.height}px`,cursor:"col-resize",zIndex:50,backgroundColor:i&&s===t.index?"hsl(var(--primary))":"transparent"},onMouseDown:e=>C(e,t.index),onMouseEnter:e=>{i||(e.target.style.backgroundColor="hsl(var(--primary) / 0.3)")},onMouseLeave:e=>{i||(e.target.style.backgroundColor="transparent")}},`resize-${t.index}`)});return e(U,Object.assign({id:"column-resize-handles-container"},{children:e("div",Object.assign({className:"column-resize-handles-container",style:{pointerEvents:i?"auto":void 0}},{children:R}))}))},Eb=({blockId:t,totalColumns:r,position:n,onMouseEnter:o,onMouseLeave:i,buttonRef:a})=>{const s=x(),l=d(null),u=a||l,p=c(()=>{const e=[0,0,r-1];H.insertTableColumn(s,t,{path:e,insertMode:"after"})},[s,t,r]);return e(U,Object.assign({id:`table-add-column-button-${t}`},{children:e("div",Object.assign({ref:u,className:"fixed z-[9999] pointer-events-auto",style:{left:`${n.left}px`,top:`${n.top}px`,width:"28px",height:`${n.height}px`},onMouseEnter:o,onMouseLeave:i},{children:e(Ho,Object.assign({variant:"ghost",size:"sm",className:"p-0 h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md transition-all hover:shadow-md flex items-center justify-center text-muted-foreground hover:text-foreground",onClick:p,onMouseDown:e=>e.preventDefault()},{children:e(Vt,{className:"h-4 w-4"})}))}))}))},Rb=({blockId:t,totalRows:n,position:o,onMouseEnter:i,onMouseLeave:a,buttonRef:s})=>{const l=x(),u=d(null),p=s||u,f=c(()=>{const e=[n-1];H.insertTableRow(l,t,{path:e,insertMode:"after"})},[l,t,n]);return e(U,Object.assign({id:`table-add-row-button-${t}`},{children:e("div",Object.assign({ref:p,className:"fixed z-[9999] pointer-events-auto",style:{left:`${o.left}px`,top:`${o.top}px`,width:`${o.width}px`,height:"28px"},onMouseEnter:i,onMouseLeave:a},{children:r(Ho,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md transition-all hover:shadow-md flex items-center justify-center gap-1.5 text-muted-foreground hover:text-foreground",onClick:f,onMouseDown:e=>e.preventDefault()},{children:[e(Vt,{className:"h-4 w-4"}),e("span",Object.assign({className:"text-xs font-medium"},{children:"Add row"}))]}))}))}))},Pb=({blockId:t,colIndex:n,path:o,position:i,onMouseEnter:a,onMouseLeave:s,controlsRef:l})=>{const u=x(),p=d(null),f=l||p,h=c(()=>{H.insertTableColumn(u,t,{path:o,insertMode:"before"})},[u,t,o]),g=c(()=>{H.insertTableColumn(u,t,{path:o,insertMode:"after"})},[u,t,o]),m=c(()=>{H.deleteTableColumn(u,t,{path:o})},[u,t,o]);return e(U,Object.assign({id:`table-column-controls-${t}-${n}`},{children:e("div",Object.assign({ref:f,className:"fixed z-[9999] pointer-events-auto",style:{left:`${i.left}px`,top:`${i.top}px`,width:`${i.width}px`,height:"28px"},onMouseEnter:a,onMouseLeave:s},{children:r(pb,{children:[e(fb,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md p-0 transition-all hover:shadow-md",onMouseDown:e=>e.preventDefault()},{children:e(Mt,{className:"h-4 w-4 text-muted-foreground"})}))})),r(hb,Object.assign({align:"center",side:"top",className:"w-48"},{children:[r(gb,Object.assign({onClick:h},{children:[e(Ot,{className:"mr-2 h-4 w-4"}),"Insert column left"]})),r(gb,Object.assign({onClick:g},{children:[e(Nt,{className:"mr-2 h-4 w-4"}),"Insert column right"]})),e(mb,{}),r(gb,Object.assign({onClick:m,className:"text-destructive focus:text-destructive"},{children:[e(Kt,{className:"mr-2 h-4 w-4"}),"Delete column"]}))]}))]})}))}))},jb=({blockId:t,rowIndex:n,path:o,position:i,onMouseEnter:a,onMouseLeave:s,controlsRef:l})=>{const u=x(),p=d(null),f=l||p,h=o.slice(0,-1),g=c(()=>{H.insertTableRow(u,t,{path:h,insertMode:"before"})},[u,t,h]),m=c(()=>{H.insertTableRow(u,t,{path:h,insertMode:"after"})},[u,t,h]),v=c(()=>{H.deleteTableRow(u,t,{path:h})},[u,t,h]);return e(U,Object.assign({id:`table-row-controls-${t}-${n}`},{children:e("div",Object.assign({ref:f,className:"fixed z-[9998] pointer-events-auto",style:{left:`${i.left+20}px`,top:`${i.top}px`,width:"18px",height:`${i.height}px`},onMouseEnter:a,onMouseLeave:s},{children:r(pb,{children:[e(fb,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md p-0 transition-all hover:shadow-md flex items-center justify-center",onMouseDown:e=>e.preventDefault()},{children:e(zt,{className:"h-4 w-4 text-muted-foreground"})}))})),r(hb,Object.assign({align:"start",side:"left",className:"w-48"},{children:[r(gb,Object.assign({onClick:g},{children:[e(Ct,{className:"mr-2 h-4 w-4"}),"Insert row above"]})),r(gb,Object.assign({onClick:m},{children:[e(kt,{className:"mr-2 h-4 w-4"}),"Insert row below"]})),e(mb,{}),r(gb,Object.assign({onClick:v,className:"text-destructive focus:text-destructive"},{children:[e(Kt,{className:"mr-2 h-4 w-4"}),"Delete row"]}))]}))]})}))}))},Db=({blockId:n})=>{const o=x(),i=l(()=>k.getBlockSlate(o,{id:n}),[n,o]),[a,s]=u(null),[f,h]=u(null),[g,m]=u(null),[v,b]=u(null),[w,y]=u(null),[O,N]=u({top:0,left:0}),[C,S]=u(!1),[E,R]=u(!1),[P,j]=u(!1),[D,z]=u(!1),M=d(null),T=d(null),_=d(null),A=d(null),I=d(null);p(()=>{const e=document.querySelector(`[data-yoopta-block-id="${n}"][data-table-container]`);if(!e)return;const t=e.querySelector("table");if(!t)return;const r=()=>{const r=window.getComputedStyle(e),n=parseInt(r.paddingTop,10)||0,o=parseInt(r.paddingLeft,10)||0;N({top:n,left:o}),y(e.getBoundingClientRect()),b(t.getBoundingClientRect())};r();const o=new ResizeObserver(r);return o.observe(e),o.observe(t),window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{o.disconnect(),window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[n]),p(()=>{const e=document.querySelector(`[data-yoopta-block-id="${n}"][data-table-container]`);if(!e||!i)return;const t=t=>{var r,n,o,a;M.current&&(clearTimeout(M.current),M.current=null);const l=t,c=l.target.closest('[data-element-type="table-data-cell"]');if(!c){if(T.current){const e=T.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void S(!0)}if(_.current){const e=_.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void R(!0)}if(A.current){const e=A.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void j(!0)}if(I.current){const e=I.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void z(!0)}return void(C||E||P||D||(s(null),h(null),m(null)))}const d=c.getAttribute("data-yoopta-element-id");if(!d)return void(C||E||P||D||(s(null),h(null),m(null)));const u=Array.from(xr.nodes(i,{at:[0],match:e=>{if(!lr.isElement(e))return!1;const t=e;return"table-data-cell"===t.type&&"id"in t&&t.id===d},mode:"all"}));if(0===u.length)return void(C||E||P||D||(s(null),h(null),m(null)));const[p,v]=u[0],b=v[v.length-2],w=v[v.length-1],y=Array.from(xr.nodes(i,{at:[0],match:e=>{if(!lr.isElement(e))return!1;return"table"===e.type},mode:"lowest"}));if(0===y.length)return;const[x]=y[0];if(!lr.isElement(x))return;const k=x.children.length,O=x.children[0];if(!lr.isElement(O))return;const N=O.children.length,L=c.getBoundingClientRect(),F=Array.from(e.querySelectorAll("tr")),H=F[0],B={left:L.left,width:L.width,top:L.top,height:L.height},W={left:L.left,width:L.width,top:L.top,height:L.height};if(!H)return void s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:B,rowRect:W});if(!Array.from(H.querySelectorAll('[data-element-type="table-data-cell"]'))[w])return void s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:B,rowRect:W});const U=[];F.forEach(e=>{const t=Array.from(e.querySelectorAll('[data-element-type="table-data-cell"]'));t[w]&&U.push(t[w].getBoundingClientRect())});const V=U.length>0?Math.min(...U.map(e=>e.left)):L.left,$=U.length>0?Math.max(...U.map(e=>e.right)):L.right,X=$-V,q=U.length>0?Math.min(...U.map(e=>e.top)):L.top,Y=F[b];if(!Y)return void s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:{left:V,width:X,top:q,height:null!==(n=null===(r=U[0])||void 0===r?void 0:r.height)&&void 0!==n?n:L.height},rowRect:W});const K=Array.from(Y.querySelectorAll('[data-element-type="table-data-cell"]')),G=K.length>0?K.map(e=>e.getBoundingClientRect()):[L],Z=Math.min(...G.map(e=>e.top)),J=Math.max(...G.map(e=>e.bottom)),Q=J-Z,ee=Math.min(...G.map(e=>e.left));f===w&&g===b||(h(w),m(b),s({cell:p,path:v,rowIndex:b,colIndex:w,rect:L,totalRows:k,totalColumns:N,columnRect:{left:V,width:X,top:q,height:null!==(a=null===(o=U[0])||void 0===o?void 0:o.height)&&void 0!==a?a:L.height},rowRect:{left:ee,width:Math.max(...G.map(e=>e.right))-ee,top:Z,height:Q}}))},r=()=>{M.current=setTimeout(()=>{C||E||P||D||(s(null),h(null),m(null))},150)};return e.addEventListener("mousemove",t),e.addEventListener("mouseleave",r),()=>{M.current&&clearTimeout(M.current),e.removeEventListener("mousemove",t),e.removeEventListener("mouseleave",r)}},[n,i,C,E,P,D,f,g]);const L=c(()=>{S(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),F=c(()=>{S(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]),H=c(()=>{R(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),B=c(()=>{R(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]),W=c(()=>{j(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),U=c(()=>{j(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]),V=c(()=>{z(!0),M.current&&(clearTimeout(M.current),M.current=null)},[]),$=c(()=>{z(!1),M.current=setTimeout(()=>{s(null),h(null),m(null)},150)},[]);if(!v||!w)return null;const X=!!a&&a.rowIndex===a.totalRows-1,q=!!a&&a.colIndex===a.totalColumns-1,Y=a?a.columnRect.top-32:0,K=a?a.columnRect.left:0,G=a?a.rowRect.top:0,Z=a?Math.max(0,a.rowRect.left-32):0,J=w.left+O.left,Q=w.top+O.top+v.height,ee=w.left+O.left+v.width,te=w.top+O.top;return r(t,{children:[a&&e(jb,{blockId:n,rowIndex:a.rowIndex,path:a.path,position:{left:Z,top:G,height:a.rowRect.height},onMouseEnter:L,onMouseLeave:F,controlsRef:T}),a&&e(Pb,{blockId:n,colIndex:a.colIndex,path:a.path,position:{left:K,top:Y,width:a.columnRect.width},onMouseEnter:H,onMouseLeave:B,controlsRef:_}),q&&a&&e(Eb,{blockId:n,totalColumns:a.totalColumns,position:{left:ee,top:te,height:v.height},onMouseEnter:V,onMouseLeave:$,buttonRef:I}),X&&a&&e(Rb,{blockId:n,totalRows:a.totalRows,position:{left:J,top:Q,width:v.width},onMouseEnter:W,onMouseLeave:U,buttonRef:A})]})},zb=[{label:"None",value:"transparent",color:"transparent"},{label:"Gray",value:"hsl(var(--muted))",color:"hsl(var(--muted))"},{label:"Red",value:"hsl(0 70% 95%)",color:"hsl(0 70% 95%)"},{label:"Orange",value:"hsl(30 70% 95%)",color:"hsl(30 70% 95%)"},{label:"Yellow",value:"hsl(60 70% 95%)",color:"hsl(60 70% 95%)"},{label:"Green",value:"hsl(120 70% 95%)",color:"hsl(120 70% 95%)"},{label:"Blue",value:"hsl(210 70% 95%)",color:"hsl(210 70% 95%)"},{label:"Purple",value:"hsl(270 70% 95%)",color:"hsl(270 70% 95%)"}],Mb=[{label:"Default",value:"inherit",color:"currentColor"},{label:"Gray",value:"hsl(var(--muted-foreground))",color:"hsl(var(--muted-foreground))"},{label:"Red",value:"hsl(0 70% 50%)",color:"hsl(0 70% 50%)"},{label:"Orange",value:"hsl(30 70% 50%)",color:"hsl(30 70% 50%)"},{label:"Yellow",value:"hsl(60 70% 40%)",color:"hsl(60 70% 40%)"},{label:"Green",value:"hsl(120 70% 40%)",color:"hsl(120 70% 40%)"},{label:"Blue",value:"hsl(210 70% 50%)",color:"hsl(210 70% 50%)"},{label:"Purple",value:"hsl(270 70% 50%)",color:"hsl(270 70% 50%)"}],Tb=({blockId:n})=>{const o=x(),i=l(()=>k.getBlockSlate(o,{id:n}),[n,o]),[a,s]=u(null),[c,d]=u(!1),[f,h]=u([]),g=i?B.get(i):[];p(()=>{h(g)},[g]);const m=Array.isArray(g)&&(null==g?void 0:g.length)>0?g:f;p(()=>{if(!i||!m||m.length<=1)return void s(null);const e=document.querySelector(`[data-yoopta-block-id="${n}"]`);if(!e)return void s(null);const t=e.getBoundingClientRect();let r=1/0,o=-1/0,a=1/0,l=-1/0;for(const[e]of m){const t=document.querySelector(`[data-yoopta-block-id="${n}"] [data-yoopta-element-id="${e.id}"]`);if(!t)continue;const i=t.getBoundingClientRect();if(!i)continue;const{top:s,bottom:c,left:d,right:u}=i;r=Math.min(r,s),o=Math.max(o,c),a=Math.min(a,d),l=Math.max(l,u)}s(r!==1/0?{top:r-t.top,left:a-t.left,width:l-a,height:o-r}:null)},[i,m,n]),p(()=>{if(!m||m.length<=1)return;const e=()=>{s(e=>e?Object.assign({},e):null)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[m]);const v=e=>{o&&m&&0!==m.length&&(H.setCellHorizontalAlign(o,n,{cells:m,align:e}),d(!1))},b=e=>{o&&m&&0!==m.length&&(H.setCellVerticalAlign(o,n,{cells:m,align:e}),d(!1))};return a?r(t,{children:[e("div",{className:"pointer-events-none absolute z-[9999]",style:{top:`${a.top}px`,left:`${a.left}px`,width:`${a.width}px`,height:`${a.height}px`,border:"2px solid hsl(var(--primary))",backgroundColor:"hsl(var(--primary) / 0.05)",borderRadius:"2px"}}),e("div",Object.assign({className:"absolute z-20 pointer-events-auto",style:{top:`${a.top+a.height/2}px`,left:`${a.left+a.width}px`,transform:"translate(-50%, -50%)"}},{children:r(nc,Object.assign({open:c,onOpenChange:d},{children:[e(oc,Object.assign({asChild:!0},{children:e(Ho,Object.assign({variant:"secondary",size:"icon",className:"h-4 w-4 rounded-full shadow-lg bg-primary hover:bg-primary/90",onMouseDown:e=>e.preventDefault()},{children:e(zt,{className:"h-3 w-3 text-primary-foreground"})}))})),e(ic,Object.assign({className:"w-64 p-2",align:"start",side:"right"},{children:r("div",Object.assign({className:"space-y-2"},{children:[r(Ho,Object.assign({variant:"ghost",size:"sm",className:"w-full justify-start gap-2",onClick:()=>{!o||!m||m.length<=1||(H.mergeCells(o,n,{cells:m}),d(!1))},disabled:!m||m.length<=1},{children:[e(Ft,{className:"h-4 w-4"}),"Merge cells"]})),e(Kd,{}),r("div",Object.assign({className:"space-y-1"},{children:[e(Up,Object.assign({className:"text-sm font-medium"},{children:"Color"})),r(pb,{children:[e(fb,Object.assign({asChild:!0},{children:r(Ho,Object.assign({variant:"outline",size:"sm",className:"w-full justify-between"},{children:[r("span",Object.assign({className:"flex items-center gap-2"},{children:[e(Wt,{className:"h-4 w-4"}),"Select color"]})),e(Et,{className:"h-4 w-4 opacity-50"})]}))})),r(hb,Object.assign({className:"w-56",align:"start"},{children:[r(vb,{children:[r(bb,{children:[e(Wt,{className:"mr-2 h-4 w-4"}),"Background color"]}),e(wb,{children:zb.map(t=>e(gb,Object.assign({onClick:()=>(e=>{o&&m&&0!==m.length&&(H.setCellBackgroundColor(o,n,{cells:m,color:e}),d(!1))})(t.value)},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",{className:"h-4 w-4 rounded border",style:{backgroundColor:t.color}}),t.label]}))}),t.value))})]}),r(vb,{children:[r(bb,{children:[e(Gt,{className:"mr-2 h-4 w-4"}),"Text color"]}),e(wb,{children:Mb.map(t=>e(gb,Object.assign({onClick:()=>(e=>{o&&m&&0!==m.length&&(H.setCellTextColor(o,n,{cells:m,color:e}),d(!1))})(t.value)},{children:r("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"h-4 w-4 rounded border flex items-center justify-center text-xs font-bold",style:{color:t.color}},{children:"A"})),t.label]}))}),t.value))})]})]}))]})]})),r("div",Object.assign({className:"space-y-1"},{children:[e(Up,Object.assign({className:"text-sm font-medium"},{children:"Alignment"})),r(pb,{children:[e(fb,Object.assign({asChild:!0},{children:r(Ho,Object.assign({variant:"outline",size:"sm",className:"w-full justify-between"},{children:[r("span",Object.assign({className:"flex items-center gap-2"},{children:[e(Ht,{className:"h-4 w-4"}),"Select alignment"]})),e(Et,{className:"h-4 w-4 opacity-50"})]}))})),r(hb,Object.assign({className:"w-56",align:"start"},{children:[r(vb,{children:[r(bb,{children:[e(Ht,{className:"mr-2 h-4 w-4"}),"Horizontal"]}),r(wb,{children:[e(gb,Object.assign({onClick:()=>v("left")},{children:"Left"})),e(gb,Object.assign({onClick:()=>v("center")},{children:"Center"})),e(gb,Object.assign({onClick:()=>v("right")},{children:"Right"})),e(gb,Object.assign({onClick:()=>v("justify")},{children:"Justify"}))]})]}),r(vb,{children:[r(bb,{children:[e(Bt,{className:"mr-2 h-4 w-4"}),"Vertical"]}),r(wb,{children:[e(gb,Object.assign({onClick:()=>b("top")},{children:"Top"})),e(gb,Object.assign({onClick:()=>b("middle")},{children:"Middle"})),e(gb,Object.assign({onClick:()=>b("bottom")},{children:"Bottom"}))]})]})]}))]})]})),e(Kd,{}),r(Ho,Object.assign({variant:"ghost",size:"sm",className:"w-full justify-start gap-2 text-destructive hover:text-destructive",onClick:()=>{o&&m&&0!==m.length&&(H.clearContents(o,n,{cells:m}),d(!1))}},{children:[e(Tt,{className:"h-4 w-4"}),"Clear contents"]}))]}))}))]}))}))]}):null};$("[data-element-type=table-data-cell] [data-slate-node=element]{margin:0}[data-slate-node=table]{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-slate-node=table-data-cell]{cursor:cell}[data-slate-node=table-data-cell]:active{cursor:crosshair}[data-is-selecting=true] ::-moz-selection{background:none}[data-is-selecting=true] ::selection{background:none}.column-resize-handle{transition:background-color .15s ease}.column-resize-handle:hover{background-color:hsl(var(--primary)/.3)!important}body.resizing-column{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}body.resizing-column,body.resizing-column *{cursor:col-resize!important}");const _b={table:{render:t=>{var n,o;const{attributes:i,children:a,element:s}=t,c=s,d=x(),u=l(()=>k.getBlockSlate(d,{id:t.blockId}),[d,t.blockId]),p=u?W.get(u):null;return r("div",Object.assign({className:"p-4","data-yoopta-block-id":t.blockId,"data-table-container":!0},{children:[r(xb,Object.assign({},i,{"data-is-selecting":!!p},{children:[e("colgroup",{children:null===(o=null===(n=c.props)||void 0===n?void 0:n.columnWidths)||void 0===o?void 0:o.map((t,r)=>e("col",{style:{width:`${t}px`}},r))}),e(kb,{children:a})]})),e(Tb,{blockId:t.blockId}),e(Db,{blockId:t.blockId}),e(Sb,{blockId:t.blockId})]}))}},"table-row":{render:t=>{const{attributes:r,children:n}=t;return e(Ob,Object.assign({},r,{children:n}))}},"table-data-cell":{render:t=>{var r,n,o,i,a,s,c,d,u,p,f,h;const{attributes:g,children:m,element:v}=t,b=v,w=x(),y=l(()=>k.getBlockSlate(w,{id:t.blockId}),[w,t.blockId]),O=(null===(r=b.props)||void 0===r?void 0:r.asHeader)?Nb:Cb;return e(O,Object.assign({},g,{onMouseDown:e=>{e.stopPropagation(),y&&(B.delete(y),W.delete(y))},colSpan:null!==(o=null===(n=b.props)||void 0===n?void 0:n.colSpan)&&void 0!==o?o:1,rowSpan:null!==(a=null===(i=b.props)||void 0===i?void 0:i.rowSpan)&&void 0!==a?a:1,align:null!==(c=null===(s=b.props)||void 0===s?void 0:s.align)&&void 0!==c?c:"left",valign:null!==(u=null===(d=b.props)||void 0===d?void 0:d.verticalAlign)&&void 0!==u?u:"middle","data-yoopta-element-id":b.id,className:Xn("relative group transition-colors"),style:{backgroundColor:null===(p=b.props)||void 0===p?void 0:p.backgroundColor,color:null!==(h=null===(f=b.props)||void 0===f?void 0:f.color)&&void 0!==h?h:"inherit"}},{children:m}))}}},Ab={"tabs-container":{render:t=>{var r;const{attributes:n,children:o,blockId:i,element:a}=t,s=x();return e(Xc,Object.assign({},n,{value:null===(r=a.props)||void 0===r?void 0:r.activeTabId,onValueChange:e=>{const t=k.getBlockSlate(s,{id:i});t&&Yr.setNodes(t,{props:Object.assign(Object.assign({},a.props),{activeTabId:e})},{at:[0],match:e=>lr.isElement(e)&&"tabs-container"===e.type})},className:"w-full"},{children:o}))}},"tabs-list":{render:t=>{const{attributes:n,children:o,blockId:i}=t,a=x();return r(Ad,Object.assign({className:"w-full"},{children:[r(qc,Object.assign({},n,{className:"w-full relative justify-start"},{children:[o,e("button",Object.assign({type:"button",contentEditable:!1,onClick:e=>{e.preventDefault(),e.stopPropagation(),V.addTabItem(a,i)},className:"ml-1 flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1.5",title:"Add tab"},{children:e(Vt,{className:"h-4 w-4 shrink-0 text-muted-foreground"})}))]})),e(_d,{orientation:"horizontal"})]}))}},"tabs-item-heading":{render:t=>{const{attributes:n,children:o,element:i,blockId:a}=t,s=x();return r(Yc,Object.assign({},n,{value:i.id,className:"relative group/tab flex items-center gap-2 pr-8 whitespace-nowrap"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:o})),e("span",Object.assign({contentEditable:!1,onClick:()=>{V.deleteTabItem(s,a,{tabId:i.id})},className:"absolute right-1 flex items-center justify-center rounded-sm opacity-0 group-hover/tab:opacity-100 transition-opacity hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Close tab"},{children:e(Jt,{className:"h-3 w-3 shrink-0 text-muted-foreground"})}))]}))}},"tabs-item-content":{render:t=>{var r;const{attributes:n,children:o,element:i}=t;return e(Kc,Object.assign({},n,{value:null===(r=i.props)||void 0===r?void 0:r.referenceId,className:"mt-2"},{children:o}))}}};function Ib(e,t){const r={Accordion:Kr,Paragraph:mm,Blockquote:Gr,Callout:Yn,Table:_b,Link:fm,HeadingOne:Zd.HeadingOne,HeadingTwo:Zd.HeadingTwo,HeadingThree:Zd.HeadingThree,BulletedList:gm.BulletedList,NumberedList:gm.NumberedList,TodoList:gm.TodoList,Image:Lg,Code:cc,Tabs:Ab,CodeGroup:Id,Steps:yb,Carousel:Go,Divider:Gd};return e.map(e=>{var n;const o=e.getPlugin.type,i=r[o];if(!i)return e;const a=null==t?void 0:t[o],s=null!==(n=null==a?void 0:a.elements)&&void 0!==n?n:i;return e.extend(Object.assign({elements:s},a&&{injectElementsFromPlugins:a.injectElementsFromPlugins,events:a.events,options:a.options}))})}export{Kr as AccordionUI,Gr as BlockquoteUI,Yn as CalloutUI,cc as CodeUI,Gd as DividerUI,Zd as HeadingsUI,Lg as ImageUI,fm as LinkUI,gm as ListsUI,mm as ParagraphUI,yb as StepsUI,_b as TableUI,Ab as TabsUI,Ib as default};
|
|
26
|
+
*/re("[data-element-type=accordion-list-item-content] [data-slate-node=element],[data-element-type=accordion-list-item-heading] [data-slate-node=element]{margin:0}");const fn={"accordion-list":{render:t=>{const{attributes:n,children:r,blockId:o,element:i}=t,a=x(),s=l(()=>{const e=[];return i.children.forEach(t=>{var n;"accordion-list-item"===t.type&&(null===(n=t.props)||void 0===n?void 0:n.isExpanded)&&e.push(t.id)}),e},[i]);return e(Nt,Object.assign({},n,{type:"multiple",value:s,onValueChange:e=>{const t=k.getBlockSlate(a,{id:o});if(!t)return;const n=R.nodes(t,{match:e=>P.isElement(e)&&"accordion-list-item"===e.type});R.withoutNormalizing(t,()=>{var r;for(const[o,i]of n){const n=o,a=n.id,s=e.includes(a);(null===(r=n.props)||void 0===r?void 0:r.isExpanded)!==s&&D.setNodes(t,{props:Object.assign(Object.assign({},n.props),{isExpanded:s})},{at:i})}})},className:"w-full rounded-md border"},{children:r}))}},"accordion-list-item":{render:t=>{var n;const{attributes:r,children:o,element:i}=t;return e(Ct,Object.assign({value:i.id,"data-state":(null===(n=i.props)||void 0===n?void 0:n.isExpanded)?"open":"closed"},r,{children:o}))}},"accordion-list-item-heading":{render:t=>{var r,o;const{attributes:i,children:a,element:d,blockId:u}=t,p=x(),[,h]=s(e=>e+1,0),f=l(()=>{const e=k.getBlockSlate(p,{id:u});if(e)try{const t=N.getElementPath(p,{blockId:u,element:d});return R.parent(e,t)[0]}catch(e){}},[p,u,d]),g=l(()=>{if(!f)return;if(k.getBlockSlate(p,{id:u}))try{return N.getElementPath(p,{blockId:u,element:f})}catch(e){}},[p,u,f]),m=null!==(o=null===(r=null==f?void 0:f.props)||void 0===r?void 0:r.isExpanded)&&void 0!==o&&o,b=c(()=>{f&&g&&N.updateElement(p,{blockId:u,type:f.type,props:Object.assign(Object.assign({},f.props),{isExpanded:!m}),path:g}),h()},[p,u,f,g,m]),v=c(e=>{if(e.preventDefault(),e.stopPropagation(),!f||!g)return;const t=N.getElementChildren(p,{blockId:u,type:"accordion-list"});1!==(null==t?void 0:t.length)?N.deleteElement(p,{blockId:u,type:"accordion-list-item",path:g}):k.deleteBlock(p,{blockId:u})},[p,u,f,g]),w=c(e=>{e.preventDefault(),e.stopPropagation();const t=k.getBlockSlate(p,{id:u});if(!t||!g)return;const n=p.y("accordion-list-item",{props:{isExpanded:!1},children:[p.y("accordion-list-item-heading"),p.y("accordion-list-item-content")]});R.withoutNormalizing(t,()=>{const e=z.next(g);D.insertNodes(t,n,{at:e});const r=[...e,0,0];setTimeout(()=>{D.select(t,{offset:0,path:r})},0)})},[p,u,g]);return n("div",Object.assign({},i,{className:"flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all px-5"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:a})),n("div",Object.assign({className:"flex shrink-0 items-center gap-1",contentEditable:!1},{children:[e("button",Object.assign({type:"button",contentEditable:!1,onClick:w,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Add accordion item"},{children:e(rn,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),e("button",Object.assign({type:"button",contentEditable:!1,onClick:v,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Delete accordion item"},{children:e(cn,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),e(Ot,Object.assign({type:"button",contentEditable:!1,"data-slot":"accordion-trigger",onClick:b,className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:e(Ht,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200 "+(m?"rotate-180":"")})}))]}))]}))}},"accordion-list-item-content":{render:t=>{const{attributes:n,children:r}=t;return e(St,Object.assign({},n,{className:"text-muted-foreground px-5"},{children:r}))}}},gn={blockquote:{render:t=>{const{attributes:n,children:r}=t;return e("blockquote",Object.assign({},n,{className:"mt-6 border-l-2 pl-6"},{children:r}))}}};function mn(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=mn(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=mn(e))&&(r&&(r+=" "),r+=t);return r}const vn=e=>{const t=kn(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),wn(n,t)||xn(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},wn=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?wn(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},yn=/^\[(.+)\]$/,xn=e=>{if(yn.test(e)){const t=yn.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},kn=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Sn(Object.entries(e.classGroups),n).forEach(([e,n])=>{Nn(n,r,e,t)}),r},Nn=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Cn(t,e)).classGroupId=n)}if("function"==typeof e)return On(e)?void Nn(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,o])=>{Nn(o,Cn(t,e),n,r)})})},Cn=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},On=e=>e.isThemeGetter,Sn=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,En=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},jn=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,a=e=>{const n=[];let a,s=0,l=0;for(let c=0;c<e.length;c++){let d=e[c];if(0===s){if(d===o&&(r||e.slice(c,c+i)===t)){n.push(e.slice(l,c)),l=c+i;continue}if("/"===d){a=c;continue}}"["===d?s++:"]"===d&&s--}const c=0===n.length?e:e.substring(l),d=c.startsWith("!");return{modifiers:n,hasImportantModifier:d,baseClassName:d?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return n?e=>n({className:e,parseClassName:a}):a},Rn=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},zn=/\s+/;function Dn(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Pn(e))&&(r&&(r+=" "),r+=t);return r}const Pn=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Pn(e[r]))&&(n&&(n+=" "),n+=t);return n};function Mn(e,...t){let n,r,o,i=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:En(e.cacheSize),parseClassName:jn(e),...vn(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(zn);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=n(t);let p=Boolean(u),h=r(p?d.substring(0,u):d);if(!h){if(!p){s=t+(s.length>0?" "+s:s);continue}if(h=r(d),!h){s=t+(s.length>0?" "+s:s);continue}p=!1}const f=Rn(l).join(":"),g=c?f+"!":f,m=g+h;if(i.includes(m))continue;i.push(m);const b=o(h,p);for(let e=0;e<b.length;++e){const t=b[e];i.push(g+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(Dn.apply(null,arguments))}}const Tn=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},In=/^\[(?:([a-z-]+):)?(.+)\]$/i,_n=/^\d+\/\d+$/,An=new Set(["px","full","screen"]),Ln=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Fn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Un=e=>$n(e)||An.has(e)||_n.test(e),Vn=e=>or(e,"length",ir),$n=e=>Boolean(e)&&!Number.isNaN(Number(e)),Xn=e=>or(e,"number",$n),Yn=e=>Boolean(e)&&Number.isInteger(Number(e)),Kn=e=>e.endsWith("%")&&$n(e.slice(0,-1)),Gn=e=>In.test(e),qn=e=>Ln.test(e),Zn=new Set(["length","size","percentage"]),Jn=e=>or(e,Zn,ar),Qn=e=>or(e,"position",ar),er=new Set(["image","url"]),tr=e=>or(e,er,lr),nr=e=>or(e,"",sr),rr=()=>!0,or=(e,t,n)=>{const r=In.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},ir=e=>Hn.test(e)&&!Fn.test(e),ar=()=>!1,sr=e=>Wn.test(e),lr=e=>Bn.test(e),cr=Mn(()=>{const e=Tn("colors"),t=Tn("spacing"),n=Tn("blur"),r=Tn("brightness"),o=Tn("borderColor"),i=Tn("borderRadius"),a=Tn("borderSpacing"),s=Tn("borderWidth"),l=Tn("contrast"),c=Tn("grayscale"),d=Tn("hueRotate"),u=Tn("invert"),p=Tn("gap"),h=Tn("gradientColorStops"),f=Tn("gradientColorStopPositions"),g=Tn("inset"),m=Tn("margin"),b=Tn("opacity"),v=Tn("padding"),w=Tn("saturate"),y=Tn("scale"),x=Tn("sepia"),k=Tn("skew"),N=Tn("space"),C=Tn("translate"),O=()=>["auto",Gn,t],S=()=>[Gn,t],E=()=>["",Un,Vn],j=()=>["auto",$n,Gn],R=()=>["","0",Gn],z=()=>[$n,Gn];return{cacheSize:500,separator:":",theme:{colors:[rr],spacing:[Un,Vn],blur:["none","",qn,Gn],brightness:z(),borderColor:[e],borderRadius:["none","","full",qn,Gn],borderSpacing:S(),borderWidth:E(),contrast:z(),grayscale:R(),hueRotate:z(),invert:R(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[Kn,Vn],inset:O(),margin:O(),opacity:z(),padding:S(),saturate:z(),scale:z(),sepia:R(),skew:z(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",Gn]}],container:["container"],columns:[{columns:[qn]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Gn]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Yn,Gn]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Gn]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",Yn,Gn]}],"grid-cols":[{"grid-cols":[rr]}],"col-start-end":[{col:["auto",{span:["full",Yn,Gn]},Gn]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[rr]}],"row-start-end":[{row:["auto",{span:[Yn,Gn]},Gn]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Gn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Gn]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Gn,t]}],"min-w":[{"min-w":[Gn,t,"min","max","fit"]}],"max-w":[{"max-w":[Gn,t,"none","full","min","max","fit","prose",{screen:[qn]},qn]}],h:[{h:[Gn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Gn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Gn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Gn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",qn,Vn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xn]}],"font-family":[{font:[rr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Gn]}],"line-clamp":[{"line-clamp":["none",$n,Xn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Un,Gn]}],"list-image":[{"list-image":["none",Gn]}],"list-style-type":[{list:["none","disc","decimal",Gn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Un,Vn]}],"underline-offset":[{"underline-offset":["auto",Un,Gn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Gn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Gn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Qn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Jn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},tr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Un,Gn]}],"outline-w":[{outline:[Un,Vn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Un,Vn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",qn,nr]}],"shadow-color":[{shadow:[rr]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",qn,Gn]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Gn]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",Gn]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",Gn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[Yn,Gn]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Gn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Gn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Gn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Un,Vn,Xn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function dr(...e){return cr(bn(e))}const ur=(e="default")=>({default:"bg-muted text-muted-foreground",info:"bg-blue-50 text-blue-900 border-blue-200 dark:bg-blue-950 dark:text-blue-100 dark:border-blue-800",success:"bg-green-50 text-green-900 border-green-200 dark:bg-green-950 dark:text-green-100 dark:border-green-800",warning:"bg-yellow-50 text-yellow-900 border-yellow-200 dark:bg-yellow-950 dark:text-yellow-100 dark:border-yellow-800",error:"bg-red-50 text-red-900 border-red-200 dark:bg-red-950 dark:text-red-100 dark:border-red-800"}[e]),pr={callout:{render:t=>{var n,r;const{attributes:o,children:i,element:a}=t,s=null!==(r=null===(n=a.props)||void 0===n?void 0:n.theme)&&void 0!==r?r:"default";return e("div",Object.assign({},o,{className:dr("relative rounded-lg border-l-4 p-4 [&>p]:m-0 [&>p]:text-sm",ur(s))},{children:i}))}}};function hr(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function fr(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&n.every(n=>{const r=e[n],o=t[n];return"function"==typeof r?`${r}`==`${o}`:hr(r)&&hr(o)?fr(r,o):r===o})}function gr(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function mr(e){return"number"==typeof e}function br(e){return"string"==typeof e}function vr(e){return"boolean"==typeof e}function wr(e){return"[object Object]"===Object.prototype.toString.call(e)}function yr(e){return Math.abs(e)}function xr(e){return Math.sign(e)}function kr(e,t){return yr(e-t)}function Nr(e){return jr(e).map(Number)}function Cr(e){return e[Or(e)]}function Or(e){return Math.max(0,e.length-1)}function Sr(e,t){return t===Or(e)}function Er(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function jr(e){return Object.keys(e)}function Rr(e,t){return[e,t].reduce((e,t)=>(jr(t).forEach(n=>{const r=e[n],o=t[n],i=wr(r)&&wr(o);e[n]=i?Rr(r,o):o}),e),{})}function zr(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function Dr(){let e=[];const t={add:function(n,r,o,i={passive:!0}){let a;if("addEventListener"in n)n.addEventListener(r,o,i),a=()=>n.removeEventListener(r,o,i);else{const e=n;e.addListener(o),a=()=>e.removeListener(o)}return e.push(a),t},clear:function(){e=e.filter(e=>e())}};return t}function Pr(e,t,n,r){const o=Dr(),i=1e3/60;let a=null,s=0,l=0;function c(e){if(!l)return;a||(a=e,n(),n());const o=e-a;for(a=e,s+=o;s>=i;)n(),s-=i;r(s/i),l&&(l=t.requestAnimationFrame(c))}function d(){t.cancelAnimationFrame(l),a=null,s=0,l=0}return{init:function(){o.add(e,"visibilitychange",()=>{e.hidden&&(a=null,s=0)})},destroy:function(){d(),o.clear()},start:function(){l||(l=t.requestAnimationFrame(c))},stop:d,update:n,render:r}}function Mr(e=0,t=0){const n=yr(e-t);function r(t){return t<e}function o(e){return e>t}function i(e){return r(e)||o(e)}return{length:n,max:t,min:e,constrain:function(n){return i(n)?r(n)?e:t:n},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(e){return n?e-n*Math.ceil((e-t)/n):e}}}function Tr(e,t,n){const{constrain:r}=Mr(0,e),o=e+1;let i=a(t);function a(e){return n?yr((o+e)%o):r(e)}function s(){return i}function l(){return Tr(e,s(),n)}const c={get:s,set:function(e){return i=a(e),c},add:function(e){return l().set(s()+e)},clone:l};return c}function Ir(e,t,n,r,o,i,a,s,l,c,d,u,p,h,f,g,m,b,v){const{cross:w,direction:y}=e,x=["INPUT","SELECT","TEXTAREA"],k={passive:!1},N=Dr(),C=Dr(),O=Mr(50,225).constrain(h.measure(20)),S={mouse:300,touch:400},E={mouse:500,touch:600},j=f?43:25;let R=!1,z=0,D=0,P=!1,M=!1,T=!1,I=!1;function _(e){if(!zr(e,r)&&e.touches.length>=2)return A(e);const t=i.readPoint(e),n=i.readPoint(e,w),a=kr(t,z),l=kr(n,D);if(!M&&!I){if(!e.cancelable)return A(e);if(M=a>l,!M)return A(e)}const d=i.pointerMove(e);a>g&&(T=!0),c.useFriction(.3).useDuration(.75),s.start(),o.add(y(d)),e.preventDefault()}function A(e){const t=d.byDistance(0,!1).index!==u.get(),n=i.pointerUp(e)*(f?E:S)[I?"mouse":"touch"],r=function(e,t){const n=u.add(-1*xr(e)),r=d.byDistance(e,!f).distance;return f||yr(e)<O?r:m&&t?.5*r:d.byIndex(n.get(),0).distance}(y(n),t),o=function(e,t){if(0===e||0===t)return 0;if(yr(e)<=yr(t))return 0;const n=kr(yr(e),yr(t));return yr(n/e)}(n,r),a=j-10*o,s=b+o/50;M=!1,P=!1,C.clear(),c.useDuration(a).useFriction(s),l.distance(r,!f),I=!1,p.emit("pointerUp")}function L(e){T&&(e.stopPropagation(),e.preventDefault(),T=!1)}return{init:function(e){if(!v)return;function s(s){(vr(v)||v(e,s))&&function(e){const s=zr(e,r);if(I=s,T=f&&s&&!e.buttons&&R,R=kr(o.get(),a.get())>=2,s&&0!==e.button)return;if(function(e){const t=e.nodeName||"";return x.includes(t)}(e.target))return;P=!0,i.pointerDown(e),c.useFriction(0).useDuration(0),o.set(a),function(){const e=I?n:t;C.add(e,"touchmove",_,k).add(e,"touchend",A).add(e,"mousemove",_,k).add(e,"mouseup",A)}(),z=i.readPoint(e),D=i.readPoint(e,w),p.emit("pointerDown")}(s)}const l=t;N.add(l,"dragstart",e=>e.preventDefault(),k).add(l,"touchmove",()=>{},k).add(l,"touchend",()=>{}).add(l,"touchstart",s).add(l,"mousedown",s).add(l,"touchcancel",A).add(l,"contextmenu",A).add(l,"click",L,!0)},destroy:function(){N.clear(),C.clear()},pointerDown:function(){return P}}}function _r(e,t){let n,r;function o(e){return e.timeStamp}function i(n,r){const o="client"+("x"===(r||e.scroll)?"X":"Y");return(zr(n,t)?n:n.touches[0])[o]}return{pointerDown:function(e){return n=e,r=e,i(e)},pointerMove:function(e){const t=i(e)-i(r),a=o(e)-o(n)>170;return r=e,a&&(n=e),t},pointerUp:function(e){if(!n||!r)return 0;const t=i(r)-i(n),a=o(e)-o(n),s=o(e)-o(r)>170,l=t/a;return a&&!s&&yr(l)>.1?l:0},readPoint:i}}function Ar(e,t,n,r,o,i,a){const s=[e].concat(r);let l,c,d=[],u=!1;function p(e){return o.measureSize(a.measure(e))}return{init:function(o){i&&(c=p(e),d=r.map(p),l=new ResizeObserver(n=>{(vr(i)||i(o,n))&&function(n){for(const i of n){if(u)return;const n=i.target===e,a=r.indexOf(i.target),s=n?c:d[a];if(yr(p(n?e:r[a])-s)>=.5){o.reInit(),t.emit("resize");break}}}(n)}),n.requestAnimationFrame(()=>{s.forEach(e=>l.observe(e))}))},destroy:function(){u=!0,l&&l.disconnect()}}}function Lr(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=Mr(.1,.99);let l=!1;function c(){return!l&&(!!e.reachedAny(n.get())&&!!e.reachedAny(t.get()))}return{shouldConstrain:c,constrain:function(o){if(!c())return;const l=e.reachedMin(t.get())?"min":"max",d=yr(e[l]-t.get()),u=n.get()-t.get(),p=s.constrain(d/a);n.subtract(u*p),!o&&yr(u)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(e){l=!e}}}function Hr(e,t,n,r){const o=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:s}=Mr(o,i);return{loop:function(t){if(!function(e){return 1===e?s(n.get()):-1===e&&a(n.get())}(t))return;const o=e*(-1*t);r.forEach(e=>e.add(o))}}}function Fr(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function l(e){return e.concat().sort((e,t)=>yr(e)-yr(t))[0]}function c(t,r){const o=[t,t+n,t-n];if(!e)return t;if(!r)return l(o);const i=o.filter(e=>xr(e)===r);return i.length?l(i):Cr(o)-n}const d={byDistance:function(n,r){const l=o.get()+n,{index:d,distance:u}=function(n){const r=e?a(n):s(n),o=t.map((e,t)=>({diff:c(e-r,0),index:t})).sort((e,t)=>yr(e.diff)-yr(t.diff)),{index:i}=o[0];return{index:i,distance:r}}(l),p=!e&&i(l);return!r||p?{index:d,distance:n}:{index:d,distance:n+c(t[d]-u,0)}},byIndex:function(e,n){return{index:e,distance:c(t[e]-o.get(),n)}},shortcut:c};return d}function Wr(e,t,n,r,o,i,a,s){const l={passive:!0,capture:!0};let c=0;function d(e){"Tab"===e.code&&(c=(new Date).getTime())}const u={init:function(u){s&&(i.add(document,"keydown",d,!1),t.forEach((t,d)=>{i.add(t,"focus",t=>{(vr(s)||s(u,t))&&function(t){if((new Date).getTime()-c>10)return;a.emit("slideFocusStart"),e.scrollLeft=0;const i=n.findIndex(e=>e.includes(t));mr(i)&&(o.useDuration(0),r.index(i,0),a.emit("slideFocus"))}(d)},l)}))}};return u}function Br(e){let t=e;function n(e){return mr(e)?e:e.get()}return{get:function(){return t},set:function(e){t=n(e)},add:function(e){t+=n(e)},subtract:function(e){t-=n(e)}}}function Ur(e,t){const n="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},r=t.style;let o=null,i=!1;return{clear:function(){i||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const a=(s=e.direction(t),Math.round(100*s)/100);var s;a!==o&&(r.transform=n(a),o=a)},toggleActive:function(e){i=!e}}}function Vr(e,t,n,r,o,i,a,s,l){const c=Nr(o),d=Nr(o).reverse(),u=function(){const e=a[0];return f(h(d,e),n,!1)}().concat(function(){const e=t-a[0]-1;return f(h(c,e),-n,!0)}());function p(e,t){return e.reduce((e,t)=>e-o[t],t)}function h(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function f(o,a,c){const d=function(e){return i.map((n,o)=>({start:n-r[o]+.5+e,end:n+t-.5+e}))}(a);return o.map(t=>{const r=c?0:-n,o=c?n:0,i=c?"end":"start",a=d[t][i];return{index:t,loopPoint:a,slideLocation:Br(-1),translate:Ur(e,l[t]),target:()=>s.get()>a?r:o}})}const g={canLoop:function(){return u.every(({index:e})=>p(c.filter(t=>t!==e),t)<=.1)},clear:function(){u.forEach(e=>e.translate.clear())},loop:function(){u.forEach(e=>{const{target:t,translate:n,slideLocation:r}=e,o=t();o!==r.get()&&(n.to(o),r.set(o))})},loopPoints:u};return g}function $r(e,t,n){let r,o=!1;return{init:function(i){n&&(r=new MutationObserver(e=>{o||(vr(n)||n(i,e))&&function(e){for(const n of e)if("childList"===n.type){i.reInit(),t.emit("slidesChanged");break}}(e)}),r.observe(e,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function Xr(e,t,n,r){const o={};let i,a=null,s=null,l=!1;const c={init:function(){i=new IntersectionObserver(e=>{l||(e.forEach(e=>{const n=t.indexOf(e.target);o[n]=e}),a=null,s=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(e=>i.observe(e))},destroy:function(){i&&i.disconnect(),l=!0},get:function(e=!0){if(e&&a)return a;if(!e&&s)return s;const t=function(e){return jr(o).reduce((t,n)=>{const r=parseInt(n),{isIntersecting:i}=o[r];return(e&&i||!e&&!i)&&t.push(r),t},[])}(e);return e&&(a=t),e||(s=t),t}};return c}function Yr(e,t,n,r,o,i,a,s,l){const{startEdge:c,endEdge:d,direction:u}=e,p=mr(n);const h={groupSlides:function(e){return p?function(e,t){return Nr(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}(e,n):function(e){return e.length?Nr(e).reduce((n,p,h)=>{const f=Cr(n)||0,g=0===f,m=p===Or(e),b=o[c]-i[f][c],v=o[c]-i[p][d],w=!r&&g?u(a):0,y=yr(v-(!r&&m?u(s):0)-(b+w));return h&&y>t+l&&n.push(p),m&&n.push(e.length),n},[]).map((t,n,r)=>{const o=Math.max(r[n-1]||0);return e.slice(o,t)}):[]}(e)}};return h}function Kr(e,t,n,r,o,i,a){const{align:s,axis:l,direction:c,startIndex:d,loop:u,duration:p,dragFree:h,dragThreshold:f,inViewThreshold:g,slidesToScroll:m,skipSnaps:b,containScroll:v,watchResize:w,watchSlides:y,watchDrag:x,watchFocus:k}=i,N={measure:function(e){const{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:o}=e;return{top:t,right:n+r,bottom:t+o,left:n,width:r,height:o}}},C=N.measure(t),O=n.map(N.measure),S=function(e,t){const n="rtl"===t,r="y"===e,o=!r&&n?-1:1;return{scroll:r?"y":"x",cross:r?"x":"y",startEdge:r?"top":n?"right":"left",endEdge:r?"bottom":n?"left":"right",measureSize:function(e){const{height:t,width:n}=e;return r?t:n},direction:function(e){return e*o}}}(l,c),E=S.measureSize(C),j=function(e){return{measure:function(t){return e*(t/100)}}}(E),R=function(e,t){const n={start:function(){return 0},center:function(e){return r(e)/2},end:r};function r(e){return t-e}const o={measure:function(r,o){return br(e)?n[e](r):e(t,r,o)}};return o}(s,E),z=!u&&!!v,D=u||!!v,{slideSizes:P,slideSizesWithGaps:M,startGap:T,endGap:I}=function(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&o,d=function(){if(!c)return 0;const e=n[0];return yr(t[s]-e[s])}(),u=function(){if(!c)return 0;const e=i.getComputedStyle(Cr(r));return parseFloat(e.getPropertyValue(`margin-${l}`))}(),p=n.map(a),h=n.map((e,t,n)=>{const r=!t,o=Sr(n,t);return r?p[t]+d:o?p[t]+u:n[t+1][s]-e[s]}).map(yr);return{slideSizes:p,slideSizesWithGaps:h,startGap:d,endGap:u}}(S,C,O,n,D,o),_=Yr(S,E,m,u,C,O,T,I,2),{snaps:A,snapsAligned:L}=function(e,t,n,r,o){const{startEdge:i,endEdge:a}=e,{groupSlides:s}=o,l=s(r).map(e=>Cr(e)[a]-e[0][i]).map(yr).map(t.measure),c=r.map(e=>n[i]-e[i]).map(e=>-yr(e)),d=s(c).map(e=>e[0]).map((e,t)=>e+l[t]);return{snaps:c,snapsAligned:d}}(S,R,C,O,_),H=-Cr(A)+Cr(M),{snapsContained:F,scrollContainLimit:W}=function(e,t,n,r,o){const i=Mr(-t+e,0),a=n.map((e,t)=>{const{min:r,max:o}=i,a=i.constrain(e),s=!t,l=Sr(n,t);return s?o:l||c(r,a)?r:c(o,a)?o:a}).map(e=>parseFloat(e.toFixed(3))),s=function(){const e=a[0],t=Cr(a);return Mr(a.lastIndexOf(e),a.indexOf(t)+1)}(),l=function(){if(t<=e+o)return[i.max];if("keepSnaps"===r)return a;const{min:n,max:l}=s;return a.slice(n,l)}();function c(e,t){return kr(e,t)<=1}return{snapsContained:l,scrollContainLimit:s}}(E,H,L,v,2),B=z?F:L,{limit:U}=function(e,t,n){const r=t[0];return{limit:Mr(n?r-e:Cr(t),r)}}(H,B,u),V=Tr(Or(B),d,u),$=V.clone(),X=Nr(n),Y=Pr(r,o,()=>(({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()})(se),e=>(({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:o,scrollLooper:i,slideLooper:a,dragHandler:s,animation:l,eventHandler:c,scrollBounds:d,options:{loop:u}},p)=>{const h=e.settled(),f=!d.shouldConstrain(),g=u?h:h&&f,m=g&&!s.pointerDown();m&&l.stop();const b=n.get()*p+o.get()*(1-p);r.set(b),u&&(i.loop(e.direction()),a.loop()),t.to(r.get()),m&&c.emit("settle"),g||c.emit("scroll")})(se,e)),K=B[V.get()],G=Br(K),q=Br(K),Z=Br(K),J=Br(K),Q=function(e,t,n,r,o,i){let a=0,s=0,l=o,c=i,d=e.get(),u=0;function p(e){return l=e,f}function h(e){return c=e,f}const f={direction:function(){return s},duration:function(){return l},velocity:function(){return a},seek:function(){const t=r.get()-e.get();let o=0;return l?(n.set(e),a+=t/l,a*=c,d+=a,e.add(a),o=d-u):(a=0,n.set(r),e.set(r),o=t),s=xr(o),u=d,f},settled:function(){return yr(r.get()-t.get())<.001},useBaseFriction:function(){return h(i)},useBaseDuration:function(){return p(o)},useFriction:h,useDuration:p};return f}(G,Z,q,J,p,.68),ee=Fr(u,B,H,U,J),te=function(e,t,n,r,o,i,a){function s(o){const s=o.distance,l=o.index!==t.get();i.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),l&&(n.set(t.get()),t.set(o.index),a.emit("select"))}const l={distance:function(e,t){s(o.byDistance(e,t))},index:function(e,n){const r=t.clone().set(e);s(o.byIndex(r.get(),n))}};return l}(Y,V,$,Q,ee,J,a),ne=function(e){const{max:t,length:n}=e;return{get:function(e){return n?(e-t)/-n:0}}}(U),re=Dr(),oe=Xr(t,n,a,g),{slideRegistry:ie}=function(e,t,n,r,o,i){const{groupSlides:a}=o,{min:s,max:l}=r,c=function(){const r=a(i),o=!e||"keepSnaps"===t;return 1===n.length?[i]:o?r:r.slice(s,l).map((e,t,n)=>{const r=!t,o=Sr(n,t);return r?Er(Cr(n[0])+1):o?Er(Or(i)-Cr(n)[0]+1,Cr(n)[0]):e})}();return{slideRegistry:c}}(z,v,B,W,_,X),ae=Wr(e,n,ie,te,Q,re,a,k),se={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:C,slideRects:O,animation:Y,axis:S,dragHandler:Ir(S,e,r,o,J,_r(S,o),G,Y,te,Q,ee,V,a,j,h,f,b,.68,x),eventStore:re,percentOfView:j,index:V,indexPrevious:$,limit:U,location:G,offsetLocation:Z,previousLocation:q,options:i,resizeHandler:Ar(t,a,o,n,S,w,N),scrollBody:Q,scrollBounds:Lr(U,Z,J,Q,j),scrollLooper:Hr(H,U,Z,[G,Z,q,J]),scrollProgress:ne,scrollSnapList:B.map(ne.get),scrollSnaps:B,scrollTarget:ee,scrollTo:te,slideLooper:Vr(S,E,H,P,M,A,B,Z,n),slideFocus:ae,slidesHandler:$r(t,a,y),slidesInView:oe,slideIndexes:X,slideRegistry:ie,slidesToScroll:_,target:J,translate:Ur(S,t)};return se}const Gr={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function qr(e){function t(e,t){return Rr(e,t||{})}const n={mergeOptions:t,optionsAtMedia:function(n){const r=n.breakpoints||{},o=jr(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{});return t(n,o)},optionsMediaQueries:function(t){return t.map(e=>jr(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}};return n}function Zr(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=qr(o),a=function(e){let t=[];const n={init:function(n,r){return t=r.filter(({options:t})=>!1!==e.optionsAtMedia(t).active),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){t=t.filter(e=>e.destroy())}};return n}(i),s=Dr(),l=function(){let e,t={};function n(e){return t[e]||[]}const r={init:function(t){e=t},emit:function(t){return n(t).forEach(n=>n(e,t)),r},off:function(e,o){return t[e]=n(e).filter(e=>e!==o),r},on:function(e,o){return t[e]=n(e).concat([o]),r},clear:function(){t={}}};return r}(),{mergeOptions:c,optionsAtMedia:d,optionsMediaQueries:u}=i,{on:p,off:h,emit:f}=l,g=S;let m,b,v,w,y=!1,x=c(Gr,Zr.globalOptions),k=c(x),N=[];function C(t){const n=Kr(e,v,w,r,o,t,l);if(t.loop&&!n.slideLooper.canLoop()){return C(Object.assign({},t,{loop:!1}))}return n}function O(t,n){y||(x=c(x,t),k=d(x),N=n||N,function(){const{container:t,slides:n}=k,r=br(t)?e.querySelector(t):t;v=r||e.children[0];const o=br(n)?v.querySelectorAll(n):n;w=[].slice.call(o||v.children)}(),m=C(k),u([x,...N.map(({options:e})=>e)]).forEach(e=>s.add(e,"change",S)),k.active&&(m.translate.to(m.location.get()),m.animation.init(),m.slidesInView.init(),m.slideFocus.init(z),m.eventHandler.init(z),m.resizeHandler.init(z),m.slidesHandler.init(z),m.options.loop&&m.slideLooper.loop(),v.offsetParent&&w.length&&m.dragHandler.init(z),b=a.init(z,N)))}function S(e,t){const n=R();E(),O(c({startIndex:n},e),t),l.emit("reInit")}function E(){m.dragHandler.destroy(),m.eventStore.clear(),m.translate.clear(),m.slideLooper.clear(),m.resizeHandler.destroy(),m.slidesHandler.destroy(),m.slidesInView.destroy(),m.animation.destroy(),a.destroy(),s.clear()}function j(e,t,n){k.active&&!y&&(m.scrollBody.useBaseFriction().useDuration(!0===t?0:k.duration),m.scrollTo.index(e,n||0))}function R(){return m.index.get()}const z={canScrollNext:function(){return m.index.add(1).get()!==R()},canScrollPrev:function(){return m.index.add(-1).get()!==R()},containerNode:function(){return v},internalEngine:function(){return m},destroy:function(){y||(y=!0,s.clear(),E(),l.emit("destroy"),l.clear())},off:h,on:p,emit:f,plugins:function(){return b},previousScrollSnap:function(){return m.indexPrevious.get()},reInit:g,rootNode:function(){return e},scrollNext:function(e){j(m.index.add(1).get(),e,-1)},scrollPrev:function(e){j(m.index.add(-1).get(),e,1)},scrollProgress:function(){return m.scrollProgress.get(m.offsetLocation.get())},scrollSnapList:function(){return m.scrollSnapList},scrollTo:j,selectedScrollSnap:R,slideNodes:function(){return w},slidesInView:function(){return m.slidesInView.get()},slidesNotInView:function(){return m.slidesInView.get(!1)}};return O(t,n),setTimeout(()=>l.emit("init"),0),z}function Jr(e={},t=[]){const n=d(e),r=d(t),[o,i]=u(),[a,s]=u(),l=c(()=>{o&&o.reInit(n.current,r.current)},[o]);return p(()=>{fr(n.current,e)||(n.current=e,l())},[e,l]),p(()=>{(function(e,t){if(e.length!==t.length)return!1;const n=gr(e),r=gr(t);return n.every((e,t)=>fr(e,r[t]))})(r.current,t)||(r.current=t,l())},[t,l]),p(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&a){Zr.globalOptions=Jr.globalOptions;const e=Zr(a,n.current,r.current);return i(e),()=>e.destroy()}i(void 0)},[a,i]),[s,o]}Zr.globalOptions=void 0,Jr.globalOptions=void 0;const Qr=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,eo=bn,to=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return eo(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;const a=Qr(t)||Qr(r);return o[e][a]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...s}[t]):{...i,...s}[t]===n})?[...e,n,r]:e},[]);return eo(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)},no=to("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ro=r.forwardRef((t,n)=>{var{className:r,variant:o,size:i}=t,a=ie(t,["className","variant","size"]);return e("button",Object.assign({className:dr(no({variant:o,size:i,className:r})),ref:n},a))});ro.displayName="Button";const oo=h(null);function io(){const e=f(oo);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const ao=i((t,n)=>{var{orientation:r="horizontal",opts:o,setApi:i,plugins:a,className:s,children:d}=t,h=ie(t,["orientation","opts","setApi","plugins","className","children"]);const[f,g]=Jr(Object.assign(Object.assign({},o),{axis:"horizontal"===r?"x":"y"}),a),[m,b]=u(!1),[v,w]=u(!1),y=c(e=>{e&&(b(e.canScrollPrev()),w(e.canScrollNext()))},[]),x=c(()=>{null==g||g.scrollPrev()},[g]),k=c(()=>{null==g||g.scrollNext()},[g]),N=c(e=>{"ArrowLeft"===e.key?(e.preventDefault(),x()):"ArrowRight"===e.key&&(e.preventDefault(),k())},[x,k]);p(()=>{g&&i&&i(g)},[g,i]),p(()=>{if(g)return y(g),g.on("reInit",y),g.on("select",y),()=>{null==g||g.off("select",y)}},[g,y]);const C=l(()=>({carouselRef:f,api:g,opts:o,orientation:r||("y"===(null==o?void 0:o.axis)?"vertical":"horizontal"),scrollPrev:x,scrollNext:k,canScrollPrev:m,canScrollNext:v}),[f,g,o,r,x,k,m,v]);return e(oo.Provider,Object.assign({value:C},{children:e("div",Object.assign({onKeyDownCapture:N,className:dr("relative",s),role:"region","aria-roledescription":"carousel","data-slot":"carousel",ref:n},h,{children:d}))}))});ao.displayName="Carousel";const so=i((t,n)=>{var{className:r}=t,o=ie(t,["className"]);const{carouselRef:i,orientation:a}=io();return e("div",Object.assign({ref:i,className:"overflow-hidden","data-slot":"carousel-content"},{children:e("div",Object.assign({ref:n,className:dr("flex","horizontal"===a?"-ml-4":"-mt-4 flex-col",r)},o))}))});so.displayName="CarouselContent";const lo=i((t,n)=>{var{className:r}=t,o=ie(t,["className"]);const{orientation:i}=io();return e("div",Object.assign({ref:n,role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:dr("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",r)},o))});lo.displayName="CarouselItem";const co=t=>{var{className:r,variant:o="outline",size:i="icon"}=t,a=ie(t,["className","variant","size"]);const{orientation:s,scrollPrev:l,canScrollPrev:c}=io();return n(ro,Object.assign({"data-slot":"carousel-previous",variant:o,size:i,className:dr("absolute size-8 rounded-full","horizontal"===s?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",r),disabled:!c,onClick:l},a,{children:[e(It,{}),e("span",Object.assign({className:"sr-only"},{children:"Previous slide"}))]}))},uo=t=>{var{className:r,variant:o="outline",size:i="icon"}=t,a=ie(t,["className","variant","size"]);const{orientation:s,scrollNext:l,canScrollNext:c}=io();return n(ro,Object.assign({"data-slot":"carousel-next",variant:o,size:i,className:dr("absolute size-8 rounded-full","horizontal"===s?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",r),disabled:!c,onClick:l},a,{children:[e(_t,{}),e("span",Object.assign({className:"sr-only"},{children:"Next slide"}))]}))},po=r.forwardRef((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("div",Object.assign({ref:n,className:dr("rounded-xl border bg-card text-card-foreground shadow",r)},o))});po.displayName="Card";r.forwardRef((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("div",Object.assign({ref:n,className:dr("flex flex-col space-y-1.5 p-6",r)},o))}).displayName="CardHeader";r.forwardRef((t,n)=>{var{className:r,children:o}=t,i=ie(t,["className","children"]);return e("h3",Object.assign({ref:n,className:dr("font-semibold leading-none tracking-tight",r)},i,{children:o}))}).displayName="CardTitle";r.forwardRef((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("p",Object.assign({ref:n,className:dr("text-sm text-muted-foreground",r)},o))}).displayName="CardDescription";const ho=r.forwardRef((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("div",Object.assign({ref:n,className:dr("p-6 pt-0",r)},o))});ho.displayName="CardContent";r.forwardRef((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("div",Object.assign({ref:n,className:dr("flex items-center p-6 pt-0",r)},o))}).displayName="CardFooter";const fo={"carousel-container":{render:t=>{const{attributes:r,children:o}=t,[i,a]=u(),[s,l]=u(0),[c,d]=u(0);return p(()=>{i&&(d(i.scrollSnapList().length),l(i.selectedScrollSnap()+1),i.on("select",()=>{l(i.selectedScrollSnap()+1)}))},[i]),e("div",Object.assign({className:"flex w-full justify-center data-[align=center]:items-center data-[align=end]:items-end data-[align=start]:items-start"},{children:n("div",Object.assign({className:"mx-auto\n "},{children:[n(ao,Object.assign({},r,{setApi:a,opts:{align:"start",axis:"x",loop:!0},orientation:"horizontal",className:"w-full max-w-lg"},{children:[e(so,{children:o}),e(co,{contentEditable:!1,className:"select-none"}),e(uo,{contentEditable:!1,className:"select-none"})]})),n("div",Object.assign({contentEditable:!1,className:"select-none text-muted-foreground py-2 text-center text-sm"},{children:["Slide ",s," of ",c]}))]}))}))}},"carousel-list-item":{render:t=>{const{children:n}=t;return e(lo,Object.assign({className:"md:basis-1/2 lg:basis-1/3"},{children:e("div",Object.assign({className:"p-1"},{children:e(po,{children:e(ho,Object.assign({className:"flex aspect-square items-center justify-center p-6"},{children:n}))})}))}))}}};function go(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var mo=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}},bo={"text/plain":"Text","text/html":"Url",default:"Text"};var vo=function(e,t){var n,r,o,i,a,s,l=!1;t||(t={}),n=t.debug||!1;try{if(o=mo(),i=document.createRange(),a=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=bo[t.format]||bo.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),s&&document.body.removeChild(s),o()}return l},wo=ne({__proto__:null,default:vo},[vo]);const yo=r.forwardRef((t,n)=>{var{className:r,type:o}=t,i=ie(t,["className","type"]);return e("input",Object.assign({type:o,className:dr("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:n},i))});function xo(e){const t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}yo.displayName="Input";var ko,No="dismissableLayer.update",Co="dismissableLayer.pointerDownOutside",Oo="dismissableLayer.focusOutside",So=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Eo=r.forwardRef((t,n)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=t,u=r.useContext(So),[p,h]=r.useState(null),f=p?.ownerDocument??globalThis?.document,[,g]=r.useState({}),m=ue(n,e=>h(e)),b=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=b.indexOf(v),y=p?b.indexOf(p):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,k=y>=w,N=function(e,t=globalThis?.document){const n=xo(e),o=r.useRef(!1),i=r.useRef(()=>{});return r.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let r=function(){Ro(Co,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);o.current=!1},r=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,n=[...u.branches].some(e=>e.contains(t));k&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())},f),C=function(e,t=globalThis?.document){const n=xo(e),o=r.useRef(!1);return r.useEffect(()=>{const e=e=>{if(e.target&&!o.current){Ro(Oo,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||c?.())},f);return function(e,t=globalThis?.document){const n=xo(e);r.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{y===u.layers.size-1&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},f),r.useEffect(()=>{if(p)return o&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(ko=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),jo(),()=>{o&&1===u.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=ko)}},[p,f,o,u]),r.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),jo())},[p,u]),r.useEffect(()=>{const e=()=>g({});return document.addEventListener(No,e),()=>document.removeEventListener(No,e)},[]),e(xe.div,{...d,ref:m,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:be(t.onFocusCapture,C.onFocusCapture),onBlurCapture:be(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:be(t.onPointerDownCapture,N.onPointerDownCapture)})});Eo.displayName="DismissableLayer";function jo(){const e=new CustomEvent(No);document.dispatchEvent(e)}function Ro(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ke(o,i):o.dispatchEvent(i)}r.forwardRef((t,n)=>{const o=r.useContext(So),i=r.useRef(null),a=ue(n,i);return r.useEffect(()=>{const e=i.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),e(xe.div,{...t,ref:a})}).displayName="DismissableLayerBranch";var zo=0;function Do(){r.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Po()),document.body.insertAdjacentElement("beforeend",e[1]??Po()),zo++,()=>{1===zo&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),zo--}},[])}function Po(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Mo="focusScope.autoFocusOnMount",To="focusScope.autoFocusOnUnmount",Io={bubbles:!1,cancelable:!0},_o=r.forwardRef((t,n)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=t,[c,d]=r.useState(null),u=xo(a),p=xo(s),h=r.useRef(null),f=ue(n,e=>d(e)),g=r.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;r.useEffect(()=>{if(i){let e=function(e){if(g.paused||!c)return;const t=e.target;c.contains(t)?h.current=t:Fo(h.current,{select:!0})},t=function(e){if(g.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||Fo(h.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Fo(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[i,c,g.paused]),r.useEffect(()=>{if(c){Wo.add(g);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(Mo,Io);c.addEventListener(Mo,u),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fo(r,{select:t}),document.activeElement!==n)return}((e=Ao(c),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Fo(c))}return()=>{c.removeEventListener(Mo,u),setTimeout(()=>{const e=new CustomEvent(To,Io);c.addEventListener(To,p),c.dispatchEvent(e),e.defaultPrevented||Fo(t??document.body,{select:!0}),c.removeEventListener(To,p),Wo.remove(g)},0)}}var e},[c,u,p,g]);const m=r.useCallback(e=>{if(!o&&!i)return;if(g.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,i]=function(e){const t=Ao(e),n=Lo(t,e),r=Lo(t.reverse(),e);return[n,r]}(t);r&&i?e.shiftKey||n!==i?e.shiftKey&&n===r&&(e.preventDefault(),o&&Fo(i,{select:!0})):(e.preventDefault(),o&&Fo(r,{select:!0})):n===t&&e.preventDefault()}},[o,i,g.paused]);return e(xe.div,{tabIndex:-1,...l,ref:f,onKeyDown:m})});function Ao(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Lo(e,t){for(const n of e)if(!Ho(n,{upTo:t}))return n}function Ho(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Fo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}_o.displayName="FocusScope";var Wo=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Bo(e,t),e.unshift(t)},remove(t){e=Bo(e,t),e[0]?.resume()}}}();function Bo(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}const Uo=["top","right","bottom","left"],Vo=Math.min,$o=Math.max,Xo=Math.round,Yo=Math.floor,Ko=e=>({x:e,y:e}),Go={left:"right",right:"left",bottom:"top",top:"bottom"},qo={start:"end",end:"start"};function Zo(e,t,n){return $o(e,Vo(t,n))}function Jo(e,t){return"function"==typeof e?e(t):e}function Qo(e){return e.split("-")[0]}function ei(e){return e.split("-")[1]}function ti(e){return"x"===e?"y":"x"}function ni(e){return"y"===e?"height":"width"}const ri=new Set(["top","bottom"]);function oi(e){return ri.has(Qo(e))?"y":"x"}function ii(e){return ti(oi(e))}function ai(e){return e.replace(/start|end/g,e=>qo[e])}const si=["left","right"],li=["right","left"],ci=["top","bottom"],di=["bottom","top"];function ui(e,t,n,r){const o=ei(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?li:si:t?si:li;case"left":case"right":return t?ci:di;default:return[]}}(Qo(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(ai)))),i}function pi(e){return e.replace(/left|right|bottom|top/g,e=>Go[e])}function hi(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function fi(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function gi(e,t,n){let{reference:r,floating:o}=e;const i=oi(t),a=ii(t),s=ni(a),l=Qo(t),c="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-o.width,y:u};break;default:h={x:r.x,y:r.y}}switch(ei(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function mi(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=Jo(t,e),f=hi(h),g=s[p?"floating"===u?"reference":"floating":u],m=fi(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),b="floating"===u?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),w=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},y=fi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:v,strategy:l}):b);return{top:(m.top-y.top+f.top)/w.y,bottom:(y.bottom-m.bottom+f.bottom)/w.y,left:(m.left-y.left+f.left)/w.x,right:(y.right-m.right+f.right)/w.x}}function bi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vi(e){return Uo.some(t=>e[t]>=0)}function wi(e){const t=Vo(...e.map(e=>e.left)),n=Vo(...e.map(e=>e.top));return{x:t,y:n,width:$o(...e.map(e=>e.right))-t,height:$o(...e.map(e=>e.bottom))-n}}const yi=new Set(["left","top"]);function xi(){return"undefined"!=typeof window}function ki(e){return Oi(e)?(e.nodeName||"").toLowerCase():"#document"}function Ni(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ci(e){var t;return null==(t=(Oi(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Oi(e){return!!xi()&&(e instanceof Node||e instanceof Ni(e).Node)}function Si(e){return!!xi()&&(e instanceof Element||e instanceof Ni(e).Element)}function Ei(e){return!!xi()&&(e instanceof HTMLElement||e instanceof Ni(e).HTMLElement)}function ji(e){return!(!xi()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ni(e).ShadowRoot)}const Ri=new Set(["inline","contents"]);function zi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Bi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ri.has(o)}const Di=new Set(["table","td","th"]);function Pi(e){return Di.has(ki(e))}const Mi=[":popover-open",":modal"];function Ti(e){return Mi.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Ii=["transform","translate","scale","rotate","perspective"],_i=["transform","translate","scale","rotate","perspective","filter"],Ai=["paint","layout","strict","content"];function Li(e){const t=Hi(),n=Si(e)?Bi(e):e;return Ii.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||_i.some(e=>(n.willChange||"").includes(e))||Ai.some(e=>(n.contain||"").includes(e))}function Hi(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Fi=new Set(["html","body","#document"]);function Wi(e){return Fi.has(ki(e))}function Bi(e){return Ni(e).getComputedStyle(e)}function Ui(e){return Si(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vi(e){if("html"===ki(e))return e;const t=e.assignedSlot||e.parentNode||ji(e)&&e.host||Ci(e);return ji(t)?t.host:t}function $i(e){const t=Vi(e);return Wi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ei(t)&&zi(t)?t:$i(t)}function Xi(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=$i(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ni(o);if(i){const e=Yi(a);return t.concat(a,a.visualViewport||[],zi(o)?o:[],e&&n?Xi(e):[])}return t.concat(o,Xi(o,[],n))}function Yi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ki(e){const t=Bi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ei(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Xo(n)!==i||Xo(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Gi(e){return Si(e)?e:e.contextElement}function qi(e){const t=Gi(e);if(!Ei(t))return Ko(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ki(t);let a=(i?Xo(n.width):n.width)/r,s=(i?Xo(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Zi=Ko(0);function Ji(e){const t=Ni(e);return Hi()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Zi}function Qi(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Gi(e);let a=Ko(1);t&&(r?Si(r)&&(a=qi(r)):a=qi(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ni(e))&&t}(i,n,r)?Ji(i):Ko(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){const e=Ni(i),t=r&&Si(r)?Ni(r):r;let n=e,o=Yi(n);for(;o&&r&&t!==n;){const e=qi(o),t=o.getBoundingClientRect(),r=Bi(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=i,c+=a,n=Ni(o),o=Yi(n)}}return fi({width:d,height:u,x:l,y:c})}function ea(e,t){const n=Ui(e).scrollLeft;return t?t.left+n:Qi(Ci(e)).left+n}function ta(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ea(e,n),y:n.top+t.scrollTop}}const na=new Set(["absolute","fixed"]);function ra(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ni(e),r=Ci(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Hi();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=ea(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Ci(e),n=Ui(e),r=e.ownerDocument.body,o=$o(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=$o(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ea(e);const s=-n.scrollTop;return"rtl"===Bi(r).direction&&(a+=$o(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Ci(e));else if(Si(t))r=function(e,t){const n=Qi(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ei(e)?qi(e):Ko(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Ji(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return fi(r)}function oa(e,t){const n=Vi(e);return!(n===t||!Si(n)||Wi(n))&&("fixed"===Bi(n).position||oa(n,t))}function ia(e,t,n){const r=Ei(t),o=Ci(t),i="fixed"===n,a=Qi(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Ko(0);function c(){l.x=ea(o)}if(r||!r&&!i)if(("body"!==ki(t)||zi(o))&&(s=Ui(t)),r){const e=Qi(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const d=!o||r||i?Ko(0):ta(o,s);return{x:a.left+s.scrollLeft-l.x-d.x,y:a.top+s.scrollTop-l.y-d.y,width:a.width,height:a.height}}function aa(e){return"static"===Bi(e).position}function sa(e,t){if(!Ei(e)||"fixed"===Bi(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ci(e)===n&&(n=n.ownerDocument.body),n}function la(e,t){const n=Ni(e);if(Ti(e))return n;if(!Ei(e)){let t=Vi(e);for(;t&&!Wi(t);){if(Si(t)&&!aa(t))return t;t=Vi(t)}return n}let r=sa(e,t);for(;r&&Pi(r)&&aa(r);)r=sa(r,t);return r&&Wi(r)&&aa(r)&&!Li(r)?n:r||function(e){let t=Vi(e);for(;Ei(t)&&!Wi(t);){if(Li(t))return t;if(Ti(t))return null;t=Vi(t)}return null}(e)||n}const ca={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Ci(r),s=!!t&&Ti(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ko(1);const d=Ko(0),u=Ei(r);if((u||!u&&!i)&&(("body"!==ki(r)||zi(a))&&(l=Ui(r)),Ei(r))){const e=Qi(r);c=qi(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const p=!a||u||i?Ko(0):ta(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-l.scrollTop*c.y+d.y+p.y}},getDocumentElement:Ci,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Ti(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Xi(e,[],!1).filter(e=>Si(e)&&"body"!==ki(e)),o=null;const i="fixed"===Bi(e).position;let a=i?Vi(e):e;for(;Si(a)&&!Wi(a);){const t=Bi(a),n=Li(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&na.has(o.position)||zi(a)&&!n&&oa(e,a))?r=r.filter(e=>e!==a):o=t,a=Vi(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce((e,n)=>{const r=ra(t,n,o);return e.top=$o(r.top,e.top),e.right=Vo(r.right,e.right),e.bottom=Vo(r.bottom,e.bottom),e.left=$o(r.left,e.left),e},ra(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:la,getElementRects:async function(e){const t=this.getOffsetParent||la,n=this.getDimensions,r=await n(e.floating);return{reference:ia(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Ki(e);return{width:t,height:n}},getScale:qi,isElement:Si,isRTL:function(e){return"rtl"===Bi(e).direction}};function da(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ua(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Gi(e),d=o||i?[...c?Xi(c):[],...Xi(t)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const u=c&&s?function(e,t){let n,r=null;const o=Ci(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:p,height:h}=c;if(s||t(),!p||!h)return;const f={rootMargin:-Yo(u)+"px "+-Yo(o.clientWidth-(d+p))+"px "+-Yo(o.clientHeight-(u+h))+"px "+-Yo(d)+"px",threshold:$o(0,Vo(1,l))||1};let g=!0;function m(t){const r=t[0].intersectionRatio;if(r!==l){if(!g)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||da(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let g=l?Qi(e):null;return l&&function t(){const r=Qi(e);g&&!da(g,r)&&n();g=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==u||u(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const pa=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Qo(n),s=ei(n),l="y"===oi(n),c=yi.has(a)?-1:1,d=i&&l?-1:1,u=Jo(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*d,y:p*c}:{x:p*c,y:h*d}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},ha=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Jo(e,t),c={x:n,y:r},d=await mi(t,l),u=oi(Qo(o)),p=ti(u);let h=c[p],f=c[u];if(i){const e="y"===p?"bottom":"right";h=Zo(h+d["y"===p?"top":"left"],h,h-d[e])}if(a){const e="y"===u?"bottom":"right";f=Zo(f+d["y"===u?"top":"left"],f,f-d[e])}const g=s.fn({...t,[p]:h,[u]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[u]:a}}}}}},fa=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=Jo(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const b=Qo(o),v=oi(s),w=Qo(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(w||!g?[pi(s)]:function(e){const t=pi(e);return[ai(e),t,ai(t)]}(s)),k="none"!==f;!p&&k&&x.push(...ui(s,g,f,y));const N=[s,...x],C=await mi(t,m),O=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&O.push(C[b]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=ei(e),o=ii(e),i=ni(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=pi(a)),[a,pi(a)]}(o,a,y);O.push(C[e[0]],C[e[1]])}if(S=[...S,{placement:o,overflows:O}],!O.every(e=>e<=0)){var E,j;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=N[e];if(t){if(!("alignment"===u&&v!==oi(t))||S.every(e=>oi(e.placement)!==v||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let n=null==(j=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:j.placement;if(!n)switch(h){case"bestFit":{var R;const e=null==(R=S.filter(e=>{if(k){const t=oi(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},ga=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Jo(e,t),d=await mi(t,c),u=Qo(o),p=ei(o),h="y"===oi(o),{width:f,height:g}=i.floating;let m,b;"top"===u||"bottom"===u?(m=u,b=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(b=u,m="end"===p?"top":"bottom");const v=g-d.top-d.bottom,w=f-d.left-d.right,y=Vo(g-d[m],v),x=Vo(f-d[b],w),k=!t.middlewareData.shift;let N=y,C=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(N=v),k&&!p){const e=$o(d.left,0),t=$o(d.right,0),n=$o(d.top,0),r=$o(d.bottom,0);h?C=f-2*(0!==e||0!==t?e+t:$o(d.left,d.right)):N=g-2*(0!==n||0!==r?n+r:$o(d.top,d.bottom))}await l({...t,availableWidth:C,availableHeight:N});const O=await a.getDimensions(s.floating);return f!==O.width||g!==O.height?{reset:{rects:!0}}:{}}}},ma=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Jo(e,t);switch(r){case"referenceHidden":{const e=bi(await mi(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:vi(e)}}}case"escaped":{const e=bi(await mi(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:vi(e)}}}default:return{}}}}},ba=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=Jo(e,t)||{};if(null==c)return{};const u=hi(d),p={x:n,y:r},h=ii(o),f=ni(h),g=await a.getDimensions(c),m="y"===h,b=m?"top":"left",v=m?"bottom":"right",w=m?"clientHeight":"clientWidth",y=i.reference[f]+i.reference[h]-p[h]-i.floating[f],x=p[h]-i.reference[h],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let N=k?k[w]:0;N&&await(null==a.isElement?void 0:a.isElement(k))||(N=s.floating[w]||i.floating[f]);const C=y/2-x/2,O=N/2-g[f]/2-1,S=Vo(u[b],O),E=Vo(u[v],O),j=S,R=N-g[f]-E,z=N/2-g[f]/2+C,D=Zo(j,z,R),P=!l.arrow&&null!=ei(o)&&z!==D&&i.reference[f]/2-(z<j?S:E)-g[f]/2<0,M=P?z<j?z-j:z-R:0;return{[h]:p[h]+M,data:{[h]:D,centerOffset:z-D-M,...P&&{alignmentOffset:M}},reset:P}}}),va=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:a}=t,{padding:s=2,x:l,y:c}=Jo(e,t),d=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(r.reference))||[]),u=function(e){const t=e.slice().sort((e,t)=>e.y-t.y),n=[];let r=null;for(let e=0;e<t.length;e++){const o=t[e];!r||o.y-r.y>r.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(e=>fi(wi(e)))}(d),p=fi(wi(d)),h=hi(s);const f=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=c)return u.find(e=>l>e.left-h.left&&l<e.right+h.right&&c>e.top-h.top&&c<e.bottom+h.bottom)||p;if(u.length>=2){if("y"===oi(n)){const e=u[0],t=u[u.length-1],r="top"===Qo(n),o=e.top,i=t.bottom,a=r?e.left:t.left,s=r?e.right:t.right;return{top:o,bottom:i,left:a,right:s,width:s-a,height:i-o,x:a,y:o}}const e="left"===Qo(n),t=$o(...u.map(e=>e.right)),r=Vo(...u.map(e=>e.left)),o=u.filter(n=>e?n.left===r:n.right===t),i=o[0].top,a=o[o.length-1].bottom;return{top:i,bottom:a,left:r,right:t,width:t-r,height:a-i,x:r,y:i}}return p}},floating:r.floating,strategy:a});return o.reference.x!==f.reference.x||o.reference.y!==f.reference.y||o.reference.width!==f.reference.width||o.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},wa=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Jo(e,t),d={x:n,y:r},u=oi(o),p=ti(u);let h=d[p],f=d[u];const g=Jo(s,t),m="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+m.mainAxis,n=i.reference[p]+i.reference[e]-m.mainAxis;h<t?h=t:h>n&&(h=n)}if(c){var b,v;const e="y"===p?"width":"height",t=yi.has(Qo(o)),n=i.reference[u]-i.floating[e]+(t&&(null==(b=a.offset)?void 0:b[u])||0)+(t?0:m.crossAxis),r=i.reference[u]+i.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[u])||0)-(t?m.crossAxis:0);f<n?f=n:f>r&&(f=r)}return{[p]:h,[u]:f}}}},ya=(e,t,n)=>{const r=new Map,o={platform:ca,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=gi(c,r,l),p=r,h={},f=0;for(let n=0;n<s.length;n++){const{name:i,fn:g}=s[n],{x:m,y:b,data:v,reset:w}=await g({x:d,y:u,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});d=null!=m?m:d,u=null!=b?b:u,h={...h,[i]:{...h[i],...v}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:d,y:u}=gi(c,p,l))),n=-1)}return{x:d,y:u,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var xa="undefined"!=typeof document?g:function(){};function ka(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!ka(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!ka(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Na(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ca(e,t){const n=Na(e);return Math.round(t*n)/n}function Oa(e){const t=r.useRef(e);return xa(()=>{t.current=e}),t}function Sa(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,p]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=r.useState(o);ka(h,o)||f(o);const[g,m]=r.useState(null),[b,w]=r.useState(null),y=r.useCallback(e=>{e!==C.current&&(C.current=e,m(e))},[]),x=r.useCallback(e=>{e!==O.current&&(O.current=e,w(e))},[]),k=a||g,N=s||b,C=r.useRef(null),O=r.useRef(null),S=r.useRef(u),E=null!=c,j=Oa(c),R=Oa(i),z=Oa(d),D=r.useCallback(()=>{if(!C.current||!O.current)return;const e={placement:t,strategy:n,middleware:h};R.current&&(e.platform=R.current),ya(C.current,O.current,e).then(e=>{const t={...e,isPositioned:!1!==z.current};P.current&&!ka(S.current,t)&&(S.current=t,v.flushSync(()=>{p(t)}))})},[h,t,n,R,z]);xa(()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const P=r.useRef(!1);xa(()=>(P.current=!0,()=>{P.current=!1}),[]),xa(()=>{if(k&&(C.current=k),N&&(O.current=N),k&&N){if(j.current)return j.current(k,N,D);D()}},[k,N,D,j,E]);const M=r.useMemo(()=>({reference:C,floating:O,setReference:y,setFloating:x}),[y,x]),T=r.useMemo(()=>({reference:k,floating:N}),[k,N]),I=r.useMemo(()=>{const e={position:n,left:0,top:0};if(!T.floating)return e;const t=Ca(T.floating,u.x),r=Ca(T.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Na(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,T.floating,u.x,u.y]);return r.useMemo(()=>({...u,update:D,refs:M,elements:T,floatingStyles:I}),[u,D,M,T,I])}const Ea=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?ba({element:n.current,padding:r}).fn(t):{}:n?ba({element:n,padding:r}).fn(t):{};var o}}),ja=(e,t)=>({...pa(e),options:[e,t]}),Ra=(e,t)=>({...ha(e),options:[e,t]}),za=(e,t)=>({...wa(e),options:[e,t]}),Da=(e,t)=>({...fa(e),options:[e,t]}),Pa=(e,t)=>({...ga(e),options:[e,t]}),Ma=(e,t)=>({...ma(e),options:[e,t]}),Ta=(e,t)=>({...va(e),options:[e,t]}),Ia=(e,t)=>({...Ea(e),options:[e,t]});var _a=r.forwardRef((t,n)=>{const{children:r,width:o=10,height:i=5,...a}=t;return e(xe.svg,{...a,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:e("polygon",{points:"0,0 30,0 15,10"})})});_a.displayName="Arrow";var Aa=_a;function La(e){const[t,n]=r.useState(void 0);return ve(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}var Ha="Popper",[Fa,Wa]=se(Ha),[Ba,Ua]=Fa(Ha),Va=t=>{const{__scopePopper:n,children:o}=t,[i,a]=r.useState(null);return e(Ba,{scope:n,anchor:i,onAnchorChange:a,children:o})};Va.displayName=Ha;var $a="PopperAnchor",Xa=r.forwardRef((t,n)=>{const{__scopePopper:o,virtualRef:i,...a}=t,s=Ua($a,o),l=r.useRef(null),c=ue(n,l),d=r.useRef(null);return r.useEffect(()=>{const e=d.current;d.current=i?.current||l.current,e!==d.current&&s.onAnchorChange(d.current)}),i?null:e(xe.div,{...a,ref:c})});Xa.displayName=$a;var Ya="PopperContent",[Ka,Ga]=Fa(Ya),qa=r.forwardRef((t,n)=>{const{__scopePopper:o,side:i="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:g="optimized",onPlaced:m,...b}=t,v=Ua(Ya,o),[w,y]=r.useState(null),x=ue(n,e=>y(e)),[k,N]=r.useState(null),C=La(k),O=C?.width??0,S=C?.height??0,E=i+("center"!==s?"-"+s:""),j="number"==typeof p?p:{top:0,right:0,bottom:0,left:0,...p},R=Array.isArray(u)?u:[u],z=R.length>0,D={padding:j,boundary:R.filter(es),altBoundary:z},{refs:P,floatingStyles:M,placement:T,isPositioned:I,middlewareData:_}=Sa({strategy:"fixed",placement:E,whileElementsMounted:(...e)=>ua(...e,{animationFrame:"always"===g}),elements:{reference:v.anchor},middleware:[ja({mainAxis:a+S,alignmentAxis:l}),d&&Ra({mainAxis:!0,crossAxis:!1,limiter:"partial"===h?za():void 0,...D}),d&&Da({...D}),Pa({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),k&&Ia({element:k,padding:c}),ts({arrowWidth:O,arrowHeight:S}),f&&Ma({strategy:"referenceHidden",...D})]}),[A,L]=ns(T),H=xo(m);ve(()=>{I&&H?.()},[I,H]);const F=_.arrow?.x,W=_.arrow?.y,B=0!==_.arrow?.centerOffset,[U,V]=r.useState();return ve(()=>{w&&V(window.getComputedStyle(w).zIndex)},[w]),e("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:I?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[_.transformOrigin?.x,_.transformOrigin?.y].join(" "),..._.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e(Ka,{scope:o,placedSide:A,onArrowChange:N,arrowX:F,arrowY:W,shouldHideArrow:B,children:e(xe.div,{"data-side":A,"data-align":L,...b,ref:x,style:{...b.style,animation:I?void 0:"none"}})})})});qa.displayName=Ya;var Za="PopperArrow",Ja={top:"bottom",right:"left",bottom:"top",left:"right"},Qa=r.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Ga(Za,r),a=Ja[i.placedSide];return e("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:e(Aa,{...o,ref:n,style:{...o.style,display:"block"}})})});function es(e){return null!==e}Qa.displayName=Za;var ts=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=ns(n),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let h="",f="";return"bottom"===l?(h=i?d:`${u}px`,f=-s+"px"):"top"===l?(h=i?d:`${u}px`,f=`${r.floating.height+s}px`):"right"===l?(h=-s+"px",f=i?d:`${p}px`):"left"===l&&(h=`${r.floating.width+s}px`,f=i?d:`${p}px`),{data:{x:h,y:f}}}});function ns(e){const[t,n="center"]=e.split("-");return[t,n]}var rs=Va,os=Xa,is=qa,as=Qa,ss=r.forwardRef((t,n)=>{const{container:o,...i}=t,[a,s]=r.useState(!1);ve(()=>s(!0),[]);const l=o||a&&globalThis?.document?.body;return l?w.createPortal(e(xe.div,{...i,ref:n}),l):null});ss.displayName="Portal";var ls=new WeakMap,cs=new WeakMap,ds={},us=0,ps=function(e){return e&&(e.host||ps(e.parentNode))},hs=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=ps(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);ds[n]||(ds[n]=new WeakMap);var i=ds[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))d(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(ls.get(e)||0)+1,c=(i.get(e)||0)+1;ls.set(e,l),i.set(e,c),a.push(e),1===l&&o&&cs.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return d(t),s.clear(),us++,function(){a.forEach(function(e){var t=ls.get(e)-1,o=i.get(e)-1;ls.set(e,t),i.set(e,o),t||(cs.has(e)||e.removeAttribute(r),cs.delete(e)),o||e.removeAttribute(n)}),--us||(ls=new WeakMap,ls=new WeakMap,cs=new WeakMap,ds={})}},fs=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),hs(r,o,n,"aria-hidden")):function(){return null}},gs="right-scroll-bar-position",ms="width-before-scroll-bar";function bs(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var vs="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,ws=new WeakMap;function ys(e,t){var n,r,o,i=(n=t||null,r=function(t){return e.forEach(function(e){return bs(e,t)})},(o=u(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,o.facade);return vs(function(){var t=ws.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach(function(e){r.has(e)||bs(e,null)}),r.forEach(function(e){n.has(e)||bs(e,o)})}ws.set(i,e)},[e]),i}function xs(e){return e}var ks=function(e){var t=e.sideCar,n=ie(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return r.createElement(o,oe({},n))};ks.isSideCarExport=!0;var Ns=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=xs);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=oe({async:!0,ssr:!1},e),t}(),Cs=function(){},Os=r.forwardRef(function(e,t){var n=r.useRef(null),o=r.useState({onScrollCapture:Cs,onWheelCapture:Cs,onTouchMoveCapture:Cs}),i=o[0],a=o[1],s=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,p=e.shards,h=e.sideCar,f=e.noRelative,g=e.noIsolation,m=e.inert,b=e.allowPinchZoom,v=e.as,w=void 0===v?"div":v,y=e.gapMode,x=ie(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=h,N=ys([n,t]),C=oe(oe({},x),i);return r.createElement(r.Fragment,null,u&&r.createElement(k,{sideCar:Ns,removeScrollBar:d,shards:p,noRelative:f,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:y}),s?r.cloneElement(r.Children.only(l),oe(oe({},C),{ref:N})):r.createElement(w,oe({},C,{className:c,ref:N}),l))});Os.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Os.classNames={fullWidth:ms,zeroRight:gs};function Ss(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Es=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=Ss())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},js=function(){var e,t=(e=Es(),function(t,n){r.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Rs={left:0,top:0,right:0,gap:0},zs=function(e){return parseInt(e||"",10)||0},Ds=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Rs;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[zs(n),zs(r),zs(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ps=js(),Ms="data-scroll-locked",Ts=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Ms,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(gs," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(ms," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(gs," .").concat(gs," {\n right: 0 ").concat(r,";\n }\n \n .").concat(ms," .").concat(ms," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Ms,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Is=function(){var e=parseInt(document.body.getAttribute(Ms)||"0",10);return isFinite(e)?e:0},_s=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o;r.useEffect(function(){return document.body.setAttribute(Ms,(Is()+1).toString()),function(){var e=Is()-1;e<=0?document.body.removeAttribute(Ms):document.body.setAttribute(Ms,e.toString())}},[]);var a=r.useMemo(function(){return Ds(i)},[i]);return r.createElement(Ps,{styles:Ts(a,!t,i,n?"":"!important")})},As=!1;if("undefined"!=typeof window)try{var Ls=Object.defineProperty({},"passive",{get:function(){return As=!0,!0}});window.addEventListener("test",Ls,Ls),window.removeEventListener("test",Ls,Ls)}catch(e){As=!1}var Hs=!!As&&{passive:!1},Fs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Ws=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Bs(e,r)){var o=Us(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Bs=function(e,t){return"v"===e?function(e){return Fs(e,"overflowY")}(t):function(e){return Fs(e,"overflowX")}(t)},Us=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Vs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$s=function(e){return[e.deltaX,e.deltaY]},Xs=function(e){return e&&"current"in e?e.current:e},Ys=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Ks=0,Gs=[];function qs(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Zs,Js=(Zs=function(e){var t=r.useRef([]),n=r.useRef([0,0]),o=r.useRef(),i=r.useState(Ks++)[0],a=r.useState(js)[0],s=r.useRef(e);r.useEffect(function(){s.current=e},[e]),r.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(Xs),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=r.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var r,i=Vs(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var p=window.getSelection(),h=p&&p.anchorNode;if(h&&(h===d||h.contains(d)))return!1;var f=Ws(u,d);if(!f)return!0;if(f?r=u:(r="v"===u?"h":"v",f=Ws(u,d)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=r),!r)return!0;var g=o.current||r;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),c=!1,d=a>0,u=0,p=0;do{if(!s)break;var h=Us(e,s),f=h[0],g=h[1]-h[2]-i*f;(f||g)&&Bs(e,s)&&(u+=g,p+=f);var m=s.parentNode;s=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(o&&Math.abs(u)<1||!o&&a>u)||!d&&(o&&Math.abs(p)<1||!o&&-a>p))&&(c=!0),c}(g,t,e,"h"===g?l:c,!0)},[]),c=r.useCallback(function(e){var n=e;if(Gs.length&&Gs[Gs.length-1]===a){var r="deltaY"in n?$s(n):Vs(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(s.current.shards||[]).map(Xs).filter(Boolean).filter(function(e){return e.contains(n.target)});(i.length>0?l(n,i[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),d=r.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:qs(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),u=r.useCallback(function(e){n.current=Vs(e),o.current=void 0},[]),p=r.useCallback(function(t){d(t.type,$s(t),t.target,l(t,e.lockRef.current))},[]),h=r.useCallback(function(t){d(t.type,Vs(t),t.target,l(t,e.lockRef.current))},[]);r.useEffect(function(){return Gs.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Hs),document.addEventListener("touchmove",c,Hs),document.addEventListener("touchstart",u,Hs),function(){Gs=Gs.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,Hs),document.removeEventListener("touchmove",c,Hs),document.removeEventListener("touchstart",u,Hs)}},[]);var f=e.removeScrollBar,g=e.inert;return r.createElement(r.Fragment,null,g?r.createElement(a,{styles:Ys(i)}):null,f?r.createElement(_s,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Ns.useMedium(Zs),ks),Qs=r.forwardRef(function(e,t){return r.createElement(Os,oe({},e,{ref:t,sideCar:Js}))});Qs.classNames=Os.classNames;var el=Qs,tl="Popover",[nl,rl]=se(tl,[Wa]),ol=Wa(),[il,al]=nl(tl),sl=t=>{const{__scopePopover:n,children:o,open:i,defaultOpen:a,onOpenChange:s,modal:l=!1}=t,c=ol(n),d=r.useRef(null),[u,p]=r.useState(!1),[h,f]=ye({prop:i,defaultProp:a??!1,onChange:s,caller:tl});return e(rs,{...c,children:e(il,{scope:n,contentId:Ee(),triggerRef:d,open:h,onOpenChange:f,onOpenToggle:r.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:u,onCustomAnchorAdd:r.useCallback(()=>p(!0),[]),onCustomAnchorRemove:r.useCallback(()=>p(!1),[]),modal:l,children:o})})};sl.displayName=tl;var ll="PopoverAnchor";r.forwardRef((t,n)=>{const{__scopePopover:o,...i}=t,a=al(ll,o),s=ol(o),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=a;return r.useEffect(()=>(l(),()=>c()),[l,c]),e(os,{...s,...i,ref:n})}).displayName=ll;var cl="PopoverTrigger",dl=r.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,i=al(cl,r),a=ol(r),s=ue(n,i.triggerRef),l=e(xe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":kl(i.open),...o,ref:s,onClick:be(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:e(os,{asChild:!0,...a,children:l})});dl.displayName=cl;var ul="PopoverPortal",[pl,hl]=nl(ul,{forceMount:void 0}),fl=t=>{const{__scopePopover:n,forceMount:r,children:o,container:i}=t,a=al(ul,n);return e(pl,{scope:n,forceMount:r,children:e(Ne,{present:r||a.open,children:e(ss,{asChild:!0,container:i,children:o})})})};fl.displayName=ul;var gl="PopoverContent",ml=r.forwardRef((t,n)=>{const r=hl(gl,t.__scopePopover),{forceMount:o=r.forceMount,...i}=t,a=al(gl,t.__scopePopover);return e(Ne,{present:o||a.open,children:a.modal?e(vl,{...i,ref:n}):e(wl,{...i,ref:n})})});ml.displayName=gl;var bl=pe("PopoverContent.RemoveScroll"),vl=r.forwardRef((t,n)=>{const o=al(gl,t.__scopePopover),i=r.useRef(null),a=ue(n,i),s=r.useRef(!1);return r.useEffect(()=>{const e=i.current;if(e)return fs(e)},[]),e(el,{as:bl,allowPinchZoom:!0,children:e(yl,{...t,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(t.onCloseAutoFocus,e=>{e.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:be(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;s.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:be(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),wl=r.forwardRef((t,n)=>{const o=al(gl,t.__scopePopover),i=r.useRef(!1),a=r.useRef(!1);return e(yl,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(i.current||o.triggerRef.current?.focus(),e.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(i.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,r=o.triggerRef.current?.contains(n);r&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),yl=r.forwardRef((t,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...p}=t,h=al(gl,r),f=ol(r);return Do(),e(_o,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:e(Eo,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:e(is,{"data-state":kl(h.open),role:"dialog",id:h.contentId,...f,...p,ref:n,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),xl="PopoverClose";r.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,i=al(xl,r);return e(xe.button,{type:"button",...o,ref:n,onClick:be(t.onClick,()=>i.onOpenChange(!1))})}).displayName=xl;function kl(e){return e?"open":"closed"}r.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,i=ol(r);return e(as,{...i,...o,ref:n})}).displayName="PopoverArrow";var Nl=fl,Cl=ml;const Ol=sl,Sl=dl,El=r.forwardRef((t,n)=>{var{className:r,align:o="center",sideOffset:i=4}=t,a=ie(t,["className","align","sideOffset"]);return e(Nl,{children:e(Cl,Object.assign({ref:n,align:o,sideOffset:i,className:dr("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r)},a))})});El.displayName=Cl.displayName;const jl=({value:t,options:r,onValueChange:o,currentLabel:i})=>{const[a,s]=u(!1),[c,d]=u(""),p=l(()=>{if(!c)return r;const e=c.toLowerCase();return r.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},[c,r]);return n(Ol,Object.assign({open:a,onOpenChange:s},{children:[e(Sl,Object.assign({asChild:!0},{children:n(ro,Object.assign({variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs font-mono",contentEditable:!1},{children:[i,e(Ht,{className:"h-3 w-3 opacity-50"})]}))})),e(El,Object.assign({className:"w-64 p-0",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:n("div",Object.assign({className:"p-2"},{children:[n("div",Object.assign({className:"relative mb-2"},{children:[e(an,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),e(yo,{placeholder:"Search language...",value:c,onChange:e=>d(e.target.value),className:"h-8 pl-7 text-xs",autoFocus:!0})]})),e("div",Object.assign({className:"max-h-[200px] overflow-y-auto"},{children:0===p.length?e("div",Object.assign({className:"px-2 py-4 text-center text-sm text-muted-foreground"},{children:"No languages found"})):e("div",Object.assign({className:"space-y-0.5"},{children:p.map(n=>e("button",Object.assign({type:"button",onClick:()=>{return e=n.value,o(e),s(!1),void d("");var e},className:dr("w-full rounded-sm px-2 py-1.5 text-left text-xs font-mono transition-colors","hover:bg-accent hover:text-accent-foreground",t===n.value&&"bg-accent text-accent-foreground")},{children:n.label}),n.value))}))}))]}))}))]}))},Rl=({value:t,options:r,onValueChange:o,currentLabel:i})=>{const[a,s]=u(!1),[c,d]=u(""),p=l(()=>{if(!c)return r;const e=c.toLowerCase();return r.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},[c,r]);return n(Ol,Object.assign({open:a,onOpenChange:s},{children:[e(Sl,Object.assign({asChild:!0},{children:n(ro,Object.assign({variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs",contentEditable:!1},{children:[i,e(Ht,{className:"h-3 w-3 opacity-50"})]}))})),e(El,Object.assign({className:"w-64 p-0",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:n("div",Object.assign({className:"p-2"},{children:[n("div",Object.assign({className:"relative mb-2"},{children:[e(an,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),e(yo,{placeholder:"Search theme...",value:c,onChange:e=>d(e.target.value),className:"h-8 pl-7 text-xs",autoFocus:!0})]})),e("div",Object.assign({className:"max-h-[200px] overflow-y-auto"},{children:0===p.length?e("div",Object.assign({className:"px-2 py-4 text-center text-sm text-muted-foreground"},{children:"No themes found"})):e("div",Object.assign({className:"space-y-0.5"},{children:p.map(n=>e("button",Object.assign({type:"button",onClick:()=>{return e=n.value,o(e),s(!1),void d("");var e},className:dr("w-full rounded-sm px-2 py-1.5 text-left text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",t===n.value&&"bg-accent text-accent-foreground")},{children:n.label}),n.value))}))}))]}))}))]}))},zl=e=>{var t;if(M.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const n=e.children;return null!==(t=null==n?void 0:n.map(zl).join("\n"))&&void 0!==t?t:""}return""},Dl={code:{render:({attributes:t,children:r,element:o,blockId:i})=>{var a,s,l,h,f,g;const m=x(),b=null!==(s=null===(a=o.props)||void 0===a?void 0:a.language)&&void 0!==s?s:"javascript",v=null!==(h=null===(l=o.props)||void 0===l?void 0:l.theme)&&void 0!==h?h:"github-dark",w=d(null),[y,C]=u(!1),[O,S]=u(!1),[E,j]=u({background:"",foreground:"",caret:"",tabActiveBackground:"",tabInactiveBackground:"",buttonForeground:""});p(()=>{var e,t,n,r,o,i,a,s,l,c,d,u,p,h;if(window.yShiki){const f=window.yShiki.getTheme(v);j({background:f.bg,foreground:f.fg,caret:null!==(t=null===(e=f.colors)||void 0===e?void 0:e["editorCursor.foreground"])&&void 0!==t?t:f.fg,tabActiveBackground:null!==(i=null!==(r=null===(n=f.colors)||void 0===n?void 0:n["editorTab.activeBackground"])&&void 0!==r?r:null===(o=f.colors)||void 0===o?void 0:o["tab.activeBackground"])&&void 0!==i?i:f.bg,tabInactiveBackground:null!==(c=null!==(s=null===(a=f.colors)||void 0===a?void 0:a["editorTab.inactiveBackground"])&&void 0!==s?s:null===(l=f.colors)||void 0===l?void 0:l["tab.inactiveBackground"])&&void 0!==c?c:f.bg,buttonForeground:null!==(h=null!==(u=null===(d=f.colors)||void 0===d?void 0:d["button.foreground"])&&void 0!==u?u:null===(p=f.colors)||void 0===p?void 0:p["icon.foreground"])&&void 0!==h?h:f.fg})}},[v]);const z=c(()=>{const e=zl(o);vo(e)&&(C(!0),setTimeout(()=>C(!1),1500))},[o]),D=c(()=>{const e=k.getBlockSlate(m,{id:i});if(!e)return;const t=N.getElementPath(m,{blockId:i,element:o});if(!t)return;const n=t?R.parent(e,t):void 0;n&&P.isElement(n[0])&&!R.isEditor(n[0])?N.deleteElement(m,{blockId:i,type:"code",path:t}):k.deleteBlock(m,{blockId:i,focus:!0})},[m,i,o]),M=c(e=>{T.updateCodeLanguage(m,i,e)},[m,i]),H=c(e=>{T.updateCodeTheme(m,i,e)},[m,i]),F=c(()=>ae(void 0,void 0,void 0,function*(){if(!O){S(!0);try{yield T.beautifyCode(m,i)}finally{S(!1)}}}),[m,i,O]),W=I(b),B=null!==(f=_.find(e=>e.value===b))&&void 0!==f?f:_[0],U=null!==(g=A.find(e=>e.value===v))&&void 0!==g?g:A[0];return n("div",Object.assign({},t,{className:"relative my-2 group/code-block rounded-lg border border-border bg-muted/50 overflow-hidden"},{children:[n("div",Object.assign({contentEditable:!1,className:"flex items-center justify-between px-4 py-2 border-b border-border select-none",style:{backgroundColor:E.tabActiveBackground||void 0}},{children:[n("div",Object.assign({className:"flex items-center gap-2"},{children:[e(jl,{value:b,options:_,onValueChange:e=>M(e),currentLabel:B.label}),e(Rl,{value:v,options:A,onValueChange:e=>H(e),currentLabel:U.label})]})),n("div",Object.assign({className:"flex items-center gap-1 opacity-0 group-hover/code-block:opacity-100 transition-opacity"},{children:[W&&e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:F,disabled:O,title:"Beautify code",style:{color:E.buttonForeground||void 0}},{children:e(ln,{className:"h-4 w-4 "+(O?"animate-pulse":"")})})),e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:z,title:y?"Copied!":"Copy code",style:{color:E.buttonForeground||void 0}},{children:e(y?Lt:Bt,{className:"h-4 w-4"})})),e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:D,title:"Delete code block",style:{color:E.buttonForeground||void 0}},{children:e(cn,{className:"h-4 w-4"})}))]}))]})),n("div",Object.assign({className:"relative bg-background overflow-hidden",style:{backgroundColor:E.background,color:E.foreground,caretColor:E.caret}},{children:[e("div",Object.assign({ref:w,className:"absolute inset-0 p-4 font-mono text-sm whitespace-pre overflow-auto pointer-events-none z-10 select-none",style:{lineHeight:"1.6",tabSize:2},contentEditable:!1,"aria-hidden":"true"},{children:e(L,{element:o,language:b,theme:v})})),e("div",Object.assign({className:"relative p-4 font-mono text-sm whitespace-pre overflow-auto",style:{lineHeight:"1.6",tabSize:2,color:"transparent",caretColor:E.caret},onScroll:e=>{w.current&&(w.current.scrollTop=e.currentTarget.scrollTop,w.current.scrollLeft=e.currentTarget.scrollLeft)}},{children:r}))]}))]}))}}};var Pl="rovingFocusGroup.onEntryFocus",Ml={bubbles:!1,cancelable:!0},Tl="RovingFocusGroup",[Il,_l,Al]=me(Tl),[Ll,Hl]=se(Tl,[Al]),[Fl,Wl]=Ll(Tl),Bl=r.forwardRef((t,n)=>e(Il.Provider,{scope:t.__scopeRovingFocusGroup,children:e(Il.Slot,{scope:t.__scopeRovingFocusGroup,children:e(Ul,{...t,ref:n})})}));Bl.displayName=Tl;var Ul=r.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:a=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...h}=t,f=r.useRef(null),g=ue(n,f),m=Ve(s),[b,v]=ye({prop:l,defaultProp:c??null,onChange:d,caller:Tl}),[w,y]=r.useState(!1),x=xo(u),k=_l(o),N=r.useRef(!1),[C,O]=r.useState(0);return r.useEffect(()=>{const e=f.current;if(e)return e.addEventListener(Pl,x),()=>e.removeEventListener(Pl,x)},[x]),e(Fl,{scope:o,orientation:i,dir:m,loop:a,currentTabStopId:b,onItemFocus:r.useCallback(e=>v(e),[v]),onItemShiftTab:r.useCallback(()=>y(!0),[]),onFocusableItemAdd:r.useCallback(()=>O(e=>e+1),[]),onFocusableItemRemove:r.useCallback(()=>O(e=>e-1),[]),children:e(xe.div,{tabIndex:w||0===C?-1:0,"data-orientation":i,...h,ref:g,style:{outline:"none",...t.style},onMouseDown:be(t.onMouseDown,()=>{N.current=!0}),onFocus:be(t.onFocus,e=>{const t=!N.current;if(e.target===e.currentTarget&&t&&!w){const t=new CustomEvent(Pl,Ml);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=k().filter(e=>e.focusable);Yl([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),p)}}N.current=!1}),onBlur:be(t.onBlur,()=>y(!1))})})}),Vl="RovingFocusGroupItem",$l=r.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:a=!1,tabStopId:s,children:l,...c}=t,d=Ee(),u=s||d,p=Wl(Vl,o),h=p.currentTabStopId===u,f=_l(o),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:b}=p;return r.useEffect(()=>{if(i)return g(),()=>m()},[i,g,m]),e(Il.ItemSlot,{scope:o,id:u,focusable:i,active:a,children:e(xe.span,{tabIndex:h?0:-1,"data-orientation":p.orientation,...c,ref:n,onMouseDown:be(t.onMouseDown,e=>{i?p.onItemFocus(u):e.preventDefault()}),onFocus:be(t.onFocus,()=>p.onItemFocus(u)),onKeyDown:be(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Xl[r]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=f().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=p.loop?(r=i+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(i+1)}setTimeout(()=>Yl(o))}var n,r}),children:"function"==typeof l?l({isCurrentTabStop:h,hasTabStop:null!=b}):l})})});$l.displayName=Vl;var Xl={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Yl(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Kl=Bl,Gl=$l,ql="Tabs",[Zl,Jl]=se(ql,[Hl]),Ql=Hl(),[ec,tc]=Zl(ql),nc=r.forwardRef((t,n)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:l,activationMode:c="automatic",...d}=t,u=Ve(l),[p,h]=ye({prop:o,onChange:i,defaultProp:a??"",caller:ql});return e(ec,{scope:r,baseId:Ee(),value:p,onValueChange:h,orientation:s,dir:u,activationMode:c,children:e(xe.div,{dir:u,"data-orientation":s,...d,ref:n})})});nc.displayName=ql;var rc="TabsList",oc=r.forwardRef((t,n)=>{const{__scopeTabs:r,loop:o=!0,...i}=t,a=tc(rc,r),s=Ql(r);return e(Kl,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:e(xe.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:n})})});oc.displayName=rc;var ic="TabsTrigger",ac=r.forwardRef((t,n)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...a}=t,s=tc(ic,r),l=Ql(r),c=cc(s.baseId,o),d=dc(s.baseId,o),u=o===s.value;return e(Gl,{asChild:!0,...l,focusable:!i,active:u,children:e(xe.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:n,onMouseDown:be(t.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():s.onValueChange(o)}),onKeyDown:be(t.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&s.onValueChange(o)}),onFocus:be(t.onFocus,()=>{const e="manual"!==s.activationMode;u||i||!e||s.onValueChange(o)})})})});ac.displayName=ic;var sc="TabsContent",lc=r.forwardRef((t,n)=>{const{__scopeTabs:o,value:i,forceMount:a,children:s,...l}=t,c=tc(sc,o),d=cc(c.baseId,i),u=dc(c.baseId,i),p=i===c.value,h=r.useRef(p);return r.useEffect(()=>{const e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),e(Ne,{present:a||p,children:({present:r})=>e(xe.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!r,id:u,tabIndex:0,...l,ref:n,style:{...t.style,animationDuration:h.current?"0s":void 0},children:r&&s})})});function cc(e,t){return`${e}-trigger-${t}`}function dc(e,t){return`${e}-content-${t}`}lc.displayName=sc;var uc=oc,pc=ac,hc=lc;const fc=nc,gc=r.forwardRef((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e(uc,Object.assign({ref:n,className:dr("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",r)},o))});gc.displayName=uc.displayName;const mc=r.forwardRef((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e(pc,Object.assign({ref:n,className:dr("inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",r)},o))});mc.displayName=pc.displayName;const bc=r.forwardRef((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e(hc,Object.assign({ref:n,className:dr("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",r)},o))});bc.displayName=hc.displayName;const vc=e=>{var t;if(M.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const n=e.children;return null!==(t=null==n?void 0:n.map(vc).join("\n"))&&void 0!==t?t:""}return""};function wc(e,[t,n]){return Math.min(n,Math.max(t,e))}var yc="ScrollArea",[xc,kc]=se(yc),[Nc,Cc]=xc(yc),Oc=r.forwardRef((t,n)=>{const{__scopeScrollArea:o,type:i="hover",dir:a,scrollHideDelay:s=600,...l}=t,[c,d]=r.useState(null),[u,p]=r.useState(null),[h,f]=r.useState(null),[g,m]=r.useState(null),[b,v]=r.useState(null),[w,y]=r.useState(0),[x,k]=r.useState(0),[N,C]=r.useState(!1),[O,S]=r.useState(!1),E=ue(n,e=>d(e)),j=Ve(a);return e(Nc,{scope:o,type:i,dir:j,scrollHideDelay:s,scrollArea:c,viewport:u,onViewportChange:p,content:h,onContentChange:f,scrollbarX:g,onScrollbarXChange:m,scrollbarXEnabled:N,onScrollbarXEnabledChange:C,scrollbarY:b,onScrollbarYChange:v,scrollbarYEnabled:O,onScrollbarYEnabledChange:S,onCornerWidthChange:y,onCornerHeightChange:k,children:e(xe.div,{dir:j,...l,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})})});Oc.displayName=yc;var Sc="ScrollAreaViewport",Ec=r.forwardRef((o,i)=>{const{__scopeScrollArea:a,children:s,nonce:l,...c}=o,d=Cc(Sc,a),u=ue(i,r.useRef(null),d.onViewportChange);return n(t,{children:[e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),e(xe.div,{"data-radix-scroll-area-viewport":"",...c,ref:u,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...o.style},children:e("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});Ec.displayName=Sc;var jc="ScrollAreaScrollbar",Rc=r.forwardRef((t,n)=>{const{forceMount:o,...i}=t,a=Cc(jc,t.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,c="horizontal"===t.orientation;return r.useEffect(()=>(c?s(!0):l(!0),()=>{c?s(!1):l(!1)}),[c,s,l]),"hover"===a.type?e(zc,{...i,ref:n,forceMount:o}):"scroll"===a.type?e(Dc,{...i,ref:n,forceMount:o}):"auto"===a.type?e(Pc,{...i,ref:n,forceMount:o}):"always"===a.type?e(Mc,{...i,ref:n}):null});Rc.displayName=jc;var zc=r.forwardRef((t,n)=>{const{forceMount:o,...i}=t,a=Cc(jc,t.__scopeScrollArea),[s,l]=r.useState(!1);return r.useEffect(()=>{const e=a.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),l(!0)},r=()=>{t=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[a.scrollArea,a.scrollHideDelay]),e(Ne,{present:o||s,children:e(Pc,{"data-state":s?"visible":"hidden",...i,ref:n})})}),Dc=r.forwardRef((t,n)=>{const{forceMount:o,...i}=t,a=Cc(jc,t.__scopeScrollArea),s="horizontal"===t.orientation,l=Jc(()=>d("SCROLL_END"),100),[c,d]=(u="hidden",p={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},r.useReducer((e,t)=>p[e][t]??e,u));var u,p;return r.useEffect(()=>{if("idle"===c){const e=window.setTimeout(()=>d("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(e)}},[c,a.scrollHideDelay,d]),r.useEffect(()=>{const e=a.viewport,t=s?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(d("SCROLL"),l()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[a.viewport,s,d,l]),e(Ne,{present:o||"hidden"!==c,children:e(Mc,{"data-state":"hidden"===c?"hidden":"visible",...i,ref:n,onPointerEnter:be(t.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:be(t.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),Pc=r.forwardRef((t,n)=>{const o=Cc(jc,t.__scopeScrollArea),{forceMount:i,...a}=t,[s,l]=r.useState(!1),c="horizontal"===t.orientation,d=Jc(()=>{if(o.viewport){const e=o.viewport.offsetWidth<o.viewport.scrollWidth,t=o.viewport.offsetHeight<o.viewport.scrollHeight;l(c?e:t)}},10);return Qc(o.viewport,d),Qc(o.content,d),e(Ne,{present:i||s,children:e(Mc,{"data-state":s?"visible":"hidden",...a,ref:n})})}),Mc=r.forwardRef((t,n)=>{const{orientation:o="vertical",...i}=t,a=Cc(jc,t.__scopeScrollArea),s=r.useRef(null),l=r.useRef(0),[c,d]=r.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Xc(c.viewport,c.content),p={...i,sizes:c,onSizesChange:d,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>s.current=e,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:e=>l.current=e};function h(e,t){return function(e,t,n,r="ltr"){const o=Yc(n),i=o/2,a=t||i,s=o-a,l=n.scrollbar.paddingStart+a,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,d=n.content-n.viewport,u="ltr"===r?[0,d]:[-1*d,0];return Gc([l,c],u)(e)}(e,l.current,c,t)}return"horizontal"===o?e(Tc,{...p,ref:n,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=Kc(a.viewport.scrollLeft,c,a.dir);s.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=h(e,a.dir))}}):"vertical"===o?e(Ic,{...p,ref:n,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=Kc(a.viewport.scrollTop,c);s.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=h(e))}}):null}),Tc=r.forwardRef((t,n)=>{const{sizes:o,onSizesChange:i,...a}=t,s=Cc(jc,t.__scopeScrollArea),[l,c]=r.useState(),d=r.useRef(null),u=ue(n,d,s.onScrollbarXChange);return r.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),e(Lc,{"data-orientation":"horizontal",...a,ref:u,sizes:o,style:{bottom:0,left:"rtl"===s.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===s.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Yc(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.x),onDragScroll:e=>t.onDragScroll(e.x),onWheelScroll:(e,n)=>{if(s.viewport){const r=s.viewport.scrollLeft+e.deltaX;t.onWheelScroll(r),qc(r,n)&&e.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:$c(l.paddingLeft),paddingEnd:$c(l.paddingRight)}})}})}),Ic=r.forwardRef((t,n)=>{const{sizes:o,onSizesChange:i,...a}=t,s=Cc(jc,t.__scopeScrollArea),[l,c]=r.useState(),d=r.useRef(null),u=ue(n,d,s.onScrollbarYChange);return r.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),e(Lc,{"data-orientation":"vertical",...a,ref:u,sizes:o,style:{top:0,right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Yc(o)+"px",...t.style},onThumbPointerDown:e=>t.onThumbPointerDown(e.y),onDragScroll:e=>t.onDragScroll(e.y),onWheelScroll:(e,n)=>{if(s.viewport){const r=s.viewport.scrollTop+e.deltaY;t.onWheelScroll(r),qc(r,n)&&e.preventDefault()}},onResize:()=>{d.current&&s.viewport&&l&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:$c(l.paddingTop),paddingEnd:$c(l.paddingBottom)}})}})}),[_c,Ac]=xc(jc),Lc=r.forwardRef((t,n)=>{const{__scopeScrollArea:o,sizes:i,hasThumb:a,onThumbChange:s,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:u,onWheelScroll:p,onResize:h,...f}=t,g=Cc(jc,o),[m,b]=r.useState(null),v=ue(n,e=>b(e)),w=r.useRef(null),y=r.useRef(""),x=g.viewport,k=i.content-i.viewport,N=xo(p),C=xo(d),O=Jc(h,10);function S(e){if(w.current){const t=e.clientX-w.current.left,n=e.clientY-w.current.top;u({x:t,y:n})}}return r.useEffect(()=>{const e=e=>{const t=e.target,n=m?.contains(t);n&&N(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[x,m,k,N]),r.useEffect(C,[i,C]),Qc(m,O),Qc(g.content,O),e(_c,{scope:o,scrollbar:m,hasThumb:a,onThumbChange:xo(s),onThumbPointerUp:xo(l),onThumbPositionChange:C,onThumbPointerDown:xo(c),children:e(xe.div,{...f,ref:v,style:{position:"absolute",...f.style},onPointerDown:be(t.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),w.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),S(e)}}),onPointerMove:be(t.onPointerMove,S),onPointerUp:be(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),Hc="ScrollAreaThumb",Fc=r.forwardRef((t,n)=>{const{forceMount:r,...o}=t,i=Ac(Hc,t.__scopeScrollArea);return e(Ne,{present:r||i.hasThumb,children:e(Wc,{ref:n,...o})})}),Wc=r.forwardRef((t,n)=>{const{__scopeScrollArea:o,style:i,...a}=t,s=Cc(Hc,o),l=Ac(Hc,o),{onThumbPositionChange:c}=l,d=ue(n,e=>l.onThumbChange(e)),u=r.useRef(void 0),p=Jc(()=>{u.current&&(u.current(),u.current=void 0)},100);return r.useEffect(()=>{const e=s.viewport;if(e){const t=()=>{if(p(),!u.current){const t=Zc(e,c);u.current=t,c()}};return c(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[s.viewport,p,c]),e(xe.div,{"data-state":l.hasThumb?"visible":"hidden",...a,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:be(t.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;l.onThumbPointerDown({x:n,y:r})}),onPointerUp:be(t.onPointerUp,l.onThumbPointerUp)})});Fc.displayName=Hc;var Bc="ScrollAreaCorner",Uc=r.forwardRef((t,n)=>{const r=Cc(Bc,t.__scopeScrollArea),o=Boolean(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&o?e(Vc,{...t,ref:n}):null});Uc.displayName=Bc;var Vc=r.forwardRef((t,n)=>{const{__scopeScrollArea:o,...i}=t,a=Cc(Bc,o),[s,l]=r.useState(0),[c,d]=r.useState(0),u=Boolean(s&&c);return Qc(a.scrollbarX,()=>{const e=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(e),d(e)}),Qc(a.scrollbarY,()=>{const e=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(e),l(e)}),u?e(xe.div,{...i,ref:n,style:{width:s,height:c,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...t.style}}):null});function $c(e){return e?parseInt(e,10):0}function Xc(e,t){const n=e/t;return isNaN(n)?0:n}function Yc(e){const t=Xc(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Kc(e,t,n="ltr"){const r=Yc(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-r,l=wc(e,"ltr"===n?[0,a]:[-1*a,0]);return Gc([0,a],[0,s])(l)}function Gc(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function qc(e,t){return e>0&&e<t}var Zc=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=n.left!==i.left,s=n.top!==i.top;(a||s)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Jc(e,t){const n=xo(e),o=r.useRef(0);return r.useEffect(()=>()=>window.clearTimeout(o.current),[]),r.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function Qc(e,t){const n=xo(t);ve(()=>{let t=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var ed=Oc,td=Ec,nd=Uc;const rd=t=>{var{className:n,orientation:r="vertical"}=t,o=ie(t,["className","orientation"]);return e(Rc,Object.assign({"data-slot":"scroll-area-scrollbar",orientation:r,className:dr("flex touch-none p-px transition-colors select-none","vertical"===r&&"h-full w-2.5 border-l border-l-transparent","horizontal"===r&&"h-2.5 flex-col border-t border-t-transparent",n)},o,{children:e(Fc,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})}))},od=t=>{var{className:r,children:o}=t,i=ie(t,["className","children"]);return n(ed,Object.assign({"data-slot":"scroll-area",className:dr("relative",r)},i,{children:[e(td,Object.assign({"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{children:o})),e(rd,{}),e(nd,{})]}))};re("[data-code-group-container] [data-state=active]{background-color:var(--code-group-tab-active-bg)!important;border-bottom-color:var(--code-group-tab-active-fg)!important;color:var(--code-group-tab-active-fg)!important}[data-code-group-container] [data-state=inactive]{background-color:var(--code-group-tab-inactive-bg)!important;color:var(--code-group-tab-inactive-fg)!important}");const id={"code-group-container":{render:t=>{var n,r;const{attributes:o,children:i,blockId:a,element:s}=t,l=x(),c=null===(n=t.element.props)||void 0===n?void 0:n.theme;p(()=>{var e,t,n,r,o,i,a,s,l,d,u,p,h,f,g,m,b,v,w,y,x,k,N,C,O,S,E,j,R,z,D,P,M,T,I,_;if(window.yShiki){const A=window.yShiki.getTheme(c),L=null!==(r=null!==(t=null===(e=A.colors)||void 0===e?void 0:e["tab.activeBackground"])&&void 0!==t?t:null===(n=A.colors)||void 0===n?void 0:n["editorTab.activeBackground"])&&void 0!==r?r:A.bg,H={"code-group-tab-active-bg":L,"code-group-tab-inactive-bg":null!==(d=null!==(s=null!==(i=null===(o=A.colors)||void 0===o?void 0:o["tab.inactiveBackground"])&&void 0!==i?i:null===(a=A.colors)||void 0===a?void 0:a["editorTab.inactiveBackground"])&&void 0!==s?s:null===(l=A.colors)||void 0===l?void 0:l["editorGroupHeader.tabsBackground"])&&void 0!==d?d:A.bg,"code-group-tab-active-fg":null!==(f=null!==(p=null===(u=A.colors)||void 0===u?void 0:u["tab.activeForeground"])&&void 0!==p?p:null===(h=A.colors)||void 0===h?void 0:h["editorTab.activeForeground"])&&void 0!==f?f:A.fg,"code-group-tab-inactive-fg":null!==(y=null!==(v=null!==(m=null===(g=A.colors)||void 0===g?void 0:g["tab.inactiveForeground"])&&void 0!==m?m:null===(b=A.colors)||void 0===b?void 0:b["editorTab.inactiveForeground"])&&void 0!==v?v:null===(w=A.colors)||void 0===w?void 0:w.foreground)&&void 0!==y?y:A.fg,"code-group-tab-active-border":null!==(C=null!==(k=null===(x=A.colors)||void 0===x?void 0:x["tab.activeBorder"])&&void 0!==k?k:null===(N=A.colors)||void 0===N?void 0:N["editorTab.activeBorder"])&&void 0!==C?C:L,"code-group-tab-border":null!==(z=null!==(j=null!==(S=null===(O=A.colors)||void 0===O?void 0:O["tab.border"])&&void 0!==S?S:null===(E=A.colors)||void 0===E?void 0:E["editorGroupHeader.border"])&&void 0!==j?j:null===(R=A.colors)||void 0===R?void 0:R["editorGroup.border"])&&void 0!==z?z:"transparent","code-group-editor-bg":null!==(P=null===(D=A.colors)||void 0===D?void 0:D["editor.background"])&&void 0!==P?P:A.bg,"code-group-editor-fg":null!==(T=null===(M=A.colors)||void 0===M?void 0:M["editor.foreground"])&&void 0!==T?T:A.fg,"code-group-editor-cursor":null!==(_=null===(I=A.colors)||void 0===I?void 0:I["editorCursor.foreground"])&&void 0!==_?_:A.fg};Object.entries(H).forEach(([e,t])=>{document.documentElement.style.setProperty(`--${e}`,t)})}},[c]);return e("div",Object.assign({},o,{"data-code-group-container":!0,className:"w-full"},{children:e(fc,Object.assign({value:null===(r=s.props)||void 0===r?void 0:r.activeTabId,onValueChange:e=>{const t=k.getBlockSlate(l,{id:a});t&&D.setNodes(t,{props:Object.assign(Object.assign({},s.props),{activeTabId:e})},{at:[0],match:e=>P.isElement(e)&&"code-group-container"===e.type})},className:"w-full"},{children:i}))}))}},"code-group-list":{render:t=>{const{attributes:r,children:o,blockId:i}=t,a=x();return n(od,Object.assign({className:"w-full"},{children:[n(gc,Object.assign({},r,{className:"w-full relative justify-start h-8 rounded-none rounded-t-lg bg-transparent p-0 border-b border-x-0 border-t-0",style:{backgroundColor:"var(--code-group-tab-inactive-bg)",borderBottomColor:"var(--code-group-tab-border)"}},{children:[o,e("button",Object.assign({type:"button",contentEditable:!1,onClick:e=>{e.preventDefault(),e.stopPropagation(),H.addTabItem(a,i)},className:"ml-1 flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1.5 h-7",style:{color:"var(--code-group-tab-inactive-fg)"},title:"Add tab"},{children:e(rn,{className:"h-3.5 w-3.5 shrink-0"})}))]})),e(rd,{orientation:"horizontal"})]}))}},"code-group-item-heading":{render:t=>{const{attributes:r,children:o,element:i,blockId:a}=t,s=x();return n(mc,Object.assign({},r,{value:i.id,className:"relative group/tab flex items-center gap-1.5 px-3 h-7 rounded-none rounded-t-lg border-b-2 border-transparent whitespace-nowrap text-xs font-normal transition-colors",style:{backgroundColor:"var(--code-group-tab-inactive-bg, hsl(var(--muted)))",color:"var(--code-group-tab-inactive-fg, hsl(var(--muted-foreground)))"}},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:o})),e("span",Object.assign({contentEditable:!1,onClick:()=>{const e=k.getBlockSlate(s,{id:a});if(!e)return;const t=N.getElementPath(s,{blockId:a,element:i});t&&(D.select(e,t),H.deleteTabItem(s,a,{tabId:i.id}))},className:"ml-1 flex items-center justify-center rounded-sm opacity-0 group-hover/tab:opacity-100 transition-opacity hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-0.5",style:{color:"inherit"},title:"Close tab"},{children:e(hn,{className:"h-3 w-3 shrink-0"})}))]}))}},"code-group-content":{render:t=>{var r,o,i,a;const{attributes:s,children:c,element:h,blockId:f}=t,g=d(null),m=x(),b=null!==(o=null===(r=null==h?void 0:h.props)||void 0===r?void 0:r.language)&&void 0!==o?o:"javascript",v=l(()=>{var e,t,n;const r=k.getBlockSlate(m,{id:f});if(!r)return"github-dark";const o=null===(e=Array.from(R.nodes(r,{at:[0],match:e=>P.isElement(e)&&"code-group-container"===e.type})))||void 0===e?void 0:e[0];if(!o)return"github-dark";const[i]=o;return i&&null!==(n=null===(t=i.props)||void 0===t?void 0:t.theme)&&void 0!==n?n:"github-dark"},[m,f]),[w,y]=u(!1),[C,O]=u(!1),[S,E]=u({buttonForeground:""});p(()=>{var e,t,n,r;if(window.yShiki){const o=window.yShiki.getTheme(v);E({buttonForeground:null!==(r=null!==(t=null===(e=o.colors)||void 0===e?void 0:e["button.foreground"])&&void 0!==t?t:null===(n=o.colors)||void 0===n?void 0:n["icon.foreground"])&&void 0!==r?r:o.fg})}},[v]);const j=I(b),z=null!==(i=_.find(e=>e.value===b))&&void 0!==i?i:_[0];return e(bc,Object.assign({},s,{value:null===(a=h.props)||void 0===a?void 0:a.referenceId,className:"rounded-b-lg mt-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"},{children:n("div",Object.assign({className:"relative group/code-group-content overflow-hidden"},{children:[n("div",Object.assign({contentEditable:!1,className:"absolute top-2 right-2 z-20 flex items-center gap-2 opacity-0 group-hover/code-group-content:opacity-100 transition-opacity",style:{backgroundColor:"var(--code-group-tab-active-bg)",padding:"4px",borderRadius:"4px"}},{children:[e(jl,{value:b,options:_,onValueChange:e=>{const t=N.getElementPath(m,{blockId:f,element:h});t&&N.updateElement(m,{blockId:f,type:"code-group-content",props:Object.assign(Object.assign({},h.props),{language:e}),path:t})},currentLabel:z.label}),j&&e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>ae(void 0,void 0,void 0,function*(){var e;if(C)return;const t=null===(e=h.props)||void 0===e?void 0:e.referenceId;if(t){O(!0);try{yield H.beautifyTab(m,f,t)}finally{O(!1)}}}),disabled:C,title:"Beautify code",style:{color:S.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:e(ln,{className:"h-4 w-4 "+(C?"animate-pulse":"")})})),e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{const e=vc(h);vo(e)&&(y(!0),setTimeout(()=>y(!1),1500))},title:w?"Copied!":"Copy code",style:{color:S.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:e(w?Lt:Bt,{className:"h-4 w-4"})})),e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{var e;H.deleteTabItem(m,f,{tabId:null===(e=h.props)||void 0===e?void 0:e.referenceId})},title:"Delete code",style:{color:S.buttonForeground||"var(--code-group-tab-active-fg)"}},{children:e(cn,{className:"h-4 w-4"})}))]})),n("div",Object.assign({className:"relative bg-background overflow-hidden rounded-lg",style:{backgroundColor:"var(--code-group-editor-bg)",color:"var(--code-group-editor-fg)",caretColor:"var(--code-group-editor-cursor)"}},{children:[e("div",Object.assign({ref:g,className:"absolute inset-0 p-4 font-mono text-sm whitespace-pre overflow-auto pointer-events-none z-10 select-none",style:{lineHeight:"1.6",tabSize:2},contentEditable:!1,"aria-hidden":"true"},{children:e(L,{element:h,language:b,theme:v})})),e("div",Object.assign({className:"relative p-4 font-mono text-sm whitespace-pre overflow-auto",style:{lineHeight:"1.6",tabSize:2,color:"transparent",caretColor:"var(--code-group-editor-cursor)"},onScroll:e=>{g.current&&(g.current.scrollTop=e.currentTarget.scrollTop,g.current.scrollLeft=e.currentTarget.scrollLeft)}},{children:c}))]}))]}))}))}}};var ad=Symbol.for("react.lazy"),sd=r[" use ".trim().toString()];function ld(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===ad&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function cd(e){const t=r.forwardRef((e,t)=>{let{children:n,...o}=e;if(ld(n)&&"function"==typeof sd&&(n=sd(n._payload)),r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(i.ref=t?de(t,e):e),r.cloneElement(n,i)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dd=Symbol("radix.slottable");function ud(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===dd}var pd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=function(t){const n=cd(t),o=r.forwardRef((t,o)=>{let{children:i,...a}=t;ld(i)&&"function"==typeof sd&&(i=sd(i._payload));const s=r.Children.toArray(i),l=s.find(ud);if(l){const t=l.props.children,i=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...a,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return e(n,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${n}`),i=r.forwardRef((t,r)=>{const{asChild:i,...a}=t,s=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:r})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{}),hd="horizontal",fd=["horizontal","vertical"],gd=r.forwardRef((t,n)=>{const{decorative:r,orientation:o=hd,...i}=t,a=function(e){return fd.includes(e)}(o)?o:hd,s=r?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return e(pd.div,{"data-orientation":a,...s,...i,ref:n})});gd.displayName="Separator";var md=gd;const bd=r.forwardRef((t,n)=>{var{className:r,orientation:o="horizontal",decorative:i=!0}=t,a=ie(t,["className","orientation","decorative"]);return e(md,Object.assign({ref:n,decorative:i,orientation:o,className:dr("shrink-0 bg-border","horizontal"===o?"h-[1px] w-full":"h-full w-[1px]",r)},a))});bd.displayName=md.displayName;const vd={divider:{render:t=>{var r,o,i;const a=x(),{attributes:s,element:l}=t,c=l,d=null!==(o=null===(r=c.props)||void 0===r?void 0:r.theme)&&void 0!==o?o:"solid",u=null===(i=c.props)||void 0===i?void 0:i.color;return n("div",Object.assign({},s,{contentEditable:!1,className:"w-full py-3",onClick:()=>{const e=k.getBlock(a,{id:t.blockId});e&&C.setSelected(a,{at:e.meta.order})}},{children:[e(bd,{orientation:"horizontal",decorative:!0,className:(()=>{switch(d){case"dashed":return dr("border-t-2 border-dashed border-b-0 border-l-0 border-r-0 bg-transparent",u?"":"border-border");case"dotted":return dr("border-t-2 border-dotted border-b-0 border-l-0 border-r-0 bg-transparent",u?"":"border-border");case"gradient":return"h-[2px] bg-transparent border-0";default:return dr("h-[1px]",u?"":"bg-border")}})(),style:(()=>{if(!u)return{};switch(d){case"dashed":case"dotted":return{borderTopColor:u};case"gradient":return{background:`linear-gradient(to right, transparent, ${u}, transparent)`};default:return{backgroundColor:u}}})()}),t.children]}))}}},wd={HeadingOne:{"heading-one":{render:t=>{const{attributes:n,children:r,element:o}=t;return e("h1",Object.assign({id:o.id,draggable:!1},n,{className:"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl"},{children:r}))}}},HeadingTwo:{"heading-two":{render:t=>{const{attributes:n,children:r,element:o}=t;return e("h2",Object.assign({id:o.id,draggable:!1},n,{className:"scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0"},{children:r}))}}},HeadingThree:{"heading-three":{render:t=>{const{attributes:n,children:r,element:o}=t;return e("h3",Object.assign({id:o.id,draggable:!1},n,{className:"mt-4 scroll-m-20 text-2xl font-semibold tracking-tight"},{children:r}))}}}},yd=({onInsertFromUnsplash:t})=>e(bc,Object.assign({value:"unsplash",className:"mt-4"},{children:n("div",Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[e("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:e("svg",Object.assign({className:"h-6 w-6",viewBox:"0 0 32 32",fill:"currentColor"},{children:e("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})}))})),n("div",Object.assign({className:"text-center"},{children:[e("p",Object.assign({className:"text-sm font-medium"},{children:"Browse free photos"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Powered by Unsplash"}))]})),e(ro,Object.assign({onClick:t},{children:"Browse photos"}))]}))}));var xd=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),kd=r.forwardRef((t,n)=>e(xe.span,{...t,ref:n,style:{...xd,...t.style}}));kd.displayName="VisuallyHidden";var Nd=kd,[Cd,Od]=se("Tooltip",[Wa]),Sd=Wa(),Ed="TooltipProvider",jd=700,Rd="tooltip.open",[zd,Dd]=Cd(Ed),Pd=t=>{const{__scopeTooltip:n,delayDuration:o=jd,skipDelayDuration:i=300,disableHoverableContent:a=!1,children:s}=t,l=r.useRef(!0),c=r.useRef(!1),d=r.useRef(0);return r.useEffect(()=>{const e=d.current;return()=>window.clearTimeout(e)},[]),e(zd,{scope:n,isOpenDelayedRef:l,delayDuration:o,onOpen:r.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:r.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,i)},[i]),isPointerInTransitRef:c,onPointerInTransitChange:r.useCallback(e=>{c.current=e},[]),disableHoverableContent:a,children:s})};Pd.displayName=Ed;var Md="Tooltip",[Td,Id]=Cd(Md),_d=t=>{const{__scopeTooltip:n,children:o,open:i,defaultOpen:a,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,d=Dd(Md,t.__scopeTooltip),u=Sd(n),[p,h]=r.useState(null),f=Ee(),g=r.useRef(0),m=l??d.disableHoverableContent,b=c??d.delayDuration,v=r.useRef(!1),[w,y]=ye({prop:i,defaultProp:a??!1,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(Rd))):d.onClose(),s?.(e)},caller:Md}),x=r.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),k=r.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),N=r.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),C=r.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,y(!0),g.current=0},b)},[b,y]);return r.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),e(rs,{...u,children:e(Td,{scope:n,contentId:f,open:w,stateAttribute:x,trigger:p,onTriggerChange:h,onTriggerEnter:r.useCallback(()=>{d.isOpenDelayedRef.current?C():k()},[d.isOpenDelayedRef,C,k]),onTriggerLeave:r.useCallback(()=>{m?N():(window.clearTimeout(g.current),g.current=0)},[N,m]),onOpen:k,onClose:N,disableHoverableContent:m,children:o})})};_d.displayName=Md;var Ad="TooltipTrigger",Ld=r.forwardRef((t,n)=>{const{__scopeTooltip:o,...i}=t,a=Id(Ad,o),s=Dd(Ad,o),l=Sd(o),c=ue(n,r.useRef(null),a.onTriggerChange),d=r.useRef(!1),u=r.useRef(!1),p=r.useCallback(()=>d.current=!1,[]);return r.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),e(os,{asChild:!0,...l,children:e(xe.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:be(t.onPointerMove,e=>{"touch"!==e.pointerType&&(u.current||s.isPointerInTransitRef.current||(a.onTriggerEnter(),u.current=!0))}),onPointerLeave:be(t.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:be(t.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:be(t.onFocus,()=>{d.current||a.onOpen()}),onBlur:be(t.onBlur,a.onClose),onClick:be(t.onClick,a.onClose)})})});Ld.displayName=Ad;var Hd="TooltipPortal",[Fd,Wd]=Cd(Hd,{forceMount:void 0}),Bd=t=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=t,a=Id(Hd,n);return e(Fd,{scope:n,forceMount:r,children:e(Ne,{present:r||a.open,children:e(ss,{asChild:!0,container:i,children:o})})})};Bd.displayName=Hd;var Ud="TooltipContent",Vd=r.forwardRef((t,n)=>{const r=Wd(Ud,t.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...a}=t,s=Id(Ud,t.__scopeTooltip);return e(Ne,{present:o||s.open,children:s.disableHoverableContent?e(Gd,{side:i,...a,ref:n}):e($d,{side:i,...a,ref:n})})}),$d=r.forwardRef((t,n)=>{const o=Id(Ud,t.__scopeTooltip),i=Dd(Ud,t.__scopeTooltip),a=r.useRef(null),s=ue(n,a),[l,c]=r.useState(null),{trigger:d,onClose:u}=o,p=a.current,{onPointerInTransitChange:h}=i,f=r.useCallback(()=>{c(null),h(!1)},[h]),g=r.useCallback((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);c(i),h(!0)},[h]);return r.useEffect(()=>()=>f(),[f]),r.useEffect(()=>{if(d&&p){const e=e=>g(e,p),t=e=>g(e,d);return d.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{d.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}},[d,p,g,f]),r.useEffect(()=>{if(l){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=d?.contains(t)||p?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],s=t[i],l=a.x,c=a.y,d=s.x,u=s.y;c>r!=u>r&&n<(d-l)*(r-c)/(u-c)+l&&(o=!o)}return o}(n,l);r?f():o&&(f(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[d,p,l,u,f]),e(Gd,{...t,ref:s})}),[Xd,Yd]=Cd(Md,{isInside:!1}),Kd=function(n){const r=({children:n})=>e(t,{children:n});return r.displayName=`${n}.Slottable`,r.__radixId=fe,r}("TooltipContent"),Gd=r.forwardRef((t,o)=>{const{__scopeTooltip:i,children:a,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:c,...d}=t,u=Id(Ud,i),p=Sd(i),{onClose:h}=u;return r.useEffect(()=>(document.addEventListener(Rd,h),()=>document.removeEventListener(Rd,h)),[h]),r.useEffect(()=>{if(u.trigger){const e=e=>{const t=e.target;t?.contains(u.trigger)&&h()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[u.trigger,h]),e(Eo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:h,children:n(is,{"data-state":u.stateAttribute,...p,...d,ref:o,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e(Kd,{children:a}),e(Xd,{scope:i,isInside:!0,children:e(Nd,{id:u.contentId,role:"tooltip",children:s||a})})]})})});Vd.displayName=Ud;var qd="TooltipArrow",Zd=r.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,i=Sd(r);return Yd(qd,r).isInside?null:e(as,{...i,...o,ref:n})});Zd.displayName=qd;var Jd=Pd,Qd=_d,eu=Ld,tu=Bd,nu=Vd,ru=Zd;const ou=t=>{var{delayDuration:n=0}=t,r=ie(t,["delayDuration"]);return e(Jd,Object.assign({"data-slot":"tooltip-provider",delayDuration:n},r))},iu=t=>{var n=ie(t,[]);return e(ou,{children:e(Qd,Object.assign({"data-slot":"tooltip"},n))})},au=t=>{var n=ie(t,[]);return e(eu,Object.assign({"data-slot":"tooltip-trigger"},n))},su=t=>{var{className:r,sideOffset:o=0,children:i}=t,a=ie(t,["className","sideOffset","children"]);return e(tu,{children:n(nu,Object.assign({"data-slot":"tooltip-content",sideOffset:o,className:dr("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r)},a,{children:[i,e(ru,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]}))})},lu=({preview:t})=>e("div",Object.assign({className:"absolute inset-0 overflow-hidden",style:{width:t.width,height:t.height}},{children:e("img",{src:t.url,alt:"Preview",className:"h-full w-full object-cover object-center",style:{width:t.width,height:t.height},draggable:!1})})),cu=({progress:t})=>e("div",Object.assign({className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-4 bg-black/70 backdrop-blur-sm p-6"},{children:e("div",Object.assign({className:"w-full max-w-md space-y-4"},{children:n("div",Object.assign({className:"space-y-2"},{children:[n("div",Object.assign({className:"flex items-center justify-between text-sm"},{children:[e("span",Object.assign({className:"font-medium text-white"},{children:"Uploading..."})),n("span",Object.assign({className:"text-white/80"},{children:[t.percentage,"%"]}))]})),e("div",Object.assign({className:"h-2 w-full overflow-hidden rounded-full bg-white/20"},{children:e("div",{className:"h-full bg-primary transition-all duration-300 ease-out",style:{width:`${t.percentage}%`}})})),n("div",Object.assign({className:"flex items-center justify-between text-xs text-white/60"},{children:[n("span",{children:[(t.loaded/1024/1024).toFixed(2)," MB /"," ",(t.total/1024/1024).toFixed(2)," MB"]}),e(qt,{className:"h-3.5 w-3.5 animate-spin"})]}))]}))}))})),du=({onUpload:t,hasPreview:r})=>{const o=d(null);return n("div",r?Object.assign({className:"flex flex-col items-center justify-center gap-4 py-8"},{children:[n("div",Object.assign({className:"text-center space-y-2"},{children:[e("p",Object.assign({className:"text-sm font-medium text-white"},{children:"Image preview"})),e("p",Object.assign({className:"text-xs text-white/80"},{children:"Uploading your image..."}))]})),e("input",{ref:o,type:"file",accept:"image/*",onChange:t,className:"hidden"})]}):Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[e("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:e(Kt,{className:"h-6 w-6 text-muted-foreground"})})),n("div",Object.assign({className:"text-center"},{children:[e("p",Object.assign({className:"text-sm font-medium"},{children:"Upload an image"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Click or drag and drop"}))]})),e(ro,Object.assign({onClick:()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.click()}},{children:"Choose file"})),e("input",{ref:o,type:"file",accept:"image/*",onChange:t,className:"hidden"})]}))},uu=({onInsertUrl:t})=>{const[r,o]=u(""),i=()=>{r.trim()&&(t(r.trim()),o(""))};return n("div",Object.assign({className:"mt-4 space-y-3"},{children:[e(yo,{placeholder:"Paste image URL...",value:r,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&r.trim()&&i()}}),e(ro,Object.assign({className:"w-full",onClick:i,disabled:!r.trim()},{children:"Embed image"}))]}))},pu=({onInsertFromAI:r})=>{const[o,i]=u(""),[a,s]=u(!1),l=()=>{o.trim()&&!a&&(s(!0),r(o.trim()),s(!1),i(""))};return n("div",Object.assign({className:"mt-4 space-y-3"},{children:[n("div",Object.assign({className:"space-y-2"},{children:[e(yo,{placeholder:"Describe the image...",value:o,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&l()},disabled:a}),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:'Example: "A sunset over mountains with dramatic clouds”'}))]})),e(ro,Object.assign({className:"w-full gap-2",onClick:l,disabled:!o.trim()||a},{children:n(t,a?{children:[e(qt,{className:"h-4 w-4 animate-spin"}),"Generating..."]}:{children:[e(ln,{className:"h-4 w-4"}),"Generate image"]})}))]}))},hu=({onUpload:t,onInsertUrl:r,onInsertFromUnsplash:o,onInsertFromAI:i,hasPreview:a})=>e("div",Object.assign({className:dr("relative p-4",a&&"min-h-[300px] flex flex-col")},{children:n(fc,Object.assign({defaultValue:"upload",className:"w-full"},{children:[n(gc,Object.assign({className:dr("grid w-full grid-cols-4",a&&"bg-background/80 backdrop-blur-sm")},{children:[n(mc,Object.assign({value:"upload",className:"gap-1.5"},{children:[e(un,{className:"h-3.5 w-3.5"}),"Upload"]})),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:n(mc,Object.assign({value:"link",disabled:!0,className:"gap-1.5"},{children:[e(Gt,{className:"h-3.5 w-3.5"}),"Link"]}))})),e(su,{children:"Link is not available yet"})]}),o&&n(iu,{children:[e(au,Object.assign({asChild:!0},{children:n(mc,Object.assign({value:"unsplash",disabled:!0,className:"gap-1.5"},{children:[e("svg",Object.assign({className:"h-3.5 w-3.5",viewBox:"0 0 32 32",fill:"currentColor"},{children:e("path",{d:"M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"})})),"Unsplash"]}))})),e(su,{children:"Unsplash is not available yet"})]}),i&&n(iu,{children:[e(au,Object.assign({asChild:!0},{children:n(mc,Object.assign({value:"ai",disabled:!0,className:"gap-1.5"},{children:[e(ln,{className:"h-3.5 w-3.5"}),"AI"]}))})),e(su,{children:"AI is not available yet"})]})]})),e(bc,Object.assign({value:"upload",className:"mt-4"},{children:e(du,{onUpload:t,hasPreview:a})})),e(bc,Object.assign({value:"link",d:!0},{children:e(uu,{onInsertUrl:r})})),o&&e(yd,{onInsertFromUnsplash:o}),i&&e(bc,Object.assign({value:"ai"},{children:e(pu,{onInsertFromAI:i})}))]}))})),fu=({onUpload:t,onInsertUrl:r,onInsertFromUnsplash:o,onInsertFromAI:i,className:a,attributes:s,children:l,preview:c,progress:d,loading:u})=>{const p=null!==c&&!!c.url,h=u&&d;return n("div",Object.assign({className:dr("mt-2 relative rounded-lg border bg-background overflow-hidden",p&&"min-h-[300px]",a)},s,{contentEditable:!1},{children:[p&&e(lu,{preview:c}),!p&&e(hu,{onUpload:t,onInsertUrl:r,onInsertFromUnsplash:o,onInsertFromAI:i,hasPreview:p}),h&&d&&e(cu,{progress:d}),l]}))};var gu,mu,bu,vu,wu={},yu={get exports(){return wu},set exports(e){wu=e}},xu={},ku={};function Nu(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Nu(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Cu(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Nu(e))&&(r&&(r+=" "),r+=t);return r}({get exports(){return ku},set exports(e){ku=e}}).exports=function(){if(vu)return bu;vu=1;var e=mu?gu:(mu=1,gu="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,bu=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}()();var Ou=go(Object.freeze({__proto__:null,clsx:Cu,default:Cu})),Su={},Eu={};Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},Eu.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},Eu.int=function(e){return parseInt(e,10)},Eu.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},Eu.isNum=function(e){return"number"==typeof e&&!isNaN(e)};var ju={};Object.defineProperty(ju,"__esModule",{value:!0}),ju.browserPrefixToKey=Du,ju.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},ju.default=void 0,ju.getPrefix=zu;const Ru=["Moz","Webkit","O","ms"];function zu(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const n=null===(e=window.document)||void 0===e||null===(e=e.documentElement)||void 0===e?void 0:e.style;if(!n)return"";if(t in n)return"";for(let e=0;e<Ru.length;e++)if(Du(t,Ru[e])in n)return Ru[e];return""}function Du(e,t){return t?"".concat(t).concat(function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}ju.default=zu(),Object.defineProperty(Su,"__esModule",{value:!0}),Su.addClassName=Lu,Su.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},Su.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&Lu(e.body,"react-draggable-transparent-selection")},Su.createCSSTransform=function(e,t){const n=Au(e,t,"px");return{[(0,Mu.browserPrefixToKey)("transform",Mu.default)]:n}},Su.createSVGTransform=function(e,t){return Au(e,t,"")},Su.getTouch=function(e,t){return e.targetTouches&&(0,Pu.findInArray)(e.targetTouches,e=>t===e.identifier)||e.changedTouches&&(0,Pu.findInArray)(e.changedTouches,e=>t===e.identifier)},Su.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},Su.getTranslation=Au,Su.innerHeight=function(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Pu.int)(n.paddingTop),t-=(0,Pu.int)(n.paddingBottom),t},Su.innerWidth=function(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Pu.int)(n.paddingLeft),t-=(0,Pu.int)(n.paddingRight),t},Su.matchesSelector=_u,Su.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(_u(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},Su.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},Su.outerHeight=function(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Pu.int)(n.borderTopWidth),t+=(0,Pu.int)(n.borderBottomWidth),t},Su.outerWidth=function(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Pu.int)(n.borderLeftWidth),t+=(0,Pu.int)(n.borderRightWidth),t},Su.removeClassName=Hu,Su.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},Su.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&Hu(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var Pu=Eu,Mu=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=Tu(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(ju);function Tu(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(Tu=function(e){return e?n:t})(e)}let Iu="";function _u(e,t){return Iu||(Iu=(0,Pu.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,Pu.isFunction)(e[t])})),!!(0,Pu.isFunction)(e[Iu])&&e[Iu](t)}function Au(e,t,n){let{x:r,y:o}=e,i="translate(".concat(r).concat(n,",").concat(o).concat(n,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+n),r="".concat("string"==typeof t.y?t.y:t.y+n);i="translate(".concat(e,", ").concat(r,")")+i}return i}function Lu(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function Hu(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Fu={};Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Fu.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Fu.createCoreData=function(e,t,n){const r=!(0,Wu.isNum)(e.lastX),o=Uu(e);return r?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:o,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}},Fu.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},Fu.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r="string"==typeof r?r:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(r);const o=Uu(e);if("string"==typeof r){const{ownerDocument:e}=o,t=e.defaultView;let n;if(n="parent"===r?o.parentNode:e.querySelector(r),!(n instanceof t.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const i=n,a=t.getComputedStyle(o),s=t.getComputedStyle(i);r={left:-o.offsetLeft+(0,Wu.int)(s.paddingLeft)+(0,Wu.int)(a.marginLeft),top:-o.offsetTop+(0,Wu.int)(s.paddingTop)+(0,Wu.int)(a.marginTop),right:(0,Bu.innerWidth)(i)-(0,Bu.outerWidth)(o)-o.offsetLeft+(0,Wu.int)(s.paddingRight)-(0,Wu.int)(a.marginRight),bottom:(0,Bu.innerHeight)(i)-(0,Bu.outerHeight)(o)-o.offsetTop+(0,Wu.int)(s.paddingBottom)-(0,Wu.int)(a.marginBottom)}}(0,Wu.isNum)(r.right)&&(t=Math.min(t,r.right));(0,Wu.isNum)(r.bottom)&&(n=Math.min(n,r.bottom));(0,Wu.isNum)(r.left)&&(t=Math.max(t,r.left));(0,Wu.isNum)(r.top)&&(n=Math.max(n,r.top));return[t,n]},Fu.getControlPosition=function(e,t,n){const r="number"==typeof t?(0,Bu.getTouch)(e,t):null;if("number"==typeof t&&!r)return null;const o=Uu(n),i=n.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,Bu.offsetXYFromParent)(r||e,i,n.props.scale)},Fu.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var Wu=Eu,Bu=Su;function Uu(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var Vu={},$u={};Object.defineProperty($u,"__esModule",{value:!0}),$u.default=function(){},Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.default=void 0;var Xu=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=ep(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),Yu=Qu(ku),Ku=Qu(w),Gu=Su,qu=Fu,Zu=Eu,Ju=Qu($u);function Qu(e){return e&&e.__esModule?e:{default:e}}function ep(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(ep=function(e){return e?n:t})(e)}function tp(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const np={start:"touchstart",move:"touchmove",stop:"touchend"},rp={start:"mousedown",move:"mousemove",stop:"mouseup"};let op=rp,ip=class extends Xu.Component{constructor(){super(...arguments),tp(this,"dragging",!1),tp(this,"lastX",NaN),tp(this,"lastY",NaN),tp(this,"touchIdentifier",null),tp(this,"mounted",!1),tp(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,Gu.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,Gu.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const r=(0,Gu.getTouchIdentifier)(e);this.touchIdentifier=r;const o=(0,qu.getControlPosition)(e,r,this);if(null==o)return;const{x:i,y:a}=o,s=(0,qu.createCoreData)(this,i,a);(0,Ju.default)("DraggableCore: handleDragStart: %j",s),(0,Ju.default)("calling",this.props.onStart);!1!==this.props.onStart(e,s)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,Gu.addUserSelectStyles)(n),this.dragging=!0,this.lastX=i,this.lastY=a,(0,Gu.addEvent)(n,op.move,this.handleDrag),(0,Gu.addEvent)(n,op.stop,this.handleDragStop))}),tp(this,"handleDrag",e=>{const t=(0,qu.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,qu.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,qu.createCoreData)(this,n,r);(0,Ju.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}}),tp(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,qu.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,qu.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const o=(0,qu.createCoreData)(this,n,r);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const i=this.findDOMNode();i&&this.props.enableUserSelectHack&&(0,Gu.removeUserSelectStyles)(i.ownerDocument),(0,Ju.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,i&&((0,Ju.default)("DraggableCore: Removing handlers"),(0,Gu.removeEvent)(i.ownerDocument,op.move,this.handleDrag),(0,Gu.removeEvent)(i.ownerDocument,op.stop,this.handleDragStop))}),tp(this,"onMouseDown",e=>(op=rp,this.handleDragStart(e))),tp(this,"onMouseUp",e=>(op=rp,this.handleDragStop(e))),tp(this,"onTouchStart",e=>(op=np,this.handleDragStart(e))),tp(this,"onTouchEnd",e=>(op=np,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,Gu.addEvent)(e,np.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,Gu.removeEvent)(t,rp.move,this.handleDrag),(0,Gu.removeEvent)(t,np.move,this.handleDrag),(0,Gu.removeEvent)(t,rp.stop,this.handleDragStop),(0,Gu.removeEvent)(t,np.stop,this.handleDragStop),(0,Gu.removeEvent)(e,np.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Gu.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:Ku.default.findDOMNode(this)}render(){return Xu.cloneElement(Xu.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Vu.default=ip,tp(ip,"displayName","DraggableCore"),tp(ip,"propTypes",{allowAnyClick:Yu.default.bool,children:Yu.default.node.isRequired,disabled:Yu.default.bool,enableUserSelectHack:Yu.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Yu.default.arrayOf(Yu.default.number),handle:Yu.default.string,cancel:Yu.default.string,nodeRef:Yu.default.object,onStart:Yu.default.func,onDrag:Yu.default.func,onStop:Yu.default.func,onMouseDown:Yu.default.func,scale:Yu.default.number,className:Zu.dontSetMe,style:Zu.dontSetMe,transform:Zu.dontSetMe}),tp(ip,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),n=u(ku),r=u(w),i=u(Ou),a=Su,s=Fu,l=Eu,c=u(Vu),d=u($u);function u(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class g extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",(e,t)=>{(0,d.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,s.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})}),f(this,"onDrag",(e,t)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",t);const n=(0,s.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,s.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)}),f(this,"onDragStop",(e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,s.createDraggableData)(this,t)))return!1;(0,d.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:r.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:l,defaultClassNameDragging:d,defaultClassNameDragged:u,position:p,positionOffset:f,scale:g,...m}=this.props;let b={},v=null;const w=!Boolean(p)||this.state.dragging,y=p||o,x={x:(0,s.canDragX)(this)&&w?this.state.x:y.x,y:(0,s.canDragY)(this)&&w?this.state.y:y.y};this.state.isElementSVG?v=(0,a.createSVGTransform)(x,f):b=(0,a.createCSSTransform)(x,f);const k=(0,i.default)(r.props.className||"",l,{[d]:this.state.dragging,[u]:this.state.dragged});return t.createElement(c.default,h({},m,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:k,style:{...r.props.style,...b},transform:v}))}}e.default=g,f(g,"displayName","Draggable"),f(g,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),f(g,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(xu);const{default:ap,DraggableCore:sp}=xu;yu.exports=ap,wu.default=ap,wu.DraggableCore=sp;var lp=function(){return lp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},lp.apply(this,arguments)},cp={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},dp={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},up={width:"20px",height:"20px",position:"absolute",zIndex:1},pp={top:lp(lp({},cp),{top:"-5px"}),right:lp(lp({},dp),{left:void 0,right:"-5px"}),bottom:lp(lp({},cp),{top:void 0,bottom:"-5px"}),left:lp(lp({},dp),{left:"-5px"}),topRight:lp(lp({},up),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:lp(lp({},up),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:lp(lp({},up),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:lp(lp({},up),{left:"-10px",top:"-10px",cursor:"nw-resize"})},hp=m(function(t){var n=t.onResizeStart,r=t.direction,o=t.children,i=t.replaceStyles,a=t.className,s=c(function(e){n(e,r)},[n,r]),d=c(function(e){n(e,r)},[n,r]),u=l(function(){return lp(lp({position:"absolute",userSelect:"none"},pp[r]),null!=i?i:{})},[i,r]);return e("div",{className:a||void 0,style:u,onMouseDown:s,onTouchStart:d,children:o})}),fp=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gp=function(){return gp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},gp.apply(this,arguments)},mp={width:"auto",height:"auto"},bp=function(e,t,n){return Math.max(Math.min(e,n),t)},vp=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},wp=function(e,t){return new RegExp(e,"i").test(t)},yp=function(e){return Boolean(e.touches&&e.touches.length)},xp=function(e,t,n){void 0===n&&(n=0);var r=t.reduce(function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n},0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},kp=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},Np=function(e,t,n,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},Cp=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Op="__resizable_base__",Sp=function(t){function r(e){var n,r,o,i,a=t.call(this,e)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.delta={width:0,height:0},a.appendBase=function(){if(!a.resizable||!a.window)return null;var e=a.parentNode;if(!e)return null;var t=a.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(Op):t.className+=Op,e.appendChild(t),t},a.removeBase=function(e){var t=a.parentNode;t&&t.removeChild(e)},a.state={isResizing:!1,width:null!==(r=null===(n=a.propsSize)||void 0===n?void 0:n.width)&&void 0!==r?r:"auto",height:null!==(i=null===(o=a.propsSize)||void 0===o?void 0:o.height)&&void 0!==i?i:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return fp(r,t),Object.defineProperty(r.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||mp},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){var n;if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&(null===(n=e.propsSize[t])||void 0===n?void 0:n.toString().endsWith("%"))){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var r=e.getParentSize(),o=Number(e.state[t].toString().replace("px",""))/r[t]*100;return"".concat(o,"%")}return kp(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?kp(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?kp(t.height):n("height")}},enumerable:!1,configurable:!0}),r.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},r.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},r.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},r.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},r.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},r.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},r.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,a=o&&wp("left",i),s=o&&wp("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},r.prototype.calculateNewSizeFromDirection=function(e,t){var n,r=this.props.scale||1,o=(n=this.props.resizeRatio||1,Array.isArray(n)?n:[n,n]),i=o[0],a=o[1],s=this.state,l=s.direction,c=s.original,d=this.props,u=d.lockAspectRatio,p=d.lockAspectRatioExtraHeight,h=d.lockAspectRatioExtraWidth,f=c.width,g=c.height,m=p||0,b=h||0;return wp("right",l)&&(f=c.width+(e-c.x)*i/r,u&&(g=(f-b)/this.ratio+m)),wp("left",l)&&(f=c.width-(e-c.x)*i/r,u&&(g=(f-b)/this.ratio+m)),wp("bottom",l)&&(g=c.height+(t-c.y)*a/r,u&&(f=(g-m)*this.ratio+b)),wp("top",l)&&(g=c.height-(t-c.y)*a/r,u&&(f=(g-m)*this.ratio+b)),{newWidth:f,newHeight:g}},r.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,c=void 0===n.width||n.width<0?e:n.width,d=void 0===r.height?10:r.height,u=void 0===n.height||n.height<0?t:n.height,p=a||0,h=s||0;if(i){var f=(d-p)*this.ratio+h,g=(u-p)*this.ratio+h,m=(l-h)/this.ratio+p,b=(c-h)/this.ratio+p,v=Math.max(l,f),w=Math.min(c,g),y=Math.max(d,m),x=Math.min(u,b);e=bp(e,v,w),t=bp(t,y,x)}else e=bp(e,l,c),t=bp(t,d,u);return{newWidth:e,newHeight:t}},r.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if("parent"===this.props.bounds){var t=this.parentNode;if(t){var n=t.getBoundingClientRect();this.parentLeft=n.left*e,this.parentTop=n.top*e}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var o=this.resizable.getBoundingClientRect(),i=o.left,a=o.top,s=o.right,l=o.bottom;this.resizableLeft=i*e,this.resizableRight=s*e,this.resizableTop=a*e,this.resizableBottom=l*e}},r.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&yp(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:gp(gp({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},r.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&yp(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,r=n.maxWidth,o=n.maxHeight,i=n.minWidth,a=n.minHeight,s=yp(e)?e.touches[0].clientX:e.clientX,l=yp(e)?e.touches[0].clientY:e.clientY,c=this.state,d=c.direction,u=c.original,p=c.width,h=c.height,f=this.getParentSize(),g=function(e,t,n,r,o,i,a){return r=Np(r,e.width,t,n),o=Np(o,e.height,t,n),i=Np(i,e.width,t,n),a=Np(a,e.height,t,n),{maxWidth:void 0===r?void 0:Number(r),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===i?void 0:Number(i),minHeight:void 0===a?void 0:Number(a)}}(f,this.window.innerWidth,this.window.innerHeight,r,o,i,a);r=g.maxWidth,o=g.maxHeight,i=g.minWidth,a=g.minHeight;var m=this.calculateNewSizeFromDirection(s,l),b=m.newHeight,v=m.newWidth,w=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(v=xp(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(b=xp(b,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(v,b,{width:w.maxWidth,height:w.maxHeight},{width:i,height:a});if(v=x.newWidth,b=x.newHeight,this.props.grid){var k=vp(v,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),N=vp(b,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),C=this.props.snapGap||0;v=0===C||Math.abs(k-v)<=C?k:v,b=0===C||Math.abs(N-b)<=C?N:b}var O={width:v-u.width,height:b-u.height};if(this.delta=O,p&&"string"==typeof p)if(p.endsWith("%")){var S=v/f.width*100;v="".concat(S,"%")}else if(p.endsWith("vw")){var E=v/this.window.innerWidth*100;v="".concat(E,"vw")}else if(p.endsWith("vh")){var j=v/this.window.innerHeight*100;v="".concat(j,"vh")}if(h&&"string"==typeof h)if(h.endsWith("%")){S=b/f.height*100;b="".concat(S,"%")}else if(h.endsWith("vw")){E=b/this.window.innerWidth*100;b="".concat(E,"vw")}else if(h.endsWith("vh")){j=b/this.window.innerHeight*100;b="".concat(j,"vh")}var R={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(b,"height")};"row"===this.flexDir?R.flexBasis=R.width:"column"===this.flexDir&&(R.flexBasis=R.height);var z=this.state.width!==R.width,D=this.state.height!==R.height,P=this.state.flexBasis!==R.flexBasis,M=z||D||P;M&&y(function(){t.setState(R)}),this.props.onResize&&M&&this.props.onResize(e,d,this.resizable,O)}},r.prototype.onMouseUp=function(e){var t,n,r=this.state,o=r.isResizing,i=r.direction;r.original,o&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,this.delta),this.props.size&&this.setState({width:null!==(t=this.props.size.width)&&void 0!==t?t:"auto",height:null!==(n=this.props.size.height)&&void 0!==n?n:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:gp(gp({},this.state.backgroundStyle),{cursor:"auto"})}))},r.prototype.updateSize=function(e){var t,n;this.setState({width:null!==(t=e.width)&&void 0!==t?t:"auto",height:null!==(n=e.height)&&void 0!==n?n:"auto"})},r.prototype.renderResizer=function(){var t=this,n=this.props,r=n.enable,o=n.handleStyles,i=n.handleClasses,a=n.handleWrapperStyle,s=n.handleWrapperClass,l=n.handleComponent;if(!r)return null;var c=Object.keys(r).map(function(n){return!1!==r[n]?e(hp,{direction:n,onResizeStart:t.onResizeStart,replaceStyles:o&&o[n],className:i&&i[n],children:l&&l[n]?l[n]:null},n):null});return e("div",{className:s,style:a,children:c})},r.prototype.render=function(){var t=this,r=Object.keys(this.props).reduce(function(e,n){return-1!==Cp.indexOf(n)||(e[n]=t.props[n]),e},{}),o=gp(gp(gp({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return n(i,gp({style:o,className:this.props.className},r,{ref:function(e){e&&(t.resizable=e)},children:[this.state.isResizing&&e("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},r.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},r}(b),Ep=function(e,t){return Ep=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Ep(e,t)};var jp=function(){return jp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},jp.apply(this,arguments)};var Rp={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},zp=function(e){function t(t){var n=e.call(this,t)||this;return n.resizingPosition={x:0,y:0},n.offsetFromParent={left:0,top:0},n.resizableElement={current:null},n.originalPosition={x:0,y:0},n.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},n.onResizeStart=n.onResizeStart.bind(n),n.onResize=n.onResize.bind(n),n.onResizeStop=n.onResizeStop.bind(n),n.onDragStart=n.onDragStart.bind(n),n.onDrag=n.onDrag.bind(n),n.onDragStop=n.onDragStop.bind(n),n.getMaxSizesFromProps=n.getMaxSizesFromProps.bind(n),n}return function(e,t){function n(){this.constructor=e}Ep(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){this.updateOffsetFromParent();var e=this.offsetFromParent,t=e.left,n=e.top,r=this.getDraggablePosition(),o=r.x,i=r.y;this.draggable.setState({x:o-t,y:i-n}),this.forceUpdate()},t.prototype.getDraggablePosition=function(){var e=this.draggable.state;return{x:e.x,y:e.y}},t.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},t.prototype.getParentSize=function(){return this.resizable.getParentSize()},t.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},t.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},t.prototype.getOffsetHeight=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/t;case"body":return document.body.offsetHeight/t;default:return e.offsetHeight}},t.prototype.getOffsetWidth=function(e){var t=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/t;case"body":return document.body.offsetWidth/t;default:return e.offsetWidth}},t.prototype.onDragStart=function(e,t){this.props.onDragStart&&this.props.onDragStart(e,t);var n=this.getDraggablePosition();if(this.originalPosition=n,this.props.bounds){var r,o=this.getParent(),i=this.props.scale;if("parent"===this.props.bounds)r=o;else{if("body"===this.props.bounds){var a=o.getBoundingClientRect(),s=a.left,l=a.top,c=document.body.getBoundingClientRect(),d=-(s-o.offsetLeft*i-c.left)/i,u=-(l-o.offsetTop*i-c.top)/i,p=(document.body.offsetWidth-this.resizable.size.width*i)/i+d,h=(document.body.offsetHeight-this.resizable.size.height*i)/i+u;return this.setState({bounds:{top:u,right:p,bottom:h,left:d}})}if("window"===this.props.bounds){if(!this.resizable)return;var f=o.getBoundingClientRect(),g=f.left,m=f.top,b=-(g-o.offsetLeft*i)/i,v=-(m-o.offsetTop*i)/i;p=(window.innerWidth-this.resizable.size.width*i)/i+b,h=(window.innerHeight-this.resizable.size.height*i)/i+v;return this.setState({bounds:{top:v,right:p,bottom:h,left:b}})}"string"==typeof this.props.bounds?r=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(r=this.props.bounds)}if(r instanceof HTMLElement&&o instanceof HTMLElement){var w=r.getBoundingClientRect(),y=w.left,x=w.top,k=o.getBoundingClientRect(),N=(y-k.left)/i,C=x-k.top;if(this.resizable){this.updateOffsetFromParent();var O=this.offsetFromParent;this.setState({bounds:{top:C-O.top,right:N+(r.offsetWidth-this.resizable.size.width)-O.left/i,bottom:C+(r.offsetHeight-this.resizable.size.height)-O.top,left:N-O.left/i}})}}}},t.prototype.onDrag=function(e,t){if(this.props.onDrag){var n=this.offsetFromParent,r=n.left,o=n.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(e,jp(jp({},t),{x:t.x+r,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(e,jp(jp({},t),{x:this.originalPosition.x+r,y:t.y+o,deltaX:0})):void 0:this.props.onDrag(e,jp(jp({},t),{x:t.x+r,y:t.y+o}))}},t.prototype.onDragStop=function(e,t){if(this.props.onDragStop){var n=this.offsetFromParent,r=n.left,o=n.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(e,jp(jp({},t),{x:t.x+r,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(e,jp(jp({},t),{x:this.originalPosition.x+r,y:t.y+o,deltaX:0})):void 0:this.props.onDragStop(e,jp(jp({},t),{x:t.x+r,y:t.y+o}))}},t.prototype.onResizeStart=function(e,t,n){e.stopPropagation(),this.setState({resizing:!0});var r=this.props.scale,o=this.offsetFromParent,i=this.getDraggablePosition();if(this.resizingPosition={x:i.x+o.left,y:i.y+o.top},this.originalPosition=i,this.props.bounds){var a=this.getParent(),s=void 0;"parent"===this.props.bounds?s=a:"body"===this.props.bounds?s=document.body:"window"===this.props.bounds?s=window:"string"==typeof this.props.bounds?s=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(s=this.props.bounds);var l=this.getSelfElement();if(l instanceof Element&&(s instanceof HTMLElement||s===window)&&a instanceof HTMLElement){var c=this.getMaxSizesFromProps(),d=c.maxWidth,u=c.maxHeight,p=this.getParentSize();if(d&&"string"==typeof d)if(d.endsWith("%")){var h=Number(d.replace("%",""))/100;d=p.width*h}else d.endsWith("px")&&(d=Number(d.replace("px","")));if(u&&"string"==typeof u)if(u.endsWith("%")){h=Number(u.replace("%",""))/100;u=p.height*h}else u.endsWith("px")&&(u=Number(u.replace("px","")));var f=l.getBoundingClientRect(),g=f.left,m=f.top,b="window"===this.props.bounds?{left:0,top:0}:s.getBoundingClientRect(),v=b.left,w=b.top,y=this.getOffsetWidth(s),x=this.getOffsetHeight(s),k=t.toLowerCase().endsWith("left"),N=t.toLowerCase().endsWith("right"),C=t.startsWith("top"),O=t.startsWith("bottom");if((k||C)&&this.resizable){var S=(g-v)/r+this.resizable.size.width;this.setState({maxWidth:S>Number(d)?d:S})}if(N||this.props.lockAspectRatio&&!k&&!C){S=y+(v-g)/r;this.setState({maxWidth:S>Number(d)?d:S})}if((C||k)&&this.resizable){S=(m-w)/r+this.resizable.size.height;this.setState({maxHeight:S>Number(u)?u:S})}if(O||this.props.lockAspectRatio&&!C&&!k){S=x+(w-m)/r;this.setState({maxHeight:S>Number(u)?u:S})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(e,t,n)},t.prototype.onResize=function(e,t,n,r){var o=this,i={x:this.originalPosition.x,y:this.originalPosition.y},a=-r.width,s=-r.height;["top","left","topLeft","bottomLeft","topRight"].includes(t)&&("bottomLeft"===t?i.x+=a:("topRight"===t||(i.x+=a),i.y+=s));var l=this.draggable.state;i.x===l.x&&i.y===l.y||y(function(){o.draggable.setState(i)}),this.updateOffsetFromParent();var c=this.offsetFromParent,d=this.getDraggablePosition().x+c.left,u=this.getDraggablePosition().y+c.top;this.resizingPosition={x:d,y:u},this.props.onResize&&this.props.onResize(e,t,n,r,{x:d,y:u})},t.prototype.onResizeStop=function(e,t,n,r){this.setState({resizing:!1});var o=this.getMaxSizesFromProps(),i=o.maxWidth,a=o.maxHeight;this.setState({maxWidth:i,maxHeight:a}),this.props.onResizeStop&&this.props.onResizeStop(e,t,n,r,this.resizingPosition)},t.prototype.updateSize=function(e){this.resizable&&this.resizable.updateSize({width:e.width,height:e.height})},t.prototype.updatePosition=function(e){this.draggable.setState(e)},t.prototype.updateOffsetFromParent=function(){var e=this.props.scale,t=this.getParent(),n=this.getSelfElement();if(!t||null===n)return{top:0,left:0};var r=t.getBoundingClientRect(),o=r.left,i=r.top,a=n.getBoundingClientRect(),s=this.getDraggablePosition(),l=t.scrollLeft,c=t.scrollTop;this.offsetFromParent={left:a.left-o+l-s.x*e,top:a.top-i+c-s.y*e}},t.prototype.render=function(){var e=this,t=this.props,n=t.disableDragging,r=t.style,o=t.dragHandleClassName,i=t.position,s=t.onMouseDown,l=t.onMouseUp,c=t.dragAxis,d=t.dragGrid,u=t.bounds,p=t.enableUserSelectHack,h=t.cancel,f=t.children;t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop;var g=t.resizeHandleStyles,m=t.resizeHandleClasses,b=t.resizeHandleComponent,v=t.enableResizing,w=t.resizeGrid,y=t.resizeHandleWrapperClass,x=t.resizeHandleWrapperStyle,k=t.scale,N=t.allowAnyClick,C=t.dragPositionOffset,O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick","dragPositionOffset"]),S=this.props.default?jp({},this.props.default):void 0;delete O.default;var E,j=n||o?{cursor:"auto"}:{cursor:"move"},R=jp(jp(jp({},Rp),j),r),z=this.offsetFromParent,D=z.left,P=z.top;i&&(E={x:i.x-D,y:i.y-P});var M,T=this.state.resizing?void 0:E,I=this.state.resizing?"both":c;return a(wu,{ref:function(t){t&&(e.draggable=t)},handle:o?".".concat(o):void 0,defaultPosition:S,onMouseDown:s,onMouseUp:l,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:I,disabled:n,grid:d,bounds:u?this.state.bounds:void 0,position:T,enableUserSelectHack:p,cancel:h,scale:k,allowAnyClick:N,nodeRef:this.resizableElement,positionOffset:C},a(Sp,jp({},O,{ref:function(t){t&&(e.resizable=t,e.resizableElement.current=t.resizable)},defaultSize:S,size:this.props.size,enable:"boolean"==typeof v?(M=v,{bottom:M,bottomLeft:M,bottomRight:M,left:M,right:M,top:M,topLeft:M,topRight:M}):v,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:R,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:w,handleWrapperClass:y,handleWrapperStyle:x,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:g,handleClasses:m,handleComponent:b,scale:this.props.scale}),f))},t.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},t}(b);const Dp={...r},Pp=Dp.useInsertionEffect||(e=>e());var Mp="undefined"!=typeof document?g:p;let Tp=!1,Ip=0;const _p=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ip++;const Ap=Dp.useId||function(){const[e,t]=r.useState(()=>Tp?_p():void 0);return Mp(()=>{null==e&&t(_p())},[]),r.useEffect(()=>{Tp=!0},[]),e};const Lp=r.createContext(null),Hp=r.createContext(null);function Fp(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=Ap(),a=r.useRef({}),[s]=r.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter(e=>e!==n))||[])}}}()),l=null!=((null==(c=r.useContext(Lp))?void 0:c.id)||null);var c;const[d,u]=r.useState(o.reference),p=function(e){const t=r.useRef(()=>{});return Pp(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}((e,t,r)=>{a.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)}),h=r.useMemo(()=>({setPositionReference:u}),[]),f=r.useMemo(()=>({reference:d||o.reference||null,floating:o.floating||null,domReference:o.reference}),[d,o.reference,o.floating]);return r.useMemo(()=>({dataRef:a,open:t,onOpenChange:p,elements:f,events:s,floatingId:i,refs:h}),[t,p,f,s,i,h])}function Wp(e){void 0===e&&(e={});const{nodeId:t}=e,n=Fp({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,i=o.elements,[a,s]=r.useState(null),[l,c]=r.useState(null),d=(null==i?void 0:i.domReference)||a,u=r.useRef(null),p=r.useContext(Hp);Mp(()=>{d&&(u.current=d)},[d]);const h=Sa({...e,elements:{...i,...l&&{reference:l}}}),f=r.useCallback(e=>{const t=Si(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),h.refs.setReference(t)},[h.refs]),g=r.useCallback(e=>{(Si(e)||null===e)&&(u.current=e,s(e)),(Si(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!Si(e))&&h.refs.setReference(e)},[h.refs]),m=r.useMemo(()=>({...h.refs,setReference:g,setPositionReference:f,domReference:u}),[h.refs,g,f]),b=r.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),v=r.useMemo(()=>({...h,...o,refs:m,elements:b,nodeId:t}),[h,m,b,t,o]);return Mp(()=>{o.dataRef.current.floatingContext=v;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),r.useMemo(()=>({...h,context:v,refs:m,elements:b}),[h,m,b,v])}var Bp=Symbol.for("react.lazy"),Up=r[" use ".trim().toString()];function Vp(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===Bp&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function $p(e){const t=r.forwardRef((e,t)=>{let{children:n,...o}=e;if(Vp(n)&&"function"==typeof Up&&(n=Up(n._payload)),r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(i.ref=t?de(t,e):e),r.cloneElement(n,i)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Xp=Symbol("radix.slottable");function Yp(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Xp}var Kp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=function(t){const n=$p(t),o=r.forwardRef((t,o)=>{let{children:i,...a}=t;Vp(i)&&"function"==typeof Up&&(i=Up(i._payload));const s=r.Children.toArray(i),l=s.find(Yp);if(l){const t=l.props.children,i=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...a,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return e(n,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${n}`),i=r.forwardRef((t,r)=>{const{asChild:i,...a}=t,s=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:r})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{}),Gp=r.forwardRef((t,n)=>e(Kp.label,{...t,ref:n,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));Gp.displayName="Label";var qp=Gp;const Zp=to("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Jp=r.forwardRef((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e(qp,Object.assign({ref:n,className:dr(Zp(),r)},o))});function Qp(e){const t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Jp.displayName=qp.displayName;var eh=[" ","Enter","ArrowUp","ArrowDown"],th=[" ","Enter"],nh="Select",[rh,oh,ih]=me(nh),[ah,sh]=se(nh,[ih,Wa]),lh=Wa(),[ch,dh]=ah(nh),[uh,ph]=ah(nh),hh=t=>{const{__scopeSelect:o,children:i,open:a,defaultOpen:s,onOpenChange:l,value:c,defaultValue:d,onValueChange:u,dir:p,name:h,autoComplete:f,disabled:g,required:m,form:b}=t,v=lh(o),[w,y]=r.useState(null),[x,k]=r.useState(null),[N,C]=r.useState(!1),O=Ve(p),[S,E]=ye({prop:a,defaultProp:s??!1,onChange:l,caller:nh}),[j,R]=ye({prop:c,defaultProp:d,onChange:u,caller:nh}),z=r.useRef(null),D=!w||(b||!!w.closest("form")),[P,M]=r.useState(new Set),T=Array.from(P).map(e=>e.props.value).join(";");return e(rs,{...v,children:n(ch,{required:m,scope:o,trigger:w,onTriggerChange:y,valueNode:x,onValueNodeChange:k,valueNodeHasChildren:N,onValueNodeHasChildrenChange:C,contentId:Ee(),value:j,onValueChange:R,open:S,onOpenChange:E,dir:O,triggerPointerDownPosRef:z,disabled:g,children:[e(rh.Provider,{scope:o,children:e(uh,{scope:t.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{M(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:i})}),D?n(Jh,{"aria-hidden":!0,required:m,tabIndex:-1,name:h,autoComplete:f,value:j,onChange:e=>R(e.target.value),disabled:g,form:b,children:[void 0===j?e("option",{value:""}):null,Array.from(P)]},T):null]})})};hh.displayName=nh;var fh="SelectTrigger",gh=r.forwardRef((t,n)=>{const{__scopeSelect:o,disabled:i=!1,...a}=t,s=lh(o),l=dh(fh,o),c=l.disabled||i,d=ue(n,l.onTriggerChange),u=oh(o),p=r.useRef("touch"),[h,f,g]=ef(e=>{const t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===l.value),r=tf(t,e,n);void 0!==r&&l.onValueChange(r.value)}),m=e=>{c||(l.onOpenChange(!0),g()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return e(os,{asChild:!0,...s,children:e(xe.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Qh(l.value)?"":void 0,...a,ref:d,onClick:be(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&m(e)}),onPointerDown:be(a.onPointerDown,e=>{p.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(m(e),e.preventDefault())}),onKeyDown:be(a.onKeyDown,e=>{const t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||eh.includes(e.key)&&(m(),e.preventDefault())})})})});gh.displayName=fh;var mh="SelectValue",bh=r.forwardRef((n,r)=>{const{__scopeSelect:o,className:i,style:a,children:s,placeholder:l="",...c}=n,d=dh(mh,o),{onValueNodeHasChildrenChange:u}=d,p=void 0!==s,h=ue(r,d.onValueNodeChange);return ve(()=>{u(p)},[u,p]),e(xe.span,{...c,ref:h,style:{pointerEvents:"none"},children:Qh(d.value)?e(t,{children:l}):s})});bh.displayName=mh;var vh=r.forwardRef((t,n)=>{const{__scopeSelect:r,children:o,...i}=t;return e(xe.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})});vh.displayName="SelectIcon";var wh=t=>e(ss,{asChild:!0,...t});wh.displayName="SelectPortal";var yh="SelectContent",xh=r.forwardRef((t,n)=>{const o=dh(yh,t.__scopeSelect),[i,a]=r.useState();if(ve(()=>{a(new DocumentFragment)},[]),!o.open){const n=i;return n?v.createPortal(e(Nh,{scope:t.__scopeSelect,children:e(rh.Slot,{scope:t.__scopeSelect,children:e("div",{children:t.children})})}),n):null}return e(Sh,{...t,ref:n})});xh.displayName=yh;var kh=10,[Nh,Ch]=ah(yh),Oh=pe("SelectContent.RemoveScroll"),Sh=r.forwardRef((t,n)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:d,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:f,collisionPadding:g,sticky:m,hideWhenDetached:b,avoidCollisions:v,...w}=t,y=dh(yh,o),[x,k]=r.useState(null),[N,C]=r.useState(null),O=ue(n,e=>k(e)),[S,E]=r.useState(null),[j,R]=r.useState(null),z=oh(o),[D,P]=r.useState(!1),M=r.useRef(!1);r.useEffect(()=>{if(x)return fs(x)},[x]),Do();const T=r.useCallback(e=>{const[t,...n]=z().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&N&&(N.scrollTop=0),n===r&&N&&(N.scrollTop=N.scrollHeight),n?.focus(),document.activeElement!==o)return}},[z,N]),I=r.useCallback(()=>T([S,x]),[T,S,x]);r.useEffect(()=>{D&&I()},[D,I]);const{onOpenChange:_,triggerPointerDownPosRef:A}=y;r.useEffect(()=>{if(x){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(A.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||_(!1),document.removeEventListener("pointermove",t),A.current=null};return null!==A.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[x,_,A]),r.useEffect(()=>{const e=()=>_(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[_]);const[L,H]=ef(e=>{const t=z().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=tf(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),F=r.useCallback((e,t,n)=>{const r=!M.current&&!n;(void 0!==y.value&&y.value===t||r)&&(E(e),r&&(M.current=!0))},[y.value]),W=r.useCallback(()=>x?.focus(),[x]),B=r.useCallback((e,t,n)=>{const r=!M.current&&!n;(void 0!==y.value&&y.value===t||r)&&R(e)},[y.value]),U="popper"===i?jh:Eh,V=U===jh?{side:c,sideOffset:d,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:f,collisionPadding:g,sticky:m,hideWhenDetached:b,avoidCollisions:v}:{};return e(Nh,{scope:o,content:x,viewport:N,onViewportChange:C,itemRefCallback:F,selectedItem:S,onItemLeave:W,itemTextRefCallback:B,focusSelectedItem:I,selectedItemText:j,position:i,isPositioned:D,searchRef:L,children:e(el,{as:Oh,allowPinchZoom:!0,children:e(_o,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:be(a,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:e(Eo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:e(U,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:e=>e.preventDefault(),...w,...V,onPlaced:()=>P(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:be(w.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||H(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=z().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>T(t)),e.preventDefault()}})})})})})})});Sh.displayName="SelectContentImpl";var Eh=r.forwardRef((t,n)=>{const{__scopeSelect:o,onPlaced:i,...a}=t,s=dh(yh,o),l=Ch(yh,o),[c,d]=r.useState(null),[u,p]=r.useState(null),h=ue(n,e=>p(e)),f=oh(o),g=r.useRef(!1),m=r.useRef(!0),{viewport:b,selectedItem:v,selectedItemText:w,focusSelectedItem:y}=l,x=r.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&b&&v&&w){const e=s.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=w.getBoundingClientRect();if("rtl"!==s.dir){const o=r.left-t.left,i=n.left-o,a=e.left-i,s=e.width+a,l=Math.max(s,t.width),d=window.innerWidth-kh,u=wc(i,[kh,Math.max(kh,d-l)]);c.style.minWidth=s+"px",c.style.left=u+"px"}else{const o=t.right-r.right,i=window.innerWidth-n.right-o,a=window.innerWidth-e.right-i,s=e.width+a,l=Math.max(s,t.width),d=window.innerWidth-kh,u=wc(i,[kh,Math.max(kh,d-l)]);c.style.minWidth=s+"px",c.style.right=u+"px"}const o=f(),a=window.innerHeight-2*kh,l=b.scrollHeight,d=window.getComputedStyle(u),p=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),m=parseInt(d.borderBottomWidth,10),y=p+h+l+parseInt(d.paddingBottom,10)+m,x=Math.min(5*v.offsetHeight,y),k=window.getComputedStyle(b),N=parseInt(k.paddingTop,10),C=parseInt(k.paddingBottom,10),O=e.top+e.height/2-kh,S=a-O,E=v.offsetHeight/2,j=p+h+(v.offsetTop+E),R=y-j;if(j<=O){const e=o.length>0&&v===o[o.length-1].ref.current;c.style.bottom="0px";const t=u.clientHeight-b.offsetTop-b.offsetHeight,n=j+Math.max(S,E+(e?C:0)+t+m);c.style.height=n+"px"}else{const e=o.length>0&&v===o[0].ref.current;c.style.top="0px";const t=Math.max(O,p+b.offsetTop+(e?N:0)+E)+R;c.style.height=t+"px",b.scrollTop=j-O+b.offsetTop}c.style.margin=`${kh}px 0`,c.style.minHeight=x+"px",c.style.maxHeight=a+"px",i?.(),requestAnimationFrame(()=>g.current=!0)}},[f,s.trigger,s.valueNode,c,u,b,v,w,s.dir,i]);ve(()=>x(),[x]);const[k,N]=r.useState();ve(()=>{u&&N(window.getComputedStyle(u).zIndex)},[u]);const C=r.useCallback(e=>{e&&!0===m.current&&(x(),y?.(),m.current=!1)},[x,y]);return e(Rh,{scope:o,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:C,children:e("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:e(xe.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Eh.displayName="SelectItemAlignedPosition";var jh=r.forwardRef((t,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=kh,...a}=t,s=lh(r);return e(is,{...s,...a,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});jh.displayName="SelectPopperPosition";var[Rh,zh]=ah(yh,{}),Dh="SelectViewport",Ph=r.forwardRef((o,i)=>{const{__scopeSelect:a,nonce:s,...l}=o,c=Ch(Dh,a),d=zh(Dh,a),u=ue(i,c.onViewportChange),p=r.useRef(0);return n(t,{children:[e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),e(rh.Slot,{scope:a,children:e(xe.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:be(l.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=d;if(r?.current&&n){const e=Math.abs(p.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*kh,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),s=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});Ph.displayName=Dh;var Mh="SelectGroup",[Th,Ih]=ah(Mh),_h=r.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,i=Ee();return e(Th,{scope:r,id:i,children:e(xe.div,{role:"group","aria-labelledby":i,...o,ref:n})})});_h.displayName=Mh;var Ah="SelectLabel";r.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,i=Ih(Ah,r);return e(xe.div,{id:i.id,...o,ref:n})}).displayName=Ah;var Lh="SelectItem",[Hh,Fh]=ah(Lh),Wh=r.forwardRef((t,n)=>{const{__scopeSelect:o,value:i,disabled:a=!1,textValue:s,...l}=t,c=dh(Lh,o),d=Ch(Lh,o),u=c.value===i,[p,h]=r.useState(s??""),[f,g]=r.useState(!1),m=ue(n,e=>d.itemRefCallback?.(e,i,a)),b=Ee(),v=r.useRef("touch"),w=()=>{a||(c.onValueChange(i),c.onOpenChange(!1))};if(""===i)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return e(Hh,{scope:o,value:i,disabled:a,textId:b,isSelected:u,onItemTextChange:r.useCallback(e=>{h(t=>t||(e?.textContent??"").trim())},[]),children:e(rh.ItemSlot,{scope:o,value:i,disabled:a,textValue:p,children:e(xe.div,{role:"option","aria-labelledby":b,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:m,onFocus:be(l.onFocus,()=>g(!0)),onBlur:be(l.onBlur,()=>g(!1)),onClick:be(l.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:be(l.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:be(l.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:be(l.onPointerMove,e=>{v.current=e.pointerType,a?d.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:be(l.onKeyDown,e=>{""!==d.searchRef?.current&&" "===e.key||(th.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});Wh.displayName=Lh;var Bh="SelectItemText",Uh=r.forwardRef((o,i)=>{const{__scopeSelect:a,className:s,style:l,...c}=o,d=dh(Bh,a),u=Ch(Bh,a),p=Fh(Bh,a),h=ph(Bh,a),[f,g]=r.useState(null),m=ue(i,e=>g(e),p.onItemTextChange,e=>u.itemTextRefCallback?.(e,p.value,p.disabled)),b=f?.textContent,w=r.useMemo(()=>e("option",{value:p.value,disabled:p.disabled,children:b},p.value),[p.disabled,p.value,b]),{onNativeOptionAdd:y,onNativeOptionRemove:x}=h;return ve(()=>(y(w),()=>x(w)),[y,x,w]),n(t,{children:[e(xe.span,{id:p.textId,...c,ref:m}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren?v.createPortal(c.children,d.valueNode):null]})});Uh.displayName=Bh;var Vh="SelectItemIndicator",$h=r.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;return Fh(Vh,r).isSelected?e(xe.span,{"aria-hidden":!0,...o,ref:n}):null});$h.displayName=Vh;var Xh="SelectScrollUpButton",Yh=r.forwardRef((t,n)=>{const o=Ch(Xh,t.__scopeSelect),i=zh(Xh,t.__scopeSelect),[a,s]=r.useState(!1),l=ue(n,i.onScrollButtonChange);return ve(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?e(qh,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Yh.displayName=Xh;var Kh="SelectScrollDownButton",Gh=r.forwardRef((t,n)=>{const o=Ch(Kh,t.__scopeSelect),i=zh(Kh,t.__scopeSelect),[a,s]=r.useState(!1),l=ue(n,i.onScrollButtonChange);return ve(()=>{if(o.viewport&&o.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?e(qh,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Gh.displayName=Kh;var qh=r.forwardRef((t,n)=>{const{__scopeSelect:o,onAutoScroll:i,...a}=t,s=Ch("SelectScrollButton",o),l=r.useRef(null),c=oh(o),d=r.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return r.useEffect(()=>()=>d(),[d]),ve(()=>{const e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),e(xe.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:be(a.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(i,50))}),onPointerMove:be(a.onPointerMove,()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(i,50))}),onPointerLeave:be(a.onPointerLeave,()=>{d()})})});r.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;return e(xe.div,{"aria-hidden":!0,...o,ref:n})}).displayName="SelectSeparator";var Zh="SelectArrow";r.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,i=lh(r),a=dh(Zh,r),s=Ch(Zh,r);return a.open&&"popper"===s.position?e(as,{...i,...o,ref:n}):null}).displayName=Zh;var Jh=r.forwardRef(({__scopeSelect:t,value:n,...o},i)=>{const a=r.useRef(null),s=ue(i,a),l=Qp(n);return r.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[l,n]),e(xe.select,{...o,style:{...xd,...o.style},ref:s,defaultValue:n})});function Qh(e){return""===e||void 0===e}function ef(e){const t=xo(e),n=r.useRef(""),o=r.useRef(0),i=r.useCallback(e=>{const r=n.current+e;t(r),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(r)},[t]),a=r.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,i,a]}function tf(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,s=Math.max(o,0),a.map((e,t)=>a[(s+t)%a.length]));var a,s;1===r.length&&(i=i.filter(e=>e!==n));const l=i.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}Jh.displayName="SelectBubbleInput";var nf=hh,rf=gh,of=bh,af=vh,sf=wh,lf=xh,cf=Ph,df=_h,uf=Wh,pf=Uh,hf=$h,ff=Yh,gf=Gh;const mf=t=>{var n=ie(t,[]);return e(nf,Object.assign({"data-slot":"select"},n))},bf=t=>{var n=ie(t,[]);return e(df,Object.assign({"data-slot":"select-group"},n))},vf=t=>{var n=ie(t,[]);return e(of,Object.assign({"data-slot":"select-value"},n))},wf=t=>{var{className:r,size:o="default",children:i}=t,a=ie(t,["className","size","children"]);return n(rf,Object.assign({"data-slot":"select-trigger","data-size":o,className:dr("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r)},a,{children:[i,e(af,Object.assign({asChild:!0},{children:e(Ht,{className:"size-4 opacity-50"})}))]}))},yf=t=>{var{className:n}=t,r=ie(t,["className"]);return e(ff,Object.assign({"data-slot":"select-scroll-up-button",className:dr("flex cursor-default items-center justify-center py-1",n)},r,{children:e(Wt,{className:"size-4"})}))},xf=t=>{var{className:n}=t,r=ie(t,["className"]);return e(gf,Object.assign({"data-slot":"select-scroll-down-button",className:dr("flex cursor-default items-center justify-center py-1",n)},r,{children:e(Ht,{className:"size-4"})}))},kf=t=>{var{className:r,children:o,position:i="item-aligned",align:a="center"}=t,s=ie(t,["className","children","position","align"]);return e(sf,{children:n(lf,Object.assign({"data-slot":"select-content",className:dr("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:i,align:a},s,{children:[e(yf,{}),e(cf,Object.assign({className:dr("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")},{children:o})),e(xf,{})]}))})},Nf=t=>{var{className:r,children:o}=t,i=ie(t,["className","children"]);return n(uf,Object.assign({"data-slot":"select-item",className:dr("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",r)},i,{children:[e("span",Object.assign({"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center"},{children:e(hf,{children:e(Lt,{className:"size-4"})})})),e(pf,{children:o})]}))};var Cf=["PageUp","PageDown"],Of=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Sf={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ef="Slider",[jf,Rf,zf]=me(Ef),[Df,Pf]=se(Ef,[zf]),[Mf,Tf]=Df(Ef),If=r.forwardRef((t,n)=>{const{name:o,min:i=0,max:a=100,step:s=1,orientation:l="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:u=[i],value:p,onValueChange:h=()=>{},onValueCommit:f=()=>{},inverted:g=!1,form:m,...b}=t,v=r.useRef(new Set),w=r.useRef(0),y="horizontal"===l?Lf:Hf,[x=[],k]=ye({prop:p,defaultProp:u,onChange:e=>{const t=[...v.current];t[w.current]?.focus(),h(e)}}),N=r.useRef(x);function C(e,t,{commit:n}={commit:!1}){const r=function(e){return(String(e).split(".")[1]||"").length}(s),o=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-i)/s)*s+i,r),l=wc(o,[i,a]);k((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}(e);return Math.min(...n)>=t}return!0}(r,d*s)){w.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&f(r),t?r:e}return e})}return e(Mf,{scope:t.__scopeSlider,name:o,disabled:c,min:i,max:a,valueIndexToChangeRef:w,thumbs:v.current,values:x,orientation:l,form:m,children:e(jf.Provider,{scope:t.__scopeSlider,children:e(jf.Slot,{scope:t.__scopeSlider,children:e(y,{"aria-disabled":c,"data-disabled":c?"":void 0,...b,ref:n,onPointerDown:be(b.onPointerDown,()=>{c||(N.current=x)}),min:i,max:a,inverted:g,onSlideStart:c?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}(x,e);C(e,t)},onSlideMove:c?void 0:function(e){C(e,w.current)},onSlideEnd:c?void 0:function(){const e=N.current[w.current];x[w.current]!==e&&f(x)},onHomeKeyDown:()=>!c&&C(i,0,{commit:!0}),onEndKeyDown:()=>!c&&C(a,x.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){const n=Cf.includes(e.key)||e.shiftKey&&Of.includes(e.key)?10:1,r=w.current;C(x[r]+s*n*t,r,{commit:!0})}}})})})})});If.displayName=Ef;var[_f,Af]=Df(Ef,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Lf=r.forwardRef((t,n)=>{const{min:o,max:i,dir:a,inverted:s,onSlideStart:l,onSlideMove:c,onSlideEnd:d,onStepKeyDown:u,...p}=t,[h,f]=r.useState(null),g=ue(n,e=>f(e)),m=r.useRef(void 0),b=Ve(a),v="ltr"===b,w=v&&!s||!v&&s;function y(e){const t=m.current||h.getBoundingClientRect(),n=qf([0,t.width],w?[o,i]:[i,o]);return m.current=t,n(e-t.left)}return e(_f,{scope:t.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:e(Ff,{dir:b,"data-orientation":"horizontal",...p,ref:g,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=y(e.clientX);l?.(t)},onSlideMove:e=>{const t=y(e.clientX);c?.(t)},onSlideEnd:()=>{m.current=void 0,d?.()},onStepKeyDown:e=>{const t=Sf[w?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),Hf=r.forwardRef((t,n)=>{const{min:o,max:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:d,...u}=t,p=r.useRef(null),h=ue(n,p),f=r.useRef(void 0),g=!a;function m(e){const t=f.current||p.current.getBoundingClientRect(),n=qf([0,t.height],g?[i,o]:[o,i]);return f.current=t,n(e-t.top)}return e(_f,{scope:t.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:e(Ff,{"data-orientation":"vertical",...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=m(e.clientY);s?.(t)},onSlideMove:e=>{const t=m(e.clientY);l?.(t)},onSlideEnd:()=>{f.current=void 0,c?.()},onStepKeyDown:e=>{const t=Sf[g?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),Ff=r.forwardRef((t,n)=>{const{__scopeSlider:r,onSlideStart:o,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:l,onStepKeyDown:c,...d}=t,u=Tf(Ef,r);return e(xe.span,{...d,ref:n,onKeyDown:be(t.onKeyDown,e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(l(e),e.preventDefault()):Cf.concat(Of).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:be(t.onPointerDown,e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():o(e)}),onPointerMove:be(t.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:be(t.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),Wf="SliderTrack",Bf=r.forwardRef((t,n)=>{const{__scopeSlider:r,...o}=t,i=Tf(Wf,r);return e(xe.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...o,ref:n})});Bf.displayName=Wf;var Uf="SliderRange",Vf=r.forwardRef((t,n)=>{const{__scopeSlider:o,...i}=t,a=Tf(Uf,o),s=Af(Uf,o),l=ue(n,r.useRef(null)),c=a.values.length,d=a.values.map(e=>Gf(e,a.min,a.max)),u=c>1?Math.min(...d):0,p=100-Math.max(...d);return e(xe.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...i,ref:l,style:{...t.style,[s.startEdge]:u+"%",[s.endEdge]:p+"%"}})});Vf.displayName=Uf;var $f="SliderThumb",Xf=r.forwardRef((t,n)=>{const o=Rf(t.__scopeSlider),[i,a]=r.useState(null),s=ue(n,e=>a(e)),l=r.useMemo(()=>i?o().findIndex(e=>e.ref.current===i):-1,[o,i]);return e(Yf,{...t,ref:s,index:l})}),Yf=r.forwardRef((t,o)=>{const{__scopeSlider:i,index:a,name:s,...l}=t,c=Tf($f,i),d=Af($f,i),[u,p]=r.useState(null),h=ue(o,e=>p(e)),f=!u||(c.form||!!u.closest("form")),g=La(u),m=c.values[a],b=void 0===m?0:Gf(m,c.min,c.max),v=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(a,c.values.length),w=g?.[d.size],y=w?function(e,t,n){const r=e/2,o=qf([0,50],[0,r]);return(r-o(t)*n)*n}(w,b,d.direction):0;return r.useEffect(()=>{if(u)return c.thumbs.add(u),()=>{c.thumbs.delete(u)}},[u,c.thumbs]),n("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${b}% + ${y}px)`},children:[e(jf.ItemSlot,{scope:t.__scopeSlider,children:e(xe.span,{role:"slider","aria-label":t["aria-label"]||v,"aria-valuemin":c.min,"aria-valuenow":m,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...l,ref:h,style:void 0===m?{display:"none"}:t.style,onFocus:be(t.onFocus,()=>{c.valueIndexToChangeRef.current=a})})}),f&&e(Kf,{name:s??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:m},a)]})});Xf.displayName=$f;var Kf=r.forwardRef(({__scopeSlider:t,value:n,...o},i)=>{const a=r.useRef(null),s=ue(a,i),l=Qp(n);return r.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("input",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[l,n]),e(xe.input,{style:{display:"none"},...o,ref:s,defaultValue:n})});function Gf(e,t,n){return wc(100/(n-t)*(e-t),[0,100])}function qf(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}Kf.displayName="RadioBubbleInput";var Zf=If,Jf=Bf,Qf=Vf,eg=Xf;const tg=t=>{var{className:o,defaultValue:i,value:a,min:s=0,max:l=100}=t,c=ie(t,["className","defaultValue","value","min","max"]);const d=r.useMemo(()=>Array.isArray(a)?a:Array.isArray(i)?i:[s,l],[a,i,s,l]);return n(Zf,Object.assign({"data-slot":"slider",defaultValue:i,value:a,min:s,max:l,className:dr("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",o)},c,{children:[e(Jf,Object.assign({"data-slot":"slider-track",className:dr("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5")},{children:e(Qf,{"data-slot":"slider-range",className:dr("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})})),Array.from({length:d.length},(t,n)=>e(eg,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},n))]}))},ng={contain:{label:"Contain",description:"Fit within bounds"},cover:{label:"Cover",description:"Fill and crop"},fill:{label:"Fill",description:"Stretch to fit"}},rg=({fit:t,alt:r,borderRadius:o,onUpdate:i})=>{var a,s,l,c,d,p,h,f;const[g,m]=u(r),[b,v]=u(!1);return n(Ol,Object.assign({open:b,onOpenChange:v},{children:[e(ou,{children:n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(Sl,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:b?"secondary":"ghost",size:"icon",className:"h-7 w-7"},{children:e(sn,{className:"h-4 w-4"})}))}))})),e(su,{children:"Settings"})]})}),e(El,Object.assign({className:"w-80 p-3",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:n("div",Object.assign({className:"space-y-3"},{children:[n("div",{children:[e("h4",Object.assign({className:"font-semibold"},{children:"Image settings"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Customize how the image appears"}))]}),e(bd,{}),n("div",Object.assign({className:"space-y-1"},{children:[e(Jp,Object.assign({htmlFor:"alt-text",className:"text-sm font-medium"},{children:"Alt text"})),e(yo,{id:"alt-text",value:g,onChange:e=>m(e.target.value),onBlur:()=>i({alt:g}),placeholder:"Describe this image...",className:"h-9"}),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Important for accessibility and SEO"}))]})),n("div",Object.assign({className:"space-y-1"},{children:[e(Jp,Object.assign({htmlFor:"object-fit",className:"text-sm font-medium"},{children:"How image fits"})),n(mf,Object.assign({value:t,onValueChange:e=>i({fit:e})},{children:[e(wf,Object.assign({id:"object-fit",className:"h-9 w-full"},{children:e(vf,Object.assign({placeholder:"Select how image fits"},{children:n("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(a=ng[t])||void 0===a?void 0:a.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(s=ng[t])||void 0===s?void 0:s.description}))]}))}))})),e(kf,{children:n(bf,{children:[e(Nf,Object.assign({value:"contain",className:"cursor-pointer"},{children:n("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-4 w-3 rounded bg-primary"})})),n("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(l=ng.contain)||void 0===l?void 0:l.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(c=ng.contain)||void 0===c?void 0:c.description}))]}))]}))})),e(Nf,Object.assign({value:"cover",className:"cursor-pointer"},{children:n("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-8 w-6 rounded bg-primary"})})),n("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(d=ng.cover)||void 0===d?void 0:d.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(p=ng.cover)||void 0===p?void 0:p.description}))]}))]}))})),e(Nf,Object.assign({value:"fill",className:"cursor-pointer"},{children:n("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-8 w-8 rounded bg-primary"})})),n("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(h=ng.fill)||void 0===h?void 0:h.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(f=ng.fill)||void 0===f?void 0:f.description}))]}))]}))}))]})})]}))]})),n("div",Object.assign({className:"space-y-1"},{children:[n("div",Object.assign({className:"flex items-center justify-between"},{children:[e(Jp,Object.assign({className:"text-sm font-medium"},{children:"Border radius"})),n("span",Object.assign({className:"text-sm text-muted-foreground"},{children:[o,"px"]}))]})),e(tg,{value:[o],onValueChange:([e])=>i({borderRadius:e}),max:50,step:1,className:"w-full"})]}))]}))}))]}))},og=({referenceRef:t,elementProps:r,onUpdate:o,onReplace:i,onDelete:a,onDownload:s,onCopy:l})=>{var c,d;const[h,f]=u(!1),{refs:g,floatingStyles:m}=Wp({placement:"top-end",strategy:"fixed",middleware:[ja(8),Da({fallbackPlacements:["bottom","top"],padding:10}),Ra({padding:10})],whileElementsMounted:ua});return p(()=>{requestAnimationFrame(()=>{f(!0)})},[]),p(()=>{const e=t.current;e&&g.setReference(e)},[t,g]),e("div",Object.assign({ref:g.setFloating,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),className:dr("pointer-events-auto","flex items-center gap-1 rounded-lg border bg-background/95 backdrop-blur-sm p-1 shadow-lg","transition-all duration-200 ease-out",h?"opacity-100 translate-y-0":"opacity-0 translate-y-2"),style:m},{children:n(ou,Object.assign({delayDuration:0},{children:[n("div",Object.assign({className:"flex items-center gap-0.5 border-r pr-1"},{children:[n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"left"===r.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"left"})},{children:e(Pt,{className:"h-4 w-4"})}))})),e(su,{children:"Align left"})]}),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"center"===r.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"center"})},{children:e(Dt,{className:"h-4 w-4"})}))})),e(su,{children:"Align center"})]}),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"right"===r.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o({alignment:"right"})},{children:e(Mt,{className:"h-4 w-4"})}))})),e(su,{children:"Align right"})]})]})),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:i},{children:e(on,{className:"h-4 w-4"})}))})),e(su,{children:"Replace"})]}),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:s},{children:e(Ut,{className:"h-4 w-4"})}))})),e(su,{children:"Download"})]}),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:l},{children:e(Bt,{className:"h-4 w-4"})}))})),e(su,{children:"Copy"})]}),e(bd,{orientation:"vertical",className:"h-4"}),e(rg,{fit:null!==(c=r.fit)&&void 0!==c?c:"contain",alt:r.alt||"",borderRadius:null!==(d=r.borderRadius)&&void 0!==d?d:0,onUpdate:o}),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:a},{children:e(cn,{className:"h-4 w-4"})}))})),e(su,{children:"Delete"})]})]}))}))},ig=({blockId:t,attributes:r,children:o,elementProps:i,onUpdate:a,onDelete:s,onReplace:l,pluginOptions:c})=>{var h;const[f,g]=u(i.sizes),{isElementSelected:m}=O(),b=S({blockId:t}),v=m&&b,w=d(null),y=x(),[k,N]=u(()=>{var e;const t=(null===(e=y.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||650,n=null==c?void 0:c.maxSizes;return{maxWidth:(null==n?void 0:n.maxWidth)?"number"==typeof n.maxWidth?n.maxWidth:parseInt(String(n.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==n?void 0:n.maxHeight)?"number"==typeof n.maxHeight?n.maxHeight:parseInt(String(n.maxHeight).replace(/[^\d]/g,""),10):550}});p(()=>{const e=()=>{var e;const t=(null===(e=y.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||650,n=null==c?void 0:c.maxSizes;N({maxWidth:(null==n?void 0:n.maxWidth)?"number"==typeof n.maxWidth?n.maxWidth:parseInt(String(n.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==n?void 0:n.maxHeight)?"number"==typeof n.maxHeight?n.maxHeight:parseInt(String(n.maxHeight).replace(/[^\d]/g,""),10):550})};e();const t=new ResizeObserver(e);return y.refElement&&t.observe(y.refElement),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}},[y,c]);const C=(e,t)=>{const n=e=>"number"==typeof e?e:parseInt(String(e).replace(/[^\d]/g,""),10),r=n(e.width),o=n(e.height),i=n(t.width),a=n(t.height);if(r<=i&&o<=a)return{width:r,height:o};const s=r/i,l=o/a,c=Math.max(s,l),d=Math.round(r/c),u=Math.round(o/c);return{width:Math.min(d,i),height:Math.min(u,a)}},E={left:"justify-start",center:"justify-center",right:"justify-end"}[null!==(h=i.alignment)&&void 0!==h?h:"center"];return n("div",Object.assign({},r,{className:dr("group/image mt-2 relative transition-all w-full flex",E)},{children:[n("div",Object.assign({className:"relative",contentEditable:!1},{children:[e(zp,Object.assign({ref:e=>{(null==e?void 0:e.resizableElement)&&e.resizableElement instanceof HTMLElement&&(w.current=e.resizableElement)},style:{position:"relative",outline:v?".125rem solid rgba(0, 0, 0, 0)":"none",outlineColor:v?"hsl(var(--primary))":"none"},size:{width:f.width,height:f.height},onResize:(e,t,n)=>{const r=parseInt(n.style.width,10),o=parseInt(n.style.height,10),i=C({width:r,height:o},{width:k.maxWidth,height:k.maxHeight});g(i)},onResizeStop:(e,t,n)=>{const r=parseInt(n.style.width,10),o=parseInt(n.style.height,10),i=C({width:r,height:o},{width:k.maxWidth,height:k.maxHeight});a({sizes:i})},lockAspectRatio:!0,minWidth:100,minHeight:100,maxWidth:k.maxWidth,maxHeight:k.maxHeight,enableResizing:!!v&&{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!0,right:!0,top:!1,topLeft:!1,topRight:!1},disableDragging:!0,resizeHandleStyles:{left:{width:"auto",height:"40px",left:"-5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"},right:{width:"auto",height:"40px",right:"-5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"}},resizeHandleComponent:{left:e("div",{className:"h-10 w-2 rounded-full border border-primary bg-primary shadow-sm"}),right:e("div",{className:"h-10 w-2 rounded-full border border-primary bg-primary shadow-sm"})},className:dr("rounded-sm")},{children:e("img",{src:i.src,alt:i.alt||"",className:"w-full h-full transition-all duration-200",style:{objectFit:i.fit,borderRadius:`${i.borderRadius}px`},draggable:!1})})),v&&e(og,{referenceRef:w,elementProps:i,onUpdate:a,onReplace:l,onDelete:s,onDownload:()=>ae(void 0,void 0,void 0,function*(){try{const e=yield fetch(i.src),t=yield e.blob(),n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=`image-${Date.now()}.jpg`,r.click(),URL.revokeObjectURL(n)}catch(e){}}),onCopy:()=>ae(void 0,void 0,void 0,function*(){try{const e=yield fetch(i.src),t=yield e.blob();navigator.clipboard&&ClipboardItem?yield navigator.clipboard.write([new ClipboardItem({[t.type]:t})]):vo(i.src)}catch(e){vo(i.src)}})})]})),o]}))},ag={image:{render:({element:t,attributes:n,children:r,blockId:o})=>{const i=x(),a=E("Image"),{upload:s,progress:l,loading:d}=F(a.upload),{deleteImage:u}=W(a.delete),{preview:p,generatePreview:h,clearPreview:f}=B(),g=c(e=>{N.updateElement(i,{blockId:o,type:"image",props:Object.assign(Object.assign({},t.props),e)})},[i,o,t.props]),m=c(()=>ae(void 0,void 0,void 0,function*(){yield u(t);const e=k.getBlockSlate(i,{id:o});if(!e)return;const n=N.getElementPath(i,{blockId:o,element:t});if(!n)return;const r=n?R.parent(e,n):void 0;r&&P.isElement(r[0])&&!R.isEditor(r[0])?N.deleteElement(i,{blockId:o,type:"image",path:n}):k.deleteBlock(i,{blockId:o,focus:!0})}),[i,o,t,u]),b=c(()=>{N.updateElement(i,{blockId:o,type:"image",props:Object.assign(Object.assign({},t.props),{src:null,alt:null})})},[i,o,t.props]),v=c(e=>ae(void 0,void 0,void 0,function*(){var t;const n=null===(t=e.target.files)||void 0===t?void 0:t[0];if(!n)return;h(n);const r=yield s(n);g({id:r.id||r.fileId,src:r.url,alt:n.name,sizes:{width:r.width,height:r.height}}),f()}),[s,g,h,f]);return t.props.src?e(ig,Object.assign({blockId:o,elementId:t.id,onUpdate:g,onDelete:m,attributes:n,onReplace:b,elementProps:t.props,pluginOptions:a},{children:r})):e(fu,Object.assign({onUpload:v,preview:p,progress:l,loading:d,onInsertUrl:()=>{},onInsertFromUnsplash:()=>{},onInsertFromAI:()=>ae(void 0,void 0,void 0,function*(){}),attributes:n},{children:r}))}}},sg=({textInputRef:t,urlInputRef:r,editedText:o,editedUrl:i,onChangeText:a,onChangeUrl:s,onKeyDown:l,saveEdit:c,cancelEdit:d,deleteLink:u})=>n("div",Object.assign({className:"p-2 space-y-2"},{children:[n("div",Object.assign({className:"space-y-1"},{children:[e(Jp,Object.assign({htmlFor:"link-text",className:"text-xs"},{children:"Link text"})),e(yo,{id:"link-text",ref:t,value:o,onChange:a,placeholder:"Link text...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),n("div",Object.assign({className:"space-y-1"},{children:[e(Jp,Object.assign({htmlFor:"link-url",className:"text-xs"},{children:"URL"})),e(yo,{id:"link-url",ref:r,value:i,onChange:s,onKeyDown:l,placeholder:"Enter URL...",className:"h-8 text-sm",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})]})),n("div",Object.assign({className:"flex justify-between items-center"},{children:[n("div",Object.assign({className:"flex items-center gap-2"},{children:[e(ro,Object.assign({size:"sm",variant:"default",className:"h-7 text-xs",onClick:c,disabled:0===i.length||0===o.length},{children:"Save"})),e(ro,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:d},{children:"Cancel"}))]})),e(ro,Object.assign({size:"sm",variant:"ghost",className:"h-7 text-xs text-destructive hover:text-destructive hover:bg-destructive/10",onClick:u},{children:e(cn,{className:"h-3.5 w-3.5"})}))]}))]})),lg=({element:t,openLink:r,copyUrl:o,openEdit:i,copied:a})=>{var s;return e("div",Object.assign({className:"px-2 py-1"},{children:n("div",Object.assign({className:"flex items-center gap-1"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:e("div",Object.assign({className:"text-sm truncate text-foreground"},{children:null!==(s=t.props.url)&&void 0!==s?s:"No URL"}))})),e("div",{className:"h-4 w-px bg-border"}),e(ro,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:r,disabled:!t.props.url,title:"Open link"},{children:e(Yt,{className:"h-3.5 w-3.5"})})),e(ro,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:o,disabled:!t.props.url,title:a?"Copied!":"Copy URL"},{children:e(a?Lt:Bt,{className:"h-3.5 w-3.5"})})),e(ro,Object.assign({size:"sm",variant:"ghost",className:"h-7 w-7 p-0",onClick:i,title:"Edit URL"},{children:e(tn,{className:"h-3.5 w-3.5"})}))]}))}))};var cg,dg="HoverCard",[ug,pg]=se(dg,[Wa]),hg=Wa(),[fg,gg]=ug(dg),mg=t=>{const{__scopeHoverCard:n,children:o,open:i,defaultOpen:a,onOpenChange:s,openDelay:l=700,closeDelay:c=300}=t,d=hg(n),u=r.useRef(0),p=r.useRef(0),h=r.useRef(!1),f=r.useRef(!1),[g,m]=ye({prop:i,defaultProp:a??!1,onChange:s,caller:dg}),b=r.useCallback(()=>{clearTimeout(p.current),u.current=window.setTimeout(()=>m(!0),l)},[l,m]),v=r.useCallback(()=>{clearTimeout(u.current),h.current||f.current||(p.current=window.setTimeout(()=>m(!1),c))},[c,m]),w=r.useCallback(()=>m(!1),[m]);return r.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(p.current)},[]),e(fg,{scope:n,open:g,onOpenChange:m,onOpen:b,onClose:v,onDismiss:w,hasSelectionRef:h,isPointerDownOnContentRef:f,children:e(rs,{...d,children:o})})};mg.displayName=dg;var bg="HoverCardTrigger",vg=r.forwardRef((t,n)=>{const{__scopeHoverCard:r,...o}=t,i=gg(bg,r),a=hg(r);return e(os,{asChild:!0,...a,children:e(xe.a,{"data-state":i.open?"open":"closed",...o,ref:n,onPointerEnter:be(t.onPointerEnter,Sg(i.onOpen)),onPointerLeave:be(t.onPointerLeave,Sg(i.onClose)),onFocus:be(t.onFocus,i.onOpen),onBlur:be(t.onBlur,i.onClose),onTouchStart:be(t.onTouchStart,e=>e.preventDefault())})})});vg.displayName=bg;var wg="HoverCardPortal",[yg,xg]=ug(wg,{forceMount:void 0}),kg=t=>{const{__scopeHoverCard:n,forceMount:r,children:o,container:i}=t,a=gg(wg,n);return e(yg,{scope:n,forceMount:r,children:e(Ne,{present:r||a.open,children:e(ss,{asChild:!0,container:i,children:o})})})};kg.displayName=wg;var Ng="HoverCardContent",Cg=r.forwardRef((t,n)=>{const r=xg(Ng,t.__scopeHoverCard),{forceMount:o=r.forceMount,...i}=t,a=gg(Ng,t.__scopeHoverCard);return e(Ne,{present:o||a.open,children:e(Og,{"data-state":a.open?"open":"closed",...i,onPointerEnter:be(t.onPointerEnter,Sg(a.onOpen)),onPointerLeave:be(t.onPointerLeave,Sg(a.onClose)),ref:n})})});Cg.displayName=Ng;var Og=r.forwardRef((t,n)=>{const{__scopeHoverCard:o,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,...c}=t,d=gg(Ng,o),u=hg(o),p=r.useRef(null),h=ue(n,p),[f,g]=r.useState(!1);return r.useEffect(()=>{if(f){const e=document.body;return cg=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=cg,e.style.webkitUserSelect=cg}}},[f]),r.useEffect(()=>{if(p.current){const e=()=>{g(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),r.useEffect(()=>{if(p.current){(function(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t})(p.current).forEach(e=>e.setAttribute("tabindex","-1"))}}),e(Eo,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:be(s,e=>{e.preventDefault()}),onDismiss:d.onDismiss,children:e(is,{...u,...c,onPointerDown:be(c.onPointerDown,e=>{e.currentTarget.contains(e.target)&&g(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...c.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})});function Sg(e){return t=>"touch"===t.pointerType?void 0:e()}r.forwardRef((t,n)=>{const{__scopeHoverCard:r,...o}=t,i=hg(r);return e(as,{...i,...o,ref:n})}).displayName="HoverCardArrow";var Eg=mg,jg=vg,Rg=kg,zg=Cg;const Dg=t=>{var n=ie(t,[]);return e(Eg,Object.assign({"data-slot":"hover-card"},n))},Pg=t=>{var n=ie(t,[]);return e(jg,Object.assign({"data-slot":"hover-card-trigger"},n))},Mg=t=>{var{className:n,align:r="center",sideOffset:o=4}=t,i=ie(t,["className","align","sideOffset"]);return e(Rg,Object.assign({"data-slot":"hover-card-portal"},{children:e(zg,Object.assign({"data-slot":"hover-card-content",align:r,sideOffset:o,className:dr("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",n)},i))}))},Tg=e=>{var t;if(M.isText(e))return e.text;if("object"==typeof e&&null!==e&&"children"in e){const n=e.children;return null!==(t=null==n?void 0:n.map(Tg).join(""))&&void 0!==t?t:""}return""},Ig={link:{render:t=>{var r;const{attributes:o,children:i,element:a,blockId:s}=t,l=x(),c=Tg(a),[h,f]=u(!1),[g,m]=u(null!==(r=a.props.url)&&void 0!==r?r:""),[b,v]=u(c),[w,y]=u(!1),k=d(null),C=d(null);p(()=>{var e;m(null!==(e=a.props.url)&&void 0!==e?e:""),v(c)},[a.props.url,c]),p(()=>{h&&k.current&&(k.current.focus(),k.current.select())},[h]);return n(Dg,Object.assign({openDelay:100,closeDelay:100},{children:[e(Pg,Object.assign({asChild:!0},{children:e("a",Object.assign({},o,{href:a.props.url||void 0,target:a.props.target,rel:a.props.rel,title:a.props.title||void 0,className:"text-primary font-medium underline underline-offset-4 cursor-pointer hover:text-primary/80 transition-colors",contentEditable:!1,onClick:e=>{h&&e.preventDefault()}},{children:i}))})),e(Mg,Object.assign({className:"w-80 p-0",onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:h?e(sg,{textInputRef:C,urlInputRef:k,editedText:b,editedUrl:g,onChangeText:e=>v(e.target.value),onChangeUrl:e=>m(e.target.value),onKeyDown:e=>{var t;"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),N.updateElement(l,{blockId:s,type:"link",text:b,props:{url:g}}),f(!1)):"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),m(null!==(t=a.props.url)&&void 0!==t?t:""),v(c),f(!1))},saveEdit:e=>{e.preventDefault(),e.stopPropagation();const t=N.getElementPath(l,{blockId:s,element:a});t&&(N.updateElement(l,{blockId:s,type:"link",text:b,path:t,props:{url:g}}),f(!1))},cancelEdit:e=>{var t;e.preventDefault(),e.stopPropagation(),m(null!==(t=a.props.url)&&void 0!==t?t:""),v(c),f(!1)},deleteLink:e=>{e.preventDefault(),e.stopPropagation();const t=N.getElementPath(l,{blockId:s,element:a});t&&(N.deleteElement(l,{mode:"unwrap",type:"link",path:t,blockId:s}),f(!1))}}):e(lg,{element:a,openLink:e=>{var t;e.preventDefault(),e.stopPropagation(),a.props.url&&window.open(a.props.url,null!==(t=a.props.target)&&void 0!==t?t:"_blank",a.props.rel)},copyUrl:e=>{if(e.preventDefault(),e.stopPropagation(),a.props.url){vo(a.props.url)&&(y(!0),setTimeout(()=>y(!1),1500))}},openEdit:e=>{0!==g.length&&(e.preventDefault(),e.stopPropagation(),f(!0))},copied:w})}))]}))}}},_g={"numbered-list":{render:t=>{const{attributes:r,children:o,blockId:i}=t,a=j(i),s=U(a);return n("div",Object.assign({},r,{className:"my-0 ml-6 list-decimal [&>li]:mt-2"},{children:[n("span",Object.assign({contentEditable:!1},{children:[s,"."]})),e("span",Object.assign({},r,{className:"pl-2"},{children:o}))]}))}}},Ag={BulletedList:{"bulleted-list":{render:t=>{const{attributes:n,children:r}=t;return e("ul",Object.assign({},n,{className:"my-0 ml-6 list-disc [&>li]:mt-2"},{children:e("li",Object.assign({},n,{className:"pl-2"},{children:r}))}))}}},NumberedList:_g,TodoList:{"todo-list":{render:t=>{const{attributes:r,children:o,element:i,blockId:a}=t,s=i.props.checked,l=x();return e("div",Object.assign({},r,{className:"m-0 mt-2 ml-6 list-none"},{children:n("div",Object.assign({className:"flex items-start gap-2 pl-2"},{children:[e("button",Object.assign({type:"button",contentEditable:!1,onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),N.updateElement(l,{blockId:a,type:"todo-list",props:{checked:!s}})},className:dr("mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-sm border-2 transition-colors",s?"bg-primary border-primary text-primary-foreground":"border-input bg-background"),"aria-label":s?"Mark as unchecked":"Mark as checked"},{children:s&&e(Lt,{className:"h-3 w-3"})})),e("span",Object.assign({className:dr("flex-1",s&&"text-muted-foreground line-through")},{children:o}))]}))}))}}}},Lg={paragraph:{render:t=>{const{attributes:n,children:r}=t;return e("p",Object.assign({},n,{className:"leading-7 [&:not(:first-child)]:mt-6"},{children:r}))}}};var Hg=["Enter"," "],Fg=["ArrowUp","PageDown","End"],Wg=["ArrowDown","PageUp","Home",...Fg],Bg={ltr:[...Hg,"ArrowRight"],rtl:[...Hg,"ArrowLeft"]},Ug={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Vg="Menu",[$g,Xg,Yg]=me(Vg),[Kg,Gg]=se(Vg,[Yg,Wa,Hl]),qg=Wa(),Zg=Hl(),[Jg,Qg]=Kg(Vg),[em,tm]=Kg(Vg),nm=t=>{const{__scopeMenu:n,open:o=!1,children:i,dir:a,onOpenChange:s,modal:l=!0}=t,c=qg(n),[d,u]=r.useState(null),p=r.useRef(!1),h=xo(s),f=Ve(a);return r.useEffect(()=>{const e=()=>{p.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),e(rs,{...c,children:e(Jg,{scope:n,open:o,onOpenChange:h,content:d,onContentChange:u,children:e(em,{scope:n,onClose:r.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:f,modal:l,children:i})})})};nm.displayName=Vg;var rm=r.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t,i=qg(r);return e(os,{...i,...o,ref:n})});rm.displayName="MenuAnchor";var om="MenuPortal",[im,am]=Kg(om,{forceMount:void 0}),sm=t=>{const{__scopeMenu:n,forceMount:r,children:o,container:i}=t,a=Qg(om,n);return e(im,{scope:n,forceMount:r,children:e(Ne,{present:r||a.open,children:e(ss,{asChild:!0,container:i,children:o})})})};sm.displayName=om;var lm="MenuContent",[cm,dm]=Kg(lm),um=r.forwardRef((t,n)=>{const r=am(lm,t.__scopeMenu),{forceMount:o=r.forceMount,...i}=t,a=Qg(lm,t.__scopeMenu),s=tm(lm,t.__scopeMenu);return e($g.Provider,{scope:t.__scopeMenu,children:e(Ne,{present:o||a.open,children:e($g.Slot,{scope:t.__scopeMenu,children:s.modal?e(pm,{...i,ref:n}):e(hm,{...i,ref:n})})})})}),pm=r.forwardRef((t,n)=>{const o=Qg(lm,t.__scopeMenu),i=r.useRef(null),a=ue(n,i);return r.useEffect(()=>{const e=i.current;if(e)return fs(e)},[]),e(gm,{...t,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:be(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),hm=r.forwardRef((t,n)=>{const r=Qg(lm,t.__scopeMenu);return e(gm,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),fm=pe("MenuContent.ScrollLock"),gm=r.forwardRef((t,n)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:f,onDismiss:g,disableOutsideScroll:m,...b}=t,v=Qg(lm,o),w=tm(lm,o),y=qg(o),x=Zg(o),k=Xg(o),[N,C]=r.useState(null),O=r.useRef(null),S=ue(n,O,v.onContentChange),E=r.useRef(0),j=r.useRef(""),R=r.useRef(0),z=r.useRef(null),D=r.useRef("right"),P=r.useRef(0),M=m?el:r.Fragment,T=m?{as:fm,allowPinchZoom:!0}:void 0,I=e=>{const t=j.current+e,n=k().filter(e=>!e.disabled),r=document.activeElement,o=n.find(e=>e.ref.current===r)?.textValue,i=function(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,i=n?e.indexOf(n):-1;let a=(s=e,l=Math.max(i,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===o.length&&(a=a.filter(e=>e!==n));const c=a.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}(n.map(e=>e.textValue),t,o),a=n.find(e=>e.textValue===i)?.ref.current;!function e(t){j.current=t,window.clearTimeout(E.current),""!==t&&(E.current=window.setTimeout(()=>e(""),1e3))}(t),a&&setTimeout(()=>a.focus())};r.useEffect(()=>()=>window.clearTimeout(E.current),[]),Do();const _=r.useCallback(e=>D.current===z.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],s=t[i],l=a.x,c=a.y,d=s.x,u=s.y;c>r!=u>r&&n<(d-l)*(r-c)/(u-c)+l&&(o=!o)}return o}(n,t)}(e,z.current?.area),[]);return e(cm,{scope:o,searchRef:j,onItemEnter:r.useCallback(e=>{_(e)&&e.preventDefault()},[_]),onItemLeave:r.useCallback(e=>{_(e)||(O.current?.focus(),C(null))},[_]),onTriggerLeave:r.useCallback(e=>{_(e)&&e.preventDefault()},[_]),pointerGraceTimerRef:R,onPointerGraceIntentChange:r.useCallback(e=>{z.current=e},[]),children:e(M,{...T,children:e(_o,{asChild:!0,trapped:a,onMountAutoFocus:be(s,e=>{e.preventDefault(),O.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:e(Eo,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:f,onDismiss:g,children:e(Kl,{asChild:!0,...x,dir:w.dir,orientation:"vertical",loop:i,currentTabStopId:N,onCurrentTabStopIdChange:C,onEntryFocus:be(d,e=>{w.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:e(is,{role:"menu","aria-orientation":"vertical","data-state":Um(v.open),"data-radix-menu-content":"",dir:w.dir,...y,...b,ref:S,style:{outline:"none",...b.style},onKeyDown:be(b.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&I(e.key));const o=O.current;if(e.target!==o)return;if(!Wg.includes(e.key))return;e.preventDefault();const i=k().filter(e=>!e.disabled).map(e=>e.ref.current);Fg.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)}),onBlur:be(t.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),j.current="")}),onPointerMove:be(t.onPointerMove,Xm(e=>{const t=e.target,n=P.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>P.current?"right":"left";D.current=t,P.current=e.clientX}}))})})})})})})});um.displayName=lm;var mm=r.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e(xe.div,{role:"group",...o,ref:n})});mm.displayName="MenuGroup";var bm=r.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e(xe.div,{...o,ref:n})});bm.displayName="MenuLabel";var vm="MenuItem",wm="menu.itemSelect",ym=r.forwardRef((t,n)=>{const{disabled:o=!1,onSelect:i,...a}=t,s=r.useRef(null),l=tm(vm,t.__scopeMenu),c=dm(vm,t.__scopeMenu),d=ue(n,s),u=r.useRef(!1);return e(xm,{...a,ref:d,disabled:o,onClick:be(t.onClick,()=>{const e=s.current;if(!o&&e){const t=new CustomEvent(wm,{bubbles:!0,cancelable:!0});e.addEventListener(wm,e=>i?.(e),{once:!0}),ke(e,t),t.defaultPrevented?u.current=!1:l.onClose()}}),onPointerDown:e=>{t.onPointerDown?.(e),u.current=!0},onPointerUp:be(t.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:be(t.onKeyDown,e=>{const t=""!==c.searchRef.current;o||t&&" "===e.key||Hg.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ym.displayName=vm;var xm=r.forwardRef((t,n)=>{const{__scopeMenu:o,disabled:i=!1,textValue:a,...s}=t,l=dm(vm,o),c=Zg(o),d=r.useRef(null),u=ue(n,d),[p,h]=r.useState(!1),[f,g]=r.useState("");return r.useEffect(()=>{const e=d.current;e&&g((e.textContent??"").trim())},[s.children]),e($g.ItemSlot,{scope:o,disabled:i,textValue:a??f,children:e(Gl,{asChild:!0,...c,focusable:!i,children:e(xe.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:u,onPointerMove:be(t.onPointerMove,Xm(e=>{if(i)l.onItemLeave(e);else if(l.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:be(t.onPointerLeave,Xm(e=>l.onItemLeave(e))),onFocus:be(t.onFocus,()=>h(!0)),onBlur:be(t.onBlur,()=>h(!1))})})})}),km=r.forwardRef((t,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=t;return e(zm,{scope:t.__scopeMenu,checked:r,children:e(ym,{role:"menuitemcheckbox","aria-checked":Vm(r)?"mixed":r,...i,ref:n,"data-state":$m(r),onSelect:be(i.onSelect,()=>o?.(!!Vm(r)||!r),{checkForDefaultPrevented:!1})})})});km.displayName="MenuCheckboxItem";var Nm="MenuRadioGroup",[Cm,Om]=Kg(Nm,{value:void 0,onValueChange:()=>{}}),Sm=r.forwardRef((t,n)=>{const{value:r,onValueChange:o,...i}=t,a=xo(o);return e(Cm,{scope:t.__scopeMenu,value:r,onValueChange:a,children:e(mm,{...i,ref:n})})});Sm.displayName=Nm;var Em="MenuRadioItem",jm=r.forwardRef((t,n)=>{const{value:r,...o}=t,i=Om(Em,t.__scopeMenu),a=r===i.value;return e(zm,{scope:t.__scopeMenu,checked:a,children:e(ym,{role:"menuitemradio","aria-checked":a,...o,ref:n,"data-state":$m(a),onSelect:be(o.onSelect,()=>i.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});jm.displayName=Em;var Rm="MenuItemIndicator",[zm,Dm]=Kg(Rm,{checked:!1}),Pm=r.forwardRef((t,n)=>{const{__scopeMenu:r,forceMount:o,...i}=t,a=Dm(Rm,r);return e(Ne,{present:o||Vm(a.checked)||!0===a.checked,children:e(xe.span,{...i,ref:n,"data-state":$m(a.checked)})})});Pm.displayName=Rm;var Mm=r.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e(xe.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});Mm.displayName="MenuSeparator";var Tm=r.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t,i=qg(r);return e(as,{...i,...o,ref:n})});Tm.displayName="MenuArrow";var Im="MenuSub",[_m,Am]=Kg(Im),Lm=t=>{const{__scopeMenu:n,children:o,open:i=!1,onOpenChange:a}=t,s=Qg(Im,n),l=qg(n),[c,d]=r.useState(null),[u,p]=r.useState(null),h=xo(a);return r.useEffect(()=>(!1===s.open&&h(!1),()=>h(!1)),[s.open,h]),e(rs,{...l,children:e(Jg,{scope:n,open:i,onOpenChange:h,content:u,onContentChange:p,children:e(_m,{scope:n,contentId:Ee(),triggerId:Ee(),trigger:c,onTriggerChange:d,children:o})})})};Lm.displayName=Im;var Hm="MenuSubTrigger",Fm=r.forwardRef((t,n)=>{const o=Qg(Hm,t.__scopeMenu),i=tm(Hm,t.__scopeMenu),a=Am(Hm,t.__scopeMenu),s=dm(Hm,t.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,u={__scopeMenu:t.__scopeMenu},p=r.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return r.useEffect(()=>p,[p]),r.useEffect(()=>{const e=c.current;return()=>{window.clearTimeout(e),d(null)}},[c,d]),e(rm,{asChild:!0,...u,children:e(xm,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":a.contentId,"data-state":Um(o.open),...t,ref:de(n,a.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:be(t.onPointerMove,Xm(e=>{s.onItemEnter(e),e.defaultPrevented||t.disabled||o.open||l.current||(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{o.onOpenChange(!0),p()},100))})),onPointerLeave:be(t.onPointerLeave,Xm(e=>{p();const t=o.content?.getBoundingClientRect();if(t){const n=o.content?.dataset.side,r="right"===n,i=r?-5:5,a=t[r?"left":"right"],l=t[r?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:a,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:a,y:t.bottom}],side:n}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:be(t.onKeyDown,e=>{const n=""!==s.searchRef.current;t.disabled||n&&" "===e.key||Bg[i.dir].includes(e.key)&&(o.onOpenChange(!0),o.content?.focus(),e.preventDefault())})})})});Fm.displayName=Hm;var Wm="MenuSubContent",Bm=r.forwardRef((t,n)=>{const o=am(lm,t.__scopeMenu),{forceMount:i=o.forceMount,...a}=t,s=Qg(lm,t.__scopeMenu),l=tm(lm,t.__scopeMenu),c=Am(Wm,t.__scopeMenu),d=r.useRef(null),u=ue(n,d);return e($g.Provider,{scope:t.__scopeMenu,children:e(Ne,{present:i||s.open,children:e($g.Slot,{scope:t.__scopeMenu,children:e(gm,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:"start",side:"rtl"===l.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:be(t.onFocusOutside,e=>{e.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:be(t.onEscapeKeyDown,e=>{l.onClose(),e.preventDefault()}),onKeyDown:be(t.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=Ug[l.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function Um(e){return e?"open":"closed"}function Vm(e){return"indeterminate"===e}function $m(e){return Vm(e)?"indeterminate":e?"checked":"unchecked"}function Xm(e){return t=>"mouse"===t.pointerType?e(t):void 0}Bm.displayName=Wm;var Ym=nm,Km=rm,Gm=sm,qm=um,Zm=mm,Jm=bm,Qm=ym,eb=km,tb=Sm,nb=jm,rb=Pm,ob=Mm,ib=Tm,ab=Lm,sb=Fm,lb=Bm,cb="DropdownMenu",[db,ub]=se(cb,[Gg]),pb=Gg(),[hb,fb]=db(cb),gb=t=>{const{__scopeDropdownMenu:n,children:o,dir:i,open:a,defaultOpen:s,onOpenChange:l,modal:c=!0}=t,d=pb(n),u=r.useRef(null),[p,h]=ye({prop:a,defaultProp:s??!1,onChange:l,caller:cb});return e(hb,{scope:n,triggerId:Ee(),triggerRef:u,contentId:Ee(),open:p,onOpenChange:h,onOpenToggle:r.useCallback(()=>h(e=>!e),[h]),modal:c,children:e(Ym,{...d,open:p,onOpenChange:h,dir:i,modal:c,children:o})})};gb.displayName=cb;var mb="DropdownMenuTrigger",bb=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...i}=t,a=fb(mb,r),s=pb(r);return e(Km,{asChild:!0,...s,children:e(xe.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:de(n,a.triggerRef),onPointerDown:be(t.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:be(t.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});bb.displayName=mb;var vb=t=>{const{__scopeDropdownMenu:n,...r}=t,o=pb(n);return e(Gm,{...o,...r})};vb.displayName="DropdownMenuPortal";var wb="DropdownMenuContent",yb=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:o,...i}=t,a=fb(wb,o),s=pb(o),l=r.useRef(!1);return e(qm,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...i,ref:n,onCloseAutoFocus:be(t.onCloseAutoFocus,e=>{l.current||a.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:be(t.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.modal&&!r||(l.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yb.displayName=wb;r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=pb(r);return e(Zm,{...i,...o,ref:n})}).displayName="DropdownMenuGroup";r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=pb(r);return e(Jm,{...i,...o,ref:n})}).displayName="DropdownMenuLabel";var xb=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=pb(r);return e(Qm,{...i,...o,ref:n})});xb.displayName="DropdownMenuItem";r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=pb(r);return e(eb,{...i,...o,ref:n})}).displayName="DropdownMenuCheckboxItem";r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=pb(r);return e(tb,{...i,...o,ref:n})}).displayName="DropdownMenuRadioGroup";r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=pb(r);return e(nb,{...i,...o,ref:n})}).displayName="DropdownMenuRadioItem";r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=pb(r);return e(rb,{...i,...o,ref:n})}).displayName="DropdownMenuItemIndicator";var kb=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=pb(r);return e(ob,{...i,...o,ref:n})});kb.displayName="DropdownMenuSeparator";r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=pb(r);return e(ib,{...i,...o,ref:n})}).displayName="DropdownMenuArrow";var Nb=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=pb(r);return e(sb,{...i,...o,ref:n})});Nb.displayName="DropdownMenuSubTrigger";var Cb=r.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=pb(r);return e(lb,{...i,...o,ref:n,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cb.displayName="DropdownMenuSubContent";var Ob=gb,Sb=bb,Eb=vb,jb=yb,Rb=xb,zb=kb,Db=t=>{const{__scopeDropdownMenu:n,children:r,open:o,onOpenChange:i,defaultOpen:a}=t,s=pb(n),[l,c]=ye({prop:o,defaultProp:a??!1,onChange:i,caller:"DropdownMenuSub"});return e(ab,{...s,open:l,onOpenChange:c,children:r})},Pb=Nb,Mb=Cb;const Tb=t=>{var n=ie(t,[]);return e(Ob,Object.assign({"data-slot":"dropdown-menu"},n))},Ib=t=>{var n=ie(t,[]);return e(Sb,Object.assign({"data-slot":"dropdown-menu-trigger"},n))},_b=t=>{var{className:n,sideOffset:r=4}=t,o=ie(t,["className","sideOffset"]);return e(Eb,{children:e(jb,Object.assign({"data-slot":"dropdown-menu-content",sideOffset:r,className:dr("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n)},o))})},Ab=t=>{var{className:n,inset:r,variant:o="default"}=t,i=ie(t,["className","inset","variant"]);return e(Rb,Object.assign({"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":o,className:dr("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n)},i))},Lb=t=>{var{className:n}=t,r=ie(t,["className"]);return e(zb,Object.assign({"data-slot":"dropdown-menu-separator",className:dr("bg-border -mx-1 my-1 h-px",n)},r))},Hb=t=>{var n=ie(t,[]);return e(Db,Object.assign({"data-slot":"dropdown-menu-sub"},n))},Fb=t=>{var{className:r,inset:o,children:i}=t,a=ie(t,["className","inset","children"]);return n(Pb,Object.assign({"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:dr("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r)},a,{children:[i,e(Ft,{className:"ml-auto size-4"})]}))},Wb=t=>{var{className:n}=t,r=ie(t,["className"]);return e(Mb,Object.assign({"data-slot":"dropdown-menu-sub-content",className:dr("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",n)},r))},Bb={"step-container":{render:t=>{const r=x(),{attributes:o,children:i}=t;return n("div",Object.assign({},o,{role:"list",className:"ml-3.5 my-4 relative group/steps-node"},{children:[i,e("div",Object.assign({contentEditable:!1,className:dr("-ml-3.5 z-20 absolute left-0 flex","transition-opacity duration-300","opacity-0 group-hover/steps-node:opacity-100"),style:{bottom:"-4px"}},{children:e(ro,Object.assign({variant:"ghost",size:"icon",className:dr("w-7 h-7 shrink-0 rounded-lg","bg-muted hover:bg-muted/80","text-sm font-semibold"),onClick:()=>{k.getBlockSlate(r,{id:t.blockId})&&V.addStep(r,{blockId:t.blockId})},"aria-label":"Add more Step"},{children:e(rn,{className:"w-4 h-4"})}))}))]}))}},"step-list":{render:t=>{const{attributes:n,children:r}=t;return e("div",Object.assign({},n,{className:"[&>div]:contents contents"},{children:r}))}},"step-list-item":{render:t=>{const{attributes:r,children:o,element:i}=t,a=x(),s=l(()=>{const e=N.getElementPath(a,{blockId:t.blockId,element:i}),n=null==e?void 0:e[e.length-1];return n||0},[a,i,t.blockId]),c=s+1,d=s===i.children.length-1,u=0===i.children.length;return e("div",Object.assign({className:"prose dark:prose-invert"},{children:n("div",Object.assign({className:"relative group/component-wrapper group/step"},{children:[n("div",Object.assign({},r,{role:"listitem",className:"step group/step relative flex items-start pb-5"},{children:[e("div",{"data-component-part":"step-line",contentEditable:!1,className:dr("absolute w-px h-[calc(100%-2.75rem)] top-[2.75rem]",d?"bg-transparent bg-gradient-to-b from-border via-80% to-transparent":"bg-border/70",d&&u&&"hidden")}),e("div",Object.assign({"data-component-part":"step-number",contentEditable:!1,className:"absolute ml-[-13px] py-2 pointer-events-none select-none"},{children:e("div",Object.assign({className:dr("size-7 shrink-0 rounded-full","bg-muted","text-xs font-semibold","flex items-center justify-center","text-foreground")},{children:c}))})),e("div",Object.assign({className:"w-full overflow-hidden pl-8 pr-px"},{children:o}))]})),e("div",Object.assign({contentEditable:!1,className:dr("z-20 absolute top-0 right-3 flex","transition-opacity duration-300","opacity-0 hover:opacity-100 group-hover/step:opacity-100")},{children:n(Tb,{children:[e(Ib,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"icon",className:dr("size-8 shrink-0 rounded-lg","border border-transparent","hover:bg-muted"),"aria-label":"Edit Step attributes"},{children:e(Vt,{className:"h-4 w-4"})}))})),n(_b,Object.assign({align:"end"},{children:[n(Ab,Object.assign({onClick:()=>{V.moveUp(a,{blockId:t.blockId,stepId:i.id})},className:"cursor-pointer"},{children:[e(At,{className:"h-4 w-4"})," Move up"]})),n(Ab,Object.assign({onClick:()=>{V.moveDown(a,{blockId:t.blockId,stepId:i.id})},className:"cursor-pointer"},{children:[e(Tt,{className:"h-4 w-4"})," Move down"]})),e(Lb,{}),n(Ab,Object.assign({onClick:()=>{V.deleteStep(a,{blockId:t.blockId,stepId:i.id})},className:"text-destructive focus:text-destructive cursor-pointer"},{children:[e(cn,{className:"h-4 w-4"})," Delete step"]}))]}))]})}))]}))}))}},"step-list-item-heading":{render:t=>{const{attributes:n,children:r}=t;return e("p",Object.assign({},n,{"data-component-part":"step-title",className:"mt-2 font-semibold prose dark:prose-invert text-foreground"},{children:r}))}},"step-list-item-content":{render:t=>{const{attributes:n,children:r}=t;return e("div",Object.assign({},n,{"data-component-part":"step-content",className:"my-2 prose dark:prose-invert"},{children:r}))}}},Ub=i((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("div",Object.assign({"data-slot":"table-container",className:"relative w-full overflow-x-auto rounded-md"},{children:e("table",Object.assign({ref:n,"data-slot":"table",className:dr("caption-bottom text-sm table-fixed border-collapse",r)},o))}))});Ub.displayName="Table";i((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("thead",Object.assign({ref:n,"data-slot":"table-header",className:dr("[&_tr]:border-b",r)},o))}).displayName="TableHeader";const Vb=i((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("tbody",Object.assign({ref:n,"data-slot":"table-body",className:dr("[&_tr:first-child]:border-t [&_tr]:border-b [&_tr]:border-border",r)},o))});Vb.displayName="TableBody";i((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("tfoot",Object.assign({ref:n,"data-slot":"table-footer",className:dr("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",r)},o))}).displayName="TableFooter";const $b=i((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("tr",Object.assign({ref:n,"data-slot":"table-row",className:dr("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",r)},o))});$b.displayName="TableRow";const Xb=i((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("th",Object.assign({ref:n,"data-slot":"table-head",className:dr("border-border border-r last:border-r-0 text-foreground h-10 px-2 text-left font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] bg-muted/50",r)},o))});Xb.displayName="TableHead";const Yb=i((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("td",Object.assign({ref:n,"data-slot":"table-cell",className:dr("border-border border-r last:border-r-0 p-2 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",r)},o))});Yb.displayName="TableCell";i((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e("caption",Object.assign({ref:n,"data-slot":"table-caption",className:dr("text-muted-foreground mt-4 text-sm",r)},o))}).displayName="TableCaption";const Kb=({blockId:t})=>{const n=x(),[r,o]=u(null),[i,a]=u(!1),[s,l]=u(null),[h,f]=u([]),g=d(0),m=d(0),b=d([]),v=d(null),w=d(null),y=d(null);p(()=>{b.current=h},[h]),p(()=>{w.current=r},[r]),p(()=>{v.current=s},[s]);const k=c(()=>{const e=document.querySelector(`[data-yoopta-block-id="${t}"][data-table-container]`);if(!e)return;const n=e.querySelector("table");if(!n)return;const r=n.getBoundingClientRect();o(r);const i=n.querySelector("colgroup");y.current=i;const a=n.querySelectorAll("colgroup col"),s=n.querySelector("tr");if(a.length>0){const e=[];r.left,a.forEach((t,n)=>{const r=window.getComputedStyle(t),o=parseInt(r.width,10)||200;e.push(o)}),f(e)}else if(s){const e=s.querySelectorAll("td, th"),t=[],n=[];e.forEach((e,r)=>{const o=e.getBoundingClientRect();n.push(o.width),t.push({index:r,left:o.left,width:o.width})}),f(n)}},[t]);p(()=>{k();const e=document.querySelector(`[data-yoopta-block-id="${t}"][data-table-container]`);if(!e)return;const n=e.querySelector("table");if(!n)return;const r=new ResizeObserver(()=>{i||k()});r.observe(n);const o=new MutationObserver(()=>{i||k()});o.observe(n,{childList:!0,subtree:!0});const a=()=>{i||k()};return window.addEventListener("scroll",a,!0),()=>{r.disconnect(),o.disconnect(),window.removeEventListener("scroll",a,!0)}},[t,k,i]);const N=c(e=>{if(!y.current)return;y.current.querySelectorAll("col").forEach((t,n)=>{void 0!==e[n]&&(t.style.width=`${e[n]}px`)})},[]),C=c((e,t)=>{if(!t||0===e.length)return[];let n=t.left;return e.map((e,t)=>{const r={index:t,left:n,width:e};return n+=e,r})},[]),O=c((e,t)=>{e.preventDefault(),e.stopPropagation();const n=h[t];void 0!==n&&(a(!0),l(t),g.current=e.clientX,m.current=n,document.body.classList.add("resizing-column"))},[h]),S=c(e=>{const t=v.current;if(null===t)return;const n=e.clientX-g.current,r=Math.max(50,m.current+n),o=[...b.current];o[t]=r,f(o),N(o)},[N]),E=c(()=>{const e=v.current,r=b.current;null!==e&&void 0!==r[e]&&$.setColumnWidth(n,t,e,r[e]),a(!1),l(null),document.body.classList.remove("resizing-column"),setTimeout(k,50)},[n,t,k]);if(p(()=>{if(i)return document.addEventListener("mousemove",S),document.addEventListener("mouseup",E),()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",E)}},[i,S,E]),!r||0===h.length)return null;const j=C(h,r).slice(0,-1).map(t=>{const n=t.left+t.width-3;return e("div",{className:"column-resize-handle",style:{position:"fixed",left:`${n}px`,top:`${r.top}px`,width:"6px",height:`${r.height}px`,cursor:"col-resize",zIndex:50,backgroundColor:i&&s===t.index?"hsl(var(--primary))":"transparent"},onMouseDown:e=>O(e,t.index),onMouseEnter:e=>{i||(e.target.style.backgroundColor="hsl(var(--primary) / 0.3)")},onMouseLeave:e=>{i||(e.target.style.backgroundColor="transparent")}},`resize-${t.index}`)});return e(K,Object.assign({id:"column-resize-handles-container"},{children:e("div",Object.assign({className:"column-resize-handles-container",style:{pointerEvents:i?"auto":void 0}},{children:j}))}))},Gb=({blockId:t,totalColumns:n,position:r,onMouseEnter:o,onMouseLeave:i,buttonRef:a})=>{const s=x(),l=d(null),u=a||l,p=c(()=>{const e=[0,0,n-1];$.insertTableColumn(s,t,{path:e,insertMode:"after"})},[s,t,n]);return e(K,Object.assign({id:`table-add-column-button-${t}`},{children:e("div",Object.assign({ref:u,className:"fixed z-[9999] pointer-events-auto",style:{left:`${r.left+4}px`,top:`${r.top}px`,width:"18px",height:`${r.height}px`},onMouseEnter:o,onMouseLeave:i},{children:e(ro,Object.assign({variant:"ghost",size:"sm",className:"p-0 h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md transition-all hover:shadow-md flex items-center justify-center text-muted-foreground hover:text-foreground",onClick:p,onMouseDown:e=>e.preventDefault()},{children:e(rn,{className:"h-3 w-3"})}))}))}))},qb=({blockId:t,totalRows:n,position:r,onMouseEnter:o,onMouseLeave:i,buttonRef:a})=>{const s=x(),l=d(null),u=a||l,p=c(()=>{const e=[n-1];$.insertTableRow(s,t,{path:e,insertMode:"after"})},[s,t,n]);return e(K,Object.assign({id:`table-add-row-button-${t}`},{children:e("div",Object.assign({ref:u,className:"fixed z-[9999] pointer-events-auto",style:{left:`${r.left}px`,top:`${r.top+4}px`,width:`${r.width}px`,height:"18px"},onMouseEnter:o,onMouseLeave:i},{children:e(ro,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md transition-all hover:shadow-md flex items-center justify-center gap-1.5 text-muted-foreground hover:text-foreground",onClick:p,onMouseDown:e=>e.preventDefault()},{children:e(rn,{className:"h-3 w-3"})}))}))}))},Zb=({blockId:r,colIndex:o,path:i,position:a,onMouseEnter:s,onMouseLeave:u,controlsRef:p})=>{const h=x(),f=d(null),g=p||f,m=l(()=>{var e;const t=N.getElement(h,{blockId:r,type:"table",path:[0]});return(null===(e=null==t?void 0:t.props)||void 0===e?void 0:e.headerColumn)||!1},[h,r]),b=c(()=>{$.insertTableColumn(h,r,{path:i,insertMode:"before"})},[h,r,i]),v=c(()=>{$.insertTableColumn(h,r,{path:i,insertMode:"after"})},[h,r,i]),w=c(()=>{$.deleteTableColumn(h,r,{path:i})},[h,r,i]),y=c(()=>{$.toggleHeaderColumn(h,r)},[h,r]);return e(K,Object.assign({id:`table-column-controls-${r}-${o}`},{children:e("div",Object.assign({ref:g,className:"fixed z-[9999] pointer-events-auto",style:{left:`${a.left}px`,top:`${a.top+4}px`,width:`${a.width}px`,height:"18px"},onMouseEnter:s,onMouseLeave:u},{children:n(Tb,{children:[e(Ib,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md p-0 transition-all hover:shadow-md",onMouseDown:e=>e.preventDefault()},{children:e($t,{className:"h-3 w-3 text-muted-foreground"})}))})),n(_b,Object.assign({align:"center",side:"top",className:"w-48"},{children:[0===o&&n(t,{children:[n(Ab,Object.assign({onClick:y},{children:[e(m?Lt:"span",{className:"mr-2 h-4 w-4"}),"Header column"]})),e(Lb,{})]}),n(Ab,Object.assign({onClick:b},{children:[e(It,{className:"mr-2 h-4 w-4"}),"Insert column left"]})),n(Ab,Object.assign({onClick:v},{children:[e(_t,{className:"mr-2 h-4 w-4"}),"Insert column right"]})),e(Lb,{}),n(Ab,Object.assign({onClick:w,className:"text-destructive focus:text-destructive"},{children:[e(cn,{className:"mr-2 h-4 w-4"}),"Delete column"]}))]}))]})}))}))},Jb=({blockId:r,rowIndex:o,path:i,position:a,onMouseEnter:s,onMouseLeave:u,controlsRef:p})=>{const h=x(),f=d(null),g=null!=p?p:f,m=i.slice(0,-1),b=l(()=>{var e;const t=N.getElement(h,{blockId:r,type:"table",path:[0]});return(null===(e=null==t?void 0:t.props)||void 0===e?void 0:e.headerRow)||!1},[h,r]),v=c(()=>{$.insertTableRow(h,r,{path:m,insertMode:"before"})},[h,r,m]),w=c(()=>{$.insertTableRow(h,r,{path:m,insertMode:"after"})},[h,r,m]),y=c(()=>{$.deleteTableRow(h,r,{path:m})},[h,r,m]),k=c(()=>{$.toggleHeaderRow(h,r)},[h,r]);return e(K,Object.assign({id:`table-row-controls-${r}-${o}`},{children:e("div",Object.assign({ref:g,className:"fixed z-[9998] pointer-events-auto",style:{left:`${a.left+20}px`,top:`${a.top}px`,width:"18px",height:`${a.height}px`},onMouseEnter:s,onMouseLeave:u},{children:n(Tb,{children:[e(Ib,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"sm",className:"h-full w-full bg-background/95 hover:bg-accent border border-border/50 shadow-sm rounded-md p-0 transition-all hover:shadow-md flex items-center justify-center",onMouseDown:e=>e.preventDefault()},{children:e(Vt,{className:"h-3 w-3 text-muted-foreground"})}))})),n(_b,Object.assign({align:"start",side:"left",className:"w-48"},{children:[0===o&&n(t,{children:[n(Ab,Object.assign({onClick:k},{children:[e(b?Lt:"span",{className:"mr-2 h-4 w-4"}),"Header row"]})),e(Lb,{})]}),n(Ab,Object.assign({onClick:v},{children:[e(At,{className:"mr-2 h-4 w-4"}),"Insert row above"]})),n(Ab,Object.assign({onClick:w},{children:[e(Tt,{className:"mr-2 h-4 w-4"}),"Insert row below"]})),e(Lb,{}),n(Ab,Object.assign({onClick:y,className:"text-destructive focus:text-destructive"},{children:[e(cn,{className:"mr-2 h-4 w-4"}),"Delete row"]}))]}))]})}))}))},Qb=({blockId:r})=>{const o=x(),i=l(()=>k.getBlockSlate(o,{id:r}),[r,o]),[a,s]=u(null),[h,f]=u(null),[g,m]=u(null),[b,v]=u(null),[w,y]=u(null),[N,C]=u({top:0,left:0}),[O,S]=u(!1),[E,j]=u(!1),[z,D]=u(!1),[M,T]=u(!1),[I,_]=u(!1),A=d(null),L=d(null),H=d(null),F=d(null),W=d(null);p(()=>{const e=document.querySelector(`[data-yoopta-block-id="${r}"][data-table-container]`);if(!e)return;const t=e.querySelector("table");if(!t)return;const n=()=>{const n=window.getComputedStyle(e),r=parseInt(n.paddingTop,10)||0,o=parseInt(n.paddingLeft,10)||0;C({top:r,left:o}),y(e.getBoundingClientRect()),v(t.getBoundingClientRect())};n();const o=new ResizeObserver(n);return o.observe(e),o.observe(t),window.addEventListener("scroll",n,!0),window.addEventListener("resize",n),()=>{o.disconnect(),window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n)}},[r]),p(()=>{const e=document.querySelector(`[data-yoopta-block-id="${r}"][data-table-container]`);if(!e||!i)return;const t=t=>{var n,r,o,a;A.current&&(clearTimeout(A.current),A.current=null),_(!0);const l=t,c=l.target.closest('[data-element-type="table-data-cell"]');if(!c){if(L.current){const e=L.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void S(!0)}if(H.current){const e=H.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void j(!0)}if(F.current){const e=F.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void D(!0)}if(W.current){const e=W.current.getBoundingClientRect();if(l.clientX>=e.left-10&&l.clientX<=e.right+10&&l.clientY>=e.top-10&&l.clientY<=e.bottom+10)return void T(!0)}return void(O||E||z||M||(s(null),f(null),m(null)))}const d=c.getAttribute("data-yoopta-element-id");if(!d)return void(O||E||z||M||(s(null),f(null),m(null)));const u=Array.from(R.nodes(i,{at:[0],match:e=>{if(!P.isElement(e))return!1;const t=e;return"table-data-cell"===t.type&&"id"in t&&t.id===d},mode:"all"}));if(0===u.length)return void(O||E||z||M||(s(null),f(null),m(null)));const[p,b]=u[0],v=b[b.length-2],w=b[b.length-1],y=Array.from(R.nodes(i,{at:[0],match:e=>{if(!P.isElement(e))return!1;return"table"===e.type},mode:"lowest"}));if(0===y.length)return;const[x]=y[0];if(!P.isElement(x))return;const k=x.children.length,N=x.children[0];if(!P.isElement(N))return;const C=N.children.length,I=c.getBoundingClientRect(),B=Array.from(e.querySelectorAll("tr")),U=B[0],V={left:I.left,width:I.width,top:I.top,height:I.height},$={left:I.left,width:I.width,top:I.top,height:I.height};if(!U)return void s({cell:p,path:b,rowIndex:v,colIndex:w,rect:I,totalRows:k,totalColumns:C,columnRect:V,rowRect:$});if(!Array.from(U.querySelectorAll('[data-element-type="table-data-cell"]'))[w])return void s({cell:p,path:b,rowIndex:v,colIndex:w,rect:I,totalRows:k,totalColumns:C,columnRect:V,rowRect:$});const X=[];B.forEach(e=>{const t=Array.from(e.querySelectorAll('[data-element-type="table-data-cell"]'));t[w]&&X.push(t[w].getBoundingClientRect())});const Y=X.length>0?Math.min(...X.map(e=>e.left)):I.left,K=X.length>0?Math.max(...X.map(e=>e.right)):I.right,G=K-Y,q=X.length>0?Math.min(...X.map(e=>e.top)):I.top,Z=B[v];if(!Z)return void s({cell:p,path:b,rowIndex:v,colIndex:w,rect:I,totalRows:k,totalColumns:C,columnRect:{left:Y,width:G,top:q,height:null!==(r=null===(n=X[0])||void 0===n?void 0:n.height)&&void 0!==r?r:I.height},rowRect:$});const J=Array.from(Z.querySelectorAll('[data-element-type="table-data-cell"]')),Q=J.length>0?J.map(e=>e.getBoundingClientRect()):[I],ee=Math.min(...Q.map(e=>e.top)),te=Math.max(...Q.map(e=>e.bottom)),ne=te-ee,re=Math.min(...Q.map(e=>e.left));h===w&&g===v||(f(w),m(v),s({cell:p,path:b,rowIndex:v,colIndex:w,rect:I,totalRows:k,totalColumns:C,columnRect:{left:Y,width:G,top:q,height:null!==(a=null===(o=X[0])||void 0===o?void 0:o.height)&&void 0!==a?a:I.height},rowRect:{left:re,width:Math.max(...Q.map(e=>e.right))-re,top:ee,height:ne}}))},n=()=>{_(!1),A.current=setTimeout(()=>{O||E||z||M||(s(null),f(null),m(null))},150)};return e.addEventListener("mousemove",t),e.addEventListener("mouseleave",n),()=>{A.current&&clearTimeout(A.current),e.removeEventListener("mousemove",t),e.removeEventListener("mouseleave",n)}},[r,i,I,O,E,z,M,h,g]);const B=c(()=>{S(!0),A.current&&(clearTimeout(A.current),A.current=null)},[]),U=c(()=>{S(!1),A.current=setTimeout(()=>{s(null),f(null),m(null)},150)},[]),V=c(()=>{j(!0),A.current&&(clearTimeout(A.current),A.current=null)},[]),$=c(()=>{j(!1),A.current=setTimeout(()=>{s(null),f(null),m(null)},150)},[]),X=c(()=>{D(!0),A.current&&(clearTimeout(A.current),A.current=null)},[]),Y=c(()=>{D(!1),A.current=setTimeout(()=>{s(null),f(null),m(null)},150)},[]),K=c(()=>{T(!0),A.current&&(clearTimeout(A.current),A.current=null)},[]),G=c(()=>{T(!1),A.current=setTimeout(()=>{s(null),f(null),m(null)},150)},[]);if(p(()=>{I||O||E||z||M||(s(null),f(null),m(null))},[I,O,E,z,M]),!b||!w)return null;const q=I||O||E||z||M,Z=!(!a||!q)&&a.rowIndex===a.totalRows-1,J=!(!a||!q)&&a.colIndex===a.totalColumns-1,Q=a?a.columnRect.top-32:0,ee=a?a.columnRect.left:0,te=a?a.rowRect.top:0,ne=a?Math.max(0,a.rowRect.left-32):0,re=w.left+N.left,oe=w.top+N.top+b.height,ie=w.left+N.left+b.width,ae=w.top+N.top;return n(t,{children:[a&&q&&e(Jb,{blockId:r,rowIndex:a.rowIndex,path:a.path,position:{left:ne,top:te,height:a.rowRect.height},onMouseEnter:B,onMouseLeave:U,controlsRef:L}),a&&q&&e(Zb,{blockId:r,colIndex:a.colIndex,path:a.path,position:{left:ee,top:Q,width:a.columnRect.width},onMouseEnter:V,onMouseLeave:$,controlsRef:H}),J&&a&&e(Gb,{blockId:r,totalColumns:a.totalColumns,position:{left:ie,top:ae,height:b.height},onMouseEnter:K,onMouseLeave:G,buttonRef:W}),Z&&a&&e(qb,{blockId:r,totalRows:a.totalRows,position:{left:re,top:oe,width:b.width},onMouseEnter:X,onMouseLeave:Y,buttonRef:F})]})},ev=[{label:"None",value:"transparent",color:"transparent"},{label:"Gray",value:"hsl(var(--muted))",color:"hsl(var(--muted))"},{label:"Red",value:"hsl(0 70% 95%)",color:"hsl(0 70% 95%)"},{label:"Orange",value:"hsl(30 70% 95%)",color:"hsl(30 70% 95%)"},{label:"Yellow",value:"hsl(60 70% 95%)",color:"hsl(60 70% 95%)"},{label:"Green",value:"hsl(120 70% 95%)",color:"hsl(120 70% 95%)"},{label:"Blue",value:"hsl(210 70% 95%)",color:"hsl(210 70% 95%)"},{label:"Purple",value:"hsl(270 70% 95%)",color:"hsl(270 70% 95%)"}],tv=[{label:"Default",value:"inherit",color:"currentColor"},{label:"Gray",value:"hsl(var(--muted-foreground))",color:"hsl(var(--muted-foreground))"},{label:"Red",value:"hsl(0 70% 50%)",color:"hsl(0 70% 50%)"},{label:"Orange",value:"hsl(30 70% 50%)",color:"hsl(30 70% 50%)"},{label:"Yellow",value:"hsl(60 70% 40%)",color:"hsl(60 70% 40%)"},{label:"Green",value:"hsl(120 70% 40%)",color:"hsl(120 70% 40%)"},{label:"Blue",value:"hsl(210 70% 50%)",color:"hsl(210 70% 50%)"},{label:"Purple",value:"hsl(270 70% 50%)",color:"hsl(270 70% 50%)"}],nv=({blockId:r})=>{const o=x(),i=l(()=>k.getBlockSlate(o,{id:r}),[r,o]),[a,s]=u(null),[c,d]=u(!1),[h,f]=u([]),g=i?X.get(i):[];p(()=>{f(g)},[g]);const m=Array.isArray(g)&&(null==g?void 0:g.length)>0?g:h;p(()=>{if(!i||!m||m.length<=1)return void s(null);const e=document.querySelector(`[data-yoopta-block-id="${r}"]`);if(!e)return void s(null);const t=e.getBoundingClientRect();let n=1/0,o=-1/0,a=1/0,l=-1/0;for(const[e]of m){const t=document.querySelector(`[data-yoopta-block-id="${r}"] [data-yoopta-element-id="${e.id}"]`);if(!t)continue;const i=t.getBoundingClientRect();if(!i)continue;const{top:s,bottom:c,left:d,right:u}=i;n=Math.min(n,s),o=Math.max(o,c),a=Math.min(a,d),l=Math.max(l,u)}s(n!==1/0?{top:n-t.top,left:a-t.left,width:l-a,height:o-n}:null)},[i,m,r]),p(()=>{if(!m||m.length<=1)return;const e=()=>{s(e=>e?Object.assign({},e):null)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[m]);const b=e=>{o&&m&&0!==m.length&&($.setCellHorizontalAlign(o,r,{cells:m,align:e}),d(!1))},v=e=>{o&&m&&0!==m.length&&($.setCellVerticalAlign(o,r,{cells:m,align:e}),d(!1))};return a?n(t,{children:[e("div",{className:"pointer-events-none absolute z-[9999]",style:{top:`${a.top}px`,left:`${a.left}px`,width:`${a.width}px`,height:`${a.height}px`,border:"2px solid hsl(var(--primary))",backgroundColor:"hsl(var(--primary) / 0.05)",borderRadius:"2px"}}),e("div",Object.assign({className:"absolute z-20 pointer-events-auto",style:{top:`${a.top+a.height/2}px`,left:`${a.left+a.width}px`,transform:"translate(-50%, -50%)"}},{children:n(Ol,Object.assign({open:c,onOpenChange:d},{children:[e(Sl,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"secondary",size:"icon",className:"h-4 w-4 rounded-full shadow-lg bg-primary hover:bg-primary/90",onMouseDown:e=>e.preventDefault()},{children:e(Vt,{className:"h-3 w-3 text-primary-foreground"})}))})),e(El,Object.assign({className:"w-64 p-2",align:"start",side:"right"},{children:n("div",Object.assign({className:"space-y-2"},{children:[n(ro,Object.assign({variant:"ghost",size:"sm",className:"w-full justify-start gap-2",onClick:()=>{!o||!m||m.length<=1||($.mergeCells(o,r,{cells:m}),d(!1))},disabled:!m||m.length<=1},{children:[e(Zt,{className:"h-4 w-4"}),"Merge cells"]})),e(bd,{}),n("div",Object.assign({className:"space-y-1"},{children:[e(Jp,Object.assign({className:"text-sm font-medium"},{children:"Color"})),n(Tb,{children:[e(Ib,Object.assign({asChild:!0},{children:n(ro,Object.assign({variant:"outline",size:"sm",className:"w-full justify-between"},{children:[n("span",Object.assign({className:"flex items-center gap-2"},{children:[e(en,{className:"h-4 w-4"}),"Select color"]})),e(Ht,{className:"h-4 w-4 opacity-50"})]}))})),n(_b,Object.assign({className:"w-56",align:"start"},{children:[n(Hb,{children:[n(Fb,{children:[e(en,{className:"mr-2 h-4 w-4"}),"Background color"]}),e(Wb,{children:ev.map(t=>e(Ab,Object.assign({onClick:()=>(e=>{o&&m&&0!==m.length&&($.setCellBackgroundColor(o,r,{cells:m,color:e}),d(!1))})(t.value)},{children:n("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",{className:"h-4 w-4 rounded border",style:{backgroundColor:t.color}}),t.label]}))}),t.value))})]}),n(Hb,{children:[n(Fb,{children:[e(dn,{className:"mr-2 h-4 w-4"}),"Text color"]}),e(Wb,{children:tv.map(t=>e(Ab,Object.assign({onClick:()=>(e=>{o&&m&&0!==m.length&&($.setCellTextColor(o,r,{cells:m,color:e}),d(!1))})(t.value)},{children:n("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"h-4 w-4 rounded border flex items-center justify-center text-xs font-bold",style:{color:t.color}},{children:"A"})),t.label]}))}),t.value))})]})]}))]})]})),n("div",Object.assign({className:"space-y-1"},{children:[e(Jp,Object.assign({className:"text-sm font-medium"},{children:"Alignment"})),n(Tb,{children:[e(Ib,Object.assign({asChild:!0},{children:n(ro,Object.assign({variant:"outline",size:"sm",className:"w-full justify-between"},{children:[n("span",Object.assign({className:"flex items-center gap-2"},{children:[e(Jt,{className:"h-4 w-4"}),"Select alignment"]})),e(Ht,{className:"h-4 w-4 opacity-50"})]}))})),n(_b,Object.assign({className:"w-56",align:"start"},{children:[n(Hb,{children:[n(Fb,{children:[e(Jt,{className:"mr-2 h-4 w-4"}),"Horizontal"]}),n(Wb,{children:[e(Ab,Object.assign({onClick:()=>b("left")},{children:"Left"})),e(Ab,Object.assign({onClick:()=>b("center")},{children:"Center"})),e(Ab,Object.assign({onClick:()=>b("right")},{children:"Right"})),e(Ab,Object.assign({onClick:()=>b("justify")},{children:"Justify"}))]})]}),n(Hb,{children:[n(Fb,{children:[e(Qt,{className:"mr-2 h-4 w-4"}),"Vertical"]}),n(Wb,{children:[e(Ab,Object.assign({onClick:()=>v("top")},{children:"Top"})),e(Ab,Object.assign({onClick:()=>v("middle")},{children:"Middle"})),e(Ab,Object.assign({onClick:()=>v("bottom")},{children:"Bottom"}))]})]})]}))]})]})),e(bd,{}),n(ro,Object.assign({variant:"ghost",size:"sm",className:"w-full justify-start gap-2 text-destructive hover:text-destructive",onClick:()=>{o&&m&&0!==m.length&&($.clearContents(o,r,{cells:m}),d(!1))}},{children:[e(Xt,{className:"h-4 w-4"}),"Clear contents"]}))]}))}))]}))}))]}):null};re("[data-element-type=table-data-cell] [data-slate-node=element]{margin:0}[data-slate-node=table]{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-slate-node=table-data-cell]{cursor:cell}[data-slate-node=table-data-cell]:active{cursor:crosshair}[data-is-selecting=true] ::-moz-selection{background:none}[data-is-selecting=true] ::selection{background:none}.column-resize-handle{transition:background-color .15s ease}.column-resize-handle:hover{background-color:hsl(var(--primary)/.3)!important}body.resizing-column{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}body.resizing-column,body.resizing-column *{cursor:col-resize!important}");const rv={table:{render:t=>{var r,o;const{attributes:i,children:a,element:s}=t,c=s,d=x(),u=l(()=>k.getBlockSlate(d,{id:t.blockId}),[d,t.blockId]),p=u?Y.get(u):null;return n("div",Object.assign({className:"p-4","data-yoopta-block-id":t.blockId,"data-table-container":!0},{children:[n(Ub,Object.assign({},i,{"data-is-selecting":!!p},{children:[e("colgroup",{children:null===(o=null===(r=c.props)||void 0===r?void 0:r.columnWidths)||void 0===o?void 0:o.map((t,n)=>e("col",{style:{width:`${t}px`}},n))}),e(Vb,{children:a})]})),e(nv,{blockId:t.blockId}),e(Qb,{blockId:t.blockId}),e(Kb,{blockId:t.blockId})]}))}},"table-row":{render:t=>{const{attributes:n,children:r}=t;return e($b,Object.assign({},n,{children:r}))}},"table-data-cell":{render:t=>{var n,r,o,i,a,s,c,d,u,p,h,f;const{attributes:g,children:m,element:b}=t,v=b,w=x(),y=l(()=>k.getBlockSlate(w,{id:t.blockId}),[w,t.blockId]),N=(null===(n=v.props)||void 0===n?void 0:n.asHeader)?Xb:Yb;return e(N,Object.assign({},g,{onMouseDown:e=>{e.stopPropagation(),y&&(X.delete(y),Y.delete(y))},colSpan:null!==(o=null===(r=v.props)||void 0===r?void 0:r.colSpan)&&void 0!==o?o:1,rowSpan:null!==(a=null===(i=v.props)||void 0===i?void 0:i.rowSpan)&&void 0!==a?a:1,align:null!==(c=null===(s=v.props)||void 0===s?void 0:s.align)&&void 0!==c?c:"left",valign:null!==(u=null===(d=v.props)||void 0===d?void 0:d.verticalAlign)&&void 0!==u?u:"middle","data-yoopta-element-id":v.id,className:dr("relative group transition-colors"),style:{backgroundColor:null===(p=v.props)||void 0===p?void 0:p.backgroundColor,color:null!==(f=null===(h=v.props)||void 0===h?void 0:h.color)&&void 0!==f?f:"inherit"}},{children:m}))}}},ov={"tabs-container":{render:t=>{var n;const{attributes:r,children:o,blockId:i,element:a}=t,s=x();return e(fc,Object.assign({},r,{value:null===(n=a.props)||void 0===n?void 0:n.activeTabId,onValueChange:e=>{const t=k.getBlockSlate(s,{id:i});t&&D.setNodes(t,{props:Object.assign(Object.assign({},a.props),{activeTabId:e})},{at:[0],match:e=>P.isElement(e)&&"tabs-container"===e.type})},className:"w-full"},{children:o}))}},"tabs-list":{render:t=>{const{attributes:r,children:o,blockId:i}=t,a=x();return n(od,Object.assign({className:"w-full"},{children:[n(gc,Object.assign({},r,{className:"w-full relative justify-start"},{children:[o,e("button",Object.assign({type:"button",contentEditable:!1,onClick:e=>{e.preventDefault(),e.stopPropagation(),G.addTabItem(a,i)},className:"ml-1 flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1.5",title:"Add tab"},{children:e(rn,{className:"h-4 w-4 shrink-0 text-muted-foreground"})}))]})),e(rd,{orientation:"horizontal"})]}))}},"tabs-item-heading":{render:t=>{const{attributes:r,children:o,element:i,blockId:a}=t,s=x();return n(mc,Object.assign({},r,{value:i.id,className:"relative group/tab flex items-center gap-2 pr-8 whitespace-nowrap"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:o})),e("span",Object.assign({contentEditable:!1,onClick:()=>{G.deleteTabItem(s,a,{tabId:i.id})},className:"absolute right-1 flex items-center justify-center rounded-sm opacity-0 group-hover/tab:opacity-100 transition-opacity hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Close tab"},{children:e(hn,{className:"h-3 w-3 shrink-0 text-muted-foreground"})}))]}))}},"tabs-item-content":{render:t=>{var n;const{attributes:r,children:o,element:i}=t;return e(bc,Object.assign({},r,{value:null===(n=i.props)||void 0===n?void 0:n.referenceId,className:"mt-2"},{children:o}))}}},iv=({preview:t})=>e("div",Object.assign({className:"absolute inset-0 overflow-hidden flex items-center justify-center bg-black/5"},{children:e("video",{src:t.url,className:"max-w-full max-h-full object-contain",style:{maxWidth:t.width||"100%",maxHeight:t.height||"100%"},controls:!1,muted:!0,draggable:!1})})),av=({progress:t})=>e("div",Object.assign({className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-4 bg-black/70 backdrop-blur-sm p-6"},{children:e("div",Object.assign({className:"w-full max-w-md space-y-4"},{children:n("div",Object.assign({className:"space-y-2"},{children:[n("div",Object.assign({className:"flex items-center justify-between text-sm"},{children:[e("span",Object.assign({className:"font-medium text-white"},{children:"Uploading video..."})),n("span",Object.assign({className:"text-white/80"},{children:[t.percentage,"%"]}))]})),e("div",Object.assign({className:"h-2 w-full overflow-hidden rounded-full bg-white/20"},{children:e("div",{className:"h-full bg-primary transition-all duration-300 ease-out",style:{width:`${t.percentage}%`}})})),n("div",Object.assign({className:"flex items-center justify-between text-xs text-white/60"},{children:[n("span",{children:[(t.loaded/1024/1024).toFixed(2)," MB /"," ",(t.total/1024/1024).toFixed(2)," MB"]}),e(qt,{className:"h-3.5 w-3.5 animate-spin"})]}))]}))}))})),sv=({onUpload:t,hasPreview:r})=>{const o=d(null);return n("div",r?Object.assign({className:"flex flex-col items-center justify-center gap-4 py-8"},{children:[n("div",Object.assign({className:"text-center space-y-2"},{children:[e("p",Object.assign({className:"text-sm font-medium text-white"},{children:"Video preview"})),e("p",Object.assign({className:"text-xs text-white/80"},{children:"Uploading your video..."}))]})),e("input",{ref:o,type:"file",accept:"video/*",onChange:t,className:"hidden"})]}):Object.assign({className:"flex flex-col items-center gap-3 py-6"},{children:[e("div",Object.assign({className:"rounded-lg bg-muted p-3"},{children:e(pn,{className:"h-6 w-6 text-muted-foreground"})})),n("div",Object.assign({className:"text-center"},{children:[e("p",Object.assign({className:"text-sm font-medium"},{children:"Upload a video"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Click or drag and drop"}))]})),e(ro,Object.assign({onClick:()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.click()}},{children:"Choose file"})),e("input",{ref:o,type:"file",accept:"video/*",onChange:t,className:"hidden"})]}))},lv=({onInsertUrl:t})=>{const[r,o]=u(""),[i,a]=u(!1),[s,l]=u(null),c=()=>{r.trim()&&(t(r.trim()),o(""),a(!1),l(null))};return n("div",Object.assign({className:"mt-4 space-y-3"},{children:[n("div",Object.assign({className:"space-y-2"},{children:[e(yo,{placeholder:"Paste video URL (YouTube, Vimeo, Dailymotion, Loom, Wistia)...",value:r,onChange:e=>(e=>{if(o(e),e.trim()){const t=q(e.trim());a(t.isValid),l(t.provider?t.provider.charAt(0).toUpperCase()+t.provider.slice(1):null)}else a(!1),l(null)})(e.target.value),onKeyDown:e=>{"Enter"===e.key&&r.trim()&&i&&c()}}),r.trim()&&e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:i?n("span",Object.assign({className:"flex items-center gap-1.5 text-green-600 dark:text-green-400"},{children:[e(nn,{className:"h-3 w-3"}),s," video detected"]})):e("span",Object.assign({className:"text-destructive"},{children:"Invalid video URL. Supported: YouTube, Vimeo, Dailymotion, Loom, Wistia"}))}))]})),e(ro,Object.assign({className:"w-full",onClick:c,disabled:!r.trim()||!i},{children:i?`Embed ${s} video`:"Embed video"}))]}))},cv=({onUpload:t,onInsertUrl:r,hasPreview:o})=>e("div",Object.assign({className:dr("relative p-4",o&&"min-h-[300px] flex flex-col")},{children:n(fc,Object.assign({defaultValue:"upload",className:"w-full"},{children:[n(gc,Object.assign({className:dr("grid w-full grid-cols-2",o&&"bg-background/80 backdrop-blur-sm")},{children:[n(mc,Object.assign({value:"upload",className:"gap-1.5"},{children:[e(un,{className:"h-3.5 w-3.5"}),"Upload"]})),n(mc,Object.assign({value:"link",className:"gap-1.5"},{children:[e(Gt,{className:"h-3.5 w-3.5"}),"Link"]}))]})),e(bc,Object.assign({value:"upload",className:"mt-4"},{children:e(sv,{onUpload:t,hasPreview:o})})),e(bc,Object.assign({value:"link"},{children:e(lv,{onInsertUrl:r})}))]}))})),dv=({onUpload:t,onInsertUrl:r,className:o,attributes:i,children:a,preview:s,progress:l,loading:c})=>{const d=null!==s&&!!s.url,u=c&&l;return n("div",Object.assign({className:dr("mt-2 relative rounded-lg border bg-background overflow-hidden",d&&"min-h-[300px]",o)},i,{contentEditable:!1},{children:[d&&e(iv,{preview:s}),!d&&e(cv,{onUpload:t,onInsertUrl:r,hasPreview:d}),u&&l&&e(av,{progress:l}),a]}))};var uv="Switch",[pv,hv]=se(uv),[fv,gv]=pv(uv),mv=r.forwardRef((t,o)=>{const{__scopeSwitch:i,name:a,checked:s,defaultChecked:l,required:c,disabled:d,value:u="on",onCheckedChange:p,form:h,...f}=t,[g,m]=r.useState(null),b=ue(o,e=>m(e)),v=r.useRef(!1),w=!g||(h||!!g.closest("form")),[y,x]=ye({prop:s,defaultProp:l??!1,onChange:p,caller:uv});return n(fv,{scope:i,checked:y,disabled:d,children:[e(xe.button,{type:"button",role:"switch","aria-checked":y,"aria-required":c,"data-state":yv(y),"data-disabled":d?"":void 0,disabled:d,value:u,...f,ref:b,onClick:be(t.onClick,e=>{x(e=>!e),w&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})}),w&&e(wv,{control:g,bubbles:!v.current,name:a,value:u,checked:y,required:c,disabled:d,form:h,style:{transform:"translateX(-100%)"}})]})});mv.displayName=uv;var bv="SwitchThumb",vv=r.forwardRef((t,n)=>{const{__scopeSwitch:r,...o}=t,i=gv(bv,r);return e(xe.span,{"data-state":yv(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:n})});vv.displayName=bv;var wv=r.forwardRef(({__scopeSwitch:t,control:n,checked:o,bubbles:i=!0,...a},s)=>{const l=r.useRef(null),c=ue(l,s),d=Qp(o),u=La(n);return r.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(d!==o&&n){const t=new Event("click",{bubbles:i});n.call(e,o),e.dispatchEvent(t)}},[d,o,i]),e("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...a,tabIndex:-1,ref:c,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function yv(e){return e?"checked":"unchecked"}wv.displayName="SwitchBubbleInput";var xv=mv,kv=vv;const Nv=r.forwardRef((t,n)=>{var{className:r}=t,o=ie(t,["className"]);return e(xv,Object.assign({className:dr("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",r)},o,{ref:n},{children:e(kv,{className:dr("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}))});Nv.displayName=xv.displayName;const Cv={contain:{label:"Contain",description:"Fit within bounds"},cover:{label:"Cover",description:"Fill and crop"},fill:{label:"Fill",description:"Stretch to fit"}},Ov=({fit:t,settings:r,onUpdate:o})=>{var i,a,s,l,c,d,p,h,f,g,m,b;const[v,w]=u(!1),y=e=>{o({settings:Object.assign(Object.assign({},r),e)})};return n(Ol,Object.assign({open:v,onOpenChange:w},{children:[e(ou,{children:n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(Sl,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:v?"secondary":"ghost",size:"icon",className:"h-7 w-7"},{children:e(sn,{className:"h-4 w-4"})}))}))})),e(su,{children:"Settings"})]})}),e(El,Object.assign({className:"w-80 p-3",align:"start",contentEditable:!1,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()},{children:n("div",Object.assign({className:"space-y-3"},{children:[n("div",{children:[e("h4",Object.assign({className:"font-semibold"},{children:"Video settings"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Customize video playback and display"}))]}),e(bd,{}),n("div",Object.assign({className:"space-y-1"},{children:[e(Jp,Object.assign({htmlFor:"object-fit",className:"text-sm font-medium"},{children:"How video fits"})),n(mf,Object.assign({value:t||"contain",onValueChange:e=>o({fit:e})},{children:[e(wf,Object.assign({id:"object-fit",className:"h-9 w-full"},{children:e(vf,Object.assign({placeholder:"Select how video fits"},{children:n("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(i=Cv[t||"contain"])||void 0===i?void 0:i.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(a=Cv[t||"contain"])||void 0===a?void 0:a.description}))]}))}))})),e(kf,{children:n(bf,{children:[e(Nf,Object.assign({value:"contain",className:"cursor-pointer"},{children:n("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-4 w-3 rounded bg-primary"})})),n("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(s=Cv.contain)||void 0===s?void 0:s.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(l=Cv.contain)||void 0===l?void 0:l.description}))]}))]}))})),e(Nf,Object.assign({value:"cover",className:"cursor-pointer"},{children:n("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-8 w-6 rounded bg-primary"})})),n("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(c=Cv.cover)||void 0===c?void 0:c.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(d=Cv.cover)||void 0===d?void 0:d.description}))]}))]}))})),e(Nf,Object.assign({value:"fill",className:"cursor-pointer"},{children:n("div",Object.assign({className:"flex items-center gap-2"},{children:[e("div",Object.assign({className:"flex h-8 w-8 shrink-0 items-center justify-center rounded border"},{children:e("div",{className:"h-8 w-8 rounded bg-primary"})})),n("div",Object.assign({className:"flex-1"},{children:[e("div",Object.assign({className:"font-medium"},{children:null===(p=Cv.fill)||void 0===p?void 0:p.label})),e("div",Object.assign({className:"text-xs text-muted-foreground"},{children:null===(h=Cv.fill)||void 0===h?void 0:h.description}))]}))]}))}))]})})]}))]})),e(bd,{}),n("div",Object.assign({className:"space-y-3"},{children:[n("div",Object.assign({className:"flex items-center justify-between"},{children:[n("div",Object.assign({className:"space-y-0.5"},{children:[e(Jp,Object.assign({htmlFor:"controls",className:"text-sm font-medium"},{children:"Show controls"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Display video player controls"}))]})),e(Nv,{id:"controls",checked:null!==(f=r.controls)&&void 0!==f&&f,onCheckedChange:e=>y({controls:e})})]})),n("div",Object.assign({className:"flex items-center justify-between"},{children:[n("div",Object.assign({className:"space-y-0.5"},{children:[e(Jp,Object.assign({htmlFor:"loop",className:"text-sm font-medium"},{children:"Loop video"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Automatically replay when finished"}))]})),e(Nv,{id:"loop",checked:null!==(g=r.loop)&&void 0!==g&&g,onCheckedChange:e=>y({loop:e})})]})),n("div",Object.assign({className:"flex items-center justify-between"},{children:[n("div",Object.assign({className:"space-y-0.5"},{children:[e(Jp,Object.assign({htmlFor:"muted",className:"text-sm font-medium"},{children:"Muted"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Start video without sound"}))]})),e(Nv,{id:"muted",checked:null!==(m=r.muted)&&void 0!==m&&m,onCheckedChange:e=>y({muted:e})})]})),n("div",Object.assign({className:"flex items-center justify-between"},{children:[n("div",Object.assign({className:"space-y-0.5"},{children:[e(Jp,Object.assign({htmlFor:"autoplay",className:"text-sm font-medium"},{children:"Autoplay"})),e("p",Object.assign({className:"text-xs text-muted-foreground"},{children:"Start playing automatically (may require muted)"}))]})),e(Nv,{id:"autoplay",checked:null!==(b=r.autoPlay)&&void 0!==b&&b,onCheckedChange:e=>y({autoPlay:e})})]}))]}))]}))}))]}))},Sv=({referenceRef:r,elementProps:o,onUpdate:i,onReplace:a,onDelete:s,onDownload:l,onCopy:c})=>{var d,h;const[f,g]=u(!1),m=o.provider&&o.provider.type,b="alignment"in o,{refs:v,floatingStyles:w}=Wp({placement:"top",strategy:"fixed",middleware:[ja(8),Ta(),Ra({padding:10})],whileElementsMounted:ua});p(()=>{requestAnimationFrame(()=>{g(!0)})},[]),p(()=>{const e=r.current;e&&v.setReference(e)},[r,v]);return e("div",Object.assign({ref:v.setFloating,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),className:dr("pointer-events-auto","flex items-center gap-1 rounded-lg border bg-background/95 backdrop-blur-sm p-1 shadow-lg","transition-all duration-200 ease-out",f?"opacity-100 translate-y-0":"opacity-0 translate-y-2"),style:w},{children:n(ou,Object.assign({delayDuration:0},{children:[b&&n("div",Object.assign({className:"flex items-center gap-0.5 border-r pr-1"},{children:[n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"left"===o.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>i({alignment:"left"})},{children:e(Pt,{className:"h-4 w-4"})}))})),e(su,{children:"Align left"})]}),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"center"===o.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>i({alignment:"center"})},{children:e(Dt,{className:"h-4 w-4"})}))})),e(su,{children:"Align center"})]}),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"right"===o.alignment?"secondary":"ghost",size:"icon",className:"h-7 w-7",onClick:()=>i({alignment:"right"})},{children:e(Mt,{className:"h-4 w-4"})}))})),e(su,{children:"Align right"})]})]})),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a},{children:e(on,{className:"h-4 w-4"})}))})),e(su,{children:"Replace"})]}),!m&&o.src&&n(t,{children:[n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{if(l)l();else if(o.src&&!m){const e=document.createElement("a");e.href=o.src,e.download=`video-${Date.now()}.mp4`,e.click()}}},{children:e(Ut,{className:"h-4 w-4"})}))})),e(su,{children:"Download"})]}),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{c?c():o.src&&vo(o.src)}},{children:e(Bt,{className:"h-4 w-4"})}))})),e(su,{children:"Copy URL"})]})]}),m&&(null===(d=o.provider)||void 0===d?void 0:d.url)&&n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{var e;(null===(e=o.provider)||void 0===e?void 0:e.url)&&window.open(o.provider.url,"_blank")}},{children:e(Yt,{className:"h-4 w-4"})}))})),e(su,{children:"Open in new tab"})]}),!m&&n(t,{children:[e(bd,{orientation:"vertical",className:"h-4"}),e(Ov,{fit:null!==(h=o.fit)&&void 0!==h?h:"contain",settings:o.settings||{controls:!1,loop:!1,muted:!1,autoPlay:!1},onUpdate:i})]}),n(iu,{children:[e(au,Object.assign({asChild:!0},{children:e(ro,Object.assign({variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:s},{children:e(cn,{className:"h-4 w-4"})}))})),e(su,{children:"Delete"})]})]}))}))},Ev=({blockId:t,attributes:r,children:o,elementProps:i,onUpdate:a,onDelete:s,onReplace:l,pluginOptions:c})=>{var h,f,g,m;const[b,v]=u(i.sizes||{width:650,height:400}),{isElementSelected:w}=O(),y=S({blockId:t}),k=w&&y,N=d(null),C=x(),[E,j]=u(()=>{var e;const t=(null===(e=C.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||650,n=null==c?void 0:c.maxSizes;return{maxWidth:(null==n?void 0:n.maxWidth)?"number"==typeof n.maxWidth?n.maxWidth:parseInt(String(n.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==n?void 0:n.maxHeight)?"number"==typeof n.maxHeight?n.maxHeight:parseInt(String(n.maxHeight).replace(/[^\d]/g,""),10):550}});p(()=>{const e=()=>{var e;const t=(null===(e=C.refElement)||void 0===e?void 0:e.getBoundingClientRect().width)||650,n=null==c?void 0:c.maxSizes;j({maxWidth:(null==n?void 0:n.maxWidth)?"number"==typeof n.maxWidth?n.maxWidth:parseInt(String(n.maxWidth).replace(/[^\d]/g,""),10):t,maxHeight:(null==n?void 0:n.maxHeight)?"number"==typeof n.maxHeight?n.maxHeight:parseInt(String(n.maxHeight).replace(/[^\d]/g,""),10):550})};e();const t=new ResizeObserver(e);return C.refElement&&t.observe(C.refElement),window.addEventListener("resize",e),()=>{t.disconnect(),window.removeEventListener("resize",e)}},[C,c]);const R=(e,t)=>{const n=e=>"number"==typeof e?e:parseInt(String(e).replace(/[^\d]/g,""),10),r=n(e.width),o=n(e.height),i=n(t.width),a=n(t.height);if(r<=i&&o<=a)return{width:r,height:o};const s=r/i,l=o/a,c=Math.max(s,l),d=Math.round(r/c),u=Math.round(o/c);return{width:Math.min(d,i),height:Math.min(u,a)}},z=i.provider&&i.provider.type,D=i.src||"",P=z&&(null===(h=i.provider)||void 0===h?void 0:h.id)?Z(i.provider.type,i.provider.id):null,M=i.settings||{controls:!0,loop:!1,muted:!1,autoPlay:!1},T={left:"justify-start",center:"justify-center",right:"justify-end"}[null!==(f=i.alignment)&&void 0!==f?f:"center"];return n("div",Object.assign({},r,{className:dr("group/video mt-2 relative transition-all w-full flex",T)},{children:[n("div",Object.assign({className:"relative",contentEditable:!1},{children:[e(zp,Object.assign({ref:e=>{(null==e?void 0:e.resizableElement)&&e.resizableElement instanceof HTMLElement&&(N.current=e.resizableElement)},style:{position:"relative",outline:k?".125rem solid rgba(0, 0, 0, 0)":"none",outlineColor:k?"hsl(var(--primary))":"none"},size:{width:"number"==typeof b.width?b.width:parseInt(String(b.width),10),height:"number"==typeof b.height?b.height:parseInt(String(b.height),10)},onResize:(e,t,n)=>{const r=parseInt(n.style.width,10),o=parseInt(n.style.height,10),i=R({width:r,height:o},{width:E.maxWidth,height:E.maxHeight});v(i)},onResizeStop:(e,t,n)=>{const r=parseInt(n.style.width,10),o=parseInt(n.style.height,10),i=R({width:r,height:o},{width:E.maxWidth,height:E.maxHeight});a({sizes:i})},lockAspectRatio:!0,minWidth:200,minHeight:150,maxWidth:E.maxWidth,maxHeight:E.maxHeight,enableResizing:!!k&&{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!0,right:!0,top:!1,topLeft:!1,topRight:!1},disableDragging:!0,resizeHandleStyles:{left:{width:"auto",height:"40px",left:"-5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"},right:{width:"auto",height:"40px",right:"-5px",top:"50%",transform:"translateY(-50%)",cursor:"ew-resize"}},resizeHandleComponent:{left:e("div",{className:"h-10 w-2 rounded-full border border-primary bg-primary shadow-sm"}),right:e("div",{className:"h-10 w-2 rounded-full border border-primary bg-primary shadow-sm"})},className:dr("rounded-sm overflow-hidden")},{children:z&&P?e("iframe",{title:i.provider.type,src:P,width:"100%",height:"100%",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"w-full h-full",style:{aspectRatio:`${b.width} / ${b.height}`}}):e("video",{title:"Video",src:D,controls:M.controls,loop:M.loop,muted:M.muted,autoPlay:M.autoPlay,poster:null!==(g=i.poster)&&void 0!==g?g:void 0,className:"w-full h-full transition-all duration-200",style:{objectFit:null!==(m=i.fit)&&void 0!==m?m:"contain"},draggable:!1})})),k&&e(Sv,{referenceRef:N,elementProps:i,onUpdate:a,onReplace:l,onDelete:s,onDownload:()=>ae(void 0,void 0,void 0,function*(){if(i.src&&!z)try{const e=yield fetch(i.src),t=yield e.blob(),n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=`video-${Date.now()}.mp4`,r.click(),URL.revokeObjectURL(n)}catch(e){}}),onCopy:()=>ae(void 0,void 0,void 0,function*(){var e;if(i.src)try{if(z&&(null===(e=i.provider)||void 0===e?void 0:e.url)){const{default:e}=yield Promise.resolve().then(function(){return wo});e(i.provider.url)}else{const e=yield fetch(i.src),t=yield e.blob();if(navigator.clipboard&&ClipboardItem)yield navigator.clipboard.write([new ClipboardItem({[t.type]:t})]);else{const{default:e}=yield Promise.resolve().then(function(){return wo});e(i.src)}}}catch(e){const{default:t}=yield Promise.resolve().then(function(){return wo});t(i.src||"")}})})]})),o]}))},jv={video:{render:({element:t,attributes:n,children:r,blockId:o})=>{const i=x(),a=E("Video"),{upload:s,progress:l,loading:d}=J(a.upload),{deleteVideo:u}=Q(a.delete),{preview:p,generatePreview:h,clearPreview:f}=ee(),g=c(e=>{N.updateElement(i,{blockId:o,type:"video",props:Object.assign(Object.assign({},t.props),e)})},[i,o,t.props]),m=c(()=>ae(void 0,void 0,void 0,function*(){yield u(t);const e=k.getBlockSlate(i,{id:o});if(!e)return;const n=N.getElementPath(i,{blockId:o,element:t});if(!n)return;const r=n?R.parent(e,n):void 0;r&&P.isElement(r[0])&&!R.isEditor(r[0])?N.deleteElement(i,{blockId:o,type:"video",path:n}):k.deleteBlock(i,{blockId:o,focus:!0})}),[i,o,t,u]),b=c(()=>{N.updateElement(i,{blockId:o,type:"video",props:Object.assign(Object.assign({},t.props),{src:null,provider:null})})},[i,o,t.props]),v=c(e=>ae(void 0,void 0,void 0,function*(){var n;const r=null===(n=e.target.files)||void 0===n?void 0:n[0];if(!r)return;h(r);const o=yield s(r);g({id:o.id||o.fileId,src:o.url,sizes:o.width&&o.height?{width:o.width,height:o.height}:t.props.sizes||{width:650,height:400},provider:o.provider||null,poster:o.poster||null}),f()}),[s,g,h,f,t.props.sizes]),w=c(e=>ae(void 0,void 0,void 0,function*(){const n=q(e);if(n.isValid&&n.provider){const r=te(e);g({src:n.embedUrl,provider:r,sizes:t.props.sizes||{width:650,height:400}})}else e.trim()&&g({src:e.trim(),provider:null,sizes:t.props.sizes||{width:650,height:400}})}),[g,t.props.sizes]);return t.props.src||t.props.provider?e(Ev,Object.assign({blockId:o,elementId:t.id,onUpdate:g,onDelete:m,attributes:n,onReplace:b,elementProps:t.props,pluginOptions:a},{children:r})):e(dv,Object.assign({onUpload:v,preview:p,progress:l,loading:d,onInsertUrl:w,attributes:n},{children:r}))}}};function Rv(e,t){const n={Accordion:fn,Paragraph:Lg,Blockquote:gn,Callout:pr,Table:rv,Link:Ig,HeadingOne:wd.HeadingOne,HeadingTwo:wd.HeadingTwo,HeadingThree:wd.HeadingThree,BulletedList:Ag.BulletedList,NumberedList:Ag.NumberedList,TodoList:Ag.TodoList,Image:ag,Video:jv,Code:Dl,Tabs:ov,CodeGroup:id,Steps:Bb,Carousel:fo,Divider:vd};return e.map(e=>{var r;const o=e.getPlugin.type,i=n[o];if(!i)return e;const a=null==t?void 0:t[o],s=null!==(r=null==a?void 0:a.elements)&&void 0!==r?r:i;return e.extend(Object.assign({elements:s},a&&{injectElementsFromPlugins:a.injectElementsFromPlugins,events:a.events,options:a.options}))})}export{fn as AccordionUI,gn as BlockquoteUI,pr as CalloutUI,Dl as CodeUI,vd as DividerUI,wd as HeadingsUI,ag as ImageUI,Ig as LinkUI,Ag as ListsUI,Lg as ParagraphUI,Bb as StepsUI,rv as TableUI,ov as TabsUI,jv as VideoUI,Rv as default};
|