1import{b as W,c as X}from"./chunk-SP5Y3JUC.js";import{a as Q}from"./chunk-ARHNIZHK.js";import{a as H}from"./chunk-ZQK6UPQE.js";import{a as q}from"./chunk-COPCKLCD.js";import{a as K,b as G}from"./chunk-QG55TQOO.js";import"./chunk-QMR3BJU7.js";import"./chunk-WRKBRGLY.js";import{a as R}from"./chunk-NXVC7QT7.js";import"./chunk-KZQMWPG3.js";import"./chunk-EL6KRCXX.js";import"./chunk-AW6T5MEP.js";import"./chunk-RGNDWIHZ.js";import{b as N}from"./chunk-MSQX2MEU.js";import"./chunk-7IYH2MS3.js";import{e as J,i as U}from"./chunk-S3YL3CZP.js";import{i as V,j as B}from"./chunk-2JUPJVUO.js";import"./chunk-S3BJ3LRK.js";import{$ as O,Cb as f,Fb as E,Gb as k,Hb as n,Ib as a,Jb as T,Nb as C,Sb as S,Ub as m,Xb as $,Y as b,Z as L,Za as I,cb as s,db as d,ec as D,fc as c,gc as g,hc as F,l as h,na as z,oc as j,pc as A,ub as v,wa as _,wb as P,xa as x}from"./chunk-6WHMZIP5.js";var Y=(o,r)=>r._id,Z=()=>[10,30,50];function tt(o,r){o&1&&(n(0,"div",4),T(1,"mat-spinner",6),n(2,"div",7),c(3,"Loading Podcasts..."),a()())}function et(o,r){if(o&1){let i=C();
1n(0,"div",14)(1,"a")(2,"audio",15,1),S("play",function(){let e=_(i).$implicit,l=D(3),p=m(2);return x(p.onAudioPlay(l,e.title))}),a(),n(4,"div",16),c(5," ("),n(6,"span"),c(7),a(),c(8,", "),n(9,"span"),c(10),a(),c(11,", "),n(12,"span"),c(13),a(),c(14,") "),a(),n(15,"div",17)(16,"div",18,2),c(18),a()(),n(19,"div",19),c(20),a()()()}if(o&2){let i=r.$implicit,t=m(2);s(2),P("id","podcast-"+i._id)("src",i.file_name,I),s(5),g(i.type=="audio/mpeg"?"mp3":i.type),s(3),g(t.transform(i.duration)),s(3),g(t.formatSizeUnits(i.size)),s(3),$("matTooltip",i.title),s(2),F(" ",i.title," "),s(2),g(i.description)}}function it(o,r){o&1&&(n(0,"div"),c(1,"No Podcast Found"),a())}function nt(o,r){if(o&1){let i=C();n(0,"div",5)(1,"div",8)(2,"div",9)(3,"div",10),c(4,"Podcasts"),a()(),n(5,"div",11)(6,"mat-paginator",12,0),S("page",function(e){_(i);let l=m();return x(l.onPageChange(e))}),a()(),n(8,"div",13),E(9,et,21,8,"div",14,Y),v(11,it,2,0,"div"),a()()()}if(o&2){let i=m();s(6),P("length",i.totalLength)("pageSizeOptions",A(5,Z))("pageSize",i.filterData.pageSize)("pageIndex",i.filterData.pageIndex),s(3),k(i.podcastList),s(2),f(11,(i.podcastList==null?null:i.podcastList.length)==0?11:-1)}}var _t=(()=>{let r=class r{constructor(t,e,l,p,u){this.router=t,this.titleService=e,this.meta=l,this.PodcastService=p,this.filterData=u,this.title="Podcasts | JAPI",this.podcastList$=new h,this.unsubscribePodcastList=new h,this.Audio=H,this.skip=0,this.limit=10,this.totalLength=0,this.isLoading=!1}ngOnInit(){this.titleService.setTitle(this.title),this.meta.updateTag({name:"description",content:"Listen to the podcasts discussing the latest Issue of JAPI, with a wide variety of articles, and their analysis presented by experts in the field."}),this.meta.updateTag({name:"keyword",content:"Podcast, JAPI, Listen, Hear, Expert, Issue, Scientific, Journal, Latest, Knowledge, Spotify "}),this.podcastList$.pipe(O(t=>{this.skip=this.filterData.pageIndex*this.filterData.pageSize,this.limit=this.filterData.pageSize,this.isLoading=!0}),b(t=>this.PodcastService.podcastList({skip:this.skip,limit:this.limit})),L(this.unsubscribePodcastList)).subscribe(t=>{console.log(t),t&&(this.podcastList=t.data,this.totalLength=t.total,console.log("podcastList -------",this.podcastList),this.podcastList.forEach(e=>{e.file_name=`https://journal-api.s3.ap-south-1.amazonaws.com/${e.file_name}`})),this.isLoading=!1}),this.podcastList$.next()}onPageChange(t){console.log("page -----------",t),this.filterData.pageIndex=t.pageIndex,this.filterData.pageSize=t.pageSize,this.podcastList$.next()}onAudioPlay(t,e){this.currentPlayedElem&&this.currentPlayedElem!==t&&(this.currentPlayedElem.pause(),this.currentPlayedElem.currentTime=0,console.log(this.currentPlayedElem.currentTime,"pause event")),this.currentPlayedElem=t,window.gtag("event","button_click",{event_category:"component_interaction",event_label:e}),console.log("playing Event")}gotoback(){this.router.navigate([""])}trackButtonClick(t){window.gtag("event","button_click",{event_category:"component_interaction",event_label:t})}formatSizeUnits(t){let e;return t>=1073741824?e=(t/1073741824).toFixed(2)+" GB":t>=1048576?e=(t/1048576).toFixed(2)+" MB":t>=1024?e=(t/1024).toFixed(2)+" KB":t>1?e=t+" bytes":t==1?e=t+" byte":e="0 bytes",e}transform(t){if(isNaN(t)||t<0)return"00:00";let e=Math.floor(t),l=Math.floor(e/3600),p=Math.floor(e%3600/60),u=e%60,M=l.toString().padStart(2,"0"),w=p.toString().padStart(2,"0"),y=u.toString().padStart(2,"0");return M=="00"?`${w}:${y} min`:`${M}:${w}:${y} min`}ngOnDestroy(){this.unsubscribePodcastList.next(),this.unsubscribePodcastList.complete(),this.unsubscribePodcastList.unsubscribe()}};r.\u0275fac=function(e){return new(e||r)(d(J),d(B),d(V),d(Q),d(q))},r.\u0275cmp=z({type:r,selectors:[["app-podcast"]],standalone:!0,features:[j],decls:4,vars:2,consts:[["paginatorRef",""],["audio",""],["tooltip","matTooltip"],[1,"page-main-container"],[1,"loader"],[1,"page-wrapper"],["diameter","70",1,"loader-spin"],[1,"load-text"],[1,"main_container"],[1,"header"],[1,"header_title"],[1,"paginator-container"],[1,"table-paginator",3,"page","length","pageSizeOptions","pageSize","pageIndex"],[1,"cards_container"],[1,"audio_card"],["controls","","controlsList"," nodownload noplaybackrate ",3,"play","i
1d","src"],[1,"audio_size"],[1,"title_div"],["matTooltipClass","custom-tooltip",1,"audio_title",3,"matTooltip"],[1,"audio_desc"]],template:function(e,l){e&1&&(n(0,"div",3)(1,"div",3),v(2,tt,4,0,"div",4)(3,nt,12,6,"div",5),a()()),e&2&&(s(2),f(2,l.isLoading?2:-1),s(),f(3,l.isLoading==!1?3:-1))},dependencies:[G,K,N,U,W,X,R],styles:[".loader[_ngcontent-%COMP%]{height:100vh;margin:auto auto 20px;display:flex;justify-content:center;flex-direction:column;align-items:center}.load-text[_ngcontent-%COMP%]{font-size:20px;margin-top:20px}.mat-progress-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%], .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:#2f333b!important}.cards_container[_ngcontent-%COMP%]{width:calc(100% - 16px);display:flex;flex-wrap:wrap}.backarrow[_ngcontent-%COMP%]{cursor:pointer}audio[_ngcontent-%COMP%]{width:100%}.table-paginator[_ngcontent-%COMP%]{background-color:#f4f1f1}[_nghost-%COMP%] .mat-mdc-paginator-page-size-label{display:none}.audio_card[_ngcontent-%COMP%]{width:calc(33.3333333333% - 16px);padding:16px;margin:8px;display:flex;flex-direction:column;background-color:#fff}.audio_card[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none;height:100%}.audio_size[_ngcontent-%COMP%]{font-size:10px;color:#000}.header[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center;margin-bottom:18px}.main_container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.header_title[_ngcontent-%COMP%]{font-size:28px;font-weight:500;line-height:normal;font-family:Libre Franklin}.audio_title[_ngcontent-%COMP%]{font-size:18px;margin:12px 0;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-align:left;-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;color:#000}.audio_desc[_ngcontent-%COMP%]{font-size:14px;font-stretch:normal;font-style:normal;line-height:24px;letter-spacing:normal;text-align:left;color:#000;margin-top:6px;margin-bottom:12px}@media (max-width: 768px){.audio_card[_ngcontent-%COMP%]{width:100%;margin:0}.cards_container[_ngcontent-%COMP%]{width:100%;gap:18px}.header_title[_ngcontent-%COMP%]{font-size:24px}}"]});let o=r;return o})();export{_t as PodcastComponent};
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.