import{Oa as h,Y as N,nf as R,se as p}from"./chunk-HJJWL6RD.js";import{a as o,b as i,i as _}from"./chunk-H2BCKOF6.js";var D=(()=>{let t=class t{warnCacheKey;warnCacheResult;errCacheKey;errCacheResult;buildWarn(n){let{videoId:s,state:E}=n,c=`${s}-${E}`;return this.warnCacheKey===c&&this.warnCacheResult?this.warnCacheResult:(this.warnCacheResult=this._buildWarn(n),this.warnCacheKey=c,this.warnCacheResult);}_buildWarn(n){let{videoId:s,state:E}=n,c="V\xE1\u0161 videosoubor se zpracov\xE1v\xE1.",I="To m\u016F\u017Ee chv\xEDli trvat a n\u011Bkter\xE9 funkce mohou b\xFDt dostupn\xE9 a\u017E po dokon\u010Den\xED.",d="Obra\u0165te se na administr\xE1tora, aby to opravil.",T="V\xE1\u0161 webov\xFD prohl\xED\u017Ee\u010D jej nemus\xED b\xFDt schopen p\u0159ehr\xE1t.";switch(E){case p.PUBLISHED:case p.LIVE_ENDED:case p.WAITING_FOR_LIVE:return;case p.TO_TRANSCODE:return{title:"Prob\xEDh\xE1 p\u0159ek\xF3dov\xE1n\xED",manageMain:c,manageSecondary:I,watchMain:T,watchSecondary:""};case p.TO_IMPORT:return{title:"Prob\xEDh\xE1 import",manageMain:"Va\u0161e vzd\xE1len\xE9 video se importuje.",manageSecondary:I,watchMain:"Vzd\xE1len\xE9 video se importuje, bude k dispozici po dokon\u010Den\xED importu.",watchSecondary:"",routerLink:{text:"Review your import",link:["/my-library/video-imports"],queryParams:{search:`videoId:${s}`}}};case p.TO_IMPORT_FAILED:{let m="The remote video failed to import, it will not be available.";return{title:"Import failed",manageMain:"Your remote video failed to import.",manageSecondary:"",watchMain:m,watchSecondary:"",routerLink:{text:"Review your import",link:["/my-library/video-imports"],queryParams:{search:`videoId:${s}`}}};}case p.TO_MOVE_TO_FILE_SYSTEM:return{title:"P\u0159esouv\xE1n\xED soubor\u016F videa",manageMain:c,manageSecondary:I,watchMain:T,watchSecondary:"Video se p\u0159esouv\xE1 do souborov\xE9ho syst\xE9mu."};case p.TO_MOVE_TO_FILE_SYSTEM_FAILED:{let m="Nepoda\u0159ilo se p\u0159esunout video soubory do souborov\xE9ho syst\xE9mu platformy.";return{title:"Nepoda\u0159ilo se p\u0159esunout soubory videa",manageMain:m,manageSecondary:d,watchMain:T,watchSecondary:m};}case p.TO_MOVE_TO_EXTERNAL_STORAGE:return{title:"P\u0159esouv\xE1n\xED soubor\u016F videa",manageMain:c,manageSecondary:I,watchMain:T,watchSecondary:"Video se p\u0159esouv\xE1 do extern\xEDho \xFAlo\u017Ei\u0161t\u011B."};case p.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED:{let m="Nepoda\u0159ilo se p\u0159esunout video soubory do extern\xEDho \xFAlo\u017Ei\u0161t\u011B.";return{title:"Nepoda\u0159ilo se p\u0159esunout soubory videa",manageMain:m,manageSecondary:d,watchMain:T,watchSecondary:m};}case p.TO_EDIT:return{title:"Studio edition ve v\xFDvoji",manageMain:c,manageSecondary:I,watchMain:T,watchSecondary:""};case p.TRANSCODING_FAILED:return{title:"P\u0159ek\xF3dov\xE1n\xED selhalo",manageMain:"Selh\xE1n\xED p\u0159i p\u0159ek\xF3dov\xE1n\xED soubor\u016F videa",manageSecondary:d,watchMain:T,watchSecondary:""};default:return E;}}buildErr(n){let{videoId:s,blacklisted:E,blacklistedReason:c}=n,I=`${s}-${E}-${R(c)}`;return this.errCacheKey===I&&this.errCacheResult?this.errCacheResult:(this.errCacheResult=this._buildErr(n),this.errCacheKey=I,this.errCacheResult);}_buildErr(n){let{blacklisted:s,blacklistedReason:E}=n;if(s)return{title:"Blocked video",main:E||"Your video has been blocked by the platform"};}};_(t,"\u0275fac",function(s){return new(s||t)();}),_(t,"\u0275prov",N({token:t,factory:t.ɵfac}));let e=t;return e;})();var L=e=>typeof e.id=="string"&&typeof e.from=="number"&&typeof e.to=="number"&&typeof e.text=="string",u=e=>!e||/^\s*$/.test(e),l={ID:"ID",TIME_LINE:"TIME_LINE",TEXT:"TEXT",MULTI_LINE_TEXT:"MULTI_LINE_TEXT",FIN_ENTRY:"FIN_ENTRY",FINISH:"FINISH"},O=e=>{let t=e.split(":"),r,n,s;return t.length===2?[n,s]=t:[r,n,s]=t,parseInt(s.replace(",",""),10)+parseInt(n,10)*60*1e3+(r?parseInt(r,10):0)*60*60*1e3;},y=()=>({start(e){let t=l.ID,r={tokens:e.split(/\n/),pos:0,result:[],current:{}};for(;t!==l.FINISH;){let n=this[t](r);r=n.params,t=n.next;}return r.result;},[l.ID](e){let{tokens:t,pos:r,current:n}=e;if(t.length<=r)return{next:l.FINISH,params:e};if(u(t[r]))return{next:l.ID,params:i(o({},e),{pos:r+1})};let s=t[r].includes("-->");return n.id=s?"":t[r],{next:l.TIME_LINE,params:i(o({},e),{current:n,tokens:t,pos:s?r:r+1})};},[l.TIME_LINE](e){let{tokens:t,pos:r,current:n}=e,s=t[r],[E,c]=s.split("-->");return n.from=O(E),n.to=O(c),{next:l.TEXT,params:i(o({},e),{current:n,pos:r+1})};},[l.TEXT](e){let{tokens:t,pos:r,current:n}=e;return t.length<=r?{next:l.FINISH,params:e}:(n.text=t[r],{next:l.MULTI_LINE_TEXT,params:i(o({},e),{current:n,pos:r+1})});},[l.MULTI_LINE_TEXT](e){let{tokens:t,pos:r,current:n}=e;return t.length<=r||u(t[r])?{next:l.FIN_ENTRY,params:e}:(n.text=`${n.text}
${t[r]}`,{next:l.MULTI_LINE_TEXT,params:i(o({},e),{current:n,pos:r+1})});},[l.FIN_ENTRY](e){let{pos:t,current:r,result:n}=e;if(L(r))n.push(r);else throw new Error(`Parsing error current not complete ${JSON.stringify(r)}`);return{next:l.ID,params:i(o({},e),{current:{},pos:t+1})};},[l.FINISH](e){return{next:l.FINISH,params:e};}}),g=e=>({entries:y().start(e)}),a={HEADER:"HEADER",ID:"ID",TIME_LINE:"TIME_LINE",ID_OR_NOTE_OR_STYLE_OR_REGION:"ID_OR_NOTE_OR_STYLE_OR_REGION",STYLE:"STYLE",NOTE:"NOTE",REGION:"REGION",LEGACY_HEADER:"LEGACY_HEADER",TEXT:"TEXT",MULTI_LINE_TEXT:"MULTI_LINE_TEXT",FIN_ENTRY:"FIN_ENTRY",FINISH:"FINISH"},f=e=>{let t=e.split(":"),r,n,s;return t.length===2?[n,s]=t:[r,n,s]=t,parseInt(s.replace(".",""),10)+parseInt(n,10)*60*1e3+(r?parseInt(r,10):0)*60*60*1e3;},x=()=>({start(e){let t=a.HEADER,r={tokens:e.split(/\n/),pos:0,result:[],current:{}};for(;t!==a.FINISH;){let n=this[t](r);r=n.params,t=n.next;}return r.result;},[a.HEADER](e){return{next:a.LEGACY_HEADER,params:i(o({},e),{pos:e.pos+1})};},[a.LEGACY_HEADER](e){let{tokens:t,pos:r}=e;return t.length<=r?{next:a.FINISH,params:e}:t[r].includes(":")&&!t[r].includes("-->")?{next:a.LEGACY_HEADER,params:i(o({},e),{pos:r+1})}:{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:e};},[a.ID_OR_NOTE_OR_STYLE_OR_REGION](e){let{tokens:t,pos:r}=e;return t.length<=r?{next:a.FINISH,params:e}:u(t[r])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(o({},e),{pos:r+1})}:t[r].toUpperCase().includes("NOTE")?{next:a.NOTE,params:e}:t[r].toUpperCase().includes("STYLE")?{next:a.STYLE,params:e}:t[r].toUpperCase().includes("REGION")?{next:a.REGION,params:e}:{next:a.ID,params:e};},[a.STYLE](e){let{tokens:t,pos:r}=e;return u(t[r])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(o({},e),{pos:r+1})}:{next:a.STYLE,params:i(o({},e),{pos:r+1})};},[a.NOTE](e){let{tokens:t,pos:r}=e;return u(t[r])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(o({},e),{pos:r+1})}:{next:a.STYLE,params:i(o({},e),{pos:r+1})};},[a.REGION](e){let{tokens:t,pos:r}=e;return u(t[r])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(o({},e),{pos:r+1})}:{next:a.REGION,params:i(o({},e),{pos:r+1})};},[a.ID](e){let{tokens:t,pos:r,current:n}=e;if(t.length<=r)return{next:a.FINISH,params:e};if(u(t[r]))return{next:a.ID,params:i(o({},e),{pos:r+1})};let s=t[r].includes("-->");return n.id=s?"":t[r],{next:a.TIME_LINE,params:i(o({},e),{current:n,tokens:t,pos:s?r:r+1})};},[a.TIME_LINE](e){let{tokens:t,pos:r,current:n}=e,s=t[r],[E,c]=s.split("-->");return n.from=f(E),n.to=f(c),{next:a.TEXT,params:i(o({},e),{current:n,pos:r+1})};},[a.TEXT](e){let{tokens:t,pos:r,current:n}=e;return t.length<=r?{next:a.FINISH,params:e}:(n.text=t[r],{next:a.MULTI_LINE_TEXT,params:i(o({},e),{current:n,pos:r+1})});},[a.MULTI_LINE_TEXT](e){let{tokens:t,pos:r,current:n}=e;return t.length<=r||u(t[r])?{next:a.FIN_ENTRY,params:e}:(n.text=`${n.text}
${t[r]}`,{next:a.MULTI_LINE_TEXT,params:i(o({},e),{current:n,pos:r+1})});},[a.FIN_ENTRY](e){let{pos:t,current:r,result:n}=e;if(L(r))n.push(r);else throw new Error(`Parsing error current not complete ${JSON.stringify(r)}`);return{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(o({},e),{current:{},pos:t+1})};},[a.FINISH](e){return{next:a.FINISH,params:e};}}),$=e=>({entries:x().start(e)}),Y=e=>e.startsWith("WEBVTT")?$(e):g(e);var z=(()=>{let t=class t{transform(n){let s=Math.floor(n/3600),E=Math.floor(n%3600/60),c=n%60;if(s>0){let I=""+s+"h";return E!==0&&(I+=" "+(""+E+"min")),c!==0&&(I+=" "+(""+c+" s")),I;}if(E>0){let I=""+E+"min";return c!==0&&(I+=` ${c}sec`),I;}return""+c+" s ";}};_(t,"\u0275fac",function(s){return new(s||t)();}),_(t,"\u0275pipe",h({name:"myTimeDurationFormatter",type:t,pure:!0}));let e=t;return e;})();export{D as a,Y as b,z as c};/**i18n:671d995daee9c68b73ac729b7ab2c3cf3be32c7f1a24d9dfa94e261c45ee5241*///# sourceMappingURL=chunk-62WKJLCL.js.map