diff --git a/pyproject.toml b/pyproject.toml index a5f2162..0568df3 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.0.0" +version = "3.0.1" license = { file = "LICENSE.txt" } [project.urls] diff --git a/web/.vite/manifest.json b/web/.vite/manifest.json index 071d1d7..2475ac4 100644 --- a/web/.vite/manifest.json +++ b/web/.vite/manifest.json @@ -16,7 +16,7 @@ "name": "vendor" }, "src/App.tsx": { - "file": "align/App-C2DPmJLU.js", + "file": "align/App-o9G5EZyH.js", "name": "App", "src": "src/App.tsx", "isDynamicEntry": true, diff --git a/web/align/App-C2DPmJLU.js b/web/align/App-C2DPmJLU.js deleted file mode 100644 index 7780319..0000000 --- a/web/align/App-C2DPmJLU.js +++ /dev/null @@ -1,79 +0,0 @@ -import{r as o,R as he,j as a,u as ee}from"./main.js";import{executeIconAction as Z}from"./dispatch-BoyZYEfc.js";import{u as Ke,a as X,c as Xe,b as Ye,D as Le,d as Je,h as Ne,e as qe,f as Qe,l as et,i as tt,s as ot,g as rt}from"./defaultColors-Js3rIaY-.js";import{g as nt,a as st,b as at}from"./groups-dbOCuPdX.js";import"./vendor-Bzgz95E1.js";function ze(e){var n,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n{const n=dt(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{const m=c.split(we);return m[0]===""&&m.length!==1&&m.shift(),Ve(m,n)||ct(c)},getConflictingClassGroupIds:(c,m)=>{const u=t[c]||[];return m&&r[c]?[...u,...r[c]]:u}}},Ve=(e,n)=>{if(e.length===0)return n.classGroupId;const t=e[0],r=n.nextPart.get(t),s=r?Ve(e.slice(1),r):void 0;if(s)return s;if(n.validators.length===0)return;const l=e.join(we);return n.validators.find(({validator:c})=>c(l))?.classGroupId},Se=/^\[(.+)\]$/,ct=e=>{if(Se.test(e)){const n=Se.exec(e)[1],t=n?.substring(0,n.indexOf(":"));if(t)return"arbitrary.."+t}},dt=e=>{const{theme:n,classGroups:t}=e,r={nextPart:new Map,validators:[]};for(const s in t)xe(t[s],r,s,n);return r},xe=(e,n,t,r)=>{e.forEach(s=>{if(typeof s=="string"){const l=s===""?n:je(n,s);l.classGroupId=t;return}if(typeof s=="function"){if(ut(s)){xe(s(r),n,t,r);return}n.validators.push({validator:s,classGroupId:t});return}Object.entries(s).forEach(([l,c])=>{xe(c,je(n,l),t,r)})})},je=(e,n)=>{let t=e;return n.split(we).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},ut=e=>e.isThemeGetter,pt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=new Map,r=new Map;const s=(l,c)=>{t.set(l,c),n++,n>e&&(n=0,r=t,t=new Map)};return{get(l){let c=t.get(l);if(c!==void 0)return c;if((c=r.get(l))!==void 0)return s(l,c),c},set(l,c){t.has(l)?t.set(l,c):s(l,c)}}},be="!",ve=":",mt=ve.length,ht=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const l=[];let c=0,m=0,u=0,i;for(let x=0;xu?i-u:void 0;return{modifiers:l,hasImportantModifier:M,baseClassName:y,maybePostfixModifierPosition:b}};if(n){const s=n+ve,l=r;r=c=>c.startsWith(s)?l(c.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(t){const s=r;r=l=>t({className:l,parseClassName:s})}return r},gt=e=>e.endsWith(be)?e.substring(0,e.length-1):e.startsWith(be)?e.substring(1):e,ft=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const s=[];let l=[];return r.forEach(c=>{c[0]==="["||n[c]?(s.push(...l.sort(),c),l=[]):l.push(c)}),s.push(...l.sort()),s}},Ct=e=>({cache:pt(e.cacheSize),parseClassName:ht(e),sortModifiers:ft(e),...it(e)}),xt=/\s+/,bt=(e,n)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:l}=n,c=[],m=e.trim().split(xt);let u="";for(let i=m.length-1;i>=0;i-=1){const w=m[i],{isExternal:y,modifiers:M,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:S}=t(w);if(y){u=w+(u.length>0?" "+u:u);continue}let j=!!S,L=r(j?x.substring(0,S):x);if(!L){if(!j){u=w+(u.length>0?" "+u:u);continue}if(L=r(x),!L){u=w+(u.length>0?" "+u:u);continue}j=!1}const E=l(M).join(":"),V=b?E+be:E,N=V+L;if(c.includes(N))continue;c.push(N);const v=s(L,j);for(let R=0;R0?" "+u:u)}return u};function vt(){let e=0,n,t,r="";for(;e{if(typeof e=="string")return e;let n,t="";for(let r=0;ry(w),e());return t=Ct(i),r=t.cache.get,s=t.cache.set,l=m,m(u)}function m(u){const i=r(u);if(i)return i;const w=bt(u,t);return s(u,w),w}return function(){return l(vt.apply(null,arguments))}}const F=e=>{const n=t=>t[e]||[];return n.isThemeGetter=!0,n},Te=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,De=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yt=/^\d+\/\d+$/,kt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mt=/\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$/,Et=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Lt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,St=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Q=e=>yt.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),K=e=>!!e&&Number.isInteger(Number(e)),fe=e=>e.endsWith("%")&&H(e.slice(0,-1)),U=e=>kt.test(e),jt=()=>!0,It=e=>Mt.test(e)&&!Et.test(e),Be=()=>!1,Rt=e=>Lt.test(e),Ht=e=>St.test(e),At=e=>!f(e)&&!C(e),Nt=e=>te(e,Ge,Be),f=e=>Te.test(e),Y=e=>te(e,We,It),Ce=e=>te(e,Dt,H),Ie=e=>te(e,Fe,Be),zt=e=>te(e,$e,Ht),de=e=>te(e,Ze,Rt),C=e=>De.test(e),ne=e=>oe(e,We),Vt=e=>oe(e,Bt),Re=e=>oe(e,Fe),Pt=e=>oe(e,Ge),Tt=e=>oe(e,$e),ue=e=>oe(e,Ze,!0),te=(e,n,t)=>{const r=Te.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},oe=(e,n,t=!1)=>{const r=De.exec(e);return r?r[1]?n(r[1]):t:!1},Fe=e=>e==="position"||e==="percentage",$e=e=>e==="image"||e==="url",Ge=e=>e==="length"||e==="size"||e==="bg-size",We=e=>e==="length",Dt=e=>e==="number",Bt=e=>e==="family-name",Ze=e=>e==="shadow",Ft=()=>{const e=F("color"),n=F("font"),t=F("text"),r=F("font-weight"),s=F("tracking"),l=F("leading"),c=F("breakpoint"),m=F("container"),u=F("spacing"),i=F("radius"),w=F("shadow"),y=F("inset-shadow"),M=F("text-shadow"),b=F("drop-shadow"),x=F("blur"),S=F("perspective"),j=F("aspect"),L=F("ease"),E=F("animate"),V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...N(),C,f],R=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],p=()=>[C,f,u],P=()=>[Q,"full","auto",...p()],G=()=>[K,"none","subgrid",C,f],A=()=>["auto",{span:["full",K,C,f]},K,C,f],T=()=>[K,"auto",C,f],_=()=>["auto","min","max","fr",C,f],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],d=()=>["start","end","center","stretch","center-safe","end-safe"],h=()=>["auto",...p()],k=()=>[Q,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...p()],g=()=>[e,C,f],z=()=>[...N(),Re,Ie,{position:[C,f]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",Pt,Nt,{size:[C,f]}],se=()=>[fe,ne,Y],D=()=>["","none","full",i,C,f],B=()=>["",H,ne,Y],ae=()=>["solid","dashed","dotted","double"],Me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[H,fe,Re,Ie],Ee=()=>["","none",x,C,f],le=()=>["none",H,C,f],ie=()=>["none",H,C,f],ge=()=>[H,C,f],ce=()=>[Q,"full",...p()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[U],breakpoint:[U],color:[jt],container:[U],"drop-shadow":[U],ease:["in","out","in-out"],font:[At],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[U],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[U],shadow:[U],spacing:["px",H],text:[U],"text-shadow":[U],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Q,f,C,j]}],container:["container"],columns:[{columns:[H,f,C,m]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:v()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[K,"auto",C,f]}],basis:[{basis:[Q,"full","auto",m,...p()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,Q,"auto","initial","none",f]}],grow:[{grow:["",H,C,f]}],shrink:[{shrink:["",H,C,f]}],order:[{order:[K,"first","last","none",C,f]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_()}],"auto-rows":[{"auto-rows":_()}],gap:[{gap:p()}],"gap-x":[{"gap-x":p()}],"gap-y":[{"gap-y":p()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...d(),"normal"]}],"justify-self":[{"justify-self":["auto",...d()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...d(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...d(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...d(),"baseline"]}],"place-self":[{"place-self":["auto",...d()]}],p:[{p:p()}],px:[{px:p()}],py:[{py:p()}],ps:[{ps:p()}],pe:[{pe:p()}],pt:[{pt:p()}],pr:[{pr:p()}],pb:[{pb:p()}],pl:[{pl:p()}],m:[{m:h()}],mx:[{mx:h()}],my:[{my:h()}],ms:[{ms:h()}],me:[{me:h()}],mt:[{mt:h()}],mr:[{mr:h()}],mb:[{mb:h()}],ml:[{ml:h()}],"space-x":[{"space-x":p()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":p()}],"space-y-reverse":["space-y-reverse"],size:[{size:k()}],w:[{w:[m,"screen",...k()]}],"min-w":[{"min-w":[m,"screen","none",...k()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[c]},...k()]}],h:[{h:["screen","lh",...k()]}],"min-h":[{"min-h":["screen","lh","none",...k()]}],"max-h":[{"max-h":["screen","lh",...k()]}],"font-size":[{text:["base",t,ne,Y]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,C,Ce]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",fe,f]}],"font-family":[{font:[Vt,f,n]}],"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:[s,C,f]}],"line-clamp":[{"line-clamp":[H,"none",C,Ce]}],leading:[{leading:[l,...p()]}],"list-image":[{"list-image":["none",C,f]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",C,f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:g()}],"text-color":[{text:g()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",C,Y]}],"text-decoration-color":[{decoration:g()}],"underline-offset":[{"underline-offset":[H,"auto",C,f]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",C,f]}],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",C,f]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},K,C,f],radial:["",C,f],conic:[K,C,f]},Tt,zt]}],"bg-color":[{bg:g()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:g()}],"gradient-via":[{via:g()}],"gradient-to":[{to:g()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:g()}],"border-color-x":[{"border-x":g()}],"border-color-y":[{"border-y":g()}],"border-color-s":[{"border-s":g()}],"border-color-e":[{"border-e":g()}],"border-color-t":[{"border-t":g()}],"border-color-r":[{"border-r":g()}],"border-color-b":[{"border-b":g()}],"border-color-l":[{"border-l":g()}],"divide-color":[{divide:g()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,C,f]}],"outline-w":[{outline:["",H,ne,Y]}],"outline-color":[{outline:g()}],shadow:[{shadow:["","none",w,ue,de]}],"shadow-color":[{shadow:g()}],"inset-shadow":[{"inset-shadow":["none",y,ue,de]}],"inset-shadow-color":[{"inset-shadow":g()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:g()}],"ring-offset-w":[{"ring-offset":[H,Y]}],"ring-offset-color":[{"ring-offset":g()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":g()}],"text-shadow":[{"text-shadow":["none",M,ue,de]}],"text-shadow-color":[{"text-shadow":g()}],opacity:[{opacity:[H,C,f]}],"mix-blend":[{"mix-blend":[...Me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Me()}],"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":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":g()}],"mask-image-linear-to-color":[{"mask-linear-to":g()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":g()}],"mask-image-t-to-color":[{"mask-t-to":g()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":g()}],"mask-image-r-to-color":[{"mask-r-to":g()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":g()}],"mask-image-b-to-color":[{"mask-b-to":g()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":g()}],"mask-image-l-to-color":[{"mask-l-to":g()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":g()}],"mask-image-x-to-color":[{"mask-x-to":g()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":g()}],"mask-image-y-to-color":[{"mask-y-to":g()}],"mask-image-radial":[{"mask-radial":[C,f]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":g()}],"mask-image-radial-to-color":[{"mask-radial-to":g()}],"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":N()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":g()}],"mask-image-conic-to-color":[{"mask-conic-to":g()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",C,f]}],filter:[{filter:["","none",C,f]}],blur:[{blur:Ee()}],brightness:[{brightness:[H,C,f]}],contrast:[{contrast:[H,C,f]}],"drop-shadow":[{"drop-shadow":["","none",b,ue,de]}],"drop-shadow-color":[{"drop-shadow":g()}],grayscale:[{grayscale:["",H,C,f]}],"hue-rotate":[{"hue-rotate":[H,C,f]}],invert:[{invert:["",H,C,f]}],saturate:[{saturate:[H,C,f]}],sepia:[{sepia:["",H,C,f]}],"backdrop-filter":[{"backdrop-filter":["","none",C,f]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[H,C,f]}],"backdrop-contrast":[{"backdrop-contrast":[H,C,f]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,C,f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,C,f]}],"backdrop-invert":[{"backdrop-invert":["",H,C,f]}],"backdrop-opacity":[{"backdrop-opacity":[H,C,f]}],"backdrop-saturate":[{"backdrop-saturate":[H,C,f]}],"backdrop-sepia":[{"backdrop-sepia":["",H,C,f]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":p()}],"border-spacing-x":[{"border-spacing-x":p()}],"border-spacing-y":[{"border-spacing-y":p()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",C,f]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",C,f]}],ease:[{ease:["linear","initial",L,C,f]}],delay:[{delay:[H,C,f]}],animate:[{animate:["none",E,C,f]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,C,f]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[C,f,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:g()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:g()}],"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",C,f]}],"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":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"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",C,f]}],fill:[{fill:["none",...g()]}],"stroke-w":[{stroke:[H,ne,Y,Ce]}],stroke:[{stroke:["none",...g()]}],"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"]}},$t=wt(Ft);function Gt(...e){return $t(lt(e))}const Wt=e=>o.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.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"}),o.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"}),o.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"}),o.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"})),Zt=e=>o.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.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"}),o.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"}),o.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"})),Ot=e=>o.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.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"}),o.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"}),o.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"})),_t=e=>o.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.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"}),o.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"}),o.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"})),Ut=e=>o.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.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"}),o.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"}),o.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"})),Kt=e=>o.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.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"}),o.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"}),o.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"}),o.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"})),Xt=e=>o.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.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"}),o.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"}),o.createElement("path",{d:"M9.5 10.5L11.5 12.5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),ye=e=>o.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.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"})),Yt=e=>o.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.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"}),o.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"}),o.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"})),Jt=e=>o.createElement("svg",{width:24,height:21,viewBox:"0 0 24 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M23 19C23.5523 19 24 19.4477 24 20C24 20.5523 23.5523 21 23 21L1 21C0.447716 21 -2.41411e-08 20.5523 0 20C2.41411e-08 19.4477 0.447715 19 1 19L23 19Z",fill:"#CCCCCC"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.7998 8.16726e-10C17.9199 8.16726e-10 18.4804 -0.000213534 18.9082 0.217773C19.2845 0.409508 19.5905 0.715544 19.7822 1.0918C20.0002 1.51962 20 2.08009 20 3.2002V12.7998C20 13.9199 20.0002 14.4804 19.7822 14.9082C19.5905 15.2845 19.2845 15.5905 18.9082 15.7822C18.4804 16.0002 17.9199 16 16.7998 16H7.2002C6.08009 16 5.51962 16.0002 5.0918 15.7822C4.71554 15.5905 4.40951 15.2845 4.21777 14.9082C3.99979 14.4804 4 13.9199 4 12.7998V3.2002C4 2.08009 3.99979 1.51962 4.21777 1.0918C4.40951 0.715544 4.71554 0.409508 5.0918 0.217773C5.51962 -0.000213534 6.08009 8.16726e-10 7.2002 8.16726e-10H16.7998ZM7.59961 2C7.03982 2 6.75976 2.00041 6.5459 2.10938C6.35793 2.20522 6.20522 2.35793 6.10938 2.5459C6.00041 2.75976 6 3.03982 6 3.59961V12.4004C6 12.9602 6.00041 13.2402 6.10938 13.4541C6.20522 13.6421 6.35793 13.7948 6.5459 13.8906C6.75976 13.9996 7.03982 14 7.59961 14H16.4004C16.9602 14 17.2402 13.9996 17.4541 13.8906C17.6421 13.7948 17.7948 13.6421 17.8906 13.4541C17.9996 13.2402 18 12.9602 18 12.4004V3.59961C18 3.03982 17.9996 2.75976 17.8906 2.5459C17.7948 2.35793 17.6421 2.20522 17.4541 2.10938C17.2402 2.00041 16.9602 2 16.4004 2H7.59961Z",fill:"#CCCCCC"})),qt=e=>o.createElement("svg",{width:21,height:24,viewBox:"0 0 21 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M2 23C2 23.5523 1.55228 24 0.999998 24C0.447714 24 -1.65063e-06 23.5523 -1.63308e-06 23L1.19249e-08 1C2.94801e-08 0.447716 0.447715 2.20942e-07 1 2.38498e-07C1.55228 2.56053e-07 2 0.447716 2 1L2 23Z",fill:"#CCCCCC"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 16.7998C21 17.9199 21.0002 18.4804 20.7822 18.9082C20.5905 19.2845 20.2845 19.5905 19.9082 19.7822C19.4804 20.0002 18.9199 20 17.7998 20L8.2002 20C7.08009 20 6.51962 20.0002 6.0918 19.7822C5.71554 19.5905 5.40951 19.2845 5.21777 18.9082C4.99979 18.4804 5 17.9199 5 16.7998L5 7.2002C5 6.08009 4.99979 5.51962 5.21777 5.0918C5.40951 4.71554 5.71554 4.40951 6.0918 4.21777C6.51962 3.99979 7.08009 4 8.2002 4L17.7998 4C18.9199 4 19.4804 3.99979 19.9082 4.21777C20.2845 4.40951 20.5905 4.71554 20.7822 5.0918C21.0002 5.51962 21 6.08009 21 7.2002L21 16.7998ZM19 7.59961C19 7.03982 18.9996 6.75976 18.8906 6.5459C18.7948 6.35793 18.6421 6.20522 18.4541 6.10938C18.2402 6.00041 17.9602 6 17.4004 6L8.59961 6C8.03982 6 7.75976 6.00041 7.5459 6.10938C7.35793 6.20522 7.20522 6.35793 7.10938 6.5459C7.00041 6.75976 7 7.03982 7 7.59961L7 16.4004C7 16.9602 7.00041 17.2402 7.10938 17.4541C7.20522 17.6421 7.35793 17.7948 7.5459 17.8906C7.75976 17.9996 8.03982 18 8.59961 18L17.4004 18C17.9602 18 18.2402 17.9996 18.4541 17.8906C18.6421 17.7948 18.7948 17.6421 18.8906 17.4541C18.9996 17.2402 19 16.9602 19 16.4004L19 7.59961Z",fill:"#CCCCCC"})),Qt=e=>o.createElement("svg",{width:21,height:24,viewBox:"0 0 21 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M19 1C19 0.447716 19.4477 2.07771e-07 20 2.38498e-07C20.5523 2.69225e-07 21 0.447716 21 1L21 23C21 23.5523 20.5523 24 20 24C19.4477 24 19 23.5523 19 23L19 1Z",fill:"#CCCCCC"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.01152e-07 7.2002C2.1451e-07 6.08009 -0.000213313 5.51962 0.217774 5.0918C0.409508 4.71554 0.715544 4.40951 1.0918 4.21777C1.51962 3.99979 2.08009 4 3.2002 4L12.7998 4C13.9199 4 14.4804 3.99979 14.9082 4.21777C15.2845 4.40951 15.5905 4.71554 15.7822 5.0918C16.0002 5.51962 16 6.08009 16 7.2002L16 16.7998C16 17.9199 16.0002 18.4804 15.7822 18.9082C15.5905 19.2845 15.2845 19.5905 14.9082 19.7822C14.4804 20.0002 13.9199 20 12.7998 20L3.2002 20C2.08009 20 1.51962 20.0002 1.0918 19.7822C0.715544 19.5905 0.409508 19.2845 0.217773 18.9082C-0.000213468 18.4804 7.33211e-08 17.9199 8.66782e-08 16.7998L2.01152e-07 7.2002ZM2 16.4004C2 16.9602 2.00041 17.2402 2.10938 17.4541C2.20522 17.6421 2.35793 17.7948 2.5459 17.8906C2.75976 17.9996 3.03982 18 3.59961 18L12.4004 18C12.9602 18 13.2402 17.9996 13.4541 17.8906C13.6421 17.7948 13.7948 17.6421 13.8906 17.4541C13.9996 17.2402 14 16.9602 14 16.4004L14 7.59961C14 7.03982 13.9996 6.75976 13.8906 6.5459C13.7948 6.35793 13.6421 6.20522 13.4541 6.10938C13.2402 6.00041 12.9602 6 12.4004 6L3.59961 6C3.03982 6 2.75976 6.00041 2.5459 6.10938C2.35793 6.20522 2.20522 6.35793 2.10938 6.5459C2.00041 6.75976 2 7.03982 2 7.59961L2 16.4004Z",fill:"#CCCCCC"})),eo=e=>o.createElement("svg",{width:24,height:21,viewBox:"0 0 24 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M1 2C0.447717 2 1.67603e-06 1.55228 1.74846e-06 0.999996C1.82088e-06 0.447711 0.447717 -3.9905e-06 1 -3.91807e-06L23 -8.74228e-08C23.5523 -1.49994e-08 24 0.447715 24 1C24 1.55228 23.5523 2 23 2L1 2Z",fill:"#CCCCCC"}),o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.2002 21C6.08009 21 5.51962 21.0002 5.0918 20.7822C4.71554 20.5905 4.40951 20.2845 4.21777 19.9082C3.99979 19.4804 4 18.9199 4 17.7998L4 8.20019C4 7.08009 3.99979 6.51962 4.21777 6.0918C4.40951 5.71554 4.71555 5.40951 5.0918 5.21777C5.51962 4.99978 6.08009 5 7.2002 5L16.7998 5C17.9199 5 18.4804 4.99979 18.9082 5.21777C19.2845 5.40951 19.5905 5.71554 19.7822 6.0918C20.0002 6.51962 20 7.08009 20 8.20019L20 17.7998C20 18.9199 20.0002 19.4804 19.7822 19.9082C19.5905 20.2845 19.2845 20.5905 18.9082 20.7822C18.4804 21.0002 17.9199 21 16.7998 21L7.2002 21ZM16.4004 19C16.9602 19 17.2402 18.9996 17.4541 18.8906C17.6421 18.7948 17.7948 18.6421 17.8906 18.4541C17.9996 18.2402 18 17.9602 18 17.4004L18 8.59961C18 8.03982 17.9996 7.75976 17.8906 7.5459C17.7948 7.35793 17.6421 7.20521 17.4541 7.10937C17.2402 7.00041 16.9602 7 16.4004 7L7.59961 7C7.03982 7 6.75976 7.00041 6.5459 7.10937C6.35793 7.20521 6.20522 7.35793 6.10938 7.5459C6.00041 7.75976 6 8.03982 6 8.59961L6 17.4004C6 17.9602 6.00041 18.2402 6.10938 18.4541C6.20522 18.6421 6.35793 18.7948 6.5459 18.8906C6.75976 18.9996 7.03982 19 7.59961 19L16.4004 19Z",fill:"#CCCCCC"})),to=e=>o.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.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"}),o.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"}),o.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"})),He={"align-horizontally":Wt,"align-to-bottom":Zt,"align-to-left":Ot,"align-to-right":_t,"align-to-top":Ut,"align-vertically":Kt,"moon-icon":ye,"stretch-horizontally":Yt,"stretch-to-bottom":Jt,"stretch-to-left":qt,"stretch-to-right":Qt,"stretch-to-top":eo,"stretch-vertically":to,"color-dropper":Xt},ke=he.memo(({name:e,className:n})=>{const t=He[e]||He["align-to-top"];return a.jsx(t,{className:n})});ke.displayName="SvgIcon";const Oe=he.forwardRef(({className:e,iconName:n="align-to-top",icon:t,children:r,...s},l)=>{const c="h-6 w-6 [&>path]:fill-[#c0c0c0] group-hover:[&>path]:fill-[#E5E5E5] transition-colors duration-200",m=i=>{const w=ee.getState();w.shortcutKeyHeld&&w.setHoveredIcon(n),s.onMouseEnter?.(i)},u=i=>{const w=ee.getState();w.shortcutKeyHeld&&w.setHoveredIcon(null),s.onMouseLeave?.(i)};return a.jsx("button",{className:Gt("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",e),ref:l,onMouseEnter:m,onMouseLeave:u,...s,children:r||t||a.jsx(ke,{name:n,className:c})})});Oe.displayName="Button";function oo(){const e=o.useMemo(()=>({"align-to-left":()=>Z("align-to-left"),"align-to-right":()=>Z("align-to-right"),"align-to-top":()=>Z("align-to-top"),"align-to-bottom":()=>Z("align-to-bottom"),"align-vertically":()=>Z("align-vertically"),"align-horizontally":()=>Z("align-horizontally"),"stretch-to-left":()=>Z("stretch-to-left"),"stretch-to-right":()=>Z("stretch-to-right"),"stretch-to-top":()=>Z("stretch-to-top"),"stretch-to-bottom":()=>Z("stretch-to-bottom"),"stretch-horizontally":()=>Z("stretch-horizontally"),"stretch-vertically":()=>Z("stretch-vertically")}),[]);return{getHandler:t=>e[t]}}const ro=[{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"}],_e=he.memo(({config:e})=>{const{containerClass:n,groupClass:t,buttons:r}=e,{getHandler:s}=oo();return a.jsx("div",{className:n,children:a.jsx("div",{className:t,children:r.map((l,c)=>a.jsx(Oe,{iconName:l,onClick:s(l)},`${e.id}-${l}-${c}`))})})});_e.displayName="ButtonGroup";function no(){const e=o.useMemo(()=>ro,[]);return a.jsx("div",{className:"flex items-center justify-center p-8 pointer-events-none",children:a.jsx("div",{className:"relative w-[320px] h-80",children:e.map(n=>a.jsx(_e,{config:n},n.id))})})}const Ue=he.memo(no);Ue.displayName="CrossPanel";const re=()=>{const{history:e,addToHistory:n,clearHistory:t}=Ke(),{setFromHex:r}=X(),s=i=>{r(i),n(i)},l=()=>{t()},c=()=>{n()},m=()=>Math.max(0,10-e.length),u=()=>{const i=m(),w=Array(i).fill(null);return[...e.map(y=>({type:"color",color:y})),...w.map(()=>({type:"placeholder",color:null}))]};return{history:e,placeholderCount:m(),displayData:u(),handleHistoryColorClick:s,handleClearHistory:l,handleAddCurrentColor:c}},so=({className:e="",onMoonIconClick:n})=>{const[t,r]=o.useState(!1),[s,l]=o.useState(!1),{setFromHex:c}=X(),{handleAddCurrentColor:m}=re(),u=y=>{const M=ee.getState();M.shortcutKeyHeld&&M.setHoveredColorBarIndex(y)},i=()=>{const y=ee.getState();y.shortcutKeyHeld&&y.setHoveredColorBarIndex(null)},w=()=>{r(!0),setTimeout(()=>{r(!1)},200)};return a.jsx("div",{className:`w-[320px] h-10 bg-[#0c0c0c] rounded-4xl flex items-center justify-center pointer-events-auto ${e}`,children:a.jsx("div",{className:"w-[300px] h-5 rounded-4xl flex items-center justify-between px-0",children:Array.from({length:10},(y,M)=>M===7?a.jsx("div",{className:"w-5 h-5 flex items-center justify-center cursor-pointer transition-all duration-200 hover:scale-110",onClick:n,onMouseEnter:()=>u(7),onMouseLeave:i,children:a.jsx(ye,{width:"20",height:"20",className:"text-[#FFB900]"})},M):M===8?a.jsx("div",{className:"w-5 h-5 rounded-full border-2 cursor-pointer transition-all duration-200 hover:scale-110",style:{borderColor:t?"#FF6467":"#cccccc",backgroundColor:"transparent"},onClick:()=>{w(),Xe()},onMouseEnter:()=>u(8),onMouseLeave:i},M):M===9?a.jsx("div",{className:"w-5 h-5 rounded-full border-2 flex items-center justify-center cursor-pointer transition-all duration-200 hover:scale-110",style:{borderColor:s?"#05DF72":"#cccccc",backgroundColor:"transparent"},onMouseEnter:()=>u(9),onMouseLeave:i,onClick:()=>{l(!0),setTimeout(()=>l(!1),200),Ye()},children:a.jsx("div",{className:"w-2 h-2 rounded-full transition-colors duration-200",style:{backgroundColor:s?"#05DF72":"#FF6467"}})},M):a.jsx("div",{className:"w-5 h-5 rounded-full cursor-pointer transition-all duration-200 hover:scale-110",style:{backgroundColor:M<7?Le[M]:"#3B82F6"},onClick:M<7?()=>{const b=Le[M];c(b),m(),Je(b)}:void 0,onMouseEnter:()=>u(M),onMouseLeave:i},M))})})},ao=({className:e="",hue:n=0,saturation:t=100,value:r=100,onChange:s,onChangeComplete:l})=>{const c=o.useRef(null),[m,u]=o.useState(!1),[i,w]=o.useState({x:t/100*330,y:(100-r)/100*200}),y=Ne(n,100,100),M=o.useCallback((j,L)=>{const E=Math.max(0,Math.min(100,j/330*100)),V=Math.max(0,Math.min(100,100-L/200*100));return{saturation:E,value:V}},[]),b=o.useCallback(j=>{c.current&&(u(!0),j.preventDefault(),j.stopPropagation())},[]),x=o.useCallback(j=>{if(!m||!c.current)return;const L=c.current.getBoundingClientRect(),E=Math.max(0,Math.min(330,j.clientX-L.left)),V=Math.max(0,Math.min(200,j.clientY-L.top));w({x:E,y:V});const{saturation:N,value:v}=M(E,V);s?.(N,v)},[m,M,s]),S=o.useCallback(()=>{if(m){u(!1);const{saturation:j,value:L}=M(i.x,i.y);l?.(j,L)}},[m,i,M,l]);return o.useEffect(()=>(m&&(document.addEventListener("mousemove",x),document.addEventListener("mouseup",S)),()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",S)}),[m,x,S]),o.useEffect(()=>{w({x:t/100*330,y:(100-r)/100*200})},[t,r]),a.jsx("div",{ref:c,className:`relative cursor-crosshair select-none ${e}`,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(${y.r}, ${y.g}, ${y.b}) 100%) - `,overflow:"hidden"},onMouseDown:b,children:a.jsx("div",{className:"absolute pointer-events-none",style:{left:`${i.x}px`,top:`${i.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)"}})})},lo=({className:e="",onColorPicked:n,disabled:t=!1})=>{const{isPickerActive:r,setPickerActive:s,pickColor:l}=qe(),c=o.useCallback(async()=>{if(!(t||r))try{if(s(!0),"EyeDropper"in window){const u=await new window.EyeDropper().open();if(u?.sRGBHex){const i=u.sRGBHex,w=parseInt(i.slice(1,3),16),y=parseInt(i.slice(3,5),16),M=parseInt(i.slice(5,7),16);l(w,y,M),n?.({r:w,g:y,b:M,hex:i})}}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(m){console.log("Color picking cancelled or failed:",m)}finally{s(!1)}},[t,r,n,s,l]);return a.jsx("button",{className:` - relative overflow-visible - w-[30px] h-[30px] - rounded - border border-gray-400/15 - flex items-center justify-center - transition-all duration-200 - ${r?"bg-blue-500/20 border-blue-400/40 text-blue-400":"bg-transparent hover:bg-gray-400/10 text-gray-400/88"} - ${t?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-gray-400/25"} - ${e} - `,onClick:c,disabled:t,type:"button",children:a.jsx("div",{className:"w-5 h-5 flex items-center justify-center",children:a.jsx(ke,{name:"color-dropper",className:`w-5 h-5 ${r?"animate-pulse":""}`})})})},io=({className:e="",onChange:n,onChangeComplete:t})=>{const[r,s]=o.useState(!1),[l,c]=o.useState(""),[m,u]=o.useState(!1),[i,w]=o.useState("CCCCCC"),[y,M]=o.useState(""),b=o.useRef(null),x=o.useRef(null),[S,j]=o.useState(null),{hex:L,setFromHex:E}=X(),{handleAddCurrentColor:V}=re(),N=o.useCallback(A=>/^[0-9A-Fa-f]{6}$/.test(A),[]);o.useEffect(()=>{const A=L.replace("#","").toUpperCase();!r&&A!==y&&A!==i&&(w(A||"CCCCCC"),c(A||"CCCCCC"),M(A))},[L,r,y,i]);const v=o.useCallback(A=>{if(r)return;if(S){clearTimeout(S),j(null);return}const T=A.ctrlKey||A.metaKey,_=setTimeout(async()=>{const W=T?`#${i}`:i;try{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(W);else{const d=document.createElement("textarea");d.value=W,d.style.position="fixed",d.style.opacity="0",document.body.appendChild(d),d.select();try{document.execCommand("copy")}finally{document.body.removeChild(d)}}u(!0),setTimeout(()=>u(!1),300)}catch(d){if(console.error("Failed to copy to clipboard:",d),x.current){const h=window.getSelection(),k=document.createRange();k.selectNodeContents(x.current),h?.removeAllRanges(),h?.addRange(k)}}j(null)},250);j(_)},[i,r,S]),R=o.useCallback(()=>{r||(S&&(clearTimeout(S),j(null)),s(!0),c(i),setTimeout(()=>{b.current&&(b.current.focus(),b.current.select())},0))},[i,r,S]),I=o.useCallback(A=>{let T=A.target.value.toUpperCase().replace(/[^0-9A-F]/g,"");if(T.length>6&&(T=T.slice(0,6)),c(T),n?.(T),T.length===6&&N(T)){const _=`#${T}`;E(_)}},[n,N,E]),p=o.useCallback(()=>{if(l.length===6&&N(l)){const A=`#${l.toUpperCase()}`;w(l.toUpperCase()),M(l.toUpperCase()),E(A),V(),t?.(A)}else c(i);s(!1)},[l,N,i,E,t]),P=o.useCallback(A=>{A.key==="Enter"?p():A.key==="Escape"&&(c(i),s(!1))},[p,i]),G=o.useCallback(()=>{p()},[p]);return o.useEffect(()=>{const A=T=>{x.current&&!x.current.contains(T.target)&&r&&p()};return r&&document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[r,p]),o.useEffect(()=>()=>{S&&clearTimeout(S)},[S]),a.jsxs("div",{ref:x,className:` - relative - w-[78px] h-6 - rounded - border - flex items-center justify-center - transition-all duration-200 - ${m?"border-[#04DE71] bg-transparent":r?"border-blue-400/60 bg-gray-800/50":"border-gray-400/15 bg-transparent hover:border-gray-400/25"} - ${r?"cursor-text":"cursor-pointer"} - ${e} - `,onClick:r?void 0:A=>v(A),onDoubleClick:R,children:[r?a.jsx("input",{ref:b,type:"text",value:l,onChange:I,onKeyDown:P,onBlur:G,className:` - w-full h-full - bg-transparent - text-center - outline-none - text-[12px] font-medium - text-gray-300 - placeholder-gray-500 - `,placeholder:"CCCCCC",maxLength:6,style:{fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"12px",lineHeight:"1.2102272510528564em"}}):a.jsx("span",{className:` - text-[12px] font-medium - select-none - pointer-events-none - `,style:{color:"rgba(204, 204, 204, 0.88)",fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"12px",lineHeight:"1.2102272510528564em",textAlign:"center"},children:i||"CCCCCC"}),r&&a.jsx("div",{className:` - absolute -top-1 -right-1 - w-2 h-2 - bg-blue-400 - rounded-full - animate-pulse - `})]})},co={isValidRGBA:(e,n)=>{const t=parseFloat(n);if(isNaN(t))return!1;switch(e){case"r":case"g":case"b":return t>=0&&t<=255&&Number.isInteger(t);case"a":return t>=0&&t<=100;default:return!1}}},J={formatDisplayValue:(e,n)=>{switch(e){case"r":case"g":case"b":return Math.round(n).toString();case"a":return Math.round(n*100).toString();default:return n.toString()}},formatCopyValue:(e,n)=>{switch(e){case"r":case"g":case"b":return Math.round(n).toString();case"a":return n.toFixed(3);default:return n.toString()}},formatRGBAString:e=>`rgba(${J.formatCopyValue("r",e.r)}, ${J.formatCopyValue("g",e.g)}, ${J.formatCopyValue("b",e.b)}, ${J.formatCopyValue("a",e.a)})`},me={copyToClipboard:async e=>{try{return await navigator.clipboard.writeText(e),!0}catch(n){return console.error("Failed to copy to clipboard:",n),!1}},copyIndividualValue:async(e,n)=>{const t=J.formatCopyValue(e,n[e]);return me.copyToClipboard(t)},copyFullRGBA:async e=>{const n=J.formatRGBAString(e);return me.copyToClipboard(n)},fallbackTextSelection:e=>{const n=window.getSelection(),t=document.createRange();t.selectNodeContents(e),n?.removeAllRanges(),n?.addRange(t)}},pe={validateAndFormatInput:(e,n)=>{let t=n;switch(e){case"r":case"g":case"b":t=t.replace(/[^0-9]/g,""),t&&parseInt(t)>255&&(t="255");break;case"a":t=t.replace(/[^0-9]/g,""),t&&parseInt(t)>100&&(t="100");break}return t},processInputValue:(e,n)=>{const t=parseFloat(n);return e==="a"?t/100:t},convertInputToNumber:(e,n)=>pe.processInputValue(e,n)},uo=({className:e="",onChange:n,onChangeComplete:t})=>{const[r,s]=o.useState(null),[l,c]=o.useState({r:"80",g:"80",b:"80",a:"100"}),[m,u]=o.useState(null),[i,w]=o.useState({r:204,g:204,b:204,a:1}),[y,M]=o.useState({r:204,g:204,b:204,a:1}),[b,x]=o.useState(null),S=o.useRef({r:null,g:null,b:null,a:null}),j=o.useRef(null),{rgb:L,alpha:E,setFromRGB:V,setAlpha:N}=X(),{handleAddCurrentColor:v}=re(),{isValidRGBA:R}=co,{formatDisplayValue:I}=J;o.useEffect(()=>{const d={r:L.r,g:L.g,b:L.b,a:E},h=Object.keys(d).some(k=>{const g=k;return Math.abs(d[g]-y[g])>.001});!r&&h&&(w(d),M(d),c({r:I("r",d.r),g:I("g",d.g),b:I("b",d.b),a:I("a",d.a)}))},[L,E,r,y,I]);const p=o.useCallback(async(d,h)=>{if(b){clearTimeout(b),x(null);return}const k=setTimeout(async()=>{const g=h.ctrlKey||h.metaKey,z={r:L.r,g:L.g,b:L.b,a:E};try{g?(await me.copyFullRGBA(z),u("all")):(await me.copyIndividualValue(d,z),u(d)),setTimeout(()=>u(null),300)}catch(O){console.error("复制失败:",O)}x(null)},250);x(k)},[L,E,b]),P=o.useCallback(d=>{r||(b&&(clearTimeout(b),x(null)),s(d),c(h=>({...h,[d]:I(d,i[d])})),setTimeout(()=>{const h=S.current[d];h&&(h.focus(),h.select())},0))},[i,r,I,b]),G=o.useCallback((d,h)=>{if(c(k=>({...k,[d]:h})),R(d,h)){const k=pe.processInputValue(d,h),z={...{r:L.r,g:L.g,b:L.b,a:E},[d]:k};d==="a"?N(k):V(z.r,z.g,z.b),n?.(z.r,z.g,z.b,z.a)}},[L,E,V,N,n,R]),A=o.useCallback(d=>{const h=l[d];if(R(d,h)){const k=pe.processInputValue(d,h),z={...{r:L.r,g:L.g,b:L.b,a:E},[d]:k};w(z),M(z),d==="a"?N(k):V(z.r,z.g,z.b),v(),t?.(z.r,z.g,z.b,z.a)}else{const k=I(d,i[d]);c(g=>({...g,[d]:k}))}s(null)},[l,i,E,V,N,t,R,I]),T=o.useCallback((d,h)=>{if(h.key==="Enter")A(d);else if(h.key==="Escape")c(k=>({...k,[d]:I(d,i[d])})),s(null);else if(h.key==="Tab"){h.preventDefault(),A(d);const k=["r","g","b","a"],z=(k.indexOf(d)+1)%k.length,O=k[z];setTimeout(()=>{P(O)},0)}},[A,i,I,P]),_=o.useCallback(d=>{A(d)},[A]);o.useEffect(()=>()=>{b&&clearTimeout(b)},[b]),o.useEffect(()=>{const d=h=>{j.current&&!j.current.contains(h.target)&&r&&A(r)};return r&&document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[r,A]);const W=(d,h)=>{const k=r===d,g=k?l[d]:I(d,i[d]);return a.jsxs("div",{className:` - relative - ${h} h-6 - rounded - border - flex items-center justify-center - transition-all duration-200 - ${m==="all"||m===d?"border-[#04DE71] bg-transparent":k?"border-blue-400/60 bg-gray-800/50":"border-gray-400/15 bg-transparent hover:border-gray-400/25"} - ${k?"cursor-text":"cursor-pointer"} - `,onClick:k?void 0:z=>p(d,z),onDoubleClick:()=>P(d),children:[k?a.jsx("input",{ref:z=>{S.current[d]=z},type:"text",value:g,onChange:z=>G(d,pe.validateAndFormatInput(d,z.target.value)),onKeyDown:z=>T(d,z),onBlur:()=>_(d),className:` - w-full h-full - bg-transparent - text-center - outline-none - text-[12px] font-medium - text-gray-300 - placeholder-gray-500 - `,placeholder:d==="a"?"100":"204",maxLength:3,style:{fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"12px",lineHeight:"1.2102272510528564em"}}):a.jsxs("span",{className:` - text-[12px] font-medium - select-none - pointer-events-none - `,style:{color:"rgba(204, 204, 204, 0.88)",fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"12px",lineHeight:"1.2102272510528564em",textAlign:"center"},children:[g,d==="a"?"%":""]}),k&&a.jsx("div",{className:` - absolute -top-1 -right-1 - w-2 h-2 - bg-blue-400 - rounded-full - animate-pulse - `})]},d)};return a.jsxs("div",{ref:j,className:`flex items-center gap-1 ${e}`,children:[W("r","w-[58px]"),W("g","w-[58px]"),W("b","w-[58px]"),W("a","w-[58px]")]})},po=({className:e="",onChange:n,onChangeComplete:t})=>{const r=o.useRef(null),[s,l]=o.useState(!1),{hue:c,setHue:m}=X(),{handleAddCurrentColor:u}=re(),i=5,y=280,[M,b]=o.useState({x:i+c/360*y}),x=o.useCallback(E=>{const N=(E-i)/y*360;return N>=360?0:Math.max(0,N)},[]),S=o.useCallback(E=>{if(!r.current)return;l(!0);const V=r.current.getBoundingClientRect(),N=Math.max(i,Math.min(i+y,E.clientX-V.left));b({x:N});const v=x(N);m(v),n?.(v),E.preventDefault(),E.stopPropagation()},[x,m,n]),j=o.useCallback(E=>{if(!s||!r.current)return;const V=r.current.getBoundingClientRect(),N=Math.max(i,Math.min(i+y,E.clientX-V.left));b({x:N});const v=x(N);m(v),n?.(v)},[s,x,m,n]),L=o.useCallback(()=>{if(s){l(!1);const E=x(M.x);t?.(E),u()}},[s,M.x,x,t,u]);return o.useEffect(()=>(s&&(document.addEventListener("mousemove",j),document.addEventListener("mouseup",L)),()=>{document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",L)}),[s,j,L]),o.useEffect(()=>{b({x:i+c/360*y})},[c]),a.jsx("div",{ref:r,className:`relative cursor-pointer select-none ${e}`,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:`${i}px`,paddingRight:`${i}px`,boxSizing:"border-box"},onMouseDown:S,children:a.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}})})},mo=({className:e="",onChange:n,onChangeComplete:t})=>{const r=o.useRef(null),[s,l]=o.useState(!1),{hue:c,saturation:m,value:u,alpha:i,setAlpha:w}=X(),y=5,b=280,[x,S]=o.useState({x:y+i*b}),j=Ne(c,m,u),L=`rgb(${j.r}, ${j.g}, ${j.b})`,E=o.useCallback(R=>{const p=(R-y)/b;return Math.max(0,Math.min(1,p))},[]),V=o.useCallback(R=>{if(!r.current)return;l(!0);const I=r.current.getBoundingClientRect(),p=Math.max(y,Math.min(y+b,R.clientX-I.left));S({x:p});const P=E(p);w(P),n?.(P),R.preventDefault(),R.stopPropagation()},[E,w,n]),N=o.useCallback(R=>{if(!s||!r.current)return;const I=r.current.getBoundingClientRect(),p=Math.max(y,Math.min(y+b,R.clientX-I.left));S({x:p});const P=E(p);w(P),n?.(P)},[s,E,w,n]),v=o.useCallback(()=>{if(s){l(!1);const R=E(x.x);t?.(R)}},[s,x.x,E,t]);return o.useEffect(()=>(s&&(document.addEventListener("mousemove",N),document.addEventListener("mouseup",v)),()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",v)}),[s,N,v]),o.useEffect(()=>{S({x:y+i*b})},[i]),a.jsxs("div",{ref:r,className:`relative cursor-pointer select-none ${e}`,style:{width:"290px",height:"10px",borderRadius:"10px",overflow:"visible",paddingLeft:`${y}px`,paddingRight:`${y}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:V,children:[a.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(90deg, transparent 0%, ${L} 100%)`,borderRadius:"10px"}}),a.jsx("div",{className:"absolute pointer-events-none",style:{left:`${x.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}})]})},ho=()=>{const{displayData:e,handleHistoryColorClick:n}=re(),[t,r]=o.useState(null);return a.jsx("div",{style:go,children:e.map((s,l)=>a.jsx("div",{style:{...fo,...s.type==="color"?Co:xo,backgroundColor:s.type==="color"?s.color:"transparent",transform:s.type==="color"&&t===l?"scale(1.1)":"scale(1)",boxShadow:s.type==="color"&&t===l?"0 2px 8px rgba(0, 0, 0, 0.2)":"none",zIndex:s.type==="color"&&t===l?1:0},onMouseEnter:s.type==="color"?()=>r(l):void 0,onMouseLeave:s.type==="color"?()=>r(null):void 0,onClick:s.type==="color"?()=>n(s.color):void 0},l))})},go={display:"flex",gap:"10px",width:"330px",height:"24px"},fo={width:"24px",height:"24px",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s ease",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},Co={border:"1px solid rgba(0, 0, 0, 0.1)"},xo={width:"24px",height:"24px",backgroundColor:"transparent",border:"1px solid rgba(204, 204, 204, 0.1)",borderRadius:"4px",cursor:"default"},bo=({className:e="",onColorSelect:n})=>{const{presets:t,presetLabels:r,presetLabelList:s,removePreset:l}=Qe(),{setFromHex:c}=X(),[m,u]=o.useState({visible:!1,x:0,y:0,colorIndex:-1}),i=o.useRef(null),[w,y]=o.useState(null);o.useEffect(()=>{et().catch(()=>{})},[]);const M=o.useCallback(v=>{c(v),n?.(v)},[c,n]),b=o.useCallback((v,R)=>{const I=v.target.getBoundingClientRect(),p=String(R||"Preset").replace(/\s*\((?:header|panel)\)\s*$/i,"");y({x:I.left+I.width/2,y:I.top-8,label:p})},[]),x=o.useCallback(()=>{y(null)},[]),S=o.useCallback((v,R)=>{v.preventDefault(),u({visible:!0,x:v.clientX,y:v.clientY,colorIndex:R})},[]),j=o.useCallback(()=>{u(v=>({...v,visible:!1}))},[]),L=o.useCallback(async()=>{try{const v=m.colorIndex,R=v>=0?t[v]:void 0;if(!R){j();return}const I=String(R).toUpperCase(),p=V(),P=v>=0&&v{}),typeof l=="function"&&l(v)}catch(v){console.warn("Delete Color failed",v)}finally{j()}},[m.colorIndex,t,l,j]),E=o.useCallback(v=>{i.current&&(v.preventDefault(),i.current.scrollTop+=v.deltaY)},[]),V=()=>{const v=[],R={};for(const I of t){if(I==="placeholder")continue;const p=I,P=R[p]||0;R[p]=P+1;const A=(s?.[p]||[])[P]||r?.[p]||"Preset";v.push({color:p,label:A})}return v.length<30&&v.push({placeholder:!0}),v},N=V();return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`relative ${e}`,style:{width:"330px",height:"122px",fontFamily:"Inter, sans-serif"},onClick:j,children:[a.jsx("div",{className:"flex items-center",style:{width:"330px",height:"20px",borderBottom:"1px solid rgba(155, 146, 146, 0.1)"},children:a.jsx("span",{className:"text-center",style:{color:"#CCCCCC",fontSize:"12px",fontWeight:500,lineHeight:"14.52px",marginLeft:"-1px",marginTop:"6px"},children:"Color Presets"})}),a.jsxs("div",{ref:i,className:"overflow-auto",style:{width:"330px",height:"102px",marginTop:"10px",scrollbarWidth:"none",msOverflowStyle:"none",paddingBottom:"10px"},onWheel:E,children:[a.jsx("style",{children:` - .overflow-auto::-webkit-scrollbar { - display: none; - } - `}),a.jsx("div",{className:"grid grid-cols-10 gap-2.5",style:{gridTemplateColumns:"repeat(10, 24px)",gridAutoRows:"24px",rowGap:"10px"},children:N.map((v,R)=>"placeholder"in v?a.jsx("div",{style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"1px solid rgba(204, 204, 204, 0.1)",borderRadius:"4px",cursor:"default"}},`placeholder-${R}`):a.jsx("div",{className:"cursor-pointer transition-all duration-200 hover:scale-110",style:{width:"24px",height:"24px",backgroundColor:v.color,border:"1px solid rgba(0, 0, 0, 0.1)",borderRadius:"4px"},onClick:()=>M(v.color),onContextMenu:I=>S(I,R),onMouseEnter:I=>b(I,v.label),onMouseLeave:x},`color-${R}`))})]})]}),w&&a.jsx("div",{className:"fixed bg-[#1a1a1a] text-gray-200 text-xs px-2 py-1 rounded-md shadow",style:{left:w.x,top:w.y,transform:"translate(-50%, -100%)",zIndex:500,pointerEvents:"none",border:"1px solid rgba(255,255,255,0.1)"},children:w.label}),m.visible&&a.jsx("div",{className:"fixed bg-[#1a1a1a] border border-gray-600/20 border-opacity-10 rounded-md ",style:{left:m.x,top:m.y,zIndex:500},children:a.jsx("button",{className:"block w-full px-3 py-2 text-left text-sm text-gray-200 hover:bg-[#2a2a2a] hover:rounded-md",onClick:L,children:"Delete Color"})})]})},vo=(e,n,t,r,s)=>({handleMouseDown:u=>{t(!0);const i=e.current?.getBoundingClientRect();i&&s({x:u.clientX-i.left,y:u.clientY-i.top})},handleMouseMove:u=>{if(n.isDragging){const i=window.innerWidth||document.documentElement.clientWidth,w=window.innerHeight||document.documentElement.clientHeight,y=346,M=526,b=u.clientX-n.dragStart.x,x=u.clientY-n.dragStart.y,S=Math.max(0,Math.min(b,i-y)),j=Math.max(0,Math.min(x,w-M));r({x:S,y:j})}},handleMouseUp:()=>{t(!1)}}),wo=(e,n,t)=>({handleClear:()=>{window.confirm("Clear all preset colors?? This action is irreversible.")&&e?.()},handleSave:()=>{n?.()},handleClose:c=>{c.stopPropagation(),t?.()}}),Ae=e=>{const{panelWidth:n,panelHeight:t,rightMargin:r}=e,s=window.innerWidth||document.documentElement.clientWidth,l=window.innerHeight||document.documentElement.clientHeight,c=Math.max(0,Math.min(s-n-r,s-n)),m=(l-t)/2,u=Math.max(0,Math.min(m,l-t));return{x:c,y:u}},yo=()=>({getDefaultPosition:()=>Ae({panelWidth:346,panelHeight:526,rightMargin:20}),getInitialPosition:Ae}),ko=({className:e="",onClose:n})=>{const[t,r]=o.useState(!1),{getDefaultPosition:s}=yo(),l="align_colorpicker_position",c=346,m=526,u=h=>{const k=window.innerWidth||document.documentElement.clientWidth,g=window.innerHeight||document.documentElement.clientHeight;return{x:Math.max(0,Math.min(h.x,k-c)),y:Math.max(0,Math.min(h.y,g-m))}},[i,w]=o.useState(()=>{try{const h=localStorage.getItem(l);if(h){const k=JSON.parse(h);return u(k)}}catch{}return s()}),[y,M]=o.useState({x:0,y:0}),b=o.useRef(null),[x,S]=o.useState(!1),{hue:j,saturation:L,value:E,setSaturation:V,setValue:N,setFromRGB:v,setFromHex:R}=X(),{handleAddCurrentColor:I}=re(),p=(h,k)=>{V(h),N(k)},P=(h,k)=>{V(h),N(k),I()},G=h=>{v(h.r,h.g,h.b),I()},T=vo(b,{isDragging:t,dragStart:y},r,w,M),d=wo(async()=>{await rt()},async()=>{try{await ot()}catch{}},n);return o.useEffect(()=>{if(t)document.addEventListener("mousemove",T.handleMouseMove),document.addEventListener("mouseup",T.handleMouseUp);else{document.removeEventListener("mousemove",T.handleMouseMove),document.removeEventListener("mouseup",T.handleMouseUp);try{localStorage.setItem(l,JSON.stringify(i))}catch{}}return()=>{document.removeEventListener("mousemove",T.handleMouseMove),document.removeEventListener("mouseup",T.handleMouseUp)}},[t,T.handleMouseMove,T.handleMouseUp]),o.useEffect(()=>{const h=()=>{w(k=>u(k))};return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[]),o.useEffect(()=>{let h="";const g=setInterval(()=>{try{const z=nt(),O=st(z),q=at(z);if((O?.length||0)+(q?.length||0)===1){let D;if(O?.length===1){const B=O[0];D=B?.bgcolor||B?.color}else q?.length===1&&(D=q[0]?.color);if(D&&typeof D=="string"&&tt(D)){const B=`1:${D.toUpperCase()}`;B!==h&&(h=B,R(D));return}}h=""}catch{}},150);return()=>clearInterval(g)},[R]),a.jsxs("div",{ref:b,className:`w-[346px] h-[526px] bg-[#0c0c0c] rounded-lg flex flex-col shadow-lg pointer-events-auto ${e}`,style:{backgroundColor:"#0c0c0c",fontFamily:"Inter, sans-serif",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.4)",position:"fixed",left:i.x,top:i.y,zIndex:1e3},children:[a.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:T.handleMouseDown,children:[a.jsx("div",{className:"w-3.5 h-3.5 ml-2 pointer-events-auto cursor-pointer",onClick:h=>{h.stopPropagation(),S(k=>!k)},onMouseDown:h=>{h.stopPropagation()},children:a.jsx(ye,{className:"w-full h-full text-[#FFB900]"})}),a.jsx("div",{className:"absolute left-1/2 transform -translate-x-1/2 pointer-events-none",children:a.jsx("span",{className:"text-[14px] font-medium leading-[17px] text-center",style:{color:"#CCCCCC",fontFamily:"Inter, sans-serif",fontWeight:500},children:"Color Picker"})}),a.jsx("div",{className:"w-5 h-5 mr-1 flex items-center justify-center cursor-pointer pointer-events-auto",onClick:d.handleClose,children:a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"text-gray-400 hover:text-gray-300",children:a.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),x&&a.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:[a.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:a.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:a.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"})})}),a.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:a.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:a.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"})})}),a.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:a.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:a.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`})})})]}),a.jsxs("div",{className:"flex-1 flex flex-col pt-2.5 px-2 overflow-hidden",children:[a.jsx("div",{className:"flex justify-center",children:a.jsx(ao,{hue:j,saturation:L,value:E,onChange:p,onChangeComplete:P})}),a.jsxs("div",{className:"mt-2.5 flex flex-col items-center overflow-hidden",children:[a.jsxs("div",{className:"flex items-end w-[330px]",children:[a.jsx("div",{className:"shrink-0",children:a.jsx(lo,{onColorPicked:G})}),a.jsx("div",{className:"w-2.5 shrink-0"}),a.jsxs("div",{className:"flex flex-col items-end gap-2.5 flex-1",children:[a.jsx(po,{}),a.jsx(mo,{})]})]}),a.jsxs("div",{className:"mt-2.5 w-[330px] flex justify-between items-center",children:[a.jsx(io,{}),a.jsx(uo,{})]}),a.jsx("div",{className:"mt-2.5 w-[330px] flex justify-center",children:a.jsx(ho,{})}),a.jsx("div",{className:"mt-2.5 w-[330px] flex justify-center",children:a.jsx(bo,{})})]})]}),a.jsxs("div",{className:"w-full h-10 flex items-center justify-center gap-[231px] px-1 border-t border-gray-600/10 relative",style:{zIndex:1e3},children:[a.jsx("button",{onClick:d.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:a.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"})}),a.jsx("button",{onClick:d.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:a.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 Io(){const[e,n]=o.useState(!1),{isOpen:t,position:r,setMouse:s,toggleAtMouse:l,setPosition:c,panelWidth:m,panelHeight:u}=ee(),i=()=>{n(!e)};o.useEffect(()=>{const b=()=>n(x=>!x);return window.addEventListener("comfyuiAlign.toggleColorPicker",b),()=>{window.removeEventListener("comfyuiAlign.toggleColorPicker",b)}},[]);const w=()=>{n(!1)},y=o.useCallback(b=>{const x=window.innerWidth||document.documentElement.clientWidth,S=window.innerHeight||document.documentElement.clientHeight;return{x:Math.max(0,Math.min(b.x,x-m)),y:Math.max(0,Math.min(b.y,S-u))}},[m,u]);o.useEffect(()=>{const b=x=>s(x.clientX,x.clientY);return window.addEventListener("mousemove",b),()=>window.removeEventListener("mousemove",b)},[s]);const M=o.useMemo(()=>typeof window<"u"&&!!window.app,[]);return o.useEffect(()=>{if(M)return;const b=x=>{(x.code==="Backquote"||x.key==="`")&&(x.preventDefault(),x.stopPropagation(),l())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[M,l]),o.useEffect(()=>{const b=()=>{const x=ee.getState().position;c(y(x))};return window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[y,c]),a.jsxs("div",{className:"h-screen relative pointer-events-none",children:[t&&a.jsx("div",{className:"fixed pointer-events-none",style:{left:r.x,top:r.y,zIndex:2e3},children:a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsx(Ue,{}),a.jsx("div",{className:"mt-2 pointer-events-auto",children:a.jsx(so,{onMoonIconClick:i})})]})}),e&&a.jsx(ko,{onClose:w})]})}export{Io as default}; diff --git a/web/align/App-o9G5EZyH.js b/web/align/App-o9G5EZyH.js new file mode 100644 index 0000000..c1e8806 --- /dev/null +++ b/web/align/App-o9G5EZyH.js @@ -0,0 +1,79 @@ +import{r as t,R as ge,j as a,u as te}from"./main.js";import{executeIconAction as Z}from"./dispatch-BoyZYEfc.js";import{u as Ye,a as Y,c as Je,b as qe,D as Se,d as Qe,h as ze,e as et,f as tt,l as ot,i as rt,s as nt,g as st}from"./defaultColors-Js3rIaY-.js";import{g as at,a as lt,b as it}from"./groups-dbOCuPdX.js";import"./vendor-Bzgz95E1.js";function Pe(e){var n,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n{const n=pt(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{const m=c.split(ye);return m[0]===""&&m.length!==1&&m.shift(),Te(m,n)||ut(c)},getConflictingClassGroupIds:(c,m)=>{const u=o[c]||[];return m&&r[c]?[...u,...r[c]]:u}}},Te=(e,n)=>{if(e.length===0)return n.classGroupId;const o=e[0],r=n.nextPart.get(o),s=r?Te(e.slice(1),r):void 0;if(s)return s;if(n.validators.length===0)return;const l=e.join(ye);return n.validators.find(({validator:c})=>c(l))?.classGroupId},je=/^\[(.+)\]$/,ut=e=>{if(je.test(e)){const n=je.exec(e)[1],o=n?.substring(0,n.indexOf(":"));if(o)return"arbitrary.."+o}},pt=e=>{const{theme:n,classGroups:o}=e,r={nextPart:new Map,validators:[]};for(const s in o)be(o[s],r,s,n);return r},be=(e,n,o,r)=>{e.forEach(s=>{if(typeof s=="string"){const l=s===""?n:Ie(n,s);l.classGroupId=o;return}if(typeof s=="function"){if(mt(s)){be(s(r),n,o,r);return}n.validators.push({validator:s,classGroupId:o});return}Object.entries(s).forEach(([l,c])=>{be(c,Ie(n,l),o,r)})})},Ie=(e,n)=>{let o=e;return n.split(ye).forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},mt=e=>e.isThemeGetter,ht=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,o=new Map,r=new Map;const s=(l,c)=>{o.set(l,c),n++,n>e&&(n=0,r=o,o=new Map)};return{get(l){let c=o.get(l);if(c!==void 0)return c;if((c=r.get(l))!==void 0)return s(l,c),c},set(l,c){o.has(l)?o.set(l,c):s(l,c)}}},ve="!",we=":",gt=we.length,ft=e=>{const{prefix:n,experimentalParseClassName:o}=e;let r=s=>{const l=[];let c=0,m=0,u=0,i;for(let v=0;vu?i-u:void 0;return{modifiers:l,hasImportantModifier:L,baseClassName:y,maybePostfixModifierPosition:x}};if(n){const s=n+we,l=r;r=c=>c.startsWith(s)?l(c.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(o){const s=r;r=l=>o({className:l,parseClassName:s})}return r},Ct=e=>e.endsWith(ve)?e.substring(0,e.length-1):e.startsWith(ve)?e.substring(1):e,xt=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const s=[];let l=[];return r.forEach(c=>{c[0]==="["||n[c]?(s.push(...l.sort(),c),l=[]):l.push(c)}),s.push(...l.sort()),s}},bt=e=>({cache:ht(e.cacheSize),parseClassName:ft(e),sortModifiers:xt(e),...dt(e)}),vt=/\s+/,wt=(e,n)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:l}=n,c=[],m=e.trim().split(vt);let u="";for(let i=m.length-1;i>=0;i-=1){const w=m[i],{isExternal:y,modifiers:L,hasImportantModifier:x,baseClassName:v,maybePostfixModifierPosition:S}=o(w);if(y){u=w+(u.length>0?" "+u:u);continue}let N=!!S,M=r(N?v.substring(0,S):v);if(!M){if(!N){u=w+(u.length>0?" "+u:u);continue}if(M=r(v),!M){u=w+(u.length>0?" "+u:u);continue}N=!1}const k=l(L).join(":"),z=x?k+ve:k,R=z+M;if(c.includes(R))continue;c.push(R);const b=s(M,N);for(let I=0;I0?" "+u:u)}return u};function yt(){let e=0,n,o,r="";for(;e{if(typeof e=="string")return e;let n,o="";for(let r=0;ry(w),e());return o=bt(i),r=o.cache.get,s=o.cache.set,l=m,m(u)}function m(u){const i=r(u);if(i)return i;const w=wt(u,o);return s(u,w),w}return function(){return l(yt.apply(null,arguments))}}const F=e=>{const n=o=>o[e]||[];return n.isThemeGetter=!0,n},Be=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Fe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Mt=/^\d+\/\d+$/,Et=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lt=/\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$/,St=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,It=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ee=e=>Mt.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),K=e=>!!e&&Number.isInteger(Number(e)),Ce=e=>e.endsWith("%")&&H(e.slice(0,-1)),U=e=>Et.test(e),Rt=()=>!0,Ht=e=>Lt.test(e)&&!St.test(e),$e=()=>!1,At=e=>jt.test(e),Nt=e=>It.test(e),Vt=e=>!f(e)&&!C(e),zt=e=>oe(e,Ze,$e),f=e=>Be.test(e),J=e=>oe(e,Oe,Ht),xe=e=>oe(e,Ft,H),Re=e=>oe(e,Ge,$e),Pt=e=>oe(e,We,Nt),ue=e=>oe(e,_e,At),C=e=>Fe.test(e),se=e=>re(e,Oe),Tt=e=>re(e,$t),He=e=>re(e,Ge),Dt=e=>re(e,Ze),Bt=e=>re(e,We),pe=e=>re(e,_e,!0),oe=(e,n,o)=>{const r=Be.exec(e);return r?r[1]?n(r[1]):o(r[2]):!1},re=(e,n,o=!1)=>{const r=Fe.exec(e);return r?r[1]?n(r[1]):o:!1},Ge=e=>e==="position"||e==="percentage",We=e=>e==="image"||e==="url",Ze=e=>e==="length"||e==="size"||e==="bg-size",Oe=e=>e==="length",Ft=e=>e==="number",$t=e=>e==="family-name",_e=e=>e==="shadow",Gt=()=>{const e=F("color"),n=F("font"),o=F("text"),r=F("font-weight"),s=F("tracking"),l=F("leading"),c=F("breakpoint"),m=F("container"),u=F("spacing"),i=F("radius"),w=F("shadow"),y=F("inset-shadow"),L=F("text-shadow"),x=F("drop-shadow"),v=F("blur"),S=F("perspective"),N=F("aspect"),M=F("ease"),k=F("animate"),z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],b=()=>[...R(),C,f],I=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],p=()=>[C,f,u],P=()=>[ee,"full","auto",...p()],G=()=>[K,"none","subgrid",C,f],A=()=>["auto",{span:["full",K,C,f]},K,C,f],T=()=>[K,"auto",C,f],_=()=>["auto","min","max","fr",C,f],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],d=()=>["start","end","center","stretch","center-safe","end-safe"],h=()=>["auto",...p()],E=()=>[ee,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...p()],g=()=>[e,C,f],V=()=>[...R(),He,Re,{position:[C,f]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",Dt,zt,{size:[C,f]}],ae=()=>[Ce,se,J],D=()=>["","none","full",i,C,f],B=()=>["",H,se,J],le=()=>["solid","dashed","dotted","double"],Ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[H,Ce,He,Re],Le=()=>["","none",v,C,f],ie=()=>["none",H,C,f],ce=()=>["none",H,C,f],fe=()=>[H,C,f],de=()=>[ee,"full",...p()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[U],breakpoint:[U],color:[Rt],container:[U],"drop-shadow":[U],ease:["in","out","in-out"],font:[Vt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[U],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[U],shadow:[U],spacing:["px",H],text:[U],"text-shadow":[U],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ee,f,C,N]}],container:["container"],columns:[{columns:[H,f,C,m]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"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:b()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[K,"auto",C,f]}],basis:[{basis:[ee,"full","auto",m,...p()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,ee,"auto","initial","none",f]}],grow:[{grow:["",H,C,f]}],shrink:[{shrink:["",H,C,f]}],order:[{order:[K,"first","last","none",C,f]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_()}],"auto-rows":[{"auto-rows":_()}],gap:[{gap:p()}],"gap-x":[{"gap-x":p()}],"gap-y":[{"gap-y":p()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...d(),"normal"]}],"justify-self":[{"justify-self":["auto",...d()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...d(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...d(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...d(),"baseline"]}],"place-self":[{"place-self":["auto",...d()]}],p:[{p:p()}],px:[{px:p()}],py:[{py:p()}],ps:[{ps:p()}],pe:[{pe:p()}],pt:[{pt:p()}],pr:[{pr:p()}],pb:[{pb:p()}],pl:[{pl:p()}],m:[{m:h()}],mx:[{mx:h()}],my:[{my:h()}],ms:[{ms:h()}],me:[{me:h()}],mt:[{mt:h()}],mr:[{mr:h()}],mb:[{mb:h()}],ml:[{ml:h()}],"space-x":[{"space-x":p()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":p()}],"space-y-reverse":["space-y-reverse"],size:[{size:E()}],w:[{w:[m,"screen",...E()]}],"min-w":[{"min-w":[m,"screen","none",...E()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[c]},...E()]}],h:[{h:["screen","lh",...E()]}],"min-h":[{"min-h":["screen","lh","none",...E()]}],"max-h":[{"max-h":["screen","lh",...E()]}],"font-size":[{text:["base",o,se,J]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,C,xe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ce,f]}],"font-family":[{font:[Tt,f,n]}],"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:[s,C,f]}],"line-clamp":[{"line-clamp":[H,"none",C,xe]}],leading:[{leading:[l,...p()]}],"list-image":[{"list-image":["none",C,f]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",C,f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:g()}],"text-color":[{text:g()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",C,J]}],"text-decoration-color":[{decoration:g()}],"underline-offset":[{"underline-offset":[H,"auto",C,f]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",C,f]}],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",C,f]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},K,C,f],radial:["",C,f],conic:[K,C,f]},Bt,Pt]}],"bg-color":[{bg:g()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:g()}],"gradient-via":[{via:g()}],"gradient-to":[{to:g()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:g()}],"border-color-x":[{"border-x":g()}],"border-color-y":[{"border-y":g()}],"border-color-s":[{"border-s":g()}],"border-color-e":[{"border-e":g()}],"border-color-t":[{"border-t":g()}],"border-color-r":[{"border-r":g()}],"border-color-b":[{"border-b":g()}],"border-color-l":[{"border-l":g()}],"divide-color":[{divide:g()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,C,f]}],"outline-w":[{outline:["",H,se,J]}],"outline-color":[{outline:g()}],shadow:[{shadow:["","none",w,pe,ue]}],"shadow-color":[{shadow:g()}],"inset-shadow":[{"inset-shadow":["none",y,pe,ue]}],"inset-shadow-color":[{"inset-shadow":g()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:g()}],"ring-offset-w":[{"ring-offset":[H,J]}],"ring-offset-color":[{"ring-offset":g()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":g()}],"text-shadow":[{"text-shadow":["none",L,pe,ue]}],"text-shadow-color":[{"text-shadow":g()}],opacity:[{opacity:[H,C,f]}],"mix-blend":[{"mix-blend":[...Ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ee()}],"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":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":g()}],"mask-image-linear-to-color":[{"mask-linear-to":g()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":g()}],"mask-image-t-to-color":[{"mask-t-to":g()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":g()}],"mask-image-r-to-color":[{"mask-r-to":g()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":g()}],"mask-image-b-to-color":[{"mask-b-to":g()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":g()}],"mask-image-l-to-color":[{"mask-l-to":g()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":g()}],"mask-image-x-to-color":[{"mask-x-to":g()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":g()}],"mask-image-y-to-color":[{"mask-y-to":g()}],"mask-image-radial":[{"mask-radial":[C,f]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":g()}],"mask-image-radial-to-color":[{"mask-radial-to":g()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":g()}],"mask-image-conic-to-color":[{"mask-conic-to":g()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",C,f]}],filter:[{filter:["","none",C,f]}],blur:[{blur:Le()}],brightness:[{brightness:[H,C,f]}],contrast:[{contrast:[H,C,f]}],"drop-shadow":[{"drop-shadow":["","none",x,pe,ue]}],"drop-shadow-color":[{"drop-shadow":g()}],grayscale:[{grayscale:["",H,C,f]}],"hue-rotate":[{"hue-rotate":[H,C,f]}],invert:[{invert:["",H,C,f]}],saturate:[{saturate:[H,C,f]}],sepia:[{sepia:["",H,C,f]}],"backdrop-filter":[{"backdrop-filter":["","none",C,f]}],"backdrop-blur":[{"backdrop-blur":Le()}],"backdrop-brightness":[{"backdrop-brightness":[H,C,f]}],"backdrop-contrast":[{"backdrop-contrast":[H,C,f]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,C,f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,C,f]}],"backdrop-invert":[{"backdrop-invert":["",H,C,f]}],"backdrop-opacity":[{"backdrop-opacity":[H,C,f]}],"backdrop-saturate":[{"backdrop-saturate":[H,C,f]}],"backdrop-sepia":[{"backdrop-sepia":["",H,C,f]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":p()}],"border-spacing-x":[{"border-spacing-x":p()}],"border-spacing-y":[{"border-spacing-y":p()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",C,f]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",C,f]}],ease:[{ease:["linear","initial",M,C,f]}],delay:[{delay:[H,C,f]}],animate:[{animate:["none",k,C,f]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,C,f]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[C,f,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:g()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:g()}],"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",C,f]}],"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":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"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",C,f]}],fill:[{fill:["none",...g()]}],"stroke-w":[{stroke:[H,se,J,xe]}],stroke:[{stroke:["none",...g()]}],"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"]}},Wt=kt(Gt);function Zt(...e){return Wt(ct(e))}const Ot=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"})),_t=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"})),Ut=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"})),Kt=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"})),Xt=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"})),Yt=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"})),Jt=e=>t.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"})),ke=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"})),qt=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"})),Qt=e=>t.createElement("svg",{width:24,height:21,viewBox:"0 0 24 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{d:"M23 19C23.5523 19 24 19.4477 24 20C24 20.5523 23.5523 21 23 21L1 21C0.447716 21 -2.41411e-08 20.5523 0 20C2.41411e-08 19.4477 0.447715 19 1 19L23 19Z",fill:"#CCCCCC"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.7998 8.16726e-10C17.9199 8.16726e-10 18.4804 -0.000213534 18.9082 0.217773C19.2845 0.409508 19.5905 0.715544 19.7822 1.0918C20.0002 1.51962 20 2.08009 20 3.2002V12.7998C20 13.9199 20.0002 14.4804 19.7822 14.9082C19.5905 15.2845 19.2845 15.5905 18.9082 15.7822C18.4804 16.0002 17.9199 16 16.7998 16H7.2002C6.08009 16 5.51962 16.0002 5.0918 15.7822C4.71554 15.5905 4.40951 15.2845 4.21777 14.9082C3.99979 14.4804 4 13.9199 4 12.7998V3.2002C4 2.08009 3.99979 1.51962 4.21777 1.0918C4.40951 0.715544 4.71554 0.409508 5.0918 0.217773C5.51962 -0.000213534 6.08009 8.16726e-10 7.2002 8.16726e-10H16.7998ZM7.59961 2C7.03982 2 6.75976 2.00041 6.5459 2.10938C6.35793 2.20522 6.20522 2.35793 6.10938 2.5459C6.00041 2.75976 6 3.03982 6 3.59961V12.4004C6 12.9602 6.00041 13.2402 6.10938 13.4541C6.20522 13.6421 6.35793 13.7948 6.5459 13.8906C6.75976 13.9996 7.03982 14 7.59961 14H16.4004C16.9602 14 17.2402 13.9996 17.4541 13.8906C17.6421 13.7948 17.7948 13.6421 17.8906 13.4541C17.9996 13.2402 18 12.9602 18 12.4004V3.59961C18 3.03982 17.9996 2.75976 17.8906 2.5459C17.7948 2.35793 17.6421 2.20522 17.4541 2.10938C17.2402 2.00041 16.9602 2 16.4004 2H7.59961Z",fill:"#CCCCCC"})),eo=e=>t.createElement("svg",{width:21,height:24,viewBox:"0 0 21 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{d:"M2 23C2 23.5523 1.55228 24 0.999998 24C0.447714 24 -1.65063e-06 23.5523 -1.63308e-06 23L1.19249e-08 1C2.94801e-08 0.447716 0.447715 2.20942e-07 1 2.38498e-07C1.55228 2.56053e-07 2 0.447716 2 1L2 23Z",fill:"#CCCCCC"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 16.7998C21 17.9199 21.0002 18.4804 20.7822 18.9082C20.5905 19.2845 20.2845 19.5905 19.9082 19.7822C19.4804 20.0002 18.9199 20 17.7998 20L8.2002 20C7.08009 20 6.51962 20.0002 6.0918 19.7822C5.71554 19.5905 5.40951 19.2845 5.21777 18.9082C4.99979 18.4804 5 17.9199 5 16.7998L5 7.2002C5 6.08009 4.99979 5.51962 5.21777 5.0918C5.40951 4.71554 5.71554 4.40951 6.0918 4.21777C6.51962 3.99979 7.08009 4 8.2002 4L17.7998 4C18.9199 4 19.4804 3.99979 19.9082 4.21777C20.2845 4.40951 20.5905 4.71554 20.7822 5.0918C21.0002 5.51962 21 6.08009 21 7.2002L21 16.7998ZM19 7.59961C19 7.03982 18.9996 6.75976 18.8906 6.5459C18.7948 6.35793 18.6421 6.20522 18.4541 6.10938C18.2402 6.00041 17.9602 6 17.4004 6L8.59961 6C8.03982 6 7.75976 6.00041 7.5459 6.10938C7.35793 6.20522 7.20522 6.35793 7.10938 6.5459C7.00041 6.75976 7 7.03982 7 7.59961L7 16.4004C7 16.9602 7.00041 17.2402 7.10938 17.4541C7.20522 17.6421 7.35793 17.7948 7.5459 17.8906C7.75976 17.9996 8.03982 18 8.59961 18L17.4004 18C17.9602 18 18.2402 17.9996 18.4541 17.8906C18.6421 17.7948 18.7948 17.6421 18.8906 17.4541C18.9996 17.2402 19 16.9602 19 16.4004L19 7.59961Z",fill:"#CCCCCC"})),to=e=>t.createElement("svg",{width:21,height:24,viewBox:"0 0 21 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{d:"M19 1C19 0.447716 19.4477 2.07771e-07 20 2.38498e-07C20.5523 2.69225e-07 21 0.447716 21 1L21 23C21 23.5523 20.5523 24 20 24C19.4477 24 19 23.5523 19 23L19 1Z",fill:"#CCCCCC"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.01152e-07 7.2002C2.1451e-07 6.08009 -0.000213313 5.51962 0.217774 5.0918C0.409508 4.71554 0.715544 4.40951 1.0918 4.21777C1.51962 3.99979 2.08009 4 3.2002 4L12.7998 4C13.9199 4 14.4804 3.99979 14.9082 4.21777C15.2845 4.40951 15.5905 4.71554 15.7822 5.0918C16.0002 5.51962 16 6.08009 16 7.2002L16 16.7998C16 17.9199 16.0002 18.4804 15.7822 18.9082C15.5905 19.2845 15.2845 19.5905 14.9082 19.7822C14.4804 20.0002 13.9199 20 12.7998 20L3.2002 20C2.08009 20 1.51962 20.0002 1.0918 19.7822C0.715544 19.5905 0.409508 19.2845 0.217773 18.9082C-0.000213468 18.4804 7.33211e-08 17.9199 8.66782e-08 16.7998L2.01152e-07 7.2002ZM2 16.4004C2 16.9602 2.00041 17.2402 2.10938 17.4541C2.20522 17.6421 2.35793 17.7948 2.5459 17.8906C2.75976 17.9996 3.03982 18 3.59961 18L12.4004 18C12.9602 18 13.2402 17.9996 13.4541 17.8906C13.6421 17.7948 13.7948 17.6421 13.8906 17.4541C13.9996 17.2402 14 16.9602 14 16.4004L14 7.59961C14 7.03982 13.9996 6.75976 13.8906 6.5459C13.7948 6.35793 13.6421 6.20522 13.4541 6.10938C13.2402 6.00041 12.9602 6 12.4004 6L3.59961 6C3.03982 6 2.75976 6.00041 2.5459 6.10938C2.35793 6.20522 2.20522 6.35793 2.10938 6.5459C2.00041 6.75976 2 7.03982 2 7.59961L2 16.4004Z",fill:"#CCCCCC"})),oo=e=>t.createElement("svg",{width:24,height:21,viewBox:"0 0 24 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{d:"M1 2C0.447717 2 1.67603e-06 1.55228 1.74846e-06 0.999996C1.82088e-06 0.447711 0.447717 -3.9905e-06 1 -3.91807e-06L23 -8.74228e-08C23.5523 -1.49994e-08 24 0.447715 24 1C24 1.55228 23.5523 2 23 2L1 2Z",fill:"#CCCCCC"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.2002 21C6.08009 21 5.51962 21.0002 5.0918 20.7822C4.71554 20.5905 4.40951 20.2845 4.21777 19.9082C3.99979 19.4804 4 18.9199 4 17.7998L4 8.20019C4 7.08009 3.99979 6.51962 4.21777 6.0918C4.40951 5.71554 4.71555 5.40951 5.0918 5.21777C5.51962 4.99978 6.08009 5 7.2002 5L16.7998 5C17.9199 5 18.4804 4.99979 18.9082 5.21777C19.2845 5.40951 19.5905 5.71554 19.7822 6.0918C20.0002 6.51962 20 7.08009 20 8.20019L20 17.7998C20 18.9199 20.0002 19.4804 19.7822 19.9082C19.5905 20.2845 19.2845 20.5905 18.9082 20.7822C18.4804 21.0002 17.9199 21 16.7998 21L7.2002 21ZM16.4004 19C16.9602 19 17.2402 18.9996 17.4541 18.8906C17.6421 18.7948 17.7948 18.6421 17.8906 18.4541C17.9996 18.2402 18 17.9602 18 17.4004L18 8.59961C18 8.03982 17.9996 7.75976 17.8906 7.5459C17.7948 7.35793 17.6421 7.20521 17.4541 7.10937C17.2402 7.00041 16.9602 7 16.4004 7L7.59961 7C7.03982 7 6.75976 7.00041 6.5459 7.10937C6.35793 7.20521 6.20522 7.35793 6.10938 7.5459C6.00041 7.75976 6 8.03982 6 8.59961L6 17.4004C6 17.9602 6.00041 18.2402 6.10938 18.4541C6.20522 18.6421 6.35793 18.7948 6.5459 18.8906C6.75976 18.9996 7.03982 19 7.59961 19L16.4004 19Z",fill:"#CCCCCC"})),ro=e=>t.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},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"})),Ae={"align-horizontally":Ot,"align-to-bottom":_t,"align-to-left":Ut,"align-to-right":Kt,"align-to-top":Xt,"align-vertically":Yt,"moon-icon":ke,"stretch-horizontally":qt,"stretch-to-bottom":Qt,"stretch-to-left":eo,"stretch-to-right":to,"stretch-to-top":oo,"stretch-vertically":ro,"color-dropper":Jt},Me=ge.memo(({name:e,className:n})=>{const o=Ae[e]||Ae["align-to-top"];return a.jsx(o,{className:n})});Me.displayName="SvgIcon";const Ue=ge.forwardRef(({className:e,iconName:n="align-to-top",icon:o,children:r,...s},l)=>{const c="h-6 w-6 [&>path]:fill-[#c0c0c0] group-hover:[&>path]:fill-[#E5E5E5] transition-colors duration-200",m=i=>{const w=te.getState();w.shortcutKeyHeld&&w.setHoveredIcon(n),s.onMouseEnter?.(i)},u=i=>{const w=te.getState();w.shortcutKeyHeld&&w.setHoveredIcon(null),s.onMouseLeave?.(i)};return a.jsx("button",{className:Zt("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",e),ref:l,onMouseEnter:m,onMouseLeave:u,...s,children:r||o||a.jsx(Me,{name:n,className:c})})});Ue.displayName="Button";function no(){const e=t.useMemo(()=>({"align-to-left":()=>Z("align-to-left"),"align-to-right":()=>Z("align-to-right"),"align-to-top":()=>Z("align-to-top"),"align-to-bottom":()=>Z("align-to-bottom"),"align-vertically":()=>Z("align-vertically"),"align-horizontally":()=>Z("align-horizontally"),"stretch-to-left":()=>Z("stretch-to-left"),"stretch-to-right":()=>Z("stretch-to-right"),"stretch-to-top":()=>Z("stretch-to-top"),"stretch-to-bottom":()=>Z("stretch-to-bottom"),"stretch-horizontally":()=>Z("stretch-horizontally"),"stretch-vertically":()=>Z("stretch-vertically")}),[]);return{getHandler:o=>e[o]}}const so=[{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"}],Ke=ge.memo(({config:e})=>{const{containerClass:n,groupClass:o,buttons:r}=e,{getHandler:s}=no();return a.jsx("div",{className:n,children:a.jsx("div",{className:o,children:r.map((l,c)=>a.jsx(Ue,{iconName:l,onClick:s(l)},`${e.id}-${l}-${c}`))})})});Ke.displayName="ButtonGroup";function ao(){const e=t.useMemo(()=>so,[]);return a.jsx("div",{className:"flex items-center justify-center p-8 pointer-events-none",children:a.jsx("div",{className:"relative w-[320px] h-80",children:e.map(n=>a.jsx(Ke,{config:n},n.id))})})}const Xe=ge.memo(ao);Xe.displayName="CrossPanel";const ne=()=>{const{history:e,addToHistory:n,clearHistory:o}=Ye(),{setFromHex:r}=Y(),s=i=>{r(i),n(i)},l=()=>{o()},c=()=>{n()},m=()=>Math.max(0,10-e.length),u=()=>{const i=m(),w=Array(i).fill(null);return[...e.map(y=>({type:"color",color:y})),...w.map(()=>({type:"placeholder",color:null}))]};return{history:e,placeholderCount:m(),displayData:u(),handleHistoryColorClick:s,handleClearHistory:l,handleAddCurrentColor:c}},lo=({className:e="",onMoonIconClick:n})=>{const[o,r]=t.useState(!1),[s,l]=t.useState(!1),{setFromHex:c}=Y(),{handleAddCurrentColor:m}=ne(),u=y=>{const L=te.getState();L.shortcutKeyHeld&&L.setHoveredColorBarIndex(y)},i=()=>{const y=te.getState();y.shortcutKeyHeld&&y.setHoveredColorBarIndex(null)},w=()=>{r(!0),setTimeout(()=>{r(!1)},200)};return a.jsx("div",{className:`w-[320px] h-10 bg-[#0c0c0c] rounded-4xl flex items-center justify-center pointer-events-auto ${e}`,children:a.jsx("div",{className:"w-[300px] h-5 rounded-4xl flex items-center justify-between px-0",children:Array.from({length:10},(y,L)=>L===7?a.jsx("div",{className:"w-5 h-5 flex items-center justify-center cursor-pointer transition-all duration-200 hover:scale-110",onClick:n,onMouseEnter:()=>u(7),onMouseLeave:i,children:a.jsx(ke,{width:"20",height:"20",className:"text-[#FFB900]"})},L):L===8?a.jsx("div",{className:"w-5 h-5 rounded-full border-2 cursor-pointer transition-all duration-200 hover:scale-110",style:{borderColor:o?"#FF6467":"#cccccc",backgroundColor:"transparent"},onClick:()=>{w(),Je()},onMouseEnter:()=>u(8),onMouseLeave:i},L):L===9?a.jsx("div",{className:"w-5 h-5 rounded-full border-2 flex items-center justify-center cursor-pointer transition-all duration-200 hover:scale-110",style:{borderColor:s?"#05DF72":"#cccccc",backgroundColor:"transparent"},onMouseEnter:()=>u(9),onMouseLeave:i,onClick:()=>{l(!0),setTimeout(()=>l(!1),200),qe()},children:a.jsx("div",{className:"w-2 h-2 rounded-full transition-colors duration-200",style:{backgroundColor:s?"#05DF72":"#FF6467"}})},L):a.jsx("div",{className:"w-5 h-5 rounded-full cursor-pointer transition-all duration-200 hover:scale-110",style:{backgroundColor:L<7?Se[L]:"#3B82F6"},onClick:L<7?()=>{const x=Se[L];c(x),m(),Qe(x)}:void 0,onMouseEnter:()=>u(L),onMouseLeave:i},L))})})},X={width:330,height:200},Ne=(e,n)=>Math.max(0,Math.min(n,e)),io=({className:e="",hue:n=0,saturation:o=100,value:r=100,onChange:s,onChangeComplete:l})=>{const c=t.useRef(null),[m,u]=t.useState(!1),[i,w]=t.useState({x:o/100*X.width,y:(100-r)/100*X.height}),y=ze(n,100,100),L=t.useCallback((M,k)=>{const z=M/X.width*100,R=100-k/X.height*100;return{saturation:z,value:R}},[]),x=t.useCallback((M,k)=>{if(!c.current)return null;const z=c.current.getBoundingClientRect(),R=Ne(M-z.left,X.width),b=Ne(k-z.top,X.height);return w({x:R,y:b}),L(R,b)},[L]),v=t.useCallback(M=>{const k=x(M.clientX,M.clientY);k&&(u(!0),s?.(k.saturation,k.value)),M.preventDefault(),M.stopPropagation()},[x,s]),S=t.useCallback(M=>{if(!m)return;const k=x(M.clientX,M.clientY);k&&s?.(k.saturation,k.value)},[m,x,s]),N=t.useCallback(()=>{if(m){u(!1);const{saturation:M,value:k}=L(i.x,i.y);l?.(M,k)}},[m,i,L,l]);return t.useEffect(()=>(m&&(document.addEventListener("mousemove",S),document.addEventListener("mouseup",N)),()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",N)}),[m,S,N]),t.useEffect(()=>{w({x:o/100*X.width,y:(100-r)/100*X.height})},[o,r]),a.jsx("div",{ref:c,className:`relative cursor-crosshair select-none ${e}`,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(${y.r}, ${y.g}, ${y.b}) 100%) + `,overflow:"hidden"},onMouseDown:v,children:a.jsx("div",{className:"absolute pointer-events-none",style:{left:`${i.x}px`,top:`${i.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)"}})})},co=({className:e="",onColorPicked:n,disabled:o=!1})=>{const{isPickerActive:r,setPickerActive:s,pickColor:l}=et(),c=t.useCallback(async()=>{if(!(o||r))try{if(s(!0),"EyeDropper"in window){const u=await new window.EyeDropper().open();if(u?.sRGBHex){const i=u.sRGBHex,w=parseInt(i.slice(1,3),16),y=parseInt(i.slice(3,5),16),L=parseInt(i.slice(5,7),16);l(w,y,L),n?.({r:w,g:y,b:L,hex:i})}}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(m){console.log("Color picking cancelled or failed:",m)}finally{s(!1)}},[o,r,n,s,l]);return a.jsx("button",{className:` + relative overflow-visible + w-[30px] h-[30px] + rounded + border border-gray-400/15 + flex items-center justify-center + transition-all duration-200 + ${r?"bg-blue-500/20 border-blue-400/40 text-blue-400":"bg-transparent hover:bg-gray-400/10 text-gray-400/88"} + ${o?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-gray-400/25"} + ${e} + `,onClick:c,disabled:o,type:"button",children:a.jsx("div",{className:"w-5 h-5 flex items-center justify-center",children:a.jsx(Me,{name:"color-dropper",className:`w-5 h-5 ${r?"animate-pulse":""}`})})})},uo=({className:e="",onChange:n,onChangeComplete:o})=>{const[r,s]=t.useState(!1),[l,c]=t.useState(""),[m,u]=t.useState(!1),[i,w]=t.useState("CCCCCC"),[y,L]=t.useState(""),x=t.useRef(null),v=t.useRef(null),[S,N]=t.useState(null),{hex:M,setFromHex:k}=Y(),{handleAddCurrentColor:z}=ne(),R=t.useCallback(A=>/^[0-9A-Fa-f]{6}$/.test(A),[]);t.useEffect(()=>{const A=M.replace("#","").toUpperCase();!r&&A!==y&&A!==i&&(w(A||"CCCCCC"),c(A||"CCCCCC"),L(A))},[M,r,y,i]);const b=t.useCallback(A=>{if(r)return;if(S){clearTimeout(S),N(null);return}const T=A.ctrlKey||A.metaKey,_=setTimeout(async()=>{const W=T?`#${i}`:i;try{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(W);else{const d=document.createElement("textarea");d.value=W,d.style.position="fixed",d.style.opacity="0",document.body.appendChild(d),d.select();try{document.execCommand("copy")}finally{document.body.removeChild(d)}}u(!0),setTimeout(()=>u(!1),300)}catch(d){if(console.error("Failed to copy to clipboard:",d),v.current){const h=window.getSelection(),E=document.createRange();E.selectNodeContents(v.current),h?.removeAllRanges(),h?.addRange(E)}}N(null)},250);N(_)},[i,r,S]),I=t.useCallback(()=>{r||(S&&(clearTimeout(S),N(null)),s(!0),c(i),setTimeout(()=>{x.current&&(x.current.focus(),x.current.select())},0))},[i,r,S]),j=t.useCallback(A=>{let T=A.target.value.toUpperCase().replace(/[^0-9A-F]/g,"");if(T.length>6&&(T=T.slice(0,6)),c(T),n?.(T),T.length===6&&R(T)){const _=`#${T}`;k(_)}},[n,R,k]),p=t.useCallback(()=>{if(l.length===6&&R(l)){const A=`#${l.toUpperCase()}`;w(l.toUpperCase()),L(l.toUpperCase()),k(A),z(),o?.(A)}else c(i);s(!1)},[l,R,i,k,o]),P=t.useCallback(A=>{A.key==="Enter"?p():A.key==="Escape"&&(c(i),s(!1))},[p,i]),G=t.useCallback(()=>{p()},[p]);return t.useEffect(()=>{const A=T=>{v.current&&!v.current.contains(T.target)&&r&&p()};return r&&document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[r,p]),t.useEffect(()=>()=>{S&&clearTimeout(S)},[S]),a.jsxs("div",{ref:v,className:` + relative + w-[78px] h-6 + rounded + border + flex items-center justify-center + transition-all duration-200 + ${m?"border-[#04DE71] bg-transparent":r?"border-blue-400/60 bg-gray-800/50":"border-gray-400/15 bg-transparent hover:border-gray-400/25"} + ${r?"cursor-text":"cursor-pointer"} + ${e} + `,onClick:r?void 0:A=>b(A),onDoubleClick:I,children:[r?a.jsx("input",{ref:x,type:"text",value:l,onChange:j,onKeyDown:P,onBlur:G,className:` + w-full h-full + bg-transparent + text-center + outline-none + text-[12px] font-medium + text-gray-300 + placeholder-gray-500 + `,placeholder:"CCCCCC",maxLength:6,style:{fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"12px",lineHeight:"1.2102272510528564em"}}):a.jsx("span",{className:` + text-[12px] font-medium + select-none + pointer-events-none + `,style:{color:"rgba(204, 204, 204, 0.88)",fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"12px",lineHeight:"1.2102272510528564em",textAlign:"center"},children:i||"CCCCCC"}),r&&a.jsx("div",{className:` + absolute -top-1 -right-1 + w-2 h-2 + bg-blue-400 + rounded-full + animate-pulse + `})]})},po={isValidRGBA:(e,n)=>{const o=parseFloat(n);if(isNaN(o))return!1;switch(e){case"r":case"g":case"b":return o>=0&&o<=255&&Number.isInteger(o);case"a":return o>=0&&o<=100;default:return!1}}},q={formatDisplayValue:(e,n)=>{switch(e){case"r":case"g":case"b":return Math.round(n).toString();case"a":return Math.round(n*100).toString();default:return n.toString()}},formatCopyValue:(e,n)=>{switch(e){case"r":case"g":case"b":return Math.round(n).toString();case"a":return n.toFixed(3);default:return n.toString()}},formatRGBAString:e=>`rgba(${q.formatCopyValue("r",e.r)}, ${q.formatCopyValue("g",e.g)}, ${q.formatCopyValue("b",e.b)}, ${q.formatCopyValue("a",e.a)})`},he={copyToClipboard:async e=>{try{return await navigator.clipboard.writeText(e),!0}catch(n){return console.error("Failed to copy to clipboard:",n),!1}},copyIndividualValue:async(e,n)=>{const o=q.formatCopyValue(e,n[e]);return he.copyToClipboard(o)},copyFullRGBA:async e=>{const n=q.formatRGBAString(e);return he.copyToClipboard(n)},fallbackTextSelection:e=>{const n=window.getSelection(),o=document.createRange();o.selectNodeContents(e),n?.removeAllRanges(),n?.addRange(o)}},me={validateAndFormatInput:(e,n)=>{let o=n;switch(e){case"r":case"g":case"b":o=o.replace(/[^0-9]/g,""),o&&parseInt(o)>255&&(o="255");break;case"a":o=o.replace(/[^0-9]/g,""),o&&parseInt(o)>100&&(o="100");break}return o},processInputValue:(e,n)=>{const o=parseFloat(n);return e==="a"?o/100:o},convertInputToNumber:(e,n)=>me.processInputValue(e,n)},mo=({className:e="",onChange:n,onChangeComplete:o})=>{const[r,s]=t.useState(null),[l,c]=t.useState({r:"80",g:"80",b:"80",a:"100"}),[m,u]=t.useState(null),[i,w]=t.useState({r:204,g:204,b:204,a:1}),[y,L]=t.useState({r:204,g:204,b:204,a:1}),[x,v]=t.useState(null),S=t.useRef({r:null,g:null,b:null,a:null}),N=t.useRef(null),{rgb:M,alpha:k,setFromRGB:z,setAlpha:R}=Y(),{handleAddCurrentColor:b}=ne(),{isValidRGBA:I}=po,{formatDisplayValue:j}=q;t.useEffect(()=>{const d={r:M.r,g:M.g,b:M.b,a:k},h=Object.keys(d).some(E=>{const g=E;return Math.abs(d[g]-y[g])>.001});!r&&h&&(w(d),L(d),c({r:j("r",d.r),g:j("g",d.g),b:j("b",d.b),a:j("a",d.a)}))},[M,k,r,y,j]);const p=t.useCallback(async(d,h)=>{if(x){clearTimeout(x),v(null);return}const E=setTimeout(async()=>{const g=h.ctrlKey||h.metaKey,V={r:M.r,g:M.g,b:M.b,a:k};try{g?(await he.copyFullRGBA(V),u("all")):(await he.copyIndividualValue(d,V),u(d)),setTimeout(()=>u(null),300)}catch(O){console.error("复制失败:",O)}v(null)},250);v(E)},[M,k,x]),P=t.useCallback(d=>{r||(x&&(clearTimeout(x),v(null)),s(d),c(h=>({...h,[d]:j(d,i[d])})),setTimeout(()=>{const h=S.current[d];h&&(h.focus(),h.select())},0))},[i,r,j,x]),G=t.useCallback((d,h)=>{if(c(E=>({...E,[d]:h})),I(d,h)){const E=me.processInputValue(d,h),V={...{r:M.r,g:M.g,b:M.b,a:k},[d]:E};d==="a"?R(E):z(V.r,V.g,V.b),n?.(V.r,V.g,V.b,V.a)}},[M,k,z,R,n,I]),A=t.useCallback(d=>{const h=l[d];if(I(d,h)){const E=me.processInputValue(d,h),V={...{r:M.r,g:M.g,b:M.b,a:k},[d]:E};w(V),L(V),d==="a"?R(E):z(V.r,V.g,V.b),b(),o?.(V.r,V.g,V.b,V.a)}else{const E=j(d,i[d]);c(g=>({...g,[d]:E}))}s(null)},[l,i,k,z,R,o,I,j]),T=t.useCallback((d,h)=>{if(h.key==="Enter")A(d);else if(h.key==="Escape")c(E=>({...E,[d]:j(d,i[d])})),s(null);else if(h.key==="Tab"){h.preventDefault(),A(d);const E=["r","g","b","a"],V=(E.indexOf(d)+1)%E.length,O=E[V];setTimeout(()=>{P(O)},0)}},[A,i,j,P]),_=t.useCallback(d=>{A(d)},[A]);t.useEffect(()=>()=>{x&&clearTimeout(x)},[x]),t.useEffect(()=>{const d=h=>{N.current&&!N.current.contains(h.target)&&r&&A(r)};return r&&document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[r,A]);const W=(d,h)=>{const E=r===d,g=E?l[d]:j(d,i[d]);return a.jsxs("div",{className:` + relative + ${h} h-6 + rounded + border + flex items-center justify-center + transition-all duration-200 + ${m==="all"||m===d?"border-[#04DE71] bg-transparent":E?"border-blue-400/60 bg-gray-800/50":"border-gray-400/15 bg-transparent hover:border-gray-400/25"} + ${E?"cursor-text":"cursor-pointer"} + `,onClick:E?void 0:V=>p(d,V),onDoubleClick:()=>P(d),children:[E?a.jsx("input",{ref:V=>{S.current[d]=V},type:"text",value:g,onChange:V=>G(d,me.validateAndFormatInput(d,V.target.value)),onKeyDown:V=>T(d,V),onBlur:()=>_(d),className:` + w-full h-full + bg-transparent + text-center + outline-none + text-[12px] font-medium + text-gray-300 + placeholder-gray-500 + `,placeholder:d==="a"?"100":"204",maxLength:3,style:{fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"12px",lineHeight:"1.2102272510528564em"}}):a.jsxs("span",{className:` + text-[12px] font-medium + select-none + pointer-events-none + `,style:{color:"rgba(204, 204, 204, 0.88)",fontFamily:"Inter, sans-serif",fontWeight:500,fontSize:"12px",lineHeight:"1.2102272510528564em",textAlign:"center"},children:[g,d==="a"?"%":""]}),E&&a.jsx("div",{className:` + absolute -top-1 -right-1 + w-2 h-2 + bg-blue-400 + rounded-full + animate-pulse + `})]},d)};return a.jsxs("div",{ref:N,className:`flex items-center gap-1 ${e}`,children:[W("r","w-[58px]"),W("g","w-[58px]"),W("b","w-[58px]"),W("a","w-[58px]")]})},ho=({className:e="",onChange:n,onChangeComplete:o})=>{const r=t.useRef(null),[s,l]=t.useState(!1),{hue:c,setHue:m}=Y(),{handleAddCurrentColor:u}=ne(),i=5,y=280,[L,x]=t.useState({x:i+c/360*y}),v=t.useCallback(k=>{const R=(k-i)/y*360;return R>=360?0:Math.max(0,R)},[]),S=t.useCallback(k=>{if(!r.current)return;l(!0);const z=r.current.getBoundingClientRect(),R=Math.max(i,Math.min(i+y,k.clientX-z.left));x({x:R});const b=v(R);m(b),n?.(b),k.preventDefault(),k.stopPropagation()},[v,m,n]),N=t.useCallback(k=>{if(!s||!r.current)return;const z=r.current.getBoundingClientRect(),R=Math.max(i,Math.min(i+y,k.clientX-z.left));x({x:R});const b=v(R);m(b),n?.(b)},[s,v,m,n]),M=t.useCallback(()=>{if(s){l(!1);const k=v(L.x);o?.(k),u()}},[s,L.x,v,o,u]);return t.useEffect(()=>(s&&(document.addEventListener("mousemove",N),document.addEventListener("mouseup",M)),()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",M)}),[s,N,M]),t.useEffect(()=>{x({x:i+c/360*y})},[c]),a.jsx("div",{ref:r,className:`relative cursor-pointer select-none ${e}`,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:`${i}px`,paddingRight:`${i}px`,boxSizing:"border-box"},onMouseDown:S,children:a.jsx("div",{className:"absolute pointer-events-none",style:{left:`${L.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}})})},go=({className:e="",onChange:n,onChangeComplete:o})=>{const r=t.useRef(null),[s,l]=t.useState(!1),{hue:c,saturation:m,value:u,alpha:i,setAlpha:w}=Y(),y=5,x=280,[v,S]=t.useState({x:y+i*x}),N=ze(c,m,u),M=`rgb(${N.r}, ${N.g}, ${N.b})`,k=t.useCallback(I=>{const p=(I-y)/x;return Math.max(0,Math.min(1,p))},[]),z=t.useCallback(I=>{if(!r.current)return;l(!0);const j=r.current.getBoundingClientRect(),p=Math.max(y,Math.min(y+x,I.clientX-j.left));S({x:p});const P=k(p);w(P),n?.(P),I.preventDefault(),I.stopPropagation()},[k,w,n]),R=t.useCallback(I=>{if(!s||!r.current)return;const j=r.current.getBoundingClientRect(),p=Math.max(y,Math.min(y+x,I.clientX-j.left));S({x:p});const P=k(p);w(P),n?.(P)},[s,k,w,n]),b=t.useCallback(()=>{if(s){l(!1);const I=k(v.x);o?.(I)}},[s,v.x,k,o]);return t.useEffect(()=>(s&&(document.addEventListener("mousemove",R),document.addEventListener("mouseup",b)),()=>{document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",b)}),[s,R,b]),t.useEffect(()=>{S({x:y+i*x})},[i]),a.jsxs("div",{ref:r,className:`relative cursor-pointer select-none ${e}`,style:{width:"290px",height:"10px",borderRadius:"10px",overflow:"visible",paddingLeft:`${y}px`,paddingRight:`${y}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:z,children:[a.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(90deg, transparent 0%, ${M} 100%)`,borderRadius:"10px"}}),a.jsx("div",{className:"absolute pointer-events-none",style:{left:`${v.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}})]})},fo=()=>{const{displayData:e,handleHistoryColorClick:n}=ne(),[o,r]=t.useState(null);return a.jsx("div",{style:Co,children:e.map((s,l)=>a.jsx("div",{style:{...xo,...s.type==="color"?bo:vo,backgroundColor:s.type==="color"?s.color:"transparent",transform:s.type==="color"&&o===l?"scale(1.1)":"scale(1)",boxShadow:s.type==="color"&&o===l?"0 2px 8px rgba(0, 0, 0, 0.2)":"none",zIndex:s.type==="color"&&o===l?1:0},onMouseEnter:s.type==="color"?()=>r(l):void 0,onMouseLeave:s.type==="color"?()=>r(null):void 0,onClick:s.type==="color"?()=>n(s.color):void 0},l))})},Co={display:"flex",gap:"10px",width:"330px",height:"24px"},xo={width:"24px",height:"24px",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s ease",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"},bo={border:"1px solid rgba(0, 0, 0, 0.1)"},vo={width:"24px",height:"24px",backgroundColor:"transparent",border:"1px solid rgba(204, 204, 204, 0.1)",borderRadius:"4px",cursor:"default"},wo=({className:e="",onColorSelect:n})=>{const{presets:o,presetLabels:r,presetLabelList:s,removePreset:l}=tt(),{setFromHex:c}=Y(),[m,u]=t.useState({visible:!1,x:0,y:0,colorIndex:-1}),i=t.useRef(null),[w,y]=t.useState(null);t.useEffect(()=>{ot().catch(()=>{})},[]);const L=t.useCallback(b=>{c(b),n?.(b)},[c,n]),x=t.useCallback((b,I)=>{const j=b.target.getBoundingClientRect(),p=String(I||"Preset").replace(/\s*\((?:header|panel)\)\s*$/i,"");y({x:j.left+j.width/2,y:j.top-8,label:p})},[]),v=t.useCallback(()=>{y(null)},[]),S=t.useCallback((b,I)=>{b.preventDefault(),u({visible:!0,x:b.clientX,y:b.clientY,colorIndex:I})},[]),N=t.useCallback(()=>{u(b=>({...b,visible:!1}))},[]),M=t.useCallback(async()=>{try{const b=m.colorIndex,I=b>=0?o[b]:void 0;if(!I){N();return}const j=String(I).toUpperCase(),p=z(),P=b>=0&&b{}),typeof l=="function"&&l(b)}catch(b){console.warn("Delete Color failed",b)}finally{N()}},[m.colorIndex,o,l,N]),k=t.useCallback(b=>{i.current&&(b.preventDefault(),i.current.scrollTop+=b.deltaY)},[]),z=()=>{const b=[],I={};for(const j of o){if(j==="placeholder")continue;const p=j,P=I[p]||0;I[p]=P+1;const A=(s?.[p]||[])[P]||r?.[p]||"Preset";b.push({color:p,label:A})}return b.length<30&&b.push({placeholder:!0}),b},R=z();return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`relative ${e}`,style:{width:"330px",height:"122px",fontFamily:"Inter, sans-serif"},onClick:N,children:[a.jsx("div",{className:"flex items-center",style:{width:"330px",height:"20px",borderBottom:"1px solid rgba(155, 146, 146, 0.1)"},children:a.jsx("span",{className:"text-center",style:{color:"#CCCCCC",fontSize:"12px",fontWeight:500,lineHeight:"14.52px",marginLeft:"-1px",marginTop:"6px"},children:"Color Presets"})}),a.jsxs("div",{ref:i,className:"overflow-auto",style:{width:"330px",height:"102px",marginTop:"10px",scrollbarWidth:"none",msOverflowStyle:"none",paddingBottom:"10px"},onWheel:k,children:[a.jsx("style",{children:` + .overflow-auto::-webkit-scrollbar { + display: none; + } + `}),a.jsx("div",{className:"grid grid-cols-10 gap-2.5",style:{gridTemplateColumns:"repeat(10, 24px)",gridAutoRows:"24px",rowGap:"10px"},children:R.map((b,I)=>"placeholder"in b?a.jsx("div",{style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"1px solid rgba(204, 204, 204, 0.1)",borderRadius:"4px",cursor:"default"}},`placeholder-${I}`):a.jsx("div",{className:"cursor-pointer transition-all duration-200 hover:scale-110",style:{width:"24px",height:"24px",backgroundColor:b.color,border:"1px solid rgba(0, 0, 0, 0.1)",borderRadius:"4px"},onClick:()=>L(b.color),onContextMenu:j=>S(j,I),onMouseEnter:j=>x(j,b.label),onMouseLeave:v},`color-${I}`))})]})]}),w&&a.jsx("div",{className:"fixed bg-[#1a1a1a] text-gray-200 text-xs px-2 py-1 rounded-md shadow",style:{left:w.x,top:w.y,transform:"translate(-50%, -100%)",zIndex:500,pointerEvents:"none",border:"1px solid rgba(255,255,255,0.1)"},children:w.label}),m.visible&&a.jsx("div",{className:"fixed bg-[#1a1a1a] border border-gray-600/20 border-opacity-10 rounded-md ",style:{left:m.x,top:m.y,zIndex:500},children:a.jsx("button",{className:"block w-full px-3 py-2 text-left text-sm text-gray-200 hover:bg-[#2a2a2a] hover:rounded-md",onClick:M,children:"Delete Color"})})]})},yo=(e,n,o,r,s)=>({handleMouseDown:u=>{o(!0);const i=e.current?.getBoundingClientRect();i&&s({x:u.clientX-i.left,y:u.clientY-i.top})},handleMouseMove:u=>{if(n.isDragging){const i=window.innerWidth||document.documentElement.clientWidth,w=window.innerHeight||document.documentElement.clientHeight,y=346,L=526,x=u.clientX-n.dragStart.x,v=u.clientY-n.dragStart.y,S=Math.max(0,Math.min(x,i-y)),N=Math.max(0,Math.min(v,w-L));r({x:S,y:N})}},handleMouseUp:()=>{o(!1)}}),ko=(e,n,o)=>({handleClear:()=>{window.confirm("Clear all preset colors?? This action is irreversible.")&&e?.()},handleSave:()=>{n?.()},handleClose:c=>{c.stopPropagation(),o?.()}}),Ve=e=>{const{panelWidth:n,panelHeight:o,rightMargin:r}=e,s=window.innerWidth||document.documentElement.clientWidth,l=window.innerHeight||document.documentElement.clientHeight,c=Math.max(0,Math.min(s-n-r,s-n)),m=(l-o)/2,u=Math.max(0,Math.min(m,l-o));return{x:c,y:u}},Mo=()=>({getDefaultPosition:()=>Ve({panelWidth:346,panelHeight:526,rightMargin:20}),getInitialPosition:Ve}),Eo=({className:e="",onClose:n})=>{const[o,r]=t.useState(!1),{getDefaultPosition:s}=Mo(),l="align_colorpicker_position",c=346,m=526,u=h=>{const E=window.innerWidth||document.documentElement.clientWidth,g=window.innerHeight||document.documentElement.clientHeight;return{x:Math.max(0,Math.min(h.x,E-c)),y:Math.max(0,Math.min(h.y,g-m))}},[i,w]=t.useState(()=>{try{const h=localStorage.getItem(l);if(h){const E=JSON.parse(h);return u(E)}}catch{}return s()}),[y,L]=t.useState({x:0,y:0}),x=t.useRef(null),[v,S]=t.useState(!1),{hue:N,saturation:M,value:k,setSaturation:z,setValue:R,setFromRGB:b,setFromHex:I}=Y(),{handleAddCurrentColor:j}=ne(),p=(h,E)=>{z(h),R(E)},P=(h,E)=>{z(h),R(E),j()},G=h=>{b(h.r,h.g,h.b),j()},T=yo(x,{isDragging:o,dragStart:y},r,w,L),d=ko(async()=>{await st()},async()=>{try{await nt()}catch{}},n);return t.useEffect(()=>{if(o)document.addEventListener("mousemove",T.handleMouseMove),document.addEventListener("mouseup",T.handleMouseUp);else{document.removeEventListener("mousemove",T.handleMouseMove),document.removeEventListener("mouseup",T.handleMouseUp);try{localStorage.setItem(l,JSON.stringify(i))}catch{}}return()=>{document.removeEventListener("mousemove",T.handleMouseMove),document.removeEventListener("mouseup",T.handleMouseUp)}},[o,T.handleMouseMove,T.handleMouseUp]),t.useEffect(()=>{const h=()=>{w(E=>u(E))};return window.addEventListener("resize",h),()=>window.removeEventListener("resize",h)},[]),t.useEffect(()=>{let h="";const g=setInterval(()=>{try{const V=at(),O=lt(V),Q=it(V);if((O?.length||0)+(Q?.length||0)===1){let D;if(O?.length===1){const B=O[0];D=B?.bgcolor||B?.color}else Q?.length===1&&(D=Q[0]?.color);if(D&&typeof D=="string"&&rt(D)){const B=`1:${D.toUpperCase()}`;B!==h&&(h=B,I(D));return}}h=""}catch{}},150);return()=>clearInterval(g)},[I]),a.jsxs("div",{ref:x,className:`w-[346px] h-[526px] bg-[#0c0c0c] rounded-lg flex flex-col shadow-lg pointer-events-auto ${e}`,style:{backgroundColor:"#0c0c0c",fontFamily:"Inter, sans-serif",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.4)",position:"fixed",left:i.x,top:i.y,zIndex:1e3},children:[a.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:T.handleMouseDown,children:[a.jsx("div",{className:"w-3.5 h-3.5 ml-2 pointer-events-auto cursor-pointer",onClick:h=>{h.stopPropagation(),S(E=>!E)},onMouseDown:h=>{h.stopPropagation()},children:a.jsx(ke,{className:"w-full h-full text-[#FFB900]"})}),a.jsx("div",{className:"absolute left-1/2 transform -translate-x-1/2 pointer-events-none",children:a.jsx("span",{className:"text-[14px] font-medium leading-[17px] text-center",style:{color:"#CCCCCC",fontFamily:"Inter, sans-serif",fontWeight:500},children:"Color Picker"})}),a.jsx("div",{className:"w-5 h-5 mr-1 flex items-center justify-center cursor-pointer pointer-events-auto",onClick:d.handleClose,children:a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"text-gray-400 hover:text-gray-300",children:a.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),v&&a.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:[a.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:a.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:a.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"})})}),a.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:a.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:a.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"})})}),a.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:a.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor","aria-hidden":"true",children:a.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`})})})]}),a.jsxs("div",{className:"flex-1 flex flex-col pt-2.5 px-2 overflow-hidden",children:[a.jsx("div",{className:"flex justify-center",children:a.jsx(io,{hue:N,saturation:M,value:k,onChange:p,onChangeComplete:P})}),a.jsxs("div",{className:"mt-2.5 flex flex-col items-center overflow-hidden",children:[a.jsxs("div",{className:"flex items-end w-[330px]",children:[a.jsx("div",{className:"shrink-0",children:a.jsx(co,{onColorPicked:G})}),a.jsx("div",{className:"w-2.5 shrink-0"}),a.jsxs("div",{className:"flex flex-col items-end gap-2.5 flex-1",children:[a.jsx(ho,{}),a.jsx(go,{})]})]}),a.jsxs("div",{className:"mt-2.5 w-[330px] flex justify-between items-center",children:[a.jsx(uo,{}),a.jsx(mo,{})]}),a.jsx("div",{className:"mt-2.5 w-[330px] flex justify-center",children:a.jsx(fo,{})}),a.jsx("div",{className:"mt-2.5 w-[330px] flex justify-center",children:a.jsx(wo,{})})]})]}),a.jsxs("div",{className:"w-full h-10 flex items-center justify-center gap-[231px] px-1 border-t border-gray-600/10 relative",style:{zIndex:1e3},children:[a.jsx("button",{onClick:d.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:a.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"})}),a.jsx("button",{onClick:d.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:a.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 Ho(){const[e,n]=t.useState(!1),{isOpen:o,position:r,setMouse:s,toggleAtMouse:l,setPosition:c,panelWidth:m,panelHeight:u}=te(),i=()=>{n(!e)};t.useEffect(()=>{const x=()=>n(v=>!v);return window.addEventListener("comfyuiAlign.toggleColorPicker",x),()=>{window.removeEventListener("comfyuiAlign.toggleColorPicker",x)}},[]);const w=()=>{n(!1)},y=t.useCallback(x=>{const v=window.innerWidth||document.documentElement.clientWidth,S=window.innerHeight||document.documentElement.clientHeight;return{x:Math.max(0,Math.min(x.x,v-m)),y:Math.max(0,Math.min(x.y,S-u))}},[m,u]);t.useEffect(()=>{const x=v=>s(v.clientX,v.clientY);return window.addEventListener("mousemove",x),()=>window.removeEventListener("mousemove",x)},[s]);const L=t.useMemo(()=>typeof window<"u"&&!!window.app,[]);return t.useEffect(()=>{if(L)return;const x=v=>{(v.code==="Backquote"||v.key==="`")&&(v.preventDefault(),v.stopPropagation(),l())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[L,l]),t.useEffect(()=>{const x=()=>{const v=te.getState().position;c(y(v))};return window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[y,c]),a.jsxs("div",{className:"h-screen relative pointer-events-none",children:[o&&a.jsx("div",{className:"fixed pointer-events-none",style:{left:r.x,top:r.y,zIndex:2e3},children:a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsx(Xe,{}),a.jsx("div",{className:"mt-2 pointer-events-auto",children:a.jsx(lo,{onMoonIconClick:i})})]})}),e&&a.jsx(Eo,{onClose:w})]})}export{Ho as default}; diff --git a/web/align/main.js b/web/align/main.js index ad0ddba..ebb1396 100644 --- a/web/align/main.js +++ b/web/align/main.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["align/App-C2DPmJLU.js","align/dispatch-BoyZYEfc.js","align/groups-dbOCuPdX.js","align/defaultColors-Js3rIaY-.js","align/vendor-Bzgz95E1.js","align/App-tn0RQdqM.css","align/colorBar-D0KBdv1W.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["align/App-o9G5EZyH.js","align/dispatch-BoyZYEfc.js","align/groups-dbOCuPdX.js","align/defaultColors-Js3rIaY-.js","align/vendor-Bzgz95E1.js","align/App-tn0RQdqM.css","align/colorBar-D0KBdv1W.js"])))=>i.map(i=>d[i]); import{r as zd,g as Ad,a as w1}from"./vendor-Bzgz95E1.js";const W1="modulepreload",$1=function(A){return"/"+A},vd={},ii=function(G,H,o){let W=Promise.resolve();if(H&&H.length>0){let nl=function(O){return Promise.all(O.map(Z=>Promise.resolve(Z).then(D=>({status:"fulfilled",value:D}),D=>({status:"rejected",reason:D}))))};document.getElementsByTagName("link");const Y=document.querySelector("meta[property=csp-nonce]"),_=Y?.nonce||Y?.getAttribute("nonce");W=nl(H.map(O=>{if(O=$1(O),O in vd)return;vd[O]=!0;const Z=O.endsWith(".css"),D=Z?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${O}"]${D}`))return;const B=document.createElement("link");if(B.rel=Z?"stylesheet":W1,Z||(B.as="script"),B.crossOrigin="",B.href=O,_&&B.setAttribute("nonce",_),document.head.appendChild(B),Z)return new Promise((_l,El)=>{B.addEventListener("load",_l),B.addEventListener("error",()=>El(new Error(`Unable to preload CSS for ${O}`)))})}))}function ul(Y){const _=new Event("vite:preloadError",{cancelable:!0});if(_.payload=Y,window.dispatchEvent(_),!_.defaultPrevented)throw Y}return W.then(Y=>{for(const _ of Y||[])_.status==="rejected"&&ul(_.reason);return G().catch(ul)})};var ui={exports:{}},de={};/** * @license React * react-jsx-runtime.production.js @@ -31,4 +31,4 @@ import{r as zd,g as Ad,a as w1}from"./vendor-Bzgz95E1.js";const W1="modulepreloa `+i[u].replace(" at new "," at ");return l.displayName&&g.includes("")&&(g=g.replace("",l.displayName)),g}while(1<=u&&0<=e);break}}}finally{jn=!1,Error.prepareStackTrace=a}return(a=l?l.displayName||l.name:"")?ya(a):""}function Od(l,t){switch(l.tag){case 26:case 27:case 5:return ya(l.type);case 16:return ya("Lazy");case 13:return l.child!==t&&t!==null?ya("Suspense Fallback"):ya("Suspense");case 19:return ya("SuspenseList");case 0:case 15:return Zn(l.type,!1);case 11:return Zn(l.type.render,!1);case 1:return Zn(l.type,!0);case 31:return ya("Activity");default:return""}}function vi(l){try{var t="",a=null;do t+=Od(l,a),a=l,l=l.return;while(l);return t}catch(u){return` Error generating stack: `+u.message+` `+u.stack}}var xn=Object.prototype.hasOwnProperty,Vn=A.unstable_scheduleCallback,Ln=A.unstable_cancelCallback,Dd=A.unstable_shouldYield,Ud=A.unstable_requestPaint,Rl=A.unstable_now,_d=A.unstable_getCurrentPriorityLevel,di=A.unstable_ImmediatePriority,mi=A.unstable_UserBlockingPriority,ze=A.unstable_NormalPriority,Hd=A.unstable_LowPriority,si=A.unstable_IdlePriority,pd=A.log,Nd=A.unstable_setDisableYieldValue,zu=null,Xl=null;function Rt(l){if(typeof pd=="function"&&Nd(l),Xl&&typeof Xl.setStrictMode=="function")try{Xl.setStrictMode(zu,l)}catch{}}var jl=Math.clz32?Math.clz32:Cd,Bd=Math.log,qd=Math.LN2;function Cd(l){return l>>>=0,l===0?32:31-(Bd(l)/qd|0)|0}var Ae=256,Ee=262144,Te=4194304;function va(l){var t=l&42;if(t!==0)return t;switch(l&-l){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 l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Me(l,t,a){var u=l.pendingLanes;if(u===0)return 0;var e=0,n=l.suspendedLanes,f=l.pingedLanes;l=l.warmLanes;var c=u&134217727;return c!==0?(u=c&~n,u!==0?e=va(u):(f&=c,f!==0?e=va(f):a||(a=c&~l,a!==0&&(e=va(a))))):(c=u&~n,c!==0?e=va(c):f!==0?e=va(f):a||(a=u&~l,a!==0&&(e=va(a)))),e===0?0:t!==0&&t!==e&&(t&n)===0&&(n=e&-e,a=t&-t,n>=a||n===32&&(a&4194048)!==0)?t:e}function Au(l,t){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&t)===0}function Yd(l,t){switch(l){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 hi(){var l=Te;return Te<<=1,(Te&62914560)===0&&(Te=4194304),l}function Kn(l){for(var t=[],a=0;31>a;a++)t.push(l);return t}function Eu(l,t){l.pendingLanes|=t,t!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function Gd(l,t,a,u,e,n){var f=l.pendingLanes;l.pendingLanes=a,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=a,l.entangledLanes&=a,l.errorRecoveryDisabledLanes&=a,l.shellSuspendCounter=0;var c=l.entanglements,i=l.expirationTimes,m=l.hiddenUpdates;for(a=f&~a;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var xd=/[\n"\\]/g;function Fl(l){return l.replace(xd,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Fn(l,t,a,u,e,n,f,c){l.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?l.type=f:l.removeAttribute("type"),t!=null?f==="number"?(t===0&&l.value===""||l.value!=t)&&(l.value=""+$l(t)):l.value!==""+$l(t)&&(l.value=""+$l(t)):f!=="submit"&&f!=="reset"||l.removeAttribute("value"),t!=null?kn(l,f,$l(t)):a!=null?kn(l,f,$l(a)):u!=null&&l.removeAttribute("value"),e==null&&n!=null&&(l.defaultChecked=!!n),e!=null&&(l.checked=e&&typeof e!="function"&&typeof e!="symbol"),c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?l.name=""+$l(c):l.removeAttribute("name")}function _i(l,t,a,u,e,n,f,c){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(l.type=n),t!=null||a!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){$n(l);return}a=a!=null?""+$l(a):"",t=t!=null?""+$l(t):a,c||t===l.value||(l.value=t),l.defaultValue=t}u=u??e,u=typeof u!="function"&&typeof u!="symbol"&&!!u,l.checked=c?l.checked:!!u,l.defaultChecked=!!u,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(l.name=f),$n(l)}function kn(l,t,a){t==="number"&&Ue(l.ownerDocument)===l||l.defaultValue===""+a||(l.defaultValue=""+a)}function Ra(l,t,a,u){if(l=l.options,t){t={};for(var e=0;e"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),af=!1;if(zt)try{var Du={};Object.defineProperty(Du,"passive",{get:function(){af=!0}}),window.addEventListener("test",Du,Du),window.removeEventListener("test",Du,Du)}catch{af=!1}var jt=null,uf=null,He=null;function Yi(){if(He)return He;var l,t=uf,a=t.length,u,e="value"in jt?jt.value:jt.textContent,n=e.length;for(l=0;l=Hu),Zi=" ",xi=!1;function Vi(l,t){switch(l){case"keyup":return om.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Li(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var xa=!1;function Sm(l,t){switch(l){case"compositionend":return Li(t);case"keypress":return t.which!==32?null:(xi=!0,Zi);case"textInput":return l=t.data,l===Zi&&xi?null:l;default:return null}}function bm(l,t){if(xa)return l==="compositionend"||!yf&&Vi(l,t)?(l=Yi(),He=uf=jt=null,xa=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-l};l=u}l:{for(;a;){if(a.nextSibling){a=a.nextSibling;break l}a=a.parentNode}a=void 0}a=ki(a)}}function Pi(l,t){return l&&t?l===t?!0:l&&l.nodeType===3?!1:t&&t.nodeType===3?Pi(l,t.parentNode):"contains"in l?l.contains(t):l.compareDocumentPosition?!!(l.compareDocumentPosition(t)&16):!1:!1}function l0(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var t=Ue(l.document);t instanceof l.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)l=t.contentWindow;else break;t=Ue(l.document)}return t}function mf(l){var t=l&&l.nodeName&&l.nodeName.toLowerCase();return t&&(t==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||t==="textarea"||l.contentEditable==="true")}var Um=zt&&"documentMode"in document&&11>=document.documentMode,Va=null,sf=null,qu=null,hf=!1;function t0(l,t,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;hf||Va==null||Va!==Ue(u)||(u=Va,"selectionStart"in u&&mf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),qu&&Bu(qu,u)||(qu=u,u=Tn(sf,"onSelect"),0>=f,e-=f,dt=1<<32-jl(t)+e|a<C?(j=M,M=null):j=M.sibling;var L=s(v,M,d[C],S);if(L===null){M===null&&(M=j);break}l&&M&&L.alternate===null&&t(v,M),y=n(L,y,C),V===null?U=L:V.sibling=L,V=L,M=j}if(C===d.length)return a(v,M),x&&Et(v,C),U;if(M===null){for(;CC?(j=M,M=null):j=M.sibling;var ca=s(v,M,L.value,S);if(ca===null){M===null&&(M=j);break}l&&M&&ca.alternate===null&&t(v,M),y=n(ca,y,C),V===null?U=ca:V.sibling=ca,V=ca,M=j}if(L.done)return a(v,M),x&&Et(v,C),U;if(M===null){for(;!L.done;C++,L=d.next())L=z(v,L.value,S),L!==null&&(y=n(L,y,C),V===null?U=L:V.sibling=L,V=L);return x&&Et(v,C),U}for(M=u(M);!L.done;C++,L=d.next())L=h(M,v,C,L.value,S),L!==null&&(l&&L.alternate!==null&&M.delete(L.key===null?C:L.key),y=n(L,y,C),V===null?U=L:V.sibling=L,V=L);return l&&M.forEach(function(r1){return t(v,r1)}),x&&Et(v,C),U}function k(v,y,d,S){if(typeof d=="object"&&d!==null&&d.type===gl&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case _l:l:{for(var U=d.key;y!==null;){if(y.key===U){if(U=d.type,U===gl){if(y.tag===7){a(v,y.sibling),S=e(y,d.props.children),S.return=v,v=S;break l}}else if(y.elementType===U||typeof U=="object"&&U!==null&&U.$$typeof===nt&&Ea(U)===y.type){a(v,y.sibling),S=e(y,d.props),Xu(S,d),S.return=v,v=S;break l}a(v,y);break}else t(v,y);y=y.sibling}d.type===gl?(S=ga(d.props.children,v.mode,S,d.key),S.return=v,v=S):(S=Xe(d.type,d.key,d.props,null,v.mode,S),Xu(S,d),S.return=v,v=S)}return f(v);case El:l:{for(U=d.key;y!==null;){if(y.key===U)if(y.tag===4&&y.stateNode.containerInfo===d.containerInfo&&y.stateNode.implementation===d.implementation){a(v,y.sibling),S=e(y,d.children||[]),S.return=v,v=S;break l}else{a(v,y);break}else t(v,y);y=y.sibling}S=Ef(d,v.mode,S),S.return=v,v=S}return f(v);case nt:return d=Ea(d),k(v,y,d,S)}if(gt(d))return T(v,y,d,S);if(Wl(d)){if(U=Wl(d),typeof U!="function")throw Error(o(150));return d=U.call(d),p(v,y,d,S)}if(typeof d.then=="function")return k(v,y,Je(d),S);if(d.$$typeof===wl)return k(v,y,xe(v,d),S);re(v,d)}return typeof d=="string"&&d!==""||typeof d=="number"||typeof d=="bigint"?(d=""+d,y!==null&&y.tag===6?(a(v,y.sibling),S=e(y,d),S.return=v,v=S):(a(v,y),S=Af(d,v.mode,S),S.return=v,v=S),f(v)):a(v,y)}return function(v,y,d,S){try{Ru=0;var U=k(v,y,d,S);return Pa=null,U}catch(M){if(M===Ia||M===Le)throw M;var V=xl(29,M,null,v.mode);return V.lanes=S,V.return=v,V}finally{}}}var Ma=O0(!0),D0=O0(!1),Kt=!1;function Cf(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yf(l,t){l=l.updateQueue,t.updateQueue===l&&(t.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Jt(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function rt(l,t,a){var u=l.updateQueue;if(u===null)return null;if(u=u.shared,(K&2)!==0){var e=u.pending;return e===null?t.next=t:(t.next=e.next,e.next=t),u.pending=t,t=Re(l),i0(l,null,a),t}return Qe(l,u,t,a),Re(l)}function ju(l,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var u=t.lanes;u&=l.pendingLanes,a|=u,t.lanes=a,gi(l,a)}}function Gf(l,t){var a=l.updateQueue,u=l.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var e=null,n=null;if(a=a.firstBaseUpdate,a!==null){do{var f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};n===null?e=n=f:n=n.next=f,a=a.next}while(a!==null);n===null?e=n=t:n=n.next=t}else e=n=t;a={baseState:u.baseState,firstBaseUpdate:e,lastBaseUpdate:n,shared:u.shared,callbacks:u.callbacks},l.updateQueue=a;return}l=a.lastBaseUpdate,l===null?a.firstBaseUpdate=t:l.next=t,a.lastBaseUpdate=t}var Qf=!1;function Zu(){if(Qf){var l=ka;if(l!==null)throw l}}function xu(l,t,a,u){Qf=!1;var e=l.updateQueue;Kt=!1;var n=e.firstBaseUpdate,f=e.lastBaseUpdate,c=e.shared.pending;if(c!==null){e.shared.pending=null;var i=c,m=i.next;i.next=null,f===null?n=m:f.next=m,f=i;var g=l.alternate;g!==null&&(g=g.updateQueue,c=g.lastBaseUpdate,c!==f&&(c===null?g.firstBaseUpdate=m:c.next=m,g.lastBaseUpdate=i))}if(n!==null){var z=e.baseState;f=0,g=m=i=null,c=n;do{var s=c.lane&-536870913,h=s!==c.lane;if(h?(X&s)===s:(u&s)===s){s!==0&&s===Fa&&(Qf=!0),g!==null&&(g=g.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});l:{var T=l,p=c;s=t;var k=a;switch(p.tag){case 1:if(T=p.payload,typeof T=="function"){z=T.call(k,z,s);break l}z=T;break l;case 3:T.flags=T.flags&-65537|128;case 0:if(T=p.payload,s=typeof T=="function"?T.call(k,z,s):T,s==null)break l;z=D({},z,s);break l;case 2:Kt=!0}}s=c.callback,s!==null&&(l.flags|=64,h&&(l.flags|=8192),h=e.callbacks,h===null?e.callbacks=[s]:h.push(s))}else h={lane:s,tag:c.tag,payload:c.payload,callback:c.callback,next:null},g===null?(m=g=h,i=z):g=g.next=h,f|=s;if(c=c.next,c===null){if(c=e.shared.pending,c===null)break;h=c,c=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}}while(!0);g===null&&(i=z),e.baseState=i,e.firstBaseUpdate=m,e.lastBaseUpdate=g,n===null&&(e.shared.lanes=0),kt|=f,l.lanes=f,l.memoizedState=z}}function U0(l,t){if(typeof l!="function")throw Error(o(191,l));l.call(t)}function _0(l,t){var a=l.callbacks;if(a!==null)for(l.callbacks=null,l=0;ln?n:8;var f=b.T,c={};b.T=c,tc(l,!1,t,a);try{var i=e(),m=b.S;if(m!==null&&m(c,i),i!==null&&typeof i=="object"&&typeof i.then=="function"){var g=Gm(i,u);Ku(l,t,g,rl(l))}else Ku(l,t,u,rl(l))}catch(z){Ku(l,t,{then:function(){},status:"rejected",reason:z},rl())}finally{E.p=n,f!==null&&c.types!==null&&(f.types=c.types),b.T=f}}function xm(){}function Pf(l,t,a,u){if(l.tag!==5)throw Error(o(476));var e=ny(l).queue;ey(l,e,t,N,a===null?xm:function(){return fy(l),a(u)})}function ny(l){var t=l.memoizedState;if(t!==null)return t;t={memoizedState:N,baseState:N,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dt,lastRenderedState:N},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dt,lastRenderedState:a},next:null},l.memoizedState=t,l=l.alternate,l!==null&&(l.memoizedState=t),t}function fy(l){var t=ny(l);t.next===null&&(t=l.alternate.memoizedState),Ku(l,t.next.queue,{},rl())}function lc(){return Ol(ce)}function cy(){return vl().memoizedState}function iy(){return vl().memoizedState}function Vm(l){for(var t=l.return;t!==null;){switch(t.tag){case 24:case 3:var a=rl();l=Jt(a);var u=rt(t,l,a);u!==null&&(Ql(u,t,a),ju(u,t,a)),t={cache:pf()},l.payload=t;return}t=t.return}}function Lm(l,t,a){var u=rl();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},an(l)?vy(t,a):(a=bf(l,t,a,u),a!==null&&(Ql(a,l,u),dy(a,t,u)))}function yy(l,t,a){var u=rl();Ku(l,t,a,u)}function Ku(l,t,a,u){var e={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(an(l))vy(t,e);else{var n=l.alternate;if(l.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var f=t.lastRenderedState,c=n(f,a);if(e.hasEagerState=!0,e.eagerState=c,Zl(c,f))return Qe(l,t,e,0),I===null&&Ge(),!1}catch{}finally{}if(a=bf(l,t,e,u),a!==null)return Ql(a,l,u),dy(a,t,u),!0}return!1}function tc(l,t,a,u){if(u={lane:2,revertLane:Cc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},an(l)){if(t)throw Error(o(479))}else t=bf(l,a,u,2),t!==null&&Ql(t,l,2)}function an(l){var t=l.alternate;return l===q||t!==null&&t===q}function vy(l,t){tu=$e=!0;var a=l.pending;a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t}function dy(l,t,a){if((a&4194048)!==0){var u=t.lanes;u&=l.pendingLanes,a|=u,t.lanes=a,gi(l,a)}}var Ju={readContext:Ol,use:Ie,useCallback:cl,useContext:cl,useEffect:cl,useImperativeHandle:cl,useLayoutEffect:cl,useInsertionEffect:cl,useMemo:cl,useReducer:cl,useRef:cl,useState:cl,useDebugValue:cl,useDeferredValue:cl,useTransition:cl,useSyncExternalStore:cl,useId:cl,useHostTransitionStatus:cl,useFormState:cl,useActionState:cl,useOptimistic:cl,useMemoCache:cl,useCacheRefresh:cl};Ju.useEffectEvent=cl;var my={readContext:Ol,use:Ie,useCallback:function(l,t){return pl().memoizedState=[l,t===void 0?null:t],l},useContext:Ol,useEffect:$0,useImperativeHandle:function(l,t,a){a=a!=null?a.concat([l]):null,ln(4194308,4,P0.bind(null,t,l),a)},useLayoutEffect:function(l,t){return ln(4194308,4,l,t)},useInsertionEffect:function(l,t){ln(4,2,l,t)},useMemo:function(l,t){var a=pl();t=t===void 0?null:t;var u=l();if(Oa){Rt(!0);try{l()}finally{Rt(!1)}}return a.memoizedState=[u,t],u},useReducer:function(l,t,a){var u=pl();if(a!==void 0){var e=a(t);if(Oa){Rt(!0);try{a(t)}finally{Rt(!1)}}}else e=t;return u.memoizedState=u.baseState=e,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:e},u.queue=l,l=l.dispatch=Lm.bind(null,q,l),[u.memoizedState,l]},useRef:function(l){var t=pl();return l={current:l},t.memoizedState=l},useState:function(l){l=Wf(l);var t=l.queue,a=yy.bind(null,q,t);return t.dispatch=a,[l.memoizedState,a]},useDebugValue:kf,useDeferredValue:function(l,t){var a=pl();return If(a,l,t)},useTransition:function(){var l=Wf(!1);return l=ey.bind(null,q,l.queue,!0,!1),pl().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,t,a){var u=q,e=pl();if(x){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),I===null)throw Error(o(349));(X&127)!==0||C0(u,t,a)}e.memoizedState=a;var n={value:a,getSnapshot:t};return e.queue=n,$0(G0.bind(null,u,n,l),[l]),u.flags|=2048,uu(9,{destroy:void 0},Y0.bind(null,u,n,a,t),null),a},useId:function(){var l=pl(),t=I.identifierPrefix;if(x){var a=mt,u=dt;a=(u&~(1<<32-jl(u)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Fe++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof u.is=="string"?f.createElement("select",{is:u.is}):f.createElement("select"),u.multiple?n.multiple=!0:u.size&&(n.size=u.size);break;default:n=typeof u.is=="string"?f.createElement(e,{is:u.is}):f.createElement(e)}}n[Tl]=t,n[Nl]=u;l:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)n.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break l;for(;f.sibling===null;){if(f.return===null||f.return===t)break l;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=n;l:switch(Ul(n,e,u),e){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break l;case"img":u=!0;break l;default:u=!1}u&&_t(t)}}return al(t),oc(t,t.type,l===null?null:l.memoizedProps,t.pendingProps,a),null;case 6:if(l&&t.stateNode!=null)l.memoizedProps!==u&&_t(t);else{if(typeof u!="string"&&t.stateNode===null)throw Error(o(166));if(l=Qt.current,Wa(t)){if(l=t.stateNode,a=t.memoizedProps,u=null,e=Ml,e!==null)switch(e.tag){case 27:case 5:u=e.memoizedProps}l[Tl]=t,l=!!(l.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||Bv(l.nodeValue,a)),l||Vt(t,!0)}else l=Mn(l).createTextNode(u),l[Tl]=t,t.stateNode=l}return al(t),null;case 31:if(a=t.memoizedState,l===null||l.memoizedState!==null){if(u=Wa(t),a!==null){if(l===null){if(!u)throw Error(o(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(557));l[Tl]=t}else Sa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;al(t),l=!1}else a=Df(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=a),l=!0;if(!l)return t.flags&256?(Ll(t),t):(Ll(t),null);if((t.flags&128)!==0)throw Error(o(558))}return al(t),null;case 13:if(u=t.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(e=Wa(t),u!==null&&u.dehydrated!==null){if(l===null){if(!e)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e[Tl]=t}else Sa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;al(t),e=!1}else e=Df(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=e),e=!0;if(!e)return t.flags&256?(Ll(t),t):(Ll(t),null)}return Ll(t),(t.flags&128)!==0?(t.lanes=a,t):(a=u!==null,l=l!==null&&l.memoizedState!==null,a&&(u=t.child,e=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(e=u.alternate.memoizedState.cachePool.pool),n=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(n=u.memoizedState.cachePool.pool),n!==e&&(u.flags|=2048)),a!==l&&a&&(t.child.flags|=8192),cn(t,t.updateQueue),al(t),null);case 4:return Ba(),l===null&&Rc(t.stateNode.containerInfo),al(t),null;case 10:return Mt(t.type),al(t),null;case 19:if(fl(yl),u=t.memoizedState,u===null)return al(t),null;if(e=(t.flags&128)!==0,n=u.rendering,n===null)if(e)wu(u,!1);else{if(il!==0||l!==null&&(l.flags&128)!==0)for(l=t.child;l!==null;){if(n=We(l),n!==null){for(t.flags|=128,wu(u,!1),l=n.updateQueue,t.updateQueue=l,cn(t,l),t.subtreeFlags=0,l=a,a=t.child;a!==null;)y0(a,l),a=a.sibling;return J(yl,yl.current&1|2),x&&Et(t,u.treeForkCount),t.child}l=l.sibling}u.tail!==null&&Rl()>sn&&(t.flags|=128,e=!0,wu(u,!1),t.lanes=4194304)}else{if(!e)if(l=We(n),l!==null){if(t.flags|=128,e=!0,l=l.updateQueue,t.updateQueue=l,cn(t,l),wu(u,!0),u.tail===null&&u.tailMode==="hidden"&&!n.alternate&&!x)return al(t),null}else 2*Rl()-u.renderingStartTime>sn&&a!==536870912&&(t.flags|=128,e=!0,wu(u,!1),t.lanes=4194304);u.isBackwards?(n.sibling=t.child,t.child=n):(l=u.last,l!==null?l.sibling=n:t.child=n,u.last=n)}return u.tail!==null?(l=u.tail,u.rendering=l,u.tail=l.sibling,u.renderingStartTime=Rl(),l.sibling=null,a=yl.current,J(yl,e?a&1|2:a&1),x&&Et(t,u.treeForkCount),l):(al(t),null);case 22:case 23:return Ll(t),Xf(),u=t.memoizedState!==null,l!==null?l.memoizedState!==null!==u&&(t.flags|=8192):u&&(t.flags|=8192),u?(a&536870912)!==0&&(t.flags&128)===0&&(al(t),t.subtreeFlags&6&&(t.flags|=8192)):al(t),a=t.updateQueue,a!==null&&cn(t,a.retryQueue),a=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),u=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(u=t.memoizedState.cachePool.pool),u!==a&&(t.flags|=2048),l!==null&&fl(Aa),null;case 24:return a=null,l!==null&&(a=l.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Mt(dl),al(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Wm(l,t){switch(Mf(t),t.tag){case 1:return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 3:return Mt(dl),Ba(),l=t.flags,(l&65536)!==0&&(l&128)===0?(t.flags=l&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(Ll(t),t.alternate===null)throw Error(o(340));Sa()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 13:if(Ll(t),l=t.memoizedState,l!==null&&l.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Sa()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 19:return fl(yl),null;case 4:return Ba(),null;case 10:return Mt(t.type),null;case 22:case 23:return Ll(t),Xf(),l!==null&&fl(Aa),l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 24:return Mt(dl),null;case 25:return null;default:return null}}function Qy(l,t){switch(Mf(t),t.tag){case 3:Mt(dl),Ba();break;case 26:case 27:case 5:be(t);break;case 4:Ba();break;case 31:t.memoizedState!==null&&Ll(t);break;case 13:Ll(t);break;case 19:fl(yl);break;case 10:Mt(t.type);break;case 22:case 23:Ll(t),Xf(),l!==null&&fl(Aa);break;case 24:Mt(dl)}}function Wu(l,t){try{var a=t.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var e=u.next;a=e;do{if((a.tag&l)===l){u=void 0;var n=a.create,f=a.inst;u=n(),f.destroy=u}a=a.next}while(a!==e)}}catch(c){w(t,t.return,c)}}function $t(l,t,a){try{var u=t.updateQueue,e=u!==null?u.lastEffect:null;if(e!==null){var n=e.next;u=n;do{if((u.tag&l)===l){var f=u.inst,c=f.destroy;if(c!==void 0){f.destroy=void 0,e=t;var i=a,m=c;try{m()}catch(g){w(e,i,g)}}}u=u.next}while(u!==n)}}catch(g){w(t,t.return,g)}}function Ry(l){var t=l.updateQueue;if(t!==null){var a=l.stateNode;try{_0(t,a)}catch(u){w(l,l.return,u)}}}function Xy(l,t,a){a.props=Da(l.type,l.memoizedProps),a.state=l.memoizedState;try{a.componentWillUnmount()}catch(u){w(l,t,u)}}function $u(l,t){try{var a=l.ref;if(a!==null){switch(l.tag){case 26:case 27:case 5:var u=l.stateNode;break;case 30:u=l.stateNode;break;default:u=l.stateNode}typeof a=="function"?l.refCleanup=a(u):a.current=u}}catch(e){w(l,t,e)}}function st(l,t){var a=l.ref,u=l.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(e){w(l,t,e)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(e){w(l,t,e)}else a.current=null}function jy(l){var t=l.type,a=l.memoizedProps,u=l.stateNode;try{l:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break l;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(e){w(l,l.return,e)}}function gc(l,t,a){try{var u=l.stateNode;g1(u,l.type,a,t),u[Nl]=t}catch(e){w(l,l.return,e)}}function Zy(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&aa(l.type)||l.tag===4}function Sc(l){l:for(;;){for(;l.sibling===null;){if(l.return===null||Zy(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&aa(l.type)||l.flags&2||l.child===null||l.tag===4)continue l;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function bc(l,t,a){var u=l.tag;if(u===5||u===6)l=l.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(l,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(l),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=bt));else if(u!==4&&(u===27&&aa(l.type)&&(a=l.stateNode,t=null),l=l.child,l!==null))for(bc(l,t,a),l=l.sibling;l!==null;)bc(l,t,a),l=l.sibling}function yn(l,t,a){var u=l.tag;if(u===5||u===6)l=l.stateNode,t?a.insertBefore(l,t):a.appendChild(l);else if(u!==4&&(u===27&&aa(l.type)&&(a=l.stateNode),l=l.child,l!==null))for(yn(l,t,a),l=l.sibling;l!==null;)yn(l,t,a),l=l.sibling}function xy(l){var t=l.stateNode,a=l.memoizedProps;try{for(var u=l.type,e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Ul(t,u,a),t[Tl]=l,t[Nl]=a}catch(n){w(l,l.return,n)}}var Ht=!1,hl=!1,zc=!1,Vy=typeof WeakSet=="function"?WeakSet:Set,Al=null;function $m(l,t){if(l=l.containerInfo,Zc=Nn,l=l0(l),mf(l)){if("selectionStart"in l)var a={start:l.selectionStart,end:l.selectionEnd};else l:{a=(a=l.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var e=u.anchorOffset,n=u.focusNode;u=u.focusOffset;try{a.nodeType,n.nodeType}catch{a=null;break l}var f=0,c=-1,i=-1,m=0,g=0,z=l,s=null;t:for(;;){for(var h;z!==a||e!==0&&z.nodeType!==3||(c=f+e),z!==n||u!==0&&z.nodeType!==3||(i=f+u),z.nodeType===3&&(f+=z.nodeValue.length),(h=z.firstChild)!==null;)s=z,z=h;for(;;){if(z===l)break t;if(s===a&&++m===e&&(c=f),s===n&&++g===u&&(i=f),(h=z.nextSibling)!==null)break;z=s,s=z.parentNode}z=h}a=c===-1||i===-1?null:{start:c,end:i}}else a=null}a=a||{start:0,end:0}}else a=null;for(xc={focusedElem:l,selectionRange:a},Nn=!1,Al=t;Al!==null;)if(t=Al,l=t.child,(t.subtreeFlags&1028)!==0&&l!==null)l.return=t,Al=l;else for(;Al!==null;){switch(t=Al,n=t.alternate,l=t.flags,t.tag){case 0:if((l&4)!==0&&(l=t.updateQueue,l=l!==null?l.events:null,l!==null))for(a=0;a title"))),Ul(n,u,a),n[Tl]=l,zl(n),u=n;break l;case"link":var f=Wv("link","href",e).get(u+(a.href||""));if(f){for(var c=0;ck&&(f=k,k=p,p=f);var v=Ii(c,p),y=Ii(c,k);if(v&&y&&(h.rangeCount!==1||h.anchorNode!==v.node||h.anchorOffset!==v.offset||h.focusNode!==y.node||h.focusOffset!==y.offset)){var d=z.createRange();d.setStart(v.node,v.offset),h.removeAllRanges(),p>k?(h.addRange(d),h.extend(y.node,y.offset)):(d.setEnd(y.node,y.offset),h.addRange(d))}}}}for(z=[],h=c;h=h.parentNode;)h.nodeType===1&&z.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;ca?32:a,b.T=null,a=Uc,Uc=null;var n=Pt,f=Ct;if(ol=0,iu=Pt=null,Ct=0,(K&6)!==0)throw Error(o(331));var c=K;if(K|=4,Py(n.current),Fy(n,n.current,f,a),K=c,te(0,!1),Xl&&typeof Xl.onPostCommitFiberRoot=="function")try{Xl.onPostCommitFiberRoot(zu,n)}catch{}return!0}finally{E.p=e,b.T=u,Sv(l,t)}}function zv(l,t,a){t=Il(a,t),t=nc(l.stateNode,t,2),l=rt(l,t,2),l!==null&&(Eu(l,2),ht(l))}function w(l,t,a){if(l.tag===3)zv(l,l,a);else for(;t!==null;){if(t.tag===3){zv(t,l,a);break}else if(t.tag===1){var u=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(It===null||!It.has(u))){l=Il(a,l),a=Ay(2),u=rt(t,a,2),u!==null&&(Ey(a,u,t,l),Eu(u,2),ht(u));break}}t=t.return}}function Nc(l,t,a){var u=l.pingCache;if(u===null){u=l.pingCache=new Im;var e=new Set;u.set(t,e)}else e=u.get(t),e===void 0&&(e=new Set,u.set(t,e));e.has(a)||(Tc=!0,e.add(a),l=u1.bind(null,l,t,a),t.then(l,l))}function u1(l,t,a){var u=l.pingCache;u!==null&&u.delete(t),l.pingedLanes|=l.suspendedLanes&a,l.warmLanes&=~a,I===l&&(X&a)===a&&(il===4||il===3&&(X&62914560)===X&&300>Rl()-mn?(K&2)===0&&yu(l,0):Mc|=a,cu===X&&(cu=0)),ht(l)}function Av(l,t){t===0&&(t=hi()),l=oa(l,t),l!==null&&(Eu(l,t),ht(l))}function e1(l){var t=l.memoizedState,a=0;t!==null&&(a=t.retryLane),Av(l,a)}function n1(l,t){var a=0;switch(l.tag){case 31:case 13:var u=l.stateNode,e=l.memoizedState;e!==null&&(a=e.retryLane);break;case 19:u=l.stateNode;break;case 22:u=l.stateNode._retryCache;break;default:throw Error(o(314))}u!==null&&u.delete(t),Av(l,a)}function f1(l,t){return Vn(l,t)}var zn=null,du=null,Bc=!1,An=!1,qc=!1,ta=0;function ht(l){l!==du&&l.next===null&&(du===null?zn=du=l:du=du.next=l),An=!0,Bc||(Bc=!0,i1())}function te(l,t){if(!qc&&An){qc=!0;do for(var a=!1,u=zn;u!==null;){if(l!==0){var e=u.pendingLanes;if(e===0)var n=0;else{var f=u.suspendedLanes,c=u.pingedLanes;n=(1<<31-jl(42|l)+1)-1,n&=e&~(f&~c),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(a=!0,Ov(u,n))}else n=X,n=Me(u,u===I?n:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(n&3)===0||Au(u,n)||(a=!0,Ov(u,n));u=u.next}while(a);qc=!1}}function c1(){Ev()}function Ev(){An=Bc=!1;var l=0;ta!==0&&b1()&&(l=ta);for(var t=Rl(),a=null,u=zn;u!==null;){var e=u.next,n=Tv(u,t);n===0?(u.next=null,a===null?zn=e:a.next=e,e===null&&(du=a)):(a=u,(l!==0||(n&3)!==0)&&(An=!0)),u=e}ol!==0&&ol!==5||te(l),ta!==0&&(ta=0)}function Tv(l,t){for(var a=l.suspendedLanes,u=l.pingedLanes,e=l.expirationTimes,n=l.pendingLanes&-62914561;0c)break;var g=i.transferSize,z=i.initiatorType;g&&qv(z)&&(i=i.responseEnd,f+=g*(i"u"?null:document;function Kv(l,t,a){var u=mu;if(u&&typeof t=="string"&&t){var e=Fl(t);e='link[rel="'+l+'"][href="'+e+'"]',typeof a=="string"&&(e+='[crossorigin="'+a+'"]'),Lv.has(e)||(Lv.add(e),l={rel:l,crossOrigin:a,href:t},u.querySelector(e)===null&&(t=u.createElement("link"),Ul(t,"link",l),zl(t),u.head.appendChild(t)))}}function _1(l){Yt.D(l),Kv("dns-prefetch",l,null)}function H1(l,t){Yt.C(l,t),Kv("preconnect",l,t)}function p1(l,t,a){Yt.L(l,t,a);var u=mu;if(u&&l&&t){var e='link[rel="preload"][as="'+Fl(t)+'"]';t==="image"&&a&&a.imageSrcSet?(e+='[imagesrcset="'+Fl(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(e+='[imagesizes="'+Fl(a.imageSizes)+'"]')):e+='[href="'+Fl(l)+'"]';var n=e;switch(t){case"style":n=su(l);break;case"script":n=hu(l)}et.has(n)||(l=D({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:l,as:t},a),et.set(n,l),u.querySelector(e)!==null||t==="style"&&u.querySelector(ne(n))||t==="script"&&u.querySelector(fe(n))||(t=u.createElement("link"),Ul(t,"link",l),zl(t),u.head.appendChild(t)))}}function N1(l,t){Yt.m(l,t);var a=mu;if(a&&l){var u=t&&typeof t.as=="string"?t.as:"script",e='link[rel="modulepreload"][as="'+Fl(u)+'"][href="'+Fl(l)+'"]',n=e;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=hu(l)}if(!et.has(n)&&(l=D({rel:"modulepreload",href:l},t),et.set(n,l),a.querySelector(e)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(fe(n)))return}u=a.createElement("link"),Ul(u,"link",l),zl(u),a.head.appendChild(u)}}}function B1(l,t,a){Yt.S(l,t,a);var u=mu;if(u&&l){var e=Ga(u).hoistableStyles,n=su(l);t=t||"default";var f=e.get(n);if(!f){var c={loading:0,preload:null};if(f=u.querySelector(ne(n)))c.loading=5;else{l=D({rel:"stylesheet",href:l,"data-precedence":t},a),(a=et.get(n))&&Wc(l,a);var i=f=u.createElement("link");zl(i),Ul(i,"link",l),i._p=new Promise(function(m,g){i.onload=m,i.onerror=g}),i.addEventListener("load",function(){c.loading|=1}),i.addEventListener("error",function(){c.loading|=2}),c.loading|=4,Dn(f,t,u)}f={type:"stylesheet",instance:f,count:1,state:c},e.set(n,f)}}}function q1(l,t){Yt.X(l,t);var a=mu;if(a&&l){var u=Ga(a).hoistableScripts,e=hu(l),n=u.get(e);n||(n=a.querySelector(fe(e)),n||(l=D({src:l,async:!0},t),(t=et.get(e))&&$c(l,t),n=a.createElement("script"),zl(n),Ul(n,"link",l),a.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(e,n))}}function C1(l,t){Yt.M(l,t);var a=mu;if(a&&l){var u=Ga(a).hoistableScripts,e=hu(l),n=u.get(e);n||(n=a.querySelector(fe(e)),n||(l=D({src:l,async:!0,type:"module"},t),(t=et.get(e))&&$c(l,t),n=a.createElement("script"),zl(n),Ul(n,"link",l),a.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(e,n))}}function Jv(l,t,a,u){var e=(e=Qt.current)?On(e):null;if(!e)throw Error(o(446));switch(l){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=su(a.href),a=Ga(e).hoistableStyles,u=a.get(t),u||(u={type:"style",instance:null,count:0,state:null},a.set(t,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){l=su(a.href);var n=Ga(e).hoistableStyles,f=n.get(l);if(f||(e=e.ownerDocument||e,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(l,f),(n=e.querySelector(ne(l)))&&!n._p&&(f.instance=n,f.state.loading=5),et.has(l)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},et.set(l,a),n||Y1(e,l,a,f.state))),t&&u===null)throw Error(o(528,""));return f}if(t&&u!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=hu(a),a=Ga(e).hoistableScripts,u=a.get(t),u||(u={type:"script",instance:null,count:0,state:null},a.set(t,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,l))}}function su(l){return'href="'+Fl(l)+'"'}function ne(l){return'link[rel="stylesheet"]['+l+"]"}function rv(l){return D({},l,{"data-precedence":l.precedence,precedence:null})}function Y1(l,t,a,u){l.querySelector('link[rel="preload"][as="style"]['+t+"]")?u.loading=1:(t=l.createElement("link"),u.preload=t,t.addEventListener("load",function(){return u.loading|=1}),t.addEventListener("error",function(){return u.loading|=2}),Ul(t,"link",a),zl(t),l.head.appendChild(t))}function hu(l){return'[src="'+Fl(l)+'"]'}function fe(l){return"script[async]"+l}function wv(l,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var u=l.querySelector('style[data-href~="'+Fl(a.href)+'"]');if(u)return t.instance=u,zl(u),u;var e=D({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(l.ownerDocument||l).createElement("style"),zl(u),Ul(u,"style",e),Dn(u,a.precedence,l),t.instance=u;case"stylesheet":e=su(a.href);var n=l.querySelector(ne(e));if(n)return t.state.loading|=4,t.instance=n,zl(n),n;u=rv(a),(e=et.get(e))&&Wc(u,e),n=(l.ownerDocument||l).createElement("link"),zl(n);var f=n;return f._p=new Promise(function(c,i){f.onload=c,f.onerror=i}),Ul(n,"link",u),t.state.loading|=4,Dn(n,a.precedence,l),t.instance=n;case"script":return n=hu(a.src),(e=l.querySelector(fe(n)))?(t.instance=e,zl(e),e):(u=a,(e=et.get(n))&&(u=D({},a),$c(u,e)),l=l.ownerDocument||l,e=l.createElement("script"),zl(e),Ul(e,"link",u),l.head.appendChild(e),t.instance=e);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(u=t.instance,t.state.loading|=4,Dn(u,a.precedence,l));return t.instance}function Dn(l,t,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),e=u.length?u[u.length-1]:null,n=e,f=0;f title"):null)}function G1(l,t,a){if(a===1||t.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return l=t.disabled,typeof t.precedence=="string"&&l==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Fv(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function Q1(l,t,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var e=su(u.href),n=t.querySelector(ne(e));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=_n.bind(l),t.then(l,l)),a.state.loading|=4,a.instance=n,zl(n);return}n=t.ownerDocument||t,u=rv(u),(e=et.get(e))&&Wc(u,e),n=n.createElement("link"),zl(n);var f=n;f._p=new Promise(function(c,i){f.onload=c,f.onerror=i}),Ul(n,"link",u),a.instance=n}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(l.count++,a=_n.bind(l),t.addEventListener("load",a),t.addEventListener("error",a))}}var Fc=0;function R1(l,t){return l.stylesheets&&l.count===0&&pn(l,l.stylesheets),0Fc?50:800)+t);return l.unsuspend=a,function(){l.unsuspend=null,clearTimeout(u),clearTimeout(e)}}:null}function _n(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pn(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var Hn=null;function pn(l,t){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Hn=new Map,t.forEach(X1,l),Hn=null,_n.call(l))}function X1(l,t){if(!(t.state.loading&4)){var a=Hn.get(l);if(a)var u=a.get(null);else{a=new Map,Hn.set(l,a);for(var e=l.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A)}catch(G){console.error(G)}}return A(),ei.exports=ls(),ei.exports}var as=ts();const us=Ad(as),Sd=A=>{let G;const H=new Set,o=(O,Z)=>{const D=typeof O=="function"?O(G):O;if(!Object.is(D,G)){const B=G;G=Z??(typeof D!="object"||D===null)?D:Object.assign({},G,D),H.forEach(_l=>_l(G,B))}},W=()=>G,_={setState:o,getState:W,getInitialState:()=>nl,subscribe:O=>(H.add(O),()=>H.delete(O))},nl=G=A(o,W,_);return _},es=(A=>A?Sd(A):Sd),ns=A=>A;function fs(A,G=ns){const H=gu.useSyncExternalStore(A.subscribe,gu.useCallback(()=>G(A.getState()),[A,G]),gu.useCallback(()=>G(A.getInitialState()),[A,G]));return gu.useDebugValue(H),H}const bd=A=>{const G=es(A),H=o=>fs(G,o);return Object.assign(H,G),H},cs=(A=>A?bd(A):bd),Td=320,Md=32,is=Td+Md*2,ys=Td+Md*2,vs=40,ds=16,ms=is,ss=ys+ds+vs,ci=cs((A,G)=>({isOpen:!1,position:{x:0,y:0},mouse:{x:0,y:0},panelWidth:ms,panelHeight:ss,shortcutKeyHeld:!1,positionLocked:!1,hoveredIcon:null,hoveredColorBarIndex:null,setMouse:(H,o)=>A({mouse:{x:H,y:o}}),openAtMouse:()=>{const{mouse:H,panelWidth:o,panelHeight:W}=G(),ul=window.innerWidth||document.documentElement.clientWidth,Y=window.innerHeight||document.documentElement.clientHeight,_={x:H.x-o/2,y:H.y-W/2},nl={x:Math.max(0,Math.min(_.x,ul-o)),y:Math.max(0,Math.min(_.y,Y-W))};A({isOpen:!0,position:nl})},close:()=>A({isOpen:!1}),toggleAtMouse:()=>{const{isOpen:H}=G();if(H){A({isOpen:!1});return}G().openAtMouse()},setPosition:H=>A({position:H}),setShortcutKeyHeld:H=>A({shortcutKeyHeld:H}),setPositionLocked:H=>A({positionLocked:H}),setHoveredIcon:H=>A({hoveredIcon:H}),setHoveredColorBarIndex:H=>A({hoveredColorBarIndex:H})})),hs=gu.lazy(()=>ii(()=>import("./App-C2DPmJLU.js"),__vite__mapDeps([0,1,2,3,4,5])));function os(){return new Promise(A=>{document.readyState==="loading"?document.addEventListener("DOMContentLoaded",G):G();function G(){if(window.app)A();else{const H=setInterval(()=>{window.app&&(console.log("App initialized"),clearInterval(H),A())},50);setTimeout(()=>{clearInterval(H),console.error("Timeout waiting for app to initialize"),A()},5e3)}}})}async function gs(){try{let A=function(){return me.jsx(hs,{})};await os(),console.log("App:",window.app);const G="/align/",H=Y=>{if(document.querySelector(`link[rel="stylesheet"][href="${Y}"]`))return;const _=document.createElement("link");_.rel="stylesheet",_.href=Y,_.onerror=()=>console.error(`Align: Failed to load CSS: ${Y}`),document.head.appendChild(_)},o=Y=>{if(!Y||Y.startsWith("/"))return Y;let _=Y;return _.startsWith("align/")&&(_=_.slice(6)),`${G}${_}`};async function W(){try{const Y=await fetch(`${G}manifest.json`,{cache:"no-store"});if(!Y.ok)throw new Error(`manifest fetch failed: ${Y.status}`);const _=await Y.json(),nl=new Set;for(const Z of Object.values(_))if(Z?.css&&Array.isArray(Z.css))for(const D of Z.css)nl.add(o(D));const O=Array.from(nl).sort();if(O.length===0){console.warn("Align: manifest contains no CSS entries");return}O.forEach(Z=>H(Z)),console.log("Align: injected CSS from manifest",O)}catch(Y){console.error("Align: failed to load manifest for CSS",Y)}}await W();const ul=()=>{if(document.getElementById("comfyui-align-overlay"))return;const _=document.createElement("div");_.id="comfyui-align-overlay",_.style.position="fixed",_.style.top="0",_.style.left="0",_.style.right="0",_.style.bottom="0",_.style.zIndex="9999",_.style.pointerEvents="none",_.style.display="flex",_.style.alignItems="center",_.style.justifyContent="center",document.body.appendChild(_),us.createRoot(_).render(me.jsx(gu.StrictMode,{children:me.jsx(Ed.Suspense,{fallback:me.jsx("div",{children:"Loading..."}),children:me.jsx(A,{})})}))};if(window.app||console.warn("ComfyUI app not available, mounting overlay for preview"),ul(),window.app){window.app.registerExtension({name:"Comfy.Align",settings:[{id:"comfyuiAlign.nodeHorizontalSpacing",name:"Node horizontal spacing",type:"number",defaultValue:50,category:["Align","Spacing","Node horizontal spacing"],attrs:{showButtons:!0,min:0},onChange:(O,Z)=>{console.log("Align setting changed: horizontal",{newVal:O,oldVal:Z})}},{id:"comfyuiAlign.nodeVerticalSpacing",name:"Node vertical spacing",type:"number",defaultValue:20,category:["Align","Spacing","Node vertical spacing"],attrs:{showButtons:!0,min:0},onChange:(O,Z)=>{console.log("Align setting changed: vertical",{newVal:O,oldVal:Z})}},{id:"comfyuiAlign.groupHorizontalSpacing",name:"Group horizontal spacing",type:"number",defaultValue:10,category:["Align","Spacing","Group horizontal spacing"],attrs:{showButtons:!0,min:0},onChange:(O,Z)=>{console.log("Align setting changed: group horizontal",{newVal:O,oldVal:Z})}},{id:"comfyuiAlign.groupVerticalSpacing",name:"Group vertical spacing",type:"number",defaultValue:10,category:["Align","Spacing","Group vertical spacing"],attrs:{showButtons:!0,min:0},onChange:(O,Z)=>{console.log("Align setting changed: group vertical",{newVal:O,oldVal:Z})}},{id:"comfyuiAlign.applyColorHeaderOnly",name:"Apply Color to Header Only",type:"boolean",defaultValue:!0,category:["Align","Color","Apply Color to Header Only"],onChange:(O,Z)=>{console.log("Align setting changed: Apply Color to Header Only",{newVal:O,oldVal:Z})}},{id:"comfyuiAlign.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:(O,Z)=>{console.log("Align setting changed: Hold Mode",{newVal:O,oldVal:Z})}}],commands:[{id:"comfyuiAlign.toggleAlignPanel",label:"Align Panel",function:()=>{if(!!window?.app?.extensionManager?.setting?.get?.("comfyuiAlign.shortcutHoldMode"))return;ci.getState().toggleAtMouse()}}],keybindings:[{combo:{key:"`"},commandId:"comfyuiAlign.toggleAlignPanel"}]}),console.log("ComfyUI Align Extension registered successfully");const Y=O=>O.code==="Backquote"||O.key==="`",_=O=>{if(!!!window?.app?.extensionManager?.setting?.get?.("comfyuiAlign.shortcutHoldMode")||!Y(O))return;const B=ci.getState();B.shortcutKeyHeld||(O.preventDefault(),O.stopPropagation(),B.openAtMouse(),B.setShortcutKeyHeld(!0),B.setPositionLocked(!0))},nl=O=>{if(!!!window?.app?.extensionManager?.setting?.get?.("comfyuiAlign.shortcutHoldMode")||!Y(O))return;const B=ci.getState();if(!B.shortcutKeyHeld)return;O.preventDefault(),O.stopPropagation();const{hoveredIcon:_l,hoveredColorBarIndex:El}=B,gl=()=>{B.close(),B.setShortcutKeyHeld(!1),B.setHoveredIcon(null),B.setHoveredColorBarIndex(null),B.setPositionLocked(!1)};_l?ii(async()=>{const{executeIconAction:Sl}=await import("./dispatch-BoyZYEfc.js");return{executeIconAction:Sl}},__vite__mapDeps([1,2])).then(({executeIconAction:Sl})=>{Sl(_l),gl()}).catch(Sl=>{console.error("Error executing hovered icon action:",Sl),gl()}):El!=null?ii(async()=>{const{executeColorBarAction:Sl}=await import("./colorBar-D0KBdv1W.js");return{executeColorBarAction:Sl}},__vite__mapDeps([6,3,2,4])).then(({executeColorBarAction:Sl})=>{Sl(El),gl()}).catch(Sl=>{console.error("Error executing hovered ColorBar action:",Sl),gl()}):gl()};window.addEventListener("keydown",_,!0),window.addEventListener("keyup",nl,!0)}}catch(A){console.error("Error registering ComfyUI Align Extension:",A)}}gs();export{gu as R,cs as c,me as j,Ed as r,ci as u}; +`).replace(o1,"")}function Bv(l,t){return t=Nv(t),Nv(l)===t}function F(l,t,a,u,e,n){switch(a){case"children":typeof u=="string"?t==="body"||t==="textarea"&&u===""||Xa(l,u):(typeof u=="number"||typeof u=="bigint")&&t!=="body"&&Xa(l,""+u);break;case"className":De(l,"class",u);break;case"tabIndex":De(l,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":De(l,a,u);break;case"style":Bi(l,u,n);break;case"data":if(t!=="object"){De(l,"data",u);break}case"src":case"href":if(u===""&&(t!=="a"||a!=="href")){l.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){l.removeAttribute(a);break}u=_e(""+u),l.setAttribute(a,u);break;case"action":case"formAction":if(typeof u=="function"){l.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof n=="function"&&(a==="formAction"?(t!=="input"&&F(l,t,"name",e.name,e,null),F(l,t,"formEncType",e.formEncType,e,null),F(l,t,"formMethod",e.formMethod,e,null),F(l,t,"formTarget",e.formTarget,e,null)):(F(l,t,"encType",e.encType,e,null),F(l,t,"method",e.method,e,null),F(l,t,"target",e.target,e,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){l.removeAttribute(a);break}u=_e(""+u),l.setAttribute(a,u);break;case"onClick":u!=null&&(l.onclick=bt);break;case"onScroll":u!=null&&R("scroll",l);break;case"onScrollEnd":u!=null&&R("scrollend",l);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(a=u.__html,a!=null){if(e.children!=null)throw Error(o(60));l.innerHTML=a}}break;case"multiple":l.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":l.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){l.removeAttribute("xlink:href");break}a=_e(""+u),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?l.setAttribute(a,""+u):l.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?l.setAttribute(a,""):l.removeAttribute(a);break;case"capture":case"download":u===!0?l.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?l.setAttribute(a,u):l.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?l.setAttribute(a,u):l.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?l.removeAttribute(a):l.setAttribute(a,u);break;case"popover":R("beforetoggle",l),R("toggle",l),Oe(l,"popover",u);break;case"xlinkActuate":St(l,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":St(l,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":St(l,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":St(l,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":St(l,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":St(l,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":St(l,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":St(l,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":St(l,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Oe(l,"is",u);break;case"innerText":case"textContent":break;default:(!(2c)break;var g=i.transferSize,z=i.initiatorType;g&&qv(z)&&(i=i.responseEnd,f+=g*(i"u"?null:document;function Kv(l,t,a){var u=mu;if(u&&typeof t=="string"&&t){var e=Fl(t);e='link[rel="'+l+'"][href="'+e+'"]',typeof a=="string"&&(e+='[crossorigin="'+a+'"]'),Lv.has(e)||(Lv.add(e),l={rel:l,crossOrigin:a,href:t},u.querySelector(e)===null&&(t=u.createElement("link"),Ul(t,"link",l),zl(t),u.head.appendChild(t)))}}function _1(l){Yt.D(l),Kv("dns-prefetch",l,null)}function H1(l,t){Yt.C(l,t),Kv("preconnect",l,t)}function p1(l,t,a){Yt.L(l,t,a);var u=mu;if(u&&l&&t){var e='link[rel="preload"][as="'+Fl(t)+'"]';t==="image"&&a&&a.imageSrcSet?(e+='[imagesrcset="'+Fl(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(e+='[imagesizes="'+Fl(a.imageSizes)+'"]')):e+='[href="'+Fl(l)+'"]';var n=e;switch(t){case"style":n=su(l);break;case"script":n=hu(l)}et.has(n)||(l=D({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:l,as:t},a),et.set(n,l),u.querySelector(e)!==null||t==="style"&&u.querySelector(ne(n))||t==="script"&&u.querySelector(fe(n))||(t=u.createElement("link"),Ul(t,"link",l),zl(t),u.head.appendChild(t)))}}function N1(l,t){Yt.m(l,t);var a=mu;if(a&&l){var u=t&&typeof t.as=="string"?t.as:"script",e='link[rel="modulepreload"][as="'+Fl(u)+'"][href="'+Fl(l)+'"]',n=e;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=hu(l)}if(!et.has(n)&&(l=D({rel:"modulepreload",href:l},t),et.set(n,l),a.querySelector(e)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(fe(n)))return}u=a.createElement("link"),Ul(u,"link",l),zl(u),a.head.appendChild(u)}}}function B1(l,t,a){Yt.S(l,t,a);var u=mu;if(u&&l){var e=Ga(u).hoistableStyles,n=su(l);t=t||"default";var f=e.get(n);if(!f){var c={loading:0,preload:null};if(f=u.querySelector(ne(n)))c.loading=5;else{l=D({rel:"stylesheet",href:l,"data-precedence":t},a),(a=et.get(n))&&Wc(l,a);var i=f=u.createElement("link");zl(i),Ul(i,"link",l),i._p=new Promise(function(m,g){i.onload=m,i.onerror=g}),i.addEventListener("load",function(){c.loading|=1}),i.addEventListener("error",function(){c.loading|=2}),c.loading|=4,Dn(f,t,u)}f={type:"stylesheet",instance:f,count:1,state:c},e.set(n,f)}}}function q1(l,t){Yt.X(l,t);var a=mu;if(a&&l){var u=Ga(a).hoistableScripts,e=hu(l),n=u.get(e);n||(n=a.querySelector(fe(e)),n||(l=D({src:l,async:!0},t),(t=et.get(e))&&$c(l,t),n=a.createElement("script"),zl(n),Ul(n,"link",l),a.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(e,n))}}function C1(l,t){Yt.M(l,t);var a=mu;if(a&&l){var u=Ga(a).hoistableScripts,e=hu(l),n=u.get(e);n||(n=a.querySelector(fe(e)),n||(l=D({src:l,async:!0,type:"module"},t),(t=et.get(e))&&$c(l,t),n=a.createElement("script"),zl(n),Ul(n,"link",l),a.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},u.set(e,n))}}function Jv(l,t,a,u){var e=(e=Qt.current)?On(e):null;if(!e)throw Error(o(446));switch(l){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=su(a.href),a=Ga(e).hoistableStyles,u=a.get(t),u||(u={type:"style",instance:null,count:0,state:null},a.set(t,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){l=su(a.href);var n=Ga(e).hoistableStyles,f=n.get(l);if(f||(e=e.ownerDocument||e,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(l,f),(n=e.querySelector(ne(l)))&&!n._p&&(f.instance=n,f.state.loading=5),et.has(l)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},et.set(l,a),n||Y1(e,l,a,f.state))),t&&u===null)throw Error(o(528,""));return f}if(t&&u!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=hu(a),a=Ga(e).hoistableScripts,u=a.get(t),u||(u={type:"script",instance:null,count:0,state:null},a.set(t,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,l))}}function su(l){return'href="'+Fl(l)+'"'}function ne(l){return'link[rel="stylesheet"]['+l+"]"}function rv(l){return D({},l,{"data-precedence":l.precedence,precedence:null})}function Y1(l,t,a,u){l.querySelector('link[rel="preload"][as="style"]['+t+"]")?u.loading=1:(t=l.createElement("link"),u.preload=t,t.addEventListener("load",function(){return u.loading|=1}),t.addEventListener("error",function(){return u.loading|=2}),Ul(t,"link",a),zl(t),l.head.appendChild(t))}function hu(l){return'[src="'+Fl(l)+'"]'}function fe(l){return"script[async]"+l}function wv(l,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var u=l.querySelector('style[data-href~="'+Fl(a.href)+'"]');if(u)return t.instance=u,zl(u),u;var e=D({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(l.ownerDocument||l).createElement("style"),zl(u),Ul(u,"style",e),Dn(u,a.precedence,l),t.instance=u;case"stylesheet":e=su(a.href);var n=l.querySelector(ne(e));if(n)return t.state.loading|=4,t.instance=n,zl(n),n;u=rv(a),(e=et.get(e))&&Wc(u,e),n=(l.ownerDocument||l).createElement("link"),zl(n);var f=n;return f._p=new Promise(function(c,i){f.onload=c,f.onerror=i}),Ul(n,"link",u),t.state.loading|=4,Dn(n,a.precedence,l),t.instance=n;case"script":return n=hu(a.src),(e=l.querySelector(fe(n)))?(t.instance=e,zl(e),e):(u=a,(e=et.get(n))&&(u=D({},a),$c(u,e)),l=l.ownerDocument||l,e=l.createElement("script"),zl(e),Ul(e,"link",u),l.head.appendChild(e),t.instance=e);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(u=t.instance,t.state.loading|=4,Dn(u,a.precedence,l));return t.instance}function Dn(l,t,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),e=u.length?u[u.length-1]:null,n=e,f=0;f title"):null)}function G1(l,t,a){if(a===1||t.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return l=t.disabled,typeof t.precedence=="string"&&l==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Fv(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function Q1(l,t,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var e=su(u.href),n=t.querySelector(ne(e));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=_n.bind(l),t.then(l,l)),a.state.loading|=4,a.instance=n,zl(n);return}n=t.ownerDocument||t,u=rv(u),(e=et.get(e))&&Wc(u,e),n=n.createElement("link"),zl(n);var f=n;f._p=new Promise(function(c,i){f.onload=c,f.onerror=i}),Ul(n,"link",u),a.instance=n}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(l.count++,a=_n.bind(l),t.addEventListener("load",a),t.addEventListener("error",a))}}var Fc=0;function R1(l,t){return l.stylesheets&&l.count===0&&pn(l,l.stylesheets),0Fc?50:800)+t);return l.unsuspend=a,function(){l.unsuspend=null,clearTimeout(u),clearTimeout(e)}}:null}function _n(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pn(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var Hn=null;function pn(l,t){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Hn=new Map,t.forEach(X1,l),Hn=null,_n.call(l))}function X1(l,t){if(!(t.state.loading&4)){var a=Hn.get(l);if(a)var u=a.get(null);else{a=new Map,Hn.set(l,a);for(var e=l.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A)}catch(G){console.error(G)}}return A(),ei.exports=ls(),ei.exports}var as=ts();const us=Ad(as),Sd=A=>{let G;const H=new Set,o=(O,Z)=>{const D=typeof O=="function"?O(G):O;if(!Object.is(D,G)){const B=G;G=Z??(typeof D!="object"||D===null)?D:Object.assign({},G,D),H.forEach(_l=>_l(G,B))}},W=()=>G,_={setState:o,getState:W,getInitialState:()=>nl,subscribe:O=>(H.add(O),()=>H.delete(O))},nl=G=A(o,W,_);return _},es=(A=>A?Sd(A):Sd),ns=A=>A;function fs(A,G=ns){const H=gu.useSyncExternalStore(A.subscribe,gu.useCallback(()=>G(A.getState()),[A,G]),gu.useCallback(()=>G(A.getInitialState()),[A,G]));return gu.useDebugValue(H),H}const bd=A=>{const G=es(A),H=o=>fs(G,o);return Object.assign(H,G),H},cs=(A=>A?bd(A):bd),Td=320,Md=32,is=Td+Md*2,ys=Td+Md*2,vs=40,ds=16,ms=is,ss=ys+ds+vs,ci=cs((A,G)=>({isOpen:!1,position:{x:0,y:0},mouse:{x:0,y:0},panelWidth:ms,panelHeight:ss,shortcutKeyHeld:!1,positionLocked:!1,hoveredIcon:null,hoveredColorBarIndex:null,setMouse:(H,o)=>A({mouse:{x:H,y:o}}),openAtMouse:()=>{const{mouse:H,panelWidth:o,panelHeight:W}=G(),ul=window.innerWidth||document.documentElement.clientWidth,Y=window.innerHeight||document.documentElement.clientHeight,_={x:H.x-o/2,y:H.y-W/2},nl={x:Math.max(0,Math.min(_.x,ul-o)),y:Math.max(0,Math.min(_.y,Y-W))};A({isOpen:!0,position:nl})},close:()=>A({isOpen:!1}),toggleAtMouse:()=>{const{isOpen:H}=G();if(H){A({isOpen:!1});return}G().openAtMouse()},setPosition:H=>A({position:H}),setShortcutKeyHeld:H=>A({shortcutKeyHeld:H}),setPositionLocked:H=>A({positionLocked:H}),setHoveredIcon:H=>A({hoveredIcon:H}),setHoveredColorBarIndex:H=>A({hoveredColorBarIndex:H})})),hs=gu.lazy(()=>ii(()=>import("./App-o9G5EZyH.js"),__vite__mapDeps([0,1,2,3,4,5])));function os(){return new Promise(A=>{document.readyState==="loading"?document.addEventListener("DOMContentLoaded",G):G();function G(){if(window.app)A();else{const H=setInterval(()=>{window.app&&(console.log("App initialized"),clearInterval(H),A())},50);setTimeout(()=>{clearInterval(H),console.error("Timeout waiting for app to initialize"),A()},5e3)}}})}async function gs(){try{let A=function(){return me.jsx(hs,{})};await os(),console.log("App:",window.app);const G="/align/",H=Y=>{if(document.querySelector(`link[rel="stylesheet"][href="${Y}"]`))return;const _=document.createElement("link");_.rel="stylesheet",_.href=Y,_.onerror=()=>console.error(`Align: Failed to load CSS: ${Y}`),document.head.appendChild(_)},o=Y=>{if(!Y||Y.startsWith("/"))return Y;let _=Y;return _.startsWith("align/")&&(_=_.slice(6)),`${G}${_}`};async function W(){try{const Y=await fetch(`${G}manifest.json`,{cache:"no-store"});if(!Y.ok)throw new Error(`manifest fetch failed: ${Y.status}`);const _=await Y.json(),nl=new Set;for(const Z of Object.values(_))if(Z?.css&&Array.isArray(Z.css))for(const D of Z.css)nl.add(o(D));const O=Array.from(nl).sort();if(O.length===0){console.warn("Align: manifest contains no CSS entries");return}O.forEach(Z=>H(Z)),console.log("Align: injected CSS from manifest",O)}catch(Y){console.error("Align: failed to load manifest for CSS",Y)}}await W();const ul=()=>{if(document.getElementById("comfyui-align-overlay"))return;const _=document.createElement("div");_.id="comfyui-align-overlay",_.style.position="fixed",_.style.top="0",_.style.left="0",_.style.right="0",_.style.bottom="0",_.style.zIndex="9999",_.style.pointerEvents="none",_.style.display="flex",_.style.alignItems="center",_.style.justifyContent="center",document.body.appendChild(_),us.createRoot(_).render(me.jsx(gu.StrictMode,{children:me.jsx(Ed.Suspense,{fallback:me.jsx("div",{children:"Loading..."}),children:me.jsx(A,{})})}))};if(window.app||console.warn("ComfyUI app not available, mounting overlay for preview"),ul(),window.app){window.app.registerExtension({name:"Comfy.Align",settings:[{id:"comfyuiAlign.nodeHorizontalSpacing",name:"Node horizontal spacing",type:"number",defaultValue:50,category:["Align","Spacing","Node horizontal spacing"],attrs:{showButtons:!0,min:0},onChange:(O,Z)=>{console.log("Align setting changed: horizontal",{newVal:O,oldVal:Z})}},{id:"comfyuiAlign.nodeVerticalSpacing",name:"Node vertical spacing",type:"number",defaultValue:20,category:["Align","Spacing","Node vertical spacing"],attrs:{showButtons:!0,min:0},onChange:(O,Z)=>{console.log("Align setting changed: vertical",{newVal:O,oldVal:Z})}},{id:"comfyuiAlign.groupHorizontalSpacing",name:"Group horizontal spacing",type:"number",defaultValue:10,category:["Align","Spacing","Group horizontal spacing"],attrs:{showButtons:!0,min:0},onChange:(O,Z)=>{console.log("Align setting changed: group horizontal",{newVal:O,oldVal:Z})}},{id:"comfyuiAlign.groupVerticalSpacing",name:"Group vertical spacing",type:"number",defaultValue:10,category:["Align","Spacing","Group vertical spacing"],attrs:{showButtons:!0,min:0},onChange:(O,Z)=>{console.log("Align setting changed: group vertical",{newVal:O,oldVal:Z})}},{id:"comfyuiAlign.applyColorHeaderOnly",name:"Apply Color to Header Only",type:"boolean",defaultValue:!0,category:["Align","Color","Apply Color to Header Only"],onChange:(O,Z)=>{console.log("Align setting changed: Apply Color to Header Only",{newVal:O,oldVal:Z})}},{id:"comfyuiAlign.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:(O,Z)=>{console.log("Align setting changed: Hold Mode",{newVal:O,oldVal:Z})}}],commands:[{id:"comfyuiAlign.toggleAlignPanel",label:"Align Panel",function:()=>{if(!!window?.app?.extensionManager?.setting?.get?.("comfyuiAlign.shortcutHoldMode"))return;ci.getState().toggleAtMouse()}}],keybindings:[{combo:{key:"`"},commandId:"comfyuiAlign.toggleAlignPanel"}]}),console.log("ComfyUI Align Extension registered successfully");const Y=O=>O.code==="Backquote"||O.key==="`",_=O=>{if(!!!window?.app?.extensionManager?.setting?.get?.("comfyuiAlign.shortcutHoldMode")||!Y(O))return;const B=ci.getState();B.shortcutKeyHeld||(O.preventDefault(),O.stopPropagation(),B.openAtMouse(),B.setShortcutKeyHeld(!0),B.setPositionLocked(!0))},nl=O=>{if(!!!window?.app?.extensionManager?.setting?.get?.("comfyuiAlign.shortcutHoldMode")||!Y(O))return;const B=ci.getState();if(!B.shortcutKeyHeld)return;O.preventDefault(),O.stopPropagation();const{hoveredIcon:_l,hoveredColorBarIndex:El}=B,gl=()=>{B.close(),B.setShortcutKeyHeld(!1),B.setHoveredIcon(null),B.setHoveredColorBarIndex(null),B.setPositionLocked(!1)};_l?ii(async()=>{const{executeIconAction:Sl}=await import("./dispatch-BoyZYEfc.js");return{executeIconAction:Sl}},__vite__mapDeps([1,2])).then(({executeIconAction:Sl})=>{Sl(_l),gl()}).catch(Sl=>{console.error("Error executing hovered icon action:",Sl),gl()}):El!=null?ii(async()=>{const{executeColorBarAction:Sl}=await import("./colorBar-D0KBdv1W.js");return{executeColorBarAction:Sl}},__vite__mapDeps([6,3,2,4])).then(({executeColorBarAction:Sl})=>{Sl(El),gl()}).catch(Sl=>{console.error("Error executing hovered ColorBar action:",Sl),gl()}):gl()};window.addEventListener("keydown",_,!0),window.addEventListener("keyup",nl,!0)}}catch(A){console.error("Error registering ComfyUI Align Extension:",A)}}gs();export{gu as R,cs as c,me as j,Ed as r,ci as u};