"use strict";(self.webpackChunkscreenity=self.webpackChunkscreenity||[]).push([[493],{493(e,r,t){t.r(r),t.d(r,{default:()=>n});const n=async function(e,r,t){return new Promise((e,n)=>{const c=document.createElement("video"),o=document.createElement("canvas"),a=o.getContext("2d");c.addEventListener("loadedmetadata",()=>{o.width=c.videoWidth,o.height=c.videoHeight,c.currentTime=t}),c.addEventListener("seeked",()=>{try{a.drawImage(c,0,0),o.toBlob(r=>{URL.revokeObjectURL(c.src),r?e(r):n(new Error("Failed to create blob from canvas"))},"image/png")}catch(e){URL.revokeObjectURL(c.src),n(e)}}),c.addEventListener("error",e=>{URL.revokeObjectURL(c.src),n(new Error(`Video error: ${e.message||"Unknown error"}`))}),c.src=URL.createObjectURL(r)})}}}]);