PageSourceSearch

https://voicerankings.com/_nuxt/CawBFEhN.js

js voicerankings.com collected 2026-10-02 01:50:17 UTC 11,024 bytes, 1 lines download raw bytes

1import{u as M,r as u,w as N,E as f,V as E,e as i,o as n,f as t,F as h,i as b,j as w,k,t as a,n as y,g as L,l as F,T as z}from"./JPKKIjon.js";const P={class:"px-2 md:px-0 min-h-screen flex flex-col pb-12"},B={class:"flex-grow"},D={class:"bg-white dark:bg-gray-800 rounded-2xl shadow-sm border border-gray-100 dark:border-gray-700 overflow-hidden"},j={key:0,class:"text-center py-16 px-6"},T={key:1,class:"min-w-full divide-y divide-gray-200 table-fixed"},S=["onClick"],H={class:"px-2 sm:px-4 py-4 max-w-0"},O={class:"flex items-center gap-3"},U={class:"min-w-0"},R={class:"font-bold text-gray-900 dark:text-white truncate text-sm sm:text-base"},W=["href"],K={class:"text-xs text-gray-400 dark:text-gray-500 truncate"},Y={class:"px-2 sm:px-4 py-4 text-sm text-gray-600 text-center"},Z={class:"hidden md:table-cell px-4 py-4 text-sm text-gray-600"},q=["onClick"],G={class:"px-2 sm:px-4 py-4 text-center"},I={key:0},J={colspan:5,class:"p-0"},Q={class:"bg-gray-50/75 p-3 sm:p-4 space-y-4"},X={class:"md:hidden bg-white rounded-lg p-4 border border-gray-200 space-y-3"},tt={class:"flex items-center justify-between"},et={class:"pt-2 border-t border-gray-200"},st=["onClick"],ot={class:"bg-white rounded-lg border border-gray-200"},lt={key:0,class:"text-center py-4 text-sm text-gray-500"},it={key:1,class:"text-center py-4 text-sm text-gray-500"},nt={key:2,class:"overflow-x-auto"},at={class:"min-w-full"},rt={class:"divide-y divide-gray-200"},ct={class:"p-2 text-center"},dt=["src","alt"],xt={class:"p-2 text-left min-w-0"},pt=["href"],ut={class:"truncate text-xs sm:text-sm"},mt={class:"font-normal text-gray-500 text-xs sm:text-sm flex-shrink-0"},ht={class:"p-2 text-left"},yt={class:"flex items-center gap-2"},_t=["src","alt"],gt={class:"hidden sm:inline text-xs sm:text-sm"},vt={class:"hidden sm:table-cell p-2 text-gray-600 text-xs sm:text-sm"},ft={class:"hidden md:table-cell p-2 text-gray-600 text-xs"},bt={class:"hidden md:table-cell p-2 text-gray-600 text-xs"},wt={class:"hidden lg:table-cell p-2 text-gray-600 text-xs"},kt={class:"hidden lg:table-cell p-2 text-gray-600 text-xs"},Ct={class:"p-2 text-center"},Vt=["onClick"],Mt={__name:"collections",async setup($t){let p,_;M({title:"Collections | My Library",meta:[{name:"description",content:""}]});const c=u([]),d=u(null),x=u({}),m=u(!1);try{const{data:l}=([p,_]=N(()=>f("/api/v1/app/collections","$krBMp3D3ns")),p=await p,_(),p);l.value&&l.value.collections&&(c.value=l.value.collections)}catch(l){console.error("Failed to load collections:",l)}E(async()=>{});function C(l){if(!l||l.length===0)return{primaryCountryCode:null};const o=(l.find(s=>s.toLowerCase()==="en-us")||l.find(s=>s.toLowerCase().startsWith("en-"))||l[0]).split("-");return{primaryCountryCode:o.length>1?o[1].toUpperCase():null}}async function V(l){if(d.value===l){d.value=null;return}if(d.value=l,!x.value[l]){m.value=!0;try{const{data:e}=await f(`/api/v1/collections/voices?collection_id=${l}`,"$67pp9K-vBc");e.value&&e.value.voices&&(x.value[l]=e.value.voices.map(o=>({...o,displayCountryCode:C(o.voice_language_codes).primaryCountryCode})))}catch(e){console.error(`Failed to load voices for collection ${l}:`,e)}finally{m.value=!1}}}async function g(l,e){if(confirm("Are you sure you want to permanently delete this entire collection?"))try{await $fetch("/api/v1/collections/collection",{method:"DELETE",body:{collection_id:l}}),c.value.splice(e,1)}catch(o){console.error("Failed to delete collection:",o),alert("Error: Could not delete the collection.")}}async function $(l,e,o,r){if(confirm("Are you sure you want to remove this voice from the collection?"))try{await $fetch("/api/v1/collections/remove",{method:"POST",body:{collection_id:l,voice_id:e}}),x.value[l].splice(r,1),c.value[o].voice_count--}catch(s){console.error("Failed to remove voice from collection:",s),alert("Error: Could not remove the voice from the collection.")}}return(l,e)=>(n(),i("div",P,[t("div",B,[e[12]||(e[12]=t("div",{class:"mb-6"},[t("h1",{class:"text-2xl font-bold text-white mb-2"},"My Collections"),t("p",{class:"text-indigo-100/80"},"Organize and manage your saved voice collections.")],-1)),t("div",D,[c.value.length?(n(),i("table",T,[e[11]||(e[11]=t("thead",{class:"bg-gray-50 sticky top-0 z-10"},[t("tr",null,[t("th",{scope:"col",class:"px-2 sm:px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"},[t("span",{class:"block sm:hidden"},"Collection"),t("span",{class:"hidden sm:block"},"Collection Name")]),t("th",{scope:"col",class:"w-16 px-2 sm:px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"},"Voices"),t("th",{scope:"col",class:"hidden md:table-cell px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"},"Visibility"),t("th",{scope:"col",class:"hidden md:table-cell px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"},"Actions"),t("th",{scope:"col",class:"w-12 px-2 sm:px-4 py-3"})])],-1)),(n(!0),i(h,null,b(c.value,(o,r)=>
1(n(),i(h,{key:o.collection_id},[t("tr",{class:"hover:bg-gray-50 transition-colors duration-150 cursor-pointer",onClick:s=>V(o.collection_id)},[t("td",H,[t("div",O,[e[4]||(e[4]=t("div",{class:"p-2 bg-indigo-50 dark:bg-indigo-900/40 text-indigo-600 dark:text-indigo-400 rounded-lg shrink-0"},[t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})])],-1)),t("div",U,[t("div",R,[t("a",{target:"_blank",class:"hover:underline hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors",href:`/?collection_id=${o.collection_id}`,onClick:e[0]||(e[0]=k(()=>{},["stop"]))},a(o.collection_name),9,W)]),t("div",K,a(o.collection_description||"No description"),1)])])]),t("td",Y,a(o.voice_count),1),t("td",Z,[t("span",{class:y([o.is_public?"bg-green-100 text-green-800":"bg-yellow-100 text-yellow-800","px-2 inline-flex text-xs leading-5 font-semibold rounded-full"])},a(o.is_public?"Public":"Private"),3)]),t("td",{onClick:e[1]||(e[1]=k(()=>{},["stop"])),class:"hidden md:table-cell px-4 py-4 text-sm text-gray-600"},[t("button",{onClick:s=>g(o.collection_id,r),class:"text-red-600 hover:text-red-900 font-medium"},"Delete",8,q)]),t("td",G,[(n(),i("svg",{xmlns:"http://www.w3.org/2000/svg",class:y(["h-4 w-4 sm:h-5 sm:w-5 text-gray-400 transform transition-transform",{"rotate-180":d.value===o.collection_id}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...e[5]||(e[5]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)])],2))])],8,S),d.value===o.collection_id?(n(),i("tr",I,[t("td",J,[L(z,{"enter-from-class":"transform opacity-0 -translate-y-2","enter-active-class":"transition-all duration-300 ease-out","leave-to-class":"transform opacity-0 -translate-y-2","leave-active-class":"transition-all duration-200 ease-in"},{default:F(()=>[t("div",Q,[t("div",X,[e[7]||(e[7]=t("h3",{class:"text-sm font-medium text-gray-700 mb-2"},"Collection Settings",-1)),t("div",tt,[e[6]||(e[6]=t("span",{class:"text-sm text-gray-600"},"Visibility:",-1)),t("span",{class:y([o.is_public?"bg-green-100 text-green-800":"bg-yellow-100 text-yellow-800","px-2 inline-flex text-xs leading-5 font-semibold rounded-full"])},a(o.is_public?"Public":"Private"),3)]),t("div",et,[t("button",{onClick:s=>g(o.collection_id,r),class:"w-full text-sm font-medium text-red-600 hover:text-red-700 hover:bg-red-50 py-2 px-3 rounded-md transition-colors"}," Delete Collection ",8,st)])]),t("div",ot,[e[10]||(e[10]=t("div",{class:"p-3 border-b border-gray-200"},[t("h3",{class:"text-sm font-medium text-gray-700"},"Voices in Collection")],-1)),m.value?(n(),i("div",lt,"Loading voices...")):x.value[o.collection_id]?.length?(n(),i("div",nt,[t("table",at,[e[9]||(e[9]=t("thead",{class:"bg-gray-100"},[t("tr",null,[t("th",{class:"w-8 p-2 text-left text-xs font-medium text-gray-500 uppercase"}),t("th",{class:"p-2 text-left text-xs font-medium text-gray-500 uppercase"},"Voice"),t("th",{class:"p-2 text-left text-xs font-medium text-gray-500 uppercase"},"Provider"),t("th",{class:"hidden sm:table-cell p-2 text-left text-xs font-medium text-gray-500 uppercase"},"WPM"),t("th",{class:"hidden md:table-cell p-2 text-left text-xs font-medium text-gray-500 uppercase"},"Pitch"),t("th",{class:"hidden md:table-cell p-2 text-left text-xs font-medium text-gray-500 uppercase"},"Energy"),t("th",{class:"hidden lg:table-cell p-2 text-left text-xs font-medium text-gray-500 uppercase"},"Intensity"),t("th",{class:"hidden lg:table-cell p-2 text-left text-xs font-medium text-gray-500 uppercase"},"Fry"),t("th",{class:"p-2 w-12 text-center"})])],-1)),t("tbody",rt,[(n(!0),i(h,null,b(x.value[o.collection_id],(s,A)=>(n(),i("tr",{key:s.voice_id,class:"hover:bg-gray-50 text-sm"},[t("td",ct,[s.displayCountryCode?(n(),i("img",{key:0,class:"h-3 w-4 sm:h-4 sm:w-6 rounded-sm flex-shrink-0 object-cover",src:"https://flagsapi.com/"+s.displayCountryCode+"/flat/24.png",alt:s.displayCountryCode+" flag",onError:e[2]||(e[2]=v=>v.target.style.display="none")},null,40,dt)):w("",!0)]),t("td",xt,[t("a",{target:"_blank",class:"hover:underline flex gap-1 truncate",href:`/voice/${s.voice_service}/${s.voice_gender}/${s.voice_speaker_id}`},[t("span",ut,a(s.voice_name),1),t("span",mt," ("+a(s.voice_gender?s.voice_gender.charAt(0).toUpperCase():"?")+") ",1)],8,pt)]),t("td",ht,[t("div",yt,[t("img",{class:"h-4 w-4 sm:h-5 sm:w-5 flex-shrink-0",src:"https://t1.gstatic.
1com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://"+(s.voice_service_alias||s.voice_service)+"&size=32",alt:s.voice_service},null,8,_t),t("span",gt,a(s.voice_service),1)])]),t("td",vt,a(s.voice_words_per_minute!=null?Math.round(s.voice_words_per_minute):"N/A"),1),t("td",ft,a(s.voice_pitch_hz!=null?Math.round(s.voice_pitch_hz)+"Hz":"N/A"),1),t("td",bt,a(s.voice_energy_number!=null?s.voice_energy_number+"/10":"N/A"),1),t("td",wt,a(s.voice_intensity!=null?Math.round(s.voice_intensity)+"%":"N/A"),1),t("td",kt,a(s.voice_vocal_fry!=null?(s.voice_vocal_fry*100).toFixed(0)+"%":"N/A"),1),t("td",Ct,[t("button",{onClick:v=>$(o.collection_id,s.voice_id,r,A),class:"text-gray-400 hover:text-red-600 p-1"},[...e[8]||(e[8]=[t("svg",{class:"w-4 h-4 sm:w-5 sm:h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,Vt)])]))),128))])])])):(n(),i("div",it,"This collection is empty."))])])]),_:2},1024)])])):w("",!0)],64))),128))])):(n(),i("div",j,[...e[3]||(e[3]=[t("div",{class:"text-5xl mb-4"},"📁",-1),t("h3",{class:"text-lg font-bold text-gray-900 dark:text-white mb-2"},"No collections yet",-1),t("p",{class:"text-sm text-gray-500 max-w-sm mx-auto"},"Create a collection to start organizing your favorite voices.",-1)])]))])])]))}};export{Mt 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.