PageSourceSearch

https://hou.la/chunk-ZJJGXX7A.js

js hou.la collected 2026-09-25 03:33:22 UTC 15,242 bytes, 1 lines download raw bytes

1import{a as Y}from"./chunk-IPKLJJ3K.js";import{a as X}from"./chunk-2LPPYG5A.js";import{a as Q}from"./chunk-LJ5OAOFF.js";import{a as J}from"./chunk-HVLO3SGC.js";import"./chunk-TKJJQVX7.js";import{a as q}from"./chunk-NBMUSEX4.js";import"./chunk-AQEWHUN5.js";import{c as H,d as G,e as j}from"./chunk-YQZAETCE.js";import{x as z}from"./chunk-EO42E46J.js";import"./chunk-3QVSKJ3X.js";import{I as W,c as F}from"./chunk-ERUCNOOT.js";import{$b as B,F as f,Fa as K,Jb as g,Lb as L,Qb as x,Qc as s,Rc as d,Tb as _,Ub as T,V as U,Vb as r,Wb as o,Xb as p,_a as M,da as E,db as a,f as P,fc as $,gc as u,l as C,la as V,ma as k,sb as N,tc as l,uc as v,vc as c,y as R,yb as h}from"./chunk-DBE7WQEG.js";import"./chunk-W7GRJBO5.js";var ee=(i,t)=>t.value,O=(i,t)=>t.label,te=(i,t)=>t.id;function ie(i,t){if(i&1){let e=B();r(0,"button",6),$("click",function(){let S=V(e).$implicit,m=u();return k(m.selectPeriod(S.value))}),l(1),s(2,"translate"),o()}if(i&2){let e=t.$implicit,n=u();L("is-active",n.selectedPeriod===e.value),a(),c(" ",d(2,3,e.label)," ")}}function ne(i,t){i&1&&p(0,"app-widget-loading")}function ae(i,t){i&1&&(r(0,"div",5)(1,"div",7)(2,"div",8),p(3,"i",9),r(4,"p",10),l(5),s(6,"translate"),o(),r(7,"p",11),l(8),s(9,"translate"),o()()()()),i&2&&(a(5),c(" ",d(6,2,"STUDIO.STATS.NO_DATA")," "),a(3),c(" ",d(9,4,"STUDIO.STATS.NO_DATA_SUB")," "))}function oe(i,t){if(i&1&&(p(0,"app-widget-stat-card",13),s(1,"translate")),i&2){let e=t.$implicit,n=u(2);g("icon",e.icon)("value",e.display)("label",d(1,4,e.label))("badge",n.badgeFor(e))}}function re(i,t){if(i&1&&p(0,"app-widget-chart",16),i&2){let e=u(2);g("type","line")("data",e.audienceChart)("responsive",!0)}}function le(i,t){if(i&1&&p(0,"app-widget-chart",16),i&2){let e=u(2);g("type","line")("data",e.contentChart)("responsive",!0)}}function pe(i,t){if(i&1&&p(0,"app-widget-chart",16),i&2){let e=u(2);g("type","bar")("data",e.revenueChart)("responsive",!0)}}function se(i,t){if(i&1&&(r(0,"div",21)(1,"span",25),l(2),s(3,"translate"),o(),r(4,"span",26),l(5),o()()),i&2){let e=t.$implicit;a(2),v(d(3,2,e.label)),a(3),v(e.value)}}function de(i,t){if(i&1&&(r(0,"div",21)(1,"span",25),l(2),s(3,"translate"),o(),r(4,"span",26),l(5),o()()),i&2){let e=t.$implicit;a(2),v(d(3,2,e.label)),a(3),v(e.value)}}function ce(i,t){if(i&1&&(r(0,"div",21)(1,"span",25),l(2),s(3,"translate"),o(),r(4,"span",26),l(5),o()()),i&2){let e=t.$implicit;a(2),v(d(3,2,e.label)),a(3),v(e.value)}}function me(i,t){if(i&1&&(r(0,"div",21)(1,"span",25),l(2),s(3,"translate"),o(),r(4,"span",26),l(5),o()()),i&2){let e=t.$implicit;a(2),v(d(3,2,e.label)),a(3),v(e.value)}}function ue(i,t){if(i&1&&p(0,"img",31),i&2){let e=u().$implicit;g("src",e.thumbnailUrl,M)("alt",e.title)}}function Se(i,t){i&1&&p(0,"i",32)}function ve(i,t){if(i&1&&(r(0,"div",29)(1,"div",30),h(2,ue,1,2,"img",31)(3,Se,1,0,"i",32),o(),r(4,"div",33)(5,"div",34),l(6),s(7,"translate"),o(),r(8,"div",35)(9,"span"),p(10,"i",36),l(11),o(),r(12,"span"),p(13,"i",37),l(14),o(),r(15,"span"),p(16,"i",38),l(17),o()()()()),i&2){let e=t.$implicit,n=u(3);a(2),x(e.thumbnailUrl?2:3),a(4),c(" ",e.title||d(7,5,"STUDIO.STATS.UNTITLED")," "),a(5),c(" ",n.formatCompact(e.viewCount),""),a(3),c(" ",n.formatCompact(e.likeCount),""),a(3),c(" ",n.formatCompact(e.commentCount),"")}}function _e(i,t){if(i&1&&(r(0,"div",5)(1,"div",7)(2,"h2",14),p(3,"i",27),l(4),s(5,"translate"),o(),r(6,"div",28),_(7,ve,18,7,"div",29,te),o()()()),i&2){let e=u(2);a(4),c(" ",d(5,1,"STUDIO.STATS.TOP_CONTENT")," "),a(3),T(e.topContent)}}function Te(i,t){if(i&1&&(r(0,"div",12),_(1,oe,2,6,"app-widget-stat-card",13,O),o(),r(3,"div",5)(4,"div",7)(5,"h2",14),p(6,"i",15),l(7),s(8,"translate"),o(),h(9,re,1,3,"app-widget-chart",16),o()(),r(10,"div",5)(11,"div",7)(12,"h2",14),p(13,"i",17),l(14),s(15,"translate"),o(),h(16,le,1,3,"app-widget-chart",16),o()(),r(17,"div",5)(18,"div",7)(19,"h2",14),p(20,"i",18),l(21),s(22,"translate"),o(),h(23,pe,1,3,"app-widget-chart",16),o()(),r(24,"div",5)(25,"div",7)(26,"h2",14),p(27,"i",19),l(28),s(29,"translate"),o(),r(30,"div",20),_(31,se,6,4,"div",21,O),o()()(),r(33,"div",5)(34,"div",7)(35,"h2",14),p(36,"i",22),l(37),s(38,"translate"),o(),r(39,"div",20),_(40,de,6,4,"div",21,O),o()()(),r(42,"div",5)(43,"div",7)(44,"h2",14),p(45,"i",23),l(46),s(47,"translate"),o(),r(48,"div",20),_(49,ce,6,4,"div",21,O),o()()(),r(51,"div",5)(52,"div",7)(53,"h2",14),p(54,"i",24),l(55),s(56,"translate"),o(),r(57,"div",20),_(58,me,6,4,"div",21,O),o()()(),h(60,_e,9,3,"div",5)),i&2){let e=u();a(),T(e.kpiCards),a(6),c(" ",d(8,11,"STUDIO.STATS.AUDIENCE.TITLE")," "),a(2),x(e.audienceChart?9:-1),a(5),c(" ",d(15,13,"STUDIO.STATS.CONTENT.TITLE")," "),a(2),x(e.contentChart?16:-1),a(5),c(" ",d(22,15,"STUDIO.STATS.REVENUE.TITLE")," "),a(2),x(e.revenueChart?23:-1),a(5),c(" ",d(29,17,"STUDIO.STATS.CONTENT.SECTION")," "),a(3),T(e.contentKpis),a(6),c(" ",d(38,19,"STUDIO.STATS.LIVE.SECTION")," "),a(3),T(e.liveKpis),a(6),c(" ",d(47,21,"STUDIO.STATS.GIFTS.SECTION")," "),a(3),T(e.giftKpis),a(6),c(" ",d(56,23,"STUDIO.STATS.SHOP.SECTION")," "),a(3),T(e.shopKpis),a(2),x(e.topContent.length?60:-1)}}var Z=class i{analytics=E(X);translate=E(H);isBrowser=F(E(K));destroy$=new P;periodOptions=[{value:"7d",label:"STUDIO.STATS.PERIOD_7"},{value:"30d",label:"STUDIO.STATS.PERIOD_30"},{value:"90d",label:"STUDIO.STATS.PERIOD_90"},{value:"all-time",label:"STUDIO.STATS.PERIOD_ALL"}];selectedPeriod="30d";loading=!0;isEmpty=!1;kpiCards=[];
1audienceChart=null;contentChart=null;revenueChart=null;contentKpis=[];liveKpis=[];giftKpis=[];shopKpis=[];topContent=[];ngOnInit(){this.isBrowser&&this.load()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}selectPeriod(t){t!==this.selectedPeriod&&(this.selectedPeriod=t,this.load())}badgeFor(t){return t.delta?t.delta.pct==="0%"?{text:"0%",tone:"flat"}:{text:t.delta.pct,tone:t.delta.up?"up":"down"}:t.deltaPlaceholder?{text:"+100%",tone:"up"}:{text:"\u2014",tone:"flat"}}load(){this.loading=!0;let t=this.selectedPeriod;R({overview:this.analytics.getOverview(t).pipe(f(()=>C(null))),audience:this.analytics.getAudience(t).pipe(f(()=>C(null))),content:this.analytics.getContent(t).pipe(f(()=>C(null))),lives:this.analytics.getLives(t).pipe(f(()=>C(null))),revenue:this.analytics.getRevenue(t).pipe(f(()=>C(null))),top:this.analytics.getTopContent(10).pipe(f(()=>C(null)))}).pipe(U(this.destroy$)).subscribe(e=>{this.buildOverview(e.overview),this.buildAudienceChart(e.audience),this.buildContentChart(e.content),this.buildRevenueChart(e.revenue),this.buildContentKpis(e.content),this.buildLiveKpis(e.lives),this.buildShopKpis(e.revenue,e.content),this.topContent=e.top?.items??[],this.computeEmpty(e),this.loading=!1})}buildOverview(t){let e=t?.kpis;this.kpiCards=[this.card("STUDIO.STATS.KPI.VIDEO_VIEWS","pi pi-eye",e?.videoViews,"compact"),this.card("STUDIO.STATS.KPI.FOLLOWERS","pi pi-users",e?.followersGained,"compact"),this.card("STUDIO.STATS.KPI.LIKES","pi pi-heart",e?.likes,"compact"),this.card("STUDIO.STATS.KPI.COMMENTS","pi pi-comment",e?.comments,"compact"),this.card("STUDIO.STATS.KPI.WATCH_TIME","pi pi-clock",e?.watchTimeSeconds,"duration"),this.card("STUDIO.STATS.KPI.REVENUE","pi pi-euro",e?.revenueCents,"currency"),this.card("STUDIO.STATS.KPI.UNIQUE_VIEWERS","pi pi-user",e?.uniqueViewers,"compact"),this.card("STUDIO.STATS.KPI.STARS","pi pi-star",e?.starsEarned,"compact"),this.card("STUDIO.STATS.KPI.PROFILE_VIEWS","pi pi-id-card",e?.profileViews,"compact"),this.card("STUDIO.STATS.KPI.PROFILE_VISITORS","pi pi-users",e?.profileUniqueViewers,"compact")]}card(t,e,n,S){let m=n?.value??0,b=n?.previous??0,I;S==="duration"?I=this.formatDuration(m):S==="currency"?I=this.formatCurrency(m):I=this.formatCompact(m);let w=null,A=!1;if(b>0){let y=Math.round((m-b)/b*100);if(m===0||y===0)w={pct:"0%",up:!0};else{let D=y>0;w={pct:`${D?"+":""}${y}%`,up:D}}}else m>0&&(A=!0);return{label:t,icon:e,display:I,delta:w,deltaPlaceholder:A}}buildAudienceChart(t){let e=t?.series??[],n=0,S=e.map(m=>{let b=m.followersTotalAtEod??0;return b>0&&(n=b),n});this.audienceChart={labels:e.map(m=>this.shortDate(m.date)),datasets:[{label:this.translate.instant("STUDIO.STATS.AUDIENCE.FOLLOWERS_TOTAL"),data:S,borderColor:"#2f8eef",backgroundColor:"rgba(47, 142, 239, 0.12)",fill:!0,tension:.35}]}}buildContentChart(t){let e=t?.series??[];this.contentChart={labels:e.map(n=>this.shortDate(n.date)),datasets:[{label:this.translate.instant("STUDIO.STATS.CONTENT.VIEWS"),data:e.map(n=>n.videoViewsCount??0),borderColor:"#2f8eef",backgroundColor:"rgba(47, 142, 239, 0.12)",fill:!0,tension:.35},{label:this.translate.instant("STUDIO.STATS.CONTENT.LIKES"),data:e.map(n=>n.likesCount??0),borderColor:"#ff3b30",backgroundColor:"rgba(255, 59, 48, 0.10)",fill:!1,tension:.35}]}}buildRevenueChart(t){let e=t?.series??[];this.revenueChart={labels:e.map(n=>this.shortDate(n.date)),datasets:[{label:this.translate.instant("STUDIO.STATS.REVENUE.TOTAL"),data:e.map(n=>((n.giftsRevenueCents??0)+(n.shopRevenueCents??0)+(n.donationsRevenueCents??0))/100),borderColor:"#16a394",backgroundColor:"rgba(22, 163, 148, 0.18)",fill:!0,tension:.35}]}}buildContentKpis(t){let e=t?.totals;this.contentKpis=[{label:"STUDIO.STATS.CONTENT.COMPLETION_RATE",value:`${Math.round((e?.completionRate??0)*100)/100}%`},{label:"STUDIO.STATS.CONTENT.AVG_WATCH",value:this.formatDuration(e?.avgWatchTimePerView??0)},{label:"STUDIO.STATS.CONTENT.PUBLISHED",value:this.formatCompact(e?.videosPublishedCount??0)},{label:"STUDIO.STATS.CONTENT.SHARES",value:this.formatCompact(e?.sharesCount??0)},{label:"STUDIO.STATS.CONTENT.BOOKMARKS",value:this.formatCompact(e?.bookmarksCount??0)}]}buildLiveKpis(t){let e=t?.totals;this.liveKpis=[{label:"STUDIO.STATS.LIVE.SESSIONS",value:this.formatCompact(e?.liveSessionsCount??0)},{label:"STUDIO.STATS.LIVE.PEAK",value:this.formatCompact(e?.livePeakViewers??0)},{label:"STUDIO.STATS.LIVE.AVG_DURATION",value:this.formatDuration(e?.avgSessionDurationSeconds??0)},{label:"STUDIO.STATS.LIVE.TOTAL_DURATION",value:this.formatDuration(e?.liveDurationSeconds??0)}]}buildShopKpis(t,e){let n=t?.totals;this.shopKpis=[{label:"STUDIO.STATS.SHOP.SHOP_REVENUE",value:this.formatCurrency(n?.shopRevenueCents??0)},{label:"STUDIO.STATS.SHOP.ORDERS",value:this.formatCompact(n?.shopOrdersCount??0)}],this.giftKpis=[{label:"STUDIO.STATS.GIFTS.CADEAUX",value:this.formatCurrency(n?.g
1iftsRevenueCents??0)},{label:"STUDIO.STATS.GIFTS.STARS",value:this.formatCompact(n?.starsEarnedAmount??0)}]}computeEmpty(t){let e=t.overview?.kpis,n=(e?.videoViews?.value??0)+(e?.followersGained?.value??0)+(e?.likes?.value??0)+(e?.comments?.value??0)+(e?.watchTimeSeconds?.value??0)+(e?.revenueCents?.value??0)+(e?.uniqueViewers?.value??0)+(e?.starsEarned?.value??0);this.isEmpty=n===0&&(t.top?.items?.length??0)===0}formatCompact(t){return Y(t)}formatDuration(t){let e=Math.max(0,Math.round(t??0)),n=Math.floor(e/3600),S=Math.floor(e%3600/60);return n>0?`${n}h ${S}min`:S>0?`${S}min`:`${e}s`}formatCurrency(t){return`${((t??0)/100).toFixed(2).replace(".",",")} \u20AC`}shortDate(t){return!t||t.length<10?t??"":`${t.slice(8,10)}/${t.slice(5,7)}`}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=N({type:i,selectors:[["app-view-studio-stats"]],decls:13,vars:4,consts:[[1,"d-flex","justify-content-between","align-items-center","flex-wrap","gap-3","mb-4"],[1,"text-light","fs-6"],[1,"pi","pi-chart-line","me-2"],["role","tablist",1,"stats__period"],["type","button",1,"stats__period-btn",3,"is-active"],[1,"card","mb-4"],["type","button",1,"stats__period-btn",3,"click"],[1,"card-body"],[1,"stats__empty"],[1,"pi","pi-chart-line","stats__empty-ic"],[1,"stats__empty-title"],[1,"stats__empty-sub"],[1,"stats__kpis","mb-4"],[3,"icon","value","label","badge"],[1,"fs-5","fw-semibold","mb-3"],[1,"pi","pi-users","me-2","text-primary"],["height","260px",3,"type","data","responsive"],[1,"pi","pi-eye","me-2","text-primary"],[1,"pi","pi-euro","me-2","text-primary"],[1,"pi","pi-video","me-2","text-primary"],[1,"sub-card__rows"],[1,"sub-row"],[1,"pi","pi-broadcast","me-2","text-primary"],[1,"pi","pi-gift","me-2","text-primary"],[1,"pi","pi-shopping-bag","me-2","text-primary"],[1,"sub-row__label"],[1,"sub-row__value"],[1,"pi","pi-star","me-2","text-primary"],[1,"top-list"],[1,"top-item"],[1,"top-item__thumb"],["loading","lazy",3,"src","alt"],[1,"pi","pi-video"],[1,"top-item__body"],[1,"top-item__title"],[1,"top-item__metrics"],[1,"pi","pi-eye"],[1,"pi","pi-heart"],[1,"pi","pi-comment"]],template:function(e,n){e&1&&(r(0,"div")(1,"div",0)(2,"div")(3,"span",1),p(4,"i",2),l(5),s(6,"translate"),o()(),r(7,"div",3),_(8,ie,3,5,"button",4,ee),o()(),h(10,ne,1,0,"app-widget-loading")(11,ae,10,6,"div",5)(12,Te,61,25),o()),e&2&&(a(5),c(" ",d(6,2,"STUDIO.STATS.TITLE")," "),a(3),T(n.periodOptions),a(2),x(n.loading?10:n.isEmpty?11:12))},dependencies:[W,z,j,G,J,q,Q],styles:["[_nghost-%COMP%]{display:block;--accent: #2f8eef;--ink: #14141f;--ink-soft: #5a5a6b;--line: #e7e7ee;--up: #16a34a;--down: #ef4444}.stats__period[_ngcontent-%COMP%]{display:inline-flex;background:#f1f1f6;border-radius:12px;padding:4px;gap:2px}.stats__period-btn[_ngcontent-%COMP%]{border:none;background:transparent;color:var(--ink-soft);font-size:13px;font-weight:600;padding:7px 14px;border-radius:9px;cursor:pointer;transition:background .16s,color .16s}.stats__period-btn.is-active[_ngcontent-%COMP%]{background:#fff;color:var(--ink);box-shadow:0 1px 3px #14141f14}.stats__empty[_ngcontent-%COMP%]{text-align:center;padding:40px 20px}.stats__empty-ic[_ngcontent-%COMP%]{font-size:48px;color:#c2c2cf;display:block;margin-bottom:16px}.stats__empty-title[_ngcontent-%COMP%]{font-size:17px;font-weight:700;color:var(--ink);margin:0 0 6px}.stats__empty-sub[_ngcontent-%COMP%]{font-size:14px;color:var(--ink-soft);margin:0}.stats__kpis[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px}.sub-card__rows[_ngcontent-%COMP%]{display:flex;flex-direction:column}.sub-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:9px 0;border-top:1px solid var(--line)}.sub-row[_ngcontent-%COMP%]:first-child{border-top:none}.sub-row__label[_ngcontent-%COMP%]{font-size:13px;color:var(--ink-soft)}.sub-row__value[_ngcontent-%COMP%]{font-size:14px;font-weight:700;color:var(--ink)}.top-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.top-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 14px}.top-item__thumb[_ngcontent-%COMP%]{width:56px;height:56px;flex-shrink:0;border-radius:10px;overflow:hidden;background:#f1f1f6;display:flex;align-items:center;justify-content:center;
1color:#c2c2cf}.top-item__thumb[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.top-item__body[_ngcontent-%COMP%]{flex:1;min-width:0}.top-item__title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top-item__metrics[_ngcontent-%COMP%]{display:flex;gap:16px;margin-top:6px;font-size:13px;color:var(--ink-soft)}.top-item__metrics[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px}.top-item__metrics[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:12px}"]})};export{Z as ViewStudioStatsComponent};

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.