1import{a as G}from"./chunk-2LPPYG5A.js";import{a as j}from"./chunk-NBMUSEX4.js";import{d as z,e as $}from"./chunk-YQZAETCE.js";import{r as F,s as A,x as R}from"./chunk-EO42E46J.js";import"./chunk-3QVSKJ3X.js";import{I as B,c as D,p as U,r as L,s as V}from"./chunk-ERUCNOOT.js";import{$b as N,Fa as I,Ib as b,Jb as l,Kb as P,Lb as v,Qc as c,Rc as p,Vb as a,Wb as s,Xb as _,Yb as E,Zb as M,da as C,db as n,fc as x,gc as g,la as S,ma as k,na as h,oa as y,sb as w,tc as r,uc as m,vc as d,yb as u}from"./chunk-DBE7WQEG.js";import"./chunk-W7GRJBO5.js";function J(o,t){o&1&&(a(0,"div",10),_(1,"app-widget-loading",11),s()),o&2&&(n(),l("loading",!0))}function K(o,t){o&1&&(a(0,"p",14),r(1),c(2,"translate"),s()),o&2&&(n(),d(" ",p(2,1,"STUDIO.CONTENT.EMPTY")," "))}function W(o,t){if(o&1&&(a(0,"span",40),r(1),c(2,"translate"),s()),o&2){let e=g().$implicit,i=g(3);l("ngClass",i.statusBadge(e.status).cls),n(),m(p(2,2,i.statusBadge(e.status).key))}}function Z(o,t){if(o&1&&(a(0,"div",41),h(),a(1,"svg",42),_(2,"path",43)(3,"path",44),s(),y(),a(4,"small"),r(5),c(6,"translate"),s()()),o&2){let e=g().$implicit,i=g(3);n(2),b("d",i.sparkArea(e.spark)),n(),b("d",i.sparkPath(e.spark)),n(2),m(p(6,3,"STUDIO.CONTENT.TREND_30D"))}}function q(o,t){if(o&1){let e=N();a(0,"li",17),x("click",function(){let f=S(e).$implicit,T=g(3);return k(T.openStats(f))}),a(1,"span",18)(2,"span",19),_(3,"i",20),s()(),a(4,"div",21)(5,"span",22),r(6),c(7,"translate"),s(),a(8,"span",23)(9,"span",24),r(10),c(11,"translate"),s(),u(12,W,3,4,"span",25),a(13,"span",26),c(14,"translate"),_(15,"i",20),a(16,"span",27),r(17),c(18,"translate"),s()(),a(19,"span",28),r(20),s()()(),u(21,Z,7,5,"div",29),a(22,"div",30)(23,"span",31),_(24,"i",32),r(25),s(),a(26,"span",33),_(27,"i",34),r(28),s(),a(29,"span",35),_(30,"i",36),r(31),s(),a(32,"span",37),_(33,"i",38),r(34),s()(),_(35,"i",39),s()}if(o&2){let e=t.$implicit,i=g(3);n(),P("background-image",e.thumbnailUrl?"url("+e.thumbnailUrl+")":""),n(2),l("ngClass",e.type==="video"?"pi-video":"pi-images"),n(3),m(e.title||p(7,15,"STUDIO.CSTATS.UNTITLED")),n(4),m(p(11,17,e.type==="video"?"STUDIO.CSTATS.TYPE_VIDEO":"STUDIO.CSTATS.TYPE_GALLERY")),n(2),l("ngIf",i.showStatus(e.status)),n(),l("title",p(14,19,i.visibilityInfo(e.visibility).key)),n(2),l("ngClass",i.visibilityInfo(e.visibility).icon),n(2),m(p(18,21,i.visibilityInfo(e.visibility).key)),n(3),m(i.shortDate(e.createdAt)),n(),l("ngIf",i.hasSpark(e.spark)),n(4),d(" ",i.compact(e.viewCount),""),n(3),d(" ",i.compact(e.likeCount),""),n(3),d(" ",i.compact(e.commentCount),""),n(3),d(" ",i.compact(e.shareCount),"")}}function Q(o,t){if(o&1&&(a(0,"ul",15),u(1,q,36,23,"li",16),s()),o&2){let e=g(2);n(),l("ngForOf",e.filtered)}}function X(o,t){if(o&1&&(E(0),u(1,K,3,3,"p",12)(2,Q,2,1,"ul",13),M()),o&2){let e=g();n(),l("ngIf",!e.filtered.length),n(),l("ngIf",e.filtered.length)}}var Y=class o{analytics=C(G);router=C(F);isBrowser=D(C(I));loading=!0;items=[];filter="all";get filtered(){return this.filter==="all"?this.items:this.items.filter(t=>t.type===this.filter)}ngOnInit(){this.isBrowser&&this.analytics.getContentList().subscribe({next:t=>{this.items=t.items||[],this.loading=!1},error:()=>{this.loading=!1}})}setFilter(t){this.filter=t}openStats(t){this.router.navigate(["/studio","content",t.id])}sparkPath(t){if(!t||t.length<2)return"";let e=100,i=28,f=Math.max(1,...t),T=e/(t.length-1);return t.map((H,O)=>`${O===0?"M":"L"}${(O*T).toFixed(1)},${(i-H/f*i).toFixed(1)}`).join(" ")}sparkArea(t){let e=this.sparkPath(t);return e?`${e} L100,28 L0,28 Z`:""}hasSpark(t){return!!t&&t.some(e=>e>0)}statusBadge(t){switch(t){case"published":return{key:"STUDIO.CONTENT.ST_PUBLISHED",cls:"is-published"};case"draft":return{key:"STUDIO.CONTENT.ST_DRAFT",cls:"is-draft"};case"scheduled":return{key:"STUDIO.CONTENT.ST_SCHEDULED",cls:"is-scheduled"};case"restricted":return{key:"STUDIO.CONTENT.ST_RESTRICTED",cls:"is-warn"};case"rejected":case"failed":return{key:"STUDIO.CONTENT.ST_FAILED",cls:"is-fail"};default:return{key:"STUDIO.CONTENT.ST_PROCESSING",cls:"is-processing"}}}showStatus(t){return t!=="published"}visibilityInfo(t){switch(t){case"friends":return{key:"STUDIO.CONTENT.VIS_FRIENDS",icon:"pi-users"};case"private":return{key:"STUDIO.CONTENT.VIS_PRIVATE",icon:"pi-lock"};default:return{key:"STUDIO.CONTENT.VIS_PUBLIC",icon:"pi-globe"}}}compact(t){let e=t??0;return e>=1e6?(e/1e6).toFixed(1).replace(".0","")+"M":e>=1e3?(e/1e3).toFixed(1).replace(".0","")+"K":String(e)}shortDate(t){return!t||t.length<10?t??"":`${t.slice(8,10)}/${t.slice(5,7)}/${t.slice(2,4)}`}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=w({type:o,selectors:[["app-view-studio-content"]],decls:23,vars:23,consts:[[1,"d-flex","justify-content-between","align-items-center","flex-wrap","gap-3","mb-4"],[1,"d-flex","align-items-center","gap-3"],[1,"text-light","fs-6"],[1,"pi","pi-images","me-2"],["routerLink","/studio/upload",1,"sc__upload"],[1,"pi","pi-upload","me-1"],["role","tablist",1,"sc__filters"],["type","button",1,"sc__filter",3,"click"],["class","sc__loading",4,"ngIf"],[4,"ngIf"],[1,"sc__loading"],[3,"loading"],["class","sc__empty",4,"ngIf"],["class","sc__list",4,"ngIf"],[1,"sc__empty"],[1,"sc__list"],["class","sc__row",3,"click",4,"ngFor","ngForOf"],[1,"sc__row",3,"click"],[1,"sc__thumb"],[1,"sc__type"],[1,"pi",3,"ngClass"],[1,"sc__info"],[1,"sc__name"],[1,"sc__meta"],[1,"sc__badge"],["class","sc__badge sc__badge--status",3,"ngClass",4,"ngIf"],[1,"sc__vis",3,"title"],[1,"sc__vis-lbl"],[1,"sc__date"],["class","sc__spark",4,"ngIf"],[1,"sc__stats"],["title","Vues"],[1,"pi","pi-eye"],["title","J'aime"],[1,"pi","pi-heart"],["title","Commentaires"],[1,"pi","pi-comment"],["title","Partages",1,"sc__stat-opt"],[1,"pi","pi-share-alt"],[1,"pi","pi-chart-bar","sc__go"],[1,"sc__badge","sc__badge--status",3,"ngClass"],[1,"sc__spark"],["viewBox","0 0 100 28","preserveAspectRatio","none"],[1,"sc__spark-area"],[1,"sc__spark-line"]],template:function(e,i){e&1&&(a(0,"div")(1,"div",0)(2,"div",1)(3,"span",2),_(4,"i",3),r(5),c(6,"translate"),s(),a(7,"a",4),_(8,"i",5),r(9),c(10,"translate"),s()(),a(11,"div",6)(12,"button",7),x("click",function(){return i.setFilter("all")}),r(13),c(14,"translate"),s(),a(15,"button",7),x("click",function(){return i.setFilter("video")}),r(16),c(17,"translate"),s(),a(18,"button",7),x("click",function(){return i.setFilter("gallery")}),r(19),c(20,"translate"),s()()(),u(21,J,2,1,"div",8)(22,X,3,2,"ng-container",9),s()),e&2&&(n(5),d(" ",p(6,13,"STUDIO.CONTENT.TITLE")," "),n(4),d(" ",p(10,15,"STUDIO.CONTENT.UPLOAD_CTA")," "),n(3),v("is-active",i.filter==="all"),n(),d(" ",p(14,17,"STUDIO.CONTENT.ALL")," "),n(2),v("is-active",i.filter==="video"),n(),d(" ",p(17,19,"STUDIO.CONTENT.VIDEOS")," "),n(2),v("is-active",i.filter==="gallery"),n(),d(" ",p(20,21,"STUDIO.CONTENT.GALLERIES")," "),n(2),l("ngIf",i.loading),n(),l("ngIf",!i.loading))},dependencies:[B,U,L,V,R,A,$,z,j],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block;--accent: #2f8eef;--ink: #14141f;--ink-soft: #5a5a6b;--line: #e7e7ee}*[_ngcontent-%COMP%]{box-sizing:border-box}.sc__filters[_ngcontent-%COMP%]{display:inline-flex;background:#f1f1f6;border-radius:12px;padding:4px;gap:2px}.sc__filter[_ngcontent-%COMP%]{border:none;background:transparent;color:var(--ink-soft);font-size:13px;font-weight:600;padding:7px 14px;border-radius:9px;
1cursor:pointer}.sc__filter.is-active[_ngcontent-%COMP%]{background:#fff;color:var(--ink);box-shadow:0 1px 3px #00000014}.sc__loading[_ngcontent-%COMP%], .sc__empty[_ngcontent-%COMP%]{padding:60px;text-align:center;color:var(--ink-soft)}.sc__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.sc__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;padding:12px 16px;border:1px solid var(--line);border-radius:14px;background:#fff;cursor:pointer;transition:border-color .15s,box-shadow .15s}.sc__row[_ngcontent-%COMP%]:hover{border-color:var(--accent);box-shadow:0 2px 12px #2f8eef1f}.sc__thumb[_ngcontent-%COMP%]{position:relative;flex-shrink:0;width:56px;height:74px;border-radius:10px;background:#ececf2 center/cover no-repeat;display:flex;align-items:flex-end;justify-content:flex-start}.sc__type[_ngcontent-%COMP%]{margin:4px;width:22px;height:22px;border-radius:6px;background:#0000008c;color:#fff;display:flex;align-items:center;justify-content:center}.sc__type[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:11px}.sc__info[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}.sc__name[_ngcontent-%COMP%]{font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sc__meta[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;font-size:12px;color:var(--ink-soft)}.sc__date[_ngcontent-%COMP%]{color:var(--ink-soft)}.sc__badge[_ngcontent-%COMP%]{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:var(--accent);background:#2f8eef1a;padding:2px 7px;border-radius:999px}.sc__badge--status.is-published[_ngcontent-%COMP%]{color:#16a34a;background:#16a34a1f}.sc__badge--status.is-draft[_ngcontent-%COMP%]{color:#6b7280;background:#6b728024}.sc__badge--status.is-scheduled[_ngcontent-%COMP%]{color:#2f8eef;background:#2f8eef1f}.sc__badge--status.is-processing[_ngcontent-%COMP%], .sc__badge--status.is-warn[_ngcontent-%COMP%]{color:#d97706;background:#d9770624}.sc__badge--status.is-fail[_ngcontent-%COMP%]{color:#ef4444;background:#ef44441f}.sc__vis[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;color:var(--ink-soft)}.sc__vis[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:12px}.sc__spark[_ngcontent-%COMP%]{flex:0 0 132px;display:flex;flex-direction:column;align-items:stretch;gap:4px}.sc__spark[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:132px;height:30px;display:block;overflow:visible}.sc__spark[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:10px;color:var(--ink-soft);text-align:right}.sc__spark-line[_ngcontent-%COMP%]{fill:none;stroke:var(--accent);stroke-width:2;vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round}.sc__spark-area[_ngcontent-%COMP%]{fill:#2f8eef1f;stroke:none}.sc__stats[_ngcontent-%COMP%]{display:flex;gap:16px;flex-shrink:0}.sc__stats[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:600;color:var(--ink-soft);min-width:42px}.sc__stats[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:12px;color:var(--accent)}.sc__go[_ngcontent-%COMP%]{flex-shrink:0;color:var(--accent);font-size:16px;margin-left:2px}@media (max-width: 860px){.sc__spark[_ngcontent-%COMP%]{display:none}}@media (max-width: 600px){.sc__stat-opt[_ngcontent-%COMP%]{display:none!important}.sc__vis-lbl[_ngcontent-%COMP%]{display:none}}.sc__upload[_ngcontent-%COMP%]{display:inline-flex;align-items:center;background:#2f8eef;color:#fff;text-decoration:none;border-radius:999px;padding:.42rem .95rem;font-size:.84rem;font-weight:600;transition:background .15s}.sc__upload[_ngcontent-%COMP%]:hover{background:#2578cc;color:#fff}']})};export{Y as ViewStudioContentComponent};
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.