PageSourceSearch

https://imgeditor.ai/_next/static/chunks/7940-f00285919c71fe46.js?dpl=dpl_2sJwLckPbvck4J8e7tbyKq8sv3vg

js imgeditor.ai collected 2026-10-05 12:03:56 UTC 28,050 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7940],{1398:(e,t,a)=>{a.d(t,{bq:()=>u,eb:()=>f,gC:()=>p,l6:()=>c,yv:()=>m});var s=a(6084),r=a(92712),l=a(66916),i=a(68888),n=a(89041),o=a(37762),d=a(66089);let c=l.bL;l.YJ;let m=l.WT,u=r.forwardRef((e,t)=>{let{className:a,children:r,...n}=e;return(0,s.jsxs)(l.l9,{ref:t,className:(0,d.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...n,children:[r,(0,s.jsx)(l.In,{asChild:!0,children:(0,s.jsx)(i.A,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=l.l9.displayName;let x=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.PP,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...r,children:(0,s.jsx)(n.A,{className:"h-4 w-4"})})});x.displayName=l.PP.displayName;let h=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.wn,{ref:t,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",a),...r,children:(0,s.jsx)(i.A,{className:"h-4 w-4"})})});h.displayName=l.wn.displayName;let p=r.forwardRef((e,t)=>{let{className:a,children:r,position:i="popper",...n}=e;return(0,s.jsx)(l.ZL,{children:(0,s.jsxs)(l.UC,{ref:t,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:i,...n,children:[(0,s.jsx)(x,{}),(0,s.jsx)(l.LM,{className:(0,d.cn)("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,s.jsx)(h,{})]})})});p.displayName=l.UC.displayName,r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.JU,{ref:t,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",a),...r})}).displayName=l.JU.displayName;let f=r.forwardRef((e,t)=>{let{className:a,children:r,...i}=e;return(0,s.jsxs)(l.q7,{ref:t,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...i,children:[(0,s.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(l.VF,{children:(0,s.jsx)(o.A,{className:"h-4 w-4"})})}),(0,s.jsx)(l.p4,{children:r})]})});f.displayName=l.q7.displayName,r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.wv,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",a),...r})}).displayName=l.wv.displayName},5136:(e,t,a)=>{a.d(t,{BT:()=>d,Wu:()=>c,ZB:()=>o,Zp:()=>i,aR:()=>n,wL:()=>m});var s=a(6084),r=a(92712),l=a(66089);let i=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("rounded-xl border bg-card text-card-foreground shadow",a),...r})});i.displayName="Card";let n=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",a),...r})});n.displayName="CardHeader";let o=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("font-semibold leading-none tracking-tight",a),...r})});o.displayName="CardTitle";let d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",a),...r})});d.displayName="CardDescription";let c=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("p-6 pt-0",a),...r})});
1c.displayName="CardContent";let m=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("flex items-center p-6 pt-0",a),...r})});m.displayName="CardFooter"},19988:(e,t,a)=>{a.d(t,{T:()=>i});var s=a(6084),r=a(92712),l=a(66089);let i=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("textarea",{className:(0,l.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:t,...r})});i.displayName="Textarea"},22e3:(e,t,a)=>{a.d(t,{J:()=>d});var s=a(6084),r=a(92712),l=a(70146),i=a(48706),n=a(66089);let o=(0,i.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)(l.b,{ref:t,className:(0,n.cn)(o(),a),...r})});d.displayName=l.b.displayName},23918:(e,t,a)=>{a.d(t,{J:()=>s,k:()=>r});let s=(0,a(16564).v)(e=>({exampleData:null,setExampleData:t=>e({exampleData:t})})),r=e=>{s.getState().setExampleData(e),setTimeout(()=>{s.getState().setExampleData(null)},1e3)}},26171:(e,t,a)=>{a.d(t,{T:()=>i});var s=a(92712),r=a(41329),l=a(72593).hp;function i(e){let{accept:t,maxSizeInMB:a=5,resolution:i,errorMessages:n={}}=e,[o,d]=(0,s.useState)(null),c=(0,s.useMemo)(()=>({fileTypeError:"File type not supported. Supported types: ".concat(t.map(e=>e.replace("image/","")).join(", ")),fileSizeError:"File is too large. Maximum size is ".concat(a,"MB"),imageMetadataError:"Failed to read image information",minWidthError:e=>"Image width must be at least ".concat(e,"px"),minHeightError:e=>"Image height must be at least ".concat(e,"px"),maxWidthError:e=>"Image width must not exceed ".concat(e,"px"),maxHeightError:e=>"Image height must not exceed ".concat(e,"px")}),[t,a]),m=(0,s.useCallback)((e,t)=>{let a=n[e];return"function"==typeof a?a(t):"string"==typeof a?a:c[e](t)},[n,c]),u=(0,s.useCallback)(async(e,t)=>{if(!i)return{isValid:!0,error:null};let{minWidth:a,minHeight:s,maxWidth:r,maxHeight:l}=i;return a&&e<a?{isValid:!1,error:m("minWidthError",a)}:s&&t<s?{isValid:!1,error:m("minHeightError",s)}:r&&e>r?{isValid:!1,error:m("maxWidthError",r)}:l&&t>l?{isValid:!1,error:m("maxHeightError",l)}:{isValid:!0,error:null}},[i,m]);return{error:o,setError:d,validateFile:(0,s.useCallback)(async e=>{if(!t.includes(e.type))return{isValid:!1,error:n.fileTypeError||c.fileTypeError};if(e.size>1024*a*1024)return{isValid:!1,error:n.fileSizeError||c.fileSizeError};if(i)try{var s,o;let t=await e.arrayBuffer(),a=await (0,r.T)(l.from(t));if(!a.success||!(null==(s=a.data)?void 0:s.width)||!(null==(o=a.data)?void 0:o.height))return{isValid:!1,error:n.imageMetadataError||c.imageMetadataError};return u(a.data.width,a.data.height)}catch(e){return console.error("Error validating image resolution:",e),{isValid:!1,error:n.imageMetadataError||c.imageMetadataError}}return{isValid:!0,error:null}},[t,a,i,n,c,u]),validateImageUrl:(0,s.useCallback)(async e=>{if(e.startsWith("data:")||-1===e.lastIndexOf(".")||!i)return{isValid:!0,error:null};try{var t,a;let s=await (0,r.a)(e);if(!s.success||!(null==(t=s.data)?void 0:t.width)||!(null==(a=s.data)?void 0:a.height))return{isValid:!1,error:n.imageMetadataError||c.imageMetadataError};return u(s.data.width,s.data.height)}catch(e){return console.error("Error validating image URL resolution:",e),{isValid:!1,error:n.imageMetadataError||c.imageMetadataError}}},[i,n,c,u])}}},41329:(e,t,a)=>{a.d(t,{T:()=>l,a:()=>i});var s=a(23173),r=a(72593).hp;async function l(e){try{let t=(0,s.L)(e);return{success:!0,data:{width:t.width,height:t.height,type:t.type,size:e.byteLength}}}catch(e){return console.error("Error getting image metadata from buffer:",e),{success:!1,error:"Failed to get image metadata"}}}async function i(e){try{if(!e)return{success:!1,error:"Missing image URL"};let t=await fetch(e);if(!t.ok)return{success:!1,error:"Failed to fetch image: ".concat(t.status," ").concat(t.statusText)};let a=await t.arrayBuffer(),s=r.from(a);return l(s)}catch(e){return console.error("Error getting image metadata from URL:",e),{success:!1,error:"Failed to get image metadata"}}}},50781:(e,t,a)=>{a.d(t,{A:()=>b});var s=a(6084),r=a(5136),l=a(68723),i=a(91930),n=a(1398),o=a(22778),d=a(90376),c=a(31782),m=a(66089),u=a(28119),x=a(97477),h=a(92712),p=a(61924),f=a(45017),g=a(22909),j=a(71799),w=a(23380);let v={PROCESSING:2},b=e=>{let{title:t,isLoading:a,generatingCount:b,historyLimit:N=12,className:y,children:k,syncEndpoint:C="/api/images/sync"}=e,[E,A]=(0,h.useState)(!1),[S,T]=(0,h.useState)(N),{data:z}=(0,j.wV)(),{data:R=[],isLoading:U,refetch:D}=(0,u.PA)(S,!0),{processingTasks:P,completedTasks:I}=(0,h.useMemo)(()=>({processingTasks:R.filter(e=>e.status===v.PROCESSING),completedTasks:R.filter(e=>e.status!==v.PROCESSING)}),[R]),M=(0,h.useMemo)(()=>[...new Set(P.map(e=>
1e.extId).filter(Boolean))],[P]);(0,w.df)({processingExtIds:M,syncEndpoint:C,queryKey:["userTasks"],onError:(e,t)=>{g.oR.error(t||"Image generation failed")}});let{selectedItem:V,selectedIndex:F,isOpen:L,open:$,setIsOpen:_,previous:G,next:W,totalCount:q,touchHandlers:O}=(0,w.SP)(I),B=a||P.length>0,H=Math.max(a?b:0,P.length),J=async()=>{A(!0),await D(),A(!1)},Z=I.length>0,K=!!(null==z?void 0:z.user),Q=!!k;return(0,s.jsxs)(r.Zp,{className:(0,m.cn)("shadow-lg h-fit",y),children:[(0,s.jsxs)(r.aR,{className:"p-4 flex flex-row items-center justify-between space-y-0",children:[(0,s.jsxs)(r.ZB,{className:"text-lg font-semibold flex items-center gap-2",children:[t,K&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.N_,{href:"/my-creations",target:"_blank",children:(0,s.jsx)(i.$,{variant:"ghost",size:"icon",className:"h-8 w-8 text-primary",children:(0,s.jsx)(o.A,{className:"h-4 w-4"})})}),B&&(0,s.jsxs)(l.E,{variant:"secondary",className:"flex items-center gap-1",children:[(0,s.jsx)(d.A,{className:"h-3 w-3 animate-spin"}),a?"Submitting...":"Processing...",H>1&&" (".concat(H,")")]})]})]}),K&&(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(i.$,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:J,disabled:E,children:(0,s.jsx)(c.A,{className:"h-4 w-4 ".concat(E?"animate-spin":"")})}),(0,s.jsxs)(n.l6,{value:S.toString(),onValueChange:e=>{T(parseInt(e))},children:[(0,s.jsx)(n.bq,{className:"w-[100px] h-8",children:(0,s.jsx)(n.yv,{})}),(0,s.jsxs)(n.gC,{children:[(0,s.jsx)(n.eb,{value:"12",children:"12 items"}),(0,s.jsx)(n.eb,{value:"24",children:"24 items"}),(0,s.jsx)(n.eb,{value:"48",children:"48 items"}),(0,s.jsx)(n.eb,{value:"96",children:"96 items"})]})]})]})]}),(0,s.jsxs)(r.Wu,{className:"p-4 ".concat(K&&S>12?"max-h-[600px] overflow-y-auto scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100":""),children:[!K&&(0,s.jsxs)(s.Fragment,{children:[Q&&k,!Q&&(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)("div",{className:"text-muted-foreground mb-2",children:"No images yet"}),(0,s.jsx)("div",{className:"text-sm text-muted-foreground",children:"Generated images will appear here"})]})]}),K&&(0,s.jsxs)("div",{className:"grid grid-cols-3 md:grid-cols-4 gap-3",children:[a&&Array.from({length:Math.max(0,b-P.length)}).map((e,t)=>(0,s.jsxs)("div",{className:"aspect-square bg-muted rounded-lg animate-pulse flex flex-col items-center justify-center border-2 border-dashed border-primary/30 gap-2",children:[(0,s.jsx)(d.A,{className:"h-6 w-6 animate-spin text-primary"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"Queuing..."})]},"submitting-".concat(t))),P.map(e=>(0,s.jsxs)("div",{className:"aspect-square bg-muted rounded-lg animate-pulse flex flex-col items-center justify-center border-2 border-dashed border-muted-foreground/20 gap-2",children:[(0,s.jsx)(d.A,{className:"h-6 w-6 animate-spin text-muted-foreground"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"Processing..."})]},"processing-".concat(e.slug||e.id))),Z&&I.map((e,t)=>(0,s.jsx)("div",{className:"aspect-square bg-muted rounded-lg overflow-hidden group cursor-pointer hover:ring-2 hover:ring-primary transition-all",onClick:()=>$(e,t),children:(0,s.jsx)(x.default,{src:e.imgUrl,alt:e.prompt||"Generated image",width:e.width||256,height:e.height||256,sizes:"(max-width: 640px) 50vw, (max-width: 1024px) 33vw, 25vw",className:"w-full h-full object-cover group-hover:scale-105 transition-transform"})},e.id)),U&&!B&&Array.from({length:N}).map((e,t)=>(0,s.jsx)("div",{className:"aspect-square bg-muted rounded-lg animate-pulse"},"loading-".concat(t))),!U&&!Z&&!B&&0===P.length&&(0,s.jsxs)("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-center",children:[(0,s.jsx)("div",{className:"text-muted-foreground mb-2",children:"No images yet"}),(0,s.jsx)("div",{className:"text-sm text-muted-foreground",children:"Generated images will appear here"})]})]}),V&&(0,s.jsx)(p.W,{data:{id:V.id,imgUrl:V.imgUrl,prompt:V.prompt,model:V.model,tool:V.tool,width:V.width,height:V.height,slug:V.slug,isPublic:V.isPublic,status:V.status,createdAt:V.createdAt,raw:V.raw},open:L,onOpenChange:_,onDeleteSuccess:()=>{g.oR.success("Image deleted successfully")},currentIndex:F,totalCount:q,onPrevious:G,onNext:W,touchHandlers:O})]})]})}},61924:(e,t,a)=>{a.d(t,{W:()=>P});var s=a(6084),r=a(68723),l=a(91930),i=a(19822),n=a(21337),o=a(93826),d=a(48011),c=a(10723),m=a(29850),u=a(37762),x=a(69475),h=a(98755),p=a(25770),f=a(66085),g=a(6372),j=a(12418),w=a(66089),v=a(67138),b=a(79862),N=a(45017),y=a(55765),k=a(8936),C=a(71148),E=a(23918),A=a(92712),S=a(85588),T=a(49930),z=a(90376),R=a(32731);function U(e){let{onConfirm:t,isDeleting:a=!1,title:r="Delete Item",description:i="Are you sure? This action cannot be undone.",trigger:n,className:o}=e,[d,c]=(0,A.useState)(!1),[m,x]=(0,A.useState)(!1);return((0,A.useEffect)(()=>
1{if(a)x(!0);else if(m&&!a){let e=setTimeout(()=>{c(!1),x(!1)},200);return()=>clearTimeout(e)}},[a,m]),d)?(0,s.jsxs)("div",{className:(0,w.cn)("flex gap-1",o),children:[(0,s.jsxs)(l.$,{variant:"outline",size:"sm",onClick:()=>{c(!1)},disabled:a,className:"h-8 px-2 flex-1",children:[(0,s.jsx)(T.A,{className:"h-3 w-3 mr-1"}),"Cancel"]}),(0,s.jsxs)(l.$,{variant:"destructive",size:"sm",onClick:()=>{t()},disabled:a,className:"h-8 px-2 flex-1",children:[a?(0,s.jsx)(z.A,{className:"h-3 w-3 mr-1 animate-spin"}):(0,s.jsx)(u.A,{className:"h-3 w-3 mr-1"}),a?"Deleting...":"Confirm"]})]}):(0,s.jsx)(s.Fragment,{children:n?(0,s.jsx)("div",{onClick:()=>c(!0),children:n}):(0,s.jsxs)(l.$,{variant:"outline",size:"sm",className:(0,w.cn)("justify-start bg-destructive/5 text-destructive border-destructive/20 hover:bg-destructive hover:text-destructive-foreground w-full",o),onClick:()=>c(!0),disabled:a,children:[(0,s.jsx)(R.A,{className:"h-4 w-4 mr-1"}),"Delete"]})})}var D=a(23970);function P(e){let{data:t,trigger:a,className:T,open:z,onOpenChange:R,showReuseButton:P=!0,onDeleteSuccess:I,currentIndex:M,totalCount:V,onPrevious:F,onNext:L,touchHandlers:$}=e,[_,G]=(0,A.useState)(!1),[W,q]=(0,A.useState)(!0),[O,B]=(0,A.useState)(null),H=F&&L&&void 0!==V&&void 0!==M,J=H&&M>0,Z=H&&M<V-1;(0,A.useEffect)(()=>{},[H,$]),(0,A.useEffect)(()=>{if(!z&&!_)return void q(!0);let e=setTimeout(()=>q(!1),5e3);return()=>clearTimeout(e)},[z,_]);let{isPaid:K}=(0,b.I)(null!=z?z:_),{downloadImage:Q,isDownloading:X}=(0,y.X)(),{isCopied:Y,copyToClipboard:ee}=(0,C.C)({}),{isCopied:et,copyToClipboard:ea}=(0,C.C)({}),{deleteItem:es,isDeleting:er}=(0,S.E)({useInlineConfirm:!0,onSuccess:()=>{null==I||I(),ei(!1)},onError:e=>{console.error("Delete failed:",e)}}),el=void 0!==z?z:_,ei=e=>{R?R(e):G(e)},en=t.raw?(()=>{try{return JSON.parse(t.raw)}catch(e){return{}}})():{},eo=async()=>{try{let e="image-".concat(t.id||"unknown",".jpg");await Q(t.imgUrl,e)}catch(e){console.error("Download failed:",e)}},ed=(0,D.p)(en),ec=t.model?(0,k.$L)(t.model):void 0,em=!!t.model&&(0,k.zA)(t.model),eu=e=>{if(!e)return null;try{return new Date(e).toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}catch(e){return null}};return(0,A.useEffect)(()=>{B(null)},[t.imgUrl]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.lG,{open:el,onOpenChange:ei,children:[a&&(0,s.jsx)(i.zM,{asChild:!0,children:a}),(0,s.jsx)(i.Cf,{className:(0,w.cn)("max-w-5xl w-[95vw] sm:w-[90vw] h-[90vh] sm:h-[85vh] p-0","flex flex-col lg:block",T),children:(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row h-full",children:[(0,s.jsxs)("div",{className:"flex-1 flex items-center justify-center bg-muted/30 p-3 sm:p-6 lg:p-8 min-h-0 relative group/image",onTouchStart:null==$?void 0:$.onTouchStart,onTouchEnd:null==$?void 0:$.onTouchEnd,children:[H&&(0,s.jsx)(l.$,{variant:"ghost",size:"icon",className:(0,w.cn)("absolute left-2 sm:left-4 top-1/2 -translate-y-1/2 z-10","h-10 w-10 rounded-full bg-background/80 backdrop-blur-sm shadow-lg","opacity-0 group-hover/image:opacity-100 transition-opacity duration-200",!J&&"invisible"),onClick:F,disabled:!J,children:(0,s.jsx)(n.A,{className:"h-5 w-5"})}),H&&(0,s.jsx)(l.$,{variant:"ghost",size:"icon",className:(0,w.cn)("absolute right-2 sm:right-4 top-1/2 -translate-y-1/2 z-10","h-10 w-10 rounded-full bg-background/80 backdrop-blur-sm shadow-lg","opacity-0 group-hover/image:opacity-100 transition-opacity duration-200",!Z&&"invisible"),onClick:L,disabled:!Z,children:(0,s.jsx)(o.A,{className:"h-5 w-5"})}),(0,s.jsx)("div",{className:"relative w-full h-full max-w-2xl max-h-full",children:(0,s.jsx)(v.A,{src:t.imgUrl,alt:t.prompt||"Generated image",objectFit:"contain",fill:!0,className:"rounded-lg"})}),H&&W&&(0,s.jsxs)("div",{className:"absolute bottom-3 left-1/2 -translate-x-1/2 flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-background/90 backdrop-blur-sm shadow-lg text-xs text-muted-foreground animate-in fade-in duration-300",children:[(0,s.jsxs)("span",{className:"hidden sm:flex items-center gap-1.5",children:[(0,s.jsx)("kbd",{className:"px-1.5 py-0.5 rounded bg-muted font-mono text-[10px]",children:"←"}),(0,s.jsx)("kbd",{className:"px-1.5 py-0.5 rounded bg-muted font-mono text-[10px]",children:"→"}),(0,s.jsx)("span",{className:"ml-1",children:"to navigate"})]}),(0,s.jsx)("span",{className:"flex sm:hidden items-center gap-1",children:(0,s.jsx)("span",{children:"Swipe to navigate"})})]}),H&&(0,s.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 px-2.5 py-1 rounded-full bg-background/80 backdrop-blur-sm text-xs text-muted-foreground font-medium",children:[M+1," / ",V]})]}),(0,s.jsxs)("div",{className:"w-full lg:w-80 flex flex-col bg-background border-t lg:border-t-0 lg:border-l max-h-[40vh] lg:max-h-full",children:[(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto p-3 sm:p-4 pt-8 sm:pt-8 space-y-3 scrollbar-thin scrollbar-thumb-muted scrollbar-track-transparent",children:[ed.length>0&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs sm:text-sm font-medium",children:[(0,s.jsx)(d.A,{className:"h-3 w-3"}),"Source ",ed.length>1?"Images":"Image"]}),(0,s.jsx)("div",{className:"flex gap-1.5 flex-wrap",children:ed.map((e,t)=>(0,s.jsxs)("button",{type:"button",className:"relative w-16 h-16 sm:w-20 sm:h-20 flex-shrink-0 rounded overflow-hidden border border-border hover:border-primary/50 transition-colors cursor-pointer group/src bg-muted/50",onClick:()=>B(e),children:[(0,s.jsx)(v.A,{src:e,alt:"Source image ".concat(t+1),objectFit:"cover",fill:!0,className:"rounded"}),(0,s.jsx)("div",{className:"absolute inset-0 bg-black/0 group-hover/src:bg-black/20 transition-colors flex items-center justify-center",children:(0,s.jsx)(c.A,{className:"h-3 w-3 text-white opacity-0 group-hover/src:opacity-100 transition-opacity drop-shadow-lg"})})]},e))})]}),t.prompt&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs sm:text-sm font-medium",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(m.A,{className:"h-3 w-3"}),"Prompt"]}),(0,s.jsx)(l.$,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 hover:bg-muted flex-shrink-0",onClick:()=>ee(t.prompt||""),children:Y?(0,s.jsx)(u.A,{className:"h-3 w-3 text-green-600"}):(0,s.jsx)(x.A,{className:"h-3 w-3 text-muted-foreground"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed bg-muted/50 p-2 rounded max-h-20 sm:max-h-24 overflow-y-auto scrollbar-thin scrollbar-thumb-muted scrollbar-track-transparent",children:t.prompt}),t.prompt.length>150&&(0,s.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-3 sm:h-4 bg-gradient-to-t from-muted/50 to-transparent pointer-events-none rounded-b"})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs sm:text-sm font-medium",children:[(0,s.jsx)(h.A,{className:"h-3 w-3"}),"Technical Details"]}
1),(0,s.jsxs)("div",{className:"space-y-1.5 sm:space-y-2 text-xs",children:[ec&&(0,s.jsxs)("div",{className:"flex justify-between items-center gap-2",children:[(0,s.jsx)("span",{className:"text-muted-foreground flex-shrink-0",children:"Model"}),(0,s.jsxs)("div",{className:"flex items-center gap-1 flex-wrap justify-end",children:[(0,s.jsx)(r.E,{variant:"secondary",className:"text-[10px] sm:text-xs px-1 sm:px-1.5 py-0.5 truncate",children:ec}),em&&(0,s.jsx)(r.E,{variant:"outline",className:"text-[10px] sm:text-xs px-1 sm:px-1.5 py-0.5",children:"App"})]})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-muted-foreground flex-shrink-0",children:"Size"}),(0,s.jsx)("span",{className:"font-mono text-xs",children:t.width&&t.height?"".concat(t.width," \xd7 ").concat(t.height):"Unknown"})]}),en.seed&&(0,s.jsxs)("div",{className:"flex justify-between items-center gap-2",children:[(0,s.jsx)("span",{className:"text-muted-foreground flex-shrink-0",children:"Seed"}),(0,s.jsxs)(l.$,{variant:"ghost",size:"sm",className:"h-6 px-1 sm:px-2 font-mono hover:bg-muted/50 min-w-0 max-w-[120px]",onClick:()=>ea(en.seed.toString()),title:"Click to copy seed",children:[(0,s.jsx)("span",{className:"mr-1 truncate text-xs",children:en.seed}),et?(0,s.jsx)(u.A,{className:"h-3 w-3 text-green-600 flex-shrink-0"}):(0,s.jsx)(x.A,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"})]})]}),en.guidance_scale&&(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-muted-foreground flex-shrink-0",children:"Guidance"}),(0,s.jsx)("span",{className:"font-mono text-xs",children:en.guidance_scale})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-muted-foreground flex-shrink-0",children:"Visibility"}),(0,s.jsx)(r.E,{variant:1===t.isPublic?"default":"secondary",className:"text-[10px] sm:text-xs px-1 sm:px-1.5 py-0.5",children:1===t.isPublic?"Public":"Private"})]}),t.createdAt&&eu(t.createdAt)&&(0,s.jsxs)("div",{className:"flex justify-between items-center gap-2",children:[(0,s.jsx)("span",{className:"text-muted-foreground flex-shrink-0",children:"Created"}),(0,s.jsx)("span",{className:"font-mono text-xs truncate",children:eu(t.createdAt)})]})]})]}),!K&&(0,s.jsxs)("div",{className:"text-[10px] sm:text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 p-2 rounded leading-relaxed",children:["Generated images are stored for 7 days only."," ",(0,s.jsx)(N.N_,{href:"/pricing",className:"underline font-medium hover:text-amber-700 dark:hover:text-amber-300",children:"Upgrade to keep them permanently →"})]})]}),(0,s.jsxs)("div",{className:"p-3 sm:p-4 border-t space-y-3 sm:space-y-4 flex-shrink-0",children:[P&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h4",{className:"text-[10px] sm:text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Edit"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)(l.$,{variant:"outline",size:"sm",className:"justify-start text-xs h-8",onClick:()=>{let e=new URLSearchParams({image:t.imgUrl});t.width&&e.set("w",String(t.width)),t.height&&e.set("h",String(t.height)),window.open("/editor?".concat(e.toString()),"_blank")},children:[(0,s.jsx)(p.A,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-1"}),(0,s.jsx)("span",{className:"truncate",children:"Edit"})]}),(0,s.jsxs)(l.$,{variant:"outline",size:"sm",className:"justify-start text-xs h-8",onClick:()=>{let e={inputSrc:t.imgUrl,prompt:t.prompt};(0,E.k)(e),ei(!1)},children:[(0,s.jsx)(f.A,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-1"}),(0,s.jsx)("span",{className:"truncate",children:"Reuse"})]}),(0,s.jsxs)(l.$,{variant:"outline",size:"sm",className:"justify-start text-xs h-8",onClick:()=>window.open("/image-upscaler?imageUrl=".concat(encodeURIComponent(t.imgUrl)),"_blank"),children:[(0,s.jsx)(c.A,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-1"}),(0,s.jsx)("span",{className:"truncate",children:"Upscale"})]})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h4",{className:"text-[10px] sm:text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Actions"}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)(l.$,{variant:"outline",size:"sm",className:"justify-start text-xs h-8",onClick:()=>window.open(t.imgUrl,"_blank"),children:[(0,s.jsx)(g.A,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-1"}),(0,s.jsx)("span",{className:"truncate",children:"Open"})]}),(0,s.jsxs)(l.$,{variant:"outline",size:"sm",className:"justify-start text-xs h-8",onClick:eo,disabled:X,children:[(0,s.jsx)(j.A,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-1"}),(0,s.jsx)("span",{className:"truncate",children:X?"...":"Download"})]})]}),t.slug&&(0,s.jsx)(U,{onConfirm:()=>{t.slug&&es(t.slug)},isDeleting:er,title:"Delete Image",description:"Are you sure you want to delete this image? This action cannot be undone."})]})]})]})]})]})})]}),(0,s.jsx)(i.lG,{open:!!O,onOpenChange:e=>!e&&B(null),children:(0,s.jsx)(i.Cf,{className:"max-w-3xl w-[90vw] p-2 sm:p-4",onEscapeKeyDown:e=>e.stopPropagation(),children:(0,s.jsx)("div",{className:"flex items-center justify-center",children:O&&(0,s.jsx)("img",{src:O,alt:"Source image preview",className:"max-w-full max-h-[80vh] object-contain rounded"})})})})]})}},62454:(e,t,a)=>{a.d(t,{C:()=>i,s:()=>n});var s=a(6084),r=a(92712);let l=(0,r.createContext)(void 0),i=e=>{let{children:t}=e,[a,i]=(0,r.useState)(!1);return(0,s.jsx)(l.Provider,{value:{isOpen:a,openDialog:()=>i(!0),closeDialog:()=>i(!1)},children:t})},n=()=>{let e=(0,r.useContext)(l);if(void 0===e)throw Error("useDialog must be used within a DialogProvider");return e}},67138:(e,t,a)=>{a.d(t,{A:()=>n});var s=a(6084),r=a(92712),l=a(97477),i=a(26647);let n=e=>{let{src:t,alt:a,className:n,objectFit:o="cover",fill:d=!0,width:c,height:m}=e,[u,x]=(0,r.useState)(!0);return(0,s.jsxs)("div",{className:"relative ".concat(d?"w-full h-full":""),children:[u&&(0,s.jsx)(i.E,{className:"".concat(d?"w-full h-full absolute inset-0":"w-[".concat(c,"px] h-[").concat(m,"px]")," rounded-none")}),(0,s.jsx)(l.default,{className:"".concat({cover:"object-cover",contain:"object-contain",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[o]," transition-opacity duration-300 ").concat(u?"opacity-0":"opacity-100"," ").concat(n||""),src:t,alt:a,...d?{fill:!0,sizes:"(max-width: 640px) 100v
1w, (max-width: 1024px) 33vw, 25vw"}:{width:c||500,height:m||500},loading:"lazy",onLoad:()=>x(!1)})]})}},71148:(e,t,a)=>{a.d(t,{C:()=>r});var s=a(92712);function r(e){let{timeout:t=2e3}=e,[a,r]=s.useState(!1);return{isCopied:a,copyToClipboard:e=>{var a;(null==(a=navigator.clipboard)?void 0:a.writeText)&&e&&navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>{r(!1)},t)})}}}}}]);

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.