1"use strict";(self.webpackChunkrgbkit=self.webpackChunkrgbkit||[]).push([[421],{9652(B,U,u){u.d(U,{H:()=>I});var k=u(6104),F=u(7370),T=u(656),w=u(4205),S=u(8521),j=u(1917);let I=(()=>{var y;class v{constructor(r,_,x){this.authService=r,this.router=_,this.modalService=x,this.loginSubject=new k.B,this.loginModalRef=null}openLoginPopup(r={},_=null){this.loginModalRef=this.modalService.open(F.LoginComponent,{size:"lg",centered:!0,windowClass:"login-dialog login-wrapper"}),this.loginModalRef.componentInstance.config=r,this.loginModalRef.componentInstance.isPopup=!0,this.loginModalRef.result.then(x=>{if("ok"===x){const M=this.authService.getUser();_?.(M),this.loginSubject.next({success:!0,user:M})}else _?.(null);this.loginModalRef=null},x=>{this.loginSubject.next({success:!1,error:"Login cancelled"}),this.loginModalRef=null})}closeLoginPopup(r){this.loginModalRef?.close(r),this.loginModalRef=null}loginWithRedirect(r=""){r?this.router.navigate(["/login"],{queryParams:{redirect:r}}):this.router.navigate(["/login"])}static#e=y=()=>(this.\u0275fac=function(_){return new(_||v)(T.KVO(w.u),T.KVO(S.Ix),T.KVO(j.Bq))},this.\u0275prov=T.jDH({token:v,factory:v.\u0275fac,providedIn:"root"}))}return y(),v})()},4421(B,U,u){u.d(U,{VideoToolsEditorModule:()=>Ae});var k=u(1917),F=u(3308),T=u(5312),w=u(2831),S=u(8823),j=u(3229),I=u(8486),y=u(9867),v=u(6111),r=u(656),_=u(65),x=u(4205);let M=(()=>{var s;class l{constructor(t,o){this.http=t,this.authService=o,this.apiUrl="https://video-apis.rgbkit.com/",this.apiUploadUrl="https://uploads.rgbkit.com/",this.apiKey="d41d8cd98f00b204e9800998ecf8427e",this.baseUrl=T.c.baseUrl,this.headers={"Content-Type":"application/json","X-API-KEY":this.apiKey}}onUploadVideoMultipart(t,o=null,n=null,a=null){this.user=this.authService.getUser();const p=this.user?this.user.documentId:this.user_ref_key;a?.(0),this.initiateUploadVideo(t,d=>{d?this.getMultiPartPresignedUrls({request_id:d.request_id,user_ref_key:p,file_key:d.file_key,upload_id:d.upload_id,total_parts:d.total_parts,url_expiration:3600},t,g=>{g&&this.completeMultiPartUploadRequest({request_id:d.request_id,file_key:d.file_key,upload_id:d.upload_id,parts:g.data.eTags},b=>{b&&b.data&&o&&(a?.(100),o(b))},b=>{n&&n(b)})},g=>{n&&n(g)},a):n(d)},d=>{n(d)})}initiateUploadVideo(t,o=null,n=null){let a={request_id:this.getRequestId(),user_ref_key:this.user?this.user.documentId:this.user_ref_key,file_name:t.name,file_size:t.size,content_type:t.type,part_size:5242880,upload_type:"edited_videos"};this.http.post(this.apiUploadUrl+"uploads/initiate_upload",a,{headers:this.headers}).subscribe(d=>{d&&d.data?o(d.data):n(d)},d=>{n(d)})}getMultiPartPresignedUrls(t,o,n=null,a=null,p=null){var g,d=this;this.http.post(this.apiUploadUrl+"uploads/get_presigned_urls",t,{headers:this.headers}).subscribe({next:(g=(0,F.A)(function*(h){try{if(!h?.data?.parts?.length)return void a?.(h);const m=h.data.parts,b=5242880,$=[],D=new Array(m.length).fill(0),ze=()=>{const C=D.reduce((O,V)=>O+V,0),P=o.size>0?Math.min(100,Math.round(C/o.size*100)):0;p?.(P)};for(let C=0,P=0;C<o.size;C+=b,P++){const O=o.slice(C,C+b,o.type);$.push(d.uploadVideo(O,m[P].presigned_url,P,V=>{D[P]=Math.min(V,O.size),ze()}))}const Ye=yield Promise.all($);h.data.eTags=Ye,n?.(h)}catch(m){a?.(m)}}),function(m){return g.apply(this,arguments)}),error:g=>{a?.(g)}})}completeMultiPartUploadRequest(t,o=null,n=null){this.http.post(this.apiUploadUrl+"uploads/complete_upload",t,{headers:this.headers}).subscribe(p=>{p&&p.data?o(p):n(p)},p=>{n()})}uploadVideo(t,o,n,a=null){return new Promise((p,d)=>{const c=new XMLHttpRequest;c.open("PUT",o,!0),c.setRequestHeader("Content-Type",t.type||"application/octet-stream"),c.upload.onprogress=g=>{g.lengthComputable&&a?.(g.loaded)},c.onload=()=>{if(c.status>=200&&c.status<300){a?.(t.size);const g=c.getResponseHeader("ETag")||c.getResponseHeader("Etag");p({part_number:n+1,etag:g?.replace(/"/g,"")||""})}else d({status:c.status,message:c.responseText})},c.onerror=()=>{d({status:c.status,message:"Upload failed due to network error"})},c.onabort=()=>{d({status:c.status,message:"Upload aborted"})},c.send(t)})}initiateJob(t){return this.http.post(this.apiUrl+"video/initiate_job",t,{headers:this.headers}).pipe((0,w.n)(n=>n?.data?.request_id?this.getJobStatus(n.data.request_id):(0,S.$)(()=>new Error("Request ID not found"))))}getJobStatus(t){const o=this.apiUrl+"video/job_status/"+t;return(0,j.O)(3e3,5e3).pipe((0,I.s)(15),(0,w.n)(()=>this.http.get(o,{headers:this.headers})),function X(s,l=!1){return(0,y.N)((i,t)=>{let o=0;i.subscribe((0,v._)(t,n=>{const a=s(n,o++);(a||l)&&t.next(n),!a&&t.complete()}
1))})}(n=>"completed"!==n?.data?.status,!0))}getFileType(t){switch(t.toLocaleLowerCase()){case"heic":return"image/heic";case"heif":return"image/heif";case"vob":return"video/vob";case"flv":return"video/x-flv";case"mkv":return"video/x-matroska";case"ts":return"text/plain";case"swf":return"application/x-shockwave-flash";case"avi":return"video/avi";case"mov":return"video/quicktime";case"wmv":return"video/x-ms-wmv";default:return t}}getRequestId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const o=16*Math.random()|0;return("x"==t?o:3&o|8).toString(16)})}static#e=s=()=>(this.\u0275fac=function(o){return new(o||l)(r.KVO(_.Qq),r.KVO(x.u))},this.\u0275prov=r.jDH({token:l,factory:l.\u0275fac}))}return s(),l})();var R=u(7829),f=u(8832),A=u(6507),z=u(3679),Y=u(3887),G=u(7476),N=u(7569),e=u(4303),H=u(8521),E=u(6875),L=u(9652),W=u(1265);const q=()=>[1,2,3,4,7];function J(s,l){if(1&s){const i=e.RV6();e.j41(0,"div",19)(1,"div",20)(2,"button",21),e.bIt("click",function(){r.eBV(i);const o=e.XpG(2);return r.Njj(o.onBack())}),e.j41(3,"span",22),e.EFF(4,"\u2190"),e.k0s()(),e.j41(5,"div",23),e.EFF(6),e.k0s()(),e.j41(7,"div",24)(8,"button",25),e.bIt("click",function(){r.eBV(i);const o=e.XpG(2);return r.Njj(o.onBack())}),e.EFF(9,"x"),e.k0s()()()}if(2&s){const i=e.XpG(2);e.R7$(6),e.JRh(i.getUploadFileName()||"Input Video")}}function K(s,l){if(1&s&&(e.j41(0,"div",16),e.DNE(1,J,10,1,"div",17),e.nrm(2,"video",18),e.k0s()),2&s){const i=e.XpG();e.R7$(),e.Y8G("ngIf",!i.isToolPopup),e.R7$(),e.Y8G("src",i.inputPreviewUrl(),e.B4B)}}function Q(s,l){if(1&s&&(e.j41(0,"div",31)(1,"span",32),e.EFF(2),e.k0s(),e.j41(3,"div",33)(4,"div",34),e.EFF(5),e.k0s(),e.j41(6,"div",35),e.EFF(7),e.k0s()()()),2&s){const i=l.$implicit,t=l.index;e.R7$(2),e.JRh(t+1),e.R7$(3),e.JRh(i.name),e.R7$(2),e.SpI("",(i.size/1048576).toFixed(2)," MB")}}function Z(s,l){if(1&s&&(e.j41(0,"div",29),e.DNE(1,Q,8,3,"div",30),e.k0s()),2&s){const i=e.XpG(2);e.R7$(),e.Y8G("ngForOf",i.getMergeFiles())}}function ee(s,l){if(1&s&&(e.j41(0,"div",26)(1,"div",27),e.EFF(2,"Input Videos"),e.k0s(),e.DNE(3,Z,2,1,"div",28),e.k0s()),2&s){const i=e.XpG();e.R7$(3),e.Y8G("ngIf",i.getMergeFiles().length)}}function te(s,l){if(1&s){const i=e.RV6();e.j41(0,"div",19)(1,"div",20)(2,"button",36),e.bIt("click",function(){r.eBV(i);const o=e.XpG(2);return r.Njj(o.onBack())}),e.j41(3,"span",22),e.EFF(4,"\u2190"),e.k0s()(),e.j41(5,"div",23),e.EFF(6),e.k0s()(),e.j41(7,"div",24)(8,"button",25),e.bIt("click",function(){r.eBV(i);const o=e.XpG(2);return r.Njj(o.onBack())}),e.EFF(9,"x"),e.k0s()()()}if(2&s){const i=e.XpG(2);e.R7$(6),e.JRh(i.getUploadFileName()||"Input Video")}}function oe(s,l){1&s&&e.eu8(0)}function ie(s,l){if(1&s&&(e.j41(0,"div",16),e.DNE(1,te,10,1,"div",17)(2,oe,1,0,"ng-container",12),e.k0s()),2&s){const i=e.XpG(),t=e.sdS(22);e.R7$(),e.Y8G("ngIf",!i.isToolPopup),e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function ne(s,l){1&s&&e.eu8(0)}function se(s,l){if(1&s){const i=e.RV6();e.j41(0,"button",40),e.bIt("click",function(){const o=r.eBV(i).$implicit,n=e.XpG(2);return r.Njj(n.selectFormat(o.value))}),e.EFF(1),e.k0s()}if(2&s){const i=l.$implicit,t=e.XpG(2);e.AVh("active",t.selectedFormat===i.value),e.R7$(),e.JRh(i.label)}}function re(s,l){if(1&s){const i=e.RV6();e.qex(0),e.j41(1,"div",37),e.DNE(2,se,2,3,"button",38),e.k0s(),e.j41(3,"button",39),e.bIt("click",function(){r.eBV(i);const o=e.XpG();return r.Njj(o.startProcessing())}),e.EFF(4),e.k0s(),e.bVm()}if(2&s){const i=e.XpG();e.R7$(2),e.Y8G("ngForOf",i.formats),e.R7$(),e.Y8G("disabled",i.isProcessing()||i.isUploading()),e.R7$(),e.SpI(" ",i.isProcessing()?"Convert
1ing...":"Convert Video"," ")}}function le(s,l){if(1&s){const i=e.RV6();e.j41(0,"button",40),e.bIt("click",function(){const o=r.eBV(i).$implicit,n=e.XpG(2);return r.Njj(n.quality=o.value)}),e.EFF(1),e.k0s()}if(2&s){const i=l.$implicit,t=e.XpG(2);e.AVh("active",t.quality==i.value),e.R7$(),e.JRh(i.label)}}function ae(s,l){if(1&s){const i=e.RV6();e.qex(0),e.j41(1,"div",37),e.DNE(2,le,2,3,"button",38),e.k0s(),e.j41(3,"button",41),e.bIt("click",function(){r.eBV(i);const o=e.XpG();return r.Njj(o.startProcessing())}),e.EFF(4),e.k0s(),e.bVm()}if(2&s){const i=e.XpG();e.R7$(2),e.Y8G("ngForOf",i.compressionResolutions),e.R7$(),e.Y8G("disabled",i.isProcessing()||i.isUploading()),e.R7$(),e.SpI(" ",i.isProcessing()?"Compressing...":"Compress Video"," ")}}function pe(s,l){if(1&s){const i=e.RV6();e.qex(0),e.j41(1,"div",42)(2,"div",43)(3,"label"),e.EFF(4,"Start Time (s)"),e.k0s(),e.j41(5,"input",44),e.bIt("ngModelChange",function(o){r.eBV(i);const n=e.XpG();return r.Njj(n.onStartTimeChange(o))}),e.k0s()(),e.j41(6,"div",43)(7,"label"),e.EFF(8,"End Time (s)"),e.k0s(),e.j41(9,"input",45),e.bIt("ngModelChange",function(o){r.eBV(i);const n=e.XpG();return r.Njj(n.onEndTimeChange(o))}),e.k0s()()(),e.j41(10,"button",46),e.bIt("click",function(){r.eBV(i);const o=e.XpG();return r.Njj(o.startProcessing())}),e.EFF(11),e.k0s(),e.bVm()}if(2&s){const i=e.XpG();e.R7$(5),e.Y8G("ngModel",i.startTime()),e.R7$(4),e.Y8G("ngModel",i.endTime())("max",i.videoDuration()),e.R7$(),e.Y8G("disabled",i.isProcessing()||i.isUploading()),e.R7$(),e.SpI(" ",i.isProcessing()?"Trimming...":"Trim Video"," ")}}function de(s,l){if(1&s){const i=e.RV6();e.qex(0),e.j41(1,"input",47,2),e.bIt("change",function(o){r.eBV(i);const n=e.XpG();return r.Njj(n.onMergeFilesSelected(o))}),e.k0s(),e.j41(3,"div",48)(4,"div",49),e.EFF(5,"Merge order"),e.k0s(),e.j41(6,"div",50),e.EFF(7),e.k0s()(),e.j41(8,"button",41),e.bIt("click",function(){r.eBV(i);const o=e.XpG();return r.Njj(o.startProcessing())}),e.EFF(9),e.k0s(),e.bVm()}if(2&s){const i=e.XpG();e.R7$(7),e.JRh(i.getMergeUploadStatus()),e.R7$(),e.Y8G("disabled",i.isProcessing()||i.isUploading()),e.R7$(),e.SpI(" ",i.isProcessing()?"Merging...":"Merge Videos"," ")}}function ue(s,l){if(1&s){const i=e.RV6();e.j41(0,"button",40),e.bIt("click",function(){const o=r.eBV(i).$implicit,n=e.XpG(2);return r.Njj(n.selectAudioFormat(o.value))}),e.EFF(1),e.k0s()}if(2&s){const i=l.$implicit,t=e.XpG(2);e.AVh("active",t.audioFormat===i.value),e.R7$(),e.JRh(i.label)}}function ce(s,l){if(1&s){const i=e.RV6();e.qex(0),e.j41(1,"div",51),e.EFF(2,"Audio Format"),e.k0s(),e.j41(3,"div",37),e.DNE(4,ue,2,3,"button",38),e.k0s(),e.j41(5,"button",39),e.bIt("click",function(){r.eBV(i);const o=e.XpG();return r.Njj(o.startProcessing())}),e.EFF(6),e.k0s(),e.bVm()}if(2&s){const i=e.XpG();e.R7$(4),e.Y8G("ngForOf",i.audioFormats),e.R7$(),e.Y8G("disabled",i.isProcessing()||i.isUploading()),e.R7$(),e.SpI(" ",i.isProcessing()?"Extracting...":"Extract Audio"," ")}}function ge(s,l){if(1&s&&(e.j41(0,"div",57)(1,"div")(2,"strong"),e.EFF(3,"Video length:"),e.k0s(),e.EFF(4),e.k0s(),e.j41(5,"div")(6,"strong"),e.EFF(7,"GIF clip:"),e.k0s(),e.EFF(8),e.k0s()()),2&s){const i=e.XpG(2);e.R7$(4),e.SpI(" ",i.videoDuration(),"s"),e.R7$(4),e.Lme(" ",i.startTime(),"s to ",i.getGifEndTime(),"s")}}function he(s,l){if(1&s){const i=e.RV6();e.qex(0),e.DNE(1,ge,9,3,"div",52),e.j41(2,"div",42)(3,"div",53)(4,"label"),e.EFF(5,"Start Time (s)"),e.k0s(),e.j41(6,"input",54),e.bIt("ngModelChange",function(o){r.eBV(i);const n=e.XpG();return r.Njj(n.onStartTimeChange(o))}),e.k0s()(),e.j41(7,"div",53)(8,"label"),e.EFF(9,"Duration (s)"),e.k0s(),e.j41(10,"input",55),e.bIt("ngModelChange",function(o){r.eBV(i);const n=e.XpG();return r.Njj(n.onDurationChange(o))}),e.k0s()()(),e.j41(11,"p",56),e.EFF(12," Choose the start point, clip duration, and output width for your GIF. "),e.k0s(),e.j41(13,"button",46),e.bIt("click",function(){r.eBV(i);const o=e.XpG();return r.Njj(o.startProcessing())}),e.EFF(14),e.k0s(),e.bVm()}if(2&s){const i=e.XpG();e.R7$(),e.Y8G("ngIf",i.videoDuration()),e.R7$(5),e.Y8G("ngModel",i.startTime())("max",i.videoDuration()-1),e.R7$(4),e.Y8G("ngModel",i.duration)("max",i.getAvailableGifDuration()),e.R7$(3),e.Y8G("disabled",i.isProcessing()||i.isUploading()),e.R7$(),e.SpI(" ",i.isProcessing()?"Creating GIF...":"Create GIF"," ")}}function me(s,l){if(1&s){const i=e.RV6();e.j41(0,"button",40),e.bIt("click",function(){const o=r.eBV(i).$implicit,n=e.XpG(2);
1return r.Njj(n.selectResolution(o.value))}),e.EFF(1),e.k0s()}if(2&s){const i=l.$implicit,t=e.XpG(2);e.AVh("active",t.selectedResolution()===i.value),e.R7$(),e.SpI(" ",i.label," ")}}function _e(s,l){if(1&s){const i=e.RV6();e.qex(0),e.j41(1,"div",51),e.EFF(2,"Resolution"),e.k0s(),e.j41(3,"div",37),e.DNE(4,me,2,3,"button",38),e.k0s(),e.j41(5,"button",39),e.bIt("click",function(){r.eBV(i);const o=e.XpG();return r.Njj(o.startProcessing())}),e.EFF(6),e.k0s(),e.bVm()}if(2&s){const i=e.XpG();e.R7$(4),e.Y8G("ngForOf",i.resolutions),e.R7$(),e.Y8G("disabled",i.isProcessing()||i.isUploading()),e.R7$(),e.SpI(" ",i.isProcessing()?"Changing Resolution...":"Change Resolution"," ")}}function fe(s,l){if(1&s){const i=e.RV6();e.j41(0,"button",64),e.bIt("click",function(){const o=r.eBV(i).$implicit,n=e.XpG(3);return r.Njj(n.openSelectedToolPopup(o.id))}),e.EFF(1),e.k0s()}if(2&s){const i=l.$implicit;e.R7$(),e.SpI(" ",i.label," ")}}function be(s,l){if(1&s&&(e.j41(0,"div",59)(1,"div",60),e.EFF(2,"Other Tools"),e.k0s(),e.j41(3,"div",61),e.EFF(4," Open the processed result in another tool without changing the current screen. "),e.k0s(),e.j41(5,"div",62),e.DNE(6,fe,2,1,"button",63),e.k0s()()),2&s){const i=e.XpG(2);e.R7$(6),e.Y8G("ngForOf",i.getNextToolOptions())}}function ve(s,l){if(1&s&&(e.qex(0),e.DNE(1,be,7,1,"div",58),e.bVm()),2&s){const i=e.XpG();e.R7$(),e.Y8G("ngIf",i.canShowNextTools())}}function xe(s,l){if(1&s&&(e.j41(0,"div",65)(1,"div",66)(2,"div",67),e.nrm(3,"span"),e.k0s(),e.j41(4,"div",68),e.EFF(5),e.k0s(),e.j41(6,"div",69),e.nrm(7,"div",70),e.k0s(),e.j41(8,"div",71),e.EFF(9),e.k0s(),e.j41(10,"div",72)(11,"span"),e.EFF(12),e.k0s(),e.j41(13,"span"),e.EFF(14),e.k0s()()()()),2&s){const i=e.XpG();e.R7$(3),e.AVh("processing-state",i.isProcessing()&&!i.isUploading()),e.R7$(2),e.JRh(i.getProgressPopupTitle()),e.R7$(2),e.xc7("width",i.getProgressPopupPercent(),"%"),e.AVh("upload-progress-fill-processing",i.isProcessing()&&!i.isUploading()),e.R7$(2),e.SpI("",i.getProgressPopupPercent(),"%"),e.R7$(3),e.JRh(i.getProgressPopupSummary()),e.R7$(2),e.JRh(i.getProgressPopupHint())}}function Te(s,l){if(1&s){const i=e.RV6();e.j41(0,"div",65)(1,"div",73)(2,"button",74),e.bIt("click",function(){r.eBV(i);const o=e.XpG();return r.Njj(o.closeMergeUploadPopup())}),e.EFF(3,"x"),e.k0s(),e.j41(4,"div",67),e.nrm(5,"span"),e.k0s(),e.j41(6,"div",75),e.EFF(7,"Add videos to merge"),e.k0s(),e.j41(8,"div",76),e.EFF(9," Video merger needs at least 2 files. Now upload minimum 2 videos to merge. "),e.k0s(),e.j41(10,"input",47,3),e.bIt("change",function(o){r.eBV(i);const n=e.XpG();return r.Njj(n.onMergeFilesSelected(o))}),e.k0s(),e.j41(12,"button",77),e.bIt("click",function(){r.eBV(i);const o=e.sdS(11),n=e.XpG();return r.Njj(n.openMergeFilePicker(o))}),e.EFF(13," Upload More Videos "),e.k0s()()()}}function Ce(s,l){if(1&s){const i=e.RV6();e.j41(0,"button",83),e.bIt("click",function(){const o=r.eBV(i).$implicit,n=e.XpG(2);return r.Njj(n.downloadHistoryItem(o.url))}),e.EFF(1),e.k0s()}if(2&s){const i=l.$implicit;e.R7$(),e.SpI(" ",i.filename," ")}}function Pe(s,l){if(1&s){const i=e.RV6();e.j41(0,"div",65)(1,"div",78)(2,"button",79),e.bIt("click",function(){r.eBV(i);const o=e.XpG();return r.Njj(o.closeDownloadHistoryPopup())}),e.EFF(3,"x"),e.k0s(),e.j41(4,"div",80),e.EFF(5,"Choose a file to download"),e.k0s(),e.j41(6,"div",76),e.EFF(7," Multiple outputs are available for this session. "),e.k0s(),e.j41(8,"div",81),e.DNE(9,Ce,2,1,"button",82),e.k0s()()()}if(2&s){const i=e.XpG();e.R7$(9),e.Y8G("ngForOf",i.getOutputHistory())}}function Me(s,l){if(1&s&&e.nrm(0,"video",88),2&s){const i=e.XpG(3);e.Y8G("src",i.resultUrl(),e.B4B)}}function ke(s,l){if(1&s&&e.nrm(0,"audio",89),2&s){const i=e.XpG(3);e.Y8G("src",i.resultUrl(),e.B4B)}}function Fe(s,l){if(1&s&&e.nrm(0,"img",90),2&s){const i=e.XpG(3);e.Y8G("src",i.resultUrl(),e.B4B)}}function we(s,l){if(1&s){const i=e.RV6();e.j41(0,"div"),e.DNE(1,Me,1,1,"video",84)(2,ke,1,1,"audio",85)(3,Fe,1,1,"img",86),e.j41(4,"button",87),e.bIt("click",function(){r.eBV(i);const o=e.XpG(2);return r.Njj(o.downloadResult())}),e.EFF(5),e.k0s()()}if(2&s){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",e.lJ4(4,q).includes(i.currentTool)),e.R7$(),e.Y8G("ngIf",5===i.currentTool),e.R7$(),e.Y8G("ngIf",i.isGifResult()),e.R7$(2),e.SpI("Download ",i.getResultLabel())}}function ye(s,l){if(1&s&&e.DNE(0,we,6,5,"div",13),2&s){const i=e.XpG();e.Y8G("ngIf",i.getCurrentToolResult())}}function Re(s,l){1&s&&e.nrm(0,"ri",99)}function Oe(s,l){1&s&&e.nrm(0,"ri",100)}function Ue(s,l){1&s&&e.nrm(0,"ri",101)}function Se(s,l){1&s&&e.nrm(0,"ri",102)}function je(s,l){1&s&&e.nrm(0,"ri",103)}function Ie(s,l){1&s&&e.nrm(0,"ri",104)}function Ve(s,l){1&s&&e.nrm(0,"ri",105)}function Ge(s,l){if(1&s&&(e.j41(0,"h5",91),e.DNE(1,Re,1,0,"ri",92)(2,Oe,1,0,"ri",93)(3,Ue,1,0,"ri",94)(4,Se,1,0,"ri",95)(5,je,1,0,"ri",96)(6,Ie,1,0,"ri",97)(7,Ve,1,0,"ri",98),e.EFF(8),e.k0s()),2&s){const i=e.XpG();e.R7$(),e.Y8G("ngIf",1===i.currentTool),e.R7$(),e.Y8G("ngIf",2===i.currentTool),e.R7$(),e.Y8G("ngIf",3===i.currentTool),e.R7$(),e.Y8G("ngIf",4===i.currentTool),e.R7$(),e.Y8G("ngIf",5===i.currentTool),e.R7$(),e.Y8G("ngIf",6===i.currentTool),e.R7$(),e.Y8G("ngIf",7===i.currentTool),e.R7$(),e.SpI(" ",1===i.currentTool?"Format Converter":2===i.currentTool?"Video Compressor":3===i.currentTool?"Video Trimmer":4===i.currentTool?"Video Merger":5===i.currentTool?"Extract Audio":6===i.currentTool?"Gif Maker":7===i.currentTool?"Change Resolution":""," ")}}function Ne(s,l){if(1&s&&e.nrm(0,"app-tool-container",115),2&s){const i=e.XpG(2);e.Y8G("currentTool",i.popupToolId())("inputVideoSourceUrl",i.popupToolSourceUrl())("inputVideoSourceName",i.popupToolSourceName())("isToolPopup",!0)}}function Ee(s,l){if(1&s){const i=e.RV6();e.j41(0,"div",106)(1,"div",107),e.bIt("click",function(){r.eBV(i);const o=e.XpG();
1return r.Njj(o.closeSelectedToolPopup())}),e.k0s(),e.j41(2,"div",108)(3,"div",109)(4,"div")(5,"div",110),e.EFF(6),e.k0s(),e.j41(7,"div",111),e.EFF(8,"This tool runs in a popup and does not change the current screen state."),e.k0s()(),e.j41(9,"button",112),e.bIt("click",function(){r.eBV(i);const o=e.XpG();return r.Njj(o.closeSelectedToolPopup())}),e.EFF(10,"x"),e.k0s()(),e.j41(11,"div",113),e.DNE(12,Ne,1,4,"app-tool-container",114),e.k0s()()()}if(2&s){const i=e.XpG();e.R7$(6),e.JRh(i.getToolLabel(i.popupToolId())),e.R7$(6),e.Y8G("ngIf",i.popupToolId()&&i.popupToolSourceUrl())}}let $e=(()=>{var s;class l{constructor(){this.document=(0,r.WQX)(r.qQL),this.videoToolService=(0,r.WQX)(M),this.toastService=(0,r.WQX)(W.f),this.commonService=(0,r.WQX)(E.h),this.loginService=(0,r.WQX)(L.H),this.authService=(0,r.WQX)(x.u),this.uploadedResults=[],this.isLoginRequired=!1,this.lastUploadSignature="",this.lastTool=0,this.inputPreviewObjectUrl=null,this.slug="",this.currentTool=1,this.uploadedFile=null,this.uploadedFiles=[],this.inputVideoSourceUrl=null,this.inputVideoSourceName="",this.isToolPopup=!1,this.selectedVideoFormat="",this.systemRefKey="",this.backToUpload=new e.bkB,this.nextToolsVisibilityChange=new e.bkB,this.isUploading=(0,r.vPA)(!1),this.uploadProgress=(0,r.vPA)(0),this.isProcessing=(0,r.vPA)(!1),this.progress=(0,r.vPA)(0),this.resultUrl=(0,r.vPA)(null),this.inputPreviewUrl=(0,r.vPA)(null),this.outputFileName=(0,r.vPA)(""),this.errorMessage=(0,r.vPA)(""),this.downloadHistoryPopupOpen=(0,r.vPA)(!1),this.outputHistory=(0,r.vPA)([]),this.mergeUploadPopupDismissed=(0,r.vPA)(!1),this.toolPopupOpen=(0,r.vPA)(!1),this.popupToolId=(0,r.vPA)(null),this.popupToolSourceUrl=(0,r.vPA)(null),this.popupToolSourceName=(0,r.vPA)(""),this.toolResults=new Map,this.nextToolOptions=[{id:1,label:"Format Converter"},{id:2,label:"Compressor"},{id:3,label:"Trimmer & Cutter"},{id:5,label:"Extract Audio"},{id:6,label:"Gif Maker"},{id:7,label:"Change Resolution"}],this.duration=0,this.width=0,this.sourceVideoWidth=(0,r.vPA)(0),this.selectedFormat="mp4",this.quality=18,this.resolution="720",this.compressionLevel=50,this.estimatedSize=0,this.startTime=(0,r.vPA)(0),this.endTime=(0,r.vPA)(60),this.videoDuration=(0,r.vPA)(0),this.audioFormat="mp3",this.audioQuality=192,this.selectedResolution=(0,r.vPA)("1920x1080"),this.formats=[{value:"mp4",label:"MP4"},{value:"mov",label:"MOV"},{value:"avi",label:"AVI"},{value:"mkv",label:"MKV"},{value:"webm",label:"WEBM"}],this.audioFormats=[{value:"mp3",label:"MP3"},{value:"wav",label:"WAV"},{value:"aac",label:"AAC"},{value:"ogg",label:"OGG"}],this.resolutions=[{value:"1920x1080",label:"1080(Full HD)"},{value:"1280x720",label:"720(HD)"},{value:"854x480",label:"480(SD)"},{value:"640x360",label:"360(Low)"}],this.compressionResolutions=[{value:18,label:"Best Quality"},{value:20,label:"High Quality"},{value:23,label:"Medium Quality"},{value:28,label:"Low Quality"}]}selectResolution(t){this.selectedResolution.set(t)}ngOnInit(){}ngOnChanges(){this.syncInputPreviewUrl();const t=this.getUploadSignature();if(this.currentTool!==this.lastTool&&(4===this.currentTool&&this.uploadedFiles.length<2&&this.mergeUploadPopupDismissed.set(!1),this.lastTool=this.currentTool),t&&t!==this.lastUploadSignature?(this.lastUploadSignature=t,this.toolResults.clear(),this.resultUrl.set(null),this.outputFileName.set(""),this.uploadedResult=null,this.uploadedResults=[],this.outputHistory.set([]),this.errorMessage.set(""),this.downloadHistoryPopupOpen.set(!1),this.toolPopupOpen.set(!1),this.popupToolId.set(null),this.popupToolSourceUrl.set(null),this.popupToolSourceName.set(""),4===this.currentTool?this.uploadedFiles.length>1?this.uploadMergeFiles(this.uploadedFiles):this.mergeUploadPopupDismissed.set(!1):this.inputVideoSourceUrl&&this.currentTool>0?(this.inputVideoUrl=this.inputVideoSourceUrl,(3===this.currentTool||6===this.currentTool)&&this.loadVideoMetadata()):this.uploadedFile&&this.currentTool>0&&(this.onFileUploaded(this.uploadedFile),(3===this.currentTool||6===this.currentTool)&&this.loadVideoMetadata())):(this.uploadedFile||this.inputVideoSourceUrl)&&(3===this.currentTool||6===this.currentTool)&&this.loadVideoMetadata(),this.updateCurrentToolResult(),this.slug&&1===this.currentTool){const o=this.slug.includes("-to-")?this.slug.split("-to-").pop():this.slug;this.selectedFormat=this.formats.find(n=>n.value===o)?.value||"mp4"}}
1updateCurrentToolResult(){const t=this.getCurrentToolResult();t?(this.resultUrl.set(t.url),this.outputFileName.set(t.filename)):(this.resultUrl.set(null),this.outputFileName.set("")),this.emitNextToolsVisibility()}selectFormat(t){this.selectedFormat=t}updateEstimatedSize(){this.uploadedFile&&(this.estimatedSize=Math.round(this.uploadedFile.size/1048576*(100-this.compressionLevel)/100),this.onFileUploaded(this.uploadedFile))}onCompressionLevelChange(){this.updateEstimatedSize()}loadVideoMetadata(){const t=this.inputPreviewUrl();if(!t)return;const o=document.createElement("video");o.preload="metadata",o.src=t,o.onloadedmetadata=()=>{const n=Math.max(1,Math.floor(o.duration||0)),a=Math.max(1,Math.floor(o.videoWidth||0));this.videoDuration.set(n),this.sourceVideoWidth.set(a),6===this.currentTool?this.initializeGifSettings(n,a):(this.startTime.set(Math.min(this.startTime(),Math.max(n-1,0))),this.endTime.set(Math.min(n,Math.max(this.startTime()+1,Math.min(60,n)))))},o.onerror=()=>{}}onStartTimeChange(t){const o=this.toWholeNumber(t);if(6===this.currentTool){const n=Math.max(this.videoDuration()-Math.max(this.duration,1),0);return void this.startTime.set(Math.max(0,Math.min(o,n)))}this.startTime.set(Math.max(0,Math.min(o,this.endTime()-1)))}onEndTimeChange(t){this.endTime.set(Math.min(this.videoDuration(),Math.max(this.toWholeNumber(t),this.startTime()+1)))}selectAudioFormat(t){this.audioFormat=t}getCurrentToolResult(){return this.toolResults.get(this.currentTool)||null}startProcessing(){if(4===this.currentTool&&this.uploadedFiles.length<2)return void this.mergeUploadPopupDismissed.set(!1);const t=this.getTotalInputSize();if(this.isLoginRequired=t>this.commonService.loginRequiredVideoFileSize,!this.isLoginRequired||this.authService.isLoggedIn()){if(3==this.currentTool){if(this.startTime()>=this.endTime()){const o="Start time must be less than end time";return this.errorMessage.set(o),void this.toastService.error(o)}if(this.startTime()<0||this.endTime()>this.videoDuration()){const o="Start time and end time must be between 0 and video duration";return this.errorMessage.set(o),void this.toastService.error(o)}}if(6==this.currentTool){const o=this.getAvailableGifDuration();if(this.startTime()<0||this.startTime()>=this.videoDuration()){const n="Start time must be within the video duration";return this.errorMessage.set(n),void this.toastService.error(n)}if(this.duration<1||this.duration>o){const n=`GIF duration must be between 1 and ${o} seconds`;return this.errorMessage.set(n),void this.toastService.error(n)}if(this.width<1){const n="GIF width must be greater than 0";return this.errorMessage.set(n),void this.toastService.error(n)}}this.processVideo()}else this.loginService.openLoginPopup({title:"Login Required for Large Files"},()=>{this.processVideo()})}processVideo(){this.isProcessing.set(!0),this.progress.set(10),this.resultUrl.set(null),this.errorMessage.set("");const t=this.prepareData();this.videoToolService.initiateJob(t).subscribe({next:o=>{if("completed"===o.data.status){this.progress.set(100);const n=o.data.filename||`output-${Date.now()}`,a=o.data.output_url;this.toolResults.set(this.currentTool,{url:a,filename:n}),this.addOutputToHistory(a,n),this.outputFileName.set(n),this.resultUrl.set(a),this.emitNextToolsVisibility(),this.toastService.success(this.getSuccessMessage())}else this.progress.set(this.getProcessingProgress(o))},error:o=>{this.isProcessing.set(!1),this.progress.set(0),this.errorMessage.set(o.error?.message||"Processing failed. Please check your API."),this.emitNextToolsVisibility(),this.toastService.error(o.error?.message||"Processing failed. Please check your API.")},complete:()=>{this.isProcessing.set(!1)}})}downloadResult(){const t=this.resultUrl();t&&this.openDownloadUrl(t)}closeDownloadHistoryPopup(){this.downloadHistoryPopupOpen.set(!1)}downloadHistoryItem(t){this.openDownloadUrl(t),this.downloadHistoryPopupOpen.set(!1)}getOutputHistory(){return[...this.outputHistory()].reverse()}canShowNextTools(){return!this.isToolPopup&&!!this.resultUrl()&&[1,2,3,4,7].includes(this.currentTool)}showSelectedToolPopup(){return this.toolPopupOpen()&&!!this.popupToolId()&&!!this.popupToolSourceUrl()}getNextToolOptions(){return this.nextToolOptions.filter(t=>t.id!==this.currentTool)}getToolLabel(t){return this.nextToolOptions.find(o=>o.id===t)?.label||"Selected Tool"}openSelectedToolPopup(t){const o=this.resultUrl();o&&(this.popupToolId.set(t),this.popupToolSourceUrl.set(o),this.popupToolSourceName.set(this.outputFileName()),this.toolPopupOpen.set(!0))}closeSelectedToolPopup(){this.toolPopupOpen.set(!1),this.popupToolId.set(null),this.popupToolSourceUrl.set(null),this.popupToolSourceName.set("")}onBack(){this.isUploading.set(!1),this.uploadProgress.set(0),this.isProcessing.set(!1),this.progress.set(0),this.resultUrl.set(null),this.errorMessage.set(""),this.downloadHistoryPopupOpen.set(!1),this.toolPopupOpen.set(!1),this.popupToolId.set(null),this.popupToolSourceUrl.set(null),this.popupToolSourceName.set(""),this.emitNextToolsVisibility(),this.backToUpload.emit()}uploadMergeFiles(t){var o=this;return(0,F.A)(function*(){if(!t.length)return;o.isUploading.set(!0),o.uploadProgress.set(0),o.uploadedResults=[],o.errorMessage.set("");const n=t.reduce((p,d)=>p+d.size,0);let a=0;try{for(let p=0;p<t.length;p++){const d=t[p],c=yield o.uploadSingleFile(d,g=>{const h=Math.round(d.size*g/100),m=n>0?Math.round((a+h)/n*100):0;o.uploadProgress.set(Math.min(100,m))});o.uploadedResults.push(c),a+=d.size,o.uploadProgress.set(n>0?Math.round(a/n*100):100)}o.isUploading.set(!1),o.toastService.success("Videos uploaded successfully!")}catch(p){o.isUploading.set(!1),o.uploadProgress.set(0),o.uploadedResults=[],o.toastService.error(p?.msg||"Something went wrong! pls try again"),o.isToolPopup||o.videoToolService.backFn?.()}})()}onDurationChange(t){const o=this.getAvailableGifDuration(),n=this.toWholeNumber(t);this.duration=Math.max(1,Math.min(n,o)),this.startTime.set(Math.min(this.startTime(),Math.max(this.videoDuration()-this.duration,0)))}onWidthChange(t){this.width=Math.max(1,this.toWholeNumber(t))}ngOnDestroy(){this.cleanupInputPreviewUrl()}onFileUploaded(t){let o=t.type;o||(o=t.name.substring(t.name.lastIndexOf(".")+1),o=this.videoToolService.getFileType(o)),"txt"!=t.name.substring(t.name.lastIndexOf(".")+1)?(this.isUploading.set(!0),this.uploadProgress.set(0),this.uploadedResult=null,this.errorMessage.set(""),this.videoToolService.onUploadVideoMultipart(t,n=>{n&&n?.data?.uploaded_file_url&&(this.inputVideoUrl=n?.data?.uploaded_file_url,this.uploadedResult=n.data,this.uploadProgress.set(100),this.isUploading.set(!1),this.toastService.success("File uploaded successfully!"))},n=>{this.isUploading.set(!1),this.uploadProgress.set(0),n&&this.toastService.error(n.msg||"Something went wrong! pls try again"),this.isToolPopup||this.videoToolService.backFn?.()},n=>{this.uploadProgress.set(n)})):this.toastService.error("")}getMergeFiles(){return this.uploadedFiles}shouldShowMergeUploadPopup(){return 4===this.currentTool&&!this.isUploading()&&!this.isProcessing()&&!this.mergeUploadPopupDismissed()&&this.uploadedFiles.length<2}closeMergeUploadPopup(){this.mergeUploadPopupDismissed.set(!0)}openMergeFilePicker(t){t.click()}onMergeFilesSelected(t){const o=t.target,n=Array.from(o.files||[]);if(!n.length)return;const a=n.filter(p=>p.type.startsWith("video/"));if(!a.length)return this.toastService.error("Please choose valid video files to merge."),void(o.value="");this.mergeUploadPopupDismissed.set(!1),this.uploadedFiles=a,this.uploadMergeFiles(this.uploadedFiles),o.value=""}getMergeUploadStatus(){return this.uploadedFiles.length?this.isUploading()?`Uploading ${Math.min(this.uploadedResults.length+1,this.uploadedFiles.length)} of ${this.uploadedFiles.length} videos...`:this.uploadedResults.length===this.uploadedFiles.length&&this.uploadedFiles.length>1?`${this.uploadedFiles.length} videos ready to merge`:"Upload all videos before starting merge."
1:"Add videos to merge them in the selected order."}getUploadFileName(){return 4===this.currentTool&&this.uploadedFiles.length?1===this.uploadedFiles.length?this.uploadedFiles[0].name:`${this.uploadedFiles.length} videos selected`:this.uploadedFile?.name||this.inputVideoSourceName||""}getUploadFileSize(){return this.formatBytes(this.getTotalInputSize())}getUploadedSize(){const t=this.getTotalInputSize();if(!t)return"0 B";const o=Math.round(t*this.uploadProgress()/100);return this.formatBytes(o)}showProgressPopup(){return this.isUploading()||this.isProcessing()}getProgressPopupTitle(){return this.isUploading()?this.getUploadingTitle():this.getProcessingTitle()}getProgressPopupPercent(){return this.isUploading()?this.uploadProgress():this.progress()}getProgressPopupHint(){return this.isUploading()?100===this.uploadProgress()?"Finalizing upload...":4===this.currentTool?"Please wait while your videos upload":"Please wait while the file uploads":100===this.progress()?"Finalizing output...":"Please wait while we process your video"}getProgressPopupSummary(){return this.isUploading()?`${this.getUploadedSize()} / ${this.getUploadFileSize()}`:this.getProcessingTitle()}prepareData(){const t={};switch(4===this.currentTool?(t.request_id=this.uploadedResults[0]?.request_id,t.input_video_urls=this.uploadedResults.map(o=>o?.uploaded_file_url).filter(Boolean)):this.uploadedResult?(t.request_id=this.uploadedResult?.request_id,t.input_video_urls=[this.uploadedResult?.uploaded_file_url]):this.uploadedResults.length>0?(t.request_id=this.uploadedResults[0]?.request_id,t.input_video_urls=[this.uploadedResults[0]?.uploaded_file_url]):this.inputVideoUrl&&(t.request_id=this.videoToolService.getRequestId(),t.input_video_urls=[this.inputVideoUrl]),this.currentTool){case 1:t.operation="transcode",t.parameters={transcode:{output_format:this.selectedFormat}};break;case 2:t.operation="compress",t.parameters={compress:{quality:this.quality}};break;case 3:t.operation="trim",t.parameters={trim:{start_time:this.formatTimeAsHms(this.startTime()),end_time:this.formatTimeAsHms(this.endTime())}};break;case 4:t.operation="merge",t.parameters={transcode:{output_format:"mp4"}};break;case 5:t.operation="extract_audio",t.parameters={extract_audio:{output_format:this.audioFormat}};break;case 6:t.operation="video_to_gif",t.parameters={gif:{start_time:this.formatTimeAsHms(this.startTime()),duration:this.duration}};break;case 7:t.operation="change_resolution",t.parameters={resolution:{resolution:this.selectedResolution()}}}return t}getSuccessMessage(){return 6===this.currentTool?"GIF created successfully!":"Video processed successfully!"}getAvailableGifDuration(){return Math.max(this.videoDuration()-this.startTime(),1)}getGifEndTime(){return Math.min(this.startTime()+this.duration,this.videoDuration())}getResultLabel(){return 5===this.currentTool?"Audio":6===this.currentTool?"GIF":"Video"}isGifResult(){return 6===this.currentTool}initializeGifSettings(t,o){const n=Math.min(5,t);this.startTime.set(Math.min(this.startTime(),Math.max(t-1,0))),this.duration=this.duration>0?Math.min(this.duration,this.getAvailableGifDuration()):n,this.width=this.width>0?this.width:o}toWholeNumber(t){const o=Number(t);return Number.isFinite(o)?Math.floor(o):0}formatTimeAsHms(t){const o=Math.max(0,this.toWholeNumber(t));return[Math.floor(o/3600),Math.floor(o%3600/60),o%60].map(d=>d.toString().padStart(2,"0")).join(":")}getProcessingTitle(){switch(this.currentTool){case 1:return"Converting video";case 2:return"Compressing video";case 3:return"Trimming video";case 4:return"Merging videos";case 5:return"Extracting audio";case 6:return"Creating GIF";case 7:return"Changing resolution";default:return"Processing video"}}getUploadingTitle(){return 4===this.currentTool?"Uploading videos":"Uploading video"}getProcessingProgress(t){const o=this.extractServerProgress(t);if(null!==o)return Math.max(this.progress(),Math.min(o,95));const n=String(t?.data?.status||"").toLowerCase();return"queued"===n||"pending"===n?Math.max(this.progress(),20):Math.min(this.progress()+15,95)}extractServerProgress(t){const o=[t?.data?.progress,t?.data?.progress_percent,t?.data?.percentage,t?.data?.percent];for(const n of o){const a=Number(n);if(Number.isFinite(a))return Math.max(0,Math.min(100,a))}return null}formatBytes(t){if(!t)return"0 B";const o=["B","KB","MB","GB"];let n=t,a=0;for(;n>=1024&&a<o.length-1;)n/=1024,a++;return`${n.toFixed(0===a?0:1)} ${o[a]}`}getTotalInputSize(){return 4===this.currentTool&&this.uploadedFiles.length?this.uploadedFiles.reduce((t,o)=>t+o.size,0):this.uploadedFile?.size||0}uploadSingleFile(t,o){return new Promise((n,a)=>{this.videoToolService.onUploadVideoMultipart(t,p=>{p?.data?.uploaded_file_url?(4!==this.currentTool&&(this.inputVideoUrl=p?.data?.uploaded_file_url,this.uploadedResult=p.data),n(p.data)):a(p)},p=>a(p),p=>o(p))})}syncInputPreviewUrl(){return this.cleanupInputPreviewUrl(),this.uploadedFile?(this.inputPreviewObjectUrl=URL.createObjectURL(this.uploadedFile),void this.inputPreviewUrl.set(this.inputPreviewObjectUrl)):this.uploadedFiles.length>0?(this.inputPreviewObjectUrl=URL.createObjectURL(this.uploadedFiles[0]),void this.inputPreviewUrl.set(this.inputPreviewObjectUrl)):void this.inputPreviewUrl.set(this.inputVideoSourceUrl||null)}cleanupInputPreviewUrl(){this.inputPreviewObjectUrl&&(URL.revokeObjectURL(this.inputPreviewObjectUrl),this.inputPreviewObjectUrl=null)}addOutputToHistory(t,o){const n=this.outputHistory().filter(a=>a.url!==t).concat({url:t,filename:o,toolId:this.currentTool});this.outputHistory.set(n)}emitNextToolsVisibility(){this.nextToolsVisibilityChange.emit(this.canShowNextTools())}openDownloadUrl(t){window.open(t,"_blank")}getUploadSignature(){return 4===this.currentTool&&this.uploadedFiles.length?this.uploadedFiles.map(t=>`${t.name}:${t.size}:${t.lastModified}`).join("|"):this.uploadedFile?`${this.uploadedFile.name}:${this.uploadedFile.size}:${this.uploadedFile.lastModified}`:this.inputVideoSourceUrl?`url:${this.inputVideoSourceUrl}:${this.inputVideoSourceName}`:""}static#e=s=()=>(this.\u0275fac=function(o){return new(o||l)},this.\u0275cmp=e.VBU({type:l,selectors:[["app-tool-container"]],inputs:{slug:"slug",currentTool:"currentTool",uploadedFile:"uploadedFile",uploadedFiles:"uploadedFiles",inputVideoSourceUrl:"inputVideoSourceUrl",inputVideoSourceName:"inputVideoSourceName",isToolPopup:"isToolPopup"},outputs:{backToUpload:"backToUpload",nextToolsVisibilityChange:"nextToolsVisibilityChange"},standalone:!1,features:[e.OA$],decls:26,vars:16,consts:[["outputPreview",""],["toolHeading",""],["mergeInlineFileInput",""],["mergeFileInput",""],[1,"tool-container-content","mb-7"],[1,"tool-workspace-layout"],[1,"tool-media-panel"],["class","tool-media-card",4,"ngIf"],["class","tool-media-card d-none d-md-block",4,"ngIf"],[1,"tool-properties-panel"],[1,"card","shadow-sm","tool-properties-card"],[1,"card-body"],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","upload-popup-overlay",4,"ngIf"],["class","tool-workspace-popup",4,"ngIf"],[1,"tool-media-card"],["class","tool-media-header",4,"ngIf"],["controls","",1,"w-100","rounded-3","shadow","media-preview","media-preview-input",3,"src"],[1,"tool-media-header"],[1,"tool-media-left"],["type","button","aria-label","Back",1,"tool-media-back-btn",3,"click"],["aria-hidden","true"],[1,"tool-media-label","d-none","d-md-block"],[1,"tool-media-actions"],["type","button","aria-label","Close",1,"tool-media-close-btn",3,"click"],[1,"tool-media-card","d-none","d-md-block"],[1,"tool-media-label"],["class","merge-file-list",4,"ngIf"],[1,"merge-file-list"],["class","merge-file-item",4,"ngFor","ngForOf"],[1,"merge-file-item"],[1,"merge-file-index"],[1,"merge-file-details"],[1,"merge-file-name","text-truncate"],[1,"merge-file-size"],["type","button",1,"btn","btn-outline-secondary","tool-media-back-btn",3,"click"],[1,"d-flex","flex-wrap","gap-2","mb-4"],["class","btn btn-outline-primary",3,"active","click",4,"ngFor","ngForOf"],[1,"btn","btn-primary","w-100","btn-48",3,"click","disabled"],[1,"btn","btn-outline-primary",3,"click"],[1,"btn","btn-success","w-100","btn-48",3,"click","disabled"],[1,"row","g-4","mb-4"],[1,"col-md-6"],["type","number","min","0",1,"form-control",3,"ngModelChange","ngModel"],["type","number",1,"form-control",3,"ngModelChange","ngModel","max"],[1,"btn","btn-warning","w-100","btn-48",3,"click","disabled"],["type","file","accept","video/*","multiple","",1,"d-none",3,"change"],[1,"merge-files-summary","mb-4"],[1,"merge-files-title"],[1,"merge-files-subtitle"],[1,"properties-subtitle"],["class","gif-helper mb-4",4,"ngIf"],[1,"col-md-4"],["type","number","min","0",1,"form-control",3,"ngModelChange","ngModel","max"],["type","number","min","1",1,"form-control",3,"ngModelChange","ngModel","max"],[1,"text-muted","small","mb-4"],[1,"gif-helper","mb-4"],["class","other-tools-panel desktop-only-other-tools mt-4",4,"ngIf"],[1,"other-tools-panel","desktop-only-other-tools","mt-4"],[1,"properties-subtitle","mb-2"],[1,"other-tools-subtitle","mb-3"],[1,"other-tools-grid"],["type","button","class","btn btn-outline-primary other-tools-btn",3,"click",4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-primary","other-tools-btn",3,"click"],[1,"upload-popup-overlay"],["role","dialog","aria-modal","true","aria-labelledby","uploadProgressTitle",1,"upload-popup-card","shadow-lg"],[1,"upload-popup-icon"],["id","uploadProgressTitle",1,"upload-progress-title"],[1,"upload-progress-track","upload-progress-track-popup","mt-3"],[1,"upload-progress-fill"],[1,"upload-progress-percent","mt-3"],[1,"upload-progress-meta","upload-progress-meta-popup"],["role","dialog","aria-modal","true","aria-labelledby","mergeUploadTitle",1,"upload-popup-card","shadow-lg"],["type","button","aria-label","Close upload popup",1,"popup-close-btn",3,"click"],["id","mergeUploadTitle",1,"upload-progress-title"],[1,"upload-progress-file","mt-2"],["type","button",1,"btn","btn-primary","btn-48","w-100","mt-4",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","downloadHistoryTitle",1,"upload-popup-card","shadow-lg","download-history-popup"],["type","button","aria-label","Close download history popup",1,"popup-close-btn",3,"click"],["id","downloadHistoryTitle",1,"upload-progress-title"],[1,"download-history-list","mt-4"],["type","button","class","btn btn-outline-primary download-history-item",3,"click",4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-primary","download-history-item",3,"click"],["controls","","class","w-100 rounded-3 shadow media-preview media-preview-output",3,"src",4,"ngIf"],["controls","","class","w-100",3,"src",4,"ngIf"],["alt","Generated GIF preview","class","w-100 rounded-3 shadow media-preview media-preview-output gif-preview mb-3",3,"src",4,"ngIf"],[1,"btn","btn-success","w-100","btn-48",3,"click"],["controls","",1,"w-100","rounded-3","shadow","media-preview","media-preview-output",3,"src"],["controls","",1,"w-100",3,"src"],["alt","Generated GIF preview",1,"w-100","rounded-3","shadow","media-preview","media-preview-output","gif-preview","mb
1-3",3,"src"],[1,"fw-bold","mb-4"],["name","formatConverter","class","me-3 text-primary",4,"ngIf"],["name","compressor","class","me-3 text-success",4,"ngIf"],["name","trimmer","class","me-3 text-warning",4,"ngIf"],["name","videoMerger","class","me-3 text-success",4,"ngIf"],["name","extractAudio","class","me-3 text-primary",4,"ngIf"],["name","gifMaker","class","me-3 text-warning",4,"ngIf"],["name","resolutionChanger","class","me-3 text-success",4,"ngIf"],["name","formatConverter",1,"me-3","text-primary"],["name","compressor",1,"me-3","text-success"],["name","trimmer",1,"me-3","text-warning"],["name","videoMerger",1,"me-3","text-success"],["name","extractAudio",1,"me-3","text-primary"],["name","gifMaker",1,"me-3","text-warning"],["name","resolutionChanger",1,"me-3","text-success"],[1,"tool-workspace-popup"],[1,"tool-workspace-popup__backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","selectedToolPopupTitle",1,"tool-workspace-popup__dialog","shadow-lg"],[1,"tool-workspace-popup__header"],["id","selectedToolPopupTitle",1,"tool-workspace-popup__title"],[1,"tool-workspace-popup__subtitle"],["type","button","aria-label","Close tool popup",1,"popup-close-btn",3,"click"],[1,"tool-workspace-popup__body"],[3,"currentTool","inputVideoSourceUrl","inputVideoSourceName","isToolPopup",4,"ngIf"],[3,"currentTool","inputVideoSourceUrl","inputVideoSourceName","isToolPopup"]],template:function(o,n){if(1&o&&(e.j41(0,"div",4)(1,"div",5)(2,"div",6),e.DNE(3,K,3,2,"div",7)(4,ee,4,1,"div",8)(5,ie,3,2,"div",7),e.k0s(),e.j41(6,"aside",9)(7,"div",10)(8,"div",11),e.DNE(9,ne,1,0,"ng-container",12)(10,re,5,3,"ng-container",13)(11,ae,5,3,"ng-container",13)(12,pe,12,5,"ng-container",13)(13,de,10,3,"ng-container",13)(14,ce,7,3,"ng-container",13)(15,he,15,7,"ng-container",13)(16,_e,7,3,"ng-container",13)(17,ve,2,1,"ng-container",13),e.k0s()()()()(),e.DNE(18,xe,15,10,"div",14)(19,Te,14,0,"div",14)(20,Pe,10,1,"div",14)(21,ye,1,1,"ng-template",null,0,e.C5r)(23,Ge,9,8,"ng-template",null,1,e.C5r)(25,Ee,13,2,"div",15)),2&o){const a=e.sdS(24);e.R7$(3),e.Y8G("ngIf",n.inputPreviewUrl()&&!n.getCurrentToolResult()),e.R7$(),e.Y8G("ngIf",4===n.currentTool&&n.getMergeFiles().length&&!n.getCurrentToolResult()),e.R7$(),e.Y8G("ngIf",n.getCurrentToolResult()),e.R7$(4),e.Y8G("ngTemplateOutlet",a),e.R7$(),e.Y8G("ngIf",1===n.currentTool),e.R7$(),e.Y8G("ngIf",2===n.currentTool),e.R7$(),e.Y8G("ngIf",3===n.currentTool),e.R7$(),e.Y8G("ngIf",4===n.currentTool),e.R7$(),e.Y8G("ngIf",5===n.currentTool),e.R7$(),e.Y8G("ngIf",6===n.currentTool),e.R7$(),e.Y8G("ngIf",7===n.currentTool),e.R7$(),e.Y8G("ngIf",n.getCurrentToolResult()),e.R7$(),e.Y8G("ngIf",n.showProgressPopup()),e.R7$(),e.Y8G("ngIf",n.shouldShowMergeUploadPopup()),e.R7$(),e.Y8G("ngIf",n.downloadHistoryPopupOpen()),e.R7$(5),e.Y8G("ngIf",n.showSelectedToolPopup())}},dependencies:[R.Sq,R.bT,R.T3,f.me,f.Q0,f.BC,f.VZ,f.zX,f.vS,G.e,l],styles:['.tool-container-content[_ngcontent-%COMP%]{width:100%;max-width:100%;padding:0}.tool-workspace-layout[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 450px;gap:24px;align-items:start}.tool-media-panel[_ngcontent-%COMP%], .tool-properties-panel[_ngcontent-%COMP%]{min-width:0}.tool-media-card[_ngcontent-%COMP%], .tool-properties-card[_ngcontent-%COMP%]{border-radius:18px}.tool-media-card[_ngcontent-%COMP%]{margin-bottom:2px;padding:10px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 4px 15px #0000000f}.tool-media-label[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;font-size:14px;font-weight:700;color:#0f172a;text-align:left}.tool-media-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.tool-media-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;min-width:0;flex:1 1 auto}.tool-media-actions[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;flex:0 0 auto}.tool-media-back-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;background:transparent;color:#475569;font-size:22px;line-height:1;cursor:pointer}.tool-media-back-btn[_ngcontent-%COMP%]:hover{color:#0f172a}.tool-media-close-btn[_ngcontent-%COMP%]{display:none;width:34px;height:34px;border:0;border-radius:50%;background:#f1f5f9;color:#475569;font-size:18px;font-weight:700;line-height:1;cursor:pointer;transition:background-color .2s ease,color .2s ease}.tool-media-close-btn[_ngcontent-%COMP%]:hover{background:#e2e8f0;color:#0f172a}.tool-properties-card[_ngcontent-%COMP%]{position:sticky;top:16px}.tool-status-banner[_ngcontent-%COMP%]{padding:12px 14px;border-radius:14px;background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;font-size:13px;font-weight:600}.properties-subtitle[_ngcontent-%COMP%]{margin-bottom:10px;font-size:14px;font-weight:700;color:#0f172a}.other-tools-panel[_ngcontent-%COMP%]{padding-top:4px;border-top:1px solid #e2e8f0}.other-tools-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#64748b;line-height:1.5}.other-tools-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tool-container-content[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{text-align:left}.card[_ngcontent-%COMP%]{border-radius:12px;border:none;box-shadow:0 4px 15px #00000014}.format-btn.active[_ngcontent-%COMP%], .btn-outline-primary.active[_ngcontent-%COMP%]{background-color:#0d6efd!important;color:#fff!important;border-color:#0d6efd!important}.progress[_ngcontent-%COMP%]{border-radius:10px;overflow:hidden}video[_ngcontent-%COMP%], audio[_ngcontent-%COMP%]{border-radius:12px;background:#000}.media-preview[_ngcontent-%COMP%]{width:100%;object-fit:contain}.media-preview-input[_ngcontent-%COMP%], .media-preview-output[_ngcontent-%COMP%]{max-height:420px}.gif-preview[_ngcontent-%COMP%]{background:#fff}.gif-helper[_ngcontent-%COMP%]{display:grid;gap:6px;padding:12px 14px;border-radius:12px;background:#f8f9fa;color:#495057}.merge-files-summary[_ngcontent-%COMP%]{padding:14px 16px;border-radius:14px;background:#f8fafc;border:1px solid #e2e8f0}.merge-files-title[_ngcontent-%COMP%]{font-size:15px;font-weight:700;color:#0f172a}.merge-files-subtitle[_ngcontent-%COMP%]{margin-top:4px;font-size:13px;color:#64748b}.merge-file-list[_ngcontent-%COMP%]{display:grid;gap:12px}.merge-file-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;background:#fff;border:1px solid #e2e8f0}.merge-file-index[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#dcfce7;color:#166534;font-size:13px;font-weight:700}.merge-file-details[_ngcontent-%COMP%]{min-width:0}
1.merge-file-name[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#0f172a}.merge-file-size[_ngcontent-%COMP%]{font-size:12px;color:#64748b}.merge-popup-selected[_ngcontent-%COMP%]{padding:14px 16px;border-radius:14px;background:#f8fafc;border:1px solid #e2e8f0;text-align:left}.merge-popup-selected-label[_ngcontent-%COMP%]{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#64748b}.merge-popup-selected-name[_ngcontent-%COMP%]{margin-top:4px;font-size:14px;font-weight:600;color:#0f172a}.upload-progress-card[_ngcontent-%COMP%]{padding:16px 18px;border-radius:16px;background:linear-gradient(135deg,#f5f9ff,#eef4ff);border:1px solid rgba(13,110,253,.12)}.upload-popup-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:1055;display:flex;align-items:center;justify-content:center;padding:24px;background:#0f172a7a;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.upload-popup-card[_ngcontent-%COMP%]{position:relative;width:min(100%,520px);padding:28px 24px;border-radius:24px;background:#fff;border:1px solid rgba(13,110,253,.12);text-align:center}.popup-close-btn[_ngcontent-%COMP%]{position:absolute;top:14px;right:14px;width:34px;height:34px;border:0;border-radius:50%;background:#f1f5f9;color:#475569;font-size:16px;font-weight:700;line-height:1;cursor:pointer;transition:background-color .2s ease,color .2s ease}.popup-close-btn[_ngcontent-%COMP%]:hover{background:#e2e8f0;color:#0f172a}.upload-popup-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-bottom:16px}.upload-popup-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50%;position:relative;display:inline-block;background:radial-gradient(circle at 30% 30%,#60a5fa,#0d6efd);box-shadow:0 12px 30px #0d6efd47}.upload-popup-icon[_ngcontent-%COMP%] span.processing-state[_ngcontent-%COMP%]{background:radial-gradient(circle at 30% 30%,#fbbf24,#f59e0b);box-shadow:0 12px 30px #f59e0b47}.upload-popup-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:before{content:"";position:absolute;left:50%;top:17px;width:18px;height:18px;border-top:3px solid #fff;border-left:3px solid #fff;transform:translate(-50%) rotate(45deg)}.upload-popup-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:after{content:"";position:absolute;left:50%;bottom:15px;width:3px;height:20px;background:#fff;transform:translate(-50%);border-radius:999px}.upload-progress-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.upload-progress-title[_ngcontent-%COMP%]{font-size:15px;font-weight:700;color:#0f172a}.upload-progress-file[_ngcontent-%COMP%]{max-width:100%;font-size:13px;color:#64748b}.upload-progress-percent[_ngcontent-%COMP%]{min-width:64px;padding:6px 10px;border-radius:999px;background:#0d6efd1a;color:#0d6efd;font-size:14px;font-weight:700;text-align:center}.upload-progress-track[_ngcontent-%COMP%]{position:relative;height:12px;border-radius:999px;overflow:hidden;background:#0d6efd1f}.upload-progress-fill[_ngcontent-%COMP%]{height:100%;border-radius:inherit;background:linear-gradient(90deg,#0d6efd,#5ba3ff);transition:width .25s ease}.upload-progress-fill-processing[_ngcontent-%COMP%]{background:linear-gradient(90deg,#f59e0b,#facc15)}.upload-progress-track-popup[_ngcontent-%COMP%]{height:14px}.upload-progress-meta[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:12px;margin-top:10px;font-size:12px;color:#64748b}.upload-progress-meta-popup[_ngcontent-%COMP%]{margin-top:14px;justify-content:space-between}.download-history-popup[_ngcontent-%COMP%]{max-width:620px}.download-history-list[_ngcontent-%COMP%]{display:grid;gap:12px}.download-history-item[_ngcontent-%COMP%]{min-height:48px;justify-content:flex-start;text-align:left;font-weight:600}.tool-workspace-popup[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:1060;display:flex;align-items:center;justify-content:center;padding:24px}.tool-workspace-popup__backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;background:#0f172a8f;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.tool-workspace-popup__dialog[_ngcontent-%COMP%]{position:relative;z-index:1;width:min(100%,1080px);max-height:calc(100vh - 48px);overflow:hidden;border-radius:24px;background:#f8f9fa;border:1px solid rgba(13,110,253,.14)}.tool-workspace-popup__header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 24px 16px;border-bottom:1px solid #e2e8f0;background:#fff}.tool-workspace-popup__title[_ngcontent-%COMP%]{font-size:18px;font-weight:700;color:#0f172a}.tool-workspace-popup__subtitle[_ngcontent-%COMP%]{margin-top:4px;font-size:13px;color:#64748b}.tool-workspace-popup__body[_ngcontent-%COMP%]{max-height:calc(100vh - 140px);overflow-y:auto;padding:20px 24px 24px}.tool-workspace-popup__body[_ngcontent-%COMP%] .tool-container-content[_ngcontent-%COMP%]{max-width:920px;margin:0 auto}.tool-workspace-popup__body[_ngcontent-%COMP%] .tool-workspace-layout[_ngcontent-%COMP%]{grid-template-columns:minmax(0,500px) minmax(320px,380px);justify-content:center}.tool-workspace-popup__body[_ngcontent-%COMP%] .tool-media-panel[_ngcontent-%COMP%]{max-width:500px}.upload-zone[_ngcontent-%COMP%]{border:3px dashed #adb5bd;border-radius:16px;transition:all .3s ease}.upload-zone[_ngcontent-%COMP%]:hover{border-color:#0d6efd;background-color:#f0f7ff}
1h2[_ngcontent-%COMP%]{font-weight:700;color:#212529}@media (max-width: 768px){.tool-workspace-layout[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}.desktop-only-other-tools[_ngcontent-%COMP%]{display:none}.other-tools-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}.tool-media-header[_ngcontent-%COMP%]{flex-wrap:wrap}.tool-media-left[_ngcontent-%COMP%]{width:100%}.tool-media-label[_ngcontent-%COMP%]{display:none}.tool-media-actions[_ngcontent-%COMP%]{margin-left:auto;align-self:flex-start}.tool-media-back-btn[_ngcontent-%COMP%]{display:none}.tool-media-close-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center}.media-preview-input[_ngcontent-%COMP%]{max-height:240px}.media-preview-output[_ngcontent-%COMP%]{max-height:260px}.upload-progress-header[_ngcontent-%COMP%], .upload-progress-meta[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}.upload-popup-card[_ngcontent-%COMP%]{padding:24px 18px}.upload-progress-meta-popup[_ngcontent-%COMP%]{align-items:center;text-align:center}.tool-properties-card[_ngcontent-%COMP%]{position:static}.tool-workspace-popup[_ngcontent-%COMP%]{padding:12px}.tool-workspace-popup__dialog[_ngcontent-%COMP%]{max-height:calc(100vh - 24px)}.tool-workspace-popup__header[_ngcontent-%COMP%], .tool-workspace-popup__body[_ngcontent-%COMP%]{padding-left:16px;padding-right:16px}}@media (max-width: 576px){.media-preview-input[_ngcontent-%COMP%]{max-height:220px}.media-preview-output[_ngcontent-%COMP%]{max-height:240px}.tool-media-card[_ngcontent-%COMP%]{padding-top:1px}}']}))}return s(),l})();const De=["toolContainer"],Be=[{path:"edit",component:(()=>{var s;class l{constructor(t,o){this.route=t,this.commonService=o,this.slug="",this.files=[],this.uploadedFile=(0,r.vPA)(null),this.uploadedFiles=(0,r.vPA)([]),this.currentTool=(0,r.vPA)(0),this.showNextToolsSidebar=(0,r.vPA)(!1)}ngOnInit(){const t=Object.assign({},this.route.snapshot.queryParams);if(t.toolName)if(this.intro={toolName:t.toolName},t.slug&&(this.intro.slug=t.slug,this.slug=t.slug),this.commonService.droppedFiles.length>0)try{this.dropped(this.commonService.droppedFiles),this.commonService.droppedFiles=[]}catch(o){console.error("Error parsing stored video files:",o)}else 0===this.commonService.droppedFiles.length&&this.commonService.back()}ngOnDestroy(){}dropped(t){this.files=t;const o=this.getToolId(this.intro?.toolName),n=4===o;Promise.all(t.filter(a=>a.fileEntry.isFile).map(a=>{const p=a.fileEntry;return new Promise(d=>p.file(c=>d(c)))})).then(a=>{if(!a.length)return;const p=n?a:[a[0]];this.uploadedFiles.set(p),this.uploadedFile.set(p[0]),this.currentTool.set(o)})}onFileUploaded(t){this.uploadedFiles.set(t?[t]:[]),this.uploadedFile.set(t),this.currentTool.set(1)}onToolSelected(t){this.showNextToolsSidebar()?this.toolContainer?.openSelectedToolPopup(t):this.currentTool.set(t)}onNextToolsVisibilityChange(t){this.showNextToolsSidebar.set(t)}backToUpload(){this.uploadedFiles.set([]),this.uploadedFile.set(null),this.currentTool.set(0),this.showNextToolsSidebar.set(!1),this.commonService.back()}getToolId(t){switch(t){case"format_converter":default:return 1;case"extract_audio":return 5;case"compress_video":return 2;case"trim_video":return 3;case"merge_videos":return 4;case"change_resolution":return 7;case"video_to_gif":return 6}}static#e=s=()=>(this.\u0275fac=function(o){return new(o||l)(e.rXU(H.nX),e.rXU(E.h))},this.\u0275cmp=e.VBU({type:l,selectors:[["rgbkit-video-tools-editor"]],viewQuery:function(o,n){if(1&o&&e.GBs(De,5),2&o){let a;e.mGM(a=e.lsd())&&(n.toolContainer=a.first)}},standalone:!1,decls:4,vars:4,consts:[["toolContainer",""],[1,"video-tools-layout"],[1,"main-content"],[3,"backToUpload","nextToolsVisibilityChange","currentTool","uploadedFile","uploadedFiles","slug"]],template:function(o,n){if(1&o){const a=e.RV6();e.j41(0,"div",1)(1,"main",2)(2,"app-tool-container",3,0),e.bIt("backToUpload",function(){return r.eBV(a),r.Njj(n.backToUpload())})("nextToolsVisibilityChange",function(d){return r.eBV(a),r.Njj(n.onNextToolsVisibilityChange(d))}),e.k0s()()()}2&o&&(e.R7$(2),e.Y8G("currentTool",n.currentTool())("uploadedFile",n.uploadedFile())("uploadedFiles",n.uploadedFiles())("slug",n.slug))},dependencies:[$e],styles:[".btn-primary{padding:9px;font-weight:600}.video-tools-layout{--video-tools-layout-height: auto;display:flex;align-items:stretch;width:100%;height:var(--video-tools-layout-height);max-height:var(--video-tools-layout-height);min-height:0;overflow:hidden;border-top:1px solid #e9ecef;background:#f8f9fa}:host{display:block}app-tool-container{display:block}.main-content{flex:1 1 auto;min-width:0;min-height:0;height:var(--video-tools-layout-height);max-height:var(--video-tools-layout-height);overflow-y:auto;overflow-x:hidden;padding:20px 24px;box-sizing:border-box;background:#f8f9fa}@media (max-width: 768px){.video-tools-layout{display:block;height:auto;max-height:none;border-top:0;overflow:visible}.main-content{width:100%;height:auto;max-height:none;padding:12px 15px 15px;overflow:visible}}\n"],encapsulation:2}))}return s(),l})()}];let Xe=(()=>{var s;class l{static#e=s=()=>(this.\u0275fac=function(o){return new(o||l)},this.\u0275mod=e.$C({type:l}
1),this.\u0275inj=r.G2t({imports:[N.iI.forChild(Be),N.iI]}))}return s(),l})(),Ae=(()=>{var s;class l{static#e=s=()=>(this.\u0275fac=function(o){return new(o||l)},this.\u0275mod=e.$C({type:l}),this.\u0275inj=r.G2t({providers:[M],imports:[k.UN,R.MD,Y.G,f.YN,Xe,f.X1,A.RI,k.UN,z.Y,G.Z]}))}return s(),l})()}}]);
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.