1import{d as m,t as v,v as b,x as f,c as s}from"./vendor-core-CUMhuV44.js";const M=m({__name:"PatternBackground",props:{color1:{},pattern:{},opacity:{},layoutBg:{},darkMode:{type:Boolean}},setup(c){const a=c,l=s(()=>a.color1||"#6366f1"),i=t=>{const e=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(e)return{r:parseInt(e[1]),g:parseInt(e[2]),b:parseInt(e[3])};const r=parseInt(t.replace("#",""),16);return{r:r>>16&255,g:r>>8&255,b:r&255}},d=(t,e,r)=>"#"+[t,e,r].map(n=>n.toString(16).padStart(2,"0")).join(""),p=(t,e,r,n)=>({r:Math.round(t+(255-t)*n/100),g:Math.round(e+(255-e)*n/100),b:Math.round(r+(255-r)*n/100)}),h=t=>`rgb(${t.r}, ${t.g}, ${t.b})`,o=t=>`url("data:image/svg+xml,${t.replace(/#/g,"%23").replace(/\n/g," ").trim()}")`,u=s(()=>a.opacity??.4),g=s(()=>{if(a.layoutBg)return a.layoutBg;const{r:t,g:e,b:r}=i(l.value);return h(p(t,e,r,95))}),w=s(()=>{const{r:t,g:e,b:r}=i(g.value),n=Math.round(u.value*80);return a.darkMode?d(Math.min(255,t+n),Math.min(255,e+n),Math.min(255,r+n)):d(Math.max(0,t-n),Math.max(0,e-n),Math.max(0,r-n))}),x=s(()=>{const t=w.value;return g.value,{dots:{backgroundImage:`radial-gradient(circle, ${t} 2px, transparent 2px)`,backgroundSize:"32px 32px"},grid:{backgroundImage:`linear-gradient(${t} 1px, transparent 1px), linear-gradient(90deg, ${t} 1px, transparent 1px)`,backgroundSize:"40px 40px"},diagonal:{backgroundImage:`repeating-linear-gradient(45deg, transparent, transparent 10px, ${t} 10px, ${t} 11.5px)`},plus:{backgroundImage:o(`<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60'><path d='M30 18v24M18 30h24' stroke='${t}' stroke-width='2' stroke-linecap='round' fill='none'/></svg>`),backgroundSize:"60px 60px"},crosses:{backgroundImage:o(`<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M14 14L26 26M26 14L14 26' stroke='${t}' stroke-width='2' stroke-linecap='round' fill='none'/></svg>`),backgroundSize:"40px 40px"},waves:{backgroundImage:o(`<svg xmlns='http://www.w3.org/2000/svg' width='80' height='20'><path d='M0 10Q20 0 40 10Q60 20 80 10' stroke='${t}' stroke-width='1.5' fill='none'/></svg>`),backgroundSize:"80px 20px"},zigzag:{backgroundImage:o(`<svg xmlns='http://www.w3.org/2000/svg' width='40' height='12'><path d='M0 6L10 0L20 6L30 0L40 6L40 8L30 2L20 8L10 2L0 8Z' fill='${t}'/></svg>`),backgroundSize:"40px 12px"},circles:{backgroundImage:o(`<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><circle cx='20' cy='20' r='8' fill='none' stroke='${t}' stroke-width='1.5'/></svg>`),backgroundSize:"40px 40px"},hexagon:{backgroundImage:o(`<svg xmlns='http://www.w3.org/2000/svg' width='28' height='49'><path d='M14 0L28 8.5V25.5L14 34L0 25.5V8.5Z' fill='none' stroke='${t}' stroke-width='1'/><path d='M14 34L28 42.5V49' fill='none' stroke='${t}' stroke-width='1'/><path d='M14 34L0 42.5V49' fill='none' stroke='${t}' stroke-width='1'/></svg>`),backgroundSize:"28px 49px"},spiral:{backgroundImage:o(`<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60'><circle cx='30' cy='30' r='8' fill='none' stroke='${t}' stroke-width='1.5'/><circle cx='30' cy='30' r='18' fill='none' stroke='${t}' stroke-width='1'/><circle cx='30' cy='30' r='27' fill='none' stroke='${t}' stroke-width='0.7'/></svg>`),backgroundSize:"60px 60px"},optical:{backgroundImage:o(`<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60'><rect x='5' y='5' width='50' height='50' fill='none' stroke='${t}' stroke-width='1.5' rx='2'/><rect x='15' y='15' width='30' height='30' fill='none' stroke='${t}' stroke-width='1' rx='1'/><rect x='25' y='25' width='10' height='10' fill='none' stroke='${t}' stroke-width='0.7'/></svg>`),backgroundSize:"60px 60px"}}}),k=s(()=>{const t=a.pattern||"dots",e=x.value[t];return{backgroundColor:g.value,...e}});return(t,e)=>(v(),b("div",{class:"fixed inset-0 z-0 pointer-events-none",style:f(k.value)},null,4))}});
1export{M as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.