PageSourceSearch

https://zojo.ai/_next/static/chunks/app/watercolor/page-da986ed75b4194fe.js

js zojo.ai collected 2026-10-05 15:09:03 UTC 31,230 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9941],{1087:()=>{},3348:()=>{},3828:(e,t,a)=>{Promise.resolve().then(a.bind(a,9404))},4097:()=>{},9086:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(1916).A)("file-image",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]])},9404:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>$});var r=a(9133),s=a(5977),n=a(6317),l=a(5293),i=a.n(l),o=a(2806),c=a(764),d=a(6535),h=a(9924),m=a(9470),u=a(5805),x=a(4214);a(1087),a(3348),a(4097);var f=a(3530),g=a(6774),p=a(1415),v=a(1729),j=a(4424),w=a(6311),b=a(9086),y=a(7876),N=a(6895);class S{next(){return this.seed=(9301*this.seed+49297)%233280,this.seed/233280}nextRange(e,t){return e+this.next()*(t-e)}constructor(e){this.seed=e}}function C(e,t,a,r){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=[],l=2*Math.PI/r,i=s*Math.PI/180;for(let s=0;s<r;s++){let r=s*l+i,o=e+a*Math.cos(r),c=t+a*Math.sin(r);n.push([o,c])}return n}function A(e,t,a,r){if(a<=0)return e;let s=[];for(let a=0;a<e.length;a++){let n=e[a],l=e[(a+1)%e.length];s.push(n);let i=(n[0]+l[0])/2,o=(n[1]+l[1])/2,c=l[0]-n[0],d=l[1]-n[1],h=Math.sqrt(c*c+d*d),m=-d/h,u=c/h,x=r.nextRange(-t,t),f=i+m*x,g=o+u*x;s.push([f,g])}return A(s,.6*t,a-1,r)}let k=e=>{let{svgHeight:t,svgWidth:a,watercolorShapes:n,backgroundColor:l="transparent"}=e,i=(0,s.useId)(),o="watercolor-blur-".concat(i),c="watercolor-texture-".concat(i),d=(0,s.useMemo)(()=>{let e=[];return n.forEach((t,a)=>{let s=function(e,t,a){let{initPolygonPoints:s,initPolygonRadius:n,originX:l,originY:i,colors:o,opacity:c,numberOfOverlays:d,numberOfInitialShapeLayers:h,maxRandomNumberForInitDeform:m,maxNumberOfRecurrsionsForInitDeform:u,maxRandomNumberForOverlayDeform:x,maxNumberOfRecurrsionsForOverlayDeform:f,initRotationAngle:g=0}=e,p=[],v=new S(1e3*l+i+1e4*t);for(let e=0;e<h;e++){let d=new S(1e6*v.next()),h=C(l,i,n,s,g+2*e);h=A(h,m,u,d);let x=o[e%o.length],f="M ".concat(h.map(e=>"".concat(e[0],",").concat(e[1])).join(" L ")," Z");p.push((0,r.jsx)("path",{d:f,fill:x,opacity:c,filter:"url(#".concat(a,")")},"shape-".concat(t,"-layer-").concat(e)))}for(let e=0;e<d;e++){let d=new S(2e6*v.next()),h=d.nextRange(0,360),m=n*d.nextRange(.7,1.3),u=C(l+d.nextRange(-(.3*n),.3*n),i+d.nextRange(-(.3*n),.3*n),m,s,h);u=A(u,x,f,d);let g=o[e%o.length],j="M ".concat(u.map(e=>"".concat(e[0],",").concat(e[1])).join(" L ")," Z");p.push((0,r.jsx)("path",{d:j,fill:g,opacity:.8*c,filter:"url(#".concat(a,")")},"shape-".concat(t,"-overlay-").concat(e)))}return p}(t,a,o);e.push(...s)}),e},[n,o]);return(0,r.jsxs)("svg",{width:"100%",height:"100%",viewBox:"0 0 ".concat(a," ").concat(t),xmlns:"http://www.w3.org/2000/svg",style:{backgroundColor:l},children:[(0,r.jsxs)("defs",{children:[(0,r.jsx)("filter",{id:o,x:"-50%",y:"-50%",width:"200%",height:"200%",children:(0,r.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"3"})}),(0,r.jsxs)("filter",{id:c,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,r.jsx)("feTurbulence",{type:"fractalNoise",baseFrequency:"0.02",numOctaves:"3",result:"noise"}),(0,r.jsx)("feDisplacementMap",{in:"SourceGraphic",in2:"noise",scale:"5",xChannelSelector:"R",yChannelSelector:"G"}),(0,r.jsx)("feGaussianBlur",{stdDeviation:"2"})]})]}),l&&"transparent"!==l&&(0,r.jsx)("rect",{x:"0",y:"0",width:a,height:t,fill:l}),d]})},M=[{name:"WeChat Official (2.35:1)",width:900,height:383},{name:"Square (1:1)",width:800,height:800},{name:"Landscape (16:9)",width:1920,height:1080},{name:"Portrait (9:16)",width:1080,height:1920},{name:"Custom",width:900,height:383}],R=[{name:"Noto Sans",value:"'Noto Sans SC', sans-serif"},{name:"SimHei",value:"'SimHei', 'Heiti SC', sans-serif"},{name:"Georgia",value:"Georgia, serif"},{name:"Impact",value:"Impact, sans-serif"},{name:"Courier",value:"'Courier New', monospace"},{name:"Arial",value:"Arial, sans-serif"},{name:"钟齐志莽行书",value:"Zhi Mang Xing"},{name:"汇文明朝体",value:"Huiwen-mincho"},{name:"也字工厂小石头",value:"YEFONTXiaoShiTou"}];function F(e){let t=e>>>0;return function(){let e=Math.imul((t+=0x6d2b79f5)^t>>>15,1|t);return(((e^=e+Math.imul(e^e>>>7,61|e))^e>>>14)>>>0)/0x100000000}}function O(e,t,a){return Math.max(t,Math.min(a,e))}function B(e,t){let a=Math.floor(t*e.length);return e[O(a,0,e.length-1)]}let D=["#0B0B0B","#2B2B2B","#5A5A5A","#8A8A8A"],I=["#0B4F6C","#1B998B","#0E6E5B","#144552","#2EC4B6"],P=["#6
1D597A","#B56576","#E56B6F","#EAAC8B","#355070"],E=["#0B0B0B","#1D3557","#2A9D8F","#E63946","#F4A261"],L=[{name:"Ink Wash \xb7 Minimalist",description:"Black and grey layers with lots of white space, perfect for title covers",backgroundColor:"#F7F5EF",palette:D,buildShapes:e=>{let{width:t,height:a,complexity:r,intensity:s,seed:n,monochrome:l}=e,i=F(n),o=s/100,c=O(r,1,5),d=.008+.022*o,h=Math.round(3+c/5*4),m=Math.round(8+c/5*6);return Array(c<=2?1:3===c?2:3).fill(0).map((e,r)=>{var s,n,c;let u=l?"#0B0B0B":B(D,i()),x=(s=.22*a)+(.42*a-s)*i();return{initPolygonPoints:Math.round(9+7*i()),initPolygonRadius:x,originX:(n=.25*t)+(.75*t-n)*i(),originY:(c=.25*a)+(.75*a-c)*i(),colors:[u],opacity:d*(.8+.3999999999999999*i()),numberOfOverlays:h,numberOfInitialShapeLayers:m,maxRandomNumberForInitDeform:(20+50*o)*(.8+.3999999999999999*i()),maxNumberOfRecurrsionsForInitDeform:Math.round(2+3*o),maxRandomNumberForOverlayDeform:(2+8*o)*(.8+.3999999999999999*i()),maxNumberOfRecurrsionsForOverlayDeform:Math.round(2+2*o),initRotationAngle:0+180*i()+15*r}})}},{name:"Cyan Green \xb7 Landscape",description:"Cyan-green ink tones with cool colors, ideal for tech/nature themes",backgroundColor:"#F2F7F6",palette:I,buildShapes:e=>{let{width:t,height:a,complexity:r,intensity:s,seed:n,monochrome:l}=e,i=F(n),o=s/100,c=O(r,1,5),d=.01+.04*o;return Array(Math.round(2+c/5*2)).fill(0).map((e,r)=>{var s,n,h;let m=l?"#144552":B(I,i()),u=(s=.16*a)+(.36*a-s)*i(),x=(n=.18*t)+(.82*t-n)*i(),f=(h=.2*a)+(.85*a-h)*i();return{initPolygonPoints:Math.round(7+6*i()),initPolygonRadius:u,originX:x,originY:f,colors:[m],opacity:d*(.9+.20000000000000007*i()),numberOfOverlays:Math.round(3+c/5*3),numberOfInitialShapeLayers:Math.round(6+c/5*6),maxRandomNumberForInitDeform:(25+65*o)*(.8+.3999999999999999*i()),maxNumberOfRecurrsionsForInitDeform:Math.round(2+4*o),maxRandomNumberForOverlayDeform:(3+15*o)*(.8+.3999999999999999*i()),maxNumberOfRecurrsionsForOverlayDeform:Math.round(2+2*o),initRotationAngle:0+120*i()+10*r}})}},{name:"Cinnabar \xb7 Accent",description:"Predominantly black ink with a touch of red as visual focal point",backgroundColor:"#FBF7F0",palette:["#111111","#2B2B2B","#D72638","#EF233C"],buildShapes:e=>{var t;let{width:a,height:r,complexity:s,intensity:n,seed:l,monochrome:i}=e,o=F(l),c=n/100,d=O(s,1,5),h=.01+.03*c,m=Math.round(7+d/5*6),u=Math.round(3+d/5*4);return[{initPolygonPoints:Math.round(10+6*o()),initPolygonRadius:(t=.2*r)+(.45*r-t)*o(),originX:a*(.35+.30000000000000004*o()),originY:r*(.35+.30000000000000004*o()),colors:["#111111"],opacity:h,numberOfOverlays:u,numberOfInitialShapeLayers:m,maxRandomNumberForInitDeform:20+55*c,maxNumberOfRecurrsionsForInitDeform:Math.round(2+3*c),maxRandomNumberForOverlayDeform:2+10*c,maxNumberOfRecurrsionsForOverlayDeform:Math.round(2+2*c),initRotationAngle:0+180*o()},...Array(d<=2?1:2).fill(0).map((e,t)=>{var s;return{initPolygonPoints:Math.round(6+4*o()),initPolygonRadius:(s=.08*r)+(.18*r-s)*o(),originX:a*(.18+.6399999999999999*o()),originY:r*(.18+.6399999999999999*o()),colors:[i?"#111111":B(["#D72638","#EF233C"],o())],opacity:h*(1.4+.7000000000000002*c),numberOfOverlays:Math.round(2+d/5*2),numberOfInitialShapeLayers:Math.round(4+d/5*4),maxRandomNumberForInitDeform:15+40*c,maxNumberOfRecurrsionsForInitDeform:Math.round(1+3*c),maxRandomNumberForOverlayDeform:2+10*c,maxNumberOfRecurrsionsForOverlayDeform:Math.round(1+2*c),initRotationAngle:0+180*o()+25*t}})]}},{name:"Light Color \xb7 Floral",description:"Soft and transparent pastel layers, perfect for lifestyle/content covers",backgroundColor:"#FAFAFF",palette:P,buildShapes:e=>{let{width:t,height:a,complexity:r,intensity:s,seed:n,monochrome:l}=e,i=F(n),o=s/100,c=O(r,1,5),d=Math.round(2+c/5*3),h=.01+.049999999999999996*o,m=Math.round(2+c/5*4),u=Math.round(5+c/5*7);return Array(d).fill(0).map((e,r)=>{var s,n,c;let d=l?"#355070":B(P,i());return{initPolygonPoints:Math.round(6+6*i()),initPolygonRadius:(s=.12*a)+(.3*a-s)*i(),originX:(n=.15*t)+(.85*t-n)*i(),originY:(c=.15*a)+(.85*a-c)*i(),colors:[d],opacity:h*(.85+.29999999999999993*i()),numberOfOverlays:m,numberOfInitialShapeLayers:u,maxRandomNumberForInitDeform:(20+70*o)*(.8+.30000000000000004*i()),maxNumberOfRecurrsionsForInitDeform:Math.round(2+4*o),maxRandomNumberForOverlayDeform:(2+14*o)*(.8+.30000000000000004*i()),maxNumberOfRecurrsionsForOverlayDeform:Math.round(2+2*o),initRotationAngle:0+180*i()+12*r}})}},{name:"Abstract \xb7 Splash Ink",description:"Intense deformation and overlay, great for backgrounds and textures",backgroundColor:"#FFFFFF",palette:E,buildShapes:e=>{let{width:t,height:a,complexity:r,intensity:s,seed:n,monochrome:l}=e,i=F(n),o=s/100,c=O(r,1,5),d=Math.round(3+c/5*4),h=.008+.027000000000000003*o,m=Math.round(4+c/5*5),u=Math.round(8+c/5*8);return Array(d).fill(0).map((e,r)=>{var s,n,c;let d=l?"#0B0B0B":B(E,i()),x=(s=.1*a)+(.42*a-s)*i();return{initPolygonPoints:Math.round(8+10*i()),initPolygonRadius:x,originX:(n=.05*t)+(.95*t-n)*i(),originY:(c=.05*a)+(.95*a-c)*i(),colors:[d],opacity:h*(.8+.5*i()),numberOfOverlays:m,numberOfInitialShapeLayers:u,maxRandomNumberForInitDeform:(40+100*o)*(.9+.4999999999999999*i()),maxNumberOfRecurrsionsForInitDeform:Math.round(3+4*o),maxRandomNumberForOverlayDeform:(6+29*o)*(.9+.4999999999999999*i()),maxNumberOfRecurrsionsForOverlayDeform:Math.round(2+3*o),initRotationAngle:0+180*i()+8*r}})}}];async function z(e,t,a){let r=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),s=URL.createObjectURL(r);try{let e=new window.Image;e.decoding="async",await new Promise((t,a)=>{e.onload=()=>t(),e.onerror=()=>a(Error("Failed to load SVG image")),e.src=s});let r=document.createElement("canvas");r.width=t,r.height=a;let n=r.getContext("2d");if(!n)throw Error("Failed to create canvas context");return n.drawImage(e,0,0,t,a),r.toDataURL("image/png")}finally{URL.revokeObjectURL(s)}}function G(e){var t,a;return(null!=(a=null==(t=e.split(",")[0])?void 0:t.trim())?a:"").replace(/^['"]|['"]$/g,"")}async function V(e){var t,a,r;let s=new Set(e.map(e=>
1e.trim()).filter(Boolean));if(0===s.size)return"";let n=[];for(let e of Array.from(document.styleSheets)){let a=null;try{a=e.cssRules}catch(e){continue}if(a)for(let r of Array.from(a)){if(r.type!==CSSRule.FONT_FACE_RULE)continue;let a=(null!=(t=r.style.getPropertyValue("font-family"))?t:"").trim().replace(/^['"]|['"]$/g,"");s.has(a)&&n.push({cssText:r.cssText,sheetHref:e.href})}}if(0===n.length)return"";let l=new Map,i=[];for(let e of n){let t=e.cssText,s=/url\(([^)]+)\)/g;for(let n of Array.from(t.matchAll(s))){let s=(null!=(a=n[1])?a:"").trim().replace(/^['"]|['"]$/g,"");if(!s||s.startsWith("data:"))continue;let i=new URL(s,null!=(r=e.sheetHref)?r:window.location.href).toString(),o=l.get(i);if(!o){let e=await fetch(i),t=await e.arrayBuffer(),a=function(e,t){var a;let r=(null!=t?t:"").toLowerCase();if(r)return null!=(a=r.split(";")[0])?a:r;let s=(()=>{try{return new URL(e,window.location.href).pathname.toLowerCase()}catch(t){return e.toLowerCase()}})();return s.endsWith(".woff2")?"font/woff2":s.endsWith(".woff")?"font/woff":s.endsWith(".ttf")?"font/ttf":s.endsWith(".otf")?"font/otf":"application/octet-stream"}(i,e.headers.get("content-type")),r=function(e){let t=new Uint8Array(e),a="";for(let e=0;e<t.length;e+=32768)a+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(a)}(t);o="data:".concat(a,";base64,").concat(r),l.set(i,o)}let c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(RegExp("url\\((['\"]?)".concat(c,"\\1\\)"),"g"),"url(".concat(o,")"))}i.push(t)}return i.join("\n")}function $(){let e=(0,s.useRef)(null),t=(0,s.useRef)(null),[a,l]=(0,s.useState)(0),[S,C]=(0,s.useState)(900),[A,F]=(0,s.useState)(383),[O,B]=(0,s.use
1State)(0),[D,I]=(0,s.useState)(L[0].backgroundColor),[P,E]=(0,s.useState)(null),[$,W]=(0,s.useState)(3),[J,U]=(0,s.useState)(55),[T,X]=(0,s.useState)(!1),[q,H]=(0,s.useState)(1337),[Z,_]=(0,s.useState)(0),[Y,K]=(0,s.useState)(!1),[Q,ee]=(0,s.useState)("Watercolor Cover"),[et,ea]=(0,s.useState)("Ink & Wash Cover Generator"),[er,es]=(0,s.useState)(0),[en,el]=(0,s.useState)(0),[ei,eo]=(0,s.useState)("#111111"),[ec,ed]=(0,s.useState)("#111111"),[eh,em]=(0,s.useState)(64),[eu,ex]=(0,s.useState)(24),ef=(0,s.useMemo)(()=>a===M.length-1?{width:S,height:A}:{width:M[a].width,height:M[a].height},[a,S,A]),eg=L[O],ep=P||eg.palette,ev=(0,s.useMemo)(()=>{let e=({...eg,palette:ep}).buildShapes({width:ef.width,height:ef.height,complexity:$,intensity:J,seed:q,monochrome:T});return{svgWidth:ef.width,svgHeight:ef.height,watercolorShapes:e,backgroundColor:D}},[eg,ep,ef.width,ef.height,$,J,q,T,D]),ej=()=>{H(Math.floor(1e9*Math.random())),_(e=>e+1)},ew=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[40,90],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[20,60],a=Math.floor(360*Math.random()),r=Math.floor(Math.random()*(e[1]-e[0])+e[0]);var s=Math.floor(Math.random()*(t[1]-t[0])+t[0]);let n=r*Math.min(s/=100,1-s)/100,l=e=>{let t=(e+a/30)%12;return Math.round(255*(s-n*Math.max(Math.min(t-3,9-t,1),-1))).toString(16).padStart(2,"0")};return"#".concat(l(0)).concat(l(8)).concat(l(4))},eb=async()=>{let e=(()=>{let e=t.current;if(!e)return null;let a=e.querySelector("svg");return a&&a instanceof SVGSVGElement?a:null})();if(!e)return null;let a=e.cloneNode(!0);if(a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),a.setAttribute("width",String(ef.width)),a.setAttribute("height",String(ef.height)),a.getAttribute("viewBox")||a.setAttribute("viewBox","0 0 ".concat(ef.width," ").concat(ef.height)),!Array.from(a.children).some(e=>e instanceof SVGRectElement&&"true"===e.getAttribute("data-zojo-bg"))){let e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("data-zojo-bg","true"),e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("width",String(ef.width)),e.setAttribute("height",String(ef.height)),e.setAttribute("fill",D),a.insertBefore(e,a.firstChild)}if(Y){let e="http://www.w3.org/2000/svg",t=[Q?G(R[er].value):"",et?G(R[en].value):""].filter(Boolean),r=await V(Array.from(new Set(t))),s=a.querySelector("defs");if(s||(s=document.createElementNS(e,"defs"),a.insertBefore(s,a.firstChild)),r){let t=document.createElementNS(e,"style");t.textContent=r,s.insertBefore(t,s.firstChild)}let n=document.createElementNS("http://www.w3.org/2000/svg","filter");n.setAttribute("id","zojoTextShadow"),n.setAttribute("x","-20%"),n.setAttribute("y","-20%"),n.setAttribute("width","140%"),n.setAttribute("height","140%");let l=document.createElementNS("http://www.w3.org/2000/svg","feDropShadow");l.setAttribute("dx","0"),l.setAttribute("dy","2"),l.setAttribute("stdDeviation","3"),l.setAttribute("flood-color","rgba(0,0,0,0.25)"),n.appendChild(l),s.appendChild(n);let i=document.createElementNS("http://www.w3.org/2000/svg","g");i.setAttribute("filter","url(#zojoTextShadow)");let o=ef.width/2,c=ef.height/2-((Q?eh:0)+(et?eu:0)+(Q&&et?16:0))/2;if(Q){let e=document.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("x",String(o));let t=c+eh/2;e.setAttribute("y",String(t)),e.setAttribute("text-anchor","middle"),e.setAttribute("dominant-baseline","middle"),e.setAttribute("fill",ei),e.setAttribute("font-family",R[er].value),e.setAttribute("font-size",String(eh)),e.setAttribute("font-weight","700"),e.textContent=Q,i.appendChild(e)}if(et){let e=document.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("x",String(o));let t=c+(Q?eh+16:0)+eu/2;e.setAttribute("y",String(t)),e.setAttribute("text-anchor","middle"),e.setAttribute("dominant-baseline","middle"),e.setAttribute("fill",ec),e.setAttribute("font-family",R[en].value),e.setAttribute("font-size",String(eu)),e.setAttribute("font-weight","400"),e.textContent=et,i.appendChild(e)}a.appendChild(i)}return new XMLSerializer().serializeToString(a)},ey=async()=>{let e=await eb();if(!e)return void alert("SVG not ready yet. Please try again in a moment.");let t=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),a=URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download="zojo-watercolor-".concat(ef.width,"x").concat(ef.height,"-").concat(Date.now(),".svg"),r.style.display="none",document.body.appendChild(r),r.click(),setTimeout(()=>{document.body.removeChild(r),URL.revokeObjectURL(a)},100)},eN=async()=>{try{let e=await eb();if(!e)return void alert("SVG not ready yet. Please try again in a moment.");let t=await z(e,ef.width,ef.height),a=new window.Image;await new Promise((e,r)=>{a.onload=()=>e(),a.onerror=()=>r(Error("Failed to load rasterized image")),a.src=t});let r=document.createElement("canvas");
1r.width=ef.width,r.height=ef.height;let s=r.getContext("2d");if(!s)return void alert("Failed to create canvas context.");s.drawImage(a,0,0,ef.width,ef.height),r.toBlob(e=>{if(!e)return void alert("Failed to generate image.");let t=URL.createObjectURL(e),a=document.createElement("a");a.href=t,a.download="zojo-watercolor-".concat(ef.width,"x").concat(ef.height,"-").concat(Date.now(),".png"),a.style.display="none",document.body.appendChild(a),a.click(),setTimeout(()=>{document.body.removeChild(a),URL.revokeObjectURL(t)},100)},"image/png",1)}catch(e){console.error("downloadPng error:",e),alert("Failed to export PNG. Please try again.")}};return(0,r.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-amber-50/40 to-slate-50 dark:from-slate-950 dark:via-amber-950/20 dark:to-slate-950",children:[(0,r.jsx)("nav",{className:"fixed top-0 w-full z-50 bg-white/80 dark:bg-slate-950/80 backdrop-blur-lg border-b border-slate-200/50 dark:border-slate-800/50",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-6 py-4 flex items-center justify-between",children:[(0,r.jsx)(i(),{href:"/",className:"flex items-center gap-2",children:(0,r.jsx)("div",{children:(0,r.jsx)(n.default,{src:"/zojo-logo.svg",alt:"Logo",width:150,height:50})})}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)(o.$,{variant:"ghost",className:"hidden md:inline-flex",onClick:()=>window.location.href="/create",children:"Color Cover"}),(0,r.jsx)(o.$,{variant:"ghost",className:"hidden md:inline-flex",onClick:()=>window.location.href="/grainy",children:"Grainy"}),(0,r.jsx)(o.$,{variant:"ghost",className:"hidden md:inline-flex",onClick:()=>window.location.href="/paper",children:"Paper"}),(0,r.jsx)(o.$,{variant:"ghost",className:"hidden md:inline-flex",onClick:()=>window.location.href="/gradient",children:"Gradient Text"}),(0,r.jsx)(o.$,{variant:"ghost",className:"hidden md:inline-flex",onClick:()=>window.location.href="/infographic",children:"Infographic"}),(0,r.jsx)(o.$,{variant:"ghost",className:"hidden md:inline-flex",onClick:()=>window.location.href="/md",children:"Markdown"})]})]})}),(0,r.jsx)("div",{className:"pt-24 pb-12 px-6",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"text-center mb-12",children:[(0,r.jsxs)(d.E,{className:"bg-slate-900/5 text-slate-900 dark:bg-white/10 dark:text-white border-slate-200/60 dark:border-slate-800/60 px-4 py-1.5 text-sm font-medium mb-4",children:[(0,r.jsx)(p.A,{className:"w-4 h-4 mr-2 inline"}),"Watercolor Cover Generator"]}),(0,r.jsx)("h1",{className:"text-4xl md:text-5xl font-bold tracking-tight mb-4",children:(0,r.jsx)("span",{className:"bg-gradient-to-r from-slate-900 via-slate-700 to-slate-900 dark:from-white dark:via-slate-200 dark:to-white bg-clip-text text-transparent",children:"Ink & Wash Cover Generator"})}),(0,r.jsx)("p",{className:"text-xl text-slate-600 dark:text-slate-400 max-w-2xl mx-auto",children:"Multiple ink wash styles to choose from, export as SVG/PNG"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[(0,r.jsxs)("div",{className:"lg:col-span-2 space-y-6",children:[(0,r.jsx)(c.Zp,{className:"border-2 border-slate-200/50 dark:border-slate-800/50 overflow-hidden",children:(0,r.jsxs)(c.Wu,{className:"p-6",children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:"Preview"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)(o.$,{onClick:ej,variant:"outline",size:"sm",className:"gap-2 hover:text-slate-900 hover:border-slate-400 dark:hover:text-white",children:[(0,r.jsx)(v.A,{className:"w-4 h-4"}),"Randomize"]}),(0,r.jsxs)(o.$,{onClick:()=>{_(e=>e+1)},variant:"outline",size:"sm",className:"gap-2 hover:text-slate-900 hover:border-slate-400 dark:hover:text-white",children:[(0,r.jsx)(j.A,{className:"w-4 h-4"}),"Regenerate"]}),(0,r.jsxs)(o.$,{onClick:eN,className:"bg-gradient-to-r from-slate-900 to-slate-700 hover:from-slate-900/90 hover:to-slate-700/90 text-white gap-2",size:"sm",children:[(0,r.jsx)(w.A,{className:"w-4 h-4"}),"PNG"]})]})]}
1),(0,r.jsxs)("div",{ref:e,className:"relative bg-slate-100 dark:bg-slate-900 rounded-lg overflow-hidden shadow-2xl",style:{aspectRatio:"".concat(ef.width,"/").concat(ef.height)},children:[(0,r.jsx)("div",{ref:t,className:"absolute inset-0",style:{backgroundColor:D},children:(0,r.jsx)(k,{...ev})},Z),Y&&(0,r.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[Q&&(0,r.jsx)("div",{style:{fontFamily:R[er].value,fontSize:"".concat(eh,"px"),color:ei,fontWeight:"bold",textShadow:"2px 2px 4px rgba(0,0,0,0.25)",marginBottom:"16px"},children:Q}),et&&(0,r.jsx)("div",{style:{fontFamily:R[en].value,fontSize:"".concat(eu,"px"),color:ec,textShadow:"1px 1px 2px rgba(0,0,0,0.2)"},children:et})]})]}),(0,r.jsxs)("div",{className:"mt-4 text-sm text-slate-500 dark:text-slate-400 text-center",children:["Dimensions: ",ef.width," \xd7 ",ef.height," px \xb7 Seed: ",q]})]})}),(0,r.jsx)(c.Zp,{className:"border-2 border-slate-200/50 dark:border-slate-800/50",children:(0,r.jsx)(c.Wu,{className:"p-6",children:(0,r.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-lg font-semibold text-slate-900 dark:text-white",children:eg.name}),(0,r.jsx)("div",{className:"text-sm text-slate-600 dark:text-slate-400",children:eg.description})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)(o.$,{onClick:ey,variant:"outline",size:"sm",className:"gap-2",children:[(0,r.jsx)(b.A,{className:"w-4 h-4"}),"SVG"]}),(0,r.jsxs)(o.$,{onClick:()=>{H(1337),W(3),U(55),X(!1),I(eg.backgroundColor),_(e=>e+1)},variant:"outline",size:"sm",className:"gap-2",children:[(0,r.jsx)(j.A,{className:"w-4 h-4"}),"Reset"]})]})]})})}),(0,r.jsx)(c.Zp,{className:"border-2 border-slate-200/50 dark:border-slate-800/50",children:(0,r.jsxs)(c.Wu,{className:"p-6 space-y-6",children:[(0,r.jsxs)("h3",{className:"text-xl font-bold text-slate-900 dark:text-white flex items-center gap-2",children:[(0,r.jsx)(y.A,{className:"w-5 h-5"}),"Text"]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(h.J,{children:"Show text"}),(0,r.jsx)(x.d,{checked:Y,onCheckedChange:K})]}),(0,r.jsxs)(g.tU,{defaultValue:"main",className:"w-full",children:[(0,r.jsxs)(g.j7,{className:"grid w-full grid-cols-2",children:[(0,r.jsx)(g.Xi,{value:"main",children:"Main"}),(0,r.jsx)(g.Xi,{value:"sub",children:"Sub"})]}),(0,r.jsxs)(g.av,{value:"main",className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h.J,{children:"Main title"}),(0,r.jsx)(m.p,{value:Q,onChange:e=>ee(e.target.value)})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h.J,{children:"Font"}),(0,r.jsxs)(f.l6,{value:String(er),onValueChange:e=>es(parseInt(e)),children:[(0,r.jsx)(f.bq,{children:(0,r.jsx)(f.yv,{placeholder:"Select font"})}),(0,r.jsx)(f.gC,{children:R.map((e,t)=>(0,r.jsx)(f.eb,{value:String(t),children:e.name},e.name))})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h.J,{children:"Color"}),(0,r.jsx)(m.p,{type:"color",value:ei,onChange:e=>eo(e.target.value)})]}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(h.J,{children:"Size"}),(0,r.jsx)("span",{className:"text-sm text-slate-500 dark:text-slate-400",children:eh})]}),(0,r.jsx)(u.A,{min:20,max:120,step:1,value:[eh],onValueChange:e=>{var t;return em(null!=(t=e[0])?t:64)}})]})]}),(0,r.jsxs)(g.av,{value:"sub",className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h.J,{children:"Subtitle"}),(0,r.jsx)(m.p,{value:et,onChange:e=>ea(e.target.value)})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h.J,{children:"Font"}),(0,r.jsxs)(f.l6,{value:String(en),onValueChange:e=>el(parseInt(e)),children:[(0,r.jsx)(f.bq,{children:(0,r.jsx)(f.yv,{placeholder:"Select font"})}),(0,r.jsx)(f.gC,{children:R.map((e,t)=>(0,r.jsx)(f.eb,{value:String(t),children:e.name},e.name))})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h.J,{children:"Color"}),(0,r.jsx)(m.p,{type:"color",value:ec,onChange:e=>ed(e.target.value)})]}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(h.J,{children:"Size"}),(0,r.jsx)("span",{className:"text-sm text-slate-500 dark:text-slate-400",children:eu})]}),(0,r.jsx)(u.A,{min:12,max:64,step:1,value:[eu],onValueChange:e=>{var t;return ex(null!=(t=e[0])?t:24)}})]})]})]})]})})]}),(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(c.Zp,{className:"border-2 border-slate-200/50 dark:border-slate-800/50",children:(0,r.jsxs)(c.Wu,{className:"p-6 space-y-6",children:[(0,r.jsxs)("h3",{className:"text-xl font-bold text-slate-900 dark:text-white flex items-center gap-2",children:[(0,r.jsx)(N.A,{className:"w-5 h-5"}),"Style"]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h.J,{children:"Preset"}),(0,r.jsxs)(f.l6,{value:String(O),onValueChange:e=>{let t=parseInt(e);B(t),I(L[t].backgroundColor),E(null),_(e=>e+1)},children:[(0,r.jsx)(f.bq,{children:(0,r.jsx)(f.yv,{placeholder:"Select style"})}),(0,r.jsx)(f.gC,{children:L.map((e,t)=>(0,r.jsx)(f.eb,{value:String(t),children:e.name},e.name))})]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(h.J,{children:"Backgroun
1d color"}),(0,r.jsxs)(o.$,{onClick:()=>{E((()=>{let e=Math.floor(3*Math.random())+3,t=[],a=Math.random();if(a<.3)for(let a=0;a<e;a++){let e=Math.floor(50*Math.random()+30),a=Math.floor(50*Math.random()+15);t.push(ew([e,e],[a,a]))}else if(a<.6)for(let a=0;a<e;a++){let e=Math.floor(50*Math.random()+40),a=Math.floor(40*Math.random()+20);t.push(ew([e,e],[a,a]))}else for(let a=0;a<e;a++)t.push(ew([40,90],[20,60]));return t})()),I(ew([10,30],[85,98])),_(e=>e+1)},variant:"outline",size:"sm",className:"gap-1.5 h-7 text-xs",children:[(0,r.jsx)(p.A,{className:"w-3.5 h-3.5"}),"Random Colors"]})]}),(0,r.jsx)(m.p,{type:"color",value:D,onChange:e=>I(e.target.value)}),P&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:"Custom Palette"}),(0,r.jsx)("button",{onClick:()=>{E(null),I(L[O].backgroundColor),_(e=>e+1)},className:"text-xs text-slate-500 hover:text-slate-700 dark:hover:text-slate-300",children:"Reset"})]}),(0,r.jsx)("div",{className:"flex gap-1.5",children:P.map((e,t)=>(0,r.jsx)("div",{className:"flex-1 h-8 rounded border border-slate-200 dark:border-slate-700",style:{backgroundColor:e},title:e},t))})]})]}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(h.J,{children:"Intensity"}),(0,r.jsx)("span",{className:"text-sm text-slate-500 dark:text-slate-400",children:J})]}),(0,r.jsx)(u.A,{min:0,max:100,step:1,value:[J],onValueChange:e=>{var t;return U(null!=(t=e[0])?t:55)}})]}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(h.J,{children:"Complexity"}),(0,r.jsx)("span",{className:"text-sm text-slate-500 dark:text-slate-400",children:$})]}),(0,r.jsx)(u.A,{min:1,max:5,step:1,value:[$],onValueChange:e=>{var t;return W(null!=(t=e[0])?t:3)}})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(h.J,{children:"Monochrome"}),(0,r.jsx)(x.d,{checked:T,onCheckedChange:X})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h.J,{children:"Seed"}),(0,r.jsx)(m.p,{type:"number",value:q,onChange:e=>H(parseInt(e.target.value||"0"))}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)(o.$,{variant:"outline",size:"sm",className:"gap-2 flex-1",onClick:()=>H(e=>e+1),children:[(0,r.jsx)(v.A,{className:"w-4 h-4"}),"+1"]}),(0,r.jsxs)(o.$,{variant:"outline",size:"sm",className:"gap-2 flex-1",onClick:ej,children:[(0,r.jsx)(v.A,{className:"w-4 h-4"}),"Random"]})]})]})]})}),(0,r.jsx)(c.Zp,{className:"border-2 border-slate-200/50 dark:border-slate-800/50",children:(0,r.jsxs)(c.Wu,{className:"p-6 space-y-6",children:[(0,r.jsxs)("h3",{className:"text-xl font-bold text-slate-900 dark:text-white flex items-center gap-2",children:[(0,r.jsx)(w.A,{className:"w-5 h-5"}),"Export"]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h.J,{children:"Dimensions"}),(0,r.jsxs)(f.l6,{value:String(a),onValueChange:e=>l(parseInt(e)),children:[(0,r.jsx)(f.bq,{children:(0,r.jsx)(f.yv,{placeholder:"Select dimensions"})}),(0,r.jsx)(f.gC,{children:M.map((e,t)=>(0,r.jsxs)(f.eb,{value:String(t),children:[e.name," (",e.width,"\xd7",e.height,")"]},e.name))})]})]}),a===M.length-1&&(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h.J,{children:"Width"}),(0,r.jsx)(m.p,{type:"number",value:S,onChange:e=>C(parseInt(e.target.value||"900"))})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h.J,{children:"Height"}),(0,r.jsx)(m.p,{type:"number",value:A,onChange:e=>F(parseInt(e.target.value||"383"))})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)(o.$,{onClick:eN,className:"flex-1 gap-2",children:[(0,r.jsx)(w.A,{className:"w-4 h-4"}),"Download PNG"]}),(0,r.jsxs)(o.$,{onClick:ey,variant:"outline",className:"flex-1 gap-2",children:[(0,r.jsx)(b.A,{className:"w-4 h-4"}),"Download SVG"]})]}),(0,r.jsx)("div",{className:"text-xs text-slate-500 dark:text-slate-400 leading-relaxed",children:"PNG export rasterizes SVG then renders text; SVG export embeds text as SVG text layers."})]})})]})]})]})})]})}}},e=>
1{e.O(0,[9462,13,7080,5573,1485,6021,9238,626,4981,9475,7358],()=>e(e.s=3828)),_N_E=e.O()}]);

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.