PageSourceSearch

https://snapgen.ai/_nuxt/DiBCZ2qG.js

js snapgen.ai collected 2026-10-05 12:39:40 UTC 26,862 bytes, 1 lines download raw bytes

1import{_ as Ee}from"./CAg3bYft.js";import{D as se,P as _e,O as he,aX as be,F as de,r as M,T as ue,h as m,N as oe,Y as Ce,Q as ve,k as i,l as O,w,G as e,n as l,U as n,$ as C,x as R,a0 as me,A as E,a1 as H,q as o,au as ae,W as ie,V as d,ak as Ie,al as Ne,Z as Qe,dt as ge,du as Ge,dv as We,a6 as Se,aq as Je,a5 as Be,p as Xe,J as Ye,K as Ke,da as Ze,aa as et,ae as tt,a7 as at,a2 as st,B as He,cJ as ot,aD as it,bE as lt,I as rt,X as nt}from"#entry";import{_ as ct}from"./CDjuJZDf.js";import{_ as dt}from"./B-zaufy2.js";import{M as ut}from"./KkCscrmn.js";import{_ as mt}from"./BBl8gQCg.js";import{_ as De,a as Me,b as pe}from"./LDox6Yhz.js";import{_ as Ae}from"./CA3B5UHi.js";import{_ as ht}from"./Bq3hDkch.js";import{u as yt}from"./BLVCv5Mc.js";import"./D2HOEEP7.js";import"./DOMTaP9e.js";import"./BpI2E7cR.js";import"./BVJttCY-.js";import"./I7h5jbgI.js";import"./DCrDJGar.js";import"./nipcuRB4.js";import"./-1X0_XFf.js";const gt={class:"h-full relative group"},pt={class:"relative w-full h-full aspect-square sm:aspect-auto flex flex-col items-center justify-center bg-gray-100 dark:bg-neutral-800"},ft={key:0,class:"relative w-full h-full"},vt=["src","alt","onError"],_t={key:0,class:"absolute bottom-2 left-1/2 transform -translate-x-1/2 flex gap-1.5 z-10"},bt={key:1,class:"w-full h-full flex items-center justify-center text-xs"},xt={class:"text-sm text-gray-500 dark:text-gray-300"},kt={class:"text-sm text-gray-500 dark:text-gray-300"},wt={class:"text-center"},$t={class:"h-full flex flex-col"},St={class:"flex justify-between items-start gap-2"},Ht={class:"line-clamp-1"},Ct={class:"h-full"},It=se({__name:"HistoryImageCard",props:{orientation:{type:String,default:"horizontal"},data:{type:Object,default:()=>({})}},setup(r){const p=_e(),U=he(),s=r,y=be(),{showDetailModal:g,historyDetail:A}=de(y),b=M(!1),I=M(!1),a=M(0);ue(()=>{I.value="ontouchstart"in window||navigator.maxTouchPoints>0,p.query.uuid&&p.query.uuid===s.data.uuid&&(A.value=s.data,g.value=!0)});const $=()=>{if(I.value&&!b.value){b.value=!0;return}A.value=s.data,g.value=!0,s.data.uuid&&U.push({query:{...p.query,uuid:s.data.uuid}}),b.value=!1},f=m(()=>s.data?.generated_image?.[0]||{}),L=M(new Set),B=c=>typeof c=="string"&&c.trim().length>0&&c!=="null"&&c!=="undefined",h=m(()=>{let c=[];if(s.data?.thumbnail_urls?.length>0)c=s.data.thumbnail_urls;else{const T=s.data?.thumbnail_uri||s.data?.thumbnail_url||f.value?.thumbnails?.[0]?.url;c=T?[T]:[]}return c.filter(T=>B(T)&&!L.value.has(T))}),F=c=>{L.value.add(c),a.value>=h.value.length&&(a.value=0)},G=m(()=>s.data?.input_text),x=m(()=>f.value?.style||s.data?.style||"Unknown"),q=M(!1),v=m(()=>b.value||q.value?"opacity-100 pointer-events-auto transition-opacity duration-300":"opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto transition-opacity duration-300"),{t:P}=oe(),N=m(()=>{if(s.data?.status!==0)return"";if(s.data?.queueStatusLabel)return s.data.queueStatusLabel;const c=s.data?.queue_position;return c?P("history.statusQueued",{position:c}):P("history.statusQueued")});let D=null;const V=()=>{D||h.value.length>1&&(D=Ne(()=>{const c=h.value.length;c<=1||(a.value=(a.value+1)%c)},2e3))},W=()=>{D&&(clearInterval(D),D=null)};return ue(()=>{V()}),Ce(()=>{W()}),ve(()=>[s.data?.thumbnail_urls,h.value.length],()=>{W(),a.value>=h.value.length&&(a.value=0),V()}),(c,T)=>{const Y=ie,le=De,K=Ae,re=Me;return i(),O(re,{id:r.data.id,type:r.data.type,style:me(x.value),status:r.data.status,data:r.data,onMenu:T[1]||(T[1]=z=>q.value=!0)},{default:w(()=>[e("div",gt,[l(K,{orientation:"vertical",ui:{container:"lg:items-start p-0 sm:p-0",root:"overflow-hidden relative cursor-pointer"},class:"h-full",onClick:$},{default:w(()=>[e("div",pt,[h.value.length>0?(i(),n("div",ft,[(i(!0),n(C,null,R(h.value,(z,j)=>(i(),n("div",{key:z,style:me({zIndex:h.value.length-j}),class:"absolute inset-0 transition-all duration-500"},[e("img",{src:z,alt:`${r.data.id}-${j}`,class:E(["w-full h-full object-cover cursor-pointer transition-opacity",{"opacity-100":a.value===j,"opacity-0":a.value!==j}]),onError:Q=>F(z)},null,42,vt)],4))),128)),h.value.length>1?(i(),n("div",_t,[(i(!0),n(C,null,R(h.value,(z,j)=>(i(),n("div",{key:j,class:E(["w-1.5 h-1.5 rounded-full transition-all duration-300",a.value===j?"bg-white w-3":"bg-white/50"])},null,2))),128))])):H("",!0)])):(i(),n("div",bt,[e("div",{class:E(["text-gray-400 dark:text-gray-600 flex flex-col items-center",{"px-2 text-center text-red-500":("isHistoryFailedStatus"in c?c.isHistoryFailedStatus:o(ae))(r.data.status),"text-gray-400 dark:text-gray-600":!("isHistoryFailedStatus"in c?c.isHistoryFailedStatus:o(ae))(r.data.status)}])},[r.data.status===0?(i(),n(C,{key:0},[l(Y,{name:"mdi:clock-outline",class:"w-8 h-8 mb-2"}),e("span",xt,d(N.value),1)],64)):r.data.status===1?(i(),n(C,{key:1},[l(Y,{name:"svg-spinners:blocks-wave",class:"w-8 h-8 mb-2"}),e("span",kt,d(c.$t("Generating...")),1)],64)):(i(),n(C,{key:2},[l(Y,{name:("isHistoryFailedStatus"in c?c.isHistoryFailedStatus:o(ae))(r.data.status)?"material-symbols:error":"i-lucide-image-off",class:"w-8 h-8 mb-2"},null,8,["name"]),e("div",wt,d(("isHistoryFailedStatus"in c?c.isHistoryFailedStatus:o(ae))(r.data.status)?r.data.error_message:c.$t("No thumbnail available")),1)],64))],2)])),e("div",{class:E(["absolute inset-0 z-20 bg-gradient-to-b from-black/70 via-black/60 to-black/80 backdrop-blur-sm flex flex-col justify-between p-4",v.value])},[e("div",$t,[e("div",St,[e("div",{class:E(["dark:text-white text-gray-100 font-medium text-xs cursor-pointer hover:underline hover:text-primary group-hover:translate-y-0",{"translate-y-0 opacity-100":b.value||q.value}]),onClick:Ie($,["stop"])},[e("span",Ht,d(G.value),1)],2)]),e("div",Ct,[l(le,{class:"mt-auto",data:r.data,onClose:T[0]||(T[0]=z=>q.value=!1)},null,8,["data"])])])],2)])]),_:1})])]),_:1},8,["id","type","style","status","data"])}}}),Bt=Object.assign(It,{__name:"HistoryImageCard"}),Dt={class:"relative w-full h-full aspect-square sm:aspect-auto"},Mt={class:"p-4 absolute top-0 left-0"},At={class:"text-xs text-gray-600 dark:text-gray-300 line-clamp-1 hover:text-primary-500 break-all"},Ft={key:0,class:"w-full h-full bg-gray-200 dark:bg-neutral-800 rounded-lg flex flex-col items-center justify-center mb-4"},Tt={class:"text-xs text-gray-500 dark:text-gray-400 text-center px-4"},Lt={key:1,class:"w-full h-32 text-error gap-2 bg-gray-200 dark:bg-neutral-800 rounded-lg flex flex-col items-center justify-center mb-4"},Ot={class:"flex flex-col gap-1 items-center justify-center"},Ut={class:"text-xs"},qt={class:"text-xs px-4 text-error/70 text-center"},Pt={key:2,class:"w-full h-full flex items-center justify-center"},Vt={class:"text-gray-400 dark:text-gray-600 flex flex-col items-center"},jt={class:"h-full flex flex-col"},Rt={class:"flex justify-between items-start gap-2"},zt={class:"h-full"},Et=se({__name:"HistorySpeechCard",props:{orientation:{type:String,default:"horizontal"},data:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1}},setup(r){const p=_e(),U=he(),s=r,y=be(),{showDetailModal:g,historyDetail:A}=de(y),b=M(!1),I=M(!1),a=M(!1);ue(()=>{a.value="ontouchstart"in window||navigator.maxTouchPoints>0,p.query.uuid&&p.query.uuid===s.data.uuid&&(b.value=!0)});const $=()=>{if(a.value&&!I.value){I.value=!0;return}A.value=s.data,g.value=!0,s.data.uuid&&U.push({query:{...p.query,uuid:s.data.uuid}}),I.value=!1},f=m(()=>s.data?.generated_image?.[0]||{});m(()=>s.data?.thumbnail_uri||s.data?.thumbnail_url);const L=m(()=>s.data?.input_text),B=m(()=>f.value?.style||s.data?.style||"Unknown"),h=M(!1),F=m(()=>I.value||h.value?"opacity-100 pointer-events-auto transition-opacity duration-300":"opacity-0 pointer-events-none group-hover:opacity-100 group-hover:pointer-events-auto transition-opacity duration-300"),{t:G}=oe(),x=m(()=>{if(s.data?.status!==0)return"";if(s.data?.queueStatusLabel)return s.data.queueStatusLabel;const v=s.data?.queue_position;return v?G("history.statusQueued",{position:v}):G("history.statusQueued")}),q=m(()=>s.prompt||s.data?.input_text||s.data?.custom_prompt||"No prompt available");return(v,P)=>{const N=ie,D=De,V=Ae,W=Me;return i(),O(W,{id:r.data.id,type:r.data.type,style:me(B.value),status:r.data.status,data:r.data,onMenu:P[1]||(P[1]=c=>h.value=!0)},{default:w(()=>[l(V,{orientation:"vertical",ui:{container:"lg:items-start p-0 sm:p-0",root:"overflow-hidden relative group cursor-pointer"},class:"h-full",onClick:$},{default:w(()=>[e("div",Dt,[e("div",Mt,[e("div",{class:"cursor-pointer",onClick:$},[e("p",At,d(q.value),1)])]),r.loading||r.data.status===0||r.data.status===1?(i(),n("div",Ft,[l(N,{name:r.data.status===0?"mdi:clock-outline":"svg-spinners:blocks-wave",class:"w-12 h-12 text-neutral-400/50 dark:text-neutral-700 mb-2"},null,8,["name"]),e("span",Tt,d(r.data.status===0?x.value:v.$t("ui.messages.speechGenerating")),1)])):("isHistoryFailedStatus"in v?v.isHistoryFailedStatus:o(ae))(r.data?.status)?(i(),n("div",Lt,[l(N,{name:"material-symbols:error",class:"w-8 h-8"}),e("div",Ot,[e("div",Ut,d(v.$t("ui.errors.generationFailed")),1),e("div",qt,d(r.data?.error_message),1)])])):(i(),n("div",Pt,[e("div",Vt,[l(N,{name:"material-symbols-light:audio-file",class:"w-8 h-8 mb-2"})])])),e("div",{class:E(["absolute inset-0 bg-gradient-to-b from-black/70 via-black/60 to-black/80 backdrop-blur-sm flex flex-col justify-between p-4",F.value])},[e("div",jt,[e("div",Rt,[e("div",{class:E(["dark:text-white text-gray-100 font-medium text-xs line-clamp-1 cursor-pointer hover:underline hover:text-primary group-hover:translate-y-0",{"translate-y-0 opacity-100":I.value||h.value,[F.value]:!0}]),onClick:Ie($,["stop"])},d(L.value),3)]),e("div",zt,[l(D,{data:r.data,onClose:P[0]||(P[0]=c=>h.value=!1)},null,8,["data"])])])],2)])]),_:1})]),_:1},8,["id","type","style","status","data"])}}}),fe=Object.assign(Qe(Et,[["__scopeId","data-v-39363c65"]]),{__name:"HistorySpeechCard"}),Nt={class:"flex items-start justify-between mb-3"},Qt={class:"flex-1"},Gt={class:"flex items-center gap-2 mb-1"},Wt={class:"font-semibold text-gray-900 dark:text-white truncate"},Jt={class:"text-xs text-gray-500 dark:text-gray-400"},Xt={class:"mb-3"},Yt={class:"flex items-center justify-between text-xs mb-1"},Kt={class:"text-gray-600 dark:text-gray-400"},Zt={class:"font-medium text-gray-900 dark:text-white"},ea={class:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2 overflow-hidden"},ta={class:"grid grid-cols-2 gap-2 mb-3"},aa={class:"bg-gray-50 dark:bg-gray-700/50 rounded p-2 flex items-center gap-2"},sa={class:"text-xs text-gray-500 dark:text-gray-400"},oa={class:"text-sm font-semibold text-gray-900 dark:text-white"},ia={class:"bg-green-50 dark:bg-green-900/20 rounded p-2 flex items-center gap-2"},la={class:"text-xs text-gray-500 dark:text-gray-400"},ra={class:"text-sm font-semibold text-green-600 dark:text-green-400"},na={class:"bg-yellow-50 dark:bg-yellow-900/20 rounded p-2 flex items-center gap-2"},ca={class:"text-xs text-gray-500 dark:text-gray-400"},da={class:"text-sm font-semibold text-yellow-600 dark:text-yellow-400"},ua={class:"bg-red-50 dark:bg-red-900/20 rounded p-2 flex items-center gap-2"},ma={class:"text-xs text-gray-500 dark:text-gray-400"},ha={class:"text-sm font-semibold text-red-600 dark:text-red-400"},ya={key:1,class:"mt-3 pt-3 border-t border-gray-200 dark:border-gray-700 space-y-2 max-h-64 overflow-y-auto"},ga={class:"flex items-center justify-between mb-1"},pa={class:"font-medium text-gray-900 dark:text-white truncate"},fa={key:0,class:"text-gray-600 dark:text-gray-400 truncate"},va=se({__name:"HistoryBatchOrderCard",props:{data:{}},setup(r){ge.extend(Ge),ge.extend(We);const p=r,{t:U}=oe(),s=he(),y=M(!1),g=()=>{s.push(`/history/batch-order/${p.data.order_uuid}`)},A=m(()=>{switch(p.data.status){case"completed":return"success";case"failed":return"error";
1case"processing":return"warning";default:return"neutral"}}),b=m(()=>p.data.total_videos===0?0:Math.round(p.data.completed_videos/p.data.total_videos*100)),I=m(()=>ge.utc(p.data.created_at).fromNow());return(a,$)=>{const f=ie,L=Je,B=Be;return i(),n("div",{class:"relative bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-4 hover:shadow-lg transition-shadow cursor-pointer",onClick:g},[e("div",Nt,[e("div",Qt,[e("div",Gt,[l(f,{name:"i-heroicons-film",class:"w-5 h-5 text-primary-500"}),e("h3",Wt,d(a.$t("history.batchOrder"))+" #"+d(a.data.id),1)]),e("p",Jt,d(o(I)),1)]),l(L,{color:o(A),variant:"soft",size:"xs"},{default:w(()=>[Se(d(a.data.status),1)]),_:1},8,["color"])]),e("div",Xt,[e("div",Yt,[e("span",Kt,d(a.$t("history.progress")),1),e("span",Zt,d(o(b))+"% ",1)]),e("div",ea,[e("div",{class:"bg-primary-500 h-full transition-all duration-300",style:me({width:`${o(b)}%`})},null,4)])]),e("div",ta,[e("div",aa,[l(f,{name:"i-heroicons-film",class:"w-4 h-4 text-gray-500"}),e("div",null,[e("p",sa,d(a.$t("history.totalVideos")),1),e("p",oa,d(a.data.total_videos),1)])]),e("div",ia,[l(f,{name:"i-heroicons-check-circle",class:"w-4 h-4 text-green-500"}),e("div",null,[e("p",la,d(a.$t("history.completed")),1),e("p",ra,d(a.data.completed_videos),1)])]),e("div",na,[l(f,{name:"i-heroicons-clock",class:"w-4 h-4 text-yellow-500"}),e("div",null,[e("p",ca,d(a.$t("history.processing")),1),e("p",da,d(a.data.processing_videos),1)])]),e("div",ua,[l(f,{name:"i-heroicons-exclamation-circle",class:"w-4 h-4 text-red-500"}),e("div",null,[e("p",ma,d(a.$t("history.failed")),1),e("p",ha,d(a.data.failed_videos),1)])])]),a.data.items&&a.data.items.length>0?(i(),O(B,{key:0,label:o(y)?a.$t("history.hideItems"):a.$t("history.showItems",{count:a.data.items.length}),icon:o(y)?"i-heroicons-chevron-up":"i-heroicons-chevron-down",variant:"ghost",size:"xs",block:"",onClick:$[0]||($[0]=h=>y.value=!o(y))},null,8,["label","icon"])):H("",!0),o(y)&&a.data.items&&a.data.items.length>0?(i(),n("div",ya,[(i(!0),n(C,null,R(a.data.items,h=>(i(),n("div",{key:h.id,class:"text-xs bg-gray-50 dark:bg-gray-700/50 rounded p-2"},[e("div",ga,[e("span",pa,d(h.name||h.input_text?.substring(0,30)||"Untitled"),1),l(L,{color:h.status===1?"success":h.status===0?"warning":"error",variant:"soft",size:"xs"},{default:w(()=>[Se(d(h.status_desc||h.status),1)]),_:2},1032,["color"])]),h.input_text?(i(),n("p",fa,d(h.input_text),1)):H("",!0)]))),128))])):H("",!0)])}}}),_a=Object.assign(va,{__name:"HistoryBatchOrderCard"}),ba={class:"flex md:hidden gap-1 p-1 bg-gray-100 dark:bg-gray-800 rounded-lg w-fit"},xa=["title","onClick"],ka=se({__name:"BaseHistoryFilterSelect",props:{modelValue:{}},emits:["update:modelValue"],setup(r,{emit:p}){const U=r,s=p,{t:y}=oe(),g=[{label:y("historyFilter.all"),value:"all",icon:"material-symbols:border-all-rounded"},{label:y("Image"),value:"image",icon:"hugeicons:ai-image"},{label:y("Video"),value:"video",icon:"hugeicons:ai-video"},{label:y("Grok 30s"),value:"storyboard",icon:"i-lucide-clapperboard"}],A=b=>{s("update:modelValue",String(b))};return(b,I)=>{const a=ht,$=ie;return i(),n(C,null,[l(a,Xe({"model-value":U.modelValue,items:g,class:"hidden md:block w-fit"},b.$attrs,{"onUpdate:modelValue":A}),null,16,["model-value"]),e("div",ba,[(i(),n(C,null,R(g,f=>e("button",{key:f.value,class:E(["p-2 rounded-md transition-colors",U.modelValue===f.value?"bg-white dark:bg-gray-700 text-primary-500 shadow-sm":"text-gray-500 hover:bg-gray-200 dark:hover:bg-gray-700"]),title:f.label,onClick:L=>A(f.value)},[l($,{name:f.icon,class:"w-5 h-5"},null,8,["name"])],10,xa)),64))])],64)}}}),wa=Object.assign(ka,{__name:"BaseHistoryFilterSelect"}),$a={class:"text-center mb-8"},Sa={class:"text-4xl font-bold text-gray-900 dark:text-white mb-4"},Ha={class:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto"},Ca={class:"my-4 flex flex-col sm:flex-row items-center justify-between gap-4"},Ia={class:"flex items-center gap-4"},Ba={class:"flex items-center gap-2"},Da={key:0,class:"text-sm text-gray-600 dark:text-gray-400"},Ma={key:0,class:"bg-red-50 border border-red-200 rounded-lg p-4 mb-8"},Aa={class:"flex items-center"},Fa={class:"text-red-700"},Ta={key:0,class:"w-full relative grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6"},La={key:1,class:"w-full relative grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8"};
1const Oa={key:2,id:"loading-trigger",class:"h-1 w-full","aria-hidden":"true"},Ua={key:3,class:"text-center py-8 text-gray-500"},ss=se({__name:"index",setup(r){Ye({title:"My History - Snapgen AI Content Gallery",description:"View and manage your AI-generated content history. Access all your created images, videos, and speech files in one organized gallery.",ogTitle:"Content History - Snapgen AI",ogDescription:"Browse your personal collection of AI-generated content. Manage and download your images, videos, and audio files.",keywords:"AI content history, generated images gallery, video history, speech files, content management"}),Ke({script:[{type:"application/ld+json",innerHTML:JSON.stringify({"@context":"https://schema.org","@type":"CollectionPage",name:"AI Content History",description:"User's personal collection of AI-generated content",mainEntity:{"@type":"Collection",name:"Generated Content Gallery",description:"Collection of AI-generated images, videos, and audio files"}})}]});const p={image:Bt,video:pe,"tts-text":fe,"tts-document":fe,"tts-multi-speaker":fe,preorder_video:pe,storyboard:pe},U=t=>p[t.type],s=be(),y=yt(),g=Ze(),A=_e(),b=he(),I=nt(),{t:a}=oe(),$=et(),f=tt(),{historiesWithPage:L,loadings:B}=de(s),{hasDownloadableItems:h,selectedCount:F,hasSelectedItems:G}=de(g),x=m({get(){return A.query.filter_by||"all"},set(t){b.replace({query:{filter_by:t}})}});ve(()=>x.value,t=>{z(t)});const q=M({items_per_page:24}),v=m(()=>x.value==="bulk-video"),P=m(()=>s.histories),N=m(()=>y.batchOrders),D=m(()=>v.value?y.loadings.fetchBatchOrders||y.loadings.fetchMoreBatchOrders:s.loadings.fetchHistories||s.loadings.fetchMoreHistories),V=m(()=>v.value?y.hasMoreBatchOrders:s.hasMoreHistories),W=m(()=>!!s.errors.fetchHistories),c=m(()=>{const t=s.errors.fetchHistories;return t?.response?.data?.message||t?.message||"Failed to load imagen history. Please try again."}),T=m(()=>P.value.map(t=>({...t}))),Y=t=>{if(!t)return t;const u=t.status===0,S=u?t.queueStatusLabel||(t.queue_position?a("history.statusQueued",{position:t.queue_position}):a("history.statusQueued")):null;return{...t,isQueued:u,queueStatusLabel:S}},le=m(()=>L.value.map(t=>({...t,histories:t.histories.map(u=>Y(u))}))),K=async()=>{if(v.value)await y.getBatchOrders({page:1,items_per_page:20});else{const t={...q.value,page:1};x.value!=="all"&&(t.filter_by=x.value),await s.fetchHistories(t)}},re=async()=>{if(!(!V.value||D.value))if(v.value)await y.fetchMoreBatchOrders(20);else{const t={...q.value};x.value!=="all"&&(t.filter_by=x.value),await s.fetchMoreHistories(t)}},z=async t=>{x.value=t,g.clearSelection(),t==="bulk-video"?(y.batchOrders=[],y.batchOrdersPage=1,y.hasMoreBatchOrders=!0):(s.histories=[],s.historiesWithPage=[{page:1,histories:[]}],s.currentPage=1,s.hasMoreHistories=!0),await K()},j=m(()=>{const t=[[{label:a("history.delete.deleteAll"),icon:"i-heroicons-trash",onSelect:()=>Q("all")},{label:a("history.delete.deleteErrorItems"),icon:"i-heroicons-exclamation-circle",onSelect:()=>Q("failed")}],[{label:a("history.delete.deleteAllVideos"),icon:"i-heroicons-film",onSelect:()=>Q("video")},{label:a("history.delete.deleteAllImages"),icon:"i-heroicons-photo",onSelect:()=>Q("image")},{label:a("history.delete.deleteAllSpeeches"),icon:"i-heroicons-speaker-wave",onSelect:()=>Q("speech")}]];return G.value&&t.push([{label:a("history.delete.deleteSelected",{count:F.value}),icon:"i-heroicons-check-circle",onSelect:()=>Q("selected")}]),t}),Q=t=>{let u="",S="",k;switch(t){case"all":u=a("history.deleteAll.confirmTitle"),S=a("history.deleteAll.confirmDescription"),k=async()=>{await s.deleteAllHistories()};break;case"failed":u=a("history.delete.confirmDeleteErrorTitle"),S=a("history.delete.confirmDeleteErrorDescription"),k=async()=>{await s.deleteHistoriesByFilters({status:["policy","failed"]})};break;case"video":u=a("history.delete.confirmDeleteVideosTitle"),S=a("history.delete.confirmDeleteVideosDescription"),k=async()=>{await s.deleteHistoriesByFilters({media_type:"video"})};break;case"image":u=a("history.delete.confirmDeleteImagesTitle"),S=a("history.delete.confirmDeleteImagesDescription"),k=async()=>{await s.deleteHistoriesByFilters({media_type:"image"})};break;case"speech":u=a("history.delete.confirmDeleteSpeechesTitle"),S=a("history.delete.confirmDeleteSpeechesDescription"),k=async()=>{const X=["tts-text","tts-document","tts-multi-speaker"];for(const ee of X)await s.deleteHistoriesByFilters({media_type:ee})};break;case"selected":u=a("history.delete.confirmDeleteSelectedTitle",{count:F.value}),S=a("history.delete.confirmDeleteSelectedDescription",{count:F.value}),k=async()=>{const X=g.selectedItems.map(ee=>ee.id).join(",");await s.deleteHistoriesByFilters({ids:X}),g.clearSelection()};break;default:return}f.openConfirm({title:u,description:S,icon:"i-heroicons-exclamation-triangle",confirmText:a("history.deleteAll.confirmButton"),cancelText:a("common.cancel"),async onConfirm(){try{await k(),$.add({title:a("history.deleteAll.successTitle"),description:a("history.deleteAll.successDescription"),color:"green",icon:"i-heroicons-check-circle"}),await K()}catch{$.add({title:a("history.deleteAll.errorTitle"),description:a("history.deleteAll.errorDescription"),color:"red",icon:"i-heroicons-exclamation-circle"})}}})},Fe=async()=>{v.value||await g.selectAllSuccessfulFromApi(x.value==="all"?"all":String(x.value))},Te=async()=>{await g.downloadAllSelected()},ye=I.public.logoRemovalLimits.maxBatchHistories,ne=m(()=>g.logoRemovalUuids.length),xe=m(()=>ne.value>ye),Z=M(!1),Le=m(()=>g.logoRemovableItems.map(t=>({type:t.type,model_name:t.model_name,file_count:Math.max(((t.type==="image"?t.generated_image:t.generated_video)||[]).length,1)}))),Oe=async(t="fast")=>{Z.value=!1,await g.removeLogoForSelected(t)};let J=null;const Ue=t=>{const u=t[0];u&&u.isIntersecting&&!D.value&&re()};ue(async()=>{await K(),J=new IntersectionObserver(Ue,{threshold:.5,rootMargin:"0px 0px 200px 0px"}),window.addEventListener("scroll",ke)}),Ce(()=>{J&&J.disconnect(),window.removeEventListener("scroll",ke)}),ve(le,()=>{at(()=>{const t=document.getElementById("loading-trigger");t&&J&&(J.disconnect(),J.observe(t))})},{deep:!0});const ke=((t,u)=>{let S;return function(...k){clearTimeout(S),S=setTimeout(()=>t.apply(this,k),u)}})(()=>
1{if(D.value||!V.value)return;const t=window.scrollY+window.innerHeight,u=document.documentElement.scrollHeight;t>=u*.9&&re()},200);return(t,u)=>{const S=Ee,k=Be,X=ot,ee=it,qe=ct,Pe=dt,Ve=ie,ce=ut,we=mt,je=st,Re=rt;return i(),O(Re,null,{default:w(()=>[l(je,{class:"pt-0"},{default:w(()=>[e("div",$a,[e("h1",Sa,d(t.$t("History")),1),e("p",Ha,d(t.$t("historyPages.aiContentLibraryDescription")),1)]),l(S,{title:t.$t("History"),description:t.$t("historyPages.aiContentLibraryDescription"),class:"sr-only"},{links:w(()=>u[4]||(u[4]=[])),_:1},8,["title","description"]),e("div",Ca,[e("div",Ia,[l(wa,{modelValue:o(x),"onUpdate:modelValue":u[0]||(u[0]=_=>He(x)?x.value=_:null),color:"neutral",class:"w-fit",size:"xs",disabled:o(B).fetchHistories},null,8,["modelValue","disabled"])]),e("div",Ba,[l(X,{items:o(j),popper:{placement:"bottom-start"},ui:{item:{disabled:"cursor-text select-text"},width:"w-56"}},{default:w(()=>[l(k,{icon:"i-heroicons-trash",label:t.$t("history.delete.menuLabel"),color:"error",variant:"outline",size:"xs","trailing-icon":"i-heroicons-chevron-down",disabled:o(B).fetchHistories,loading:o(B).deleteAllHistories||o(B).deleteHistoriesByFilters},null,8,["label","disabled","loading"])]),_:1},8,["items"]),o(F)>0?(i(),n("span",Da,d(t.$t("selectedItems",{count:o(F)})),1)):H("",!0),l(k,{icon:"i-heroicons-check-circle",label:t.$t("Select All"),color:"neutral",variant:"outline",size:"xs",disabled:o(B).fetchHistories||o(v),loading:o(g).loadings.selectAll,onClick:Fe},null,8,["label","disabled","loading"]),o(F)>0?(i(),O(k,{key:1,icon:"i-heroicons-x-mark",label:t.$t("Clear"),color:"neutral",variant:"ghost",size:"xs",onClick:u[1]||(u[1]=_=>o(g).clearSelection())},null,8,["label"])):H("",!0),o(ne)>0?(i(),O(ee,{key:2,"delay-duration":0,text:o(xe)?t.$t("history.logoRemoval.tooManySelected",{max:o(ye),count:o(ne)}):t.$t("history.logoRemoval.buttonHint",{max:o(ye)})},{default:w(()=>[l(k,{icon:"i-lucide-eraser",label:t.$t("videoGen.removeLogo")+` (${o(ne)})`,color:o(xe)?"warning":"primary",variant:"outline",size:"xs",loading:o(g).loadings.removeLogo,onClick:u[2]||(u[2]=_=>Z.value=!0)},null,8,["label","color","loading"])]),_:1},8,["text"])):H("",!0),l(qe,{open:o(Z),"onUpdate:open":u[3]||(u[3]=_=>He(Z)?Z.value=_:null),items:o(Le),loading:o(g).loadings.removeLogo,onConfirm:Oe},null,8,["open","items","loading"]),o(h)?(i(),O(k,{key:3,icon:"i-heroicons-arrow-down-tray",label:t.$t("Download")+` (${o(g).zipDownloadUuids.length})`,color:"primary",variant:"solid",size:"xs",loading:o(g).loadings.downloadAll,onClick:Te},null,8,["label","loading"])):H("",!0)])]),l(Pe,{icon:"i-heroicons-information-circle",color:"warning",variant:"soft",title:t.$t("history.dataRetentionNotice"),class:"mb-6"},null,8,["title"]),o(W)?(i(),n("div",Ma,[e("div",Aa,[l(Ve,{name:"i-lucide-alert-triangle",class:"w-5 h-5 text-red-500 mr-2"}),e("p",Fa,d(o(c)),1)])])):H("",!0),e("div",null,[o(v)?(i(),n("div",Ta,[(i(!0),n(C,null,R(o(N),(_,te)=>(i(),O(ce,{key:`batch-${_.id}`,initial:{scale:1.1,opacity:0,filter:"blur(20px)"},animate:{scale:1,opacity:1,filter:"blur(0px)"},transition:{duration:.6,delay:te*.1}},{default:w(()=>[l(_a,{data:_},null,8,["data"])]),_:2},1032,["transition"]))),128)),o(y).loadings.fetchBatchOrders||o(y).loadings.fetchMoreBatchOrders?(i(),n(C,{key:0},R(12,_=>l(ce,{key:`skeleton-${_}`,class:"w-full rounded-lg",initial:{scale:1.1,opacity:0,filter:"blur(20px)"},animate:{scale:1,opacity:1,filter:"blur(0px)"},transition:{duration:.6,delay:_*.1}},{default:w(()=>[l(we,{class:"w-full h-64",style:{borderRadius:"0.5rem"}})]),_:2},1032,["transition"])),64)):H("",!0)])):(i(),n("div",La,[(i(!0),n(C,null,R(o(le),(_,te)=>(i(),n(C,{key:`page-${te}`},[(i(!0),n(C,null,R(_.histories,($e,ze)=>(i(),O(ce,{key:`row-${ze}`,initial:{scale:1.1,opacity:0,filter:"blur(20px)"},animate:{scale:1,opacity:1,filter:"blur(0px)"},transition:{duration:.6,delay:te*.1}},{default:w(()=>[(i(),O(lt(U($e)),{data:$e,class:"h-52"},null,8,["data"]))]),_:2},1032,["transition"]))),128))],64))),128)),o(B).fetchMoreHistories||o(B).fetchHistories?(i(),n(C,{key:0},R(12,_=>l(ce,{key:`row-${_}`,class:"w-full rounded-lg",initial:{scale:1.1,opacity:0,filter:"blur(20px)"}
1,animate:{scale:1,opacity:1,filter:"blur(0px)"},transition:{duration:.6,delay:_*.1}},{default:w(()=>[l(we,{class:"w-full h-52",style:{borderRadius:"0.5rem"}})]),_:2},1032,["transition"])),64)):H("",!0)]))]),H("",!0),o(V)&&!o(D)?(i(),n("div",Oa)):H("",!0),o(V)?H("",!0):(i(),n("div",Ua,d(t.$t("historyPages.endOfHistory")),1))]),_:1})]),_:1})}}});export{ss 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.