diff --git a/pyproject.toml b/pyproject.toml index 47091ef..a407d47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "ComfyUI-Align" description = "A powerful node alignment and color management plugin for ComfyUI, designed to enhance your workflow efficiency" -version = "3.1.1" +version = "3.1.2" license = { file = "LICENSE.txt" } [project.urls] diff --git a/web/align/main.js b/web/align/main.js index 126ff14..7546ebf 100644 --- a/web/align/main.js +++ b/web/align/main.js @@ -1,5 +1,5 @@ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){#comfyui-align-overlay *,#comfyui-align-overlay :before,#comfyui-align-overlay :after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{#comfyui-align-overlay{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--radius-md:.375rem;--radius-lg:.5rem;--radius-4xl:2rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{#comfyui-align-overlay *,#comfyui-align-overlay :after,#comfyui-align-overlay :before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}#comfyui-align-overlay ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}#comfyui-align-overlay{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}#comfyui-align-overlay hr{height:0;color:inherit;border-top-width:1px}#comfyui-align-overlay abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}#comfyui-align-overlay h1,#comfyui-align-overlay h2,#comfyui-align-overlay h3,#comfyui-align-overlay h4,#comfyui-align-overlay h5,#comfyui-align-overlay h6{font-size:inherit;font-weight:inherit}#comfyui-align-overlay a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}#comfyui-align-overlay b,#comfyui-align-overlay strong{font-weight:bolder}#comfyui-align-overlay code,#comfyui-align-overlay kbd,#comfyui-align-overlay samp,#comfyui-align-overlay pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}#comfyui-align-overlay small{font-size:80%}#comfyui-align-overlay sub,#comfyui-align-overlay sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}#comfyui-align-overlay sub{bottom:-.25em}#comfyui-align-overlay sup{top:-.5em}#comfyui-align-overlay table{text-indent:0;border-color:inherit;border-collapse:collapse}#comfyui-align-overlay :-moz-focusring{outline:auto}#comfyui-align-overlay progress{vertical-align:baseline}#comfyui-align-overlay summary{display:list-item}#comfyui-align-overlay ol,#comfyui-align-overlay ul,#comfyui-align-overlay menu{list-style:none}#comfyui-align-overlay img,#comfyui-align-overlay svg,#comfyui-align-overlay video,#comfyui-align-overlay canvas,#comfyui-align-overlay audio,#comfyui-align-overlay iframe,#comfyui-align-overlay embed,#comfyui-align-overlay object{vertical-align:middle;display:block}#comfyui-align-overlay img,#comfyui-align-overlay video{max-width:100%;height:auto}#comfyui-align-overlay button,#comfyui-align-overlay input,#comfyui-align-overlay select,#comfyui-align-overlay optgroup,#comfyui-align-overlay textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}#comfyui-align-overlay ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}#comfyui-align-overlay :where(select:is([multiple],[size])) optgroup{font-weight:bolder}#comfyui-align-overlay :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}#comfyui-align-overlay ::file-selector-button{margin-inline-end:4px}#comfyui-align-overlay ::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){#comfyui-align-overlay ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){#comfyui-align-overlay ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}#comfyui-align-overlay textarea{resize:vertical}#comfyui-align-overlay ::-webkit-search-decoration{-webkit-appearance:none}#comfyui-align-overlay ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}#comfyui-align-overlay ::-webkit-datetime-edit{display:inline-flex}#comfyui-align-overlay ::-webkit-datetime-edit-fields-wrapper{padding:0}#comfyui-align-overlay ::-webkit-datetime-edit{padding-block:0}#comfyui-align-overlay ::-webkit-datetime-edit-year-field{padding-block:0}#comfyui-align-overlay ::-webkit-datetime-edit-month-field{padding-block:0}#comfyui-align-overlay ::-webkit-datetime-edit-day-field{padding-block:0}#comfyui-align-overlay ::-webkit-datetime-edit-hour-field{padding-block:0}#comfyui-align-overlay ::-webkit-datetime-edit-minute-field{padding-block:0}#comfyui-align-overlay ::-webkit-datetime-edit-second-field{padding-block:0}#comfyui-align-overlay ::-webkit-datetime-edit-millisecond-field{padding-block:0}#comfyui-align-overlay ::-webkit-datetime-edit-meridiem-field{padding-block:0}#comfyui-align-overlay ::-webkit-calendar-picker-indicator{line-height:1}#comfyui-align-overlay :-moz-ui-invalid{box-shadow:none}#comfyui-align-overlay button,#comfyui-align-overlay input:where([type=button],[type=reset],[type=submit]){appearance:button}#comfyui-align-overlay ::file-selector-button{appearance:button}#comfyui-align-overlay ::-webkit-inner-spin-button{height:auto}#comfyui-align-overlay ::-webkit-outer-spin-button{height:auto}#comfyui-align-overlay [hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{#comfyui-align-overlay .pointer-events-auto{pointer-events:auto}#comfyui-align-overlay .pointer-events-none{pointer-events:none}#comfyui-align-overlay .collapse{visibility:collapse}#comfyui-align-overlay .invisible{visibility:hidden}#comfyui-align-overlay .visible{visibility:visible}#comfyui-align-overlay .sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}#comfyui-align-overlay .not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}#comfyui-align-overlay .absolute{position:absolute}#comfyui-align-overlay .fixed{position:fixed}#comfyui-align-overlay .relative{position:relative}#comfyui-align-overlay .static{position:static}#comfyui-align-overlay .sticky{position:sticky}#comfyui-align-overlay .inset-0{inset:calc(var(--spacing)*0)}#comfyui-align-overlay .-top-1{top:calc(var(--spacing)*-1)}#comfyui-align-overlay .top-0{top:calc(var(--spacing)*0)}#comfyui-align-overlay .-right-1{right:calc(var(--spacing)*-1)}#comfyui-align-overlay .right-0{right:calc(var(--spacing)*0)}#comfyui-align-overlay .right-\\[calc\\(100\\%\\+8px\\)\\]{right:calc(100% + 8px)}#comfyui-align-overlay .bottom-0{bottom:calc(var(--spacing)*0)}#comfyui-align-overlay .left-0{left:calc(var(--spacing)*0)}#comfyui-align-overlay .left-1{left:calc(var(--spacing)*1)}#comfyui-align-overlay .left-1\\/2{left:50%}#comfyui-align-overlay .isolate{isolation:isolate}#comfyui-align-overlay .isolation-auto{isolation:auto}#comfyui-align-overlay .container{width:100%}@media(min-width:40rem){#comfyui-align-overlay .container{max-width:40rem}}@media(min-width:48rem){#comfyui-align-overlay .container{max-width:48rem}}@media(min-width:64rem){#comfyui-align-overlay .container{max-width:64rem}}@media(min-width:80rem){#comfyui-align-overlay .container{max-width:80rem}}@media(min-width:96rem){#comfyui-align-overlay .container{max-width:96rem}}#comfyui-align-overlay .mt-2{margin-top:calc(var(--spacing)*2)}#comfyui-align-overlay .mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}#comfyui-align-overlay .mt-4{margin-top:calc(var(--spacing)*4)}#comfyui-align-overlay .mr-1{margin-right:calc(var(--spacing)*1)}#comfyui-align-overlay .ml-2{margin-left:calc(var(--spacing)*2)}#comfyui-align-overlay .block{display:block}#comfyui-align-overlay .contents{display:contents}#comfyui-align-overlay .flex{display:flex}#comfyui-align-overlay .flow-root{display:flow-root}#comfyui-align-overlay .grid{display:grid}#comfyui-align-overlay .hidden{display:none}#comfyui-align-overlay .inline{display:inline}#comfyui-align-overlay .inline-block{display:inline-block}#comfyui-align-overlay .inline-flex{display:inline-flex}#comfyui-align-overlay .inline-grid{display:inline-grid}#comfyui-align-overlay .inline-table{display:inline-table}#comfyui-align-overlay .list-item{display:list-item}#comfyui-align-overlay .table{display:table}#comfyui-align-overlay .table-caption{display:table-caption}#comfyui-align-overlay .table-cell{display:table-cell}#comfyui-align-overlay .table-column{display:table-column}#comfyui-align-overlay .table-column-group{display:table-column-group}#comfyui-align-overlay .table-footer-group{display:table-footer-group}#comfyui-align-overlay .table-header-group{display:table-header-group}#comfyui-align-overlay .table-row{display:table-row}#comfyui-align-overlay .table-row-group{display:table-row-group}#comfyui-align-overlay .h-2{height:calc(var(--spacing)*2)}#comfyui-align-overlay .h-3{height:calc(var(--spacing)*3)}#comfyui-align-overlay .h-3\\.5{height:calc(var(--spacing)*3.5)}#comfyui-align-overlay .h-4{height:calc(var(--spacing)*4)}#comfyui-align-overlay .h-5{height:calc(var(--spacing)*5)}#comfyui-align-overlay .h-6{height:calc(var(--spacing)*6)}#comfyui-align-overlay .h-8{height:calc(var(--spacing)*8)}#comfyui-align-overlay .h-10{height:calc(var(--spacing)*10)}#comfyui-align-overlay .h-\\[30px\\]{height:30px}#comfyui-align-overlay .h-\\[300px\\]{height:300px}#comfyui-align-overlay .h-\\[526px\\]{height:526px}#comfyui-align-overlay .h-full{height:100%}#comfyui-align-overlay .h-screen{height:100vh}#comfyui-align-overlay .w-2{width:calc(var(--spacing)*2)}#comfyui-align-overlay .w-2\\.5{width:calc(var(--spacing)*2.5)}#comfyui-align-overlay .w-3{width:calc(var(--spacing)*3)}#comfyui-align-overlay .w-3\\.5{width:calc(var(--spacing)*3.5)}#comfyui-align-overlay .w-4{width:calc(var(--spacing)*4)}#comfyui-align-overlay .w-5{width:calc(var(--spacing)*5)}#comfyui-align-overlay .w-6{width:calc(var(--spacing)*6)}#comfyui-align-overlay .w-8{width:calc(var(--spacing)*8)}#comfyui-align-overlay .w-10{width:calc(var(--spacing)*10)}#comfyui-align-overlay .w-\\[30px\\]{width:30px}#comfyui-align-overlay .w-\\[50px\\]{width:50px}#comfyui-align-overlay .w-\\[58px\\]{width:58px}#comfyui-align-overlay .w-\\[78px\\]{width:78px}#comfyui-align-overlay .w-\\[280px\\]{width:280px}#comfyui-align-overlay .w-\\[300px\\]{width:300px}#comfyui-align-overlay .w-\\[330px\\]{width:330px}#comfyui-align-overlay .w-\\[346px\\]{width:346px}#comfyui-align-overlay .w-full{width:100%}#comfyui-align-overlay .flex-1{flex:1}#comfyui-align-overlay .shrink{flex-shrink:1}#comfyui-align-overlay .shrink-0{flex-shrink:0}#comfyui-align-overlay .grow{flex-grow:1}#comfyui-align-overlay .border-collapse{border-collapse:collapse}#comfyui-align-overlay .-translate-x-1{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}#comfyui-align-overlay .-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}#comfyui-align-overlay .translate-none{translate:none}#comfyui-align-overlay .scale-3d{scale:var(--tw-scale-x)var(--tw-scale-y)var(--tw-scale-z)}#comfyui-align-overlay .transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}#comfyui-align-overlay .animate-pulse{animation:var(--animate-pulse)}#comfyui-align-overlay .cursor-crosshair{cursor:crosshair}#comfyui-align-overlay .cursor-move{cursor:move}#comfyui-align-overlay .cursor-not-allowed{cursor:not-allowed}#comfyui-align-overlay .cursor-pointer{cursor:pointer}#comfyui-align-overlay .cursor-text{cursor:text}#comfyui-align-overlay .touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}#comfyui-align-overlay .resize{resize:both}#comfyui-align-overlay .grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}#comfyui-align-overlay .flex-col{flex-direction:column}#comfyui-align-overlay .flex-wrap{flex-wrap:wrap}#comfyui-align-overlay .items-center{align-items:center}#comfyui-align-overlay .items-end{align-items:flex-end}#comfyui-align-overlay .justify-between{justify-content:space-between}#comfyui-align-overlay .justify-center{justify-content:center}#comfyui-align-overlay .gap-1{gap:calc(var(--spacing)*1)}#comfyui-align-overlay .gap-2{gap:calc(var(--spacing)*2)}#comfyui-align-overlay .gap-2\\.5{gap:calc(var(--spacing)*2.5)}#comfyui-align-overlay :where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}#comfyui-align-overlay :where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}#comfyui-align-overlay :where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}#comfyui-align-overlay :where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}#comfyui-align-overlay :where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}#comfyui-align-overlay .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#comfyui-align-overlay .overflow-auto{overflow:auto}#comfyui-align-overlay .overflow-hidden{overflow:hidden}#comfyui-align-overlay .overflow-visible{overflow:visible}#comfyui-align-overlay .rounded{border-radius:.25rem}#comfyui-align-overlay .rounded-4xl{border-radius:var(--radius-4xl)}#comfyui-align-overlay .rounded-full{border-radius:3.40282e38px}#comfyui-align-overlay .rounded-lg{border-radius:var(--radius-lg)}#comfyui-align-overlay .rounded-md{border-radius:var(--radius-md)}#comfyui-align-overlay .rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}#comfyui-align-overlay .rounded-ss{border-start-start-radius:.25rem}#comfyui-align-overlay .rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}#comfyui-align-overlay .rounded-se{border-start-end-radius:.25rem}#comfyui-align-overlay .rounded-ee{border-end-end-radius:.25rem}#comfyui-align-overlay .rounded-es{border-end-start-radius:.25rem}#comfyui-align-overlay .rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}#comfyui-align-overlay .rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}#comfyui-align-overlay .rounded-tl{border-top-left-radius:.25rem}#comfyui-align-overlay .rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}#comfyui-align-overlay .rounded-tr{border-top-right-radius:.25rem}#comfyui-align-overlay .rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}#comfyui-align-overlay .rounded-br{border-bottom-right-radius:.25rem}#comfyui-align-overlay .rounded-bl{border-bottom-left-radius:.25rem}#comfyui-align-overlay .border{border-style:var(--tw-border-style);border-width:1px}#comfyui-align-overlay .border-2{border-style:var(--tw-border-style);border-width:2px}#comfyui-align-overlay .border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}#comfyui-align-overlay .border-y{border-block-style:var(--tw-border-style);border-block-width:1px}#comfyui-align-overlay .border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}#comfyui-align-overlay .border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}#comfyui-align-overlay .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}#comfyui-align-overlay .border-r{border-right-style:var(--tw-border-style);border-right-width:1px}#comfyui-align-overlay .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}#comfyui-align-overlay .border-l{border-left-style:var(--tw-border-style);border-left-width:1px}#comfyui-align-overlay .border-\\[\\#04DE71\\]{border-color:#04de71}#comfyui-align-overlay .border-blue-400{border-color:var(--color-blue-400)}#comfyui-align-overlay .border-blue-400\\/40{border-color:#54a2ff66}@supports (color:color-mix(in lab,red,red)){#comfyui-align-overlay .border-blue-400\\/40{border-color:color-mix(in oklab,var(--color-blue-400)40%,transparent)}}#comfyui-align-overlay .border-blue-400\\/60{border-color:#54a2ff99}@supports (color:color-mix(in lab,red,red)){#comfyui-align-overlay .border-blue-400\\/60{border-color:color-mix(in oklab,var(--color-blue-400)60%,transparent)}}#comfyui-align-overlay .border-gray-400{border-color:var(--color-gray-400)}#comfyui-align-overlay .border-gray-400\\/15{border-color:#99a1af26}@supports (color:color-mix(in lab,red,red)){#comfyui-align-overlay .border-gray-400\\/15{border-color:color-mix(in oklab,var(--color-gray-400)15%,transparent)}}#comfyui-align-overlay .border-gray-600{border-color:var(--color-gray-600)}#comfyui-align-overlay .border-gray-600\\/10{border-color:#4a55651a}@supports (color:color-mix(in lab,red,red)){#comfyui-align-overlay .border-gray-600\\/10{border-color:color-mix(in oklab,var(--color-gray-600)10%,transparent)}}#comfyui-align-overlay .border-gray-600\\/20{border-color:#4a556533}@supports (color:color-mix(in lab,red,red)){#comfyui-align-overlay .border-gray-600\\/20{border-color:color-mix(in oklab,var(--color-gray-600)20%,transparent)}}#comfyui-align-overlay .bg-\\[\\#0c0c0c\\]{background-color:#0c0c0c}#comfyui-align-overlay .bg-\\[\\#1a1a1a\\]{background-color:#1a1a1a}#comfyui-align-overlay .bg-blue-400{background-color:var(--color-blue-400)}#comfyui-align-overlay .bg-blue-500{background-color:var(--color-blue-500)}#comfyui-align-overlay .bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){#comfyui-align-overlay .bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}#comfyui-align-overlay .bg-gray-800{background-color:var(--color-gray-800)}#comfyui-align-overlay .bg-gray-800\\/50{background-color:#1e293980}@supports (color:color-mix(in lab,red,red)){#comfyui-align-overlay .bg-gray-800\\/50{background-color:color-mix(in oklab,var(--color-gray-800)50%,transparent)}}#comfyui-align-overlay .bg-transparent{background-color:#0000}#comfyui-align-overlay .bg-repeat{background-repeat:repeat}#comfyui-align-overlay .mask-no-clip{-webkit-mask-clip:no-clip;mask-clip:no-clip}#comfyui-align-overlay .mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}#comfyui-align-overlay .p-2{padding:calc(var(--spacing)*2)}#comfyui-align-overlay .p-8{padding:calc(var(--spacing)*8)}#comfyui-align-overlay .px-0{padding-inline:calc(var(--spacing)*0)}#comfyui-align-overlay .px-2{padding-inline:calc(var(--spacing)*2)}#comfyui-align-overlay .px-3{padding-inline:calc(var(--spacing)*3)}#comfyui-align-overlay .py-1{padding-block:calc(var(--spacing)*1)}#comfyui-align-overlay .py-2{padding-block:calc(var(--spacing)*2)}#comfyui-align-overlay .pt-2{padding-top:calc(var(--spacing)*2)}#comfyui-align-overlay .pt-2\\.5{padding-top:calc(var(--spacing)*2.5)}#comfyui-align-overlay .text-center{text-align:center}#comfyui-align-overlay .text-left{text-align:left}#comfyui-align-overlay .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}#comfyui-align-overlay .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}#comfyui-align-overlay .text-\\[12px\\]{font-size:12px}#comfyui-align-overlay .text-\\[14px\\]{font-size:14px}#comfyui-align-overlay .leading-3{--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}#comfyui-align-overlay .leading-\\[17px\\]{--tw-leading:17px;line-height:17px}#comfyui-align-overlay .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}#comfyui-align-overlay .text-wrap{text-wrap:wrap}#comfyui-align-overlay .text-clip{text-overflow:clip}#comfyui-align-overlay .text-ellipsis{text-overflow:ellipsis}#comfyui-align-overlay .text-\\[\\#00A1D6\\]{color:#00a1d6}#comfyui-align-overlay .text-\\[\\#D92525\\]{color:#d92525}#comfyui-align-overlay .text-\\[\\#FFB900\\]{color:#ffb900}#comfyui-align-overlay .text-\\[\\#FFFFFF\\]{color:#fff}#comfyui-align-overlay .text-blue-400{color:var(--color-blue-400)}#comfyui-align-overlay .text-gray-200{color:var(--color-gray-200)}#comfyui-align-overlay .text-gray-300{color:var(--color-gray-300)}#comfyui-align-overlay .text-gray-400{color:var(--color-gray-400)}#comfyui-align-overlay .text-gray-400\\/88{color:#99a1afe0}@supports (color:color-mix(in lab,red,red)){#comfyui-align-overlay .text-gray-400\\/88{color:color-mix(in oklab,var(--color-gray-400)88%,transparent)}}#comfyui-align-overlay .text-white{color:var(--color-white)}#comfyui-align-overlay .capitalize{text-transform:capitalize}#comfyui-align-overlay .lowercase{text-transform:lowercase}#comfyui-align-overlay .normal-case{text-transform:none}#comfyui-align-overlay .uppercase{text-transform:uppercase}#comfyui-align-overlay .italic{font-style:italic}#comfyui-align-overlay .not-italic{font-style:normal}#comfyui-align-overlay .diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#comfyui-align-overlay .lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#comfyui-align-overlay .oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#comfyui-align-overlay .ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#comfyui-align-overlay .proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#comfyui-align-overlay .slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#comfyui-align-overlay .stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#comfyui-align-overlay .tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}#comfyui-align-overlay .normal-nums{font-variant-numeric:normal}#comfyui-align-overlay .line-through{text-decoration-line:line-through}#comfyui-align-overlay .no-underline{text-decoration-line:none}#comfyui-align-overlay .overline{text-decoration-line:overline}#comfyui-align-overlay .underline{text-decoration-line:underline}#comfyui-align-overlay .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#comfyui-align-overlay .subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}#comfyui-align-overlay .placeholder-gray-500::placeholder{color:var(--color-gray-500)}#comfyui-align-overlay .opacity-50{opacity:.5}#comfyui-align-overlay .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#comfyui-align-overlay .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#comfyui-align-overlay .shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#comfyui-align-overlay .shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#comfyui-align-overlay .inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}#comfyui-align-overlay .blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}#comfyui-align-overlay .drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);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,)}#comfyui-align-overlay .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,)}#comfyui-align-overlay .backdrop-blur{--tw-backdrop-blur:blur(8px);-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,)}#comfyui-align-overlay .backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-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,)}#comfyui-align-overlay .backdrop-invert{--tw-backdrop-invert:invert(100%);-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,)}#comfyui-align-overlay .backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-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,)}#comfyui-align-overlay .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}#comfyui-align-overlay .transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}#comfyui-align-overlay .transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}#comfyui-align-overlay .transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}#comfyui-align-overlay .transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}#comfyui-align-overlay .transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}#comfyui-align-overlay .duration-200{--tw-duration:.2s;transition-duration:.2s}#comfyui-align-overlay .outline-none{--tw-outline-style:none;outline-style:none}#comfyui-align-overlay .select-none{-webkit-user-select:none;user-select:none}#comfyui-align-overlay :where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}#comfyui-align-overlay .ring-inset{--tw-ring-inset:inset}@media(hover:hover){#comfyui-align-overlay .hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}#comfyui-align-overlay .hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}#comfyui-align-overlay .hover\\:rounded-md:hover{border-radius:var(--radius-md)}#comfyui-align-overlay .hover\\:border-gray-400\\/25:hover{border-color:#99a1af40}@supports (color:color-mix(in lab,red,red)){#comfyui-align-overlay .hover\\:border-gray-400\\/25:hover{border-color:color-mix(in oklab,var(--color-gray-400)25%,transparent)}}#comfyui-align-overlay .hover\\:bg-\\[\\#2a2a2a\\]:hover{background-color:#2a2a2a}#comfyui-align-overlay .hover\\:bg-gray-400\\/10:hover{background-color:#99a1af1a}@supports (color:color-mix(in lab,red,red)){#comfyui-align-overlay .hover\\:bg-gray-400\\/10:hover{background-color:color-mix(in oklab,var(--color-gray-400)10%,transparent)}}#comfyui-align-overlay .hover\\:text-gray-300:hover{color:var(--color-gray-300)}#comfyui-align-overlay .hover\\:opacity-80:hover{opacity:.8}}#comfyui-align-overlay .focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}#comfyui-align-overlay .active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}#comfyui-align-overlay .disabled\\:pointer-events-none:disabled{pointer-events:none}#comfyui-align-overlay .disabled\\:opacity-50:disabled{opacity:.5}#comfyui-align-overlay .\\[\\&\\>path\\]\\:fill-\\[\\#c0c0c0\\]>path{fill:silver}@media(hover:hover){#comfyui-align-overlay .group-hover\\:\\[\\&\\>path\\]\\:fill-\\[\\#E5E5E5\\]:is(:where(.group):hover *)>path{fill:#e5e5e5}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}')),document.head.appendChild(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})(); -import{app as Iu}from"/scripts/app.js";const K1="modulepreload",J1=function(a){return"/"+a},r0={},Bs=function(o,s,c){let d=Promise.resolve();if(s&&s.length>0){let p=function(m){return Promise.all(m.map(v=>Promise.resolve(v).then(C=>({status:"fulfilled",value:C}),C=>({status:"rejected",reason:C}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),y=f?.nonce||f?.getAttribute("nonce");d=p(s.map(m=>{if(m=J1(m),m in r0)return;r0[m]=!0;const v=m.endsWith(".css"),C=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${C}`))return;const _=document.createElement("link");if(_.rel=v?"stylesheet":K1,v||(_.as="script"),_.crossOrigin="",_.href=m,y&&_.setAttribute("nonce",y),document.head.appendChild(_),v)return new Promise((R,V)=>{_.addEventListener("load",R),_.addEventListener("error",()=>V(new Error(`Unable to preload CSS for ${m}`)))})}))}function h(f){const y=new Event("vite:preloadError",{cancelable:!0});if(y.payload=f,window.dispatchEvent(y),!y.defaultPrevented)throw f}return d.then(f=>{for(const y of f||[])y.status==="rejected"&&h(y.reason);return o().catch(h)})};function Y0(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Ts={exports:{}},bi={};/** +import{app as Iu}from"/scripts/app.js";const Kg="modulepreload",Jg=function(a){return"/"+a},r0={},Bs=function(o,s,c){let d=Promise.resolve();if(s&&s.length>0){let p=function(m){return Promise.all(m.map(v=>Promise.resolve(v).then(C=>({status:"fulfilled",value:C}),C=>({status:"rejected",reason:C}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),y=f?.nonce||f?.getAttribute("nonce");d=p(s.map(m=>{if(m=Jg(m),m in r0)return;r0[m]=!0;const v=m.endsWith(".css"),C=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${C}`))return;const _=document.createElement("link");if(_.rel=v?"stylesheet":Kg,v||(_.as="script"),_.crossOrigin="",_.href=m,y&&_.setAttribute("nonce",y),document.head.appendChild(_),v)return new Promise((D,q)=>{_.addEventListener("load",D),_.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${m}`)))})}))}function h(f){const y=new Event("vite:preloadError",{cancelable:!0});if(y.payload=f,window.dispatchEvent(y),!y.defaultPrevented)throw f}return d.then(f=>{for(const y of f||[])y.status==="rejected"&&h(y.reason);return o().catch(h)})};function Y0(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Ts={exports:{}},bi={};/** * @license React * react-jsx-runtime.production.js * @@ -7,7 +7,7 @@ import{app as Iu}from"/scripts/app.js";const K1="modulepreload",J1=function(a){r * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var f0;function F1(){if(f0)return bi;f0=1;var a=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function s(c,d,h){var f=null;if(h!==void 0&&(f=""+h),d.key!==void 0&&(f=""+d.key),"key"in d){h={};for(var y in d)y!=="key"&&(h[y]=d[y])}else h=d;return d=h.ref,{$$typeof:a,type:c,key:f,ref:d!==void 0?d:null,props:h}}return bi.Fragment=o,bi.jsx=s,bi.jsxs=s,bi}var d0;function W1(){return d0||(d0=1,Ts.exports=F1()),Ts.exports}var G=W1(),ws={exports:{}},ft={};/** + */var f0;function Fg(){if(f0)return bi;f0=1;var a=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function s(c,d,h){var f=null;if(h!==void 0&&(f=""+h),d.key!==void 0&&(f=""+d.key),"key"in d){h={};for(var y in d)y!=="key"&&(h[y]=d[y])}else h=d;return d=h.ref,{$$typeof:a,type:c,key:f,ref:d!==void 0?d:null,props:h}}return bi.Fragment=o,bi.jsx=s,bi.jsxs=s,bi}var d0;function Wg(){return d0||(d0=1,Ts.exports=Fg()),Ts.exports}var G=Wg(),ws={exports:{}},ft={};/** * @license React * react.production.js * @@ -15,7 +15,7 @@ import{app as Iu}from"/scripts/app.js";const K1="modulepreload",J1=function(a){r * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var h0;function $1(){if(h0)return ft;h0=1;var a=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),_=Symbol.iterator;function R(S){return S===null||typeof S!="object"?null:(S=_&&S[_]||S["@@iterator"],typeof S=="function"?S:null)}var V={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,F={};function U(S,B,X){this.props=S,this.context=B,this.refs=F,this.updater=X||V}U.prototype.isReactComponent={},U.prototype.setState=function(S,B){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,B,"setState")},U.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function W(){}W.prototype=U.prototype;function at(S,B,X){this.props=S,this.context=B,this.refs=F,this.updater=X||V}var st=at.prototype=new W;st.constructor=at,Y(st,U.prototype),st.isPureReactComponent=!0;var J=Array.isArray;function lt(){}var q={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function gt(S,B,X){var Q=X.ref;return{$$typeof:a,type:S,key:B,ref:Q!==void 0?Q:null,props:X}}function Jt(S,B){return gt(S.type,B,S.props)}function Ot(S){return typeof S=="object"&&S!==null&&S.$$typeof===a}function Dt(S){var B={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(X){return B[X]})}var Ut=/\/+/g;function Xt(S,B){return typeof S=="object"&&S!==null&&S.key!=null?Dt(""+S.key):B.toString(36)}function Z(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(lt,lt):(S.status="pending",S.then(function(B){S.status==="pending"&&(S.status="fulfilled",S.value=B)},function(B){S.status==="pending"&&(S.status="rejected",S.reason=B)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function A(S,B,X,Q,it){var rt=typeof S;(rt==="undefined"||rt==="boolean")&&(S=null);var ot=!1;if(S===null)ot=!0;else switch(rt){case"bigint":case"string":case"number":ot=!0;break;case"object":switch(S.$$typeof){case a:case o:ot=!0;break;case v:return ot=S._init,A(ot(S._payload),B,X,Q,it)}}if(ot)return it=it(S),ot=Q===""?"."+Xt(S,0):Q,J(it)?(X="",ot!=null&&(X=ot.replace(Ut,"$&/")+"/"),A(it,B,X,"",function(Ie){return Ie})):it!=null&&(Ot(it)&&(it=Jt(it,X+(it.key==null||S&&S.key===it.key?"":(""+it.key).replace(Ut,"$&/")+"/")+ot)),B.push(it)),1;ot=0;var le=Q===""?".":Q+":";if(J(S))for(var Bt=0;Bt>>1,ht=A[k];if(0>>1;kd(X,H))Qd(it,X)?(A[k]=it,A[Q]=H,k=Q):(A[k]=X,A[B]=H,k=B);else if(Qd(it,H))A[k]=it,A[Q]=H,k=Q;else break t}}return O}function d(A,O){var H=A.sortIndex-O.sortIndex;return H!==0?H:A.id-O.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;a.unstable_now=function(){return h.now()}}else{var f=Date,y=f.now();a.unstable_now=function(){return f.now()-y}}var p=[],m=[],v=1,C=null,_=3,R=!1,V=!1,Y=!1,F=!1,U=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,at=typeof setImmediate<"u"?setImmediate:null;function st(A){for(var O=s(m);O!==null;){if(O.callback===null)c(m);else if(O.startTime<=A)c(m),O.sortIndex=O.expirationTime,o(p,O);else break;O=s(m)}}function J(A){if(Y=!1,st(A),!V)if(s(p)!==null)V=!0,lt||(lt=!0,Dt());else{var O=s(m);O!==null&&Z(J,O.startTime-A)}}var lt=!1,q=-1,K=5,gt=-1;function Jt(){return F?!0:!(a.unstable_now()-gtA&&Jt());){var k=C.callback;if(typeof k=="function"){C.callback=null,_=C.priorityLevel;var ht=k(C.expirationTime<=A);if(A=a.unstable_now(),typeof ht=="function"){C.callback=ht,st(A),O=!0;break e}C===s(p)&&c(p),st(A)}else c(p);C=s(p)}if(C!==null)O=!0;else{var S=s(m);S!==null&&Z(J,S.startTime-A),O=!1}}break t}finally{C=null,_=H,R=!1}O=void 0}}finally{O?Dt():lt=!1}}}var Dt;if(typeof at=="function")Dt=function(){at(Ot)};else if(typeof MessageChannel<"u"){var Ut=new MessageChannel,Xt=Ut.port2;Ut.port1.onmessage=Ot,Dt=function(){Xt.postMessage(null)}}else Dt=function(){U(Ot,0)};function Z(A,O){q=U(function(){A(a.unstable_now())},O)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(A){A.callback=null},a.unstable_forceFrameRate=function(A){0>A||125k?(A.sortIndex=H,o(m,A),s(p)===null&&A===s(m)&&(Y?(W(q),q=-1):Y=!0,Z(J,H-k))):(A.sortIndex=ht,o(p,A),V||R||(V=!0,lt||(lt=!0,Dt()))),A},a.unstable_shouldYield=Jt,a.unstable_wrapCallback=function(A){var O=_;return function(){var H=_;_=O;try{return A.apply(this,arguments)}finally{_=H}}}})(Ns)),Ns}var y0;function P1(){return y0||(y0=1,Hs.exports=I1()),Hs.exports}var Os={exports:{}},re={};/** + */var g0;function Ig(){return g0||(g0=1,(function(a){function o(A,O){var H=A.length;A.push(O);t:for(;0>>1,ht=A[k];if(0>>1;kd(Y,H))Qd(it,Y)?(A[k]=it,A[Q]=H,k=Q):(A[k]=Y,A[B]=H,k=B);else if(Qd(it,H))A[k]=it,A[Q]=H,k=Q;else break t}}return O}function d(A,O){var H=A.sortIndex-O.sortIndex;return H!==0?H:A.id-O.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;a.unstable_now=function(){return h.now()}}else{var f=Date,y=f.now();a.unstable_now=function(){return f.now()-y}}var p=[],m=[],v=1,C=null,_=3,D=!1,q=!1,V=!1,F=!1,U=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,at=typeof setImmediate<"u"?setImmediate:null;function st(A){for(var O=s(m);O!==null;){if(O.callback===null)c(m);else if(O.startTime<=A)c(m),O.sortIndex=O.expirationTime,o(p,O);else break;O=s(m)}}function J(A){if(V=!1,st(A),!q)if(s(p)!==null)q=!0,lt||(lt=!0,Dt());else{var O=s(m);O!==null&&Z(J,O.startTime-A)}}var lt=!1,X=-1,K=5,gt=-1;function Jt(){return F?!0:!(a.unstable_now()-gtA&&Jt());){var k=C.callback;if(typeof k=="function"){C.callback=null,_=C.priorityLevel;var ht=k(C.expirationTime<=A);if(A=a.unstable_now(),typeof ht=="function"){C.callback=ht,st(A),O=!0;break e}C===s(p)&&c(p),st(A)}else c(p);C=s(p)}if(C!==null)O=!0;else{var S=s(m);S!==null&&Z(J,S.startTime-A),O=!1}}break t}finally{C=null,_=H,D=!1}O=void 0}}finally{O?Dt():lt=!1}}}var Dt;if(typeof at=="function")Dt=function(){at(Ot)};else if(typeof MessageChannel<"u"){var Ut=new MessageChannel,Xt=Ut.port2;Ut.port1.onmessage=Ot,Dt=function(){Xt.postMessage(null)}}else Dt=function(){U(Ot,0)};function Z(A,O){X=U(function(){A(a.unstable_now())},O)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(A){A.callback=null},a.unstable_forceFrameRate=function(A){0>A||125k?(A.sortIndex=H,o(m,A),s(p)===null&&A===s(m)&&(V?(W(X),X=-1):V=!0,Z(J,H-k))):(A.sortIndex=ht,o(p,A),q||D||(q=!0,lt||(lt=!0,Dt()))),A},a.unstable_shouldYield=Jt,a.unstable_wrapCallback=function(A){var O=_;return function(){var H=_;_=O;try{return A.apply(this,arguments)}finally{_=H}}}})(Ns)),Ns}var y0;function Pg(){return y0||(y0=1,Hs.exports=Ig()),Hs.exports}var Os={exports:{}},re={};/** * @license React * react-dom.production.js * @@ -31,7 +31,7 @@ import{app as Iu}from"/scripts/app.js";const K1="modulepreload",J1=function(a){r * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var p0;function ty(){if(p0)return re;p0=1;var a=ks();function o(p){var m="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(o){console.error(o)}}return a(),Os.exports=ty(),Os.exports}/** + */var p0;function ty(){if(p0)return re;p0=1;var a=ks();function o(p){var m="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(o){console.error(o)}}return a(),Os.exports=ty(),Os.exports}/** * @license React * react-dom-client.production.js * @@ -39,23 +39,23 @@ import{app as Iu}from"/scripts/app.js";const K1="modulepreload",J1=function(a){r * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var b0;function ly(){if(b0)return Si;b0=1;var a=P1(),o=ks(),s=ey();function c(t){var e="https://react.dev/errors/"+t;if(1ht||(t.current=k[ht],k[ht]=null,ht--)}function X(t,e){ht++,k[ht]=t.current,t.current=e}var Q=S(null),it=S(null),rt=S(null),ot=S(null);function le(t,e){switch(X(rt,e),X(it,t),X(Q,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Rh(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Rh(e),t=Dh(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}B(Q),X(Q,t)}function Bt(){B(Q),B(it),B(rt)}function Ie(t){t.memoizedState!==null&&X(ot,t);var e=Q.current,l=Dh(e,t.type);e!==l&&(X(it,t),X(Q,l))}function Ml(t){it.current===t&&(B(Q),B(it)),ot.current===t&&(B(ot),gi._currentValue=H)}var zl,or;function dn(t){if(zl===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);zl=e&&e[1]||"",or=-1ht||(t.current=k[ht],k[ht]=null,ht--)}function Y(t,e){ht++,k[ht]=t.current,t.current=e}var Q=S(null),it=S(null),rt=S(null),ot=S(null);function le(t,e){switch(Y(rt,e),Y(it,t),Y(Q,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Rh(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Rh(e),t=Dh(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}B(Q),Y(Q,t)}function Bt(){B(Q),B(it),B(rt)}function Ie(t){t.memoizedState!==null&&Y(ot,t);var e=Q.current,l=Dh(e,t.type);e!==l&&(Y(it,t),Y(Q,l))}function Ml(t){it.current===t&&(B(Q),B(it)),ot.current===t&&(B(ot),gi._currentValue=H)}var zl,or;function dn(t){if(zl===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);zl=e&&e[1]||"",or=-1)":-1i||b[n]!==z[i]){var D=` -`+b[n].replace(" at new "," at ");return t.displayName&&D.includes("")&&(D=D.replace("",t.displayName)),D}while(1<=n&&0<=i);break}}}finally{sc=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?dn(l):""}function Em(t,e){switch(t.tag){case 26:case 27:case 5:return dn(t.type);case 16:return dn("Lazy");case 13:return t.child!==e&&e!==null?dn("Suspense Fallback"):dn("Suspense");case 19:return dn("SuspenseList");case 0:case 15:return rc(t.type,!1);case 11:return rc(t.type.render,!1);case 1:return rc(t.type,!0);case 31:return dn("Activity");default:return""}}function sr(t){try{var e="",l=null;do e+=Em(t,l),l=t,t=t.return;while(t);return e}catch(n){return` +`);for(i=n=0;ni||b[n]!==z[i]){var R=` +`+b[n].replace(" at new "," at ");return t.displayName&&R.includes("")&&(R=R.replace("",t.displayName)),R}while(1<=n&&0<=i);break}}}finally{sc=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?dn(l):""}function Em(t,e){switch(t.tag){case 26:case 27:case 5:return dn(t.type);case 16:return dn("Lazy");case 13:return t.child!==e&&e!==null?dn("Suspense Fallback"):dn("Suspense");case 19:return dn("SuspenseList");case 0:case 15:return rc(t.type,!1);case 11:return rc(t.type.render,!1);case 1:return rc(t.type,!0);case 31:return dn("Activity");default:return""}}function sr(t){try{var e="",l=null;do e+=Em(t,l),l=t,t=t.return;while(t);return e}catch(n){return` Error generating stack: `+n.message+` -`+n.stack}}var fc=Object.prototype.hasOwnProperty,dc=a.unstable_scheduleCallback,hc=a.unstable_cancelCallback,Mm=a.unstable_shouldYield,zm=a.unstable_requestPaint,Ae=a.unstable_now,Tm=a.unstable_getCurrentPriorityLevel,rr=a.unstable_ImmediatePriority,fr=a.unstable_UserBlockingPriority,wi=a.unstable_NormalPriority,wm=a.unstable_LowPriority,dr=a.unstable_IdlePriority,_m=a.log,Hm=a.unstable_setDisableYieldValue,Ta=null,Ee=null;function Tl(t){if(typeof _m=="function"&&Hm(t),Ee&&typeof Ee.setStrictMode=="function")try{Ee.setStrictMode(Ta,t)}catch{}}var Me=Math.clz32?Math.clz32:Rm,Nm=Math.log,Om=Math.LN2;function Rm(t){return t>>>=0,t===0?32:31-(Nm(t)/Om|0)|0}var _i=256,Hi=262144,Ni=4194304;function hn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Oi(t,e,l){var n=t.pendingLanes;if(n===0)return 0;var i=0,u=t.suspendedLanes,r=t.pingedLanes;t=t.warmLanes;var g=n&134217727;return g!==0?(n=g&~u,n!==0?i=hn(n):(r&=g,r!==0?i=hn(r):l||(l=g&~t,l!==0&&(i=hn(l))))):(g=n&~u,g!==0?i=hn(g):r!==0?i=hn(r):l||(l=n&~t,l!==0&&(i=hn(l)))),i===0?0:e!==0&&e!==i&&(e&u)===0&&(u=i&-i,l=e&-e,u>=l||u===32&&(l&4194048)!==0)?e:i}function wa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Dm(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32: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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hr(){var t=Ni;return Ni<<=1,(Ni&62914560)===0&&(Ni=4194304),t}function mc(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function _a(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Um(t,e,l,n,i,u){var r=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var g=t.entanglements,b=t.expirationTimes,z=t.hiddenUpdates;for(l=r&~l;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ym=/[\n"\\]/g;function Be(t){return t.replace(Ym,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Sc(t,e,l,n,i,u,r,g){t.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?t.type=r:t.removeAttribute("type"),e!=null?r==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ue(e)):t.value!==""+Ue(e)&&(t.value=""+Ue(e)):r!=="submit"&&r!=="reset"||t.removeAttribute("value"),e!=null?xc(t,r,Ue(e)):l!=null?xc(t,r,Ue(l)):n!=null&&t.removeAttribute("value"),i==null&&u!=null&&(t.defaultChecked=!!u),i!=null&&(t.checked=i&&typeof i!="function"&&typeof i!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?t.name=""+Ue(g):t.removeAttribute("name")}function zr(t,e,l,n,i,u,r,g){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){bc(t);return}l=l!=null?""+Ue(l):"",e=e!=null?""+Ue(e):l,g||e===t.value||(t.value=e),t.defaultValue=e}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=g?t.checked:!!n,t.defaultChecked=!!n,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(t.name=r),bc(t)}function xc(t,e,l){e==="number"&&Ui(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function jn(t,e,l,n){if(t=t.options,e){e={};for(var i=0;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zc=!1;if(il)try{var Ra={};Object.defineProperty(Ra,"passive",{get:function(){zc=!0}}),window.addEventListener("test",Ra,Ra),window.removeEventListener("test",Ra,Ra)}catch{zc=!1}var _l=null,Tc=null,Li=null;function Rr(){if(Li)return Li;var t,e=Tc,l=e.length,n,i="value"in _l?_l.value:_l.textContent,u=i.length;for(t=0;t=Ba),Gr=" ",Vr=!1;function Yr(t,e){switch(t){case"keyup":return gg.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xr(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xn=!1;function pg(t,e){switch(t){case"compositionend":return Xr(e);case"keypress":return e.which!==32?null:(Vr=!0,Gr);case"textInput":return t=e.data,t===Gr&&Vr?null:t;default:return null}}function vg(t,e){if(Xn)return t==="compositionend"||!Oc&&Yr(t,e)?(t=Rr(),Li=Tc=_l=null,Xn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:l,offset:e-t};t=n}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Wr(l)}}function Ir(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Ir(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Pr(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Ui(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Ui(t.document)}return e}function Uc(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var zg=il&&"documentMode"in document&&11>=document.documentMode,qn=null,Bc=null,Va=null,Lc=!1;function tf(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Lc||qn==null||qn!==Ui(n)||(n=qn,"selectionStart"in n&&Uc(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Va&&Ga(Va,n)||(Va=n,n=Hu(Bc,"onSelect"),0>=r,i-=r,Pe=1<<32-Me(e)+i|l<mt?(St=nt,nt=null):St=nt.sibling;var Et=w(E,nt,M[mt],L);if(Et===null){nt===null&&(nt=St);break}t&&nt&&Et.alternate===null&&e(E,nt),x=u(Et,x,mt),At===null?ut=Et:At.sibling=Et,At=Et,nt=St}if(mt===M.length)return l(E,nt),xt&&cl(E,mt),ut;if(nt===null){for(;mtmt?(St=nt,nt=null):St=nt.sibling;var $l=w(E,nt,Et.value,L);if($l===null){nt===null&&(nt=St);break}t&&nt&&$l.alternate===null&&e(E,nt),x=u($l,x,mt),At===null?ut=$l:At.sibling=$l,At=$l,nt=St}if(Et.done)return l(E,nt),xt&&cl(E,mt),ut;if(nt===null){for(;!Et.done;mt++,Et=M.next())Et=j(E,Et.value,L),Et!==null&&(x=u(Et,x,mt),At===null?ut=Et:At.sibling=Et,At=Et);return xt&&cl(E,mt),ut}for(nt=n(nt);!Et.done;mt++,Et=M.next())Et=N(nt,E,mt,Et.value,L),Et!==null&&(t&&Et.alternate!==null&&nt.delete(Et.key===null?mt:Et.key),x=u(Et,x,mt),At===null?ut=Et:At.sibling=Et,At=Et);return t&&nt.forEach(function(Q1){return e(E,Q1)}),xt&&cl(E,mt),ut}function Nt(E,x,M,L){if(typeof M=="object"&&M!==null&&M.type===Y&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case R:t:{for(var ut=M.key;x!==null;){if(x.key===ut){if(ut=M.type,ut===Y){if(x.tag===7){l(E,x.sibling),L=i(x,M.props.children),L.return=E,E=L;break t}}else if(x.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===K&&En(ut)===x.type){l(E,x.sibling),L=i(x,M.props),Qa(L,M),L.return=E,E=L;break t}l(E,x);break}else e(E,x);x=x.sibling}M.type===Y?(L=bn(M.props.children,E.mode,L,M.key),L.return=E,E=L):(L=Ki(M.type,M.key,M.props,null,E.mode,L),Qa(L,M),L.return=E,E=L)}return r(E);case V:t:{for(ut=M.key;x!==null;){if(x.key===ut)if(x.tag===4&&x.stateNode.containerInfo===M.containerInfo&&x.stateNode.implementation===M.implementation){l(E,x.sibling),L=i(x,M.children||[]),L.return=E,E=L;break t}else{l(E,x);break}else e(E,x);x=x.sibling}L=Zc(M,E.mode,L),L.return=E,E=L}return r(E);case K:return M=En(M),Nt(E,x,M,L)}if(Z(M))return I(E,x,M,L);if(Dt(M)){if(ut=Dt(M),typeof ut!="function")throw Error(c(150));return M=ut.call(M),ct(E,x,M,L)}if(typeof M.then=="function")return Nt(E,x,tu(M),L);if(M.$$typeof===at)return Nt(E,x,Wi(E,M),L);eu(E,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,x!==null&&x.tag===6?(l(E,x.sibling),L=i(x,M),L.return=E,E=L):(l(E,x),L=qc(M,E.mode,L),L.return=E,E=L),r(E)):l(E,x)}return function(E,x,M,L){try{ka=0;var ut=Nt(E,x,M,L);return ta=null,ut}catch(nt){if(nt===Pn||nt===Ii)throw nt;var At=Te(29,nt,null,E.mode);return At.lanes=L,At.return=E,At}finally{}}}var zn=Ef(!0),Mf=Ef(!1),Dl=!1;function lo(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function no(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Ul(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Bl(t,e,l){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(Mt&2)!==0){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,e=Qi(t),of(t,null,l),e}return ki(t,n,e,l),Qi(t)}function Ka(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,gr(t,l)}}function ao(t,e){var l=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var i=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var r={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?i=u=r:u=u.next=r,l=l.next}while(l!==null);u===null?i=u=e:u=u.next=e}else i=u=e;l={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var io=!1;function Ja(){if(io){var t=In;if(t!==null)throw t}}function Fa(t,e,l,n){io=!1;var i=t.updateQueue;Dl=!1;var u=i.firstBaseUpdate,r=i.lastBaseUpdate,g=i.shared.pending;if(g!==null){i.shared.pending=null;var b=g,z=b.next;b.next=null,r===null?u=z:r.next=z,r=b;var D=t.alternate;D!==null&&(D=D.updateQueue,g=D.lastBaseUpdate,g!==r&&(g===null?D.firstBaseUpdate=z:g.next=z,D.lastBaseUpdate=b))}if(u!==null){var j=i.baseState;r=0,D=z=b=null,g=u;do{var w=g.lane&-536870913,N=w!==g.lane;if(N?(bt&w)===w:(n&w)===w){w!==0&&w===$n&&(io=!0),D!==null&&(D=D.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});t:{var I=t,ct=g;w=e;var Nt=l;switch(ct.tag){case 1:if(I=ct.payload,typeof I=="function"){j=I.call(Nt,j,w);break t}j=I;break t;case 3:I.flags=I.flags&-65537|128;case 0:if(I=ct.payload,w=typeof I=="function"?I.call(Nt,j,w):I,w==null)break t;j=C({},j,w);break t;case 2:Dl=!0}}w=g.callback,w!==null&&(t.flags|=64,N&&(t.flags|=8192),N=i.callbacks,N===null?i.callbacks=[w]:N.push(w))}else N={lane:w,tag:g.tag,payload:g.payload,callback:g.callback,next:null},D===null?(z=D=N,b=j):D=D.next=N,r|=w;if(g=g.next,g===null){if(g=i.shared.pending,g===null)break;N=g,g=N.next,N.next=null,i.lastBaseUpdate=N,i.shared.pending=null}}while(!0);D===null&&(b=j),i.baseState=b,i.firstBaseUpdate=z,i.lastBaseUpdate=D,u===null&&(i.shared.lanes=0),Yl|=r,t.lanes=r,t.memoizedState=j}}function zf(t,e){if(typeof t!="function")throw Error(c(191,t));t.call(e)}function Tf(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;tu?u:8;var r=A.T,g={};A.T=g,Mo(t,!1,e,l);try{var b=i(),z=A.S;if(z!==null&&z(g,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var D=Ug(b,n);Ia(t,e,D,Oe(t))}else Ia(t,e,n,Oe(t))}catch(j){Ia(t,e,{then:function(){},status:"rejected",reason:j},Oe())}finally{O.p=u,r!==null&&g.types!==null&&(r.types=g.types),A.T=r}}function Yg(){}function Ao(t,e,l,n){if(t.tag!==5)throw Error(c(476));var i=id(t).queue;ad(t,i,e,H,l===null?Yg:function(){return ud(t),l(n)})}function id(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:H},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function ud(t){var e=id(t);e.next===null&&(e=t.alternate.memoizedState),Ia(t,e.next.queue,{},Oe())}function Eo(){return ce(gi)}function cd(){return Kt().memoizedState}function od(){return Kt().memoizedState}function Xg(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=Oe();t=Ul(l);var n=Bl(e,t,l);n!==null&&(be(n,e,l),Ka(n,e,l)),e={cache:Ic()},t.payload=e;return}e=e.return}}function qg(t,e,l){var n=Oe();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fu(t)?rd(e,l):(l=Yc(t,e,l,n),l!==null&&(be(l,t,n),fd(l,e,n)))}function sd(t,e,l){var n=Oe();Ia(t,e,l,n)}function Ia(t,e,l,n){var i={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(fu(t))rd(e,i);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var r=e.lastRenderedState,g=u(r,l);if(i.hasEagerState=!0,i.eagerState=g,ze(g,r))return ki(t,e,i,0),Rt===null&&Zi(),!1}catch{}finally{}if(l=Yc(t,e,i,n),l!==null)return be(l,t,n),fd(l,e,n),!0}return!1}function Mo(t,e,l,n){if(n={lane:2,revertLane:ns(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fu(t)){if(e)throw Error(c(479))}else e=Yc(t,l,n,2),e!==null&&be(e,t,2)}function fu(t){var e=t.alternate;return t===dt||e!==null&&e===dt}function rd(t,e){la=au=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function fd(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,gr(t,l)}}var Pa={readContext:ce,use:cu,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};Pa.useEffectEvent=qt;var dd={readContext:ce,use:cu,useCallback:function(t,e){return de().memoizedState=[t,e===void 0?null:e],t},useContext:ce,useEffect:Ff,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,su(4194308,4,Pf.bind(null,e,t),l)},useLayoutEffect:function(t,e){return su(4194308,4,t,e)},useInsertionEffect:function(t,e){su(4,2,t,e)},useMemo:function(t,e){var l=de();e=e===void 0?null:e;var n=t();if(Tn){Tl(!0);try{t()}finally{Tl(!1)}}return l.memoizedState=[n,e],n},useReducer:function(t,e,l){var n=de();if(l!==void 0){var i=l(e);if(Tn){Tl(!0);try{l(e)}finally{Tl(!1)}}}else i=e;return n.memoizedState=n.baseState=i,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:i},n.queue=t,t=t.dispatch=qg.bind(null,dt,t),[n.memoizedState,t]},useRef:function(t){var e=de();return t={current:t},e.memoizedState=t},useState:function(t){t=vo(t);var e=t.queue,l=sd.bind(null,dt,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:xo,useDeferredValue:function(t,e){var l=de();return Co(l,t,e)},useTransition:function(){var t=vo(!1);return t=ad.bind(null,dt,t.queue,!0,!1),de().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var n=dt,i=de();if(xt){if(l===void 0)throw Error(c(407));l=l()}else{if(l=e(),Rt===null)throw Error(c(349));(bt&127)!==0||Rf(n,e,l)}i.memoizedState=l;var u={value:l,getSnapshot:e};return i.queue=u,Ff(Uf.bind(null,n,u,t),[t]),n.flags|=2048,aa(9,{destroy:void 0},Df.bind(null,n,u,l,e),null),l},useId:function(){var t=de(),e=Rt.identifierPrefix;if(xt){var l=tl,n=Pe;l=(n&~(1<<32-Me(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=iu++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof n.is=="string"?r.createElement("select",{is:n.is}):r.createElement("select"),n.multiple?u.multiple=!0:n.size&&(u.size=n.size);break;default:u=typeof n.is=="string"?r.createElement(i,{is:n.is}):r.createElement(i)}}u[ie]=e,u[he]=n;t:for(r=e.child;r!==null;){if(r.tag===5||r.tag===6)u.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break t;for(;r.sibling===null;){if(r.return===null||r.return===e)break t;r=r.return}r.sibling.return=r.return,r=r.sibling}e.stateNode=u;t:switch(se(u,i,n),i){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}n&&hl(e)}}return jt(e),Go(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&hl(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(c(166));if(t=rt.current,Fn(e)){if(t=e.stateNode,l=e.memoizedProps,n=null,i=ue,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}t[ie]=e,t=!!(t.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||Nh(t.nodeValue,l)),t||Ol(e,!0)}else t=Nu(t).createTextNode(n),t[ie]=e,e.stateNode=t}return jt(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(n=Fn(e),l!==null){if(t===null){if(!n)throw Error(c(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(557));t[ie]=e}else Sn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;jt(e),t=!1}else l=Jc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(_e(e),e):(_e(e),null);if((e.flags&128)!==0)throw Error(c(558))}return jt(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(i=Fn(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error(c(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(c(317));i[ie]=e}else Sn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;jt(e),i=!1}else i=Jc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),i=!0;if(!i)return e.flags&256?(_e(e),e):(_e(e),null)}return _e(e),(e.flags&128)!==0?(e.lanes=l,e):(l=n!==null,t=t!==null&&t.memoizedState!==null,l&&(n=e.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==i&&(n.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),yu(e,e.updateQueue),jt(e),null);case 4:return Bt(),t===null&&cs(e.stateNode.containerInfo),jt(e),null;case 10:return sl(e.type),jt(e),null;case 19:if(B(Qt),n=e.memoizedState,n===null)return jt(e),null;if(i=(e.flags&128)!==0,u=n.rendering,u===null)if(i)ei(n,!1);else{if(Zt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=nu(t),u!==null){for(e.flags|=128,ei(n,!1),t=u.updateQueue,e.updateQueue=t,yu(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)sf(l,t),l=l.sibling;return X(Qt,Qt.current&1|2),xt&&cl(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&Ae()>xu&&(e.flags|=128,i=!0,ei(n,!1),e.lanes=4194304)}else{if(!i)if(t=nu(u),t!==null){if(e.flags|=128,i=!0,t=t.updateQueue,e.updateQueue=t,yu(e,t),ei(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!xt)return jt(e),null}else 2*Ae()-n.renderingStartTime>xu&&l!==536870912&&(e.flags|=128,i=!0,ei(n,!1),e.lanes=4194304);n.isBackwards?(u.sibling=e.child,e.child=u):(t=n.last,t!==null?t.sibling=u:e.child=u,n.last=u)}return n.tail!==null?(t=n.tail,n.rendering=t,n.tail=t.sibling,n.renderingStartTime=Ae(),t.sibling=null,l=Qt.current,X(Qt,i?l&1|2:l&1),xt&&cl(e,n.treeForkCount),t):(jt(e),null);case 22:case 23:return _e(e),co(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(l&536870912)!==0&&(e.flags&128)===0&&(jt(e),e.subtreeFlags&6&&(e.flags|=8192)):jt(e),l=e.updateQueue,l!==null&&yu(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==l&&(e.flags|=2048),t!==null&&B(An),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),sl(Ft),jt(e),null;case 25:return null;case 30:return null}throw Error(c(156,e.tag))}function Jg(t,e){switch(Qc(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return sl(Ft),Bt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Ml(e),null;case 31:if(e.memoizedState!==null){if(_e(e),e.alternate===null)throw Error(c(340));Sn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(_e(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(c(340));Sn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return B(Qt),null;case 4:return Bt(),null;case 10:return sl(e.type),null;case 22:case 23:return _e(e),co(),t!==null&&B(An),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return sl(Ft),null;case 25:return null;default:return null}}function Bd(t,e){switch(Qc(e),e.tag){case 3:sl(Ft),Bt();break;case 26:case 27:case 5:Ml(e);break;case 4:Bt();break;case 31:e.memoizedState!==null&&_e(e);break;case 13:_e(e);break;case 19:B(Qt);break;case 10:sl(e.type);break;case 22:case 23:_e(e),co(),t!==null&&B(An);break;case 24:sl(Ft)}}function li(t,e){try{var l=e.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var i=n.next;l=i;do{if((l.tag&t)===t){n=void 0;var u=l.create,r=l.inst;n=u(),r.destroy=n}l=l.next}while(l!==i)}}catch(g){wt(e,e.return,g)}}function Gl(t,e,l){try{var n=e.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var u=i.next;n=u;do{if((n.tag&t)===t){var r=n.inst,g=r.destroy;if(g!==void 0){r.destroy=void 0,i=e;var b=l,z=g;try{z()}catch(D){wt(i,b,D)}}}n=n.next}while(n!==u)}}catch(D){wt(e,e.return,D)}}function Ld(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{Tf(e,l)}catch(n){wt(t,t.return,n)}}}function jd(t,e,l){l.props=wn(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){wt(t,e,n)}}function ni(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var n=t.stateNode;break;case 30:n=t.stateNode;break;default:n=t.stateNode}typeof l=="function"?t.refCleanup=l(n):l.current=n}}catch(i){wt(t,e,i)}}function el(t,e){var l=t.ref,n=t.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(i){wt(t,e,i)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(i){wt(t,e,i)}else l.current=null}function Gd(t){var e=t.type,l=t.memoizedProps,n=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break t;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(i){wt(t,t.return,i)}}function Vo(t,e,l){try{var n=t.stateNode;y1(n,t.type,l,e),n[he]=e}catch(i){wt(t,t.return,i)}}function Vd(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ql(t.type)||t.tag===4}function Yo(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Vd(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ql(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Xo(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=al));else if(n!==4&&(n===27&&Ql(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(Xo(t,e,l),t=t.sibling;t!==null;)Xo(t,e,l),t=t.sibling}function pu(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(n!==4&&(n===27&&Ql(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(pu(t,e,l),t=t.sibling;t!==null;)pu(t,e,l),t=t.sibling}function Yd(t){var e=t.stateNode,l=t.memoizedProps;try{for(var n=t.type,i=e.attributes;i.length;)e.removeAttributeNode(i[0]);se(e,n,l),e[ie]=t,e[he]=l}catch(u){wt(t,t.return,u)}}var ml=!1,It=!1,qo=!1,Xd=typeof WeakSet=="function"?WeakSet:Set,ae=null;function Fg(t,e){if(t=t.containerInfo,rs=ju,t=Pr(t),Uc(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var i=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break t}var r=0,g=-1,b=-1,z=0,D=0,j=t,w=null;e:for(;;){for(var N;j!==l||i!==0&&j.nodeType!==3||(g=r+i),j!==u||n!==0&&j.nodeType!==3||(b=r+n),j.nodeType===3&&(r+=j.nodeValue.length),(N=j.firstChild)!==null;)w=j,j=N;for(;;){if(j===t)break e;if(w===l&&++z===i&&(g=r),w===u&&++D===n&&(b=r),(N=j.nextSibling)!==null)break;j=w,w=j.parentNode}j=N}l=g===-1||b===-1?null:{start:g,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(fs={focusedElem:t,selectionRange:l},ju=!1,ae=e;ae!==null;)if(e=ae,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ae=t;else for(;ae!==null;){switch(e=ae,u=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l title"))),se(u,n,l),u[ie]=t,ne(u),n=u;break t;case"link":var r=Jh("link","href",i).get(n+(l.href||""));if(r){for(var g=0;gNt&&(r=Nt,Nt=ct,ct=r);var E=$r(g,ct),x=$r(g,Nt);if(E&&x&&(N.rangeCount!==1||N.anchorNode!==E.node||N.anchorOffset!==E.offset||N.focusNode!==x.node||N.focusOffset!==x.offset)){var M=j.createRange();M.setStart(E.node,E.offset),N.removeAllRanges(),ct>Nt?(N.addRange(M),N.extend(x.node,x.offset)):(M.setEnd(x.node,x.offset),N.addRange(M))}}}}for(j=[],N=g;N=N.parentNode;)N.nodeType===1&&j.push({element:N,left:N.scrollLeft,top:N.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;gl?32:l,A.T=null,l=Wo,Wo=null;var u=ql,r=bl;if(te=0,sa=ql=null,bl=0,(Mt&6)!==0)throw Error(c(331));var g=Mt;if(Mt|=4,Pd(u.current),Wd(u,u.current,r,l),Mt=g,si(0,!1),Ee&&typeof Ee.onPostCommitFiberRoot=="function")try{Ee.onPostCommitFiberRoot(Ta,u)}catch{}return!0}finally{O.p=i,A.T=n,ph(t,e)}}function bh(t,e,l){e=je(l,e),e=_o(t.stateNode,e,2),t=Bl(t,e,2),t!==null&&(_a(t,2),ll(t))}function wt(t,e,l){if(t.tag===3)bh(t,t,l);else for(;e!==null;){if(e.tag===3){bh(e,t,l);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Xl===null||!Xl.has(n))){t=je(l,t),l=Sd(2),n=Bl(e,l,2),n!==null&&(xd(l,n,e,t),_a(n,2),ll(n));break}}e=e.return}}function ts(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new Ig;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(l)||(Qo=!0,i.add(l),t=n1.bind(null,t,e,l),e.then(t,t))}function n1(t,e,l){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Rt===t&&(bt&l)===l&&(Zt===4||Zt===3&&(bt&62914560)===bt&&300>Ae()-Su?(Mt&2)===0&&ra(t,0):Ko|=l,oa===bt&&(oa=0)),ll(t)}function Sh(t,e){e===0&&(e=hr()),t=vn(t,e),t!==null&&(_a(t,e),ll(t))}function a1(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),Sh(t,l)}function i1(t,e){var l=0;switch(t.tag){case 31:case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(l=i.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(e),Sh(t,l)}function u1(t,e){return dc(t,e)}var Tu=null,da=null,es=!1,wu=!1,ls=!1,kl=0;function ll(t){t!==da&&t.next===null&&(da===null?Tu=da=t:da=da.next=t),wu=!0,es||(es=!0,o1())}function si(t,e){if(!ls&&wu){ls=!0;do for(var l=!1,n=Tu;n!==null;){if(t!==0){var i=n.pendingLanes;if(i===0)var u=0;else{var r=n.suspendedLanes,g=n.pingedLanes;u=(1<<31-Me(42|t)+1)-1,u&=i&~(r&~g),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,Eh(n,u))}else u=bt,u=Oi(n,n===Rt?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||wa(n,u)||(l=!0,Eh(n,u));n=n.next}while(l);ls=!1}}function c1(){xh()}function xh(){wu=es=!1;var t=0;kl!==0&&v1()&&(t=kl);for(var e=Ae(),l=null,n=Tu;n!==null;){var i=n.next,u=Ch(n,e);u===0?(n.next=null,l===null?Tu=i:l.next=i,i===null&&(da=l)):(l=n,(t!==0||(u&3)!==0)&&(wu=!0)),n=i}te!==0&&te!==5||si(t),kl!==0&&(kl=0)}function Ch(t,e){for(var l=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,u=t.pendingLanes&-62914561;0g)break;var D=b.transferSize,j=b.initiatorType;D&&Oh(j)&&(b=b.responseEnd,r+=D*(b"u"?null:document;function Zh(t,e,l){var n=ha;if(n&&typeof e=="string"&&e){var i=Be(e);i='link[rel="'+t+'"][href="'+i+'"]',typeof l=="string"&&(i+='[crossorigin="'+l+'"]'),qh.has(i)||(qh.add(i),t={rel:t,crossOrigin:l,href:e},n.querySelector(i)===null&&(e=n.createElement("link"),se(e,"link",t),ne(e),n.head.appendChild(e)))}}function T1(t){Sl.D(t),Zh("dns-prefetch",t,null)}function w1(t,e){Sl.C(t,e),Zh("preconnect",t,e)}function _1(t,e,l){Sl.L(t,e,l);var n=ha;if(n&&t&&e){var i='link[rel="preload"][as="'+Be(e)+'"]';e==="image"&&l&&l.imageSrcSet?(i+='[imagesrcset="'+Be(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(i+='[imagesizes="'+Be(l.imageSizes)+'"]')):i+='[href="'+Be(t)+'"]';var u=i;switch(e){case"style":u=ma(t);break;case"script":u=ga(t)}Ze.has(u)||(t=C({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Ze.set(u,t),n.querySelector(i)!==null||e==="style"&&n.querySelector(hi(u))||e==="script"&&n.querySelector(mi(u))||(e=n.createElement("link"),se(e,"link",t),ne(e),n.head.appendChild(e)))}}function H1(t,e){Sl.m(t,e);var l=ha;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",i='link[rel="modulepreload"][as="'+Be(n)+'"][href="'+Be(t)+'"]',u=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=ga(t)}if(!Ze.has(u)&&(t=C({rel:"modulepreload",href:t},e),Ze.set(u,t),l.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(mi(u)))return}n=l.createElement("link"),se(n,"link",t),ne(n),l.head.appendChild(n)}}}function N1(t,e,l){Sl.S(t,e,l);var n=ha;if(n&&t){var i=Bn(n).hoistableStyles,u=ma(t);e=e||"default";var r=i.get(u);if(!r){var g={loading:0,preload:null};if(r=n.querySelector(hi(u)))g.loading=5;else{t=C({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Ze.get(u))&&vs(t,l);var b=r=n.createElement("link");ne(b),se(b,"link",t),b._p=new Promise(function(z,D){b.onload=z,b.onerror=D}),b.addEventListener("load",function(){g.loading|=1}),b.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Ru(r,e,n)}r={type:"stylesheet",instance:r,count:1,state:g},i.set(u,r)}}}function O1(t,e){Sl.X(t,e);var l=ha;if(l&&t){var n=Bn(l).hoistableScripts,i=ga(t),u=n.get(i);u||(u=l.querySelector(mi(i)),u||(t=C({src:t,async:!0},e),(e=Ze.get(i))&&bs(t,e),u=l.createElement("script"),ne(u),se(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(i,u))}}function R1(t,e){Sl.M(t,e);var l=ha;if(l&&t){var n=Bn(l).hoistableScripts,i=ga(t),u=n.get(i);u||(u=l.querySelector(mi(i)),u||(t=C({src:t,async:!0,type:"module"},e),(e=Ze.get(i))&&bs(t,e),u=l.createElement("script"),ne(u),se(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(i,u))}}function kh(t,e,l,n){var i=(i=rt.current)?Ou(i):null;if(!i)throw Error(c(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=ma(l.href),l=Bn(i).hoistableStyles,n=l.get(e),n||(n={type:"style",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=ma(l.href);var u=Bn(i).hoistableStyles,r=u.get(t);if(r||(i=i.ownerDocument||i,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,r),(u=i.querySelector(hi(t)))&&!u._p&&(r.instance=u,r.state.loading=5),Ze.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ze.set(t,l),u||D1(i,t,l,r.state))),e&&n===null)throw Error(c(528,""));return r}if(e&&n!==null)throw Error(c(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=ga(l),l=Bn(i).hoistableScripts,n=l.get(e),n||(n={type:"script",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,t))}}function ma(t){return'href="'+Be(t)+'"'}function hi(t){return'link[rel="stylesheet"]['+t+"]"}function Qh(t){return C({},t,{"data-precedence":t.precedence,precedence:null})}function D1(t,e,l,n){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?n.loading=1:(e=t.createElement("link"),n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2}),se(e,"link",l),ne(e),t.head.appendChild(e))}function ga(t){return'[src="'+Be(t)+'"]'}function mi(t){return"script[async]"+t}function Kh(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+Be(l.href)+'"]');if(n)return e.instance=n,ne(n),n;var i=C({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),ne(n),se(n,"style",i),Ru(n,l.precedence,t),e.instance=n;case"stylesheet":i=ma(l.href);var u=t.querySelector(hi(i));if(u)return e.state.loading|=4,e.instance=u,ne(u),u;n=Qh(l),(i=Ze.get(i))&&vs(n,i),u=(t.ownerDocument||t).createElement("link"),ne(u);var r=u;return r._p=new Promise(function(g,b){r.onload=g,r.onerror=b}),se(u,"link",n),e.state.loading|=4,Ru(u,l.precedence,t),e.instance=u;case"script":return u=ga(l.src),(i=t.querySelector(mi(u)))?(e.instance=i,ne(i),i):(n=l,(i=Ze.get(u))&&(n=C({},l),bs(n,i)),t=t.ownerDocument||t,i=t.createElement("script"),ne(i),se(i,"link",n),t.head.appendChild(i),e.instance=i);case"void":return null;default:throw Error(c(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,Ru(n,l.precedence,t));return e.instance}function Ru(t,e,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,u=i,r=0;r title"):null)}function U1(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Wh(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function B1(t,e,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var i=ma(n.href),u=e.querySelector(hi(i));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Uu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=u,ne(u);return}u=e.ownerDocument||e,n=Qh(n),(i=Ze.get(i))&&vs(n,i),u=u.createElement("link"),ne(u);var r=u;r._p=new Promise(function(g,b){r.onload=g,r.onerror=b}),se(u,"link",n),l.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Uu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var Ss=0;function L1(t,e){return t.stylesheets&&t.count===0&&Lu(t,t.stylesheets),0Ss?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function Uu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Bu=null;function Lu(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Bu=new Map,e.forEach(j1,t),Bu=null,Uu.call(t))}function j1(t,e){if(!(e.state.loading&4)){var l=Bu.get(t);if(l)var n=l.get(null);else{l=new Map,Bu.set(t,l);for(var i=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(o){console.error(o)}}return a(),_s.exports=ly(),_s.exports}var ay=ny();const iy=Y0(ay);function uy(){return window.LiteGraph??null}function Qs(){return uy()?.LGraphCanvas?.active_canvas??null}function cy(){const a=Qs();if(a?.graph)return{canvas:a,graph:a.graph};const s=document.querySelector(".litegraph.litegraph-canvas")?.lgraphcanvas;return s?.graph?{canvas:s,graph:s.graph}:null}function Ce(){const a=Qs();if(a?.graph)return{canvas:a,graph:a.graph};const o=Iu;if(o?.canvas&&o?.graph)return o;const c=window.app;return c?.canvas&&c?.graph?c:cy()}function on(a){try{a?.graph?.setDirtyCanvas?.(!0,!0)}catch(o){console.warn("Failed to set dirty canvas",o)}}function X0(a,o){const s=a?.canvas??Qs(),d=s?.repositionNodesVueMode;if(typeof d!="function")return;const h=(o||[]).filter(f=>!!f).filter(f=>{const y=f.pos;return f.id!=null&&(Array.isArray(y)||ArrayBuffer.isView(y))&&y.length>=2}).map(f=>{const y=f.pos;return{node:f,newPos:{x:y[0]??0,y:y[1]??0}}});h.length&&d.call(s,h)}function oy(){return window.app??null}function sy(){return Iu??null}function ry(a){return!!a&&typeof a=="object"&&"then"in a&&typeof a.then=="function"}function De(a){const o=[sy(),oy(),Ce()];for(const s of o){if(!s)continue;const c=s.ui?.settings?.getSettingValue?.(a);if(typeof c<"u")return c;const d=s.ui?.settings?.settingsValues;if(d&&a in d)return d[a];const h=s.extensionManager?.setting?.get?.(a);if(typeof h<"u"&&!ry(h))return h}}const Ks=50,Js=20,q0={horizontal:"comfyuiAlign.nodeHorizontalSpacing",vertical:"comfyuiAlign.nodeVerticalSpacing"};function Pu(a,o){if(typeof a=="number"&&!Number.isNaN(a))return a;if(typeof a=="string"){const s=Number(a);if(!Number.isNaN(s))return s}return o}let Ls=Ks,js=Js;function Z0(a){Ls=Pu(a,Ks)}function k0(a){js=Pu(a,Js)}function fy(){try{const a=De(q0.horizontal);typeof a<"u"&&(Ls=Pu(a,Ks))}catch{}return Ls}function dy(){try{const a=De(q0.vertical);typeof a<"u"&&(js=Pu(a,Js))}catch{}return js}const Fs=10,Ws=10,x0=8,C0=8,tc={horizontal:"comfyuiAlign.groupHorizontalSpacing",vertical:"comfyuiAlign.groupVerticalSpacing",safetyHorizontal:"comfyuiAlign.groupSafetyMarginHorizontal",safetyVertical:"comfyuiAlign.groupSafetyMarginVertical"};function xa(a,o){if(typeof a=="number"&&!Number.isNaN(a))return a;if(typeof a=="string"){const s=Number(a);if(!Number.isNaN(s))return s}return o}let Gs=Fs,Vs=Ws;function Q0(a){Gs=xa(a,Fs)}function K0(a){Vs=xa(a,Ws)}function hy(){try{const a=De(tc.horizontal);typeof a<"u"&&(Gs=xa(a,Fs))}catch{}return Gs}function my(){try{const a=De(tc.vertical);typeof a<"u"&&(Vs=xa(a,Ws))}catch{}return Vs}function ec(){try{const a=De(tc.safetyHorizontal);return xa(a,x0)}catch{return x0}}function lc(){try{const a=De(tc.safetyVertical);return xa(a,C0)}catch{return C0}}const A0=a=>{let o;const s=new Set,c=(m,v)=>{const C=typeof m=="function"?m(o):m;if(!Object.is(C,o)){const _=o;o=v??(typeof C!="object"||C===null)?C:Object.assign({},o,C),s.forEach(R=>R(o,_))}},d=()=>o,y={setState:c,getState:d,getInitialState:()=>p,subscribe:m=>(s.add(m),()=>s.delete(m))},p=o=a(c,d,y);return y},gy=(a=>a?A0(a):A0),yy=a=>a;function py(a,o=yy){const s=$e.useSyncExternalStore(a.subscribe,$e.useCallback(()=>o(a.getState()),[a,o]),$e.useCallback(()=>o(a.getInitialState()),[a,o]));return $e.useDebugValue(s),s}const E0=a=>{const o=gy(a),s=c=>py(o,c);return Object.assign(s,o),s},J0=(a=>a?E0(a):E0),F0=300,W0=32,vy=F0+W0*2,$0=F0+W0*2,by=40,Sy=8,xy=vy,Cy=$0+Sy+by,an=J0((a,o)=>({isOpen:!1,position:{x:0,y:0},mouse:{x:0,y:0},panelWidth:xy,panelHeight:Cy,shortcutKeyHeld:!1,positionLocked:!1,hoveredIcon:null,hoveredColorBarIndex:null,setMouse:(s,c)=>a({mouse:{x:s,y:c}}),openAtMouse:()=>{const{mouse:s,panelWidth:c,panelHeight:d}=o(),h=window.innerWidth||document.documentElement.clientWidth,f=window.innerHeight||document.documentElement.clientHeight,y={x:s.x-c/2,y:s.y-$0/2},p={x:Math.max(0,Math.min(y.x,h-c)),y:Math.max(0,Math.min(y.y,f-d))};a({isOpen:!0,position:p})},close:()=>a({isOpen:!1}),toggleAtMouse:()=>{const{isOpen:s}=o();if(s){a({isOpen:!1});return}o().openAtMouse()},setPosition:s=>a({position:s}),setShortcutKeyHeld:s=>a({shortcutKeyHeld:s}),setPositionLocked:s=>a({positionLocked:s}),setHoveredIcon:s=>a({hoveredIcon:s}),setHoveredColorBarIndex:s=>a({hoveredColorBarIndex:s})})),Ay=$e.lazy(()=>Bs(()=>Promise.resolve().then(()=>_v),void 0)),M0="comfyui-align-overlay",Ey=1e4,My=50,ke={nodeHorizontalSpacing:"comfyuiAlign.nodeHorizontalSpacing",nodeVerticalSpacing:"comfyuiAlign.nodeVerticalSpacing",groupHorizontalSpacing:"comfyuiAlign.groupHorizontalSpacing",groupVerticalSpacing:"comfyuiAlign.groupVerticalSpacing",applyColorHeaderOnly:"comfyuiAlign.applyColorHeaderOnly",shortcutHoldMode:"comfyuiAlign.shortcutHoldMode"};let z0=!1;function zy(){return G.jsx(Ay,{})}function Ty(){return document.readyState!=="loading"?Promise.resolve():new Promise(a=>{document.addEventListener("DOMContentLoaded",()=>a(),{once:!0})})}function T0(a){const o=a?.ui?.settings;return o?typeof o.getSettingValue=="function"||typeof o.settingsValues=="object":!1}function w0(){return window.app??Iu}function wy(){return T0(w0())?Promise.resolve(!0):new Promise(a=>{const o=Date.now(),s=window.setInterval(()=>{if(T0(w0())){window.clearInterval(s),a(!0);return}Date.now()-o>=Ey&&(window.clearInterval(s),console.warn("ComfyUI Align settings API was not ready before timeout; continuing with fallback values."),a(!1))},My)})}function _y(){Z0(De(ke.nodeHorizontalSpacing)),k0(De(ke.nodeVerticalSpacing)),Q0(De(ke.groupHorizontalSpacing)),K0(De(ke.groupVerticalSpacing))}function Hy(){if(document.getElementById(M0))return;const o=document.createElement("div");o.id=M0,o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.right="0",o.style.bottom="0",o.style.zIndex="9999",o.style.pointerEvents="none",o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="center",document.body.appendChild(o),iy.createRoot(o).render(G.jsx($e.StrictMode,{children:G.jsx(T.Suspense,{fallback:G.jsx("div",{children:"Loading..."}),children:G.jsx(zy,{})})}))}function Ny(){if(z0)return;const a=o=>{if(!!!De(ke.shortcutHoldMode))return;const c=an.getState();if(!c.shortcutKeyHeld)return;o.preventDefault(),o.stopPropagation();const{hoveredIcon:d,hoveredColorBarIndex:h}=c,f=()=>{c.close(),c.setShortcutKeyHeld(!1),c.setHoveredIcon(null),c.setHoveredColorBarIndex(null),c.setPositionLocked(!1)};if(d){Bs(async()=>{const{executeIconAction:y}=await Promise.resolve().then(()=>G2);return{executeIconAction:y}},void 0).then(({executeIconAction:y})=>{y(d),f()}).catch(y=>{console.error("Error executing hovered icon action:",y),f()});return}if(h!=null){Bs(async()=>{const{executeColorBarAction:y}=await Promise.resolve().then(()=>Nv);return{executeColorBarAction:y}},void 0).then(({executeColorBarAction:y})=>{y(h),f()}).catch(y=>{console.error("Error executing hovered ColorBar action:",y),f()});return}f()};window.addEventListener("keyup",a,!0),z0=!0}Iu.registerExtension({name:"Comfy.Align",settings:[{id:ke.nodeHorizontalSpacing,name:"Node horizontal spacing",type:"number",defaultValue:50,category:["Align","Spacing","Node horizontal spacing"],attrs:{showButtons:!0,min:0},onChange:(a,o)=>{Z0(a),console.log("Align setting changed: horizontal",{newVal:a,oldVal:o})}},{id:ke.nodeVerticalSpacing,name:"Node vertical spacing",type:"number",defaultValue:20,category:["Align","Spacing","Node vertical spacing"],attrs:{showButtons:!0,min:0},onChange:(a,o)=>{k0(a),console.log("Align setting changed: vertical",{newVal:a,oldVal:o})}},{id:ke.groupHorizontalSpacing,name:"Group horizontal spacing",type:"number",defaultValue:10,category:["Align","Spacing","Group horizontal spacing"],attrs:{showButtons:!0,min:0},onChange:(a,o)=>{Q0(a),console.log("Align setting changed: group horizontal",{newVal:a,oldVal:o})}},{id:ke.groupVerticalSpacing,name:"Group vertical spacing",type:"number",defaultValue:10,category:["Align","Spacing","Group vertical spacing"],attrs:{showButtons:!0,min:0},onChange:(a,o)=>{K0(a),console.log("Align setting changed: group vertical",{newVal:a,oldVal:o})}},{id:ke.applyColorHeaderOnly,name:"Apply Color to Header Only",type:"boolean",defaultValue:!0,category:["Align","Color","Apply Color to Header Only"],onChange:(a,o)=>{console.log("Align setting changed: Apply Color to Header Only",{newVal:a,oldVal:o})}},{id:ke.shortcutHoldMode,name:"Hold Mode",type:"boolean",defaultValue:!1,category:["Align","Shortcut","Hold Mode"],tooltip:"ON: Hold the shortcut key to display the Align panel, and hover the mouse over a button before releasing the shortcut key. Alternatively, you can hold the shortcut key and click a button multiple times to perform multiple operations.",onChange:(a,o)=>{console.log("Align setting changed: Hold Mode",{newVal:a,oldVal:o})}}],commands:[{id:"comfyuiAlign.toggleAlignPanel",label:"Align Panel",function:()=>{const a=!!De(ke.shortcutHoldMode),o=an.getState();if(a){if(o.shortcutKeyHeld){o.setPositionLocked(!0);return}o.openAtMouse(),o.setShortcutKeyHeld(!0),o.setPositionLocked(!0);return}o.toggleAtMouse()}}],keybindings:[{combo:{key:"`"},commandId:"comfyuiAlign.toggleAlignPanel"}],async setup(){await Ty(),Hy(),Ny(),await wy(),_y(),console.log("ComfyUI Align Extension setup complete")}});function I0(a){var o,s,c="";if(typeof a=="string"||typeof a=="number")c+=a;else if(typeof a=="object")if(Array.isArray(a)){var d=a.length;for(o=0;o{const o=Uy(a),{conflictingClassGroups:s,conflictingClassGroupModifiers:c}=a;return{getClassGroupId:f=>{const y=f.split($s);return y[0]===""&&y.length!==1&&y.shift(),P0(y,o)||Dy(f)},getConflictingClassGroupIds:(f,y)=>{const p=s[f]||[];return y&&c[f]?[...p,...c[f]]:p}}},P0=(a,o)=>{if(a.length===0)return o.classGroupId;const s=a[0],c=o.nextPart.get(s),d=c?P0(a.slice(1),c):void 0;if(d)return d;if(o.validators.length===0)return;const h=a.join($s);return o.validators.find(({validator:f})=>f(h))?.classGroupId},_0=/^\[(.+)\]$/,Dy=a=>{if(_0.test(a)){const o=_0.exec(a)[1],s=o?.substring(0,o.indexOf(":"));if(s)return"arbitrary.."+s}},Uy=a=>{const{theme:o,classGroups:s}=a,c={nextPart:new Map,validators:[]};for(const d in s)Ys(s[d],c,d,o);return c},Ys=(a,o,s,c)=>{a.forEach(d=>{if(typeof d=="string"){const h=d===""?o:H0(o,d);h.classGroupId=s;return}if(typeof d=="function"){if(By(d)){Ys(d(c),o,s,c);return}o.validators.push({validator:d,classGroupId:s});return}Object.entries(d).forEach(([h,f])=>{Ys(f,H0(o,h),s,c)})})},H0=(a,o)=>{let s=a;return o.split($s).forEach(c=>{s.nextPart.has(c)||s.nextPart.set(c,{nextPart:new Map,validators:[]}),s=s.nextPart.get(c)}),s},By=a=>a.isThemeGetter,Ly=a=>{if(a<1)return{get:()=>{},set:()=>{}};let o=0,s=new Map,c=new Map;const d=(h,f)=>{s.set(h,f),o++,o>a&&(o=0,c=s,s=new Map)};return{get(h){let f=s.get(h);if(f!==void 0)return f;if((f=c.get(h))!==void 0)return d(h,f),f},set(h,f){s.has(h)?s.set(h,f):d(h,f)}}},Xs="!",qs=":",jy=qs.length,Gy=a=>{const{prefix:o,experimentalParseClassName:s}=a;let c=d=>{const h=[];let f=0,y=0,p=0,m;for(let V=0;Vp?m-p:void 0;return{modifiers:h,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:R}};if(o){const d=o+qs,h=c;c=f=>f.startsWith(d)?h(f.substring(d.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(s){const d=c;c=h=>s({className:h,parseClassName:d})}return c},Vy=a=>a.endsWith(Xs)?a.substring(0,a.length-1):a.startsWith(Xs)?a.substring(1):a,Yy=a=>{const o=Object.fromEntries(a.orderSensitiveModifiers.map(c=>[c,!0]));return c=>{if(c.length<=1)return c;const d=[];let h=[];return c.forEach(f=>{f[0]==="["||o[f]?(d.push(...h.sort(),f),h=[]):h.push(f)}),d.push(...h.sort()),d}},Xy=a=>({cache:Ly(a.cacheSize),parseClassName:Gy(a),sortModifiers:Yy(a),...Ry(a)}),qy=/\s+/,Zy=(a,o)=>{const{parseClassName:s,getClassGroupId:c,getConflictingClassGroupIds:d,sortModifiers:h}=o,f=[],y=a.trim().split(qy);let p="";for(let m=y.length-1;m>=0;m-=1){const v=y[m],{isExternal:C,modifiers:_,hasImportantModifier:R,baseClassName:V,maybePostfixModifierPosition:Y}=s(v);if(C){p=v+(p.length>0?" "+p:p);continue}let F=!!Y,U=c(F?V.substring(0,Y):V);if(!U){if(!F){p=v+(p.length>0?" "+p:p);continue}if(U=c(V),!U){p=v+(p.length>0?" "+p:p);continue}F=!1}const W=h(_).join(":"),at=R?W+Xs:W,st=at+U;if(f.includes(st))continue;f.push(st);const J=d(U,F);for(let lt=0;lt0?" "+p:p)}return p};function ky(){let a=0,o,s,c="";for(;a{if(typeof a=="string")return a;let o,s="";for(let c=0;cC(v),a());return s=Xy(m),c=s.cache.get,d=s.cache.set,h=y,y(p)}function y(p){const m=c(p);if(m)return m;const v=Zy(p,s);return d(p,v),v}return function(){return h(ky.apply(null,arguments))}}const ee=a=>{const o=s=>s[a]||[];return o.isThemeGetter=!0,o},em=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lm=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ky=/^\d+\/\d+$/,Jy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Wy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$y=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Iy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pa=a=>Ky.test(a),yt=a=>!!a&&!Number.isNaN(Number(a)),Il=a=>!!a&&Number.isInteger(Number(a)),Rs=a=>a.endsWith("%")&&yt(a.slice(0,-1)),xl=a=>Jy.test(a),Py=()=>!0,tp=a=>Fy.test(a)&&!Wy.test(a),nm=()=>!1,ep=a=>$y.test(a),lp=a=>Iy.test(a),np=a=>!P(a)&&!tt(a),ap=a=>Ca(a,um,nm),P=a=>em.test(a),Nn=a=>Ca(a,cm,tp),Ds=a=>Ca(a,sp,yt),N0=a=>Ca(a,am,nm),ip=a=>Ca(a,im,lp),ku=a=>Ca(a,om,ep),tt=a=>lm.test(a),xi=a=>Aa(a,cm),up=a=>Aa(a,rp),O0=a=>Aa(a,am),cp=a=>Aa(a,um),op=a=>Aa(a,im),Qu=a=>Aa(a,om,!0),Ca=(a,o,s)=>{const c=em.exec(a);return c?c[1]?o(c[1]):s(c[2]):!1},Aa=(a,o,s=!1)=>{const c=lm.exec(a);return c?c[1]?o(c[1]):s:!1},am=a=>a==="position"||a==="percentage",im=a=>a==="image"||a==="url",um=a=>a==="length"||a==="size"||a==="bg-size",cm=a=>a==="length",sp=a=>a==="number",rp=a=>a==="family-name",om=a=>a==="shadow",fp=()=>{const a=ee("color"),o=ee("font"),s=ee("text"),c=ee("font-weight"),d=ee("tracking"),h=ee("leading"),f=ee("breakpoint"),y=ee("container"),p=ee("spacing"),m=ee("radius"),v=ee("shadow"),C=ee("inset-shadow"),_=ee("text-shadow"),R=ee("drop-shadow"),V=ee("blur"),Y=ee("perspective"),F=ee("aspect"),U=ee("ease"),W=ee("animate"),at=()=>["auto","avoid","all","avoid-page","page","left","right","column"],st=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],J=()=>[...st(),tt,P],lt=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],K=()=>[tt,P,p],gt=()=>[pa,"full","auto",...K()],Jt=()=>[Il,"none","subgrid",tt,P],Ot=()=>["auto",{span:["full",Il,tt,P]},Il,tt,P],Dt=()=>[Il,"auto",tt,P],Ut=()=>["auto","min","max","fr",tt,P],Xt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...K()],O=()=>[pa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...K()],H=()=>[a,tt,P],k=()=>[...st(),O0,N0,{position:[tt,P]}],ht=()=>["no-repeat",{repeat:["","x","y","space","round"]}],S=()=>["auto","cover","contain",cp,ap,{size:[tt,P]}],B=()=>[Rs,xi,Nn],X=()=>["","none","full",m,tt,P],Q=()=>["",yt,xi,Nn],it=()=>["solid","dashed","dotted","double"],rt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ot=()=>[yt,Rs,O0,N0],le=()=>["","none",V,tt,P],Bt=()=>["none",yt,tt,P],Ie=()=>["none",yt,tt,P],Ml=()=>[yt,tt,P],zl=()=>[pa,"full",...K()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xl],breakpoint:[xl],color:[Py],container:[xl],"drop-shadow":[xl],ease:["in","out","in-out"],font:[np],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xl],shadow:[xl],spacing:["px",yt],text:[xl],"text-shadow":[xl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",pa,P,tt,F]}],container:["container"],columns:[{columns:[yt,P,tt,y]}],"break-after":[{"break-after":at()}],"break-before":[{"break-before":at()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:J()}],overflow:[{overflow:lt()}],"overflow-x":[{"overflow-x":lt()}],"overflow-y":[{"overflow-y":lt()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:gt()}],"inset-x":[{"inset-x":gt()}],"inset-y":[{"inset-y":gt()}],start:[{start:gt()}],end:[{end:gt()}],top:[{top:gt()}],right:[{right:gt()}],bottom:[{bottom:gt()}],left:[{left:gt()}],visibility:["visible","invisible","collapse"],z:[{z:[Il,"auto",tt,P]}],basis:[{basis:[pa,"full","auto",y,...K()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[yt,pa,"auto","initial","none",P]}],grow:[{grow:["",yt,tt,P]}],shrink:[{shrink:["",yt,tt,P]}],order:[{order:[Il,"first","last","none",tt,P]}],"grid-cols":[{"grid-cols":Jt()}],"col-start-end":[{col:Ot()}],"col-start":[{"col-start":Dt()}],"col-end":[{"col-end":Dt()}],"grid-rows":[{"grid-rows":Jt()}],"row-start-end":[{row:Ot()}],"row-start":[{"row-start":Dt()}],"row-end":[{"row-end":Dt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ut()}],"auto-rows":[{"auto-rows":Ut()}],gap:[{gap:K()}],"gap-x":[{"gap-x":K()}],"gap-y":[{"gap-y":K()}],"justify-content":[{justify:[...Xt(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...Xt()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":Xt()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:K()}],px:[{px:K()}],py:[{py:K()}],ps:[{ps:K()}],pe:[{pe:K()}],pt:[{pt:K()}],pr:[{pr:K()}],pb:[{pb:K()}],pl:[{pl:K()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":K()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":K()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[y,"screen",...O()]}],"min-w":[{"min-w":[y,"screen","none",...O()]}],"max-w":[{"max-w":[y,"screen","none","prose",{screen:[f]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",s,xi,Nn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[c,tt,Ds]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rs,P]}],"font-family":[{font:[up,P,o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[d,tt,P]}],"line-clamp":[{"line-clamp":[yt,"none",tt,Ds]}],leading:[{leading:[h,...K()]}],"list-image":[{"list-image":["none",tt,P]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",tt,P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...it(),"wavy"]}],"text-decoration-thickness":[{decoration:[yt,"from-font","auto",tt,Nn]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[yt,"auto",tt,P]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:K()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",tt,P]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",tt,P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:ht()}],"bg-size":[{bg:S()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Il,tt,P],radial:["",tt,P],conic:[Il,tt,P]},op,ip]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...it(),"hidden","none"]}],"divide-style":[{divide:[...it(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...it(),"none","hidden"]}],"outline-offset":[{"outline-offset":[yt,tt,P]}],"outline-w":[{outline:["",yt,xi,Nn]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",v,Qu,ku]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",C,Qu,ku]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[yt,Nn]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",_,Qu,ku]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[yt,tt,P]}],"mix-blend":[{"mix-blend":[...rt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":rt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[yt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ot()}],"mask-image-linear-to-pos":[{"mask-linear-to":ot()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":ot()}],"mask-image-t-to-pos":[{"mask-t-to":ot()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":ot()}],"mask-image-r-to-pos":[{"mask-r-to":ot()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":ot()}],"mask-image-b-to-pos":[{"mask-b-to":ot()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":ot()}],"mask-image-l-to-pos":[{"mask-l-to":ot()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":ot()}],"mask-image-x-to-pos":[{"mask-x-to":ot()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":ot()}],"mask-image-y-to-pos":[{"mask-y-to":ot()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[tt,P]}],"mask-image-radial-from-pos":[{"mask-radial-from":ot()}],"mask-image-radial-to-pos":[{"mask-radial-to":ot()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":st()}],"mask-image-conic-pos":[{"mask-conic":[yt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ot()}],"mask-image-conic-to-pos":[{"mask-conic-to":ot()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:ht()}],"mask-size":[{mask:S()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",tt,P]}],filter:[{filter:["","none",tt,P]}],blur:[{blur:le()}],brightness:[{brightness:[yt,tt,P]}],contrast:[{contrast:[yt,tt,P]}],"drop-shadow":[{"drop-shadow":["","none",R,Qu,ku]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",yt,tt,P]}],"hue-rotate":[{"hue-rotate":[yt,tt,P]}],invert:[{invert:["",yt,tt,P]}],saturate:[{saturate:[yt,tt,P]}],sepia:[{sepia:["",yt,tt,P]}],"backdrop-filter":[{"backdrop-filter":["","none",tt,P]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[yt,tt,P]}],"backdrop-contrast":[{"backdrop-contrast":[yt,tt,P]}],"backdrop-grayscale":[{"backdrop-grayscale":["",yt,tt,P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[yt,tt,P]}],"backdrop-invert":[{"backdrop-invert":["",yt,tt,P]}],"backdrop-opacity":[{"backdrop-opacity":[yt,tt,P]}],"backdrop-saturate":[{"backdrop-saturate":[yt,tt,P]}],"backdrop-sepia":[{"backdrop-sepia":["",yt,tt,P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":K()}],"border-spacing-x":[{"border-spacing-x":K()}],"border-spacing-y":[{"border-spacing-y":K()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",tt,P]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[yt,"initial",tt,P]}],ease:[{ease:["linear","initial",U,tt,P]}],delay:[{delay:[yt,tt,P]}],animate:[{animate:["none",W,tt,P]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[Y,tt,P]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:Bt()}],"rotate-x":[{"rotate-x":Bt()}],"rotate-y":[{"rotate-y":Bt()}],"rotate-z":[{"rotate-z":Bt()}],scale:[{scale:Ie()}],"scale-x":[{"scale-x":Ie()}],"scale-y":[{"scale-y":Ie()}],"scale-z":[{"scale-z":Ie()}],"scale-3d":["scale-3d"],skew:[{skew:Ml()}],"skew-x":[{"skew-x":Ml()}],"skew-y":[{"skew-y":Ml()}],transform:[{transform:[tt,P,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:zl()}],"translate-x":[{"translate-x":zl()}],"translate-y":[{"translate-y":zl()}],"translate-z":[{"translate-z":zl()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",tt,P]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":K()}],"scroll-mx":[{"scroll-mx":K()}],"scroll-my":[{"scroll-my":K()}],"scroll-ms":[{"scroll-ms":K()}],"scroll-me":[{"scroll-me":K()}],"scroll-mt":[{"scroll-mt":K()}],"scroll-mr":[{"scroll-mr":K()}],"scroll-mb":[{"scroll-mb":K()}],"scroll-ml":[{"scroll-ml":K()}],"scroll-p":[{"scroll-p":K()}],"scroll-px":[{"scroll-px":K()}],"scroll-py":[{"scroll-py":K()}],"scroll-ps":[{"scroll-ps":K()}],"scroll-pe":[{"scroll-pe":K()}],"scroll-pt":[{"scroll-pt":K()}],"scroll-pr":[{"scroll-pr":K()}],"scroll-pb":[{"scroll-pb":K()}],"scroll-pl":[{"scroll-pl":K()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",tt,P]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[yt,xi,Nn,Ds]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},dp=Qy(fp);function hp(...a){return dp(Oy(a))}const mp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M0 1C0 0.447716 0.447715 0 1 0C1.55228 0 2 0.447715 2 1V23C2 23.5523 1.55228 24 1 24C0.447715 24 0 23.5523 0 23V1Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M5 6C5 5.44772 5.44772 5 6 5H9C9.55228 5 10 5.44772 10 6V18C10 18.5523 9.55228 19 9 19H6C5.44771 19 5 18.5523 5 18L5 6Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M13 6C13 5.44772 13.4477 5 14 5H17C17.5523 5 18 5.44772 18 6V18C18 18.5523 17.5523 19 17 19H14C13.4477 19 13 18.5523 13 18L13 6Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M22 1C22 0.447716 22.4477 0 23 0C23.5523 0 24 0.447715 24 1V23C24 23.5523 23.5523 24 23 24C22.4477 24 22 23.5523 22 23V1Z",fill:"#CCCCCC"})),gp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M1 22C0.447716 22 -2.41411e-08 22.4477 0 23C2.41411e-08 23.5523 0.447715 24 1 24H23C23.5523 24 24 23.5523 24 23C24 22.4477 23.5523 22 23 22H1Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M15 1.95415e-07C14.4477 2.22397e-07 14 0.447716 14 1L14 18C14 18.5523 14.4477 19 15 19H19C19.5523 19 20 18.5523 20 18L20 1C20 0.447715 19.5523 -2.69813e-08 19 0L15 1.95415e-07Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M5 6C4.44772 6 4 6.44772 4 7L4 18C4 18.5523 4.44772 19 5 19H9C9.55228 19 10 18.5523 10 18L10 7C10 6.44772 9.55228 6 9 6H5Z",fill:"#CCCCCC"})),yp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M2 23C2 23.5523 1.55228 24 1 24C0.447715 24 -2.41411e-08 23.5523 0 23L9.61651e-07 1C9.85792e-07 0.447716 0.447716 -2.41411e-08 1 0C1.55229 2.41411e-08 2 0.447715 2 1L2 23Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M24 9C24 9.55228 23.5523 10 23 10L6 10C5.44771 10 5 9.55228 5 9V5C5 4.44772 5.44772 4 6 4L23 4C23.5523 4 24 4.44772 24 5V9Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M18 19C18 19.5523 17.5523 20 17 20H6C5.44772 20 5 19.5523 5 19V15C5 14.4477 5.44772 14 6 14L17 14C17.5523 14 18 14.4477 18 15V19Z",fill:"#CCCCCC"})),pp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M22 1C22 0.447716 22.4477 -2.41411e-08 23 0C23.5523 2.41411e-08 24 0.447715 24 1V23C24 23.5523 23.5523 24 23 24C22.4477 24 22 23.5523 22 23V1Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M1.95416e-07 15C2.22397e-07 14.4477 0.447716 14 1 14L18 14C18.5523 14 19 14.4477 19 15V19C19 19.5523 18.5523 20 18 20L1 20C0.447715 20 -2.69813e-08 19.5523 0 19L1.95416e-07 15Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M6 5C6 4.44772 6.44772 4 7 4L18 4C18.5523 4 19 4.44772 19 5V9C19 9.55228 18.5523 10 18 10L7 10C6.44772 10 6 9.55228 6 9V5Z",fill:"#CCCCCC"})),vp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M23 2C23.5523 2 24 1.55228 24 1C24 0.447715 23.5523 -2.41411e-08 23 0L1 9.61651e-07C0.447716 9.85792e-07 -2.41411e-08 0.447716 0 1C2.41411e-08 1.55229 0.447715 2 1 2L23 2Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M9 24C9.55228 24 10 23.5523 10 23L10 6C10 5.44771 9.55228 5 9 5H5C4.44772 5 4 5.44772 4 6L4 23C4 23.5523 4.44772 24 5 24H9Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M19 18C19.5523 18 20 17.5523 20 17V6C20 5.44772 19.5523 5 19 5H15C14.4477 5 14 5.44772 14 6L14 17C14 17.5523 14.4477 18 15 18H19Z",fill:"#CCCCCC"})),bp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M23 9.61651e-07C23.5523 9.85792e-07 24 0.447716 24 1C24 1.55229 23.5523 2 23 2L1 2C0.447716 2 -2.41411e-08 1.55228 0 1C2.41411e-08 0.447715 0.447715 -2.41411e-08 1 0L23 9.61651e-07Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M18 5C18.5523 5 19 5.44772 19 6V9C19 9.55229 18.5523 10 18 10L6 10C5.44772 10 5 9.55229 5 9L5 6C5 5.44772 5.44772 5 6 5L18 5Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M18 13C18.5523 13 19 13.4477 19 14V17C19 17.5523 18.5523 18 18 18H6C5.44772 18 5 17.5523 5 17L5 14C5 13.4477 5.44772 13 6 13L18 13Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M23 22C23.5523 22 24 22.4477 24 23C24 23.5523 23.5523 24 23 24L1 24C0.447716 24 -2.41411e-08 23.5523 0 23C2.41411e-08 22.4477 0.447715 22 1 22L23 22Z",fill:"#CCCCCC"})),Sp=a=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M15.5 2.5L17.5 4.5L15.5 6.5L13.5 4.5L15.5 2.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M13.5 4.5L11.5 6.5L5.5 12.5L2.5 17.5L7.5 14.5L13.5 8.5L15.5 6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M9.5 10.5L11.5 12.5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),Is=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M11.5407 24C6.32045 24 2.15237 21.3734 0.162476 16.9541C-0.0830305 16.4232 -0.0393446 15.964 0.219699 15.7198C0.450438 15.5048 0.854695 15.4761 1.30141 15.634C2.46987 16.0932 3.83954 16.3228 5.41164 16.3228C11.9585 16.3228 16.1407 12.247 16.1407 5.88987C16.1407 4.08185 15.7949 2.34609 15.3476 1.45586C15.1027 0.953801 15.1027 0.523382 15.3193 0.250924C15.5783 -0.0368392 16.0398 -0.0796976 16.6022 0.135819C21.0293 1.87158 24 6.5505 24 11.8019C24 18.7903 18.8228 23.9994 11.5401 23.9994L11.5407 24Z",fill:"currentColor"})),xp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M24 23C24 23.5523 23.5523 24 23 24C22.4477 24 22 23.5523 22 23L22 1C22 0.447716 22.4477 -2.41411e-08 23 0C23.5523 2.41411e-08 24 0.447715 24 1L24 23Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M2 23C2 23.5523 1.55228 24 1 24C0.447715 24 -2.41411e-08 23.5523 0 23L9.61651e-07 1C9.85792e-07 0.447716 0.447716 -2.41411e-08 1 0C1.55229 2.41411e-08 2 0.447715 2 1L2 23Z",fill:"#CCCCCC"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.7998 5C16.9199 5 17.4804 4.99979 17.9082 5.21777C18.2845 5.40951 18.5905 5.71554 18.7822 6.0918C19.0002 6.51962 19 7.08009 19 8.2002V15.7998C19 16.9199 19.0002 17.4804 18.7822 17.9082C18.5905 18.2845 18.2845 18.5905 17.9082 18.7822C17.4804 19.0002 16.9199 19 15.7998 19H8.2002C7.08009 19 6.51962 19.0002 6.0918 18.7822C5.71554 18.5905 5.40951 18.2845 5.21777 17.9082C4.99979 17.4804 5 16.9199 5 15.7998V8.2002C5 7.08009 4.99979 6.51962 5.21777 6.0918C5.40951 5.71554 5.71554 5.40951 6.0918 5.21777C6.51962 4.99979 7.08009 5 8.2002 5H15.7998ZM8.59961 7C8.03982 7 7.75976 7.00041 7.5459 7.10938C7.35793 7.20522 7.20522 7.35793 7.10938 7.5459C7.00041 7.75976 7 8.03982 7 8.59961V15.4004C7 15.9602 7.00041 16.2402 7.10938 16.4541C7.20522 16.6421 7.35793 16.7948 7.5459 16.8906C7.75976 16.9996 8.03982 17 8.59961 17H15.4004C15.9602 17 16.2402 16.9996 16.4541 16.8906C16.6421 16.7948 16.7948 16.6421 16.8906 16.4541C16.9996 16.2402 17 15.9602 17 15.4004V8.59961C17 8.03982 16.9996 7.75976 16.8906 7.5459C16.7948 7.35793 16.6421 7.20522 16.4541 7.10938C16.2402 7.00041 15.9602 7 15.4004 7H8.59961Z",fill:"#CCCCCC"})),Cp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("rect",{y:22,width:24,height:2,rx:1,fill:"#ABABAB"}),T.createElement("rect",{x:4,y:1,width:16,height:17,rx:2,stroke:"#ABABAB",strokeWidth:2})),Ap=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("rect",{width:2,height:24,rx:1,fill:"#ABABAB"}),T.createElement("rect",{x:6,y:4,width:17,height:16,rx:2,stroke:"#ABABAB",strokeWidth:2,strokeLinejoin:"round"})),Ep=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("rect",{x:1,y:4,width:17,height:16,rx:2,stroke:"#ABABAB",strokeWidth:2,strokeLinejoin:"round"}),T.createElement("rect",{x:22,width:2,height:24,rx:1,fill:"#ABABAB"})),Mp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("rect",{width:24,height:2,rx:1,fill:"#ABABAB"}),T.createElement("rect",{x:4,y:6,width:16,height:17,rx:2,stroke:"#ABABAB",strokeWidth:2})),zp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M23 9.61651e-07C23.5523 9.85792e-07 24 0.447716 24 1C24 1.55229 23.5523 2 23 2L1 2C0.447716 2 -2.41411e-08 1.55228 0 1C2.41411e-08 0.447715 0.447715 -2.41411e-08 1 0L23 9.61651e-07Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M23 22C23.5523 22 24 22.4477 24 23C24 23.5523 23.5523 24 23 24L1 24C0.447716 24 -2.41411e-08 23.5523 0 23C2.41411e-08 22.4477 0.447715 22 1 22L23 22Z",fill:"#CCCCCC"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.7998 5C16.9199 5 17.4804 4.99979 17.9082 5.21777C18.2845 5.40951 18.5905 5.71554 18.7822 6.0918C19.0002 6.51962 19 7.08009 19 8.2002V15.7998C19 16.9199 19.0002 17.4804 18.7822 17.9082C18.5905 18.2845 18.2845 18.5905 17.9082 18.7822C17.4804 19.0002 16.9199 19 15.7998 19H8.2002C7.08009 19 6.51962 19.0002 6.0918 18.7822C5.71554 18.5905 5.40951 18.2845 5.21777 17.9082C4.99979 17.4804 5 16.9199 5 15.7998V8.2002C5 7.08009 4.99979 6.51962 5.21777 6.0918C5.40951 5.71554 5.71554 5.40951 6.0918 5.21777C6.51962 4.99979 7.08009 5 8.2002 5H15.7998ZM8.59961 7C8.03982 7 7.75976 7.00041 7.5459 7.10938C7.35793 7.20522 7.20522 7.35793 7.10938 7.5459C7.00041 7.75976 7 8.03982 7 8.59961V15.4004C7 15.9602 7.00041 16.2402 7.10938 16.4541C7.20522 16.6421 7.35793 16.7948 7.5459 16.8906C7.75976 16.9996 8.03982 17 8.59961 17H15.4004C15.9602 17 16.2402 16.9996 16.4541 16.8906C16.6421 16.7948 16.7948 16.6421 16.8906 16.4541C16.9996 16.2402 17 15.9602 17 15.4004V8.59961C17 8.03982 16.9996 7.75976 16.8906 7.5459C16.7948 7.35793 16.6421 7.20522 16.4541 7.10938C16.2402 7.00041 15.9602 7 15.4004 7H8.59961Z",fill:"#CCCCCC"})),R0={"align-horizontally":mp,"align-to-bottom":gp,"align-to-left":yp,"align-to-right":pp,"align-to-top":vp,"align-vertically":bp,"moon-icon":Is,"stretch-horizontally":xp,"stretch-to-bottom":Cp,"stretch-to-left":Ap,"stretch-to-right":Ep,"stretch-to-top":Mp,"stretch-vertically":zp,"color-dropper":Sp},Ps=$e.memo(({name:a,className:o})=>{const s=R0[a]||R0["align-to-top"];return G.jsx(s,{className:o})});Ps.displayName="SvgIcon";const sm=$e.forwardRef(({className:a,iconName:o="align-to-top",icon:s,children:c,...d},h)=>{const f="h-6 w-6 [&>path]:fill-[#c0c0c0] group-hover:[&>path]:fill-[#E5E5E5] transition-colors duration-200",y=m=>{const v=an.getState();v.shortcutKeyHeld&&v.setHoveredIcon(o),d.onMouseEnter?.(m)},p=m=>{const v=an.getState();v.shortcutKeyHeld&&v.setHoveredIcon(null),d.onMouseLeave?.(m)};return G.jsx("button",{className:hp("inline-flex items-center justify-center h-10 w-10 p-2 rounded-md","bg-[#0c0c0c] text-white","font-medium transition-transform duration-200","hover:scale-105 active:scale-95","focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","group",a),ref:h,onMouseEnter:y,onMouseLeave:p,...d,children:c||s||G.jsx(Ps,{name:o,className:f})})});sm.displayName="Button";function sn(a){if(!a)return[];const o=a?.canvas?.selected_nodes;if(Array.isArray(o)&&o.length)return o;if(o&&typeof o=="object"){const c=Object.values(o);if(c.length)return c}const s=a?.graph?._nodes;return Array.isArray(s)?s.filter(c=>!!c&&typeof c=="object"&&(!!c.is_selected||!!c.selected)):[]}function Tp(a){return a.filter(o=>!o.flags?.pinned)}const en=a=>Number.isFinite(a)?Number(a):0;function rm(a,o,s,c){const d=Math.max(0,s),h=Math.max(0,c);return{x:a,y:o,width:d,height:h,right:a+d,bottom:o+h,centerX:a+d/2,centerY:o+h/2}}function tr(a){const o=en(a.pos?.[0]),s=en(a.pos?.[1]),c=en(a.size?.[0]),d=en(a.size?.[1]);return rm(o,s,c,d)}function Ti(a){const o=a.getBounding;if(typeof o=="function")try{const[s,c,d,h]=o.call(a);return rm(en(s),en(c),en(d),en(h))}catch{}return tr(a)}function $(a){const o=tr(a),s=Ti(a);return{logical:o,visual:s,logicalOffsetX:o.x-s.x,logicalOffsetY:o.y-s.y,logicalExtraWidth:o.width-s.width,logicalExtraHeight:o.height-s.height}}function er(a,o,s){const c=[o,s];if(typeof a.setPos=="function"){a.setPos(c[0],c[1]);return}try{a.pos=c;return}catch{a.pos[0]=c[0],a.pos[1]=c[1]}}function wp(a,o,s){const c=[Math.max(0,o),Math.max(0,s)];if(typeof a.setSize=="function"){a.setSize(c);return}try{a.size=c,typeof a.onResize=="function"&&a.onResize(c);return}catch{a.size[0]=c[0],a.size[1]=c[1],typeof a.onResize=="function"&&a.onResize(c)}}function _p(a,o,s){const c=tr(a);er(a,c.x+o,c.y+s)}function un(a,o,s,c=$(a)){er(a,o+c.logicalOffsetX,s+c.logicalOffsetY)}function xe(a,o,s=$(a)){er(a,o.x+s.logicalOffsetX,o.y+s.logicalOffsetY),wp(a,o.width+s.logicalExtraWidth,o.height+s.logicalExtraHeight)}function fm(a){try{if(a.pos||a.size||typeof a.getBounding=="function"){const h=Ti(a);return h.width<=0||h.height<=0?null:{node:a,x:h.x,y:h.y,width:h.width,height:h.height,right:h.right,bottom:h.bottom}}const o=a.x??a.pos?.[0]??0,s=a.y??a.pos?.[1]??0,c=a.width??a.size?.[0]??0,d=a.height??a.size?.[1]??0;return c<=0||d<=0?null:{node:a,x:o,y:s,width:c,height:d,right:o+c,bottom:s+d}}catch{return null}}function D0(a,o){return`${a},${o}`}class U0{cellSize;grid;count;constructor(o,s){this.cellSize=Math.max(64,Math.min(s||256,1024)),this.grid=new Map,this.count=o?.length||0,this.build(o)}build(o){if(!Array.isArray(o)||o.length===0)return;const s=this.cellSize;for(const c of o){const d=fm(c);if(!d)continue;const h=Math.floor(d.x/s),f=Math.floor(d.y/s),y=Math.floor(d.right/s),p=Math.floor(d.bottom/s);for(let m=h;m<=y;m++)for(let v=f;v<=p;v++){const C=D0(m,v);let _=this.grid.get(C);_||(_=[],this.grid.set(C,_)),_.push(d)}}}queryRect(o,s,c,d){const h=this.cellSize,f=Math.floor(o/h),y=Math.floor(s/h),p=Math.floor(c/h),m=Math.floor(d/h),v=new Set,C=[];for(let _=f;_<=p;_++)for(let R=y;R<=m;R++){const V=this.grid.get(D0(_,R));if(V)for(const Y of V)v.has(Y.node)||Y.x>=o&&Y.y>=s&&Y.right<=c&&Y.bottom<=d&&(v.add(Y.node),C.push(Y.node))}return C}size(){return this.count}}function nc(a){if(!Array.isArray(a)||a.length<200)return null;try{const o=[];for(const d of a){const h=fm(d);h&&h.width>0&&o.push(h.width)}o.sort((d,h)=>d-h);const s=o.length?o[Math.floor(o.length/2)]:256,c=Math.max(128,Math.min(Math.floor(s*3),768));return new U0(a,c)}catch{return new U0(a,256)}}function Ku(a,o,s,c){const d=Math.max(0,s),h=Math.max(0,c);return{x:a,y:o,width:d,height:h,right:a+d,bottom:o+h,centerX:a+d/2,centerY:o+h/2}}function ac(a){if(Array.isArray(a.bounding)&&a.bounding.length>=4)return Ku(a.bounding[0]??0,a.bounding[1]??0,a.bounding[2]??0,a.bounding[3]??0);if(a.pos&&a.size)return Ku(a.pos[0]??0,a.pos[1]??0,a.size[0]??0,a.size[1]??0);if(typeof a.x<"u"&&typeof a.y<"u"&&typeof a.width<"u"&&typeof a.height<"u")return Ku(a.x||0,a.y||0,a.width||0,a.height||0);const o=a;return Ku(o.pos_x??o.x??0,o.pos_y??o.y??0,o.size_x??o.width??o.size?.[0]??100,o.size_y??o.height??o.size?.[1]??100)}function rn(a){if(!a)return[];const o=a?.canvas?.selected_groups;if(Array.isArray(o)&&o.length)return o;if(o&&typeof o=="object"){const c=Object.values(o);if(c.length)return c}const s=a?.graph?.groups;return Array.isArray(s)?s.filter(c=>c?.selected):[]}function Ct(a){const o=ac(a);return[o.x,o.y,o.width,o.height]}function Hp(a,o){if(!a||!o)return[];const s=a?.graph?._nodes||[],c=ac(o),d=nc(s);return d?d.queryRect(c.x,c.y,c.right,c.bottom):s.filter(h=>{if(!h||typeof h!="object")return!1;const f=Ti(h);return f.x>=c.x&&f.y>=c.y&&f.right<=c.right&&f.bottom<=c.bottom})}function cn(a,o,s,c=!0){const d=Ce(),h=ac(a),f=o-h.x,y=s-h.y;if(f===0&&y===0)return;const p=c?Hp(d,a):[];if(Array.isArray(a.bounding)&&a.bounding.length>=4?(a.bounding[0]=o,a.bounding[1]=s,a.bounding[2]=h.width,a.bounding[3]=h.height):a.pos&&a.size?(a.pos[0]=o,a.pos[1]=s,a.size[0]=h.width,a.size[1]=h.height):typeof a.x<"u"&&typeof a.y<"u"&&typeof a.width<"u"&&typeof a.height<"u"?(a.x=o,a.y=s,a.width=h.width,a.height=h.height):(a.x=o,a.y=s,a.width=h.width,a.height=h.height,a.pos&&(a.pos[0]=o,a.pos[1]=s),a.size&&(a.size[0]=h.width,a.size[1]=h.height)),c&&p.length)for(const m of p)_p(m,f,y)}function kt(a,o,s,c,d){const h=ac(a),f=Math.round(o),y=Math.round(s),p=Math.max(0,Math.round(c)),m=Math.max(0,Math.round(d));f===Math.round(h.x)&&y===Math.round(h.y)&&p===Math.round(h.width)&&m===Math.round(h.height)||(Array.isArray(a.bounding)&&a.bounding.length>=4?(a.bounding[0]=f,a.bounding[1]=y,a.bounding[2]=p,a.bounding[3]=m):a.pos&&a.size?(a.pos[0]=f,a.pos[1]=y,a.size[0]=p,a.size[1]=m):typeof a.x<"u"&&typeof a.y<"u"&&typeof a.width<"u"&&typeof a.height<"u"?(a.x=f,a.y=y,a.width=p,a.height=m):(a.x=f,a.y=y,a.width=p,a.height=m,a.pos&&(a.pos[0]=f,a.pos[1]=y),a.size&&(a.size[0]=p,a.size[1]=m)))}function dm(a){const o=new Map;for(const s of a)o.set(s,{x:s?.pos?.[0]??0,y:s?.pos?.[1]??0,w:s?.size?.[0]??0,h:s?.size?.[1]??0});return o}function hm(a,o){const s=[],c=[];for(const d of a){const h=o.get(d);if(!h)continue;const f=d?.pos?.[0]??0,y=d?.pos?.[1]??0,p=d?.size?.[0]??0,m=d?.size?.[1]??0;(f!==h.x||y!==h.y)&&s.push(d),(p!==h.w||m!==h.h)&&c.push(d)}return{moved:s,resized:c}}function Qe(a){try{const o=Ce();if(!o)return{success:!1,message:"ComfyUI app not available"};const s=sn(o),c=Tp(s),d=s.length-c.length;if(c.length<2){let y="At least two nodes must be selected";return d>0&&(y="Cannot align: some selected nodes are pinned"),{success:!1,message:y}}const h=dm(c);a(c,o);const{moved:f}=hm(c,h);return f.length&&X0(o,f),on(o),{success:!0,count:c.length,skippedPinned:d}}catch(o){return console.error("Alignment operation failed:",o),{success:!1,message:o&&typeof o=="object"&&"message"in o?String(o.message??"Unknown error"):"Unknown error"}}}function Ke(a){try{const o=Ce();if(!o)return{success:!1,message:"ComfyUI app not available"};const s=rn(o);if(!Array.isArray(s)||s.length<2)return{success:!1,message:"At least two groups must be selected"};const c=o?.graph?._nodes,d=Array.isArray(c)?c:[],h=dm(d);a(s,o);const{moved:f}=hm(d,h);return f.length&&X0(o,f),on(o),{success:!0,count:s.length}}catch(o){return console.error("Group alignment operation failed:",o),{success:!1,message:o&&typeof o=="object"&&"message"in o?String(o.message??"Unknown error"):"Unknown error"}}}let B0=!1,Sa=!1;function Np(){if(B0)return;B0=!0;const a=c=>{c.altKey&&(Sa=!0,c.key==="Alt"&&!c.ctrlKey&&!c.shiftKey&&!c.metaKey&&(c.preventDefault(),c.stopPropagation()))},o=c=>{c.key==="Alt"?(Sa=!1,c.preventDefault(),c.stopPropagation()):c.altKey||(Sa=!1)},s=()=>{Sa=!1};window.addEventListener("keydown",a,{capture:!0}),window.addEventListener("keyup",o,{capture:!0}),window.addEventListener("blur",s),document.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&(Sa=!1)})}function Gt(){return typeof window<"u"&&Np(),Sa}const mm=12;function Op(a,o){if(a.length===0)return;const s=o??Gt(),c=a.map(f=>({node:f,frame:$(f)})),d=c.map(({frame:f})=>f.visual.x),h=s?Math.max(...d):Math.min(...d);c.forEach(({node:f,frame:y})=>{un(f,h,y.visual.y,y)})}function Rp(a,o){if(a.length===0)return;const s=o??Gt(),c=a.map(f=>({node:f,frame:$(f)})),d=c.map(({frame:f})=>f.visual.right),h=s?Math.min(...d):Math.max(...d);c.forEach(({node:f,frame:y})=>{un(f,h-y.visual.width,y.visual.y,y)})}function Dp(a,o){if(a.length===0)return;const s=o??Gt(),c=a.map(f=>({node:f,frame:$(f)})),d=c.map(({frame:f})=>f.visual.y),h=s?Math.max(...d):Math.min(...d);c.forEach(({node:f,frame:y})=>{un(f,y.visual.x,h,y)})}function Up(a,o){if(a.length===0)return;const s=o??Gt(),c=a.map(f=>({node:f,frame:$(f)})),d=c.map(({frame:f})=>f.visual.bottom),h=s?Math.min(...d):Math.max(...d);c.forEach(({node:f,frame:y})=>{un(f,y.visual.x,h-y.visual.height,y)})}function Bp(a,o){const s=mm+fy(),c=a.map(h=>({node:h,frame:$(h)})).sort((h,f)=>h.frame.visual.x-f.frame.visual.x);if(c.length===0)return;if(o??Gt()){const h=c[c.length-1],f=h.frame.visual.y;let y=h.frame.visual.x;for(let p=c.length-2;p>=0;p--){const{node:m,frame:v}=c[p];y-=v.visual.width+s,un(m,y,f,v)}}else{const h=c[0];let f=h.frame.visual.x;const y=h.frame.visual.y;c.forEach(({node:p,frame:m})=>{un(p,f,y,m),f+=m.visual.width+s})}}function Lp(a,o){const s=mm+dy(),c=a.map(h=>({node:h,frame:$(h)})).sort((h,f)=>h.frame.visual.y-f.frame.visual.y);if(c.length===0)return;if(o??Gt()){const h=c[c.length-1],f=h.frame.visual.centerX;let y=h.frame.visual.y;for(let p=c.length-2;p>=0;p--){const{node:m,frame:v}=c[p];y-=v.visual.height+s,un(m,f-v.visual.width/2,y,v)}}else{const h=c[0],f=h.frame.visual.centerX;let y=h.frame.visual.y;c.forEach(({node:p,frame:m})=>{un(p,f-m.visual.width/2,y,m),y+=m.visual.height+s})}}function jp(a){return Qe(o=>Op(o,a))}function Gp(a){return Qe(o=>Rp(o,a))}function Vp(a){return Qe(o=>Dp(o,a))}function Yp(a){return Qe(o=>Up(o,a))}function Xp(a){return Qe(o=>Bp(o,a))}function qp(a){return Qe(o=>Lp(o,a))}const Zp=.5,ic=(a,o,s=Zp)=>Math.abs(a-o)<=s;function kp(a){if(a.length<=1)return!0;const o=$(a[0]).visual.x;return a.every(s=>ic($(s).visual.x,o))}function Qp(a){if(a.length<=1)return!0;const o=$(a[0]).visual.right;return a.every(s=>ic($(s).visual.right,o))}function Kp(a){if(a.length<=1)return!0;const o=$(a[0]).visual.y;return a.every(s=>ic($(s).visual.y,o))}function Jp(a){if(a.length<=1)return!0;const o=$(a[0]).visual.bottom;return a.every(s=>ic($(s).visual.bottom,o))}function Fp(a){return a.reduce((o,s)=>$(s).visual.x<$(o).visual.x?s:o,a[0])}function Wp(a){return a.reduce((o,s)=>{const c=$(s).visual.right,d=$(o).visual.right;return c>d?s:o},a[0])}function $p(a){return a.reduce((o,s)=>$(s).visual.y<$(o).visual.y?s:o,a[0])}function Ip(a){return a.reduce((o,s)=>{const c=$(s).visual.bottom,d=$(o).visual.bottom;return c>d?s:o},a[0])}function lr(a){return a.reduce((o,s)=>$(s).visual.width<$(o).visual.width?s:o,a[0])}function Pp(a){return a.reduce((o,s)=>$(s).visual.width>$(o).visual.width?s:o,a[0])}function nr(a){return a.reduce((o,s)=>$(s).visual.height<$(o).visual.height?s:o,a[0])}function t2(a){return a.reduce((o,s)=>$(s).visual.height>$(o).visual.height?s:o,a[0])}function e2(a,o){if(a.length<2)return;if(o??Gt()){const c=a.reduce((h,f)=>$(f).visual.x>$(h).visual.x?f:h,a[0]),d=$(c).visual.x;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:d,y:f.visual.y,width:Math.max(0,f.visual.right-d),height:f.visual.height},f)});return}if(kp(a)){const c=lr(a),d=$(c).visual.right;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:f.visual.y,width:Math.max(0,d-f.visual.x),height:f.visual.height},f)})}else{const c=Fp(a),d=$(c).visual.x;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:d,y:f.visual.y,width:Math.max(0,f.visual.right-d),height:f.visual.height},f)})}}function l2(a,o){if(a.length<2)return;if(o??Gt()){const c=a.map(f=>$(f).visual.right),d=Math.min(...c),h=a.reduce((f,y)=>$(y).visual.right<$(f).visual.right?y:f,a[0]);a.forEach(f=>{if(f===h)return;const y=$(f);xe(f,{x:y.visual.x,y:y.visual.y,width:Math.max(0,d-y.visual.x),height:y.visual.height},y)});return}if(Qp(a)){const c=lr(a),d=$(c).visual.x;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:d,y:f.visual.y,width:Math.max(0,f.visual.right-d),height:f.visual.height},f)})}else{const c=Wp(a),d=$(c).visual.right;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:f.visual.y,width:Math.max(0,d-f.visual.x),height:f.visual.height},f)})}}function n2(a,o){if(a.length<2)return;if(o??Gt()){const c=a.reduce((h,f)=>$(f).visual.y>$(h).visual.y?f:h,a[0]),d=$(c).visual.y;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:d,width:f.visual.width,height:Math.max(0,f.visual.bottom-d)},f)});return}if(Kp(a)){const c=nr(a),d=$(c).visual.bottom;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:f.visual.y,width:f.visual.width,height:Math.max(0,d-f.visual.y)},f)})}else{const c=$p(a),d=$(c).visual.y;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:d,width:f.visual.width,height:Math.max(0,f.visual.bottom-d)},f)})}}function a2(a,o){if(a.length<2)return;if(o??Gt()){const c=a.map(f=>$(f).visual.bottom),d=Math.min(...c),h=a.reduce((f,y)=>$(y).visual.bottom<$(f).visual.bottom?y:f,a[0]);a.forEach(f=>{if(f===h)return;const y=$(f);xe(f,{x:y.visual.x,y:y.visual.y,width:y.visual.width,height:Math.max(0,d-y.visual.y)},y)});return}if(Jp(a)){const c=nr(a),d=$(c).visual.y;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:d,width:f.visual.width,height:Math.max(0,f.visual.bottom-d)},f)})}else{const c=Ip(a),d=$(c).visual.bottom;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:f.visual.y,width:f.visual.width,height:Math.max(0,d-f.visual.y)},f)})}}function i2(a){return Qe(o=>e2(o,a))}function u2(a){return Qe(o=>l2(o,a))}function c2(a){return Qe(o=>n2(o,a))}function o2(a){return Qe(o=>a2(o,a))}function s2(a,o){if(a.length<2)return;const c=o??Gt()?lr(a):Pp(a),d=Math.max(0,$(c).visual.width);a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.centerX-d/2,y:f.visual.y,width:d,height:f.visual.height},f)})}function r2(a,o){if(a.length<2)return;const c=o??Gt()?nr(a):t2(a),d=Math.max(0,$(c).visual.height);a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:f.visual.centerY-d/2,width:f.visual.width,height:d},f)})}function f2(a){return Qe(o=>s2(o,a))}function d2(a){return Qe(o=>r2(o,a))}const h2=1,Ei=50,Mi=50;function et(a){return Math.round(a)}function uc(a,o){for(const s of a)if(Math.abs(s-o)>h2)return!1;return!0}function m2(a){return Ke(o=>{const s=o.map(f=>({g:f,b:Ct(f)})),c=s.map(({b:f})=>f[0]),d=a?Math.max(...c):Math.min(...c);if(uc(c,d)){const f=Math.min(...s.map(({b:y})=>y[2]));for(const{g:y,b:p}of s){const[m,v,C,_]=p,R=Math.max(f,Ei);C>R&&kt(y,et(m),et(v),et(R),et(_))}return}for(const{g:f,b:y}of s){const[p,m,v,C]=y;if(!(a?pd))continue;const R=p+v,V=Math.max(R-d,Ei);kt(f,et(d),et(m),et(V),et(C))}})}function g2(a){return Ke(o=>{const s=o.map(f=>({g:f,b:Ct(f)})),c=s.map(({b:f})=>f[0]+f[2]),d=a?Math.min(...c):Math.max(...c);if(uc(c,d)){const f=Math.min(...s.map(({b:y})=>y[2]));for(const{g:y,b:p}of s){const[m,v,C,_]=p,R=Math.max(f,Ei);if(C>R){const V=m+C;kt(y,et(V-R),et(v),et(R),et(_))}}return}for(const{g:f,b:y}of s){const[p,m,,v]=y,C=Math.max(d-p,Ei);kt(f,et(p),et(m),et(C),et(v))}})}function y2(a){return Ke(o=>{const s=o.map(f=>({g:f,b:Ct(f)})),c=s.map(({b:f})=>f[1]),d=a?Math.max(...c):Math.min(...c);if(uc(c,d)){const f=Math.min(...s.map(({b:y})=>y[3]));for(const{g:y,b:p}of s){const[m,v,C,_]=p,R=Math.max(f,Mi);_>R&&kt(y,et(m),et(v),et(C),et(R))}return}for(const{g:f,b:y}of s){const[p,m,v,C]=y;if(!(a?md))continue;const R=m+C,V=Math.max(R-d,Mi);kt(f,et(p),et(d),et(v),et(V))}})}function p2(a){return Ke(o=>{const s=o.map(f=>({g:f,b:Ct(f)})),c=s.map(({b:f})=>f[1]+f[3]),d=a?Math.min(...c):Math.max(...c);if(uc(c,d)){const f=Math.min(...s.map(({b:y})=>y[3]));for(const{g:y,b:p}of s){const[m,v,C,_]=p,R=Math.max(f,Mi);if(_>R){const V=v+_;kt(y,et(m),et(V-R),et(C),et(R))}}return}for(const{g:f,b:y}of s){const[p,m,v]=y,C=Math.max(d-m,Mi);kt(f,et(p),et(m),et(v),et(C))}})}function v2(a){return Ke((o,s)=>{const c=o.map(m=>({g:m,b:Ct(m)})),d=c.map(({b:m})=>m[2]),h=Math.max(a?Math.min(...d):Math.max(...d),Ei),f=ec(),y=s?.graph?._nodes||[],p=nc(y);for(const{g:m,b:v}of c){const[C,_,R,V]=v;if(!a||!p){const q=C+R/2-h/2;kt(m,et(q),et(_),et(h),et(V));continue}const Y=p.queryRect(C,_,C+R,_+V);if(!Y.length){const q=C+R/2-h/2;kt(m,et(q),et(_),et(h),et(V));continue}let F=1/0,U=-1/0;for(const lt of Y){const q=Ti(lt);F=Math.min(F,q.x),U=Math.max(U,q.right)}if(!Number.isFinite(F)||!Number.isFinite(U)){const q=C+R/2-h/2;kt(m,et(q),et(_),et(h),et(V));continue}const W=F-f,st=U+f-W,J=Math.max(h,st);kt(m,et(W),et(_),et(J),et(V))}})}function b2(a){return Ke((o,s)=>{const c=o.map(m=>({g:m,b:Ct(m)})),d=c.map(({b:m})=>m[3]),h=Math.max(a?Math.min(...d):Math.max(...d),Mi),f=lc(),y=s?.graph?._nodes||[],p=nc(y);for(const{g:m,b:v}of c){const[C,_,R,V]=v;if(!a||!p){const q=_+V/2-h/2;kt(m,et(C),et(q),et(R),et(h));continue}const Y=p.queryRect(C,_,C+R,_+V);if(!Y.length){const q=_+V/2-h/2;kt(m,et(C),et(q),et(R),et(h));continue}let F=1/0,U=-1/0;for(const lt of Y){const q=Ti(lt);F=Math.min(F,q.y),U=Math.max(U,q.bottom)}if(!Number.isFinite(F)||!Number.isFinite(U)){const q=_+V/2-h/2;kt(m,et(C),et(q),et(R),et(h));continue}const W=F-f,st=U+f-W,J=Math.max(h,st);kt(m,et(C),et(W),et(R),et(J))}})}const gm=64,ar=50,ir=50;function Yt(a){return Math.round(a)}function S2(a,o){const s=a?.graph?._nodes||[],[c,d,h,f]=Ct(o),y=nc(s);return y?y.queryRect(c,d,c+h,d+f):s.filter(p=>{const m=p?.pos?.[0],v=p?.pos?.[1],C=p?.size?.[0],_=p?.size?.[1];return m==null||v==null||C==null||_==null?!1:m>=c&&v>=d&&m+C<=c+h&&v+_<=d+f})}function Ea(a){if(!Array.isArray(a)||a.length===0)return null;let o=1/0,s=1/0,c=-1/0,d=-1/0;for(const h of a){const f=h?.pos?.[0],y=h?.pos?.[1],p=h?.size?.[0],m=h?.size?.[1];f==null||y==null||p==null||m==null||(o=Math.min(o,f),s=Math.min(s,y),c=Math.max(c,f+p),d=Math.max(d,y+m))}return!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(c)||!Number.isFinite(d)?null:{minX:o,maxX:c,minY:s,maxY:d}}function Ma(a){try{const o=Ce();if(!o)return{success:!1,message:"ComfyUI app not available"};const s=rn(o);if(!Array.isArray(s)||s.length!==1)return{success:!1,message:"Select exactly one group"};const c=s[0],d=S2(o,c);return d.length?(a(c,d,o),on(o),{success:!0,count:1}):{success:!1,message:"No nodes inside the selected group"}}catch(o){return console.error("Single group operation failed:",o),{success:!1,message:o?.message??"Unknown error"}}}function x2(a){const o=a??Gt(),s=ec();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{minX:f}=h,y=f-s-(o?1:0),[p,m,v,C]=Ct(c),_=p+v,R=Math.max(_-y,ar);kt(c,Yt(y),Yt(m),Yt(R),Yt(C))})}function C2(a){const o=a??Gt(),s=ec();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{maxX:f}=h,y=f+s+(o?1:0),[p,m,,v]=Ct(c),C=Math.max(y-p,ar);kt(c,Yt(p),Yt(m),Yt(C),Yt(v))})}function A2(a){const o=a??Gt(),s=lc();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{minY:f}=h,y=f-(s+gm)-(o?1:0),[p,m,v,C]=Ct(c),_=m+C,R=Math.max(_-y,ir);kt(c,Yt(p),Yt(y),Yt(v),Yt(R))})}function E2(a){const o=a??Gt(),s=lc();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{maxY:f}=h,y=f+s+(o?1:0),[p,m,v]=Ct(c),C=Math.max(y-m,ir);kt(c,Yt(p),Yt(m),Yt(v),Yt(C))})}function M2(a){const o=a??Gt(),s=ec();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{minX:f,maxX:y}=h,p=f-s-(o?1:0),m=y+s,[,v,,C]=Ct(c),_=Math.max(m-p,ar);kt(c,Yt(p),Yt(v),Yt(_),Yt(C))})}function z2(a){const o=a??Gt(),s=lc();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{minY:f,maxY:y}=h,p=f-(s+gm)-(o?1:0),m=y+s,[v,,C]=Ct(c),_=Math.max(m-p,ir);kt(c,Yt(v),Yt(p),Yt(C),Yt(_))})}const ym=8;function ur(a){return[...a].sort((o,s)=>Ct(o)[0]-Ct(s)[0])}function cr(a){return[...a].sort((o,s)=>Ct(o)[1]-Ct(s)[1])}function T2(a,o){if(a.length===0)return;const s=o??Gt(),c=ur(a),d=s?c[c.length-1]:c[0],[h]=Ct(d);c.forEach(f=>{const[,y]=Ct(f);cn(f,h,y,!0)})}function w2(a,o){if(a.length===0)return;const s=o??Gt(),c=ur(a),d=s?c[0]:c[c.length-1],[h,,f]=Ct(d),y=h+f;c.forEach(p=>{const[,m,v]=Ct(p);cn(p,y-v,m,!0)})}function _2(a,o){if(a.length===0)return;const s=o??Gt(),c=cr(a),d=s?c[c.length-1]:c[0],[,h]=Ct(d);c.forEach(f=>{const[y]=Ct(f);cn(f,y,h,!0)})}function H2(a,o){if(a.length===0)return;const s=o??Gt(),c=cr(a),d=s?c[0]:c[c.length-1],[,h,,f]=Ct(d),y=h+f;c.forEach(p=>{const[m,,,v]=Ct(p);cn(p,m,y-v,!0)})}function N2(a,o){const s=ym+hy(),c=ur(a);if(c.length===0)return;if(o??Gt()){const h=c[c.length-1],[f,y]=Ct(h);let p=f;const m=y;for(let v=c.length-2;v>=0;v--){const C=c[v],[,,_]=Ct(C);p-=_+s,cn(C,p,m,!0)}}else{const h=c[0],[f,y]=Ct(h);let p=f;const m=y;c.forEach(v=>{const[,,C]=Ct(v);cn(v,p,m,!0),p+=C+s})}}function O2(a,o){const s=ym+my(),c=cr(a);if(c.length===0)return;if(o??Gt()){const h=c[c.length-1],[f,y,p]=Ct(h),m=f+p/2;let v=y;for(let C=c.length-2;C>=0;C--){const _=c[C],[,,R,V]=Ct(_);v-=V+s;const Y=m-R/2;cn(_,Y,v,!0)}}else{const h=c[0],[f,y,p]=Ct(h),m=f+p/2;let v=y;c.forEach(C=>{const[,,_,R]=Ct(C),V=m-_/2;cn(C,V,v,!0),v+=R+s})}}function R2(a){return Ke(o=>T2(o,a))}function D2(a){return Ke(o=>w2(o,a))}function U2(a){return Ke(o=>_2(o,a))}function B2(a){return Ke(o=>H2(o,a))}function L2(a){return Ke(o=>N2(o,a))}function j2(a){return Ke(o=>O2(o,a))}function zt(a,o){o.success||console.warn(`ComfyUI Align action failed for "${a}"`,{icon:a,message:o.message??"Unknown error",result:o})}function Re(a){const o=Gt(),s=Ce(),c=rn(s),d=Array.isArray(c)&&c.length>=2,h=Array.isArray(c)&&c.length===1;switch(a){case"align-to-left":d?zt(a,R2(o)):zt(a,jp(o));break;case"align-to-right":d?zt(a,D2(o)):zt(a,Gp(o));break;case"align-to-top":d?zt(a,U2(o)):zt(a,Vp(o));break;case"align-to-bottom":d?zt(a,B2(o)):zt(a,Yp(o));break;case"align-horizontally":d?zt(a,L2(o)):zt(a,Xp(o));break;case"align-vertically":d?zt(a,j2(o)):zt(a,qp(o));break;case"stretch-to-left":d?zt(a,m2(o)):h?zt(a,x2(o)):zt(a,i2(o));break;case"stretch-to-right":d?zt(a,g2(o)):h?zt(a,C2(o)):zt(a,u2(o));break;case"stretch-to-top":d?zt(a,y2(o)):h?zt(a,A2(o)):zt(a,c2(o));break;case"stretch-to-bottom":d?zt(a,p2(o)):h?zt(a,E2(o)):zt(a,o2(o));break;case"stretch-horizontally":d?zt(a,v2(o)):h?zt(a,M2(o)):zt(a,f2(o));break;case"stretch-vertically":d?zt(a,b2(o)):h?zt(a,z2(o)):zt(a,d2(o));break}}const G2=Object.freeze(Object.defineProperty({__proto__:null,executeIconAction:Re},Symbol.toStringTag,{value:"Module"}));function V2(){const a=T.useMemo(()=>({"align-to-left":()=>Re("align-to-left"),"align-to-right":()=>Re("align-to-right"),"align-to-top":()=>Re("align-to-top"),"align-to-bottom":()=>Re("align-to-bottom"),"align-vertically":()=>Re("align-vertically"),"align-horizontally":()=>Re("align-horizontally"),"stretch-to-left":()=>Re("stretch-to-left"),"stretch-to-right":()=>Re("stretch-to-right"),"stretch-to-top":()=>Re("stretch-to-top"),"stretch-to-bottom":()=>Re("stretch-to-bottom"),"stretch-horizontally":()=>Re("stretch-horizontally"),"stretch-vertically":()=>Re("stretch-vertically")}),[]);return{getHandler:s=>a[s]}}const Y2=[{id:"top-group",position:"top",direction:"horizontal",buttons:["align-to-top","align-vertically","stretch-to-top"],containerClass:"absolute top-0 left-0 w-full flex justify-center pointer-events-auto",groupClass:"flex gap-2 pointer-events-auto"},{id:"right-group",position:"right",direction:"vertical",buttons:["align-to-right","stretch-horizontally","stretch-to-right"],containerClass:"absolute top-0 right-0 h-full flex items-center pointer-events-auto",groupClass:"flex flex-col gap-2 pointer-events-auto"},{id:"bottom-group",position:"bottom",direction:"horizontal",buttons:["align-to-bottom","stretch-vertically","stretch-to-bottom"],containerClass:"absolute bottom-0 left-0 w-full flex justify-center pointer-events-auto",groupClass:"flex gap-2 pointer-events-auto"},{id:"left-group",position:"left",direction:"vertical",buttons:["align-to-left","align-horizontally","stretch-to-left"],containerClass:"absolute top-0 left-0 h-full flex items-center pointer-events-auto",groupClass:"flex flex-col gap-2 pointer-events-auto"}],pm=$e.memo(({config:a})=>{const{containerClass:o,groupClass:s,buttons:c}=a,{getHandler:d}=V2();return G.jsx("div",{className:o,children:G.jsx("div",{className:s,children:c.map((h,f)=>G.jsx(sm,{iconName:h,onClick:d(h)},`${a.id}-${h}-${f}`))})})});pm.displayName="ButtonGroup";function X2(){const a=T.useMemo(()=>Y2,[]);return G.jsx("div",{className:"flex items-center justify-center p-8 pointer-events-none",children:G.jsx("div",{className:"relative w-[300px] h-[300px]",children:a.map(o=>G.jsx(pm,{config:o},o.id))})})}const vm=$e.memo(X2);vm.displayName="CrossPanel";const L0={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},zi=new Map,Ju=a=>{const o=zi.get(a);return o?Object.fromEntries(Object.entries(o.stores).map(([s,c])=>[s,c.getState()])):{}},q2=(a,o,s)=>{if(a===void 0)return{type:"untracked",connection:o.connect(s)};const c=zi.get(s.name);if(c)return{type:"tracked",store:a,...c};const d={connection:o.connect(s),stores:{}};return zi.set(s.name,d),{type:"tracked",store:a,...d}},Z2=(a,o)=>{if(o===void 0)return;const s=zi.get(a);s&&(delete s.stores[o],Object.keys(s.stores).length===0&&zi.delete(a))},k2=a=>{var o,s;if(!a)return;const c=a.split(` -`),d=c.findIndex(f=>f.includes("api.setState"));if(d<0)return;const h=((o=c[d+1])==null?void 0:o.trim())||"";return(s=/.+ (.+) .+/.exec(h))==null?void 0:s[1]},Q2=(a,o={})=>(s,c,d)=>{const{enabled:h,anonymousActionType:f,store:y,...p}=o;let m;try{m=(h??(L0?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!m)return a(s,c,d);const{connection:v,...C}=q2(y,m,p);let _=!0;d.setState=((Y,F,U)=>{const W=s(Y,F);if(!_)return W;const at=U===void 0?{type:f||k2(new Error().stack)||"anonymous"}:typeof U=="string"?{type:U}:U;return y===void 0?(v?.send(at,c()),W):(v?.send({...at,type:`${y}/${at.type}`},{...Ju(p.name),[y]:d.getState()}),W)}),d.devtools={cleanup:()=>{v&&typeof v.unsubscribe=="function"&&v.unsubscribe(),Z2(p.name,y)}};const R=(...Y)=>{const F=_;_=!1,s(...Y),_=F},V=a(d.setState,c,d);if(C.type==="untracked"?v?.init(V):(C.stores[C.store]=d,v?.init(Object.fromEntries(Object.entries(C.stores).map(([Y,F])=>[Y,Y===C.store?V:F.getState()])))),d.dispatchFromDevtools&&typeof d.dispatch=="function"){let Y=!1;const F=d.dispatch;d.dispatch=(...U)=>{(L0?"production":void 0)!=="production"&&U[0].type==="__setState"&&!Y&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),Y=!0),F(...U)}}return v.subscribe(Y=>{var F;switch(Y.type){case"ACTION":if(typeof Y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Us(Y.payload,U=>{if(U.type==="__setState"){if(y===void 0){R(U.state);return}Object.keys(U.state).length!==1&&console.error(` +`+n.stack}}var fc=Object.prototype.hasOwnProperty,dc=a.unstable_scheduleCallback,hc=a.unstable_cancelCallback,Mm=a.unstable_shouldYield,zm=a.unstable_requestPaint,Ae=a.unstable_now,Tm=a.unstable_getCurrentPriorityLevel,rr=a.unstable_ImmediatePriority,fr=a.unstable_UserBlockingPriority,wi=a.unstable_NormalPriority,wm=a.unstable_LowPriority,dr=a.unstable_IdlePriority,_m=a.log,Hm=a.unstable_setDisableYieldValue,Ta=null,Ee=null;function Tl(t){if(typeof _m=="function"&&Hm(t),Ee&&typeof Ee.setStrictMode=="function")try{Ee.setStrictMode(Ta,t)}catch{}}var Me=Math.clz32?Math.clz32:Rm,Nm=Math.log,Om=Math.LN2;function Rm(t){return t>>>=0,t===0?32:31-(Nm(t)/Om|0)|0}var _i=256,Hi=262144,Ni=4194304;function hn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Oi(t,e,l){var n=t.pendingLanes;if(n===0)return 0;var i=0,u=t.suspendedLanes,r=t.pingedLanes;t=t.warmLanes;var g=n&134217727;return g!==0?(n=g&~u,n!==0?i=hn(n):(r&=g,r!==0?i=hn(r):l||(l=g&~t,l!==0&&(i=hn(l))))):(g=n&~u,g!==0?i=hn(g):r!==0?i=hn(r):l||(l=n&~t,l!==0&&(i=hn(l)))),i===0?0:e!==0&&e!==i&&(e&u)===0&&(u=i&-i,l=e&-e,u>=l||u===32&&(l&4194048)!==0)?e:i}function wa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Dm(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32: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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function hr(){var t=Ni;return Ni<<=1,(Ni&62914560)===0&&(Ni=4194304),t}function mc(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function _a(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Um(t,e,l,n,i,u){var r=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var g=t.entanglements,b=t.expirationTimes,z=t.hiddenUpdates;for(l=r&~l;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ym=/[\n"\\]/g;function Be(t){return t.replace(Ym,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Sc(t,e,l,n,i,u,r,g){t.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?t.type=r:t.removeAttribute("type"),e!=null?r==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ue(e)):t.value!==""+Ue(e)&&(t.value=""+Ue(e)):r!=="submit"&&r!=="reset"||t.removeAttribute("value"),e!=null?xc(t,r,Ue(e)):l!=null?xc(t,r,Ue(l)):n!=null&&t.removeAttribute("value"),i==null&&u!=null&&(t.defaultChecked=!!u),i!=null&&(t.checked=i&&typeof i!="function"&&typeof i!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?t.name=""+Ue(g):t.removeAttribute("name")}function zr(t,e,l,n,i,u,r,g){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){bc(t);return}l=l!=null?""+Ue(l):"",e=e!=null?""+Ue(e):l,g||e===t.value||(t.value=e),t.defaultValue=e}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=g?t.checked:!!n,t.defaultChecked=!!n,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(t.name=r),bc(t)}function xc(t,e,l){e==="number"&&Ui(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function jn(t,e,l,n){if(t=t.options,e){e={};for(var i=0;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zc=!1;if(il)try{var Ra={};Object.defineProperty(Ra,"passive",{get:function(){zc=!0}}),window.addEventListener("test",Ra,Ra),window.removeEventListener("test",Ra,Ra)}catch{zc=!1}var _l=null,Tc=null,Li=null;function Rr(){if(Li)return Li;var t,e=Tc,l=e.length,n,i="value"in _l?_l.value:_l.textContent,u=i.length;for(t=0;t=Ba),Gr=" ",Vr=!1;function Yr(t,e){switch(t){case"keyup":return g1.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xr(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xn=!1;function p1(t,e){switch(t){case"compositionend":return Xr(e);case"keypress":return e.which!==32?null:(Vr=!0,Gr);case"textInput":return t=e.data,t===Gr&&Vr?null:t;default:return null}}function v1(t,e){if(Xn)return t==="compositionend"||!Oc&&Yr(t,e)?(t=Rr(),Li=Tc=_l=null,Xn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:l,offset:e-t};t=n}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Wr(l)}}function Ir(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Ir(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Pr(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Ui(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Ui(t.document)}return e}function Uc(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var z1=il&&"documentMode"in document&&11>=document.documentMode,qn=null,Bc=null,Va=null,Lc=!1;function tf(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Lc||qn==null||qn!==Ui(n)||(n=qn,"selectionStart"in n&&Uc(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Va&&Ga(Va,n)||(Va=n,n=Hu(Bc,"onSelect"),0>=r,i-=r,Pe=1<<32-Me(e)+i|l<mt?(St=nt,nt=null):St=nt.sibling;var Et=w(E,nt,M[mt],L);if(Et===null){nt===null&&(nt=St);break}t&&nt&&Et.alternate===null&&e(E,nt),x=u(Et,x,mt),At===null?ut=Et:At.sibling=Et,At=Et,nt=St}if(mt===M.length)return l(E,nt),xt&&cl(E,mt),ut;if(nt===null){for(;mtmt?(St=nt,nt=null):St=nt.sibling;var $l=w(E,nt,Et.value,L);if($l===null){nt===null&&(nt=St);break}t&&nt&&$l.alternate===null&&e(E,nt),x=u($l,x,mt),At===null?ut=$l:At.sibling=$l,At=$l,nt=St}if(Et.done)return l(E,nt),xt&&cl(E,mt),ut;if(nt===null){for(;!Et.done;mt++,Et=M.next())Et=j(E,Et.value,L),Et!==null&&(x=u(Et,x,mt),At===null?ut=Et:At.sibling=Et,At=Et);return xt&&cl(E,mt),ut}for(nt=n(nt);!Et.done;mt++,Et=M.next())Et=N(nt,E,mt,Et.value,L),Et!==null&&(t&&Et.alternate!==null&&nt.delete(Et.key===null?mt:Et.key),x=u(Et,x,mt),At===null?ut=Et:At.sibling=Et,At=Et);return t&&nt.forEach(function(Qg){return e(E,Qg)}),xt&&cl(E,mt),ut}function Nt(E,x,M,L){if(typeof M=="object"&&M!==null&&M.type===V&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case D:t:{for(var ut=M.key;x!==null;){if(x.key===ut){if(ut=M.type,ut===V){if(x.tag===7){l(E,x.sibling),L=i(x,M.props.children),L.return=E,E=L;break t}}else if(x.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===K&&En(ut)===x.type){l(E,x.sibling),L=i(x,M.props),Qa(L,M),L.return=E,E=L;break t}l(E,x);break}else e(E,x);x=x.sibling}M.type===V?(L=bn(M.props.children,E.mode,L,M.key),L.return=E,E=L):(L=Ki(M.type,M.key,M.props,null,E.mode,L),Qa(L,M),L.return=E,E=L)}return r(E);case q:t:{for(ut=M.key;x!==null;){if(x.key===ut)if(x.tag===4&&x.stateNode.containerInfo===M.containerInfo&&x.stateNode.implementation===M.implementation){l(E,x.sibling),L=i(x,M.children||[]),L.return=E,E=L;break t}else{l(E,x);break}else e(E,x);x=x.sibling}L=Zc(M,E.mode,L),L.return=E,E=L}return r(E);case K:return M=En(M),Nt(E,x,M,L)}if(Z(M))return I(E,x,M,L);if(Dt(M)){if(ut=Dt(M),typeof ut!="function")throw Error(c(150));return M=ut.call(M),ct(E,x,M,L)}if(typeof M.then=="function")return Nt(E,x,tu(M),L);if(M.$$typeof===at)return Nt(E,x,Wi(E,M),L);eu(E,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,x!==null&&x.tag===6?(l(E,x.sibling),L=i(x,M),L.return=E,E=L):(l(E,x),L=qc(M,E.mode,L),L.return=E,E=L),r(E)):l(E,x)}return function(E,x,M,L){try{ka=0;var ut=Nt(E,x,M,L);return ta=null,ut}catch(nt){if(nt===Pn||nt===Ii)throw nt;var At=Te(29,nt,null,E.mode);return At.lanes=L,At.return=E,At}finally{}}}var zn=Ef(!0),Mf=Ef(!1),Dl=!1;function lo(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function no(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Ul(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Bl(t,e,l){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(Mt&2)!==0){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,e=Qi(t),of(t,null,l),e}return ki(t,n,e,l),Qi(t)}function Ka(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,gr(t,l)}}function ao(t,e){var l=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var i=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var r={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?i=u=r:u=u.next=r,l=l.next}while(l!==null);u===null?i=u=e:u=u.next=e}else i=u=e;l={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var io=!1;function Ja(){if(io){var t=In;if(t!==null)throw t}}function Fa(t,e,l,n){io=!1;var i=t.updateQueue;Dl=!1;var u=i.firstBaseUpdate,r=i.lastBaseUpdate,g=i.shared.pending;if(g!==null){i.shared.pending=null;var b=g,z=b.next;b.next=null,r===null?u=z:r.next=z,r=b;var R=t.alternate;R!==null&&(R=R.updateQueue,g=R.lastBaseUpdate,g!==r&&(g===null?R.firstBaseUpdate=z:g.next=z,R.lastBaseUpdate=b))}if(u!==null){var j=i.baseState;r=0,R=z=b=null,g=u;do{var w=g.lane&-536870913,N=w!==g.lane;if(N?(bt&w)===w:(n&w)===w){w!==0&&w===$n&&(io=!0),R!==null&&(R=R.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});t:{var I=t,ct=g;w=e;var Nt=l;switch(ct.tag){case 1:if(I=ct.payload,typeof I=="function"){j=I.call(Nt,j,w);break t}j=I;break t;case 3:I.flags=I.flags&-65537|128;case 0:if(I=ct.payload,w=typeof I=="function"?I.call(Nt,j,w):I,w==null)break t;j=C({},j,w);break t;case 2:Dl=!0}}w=g.callback,w!==null&&(t.flags|=64,N&&(t.flags|=8192),N=i.callbacks,N===null?i.callbacks=[w]:N.push(w))}else N={lane:w,tag:g.tag,payload:g.payload,callback:g.callback,next:null},R===null?(z=R=N,b=j):R=R.next=N,r|=w;if(g=g.next,g===null){if(g=i.shared.pending,g===null)break;N=g,g=N.next,N.next=null,i.lastBaseUpdate=N,i.shared.pending=null}}while(!0);R===null&&(b=j),i.baseState=b,i.firstBaseUpdate=z,i.lastBaseUpdate=R,u===null&&(i.shared.lanes=0),Yl|=r,t.lanes=r,t.memoizedState=j}}function zf(t,e){if(typeof t!="function")throw Error(c(191,t));t.call(e)}function Tf(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;tu?u:8;var r=A.T,g={};A.T=g,Mo(t,!1,e,l);try{var b=i(),z=A.S;if(z!==null&&z(g,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var R=U1(b,n);Ia(t,e,R,Oe(t))}else Ia(t,e,n,Oe(t))}catch(j){Ia(t,e,{then:function(){},status:"rejected",reason:j},Oe())}finally{O.p=u,r!==null&&g.types!==null&&(r.types=g.types),A.T=r}}function Y1(){}function Ao(t,e,l,n){if(t.tag!==5)throw Error(c(476));var i=id(t).queue;ad(t,i,e,H,l===null?Y1:function(){return ud(t),l(n)})}function id(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:H},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function ud(t){var e=id(t);e.next===null&&(e=t.alternate.memoizedState),Ia(t,e.next.queue,{},Oe())}function Eo(){return ce(gi)}function cd(){return Kt().memoizedState}function od(){return Kt().memoizedState}function X1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=Oe();t=Ul(l);var n=Bl(e,t,l);n!==null&&(be(n,e,l),Ka(n,e,l)),e={cache:Ic()},t.payload=e;return}e=e.return}}function q1(t,e,l){var n=Oe();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fu(t)?rd(e,l):(l=Yc(t,e,l,n),l!==null&&(be(l,t,n),fd(l,e,n)))}function sd(t,e,l){var n=Oe();Ia(t,e,l,n)}function Ia(t,e,l,n){var i={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(fu(t))rd(e,i);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var r=e.lastRenderedState,g=u(r,l);if(i.hasEagerState=!0,i.eagerState=g,ze(g,r))return ki(t,e,i,0),Rt===null&&Zi(),!1}catch{}finally{}if(l=Yc(t,e,i,n),l!==null)return be(l,t,n),fd(l,e,n),!0}return!1}function Mo(t,e,l,n){if(n={lane:2,revertLane:ns(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fu(t)){if(e)throw Error(c(479))}else e=Yc(t,l,n,2),e!==null&&be(e,t,2)}function fu(t){var e=t.alternate;return t===dt||e!==null&&e===dt}function rd(t,e){la=au=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function fd(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,gr(t,l)}}var Pa={readContext:ce,use:cu,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt};Pa.useEffectEvent=qt;var dd={readContext:ce,use:cu,useCallback:function(t,e){return de().memoizedState=[t,e===void 0?null:e],t},useContext:ce,useEffect:Ff,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,su(4194308,4,Pf.bind(null,e,t),l)},useLayoutEffect:function(t,e){return su(4194308,4,t,e)},useInsertionEffect:function(t,e){su(4,2,t,e)},useMemo:function(t,e){var l=de();e=e===void 0?null:e;var n=t();if(Tn){Tl(!0);try{t()}finally{Tl(!1)}}return l.memoizedState=[n,e],n},useReducer:function(t,e,l){var n=de();if(l!==void 0){var i=l(e);if(Tn){Tl(!0);try{l(e)}finally{Tl(!1)}}}else i=e;return n.memoizedState=n.baseState=i,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:i},n.queue=t,t=t.dispatch=q1.bind(null,dt,t),[n.memoizedState,t]},useRef:function(t){var e=de();return t={current:t},e.memoizedState=t},useState:function(t){t=vo(t);var e=t.queue,l=sd.bind(null,dt,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:xo,useDeferredValue:function(t,e){var l=de();return Co(l,t,e)},useTransition:function(){var t=vo(!1);return t=ad.bind(null,dt,t.queue,!0,!1),de().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var n=dt,i=de();if(xt){if(l===void 0)throw Error(c(407));l=l()}else{if(l=e(),Rt===null)throw Error(c(349));(bt&127)!==0||Rf(n,e,l)}i.memoizedState=l;var u={value:l,getSnapshot:e};return i.queue=u,Ff(Uf.bind(null,n,u,t),[t]),n.flags|=2048,aa(9,{destroy:void 0},Df.bind(null,n,u,l,e),null),l},useId:function(){var t=de(),e=Rt.identifierPrefix;if(xt){var l=tl,n=Pe;l=(n&~(1<<32-Me(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=iu++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof n.is=="string"?r.createElement("select",{is:n.is}):r.createElement("select"),n.multiple?u.multiple=!0:n.size&&(u.size=n.size);break;default:u=typeof n.is=="string"?r.createElement(i,{is:n.is}):r.createElement(i)}}u[ie]=e,u[he]=n;t:for(r=e.child;r!==null;){if(r.tag===5||r.tag===6)u.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break t;for(;r.sibling===null;){if(r.return===null||r.return===e)break t;r=r.return}r.sibling.return=r.return,r=r.sibling}e.stateNode=u;t:switch(se(u,i,n),i){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}n&&hl(e)}}return jt(e),Go(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&hl(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(c(166));if(t=rt.current,Fn(e)){if(t=e.stateNode,l=e.memoizedProps,n=null,i=ue,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}t[ie]=e,t=!!(t.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||Nh(t.nodeValue,l)),t||Ol(e,!0)}else t=Nu(t).createTextNode(n),t[ie]=e,e.stateNode=t}return jt(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(n=Fn(e),l!==null){if(t===null){if(!n)throw Error(c(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(557));t[ie]=e}else Sn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;jt(e),t=!1}else l=Jc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(_e(e),e):(_e(e),null);if((e.flags&128)!==0)throw Error(c(558))}return jt(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(i=Fn(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error(c(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(c(317));i[ie]=e}else Sn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;jt(e),i=!1}else i=Jc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),i=!0;if(!i)return e.flags&256?(_e(e),e):(_e(e),null)}return _e(e),(e.flags&128)!==0?(e.lanes=l,e):(l=n!==null,t=t!==null&&t.memoizedState!==null,l&&(n=e.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==i&&(n.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),yu(e,e.updateQueue),jt(e),null);case 4:return Bt(),t===null&&cs(e.stateNode.containerInfo),jt(e),null;case 10:return sl(e.type),jt(e),null;case 19:if(B(Qt),n=e.memoizedState,n===null)return jt(e),null;if(i=(e.flags&128)!==0,u=n.rendering,u===null)if(i)ei(n,!1);else{if(Zt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=nu(t),u!==null){for(e.flags|=128,ei(n,!1),t=u.updateQueue,e.updateQueue=t,yu(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)sf(l,t),l=l.sibling;return Y(Qt,Qt.current&1|2),xt&&cl(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&Ae()>xu&&(e.flags|=128,i=!0,ei(n,!1),e.lanes=4194304)}else{if(!i)if(t=nu(u),t!==null){if(e.flags|=128,i=!0,t=t.updateQueue,e.updateQueue=t,yu(e,t),ei(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!xt)return jt(e),null}else 2*Ae()-n.renderingStartTime>xu&&l!==536870912&&(e.flags|=128,i=!0,ei(n,!1),e.lanes=4194304);n.isBackwards?(u.sibling=e.child,e.child=u):(t=n.last,t!==null?t.sibling=u:e.child=u,n.last=u)}return n.tail!==null?(t=n.tail,n.rendering=t,n.tail=t.sibling,n.renderingStartTime=Ae(),t.sibling=null,l=Qt.current,Y(Qt,i?l&1|2:l&1),xt&&cl(e,n.treeForkCount),t):(jt(e),null);case 22:case 23:return _e(e),co(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(l&536870912)!==0&&(e.flags&128)===0&&(jt(e),e.subtreeFlags&6&&(e.flags|=8192)):jt(e),l=e.updateQueue,l!==null&&yu(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==l&&(e.flags|=2048),t!==null&&B(An),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),sl(Ft),jt(e),null;case 25:return null;case 30:return null}throw Error(c(156,e.tag))}function J1(t,e){switch(Qc(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return sl(Ft),Bt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Ml(e),null;case 31:if(e.memoizedState!==null){if(_e(e),e.alternate===null)throw Error(c(340));Sn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(_e(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(c(340));Sn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return B(Qt),null;case 4:return Bt(),null;case 10:return sl(e.type),null;case 22:case 23:return _e(e),co(),t!==null&&B(An),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return sl(Ft),null;case 25:return null;default:return null}}function Bd(t,e){switch(Qc(e),e.tag){case 3:sl(Ft),Bt();break;case 26:case 27:case 5:Ml(e);break;case 4:Bt();break;case 31:e.memoizedState!==null&&_e(e);break;case 13:_e(e);break;case 19:B(Qt);break;case 10:sl(e.type);break;case 22:case 23:_e(e),co(),t!==null&&B(An);break;case 24:sl(Ft)}}function li(t,e){try{var l=e.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var i=n.next;l=i;do{if((l.tag&t)===t){n=void 0;var u=l.create,r=l.inst;n=u(),r.destroy=n}l=l.next}while(l!==i)}}catch(g){wt(e,e.return,g)}}function Gl(t,e,l){try{var n=e.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var u=i.next;n=u;do{if((n.tag&t)===t){var r=n.inst,g=r.destroy;if(g!==void 0){r.destroy=void 0,i=e;var b=l,z=g;try{z()}catch(R){wt(i,b,R)}}}n=n.next}while(n!==u)}}catch(R){wt(e,e.return,R)}}function Ld(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{Tf(e,l)}catch(n){wt(t,t.return,n)}}}function jd(t,e,l){l.props=wn(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){wt(t,e,n)}}function ni(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var n=t.stateNode;break;case 30:n=t.stateNode;break;default:n=t.stateNode}typeof l=="function"?t.refCleanup=l(n):l.current=n}}catch(i){wt(t,e,i)}}function el(t,e){var l=t.ref,n=t.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(i){wt(t,e,i)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(i){wt(t,e,i)}else l.current=null}function Gd(t){var e=t.type,l=t.memoizedProps,n=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break t;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(i){wt(t,t.return,i)}}function Vo(t,e,l){try{var n=t.stateNode;yg(n,t.type,l,e),n[he]=e}catch(i){wt(t,t.return,i)}}function Vd(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ql(t.type)||t.tag===4}function Yo(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Vd(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ql(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Xo(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=al));else if(n!==4&&(n===27&&Ql(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(Xo(t,e,l),t=t.sibling;t!==null;)Xo(t,e,l),t=t.sibling}function pu(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(n!==4&&(n===27&&Ql(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(pu(t,e,l),t=t.sibling;t!==null;)pu(t,e,l),t=t.sibling}function Yd(t){var e=t.stateNode,l=t.memoizedProps;try{for(var n=t.type,i=e.attributes;i.length;)e.removeAttributeNode(i[0]);se(e,n,l),e[ie]=t,e[he]=l}catch(u){wt(t,t.return,u)}}var ml=!1,It=!1,qo=!1,Xd=typeof WeakSet=="function"?WeakSet:Set,ae=null;function F1(t,e){if(t=t.containerInfo,rs=ju,t=Pr(t),Uc(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var i=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break t}var r=0,g=-1,b=-1,z=0,R=0,j=t,w=null;e:for(;;){for(var N;j!==l||i!==0&&j.nodeType!==3||(g=r+i),j!==u||n!==0&&j.nodeType!==3||(b=r+n),j.nodeType===3&&(r+=j.nodeValue.length),(N=j.firstChild)!==null;)w=j,j=N;for(;;){if(j===t)break e;if(w===l&&++z===i&&(g=r),w===u&&++R===n&&(b=r),(N=j.nextSibling)!==null)break;j=w,w=j.parentNode}j=N}l=g===-1||b===-1?null:{start:g,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(fs={focusedElem:t,selectionRange:l},ju=!1,ae=e;ae!==null;)if(e=ae,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ae=t;else for(;ae!==null;){switch(e=ae,u=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l title"))),se(u,n,l),u[ie]=t,ne(u),n=u;break t;case"link":var r=Jh("link","href",i).get(n+(l.href||""));if(r){for(var g=0;gNt&&(r=Nt,Nt=ct,ct=r);var E=$r(g,ct),x=$r(g,Nt);if(E&&x&&(N.rangeCount!==1||N.anchorNode!==E.node||N.anchorOffset!==E.offset||N.focusNode!==x.node||N.focusOffset!==x.offset)){var M=j.createRange();M.setStart(E.node,E.offset),N.removeAllRanges(),ct>Nt?(N.addRange(M),N.extend(x.node,x.offset)):(M.setEnd(x.node,x.offset),N.addRange(M))}}}}for(j=[],N=g;N=N.parentNode;)N.nodeType===1&&j.push({element:N,left:N.scrollLeft,top:N.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;gl?32:l,A.T=null,l=Wo,Wo=null;var u=ql,r=bl;if(te=0,sa=ql=null,bl=0,(Mt&6)!==0)throw Error(c(331));var g=Mt;if(Mt|=4,Pd(u.current),Wd(u,u.current,r,l),Mt=g,si(0,!1),Ee&&typeof Ee.onPostCommitFiberRoot=="function")try{Ee.onPostCommitFiberRoot(Ta,u)}catch{}return!0}finally{O.p=i,A.T=n,ph(t,e)}}function bh(t,e,l){e=je(l,e),e=_o(t.stateNode,e,2),t=Bl(t,e,2),t!==null&&(_a(t,2),ll(t))}function wt(t,e,l){if(t.tag===3)bh(t,t,l);else for(;e!==null;){if(e.tag===3){bh(e,t,l);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Xl===null||!Xl.has(n))){t=je(l,t),l=Sd(2),n=Bl(e,l,2),n!==null&&(xd(l,n,e,t),_a(n,2),ll(n));break}}e=e.return}}function ts(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new I1;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(l)||(Qo=!0,i.add(l),t=ng.bind(null,t,e,l),e.then(t,t))}function ng(t,e,l){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Rt===t&&(bt&l)===l&&(Zt===4||Zt===3&&(bt&62914560)===bt&&300>Ae()-Su?(Mt&2)===0&&ra(t,0):Ko|=l,oa===bt&&(oa=0)),ll(t)}function Sh(t,e){e===0&&(e=hr()),t=vn(t,e),t!==null&&(_a(t,e),ll(t))}function ag(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),Sh(t,l)}function ig(t,e){var l=0;switch(t.tag){case 31:case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(l=i.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(e),Sh(t,l)}function ug(t,e){return dc(t,e)}var Tu=null,da=null,es=!1,wu=!1,ls=!1,kl=0;function ll(t){t!==da&&t.next===null&&(da===null?Tu=da=t:da=da.next=t),wu=!0,es||(es=!0,og())}function si(t,e){if(!ls&&wu){ls=!0;do for(var l=!1,n=Tu;n!==null;){if(t!==0){var i=n.pendingLanes;if(i===0)var u=0;else{var r=n.suspendedLanes,g=n.pingedLanes;u=(1<<31-Me(42|t)+1)-1,u&=i&~(r&~g),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,Eh(n,u))}else u=bt,u=Oi(n,n===Rt?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||wa(n,u)||(l=!0,Eh(n,u));n=n.next}while(l);ls=!1}}function cg(){xh()}function xh(){wu=es=!1;var t=0;kl!==0&&vg()&&(t=kl);for(var e=Ae(),l=null,n=Tu;n!==null;){var i=n.next,u=Ch(n,e);u===0?(n.next=null,l===null?Tu=i:l.next=i,i===null&&(da=l)):(l=n,(t!==0||(u&3)!==0)&&(wu=!0)),n=i}te!==0&&te!==5||si(t),kl!==0&&(kl=0)}function Ch(t,e){for(var l=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,u=t.pendingLanes&-62914561;0g)break;var R=b.transferSize,j=b.initiatorType;R&&Oh(j)&&(b=b.responseEnd,r+=R*(b"u"?null:document;function Zh(t,e,l){var n=ha;if(n&&typeof e=="string"&&e){var i=Be(e);i='link[rel="'+t+'"][href="'+i+'"]',typeof l=="string"&&(i+='[crossorigin="'+l+'"]'),qh.has(i)||(qh.add(i),t={rel:t,crossOrigin:l,href:e},n.querySelector(i)===null&&(e=n.createElement("link"),se(e,"link",t),ne(e),n.head.appendChild(e)))}}function Tg(t){Sl.D(t),Zh("dns-prefetch",t,null)}function wg(t,e){Sl.C(t,e),Zh("preconnect",t,e)}function _g(t,e,l){Sl.L(t,e,l);var n=ha;if(n&&t&&e){var i='link[rel="preload"][as="'+Be(e)+'"]';e==="image"&&l&&l.imageSrcSet?(i+='[imagesrcset="'+Be(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(i+='[imagesizes="'+Be(l.imageSizes)+'"]')):i+='[href="'+Be(t)+'"]';var u=i;switch(e){case"style":u=ma(t);break;case"script":u=ga(t)}Ze.has(u)||(t=C({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Ze.set(u,t),n.querySelector(i)!==null||e==="style"&&n.querySelector(hi(u))||e==="script"&&n.querySelector(mi(u))||(e=n.createElement("link"),se(e,"link",t),ne(e),n.head.appendChild(e)))}}function Hg(t,e){Sl.m(t,e);var l=ha;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",i='link[rel="modulepreload"][as="'+Be(n)+'"][href="'+Be(t)+'"]',u=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=ga(t)}if(!Ze.has(u)&&(t=C({rel:"modulepreload",href:t},e),Ze.set(u,t),l.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(mi(u)))return}n=l.createElement("link"),se(n,"link",t),ne(n),l.head.appendChild(n)}}}function Ng(t,e,l){Sl.S(t,e,l);var n=ha;if(n&&t){var i=Bn(n).hoistableStyles,u=ma(t);e=e||"default";var r=i.get(u);if(!r){var g={loading:0,preload:null};if(r=n.querySelector(hi(u)))g.loading=5;else{t=C({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Ze.get(u))&&vs(t,l);var b=r=n.createElement("link");ne(b),se(b,"link",t),b._p=new Promise(function(z,R){b.onload=z,b.onerror=R}),b.addEventListener("load",function(){g.loading|=1}),b.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Ru(r,e,n)}r={type:"stylesheet",instance:r,count:1,state:g},i.set(u,r)}}}function Og(t,e){Sl.X(t,e);var l=ha;if(l&&t){var n=Bn(l).hoistableScripts,i=ga(t),u=n.get(i);u||(u=l.querySelector(mi(i)),u||(t=C({src:t,async:!0},e),(e=Ze.get(i))&&bs(t,e),u=l.createElement("script"),ne(u),se(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(i,u))}}function Rg(t,e){Sl.M(t,e);var l=ha;if(l&&t){var n=Bn(l).hoistableScripts,i=ga(t),u=n.get(i);u||(u=l.querySelector(mi(i)),u||(t=C({src:t,async:!0,type:"module"},e),(e=Ze.get(i))&&bs(t,e),u=l.createElement("script"),ne(u),se(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(i,u))}}function kh(t,e,l,n){var i=(i=rt.current)?Ou(i):null;if(!i)throw Error(c(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=ma(l.href),l=Bn(i).hoistableStyles,n=l.get(e),n||(n={type:"style",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=ma(l.href);var u=Bn(i).hoistableStyles,r=u.get(t);if(r||(i=i.ownerDocument||i,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,r),(u=i.querySelector(hi(t)))&&!u._p&&(r.instance=u,r.state.loading=5),Ze.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ze.set(t,l),u||Dg(i,t,l,r.state))),e&&n===null)throw Error(c(528,""));return r}if(e&&n!==null)throw Error(c(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=ga(l),l=Bn(i).hoistableScripts,n=l.get(e),n||(n={type:"script",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,t))}}function ma(t){return'href="'+Be(t)+'"'}function hi(t){return'link[rel="stylesheet"]['+t+"]"}function Qh(t){return C({},t,{"data-precedence":t.precedence,precedence:null})}function Dg(t,e,l,n){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?n.loading=1:(e=t.createElement("link"),n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2}),se(e,"link",l),ne(e),t.head.appendChild(e))}function ga(t){return'[src="'+Be(t)+'"]'}function mi(t){return"script[async]"+t}function Kh(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+Be(l.href)+'"]');if(n)return e.instance=n,ne(n),n;var i=C({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),ne(n),se(n,"style",i),Ru(n,l.precedence,t),e.instance=n;case"stylesheet":i=ma(l.href);var u=t.querySelector(hi(i));if(u)return e.state.loading|=4,e.instance=u,ne(u),u;n=Qh(l),(i=Ze.get(i))&&vs(n,i),u=(t.ownerDocument||t).createElement("link"),ne(u);var r=u;return r._p=new Promise(function(g,b){r.onload=g,r.onerror=b}),se(u,"link",n),e.state.loading|=4,Ru(u,l.precedence,t),e.instance=u;case"script":return u=ga(l.src),(i=t.querySelector(mi(u)))?(e.instance=i,ne(i),i):(n=l,(i=Ze.get(u))&&(n=C({},l),bs(n,i)),t=t.ownerDocument||t,i=t.createElement("script"),ne(i),se(i,"link",n),t.head.appendChild(i),e.instance=i);case"void":return null;default:throw Error(c(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,Ru(n,l.precedence,t));return e.instance}function Ru(t,e,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,u=i,r=0;r title"):null)}function Ug(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Wh(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Bg(t,e,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var i=ma(n.href),u=e.querySelector(hi(i));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Uu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=u,ne(u);return}u=e.ownerDocument||e,n=Qh(n),(i=Ze.get(i))&&vs(n,i),u=u.createElement("link"),ne(u);var r=u;r._p=new Promise(function(g,b){r.onload=g,r.onerror=b}),se(u,"link",n),l.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Uu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var Ss=0;function Lg(t,e){return t.stylesheets&&t.count===0&&Lu(t,t.stylesheets),0Ss?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function Uu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Bu=null;function Lu(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Bu=new Map,e.forEach(jg,t),Bu=null,Uu.call(t))}function jg(t,e){if(!(e.state.loading&4)){var l=Bu.get(t);if(l)var n=l.get(null);else{l=new Map,Bu.set(t,l);for(var i=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(o){console.error(o)}}return a(),_s.exports=ly(),_s.exports}var ay=ny();const iy=Y0(ay);function uy(){return window.LiteGraph??null}function Qs(){return uy()?.LGraphCanvas?.active_canvas??null}function cy(){const a=Qs();if(a?.graph)return{canvas:a,graph:a.graph};const s=document.querySelector(".litegraph.litegraph-canvas")?.lgraphcanvas;return s?.graph?{canvas:s,graph:s.graph}:null}function Ce(){const a=Qs();if(a?.graph)return{canvas:a,graph:a.graph};const o=Iu;if(o?.canvas&&o?.graph)return o;const c=window.app;return c?.canvas&&c?.graph?c:cy()}function on(a){try{a?.graph?.setDirtyCanvas?.(!0,!0)}catch(o){console.warn("Failed to set dirty canvas",o)}}function X0(a,o){const s=a?.canvas??Qs(),d=s?.repositionNodesVueMode;if(typeof d!="function")return;const h=(o||[]).filter(f=>!!f).filter(f=>{const y=f.pos;return f.id!=null&&(Array.isArray(y)||ArrayBuffer.isView(y))&&y.length>=2}).map(f=>{const y=f.pos;return{node:f,newPos:{x:y[0]??0,y:y[1]??0}}});h.length&&d.call(s,h)}function oy(){return window.app??null}function sy(){return Iu??null}function ry(a){return!!a&&typeof a=="object"&&"then"in a&&typeof a.then=="function"}function De(a){const o=[sy(),oy(),Ce()];for(const s of o){if(!s)continue;const c=s.ui?.settings?.getSettingValue?.(a);if(typeof c<"u")return c;const d=s.ui?.settings?.settingsValues;if(d&&a in d)return d[a];const h=s.extensionManager?.setting?.get?.(a);if(typeof h<"u"&&!ry(h))return h}}const Ks=50,Js=20,q0={horizontal:"comfyuiAlign.nodeHorizontalSpacing",vertical:"comfyuiAlign.nodeVerticalSpacing"};function Pu(a,o){if(typeof a=="number"&&!Number.isNaN(a))return a;if(typeof a=="string"){const s=Number(a);if(!Number.isNaN(s))return s}return o}let Ls=Ks,js=Js;function Z0(a){Ls=Pu(a,Ks)}function k0(a){js=Pu(a,Js)}function fy(){try{const a=De(q0.horizontal);typeof a<"u"&&(Ls=Pu(a,Ks))}catch{}return Ls}function dy(){try{const a=De(q0.vertical);typeof a<"u"&&(js=Pu(a,Js))}catch{}return js}const Fs=10,Ws=10,x0=8,C0=8,tc={horizontal:"comfyuiAlign.groupHorizontalSpacing",vertical:"comfyuiAlign.groupVerticalSpacing",safetyHorizontal:"comfyuiAlign.groupSafetyMarginHorizontal",safetyVertical:"comfyuiAlign.groupSafetyMarginVertical"};function xa(a,o){if(typeof a=="number"&&!Number.isNaN(a))return a;if(typeof a=="string"){const s=Number(a);if(!Number.isNaN(s))return s}return o}let Gs=Fs,Vs=Ws;function Q0(a){Gs=xa(a,Fs)}function K0(a){Vs=xa(a,Ws)}function hy(){try{const a=De(tc.horizontal);typeof a<"u"&&(Gs=xa(a,Fs))}catch{}return Gs}function my(){try{const a=De(tc.vertical);typeof a<"u"&&(Vs=xa(a,Ws))}catch{}return Vs}function ec(){try{const a=De(tc.safetyHorizontal);return xa(a,x0)}catch{return x0}}function lc(){try{const a=De(tc.safetyVertical);return xa(a,C0)}catch{return C0}}const A0=a=>{let o;const s=new Set,c=(m,v)=>{const C=typeof m=="function"?m(o):m;if(!Object.is(C,o)){const _=o;o=v??(typeof C!="object"||C===null)?C:Object.assign({},o,C),s.forEach(D=>D(o,_))}},d=()=>o,y={setState:c,getState:d,getInitialState:()=>p,subscribe:m=>(s.add(m),()=>s.delete(m))},p=o=a(c,d,y);return y},gy=(a=>a?A0(a):A0),yy=a=>a;function py(a,o=yy){const s=$e.useSyncExternalStore(a.subscribe,$e.useCallback(()=>o(a.getState()),[a,o]),$e.useCallback(()=>o(a.getInitialState()),[a,o]));return $e.useDebugValue(s),s}const E0=a=>{const o=gy(a),s=c=>py(o,c);return Object.assign(s,o),s},J0=(a=>a?E0(a):E0),F0=300,W0=32,vy=F0+W0*2,$0=F0+W0*2,by=40,Sy=8,xy=vy,Cy=$0+Sy+by,an=J0((a,o)=>({isOpen:!1,position:{x:0,y:0},mouse:{x:0,y:0},panelWidth:xy,panelHeight:Cy,shortcutKeyHeld:!1,positionLocked:!1,hoveredIcon:null,hoveredColorBarIndex:null,setMouse:(s,c)=>a({mouse:{x:s,y:c}}),openAtMouse:()=>{const{mouse:s,panelWidth:c,panelHeight:d}=o(),h=window.innerWidth||document.documentElement.clientWidth,f=window.innerHeight||document.documentElement.clientHeight,y={x:s.x-c/2,y:s.y-$0/2},p={x:Math.max(0,Math.min(y.x,h-c)),y:Math.max(0,Math.min(y.y,f-d))};a({isOpen:!0,position:p})},close:()=>a({isOpen:!1}),toggleAtMouse:()=>{const{isOpen:s}=o();if(s){a({isOpen:!1});return}o().openAtMouse()},setPosition:s=>a({position:s}),setShortcutKeyHeld:s=>a({shortcutKeyHeld:s}),setPositionLocked:s=>a({positionLocked:s}),setHoveredIcon:s=>a({hoveredIcon:s}),setHoveredColorBarIndex:s=>a({hoveredColorBarIndex:s})})),Ay=$e.lazy(()=>Bs(()=>Promise.resolve().then(()=>_v),void 0)),M0="comfyui-align-overlay",Ey=1e4,My=50,ke={nodeHorizontalSpacing:"comfyuiAlign.nodeHorizontalSpacing",nodeVerticalSpacing:"comfyuiAlign.nodeVerticalSpacing",groupHorizontalSpacing:"comfyuiAlign.groupHorizontalSpacing",groupVerticalSpacing:"comfyuiAlign.groupVerticalSpacing",applyColorHeaderOnly:"comfyuiAlign.applyColorHeaderOnly",shortcutHoldMode:"comfyuiAlign.shortcutHoldMode"};let z0=!1;function zy(){return G.jsx(Ay,{})}function Ty(){return document.readyState!=="loading"?Promise.resolve():new Promise(a=>{document.addEventListener("DOMContentLoaded",()=>a(),{once:!0})})}function T0(a){const o=a?.ui?.settings;return o?typeof o.getSettingValue=="function"||typeof o.settingsValues=="object":!1}function w0(){return window.app??Iu}function wy(){return T0(w0())?Promise.resolve(!0):new Promise(a=>{const o=Date.now(),s=window.setInterval(()=>{if(T0(w0())){window.clearInterval(s),a(!0);return}Date.now()-o>=Ey&&(window.clearInterval(s),console.warn("ComfyUI Align settings API was not ready before timeout; continuing with fallback values."),a(!1))},My)})}function _y(){Z0(De(ke.nodeHorizontalSpacing)),k0(De(ke.nodeVerticalSpacing)),Q0(De(ke.groupHorizontalSpacing)),K0(De(ke.groupVerticalSpacing))}function Hy(){if(document.getElementById(M0))return;const o=document.createElement("div");o.id=M0,o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.right="0",o.style.bottom="0",o.style.zIndex="9999",o.style.pointerEvents="none",o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="center",document.body.appendChild(o),iy.createRoot(o).render(G.jsx($e.StrictMode,{children:G.jsx(T.Suspense,{fallback:G.jsx("div",{children:"Loading..."}),children:G.jsx(zy,{})})}))}function Ny(){if(z0)return;const a=o=>{if(!!!De(ke.shortcutHoldMode))return;const c=an.getState();if(!c.shortcutKeyHeld)return;o.preventDefault(),o.stopPropagation();const{hoveredIcon:d,hoveredColorBarIndex:h}=c,f=()=>{c.close(),c.setShortcutKeyHeld(!1),c.setHoveredIcon(null),c.setHoveredColorBarIndex(null),c.setPositionLocked(!1)};if(d){Bs(async()=>{const{executeIconAction:y}=await Promise.resolve().then(()=>G2);return{executeIconAction:y}},void 0).then(({executeIconAction:y})=>{y(d),f()}).catch(y=>{console.error("Error executing hovered icon action:",y),f()});return}if(h!=null){Bs(async()=>{const{executeColorBarAction:y}=await Promise.resolve().then(()=>Nv);return{executeColorBarAction:y}},void 0).then(({executeColorBarAction:y})=>{y(h),f()}).catch(y=>{console.error("Error executing hovered ColorBar action:",y),f()});return}f()};window.addEventListener("keyup",a,!0),z0=!0}Iu.registerExtension({name:"Comfy.Align",settings:[{id:ke.nodeHorizontalSpacing,name:"Node horizontal spacing",type:"number",defaultValue:50,category:["Align","Spacing","Node horizontal spacing"],attrs:{showButtons:!0,min:0},onChange:(a,o)=>{Z0(a),console.log("Align setting changed: horizontal",{newVal:a,oldVal:o})}},{id:ke.nodeVerticalSpacing,name:"Node vertical spacing",type:"number",defaultValue:20,category:["Align","Spacing","Node vertical spacing"],attrs:{showButtons:!0,min:0},onChange:(a,o)=>{k0(a),console.log("Align setting changed: vertical",{newVal:a,oldVal:o})}},{id:ke.groupHorizontalSpacing,name:"Group horizontal spacing",type:"number",defaultValue:10,category:["Align","Spacing","Group horizontal spacing"],attrs:{showButtons:!0,min:0},onChange:(a,o)=>{Q0(a),console.log("Align setting changed: group horizontal",{newVal:a,oldVal:o})}},{id:ke.groupVerticalSpacing,name:"Group vertical spacing",type:"number",defaultValue:10,category:["Align","Spacing","Group vertical spacing"],attrs:{showButtons:!0,min:0},onChange:(a,o)=>{K0(a),console.log("Align setting changed: group vertical",{newVal:a,oldVal:o})}},{id:ke.applyColorHeaderOnly,name:"Apply Color to Header Only",type:"boolean",defaultValue:!0,category:["Align","Color","Apply Color to Header Only"],onChange:(a,o)=>{console.log("Align setting changed: Apply Color to Header Only",{newVal:a,oldVal:o})}},{id:ke.shortcutHoldMode,name:"Hold Mode",type:"boolean",defaultValue:!1,category:["Align","Shortcut","Hold Mode"],tooltip:"ON: Hold the shortcut key to display the Align panel, and hover the mouse over a button before releasing the shortcut key. Alternatively, you can hold the shortcut key and click a button multiple times to perform multiple operations.",onChange:(a,o)=>{console.log("Align setting changed: Hold Mode",{newVal:a,oldVal:o})}}],commands:[{id:"comfyuiAlign.toggleAlignPanel",label:"Align Panel",function:()=>{const a=!!De(ke.shortcutHoldMode),o=an.getState();if(a){if(o.shortcutKeyHeld){o.setPositionLocked(!0);return}o.openAtMouse(),o.setShortcutKeyHeld(!0),o.setPositionLocked(!0);return}o.toggleAtMouse()}}],keybindings:[{combo:{key:"`"},commandId:"comfyuiAlign.toggleAlignPanel"}],async setup(){await Ty(),Hy(),Ny(),await wy(),_y(),console.log("ComfyUI Align Extension setup complete")}});function I0(a){var o,s,c="";if(typeof a=="string"||typeof a=="number")c+=a;else if(typeof a=="object")if(Array.isArray(a)){var d=a.length;for(o=0;o{const o=Uy(a),{conflictingClassGroups:s,conflictingClassGroupModifiers:c}=a;return{getClassGroupId:f=>{const y=f.split($s);return y[0]===""&&y.length!==1&&y.shift(),P0(y,o)||Dy(f)},getConflictingClassGroupIds:(f,y)=>{const p=s[f]||[];return y&&c[f]?[...p,...c[f]]:p}}},P0=(a,o)=>{if(a.length===0)return o.classGroupId;const s=a[0],c=o.nextPart.get(s),d=c?P0(a.slice(1),c):void 0;if(d)return d;if(o.validators.length===0)return;const h=a.join($s);return o.validators.find(({validator:f})=>f(h))?.classGroupId},_0=/^\[(.+)\]$/,Dy=a=>{if(_0.test(a)){const o=_0.exec(a)[1],s=o?.substring(0,o.indexOf(":"));if(s)return"arbitrary.."+s}},Uy=a=>{const{theme:o,classGroups:s}=a,c={nextPart:new Map,validators:[]};for(const d in s)Ys(s[d],c,d,o);return c},Ys=(a,o,s,c)=>{a.forEach(d=>{if(typeof d=="string"){const h=d===""?o:H0(o,d);h.classGroupId=s;return}if(typeof d=="function"){if(By(d)){Ys(d(c),o,s,c);return}o.validators.push({validator:d,classGroupId:s});return}Object.entries(d).forEach(([h,f])=>{Ys(f,H0(o,h),s,c)})})},H0=(a,o)=>{let s=a;return o.split($s).forEach(c=>{s.nextPart.has(c)||s.nextPart.set(c,{nextPart:new Map,validators:[]}),s=s.nextPart.get(c)}),s},By=a=>a.isThemeGetter,Ly=a=>{if(a<1)return{get:()=>{},set:()=>{}};let o=0,s=new Map,c=new Map;const d=(h,f)=>{s.set(h,f),o++,o>a&&(o=0,c=s,s=new Map)};return{get(h){let f=s.get(h);if(f!==void 0)return f;if((f=c.get(h))!==void 0)return d(h,f),f},set(h,f){s.has(h)?s.set(h,f):d(h,f)}}},Xs="!",qs=":",jy=qs.length,Gy=a=>{const{prefix:o,experimentalParseClassName:s}=a;let c=d=>{const h=[];let f=0,y=0,p=0,m;for(let q=0;qp?m-p:void 0;return{modifiers:h,hasImportantModifier:_,baseClassName:C,maybePostfixModifierPosition:D}};if(o){const d=o+qs,h=c;c=f=>f.startsWith(d)?h(f.substring(d.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(s){const d=c;c=h=>s({className:h,parseClassName:d})}return c},Vy=a=>a.endsWith(Xs)?a.substring(0,a.length-1):a.startsWith(Xs)?a.substring(1):a,Yy=a=>{const o=Object.fromEntries(a.orderSensitiveModifiers.map(c=>[c,!0]));return c=>{if(c.length<=1)return c;const d=[];let h=[];return c.forEach(f=>{f[0]==="["||o[f]?(d.push(...h.sort(),f),h=[]):h.push(f)}),d.push(...h.sort()),d}},Xy=a=>({cache:Ly(a.cacheSize),parseClassName:Gy(a),sortModifiers:Yy(a),...Ry(a)}),qy=/\s+/,Zy=(a,o)=>{const{parseClassName:s,getClassGroupId:c,getConflictingClassGroupIds:d,sortModifiers:h}=o,f=[],y=a.trim().split(qy);let p="";for(let m=y.length-1;m>=0;m-=1){const v=y[m],{isExternal:C,modifiers:_,hasImportantModifier:D,baseClassName:q,maybePostfixModifierPosition:V}=s(v);if(C){p=v+(p.length>0?" "+p:p);continue}let F=!!V,U=c(F?q.substring(0,V):q);if(!U){if(!F){p=v+(p.length>0?" "+p:p);continue}if(U=c(q),!U){p=v+(p.length>0?" "+p:p);continue}F=!1}const W=h(_).join(":"),at=D?W+Xs:W,st=at+U;if(f.includes(st))continue;f.push(st);const J=d(U,F);for(let lt=0;lt0?" "+p:p)}return p};function ky(){let a=0,o,s,c="";for(;a{if(typeof a=="string")return a;let o,s="";for(let c=0;cC(v),a());return s=Xy(m),c=s.cache.get,d=s.cache.set,h=y,y(p)}function y(p){const m=c(p);if(m)return m;const v=Zy(p,s);return d(p,v),v}return function(){return h(ky.apply(null,arguments))}}const ee=a=>{const o=s=>s[a]||[];return o.isThemeGetter=!0,o},em=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lm=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ky=/^\d+\/\d+$/,Jy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Wy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$y=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Iy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pa=a=>Ky.test(a),yt=a=>!!a&&!Number.isNaN(Number(a)),Il=a=>!!a&&Number.isInteger(Number(a)),Rs=a=>a.endsWith("%")&&yt(a.slice(0,-1)),xl=a=>Jy.test(a),Py=()=>!0,tp=a=>Fy.test(a)&&!Wy.test(a),nm=()=>!1,ep=a=>$y.test(a),lp=a=>Iy.test(a),np=a=>!P(a)&&!tt(a),ap=a=>Ca(a,um,nm),P=a=>em.test(a),Nn=a=>Ca(a,cm,tp),Ds=a=>Ca(a,sp,yt),N0=a=>Ca(a,am,nm),ip=a=>Ca(a,im,lp),ku=a=>Ca(a,om,ep),tt=a=>lm.test(a),xi=a=>Aa(a,cm),up=a=>Aa(a,rp),O0=a=>Aa(a,am),cp=a=>Aa(a,um),op=a=>Aa(a,im),Qu=a=>Aa(a,om,!0),Ca=(a,o,s)=>{const c=em.exec(a);return c?c[1]?o(c[1]):s(c[2]):!1},Aa=(a,o,s=!1)=>{const c=lm.exec(a);return c?c[1]?o(c[1]):s:!1},am=a=>a==="position"||a==="percentage",im=a=>a==="image"||a==="url",um=a=>a==="length"||a==="size"||a==="bg-size",cm=a=>a==="length",sp=a=>a==="number",rp=a=>a==="family-name",om=a=>a==="shadow",fp=()=>{const a=ee("color"),o=ee("font"),s=ee("text"),c=ee("font-weight"),d=ee("tracking"),h=ee("leading"),f=ee("breakpoint"),y=ee("container"),p=ee("spacing"),m=ee("radius"),v=ee("shadow"),C=ee("inset-shadow"),_=ee("text-shadow"),D=ee("drop-shadow"),q=ee("blur"),V=ee("perspective"),F=ee("aspect"),U=ee("ease"),W=ee("animate"),at=()=>["auto","avoid","all","avoid-page","page","left","right","column"],st=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],J=()=>[...st(),tt,P],lt=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto","contain","none"],K=()=>[tt,P,p],gt=()=>[pa,"full","auto",...K()],Jt=()=>[Il,"none","subgrid",tt,P],Ot=()=>["auto",{span:["full",Il,tt,P]},Il,tt,P],Dt=()=>[Il,"auto",tt,P],Ut=()=>["auto","min","max","fr",tt,P],Xt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...K()],O=()=>[pa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...K()],H=()=>[a,tt,P],k=()=>[...st(),O0,N0,{position:[tt,P]}],ht=()=>["no-repeat",{repeat:["","x","y","space","round"]}],S=()=>["auto","cover","contain",cp,ap,{size:[tt,P]}],B=()=>[Rs,xi,Nn],Y=()=>["","none","full",m,tt,P],Q=()=>["",yt,xi,Nn],it=()=>["solid","dashed","dotted","double"],rt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ot=()=>[yt,Rs,O0,N0],le=()=>["","none",q,tt,P],Bt=()=>["none",yt,tt,P],Ie=()=>["none",yt,tt,P],Ml=()=>[yt,tt,P],zl=()=>[pa,"full",...K()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xl],breakpoint:[xl],color:[Py],container:[xl],"drop-shadow":[xl],ease:["in","out","in-out"],font:[np],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xl],shadow:[xl],spacing:["px",yt],text:[xl],"text-shadow":[xl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",pa,P,tt,F]}],container:["container"],columns:[{columns:[yt,P,tt,y]}],"break-after":[{"break-after":at()}],"break-before":[{"break-before":at()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:J()}],overflow:[{overflow:lt()}],"overflow-x":[{"overflow-x":lt()}],"overflow-y":[{"overflow-y":lt()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:gt()}],"inset-x":[{"inset-x":gt()}],"inset-y":[{"inset-y":gt()}],start:[{start:gt()}],end:[{end:gt()}],top:[{top:gt()}],right:[{right:gt()}],bottom:[{bottom:gt()}],left:[{left:gt()}],visibility:["visible","invisible","collapse"],z:[{z:[Il,"auto",tt,P]}],basis:[{basis:[pa,"full","auto",y,...K()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[yt,pa,"auto","initial","none",P]}],grow:[{grow:["",yt,tt,P]}],shrink:[{shrink:["",yt,tt,P]}],order:[{order:[Il,"first","last","none",tt,P]}],"grid-cols":[{"grid-cols":Jt()}],"col-start-end":[{col:Ot()}],"col-start":[{"col-start":Dt()}],"col-end":[{"col-end":Dt()}],"grid-rows":[{"grid-rows":Jt()}],"row-start-end":[{row:Ot()}],"row-start":[{"row-start":Dt()}],"row-end":[{"row-end":Dt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ut()}],"auto-rows":[{"auto-rows":Ut()}],gap:[{gap:K()}],"gap-x":[{"gap-x":K()}],"gap-y":[{"gap-y":K()}],"justify-content":[{justify:[...Xt(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...Xt()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":Xt()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:K()}],px:[{px:K()}],py:[{py:K()}],ps:[{ps:K()}],pe:[{pe:K()}],pt:[{pt:K()}],pr:[{pr:K()}],pb:[{pb:K()}],pl:[{pl:K()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":K()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":K()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[y,"screen",...O()]}],"min-w":[{"min-w":[y,"screen","none",...O()]}],"max-w":[{"max-w":[y,"screen","none","prose",{screen:[f]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",s,xi,Nn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[c,tt,Ds]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rs,P]}],"font-family":[{font:[up,P,o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[d,tt,P]}],"line-clamp":[{"line-clamp":[yt,"none",tt,Ds]}],leading:[{leading:[h,...K()]}],"list-image":[{"list-image":["none",tt,P]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",tt,P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...it(),"wavy"]}],"text-decoration-thickness":[{decoration:[yt,"from-font","auto",tt,Nn]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[yt,"auto",tt,P]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:K()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",tt,P]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",tt,P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:ht()}],"bg-size":[{bg:S()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Il,tt,P],radial:["",tt,P],conic:[Il,tt,P]},op,ip]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...it(),"hidden","none"]}],"divide-style":[{divide:[...it(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...it(),"none","hidden"]}],"outline-offset":[{"outline-offset":[yt,tt,P]}],"outline-w":[{outline:["",yt,xi,Nn]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",v,Qu,ku]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",C,Qu,ku]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[yt,Nn]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",_,Qu,ku]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[yt,tt,P]}],"mix-blend":[{"mix-blend":[...rt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":rt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[yt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ot()}],"mask-image-linear-to-pos":[{"mask-linear-to":ot()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":ot()}],"mask-image-t-to-pos":[{"mask-t-to":ot()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":ot()}],"mask-image-r-to-pos":[{"mask-r-to":ot()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":ot()}],"mask-image-b-to-pos":[{"mask-b-to":ot()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":ot()}],"mask-image-l-to-pos":[{"mask-l-to":ot()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":ot()}],"mask-image-x-to-pos":[{"mask-x-to":ot()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":ot()}],"mask-image-y-to-pos":[{"mask-y-to":ot()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[tt,P]}],"mask-image-radial-from-pos":[{"mask-radial-from":ot()}],"mask-image-radial-to-pos":[{"mask-radial-to":ot()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":st()}],"mask-image-conic-pos":[{"mask-conic":[yt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ot()}],"mask-image-conic-to-pos":[{"mask-conic-to":ot()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:ht()}],"mask-size":[{mask:S()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",tt,P]}],filter:[{filter:["","none",tt,P]}],blur:[{blur:le()}],brightness:[{brightness:[yt,tt,P]}],contrast:[{contrast:[yt,tt,P]}],"drop-shadow":[{"drop-shadow":["","none",D,Qu,ku]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",yt,tt,P]}],"hue-rotate":[{"hue-rotate":[yt,tt,P]}],invert:[{invert:["",yt,tt,P]}],saturate:[{saturate:[yt,tt,P]}],sepia:[{sepia:["",yt,tt,P]}],"backdrop-filter":[{"backdrop-filter":["","none",tt,P]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[yt,tt,P]}],"backdrop-contrast":[{"backdrop-contrast":[yt,tt,P]}],"backdrop-grayscale":[{"backdrop-grayscale":["",yt,tt,P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[yt,tt,P]}],"backdrop-invert":[{"backdrop-invert":["",yt,tt,P]}],"backdrop-opacity":[{"backdrop-opacity":[yt,tt,P]}],"backdrop-saturate":[{"backdrop-saturate":[yt,tt,P]}],"backdrop-sepia":[{"backdrop-sepia":["",yt,tt,P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":K()}],"border-spacing-x":[{"border-spacing-x":K()}],"border-spacing-y":[{"border-spacing-y":K()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",tt,P]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[yt,"initial",tt,P]}],ease:[{ease:["linear","initial",U,tt,P]}],delay:[{delay:[yt,tt,P]}],animate:[{animate:["none",W,tt,P]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[V,tt,P]}],"perspective-origin":[{"perspective-origin":J()}],rotate:[{rotate:Bt()}],"rotate-x":[{"rotate-x":Bt()}],"rotate-y":[{"rotate-y":Bt()}],"rotate-z":[{"rotate-z":Bt()}],scale:[{scale:Ie()}],"scale-x":[{"scale-x":Ie()}],"scale-y":[{"scale-y":Ie()}],"scale-z":[{"scale-z":Ie()}],"scale-3d":["scale-3d"],skew:[{skew:Ml()}],"skew-x":[{"skew-x":Ml()}],"skew-y":[{"skew-y":Ml()}],transform:[{transform:[tt,P,"","none","gpu","cpu"]}],"transform-origin":[{origin:J()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:zl()}],"translate-x":[{"translate-x":zl()}],"translate-y":[{"translate-y":zl()}],"translate-z":[{"translate-z":zl()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",tt,P]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":K()}],"scroll-mx":[{"scroll-mx":K()}],"scroll-my":[{"scroll-my":K()}],"scroll-ms":[{"scroll-ms":K()}],"scroll-me":[{"scroll-me":K()}],"scroll-mt":[{"scroll-mt":K()}],"scroll-mr":[{"scroll-mr":K()}],"scroll-mb":[{"scroll-mb":K()}],"scroll-ml":[{"scroll-ml":K()}],"scroll-p":[{"scroll-p":K()}],"scroll-px":[{"scroll-px":K()}],"scroll-py":[{"scroll-py":K()}],"scroll-ps":[{"scroll-ps":K()}],"scroll-pe":[{"scroll-pe":K()}],"scroll-pt":[{"scroll-pt":K()}],"scroll-pr":[{"scroll-pr":K()}],"scroll-pb":[{"scroll-pb":K()}],"scroll-pl":[{"scroll-pl":K()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",tt,P]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[yt,xi,Nn,Ds]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},dp=Qy(fp);function hp(...a){return dp(Oy(a))}const mp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M0 1C0 0.447716 0.447715 0 1 0C1.55228 0 2 0.447715 2 1V23C2 23.5523 1.55228 24 1 24C0.447715 24 0 23.5523 0 23V1Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M5 6C5 5.44772 5.44772 5 6 5H9C9.55228 5 10 5.44772 10 6V18C10 18.5523 9.55228 19 9 19H6C5.44771 19 5 18.5523 5 18L5 6Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M13 6C13 5.44772 13.4477 5 14 5H17C17.5523 5 18 5.44772 18 6V18C18 18.5523 17.5523 19 17 19H14C13.4477 19 13 18.5523 13 18L13 6Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M22 1C22 0.447716 22.4477 0 23 0C23.5523 0 24 0.447715 24 1V23C24 23.5523 23.5523 24 23 24C22.4477 24 22 23.5523 22 23V1Z",fill:"#CCCCCC"})),gp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M1 22C0.447716 22 -2.41411e-08 22.4477 0 23C2.41411e-08 23.5523 0.447715 24 1 24H23C23.5523 24 24 23.5523 24 23C24 22.4477 23.5523 22 23 22H1Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M15 1.95415e-07C14.4477 2.22397e-07 14 0.447716 14 1L14 18C14 18.5523 14.4477 19 15 19H19C19.5523 19 20 18.5523 20 18L20 1C20 0.447715 19.5523 -2.69813e-08 19 0L15 1.95415e-07Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M5 6C4.44772 6 4 6.44772 4 7L4 18C4 18.5523 4.44772 19 5 19H9C9.55228 19 10 18.5523 10 18L10 7C10 6.44772 9.55228 6 9 6H5Z",fill:"#CCCCCC"})),yp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M2 23C2 23.5523 1.55228 24 1 24C0.447715 24 -2.41411e-08 23.5523 0 23L9.61651e-07 1C9.85792e-07 0.447716 0.447716 -2.41411e-08 1 0C1.55229 2.41411e-08 2 0.447715 2 1L2 23Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M24 9C24 9.55228 23.5523 10 23 10L6 10C5.44771 10 5 9.55228 5 9V5C5 4.44772 5.44772 4 6 4L23 4C23.5523 4 24 4.44772 24 5V9Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M18 19C18 19.5523 17.5523 20 17 20H6C5.44772 20 5 19.5523 5 19V15C5 14.4477 5.44772 14 6 14L17 14C17.5523 14 18 14.4477 18 15V19Z",fill:"#CCCCCC"})),pp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M22 1C22 0.447716 22.4477 -2.41411e-08 23 0C23.5523 2.41411e-08 24 0.447715 24 1V23C24 23.5523 23.5523 24 23 24C22.4477 24 22 23.5523 22 23V1Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M1.95416e-07 15C2.22397e-07 14.4477 0.447716 14 1 14L18 14C18.5523 14 19 14.4477 19 15V19C19 19.5523 18.5523 20 18 20L1 20C0.447715 20 -2.69813e-08 19.5523 0 19L1.95416e-07 15Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M6 5C6 4.44772 6.44772 4 7 4L18 4C18.5523 4 19 4.44772 19 5V9C19 9.55228 18.5523 10 18 10L7 10C6.44772 10 6 9.55228 6 9V5Z",fill:"#CCCCCC"})),vp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M23 2C23.5523 2 24 1.55228 24 1C24 0.447715 23.5523 -2.41411e-08 23 0L1 9.61651e-07C0.447716 9.85792e-07 -2.41411e-08 0.447716 0 1C2.41411e-08 1.55229 0.447715 2 1 2L23 2Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M9 24C9.55228 24 10 23.5523 10 23L10 6C10 5.44771 9.55228 5 9 5H5C4.44772 5 4 5.44772 4 6L4 23C4 23.5523 4.44772 24 5 24H9Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M19 18C19.5523 18 20 17.5523 20 17V6C20 5.44772 19.5523 5 19 5H15C14.4477 5 14 5.44772 14 6L14 17C14 17.5523 14.4477 18 15 18H19Z",fill:"#CCCCCC"})),bp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M23 9.61651e-07C23.5523 9.85792e-07 24 0.447716 24 1C24 1.55229 23.5523 2 23 2L1 2C0.447716 2 -2.41411e-08 1.55228 0 1C2.41411e-08 0.447715 0.447715 -2.41411e-08 1 0L23 9.61651e-07Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M18 5C18.5523 5 19 5.44772 19 6V9C19 9.55229 18.5523 10 18 10L6 10C5.44772 10 5 9.55229 5 9L5 6C5 5.44772 5.44772 5 6 5L18 5Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M18 13C18.5523 13 19 13.4477 19 14V17C19 17.5523 18.5523 18 18 18H6C5.44772 18 5 17.5523 5 17L5 14C5 13.4477 5.44772 13 6 13L18 13Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M23 22C23.5523 22 24 22.4477 24 23C24 23.5523 23.5523 24 23 24L1 24C0.447716 24 -2.41411e-08 23.5523 0 23C2.41411e-08 22.4477 0.447715 22 1 22L23 22Z",fill:"#CCCCCC"})),Sp=a=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M15.5 2.5L17.5 4.5L15.5 6.5L13.5 4.5L15.5 2.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M13.5 4.5L11.5 6.5L5.5 12.5L2.5 17.5L7.5 14.5L13.5 8.5L15.5 6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M9.5 10.5L11.5 12.5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),Is=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M11.5407 24C6.32045 24 2.15237 21.3734 0.162476 16.9541C-0.0830305 16.4232 -0.0393446 15.964 0.219699 15.7198C0.450438 15.5048 0.854695 15.4761 1.30141 15.634C2.46987 16.0932 3.83954 16.3228 5.41164 16.3228C11.9585 16.3228 16.1407 12.247 16.1407 5.88987C16.1407 4.08185 15.7949 2.34609 15.3476 1.45586C15.1027 0.953801 15.1027 0.523382 15.3193 0.250924C15.5783 -0.0368392 16.0398 -0.0796976 16.6022 0.135819C21.0293 1.87158 24 6.5505 24 11.8019C24 18.7903 18.8228 23.9994 11.5401 23.9994L11.5407 24Z",fill:"currentColor"})),xp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M24 23C24 23.5523 23.5523 24 23 24C22.4477 24 22 23.5523 22 23L22 1C22 0.447716 22.4477 -2.41411e-08 23 0C23.5523 2.41411e-08 24 0.447715 24 1L24 23Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M2 23C2 23.5523 1.55228 24 1 24C0.447715 24 -2.41411e-08 23.5523 0 23L9.61651e-07 1C9.85792e-07 0.447716 0.447716 -2.41411e-08 1 0C1.55229 2.41411e-08 2 0.447715 2 1L2 23Z",fill:"#CCCCCC"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.7998 5C16.9199 5 17.4804 4.99979 17.9082 5.21777C18.2845 5.40951 18.5905 5.71554 18.7822 6.0918C19.0002 6.51962 19 7.08009 19 8.2002V15.7998C19 16.9199 19.0002 17.4804 18.7822 17.9082C18.5905 18.2845 18.2845 18.5905 17.9082 18.7822C17.4804 19.0002 16.9199 19 15.7998 19H8.2002C7.08009 19 6.51962 19.0002 6.0918 18.7822C5.71554 18.5905 5.40951 18.2845 5.21777 17.9082C4.99979 17.4804 5 16.9199 5 15.7998V8.2002C5 7.08009 4.99979 6.51962 5.21777 6.0918C5.40951 5.71554 5.71554 5.40951 6.0918 5.21777C6.51962 4.99979 7.08009 5 8.2002 5H15.7998ZM8.59961 7C8.03982 7 7.75976 7.00041 7.5459 7.10938C7.35793 7.20522 7.20522 7.35793 7.10938 7.5459C7.00041 7.75976 7 8.03982 7 8.59961V15.4004C7 15.9602 7.00041 16.2402 7.10938 16.4541C7.20522 16.6421 7.35793 16.7948 7.5459 16.8906C7.75976 16.9996 8.03982 17 8.59961 17H15.4004C15.9602 17 16.2402 16.9996 16.4541 16.8906C16.6421 16.7948 16.7948 16.6421 16.8906 16.4541C16.9996 16.2402 17 15.9602 17 15.4004V8.59961C17 8.03982 16.9996 7.75976 16.8906 7.5459C16.7948 7.35793 16.6421 7.20522 16.4541 7.10938C16.2402 7.00041 15.9602 7 15.4004 7H8.59961Z",fill:"#CCCCCC"})),Cp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("rect",{y:22,width:24,height:2,rx:1,fill:"#ABABAB"}),T.createElement("rect",{x:4,y:1,width:16,height:17,rx:2,stroke:"#ABABAB",strokeWidth:2})),Ap=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("rect",{width:2,height:24,rx:1,fill:"#ABABAB"}),T.createElement("rect",{x:6,y:4,width:17,height:16,rx:2,stroke:"#ABABAB",strokeWidth:2,strokeLinejoin:"round"})),Ep=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("rect",{x:1,y:4,width:17,height:16,rx:2,stroke:"#ABABAB",strokeWidth:2,strokeLinejoin:"round"}),T.createElement("rect",{x:22,width:2,height:24,rx:1,fill:"#ABABAB"})),Mp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("rect",{width:24,height:2,rx:1,fill:"#ABABAB"}),T.createElement("rect",{x:4,y:6,width:16,height:17,rx:2,stroke:"#ABABAB",strokeWidth:2})),zp=a=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},T.createElement("path",{d:"M23 9.61651e-07C23.5523 9.85792e-07 24 0.447716 24 1C24 1.55229 23.5523 2 23 2L1 2C0.447716 2 -2.41411e-08 1.55228 0 1C2.41411e-08 0.447715 0.447715 -2.41411e-08 1 0L23 9.61651e-07Z",fill:"#CCCCCC"}),T.createElement("path",{d:"M23 22C23.5523 22 24 22.4477 24 23C24 23.5523 23.5523 24 23 24L1 24C0.447716 24 -2.41411e-08 23.5523 0 23C2.41411e-08 22.4477 0.447715 22 1 22L23 22Z",fill:"#CCCCCC"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.7998 5C16.9199 5 17.4804 4.99979 17.9082 5.21777C18.2845 5.40951 18.5905 5.71554 18.7822 6.0918C19.0002 6.51962 19 7.08009 19 8.2002V15.7998C19 16.9199 19.0002 17.4804 18.7822 17.9082C18.5905 18.2845 18.2845 18.5905 17.9082 18.7822C17.4804 19.0002 16.9199 19 15.7998 19H8.2002C7.08009 19 6.51962 19.0002 6.0918 18.7822C5.71554 18.5905 5.40951 18.2845 5.21777 17.9082C4.99979 17.4804 5 16.9199 5 15.7998V8.2002C5 7.08009 4.99979 6.51962 5.21777 6.0918C5.40951 5.71554 5.71554 5.40951 6.0918 5.21777C6.51962 4.99979 7.08009 5 8.2002 5H15.7998ZM8.59961 7C8.03982 7 7.75976 7.00041 7.5459 7.10938C7.35793 7.20522 7.20522 7.35793 7.10938 7.5459C7.00041 7.75976 7 8.03982 7 8.59961V15.4004C7 15.9602 7.00041 16.2402 7.10938 16.4541C7.20522 16.6421 7.35793 16.7948 7.5459 16.8906C7.75976 16.9996 8.03982 17 8.59961 17H15.4004C15.9602 17 16.2402 16.9996 16.4541 16.8906C16.6421 16.7948 16.7948 16.6421 16.8906 16.4541C16.9996 16.2402 17 15.9602 17 15.4004V8.59961C17 8.03982 16.9996 7.75976 16.8906 7.5459C16.7948 7.35793 16.6421 7.20522 16.4541 7.10938C16.2402 7.00041 15.9602 7 15.4004 7H8.59961Z",fill:"#CCCCCC"})),R0={"align-horizontally":mp,"align-to-bottom":gp,"align-to-left":yp,"align-to-right":pp,"align-to-top":vp,"align-vertically":bp,"moon-icon":Is,"stretch-horizontally":xp,"stretch-to-bottom":Cp,"stretch-to-left":Ap,"stretch-to-right":Ep,"stretch-to-top":Mp,"stretch-vertically":zp,"color-dropper":Sp},Ps=$e.memo(({name:a,className:o})=>{const s=R0[a]||R0["align-to-top"];return G.jsx(s,{className:o})});Ps.displayName="SvgIcon";const sm=$e.forwardRef(({className:a,iconName:o="align-to-top",icon:s,children:c,...d},h)=>{const f="h-6 w-6 [&>path]:fill-[#c0c0c0] group-hover:[&>path]:fill-[#E5E5E5] transition-colors duration-200",y=m=>{const v=an.getState();v.shortcutKeyHeld&&v.setHoveredIcon(o),d.onMouseEnter?.(m)},p=m=>{const v=an.getState();v.shortcutKeyHeld&&v.setHoveredIcon(null),d.onMouseLeave?.(m)};return G.jsx("button",{className:hp("inline-flex items-center justify-center h-10 w-10 p-2 rounded-md","bg-[#0c0c0c] text-white","font-medium transition-transform duration-200","hover:scale-105 active:scale-95","focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","group",a),ref:h,onMouseEnter:y,onMouseLeave:p,...d,children:c||s||G.jsx(Ps,{name:o,className:f})})});sm.displayName="Button";function sn(a){if(!a)return[];const o=a?.canvas?.selected_nodes;if(Array.isArray(o)&&o.length)return o;if(o&&typeof o=="object"){const c=Object.values(o);if(c.length)return c}const s=a?.graph?._nodes;return Array.isArray(s)?s.filter(c=>!!c&&typeof c=="object"&&(!!c.is_selected||!!c.selected)):[]}function Tp(a){return a.filter(o=>!o.flags?.pinned)}const en=a=>Number.isFinite(a)?Number(a):0;function rm(a,o,s,c){const d=Math.max(0,s),h=Math.max(0,c);return{x:a,y:o,width:d,height:h,right:a+d,bottom:o+h,centerX:a+d/2,centerY:o+h/2}}function tr(a){const o=en(a.pos?.[0]),s=en(a.pos?.[1]),c=en(a.size?.[0]),d=en(a.size?.[1]);return rm(o,s,c,d)}function Ti(a){const o=a.getBounding;if(typeof o=="function")try{const[s,c,d,h]=o.call(a);return rm(en(s),en(c),en(d),en(h))}catch{}return tr(a)}function $(a){const o=tr(a),s=Ti(a);return{logical:o,visual:s,logicalOffsetX:o.x-s.x,logicalOffsetY:o.y-s.y,logicalExtraWidth:o.width-s.width,logicalExtraHeight:o.height-s.height}}function er(a,o,s){const c=[o,s];if(typeof a.setPos=="function"){a.setPos(c[0],c[1]);return}try{a.pos=c;return}catch{a.pos[0]=c[0],a.pos[1]=c[1]}}function wp(a,o,s){const c=[Math.max(0,o),Math.max(0,s)];if(typeof a.setSize=="function"){a.setSize(c);return}try{a.size=c,typeof a.onResize=="function"&&a.onResize(c);return}catch{a.size[0]=c[0],a.size[1]=c[1],typeof a.onResize=="function"&&a.onResize(c)}}function _p(a,o,s){const c=tr(a);er(a,c.x+o,c.y+s)}function un(a,o,s,c=$(a)){er(a,o+c.logicalOffsetX,s+c.logicalOffsetY)}function xe(a,o,s=$(a)){er(a,o.x+s.logicalOffsetX,o.y+s.logicalOffsetY),wp(a,o.width+s.logicalExtraWidth,o.height+s.logicalExtraHeight)}function fm(a){try{if(a.pos||a.size||typeof a.getBounding=="function"){const h=Ti(a);return h.width<=0||h.height<=0?null:{node:a,x:h.x,y:h.y,width:h.width,height:h.height,right:h.right,bottom:h.bottom}}const o=a.x??a.pos?.[0]??0,s=a.y??a.pos?.[1]??0,c=a.width??a.size?.[0]??0,d=a.height??a.size?.[1]??0;return c<=0||d<=0?null:{node:a,x:o,y:s,width:c,height:d,right:o+c,bottom:s+d}}catch{return null}}function D0(a,o){return`${a},${o}`}class U0{cellSize;grid;count;constructor(o,s){this.cellSize=Math.max(64,Math.min(s||256,1024)),this.grid=new Map,this.count=o?.length||0,this.build(o)}build(o){if(!Array.isArray(o)||o.length===0)return;const s=this.cellSize;for(const c of o){const d=fm(c);if(!d)continue;const h=Math.floor(d.x/s),f=Math.floor(d.y/s),y=Math.floor(d.right/s),p=Math.floor(d.bottom/s);for(let m=h;m<=y;m++)for(let v=f;v<=p;v++){const C=D0(m,v);let _=this.grid.get(C);_||(_=[],this.grid.set(C,_)),_.push(d)}}}queryRect(o,s,c,d){const h=this.cellSize,f=Math.floor(o/h),y=Math.floor(s/h),p=Math.floor(c/h),m=Math.floor(d/h),v=new Set,C=[];for(let _=f;_<=p;_++)for(let D=y;D<=m;D++){const q=this.grid.get(D0(_,D));if(q)for(const V of q)v.has(V.node)||V.x>=o&&V.y>=s&&V.right<=c&&V.bottom<=d&&(v.add(V.node),C.push(V.node))}return C}size(){return this.count}}function nc(a){if(!Array.isArray(a)||a.length<200)return null;try{const o=[];for(const d of a){const h=fm(d);h&&h.width>0&&o.push(h.width)}o.sort((d,h)=>d-h);const s=o.length?o[Math.floor(o.length/2)]:256,c=Math.max(128,Math.min(Math.floor(s*3),768));return new U0(a,c)}catch{return new U0(a,256)}}function Ku(a,o,s,c){const d=Math.max(0,s),h=Math.max(0,c);return{x:a,y:o,width:d,height:h,right:a+d,bottom:o+h,centerX:a+d/2,centerY:o+h/2}}function ac(a){if(Array.isArray(a.bounding)&&a.bounding.length>=4)return Ku(a.bounding[0]??0,a.bounding[1]??0,a.bounding[2]??0,a.bounding[3]??0);if(a.pos&&a.size)return Ku(a.pos[0]??0,a.pos[1]??0,a.size[0]??0,a.size[1]??0);if(typeof a.x<"u"&&typeof a.y<"u"&&typeof a.width<"u"&&typeof a.height<"u")return Ku(a.x||0,a.y||0,a.width||0,a.height||0);const o=a;return Ku(o.pos_x??o.x??0,o.pos_y??o.y??0,o.size_x??o.width??o.size?.[0]??100,o.size_y??o.height??o.size?.[1]??100)}function rn(a){if(!a)return[];const o=a?.canvas?.selected_groups;if(Array.isArray(o)&&o.length)return o;if(o&&typeof o=="object"){const c=Object.values(o);if(c.length)return c}const s=a?.graph?.groups;return Array.isArray(s)?s.filter(c=>c?.selected):[]}function Ct(a){const o=ac(a);return[o.x,o.y,o.width,o.height]}function Hp(a,o){if(!a||!o)return[];const s=a?.graph?._nodes||[],c=ac(o),d=nc(s);return d?d.queryRect(c.x,c.y,c.right,c.bottom):s.filter(h=>{if(!h||typeof h!="object")return!1;const f=Ti(h);return f.x>=c.x&&f.y>=c.y&&f.right<=c.right&&f.bottom<=c.bottom})}function cn(a,o,s,c=!0){const d=Ce(),h=ac(a),f=o-h.x,y=s-h.y;if(f===0&&y===0)return;const p=c?Hp(d,a):[];if(Array.isArray(a.bounding)&&a.bounding.length>=4?(a.bounding[0]=o,a.bounding[1]=s,a.bounding[2]=h.width,a.bounding[3]=h.height):a.pos&&a.size?(a.pos[0]=o,a.pos[1]=s,a.size[0]=h.width,a.size[1]=h.height):typeof a.x<"u"&&typeof a.y<"u"&&typeof a.width<"u"&&typeof a.height<"u"?(a.x=o,a.y=s,a.width=h.width,a.height=h.height):(a.x=o,a.y=s,a.width=h.width,a.height=h.height,a.pos&&(a.pos[0]=o,a.pos[1]=s),a.size&&(a.size[0]=h.width,a.size[1]=h.height)),c&&p.length)for(const m of p)_p(m,f,y)}function kt(a,o,s,c,d){const h=ac(a),f=Math.round(o),y=Math.round(s),p=Math.max(0,Math.round(c)),m=Math.max(0,Math.round(d));f===Math.round(h.x)&&y===Math.round(h.y)&&p===Math.round(h.width)&&m===Math.round(h.height)||(Array.isArray(a.bounding)&&a.bounding.length>=4?(a.bounding[0]=f,a.bounding[1]=y,a.bounding[2]=p,a.bounding[3]=m):a.pos&&a.size?(a.pos[0]=f,a.pos[1]=y,a.size[0]=p,a.size[1]=m):typeof a.x<"u"&&typeof a.y<"u"&&typeof a.width<"u"&&typeof a.height<"u"?(a.x=f,a.y=y,a.width=p,a.height=m):(a.x=f,a.y=y,a.width=p,a.height=m,a.pos&&(a.pos[0]=f,a.pos[1]=y),a.size&&(a.size[0]=p,a.size[1]=m)))}function dm(a){const o=new Map;for(const s of a)o.set(s,{x:s?.pos?.[0]??0,y:s?.pos?.[1]??0,w:s?.size?.[0]??0,h:s?.size?.[1]??0});return o}function hm(a,o){const s=[],c=[];for(const d of a){const h=o.get(d);if(!h)continue;const f=d?.pos?.[0]??0,y=d?.pos?.[1]??0,p=d?.size?.[0]??0,m=d?.size?.[1]??0;(f!==h.x||y!==h.y)&&s.push(d),(p!==h.w||m!==h.h)&&c.push(d)}return{moved:s,resized:c}}function Qe(a){try{const o=Ce();if(!o)return{success:!1,message:"ComfyUI app not available"};const s=sn(o),c=Tp(s),d=s.length-c.length;if(c.length<2){let y="At least two nodes must be selected";return d>0&&(y="Cannot align: some selected nodes are pinned"),{success:!1,message:y}}const h=dm(c);a(c,o);const{moved:f}=hm(c,h);return f.length&&X0(o,f),on(o),{success:!0,count:c.length,skippedPinned:d}}catch(o){return console.error("Alignment operation failed:",o),{success:!1,message:o&&typeof o=="object"&&"message"in o?String(o.message??"Unknown error"):"Unknown error"}}}function Ke(a){try{const o=Ce();if(!o)return{success:!1,message:"ComfyUI app not available"};const s=rn(o);if(!Array.isArray(s)||s.length<2)return{success:!1,message:"At least two groups must be selected"};const c=o?.graph?._nodes,d=Array.isArray(c)?c:[],h=dm(d);a(s,o);const{moved:f}=hm(d,h);return f.length&&X0(o,f),on(o),{success:!0,count:s.length}}catch(o){return console.error("Group alignment operation failed:",o),{success:!1,message:o&&typeof o=="object"&&"message"in o?String(o.message??"Unknown error"):"Unknown error"}}}let B0=!1,Sa=!1;function Np(){if(B0)return;B0=!0;const a=c=>{c.altKey&&(Sa=!0,c.key==="Alt"&&!c.ctrlKey&&!c.shiftKey&&!c.metaKey&&(c.preventDefault(),c.stopPropagation()))},o=c=>{c.key==="Alt"?(Sa=!1,c.preventDefault(),c.stopPropagation()):c.altKey||(Sa=!1)},s=()=>{Sa=!1};window.addEventListener("keydown",a,{capture:!0}),window.addEventListener("keyup",o,{capture:!0}),window.addEventListener("blur",s),document.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&(Sa=!1)})}function Gt(){return typeof window<"u"&&Np(),Sa}const mm=12;function Op(a,o){if(a.length===0)return;const s=o??Gt(),c=a.map(f=>({node:f,frame:$(f)})),d=c.map(({frame:f})=>f.visual.x),h=s?Math.max(...d):Math.min(...d);c.forEach(({node:f,frame:y})=>{un(f,h,y.visual.y,y)})}function Rp(a,o){if(a.length===0)return;const s=o??Gt(),c=a.map(f=>({node:f,frame:$(f)})),d=c.map(({frame:f})=>f.visual.right),h=s?Math.min(...d):Math.max(...d);c.forEach(({node:f,frame:y})=>{un(f,h-y.visual.width,y.visual.y,y)})}function Dp(a,o){if(a.length===0)return;const s=o??Gt(),c=a.map(f=>({node:f,frame:$(f)})),d=c.map(({frame:f})=>f.visual.y),h=s?Math.max(...d):Math.min(...d);c.forEach(({node:f,frame:y})=>{un(f,y.visual.x,h,y)})}function Up(a,o){if(a.length===0)return;const s=o??Gt(),c=a.map(f=>({node:f,frame:$(f)})),d=c.map(({frame:f})=>f.visual.bottom),h=s?Math.min(...d):Math.max(...d);c.forEach(({node:f,frame:y})=>{un(f,y.visual.x,h-y.visual.height,y)})}function Bp(a,o){const s=mm+fy(),c=a.map(h=>({node:h,frame:$(h)})).sort((h,f)=>h.frame.visual.x-f.frame.visual.x);if(c.length===0)return;if(o??Gt()){const h=c[c.length-1],f=h.frame.visual.y;let y=h.frame.visual.x;for(let p=c.length-2;p>=0;p--){const{node:m,frame:v}=c[p];y-=v.visual.width+s,un(m,y,f,v)}}else{const h=c[0];let f=h.frame.visual.x;const y=h.frame.visual.y;c.forEach(({node:p,frame:m})=>{un(p,f,y,m),f+=m.visual.width+s})}}function Lp(a,o){const s=mm+dy(),c=a.map(h=>({node:h,frame:$(h)})).sort((h,f)=>h.frame.visual.y-f.frame.visual.y);if(c.length===0)return;if(o??Gt()){const h=c[c.length-1],f=h.frame.visual.centerX;let y=h.frame.visual.y;for(let p=c.length-2;p>=0;p--){const{node:m,frame:v}=c[p];y-=v.visual.height+s,un(m,f-v.visual.width/2,y,v)}}else{const h=c[0],f=h.frame.visual.centerX;let y=h.frame.visual.y;c.forEach(({node:p,frame:m})=>{un(p,f-m.visual.width/2,y,m),y+=m.visual.height+s})}}function jp(a){return Qe(o=>Op(o,a))}function Gp(a){return Qe(o=>Rp(o,a))}function Vp(a){return Qe(o=>Dp(o,a))}function Yp(a){return Qe(o=>Up(o,a))}function Xp(a){return Qe(o=>Bp(o,a))}function qp(a){return Qe(o=>Lp(o,a))}const Zp=.5,ic=(a,o,s=Zp)=>Math.abs(a-o)<=s;function kp(a){if(a.length<=1)return!0;const o=$(a[0]).visual.x;return a.every(s=>ic($(s).visual.x,o))}function Qp(a){if(a.length<=1)return!0;const o=$(a[0]).visual.right;return a.every(s=>ic($(s).visual.right,o))}function Kp(a){if(a.length<=1)return!0;const o=$(a[0]).visual.y;return a.every(s=>ic($(s).visual.y,o))}function Jp(a){if(a.length<=1)return!0;const o=$(a[0]).visual.bottom;return a.every(s=>ic($(s).visual.bottom,o))}function Fp(a){return a.reduce((o,s)=>$(s).visual.x<$(o).visual.x?s:o,a[0])}function Wp(a){return a.reduce((o,s)=>{const c=$(s).visual.right,d=$(o).visual.right;return c>d?s:o},a[0])}function $p(a){return a.reduce((o,s)=>$(s).visual.y<$(o).visual.y?s:o,a[0])}function Ip(a){return a.reduce((o,s)=>{const c=$(s).visual.bottom,d=$(o).visual.bottom;return c>d?s:o},a[0])}function lr(a){return a.reduce((o,s)=>$(s).visual.width<$(o).visual.width?s:o,a[0])}function Pp(a){return a.reduce((o,s)=>$(s).visual.width>$(o).visual.width?s:o,a[0])}function nr(a){return a.reduce((o,s)=>$(s).visual.height<$(o).visual.height?s:o,a[0])}function t2(a){return a.reduce((o,s)=>$(s).visual.height>$(o).visual.height?s:o,a[0])}function e2(a,o){if(a.length<2)return;if(o??Gt()){const c=a.reduce((h,f)=>$(f).visual.x>$(h).visual.x?f:h,a[0]),d=$(c).visual.x;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:d,y:f.visual.y,width:Math.max(0,f.visual.right-d),height:f.visual.height},f)});return}if(kp(a)){const c=lr(a),d=$(c).visual.right;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:f.visual.y,width:Math.max(0,d-f.visual.x),height:f.visual.height},f)})}else{const c=Fp(a),d=$(c).visual.x;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:d,y:f.visual.y,width:Math.max(0,f.visual.right-d),height:f.visual.height},f)})}}function l2(a,o){if(a.length<2)return;if(o??Gt()){const c=a.map(f=>$(f).visual.right),d=Math.min(...c),h=a.reduce((f,y)=>$(y).visual.right<$(f).visual.right?y:f,a[0]);a.forEach(f=>{if(f===h)return;const y=$(f);xe(f,{x:y.visual.x,y:y.visual.y,width:Math.max(0,d-y.visual.x),height:y.visual.height},y)});return}if(Qp(a)){const c=lr(a),d=$(c).visual.x;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:d,y:f.visual.y,width:Math.max(0,f.visual.right-d),height:f.visual.height},f)})}else{const c=Wp(a),d=$(c).visual.right;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:f.visual.y,width:Math.max(0,d-f.visual.x),height:f.visual.height},f)})}}function n2(a,o){if(a.length<2)return;if(o??Gt()){const c=a.reduce((h,f)=>$(f).visual.y>$(h).visual.y?f:h,a[0]),d=$(c).visual.y;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:d,width:f.visual.width,height:Math.max(0,f.visual.bottom-d)},f)});return}if(Kp(a)){const c=nr(a),d=$(c).visual.bottom;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:f.visual.y,width:f.visual.width,height:Math.max(0,d-f.visual.y)},f)})}else{const c=$p(a),d=$(c).visual.y;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:d,width:f.visual.width,height:Math.max(0,f.visual.bottom-d)},f)})}}function a2(a,o){if(a.length<2)return;if(o??Gt()){const c=a.map(f=>$(f).visual.bottom),d=Math.min(...c),h=a.reduce((f,y)=>$(y).visual.bottom<$(f).visual.bottom?y:f,a[0]);a.forEach(f=>{if(f===h)return;const y=$(f);xe(f,{x:y.visual.x,y:y.visual.y,width:y.visual.width,height:Math.max(0,d-y.visual.y)},y)});return}if(Jp(a)){const c=nr(a),d=$(c).visual.y;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:d,width:f.visual.width,height:Math.max(0,f.visual.bottom-d)},f)})}else{const c=Ip(a),d=$(c).visual.bottom;a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:f.visual.y,width:f.visual.width,height:Math.max(0,d-f.visual.y)},f)})}}function i2(a){return Qe(o=>e2(o,a))}function u2(a){return Qe(o=>l2(o,a))}function c2(a){return Qe(o=>n2(o,a))}function o2(a){return Qe(o=>a2(o,a))}function s2(a,o){if(a.length<2)return;const c=o??Gt()?lr(a):Pp(a),d=Math.max(0,$(c).visual.width);a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.centerX-d/2,y:f.visual.y,width:d,height:f.visual.height},f)})}function r2(a,o){if(a.length<2)return;const c=o??Gt()?nr(a):t2(a),d=Math.max(0,$(c).visual.height);a.forEach(h=>{if(h===c)return;const f=$(h);xe(h,{x:f.visual.x,y:f.visual.centerY-d/2,width:f.visual.width,height:d},f)})}function f2(a){return Qe(o=>s2(o,a))}function d2(a){return Qe(o=>r2(o,a))}const h2=1,Ei=50,Mi=50;function et(a){return Math.round(a)}function uc(a,o){for(const s of a)if(Math.abs(s-o)>h2)return!1;return!0}function m2(a){return Ke(o=>{const s=o.map(f=>({g:f,b:Ct(f)})),c=s.map(({b:f})=>f[0]),d=a?Math.max(...c):Math.min(...c);if(uc(c,d)){const f=Math.min(...s.map(({b:y})=>y[2]));for(const{g:y,b:p}of s){const[m,v,C,_]=p,D=Math.max(f,Ei);C>D&&kt(y,et(m),et(v),et(D),et(_))}return}for(const{g:f,b:y}of s){const[p,m,v,C]=y;if(!(a?pd))continue;const D=p+v,q=Math.max(D-d,Ei);kt(f,et(d),et(m),et(q),et(C))}})}function g2(a){return Ke(o=>{const s=o.map(f=>({g:f,b:Ct(f)})),c=s.map(({b:f})=>f[0]+f[2]),d=a?Math.min(...c):Math.max(...c);if(uc(c,d)){const f=Math.min(...s.map(({b:y})=>y[2]));for(const{g:y,b:p}of s){const[m,v,C,_]=p,D=Math.max(f,Ei);if(C>D){const q=m+C;kt(y,et(q-D),et(v),et(D),et(_))}}return}for(const{g:f,b:y}of s){const[p,m,,v]=y,C=Math.max(d-p,Ei);kt(f,et(p),et(m),et(C),et(v))}})}function y2(a){return Ke(o=>{const s=o.map(f=>({g:f,b:Ct(f)})),c=s.map(({b:f})=>f[1]),d=a?Math.max(...c):Math.min(...c);if(uc(c,d)){const f=Math.min(...s.map(({b:y})=>y[3]));for(const{g:y,b:p}of s){const[m,v,C,_]=p,D=Math.max(f,Mi);_>D&&kt(y,et(m),et(v),et(C),et(D))}return}for(const{g:f,b:y}of s){const[p,m,v,C]=y;if(!(a?md))continue;const D=m+C,q=Math.max(D-d,Mi);kt(f,et(p),et(d),et(v),et(q))}})}function p2(a){return Ke(o=>{const s=o.map(f=>({g:f,b:Ct(f)})),c=s.map(({b:f})=>f[1]+f[3]),d=a?Math.min(...c):Math.max(...c);if(uc(c,d)){const f=Math.min(...s.map(({b:y})=>y[3]));for(const{g:y,b:p}of s){const[m,v,C,_]=p,D=Math.max(f,Mi);if(_>D){const q=v+_;kt(y,et(m),et(q-D),et(C),et(D))}}return}for(const{g:f,b:y}of s){const[p,m,v]=y,C=Math.max(d-m,Mi);kt(f,et(p),et(m),et(v),et(C))}})}function v2(a){return Ke((o,s)=>{const c=o.map(m=>({g:m,b:Ct(m)})),d=c.map(({b:m})=>m[2]),h=Math.max(a?Math.min(...d):Math.max(...d),Ei),f=ec(),y=s?.graph?._nodes||[],p=nc(y);for(const{g:m,b:v}of c){const[C,_,D,q]=v;if(!a||!p){const X=C+D/2-h/2;kt(m,et(X),et(_),et(h),et(q));continue}const V=p.queryRect(C,_,C+D,_+q);if(!V.length){const X=C+D/2-h/2;kt(m,et(X),et(_),et(h),et(q));continue}let F=1/0,U=-1/0;for(const lt of V){const X=Ti(lt);F=Math.min(F,X.x),U=Math.max(U,X.right)}if(!Number.isFinite(F)||!Number.isFinite(U)){const X=C+D/2-h/2;kt(m,et(X),et(_),et(h),et(q));continue}const W=F-f,st=U+f-W,J=Math.max(h,st);kt(m,et(W),et(_),et(J),et(q))}})}function b2(a){return Ke((o,s)=>{const c=o.map(m=>({g:m,b:Ct(m)})),d=c.map(({b:m})=>m[3]),h=Math.max(a?Math.min(...d):Math.max(...d),Mi),f=lc(),y=s?.graph?._nodes||[],p=nc(y);for(const{g:m,b:v}of c){const[C,_,D,q]=v;if(!a||!p){const X=_+q/2-h/2;kt(m,et(C),et(X),et(D),et(h));continue}const V=p.queryRect(C,_,C+D,_+q);if(!V.length){const X=_+q/2-h/2;kt(m,et(C),et(X),et(D),et(h));continue}let F=1/0,U=-1/0;for(const lt of V){const X=Ti(lt);F=Math.min(F,X.y),U=Math.max(U,X.bottom)}if(!Number.isFinite(F)||!Number.isFinite(U)){const X=_+q/2-h/2;kt(m,et(C),et(X),et(D),et(h));continue}const W=F-f,st=U+f-W,J=Math.max(h,st);kt(m,et(C),et(W),et(D),et(J))}})}const gm=64,ar=50,ir=50;function Yt(a){return Math.round(a)}function S2(a,o){const s=a?.graph?._nodes||[],[c,d,h,f]=Ct(o),y=nc(s);return y?y.queryRect(c,d,c+h,d+f):s.filter(p=>{const m=p?.pos?.[0],v=p?.pos?.[1],C=p?.size?.[0],_=p?.size?.[1];return m==null||v==null||C==null||_==null?!1:m>=c&&v>=d&&m+C<=c+h&&v+_<=d+f})}function Ea(a){if(!Array.isArray(a)||a.length===0)return null;let o=1/0,s=1/0,c=-1/0,d=-1/0;for(const h of a){const f=h?.pos?.[0],y=h?.pos?.[1],p=h?.size?.[0],m=h?.size?.[1];f==null||y==null||p==null||m==null||(o=Math.min(o,f),s=Math.min(s,y),c=Math.max(c,f+p),d=Math.max(d,y+m))}return!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(c)||!Number.isFinite(d)?null:{minX:o,maxX:c,minY:s,maxY:d}}function Ma(a){try{const o=Ce();if(!o)return{success:!1,message:"ComfyUI app not available"};const s=rn(o);if(!Array.isArray(s)||s.length!==1)return{success:!1,message:"Select exactly one group"};const c=s[0],d=S2(o,c);return d.length?(a(c,d,o),on(o),{success:!0,count:1}):{success:!1,message:"No nodes inside the selected group"}}catch(o){return console.error("Single group operation failed:",o),{success:!1,message:o?.message??"Unknown error"}}}function x2(a){const o=a??Gt(),s=ec();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{minX:f}=h,y=f-s-(o?1:0),[p,m,v,C]=Ct(c),_=p+v,D=Math.max(_-y,ar);kt(c,Yt(y),Yt(m),Yt(D),Yt(C))})}function C2(a){const o=a??Gt(),s=ec();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{maxX:f}=h,y=f+s+(o?1:0),[p,m,,v]=Ct(c),C=Math.max(y-p,ar);kt(c,Yt(p),Yt(m),Yt(C),Yt(v))})}function A2(a){const o=a??Gt(),s=lc();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{minY:f}=h,y=f-(s+gm)-(o?1:0),[p,m,v,C]=Ct(c),_=m+C,D=Math.max(_-y,ir);kt(c,Yt(p),Yt(y),Yt(v),Yt(D))})}function E2(a){const o=a??Gt(),s=lc();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{maxY:f}=h,y=f+s+(o?1:0),[p,m,v]=Ct(c),C=Math.max(y-m,ir);kt(c,Yt(p),Yt(m),Yt(v),Yt(C))})}function M2(a){const o=a??Gt(),s=ec();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{minX:f,maxX:y}=h,p=f-s-(o?1:0),m=y+s,[,v,,C]=Ct(c),_=Math.max(m-p,ar);kt(c,Yt(p),Yt(v),Yt(_),Yt(C))})}function z2(a){const o=a??Gt(),s=lc();return Ma((c,d)=>{const h=Ea(d);if(!h)return;const{minY:f,maxY:y}=h,p=f-(s+gm)-(o?1:0),m=y+s,[v,,C]=Ct(c),_=Math.max(m-p,ir);kt(c,Yt(v),Yt(p),Yt(C),Yt(_))})}const ym=8;function ur(a){return[...a].sort((o,s)=>Ct(o)[0]-Ct(s)[0])}function cr(a){return[...a].sort((o,s)=>Ct(o)[1]-Ct(s)[1])}function T2(a,o){if(a.length===0)return;const s=o??Gt(),c=ur(a),d=s?c[c.length-1]:c[0],[h]=Ct(d);c.forEach(f=>{const[,y]=Ct(f);cn(f,h,y,!0)})}function w2(a,o){if(a.length===0)return;const s=o??Gt(),c=ur(a),d=s?c[0]:c[c.length-1],[h,,f]=Ct(d),y=h+f;c.forEach(p=>{const[,m,v]=Ct(p);cn(p,y-v,m,!0)})}function _2(a,o){if(a.length===0)return;const s=o??Gt(),c=cr(a),d=s?c[c.length-1]:c[0],[,h]=Ct(d);c.forEach(f=>{const[y]=Ct(f);cn(f,y,h,!0)})}function H2(a,o){if(a.length===0)return;const s=o??Gt(),c=cr(a),d=s?c[0]:c[c.length-1],[,h,,f]=Ct(d),y=h+f;c.forEach(p=>{const[m,,,v]=Ct(p);cn(p,m,y-v,!0)})}function N2(a,o){const s=ym+hy(),c=ur(a);if(c.length===0)return;if(o??Gt()){const h=c[c.length-1],[f,y]=Ct(h);let p=f;const m=y;for(let v=c.length-2;v>=0;v--){const C=c[v],[,,_]=Ct(C);p-=_+s,cn(C,p,m,!0)}}else{const h=c[0],[f,y]=Ct(h);let p=f;const m=y;c.forEach(v=>{const[,,C]=Ct(v);cn(v,p,m,!0),p+=C+s})}}function O2(a,o){const s=ym+my(),c=cr(a);if(c.length===0)return;if(o??Gt()){const h=c[c.length-1],[f,y,p]=Ct(h),m=f+p/2;let v=y;for(let C=c.length-2;C>=0;C--){const _=c[C],[,,D,q]=Ct(_);v-=q+s;const V=m-D/2;cn(_,V,v,!0)}}else{const h=c[0],[f,y,p]=Ct(h),m=f+p/2;let v=y;c.forEach(C=>{const[,,_,D]=Ct(C),q=m-_/2;cn(C,q,v,!0),v+=D+s})}}function R2(a){return Ke(o=>T2(o,a))}function D2(a){return Ke(o=>w2(o,a))}function U2(a){return Ke(o=>_2(o,a))}function B2(a){return Ke(o=>H2(o,a))}function L2(a){return Ke(o=>N2(o,a))}function j2(a){return Ke(o=>O2(o,a))}function zt(a,o){o.success||console.warn(`ComfyUI Align action failed for "${a}"`,{icon:a,message:o.message??"Unknown error",result:o})}function Re(a){const o=Gt(),s=Ce(),c=rn(s),d=Array.isArray(c)&&c.length>=2,h=Array.isArray(c)&&c.length===1;switch(a){case"align-to-left":d?zt(a,R2(o)):zt(a,jp(o));break;case"align-to-right":d?zt(a,D2(o)):zt(a,Gp(o));break;case"align-to-top":d?zt(a,U2(o)):zt(a,Vp(o));break;case"align-to-bottom":d?zt(a,B2(o)):zt(a,Yp(o));break;case"align-horizontally":d?zt(a,L2(o)):zt(a,Xp(o));break;case"align-vertically":d?zt(a,j2(o)):zt(a,qp(o));break;case"stretch-to-left":d?zt(a,m2(o)):h?zt(a,x2(o)):zt(a,i2(o));break;case"stretch-to-right":d?zt(a,g2(o)):h?zt(a,C2(o)):zt(a,u2(o));break;case"stretch-to-top":d?zt(a,y2(o)):h?zt(a,A2(o)):zt(a,c2(o));break;case"stretch-to-bottom":d?zt(a,p2(o)):h?zt(a,E2(o)):zt(a,o2(o));break;case"stretch-horizontally":d?zt(a,v2(o)):h?zt(a,M2(o)):zt(a,f2(o));break;case"stretch-vertically":d?zt(a,b2(o)):h?zt(a,z2(o)):zt(a,d2(o));break}}const G2=Object.freeze(Object.defineProperty({__proto__:null,executeIconAction:Re},Symbol.toStringTag,{value:"Module"}));function V2(){const a=T.useMemo(()=>({"align-to-left":()=>Re("align-to-left"),"align-to-right":()=>Re("align-to-right"),"align-to-top":()=>Re("align-to-top"),"align-to-bottom":()=>Re("align-to-bottom"),"align-vertically":()=>Re("align-vertically"),"align-horizontally":()=>Re("align-horizontally"),"stretch-to-left":()=>Re("stretch-to-left"),"stretch-to-right":()=>Re("stretch-to-right"),"stretch-to-top":()=>Re("stretch-to-top"),"stretch-to-bottom":()=>Re("stretch-to-bottom"),"stretch-horizontally":()=>Re("stretch-horizontally"),"stretch-vertically":()=>Re("stretch-vertically")}),[]);return{getHandler:s=>a[s]}}const Y2=[{id:"top-group",position:"top",direction:"horizontal",buttons:["align-to-top","align-vertically","stretch-to-top"],containerClass:"absolute top-0 left-0 w-full flex justify-center pointer-events-auto",groupClass:"flex gap-2 pointer-events-auto"},{id:"right-group",position:"right",direction:"vertical",buttons:["align-to-right","stretch-horizontally","stretch-to-right"],containerClass:"absolute top-0 right-0 h-full flex items-center pointer-events-auto",groupClass:"flex flex-col gap-2 pointer-events-auto"},{id:"bottom-group",position:"bottom",direction:"horizontal",buttons:["align-to-bottom","stretch-vertically","stretch-to-bottom"],containerClass:"absolute bottom-0 left-0 w-full flex justify-center pointer-events-auto",groupClass:"flex gap-2 pointer-events-auto"},{id:"left-group",position:"left",direction:"vertical",buttons:["align-to-left","align-horizontally","stretch-to-left"],containerClass:"absolute top-0 left-0 h-full flex items-center pointer-events-auto",groupClass:"flex flex-col gap-2 pointer-events-auto"}],pm=$e.memo(({config:a})=>{const{containerClass:o,groupClass:s,buttons:c}=a,{getHandler:d}=V2();return G.jsx("div",{className:o,children:G.jsx("div",{className:s,children:c.map((h,f)=>G.jsx(sm,{iconName:h,onClick:d(h)},`${a.id}-${h}-${f}`))})})});pm.displayName="ButtonGroup";function X2(){const a=T.useMemo(()=>Y2,[]);return G.jsx("div",{className:"flex items-center justify-center p-8 pointer-events-none",children:G.jsx("div",{className:"relative w-[300px] h-[300px]",children:a.map(o=>G.jsx(pm,{config:o},o.id))})})}const vm=$e.memo(X2);vm.displayName="CrossPanel";const L0={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},zi=new Map,Ju=a=>{const o=zi.get(a);return o?Object.fromEntries(Object.entries(o.stores).map(([s,c])=>[s,c.getState()])):{}},q2=(a,o,s)=>{if(a===void 0)return{type:"untracked",connection:o.connect(s)};const c=zi.get(s.name);if(c)return{type:"tracked",store:a,...c};const d={connection:o.connect(s),stores:{}};return zi.set(s.name,d),{type:"tracked",store:a,...d}},Z2=(a,o)=>{if(o===void 0)return;const s=zi.get(a);s&&(delete s.stores[o],Object.keys(s.stores).length===0&&zi.delete(a))},k2=a=>{var o,s;if(!a)return;const c=a.split(` +`),d=c.findIndex(f=>f.includes("api.setState"));if(d<0)return;const h=((o=c[d+1])==null?void 0:o.trim())||"";return(s=/.+ (.+) .+/.exec(h))==null?void 0:s[1]},Q2=(a,o={})=>(s,c,d)=>{const{enabled:h,anonymousActionType:f,store:y,...p}=o;let m;try{m=(h??(L0?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!m)return a(s,c,d);const{connection:v,...C}=q2(y,m,p);let _=!0;d.setState=((V,F,U)=>{const W=s(V,F);if(!_)return W;const at=U===void 0?{type:f||k2(new Error().stack)||"anonymous"}:typeof U=="string"?{type:U}:U;return y===void 0?(v?.send(at,c()),W):(v?.send({...at,type:`${y}/${at.type}`},{...Ju(p.name),[y]:d.getState()}),W)}),d.devtools={cleanup:()=>{v&&typeof v.unsubscribe=="function"&&v.unsubscribe(),Z2(p.name,y)}};const D=(...V)=>{const F=_;_=!1,s(...V),_=F},q=a(d.setState,c,d);if(C.type==="untracked"?v?.init(q):(C.stores[C.store]=d,v?.init(Object.fromEntries(Object.entries(C.stores).map(([V,F])=>[V,V===C.store?q:F.getState()])))),d.dispatchFromDevtools&&typeof d.dispatch=="function"){let V=!1;const F=d.dispatch;d.dispatch=(...U)=>{(L0?"production":void 0)!=="production"&&U[0].type==="__setState"&&!V&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),V=!0),F(...U)}}return v.subscribe(V=>{var F;switch(V.type){case"ACTION":if(typeof V.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Us(V.payload,U=>{if(U.type==="__setState"){if(y===void 0){D(U.state);return}Object.keys(U.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 W=U.state[y];if(W==null)return;JSON.stringify(d.getState())!==JSON.stringify(W)&&R(W);return}d.dispatchFromDevtools&&typeof d.dispatch=="function"&&d.dispatch(U)});case"DISPATCH":switch(Y.payload.type){case"RESET":return R(V),y===void 0?v?.init(d.getState()):v?.init(Ju(p.name));case"COMMIT":if(y===void 0){v?.init(d.getState());return}return v?.init(Ju(p.name));case"ROLLBACK":return Us(Y.state,U=>{if(y===void 0){R(U),v?.init(d.getState());return}R(U[y]),v?.init(Ju(p.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Us(Y.state,U=>{if(y===void 0){R(U);return}JSON.stringify(d.getState())!==JSON.stringify(U[y])&&R(U[y])});case"IMPORT_STATE":{const{nextLiftedState:U}=Y.payload,W=(F=U.computedStates.slice(-1)[0])==null?void 0:F.state;if(!W)return;R(y===void 0?W:W[y]),v?.send(null,U);return}case"PAUSE_RECORDING":return _=!_}return}}),V},K2=Q2,Us=(a,o)=>{let s;try{s=JSON.parse(a)}catch(c){console.error("[zustand devtools middleware] Could not parse the received json",c)}s!==void 0&&o(s)},cc=(a,o,s)=>{const c=o/100,d=s/100,h=d*c,f=h*(1-Math.abs(a/60%2-1)),y=d-h;let p=0,m=0,v=0;return 0<=a&&a<60?(p=h,m=f,v=0):60<=a&&a<120?(p=f,m=h,v=0):120<=a&&a<180?(p=0,m=h,v=f):180<=a&&a<240?(p=0,m=f,v=h):240<=a&&a<300?(p=f,m=0,v=h):300<=a&&a<360&&(p=h,m=0,v=f),{r:Math.round((p+y)*255),g:Math.round((m+y)*255),b:Math.round((v+y)*255)}},bm=(a,o,s)=>{const c=a/255,d=o/255,h=s/255,f=Math.max(c,d,h),y=Math.min(c,d,h),p=f-y;let m=0,v=0;const C=f;if(p!==0){switch(v=p/f,f){case c:m=(d-h)/p%6;break;case d:m=(h-c)/p+2;break;case h:m=(c-d)/p+4;break}m*=60,m<0&&(m+=360)}return{h:m,s:v*100,v:C*100}},J2=(a,o,s)=>{const c=d=>{const h=Math.round(Math.max(0,Math.min(255,d))).toString(16);return h.length===1?"0"+h:h};return`#${c(a)}${c(o)}${c(s)}`.toUpperCase()},F2=a=>{const o=a.replace("#","");if(o.length!==6)throw new Error("Invalid hex color format");const s=parseInt(o.slice(0,2),16),c=parseInt(o.slice(2,4),16),d=parseInt(o.slice(4,6),16);return{r:s,g:c,b:d}},El=(a,o,s)=>{const c=cc(a,o,s);return J2(c.r,c.g,c.b)},Sm=a=>{const o=F2(a);return bm(o.r,o.g,o.b)},W2=a=>/^#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(a);function Wu(a){try{let o=(a||"").trim().toUpperCase();o.startsWith("#")||(o=`#${o}`);const s=o.length===9?o.slice(0,7):o,{h:c,s:d,v:h}=Sm(s),f=Math.max(0,Math.min(100,h-12));return El(c,d,f)}catch{let o=(a||"#FFFFFF").trim().toUpperCase();return o.startsWith("#")||(o=`#${o}`),o.length===9?o.slice(0,7):o}}const j0=!0,$2={applyHeaderOnly:"comfyuiAlign.applyColorHeaderOnly"};function I2(a,o){if(typeof a=="boolean")return a;if(typeof a=="string"){if(a.toLowerCase()==="true")return!0;if(a.toLowerCase()==="false")return!1}return o}function oc(){try{const a=De($2.applyHeaderOnly);return I2(a,j0)}catch{return j0}}function Se(a,o){if(!a||typeof a!="string")return"#FFFFFFFF";let s=a.trim().toUpperCase();return s.startsWith("#")||(s=`#${s}`),s.length===9?s.slice(0,7)+o.toUpperCase():s.length===7?s+o.toUpperCase():"#FFFFFFFF"}function ln(a){const o=Math.max(0,Math.min(1,a)),c=Math.round(o*255).toString(16).toUpperCase();return c.length===1?"0"+c:c}function xm(a){const o=Ce(),s=sn(o),c=rn(o);if(!s.length&&!c.length)return;const d=oc();s.forEach(h=>{if(d)h.color=Se(a,"FF");else{h.bgcolor=Se(a,"FF");try{const f=Wu(a);h.color=Se(f,"FF")}catch{h.color=Se(a,"FF")}}}),c.forEach(h=>{try{h.color=Se(a,"FF")}catch{}}),on(o)}function va(a,o){const s=Ce(),c=sn(s),d=rn(s);if(!c.length&&!d.length)return;const h=oc(),f=ln(o);c.forEach(y=>{if(h)y.color=Se(a,f);else{y.bgcolor=Se(a,f);try{const p=Wu(a);y.color=Se(p,f)}catch{y.color=Se(a,f)}}}),d.forEach(y=>{try{y.color=Se(a,f)}catch{}}),on(s)}function P2(a){const o=Ce(),s=sn(o),c=rn(o);if(!s.length&&!c.length)return;const d=oc(),h=ln(a),f=p=>{if(typeof p!="string")return!1;const m=p.trim();return/^#?[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/.test(m)},y=p=>{let m=p.trim().toUpperCase();return m.startsWith("#")||(m=`#${m}`),m};s.forEach(p=>{try{if(d){if(f(p.color)){const m=y(p.color);p.color=Se(m,h)}}else{if(f(p.bgcolor)){const m=y(p.bgcolor);p.bgcolor=Se(m,h)}if(f(p.color)){const m=y(p.color);p.color=Se(m,h)}}}catch{}}),c.forEach(p=>{try{if(f(p.color)){const m=y(p.color);p.color=Se(m,h)}}catch{}}),on(o)}function Cm(){const a=Ce(),o=sn(a),s=rn(a);!o.length&&!s.length||(o.forEach(c=>{try{typeof c.setColorOption=="function"?c.setColorOption(null):(c.color=void 0,c.bgcolor=void 0)}catch{}}),s.forEach(c=>{try{typeof c.setColorOption=="function"?c.setColorOption(null):delete c.color}catch{}}),on(a))}function ba(a){try{let o=(a||"").trim().toUpperCase();if(o.startsWith("#")||(o=`#${o}`),o.length===9)return o;if(o.length===7)return o+ln(1);const s=o.replace(/[^A-F0-9]/g,"");return s.length>=6?`#${s.slice(0,6)}`+ln(1):`#FFFFFF${ln(1)}`}catch{return`#FFFFFF${ln(1)}`}}const Pl={hue:0,saturation:100,value:100,alpha:1},Pt=J0()(K2((a,o)=>({hue:Pl.hue,saturation:Pl.saturation,value:Pl.value,alpha:Pl.alpha,history:[],presets:[],presetLabels:{},presetLabelList:{},presetSource:{},isPickerActive:!1,getRGB:()=>{const{hue:s,saturation:c,value:d}=o();return cc(s,c,d)},getHex:()=>{const{hue:s,saturation:c,value:d}=o();return El(s,c,d)},getHex8:()=>{const{hue:s,saturation:c,value:d,alpha:h}=o();return El(s,c,d)+ln(h)},getHSV:()=>{const{hue:s,saturation:c,value:d}=o();return{h:s,s:c,v:d}},setHue:s=>{a({hue:Math.max(0,Math.min(360,s))},!1,"setHue");const{hue:c,saturation:d,value:h,alpha:f}=o();va(El(c,d,h),f)},setSaturation:s=>{a({saturation:Math.max(0,Math.min(100,s))},!1,"setSaturation");const{hue:c,saturation:d,value:h,alpha:f}=o();va(El(c,d,h),f)},setValue:s=>{a({value:Math.max(0,Math.min(100,s))},!1,"setValue");const{hue:c,saturation:d,value:h,alpha:f}=o();va(El(c,d,h),f)},setAlpha:s=>{a({alpha:Math.max(0,Math.min(1,s))},!1,"setAlpha");const{alpha:c}=o();P2(c)},setHSV:(s,c,d)=>{a({hue:Math.max(0,Math.min(360,s)),saturation:Math.max(0,Math.min(100,c)),value:Math.max(0,Math.min(100,d))},!1,"setHSV");const{hue:h,saturation:f,value:y,alpha:p}=o();va(El(h,f,y),p)},setFromRGB:(s,c,d)=>{const h=bm(s,c,d);a({hue:h.h,saturation:h.s,value:h.v},!1,"setFromRGB");const{hue:f,saturation:y,value:p,alpha:m}=o();va(El(f,y,p),m)},setFromHex:s=>{try{let c=s.trim().toUpperCase();c.startsWith("#")||(c=`#${c}`);let d=null,h=c;c.length===9&&(d=Math.max(0,Math.min(1,parseInt(c.slice(7,9),16)/255)),h=c.slice(0,7));const f=Sm(h),y={hue:f.h,saturation:f.s,value:f.v};d!==null&&(y.alpha=d),a(y,!1,"setFromHex");const{hue:p,saturation:m,value:v,alpha:C}=o();va(El(p,m,v),C)}catch(c){console.warn("Invalid hex color:",s,c)}},addToHistory:s=>{const c=o(),d=ln(c.alpha);let f=(s||c.getHex()).trim().toUpperCase();f.startsWith("#")||(f=`#${f}`),f.length===9||(f.length===7?f=f+d:f=c.getHex()+d),a(y=>({history:[f,...y.history.filter(p=>p!==f).slice(0,9)]}),!1,"addToHistory")},clearHistory:()=>{a({history:[]},!1,"clearHistory")},addPreset:s=>{const c=s||o().getHex();a(d=>({presets:d.presets.includes(c)?d.presets:[...d.presets,c]}),!1,"addPreset")},removePreset:s=>{a(c=>{const d=c.presets[s],h=c.presets.filter((m,v)=>v!==s),f={...c.presetLabels||{}},y={...c.presetLabelList||{}},p={...c.presetSource||{}};if(d){const m=ba(d),C=c.presets.map((R,V)=>ba(R)===m?V:-1).filter(R=>R>=0).indexOf(s),_=Array.isArray(y[m])?[...y[m]]:[];C>=0&&C<_.length?_.splice(C,1):_.length&&_.pop(),_.length===0?(delete y[m],f[m]&&delete f[m],p[m]&&delete p[m]):(y[m]=_,f[m]=_[0])}return{presets:h,presetLabels:f,presetLabelList:y,presetSource:p}},!1,"removePreset")},clearPresets:()=>{a({presets:[],presetLabels:{},presetLabelList:{},presetSource:{}},!1,"clearPresets")},setPresetsFromConfig:s=>{try{const c=[],d={},h={},f={};for(const y of s||[]){const p=y.title||"Unknown";let m;y.bgcolor?(m=ba(y.bgcolor),f[m]="panel"):y.color&&(m=ba(y.color),f[m]="header"),m&&(c.push(m),d[m]=`${p}`,h[m]=h[m]||[],h[m].push(`${p}`))}a({presets:c,presetLabels:d,presetLabelList:h,presetSource:f},!1,"setPresetsFromConfig")}catch(c){console.warn("setPresetsFromConfig failed",c)}},removePresetByColor:s=>{const c=ba(s);a(d=>{const h=d.presets.filter(m=>ba(m)!==c),f={...d.presetLabels||{}};f[c]&&delete f[c];const y={...d.presetLabelList||{}};y[c]&&delete y[c];const p={...d.presetSource||{}};return p[c]&&delete p[c],{presets:h,presetLabels:f,presetLabelList:y,presetSource:p}},!1,"removePresetByColor")},setPickerActive:s=>{a({isPickerActive:s},!1,"setPickerActive")},reset:()=>{a({hue:Pl.hue,saturation:Pl.saturation,value:Pl.value,alpha:Pl.alpha,history:[],presets:[],presetLabels:{},isPickerActive:!1},!1,"reset")}}),{name:"color-store",enabled:!1})),fn=()=>{const a=Pt();return{hue:a.hue,saturation:a.saturation,value:a.value,alpha:a.alpha,rgb:a.getRGB(),hex:a.getHex(),hsv:a.getHSV(),setHue:a.setHue,setSaturation:a.setSaturation,setValue:a.setValue,setAlpha:a.setAlpha,setHSV:a.setHSV,setFromRGB:a.setFromRGB,setFromHex:a.setFromHex,updateColor:(o,s,c)=>{a.setHSV(o,s,c),a.addToHistory()}}},tv=()=>{const a=Pt(c=>c.history),o=Pt(c=>c.addToHistory),s=Pt(c=>c.clearHistory);return{history:a,addToHistory:o,clearHistory:s}},ev=()=>{const a=Pt(p=>p.presets),o=Pt(p=>p.presetLabels),s=Pt(p=>p.presetLabelList),c=Pt(p=>p.presetSource),d=Pt(p=>p.addPreset),h=Pt(p=>p.removePreset),f=Pt(p=>p.removePresetByColor),y=Pt(p=>p.clearPresets);return{presets:a,presetLabels:o,presetLabelList:s,presetSource:c,addPreset:d,removePreset:h,removePresetByColor:f,clearPresets:y}},lv=()=>{const a=Pt(d=>d.isPickerActive),o=Pt(d=>d.setPickerActive),s=Pt(d=>d.setFromRGB),c=Pt(d=>d.addToHistory);return{isPickerActive:a,setPickerActive:o,pickColor:(d,h,f)=>{s(d,h,f),c()}}},Zs=["#8C3030","#8C5330","#71641A","#305D1A","#20625B","#2A587E","#4E3F98","#653185","#400446"],za=()=>{const{history:a,addToHistory:o,clearHistory:s}=tv(),{setFromHex:c}=fn(),d=m=>{c(m),o(m)},h=()=>{s()},f=()=>{o()},y=()=>Math.max(0,10-a.length),p=()=>{const m=y(),v=Array(m).fill(null);return[...a.map(C=>({type:"color",color:C})),...v.map(()=>({type:"placeholder",color:null}))]};return{history:a,placeholderCount:y(),displayData:p(),handleHistoryColorClick:d,handleClearHistory:h,handleAddCurrentColor:f}},nv=({className:a="",onMoonIconClick:o})=>{const[s,c]=T.useState(!1),{setFromHex:d}=fn(),{handleAddCurrentColor:h}=za(),f=m=>{const v=an.getState();v.shortcutKeyHeld&&v.setHoveredColorBarIndex(m)},y=()=>{const m=an.getState();m.shortcutKeyHeld&&m.setHoveredColorBarIndex(null)},p=()=>{c(!0),setTimeout(()=>{c(!1)},200)};return G.jsx("div",{className:`w-[300px] h-10 bg-[#0c0c0c] rounded-4xl flex items-center justify-center pointer-events-auto ${a}`,children:G.jsx("div",{className:"w-[280px] h-5 rounded-4xl flex items-center justify-between px-0",children:Array.from({length:11},(m,v)=>v===9?G.jsx("div",{className:"w-5 h-5 rounded-full border-2 cursor-pointer transition-all duration-200 hover:scale-110",style:{borderColor:s?"#FF6467":"#cccccc",backgroundColor:"transparent"},onClick:()=>{p(),Cm()},onMouseEnter:()=>f(9),onMouseLeave:y},v):v===10?G.jsx("div",{className:"w-5 h-5 flex items-center justify-center cursor-pointer transition-all duration-200 hover:scale-110",onClick:o,onMouseEnter:()=>f(10),onMouseLeave:y,children:G.jsx(Is,{width:"20",height:"20",className:"text-[#FFB900]"})},v):G.jsx("div",{className:"w-5 h-5 rounded-full cursor-pointer transition-all duration-200 hover:scale-110",style:{backgroundColor:v<9?Zs[v]:"#3B82F6"},onClick:v<9?()=>{const C=Zs[v];d(C),h(),xm(C)}:void 0,onMouseEnter:()=>f(v),onMouseLeave:y},v))})})},tn={width:330,height:200},G0=(a,o)=>Math.max(0,Math.min(o,a)),av=({className:a="",hue:o=0,saturation:s=100,value:c=100,onChange:d,onChangeComplete:h})=>{const f=T.useRef(null),[y,p]=T.useState(!1),[m,v]=T.useState({x:s/100*tn.width,y:(100-c)/100*tn.height}),C=cc(o,100,100),_=T.useCallback((U,W)=>{const at=U/tn.width*100,st=100-W/tn.height*100;return{saturation:at,value:st}},[]),R=T.useCallback((U,W)=>{if(!f.current)return null;const at=f.current.getBoundingClientRect(),st=G0(U-at.left,tn.width),J=G0(W-at.top,tn.height);return v({x:st,y:J}),_(st,J)},[_]),V=T.useCallback(U=>{const W=R(U.clientX,U.clientY);W&&(p(!0),d?.(W.saturation,W.value)),U.preventDefault(),U.stopPropagation()},[R,d]),Y=T.useCallback(U=>{if(!y)return;const W=R(U.clientX,U.clientY);W&&d?.(W.saturation,W.value)},[y,R,d]),F=T.useCallback(()=>{if(y){p(!1);const{saturation:U,value:W}=_(m.x,m.y);h?.(U,W)}},[y,m,_,h]);return T.useEffect(()=>(y&&(document.addEventListener("mousemove",Y),document.addEventListener("mouseup",F)),()=>{document.removeEventListener("mousemove",Y),document.removeEventListener("mouseup",F)}),[y,Y,F]),T.useEffect(()=>{v({x:s/100*tn.width,y:(100-c)/100*tn.height})},[s,c]),G.jsx("div",{ref:f,className:`relative cursor-crosshair select-none ${a}`,style:{width:"330px",height:"200px",borderRadius:"8px",background:` + `);const W=U.state[y];if(W==null)return;JSON.stringify(d.getState())!==JSON.stringify(W)&&D(W);return}d.dispatchFromDevtools&&typeof d.dispatch=="function"&&d.dispatch(U)});case"DISPATCH":switch(V.payload.type){case"RESET":return D(q),y===void 0?v?.init(d.getState()):v?.init(Ju(p.name));case"COMMIT":if(y===void 0){v?.init(d.getState());return}return v?.init(Ju(p.name));case"ROLLBACK":return Us(V.state,U=>{if(y===void 0){D(U),v?.init(d.getState());return}D(U[y]),v?.init(Ju(p.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Us(V.state,U=>{if(y===void 0){D(U);return}JSON.stringify(d.getState())!==JSON.stringify(U[y])&&D(U[y])});case"IMPORT_STATE":{const{nextLiftedState:U}=V.payload,W=(F=U.computedStates.slice(-1)[0])==null?void 0:F.state;if(!W)return;D(y===void 0?W:W[y]),v?.send(null,U);return}case"PAUSE_RECORDING":return _=!_}return}}),q},K2=Q2,Us=(a,o)=>{let s;try{s=JSON.parse(a)}catch(c){console.error("[zustand devtools middleware] Could not parse the received json",c)}s!==void 0&&o(s)},cc=(a,o,s)=>{const c=o/100,d=s/100,h=d*c,f=h*(1-Math.abs(a/60%2-1)),y=d-h;let p=0,m=0,v=0;return 0<=a&&a<60?(p=h,m=f,v=0):60<=a&&a<120?(p=f,m=h,v=0):120<=a&&a<180?(p=0,m=h,v=f):180<=a&&a<240?(p=0,m=f,v=h):240<=a&&a<300?(p=f,m=0,v=h):300<=a&&a<360&&(p=h,m=0,v=f),{r:Math.round((p+y)*255),g:Math.round((m+y)*255),b:Math.round((v+y)*255)}},bm=(a,o,s)=>{const c=a/255,d=o/255,h=s/255,f=Math.max(c,d,h),y=Math.min(c,d,h),p=f-y;let m=0,v=0;const C=f;if(p!==0){switch(v=p/f,f){case c:m=(d-h)/p%6;break;case d:m=(h-c)/p+2;break;case h:m=(c-d)/p+4;break}m*=60,m<0&&(m+=360)}return{h:m,s:v*100,v:C*100}},J2=(a,o,s)=>{const c=d=>{const h=Math.round(Math.max(0,Math.min(255,d))).toString(16);return h.length===1?"0"+h:h};return`#${c(a)}${c(o)}${c(s)}`.toUpperCase()},F2=a=>{const o=a.replace("#","");if(o.length!==6)throw new Error("Invalid hex color format");const s=parseInt(o.slice(0,2),16),c=parseInt(o.slice(2,4),16),d=parseInt(o.slice(4,6),16);return{r:s,g:c,b:d}},El=(a,o,s)=>{const c=cc(a,o,s);return J2(c.r,c.g,c.b)},Sm=a=>{const o=F2(a);return bm(o.r,o.g,o.b)},W2=a=>/^#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(a);function Wu(a){try{let o=(a||"").trim().toUpperCase();o.startsWith("#")||(o=`#${o}`);const s=o.length===9?o.slice(0,7):o,{h:c,s:d,v:h}=Sm(s),f=Math.max(0,Math.min(100,h-12));return El(c,d,f)}catch{let o=(a||"#FFFFFF").trim().toUpperCase();return o.startsWith("#")||(o=`#${o}`),o.length===9?o.slice(0,7):o}}const j0=!0,$2={applyHeaderOnly:"comfyuiAlign.applyColorHeaderOnly"};function I2(a,o){if(typeof a=="boolean")return a;if(typeof a=="string"){if(a.toLowerCase()==="true")return!0;if(a.toLowerCase()==="false")return!1}return o}function oc(){try{const a=De($2.applyHeaderOnly);return I2(a,j0)}catch{return j0}}function Se(a,o){if(!a||typeof a!="string")return"#FFFFFFFF";let s=a.trim().toUpperCase();return s.startsWith("#")||(s=`#${s}`),s.length===9?s.slice(0,7)+o.toUpperCase():s.length===7?s+o.toUpperCase():"#FFFFFFFF"}function ln(a){const o=Math.max(0,Math.min(1,a)),c=Math.round(o*255).toString(16).toUpperCase();return c.length===1?"0"+c:c}function xm(a){const o=Ce(),s=sn(o),c=rn(o);if(!s.length&&!c.length)return;const d=oc();s.forEach(h=>{if(d)h.color=Se(a,"FF");else{h.bgcolor=Se(a,"FF");try{const f=Wu(a);h.color=Se(f,"FF")}catch{h.color=Se(a,"FF")}}}),c.forEach(h=>{try{h.color=Se(a,"FF")}catch{}}),on(o)}function va(a,o){const s=Ce(),c=sn(s),d=rn(s);if(!c.length&&!d.length)return;const h=oc(),f=ln(o);c.forEach(y=>{if(h)y.color=Se(a,f);else{y.bgcolor=Se(a,f);try{const p=Wu(a);y.color=Se(p,f)}catch{y.color=Se(a,f)}}}),d.forEach(y=>{try{y.color=Se(a,f)}catch{}}),on(s)}function P2(a){const o=Ce(),s=sn(o),c=rn(o);if(!s.length&&!c.length)return;const d=oc(),h=ln(a),f=p=>{if(typeof p!="string")return!1;const m=p.trim();return/^#?[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/.test(m)},y=p=>{let m=p.trim().toUpperCase();return m.startsWith("#")||(m=`#${m}`),m};s.forEach(p=>{try{if(d){if(f(p.color)){const m=y(p.color);p.color=Se(m,h)}}else{if(f(p.bgcolor)){const m=y(p.bgcolor);p.bgcolor=Se(m,h)}if(f(p.color)){const m=y(p.color);p.color=Se(m,h)}}}catch{}}),c.forEach(p=>{try{if(f(p.color)){const m=y(p.color);p.color=Se(m,h)}}catch{}}),on(o)}function Cm(){const a=Ce(),o=sn(a),s=rn(a);!o.length&&!s.length||(o.forEach(c=>{try{typeof c.setColorOption=="function"?c.setColorOption(null):(c.color=void 0,c.bgcolor=void 0)}catch{}}),s.forEach(c=>{try{typeof c.setColorOption=="function"?c.setColorOption(null):delete c.color}catch{}}),on(a))}function ba(a){try{let o=(a||"").trim().toUpperCase();if(o.startsWith("#")||(o=`#${o}`),o.length===9)return o;if(o.length===7)return o+ln(1);const s=o.replace(/[^A-F0-9]/g,"");return s.length>=6?`#${s.slice(0,6)}`+ln(1):`#FFFFFF${ln(1)}`}catch{return`#FFFFFF${ln(1)}`}}const Pl={hue:0,saturation:100,value:100,alpha:1},Pt=J0()(K2((a,o)=>({hue:Pl.hue,saturation:Pl.saturation,value:Pl.value,alpha:Pl.alpha,history:[],presets:[],presetLabels:{},presetLabelList:{},presetSource:{},isPickerActive:!1,getRGB:()=>{const{hue:s,saturation:c,value:d}=o();return cc(s,c,d)},getHex:()=>{const{hue:s,saturation:c,value:d}=o();return El(s,c,d)},getHex8:()=>{const{hue:s,saturation:c,value:d,alpha:h}=o();return El(s,c,d)+ln(h)},getHSV:()=>{const{hue:s,saturation:c,value:d}=o();return{h:s,s:c,v:d}},setHue:s=>{a({hue:Math.max(0,Math.min(360,s))},!1,"setHue");const{hue:c,saturation:d,value:h,alpha:f}=o();va(El(c,d,h),f)},setSaturation:s=>{a({saturation:Math.max(0,Math.min(100,s))},!1,"setSaturation");const{hue:c,saturation:d,value:h,alpha:f}=o();va(El(c,d,h),f)},setValue:s=>{a({value:Math.max(0,Math.min(100,s))},!1,"setValue");const{hue:c,saturation:d,value:h,alpha:f}=o();va(El(c,d,h),f)},setAlpha:s=>{a({alpha:Math.max(0,Math.min(1,s))},!1,"setAlpha");const{alpha:c}=o();P2(c)},setHSV:(s,c,d)=>{a({hue:Math.max(0,Math.min(360,s)),saturation:Math.max(0,Math.min(100,c)),value:Math.max(0,Math.min(100,d))},!1,"setHSV");const{hue:h,saturation:f,value:y,alpha:p}=o();va(El(h,f,y),p)},setFromRGB:(s,c,d)=>{const h=bm(s,c,d);a({hue:h.h,saturation:h.s,value:h.v},!1,"setFromRGB");const{hue:f,saturation:y,value:p,alpha:m}=o();va(El(f,y,p),m)},setFromHex:s=>{try{let c=s.trim().toUpperCase();c.startsWith("#")||(c=`#${c}`);let d=null,h=c;c.length===9&&(d=Math.max(0,Math.min(1,parseInt(c.slice(7,9),16)/255)),h=c.slice(0,7));const f=Sm(h),y={hue:f.h,saturation:f.s,value:f.v};d!==null&&(y.alpha=d),a(y,!1,"setFromHex");const{hue:p,saturation:m,value:v,alpha:C}=o();va(El(p,m,v),C)}catch(c){console.warn("Invalid hex color:",s,c)}},addToHistory:s=>{const c=o(),d=ln(c.alpha);let f=(s||c.getHex()).trim().toUpperCase();f.startsWith("#")||(f=`#${f}`),f.length===9||(f.length===7?f=f+d:f=c.getHex()+d),a(y=>({history:[f,...y.history.filter(p=>p!==f).slice(0,9)]}),!1,"addToHistory")},clearHistory:()=>{a({history:[]},!1,"clearHistory")},addPreset:s=>{const c=s||o().getHex();a(d=>({presets:d.presets.includes(c)?d.presets:[...d.presets,c]}),!1,"addPreset")},removePreset:s=>{a(c=>{const d=c.presets[s],h=c.presets.filter((m,v)=>v!==s),f={...c.presetLabels||{}},y={...c.presetLabelList||{}},p={...c.presetSource||{}};if(d){const m=ba(d),C=c.presets.map((D,q)=>ba(D)===m?q:-1).filter(D=>D>=0).indexOf(s),_=Array.isArray(y[m])?[...y[m]]:[];C>=0&&C<_.length?_.splice(C,1):_.length&&_.pop(),_.length===0?(delete y[m],f[m]&&delete f[m],p[m]&&delete p[m]):(y[m]=_,f[m]=_[0])}return{presets:h,presetLabels:f,presetLabelList:y,presetSource:p}},!1,"removePreset")},clearPresets:()=>{a({presets:[],presetLabels:{},presetLabelList:{},presetSource:{}},!1,"clearPresets")},setPresetsFromConfig:s=>{try{const c=[],d={},h={},f={};for(const y of s||[]){const p=y.title||"Unknown";let m;y.bgcolor?(m=ba(y.bgcolor),f[m]="panel"):y.color&&(m=ba(y.color),f[m]="header"),m&&(c.push(m),d[m]=`${p}`,h[m]=h[m]||[],h[m].push(`${p}`))}a({presets:c,presetLabels:d,presetLabelList:h,presetSource:f},!1,"setPresetsFromConfig")}catch(c){console.warn("setPresetsFromConfig failed",c)}},removePresetByColor:s=>{const c=ba(s);a(d=>{const h=d.presets.filter(m=>ba(m)!==c),f={...d.presetLabels||{}};f[c]&&delete f[c];const y={...d.presetLabelList||{}};y[c]&&delete y[c];const p={...d.presetSource||{}};return p[c]&&delete p[c],{presets:h,presetLabels:f,presetLabelList:y,presetSource:p}},!1,"removePresetByColor")},setPickerActive:s=>{a({isPickerActive:s},!1,"setPickerActive")},reset:()=>{a({hue:Pl.hue,saturation:Pl.saturation,value:Pl.value,alpha:Pl.alpha,history:[],presets:[],presetLabels:{},isPickerActive:!1},!1,"reset")}}),{name:"color-store",enabled:!1})),fn=()=>{const a=Pt();return{hue:a.hue,saturation:a.saturation,value:a.value,alpha:a.alpha,rgb:a.getRGB(),hex:a.getHex(),hsv:a.getHSV(),setHue:a.setHue,setSaturation:a.setSaturation,setValue:a.setValue,setAlpha:a.setAlpha,setHSV:a.setHSV,setFromRGB:a.setFromRGB,setFromHex:a.setFromHex,updateColor:(o,s,c)=>{a.setHSV(o,s,c),a.addToHistory()}}},tv=()=>{const a=Pt(c=>c.history),o=Pt(c=>c.addToHistory),s=Pt(c=>c.clearHistory);return{history:a,addToHistory:o,clearHistory:s}},ev=()=>{const a=Pt(p=>p.presets),o=Pt(p=>p.presetLabels),s=Pt(p=>p.presetLabelList),c=Pt(p=>p.presetSource),d=Pt(p=>p.addPreset),h=Pt(p=>p.removePreset),f=Pt(p=>p.removePresetByColor),y=Pt(p=>p.clearPresets);return{presets:a,presetLabels:o,presetLabelList:s,presetSource:c,addPreset:d,removePreset:h,removePresetByColor:f,clearPresets:y}},lv=()=>{const a=Pt(d=>d.isPickerActive),o=Pt(d=>d.setPickerActive),s=Pt(d=>d.setFromRGB),c=Pt(d=>d.addToHistory);return{isPickerActive:a,setPickerActive:o,pickColor:(d,h,f)=>{s(d,h,f),c()}}},Zs=["#8C3030","#8C5330","#71641A","#305D1A","#20625B","#2A587E","#4E3F98","#653185","#400446"],za=()=>{const{history:a,addToHistory:o,clearHistory:s}=tv(),{setFromHex:c}=fn(),d=m=>{c(m),o(m)},h=()=>{s()},f=()=>{o()},y=()=>Math.max(0,10-a.length),p=()=>{const m=y(),v=Array(m).fill(null);return[...a.map(C=>({type:"color",color:C})),...v.map(()=>({type:"placeholder",color:null}))]};return{history:a,placeholderCount:y(),displayData:p(),handleHistoryColorClick:d,handleClearHistory:h,handleAddCurrentColor:f}},nv=({className:a="",onMoonIconClick:o})=>{const[s,c]=T.useState(!1),{setFromHex:d}=fn(),{handleAddCurrentColor:h}=za(),f=m=>{const v=an.getState();v.shortcutKeyHeld&&v.setHoveredColorBarIndex(m)},y=()=>{const m=an.getState();m.shortcutKeyHeld&&m.setHoveredColorBarIndex(null)},p=()=>{c(!0),setTimeout(()=>{c(!1)},200)};return G.jsx("div",{className:`w-[300px] h-10 bg-[#0c0c0c] rounded-4xl flex items-center justify-center pointer-events-auto ${a}`,children:G.jsx("div",{className:"w-[280px] h-5 rounded-4xl flex items-center justify-between px-0",children:Array.from({length:11},(m,v)=>v===9?G.jsx("div",{className:"w-5 h-5 rounded-full border-2 cursor-pointer transition-all duration-200 hover:scale-110",style:{borderColor:s?"#FF6467":"#cccccc",backgroundColor:"transparent"},onClick:()=>{p(),Cm()},onMouseEnter:()=>f(9),onMouseLeave:y},v):v===10?G.jsx("div",{className:"w-5 h-5 flex items-center justify-center cursor-pointer transition-all duration-200 hover:scale-110",onClick:o,onMouseEnter:()=>f(10),onMouseLeave:y,children:G.jsx(Is,{width:"20",height:"20",className:"text-[#FFB900]"})},v):G.jsx("div",{className:"w-5 h-5 rounded-full cursor-pointer transition-all duration-200 hover:scale-110",style:{backgroundColor:v<9?Zs[v]:"#3B82F6"},onClick:v<9?()=>{const C=Zs[v];d(C),h(),xm(C)}:void 0,onMouseEnter:()=>f(v),onMouseLeave:y},v))})})},tn={width:330,height:200},G0=(a,o)=>Math.max(0,Math.min(o,a)),av=({className:a="",hue:o=0,saturation:s=100,value:c=100,onChange:d,onChangeComplete:h})=>{const f=T.useRef(null),[y,p]=T.useState(!1),[m,v]=T.useState({x:s/100*tn.width,y:(100-c)/100*tn.height}),C=cc(o,100,100),_=T.useCallback((U,W)=>{const at=U/tn.width*100,st=100-W/tn.height*100;return{saturation:at,value:st}},[]),D=T.useCallback((U,W)=>{if(!f.current)return null;const at=f.current.getBoundingClientRect(),st=G0(U-at.left,tn.width),J=G0(W-at.top,tn.height);return v({x:st,y:J}),_(st,J)},[_]),q=T.useCallback(U=>{const W=D(U.clientX,U.clientY);W&&(p(!0),d?.(W.saturation,W.value)),U.preventDefault(),U.stopPropagation()},[D,d]),V=T.useCallback(U=>{if(!y)return;const W=D(U.clientX,U.clientY);W&&d?.(W.saturation,W.value)},[y,D,d]),F=T.useCallback(()=>{if(y){p(!1);const{saturation:U,value:W}=_(m.x,m.y);h?.(U,W)}},[y,m,_,h]);return T.useEffect(()=>(y&&(document.addEventListener("mousemove",V),document.addEventListener("mouseup",F)),()=>{document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",F)}),[y,V,F]),T.useEffect(()=>{v({x:s/100*tn.width,y:(100-c)/100*tn.height})},[s,c]),G.jsx("div",{ref:f,className:`relative cursor-crosshair select-none ${a}`,style:{width:"330px",height:"200px",borderRadius:"8px",background:` linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 100%), linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgb(${C.r}, ${C.g}, ${C.b}) 100%) - `,overflow:"hidden"},onMouseDown:V,children:G.jsx("div",{className:"absolute pointer-events-none",style:{left:`${m.x}px`,top:`${m.y}px`,transform:"translate(-50%, -50%)",width:"12.42px",height:"12.73px",borderRadius:"50%",border:"2px solid rgba(204, 204, 204, 0.88)",backgroundColor:"transparent",boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.3)"}})})},iv=({className:a="",onColorPicked:o,disabled:s=!1})=>{const{isPickerActive:c,setPickerActive:d,pickColor:h}=lv(),f=T.useCallback(async()=>{if(!(s||c))try{if(d(!0),"EyeDropper"in window){const p=await new window.EyeDropper().open();if(p?.sRGBHex){const m=p.sRGBHex,v=parseInt(m.slice(1,3),16),C=parseInt(m.slice(3,5),16),_=parseInt(m.slice(5,7),16);h(v,C,_),o?.({r:v,g:C,b:_,hex:m})}}else console.warn("EyeDropper API is not supported in this browser"),alert("Your browser does not support the eyedropper feature. Please use a browser that supports the EyeDropper API, such as Chrome, Edge.")}catch(y){console.log("Color picking cancelled or failed:",y)}finally{d(!1)}},[s,c,o,d,h]);return G.jsx("button",{className:` + `,overflow:"hidden"},onMouseDown:q,children:G.jsx("div",{className:"absolute pointer-events-none",style:{left:`${m.x}px`,top:`${m.y}px`,transform:"translate(-50%, -50%)",width:"12.42px",height:"12.73px",borderRadius:"50%",border:"2px solid rgba(204, 204, 204, 0.88)",backgroundColor:"transparent",boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.3)"}})})},iv=({className:a="",onColorPicked:o,disabled:s=!1})=>{const{isPickerActive:c,setPickerActive:d,pickColor:h}=lv(),f=T.useCallback(async()=>{if(!(s||c))try{if(d(!0),"EyeDropper"in window){const p=await new window.EyeDropper().open();if(p?.sRGBHex){const m=p.sRGBHex,v=parseInt(m.slice(1,3),16),C=parseInt(m.slice(3,5),16),_=parseInt(m.slice(5,7),16);h(v,C,_),o?.({r:v,g:C,b:_,hex:m})}}else console.warn("EyeDropper API is not supported in this browser"),alert("Your browser does not support the eyedropper feature. Please use a browser that supports the EyeDropper API, such as Chrome, Edge.")}catch(y){console.log("Color picking cancelled or failed:",y)}finally{d(!1)}},[s,c,o,d,h]);return G.jsx("button",{className:` relative overflow-visible w-[30px] h-[30px] rounded @@ -65,7 +65,7 @@ Error generating stack: `+n.message+` ${c?"bg-blue-500/20 border-blue-400/40 text-blue-400":"bg-transparent hover:bg-gray-400/10 text-gray-400/88"} ${s?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-gray-400/25"} ${a} - `,onClick:f,disabled:s,type:"button",children:G.jsx("div",{className:"w-5 h-5 flex items-center justify-center",children:G.jsx(Ps,{name:"color-dropper",className:`w-5 h-5 ${c?"animate-pulse":""}`})})})},Am=$e.memo(({className:a="",onChange:o,onChangeComplete:s})=>{const[c,d]=T.useState(!1),[h,f]=T.useState(""),[y,p]=T.useState(!1),[m,v]=T.useState("CCCCCC"),C=T.useRef(null),_=T.useRef(null),R=T.useRef(null),V=T.useRef(""),Y=T.useRef(null),{hex:F,setFromHex:U}=fn(),{handleAddCurrentColor:W}=za(),at=T.useMemo(()=>/^[0-9A-Fa-f]{6}$/,[]),st=T.useCallback(A=>at.test(A),[at]);T.useEffect(()=>{if(!c){const A=F.replace("#","").toUpperCase(),O=V.current;A!==O&&A!==m&&(v(A||"CCCCCC"),f(A||"CCCCCC"),V.current=A)}},[F,c,m]);const J=T.useCallback(async A=>{if(navigator?.clipboard?.writeText)try{return await navigator.clipboard.writeText(A)}catch(H){console.warn("Clipboard API failed, falling back to execCommand:",H)}const O=document.createElement("textarea");O.value=A,O.style.position="fixed",O.style.left="-999999px",O.style.top="-999999px",document.body.appendChild(O);try{return O.select(),O.setSelectionRange(0,O.value.length),document.execCommand("copy")}finally{document.body.removeChild(O)}},[]),lt=T.useCallback(async A=>{if(c)return;if(R.current){clearTimeout(R.current),R.current=null;return}const O=A.ctrlKey||A.metaKey;R.current=setTimeout(async()=>{const H=O?`#${m}`:m;try{await J(H),p(!0),setTimeout(()=>p(!1),300)}catch(k){if(console.error("Failed to copy to clipboard:",k),_.current){const ht=window.getSelection(),S=document.createRange();S.selectNodeContents(_.current),ht?.removeAllRanges(),ht?.addRange(S)}}R.current=null},250)},[m,c,J]),q=T.useCallback(()=>{c||(R.current&&(clearTimeout(R.current),R.current=null),d(!0),f(m),requestAnimationFrame(()=>{C.current&&(C.current.focus(),C.current.select())}))},[m,c]),K=T.useCallback(A=>{let O=A.target.value.toUpperCase().replace(/[^0-9A-F]/g,"");if(O.length>6&&(O=O.slice(0,6)),f(O),o?.(O),O.length===6&&st(O)){const H=`#${O}`;U(H)}},[o,st,U]),gt=T.useCallback(()=>{if(h.length===6&&st(h)){const A=`#${h.toUpperCase()}`;v(h.toUpperCase()),V.current=h.toUpperCase(),U(A),W(),s?.(A)}else f(m);d(!1)},[h,st,m,U,W,s]),Jt=T.useCallback(A=>{A.key==="Enter"?gt():A.key==="Escape"&&(f(m),d(!1))},[gt,m]),Ot=T.useCallback(()=>{gt()},[gt]),Dt=T.useCallback(A=>{_.current&&!_.current.contains(A.target)&&c&>()},[c,gt]);T.useEffect(()=>{if(c)return document.addEventListener("mousedown",Dt),()=>document.removeEventListener("mousedown",Dt)},[c,Dt]),T.useEffect(()=>()=>{R.current&&clearTimeout(R.current),Y.current&&(document.body.removeChild(Y.current),Y.current=null)},[]);const Ut=T.useMemo(()=>({fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"12px",lineHeight:"1.2102272510528564em"}),[]),Xt=T.useMemo(()=>{const A=` + `,onClick:f,disabled:s,type:"button",children:G.jsx("div",{className:"w-5 h-5 flex items-center justify-center",children:G.jsx(Ps,{name:"color-dropper",className:`w-5 h-5 ${c?"animate-pulse":""}`})})})},Am=$e.memo(({className:a="",onChange:o,onChangeComplete:s})=>{const[c,d]=T.useState(!1),[h,f]=T.useState(""),[y,p]=T.useState(!1),[m,v]=T.useState("CCCCCC"),C=T.useRef(null),_=T.useRef(null),D=T.useRef(null),q=T.useRef(""),V=T.useRef(null),{hex:F,setFromHex:U}=fn(),{handleAddCurrentColor:W}=za(),at=T.useMemo(()=>/^[0-9A-Fa-f]{6}$/,[]),st=T.useCallback(A=>at.test(A),[at]);T.useEffect(()=>{if(!c){const A=F.replace("#","").toUpperCase(),O=q.current;A!==O&&A!==m&&(v(A||"CCCCCC"),f(A||"CCCCCC"),q.current=A)}},[F,c,m]);const J=T.useCallback(async A=>{if(navigator?.clipboard?.writeText)try{return await navigator.clipboard.writeText(A)}catch(H){console.warn("Clipboard API failed, falling back to execCommand:",H)}const O=document.createElement("textarea");O.value=A,O.style.position="fixed",O.style.left="-999999px",O.style.top="-999999px",document.body.appendChild(O);try{return O.select(),O.setSelectionRange(0,O.value.length),document.execCommand("copy")}finally{document.body.removeChild(O)}},[]),lt=T.useCallback(async A=>{if(c)return;if(D.current){clearTimeout(D.current),D.current=null;return}const O=A.ctrlKey||A.metaKey;D.current=setTimeout(async()=>{const H=O?`#${m}`:m;try{await J(H),p(!0),setTimeout(()=>p(!1),300)}catch(k){if(console.error("Failed to copy to clipboard:",k),_.current){const ht=window.getSelection(),S=document.createRange();S.selectNodeContents(_.current),ht?.removeAllRanges(),ht?.addRange(S)}}D.current=null},250)},[m,c,J]),X=T.useCallback(()=>{c||(D.current&&(clearTimeout(D.current),D.current=null),d(!0),f(m),requestAnimationFrame(()=>{C.current&&(C.current.focus(),C.current.select())}))},[m,c]),K=T.useCallback(A=>{let O=A.target.value.toUpperCase().replace(/[^0-9A-F]/g,"");if(O.length>6&&(O=O.slice(0,6)),f(O),o?.(O),O.length===6&&st(O)){const H=`#${O}`;U(H)}},[o,st,U]),gt=T.useCallback(()=>{if(h.length===6&&st(h)){const A=`#${h.toUpperCase()}`;v(h.toUpperCase()),q.current=h.toUpperCase(),U(A),W(),s?.(A)}else f(m);d(!1)},[h,st,m,U,W,s]),Jt=T.useCallback(A=>{A.key==="Enter"?gt():A.key==="Escape"&&(f(m),d(!1))},[gt,m]),Ot=T.useCallback(()=>{gt()},[gt]),Dt=T.useCallback(A=>{_.current&&!_.current.contains(A.target)&&c&>()},[c,gt]);T.useEffect(()=>{if(c)return document.addEventListener("mousedown",Dt),()=>document.removeEventListener("mousedown",Dt)},[c,Dt]),T.useEffect(()=>()=>{D.current&&clearTimeout(D.current),V.current&&(document.body.removeChild(V.current),V.current=null)},[]);const Ut=T.useMemo(()=>({fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"12px",lineHeight:"1.2102272510528564em"}),[]),Xt=T.useMemo(()=>{const A=` relative w-[78px] h-6 rounded @@ -74,7 +74,7 @@ Error generating stack: `+n.message+` transition-all duration-200 ${c?"cursor-text":"cursor-pointer"} ${a} - `;return y?A+" border-[#04DE71] bg-transparent":c?A+" border-blue-400/60 bg-gray-800/50":A+" border-gray-400/15 bg-transparent hover:border-gray-400/25"},[c,y,a]),Z=T.useMemo(()=>({...Ut,color:"rgba(204, 204, 204, 0.88)",textAlign:"center"}),[Ut]);return G.jsxs("div",{ref:_,className:Xt,onClick:c?void 0:A=>lt(A),onDoubleClick:q,children:[c?G.jsx("input",{ref:C,type:"text",value:h,onChange:K,onKeyDown:Jt,onBlur:Ot,className:` + `;return y?A+" border-[#04DE71] bg-transparent":c?A+" border-blue-400/60 bg-gray-800/50":A+" border-gray-400/15 bg-transparent hover:border-gray-400/25"},[c,y,a]),Z=T.useMemo(()=>({...Ut,color:"rgba(204, 204, 204, 0.88)",textAlign:"center"}),[Ut]);return G.jsxs("div",{ref:_,className:Xt,onClick:c?void 0:A=>lt(A),onDoubleClick:X,children:[c?G.jsx("input",{ref:C,type:"text",value:h,onChange:K,onKeyDown:Jt,onBlur:Ot,className:` w-full h-full bg-transparent text-center @@ -92,7 +92,7 @@ Error generating stack: `+n.message+` bg-blue-400 rounded-full animate-pulse - `})]})});Am.displayName="HEX";const uv={isValidRGBA:(a,o)=>{const s=parseFloat(o);if(isNaN(s))return!1;switch(a){case"r":case"g":case"b":return s>=0&&s<=255&&Number.isInteger(s);case"a":return s>=0&&s<=100;default:return!1}}},On={formatDisplayValue:(a,o)=>{switch(a){case"r":case"g":case"b":return Math.round(o).toString();case"a":return Math.round(o*100).toString();default:return o.toString()}},formatCopyValue:(a,o)=>{switch(a){case"r":case"g":case"b":return Math.round(o).toString();case"a":return o.toFixed(3);default:return o.toString()}},formatRGBAString:a=>`rgba(${On.formatCopyValue("r",a.r)}, ${On.formatCopyValue("g",a.g)}, ${On.formatCopyValue("b",a.b)}, ${On.formatCopyValue("a",a.a)})`},$u={copyToClipboard:async a=>{try{return await navigator.clipboard.writeText(a),!0}catch(o){return console.error("Failed to copy to clipboard:",o),!1}},copyIndividualValue:async(a,o)=>{const s=On.formatCopyValue(a,o[a]);return $u.copyToClipboard(s)},copyFullRGBA:async a=>{const o=On.formatRGBAString(a);return $u.copyToClipboard(o)},fallbackTextSelection:a=>{const o=window.getSelection(),s=document.createRange();s.selectNodeContents(a),o?.removeAllRanges(),o?.addRange(s)}},Fu={validateAndFormatInput:(a,o)=>{let s=o;switch(a){case"r":case"g":case"b":s=s.replace(/[^0-9]/g,""),s&&parseInt(s)>255&&(s="255");break;case"a":s=s.replace(/[^0-9]/g,""),s&&parseInt(s)>100&&(s="100");break}return s},processInputValue:(a,o)=>{const s=parseFloat(o);return a==="a"?s/100:s},convertInputToNumber:(a,o)=>Fu.processInputValue(a,o)},cv=({className:a="",onChange:o,onChangeComplete:s})=>{const[c,d]=T.useState(null),[h,f]=T.useState({r:"80",g:"80",b:"80",a:"100"}),[y,p]=T.useState(null),[m,v]=T.useState({r:204,g:204,b:204,a:1}),[C,_]=T.useState({r:204,g:204,b:204,a:1}),[R,V]=T.useState(null),Y=T.useRef({r:null,g:null,b:null,a:null}),F=T.useRef(null),{rgb:U,alpha:W,setFromRGB:at,setAlpha:st}=fn(),{handleAddCurrentColor:J}=za(),{isValidRGBA:lt}=uv,{formatDisplayValue:q}=On;T.useEffect(()=>{const Z={r:U.r,g:U.g,b:U.b,a:W},A=Object.keys(Z).some(O=>{const H=O;return Math.abs(Z[H]-C[H])>.001});!c&&A&&(v(Z),_(Z),f({r:q("r",Z.r),g:q("g",Z.g),b:q("b",Z.b),a:q("a",Z.a)}))},[U,W,c,C,q]);const K=T.useCallback(async(Z,A)=>{if(R){clearTimeout(R),V(null);return}const O=setTimeout(async()=>{const H=A.ctrlKey||A.metaKey,k={r:U.r,g:U.g,b:U.b,a:W};try{H?(await $u.copyFullRGBA(k),p("all")):(await $u.copyIndividualValue(Z,k),p(Z)),setTimeout(()=>p(null),300)}catch(ht){console.error("复制失败:",ht)}V(null)},250);V(O)},[U,W,R]),gt=T.useCallback(Z=>{c||(R&&(clearTimeout(R),V(null)),d(Z),f(A=>({...A,[Z]:q(Z,m[Z])})),setTimeout(()=>{const A=Y.current[Z];A&&(A.focus(),A.select())},0))},[m,c,q,R]),Jt=T.useCallback((Z,A)=>{if(f(O=>({...O,[Z]:A})),lt(Z,A)){const O=Fu.processInputValue(Z,A),k={...{r:U.r,g:U.g,b:U.b,a:W},[Z]:O};Z==="a"?st(O):at(k.r,k.g,k.b),o?.(k.r,k.g,k.b,k.a)}},[U,W,at,st,o,lt]),Ot=T.useCallback(Z=>{const A=h[Z];if(lt(Z,A)){const O=Fu.processInputValue(Z,A),k={...{r:U.r,g:U.g,b:U.b,a:W},[Z]:O};v(k),_(k),Z==="a"?st(O):at(k.r,k.g,k.b),J(),s?.(k.r,k.g,k.b,k.a)}else{const O=q(Z,m[Z]);f(H=>({...H,[Z]:O}))}d(null)},[h,m,W,U,at,st,s,lt,q,J]),Dt=T.useCallback((Z,A)=>{if(A.key==="Enter")Ot(Z);else if(A.key==="Escape")f(O=>({...O,[Z]:q(Z,m[Z])})),d(null);else if(A.key==="Tab"){A.preventDefault(),Ot(Z);const O=["r","g","b","a"],k=(O.indexOf(Z)+1)%O.length,ht=O[k];setTimeout(()=>{gt(ht)},0)}},[Ot,m,q,gt]),Ut=T.useCallback(Z=>{Ot(Z)},[Ot]);T.useEffect(()=>()=>{R&&clearTimeout(R)},[R]),T.useEffect(()=>{const Z=A=>{F.current&&!F.current.contains(A.target)&&c&&Ot(c)};return c&&document.addEventListener("mousedown",Z),()=>{document.removeEventListener("mousedown",Z)}},[c,Ot]);const Xt=(Z,A)=>{const O=c===Z,H=O?h[Z]:q(Z,m[Z]);return G.jsxs("div",{className:` + `})]})});Am.displayName="HEX";const uv={isValidRGBA:(a,o)=>{const s=parseFloat(o);if(isNaN(s))return!1;switch(a){case"r":case"g":case"b":return s>=0&&s<=255&&Number.isInteger(s);case"a":return s>=0&&s<=100;default:return!1}}},On={formatDisplayValue:(a,o)=>{switch(a){case"r":case"g":case"b":return Math.round(o).toString();case"a":return Math.round(o*100).toString();default:return o.toString()}},formatCopyValue:(a,o)=>{switch(a){case"r":case"g":case"b":return Math.round(o).toString();case"a":return o.toFixed(3);default:return o.toString()}},formatRGBAString:a=>`rgba(${On.formatCopyValue("r",a.r)}, ${On.formatCopyValue("g",a.g)}, ${On.formatCopyValue("b",a.b)}, ${On.formatCopyValue("a",a.a)})`},$u={copyToClipboard:async a=>{try{return await navigator.clipboard.writeText(a),!0}catch(o){return console.error("Failed to copy to clipboard:",o),!1}},copyIndividualValue:async(a,o)=>{const s=On.formatCopyValue(a,o[a]);return $u.copyToClipboard(s)},copyFullRGBA:async a=>{const o=On.formatRGBAString(a);return $u.copyToClipboard(o)},fallbackTextSelection:a=>{const o=window.getSelection(),s=document.createRange();s.selectNodeContents(a),o?.removeAllRanges(),o?.addRange(s)}},Fu={validateAndFormatInput:(a,o)=>{let s=o;switch(a){case"r":case"g":case"b":s=s.replace(/[^0-9]/g,""),s&&parseInt(s)>255&&(s="255");break;case"a":s=s.replace(/[^0-9]/g,""),s&&parseInt(s)>100&&(s="100");break}return s},processInputValue:(a,o)=>{const s=parseFloat(o);return a==="a"?s/100:s},convertInputToNumber:(a,o)=>Fu.processInputValue(a,o)},cv=({className:a="",onChange:o,onChangeComplete:s})=>{const[c,d]=T.useState(null),[h,f]=T.useState({r:"80",g:"80",b:"80",a:"100"}),[y,p]=T.useState(null),[m,v]=T.useState({r:204,g:204,b:204,a:1}),[C,_]=T.useState({r:204,g:204,b:204,a:1}),[D,q]=T.useState(null),V=T.useRef({r:null,g:null,b:null,a:null}),F=T.useRef(null),{rgb:U,alpha:W,setFromRGB:at,setAlpha:st}=fn(),{handleAddCurrentColor:J}=za(),{isValidRGBA:lt}=uv,{formatDisplayValue:X}=On;T.useEffect(()=>{const Z={r:U.r,g:U.g,b:U.b,a:W},A=Object.keys(Z).some(O=>{const H=O;return Math.abs(Z[H]-C[H])>.001});!c&&A&&(v(Z),_(Z),f({r:X("r",Z.r),g:X("g",Z.g),b:X("b",Z.b),a:X("a",Z.a)}))},[U,W,c,C,X]);const K=T.useCallback(async(Z,A)=>{if(D){clearTimeout(D),q(null);return}const O=setTimeout(async()=>{const H=A.ctrlKey||A.metaKey,k={r:U.r,g:U.g,b:U.b,a:W};try{H?(await $u.copyFullRGBA(k),p("all")):(await $u.copyIndividualValue(Z,k),p(Z)),setTimeout(()=>p(null),300)}catch(ht){console.error("复制失败:",ht)}q(null)},250);q(O)},[U,W,D]),gt=T.useCallback(Z=>{c||(D&&(clearTimeout(D),q(null)),d(Z),f(A=>({...A,[Z]:X(Z,m[Z])})),setTimeout(()=>{const A=V.current[Z];A&&(A.focus(),A.select())},0))},[m,c,X,D]),Jt=T.useCallback((Z,A)=>{if(f(O=>({...O,[Z]:A})),lt(Z,A)){const O=Fu.processInputValue(Z,A),k={...{r:U.r,g:U.g,b:U.b,a:W},[Z]:O};Z==="a"?st(O):at(k.r,k.g,k.b),o?.(k.r,k.g,k.b,k.a)}},[U,W,at,st,o,lt]),Ot=T.useCallback(Z=>{const A=h[Z];if(lt(Z,A)){const O=Fu.processInputValue(Z,A),k={...{r:U.r,g:U.g,b:U.b,a:W},[Z]:O};v(k),_(k),Z==="a"?st(O):at(k.r,k.g,k.b),J(),s?.(k.r,k.g,k.b,k.a)}else{const O=X(Z,m[Z]);f(H=>({...H,[Z]:O}))}d(null)},[h,m,W,U,at,st,s,lt,X,J]),Dt=T.useCallback((Z,A)=>{if(A.key==="Enter")Ot(Z);else if(A.key==="Escape")f(O=>({...O,[Z]:X(Z,m[Z])})),d(null);else if(A.key==="Tab"){A.preventDefault(),Ot(Z);const O=["r","g","b","a"],k=(O.indexOf(Z)+1)%O.length,ht=O[k];setTimeout(()=>{gt(ht)},0)}},[Ot,m,X,gt]),Ut=T.useCallback(Z=>{Ot(Z)},[Ot]);T.useEffect(()=>()=>{D&&clearTimeout(D)},[D]),T.useEffect(()=>{const Z=A=>{F.current&&!F.current.contains(A.target)&&c&&Ot(c)};return c&&document.addEventListener("mousedown",Z),()=>{document.removeEventListener("mousedown",Z)}},[c,Ot]);const Xt=(Z,A)=>{const O=c===Z,H=O?h[Z]:X(Z,m[Z]);return G.jsxs("div",{className:` relative ${A} h-6 rounded @@ -101,7 +101,7 @@ Error generating stack: `+n.message+` transition-all duration-200 ${y==="all"||y===Z?"border-[#04DE71] bg-transparent":O?"border-blue-400/60 bg-gray-800/50":"border-gray-400/15 bg-transparent hover:border-gray-400/25"} ${O?"cursor-text":"cursor-pointer"} - `,onClick:O?void 0:k=>K(Z,k),onDoubleClick:()=>gt(Z),children:[O?G.jsx("input",{ref:k=>{Y.current[Z]=k},type:"text",value:H,onChange:k=>Jt(Z,Fu.validateAndFormatInput(Z,k.target.value)),onKeyDown:k=>Dt(Z,k),onBlur:()=>Ut(Z),className:` + `,onClick:O?void 0:k=>K(Z,k),onDoubleClick:()=>gt(Z),children:[O?G.jsx("input",{ref:k=>{V.current[Z]=k},type:"text",value:H,onChange:k=>Jt(Z,Fu.validateAndFormatInput(Z,k.target.value)),onKeyDown:k=>Dt(Z,k),onBlur:()=>Ut(Z),className:` w-full h-full bg-transparent text-center @@ -119,14 +119,14 @@ Error generating stack: `+n.message+` bg-blue-400 rounded-full animate-pulse - `})]},Z)};return G.jsxs("div",{ref:F,className:`flex items-center gap-1 ${a}`,children:[Xt("r","w-[58px]"),Xt("g","w-[58px]"),Xt("b","w-[58px]"),Xt("a","w-[58px]")]})},Cl=5,ov=280,Ci=ov,sv=({className:a="",onChange:o,onChangeComplete:s})=>{const c=T.useRef(null),[d,h]=T.useState(!1),{hue:f,setHue:y}=fn(),{handleAddCurrentColor:p}=za(),[m,v]=T.useState({x:Cl+f/360*Ci}),C=T.useCallback(Y=>{const U=(Y-Cl)/Ci*360;return U>=360?0:Math.max(0,U)},[]),_=T.useCallback(Y=>{if(!c.current)return;h(!0);const F=c.current.getBoundingClientRect(),U=Math.max(Cl,Math.min(Cl+Ci,Y.clientX-F.left));v({x:U});const W=C(U);y(W),o?.(W),Y.preventDefault(),Y.stopPropagation()},[C,y,o]),R=T.useCallback(Y=>{if(!d||!c.current)return;const F=c.current.getBoundingClientRect(),U=Math.max(Cl,Math.min(Cl+Ci,Y.clientX-F.left));v({x:U});const W=C(U);y(W),o?.(W)},[d,C,y,o]),V=T.useCallback(()=>{if(d){h(!1);const Y=C(m.x);s?.(Y),p()}},[d,m.x,C,s,p]);return T.useEffect(()=>(d&&(document.addEventListener("mousemove",R),document.addEventListener("mouseup",V)),()=>{document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",V)}),[d,R,V]),T.useEffect(()=>{v({x:Cl+f/360*Ci})},[f]),G.jsx("div",{ref:c,className:`relative cursor-pointer select-none ${a}`,style:{width:"290px",height:"10px",borderRadius:"10px",background:"linear-gradient(90deg, hsl(0, 100%, 50%) 0%, hsl(60, 100%, 50%) 16.67%, hsl(120, 100%, 50%) 33.33%, hsl(180, 100%, 50%) 50%, hsl(240, 100%, 50%) 66.67%, hsl(300, 100%, 50%) 83.33%, hsl(360, 100%, 50%) 100%)",overflow:"visible",paddingLeft:`${Cl}px`,paddingRight:`${Cl}px`,boxSizing:"border-box"},onMouseDown:_,children:G.jsx("div",{className:"absolute pointer-events-none",style:{left:`${m.x}px`,top:"0px",transform:"translate(-50%, 0%)",width:"10px",height:"10px",borderRadius:"50%",border:"2px solid #CCCCCC",backgroundColor:"transparent",boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.3)",zIndex:10}})})},Al=5,rv=280,Ai=rv,fv=({className:a="",onChange:o,onChangeComplete:s})=>{const c=T.useRef(null),[d,h]=T.useState(!1),{hue:f,saturation:y,value:p,alpha:m,setAlpha:v}=fn(),[C,_]=T.useState({x:Al+m*Ai}),R=cc(f,y,p),V=`rgb(${R.r}, ${R.g}, ${R.b})`,Y=T.useCallback(at=>{const J=(at-Al)/Ai;return Math.max(0,Math.min(1,J))},[]),F=T.useCallback(at=>{if(!c.current)return;h(!0);const st=c.current.getBoundingClientRect(),J=Math.max(Al,Math.min(Al+Ai,at.clientX-st.left));_({x:J});const lt=Y(J);v(lt),o?.(lt),at.preventDefault(),at.stopPropagation()},[Y,v,o]),U=T.useCallback(at=>{if(!d||!c.current)return;const st=c.current.getBoundingClientRect(),J=Math.max(Al,Math.min(Al+Ai,at.clientX-st.left));_({x:J});const lt=Y(J);v(lt),o?.(lt)},[d,Y,v,o]),W=T.useCallback(()=>{if(d){h(!1);const at=Y(C.x);s?.(at)}},[d,C.x,Y,s]);return T.useEffect(()=>(d&&(document.addEventListener("mousemove",U),document.addEventListener("mouseup",W)),()=>{document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",W)}),[d,U,W]),T.useEffect(()=>{_({x:Al+m*Ai})},[m]),G.jsxs("div",{ref:c,className:`relative cursor-pointer select-none ${a}`,style:{width:"290px",height:"10px",borderRadius:"10px",overflow:"visible",paddingLeft:`${Al}px`,paddingRight:`${Al}px`,boxSizing:"border-box",backgroundImage:` + `})]},Z)};return G.jsxs("div",{ref:F,className:`flex items-center gap-1 ${a}`,children:[Xt("r","w-[58px]"),Xt("g","w-[58px]"),Xt("b","w-[58px]"),Xt("a","w-[58px]")]})},Cl=5,ov=280,Ci=ov,sv=({className:a="",onChange:o,onChangeComplete:s})=>{const c=T.useRef(null),[d,h]=T.useState(!1),{hue:f,setHue:y}=fn(),{handleAddCurrentColor:p}=za(),[m,v]=T.useState({x:Cl+f/360*Ci}),C=T.useCallback(V=>{const U=(V-Cl)/Ci*360;return U>=360?0:Math.max(0,U)},[]),_=T.useCallback(V=>{if(!c.current)return;h(!0);const F=c.current.getBoundingClientRect(),U=Math.max(Cl,Math.min(Cl+Ci,V.clientX-F.left));v({x:U});const W=C(U);y(W),o?.(W),V.preventDefault(),V.stopPropagation()},[C,y,o]),D=T.useCallback(V=>{if(!d||!c.current)return;const F=c.current.getBoundingClientRect(),U=Math.max(Cl,Math.min(Cl+Ci,V.clientX-F.left));v({x:U});const W=C(U);y(W),o?.(W)},[d,C,y,o]),q=T.useCallback(()=>{if(d){h(!1);const V=C(m.x);s?.(V),p()}},[d,m.x,C,s,p]);return T.useEffect(()=>(d&&(document.addEventListener("mousemove",D),document.addEventListener("mouseup",q)),()=>{document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",q)}),[d,D,q]),T.useEffect(()=>{v({x:Cl+f/360*Ci})},[f]),G.jsx("div",{ref:c,className:`relative cursor-pointer select-none ${a}`,style:{width:"290px",height:"10px",borderRadius:"10px",background:"linear-gradient(90deg, hsl(0, 100%, 50%) 0%, hsl(60, 100%, 50%) 16.67%, hsl(120, 100%, 50%) 33.33%, hsl(180, 100%, 50%) 50%, hsl(240, 100%, 50%) 66.67%, hsl(300, 100%, 50%) 83.33%, hsl(360, 100%, 50%) 100%)",overflow:"visible",paddingLeft:`${Cl}px`,paddingRight:`${Cl}px`,boxSizing:"border-box"},onMouseDown:_,children:G.jsx("div",{className:"absolute pointer-events-none",style:{left:`${m.x}px`,top:"0px",transform:"translate(-50%, 0%)",width:"10px",height:"10px",borderRadius:"50%",border:"2px solid #CCCCCC",backgroundColor:"transparent",boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.3)",zIndex:10}})})},Al=5,rv=280,Ai=rv,fv=({className:a="",onChange:o,onChangeComplete:s})=>{const c=T.useRef(null),[d,h]=T.useState(!1),{hue:f,saturation:y,value:p,alpha:m,setAlpha:v}=fn(),[C,_]=T.useState({x:Al+m*Ai}),D=cc(f,y,p),q=`rgb(${D.r}, ${D.g}, ${D.b})`,V=T.useCallback(at=>{const J=(at-Al)/Ai;return Math.max(0,Math.min(1,J))},[]),F=T.useCallback(at=>{if(!c.current)return;h(!0);const st=c.current.getBoundingClientRect(),J=Math.max(Al,Math.min(Al+Ai,at.clientX-st.left));_({x:J});const lt=V(J);v(lt),o?.(lt),at.preventDefault(),at.stopPropagation()},[V,v,o]),U=T.useCallback(at=>{if(!d||!c.current)return;const st=c.current.getBoundingClientRect(),J=Math.max(Al,Math.min(Al+Ai,at.clientX-st.left));_({x:J});const lt=V(J);v(lt),o?.(lt)},[d,V,v,o]),W=T.useCallback(()=>{if(d){h(!1);const at=V(C.x);s?.(at)}},[d,C.x,V,s]);return T.useEffect(()=>(d&&(document.addEventListener("mousemove",U),document.addEventListener("mouseup",W)),()=>{document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",W)}),[d,U,W]),T.useEffect(()=>{_({x:Al+m*Ai})},[m]),G.jsxs("div",{ref:c,className:`relative cursor-pointer select-none ${a}`,style:{width:"290px",height:"10px",borderRadius:"10px",overflow:"visible",paddingLeft:`${Al}px`,paddingRight:`${Al}px`,boxSizing:"border-box",backgroundImage:` linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%) - `,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px"},onMouseDown:F,children:[G.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(90deg, transparent 0%, ${V} 100%)`,borderRadius:"10px"}}),G.jsx("div",{className:"absolute pointer-events-none",style:{left:`${C.x}px`,top:"0px",transform:"translate(-50%, 0%)",width:"10px",height:"10px",borderRadius:"50%",border:"2px solid #CCCCCC",backgroundColor:"white",boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.3)",zIndex:10}})]})},dv=()=>{const{displayData:a,handleHistoryColorClick:o}=za(),[s,c]=T.useState(null);return G.jsx("div",{style:hv,children:a.map((d,h)=>G.jsx("div",{style:{...mv,...d.type==="color"?gv:yv,backgroundColor:d.type==="color"?d.color:"transparent",transform:d.type==="color"&&s===h?"scale(1.1)":"scale(1)",boxShadow:d.type==="color"&&s===h?"0 2px 8px rgba(0, 0, 0, 0.2)":"none",zIndex:d.type==="color"&&s===h?1:0},onMouseEnter:d.type==="color"?()=>c(h):void 0,onMouseLeave:d.type==="color"?()=>c(null):void 0,onClick:d.type==="color"?()=>o(d.color):void 0},h))})},hv={display:"flex",gap:"10px",width:"330px",height:"24px"},mv={width:"24px",height:"24px",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s ease",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},gv={border:"1px solid rgba(0, 0, 0, 0.1)"},yv={width:"24px",height:"24px",backgroundColor:"transparent",border:"1px solid rgba(204, 204, 204, 0.1)",borderRadius:"4px",cursor:"default"};function fe(a){try{return String(a||"").replace(/\([^)]*\)/g,"").replace(/[^A-Za-z0-9]/g,"")}catch{return String(a||"")}}function nn(a){try{const o=(a??"").trim();if(!o)return null;let s=o.startsWith("#")?o.slice(1):o;if(s=s.replace(/[^A-Fa-f0-9]/g,""),s.length===3){const c=s[0],d=s[1],h=s[2];return`#${(c+c+d+d+h+h).toUpperCase()}FF`}if(s.length===4){const c=s[0],d=s[1],h=s[2],f=s[3];return`#${(c+c+d+d+h+h+f+f).toUpperCase()}`}return s.length===6?`#${s.toUpperCase()}FF`:s.length===8?`#${s.toUpperCase()}`:null}catch{return null}}async function pv(){try{const a=await fetch("/align/api/color_presets");if(!a.ok)return;const o=await a.json();let s=Array.isArray(o?.nodes)?o.nodes:[];s=s.filter(h=>fe(h.type)!==fe("MarkdownNote"));const c=s.map(h=>({title:String(h.type||"Unknown"),color:h.color||void 0,bgcolor:h.bgcolor||void 0}));Pt.getState().setPresetsFromConfig?.(c)}catch{}}async function vv(){try{Pt.getState().clearPresets(),await fetch("/align/api/color_presets/all",{method:"DELETE"})}catch{}}async function bv(){try{const a=Ce(),o=sn(a),s=[];for(const c of o||[]){const d=String(c?.type||""),h=c?.title,y=c?.properties?.["Node name for S&R"],p=String(h||y||d||"Unknown");if(fe(d)===fe("MarkdownNote")||fe(p)===fe("MarkdownNote"))continue;const m=nn(c?.color),v=nn(c?.bgcolor);(m||v)&&s.push({type:p,color:m,bgcolor:v})}return s}catch{return[]}}async function Sv(){try{const o=Ce()?.graph?._nodes||[],s=[];for(const c of o||[]){const d=String(c?.type||""),h=c?.title,y=c?.properties?.["Node name for S&R"],p=String(h||y||d||"Unknown");if(fe(d)===fe("MarkdownNote")||fe(p)===fe("MarkdownNote"))continue;const m=nn(c?.color),v=nn(c?.bgcolor);(m||v)&&s.push({type:p,color:m,bgcolor:v})}return s}catch{return[]}}async function xv(){try{let a=await bv();if(a.length||(a=await Sv()),a=a.filter(f=>fe(f.type)!==fe("MarkdownNote")),!a.length)return!1;const o=await fetch("/align/api/color_presets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({nodes:a})});if(!o.ok)return!1;const s=await o.json(),d=(Array.isArray(s?.config?.nodes)?s.config.nodes:a).map(f=>({title:String(f.type||"Unknown"),color:f.color||void 0,bgcolor:f.bgcolor||void 0}));return Pt.getState().setPresetsFromConfig?.(d),!0}catch{return!1}}async function Cv(){try{const a=Ce();let o=sn(a);(o?.length||0)>0||(o=a?.graph?._nodes||[]);const c=oc(),d=await fetch("/align/api/color_presets");if(!d.ok)return;const h=await d.json(),f=Array.isArray(h?.nodes)?h.nodes:[];for(const y of o){const p=String(y?.type||"");if(fe(p)===fe("MarkdownNote"))continue;const m=String(y?.type||""),v=y?.properties,C=String(v?.["Node name for S&R"]||""),_=String(y?.title||""),R=fe(_),V=f.find(U=>U.type===_)||(C?f.find(U=>U.type===C):void 0)||f.find(U=>fe(U.type)===R)||f.find(U=>U.type===m);if(!V)continue;const Y=nn(V.color),F=nn(V.bgcolor);if(c){if(Y)y.color=Y;else if(F)try{const U=Wu(F);y.color=nn(U)||void 0}catch{y.color=F}}else if(F){y.bgcolor=F;try{const U=Wu(F);y.color=nn(U)||void 0}catch{y.color=F}}else Y&&(y.color=Y)}on(a)}catch{}}const Av=({className:a="",onColorSelect:o})=>{const{presets:s,presetLabels:c,presetLabelList:d,removePreset:h}=ev(),{setFromHex:f}=fn(),[y,p]=T.useState({visible:!1,x:0,y:0,colorIndex:-1}),m=T.useRef(null),[v,C]=T.useState(null);T.useEffect(()=>{pv().catch(()=>{})},[]);const _=T.useCallback(J=>{f(J),o?.(J)},[f,o]),R=T.useCallback((J,lt)=>{const q=J.target.getBoundingClientRect(),K=String(lt||"Preset").replace(/\s*\((?:header|panel)\)\s*$/i,"");C({x:q.left+q.width/2,y:q.top-8,label:K})},[]),V=T.useCallback(()=>{C(null)},[]),Y=T.useCallback((J,lt)=>{J.preventDefault(),p({visible:!0,x:J.clientX,y:J.clientY,colorIndex:lt})},[]),F=T.useCallback(()=>{p(J=>({...J,visible:!1}))},[]),U=T.useCallback(()=>{const J=[],lt={};for(const q of s){if(q==="placeholder")continue;const K=q,gt=lt[K]||0;lt[K]=gt+1;const Ot=(d?.[K]||[])[gt]||c?.[K]||"Preset";J.push({color:K,label:Ot})}return J.length<30&&J.push({placeholder:!0}),J},[s,d,c]),W=U(),at=T.useCallback(async()=>{try{const J=y.colorIndex,lt=J>=0?s[J]:void 0;if(!lt){F();return}const q=String(lt).toUpperCase(),K=U(),gt=J>=0&&J{}),typeof h=="function"&&h(J)}catch(J){console.warn("Delete Color failed",J)}finally{F()}},[y.colorIndex,s,h,F,U]),st=T.useCallback(J=>{m.current&&(J.preventDefault(),m.current.scrollTop+=J.deltaY)},[]);return G.jsxs(G.Fragment,{children:[G.jsxs("div",{className:`relative ${a}`,style:{width:"330px",height:"122px",fontFamily:"Inter, sans-serif"},onClick:F,children:[G.jsx("div",{className:"flex items-center",style:{width:"330px",height:"20px",borderBottom:"1px solid rgba(155, 146, 146, 0.1)"},children:G.jsx("span",{className:"text-center",style:{color:"#CCCCCC",fontSize:"12px",fontWeight:500,lineHeight:"14.52px",marginLeft:"-1px",marginTop:"6px"},children:"Color Presets"})}),G.jsxs("div",{ref:m,className:"overflow-auto",style:{width:"330px",height:"102px",marginTop:"10px",scrollbarWidth:"none",msOverflowStyle:"none",paddingBottom:"10px"},onWheel:st,children:[G.jsx("style",{children:` + `,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px"},onMouseDown:F,children:[G.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(90deg, transparent 0%, ${q} 100%)`,borderRadius:"10px"}}),G.jsx("div",{className:"absolute pointer-events-none",style:{left:`${C.x}px`,top:"0px",transform:"translate(-50%, 0%)",width:"10px",height:"10px",borderRadius:"50%",border:"2px solid #CCCCCC",backgroundColor:"white",boxShadow:"0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.3)",zIndex:10}})]})},dv=()=>{const{displayData:a,handleHistoryColorClick:o}=za(),[s,c]=T.useState(null);return G.jsx("div",{style:hv,children:a.map((d,h)=>G.jsx("div",{style:{...mv,...d.type==="color"?gv:yv,backgroundColor:d.type==="color"?d.color:"transparent",transform:d.type==="color"&&s===h?"scale(1.1)":"scale(1)",boxShadow:d.type==="color"&&s===h?"0 2px 8px rgba(0, 0, 0, 0.2)":"none",zIndex:d.type==="color"&&s===h?1:0},onMouseEnter:d.type==="color"?()=>c(h):void 0,onMouseLeave:d.type==="color"?()=>c(null):void 0,onClick:d.type==="color"?()=>o(d.color):void 0},h))})},hv={display:"flex",gap:"10px",width:"330px",height:"24px"},mv={width:"24px",height:"24px",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s ease",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},gv={border:"1px solid rgba(0, 0, 0, 0.1)"},yv={width:"24px",height:"24px",backgroundColor:"transparent",border:"1px solid rgba(204, 204, 204, 0.1)",borderRadius:"4px",cursor:"default"};function fe(a){try{return String(a||"").replace(/\([^)]*\)/g,"").replace(/[^A-Za-z0-9]/g,"")}catch{return String(a||"")}}function nn(a){try{const o=(a??"").trim();if(!o)return null;let s=o.startsWith("#")?o.slice(1):o;if(s=s.replace(/[^A-Fa-f0-9]/g,""),s.length===3){const c=s[0],d=s[1],h=s[2];return`#${(c+c+d+d+h+h).toUpperCase()}FF`}if(s.length===4){const c=s[0],d=s[1],h=s[2],f=s[3];return`#${(c+c+d+d+h+h+f+f).toUpperCase()}`}return s.length===6?`#${s.toUpperCase()}FF`:s.length===8?`#${s.toUpperCase()}`:null}catch{return null}}async function pv(){try{const a=await fetch("/align/api/color_presets");if(!a.ok)return;const o=await a.json();let s=Array.isArray(o?.nodes)?o.nodes:[];s=s.filter(h=>fe(h.type)!==fe("MarkdownNote"));const c=s.map(h=>({title:String(h.type||"Unknown"),color:h.color||void 0,bgcolor:h.bgcolor||void 0}));Pt.getState().setPresetsFromConfig?.(c)}catch{}}async function vv(){try{Pt.getState().clearPresets(),await fetch("/align/api/color_presets/all",{method:"DELETE"})}catch{}}async function bv(){try{const a=Ce(),o=sn(a),s=[];for(const c of o||[]){const d=String(c?.type||""),h=c?.title,y=c?.properties?.["Node name for S&R"],p=String(h||y||d||"Unknown");if(fe(d)===fe("MarkdownNote")||fe(p)===fe("MarkdownNote"))continue;const m=nn(c?.color),v=nn(c?.bgcolor);(m||v)&&s.push({type:p,color:m,bgcolor:v})}return s}catch{return[]}}async function Sv(){try{const o=Ce()?.graph?._nodes||[],s=[];for(const c of o||[]){const d=String(c?.type||""),h=c?.title,y=c?.properties?.["Node name for S&R"],p=String(h||y||d||"Unknown");if(fe(d)===fe("MarkdownNote")||fe(p)===fe("MarkdownNote"))continue;const m=nn(c?.color),v=nn(c?.bgcolor);(m||v)&&s.push({type:p,color:m,bgcolor:v})}return s}catch{return[]}}async function xv(){try{let a=await bv();if(a.length||(a=await Sv()),a=a.filter(f=>fe(f.type)!==fe("MarkdownNote")),!a.length)return!1;const o=await fetch("/align/api/color_presets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({nodes:a})});if(!o.ok)return!1;const s=await o.json(),d=(Array.isArray(s?.config?.nodes)?s.config.nodes:a).map(f=>({title:String(f.type||"Unknown"),color:f.color||void 0,bgcolor:f.bgcolor||void 0}));return Pt.getState().setPresetsFromConfig?.(d),!0}catch{return!1}}async function Cv(){try{const a=Ce();let o=sn(a);(o?.length||0)>0||(o=a?.graph?._nodes||[]);const c=oc(),d=await fetch("/align/api/color_presets");if(!d.ok)return;const h=await d.json(),f=Array.isArray(h?.nodes)?h.nodes:[];for(const y of o){const p=String(y?.type||"");if(fe(p)===fe("MarkdownNote"))continue;const m=String(y?.type||""),v=y?.properties,C=String(v?.["Node name for S&R"]||""),_=String(y?.title||""),D=fe(_),q=f.find(U=>U.type===_)||(C?f.find(U=>U.type===C):void 0)||f.find(U=>fe(U.type)===D)||f.find(U=>U.type===m);if(!q)continue;const V=nn(q.color),F=nn(q.bgcolor);if(c){if(V)y.color=V;else if(F)try{const U=Wu(F);y.color=nn(U)||void 0}catch{y.color=F}}else if(F){y.bgcolor=F;try{const U=Wu(F);y.color=nn(U)||void 0}catch{y.color=F}}else V&&(y.color=V)}on(a)}catch{}}const Av=({className:a="",onColorSelect:o})=>{const{presets:s,presetLabels:c,presetLabelList:d,removePreset:h}=ev(),{setFromHex:f}=fn(),[y,p]=T.useState({visible:!1,x:0,y:0,colorIndex:-1}),m=T.useRef(null),[v,C]=T.useState(null);T.useEffect(()=>{pv().catch(()=>{})},[]);const _=T.useCallback(J=>{f(J),o?.(J)},[f,o]),D=T.useCallback((J,lt)=>{const X=J.target.getBoundingClientRect(),K=String(lt||"Preset").replace(/\s*\((?:header|panel)\)\s*$/i,"");C({x:X.left+X.width/2,y:X.top-8,label:K})},[]),q=T.useCallback(()=>{C(null)},[]),V=T.useCallback((J,lt)=>{J.preventDefault(),p({visible:!0,x:J.clientX,y:J.clientY,colorIndex:lt})},[]),F=T.useCallback(()=>{p(J=>({...J,visible:!1}))},[]),U=T.useCallback(()=>{const J=[],lt={};for(const X of s){if(X==="placeholder")continue;const K=X,gt=lt[K]||0;lt[K]=gt+1;const Ot=(d?.[K]||[])[gt]||c?.[K]||"Preset";J.push({color:K,label:Ot})}return J.length<30&&J.push({placeholder:!0}),J},[s,d,c]),W=U(),at=T.useCallback(async()=>{try{const J=y.colorIndex,lt=J>=0?s[J]:void 0;if(!lt){F();return}const X=String(lt).toUpperCase(),K=U(),gt=J>=0&&J{}),typeof h=="function"&&h(J)}catch(J){console.warn("Delete Color failed",J)}finally{F()}},[y.colorIndex,s,h,F,U]),st=T.useCallback(J=>{m.current&&(J.preventDefault(),m.current.scrollTop+=J.deltaY)},[]);return G.jsxs(G.Fragment,{children:[G.jsxs("div",{className:`relative ${a}`,style:{width:"330px",height:"122px",fontFamily:"Inter, sans-serif"},onClick:F,children:[G.jsx("div",{className:"flex items-center",style:{width:"330px",height:"20px",borderBottom:"1px solid rgba(155, 146, 146, 0.1)"},children:G.jsx("span",{className:"text-center",style:{color:"#CCCCCC",fontSize:"12px",fontWeight:500,lineHeight:"14.52px",marginLeft:"-1px",marginTop:"6px"},children:"Color Presets"})}),G.jsxs("div",{ref:m,className:"overflow-auto",style:{width:"330px",height:"102px",marginTop:"10px",scrollbarWidth:"none",msOverflowStyle:"none",paddingBottom:"10px"},onWheel:st,children:[G.jsx("style",{children:` .overflow-auto::-webkit-scrollbar { display: none; } - `}),G.jsx("div",{className:"grid grid-cols-10 gap-2.5",style:{gridTemplateColumns:"repeat(10, 24px)",gridAutoRows:"24px",rowGap:"10px"},children:W.map((J,lt)=>"placeholder"in J?G.jsx("div",{style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"1px solid rgba(204, 204, 204, 0.1)",borderRadius:"4px",cursor:"default"}},`placeholder-${lt}`):G.jsx("div",{className:"cursor-pointer transition-all duration-200 hover:scale-110",style:{width:"24px",height:"24px",backgroundColor:J.color,border:"1px solid rgba(0, 0, 0, 0.1)",borderRadius:"4px"},onClick:()=>_(J.color),onContextMenu:q=>Y(q,lt),onMouseEnter:q=>R(q,J.label),onMouseLeave:V},`color-${lt}`))})]})]}),v&&G.jsx("div",{className:"fixed bg-[#1a1a1a] text-gray-200 text-xs px-2 py-1 rounded-md shadow",style:{left:v.x,top:v.y,transform:"translate(-50%, -100%)",zIndex:500,pointerEvents:"none",border:"1px solid rgba(255,255,255,0.1)"},children:v.label}),y.visible&&G.jsx("div",{className:"fixed bg-[#1a1a1a] border border-gray-600/20 border-opacity-10 rounded-md ",style:{left:y.x,top:y.y,zIndex:500},children:G.jsx("button",{className:"block w-full px-3 py-2 text-left text-sm text-gray-200 hover:bg-[#2a2a2a] hover:rounded-md",onClick:at,children:"Delete Color"})})]})},Ev=(a,o,s,c,d)=>({handleMouseDown:p=>{s(!0);const m=a.current?.getBoundingClientRect();m&&d({x:p.clientX-m.left,y:p.clientY-m.top})},handleMouseMove:p=>{if(o.isDragging){const m=window.innerWidth||document.documentElement.clientWidth,v=window.innerHeight||document.documentElement.clientHeight,C=346,_=526,R=p.clientX-o.dragStart.x,V=p.clientY-o.dragStart.y,Y=Math.max(0,Math.min(R,m-C)),F=Math.max(0,Math.min(V,v-_));c({x:Y,y:F})}},handleMouseUp:()=>{s(!1)}}),Mv=(a,o,s)=>({handleClear:()=>{window.confirm("Clear all preset colors?? This action is irreversible.")&&a?.()},handleSave:()=>{o?.()},handleClose:f=>{f.stopPropagation(),s?.()}}),V0=a=>{const{panelWidth:o,panelHeight:s,rightMargin:c}=a,d=window.innerWidth||document.documentElement.clientWidth,h=window.innerHeight||document.documentElement.clientHeight,f=Math.max(0,Math.min(d-o-c,d-o)),y=(h-s)/2,p=Math.max(0,Math.min(y,h-s));return{x:f,y:p}},zv=()=>({getDefaultPosition:()=>V0({panelWidth:346,panelHeight:526,rightMargin:20}),getInitialPosition:V0}),Tv=({className:a="",onClose:o})=>{const[s,c]=T.useState(!1),{getDefaultPosition:d}=zv(),h="align_colorpicker_position",f=346,y=526,p=H=>{const k=window.innerWidth||document.documentElement.clientWidth,ht=window.innerHeight||document.documentElement.clientHeight;return{x:Math.max(0,Math.min(H.x,k-f)),y:Math.max(0,Math.min(H.y,ht-y))}},[m,v]=T.useState(()=>{try{const H=localStorage.getItem(h);if(H){const k=JSON.parse(H);return p(k)}}catch{}return d()}),C=T.useRef(m);T.useEffect(()=>{C.current=m},[m]);const[_,R]=T.useState({x:0,y:0}),V=T.useRef(null),[Y,F]=T.useState(!1),{hue:U,saturation:W,value:at,setSaturation:st,setValue:J,setFromRGB:lt,setFromHex:q}=fn(),{handleAddCurrentColor:K}=za(),gt=(H,k)=>{st(H),J(k)},Jt=(H,k)=>{st(H),J(k),K()},Ot=H=>{lt(H.r,H.g,H.b),K()},Ut=Ev(V,{isDragging:s,dragStart:_},c,v,R),Xt=async()=>{await vv()},Z=async()=>{await xv()},A=()=>{Cv()},O=Mv(Xt,Z,o);return T.useEffect(()=>{if(s)document.addEventListener("mousemove",Ut.handleMouseMove),document.addEventListener("mouseup",Ut.handleMouseUp);else{document.removeEventListener("mousemove",Ut.handleMouseMove),document.removeEventListener("mouseup",Ut.handleMouseUp);try{localStorage.setItem(h,JSON.stringify(C.current))}catch{}}return()=>{document.removeEventListener("mousemove",Ut.handleMouseMove),document.removeEventListener("mouseup",Ut.handleMouseUp)}},[s,Ut.handleMouseMove,Ut.handleMouseUp]),T.useEffect(()=>{const H=()=>{v(k=>p(k))};return window.addEventListener("resize",H),()=>window.removeEventListener("resize",H)},[]),T.useEffect(()=>{let H="";const ht=setInterval(()=>{try{const S=Ce(),B=sn(S),X=rn(S);if((B?.length||0)+(X?.length||0)===1){let it;if(B?.length===1){const rt=B[0];it=rt?.bgcolor||rt?.color}else X?.length===1&&(it=X[0]?.color);if(it&&typeof it=="string"&&W2(it)){const rt=`1:${it.toUpperCase()}`;rt!==H&&(H=rt,q(it));return}}H=""}catch{}},150);return()=>clearInterval(ht)},[q]),G.jsxs("div",{ref:V,className:`w-[346px] h-[526px] bg-[#0c0c0c] rounded-lg flex flex-col shadow-lg pointer-events-auto ${a}`,style:{backgroundColor:"#0c0c0c",fontFamily:"Inter, sans-serif",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.4)",position:"fixed",left:m.x,top:m.y,zIndex:1e3},children:[G.jsxs("div",{className:"w-full h-[30px] flex items-center justify-between px-2 relative border-b border-gray-600/10 cursor-move select-none",onMouseDown:Ut.handleMouseDown,children:[G.jsx("div",{className:"w-3.5 h-3.5 ml-2 pointer-events-auto cursor-pointer",onClick:H=>{H.stopPropagation(),F(k=>!k)},onMouseDown:H=>{H.stopPropagation()},children:G.jsx(Is,{className:"w-full h-full text-[#FFB900]"})}),G.jsx("div",{className:"absolute left-1/2 transform -translate-x-1/2 pointer-events-none",children:G.jsx("span",{className:"text-[14px] font-medium leading-[17px] text-center",style:{color:"#CCCCCC",fontFamily:"Inter, sans-serif",fontWeight:500},children:"Color Picker"})}),G.jsx("div",{className:"w-5 h-5 mr-1 flex items-center justify-center cursor-pointer pointer-events-auto",onClick:O.handleClose,children:G.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"text-gray-400 hover:text-gray-300",children:G.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),Y&&G.jsxs("div",{className:"absolute top-0 right-[calc(100%+8px)] bg-[#0c0c0c] rounded-md p-2 shadow-xl flex flex-col items-center gap-2",style:{zIndex:1001},children:[G.jsx("a",{href:"https://github.com/Moooonet/ComfyUI-Align",target:"_blank",rel:"noopener noreferrer",className:"w-8 h-8 rounded-full flex items-center justify-center text-[#FFFFFF] transition-transform hover:scale-105",title:"GitHub",children:G.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:G.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}),G.jsx("a",{href:"https://youtu.be/gQd9pWg4",target:"_blank",rel:"noopener noreferrer",className:"w-8 h-8 rounded-full flex items-center justify-center text-[#D92525] transition-transform hover:scale-105",title:"YouTube",children:G.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:G.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})}),G.jsx("a",{href:"https://space.bilibili.com/3546578992236984",target:"_blank",rel:"noopener noreferrer",className:"w-8 h-8 rounded-full flex items-center justify-center text-[#00A1D6] transition-transform hover:scale-105",title:"Bilibili",children:G.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:G.jsx("path",{d:`M17.813 4.653h.854c1.51.054 2.769.578 3.773 1.574 1.004.995 1.524 2.249 1.56 3.76v7.36c-.036 1.51-.556 2.769-1.56 3.773s-2.262 1.524-3.773 1.56H5.333c-1.51-.036-2.769-.556-3.773-1.56S.036 18.858 0 17.347v-7.36c.036-1.511.556-2.765 1.56-3.76 1.004-.996 2.262-1.52 3.773-1.574h.774l-1.174-1.12a1.234 1.234 0 0 1-.373-.906c0-.356.124-.658.373-.907l.027-.027c.267-.249.573-.373.92-.373.347 0 .653.124.92.373L9.653 4.44c.071.071.134.142.187.213h4.267a.836.836 0 0 1 .16-.213l2.853-2.747c.267-.249.573-.373.92-.373.347 0 .662.151.929.4.267.249.391.551.391.907 0 .355-.124.657-.373.906L17.813 4.653zM5.333 7.24c-.746.018-1.373.276-1.88.773-.506.498-.769 1.13-.786 1.894v7.52c.017.764.28 1.395.786 1.893.507.498 1.134.756 1.88.773h13.334c.746-.017 1.373- - .275 1.88-.773.506-.498.769-1.129.786-1.893v-7.52c-.017-.765-.28-1.396-.786-1.894-.507-.497-1.134-.755-1.88-.773H5.333zM8 11.107c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c.017-.391.15-.711.4-.96.249-.249.56-.373.933-.373zm8 0c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c.017-.391.15-.711.4-.96.249-.249.56-.373.933-.373z`})})})]}),G.jsxs("div",{className:"flex-1 flex flex-col pt-2.5 px-2 overflow-hidden",children:[G.jsx("div",{className:"flex justify-center",children:G.jsx(av,{hue:U,saturation:W,value:at,onChange:gt,onChangeComplete:Jt})}),G.jsxs("div",{className:"mt-2.5 flex flex-col items-center overflow-hidden",children:[G.jsxs("div",{className:"flex items-end w-[330px]",children:[G.jsx("div",{className:"shrink-0",children:G.jsx(iv,{onColorPicked:Ot})}),G.jsx("div",{className:"w-2.5 shrink-0"}),G.jsxs("div",{className:"flex flex-col items-end gap-2.5 flex-1",children:[G.jsx(sv,{}),G.jsx(fv,{})]})]}),G.jsxs("div",{className:"mt-2.5 w-[330px] flex justify-between items-center",children:[G.jsx(Am,{}),G.jsx(cv,{})]}),G.jsx("div",{className:"mt-2.5 w-[330px] flex justify-center",children:G.jsx(dv,{})}),G.jsx("div",{className:"mt-2.5 w-[330px] flex justify-center",children:G.jsx(Av,{})})]})]}),G.jsxs("div",{className:"w-full h-10 flex items-center justify-between px-2 border-t border-gray-600/10 relative",style:{zIndex:1e3},children:[G.jsx("button",{onClick:O.handleClear,className:"w-[50px] h-5 rounded flex items-center justify-center cursor-pointer hover:opacity-80 transition-opacity shadow-md",style:{boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.3)"},children:G.jsx("span",{className:"text-[14px] leading-3 text-center",style:{color:"rgba(204, 204, 204, 0.88)",fontFamily:"Inter, sans-serif",fontWeight:400},children:"Clear"})}),G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("button",{onClick:A,className:"w-[50px] h-5 rounded flex items-center justify-center cursor-pointer hover:opacity-80 transition-opacity shadow-md",style:{boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.3)"},children:G.jsx("span",{className:"text-[14px] leading-3 text-center",style:{color:"rgba(204, 204, 204, 0.88)",fontFamily:"Inter, sans-serif",fontWeight:400},children:"Apply"})}),G.jsx("button",{onClick:O.handleSave,className:"w-[50px] h-5 rounded flex items-center justify-center cursor-pointer hover:opacity-80 transition-opacity shadow-md",style:{boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.3)"},children:G.jsx("span",{className:"text-[14px] leading-3 text-center",style:{color:"rgba(204, 204, 204, 0.88)",fontFamily:"Inter, sans-serif",fontWeight:400},children:"Save"})})]})]})]})};function wv(){const[a,o]=T.useState(!1),{isOpen:s,position:c,setMouse:d,toggleAtMouse:h,setPosition:f,panelWidth:y,panelHeight:p}=an(),m=()=>{o(!a)};T.useEffect(()=>{const R=()=>o(V=>!V);return window.addEventListener("comfyuiAlign.toggleColorPicker",R),()=>{window.removeEventListener("comfyuiAlign.toggleColorPicker",R)}},[]);const v=()=>{o(!1)},C=T.useCallback(R=>{const V=window.innerWidth||document.documentElement.clientWidth,Y=window.innerHeight||document.documentElement.clientHeight;return{x:Math.max(0,Math.min(R.x,V-y)),y:Math.max(0,Math.min(R.y,Y-p))}},[y,p]);T.useEffect(()=>{const R=V=>d(V.clientX,V.clientY);return window.addEventListener("mousemove",R),()=>window.removeEventListener("mousemove",R)},[d]);const _=T.useMemo(()=>typeof window<"u"&&!!window.app,[]);return T.useEffect(()=>{if(_)return;const R=V=>{V.code==="Backquote"&&(V.preventDefault(),V.stopPropagation(),h())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[_,h]),T.useEffect(()=>{const R=()=>{const V=an.getState().position;f(C(V))};return window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[C,f]),G.jsxs("div",{className:"h-screen relative pointer-events-none",children:[s&&G.jsx("div",{className:"fixed pointer-events-none",style:{left:c.x,top:c.y,zIndex:2e3},children:G.jsxs("div",{className:"flex flex-col items-center",children:[G.jsx(vm,{}),G.jsx("div",{className:"pointer-events-auto",children:G.jsx(nv,{onMoonIconClick:m})})]})}),a&&G.jsx(Tv,{onClose:v})]})}const _v=Object.freeze(Object.defineProperty({__proto__:null,default:wv},Symbol.toStringTag,{value:"Module"}));function Hv(a){if(a>=0&&a<=8){const o=Zs[a],s=Pt.getState();s.setFromHex(o),s.addToHistory(o),xm(o);return}if(a===9){Cm();return}if(a===10){window.dispatchEvent(new CustomEvent("comfyuiAlign.toggleColorPicker"));return}}const Nv=Object.freeze(Object.defineProperty({__proto__:null,executeColorBarAction:Hv},Symbol.toStringTag,{value:"Module"})); + `}),G.jsx("div",{className:"grid grid-cols-10 gap-2.5",style:{gridTemplateColumns:"repeat(10, 24px)",gridAutoRows:"24px",rowGap:"10px"},children:W.map((J,lt)=>"placeholder"in J?G.jsx("div",{style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"1px solid rgba(204, 204, 204, 0.1)",borderRadius:"4px",cursor:"default"}},`placeholder-${lt}`):G.jsx("div",{className:"cursor-pointer transition-all duration-200 hover:scale-110",style:{width:"24px",height:"24px",backgroundColor:J.color,border:"1px solid rgba(0, 0, 0, 0.1)",borderRadius:"4px"},onClick:()=>_(J.color),onContextMenu:X=>V(X,lt),onMouseEnter:X=>D(X,J.label),onMouseLeave:q},`color-${lt}`))})]})]}),v&&G.jsx("div",{className:"fixed bg-[#1a1a1a] text-gray-200 text-xs px-2 py-1 rounded-md shadow",style:{left:v.x,top:v.y,transform:"translate(-50%, -100%)",zIndex:500,pointerEvents:"none",border:"1px solid rgba(255,255,255,0.1)"},children:v.label}),y.visible&&G.jsx("div",{className:"fixed bg-[#1a1a1a] border border-gray-600/20 border-opacity-10 rounded-md ",style:{left:y.x,top:y.y,zIndex:500},children:G.jsx("button",{className:"block w-full px-3 py-2 text-left text-sm text-gray-200 hover:bg-[#2a2a2a] hover:rounded-md",onClick:at,children:"Delete Color"})})]})},Ev=(a,o,s,c,d)=>({handleMouseDown:p=>{s(!0);const m=a.current?.getBoundingClientRect();m&&d({x:p.clientX-m.left,y:p.clientY-m.top})},handleMouseMove:p=>{if(o.isDragging){const m=window.innerWidth||document.documentElement.clientWidth,v=window.innerHeight||document.documentElement.clientHeight,C=346,_=526,D=p.clientX-o.dragStart.x,q=p.clientY-o.dragStart.y,V=Math.max(0,Math.min(D,m-C)),F=Math.max(0,Math.min(q,v-_));c({x:V,y:F})}},handleMouseUp:()=>{s(!1)}}),Mv=(a,o,s)=>({handleClear:()=>{window.confirm("Clear all preset colors?? This action is irreversible.")&&a?.()},handleSave:()=>{o?.()},handleClose:f=>{f.stopPropagation(),s?.()}}),V0=a=>{const{panelWidth:o,panelHeight:s,rightMargin:c}=a,d=window.innerWidth||document.documentElement.clientWidth,h=window.innerHeight||document.documentElement.clientHeight,f=Math.max(0,Math.min(d-o-c,d-o)),y=(h-s)/2,p=Math.max(0,Math.min(y,h-s));return{x:f,y:p}},zv=()=>({getDefaultPosition:()=>V0({panelWidth:346,panelHeight:526,rightMargin:20}),getInitialPosition:V0}),Tv=({className:a="",onClose:o})=>{const[s,c]=T.useState(!1),{getDefaultPosition:d}=zv(),h="align_colorpicker_position",f=346,y=526,p=H=>{const k=window.innerWidth||document.documentElement.clientWidth,ht=window.innerHeight||document.documentElement.clientHeight;return{x:Math.max(0,Math.min(H.x,k-f)),y:Math.max(0,Math.min(H.y,ht-y))}},[m,v]=T.useState(()=>{try{const H=localStorage.getItem(h);if(H){const k=JSON.parse(H);return p(k)}}catch{}return d()}),C=T.useRef(m);T.useEffect(()=>{C.current=m},[m]);const[_,D]=T.useState({x:0,y:0}),q=T.useRef(null),[V,F]=T.useState(!1),{hue:U,saturation:W,value:at,setSaturation:st,setValue:J,setFromRGB:lt,setFromHex:X}=fn(),{handleAddCurrentColor:K}=za(),gt=(H,k)=>{st(H),J(k)},Jt=(H,k)=>{st(H),J(k),K()},Ot=H=>{lt(H.r,H.g,H.b),K()},Ut=Ev(q,{isDragging:s,dragStart:_},c,v,D),Xt=async()=>{await vv()},Z=async()=>{await xv()},A=()=>{Cv()},O=Mv(Xt,Z,o);return T.useEffect(()=>{if(s)document.addEventListener("mousemove",Ut.handleMouseMove),document.addEventListener("mouseup",Ut.handleMouseUp);else{document.removeEventListener("mousemove",Ut.handleMouseMove),document.removeEventListener("mouseup",Ut.handleMouseUp);try{localStorage.setItem(h,JSON.stringify(C.current))}catch{}}return()=>{document.removeEventListener("mousemove",Ut.handleMouseMove),document.removeEventListener("mouseup",Ut.handleMouseUp)}},[s,Ut.handleMouseMove,Ut.handleMouseUp]),T.useEffect(()=>{const H=()=>{v(k=>p(k))};return window.addEventListener("resize",H),()=>window.removeEventListener("resize",H)},[]),T.useEffect(()=>{let H="";const ht=setInterval(()=>{try{const S=Ce(),B=sn(S),Y=rn(S);if((B?.length||0)+(Y?.length||0)===1){let it;if(B?.length===1){const rt=B[0];it=rt?.bgcolor||rt?.color}else Y?.length===1&&(it=Y[0]?.color);if(it&&typeof it=="string"&&W2(it)){const rt=`1:${it.toUpperCase()}`;rt!==H&&(H=rt,X(it));return}}H=""}catch{}},150);return()=>clearInterval(ht)},[X]),G.jsxs("div",{ref:q,className:`w-[346px] h-[526px] bg-[#0c0c0c] rounded-lg flex flex-col shadow-lg pointer-events-auto ${a}`,style:{backgroundColor:"#0c0c0c",fontFamily:"Inter, sans-serif",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.4)",position:"fixed",left:m.x,top:m.y,zIndex:1e3},children:[G.jsxs("div",{className:"w-full h-[30px] flex items-center justify-between px-2 relative border-b border-gray-600/10 cursor-move select-none",onMouseDown:Ut.handleMouseDown,children:[G.jsx("div",{className:"w-3.5 h-3.5 ml-2 pointer-events-auto cursor-pointer",onClick:H=>{H.stopPropagation(),F(k=>!k)},onMouseDown:H=>{H.stopPropagation()},children:G.jsx(Is,{className:"w-full h-full text-[#FFB900]"})}),G.jsx("div",{className:"absolute left-1/2 transform -translate-x-1/2 pointer-events-none",children:G.jsx("span",{className:"text-[14px] font-medium leading-[17px] text-center",style:{color:"#CCCCCC",fontFamily:"Inter, sans-serif",fontWeight:500},children:"Color Picker"})}),G.jsx("div",{className:"w-5 h-5 mr-1 flex items-center justify-center cursor-pointer pointer-events-auto",onClick:O.handleClose,children:G.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"text-gray-400 hover:text-gray-300",children:G.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),V&&G.jsxs("div",{className:"absolute top-0 right-[calc(100%+8px)] bg-[#0c0c0c] rounded-md p-2 shadow-xl flex flex-col items-center gap-2",style:{zIndex:1001},children:[G.jsx("a",{href:"https://github.com/Moooonet/ComfyUI-Align",target:"_blank",rel:"noopener noreferrer",className:"w-8 h-8 rounded-full flex items-center justify-center text-[#FFFFFF] transition-transform hover:scale-105",title:"GitHub",children:G.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:G.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}),G.jsx("a",{href:"https://youtu.be/gQd9pWg4",target:"_blank",rel:"noopener noreferrer",className:"w-8 h-8 rounded-full flex items-center justify-center text-[#D92525] transition-transform hover:scale-105",title:"YouTube",children:G.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:G.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})}),G.jsx("a",{href:"https://space.bilibili.com/3546578992236984",target:"_blank",rel:"noopener noreferrer",className:"w-8 h-8 rounded-full flex items-center justify-center text-[#00A1D6] transition-transform hover:scale-105",title:"Bilibili",children:G.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:G.jsx("path",{d:`M17.813 4.653h.854c1.51.054 2.769.578 3.773 1.574 1.004.995 1.524 2.249 1.56 3.76v7.36c-.036 1.51-.556 2.769-1.56 3.773s-2.262 1.524-3.773 1.56H5.333c-1.51-.036-2.769-.556-3.773-1.56S.036 18.858 0 17.347v-7.36c.036-1.511.556-2.765 1.56-3.76 1.004-.996 2.262-1.52 3.773-1.574h.774l-1.174-1.12a1.234 1.234 0 0 1-.373-.906c0-.356.124-.658.373-.907l.027-.027c.267-.249.573-.373.92-.373.347 0 .653.124.92.373L9.653 4.44c.071.071.134.142.187.213h4.267a.836.836 0 0 1 .16-.213l2.853-2.747c.267-.249.573-.373.92-.373.347 0 .662.151.929.4.267.249.391.551.391.907 0 .355-.124.657-.373.906L17.813 4.653zM5.333 7.24c-.746.018-1.373.276-1.88.773-.506.498-.769 1.13-.786 1.894v7.52c.017.764.28 1.395.786 1.893.507.498 1.134.756 1.88.773h13.334c.746-.017 1.373- + .275 1.88-.773.506-.498.769-1.129.786-1.893v-7.52c-.017-.765-.28-1.396-.786-1.894-.507-.497-1.134-.755-1.88-.773H5.333zM8 11.107c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c.017-.391.15-.711.4-.96.249-.249.56-.373.933-.373zm8 0c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c.017-.391.15-.711.4-.96.249-.249.56-.373.933-.373z`})})})]}),G.jsxs("div",{className:"flex-1 flex flex-col pt-2.5 px-2 overflow-hidden",children:[G.jsx("div",{className:"flex justify-center",children:G.jsx(av,{hue:U,saturation:W,value:at,onChange:gt,onChangeComplete:Jt})}),G.jsxs("div",{className:"mt-2.5 flex flex-col items-center overflow-hidden",children:[G.jsxs("div",{className:"flex items-end w-[330px]",children:[G.jsx("div",{className:"shrink-0",children:G.jsx(iv,{onColorPicked:Ot})}),G.jsx("div",{className:"w-2.5 shrink-0"}),G.jsxs("div",{className:"flex flex-col items-end gap-2.5 flex-1",children:[G.jsx(sv,{}),G.jsx(fv,{})]})]}),G.jsxs("div",{className:"mt-2.5 w-[330px] flex justify-between items-center",children:[G.jsx(Am,{}),G.jsx(cv,{})]}),G.jsx("div",{className:"mt-2.5 w-[330px] flex justify-center",children:G.jsx(dv,{})}),G.jsx("div",{className:"mt-2.5 w-[330px] flex justify-center",children:G.jsx(Av,{})})]})]}),G.jsxs("div",{className:"w-full h-10 flex items-center justify-between px-2 border-t border-gray-600/10 relative",style:{zIndex:1e3},children:[G.jsx("button",{onClick:O.handleClear,className:"w-[50px] h-5 rounded flex items-center justify-center cursor-pointer hover:opacity-80 transition-opacity shadow-md",style:{boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.3)"},children:G.jsx("span",{className:"text-[14px] leading-3 text-center",style:{color:"rgba(204, 204, 204, 0.88)",fontFamily:"Inter, sans-serif",fontWeight:400},children:"Clear"})}),G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("button",{onClick:A,className:"w-[50px] h-5 rounded flex items-center justify-center cursor-pointer hover:opacity-80 transition-opacity shadow-md",style:{boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.3)"},children:G.jsx("span",{className:"text-[14px] leading-3 text-center",style:{color:"rgba(204, 204, 204, 0.88)",fontFamily:"Inter, sans-serif",fontWeight:400},children:"Apply"})}),G.jsx("button",{onClick:O.handleSave,className:"w-[50px] h-5 rounded flex items-center justify-center cursor-pointer hover:opacity-80 transition-opacity shadow-md",style:{boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.3)"},children:G.jsx("span",{className:"text-[14px] leading-3 text-center",style:{color:"rgba(204, 204, 204, 0.88)",fontFamily:"Inter, sans-serif",fontWeight:400},children:"Save"})})]})]})]})};function wv(){const[a,o]=T.useState(!1),{isOpen:s,position:c,setMouse:d,setPosition:h,panelWidth:f,panelHeight:y}=an(),p=()=>{o(!a)};T.useEffect(()=>{const C=()=>o(_=>!_);return window.addEventListener("comfyuiAlign.toggleColorPicker",C),()=>{window.removeEventListener("comfyuiAlign.toggleColorPicker",C)}},[]);const m=()=>{o(!1)},v=T.useCallback(C=>{const _=window.innerWidth||document.documentElement.clientWidth,D=window.innerHeight||document.documentElement.clientHeight;return{x:Math.max(0,Math.min(C.x,_-f)),y:Math.max(0,Math.min(C.y,D-y))}},[f,y]);return T.useEffect(()=>{const C=_=>d(_.clientX,_.clientY);return window.addEventListener("mousemove",C),()=>window.removeEventListener("mousemove",C)},[d]),T.useEffect(()=>{const C=()=>{const _=an.getState().position;h(v(_))};return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[v,h]),G.jsxs("div",{className:"h-screen relative pointer-events-none",children:[s&&G.jsx("div",{className:"fixed pointer-events-none",style:{left:c.x,top:c.y,zIndex:2e3},children:G.jsxs("div",{className:"flex flex-col items-center",children:[G.jsx(vm,{}),G.jsx("div",{className:"pointer-events-auto",children:G.jsx(nv,{onMoonIconClick:p})})]})}),a&&G.jsx(Tv,{onClose:m})]})}const _v=Object.freeze(Object.defineProperty({__proto__:null,default:wv},Symbol.toStringTag,{value:"Module"}));function Hv(a){if(a>=0&&a<=8){const o=Zs[a],s=Pt.getState();s.setFromHex(o),s.addToHistory(o),xm(o);return}if(a===9){Cm();return}if(a===10){window.dispatchEvent(new CustomEvent("comfyuiAlign.toggleColorPicker"));return}}const Nv=Object.freeze(Object.defineProperty({__proto__:null,executeColorBarAction:Hv},Symbol.toStringTag,{value:"Module"}));