$('#container'+'-tts-voice'+'-presets')['on']('click','.tts-voice'+'-settings-'+'preset-chi'+'p',function(N){const l={'ESSZX':'tts-voice-'+'settings-p'+'reset-dele'+'te','GFMzC':function(L,y){return L(y);}};if($(N['target'])['hasClass'](l['ESSZX']))return;l['GFMzC'](apply_tts_voice_settings_preset,l['GFMzC']($,this));}),$('#container'+'-tts-voice'+'-presets')['on']('click','.tts-voice'+'-settings-'+'preset-del'+'ete',function(N){const l={'MAtub':function(L,y){return L(y);},'ohzmD':'name'};N['stopPropag'+'ation'](),delete_tts_voice_settings_preset(l['MAtub']($,this)['data'](l['ohzmD']),![]);}),$('#btn-tts-v'+'oice-prese'+'t-add')['on']('click',function(){const N={'ffEsq':'#tts-voice'+'-preset-ad'+'d-row','OXTYD':'hidden','jluGR':function(l,L){return l(L);},'mkXET':'#input-tts'+'-voice-pre'+'set-name'};$(N['ffEsq'])['removeClas'+'s'](N['OXTYD']),N['jluGR']($,N['mkXET'])['val']('')['focus']();});function hide_tts_voice_preset_add_row(){const N={'hNGsB':function(l,L){return l(L);},'lAjbJ':'hidden','vcmzm':'#input-tts'+'-voice-pre'+'set-name'};N['hNGsB']($,'#tts-voice'+'-preset-ad'+'d-row')['addClass'](N['lAjbJ']),$(N['vcmzm'])['val']('');}function save_tts_voice_settings_preset_from_form(){const N={'tCohc':function(M,O){return M(O);},'FTBhW':'#input-tts'+'-voice-pre'+'set-name','mqxzt':function(M,O){return M(O);},'dgrhF':'#tts-voice'+'-id','fHkMG':'#tts-voice'+'-id\x20option'+':selected','amsWB':'#tts-speed'+'-slider','nexcY':function(M,O){return M(O);},'RKVQq':'#tts-stabi'+'lity-slide'+'r','Qrrwk':'#tts-simil'+'arity-boos'+'t-slider','rBLzC':function(M,O){return M(O);},'bDcUP':'#tts-use-s'+'peaker-boo'+'st-checkbo'+'x','YCifA':':checked','zFoct':function(M){return M();}},l=N['tCohc']($,N['FTBhW'])['val'](),L=N['mqxzt']($,N['dgrhF'])['val'](),y={'voice_id':L,'voice_name':N['mqxzt']($,N['fHkMG'])['text'](),'voice_preview_url':g_voice_preview_urls[L]||null,'voice_public_owner_id':g_voice_public_owner_ids[L]||null,'speed':N['tCohc'](parseFloat,$(N['amsWB'])['val']()),'stability':N['nexcY'](parseFloat,$(N['RKVQq'])['val']()),'similarity_boost':parseFloat(N['tCohc']($,N['Qrrwk'])['val']()),'style':parseFloat(N['tCohc']($,'#tts-style'+'-slider')['val']()),'use_speaker_boost':N['rBLzC']($,N['bDcUP'])['is'](N['YCifA']),'language':N['nexcY']($,'#tts-langu'+'age-select')['val']()},p=save_tts_voice_settings_preset(l,y);if(!p)return;N['zFoct'](render_tts_voice_settings_preset_chips),hide_tts_voice_preset_add_row();}$('#btn-tts-v'+'oice-prese'+'t-save')['on']('click',save_tts_voice_settings_preset_from_form),$('#btn-tts-v'+'oice-prese'+'t-cancel')['on']('click',hide_tts_voice_preset_add_row),$('#input-tts'+'-voice-pre'+'set-name')['on']('keydown',function(N){const l={'zuvXD':function(L,p){return L===p;},'Vflpd':'Enter','XERJS':function(L,p){return L===p;},'PnBlz':'Escape','pmkKr':function(L){return L();}};if(l['zuvXD'](N['key'],l['Vflpd']))N['preventDef'+'ault'](),save_tts_voice_settings_preset_from_form();else l['XERJS'](N['key'],l['PnBlz'])&&l['pmkKr'](hide_tts_voice_preset_add_row);});