import{c as d,u as g,e as o,S as n,I as b}from"./trash-2-Dx96Ty-c.js";import{a as m,r as f,j as e,f as p}from"./FontSizeProvider-Cy0K7gvl.js";import{S as N,I as h,a as j}from"./SaveButton-DAQL8oi6.js";import{n as S,o as w,s as k,p as E}from"./elevenlabs-N09D-rds.js";import{u as T}from"./webui-C025Pd1b.js";import{u as I}from"./use-form-xv3rz6TD.js";import{m as P}from"./index-CNNXFhHX.js";/**
* @license lucide-react v0.350.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const A=d("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
* @license lucide-react v0.350.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const L=d("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),y=[{label:"Afrikaans (Namibi\xEB)",value:"af-NA"},{label:"Afrikaans ",value:"af-ZA"},{label:"\u12A0\u121B\u122D\u129B",value:"am-ET"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629)",value:"ar-AE"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u0627\u0644\u062C\u0632\u0627\u0626\u0631)",value:"ar-DZ"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u0645\u0635\u0631)",value:"ar-EG"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u0627\u0644\u0639\u0631\u0627\u0642)",value:"ar-IQ"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u0627\u0644\u0623\u0631\u062F\u0646)",value:"ar-JO"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u0627\u0644\u0643\u0648\u064A\u062A)",value:"ar-KW"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u0644\u0628\u0646\u0627\u0646)",value:"ar-LB"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u0627\u0644\u0645\u063A\u0631\u0628)",value:"ar-MA"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u0642\u0637\u0631)",value:"ar-QA"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",value:"ar-SA"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u0633\u0648\u0631\u064A\u0627)",value:"ar-SY"},{label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629 (\u062A\u0648\u0646\u0633)",value:"ar-TN"},{label:"\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE",value:"as-IN"},{label:"Az\u0259rbaycanca",value:"az-AZ"},{label:"\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F",value:"be-BY"},{label:"\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438",value:"bg-BG"},{label:"\u09AC\u09BE\u0982\u09B2\u09BE",value:"bn-BD"},{label:"\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6",value:"bn-IN"},{label:"Bosanski",value:"bs-BA"},{label:"Catal\xE0",value:"ca-ES"},{label:"\u4E2D\u6587 (\u666E\u901A\u8BDD \u4E2D\u56FD\u5927\u9646)",value:"cmn-Hans-CN"},{label:"\u4E2D\u6587 (\u666E\u901A\u8BDD \u9999\u6E2F)",value:"cmn-Hans-HK"},{label:"\u4E2D\u6587 (\u666E\u901A\u8BDD \u9A6C\u6765\u897F\u4E9A)",value:"cmn-Hans-MY"},{label:"\u4E2D\u6587 (\u666E\u901A\u8BDD \u65B0\u52A0\u5761)",value:"cmn-Hans-SG"},{label:"\u4E2D\u6587 (\u53F0\u7063)",value:"cmn-Hant-TW"},{label:"\u010Ce\u0161tina",value:"cs-CZ"},{label:"Dansk",value:"da-DK"},{label:"Deutsch (\xD6sterreich)",value:"de-AT"},{label:"Deutsch (Schweiz)",value:"de-CH"},{label:"Deutsch",value:"de-DE"},{label:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC ",value:"el-GR"},{label:"English (Australia)",value:"en-AU"},{label:"English (Canada)",value:"en-CA"},{label:"English (United Kingdom)",value:"en-GB"},{label:"English (Ghana)",value:"en-GH"},{label:"English (Ireland)",value:"en-IE"},{label:"English (India)",value:"en-IN"},{label:"English (Jamaica)",value:"en-JM"},{label:"English (Kenya)",value:"en-KE"},{label:"English (Nigeria)",value:"en-NG"},{label:"English (New Zealand)",value:"en-NZ"},{label:"English (Philippines)",value:"en-PH"},{label:"English (Trinidad and Tobago)",value:"en-TT"},{label:"English (Tanzania)",value:"en-TZ"},{label:"English (United States)",value:"en-US"},{label:"English (South Africa)",value:"en-ZA"},{label:"Espa\xF1ol (Argentina)",value:"es-AR"},{label:"Espa\xF1ol (Argentina)",value:"es-AR"},{label:"Espa\xF1ol (Bolivia)",value:"es-BO"},{label:"Espa\xF1ol (Chile)",value:"es-CL"},{label:"Espa\xF1ol (Colombia)",value:"es-CO"},{label:"Espa\xF1ol (Costa Rica)",value:"es-CR"},{label:"Espa\xF1ol (Rep\xFAblica Dominicana)",value:"es-DO"},{label:"Espa\xF1ol (Ecuador)",value:"es-EC"},{label:"Espa\xF1ol (Espa\xF1a)",value:"es-ES"},{label:"Espa\xF1ol (Guatemala)",value:"es-GT"},{label:"Espa\xF1ol (Honduras)",value:"es-HN"},{label:"Espa\xF1ol (M\xE9xico)",value:"es-MX"},{label:"Espa\xF1ol (Nicaragua)",value:"es-NI"},{label:"Espa\xF1ol (Panam\xE1)",value:"es-PA"},{label:"Espa\xF1ol (Per\xFA)",value:"es-PE"},{label:"Espa\xF1ol (Puerto Rico)",value:"es-PR"},{label:"Espa\xF1ol (Paraguay)",value:"es-PY"},{label:"Espa\xF1ol (El Salvador)",value:"es-SV"},{label:"Espa\xF1ol (Estados Unidos)",value:"es-US"},{label:"Espa\xF1ol (Uruguay)",value:"es-UY"},{label:"Espa\xF1ol (Venezuela)",value:"es-VE"},{label:"Eesti",value:"et-EE"},{label:"Euskara",value:"eu-ES"},{label:"\u0641\u0627\u0631\u0633\u06CC (\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646)",value:"fa-AF"},{label:"\u0641\u0627\u0631\u0633\u06CC (\u0627\u06CC\u0631\u0627\u0646)",value:"fa-IR"},{label:"Suomi",value:"fi-FI"},{label:"Filipino",value:"fil-PH"},{label:"Fran\xE7ais (Belgique)",value:"fr-BE"},{label:"Fran\xE7ais (Canada)",value:"fr-CA"},{label:"Fran\xE7ais (Suisse)",value:"fr-CH"},{label:"Fran\xE7ais",value:"fr-FR"},{label:"Galego",value:"gl-ES"},{label:"\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0",value:"gu-IN"},{label:"Hausa",value:"ha-NG"},{label:"\u05E2\u05D1\u05E8\u05D9\u05EA",value:"he-IL"},{label:"\u0939\u093F\u0928\u094D\u0926\u0940 ",value:"hi-IN"},{label:"Hrvatski",value:"hr-HR"},{label:"Magyar",value:"hu-HU"},{label:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",value:"hy-AM"},{label:"Bahasa Indonesia",value:"id-ID"},{label:"Igbo",value:"ig-NG"},{label:"\xCDslenska",value:"is-IS"},{label:"Italiano (Svizzera)",value:"it-CH"},{label:"Italiano (Italia)",value:"it-IT"},{label:"\u65E5\u672C\u8A9E",value:"ja-JP"},{label:"Basa Jawa",value:"jv-ID"},{label:"\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8 ",value:"ka-GE"},{label:"\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456",value:"kk-KZ"},{label:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A",value:"km-KH"},{label:"\u0C95\u0CA8\u0CCD\u0CA8\u0CA1",value:"kn-IN"},{label:"\uD55C\uAD6D\uC5B4 ",value:"ko-KR"},{label:"\u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430",value:"ky-KG"},{label:"\u0EA5\u0EB2\u0EA7",value:"lo-LA"},{label:"Lietuvi\u0173",value:"lt-LT"},{label:"Latvie\u0161u)",value:"lv-LV"},{label:"\u092E\u0948\u0925\u093F\u0932\u0940",value:"mai-IN"},{label:"Crnogorski",value:"me-ME"},{label:"Reo M\u0101ori",value:"mi-NZ"},{label:"\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438",value:"mk-MK"},{label:"\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02",value:"ml-IN"},{label:"\u041C\u043E\u043D\u0433\u043E\u043B",value:"mn-MN"},{label:"\u092E\u0930\u093E\u0920\u0940 ",value:"mr-IN"},{label:"Bahasa Melayu",value:"ms-MY"},{label:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C",value:"my-MM"},{label:"Norsk bokm\xE5l",value:"nb-NO"},{label:"\u0928\u0947\u092A\u093E\u0932\u0940 \u092D\u093E\u0937\u093E",value:"ne-NP"},{label:"Nederlands",value:"nl-NL"},{label:"Norsk nynorsk",value:"nn-NO"},{label:"\u0B13\u0B21\u0B3C\u0B3F\u0B06",value:"or-IN"},{label:"\u0A17\u0A41\u0A30\u0A2E\u0A41\u0A16\u0A40",value:"pa-Guru-IN"},{label:"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40 (\u0A2D\u0A3E\u0A30\u0A24)",value:"pa-IN"},{label:"\u067E\u0646\u062C\u0627\u0628\u06CC (\u067E\u0627\u06A9\u0633\u062A\u0627\u0646)",value:"pa-PK"},{label:"Polski",value:"pl-PL"},{label:"\u067E\u069A\u062A\u0648",value:"ps-AF"},{label:"Portugu\xEAs (Angola)",value:"pt-AO"},{label:"Portugu\xEAs (Brasil)",value:"pt-BR"},{label:"Portugu\xEAs (Mo\xE7ambique)",value:"pt-MZ"},{label:"Portugu\xEAs (Portugal)",value:"pt-PT"},{label:"Rom\xE2n\u0103",value:"ro-RO"},{label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",value:"ru-RU"},{label:"\u0633\u0646\u068C\u064A",value:"sd-PK"},{label:"\u0DC3\u0DD2\u0D82\u0DC4\u0DBD",value:"si-LK"},{label:"Sloven\u010Dina ",value:"sk-SK"},{label:"Sloven\u0161\u010Dina",value:"sl-SI"},{label:"Shqip",value:"sq-AL"},{label:"\u0421\u0440\u043F\u0441\u043A\u0438",value:"sr-RS"},{label:"Sesotho",value:"st-ZA"},{label:"Basa Sunda",value:"su-ID"},{label:"Svenska",value:"sv-SE"},{label:"Kiswahili (Kenya)",value:"sw-KE"},{label:"Kiswahili (Tanzania)",value:"sw-TZ"},{label:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD (\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE)",value:"ta-IN"},{label:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD (\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8)",value:"ta-LK"},{label:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD (\u0BAE\u0BB2\u0BC7\u0B9A\u0BBF\u0BAF\u0BBE)",value:"ta-MY"},{label:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD (\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD)",value:"ta-SG"},{label:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41",value:"te-IN"},{label:"\u0422\u043E\u04B7\u0438\u043A\u04E3",value:"tg-TJ"},{label:"\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22",value:"th-TH"},{label:"T\xFCrkmen",value:"tk-TM"},{label:"Setswana",value:"tn-ZA"},{label:"T\xFCrk\xE7e",value:"tr-TR"},{label:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",value:"uk-UA"},{label:"\u0627\u064F\u0631\u062F\u064F\u0648 (\u0628\u06BE\u0627\u0631\u062A)",value:"ur-IN"},{label:"\u0627\u064F\u0631\u062F\u064F\u0648 (\u067E\u0627\u06A9\u0633\u062A\u0627\u0646)",value:"ur-PK"},{label:"O'zbek",value:"uz-UZ"},{label:"Ti\u1EBFng Vi\u1EC7t",value:"vi-VN"},{label:"isiXhosa",value:"xh-ZA"},{label:"Yor\xF9b\xE1",value:"yo-NG"},{label:"\u7CB5\u8A9E (\u9999\u6E2F)",value:"yue-Hant-HK"},{label:"IsiZulu",value:"zu-ZA"}],K=[{label:"English",value:"en"},{label:"Espa\xF1ol",value:"es"},{label:"Fran\xE7ais",value:"fr"},{label:"Italiano",value:"it"},{label:"Ukrainian",value:"uk"},{label:"Russian",value:"ru"},{label:"Portugu\xEAs (Brasil)",value:"pt-BR"},{label:"\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02",value:"ml"},{label:"\u7B80\u4F53\u4E2D\u6587",value:"zh-CN"},{label:"\u7E41\u9AD4\u4E2D\u6587",value:"zh-TW"},{label:"\u65E5\u672C\u8A9E",value:"ja-JP"},{label:"\u0641\u0627\u0631\u0633\u06CC",value:"fa"},{label:"Deutsch",value:"de"},{label:"Dansk",value:"da"},{label:"Norsk",value:"no"},{value:"sv",label:"Svenska"},{value:"ko",label:"\uD55C\uAD6D\uC5B4"},{value:"ar",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629"}],M=()=>{const{i18n:t}=m(),[s,r]=f.useState(localStorage.getItem("i18nextLng")||"en");return{locale:s,changeLocale:a=>{r(a),t.changeLanguage(a),localStorage.setItem("i18nextLng",a)},supportLanguage:K}},C=({hideBorder:t})=>{var c;const{t:s}=m("settings"),{setTTSEnabled:r}=T(),a=I({initialValues:{ttsEnabled:!1,ttsProvider:"",voice:"",ssmlEnabled:!1,removeReasoningTagTTS:!0,elevenLabsApiKey:"",elevenLabsVoiceId:"",elevenLabsModel:"",responseSplitting:"",openAITTSBaseUrl:"",openAITTSApiKey:"",openAITTSModel:"",openAITTSVoice:"",ttsAutoPlay:!1,playbackSpeed:1}}),{status:v,data:u}=g({queryKey:["fetchTTSSettings"],queryFn:async()=>{const l=await E();return a.setValues(l),l}}),{data:i}=g({queryKey:["fetchElevenLabsData",a.values.elevenLabsApiKey],queryFn:async()=>{try{if(a.values.ttsProvider==="elevenlabs"&&a.values.elevenLabsApiKey){const l=await S(a.values.elevenLabsApiKey),x=await w(a.values.elevenLabsApiKey);return{voices:l,models:x}}}catch(l){console.error(l),P.error("Error fetching ElevenLabs data")}return null},enabled:a.values.ttsProvider==="elevenlabs"&&!!a.values.elevenLabsApiKey});return v==="pending"||v==="error"?e.jsx(N,{active:!0}):e.jsxs("div",{children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("h2",{className:`${t?"text-md":"text-base font-semibold leading-7"} text-gray-900 dark:text-white`,children:s("generalSettings.tts.heading")}),!t&&e.jsx("div",{className:"border border-b border-gray-200 dark:border-gray-600 mt-3"})]}),e.jsxs("form",{onSubmit:a.onSubmit(async l=>{await k(l),r(l.ttsEnabled)}),className:"space-y-4",children:[e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50 ",children:s("generalSettings.tts.ttsEnabled.label")}),e.jsx("div",{children:e.jsx(o,{className:"mt-4 sm:mt-0",...a.getInputProps("ttsEnabled",{type:"checkbox"})})})]}),e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50 ",children:s("generalSettings.tts.ttsAutoPlay.label")}),e.jsx("div",{children:e.jsx(o,{className:"mt-4 sm:mt-0",...a.getInputProps("ttsAutoPlay",{type:"checkbox"})})})]}),e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50 ",children:s("generalSettings.tts.ttsProvider.label")}),e.jsx("div",{children:e.jsx(n,{placeholder:s("generalSettings.tts.ttsProvider.placeholder"),className:"w-full mt-4 sm:mt-0 sm:w-[200px]",options:[{label:"Browser TTS",value:"browser"},{label:"ElevenLabs",value:"elevenlabs"},{label:"OpenAI TTS",value:"openai"}],...a.getInputProps("ttsProvider")})})]}),a.values.ttsProvider==="browser"&&e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50 ",children:s("generalSettings.tts.ttsVoice.label")}),e.jsx("div",{children:e.jsx(n,{placeholder:s("generalSettings.tts.ttsVoice.placeholder"),className:"w-full mt-4 sm:mt-0 sm:w-[200px]",options:(c=u==null?void 0:u.browserTTSVoices)==null?void 0:c.map(l=>({label:`${l.voiceName} - ${l.lang}`.trim(),value:l.voiceName})),...a.getInputProps("voice")})})]}),a.values.ttsProvider==="elevenlabs"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50",children:"API Key"}),e.jsx(b.Password,{placeholder:"sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",className:" mt-4 sm:mt-0 !w-[300px] sm:w-[200px]",required:!0,...a.getInputProps("elevenLabsApiKey")})]}),i&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50",children:"TTS Voice"}),e.jsx(n,{options:i.voices.map(l=>({label:l.name,value:l.voice_id})),className:"w-full mt-4 sm:mt-0 sm:w-[200px]",placeholder:"Select a voice",...a.getInputProps("elevenLabsVoiceId")})]}),e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50",children:"TTS Model"}),e.jsx(n,{className:"w-full mt-4 sm:mt-0 sm:w-[200px]",placeholder:"Select a model",options:i.models.map(l=>({label:l.name,value:l.model_id})),...a.getInputProps("elevenLabsModel")})]}),e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50 ",children:s("generalSettings.tts.responseSplitting.label")}),e.jsx("div",{children:e.jsx(n,{placeholder:s("generalSettings.tts.responseSplitting.placeholder"),className:"w-full mt-4 sm:mt-0 sm:w-[200px]",options:[{label:"None",value:"none"},{label:"Punctuation",value:"punctuation"},{label:"Paragraph",value:"paragraph"}],...a.getInputProps("responseSplitting")})})]})]})]}),a.values.ttsProvider==="openai"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50",children:"Base URL"}),e.jsx(b,{placeholder:"http://localhost:5000/v1",className:" mt-4 sm:mt-0 !w-[300px] sm:w-[200px]",required:!0,...a.getInputProps("openAITTSBaseUrl")})]}),e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50",children:"API Key"}),e.jsx(b.Password,{placeholder:"sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",className:" mt-4 sm:mt-0 !w-[300px] sm:w-[200px]",...a.getInputProps("openAITTSApiKey")})]}),e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50",children:"TTS Voice"}),e.jsx(b,{placeholder:"alloy",className:" mt-4 sm:mt-0 !w-[300px] sm:w-[200px]",required:!0,...a.getInputProps("openAITTSVoice")})]}),e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50",children:"TTS Model"}),e.jsx(b,{placeholder:"tts-1",className:" mt-4 sm:mt-0 !w-[300px] sm:w-[200px]",required:!0,...a.getInputProps("openAITTSModel")})]})]}),e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50 ",children:s("generalSettings.tts.ssmlEnabled.label")}),e.jsx("div",{children:e.jsx(o,{className:"mt-4 sm:mt-0",...a.getInputProps("ssmlEnabled",{type:"checkbox"})})})]}),e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50 ",children:s("generalSettings.tts.removeReasoningTagTTS.label")}),e.jsx("div",{children:e.jsx(o,{className:"mt-4 sm:mt-0",...a.getInputProps("removeReasoningTagTTS",{type:"checkbox"})})})]}),e.jsxs("div",{className:"flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50",children:"Playback Speed"}),e.jsx(h,{placeholder:"1",className:" mt-4 sm:mt-0 !w-[300px] sm:w-[200px]",required:!0,...a.getInputProps("playbackSpeed")})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(j,{btnType:"submit"})})]})]})},R=({hideBorder:t})=>{const{t:s}=m("settings"),[r,a]=p("speechToTextLanguage","en-US"),[v,u]=p("autoSubmitVoiceMessage",!1),[i,c]=p("autoStopTimeout",2e3);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("h2",{className:`${t?"text-md":"text-base font-semibold leading-7"} text-gray-900 dark:text-white`,children:s("generalSettings.stt.heading")}),!t&&e.jsx("div",{className:"border border-b border-gray-200 dark:border-gray-600 mt-3"})]}),e.jsxs("form",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-row justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50",children:s("generalSettings.settings.speechRecognitionLang.label")}),e.jsx(n,{placeholder:s("generalSettings.settings.speechRecognitionLang.placeholder"),allowClear:!0,showSearch:!0,options:y,value:r,filterOption:(l,x)=>x.label.toLowerCase().indexOf(l.toLowerCase())>=0||x.value.toLowerCase().indexOf(l.toLowerCase())>=0,onChange:l=>{a(l)},className:t?"w-full":"!min-w-[200px]"})]}),e.jsxs("div",{className:"flex flex-row justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50",children:s("generalSettings.stt.autoSubmitVoiceMessage.label")}),e.jsx(o,{checked:v,onChange:l=>{u(l)}})]}),e.jsxs("div",{className:"flex flex-row justify-between",children:[e.jsx("span",{className:"text-gray-700 dark:text-neutral-50",children:s("generalSettings.stt.autoStopTimeout.label")}),e.jsx(h,{className:t?"w-full":"!min-w-[200px]",type:"number",placeholder:s("generalSettings.stt.autoStopTimeout.placeholder"),value:i,onChange:l=>{c(l)}})]})]})]})};export{A as M,y as S,C as T,R as a,L as b,M as u};
