From 46c004f2fdcb7f888a93146dcac93bd67511b88e Mon Sep 17 00:00:00 2001 From: Tojteusz Date: Thu, 12 Oct 2023 02:00:36 +0200 Subject: [PATCH] Updates --- assets/index-532beebf.css | 1 + assets/index-83c2bf93.js | 167 ++++++++++++++++++++++++++++++++++++++ index.html | 14 ++++ 3 files changed, 182 insertions(+) create mode 100644 assets/index-532beebf.css create mode 100644 assets/index-83c2bf93.js create mode 100644 index.html diff --git a/assets/index-532beebf.css b/assets/index-532beebf.css new file mode 100644 index 0000000..23f9963 --- /dev/null +++ b/assets/index-532beebf.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[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,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 90%;--foreground: 0 0% 3.9%;--card: 0 0% 95%;--card-foreground: 224 71.4% 4.1%;--popover: 0 0% 100%;--popover-foreground: 224 71.4% 4.1%;--primary: 262.1 83.3% 57.8%;--primary-foreground: 210 20% 98%;--secondary: 220 14.3% 90.9%;--secondary-foreground: 220.9 39.3% 11%;--muted: 220 14.3% 95.9%;--muted-foreground: 220 8.9% 46.1%;--accent: 220 14.3% 95.9%;--accent-foreground: 220.9 39.3% 11%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 20% 98%;--border: 220 13% 91%;--input: 220 13% 91%;--ring: 262.1 83.3% 57.8%;--radius: 1rem}.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: 262.1 83.3% 57.8%;--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: 262.1 83.3% 57.8%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}*,:before,:after{--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: rgb(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: }::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: rgb(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: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-0{z-index:0}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[100\]{z-index:100}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-2{margin-bottom:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-2{margin-right:.5rem}.mt-2{margin-top:.5rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.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-8{height:2rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[24px\]{height:24px}.h-\[350px\]{height:350px}.h-\[50px\]{height:50px}.h-\[70vh\]{height:70vh}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-calc-100-186{height:calc(100vh - 186px)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\[300px\]{max-height:300px}.max-h-screen{max-height:100vh}.min-h-\[80px\]{min-height:80px}.w-10{width:2.5rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-\[1px\]{width:1px}.w-\[290px\]{width:290px}.w-\[350px\]{width:350px}.w-\[370px\]{width:370px}.w-\[44px\]{width:44px}.w-full{width:100%}.w-screen{width:100vw}.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}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.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-none{resize:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[1fr_1\.8fr\]{grid-template-columns:1fr 1.8fr}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-stretch{justify-content:stretch}.gap-1{gap:.25rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-break-spaces{white-space:break-spaces}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.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-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-destructive{border-color:hsl(var(--destructive))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-muted{background-color:hsl(var(--muted))}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.bg-neutral-300{--tw-bg-opacity: 1;background-color:rgb(212 212 212 / var(--tw-bg-opacity))}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.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-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-4{padding-top:1rem}.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-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.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-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.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-foreground\/50{color:hsl(var(--foreground) / .5)}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity))}.text-lime-500{--tw-text-opacity: 1;color:rgb(132 204 22 / var(--tw-text-opacity))}.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-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sky-500{--tw-text-opacity: 1;color:rgb(14 165 233 / var(--tw-text-opacity))}.text-teal-500{--tw-text-opacity: 1;color:rgb(20 184 166 / var(--tw-text-opacity))}.text-transparent{color:transparent}.text-opacity-40{--tw-text-opacity: .4}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.caret-purple-700{caret-color:#7e22ce}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(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)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.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(0px + 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-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);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.file\:border-0::file-selector-button{border-width:0px}.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}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.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\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.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-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.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:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(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: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(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: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(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],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@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-\[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\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 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-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:w-full{width:100%}.md\:max-w-\[420px\]{max-width:420px}}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem} diff --git a/assets/index-83c2bf93.js b/assets/index-83c2bf93.js new file mode 100644 index 0000000..bb9def2 --- /dev/null +++ b/assets/index-83c2bf93.js @@ -0,0 +1,167 @@ +function Ub(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var j3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h8={exports:{}},Kf={},p8={exports:{}},De={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var zu=Symbol.for("react.element"),Vb=Symbol.for("react.portal"),Gb=Symbol.for("react.fragment"),Bb=Symbol.for("react.strict_mode"),Hb=Symbol.for("react.profiler"),Wb=Symbol.for("react.provider"),Kb=Symbol.for("react.context"),Yb=Symbol.for("react.forward_ref"),Xb=Symbol.for("react.suspense"),Qb=Symbol.for("react.memo"),qb=Symbol.for("react.lazy"),U3=Symbol.iterator;function Zb(e){return e===null||typeof e!="object"?null:(e=U3&&e[U3]||e["@@iterator"],typeof e=="function"?e:null)}var g8={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v8=Object.assign,m8={};function Ns(e,t,n){this.props=e,this.context=t,this.refs=m8,this.updater=n||g8}Ns.prototype.isReactComponent={};Ns.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ns.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function y8(){}y8.prototype=Ns.prototype;function zv(e,t,n){this.props=e,this.context=t,this.refs=m8,this.updater=n||g8}var jv=zv.prototype=new y8;jv.constructor=zv;v8(jv,Ns.prototype);jv.isPureReactComponent=!0;var V3=Array.isArray,w8=Object.prototype.hasOwnProperty,Uv={current:null},S8={key:!0,ref:!0,__self:!0,__source:!0};function x8(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)w8.call(t,r)&&!S8.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(u===1)o.children=n;else if(1>>1,J=Y[q];if(0>>1;qo(Fe,B))Peo(L,Fe)?(Y[q]=L,Y[Pe]=B,q=Pe):(Y[q]=Fe,Y[pe]=B,q=pe);else if(Peo(L,B))Y[q]=L,Y[Pe]=B,q=Pe;else break e}}return z}function o(Y,z){var B=Y.sortIndex-z.sortIndex;return B!==0?B:Y.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],d=[],p=1,g=null,S=3,w=!1,x=!1,y=!1,E=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(Y){for(var z=n(d);z!==null;){if(z.callback===null)r(d);else if(z.startTime<=Y)r(d),z.sortIndex=z.expirationTime,t(c,z);else break;z=n(d)}}function P(Y){if(y=!1,v(Y),!x)if(n(c)!==null)x=!0,Z(k);else{var z=n(d);z!==null&&oe(P,z.startTime-Y)}}function k(Y,z){x=!1,y&&(y=!1,_(R),R=-1),w=!0;var B=S;try{for(v(z),g=n(c);g!==null&&(!(g.expirationTime>z)||Y&&!D());){var q=g.callback;if(typeof q=="function"){g.callback=null,S=g.priorityLevel;var J=q(g.expirationTime<=z);z=e.unstable_now(),typeof J=="function"?g.callback=J:g===n(c)&&r(c),v(z)}else r(c);g=n(c)}if(g!==null)var ae=!0;else{var pe=n(d);pe!==null&&oe(P,pe.startTime-z),ae=!1}return ae}finally{g=null,S=B,w=!1}}var T=!1,N=null,R=-1,I=5,O=-1;function D(){return!(e.unstable_now()-OY||125q?(Y.sortIndex=B,t(d,Y),n(c)===null&&Y===n(d)&&(y?(_(R),R=-1):y=!0,oe(P,B-q))):(Y.sortIndex=J,t(c,Y),x||w||(x=!0,Z(k))),Y},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(Y){var z=S;return function(){var B=S;S=z;try{return Y.apply(this,arguments)}finally{S=B}}}})(P8);E8.exports=P8;var zl=E8.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var $8=h,Tn=zl;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ng=Object.prototype.hasOwnProperty,uE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,B3={},H3={};function cE(e){return ng.call(H3,e)?!0:ng.call(B3,e)?!1:uE.test(e)?H3[e]=!0:(B3[e]=!0,!1)}function dE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function fE(e,t,n,r){if(t===null||typeof t>"u"||dE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function sn(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Gt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Gt[e]=new sn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Gt[t]=new sn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Gt[e]=new sn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Gt[e]=new sn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Gt[e]=new sn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Gt[e]=new sn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Gt[e]=new sn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Gt[e]=new sn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Gt[e]=new sn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Gv=/[\-:]([a-z])/g;function Bv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Gv,Bv);Gt[t]=new sn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Gv,Bv);Gt[t]=new sn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Gv,Bv);Gt[t]=new sn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Gt[e]=new sn(e,1,!1,e.toLowerCase(),null,!1,!1)});Gt.xlinkHref=new sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Gt[e]=new sn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Hv(e,t,n,r){var o=Gt.hasOwnProperty(t)?Gt[t]:null;(o!==null?o.type!==0:r||!(2u||o[s]!==i[u]){var c=` +`+o[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=u);break}}}finally{K1=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ml(e):""}function hE(e){switch(e.tag){case 5:return Ml(e.type);case 16:return Ml("Lazy");case 13:return Ml("Suspense");case 19:return Ml("SuspenseList");case 0:case 2:case 15:return e=Y1(e.type,!1),e;case 11:return e=Y1(e.type.render,!1),e;case 1:return e=Y1(e.type,!0),e;default:return""}}function ag(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wa:return"Fragment";case Ha:return"Portal";case rg:return"Profiler";case Wv:return"StrictMode";case og:return"Suspense";case ig:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case T8:return(e.displayName||"Context")+".Consumer";case R8:return(e._context.displayName||"Context")+".Provider";case Kv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yv:return t=e.displayName||null,t!==null?t:ag(e.type)||"Memo";case Vo:t=e._payload,e=e._init;try{return ag(e(t))}catch{}}return null}function pE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ag(t);case 8:return t===Wv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function si(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function A8(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gE(e){var t=A8(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zc(e){e._valueTracker||(e._valueTracker=gE(e))}function M8(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=A8(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function rf(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function sg(e,t){var n=t.checked;return ft({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function K3(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=si(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function O8(e,t){t=t.checked,t!=null&&Hv(e,"checked",t,!1)}function lg(e,t){O8(e,t);var n=si(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ug(e,t.type,n):t.hasOwnProperty("defaultValue")&&ug(e,t.type,si(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Y3(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ug(e,t,n){(t!=="number"||rf(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ol=Array.isArray;function os(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Jc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ou(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var jl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vE=["Webkit","ms","Moz","O"];Object.keys(jl).forEach(function(e){vE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jl[t]=jl[e]})});function F8(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||jl.hasOwnProperty(e)&&jl[e]?(""+t).trim():t+"px"}function z8(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=F8(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var mE=ft({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fg(e,t){if(t){if(mE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function hg(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pg=null;function Xv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gg=null,is=null,as=null;function q3(e){if(e=Vu(e)){if(typeof gg!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=Zf(t),gg(e.stateNode,e.type,t))}}function j8(e){is?as?as.push(e):as=[e]:is=e}function U8(){if(is){var e=is,t=as;if(as=is=null,q3(e),t)for(e=0;e>>=0,e===0?32:31-(kE(e)/RE|0)|0}var ed=64,td=4194304;function Il(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lf(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var u=s&~o;u!==0?r=Il(u):(i&=s,i!==0&&(r=Il(i)))}else s=n&~o,s!==0?r=Il(s):i!==0&&(r=Il(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ju(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mr(t),e[t]=n}function ME(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Vl),a4=String.fromCharCode(32),s4=!1;function s7(e,t){switch(e){case"keyup":return sP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function l7(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function uP(e,t){switch(e){case"compositionend":return l7(t);case"keypress":return t.which!==32?null:(s4=!0,a4);case"textInput":return e=t.data,e===a4&&s4?null:e;default:return null}}function cP(e,t){if(Ka)return e==="compositionend"||!rm&&s7(e,t)?(e=i7(),zd=em=Wo=null,Ka=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=d4(n)}}function f7(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?f7(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function h7(){for(var e=window,t=rf();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=rf(e.document)}return t}function om(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function wP(e){var t=h7(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&f7(n.ownerDocument.documentElement,n)){if(r!==null&&om(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=f4(n,i);var s=f4(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ya=null,xg=null,Bl=null,_g=!1;function h4(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_g||Ya==null||Ya!==rf(r)||(r=Ya,"selectionStart"in r&&om(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Bl&&cu(Bl,r)||(Bl=r,r=df(xg,"onSelect"),0qa||(e.current=kg[qa],kg[qa]=null,qa--)}function qe(e,t){qa++,kg[qa]=e.current,e.current=t}var li={},en=gi(li),mn=gi(!1),Yi=li;function vs(e,t){var n=e.type.contextTypes;if(!n)return li;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function yn(e){return e=e.childContextTypes,e!=null}function hf(){nt(mn),nt(en)}function S4(e,t,n){if(en.current!==li)throw Error(ne(168));qe(en,t),qe(mn,n)}function _7(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ne(108,pE(e)||"Unknown",o));return ft({},n,r)}function pf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||li,Yi=en.current,qe(en,e),qe(mn,mn.current),!0}function x4(e,t,n){var r=e.stateNode;if(!r)throw Error(ne(169));n?(e=_7(e,t,Yi),r.__reactInternalMemoizedMergedChildContext=e,nt(mn),nt(en),qe(en,e)):nt(mn),qe(mn,n)}var no=null,Jf=!1,lp=!1;function C7(e){no===null?no=[e]:no.push(e)}function NP(e){Jf=!0,C7(e)}function vi(){if(!lp&&no!==null){lp=!0;var e=0,t=We;try{var n=no;for(We=1;e>=s,o-=s,ro=1<<32-mr(t)+o|n<R?(I=N,N=null):I=N.sibling;var O=S(_,N,v[R],P);if(O===null){N===null&&(N=I);break}e&&N&&O.alternate===null&&t(_,N),C=i(O,C,R),T===null?k=O:T.sibling=O,T=O,N=I}if(R===v.length)return n(_,N),at&&Li(_,R),k;if(N===null){for(;RR?(I=N,N=null):I=N.sibling;var D=S(_,N,O.value,P);if(D===null){N===null&&(N=I);break}e&&N&&D.alternate===null&&t(_,N),C=i(D,C,R),T===null?k=D:T.sibling=D,T=D,N=I}if(O.done)return n(_,N),at&&Li(_,R),k;if(N===null){for(;!O.done;R++,O=v.next())O=g(_,O.value,P),O!==null&&(C=i(O,C,R),T===null?k=O:T.sibling=O,T=O);return at&&Li(_,R),k}for(N=r(_,N);!O.done;R++,O=v.next())O=w(N,_,R,O.value,P),O!==null&&(e&&O.alternate!==null&&N.delete(O.key===null?R:O.key),C=i(O,C,R),T===null?k=O:T.sibling=O,T=O);return e&&N.forEach(function(F){return t(_,F)}),at&&Li(_,R),k}function E(_,C,v,P){if(typeof v=="object"&&v!==null&&v.type===Wa&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case qc:e:{for(var k=v.key,T=C;T!==null;){if(T.key===k){if(k=v.type,k===Wa){if(T.tag===7){n(_,T.sibling),C=o(T,v.props.children),C.return=_,_=C;break e}}else if(T.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Vo&&k4(k)===T.type){n(_,T.sibling),C=o(T,v.props),C.ref=Sl(_,T,v),C.return=_,_=C;break e}n(_,T);break}else t(_,T);T=T.sibling}v.type===Wa?(C=Ki(v.props.children,_.mode,P,v.key),C.return=_,_=C):(P=Kd(v.type,v.key,v.props,null,_.mode,P),P.ref=Sl(_,C,v),P.return=_,_=P)}return s(_);case Ha:e:{for(T=v.key;C!==null;){if(C.key===T)if(C.tag===4&&C.stateNode.containerInfo===v.containerInfo&&C.stateNode.implementation===v.implementation){n(_,C.sibling),C=o(C,v.children||[]),C.return=_,_=C;break e}else{n(_,C);break}else t(_,C);C=C.sibling}C=vp(v,_.mode,P),C.return=_,_=C}return s(_);case Vo:return T=v._init,E(_,C,T(v._payload),P)}if(Ol(v))return x(_,C,v,P);if(gl(v))return y(_,C,v,P);ld(_,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,C!==null&&C.tag===6?(n(_,C.sibling),C=o(C,v),C.return=_,_=C):(n(_,C),C=gp(v,_.mode,P),C.return=_,_=C),s(_)):n(_,C)}return E}var ys=N7(!0),A7=N7(!1),Gu={},zr=gi(Gu),pu=gi(Gu),gu=gi(Gu);function Bi(e){if(e===Gu)throw Error(ne(174));return e}function hm(e,t){switch(qe(gu,t),qe(pu,e),qe(zr,Gu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:dg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=dg(t,e)}nt(zr),qe(zr,t)}function ws(){nt(zr),nt(pu),nt(gu)}function M7(e){Bi(gu.current);var t=Bi(zr.current),n=dg(t,e.type);t!==n&&(qe(pu,e),qe(zr,n))}function pm(e){pu.current===e&&(nt(zr),nt(pu))}var ct=gi(0);function Sf(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var up=[];function gm(){for(var e=0;en?n:4,e(!0);var r=cp.transition;cp.transition={};try{e(!1),t()}finally{We=n,cp.transition=r}}function X7(){return qn().memoizedState}function IP(e,t,n){var r=oi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Q7(e))q7(t,n);else if(n=$7(e,t,n,r),n!==null){var o=on();yr(n,e,r,o),Z7(n,t,r)}}function DP(e,t,n){var r=oi(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Q7(e))q7(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,u=i(s,n);if(o.hasEagerState=!0,o.eagerState=u,Sr(u,s)){var c=t.interleaved;c===null?(o.next=o,dm(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=$7(e,t,o,r),n!==null&&(o=on(),yr(n,e,r,o),Z7(n,t,r))}}function Q7(e){var t=e.alternate;return e===dt||t!==null&&t===dt}function q7(e,t){Hl=xf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Z7(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qv(e,n)}}var _f={readContext:Qn,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useInsertionEffect:Qt,useLayoutEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useMutableSource:Qt,useSyncExternalStore:Qt,useId:Qt,unstable_isNewReconciler:!1},LP={readContext:Qn,useCallback:function(e,t){return Or().memoizedState=[e,t===void 0?null:t],e},useContext:Qn,useEffect:T4,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gd(4194308,4,B7.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gd(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gd(4,2,e,t)},useMemo:function(e,t){var n=Or();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Or();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=IP.bind(null,dt,e),[r.memoizedState,e]},useRef:function(e){var t=Or();return e={current:e},t.memoizedState=e},useState:R4,useDebugValue:Sm,useDeferredValue:function(e){return Or().memoizedState=e},useTransition:function(){var e=R4(!1),t=e[0];return e=OP.bind(null,e[1]),Or().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dt,o=Or();if(at){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),Ot===null)throw Error(ne(349));Qi&30||D7(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,T4(F7.bind(null,r,i,e),[e]),r.flags|=2048,yu(9,L7.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Or(),t=Ot.identifierPrefix;if(at){var n=oo,r=ro;n=(r&~(1<<32-mr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Lr]=t,e[hu]=r,s9(e,t,!1,!1),t.stateNode=e;e:{switch(s=hg(n,r),n){case"dialog":tt("cancel",e),tt("close",e),o=r;break;case"iframe":case"object":case"embed":tt("load",e),o=r;break;case"video":case"audio":for(o=0;oxs&&(t.flags|=128,r=!0,xl(i,!1),t.lanes=4194304)}else{if(!r)if(e=Sf(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),xl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!at)return qt(t),null}else 2*mt()-i.renderingStartTime>xs&&n!==1073741824&&(t.flags|=128,r=!0,xl(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=mt(),t.sibling=null,n=ct.current,qe(ct,r?n&1|2:n&1),t):(qt(t),null);case 22:case 23:return Pm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?bn&1073741824&&(qt(t),t.subtreeFlags&6&&(t.flags|=8192)):qt(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function HP(e,t){switch(am(t),t.tag){case 1:return yn(t.type)&&hf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ws(),nt(mn),nt(en),gm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return pm(t),null;case 13:if(nt(ct),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));ms()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return nt(ct),null;case 4:return ws(),null;case 10:return cm(t.type._context),null;case 22:case 23:return Pm(),null;case 24:return null;default:return null}}var cd=!1,Zt=!1,WP=typeof WeakSet=="function"?WeakSet:Set,fe=null;function ts(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){pt(e,t,r)}else n.current=null}function jg(e,t,n){try{n()}catch(r){pt(e,t,r)}}var z4=!1;function KP(e,t){if(Cg=uf,e=h7(),om(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,u=-1,c=-1,d=0,p=0,g=e,S=null;t:for(;;){for(var w;g!==n||o!==0&&g.nodeType!==3||(u=s+o),g!==i||r!==0&&g.nodeType!==3||(c=s+r),g.nodeType===3&&(s+=g.nodeValue.length),(w=g.firstChild)!==null;)S=g,g=w;for(;;){if(g===e)break t;if(S===n&&++d===o&&(u=s),S===i&&++p===r&&(c=s),(w=g.nextSibling)!==null)break;g=S,S=g.parentNode}g=w}n=u===-1||c===-1?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(bg={focusedElem:e,selectionRange:n},uf=!1,fe=t;fe!==null;)if(t=fe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,fe=e;else for(;fe!==null;){t=fe;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var y=x.memoizedProps,E=x.memoizedState,_=t.stateNode,C=_.getSnapshotBeforeUpdate(t.elementType===t.type?y:fr(t.type,y),E);_.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(P){pt(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,fe=e;break}fe=t.return}return x=z4,z4=!1,x}function Wl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&jg(t,n,i)}o=o.next}while(o!==r)}}function nh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ug(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function c9(e){var t=e.alternate;t!==null&&(e.alternate=null,c9(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lr],delete t[hu],delete t[$g],delete t[RP],delete t[TP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function d9(e){return e.tag===5||e.tag===3||e.tag===4}function j4(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||d9(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ff));else if(r!==4&&(e=e.child,e!==null))for(Vg(e,t,n),e=e.sibling;e!==null;)Vg(e,t,n),e=e.sibling}function Gg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Gg(e,t,n),e=e.sibling;e!==null;)Gg(e,t,n),e=e.sibling}var jt=null,hr=!1;function Io(e,t,n){for(n=n.child;n!==null;)f9(e,t,n),n=n.sibling}function f9(e,t,n){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(Yf,n)}catch{}switch(n.tag){case 5:Zt||ts(n,t);case 6:var r=jt,o=hr;jt=null,Io(e,t,n),jt=r,hr=o,jt!==null&&(hr?(e=jt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):jt.removeChild(n.stateNode));break;case 18:jt!==null&&(hr?(e=jt,n=n.stateNode,e.nodeType===8?sp(e.parentNode,n):e.nodeType===1&&sp(e,n),lu(e)):sp(jt,n.stateNode));break;case 4:r=jt,o=hr,jt=n.stateNode.containerInfo,hr=!0,Io(e,t,n),jt=r,hr=o;break;case 0:case 11:case 14:case 15:if(!Zt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&jg(n,t,s),o=o.next}while(o!==r)}Io(e,t,n);break;case 1:if(!Zt&&(ts(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){pt(n,t,u)}Io(e,t,n);break;case 21:Io(e,t,n);break;case 22:n.mode&1?(Zt=(r=Zt)||n.memoizedState!==null,Io(e,t,n),Zt=r):Io(e,t,n);break;default:Io(e,t,n)}}function U4(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new WP),t.forEach(function(r){var o=n$.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function ur(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=mt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*XP(r/1960))-r,10e?16:e,Ko===null)var r=!1;else{if(e=Ko,Ko=null,Ef=0,ze&6)throw Error(ne(331));var o=ze;for(ze|=4,fe=e.current;fe!==null;){var i=fe,s=i.child;if(fe.flags&16){var u=i.deletions;if(u!==null){for(var c=0;cmt()-bm?Wi(e,0):Cm|=n),wn(e,t)}function S9(e,t){t===0&&(e.mode&1?(t=td,td<<=1,!(td&130023424)&&(td=4194304)):t=1);var n=on();e=uo(e,t),e!==null&&(ju(e,t,n),wn(e,n))}function t$(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),S9(e,n)}function n$(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(t),S9(e,n)}var x9;x9=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||mn.current)vn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return vn=!1,GP(e,t,n);vn=!!(e.flags&131072)}else vn=!1,at&&t.flags&1048576&&b7(t,vf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bd(e,t),e=t.pendingProps;var o=vs(t,en.current);ls(t,n),o=mm(null,t,r,e,o,n);var i=ym();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yn(r)?(i=!0,pf(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,fm(t),o.updater=eh,t.stateNode=o,o._reactInternals=t,Mg(t,r,e,n),t=Dg(null,t,r,!0,i,n)):(t.tag=0,at&&i&&im(t),rn(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bd(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=o$(r),e=fr(r,e),o){case 0:t=Ig(null,t,r,e,n);break e;case 1:t=D4(null,t,r,e,n);break e;case 11:t=O4(null,t,r,e,n);break e;case 14:t=I4(null,t,r,fr(r.type,e),n);break e}throw Error(ne(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:fr(r,o),Ig(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:fr(r,o),D4(e,t,r,o,n);case 3:e:{if(o9(t),e===null)throw Error(ne(387));r=t.pendingProps,i=t.memoizedState,o=i.element,k7(e,t),wf(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Ss(Error(ne(423)),t),t=L4(e,t,r,n,o);break e}else if(r!==o){o=Ss(Error(ne(424)),t),t=L4(e,t,r,n,o);break e}else for($n=ti(t.stateNode.containerInfo.firstChild),kn=t,at=!0,pr=null,n=A7(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ms(),r===o){t=co(e,t,n);break e}rn(e,t,r,n)}t=t.child}return t;case 5:return M7(t),e===null&&Tg(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Eg(r,o)?s=null:i!==null&&Eg(r,i)&&(t.flags|=32),r9(e,t),rn(e,t,s,n),t.child;case 6:return e===null&&Tg(t),null;case 13:return i9(e,t,n);case 4:return hm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ys(t,null,r,n):rn(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:fr(r,o),O4(e,t,r,o,n);case 7:return rn(e,t,t.pendingProps,n),t.child;case 8:return rn(e,t,t.pendingProps.children,n),t.child;case 12:return rn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,qe(mf,r._currentValue),r._currentValue=s,i!==null)if(Sr(i.value,s)){if(i.children===o.children&&!mn.current){t=co(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){s=i.child;for(var c=u.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=io(-1,n&-n),c.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var p=d.pending;p===null?c.next=c:(c.next=p.next,p.next=c),d.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Ng(i.return,n,t),u.lanes|=n;break}c=c.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ne(341));s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),Ng(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}rn(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ls(t,n),o=Qn(o),r=r(o),t.flags|=1,rn(e,t,r,n),t.child;case 14:return r=t.type,o=fr(r,t.pendingProps),o=fr(r.type,o),I4(e,t,r,o,n);case 15:return t9(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:fr(r,o),Bd(e,t),t.tag=1,yn(r)?(e=!0,pf(t)):e=!1,ls(t,n),T7(t,r,o),Mg(t,r,o,n),Dg(null,t,r,!0,e,n);case 19:return a9(e,t,n);case 22:return n9(e,t,n)}throw Error(ne(156,t.tag))};function _9(e,t){return Y8(e,t)}function r$(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kn(e,t,n,r){return new r$(e,t,n,r)}function km(e){return e=e.prototype,!(!e||!e.isReactComponent)}function o$(e){if(typeof e=="function")return km(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Kv)return 11;if(e===Yv)return 14}return 2}function ii(e,t){var n=e.alternate;return n===null?(n=Kn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Kd(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")km(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Wa:return Ki(n.children,o,i,t);case Wv:s=8,o|=8;break;case rg:return e=Kn(12,n,t,o|2),e.elementType=rg,e.lanes=i,e;case og:return e=Kn(13,n,t,o),e.elementType=og,e.lanes=i,e;case ig:return e=Kn(19,n,t,o),e.elementType=ig,e.lanes=i,e;case N8:return oh(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R8:s=10;break e;case T8:s=9;break e;case Kv:s=11;break e;case Yv:s=14;break e;case Vo:s=16,r=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Kn(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ki(e,t,n,r){return e=Kn(7,e,r,t),e.lanes=n,e}function oh(e,t,n,r){return e=Kn(22,e,r,t),e.elementType=N8,e.lanes=n,e.stateNode={isHidden:!1},e}function gp(e,t,n){return e=Kn(6,e,null,t),e.lanes=n,e}function vp(e,t,n){return t=Kn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function i$(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Q1(0),this.expirationTimes=Q1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Q1(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Rm(e,t,n,r,o,i,s,u,c){return e=new i$(e,t,n,u,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Kn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fm(i),e}function a$(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(P9)}catch(e){console.error(e)}}P9(),b8.exports=An;var mo=b8.exports;const $9=ra(mo);var X4=mo;tg.createRoot=X4.createRoot,tg.hydrateRoot=X4.hydrateRoot;const d$=e=>({code:[],setCode:t=>e({code:t})}),f$=(e,t)=>({theme:"system",speed:500,setSpeed:n=>e({speed:n}),setTheme:n=>e({theme:n}),getTheme:()=>{const n=t().theme;return n==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n},open:!1,setOpen:n=>e({open:n}),textareaValue:"",setTextareaValue:n=>e({textareaValue:n}),isCodeCorrect:!1,setIsCodeCorrect:n=>e({isCodeCorrect:n}),isCodeOpen:!1,setIsCodeOpen:n=>e({isCodeOpen:n})}),h$=e=>({turtlePosition:{x:0,y:0},turtleSize:{width:20,height:30},tension:.6,direction:90,setDirection:t=>e({direction:t}),setTurtleSize:(t,n)=>e({turtleSize:{width:t,height:n}}),setTension:t=>e({tension:t}),addMove:()=>e(()=>({turtlePosition:{x:0,y:0}})),resetTurtlePosition:()=>e({turtlePosition:{x:0,y:0}}),setTurtlePosition:t=>e({turtlePosition:t})}),p$=e=>({grid:!0,gridSize:32,canvasSize:{width:0,height:0},setGridSize:t=>e({gridSize:t}),setGrid:t=>e({grid:t}),setCanvasSize:(t,n)=>e({canvasSize:{width:t,height:n}})}),Yg=new Map,hd=e=>{const t=Yg.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},g$=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Yg.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return Yg.set(n.name,o),{type:"tracked",store:e,...o}},v$=(e,t={})=>(n,r,o)=>{const{enabled:i,anonymousActionType:s,store:u,...c}=t;let d;try{d=(i??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!d)return e(n,r,o);const{connection:p,...g}=g$(u,d,c);let S=!0;o.setState=(y,E,_)=>{const C=n(y,E);if(!S)return C;const v=_===void 0?{type:s||"anonymous"}:typeof _=="string"?{type:_}:_;return u===void 0?(p==null||p.send(v,r()),C):(p==null||p.send({...v,type:`${u}/${v.type}`},{...hd(c.name),[u]:o.getState()}),C)};const w=(...y)=>{const E=S;S=!1,n(...y),S=E},x=e(o.setState,r,o);if(g.type==="untracked"?p==null||p.init(x):(g.stores[g.store]=o,p==null||p.init(Object.fromEntries(Object.entries(g.stores).map(([y,E])=>[y,y===g.store?x:E.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let y=!1;const E=o.dispatch;o.dispatch=(..._)=>{E(..._)}}return p.subscribe(y=>{var E;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return mp(y.payload,_=>{if(_.type==="__setState"){if(u===void 0){w(_.state);return}Object.keys(_.state).length!==1&&console.error(` + [zustand devtools middleware] Unsupported __setState action format. + When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), + and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } + `);const C=_.state[u];if(C==null)return;JSON.stringify(o.getState())!==JSON.stringify(C)&&w(C);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(_)});case"DISPATCH":switch(y.payload.type){case"RESET":return w(x),u===void 0?p==null?void 0:p.init(o.getState()):p==null?void 0:p.init(hd(c.name));case"COMMIT":if(u===void 0){p==null||p.init(o.getState());return}return p==null?void 0:p.init(hd(c.name));case"ROLLBACK":return mp(y.state,_=>{if(u===void 0){w(_),p==null||p.init(o.getState());return}w(_[u]),p==null||p.init(hd(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return mp(y.state,_=>{if(u===void 0){w(_);return}JSON.stringify(o.getState())!==JSON.stringify(_[u])&&w(_[u])});case"IMPORT_STATE":{const{nextLiftedState:_}=y.payload,C=(E=_.computedStates.slice(-1)[0])==null?void 0:E.state;if(!C)return;w(u===void 0?C:C[u]),p==null||p.send(null,_);return}case"PAUSE_RECORDING":return S=!S}return}}),x},m$=v$,mp=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function y$(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const s=c=>c===null?null:JSON.parse(c,t==null?void 0:t.reviver),u=(i=n.getItem(o))!=null?i:null;return u instanceof Promise?u.then(s):s(u)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,t==null?void 0:t.replacer)),removeItem:o=>n.removeItem(o)}}const Su=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Su(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Su(r)(n)}}}},w$=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:E=>E,version:0,merge:(E,_)=>({..._,...E}),...t},s=!1;const u=new Set,c=new Set;let d;try{d=i.getStorage()}catch{}if(!d)return e((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...E)},r,o);const p=Su(i.serialize),g=()=>{const E=i.partialize({...r()});let _;const C=p({state:E,version:i.version}).then(v=>d.setItem(i.name,v)).catch(v=>{_=v});if(_)throw _;return C},S=o.setState;o.setState=(E,_)=>{S(E,_),g()};const w=e((...E)=>{n(...E),g()},r,o);let x;const y=()=>{var E;if(!d)return;s=!1,u.forEach(C=>C(r()));const _=((E=i.onRehydrateStorage)==null?void 0:E.call(i,r()))||void 0;return Su(d.getItem.bind(d))(i.name).then(C=>{if(C)return i.deserialize(C)}).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==i.version){if(i.migrate)return i.migrate(C.state,C.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return C.state}).then(C=>{var v;return x=i.merge(C,(v=r())!=null?v:w),n(x,!0),g()}).then(()=>{_==null||_(x,void 0),s=!0,c.forEach(C=>C(x))}).catch(C=>{_==null||_(void 0,C)})};return o.persist={setOptions:E=>{i={...i,...E},E.getStorage&&(d=E.getStorage())},clearStorage:()=>{d==null||d.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:E=>(u.add(E),()=>{u.delete(E)}),onFinishHydration:E=>(c.add(E),()=>{c.delete(E)})},y(),x||w},S$=(e,t)=>(n,r,o)=>{let i={storage:y$(()=>localStorage),partialize:y=>y,version:0,merge:(y,E)=>({...E,...y}),...t},s=!1;const u=new Set,c=new Set;let d=i.storage;if(!d)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...y)},r,o);const p=()=>{const y=i.partialize({...r()});return d.setItem(i.name,{state:y,version:i.version})},g=o.setState;o.setState=(y,E)=>{g(y,E),p()};const S=e((...y)=>{n(...y),p()},r,o);let w;const x=()=>{var y,E;if(!d)return;s=!1,u.forEach(C=>{var v;return C((v=r())!=null?v:S)});const _=((E=i.onRehydrateStorage)==null?void 0:E.call(i,(y=r())!=null?y:S))||void 0;return Su(d.getItem.bind(d))(i.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==i.version){if(i.migrate)return i.migrate(C.state,C.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return C.state}).then(C=>{var v;return w=i.merge(C,(v=r())!=null?v:S),n(w,!0),p()}).then(()=>{_==null||_(w,void 0),w=r(),s=!0,c.forEach(C=>C(w))}).catch(C=>{_==null||_(void 0,C)})};return o.persist={setOptions:y=>{i={...i,...y},y.storage&&(d=y.storage)},clearStorage:()=>{d==null||d.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>x(),hasHydrated:()=>s,onHydrate:y=>(u.add(y),()=>{u.delete(y)}),onFinishHydration:y=>(c.add(y),()=>{c.delete(y)})},i.skipHydration||x(),w||S},x$=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?w$(e,t):S$(e,t),_$=x$,C$=e=>({trails:[],setTrails:t=>e({trails:t})}),b$=e=>({isAnimating:!1,step:0,pendown:!0,pencolor:"black",steps:[],currStep:{x:0,y:0,rotation:0,duration:0,draw:!1,width:1,color:[0,0,0]},prevStep:{x:0,y:0,rotation:0,duration:0,draw:!1,width:1,color:[0,0,0]},playAnimation:()=>e(t=>({isAnimating:!0,step:t.step+1})),replayAnimation:()=>e({isAnimating:!0,step:0}),stopAnimation:()=>e({isAnimating:!1,step:0}),pauseAnimation:()=>e({isAnimating:!1}),setSteps:t=>e({steps:t}),increaseStep:()=>e(t=>({step:t.step+1})),resetSteps:()=>e({step:0,isAnimating:!1}),loopAnimation:()=>e({step:0,isAnimating:!1}),setCurrStep:t=>e(n=>({prevStep:n.currStep,currStep:t})),setPrevStep:t=>e({prevStep:t})});function E$(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?M$:A$;N9.useSyncExternalStore=_s.useSyncExternalStore!==void 0?_s.useSyncExternalStore:O$;T9.exports=N9;var I$=T9.exports;/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var uh=h,D$=I$;function L$(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var F$=typeof Object.is=="function"?Object.is:L$,z$=D$.useSyncExternalStore,j$=uh.useRef,U$=uh.useEffect,V$=uh.useMemo,G$=uh.useDebugValue;R9.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=j$(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=V$(function(){function c(w){if(!d){if(d=!0,p=w,w=r(w),o!==void 0&&s.hasValue){var x=s.value;if(o(x,w))return g=x}return g=w}if(x=g,F$(p,w))return x;var y=r(w);return o!==void 0&&o(x,y)?x:(p=w,g=y)}var d=!1,p,g,S=n===void 0?null:n;return[function(){return c(t())},S===null?void 0:function(){return c(S())}]},[t,n,r,o]);var u=z$(e,i[0],i[1]);return U$(function(){s.hasValue=!0,s.value=u},[u]),G$(u),u};k9.exports=R9;var B$=k9.exports;const H$=ra(B$),Q4=e=>{let t;const n=new Set,r=(c,d)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const g=t;t=d??typeof p!="object"?p:Object.assign({},t,p),n.forEach(S=>S(t,g))}},o=()=>t,u={setState:r,getState:o,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{n.clear()}};return t=e(r,o,u),u},W$=e=>e?Q4(e):Q4,{useSyncExternalStoreWithSelector:K$}=H$;function Y$(e,t=e.getState,n){const r=K$(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return h.useDebugValue(r),r}const q4=(e,t)=>{const n=W$(e),r=(o,i=t)=>Y$(n,o,i);return Object.assign(r,n),r},X$=(e,t)=>e?q4(e,t):q4,Q$=e=>t=>e(n=>t?t.length?t.reduce((o,i)=>(o[i]=n[i],o),{}):{}:{},E$),q$=X$()(m$(_$((...e)=>({...d$(...e),...f$(...e),...h$(...e),...p$(...e),...C$(...e),...b$(...e)}),{name:"boundStore"}))),Bt=Q$(q$);function Z$({children:e}){const{theme:t}=Bt(["theme","setTheme"]);return h.useEffect(()=>{const n=window.document.documentElement;if(n.classList.remove("light","dark"),t==="system"){const r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";n.classList.add(r);return}n.classList.add(t)},[t]),M.jsx(M.Fragment,{children:e})}const A9=()=>{const e=Bt(["theme"]);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;tx,Object.values(x));return h.createElement(y.Provider,{value:E},w)}function p(g,S){const w=(S==null?void 0:S[e][c])||u,x=h.useContext(w);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${g}\` must be used within \`${i}\``)}return d.displayName=i+"Provider",[d,p]}const o=()=>{const i=n.map(s=>h.createContext(s));return function(u){const c=(u==null?void 0:u[e])||i;return h.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return o.scopeName=e,[r,J$(o,...t)]}function J$(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((u,{useScope:c,scopeName:d})=>{const g=c(i)[`__scope${d}`];return{...u,...g}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function ek(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function M9(...e){return t=>e.forEach(n=>ek(n,t))}function Le(...e){return h.useCallback(M9(...e),e)}const ui=h.forwardRef((e,t)=>{const{children:n,...r}=e,o=h.Children.toArray(n),i=o.find(nk);if(i){const s=i.props.children,u=o.map(c=>c===i?h.Children.count(s)>1?h.Children.only(null):h.isValidElement(s)?s.props.children:null:c);return h.createElement(Xg,H({},r,{ref:t}),h.isValidElement(s)?h.cloneElement(s,void 0,u):null)}return h.createElement(Xg,H({},r,{ref:t}),n)});ui.displayName="Slot";const Xg=h.forwardRef((e,t)=>{const{children:n,...r}=e;return h.isValidElement(n)?h.cloneElement(n,{...rk(r,n.props),ref:t?M9(t,n.ref):n.ref}):h.Children.count(n)>1?h.Children.only(null):null});Xg.displayName="SlotClone";const tk=({children:e})=>h.createElement(h.Fragment,null,e);function nk(e){return h.isValidElement(e)&&e.type===tk}function rk(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]=(...u)=>{i(...u),o(...u)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ch(e){const t=e+"CollectionProvider",[n,r]=Jn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=w=>{const{scope:x,children:y}=w,E=te.useRef(null),_=te.useRef(new Map).current;return te.createElement(o,{scope:x,itemMap:_,collectionRef:E},y)},u=e+"CollectionSlot",c=te.forwardRef((w,x)=>{const{scope:y,children:E}=w,_=i(u,y),C=Le(x,_.collectionRef);return te.createElement(ui,{ref:C},E)}),d=e+"CollectionItemSlot",p="data-radix-collection-item",g=te.forwardRef((w,x)=>{const{scope:y,children:E,..._}=w,C=te.useRef(null),v=Le(x,C),P=i(d,y);return te.useEffect(()=>(P.itemMap.set(C,{ref:C,..._}),()=>void P.itemMap.delete(C))),te.createElement(ui,{[p]:"",ref:v},E)});function S(w){const x=i(e+"CollectionConsumer",w);return te.useCallback(()=>{const E=x.collectionRef.current;if(!E)return[];const _=Array.from(E.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((P,k)=>_.indexOf(P.ref.current)-_.indexOf(k.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:c,ItemSlot:g},S,r]}const Nn=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},ok=_8["useId".toString()]||(()=>{});let ik=0;function jr(e){const[t,n]=h.useState(ok());return Nn(()=>{e||n(r=>r??String(ik++))},[e]),e||(t?`radix-${t}`:"")}const ak=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Se=ak.reduce((e,t)=>{const n=h.forwardRef((r,o)=>{const{asChild:i,...s}=r,u=i?ui:t;return h.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),h.createElement(u,H({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function sk(e,t){e&&mo.flushSync(()=>e.dispatchEvent(t))}function Ut(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function xr({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=lk({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,u=Ut(n),c=h.useCallback(d=>{if(i){const g=typeof d=="function"?d(e):d;g!==e&&u(g)}else o(d)},[i,e,o,u]);return[s,c]}function lk({defaultProp:e,onChange:t}){const n=h.useState(e),[r]=n,o=h.useRef(r),i=Ut(t);return h.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const uk=h.createContext(void 0);function Os(e){const t=h.useContext(uk);return e||t||"ltr"}const wp="rovingFocusGroup.onEntryFocus",ck={bubbles:!1,cancelable:!0},Mm="RovingFocusGroup",[Qg,O9,dk]=ch(Mm),[fk,I9]=Jn(Mm,[dk]),[hk,pk]=fk(Mm),gk=h.forwardRef((e,t)=>h.createElement(Qg.Provider,{scope:e.__scopeRovingFocusGroup},h.createElement(Qg.Slot,{scope:e.__scopeRovingFocusGroup},h.createElement(vk,H({},e,{ref:t}))))),vk=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:c,onEntryFocus:d,...p}=e,g=h.useRef(null),S=Le(t,g),w=Os(i),[x=null,y]=xr({prop:s,defaultProp:u,onChange:c}),[E,_]=h.useState(!1),C=Ut(d),v=O9(n),P=h.useRef(!1),[k,T]=h.useState(0);return h.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(wp,C),()=>N.removeEventListener(wp,C)},[C]),h.createElement(hk,{scope:n,orientation:r,dir:w,loop:o,currentTabStopId:x,onItemFocus:h.useCallback(N=>y(N),[y]),onItemShiftTab:h.useCallback(()=>_(!0),[]),onFocusableItemAdd:h.useCallback(()=>T(N=>N+1),[]),onFocusableItemRemove:h.useCallback(()=>T(N=>N-1),[])},h.createElement(Se.div,H({tabIndex:E||k===0?-1:0,"data-orientation":r},p,{ref:S,style:{outline:"none",...e.style},onMouseDown:we(e.onMouseDown,()=>{P.current=!0}),onFocus:we(e.onFocus,N=>{const R=!P.current;if(N.target===N.currentTarget&&R&&!E){const I=new CustomEvent(wp,ck);if(N.currentTarget.dispatchEvent(I),!I.defaultPrevented){const O=v().filter(X=>X.focusable),D=O.find(X=>X.active),F=O.find(X=>X.id===x),U=[D,F,...O].filter(Boolean).map(X=>X.ref.current);D9(U)}}P.current=!1}),onBlur:we(e.onBlur,()=>_(!1))})))}),mk="RovingFocusGroupItem",yk=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,u=jr(),c=i||u,d=pk(mk,n),p=d.currentTabStopId===c,g=O9(n),{onFocusableItemAdd:S,onFocusableItemRemove:w}=d;return h.useEffect(()=>{if(r)return S(),()=>w()},[r,S,w]),h.createElement(Qg.ItemSlot,{scope:n,id:c,focusable:r,active:o},h.createElement(Se.span,H({tabIndex:p?0:-1,"data-orientation":d.orientation},s,{ref:t,onMouseDown:we(e.onMouseDown,x=>{r?d.onItemFocus(c):x.preventDefault()}),onFocus:we(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:we(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const y=xk(x,d.orientation,d.dir);if(y!==void 0){x.preventDefault();let _=g().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")_.reverse();else if(y==="prev"||y==="next"){y==="prev"&&_.reverse();const C=_.indexOf(x.currentTarget);_=d.loop?_k(_,C+1):_.slice(C+1)}setTimeout(()=>D9(_))}})})))}),wk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Sk(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function xk(e,t,n){const r=Sk(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return wk[r]}function D9(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function _k(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Ck=gk,bk=yk;function Ek(e,t){return h.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const er=e=>{const{present:t,children:n}=e,r=Pk(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),i=Le(r.ref,o.ref);return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:i}):null};er.displayName="Presence";function Pk(e){const[t,n]=h.useState(),r=h.useRef({}),o=h.useRef(e),i=h.useRef("none"),s=e?"mounted":"unmounted",[u,c]=Ek(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const d=pd(r.current);i.current=u==="mounted"?d:"none"},[u]),Nn(()=>{const d=r.current,p=o.current;if(p!==e){const S=i.current,w=pd(d);e?c("MOUNT"):w==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(p&&S!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Nn(()=>{if(t){const d=g=>{const w=pd(r.current).includes(g.animationName);g.target===t&&w&&mo.flushSync(()=>c("ANIMATION_END"))},p=g=>{g.target===t&&(i.current=pd(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:h.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function pd(e){return(e==null?void 0:e.animationName)||"none"}const L9="Tabs",[$k,wB]=Jn(L9,[I9]),F9=I9(),[kk,Om]=$k(L9),Rk=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:u,activationMode:c="automatic",...d}=e,p=Os(u),[g,S]=xr({prop:r,onChange:o,defaultProp:i});return h.createElement(kk,{scope:n,baseId:jr(),value:g,onValueChange:S,orientation:s,dir:p,activationMode:c},h.createElement(Se.div,H({dir:p,"data-orientation":s},d,{ref:t})))}),Tk="TabsList",Nk=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=Om(Tk,n),s=F9(n);return h.createElement(Ck,H({asChild:!0},s,{orientation:i.orientation,dir:i.dir,loop:r}),h.createElement(Se.div,H({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))}),Ak="TabsTrigger",Mk=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=Om(Ak,n),u=F9(n),c=z9(s.baseId,r),d=j9(s.baseId,r),p=r===s.value;return h.createElement(bk,H({asChild:!0},u,{focusable:!o,active:p}),h.createElement(Se.button,H({type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c},i,{ref:t,onMouseDown:we(e.onMouseDown,g=>{!o&&g.button===0&&g.ctrlKey===!1?s.onValueChange(r):g.preventDefault()}),onKeyDown:we(e.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&s.onValueChange(r)}),onFocus:we(e.onFocus,()=>{const g=s.activationMode!=="manual";!p&&!o&&g&&s.onValueChange(r)})})))}),Ok="TabsContent",Ik=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,u=Om(Ok,n),c=z9(u.baseId,r),d=j9(u.baseId,r),p=r===u.value,g=h.useRef(p);return h.useEffect(()=>{const S=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(S)},[]),h.createElement(er,{present:o||p},({present:S})=>h.createElement(Se.div,H({"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":c,hidden:!S,id:d,tabIndex:0},s,{ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0}}),S&&i))});function z9(e,t){return`${e}-trigger-${t}`}function j9(e,t){return`${e}-content-${t}`}const Dk=Rk,U9=Nk,V9=Mk,G9=Ik;function B9(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;te&&(t=0,r=n,n=new Map)}return{get:function(s){var u=n.get(s);if(u!==void 0)return u;if((u=r.get(s))!==void 0)return o(s,u),u},set:function(s,u){n.has(s)?n.set(s,u):o(s,u)}}}var Y9="!";function Bk(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(s){for(var u=[],c=0,d=0,p,g=0;gd?p-d:void 0;return{modifiers:u,hasImportantModifier:x,baseClassName:y,maybePostfixModifierPosition:E}}}function Hk(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var o=r[0]==="[";o?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function Wk(e){return{cache:Gk(e.cacheSize),splitModifiers:Bk(e),...Fk(e)}}var Kk=/\s+/;function Yk(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(Kk).map(function(s){var u=n(s),c=u.modifiers,d=u.hasImportantModifier,p=u.baseClassName,g=u.maybePostfixModifierPosition,S=r(g?p.substring(0,g):p),w=!!g;if(!S){if(!g)return{isTailwindClass:!1,originalClassName:s};if(S=r(p),!S)return{isTailwindClass:!1,originalClassName:s};w=!1}var x=Hk(c).join(":"),y=d?x+Y9:x;return{isTailwindClass:!0,modifierId:y,classGroupId:S,originalClassName:s,hasPostfixModifier:w}}).reverse().filter(function(s){if(!s.isTailwindClass)return!0;var u=s.modifierId,c=s.classGroupId,d=s.hasPostfixModifier,p=u+c;return i.has(p)?!1:(i.add(p),o(c,d).forEach(function(g){return i.add(u+g)}),!0)}).reverse().map(function(s){return s.originalClassName}).join(" ")}function Xk(){for(var e=arguments.length,t=new Array(e),n=0;nM.jsx(U9,{ref:n,className:ke("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));q9.displayName=U9.displayName;const Yd=h.forwardRef(({className:e,...t},n)=>M.jsx(V9,{ref:n,className:ke("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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-sm",e),...t}));Yd.displayName=V9.displayName;const Z9=h.forwardRef(({className:e,...t},n)=>M.jsx(G9,{ref:n,className:ke("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Z9.displayName=G9.displayName;const Dm=h.forwardRef(({className:e,...t},n)=>M.jsx("div",{ref:n,className:ke("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Dm.displayName="Card";const fR=h.forwardRef(({className:e,...t},n)=>M.jsx("div",{ref:n,className:ke("flex flex-col space-y-1.5 p-6",e),...t}));fR.displayName="CardHeader";const hR=h.forwardRef(({className:e,...t},n)=>M.jsx("h3",{ref:n,className:ke("text-2xl font-semibold leading-none tracking-tight",e),...t}));hR.displayName="CardTitle";const pR=h.forwardRef(({className:e,...t},n)=>M.jsx("p",{ref:n,className:ke("text-sm text-muted-foreground",e),...t}));pR.displayName="CardDescription";const gR=h.forwardRef(({className:e,...t},n)=>M.jsx("div",{ref:n,className:ke("p-6 pt-0",e),...t}));gR.displayName="CardContent";const vR=h.forwardRef(({className:e,...t},n)=>M.jsx("div",{ref:n,className:ke("flex items-center p-6 pt-0",e),...t}));vR.displayName="CardFooter";var Ie=(e=>(e.turnleft="turnleft",e.turnright="turnright",e.forward="forward",e.backward="backward",e.penup="penup",e.pendown="pendown",e.go="go",e.gox="gox",e.penwidth="penwidth",e.pencolor="pencolor",e.center="center",e.direction="direction",e.goy="goy",e))(Ie||{}),Lm=(e=>(e[e.X=0]="X",e[e.Y=1]="Y",e[e.W=2]="W",e[e.D=3]="D",e[e.R=4]="R",e[e.G=5]="G",e[e.B=6]="B",e))(Lm||{});const Is=new Map([["turnleft",[3]],["turnright",[3]],["direction",[3]],["pencolor",[4,5,6]],["penwidth",[2]],["penup",[]],["pendown",[]],["forward",[1]],["backward",[1]],["center",[]],["go",[0,1]],["gox",[0]],["goy",[1]]]),dh=new Map([[6,"text-sky-500"],[5,"text-lime-500"],[4,"text-red-500"],[0,"text-rose-700"],[1,"text-indigo-700"],[3,"text-teal-500"],[2,"text-green-500"]]),t6=(e,t,n,r)=>{const o=r*Math.PI/180,i=e+n*Math.cos(o),s=t+n*Math.sin(o);return{x:i,y:s}},vd=(e,t,n,r)=>{const o=n-e,i=r-t;return Math.atan2(i,o)*180/Math.PI},Cn=e=>({...e,color:e.prevStep.color,width:e.prevStep.width,draw:e.prevStep.draw}),fh=(e,t,n,r,o)=>{const i=[{x:t==null?void 0:t.x,y:t==null?void 0:t.y,rotation:n,duration:0,color:o==="dark"?[256,256,256]:[0,0,0],width:1,draw:!1}];return e.forEach(s=>{const u=i[i.length-1];switch(s.statement){case Ie.forward:{if(!s.params)break;const{x:c,y:d}=t6(u.x,u.y,s.params[0],u.rotation);i.push(Cn({x:c,y:d,rotation:u.rotation,duration:r,prevStep:u}));break}case Ie.backward:{if(!s.params)break;const{x:c,y:d}=t6(u.x,u.y,s.params[0],u.rotation);i.push(Cn({x:c,y:d,rotation:u.rotation,duration:r,prevStep:u}));break}case Ie.direction:{if(!s.params)break;i.push(Cn({x:u.x,y:u.y,rotation:s.params[0],duration:r,prevStep:u}));break}case Ie.turnleft:{if(!s.params)break;i.push(Cn({x:u.x,y:u.y,rotation:u.rotation-s.params[0],duration:r,prevStep:u}));break}case Ie.turnright:{if(!s.params)break;i.push(Cn({x:u.x,y:u.y,rotation:u.rotation+s.params[0],duration:r,prevStep:u}));break}case Ie.center:{const c=vd(u.x,u.y,t.x,t.y);i.push(Cn({x:u.x,y:u.y,rotation:c,duration:r,prevStep:u})),i.push(Cn({x:t.x,y:t.y,rotation:c,duration:r,prevStep:u}));break}case Ie.go:{if(!s.params)break;const c=vd(u.x,u.y,s.params[0],s.params[1]);i.push(Cn({x:u.x,y:u.y,rotation:c,duration:r,prevStep:u})),i.push(Cn({x:s.params[0],y:s.params[1],rotation:c,duration:r,prevStep:u}));break}case Ie.gox:{if(!s.params)break;const c=vd(u.x,u.y,s.params[0],u.y);i.push(Cn({x:u.x,y:u.y,rotation:c,duration:r,prevStep:u})),i.push(Cn({x:s.params[0],y:u.y,rotation:c,duration:r,prevStep:u}));break}case Ie.goy:{if(!s.params)break;const c=vd(u.x,u.y,u.x,s.params[0]);i.push(Cn({x:u.x,y:u.y,rotation:c,duration:r,prevStep:u})),i.push(Cn({x:u.x,y:s.params[0],rotation:c,duration:r,prevStep:u}));break}case Ie.pendown:{i.push({...u,draw:!0});break}case Ie.penup:{i.push({...u,draw:!1});break}case Ie.pencolor:{if(!s.params)break;i.push({...u,color:[s.params[0],s.params[1],s.params[2]]});break}case Ie.penwidth:{if(!s.params)break;i.push({...u,width:s.params[0]});break}}}),i},mR=(e,t)=>{const[n,r]=h.useState(e);return h.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n};let md;const yR=new Uint8Array(16);function wR(){if(!md&&(md=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!md))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return md(yR)}const zt=[];for(let e=0;e<256;++e)zt.push((e+256).toString(16).slice(1));function SR(e,t=0){return zt[e[t+0]]+zt[e[t+1]]+zt[e[t+2]]+zt[e[t+3]]+"-"+zt[e[t+4]]+zt[e[t+5]]+"-"+zt[e[t+6]]+zt[e[t+7]]+"-"+zt[e[t+8]]+zt[e[t+9]]+"-"+zt[e[t+10]]+zt[e[t+11]]+zt[e[t+12]]+zt[e[t+13]]+zt[e[t+14]]+zt[e[t+15]]}const xR=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),n6={randomUUID:xR};function Xd(e,t,n){if(n6.randomUUID&&!t&&!e)return n6.randomUUID();e=e||{};const r=e.random||(e.rng||wR)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return SR(r)}const _R=1,CR=1e6;let Sp=0;function bR(){return Sp=(Sp+1)%Number.MAX_VALUE,Sp.toString()}const xp=new Map,r6=e=>{if(xp.has(e))return;const t=setTimeout(()=>{xp.delete(e),Xl({type:"REMOVE_TOAST",toastId:e})},CR);xp.set(e,t)},ER=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,_R)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?r6(n):e.toasts.forEach(r=>{r6(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Qd=[];let qd={toasts:[]};function Xl(e){qd=ER(qd,e),Qd.forEach(t=>{t(qd)})}function PR({...e}){const t=bR(),n=o=>Xl({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>Xl({type:"DISMISS_TOAST",toastId:t});return Xl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function $R(){const[e,t]=h.useState(qd);return h.useEffect(()=>(Qd.push(t),()=>{const n=Qd.indexOf(t);n>-1&&Qd.splice(n,1)}),[e]),{...e,toast:PR,dismiss:n=>Xl({type:"DISMISS_TOAST",toastId:n})}}const Fm=()=>{const{setTextareaValue:e,isCodeOpen:t,setCode:n,code:r,setIsCodeCorrect:o,pauseAnimation:i}=Bt(["setTextareaValue","isCodeOpen","setCode","code","setIsCodeCorrect","pauseAnimation"]),{toast:s}=$R(),u=x=>{if(x.length===0||x.length===1&&x[0]==="")return!0;const y=x.filter(E=>!E.includes(" ")&&E!=="");return Object.values(Ie).includes(y[0])?(d(y[0],y.slice(1)),d(y[0],y.slice(1))):!1},c=x=>!Number.isNaN(Number(x)),d=(x,y)=>{const E=Is.get(x);if(E){if(E.length!==y.length)return!1;let _=0;for(;_{if(x.length===0)return{error:!1,text:[],line:y,id:Xd()};const E=x.filter(_=>!_.includes(" ")&&_!=="");return{statement:Ie[E[0]],params:E.slice(1).map(_=>Number(_)),error:!1,text:x,line:y,id:Xd()}},g=x=>{const y=x.split(/\r?\n/),E=[];let _=0;for(;_{if(!x||x.length<0)return;const y=x.map(E=>{var C;const _=((C=E.params)==null?void 0:C.join(" ").split(/(\s+)/))||[""];return{...E,text:[E.statement," ",..._]}}).filter(E=>!(E.error||E.statement===void 0));w(y)},w=x=>{var E;let y="";for(const _ of x)y+=_.statement+" "+((E=_.params)==null?void 0:E.join(" "))+` +`;y.lastIndexOf(` +`)>0&&(y=y.substring(0,y.lastIndexOf(` +`))),t||n(x),e(y)};return h.useEffect(()=>{const x=r.find(E=>E.error)===void 0,y=r.find(E=>E.statement?![Ie.pencolor,Ie.pendown,Ie.penup,Ie.penwidth].includes(E.statement):!1)!==void 0;y||(i(),s({title:"Error: Can't run code",description:"Code must contain at least one move statement"})),o(x&&y)},[r]),{cleanCode:S,cleanCodeTextarea:w,parseText:g}},kR=()=>{const{code:e,setCode:t,turtlePosition:n,direction:r,setSteps:o,getTheme:i,isCodeCorrect:s,textareaValue:u,setTextareaValue:c,setIsCodeOpen:d,speed:p}=Bt(["code","setCode","resetSteps","turtlePosition","direction","setSteps","getTheme","isCodeCorrect","setIsCodeCorrect","textareaValue","setTextareaValue","speed","setIsCodeOpen"]),{cleanCode:g,parseText:S}=Fm(),[w,x]=h.useState(0),y=h.useRef(null),E=h.useRef(null),[_,C]=h.useState(0),v=mR(u,500),P=()=>{E.current&&y.current&&(E.current.scrollTop=y.current.scrollTop)},k=D=>{const F=[];for(const[G,U]of D.entries())U.error?G+1===w?F.push(`${U.text.join("")}
`):F.push(T(U)):F.push(N(U));return F.join("")},T=D=>`${D.text.join("")}
`,N=D=>{var X;if(!D.statement)return"
";const F=Is.get(D.statement);if(!F)return"
";let G="",U=0;for(const Z of D.text)Z===D.statement?G+=`${Z}`:(X=D.params)!=null&&X.includes(parseInt(Z))?(G+=`${Z}`,U++):G+=Z;return G+="
",G},R=D=>{c(D.target.value),t(S(D.target.value)),P()},I=()=>{if(y.current===null)return;const D=y.current.selectionStart,G=u.substring(0,D).split(` +`).length;x(G)};return h.useEffect(()=>{E.current&&(E.current.innerHTML=k(e))},[e]),h.useEffect(()=>{o(fh(e,n,r,p,i()))},[v]),h.useEffect(()=>{t(S(u));const{current:D}=y;D&&C(D.scrollHeight)},[u]),h.useEffect(()=>(g(e),d(!0),()=>{g(e),d(!1)}),[]),{cleanCode:g,code:e,setCode:t,isCodeCorrect:s,textareaRef:y,codeRef:E,syncScroll:P,handleChangeText:R,textareaValue:u,setTextareaValue:c,handleCursorPosition:I,handleClick:()=>{var D;(D=y==null?void 0:y.current)==null||D.focus()},scrollHeight:_}};function xu(e,[t,n]){return Math.min(n,Math.max(t,e))}function RR(e,t){return h.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const J9="ScrollArea",[ew,SB]=Jn(J9),[TR,tr]=ew(J9),NR=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[u,c]=h.useState(null),[d,p]=h.useState(null),[g,S]=h.useState(null),[w,x]=h.useState(null),[y,E]=h.useState(null),[_,C]=h.useState(0),[v,P]=h.useState(0),[k,T]=h.useState(!1),[N,R]=h.useState(!1),I=Le(t,D=>c(D)),O=Os(o);return h.createElement(TR,{scope:n,type:r,dir:O,scrollHideDelay:i,scrollArea:u,viewport:d,onViewportChange:p,content:g,onContentChange:S,scrollbarX:w,onScrollbarXChange:x,scrollbarXEnabled:k,onScrollbarXEnabledChange:T,scrollbarY:y,onScrollbarYChange:E,scrollbarYEnabled:N,onScrollbarYEnabledChange:R,onCornerWidthChange:C,onCornerHeightChange:P},h.createElement(Se.div,H({dir:O},s,{ref:I,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":v+"px",...e.style}})))}),AR="ScrollAreaViewport",MR=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=tr(AR,n),s=h.useRef(null),u=Le(t,s,i.onViewportChange);return h.createElement(h.Fragment,null,h.createElement("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}"}}),h.createElement(Se.div,H({"data-radix-scroll-area-viewport":""},o,{ref:u,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),h.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),yo="ScrollAreaScrollbar",tw=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=tr(yo,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,u=e.orientation==="horizontal";return h.useEffect(()=>(u?i(!0):s(!0),()=>{u?i(!1):s(!1)}),[u,i,s]),o.type==="hover"?h.createElement(OR,H({},r,{ref:t,forceMount:n})):o.type==="scroll"?h.createElement(IR,H({},r,{ref:t,forceMount:n})):o.type==="auto"?h.createElement(nw,H({},r,{ref:t,forceMount:n})):o.type==="always"?h.createElement(zm,H({},r,{ref:t})):null}),OR=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=tr(yo,e.__scopeScrollArea),[i,s]=h.useState(!1);return h.useEffect(()=>{const u=o.scrollArea;let c=0;if(u){const d=()=>{window.clearTimeout(c),s(!0)},p=()=>{c=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return u.addEventListener("pointerenter",d),u.addEventListener("pointerleave",p),()=>{window.clearTimeout(c),u.removeEventListener("pointerenter",d),u.removeEventListener("pointerleave",p)}}},[o.scrollArea,o.scrollHideDelay]),h.createElement(er,{present:n||i},h.createElement(nw,H({"data-state":i?"visible":"hidden"},r,{ref:t})))}),IR=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=tr(yo,e.__scopeScrollArea),i=e.orientation==="horizontal",s=ph(()=>c("SCROLL_END"),100),[u,c]=RR("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return h.useEffect(()=>{if(u==="idle"){const d=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[u,o.scrollHideDelay,c]),h.useEffect(()=>{const d=o.viewport,p=i?"scrollLeft":"scrollTop";if(d){let g=d[p];const S=()=>{const w=d[p];g!==w&&(c("SCROLL"),s()),g=w};return d.addEventListener("scroll",S),()=>d.removeEventListener("scroll",S)}},[o.viewport,i,c,s]),h.createElement(er,{present:n||u!=="hidden"},h.createElement(zm,H({"data-state":u==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:we(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:we(e.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),nw=h.forwardRef((e,t)=>{const n=tr(yo,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=h.useState(!1),u=e.orientation==="horizontal",c=ph(()=>{if(n.viewport){const d=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=tr(yo,e.__scopeScrollArea),i=h.useRef(null),s=h.useRef(0),[u,c]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=aw(u.viewport,u.content),p={...r,sizes:u,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:S=>i.current=S,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:S=>s.current=S};function g(S,w){return GR(S,s.current,u,w)}return n==="horizontal"?h.createElement(DR,H({},p,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const S=o.viewport.scrollLeft,w=o6(S,u,o.dir);i.current.style.transform=`translate3d(${w}px, 0, 0)`}},onWheelScroll:S=>{o.viewport&&(o.viewport.scrollLeft=S)},onDragScroll:S=>{o.viewport&&(o.viewport.scrollLeft=g(S,o.dir))}})):n==="vertical"?h.createElement(LR,H({},p,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const S=o.viewport.scrollTop,w=o6(S,u);i.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:S=>{o.viewport&&(o.viewport.scrollTop=S)},onDragScroll:S=>{o.viewport&&(o.viewport.scrollTop=g(S))}})):null}),DR=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=tr(yo,e.__scopeScrollArea),[s,u]=h.useState(),c=h.useRef(null),d=Le(t,c,i.onScrollbarXChange);return h.useEffect(()=>{c.current&&u(getComputedStyle(c.current))},[c]),h.createElement(ow,H({"data-orientation":"horizontal"},o,{ref:d,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":hh(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,g)=>{if(i.viewport){const S=i.viewport.scrollLeft+p.deltaX;e.onWheelScroll(S),lw(S,g)&&p.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:kf(s.paddingLeft),paddingEnd:kf(s.paddingRight)}})}}))}),LR=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=tr(yo,e.__scopeScrollArea),[s,u]=h.useState(),c=h.useRef(null),d=Le(t,c,i.onScrollbarYChange);return h.useEffect(()=>{c.current&&u(getComputedStyle(c.current))},[c]),h.createElement(ow,H({"data-orientation":"vertical"},o,{ref:d,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":hh(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,g)=>{if(i.viewport){const S=i.viewport.scrollTop+p.deltaY;e.onWheelScroll(S),lw(S,g)&&p.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:kf(s.paddingTop),paddingEnd:kf(s.paddingBottom)}})}}))}),[FR,rw]=ew(yo),ow=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:u,onThumbPositionChange:c,onDragScroll:d,onWheelScroll:p,onResize:g,...S}=e,w=tr(yo,n),[x,y]=h.useState(null),E=Le(t,I=>y(I)),_=h.useRef(null),C=h.useRef(""),v=w.viewport,P=r.content-r.viewport,k=Ut(p),T=Ut(c),N=ph(g,10);function R(I){if(_.current){const O=I.clientX-_.current.left,D=I.clientY-_.current.top;d({x:O,y:D})}}return h.useEffect(()=>{const I=O=>{const D=O.target;(x==null?void 0:x.contains(D))&&k(O,P)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[v,x,P,k]),h.useEffect(T,[r,T]),Cs(x,N),Cs(w.content,N),h.createElement(FR,{scope:n,scrollbar:x,hasThumb:o,onThumbChange:Ut(i),onThumbPointerUp:Ut(s),onThumbPositionChange:T,onThumbPointerDown:Ut(u)},h.createElement(Se.div,H({},S,{ref:E,style:{position:"absolute",...S.style},onPointerDown:we(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),_.current=x.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),R(I))}),onPointerMove:we(e.onPointerMove,R),onPointerUp:we(e.onPointerUp,I=>{const O=I.target;O.hasPointerCapture(I.pointerId)&&O.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=C.current,w.viewport&&(w.viewport.style.scrollBehavior=""),_.current=null})})))}),Jg="ScrollAreaThumb",zR=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=rw(Jg,e.__scopeScrollArea);return h.createElement(er,{present:n||o.hasThumb},h.createElement(jR,H({ref:t},r)))}),jR=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=tr(Jg,n),s=rw(Jg,n),{onThumbPositionChange:u}=s,c=Le(t,g=>s.onThumbChange(g)),d=h.useRef(),p=ph(()=>{d.current&&(d.current(),d.current=void 0)},100);return h.useEffect(()=>{const g=i.viewport;if(g){const S=()=>{if(p(),!d.current){const w=BR(g,u);d.current=w,u()}};return u(),g.addEventListener("scroll",S),()=>g.removeEventListener("scroll",S)}},[i.viewport,p,u]),h.createElement(Se.div,H({"data-state":s.hasThumb?"visible":"hidden"},o,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:we(e.onPointerDownCapture,g=>{const w=g.target.getBoundingClientRect(),x=g.clientX-w.left,y=g.clientY-w.top;s.onThumbPointerDown({x,y})}),onPointerUp:we(e.onPointerUp,s.onThumbPointerUp)}))}),iw="ScrollAreaCorner",UR=h.forwardRef((e,t)=>{const n=tr(iw,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?h.createElement(VR,H({},e,{ref:t})):null}),VR=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=tr(iw,n),[i,s]=h.useState(0),[u,c]=h.useState(0),d=!!(i&&u);return Cs(o.scrollbarX,()=>{var p;const g=((p=o.scrollbarX)===null||p===void 0?void 0:p.offsetHeight)||0;o.onCornerHeightChange(g),c(g)}),Cs(o.scrollbarY,()=>{var p;const g=((p=o.scrollbarY)===null||p===void 0?void 0:p.offsetWidth)||0;o.onCornerWidthChange(g),s(g)}),d?h.createElement(Se.div,H({},r,{ref:t,style:{width:i,height:u,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function kf(e){return e?parseInt(e,10):0}function aw(e,t){const n=e/t;return isNaN(n)?0:n}function hh(e){const t=aw(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function GR(e,t,n,r="ltr"){const o=hh(n),i=o/2,s=t||i,u=o-s,c=n.scrollbar.paddingStart+s,d=n.scrollbar.size-n.scrollbar.paddingEnd-u,p=n.content-n.viewport,g=r==="ltr"?[0,p]:[p*-1,0];return sw([c,d],g)(e)}function o6(e,t,n="ltr"){const r=hh(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,u=i-r,c=n==="ltr"?[0,s]:[s*-1,0],d=xu(e,c);return sw([0,s],[0,u])(d)}function sw(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 lw(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,u=n.top!==i.top;(s||u)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function ph(e,t){const n=Ut(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Cs(e,t){const n=Ut(t);Nn(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const uw=NR,HR=MR,WR=UR,Ds=h.forwardRef(({className:e,children:t,...n},r)=>M.jsxs(uw,{ref:r,className:ke("relative overflow-hidden",e),...n,children:[M.jsx(HR,{className:"h-full w-full rounded-[inherit]",children:t}),M.jsx(cw,{}),M.jsx(WR,{})]}));Ds.displayName=uw.displayName;const cw=h.forwardRef(({className:e,orientation:t="vertical",...n},r)=>M.jsx(tw,{ref:r,orientation:t,className:ke("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",e),...n,children:M.jsx(zR,{className:ke("relative rounded-full bg-border",t==="vertical"&&"flex-1")})}));cw.displayName=tw.displayName;const KR=()=>{const{codeRef:e,textareaRef:t,textareaValue:n,syncScroll:r,handleChangeText:o,handleCursorPosition:i,scrollHeight:s,handleClick:u}=kR(),c=" p-6 font-mono w-full text-base outline-none resize-none whitespace-break-spaces",d={height:s+"px"};return M.jsx(M.Fragment,{children:M.jsx(Ds,{onClick:u,className:"h-calc-100-186 flex flex-grow relative",children:M.jsxs("div",{className:"overflow-hidden relative pb-4",children:[M.jsx("textarea",{style:d,onChange:o,onScroll:r,spellCheck:!1,ref:t,rows:200,value:n,onClick:i,onKeyUp:i,className:`overflow-hidden z-20 relative caret-purple-700 bg-transparent text-transparent border-0 ${c} `}),M.jsx("div",{"aria-hidden":!0,ref:e,className:`absolute top-0 left-0 z-0 overflow-y-auto break-words ${c}`})]})})})},YR=h.forwardRef((e,t)=>h.createElement(Se.label,H({},e,{ref:t,onMouseDown:n=>{var r;(r=e.onMouseDown)===null||r===void 0||r.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault()}}))),dw=YR,i6=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,a6=H9,fw=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return a6(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(d=>{const p=n==null?void 0:n[d],g=i==null?void 0:i[d];if(p===null)return null;const S=i6(p)||i6(g);return o[d][S]}),u=n&&Object.entries(n).reduce((d,p)=>{let[g,S]=p;return S===void 0||(d[g]=S),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,p)=>{let{class:g,className:S,...w}=p;return Object.entries(w).every(x=>{let[y,E]=x;return Array.isArray(E)?E.includes({...i,...u}[y]):{...i,...u}[y]===E})?[...d,g,S]:d},[]);return a6(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},XR=fw("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Fo=h.forwardRef(({className:e,...t},n)=>M.jsx(dw,{ref:n,className:ke(XR(),e),...t}));Fo.displayName=dw.displayName;function jm(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Um(e){const[t,n]=h.useState(void 0);return Nn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,u;if("borderBoxSize"in i){const c=i.borderBoxSize,d=Array.isArray(c)?c[0]:c;s=d.inlineSize,u=d.blockSize}else s=e.offsetWidth,u=e.offsetHeight;n({width:s,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const hw=["PageUp","PageDown"],pw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],gw={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Bu="Slider",[ev,QR,qR]=ch(Bu),[vw,xB]=Jn(Bu,[qR]),[ZR,gh]=vw(Bu),JR=h.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:s="horizontal",disabled:u=!1,minStepsBetweenThumbs:c=0,defaultValue:d=[r],value:p,onValueChange:g=()=>{},onValueCommit:S=()=>{},inverted:w=!1,...x}=e,[y,E]=h.useState(null),_=Le(t,U=>E(U)),C=h.useRef(new Set),v=h.useRef(0),P=s==="horizontal",k=y?!!y.closest("form"):!0,T=P?eT:tT,[N=[],R]=xr({prop:p,defaultProp:d,onChange:U=>{var X;(X=[...C.current][v.current])===null||X===void 0||X.focus(),g(U)}}),I=h.useRef(N);function O(U){const X=cT(N,U);G(U,X)}function D(U){G(U,v.current)}function F(){const U=I.current[v.current];N[v.current]!==U&&S(N)}function G(U,X,{commit:Z}={commit:!1}){const oe=pT(i),Y=gT(Math.round((U-r)/i)*i+r,oe),z=xu(Y,[r,o]);R((B=[])=>{const q=lT(B,z,X);if(hT(q,c*i)){v.current=q.indexOf(z);const J=String(q)!==String(B);return J&&Z&&S(q),J?q:B}else return B})}return h.createElement(ZR,{scope:e.__scopeSlider,disabled:u,min:r,max:o,valueIndexToChangeRef:v,thumbs:C.current,values:N,orientation:s},h.createElement(ev.Provider,{scope:e.__scopeSlider},h.createElement(ev.Slot,{scope:e.__scopeSlider},h.createElement(T,H({"aria-disabled":u,"data-disabled":u?"":void 0},x,{ref:_,onPointerDown:we(x.onPointerDown,()=>{u||(I.current=N)}),min:r,max:o,inverted:w,onSlideStart:u?void 0:O,onSlideMove:u?void 0:D,onSlideEnd:u?void 0:F,onHomeKeyDown:()=>!u&&G(r,0,{commit:!0}),onEndKeyDown:()=>!u&&G(o,N.length-1,{commit:!0}),onStepKeyDown:({event:U,direction:X})=>{if(!u){const Y=hw.includes(U.key)||U.shiftKey&&pw.includes(U.key)?10:1,z=v.current,B=N[z],q=i*Y*X;G(B+q,z,{commit:!0})}}})))),k&&N.map((U,X)=>h.createElement(sT,{key:X,name:n?n+(N.length>1?"[]":""):void 0,value:U})))}),[mw,yw]=vw(Bu,{startEdge:"left",endEdge:"right",size:"width",direction:1}),eT=h.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:s,onSlideMove:u,onSlideEnd:c,onStepKeyDown:d,...p}=e,[g,S]=h.useState(null),w=Le(t,v=>S(v)),x=h.useRef(),y=Os(o),E=y==="ltr",_=E&&!i||!E&&i;function C(v){const P=x.current||g.getBoundingClientRect(),k=[0,P.width],N=Vm(k,_?[n,r]:[r,n]);return x.current=P,N(v-P.left)}return h.createElement(mw,{scope:e.__scopeSlider,startEdge:_?"left":"right",endEdge:_?"right":"left",direction:_?1:-1,size:"width"},h.createElement(ww,H({dir:y,"data-orientation":"horizontal"},p,{ref:w,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:v=>{const P=C(v.clientX);s==null||s(P)},onSlideMove:v=>{const P=C(v.clientX);u==null||u(P)},onSlideEnd:()=>{x.current=void 0,c==null||c()},onStepKeyDown:v=>{const k=gw[_?"from-left":"from-right"].includes(v.key);d==null||d({event:v,direction:k?-1:1})}})))}),tT=h.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:s,onSlideEnd:u,onStepKeyDown:c,...d}=e,p=h.useRef(null),g=Le(t,p),S=h.useRef(),w=!o;function x(y){const E=S.current||p.current.getBoundingClientRect(),_=[0,E.height],v=Vm(_,w?[r,n]:[n,r]);return S.current=E,v(y-E.top)}return h.createElement(mw,{scope:e.__scopeSlider,startEdge:w?"bottom":"top",endEdge:w?"top":"bottom",size:"height",direction:w?1:-1},h.createElement(ww,H({"data-orientation":"vertical"},d,{ref:g,style:{...d.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:y=>{const E=x(y.clientY);i==null||i(E)},onSlideMove:y=>{const E=x(y.clientY);s==null||s(E)},onSlideEnd:()=>{S.current=void 0,u==null||u()},onStepKeyDown:y=>{const _=gw[w?"from-bottom":"from-top"].includes(y.key);c==null||c({event:y,direction:_?-1:1})}})))}),ww=h.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:s,onEndKeyDown:u,onStepKeyDown:c,...d}=e,p=gh(Bu,n);return h.createElement(Se.span,H({},d,{ref:t,onKeyDown:we(e.onKeyDown,g=>{g.key==="Home"?(s(g),g.preventDefault()):g.key==="End"?(u(g),g.preventDefault()):hw.concat(pw).includes(g.key)&&(c(g),g.preventDefault())}),onPointerDown:we(e.onPointerDown,g=>{const S=g.target;S.setPointerCapture(g.pointerId),g.preventDefault(),p.thumbs.has(S)?S.focus():r(g)}),onPointerMove:we(e.onPointerMove,g=>{g.target.hasPointerCapture(g.pointerId)&&o(g)}),onPointerUp:we(e.onPointerUp,g=>{const S=g.target;S.hasPointerCapture(g.pointerId)&&(S.releasePointerCapture(g.pointerId),i(g))})}))}),nT="SliderTrack",rT=h.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=gh(nT,n);return h.createElement(Se.span,H({"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation},r,{ref:t}))}),s6="SliderRange",oT=h.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=gh(s6,n),i=yw(s6,n),s=h.useRef(null),u=Le(t,s),c=o.values.length,d=o.values.map(S=>Sw(S,o.min,o.max)),p=c>1?Math.min(...d):0,g=100-Math.max(...d);return h.createElement(Se.span,H({"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0},r,{ref:u,style:{...e.style,[i.startEdge]:p+"%",[i.endEdge]:g+"%"}}))}),l6="SliderThumb",iT=h.forwardRef((e,t)=>{const n=QR(e.__scopeSlider),[r,o]=h.useState(null),i=Le(t,u=>o(u)),s=h.useMemo(()=>r?n().findIndex(u=>u.ref.current===r):-1,[n,r]);return h.createElement(aT,H({},e,{ref:i,index:s}))}),aT=h.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,...o}=e,i=gh(l6,n),s=yw(l6,n),[u,c]=h.useState(null),d=Le(t,E=>c(E)),p=Um(u),g=i.values[r],S=g===void 0?0:Sw(g,i.min,i.max),w=uT(r,i.values.length),x=p==null?void 0:p[s.size],y=x?dT(x,S,s.direction):0;return h.useEffect(()=>{if(u)return i.thumbs.add(u),()=>{i.thumbs.delete(u)}},[u,i.thumbs]),h.createElement("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${S}% + ${y}px)`}},h.createElement(ev.ItemSlot,{scope:e.__scopeSlider},h.createElement(Se.span,H({role:"slider","aria-label":e["aria-label"]||w,"aria-valuemin":i.min,"aria-valuenow":g,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0},o,{ref:d,style:g===void 0?{display:"none"}:e.style,onFocus:we(e.onFocus,()=>{i.valueIndexToChangeRef.current=r})}))))}),sT=e=>{const{value:t,...n}=e,r=h.useRef(null),o=jm(t);return h.useEffect(()=>{const i=r.current,s=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(s,"value").set;if(o!==t&&c){const d=new Event("input",{bubbles:!0});c.call(i,t),i.dispatchEvent(d)}},[o,t]),h.createElement("input",H({style:{display:"none"}},n,{ref:r,defaultValue:t}))};function lT(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function Sw(e,t,n){const i=100/(n-t)*(e-t);return xu(i,[0,100])}function uT(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function cT(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function dT(e,t,n){const r=e/2,i=Vm([0,50],[0,r]);return(r-i(t)*n)*n}function fT(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function hT(e,t){if(t>0){const n=fT(e);return Math.min(...n)>=t}return!0}function Vm(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 pT(e){return(String(e).split(".")[1]||"").length}function gT(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}const xw=JR,vT=rT,mT=oT,yT=iT,zi=h.forwardRef(({className:e,...t},n)=>M.jsxs(xw,{ref:n,className:ke("relative flex w-full touch-none select-none items-center",e),...t,children:[M.jsx(vT,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:M.jsx(mT,{className:"absolute h-full bg-primary"})}),M.jsx(yT,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));zi.displayName=xw.displayName;const tv="horizontal",wT=["horizontal","vertical"],_w=h.forwardRef((e,t)=>{const{decorative:n,orientation:r=tv,...o}=e,i=Cw(r)?r:tv,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return h.createElement(Se.div,H({"data-orientation":i},u,o,{ref:t}))});_w.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!Cw(r)?new Error(ST(o,n)):null}};function ST(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of: + - horizontal + - vertical + +Defaulting to \`${tv}\`.`}function Cw(e){return wT.includes(e)}const bw=_w,cs=h.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>M.jsx(bw,{ref:o,decorative:n,orientation:t,className:ke("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));cs.displayName=bw.displayName;function xT(e,t=globalThis==null?void 0:globalThis.document){const n=Ut(e);h.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const nv="dismissableLayer.update",_T="dismissableLayer.pointerDownOutside",CT="dismissableLayer.focusOutside";let u6;const bT=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gm=h.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:u,onDismiss:c,...d}=e,p=h.useContext(bT),[g,S]=h.useState(null),w=(n=g==null?void 0:g.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,x]=h.useState({}),y=Le(t,R=>S(R)),E=Array.from(p.layers),[_]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),C=E.indexOf(_),v=g?E.indexOf(g):-1,P=p.layersWithOutsidePointerEventsDisabled.size>0,k=v>=C,T=ET(R=>{const I=R.target,O=[...p.branches].some(D=>D.contains(I));!k||O||(i==null||i(R),u==null||u(R),R.defaultPrevented||c==null||c())},w),N=PT(R=>{const I=R.target;[...p.branches].some(D=>D.contains(I))||(s==null||s(R),u==null||u(R),R.defaultPrevented||c==null||c())},w);return xT(R=>{v===p.layers.size-1&&(o==null||o(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},w),h.useEffect(()=>{if(g)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(u6=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),c6(),()=>{r&&p.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=u6)}},[g,w,r,p]),h.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),c6())},[g,p]),h.useEffect(()=>{const R=()=>x({});return document.addEventListener(nv,R),()=>document.removeEventListener(nv,R)},[]),h.createElement(Se.div,H({},d,{ref:y,style:{pointerEvents:P?k?"auto":"none":void 0,...e.style},onFocusCapture:we(e.onFocusCapture,N.onFocusCapture),onBlurCapture:we(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:we(e.onPointerDownCapture,T.onPointerDownCapture)}))});function ET(e,t=globalThis==null?void 0:globalThis.document){const n=Ut(e),r=h.useRef(!1),o=h.useRef(()=>{});return h.useEffect(()=>{const i=u=>{if(u.target&&!r.current){let p=function(){Ew(_T,n,d,{discrete:!0})};var c=p;const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=p,t.addEventListener("click",o.current,{once:!0})):p()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function PT(e,t=globalThis==null?void 0:globalThis.document){const n=Ut(e),r=h.useRef(!1);return h.useEffect(()=>{const o=i=>{i.target&&!r.current&&Ew(CT,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function c6(){const e=new CustomEvent(nv);document.dispatchEvent(e)}function Ew(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?sk(o,i):o.dispatchEvent(i)}let _p=0;function Bm(){h.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:d6()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:d6()),_p++,()=>{_p===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),_p--}},[])}function d6(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const Cp="focusScope.autoFocusOnMount",bp="focusScope.autoFocusOnUnmount",f6={bubbles:!1,cancelable:!0},Hm=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[u,c]=h.useState(null),d=Ut(o),p=Ut(i),g=h.useRef(null),S=Le(t,y=>c(y)),w=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let C=function(T){if(w.paused||!u)return;const N=T.target;u.contains(N)?g.current=N:zo(g.current,{select:!0})},v=function(T){if(w.paused||!u)return;const N=T.relatedTarget;N!==null&&(u.contains(N)||zo(g.current,{select:!0}))},P=function(T){if(document.activeElement===document.body)for(const R of T)R.removedNodes.length>0&&zo(u)};var y=C,E=v,_=P;document.addEventListener("focusin",C),document.addEventListener("focusout",v);const k=new MutationObserver(P);return u&&k.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",v),k.disconnect()}}},[r,u,w.paused]),h.useEffect(()=>{if(u){p6.add(w);const y=document.activeElement;if(!u.contains(y)){const _=new CustomEvent(Cp,f6);u.addEventListener(Cp,d),u.dispatchEvent(_),_.defaultPrevented||($T(AT(Pw(u)),{select:!0}),document.activeElement===y&&zo(u))}return()=>{u.removeEventListener(Cp,d),setTimeout(()=>{const _=new CustomEvent(bp,f6);u.addEventListener(bp,p),u.dispatchEvent(_),_.defaultPrevented||zo(y??document.body,{select:!0}),u.removeEventListener(bp,p),p6.remove(w)},0)}}},[u,d,p,w]);const x=h.useCallback(y=>{if(!n&&!r||w.paused)return;const E=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(E&&_){const C=y.currentTarget,[v,P]=kT(C);v&&P?!y.shiftKey&&_===P?(y.preventDefault(),n&&zo(v,{select:!0})):y.shiftKey&&_===v&&(y.preventDefault(),n&&zo(P,{select:!0})):_===C&&y.preventDefault()}},[n,r,w.paused]);return h.createElement(Se.div,H({tabIndex:-1},s,{ref:S,onKeyDown:x}))});function $T(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zo(r,{select:t}),document.activeElement!==n)return}function kT(e){const t=Pw(e),n=h6(t,e),r=h6(t.reverse(),e);return[n,r]}function Pw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function h6(e,t){for(const n of e)if(!RT(n,{upTo:t}))return n}function RT(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function TT(e){return e instanceof HTMLInputElement&&"select"in e}function zo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&TT(e)&&t&&e.select()}}const p6=NT();function NT(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=g6(e,t),e.unshift(t)},remove(t){var n;e=g6(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function g6(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function AT(e){return e.filter(t=>t.tagName!=="A")}const MT=["top","right","bottom","left"],ci=Math.min,En=Math.max,Rf=Math.round,yd=Math.floor,di=e=>({x:e,y:e}),OT={left:"right",right:"left",bottom:"top",top:"bottom"},IT={start:"end",end:"start"};function rv(e,t,n){return En(e,ci(t,n))}function fo(e,t){return typeof e=="function"?e(t):e}function ho(e){return e.split("-")[0]}function Ls(e){return e.split("-")[1]}function Wm(e){return e==="x"?"y":"x"}function Km(e){return e==="y"?"height":"width"}function Fs(e){return["top","bottom"].includes(ho(e))?"y":"x"}function Ym(e){return Wm(Fs(e))}function DT(e,t,n){n===void 0&&(n=!1);const r=Ls(e),o=Ym(e),i=Km(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Tf(s)),[s,Tf(s)]}function LT(e){const t=Tf(e);return[ov(e),t,ov(t)]}function ov(e){return e.replace(/start|end/g,t=>IT[t])}function FT(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function zT(e,t,n,r){const o=Ls(e);let i=FT(ho(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ov)))),i}function Tf(e){return e.replace(/left|right|bottom|top/g,t=>OT[t])}function jT(e){return{top:0,right:0,bottom:0,left:0,...e}}function $w(e){return typeof e!="number"?jT(e):{top:e,right:e,bottom:e,left:e}}function Nf(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function v6(e,t,n){let{reference:r,floating:o}=e;const i=Fs(t),s=Ym(t),u=Km(s),c=ho(t),d=i==="y",p=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,S=r[u]/2-o[u]/2;let w;switch(c){case"top":w={x:p,y:r.y-o.height};break;case"bottom":w={x:p,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:g};break;case"left":w={x:r.x-o.width,y:g};break;default:w={x:r.x,y:r.y}}switch(Ls(t)){case"start":w[s]-=S*(n&&d?-1:1);break;case"end":w[s]+=S*(n&&d?-1:1);break}return w}const UT=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,u=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:g}=v6(d,r,c),S=r,w={},x=0;for(let y=0;y({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:u,middlewareData:c}=t,{element:d,padding:p=0}=fo(e,t)||{};if(d==null)return{};const g=$w(p),S={x:n,y:r},w=Ym(o),x=Km(w),y=await s.getDimensions(d),E=w==="y",_=E?"top":"left",C=E?"bottom":"right",v=E?"clientHeight":"clientWidth",P=i.reference[x]+i.reference[w]-S[w]-i.floating[x],k=S[w]-i.reference[w],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let N=T?T[v]:0;(!N||!await(s.isElement==null?void 0:s.isElement(T)))&&(N=u.floating[v]||i.floating[x]);const R=P/2-k/2,I=N/2-y[x]/2-1,O=ci(g[_],I),D=ci(g[C],I),F=O,G=N-y[x]-D,U=N/2-y[x]/2+R,X=rv(F,U,G),Z=!c.arrow&&Ls(o)!=null&&U!=X&&i.reference[x]/2-(UF<=0)){var I,O;const F=(((I=i.flip)==null?void 0:I.index)||0)+1,G=k[F];if(G)return{data:{index:F,overflows:R},reset:{placement:G}};let U=(O=R.filter(X=>X.overflows[0]<=0).sort((X,Z)=>X.overflows[1]-Z.overflows[1])[0])==null?void 0:O.placement;if(!U)switch(w){case"bestFit":{var D;const X=(D=R.map(Z=>[Z.placement,Z.overflows.filter(oe=>oe>0).reduce((oe,Y)=>oe+Y,0)]).sort((Z,oe)=>Z[1]-oe[1])[0])==null?void 0:D[0];X&&(U=X);break}case"initialPlacement":U=u;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function y6(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function w6(e){return MT.some(t=>e[t]>=0)}const GT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=fo(e,t);switch(r){case"referenceHidden":{const i=await _u(t,{...o,elementContext:"reference"}),s=y6(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:w6(s)}}}case"escaped":{const i=await _u(t,{...o,altBoundary:!0}),s=y6(i,n.floating);return{data:{escapedOffsets:s,escaped:w6(s)}}}default:return{}}}}};async function BT(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ho(n),u=Ls(n),c=Fs(n)==="y",d=["left","top"].includes(s)?-1:1,p=i&&c?-1:1,g=fo(t,e);let{mainAxis:S,crossAxis:w,alignmentAxis:x}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return u&&typeof x=="number"&&(w=u==="end"?x*-1:x),c?{x:w*p,y:S*d}:{x:S*d,y:w*p}}const HT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await BT(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},WT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:u={fn:E=>{let{x:_,y:C}=E;return{x:_,y:C}}},...c}=fo(e,t),d={x:n,y:r},p=await _u(t,c),g=Fs(ho(o)),S=Wm(g);let w=d[S],x=d[g];if(i){const E=S==="y"?"top":"left",_=S==="y"?"bottom":"right",C=w+p[E],v=w-p[_];w=rv(C,w,v)}if(s){const E=g==="y"?"top":"left",_=g==="y"?"bottom":"right",C=x+p[E],v=x-p[_];x=rv(C,x,v)}const y=u.fn({...t,[S]:w,[g]:x});return{...y,data:{x:y.x-n,y:y.y-r}}}}},KT=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:u=0,mainAxis:c=!0,crossAxis:d=!0}=fo(e,t),p={x:n,y:r},g=Fs(o),S=Wm(g);let w=p[S],x=p[g];const y=fo(u,t),E=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const v=S==="y"?"height":"width",P=i.reference[S]-i.floating[v]+E.mainAxis,k=i.reference[S]+i.reference[v]-E.mainAxis;wk&&(w=k)}if(d){var _,C;const v=S==="y"?"width":"height",P=["top","left"].includes(ho(o)),k=i.reference[g]-i.floating[v]+(P&&((_=s.offset)==null?void 0:_[g])||0)+(P?0:E.crossAxis),T=i.reference[g]+i.reference[v]+(P?0:((C=s.offset)==null?void 0:C[g])||0)-(P?E.crossAxis:0);xT&&(x=T)}return{[S]:w,[g]:x}}}},YT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...u}=fo(e,t),c=await _u(t,u),d=ho(n),p=Ls(n),g=Fs(n)==="y",{width:S,height:w}=r.floating;let x,y;d==="top"||d==="bottom"?(x=d,y=p===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=d,x=p==="end"?"top":"bottom");const E=w-c[x],_=S-c[y],C=!t.middlewareData.shift;let v=E,P=_;if(g){const T=S-c.left-c.right;P=p||C?ci(_,T):T}else{const T=w-c.top-c.bottom;v=p||C?ci(E,T):T}if(C&&!p){const T=En(c.left,0),N=En(c.right,0),R=En(c.top,0),I=En(c.bottom,0);g?P=S-2*(T!==0||N!==0?T+N:En(c.left,c.right)):v=w-2*(R!==0||I!==0?R+I:En(c.top,c.bottom))}await s({...t,availableWidth:P,availableHeight:v});const k=await o.getDimensions(i.floating);return S!==k.width||w!==k.height?{reset:{rects:!0}}:{}}}};function fi(e){return kw(e)?(e.nodeName||"").toLowerCase():"#document"}function Rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wo(e){var t;return(t=(kw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kw(e){return e instanceof Node||e instanceof Rn(e).Node}function po(e){return e instanceof Element||e instanceof Rn(e).Element}function Ur(e){return e instanceof HTMLElement||e instanceof Rn(e).HTMLElement}function S6(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rn(e).ShadowRoot}function Hu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function XT(e){return["table","td","th"].includes(fi(e))}function Xm(e){const t=Qm(),n=Zn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function QT(e){let t=bs(e);for(;Ur(t)&&!vh(t);){if(Xm(t))return t;t=bs(t)}return null}function Qm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function vh(e){return["html","body","#document"].includes(fi(e))}function Zn(e){return Rn(e).getComputedStyle(e)}function mh(e){return po(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function bs(e){if(fi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||S6(e)&&e.host||wo(e);return S6(t)?t.host:t}function Rw(e){const t=bs(e);return vh(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ur(t)&&Hu(t)?t:Rw(t)}function Cu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Rw(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Rn(o);return i?t.concat(s,s.visualViewport||[],Hu(o)?o:[],s.frameElement&&n?Cu(s.frameElement):[]):t.concat(o,Cu(o,[],n))}function Tw(e){const t=Zn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ur(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,u=Rf(n)!==i||Rf(r)!==s;return u&&(n=i,r=s),{width:n,height:r,$:u}}function qm(e){return po(e)?e:e.contextElement}function ds(e){const t=qm(e);if(!Ur(t))return di(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Tw(t);let s=(i?Rf(n.width):n.width)/r,u=(i?Rf(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const qT=di(0);function Nw(e){const t=Rn(e);return!Qm()||!t.visualViewport?qT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ZT(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rn(e)?!1:t}function Ji(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=qm(e);let s=di(1);t&&(r?po(r)&&(s=ds(r)):s=ds(e));const u=ZT(i,n,r)?Nw(i):di(0);let c=(o.left+u.x)/s.x,d=(o.top+u.y)/s.y,p=o.width/s.x,g=o.height/s.y;if(i){const S=Rn(i),w=r&&po(r)?Rn(r):r;let x=S.frameElement;for(;x&&r&&w!==S;){const y=ds(x),E=x.getBoundingClientRect(),_=Zn(x),C=E.left+(x.clientLeft+parseFloat(_.paddingLeft))*y.x,v=E.top+(x.clientTop+parseFloat(_.paddingTop))*y.y;c*=y.x,d*=y.y,p*=y.x,g*=y.y,c+=C,d+=v,x=Rn(x).frameElement}}return Nf({width:p,height:g,x:c,y:d})}function JT(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Ur(n),i=wo(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},u=di(1);const c=di(0);if((o||!o&&r!=="fixed")&&((fi(n)!=="body"||Hu(i))&&(s=mh(n)),Ur(n))){const d=Ji(n);u=ds(n),c.x=d.x+n.clientLeft,c.y=d.y+n.clientTop}return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-s.scrollLeft*u.x+c.x,y:t.y*u.y-s.scrollTop*u.y+c.y}}function eN(e){return Array.from(e.getClientRects())}function Aw(e){return Ji(wo(e)).left+mh(e).scrollLeft}function tN(e){const t=wo(e),n=mh(e),r=e.ownerDocument.body,o=En(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=En(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Aw(e);const u=-n.scrollTop;return Zn(r).direction==="rtl"&&(s+=En(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:u}}function nN(e,t){const n=Rn(e),r=wo(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,u=0,c=0;if(o){i=o.width,s=o.height;const d=Qm();(!d||d&&t==="fixed")&&(u=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:u,y:c}}function rN(e,t){const n=Ji(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ur(e)?ds(e):di(1),s=e.clientWidth*i.x,u=e.clientHeight*i.y,c=o*i.x,d=r*i.y;return{width:s,height:u,x:c,y:d}}function x6(e,t,n){let r;if(t==="viewport")r=nN(e,n);else if(t==="document")r=tN(wo(e));else if(po(t))r=rN(t,n);else{const o=Nw(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Nf(r)}function Mw(e,t){const n=bs(e);return n===t||!po(n)||vh(n)?!1:Zn(n).position==="fixed"||Mw(n,t)}function oN(e,t){const n=t.get(e);if(n)return n;let r=Cu(e,[],!1).filter(u=>po(u)&&fi(u)!=="body"),o=null;const i=Zn(e).position==="fixed";let s=i?bs(e):e;for(;po(s)&&!vh(s);){const u=Zn(s),c=Xm(s);!c&&u.position==="fixed"&&(o=null),(i?!c&&!o:!c&&u.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Hu(s)&&!c&&Mw(e,s))?r=r.filter(p=>p!==s):o=u,s=bs(s)}return t.set(e,r),r}function iN(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?oN(t,this._c):[].concat(n),r],u=s[0],c=s.reduce((d,p)=>{const g=x6(t,p,o);return d.top=En(g.top,d.top),d.right=ci(g.right,d.right),d.bottom=ci(g.bottom,d.bottom),d.left=En(g.left,d.left),d},x6(t,u,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function aN(e){return Tw(e)}function sN(e,t,n){const r=Ur(t),o=wo(t),i=n==="fixed",s=Ji(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const c=di(0);if(r||!r&&!i)if((fi(t)!=="body"||Hu(o))&&(u=mh(t)),r){const d=Ji(t,!0,i,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else o&&(c.x=Aw(o));return{x:s.left+u.scrollLeft-c.x,y:s.top+u.scrollTop-c.y,width:s.width,height:s.height}}function _6(e,t){return!Ur(e)||Zn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ow(e,t){const n=Rn(e);if(!Ur(e))return n;let r=_6(e,t);for(;r&&XT(r)&&Zn(r).position==="static";)r=_6(r,t);return r&&(fi(r)==="html"||fi(r)==="body"&&Zn(r).position==="static"&&!Xm(r))?n:r||QT(e)||n}const lN=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Ow,i=this.getDimensions;return{reference:sN(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function uN(e){return Zn(e).direction==="rtl"}const cN={convertOffsetParentRelativeRectToViewportRelativeRect:JT,getDocumentElement:wo,getClippingRect:iN,getOffsetParent:Ow,getElementRects:lN,getClientRects:eN,getDimensions:aN,getScale:ds,isElement:po,isRTL:uN};function dN(e,t){let n=null,r;const o=wo(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function s(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),i();const{left:d,top:p,width:g,height:S}=e.getBoundingClientRect();if(u||t(),!g||!S)return;const w=yd(p),x=yd(o.clientWidth-(d+g)),y=yd(o.clientHeight-(p+S)),E=yd(d),C={rootMargin:-w+"px "+-x+"px "+-y+"px "+-E+"px",threshold:En(0,ci(1,c))||1};let v=!0;function P(k){const T=k[0].intersectionRatio;if(T!==c){if(!v)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(P,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,C)}n.observe(e)}return s(!0),i}function fN(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=qm(e),p=o||i?[...d?Cu(d):[],...Cu(t)]:[];p.forEach(_=>{o&&_.addEventListener("scroll",n,{passive:!0}),i&&_.addEventListener("resize",n)});const g=d&&u?dN(d,n):null;let S=-1,w=null;s&&(w=new ResizeObserver(_=>{let[C]=_;C&&C.target===d&&w&&(w.unobserve(t),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{w&&w.observe(t)})),n()}),d&&!c&&w.observe(d),w.observe(t));let x,y=c?Ji(e):null;c&&E();function E(){const _=Ji(e);y&&(_.x!==y.x||_.y!==y.y||_.width!==y.width||_.height!==y.height)&&n(),y=_,x=requestAnimationFrame(E)}return n(),()=>{p.forEach(_=>{o&&_.removeEventListener("scroll",n),i&&_.removeEventListener("resize",n)}),g&&g(),w&&w.disconnect(),w=null,c&&cancelAnimationFrame(x)}}const hN=(e,t,n)=>{const r=new Map,o={platform:cN,...n},i={...o.platform,_c:r};return UT(e,t,{...o,platform:i})},pN=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?m6({element:r.current,padding:o}).fn(n):{}:r?m6({element:r,padding:o}).fn(n):{}}}};var Zd=typeof document<"u"?h.useLayoutEffect:h.useEffect;function Af(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Af(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;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Af(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Iw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function C6(e,t){const n=Iw(e);return Math.round(t*n)/n}function b6(e){const t=h.useRef(e);return Zd(()=>{t.current=e}),t}function gN(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:u=!0,whileElementsMounted:c,open:d}=e,[p,g]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[S,w]=h.useState(r);Af(S,r)||w(r);const[x,y]=h.useState(null),[E,_]=h.useState(null),C=h.useCallback(Z=>{Z!=T.current&&(T.current=Z,y(Z))},[y]),v=h.useCallback(Z=>{Z!==N.current&&(N.current=Z,_(Z))},[_]),P=i||x,k=s||E,T=h.useRef(null),N=h.useRef(null),R=h.useRef(p),I=b6(c),O=b6(o),D=h.useCallback(()=>{if(!T.current||!N.current)return;const Z={placement:t,strategy:n,middleware:S};O.current&&(Z.platform=O.current),hN(T.current,N.current,Z).then(oe=>{const Y={...oe,isPositioned:!0};F.current&&!Af(R.current,Y)&&(R.current=Y,mo.flushSync(()=>{g(Y)}))})},[S,t,n,O]);Zd(()=>{d===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,g(Z=>({...Z,isPositioned:!1})))},[d]);const F=h.useRef(!1);Zd(()=>(F.current=!0,()=>{F.current=!1}),[]),Zd(()=>{if(P&&(T.current=P),k&&(N.current=k),P&&k){if(I.current)return I.current(P,k,D);D()}},[P,k,D,I]);const G=h.useMemo(()=>({reference:T,floating:N,setReference:C,setFloating:v}),[C,v]),U=h.useMemo(()=>({reference:P,floating:k}),[P,k]),X=h.useMemo(()=>{const Z={position:n,left:0,top:0};if(!U.floating)return Z;const oe=C6(U.floating,p.x),Y=C6(U.floating,p.y);return u?{...Z,transform:"translate("+oe+"px, "+Y+"px)",...Iw(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:Y}},[n,u,U.floating,p.x,p.y]);return h.useMemo(()=>({...p,update:D,refs:G,elements:U,floatingStyles:X}),[p,D,G,U,X])}const Dw="Popper",[Lw,yh]=Jn(Dw),[vN,Fw]=Lw(Dw),mN=e=>{const{__scopePopper:t,children:n}=e,[r,o]=h.useState(null);return h.createElement(vN,{scope:t,anchor:r,onAnchorChange:o},n)},yN="PopperAnchor",wN=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Fw(yN,n),s=h.useRef(null),u=Le(t,s);return h.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:h.createElement(Se.div,H({},o,{ref:u}))}),zw="PopperContent",[SN,_B]=Lw(zw),xN=h.forwardRef((e,t)=>{var n,r,o,i,s,u,c,d;const{__scopePopper:p,side:g="bottom",sideOffset:S=0,align:w="center",alignOffset:x=0,arrowPadding:y=0,avoidCollisions:E=!0,collisionBoundary:_=[],collisionPadding:C=0,sticky:v="partial",hideWhenDetached:P=!1,updatePositionStrategy:k="optimized",onPlaced:T,...N}=e,R=Fw(zw,p),[I,O]=h.useState(null),D=Le(t,Ae=>O(Ae)),[F,G]=h.useState(null),U=Um(F),X=(n=U==null?void 0:U.width)!==null&&n!==void 0?n:0,Z=(r=U==null?void 0:U.height)!==null&&r!==void 0?r:0,oe=g+(w!=="center"?"-"+w:""),Y=typeof C=="number"?C:{top:0,right:0,bottom:0,left:0,...C},z=Array.isArray(_)?_:[_],B=z.length>0,q={padding:Y,boundary:z.filter(_N),altBoundary:B},{refs:J,floatingStyles:ae,placement:pe,isPositioned:Fe,middlewareData:Pe}=gN({strategy:"fixed",placement:oe,whileElementsMounted:(...Ae)=>fN(...Ae,{animationFrame:k==="always"}),elements:{reference:R.anchor},middleware:[HT({mainAxis:S+Z,alignmentAxis:x}),E&&WT({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?KT():void 0,...q}),E&&VT({...q}),YT({...q,apply:({elements:Ae,rects:tn,availableWidth:Dt,availableHeight:br})=>{const{width:T0,height:bi}=tn.reference,ya=Ae.floating.style;ya.setProperty("--radix-popper-available-width",`${Dt}px`),ya.setProperty("--radix-popper-available-height",`${br}px`),ya.setProperty("--radix-popper-anchor-width",`${T0}px`),ya.setProperty("--radix-popper-anchor-height",`${bi}px`)}}),F&&pN({element:F,padding:y}),CN({arrowWidth:X,arrowHeight:Z}),P&>({strategy:"referenceHidden",...q})]}),[L,ee]=jw(pe),se=Ut(T);Nn(()=>{Fe&&(se==null||se())},[Fe,se]);const ve=(o=Pe.arrow)===null||o===void 0?void 0:o.x,le=(i=Pe.arrow)===null||i===void 0?void 0:i.y,me=((s=Pe.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[$e,rt]=h.useState();return Nn(()=>{I&&rt(window.getComputedStyle(I).zIndex)},[I]),h.createElement("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:Fe?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:$e,"--radix-popper-transform-origin":[(u=Pe.transformOrigin)===null||u===void 0?void 0:u.x,(c=Pe.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},h.createElement(SN,{scope:p,placedSide:L,onArrowChange:G,arrowX:ve,arrowY:le,shouldHideArrow:me},h.createElement(Se.div,H({"data-side":L,"data-align":ee},N,{ref:D,style:{...N.style,animation:Fe?void 0:"none",opacity:(d=Pe.hide)!==null&&d!==void 0&&d.referenceHidden?0:void 0}}))))});function _N(e){return e!==null}const CN=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,s;const{placement:u,rects:c,middlewareData:d}=t,g=((n=d.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,S=g?0:e.arrowWidth,w=g?0:e.arrowHeight,[x,y]=jw(u),E={start:"0%",center:"50%",end:"100%"}[y],_=((r=(o=d.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+S/2,C=((i=(s=d.arrow)===null||s===void 0?void 0:s.y)!==null&&i!==void 0?i:0)+w/2;let v="",P="";return x==="bottom"?(v=g?E:`${_}px`,P=`${-w}px`):x==="top"?(v=g?E:`${_}px`,P=`${c.floating.height+w}px`):x==="right"?(v=`${-w}px`,P=g?E:`${C}px`):x==="left"&&(v=`${c.floating.width+w}px`,P=g?E:`${C}px`),{data:{x:v,y:P}}}});function jw(e){const[t,n="center"]=e.split("-");return[t,n]}const Uw=mN,Vw=wN,Gw=xN,Zm=h.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?$9.createPortal(h.createElement(Se.div,H({},o,{ref:t})),r):null}),bN=h.forwardRef((e,t)=>h.createElement(Se.span,H({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));var EN=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Oa=new WeakMap,wd=new WeakMap,Sd={},Ep=0,Bw=function(e){return e&&(e.host||Bw(e.parentNode))},PN=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Bw(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},$N=function(e,t,n,r){var o=PN(t,Array.isArray(e)?e:[e]);Sd[n]||(Sd[n]=new WeakMap);var i=Sd[n],s=[],u=new Set,c=new Set(o),d=function(g){!g||u.has(g)||(u.add(g),d(g.parentNode))};o.forEach(d);var p=function(g){!g||c.has(g)||Array.prototype.forEach.call(g.children,function(S){if(u.has(S))p(S);else{var w=S.getAttribute(r),x=w!==null&&w!=="false",y=(Oa.get(S)||0)+1,E=(i.get(S)||0)+1;Oa.set(S,y),i.set(S,E),s.push(S),y===1&&x&&wd.set(S,!0),E===1&&S.setAttribute(n,"true"),x||S.setAttribute(r,"true")}})};return p(t),u.clear(),Ep++,function(){s.forEach(function(g){var S=Oa.get(g)-1,w=i.get(g)-1;Oa.set(g,S),i.set(g,w),S||(wd.has(g)||g.removeAttribute(r),wd.delete(g)),w||g.removeAttribute(n)}),Ep--,Ep||(Oa=new WeakMap,Oa=new WeakMap,wd=new WeakMap,Sd={})}},wh=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||EN(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),$N(r,o,n,"aria-hidden")):function(){return null}},Jt=function(){return Jt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return jN;var t=UN(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])}},GN=e2(),BN=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,u=e.gap;return n===void 0&&(n="margin"),` + .`.concat(kN,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(u,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(o,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(s,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(u,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(Ql,` { + right: `).concat(u,"px ").concat(r,`; + } + + .`).concat(ql,` { + margin-right: `).concat(u,"px ").concat(r,`; + } + + .`).concat(Ql," .").concat(Ql,` { + right: 0 `).concat(r,`; + } + + .`).concat(ql," .").concat(ql,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(RN,": ").concat(u,`px; + } +`)},qw=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=h.useMemo(function(){return VN(o)},[o]);return h.createElement(GN,{styles:BN(i,!t,o,n?"":"!important")})},iv=!1;if(typeof window<"u")try{var xd=Object.defineProperty({},"passive",{get:function(){return iv=!0,!0}});window.addEventListener("test",xd,xd),window.removeEventListener("test",xd,xd)}catch{iv=!1}var Ia=iv?{passive:!1}:!1,HN=function(e){return e.tagName==="TEXTAREA"},Zw=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!HN(e)&&n[t]==="visible")},WN=function(e){return Zw(e,"overflowY")},KN=function(e){return Zw(e,"overflowX")},P6=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=Jw(e,n);if(r){var o=eS(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},YN=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},XN=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Jw=function(e,t){return e==="v"?WN(t):KN(t)},eS=function(e,t){return e==="v"?YN(t):XN(t)},QN=function(e,t){return e==="h"&&t==="rtl"?-1:1},qN=function(e,t,n,r,o){var i=QN(e,window.getComputedStyle(t).direction),s=i*r,u=n.target,c=t.contains(u),d=!1,p=s>0,g=0,S=0;do{var w=eS(e,u),x=w[0],y=w[1],E=w[2],_=y-E-i*x;(x||_)&&Jw(e,u)&&(g+=_,S+=x),u=u.parentNode}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return(p&&(o&&g===0||!o&&s>g)||!p&&(o&&S===0||!o&&-s>S))&&(d=!0),d},_d=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$6=function(e){return[e.deltaX,e.deltaY]},k6=function(e){return e&&"current"in e?e.current:e},ZN=function(e,t){return e[0]===t[0]&&e[1]===t[1]},JN=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},eA=0,Da=[];function tA(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),o=h.useState(eA++)[0],i=h.useState(function(){return e2()})[0],s=h.useRef(e);h.useEffect(function(){s.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=Hw([e.lockRef.current],(e.shards||[]).map(k6),!0).filter(Boolean);return y.forEach(function(E){return E.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=h.useCallback(function(y,E){if("touches"in y&&y.touches.length===2)return!s.current.allowPinchZoom;var _=_d(y),C=n.current,v="deltaX"in y?y.deltaX:C[0]-_[0],P="deltaY"in y?y.deltaY:C[1]-_[1],k,T=y.target,N=Math.abs(v)>Math.abs(P)?"h":"v";if("touches"in y&&N==="h"&&T.type==="range")return!1;var R=P6(N,T);if(!R)return!0;if(R?k=N:(k=N==="v"?"h":"v",R=P6(N,T)),!R)return!1;if(!r.current&&"changedTouches"in y&&(v||P)&&(r.current=k),!k)return!0;var I=r.current||k;return qN(I,E,y,I==="h"?v:P,!0)},[]),c=h.useCallback(function(y){var E=y;if(!(!Da.length||Da[Da.length-1]!==i)){var _="deltaY"in E?$6(E):_d(E),C=t.current.filter(function(k){return k.name===E.type&&k.target===E.target&&ZN(k.delta,_)})[0];if(C&&C.should){E.cancelable&&E.preventDefault();return}if(!C){var v=(s.current.shards||[]).map(k6).filter(Boolean).filter(function(k){return k.contains(E.target)}),P=v.length>0?u(E,v[0]):!s.current.noIsolation;P&&E.cancelable&&E.preventDefault()}}},[]),d=h.useCallback(function(y,E,_,C){var v={name:y,delta:E,target:_,should:C};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(P){return P!==v})},1)},[]),p=h.useCallback(function(y){n.current=_d(y),r.current=void 0},[]),g=h.useCallback(function(y){d(y.type,$6(y),y.target,u(y,e.lockRef.current))},[]),S=h.useCallback(function(y){d(y.type,_d(y),y.target,u(y,e.lockRef.current))},[]);h.useEffect(function(){return Da.push(i),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:S}),document.addEventListener("wheel",c,Ia),document.addEventListener("touchmove",c,Ia),document.addEventListener("touchstart",p,Ia),function(){Da=Da.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Ia),document.removeEventListener("touchmove",c,Ia),document.removeEventListener("touchstart",p,Ia)}},[]);var w=e.removeScrollBar,x=e.inert;return h.createElement(h.Fragment,null,x?h.createElement(i,{styles:JN(o)}):null,w?h.createElement(qw,{gapMode:"margin"}):null)}const nA=Xw(Qw,tA);var tS=h.forwardRef(function(e,t){return h.createElement(Sh,Jt({},e,{ref:t,sideCar:nA}))});tS.classNames=Sh.classNames;const t2=tS,rA=[" ","Enter","ArrowUp","ArrowDown"],oA=[" ","Enter"],xh="Select",[_h,n2,iA]=ch(xh),[zs,CB]=Jn(xh,[iA,yh]),r2=yh(),[aA,sa]=zs(xh),[sA,lA]=zs(xh),uA=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:u,onValueChange:c,dir:d,name:p,autoComplete:g,disabled:S,required:w}=e,x=r2(t),[y,E]=h.useState(null),[_,C]=h.useState(null),[v,P]=h.useState(!1),k=Os(d),[T=!1,N]=xr({prop:r,defaultProp:o,onChange:i}),[R,I]=xr({prop:s,defaultProp:u,onChange:c}),O=h.useRef(null),D=y?!!y.closest("form"):!0,[F,G]=h.useState(new Set),U=Array.from(F).map(X=>X.props.value).join(";");return h.createElement(Uw,x,h.createElement(aA,{required:w,scope:t,trigger:y,onTriggerChange:E,valueNode:_,onValueNodeChange:C,valueNodeHasChildren:v,onValueNodeHasChildrenChange:P,contentId:jr(),value:R,onValueChange:I,open:T,onOpenChange:N,dir:k,triggerPointerDownPosRef:O,disabled:S},h.createElement(_h.Provider,{scope:t},h.createElement(sA,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(X=>{G(Z=>new Set(Z).add(X))},[]),onNativeOptionRemove:h.useCallback(X=>{G(Z=>{const oe=new Set(Z);return oe.delete(X),oe})},[])},n)),D?h.createElement(iS,{key:U,"aria-hidden":!0,required:w,tabIndex:-1,name:p,autoComplete:g,value:R,onChange:X=>I(X.target.value),disabled:S},R===void 0?h.createElement("option",{value:""}):null,Array.from(F)):null))},cA="SelectTrigger",dA=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=r2(n),s=sa(cA,n),u=s.disabled||r,c=Le(t,s.onTriggerChange),d=n2(n),[p,g,S]=aS(x=>{const y=d().filter(C=>!C.disabled),E=y.find(C=>C.value===s.value),_=sS(y,x,E);_!==void 0&&s.onValueChange(_.value)}),w=()=>{u||(s.onOpenChange(!0),S())};return h.createElement(Vw,H({asChild:!0},i),h.createElement(Se.button,H({type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":oS(s.value)?"":void 0},o,{ref:c,onClick:we(o.onClick,x=>{x.currentTarget.focus()}),onPointerDown:we(o.onPointerDown,x=>{const y=x.target;y.hasPointerCapture(x.pointerId)&&y.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(w(),s.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:we(o.onKeyDown,x=>{const y=p.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&g(x.key),!(y&&x.key===" ")&&rA.includes(x.key)&&(w(),x.preventDefault())})})))}),fA="SelectValue",hA=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...u}=e,c=sa(fA,n),{onValueNodeHasChildrenChange:d}=c,p=i!==void 0,g=Le(t,c.onValueNodeChange);return Nn(()=>{d(p)},[d,p]),h.createElement(Se.span,H({},u,{ref:g,style:{pointerEvents:"none"}}),oS(c.value)?h.createElement(h.Fragment,null,s):i)}),pA=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.createElement(Se.span,H({"aria-hidden":!0},o,{ref:t}),r||"▼")}),gA=e=>h.createElement(Zm,H({asChild:!0},e)),Es="SelectContent",vA=h.forwardRef((e,t)=>{const n=sa(Es,e.__scopeSelect),[r,o]=h.useState();if(Nn(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?mo.createPortal(h.createElement(nS,{scope:e.__scopeSelect},h.createElement(_h.Slot,{scope:e.__scopeSelect},h.createElement("div",null,e.children))),i):null}return h.createElement(mA,H({},e,{ref:t}))}),eo=10,[nS,Ch]=zs(Es),mA=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:u,sideOffset:c,align:d,alignOffset:p,arrowPadding:g,collisionBoundary:S,collisionPadding:w,sticky:x,hideWhenDetached:y,avoidCollisions:E,..._}=e,C=sa(Es,n),[v,P]=h.useState(null),[k,T]=h.useState(null),N=Le(t,L=>P(L)),[R,I]=h.useState(null),[O,D]=h.useState(null),F=n2(n),[G,U]=h.useState(!1),X=h.useRef(!1);h.useEffect(()=>{if(v)return wh(v)},[v]),Bm();const Z=h.useCallback(L=>{const[ee,...se]=F().map(me=>me.ref.current),[ve]=se.slice(-1),le=document.activeElement;for(const me of L)if(me===le||(me==null||me.scrollIntoView({block:"nearest"}),me===ee&&k&&(k.scrollTop=0),me===ve&&k&&(k.scrollTop=k.scrollHeight),me==null||me.focus(),document.activeElement!==le))return},[F,k]),oe=h.useCallback(()=>Z([R,v]),[Z,R,v]);h.useEffect(()=>{G&&oe()},[G,oe]);const{onOpenChange:Y,triggerPointerDownPosRef:z}=C;h.useEffect(()=>{if(v){let L={x:0,y:0};const ee=ve=>{var le,me,$e,rt;L={x:Math.abs(Math.round(ve.pageX)-((le=(me=z.current)===null||me===void 0?void 0:me.x)!==null&&le!==void 0?le:0)),y:Math.abs(Math.round(ve.pageY)-(($e=(rt=z.current)===null||rt===void 0?void 0:rt.y)!==null&&$e!==void 0?$e:0))}},se=ve=>{L.x<=10&&L.y<=10?ve.preventDefault():v.contains(ve.target)||Y(!1),document.removeEventListener("pointermove",ee),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",ee),document.addEventListener("pointerup",se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",se,{capture:!0})}}},[v,Y,z]),h.useEffect(()=>{const L=()=>Y(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[Y]);const[B,q]=aS(L=>{const ee=F().filter(le=>!le.disabled),se=ee.find(le=>le.ref.current===document.activeElement),ve=sS(ee,L,se);ve&&setTimeout(()=>ve.ref.current.focus())}),J=h.useCallback((L,ee,se)=>{const ve=!X.current&&!se;(C.value!==void 0&&C.value===ee||ve)&&(I(L),ve&&(X.current=!0))},[C.value]),ae=h.useCallback(()=>v==null?void 0:v.focus(),[v]),pe=h.useCallback((L,ee,se)=>{const ve=!X.current&&!se;(C.value!==void 0&&C.value===ee||ve)&&D(L)},[C.value]),Fe=r==="popper"?R6:yA,Pe=Fe===R6?{side:u,sideOffset:c,align:d,alignOffset:p,arrowPadding:g,collisionBoundary:S,collisionPadding:w,sticky:x,hideWhenDetached:y,avoidCollisions:E}:{};return h.createElement(nS,{scope:n,content:v,viewport:k,onViewportChange:T,itemRefCallback:J,selectedItem:R,onItemLeave:ae,itemTextRefCallback:pe,focusSelectedItem:oe,selectedItemText:O,position:r,isPositioned:G,searchRef:B},h.createElement(t2,{as:ui,allowPinchZoom:!0},h.createElement(Hm,{asChild:!0,trapped:C.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:we(o,L=>{var ee;(ee=C.trigger)===null||ee===void 0||ee.focus({preventScroll:!0}),L.preventDefault()})},h.createElement(Gm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>C.onOpenChange(!1)},h.createElement(Fe,H({role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:L=>L.preventDefault()},_,Pe,{onPlaced:()=>U(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:we(_.onKeyDown,L=>{const ee=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!ee&&L.key.length===1&&q(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let ve=F().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(L.key)&&(ve=ve.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const le=L.target,me=ve.indexOf(le);ve=ve.slice(me+1)}setTimeout(()=>Z(ve)),L.preventDefault()}})}))))))}),yA=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=sa(Es,n),s=Ch(Es,n),[u,c]=h.useState(null),[d,p]=h.useState(null),g=Le(t,N=>p(N)),S=n2(n),w=h.useRef(!1),x=h.useRef(!0),{viewport:y,selectedItem:E,selectedItemText:_,focusSelectedItem:C}=s,v=h.useCallback(()=>{if(i.trigger&&i.valueNode&&u&&d&&y&&E&&_){const N=i.trigger.getBoundingClientRect(),R=d.getBoundingClientRect(),I=i.valueNode.getBoundingClientRect(),O=_.getBoundingClientRect();if(i.dir!=="rtl"){const le=O.left-R.left,me=I.left-le,$e=N.left-me,rt=N.width+$e,Ae=Math.max(rt,R.width),tn=window.innerWidth-eo,Dt=xu(me,[eo,tn-Ae]);u.style.minWidth=rt+"px",u.style.left=Dt+"px"}else{const le=R.right-O.right,me=window.innerWidth-I.right-le,$e=window.innerWidth-N.right-me,rt=N.width+$e,Ae=Math.max(rt,R.width),tn=window.innerWidth-eo,Dt=xu(me,[eo,tn-Ae]);u.style.minWidth=rt+"px",u.style.right=Dt+"px"}const D=S(),F=window.innerHeight-eo*2,G=y.scrollHeight,U=window.getComputedStyle(d),X=parseInt(U.borderTopWidth,10),Z=parseInt(U.paddingTop,10),oe=parseInt(U.borderBottomWidth,10),Y=parseInt(U.paddingBottom,10),z=X+Z+G+Y+oe,B=Math.min(E.offsetHeight*5,z),q=window.getComputedStyle(y),J=parseInt(q.paddingTop,10),ae=parseInt(q.paddingBottom,10),pe=N.top+N.height/2-eo,Fe=F-pe,Pe=E.offsetHeight/2,L=E.offsetTop+Pe,ee=X+Z+L,se=z-ee;if(ee<=pe){const le=E===D[D.length-1].ref.current;u.style.bottom="0px";const me=d.clientHeight-y.offsetTop-y.offsetHeight,$e=Math.max(Fe,Pe+(le?ae:0)+me+oe),rt=ee+$e;u.style.height=rt+"px"}else{const le=E===D[0].ref.current;u.style.top="0px";const $e=Math.max(pe,X+y.offsetTop+(le?J:0)+Pe)+se;u.style.height=$e+"px",y.scrollTop=ee-pe+y.offsetTop}u.style.margin=`${eo}px 0`,u.style.minHeight=B+"px",u.style.maxHeight=F+"px",r==null||r(),requestAnimationFrame(()=>w.current=!0)}},[S,i.trigger,i.valueNode,u,d,y,E,_,i.dir,r]);Nn(()=>v(),[v]);const[P,k]=h.useState();Nn(()=>{d&&k(window.getComputedStyle(d).zIndex)},[d]);const T=h.useCallback(N=>{N&&x.current===!0&&(v(),C==null||C(),x.current=!1)},[v,C]);return h.createElement(wA,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:w,onScrollButtonChange:T},h.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P}},h.createElement(Se.div,H({},o,{ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),R6=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=eo,...i}=e,s=r2(n);return h.createElement(Gw,H({},s,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.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)"}}))}),[wA,SA]=zs(Es,{}),T6="SelectViewport",xA=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ch(T6,n),i=SA(T6,n),s=Le(t,o.onViewportChange),u=h.useRef(0);return h.createElement(h.Fragment,null,h.createElement("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}"}}),h.createElement(_h.Slot,{scope:n},h.createElement(Se.div,H({"data-radix-select-viewport":"",role:"presentation"},r,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:we(r.onScroll,c=>{const d=c.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=i;if(g!=null&&g.current&&p){const S=Math.abs(u.current-d.scrollTop);if(S>0){const w=window.innerHeight-eo*2,x=parseFloat(p.style.minHeight),y=parseFloat(p.style.height),E=Math.max(x,y);if(E0?v:0,p.style.justifyContent="flex-end")}}}u.current=d.scrollTop})}))))}),_A="SelectGroup",[bB,CA]=zs(_A),bA="SelectLabel",EA=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=CA(bA,n);return h.createElement(Se.div,H({id:o.id},r,{ref:t}))}),av="SelectItem",[PA,rS]=zs(av),$A=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,u=sa(av,n),c=Ch(av,n),d=u.value===r,[p,g]=h.useState(i??""),[S,w]=h.useState(!1),x=Le(t,_=>{var C;return(C=c.itemRefCallback)===null||C===void 0?void 0:C.call(c,_,r,o)}),y=jr(),E=()=>{o||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A 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 h.createElement(PA,{scope:n,value:r,disabled:o,textId:y,isSelected:d,onItemTextChange:h.useCallback(_=>{g(C=>{var v;return C||((v=_==null?void 0:_.textContent)!==null&&v!==void 0?v:"").trim()})},[])},h.createElement(_h.ItemSlot,{scope:n,value:r,disabled:o,textValue:p},h.createElement(Se.div,H({role:"option","aria-labelledby":y,"data-highlighted":S?"":void 0,"aria-selected":d&&S,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},s,{ref:x,onFocus:we(s.onFocus,()=>w(!0)),onBlur:we(s.onBlur,()=>w(!1)),onPointerUp:we(s.onPointerUp,E),onPointerMove:we(s.onPointerMove,_=>{if(o){var C;(C=c.onItemLeave)===null||C===void 0||C.call(c)}else _.currentTarget.focus({preventScroll:!0})}),onPointerLeave:we(s.onPointerLeave,_=>{if(_.currentTarget===document.activeElement){var C;(C=c.onItemLeave)===null||C===void 0||C.call(c)}}),onKeyDown:we(s.onKeyDown,_=>{var C;((C=c.searchRef)===null||C===void 0?void 0:C.current)!==""&&_.key===" "||(oA.includes(_.key)&&E(),_.key===" "&&_.preventDefault())})}))))}),Cd="SelectItemText",kA=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=sa(Cd,n),u=Ch(Cd,n),c=rS(Cd,n),d=lA(Cd,n),[p,g]=h.useState(null),S=Le(t,_=>g(_),c.onItemTextChange,_=>{var C;return(C=u.itemTextRefCallback)===null||C===void 0?void 0:C.call(u,_,c.value,c.disabled)}),w=p==null?void 0:p.textContent,x=h.useMemo(()=>h.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},w),[c.disabled,c.value,w]),{onNativeOptionAdd:y,onNativeOptionRemove:E}=d;return Nn(()=>(y(x),()=>E(x)),[y,E,x]),h.createElement(h.Fragment,null,h.createElement(Se.span,H({id:c.textId},i,{ref:S})),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?mo.createPortal(i.children,s.valueNode):null)}),RA="SelectItemIndicator",TA=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return rS(RA,n).isSelected?h.createElement(Se.span,H({"aria-hidden":!0},r,{ref:t})):null}),NA=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.createElement(Se.div,H({"aria-hidden":!0},r,{ref:t}))});function oS(e){return e===""||e===void 0}const iS=h.forwardRef((e,t)=>{const{value:n,...r}=e,o=h.useRef(null),i=Le(t,o),s=jm(n);return h.useEffect(()=>{const u=o.current,c=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==n&&p){const g=new Event("change",{bubbles:!0});p.call(u,n),u.dispatchEvent(g)}},[s,n]),h.createElement(bN,{asChild:!0},h.createElement("select",H({},r,{ref:i,defaultValue:n})))});iS.displayName="BubbleSelect";function aS(e){const t=Ut(e),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(s=>{const u=n.current+s;t(u),function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(u)},[t]),i=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function sS(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=AA(e,Math.max(i,0));o.length===1&&(s=s.filter(d=>d!==n));const c=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function AA(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const MA=uA,lS=dA,OA=hA,IA=pA,DA=gA,uS=vA,LA=xA,cS=EA,dS=$A,FA=kA,zA=TA,fS=NA;var jA={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"};const UA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),js=(e,t)=>{const n=h.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:s,children:u,...c},d)=>h.createElement("svg",{ref:d,...jA,width:o,height:o,stroke:r,strokeWidth:s?Number(i)*24/Number(o):i,className:`lucide lucide-${UA(e)}`,...c},[...t.map(([p,g])=>h.createElement(p,g)),...(Array.isArray(u)?u:[u])||[]]));return n.displayName=`${e}`,n},VA=js("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),hS=js("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),GA=js("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),BA=js("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),HA=js("Trash",[["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"}]]),WA=js("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),KA=MA,YA=OA,pS=h.forwardRef(({className:e,children:t,...n},r)=>M.jsxs(lS,{ref:r,className:ke("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[t,M.jsx(IA,{asChild:!0,children:M.jsx(hS,{className:"h-4 w-4 opacity-50"})})]}));pS.displayName=lS.displayName;const gS=h.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>M.jsx(DA,{children:M.jsx(uS,{ref:o,className:ke("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:M.jsx(LA,{className:ke("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));gS.displayName=uS.displayName;const XA=h.forwardRef(({className:e,...t},n)=>M.jsx(cS,{ref:n,className:ke("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));XA.displayName=cS.displayName;const Jd=h.forwardRef(({className:e,children:t,...n},r)=>M.jsxs(dS,{ref:r,className:ke("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[M.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:M.jsx(zA,{children:M.jsx(VA,{className:"h-4 w-4"})})}),M.jsx(FA,{children:t})]}));Jd.displayName=dS.displayName;const QA=h.forwardRef(({className:e,...t},n)=>M.jsx(fS,{ref:n,className:ke("-mx-1 my-1 h-px bg-muted",e),...t}));QA.displayName=fS.displayName;const vS="Switch",[qA,EB]=Jn(vS),[ZA,JA]=qA(vS),eM=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:s,disabled:u,value:c="on",onCheckedChange:d,...p}=e,[g,S]=h.useState(null),w=Le(t,C=>S(C)),x=h.useRef(!1),y=g?!!g.closest("form"):!0,[E=!1,_]=xr({prop:o,defaultProp:i,onChange:d});return h.createElement(ZA,{scope:n,checked:E,disabled:u},h.createElement(Se.button,H({type:"button",role:"switch","aria-checked":E,"aria-required":s,"data-state":mS(E),"data-disabled":u?"":void 0,disabled:u,value:c},p,{ref:w,onClick:we(e.onClick,C=>{_(v=>!v),y&&(x.current=C.isPropagationStopped(),x.current||C.stopPropagation())})})),y&&h.createElement(rM,{control:g,bubbles:!x.current,name:r,value:c,checked:E,required:s,disabled:u,style:{transform:"translateX(-100%)"}}))}),tM="SwitchThumb",nM=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=JA(tM,n);return h.createElement(Se.span,H({"data-state":mS(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),rM=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=h.useRef(null),s=jm(n),u=Um(t);return h.useEffect(()=>{const c=i.current,d=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&g){const S=new Event("click",{bubbles:r});g.call(c,n),c.dispatchEvent(S)}},[s,n,r]),h.createElement("input",H({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function mS(e){return e?"checked":"unchecked"}const yS=eM,oM=nM,wS=h.forwardRef(({className:e,...t},n)=>M.jsx(yS,{className:ke("peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent 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",e),...t,ref:n,children:M.jsx(oM,{className:ke("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));wS.displayName=yS.displayName;const iM=()=>{const{setTurtleSize:e,turtleSize:t,tension:n,setTension:r,direction:o,setDirection:i,grid:s,gridSize:u,setGrid:c,setGridSize:d,speed:p,setSpeed:g,code:S,setSteps:w,turtlePosition:x,theme:y,setTheme:E,getTheme:_}=Bt(["setTurtleSize","turtleSize","tension","setTension","direction","setDirection","grid","gridSize","setGrid","setGridSize","speed","setSpeed","code","setSteps","turtlePosition","theme","setTheme","getTheme"]),C=I=>{d(I[0])},v=I=>{e(I[0],t.height)},P=I=>{e(t.width,I[0])},k=I=>{r(I[0])},T=I=>{g(I[0])},N=I=>{i(I[0])},R=I=>{E(I)};return h.useEffect(()=>{w(fh(S,x,o,p,_()))},[p,o,u,_()]),{handleGridSizeChange:C,handleTurtleWidthChange:v,handleTurtleHeightChange:P,handleTensionChange:k,handleSpeedChange:T,handleDirectionChange:N,handleThemeChange:R,grid:s,gridSize:u,turtleSize:t,setTheme:E,theme:y,tension:n,speed:p,direction:o,setGrid:c}},aM=()=>{const{handleTensionChange:e,turtleSize:t,handleTurtleWidthChange:n,handleTurtleHeightChange:r,handleDirectionChange:o,handleSpeedChange:i,handleGridSizeChange:s,handleThemeChange:u,grid:c,gridSize:d,theme:p,tension:g,speed:S,direction:w,setGrid:x}=iM();return M.jsx(Ds,{className:" h-calc-100-186 flex flex-grow relative",children:M.jsxs("div",{className:" space-y-8 overflow-visible p-6",children:[M.jsxs("div",{className:"space-y-1 flex flex-col items-start mb-2 w-full",children:[M.jsx("h4",{className:"text-sm font-medium leading-none",children:"Theme settings"}),M.jsx("p",{className:"text-sm text-muted-foreground",children:"Select your preferred theme."}),M.jsxs(KA,{onValueChange:u,defaultValue:p,children:[M.jsx(pS,{className:"w-full",children:M.jsx(YA,{placeholder:"Theme"})}),M.jsxs(gS,{children:[M.jsx(Jd,{value:"light",children:"Light"}),M.jsx(Jd,{value:"dark",children:"Dark"}),M.jsx(Jd,{value:"system",children:"System"})]})]})]}),M.jsxs("div",{className:"space-y-2",children:[M.jsxs("div",{className:"space-y-1 flex flex-col items-start mt-6",children:[M.jsx("h4",{className:"text-sm font-medium leading-none",children:"Turtle settings"}),M.jsx("p",{className:"text-sm text-muted-foreground",children:"Change the size, tension of the turtle."})]}),M.jsx(cs,{className:"my-4"}),M.jsxs("div",{className:"space-y-1 flex flex-col items-start w-full",children:[M.jsxs(Fo,{className:"mb-2 ",children:["Tension: ",g]}),M.jsx(zi,{id:"tension",min:0,max:2,step:.1,defaultValue:[g],onValueChange:e})]}),M.jsxs("div",{className:"space-y-1 flex flex-col items-start w-full",children:[M.jsxs(Fo,{className:"mb-2 ",children:["Width: ",t.width]}),M.jsx(zi,{id:"width",min:10,max:100,step:1,defaultValue:[t.width],onValueChange:n})]}),M.jsxs("div",{className:"space-y-1 flex flex-col items-start w-full ",children:[M.jsxs(Fo,{className:"mb-2 ",children:["Height: ",t.height]}),M.jsx(zi,{id:"height",min:10,max:100,step:1,defaultValue:[t.height],onValueChange:r})]})]}),M.jsxs("div",{className:"space-y-2",children:[M.jsxs("div",{className:"space-y-1 flex flex-col items-start mt-6",children:[M.jsx("h4",{className:"text-sm font-medium leading-none",children:"Canvas settings"}),M.jsx("p",{className:"text-sm text-muted-foreground",children:"Change grid size, and enable/disable grid."})]}),M.jsx(cs,{className:"my-4"}),M.jsxs("div",{className:"flex items-center space-x-2",children:[M.jsx(wS,{id:"grid",checked:c,onCheckedChange:x}),M.jsx(Fo,{htmlFor:"grid",children:"Grid"})]}),M.jsxs("div",{className:"space-y-1 flex flex-col items-start w-full",children:[M.jsxs(Fo,{className:"mb-2 ",children:["Grid size: ",d]}),M.jsx(zi,{id:"grid",min:16,max:128,step:16,defaultValue:[d],onValueChange:s})]})]}),M.jsxs("div",{className:"space-y-2",children:[M.jsxs("div",{className:"space-y-1 flex flex-col items-start mt-6",children:[M.jsx("h4",{className:"text-sm font-medium leading-none",children:"Animation settings"}),M.jsx("p",{className:"text-sm text-muted-foreground",children:"Change animation speed"})]}),M.jsx(cs,{className:"my-4"}),M.jsxs("div",{className:"space-y-1 flex flex-col items-start w-full",children:[M.jsxs(Fo,{className:"mb-2 ",children:["Speed (ms): ",S]}),M.jsx(zi,{id:"speed",min:100,max:1e3,step:50,defaultValue:[S],onValueChange:i})]}),M.jsxs("div",{className:"space-y-1 flex flex-col items-start w-full",children:[M.jsxs(Fo,{className:"mb-2 ",children:["Direction (deg): ",w]}),M.jsx(zi,{id:"direction",min:0,max:360,step:1,defaultValue:[w],onValueChange:o})]})]})]})})},sM=fw("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Yo=h.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?ui:"button";return M.jsx(s,{className:ke(sM({variant:t,size:n,className:e})),ref:i,...o})});Yo.displayName="Button";function It(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var lM=["color"],uM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,lM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M7.5 2C7.77614 2 8 2.22386 8 2.5L8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.75979 12.9473 7.63261 13 7.5 13C7.36739 13 7.24021 12.9473 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 2.5C7 2.22386 7.22386 2 7.5 2Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),cM=["color"],dM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,cM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.70711 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H3.70711L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),fM=["color"],hM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,fM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),pM=["color"],gM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,pM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M7.14645 2.14645C7.34171 1.95118 7.65829 1.95118 7.85355 2.14645L11.8536 6.14645C12.0488 6.34171 12.0488 6.65829 11.8536 6.85355C11.6583 7.04882 11.3417 7.04882 11.1464 6.85355L8 3.70711L8 12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 3.70711L3.85355 6.85355C3.65829 7.04882 3.34171 7.04882 3.14645 6.85355C2.95118 6.65829 2.95118 6.34171 3.14645 6.14645L7.14645 2.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),vM=["color"],mM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,vM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M1 3H14V4H1V3ZM1 6H14V8H1V6ZM14 10.25H1V12.75H14V10.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),yM=["color"],wM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,yM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),SM=["color"],xM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,SM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M0.877075 7.49985C0.877075 3.84216 3.84222 0.877014 7.49991 0.877014C11.1576 0.877014 14.1227 3.84216 14.1227 7.49985C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49985ZM3.78135 3.21565C4.68298 2.43239 5.83429 1.92904 7.09998 1.84089V6.53429L3.78135 3.21565ZM3.21567 3.78134C2.43242 4.68298 1.92909 5.83428 1.84095 7.09997H6.5343L3.21567 3.78134ZM6.5343 7.89997H1.84097C1.92916 9.16562 2.43253 10.3169 3.21579 11.2185L6.5343 7.89997ZM3.78149 11.7842C4.6831 12.5673 5.83435 13.0707 7.09998 13.1588V8.46566L3.78149 11.7842ZM7.89998 8.46566V13.1588C9.16559 13.0706 10.3168 12.5673 11.2184 11.7841L7.89998 8.46566ZM11.7841 11.2184C12.5673 10.3168 13.0707 9.16558 13.1588 7.89997H8.46567L11.7841 11.2184ZM8.46567 7.09997H13.1589C13.0707 5.83432 12.5674 4.68305 11.7842 3.78143L8.46567 7.09997ZM11.2185 3.21573C10.3169 2.43246 9.16565 1.92909 7.89998 1.8409V6.53429L11.2185 3.21573Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),_M=["color"],CM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,_M);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bM=["color"],EM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,bM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M7.49991 0.877075C3.84222 0.877075 0.877075 3.84222 0.877075 7.49991C0.877075 11.1576 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1576 14.1227 7.49991C14.1227 3.84222 11.1576 0.877075 7.49991 0.877075ZM1.82708 7.49991C1.82708 4.36689 4.36689 1.82707 7.49991 1.82707C10.6329 1.82707 13.1727 4.36689 13.1727 7.49991C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49991ZM8.37287 7.50006C8.37287 7.98196 7.98221 8.37263 7.5003 8.37263C7.01839 8.37263 6.62773 7.98196 6.62773 7.50006C6.62773 7.01815 7.01839 6.62748 7.5003 6.62748C7.98221 6.62748 8.37287 7.01815 8.37287 7.50006ZM9.32287 7.50006C9.32287 8.50664 8.50688 9.32263 7.5003 9.32263C6.49372 9.32263 5.67773 8.50664 5.67773 7.50006C5.67773 6.49348 6.49372 5.67748 7.5003 5.67748C8.50688 5.67748 9.32287 6.49348 9.32287 7.50006Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),PM=["color"],$M=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,PM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),kM=["color"],RM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,kM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M8.625 2.5C8.625 3.12132 8.12132 3.625 7.5 3.625C6.87868 3.625 6.375 3.12132 6.375 2.5C6.375 1.87868 6.87868 1.375 7.5 1.375C8.12132 1.375 8.625 1.87868 8.625 2.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM7.5 13.625C8.12132 13.625 8.625 13.1213 8.625 12.5C8.625 11.8787 8.12132 11.375 7.5 11.375C6.87868 11.375 6.375 11.8787 6.375 12.5C6.375 13.1213 6.87868 13.625 7.5 13.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),TM=["color"],NM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,TM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),AM=["color"],MM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,AM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),OM=["color"],IM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,OM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M6.04995 2.74998C6.04995 2.44623 5.80371 2.19998 5.49995 2.19998C5.19619 2.19998 4.94995 2.44623 4.94995 2.74998V12.25C4.94995 12.5537 5.19619 12.8 5.49995 12.8C5.80371 12.8 6.04995 12.5537 6.04995 12.25V2.74998ZM10.05 2.74998C10.05 2.44623 9.80371 2.19998 9.49995 2.19998C9.19619 2.19998 8.94995 2.44623 8.94995 2.74998V12.25C8.94995 12.5537 9.19619 12.8 9.49995 12.8C9.80371 12.8 10.05 12.5537 10.05 12.25V2.74998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),DM=["color"],LM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,DM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M11.8536 1.14645C11.6583 0.951184 11.3417 0.951184 11.1465 1.14645L3.71455 8.57836C3.62459 8.66832 3.55263 8.77461 3.50251 8.89155L2.04044 12.303C1.9599 12.491 2.00189 12.709 2.14646 12.8536C2.29103 12.9981 2.50905 13.0401 2.69697 12.9596L6.10847 11.4975C6.2254 11.4474 6.3317 11.3754 6.42166 11.2855L13.8536 3.85355C14.0488 3.65829 14.0488 3.34171 13.8536 3.14645L11.8536 1.14645ZM4.42166 9.28547L11.5 2.20711L12.7929 3.5L5.71455 10.5784L4.21924 11.2192L3.78081 10.7808L4.42166 9.28547Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),FM=["color"],zM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,FM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),jM=["color"],UM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,jM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M3.24182 2.32181C3.3919 2.23132 3.5784 2.22601 3.73338 2.30781L12.7334 7.05781C12.8974 7.14436 13 7.31457 13 7.5C13 7.68543 12.8974 7.85564 12.7334 7.94219L3.73338 12.6922C3.5784 12.774 3.3919 12.7687 3.24182 12.6782C3.09175 12.5877 3 12.4252 3 12.25V2.75C3 2.57476 3.09175 2.4123 3.24182 2.32181ZM4 3.57925V11.4207L11.4288 7.5L4 3.57925Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),VM=["color"],GM=h.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=It(e,VM);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),h.createElement("path",{d:"M0.900024 7.50002C0.900024 3.85495 3.85495 0.900024 7.50002 0.900024C11.1451 0.900024 14.1 3.85495 14.1 7.50002C14.1 11.1451 11.1451 14.1 7.50002 14.1C3.85495 14.1 0.900024 11.1451 0.900024 7.50002ZM7.50002 1.80002C4.35201 1.80002 1.80002 4.35201 1.80002 7.50002C1.80002 10.648 4.35201 13.2 7.50002 13.2C10.648 13.2 13.2 10.648 13.2 7.50002C13.2 4.35201 10.648 1.80002 7.50002 1.80002ZM3.07504 7.50002C3.07504 5.05617 5.05618 3.07502 7.50004 3.07502C9.94388 3.07502 11.925 5.05617 11.925 7.50002C11.925 9.94386 9.94388 11.925 7.50004 11.925C5.05618 11.925 3.07504 9.94386 3.07504 7.50002ZM7.50004 3.92502C5.52562 3.92502 3.92504 5.52561 3.92504 7.50002C3.92504 9.47442 5.52563 11.075 7.50004 11.075C9.47444 11.075 11.075 9.47442 11.075 7.50002C11.075 5.52561 9.47444 3.92502 7.50004 3.92502ZM7.50004 5.25002C6.2574 5.25002 5.25004 6.25739 5.25004 7.50002C5.25004 8.74266 6.2574 9.75002 7.50004 9.75002C8.74267 9.75002 9.75004 8.74266 9.75004 7.50002C9.75004 6.25738 8.74267 5.25002 7.50004 5.25002ZM6.05004 7.50002C6.05004 6.69921 6.69923 6.05002 7.50004 6.05002C8.30084 6.05002 8.95004 6.69921 8.95004 7.50002C8.95004 8.30083 8.30084 8.95002 7.50004 8.95002C6.69923 8.95002 6.05004 8.30083 6.05004 7.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});const SS="Popover",[xS,PB]=Jn(SS,[yh]),o2=yh(),[BM,Us]=xS(SS),HM=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,u=o2(t),c=h.useRef(null),[d,p]=h.useState(!1),[g=!1,S]=xr({prop:r,defaultProp:o,onChange:i});return h.createElement(Uw,u,h.createElement(BM,{scope:t,contentId:jr(),triggerRef:c,open:g,onOpenChange:S,onOpenToggle:h.useCallback(()=>S(w=>!w),[S]),hasCustomAnchor:d,onCustomAnchorAdd:h.useCallback(()=>p(!0),[]),onCustomAnchorRemove:h.useCallback(()=>p(!1),[]),modal:s},n))},WM="PopoverTrigger",KM=h.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Us(WM,n),i=o2(n),s=Le(t,o.triggerRef),u=h.createElement(Se.button,H({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":bS(o.open)},r,{ref:s,onClick:we(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?u:h.createElement(Vw,H({asChild:!0},i),u)}),_S="PopoverPortal",[YM,XM]=xS(_S,{forceMount:void 0}),QM=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Us(_S,t);return h.createElement(YM,{scope:t,forceMount:n},h.createElement(er,{present:n||i.open},h.createElement(Zm,{asChild:!0,container:o},r)))},bu="PopoverContent",qM=h.forwardRef((e,t)=>{const n=XM(bu,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Us(bu,e.__scopePopover);return h.createElement(er,{present:r||i.open},i.modal?h.createElement(ZM,H({},o,{ref:t})):h.createElement(JM,H({},o,{ref:t})))}),ZM=h.forwardRef((e,t)=>{const n=Us(bu,e.__scopePopover),r=h.useRef(null),o=Le(t,r),i=h.useRef(!1);return h.useEffect(()=>{const s=r.current;if(s)return wh(s)},[]),h.createElement(t2,{as:ui,allowPinchZoom:!0},h.createElement(CS,H({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(e.onCloseAutoFocus,s=>{var u;s.preventDefault(),i.current||(u=n.triggerRef.current)===null||u===void 0||u.focus()}),onPointerDownOutside:we(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0,d=u.button===2||c;i.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:we(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})))}),JM=h.forwardRef((e,t)=>{const n=Us(bu,e.__scopePopover),r=h.useRef(!1),o=h.useRef(!1);return h.createElement(CS,H({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,i),!i.defaultPrevented){var u;r.current||(u=n.triggerRef.current)===null||u===void 0||u.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var s,u;(s=e.onInteractOutside)===null||s===void 0||s.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((u=n.triggerRef.current)===null||u===void 0?void 0:u.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),CS=h.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:p,...g}=e,S=Us(bu,n),w=o2(n);return Bm(),h.createElement(Hm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},h.createElement(Gm,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:p,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>S.onOpenChange(!1)},h.createElement(Gw,H({"data-state":bS(S.open),role:"dialog",id:S.contentId},w,g,{ref:t,style:{...g.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)"}}))))});function bS(e){return e?"open":"closed"}const eO=HM,tO=KM,nO=QM,ES=qM,PS=eO,$S=tO,i2=h.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>M.jsx(nO,{children:M.jsx(ES,{ref:o,align:t,sideOffset:n,className:ke("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",e),...r})}));i2.displayName=ES.displayName;var a2=(e=>(e.Movement="Movement",e.Turn="Turn",e.Pen="Pen",e))(a2||{});const s2=new Map([[Ie.center,{description:"move the turtle to the center of the canvas",icon:M.jsx(CM,{}),group:"Movement"}],[Ie.forward,{description:"move the turtle forward X units",icon:M.jsx(gM,{}),group:"Movement"}],[Ie.backward,{description:"move the turtle backward X units",icon:M.jsx(uM,{}),group:"Movement"}],[Ie.pendown,{description:"turtle starts drawing",icon:M.jsx(LM,{}),group:"Pen"}],[Ie.penup,{description:"turtle stops drawing",icon:M.jsx(zM,{}),group:"Pen"}],[Ie.turnright,{description:"turn the turtle right D degrees",icon:M.jsx(hM,{}),group:"Turn"}],[Ie.turnleft,{description:"turn the turtle left D degrees",icon:M.jsx(dM,{}),group:"Turn"}],[Ie.goy,{description:"move the turtle vertically to a specified Y -coordinate",icon:M.jsx(RM,{}),group:"Movement"}],[Ie.direction,{description:"set the turtle's direction to a D angle",icon:M.jsx(EM,{}),group:"Turn"}],[Ie.pencolor,{description:"change the turtle's pen color",icon:M.jsx(xM,{}),group:"Pen"}],[Ie.penwidth,{description:"set the width of the turtle's pen",icon:M.jsx(mM,{}),group:"Pen"}],[Ie.go,{description:"move the turtle to specific X,Y coordinates ",icon:M.jsx(GM,{}),group:"Movement"}],[Ie.gox,{description:"move the turtle horizontally to a specified X -coordinate",icon:M.jsx($M,{}),group:"Movement"}]]),kS="Collapsible",[rO,RS]=Jn(kS),[oO,l2]=rO(kS),iO=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:s,...u}=e,[c=!1,d]=xr({prop:r,defaultProp:o,onChange:s});return h.createElement(oO,{scope:n,disabled:i,contentId:jr(),open:c,onOpenToggle:h.useCallback(()=>d(p=>!p),[d])},h.createElement(Se.div,H({"data-state":u2(c),"data-disabled":i?"":void 0},u,{ref:t})))}),aO="CollapsibleTrigger",sO=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=l2(aO,n);return h.createElement(Se.button,H({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":u2(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:we(e.onClick,o.onOpenToggle)}))}),TS="CollapsibleContent",lO=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=l2(TS,e.__scopeCollapsible);return h.createElement(er,{present:n||o.open},({present:i})=>h.createElement(uO,H({},r,{ref:t,present:i})))}),uO=h.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,s=l2(TS,n),[u,c]=h.useState(r),d=h.useRef(null),p=Le(t,d),g=h.useRef(0),S=g.current,w=h.useRef(0),x=w.current,y=s.open||u,E=h.useRef(y),_=h.useRef();return h.useEffect(()=>{const C=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(C)},[]),Nn(()=>{const C=d.current;if(C){_.current=_.current||{transitionDuration:C.style.transitionDuration,animationName:C.style.animationName},C.style.transitionDuration="0s",C.style.animationName="none";const v=C.getBoundingClientRect();g.current=v.height,w.current=v.width,E.current||(C.style.transitionDuration=_.current.transitionDuration,C.style.animationName=_.current.animationName),c(r)}},[s.open,r]),h.createElement(Se.div,H({"data-state":u2(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!y},i,{ref:p,style:{"--radix-collapsible-content-height":S?`${S}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style}}),y&&o)});function u2(e){return e?"open":"closed"}const cO=iO,dO=sO,fO=lO,mi="Accordion",hO=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[c2,pO,gO]=ch(mi),[bh,$B]=Jn(mi,[gO,RS]),d2=RS(),NS=te.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return te.createElement(c2.Provider,{scope:e.__scopeAccordion},n==="multiple"?te.createElement(wO,H({},i,{ref:t})):te.createElement(yO,H({},o,{ref:t})))});NS.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[AS,vO]=bh(mi),[MS,mO]=bh(mi,{collapsible:!1}),yO=te.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...s}=e,[u,c]=xr({prop:n,defaultProp:r,onChange:o});return te.createElement(AS,{scope:e.__scopeAccordion,value:u?[u]:[],onItemOpen:c,onItemClose:te.useCallback(()=>i&&c(""),[i,c])},te.createElement(MS,{scope:e.__scopeAccordion,collapsible:i},te.createElement(OS,H({},s,{ref:t}))))}),wO=te.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[s=[],u]=xr({prop:n,defaultProp:r,onChange:o}),c=te.useCallback(p=>u((g=[])=>[...g,p]),[u]),d=te.useCallback(p=>u((g=[])=>g.filter(S=>S!==p)),[u]);return te.createElement(AS,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:d},te.createElement(MS,{scope:e.__scopeAccordion,collapsible:!0},te.createElement(OS,H({},i,{ref:t}))))}),[SO,Eh]=bh(mi),OS=te.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...s}=e,u=te.useRef(null),c=Le(u,t),d=pO(n),g=Os(o)==="ltr",S=we(e.onKeyDown,w=>{var x;if(!hO.includes(w.key))return;const y=w.target,E=d().filter(I=>{var O;return!((O=I.ref.current)!==null&&O!==void 0&&O.disabled)}),_=E.findIndex(I=>I.ref.current===y),C=E.length;if(_===-1)return;w.preventDefault();let v=_;const P=0,k=C-1,T=()=>{v=_+1,v>k&&(v=P)},N=()=>{v=_-1,v{const{__scopeAccordion:n,value:r,...o}=e,i=Eh(sv,n),s=vO(sv,n),u=d2(n),c=jr(),d=r&&s.value.includes(r)||!1,p=i.disabled||e.disabled;return te.createElement(xO,{scope:n,open:d,disabled:p,triggerId:c},te.createElement(cO,H({"data-orientation":i.orientation,"data-state":IS(d)},u,o,{ref:t,disabled:p,open:d,onOpenChange:g=>{g?s.onItemOpen(r):s.onItemClose(r)}})))}),CO="AccordionHeader",bO=te.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Eh(mi,n),i=f2(CO,n);return te.createElement(Se.h3,H({"data-orientation":o.orientation,"data-state":IS(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),N6="AccordionTrigger",EO=te.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Eh(mi,n),i=f2(N6,n),s=mO(N6,n),u=d2(n);return te.createElement(c2.ItemSlot,{scope:n},te.createElement(dO,H({"aria-disabled":i.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},u,r,{ref:t})))}),PO="AccordionContent",$O=te.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Eh(mi,n),i=f2(PO,n),s=d2(n);return te.createElement(fO,H({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},s,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function IS(e){return e?"open":"closed"}const kO=NS,RO=_O,TO=bO,DS=EO,LS=$O,NO=kO,FS=h.forwardRef(({className:e,...t},n)=>M.jsx(RO,{ref:n,className:ke("border-b",e),...t}));FS.displayName="AccordionItem";const zS=h.forwardRef(({className:e,children:t,...n},r)=>M.jsx(TO,{className:"flex",children:M.jsxs(DS,{ref:r,className:ke("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,M.jsx(hS,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));zS.displayName=DS.displayName;const jS=h.forwardRef(({className:e,children:t,...n},r)=>M.jsx(LS,{ref:r,className:ke("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n,children:M.jsx("div",{className:"pb-4 pt-0",children:t})}));jS.displayName=LS.displayName;const AO=()=>M.jsx(M.Fragment,{children:M.jsxs(Ds,{className:"h-[70vh] p-3",children:[M.jsx("h1",{className:"text-xl font-extrabold",children:"Documentation"}),M.jsxs("div",{className:"text-opacity-40 text-sm",children:["Reveal part to get more knowledge ",M.jsx("br",{}),M.jsxs("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[M.jsx("span",{className:"text-xs",children:navigator.userAgent.indexOf("Mac OS X")!=-1?"⌘":"Ctrl + "}),"A"]})," ","click to add command"]}),M.jsx(cs,{className:"my-2"}),M.jsx(NO,{type:"multiple",className:"space-y-2",children:Object.keys(a2).map((e,t)=>M.jsxs(FS,{value:e,children:[M.jsx(zS,{className:"hover:no-underline ",children:M.jsx("div",{className:"flex flex-col justify-start items-start",children:M.jsx("h2",{className:"text-lg font-bold",children:e})})}),M.jsx(jS,{children:M.jsx("div",{className:"space-y-2",children:Array.from(s2).sort().filter(n=>n[1].group===e).map((n,r)=>M.jsx(MO,{info:n},r))})})]},t))})]})}),MO=({info:e})=>{const t=Is.get(e[0]);return M.jsx(M.Fragment,{children:M.jsxs("div",{className:"flex items-center space-x-2 border rounded-2xl p-2",children:[M.jsx("div",{className:"pr-2 pl-3 ",children:e[1].icon}),M.jsxs("div",{className:"",children:[M.jsxs("div",{className:"text-lg font-semibold flex space-x-3 ",children:[M.jsx("div",{children:e[0]}),M.jsx("div",{className:"flex space-x-2",children:t==null?void 0:t.map(n=>M.jsx("div",{className:dh.get(n),children:Lm[n]}))})]}),M.jsx("div",{className:"text-sm text-purple-400",children:e[1].description})]})]})})};/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var Zl=function(){return Zl=Object.assign||function(t){for(var n,r=1,o=arguments.length;r{const r=t<0?e.length+t:t;if(r>=0&&r(e=[...e],US(e,t,n),e);h2.exports=IO;h2.exports.mutate=US;var DO=h2.exports;const LO=ra(DO);var A6=function(t,n,r){for(var o=t.x,i=t.y,s=(r===void 0?{}:r).fallbackToClosest,u=s===void 0?!1:s,c=1e4,d=-1,p=0;p=g.left&&o=g.top&&i=U&&z<=oe||!Y&&z>=oe&&z<=U){var J=S.current[Y?z-1:z+1];if(J){var ae=J.left-q.left,pe=J.top-q.top;B.style.transform="translate3d("+ae+"px, "+pe+"px, 0px)"}}else B.style.transform="translate3d(0,0,0)";B.style.transitionDuration="300ms"}}}},onEnd:function(){for(var F=0;F{const{getTheme:t,code:n,setCode:r,turtlePosition:o,direction:i,speed:s}=Bt(["getTheme","code","setCode","turtlePosition","direction","speed"]),[u,c]=h.useState(e.params||[]),[d,p]=h.useState({r:0,g:0,b:0}),[g,S]=h.useState([]),w=e.statement?Is.get(e==null?void 0:e.statement):void 0;return h.useEffect(()=>{let E=[...n];E=E.map(_=>_.id===e.id?{..._,params:u}:_),r(E)},[u]),h.useEffect(()=>{fh(n,o,i,s,t())},[n]),h.useEffect(()=>{const E=[];if(w){for(const _ of w){const C=dh.get(_);C&&E.push(C)}e.params&&c(e.params)}e.statement===Ie.pencolor&&(e!=null&&e.params)&&p({r:e==null?void 0:e.params[0],g:e.params[1],b:e.params[2]}),S(E)},[]),{getTheme:t,color:d,handleChangeComplete:E=>{c([E.rgb.r,E.rgb.g,E.rgb.b]),p(E.rgb)},paramsColor:g,params:u,setParams:c,handleRemoveCommand:()=>{let E=[...n];E=E.filter(_=>_.id!==e.id),r(E)}}},GS=h.forwardRef(({className:e,type:t,...n},r)=>M.jsx("input",{type:t,className:ke("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));GS.displayName="Input";function So(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var g2=e=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(e),rs=255,Xo=100,lv=e=>{var{r:t,g:n,b:r,a:o}=e,i=Math.max(t,n,r),s=i-Math.min(t,n,r),u=s?i===t?(n-r)/s:i===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(u<0?u+6:u),s:i?s/i*Xo:0,v:i/rs*Xo,a:o}},BS=e=>{var{h:t,s:n,l:r,a:o}=HS(e);return"hsla("+t+", "+n+"%, "+r+"%, "+o+")"},HS=e=>{var{h:t,s:n,v:r,a:o}=e,i=(200-n)*r/Xo;return{h:t,s:i>0&&i<200?n*r/Xo/(i<=Xo?i:200-i)*Xo:0,l:i/2,a:o}},WS=e=>{var{r:t,g:n,b:r}=e,o=t<<16|n<<8|r;return"#"+(i=>new Array(7-i.length).join("0")+i)(o.toString(16))},WO=e=>{var{r:t,g:n,b:r,a:o}=e,i=typeof o=="number"&&(o*255|256).toString(16).slice(1);return""+WS({r:t,g:n,b:r,a:o})+(i||"")},Eu=e=>lv(KO(e)),KO=e=>{var t=e.replace("#","");/^#?/.test(e)&&t.length===3&&(e="#"+t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2));var n=new RegExp("[A-Za-z0-9]{2}","g"),[r,o,i=0,s]=e.match(n).map(u=>parseInt(u,16));return{r,g:o,b:i,a:(s??255)/rs}},v2=e=>{var{h:t,s:n,v:r,a:o}=e,i=t/60,s=n/Xo,u=r/Xo,c=Math.floor(i)%6,d=i-Math.floor(i),p=rs*u*(1-s),g=rs*u*(1-s*d),S=rs*u*(1-s*(1-d));u*=rs;var w={};switch(c){case 0:w.r=u,w.g=S,w.b=p;break;case 1:w.r=g,w.g=u,w.b=p;break;case 2:w.r=p,w.g=u,w.b=S;break;case 3:w.r=p,w.g=g,w.b=u;break;case 4:w.r=S,w.g=p,w.b=u;break;case 5:w.r=u,w.g=p,w.b=g;break}return w.r=Math.round(w.r),w.g=Math.round(w.g),w.b=Math.round(w.b),H({},w,{a:o})},YO=e=>{var{r:t,g:n,b:r,a:o}=v2(e);return"rgba("+t+", "+n+", "+r+", "+o+")"},XO=e=>{var{r:t,g:n,b:r}=e;return{r:t,g:n,b:r}},QO=e=>{var{h:t,s:n,l:r}=e;return{h:t,s:n,l:r}},m2=e=>WS(v2(e)),qO=e=>{var{h:t,s:n,v:r}=e;return{h:t,s:n,v:r}},y2=e=>{var t,n,r,o,i,s,u,c;return typeof e=="string"&&g2(e)?(s=Eu(e),u=e):typeof e!="string"&&(s=e),s&&(r=qO(s),i=HS(s),o=v2(s),c=WO(o),u=m2(s),n=QO(i),t=XO(o)),{rgb:t,hsl:n,hsv:r,rgba:o,hsla:i,hsva:s,hex:u,hexa:c}};function D6(e){var t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useCallback((n,r)=>t.current&&t.current(n,r),[])}var Jl=e=>"touches"in e,L6=e=>{!Jl(e)&&e.preventDefault&&e.preventDefault()},F6=function(t,n,r){return n===void 0&&(n=0),r===void 0&&(r=1),t>r?r:t{var n=e.getBoundingClientRect(),r=Jl(t)?t.touches[0]:t;return{left:F6((r.pageX-(n.left+window.pageXOffset))/n.width),top:F6((r.pageY-(n.top+window.pageYOffset))/n.height),width:n.width,height:n.height,x:r.pageX-(n.left+window.pageXOffset),y:r.pageY-(n.top+window.pageYOffset)}},ZO=["prefixCls","className","onMove","onDown"],KS=te.forwardRef((e,t)=>{var{prefixCls:n="w-color-interactive",className:r,onMove:o,onDown:i}=e,s=So(e,ZO),u=h.useRef(null),c=h.useRef(!1),[d,p]=h.useState(!1),g=D6(o),S=D6(i),w=C=>c.current&&!Jl(C)?!1:(c.current=Jl(C),!0),x=h.useCallback(C=>{L6(C);var v=Jl(C)?C.touches.length>0:C.buttons>0;v&&u.current?g&&g(z6(u.current,C),C):p(!1)},[g]),y=h.useCallback(()=>p(!1),[]),E=h.useCallback(C=>{var v=C?window.addEventListener:window.removeEventListener;v(c.current?"touchmove":"mousemove",x),v(c.current?"touchend":"mouseup",y)},[]);h.useEffect(()=>(E(d),()=>{d&&E(!1)}),[d,E]);var _=h.useCallback(C=>{L6(C.nativeEvent),w(C.nativeEvent)&&(S&&S(z6(u.current,C.nativeEvent),C.nativeEvent),p(!0))},[S]);return M.jsx("div",H({},s,{className:[n,r||""].filter(Boolean).join(" "),style:H({},s.style,{touchAction:"none"}),ref:u,tabIndex:0,onMouseDown:_,onTouchStart:_}))});KS.displayName="Interactive";const YS=KS;var JO=["className","prefixCls","left","top","style","fillProps"],eI=e=>{var{className:t,prefixCls:n,left:r,top:o,style:i,fillProps:s}=e,u=So(e,JO),c=H({},i,{position:"absolute",left:r,top:o}),d=H({width:18,height:18,boxShadow:"var(--alpha-pointer-box-shadow)",borderRadius:"50%",backgroundColor:"var(--alpha-pointer-background-color)"},s==null?void 0:s.style,{transform:r?"translate(-9px, -1px)":"translate(-1px, -9px)"});return M.jsx("div",H({className:n+"-pointer "+(t||""),style:c},u,{children:M.jsx("div",H({className:n+"-fill"},s,{style:d}))}))},tI=["prefixCls","className","hsva","background","bgProps","innerProps","pointerProps","radius","width","height","direction","style","onChange","pointer"],XS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==",QS=te.forwardRef((e,t)=>{var{prefixCls:n="w-color-alpha",className:r,hsva:o,background:i,bgProps:s={},innerProps:u={},pointerProps:c={},radius:d=0,width:p,height:g=16,direction:S="horizontal",style:w,onChange:x,pointer:y}=e,E=So(e,tI),_=N=>{x&&x(H({},o,{a:S==="horizontal"?N.left:N.top}),N)},C=BS(Object.assign({},o,{a:1})),v="linear-gradient(to "+(S==="horizontal"?"right":"bottom")+", rgba(244, 67, 54, 0) 0%, "+C+" 100%)",P={};S==="horizontal"?P.left=o.a*100+"%":P.top=o.a*100+"%";var k=H({"--alpha-background-color":"#fff","--alpha-pointer-background-color":"rgb(248, 248, 248)","--alpha-pointer-box-shadow":"rgb(0 0 0 / 37%) 0px 1px 4px 0px",borderRadius:d,background:"url("+XS+") left center",backgroundColor:"var(--alpha-background-color)"},w,{position:"relative"},{width:p,height:g}),T=y&&typeof y=="function"?y(H({prefixCls:n},c,P)):M.jsx(eI,H({},c,{prefixCls:n},P));return M.jsxs("div",H({},E,{className:[n,n+"-"+S,r||""].filter(Boolean).join(" "),style:k,ref:t,children:[M.jsx("div",H({},s,{style:H({inset:0,position:"absolute",background:i||v,borderRadius:d},s.style)})),M.jsx(YS,H({},u,{style:H({},u.style,{inset:0,zIndex:1,position:"absolute"}),onMove:_,onDown:_,children:T}))]}))});QS.displayName="Alpha";const qS=QS;var nI=e=>{var{className:t,color:n,left:r,top:o,prefixCls:i}=e,s={position:"absolute",top:o,left:r},u={"--saturation-pointer-box-shadow":"rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px",width:6,height:6,transform:"translate(-3px, -3px)",boxShadow:"var(--saturation-pointer-box-shadow)",borderRadius:"50%",backgroundColor:n};return h.useMemo(()=>M.jsx("div",{className:i+"-pointer "+(t||""),style:s,children:M.jsx("div",{className:i+"-fill",style:u})}),[o,r,n,t,i])},rI=["prefixCls","radius","pointer","className","hue","style","hsva","onChange"],ZS=te.forwardRef((e,t)=>{var n,{prefixCls:r="w-color-saturation",radius:o=0,pointer:i,className:s,hue:u=0,style:c,hsva:d,onChange:p}=e,g=So(e,rI),S=H({width:200,height:200,borderRadius:o},c,{position:"relative"}),w=(y,E)=>{p&&d&&p({h:d.h,s:y.left*100,v:(1-y.top)*100,a:d.a})},x=h.useMemo(()=>{if(!d)return null;var y={top:100-d.v+"%",left:d.s+"%",color:BS(d)};return i&&typeof i=="function"?i(H({prefixCls:r},y)):M.jsx(nI,H({prefixCls:r},y))},[d,i,r]);return M.jsx(YS,H({className:[r,s||""].filter(Boolean).join(" ")},g,{style:H({position:"absolute",inset:0,cursor:"crosshair",backgroundImage:"linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, hsl("+((n=d==null?void 0:d.h)!=null?n:u)+", 100%, 50%))"},S),ref:t,onMove:w,onDown:w,children:x}))});ZS.displayName="Saturation";const oI=ZS;var iI=["prefixCls","className","hue","onChange","direction"],JS=te.forwardRef((e,t)=>{var{prefixCls:n="w-color-hue",className:r,hue:o=0,onChange:i,direction:s="horizontal"}=e,u=So(e,iI);return M.jsx(qS,H({ref:t,className:n+" "+(r||"")},u,{direction:s,background:"linear-gradient(to "+(s==="horizontal"?"right":"bottom")+", rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)",hsva:{h:o,s:100,v:100,a:o/360},onChange:(c,d)=>{i&&i({h:s==="horizontal"?360*d.left:360*d.top})}}))});JS.displayName="Hue";const aI=JS;var sI=["style","color"],lI=["prefixCls","className","onChange","color","style","disableAlpha"],Rp=e=>{var{style:t,color:n}=e,r=So(e,sI),o=H({"--colorful-pointer-background-color":"#fff","--colorful-pointer-border":"2px solid #fff",height:28,width:28,position:"absolute",transform:"translate(-14px, -4px)",boxShadow:"0 2px 4px rgb(0 0 0 / 20%)",borderRadius:"50%",background:"url("+XS+")",backgroundColor:"var(--colorful-pointer-background-color)",border:"var(--colorful-pointer-border)",zIndex:1},t);return M.jsx("div",H({},r,{style:o,children:M.jsx("div",{style:{backgroundColor:n,borderRadius:"50%",height:" 100%",width:"100%"}})}))},ex=te.forwardRef((e,t)=>{var{prefixCls:n="w-color-colorful",className:r,onChange:o,color:i,style:s,disableAlpha:u}=e,c=So(e,lI),d=typeof i=="string"&&g2(i)?Eu(i):i||{},p=g=>o&&o(y2(g));return M.jsxs("div",H({ref:t,style:H({width:200,position:"relative"},s)},c,{className:n+" "+(r||""),children:[M.jsx(oI,{hsva:d,className:n,radius:"8px 8px 0 0",style:{width:"auto",height:150,minWidth:120,borderBottom:"12px solid #000"},pointer:g=>{var{left:S,top:w,color:x}=g;return M.jsx(Rp,{style:{left:S,top:w,transform:"translate(-16px, -16px)"},color:m2(d)})},onChange:g=>p(H({},d,g))}),M.jsx(aI,{hue:d.h,height:24,radius:u?"0 0 8px 8px":0,className:n,onChange:g=>p(H({},d,g)),pointer:g=>{var{left:S}=g;return M.jsx(Rp,{style:{left:S},color:"hsl("+(d.h||0)+"deg 100% 50%)"})}}),!u&&M.jsx(qS,{hsva:d,height:24,className:n,radius:"0 0 8px 8px",pointer:g=>{var{left:S}=g;return M.jsx(Rp,{style:{left:S},color:YO(d)})},onChange:g=>p(H({},d,g))})]}))});ex.displayName="Colorful";const uI=ex;function cI(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var dI=["prefixCls","className","color","colors","style","rectProps","onChange","addonAfter","addonBefore","rectRender"],tx=te.forwardRef((e,t)=>{var{prefixCls:n="w-color-swatch",className:r,color:o,colors:i=[],style:s,rectProps:u={},onChange:c,addonAfter:d,addonBefore:p,rectRender:g}=e,S=So(e,dI),w=H({"--swatch-background-color":"rgb(144, 19, 254)",background:"var(--swatch-background-color)",height:15,width:15,marginRight:5,marginBottom:5,cursor:"pointer",position:"relative",outline:"none",borderRadius:2},u.style),x=(y,E)=>{c&&c(Eu(y),y2(Eu(y)),E)};return M.jsxs("div",H({ref:t},S,{className:[n,r||""].filter(Boolean).join(" "),style:H({display:"flex",flexWrap:"wrap",position:"relative"},s),children:[p&&te.isValidElement(p)&&p,i&&Array.isArray(i)&&i.map((y,E)=>{var _="",C="";typeof y=="string"&&(_=y,C=y),typeof y=="object"&&y.color&&(_=y.title||y.color,C=y.color);var v=o&&o.toLocaleLowerCase()===C.toLocaleLowerCase();if(g)return g({key:E,title:_,color:C,checked:!!v,style:H({},w,{background:C}),onClick:k=>x(C,k)});var P=u.children&&te.isValidElement(u.children)?te.cloneElement(u.children,{color:C,checked:v}):null;return M.jsx("div",H({tabIndex:0,title:_,onClick:k=>x(C,k)},u,{children:P,style:H({},w,{background:C})}),E)}),d&&te.isValidElement(d)&&d]}))});tx.displayName="Swatch";const fI=tx;function hI(e){var{style:t,title:n,checked:r,color:o,onClick:i,rectProps:s}=e,u=h.useRef(null),c=h.useCallback(()=>{u.current.style.transform="scale(1.2)"},[]),d=h.useCallback(()=>{u.current.style.transform="scale(1)"},[]),p=H({"--circle-point-background-color":"#fff",height:r?"100%":0,width:r?"100%":0,borderRadius:"50%",backgroundColor:"var(--circle-point-background-color)",boxSizing:"border-box",transition:"height 100ms ease 0s, width 100ms ease 0s"},s.style);return M.jsx("div",{ref:u,onClick:i,onMouseEnter:c,onMouseLeave:d,title:n,style:H({},t,{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:3,borderRadius:"50%",marginRight:12,marginBottom:12,boxSizing:"border-box",transform:"scale(1)",boxShadow:o+" 0px 0px "+(r?5:0)+"px",transition:"transform 100ms ease 0s, box-shadow 100ms ease 0s"}),children:M.jsx("div",H({},s,{style:p}))})}var pI=["prefixCls","className","color","colors","rectProps","onChange"],nx=te.forwardRef((e,t)=>{var{prefixCls:n="w-color-circle",className:r,color:o,colors:i=[],rectProps:s={},onChange:u}=e,c=So(e,pI),d=typeof o=="string"&&g2(o)?Eu(o):o||{},p=o?m2(d):"";return M.jsx(fI,H({ref:t,colors:i,color:p},c,{className:[n,r].filter(Boolean).join(" "),rectRender:g=>{var S=H({},(cI(g),g));return M.jsx(hI,H({},S,{rectProps:s}))},onChange:g=>{u&&u(y2(g))}}))});nx.displayName="Circle";const gI=nx;var vI=typeof global=="object"&&global&&global.Object===Object&&global;const mI=vI;var yI=typeof self=="object"&&self&&self.Object===Object&&self,wI=mI||yI||Function("return this")();const SI=wI;var xI=SI.Symbol;const Mf=xI;var rx=Object.prototype,_I=rx.hasOwnProperty,CI=rx.toString,El=Mf?Mf.toStringTag:void 0;function bI(e){var t=_I.call(e,El),n=e[El];try{e[El]=void 0;var r=!0}catch{}var o=CI.call(e);return r&&(t?e[El]=n:delete e[El]),o}var EI=Object.prototype,PI=EI.toString;function $I(e){return PI.call(e)}var kI="[object Null]",RI="[object Undefined]",j6=Mf?Mf.toStringTag:void 0;function TI(e){return e==null?e===void 0?RI:kI:j6&&j6 in Object(e)?bI(e):$I(e)}function NI(e){return e!=null&&typeof e=="object"}var AI="[object Symbol]";function MI(e){return typeof e=="symbol"||NI(e)&&TI(e)==AI}var OI=/\s/;function II(e){for(var t=e.length;t--&&OI.test(e.charAt(t)););return t}var DI=/^\s+/;function LI(e){return e&&e.slice(0,II(e)+1).replace(DI,"")}function U6(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var V6=0/0,FI=/^[-+]0x[0-9a-f]+$/i,zI=/^0b[01]+$/i,jI=/^0o[0-7]+$/i,UI=parseInt;function Tp(e){if(typeof e=="number")return e;if(MI(e))return V6;if(U6(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=U6(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=LI(e);var n=zI.test(e);return n||jI.test(e)?UI(e.slice(2),n?2:8):FI.test(e)?V6:+e}function VI(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function GI(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Tp(n),n=n===n?n:0),t!==void 0&&(t=Tp(t),t=t===t?t:0),VI(Tp(e),t,n)}const BI=({item:e})=>{var c;const{getTheme:t,color:n,handleChangeComplete:r,paramsColor:o,params:i,setParams:s,handleRemoveCommand:u}=HO(e);return M.jsxs("div",{className:`border rounded-xl h-[50px] pl-2 pr-1 py-1 space-x-1 flex items-center justify-between ${t()==="dark"?"bg-neutral-900":"bg-neutral-200"} `,children:[M.jsxs("div",{className:"space-x-3 grid grid-cols-[1fr_1.8fr] justify-stretch items-center flex-grow",children:[M.jsxs("div",{className:"flex justify-stretch space-x-3 items-center flex-grow",children:[M.jsx("div",{className:"w-4 h-4",children:(e==null?void 0:e.statement)&&((c=s2.get(e.statement))==null?void 0:c.icon)}),M.jsx("div",{children:e.statement})]}),e.statement===Ie.pencolor&&M.jsx("div",{className:"flex",children:M.jsxs(PS,{children:[M.jsx($S,{asChild:!0,className:"p-4 w-full",children:M.jsx(Yo,{style:{backgroundColor:`rgb(${n.r},${n.g},${n.b})`},className:"rounded-xl relative z-30 ",children:"Pick color"})}),M.jsxs(i2,{className:"w-[290px] flex flex-col justify-center items-center p-4 h-[350px] space-y-4 z-50 ",children:[M.jsx(gI,{className:"mr-0 ml-3",colors:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#607d8b"],color:lv({...n,a:0}),onChange:r}),M.jsx(uI,{color:lv({...n,a:0}),disableAlpha:!0,onChange:r})]})]})}),e.statement!==Ie.pencolor&&M.jsx("div",{className:"flex",children:i&&i.map((d,p)=>M.jsx(GS,{type:"number",min:1,max:1e3,defaultValue:d||0,className:`${o[p]} ${t()==="dark"?"bg-neutral-800 ":"bg-neutral-300"}`,onChange:g=>s([...i.slice(0,p),GI(parseInt(g.target.value),1,1e3),...i.slice(p+1)])},p))})]}),M.jsx(Yo,{variant:"outline",className:"rounded-full w-6 h-6 p-3",onClick:u,children:M.jsx(HA,{className:"flex-e w-3 h-3 flex-shrink-0"})}),M.jsx("div",{children:M.jsx(GO,{children:M.jsx(NM,{})})})]})};function HI(e,t,n){const r=t<0?e.length+t:t;if(r>=0&&r{const{code:e,setCode:t,setSteps:n,turtlePosition:r,direction:o,speed:i,getTheme:s,open:u,setOpen:c}=Bt(["code","setCode","setSteps","turtlePosition","direction","speed","getTheme","open","setOpen"]);return h.useEffect(()=>{n(fh(e,r,o,i,s()))},[e]),h.useEffect(()=>{t(e.filter(p=>!p.error))},[]),{onSortEnd:(p,g)=>{t(WI(e,p,g))},code:e,setOpen:c,open:u}},YI=()=>{const{code:e,onSortEnd:t,setOpen:n}=KI();return M.jsx(M.Fragment,{children:M.jsx(Ds,{className:"h-calc-100-186 flex flex-grow relative overflow-visible p-5",children:M.jsxs(BO,{lockAxis:"y",draggedItemClassName:"dragged",className:"grid-cols-1 gap-3 grid w-full",onSortEnd:t,children:[e.map(r=>M.jsx(VO,{children:M.jsx("div",{children:M.jsx(BI,{item:r})})},r.id)),M.jsxs(Yo,{variant:"outline",onClick:()=>{n(!0)},className:"space-x-3",children:[M.jsx(GA,{className:"mr-2 h-4 w-4"})," ",M.jsx("span",{children:"Add block"}),M.jsxs("kbd",{className:"pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[M.jsx("span",{className:"text-xs",children:navigator.userAgent.indexOf("Mac OS X")!=-1?"⌘":"Ctrl + "}),"A"]})]})]})})})},XI=()=>{const{playAnimation:e,isCodeCorrect:t,isAnimating:n,pauseAnimation:r,code:o}=Bt(["playAnimation","isCodeCorrect","isAnimating","pauseAnimation","code"]),{cleanCode:i}=Fm();return{playAnimation:e,isCodeCorrect:t,isAnimating:n,pauseAnimation:r,cleanCode:i,code:o}},QI=()=>{const{playAnimation:e,isCodeCorrect:t,cleanCode:n,isAnimating:r,pauseAnimation:o,code:i}=XI();return M.jsxs(dR,{defaultValue:"code",className:"w-[370px] h-full space-y-3 flex flex-col ",children:[M.jsxs(q9,{className:"grid grid-cols-3 ",children:[M.jsx(Yd,{value:"code",children:"Code"}),M.jsx(Yd,{value:"blocks",children:"Blocks"}),M.jsx(Yd,{value:"settings",children:"Settings"})]}),M.jsxs(Dm,{className:"h-full p-2 relative",children:[M.jsx(Np,{value:"code",children:M.jsx(KR,{})}),M.jsx(Np,{value:"blocks",children:M.jsx(YI,{})}),M.jsx(Np,{value:"settings",children:M.jsx(aM,{})}),M.jsxs(PS,{children:[M.jsx($S,{asChild:!0,children:M.jsx(Yo,{variant:"outline",className:"rounded-3xl w-10 overflow-visible p-0 absolute right-2 z-30 top-2",children:M.jsx(MM,{className:"mr-0 h-4 w-4"})})}),M.jsx(i2,{className:"w-[350px]",children:M.jsx(AO,{})})]}),M.jsxs("div",{className:"px-5 space-x-3 flex pt-4 ",children:[M.jsxs(Yo,{variant:"outline",className:"flex-grow",onClick:()=>n(i),children:[M.jsx(wM,{className:"mr-2 h-4 w-4"}),"Clean code"]}),!r&&M.jsxs(Yo,{disabled:!t,onClick:e,variant:"outline",className:"flex-grow",children:[M.jsx(UM,{className:"mr-2 h-4 w-4"}),"Play animation"]}),r&&M.jsxs(Yo,{disabled:!t,onClick:o,variant:"outline",className:"flex-grow",children:[M.jsx(IM,{className:"mr-2 h-4 w-4"}),"Pause animation"]})]})]})]})},Np=({children:e,value:t})=>M.jsx(Z9,{className:"z-0",value:t,children:e});var ox={exports:{}},Ph={},Of={},Re={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const t=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof j3<"u"?j3:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.2.1",isBrowser:n(),isUnminified:/param/.test((function(o){}).toString()),dblClickWindow:400,getAngle(o){return e.Konva.angleDeg?o*t:o},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(o){e.glob.Konva=o}};const r=o=>{e.Konva[o.prototype.getClassName()]=o};e._registerNode=r,e.Konva._injectGlobal(e.Konva)})(Re);var ht={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=Re;class n{constructor(P=[1,0,0,1,0,0]){this.dirty=!1,this.m=P&&P.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new n(this.m)}copyInto(P){P.m[0]=this.m[0],P.m[1]=this.m[1],P.m[2]=this.m[2],P.m[3]=this.m[3],P.m[4]=this.m[4],P.m[5]=this.m[5]}point(P){var k=this.m;return{x:k[0]*P.x+k[2]*P.y+k[4],y:k[1]*P.x+k[3]*P.y+k[5]}}translate(P,k){return this.m[4]+=this.m[0]*P+this.m[2]*k,this.m[5]+=this.m[1]*P+this.m[3]*k,this}scale(P,k){return this.m[0]*=P,this.m[1]*=P,this.m[2]*=k,this.m[3]*=k,this}rotate(P){var k=Math.cos(P),T=Math.sin(P),N=this.m[0]*k+this.m[2]*T,R=this.m[1]*k+this.m[3]*T,I=this.m[0]*-T+this.m[2]*k,O=this.m[1]*-T+this.m[3]*k;return this.m[0]=N,this.m[1]=R,this.m[2]=I,this.m[3]=O,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(P,k){var T=this.m[0]+this.m[2]*k,N=this.m[1]+this.m[3]*k,R=this.m[2]+this.m[0]*P,I=this.m[3]+this.m[1]*P;return this.m[0]=T,this.m[1]=N,this.m[2]=R,this.m[3]=I,this}multiply(P){var k=this.m[0]*P.m[0]+this.m[2]*P.m[1],T=this.m[1]*P.m[0]+this.m[3]*P.m[1],N=this.m[0]*P.m[2]+this.m[2]*P.m[3],R=this.m[1]*P.m[2]+this.m[3]*P.m[3],I=this.m[0]*P.m[4]+this.m[2]*P.m[5]+this.m[4],O=this.m[1]*P.m[4]+this.m[3]*P.m[5]+this.m[5];return this.m[0]=k,this.m[1]=T,this.m[2]=N,this.m[3]=R,this.m[4]=I,this.m[5]=O,this}invert(){var P=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),k=this.m[3]*P,T=-this.m[1]*P,N=-this.m[2]*P,R=this.m[0]*P,I=P*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),O=P*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=k,this.m[1]=T,this.m[2]=N,this.m[3]=R,this.m[4]=I,this.m[5]=O,this}getMatrix(){return this.m}decompose(){var P=this.m[0],k=this.m[1],T=this.m[2],N=this.m[3],R=this.m[4],I=this.m[5],O=P*N-k*T;let D={x:R,y:I,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(P!=0||k!=0){var F=Math.sqrt(P*P+k*k);D.rotation=k>0?Math.acos(P/F):-Math.acos(P/F),D.scaleX=F,D.scaleY=O/F,D.skewX=(P*T+k*N)/O,D.skewY=0}else if(T!=0||N!=0){var G=Math.sqrt(T*T+N*N);D.rotation=Math.PI/2-(N>0?Math.acos(-T/G):-Math.acos(T/G)),D.scaleX=O/G,D.scaleY=G,D.skewX=0,D.skewY=(P*T+k*N)/O}return D.rotation=e.Util._getRotation(D.rotation),D}}e.Transform=n;var r="[object Array]",o="[object Number]",i="[object String]",s="[object Boolean]",u=Math.PI/180,c=180/Math.PI,d="#",p="",g="0",S="Konva warning: ",w="Konva error: ",x="rgb(",y={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},E=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,_=[];const C=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(v){setTimeout(v,60)};e.Util={_isElement(v){return!!(v&&v.nodeType==1)},_isFunction(v){return!!(v&&v.constructor&&v.call&&v.apply)},_isPlainObject(v){return!!v&&v.constructor===Object},_isArray(v){return Object.prototype.toString.call(v)===r},_isNumber(v){return Object.prototype.toString.call(v)===o&&!isNaN(v)&&isFinite(v)},_isString(v){return Object.prototype.toString.call(v)===i},_isBoolean(v){return Object.prototype.toString.call(v)===s},isObject(v){return v instanceof Object},isValidSelector(v){if(typeof v!="string")return!1;var P=v[0];return P==="#"||P==="."||P===P.toUpperCase()},_sign(v){return v===0||v>0?1:-1},requestAnimFrame(v){_.push(v),_.length===1&&C(function(){const P=_;_=[],P.forEach(function(k){k()})})},createCanvasElement(){var v=document.createElement("canvas");try{v.style=v.style||{}}catch{}return v},createImageElement(){return document.createElement("img")},_isInDocument(v){for(;v=v.parentNode;)if(v==document)return!0;return!1},_urlToImage(v,P){var k=e.Util.createImageElement();k.onload=function(){P(k)},k.src=v},_rgbToHex(v,P,k){return((1<<24)+(v<<16)+(P<<8)+k).toString(16).slice(1)},_hexToRgb(v){v=v.replace(d,p);var P=parseInt(v,16);return{r:P>>16&255,g:P>>8&255,b:P&255}},getRandomColor(){for(var v=(Math.random()*16777215<<0).toString(16);v.length<6;)v=g+v;return d+v},getRGB(v){var P;return v in y?(P=y[v],{r:P[0],g:P[1],b:P[2]}):v[0]===d?this._hexToRgb(v.substring(1)):v.substr(0,4)===x?(P=E.exec(v.replace(/ /g,"")),{r:parseInt(P[1],10),g:parseInt(P[2],10),b:parseInt(P[3],10)}):{r:0,g:0,b:0}},colorToRGBA(v){return v=v||"black",e.Util._namedColorToRBA(v)||e.Util._hex3ColorToRGBA(v)||e.Util._hex4ColorToRGBA(v)||e.Util._hex6ColorToRGBA(v)||e.Util._hex8ColorToRGBA(v)||e.Util._rgbColorToRGBA(v)||e.Util._rgbaColorToRGBA(v)||e.Util._hslColorToRGBA(v)},_namedColorToRBA(v){var P=y[v.toLowerCase()];return P?{r:P[0],g:P[1],b:P[2],a:1}:null},_rgbColorToRGBA(v){if(v.indexOf("rgb(")===0){v=v.match(/rgb\(([^)]+)\)/)[1];var P=v.split(/ *, */).map(Number);return{r:P[0],g:P[1],b:P[2],a:1}}},_rgbaColorToRGBA(v){if(v.indexOf("rgba(")===0){v=v.match(/rgba\(([^)]+)\)/)[1];var P=v.split(/ *, */).map((k,T)=>k.slice(-1)==="%"?T===3?parseInt(k)/100:parseInt(k)/100*255:Number(k));return{r:P[0],g:P[1],b:P[2],a:P[3]}}},_hex8ColorToRGBA(v){if(v[0]==="#"&&v.length===9)return{r:parseInt(v.slice(1,3),16),g:parseInt(v.slice(3,5),16),b:parseInt(v.slice(5,7),16),a:parseInt(v.slice(7,9),16)/255}},_hex6ColorToRGBA(v){if(v[0]==="#"&&v.length===7)return{r:parseInt(v.slice(1,3),16),g:parseInt(v.slice(3,5),16),b:parseInt(v.slice(5,7),16),a:1}},_hex4ColorToRGBA(v){if(v[0]==="#"&&v.length===5)return{r:parseInt(v[1]+v[1],16),g:parseInt(v[2]+v[2],16),b:parseInt(v[3]+v[3],16),a:parseInt(v[4]+v[4],16)/255}},_hex3ColorToRGBA(v){if(v[0]==="#"&&v.length===4)return{r:parseInt(v[1]+v[1],16),g:parseInt(v[2]+v[2],16),b:parseInt(v[3]+v[3],16),a:1}},_hslColorToRGBA(v){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(v)){const[P,...k]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(v),T=Number(k[0])/360,N=Number(k[1])/100,R=Number(k[2])/100;let I,O,D;if(N===0)return D=R*255,{r:Math.round(D),g:Math.round(D),b:Math.round(D),a:1};R<.5?I=R*(1+N):I=R+N-R*N;const F=2*R-I,G=[0,0,0];for(let U=0;U<3;U++)O=T+1/3*-(U-1),O<0&&O++,O>1&&O--,6*O<1?D=F+(I-F)*6*O:2*O<1?D=I:3*O<2?D=F+(I-F)*(2/3-O)*6:D=F,G[U]=D*255;return{r:Math.round(G[0]),g:Math.round(G[1]),b:Math.round(G[2]),a:1}}},haveIntersection(v,P){return!(P.x>v.x+v.width||P.x+P.widthv.y+v.height||P.y+P.height1?(I=k,O=T,D=(k-N)*(k-N)+(T-R)*(T-R)):(I=v+G*(k-v),O=P+G*(T-P),D=(I-N)*(I-N)+(O-R)*(O-R))}return[I,O,D]},_getProjectionToLine(v,P,k){var T=e.Util.cloneObject(v),N=Number.MAX_VALUE;return P.forEach(function(R,I){if(!(!k&&I===P.length-1)){var O=P[(I+1)%P.length],D=e.Util._getProjectionToSegment(R.x,R.y,O.x,O.y,v.x,v.y),F=D[0],G=D[1],U=D[2];UP.length){var I=P;P=v,v=I}for(T=0;T{P.width=0,P.height=0})},drawRoundedRectPath(v,P,k,T){let N=0,R=0,I=0,O=0;typeof T=="number"?N=R=I=O=Math.min(T,P/2,k/2):(N=Math.min(T[0]||0,P/2,k/2),R=Math.min(T[1]||0,P/2,k/2),O=Math.min(T[2]||0,P/2,k/2),I=Math.min(T[3]||0,P/2,k/2)),v.moveTo(N,0),v.lineTo(P-R,0),v.arc(P-R,R,R,Math.PI*3/2,0,!1),v.lineTo(P,k-O),v.arc(P-O,k-O,O,0,Math.PI/2,!1),v.lineTo(I,k),v.arc(I,k-I,I,Math.PI/2,Math.PI,!1),v.lineTo(0,N),v.arc(N,N,N,Math.PI,Math.PI*3/2,!1)}}})(ht);var st={},Te={},ge={};Object.defineProperty(ge,"__esModule",{value:!0});ge.getComponentValidator=ge.getBooleanValidator=ge.getNumberArrayValidator=ge.getFunctionValidator=ge.getStringOrGradientValidator=ge.getStringValidator=ge.getNumberOrAutoValidator=ge.getNumberOrArrayOfNumbersValidator=ge.getNumberValidator=ge.alphaComponent=ge.RGBComponent=void 0;const xo=Re,gt=ht;function _o(e){return gt.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||gt.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function qI(e){return e>255?255:e<0?0:Math.round(e)}ge.RGBComponent=qI;function ZI(e){return e>1?1:e<1e-4?1e-4:e}ge.alphaComponent=ZI;function JI(){if(xo.Konva.isUnminified)return function(e,t){return gt.Util._isNumber(e)||gt.Util.warn(_o(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}ge.getNumberValidator=JI;function eD(e){if(xo.Konva.isUnminified)return function(t,n){let r=gt.Util._isNumber(t),o=gt.Util._isArray(t)&&t.length==e;return!r&&!o&>.Util.warn(_o(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}ge.getNumberOrArrayOfNumbersValidator=eD;function tD(){if(xo.Konva.isUnminified)return function(e,t){var n=gt.Util._isNumber(e),r=e==="auto";return n||r||gt.Util.warn(_o(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}ge.getNumberOrAutoValidator=tD;function nD(){if(xo.Konva.isUnminified)return function(e,t){return gt.Util._isString(e)||gt.Util.warn(_o(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}ge.getStringValidator=nD;function rD(){if(xo.Konva.isUnminified)return function(e,t){const n=gt.Util._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||gt.Util.warn(_o(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}ge.getStringOrGradientValidator=rD;function oD(){if(xo.Konva.isUnminified)return function(e,t){return gt.Util._isFunction(e)||gt.Util.warn(_o(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}ge.getFunctionValidator=oD;function iD(){if(xo.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(gt.Util._isArray(e)?e.forEach(function(r){gt.Util._isNumber(r)||gt.Util.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):gt.Util.warn(_o(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}ge.getNumberArrayValidator=iD;function aD(){if(xo.Konva.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||gt.Util.warn(_o(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}ge.getBooleanValidator=aD;function sD(e){if(xo.Konva.isUnminified)return function(t,n){return t==null||gt.Util.isObject(t)||gt.Util.warn(_o(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}ge.getComponentValidator=sD;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=ht,n=ge;var r="get",o="set";e.Factory={addGetterSetter(i,s,u,c,d){e.Factory.addGetter(i,s,u),e.Factory.addSetter(i,s,c,d),e.Factory.addOverloadedGetterSetter(i,s)},addGetter(i,s,u){var c=r+t.Util._capitalize(s);i.prototype[c]=i.prototype[c]||function(){var d=this.attrs[s];return d===void 0?u:d}},addSetter(i,s,u,c){var d=o+t.Util._capitalize(s);i.prototype[d]||e.Factory.overWriteSetter(i,s,u,c)},overWriteSetter(i,s,u,c){var d=o+t.Util._capitalize(s);i.prototype[d]=function(p){return u&&p!==void 0&&p!==null&&(p=u.call(this,p,s)),this._setAttr(s,p),c&&c.call(this),this}},addComponentsGetterSetter(i,s,u,c,d){var p=u.length,g=t.Util._capitalize,S=r+g(s),w=o+g(s),x,y;i.prototype[S]=function(){var _={};for(x=0;x{this._setAttr(s+g(P),void 0)}),this._fireChangeEvent(s,C,_),d&&d.call(this),this},e.Factory.addOverloadedGetterSetter(i,s)},addOverloadedGetterSetter(i,s){var u=t.Util._capitalize(s),c=o+u,d=r+u;i.prototype[s]=function(){return arguments.length?(this[c](arguments[0]),this):this[d]()}},addDeprecatedGetterSetter(i,s,u,c){t.Util.error("Adding deprecated "+s);var d=r+t.Util._capitalize(s),p=s+" property is deprecated and will be removed soon. Look at Konva change log for more information.";i.prototype[d]=function(){t.Util.error(p);var g=this.attrs[s];return g===void 0?u:g},e.Factory.addSetter(i,s,c,function(){t.Util.error(p)}),e.Factory.addOverloadedGetterSetter(i,s)},backCompat(i,s){t.Util.each(s,function(u,c){var d=i.prototype[c],p=r+t.Util._capitalize(u),g=o+t.Util._capitalize(u);function S(){d.apply(this,arguments),t.Util.error('"'+u+'" method is deprecated and will be removed soon. Use ""'+c+'" instead.')}i.prototype[u]=S,i.prototype[p]=S,i.prototype[g]=S})},afterSetFilter(){this._filterUpToDate=!1}}})(Te);var wr={},ao={};Object.defineProperty(ao,"__esModule",{value:!0});ao.HitContext=ao.SceneContext=ao.Context=void 0;const ix=ht,lD=Re;function uD(e){var t=[],n=e.length,r=ix.Util,o,i;for(o=0;otypeof p=="number"?Math.floor(p):p)),i+=cD+d.join(G6)+dD)):(i+=u.property,t||(i+=vD+u.val)),i+=pD;return i}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=yD&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){const n=t.attrs.lineCap;n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){const n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,o,i,s){this._context.arc(t,n,r,o,i,s)}arcTo(t,n,r,o,i){this._context.arcTo(t,n,r,o,i)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,o,i,s){this._context.bezierCurveTo(t,n,r,o,i,s)}clearRect(t,n,r,o){this._context.clearRect(t,n,r,o)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,o){return this._context.createLinearGradient(t,n,r,o)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,o,i,s){return this._context.createRadialGradient(t,n,r,o,i,s)}drawImage(t,n,r,o,i,s,u,c,d){var p=arguments,g=this._context;p.length===3?g.drawImage(t,n,r):p.length===5?g.drawImage(t,n,r,o,i):p.length===9&&g.drawImage(t,n,r,o,i,s,u,c,d)}ellipse(t,n,r,o,i,s,u,c){this._context.ellipse(t,n,r,o,i,s,u,c)}isPointInPath(t,n,r,o){return r?this._context.isPointInPath(r,t,n,o):this._context.isPointInPath(t,n,o)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,n,r,o){this._context.fillRect(t,n,r,o)}strokeRect(t,n,r,o){this._context.strokeRect(t,n,r,o)}fillText(t,n,r,o){o?this._context.fillText(t,n,r,o):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,o){return this._context.getImageData(t,n,r,o)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,o){this._context.rect(t,n,r,o)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,o){this._context.quadraticCurveTo(t,n,r,o)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,o,i,s){this._context.setTransform(t,n,r,o,i,s)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,o){this._context.strokeText(t,n,r,o)}transform(t,n,r,o,i,s){this._context.transform(t,n,r,o,i,s)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=B6.length,r=this.setAttr,o,i,s=function(u){var c=t[u],d;t[u]=function(){return i=uD(Array.prototype.slice.call(arguments,0)),d=c.apply(t,arguments),t._trace({method:u,args:i}),d}};for(o=0;o{o.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){var r;return e.DD._dragElements.forEach(o=>{r=o.node}),r},_dragElements:new Map,_drag(r){const o=[];e.DD._dragElements.forEach((i,s)=>{const{node:u}=i,c=u.getStage();c.setPointersPositions(r),i.pointerId===void 0&&(i.pointerId=n.Util._getFirstPointerId(r));const d=c._changedPointerPositions.find(S=>S.id===i.pointerId);if(d){if(i.dragStatus!=="dragging"){var p=u.dragDistance(),g=Math.max(Math.abs(d.x-i.startPointerPos.x),Math.abs(d.y-i.startPointerPos.y));if(g{i.fire("dragmove",{type:"dragmove",target:i,evt:r},!0)})},_endDragBefore(r){const o=[];e.DD._dragElements.forEach(i=>{const{node:s}=i,u=s.getStage();if(r&&u.setPointersPositions(r),!u._changedPointerPositions.find(p=>p.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,i.dragStatus="stopped");const d=i.node.getLayer()||i.node instanceof t.Konva.Stage&&i.node;d&&o.indexOf(d)===-1&&o.push(d)}),o.forEach(i=>{i.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((o,i)=>{o.dragStatus==="stopped"&&o.node.fire("dragend",{type:"dragend",target:o.node,evt:r},!0),o.dragStatus!=="dragging"&&e.DD._dragElements.delete(i)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))})(Rh);Object.defineProperty(st,"__esModule",{value:!0});st.Node=void 0;const Oe=ht,Wu=Te,Ed=wr,Ii=Re,Vn=Rh,yt=ge;var ef="absoluteOpacity",Pd="allEventListeners",Zr="absoluteTransform",H6="absoluteScale",Di="canvas",PD="Change",$D="children",kD="konva",uv="listening",W6="mouseenter",K6="mouseleave",Y6="set",X6="Shape",tf=" ",Q6="stage",jo="transform",RD="Stage",cv="visible",TD=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(tf);let ND=1,be=class dv{constructor(t){this._id=ND++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===jo||t===Zr)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),o=t===jo||t===Zr,i=r===void 0||o&&r.dirty===!0;return i&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const o=n.map(i=>i+"Change.konva").join(tf);this.on(o,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Di)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Zr&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Di)){const{scene:t,filter:n,hit:r}=this._cache.get(Di);Oe.Util.releaseCanvas(t,n,r),this._cache.delete(Di)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var o=Math.ceil(n.width||r.width),i=Math.ceil(n.height||r.height),s=n.pixelRatio,u=n.x===void 0?Math.floor(r.x):n.x,c=n.y===void 0?Math.floor(r.y):n.y,d=n.offset||0,p=n.drawBorder||!1,g=n.hitCanvasPixelRatio||1;if(!o||!i){Oe.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}o+=d*2+1,i+=d*2+1,u-=d,c-=d;var S=new Ed.SceneCanvas({pixelRatio:s,width:o,height:i}),w=new Ed.SceneCanvas({pixelRatio:s,width:0,height:0,willReadFrequently:!0}),x=new Ed.HitCanvas({pixelRatio:g,width:o,height:i}),y=S.getContext(),E=x.getContext();return x.isCache=!0,S.isCache=!0,this._cache.delete(Di),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(S.getContext()._context.imageSmoothingEnabled=!1,w.getContext()._context.imageSmoothingEnabled=!1),y.save(),E.save(),y.translate(-u,-c),E.translate(-u,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache(ef),this._clearSelfAndDescendantCache(H6),this.drawScene(S,this),this.drawHit(x,this),this._isUnderCache=!1,y.restore(),E.restore(),p&&(y.save(),y.beginPath(),y.rect(0,0,o,i),y.closePath(),y.setAttr("strokeStyle","red"),y.setAttr("lineWidth",5),y.stroke(),y.restore()),this._cache.set(Di,{scene:S,filter:w,hit:x,x:u,y:c}),this._requestDraw(),this}isCached(){return this._cache.has(Di)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],o=1/0,i=1/0,s=-1/0,u=-1/0,c=this.getAbsoluteTransform(n);return r.forEach(function(d){var p=c.point(d);o===void 0&&(o=s=p.x,i=u=p.y),o=Math.min(o,p.x),i=Math.min(i,p.y),s=Math.max(s,p.x),u=Math.max(u,p.y)}),{x:o,y:i,width:s-o,height:u-i}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),o=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/o,r.height/o),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,o=n.filter,i=o.getContext(),s,u,c,d;if(t){if(!this._filterUpToDate){var p=r.pixelRatio;o.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(s=t.length,i.clear(),i.drawImage(r._canvas,0,0,r.getWidth()/p,r.getHeight()/p),u=i.getImageData(0,0,o.getWidth(),o.getHeight()),c=0;c{var n,r;if(!t)return this;for(n in t)n!==$D&&(r=Y6+Oe.Util._capitalize(n),Oe.Util._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(uv,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(cv,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),o=!1;Vn.DD._dragElements.forEach(s=>{s.dragStatus==="dragging"&&(s.node.nodeType==="Stage"||s.node.getLayer()===r)&&(o=!0)});var i=!n&&!Ii.Konva.hitOnDragEnabled&&o;return this.isListening()&&this.isVisible()&&!i}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,o,i,s,u;function c(p){for(o=[],i=p.length,s=0;s0&&o[0].getDepth()<=t&&c(o)}const d=this.getStage();return n.nodeType!==RD&&d&&c(d.getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(jo),this._clearSelfAndDescendantCache(Zr)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;var n=t.getPointerPosition();if(!n)return null;var r=this.getAbsoluteTransform().copy();return r.invert(),r.point(n)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var o=this.getAbsoluteTransform(t).getMatrix(),i=new Oe.Transform,s=this.offset();return i.m=o.slice(),i.translate(s.x,s.y),i.getTranslation()}setAbsolutePosition(t){const{x:n,y:r,...o}=this._clearTransform();this.attrs.x=n,this.attrs.y=r,this._clearCache(jo);var i=this._getAbsoluteTransform().copy();return i.invert(),i.translate(t.x,t.y),t={x:this.attrs.x+i.getTranslation().x,y:this.attrs.y+i.getTranslation().y},this._setTransform(o),this.setPosition({x:t.x,y:t.y}),this._clearCache(jo),this._clearSelfAndDescendantCache(Zr),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,o=this.x(),i=this.y();return n!==void 0&&(o+=n),r!==void 0&&(i+=r),this.setPosition({x:o,y:i}),this}_eachAncestorReverse(t,n){var r=[],o=this.getParent(),i,s;if(!(n&&n._id===this._id)){for(r.unshift(this);o&&(!n||o._id!==n._id);)r.unshift(o),o=o.parent;for(i=r.length,s=0;s0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return Oe.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return Oe.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&Oe.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(ef,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,o,i,s,u;t.attrs={};for(r in n)o=n[r],u=Oe.Util.isObject(o)&&!Oe.Util._isPlainObject(o)&&!Oe.Util._isArray(o),!u&&(i=typeof this[r]=="function"&&this[r],delete n[r],s=i?i.call(this):null,n[r]=o,s!==o&&(t.attrs[r]=o));return t.className=this.getClassName(),Oe.Util._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var o=[];n&&this._isMatch(t)&&o.push(this);for(var i=this.parent;i;){if(i===r)return o;i._isMatch(t)&&o.push(i),i=i.parent}return o}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,o,i;for(o=0;o{try{const o=t==null?void 0:t.callback;o&&delete t.callback,Oe.Util._urlToImage(this.toDataURL(t),function(i){n(i),o==null||o(i)})}catch(o){r(o)}})}toBlob(t){return new Promise((n,r)=>{try{const o=t==null?void 0:t.callback;o&&delete t.callback,this.toCanvas(t).toBlob(i=>{n(i),o==null||o(i)})}catch(o){r(o)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():Ii.Konva.dragDistance}_off(t,n,r){var o=this.eventListeners[t],i,s,u;for(i=0;i=0;if(r&&!this.isDragging()){var o=!1;Vn.DD._dragElements.forEach(i=>{this.isAncestorOf(i.node)&&(o=!0)}),o||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=Vn.DD._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",o=n&&n.dragStatus==="ready";r?this.stopDrag():o&&Vn.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return Oe.Util.haveIntersection(r,this.getClientRect())}static create(t,n){return Oe.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=dv.prototype.getClassName.call(t),o=t.children,i,s,u;n&&(t.attrs.container=n),Ii.Konva[r]||(Oe.Util.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const c=Ii.Konva[r];if(i=new c(t.attrs),o)for(s=o.length,u=0;u0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(o=>{const i=o._isMatch(t);return i&&r.push(o),!!(i&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const o of r){if(n=t(o),n)return!0;if(o.hasChildren()&&(n=o._descendants(t),n))return!0}return!1}toObject(){var t=Ap.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Ap.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(r=>{r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),o=t||r&&r.getCanvas(),i=o&&o.getContext(),s=this._getCanvasCache(),u=s&&s.scene,c=o&&o.isCache;if(!this.isVisible()&&!c)return this;if(u){i.save();var d=this.getAbsoluteTransform(n).getMatrix();i.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren("drawScene",o,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),o=t||r&&r.hitCanvas,i=o&&o.getContext(),s=this._getCanvasCache(),u=s&&s.hit;if(u){i.save();var c=this.getAbsoluteTransform(n).getMatrix();i.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedHitCanvas(i),i.restore()}else this._drawChildren("drawHit",o,n);return this}_drawChildren(t,n,r){var o,i=n&&n.getContext(),s=this.clipWidth(),u=this.clipHeight(),c=this.clipFunc(),d=s&&u||c;const p=r===this;if(d){i.save();var g=this.getAbsoluteTransform(r),S=g.getMatrix();i.transform(S[0],S[1],S[2],S[3],S[4],S[5]),i.beginPath();let E;if(c)E=c.call(this,i,this);else{var w=this.clipX(),x=this.clipY();i.rect(w,x,s,u)}i.clip.apply(i,E),S=g.copy().invert().getMatrix(),i.transform(S[0],S[1],S[2],S[3],S[4],S[5])}var y=!p&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";y&&(i.save(),i._applyGlobalCompositeOperation(this)),(o=this.children)===null||o===void 0||o.forEach(function(E){E[t](n,r)}),y&&i.restore(),d&&i.restore()}getClientRect(t={}){var n,r=t.skipTransform,o=t.relativeTo,i,s,u,c,d={x:1/0,y:1/0,width:0,height:0},p=this;(n=this.children)===null||n===void 0||n.forEach(function(y){if(y.visible()){var E=y.getClientRect({relativeTo:p,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(i===void 0?(i=E.x,s=E.y,u=E.x+E.width,c=E.y+E.height):(i=Math.min(i,E.x),s=Math.min(s,E.y),u=Math.max(u,E.x+E.width),c=Math.max(c,E.y+E.height)))}});for(var g=this.find("Shape"),S=!1,w=0;wPe.indexOf("pointer")>=0?"pointer":Pe.indexOf("touch")>=0?"touch":"mouse",J=Pe=>{const L=q(Pe);if(L==="pointer")return o.Konva.pointerEventsEnabled&&B.pointer;if(L==="touch")return B.touch;if(L==="mouse")return B.mouse};function ae(Pe={}){return(Pe.clipFunc||Pe.clipWidth||Pe.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),Pe}const pe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class Fe extends r.Container{constructor(L){super(ae(L)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{ae(this.attrs)}),this._checkVisibility()}_validateAdd(L){const ee=L.getType()==="Layer",se=L.getType()==="FastLayer";ee||se||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const L=this.visible()?"":"none";this.content.style.display=L}setContainer(L){if(typeof L===p){if(L.charAt(0)==="."){var ee=L.slice(1);L=document.getElementsByClassName(ee)[0]}else{var se;L.charAt(0)!=="#"?se=L:se=L.slice(1),L=document.getElementById(se)}if(!L)throw"Can not find container in document with id "+se}return this._setAttr("container",L),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),L.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var L=this.children,ee=L.length,se;for(se=0;se-1&&e.stages.splice(ee,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const L=this._pointerPositions[0]||this._changedPointerPositions[0];return L?{x:L.x,y:L.y}:(t.Util.warn(pe),null)}_getPointerById(L){return this._pointerPositions.find(ee=>ee.id===L)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(L){L=L||{},L.x=L.x||0,L.y=L.y||0,L.width=L.width||this.width(),L.height=L.height||this.height();var ee=new i.SceneCanvas({width:L.width,height:L.height,pixelRatio:L.pixelRatio||1}),se=ee.getContext()._context,ve=this.children;return(L.x||L.y)&&se.translate(-1*L.x,-1*L.y),ve.forEach(function(le){if(le.isVisible()){var me=le._toKonvaCanvas(L);se.drawImage(me._canvas,L.x,L.y,me.getWidth()/me.getPixelRatio(),me.getHeight()/me.getPixelRatio())}}),ee}getIntersection(L){if(!L)return null;var ee=this.children,se=ee.length,ve=se-1,le;for(le=ve;le>=0;le--){const me=ee[le].getIntersection(L);if(me)return me}return null}_resizeDOM(){var L=this.width(),ee=this.height();this.content&&(this.content.style.width=L+g,this.content.style.height=ee+g),this.bufferCanvas.setSize(L,ee),this.bufferHitCanvas.setSize(L,ee),this.children.forEach(se=>{se.setSize({width:L,height:ee}),se.draw()})}add(L,...ee){if(arguments.length>1){for(var se=0;seY&&t.Util.warn("The stage has "+ve+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),L.setSize({width:this.width(),height:this.height()}),L.draw(),o.Konva.isBrowser&&this.content.appendChild(L.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(L){return c.hasPointerCapture(L,this)}setPointerCapture(L){c.setPointerCapture(L,this)}releaseCapture(L){c.releaseCapture(L,this)}getLayers(){return this.children}_bindContentEvents(){o.Konva.isBrowser&&z.forEach(([L,ee])=>{this.content.addEventListener(L,se=>{this[ee](se)},{passive:!1})})}_pointerenter(L){this.setPointersPositions(L);const ee=J(L.type);ee&&this._fire(ee.pointerenter,{evt:L,target:this,currentTarget:this})}_pointerover(L){this.setPointersPositions(L);const ee=J(L.type);ee&&this._fire(ee.pointerover,{evt:L,target:this,currentTarget:this})}_getTargetShape(L){let ee=this[L+"targetShape"];return ee&&!ee.getStage()&&(ee=null),ee}_pointerleave(L){const ee=J(L.type),se=q(L.type);if(ee){this.setPointersPositions(L);var ve=this._getTargetShape(se),le=!s.DD.isDragging||o.Konva.hitOnDragEnabled;ve&&le?(ve._fireAndBubble(ee.pointerout,{evt:L}),ve._fireAndBubble(ee.pointerleave,{evt:L}),this._fire(ee.pointerleave,{evt:L,target:this,currentTarget:this}),this[se+"targetShape"]=null):le&&(this._fire(ee.pointerleave,{evt:L,target:this,currentTarget:this}),this._fire(ee.pointerout,{evt:L,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(L){const ee=J(L.type),se=q(L.type);if(ee){this.setPointersPositions(L);var ve=!1;this._changedPointerPositions.forEach(le=>{var me=this.getIntersection(le);if(s.DD.justDragged=!1,o.Konva["_"+se+"ListenClick"]=!0,!me||!me.isListening())return;o.Konva.capturePointerEventsEnabled&&me.setPointerCapture(le.id),this[se+"ClickStartShape"]=me,me._fireAndBubble(ee.pointerdown,{evt:L,pointerId:le.id}),ve=!0;const $e=L.type.indexOf("touch")>=0;me.preventDefault()&&L.cancelable&&$e&&L.preventDefault()}),ve||this._fire(ee.pointerdown,{evt:L,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(L){const ee=J(L.type),se=q(L.type);if(!ee)return;s.DD.isDragging&&s.DD.node.preventDefault()&&L.cancelable&&L.preventDefault(),this.setPointersPositions(L);var ve=!s.DD.isDragging||o.Konva.hitOnDragEnabled;if(!ve)return;var le={};let me=!1;var $e=this._getTargetShape(se);this._changedPointerPositions.forEach(rt=>{const Ae=c.getCapturedShape(rt.id)||this.getIntersection(rt),tn=rt.id,Dt={evt:L,pointerId:tn};var br=$e!==Ae;if(br&&$e&&($e._fireAndBubble(ee.pointerout,{...Dt},Ae),$e._fireAndBubble(ee.pointerleave,{...Dt},Ae)),Ae){if(le[Ae._id])return;le[Ae._id]=!0}Ae&&Ae.isListening()?(me=!0,br&&(Ae._fireAndBubble(ee.pointerover,{...Dt},$e),Ae._fireAndBubble(ee.pointerenter,{...Dt},$e),this[se+"targetShape"]=Ae),Ae._fireAndBubble(ee.pointermove,{...Dt})):$e&&(this._fire(ee.pointerover,{evt:L,target:this,currentTarget:this,pointerId:tn}),this[se+"targetShape"]=null)}),me||this._fire(ee.pointermove,{evt:L,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(L){const ee=J(L.type),se=q(L.type);if(!ee)return;this.setPointersPositions(L);const ve=this[se+"ClickStartShape"],le=this[se+"ClickEndShape"];var me={};let $e=!1;this._changedPointerPositions.forEach(rt=>{const Ae=c.getCapturedShape(rt.id)||this.getIntersection(rt);if(Ae){if(Ae.releaseCapture(rt.id),me[Ae._id])return;me[Ae._id]=!0}const tn=rt.id,Dt={evt:L,pointerId:tn};let br=!1;o.Konva["_"+se+"InDblClickWindow"]?(br=!0,clearTimeout(this[se+"DblTimeout"])):s.DD.justDragged||(o.Konva["_"+se+"InDblClickWindow"]=!0,clearTimeout(this[se+"DblTimeout"])),this[se+"DblTimeout"]=setTimeout(function(){o.Konva["_"+se+"InDblClickWindow"]=!1},o.Konva.dblClickWindow),Ae&&Ae.isListening()?($e=!0,this[se+"ClickEndShape"]=Ae,Ae._fireAndBubble(ee.pointerup,{...Dt}),o.Konva["_"+se+"ListenClick"]&&ve&&ve===Ae&&(Ae._fireAndBubble(ee.pointerclick,{...Dt}),br&&le&&le===Ae&&Ae._fireAndBubble(ee.pointerdblclick,{...Dt}))):(this[se+"ClickEndShape"]=null,o.Konva["_"+se+"ListenClick"]&&this._fire(ee.pointerclick,{evt:L,target:this,currentTarget:this,pointerId:tn}),br&&this._fire(ee.pointerdblclick,{evt:L,target:this,currentTarget:this,pointerId:tn}))}),$e||this._fire(ee.pointerup,{evt:L,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),o.Konva["_"+se+"ListenClick"]=!1,L.cancelable&&se!=="touch"&&L.preventDefault()}_contextmenu(L){this.setPointersPositions(L);var ee=this.getIntersection(this.getPointerPosition());ee&&ee.isListening()?ee._fireAndBubble(F,{evt:L}):this._fire(F,{evt:L,target:this,currentTarget:this})}_wheel(L){this.setPointersPositions(L);var ee=this.getIntersection(this.getPointerPosition());ee&&ee.isListening()?ee._fireAndBubble(oe,{evt:L}):this._fire(oe,{evt:L,target:this,currentTarget:this})}_pointercancel(L){this.setPointersPositions(L);const ee=c.getCapturedShape(L.pointerId)||this.getIntersection(this.getPointerPosition());ee&&ee._fireAndBubble(k,c.createEvent(L)),c.releaseCapture(L.pointerId)}_lostpointercapture(L){c.releaseCapture(L.pointerId)}setPointersPositions(L){var ee=this._getContentPosition(),se=null,ve=null;L=L||window.event,L.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(L.touches,le=>{this._pointerPositions.push({id:le.identifier,x:(le.clientX-ee.left)/ee.scaleX,y:(le.clientY-ee.top)/ee.scaleY})}),Array.prototype.forEach.call(L.changedTouches||L.touches,le=>{this._changedPointerPositions.push({id:le.identifier,x:(le.clientX-ee.left)/ee.scaleX,y:(le.clientY-ee.top)/ee.scaleY})})):(se=(L.clientX-ee.left)/ee.scaleX,ve=(L.clientY-ee.top)/ee.scaleY,this.pointerPos={x:se,y:ve},this._pointerPositions=[{x:se,y:ve,id:t.Util._getFirstPointerId(L)}],this._changedPointerPositions=[{x:se,y:ve,id:t.Util._getFirstPointerId(L)}])}_setPointerPosition(L){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(L)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var L=this.content.getBoundingClientRect();return{top:L.top,left:L.left,scaleX:L.width/this.content.clientWidth||1,scaleY:L.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new i.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new i.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!o.Konva.isBrowser){var L=this.container();if(!L)throw"Stage has no container. A container is required.";L.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),L.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(L){L.batchDraw()}),this}}e.Stage=Fe,Fe.prototype.nodeType=d,(0,u._registerNode)(Fe),n.Factory.addGetterSetter(Fe,"container")})(lx);var Ku={},$t={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=Re,n=ht,r=Te,o=st,i=ge,s=Re,u=Pn;var c="hasShadow",d="shadowRGBA",p="patternImage",g="linearGradient",S="radialGradient";let w;function x(){return w||(w=n.Util.createCanvasElement().getContext("2d"),w)}e.shapes={};function y(I){const O=this.attrs.fillRule;O?I.fill(O):I.fill()}function E(I){I.stroke()}function _(I){I.fill()}function C(I){I.stroke()}function v(){this._clearCache(c)}function P(){this._clearCache(d)}function k(){this._clearCache(p)}function T(){this._clearCache(g)}function N(){this._clearCache(S)}class R extends o.Node{constructor(O){super(O);let D;for(;D=n.Util.getRandomColor(),!(D&&!(D in e.shapes)););this.colorKey=D,e.shapes[D]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(c,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(p,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var O=x();const D=O.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(D&&D.setTransform){const F=new n.Transform;F.translate(this.fillPatternX(),this.fillPatternY()),F.rotate(t.Konva.getAngle(this.fillPatternRotation())),F.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),F.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const G=F.getMatrix(),U=typeof DOMMatrix>"u"?{a:G[0],b:G[1],c:G[2],d:G[3],e:G[4],f:G[5]}:new DOMMatrix(G);D.setTransform(U)}return D}}_getLinearGradient(){return this._getCache(g,this.__getLinearGradient)}__getLinearGradient(){var O=this.fillLinearGradientColorStops();if(O){for(var D=x(),F=this.fillLinearGradientStartPoint(),G=this.fillLinearGradientEndPoint(),U=D.createLinearGradient(F.x,F.y,G.x,G.y),X=0;Xthis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const O=this.hitStrokeWidth();return O==="auto"?this.hasStroke():this.strokeEnabled()&&!!O}intersects(O){var D=this.getStage();if(!D)return!1;const F=D.bufferHitCanvas;return F.getContext().clear(),this.drawHit(F,void 0,!0),F.context.getImageData(Math.round(O.x),Math.round(O.y),1,1).data[3]>0}destroy(){return o.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(O){var D;if(!this.getStage()||!((D=this.attrs.perfectDrawEnabled)!==null&&D!==void 0?D:!0))return!1;const G=O||this.hasFill(),U=this.hasStroke(),X=this.getAbsoluteOpacity()!==1;if(G&&U&&X)return!0;const Z=this.hasShadow(),oe=this.shadowForStrokeEnabled();return!!(G&&U&&Z&&oe)}setStrokeHitEnabled(O){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),O?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var O=this.size();return{x:this._centroid?-O.width/2:0,y:this._centroid?-O.height/2:0,width:O.width,height:O.height}}getClientRect(O={}){const D=O.skipTransform,F=O.relativeTo,G=this.getSelfRect(),X=!O.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,Z=G.width+X,oe=G.height+X,Y=!O.skipShadow&&this.hasShadow(),z=Y?this.shadowOffsetX():0,B=Y?this.shadowOffsetY():0,q=Z+Math.abs(z),J=oe+Math.abs(B),ae=Y&&this.shadowBlur()||0,pe=q+ae*2,Fe=J+ae*2,Pe={width:pe,height:Fe,x:-(X/2+ae)+Math.min(z,0)+G.x,y:-(X/2+ae)+Math.min(B,0)+G.y};return D?Pe:this._transformedRect(Pe,F)}drawScene(O,D){var F=this.getLayer(),G=O||F.getCanvas(),U=G.getContext(),X=this._getCanvasCache(),Z=this.getSceneFunc(),oe=this.hasShadow(),Y,z,B,q=G.isCache,J=D===this;if(!this.isVisible()&&!J)return this;if(X){U.save();var ae=this.getAbsoluteTransform(D).getMatrix();return U.transform(ae[0],ae[1],ae[2],ae[3],ae[4],ae[5]),this._drawCachedSceneCanvas(U),U.restore(),this}if(!Z)return this;if(U.save(),this._useBufferCanvas()&&!q){Y=this.getStage(),z=Y.bufferCanvas,B=z.getContext(),B.clear(),B.save(),B._applyLineJoin(this);var pe=this.getAbsoluteTransform(D).getMatrix();B.transform(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5]),Z.call(this,B,this),B.restore();var Fe=z.pixelRatio;oe&&U._applyShadow(this),U._applyOpacity(this),U._applyGlobalCompositeOperation(this),U.drawImage(z._canvas,0,0,z.width/Fe,z.height/Fe)}else{if(U._applyLineJoin(this),!J){var pe=this.getAbsoluteTransform(D).getMatrix();U.transform(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5]),U._applyOpacity(this),U._applyGlobalCompositeOperation(this)}oe&&U._applyShadow(this),Z.call(this,U,this)}return U.restore(),this}drawHit(O,D,F=!1){if(!this.shouldDrawHit(D,F))return this;var G=this.getLayer(),U=O||G.hitCanvas,X=U&&U.getContext(),Z=this.hitFunc()||this.sceneFunc(),oe=this._getCanvasCache(),Y=oe&&oe.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),Y){X.save();var z=this.getAbsoluteTransform(D).getMatrix();return X.transform(z[0],z[1],z[2],z[3],z[4],z[5]),this._drawCachedHitCanvas(X),X.restore(),this}if(!Z)return this;if(X.save(),X._applyLineJoin(this),!(this===D)){var q=this.getAbsoluteTransform(D).getMatrix();X.transform(q[0],q[1],q[2],q[3],q[4],q[5])}return Z.call(this,X,this),X.restore(),this}drawHitFromCache(O=0){var D=this._getCanvasCache(),F=this._getCachedSceneCanvas(),G=D.hit,U=G.getContext(),X=G.getWidth(),Z=G.getHeight(),oe,Y,z,B,q,J;U.clear(),U.drawImage(F._canvas,0,0,X,Z);try{for(oe=U.getImageData(0,0,X,Z),Y=oe.data,z=Y.length,B=n.Util._hexToRgb(this.colorKey),q=0;qO?(Y[q]=B.r,Y[q+1]=B.g,Y[q+2]=B.b,Y[q+3]=255):Y[q+3]=0;U.putImageData(oe,0,0)}catch(ae){n.Util.error("Unable to draw hit graph from cached scene canvas. "+ae.message)}return this}hasPointerCapture(O){return u.hasPointerCapture(O,this)}setPointerCapture(O){u.setPointerCapture(O,this)}releaseCapture(O){u.releaseCapture(O,this)}}e.Shape=R,R.prototype._fillFunc=y,R.prototype._strokeFunc=E,R.prototype._fillFuncHit=_,R.prototype._strokeFuncHit=C,R.prototype._centroid=!1,R.prototype.nodeType="Shape",(0,s._registerNode)(R),R.prototype.eventListeners={},R.prototype.on.call(R.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",v),R.prototype.on.call(R.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",P),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",k),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",T),R.prototype.on.call(R.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",N),r.Factory.addGetterSetter(R,"stroke",void 0,(0,i.getStringOrGradientValidator)()),r.Factory.addGetterSetter(R,"strokeWidth",2,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(R,"hitStrokeWidth","auto",(0,i.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(R,"strokeHitEnabled",!0,(0,i.getBooleanValidator)()),r.Factory.addGetterSetter(R,"perfectDrawEnabled",!0,(0,i.getBooleanValidator)()),r.Factory.addGetterSetter(R,"shadowForStrokeEnabled",!0,(0,i.getBooleanValidator)()),r.Factory.addGetterSetter(R,"lineJoin"),r.Factory.addGetterSetter(R,"lineCap"),r.Factory.addGetterSetter(R,"sceneFunc"),r.Factory.addGetterSetter(R,"hitFunc"),r.Factory.addGetterSetter(R,"dash"),r.Factory.addGetterSetter(R,"dashOffset",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowColor",void 0,(0,i.getStringValidator)()),r.Factory.addGetterSetter(R,"shadowBlur",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowOpacity",1,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(R,"shadowOffsetX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(R,"shadowOffsetY",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternImage"),r.Factory.addGetterSetter(R,"fill",void 0,(0,i.getStringOrGradientValidator)()),r.Factory.addGetterSetter(R,"fillPatternX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternY",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(R,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(R,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(R,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(R,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(R,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(R,"fillEnabled",!0),r.Factory.addGetterSetter(R,"strokeEnabled",!0),r.Factory.addGetterSetter(R,"shadowEnabled",!0),r.Factory.addGetterSetter(R,"dashEnabled",!0),r.Factory.addGetterSetter(R,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(R,"fillPriority","color"),r.Factory.addComponentsGetterSetter(R,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(R,"fillPatternOffsetX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternOffsetY",0,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(R,"fillPatternScaleX",1,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(R,"fillPatternScaleY",1,(0,i.getNumberValidator)()),r.Factory.addComponentsGetterSetter(R,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(R,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(R,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(R,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(R,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(R,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(R,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(R,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(R,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(R,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(R,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(R,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(R,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(R,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(R,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(R,"fillPatternRotation",0),r.Factory.addGetterSetter(R,"fillRule",void 0,(0,i.getStringValidator)()),r.Factory.backCompat(R,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})($t);Object.defineProperty(Ku,"__esModule",{value:!0});Ku.Layer=void 0;const qr=ht,Mp=la,La=st,S2=Te,q6=wr,DD=ge,LD=$t,FD=Re;var zD="#",jD="beforeDraw",UD="draw",dx=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],VD=dx.length;let Gs=class extends Mp.Container{constructor(t){super(t),this.canvas=new q6.SceneCanvas,this.hitCanvas=new q6.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let o=0;o0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),o=t||r&&r.getCanvas();return this._fire(jD,{node:this}),this.clearBeforeDraw()&&o.getContext().clear(),Mp.Container.prototype.drawScene.call(this,o,n),this._fire(UD,{node:this}),this}drawHit(t,n){var r=this.getLayer(),o=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),Mp.Container.prototype.drawHit.call(this,o,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){qr.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return qr.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return qr.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};Ku.Layer=Gs;Gs.prototype.nodeType="Layer";(0,FD._registerNode)(Gs);S2.Factory.addGetterSetter(Gs,"imageSmoothingEnabled",!0);S2.Factory.addGetterSetter(Gs,"clearBeforeDraw",!0);S2.Factory.addGetterSetter(Gs,"hitGraphEnabled",!0,(0,DD.getBooleanValidator)());var Nh={};Object.defineProperty(Nh,"__esModule",{value:!0});Nh.FastLayer=void 0;const GD=ht,BD=Ku,HD=Re;class x2 extends BD.Layer{constructor(t){super(t),this.listening(!1),GD.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Nh.FastLayer=x2;x2.prototype.nodeType="FastLayer";(0,HD._registerNode)(x2);var Bs={};Object.defineProperty(Bs,"__esModule",{value:!0});Bs.Group=void 0;const WD=ht,KD=la,YD=Re;class _2 extends KD.Container{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&WD.Util.throw("You may only add groups and shapes to groups.")}}Bs.Group=_2;_2.prototype.nodeType="Group";(0,YD._registerNode)(_2);var Hs={};Object.defineProperty(Hs,"__esModule",{value:!0});Hs.Animation=void 0;const Op=Re,Z6=ht,Ip=function(){return Op.glob.performance&&Op.glob.performance.now?function(){return Op.glob.performance.now()}:function(){return new Date().getTime()}}();let Ah=class Ga{constructor(t,n){this.id=Ga.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Ip(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){let n=[];return t&&(n=Array.isArray(t)?t:[t]),this.layers=n,this}getLayers(){return this.layers}addLayer(t){const n=this.layers,r=n.length;for(let o=0;othis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():x<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=x,this.update())}getTime(){return this._time}setPosition(x){this.prevPos=this._pos,this.propFunc(x),this._pos=x}getPosition(x){return x===void 0&&(x=this._time),this.func(x,this.begin,this._change,this.duration)}play(){this.state=u,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=c,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(x){this.pause(),this._time=x,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var x=this.getTimer()-this._startTime;this.state===u?this.setTime(x):this.state===c&&this.setTime(this.duration-x)}pause(){this.state=s,this.fire("onPause")}getTimer(){return new Date().getTime()}}class S{constructor(x){var y=this,E=x.node,_=E._id,C,v=x.easing||e.Easings.Linear,P=!!x.yoyo,k;typeof x.duration>"u"?C=.3:x.duration===0?C=.001:C=x.duration,this.node=E,this._id=d++;var T=E.getLayer()||(E instanceof o.Konva.Stage?E.getLayers():null);T||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){y.tween.onEnterFrame()},T),this.tween=new g(k,function(N){y._tweenFunc(N)},v,0,1,C*1e3,P),this._addListeners(),S.attrs[_]||(S.attrs[_]={}),S.attrs[_][this._id]||(S.attrs[_][this._id]={}),S.tweens[_]||(S.tweens[_]={});for(k in x)i[k]===void 0&&this._addAttr(k,x[k]);this.reset(),this.onFinish=x.onFinish,this.onReset=x.onReset,this.onUpdate=x.onUpdate}_addAttr(x,y){var E=this.node,_=E._id,C,v,P,k,T,N,R,I;if(P=S.tweens[_][x],P&&delete S.attrs[_][P][x],C=E.getAttr(x),t.Util._isArray(y))if(v=[],T=Math.max(y.length,C.length),x==="points"&&y.length!==C.length&&(y.length>C.length?(R=C,C=t.Util._prepareArrayForTween(C,y,E.closed())):(N=y,y=t.Util._prepareArrayForTween(y,C,E.closed()))),x.indexOf("fill")===0)for(k=0;k{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var x=this.node,y=S.attrs[x._id][this._id];y.points&&y.points.trueEnd&&x.setAttr("points",y.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var x=this.node,y=S.attrs[x._id][this._id];y.points&&y.points.trueStart&&x.points(y.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(x){return this.tween.seek(x*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var x=this.node._id,y=this._id,E=S.tweens[x],_;this.pause();for(_ in E)delete S.tweens[x][_];delete S.attrs[x][y]}}e.Tween=S,S.attrs={},S.tweens={},r.Node.prototype.to=function(w){var x=w.onFinish;w.node=this,w.onFinish=function(){this.destroy(),x&&x()};var y=new S(w);y.play()},e.Easings={BackEaseIn(w,x,y,E){var _=1.70158;return y*(w/=E)*w*((_+1)*w-_)+x},BackEaseOut(w,x,y,E){var _=1.70158;return y*((w=w/E-1)*w*((_+1)*w+_)+1)+x},BackEaseInOut(w,x,y,E){var _=1.70158;return(w/=E/2)<1?y/2*(w*w*(((_*=1.525)+1)*w-_))+x:y/2*((w-=2)*w*(((_*=1.525)+1)*w+_)+2)+x},ElasticEaseIn(w,x,y,E,_,C){var v=0;return w===0?x:(w/=E)===1?x+y:(C||(C=E*.3),!_||_0?t:n),p=s*n,g=u*(u>0?t:n),S=c*(c>0?n:t);return{x:d,y:r?-1*S:g,width:p-d,height:S-g}}}Mh.Arc=Co;Co.prototype._centroid=!0;Co.prototype.className="Arc";Co.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,QD._registerNode)(Co);Oh.Factory.addGetterSetter(Co,"innerRadius",0,(0,Ih.getNumberValidator)());Oh.Factory.addGetterSetter(Co,"outerRadius",0,(0,Ih.getNumberValidator)());Oh.Factory.addGetterSetter(Co,"angle",0,(0,Ih.getNumberValidator)());Oh.Factory.addGetterSetter(Co,"clockwise",!1,(0,Ih.getBooleanValidator)());var Dh={},Yu={};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.Line=void 0;const Lh=Te,qD=$t,hx=ge,ZD=Re;function fv(e,t,n,r,o,i,s){var u=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),c=Math.sqrt(Math.pow(o-n,2)+Math.pow(i-r,2)),d=s*u/(u+c),p=s*c/(u+c),g=n-d*(o-e),S=r-d*(i-t),w=n+p*(o-e),x=r+p*(i-t);return[g,S,w,x]}function ey(e,t){var n=e.length,r=[],o,i;for(o=2;o4){for(u=this.getTensionPoints(),c=u.length,d=i?0:4,i||t.quadraticCurveTo(u[0],u[1],u[2],u[3]);d{let d,p,g;d=c/2,p=0;for(let w=0;w<20;w++)g=d*e.tValues[20][w]+d,p+=e.cValues[20][w]*r(s,u,g);return d*p};e.getCubicArcLength=t;const n=(s,u,c)=>{c===void 0&&(c=1);const d=s[0]-2*s[1]+s[2],p=u[0]-2*u[1]+u[2],g=2*s[1]-2*s[0],S=2*u[1]-2*u[0],w=4*(d*d+p*p),x=4*(d*g+p*S),y=g*g+S*S;if(w===0)return c*Math.sqrt(Math.pow(s[2]-s[0],2)+Math.pow(u[2]-u[0],2));const E=x/(2*w),_=y/w,C=c+E,v=_-E*E,P=C*C+v>0?Math.sqrt(C*C+v):0,k=E*E+v>0?Math.sqrt(E*E+v):0,T=E+Math.sqrt(E*E+v)!==0?v*Math.log(Math.abs((C+P)/(E+k))):0;return Math.sqrt(w)/2*(C*P-E*k+T)};e.getQuadraticArcLength=n;function r(s,u,c){const d=o(1,c,s),p=o(1,c,u),g=d*d+p*p;return Math.sqrt(g)}const o=(s,u,c)=>{const d=c.length-1;let p,g;if(d===0)return 0;if(s===0){g=0;for(let S=0;S<=d;S++)g+=e.binomialCoefficients[d][S]*Math.pow(1-u,d-S)*Math.pow(u,S)*c[S];return g}else{p=new Array(d);for(let S=0;S{let d=1,p=s/u,g=(s-c(p))/u,S=0;for(;d>.001;){const w=c(p+g),x=Math.abs(s-w)/u;if(x500)break}return p};e.t2length=i})(px);Object.defineProperty(Ws,"__esModule",{value:!0});Ws.Path=void 0;const JD=Te,eL=$t,tL=Re,Fa=px;class bt extends eL.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=bt.parsePathData(this.data()),this.pathLength=bt.getPathLength(this.dataArray)}_sceneFunc(t){var n=this.dataArray;t.beginPath();for(var r=!1,o=0;op?d:p,E=d>p?1:d/p,_=d>p?p/d:1;t.translate(u,c),t.rotate(w),t.scale(E,_),t.arc(0,0,y,g,g+S,1-x),t.scale(1/E,1/_),t.rotate(-w),t.translate(-u,-c);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(d){if(d.command==="A"){var p=d.points[4],g=d.points[5],S=d.points[4]+g,w=Math.PI/180;if(Math.abs(p-S)S;x-=w){const y=bt.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],x,0);t.push(y.x,y.y)}else for(let x=p+w;xn[o].pathLength;)t-=n[o].pathLength,++o;if(o===i)return r=n[o-1].points.slice(-2),{x:r[0],y:r[1]};if(t<.01)return r=n[o].points.slice(0,2),{x:r[0],y:r[1]};var s=n[o],u=s.points;switch(s.command){case"L":return bt.getPointOnLine(t,s.start.x,s.start.y,u[0],u[1]);case"C":return bt.getPointOnCubicBezier((0,Fa.t2length)(t,bt.getPathLength(n),y=>(0,Fa.getCubicArcLength)([s.start.x,u[0],u[2],u[4]],[s.start.y,u[1],u[3],u[5]],y)),s.start.x,s.start.y,u[0],u[1],u[2],u[3],u[4],u[5]);case"Q":return bt.getPointOnQuadraticBezier((0,Fa.t2length)(t,bt.getPathLength(n),y=>(0,Fa.getQuadraticArcLength)([s.start.x,u[0],u[2]],[s.start.y,u[1],u[3]],y)),s.start.x,s.start.y,u[0],u[1],u[2],u[3]);case"A":var c=u[0],d=u[1],p=u[2],g=u[3],S=u[4],w=u[5],x=u[6];return S+=w*t/s.pathLength,bt.getPointOnEllipticalArc(c,d,p,g,S,x)}return null}static getPointOnLine(t,n,r,o,i,s,u){s===void 0&&(s=n),u===void 0&&(u=r);var c=(i-r)/(o-n+1e-8),d=Math.sqrt(t*t/(1+c*c));o0&&!isNaN(x[0]);){var C="",v=[],P=c,k=d,T,N,R,I,O,D,F,G,U,X;switch(w){case"l":c+=x.shift(),d+=x.shift(),C="L",v.push(c,d);break;case"L":c=x.shift(),d=x.shift(),v.push(c,d);break;case"m":var Z=x.shift(),oe=x.shift();if(c+=Z,d+=oe,C="M",s.length>2&&s[s.length-1].command==="z"){for(var Y=s.length-2;Y>=0;Y--)if(s[Y].command==="M"){c=s[Y].points[0]+Z,d=s[Y].points[1]+oe;break}}v.push(c,d),w="l";break;case"M":c=x.shift(),d=x.shift(),C="M",v.push(c,d),w="L";break;case"h":c+=x.shift(),C="L",v.push(c,d);break;case"H":c=x.shift(),C="L",v.push(c,d);break;case"v":d+=x.shift(),C="L",v.push(c,d);break;case"V":d=x.shift(),C="L",v.push(c,d);break;case"C":v.push(x.shift(),x.shift(),x.shift(),x.shift()),c=x.shift(),d=x.shift(),v.push(c,d);break;case"c":v.push(c+x.shift(),d+x.shift(),c+x.shift(),d+x.shift()),c+=x.shift(),d+=x.shift(),C="C",v.push(c,d);break;case"S":N=c,R=d,T=s[s.length-1],T.command==="C"&&(N=c+(c-T.points[2]),R=d+(d-T.points[3])),v.push(N,R,x.shift(),x.shift()),c=x.shift(),d=x.shift(),C="C",v.push(c,d);break;case"s":N=c,R=d,T=s[s.length-1],T.command==="C"&&(N=c+(c-T.points[2]),R=d+(d-T.points[3])),v.push(N,R,c+x.shift(),d+x.shift()),c+=x.shift(),d+=x.shift(),C="C",v.push(c,d);break;case"Q":v.push(x.shift(),x.shift()),c=x.shift(),d=x.shift(),v.push(c,d);break;case"q":v.push(c+x.shift(),d+x.shift()),c+=x.shift(),d+=x.shift(),C="Q",v.push(c,d);break;case"T":N=c,R=d,T=s[s.length-1],T.command==="Q"&&(N=c+(c-T.points[0]),R=d+(d-T.points[1])),c=x.shift(),d=x.shift(),C="Q",v.push(N,R,c,d);break;case"t":N=c,R=d,T=s[s.length-1],T.command==="Q"&&(N=c+(c-T.points[0]),R=d+(d-T.points[1])),c+=x.shift(),d+=x.shift(),C="Q",v.push(N,R,c,d);break;case"A":I=x.shift(),O=x.shift(),D=x.shift(),F=x.shift(),G=x.shift(),U=c,X=d,c=x.shift(),d=x.shift(),C="A",v=this.convertEndpointToCenterParameterization(U,X,c,d,F,G,I,O,D);break;case"a":I=x.shift(),O=x.shift(),D=x.shift(),F=x.shift(),G=x.shift(),U=c,X=d,c+=x.shift(),d+=x.shift(),C="A",v=this.convertEndpointToCenterParameterization(U,X,c,d,F,G,I,O,D);break}s.push({command:C||w,points:v,start:{x:P,y:k},pathLength:this.calcLength(P,k,C||w,v)})}(w==="z"||w==="Z")&&s.push({command:"z",points:[],start:void 0,pathLength:0})}return s}static calcLength(t,n,r,o){var i,s,u,c,d=bt;switch(r){case"L":return d.getLineLength(t,n,o[0],o[1]);case"C":return(0,Fa.getCubicArcLength)([t,o[0],o[2],o[4]],[n,o[1],o[3],o[5]],1);case"Q":return(0,Fa.getQuadraticArcLength)([t,o[0],o[2]],[n,o[1],o[3]],1);case"A":i=0;var p=o[4],g=o[5],S=o[4]+g,w=Math.PI/180;if(Math.abs(p-S)S;c-=w)u=d.getPointOnEllipticalArc(o[0],o[1],o[2],o[3],c,0),i+=d.getLineLength(s.x,s.y,u.x,u.y),s=u;else for(c=p+w;c1&&(u*=Math.sqrt(w),c*=Math.sqrt(w));var x=Math.sqrt((u*u*(c*c)-u*u*(S*S)-c*c*(g*g))/(u*u*(S*S)+c*c*(g*g)));i===s&&(x*=-1),isNaN(x)&&(x=0);var y=x*u*S/c,E=x*-c*g/u,_=(t+r)/2+Math.cos(p)*y-Math.sin(p)*E,C=(n+o)/2+Math.sin(p)*y+Math.cos(p)*E,v=function(O){return Math.sqrt(O[0]*O[0]+O[1]*O[1])},P=function(O,D){return(O[0]*D[0]+O[1]*D[1])/(v(O)*v(D))},k=function(O,D){return(O[0]*D[1]=1&&(I=0),s===0&&I>0&&(I=I-2*Math.PI),s===1&&I<0&&(I=I+2*Math.PI),[_,C,u,c,T,I,p,s]}}Ws.Path=bt;bt.prototype.className="Path";bt.prototype._attrsAffectingSize=["data"];(0,tL._registerNode)(bt);JD.Factory.addGetterSetter(bt,"data");Object.defineProperty(Dh,"__esModule",{value:!0});Dh.Arrow=void 0;const Fh=Te,nL=Yu,gx=ge,rL=Re,ty=Ws;class ca extends nL.Line{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),o=r,i=this.tension()!==0&&r.length>4;i&&(o=this.getTensionPoints());var s=this.pointerLength(),u=r.length,c,d;if(i){const S=[o[o.length-4],o[o.length-3],o[o.length-2],o[o.length-1],r[u-2],r[u-1]],w=ty.Path.calcLength(o[o.length-4],o[o.length-3],"C",S),x=ty.Path.getPointOnQuadraticBezier(Math.min(1,1-s/w),S[0],S[1],S[2],S[3],S[4],S[5]);c=r[u-2]-x.x,d=r[u-1]-x.y}else c=r[u-2]-r[u-4],d=r[u-1]-r[u-3];var p=(Math.atan2(d,c)+n)%n,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[u-2],r[u-1]),t.rotate(p),t.moveTo(0,0),t.lineTo(-s,g/2),t.lineTo(-s,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),i?(c=(o[0]+o[2])/2-r[0],d=(o[1]+o[3])/2-r[1]):(c=r[2]-r[0],d=r[3]-r[1]),t.rotate((Math.atan2(-d,-c)+n)%n),t.moveTo(0,0),t.lineTo(-s,g/2),t.lineTo(-s,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}Dh.Arrow=ca;ca.prototype.className="Arrow";(0,rL._registerNode)(ca);Fh.Factory.addGetterSetter(ca,"pointerLength",10,(0,gx.getNumberValidator)());Fh.Factory.addGetterSetter(ca,"pointerWidth",10,(0,gx.getNumberValidator)());Fh.Factory.addGetterSetter(ca,"pointerAtBeginning",!1);Fh.Factory.addGetterSetter(ca,"pointerAtEnding",!0);var zh={};Object.defineProperty(zh,"__esModule",{value:!0});zh.Circle=void 0;const oL=Te,iL=$t,aL=ge,sL=Re;let Ks=class extends iL.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}};zh.Circle=Ks;Ks.prototype._centroid=!0;Ks.prototype.className="Circle";Ks.prototype._attrsAffectingSize=["radius"];(0,sL._registerNode)(Ks);oL.Factory.addGetterSetter(Ks,"radius",0,(0,aL.getNumberValidator)());var jh={};Object.defineProperty(jh,"__esModule",{value:!0});jh.Ellipse=void 0;const C2=Te,lL=$t,vx=ge,uL=Re;class wi extends lL.Shape{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}jh.Ellipse=wi;wi.prototype.className="Ellipse";wi.prototype._centroid=!0;wi.prototype._attrsAffectingSize=["radiusX","radiusY"];(0,uL._registerNode)(wi);C2.Factory.addComponentsGetterSetter(wi,"radius",["x","y"]);C2.Factory.addGetterSetter(wi,"radiusX",0,(0,vx.getNumberValidator)());C2.Factory.addGetterSetter(wi,"radiusY",0,(0,vx.getNumberValidator)());var Uh={};Object.defineProperty(Uh,"__esModule",{value:!0});Uh.Image=void 0;const Dp=ht,da=Te,cL=$t,dL=Re,Xu=ge;class nr extends cL.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),o=this.cornerRadius(),i=this.attrs.image;let s;if(i){const u=this.attrs.cropWidth,c=this.attrs.cropHeight;u&&c?s=[i,this.cropX(),this.cropY(),u,c,0,0,n,r]:s=[i,0,0,n,r]}(this.hasFill()||this.hasStroke()||o)&&(t.beginPath(),o?Dp.Util.drawRoundedRectPath(t,n,r,o):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&(o&&t.clip(),t.drawImage.apply(t,s))}_hitFunc(t){var n=this.width(),r=this.height(),o=this.cornerRadius();t.beginPath(),o?Dp.Util.drawRoundedRectPath(t,n,r,o):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var o=Dp.Util.createImageElement();o.onload=function(){var i=new nr({image:o});n(i)},o.onerror=r,o.crossOrigin="Anonymous",o.src=t}}Uh.Image=nr;nr.prototype.className="Image";(0,dL._registerNode)(nr);da.Factory.addGetterSetter(nr,"cornerRadius",0,(0,Xu.getNumberOrArrayOfNumbersValidator)(4));da.Factory.addGetterSetter(nr,"image");da.Factory.addComponentsGetterSetter(nr,"crop",["x","y","width","height"]);da.Factory.addGetterSetter(nr,"cropX",0,(0,Xu.getNumberValidator)());da.Factory.addGetterSetter(nr,"cropY",0,(0,Xu.getNumberValidator)());da.Factory.addGetterSetter(nr,"cropWidth",0,(0,Xu.getNumberValidator)());da.Factory.addGetterSetter(nr,"cropHeight",0,(0,Xu.getNumberValidator)());var Ps={};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.Tag=Ps.Label=void 0;const Vh=Te,fL=$t,hL=Bs,b2=ge,mx=Re;var yx=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],pL="Change.konva",gL="none",hv="up",pv="right",gv="down",vv="left",vL=yx.length;class E2 extends hL.Group{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,o=function(){n._sync()};for(r=0;r{n=Math.min(n,s.x),r=Math.max(r,s.x),o=Math.min(o,s.y),i=Math.max(i,s.y)}),{x:n,y:o,width:r-n,height:i-o}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Bh.RegularPolygon=ha;ha.prototype.className="RegularPolygon";ha.prototype._centroid=!0;ha.prototype._attrsAffectingSize=["radius"];(0,CL._registerNode)(ha);wx.Factory.addGetterSetter(ha,"radius",0,(0,Sx.getNumberValidator)());wx.Factory.addGetterSetter(ha,"sides",0,(0,Sx.getNumberValidator)());var Hh={};Object.defineProperty(Hh,"__esModule",{value:!0});Hh.Ring=void 0;const xx=Te,bL=$t,_x=ge,EL=Re;var ny=Math.PI*2;class pa extends bL.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,ny,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),ny,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Hh.Ring=pa;pa.prototype.className="Ring";pa.prototype._centroid=!0;pa.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,EL._registerNode)(pa);xx.Factory.addGetterSetter(pa,"innerRadius",0,(0,_x.getNumberValidator)());xx.Factory.addGetterSetter(pa,"outerRadius",0,(0,_x.getNumberValidator)());var Wh={};Object.defineProperty(Wh,"__esModule",{value:!0});Wh.Sprite=void 0;const ga=Te,PL=$t,$L=Hs,Cx=ge,kL=Re;class Vr extends PL.Shape{constructor(t){super(t),this._updated=!0,this.anim=new $L.Animation(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),o=r*4,i=this.animations()[n],s=this.frameOffsets(),u=i[o+0],c=i[o+1],d=i[o+2],p=i[o+3],g=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,d,p),t.closePath(),t.fillStrokeShape(this)),g)if(s){var S=s[n],w=r*2;t.drawImage(g,u,c,d,p,S[w+0],S[w+1],d,p)}else t.drawImage(g,u,c,d,p,0,0,d,p)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),o=r*4,i=this.animations()[n],s=this.frameOffsets(),u=i[o+2],c=i[o+3];if(t.beginPath(),s){var d=s[n],p=r*2;t.rect(d[p+0],d[p+1],u,c)}else t.rect(0,0,u,c);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),o=r[n],i=o.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var kd;function Fp(){return kd||(kd=mv.Util.createCanvasElement().getContext(IL),kd)}function WL(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function KL(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function YL(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}let wt=class extends NL.Shape{constructor(t){super(YL(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(_+=s)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=mv.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(DL,n),this}getWidth(){var t=this.attrs.width===za||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===za||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return mv.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Fp(),r=this.fontSize(),o;return n.save(),n.font=this._getContextFont(),o=n.measureText(t),n.restore(),{width:o.width,height:r}}_getContextFont(){return this.fontStyle()+$d+this.fontVariant()+$d+(this.fontSize()+jL)+HL(this.fontFamily())}_addTextLine(t){this.align()===Pl&&(t=t.trim());var r=this._getTextWidth(t);return this.textArr.push({text:t,width:r,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Fp().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,o=this.lineHeight()*n,i=this.attrs.width,s=this.attrs.height,u=i!==za&&i!==void 0,c=s!==za&&s!==void 0,d=this.padding(),p=i-d*2,g=s-d*2,S=0,w=this.wrap(),x=w!==iy,y=w!==GL&&x,E=this.ellipsis();this.textArr=[],Fp().font=this._getContextFont();for(var _=E?this._getTextWidth(Lp):0,C=0,v=t.length;Cp)for(;P.length>0;){for(var T=0,N=P.length,R="",I=0;T>>1,D=P.slice(0,O+1),F=this._getTextWidth(D)+_;F<=p?(T=O+1,R=D,I=F):N=O}if(R){if(y){var G,U=P[R.length],X=U===$d||U===ry;X&&I<=p?G=R.length:G=Math.max(R.lastIndexOf($d),R.lastIndexOf(ry))+1,G>0&&(T=G,R=R.slice(0,T),I=this._getTextWidth(R))}R=R.trimRight(),this._addTextLine(R),r=Math.max(r,I),S+=o;var Z=this._shouldHandleEllipsis(S);if(Z){this._tryToAddEllipsisToLastLine();break}if(P=P.slice(T),P=P.trimLeft(),P.length>0&&(k=this._getTextWidth(P),k<=p)){this._addTextLine(P),S+=o,r=Math.max(r,k);break}}else break}else this._addTextLine(P),S+=o,r=Math.max(r,k),this._shouldHandleEllipsis(S)&&Cg)break}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,o=this.attrs.height,i=o!==za&&o!==void 0,s=this.padding(),u=o-s*2,c=this.wrap(),d=c!==iy;return!d||i&&t+r>u}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==za&&t!==void 0,r=this.padding(),o=t-r*2,i=this.ellipsis(),s=this.textArr[this.textArr.length-1];if(!(!s||!i)){if(n){var u=this._getTextWidth(s.text+Lp)n?null:$l.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=$l.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var n=this.textDecoration(),r=this.fill(),o=this.fontSize(),i=this.glyphInfo;n==="underline"&&t.beginPath();for(var s=0;s=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var o=0;oe+`.${Ax}`).join(" "),ly="nodesRect",nF=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],rF={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const oF="ontouchstart"in dr.Konva._global;function iF(e,t,n){if(e==="rotater")return n;t+=Ke.Util.degToRad(rF[e]||0);var r=(Ke.Util.radToDeg(t)%360+360)%360;return Ke.Util._inRange(r,315+22.5,360)||Ke.Util._inRange(r,0,22.5)?"ns-resize":Ke.Util._inRange(r,45-22.5,45+22.5)?"nesw-resize":Ke.Util._inRange(r,90-22.5,90+22.5)?"ew-resize":Ke.Util._inRange(r,135-22.5,135+22.5)?"nwse-resize":Ke.Util._inRange(r,180-22.5,180+22.5)?"ns-resize":Ke.Util._inRange(r,225-22.5,225+22.5)?"nesw-resize":Ke.Util._inRange(r,270-22.5,270+22.5)?"ew-resize":Ke.Util._inRange(r,315-22.5,315+22.5)?"nwse-resize":(Ke.Util.error("Transformer has unknown angle for cursor detection: "+r),"pointer")}var Df=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],uy=1e8;function aF(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function Mx(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),o=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:r,y:o}}function sF(e,t){const n=aF(e);return Mx(e,t,n)}function lF(e,t,n){let r=t;for(let o=0;oo.isAncestorOf(this)?(Ke.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=t=n,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(o=>{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},s=o._attrsAffectingSize.map(u=>u+"Change."+this._getEventNamespace()).join(" ");o.on(s,i),o.on(nF.map(u=>u+`.${this._getEventNamespace()}`).join(" "),i),o.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(o)}),this._resetTransformCache();var r=!!this.findOne(".top-left");return r&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const o=t.getAbsolutePosition(),i=o.x-n.x,s=o.y-n.y;this.nodes().forEach(u=>{if(u===t||u.isDragging())return;const c=u.getAbsolutePosition();u.setAbsolutePosition({x:c.x+i,y:c.y+s}),u.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(ly),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(ly,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var o=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),i=t.getAbsoluteScale(r),s=t.getAbsolutePosition(r),u=o.x*i.x-t.offsetX()*i.x,c=o.y*i.y-t.offsetY()*i.y;const d=(dr.Konva.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),p={x:s.x+u*Math.cos(d)+c*Math.sin(-d),y:s.y+c*Math.cos(d)+u*Math.sin(d),width:o.width*i.x,height:o.height*i.y,rotation:d};return Mx(p,-dr.Konva.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-uy,y:-uy,width:0,height:0,rotation:0};const n=[];this.nodes().map(d=>{const p=d.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var g=[{x:p.x,y:p.y},{x:p.x+p.width,y:p.y},{x:p.x+p.width,y:p.y+p.height},{x:p.x,y:p.y+p.height}],S=d.getAbsoluteTransform();g.forEach(function(w){var x=S.point(w);n.push(x)})});const r=new Ke.Transform;r.rotate(-dr.Konva.getAngle(this.rotation()));var o=1/0,i=1/0,s=-1/0,u=-1/0;n.forEach(function(d){var p=r.point(d);o===void 0&&(o=s=p.x,i=u=p.y),o=Math.min(o,p.x),i=Math.min(i,p.y),s=Math.max(s,p.x),u=Math.max(u,p.y)}),r.invert();const c=r.point({x:o,y:i});return{x:c.x,y:c.y,width:s-o,height:u-i,rotation:dr.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),Df.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){var n=new JL.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:oF?10:"auto"}),r=this;n.on("mousedown touchstart",function(o){r._handleMouseDown(o)}),n.on("dragstart",o=>{n.stopDrag(),o.cancelBubble=!0}),n.on("dragend",o=>{o.cancelBubble=!0}),n.on("mouseenter",()=>{var o=dr.Konva.getAngle(this.rotation()),i=this.rotateAnchorCursor(),s=iF(t,o,i);n.getStage().content&&(n.getStage().content.style.cursor=s),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new ZL.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(n,r){var o=r.getParent(),i=o.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.moveTo(r.width()/2,-i),o.rotateEnabled()&&n.lineTo(r.width()/2,-o.rotateAnchorOffset()*Ke.Util._sign(r.height())-i),n.fillStrokeShape(r)},hitFunc:(n,r)=>{if(this.shouldOverdrawWholeArea()){var o=this.padding();n.beginPath(),n.rect(-o,-o,r.width()+o*2,r.height()+o*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,o=n.height,i=Math.sqrt(Math.pow(r,2)+Math.pow(o,2));this.sin=Math.abs(o/i),this.cos=Math.abs(r/i),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var s=t.target.getAbsolutePosition(),u=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:u.x-s.x,y:u.y-s.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(c=>{c._fire("transformstart",{evt:t.evt,target:c})})}_handleMouseMove(t){var n,r,o,i=this.findOne("."+this._movingAnchorName),s=i.getStage();s.setPointersPositions(t);const u=s.getPointerPosition();let c={x:u.x-this._anchorDragOffset.x,y:u.y-this._anchorDragOffset.y};const d=i.getAbsolutePosition();this.anchorDragBoundFunc()&&(c=this.anchorDragBoundFunc()(d,c,t)),i.setAbsolutePosition(c);const p=i.getAbsolutePosition();if(!(d.x===p.x&&d.y===p.y)){if(this._movingAnchorName==="rotater"){var g=this._getNodeRect();n=i.x()-g.width/2,r=-i.y()+g.height/2;let G=Math.atan2(-r,n)+Math.PI/2;g.height<0&&(G-=Math.PI);var S=dr.Konva.getAngle(this.rotation());const U=S+G,X=dr.Konva.getAngle(this.rotationSnapTolerance()),oe=lF(this.rotationSnaps(),U,X)-g.rotation,Y=sF(g,oe);this._fitNodesInto(Y,t);return}var w=this.shiftBehavior(),x;w==="inverted"?x=this.keepRatio()&&!t.shiftKey:w==="none"?x=this.keepRatio():x=this.keepRatio()||t.shiftKey;var v=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(x){var y=v?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};o=Math.sqrt(Math.pow(y.x-i.x(),2)+Math.pow(y.y-i.y(),2));var E=this.findOne(".top-left").x()>y.x?-1:1,_=this.findOne(".top-left").y()>y.y?-1:1;n=o*this.cos*E,r=o*this.sin*_,this.findOne(".top-left").x(y.x-n),this.findOne(".top-left").y(y.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(i.y());else if(this._movingAnchorName==="top-right"){if(x){var y=v?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};o=Math.sqrt(Math.pow(i.x()-y.x,2)+Math.pow(y.y-i.y(),2));var E=this.findOne(".top-right").x()y.y?-1:1;n=o*this.cos*E,r=o*this.sin*_,this.findOne(".top-right").x(y.x+n),this.findOne(".top-right").y(y.y-r)}var C=i.position();this.findOne(".top-left").y(C.y),this.findOne(".bottom-right").x(C.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(i.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(i.x());else if(this._movingAnchorName==="bottom-left"){if(x){var y=v?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};o=Math.sqrt(Math.pow(y.x-i.x(),2)+Math.pow(i.y()-y.y,2));var E=y.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const o=1;if(Ke.Util._inRange(t.width,-this.padding()*2-o,o)){this.update();return}if(Ke.Util._inRange(t.height,-this.padding()*2-o,o)){this.update();return}const i=this.flipEnabled();var s=new Ke.Transform;if(s.rotate(dr.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const g=s.point({x:-this.padding()*2,y:0});if(t.x+=g.x,t.y+=g.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,!i){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const g=s.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.width+=this.padding()*2,!i){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const g=s.point({x:0,y:-this.padding()*2});if(t.x+=g.x,t.y+=g.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!i){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const g=s.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=g.x,this._anchorDragOffset.y-=g.y,t.height+=this.padding()*2,!i){this.update();return}}if(this.boundBoxFunc()){const g=this.boundBoxFunc()(r,t);g?t=g:Ke.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const u=1e7,c=new Ke.Transform;c.translate(r.x,r.y),c.rotate(r.rotation),c.scale(r.width/u,r.height/u);const d=new Ke.Transform;d.translate(t.x,t.y),d.rotate(t.rotation),d.scale(t.width/u,t.height/u);const p=d.multiply(c.invert());this._nodes.forEach(g=>{var S;const w=g.getParent().getAbsoluteTransform(),x=g.getTransform().copy();x.translate(g.offsetX(),g.offsetY());const y=new Ke.Transform;y.multiply(w.copy().invert()).multiply(p).multiply(w).multiply(x);const E=y.decompose();g.setAttrs(E),this._fire("transform",{evt:n,target:g}),g._fire("transform",{evt:n,target:g}),(S=g.getLayer())===null||S===void 0||S.batchDraw()}),this.rotation(Ke.Util._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(Ke.Util._getRotation(n.rotation));var r=n.width,o=n.height,i=this.enabledAnchors(),s=this.resizeEnabled(),u=this.padding(),c=this.anchorSize();const d=this.find("._anchor");d.forEach(g=>{g.setAttrs({width:c,height:c,offsetX:c/2,offsetY:c/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:c/2+u,offsetY:c/2+u,visible:s&&i.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:c/2+u,visible:s&&i.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:c/2-u,offsetY:c/2+u,visible:s&&i.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:o/2,offsetX:c/2+u,visible:s&&i.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:o/2,offsetX:c/2-u,visible:s&&i.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:o,offsetX:c/2+u,offsetY:c/2-u,visible:s&&i.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:o,offsetY:c/2-u,visible:s&&i.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:o,offsetX:c/2-u,offsetY:c/2-u,visible:s&&i.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*Ke.Util._sign(o)-u,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:o,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const p=this.anchorStyleFunc();p&&d.forEach(g=>{p(g)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),sy.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return ay.Node.prototype.toObject.call(this)}clone(t){var n=ay.Node.prototype.clone.call(this,t);return n}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}Xh.Transformer=je;function uF(e){return e instanceof Array||Ke.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){Df.indexOf(t)===-1&&Ke.Util.warn("Unknown anchor name: "+t+". Available names are: "+Df.join(", "))}),e||[]}je.prototype.className="Transformer";(0,eF._registerNode)(je);He.Factory.addGetterSetter(je,"enabledAnchors",Df,uF);He.Factory.addGetterSetter(je,"flipEnabled",!0,(0,_i.getBooleanValidator)());He.Factory.addGetterSetter(je,"resizeEnabled",!0);He.Factory.addGetterSetter(je,"anchorSize",10,(0,_i.getNumberValidator)());He.Factory.addGetterSetter(je,"rotateEnabled",!0);He.Factory.addGetterSetter(je,"rotationSnaps",[]);He.Factory.addGetterSetter(je,"rotateAnchorOffset",50,(0,_i.getNumberValidator)());He.Factory.addGetterSetter(je,"rotateAnchorCursor","crosshair");He.Factory.addGetterSetter(je,"rotationSnapTolerance",5,(0,_i.getNumberValidator)());He.Factory.addGetterSetter(je,"borderEnabled",!0);He.Factory.addGetterSetter(je,"anchorStroke","rgb(0, 161, 255)");He.Factory.addGetterSetter(je,"anchorStrokeWidth",1,(0,_i.getNumberValidator)());He.Factory.addGetterSetter(je,"anchorFill","white");He.Factory.addGetterSetter(je,"anchorCornerRadius",0,(0,_i.getNumberValidator)());He.Factory.addGetterSetter(je,"borderStroke","rgb(0, 161, 255)");He.Factory.addGetterSetter(je,"borderStrokeWidth",1,(0,_i.getNumberValidator)());He.Factory.addGetterSetter(je,"borderDash");He.Factory.addGetterSetter(je,"keepRatio",!0);He.Factory.addGetterSetter(je,"shiftBehavior","default");He.Factory.addGetterSetter(je,"centeredScaling",!1);He.Factory.addGetterSetter(je,"ignoreStroke",!1);He.Factory.addGetterSetter(je,"padding",0,(0,_i.getNumberValidator)());He.Factory.addGetterSetter(je,"node");He.Factory.addGetterSetter(je,"nodes");He.Factory.addGetterSetter(je,"boundBoxFunc");He.Factory.addGetterSetter(je,"anchorDragBoundFunc");He.Factory.addGetterSetter(je,"anchorStyleFunc");He.Factory.addGetterSetter(je,"shouldOverdrawWholeArea",!1);He.Factory.addGetterSetter(je,"useSingleNodeRotation",!0);He.Factory.backCompat(je,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var Qh={};Object.defineProperty(Qh,"__esModule",{value:!0});Qh.Wedge=void 0;const qh=Te,cF=$t,dF=Re,Ox=ge,fF=Re;class bo extends cF.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,dF.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Qh.Wedge=bo;bo.prototype.className="Wedge";bo.prototype._centroid=!0;bo.prototype._attrsAffectingSize=["radius"];(0,fF._registerNode)(bo);qh.Factory.addGetterSetter(bo,"radius",0,(0,Ox.getNumberValidator)());qh.Factory.addGetterSetter(bo,"angle",0,(0,Ox.getNumberValidator)());qh.Factory.addGetterSetter(bo,"clockwise",!1);qh.Factory.backCompat(bo,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var Zh={};Object.defineProperty(Zh,"__esModule",{value:!0});Zh.Blur=void 0;const cy=Te,hF=st,pF=ge;function dy(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var gF=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],vF=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function mF(e,t){var n=e.data,r=e.width,o=e.height,i,s,u,c,d,p,g,S,w,x,y,E,_,C,v,P,k,T,N,R,I,O,D,F,G=t+t+1,U=r-1,X=o-1,Z=t+1,oe=Z*(Z+1)/2,Y=new dy,z=null,B=Y,q=null,J=null,ae=gF[t],pe=vF[t];for(u=1;u>pe,D!==0?(D=255/D,n[p]=(S*ae>>pe)*D,n[p+1]=(w*ae>>pe)*D,n[p+2]=(x*ae>>pe)*D):n[p]=n[p+1]=n[p+2]=0,S-=E,w-=_,x-=C,y-=v,E-=q.r,_-=q.g,C-=q.b,v-=q.a,c=g+((c=i+t+1)>pe,D>0?(D=255/D,n[c]=(S*ae>>pe)*D,n[c+1]=(w*ae>>pe)*D,n[c+2]=(x*ae>>pe)*D):n[c]=n[c+1]=n[c+2]=0,S-=E,w-=_,x-=C,y-=v,E-=q.r,_-=q.g,C-=q.b,v-=q.a,c=i+((c=s+Z)0&&mF(t,n)};Zh.Blur=yF;cy.Factory.addGetterSetter(hF.Node,"blurRadius",0,(0,pF.getNumberValidator)(),cy.Factory.afterSetFilter);var Jh={};Object.defineProperty(Jh,"__esModule",{value:!0});Jh.Brighten=void 0;const fy=Te,wF=st,SF=ge,xF=function(e){var t=this.brightness()*255,n=e.data,r=n.length,o;for(o=0;o255?255:o,i=i<0?0:i>255?255:i,s=s<0?0:s>255?255:s,n[u]=o,n[u+1]=i,n[u+2]=s};e0.Contrast=bF;hy.Factory.addGetterSetter(_F.Node,"contrast",0,(0,CF.getNumberValidator)(),hy.Factory.afterSetFilter);var t0={};Object.defineProperty(t0,"__esModule",{value:!0});t0.Emboss=void 0;const hi=Te,n0=st,EF=ht,Ix=ge,PF=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),o=this.embossBlend(),i=0,s=0,u=e.data,c=e.width,d=e.height,p=c*4,g=d;switch(r){case"top-left":i=-1,s=-1;break;case"top":i=-1,s=0;break;case"top-right":i=-1,s=1;break;case"right":i=0,s=1;break;case"bottom-right":i=1,s=1;break;case"bottom":i=1,s=0;break;case"bottom-left":i=1,s=-1;break;case"left":i=0,s=-1;break;default:EF.Util.error("Unknown emboss direction: "+r)}do{var S=(g-1)*p,w=i;g+w<1&&(w=0),g+w>d&&(w=0);var x=(g-1+w)*c*4,y=c;do{var E=S+(y-1)*4,_=s;y+_<1&&(_=0),y+_>c&&(_=0);var C=x+(y-1+_)*4,v=u[E]-u[C],P=u[E+1]-u[C+1],k=u[E+2]-u[C+2],T=v,N=T>0?T:-T,R=P>0?P:-P,I=k>0?k:-k;if(R>N&&(T=P),I>N&&(T=k),T*=t,o){var O=u[E]+T,D=u[E+1]+T,F=u[E+2]+T;u[E]=O>255?255:O<0?0:O,u[E+1]=D>255?255:D<0?0:D,u[E+2]=F>255?255:F<0?0:F}else{var G=n-T;G<0?G=0:G>255&&(G=255),u[E]=u[E+1]=u[E+2]=G}}while(--y)}while(--g)};t0.Emboss=PF;hi.Factory.addGetterSetter(n0.Node,"embossStrength",.5,(0,Ix.getNumberValidator)(),hi.Factory.afterSetFilter);hi.Factory.addGetterSetter(n0.Node,"embossWhiteLevel",.5,(0,Ix.getNumberValidator)(),hi.Factory.afterSetFilter);hi.Factory.addGetterSetter(n0.Node,"embossDirection","top-left",null,hi.Factory.afterSetFilter);hi.Factory.addGetterSetter(n0.Node,"embossBlend",!1,null,hi.Factory.afterSetFilter);var r0={};Object.defineProperty(r0,"__esModule",{value:!0});r0.Enhance=void 0;const py=Te,$F=st,kF=ge;function Up(e,t,n,r,o){var i=n-t,s=o-r,u;return i===0?r+s/2:s===0?r:(u=(e-t)/i,u=s*u+r,u)}const RF=function(e){var t=e.data,n=t.length,r=t[0],o=r,i,s=t[1],u=s,c,d=t[2],p=d,g,S,w=this.enhance();if(w!==0){for(S=0;So&&(o=i),c=t[S+1],cu&&(u=c),g=t[S+2],gp&&(p=g);o===r&&(o=255,r=0),u===s&&(u=255,s=0),p===d&&(p=255,d=0);var x,y,E,_,C,v,P,k,T;for(w>0?(y=o+w*(255-o),E=r-w*(r-0),C=u+w*(255-u),v=s-w*(s-0),k=p+w*(255-p),T=d-w*(d-0)):(x=(o+r)*.5,y=o+w*(o-x),E=r+w*(r-x),_=(u+s)*.5,C=u+w*(u-_),v=s+w*(s-_),P=(p+d)*.5,k=p+w*(p-P),T=d+w*(d-P)),S=0;S_?E:_;var C=s,v=i,P,k,T=360/v*Math.PI/180,N,R;for(k=0;kv?C:v;var P=s,k=i,T,N,R=n.polarRotation||0,I,O;for(p=0;pt&&(P=v,k=0,T=-1),o=0;o=0&&w=0&&x=0&&w=0&&x=255*4?255:0}return s}function BF(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),s=[],u=0;u=0&&w=0&&x=n))for(i=y;i=r||(s=(n*i+o)*4,u+=P[s+0],c+=P[s+1],d+=P[s+2],p+=P[s+3],v+=1);for(u=u/v,c=c/v,d=d/v,p=p/v,o=w;o=n))for(i=y;i=r||(s=(n*i+o)*4,P[s+0]=u,P[s+1]=c,P[s+2]=d,P[s+3]=p)}};d0.Pixelate=ZF;yy.Factory.addGetterSetter(QF.Node,"pixelSize",8,(0,qF.getNumberValidator)(),yy.Factory.afterSetFilter);var f0={};Object.defineProperty(f0,"__esModule",{value:!0});f0.Posterize=void 0;const wy=Te,JF=st,ez=ge,tz=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,o=255/t,i;for(i=0;i255?255:e<0?0:Math.round(e)});Ff.Factory.addGetterSetter(A2.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Ff.Factory.addGetterSetter(A2.Node,"blue",0,nz.RGBComponent,Ff.Factory.afterSetFilter);var p0={};Object.defineProperty(p0,"__esModule",{value:!0});p0.RGBA=void 0;const $u=Te,g0=st,oz=ge,iz=function(e){var t=e.data,n=t.length,r=this.red(),o=this.green(),i=this.blue(),s=this.alpha(),u,c;for(u=0;u255?255:e<0?0:Math.round(e)});$u.Factory.addGetterSetter(g0.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});$u.Factory.addGetterSetter(g0.Node,"blue",0,oz.RGBComponent,$u.Factory.afterSetFilter);$u.Factory.addGetterSetter(g0.Node,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});var v0={};Object.defineProperty(v0,"__esModule",{value:!0});v0.Sepia=void 0;const az=function(e){var t=e.data,n=t.length,r,o,i,s;for(r=0;r127&&(d=255-d),p>127&&(p=255-p),g>127&&(g=255-g),t[c]=d,t[c+1]=p,t[c+2]=g}while(--u)}while(--i)};m0.Solarize=sz;var y0={};Object.defineProperty(y0,"__esModule",{value:!0});y0.Threshold=void 0;const Sy=Te,lz=st,uz=ge,cz=function(e){var t=this.threshold()*255,n=e.data,r=n.length,o;for(o=0;oj||b[A]!==$[j]){var K=` +`+b[A].replace(" at new "," at ");return a.displayName&&K.includes("")&&(K=K.replace("",a.displayName)),K}while(1<=A&&0<=j);break}}}finally{O0=!1,Error.prepareStackTrace=f}return(a=a?a.displayName||a.name:"")?Qs(a):""}var XC=Object.prototype.hasOwnProperty,D0=[],wa=-1;function Eo(a){return{current:a}}function Ze(a){0>wa||(a.current=D0[wa],D0[wa]=null,wa--)}function Qe(a,l){wa++,D0[wa]=a.current,a.current=l}var Po={},Ht=Eo(Po),un=Eo(!1),Ei=Po;function Sa(a,l){var f=a.type.contextTypes;if(!f)return Po;var m=a.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===l)return m.__reactInternalMemoizedMaskedChildContext;var b={},$;for($ in f)b[$]=l[$];return m&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=l,a.__reactInternalMemoizedMaskedChildContext=b),b}function cn(a){return a=a.childContextTypes,a!=null}function ic(){Ze(un),Ze(Ht)}function o5(a,l,f){if(Ht.current!==Po)throw Error(s(168));Qe(Ht,l),Qe(un,f)}function i5(a,l,f){var m=a.stateNode;if(l=l.childContextTypes,typeof m.getChildContext!="function")return f;m=m.getChildContext();for(var b in m)if(!(b in l))throw Error(s(108,R(a)||"Unknown",b));return i({},f,m)}function ac(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Po,Ei=Ht.current,Qe(Ht,a),Qe(un,un.current),!0}function a5(a,l,f){var m=a.stateNode;if(!m)throw Error(s(169));f?(a=i5(a,l,Ei),m.__reactInternalMemoizedMergedChildContext=a,Ze(un),Ze(Ht),Qe(Ht,a)):Ze(un),Qe(un,f)}var rr=Math.clz32?Math.clz32:ZC,QC=Math.log,qC=Math.LN2;function ZC(a){return a>>>=0,a===0?32:31-(QC(a)/qC|0)|0}var sc=64,lc=4194304;function qs(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function uc(a,l){var f=a.pendingLanes;if(f===0)return 0;var m=0,b=a.suspendedLanes,$=a.pingedLanes,A=f&268435455;if(A!==0){var j=A&~b;j!==0?m=qs(j):($&=A,$!==0&&(m=qs($)))}else A=f&~b,A!==0?m=qs(A):$!==0&&(m=qs($));if(m===0)return 0;if(l!==0&&l!==m&&!(l&b)&&(b=m&-m,$=l&-l,b>=$||b===16&&($&4194240)!==0))return l;if(m&4&&(m|=f&16),l=a.entangledLanes,l!==0)for(a=a.entanglements,l&=m;0f;f++)l.push(a);return l}function Zs(a,l,f){a.pendingLanes|=l,l!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,l=31-rr(l),a[l]=f}function tb(a,l){var f=a.pendingLanes&~l;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=l,a.mutableReadLanes&=l,a.entangledLanes&=l,l=a.entanglements;var m=a.eventTimes;for(a=a.expirationTimes;0>=A,b-=A,Hr=1<<32-rr(l)+b|f<Ve?(At=_e,_e=null):At=_e.sibling;var Ge=ue(W,_e,Q[Ve],ce);if(Ge===null){_e===null&&(_e=At);break}a&&_e&&Ge.alternate===null&&l(W,_e),V=$(Ge,V,Ve),Ee===null?ye=Ge:Ee.sibling=Ge,Ee=Ge,_e=At}if(Ve===Q.length)return f(W,_e),ot&&$i(W,Ve),ye;if(_e===null){for(;VeVe?(At=_e,_e=null):At=_e.sibling;var Oo=ue(W,_e,Ge.value,ce);if(Oo===null){_e===null&&(_e=At);break}a&&_e&&Oo.alternate===null&&l(W,_e),V=$(Oo,V,Ve),Ee===null?ye=Oo:Ee.sibling=Oo,Ee=Oo,_e=At}if(Ge.done)return f(W,_e),ot&&$i(W,Ve),ye;if(_e===null){for(;!Ge.done;Ve++,Ge=Q.next())Ge=xe(W,Ge.value,ce),Ge!==null&&(V=$(Ge,V,Ve),Ee===null?ye=Ge:Ee.sibling=Ge,Ee=Ge);return ot&&$i(W,Ve),ye}for(_e=m(W,_e);!Ge.done;Ve++,Ge=Q.next())Ge=Je(_e,W,Ve,Ge.value,ce),Ge!==null&&(a&&Ge.alternate!==null&&_e.delete(Ge.key===null?Ve:Ge.key),V=$(Ge,V,Ve),Ee===null?ye=Ge:Ee.sibling=Ge,Ee=Ge);return a&&_e.forEach(function(jb){return l(W,jb)}),ot&&$i(W,Ve),ye}function Qr(W,V,Q,ce){if(typeof Q=="object"&&Q!==null&&Q.type===p&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case c:e:{for(var ye=Q.key,Ee=V;Ee!==null;){if(Ee.key===ye){if(ye=Q.type,ye===p){if(Ee.tag===7){f(W,Ee.sibling),V=b(Ee,Q.props.children),V.return=W,W=V;break e}}else if(Ee.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===v&&E5(ye)===Ee.type){f(W,Ee.sibling),V=b(Ee,Q.props),V.ref=el(W,Ee,Q),V.return=W,W=V;break e}f(W,Ee);break}else l(W,Ee);Ee=Ee.sibling}Q.type===p?(V=Oi(Q.props.children,W.mode,ce,Q.key),V.return=W,W=V):(ce=Kc(Q.type,Q.key,Q.props,null,W.mode,ce),ce.ref=el(W,V,Q),ce.return=W,W=ce)}return A(W);case d:e:{for(Ee=Q.key;V!==null;){if(V.key===Ee)if(V.tag===4&&V.stateNode.containerInfo===Q.containerInfo&&V.stateNode.implementation===Q.implementation){f(W,V.sibling),V=b(V,Q.children||[]),V.return=W,W=V;break e}else{f(W,V);break}else l(W,V);V=V.sibling}V=B1(Q,W.mode,ce),V.return=W,W=V}return A(W);case v:return Ee=Q._init,Qr(W,V,Ee(Q._payload),ce)}if(X(Q))return Ye(W,V,Q,ce);if(T(Q))return pn(W,V,Q,ce);xc(W,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,V!==null&&V.tag===6?(f(W,V.sibling),V=b(V,Q),V.return=W,W=V):(f(W,V),V=G1(Q,W.mode,ce),V.return=W,W=V),A(W)):f(W,V)}return Qr}var Pa=P5(!0),$5=P5(!1),tl={},Fn=Eo(tl),nl=Eo(tl),$a=Eo(tl);function kr(a){if(a===tl)throw Error(s(174));return a}function r1(a,l){Qe($a,l),Qe(nl,a),Qe(Fn,tl),a=oe(l),Ze(Fn),Qe(Fn,a)}function ka(){Ze(Fn),Ze(nl),Ze($a)}function k5(a){var l=kr($a.current),f=kr(Fn.current);l=Y(f,a.type,l),f!==l&&(Qe(nl,a),Qe(Fn,l))}function o1(a){nl.current===a&&(Ze(Fn),Ze(nl))}var lt=Eo(0);function _c(a){for(var l=a;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||r5(f)||A0(f)))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if(l.flags&128)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var i1=[];function a1(){for(var a=0;af?f:4,a(!0);var m=s1.transition;s1.transition={};try{a(!1),l()}finally{Ue=f,s1.transition=m}}function W5(){return zn().memoizedState}function hb(a,l,f){var m=No(a);if(f={lane:m,action:f,hasEagerState:!1,eagerState:null,next:null},K5(a))Y5(l,f);else if(f=m5(a,l,f,m),f!==null){var b=Xt();jn(f,a,m,b),X5(f,l,m)}}function pb(a,l,f){var m=No(a),b={lane:m,action:f,hasEagerState:!1,eagerState:null,next:null};if(K5(a))Y5(l,b);else{var $=a.alternate;if(a.lanes===0&&($===null||$.lanes===0)&&($=l.lastRenderedReducer,$!==null))try{var A=l.lastRenderedState,j=$(A,f);if(b.hasEagerState=!0,b.eagerState=j,or(j,A)){var K=l.interleaved;K===null?(b.next=b,J0(l)):(b.next=K.next,K.next=b),l.interleaved=b;return}}catch{}finally{}f=m5(a,l,b,m),f!==null&&(b=Xt(),jn(f,a,m,b),X5(f,l,m))}}function K5(a){var l=a.alternate;return a===ut||l!==null&&l===ut}function Y5(a,l){rl=bc=!0;var f=a.pending;f===null?l.next=l:(l.next=f.next,f.next=l),a.pending=l}function X5(a,l,f){if(f&4194240){var m=l.lanes;m&=a.pendingLanes,f|=m,l.lanes=f,z0(a,f)}}var $c={readContext:Ln,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useInsertionEffect:Wt,useLayoutEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useMutableSource:Wt,useSyncExternalStore:Wt,useId:Wt,unstable_isNewReconciler:!1},gb={readContext:Ln,useCallback:function(a,l){return Rr().memoizedState=[a,l===void 0?null:l],a},useContext:Ln,useEffect:F5,useImperativeHandle:function(a,l,f){return f=f!=null?f.concat([a]):null,Ec(4194308,4,U5.bind(null,l,a),f)},useLayoutEffect:function(a,l){return Ec(4194308,4,a,l)},useInsertionEffect:function(a,l){return Ec(4,2,a,l)},useMemo:function(a,l){var f=Rr();return l=l===void 0?null:l,a=a(),f.memoizedState=[a,l],a},useReducer:function(a,l,f){var m=Rr();return l=f!==void 0?f(l):l,m.memoizedState=m.baseState=l,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:l},m.queue=a,a=a.dispatch=hb.bind(null,ut,a),[m.memoizedState,a]},useRef:function(a){var l=Rr();return a={current:a},l.memoizedState=a},useState:D5,useDebugValue:p1,useDeferredValue:function(a){return Rr().memoizedState=a},useTransition:function(){var a=D5(!1),l=a[0];return a=fb.bind(null,a[1]),Rr().memoizedState=a,[l,a]},useMutableSource:function(){},useSyncExternalStore:function(a,l,f){var m=ut,b=Rr();if(ot){if(f===void 0)throw Error(s(407));f=f()}else{if(f=l(),Nt===null)throw Error(s(349));Ri&30||N5(m,l,f)}b.memoizedState=f;var $={value:f,getSnapshot:l};return b.queue=$,F5(M5.bind(null,m,$,a),[a]),m.flags|=2048,al(9,A5.bind(null,m,$,f,l),void 0,null),f},useId:function(){var a=Rr(),l=Nt.identifierPrefix;if(ot){var f=Wr,m=Hr;f=(m&~(1<<32-rr(m)-1)).toString(32)+f,l=":"+l+"R"+f,f=ol++,0I1&&(l.flags|=128,m=!0,ul(b,!1),l.lanes=4194304)}else{if(!m)if(a=_c($),a!==null){if(l.flags|=128,m=!0,a=a.updateQueue,a!==null&&(l.updateQueue=a,l.flags|=4),ul(b,!0),b.tail===null&&b.tailMode==="hidden"&&!$.alternate&&!ot)return Kt(l),null}else 2*Rt()-b.renderingStartTime>I1&&f!==1073741824&&(l.flags|=128,m=!0,ul(b,!1),l.lanes=4194304);b.isBackwards?($.sibling=l.child,l.child=$):(a=b.last,a!==null?a.sibling=$:l.child=$,b.last=$)}return b.tail!==null?(l=b.tail,b.rendering=l,b.tail=l.sibling,b.renderingStartTime=Rt(),l.sibling=null,a=lt.current,Qe(lt,m?a&1|2:a&1),l):(Kt(l),null);case 22:case 23:return j1(),f=l.memoizedState!==null,a!==null&&a.memoizedState!==null!==f&&(l.flags|=8192),f&&l.mode&1?_n&1073741824&&(Kt(l),le&&l.subtreeFlags&6&&(l.flags|=8192)):Kt(l),null;case 24:return null;case 25:return null}throw Error(s(156,l.tag))}function Cb(a,l){switch(H0(l),l.tag){case 1:return cn(l.type)&&ic(),a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 3:return ka(),Ze(un),Ze(Ht),a1(),a=l.flags,a&65536&&!(a&128)?(l.flags=a&-65537|128,l):null;case 5:return o1(l),null;case 13:if(Ze(lt),a=l.memoizedState,a!==null&&a.dehydrated!==null){if(l.alternate===null)throw Error(s(340));Ca()}return a=l.flags,a&65536?(l.flags=a&-65537|128,l):null;case 19:return Ze(lt),null;case 4:return ka(),null;case 10:return q0(l.type._context),null;case 22:case 23:return j1(),null;case 24:return null;default:return null}}var Ac=!1,Yt=!1,bb=typeof WeakSet=="function"?WeakSet:Set,de=null;function Ta(a,l){var f=a.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(m){it(a,l,m)}else f.current=null}function C1(a,l,f){try{f()}catch(m){it(a,l,m)}}var p3=!1;function Eb(a,l){for(z(a.containerInfo),de=l;de!==null;)if(a=de,l=a.child,(a.subtreeFlags&1028)!==0&&l!==null)l.return=a,de=l;else for(;de!==null;){a=de;try{var f=a.alternate;if(a.flags&1024)switch(a.tag){case 0:case 11:case 15:break;case 1:if(f!==null){var m=f.memoizedProps,b=f.memoizedState,$=a.stateNode,A=$.getSnapshotBeforeUpdate(a.elementType===a.type?m:ar(a.type,m),b);$.__reactInternalSnapshotBeforeUpdate=A}break;case 3:le&&$C(a.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(j){it(a,a.return,j)}if(l=a.sibling,l!==null){l.return=a.return,de=l;break}de=a.return}return f=p3,p3=!1,f}function cl(a,l,f){var m=l.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var b=m=m.next;do{if((b.tag&a)===a){var $=b.destroy;b.destroy=void 0,$!==void 0&&C1(l,f,$)}b=b.next}while(b!==m)}}function Mc(a,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var f=l=l.next;do{if((f.tag&a)===a){var m=f.create;f.destroy=m()}f=f.next}while(f!==l)}}function b1(a){var l=a.ref;if(l!==null){var f=a.stateNode;switch(a.tag){case 5:a=Z(f);break;default:a=f}typeof l=="function"?l(a):l.current=a}}function g3(a){var l=a.alternate;l!==null&&(a.alternate=null,g3(l)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(l=a.stateNode,l!==null&&Dt(l)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function v3(a){return a.tag===5||a.tag===3||a.tag===4}function m3(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||v3(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function E1(a,l,f){var m=a.tag;if(m===5||m===6)a=a.stateNode,l?SC(f,a,l):gC(f,a);else if(m!==4&&(a=a.child,a!==null))for(E1(a,l,f),a=a.sibling;a!==null;)E1(a,l,f),a=a.sibling}function P1(a,l,f){var m=a.tag;if(m===5||m===6)a=a.stateNode,l?wC(f,a,l):pC(f,a);else if(m!==4&&(a=a.child,a!==null))for(P1(a,l,f),a=a.sibling;a!==null;)P1(a,l,f),a=a.sibling}var Lt=null,sr=!1;function Nr(a,l,f){for(f=f.child;f!==null;)$1(a,l,f),f=f.sibling}function $1(a,l,f){if(Er&&typeof Er.onCommitFiberUnmount=="function")try{Er.onCommitFiberUnmount(cc,f)}catch{}switch(f.tag){case 5:Yt||Ta(f,l);case 6:if(le){var m=Lt,b=sr;Lt=null,Nr(a,l,f),Lt=m,sr=b,Lt!==null&&(sr?_C(Lt,f.stateNode):xC(Lt,f.stateNode))}else Nr(a,l,f);break;case 18:le&&Lt!==null&&(sr?HC(Lt,f.stateNode):BC(Lt,f.stateNode));break;case 4:le?(m=Lt,b=sr,Lt=f.stateNode.containerInfo,sr=!0,Nr(a,l,f),Lt=m,sr=b):(me&&(m=f.stateNode.containerInfo,b=J2(m),N0(m,b)),Nr(a,l,f));break;case 0:case 11:case 14:case 15:if(!Yt&&(m=f.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){b=m=m.next;do{var $=b,A=$.destroy;$=$.tag,A!==void 0&&($&2||$&4)&&C1(f,l,A),b=b.next}while(b!==m)}Nr(a,l,f);break;case 1:if(!Yt&&(Ta(f,l),m=f.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=f.memoizedProps,m.state=f.memoizedState,m.componentWillUnmount()}catch(j){it(f,l,j)}Nr(a,l,f);break;case 21:Nr(a,l,f);break;case 22:f.mode&1?(Yt=(m=Yt)||f.memoizedState!==null,Nr(a,l,f),Yt=m):Nr(a,l,f);break;default:Nr(a,l,f)}}function y3(a){var l=a.updateQueue;if(l!==null){a.updateQueue=null;var f=a.stateNode;f===null&&(f=a.stateNode=new bb),l.forEach(function(m){var b=Ob.bind(null,a,m);f.has(m)||(f.add(m),m.then(b,b))})}}function lr(a,l){var f=l.deletions;if(f!==null)for(var m=0;m";case Ic:return":has("+(T1(a)||"")+")";case Dc:return'[role="'+a.value+'"]';case Fc:return'"'+a.value+'"';case Lc:return'[data-testname="'+a.value+'"]';default:throw Error(s(365))}}function b3(a,l){var f=[];a=[a,0];for(var m=0;mb&&(b=A),m&=~$}if(m=b,m=Rt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*$b(m/1960))-m,10a?16:a,To===null)var m=!1;else{if(a=To,To=null,Gc=0,Ne&6)throw Error(s(331));var b=Ne;for(Ne|=4,de=a.current;de!==null;){var $=de,A=$.child;if(de.flags&16){var j=$.deletions;if(j!==null){for(var K=0;KRt()-O1?Ni(a,0):M1|=f),hn(a,l)}function M3(a,l){l===0&&(a.mode&1?(l=lc,lc<<=1,!(lc&130023424)&&(lc=4194304)):l=1);var f=Xt();a=$r(a,l),a!==null&&(Zs(a,l,f),hn(a,f))}function Mb(a){var l=a.memoizedState,f=0;l!==null&&(f=l.retryLane),M3(a,f)}function Ob(a,l){var f=0;switch(a.tag){case 13:var m=a.stateNode,b=a.memoizedState;b!==null&&(f=b.retryLane);break;case 19:m=a.stateNode;break;default:throw Error(s(314))}m!==null&&m.delete(l),M3(a,f)}var O3;O3=function(a,l,f){if(a!==null)if(a.memoizedProps!==l.pendingProps||un.current)dn=!0;else{if(!(a.lanes&f)&&!(l.flags&128))return dn=!1,xb(a,l,f);dn=!!(a.flags&131072)}else dn=!1,ot&&l.flags&1048576&&d5(l,hc,l.index);switch(l.lanes=0,l.tag){case 2:var m=l.type;Rc(a,l),a=l.pendingProps;var b=Sa(l,Ht.current);Ea(l,f),b=u1(null,l,m,a,b,f);var $=c1();return l.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,cn(m)?($=!0,ac(l)):$=!1,l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,e1(l),b.updater=Sc,l.stateNode=b,b._reactInternals=l,n1(l,m,a,f),l=y1(null,l,m,!0,$,f)):(l.tag=0,ot&&$&&B0(l),nn(null,l,b,f),l=l.child),l;case 16:m=l.elementType;e:{switch(Rc(a,l),a=l.pendingProps,b=m._init,m=b(m._payload),l.type=m,b=l.tag=Db(m),a=ar(m,a),b){case 0:l=m1(null,l,m,a,f);break e;case 1:l=a3(null,l,m,a,f);break e;case 11:l=t3(null,l,m,a,f);break e;case 14:l=n3(null,l,m,ar(m.type,a),f);break e}throw Error(s(306,m,""))}return l;case 0:return m=l.type,b=l.pendingProps,b=l.elementType===m?b:ar(m,b),m1(a,l,m,b,f);case 1:return m=l.type,b=l.pendingProps,b=l.elementType===m?b:ar(m,b),a3(a,l,m,b,f);case 3:e:{if(s3(l),a===null)throw Error(s(387));m=l.pendingProps,$=l.memoizedState,b=$.element,y5(a,l),wc(l,m,null,f);var A=l.memoizedState;if(m=A.element,$e&&$.isDehydrated)if($={element:m,isDehydrated:!1,cache:A.cache,pendingSuspenseBoundaries:A.pendingSuspenseBoundaries,transitions:A.transitions},l.updateQueue.baseState=$,l.memoizedState=$,l.flags&256){b=Ra(Error(s(423)),l),l=l3(a,l,m,f,b);break e}else if(m!==b){b=Ra(Error(s(424)),l),l=l3(a,l,m,f,b);break e}else for($e&&(Dn=DC(l.stateNode.containerInfo),xn=l,ot=!0,ir=null,Js=!1),f=$5(l,null,m,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Ca(),m===b){l=Yr(a,l,f);break e}nn(a,l,m,f)}l=l.child}return l;case 5:return k5(l),a===null&&K0(l),m=l.type,b=l.pendingProps,$=a!==null?a.memoizedProps:null,A=b.children,Fe(m,b)?A=null:$!==null&&Fe(m,$)&&(l.flags|=32),i3(a,l),nn(a,l,A,f),l.child;case 6:return a===null&&K0(l),null;case 13:return u3(a,l,f);case 4:return r1(l,l.stateNode.containerInfo),m=l.pendingProps,a===null?l.child=Pa(l,null,m,f):nn(a,l,m,f),l.child;case 11:return m=l.type,b=l.pendingProps,b=l.elementType===m?b:ar(m,b),t3(a,l,m,b,f);case 7:return nn(a,l,l.pendingProps,f),l.child;case 8:return nn(a,l,l.pendingProps.children,f),l.child;case 12:return nn(a,l,l.pendingProps.children,f),l.child;case 10:e:{if(m=l.type._context,b=l.pendingProps,$=l.memoizedProps,A=b.value,v5(l,m,A),$!==null)if(or($.value,A)){if($.children===b.children&&!un.current){l=Yr(a,l,f);break e}}else for($=l.child,$!==null&&($.return=l);$!==null;){var j=$.dependencies;if(j!==null){A=$.child;for(var K=j.firstContext;K!==null;){if(K.context===m){if($.tag===1){K=Kr(-1,f&-f),K.tag=2;var re=$.updateQueue;if(re!==null){re=re.shared;var he=re.pending;he===null?K.next=K:(K.next=he.next,he.next=K),re.pending=K}}$.lanes|=f,K=$.alternate,K!==null&&(K.lanes|=f),Z0($.return,f,l),j.lanes|=f;break}K=K.next}}else if($.tag===10)A=$.type===l.type?null:$.child;else if($.tag===18){if(A=$.return,A===null)throw Error(s(341));A.lanes|=f,j=A.alternate,j!==null&&(j.lanes|=f),Z0(A,f,l),A=$.sibling}else A=$.child;if(A!==null)A.return=$;else for(A=$;A!==null;){if(A===l){A=null;break}if($=A.sibling,$!==null){$.return=A.return,A=$;break}A=A.return}$=A}nn(a,l,b.children,f),l=l.child}return l;case 9:return b=l.type,m=l.pendingProps.children,Ea(l,f),b=Ln(b),m=m(b),l.flags|=1,nn(a,l,m,f),l.child;case 14:return m=l.type,b=ar(m,l.pendingProps),b=ar(m.type,b),n3(a,l,m,b,f);case 15:return r3(a,l,l.type,l.pendingProps,f);case 17:return m=l.type,b=l.pendingProps,b=l.elementType===m?b:ar(m,b),Rc(a,l),l.tag=1,cn(m)?(a=!0,ac(l)):a=!1,Ea(l,f),C5(l,m,b),n1(l,m,b,f),y1(null,l,m,!0,a,f);case 19:return d3(a,l,f);case 22:return o3(a,l,f)}throw Error(s(156,l.tag))};function I3(a,l){return j0(a,l)}function Ib(a,l,f,m){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Un(a,l,f,m){return new Ib(a,l,f,m)}function V1(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Db(a){if(typeof a=="function")return V1(a)?1:0;if(a!=null){if(a=a.$$typeof,a===y)return 11;if(a===C)return 14}return 2}function Mo(a,l){var f=a.alternate;return f===null?(f=Un(a.tag,l,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=l,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&14680064,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,l=a.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f}function Kc(a,l,f,m,b,$){var A=2;if(m=a,typeof a=="function")V1(a)&&(A=1);else if(typeof a=="string")A=5;else e:switch(a){case p:return Oi(f.children,b,$,l);case g:A=8,b|=8;break;case S:return a=Un(12,f,l,b|2),a.elementType=S,a.lanes=$,a;case E:return a=Un(13,f,l,b),a.elementType=E,a.lanes=$,a;case _:return a=Un(19,f,l,b),a.elementType=_,a.lanes=$,a;case P:return Yc(f,b,$,l);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case w:A=10;break e;case x:A=9;break e;case y:A=11;break e;case C:A=14;break e;case v:A=16,m=null;break e}throw Error(s(130,a==null?a:typeof a,""))}return l=Un(A,f,l,b),l.elementType=a,l.type=m,l.lanes=$,l}function Oi(a,l,f,m){return a=Un(7,a,m,l),a.lanes=f,a}function Yc(a,l,f,m){return a=Un(22,a,m,l),a.elementType=P,a.lanes=f,a.stateNode={isHidden:!1},a}function G1(a,l,f){return a=Un(6,a,null,l),a.lanes=f,a}function B1(a,l,f){return l=Un(4,a.children!==null?a.children:[],a.key,l),l.lanes=f,l.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},l}function Lb(a,l,f,m,b){this.tag=l,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=se,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=F0(0),this.expirationTimes=F0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=F0(0),this.identifierPrefix=m,this.onRecoverableError=b,$e&&(this.mutableSourceEagerHydrationData=null)}function D3(a,l,f,m,b,$,A,j,K){return a=new Lb(a,l,f,j,K),l===1?(l=1,$===!0&&(l|=8)):l=0,$=Un(3,null,null,l),a.current=$,$.stateNode=a,$.memoizedState={element:m,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},e1($),a}function L3(a){if(!a)return Po;a=a._reactInternals;e:{if(I(a)!==a||a.tag!==1)throw Error(s(170));var l=a;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(cn(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(s(171))}if(a.tag===1){var f=a.type;if(cn(f))return i5(a,f,l)}return l}function F3(a){var l=a._reactInternals;if(l===void 0)throw typeof a.render=="function"?Error(s(188)):(a=Object.keys(a).join(","),Error(s(268,a)));return a=F(l),a===null?null:a.stateNode}function z3(a,l){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f=re&&$>=xe&&b<=he&&A<=ue){a.splice(l,1);break}else if(m!==re||f.width!==K.width||ue<$||xe>A){if(!($!==xe||f.height!==K.height||heb)){re>m&&(K.width+=re-m,K.x=m),he$&&(K.height+=xe-$,K.y=$),uef&&(f=A)),A ")+` + +No matching component was found for: + `)+a.join(" > ")}return null},n.getPublicRootInstance=function(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return Z(a.child.stateNode);default:return a.child.stateNode}},n.injectIntoDevTools=function(a){if(a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:u.ReactCurrentDispatcher,findHostInstanceByFiber:Fb,findFiberByHostInstance:a.findFiberByHostInstance||zb,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")a=!1;else{var l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(l.isDisabled||!l.supportsFiber)a=!0;else{try{cc=l.inject(a),Er=l}catch{}a=!!l.checkDCE}}return a},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(a,l,f,m){if(!bi)throw Error(s(363));a=N1(a,l);var b=hC(a,f,m).disconnect;return{disconnect:function(){b()}}},n.registerMutableSourceForHydration=function(a,l){var f=l._getVersion;f=f(l._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[l,f]:a.mutableSourceEagerHydrationData.push(l,f)},n.runWithPriority=function(a,l){var f=Ue;try{return Ue=a,l()}finally{Ue=f}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(a,l,f,m){var b=l.current,$=Xt(),A=No(b);return f=L3(f),l.context===null?l.context=f:l.pendingContext=f,l=Kr($,A),l.payload={element:a},m=m===void 0?null:m,m!==null&&(l.callback=m),a=ko(b,l,A),a!==null&&(jn(a,b,A,$),yc(a,b,A)),A},n};Fx.exports=Xz;var Qz=Fx.exports;const qz=ra(Qz);var zx={exports:{}},va={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */va.ConcurrentRoot=1;va.ContinuousEventPriority=4;va.DefaultEventPriority=16;va.DiscreteEventPriority=1;va.IdleEventPriority=536870912;va.LegacyRoot=0;zx.exports=va;var jx=zx.exports;const Cy={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let by=!1,Ey=!1;const M2=".react-konva-event",Zz=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,Jz=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,ej={};function w0(e,t,n=ej){if(!by&&"zIndex"in t&&(console.warn(Jz),by=!0),!Ey&&t.draggable){var r=t.x!==void 0||t.y!==void 0,o=t.onDragEnd||t.onDragMove;r&&!o&&(console.warn(Zz),Ey=!0)}for(var i in n)if(!Cy[i]){var s=i.slice(0,2)==="on",u=n[i]!==t[i];if(s&&u){var c=i.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),e.off(c,n[i])}var d=!t.hasOwnProperty(i);d&&e.setAttr(i,void 0)}var p=t._useStrictMode,g={},S=!1;const w={};for(var i in t)if(!Cy[i]){var s=i.slice(0,2)==="on",x=n[i]!==t[i];if(s&&x){var c=i.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),t[i]&&(w[c]=t[i])}!s&&(t[i]!==n[i]||p&&t[i]!==e.getAttr(i))&&(S=!0,g[i]=t[i])}S&&(e.setAttrs(g),Ci(e));for(var c in w)e.on(c+M2,w[c])}function Ci(e){if(!Re.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const Ux={},tj={};ku.Node.prototype._applyProps=w0;function nj(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Ci(e)}function rj(e,t,n){let r=ku[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=ku.Group);const o={},i={};for(var s in t){var u=s.slice(0,2)==="on";u?i[s]=t[s]:o[s]=t[s]}const c=new r(o);return w0(c,i),c}function oj(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function ij(e,t,n){return!1}function aj(e){return e}function sj(){return null}function lj(){return null}function uj(e,t,n,r){return tj}function cj(){}function dj(e){}function fj(e,t){return!1}function hj(){return Ux}function pj(){return Ux}const gj=setTimeout,vj=clearTimeout,mj=-1;function yj(e,t){return!1}const wj=!1,Sj=!0,xj=!0;function _j(e,t){t.parent===e?t.moveToTop():e.add(t),Ci(e)}function Cj(e,t){t.parent===e?t.moveToTop():e.add(t),Ci(e)}function Vx(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),Ci(e)}function bj(e,t,n){Vx(e,t,n)}function Ej(e,t){t.destroy(),t.off(M2),Ci(e)}function Pj(e,t){t.destroy(),t.off(M2),Ci(e)}function $j(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function kj(e,t,n){}function Rj(e,t,n,r,o){w0(e,o,r)}function Tj(e){e.hide(),Ci(e)}function Nj(e){}function Aj(e,t){(t.visible==null||t.visible)&&e.show()}function Mj(e,t){}function Oj(e){}function Ij(){}const Dj=()=>jx.DefaultEventPriority,Lj=Object.freeze(Object.defineProperty({__proto__:null,appendChild:_j,appendChildToContainer:Cj,appendInitialChild:nj,cancelTimeout:vj,clearContainer:Oj,commitMount:kj,commitTextUpdate:$j,commitUpdate:Rj,createInstance:rj,createTextInstance:oj,detachDeletedInstance:Ij,finalizeInitialChildren:ij,getChildHostContext:pj,getCurrentEventPriority:Dj,getPublicInstance:aj,getRootHostContext:hj,hideInstance:Tj,hideTextInstance:Nj,idlePriority:zl.unstable_IdlePriority,insertBefore:Vx,insertInContainerBefore:bj,isPrimaryRenderer:wj,noTimeout:mj,now:zl.unstable_now,prepareForCommit:sj,preparePortalMount:lj,prepareUpdate:uj,removeChild:Ej,removeChildFromContainer:Pj,resetAfterCommit:cj,resetTextContent:dj,run:zl.unstable_runWithPriority,scheduleTimeout:gj,shouldDeprioritizeSubtree:fj,shouldSetTextContent:yj,supportsMutation:xj,unhideInstance:Aj,unhideTextInstance:Mj,warnsIfNotActing:Sj},Symbol.toStringTag,{value:"Module"}));var Fj=Object.defineProperty,zj=Object.defineProperties,jj=Object.getOwnPropertyDescriptors,Py=Object.getOwnPropertySymbols,Uj=Object.prototype.hasOwnProperty,Vj=Object.prototype.propertyIsEnumerable,$y=(e,t,n)=>t in e?Fj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ky=(e,t)=>{for(var n in t||(t={}))Uj.call(t,n)&&$y(e,n,t[n]);if(Py)for(var n of Py(t))Vj.call(t,n)&&$y(e,n,t[n]);return e},Gj=(e,t)=>zj(e,jj(t));function Gx(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const o=Gx(r,t,n);if(o)return o;r=t?null:r.sibling}}function Bx(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const O2=Bx(h.createContext(null));class Hx extends h.Component{render(){return h.createElement(O2.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:Ry,ReactCurrentDispatcher:Ty}=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Bj(){const e=h.useContext(O2);if(e===null)throw new Error("its-fine: useFiber must be called within a !");const t=h.useId();return h.useMemo(()=>{for(const r of[Ry==null?void 0:Ry.current,e,e==null?void 0:e.alternate]){if(!r)continue;const o=Gx(r,!1,i=>{let s=i.memoizedState;for(;s;){if(s.memoizedState===t)return!0;s=s.next}});if(o)return o}},[e,t])}function Hj(){var e,t;const n=Bj(),[r]=h.useState(()=>new Map);r.clear();let o=n;for(;o;){const i=(e=o.type)==null?void 0:e._context;i&&i!==O2&&!r.has(i)&&r.set(i,(t=Ty==null?void 0:Ty.current)==null?void 0:t.readContext(Bx(i))),o=o.return}return r}function Wj(){const e=Hj();return h.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>h.createElement(t,null,h.createElement(n.Provider,Gj(ky({},r),{value:e.get(n)}))),t=>h.createElement(Hx,ky({},t))),[e])}function Kj(e){const t=te.useRef({});return te.useLayoutEffect(()=>{t.current=e}),te.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}const Yj=e=>{const t=te.useRef(),n=te.useRef(),r=te.useRef(),o=Kj(e),i=Wj(),s=u=>{const{forwardedRef:c}=e;c&&(typeof c=="function"?c(u):c.current=u)};return te.useLayoutEffect(()=>(n.current=new ku.Stage({width:e.width,height:e.height,container:t.current}),s(n.current),r.current=Ll.createContainer(n.current,jx.LegacyRoot,!1,null),Ll.updateContainer(te.createElement(i,{},e.children),r.current),()=>{ku.isBrowser&&(s(null),Ll.updateContainer(null,r.current,null),n.current.destroy())}),[]),te.useLayoutEffect(()=>{s(n.current),w0(n.current,e,o),Ll.updateContainer(te.createElement(i,{},e.children),r.current,null)}),te.createElement("div",{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Ru="Layer",Xj="Circle",Qj="Line",qj="Text",Ll=qz(Lj);Ll.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:te.version,rendererPackageName:"react-konva"});const Zj=te.forwardRef((e,t)=>te.createElement(Hx,{},te.createElement(Yj,{...e,forwardedRef:t}))),Jj=()=>{const{canvasSize:{width:e,height:t},gridSize:n}=Bt(["canvasSize","gridSize"]),{theme:r}=A9(),o=[];for(let i=1;i{const{dots:e,theme:t}=Jj();return M.jsx(M.Fragment,{children:M.jsx(Ru,{children:e.map((n,r)=>M.jsx(Xj,{x:n.x,y:n.y,radius:.5,fill:t==="dark"?"#666":"#999"},r))})})};var tU=Object.defineProperty,nU=(e,t)=>{for(var n in t)tU(e,n,{get:t[n],enumerable:!0})},_r={};nU(_r,{assign:()=>iU,colors:()=>ai,createStringInterpolator:()=>U2,skipAnimation:()=>Zx,to:()=>qx,willAdvance:()=>V2});var I2=Zu(),Ce=e=>qu(e,I2),D2=Zu();Ce.write=e=>qu(e,D2);var S0=Zu();Ce.onStart=e=>qu(e,S0);var L2=Zu();Ce.onFrame=e=>qu(e,L2);var F2=Zu();Ce.onFinish=e=>qu(e,F2);var fs=[];Ce.setTimeout=(e,t)=>{const n=Ce.now()+t,r=()=>{const i=fs.findIndex(s=>s.cancel==r);~i&&fs.splice(i,1),qo-=~i?1:0},o={time:n,handler:e,cancel:r};return fs.splice(Wx(n),0,o),qo+=1,Kx(),o};var Wx=e=>~(~fs.findIndex(t=>t.time>e)||~fs.length);Ce.cancel=e=>{S0.delete(e),L2.delete(e),F2.delete(e),I2.delete(e),D2.delete(e)};Ce.sync=e=>{wv=!0,Ce.batchedUpdates(e),wv=!1};Ce.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,Ce.onStart(n)}return r.handler=e,r.cancel=()=>{S0.delete(n),t=null},r};var z2=typeof window<"u"?window.requestAnimationFrame:()=>{};Ce.use=e=>z2=e;Ce.now=typeof performance<"u"?()=>performance.now():Date.now;Ce.batchedUpdates=e=>e();Ce.catch=console.error;Ce.frameLoop="always";Ce.advance=()=>{Ce.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Xx()};var Qo=-1,qo=0,wv=!1;function qu(e,t){wv?(t.delete(e),e(0)):(t.add(e),Kx())}function Kx(){Qo<0&&(Qo=0,Ce.frameLoop!=="demand"&&z2(Yx))}function rU(){Qo=-1}function Yx(){~Qo&&(z2(Yx),Ce.batchedUpdates(Xx))}function Xx(){const e=Qo;Qo=Ce.now();const t=Wx(Qo);if(t&&(Qx(fs.splice(0,t),n=>n.handler()),qo-=t),!qo){rU();return}S0.flush(),I2.flush(e?Math.min(64,Qo-e):16.667),L2.flush(),D2.flush(),F2.flush()}function Zu(){let e=new Set,t=e;return{add(n){qo+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return qo-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,qo-=t.size,Qx(t,r=>r(n)&&e.add(r)),qo+=e.size,t=e)}}}function Qx(e,t){e.forEach(n=>{try{t(n)}catch(r){Ce.catch(r)}})}function Sv(){}var oU=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ie={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function to(e,t){if(ie.arr(e)){if(!ie.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function go(e,t,n){if(ie.arr(e)){for(let r=0;rie.und(e)?[]:ie.arr(e)?e:[e];function eu(e,t){if(e.size){const n=Array.from(e);e.clear(),Be(n,t)}}var Fl=(e,...t)=>eu(e,n=>n(...t)),j2=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),U2,qx,ai=null,Zx=!1,V2=Sv,iU=e=>{e.to&&(qx=e.to),e.now&&(Ce.now=e.now),e.colors!==void 0&&(ai=e.colors),e.skipAnimation!=null&&(Zx=e.skipAnimation),e.createStringInterpolator&&(U2=e.createStringInterpolator),e.requestAnimationFrame&&Ce.use(e.requestAnimationFrame),e.batchedUpdates&&(Ce.batchedUpdates=e.batchedUpdates),e.willAdvance&&(V2=e.willAdvance),e.frameLoop&&(Ce.frameLoop=e.frameLoop)},tu=new Set,Wn=[],Vp=[],zf=0,x0={get idle(){return!tu.size&&!Wn.length},start(e){zf>e.priority?(tu.add(e),Ce.onStart(aU)):(Jx(e),Ce(xv))},advance:xv,sort(e){if(zf)Ce.onFrame(()=>x0.sort(e));else{const t=Wn.indexOf(e);~t&&(Wn.splice(t,1),e_(e))}},clear(){Wn=[],tu.clear()}};function aU(){tu.forEach(Jx),tu.clear(),Ce(xv)}function Jx(e){Wn.includes(e)||e_(e)}function e_(e){Wn.splice(sU(Wn,t=>t.priority>e.priority),0,e)}function xv(e){const t=Vp;for(let n=0;n0}function sU(e,t){const n=e.findIndex(t);return n<0?e.length:n}var lU=(e,t,n)=>Math.min(Math.max(n,e),t),uU={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},vr="[-+]?\\d*\\.?\\d+",jf=vr+"%";function _0(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var cU=new RegExp("rgb"+_0(vr,vr,vr)),dU=new RegExp("rgba"+_0(vr,vr,vr,vr)),fU=new RegExp("hsl"+_0(vr,jf,jf)),hU=new RegExp("hsla"+_0(vr,jf,jf,vr)),pU=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,gU=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,vU=/^#([0-9a-fA-F]{6})$/,mU=/^#([0-9a-fA-F]{8})$/;function yU(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=vU.exec(e))?parseInt(t[1]+"ff",16)>>>0:ai&&ai[e]!==void 0?ai[e]:(t=cU.exec(e))?(ja(t[1])<<24|ja(t[2])<<16|ja(t[3])<<8|255)>>>0:(t=dU.exec(e))?(ja(t[1])<<24|ja(t[2])<<16|ja(t[3])<<8|My(t[4]))>>>0:(t=pU.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=mU.exec(e))?parseInt(t[1],16)>>>0:(t=gU.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=fU.exec(e))?(Ny(Ay(t[1]),Td(t[2]),Td(t[3]))|255)>>>0:(t=hU.exec(e))?(Ny(Ay(t[1]),Td(t[2]),Td(t[3]))|My(t[4]))>>>0:null}function Gp(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ny(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=Gp(o,r,e+1/3),s=Gp(o,r,e),u=Gp(o,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(u*255)<<8}function ja(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Ay(e){return(parseFloat(e)%360+360)%360/360}function My(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Td(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Oy(e){let t=yU(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var Tu=(e,t,n)=>{if(ie.fun(e))return e;if(ie.arr(e))return Tu({range:e,output:t,extrapolate:n});if(ie.str(e.output[0]))return U2(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",u=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(d=>d);return d=>{const p=SU(d,i);return wU(d,i[p],i[p+1],o[p],o[p+1],c,s,u,r.map)}};function wU(e,t,n,r,o,i,s,u,c){let d=c?c(e):e;if(dn){if(u==="identity")return d;u==="clamp"&&(d=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?d=-d:n===1/0?d=d-t:d=(d-t)/(n-t),d=i(d),r===-1/0?d=-d:o===1/0?d=d+r:d=d*(o-r)+r,d)}function SU(e,t){for(var n=1;n=e);++n);return n-1}var xU=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return lU(0,1,o/e)},Uf=1.70158,Nd=Uf*1.525,Iy=Uf+1,Dy=2*Math.PI/3,Ly=2*Math.PI/4.5,Ad=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Vf={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Iy*e*e*e-Uf*e*e,easeOutBack:e=>1+Iy*Math.pow(e-1,3)+Uf*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Nd+1)*2*e-Nd)/2:(Math.pow(2*e-2,2)*((Nd+1)*(e*2-2)+Nd)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Dy),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Dy)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ly))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ly)/2+1,easeInBounce:e=>1-Ad(1-e),easeOutBounce:Ad,easeInOutBounce:e=>e<.5?(1-Ad(1-2*e))/2:(1+Ad(2*e-1))/2,steps:xU},Nu=Symbol.for("FluidValue.get"),Rs=Symbol.for("FluidValue.observers"),Dr=e=>!!(e&&e[Nu]),Gn=e=>e&&e[Nu]?e[Nu]():e,Fy=e=>e[Rs]||null;function _U(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Gf(e,t){const n=e[Rs];n&&n.forEach(r=>{_U(r,t)})}var CU=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");bU(this,e)}},bU=(e,t)=>t_(e,Nu,t);function Ju(e,t){if(e[Nu]){let n=e[Rs];n||t_(e,Rs,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Bf(e,t){const n=e[Rs];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Rs]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var t_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),nf=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,EU=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,zy=new RegExp(`(${nf.source})(%|[a-z]+)`,"i"),PU=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,C0=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,n_=e=>{const[t,n]=$U(e);if(!t||j2())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&C0.test(n))return n_(n);if(n)return n}return e},$U=e=>{const t=C0.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Bp,kU=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,r_=e=>{Bp||(Bp=ai?new RegExp(`(${Object.keys(ai).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>Gn(i).replace(C0,n_).replace(EU,Oy).replace(Bp,Oy)),n=t.map(i=>i.match(nf).map(Number)),o=n[0].map((i,s)=>n.map(u=>{if(!(s in u))throw Error('The arity of each "output" value must be equal');return u[s]})).map(i=>Tu({...e,output:i}));return i=>{var c;const s=!zy.test(t[0])&&((c=t.find(d=>zy.test(d)))==null?void 0:c.replace(nf,""));let u=0;return t[0].replace(nf,()=>`${o[u++](i)}${s||""}`).replace(PU,kU)}},G2="react-spring: ",o_=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${G2}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},RU=o_(console.warn);function TU(){RU(`${G2}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var NU=o_(console.warn);function AU(){NU(`${G2}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function b0(e){return ie.str(e)&&(e[0]=="#"||/\d/.test(e)||!j2()&&C0.test(e)||e in(ai||{}))}var B2=j2()?h.useEffect:h.useLayoutEffect,MU=()=>{const e=h.useRef(!1);return B2(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function i_(){const e=h.useState()[1],t=MU();return()=>{t.current&&e(Math.random())}}function OU(e,t){const[n]=h.useState(()=>({inputs:t,result:e()})),r=h.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&IU(t,i.inputs)||(i={inputs:t,result:e()}):i=n,h.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function IU(e,t){if(e.length!==t.length)return!1;for(let n=0;nh.useEffect(e,DU),DU=[];function jy(e){const t=h.useRef();return h.useEffect(()=>{t.current=e}),t.current}var Au=Symbol.for("Animated:node"),LU=e=>!!e&&e[Au]===e,Ir=e=>e&&e[Au],H2=(e,t)=>oU(e,Au,t),E0=e=>e&&e[Au]&&e[Au].getPayload(),s_=class{constructor(){H2(this,this)}getPayload(){return this.payload||[]}},ec=class extends s_{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,ie.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new ec(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return ie.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,ie.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Mu=class extends ec{constructor(e){super(0),this._string=null,this._toString=Tu({output:[e,e]})}static create(e){return new Mu(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(ie.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Tu({output:[this.getValue(),e]})),this._value=0,super.reset()}},Hf={dependencies:null},W2=class extends s_{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return go(this.source,(n,r)=>{LU(n)?t[r]=n.getValue(e):Dr(n)?t[r]=Gn(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Be(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return go(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Hf.dependencies&&Dr(e)&&Hf.dependencies.add(e);const t=E0(e);t&&Be(t,n=>this.add(n))}},l_=class extends W2{constructor(e){super(e)}static create(e){return new l_(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(FU)),!0)}};function FU(e){return(b0(e)?Mu:ec).create(e)}function _v(e){const t=Ir(e);return t?t.constructor:ie.arr(e)?l_:b0(e)?Mu:ec}var Uy=(e,t)=>{const n=!ie.fun(e)||e.prototype&&e.prototype.isReactComponent;return h.forwardRef((r,o)=>{const i=h.useRef(null),s=n&&h.useCallback(x=>{i.current=UU(o,x)},[o]),[u,c]=jU(r,t),d=i_(),p=()=>{const x=i.current;if(n&&!x)return;(x?t.applyAnimatedValues(x,u.getValue(!0)):!1)===!1&&d()},g=new zU(p,c),S=h.useRef();B2(()=>(S.current=g,Be(c,x=>Ju(x,g)),()=>{S.current&&(Be(S.current.deps,x=>Bf(x,S.current)),Ce.cancel(S.current.update))})),h.useEffect(p,[]),a_(()=>()=>{const x=S.current;Be(x.deps,y=>Bf(y,x))});const w=t.getComponentProps(u.getValue());return h.createElement(e,{...w,ref:s})})},zU=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Ce.write(this.update)}};function jU(e,t){const n=new Set;return Hf.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new W2(e),Hf.dependencies=null,[e,n]}function UU(e,t){return e&&(ie.fun(e)?e(t):e.current=t),t}var Vy=Symbol.for("AnimatedComponent"),VU=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new W2(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=s=>{const u=Gy(s)||"Anonymous";return ie.str(s)?s=i[s]||(i[s]=Uy(s,o)):s=s[Vy]||(s[Vy]=Uy(s,o)),s.displayName=`Animated(${u})`,s};return go(e,(s,u)=>{ie.arr(e)&&(u=Gy(s)),i[u]=i(s)}),{animated:i}},Gy=e=>ie.str(e)?e:e&&ie.str(e.displayName)?e.displayName:ie.fun(e)&&e.name||null;function Ui(e,...t){return ie.fun(e)?e(...t):e}var nu=(e,t)=>e===!0||!!(t&&e&&(ie.fun(e)?e(t):Yn(e).includes(t))),u_=(e,t)=>ie.obj(e)?t&&e[t]:e,c_=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,GU=e=>e,K2=(e,t=GU)=>{let n=BU;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const i=t(e[o],o);ie.und(i)||(r[o]=i)}return r},BU=["config","onProps","onStart","onChange","onPause","onResume","onRest"],HU={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function WU(e){const t={};let n=0;if(go(e,(r,o)=>{HU[o]||(t[o]=r,n++)}),n)return t}function d_(e){const t=WU(e);if(t){const n={to:t};return go(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function Ou(e){return e=Gn(e),ie.arr(e)?e.map(Ou):b0(e)?_r.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function KU(e){for(const t in e)return!0;return!1}function Cv(e){return ie.fun(e)||ie.arr(e)&&ie.obj(e[0])}function YU(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function XU(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var QU={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},bv={...QU.default,mass:1,damping:1,easing:Vf.linear,clamp:!1},qU=class{constructor(){this.velocity=0,Object.assign(this,bv)}};function ZU(e,t,n){n&&(n={...n},By(n,t),t={...n,...t}),By(e,t),Object.assign(e,t);for(const s in bv)e[s]==null&&(e[s]=bv[s]);let{frequency:r,damping:o}=e;const{mass:i}=e;return ie.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r),e}function By(e,t){if(!ie.und(t.decay))e.duration=void 0;else{const n=!ie.und(t.tension)||!ie.und(t.friction);(n||!ie.und(t.frequency)||!ie.und(t.damping)||!ie.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Hy=[],JU=class{constructor(){this.changed=!1,this.values=Hy,this.toValues=null,this.fromValues=Hy,this.config=new qU,this.immediate=!1}};function f_(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((s,u)=>{let c,d,p=nu(n.cancel??(r==null?void 0:r.cancel),t);if(p)w();else{ie.und(n.pause)||(o.paused=nu(n.pause,t));let x=r==null?void 0:r.pause;x!==!0&&(x=o.paused||nu(x,t)),c=Ui(n.delay||0,t),x?(o.resumeQueue.add(S),i.pause()):(i.resume(),S())}function g(){o.resumeQueue.add(S),o.timeouts.delete(d),d.cancel(),c=d.time-Ce.now()}function S(){c>0&&!_r.skipAnimation?(o.delayed=!0,d=Ce.setTimeout(w,c),o.pauseQueue.add(g),o.timeouts.add(d)):w()}function w(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(g),o.timeouts.delete(d),e<=(o.cancelId||0)&&(p=!0);try{i.start({...n,callId:e,cancel:p},s)}catch(x){u(x)}}})}var Y2=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?hs(e.get()):t.every(n=>n.noop)?h_(e.get()):gr(e.get(),t.every(n=>n.finished)),h_=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),gr=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),hs=e=>({value:e,cancelled:!0,finished:!1});function p_(e,t,n,r){const{callId:o,parentId:i,onRest:s}=t,{asyncTo:u,promise:c}=n;return!i&&e===u&&!t.reset?c:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const d=K2(t,(E,_)=>_==="onRest"?void 0:E);let p,g;const S=new Promise((E,_)=>(p=E,g=_)),w=E=>{const _=o<=(n.cancelId||0)&&hs(r)||o!==n.asyncId&&gr(r,!1);if(_)throw E.result=_,g(E),E},x=(E,_)=>{const C=new Wy,v=new Ky;return(async()=>{if(_r.skipAnimation)throw Iu(n),v.result=gr(r,!1),g(v),v;w(C);const P=ie.obj(E)?{...E}:{..._,to:E};P.parentId=o,go(d,(T,N)=>{ie.und(P[N])&&(P[N]=T)});const k=await r.start(P);return w(C),n.paused&&await new Promise(T=>{n.resumeQueue.add(T)}),k})()};let y;if(_r.skipAnimation)return Iu(n),gr(r,!1);try{let E;ie.arr(e)?E=(async _=>{for(const C of _)await x(C)})(e):E=Promise.resolve(e(x,r.stop.bind(r))),await Promise.all([E.then(p),S]),y=gr(r.get(),!0,!1)}catch(E){if(E instanceof Wy)y=E.result;else if(E instanceof Ky)y=E.result;else throw E}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?u:void 0,n.promise=i?c:void 0)}return ie.fun(s)&&Ce.batchedUpdates(()=>{s(y,r,r.item)}),y})()}function Iu(e,t){eu(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Wy=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Ky=class extends Error{constructor(){super("SkipAnimationSignal")}},Ev=e=>e instanceof X2,eV=1,X2=class extends CU{constructor(){super(...arguments),this.id=eV++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Ir(this);return e&&e.getValue()}to(...e){return _r.to(this,e)}interpolate(...e){return TU(),_r.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Gf(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||x0.sort(this),Gf(this,{type:"priority",parent:this,priority:e})}},ta=Symbol.for("SpringPhase"),g_=1,Pv=2,$v=4,Hp=e=>(e[ta]&g_)>0,Lo=e=>(e[ta]&Pv)>0,Rl=e=>(e[ta]&$v)>0,Yy=(e,t)=>t?e[ta]|=Pv|g_:e[ta]&=~Pv,Xy=(e,t)=>t?e[ta]|=$v:e[ta]&=~$v,tV=class extends X2{constructor(e,t){if(super(),this.animation=new JU,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!ie.und(e)||!ie.und(t)){const n=ie.obj(e)?{...e}:{...t,from:e};ie.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Lo(this)||this._state.asyncTo)||Rl(this)}get goal(){return Gn(this.animation.to)}get velocity(){const e=Ir(this);return e instanceof ec?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Hp(this)}get isAnimating(){return Lo(this)}get isPaused(){return Rl(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,s=E0(r.to);!s&&Dr(r.to)&&(o=Yn(Gn(r.to))),r.values.forEach((d,p)=>{if(d.done)return;const g=d.constructor==Mu?1:s?s[p].lastPosition:o[p];let S=r.immediate,w=g;if(!S){if(w=d.lastPosition,i.tension<=0){d.done=!0;return}let x=d.elapsedTime+=e;const y=r.fromValues[p],E=d.v0!=null?d.v0:d.v0=ie.arr(i.velocity)?i.velocity[p]:i.velocity;let _;const C=i.precision||(y==g?.005:Math.min(1,Math.abs(g-y)*.001));if(ie.und(i.duration))if(i.decay){const v=i.decay===!0?.998:i.decay,P=Math.exp(-(1-v)*x);w=y+E/(1-v)*(1-P),S=Math.abs(d.lastPosition-w)<=C,_=E*P}else{_=d.lastVelocity==null?E:d.lastVelocity;const v=i.restVelocity||C/10,P=i.clamp?0:i.bounce,k=!ie.und(P),T=y==g?d.v0>0:yv,!(!N&&(S=Math.abs(g-w)<=C,S)));++D){k&&(R=w==g||w>g==T,R&&(_=-_*P,w=g));const F=-i.tension*1e-6*(w-g),G=-i.friction*.001*_,U=(F+G)/i.mass;_=_+U*I,w=w+_*I}}else{let v=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,d.durationProgress>0&&(d.elapsedTime=i.duration*d.durationProgress,x=d.elapsedTime+=e)),v=(i.progress||0)+x/this._memoizedDuration,v=v>1?1:v<0?0:v,d.durationProgress=v),w=y+i.easing(v)*(g-y),_=(w-d.lastPosition)/e,S=v==1}d.lastVelocity=_,Number.isNaN(w)&&(console.warn("Got NaN while animating:",this),S=!0)}s&&!s[p].done&&(S=!1),S?d.done=!0:t=!1,d.setValue(w,i.round)&&(n=!0)});const u=Ir(this),c=u.getValue();if(t){const d=Gn(r.to);(c!==d||n)&&!i.decay?(u.setValue(d),this._onChange(d)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return Ce.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Lo(this)){const{to:e,config:t}=this.animation;Ce.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return ie.und(e)?(n=this.queue||[],this.queue=[]):n=[ie.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Y2(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Iu(this._state,e&&this._lastCallId),Ce.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=ie.obj(n)?n[t]:n,(n==null||Cv(n))&&(n=void 0),r=ie.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return Hp(this)||(e.reverse&&([n,r]=[r,n]),r=Gn(r),ie.und(r)?Ir(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,K2(e,(s,u)=>/^on/.test(u)?u_(s,n):s)),qy(this,e,"onProps"),Nl(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return f_(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Rl(this)||(Xy(this,!0),Fl(i.pauseQueue),Nl(this,"onPause",gr(this,Tl(this,this.animation.to)),this))},resume:()=>{Rl(this)&&(Xy(this,!1),Lo(this)&&this._resume(),Fl(i.resumeQueue),Nl(this,"onResume",gr(this,Tl(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(s=>{if(e.loop&&s.finished&&!(t&&s.noop)){const u=v_(e);if(u)return this._update(u,!0)}return s})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(hs(this));const r=!ie.und(e.to),o=!ie.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(hs(this));const{key:i,defaultProps:s,animation:u}=this,{to:c,from:d}=u;let{to:p=c,from:g=d}=e;o&&!r&&(!t.default||ie.und(p))&&(p=g),t.reverse&&([p,g]=[g,p]);const S=!to(g,d);S&&(u.from=g),g=Gn(g);const w=!to(p,c);w&&this._focus(p);const x=Cv(t.to),{config:y}=u,{decay:E,velocity:_}=y;(r||o)&&(y.velocity=0),t.config&&!x&&ZU(y,Ui(t.config,i),t.config!==s.config?Ui(s.config,i):void 0);let C=Ir(this);if(!C||ie.und(p))return n(gr(this,!0));const v=ie.und(t.reset)?o&&!t.default:!ie.und(g)&&nu(t.reset,i),P=v?g:this.get(),k=Ou(p),T=ie.num(k)||ie.arr(k)||b0(k),N=!x&&(!T||nu(s.immediate||t.immediate,i));if(w){const D=_v(p);if(D!==C.constructor)if(N)C=this._set(k);else throw Error(`Cannot animate between ${C.constructor.name} and ${D.name}, as the "to" prop suggests`)}const R=C.constructor;let I=Dr(p),O=!1;if(!I){const D=v||!Hp(this)&&S;(w||D)&&(O=to(Ou(P),k),I=!O),(!to(u.immediate,N)&&!N||!to(y.decay,E)||!to(y.velocity,_))&&(I=!0)}if(O&&Lo(this)&&(u.changed&&!v?I=!0:I||this._stop(c)),!x&&((I||Dr(c))&&(u.values=C.getPayload(),u.toValues=Dr(p)?null:R==Mu?[1]:Yn(k)),u.immediate!=N&&(u.immediate=N,!N&&!v&&this._set(c)),I)){const{onRest:D}=u;Be(rV,G=>qy(this,t,G));const F=gr(this,Tl(this,c));Fl(this._pendingCalls,F),this._pendingCalls.add(n),u.changed&&Ce.batchedUpdates(()=>{var G;u.changed=!v,D==null||D(F,this),v?Ui(s.onRest,F):(G=u.onStart)==null||G.call(u,F,this)})}v&&this._set(P),x?n(p_(t.to,t,this._state,this)):I?this._start():Lo(this)&&!w?this._pendingCalls.add(n):n(h_(P))}_focus(e){const t=this.animation;e!==t.to&&(Fy(this)&&this._detach(),t.to=e,Fy(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Dr(t)&&(Ju(t,this),Ev(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Dr(e)&&Bf(e,this)}_set(e,t=!0){const n=Gn(e);if(!ie.und(n)){const r=Ir(this);if(!r||!to(n,r.getValue())){const o=_v(n);!r||r.constructor!=o?H2(this,o.create(n)):r.setValue(n),r&&Ce.batchedUpdates(()=>{this._onChange(n,t)})}}return Ir(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Nl(this,"onStart",gr(this,Tl(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ui(this.animation.onChange,e,this)),Ui(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Ir(this).reset(Gn(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Lo(this)||(Yy(this,!0),Rl(this)||this._resume())}_resume(){_r.skipAnimation?this.finish():x0.start(this)}_stop(e,t){if(Lo(this)){Yy(this,!1);const n=this.animation;Be(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Gf(this,{type:"idle",parent:this});const r=t?hs(this.get()):gr(this.get(),Tl(this,e??n.to));Fl(this._pendingCalls,r),n.changed&&(n.changed=!1,Nl(this,"onRest",r,this))}}};function Tl(e,t){const n=Ou(t),r=Ou(e.get());return to(r,n)}function v_(e,t=e.loop,n=e.to){const r=Ui(t);if(r){const o=r!==!0&&d_(r),i=(o||e).reverse,s=!o||o.reset;return Du({...e,loop:t,default:!1,pause:void 0,to:!i||Cv(n)?n:void 0,from:s?e.from:void 0,reset:s,...o})}}function Du(e){const{to:t,from:n}=e=d_(e),r=new Set;return ie.obj(t)&&Qy(t,r),ie.obj(n)&&Qy(n,r),e.keys=r.size?Array.from(r):null,e}function nV(e){const t=Du(e);return ie.und(t.default)&&(t.default=K2(t)),t}function Qy(e,t){go(e,(n,r)=>n!=null&&t.add(r))}var rV=["onStart","onRest","onChange","onPause","onResume"];function qy(e,t,n){e.animation[n]=t[n]!==c_(t,n)?u_(t[n],e.key):void 0}function Nl(e,t,...n){var r,o,i,s;(o=(r=e.animation)[t])==null||o.call(r,...n),(s=(i=e.defaultProps)[t])==null||s.call(i,...n)}var oV=["onStart","onChange","onRest"],iV=1,aV=class{constructor(e,t){this.id=iV++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];ie.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Du(e)),this}start(e){let{queue:t}=this;return e?t=Yn(e).map(Du):this.queue=[],this._flush?this._flush(this,t):(x_(this,t),kv(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Be(Yn(t),r=>n[r].stop(!!e))}else Iu(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(ie.und(e))this.start({pause:!0});else{const t=this.springs;Be(Yn(e),n=>t[n].pause())}return this}resume(e){if(ie.und(e))this.start({pause:!1});else{const t=this.springs;Be(Yn(e),n=>t[n].resume())}return this}each(e){go(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,eu(e,([u,c])=>{c.value=this.get(),u(c,this,this._item)}));const i=!r&&this._started,s=o||i&&n.size?this.get():null;o&&t.size&&eu(t,([u,c])=>{c.value=s,u(c,this,this._item)}),i&&(this._started=!1,eu(n,([u,c])=>{c.value=s,u(c,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Ce.onFrame(this._onFrame)}};function kv(e,t){return Promise.all(t.map(n=>m_(e,n))).then(n=>Y2(e,n))}async function m_(e,t,n){const{keys:r,to:o,from:i,loop:s,onRest:u,onResolve:c}=t,d=ie.obj(t.default)&&t.default;s&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const p=ie.arr(o)||ie.fun(o)?o:void 0;p?(t.to=void 0,t.onRest=void 0,d&&(d.onRest=void 0)):Be(oV,y=>{const E=t[y];if(ie.fun(E)){const _=e._events[y];t[y]=({finished:C,cancelled:v})=>{const P=_.get(E);P?(C||(P.finished=!1),v&&(P.cancelled=!0)):_.set(E,{value:null,finished:C||!1,cancelled:v||!1})},d&&(d[y]=t[y])}});const g=e._state;t.pause===!g.paused?(g.paused=t.pause,Fl(t.pause?g.pauseQueue:g.resumeQueue)):g.paused&&(t.pause=!0);const S=(r||Object.keys(e.springs)).map(y=>e.springs[y].start(t)),w=t.cancel===!0||c_(t,"cancel")===!0;(p||w&&g.asyncId)&&S.push(f_(++e._lastAsyncId,{props:t,state:g,actions:{pause:Sv,resume:Sv,start(y,E){w?(Iu(g,e._lastAsyncId),E(hs(e))):(y.onRest=u,E(p_(p,y,g,e)))}}})),g.paused&&await new Promise(y=>{g.resumeQueue.add(y)});const x=Y2(e,await Promise.all(S));if(s&&x.finished&&!(n&&x.noop)){const y=v_(t,s,o);if(y)return x_(e,[y]),m_(e,y,!0)}return c&&Ce.batchedUpdates(()=>c(x,e,e.item)),x}function Zy(e,t){const n={...e.springs};return t&&Be(Yn(t),r=>{ie.und(r.keys)&&(r=Du(r)),ie.obj(r.to)||(r={...r,to:void 0}),S_(n,r,o=>w_(o))}),y_(e,n),n}function y_(e,t){go(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Ju(n,e))})}function w_(e,t){const n=new tV;return n.key=e,t&&Ju(n,t),n}function S_(e,t,n){t.keys&&Be(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function x_(e,t){Be(t,n=>{S_(e.springs,n,r=>w_(r,e))})}var P0=({children:e,...t})=>{const n=h.useContext(Wf),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=OU(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Wf;return h.createElement(i,{value:t},e)},Wf=sV(P0,{});P0.Provider=Wf.Provider;P0.Consumer=Wf.Consumer;function sV(e,t){return Object.assign(e,h.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var lV=()=>{const e=[],t=function(r){AU();const o=[];return Be(e,(i,s)=>{if(ie.und(r))o.push(i.start());else{const u=n(r,i,s);u&&o.push(i.start(u))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return Be(e,r=>r.pause(...arguments)),this},t.resume=function(){return Be(e,r=>r.resume(...arguments)),this},t.set=function(r){Be(e,(o,i)=>{const s=ie.fun(r)?r(i,o):r;s&&o.set(s)})},t.start=function(r){const o=[];return Be(e,(i,s)=>{if(ie.und(r))o.push(i.start());else{const u=this._getProps(r,i,s);u&&o.push(i.start(u))}}),o},t.stop=function(){return Be(e,r=>r.stop(...arguments)),this},t.update=function(r){return Be(e,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return ie.fun(r)?r(i,o):r};return t._getProps=n,t};function uV(e,t,n){const r=ie.fun(t)&&t;r&&!n&&(n=[]);const o=h.useMemo(()=>r||arguments.length==3?lV():void 0,[]),i=h.useRef(0),s=i_(),u=h.useMemo(()=>({ctrls:[],queue:[],flush(_,C){const v=Zy(_,C);return i.current>0&&!u.queue.length&&!Object.keys(v).some(k=>!_.springs[k])?kv(_,C):new Promise(k=>{y_(_,v),u.queue.push(()=>{k(kv(_,C))}),s()})}}),[]),c=h.useRef([...u.ctrls]),d=[],p=jy(e)||0;h.useMemo(()=>{Be(c.current.slice(e,p),_=>{YU(_,o),_.stop(!0)}),c.current.length=e,g(p,e)},[e]),h.useMemo(()=>{g(0,Math.min(p,e))},n);function g(_,C){for(let v=_;vZy(_,d[C])),w=h.useContext(P0),x=jy(w),y=w!==x&&KU(w);B2(()=>{i.current++,u.ctrls=c.current;const{queue:_}=u;_.length&&(u.queue=[],Be(_,C=>C())),Be(c.current,(C,v)=>{o==null||o.add(C),y&&C.start({default:w});const P=d[v];P&&(XU(C,P.ref),C.ref?C.queue.push(P):C.start(P))})}),a_(()=>()=>{Be(u.ctrls,_=>_.stop(!0))});const E=S.map(_=>({..._}));return o?[E,o]:E}function Rv(e,t){const n=ie.fun(e),[[r],o]=uV(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,o]:r}var cV=class extends X2{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Tu(...t);const n=this._get(),r=_v(n);H2(this,r.create(n))}advance(e){const t=this._get(),n=this.get();to(t,n)||(Ir(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Jy(this._active)&&Wp(this)}_get(){const e=ie.arr(this.source)?this.source.map(Gn):Yn(Gn(this.source));return this.calc(...e)}_start(){this.idle&&!Jy(this._active)&&(this.idle=!1,Be(E0(this),e=>{e.done=!1}),_r.skipAnimation?(Ce.batchedUpdates(()=>this.advance()),Wp(this)):x0.start(this))}_attach(){let e=1;Be(Yn(this.source),t=>{Dr(t)&&Ju(t,this),Ev(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Be(Yn(this.source),e=>{Dr(e)&&Bf(e,this)}),this._active.clear(),Wp(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Yn(this.source).reduce((t,n)=>Math.max(t,(Ev(n)?n.priority:0)+1),0))}};function dV(e){return e.idle!==!1}function Jy(e){return!e.size||Array.from(e).every(dV)}function Wp(e){e.idle||(e.idle=!0,Be(E0(e),t=>{t.done=!0}),Gf(e,{type:"idle",parent:e}))}_r.assign({createStringInterpolator:r_,to:(e,t)=>new cV(e,t)});var fV=["Arc","Arrow","Circle","Ellipse","FastLayer","Group","Image","Label","Layer","Line","Path","Rect","RegularPolygon","Ring","Shape","Sprite","Star","Tag","Text","TextPath","Transformer","Wedge"];_r.assign({createStringInterpolator:r_,colors:uU});var hV=VU(fV,{applyAnimatedValues(e,t){if(!e.nodeType)return!1;e._applyProps(e,t)}}),Tv=hV.animated;const pV=()=>{const{trails:e,getTheme:t}=Bt(["trails","getTheme"]),n=e?e[e.length-1]:{points:[0,0,0,0],strokeWidth:1,render:!1,duration:0,color:t()==="light"?"rgb(0, 0, 0)":"rgb(256, 256, 256)"},r=Rv({from:{points:[n==null?void 0:n.points[0],n==null?void 0:n.points[1],n==null?void 0:n.points[0],n==null?void 0:n.points[1]],strokeWidth:(n==null?void 0:n.points[0])===(n==null?void 0:n.points[2])&&(n==null?void 0:n.points[1])===(n==null?void 0:n.points[3])?0:n==null?void 0:n.strokeWidth,opacity:n!=null&&n.render?1:0,stroke:n==null?void 0:n.color},to:{points:[n==null?void 0:n.points[0],n==null?void 0:n.points[1],n==null?void 0:n.points[2],n==null?void 0:n.points[3]],strokeWidth:(n==null?void 0:n.points[0])===(n==null?void 0:n.points[2])&&(n==null?void 0:n.points[1])===(n==null?void 0:n.points[3])?0:n==null?void 0:n.strokeWidth,opacity:n!=null&&n.render?1:0,stroke:n==null?void 0:n.color},config:{duration:n==null?void 0:n.duration,easing:Vf.easeInOutCubic},reset:!0});return h.useEffect(()=>{},[e]),{lineAnimation:r}},gV=()=>{const{lineAnimation:e}=pV(),{trails:t}=Bt(["trails"]);return M.jsxs(M.Fragment,{children:[M.jsx(Ru,{children:M.jsx(Tv.Line,{...e,x:0,y:0,closed:!1,lineCap:"round"},"line0")},"layerLastTrail"),!!t&&M.jsx(Ru,{children:t.slice(0,-1).map((n,r)=>n.render&&M.jsx(Qj,{points:n.points,stroke:n.color,strokeWidth:n.strokeWidth,lineCap:"round"},"line"+r))},"layerTrails")]})},__=e=>e?`rgb(${e[0]}, ${e[1]}, ${e[2]})`:"rgb(0, 0, 0)",vV=()=>{const{currStep:e,increaseStep:t,prevStep:n,speed:r,turtleSize:o,isAnimating:i,isCodeCorrect:s}=Bt(["currStep","increaseStep","prevStep","speed","step","turtleSize","isAnimating","isCodeCorrect"]),u=()=>{!i||!s||t()},c=Rv({x:e==null?void 0:e.x,y:e==null?void 0:e.y,rotation:(e==null?void 0:e.rotation)-90,duration:e==null?void 0:e.duration,config:{duration:e==null?void 0:e.duration,easing:Vf.easeInOutCubic},onRest:u}),d=Rv({x:e==null?void 0:e.x,y:e==null?void 0:e.y,rotation:(e==null?void 0:e.rotation)-90,duration:e==null?void 0:e.duration,fill:__(e==null?void 0:e.color),points:[0,o.height/2,(e==null?void 0:e.width)/2,-(o.height/2),-((e==null?void 0:e.width)/2),-(o.height/2)],config:{duration:e==null?void 0:e.duration,easing:Vf.easeInOutCubic}});return h.useEffect(()=>{(e==null?void 0:e.x)===(n==null?void 0:n.x)&&(e==null?void 0:e.y)===(n==null?void 0:n.y)&&(e==null?void 0:e.rotation)===(n==null?void 0:n.rotation)&&u()},[e,n,r]),{turtleAnimation:c,handleAnimationEnd:u,speed:r,turtleBGAnimation:d}},mV=()=>{const{direction:e,setTurtlePosition:t,gridSize:n,canvasSize:r,theme:o,step:i,turtleSize:s,tension:u,speed:c,getTheme:d,increaseStep:p}=Bt(["code","turtlePosition","direction","setTurtlePosition","gridSize","canvasSize","theme","speed","step","turtleSize","speed","tension","increaseStep","getTheme"]),g=()=>{t({x:Math.round(r.width/2/n)*n,y:Math.round(r.height/2/n)*n})};return h.useEffect(()=>{g()},[n,r,e]),{direction:e,theme:o,step:i,turtleSize:s,tension:u,increaseStep:p,speed:c,getTheme:d}},yV=()=>{const{turtleAnimation:e,turtleBGAnimation:t}=vV(),{turtleSize:n,tension:r,step:o,getTheme:i}=mV();return M.jsxs(M.Fragment,{children:[M.jsxs(Ru,{children:[M.jsx(Tv.Line,{...t,tension:r*2,closed:!0,strokeWidth:0}),M.jsx(Tv.Line,{...e,points:[0,n.height/2,n.width/2,-(n.height/2),-(n.width/2),-(n.height/2)],fillLinearGradientStartPoint:{x:0,y:-(n.height/2)},fillLinearGradientEndPoint:{x:0,y:n.height/4},fillLinearGradientColorStops:[0,"rgba(110, 32, 255,0)",1,"rgba(110, 32, 255,1)"],tension:r,closed:!0,stroke:i()==="dark"?"white":"black",strokeWidth:.5})]}),M.jsx(Ru,{children:M.jsx(qj,{text:o.toString(),fill:"white",stroke:"white",strokeWidth:1})})]})},wV=()=>{const{step:e,direction:t,canvasSize:n,resetSteps:r,currStep:o,prevStep:i,steps:s,turtlePosition:u,trails:c,setTrails:d,setCurrStep:p,speed:g,code:S,getTheme:w,stopAnimation:x,replayAnimation:y,isAnimating:E}=Bt(["isAnimating","step","direction","canvasSize","resetSteps","steps","turtlePosition","currStep","prevStep","setCurrStep","setTrails","trails","speed","getTheme","loopAnimation","code","stopAnimation","isAnimating","replayAnimation"]),_=!1,C=()=>{d([{points:[u.x,u.y,u.x,u.y],strokeWidth:1,render:!1,color:w()==="light"?"rgb(0, 0, 0)":"rgb(256, 256, 256)",duration:0}])};return h.useEffect(()=>{e===0?p(s[0]):e>s.length-1?(C(),E&&y()):p(s[e])},[e]),h.useEffect(()=>{e!==0&&e<=s.length-1&&d([...c,{points:[i.x,i.y,o.x,o.y],strokeWidth:o.width,render:o.draw,duration:e===0?0:o.duration,color:__(o.color)}])},[i]),h.useEffect(()=>{r(),C(),E?y():x()},[t,n,u,s,g,w()]),h.useEffect(()=>{S.length<=1&&(r(),C(),E?y():x())},[S]),{animate:_}},SV=()=>{const{canvasSize:{width:e,height:t},grid:n}=Bt(["canvasSize","grid"]);return wV(),M.jsxs(Zj,{width:e,height:t,children:[M.jsx(gV,{}),n&&M.jsx(eU,{}),M.jsx(yV,{})]})},xV=()=>{const{gridSize:e,setCanvasSize:t,trails:n,steps:r,currStep:o}=Bt(["gridSize","setCanvasSize","trails","steps","currStep"]),i=h.useRef(null);return h.useEffect(()=>{const s=c=>Math.floor((c-32)/e)*e+2,u=()=>{const{current:c}=i;c&&t(s(c.offsetWidth),s(c.offsetHeight))};return u(),window.addEventListener("resize",u),()=>{window.removeEventListener("resize",u)}},[]),{elementRef:i,trails:n,steps:r,currStep:o}},_V=()=>{const{elementRef:e,trails:t,steps:n,currStep:r}=xV();return M.jsx(Dm,{ref:e,className:"flex flex-grow justify-center items-center overflow-hidden",children:t&&n&&r&&M.jsx(SV,{})})};function ps(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function CV(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function C_(...e){return t=>e.forEach(n=>CV(n,t))}function tc(...e){return h.useCallback(C_(...e),e)}function bV(e,t=[]){let n=[];function r(i,s){const u=h.createContext(s),c=n.length;n=[...n,s];function d(g){const{scope:S,children:w,...x}=g,y=(S==null?void 0:S[e][c])||u,E=h.useMemo(()=>x,Object.values(x));return h.createElement(y.Provider,{value:E},w)}function p(g,S){const w=(S==null?void 0:S[e][c])||u,x=h.useContext(w);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${g}\` must be used within \`${i}\``)}return d.displayName=i+"Provider",[d,p]}const o=()=>{const i=n.map(s=>h.createContext(s));return function(u){const c=(u==null?void 0:u[e])||i;return h.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return o.scopeName=e,[r,EV(o,...t)]}function EV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((u,{useScope:c,scopeName:d})=>{const g=c(i)[`__scope${d}`];return{...u,...g}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const Nv=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},PV=_8["useId".toString()]||(()=>{});let $V=0;function Kp(e){const[t,n]=h.useState(PV());return Nv(()=>{e||n(r=>r??String($V++))},[e]),e||(t?`radix-${t}`:"")}function na(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function kV({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=RV({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,u=na(n),c=h.useCallback(d=>{if(i){const g=typeof d=="function"?d(e):d;g!==e&&u(g)}else o(d)},[i,e,o,u]);return[s,c]}function RV({defaultProp:e,onChange:t}){const n=h.useState(e),[r]=n,o=h.useRef(r),i=na(t);return h.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Q2=h.forwardRef((e,t)=>{const{children:n,...r}=e,o=h.Children.toArray(n),i=o.find(NV);if(i){const s=i.props.children,u=o.map(c=>c===i?h.Children.count(s)>1?h.Children.only(null):h.isValidElement(s)?s.props.children:null:c);return h.createElement(Av,H({},r,{ref:t}),h.isValidElement(s)?h.cloneElement(s,void 0,u):null)}return h.createElement(Av,H({},r,{ref:t}),n)});Q2.displayName="Slot";const Av=h.forwardRef((e,t)=>{const{children:n,...r}=e;return h.isValidElement(n)?h.cloneElement(n,{...AV(r,n.props),ref:C_(t,n.ref)}):h.Children.count(n)>1?h.Children.only(null):null});Av.displayName="SlotClone";const TV=({children:e})=>h.createElement(h.Fragment,null,e);function NV(e){return h.isValidElement(e)&&e.type===TV}function AV(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?n[r]=(...u)=>{i==null||i(...u),o==null||o(...u)}:r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const MV=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],$0=MV.reduce((e,t)=>{const n=h.forwardRef((r,o)=>{const{asChild:i,...s}=r,u=i?Q2:t;return h.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),h.createElement(u,H({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function OV(e,t){e&&mo.flushSync(()=>e.dispatchEvent(t))}function IV(e){const t=na(e);h.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const Mv="dismissableLayer.update",DV="dismissableLayer.pointerDownOutside",LV="dismissableLayer.focusOutside";let e8;const FV=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zV=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:u,...c}=e,d=h.useContext(FV),[p,g]=h.useState(null),[,S]=h.useState({}),w=tc(t,T=>g(T)),x=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=x.indexOf(y),_=p?x.indexOf(p):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,v=_>=E,P=jV(T=>{const N=T.target,R=[...d.branches].some(I=>I.contains(N));!v||R||(o==null||o(T),s==null||s(T),T.defaultPrevented||u==null||u())}),k=UV(T=>{const N=T.target;[...d.branches].some(I=>I.contains(N))||(i==null||i(T),s==null||s(T),T.defaultPrevented||u==null||u())});return IV(T=>{_===d.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))}),h.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(e8=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),t8(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=e8)}},[p,n,d]),h.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),t8())},[p,d]),h.useEffect(()=>{const T=()=>S({});return document.addEventListener(Mv,T),()=>document.removeEventListener(Mv,T)},[]),h.createElement($0.div,H({},c,{ref:w,style:{pointerEvents:C?v?"auto":"none":void 0,...e.style},onFocusCapture:ps(e.onFocusCapture,k.onFocusCapture),onBlurCapture:ps(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:ps(e.onPointerDownCapture,P.onPointerDownCapture)}))});function jV(e){const t=na(e),n=h.useRef(!1),r=h.useRef(()=>{});return h.useEffect(()=>{const o=s=>{if(s.target&&!n.current){let d=function(){b_(DV,t,c,{discrete:!0})};var u=d;const c={originalEvent:s};s.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=d,document.addEventListener("click",r.current,{once:!0})):d()}n.current=!1},i=window.setTimeout(()=>{document.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),document.removeEventListener("pointerdown",o),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function UV(e){const t=na(e),n=h.useRef(!1);return h.useEffect(()=>{const r=o=>{o.target&&!n.current&&b_(LV,t,{originalEvent:o},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function t8(){const e=new CustomEvent(Mv);document.dispatchEvent(e)}function b_(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?OV(o,i):o.dispatchEvent(i)}const Yp="focusScope.autoFocusOnMount",Xp="focusScope.autoFocusOnUnmount",n8={bubbles:!1,cancelable:!0},VV=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[u,c]=h.useState(null),d=na(o),p=na(i),g=h.useRef(null),S=tc(t,y=>c(y)),w=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let _=function(v){if(w.paused||!u)return;const P=v.target;u.contains(P)?g.current=P:ji(g.current,{select:!0})},C=function(v){w.paused||!u||u.contains(v.relatedTarget)||ji(g.current,{select:!0})};var y=_,E=C;return document.addEventListener("focusin",_),document.addEventListener("focusout",C),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",C)}}},[r,u,w.paused]),h.useEffect(()=>{if(u){o8.add(w);const y=document.activeElement;if(!u.contains(y)){const _=new CustomEvent(Yp,n8);u.addEventListener(Yp,d),u.dispatchEvent(_),_.defaultPrevented||(GV(YV(E_(u)),{select:!0}),document.activeElement===y&&ji(u))}return()=>{u.removeEventListener(Yp,d),setTimeout(()=>{const _=new CustomEvent(Xp,n8);u.addEventListener(Xp,p),u.dispatchEvent(_),_.defaultPrevented||ji(y??document.body,{select:!0}),u.removeEventListener(Xp,p),o8.remove(w)},0)}}},[u,d,p,w]);const x=h.useCallback(y=>{if(!n&&!r||w.paused)return;const E=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(E&&_){const C=y.currentTarget,[v,P]=BV(C);v&&P?!y.shiftKey&&_===P?(y.preventDefault(),n&&ji(v,{select:!0})):y.shiftKey&&_===v&&(y.preventDefault(),n&&ji(P,{select:!0})):_===C&&y.preventDefault()}},[n,r,w.paused]);return h.createElement($0.div,H({tabIndex:-1},s,{ref:S,onKeyDown:x}))});function GV(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ji(r,{select:t}),document.activeElement!==n)return}function BV(e){const t=E_(e),n=r8(t,e),r=r8(t.reverse(),e);return[n,r]}function E_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function r8(e,t){for(const n of e)if(!HV(n,{upTo:t}))return n}function HV(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function WV(e){return e instanceof HTMLInputElement&&"select"in e}function ji(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&WV(e)&&t&&e.select()}}const o8=KV();function KV(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=i8(e,t),e.unshift(t)},remove(t){var n;e=i8(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function i8(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function YV(e){return e.filter(t=>t.tagName!=="A")}const XV=h.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?$9.createPortal(h.createElement($0.div,H({},o,{ref:t})),r):null});function QV(e,t){return h.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const k0=e=>{const{present:t,children:n}=e,r=qV(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),i=tc(r.ref,o.ref);return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:i}):null};k0.displayName="Presence";function qV(e){const[t,n]=h.useState(),r=h.useRef({}),o=h.useRef(e),i=h.useRef("none"),s=e?"mounted":"unmounted",[u,c]=QV(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const d=Md(r.current);i.current=u==="mounted"?d:"none"},[u]),Nv(()=>{const d=r.current,p=o.current;if(p!==e){const S=i.current,w=Md(d);e?c("MOUNT"):w==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(p&&S!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Nv(()=>{if(t){const d=g=>{const w=Md(r.current).includes(g.animationName);g.target===t&&w&&mo.flushSync(()=>c("ANIMATION_END"))},p=g=>{g.target===t&&(i.current=Md(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:h.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function Md(e){return(e==null?void 0:e.animationName)||"none"}let Qp=0;function ZV(){h.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:a8()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:a8()),Qp++,()=>{Qp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Qp--}},[])}function a8(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var P_=Kw(),qp=function(){},R0=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:qp,onWheelCapture:qp,onTouchMoveCapture:qp}),o=r[0],i=r[1],s=e.forwardProps,u=e.children,c=e.className,d=e.removeScrollBar,p=e.enabled,g=e.shards,S=e.sideCar,w=e.noIsolation,x=e.inert,y=e.allowPinchZoom,E=e.as,_=E===void 0?"div":E,C=Jm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),v=S,P=Ww([n,t]),k=Jt(Jt({},C),o);return h.createElement(h.Fragment,null,p&&h.createElement(v,{sideCar:P_,removeScrollBar:d,shards:g,noIsolation:w,inert:x,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),s?h.cloneElement(h.Children.only(u),Jt(Jt({},k),{ref:P})):h.createElement(_,Jt({},k,{className:c,ref:P}),u))});R0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};R0.classNames={fullWidth:ql,zeroRight:Ql};var Ov=!1;if(typeof window<"u")try{var Od=Object.defineProperty({},"passive",{get:function(){return Ov=!0,!0}});window.addEventListener("test",Od,Od),window.removeEventListener("test",Od,Od)}catch{Ov=!1}var Ua=Ov?{passive:!1}:!1,JV=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},eG=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},s8=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=$_(e,n);if(r){var o=k_(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},tG=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},nG=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$_=function(e,t){return e==="v"?JV(t):eG(t)},k_=function(e,t){return e==="v"?tG(t):nG(t)},rG=function(e,t){return e==="h"&&t==="rtl"?-1:1},oG=function(e,t,n,r,o){var i=rG(e,window.getComputedStyle(t).direction),s=i*r,u=n.target,c=t.contains(u),d=!1,p=s>0,g=0,S=0;do{var w=k_(e,u),x=w[0],y=w[1],E=w[2],_=y-E-i*x;(x||_)&&$_(e,u)&&(g+=_,S+=x),u=u.parentNode}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return(p&&(o&&g===0||!o&&s>g)||!p&&(o&&S===0||!o&&-s>S))&&(d=!0),d},Id=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},l8=function(e){return[e.deltaX,e.deltaY]},u8=function(e){return e&&"current"in e?e.current:e},iG=function(e,t){return e[0]===t[0]&&e[1]===t[1]},aG=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},sG=0,Va=[];function lG(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),o=h.useState(sG++)[0],i=h.useState(function(){return e2()})[0],s=h.useRef(e);h.useEffect(function(){s.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=Hw([e.lockRef.current],(e.shards||[]).map(u8),!0).filter(Boolean);return y.forEach(function(E){return E.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=h.useCallback(function(y,E){if("touches"in y&&y.touches.length===2)return!s.current.allowPinchZoom;var _=Id(y),C=n.current,v="deltaX"in y?y.deltaX:C[0]-_[0],P="deltaY"in y?y.deltaY:C[1]-_[1],k,T=y.target,N=Math.abs(v)>Math.abs(P)?"h":"v";if("touches"in y&&N==="h"&&T.type==="range")return!1;var R=s8(N,T);if(!R)return!0;if(R?k=N:(k=N==="v"?"h":"v",R=s8(N,T)),!R)return!1;if(!r.current&&"changedTouches"in y&&(v||P)&&(r.current=k),!k)return!0;var I=r.current||k;return oG(I,E,y,I==="h"?v:P,!0)},[]),c=h.useCallback(function(y){var E=y;if(!(!Va.length||Va[Va.length-1]!==i)){var _="deltaY"in E?l8(E):Id(E),C=t.current.filter(function(k){return k.name===E.type&&k.target===E.target&&iG(k.delta,_)})[0];if(C&&C.should){E.preventDefault();return}if(!C){var v=(s.current.shards||[]).map(u8).filter(Boolean).filter(function(k){return k.contains(E.target)}),P=v.length>0?u(E,v[0]):!s.current.noIsolation;P&&E.preventDefault()}}},[]),d=h.useCallback(function(y,E,_,C){var v={name:y,delta:E,target:_,should:C};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(P){return P!==v})},1)},[]),p=h.useCallback(function(y){n.current=Id(y),r.current=void 0},[]),g=h.useCallback(function(y){d(y.type,l8(y),y.target,u(y,e.lockRef.current))},[]),S=h.useCallback(function(y){d(y.type,Id(y),y.target,u(y,e.lockRef.current))},[]);h.useEffect(function(){return Va.push(i),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:S}),document.addEventListener("wheel",c,Ua),document.addEventListener("touchmove",c,Ua),document.addEventListener("touchstart",p,Ua),function(){Va=Va.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Ua),document.removeEventListener("touchmove",c,Ua),document.removeEventListener("touchstart",p,Ua)}},[]);var w=e.removeScrollBar,x=e.inert;return h.createElement(h.Fragment,null,x?h.createElement(i,{styles:aG(o)}):null,w?h.createElement(qw,{gapMode:"margin"}):null)}const uG=Xw(P_,lG);var R_=h.forwardRef(function(e,t){return h.createElement(R0,Jt({},e,{ref:t,sideCar:uG}))});R_.classNames=R0.classNames;const cG=R_,T_="Dialog",[N_,MB]=bV(T_),[dG,ma]=N_(T_),fG=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,u=h.useRef(null),c=h.useRef(null),[d=!1,p]=kV({prop:r,defaultProp:o,onChange:i});return h.createElement(dG,{scope:t,triggerRef:u,contentRef:c,contentId:Kp(),titleId:Kp(),descriptionId:Kp(),open:d,onOpenChange:p,onOpenToggle:h.useCallback(()=>p(g=>!g),[p]),modal:s},n)},A_="DialogPortal",[hG,M_]=N_(A_,{forceMount:void 0}),pG=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=ma(A_,t);return h.createElement(hG,{scope:t,forceMount:n},h.Children.map(r,s=>h.createElement(k0,{present:n||i.open},h.createElement(XV,{asChild:!0,container:o},s))))},Iv="DialogOverlay",gG=h.forwardRef((e,t)=>{const n=M_(Iv,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ma(Iv,e.__scopeDialog);return i.modal?h.createElement(k0,{present:r||i.open},h.createElement(vG,H({},o,{ref:t}))):null}),vG=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ma(Iv,n);return h.createElement(cG,{as:Q2,allowPinchZoom:!0,shards:[o.contentRef]},h.createElement($0.div,H({"data-state":I_(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Lu="DialogContent",mG=h.forwardRef((e,t)=>{const n=M_(Lu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ma(Lu,e.__scopeDialog);return h.createElement(k0,{present:r||i.open},i.modal?h.createElement(yG,H({},o,{ref:t})):h.createElement(wG,H({},o,{ref:t})))}),yG=h.forwardRef((e,t)=>{const n=ma(Lu,e.__scopeDialog),r=h.useRef(null),o=tc(t,n.contentRef,r);return h.useEffect(()=>{const i=r.current;if(i)return wh(i)},[]),h.createElement(O_,H({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ps(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:ps(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&i.preventDefault()}),onFocusOutside:ps(e.onFocusOutside,i=>i.preventDefault())}))}),wG=h.forwardRef((e,t)=>{const n=ma(Lu,e.__scopeDialog),r=h.useRef(!1);return h.createElement(O_,H({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,o),!o.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),o.preventDefault()}r.current=!1},onInteractOutside:o=>{var i,s;(i=e.onInteractOutside)===null||i===void 0||i.call(e,o),o.defaultPrevented||(r.current=!0);const u=o.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(u))&&o.preventDefault()}}))}),O_=h.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,u=ma(Lu,n),c=h.useRef(null),d=tc(t,c);return ZV(),h.createElement(h.Fragment,null,h.createElement(VV,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},h.createElement(zV,H({role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":I_(u.open)},s,{ref:d,onDismiss:()=>u.onOpenChange(!1)}))),!1)});function I_(e){return e?"open":"closed"}const SG=fG,xG=pG,_G=gG,CG=mG;var c8=1,bG=.9,EG=.3,Zp=.1,PG=0,Jp=.999,$G=.9999,kG=.99,d8=/[\\\/\-_+.# \t"@\[\(\{&]/,RG=/[\\\/\-_+.# \t"@\[\(\{&]/g;function Dv(e,t,n,r,o,i){if(i===t.length)return o===e.length?c8:kG;for(var s=r.charAt(i),u=n.indexOf(s,o),c=0,d,p,g;u>=0;)d=Dv(e,t,n,r,u+1,i+1),d>c&&(u===o?d*=c8:d8.test(e.charAt(u-1))?(d*=bG,g=e.slice(o,u-1).match(RG),g&&o>0&&(d*=Math.pow(Jp,g.length))):d8.test(e.slice(o,u-1))?(d*=PG,o>0&&(d*=Math.pow(Jp,u-o))):(d*=EG,o>0&&(d*=Math.pow(Jp,u-o))),e.charAt(u)!==t.charAt(i)&&(d*=$G)),dd&&(d=p*Zp)),d>c&&(c=d),u=n.indexOf(s,u+1);return c}function TG(e,t){return Dv(e,t,e.toLowerCase(),t.toLowerCase(),0,0)}var NG=TG;const AG=ra(NG);var MG='[cmdk-list-sizer=""]',Al='[cmdk-group=""]',eg='[cmdk-group-items=""]',OG='[cmdk-group-heading=""]',D_='[cmdk-item=""]',f8=`${D_}:not([aria-disabled="true"])`,Lv="cmdk-item-select",Uo="data-value",IG=(e,t)=>AG(e,t),L_=h.createContext(void 0),nc=()=>h.useContext(L_),F_=h.createContext(void 0),q2=()=>h.useContext(F_),z_=h.createContext(void 0),j_=h.forwardRef((e,t)=>{let n=h.useRef(null),r=Ba(()=>({search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}})),o=Ba(()=>new Set),i=Ba(()=>new Map),s=Ba(()=>new Map),u=Ba(()=>new Set),c=U_(e),{label:d,children:p,value:g,onValueChange:S,filter:w,shouldFilter:x,...y}=e,E=h.useId(),_=h.useId(),C=h.useId(),v=WG();Ys(()=>{if(g!==void 0){let z=g.trim().toLowerCase();r.current.value=z,v(6,O),P.emit()}},[g]);let P=h.useMemo(()=>({subscribe:z=>(u.current.add(z),()=>u.current.delete(z)),snapshot:()=>r.current,setState:(z,B,q)=>{var J,ae,pe;if(!Object.is(r.current[z],B)){if(r.current[z]=B,z==="search")I(),N(),v(1,R);else if(z==="value")if(((J=c.current)==null?void 0:J.value)!==void 0){(pe=(ae=c.current).onValueChange)==null||pe.call(ae,B);return}else q||v(5,O);P.emit()}},emit:()=>{u.current.forEach(z=>z())}}),[]),k=h.useMemo(()=>({value:(z,B)=>{B!==s.current.get(z)&&(s.current.set(z,B),r.current.filtered.items.set(z,T(B)),v(2,()=>{N(),P.emit()}))},item:(z,B)=>(o.current.add(z),B&&(i.current.has(B)?i.current.get(B).add(z):i.current.set(B,new Set([z]))),v(3,()=>{I(),N(),r.current.value||R(),P.emit()}),()=>{s.current.delete(z),o.current.delete(z),r.current.filtered.items.delete(z),v(4,()=>{I(),R(),P.emit()})}),group:z=>(i.current.has(z)||i.current.set(z,new Set),()=>{s.current.delete(z),i.current.delete(z)}),filter:()=>c.current.shouldFilter,label:d||e["aria-label"],listId:E,inputId:C,labelId:_}),[]);function T(z){var B;let q=((B=c.current)==null?void 0:B.filter)??IG;return z?q(z,r.current.search):0}function N(){if(!n.current||!r.current.search||c.current.shouldFilter===!1)return;let z=r.current.filtered.items,B=[];r.current.filtered.groups.forEach(J=>{let ae=i.current.get(J),pe=0;ae.forEach(Fe=>{let Pe=z.get(Fe);pe=Math.max(Pe,pe)}),B.push([J,pe])});let q=n.current.querySelector(MG);F().sort((J,ae)=>{let pe=J.getAttribute(Uo),Fe=ae.getAttribute(Uo);return(z.get(Fe)??0)-(z.get(pe)??0)}).forEach(J=>{let ae=J.closest(eg);ae?ae.appendChild(J.parentElement===ae?J:J.closest(`${eg} > *`)):q.appendChild(J.parentElement===q?J:J.closest(`${eg} > *`))}),B.sort((J,ae)=>ae[1]-J[1]).forEach(J=>{let ae=n.current.querySelector(`${Al}[${Uo}="${J[0]}"]`);ae==null||ae.parentElement.appendChild(ae)})}function R(){let z=F().find(q=>!q.ariaDisabled),B=z==null?void 0:z.getAttribute(Uo);P.setState("value",B||void 0)}function I(){if(!r.current.search||c.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let z=0;for(let B of o.current){let q=s.current.get(B),J=T(q);r.current.filtered.items.set(B,J),J>0&&z++}for(let[B,q]of i.current)for(let J of q)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(B);break}r.current.filtered.count=z}function O(){var z,B,q;let J=D();J&&(((z=J.parentElement)==null?void 0:z.firstChild)===J&&((q=(B=J.closest(Al))==null?void 0:B.querySelector(OG))==null||q.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function D(){return n.current.querySelector(`${D_}[aria-selected="true"]`)}function F(){return Array.from(n.current.querySelectorAll(f8))}function G(z){let B=F()[z];B&&P.setState("value",B.getAttribute(Uo))}function U(z){var B;let q=D(),J=F(),ae=J.findIndex(Fe=>Fe===q),pe=J[ae+z];(B=c.current)!=null&&B.loop&&(pe=ae+z<0?J[J.length-1]:ae+z===J.length?J[0]:J[ae+z]),pe&&P.setState("value",pe.getAttribute(Uo))}function X(z){let B=D(),q=B==null?void 0:B.closest(Al),J;for(;q&&!J;)q=z>0?BG(q,Al):HG(q,Al),J=q==null?void 0:q.querySelector(f8);J?P.setState("value",J.getAttribute(Uo)):U(z)}let Z=()=>G(F().length-1),oe=z=>{z.preventDefault(),z.metaKey?Z():z.altKey?X(1):U(1)},Y=z=>{z.preventDefault(),z.metaKey?G(0):z.altKey?X(-1):U(-1)};return h.createElement("div",{ref:rc([n,t]),...y,"cmdk-root":"",onKeyDown:z=>{var B;if((B=y.onKeyDown)==null||B.call(y,z),!z.defaultPrevented)switch(z.key){case"n":case"j":{z.ctrlKey&&oe(z);break}case"ArrowDown":{oe(z);break}case"p":case"k":{z.ctrlKey&&Y(z);break}case"ArrowUp":{Y(z);break}case"Home":{z.preventDefault(),G(0);break}case"End":{z.preventDefault(),Z();break}case"Enter":{z.preventDefault();let q=D();if(q){let J=new Event(Lv);q.dispatchEvent(J)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:KG},d),h.createElement(F_.Provider,{value:P},h.createElement(L_.Provider,{value:k},p)))}),DG=h.forwardRef((e,t)=>{let n=h.useId(),r=h.useRef(null),o=h.useContext(z_),i=nc(),s=U_(e);Ys(()=>i.item(n,o),[]);let u=V_(n,r,[e.value,e.children,r]),c=q2(),d=Ts(_=>_.value&&_.value===u.current),p=Ts(_=>i.filter()===!1?!0:_.search?_.filtered.items.get(n)>0:!0);h.useEffect(()=>{let _=r.current;if(!(!_||e.disabled))return _.addEventListener(Lv,g),()=>_.removeEventListener(Lv,g)},[p,e.onSelect,e.disabled]);function g(){var _,C;(C=(_=s.current).onSelect)==null||C.call(_,u.current)}function S(){c.setState("value",u.current,!0)}if(!p)return null;let{disabled:w,value:x,onSelect:y,...E}=e;return h.createElement("div",{ref:rc([r,t]),...E,"cmdk-item":"",role:"option","aria-disabled":w||void 0,"aria-selected":d||void 0,"data-selected":d||void 0,onPointerMove:w?void 0:S,onClick:w?void 0:g},e.children)}),LG=h.forwardRef((e,t)=>{let{heading:n,children:r,...o}=e,i=h.useId(),s=h.useRef(null),u=h.useRef(null),c=h.useId(),d=nc(),p=Ts(S=>d.filter()===!1?!0:S.search?S.filtered.groups.has(i):!0);Ys(()=>d.group(i),[]),V_(i,s,[e.value,e.heading,u]);let g=h.createElement(z_.Provider,{value:i},r);return h.createElement("div",{ref:rc([s,t]),...o,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&h.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},g))}),FG=h.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=h.useRef(null),i=Ts(s=>!s.search);return!n&&!i?null:h.createElement("div",{ref:rc([o,t]),...r,"cmdk-separator":"",role:"separator"})}),zG=h.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=q2(),s=Ts(c=>c.search),u=nc();return h.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),h.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,id:u.inputId,type:"text",value:o?e.value:s,onChange:c=>{o||i.setState("search",c.target.value),n==null||n(c.target.value)}})}),jG=h.forwardRef((e,t)=>{let{children:n,...r}=e,o=h.useRef(null),i=h.useRef(null),s=nc();return h.useEffect(()=>{if(i.current&&o.current){let u=i.current,c=o.current,d,p=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let g=u.getBoundingClientRect().height;c.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(d),p.unobserve(u)}}},[]),h.createElement("div",{ref:rc([o,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:s.listId,"aria-labelledby":s.inputId},h.createElement("div",{ref:i,"cmdk-list-sizer":""},n))}),UG=h.forwardRef((e,t)=>{let{open:n,onOpenChange:r,container:o,...i}=e;return h.createElement(SG,{open:n,onOpenChange:r},h.createElement(xG,{container:o},h.createElement(_G,{"cmdk-overlay":""}),h.createElement(CG,{"aria-label":e.label,"cmdk-dialog":""},h.createElement(j_,{ref:t,...i}))))}),VG=h.forwardRef((e,t)=>{let n=h.useRef(!0),r=Ts(o=>o.filtered.count===0);return h.useEffect(()=>{n.current=!1},[]),n.current||!r?null:h.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),GG=h.forwardRef((e,t)=>{let{progress:n,children:r,...o}=e;return h.createElement("div",{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},h.createElement("div",{"aria-hidden":!0},r))}),Sn=Object.assign(j_,{List:jG,Item:DG,Input:zG,Group:LG,Separator:FG,Dialog:UG,Empty:VG,Loading:GG});function BG(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function HG(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function U_(e){let t=h.useRef(e);return Ys(()=>{t.current=e}),t}var Ys=typeof window>"u"?h.useEffect:h.useLayoutEffect;function Ba(e){let t=h.useRef();return t.current===void 0&&(t.current=e()),t}function rc(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Ts(e){let t=q2(),n=()=>e(t.snapshot());return h.useSyncExternalStore(t.subscribe,n,n)}function V_(e,t,n){let r=h.useRef(),o=nc();return Ys(()=>{var i;let s=(()=>{var u;for(let c of n){if(typeof c=="string")return c.trim().toLowerCase();if(typeof c=="object"&&"current"in c&&c.current)return(u=c.current.textContent)==null?void 0:u.trim().toLowerCase()}})();o.value(e,s),(i=t.current)==null||i.setAttribute(Uo,s),r.current=s}),r}var WG=()=>{let[e,t]=h.useState(),n=Ba(()=>new Map);return Ys(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}},KG={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const G_="Dialog",[B_,OB]=Jn(G_),[YG,Gr]=B_(G_),XG=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,u=h.useRef(null),c=h.useRef(null),[d=!1,p]=xr({prop:r,defaultProp:o,onChange:i});return h.createElement(YG,{scope:t,triggerRef:u,contentRef:c,contentId:jr(),titleId:jr(),descriptionId:jr(),open:d,onOpenChange:p,onOpenToggle:h.useCallback(()=>p(g=>!g),[p]),modal:s},n)},H_="DialogPortal",[QG,W_]=B_(H_,{forceMount:void 0}),qG=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Gr(H_,t);return h.createElement(QG,{scope:t,forceMount:n},h.Children.map(r,s=>h.createElement(er,{present:n||i.open},h.createElement(Zm,{asChild:!0,container:o},s))))},Fv="DialogOverlay",ZG=h.forwardRef((e,t)=>{const n=W_(Fv,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Gr(Fv,e.__scopeDialog);return i.modal?h.createElement(er,{present:r||i.open},h.createElement(JG,H({},o,{ref:t}))):null}),JG=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gr(Fv,n);return h.createElement(t2,{as:ui,allowPinchZoom:!0,shards:[o.contentRef]},h.createElement(Se.div,H({"data-state":Y_(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Fu="DialogContent",eB=h.forwardRef((e,t)=>{const n=W_(Fu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Gr(Fu,e.__scopeDialog);return h.createElement(er,{present:r||i.open},i.modal?h.createElement(tB,H({},o,{ref:t})):h.createElement(nB,H({},o,{ref:t})))}),tB=h.forwardRef((e,t)=>{const n=Gr(Fu,e.__scopeDialog),r=h.useRef(null),o=Le(t,n.contentRef,r);return h.useEffect(()=>{const i=r.current;if(i)return wh(i)},[]),h.createElement(K_,H({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:we(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&i.preventDefault()}),onFocusOutside:we(e.onFocusOutside,i=>i.preventDefault())}))}),nB=h.forwardRef((e,t)=>{const n=Gr(Fu,e.__scopeDialog),r=h.useRef(!1),o=h.useRef(!1);return h.createElement(K_,H({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,i),!i.defaultPrevented){var u;r.current||(u=n.triggerRef.current)===null||u===void 0||u.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var s,u;(s=e.onInteractOutside)===null||s===void 0||s.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((u=n.triggerRef.current)===null||u===void 0?void 0:u.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),K_=h.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,u=Gr(Fu,n),c=h.useRef(null),d=Le(t,c);return Bm(),h.createElement(h.Fragment,null,h.createElement(Hm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},h.createElement(Gm,H({role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Y_(u.open)},s,{ref:d,onDismiss:()=>u.onOpenChange(!1)}))),!1)}),rB="DialogTitle",oB=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gr(rB,n);return h.createElement(Se.h2,H({id:o.titleId},r,{ref:t}))}),iB="DialogDescription",aB=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gr(iB,n);return h.createElement(Se.p,H({id:o.descriptionId},r,{ref:t}))}),sB="DialogClose",lB=h.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gr(sB,n);return h.createElement(Se.button,H({type:"button"},r,{ref:t,onClick:we(e.onClick,()=>o.onOpenChange(!1))}))});function Y_(e){return e?"open":"closed"}const uB=XG,X_=qG,Q_=ZG,q_=eB,Z_=oB,J_=aB,cB=lB,dB=uB,eC=({...e})=>M.jsx(X_,{...e});eC.displayName=X_.displayName;const tC=h.forwardRef(({className:e,...t},n)=>M.jsx(Q_,{ref:n,className:ke("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));tC.displayName=Q_.displayName;const nC=h.forwardRef(({className:e,children:t,...n},r)=>M.jsxs(eC,{children:[M.jsx(tC,{}),M.jsxs(q_,{ref:r,className:ke("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",e),...n,children:[t,M.jsxs(cB,{className:"absolute right-4 top-4 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 data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[M.jsx(WA,{className:"h-4 w-4"}),M.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));nC.displayName=q_.displayName;const fB=h.forwardRef(({className:e,...t},n)=>M.jsx(Z_,{ref:n,className:ke("text-lg font-semibold leading-none tracking-tight",e),...t}));fB.displayName=Z_.displayName;const hB=h.forwardRef(({className:e,...t},n)=>M.jsx(J_,{ref:n,className:ke("text-sm text-muted-foreground",e),...t}));hB.displayName=J_.displayName;const rC=h.forwardRef(({className:e,...t},n)=>M.jsx(Sn,{ref:n,className:ke("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));rC.displayName=Sn.displayName;const pB=({children:e,...t})=>M.jsx(dB,{...t,children:M.jsx(nC,{className:"overflow-hidden p-0 shadow-lg",children:M.jsx(rC,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),oC=h.forwardRef(({className:e,...t},n)=>M.jsxs("div",{className:"flex items-center border-b px-3",children:[M.jsx(BA,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),M.jsx(Sn.Input,{ref:n,className:ke("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));oC.displayName=Sn.Input.displayName;const iC=h.forwardRef(({className:e,...t},n)=>M.jsx(Sn.List,{ref:n,className:ke("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));iC.displayName=Sn.List.displayName;const aC=h.forwardRef((e,t)=>M.jsx(Sn.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));aC.displayName=Sn.Empty.displayName;const sC=h.forwardRef(({className:e,...t},n)=>M.jsx(Sn.Group,{ref:n,className:ke("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));sC.displayName=Sn.Group.displayName;const gB=h.forwardRef(({className:e,...t},n)=>M.jsx(Sn.Separator,{ref:n,className:ke("-mx-1 h-px bg-border",e),...t}));gB.displayName=Sn.Separator.displayName;const lC=h.forwardRef(({className:e,...t},n)=>M.jsx(Sn.Item,{ref:n,className:ke("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));lC.displayName=Sn.Item.displayName;const vB=()=>{const{open:e,setOpen:t,code:n,setTextareaValue:r,textareaValue:o,isCodeOpen:i}=Bt(["open","setOpen","code","textareaValue","setTextareaValue","isCodeOpen"]),{cleanCode:s}=Fm(),u=c=>{var w;t(!1);const d=((w=Is.get(c))==null?void 0:w.length)||0,p=[];for(let x=0;x{const c=d=>{d.key==="a"&&(d.metaKey||d.ctrlKey)&&(d.preventDefault(),t(!e))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),{handleAddCommand:u,open:e,setOpen:t}},mB=()=>{const{handleAddCommand:e,open:t,setOpen:n}=vB(),r=({info:o})=>{const i=Is.get(o[0]);return M.jsx(M.Fragment,{children:M.jsx(lC,{children:M.jsxs("div",{className:"flex items-center space-x-2 font-normal text-base w-full cursor-pointer",onClick:()=>e(o[0]),children:[o[1].icon,M.jsx("div",{className:"pl-3",children:o[0]}),M.jsx("div",{className:"flex space-x-2",children:i==null?void 0:i.map((s,u)=>M.jsx("div",{className:dh.get(s),children:Lm[s]},u))})]})})})};return M.jsxs(pB,{open:t,onOpenChange:n,children:[M.jsx(oC,{placeholder:"Type a command or search..."}),M.jsxs(iC,{children:[M.jsx(aC,{children:"No results found."}),M.jsx(Ds,{children:Object.keys(a2).map((o,i)=>M.jsxs(sC,{heading:o,className:"font-black text-xl",children:[M.jsx(cs,{}),Array.from(s2).sort().filter(s=>s[1].group===o).map((s,u)=>M.jsx(r,{info:s},u))]},i+"group"))})]})]})};function yB(){const{theme:e}=A9(),[t,n]=h.useState(!1);return h.useEffect(()=>{setInterval(()=>{n(!0)})},[]),M.jsxs(M.Fragment,{children:[t&&M.jsx(Z$,{children:M.jsxs("div",{className:`${e==="light"?"bg-neutral-200":"bg-neutral-900"} + w-screen + h-screen + overflow-hidden + flex + gap-4 + p-4 + justify-stretch + items-stretch`,children:[M.jsx(QI,{}),M.jsx(_V,{}),M.jsx(mB,{})]})}),!t&&M.jsx(M.Fragment,{})]})}tg.createRoot(document.getElementById("root")).render(M.jsx(te.StrictMode,{children:M.jsx(yB,{})})); diff --git a/index.html b/index.html new file mode 100644 index 0000000..09ec68a --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + Interpreter + + + + +
+ + +