1import{d as g,aa as w,u as m,a6 as y,az as z,b as T,L as k,K as C,f as u,i as e,t as o,h as a,aO as V,F as L,N as S,m as f,ab as _,a as A,a0 as F,v as c,g as D,n as E,j as O,aA as P,ar as R,e as B}from"./index.16ba4ea0.js";import"./vendor-highcharts.9b480a8e.js";import"https://cdn.jsdelivr.net/npm/[email protected]/dist/buttplug-wasm.mjs";const I={class:"grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-8"},N={class:"rounded p-3 bg-zinc-800"},H={class:"text-white text-3xl font-semibold"},M={class:"rounded p-3 bg-zinc-800"},W={class:"text-white text-3xl font-semibold"},j={class:"rounded p-3 bg-zinc-800"},G={class:"text-white text-3xl font-semibold"},K={class:"md:col-span-3 rounded p-3 bg-zinc-800"},U={class:"divide-y divide-zinc-700 mt-4"},$={class:"flex-1 line-clamp-1 text-sm md:text-base"},q={class:"text-right shrink-0"},J={class:"font-medium text-green-500 text-sm md:text-base"},Q={class:"text-zinc-400 text-xs md:text-sm"},X={class:"md:col-span-full"},Y={class:"text-zinc-500 text-sm"},Z=["title"],ot=g({__name:"Studio",async setup(tt){let r,p;const h=w(()=>_(()=>import("./index.16ba4ea0.js").then(s=>s.d0),["/assets/index.16ba4ea0.js","/assets/index.817905f0.css"],import.meta.url)),{isProduction:x}=m(),{user:d}=y(m()),n=([r,p]=z(()=>A.user.getStatistics()),r=await r,p(),r),b=T(HTMLImageElement),v=async()=>{var t;const s=await _(()=>import("./vendor-highcharts.9b480a8e.js").then(l=>l.h),[],import.meta.url);return(t=s==null?void 0:s.default)!=null?t:s};return k(async()=>{const s=await v();s.chart("views-chart",{title:{text:""},chart:{backgroundColor:"transparent",style:{fontFamily:"FapTap"}},xAxis:{type:"datetime"},yAxis:{gridLineColor:"#3f3f46"},series:[{name:"Views",type:"area",data:n.views}],credits:{enabled:!1},legend:{enabled:!1},tooltip:{backgroundColor:"#27272a",borderRadius:16,borderColor:void 0,style:{color:"white"}},plotOptions:{area:{fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#3b82f6"],[1,"#3b82f600"]]},marker:{radius:2},lineWidth:1,states:{hover:{lineWidth:1}},threshold:null}}}),s.chart("tags-chart",{chart:{type:"pie",backgroundColor:"transparent",style:{fontFamily:"FapTap"}},title:void 0,tooltip:{valueSuffix:" views"},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",borderWidth:0,colors:["#1e3a8a","#1e40af","#1d4ed8","#2563eb","#3b82f6","#60a5fa","#93c5fd","#bfdbfe","#dbeafe","#eff6ff"],dataLabels:{enabled:!0,format:"<b>{point.name}</b>: {point.percentage:.1f} %"}}},legend:{enabled:!1},credits:{enabled:!1},series:[{name:"Tags",colorByPoint:!0,dataLabels:{color:"white",style:{textOutline:0}},data:n.tags.map(t=>({name:t.name,y:t.views}))}]})}),C(()=>{R(x?"Studio FapTap":"Demo"),B({meta:[{name:"description",content:"View comprehensive statistics for your videos, including views, subscribers,daily performance, top tags, and most viewed videos."}],link:[{rel:"canonical",href:"https://faptap.net/studio"}]})}),(s,t)=>{const l=F("router-link");return c(),u("div",I,[e("div",N,[t[0]||(t[0]=e("span",{class:"text-sm text-zinc-400 font-medium"},"Views",-1)),e("h2",H,o(a(d).views),1)]),e("div",M,[t[1]||(t[1]=e("span",{class:"text-sm text-zinc-400 font-medium"},"Subscribers",-1)),e("h2",W,o(a(d).subscribers),1)]),e("div",j,[t[2]||(t[2]=e("span",{class:"text-sm text-zinc-400 font-medium"},"Videos",-1)),e("h2",G,o(a(d).videos),1)]),t[6]||(t[6]=V('<div class="md:col-span-2 rounded p-3 bg-zinc-800"><h1 class="text-xl font-bold text-center">Daily views</h1><div id="views-chart"></div></div><div class="md:col-span-1 rounded p-3 bg-zinc-800"><h1 class="text-xl font-bold text-center">Top Tags</h1><div id="tags-chart"></div></div>',2)),e("div",K,[t[3]||(t[3]=e("h1",{class:"text-xl font-bold text-center"},"Most viewed videos in the last 7 days",-1)),e("div",U,[(c(!0),u(L,null,S(a(n).videos,i=>(c(),D(l,{to:`/v/${i.id}`,class:"flex items-center p-2 gap-4 hover:bg-zinc-700 rounded"},{default:E(()=>[O(a(h),{src:i.thumbnail_url,alt:i.name,class:"aspect-video h-16 w-auto mx-auto rounded",ref_for:!0,ref_key:"imageRef",ref:b},null,8,["src","alt"]),e("p",$,o(i.name),1),e("div",q,[e("p",J,"+"+o(i.views_last_7d)+" views",1),e("p",Q,o(i.views_total)+" total",1)])]),_:2},1032,["to"]))),256))])]),e("div",X,[e("span",Y,[t[4]||(t[4]=f(" This report has been generated ",-1)),e("span",{class:"text-zinc-400",title:a(n).generated_at},o(a(P)(new Date(a(n).generated_at))),9,Z),t[5]||(t[5]=f(" ago. It will be refreshed every 4 hours. ",-1))])])])}}});
1export{ot as default};
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.