1import {s as sn,n as nn,r as rn,q as qe,e as en,a as Nt}from'./chunk-CH8mu9Sb.js';import {I,f as fm,e as u,t as o,B as Be,u as uI,g as xi,h as h_,i as cu,A as AI,l as _p,w as yE,R as RI,j as bD,L as Lp,M as MI,y as yp,H as DE,o as kI,F as FI,m as BI,r as Fp,E as Ed,s as Id}from'./main-AZB7WUVZ.js';import {g}from'./chunk-CPmgh3HY.js';var h=(a,o)=>o.id;function K(a,o){a&1&&(xi(0,"p",4),h_(1,"All settings on this page are saved to your account and follow you across devices."),cu());}function L(a,o){if(a&1&&(xi(0,"option",10),h_(1),cu()),a&2){let t=o.$implicit;yp("value",t.id),bD(),Lp(t.label);}}function B(a,o){if(a&1&&(xi(0,"option",10),h_(1),cu()),a&2){let t=o.$implicit;yp("value",t.id),bD(),Lp(t.label);}}function j(a,o){if(a&1&&(xi(0,"option",10),h_(1),cu()),a&2){let t=o.$implicit;yp("value",t.id),bD(),Fp("",t.label," (~",t.cold_load_s,"s cold)");}}function q(a,o){if(a&1&&(xi(0,"option",10),h_(1),cu()),a&2){let t=o.$implicit;yp("value",t.id),bD(),Fp("",t.label," (~",t.cold_load_s,"s cold)");}}function z(a,o){if(a&1&&(xi(0,"option",10),h_(1),cu()),a&2){let t=o.$implicit;yp("value",t.id),bD(),Lp(t.label);}}function Y(a,o){if(a&1){let t=FI();xi(0,"div",3)(1,"h3"),h_(2,"Engines & extraction "),xi(3,"span",12),h_(4,"admin"),cu()(),xi(5,"p",4),h_(6,'Speech engine per element type and the model used to clean pasted pages. Leave engines on "Server default" unless you know why.'),cu(),xi(7,"div",5)(8,"label",6)(9,"span"),h_(10,"Title engine"),cu(),xi(11,"select",7),_p("ngModelChange",function(m){Ed(t);let d=BI();return Id(d.set("title_engine",m))}),xi(12,"option",13),h_(13,"Server default"),cu(),RI(14,j,2,3,"option",10,h),cu(),yE(),cu(),xi(16,"label",6)(17,"span"),h_(18,"Body engine"),cu(),xi(19,"select",7),_p("ngModelChange",function(m){Ed(t);let d=BI();return Id(d.set("body_engine",m))}),xi(20,"option",13),h_(21,"Server default"),cu(),RI(22,q,2,3,"option",10,h),cu(),yE(),cu(),xi(24,"label",6)(25,"span"),h_(26,"Extraction model"),cu(),xi(27,"select",7),_p("ngModelChange",function(m){Ed(t);let d=BI();return Id(d.set("extract_model",m))}),xi(28,"option",13),h_(29,"Server default"),cu(),RI(30,z,2,2,"option",10,h),cu(),yE(),cu()()();}if(a&2){let t=BI();bD(11),yp("ngModel",t.settings.prefs().title_engine),DE(),bD(3),kI(t.engines()),bD(5),yp("ngModel",t.settings.prefs().body_engine),DE(),bD(3),kI(t.engines()),bD(5),yp("ngModel",t.settings.prefs().extract_model),DE(),bD(3),kI(t.models());}}var G=new Set(["title_voice","body_voice","title_engine","body_engine","extract_model"]),R=class a{auth=I(fm);settings=I(u);api=I(g);verifyNotice=I(o);voices=Be([]);engines=Be([]);models=Be([]);saved=Be("");error=Be("");async ngOnInit(){try{let o=await this.api.voices();this.voices.set(o.kokoro),this.engines.set(o.engines);}catch(o){this.error.set(`Could not load voices: ${o.message}`);}if(this.auth.isAdmin())try{this.models.set((await this.api.extractModels()).models);}catch{}}set(o,t){if(G.has(o)&&!this.auth.verified()){this.settings.touch(),this.verifyNotice.show();return}this.settings.set(o,t),this.saved.set("Saved \u2713"),setTimeout(()=>this.saved.set(""),1500);}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=uI({type:a,selectors:[["vx-settings"]],decls:40,vars:7,consts:[[1,"page"],[1,"page-head"],[1,"status-line"],[1,"card"],[1,"hint"],[1,"grid"],[1,"field"],[1,"ctl",3,"ngModelChange","ngModel"],["value","dark"],["value","light"],[3,"value"],[1,"status-line","error"],[1,"admin-tag"],["value",""]],template:function(t,l){t&1&&(xi(0,"div",0)(1,"div",1)(2,"h2"),h_(3,"Settings"),cu(),xi(4,"span",2),h_(5),cu()(),xi(6,"div",3)(7,"h3"),h_(8,"Appearance"),cu(),AI(9,K,2,0,"p",4),xi(10,"div",5)(11,"label",6)(12,"span"),h_(13,"Theme"),cu(),xi(14,"select",7),_p("ngModelChange",function(d){return l.set("theme",d)}),xi(15,"option",8),h_(16,"Dark"),cu(),xi(17,"option",9),h_(18,"Light"),cu()(),yE(),cu()()(),xi(19,"div",3)(20,"h3"),h_(21,"Voices (English articles)"),cu(),xi(22,"p",4),h_(23,"Titles and body text are read by different narrators. Changes apply to the next article you open. Articles detected in other languages are read by a native voice automatically \u2014 currently Spanish, French and Romanian."),cu(),xi(24,"div",5)(25,"label",6)(26,"span"),h_(27,"Title voice"),cu(),xi(28,"select",7),_p("ngModelChange",function(d){return l.set("title_voice",d)}),RI(29,L,2,2,"option",10,h),cu(),yE(),cu(),xi(31,"label",6)(32,"span"),h_(33,"Body voice"),cu(),xi(34,"select",7),_p("ngModelChange",function(d){return l.set("body_voice",d)}),RI(35,B,2,2,"option",10,h),cu(),yE(),cu()()(),AI(37,Y,32,3,"div",3),xi(38,"p",11),h_(39),cu()()),t&2&&(bD(5),Lp(l.saved()),bD(4),MI(l.auth.authRequired()?9:-1),bD(5),yp("ngModel",l.settings.prefs().theme),DE(),bD(14),yp("ngModel",l.settings.prefs().title_voice),DE(),bD(),kI(l.voices()),bD(5),yp("ngModel",l.settings.prefs().body_voice),DE(),bD(),kI(l.voices()),bD(2),MI(l.auth.isAdmin()?37:-1),bD(2),Lp(l.error()));},dependencies:[sn,nn,rn,qe,en,Nt],styles:[".grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}.admin-tag[_ngcontent-%COMP%]{display:inline-block;margin-left:.5rem;padding:.1rem .5rem;border-radius:99px;background:var(--surface-2);color:var(--hl-strong);font-size:.66rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;vertical-align:middle}"]})};export{R as SettingsPage};
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.