1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./entry-BS5eh9Pe-28.css"])))=>i.map(i=>d[i]); 2import{a as We,f as Ke,d as Ye,e as Ge,u as Je,_ as Qe,r as Ze,b as D}from"#entry";import et from"./LandingPageCrumbs-Bsvct2Gr-28.js";import tt from"./AIContentReport-DeHgrIpK-28.js";import{_ as ot}from"./NuxtImg-Bc55eaXM-28.js";import{c as at,a as G}from"./lazy-hydrated-component-B-4_r0s9-28.js";/* empty css *//* empty css */import{a0 as ne,ab as it,r as p,A as y,o as rt,a as nt,c as d,a1 as _,e as o,a3 as K,a5 as r,af as L,a6 as q,z as b,_ as B,ac as Y,ae as se,ag as le,ah as de,ak as st,a2 as lt,m as ce,b as l,a4 as ue,a8 as dt,ai as ct}from"./core-i18n-CvkTSGFb-28.js";import ut from"./uploadR2-gbMg20vJ-28.js";import{u as _t}from"./useMergedToolPageI18n-B_AytLd3-28.js";import{E as _e}from"./index-DGJW-ids-28.js";import{_ as ht}from"./_plugin-vue_export-helper-DlAUqK2U-28.js";import{S as mt}from"./sparkles-BNHfiI_--28.js";import{P as pt}from"./palette-D-F7-ejL-28.js";import{U as he}from"./upload-BTWqq1Wl-28.js";import{X as me,D as ft}from"./x-CGKEjGqA-28.js";import{c as vt,L as gt,C as wt,a as bt}from"./loader-circle-Dt-vHg0g-28.js";import{R as yt}from"./rotate-ccw-BAaEJkFU-28.js";import"./lazy-icons-B1O2ft2Z-28.js";import"./util-lodash-EiWJhHUB-28.js";import"./index-Dor4ESMI-28.js";import"./browser-Ddweagm--28.js";const Et=vt("ExpandIcon",[["path",{d:"m21 21-6-6m6 6v-4.8m0 4.8h-4.8",key:"1c15vz"}],["path",{d:"M3 16.2V21m0 0h4.8M3 21l6-6",key:"1fsnz2"}],["path",{d:"M21 7.8V3m0 0h-4.8M21 3l-6 6",key:"hawz9i"}],["path",{d:"M3 7.8V3m0 0h4.8M3 3l6 6",key:"u9ee12"}]]),Vt={meta_title:"AI Video Enhancer - Upscale and Colorize | Imgkits",meta_description:"Improve low-resolution footage with AI video upscaling or restore color to older clips. Upload an MP4, MOV, or AVI and download the enhanced result online.",meta_keywords:"ai video enhancer, video upscaler, video colorizer, improve video quality",meta_og_site_name:"Imgkits",meta_og_title:"AI Video Enhancer for Clearer, More Vivid Footage",meta_og_description:"Upscale low-resolution video or restore color to older footage in one focused online workflow.",meta_og_image:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_hero_upscale_FbR3Tk5kHRW3S47B37Nh3CBXP7b6k4iK.webp",badge:"AI Video Quality Tool",title:"AI Video Enhancer for Clearer, More Vivid Footage",subtitle:"Upload a video to upscale resolution, refine bitrate, or restore natural-looking color in one focused enhancer workflow.",carousel_alt_1:"Before-and-after video upscaling preview with sharper detail",carousel_alt_2:"Black-and-white footage restored with natural-looking color",carousel_alt_3:"AI video enhancer workflow showing a polished export result",carousel_prev_aria:"Show the previous video enhancement example",carousel_next_aria:"Show the next video enhancement example",carousel_go_to_aria:"Go to video enhancement example {n}",feature_section_title:"Improve Footage With",feature_section_title1:"Purpose-Built Enhancement Modes",feature_section_subtitle:"Choose the workflow that matches your source clip, then tune the key output setting before processing.",feature1_title:"Upscale Detail With",feature1_title1:"Bitrate Control",feature1_description:"The AI video upscaler processes eligible footage between 360 x 360 and 1920 x 1080 pixels. Set a 5-50 Mbps output bitrate to balance visible detail, motion quality, and file size for your next edit.",feature1_image_alt:"AI video upscaler comparing a soft source frame with a sharper result",feature2_title:"Restore Older Clips With",feature2_title1:"AI Colorization",feature2_description:"Colorize mode applies a DeOldify-based workflow to black-and-white or faded footage. Adjust the render factor from 10 to 50 for a faster, more vivid pass or a more detail-focused result.",feature2_image_alt:"Vintage black-and-white footage restored with balanced color",feature3_title:"Preview, Process, and",feature3_title1:"Download in One Place",feature3_description:"Review the uploaded clip, follow live processing status, play the finished video in the result frame, and download the enhanced file without leaving the page or rebuilding your settings.",feature3_image_alt:"Completed enhanced video ready to preview and download",testimony_section_title:"Built for Real Video Restoration Work",testimony_section_subtitle:"Editors and creators use the focused modes to prepare soft footage and older clips for modern publishing workflows.",testimony1_review:"The bitrate control gives me a practical way to improve soft interview footage before I move into the final edit.",testimony1_name:"Maya Patel",testimony1_role:"Documentary Editor",testimony2_review:"I restored color to several short archive clips and could review each result immediately before downloading the version I needed.",testimony2_name:"Jonas Reed",testimony2_role:"Archive Producer",testimony3_review:"The upload checks catch unsuitable files early, and the finished video is ready to preview in the same browser window.",testimony3_name:"Elena Kovacs",testimony3_role:"Social Video Creator",guidance_section_title:"How to Use the AI Video Enhancer",guidance_section_sub:"Enhance or colorize a compatible video in three direct steps.",step1_title:"Upload Your Video",step1_description:"Choose an MP4, MOV, or AVI file that fits the size, duration, and resolution limits shown for the selected mode.",step1_image_alt:"Uploading a video file to the AI video enhancer",step2_title:"Cho
2ose an Enhancement Mode",step2_description:"Select Upscale and set the bitrate, or choose Colorize and adjust the render factor for your source footage.",step2_image_alt:"Choosing AI upscale or colorize mode for a video",step3_title:"Preview and Download",step3_description:"Wait for processing to finish, play the enhanced result, open the larger preview, and download the completed video.",step3_image_alt:"Previewing and downloading an enhanced video result",faq_section_title:"AI Video Enhancer FAQ",faq1_question:"What does the AI Video Enhancer improve?",faq1_answer:"The AI Video Enhancer can upscale eligible low-resolution footage or add color to older black-and-white clips. Choose the mode that matches the improvement your video needs.",faq2_question:"Will upscaling make every video perfectly sharp?",faq2_answer:"No enhancement can recreate every missing detail. The upscaler is designed to improve perceived clarity and output quality, while results still depend on the source footage.",faq3_question:"Which video formats can I upload?",faq3_answer:"The tool accepts MP4, MOV, and AVI files. Upscale mode allows up to 50 MB and 30 minutes, while Colorize mode allows up to 20 MB and 1 minute.",faq4_question:"What resolution can I use for AI video upscaling?",faq4_answer:"Upscale inputs must be at least 360 x 360 pixels and no larger than 1920 x 1080 pixels. The form checks these limits before processing starts.",faq5_question:"How should I choose a colorization quality value?",faq5_answer:"Lower values process faster and often produce more vivid color. Higher values favor detail in higher-quality footage, so test the setting that best suits your clip.",cta_title:"Give Your Next Clip a Clearer Finish",cta_subtitle:"Upload compatible footage, select the right enhancement mode, and download the processed result from one page.",schema_name:"AI Video Enhancer",result_title:"Enhanced Video",result_subtitle:"Preview the processed footage before downloading it.",result_download:"Download video",result_new:"Enhance another video",result_video_alt:"Enhanced video result",result_expand_aria:"Open the enhanced video in a larger preview",result_download_filename:"imgkits-ai-video-enhancer.mp4",lightbox_close_aria:"Close the enhanced video preview",lightbox_video_alt:"Large preview of the enhanced video result",report_ai_content:"Report AI content",report_usage_title:"AI video enhancement completed"},xt={aiVideoEnhancer:Vt},kt={form_video_label:"Video to enhance",form_video_limit_upscale:"Up to 50 MB and 30 minutes",form_video_limit_color:"Up to 20 MB and 1 minute",form_video_choose:"Upload a video",form_video_replace:"Replace video",form_video_remove:"Remove video",form_video_formats:"MP4, MOV, or AVI",form_video_preview_alt:"Selected video preview",form_video_size_value:"{n} MB",form_mode_label:"Enhancement mode",form_mode_upscale:"Upscale",form_mode_colorize:"Colorize",form_mode_upscale_hint:"Improve video resolution and set the output bitrate between 5 and 50 Mbps.",form_mode_colorize_hint:"Restore color to black-and-white or faded footage with adjustable processing quality.",form_bitrate_label:"Output bitrate",form_bitrate_value:"{n} Mbps",form_bitrate_description:"Default: 10 Mbps. Allowed range: 5-50 Mbps.",form_quality_label:"Colorization quality",form_quality_value:"{n}",form_quality_description:"Lower values are faster and more vivid. Higher values favor detail in higher-quality footage.",form_generate_button_upscale:"Upscale video",form_generate_button_color:"Colorize video",form_generating_button:"Enhancing video...",form_empty_hint:"Upload a compatible video before starting the enhancement.",form_credit_hint_priced:"This run uses {cost} credits. You have {n} remaining.",form_privacy_note:"Avoid uploading private or sensitive videos.",form_video_type_error:"Please choose an MP4, MOV, or AVI video.",form_video_metadata_error:"The video details could not be read. Please choose another file.",form_video_size_error_upscale:"Upscale mode accepts videos up to 50 MB.",form_video_size_error_color:"Colorize mode accepts videos up to 20 MB.",form_video_duration_error_upscale:"Upscale mode accepts videos up to 30 minutes.",form_video_duration_error_color:"Colorize mode accepts videos up to 1 minute.",form_video_resolution_low_error:"Upscale mode requires a video resolution of at least 360 x 360 pixels.",form_video_resolution_high_error:"Upscale mode requires a video resolution no larger than 1920 x 1080 pixels.",progress_t
2itle:"Enhancing your video",progress_starting:"Preparing the video processing task.",progress_uploading:"Uploading your video...",progress_creating_upscale:"Starting the AI upscaling task...",progress_creating_color:"Starting the AI colorization task...",progress_processing:"Processing video ({n}%)...",progress_finalizing:"Finalizing the enhanced video...",error_upload:"The video upload failed. Please try again.",error_create_task:"The video enhancement task could not be started.",error_submit_task:"The video processing task could not be submitted.",error_generation_failed:"The video enhancement task failed.",error_no_result:"No usable enhanced video was returned.",error_timeout:"The enhancement took too long. Please try again.",error_download:"The enhanced video could not be downloaded.",toast_success:"Your enhanced video is ready.",toast_error_generic:"The video could not be enhanced. Please try again."},Ct={aiVideoEnhancer:kt},At=at("components/Commen/FeatureSection.vue",()=>D(()=>import("./FeatureSection-DpEk3aal-28.js"),__vite__mapDeps([0]),import.meta.url).then(f=>f.default||f)),It=G("components/TestimonySection.vue",()=>D(()=>import("./TestimonySection-Dk_93D-4-28.js"),__vite__mapDeps([0]),import.meta.url).then(f=>f.default||f)),Pt=G("components/FAQSection.vue",()=>D(()=>import("./FAQSection-CesAOwze-28.js"),[],import.meta.url).then(f=>f.default||f)),qt=G("components/Commen/CTASection.vue",()=>D(()=>import("./CTASection-Bs8mfY86-28.js"),__vite__mapDeps([0]),import.meta.url).then(f=>f.default||f)),zt={class:"bg-[#f3f6f5] px-4 py-8 lg:px-8 lg:py-14"},St={class:"mx-auto mt-8 w-full max-w-7xl lg:mt-12"},$t={class:"mb-8 text-center"},Mt={class:"mb-3 inline-block rounded-full bg-teal-100 px-4 py-1 text-sm font-semibold text-teal-800"},Tt={class:"pb-2 text-3xl font-bold text-slate-950 lg:text-5xl"},Rt={class:"mx-auto mt-3 max-w-3xl text-base leading-relaxed text-slate-600"},Ut={id:"generator",class:"enhancer-generator-layout grid scroll-mt-24 gap-6"},jt={class:"flex w-full flex-col space-y-5 rounded-lg bg-white p-5 shadow-xl"},Ot={class:"mb-2 flex items-center justify-between gap-3"},Lt={class:"block text-sm font-semibold text-slate-800"},Bt={class:"text-right text-xs font-medium text-slate-500"},Nt={key:0,class:"rounded-lg border border-teal-100 bg-teal-50/60 p-3"},Dt=["src","aria-label"],Ft={class:"mt-3 flex items-center justify-between gap-3"},Xt={class:"min-w-0"},Ht={class:"truncate text-xs font-semibold text-slate-700"},Wt={class:"text-xs text-slate-500"},Kt={class:"flex shrink-0 items-center gap-1"},Yt=["aria-label","title"],Gt={class:"mb-3 inline-flex h-12 w-12 items-center justify-center rounded-full bg-teal-100 text-teal-700"},Jt={class:"text-sm font-semibold text-slate-700"},Qt={class:"mt-1 text-xs text-slate-500"},Zt={key:2,class:"mt-2 text-xs font-medium text-rose-700"},eo={class:"mb-2 block text-sm font-semibold text-slate-800"},to={class:"grid grid-cols-2 gap-1 rounded-lg bg-slate-100 p-1"},oo=["aria-pressed","onClick"],ao={class:"mt-2 text-xs leading-5 text-slate-600"},io={key:0},ro={class:"mb-2 flex items-center justify-between gap-3"},no={for:"enhancer-bitrate",class:"text-sm font-semibold text-slate-800"},so={for:"enhancer-bitrate",class:"rounded-md bg-blue-50 px-2 py-1 text-xs font-semibold text-blue-800"},lo={class:"mt-2 text-xs leading-5 text-slate-600"},co={key:1},uo={class:"mb-2 flex items-center justify-between gap-3"},_o={for:"enhancer-quality",class:"text-sm font-semibold text-slate-800"},ho={for:"enhancer-quality",class:"rounded-md bg-rose-50 px-2 py-1 text-xs font-semibold text-rose-800"},mo={class:"mt-2 text-xs leading-5 text-slate-600"},po={class:"mt-auto pt-2"},fo=["disabled"],vo={key:0,class:"flex items-center justify-center gap-2"},go={key:1},wo={key:0,class:"mt-1.5 animate-pulse text-center text-xs text-amber-700"},bo={class:"mt-3 text-center text-xs leading-relaxed text-slate-600"},yo={class:"mt-1 text-center text-[11px] leading-relaxed text-slate-600"},Eo={class:"flex w-full min-w-0 flex-col justify-center"},Vo={key:0,class:"w-full"},xo={class:"relative aspect-[16/9] w-full overflow-hidden rounded-lg bg-black shadow-xl"}
2,ko=["src","poster","aria-label"],Co=["aria-label","title"],Ao={class:"mt-4 flex flex-wrap items-start justify-between gap-3"},Io={class:"text-lg font-bold text-slate-950"},Po={class:"mt-1 text-sm text-slate-600"},qo={class:"flex flex-wrap gap-2"},zo={class:"mt-4 flex justify-end"},So={key:1,class:"flex aspect-[16/9] w-full flex-col items-center justify-center rounded-lg bg-white p-8 shadow-xl"},$o={class:"text-lg font-semibold text-slate-900"},Mo={class:"mt-2 text-center text-sm text-slate-600"},To={class:"absolute inset-0 flex items-center justify-between p-3 opacity-100 transition-opacity duration-300 sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"},Ro=["aria-label"],Uo=["aria-label"],jo={class:"absolute bottom-2 left-1/2 flex -translate-x-1/2 gap-1"},Oo=["aria-label","aria-current","onClick"],Lo=["aria-label"],Bo=["aria-label","title"],No=["src","poster","aria-label"],Do={class:"bg-white px-4 py-20"},Fo={class:"mx-auto max-w-7xl"},Xo={class:"mx-auto mb-12 max-w-3xl text-center"},Ho={class:"text-3xl font-bold text-slate-950 lg:text-4xl"},Wo={class:"mt-4 text-base leading-7 text-slate-600"},Ko={class:"grid gap-6 md:grid-cols-3"},Yo={class:"p-5"},Go={class:"inline-flex h-9 w-9 items-center justify-center rounded-full bg-teal-700 text-sm font-bold text-white"},Jo={class:"mt-4 text-lg font-bold text-slate-950"},Qo={class:"mt-2 text-sm leading-6 text-slate-600"},Zo={class:"mt-10 text-center"},ea=50*1024*1024,N=5,pe=20*1024*1024,ta=1800,oa=60,aa="8f1189b476fcb54cfbe1d07d97b025c571a2ce4e9a7a9558640c78647576e16f",ia={__name:"ai-video-enhancer",async setup(f){let J,Q;const z=We(),fe=Ke(),Z=Ye(),{user:S,canUseVideoCnt:ee,jwt:te}=Ge(Z),ve=ce("loginModal"),ge=ce("dialogPay"),{t,locale:we}=ne(),be=ne();[J,Q]=it(()=>_t({blockKey:"aiVideoEnhancer",cacheKey:"ai_video_enhancer",i18n:be,locale:we,localMain:xt,localForms:Ct,mainBase:"https://public.imgkits.com/i18n_languages/imgkits/ai-video-enhancer/1.0.0",formBase:"https://public.imgkits.com/i18n_languages/imgkits/ai-video-enhancer-forms/1.0.0"})),await J,Q();const v={hero1:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_hero_upscale_FbR3Tk5kHRW3S47B37Nh3CBXP7b6k4iK.webp",hero2:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_hero_colorize_Apde5Q55wr2S3Ck2S4jKMTXtFFftdPjp.webp",hero3:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_hero_result_zmXxcXNsxc2sFmHZwBw2TK3JtJYieGdY.webp",feature1:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_feature_upscale_4rfWfAXfr6ZihMTC5afXYxHQkGBejfNC.webp",feature2:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_feature_colorize_63AGHSCaGancP88FS25wMKZiCyaetJde.webp",feature3:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_feature_preview_download_3S8BZsYBmHaRf4Drnn8EeGP3i4BcAEyC.webp",step1:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_step_upload_mNyrbwH4CXWPcN8BREJBbTPwB6GSXYAJ.webp",step2:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_step_choose_mode_f7taTDr8nJnpttR4HNXMWKxhNStKkSt4.webp",step3:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_step_preview_download_jMY76Ws55NCGz33HfPMazbeAfMYDs37E.webp",avatar1:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_avatar_maya_patel_XK4FCQxkw7i8DaAQmRTXe4xnpcnbxkxw.webp",avatar2:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_avatar_jonas_reed_KwMhZAx4rGWD8eDr2kkYQXyTkBATZkXZ.webp",avatar3:"https://video.deletetweets.ai/asset_2026_07_15_ai_video_enhancer_avatar_elena_kovacs_6d53S7YJc4Bm8w4WhxMYch6jy3Cj42ZH.webp"},ye=["video/mp4","video/quicktime","video/x-msvideo"],Ee=["mp4","mov","avi"];function oe(e){return typeof e=="string"?e:Array.isArray(e)&&typeof e[0]=="string"?e[0]:""}const Ve=(oe(z.query.mode)||oe(z.query.text)).toLowerCase(),xe=["color","colorize","deoldify","restore-color"].includes(Ve)?"color":"upscale",F=p(null),c=p(null),g=p(""),j=p(!1),w=p(xe),$=p(10),M=p(35),A=p(!1),E=p(""),h=p(null),T=p(!1),V=p(0),X=p(!1);let R=null;const ke=y(()=>[{value:"upscale",label:t("aiVideoEnhancer.form_mode_upscale"),icon:mt},{value:"color",label:t("aiVideoEnhancer.form_mode_colorize"),icon:pt}]),Ce=y(()=>t(w.value==="color"?"aiVideoEnhancer.form_video_limit_color":"aiVideoEnhancer.form_video_limit_upscale")),Ae=y(()=>t(w.value==="color"?"aiVideoEnhancer.form_mode_colorize_hint":"aiVideoEnhancer.form_mode_upscale_hint")),Ie=y(()=>t(w.value==="color"?"aiVideoEnhancer.form_generate_button_color":"aiVideoEnhancer.form_generate_button_upscale")),I=y(()=>[{id:"upscale",image:v.hero1,alt:t("aiVideoEnhancer.carousel_alt_1")},{id:"colorize",image:v.hero2,alt:t("aiVideoEnhancer.carousel_alt_2")},{id:"result",image:v.hero3,alt:t("aiVideoEnhancer.carousel_alt_3")}]),H=y(()=>I.value[V.value]||I.value[0]),Pe=y(()=>[{title:t("aiVideoEnhancer.feature1_title"),titlePrimary:t("aiVideoEnhancer.feature1_title1"),titlePrimaryPosition:"after",description:t("aiVideoEnhancer.feature1_description"),imageSrc:v.feature1,imageAlt:t("aiVideoEnhancer.feature1_image_alt")},{title:t("aiVideoEnhancer.feature2_title"),titlePrimary:t("aiVideoEnhancer.feature2_title1"),titlePrimaryPosition:"after",description:t("aiVideoEnhancer.feature2_description"),imageSrc:v.feature2,imageAlt:t("aiVideoEnhancer.feature2_image_alt")},{title:t("aiVideoEnhancer.feature3_title"),titlePrimary:t("aiVideoEnhancer.feature3_title1"),titlePrimaryPosition:"after",description:t("aiVideoEnhancer.feature3_description"),imageSrc:v.feature3,imageAlt:t("aiVideoEnhancer.feature3_image_alt")}]),qe=y(()=>[{quote:t("aiVideoEnhancer.testimony1_review"),name:t("aiVideoEnhancer.testimony1_name"),role:t("aiVideoEnhancer.testimony1_role"),avatar:v.avatar1,rating:5},{quote:t("aiVideoEnhancer.testimony2_review"),name:t("aiVideoEnhancer.testimony2_name"),role:t("aiVideoEnhancer.testimony2_role"),avatar:v.avatar2,rating:5},{quote:t("aiVideoEnhancer.testimony3_review"),name:t("aiVideoEnhancer.testimony3_name"),role:t("aiVideoEnhancer.testimony3_role"),avatar:v.avatar3,rating:5}]),ze=y(()=>[{image:v.step1,imageAlt:t("aiVideoEnhancer.step1_image_alt"),title:t("aiVideoEnhancer.step1_title"),description:t("aiVideoEnhancer.step1_description")},{image:v.step2,imageAlt:t("aiVideoEnhancer.step2_image_alt"),title:t("aiVideoEnhancer.step2_title"),description:t("aiVideoEnhancer.step2_description")},{image:v.step3,imageAlt:t("aiVideoEnhancer.step3_image_alt"),title:t("aiVideoEnhancer.step3_title"),description:t("aiVideoEnhancer.step3_description")}]),Se=y(()=>[{question:t("aiVideoEnhancer.faq1_question"),answer:t("aiVideoEnhancer.faq1_answer")},{question:t("aiVideoEnhancer.faq2_question"),answer:t("aiVideoEnhancer.faq2_answer")},{question:t("aiVideoEnhancer.faq3_question"),answer:t("aiVideoEnhancer.faq3_answer")},{question:t("aiVideoEnhancer.faq4_question"),answer:t("aiVideoEnhancer.faq4_answer")},{question:t("aiVideoEnhancer.faq5_question"),answer:t("aiVideoEnhancer.faq5_answer")}]);function $e(e){return t("aiVideoEnhancer.form_video_size_value",{n:(e/1024/1024).toFixed(1)})}function W(e,a=w.value){return a==="color"?e.file.size>pe?"aiVideoEnhancer.form_video_size_error_color":e.duration>oa?"aiVideoEnhancer.form_video_duration_error_color":"":e.file.size>ea?"aiVideoEnhancer.form_video_size_error_upscale":e.duration>ta?"aiVideoEnhancer.form_video_duration_error_upscale":e.width<360||e.height<360?"aiVideoEnhancer.form_video_resolution_low_error":e.width>1920||e.height>1080?"aiVideoEnhancer.form_video_resolution_high_error":""}function Me(e){return new Promise((a,n)=>{const i=document.createElement("video");i.preload="metadata",i.onloadedmetadata=()=>a({duration:i.duration,width:i.videoWidth,height:i.videoHeight}),i.onerror=()=>n(new Error(t("aiVideoEnhancer.form_video_metadata_error"))),i.src=e})}async function Te(e){const a=e.target.files?.[0];if(e.target.value="",g.value="",j.value=!1,!a)return;const n=a.name.split(".").pop()?.toLowerCase()||"";if(!ye.includes(a.type)&&!Ee.includes(n)){g.value=t("aiVideoEnhancer.form_video_type_error");return}const i=URL.createObjectURL(a);try{const u=await Me(i),m={file:a,preview:i,...u},x=W(m);if(x){g.value=t(x),URL.revokeObjectURL(i);return}c.value?.preview&&URL.revokeObjectURL(c.value.preview),c.value=m,h.value=null}catch(u){URL.revokeObjectURL(i),g.value=u?.message||t("aiVideoEnhancer.form_video_metadata_error")}}function ae(e=!0){c.value?.preview&&URL.revokeObjectURL(c.value.preview),c.value=null,h.value=null,e&&(g.value="")}function Re(e){if(e!==w.value&&(w.value=e,g.value="",h.value=null,c.value)){const a=W(c.value,e);a&&(ae(!1),g.value=t(a))}}function ie(){V.value=(V.value+1)%I.value.length}function Ue(){V.value=(V.value-1+I.value.length)%I.value.length}function je(){R||(R=window.setInterval(()=>{X.value||ie()},4200))}function Oe(){R&&(window.clearInterval(R),R=null)}function O(e=!1){return{"Content-Type":"application/json",...e?{Channel:"ai"}:{},...e&&te.value?{Authorization:`Bearer ${te.value}`}:{}}}async function U(e,a){const n=await e.json().catch(()=>null);if(!e.ok||!n)throw new Error(t(a));return n}async function Le(e,a){const n=await fetch("https://ai.imgkits.com/api/video-enhance/submit",{method:"POST",headers:O(!0),body:JSON.stringify({video_url:e,task_id:a,user_id:S.value?.id||"",user_email:S.value?.email||""})}),i=await U(n,"aiVideoEnhancer.error_submit_task");if(i.code!==0||!i.data?.task_id)throw new Error(t("aiVideoEnhancer.error_submit_task"));return i.data.task_id}async function Be(e,a){let n=0;for(let i=0;i<a;i+=1){try{const u=await fetch(`https://ai.imgkits.com/api/video-enhance/status/${encodeURIComponent(e)}`,{method:"GET",headers:O(!0)});if(u.status===504&&n<3)n+=1;else{const m=await U(u,"aiVideoEnhancer.error_generation_failed"),x=Number(m.data?.status);if(m.code!==0)throw new Error(t("aiVideoEnhancer.error_generation_failed"));if(m.code===0&&x===10&&m.data?.result_url)return E.value=t("aiVideoEnhancer.progress_finalizing"),{url:m.data.result_url,coverUrl:m.data.cover_url||""};if(x===-1)throw new Error(t("aiVideoEnhancer.error_generation_failed"))}}catch(u){if(n>=3||!String(u?.message||"").includes("504"))throw u}E.value=t("aiVideoEnhancer.progress_processing",{n:Math.min(96,18+Math.floor(i/a*78))}),await new Promise(u=>window.setTimeout(u,5e3))}throw new Error(t("aiVideoEnhancer.error_timeout"))}async function Ne(e,a){E.value=t("aiVideoEnhancer.progress_creating_upscale");const n=await fetch("https://usa.imgkits.com/api/ai/super-resolve-video",{method:"POST",headers:{"Content-Type":"application/json","X-Access-Channel":"video_resizer"},body:JSON.stringify({payload:{VideoUrl:e,BitRate:$.value}})}),i=await U(n,"aiVideoEnhancer.error_create_task");if(!i.success||!i.data?.jobId)throw new Error(t("aiVideoEnhancer.error_create_task"));const u=await Le(e,i.data.jobId);return Be(u,a)}async function De(e,a){E.value=t("aiVideoEnhancer.progress_creating_color");const n=await fetch("https://api.imgkits.com/replicate/createPrediction",{method:"POST",headers:O(),body:JSON.stringify({version:aa,input
2:{input_video:e,render_factor:M.value},user_id:S.value?.id||""})}),u=(await U(n,"aiVideoEnhancer.error_create_task")).data;if(!u)throw new Error(t("aiVideoEnhancer.error_create_task"));for(let m=0;m<a;m+=1){const x=await fetch("https://api.imgkits.com/replicate/getPrediction",{method:"POST",headers:O(),body:JSON.stringify({id:u})}),C=(await U(x,"aiVideoEnhancer.error_generation_failed")).data;if(C?.status==="succeeded"){const P=Array.isArray(C.output)?C.output[0]:C.output;if(!P)throw new Error(t("aiVideoEnhancer.error_no_result"));return E.value=t("aiVideoEnhancer.progress_finalizing"),{url:P,coverUrl:""}}if(C?.status==="failed"||C?.status==="canceled")throw new Error(t("aiVideoEnhancer.error_generation_failed"));E.value=t("aiVideoEnhancer.progress_processing",{n:Math.min(96,18+Math.floor(m/a*78))}),await new Promise(P=>window.setTimeout(P,5e3))}throw new Error(t("aiVideoEnhancer.error_timeout"))}async function Fe(){if(A.value)return;if(!c.value?.file){j.value=!0;return}const e=W(c.value);if(e){g.value=t(e);return}if(!S.value){ve?.value?.open();return}if(ee.value<N){ge?.value?.open();return}A.value=!0,j.value=!1,g.value="",h.value=null,E.value=t("aiVideoEnhancer.progress_uploading");try{const a=await ut(c.value.file,c.value.file.name,"video_optimizer","temp_","video");if(!a?.url)throw new Error(t("aiVideoEnhancer.error_upload"));const n=c.value.file.size>pe?200:120,i=w.value==="color"?await De(a.url,n):await Ne(a.url,n);if(!i?.url)throw new Error(t("aiVideoEnhancer.error_no_result"));h.value={url:i.url.replace(/^http:/,"https:"),coverUrl:i.coverUrl?.replace(/^http:/,"https:")||""},await Z.addFreeUsageCnt(N,!1),Ze({sum_key:"video_optimizer",title:t("aiVideoEnhancer.report_usage_title"),user_id:S.value?.id||"",data:{mode:w.value,bitRate:$.value,render_factor:M.value,result_url:h.value.url,credit_cost:N}}),_e.success(t("aiVideoEnhancer.toast_success"))}catch(a){console.error("AI video enhancement failed:",a),_e.error(a?.message||t("aiVideoEnhancer.toast_error_generic"))}finally{A.value=!1,E.value=""}}
2async function Xe(){if(h.value?.url)try{const e=await fetch(h.value.url);if(!e.ok)throw new Error(t("aiVideoEnhancer.error_download"));const a=await e.blob(),n=URL.createObjectURL(a),i=document.createElement("a");i.href=n,i.download=t("aiVideoEnhancer.result_download_filename"),document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)}catch{window.open(h.value.url,"_blank","noopener,noreferrer")}}function He(){h.value=null,T.value=!1}return rt(async()=>{(z.query.text||z.query.mode)&&await fe.replace({path:z.path,query:{}}),je()}),nt(()=>{Oe(),c.value?.preview&&URL.revokeObjectURL(c.value.preview)}),Je(()=>({title:t("aiVideoEnhancer.meta_title"),link:[{rel:"preconnect",href:"https://video.deletetweets.ai",crossorigin:"anonymous"},{rel:"dns-prefetch",href:"https://video.deletetweets.ai"}],meta:[{name:"keywords",content:t("aiVideoEnhancer.meta_keywords")},{name:"description",content:t("aiVideoEnhancer.meta_description")},{property:"og:site_name",content:t("aiVideoEnhancer.meta_og_site_name")},{property:"og:title",content:t("aiVideoEnhancer.meta_og_title")},{property:"og:description",content:t("aiVideoEnhancer.meta_og_description")},{property:"og:image",content:t("aiVideoEnhancer.meta_og_image")}],script:[{type:"application/ld+json",innerHTML:JSON.stringify({"@context":"https://schema.org","@type":"WebApplication",name:t("aiVideoEnhancer.schema_name"),url:"https://www.imgkits.com/ai-video-enhancer",applicationCategory:"MultimediaApplication",operatingSystem:"Web",description:t("aiVideoEnhancer.meta_description")})}]})),(e,a)=>{const n=et,i=tt,u=ot,m=At,x=It,re=Qe,C=Pt,P=qt;return l(),d(B,null,[_(n,{items:[{title:e.$t("tabnewtitle.effect"),path:"/?tab=imgeffect"},{title:e.$t("aiVideoEnhancer.schema_name"),path:""}]},null,8,["items"]),o("div",null,[o("section",zt,[o("div",St,[o("div",$t,[o("span",Mt,r(e.$t("aiVideoEnhancer.badge")),1),o("h1",Tt,r(e.$t("aiVideoEnhancer.title")),1),o("p",Rt,r(e.$t("aiVideoEnhancer.subtitle")),1)]),o("div",Ut,[o("div",jt,[o("div",null,[o("div",Ot,[o("label",Lt,r(e.$t("aiVideoEnhancer.form_video_label")),1),o("span",Bt,r(Ce.value),1)]),o("input",{ref_key:"fileInput",ref:F,type:"file",accept:"video/mp4,video/quicktime,video/x-msvideo,.mp4,.mov,.avi",class:"hidden",onChange:Te},null,544),c.value?(l(),d("div",Nt,[o("video",{src:c.value.preview,controls:"",muted:"",preload:"metadata",class:"aspect-video w-full rounded-md bg-black object-contain","aria-label":e.$t("aiVideoEnhancer.form_video_preview_alt")},null,8,Dt),o("div",Ft,[o("div",Xt,[o("p",Ht,r(c.value.file.name),1),o("p",Wt,r($e(c.value.file.size)),1)]),o("div",Kt,[o("button",{type:"button",class:"inline-flex h-10 items-center gap-1 rounded-md px-2 text-xs font-semibold text-teal-700 hover:bg-white hover:text-teal-900",onClick:a[0]||(a[0]=s=>F.value?.click())},[_(b(he),{class:"h-4 w-4","aria-hidden":"true"}),q(" "+r(e.$t("aiVideoEnhancer.form_video_replace")),1)]),o("button",{type:"button",class:"inline-flex h-10 w-10 items-center justify-center rounded-md text-slate-500 hover:bg-white hover:text-rose-700","aria-label":e.$t("aiVideoEnhancer.form_video_remove"),title:e.$t("aiVideoEnhancer.form_video_remove"),onClick:ae},[_(b(me),{class:"h-5 w-5","aria-hidden":"true"})],8,Yt)])])])):(l(),d("button",{key:1,type:"button",class:"flex w-full flex-col items-center justify-center rounded-lg border-2 border-dashed border-slate-300 bg-slate-50 px-4 py-8 text-center transition hover:border-teal-500 hover:bg-teal-50/50",onClick:a[1]||(a[1]=s=>F.value?.click())},[o("span",Gt,[_(b(he),{class:"h-6 w-6","aria-hidden":"true"})]),o("span",Jt,r(e.$t("aiVideoEnhancer.form_video_choose")),1),o("span",Qt,r(e.$t("aiVideoEnhancer.form_video_formats")),1)])),g.value?(l(),d("p",Zt,r(g.value),1)):L("",!0)]),o("fieldset",null,[o("legend",eo,r(e.$t("aiVideoEnhancer.form_mode_label")),1),o("div",to,[(l(!0),d(B,null,Y(ke.value,s=>(l(),d("button",{key:s.value,type:"button",class:ue(["flex min-h-11 items-center justify-center gap-2 rounded-md px-3 py-2.5 text-sm font-semibold transition-all",s.value===w.value?"bg-white text-slate-950 shadow-sm":"text-slate-600 hover:text-slate-900"]),"aria-pressed":s.value===w.value,onClick:k=>Re(s.value)},[(l(),K(dt(s.icon),{class:"h-4 w-4","aria-hidden":"true"})),q(" "+r(s.label),1)],10,oo))),128))]),o("p",ao,r(Ae.value),1)]),w.value==="upscale"?(l(),d("div",io,[o("div",ro,[o("label",no,r(e.$t("aiVideoEnhancer.form_bitrate_label")),1),o("output",so,r(e.$t("aiVideoEnhancer.form_bitrate_value",{n:$.value})),1)]),se(o("input",{id:"enhancer-bitrate","onUpdate:modelValue":a[2]||(a[2]=s=>$.value=s),type:"range",min:"5",max:"50",step:"1",class:"h-2 w-full cursor-pointer accent-blue-600"},null,512),[[le,$.value,void 0,{number:!0}]]),o("p",lo,r(e.$t("aiVideoEnhancer.form_bitrate_description")),1)])):(l(),d("div",co,[o("div",uo,[o("label",_o,r(e.$t("aiVideoEnhancer.form_quality_label")),1),o("output",ho,r(e.$t("aiVideoEnhancer.form_quality_value",{n:M.value})),1)]),se(o("input",{id:"enhancer-quality","onUpdate:modelValue":a[3]||(a[3]=s=>M.value=s),type:"range",min:"10",max:"50",step:"1",class:"h-2 w-full cursor-pointer accent-rose-600"},null,512),[[le,M.value,void 0,{number:!0}]]),o("p",mo,r(e.$t("aiVideoEnhancer.form_quality_description")),1)])),o("div",po,[o("button",{type:"button",disabled:A.value,class:"w-full rounded-lg bg-gradient-to-r from-teal-700 to-blue-700 py-3 text-sm font-semibold text-white transition hover:from-teal-800 hover:to-blue-800 hover:shadow-lg disabled:cursor-wait disabled:opacity-60",onClick:Fe},[A.value?(l(),d("span",vo,[_(b(gt),{class:"h-4 w-4 animate-spin","aria-hidden":"true"}
2),q(" "+r(e.$t("aiVideoEnhancer.form_generating_button")),1)])):(l(),d("span",go,r(Ie.value),1))],8,fo),j.value?(l(),d("p",wo,r(e.$t("aiVideoEnhancer.form_empty_hint")),1)):L("",!0),o("p",bo,r(e.$t("aiVideoEnhancer.form_credit_hint_priced",{cost:N,n:b(ee)})),1),o("p",yo,r(e.$t("aiVideoEnhancer.form_privacy_note")),1)])]),o("div",Eo,[h.value?(l(),d("div",Vo,[o("div",xo,[o("video",{src:h.value.url,poster:h.value.coverUrl||void 0,controls:"",muted:"",preload:"metadata",class:"h-full w-full object-contain","aria-label":e.$t("aiVideoEnhancer.result_video_alt")},null,8,ko),o("button",{type:"button",class:"absolute right-3 top-3 inline-flex h-11 w-11 items-center justify-center rounded-full bg-white/95 text-slate-800 shadow-lg hover:bg-white","aria-label":e.$t("aiVideoEnhancer.result_expand_aria"),title:e.$t("aiVideoEnhancer.result_expand_aria"),onClick:a[4]||(a[4]=s=>T.value=!0)},[_(b(Et),{class:"h-5 w-5","aria-hidden":"true"})],8,Co)]),o("div",Ao,[o("div",null,[o("h2",Io,r(e.$t("aiVideoEnhancer.result_title")),1),o("p",Po,r(e.$t("aiVideoEnhancer.result_subtitle")),1)]),o("div",qo,[o("button",{type:"button",class:"inline-flex min-h-11 items-center gap-2 rounded-md bg-blue-700 px-4 py-2 text-sm font-semibold text-white hover:bg-blue-800",onClick:Xe},[_(b(ft),{class:"h-4 w-4","aria-hidden":"true"}),q(" "+r(e.$t("aiVideoEnhancer.result_download")),1)]),o("button",{type:"button",class:"inline-flex min-h-11 items-center gap-2 rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-50",onClick:He},[_(b(yt),{class:"h-4 w-4","aria-hidden":"true"}),q(" "+r(e.$t("aiVideoEnhancer.result_new")),1)])])]),o("div",zo,[_(i,{"content-type":"ai-video-enhancer","content-id":h.value.url||"",variant:"minimal","trigger-text":e.$t("aiVideoEnhancer.report_ai_content"),"trigger-class":"inline-flex min-h-11 items-center gap-2 rounded-full border border-rose-200 bg-white px-4 py-2 text-sm font-medium text-rose-700 shadow-sm hover:border-rose-300 hover:bg-rose-50"},null,8,["content-id","trigger-text"])])])):A.value?(l(),d("div",So,[a[10]||(a[10]=o("div",{class:"relative mb-6 h-20 w-20"},[o("div",{class:"absolute inset-0 rounded-full border-4 border-slate-100"}),o("div",{class:"absolute inset-0 animate-spin rounded-full border-4 border-r-blue-700 border-t-teal-600"}
2)],-1)),o("h2",$o,r(e.$t("aiVideoEnhancer.progress_title")),1),o("p",Mo,r(E.value||e.$t("aiVideoEnhancer.progress_starting")),1)])):(l(),d("div",{key:2,class:"group relative aspect-[16/9] w-full overflow-hidden rounded-lg bg-[#e7ecea] shadow-xl",onMouseenter:a[5]||(a[5]=s=>X.value=!0),onMouseleave:a[6]||(a[6]=s=>X.value=!1)},[(l(),K(u,{key:H.value.id,src:H.value.image,alt:H.value.alt,width:"960",height:"540",sizes:"100vw md:900px",loading:"eager",fetchpriority:"high",decoding:"async",class:"h-full w-full object-contain"},null,8,["src","alt"])),o("div",To,[o("button",{type:"button","aria-label":e.$t("aiVideoEnhancer.carousel_prev_aria"),class:"inline-flex h-11 w-11 items-center justify-center rounded-full bg-white/95 text-slate-900 shadow-lg hover:bg-white",onClick:Ue},[_(b(wt),{class:"h-5 w-5","aria-hidden":"true"})],8,Ro),o("button",{type:"button","aria-label":e.$t("aiVideoEnhancer.carousel_next_aria"),class:"inline-flex h-11 w-11 items-center justify-center rounded-full bg-white/95 text-slate-900 shadow-lg hover:bg-white",onClick:ie},[_(b(bt),{class:"h-5 w-5","aria-hidden":"true"})],8,Uo)]),o("div",jo,[(l(!0),d(B,null,Y(I.value,(s,k)=>(l(),d("button",{key:k,type:"button","aria-label":e.$t("aiVideoEnhancer.carousel_go_to_aria",{n:k+1}),"aria-current":k===V.value?"true":"false",class:"inline-flex h-10 w-10 items-center justify-center rounded-full",onClick:ra=>V.value=k},[o("span",{class:ue(["h-1.5 rounded-full shadow-sm",k===V.value?"bg-slate-950":"bg-slate-600/50"]),style:ct({width:k===V.value?"1.25rem":"0.375rem"})},null,6)],8,Oo))),128))])],32))])])])]),(l(),K(st,{to:"body"},[T.value?(l(),d("div",{key:0,role:"dialog","aria-modal":"true","aria-label":e.$t("aiVideoEnhancer.result_expand_aria"),class:"fixed inset-0 z-50 flex items-center justify-center bg-black/85 p-4",onClick:a[9]||(a[9]=s=>T.value=!1)},[o("button",{type:"button",class:"absolute right-4 top-4 flex h-11 w-11 items-center justify-center rounded-full bg-white/15 text-white hover:bg-white/25","aria-label":e.$t("aiVideoEnhancer.lightbox_close_aria"),title:e.$t("aiVideoEnhancer.lightbox_close_aria"),onClick:a[7]||(a[7]=de(s=>T.value=!1,["stop"]))},[_(b(me),{class:"h-6 w-6","aria-hidden":"true"})],8,Bo),h.value?(l(),d("video",{key:0,src:h.value.url,poster:h.value.coverUrl||void 0,controls:"",autoplay:"",muted:"",class:"max-h-[88vh] max-w-[94vw] object-contain","aria-label":e.$t("aiVideoEnhancer.lightbox_video_alt"),onClick:a[8]||(a[8]=de(()=>{},["stop"]))},null,8,No)):L("",!0)],8,Lo)):L("",!0)])),_(m,{"hydrate-on-visible":"","title-primary":e.$t("aiVideoEnhancer.feature_section_title"),title:e.$t("aiVideoEnhancer.feature_section_title1"),description:e.$t("aiVideoEnhancer.feature_section_subtitle"),"cta-text":e.$t("common.startButton"),"cta-link":"#generator",features:Pe.value},null,8,["title-primary","title","description","cta-text","features"]),_(x,{"hydrate-never":"",variant:"cards",subtitle:e.$t("aiVideoEnhancer.testimony_section_subtitle"),title:e.$t("aiVideoEnhancer.testimony_section_title"),items:qe.value},null,8,["subtitle","title","items"]),o("section",Do,[o("div",Fo,[o("div",Xo,[o("h2",Ho,r(e.$t("aiVideoEnhancer.guidance_section_title")),1),o("p",Wo,r(e.$t("aiVideoEnhancer.guidance_section_sub")),1)]),o("div",Ko,[(l(!0),d(B,null,Y(ze.value,(s,k)=>(l(),d("article",{key:s.title,class:"overflow-hidden rounded-lg border border-slate-200 bg-white shadow-sm"},[_(u,{loading:"lazy",src:s.image,alt:s.imageAlt,width:"800",height:"450",sizes:"100vw md:400px",class:"aspect-[16/9] w-full object-cover"},null,8,["src","alt"]),o("div",Yo,[o("span",Go,r(k+1),1),o("h3",Jo,r(s.title),1),o("p",Qo,r(s.description),1)])]))),128))]),o("div",Zo,[_(re,{to:"#generator",class:"inline-flex min-h-11 items-center rounded-full bg-gradient-to-r from-teal-700 to-blue-700 px-6 py-3 text-sm font-semibold text-white shadow-lg transition hover:from-teal-800 hover:to-blue-800 hover:shadow-xl"},{default:lt(()=>
2[q(r(e.$t("common.startButton")),1)]),_:1})])])]),_(C,{"hydrate-never":"",title:e.$t("aiVideoEnhancer.faq_section_title"),items:Se.value},null,8,["title","items"]),_(P,{"hydrate-never":"",title:e.$t("aiVideoEnhancer.cta_title"),description:e.$t("aiVideoEnhancer.cta_subtitle"),"cta-text":e.$t("common.joinButton"),"cta-link":"#generator"},null,8,["title","description","cta-text"])])],64)}}},Ia=ht(ia,[["__scopeId","data-v-7bea7160"]]);export{Ia 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.