PageSourceSearch

https://escortadvisor-b4fe68rl.manus.space/assets/AdminWatermark-DRD-jdI4.js

js escortadvisor-b4fe68rl.manus.space collected 2026-10-03 05:02:11 UTC 59,027 bytes, 6 lines download raw bytes

1import{c as St,f as At,r as s,t as x,q as a,j as e,ai as Ve,L as Ze,B as y,N as Bt,_ as me,Z as Y,Y as tt,aw as Ie,x as f,ah as g,a8 as Ye,y as I,E as Ee,aN as st,F as It}from"./index-cscxoOf9.js";import{H as Ft}from"./house-D9Fl8VQV.js";import{W as Z}from"./wand-sparkles-hKU6W8Cl.js";import{R as _}from"./refresh-cw-D0KbhpJJ.js";import{I as Pe}from"./image-L1fPJnCE.js";import{C as B}from"./circle-x-DHp6YeSD.js";import{W as Et}from"./wrench-DnatkTZZ.js";/**
2 * @license lucide-react v0.453.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Fe=St("GalleryHorizontal",[["path",{d:"M2 3v18",key:"pzttux"}],["rect",{width:"12",height:"18",x:"6",y:"3",rx:"2",key:"btr8bg"}],["path",{d:"M22 3v18",key:"6jf3v"}]]);function Pt({src:d,alt:m,className:p}){const[i,h]=s.useState("loading"),[n,N]=s.useState(`/api/img-proxy?url=${encodeURIComponent(d)}`);return e.jsxs("div",{className:"relative w-full h-full",children:[i==="loading"&&e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-1.5 bg-[#0f1117]",children:[e.jsx(g,{className:"w-5 h-5 text-white/20 animate-spin"}),e.jsx("span",{className:"text-[9px] text-white/20 font-['Nunito']",children:"Caricamento..."})]}),i==="puppeteer"&&e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-1.5 bg-[#0f1117] z-10",children:[e.jsx(g,{className:"w-5 h-5 text-[#2F7F88]/60 animate-spin"}),e.jsx("span",{className:"text-[9px] text-[#2F7F88]/60 font-['Nunito']",children:"Browser..."})]}),i==="error"&&e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-1.5 bg-[#0f1117]",children:[e.jsx(Pe,{className:"w-6 h-6 text-white/10"}),e.jsx("span",{className:"text-[9px] text-white/15 font-['Nunito'] text-center px-1",children:"Non disponibile"})]}),e.jsx("img",{src:n,alt:m,className:`${p??""} ${i==="ok"?"opacity-100":"opacity-0"} transition-opacity duration-300 absolute inset-0`,onLoad:()=>h("ok"),onError:()=>{i==="loading"?(h("puppeteer"),N(`/api/img-fetch?url=${encodeURIComponent(d)}`)):h("error")}})]})}function et({originalUrl:d,cleanUrl:m,method:p}){const[i,h]=s.useState(50),[n,N]=s.useState(!1),F=s.useRef(null),C=s.useCallback(b=>{if(!F.current)return;const E=F.current.getBoundingClientRect(),ee=Math.max(0,Math.min(b-E.left,E.width));h(Math.round(ee/E.width*100))},[]),W=b=>{N(!0),C(b.clientX)},O=s.useCallback(b=>{n&&C(b.clientX)},[n,C]),j=s.useCallback(()=>N(!1),[]),ue=b=>{N(!0),C(b.touches[0].clientX)},k=s.useCallback(b=>{n&&C(b.touches[0].clientX)},[n,C]);return s.useEffect(()=>(window.addEventListener("mousemove",O),window.addEventListener("mouseup",j),window.addEventListener("touchmove",k),window.addEventListener("touchend",j),()=>{window.removeEventListener("mousemove",O),window.removeEventListener("mouseup",j),window.removeEventListener("touchmove",k),window.removeEventListener("touchend",j)}),[O,j,k]),e.jsxs("div",{className:"mt-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-xs text-white/50 font-['Nunito'] font-semibold uppercase tracking-wider",children:"Confronto Prima / Dopo — trascina lo slider"}),e.jsxs("div",{className:"flex items-center gap-2",children:[p&&e.jsx(he,{method:p}),e.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-[#07793e] hover:text-[#07793e] font-['Nunito'] font-semibold transition-colors",children:[e.jsx(st,{className:"w-3 h-3"}),"Apri originale"]})]})]}),e.jsxs("div",{ref:F,className:"relative rounded-xl overflow-hidden bg-black/20 aspect-[4/3] cursor-col-resize select-none",onMouseDown:W,onTouchStart:ue,children:[e.jsx("img",{src:m,alt:"Dopo (pulita)",className:"absolute inset-0 w-full h-full object-cover",draggable:!1}),e.jsxs("div",{className:"absolute inset-0 overflow-hidden",style:{clipPath:`inset(0 ${100-i}% 0 0)`},children:[e.jsx("img",{src:d,alt:"Prima (con watermark)",className:"absolute inset-0 w-full h-full object-cover",draggable:!1}),e.jsx("div",{className:"absolute top-2 left-2 px-2 py-1 bg-black/70 rounded-lg text-[10px] font-['Nunito'] font-bold text-white/80 uppercase tracking-wider",children:"Prima"})]}),e.jsx("div",{className:"absolute top-0 bottom-0 w-0.5 bg-[#0f1117]/80 shadow-[0_0_8px_rgba(255,255,255,0.6)] pointer-events-none",style:{left:`${i}%`}}),e.jsx("div",{className:"absolute top-1/2 -translate-y-1/2 -translate-x-1/2 w-8 h-8 rounded-full bg-[#0f1117] shadow-lg flex items-center justify-center pointer-events-none",style:{left:`${i}%`},children:e.jsxs("div",{className:"flex gap-0.5",children:[e.jsx(me,{className:"w-3 h-3 text-white/60"}),e.jsx(Ee,{className:"w-3 h-3 text-white/60"})]})}),e.jsx("div",{className:"absolute top-2 right-2 px-2 py-1 bg-black/70 rounded-lg text-[10px] font-['Nunito'] font-bold text-[#6DBF8A] uppercase tracking-wider",children:"Dopo"})]}),p==="sharp"&&e.jsx("p",{className:"text-xs text-[#C28B2C]/70 font-['Nunito']",children:"⚠ Elaborato con fallback Sharp — sia AI Manus che Novita.ai non erano disponibili. Il watermark potrebbe essere solo attenuato."}),p==="novita"&&e.jsx("p",{className:"text-xs text-blue-400/70 font-['Nunito']",children:"ℹ Elaborato con Novita.ai inpainting — AI Manus non disponibile, usato livello 2."})]})}function Mt({profileId:d,skipRebrand:m,onResult:p}){const i=x.watermark.removeEABrandingFromProfile.useMutation({onSuccess:n=>{p(n);const N=m?"Marchio EA rimosso":"Marchio EA riapplicato";a.success(`${N}: ${n.succeeded}/${n.processed} foto per "${n.name}"`)},onError:n=>a.error(`Errore: ${n.message}`)}),h=()=>{const n=parseInt(d,10);if(!n||isNaN(n)){a.warning("Inserisci un ID profilo valido");return}i.mutate({profileId:n,skipRebrand:m})};return e.jsxs(y,{onClick:h,disabled:i.isPending||!d,className:`w-full font-['Nunito'] font-bold rounded-xl ${m?"bg-gradient-to-r from-[#C28B2C] to-orange-600 hover:from-amber-400 hover:to-orange-500":"bg-gradient-to-r from-[#07793e] to-[#6B2D52] hover:from-pink-400 hover:to-[#7A3060]"} text-white border-0`,children:[i.isPending?e.jsx(g,{className:"w-4 h-4 animate-spin mr-2"}):e.jsx(I,{className:"w-4 h-4 mr-2"}),i.isPending?"Riprocessamento in corso...":m?"Rimuovi Marchio EA":"Riapplica Marchio EA"]})}function he({method:d}){return d==="ai"?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-[#3D8B5A]/20 border border-green-500/40 text-[#6DBF8A] text-[10px] font-['Nunito'] font-bold",children:[e.jsx(I,{className:"w-2.5 h-2.5"}),"AI Manus"]}
6):d==="novita"?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-blue-500/20 border border-blue-500/40 text-blue-400 text-[10px] font-['Nunito'] font-bold",children:[e.jsx(Y,{className:"w-2.5 h-2.5"}),"Novita.ai"]}):e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-[#C28B2C]/20 border border-[#C28B2C]/40 text-[#C28B2C] text-[10px] font-['Nunito'] font-bold",children:[e.jsx(Et,{className:"w-2.5 h-2.5"}),"Fallback Sharp"]})}function Rt({processed:d,total:m,succeeded:p,failed:i}){const h=m>0?Math.round(d/m*100):0;return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs font-['Nunito']",children:[e.jsxs("span",{className:"text-white/60",children:[e.jsx(tt,{className:"w-3 h-3 inline mr-1"}),"Elaborazione in corso... ",d,"/",m," foto"]}),e.jsxs("span",{className:"text-white/40",children:[h,"%"]})]}),e.jsx("div",{className:"w-full h-2 bg-[#0f1117]/10 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-[#2F7F88] to-[#07793e] rounded-full transition-all duration-500",style:{width:`${h}%`}})}),e.jsxs("div",{className:"flex gap-4 text-xs font-['Nunito']",children:[e.jsxs("span",{className:"text-[#6DBF8A]",children:["✓ ",p," ok"]}),e.jsxs("span",{className:"text-red-400",children:["✗ ",i," falliti"]}),e.jsxs("span",{className:"text-white/30",children:[m-d," rimanenti"]})]})]})}function _t(){const{user:d,isAuthenticated:m,loading:p}=At(),[i,h]=s.useState("avatar"),[n,N]=s.useState(""),[F,C]=s.useState(""),[W,O]=s.useState(""),[j,ue]=s.useState(!1),[k,b]=s.useState(null),E=x.watermark.reprocessS3Image.useMutation({onSuccess:t=>{b({cleanUrl:t.cleanUrl,originalUrl:t.originalUrl,method:t.method});const r=t.method==="ai"?"AI Manus":t.method==="novita"?"Novita.ai":"Fallback Sharp";a.success(`Immagine S3 riprocessata! (metodo: ${r}) — DB aggiornato`)},onError:t=>a.error(`Errore riprocessamento: ${t.message}`)}),[ee,at]=s.useState(""),[fe,ot]=s.useState(!1),[L,it]=s.useState(null),[J,te]=s.useState(0),Q=30,[P,S]=s.useState(new Set),[U,Me]=s.useState(!1),[pe,be]=s.useState(null),[G,se]=s.useState(!1),{data:o}=x.watermark.getBatchJobStatus.useQuery({jobId:pe},{enabled:pe!==null&&!G,refetchInterval:3e3});s.useEffect(()=>{if(!(!o||G)&&(o.status==="completed"||o.status==="failed"))if(se(!0),o.status==="completed"){const t=Array.isArray(o.results)?o.results:[],r=t.filter(z=>z.success&&z.method==="ai").length,c=t.filter(z=>z.success&&z.method==="sharp").length;let $=`Batch completato: ${o.succeeded} successi, ${o.failed} falliti`;(r>0||c>0)&&($+=` (AI: ${r}, Fallback: ${c})`),a.success($),S(new Set),Oe()}else a.error(`Batch fallito: ${o.errorMessage??"Errore sconosciuto"}`)},[o?.status,G]);const q=pe!==null&&!G&&(o?.status==="pending"||o?.status==="running"),[H,Re]=s.useState(0),X=20,[M,T]=s.useState(new Set),[De,$e]=s.useState(null),[ge,rt]=s.useState(null),[ae,nt]=s.useState(""),[oe,ze]=s.useState(null),[Ne,lt]=s.useState(20),[Le,ct]=s.useState(""),[Ue,dt]=s.useState(""),[je,xt]=s.useState(!1),[Ge,Te]=s.useState(null),[w,K]=s.useState("idle"),[v,_e]=s.useState({processed:0,total:0,succeeded:0,failed:0}),{data:u,refetch:mt}=x.watermark.getWatermarkCounts.useQuery(void 0,{refetchInterval:6e4}),we=x.watermark.triggerSchedulerNow.useMutation({onSuccess:()=>a.success("Ciclo watermark avviato! Le foto verranno elaborate nelle prossime ore."),onError:t=>a.error(`Errore: ${t.message}`)}),{data:We,isLoading:ht,refetch:Oe}=x.watermark.getProfilesWithExternalImages.useQuery({limit:Q,offset:J*Q,showProcessed:U}),{data:Je,isLoading:ut,refetch:ve}=x.watermark.getProfilesWithExternalGallery.useQuery({limit:X,offset:H*X}),{data:ye}=x.watermark.getGalleryPhotos.useQuery({profileId:ge},{enabled:ge!==null}),V=We?.profiles??[],ie=We?.total??0,Ce=Math.ceil(ie/Q),re=Je?.profiles??[],ne=Je?.total??0,ke=Math.ceil(ne/X),le=x.watermark.removeOne.useMutation({onSuccess:t=>{ze({cleanUrl:t.cleanUrl,originalUrl:t.originalUrl,method:t.method});const r=t.method==="ai"?"AI Manus":t.method==="novita"?"Novita.ai":"Fallback Sharp";a.success(`Watermark rimosso con successo! (metodo: ${r})`)},onError:t=>a.error(`Errore: ${t.message}`)}),ce=x.watermark.processBatch.useMutation({onSuccess:t=>{be(t.jobId),se(!1),a.info(`Batch avviato: ${t.total} foto in elaborazione...`)},onError:t=>a.error(`Errore avvio batch: ${t.message}`)}),de=x.watermark.processGalleryBulk.useMutation({onSuccess:t=>{$e(t.profileResults),a.success(`Galleria: ${t.totalSucceeded} foto pulite, ${t.totalFailed} fallite`),T(new Set),ve()},onError:t=>a.error(`Errore batch galleria: ${t.message}`)}),Se=x.watermark.processGalleryBatch.useMutation({onSuccess:t=>{a.success(`Profilo: ${t.succeeded} foto pulite, ${t.failed} fallite`),ve()},onError:t=>a.error(`Errore: ${t.message}`)}),Ae=x.watermark.reprocessProfiles.useMutation({onSuccess:t=>{if(!t.jobId){a.warning(t.message),K("idle");return}Te(t.jobId),K("running"),_e({processed:0,total:t.total,succeeded:0,failed:0}),a.success(`${t.message} — polling in corso...`)},onError:t=>{a.error(`Errore: ${t.message}`),K("idle")}}),[xe,ft]=s.useState(""),[Qe,pt]=s.useState(1),[qe,bt]=s.useState(""),[He,gt]=s.useState(10),[Xe,Nt]=s.useState(""),[Ke,jt]=s.useState(""),A=x.watermark.generateProfilePhoto.useMutation({onSuccess:t=>{a.success(`${t.urls.length} foto generate per profilo #${t.profileId}`)},onError:t=>a.error(`Errore generazione: ${t.message}`)}),R=x.watermark.generateMissingPhotos.useMutation({onSuccess:t=>{a.success(t.message)},onError:t=>a.error(`Errore batch: ${t.message}`)}),D=x.watermark.getReprocessJobStatus.useQuery({jobId:Ge},{enabled:w==="running"&&!!Ge,refetchInterval:w==="running"?2e3:!1});s.useEffect(()=>{if(!D.data)return;const t=D.data;_e({processed:t.processed,total:t.total,succeeded:t.succeeded,failed:t.failed}),(t.status==="done"||t.status==="error")&&(K(t.status),t.status==="done"?a.success(`Riprocessamento completato: ${t.succeeded}/${t.total} profili ok`):a.error("Riprocessamento terminato con errori"))},[D.data]);const wt=t=>{S(r=>{const c=new Set(r);return c.has(t)?c.delete(t):c.size<50?c.add(t):a.warning("Puoi selezionare al massimo 50 profili alla volta"),c})},vt=t=>{T(r=>{const c=new Set(r);return c.has(t)?c.delete(t):c.size<10?c.add(t):a.warning("Puoi selezionare al massimo 10 profili alla volta per la galleria"),c})},yt=()=>{ae.trim()&&(ze(null),le.mutate({imageUrl:ae.trim()}))},[l,Ct]=s.useState(null),Be=x.watermark.testNovitaConnection.useMutation({onSuccess:t=>{Ct(t),t.success?a.success("Novita.ai connessa correttamente!"):a.error(`Novita.ai non disponibile: ${t.error}`)},onError:t=>a.error(`Errore test Novita.ai: ${t.message}`)}),kt=()=>{be(null),se(!1),ce.mutate({profileIds:Array.from(P)})};return p?e.jsx("div",{className:"min-h-screen bg-[#0a0a14] flex items-center justify-center pb-nav",children:e.jsx("div",{className:"w-10 h-10 border-2 border-[#07793e]/30 border-t-[#07793e] rounded-full animate-spin"})}):!m||d?.role!=="admin"&&d?.role!=="superadmin"?e.jsx("div",{className:"min-h-screen bg-[#0a0a14] flex items-center justify-center pb-nav",children:e.jsxs("div",{className:"text-center",children:[e.jsx(Ve,{className:"w-16 h-16 text-red-400 mx-auto mb-4"}),e.jsx("h1",{className:"font-['Nunito'] font-bold text-2xl text-white mb-2",children:"Accesso negato"}),e.jsx(Ze,{href:"/",children:e.jsxs(y,{className:"bg-gradient-to-r from-[#07793e] to-[#246068] text-white border-0 font-['Nunito'] font-bold rounded-xl",children:[e.jsx(Ft,{className:"w-4 h-4 mr-2"}),"Torna alla homepage"]})})]})}):e.jsxs("div",{className:"min-h-screen bg-[#0a0a14] flex flex-col pb-nav pt-[94px]",children:[e.jsx(Bt,{}),e.jsxs("main",{className:"flex-1 container py-10 space-y-8",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx(Ze,{href:"/admin",children:e.jsx("button",{className:"text-white/40 hover:text-white/70 transition-colors",children:e.jsx(me,{className:"w-5 h-5"})})}),e.jsx(Z,{className:"w-5 h-5 text-[#5BBAC5]"}),e.jsx("h1",{className:"font-['Nunito'] font-bold text-2xl text-white",children:"Rimozione Watermark"})]}),e.jsx("p",{className:"text-sm text-white/40 font-['Nunito'] ml-8",children:"Rimuovi automaticamente i watermark dalle foto importate tramite scraping usando AI"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>we.mutate(),disabled:we.isPending,className:"flex items-center gap-2 px-4 py-2 bg-[#2F7F88]/20 hover:bg-[#2F7F88]/30 border border-[#2F7F88]/30 rounded-xl text-sm text-[#7DCDD6] hover:text-[#A7D8E0] transition-all font-['Nunito'] disabled:opacity-50",children:[e.jsx(Y,{className:"w-4 h-4"}),we.isPending?"Avvio...":"Avvia ciclo ora"]}),e.jsxs("button",{onClick:()=>{Oe(),ve(),mt()},className:"flex items-center gap-2 px-4 py-2 bg-[#0f1117]/5 hover:bg-[#0f1117]/10 border border-white/10 rounded-xl text-sm text-white/60 hover:text-white transition-all font-['Nunito']",children:[e.jsx(_,{className:"w-4 h-4"}),"Aggiorna"]})]})]}),e.jsxs("div",{className:"bg-[#C28B2C]/10 border border-[#C28B2C]/20 rounded-2xl p-4 flex items-start gap-3",children:[e.jsx(Y,{className:"w-5 h-5 text-[#C28B2C] flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-[#D9A84A] font-['Nunito'] font-semibold mb-1",children:"Come funziona"}),e.jsx("p",{className:"text-sm text-white/50 font-['Nunito'] leading-relaxed",children:"L'AI analizza ogni foto e rimuove watermark, loghi, URL e testi sovrapposti, ricostruend
6o naturalmente lo sfondo. Il batch viene elaborato in background (3 foto alla volta) e puoi seguire il progresso in tempo reale. Se l'AI non è disponibile, viene usato automaticamente il metodo Fallback (Sharp)."}),e.jsxs("div",{className:"flex items-center gap-3 mt-2.5",children:[e.jsx("span",{className:"text-xs text-white/40 font-['Nunito']",children:"Metodo:"}),e.jsx(he,{method:"ai"}),e.jsx("span",{className:"text-xs text-white/40 font-['Nunito']",children:"Rimozione completa con AI"}),e.jsx(he,{method:"sharp"}),e.jsx("span",{className:"text-xs text-white/40 font-['Nunito']",children:"Attenuazione con Sharp (AI non disponibile)"})]})]})]}),e.jsxs("div",{className:"bg-[#161A1E] border border-white/8 rounded-2xl p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h2",{className:"font-['Nunito'] font-bold text-base text-white flex items-center gap-2",children:[e.jsx(tt,{className:"w-4 h-4 text-[#5BBAC5]"}),"Scheduler Automatico (ogni ora)"]}),e.jsx("span",{className:"text-xs text-white/40 font-['Nunito']",children:"Aggiornamento ogni 60s"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-[#0f1117]/5 rounded-xl p-4 border border-white/8",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(Ie,{className:"w-4 h-4 text-[#07793e]"}),e.jsx("span",{className:"text-xs font-['Nunito'] font-semibold text-white/70 uppercase tracking-wider",children:"Copertine"})]}),e.jsx("div",{className:"text-2xl font-['Nunito'] font-bold text-white",children:u?u.avatarCount.toLocaleString("it-IT"):"—"}),e.jsx("div",{className:"text-xs text-white/40 font-['Nunito'] mt-1",children:"profili con foto copertina esterna"})]}),e.jsxs("div",{className:"bg-[#0f1117]/5 rounded-xl p-4 border border-white/8",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(Pe,{className:"w-4 h-4 text-[#C28B2C]"}),e.jsx("span",{className:"text-xs font-['Nunito'] font-semibold text-white/70 uppercase tracking-wider",children:"Foto JSON"})]}),e.jsx("div",{className:"text-2xl font-['Nunito'] font-bold text-white",children:u?u.photosCount.toLocaleString("it-IT"):"—"}),e.jsx("div",{className:"text-xs text-white/40 font-['Nunito'] mt-1",children:"profili con foto interne esterne"})]}),e.jsxs("div",{className:"bg-[#0f1117]/5 rounded-xl p-4 border border-white/8",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(Fe,{className:"w-4 h-4 text-[#5BBAC5]"}),e.jsx("span",{className:"text-xs font-['Nunito'] font-semibold text-white/70 uppercase tracking-wider",children:"Galleria"})]}),e.jsx("div",{className:"text-2xl font-['Nunito'] font-bold text-white",children:u?u.galleryCount.toLocaleString("it-IT"):"—"}),e.jsx("div",{className:"text-xs text-white/40 font-['Nunito'] mt-1",children:"foto galleria escort_media esterne"})]})]}),u&&u.avatarCount+u.photosCount+u.galleryCount===0&&e.jsxs("div",{className:"mt-4 flex items-center gap-2 text-[#6DBF8A] text-sm font-['Nunito']",children:[e.jsx(f,{className:"w-4 h-4"}),"Tutte le foto sono già state elaborate!"]})]}),e.jsxs("div",{className:"bg-[#161A1E] border border-white/8 rounded-2xl p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("h2",{className:"font-['Nunito'] font-bold text-base text-white flex items-center gap-2",children:[e.jsx(Y,{className:"w-4 h-4 text-blue-400"}),"Diagnostica Novita.ai"]}),e.jsxs(y,{onClick:()=>Be.mutate(),disabled:Be.isPending,className:"bg-blue-600/20 hover:bg-blue-600/30 text-blue-300 border border-blue-500/30 font-['Nunito'] font-semibold rounded-xl text-sm px-4 py-2 h-auto",children:[Be.isPending?e.jsx(g,{className:"w-3.5 h-3.5 animate-spin mr-1.5"}):e.jsx(f,{className:"w-3.5 h-3.5 mr-1.5"}),"Testa Connessione"]})]}),l&&e.jsx("div",{className:`rounded-xl p-4 border ${l.success?"bg-[#3D8B5A]/10 border-[#3D8B5A]/20":"bg-red-500/10 border-red-500/20"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[l.success?e.jsx(f,{className:"w-5 h-5 text-[#6DBF8A] flex-shrink-0 mt-0.5"}):e.jsx(B,{className:"w-5 h-5 text-red-400 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("p",{className:`text-sm font-['Nunito'] font-bold ${l.success?"text-[#8DD4A0]":"text-red-300"}`,children:l.success?"Novita.ai operativa":"Novita.ai non disponibile"}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs font-['Nunito']",children:[e.jsx("span",{className:"text-white/40",children:"API Key configurata:"}),e.jsx("span",{className:l.configured?"text-[#6DBF8A]":"text-red-400",children:l.configured?"Sì":"No"}),e.jsx("span",{className:"text-white/40",children:"Lunghezza chiave:"}),e.jsxs("span",{className:"text-white/70",children:[l.apiKeyLength," caratteri"]}),e.jsx("span",{className:"text-white/40",children:"Anteprima chiave:"}),e.jsx("span",{className:"text-white/70 font-mono",children:l.apiKeyPreview}),l.details?.statusCode&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-white/40",children:"HTTP Status:"}),e.jsx("span",{className:"text-white/70",children:l.details.statusCode})]}),l.details?.modelCount!==void 0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-white/40",children:"Modelli disponibili:"}),e.jsx("span",{className:"text-[#6DBF8A]",children:l.details.modelCount})]})]}),l.error&&e.jsx("div",{className:"mt-2 p-2 bg-red-500/10 rounded-lg",children:e.jsxs("p",{className:"text-xs text-red-300 font-['Nunito'] break-all",children:[e.jsx("strong",{children:"Errore:"})," ",l.error]})}),!l.success&&!l.configured&&e.jsx("p",{className:"text-xs text-[#C28B2C]/80 font-['Nunito'] mt-1",children:"⚠ Imposta la variabile d'ambiente NOVITA_API_KEY nel pannello Segreti del progetto."})]})]})}),!l&&e.jsx("p",{className:"text-xs text-white/30 font-['Nunito']",children:'Clicca "Testa Connessione" per verificare se Novita.ai è configurata e raggiungibile. Se non è disponibile, il sistema usa automaticamente il fallback Sharp.'})]}),e.jsxs("div",{className:"bg-[#161A1E] border border-white/8 rounded-2xl p-6",children:[e.jsxs("h2",{className:"font-['Nunito'] font-bold text-lg text-white mb-4 flex items-center gap-2",children:[e.jsx(Ye,{className:"w-5 h-5 text-[#07793e]"}),"Test su singola immagine"]}),e.jsxs("div",{className:"flex gap-3 mb-4",children:[e.jsx("input",{type:"url",placeholder:"Incolla l'URL dell'immagine da testare...",value:ae,onChange:t=>nt(t.target.value),className:"flex-1 px-4 py-2.5 bg-[#0f1117] border border-white/10 rounded-xl text-sm text-white placeholder:text-white/30 focus:outline-none focus:border-[#07793e]/40 font-['Nunito']"}),e.jsxs(y,{onClick:yt,disabled:!ae.trim()||le.isPending,className:"bg-gradient-to-r from-[#07793e] to-[#246068] hover:from-[#A84A80] hover:to-[#2F7F88] text-white border-0 font-['Nunito'] font-bold rounded-xl px-6",children:[le.isPending?e.jsx(g,{className:"w-4 h-4 animate-spin mr-2"}):e.jsx(Z,{className:"w-4 h-4 mr-2"}),le.isPending?"Elaborazione...":"Rimuovi Watermark"]})]}),oe&&e.jsx(et,{originalUrl:oe.originalUrl,cleanUrl:oe.cleanUrl,method:oe.method})]}),e.jsxs("div",{className:"flex gap-1 bg-[#161A1E] border border-white/8 rounded-2xl p-1.5",children:[e.jsxs("button",{onClick:()=>h("avatar"),className:`flex-1 flex items-center justify-center gap-2 py-2.5 rounded-xl font-['Nunito'] font-semibold text-sm transition-all ${i==="avatar"?"bg-gradient-to-r from-[#07793e] to-[#246068] text-white shadow-lg":"text-white/50 hover:text-white/80"}`,children:[e.jsx(Ie,{className:"w-4 h-4"}),"Avatar (",ie,")"]}),e.jsxs("button",{onClick:()=>h("gallery"),className:`flex-1 flex items-center justify-center gap-2 py-2.5 rounded-xl font-['Nunito'] font-semibold text-sm transition-all ${i==="gallery"?"bg-gradient-to-r from-[#07793e] to-[#246068] text-white shadow-lg":"text-white/50 hover:text-white/80"}`,children:[e.jsx(Fe,{className:"w-4 h-4"}),"Foto Galleria (",ne,")"]}),e.jsxs("button",{onClick:()=>h("ea-branding"),className:`flex-1 flex items-center justify-center gap-2 py-2.5 rounded-xl font-['Nunito'] font-semibold text-sm transition-all ${i==="ea-branding"?"bg-gradient-to-r from-[#07793e] to-[#6B2D52] text-white shadow-lg":"text-white/50 hover:text-white/80"}`,children:[e.jsx(I,{className:"w-4 h-4"}),"Marchio EA"]}),e.jsxs("button",{onClick:()=>h("reprocess-s3"),className:`flex-1 flex items-center justify-center gap-2 py-2.5 rounded-xl font-['Nunito'] font-semibold text-sm transition-all ${i==="reprocess-s3"?"bg-gradient-to-r from-[#C28B2C] to-orange-600 text-white shadow-lg":"text-white/50 hover:text-white/80"}`,children:[e.jsx(_,{className:"w-4 h-4"}),"Riprocessa S3"]})]}),i==="avatar"&&e.jsxs("div",{className:"bg-[#161A1E] border border-white/8 rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsxs("h2",{className:"font-['Nunito'] font-bold text-lg text-white flex items-center gap-2",children:[e.jsx(Ie,{className:"w-5 h-5 text-[#07793e]"}),U?"Profili già elaborati (CloudFront)":"Profili con avatar esterno",P.size>0&&e.jsxs("span",{className:"ml-2 px-2.5 py-0.5 bg-[#2F7F88]/20 text-[#5BBAC5] border border-[#2F7F88]/30 rounded-full text-sm font-bold",children:[P.size," selezionati"]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1 bg-[#0f1117]/5 border border-white/10 rounded-xl p-1",children:[e.jsxs("button",{onClick:()=>{Me(!1),te(0),S(new Set)},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-['Nunito'] font-semibold transition-all ${U?"text-white/40 hover:text-white/70":"bg-[#07793e] text-white shadow-sm"}`,children:["Da elaborare",e.jsx("span",{className:`inline-flex items-center justify-center min-w-[1.4rem] h-[1.4rem] px-1 rounded-full text-[10px] font-bold ${U?"bg-[#0f1117]/10 text-white/50":"bg-[#0f1117]/20 text-white"}
6`,children:u?u.avatarCount.toLocaleString("it-IT"):"…"})]}),e.jsxs("button",{onClick:()=>{Me(!0),te(0),S(new Set)},className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-['Nunito'] font-semibold transition-all ${U?"bg-[#2F7F88] text-white shadow-sm":"text-white/40 hover:text-white/70"}`,children:["Già elaborati",e.jsx("span",{className:`inline-flex items-center justify-center min-w-[1.4rem] h-[1.4rem] px-1 rounded-full text-[10px] font-bold ${U?"bg-[#0f1117]/20 text-white":"bg-[#0f1117]/10 text-white/50"}`,children:u?u.avatarProcessedCount?.toLocaleString("it-IT")??"…":"…"})]})]}),P.size>0&&!q&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>S(new Set),className:"px-3 py-1.5 bg-[#0f1117]/5 hover:bg-[#0f1117]/10 border border-white/10 rounded-lg text-xs text-white/60 transition-all font-['Nunito']",children:"Deseleziona tutto"}),e.jsxs(y,{onClick:kt,disabled:ce.isPending,className:"bg-gradient-to-r from-[#2F7F88] to-[#07793e] hover:from-[#5BBAC5] hover:to-[#07793e] text-white border-0 font-['Nunito'] font-bold rounded-xl text-sm",children:[ce.isPending?e.jsx(g,{className:"w-4 h-4 animate-spin mr-2"}):e.jsx(Z,{className:"w-4 h-4 mr-2"}),ce.isPending?"Avvio...":`Rimuovi watermark (${P.size})`]})]}),P.size===0&&!q&&V.length>0&&e.jsxs("button",{onClick:()=>S(new Set(V.map(t=>t.id).slice(0,50))),className:"px-3 py-1.5 bg-[#2F7F88]/15 hover:bg-[#2F7F88]/25 border border-[#2F7F88]/25 rounded-lg text-xs text-[#5BBAC5] transition-all font-['Nunito'] font-semibold",children:["Seleziona tutti (",Math.min(V.length,50),")"]})]})]}),q&&o&&e.jsx("div",{className:"mb-5 bg-[#2F7F88]/10 border border-[#2F7F88]/20 rounded-xl p-4",children:e.jsx(Rt,{processed:o.processed,total:o.total,succeeded:o.succeeded,failed:o.failed})}),G&&o&&o.status==="completed"&&Array.isArray(o.results)&&o.results.length>0&&e.jsxs("div",{className:"mb-5 bg-[#0f1117] border border-white/8 rounded-xl p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("p",{className:"text-sm font-['Nunito'] font-bold text-white",children:["Risultati batch — ",o.succeeded," successi, ",o.failed," falliti"]}),e.jsx("button",{onClick:()=>{be(null),se(!1)},className:"text-xs text-white/30 hover:text-white/60 font-['Nunito'] transition-colors",children:"Chiudi"})]}),e.jsx("div",{className:"space-y-1.5 max-h-48 overflow-y-auto",children:(o.results??[]).map(t=>e.jsxs("div",{className:"flex items-center gap-2 text-sm font-['Nunito']",children:[t.success?e.jsx(f,{className:"w-4 h-4 text-[#6DBF8A] flex-shrink-0"}):e.jsx(B,{className:"w-4 h-4 text-red-400 flex-shrink-0"}),e.jsx("span",{className:t.success?"text-white/80":"text-white/40",children:t.name}),t.success&&t.method&&e.jsx(he,{method:t.method}),!t.success&&t.error&&e.jsxs("span",{className:"text-white/30 text-xs",children:["— ",t.error]}),t.success&&t.cleanUrl&&e.jsx("a",{href:t.cleanUrl,target:"_blank",rel:"noopener noreferrer",className:"text-[#6DBF8A] hover:text-[#8DD4A0] text-xs ml-auto",children:"Vedi →"})]},t.profileId))})]}),G&&o?.status==="failed"&&e.jsxs("div",{className:"mb-5 bg-red-500/10 border border-red-500/20 rounded-xl p-4 flex items-center gap-3",children:[e.jsx(B,{className:"w-5 h-5 text-red-400 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-['Nunito'] font-semibold text-red-400",children:"Batch fallito"}),e.jsx("p",{className:"text-xs text-white/40 font-['Nunito'] mt-0.5",children:o.errorMessage})]})]}),ht?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsx("div",{className:"w-8 h-8 border-2 border-[#2F7F88]/30 border-t-[#2F7F88] rounded-full animate-spin"})}):V.length===0?e.jsxs("div",{className:"text-center py-16 text-white/30 font-['Nunito']",children:[e.jsx(f,{className:"w-12 h-12 mx-auto mb-3 text-[#6DBF8A]/40"}),e.jsx("p",{className:"text-[#6DBF8A]/60 font-['Nunito'] font-semibold",children:"Tutti i profili hanno avatar su CDN!"}),e.jsx("p",{className:"text-sm mt-1",children:"Nessun avatar con watermark trovato."})]}):e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 ga
6p-3",children:V.map(t=>{const r=P.has(t.id);return e.jsxs("div",{onClick:()=>!q&&wt(t.id),className:`relative rounded-xl overflow-hidden cursor-pointer transition-all border-2 ${q?"opacity-50 cursor-not-allowed":r?"border-[#2F7F88] ring-2 ring-[#2F7F88]/30 scale-[0.97]":"border-white/10 hover:border-white/30"}`,children:[e.jsx("div",{className:"aspect-[3/4] bg-[#0f1117] relative overflow-hidden",children:t.avatarUrl?e.jsx(Pt,{src:t.avatarUrl,alt:t.displayName,className:"w-full h-full object-cover"}):e.jsxs("div",{className:"w-full h-full flex flex-col items-center justify-center gap-2",children:[e.jsx(Pe,{className:"w-8 h-8 text-white/15"}),e.jsx("span",{className:"text-[9px] text-white/20 font-['Nunito']",children:"Nessuna foto"})]})}),r&&e.jsx("div",{className:"absolute inset-0 bg-[#2F7F88]/20 flex items-center justify-center",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-[#2F7F88] flex items-center justify-center shadow-lg",children:e.jsx(f,{className:"w-5 h-5 text-white"})})}),e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent p-2",children:[e.jsx("p",{className:"text-white text-xs font-['Nunito'] font-semibold truncate",children:t.displayName}),e.jsx("p",{className:"text-white/50 text-[10px] font-['Nunito'] truncate",children:t.city})]}),e.jsxs("div",{className:"absolute top-1.5 left-1.5 bg-black/60 rounded-md px-1.5 py-0.5 text-[10px] text-white/50 font-['Nunito']",children:["#",t.id]})]},t.id)})}),Ce>1&&e.jsxs("div",{className:"flex items-center justify-between mt-5 pt-4 border-t border-white/8",children:[e.jsxs("span",{className:"text-xs text-white/30 font-['Nunito']",children:[J*Q+1,"–",Math.min((J+1)*Q,ie)," di ",ie," profili"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>{te(t=>Math.max(0,t-1)),S(new Set)},disabled:J===0,className:"px-3 py-1.5 bg-[#0f1117]/5 hover:bg-[#0f1117]/10 border border-white/10 rounded-lg text-xs text-white/60 disabled:opacity-30 disabled:cursor-not-allowed transition-all font-['Nunito'] flex items-center gap-1",children:[e.jsx(me,{className:"w-3.5 h-3.5"}),"Prec."]}),e.jsxs("button",{onClick:()=>{te(t=>Math.min(Ce-1,t+1)),S(new Set)},disabled:J>=Ce-1,className:"px-3 py-1.5 bg-[#0f1117]/5 hover:bg-[#0f1117]/10 border border-white/10 rounded-lg text-xs text-white/60 disabled:opacity-30 disabled:cursor-not-allowed transition-all font-['Nunito'] flex items-center gap-1",children:["Succ.",e.jsx(Ee,{className:"w-3.5 h-3.5"})]})]})]})]}),i==="gallery"&&e.jsxs("div",{className:"bg-[#161A1E] border border-white/8 rounded-2xl p-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsxs("h2",{className:"font-['Nunito'] font-bold text-lg text-white flex items-center gap-2",children:[e.jsx(Fe,{className:"w-5 h-5 text-[#B05090]"}),"Profili con foto galleria esterne",M.size>0&&e.jsxs("span",{className:"ml-2 px-2.5 py-0.5 bg-[#07793e]/20 text-[#B05090] border border-[#07793e]/30 rounded-full text-sm font-bold",children:[M.size," selezionati"]})]}),e.jsxs("div",{className:"flex gap-2",children:[M.size>0&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>T(new Set),className:"px-3 py-1.5 bg-[#0f1117]/5 hover:bg-[#0f1117]/10 border border-white/10 rounded-lg text-xs text-white/60 transition-all font-['Nunito']",children:"Deseleziona tutto"}),e.jsxs(y,{onClick:()=>{$e(null),de.mutate({profileIds:Array.from(M)})},disabled:de.isPending,className:"bg-gradient-to-r from-[#07793e] to-[#246068] hover:from-[#B05090] hover:to-[#2F7F88] text-white border-0 font-['Nunito'] font-bold rounded-xl text-sm",children:[de.isPending?e.jsx(g,{className:"w-4 h-4 animate-spin mr-2"}):e.jsx(Z,{className:"w-4 h-4 mr-2"}),de.isPending?"Elaborazione gallerie...":`Processa gallerie (${M.size})`]})]}),M.size===0&&re.length>0&&e.jsx("button",{onClick:()=>T(new Set(re.map(t=>t.profileId).slice(0,10))),className:"px-3 py-1.5 bg-[#07793e]/15 hover:bg-[#07793e]/25 border border-[#07793e]/25 rounded-lg text-xs text-[#B05090] transition-all font-['Nunito'] font-semibold",children:"Seleziona primi 10"})]})]}),e.jsxs("div",{className:"mb-4 bg-[#07793e]/10 border border-[#07793e]/20 rounded-xl p-3 flex items-center gap-2",children:[e.jsx(Y,{className:"w-4 h-4 text-[#B0
65090] flex-shrink-0"}),e.jsxs("p",{className:"text-xs text-white/50 font-['Nunito']",children:["Max ",e.jsx("strong",{className:"text-white/70",children:"10 profili per batch"})," per la galleria (ogni profilo può avere più foto). Clicca su un profilo per vedere e processare le sue foto singolarmente."]})]}),De&&e.jsxs("div",{className:"mb-5 bg-[#0f1117] border border-white/8 rounded-xl p-4",children:[e.jsx("p",{className:"text-sm font-['Nunito'] font-bold text-white mb-3",children:"Risultati ultimo batch galleria:"}),e.jsx("div",{className:"space-y-1.5 max-h-48 overflow-y-auto",children:De.map(t=>e.jsxs("div",{className:"flex items-center gap-2 text-sm font-['Nunito']",children:[t.succeeded>0?e.jsx(f,{className:"w-4 h-4 text-[#6DBF8A] flex-shrink-0"}):e.jsx(B,{className:"w-4 h-4 text-red-400 flex-shrink-0"}),e.jsxs("span",{className:"text-white/70",children:["Profilo #",t.profileId]}),e.jsxs("span",{className:"text-white/40 text-xs",children:["— ",t.processed," foto: ",t.succeeded," ok, ",t.failed," fallite"]})]},t.profileId))})]}),ut?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsx("div",{className:"w-8 h-8 border-2 border-[#07793e]/30 border-t-[#07793e] rounded-full animate-spin"})}):re.length===0?e.jsxs("div",{className:"text-center py-16 text-white/30 font-['Nunito']",children:[e.jsx(f,{className:"w-12 h-12 mx-auto mb-3 text-[#6DBF8A]/40"}),e.jsx("p",{className:"text-[#6DBF8A]/60 font-['Nunito'] font-semibold",children:"Tutte le gallerie sono su CDN!"}),e.jsx("p",{className:"text-sm mt-1",children:"Nessuna foto galleria con watermark trovata."})]}):e.jsx("div",{className:"space-y-3",children:re.map(t=>{const r=M.has(t.profileId),c=ge===t.profileId;return e.jsxs("div",{className:`border rounded-xl overflow-hidden transition-all ${r?"border-[#07793e]/50 bg-[#07793e]/5":"border-white/8 bg-[#0f1117]"}`,children:[e.jsxs("div",{className:"flex items-center gap-3 p-3",children:[e.jsx("button",{onClick:()=>vt(t.profileId),className:`w-5 h-5 rounded-md border-2 flex items-center justify-center flex-shrink-0 transition-all ${r?"bg-[#07793e] border-[#07793e]":"border-white/20 hover:border-[#07793e]/50"}`,children:r&&e.jsx(f,{className:"w-3.5 h-3.5 text-white"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-['Nunito'] font-semibold text-white truncate",children:t.displayName}),e.jsxs("p",{className:"text-xs text-white/40 font-['Nunito']",children:[t.city," · #",t.profileId," ·"," ",e.jsxs("span",{className:"text-[#B0
65090] font-semibold",children:[t.externalPhotoCount," foto esterne"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsxs(y,{size:"sm",onClick:()=>{Se.mutate({profileId:t.profileId})},disabled:Se.isPending,className:"bg-[#07793e]/20 hover:bg-[#07793e]/30 text-[#B05090] border border-[#07793e]/30 font-['Nunito'] font-semibold text-xs rounded-lg h-7 px-3",children:[Se.isPending?e.jsx(g,{className:"w-3 h-3 animate-spin mr-1"}):e.jsx(Z,{className:"w-3 h-3 mr-1"}),"Processa"]}),e.jsxs("button",{onClick:()=>rt(c?null:t.profileId),className:"flex items-center gap-1 px-3 py-1.5 bg-[#0f1117]/5 hover:bg-[#0f1117]/10 border border-white/10 rounded-lg text-xs text-white/60 transition-all font-['Nunito']",children:[e.jsx(Ye,{className:"w-3 h-3"}),c?"Chiudi":"Vedi foto"]})]})]}),c&&e.jsx("div",{className:"border-t border-white/8 p-3",children:ye?ye.photos.length===0?e.jsx("p",{className:"text-xs text-white/30 font-['Nunito'] text-center py-3",children:"Nessuna foto esterna trovata"}):e.jsx("div",{className:"grid grid-cols-4 sm:grid-cols-6 md:grid-cols-8 gap-2",children:ye.photos.map($=>e.jsxs("div",{className:"relative rounded-lg overflow-hidden aspect-square bg-black/20",children:[e.jsx("img",{src:$.url,alt:`Foto #${$.id}`,className:"w-full h-full object-cover",loading:"lazy",onError:z=>{z.target.style.display="none"}}),e.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/60 px-1 py-0.5",children:e.jsxs("p",{className:"text-[9px] text-white/50 font-['Nunito'] truncate",children:["#",$.id]})})]},$.id))}):e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx("div",{className:"w-5 h-5 border-2 border-[#07793e]/30 border-t-[#07793e] rounded-full animate-spin"})})})]},t.profileId)})}),ke>1&&e.jsxs("div",{className:"flex items-center justify-between mt-5 pt-4 border-t border-white/8",children:[e.jsxs("span",{className:"text-xs text-white/30 font-['Nunito']",children:[H*X+1,"–",Math.min((H+1)*X,ne)," di ",ne," profili"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>{Re(t=>Math.max(0,t-1)),T(new Set)},disabled:H===0,className:"px-3 py-1.5 bg-[#0f1117]/5 hover:bg-[#0f1117]/10 border border-white/10 rounded-lg text-xs text-white/60 disabled:opacity-30 disabled:cursor-not-allowed transition-all font-['Nunito'] flex items-center gap-1",children:[e.jsx(me,{className:"w-3.5 h-3.5"}),"Prec."]}),e.jsxs("button",{onClick:()=>{Re(t=>Math.min(ke-1,t+1)),T(new Set)},disabled:H>=ke-1,className:"px-3 py-1.5 bg-[#0f1117]/5 hover:bg-[#0f1117]/10 border border-white/10 rounded-lg text-xs text-white/60 disabled:opacity-30 disabled:cursor-not-allowed transition-all font-['Nunito'] flex items-center gap-1",children:["Succ.",e.jsx(Ee,{className:"w-3.5 h-3.5"})]})]})]})]}),i==="ea-branding"&&e.jsxs("div",{className:"bg-[#161A1E] border border-white/8 rounded-2xl p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"font-['Nunito'] font-bold text-lg text-white flex items-center gap-2 mb-1",children:[e.jsx(I,{className:"w-5 h-5 text-[#07793e]"}),"Gestione Marchio EA"]}),e.jsx("p",{className:"text-sm text-white/40 font-['Nunito']",children:"Riprocessa le foto di un profilo: rimuove il watermark originale e riapplica (o rimuove) il marchio EA."})]}),e.jsxs("div",{className:"bg-[#07793e]/10 border border-[#07793e]/20 rounded-xl p-4 flex items-start gap-3",children:[e.jsx(I,{className:"w-4 h-4 text-[#07793e] flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"text-sm text-white/50 font-['Nunito'] leading-relaxed",children:[e.jsx("strong",{className:"text-white/70",children:"Come funziona:"})," inserisci l'ID del profilo e scegli se riapplicare il marchio EA (default) oppure rimuoverlo completamente (per profili premium o partnership). Il sistema scarica l'immagine corrente, rimuove il watermark originale con AI/Sharp e"," ",e.jsx("strong",{className:"text-white/70",children:"sovrappone il nuovo badge EA"})," (scudo rosa-viola) in basso a destra.",e.jsx("br",{}),e.jsx("span",{className:"text-[#C28B2C]/80 text-xs mt-1 block",children:"⚠ Nota: il riprocessamento usa l'immagine attualmente salvata nel DB, non l'originale di Moscarossa. Per risultati ottimali, usa questa funzione solo se l'immagine non è già stata riprocessata più volte."})]})]}),e.jsxs("div",{className:"bg-[#0f1117] border border-white/8 rounded-xl p-5 space-y-4",children:[e.jsx("h3",{className:"font-['Nunito'] font-semibold text-white text-sm",children:"Riprocessa profilo per ID"}),e.jsx("div",{className:"flex gap-3",children:e.jsx("input",{type:"number",placeholder:"ID profilo (es. 1234)",value:ee,onChange:t=>at(t.target.value),className:"flex-1 px-4 py-2.5 bg-[#161A1E] border border-white/10 rounded-xl text-sm text-white placeholder:text-white/30 focus:outline-none focus:border-[#07793e]/40 font-['Nunito']"})}),e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group",children:[e.jsx("div",{onClick:()=>ot(t=>!t),className:`w-11 h-6 rounded-full transition-all relative ${fe?"bg-[#C28B2C]":"bg-[#0f1117]/15"}`,children:e.jsx("div",{className:`absolute top-1 w-4 h-4 rounded-full bg-[#0f1117] shadow transition-all ${fe?"left-6":"left-1"}`})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-['Nunito'] font-semibold text-white/80",children:"Rimuovi marchio EA senza riapplicarlo"}),e.jsx("p",{className:"text-xs text-white/40 font-['Nunito']",children:"Attiva per profili premium o partnership che non devono avere il marchio EA"})]})]}),e.jsx(Mt,{profileId:ee,skipRebrand:fe,onResult:t=>it(t)})]}),L&&e.jsxs("div",{className:"bg-[#0f1117] border border-white/8 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[L.failed===0?e.jsx(f,{className:"w-5 h-5 text-[#6DBF8A]"}):e.jsx(B,{className:"w-5 h-5 text-[#C28B2C]"}),e.jsxs("p",{className:"font-['Nunito'] font-bold text-white",children:[L.name," — ",L.succeeded,"/",L.processed," foto riprocessate"]})]}),e.jsx("div",{className:"space-y-1.5 max-h-64 overflow-y-auto",children:L.results.map((t,r)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs font-['Nunito']",children:[t.success?e.jsx(f,{className:"w-3.5 h-3.5 text-[#6DBF8A] flex-shrink-0"}):e.jsx(B,{className:"w-3.5 h-3.5 text-red-400 flex-shrink-0"}),e.jsx("span",{className:"text-white/60 capitalize",children:t.type.replace("_"," ")}),t.success&&t.url&&e.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"text-[#07793e] hover:text-[#07793e] flex items-center gap-1",children:[e.jsx(st,{className:"w-3 h-3"}),"Vedi"]}),!t.success&&t.error&&e.jsx("span",{className:"text-red-400/70",children:t.error})]},r))})]}),e.jsxs("div",{className:"bg-[#0f1117] border border-white/8 rounded-xl p-5 space-y-4",children:[e.jsxs("h3",{className:"font-['Nunito'] font-bold text-white text-sm flex items-center gap-2",children:[e.jsx(_,{className:"w-4 h-4 text-[#5BBAC5]"}
6),"Riprocessa Batch Profili"]}),e.jsx("p",{className:"text-xs text-white/40 font-['Nunito'] leading-relaxed",children:"Applica il nuovo algoritmo watermark + marchio EA a più profili in una volta. Filtra per città o categoria, imposta il limite e avvia il job in background."}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"Città (opzionale)"}),e.jsx("input",{type:"text",placeholder:"es. Roma, Milano...",value:Le,onChange:t=>ct(t.target.value),className:"w-full px-3 py-2 bg-[#161A1E] border border-white/10 rounded-xl text-sm text-white placeholder:text-white/30 focus:outline-none focus:border-[#2F7F88]/40 font-['Nunito']"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"Categoria (opzionale)"}),e.jsxs("select",{value:Ue,onChange:t=>dt(t.target.value),className:"w-full px-3 py-2 bg-[#161A1E] border border-white/10 rounded-xl text-sm text-white focus:outline-none focus:border-[#2F7F88]/40 font-['Nunito']",children:[e.jsx("option",{value:"",children:"Tutte le categorie"}),e.jsx("option",{value:"escort",children:"Escort"}),e.jsx("option",{value:"trans",children:"Trans"}),e.jsx("option",{value:"massaggi",children:"Massaggi"}),e.jsx("option",{value:"coppie",children:"Coppie"}),e.jsx("option",{value:"mistress",children:"Mistress"})]})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"Limite profili (max 100)"}),e.jsx("input",{type:"number",min:1,max:100,value:Ne,onChange:t=>lt(Math.min(100,Math.max(1,parseInt(t.target.value)||20))),className:"w-full px-3 py-2 bg-[#161A1E] border border-white/10 rounded-xl text-sm text-white focus:outline-none focus:border-[#2F7F88]/40 font-['Nunito']"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer mt-5",children:[e.jsx("div",{onClick:()=>xt(t=>!t),className:`w-10 h-5 rounded-full transition-all relative ${je?"bg-[#2F7F88]":"bg-[#0f1117]/15"}`,children:e.jsx("div",{className:`absolute top-0.5 w-4 h-4 rounded-full bg-[#0f1117] shadow transition-all ${je?"left-5":"left-0.5"}`})}),e.jsx("span",{className:"text-xs text-white/60 font-['Nunito']",children:"Solo marchio EA (senza rimozione watermark)"})]})]}),e.jsxs(y,{onClick:()=>{K("idle"),Te(null),Ae.mutate({limit:Ne,city:Le||void 0,category:Ue||void 0,eaBrandingOnly:je})},disabled:Ae.isPending||w==="running",className:"w-full bg-gradient-to-r from-[#2F7F88] to-[#6A4D8A] hover:from-[#5BBAC5] hover:to-purple-500 text-white border-0 font-['Nunito'] font-bold rounded-xl",children:[Ae.isPending||w==="running"?e.jsx(g,{className:"w-4 h-4 animate-spin mr-2"}):e.jsx(_,{className:"w-4 h-4 mr-2"}),w==="running"?`Riprocessamento... ${v.processed}/${v.total}`:`Avvia Riprocessamento (${Ne} profili)`]}),w==="running"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"w-full h-2 bg-[#0f1117]/10 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-[#2F7F88] to-[#07793e] rounded-full transition-all duration-500",style:{width:`${v.total>0?Math.round(v.processed/v.total*100):0}%`}})}),e.jsxs("div",{className:"flex gap-4 text-xs font-['Nunito']",children:[e.jsxs("span",{className:"text-[#6DBF8A]",children:["✓ ",v.succeeded," ok"]}),e.jsxs("span",{className:"text-red-400",children:["✗ ",v.failed," errori"]}),e.jsxs("span",{className:"text-white/40",children:[v.processed,"/",v.total," profili"]})]})]}),(w==="done"||w==="error")&&D.data&&e.jsxs("div",{className:"bg-[#161A1E] rounded-xl p-4 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[w==="done"?e.jsx(f,{className:"w-4 h-4 text-[#6DBF8A]"}):e.jsx(B,{className:"w-4 h-4 text-red-400"}),e.jsxs("span",{className:"text-sm font-['Nunito'] font-bold text-white",children:[D.data.succeeded,"/",D.data.total," profili riprocessati"]})]}),e.jsx("div",{className:"max-h-48 overflow-y-auto space-y-1",children:D.data.results.map((t,r)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs font-['Nunito']",children:[t.success?e.jsx(f,{className:"w-3 h-3 text-[#6DBF8A] flex-shrink-0"}):e.jsx(B,{className:"w-3 h-3 text-red-400 flex-shrink-0"}),e.jsxs("span",{className:"text-white/60",children:["#",t.profileId," ",t.name]}),!t.success&&t.error&&e.jsx("span",{className:"text-red-400/60 truncate",children:t.error})]},r))})]})]}),e.jsxs("div",{className:"bg-[#0f1117] border border-white/8 rounded-xl p-5 space-y-4",children:[e.jsxs("h3",{className:"font-['Nunito'] font-bold text-white text-sm flex items-center gap-2",children:[e.jsx(I,{className:"w-4 h-4 text-[#B0
65090]"}),"Genera Foto con Novita.ai"]}),e.jsx("p",{className:"text-xs text-white/40 font-['Nunito'] leading-relaxed",children:"Genera foto realistiche per profili senza avatar usando Novita.ai text-to-image. Puoi generare per un singolo profilo (con ID) oppure in batch per tutti i profili senza foto."}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-[#161A1E] rounded-xl p-4 space-y-3",children:[e.jsx("h4",{className:"text-xs font-['Nunito'] font-bold text-white/70 uppercase tracking-wider",children:"Singolo Profilo"}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"ID Profilo"}),e.jsx("input",{type:"number",placeholder:"es. 42",value:xe,onChange:t=>ft(t.target.value),className:"w-full px-3 py-2 bg-[#0f1117]/5 border border-white/10 rounded-xl text-sm text-white placeholder:text-white/30 focus:outline-none focus:border-[#07793e]/40 font-['Nunito']"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"Numero foto (1-4)"}),e.jsx("input",{type:"number",min:1,max:4,value:Qe,onChange:t=>pt(Math.min(4,Math.max(1,parseInt(t.target.value)||1))),className:"w-full px-3 py-2 bg-[#0f1117]/5 border border-white/10 rounded-xl text-sm text-white focus:outline-none focus:border-[#07793e]/40 font-['Nunito']"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"Prompt personalizzato (opzionale)"}),e.jsx("input",{type:"text",placeholder:"es. beautiful italian woman, elegant...",value:qe,onChange:t=>bt(t.target.value),className:"w-full px-3 py-2 bg-[#0f1117]/5 border border-white/10 rounded-xl text-sm text-white placeholder:text-white/30 focus:outline-none focus:border-[#07793e]/40 font-['Nunito']"})]}),e.jsx("button",{onClick:()=>{xe&&A.mutate({profileId:parseInt(xe),count:Qe,customPrompt:qe||void 0})},disabled:!xe||A.isPending,className:"w-full py-2.5 bg-gradient-to-r from-[#07793e] to-[#246068] hover:from-[#A84A80] hover:to-[#2F7F88] disabled:opacity-40 text-white font-['Nunito'] font-bold text-sm rounded-xl transition-all flex items-center justify-center gap-2",children:A.isPending?e.jsxs(e.Fragment,{children:[e.jsx(g,{className:"w-4 h-4 animate-spin"})," Generazione in corso..."]}):e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"w-4 h-4"})," Genera Foto"]})}),A.isSuccess&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{className:"text-xs text-[#6DBF8A] font-['Nunito']",children:["✓ ",A.data.urls.length," foto generate!"]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:A.data.urls.map((t,r)=>e.jsx("img",{src:t,alt:`Foto generata ${r+1}`,className:"w-full aspect-[2/3] object-cover rounded-lg border border-white/10"},r))})]}),A.isError&&e.jsx("p",{className:"text-xs text-red-400 font-['Nunito']",children:A.error?.message})]}),e.jsxs("div",{className:"bg-[#161A1E] rounded-xl p-4 space-y-3",children:[e.jsx("h4",{className:"text-xs font-['Nunito'] font-bold text-white/70 uppercase tracking-wider",children:"Batch — Profili Senza Foto"}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"Limite profili (max 50)"}),e.jsx("input",{type:"number",min:1,max:50,value:He,onChange:t=>gt(Math.min(50,Math.max(1,parseInt(t.target.value)||10))),className:"w-full px-3 py-2 bg-[#0f1117]/5 border border-white/10 rounded-xl text-sm text-white focus:outline-none focus:border-[#07793e]/40 font-['Nunito']"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"Categoria (opzionale)"}),e.jsxs("select",{value:Xe,onChange:t=>Nt(t.target.value),className:"w-full px-3 py-2 bg-[#0f1117]/5 border border-white/10 rounded-xl text-sm text-white focus:outline-none focus:border-[#07793e]/40 font-['Nunito']",children:[e.jsx("option",{value:"",children:"Tutte le categorie"}),e.jsx("option",{value:"escort",children:"Escort"}),e.jsx("option",{value:"trans",children:"Trans"}),e.jsx("option",{value:"massaggi",children:"Massaggi"}),e.jsx("option",{value:"coppie",children:"Coppie"}),e.jsx("option",{value:"mistress",children:"Mistress"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"Città (opzionale)"}),e.jsx("input",{type:"text",placeholder:"es. Roma",value:Ke,onChange:t=>jt(t.target.value),className:"w-full px-3 py-2 bg-[#0f1117]/5 border border-white/10 rounded-xl text-sm text-white placeholder:text-white/30 focus:outline-none focus:border-[#07793e]/40 font-['Nunito']"})]}),e.jsx("button",{onClick:()=>{R.mutate({limit:He,category:Xe||void 0,city:Ke||void 0})},disabled:R.isPending,className:"w-full py-2.5 bg-gradient-to-r from-[#246068] to-[#6A4D8A] hover:from-[#2F7F88] hover:to-purple-500 disabled:opacity-40 text-white font-['Nunito'] font-bold text-sm rounded-xl transition-all flex items-center justify-center gap-2",children:R.isPending?e.jsxs(e.Fragment,{children:[e.jsx(g,{className:"w-4 h-4 animate-spin"})," Avvio in corso..."]}):e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"w-4 h-4"})," Avvia Batch"]})}),R.isSuccess&&e.jsxs("div",{className:"bg-[#3D8B5A]/10 border border-[#3D8B5A]/20 rounded-xl p-3",children:[e.jsxs("p",{className:"text-xs text-[#6DBF8A] font-['Nunito']",children:["✓ ",R.data.message]}),e.jsx("p",{className:"text-xs text-white/40 font-['Nunito'] mt-1",children:"Il job è in esecuzione in background. Le foto verranno salvate automaticamente."})]}),R.isError&&e.jsx("p",{className:"text-xs text-red-400 font-['Nunito']",children:R.error?.message})]})]})]})]}),i==="reprocess-s3"&&e.jsxs("div",{className:"bg-[#161A1E] border border-white/8 rounded-2xl p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"font-['Nunito'] font-bold text-lg text-white flex items-center gap-2 mb-1",children:[e.jsx(_,{className:"w-5 h-5 text-[#C28B2C]"}
6),"Riprocessa Immagine S3"]}),e.jsx("p",{className:"text-sm text-white/40 font-['Nunito']",children:"Rimuovi il watermark residuo da un'immagine già caricata su S3 (URL cloudfront). Il risultato viene salvato automaticamente nel DB."})]}),e.jsxs("div",{className:"bg-[#C28B2C]/10 border border-[#C28B2C]/20 rounded-xl p-4 flex items-start gap-3",children:[e.jsx(Ve,{className:"w-4 h-4 text-[#C28B2C] flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"text-sm text-white/50 font-['Nunito'] leading-relaxed",children:[e.jsx("strong",{className:"text-white/70",children:"Quando usare questo strumento:"}),` se un'immagine già su S3 mostra ancora un watermark visibile (es. "MILANO EROTICA", "bakecaincontri"), incolla il suo URL qui. Il sistema scarica l'immagine da S3, applica il rilevamento automatico del watermark con il nuovo algoritmo migliorato, e sovrascrive l'URL nel DB.`,e.jsx("br",{}),e.jsx("span",{className:"text-xs text-[#C28B2C]/80 mt-1 block",children:"⚠ Opzionale: se conosci l'ID del media (escort_media.id) o del profilo (per avatar), inseriscilo per aggiornare il DB automaticamente."})]})]}),e.jsxs("div",{className:"bg-[#0f1117] border border-white/8 rounded-xl p-5 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"URL Immagine S3 *"}),e.jsx("input",{type:"url",placeholder:"https://d2xsxph8kpxj0f.cloudfront.net/...",value:n,onChange:t=>N(t.target.value),className:"w-full px-4 py-2.5 bg-[#161A1E] border border-white/10 rounded-xl text-sm text-white placeholder:text-white/30 focus:outline-none focus:border-[#C28B2C]/40 font-['Nunito']"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"ID Media (opzionale)"}),e.jsx("input",{type:"number",placeholder:"es. 12345",value:F,onChange:t=>C(t.target.value),className:"w-full px-3 py-2 bg-[#161A1E] border border-white/10 rounded-xl text-sm text-white placeholder:text-white/30 focus:outline-none focus:border-[#C28B2C]/40 font-['Nunito']"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs text-white/50 font-['Nunito'] font-semibold mb-1.5 uppercase tracking-wider",children:"ID Profilo (opzionale)"}),e.jsx("input",{type:"number",placeholder:"es. 1234",value:W,onChange:t=>O(t.target.value),className:"w-full px-3 py-2 bg-[#161A1E] border border-white/10 rounded-xl text-sm text-white placeholder:text-white/30 focus:outline-none focus:border-[#C28B2C]/40 font-['Nunito']"})]})]}),e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[e.jsx("div",{onClick:()=>ue(t=>!t),className:`w-11 h-6 rounded-full transition-all relative ${j?"bg-[#C28B2C]":"bg-[#0f1117]/15"}`,children:e.jsx("div",{className:`absolute top-1 w-4 h-4 rounded-full bg-[#0f1117] shadow transition-all ${j?"left-6":"left-1"}`})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-['Nunito'] font-semibold text-white/80",children:"L'immagine è un avatar (foto copertina)"}),e.jsx("p",{className:"text-xs text-white/40 font-['Nunito']",children:"Attiva per aggiornare il campo avatarUrl del profilo"})]})]}),e.jsx(y,{onClick:()=>{n.trim()&&(b(null),E.mutate({imageUrl:n.trim(),mediaId:F?parseInt(F):void 0,profileId:W?parseInt(W):void 0,isAvatar:j}))},disabled:!n.trim()||E.isPending,className:"w-full bg-gradient-to-r from-[#C28B2C] to-orange-600 hover:from-amber-400 hover:to-orange-500 text-white border-0 font-['Nunito'] font-bold rounded-xl",children:E.isPending?e.jsxs(e.Fragment,{children:[e.jsx(g,{className:"w-4 h-4 animate-spin mr-2"})," Riprocessamento in corso..."]}):e.jsxs(e.Fragment,{children:[e.jsx(_,{className:"w-4 h-4 mr-2"})," Riprocessa Immagine S3"]})})]}),k&&e.jsx(et,{originalUrl:k.originalUrl,cleanUrl:k.cleanUrl,method:k.method})]})]}),e.jsx(It,{})]})}export{_t 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.