iobroker.assistant 1.16.1 → 1.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/admin/custom/.vite/manifest.json +1 -1
- package/admin/custom/.vite/mf-preload.json +1 -1
- package/admin/custom/assets/{Components-62DSYLwX.js → Components-zqvNzb-v.js} +1 -1
- package/admin/custom/customComponents.js +1 -1
- package/admin/custom/index.html +1 -1
- package/admin/custom/mf-manifest.json +1 -1
- package/admin/custom/mf-stats.json +1 -1
- package/io-package.json +27 -27
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{n as e}from"./rolldown-runtime-D5BBy9-T.js";import{v as t}from"./_virtual_mf___mfe_internal__ConfigCustomAssistant__mf_owner__69834124819989__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-cTrmbIeO.js";import{$ as n,B as r,Bt as i,Cn as a,Dn as o,Et as s,F as c,Gn as l,Gt as u,Hn as d,I as f,In as p,J as m,K as h,Kn as g,Ln as _,Lt as ee,Mn as te,Mt as ne,Nt as v,On as re,P as y,Rt as b,Sn as x,V as S,Vn as C,Vt as ie,Wt as w,X as ae,Xt as T,Y as oe,Yt as se,Zn as E,Zt as D,ai as O,an as k,b as A,bn as ce,en as j,er as le,et as ue,gn as M,gt as de,ht as fe,ii as N,in as P,ir as pe,jn as me,kn as F,ln as he,mn as I,nn as L,nt as ge,oi as R,on as _e,pn as z,rn as ve,rr as ye,sn as B,tn as be,tt as xe,un as V,v as Se,vn as H,wn as U,xn as Ce,y as we,yn as Te,zr as W}from"./_virtual_mf___mfe_internal__ConfigCustomAssistant__mf_owner__69834124819989__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BILAbFkM.js";import{t as G}from"./_virtual_mf___mfe_internal__ConfigCustomAssistant__mf_owner__69834124819989__loadShare__shared-CorfEuEC.js";var Ee=e({custom_assistant_Announcement:()=>De,custom_assistant_Answer:()=>Oe,custom_assistant_Benchmark:()=>Nt,custom_assistant_Cancel:()=>ke,custom_assistant_Chat:()=>Ae,custom_assistant_Close:()=>je,custom_assistant_Context:()=>Me,custom_assistant_Copied:()=>Ne,custom_assistant_Copy:()=>Pe,custom_assistant_Delete:()=>Fe,custom_assistant_Details:()=>Pt,custom_assistant_Download:()=>Ft,custom_assistant_Error:()=>Ie,custom_assistant_Expected:()=>It,custom_assistant_Failures:()=>Lt,custom_assistant_Folder:()=>Rt,custom_assistant_Host:()=>Le,custom_assistant_Languages:()=>zt,custom_assistant_Model:()=>Bt,custom_assistant_Models:()=>Vt,custom_assistant_Music:()=>sn,custom_assistant_Off:()=>`Aus`,custom_assistant_Provider:()=>an,custom_assistant_Question:()=>Re,custom_assistant_Recognized:()=>ze,custom_assistant_Record:()=>Be,custom_assistant_Request:()=>Ve,custom_assistant_Room:()=>He,custom_assistant_Routine:()=>Ue,custom_assistant_Satellite:()=>We,custom_assistant_Satellites:()=>Ge,custom_assistant_Script:()=>Ke,custom_assistant_Size:()=>Ht,custom_assistant_Source:()=>qe,custom_assistant_Speak:()=>Je,custom_assistant_Spoken:()=>Ye,custom_assistant_State:()=>Xe,custom_assistant_Status:()=>Ze,custom_assistant_Steps:()=>Qe,custom_assistant_Stop:()=>$e,custom_assistant_Time:()=>et,custom_assistant_Tool:()=>tt,custom_assistant_Upload:()=>nt,custom_assistant_Use:()=>Ut,custom_assistant_Voice:()=>nn,custom_assistant_auto:()=>rt,custom_assistant_automatic:()=>rn,custom_assistant_bundled_wake_word_hint:()=>Ot,custom_assistant_correct:()=>Wt,custom_assistant_delete_wake_word_confirm:()=>it,custom_assistant_device:()=>at,custom_assistant_downloaded:()=>Gt,custom_assistant_downloading:()=>Kt,custom_assistant_failed:()=>qt,custom_assistant_fast:()=>Zt,custom_assistant_filter:()=>ot,custom_assistant_hint:()=>st,custom_assistant_llm_benchmark:()=>en,custom_assistant_llm_downloading:()=>ct,custom_assistant_llm_error:()=>lt,custom_assistant_llm_idle:()=>ut,custom_assistant_llm_installing:()=>dt,custom_assistant_llm_loading:()=>ft,custom_assistant_llm_ready:()=>pt,custom_assistant_medium:()=>Qt,custom_assistant_offline:()=>mt,custom_assistant_online:()=>ht,custom_assistant_parameters:()=>Jt,custom_assistant_read:()=>gt,custom_assistant_room:()=>_t,custom_assistant_sat_idle:()=>vt,custom_assistant_sat_listening:()=>yt,custom_assistant_sat_offline:()=>bt,custom_assistant_sat_processing:()=>xt,custom_assistant_sat_speaking:()=>St,custom_assistant_slow:()=>$t,custom_assistant_speech:()=>on,custom_assistant_speed:()=>Yt,custom_assistant_synthesis:()=>tn,custom_assistant_timeouts:()=>Xt,custom_assistant_type:()=>`Typ`,custom_assistant_wake_word_deleted:()=>Ct,custom_assistant_wake_word_hint:()=>wt,custom_assistant_wake_word_installed:()=>kt,custom_assistant_wake_word_installed_full:()=>jt,custom_assistant_wake_word_installed_replaced:()=>At,custom_assistant_wake_word_phrase_hint:()=>Tt,custom_assistant_wake_word_upload_hint:()=>Et,custom_assistant_wake_word_uploaded:()=>Dt,custom_assistant_write:()=>Mt,default:()=>cn}),De=`Ansage`,Oe=`Antwort`,ke=`Abbrechen`,Ae=`Chat`,je=`Schließen`,Me=`Kontext`,Ne=`Kopiert`,Pe=`Kopieren`,Fe=`Löschen`,Ie=`Fehler`,Le=`Host`,Re=`Frage`,ze=`Erkannt`,Be=`Aufnehmen`,Ve=`Anfrage`,He=`Raum`,Ue=`Routine`,We=`Satellit`,Ge=`Satelliten`,Ke=`Skript`,qe=`Quelle`,Je=`Sprechen`,Ye=`Gesprochen`,Xe=`State`,Ze=`Status`,Qe=`Ablauf`,$e=`Stopp`,et=`Zeit`,tt=`Tool`,nt=`Hochladen`,rt=`automatisch`,it=`„%s“ löschen? Es wird den Geräten nicht mehr angeboten; ein Gerät, das es schon heruntergeladen hat, behält es.`,at=`Gerät`,ot=`Filter`,st=`Deaktivieren Sie die Leseberechtigung, um ein Gerät vor dem Assistenten auszublenden, oder die Schreibberechtigung, um es schreibgeschützt zu halten (z. B. bei Sperren). Geräte sind standardmäßig vollständig zugelassen.`,ct=`Modell wird geladen …`,lt=`Fehler`,ut=`inaktiv`,dt=`Engine wird installiert …`,ft=`lädt …`,pt=`bereit`,mt=`offline`,ht=`online`,gt=`Lesen`,_t=`Zimmer`,vt=`inaktiv`,yt=`hört zu`,bt=`offline`,xt=`verarbeitet`,St=`spricht`,Ct=`„%s“ wurde gelöscht. Ein Gerät, das es schon heruntergeladen hat, behält seine Kopie.`,wt=`Das Wake-Word läuft auf dem Gerät. Mit der Maus über ein Wort siehst du die trainierten Sprachen — die meisten können nur Englisch.`,Tt=`Was man sagt, um das Gerät zu wecken — so erscheint es in der Liste.`,Et=`Ein microWakeWord-Modell: die .tflite-Datei, am besten zusammen mit ihrer .json. Andere Modelltypen (openWakeWord, Porcupine) lassen sich so nicht installieren.`,Dt=`„%s“ wurde hochgeladen. Oben auswählen, um es zu aktivieren — das Gerät lädt das Modell dann herunter.`,Ot=`Klick: auf das Gerät laden und aktivieren — ersetzt eine ältere Version desselben Worts`,kt=`„%s“ ist aktiv — das Gerät lädt das Modell herunter.`,At=`„%s“ ist anstelle von „%s“ aktiv — das Gerät lädt das Modell herunter.`,jt=`„%s“ steht jetzt in der Liste, aber alle Plätze sind belegt. Erst ein anderes Wake-Word abwählen, dann „%s“ auswählen.`,Mt=`Schreiben`,Nt=`Test`,Pt=`Details`,Ft=`Herunterladen`,It=`Erwartet`,Lt=`Ausfälle`,Rt=`Ordner`,zt=`Sprachen`,Bt=`Modell`,Vt=`Modelle`,Ht=`Größe`,Ut=`Verwenden`,Wt=`richtig`,Gt=`heruntergeladen`,Kt=`wird geladen`,qt=`fehlgeschlagen`,Jt=`Parameter`,Yt=`Tempo`,Xt=`Zeitüberschreitungen`,Zt=`schnell`,Qt=`mittel`,$t=`langsam`,en=`Test läuft`,tn=`Synthese`,nn=`Sprache`,rn=`automatisch`,an=`Anbieter`,on=`Sprache`,sn=`Musik`,cn={"custom_assistant_%s of %s active":`%s von %s aktiv`,"custom_assistant_%s s audio":`%s s Audio`,"custom_assistant_(no spoken answer)":`(keine gesprochene Antwort)`,"custom_assistant_A satellite that is still configured appears again when it connects.":`Ein Satellit, der noch konfiguriert ist, erscheint wieder, sobald er sich verbindet.`,"custom_assistant_All sources":`Alle Quellen`,custom_assistant_Announcement:De,custom_assistant_Answer:Oe,"custom_assistant_Audio file":`Audiodatei`,custom_assistant_Cancel:ke,custom_assistant_Chat:Ae,"custom_assistant_Clear chat":`Chat leeren`,"custom_assistant_Click for details":`Klicken für Details`,custom_assistant_Close:je,"custom_assistant_Cloud LLM":`Cloud-LLM`,"custom_assistant_Collapse all":`Alle zuklappen`,custom_assistant_Context:Me,custom_assistant_Copied:Ne,custom_assistant_Copy:Pe,"custom_assistant_Copy everything as JSON":`Alles als JSON kopieren`,custom_assistant_Delete:Fe,"custom_assistant_Delete the recorded history of all sources?":`Den aufgezeichneten Verlauf aller Quellen löschen?`,"custom_assistant_Device cache cleared.":`Gerätecache geleert.`,"custom_assistant_Device settings":`Geräte-Einstellungen`,"custom_assistant_Dialog: everything you say becomes a question":`Dialog: Alles, was du sagst, wird zur Frage – bis du ihn beendest`,"custom_assistant_Dialog: hearing you…":`Dialog: höre dich …`,"custom_assistant_Dialog: listening…":`Dialog: höre zu …`,"custom_assistant_Dialog: speaking…":`Dialog: spreche …`,"custom_assistant_Dialog: thinking…":`Dialog: denke nach …`,"custom_assistant_Download as JSON":`Als JSON herunterladen`,"custom_assistant_End the dialog":`Dialog beenden`,custom_assistant_Error:Ie,"custom_assistant_Expand all":`Alle aufklappen`,"custom_assistant_Follow-up":`Rückfrage`,"custom_assistant_Hide disabled":`Deaktivierte ausblenden`,"custom_assistant_Hide processing details":`Verarbeitungsdetails ausblenden`,custom_assistant_Host:Le,"custom_assistant_Last seen":`Zuletzt gesehen`,"custom_assistant_Listening…":`Höre zu …`,"custom_assistant_Loading…":`Wird geladen …`,"custom_assistant_Local LLM":`Lokales LLM`,"custom_assistant_Local model":`Lokales Modell`,"custom_assistant_Mic re-opened without wake word":`Mikrofon ohne Wake-Word wieder geöffnet (Nachfrage oder Rückfrage)`,"custom_assistant_Name language: %s":`Namens-Sprache: %s`,"custom_assistant_No answer":`Keine Antwort`,"custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.":`Es wurden keine Geräte erkannt. Weisen Sie Räumen und Funktionen in ioBroker Zustände zu.`,"custom_assistant_No messages yet. Type a question below.":`Noch keine Nachrichten. Geben Sie unten eine Frage ein.`,"custom_assistant_No processing steps were recorded for this request.":`Für diese Anfrage sind keine Verarbeitungsschritte gespeichert. Details werden für die letzten 200 Anfragen aufbewahrt.`,"custom_assistant_No satellites registered yet.":`Noch keine Satelliten registriert.`,"custom_assistant_Not understood":`Nicht verstanden`,"custom_assistant_Nothing recognized":`Nichts erkannt`,"custom_assistant_Per-device permissions":`Gerätespezifische Berechtigungen`,"custom_assistant_Play answer (backend TTS)":`Antwort abspielen (Backend-TTS)`,"custom_assistant_Please select a .tflite model file":`Bitte eine .tflite-Modelldatei auswählen`,custom_assistant_Question:Re,"custom_assistant_Read answers aloud":`Antworten vorlesen`,custom_assistant_Recognized:ze,custom_assistant_Record:Be,"custom_assistant_Recorded audio":`Aufgenommenes Audio`,"custom_assistant_Refresh device cache":`Gerätecache aktualisieren`,"custom_assistant_Remove satellite":`Satellit entfernen`,"custom_assistant_Remove satellite %s and all its states?":`Satellit %s mit allen seinen States entfernen?`,"custom_assistant_Reply audio":`Antwort-Audio`,"custom_assistant_Reply to a question":`Antwort auf Rückfrage`,custom_assistant_Request:Ve,"custom_assistant_Request details":`Anfrage-Details`,custom_assistant_Room:He,custom_assistant_Routine:Ue,"custom_assistant_Rule-based NLU":`Regel-NLU (lokal)`,custom_assistant_Satellite:We,custom_assistant_Satellites:Ge,"custom_assistant_Save the configuration (the instance will restart) before chatting.":`Speichern Sie die Konfiguration (die Instanz startet neu), bevor Sie chatten.`,custom_assistant_Script:Ke,"custom_assistant_Send announcement":`Ansage senden`,"custom_assistant_Settings for %s":`Einstellungen für %s`,"custom_assistant_Show processing details":`Verarbeitungsdetails anzeigen`,"custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.":`Zeigt alle Anfragen live: Satelliten, Telegram, Skripte und diesen Chat.`,custom_assistant_Source:qe,custom_assistant_Speak:Je,"custom_assistant_Speak on all satellites":`Auf allen Satelliten ansagen`,"custom_assistant_Speak the test sentence and recognize it":`Testsatz sprechen und erkennen`,"custom_assistant_Speech output":`Sprachausgabe`,"custom_assistant_Speech recognition":`Spracherkennung`,"custom_assistant_Speech recognition time":`Dauer der Spracherkennung`,"custom_assistant_Speech synthesis":`Sprachausgabe`,custom_assistant_Spoken:Ye,"custom_assistant_Start the assistant instance to chat.":`Starten Sie die Assistenteninstanz, um zu chatten.`,"custom_assistant_Start the assistant instance to load the device list.":`Starten Sie die Assistenteninstanz, um die Geräteliste zu laden.`,custom_assistant_State:Xe,"custom_assistant_States read":`Gelesene States`,"custom_assistant_States written":`Geschriebene States`,custom_assistant_Status:Ze,custom_assistant_Steps:Qe,custom_assistant_Stop:$e,"custom_assistant_Stop listening":`Zuhören beenden`,"custom_assistant_Stop reading answers aloud":`Vorlesen beenden`,"custom_assistant_Stop word":`Stopp-Wort`,"custom_assistant_Test chat":`Test-Chat`,"custom_assistant_Test sentence":`Testsatz`,"custom_assistant_Test voice":`Stimme testen`,"custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.":`Der Dialog braucht die Spracherkennung: Sprache im Reiter „Sprache“ einschalten.`,"custom_assistant_The instance must be running to test the voice.":`Die Instanz muss laufen, um die Stimme zu testen.`,"custom_assistant_The microphone could not be opened:":`Das Mikrofon ließ sich nicht öffnen:`,"custom_assistant_The microphone only works over https or on localhost.":`Das Mikrofon funktioniert nur über https oder auf localhost.`,"custom_assistant_Thinking…":`Denkt nach …`,"custom_assistant_This satellite exposes no settings.":`Dieser Satellit bietet keine Einstellungen.`,custom_assistant_Time:et,custom_assistant_Tool:tt,"custom_assistant_Tool calls":`Tool-Aufrufe`,"custom_assistant_Tool result":`Tool-Ergebnis`,"custom_assistant_Tools & states":`Tools & States`,"custom_assistant_Total duration":`Gesamtdauer`,"custom_assistant_Translate all missing (%s)":`Alle fehlenden übersetzen (%s)`,"custom_assistant_Translate name into %s":`Namen nach %s übersetzen`,"custom_assistant_Type a message…":`Nachricht eingeben …`,custom_assistant_Upload:nt,"custom_assistant_Upload own wake word":`Eigenes Wake-Word hochladen`,"custom_assistant_Uploaded wake word":`Hochgeladenes Wake-Word`,"custom_assistant_Wake word":`Wake-Word`,"custom_assistant_Wake word phrase":`Wake-Word-Phrase`,"custom_assistant_Wake words":`Wake-Words`,custom_assistant_auto:rt,"custom_assistant_change it on the Voice tab":`im Voice-Tab umschalten`,custom_assistant_delete_wake_word_confirm:it,custom_assistant_device:at,custom_assistant_filter:ot,"custom_assistant_follow-up":`Nachfrage`,custom_assistant_hint:st,"custom_assistant_in progress":`läuft`,custom_assistant_llm_downloading:ct,custom_assistant_llm_error:lt,custom_assistant_llm_idle:ut,custom_assistant_llm_installing:dt,custom_assistant_llm_loading:ft,"custom_assistant_llm_not installed":`nicht installiert`,custom_assistant_llm_ready:pt,"custom_assistant_made in %s ms":`erzeugt in %s ms`,"custom_assistant_no name in %s (showing %s)":`Kein Name in "%s" — angezeigt: "%s"`,custom_assistant_offline:mt,custom_assistant_online:ht,custom_assistant_read:gt,"custom_assistant_recognized in %s ms":`erkannt in %s ms`,custom_assistant_room:_t,custom_assistant_sat_idle:vt,custom_assistant_sat_listening:yt,custom_assistant_sat_offline:bt,custom_assistant_sat_processing:xt,custom_assistant_sat_speaking:St,custom_assistant_type:`Typ`,"custom_assistant_waits for reply":`wartet auf Antwort`,custom_assistant_wake_word_deleted:Ct,custom_assistant_wake_word_hint:wt,custom_assistant_wake_word_phrase_hint:Tt,custom_assistant_wake_word_upload_hint:Et,custom_assistant_wake_word_uploaded:Dt,"custom_assistant_Shipped with the adapter":`Mit dem Adapter geliefert`,custom_assistant_bundled_wake_word_hint:Ot,custom_assistant_wake_word_installed:kt,custom_assistant_wake_word_installed_replaced:At,custom_assistant_wake_word_installed_full:jt,custom_assistant_write:Mt,"custom_assistant_Add a model":`Modell hinzufügen`,"custom_assistant_Answer time":`Antwortzeit`,"custom_assistant_Asked / answered / handed over":`Gefragt / beantwortet / abgegeben`,"custom_assistant_Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly":`Stellt dem geladenen Modell Testfragen in der Sprache des Assistenten und auf Englisch: Fragen zum Zuhause muss es abgeben, allgemeine richtig beantworten`,custom_assistant_Benchmark:Nt,"custom_assistant_Delete model?":`Modell löschen?`,custom_assistant_Details:Pt,custom_assistant_Download:Ft,"custom_assistant_Estimate from the model size, not measured. Use the benchmark for real numbers.":`Schätzung aus der Modellgröße, nicht gemessen. Echte Werte liefert der Test.`,custom_assistant_Expected:It,custom_assistant_Failures:Lt,"custom_assistant_First token":`Erstes Token`,custom_assistant_Folder:Rt,"custom_assistant_Free on the disk":`Frei auf dem Datenträger`,"custom_assistant_Hugging Face links are fine, also hf:org/repo/file.gguf":`Hugging-Face-Links gehen, auch hf:org/repo/file.gguf`,custom_assistant_Languages:zt,"custom_assistant_Load time":`Ladezeit`,"custom_assistant_Loaded model":`Geladenes Modell`,custom_assistant_Model:Bt,custom_assistant_Models:Vt,"custom_assistant_No models in this folder yet. Download one below.":`In diesem Ordner sind noch keine Modelle. Lade unten eines herunter.`,"custom_assistant_Own model: link to a .gguf file":`Eigenes Modell: Link auf eine .gguf-Datei`,"custom_assistant_Questions asked / answered by the model / handed over to the next tier":`Gestellte Fragen / vom Modell beantwortet / an die nächste Stufe abgegeben`,"custom_assistant_Reset statistics":`Statistik zurücksetzen`,"custom_assistant_Save the settings to load the selected model. The instance restarts.":`Speichere die Einstellungen, um das gewählte Modell zu laden. Die Instanz startet neu.`,custom_assistant_Size:Ht,"custom_assistant_Start the instance to manage the local models.":`Starte die Instanz, um die lokalen Modelle zu verwalten.`,"custom_assistant_The active model cannot be deleted":`Das aktive Modell kann nicht gelöscht werden`,'custom_assistant_The engine is not installed yet. Install it on the main tab ("Install local model").':`Die Engine ist noch nicht installiert. Installiere sie im ersten Reiter („Lokales Modell installieren“).`,"custom_assistant_The file %s is deleted from the disk. Its statistics stay.":`Die Datei %s wird vom Datenträger gelöscht. Ihre Statistik bleibt.`,"custom_assistant_Time until the first word: reading the question":`Zeit bis zum ersten Wort: das Lesen der Frage`,"custom_assistant_Timeouts and errors among the questions asked":`Zeitüberschreitungen und Fehler unter den gestellten Fragen`,"custom_assistant_Tokens/s":`Tokens/s`,custom_assistant_Use:Ut,custom_assistant_correct:Wt,custom_assistant_downloaded:Gt,custom_assistant_downloading:Kt,custom_assistant_failed:qt,"custom_assistant_hand over":`abgeben`,"custom_assistant_last used":`zuletzt genutzt`,"custom_assistant_many languages":`viele Sprachen`,"custom_assistant_missed hand-overs":`verpasste Abgaben`,"custom_assistant_needless hand-overs":`unnötige Abgaben`,"custom_assistant_not enough space":`zu wenig Platz`,"custom_assistant_not the language of the assistant":`nicht die Sprache des Assistenten`,custom_assistant_parameters:Jt,custom_assistant_speed:Yt,custom_assistant_timeouts:Xt,"custom_assistant_wrong answers":`falsche Antworten`,"custom_assistant_very fast":`sehr schnell`,custom_assistant_fast:Zt,custom_assistant_medium:Qt,custom_assistant_slow:$t,custom_assistant_llm_benchmark:en,"Model folder":`Modellordner`,"Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.":`Absoluter Pfad, z. B. /mnt/ssd/llm. Leer = Datenordner der Instanz. Schon anderswo geladene Modelle werden nicht verschoben.`,"custom_assistant_Start the instance to test the voice":`Instanz starten, um die Stimme zu testen`,"custom_assistant_Try this voice":`Diese Stimme ausprobieren`,custom_assistant_synthesis:tn,"custom_assistant_%s answers in the journal":`%s Antworten im Journal`,"custom_assistant_Request comes from":`Anfrage kommt von`,custom_assistant_Voice:nn,"custom_assistant_Voice is off":`Sprache ist aus`,"custom_assistant_No telegram instance sends here":`Keine telegram-Instanz schickt hierher`,"custom_assistant_The tab Chat of these settings":`Der Reiter Chat dieser Einstellungen`,"custom_assistant_No smart-text2command instance chosen":`Keine smart-text2command-Instanz gewählt`,"custom_assistant_%s is not running":`%s läuft nicht`,"custom_assistant_Local decision":`Lokale Entscheidung`,"custom_assistant_First the routines:":`Zuerst die Routinen:`,"custom_assistant_Off: everything goes to the models":`Aus: alles geht an die Modelle`,"custom_assistant_Built-in rules:":`Eingebaute Regeln:`,"custom_assistant_devices, timers, alarms, time, weather":`Geräte, Timer, Wecker, Uhrzeit, Wetter`,"custom_assistant_Devices:":`Geräte:`,"custom_assistant_timers, alarms, time, weather":`Timer, Wecker, Uhrzeit, Wetter`,"custom_assistant_default model":`Standardmodell`,"custom_assistant_Model:":`Modell:`,"custom_assistant_The last step":`Der letzte Schritt`,"custom_assistant_Asked before the cloud":`Wird vor der Cloud gefragt`,"custom_assistant_Gives up after:":`Gibt auf nach:`,custom_assistant_Off:`Aus`,"custom_assistant_No pi-agent instance chosen":`Keine pi-agent-Instanz gewählt`,"custom_assistant_Off: answers only locally":`Aus: nur lokale Antworten`,"custom_assistant_with its own model, tools and permissions":`mit eigenem Modell, eigenen Tools und Rechten`,"custom_assistant_Provider:":`Anbieter:`,custom_assistant_automatic:rn,"custom_assistant_with the tools of this adapter":`mit den Tools dieses Adapters`,"custom_assistant_as text":`als Text`,"custom_assistant_not understood":`nicht verstanden`,"custom_assistant_handed on":`weitergegeben`,"custom_assistant_only if the cloud fails":`nur wenn die Cloud ausfällt`,"custom_assistant_not running":`läuft nicht`,"custom_assistant_Install %s":`%s installieren`,"custom_assistant_Voice satellites (speech recognition and speech output)":`Sprach-Satelliten (Spracherkennung und Sprachausgabe)`,"custom_assistant_Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.":`Satelliten des Adapters assistant-satellite gehen immer. Details in den Reitern Sprache und Satelliten.`,"custom_assistant_Messages of %s come here.":`Nachrichten von %s kommen hierher.`,"custom_assistant_In the settings of the telegram adapter, choose %s as the assistant instance.":`In den Einstellungen des telegram-Adapters %s als Assistant-Instanz wählen.`,"custom_assistant_The tab Chat of these settings, also to try out every step.":`Der Reiter Chat dieser Einstellungen, auch zum Ausprobieren jedes Schritts.`,"custom_assistant_From a script: %s, or write the question into %s.":`Aus einem Skript: %s, oder die Frage in %s schreiben.`,"custom_assistant_Built-in rules":`Eingebaute Regeln`,"custom_assistant_Every request goes to the models. Only the routines are still checked first.":`Jede Anfrage geht an die Modelle. Nur die Routinen werden vorher noch geprüft.`,"custom_assistant_Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.":`Feste Regeln verstehen Schalten, Dimmen und Status von Geräten, Timer, Wecker, Uhrzeit und Wetter — in wenigen Millisekunden, offline. Was sie nicht verstehen, geht weiter.`,"custom_assistant_The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.":`Der Adapter smart-text2command lernt eure Formulierungen aus Beispielen, führt nur die dort freigegebenen Aktionen aus und fragt nach, wenn Raum oder Gerät unklar sind. Er versteht Deutsch und Englisch. Timer, Wecker, Uhrzeit und Wetter bleiben bei den eingebauten Regeln; was keiner versteht, geht weiter.`,"custom_assistant_smart-text2command instance":`smart-text2command-Instanz`,"custom_assistant_Before this, %s routines are checked (tab Commands).":`Davor werden %s Routinen geprüft (Reiter Befehle).`,"custom_assistant_Routines (fixed phrases with their own actions) are set up on the tab Commands.":`Routinen (feste Sätze mit eigenen Aktionen) werden im Reiter Befehle eingerichtet.`,"custom_assistant_Use a local LLM":`Lokales LLM verwenden`,"custom_assistant_The list of models needs the running instance.":`Die Modellliste braucht die laufende Instanz.`,"custom_assistant_Ask before the cloud":`Vor der Cloud fragen`,"custom_assistant_Without a cloud step the local model is the last step.":`Ohne Cloud-Schritt ist das lokale Modell der letzte Schritt.`,"custom_assistant_Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.":`Jede Anfrage, die die lokale Entscheidung nicht versteht, geht zuerst dorthin. Spart Cloud-Aufrufe, kostet auf einem Raspberry Pi aber 10–25 Sekunden.`,"custom_assistant_It only answers when the cloud fails (offline, quota).":`Es antwortet nur, wenn die Cloud ausfällt (offline, Kontingent).`,"custom_assistant_Gives up after (s)":`Gibt auf nach (s)`,"custom_assistant_Download and compare models on the tab Local models.":`Modelle herunterladen und vergleichen im Reiter Lokale Modelle.`,"custom_assistant_AI provider":`KI-Anbieter`,"custom_assistant_Only the local steps answer; a request they do not understand gets a fixed sentence.":`Nur die lokalen Schritte antworten; eine Anfrage, die sie nicht verstehen, bekommt einen festen Satz.`,custom_assistant_Provider:an,"custom_assistant_empty = automatic":`leer = automatisch`,"custom_assistant_Provider, model and key come from the system settings of admin (tab AI there).":`Anbieter, Modell und Schlüssel kommen aus den Systemeinstellungen von Admin (dort Reiter KI).`,"custom_assistant_The API key and the other details are on the tab AI.":`Der API-Schlüssel und die weiteren Details stehen im Reiter KI.`,"custom_assistant_The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.":`Der Adapter pi-agent antwortet mit eigenem Modell, eigenen Tools und Schreibrechten; jede Anfragequelle bekommt dort ein eigenes Gespräch.`,"custom_assistant_pi-agent instance":`pi-agent-Instanz`,"custom_assistant_Changes take effect when the settings are saved.":`Änderungen wirken, sobald die Einstellungen gespeichert sind.`,"custom_assistant_How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.":`So läuft eine Anfrage durch den Assistenten. Jeder Schritt beantwortet, was er versteht, der Rest geht zum nächsten. Auf einen Schritt klicken, um ihn einzustellen.`,'custom_assistant_Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.':`Vor allen Schritten: ein Stoppwort beendet einen klingelnden Timer, die Antwort auf eine offene Rückfrage geht an den, der gefragt hat, und „Dialogmodus an/aus“ schaltet den Dialog eines Satelliten. Eine Anfrage zu einem Skript oder mit einem Bild geht direkt zum Cloud-Schritt.`,"custom_assistant_%s s on average (%s in the journal)":`%s s im Schnitt (%s im Journal)`,"custom_assistant_No ioBroker.voice instance chosen":`Keine ioBroker.voice-Instanz gewählt`,"custom_assistant_Server:":`Server:`,"custom_assistant_Reserve:":`Reserve:`,"custom_assistant_Language:":`Sprache:`,"custom_assistant_Text requests skip this step.":`Text-Anfragen überspringen diesen Schritt.`,"custom_assistant_Off: only text requests":`Aus: nur Text-Anfragen`,"custom_assistant_Voice:":`Stimme:`,"custom_assistant_default voice":`Standardstimme`,"custom_assistant_Switch commands: a beep":`Schaltbefehle: ein Ton`,"custom_assistant_Longest answer: %s characters":`Längste Antwort: %s Zeichen`,"custom_assistant_Long answers are not cut":`Lange Antworten werden nicht gekürzt`,"custom_assistant_Only answers to speech; text requests get text back.":`Nur Antworten auf Sprache; Text-Anfragen bekommen Text zurück.`,"custom_assistant_Off: answers as text":`Aus: Antworten als Text`,custom_assistant_speech:on,"custom_assistant_Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.":`Macht aus der Sprache der Satelliten Text. Sie hört auch Sprachnachrichten aus Telegram und den Dialogmodus des Chats. Schlüssel und weitere Optionen stehen im Reiter Sprache.`,"custom_assistant_Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.":`Spricht die Antwort auf dem Satelliten, der gefragt hat, und die Durchsagen. Schlüssel und weitere Optionen stehen im Reiter Sprache.`,"custom_assistant_Follow-up questions in a conversation go straight to the cloud.":`Nachfragen in einem laufenden Gespräch gehen direkt an die Cloud.`,"custom_assistant_What no step understands gets a fixed sentence.":`Was kein Schritt versteht, bekommt einen festen Satz als Antwort.`,custom_assistant_Music:sn,"custom_assistant_Adapter command":`Adapter-Befehl`},ln=e({custom_assistant_Announcement:()=>un,custom_assistant_Answer:()=>dn,custom_assistant_Benchmark:()=>_r,custom_assistant_Cancel:()=>fn,custom_assistant_Chat:()=>pn,custom_assistant_Close:()=>mn,custom_assistant_Context:()=>hn,custom_assistant_Copied:()=>gn,custom_assistant_Copy:()=>_n,custom_assistant_Delete:()=>vn,custom_assistant_Details:()=>vr,custom_assistant_Download:()=>yr,custom_assistant_Error:()=>yn,custom_assistant_Expected:()=>br,custom_assistant_Failures:()=>xr,custom_assistant_Folder:()=>Sr,custom_assistant_Host:()=>bn,custom_assistant_Languages:()=>Cr,custom_assistant_Model:()=>wr,custom_assistant_Models:()=>Tr,custom_assistant_Music:()=>Ur,custom_assistant_Off:()=>`Off`,custom_assistant_Provider:()=>Vr,custom_assistant_Question:()=>xn,custom_assistant_Recognized:()=>Sn,custom_assistant_Record:()=>Cn,custom_assistant_Request:()=>wn,custom_assistant_Room:()=>Tn,custom_assistant_Routine:()=>En,custom_assistant_Satellite:()=>Dn,custom_assistant_Satellites:()=>On,custom_assistant_Script:()=>kn,custom_assistant_Size:()=>Er,custom_assistant_Source:()=>An,custom_assistant_Speak:()=>jn,custom_assistant_Spoken:()=>Mn,custom_assistant_State:()=>Nn,custom_assistant_Status:()=>Pn,custom_assistant_Steps:()=>Fn,custom_assistant_Stop:()=>In,custom_assistant_Time:()=>Ln,custom_assistant_Tool:()=>Rn,custom_assistant_Upload:()=>zn,custom_assistant_Use:()=>`Use`,custom_assistant_Voice:()=>zr,custom_assistant_auto:()=>Bn,custom_assistant_automatic:()=>Br,custom_assistant_bundled_wake_word_hint:()=>fr,custom_assistant_correct:()=>Dr,custom_assistant_delete_wake_word_confirm:()=>Vn,custom_assistant_device:()=>Hn,custom_assistant_downloaded:()=>Or,custom_assistant_downloading:()=>kr,custom_assistant_failed:()=>Ar,custom_assistant_fast:()=>Pr,custom_assistant_filter:()=>Un,custom_assistant_hint:()=>Wn,custom_assistant_llm_benchmark:()=>Lr,custom_assistant_llm_downloading:()=>Gn,custom_assistant_llm_error:()=>Kn,custom_assistant_llm_idle:()=>qn,custom_assistant_llm_installing:()=>Jn,custom_assistant_llm_loading:()=>Yn,custom_assistant_llm_ready:()=>Xn,custom_assistant_medium:()=>Fr,custom_assistant_offline:()=>Zn,custom_assistant_online:()=>Qn,custom_assistant_parameters:()=>jr,custom_assistant_read:()=>$n,custom_assistant_room:()=>er,custom_assistant_sat_idle:()=>tr,custom_assistant_sat_listening:()=>nr,custom_assistant_sat_offline:()=>rr,custom_assistant_sat_processing:()=>ir,custom_assistant_sat_speaking:()=>ar,custom_assistant_slow:()=>Ir,custom_assistant_speech:()=>Hr,custom_assistant_speed:()=>Mr,custom_assistant_synthesis:()=>Rr,custom_assistant_timeouts:()=>Nr,custom_assistant_type:()=>or,custom_assistant_wake_word_deleted:()=>sr,custom_assistant_wake_word_hint:()=>cr,custom_assistant_wake_word_installed:()=>pr,custom_assistant_wake_word_installed_full:()=>hr,custom_assistant_wake_word_installed_replaced:()=>mr,custom_assistant_wake_word_phrase_hint:()=>lr,custom_assistant_wake_word_upload_hint:()=>ur,custom_assistant_wake_word_uploaded:()=>dr,custom_assistant_write:()=>gr,default:()=>Wr}),un=`Announcement`,dn=`Answer`,fn=`Cancel`,pn=`Chat`,mn=`Close`,hn=`Context`,gn=`Copied`,_n=`Copy`,vn=`Delete`,yn=`Error`,bn=`Host`,xn=`Question`,Sn=`Recognized`,Cn=`Record`,wn=`Request`,Tn=`Room`,En=`Routine`,Dn=`Satellite`,On=`Satellites`,kn=`Script`,An=`Source`,jn=`Speak`,Mn=`Spoken`,Nn=`State`,Pn=`Status`,Fn=`Steps`,In=`Stop`,Ln=`Time`,Rn=`Tool`,zn=`Upload`,Bn=`auto`,Vn=`Delete "%s"? It will no longer be offered to the devices; a device that already downloaded it keeps it.`,Hn=`Device`,Un=`Filter`,Wn=`Uncheck read to hide a device from the assistant, or uncheck write to keep it read-only (e.g. locks). Devices default to fully allowed.`,Gn=`downloading model…`,Kn=`error`,qn=`idle`,Jn=`installing engine…`,Yn=`loading…`,Xn=`ready`,Zn=`offline`,Qn=`online`,$n=`Read`,er=`Room`,tr=`idle`,nr=`listening`,rr=`offline`,ir=`processing`,ar=`speaking`,or=`Type`,sr=`"%s" was deleted. A device that already downloaded it keeps its copy.`,cr=`The wake word runs on the device. Hover a word to see which languages it was trained on — most are English only.`,lr=`What you say to wake the device — this is how it appears in the list.`,ur=`A microWakeWord model: the .tflite file, ideally together with its .json. Other model types (openWakeWord, Porcupine) cannot be installed this way.`,dr=`"%s" was uploaded. Select it above to activate it — the device downloads the model then.`,fr=`Click: load onto the device and switch on — replaces an older version of the same word`,pr=`"%s" is switched on — the device is downloading the model.`,mr=`"%s" is switched on instead of "%s" — the device is downloading the model.`,hr=`"%s" is now in the list, but every slot is taken. Switch another wake word off, then select "%s".`,gr=`Write`,_r=`Benchmark`,vr=`Details`,yr=`Download`,br=`Expected`,xr=`Failures`,Sr=`Folder`,Cr=`Languages`,wr=`Model`,Tr=`Models`,Er=`Size`,Dr=`correct`,Or=`downloaded`,kr=`downloading`,Ar=`failed`,jr=`parameters`,Mr=`speed`,Nr=`timeouts`,Pr=`fast`,Fr=`medium`,Ir=`slow`,Lr=`testing`,Rr=`synthesis`,zr=`Voice`,Br=`automatic`,Vr=`Provider`,Hr=`speech`,Ur=`Music`,Wr={"custom_assistant_%s of %s active":`%s of %s active`,"custom_assistant_%s s audio":`%s s audio`,"custom_assistant_(no spoken answer)":`(no spoken answer)`,"custom_assistant_A satellite that is still configured appears again when it connects.":`A satellite that is still configured appears again when it connects.`,"custom_assistant_All sources":`All sources`,custom_assistant_Announcement:un,custom_assistant_Answer:dn,"custom_assistant_Audio file":`Audio file`,custom_assistant_Cancel:fn,custom_assistant_Chat:pn,"custom_assistant_Clear chat":`Clear chat`,"custom_assistant_Click for details":`Click for details`,custom_assistant_Close:mn,"custom_assistant_Cloud LLM":`Cloud LLM`,"custom_assistant_Collapse all":`Collapse all`,custom_assistant_Context:hn,custom_assistant_Copied:gn,custom_assistant_Copy:_n,"custom_assistant_Copy everything as JSON":`Copy everything as JSON`,custom_assistant_Delete:vn,"custom_assistant_Delete the recorded history of all sources?":`Delete the recorded history of all sources?`,"custom_assistant_Device cache cleared.":`Device cache cleared.`,"custom_assistant_Device settings":`Device settings`,"custom_assistant_Dialog: everything you say becomes a question":`Dialog: everything you say becomes a question — until you end it`,"custom_assistant_Dialog: hearing you…":`Dialog: hearing you …`,"custom_assistant_Dialog: listening…":`Dialog: listening …`,"custom_assistant_Dialog: speaking…":`Dialog: speaking …`,"custom_assistant_Dialog: thinking…":`Dialog: thinking …`,"custom_assistant_Download as JSON":`Download as JSON`,"custom_assistant_End the dialog":`End the dialog`,custom_assistant_Error:yn,"custom_assistant_Expand all":`Expand all`,"custom_assistant_Follow-up":`Follow-up`,"custom_assistant_Hide disabled":`Hide disabled`,"custom_assistant_Hide processing details":`Hide processing details`,custom_assistant_Host:bn,"custom_assistant_Last seen":`Last seen`,"custom_assistant_Listening…":`Listening…`,"custom_assistant_Loading…":`Loading…`,"custom_assistant_Local LLM":`Local LLM`,"custom_assistant_Local model":`Local model`,"custom_assistant_Mic re-opened without wake word":`Mic re-opened without wake word (follow-up or question)`,"custom_assistant_Name language: %s":`Name language: %s`,"custom_assistant_No answer":`No answer`,"custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.":`No devices detected. Assign states to rooms and functions in ioBroker.`,"custom_assistant_No messages yet. Type a question below.":`No messages yet. Type a question below.`,"custom_assistant_No processing steps were recorded for this request.":`No processing steps were recorded for this request. Details are kept for the latest 200 requests.`,"custom_assistant_No satellites registered yet.":`No satellites registered yet.`,"custom_assistant_Not understood":`Not understood`,"custom_assistant_Nothing recognized":`Nothing recognized`,"custom_assistant_Per-device permissions":`Per-device permissions`,"custom_assistant_Play answer (backend TTS)":`Play answer (backend TTS)`,"custom_assistant_Please select a .tflite model file":`Please select a .tflite model file`,custom_assistant_Question:xn,"custom_assistant_Read answers aloud":`Read answers aloud`,custom_assistant_Recognized:Sn,custom_assistant_Record:Cn,"custom_assistant_Recorded audio":`Recorded audio`,"custom_assistant_Refresh device cache":`Refresh device cache`,"custom_assistant_Remove satellite":`Remove satellite`,"custom_assistant_Remove satellite %s and all its states?":`Remove satellite %s and all its states?`,"custom_assistant_Reply audio":`Reply audio`,"custom_assistant_Reply to a question":`Reply to a question`,custom_assistant_Request:wn,"custom_assistant_Request details":`Request details`,custom_assistant_Room:Tn,custom_assistant_Routine:En,"custom_assistant_Rule-based NLU":`Rule-based NLU (local)`,custom_assistant_Satellite:Dn,custom_assistant_Satellites:On,"custom_assistant_Save the configuration (the instance will restart) before chatting.":`Save the configuration (the instance will restart) before chatting.`,custom_assistant_Script:kn,"custom_assistant_Send announcement":`Send announcement`,"custom_assistant_Settings for %s":`Settings for %s`,"custom_assistant_Show processing details":`Show processing details`,"custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.":`Shows all requests live: satellites, Telegram, scripts and this chat.`,custom_assistant_Source:An,custom_assistant_Speak:jn,"custom_assistant_Speak on all satellites":`Speak on all satellites`,"custom_assistant_Speak the test sentence and recognize it":`Speak the test sentence and recognize it`,"custom_assistant_Speech output":`Speech output`,"custom_assistant_Speech recognition":`Speech recognition`,"custom_assistant_Speech recognition time":`Speech recognition time`,"custom_assistant_Speech synthesis":`Speech synthesis`,custom_assistant_Spoken:Mn,"custom_assistant_Start the assistant instance to chat.":`Start the assistant instance to chat.`,"custom_assistant_Start the assistant instance to load the device list.":`Start the assistant instance to load the device list.`,custom_assistant_State:Nn,"custom_assistant_States read":`States read`,"custom_assistant_States written":`States written`,custom_assistant_Status:Pn,custom_assistant_Steps:Fn,custom_assistant_Stop:In,"custom_assistant_Stop listening":`Stop listening`,"custom_assistant_Stop reading answers aloud":`Stop reading answers aloud`,"custom_assistant_Stop word":`Stop word`,"custom_assistant_Test chat":`Test chat`,"custom_assistant_Test sentence":`Test sentence`,"custom_assistant_Test voice":`Test voice`,"custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.":`The dialog needs speech recognition: enable voice on the Voice tab.`,"custom_assistant_The instance must be running to test the voice.":`The instance must be running to test the voice.`,"custom_assistant_The microphone could not be opened:":`The microphone could not be opened:`,"custom_assistant_The microphone only works over https or on localhost.":`The microphone only works over https or on localhost.`,"custom_assistant_Thinking…":`Thinking…`,"custom_assistant_This satellite exposes no settings.":`This satellite exposes no settings.`,custom_assistant_Time:Ln,custom_assistant_Tool:Rn,"custom_assistant_Tool calls":`Tool calls`,"custom_assistant_Tool result":`Tool result`,"custom_assistant_Tools & states":`Tools & states`,"custom_assistant_Total duration":`Total duration`,"custom_assistant_Translate all missing (%s)":`Translate all missing (%s)`,"custom_assistant_Translate name into %s":`Translate name into %s`,"custom_assistant_Type a message…":`Type a message…`,custom_assistant_Upload:zn,"custom_assistant_Upload own wake word":`Upload own wake word`,"custom_assistant_Uploaded wake word":`Uploaded wake word`,"custom_assistant_Wake word":`Wake word`,"custom_assistant_Wake word phrase":`Wake word phrase`,"custom_assistant_Wake words":`Wake words`,custom_assistant_auto:Bn,"custom_assistant_change it on the Voice tab":`change it on the Voice tab`,custom_assistant_delete_wake_word_confirm:Vn,custom_assistant_device:Hn,custom_assistant_filter:Un,"custom_assistant_follow-up":`follow-up`,custom_assistant_hint:Wn,"custom_assistant_in progress":`in progress`,custom_assistant_llm_downloading:Gn,custom_assistant_llm_error:Kn,custom_assistant_llm_idle:qn,custom_assistant_llm_installing:Jn,custom_assistant_llm_loading:Yn,"custom_assistant_llm_not installed":`not installed`,custom_assistant_llm_ready:Xn,"custom_assistant_made in %s ms":`made in %s ms`,"custom_assistant_no name in %s (showing %s)":`No name in "%s" — showing "%s"`,custom_assistant_offline:Zn,custom_assistant_online:Qn,custom_assistant_read:$n,"custom_assistant_recognized in %s ms":`recognized in %s ms`,custom_assistant_room:er,custom_assistant_sat_idle:tr,custom_assistant_sat_listening:nr,custom_assistant_sat_offline:rr,custom_assistant_sat_processing:ir,custom_assistant_sat_speaking:ar,custom_assistant_type:or,"custom_assistant_waits for reply":`waits for reply`,custom_assistant_wake_word_deleted:sr,custom_assistant_wake_word_hint:cr,custom_assistant_wake_word_phrase_hint:lr,custom_assistant_wake_word_upload_hint:ur,custom_assistant_wake_word_uploaded:dr,"custom_assistant_Shipped with the adapter":`Shipped with the adapter`,custom_assistant_bundled_wake_word_hint:fr,custom_assistant_wake_word_installed:pr,custom_assistant_wake_word_installed_replaced:mr,custom_assistant_wake_word_installed_full:hr,custom_assistant_write:gr,"custom_assistant_Add a model":`Add a model`,"custom_assistant_Answer time":`Answer time`,"custom_assistant_Asked / answered / handed over":`Asked / answered / handed over`,"custom_assistant_Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly":`Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly`,custom_assistant_Benchmark:_r,"custom_assistant_Delete model?":`Delete model?`,custom_assistant_Details:vr,custom_assistant_Download:yr,"custom_assistant_Estimate from the model size, not measured. Use the benchmark for real numbers.":`Estimate from the model size, not measured. Use the benchmark for real numbers.`,custom_assistant_Expected:br,custom_assistant_Failures:xr,"custom_assistant_First token":`First token`,custom_assistant_Folder:Sr,"custom_assistant_Free on the disk":`Free on the disk`,"custom_assistant_Hugging Face links are fine, also hf:org/repo/file.gguf":`Hugging Face links are fine, also hf:org/repo/file.gguf`,custom_assistant_Languages:Cr,"custom_assistant_Load time":`Load time`,"custom_assistant_Loaded model":`Loaded model`,custom_assistant_Model:wr,custom_assistant_Models:Tr,"custom_assistant_No models in this folder yet. Download one below.":`No models in this folder yet. Download one below.`,"custom_assistant_Own model: link to a .gguf file":`Own model: link to a .gguf file`,"custom_assistant_Questions asked / answered by the model / handed over to the next tier":`Questions asked / answered by the model / handed over to the next tier`,"custom_assistant_Reset statistics":`Reset statistics`,"custom_assistant_Save the settings to load the selected model. The instance restarts.":`Save the settings to load the selected model. The instance restarts.`,custom_assistant_Size:Er,"custom_assistant_Start the instance to manage the local models.":`Start the instance to manage the local models.`,"custom_assistant_The active model cannot be deleted":`The active model cannot be deleted`,'custom_assistant_The engine is not installed yet. Install it on the main tab ("Install local model").':`The engine is not installed yet. Install it on the main tab ("Install local model").`,"custom_assistant_The file %s is deleted from the disk. Its statistics stay.":`The file %s is deleted from the disk. Its statistics stay.`,"custom_assistant_Time until the first word: reading the question":`Time until the first word: reading the question`,"custom_assistant_Timeouts and errors among the questions asked":`Timeouts and errors among the questions asked`,"custom_assistant_Tokens/s":`Tokens/s`,custom_assistant_Use:`Use`,custom_assistant_correct:Dr,custom_assistant_downloaded:Or,custom_assistant_downloading:kr,custom_assistant_failed:Ar,"custom_assistant_hand over":`hand over`,"custom_assistant_last used":`last used`,"custom_assistant_many languages":`many languages`,"custom_assistant_missed hand-overs":`missed hand-overs`,"custom_assistant_needless hand-overs":`needless hand-overs`,"custom_assistant_not enough space":`not enough space`,"custom_assistant_not the language of the assistant":`not the language of the assistant`,custom_assistant_parameters:jr,custom_assistant_speed:Mr,custom_assistant_timeouts:Nr,"custom_assistant_wrong answers":`wrong answers`,"custom_assistant_very fast":`very fast`,custom_assistant_fast:Pr,custom_assistant_medium:Fr,custom_assistant_slow:Ir,custom_assistant_llm_benchmark:Lr,"Model folder":`Model folder`,"Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.":`Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.`,"custom_assistant_Start the instance to test the voice":`Start the instance to test the voice`,"custom_assistant_Try this voice":`Try this voice`,custom_assistant_synthesis:Rr,"custom_assistant_%s answers in the journal":`%s answers in the journal`,"custom_assistant_Request comes from":`Request comes from`,custom_assistant_Voice:zr,"custom_assistant_Voice is off":`Voice is off`,"custom_assistant_No telegram instance sends here":`No telegram instance sends here`,"custom_assistant_The tab Chat of these settings":`The tab Chat of these settings`,"custom_assistant_No smart-text2command instance chosen":`No smart-text2command instance chosen`,"custom_assistant_%s is not running":`%s is not running`,"custom_assistant_Local decision":`Local decision`,"custom_assistant_First the routines:":`First the routines:`,"custom_assistant_Off: everything goes to the models":`Off: everything goes to the models`,"custom_assistant_Built-in rules:":`Built-in rules:`,"custom_assistant_devices, timers, alarms, time, weather":`devices, timers, alarms, time, weather`,"custom_assistant_Devices:":`Devices:`,"custom_assistant_timers, alarms, time, weather":`timers, alarms, time, weather`,"custom_assistant_default model":`default model`,"custom_assistant_Model:":`Model:`,"custom_assistant_The last step":`The last step`,"custom_assistant_Asked before the cloud":`Asked before the cloud`,"custom_assistant_Gives up after:":`Gives up after:`,custom_assistant_Off:`Off`,"custom_assistant_No pi-agent instance chosen":`No pi-agent instance chosen`,"custom_assistant_Off: answers only locally":`Off: answers only locally`,"custom_assistant_with its own model, tools and permissions":`with its own model, tools and permissions`,"custom_assistant_Provider:":`Provider:`,custom_assistant_automatic:Br,"custom_assistant_with the tools of this adapter":`with the tools of this adapter`,"custom_assistant_as text":`as text`,"custom_assistant_not understood":`not understood`,"custom_assistant_handed on":`handed on`,"custom_assistant_only if the cloud fails":`only if the cloud fails`,"custom_assistant_not running":`not running`,"custom_assistant_Install %s":`Install %s`,"custom_assistant_Voice satellites (speech recognition and speech output)":`Voice satellites (speech recognition and speech output)`,"custom_assistant_Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.":`Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.`,"custom_assistant_Messages of %s come here.":`Messages of %s come here.`,"custom_assistant_In the settings of the telegram adapter, choose %s as the assistant instance.":`In the settings of the telegram adapter, choose %s as the assistant instance.`,"custom_assistant_The tab Chat of these settings, also to try out every step.":`The tab Chat of these settings, also to try out every step.`,"custom_assistant_From a script: %s, or write the question into %s.":`From a script: %s, or write the question into %s.`,"custom_assistant_Built-in rules":`Built-in rules`,"custom_assistant_Every request goes to the models. Only the routines are still checked first.":`Every request goes to the models. Only the routines are still checked first.`,"custom_assistant_Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.":`Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.`,"custom_assistant_The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.":`The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.`,"custom_assistant_smart-text2command instance":`smart-text2command instance`,"custom_assistant_Before this, %s routines are checked (tab Commands).":`Before this, %s routines are checked (tab Commands).`,"custom_assistant_Routines (fixed phrases with their own actions) are set up on the tab Commands.":`Routines (fixed phrases with their own actions) are set up on the tab Commands.`,"custom_assistant_Use a local LLM":`Use a local LLM`,"custom_assistant_The list of models needs the running instance.":`The list of models needs the running instance.`,"custom_assistant_Ask before the cloud":`Ask before the cloud`,"custom_assistant_Without a cloud step the local model is the last step.":`Without a cloud step the local model is the last step.`,"custom_assistant_Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.":`Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.`,"custom_assistant_It only answers when the cloud fails (offline, quota).":`It only answers when the cloud fails (offline, quota).`,"custom_assistant_Gives up after (s)":`Gives up after (s)`,"custom_assistant_Download and compare models on the tab Local models.":`Download and compare models on the tab Local models.`,"custom_assistant_AI provider":`AI provider`,"custom_assistant_Only the local steps answer; a request they do not understand gets a fixed sentence.":`Only the local steps answer; a request they do not understand gets a fixed sentence.`,custom_assistant_Provider:Vr,"custom_assistant_empty = automatic":`empty = automatic`,"custom_assistant_Provider, model and key come from the system settings of admin (tab AI there).":`Provider, model and key come from the system settings of admin (tab AI there).`,"custom_assistant_The API key and the other details are on the tab AI.":`The API key and the other details are on the tab AI.`,"custom_assistant_The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.":`The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.`,"custom_assistant_pi-agent instance":`pi-agent instance`,"custom_assistant_Changes take effect when the settings are saved.":`Changes take effect when the settings are saved.`,"custom_assistant_How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.":`How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.`,'custom_assistant_Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.':`Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.`,"custom_assistant_%s s on average (%s in the journal)":`%s s on average (%s in the journal)`,"custom_assistant_No ioBroker.voice instance chosen":`No ioBroker.voice instance chosen`,"custom_assistant_Server:":`Server:`,"custom_assistant_Reserve:":`Reserve:`,"custom_assistant_Language:":`Language:`,"custom_assistant_Text requests skip this step.":`Text requests skip this step.`,"custom_assistant_Off: only text requests":`Off: only text requests`,"custom_assistant_Voice:":`Voice:`,"custom_assistant_default voice":`default voice`,"custom_assistant_Switch commands: a beep":`Switch commands: a beep`,"custom_assistant_Longest answer: %s characters":`Longest answer: %s characters`,"custom_assistant_Long answers are not cut":`Long answers are not cut`,"custom_assistant_Only answers to speech; text requests get text back.":`Only answers to speech; text requests get text back.`,"custom_assistant_Off: answers as text":`Off: answers as text`,custom_assistant_speech:Hr,"custom_assistant_Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.":`Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.`,"custom_assistant_Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.":`Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.`,"custom_assistant_Follow-up questions in a conversation go straight to the cloud.":`Follow-up questions in a conversation go straight to the cloud.`,"custom_assistant_What no step understands gets a fixed sentence.":`What no step understands gets a fixed sentence.`,custom_assistant_Music:Ur,"custom_assistant_Adapter command":`Adapter command`},Gr=e({custom_assistant_Announcement:()=>Kr,custom_assistant_Answer:()=>qr,custom_assistant_Benchmark:()=>$i,custom_assistant_Cancel:()=>Jr,custom_assistant_Chat:()=>Yr,custom_assistant_Close:()=>Xr,custom_assistant_Context:()=>Zr,custom_assistant_Copied:()=>Qr,custom_assistant_Copy:()=>$r,custom_assistant_Delete:()=>ei,custom_assistant_Details:()=>ea,custom_assistant_Download:()=>ta,custom_assistant_Error:()=>ti,custom_assistant_Expected:()=>na,custom_assistant_Failures:()=>ra,custom_assistant_Folder:()=>ia,custom_assistant_Host:()=>ni,custom_assistant_Languages:()=>aa,custom_assistant_Model:()=>oa,custom_assistant_Models:()=>sa,custom_assistant_Music:()=>Ta,custom_assistant_Off:()=>Sa,custom_assistant_Provider:()=>wa,custom_assistant_Question:()=>ri,custom_assistant_Recognized:()=>ii,custom_assistant_Record:()=>ai,custom_assistant_Request:()=>oi,custom_assistant_Room:()=>si,custom_assistant_Routine:()=>ci,custom_assistant_Satellite:()=>li,custom_assistant_Satellites:()=>ui,custom_assistant_Script:()=>di,custom_assistant_Size:()=>ca,custom_assistant_Source:()=>fi,custom_assistant_Speak:()=>pi,custom_assistant_Spoken:()=>mi,custom_assistant_State:()=>hi,custom_assistant_Status:()=>gi,custom_assistant_Steps:()=>_i,custom_assistant_Stop:()=>vi,custom_assistant_Time:()=>yi,custom_assistant_Tool:()=>bi,custom_assistant_Upload:()=>xi,custom_assistant_Use:()=>la,custom_assistant_Voice:()=>`Voz`,custom_assistant_auto:()=>Si,custom_assistant_automatic:()=>Ca,custom_assistant_bundled_wake_word_hint:()=>Ji,custom_assistant_correct:()=>ua,custom_assistant_delete_wake_word_confirm:()=>Ci,custom_assistant_device:()=>wi,custom_assistant_downloaded:()=>da,custom_assistant_downloading:()=>fa,custom_assistant_failed:()=>pa,custom_assistant_fast:()=>_a,custom_assistant_filter:()=>Ti,custom_assistant_hint:()=>Ei,custom_assistant_llm_benchmark:()=>ba,custom_assistant_llm_downloading:()=>Di,custom_assistant_llm_error:()=>Oi,custom_assistant_llm_idle:()=>ki,custom_assistant_llm_installing:()=>Ai,custom_assistant_llm_loading:()=>ji,custom_assistant_llm_ready:()=>Mi,custom_assistant_medium:()=>va,custom_assistant_offline:()=>Ni,custom_assistant_online:()=>Pi,custom_assistant_parameters:()=>ma,custom_assistant_read:()=>Fi,custom_assistant_room:()=>Ii,custom_assistant_sat_idle:()=>Li,custom_assistant_sat_listening:()=>Ri,custom_assistant_sat_offline:()=>zi,custom_assistant_sat_processing:()=>Bi,custom_assistant_sat_speaking:()=>Vi,custom_assistant_slow:()=>ya,custom_assistant_speech:()=>`voz`,custom_assistant_speed:()=>ha,custom_assistant_synthesis:()=>xa,custom_assistant_timeouts:()=>ga,custom_assistant_type:()=>Hi,custom_assistant_wake_word_deleted:()=>Ui,custom_assistant_wake_word_hint:()=>Wi,custom_assistant_wake_word_installed:()=>Yi,custom_assistant_wake_word_installed_full:()=>Zi,custom_assistant_wake_word_installed_replaced:()=>Xi,custom_assistant_wake_word_phrase_hint:()=>Gi,custom_assistant_wake_word_upload_hint:()=>Ki,custom_assistant_wake_word_uploaded:()=>qi,custom_assistant_write:()=>Qi,default:()=>Ea}),Kr=`Anuncio`,qr=`Respuesta`,Jr=`Cancel`,Yr=`Chat`,Xr=`Close`,Zr=`Contexto`,Qr=`Copiado`,$r=`Copiar`,ei=`Delete`,ti=`Error`,ni=`Anfitrión`,ri=`Pregunta`,ii=`Reconocido`,ai=`Grabar`,oi=`Solicitud`,si=`Room`,ci=`Routine`,li=`Satélite`,ui=`satélites`,di=`Script`,fi=`Source`,pi=`Hablar`,mi=`Dicho`,hi=`State`,gi=`Estado`,_i=`Pasos`,vi=`Detener`,yi=`Hora`,bi=`Herramienta`,xi=`Subir`,Si=`auto`,Ci=`¿Eliminar "%s"? Ya no se ofrecerá a los dispositivos; un dispositivo que ya lo descargó lo conserva.`,wi=`Dispositivo`,Ti=`Filtrar`,Ei=`Desactive la opción de lectura para ocultar un dispositivo al asistente, o desactive la opción de escritura para mantenerlo en modo de solo lectura (por ejemplo, candados). Los dispositivos vienen configurados por defecto con acceso completo.`,Di=`Descargando modelo…`,Oi=`error`,ki=`inactivo`,Ai=`instalando el motor…`,ji=`cargando…`,Mi=`listo`,Ni=`desconectado`,Pi=`en línea`,Fi=`Leer`,Ii=`Habitación`,Li=`inactivo`,Ri=`escuchando`,zi=`desconectado`,Bi=`tratamiento`,Vi=`discurso`,Hi=`Tipo`,Ui=`"%s" se ha eliminado. Un dispositivo que ya lo descargó conserva su copia.`,Wi=`La palabra de activación se procesa en el dispositivo. Pasa el ratón sobre una palabra para ver en qué idiomas se entrenó — la mayoría solo en inglés.`,Gi=`Lo que dices para activar el dispositivo: así aparece en la lista.`,Ki=`Un modelo microWakeWord: el archivo .tflite, idealmente junto con su .json. Otros tipos de modelo (openWakeWord, Porcupine) no se pueden instalar de esta forma.`,qi=`"%s" se ha subido. Selecciónalo arriba para activarlo: el dispositivo descargará entonces el modelo.`,Ji=`Clic: cargar en el dispositivo y activar — sustituye una versión anterior de la misma palabra`,Yi=`"%s" está activada: el dispositivo descarga el modelo.`,Xi=`"%s" está activada en lugar de "%s": el dispositivo descarga el modelo.`,Zi=`"%s" ya está en la lista, pero todas las posiciones están ocupadas. Desactiva otra palabra de activación y luego selecciona "%s".`,Qi=`Escribir`,$i=`Prueba`,ea=`Detalles`,ta=`Descargar`,na=`Esperado`,ra=`Fallos`,ia=`Carpeta`,aa=`Idiomas`,oa=`Modelo`,sa=`Modelos`,ca=`Tamaño`,la=`Usar`,ua=`correctas`,da=`descargado`,fa=`descargando`,pa=`falló`,ma=`parámetros`,ha=`velocidad`,ga=`tiempos agotados`,_a=`rápido`,va=`media`,ya=`lento`,ba=`probando`,xa=`síntesis`,Sa=`Apagado`,Ca=`automático`,wa=`Proveedor`,Ta=`Música`,Ea={"custom_assistant_%s of %s active":`%s of %s active`,"custom_assistant_%s s audio":`%s s de audio`,"custom_assistant_(no spoken answer)":`(no spoken answer)`,"custom_assistant_A satellite that is still configured appears again when it connects.":`Un satélite que sigue configurado vuelve a aparecer cuando se conecta.`,"custom_assistant_All sources":`All sources`,custom_assistant_Announcement:Kr,custom_assistant_Answer:qr,"custom_assistant_Audio file":`Archivo de audio`,custom_assistant_Cancel:Jr,custom_assistant_Chat:Yr,"custom_assistant_Clear chat":`Chat claro`,"custom_assistant_Click for details":`Haz clic para ver detalles`,custom_assistant_Close:Xr,"custom_assistant_Cloud LLM":`Cloud LLM`,"custom_assistant_Collapse all":`Contraer todo`,custom_assistant_Context:Zr,custom_assistant_Copied:Qr,custom_assistant_Copy:$r,"custom_assistant_Copy everything as JSON":`Copiar todo como JSON`,custom_assistant_Delete:ei,"custom_assistant_Delete the recorded history of all sources?":`Delete the recorded history of all sources?`,"custom_assistant_Device cache cleared.":`Se ha borrado la caché del dispositivo.`,"custom_assistant_Device settings":`Device settings`,"custom_assistant_Dialog: everything you say becomes a question":`Diálogo: todo lo que digas se convierte en una pregunta, hasta que lo termines`,"custom_assistant_Dialog: hearing you…":`Diálogo: te oigo …`,"custom_assistant_Dialog: listening…":`Diálogo: escuchando …`,"custom_assistant_Dialog: speaking…":`Diálogo: hablando …`,"custom_assistant_Dialog: thinking…":`Diálogo: pensando …`,"custom_assistant_Download as JSON":`Descargar como JSON`,"custom_assistant_End the dialog":`Terminar el diálogo`,custom_assistant_Error:ti,"custom_assistant_Expand all":`Expandir todo`,"custom_assistant_Follow-up":`Seguimiento`,"custom_assistant_Hide disabled":`Ocultar deshabilitado`,"custom_assistant_Hide processing details":`Hide processing details`,custom_assistant_Host:ni,"custom_assistant_Last seen":`Última vez visto`,"custom_assistant_Listening…":`Escuchando…`,"custom_assistant_Loading…":`Cargando…`,"custom_assistant_Local LLM":`Local LLM`,"custom_assistant_Local model":`Modelo local`,"custom_assistant_Mic re-opened without wake word":`Mic re-opened without wake word (follow-up or question)`,"custom_assistant_Name language: %s":`Idioma del nombre: %s`,"custom_assistant_No answer":`Sin respuesta`,"custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.":`No se detectaron dispositivos. Asigne estados a las salas y funciones en ioBroker.`,"custom_assistant_No messages yet. Type a question below.":`Aún no hay mensajes. Escribe tu pregunta a continuación.`,"custom_assistant_No processing steps were recorded for this request.":`No se registraron pasos de procesamiento para esta solicitud. Los detalles se guardan para las últimas 200 solicitudes.`,"custom_assistant_No satellites registered yet.":`Aún no se han registrado satélites.`,"custom_assistant_Not understood":`Not understood`,"custom_assistant_Nothing recognized":`No se reconoció nada`,"custom_assistant_Per-device permissions":`Permisos por dispositivo`,"custom_assistant_Play answer (backend TTS)":`Reproducir respuesta (TTS de backend)`,"custom_assistant_Please select a .tflite model file":`Selecciona un archivo de modelo .tflite`,custom_assistant_Question:ri,"custom_assistant_Read answers aloud":`Lee las respuestas en voz alta.`,custom_assistant_Recognized:ii,custom_assistant_Record:ai,"custom_assistant_Recorded audio":`Audio grabado`,"custom_assistant_Refresh device cache":`Actualizar la caché del dispositivo`,"custom_assistant_Remove satellite":`Eliminar satélite`,"custom_assistant_Remove satellite %s and all its states?":`¿Eliminar el satélite %s y todos sus estados?`,"custom_assistant_Reply audio":`Audio de la respuesta`,"custom_assistant_Reply to a question":`Reply to a question`,custom_assistant_Request:oi,"custom_assistant_Request details":`Detalles de la solicitud`,custom_assistant_Room:si,custom_assistant_Routine:ci,"custom_assistant_Rule-based NLU":`Rule-based NLU (local)`,custom_assistant_Satellite:li,custom_assistant_Satellites:ui,"custom_assistant_Save the configuration (the instance will restart) before chatting.":`Guarda la configuración (la instancia se reiniciará) antes de chatear.`,custom_assistant_Script:di,"custom_assistant_Send announcement":`Enviar anuncio`,"custom_assistant_Settings for %s":`Settings for %s`,"custom_assistant_Show processing details":`Show processing details`,"custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.":`Shows all requests live: satellites, Telegram, scripts and this chat.`,custom_assistant_Source:fi,custom_assistant_Speak:pi,"custom_assistant_Speak on all satellites":`Hablar por todos los satélites`,"custom_assistant_Speak the test sentence and recognize it":`Decir la frase de prueba y reconocerla`,"custom_assistant_Speech output":`Salida de voz`,"custom_assistant_Speech recognition":`Reconocimiento de voz`,"custom_assistant_Speech recognition time":`Speech recognition time`,"custom_assistant_Speech synthesis":`Síntesis de voz`,custom_assistant_Spoken:mi,"custom_assistant_Start the assistant instance to chat.":`Inicia la instancia del asistente para chatear.`,"custom_assistant_Start the assistant instance to load the device list.":`Inicie la instancia del asistente para cargar la lista de dispositivos.`,custom_assistant_State:hi,"custom_assistant_States read":`Estados leídos`,"custom_assistant_States written":`Estados escritos`,custom_assistant_Status:gi,custom_assistant_Steps:_i,custom_assistant_Stop:vi,"custom_assistant_Stop listening":`Deja de escuchar`,"custom_assistant_Stop reading answers aloud":`Deja de leer las respuestas en voz alta.`,"custom_assistant_Stop word":`Stop word`,"custom_assistant_Test chat":`Chat de prueba`,"custom_assistant_Test sentence":`Frase de prueba`,"custom_assistant_Test voice":`Probar voz`,"custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.":`El diálogo necesita reconocimiento de voz: activa la voz en la pestaña Voz.`,"custom_assistant_The instance must be running to test the voice.":`La instancia debe estar en ejecución para probar la voz.`,"custom_assistant_The microphone could not be opened:":`No se pudo abrir el micrófono:`,"custom_assistant_The microphone only works over https or on localhost.":`El micrófono solo funciona con https o en localhost.`,"custom_assistant_Thinking…":`Pensamiento…`,"custom_assistant_This satellite exposes no settings.":`This satellite exposes no settings.`,custom_assistant_Time:yi,custom_assistant_Tool:bi,"custom_assistant_Tool calls":`Llamadas a herramientas`,"custom_assistant_Tool result":`Resultado de la herramienta`,"custom_assistant_Tools & states":`Herramientas y estados`,"custom_assistant_Total duration":`Duración total`,"custom_assistant_Translate all missing (%s)":`Traducir todos los (%s) faltantes`,"custom_assistant_Translate name into %s":`Traducir nombre a %s`,"custom_assistant_Type a message…":`Escribe un mensaje…`,custom_assistant_Upload:xi,"custom_assistant_Upload own wake word":`Subir palabra de activación propia`,"custom_assistant_Uploaded wake word":`Palabra de activación subida`,"custom_assistant_Wake word":`Wake word`,"custom_assistant_Wake word phrase":`Frase de activación`,"custom_assistant_Wake words":`Wake words`,custom_assistant_auto:Si,"custom_assistant_change it on the Voice tab":`Cámbialo en la pestaña Voz.`,custom_assistant_delete_wake_word_confirm:Ci,custom_assistant_device:wi,custom_assistant_filter:Ti,"custom_assistant_follow-up":`follow-up`,custom_assistant_hint:Ei,"custom_assistant_in progress":`en curso`,custom_assistant_llm_downloading:Di,custom_assistant_llm_error:Oi,custom_assistant_llm_idle:ki,custom_assistant_llm_installing:Ai,custom_assistant_llm_loading:ji,"custom_assistant_llm_not installed":`no instalado`,custom_assistant_llm_ready:Mi,"custom_assistant_made in %s ms":`generado en %s ms`,"custom_assistant_no name in %s (showing %s)":`No se encontró ningún nombre en "%s" — se muestra "%s"`,custom_assistant_offline:Ni,custom_assistant_online:Pi,custom_assistant_read:Fi,"custom_assistant_recognized in %s ms":`reconocido en %s ms`,custom_assistant_room:Ii,custom_assistant_sat_idle:Li,custom_assistant_sat_listening:Ri,custom_assistant_sat_offline:zi,custom_assistant_sat_processing:Bi,custom_assistant_sat_speaking:Vi,custom_assistant_type:Hi,"custom_assistant_waits for reply":`waits for reply`,custom_assistant_wake_word_deleted:Ui,custom_assistant_wake_word_hint:Wi,custom_assistant_wake_word_phrase_hint:Gi,custom_assistant_wake_word_upload_hint:Ki,custom_assistant_wake_word_uploaded:qi,"custom_assistant_Shipped with the adapter":`Incluidas con el adaptador`,custom_assistant_bundled_wake_word_hint:Ji,custom_assistant_wake_word_installed:Yi,custom_assistant_wake_word_installed_replaced:Xi,custom_assistant_wake_word_installed_full:Zi,custom_assistant_write:Qi,"custom_assistant_Add a model":`Añadir un modelo`,"custom_assistant_Answer time":`Tiempo de respuesta`,"custom_assistant_Asked / answered / handed over":`Preguntadas / respondidas / derivadas`,"custom_assistant_Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly":`Hace preguntas de prueba al modelo cargado en el idioma del asistente y en inglés: las preguntas sobre la casa debe derivarlas y las generales responderlas bien`,custom_assistant_Benchmark:$i,"custom_assistant_Delete model?":`¿Eliminar el modelo?`,custom_assistant_Details:ea,custom_assistant_Download:ta,"custom_assistant_Estimate from the model size, not measured. Use the benchmark for real numbers.":`Estimación por el tamaño del modelo, no medida. La prueba da cifras reales.`,custom_assistant_Expected:na,custom_assistant_Failures:ra,"custom_assistant_First token":`Primer token`,custom_assistant_Folder:ia,"custom_assistant_Free on the disk":`Libre en el disco`,"custom_assistant_Hugging Face links are fine, also hf:org/repo/file.gguf":`Sirven enlaces de Hugging Face, también hf:org/repo/file.gguf`,custom_assistant_Languages:aa,"custom_assistant_Load time":`Tiempo de carga`,"custom_assistant_Loaded model":`Modelo cargado`,custom_assistant_Model:oa,custom_assistant_Models:sa,"custom_assistant_No models in this folder yet. Download one below.":`Todavía no hay modelos en esta carpeta. Descarga uno abajo.`,"custom_assistant_Own model: link to a .gguf file":`Modelo propio: enlace a un archivo .gguf`,"custom_assistant_Questions asked / answered by the model / handed over to the next tier":`Preguntas hechas / respondidas por el modelo / derivadas al siguiente nivel`,"custom_assistant_Reset statistics":`Restablecer estadísticas`,"custom_assistant_Save the settings to load the selected model. The instance restarts.":`Guarda los ajustes para cargar el modelo elegido. La instancia se reinicia.`,custom_assistant_Size:ca,"custom_assistant_Start the instance to manage the local models.":`Inicia la instancia para gestionar los modelos locales.`,"custom_assistant_The active model cannot be deleted":`El modelo activo no se puede eliminar`,'custom_assistant_The engine is not installed yet. Install it on the main tab ("Install local model").':`El motor aún no está instalado. Instálalo en la primera pestaña ("Instalar modelo local").`,"custom_assistant_The file %s is deleted from the disk. Its statistics stay.":`El archivo %s se elimina del disco. Sus estadísticas se conservan.`,"custom_assistant_Time until the first word: reading the question":`Tiempo hasta la primera palabra: leer la pregunta`,"custom_assistant_Timeouts and errors among the questions asked":`Tiempos agotados y errores entre las preguntas hechas`,"custom_assistant_Tokens/s":`Tokens/s`,custom_assistant_Use:la,custom_assistant_correct:ua,custom_assistant_downloaded:da,custom_assistant_downloading:fa,custom_assistant_failed:pa,"custom_assistant_hand over":`derivar`,"custom_assistant_last used":`último uso`,"custom_assistant_many languages":`muchos idiomas`,"custom_assistant_missed hand-overs":`derivaciones omitidas`,"custom_assistant_needless hand-overs":`derivaciones innecesarias`,"custom_assistant_not enough space":`espacio insuficiente`,"custom_assistant_not the language of the assistant":`no es el idioma del asistente`,custom_assistant_parameters:ma,custom_assistant_speed:ha,custom_assistant_timeouts:ga,"custom_assistant_wrong answers":`respuestas erróneas`,"custom_assistant_very fast":`muy rápido`,custom_assistant_fast:_a,custom_assistant_medium:va,custom_assistant_slow:ya,custom_assistant_llm_benchmark:ba,"Model folder":`Carpeta de modelos`,"Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.":`Ruta absoluta, p. ej. /mnt/ssd/llm. Vacío = carpeta de datos de la instancia. Los modelos ya descargados en otro sitio no se mueven.`,"custom_assistant_Start the instance to test the voice":`Inicia la instancia para probar la voz`,"custom_assistant_Try this voice":`Probar esta voz`,custom_assistant_synthesis:xa,"custom_assistant_%s answers in the journal":`%s respuestas en el registro`,"custom_assistant_Request comes from":`La solicitud proviene de`,custom_assistant_Voice:`Voz`,"custom_assistant_Voice is off":`la voz está apagada`,"custom_assistant_No telegram instance sends here":`No se envía ninguna instancia de Telegram aquí.`,"custom_assistant_The tab Chat of these settings":`La pestaña Chat de estos ajustes`,"custom_assistant_No smart-text2command instance chosen":`No se ha elegido ninguna instancia de smart-text2command`,"custom_assistant_%s is not running":`%s no se está ejecutando`,"custom_assistant_Local decision":`Decisión local`,"custom_assistant_First the routines:":`Primero las rutinas:`,"custom_assistant_Off: everything goes to the models":`Apagado: todo va a los modelos.`,"custom_assistant_Built-in rules:":`Reglas integradas:`,"custom_assistant_devices, timers, alarms, time, weather":`dispositivos, temporizadores, alarmas, tiempo, clima`,"custom_assistant_Devices:":`Dispositivos:`,"custom_assistant_timers, alarms, time, weather":`temporizadores, alarmas, tiempo, clima`,"custom_assistant_default model":`modelo predeterminado`,"custom_assistant_Model:":`Modelo:`,"custom_assistant_The last step":`El último paso`,"custom_assistant_Asked before the cloud":`Preguntado ante la nube`,"custom_assistant_Gives up after:":`Se rinde después de:`,custom_assistant_Off:Sa,"custom_assistant_No pi-agent instance chosen":`No se ha elegido ninguna instancia de pi-agent`,"custom_assistant_Off: answers only locally":`Desactivado: responde solo localmente`,"custom_assistant_with its own model, tools and permissions":`con su propio modelo, herramientas y permisos`,"custom_assistant_Provider:":`Proveedor:`,custom_assistant_automatic:Ca,"custom_assistant_with the tools of this adapter":`con las herramientas de este adaptador`,"custom_assistant_as text":`como texto`,"custom_assistant_not understood":`no entendido`,"custom_assistant_handed on":`entregado`,"custom_assistant_only if the cloud fails":`sólo si la nube falla`,"custom_assistant_not running":`no corriendo`,"custom_assistant_Install %s":`Instalar %s`,"custom_assistant_Voice satellites (speech recognition and speech output)":`Satélites de voz (reconocimiento de voz y salida de voz)`,"custom_assistant_Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.":`Los satélites del adaptador asistente-satélite siempre funcionan. Detalles en las pestañas Voz y Satélites.`,"custom_assistant_Messages of %s come here.":`Los mensajes de %s llegan aquí.`,"custom_assistant_In the settings of the telegram adapter, choose %s as the assistant instance.":`En la configuración del adaptador de Telegram, elija %s como instancia del asistente.`,"custom_assistant_The tab Chat of these settings, also to try out every step.":`La pestaña Chat de estos ajustes, también para probar cada paso.`,"custom_assistant_From a script: %s, or write the question into %s.":`Desde un script: %s, o escribe la pregunta en %s.`,"custom_assistant_Built-in rules":`Reglas integradas`,"custom_assistant_Every request goes to the models. Only the routines are still checked first.":`Cada solicitud va dirigida a los modelos. Sólo se siguen comprobando primero las rutinas.`,"custom_assistant_Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.":`Las reglas fijas comprenden la conmutación, la atenuación y el estado de los dispositivos, temporizadores, alarmas, la hora y el clima, en unos pocos milisegundos, sin conexión. Lo que no entienden continúa.`,"custom_assistant_The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.":`El comando smart-text2 del adaptador aprende su redacción a partir de ejemplos, ejecuta solo las acciones que aprobó allí y le pregunta cuando la habitación o el dispositivo no están claros. Entiende alemán e inglés. Los temporizadores, las alarmas, la hora y el clima se mantienen con las reglas integradas; lo que ninguno de los dos entiende continúa.`,"custom_assistant_smart-text2command instance":`instancia de comando smart-text2`,"custom_assistant_Before this, %s routines are checked (tab Commands).":`Antes de esto, se marcan %s rutinas (pestaña Comandos).`,"custom_assistant_Routines (fixed phrases with their own actions) are set up on the tab Commands.":`Las rutinas (frases fijas con acciones propias) se configuran en la pestaña Comandos.`,"custom_assistant_Use a local LLM":`Utilice un LLM local`,"custom_assistant_The list of models needs the running instance.":`La lista de modelos necesita la instancia en ejecución.`,"custom_assistant_Ask before the cloud":`Pregunta antes que la nube`,"custom_assistant_Without a cloud step the local model is the last step.":`Sin un paso en la nube, el modelo local es el último paso.`,"custom_assistant_Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.":`Cada solicitud que la decisión local no comprende llega primero a ella. Guarda llamadas en la nube, pero en una Raspberry Pi agrega entre 10 y 25 segundos.`,"custom_assistant_It only answers when the cloud fails (offline, quota).":`Solo responde cuando falla la nube (fuera de línea, cuota).`,"custom_assistant_Gives up after (s)":`Se rinde después (s)`,"custom_assistant_Download and compare models on the tab Local models.":`Descargue y compare modelos en la pestaña Modelos locales.`,"custom_assistant_AI provider":`Proveedor de IA`,"custom_assistant_Only the local steps answer; a request they do not understand gets a fixed sentence.":`Sólo responden los pasos locales; una petición que no entienden recibe una sentencia fija.`,custom_assistant_Provider:wa,"custom_assistant_empty = automatic":`vacío = automático`,"custom_assistant_Provider, model and key come from the system settings of admin (tab AI there).":`El proveedor, el modelo y la clave provienen de la configuración del sistema del administrador (pestaña AI allí).`,"custom_assistant_The API key and the other details are on the tab AI.":`La clave API y los demás detalles se encuentran en la pestaña AI.`,"custom_assistant_The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.":`El adaptador pi-agent responde con su propio modelo, herramientas y permisos de escritura; cada fuente de solicitud tiene su propia conversación allí.`,"custom_assistant_pi-agent instance":`instancia de agente pi`,"custom_assistant_Changes take effect when the settings are saved.":`Los cambios entran en vigor cuando se guarda la configuración.`,"custom_assistant_How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.":`Cómo pasa una solicitud por el asistente. Cada paso responde a lo que entiende, el resto pasa al siguiente. Haga clic en un paso para configurarlo.`,'custom_assistant_Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.':`Antes de cada paso: una palabra de parada silencia un cronómetro que suena, la respuesta a una pregunta abierta llega a quien la haya formulado y el "modo de diálogo activado/desactivado" activa o desactiva el diálogo de un satélite. Una solicitud sobre un guión o una imagen va directamente al paso de la nube.`,"custom_assistant_%s s on average (%s in the journal)":`%s s de media (%s en el registro)`,"custom_assistant_No ioBroker.voice instance chosen":`No se ha elegido ninguna instancia de ioBroker.voice`,"custom_assistant_Server:":`Servidor:`,"custom_assistant_Reserve:":`Reserva:`,"custom_assistant_Language:":`Idioma:`,"custom_assistant_Text requests skip this step.":`Las peticiones de texto se saltan este paso.`,"custom_assistant_Off: only text requests":`Desactivado: solo peticiones de texto`,"custom_assistant_Voice:":`Voz:`,"custom_assistant_default voice":`voz predeterminada`,"custom_assistant_Switch commands: a beep":`Órdenes de conmutación: un pitido`,"custom_assistant_Longest answer: %s characters":`Respuesta más larga: %s caracteres`,"custom_assistant_Long answers are not cut":`Las respuestas largas no se recortan`,"custom_assistant_Only answers to speech; text requests get text back.":`Solo respuestas a voz; las peticiones de texto reciben texto.`,"custom_assistant_Off: answers as text":`Desactivado: respuestas como texto`,custom_assistant_speech:`voz`,"custom_assistant_Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.":`Convierte en texto lo que se dice a los satélites. También escucha los mensajes de voz de Telegram y el modo diálogo del chat. Las claves y más opciones están en la pestaña Voz.`,"custom_assistant_Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.":`Dice la respuesta en el satélite que preguntó, y también los avisos. Las claves y más opciones están en la pestaña Voz.`,"custom_assistant_Follow-up questions in a conversation go straight to the cloud.":`Las preguntas de seguimiento en una conversación van directamente a la nube.`,"custom_assistant_What no step understands gets a fixed sentence.":`Lo que ningún paso entiende recibe una frase fija como respuesta.`,custom_assistant_Music:Ta,"custom_assistant_Adapter command":`Comando de adaptador`},Da=e({custom_assistant_Announcement:()=>Oa,custom_assistant_Answer:()=>ka,custom_assistant_Benchmark:()=>Io,custom_assistant_Cancel:()=>Aa,custom_assistant_Chat:()=>ja,custom_assistant_Close:()=>Ma,custom_assistant_Context:()=>Na,custom_assistant_Copied:()=>Pa,custom_assistant_Copy:()=>Fa,custom_assistant_Delete:()=>Ia,custom_assistant_Details:()=>Lo,custom_assistant_Download:()=>Ro,custom_assistant_Error:()=>La,custom_assistant_Expected:()=>zo,custom_assistant_Failures:()=>Bo,custom_assistant_Folder:()=>Vo,custom_assistant_Host:()=>Ra,custom_assistant_Languages:()=>Ho,custom_assistant_Model:()=>Uo,custom_assistant_Models:()=>Wo,custom_assistant_Music:()=>us,custom_assistant_Off:()=>os,custom_assistant_Provider:()=>cs,custom_assistant_Question:()=>za,custom_assistant_Recognized:()=>Ba,custom_assistant_Record:()=>Va,custom_assistant_Request:()=>Ha,custom_assistant_Room:()=>Ua,custom_assistant_Routine:()=>Wa,custom_assistant_Satellite:()=>Ga,custom_assistant_Satellites:()=>Ka,custom_assistant_Script:()=>qa,custom_assistant_Size:()=>Go,custom_assistant_Source:()=>Ja,custom_assistant_Speak:()=>Ya,custom_assistant_Spoken:()=>Xa,custom_assistant_State:()=>Za,custom_assistant_Status:()=>Qa,custom_assistant_Steps:()=>$a,custom_assistant_Stop:()=>eo,custom_assistant_Time:()=>to,custom_assistant_Tool:()=>no,custom_assistant_Upload:()=>ro,custom_assistant_Use:()=>Ko,custom_assistant_Voice:()=>as,custom_assistant_auto:()=>io,custom_assistant_automatic:()=>ss,custom_assistant_bundled_wake_word_hint:()=>jo,custom_assistant_correct:()=>qo,custom_assistant_delete_wake_word_confirm:()=>ao,custom_assistant_device:()=>oo,custom_assistant_downloaded:()=>Jo,custom_assistant_downloading:()=>Yo,custom_assistant_failed:()=>Xo,custom_assistant_fast:()=>es,custom_assistant_filter:()=>so,custom_assistant_hint:()=>co,custom_assistant_llm_benchmark:()=>rs,custom_assistant_llm_downloading:()=>lo,custom_assistant_llm_error:()=>uo,custom_assistant_llm_idle:()=>fo,custom_assistant_llm_installing:()=>po,custom_assistant_llm_loading:()=>mo,custom_assistant_llm_ready:()=>ho,custom_assistant_medium:()=>ts,custom_assistant_offline:()=>go,custom_assistant_online:()=>_o,custom_assistant_parameters:()=>Zo,custom_assistant_read:()=>vo,custom_assistant_room:()=>yo,custom_assistant_sat_idle:()=>bo,custom_assistant_sat_listening:()=>xo,custom_assistant_sat_offline:()=>So,custom_assistant_sat_processing:()=>Co,custom_assistant_sat_speaking:()=>wo,custom_assistant_slow:()=>ns,custom_assistant_speech:()=>ls,custom_assistant_speed:()=>Qo,custom_assistant_synthesis:()=>is,custom_assistant_timeouts:()=>$o,custom_assistant_type:()=>To,custom_assistant_wake_word_deleted:()=>Eo,custom_assistant_wake_word_hint:()=>Do,custom_assistant_wake_word_installed:()=>Mo,custom_assistant_wake_word_installed_full:()=>Po,custom_assistant_wake_word_installed_replaced:()=>No,custom_assistant_wake_word_phrase_hint:()=>Oo,custom_assistant_wake_word_upload_hint:()=>ko,custom_assistant_wake_word_uploaded:()=>Ao,custom_assistant_write:()=>Fo,default:()=>ds}),Oa=`Annonce`,ka=`Réponse`,Aa=`Cancel`,ja=`Chat`,Ma=`Close`,Na=`Contexte`,Pa=`Copié`,Fa=`Copier`,Ia=`Delete`,La=`Erreur`,Ra=`Hôte`,za=`Question`,Ba=`Reconnu`,Va=`Enregistrer`,Ha=`Requête`,Ua=`Room`,Wa=`Routine`,Ga=`Satellite`,Ka=`Satellites`,qa=`Script`,Ja=`Source`,Ya=`Parler`,Xa=`Prononcé`,Za=`State`,Qa=`Statut`,$a=`Étapes`,eo=`Arrêter`,to=`Heure`,no=`Outil`,ro=`Téléverser`,io=`auto`,ao=`Supprimer « %s » ? Il ne sera plus proposé aux appareils ; un appareil qui l'a déjà téléchargé le conserve.`,oo=`Appareil`,so=`Filtre`,co=`Décochez l'option «\xA0Lecture\xA0» pour masquer un périphérique à l'assistant, ou décochez l'option «\xA0Écriture\xA0» pour le rendre accessible en lecture seule (par exemple, les verrous). Par défaut, tous les périphériques sont autorisés.`,lo=`téléchargement du modèle…`,uo=`erreur`,fo=`inactif`,po=`installation du moteur…`,mo=`chargement…`,ho=`prêt`,go=`hors ligne`,_o=`en ligne`,vo=`Lire`,yo=`Chambre`,bo=`inactif`,xo=`écoute`,So=`hors ligne`,Co=`traitement`,wo=`Parlant`,To=`Taper`,Eo=`« %s » a été supprimé. Un appareil qui l'a déjà téléchargé conserve sa copie.`,Do=`Le mot d'activation s'exécute sur l'appareil. Survolez un mot pour voir dans quelles langues il a été entraîné — la plupart uniquement en anglais.`,Oo=`Ce que vous dites pour réveiller l'appareil — c'est ainsi qu'il apparaît dans la liste.`,ko=`Un modèle microWakeWord : le fichier .tflite, idéalement avec son .json. Les autres types de modèles (openWakeWord, Porcupine) ne peuvent pas être installés ainsi.`,Ao=`« %s » a été téléversé. Sélectionnez-le ci-dessus pour l'activer — l'appareil télécharge alors le modèle.`,jo=`Clic : charger sur l'appareil et activer — remplace une version plus ancienne du même mot`,Mo=`« %s » est activé — l'appareil télécharge le modèle.`,No=`« %s » est activé à la place de « %s » — l'appareil télécharge le modèle.`,Po=`« %s » est maintenant dans la liste, mais tous les emplacements sont occupés. Désactivez d'abord un autre mot d'activation, puis sélectionnez « %s ».`,Fo=`Écrire`,Io=`Test`,Lo=`Détails`,Ro=`Télécharger`,zo=`Attendu`,Bo=`Échecs`,Vo=`Dossier`,Ho=`Langues`,Uo=`Modèle`,Wo=`Modèles`,Go=`Taille`,Ko=`Utiliser`,qo=`correctes`,Jo=`téléchargé`,Yo=`téléchargement`,Xo=`échec`,Zo=`paramètres`,Qo=`vitesse`,$o=`délais dépassés`,es=`rapide`,ts=`moyenne`,ns=`lente`,rs=`test en cours`,is=`synthèse`,as=`Voix`,os=`Désactivé`,ss=`automatique`,cs=`Fournisseur`,ls=`parole`,us=`Musique`,ds={"custom_assistant_%s of %s active":`%s of %s active`,"custom_assistant_%s s audio":`%s s d’audio`,"custom_assistant_(no spoken answer)":`(no spoken answer)`,"custom_assistant_A satellite that is still configured appears again when it connects.":`Un satellite encore configuré réapparaît dès qu’il se connecte.`,"custom_assistant_All sources":`All sources`,custom_assistant_Announcement:Oa,custom_assistant_Answer:ka,"custom_assistant_Audio file":`Fichier audio`,custom_assistant_Cancel:Aa,custom_assistant_Chat:ja,"custom_assistant_Clear chat":`Discussion claire`,"custom_assistant_Click for details":`Cliquer pour les détails`,custom_assistant_Close:Ma,"custom_assistant_Cloud LLM":`Cloud LLM`,"custom_assistant_Collapse all":`Tout réduire`,custom_assistant_Context:Na,custom_assistant_Copied:Pa,custom_assistant_Copy:Fa,"custom_assistant_Copy everything as JSON":`Tout copier en JSON`,custom_assistant_Delete:Ia,"custom_assistant_Delete the recorded history of all sources?":`Delete the recorded history of all sources?`,"custom_assistant_Device cache cleared.":`Cache du périphérique effacé.`,"custom_assistant_Device settings":`Device settings`,"custom_assistant_Dialog: everything you say becomes a question":`Dialogue : tout ce que tu dis devient une question, jusqu’à ce que tu y mettes fin`,"custom_assistant_Dialog: hearing you…":`Dialogue : je t’entends …`,"custom_assistant_Dialog: listening…":`Dialogue : à l’écoute …`,"custom_assistant_Dialog: speaking…":`Dialogue : je parle …`,"custom_assistant_Dialog: thinking…":`Dialogue : réflexion …`,"custom_assistant_Download as JSON":`Télécharger en JSON`,"custom_assistant_End the dialog":`Terminer le dialogue`,custom_assistant_Error:La,"custom_assistant_Expand all":`Tout développer`,"custom_assistant_Follow-up":`Relance`,"custom_assistant_Hide disabled":`Masquer les fonctions désactivées`,"custom_assistant_Hide processing details":`Hide processing details`,custom_assistant_Host:Ra,"custom_assistant_Last seen":`Dernière observation`,"custom_assistant_Listening…":`Écoute…`,"custom_assistant_Loading…":`Chargement…`,"custom_assistant_Local LLM":`Local LLM`,"custom_assistant_Local model":`Modèle local`,"custom_assistant_Mic re-opened without wake word":`Mic re-opened without wake word (follow-up or question)`,"custom_assistant_Name language: %s":`Langue du nom\xA0: %s`,"custom_assistant_No answer":`Pas de réponse`,"custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.":`Aucun appareil détecté. Attribuez des états aux salles et aux fonctions dans ioBroker.`,"custom_assistant_No messages yet. Type a question below.":`Aucun message pour l'instant. Posez votre question ci-dessous.`,"custom_assistant_No processing steps were recorded for this request.":`Aucune étape de traitement n'a été enregistrée pour cette requête. Les détails sont conservés pour les 200 dernières requêtes.`,"custom_assistant_No satellites registered yet.":`Aucun satellite enregistré pour le moment.`,"custom_assistant_Not understood":`Not understood`,"custom_assistant_Nothing recognized":`Rien de reconnu`,"custom_assistant_Per-device permissions":`Autorisations par appareil`,"custom_assistant_Play answer (backend TTS)":`Réponse de lecture (TTS backend)`,"custom_assistant_Please select a .tflite model file":`Veuillez sélectionner un fichier de modèle .tflite`,custom_assistant_Question:za,"custom_assistant_Read answers aloud":`Lisez les réponses à voix haute`,custom_assistant_Recognized:Ba,custom_assistant_Record:Va,"custom_assistant_Recorded audio":`Audio enregistré`,"custom_assistant_Refresh device cache":`Actualiser le cache de l'appareil`,"custom_assistant_Remove satellite":`Supprimer le satellite`,"custom_assistant_Remove satellite %s and all its states?":`Supprimer le satellite %s et tous ses états ?`,"custom_assistant_Reply audio":`Audio de la réponse`,"custom_assistant_Reply to a question":`Reply to a question`,custom_assistant_Request:Ha,"custom_assistant_Request details":`Détails de la requête`,custom_assistant_Room:Ua,custom_assistant_Routine:Wa,"custom_assistant_Rule-based NLU":`Rule-based NLU (local)`,custom_assistant_Satellite:Ga,custom_assistant_Satellites:Ka,"custom_assistant_Save the configuration (the instance will restart) before chatting.":`Enregistrez la configuration (l'instance redémarrera) avant de discuter.`,custom_assistant_Script:qa,"custom_assistant_Send announcement":`Envoyer l'annonce`,"custom_assistant_Settings for %s":`Settings for %s`,"custom_assistant_Show processing details":`Show processing details`,"custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.":`Shows all requests live: satellites, Telegram, scripts and this chat.`,custom_assistant_Source:Ja,custom_assistant_Speak:Ya,"custom_assistant_Speak on all satellites":`Parlez sur tous les satellites`,"custom_assistant_Speak the test sentence and recognize it":`Prononcer la phrase de test et la reconnaître`,"custom_assistant_Speech output":`Synthèse vocale`,"custom_assistant_Speech recognition":`Reconnaissance vocale`,"custom_assistant_Speech recognition time":`Speech recognition time`,"custom_assistant_Speech synthesis":`Synthèse vocale`,custom_assistant_Spoken:Xa,"custom_assistant_Start the assistant instance to chat.":`Démarrez l'instance de l'assistant pour discuter.`,"custom_assistant_Start the assistant instance to load the device list.":`Démarrez l'instance de l'assistant pour charger la liste des périphériques.`,custom_assistant_State:Za,"custom_assistant_States read":`États lus`,"custom_assistant_States written":`États écrits`,custom_assistant_Status:Qa,custom_assistant_Steps:$a,custom_assistant_Stop:eo,"custom_assistant_Stop listening":`Arrêtez d'écouter`,"custom_assistant_Stop reading answers aloud":`Arrêtez de lire les réponses à voix haute`,"custom_assistant_Stop word":`Stop word`,"custom_assistant_Test chat":`Chat de test`,"custom_assistant_Test sentence":`Phrase de test`,"custom_assistant_Test voice":`Tester la voix`,"custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.":`Le dialogue a besoin de la reconnaissance vocale : active la voix dans l’onglet Voix.`,"custom_assistant_The instance must be running to test the voice.":`L’instance doit être en cours d’exécution pour tester la voix.`,"custom_assistant_The microphone could not be opened:":`Impossible d’ouvrir le microphone :`,"custom_assistant_The microphone only works over https or on localhost.":`Le microphone ne fonctionne qu’en https ou sur localhost.`,"custom_assistant_Thinking…":`Pensée…`,"custom_assistant_This satellite exposes no settings.":`This satellite exposes no settings.`,custom_assistant_Time:to,custom_assistant_Tool:no,"custom_assistant_Tool calls":`Appels d'outils`,"custom_assistant_Tool result":`Résultat de l'outil`,"custom_assistant_Tools & states":`Outils et états`,"custom_assistant_Total duration":`Durée totale`,"custom_assistant_Translate all missing (%s)":`Traduire tout ce qui est manquant (%s)`,"custom_assistant_Translate name into %s":`Traduire le nom en %s`,"custom_assistant_Type a message…":`Saisissez un message…`,custom_assistant_Upload:ro,"custom_assistant_Upload own wake word":`Téléverser son propre mot d'activation`,"custom_assistant_Uploaded wake word":`Mot d'activation téléversé`,"custom_assistant_Wake word":`Wake word`,"custom_assistant_Wake word phrase":`Phrase d'activation`,"custom_assistant_Wake words":`Wake words`,custom_assistant_auto:io,"custom_assistant_change it on the Voice tab":`modifiez-le dans l'onglet Voix`,custom_assistant_delete_wake_word_confirm:ao,custom_assistant_device:oo,custom_assistant_filter:so,"custom_assistant_follow-up":`follow-up`,custom_assistant_hint:co,"custom_assistant_in progress":`en cours`,custom_assistant_llm_downloading:lo,custom_assistant_llm_error:uo,custom_assistant_llm_idle:fo,custom_assistant_llm_installing:po,custom_assistant_llm_loading:mo,"custom_assistant_llm_not installed":`non installé`,custom_assistant_llm_ready:ho,"custom_assistant_made in %s ms":`généré en %s ms`,"custom_assistant_no name in %s (showing %s)":`Aucun nom dans « %s » — affichage de « %s »`,custom_assistant_offline:go,custom_assistant_online:_o,custom_assistant_read:vo,"custom_assistant_recognized in %s ms":`reconnu en %s ms`,custom_assistant_room:yo,custom_assistant_sat_idle:bo,custom_assistant_sat_listening:xo,custom_assistant_sat_offline:So,custom_assistant_sat_processing:Co,custom_assistant_sat_speaking:wo,custom_assistant_type:To,"custom_assistant_waits for reply":`waits for reply`,custom_assistant_wake_word_deleted:Eo,custom_assistant_wake_word_hint:Do,custom_assistant_wake_word_phrase_hint:Oo,custom_assistant_wake_word_upload_hint:ko,custom_assistant_wake_word_uploaded:Ao,"custom_assistant_Shipped with the adapter":`Fournis avec l'adaptateur`,custom_assistant_bundled_wake_word_hint:jo,custom_assistant_wake_word_installed:Mo,custom_assistant_wake_word_installed_replaced:No,custom_assistant_wake_word_installed_full:Po,custom_assistant_write:Fo,"custom_assistant_Add a model":`Ajouter un modèle`,"custom_assistant_Answer time":`Temps de réponse`,"custom_assistant_Asked / answered / handed over":`Posées / répondues / transmises`,"custom_assistant_Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly":`Pose des questions de test au modèle chargé dans la langue de l'assistant et en anglais : il doit transmettre les questions sur la maison et répondre juste aux questions générales`,custom_assistant_Benchmark:Io,"custom_assistant_Delete model?":`Supprimer le modèle ?`,custom_assistant_Details:Lo,custom_assistant_Download:Ro,"custom_assistant_Estimate from the model size, not measured. Use the benchmark for real numbers.":`Estimation selon la taille du modèle, non mesurée. Le test donne des chiffres réels.`,custom_assistant_Expected:zo,custom_assistant_Failures:Bo,"custom_assistant_First token":`Premier jeton`,custom_assistant_Folder:Vo,"custom_assistant_Free on the disk":`Libre sur le disque`,"custom_assistant_Hugging Face links are fine, also hf:org/repo/file.gguf":`Les liens Hugging Face conviennent, aussi hf:org/repo/file.gguf`,custom_assistant_Languages:Ho,"custom_assistant_Load time":`Temps de chargement`,"custom_assistant_Loaded model":`Modèle chargé`,custom_assistant_Model:Uo,custom_assistant_Models:Wo,"custom_assistant_No models in this folder yet. Download one below.":`Aucun modèle dans ce dossier pour l'instant. Téléchargez-en un ci-dessous.`,"custom_assistant_Own model: link to a .gguf file":`Modèle personnel : lien vers un fichier .gguf`,"custom_assistant_Questions asked / answered by the model / handed over to the next tier":`Questions posées / répondues par le modèle / transmises au niveau suivant`,"custom_assistant_Reset statistics":`Réinitialiser les statistiques`,"custom_assistant_Save the settings to load the selected model. The instance restarts.":`Enregistrez les paramètres pour charger le modèle choisi. L'instance redémarre.`,custom_assistant_Size:Go,"custom_assistant_Start the instance to manage the local models.":`Démarrez l'instance pour gérer les modèles locaux.`,"custom_assistant_The active model cannot be deleted":`Le modèle actif ne peut pas être supprimé`,'custom_assistant_The engine is not installed yet. Install it on the main tab ("Install local model").':`Le moteur n'est pas encore installé. Installez-le dans le premier onglet (« Installer le modèle local »).`,"custom_assistant_The file %s is deleted from the disk. Its statistics stay.":`Le fichier %s est supprimé du disque. Ses statistiques restent.`,"custom_assistant_Time until the first word: reading the question":`Temps avant le premier mot : lecture de la question`,"custom_assistant_Timeouts and errors among the questions asked":`Délais dépassés et erreurs parmi les questions posées`,"custom_assistant_Tokens/s":`Jetons/s`,custom_assistant_Use:Ko,custom_assistant_correct:qo,custom_assistant_downloaded:Jo,custom_assistant_downloading:Yo,custom_assistant_failed:Xo,"custom_assistant_hand over":`transmettre`,"custom_assistant_last used":`dernière utilisation`,"custom_assistant_many languages":`nombreuses langues`,"custom_assistant_missed hand-overs":`transmissions manquées`,"custom_assistant_needless hand-overs":`transmissions inutiles`,"custom_assistant_not enough space":`espace insuffisant`,"custom_assistant_not the language of the assistant":`pas la langue de l'assistant`,custom_assistant_parameters:Zo,custom_assistant_speed:Qo,custom_assistant_timeouts:$o,"custom_assistant_wrong answers":`mauvaises réponses`,"custom_assistant_very fast":`très rapide`,custom_assistant_fast:es,custom_assistant_medium:ts,custom_assistant_slow:ns,custom_assistant_llm_benchmark:rs,"Model folder":`Dossier des modèles`,"Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.":`Chemin absolu, p. ex. /mnt/ssd/llm. Vide = dossier de données de l'instance. Les modèles déjà téléchargés ailleurs ne sont pas déplacés.`,"custom_assistant_Start the instance to test the voice":`Démarrez l'instance pour tester la voix`,"custom_assistant_Try this voice":`Essayer cette voix`,custom_assistant_synthesis:is,"custom_assistant_%s answers in the journal":`%s réponses dans le journal`,"custom_assistant_Request comes from":`La demande vient de`,custom_assistant_Voice:as,"custom_assistant_Voice is off":`La voix est coupée`,"custom_assistant_No telegram instance sends here":`Aucune instance de télégramme n'est envoyée ici`,"custom_assistant_The tab Chat of these settings":`L'onglet Chat de ces paramètres`,"custom_assistant_No smart-text2command instance chosen":`Aucune instance de smart-text2command choisie`,"custom_assistant_%s is not running":`%s n'est pas en cours d'exécution`,"custom_assistant_Local decision":`Décision locale`,"custom_assistant_First the routines:":`Tout d'abord les routines :`,"custom_assistant_Off: everything goes to the models":`Off : tout va aux modèles`,"custom_assistant_Built-in rules:":`Règles intégrées\xA0:`,"custom_assistant_devices, timers, alarms, time, weather":`appareils, minuteries, alarmes, heure, météo`,"custom_assistant_Devices:":`Appareils\xA0:`,"custom_assistant_timers, alarms, time, weather":`minuteries, alarmes, heure, météo`,"custom_assistant_default model":`modèle par défaut`,"custom_assistant_Model:":`Modèle:`,"custom_assistant_The last step":`La dernière étape`,"custom_assistant_Asked before the cloud":`Demandé avant le cloud`,"custom_assistant_Gives up after:":`Abandonne après :`,custom_assistant_Off:os,"custom_assistant_No pi-agent instance chosen":`Aucune instance pi-agent choisie`,"custom_assistant_Off: answers only locally":`Désactivé\xA0: répond uniquement localement`,"custom_assistant_with its own model, tools and permissions":`avec son propre modèle, ses outils et ses autorisations`,"custom_assistant_Provider:":`Fournisseur:`,custom_assistant_automatic:ss,"custom_assistant_with the tools of this adapter":`avec les outils de cet adaptateur`,"custom_assistant_as text":`sous forme de texte`,"custom_assistant_not understood":`pas compris`,"custom_assistant_handed on":`remis`,"custom_assistant_only if the cloud fails":`seulement si le cloud échoue`,"custom_assistant_not running":`ne fonctionne pas`,"custom_assistant_Install %s":`Installer %s`,"custom_assistant_Voice satellites (speech recognition and speech output)":`Satellites vocaux (reconnaissance vocale et sortie vocale)`,"custom_assistant_Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.":`Les satellites de l'adaptateur assistant-satellite fonctionnent toujours. Détails sur les onglets Voix et Satellites.`,"custom_assistant_Messages of %s come here.":`Les messages de %s arrivent ici.`,"custom_assistant_In the settings of the telegram adapter, choose %s as the assistant instance.":`Dans les paramètres de l'adaptateur de télégramme, choisissez %s comme instance d'assistant.`,"custom_assistant_The tab Chat of these settings, also to try out every step.":`L'onglet Chat de ces paramètres, également pour essayer chaque étape.`,"custom_assistant_From a script: %s, or write the question into %s.":`Depuis un script\xA0: %s, ou écrivez la question dans %s.`,"custom_assistant_Built-in rules":`Règles intégrées`,"custom_assistant_Every request goes to the models. Only the routines are still checked first.":`Chaque demande va aux modèles. Seules les routines sont toujours vérifiées en premier.`,"custom_assistant_Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.":`Les règles fixes comprennent la commutation, la gradation et l'état des appareils, les minuteries, les alarmes, l'heure et la météo, en quelques millisecondes, hors ligne. Ce qu’ils ne comprennent pas continue.`,"custom_assistant_The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.":`L'adaptateur smart-text2command apprend votre formulation à partir d'exemples, exécute uniquement les actions que vous y avez approuvées et vous demande lorsque la pièce ou l'appareil n'est pas clair. Il comprend l'allemand et l'anglais. Les minuteries, les alarmes, l'heure et la météo restent conformes aux règles intégrées\xA0; ce que ni l'un ni l'autre ne comprend continue.`,"custom_assistant_smart-text2command instance":`instance de commande smart-text2`,"custom_assistant_Before this, %s routines are checked (tab Commands).":`Avant cela, les routines %s sont vérifiées (onglet Commandes).`,"custom_assistant_Routines (fixed phrases with their own actions) are set up on the tab Commands.":`Les routines (phrases fixes avec leurs propres actions) sont configurées dans l'onglet Commandes.`,"custom_assistant_Use a local LLM":`Utiliser un LLM local`,"custom_assistant_The list of models needs the running instance.":`La liste des modèles nécessite l'instance en cours d'exécution.`,"custom_assistant_Ask before the cloud":`Demandez avant le cloud`,"custom_assistant_Without a cloud step the local model is the last step.":`Sans étape cloud, le modèle local est la dernière étape.`,"custom_assistant_Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.":`Toute demande que la décision locale ne comprend pas lui est adressée en premier. Enregistre les appels cloud, mais sur un Raspberry Pi, cela ajoute 10 à 25 secondes.`,"custom_assistant_It only answers when the cloud fails (offline, quota).":`Il ne répond qu'en cas de panne du cloud (hors ligne, quota).`,"custom_assistant_Gives up after (s)":`Abandonne après (s)`,"custom_assistant_Download and compare models on the tab Local models.":`Téléchargez et comparez les modèles sur l'onglet Modèles locaux.`,"custom_assistant_AI provider":`Fournisseur d'IA`,"custom_assistant_Only the local steps answer; a request they do not understand gets a fixed sentence.":`Seules les étapes locales répondent ; une demande qu'ils ne comprennent pas entraîne une peine ferme.`,custom_assistant_Provider:cs,"custom_assistant_empty = automatic":`vide = automatique`,"custom_assistant_Provider, model and key come from the system settings of admin (tab AI there).":`Le fournisseur, le modèle et la clé proviennent des paramètres système de l'administrateur (onglet AI ici).`,"custom_assistant_The API key and the other details are on the tab AI.":`La clé API et les autres détails se trouvent sur l'onglet AI.`,"custom_assistant_The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.":`L'adaptateur pi-agent répond avec son propre modèle, ses propres outils et ses propres autorisations en écriture\xA0; chaque source de requête y obtient sa propre conversation.`,"custom_assistant_pi-agent instance":`instance d'agent pi`,"custom_assistant_Changes take effect when the settings are saved.":`Les modifications prennent effet lorsque les paramètres sont enregistrés.`,"custom_assistant_How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.":`Comment une demande passe par l'assistant. Chaque étape répond à ce qu'elle comprend, le reste passe à la suivante. Cliquez sur une étape pour la configurer.`,'custom_assistant_Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.':`Avant chaque étape\xA0: un mot vide fait taire une minuterie de sonnerie, la réponse à une question ouverte est transmise à celui qui l'a posée et le "mode dialogue activé/désactivé" active le dialogue d'un satellite. Une demande concernant un script ou avec une image passe directement à l'étape cloud.`,"custom_assistant_%s s on average (%s in the journal)":`%s s en moyenne (%s dans le journal)`,"custom_assistant_No ioBroker.voice instance chosen":`Aucune instance ioBroker.voice choisie`,"custom_assistant_Server:":`Serveur :`,"custom_assistant_Reserve:":`Secours :`,"custom_assistant_Language:":`Langue :`,"custom_assistant_Text requests skip this step.":`Les requêtes texte sautent cette étape.`,"custom_assistant_Off: only text requests":`Désactivé : uniquement des requêtes texte`,"custom_assistant_Voice:":`Voix :`,"custom_assistant_default voice":`voix par défaut`,"custom_assistant_Switch commands: a beep":`Commandes de commutation : un bip`,"custom_assistant_Longest answer: %s characters":`Réponse la plus longue : %s caractères`,"custom_assistant_Long answers are not cut":`Les réponses longues ne sont pas coupées`,"custom_assistant_Only answers to speech; text requests get text back.":`Seulement les réponses à la parole ; les requêtes texte reçoivent du texte.`,"custom_assistant_Off: answers as text":`Désactivé : réponses en texte`,custom_assistant_speech:ls,"custom_assistant_Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.":`Transforme en texte ce qui est dit aux satellites. Elle écoute aussi les messages vocaux de Telegram et le mode dialogue du chat. Les clés et les autres options sont dans l’onglet Voix.`,"custom_assistant_Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.":`Prononce la réponse sur le satellite qui a posé la question, ainsi que les annonces. Les clés et les autres options sont dans l’onglet Voix.`,"custom_assistant_Follow-up questions in a conversation go straight to the cloud.":`Les questions de suivi dans une conversation vont directement dans le cloud.`,"custom_assistant_What no step understands gets a fixed sentence.":`Ce qu’aucune étape ne comprend reçoit une phrase fixe en réponse.`,custom_assistant_Music:us,"custom_assistant_Adapter command":`Commande d'adaptateur`},fs=e({custom_assistant_Announcement:()=>ps,custom_assistant_Answer:()=>ms,custom_assistant_Benchmark:()=>yc,custom_assistant_Cancel:()=>hs,custom_assistant_Chat:()=>gs,custom_assistant_Close:()=>_s,custom_assistant_Context:()=>vs,custom_assistant_Copied:()=>ys,custom_assistant_Copy:()=>bs,custom_assistant_Delete:()=>xs,custom_assistant_Details:()=>bc,custom_assistant_Download:()=>xc,custom_assistant_Error:()=>Ss,custom_assistant_Expected:()=>Sc,custom_assistant_Failures:()=>Cc,custom_assistant_Folder:()=>wc,custom_assistant_Host:()=>Cs,custom_assistant_Languages:()=>Tc,custom_assistant_Model:()=>Ec,custom_assistant_Models:()=>Dc,custom_assistant_Music:()=>Kc,custom_assistant_Off:()=>Hc,custom_assistant_Provider:()=>Wc,custom_assistant_Question:()=>ws,custom_assistant_Recognized:()=>Ts,custom_assistant_Record:()=>Es,custom_assistant_Request:()=>Ds,custom_assistant_Room:()=>Os,custom_assistant_Routine:()=>ks,custom_assistant_Satellite:()=>As,custom_assistant_Satellites:()=>js,custom_assistant_Script:()=>Ms,custom_assistant_Size:()=>Oc,custom_assistant_Source:()=>Ns,custom_assistant_Speak:()=>Ps,custom_assistant_Spoken:()=>Fs,custom_assistant_State:()=>Is,custom_assistant_Status:()=>Ls,custom_assistant_Steps:()=>Rs,custom_assistant_Stop:()=>zs,custom_assistant_Time:()=>`Ora`,custom_assistant_Tool:()=>Bs,custom_assistant_Upload:()=>Vs,custom_assistant_Use:()=>`Usa`,custom_assistant_Voice:()=>Vc,custom_assistant_auto:()=>Hs,custom_assistant_automatic:()=>Uc,custom_assistant_bundled_wake_word_hint:()=>mc,custom_assistant_correct:()=>kc,custom_assistant_delete_wake_word_confirm:()=>Us,custom_assistant_device:()=>Ws,custom_assistant_downloaded:()=>Ac,custom_assistant_downloading:()=>jc,custom_assistant_failed:()=>Mc,custom_assistant_fast:()=>Ic,custom_assistant_filter:()=>Gs,custom_assistant_hint:()=>Ks,custom_assistant_llm_benchmark:()=>zc,custom_assistant_llm_downloading:()=>qs,custom_assistant_llm_error:()=>Js,custom_assistant_llm_idle:()=>Ys,custom_assistant_llm_installing:()=>Xs,custom_assistant_llm_loading:()=>Zs,custom_assistant_llm_ready:()=>Qs,custom_assistant_medium:()=>Lc,custom_assistant_offline:()=>$s,custom_assistant_online:()=>ec,custom_assistant_parameters:()=>Nc,custom_assistant_read:()=>tc,custom_assistant_room:()=>nc,custom_assistant_sat_idle:()=>rc,custom_assistant_sat_listening:()=>ic,custom_assistant_sat_offline:()=>ac,custom_assistant_sat_processing:()=>oc,custom_assistant_sat_speaking:()=>sc,custom_assistant_slow:()=>Rc,custom_assistant_speech:()=>Gc,custom_assistant_speed:()=>Pc,custom_assistant_synthesis:()=>Bc,custom_assistant_timeouts:()=>Fc,custom_assistant_type:()=>cc,custom_assistant_wake_word_deleted:()=>lc,custom_assistant_wake_word_hint:()=>uc,custom_assistant_wake_word_installed:()=>hc,custom_assistant_wake_word_installed_full:()=>_c,custom_assistant_wake_word_installed_replaced:()=>gc,custom_assistant_wake_word_phrase_hint:()=>dc,custom_assistant_wake_word_upload_hint:()=>fc,custom_assistant_wake_word_uploaded:()=>pc,custom_assistant_write:()=>vc,default:()=>qc}),ps=`Annuncio`,ms=`Risposta`,hs=`Cancel`,gs=`Chat`,_s=`Close`,vs=`Contesto`,ys=`Copiato`,bs=`Copia`,xs=`Delete`,Ss=`Errore`,Cs=`Ospite`,ws=`Domanda`,Ts=`Riconosciuto`,Es=`Registra`,Ds=`Richiesta`,Os=`Room`,ks=`Routine`,As=`Satellitare`,js=`Satelliti`,Ms=`Script`,Ns=`Source`,Ps=`Parlare`,Fs=`Pronunciato`,Is=`State`,Ls=`Stato`,Rs=`Passaggi`,zs=`Stop`,Bs=`Strumento`,Vs=`Carica`,Hs=`auto`,Us=`Eliminare "%s"? Non verrà più offerto ai dispositivi; un dispositivo che l'ha già scaricato lo conserva.`,Ws=`Dispositivo`,Gs=`Filtro`,Ks=`Deseleziona "Lettura" per nascondere un dispositivo all'assistente, oppure deseleziona "Scrittura" per mantenerlo in sola lettura (ad esempio, per bloccare le serrature). Per impostazione predefinita, i dispositivi sono completamente accessibili.`,qs=`modello di download…`,Js=`errore`,Ys=`oziare`,Xs=`installazione del motore…`,Zs=`caricamento…`,Qs=`pronto`,$s=`offline`,ec=`online`,tc=`Leggere`,nc=`Camera`,rc=`oziare`,ic=`ascolto`,ac=`offline`,oc=`elaborazione`,sc=`A proposito di`,cc=`Tipo`,lc=`"%s" è stato eliminato. Un dispositivo che l'ha già scaricato ne conserva la copia.`,uc=`La parola di attivazione viene elaborata sul dispositivo. Passa il mouse su una parola per vedere in quali lingue è stata addestrata — la maggior parte solo in inglese.`,dc=`Ciò che dici per attivare il dispositivo: è così che appare nell'elenco.`,fc=`Un modello microWakeWord: il file .tflite, preferibilmente insieme al suo .json. Altri tipi di modello (openWakeWord, Porcupine) non possono essere installati in questo modo.`,pc=`"%s" è stato caricato. Selezionalo qui sopra per attivarlo: il dispositivo scaricherà allora il modello.`,mc=`Clic: carica sul dispositivo e attiva — sostituisce una versione precedente della stessa parola`,hc=`"%s" è attiva: il dispositivo scarica il modello.`,gc=`"%s" è attiva al posto di "%s": il dispositivo scarica il modello.`,_c=`"%s" ora è nell'elenco, ma tutti i posti sono occupati. Disattiva prima un'altra parola di attivazione, poi seleziona "%s".`,vc=`Scrivere`,yc=`Test`,bc=`Dettagli`,xc=`Scarica`,Sc=`Atteso`,Cc=`Errori`,wc=`Cartella`,Tc=`Lingue`,Ec=`Modello`,Dc=`Modelli`,Oc=`Dimensione`,kc=`corrette`,Ac=`scaricato`,jc=`download in corso`,Mc=`non riuscito`,Nc=`parametri`,Pc=`velocità`,Fc=`timeout`,Ic=`veloce`,Lc=`media`,Rc=`lenta`,zc=`test in corso`,Bc=`sintesi`,Vc=`Voce`,Hc=`Spento`,Uc=`automatico`,Wc=`Fornitore`,Gc=`parlato`,Kc=`Musica`,qc={"custom_assistant_%s of %s active":`%s of %s active`,"custom_assistant_%s s audio":`%s s di audio`,"custom_assistant_(no spoken answer)":`(no spoken answer)`,"custom_assistant_A satellite that is still configured appears again when it connects.":`Un satellite ancora configurato ricompare quando si connette.`,"custom_assistant_All sources":`All sources`,custom_assistant_Announcement:ps,custom_assistant_Answer:ms,"custom_assistant_Audio file":`File audio`,custom_assistant_Cancel:hs,custom_assistant_Chat:gs,"custom_assistant_Clear chat":`Chat chiara`,"custom_assistant_Click for details":`Clicca per i dettagli`,custom_assistant_Close:_s,"custom_assistant_Cloud LLM":`Cloud LLM`,"custom_assistant_Collapse all":`Comprimi tutto`,custom_assistant_Context:vs,custom_assistant_Copied:ys,custom_assistant_Copy:bs,"custom_assistant_Copy everything as JSON":`Copia tutto come JSON`,custom_assistant_Delete:xs,"custom_assistant_Delete the recorded history of all sources?":`Delete the recorded history of all sources?`,"custom_assistant_Device cache cleared.":`Cache del dispositivo svuotata.`,"custom_assistant_Device settings":`Device settings`,"custom_assistant_Dialog: everything you say becomes a question":`Dialogo: tutto ciò che dici diventa una domanda, finché non lo termini`,"custom_assistant_Dialog: hearing you…":`Dialogo: ti sento …`,"custom_assistant_Dialog: listening…":`Dialogo: in ascolto …`,"custom_assistant_Dialog: speaking…":`Dialogo: sto parlando …`,"custom_assistant_Dialog: thinking…":`Dialogo: sto pensando …`,"custom_assistant_Download as JSON":`Scarica come JSON`,"custom_assistant_End the dialog":`Termina il dialogo`,custom_assistant_Error:Ss,"custom_assistant_Expand all":`Espandi tutto`,"custom_assistant_Follow-up":`Domanda di follow-up`,"custom_assistant_Hide disabled":`Nascondi disabilitato`,"custom_assistant_Hide processing details":`Hide processing details`,custom_assistant_Host:Cs,"custom_assistant_Last seen":`Ultimo avvistamento`,"custom_assistant_Listening…":`Ascolto…`,"custom_assistant_Loading…":`Caricamento…`,"custom_assistant_Local LLM":`Local LLM`,"custom_assistant_Local model":`Modello locale`,"custom_assistant_Mic re-opened without wake word":`Mic re-opened without wake word (follow-up or question)`,"custom_assistant_Name language: %s":`Lingua del nome: %s`,"custom_assistant_No answer":`Nessuna risposta`,"custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.":`Nessun dispositivo rilevato. Assegna stati a stanze e funzioni in ioBroker.`,"custom_assistant_No messages yet. Type a question below.":`Nessun messaggio ancora. Scrivi una domanda qui sotto.`,"custom_assistant_No processing steps were recorded for this request.":`Per questa richiesta non sono stati registrati passaggi di elaborazione. I dettagli vengono conservati per le ultime 200 richieste.`,"custom_assistant_No satellites registered yet.":`Nessun satellite ancora registrato.`,"custom_assistant_Not understood":`Not understood`,"custom_assistant_Nothing recognized":`Nulla riconosciuto`,"custom_assistant_Per-device permissions":`Autorizzazioni per dispositivo`,"custom_assistant_Play answer (backend TTS)":`Riproduci la risposta (TST di backend)`,"custom_assistant_Please select a .tflite model file":`Seleziona un file di modello .tflite`,custom_assistant_Question:ws,"custom_assistant_Read answers aloud":`Leggi le risposte ad alta voce`,custom_assistant_Recognized:Ts,custom_assistant_Record:Es,"custom_assistant_Recorded audio":`Audio registrato`,"custom_assistant_Refresh device cache":`Aggiorna la cache del dispositivo`,"custom_assistant_Remove satellite":`Rimuovi satellite`,"custom_assistant_Remove satellite %s and all its states?":`Rimuovere il satellite %s e tutti i suoi stati?`,"custom_assistant_Reply audio":`Audio della risposta`,"custom_assistant_Reply to a question":`Reply to a question`,custom_assistant_Request:Ds,"custom_assistant_Request details":`Dettagli della richiesta`,custom_assistant_Room:Os,custom_assistant_Routine:ks,"custom_assistant_Rule-based NLU":`Rule-based NLU (local)`,custom_assistant_Satellite:As,custom_assistant_Satellites:js,"custom_assistant_Save the configuration (the instance will restart) before chatting.":`Salva la configurazione (l'istanza si riavvierà) prima di iniziare la chat.`,custom_assistant_Script:Ms,"custom_assistant_Send announcement":`Invia annuncio`,"custom_assistant_Settings for %s":`Settings for %s`,"custom_assistant_Show processing details":`Show processing details`,"custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.":`Shows all requests live: satellites, Telegram, scripts and this chat.`,custom_assistant_Source:Ns,custom_assistant_Speak:Ps,"custom_assistant_Speak on all satellites":`Comunicare su tutti i satelliti`,"custom_assistant_Speak the test sentence and recognize it":`Pronuncia la frase di prova e riconoscila`,"custom_assistant_Speech output":`Sintesi vocale`,"custom_assistant_Speech recognition":`Riconoscimento vocale`,"custom_assistant_Speech recognition time":`Speech recognition time`,"custom_assistant_Speech synthesis":`Sintesi vocale`,custom_assistant_Spoken:Fs,"custom_assistant_Start the assistant instance to chat.":`Avvia l'assistente per chattare.`,"custom_assistant_Start the assistant instance to load the device list.":`Avvia l'istanza dell'assistente per caricare l'elenco dei dispositivi.`,custom_assistant_State:Is,"custom_assistant_States read":`Stati letti`,"custom_assistant_States written":`Stati scritti`,custom_assistant_Status:Ls,custom_assistant_Steps:Rs,custom_assistant_Stop:zs,"custom_assistant_Stop listening":`Smetti di ascoltare`,"custom_assistant_Stop reading answers aloud":`Smetti di leggere le risposte ad alta voce`,"custom_assistant_Stop word":`Stop word`,"custom_assistant_Test chat":`Chat di prova`,"custom_assistant_Test sentence":`Frase di prova`,"custom_assistant_Test voice":`Prova voce`,"custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.":`Il dialogo richiede il riconoscimento vocale: attiva la voce nella scheda Voce.`,"custom_assistant_The instance must be running to test the voice.":`L’istanza deve essere in esecuzione per provare la voce.`,"custom_assistant_The microphone could not be opened:":`Impossibile aprire il microfono:`,"custom_assistant_The microphone only works over https or on localhost.":`Il microfono funziona solo via https o su localhost.`,"custom_assistant_Thinking…":`Pensiero…`,"custom_assistant_This satellite exposes no settings.":`This satellite exposes no settings.`,custom_assistant_Time:`Ora`,custom_assistant_Tool:Bs,"custom_assistant_Tool calls":`Chiamate agli strumenti`,"custom_assistant_Tool result":`Risultato dello strumento`,"custom_assistant_Tools & states":`Strumenti e stati`,"custom_assistant_Total duration":`Durata totale`,"custom_assistant_Translate all missing (%s)":`Traduci tutto ciò che manca (%s)`,"custom_assistant_Translate name into %s":`Traduci il nome in %s`,"custom_assistant_Type a message…":`Digita un messaggio…`,custom_assistant_Upload:Vs,"custom_assistant_Upload own wake word":`Carica la tua parola di attivazione`,"custom_assistant_Uploaded wake word":`Parola di attivazione caricata`,"custom_assistant_Wake word":`Wake word`,"custom_assistant_Wake word phrase":`Frase di attivazione`,"custom_assistant_Wake words":`Wake words`,custom_assistant_auto:Hs,"custom_assistant_change it on the Voice tab":`modificalo nella scheda Voce`,custom_assistant_delete_wake_word_confirm:Us,custom_assistant_device:Ws,custom_assistant_filter:Gs,"custom_assistant_follow-up":`follow-up`,custom_assistant_hint:Ks,"custom_assistant_in progress":`in corso`,custom_assistant_llm_downloading:qs,custom_assistant_llm_error:Js,custom_assistant_llm_idle:Ys,custom_assistant_llm_installing:Xs,custom_assistant_llm_loading:Zs,"custom_assistant_llm_not installed":`non installato`,custom_assistant_llm_ready:Qs,"custom_assistant_made in %s ms":`generato in %s ms`,"custom_assistant_no name in %s (showing %s)":`Nessun nome in "%s" — visualizzazione di "%s"`,custom_assistant_offline:$s,custom_assistant_online:ec,custom_assistant_read:tc,"custom_assistant_recognized in %s ms":`riconosciuto in %s ms`,custom_assistant_room:nc,custom_assistant_sat_idle:rc,custom_assistant_sat_listening:ic,custom_assistant_sat_offline:ac,custom_assistant_sat_processing:oc,custom_assistant_sat_speaking:sc,custom_assistant_type:cc,"custom_assistant_waits for reply":`waits for reply`,custom_assistant_wake_word_deleted:lc,custom_assistant_wake_word_hint:uc,custom_assistant_wake_word_phrase_hint:dc,custom_assistant_wake_word_upload_hint:fc,custom_assistant_wake_word_uploaded:pc,"custom_assistant_Shipped with the adapter":`Fornite con l'adattatore`,custom_assistant_bundled_wake_word_hint:mc,custom_assistant_wake_word_installed:hc,custom_assistant_wake_word_installed_replaced:gc,custom_assistant_wake_word_installed_full:_c,custom_assistant_write:vc,"custom_assistant_Add a model":`Aggiungi un modello`,"custom_assistant_Answer time":`Tempo di risposta`,"custom_assistant_Asked / answered / handed over":`Poste / risposte / passate`,"custom_assistant_Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly":`Pone domande di prova al modello caricato nella lingua dell'assistente e in inglese: le domande sulla casa deve passarle, quelle generali risponderle correttamente`,custom_assistant_Benchmark:yc,"custom_assistant_Delete model?":`Eliminare il modello?`,custom_assistant_Details:bc,custom_assistant_Download:xc,"custom_assistant_Estimate from the model size, not measured. Use the benchmark for real numbers.":`Stima dalla dimensione del modello, non misurata. Il test fornisce valori reali.`,custom_assistant_Expected:Sc,custom_assistant_Failures:Cc,"custom_assistant_First token":`Primo token`,custom_assistant_Folder:wc,"custom_assistant_Free on the disk":`Libero sul disco`,"custom_assistant_Hugging Face links are fine, also hf:org/repo/file.gguf":`Vanno bene i link di Hugging Face, anche hf:org/repo/file.gguf`,custom_assistant_Languages:Tc,"custom_assistant_Load time":`Tempo di caricamento`,"custom_assistant_Loaded model":`Modello caricato`,custom_assistant_Model:Ec,custom_assistant_Models:Dc,"custom_assistant_No models in this folder yet. Download one below.":`Nessun modello in questa cartella. Scaricane uno qui sotto.`,"custom_assistant_Own model: link to a .gguf file":`Modello proprio: link a un file .gguf`,"custom_assistant_Questions asked / answered by the model / handed over to the next tier":`Domande poste / risposte dal modello / passate al livello successivo`,"custom_assistant_Reset statistics":`Azzera statistiche`,"custom_assistant_Save the settings to load the selected model. The instance restarts.":`Salva le impostazioni per caricare il modello scelto. L'istanza si riavvia.`,custom_assistant_Size:Oc,"custom_assistant_Start the instance to manage the local models.":`Avvia l'istanza per gestire i modelli locali.`,"custom_assistant_The active model cannot be deleted":`Il modello attivo non può essere eliminato`,'custom_assistant_The engine is not installed yet. Install it on the main tab ("Install local model").':`Il motore non è ancora installato. Installalo nella prima scheda ("Installa modello locale").`,"custom_assistant_The file %s is deleted from the disk. Its statistics stay.":`Il file %s viene eliminato dal disco. Le sue statistiche restano.`,"custom_assistant_Time until the first word: reading the question":`Tempo fino alla prima parola: lettura della domanda`,"custom_assistant_Timeouts and errors among the questions asked":`Timeout ed errori tra le domande poste`,"custom_assistant_Tokens/s":`Token/s`,custom_assistant_Use:`Usa`,custom_assistant_correct:kc,custom_assistant_downloaded:Ac,custom_assistant_downloading:jc,custom_assistant_failed:Mc,"custom_assistant_hand over":`passare`,"custom_assistant_last used":`ultimo uso`,"custom_assistant_many languages":`molte lingue`,"custom_assistant_missed hand-overs":`passaggi mancati`,"custom_assistant_needless hand-overs":`passaggi inutili`,"custom_assistant_not enough space":`spazio insufficiente`,"custom_assistant_not the language of the assistant":`non è la lingua dell'assistente`,custom_assistant_parameters:Nc,custom_assistant_speed:Pc,custom_assistant_timeouts:Fc,"custom_assistant_wrong answers":`risposte sbagliate`,"custom_assistant_very fast":`molto veloce`,custom_assistant_fast:Ic,custom_assistant_medium:Lc,custom_assistant_slow:Rc,custom_assistant_llm_benchmark:zc,"Model folder":`Cartella dei modelli`,"Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.":`Percorso assoluto, ad es. /mnt/ssd/llm. Vuoto = cartella dati dell'istanza. I modelli già scaricati altrove non vengono spostati.`,"custom_assistant_Start the instance to test the voice":`Avvia l'istanza per provare la voce`,"custom_assistant_Try this voice":`Prova questa voce`,custom_assistant_synthesis:Bc,"custom_assistant_%s answers in the journal":`%s risposte nel registro`,"custom_assistant_Request comes from":`La richiesta proviene da`,custom_assistant_Voice:Vc,"custom_assistant_Voice is off":`La voce è disattivata`,"custom_assistant_No telegram instance sends here":`Nessuna istanza di telegramma viene inviata qui`,"custom_assistant_The tab Chat of these settings":`La scheda Chat di queste impostazioni`,"custom_assistant_No smart-text2command instance chosen":`Nessuna istanza smart-text2command scelta`,"custom_assistant_%s is not running":`%s non è in esecuzione`,"custom_assistant_Local decision":`Decisione locale`,"custom_assistant_First the routines:":`Innanzitutto le routine:`,"custom_assistant_Off: everything goes to the models":`Off: tutto va ai modelli`,"custom_assistant_Built-in rules:":`Regole integrate:`,"custom_assistant_devices, timers, alarms, time, weather":`dispositivi, timer, sveglie, ora, meteo`,"custom_assistant_Devices:":`Dispositivi:`,"custom_assistant_timers, alarms, time, weather":`timer, sveglie, ora, meteo`,"custom_assistant_default model":`modello predefinito`,"custom_assistant_Model:":`Modello:`,"custom_assistant_The last step":`L'ultimo passo`,"custom_assistant_Asked before the cloud":`Chiesto prima della nuvola`,"custom_assistant_Gives up after:":`Si arrende dopo:`,custom_assistant_Off:Hc,"custom_assistant_No pi-agent instance chosen":`Nessuna istanza pi-agent scelta`,"custom_assistant_Off: answers only locally":`Spento: risponde solo localmente`,"custom_assistant_with its own model, tools and permissions":`con il proprio modello, strumenti e autorizzazioni`,"custom_assistant_Provider:":`Fornitore:`,custom_assistant_automatic:Uc,"custom_assistant_with the tools of this adapter":`con gli strumenti di questo adattatore`,"custom_assistant_as text":`come testo`,"custom_assistant_not understood":`non capito`,"custom_assistant_handed on":`passato oltre`,"custom_assistant_only if the cloud fails":`solo se il cloud fallisce`,"custom_assistant_not running":`non correre`,"custom_assistant_Install %s":`Installa %s`,"custom_assistant_Voice satellites (speech recognition and speech output)":`Satelliti vocali (riconoscimento vocale e output vocale)`,"custom_assistant_Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.":`I satelliti dell'assistente-satellite dell'adattatore funzionano sempre. Dettagli nelle schede Voce e Satelliti.`,"custom_assistant_Messages of %s come here.":`I messaggi di %s arrivano qui.`,"custom_assistant_In the settings of the telegram adapter, choose %s as the assistant instance.":`Nelle impostazioni dell'adattatore telegramma scegli %s come istanza dell'assistente.`,"custom_assistant_The tab Chat of these settings, also to try out every step.":`La scheda Chat di queste impostazioni, anche per provare ogni passaggio.`,"custom_assistant_From a script: %s, or write the question into %s.":`Da uno script: %s, oppure scrivi la domanda in %s.`,"custom_assistant_Built-in rules":`Regole integrate`,"custom_assistant_Every request goes to the models. Only the routines are still checked first.":`Ogni richiesta va ai modelli. Solo le routine vengono ancora controllate per prime.`,"custom_assistant_Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.":`Regole fisse comprendono la commutazione, l'attenuazione e lo stato di dispositivi, timer, sveglie, l'ora e il meteo - in pochi millisecondi, offline. Ciò che non capiscono va avanti.`,"custom_assistant_The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.":`L'adattatore smart-text2command impara la tua frase dagli esempi, esegue solo le azioni che hai approvato lì e ti chiede indietro quando la stanza o il dispositivo non sono chiari. Capisce il tedesco e l'inglese. I timer, gli allarmi, l'ora e il meteo rispettano le regole integrate; ciò che nessuno dei due capisce va avanti.`,"custom_assistant_smart-text2command instance":`istanza smart-text2command`,"custom_assistant_Before this, %s routines are checked (tab Commands).":`Prima di ciò, vengono controllate le routine %s (scheda Comandi).`,"custom_assistant_Routines (fixed phrases with their own actions) are set up on the tab Commands.":`Le routine (frasi fisse con le proprie azioni) sono impostate nella scheda Comandi.`,"custom_assistant_Use a local LLM":`Utilizzare un LLM locale`,"custom_assistant_The list of models needs the running instance.":`L'elenco dei modelli richiede l'istanza in esecuzione.`,"custom_assistant_Ask before the cloud":`Chiedi prima della nuvola`,"custom_assistant_Without a cloud step the local model is the last step.":`Senza un passaggio cloud, il modello locale è l'ultimo passaggio.`,"custom_assistant_Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.":`Ogni richiesta che la decisione locale non comprende va ad essa per prima. Risparmia le chiamate cloud, ma su un Raspberry Pi aggiunge 10–25 secondi.`,"custom_assistant_It only answers when the cloud fails (offline, quota).":`Risponde solo quando il cloud fallisce (offline, quota).`,"custom_assistant_Gives up after (s)":`Si arrende dopo (i)`,"custom_assistant_Download and compare models on the tab Local models.":`Scarica e confronta i modelli nella scheda Modelli locali.`,"custom_assistant_AI provider":`Fornitore di intelligenza artificiale`,"custom_assistant_Only the local steps answer; a request they do not understand gets a fixed sentence.":`Rispondono solo i passaggi locali; una richiesta che non capiscono riceve una condanna fissa.`,custom_assistant_Provider:Wc,"custom_assistant_empty = automatic":`vuoto = automatico`,"custom_assistant_Provider, model and key come from the system settings of admin (tab AI there).":`Fornitore, modello e chiave provengono dalle impostazioni di sistema dell'amministratore (scheda AI lì).`,"custom_assistant_The API key and the other details are on the tab AI.":`La chiave API e gli altri dettagli si trovano nella scheda AI.`,"custom_assistant_The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.":`L'adattatore pi-agent risponde con il proprio modello, strumenti e permessi di scrittura; ogni fonte di richiesta riceve una propria conversazione lì.`,"custom_assistant_pi-agent instance":`istanza pi-agent`,"custom_assistant_Changes take effect when the settings are saved.":`Le modifiche diventano effettive quando le impostazioni vengono salvate.`,"custom_assistant_How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.":`Come una richiesta passa attraverso l'assistente. Ogni passo risponde a ciò che capisce, il resto passa a quello successivo. Fare clic su un passaggio per configurarlo.`,'custom_assistant_Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.':`Prima di ogni passo: una parola d'ordine mette a tacere il timer che squilla, la risposta a una domanda aperta va a chi l'ha posta e la "modalità dialogo on/off" commuta il dialogo di un satellite. Una richiesta relativa ad una sceneggiatura o ad un'immagine va direttamente alla fase cloud.`,"custom_assistant_%s s on average (%s in the journal)":`%s s in media (%s nel registro)`,"custom_assistant_No ioBroker.voice instance chosen":`Nessuna istanza di ioBroker.voice scelta`,"custom_assistant_Server:":`Server:`,"custom_assistant_Reserve:":`Riserva:`,"custom_assistant_Language:":`Lingua:`,"custom_assistant_Text requests skip this step.":`Le richieste di testo saltano questo passaggio.`,"custom_assistant_Off: only text requests":`Spento: solo richieste di testo`,"custom_assistant_Voice:":`Voce:`,"custom_assistant_default voice":`voce predefinita`,"custom_assistant_Switch commands: a beep":`Comandi di commutazione: un segnale acustico`,"custom_assistant_Longest answer: %s characters":`Risposta più lunga: %s caratteri`,"custom_assistant_Long answers are not cut":`Le risposte lunghe non vengono tagliate`,"custom_assistant_Only answers to speech; text requests get text back.":`Solo risposte al parlato; le richieste di testo ricevono testo.`,"custom_assistant_Off: answers as text":`Spento: risposte come testo`,custom_assistant_speech:Gc,"custom_assistant_Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.":`Trasforma in testo ciò che viene detto ai satelliti. Ascolta anche i messaggi vocali di Telegram e la modalità dialogo della chat. Le chiavi e le altre opzioni sono nella scheda Voce.`,"custom_assistant_Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.":`Pronuncia la risposta sul satellite che ha chiesto, e anche gli annunci. Le chiavi e le altre opzioni sono nella scheda Voce.`,"custom_assistant_Follow-up questions in a conversation go straight to the cloud.":`Le domande successive in una conversazione vanno direttamente al cloud.`,"custom_assistant_What no step understands gets a fixed sentence.":`Ciò che nessun passaggio capisce riceve una frase fissa come risposta.`,custom_assistant_Music:Kc,"custom_assistant_Adapter command":`Comando dell'adattatore`},Jc=e({custom_assistant_Announcement:()=>Yc,custom_assistant_Answer:()=>Xc,custom_assistant_Benchmark:()=>nu,custom_assistant_Cancel:()=>Zc,custom_assistant_Chat:()=>Qc,custom_assistant_Close:()=>$c,custom_assistant_Context:()=>el,custom_assistant_Copied:()=>tl,custom_assistant_Copy:()=>nl,custom_assistant_Delete:()=>rl,custom_assistant_Details:()=>ru,custom_assistant_Download:()=>iu,custom_assistant_Error:()=>il,custom_assistant_Expected:()=>au,custom_assistant_Failures:()=>ou,custom_assistant_Folder:()=>`Map`,custom_assistant_Host:()=>al,custom_assistant_Languages:()=>su,custom_assistant_Model:()=>cu,custom_assistant_Models:()=>lu,custom_assistant_Music:()=>Ou,custom_assistant_Off:()=>`Uit`,custom_assistant_Provider:()=>Eu,custom_assistant_Question:()=>ol,custom_assistant_Recognized:()=>sl,custom_assistant_Record:()=>cl,custom_assistant_Request:()=>ll,custom_assistant_Room:()=>ul,custom_assistant_Routine:()=>dl,custom_assistant_Satellite:()=>fl,custom_assistant_Satellites:()=>pl,custom_assistant_Script:()=>ml,custom_assistant_Size:()=>uu,custom_assistant_Source:()=>hl,custom_assistant_Speak:()=>gl,custom_assistant_Spoken:()=>_l,custom_assistant_State:()=>vl,custom_assistant_Status:()=>yl,custom_assistant_Steps:()=>bl,custom_assistant_Stop:()=>xl,custom_assistant_Time:()=>Sl,custom_assistant_Tool:()=>Cl,custom_assistant_Upload:()=>wl,custom_assistant_Use:()=>du,custom_assistant_Voice:()=>wu,custom_assistant_auto:()=>Tl,custom_assistant_automatic:()=>Tu,custom_assistant_bundled_wake_word_hint:()=>Zl,custom_assistant_correct:()=>fu,custom_assistant_delete_wake_word_confirm:()=>El,custom_assistant_device:()=>Dl,custom_assistant_downloaded:()=>pu,custom_assistant_downloading:()=>mu,custom_assistant_failed:()=>hu,custom_assistant_fast:()=>yu,custom_assistant_filter:()=>Ol,custom_assistant_hint:()=>kl,custom_assistant_llm_benchmark:()=>Su,custom_assistant_llm_downloading:()=>Al,custom_assistant_llm_error:()=>jl,custom_assistant_llm_idle:()=>Ml,custom_assistant_llm_installing:()=>Nl,custom_assistant_llm_loading:()=>Pl,custom_assistant_llm_ready:()=>Fl,custom_assistant_medium:()=>bu,custom_assistant_offline:()=>Il,custom_assistant_online:()=>Ll,custom_assistant_parameters:()=>gu,custom_assistant_read:()=>Rl,custom_assistant_room:()=>zl,custom_assistant_sat_idle:()=>Bl,custom_assistant_sat_listening:()=>Vl,custom_assistant_sat_offline:()=>Hl,custom_assistant_sat_processing:()=>Ul,custom_assistant_sat_speaking:()=>Wl,custom_assistant_slow:()=>xu,custom_assistant_speech:()=>Du,custom_assistant_speed:()=>_u,custom_assistant_synthesis:()=>Cu,custom_assistant_timeouts:()=>vu,custom_assistant_type:()=>Gl,custom_assistant_wake_word_deleted:()=>Kl,custom_assistant_wake_word_hint:()=>ql,custom_assistant_wake_word_installed:()=>Ql,custom_assistant_wake_word_installed_full:()=>eu,custom_assistant_wake_word_installed_replaced:()=>$l,custom_assistant_wake_word_phrase_hint:()=>Jl,custom_assistant_wake_word_upload_hint:()=>Yl,custom_assistant_wake_word_uploaded:()=>Xl,custom_assistant_write:()=>tu,default:()=>ku}),Yc=`Aankondiging`,Xc=`Antwoord`,Zc=`Cancel`,Qc=`Chat`,$c=`Close`,el=`Context`,tl=`Gekopieerd`,nl=`Kopiëren`,rl=`Delete`,il=`Fout`,al=`Gastheer`,ol=`Vraag`,sl=`Herkend`,cl=`Opnemen`,ll=`Verzoek`,ul=`Room`,dl=`Routine`,fl=`Satelliet`,pl=`Satellieten`,ml=`Script`,hl=`Source`,gl=`Spreken`,_l=`Gesproken`,vl=`State`,yl=`Status`,bl=`Stappen`,xl=`Stop`,Sl=`Tijd`,Cl=`Tool`,wl=`Uploaden`,Tl=`auto`,El=`"%s" verwijderen? Het wordt niet meer aan de apparaten aangeboden; een apparaat dat het al heeft gedownload, houdt het.`,Dl=`Apparaat`,Ol=`Filter`,kl=`Schakel de optie 'Lezen' uit om een apparaat voor de assistent te verbergen, of schakel de optie 'Schrijven' uit om het apparaat alleen-lezen te houden (bijv. sloten). Apparaten zijn standaard volledig toegestaan.`,Al=`Model downloaden…`,jl=`fout`,Ml=`inactief`,Nl=`motor installeren…`,Pl=`laden…`,Fl=`klaar`,Il=`offline`,Ll=`online`,Rl=`Lezen`,zl=`Kamer`,Bl=`inactief`,Vl=`luisteren`,Hl=`offline`,Ul=`verwerking`,Wl=`spreken`,Gl=`Type`,Kl=`"%s" is verwijderd. Een apparaat dat het al heeft gedownload, houdt zijn kopie.`,ql=`Het activeringswoord draait op het apparaat. Beweeg de muis over een woord om te zien in welke talen het getraind is — de meeste alleen Engels.`,Jl=`Wat je zegt om het apparaat te wekken — zo verschijnt het in de lijst.`,Yl=`Een microWakeWord-model: het .tflite-bestand, bij voorkeur samen met de bijbehorende .json. Andere modeltypen (openWakeWord, Porcupine) kunnen zo niet worden geïnstalleerd.`,Xl=`"%s" is geüpload. Selecteer het hierboven om het te activeren — het apparaat downloadt dan het model.`,Zl=`Klik: op het apparaat laden en inschakelen — vervangt een oudere versie van hetzelfde woord`,Ql=`"%s" is ingeschakeld — het apparaat downloadt het model.`,$l=`"%s" is ingeschakeld in plaats van "%s" — het apparaat downloadt het model.`,eu=`"%s" staat nu in de lijst, maar alle plaatsen zijn bezet. Schakel eerst een ander wekwoord uit en selecteer dan "%s".`,tu=`Schrijven`,nu=`Test`,ru=`Details`,iu=`Downloaden`,au=`Verwacht`,ou=`Fouten`,su=`Talen`,cu=`Model`,lu=`Modellen`,uu=`Grootte`,du=`Gebruiken`,fu=`goed`,pu=`gedownload`,mu=`bezig met downloaden`,hu=`mislukt`,gu=`parameters`,_u=`snelheid`,vu=`time-outs`,yu=`snel`,bu=`gemiddeld`,xu=`traag`,Su=`test loopt`,Cu=`synthese`,wu=`Stem`,Tu=`automatisch`,Eu=`Aanbieder`,Du=`spraak`,Ou=`Muziek`,ku={"custom_assistant_%s of %s active":`%s of %s active`,"custom_assistant_%s s audio":`%s s audio`,"custom_assistant_(no spoken answer)":`(no spoken answer)`,"custom_assistant_A satellite that is still configured appears again when it connects.":`Een satelliet die nog geconfigureerd is, verschijnt weer zodra hij verbinding maakt.`,"custom_assistant_All sources":`All sources`,custom_assistant_Announcement:Yc,custom_assistant_Answer:Xc,"custom_assistant_Audio file":`Audiobestand`,custom_assistant_Cancel:Zc,custom_assistant_Chat:Qc,"custom_assistant_Clear chat":`Duidelijke chat`,"custom_assistant_Click for details":`Klik voor details`,custom_assistant_Close:$c,"custom_assistant_Cloud LLM":`Cloud LLM`,"custom_assistant_Collapse all":`Alles inklappen`,custom_assistant_Context:el,custom_assistant_Copied:tl,custom_assistant_Copy:nl,"custom_assistant_Copy everything as JSON":`Alles als JSON kopiëren`,custom_assistant_Delete:rl,"custom_assistant_Delete the recorded history of all sources?":`Delete the recorded history of all sources?`,"custom_assistant_Device cache cleared.":`Apparaatcache gewist.`,"custom_assistant_Device settings":`Device settings`,"custom_assistant_Dialog: everything you say becomes a question":`Dialoog: alles wat je zegt wordt een vraag, totdat je hem beëindigt`,"custom_assistant_Dialog: hearing you…":`Dialoog: hoort je …`,"custom_assistant_Dialog: listening…":`Dialoog: luistert …`,"custom_assistant_Dialog: speaking…":`Dialoog: spreekt …`,"custom_assistant_Dialog: thinking…":`Dialoog: denkt na …`,"custom_assistant_Download as JSON":`Downloaden als JSON`,"custom_assistant_End the dialog":`Dialoog beëindigen`,custom_assistant_Error:il,"custom_assistant_Expand all":`Alles uitklappen`,"custom_assistant_Follow-up":`Vervolgvraag`,"custom_assistant_Hide disabled":`Verberg uitgeschakeld`,"custom_assistant_Hide processing details":`Hide processing details`,custom_assistant_Host:al,"custom_assistant_Last seen":`Laatst gezien`,"custom_assistant_Listening…":`Luisteren…`,"custom_assistant_Loading…":`Laden…`,"custom_assistant_Local LLM":`Local LLM`,"custom_assistant_Local model":`Lokaal model`,"custom_assistant_Mic re-opened without wake word":`Mic re-opened without wake word (follow-up or question)`,"custom_assistant_Name language: %s":`Naamtaal: %s`,"custom_assistant_No answer":`Geen antwoord`,"custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.":`Geen apparaten gedetecteerd. Wijs statussen toe aan kamers en functies in ioBroker.`,"custom_assistant_No messages yet. Type a question below.":`Nog geen berichten. Typ hieronder een vraag.`,"custom_assistant_No processing steps were recorded for this request.":`Voor dit verzoek zijn geen verwerkingsstappen vastgelegd. Details worden bewaard voor de laatste 200 verzoeken.`,"custom_assistant_No satellites registered yet.":`Er zijn nog geen satellieten geregistreerd.`,"custom_assistant_Not understood":`Not understood`,"custom_assistant_Nothing recognized":`Niets herkend`,"custom_assistant_Per-device permissions":`Machtigingen per apparaat`,"custom_assistant_Play answer (backend TTS)":`Speel antwoord (backend TTS)`,"custom_assistant_Please select a .tflite model file":`Selecteer een .tflite-modelbestand`,custom_assistant_Question:ol,"custom_assistant_Read answers aloud":`Lees de antwoorden hardop voor.`,custom_assistant_Recognized:sl,custom_assistant_Record:cl,"custom_assistant_Recorded audio":`Opgenomen audio`,"custom_assistant_Refresh device cache":`Vernieuw de apparaatcache.`,"custom_assistant_Remove satellite":`Satelliet verwijderen`,"custom_assistant_Remove satellite %s and all its states?":`Satelliet %s en al zijn states verwijderen?`,"custom_assistant_Reply audio":`Audio van het antwoord`,"custom_assistant_Reply to a question":`Reply to a question`,custom_assistant_Request:ll,"custom_assistant_Request details":`Details van het verzoek`,custom_assistant_Room:ul,custom_assistant_Routine:dl,"custom_assistant_Rule-based NLU":`Rule-based NLU (local)`,custom_assistant_Satellite:fl,custom_assistant_Satellites:pl,"custom_assistant_Save the configuration (the instance will restart) before chatting.":`Sla de configuratie op (het apparaat zal opnieuw opstarten) voordat je gaat chatten.`,custom_assistant_Script:ml,"custom_assistant_Send announcement":`Aankondiging verzenden`,"custom_assistant_Settings for %s":`Settings for %s`,"custom_assistant_Show processing details":`Show processing details`,"custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.":`Shows all requests live: satellites, Telegram, scripts and this chat.`,custom_assistant_Source:hl,custom_assistant_Speak:gl,"custom_assistant_Speak on all satellites":`Communiceer via alle satellieten`,"custom_assistant_Speak the test sentence and recognize it":`Testzin uitspreken en herkennen`,"custom_assistant_Speech output":`Spraakuitvoer`,"custom_assistant_Speech recognition":`Spraakherkenning`,"custom_assistant_Speech recognition time":`Speech recognition time`,"custom_assistant_Speech synthesis":`Spraaksynthese`,custom_assistant_Spoken:_l,"custom_assistant_Start the assistant instance to chat.":`Start de assistent-instantie om te chatten.`,"custom_assistant_Start the assistant instance to load the device list.":`Start de assistent-instantie om de lijst met apparaten te laden.`,custom_assistant_State:vl,"custom_assistant_States read":`Gelezen states`,"custom_assistant_States written":`Geschreven states`,custom_assistant_Status:yl,custom_assistant_Steps:bl,custom_assistant_Stop:xl,"custom_assistant_Stop listening":`Stop met luisteren`,"custom_assistant_Stop reading answers aloud":`Stop met het hardop voorlezen van antwoorden.`,"custom_assistant_Stop word":`Stop word`,"custom_assistant_Test chat":`Testchat`,"custom_assistant_Test sentence":`Testzin`,"custom_assistant_Test voice":`Stem testen`,"custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.":`De dialoog heeft spraakherkenning nodig: schakel spraak in op het tabblad Stem.`,"custom_assistant_The instance must be running to test the voice.":`De instantie moet draaien om de stem te testen.`,"custom_assistant_The microphone could not be opened:":`De microfoon kon niet worden geopend:`,"custom_assistant_The microphone only works over https or on localhost.":`De microfoon werkt alleen via https of op localhost.`,"custom_assistant_Thinking…":`Aan het nadenken…`,"custom_assistant_This satellite exposes no settings.":`This satellite exposes no settings.`,custom_assistant_Time:Sl,custom_assistant_Tool:Cl,"custom_assistant_Tool calls":`Toolaanroepen`,"custom_assistant_Tool result":`Toolresultaat`,"custom_assistant_Tools & states":`Tools & states`,"custom_assistant_Total duration":`Totale duur`,"custom_assistant_Translate all missing (%s)":`Vertaal alle ontbrekende (%) tekens`,"custom_assistant_Translate name into %s":`Vertaal de naam naar %s`,"custom_assistant_Type a message…":`Typ een bericht…`,custom_assistant_Upload:wl,"custom_assistant_Upload own wake word":`Eigen wekwoord uploaden`,"custom_assistant_Uploaded wake word":`Geüpload wekwoord`,"custom_assistant_Wake word":`Wake word`,"custom_assistant_Wake word phrase":`Wekwoordzin`,"custom_assistant_Wake words":`Wake words`,custom_assistant_auto:Tl,"custom_assistant_change it on the Voice tab":`Wijzig dit op het tabblad 'Stem'.`,custom_assistant_delete_wake_word_confirm:El,custom_assistant_device:Dl,custom_assistant_filter:Ol,"custom_assistant_follow-up":`follow-up`,custom_assistant_hint:kl,"custom_assistant_in progress":`bezig`,custom_assistant_llm_downloading:Al,custom_assistant_llm_error:jl,custom_assistant_llm_idle:Ml,custom_assistant_llm_installing:Nl,custom_assistant_llm_loading:Pl,"custom_assistant_llm_not installed":`niet geïnstalleerd`,custom_assistant_llm_ready:Fl,"custom_assistant_made in %s ms":`gemaakt in %s ms`,"custom_assistant_no name in %s (showing %s)":`Geen naam in "%s" — "%s" wordt weergegeven`,custom_assistant_offline:Il,custom_assistant_online:Ll,custom_assistant_read:Rl,"custom_assistant_recognized in %s ms":`herkend in %s ms`,custom_assistant_room:zl,custom_assistant_sat_idle:Bl,custom_assistant_sat_listening:Vl,custom_assistant_sat_offline:Hl,custom_assistant_sat_processing:Ul,custom_assistant_sat_speaking:Wl,custom_assistant_type:Gl,"custom_assistant_waits for reply":`waits for reply`,custom_assistant_wake_word_deleted:Kl,custom_assistant_wake_word_hint:ql,custom_assistant_wake_word_phrase_hint:Jl,custom_assistant_wake_word_upload_hint:Yl,custom_assistant_wake_word_uploaded:Xl,"custom_assistant_Shipped with the adapter":`Meegeleverd met de adapter`,custom_assistant_bundled_wake_word_hint:Zl,custom_assistant_wake_word_installed:Ql,custom_assistant_wake_word_installed_replaced:$l,custom_assistant_wake_word_installed_full:eu,custom_assistant_write:tu,"custom_assistant_Add a model":`Model toevoegen`,"custom_assistant_Answer time":`Antwoordtijd`,"custom_assistant_Asked / answered / handed over":`Gevraagd / beantwoord / doorgegeven`,"custom_assistant_Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly":`Stelt het geladen model testvragen in de taal van de assistent en in het Engels: vragen over het huis moet het doorgeven, algemene correct beantwoorden`,custom_assistant_Benchmark:nu,"custom_assistant_Delete model?":`Model verwijderen?`,custom_assistant_Details:ru,custom_assistant_Download:iu,"custom_assistant_Estimate from the model size, not measured. Use the benchmark for real numbers.":`Schatting op basis van de modelgrootte, niet gemeten. De test geeft echte cijfers.`,custom_assistant_Expected:au,custom_assistant_Failures:ou,"custom_assistant_First token":`Eerste token`,custom_assistant_Folder:`Map`,"custom_assistant_Free on the disk":`Vrij op de schijf`,"custom_assistant_Hugging Face links are fine, also hf:org/repo/file.gguf":`Hugging Face-links werken, ook hf:org/repo/file.gguf`,custom_assistant_Languages:su,"custom_assistant_Load time":`Laadtijd`,"custom_assistant_Loaded model":`Geladen model`,custom_assistant_Model:cu,custom_assistant_Models:lu,"custom_assistant_No models in this folder yet. Download one below.":`Nog geen modellen in deze map. Download er hieronder een.`,"custom_assistant_Own model: link to a .gguf file":`Eigen model: link naar een .gguf-bestand`,"custom_assistant_Questions asked / answered by the model / handed over to the next tier":`Gestelde vragen / beantwoord door het model / doorgegeven aan de volgende laag`,"custom_assistant_Reset statistics":`Statistieken resetten`,"custom_assistant_Save the settings to load the selected model. The instance restarts.":`Sla de instellingen op om het gekozen model te laden. De instantie herstart.`,custom_assistant_Size:uu,"custom_assistant_Start the instance to manage the local models.":`Start de instantie om de lokale modellen te beheren.`,"custom_assistant_The active model cannot be deleted":`Het actieve model kan niet worden verwijderd`,'custom_assistant_The engine is not installed yet. Install it on the main tab ("Install local model").':`De engine is nog niet geïnstalleerd. Installeer hem op het eerste tabblad ("Lokaal model installeren").`,"custom_assistant_The file %s is deleted from the disk. Its statistics stay.":`Het bestand %s wordt van de schijf verwijderd. De statistieken blijven.`,"custom_assistant_Time until the first word: reading the question":`Tijd tot het eerste woord: het lezen van de vraag`,"custom_assistant_Timeouts and errors among the questions asked":`Time-outs en fouten bij de gestelde vragen`,"custom_assistant_Tokens/s":`Tokens/s`,custom_assistant_Use:du,custom_assistant_correct:fu,custom_assistant_downloaded:pu,custom_assistant_downloading:mu,custom_assistant_failed:hu,"custom_assistant_hand over":`doorgeven`,"custom_assistant_last used":`laatst gebruikt`,"custom_assistant_many languages":`veel talen`,"custom_assistant_missed hand-overs":`gemiste overdrachten`,"custom_assistant_needless hand-overs":`onnodige overdrachten`,"custom_assistant_not enough space":`te weinig ruimte`,"custom_assistant_not the language of the assistant":`niet de taal van de assistent`,custom_assistant_parameters:gu,custom_assistant_speed:_u,custom_assistant_timeouts:vu,"custom_assistant_wrong answers":`foute antwoorden`,"custom_assistant_very fast":`zeer snel`,custom_assistant_fast:yu,custom_assistant_medium:bu,custom_assistant_slow:xu,custom_assistant_llm_benchmark:Su,"Model folder":`Modelmap`,"Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.":`Absoluut pad, bijv. /mnt/ssd/llm. Leeg = gegevensmap van de instantie. Elders gedownloade modellen worden niet verplaatst.`,"custom_assistant_Start the instance to test the voice":`Start de instantie om de stem te testen`,"custom_assistant_Try this voice":`Deze stem proberen`,custom_assistant_synthesis:Cu,"custom_assistant_%s answers in the journal":`%s antwoorden in het logboek`,"custom_assistant_Request comes from":`Verzoek komt van`,custom_assistant_Voice:wu,"custom_assistant_Voice is off":`Stem is uitgeschakeld`,"custom_assistant_No telegram instance sends here":`Er wordt hier geen telegraminstantie verzonden`,"custom_assistant_The tab Chat of these settings":`Het tabblad Chat van deze instellingen`,"custom_assistant_No smart-text2command instance chosen":`Er is geen smart-text2command-instantie gekozen`,"custom_assistant_%s is not running":`%s is niet actief`,"custom_assistant_Local decision":`Lokaal besluit`,"custom_assistant_First the routines:":`Eerst de routines:`,"custom_assistant_Off: everything goes to the models":`Uit: alles gaat naar de modellen`,"custom_assistant_Built-in rules:":`Ingebouwde regels:`,"custom_assistant_devices, timers, alarms, time, weather":`apparaten, timers, alarmen, tijd, weer`,"custom_assistant_Devices:":`Apparaten:`,"custom_assistant_timers, alarms, time, weather":`timers, alarmen, tijd, weer`,"custom_assistant_default model":`standaardmodel`,"custom_assistant_Model:":`Model:`,"custom_assistant_The last step":`De laatste stap`,"custom_assistant_Asked before the cloud":`Gevraagd vóór de cloud`,"custom_assistant_Gives up after:":`Geeft het op na:`,custom_assistant_Off:`Uit`,"custom_assistant_No pi-agent instance chosen":`Er is geen pi-agentinstantie gekozen`,"custom_assistant_Off: answers only locally":`Uit: antwoordt alleen lokaal`,"custom_assistant_with its own model, tools and permissions":`met zijn eigen model, tools en rechten`,"custom_assistant_Provider:":`Aanbieder:`,custom_assistant_automatic:Tu,"custom_assistant_with the tools of this adapter":`met het gereedschap van deze adapter`,"custom_assistant_as text":`als tekst`,"custom_assistant_not understood":`niet begrepen`,"custom_assistant_handed on":`doorgegeven`,"custom_assistant_only if the cloud fails":`alleen als de cloud faalt`,"custom_assistant_not running":`niet actief`,"custom_assistant_Install %s":`Installeer %s`,"custom_assistant_Voice satellites (speech recognition and speech output)":`Spraaksatellieten (spraakherkenning en spraakuitvoer)`,"custom_assistant_Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.":`Satellieten van de adapter assistant-satellite werken altijd. Details op de tabbladen Stem en Satellieten.`,"custom_assistant_Messages of %s come here.":`Berichten van %s komen hier.`,"custom_assistant_In the settings of the telegram adapter, choose %s as the assistant instance.":`Kies in de instellingen van de telegramadapter %s als assistent-instantie.`,"custom_assistant_The tab Chat of these settings, also to try out every step.":`Op het tabblad Chat zijn deze instellingen te vinden, ook om elke stap uit te proberen.`,"custom_assistant_From a script: %s, or write the question into %s.":`Vanuit een script: %s, of schrijf de vraag in %s.`,"custom_assistant_Built-in rules":`Ingebouwde regels`,"custom_assistant_Every request goes to the models. Only the routines are still checked first.":`Elk verzoek gaat naar de modellen. Alleen de routines worden nog eerst gecontroleerd.`,"custom_assistant_Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.":`Vaste regels begrijpen het schakelen, dimmen en de status van apparaten, timers, alarmen, de tijd en het weer – in een paar milliseconden, offline. Wat ze niet begrijpen, gaat door.`,"custom_assistant_The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.":`De adapter smart-text2command leert uw frasering uit voorbeelden, voert alleen de acties uit die u daar hebt goedgekeurd en vraagt terug wanneer de kamer of het apparaat onduidelijk is. Het begrijpt Duits en Engels. Timers, alarmen, de tijd en het weer blijven bij de ingebouwde regels; wat geen van beiden begrijpt, gaat door.`,"custom_assistant_smart-text2command instance":`smart-text2command-instantie`,"custom_assistant_Before this, %s routines are checked (tab Commands).":`Hiervoor worden %s routines gecontroleerd (tabblad Commando's).`,"custom_assistant_Routines (fixed phrases with their own actions) are set up on the tab Commands.":`Routines (vaste zinnen met hun eigen acties) worden ingesteld op het tabblad Commando's.`,"custom_assistant_Use a local LLM":`Gebruik een lokale LLM`,"custom_assistant_The list of models needs the running instance.":`Voor de lijst met modellen is het actieve exemplaar nodig.`,"custom_assistant_Ask before the cloud":`Vraag vóór de wolk`,"custom_assistant_Without a cloud step the local model is the last step.":`Zonder cloudstap is het lokale model de laatste stap.`,"custom_assistant_Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.":`Elk verzoek dat het lokale besluit niet begrijpt, wordt als eerste behandeld. Bespaart cloudoproepen, maar op een Raspberry Pi voegt dit 10-25 seconden toe.`,"custom_assistant_It only answers when the cloud fails (offline, quota).":`Het antwoordt alleen als de cloud faalt (offline, quota).`,"custom_assistant_Gives up after (s)":`Geeft op na (s)`,"custom_assistant_Download and compare models on the tab Local models.":`Download en vergelijk modellen op het tabblad Lokale modellen.`,"custom_assistant_AI provider":`AI-aanbieder`,"custom_assistant_Only the local steps answer; a request they do not understand gets a fixed sentence.":`Alleen de lokale stappen antwoorden; een verzoek dat ze niet begrijpen, krijgt een vaste straf.`,custom_assistant_Provider:Eu,"custom_assistant_empty = automatic":`leeg = automatisch`,"custom_assistant_Provider, model and key come from the system settings of admin (tab AI there).":`Provider, model en sleutel komen uit de systeeminstellingen van admin (tabblad AI daar).`,"custom_assistant_The API key and the other details are on the tab AI.":`De API-sleutel en de overige details staan op het tabblad AI.`,"custom_assistant_The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.":`De adapter pi-agent antwoordt met zijn eigen model, tools en schrijfrechten; elke verzoekbron krijgt daar een eigen gesprek.`,"custom_assistant_pi-agent instance":`pi-agent-instantie`,"custom_assistant_Changes take effect when the settings are saved.":`Wijzigingen worden van kracht zodra de instellingen zijn opgeslagen.`,"custom_assistant_How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.":`Hoe een verzoek via de assistent verloopt. Elke stap beantwoordt wat hij begrijpt, de rest gaat door naar de volgende. Klik op een stap om deze in te stellen.`,'custom_assistant_Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.':`Vóór elke stap: een stopwoord zet een rinkelende timer stil, het antwoord op een open vraag gaat naar degene die erom vraagt, en "dialoogmodus aan/uit" schakelt de dialoog van een satelliet. Een verzoek over een script of met een afbeelding gaat rechtstreeks naar de cloudstap.`,"custom_assistant_%s s on average (%s in the journal)":`gemiddeld %s s (%s in het logboek)`,"custom_assistant_No ioBroker.voice instance chosen":`Geen ioBroker.voice-instantie gekozen`,"custom_assistant_Server:":`Server:`,"custom_assistant_Reserve:":`Reserve:`,"custom_assistant_Language:":`Taal:`,"custom_assistant_Text requests skip this step.":`Tekstverzoeken slaan deze stap over.`,"custom_assistant_Off: only text requests":`Uit: alleen tekstverzoeken`,"custom_assistant_Voice:":`Stem:`,"custom_assistant_default voice":`standaardstem`,"custom_assistant_Switch commands: a beep":`Schakelopdrachten: een piep`,"custom_assistant_Longest answer: %s characters":`Langste antwoord: %s tekens`,"custom_assistant_Long answers are not cut":`Lange antwoorden worden niet ingekort`,"custom_assistant_Only answers to speech; text requests get text back.":`Alleen antwoorden op spraak; tekstverzoeken krijgen tekst terug.`,"custom_assistant_Off: answers as text":`Uit: antwoorden als tekst`,custom_assistant_speech:Du,"custom_assistant_Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.":`Zet wat tegen de satellieten gezegd wordt om in tekst. Ze hoort ook spraakberichten uit Telegram en de dialoogmodus van de chat. Sleutels en meer opties staan op het tabblad Stem.`,"custom_assistant_Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.":`Spreekt het antwoord uit op de satelliet die vroeg, en ook de omroepen. Sleutels en meer opties staan op het tabblad Stem.`,"custom_assistant_Follow-up questions in a conversation go straight to the cloud.":`Vervolgvragen in een lopend gesprek gaan direct naar de cloud.`,"custom_assistant_What no step understands gets a fixed sentence.":`Wat geen enkele stap begrijpt, krijgt een vaste zin als antwoord.`,custom_assistant_Music:Ou,"custom_assistant_Adapter command":`Adapteropdracht`},Au=e({custom_assistant_Announcement:()=>ju,custom_assistant_Answer:()=>Mu,custom_assistant_Benchmark:()=>Ld,custom_assistant_Cancel:()=>Nu,custom_assistant_Chat:()=>Pu,custom_assistant_Close:()=>Fu,custom_assistant_Context:()=>Iu,custom_assistant_Copied:()=>Lu,custom_assistant_Copy:()=>Ru,custom_assistant_Delete:()=>zu,custom_assistant_Details:()=>Rd,custom_assistant_Download:()=>zd,custom_assistant_Error:()=>Bu,custom_assistant_Expected:()=>Bd,custom_assistant_Failures:()=>Vd,custom_assistant_Folder:()=>Hd,custom_assistant_Host:()=>Vu,custom_assistant_Languages:()=>Ud,custom_assistant_Model:()=>Wd,custom_assistant_Models:()=>Gd,custom_assistant_Music:()=>ff,custom_assistant_Off:()=>cf,custom_assistant_Provider:()=>uf,custom_assistant_Question:()=>Hu,custom_assistant_Recognized:()=>Uu,custom_assistant_Record:()=>Wu,custom_assistant_Request:()=>Gu,custom_assistant_Room:()=>Ku,custom_assistant_Routine:()=>qu,custom_assistant_Satellite:()=>Ju,custom_assistant_Satellites:()=>Yu,custom_assistant_Script:()=>Xu,custom_assistant_Size:()=>Kd,custom_assistant_Source:()=>Zu,custom_assistant_Speak:()=>Qu,custom_assistant_Spoken:()=>$u,custom_assistant_State:()=>ed,custom_assistant_Status:()=>td,custom_assistant_Steps:()=>nd,custom_assistant_Stop:()=>rd,custom_assistant_Time:()=>id,custom_assistant_Tool:()=>ad,custom_assistant_Upload:()=>od,custom_assistant_Use:()=>qd,custom_assistant_Voice:()=>sf,custom_assistant_auto:()=>sd,custom_assistant_automatic:()=>lf,custom_assistant_bundled_wake_word_hint:()=>Md,custom_assistant_correct:()=>Jd,custom_assistant_delete_wake_word_confirm:()=>cd,custom_assistant_device:()=>ld,custom_assistant_downloaded:()=>Yd,custom_assistant_downloading:()=>Xd,custom_assistant_failed:()=>Zd,custom_assistant_fast:()=>tf,custom_assistant_filter:()=>ud,custom_assistant_hint:()=>dd,custom_assistant_llm_benchmark:()=>af,custom_assistant_llm_downloading:()=>fd,custom_assistant_llm_error:()=>pd,custom_assistant_llm_idle:()=>md,custom_assistant_llm_installing:()=>hd,custom_assistant_llm_loading:()=>gd,custom_assistant_llm_ready:()=>_d,custom_assistant_medium:()=>nf,custom_assistant_offline:()=>vd,custom_assistant_online:()=>yd,custom_assistant_parameters:()=>Qd,custom_assistant_read:()=>bd,custom_assistant_room:()=>xd,custom_assistant_sat_idle:()=>Sd,custom_assistant_sat_listening:()=>Cd,custom_assistant_sat_offline:()=>wd,custom_assistant_sat_processing:()=>Td,custom_assistant_sat_speaking:()=>Ed,custom_assistant_slow:()=>rf,custom_assistant_speech:()=>df,custom_assistant_speed:()=>$d,custom_assistant_synthesis:()=>of,custom_assistant_timeouts:()=>ef,custom_assistant_type:()=>`Typ`,custom_assistant_wake_word_deleted:()=>Dd,custom_assistant_wake_word_hint:()=>Od,custom_assistant_wake_word_installed:()=>Nd,custom_assistant_wake_word_installed_full:()=>Fd,custom_assistant_wake_word_installed_replaced:()=>Pd,custom_assistant_wake_word_phrase_hint:()=>kd,custom_assistant_wake_word_upload_hint:()=>Ad,custom_assistant_wake_word_uploaded:()=>jd,custom_assistant_write:()=>Id,default:()=>pf}),ju=`Ogłoszenie`,Mu=`Odpowiedź`,Nu=`Cancel`,Pu=`Chat`,Fu=`Close`,Iu=`Kontekst`,Lu=`Skopiowano`,Ru=`Kopiuj`,zu=`Delete`,Bu=`Błąd`,Vu=`Gospodarz`,Hu=`Pytanie`,Uu=`Rozpoznano`,Wu=`Nagraj`,Gu=`Żądanie`,Ku=`Room`,qu=`Routine`,Ju=`Satelita`,Yu=`Satelity`,Xu=`Script`,Zu=`Source`,Qu=`Mówić`,$u=`Wypowiedziano`,ed=`State`,td=`Status`,nd=`Kroki`,rd=`Stop`,id=`Czas`,ad=`Narzędzie`,od=`Prześlij`,sd=`automatyczny`,cd=`Usunąć „%s”? Nie będzie już oferowane urządzeniom; urządzenie, które już je pobrało, zachowa je.`,ld=`Urządzenie`,ud=`Filtr`,dd=`Odznacz opcję „Odczyt”, aby ukryć urządzenie przed asystentem, lub odznacz opcję „Zapis”, aby zachować je tylko do odczytu (np. blokady). Domyślnie urządzenia mają pełne uprawnienia.`,fd=`pobieranie modelu…`,pd=`błąd`,md=`bezczynny`,hd=`instalowanie silnika…`,gd=`załadunek…`,_d=`gotowy`,vd=`nieaktywny`,yd=`w sieci`,bd=`Czytać`,xd=`Pokój`,Sd=`bezczynny`,Cd=`słuchający`,wd=`nieaktywny`,Td=`przetwarzanie`,Ed=`mówiąc`,Dd=`„%s” zostało usunięte. Urządzenie, które już je pobrało, zachowuje swoją kopię.`,Od=`Słowo aktywujące działa na urządzeniu. Najedź na słowo, aby zobaczyć, w jakich językach było trenowane — większość tylko po angielsku.`,kd=`To, co mówisz, aby wybudzić urządzenie — tak pojawi się na liście.`,Ad=`Model microWakeWord: plik .tflite, najlepiej razem z jego plikiem .json. Innych typów modeli (openWakeWord, Porcupine) nie można zainstalować w ten sposób.`,jd=`„%s” zostało przesłane. Wybierz je powyżej, aby je aktywować — urządzenie pobierze wtedy model.`,Md=`Kliknięcie: wgraj na urządzenie i włącz — zastępuje starszą wersję tego samego słowa`,Nd=`„%s” jest włączone — urządzenie pobiera model.`,Pd=`„%s” jest włączone zamiast „%s” — urządzenie pobiera model.`,Fd=`„%s” jest teraz na liście, ale wszystkie miejsca są zajęte. Najpierw wyłącz inne słowo wybudzające, potem wybierz „%s”.`,Id=`Pisać`,Ld=`Test`,Rd=`Szczegóły`,zd=`Pobierz`,Bd=`Oczekiwano`,Vd=`Błędy`,Hd=`Folder`,Ud=`Języki`,Wd=`Model`,Gd=`Modele`,Kd=`Rozmiar`,qd=`Użyj`,Jd=`poprawnie`,Yd=`pobrano`,Xd=`pobieranie`,Zd=`niepowodzenie`,Qd=`parametrów`,$d=`szybkość`,ef=`przekroczenia czasu`,tf=`szybko`,nf=`średnio`,rf=`wolno`,af=`test w toku`,of=`synteza`,sf=`Głos`,cf=`Wyłączony`,lf=`automatyczny`,uf=`Dostawca`,df=`mowa`,ff=`Muzyka`,pf={"custom_assistant_%s of %s active":`%s of %s active`,"custom_assistant_%s s audio":`%s s audio`,"custom_assistant_(no spoken answer)":`(no spoken answer)`,"custom_assistant_A satellite that is still configured appears again when it connects.":`Satelita, który jest nadal skonfigurowany, pojawi się ponownie po połączeniu.`,"custom_assistant_All sources":`All sources`,custom_assistant_Announcement:ju,custom_assistant_Answer:Mu,"custom_assistant_Audio file":`Plik audio`,custom_assistant_Cancel:Nu,custom_assistant_Chat:Pu,"custom_assistant_Clear chat":`Wyczyść czat`,"custom_assistant_Click for details":`Kliknij, aby zobaczyć szczegóły`,custom_assistant_Close:Fu,"custom_assistant_Cloud LLM":`Cloud LLM`,"custom_assistant_Collapse all":`Zwiń wszystko`,custom_assistant_Context:Iu,custom_assistant_Copied:Lu,custom_assistant_Copy:Ru,"custom_assistant_Copy everything as JSON":`Kopiuj wszystko jako JSON`,custom_assistant_Delete:zu,"custom_assistant_Delete the recorded history of all sources?":`Delete the recorded history of all sources?`,"custom_assistant_Device cache cleared.":`Pamięć podręczna urządzenia została wyczyszczona.`,"custom_assistant_Device settings":`Device settings`,"custom_assistant_Dialog: everything you say becomes a question":`Dialog: wszystko, co powiesz, staje się pytaniem — dopóki go nie zakończysz`,"custom_assistant_Dialog: hearing you…":`Dialog: słyszę cię …`,"custom_assistant_Dialog: listening…":`Dialog: słucham …`,"custom_assistant_Dialog: speaking…":`Dialog: mówię …`,"custom_assistant_Dialog: thinking…":`Dialog: myślę …`,"custom_assistant_Download as JSON":`Pobierz jako JSON`,"custom_assistant_End the dialog":`Zakończ dialog`,custom_assistant_Error:Bu,"custom_assistant_Expand all":`Rozwiń wszystko`,"custom_assistant_Follow-up":`Pytanie zwrotne`,"custom_assistant_Hide disabled":`Ukryj wyłączone`,"custom_assistant_Hide processing details":`Hide processing details`,custom_assistant_Host:Vu,"custom_assistant_Last seen":`Ostatnio widziany`,"custom_assistant_Listening…":`Słuchający…`,"custom_assistant_Loading…":`Ładowanie…`,"custom_assistant_Local LLM":`Local LLM`,"custom_assistant_Local model":`Model lokalny`,"custom_assistant_Mic re-opened without wake word":`Mic re-opened without wake word (follow-up or question)`,"custom_assistant_Name language: %s":`Język nazwy: %s`,"custom_assistant_No answer":`Brak odpowiedzi`,"custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.":`Nie wykryto urządzeń. Przypisz stany do pomieszczeń i funkcji w ioBroker.`,"custom_assistant_No messages yet. Type a question below.":`Brak wiadomości. Wpisz pytanie poniżej.`,"custom_assistant_No processing steps were recorded for this request.":`Dla tego żądania nie zapisano kroków przetwarzania. Szczegóły są przechowywane dla ostatnich 200 żądań.`,"custom_assistant_No satellites registered yet.":`Nie zarejestrowano jeszcze żadnych satelitów.`,"custom_assistant_Not understood":`Not understood`,"custom_assistant_Nothing recognized":`Nic nie rozpoznano`,"custom_assistant_Per-device permissions":`Uprawnienia na urządzenie`,"custom_assistant_Play answer (backend TTS)":`Odtwórz odpowiedź (TTS w tle)`,"custom_assistant_Please select a .tflite model file":`Wybierz plik modelu .tflite`,custom_assistant_Question:Hu,"custom_assistant_Read answers aloud":`Przeczytaj odpowiedzi na głos`,custom_assistant_Recognized:Uu,custom_assistant_Record:Wu,"custom_assistant_Recorded audio":`Nagrane audio`,"custom_assistant_Refresh device cache":`Odśwież pamięć podręczną urządzenia`,"custom_assistant_Remove satellite":`Usuń satelitę`,"custom_assistant_Remove satellite %s and all its states?":`Usunąć satelitę %s i wszystkie jego stany?`,"custom_assistant_Reply audio":`Audio odpowiedzi`,"custom_assistant_Reply to a question":`Reply to a question`,custom_assistant_Request:Gu,"custom_assistant_Request details":`Szczegóły żądania`,custom_assistant_Room:Ku,custom_assistant_Routine:qu,"custom_assistant_Rule-based NLU":`Rule-based NLU (local)`,custom_assistant_Satellite:Ju,custom_assistant_Satellites:Yu,"custom_assistant_Save the configuration (the instance will restart) before chatting.":`Przed rozpoczęciem czatu zapisz konfigurację (instancja zostanie uruchomiona ponownie).`,custom_assistant_Script:Xu,"custom_assistant_Send announcement":`Wyślij ogłoszenie`,"custom_assistant_Settings for %s":`Settings for %s`,"custom_assistant_Show processing details":`Show processing details`,"custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.":`Shows all requests live: satellites, Telegram, scripts and this chat.`,custom_assistant_Source:Zu,custom_assistant_Speak:Qu,"custom_assistant_Speak on all satellites":`Mów na wszystkich satelitach`,"custom_assistant_Speak the test sentence and recognize it":`Wypowiedz zdanie testowe i je rozpoznaj`,"custom_assistant_Speech output":`Synteza mowy`,"custom_assistant_Speech recognition":`Rozpoznawanie mowy`,"custom_assistant_Speech recognition time":`Speech recognition time`,"custom_assistant_Speech synthesis":`Synteza mowy`,custom_assistant_Spoken:$u,"custom_assistant_Start the assistant instance to chat.":`Uruchom asystenta, aby rozpocząć rozmowę.`,"custom_assistant_Start the assistant instance to load the device list.":`Uruchom instancję asystenta, aby załadować listę urządzeń.`,custom_assistant_State:ed,"custom_assistant_States read":`Odczytane stany`,"custom_assistant_States written":`Zapisane stany`,custom_assistant_Status:td,custom_assistant_Steps:nd,custom_assistant_Stop:rd,"custom_assistant_Stop listening":`Przestań słuchać`,"custom_assistant_Stop reading answers aloud":`Przestań czytać odpowiedzi na głos`,"custom_assistant_Stop word":`Stop word`,"custom_assistant_Test chat":`Czat testowy`,"custom_assistant_Test sentence":`Zdanie testowe`,"custom_assistant_Test voice":`Testuj głos`,"custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.":`Dialog wymaga rozpoznawania mowy: włącz głos na karcie Głos.`,"custom_assistant_The instance must be running to test the voice.":`Aby przetestować głos, instancja musi działać.`,"custom_assistant_The microphone could not be opened:":`Nie udało się otworzyć mikrofonu:`,"custom_assistant_The microphone only works over https or on localhost.":`Mikrofon działa tylko przez https lub na localhost.`,"custom_assistant_Thinking…":`Myślący…`,"custom_assistant_This satellite exposes no settings.":`This satellite exposes no settings.`,custom_assistant_Time:id,custom_assistant_Tool:ad,"custom_assistant_Tool calls":`Wywołania narzędzi`,"custom_assistant_Tool result":`Wynik narzędzia`,"custom_assistant_Tools & states":`Narzędzia i stany`,"custom_assistant_Total duration":`Całkowity czas`,"custom_assistant_Translate all missing (%s)":`Przetłumacz wszystkie brakujące (%s)`,"custom_assistant_Translate name into %s":`Przetłumacz nazwę na %s`,"custom_assistant_Type a message…":`Wpisz wiadomość…`,custom_assistant_Upload:od,"custom_assistant_Upload own wake word":`Prześlij własne słowo wybudzające`,"custom_assistant_Uploaded wake word":`Przesłane słowo wybudzające`,"custom_assistant_Wake word":`Wake word`,"custom_assistant_Wake word phrase":`Fraza wybudzająca`,"custom_assistant_Wake words":`Wake words`,custom_assistant_auto:sd,"custom_assistant_change it on the Voice tab":`zmień to na karcie Głos`,custom_assistant_delete_wake_word_confirm:cd,custom_assistant_device:ld,custom_assistant_filter:ud,"custom_assistant_follow-up":`follow-up`,custom_assistant_hint:dd,"custom_assistant_in progress":`w toku`,custom_assistant_llm_downloading:fd,custom_assistant_llm_error:pd,custom_assistant_llm_idle:md,custom_assistant_llm_installing:hd,custom_assistant_llm_loading:gd,"custom_assistant_llm_not installed":`nie zainstalowano`,custom_assistant_llm_ready:_d,"custom_assistant_made in %s ms":`wygenerowano w %s ms`,"custom_assistant_no name in %s (showing %s)":`Brak nazwy w "%s" — wyświetlanie "%s"`,custom_assistant_offline:vd,custom_assistant_online:yd,custom_assistant_read:bd,"custom_assistant_recognized in %s ms":`rozpoznano w %s ms`,custom_assistant_room:xd,custom_assistant_sat_idle:Sd,custom_assistant_sat_listening:Cd,custom_assistant_sat_offline:wd,custom_assistant_sat_processing:Td,custom_assistant_sat_speaking:Ed,custom_assistant_type:`Typ`,"custom_assistant_waits for reply":`waits for reply`,custom_assistant_wake_word_deleted:Dd,custom_assistant_wake_word_hint:Od,custom_assistant_wake_word_phrase_hint:kd,custom_assistant_wake_word_upload_hint:Ad,custom_assistant_wake_word_uploaded:jd,"custom_assistant_Shipped with the adapter":`Dostarczone z adapterem`,custom_assistant_bundled_wake_word_hint:Md,custom_assistant_wake_word_installed:Nd,custom_assistant_wake_word_installed_replaced:Pd,custom_assistant_wake_word_installed_full:Fd,custom_assistant_write:Id,"custom_assistant_Add a model":`Dodaj model`,"custom_assistant_Answer time":`Czas odpowiedzi`,"custom_assistant_Asked / answered / handed over":`Zadane / odpowiedziane / przekazane`,"custom_assistant_Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly":`Zadaje załadowanemu modelowi pytania testowe w języku asystenta i po angielsku: pytania o dom musi przekazać dalej, ogólne poprawnie odpowiedzieć`,custom_assistant_Benchmark:Ld,"custom_assistant_Delete model?":`Usunąć model?`,custom_assistant_Details:Rd,custom_assistant_Download:zd,"custom_assistant_Estimate from the model size, not measured. Use the benchmark for real numbers.":`Szacunek na podstawie rozmiaru modelu, nie pomiar. Prawdziwe wartości daje test.`,custom_assistant_Expected:Bd,custom_assistant_Failures:Vd,"custom_assistant_First token":`Pierwszy token`,custom_assistant_Folder:Hd,"custom_assistant_Free on the disk":`Wolne na dysku`,"custom_assistant_Hugging Face links are fine, also hf:org/repo/file.gguf":`Linki Hugging Face są w porządku, także hf:org/repo/file.gguf`,custom_assistant_Languages:Ud,"custom_assistant_Load time":`Czas ładowania`,"custom_assistant_Loaded model":`Załadowany model`,custom_assistant_Model:Wd,custom_assistant_Models:Gd,"custom_assistant_No models in this folder yet. Download one below.":`W tym folderze nie ma jeszcze modeli. Pobierz model poniżej.`,"custom_assistant_Own model: link to a .gguf file":`Własny model: link do pliku .gguf`,"custom_assistant_Questions asked / answered by the model / handed over to the next tier":`Zadane pytania / odpowiedziane przez model / przekazane do następnego poziomu`,"custom_assistant_Reset statistics":`Resetuj statystyki`,"custom_assistant_Save the settings to load the selected model. The instance restarts.":`Zapisz ustawienia, aby załadować wybrany model. Instancja uruchomi się ponownie.`,custom_assistant_Size:Kd,"custom_assistant_Start the instance to manage the local models.":`Uruchom instancję, aby zarządzać modelami lokalnymi.`,"custom_assistant_The active model cannot be deleted":`Aktywnego modelu nie można usunąć`,'custom_assistant_The engine is not installed yet. Install it on the main tab ("Install local model").':`Silnik nie jest jeszcze zainstalowany. Zainstaluj go na pierwszej karcie („Zainstaluj model lokalny”).`,"custom_assistant_The file %s is deleted from the disk. Its statistics stay.":`Plik %s zostanie usunięty z dysku. Jego statystyki zostaną.`,"custom_assistant_Time until the first word: reading the question":`Czas do pierwszego słowa: czytanie pytania`,"custom_assistant_Timeouts and errors among the questions asked":`Przekroczenia czasu i błędy wśród zadanych pytań`,"custom_assistant_Tokens/s":`Tokeny/s`,custom_assistant_Use:qd,custom_assistant_correct:Jd,custom_assistant_downloaded:Yd,custom_assistant_downloading:Xd,custom_assistant_failed:Zd,"custom_assistant_hand over":`przekazać`,"custom_assistant_last used":`ostatnio użyto`,"custom_assistant_many languages":`wiele języków`,"custom_assistant_missed hand-overs":`pominięte przekazania`,"custom_assistant_needless hand-overs":`zbędne przekazania`,"custom_assistant_not enough space":`za mało miejsca`,"custom_assistant_not the language of the assistant":`to nie język asystenta`,custom_assistant_parameters:Qd,custom_assistant_speed:$d,custom_assistant_timeouts:ef,"custom_assistant_wrong answers":`błędne odpowiedzi`,"custom_assistant_very fast":`bardzo szybko`,custom_assistant_fast:tf,custom_assistant_medium:nf,custom_assistant_slow:rf,custom_assistant_llm_benchmark:af,"Model folder":`Folder modeli`,"Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.":`Ścieżka bezwzględna, np. /mnt/ssd/llm. Puste = folder danych instancji. Modele pobrane już gdzie indziej nie są przenoszone.`,"custom_assistant_Start the instance to test the voice":`Uruchom instancję, aby przetestować głos`,"custom_assistant_Try this voice":`Wypróbuj ten głos`,custom_assistant_synthesis:of,"custom_assistant_%s answers in the journal":`%s odpowiedzi w dzienniku`,"custom_assistant_Request comes from":`Zapytanie pochodzi z`,custom_assistant_Voice:sf,"custom_assistant_Voice is off":`Głos jest wyłączony`,"custom_assistant_No telegram instance sends here":`Żadna instancja telegramu nie jest tutaj wysyłana`,"custom_assistant_The tab Chat of these settings":`Zakładka Czat tych ustawień`,"custom_assistant_No smart-text2command instance chosen":`Nie wybrano instancji smart-text2command`,"custom_assistant_%s is not running":`%s nie jest uruchomiony`,"custom_assistant_Local decision":`Decyzja lokalna`,"custom_assistant_First the routines:":`Najpierw procedury:`,"custom_assistant_Off: everything goes to the models":`Wyłączone: wszystko trafia do modeli`,"custom_assistant_Built-in rules:":`Wbudowane reguły:`,"custom_assistant_devices, timers, alarms, time, weather":`urządzenia, timery, alarmy, czas, pogoda`,"custom_assistant_Devices:":`Urządzenia:`,"custom_assistant_timers, alarms, time, weather":`timery, alarmy, czas, pogoda`,"custom_assistant_default model":`domyślny model`,"custom_assistant_Model:":`Model:`,"custom_assistant_The last step":`Ostatni krok`,"custom_assistant_Asked before the cloud":`Zapytany przed chmurą`,"custom_assistant_Gives up after:":`Poddaje się po:`,custom_assistant_Off:cf,"custom_assistant_No pi-agent instance chosen":`Nie wybrano instancji pi-agent`,"custom_assistant_Off: answers only locally":`Wył.: odpowiada tylko lokalnie`,"custom_assistant_with its own model, tools and permissions":`z własnym modelem, narzędziami i uprawnieniami`,"custom_assistant_Provider:":`Dostawca:`,custom_assistant_automatic:lf,"custom_assistant_with the tools of this adapter":`z narzędziami tego adaptera`,"custom_assistant_as text":`jako tekst`,"custom_assistant_not understood":`nie zrozumiałem`,"custom_assistant_handed on":`przekazany`,"custom_assistant_only if the cloud fails":`tylko w przypadku awarii chmury`,"custom_assistant_not running":`nie biegam`,"custom_assistant_Install %s":`Zainstaluj %s`,"custom_assistant_Voice satellites (speech recognition and speech output)":`Satelity głosowe (rozpoznawanie mowy i generowanie mowy)`,"custom_assistant_Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.":`Satelity asystenta-satelity adaptera zawsze działają. Szczegóły w zakładkach Głos i Satelity.`,"custom_assistant_Messages of %s come here.":`Tutaj przychodzą wiadomości od %s.`,"custom_assistant_In the settings of the telegram adapter, choose %s as the assistant instance.":`W ustawieniach adaptera telegramu wybierz %s jako instancję asystenta.`,"custom_assistant_The tab Chat of these settings, also to try out every step.":`Zakładka Czat z tymi ustawieniami, także do wypróbowania każdego kroku.`,"custom_assistant_From a script: %s, or write the question into %s.":`Ze skryptu: %s lub wpisz pytanie w %s.`,"custom_assistant_Built-in rules":`Wbudowane reguły`,"custom_assistant_Every request goes to the models. Only the routines are still checked first.":`Każde zapytanie trafia do modeli. Najpierw sprawdzane są tylko rutyny.`,"custom_assistant_Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.":`Stałe reguły rozumieją włączanie, ściemnianie i stan urządzeń, minutniki, budziki, godzinę i pogodę — w kilka milisekund, offline. Czego nie rozumieją, idzie dalej.`,"custom_assistant_The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.":`Adapter smart-text2command uczy się waszych sformułowań z przykładów, wykonuje tylko zatwierdzone w nim akcje i dopytuje, gdy pomieszczenie lub urządzenie jest niejasne. Rozumie niemiecki i angielski. Minutniki, budziki, godzina i pogoda zostają przy wbudowanych regułach; czego nie rozumie żaden z nich, idzie dalej.`,"custom_assistant_smart-text2command instance":`Instancja smart-text2command`,"custom_assistant_Before this, %s routines are checked (tab Commands).":`Wcześniej sprawdzane są rutyny: %s (karta Polecenia).`,"custom_assistant_Routines (fixed phrases with their own actions) are set up on the tab Commands.":`Rutyny (stałe zwroty z własnymi akcjami) ustawia się na karcie Polecenia.`,"custom_assistant_Use a local LLM":`Używaj lokalnego LLM`,"custom_assistant_The list of models needs the running instance.":`Lista modeli wymaga działającej instancji.`,"custom_assistant_Ask before the cloud":`Pytaj przed chmurą`,"custom_assistant_Without a cloud step the local model is the last step.":`Bez kroku w chmurze lokalny model jest ostatnim krokiem.`,"custom_assistant_Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.":`Każde zapytanie, którego nie zrozumiała lokalna decyzja, trafia najpierw do niego. Oszczędza wywołania chmury, ale na Raspberry Pi dodaje 10–25 sekund.`,"custom_assistant_It only answers when the cloud fails (offline, quota).":`Odpowiada tylko wtedy, gdy chmura zawiedzie (offline, limit).`,"custom_assistant_Gives up after (s)":`Poddaje się po (s)`,"custom_assistant_Download and compare models on the tab Local models.":`Modele pobiera się i porównuje na karcie Modele lokalne.`,"custom_assistant_AI provider":`Dostawca AI`,"custom_assistant_Only the local steps answer; a request they do not understand gets a fixed sentence.":`Odpowiadają tylko kroki lokalne; zapytanie, którego nie rozumieją, dostaje stałe zdanie.`,custom_assistant_Provider:uf,"custom_assistant_empty = automatic":`puste = automatycznie`,"custom_assistant_Provider, model and key come from the system settings of admin (tab AI there).":`Dostawca, model i klucz pochodzą z ustawień systemowych admina (tam karta AI).`,"custom_assistant_The API key and the other details are on the tab AI.":`Klucz API i pozostałe szczegóły są na karcie AI.`,"custom_assistant_The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.":`Adapter pi-agent odpowiada własnym modelem, narzędziami i uprawnieniami zapisu; każde źródło zapytań ma tam własną rozmowę.`,"custom_assistant_pi-agent instance":`Instancja pi-agent`,"custom_assistant_Changes take effect when the settings are saved.":`Zmiany działają po zapisaniu ustawień.`,"custom_assistant_How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.":`Jak zapytanie przechodzi przez asystenta. Każdy krok odpowiada na to, co rozumie, reszta idzie do następnego. Kliknij krok, aby go ustawić.`,'custom_assistant_Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.':`Przed wszystkimi krokami: słowo stop wycisza dzwoniący minutnik, odpowiedź na otwarte pytanie trafia do pytającego, a „tryb dialogu wł./wył.” przełącza dialog satelity. Zapytanie o skrypt lub ze zdjęciem trafia od razu do kroku chmury.`,"custom_assistant_%s s on average (%s in the journal)":`średnio %s s (%s w dzienniku)`,"custom_assistant_No ioBroker.voice instance chosen":`Nie wybrano instancji ioBroker.voice`,"custom_assistant_Server:":`Serwer:`,"custom_assistant_Reserve:":`Rezerwa:`,"custom_assistant_Language:":`Język:`,"custom_assistant_Text requests skip this step.":`Zapytania tekstowe pomijają ten krok.`,"custom_assistant_Off: only text requests":`Wył.: tylko zapytania tekstowe`,"custom_assistant_Voice:":`Głos:`,"custom_assistant_default voice":`głos domyślny`,"custom_assistant_Switch commands: a beep":`Polecenia przełączania: sygnał dźwiękowy`,"custom_assistant_Longest answer: %s characters":`Najdłuższa odpowiedź: %s znaków`,"custom_assistant_Long answers are not cut":`Długie odpowiedzi nie są skracane`,"custom_assistant_Only answers to speech; text requests get text back.":`Tylko odpowiedzi na mowę; zapytania tekstowe dostają tekst.`,"custom_assistant_Off: answers as text":`Wył.: odpowiedzi jako tekst`,custom_assistant_speech:df,"custom_assistant_Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.":`Zamienia mowę skierowaną do satelitów na tekst. Słucha też wiadomości głosowych z Telegrama i trybu dialogu w czacie. Klucze i dalsze opcje są na karcie Głos.`,"custom_assistant_Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.":`Wypowiada odpowiedź na satelicie, który zapytał, a także komunikaty. Klucze i dalsze opcje są na karcie Głos.`,"custom_assistant_Follow-up questions in a conversation go straight to the cloud.":`Pytania uzupełniające w trwającej rozmowie trafiają od razu do chmury.`,"custom_assistant_What no step understands gets a fixed sentence.":`Na to, czego nie rozumie żaden krok, przychodzi stałe zdanie.`,custom_assistant_Music:ff,"custom_assistant_Adapter command":`Polecenie adaptera`},mf=e({custom_assistant_Announcement:()=>hf,custom_assistant_Answer:()=>gf,custom_assistant_Benchmark:()=>xp,custom_assistant_Cancel:()=>_f,custom_assistant_Chat:()=>vf,custom_assistant_Close:()=>yf,custom_assistant_Context:()=>bf,custom_assistant_Copied:()=>xf,custom_assistant_Copy:()=>Sf,custom_assistant_Delete:()=>Cf,custom_assistant_Details:()=>Sp,custom_assistant_Download:()=>Cp,custom_assistant_Error:()=>wf,custom_assistant_Expected:()=>wp,custom_assistant_Failures:()=>Tp,custom_assistant_Folder:()=>Ep,custom_assistant_Host:()=>Tf,custom_assistant_Languages:()=>Dp,custom_assistant_Model:()=>Op,custom_assistant_Models:()=>kp,custom_assistant_Music:()=>Jp,custom_assistant_Off:()=>Wp,custom_assistant_Provider:()=>Kp,custom_assistant_Question:()=>Ef,custom_assistant_Recognized:()=>Df,custom_assistant_Record:()=>Of,custom_assistant_Request:()=>kf,custom_assistant_Room:()=>Af,custom_assistant_Routine:()=>jf,custom_assistant_Satellite:()=>Mf,custom_assistant_Satellites:()=>Nf,custom_assistant_Script:()=>Pf,custom_assistant_Size:()=>Ap,custom_assistant_Source:()=>Ff,custom_assistant_Speak:()=>If,custom_assistant_Spoken:()=>Lf,custom_assistant_State:()=>Rf,custom_assistant_Status:()=>zf,custom_assistant_Steps:()=>Bf,custom_assistant_Stop:()=>Vf,custom_assistant_Time:()=>Hf,custom_assistant_Tool:()=>Uf,custom_assistant_Upload:()=>Wf,custom_assistant_Use:()=>jp,custom_assistant_Voice:()=>`Voz`,custom_assistant_auto:()=>Gf,custom_assistant_automatic:()=>Gp,custom_assistant_bundled_wake_word_hint:()=>gp,custom_assistant_correct:()=>Mp,custom_assistant_delete_wake_word_confirm:()=>Kf,custom_assistant_device:()=>qf,custom_assistant_downloaded:()=>Np,custom_assistant_downloading:()=>Pp,custom_assistant_failed:()=>Fp,custom_assistant_fast:()=>zp,custom_assistant_filter:()=>Jf,custom_assistant_hint:()=>Yf,custom_assistant_llm_benchmark:()=>Hp,custom_assistant_llm_downloading:()=>Xf,custom_assistant_llm_error:()=>Zf,custom_assistant_llm_idle:()=>Qf,custom_assistant_llm_installing:()=>$f,custom_assistant_llm_loading:()=>ep,custom_assistant_llm_ready:()=>tp,custom_assistant_medium:()=>Bp,custom_assistant_offline:()=>np,custom_assistant_online:()=>rp,custom_assistant_parameters:()=>Ip,custom_assistant_read:()=>`Ler`,custom_assistant_room:()=>ip,custom_assistant_sat_idle:()=>ap,custom_assistant_sat_listening:()=>op,custom_assistant_sat_offline:()=>sp,custom_assistant_sat_processing:()=>cp,custom_assistant_sat_speaking:()=>lp,custom_assistant_slow:()=>Vp,custom_assistant_speech:()=>qp,custom_assistant_speed:()=>Lp,custom_assistant_synthesis:()=>Up,custom_assistant_timeouts:()=>Rp,custom_assistant_type:()=>up,custom_assistant_wake_word_deleted:()=>dp,custom_assistant_wake_word_hint:()=>fp,custom_assistant_wake_word_installed:()=>_p,custom_assistant_wake_word_installed_full:()=>yp,custom_assistant_wake_word_installed_replaced:()=>vp,custom_assistant_wake_word_phrase_hint:()=>pp,custom_assistant_wake_word_upload_hint:()=>mp,custom_assistant_wake_word_uploaded:()=>hp,custom_assistant_write:()=>bp,default:()=>Yp}),hf=`Anúncio`,gf=`Resposta`,_f=`Cancel`,vf=`Chat`,yf=`Close`,bf=`Contexto`,xf=`Copiado`,Sf=`Copiar`,Cf=`Delete`,wf=`Erro`,Tf=`Hospedar`,Ef=`Pergunta`,Df=`Reconhecido`,Of=`Gravar`,kf=`Pedido`,Af=`Room`,jf=`Routine`,Mf=`Satélite`,Nf=`Satélites`,Pf=`Script`,Ff=`Source`,If=`Falar`,Lf=`Falado`,Rf=`State`,zf=`Status`,Bf=`Passos`,Vf=`Parar`,Hf=`Hora`,Uf=`Ferramenta`,Wf=`Carregar`,Gf=`auto`,Kf=`Eliminar "%s"? Deixará de ser oferecido aos dispositivos; um dispositivo que já o transferiu mantém-no.`,qf=`Dispositivo`,Jf=`Filtro`,Yf=`Desmarque a opção "Ler" para ocultar um dispositivo do assistente ou desmarque a opção "Gravar" para mantê-lo somente leitura (por exemplo, fechaduras). Os dispositivos são configurados por padrão para permitir totalmente o acesso.`,Xf=`baixando modelo…`,Zf=`erro`,Qf=`parado`,$f=`Instalando o motor…`,ep=`carregando…`,tp=`preparar`,np=`offline`,rp=`on-line`,ip=`Sala`,ap=`parado`,op=`audição`,sp=`offline`,cp=`processamento`,lp=`Falando`,up=`Tipo`,dp=`"%s" foi eliminado. Um dispositivo que já o transferiu mantém a sua cópia.`,fp=`A palavra de ativação é processada no dispositivo. Passe o mouse sobre uma palavra para ver em quais idiomas ela foi treinada — a maioria apenas em inglês.`,pp=`O que diz para acordar o dispositivo — é assim que aparece na lista.`,mp=`Um modelo microWakeWord: o ficheiro .tflite, de preferência com o respetivo .json. Outros tipos de modelo (openWakeWord, Porcupine) não podem ser instalados desta forma.`,hp=`"%s" foi carregado. Selecione-o acima para o ativar — o dispositivo transfere então o modelo.`,gp=`Clique: carregar no dispositivo e ativar — substitui uma versão anterior da mesma palavra`,_p=`"%s" está ativada — o dispositivo descarrega o modelo.`,vp=`"%s" está ativada em vez de "%s" — o dispositivo descarrega o modelo.`,yp=`"%s" já está na lista, mas todas as posições estão ocupadas. Desative primeiro outra palavra de ativação e depois selecione "%s".`,bp=`Escrever`,xp=`Teste`,Sp=`Detalhes`,Cp=`Baixar`,wp=`Esperado`,Tp=`Falhas`,Ep=`Pasta`,Dp=`Idiomas`,Op=`Modelo`,kp=`Modelos`,Ap=`Tamanho`,jp=`Usar`,Mp=`corretas`,Np=`baixado`,Pp=`baixando`,Fp=`falhou`,Ip=`parâmetros`,Lp=`velocidade`,Rp=`tempos esgotados`,zp=`rápido`,Bp=`média`,Vp=`lento`,Hp=`testando`,Up=`síntese`,Wp=`Desligado`,Gp=`automático`,Kp=`Fornecedor`,qp=`fala`,Jp=`Música`,Yp={"custom_assistant_%s of %s active":`%s of %s active`,"custom_assistant_%s s audio":`%s s de áudio`,"custom_assistant_(no spoken answer)":`(no spoken answer)`,"custom_assistant_A satellite that is still configured appears again when it connects.":`Um satélite que ainda está configurado reaparece quando se conecta.`,"custom_assistant_All sources":`All sources`,custom_assistant_Announcement:hf,custom_assistant_Answer:gf,"custom_assistant_Audio file":`Ficheiro de áudio`,custom_assistant_Cancel:_f,custom_assistant_Chat:vf,"custom_assistant_Clear chat":`Chat limpo`,"custom_assistant_Click for details":`Clique para ver detalhes`,custom_assistant_Close:yf,"custom_assistant_Cloud LLM":`Cloud LLM`,"custom_assistant_Collapse all":`Recolher tudo`,custom_assistant_Context:bf,custom_assistant_Copied:xf,custom_assistant_Copy:Sf,"custom_assistant_Copy everything as JSON":`Copiar tudo como JSON`,custom_assistant_Delete:Cf,"custom_assistant_Delete the recorded history of all sources?":`Delete the recorded history of all sources?`,"custom_assistant_Device cache cleared.":`Cache do dispositivo limpo.`,"custom_assistant_Device settings":`Device settings`,"custom_assistant_Dialog: everything you say becomes a question":`Diálogo: tudo o que disseres torna-se uma pergunta, até o terminares`,"custom_assistant_Dialog: hearing you…":`Diálogo: estou a ouvir-te …`,"custom_assistant_Dialog: listening…":`Diálogo: a ouvir …`,"custom_assistant_Dialog: speaking…":`Diálogo: a falar …`,"custom_assistant_Dialog: thinking…":`Diálogo: a pensar …`,"custom_assistant_Download as JSON":`Transferir como JSON`,"custom_assistant_End the dialog":`Terminar o diálogo`,custom_assistant_Error:wf,"custom_assistant_Expand all":`Expandir tudo`,"custom_assistant_Follow-up":`Seguimento`,"custom_assistant_Hide disabled":`Ocultar desativado`,"custom_assistant_Hide processing details":`Hide processing details`,custom_assistant_Host:Tf,"custom_assistant_Last seen":`Última vez visto`,"custom_assistant_Listening…":`Audição…`,"custom_assistant_Loading…":`A carregar…`,"custom_assistant_Local LLM":`Local LLM`,"custom_assistant_Local model":`Modelo local`,"custom_assistant_Mic re-opened without wake word":`Mic re-opened without wake word (follow-up or question)`,"custom_assistant_Name language: %s":`Idioma do nome: %s`,"custom_assistant_No answer":`Sem resposta`,"custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.":`Nenhum dispositivo detectado. Atribua estados a salas e funções no ioBroker.`,"custom_assistant_No messages yet. Type a question below.":`Ainda não há mensagens. Digite sua pergunta abaixo.`,"custom_assistant_No processing steps were recorded for this request.":`Não foram registados passos de processamento para este pedido. Os detalhes são guardados para os últimos 200 pedidos.`,"custom_assistant_No satellites registered yet.":`Nenhum satélite registrado ainda.`,"custom_assistant_Not understood":`Not understood`,"custom_assistant_Nothing recognized":`Nada reconhecido`,"custom_assistant_Per-device permissions":`Permissões por dispositivo`,"custom_assistant_Play answer (backend TTS)":`Reproduzir resposta (TTS em segundo plano)`,"custom_assistant_Please select a .tflite model file":`Selecione um ficheiro de modelo .tflite`,custom_assistant_Question:Ef,"custom_assistant_Read answers aloud":`Leia as respostas em voz alta.`,custom_assistant_Recognized:Df,custom_assistant_Record:Of,"custom_assistant_Recorded audio":`Áudio gravado`,"custom_assistant_Refresh device cache":`Atualizar cache do dispositivo`,"custom_assistant_Remove satellite":`Remover satélite`,"custom_assistant_Remove satellite %s and all its states?":`Remover o satélite %s e todos os seus estados?`,"custom_assistant_Reply audio":`Áudio da resposta`,"custom_assistant_Reply to a question":`Reply to a question`,custom_assistant_Request:kf,"custom_assistant_Request details":`Detalhes do pedido`,custom_assistant_Room:Af,custom_assistant_Routine:jf,"custom_assistant_Rule-based NLU":`Rule-based NLU (local)`,custom_assistant_Satellite:Mf,custom_assistant_Satellites:Nf,"custom_assistant_Save the configuration (the instance will restart) before chatting.":`Salve a configuração (a instância será reiniciada) antes de iniciar o chat.`,custom_assistant_Script:Pf,"custom_assistant_Send announcement":`Enviar anúncio`,"custom_assistant_Settings for %s":`Settings for %s`,"custom_assistant_Show processing details":`Show processing details`,"custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.":`Shows all requests live: satellites, Telegram, scripts and this chat.`,custom_assistant_Source:Ff,custom_assistant_Speak:If,"custom_assistant_Speak on all satellites":`Fale em todos os satélites`,"custom_assistant_Speak the test sentence and recognize it":`Falar a frase de teste e reconhecê-la`,"custom_assistant_Speech output":`Saída de voz`,"custom_assistant_Speech recognition":`Reconhecimento de voz`,"custom_assistant_Speech recognition time":`Speech recognition time`,"custom_assistant_Speech synthesis":`Síntese de voz`,custom_assistant_Spoken:Lf,"custom_assistant_Start the assistant instance to chat.":`Inicie a instância do assistente para conversar.`,"custom_assistant_Start the assistant instance to load the device list.":`Inicie a instância do assistente para carregar a lista de dispositivos.`,custom_assistant_State:Rf,"custom_assistant_States read":`Estados lidos`,"custom_assistant_States written":`Estados escritos`,custom_assistant_Status:zf,custom_assistant_Steps:Bf,custom_assistant_Stop:Vf,"custom_assistant_Stop listening":`Pare de ouvir`,"custom_assistant_Stop reading answers aloud":`Pare de ler as respostas em voz alta.`,"custom_assistant_Stop word":`Stop word`,"custom_assistant_Test chat":`Chat de teste`,"custom_assistant_Test sentence":`Frase de teste`,"custom_assistant_Test voice":`Testar voz`,"custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.":`O diálogo precisa de reconhecimento de voz: ativa a voz no separador Voz.`,"custom_assistant_The instance must be running to test the voice.":`A instância tem de estar em execução para testar a voz.`,"custom_assistant_The microphone could not be opened:":`Não foi possível abrir o microfone:`,"custom_assistant_The microphone only works over https or on localhost.":`O microfone só funciona via https ou em localhost.`,"custom_assistant_Thinking…":`Pensamento…`,"custom_assistant_This satellite exposes no settings.":`This satellite exposes no settings.`,custom_assistant_Time:Hf,custom_assistant_Tool:Uf,"custom_assistant_Tool calls":`Chamadas de ferramentas`,"custom_assistant_Tool result":`Resultado da ferramenta`,"custom_assistant_Tools & states":`Ferramentas e estados`,"custom_assistant_Total duration":`Duração total`,"custom_assistant_Translate all missing (%s)":`Traduzir todos os (%s) ausentes`,"custom_assistant_Translate name into %s":`Traduzir nome para %s`,"custom_assistant_Type a message…":`Digite uma mensagem…`,custom_assistant_Upload:Wf,"custom_assistant_Upload own wake word":`Carregar palavra de ativação própria`,"custom_assistant_Uploaded wake word":`Palavra de ativação carregada`,"custom_assistant_Wake word":`Wake word`,"custom_assistant_Wake word phrase":`Frase de ativação`,"custom_assistant_Wake words":`Wake words`,custom_assistant_auto:Gf,"custom_assistant_change it on the Voice tab":`Altere isso na guia Voz.`,custom_assistant_delete_wake_word_confirm:Kf,custom_assistant_device:qf,custom_assistant_filter:Jf,"custom_assistant_follow-up":`follow-up`,custom_assistant_hint:Yf,"custom_assistant_in progress":`em curso`,custom_assistant_llm_downloading:Xf,custom_assistant_llm_error:Zf,custom_assistant_llm_idle:Qf,custom_assistant_llm_installing:$f,custom_assistant_llm_loading:ep,"custom_assistant_llm_not installed":`não instalado`,custom_assistant_llm_ready:tp,"custom_assistant_made in %s ms":`gerado em %s ms`,"custom_assistant_no name in %s (showing %s)":`Nenhum nome em "%s" — exibindo "%s"`,custom_assistant_offline:np,custom_assistant_online:rp,custom_assistant_read:`Ler`,"custom_assistant_recognized in %s ms":`reconhecido em %s ms`,custom_assistant_room:ip,custom_assistant_sat_idle:ap,custom_assistant_sat_listening:op,custom_assistant_sat_offline:sp,custom_assistant_sat_processing:cp,custom_assistant_sat_speaking:lp,custom_assistant_type:up,"custom_assistant_waits for reply":`waits for reply`,custom_assistant_wake_word_deleted:dp,custom_assistant_wake_word_hint:fp,custom_assistant_wake_word_phrase_hint:pp,custom_assistant_wake_word_upload_hint:mp,custom_assistant_wake_word_uploaded:hp,"custom_assistant_Shipped with the adapter":`Incluídas com o adaptador`,custom_assistant_bundled_wake_word_hint:gp,custom_assistant_wake_word_installed:_p,custom_assistant_wake_word_installed_replaced:vp,custom_assistant_wake_word_installed_full:yp,custom_assistant_write:bp,"custom_assistant_Add a model":`Adicionar um modelo`,"custom_assistant_Answer time":`Tempo de resposta`,"custom_assistant_Asked / answered / handed over":`Perguntadas / respondidas / encaminhadas`,"custom_assistant_Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly":`Faz perguntas de teste ao modelo carregado no idioma do assistente e em inglês: perguntas sobre a casa deve encaminhar, as gerais responder corretamente`,custom_assistant_Benchmark:xp,"custom_assistant_Delete model?":`Excluir o modelo?`,custom_assistant_Details:Sp,custom_assistant_Download:Cp,"custom_assistant_Estimate from the model size, not measured. Use the benchmark for real numbers.":`Estimativa pelo tamanho do modelo, não medida. O teste dá números reais.`,custom_assistant_Expected:wp,custom_assistant_Failures:Tp,"custom_assistant_First token":`Primeiro token`,custom_assistant_Folder:Ep,"custom_assistant_Free on the disk":`Livre no disco`,"custom_assistant_Hugging Face links are fine, also hf:org/repo/file.gguf":`Links do Hugging Face servem, também hf:org/repo/file.gguf`,custom_assistant_Languages:Dp,"custom_assistant_Load time":`Tempo de carregamento`,"custom_assistant_Loaded model":`Modelo carregado`,custom_assistant_Model:Op,custom_assistant_Models:kp,"custom_assistant_No models in this folder yet. Download one below.":`Ainda não há modelos nesta pasta. Baixe um abaixo.`,"custom_assistant_Own model: link to a .gguf file":`Modelo próprio: link para um arquivo .gguf`,"custom_assistant_Questions asked / answered by the model / handed over to the next tier":`Perguntas feitas / respondidas pelo modelo / encaminhadas ao próximo nível`,"custom_assistant_Reset statistics":`Redefinir estatísticas`,"custom_assistant_Save the settings to load the selected model. The instance restarts.":`Salve as configurações para carregar o modelo escolhido. A instância reinicia.`,custom_assistant_Size:Ap,"custom_assistant_Start the instance to manage the local models.":`Inicie a instância para gerenciar os modelos locais.`,"custom_assistant_The active model cannot be deleted":`O modelo ativo não pode ser excluído`,'custom_assistant_The engine is not installed yet. Install it on the main tab ("Install local model").':`O motor ainda não está instalado. Instale-o na primeira aba ("Instalar modelo local").`,"custom_assistant_The file %s is deleted from the disk. Its statistics stay.":`O arquivo %s é excluído do disco. Suas estatísticas permanecem.`,"custom_assistant_Time until the first word: reading the question":`Tempo até a primeira palavra: leitura da pergunta`,"custom_assistant_Timeouts and errors among the questions asked":`Tempos esgotados e erros entre as perguntas feitas`,"custom_assistant_Tokens/s":`Tokens/s`,custom_assistant_Use:jp,custom_assistant_correct:Mp,custom_assistant_downloaded:Np,custom_assistant_downloading:Pp,custom_assistant_failed:Fp,"custom_assistant_hand over":`encaminhar`,"custom_assistant_last used":`último uso`,"custom_assistant_many languages":`muitos idiomas`,"custom_assistant_missed hand-overs":`encaminhamentos perdidos`,"custom_assistant_needless hand-overs":`encaminhamentos desnecessários`,"custom_assistant_not enough space":`espaço insuficiente`,"custom_assistant_not the language of the assistant":`não é o idioma do assistente`,custom_assistant_parameters:Ip,custom_assistant_speed:Lp,custom_assistant_timeouts:Rp,"custom_assistant_wrong answers":`respostas erradas`,"custom_assistant_very fast":`muito rápido`,custom_assistant_fast:zp,custom_assistant_medium:Bp,custom_assistant_slow:Vp,custom_assistant_llm_benchmark:Hp,"Model folder":`Pasta dos modelos`,"Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.":`Caminho absoluto, p. ex. /mnt/ssd/llm. Vazio = pasta de dados da instância. Modelos já baixados em outro lugar não são movidos.`,"custom_assistant_Start the instance to test the voice":`Inicie a instância para testar a voz`,"custom_assistant_Try this voice":`Experimentar esta voz`,custom_assistant_synthesis:Up,"custom_assistant_%s answers in the journal":`%s respostas no diário`,"custom_assistant_Request comes from":`O pedido vem de`,custom_assistant_Voice:`Voz`,"custom_assistant_Voice is off":`A voz está desligada`,"custom_assistant_No telegram instance sends here":`Nenhuma instância do telegram envia para cá`,"custom_assistant_The tab Chat of these settings":`O separador Chat destas definições`,"custom_assistant_No smart-text2command instance chosen":`Nenhuma instância do smart-text2command escolhida`,"custom_assistant_%s is not running":`%s não está em execução`,"custom_assistant_Local decision":`Decisão local`,"custom_assistant_First the routines:":`Primeiro as rotinas:`,"custom_assistant_Off: everything goes to the models":`Desligado: tudo vai para os modelos`,"custom_assistant_Built-in rules:":`Regras integradas:`,"custom_assistant_devices, timers, alarms, time, weather":`dispositivos, temporizadores, alarmes, hora, tempo`,"custom_assistant_Devices:":`Dispositivos:`,"custom_assistant_timers, alarms, time, weather":`temporizadores, alarmes, hora, tempo`,"custom_assistant_default model":`modelo predefinido`,"custom_assistant_Model:":`Modelo:`,"custom_assistant_The last step":`O último passo`,"custom_assistant_Asked before the cloud":`Perguntado antes da nuvem`,"custom_assistant_Gives up after:":`Desiste após:`,custom_assistant_Off:Wp,"custom_assistant_No pi-agent instance chosen":`Nenhuma instância do pi-agent escolhida`,"custom_assistant_Off: answers only locally":`Desligado: responde só localmente`,"custom_assistant_with its own model, tools and permissions":`com o seu próprio modelo, ferramentas e permissões`,"custom_assistant_Provider:":`Fornecedor:`,custom_assistant_automatic:Gp,"custom_assistant_with the tools of this adapter":`com as ferramentas deste adaptador`,"custom_assistant_as text":`em texto`,"custom_assistant_not understood":`não entendido`,"custom_assistant_handed on":`passado adiante`,"custom_assistant_only if the cloud fails":`só se a nuvem falhar`,"custom_assistant_not running":`não está em execução`,"custom_assistant_Install %s":`Instalar %s`,"custom_assistant_Voice satellites (speech recognition and speech output)":`Satélites de voz (reconhecimento e síntese de fala)`,"custom_assistant_Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.":`Os satélites do adaptador assistant-satellite funcionam sempre. Detalhes nos separadores Voz e Satélites.`,"custom_assistant_Messages of %s come here.":`As mensagens de %s chegam aqui.`,"custom_assistant_In the settings of the telegram adapter, choose %s as the assistant instance.":`Nas definições do adaptador telegram, escolha %s como instância do assistente.`,"custom_assistant_The tab Chat of these settings, also to try out every step.":`O separador Chat destas definições, também para experimentar cada passo.`,"custom_assistant_From a script: %s, or write the question into %s.":`A partir de um script: %s, ou escreva a pergunta em %s.`,"custom_assistant_Built-in rules":`Regras integradas`,"custom_assistant_Every request goes to the models. Only the routines are still checked first.":`Cada pedido vai para os modelos. Só as rotinas são verificadas antes.`,"custom_assistant_Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.":`Regras fixas entendem ligar, regular e o estado de dispositivos, temporizadores, alarmes, a hora e o tempo — em poucos milissegundos, offline. O que não entendem segue adiante.`,"custom_assistant_The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.":`O adaptador smart-text2command aprende as suas formulações a partir de exemplos, executa só as ações aprovadas lá e pergunta de volta quando a divisão ou o dispositivo não são claros. Entende alemão e inglês. Temporizadores, alarmes, a hora e o tempo ficam com as regras integradas; o que nenhum entende segue adiante.`,"custom_assistant_smart-text2command instance":`Instância do smart-text2command`,"custom_assistant_Before this, %s routines are checked (tab Commands).":`Antes disto são verificadas %s rotinas (separador Comandos).`,"custom_assistant_Routines (fixed phrases with their own actions) are set up on the tab Commands.":`As rotinas (frases fixas com ações próprias) configuram-se no separador Comandos.`,"custom_assistant_Use a local LLM":`Usar um LLM local`,"custom_assistant_The list of models needs the running instance.":`A lista de modelos precisa da instância em execução.`,"custom_assistant_Ask before the cloud":`Perguntar antes da nuvem`,"custom_assistant_Without a cloud step the local model is the last step.":`Sem passo na nuvem, o modelo local é o último passo.`,"custom_assistant_Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.":`Cada pedido que a decisão local não entende vai primeiro para ele. Poupa chamadas à nuvem, mas num Raspberry Pi acrescenta 10–25 segundos.`,"custom_assistant_It only answers when the cloud fails (offline, quota).":`Só responde quando a nuvem falha (offline, quota).`,"custom_assistant_Gives up after (s)":`Desiste após (s)`,"custom_assistant_Download and compare models on the tab Local models.":`Descarregue e compare modelos no separador Modelos locais.`,"custom_assistant_AI provider":`Fornecedor de IA`,"custom_assistant_Only the local steps answer; a request they do not understand gets a fixed sentence.":`Só os passos locais respondem; um pedido que não entendem recebe uma frase fixa.`,custom_assistant_Provider:Kp,"custom_assistant_empty = automatic":`vazio = automático`,"custom_assistant_Provider, model and key come from the system settings of admin (tab AI there).":`Fornecedor, modelo e chave vêm das definições de sistema do admin (lá o separador IA).`,"custom_assistant_The API key and the other details are on the tab AI.":`A chave da API e os restantes detalhes estão no separador IA.`,"custom_assistant_The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.":`O adaptador pi-agent responde com o seu próprio modelo, ferramentas e permissões de escrita; cada origem de pedidos tem lá a sua própria conversa.`,"custom_assistant_pi-agent instance":`Instância do pi-agent`,"custom_assistant_Changes take effect when the settings are saved.":`As alterações têm efeito quando as definições forem guardadas.`,"custom_assistant_How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.":`Como um pedido passa pelo assistente. Cada passo responde ao que entende, o resto segue para o seguinte. Clique num passo para o configurar.`,'custom_assistant_Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.':`Antes de todos os passos: uma palavra de paragem silencia um temporizador a tocar, a resposta a uma pergunta em aberto vai para quem perguntou e "modo de diálogo ligado/desligado" muda o diálogo de um satélite. Um pedido sobre um script ou com uma imagem vai diretamente para o passo da nuvem.`,"custom_assistant_%s s on average (%s in the journal)":`%s s em média (%s no diário)`,"custom_assistant_No ioBroker.voice instance chosen":`Nenhuma instância do ioBroker.voice escolhida`,"custom_assistant_Server:":`Servidor:`,"custom_assistant_Reserve:":`Reserva:`,"custom_assistant_Language:":`Idioma:`,"custom_assistant_Text requests skip this step.":`Os pedidos de texto saltam este passo.`,"custom_assistant_Off: only text requests":`Desligado: só pedidos de texto`,"custom_assistant_Voice:":`Voz:`,"custom_assistant_default voice":`voz predefinida`,"custom_assistant_Switch commands: a beep":`Comandos de ligar/desligar: um sinal sonoro`,"custom_assistant_Longest answer: %s characters":`Resposta mais longa: %s caracteres`,"custom_assistant_Long answers are not cut":`As respostas longas não são cortadas`,"custom_assistant_Only answers to speech; text requests get text back.":`Só respostas a fala; os pedidos de texto recebem texto.`,"custom_assistant_Off: answers as text":`Desligado: respostas em texto`,custom_assistant_speech:qp,"custom_assistant_Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.":`Transforma em texto o que é dito aos satélites. Também ouve as mensagens de voz do Telegram e o modo de diálogo do chat. As chaves e mais opções estão no separador Voz.`,"custom_assistant_Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.":`Diz a resposta no satélite que perguntou, e também os anúncios. As chaves e mais opções estão no separador Voz.`,"custom_assistant_Follow-up questions in a conversation go straight to the cloud.":`As perguntas de seguimento numa conversa vão diretamente para a nuvem.`,"custom_assistant_What no step understands gets a fixed sentence.":`O que nenhum passo entende recebe uma frase fixa como resposta.`,custom_assistant_Music:Jp,"custom_assistant_Adapter command":`Comando do adaptador`},Xp=e({custom_assistant_Announcement:()=>Zp,custom_assistant_Answer:()=>Qp,custom_assistant_Benchmark:()=>ih,custom_assistant_Cancel:()=>$p,custom_assistant_Chat:()=>em,custom_assistant_Close:()=>tm,custom_assistant_Context:()=>nm,custom_assistant_Copied:()=>rm,custom_assistant_Copy:()=>im,custom_assistant_Delete:()=>am,custom_assistant_Details:()=>ah,custom_assistant_Download:()=>oh,custom_assistant_Error:()=>om,custom_assistant_Expected:()=>sh,custom_assistant_Failures:()=>ch,custom_assistant_Folder:()=>lh,custom_assistant_Host:()=>sm,custom_assistant_Languages:()=>uh,custom_assistant_Model:()=>dh,custom_assistant_Models:()=>fh,custom_assistant_Music:()=>Mh,custom_assistant_Off:()=>Oh,custom_assistant_Provider:()=>Ah,custom_assistant_Question:()=>cm,custom_assistant_Recognized:()=>lm,custom_assistant_Record:()=>um,custom_assistant_Request:()=>dm,custom_assistant_Room:()=>fm,custom_assistant_Routine:()=>pm,custom_assistant_Satellite:()=>mm,custom_assistant_Satellites:()=>hm,custom_assistant_Script:()=>gm,custom_assistant_Size:()=>ph,custom_assistant_Source:()=>_m,custom_assistant_Speak:()=>vm,custom_assistant_Spoken:()=>ym,custom_assistant_State:()=>bm,custom_assistant_Status:()=>xm,custom_assistant_Steps:()=>Sm,custom_assistant_Stop:()=>Cm,custom_assistant_Time:()=>wm,custom_assistant_Tool:()=>Tm,custom_assistant_Upload:()=>Em,custom_assistant_Use:()=>mh,custom_assistant_Voice:()=>Dh,custom_assistant_auto:()=>Dm,custom_assistant_automatic:()=>kh,custom_assistant_bundled_wake_word_hint:()=>$m,custom_assistant_correct:()=>hh,custom_assistant_delete_wake_word_confirm:()=>Om,custom_assistant_device:()=>km,custom_assistant_downloaded:()=>gh,custom_assistant_downloading:()=>_h,custom_assistant_failed:()=>vh,custom_assistant_fast:()=>Sh,custom_assistant_filter:()=>Am,custom_assistant_hint:()=>jm,custom_assistant_llm_benchmark:()=>Th,custom_assistant_llm_downloading:()=>Mm,custom_assistant_llm_error:()=>Nm,custom_assistant_llm_idle:()=>Pm,custom_assistant_llm_installing:()=>Fm,custom_assistant_llm_loading:()=>Im,custom_assistant_llm_ready:()=>Lm,custom_assistant_medium:()=>Ch,custom_assistant_offline:()=>Rm,custom_assistant_online:()=>zm,custom_assistant_parameters:()=>yh,custom_assistant_read:()=>Bm,custom_assistant_room:()=>Vm,custom_assistant_sat_idle:()=>Hm,custom_assistant_sat_listening:()=>Um,custom_assistant_sat_offline:()=>Wm,custom_assistant_sat_processing:()=>Gm,custom_assistant_sat_speaking:()=>Km,custom_assistant_slow:()=>wh,custom_assistant_speech:()=>jh,custom_assistant_speed:()=>bh,custom_assistant_synthesis:()=>Eh,custom_assistant_timeouts:()=>xh,custom_assistant_type:()=>qm,custom_assistant_wake_word_deleted:()=>Jm,custom_assistant_wake_word_hint:()=>Ym,custom_assistant_wake_word_installed:()=>eh,custom_assistant_wake_word_installed_full:()=>nh,custom_assistant_wake_word_installed_replaced:()=>th,custom_assistant_wake_word_phrase_hint:()=>Xm,custom_assistant_wake_word_upload_hint:()=>Zm,custom_assistant_wake_word_uploaded:()=>Qm,custom_assistant_write:()=>rh,default:()=>Nh}),Zp=`Объявление`,Qp=`Ответ`,$p=`Отмена`,em=`Чат`,tm=`Закрыть`,nm=`Контекст`,rm=`Скопировано`,im=`Копировать`,am=`Удалить`,om=`Ошибка`,sm=`Хозяин`,cm=`Вопрос`,lm=`Распознано`,um=`Записать`,dm=`Запрос`,fm=`Комната`,pm=`Сценарий`,mm=`Спутник`,hm=`Спутники`,gm=`Скрипт`,_m=`Источник`,vm=`Говорить`,ym=`Произнесено`,bm=`Состояние`,xm=`Статус`,Sm=`Шаги`,Cm=`Стоп`,wm=`Время`,Tm=`Инструмент`,Em=`Загрузить`,Dm=`авто`,Om=`Удалить «%s»? Оно больше не будет предлагаться устройствам; устройство, которое уже скачало его, сохранит его.`,km=`Устройство`,Am=`Фильтр`,jm=`Снимите флажок «Чтение», чтобы скрыть устройство от голосового помощника, или снимите флажок «Запись», чтобы оставить его только для чтения (например, блокировка). По умолчанию устройствам разрешен полный доступ.`,Mm=`Загрузка модели…`,Nm=`ошибка`,Pm=`праздный`,Fm=`установка двигателя…`,Im=`Загрузка…`,Lm=`готовый`,Rm=`офлайн`,zm=`онлайн`,Bm=`Читать`,Vm=`Комната`,Hm=`праздный`,Um=`слушание`,Wm=`офлайн`,Gm=`обработка`,Km=`Говорящий`,qm=`Тип`,Jm=`«%s» удалено. Устройство, которое уже скачало его, сохраняет свою копию.`,Ym=`Слово активации обрабатывается на устройстве. Наведите курсор на слово, чтобы увидеть, на каких языках оно обучено — большинство только на английском.`,Xm=`Что нужно сказать, чтобы разбудить устройство, — так оно будет показано в списке.`,Zm=`Модель microWakeWord: файл .tflite, желательно вместе с его .json. Другие типы моделей (openWakeWord, Porcupine) так установить нельзя.`,Qm=`«%s» загружено. Выберите его выше, чтобы активировать, — тогда устройство скачает модель.`,$m=`Клик: загрузить на устройство и включить — заменяет более старую версию того же слова`,eh=`«%s» включено — устройство загружает модель.`,th=`«%s» включено вместо «%s» — устройство загружает модель.`,nh=`«%s» теперь в списке, но все места заняты. Сначала отключите другое слово активации, затем выберите «%s».`,rh=`Писать`,ih=`Тест`,ah=`Подробности`,oh=`Скачать`,sh=`Ожидалось`,ch=`Сбои`,lh=`Папка`,uh=`Языки`,dh=`Модель`,fh=`Модели`,ph=`Размер`,mh=`Использовать`,hh=`верно`,gh=`скачано`,_h=`загружается`,vh=`ошибка`,yh=`параметров`,bh=`скорость`,xh=`тайм-ауты`,Sh=`быстро`,Ch=`средне`,wh=`медленно`,Th=`идёт тест`,Eh=`синтез`,Dh=`Голос`,Oh=`Выкл.`,kh=`автоматически`,Ah=`Поставщик`,jh=`речь`,Mh=`Музыка`,Nh={"custom_assistant_%s of %s active":`активно %s из %s`,"custom_assistant_%s s audio":`%s с аудио`,"custom_assistant_(no spoken answer)":`(без голосового ответа)`,"custom_assistant_A satellite that is still configured appears again when it connects.":`Сателлит, который всё ещё настроен, снова появится при подключении.`,"custom_assistant_All sources":`Все источники`,custom_assistant_Announcement:Zp,custom_assistant_Answer:Qp,"custom_assistant_Audio file":`Аудиофайл`,custom_assistant_Cancel:$p,custom_assistant_Chat:em,"custom_assistant_Clear chat":`Четкий чат`,"custom_assistant_Click for details":`Нажмите для подробностей`,custom_assistant_Close:tm,"custom_assistant_Cloud LLM":`Облачная LLM`,"custom_assistant_Collapse all":`Свернуть все`,custom_assistant_Context:nm,custom_assistant_Copied:rm,custom_assistant_Copy:im,"custom_assistant_Copy everything as JSON":`Скопировать всё как JSON`,custom_assistant_Delete:am,"custom_assistant_Delete the recorded history of all sources?":`Удалить записанную историю всех источников?`,"custom_assistant_Device cache cleared.":`Кэш устройства очищен.`,"custom_assistant_Device settings":`Настройки устройства`,"custom_assistant_Dialog: everything you say becomes a question":`Диалог: всё, что вы скажете, станет вопросом — пока вы его не завершите`,"custom_assistant_Dialog: hearing you…":`Диалог: слышу вас …`,"custom_assistant_Dialog: listening…":`Диалог: слушаю …`,"custom_assistant_Dialog: speaking…":`Диалог: говорю …`,"custom_assistant_Dialog: thinking…":`Диалог: думаю …`,"custom_assistant_Download as JSON":`Скачать как JSON`,"custom_assistant_End the dialog":`Завершить диалог`,custom_assistant_Error:om,"custom_assistant_Expand all":`Развернуть все`,"custom_assistant_Follow-up":`Уточнение`,"custom_assistant_Hide disabled":`Скрыть отключено`,"custom_assistant_Hide processing details":`Скрыть детали обработки`,custom_assistant_Host:sm,"custom_assistant_Last seen":`Последний раз видели`,"custom_assistant_Listening…":`Слушаю…`,"custom_assistant_Loading…":`Загрузка…`,"custom_assistant_Local LLM":`Локальная LLM`,"custom_assistant_Local model":`Локальная модель`,"custom_assistant_Mic re-opened without wake word":`Микрофон снова открыт без слова активации (уточнение или вопрос)`,"custom_assistant_Name language: %s":`Название языка: %s`,"custom_assistant_No answer":`Нет ответа`,"custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.":`Устройства не обнаружены. Назначьте состояния комнатам и функциям в ioBroker.`,"custom_assistant_No messages yet. Type a question below.":`Сообщений пока нет. Задайте вопрос ниже.`,"custom_assistant_No processing steps were recorded for this request.":`Для этого запроса шаги обработки не сохранены. Подробности хранятся для последних 200 запросов.`,"custom_assistant_No satellites registered yet.":`Спутники пока не зарегистрированы.`,"custom_assistant_Not understood":`Не понято`,"custom_assistant_Nothing recognized":`Ничего не распознано`,"custom_assistant_Per-device permissions":`Разрешения для каждого устройства`,"custom_assistant_Play answer (backend TTS)":`Воспроизвести ответ (синтезатор речи на стороне сервера)`,"custom_assistant_Please select a .tflite model file":`Выберите файл модели .tflite`,custom_assistant_Question:cm,"custom_assistant_Read answers aloud":`Прочитайте ответы вслух.`,custom_assistant_Recognized:lm,custom_assistant_Record:um,"custom_assistant_Recorded audio":`Записанное аудио`,"custom_assistant_Refresh device cache":`Обновить кэш устройства`,"custom_assistant_Remove satellite":`Удалить сателлит`,"custom_assistant_Remove satellite %s and all its states?":`Удалить сателлит %s со всеми его состояниями?`,"custom_assistant_Reply audio":`Аудио ответа`,"custom_assistant_Reply to a question":`Ответ на вопрос`,custom_assistant_Request:dm,"custom_assistant_Request details":`Подробности запроса`,custom_assistant_Room:fm,custom_assistant_Routine:pm,"custom_assistant_Rule-based NLU":`Правила NLU (локально)`,custom_assistant_Satellite:mm,custom_assistant_Satellites:hm,"custom_assistant_Save the configuration (the instance will restart) before chatting.":`Сохраните конфигурацию (при этом экземпляр перезапустится) перед началом чата.`,custom_assistant_Script:gm,"custom_assistant_Send announcement":`Отправить объявление`,"custom_assistant_Settings for %s":`Настройки для %s`,"custom_assistant_Show processing details":`Показать детали обработки`,"custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.":`Показывает все запросы в реальном времени: сателлиты, Telegram, скрипты и этот чат.`,custom_assistant_Source:_m,custom_assistant_Speak:vm,"custom_assistant_Speak on all satellites":`Выступить на всех спутниках`,"custom_assistant_Speak the test sentence and recognize it":`Произнести тестовую фразу и распознать`,"custom_assistant_Speech output":`Синтез речи`,"custom_assistant_Speech recognition":`Распознавание речи`,"custom_assistant_Speech recognition time":`Время распознавания речи`,"custom_assistant_Speech synthesis":`Синтез речи`,custom_assistant_Spoken:ym,"custom_assistant_Start the assistant instance to chat.":`Запустите экземпляр ассистента для начала чата.`,"custom_assistant_Start the assistant instance to load the device list.":`Запустите экземпляр помощника, чтобы загрузить список устройств.`,custom_assistant_State:bm,"custom_assistant_States read":`Прочитанные состояния`,"custom_assistant_States written":`Записанные состояния`,custom_assistant_Status:xm,custom_assistant_Steps:Sm,custom_assistant_Stop:Cm,"custom_assistant_Stop listening":`Прекратите слушать`,"custom_assistant_Stop reading answers aloud":`Прекратите зачитывать ответы вслух.`,"custom_assistant_Stop word":`Стоп-слово`,"custom_assistant_Test chat":`Тестовый чат`,"custom_assistant_Test sentence":`Тестовая фраза`,"custom_assistant_Test voice":`Проверить голос`,"custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.":`Для диалога нужно распознавание речи: включите голос на вкладке «Голос».`,"custom_assistant_The instance must be running to test the voice.":`Для проверки голоса экземпляр должен быть запущен.`,"custom_assistant_The microphone could not be opened:":`Не удалось открыть микрофон:`,"custom_assistant_The microphone only works over https or on localhost.":`Микрофон работает только через https или на localhost.`,"custom_assistant_Thinking…":`Размышления…`,"custom_assistant_This satellite exposes no settings.":`Этот сателлит не предоставляет настроек.`,custom_assistant_Time:wm,custom_assistant_Tool:Tm,"custom_assistant_Tool calls":`Вызовы инструментов`,"custom_assistant_Tool result":`Результат инструмента`,"custom_assistant_Tools & states":`Инструменты и состояния`,"custom_assistant_Total duration":`Общая длительность`,"custom_assistant_Translate all missing (%s)":`Переведите все отсутствующие (%s)`,"custom_assistant_Translate name into %s":`Переведите имя в %s`,"custom_assistant_Type a message…":`Введите сообщение…`,custom_assistant_Upload:Em,"custom_assistant_Upload own wake word":`Загрузить своё слово активации`,"custom_assistant_Uploaded wake word":`Загруженное слово активации`,"custom_assistant_Wake word":`Слово активации`,"custom_assistant_Wake word phrase":`Фраза активации`,"custom_assistant_Wake words":`Слова активации`,custom_assistant_auto:Dm,"custom_assistant_change it on the Voice tab":`Измените это на вкладке «Голос».`,custom_assistant_delete_wake_word_confirm:Om,custom_assistant_device:km,custom_assistant_filter:Am,"custom_assistant_follow-up":`продолжение`,custom_assistant_hint:jm,"custom_assistant_in progress":`выполняется`,custom_assistant_llm_downloading:Mm,custom_assistant_llm_error:Nm,custom_assistant_llm_idle:Pm,custom_assistant_llm_installing:Fm,custom_assistant_llm_loading:Im,"custom_assistant_llm_not installed":`не установлен`,custom_assistant_llm_ready:Lm,"custom_assistant_made in %s ms":`создано за %s мс`,"custom_assistant_no name in %s (showing %s)":`Имя отсутствует в "%s" — отображается "%s"`,custom_assistant_offline:Rm,custom_assistant_online:zm,custom_assistant_read:Bm,"custom_assistant_recognized in %s ms":`распознано за %s мс`,custom_assistant_room:Vm,custom_assistant_sat_idle:Hm,custom_assistant_sat_listening:Um,custom_assistant_sat_offline:Wm,custom_assistant_sat_processing:Gm,custom_assistant_sat_speaking:Km,custom_assistant_type:qm,"custom_assistant_waits for reply":`ждёт ответа`,custom_assistant_wake_word_deleted:Jm,custom_assistant_wake_word_hint:Ym,custom_assistant_wake_word_phrase_hint:Xm,custom_assistant_wake_word_upload_hint:Zm,custom_assistant_wake_word_uploaded:Qm,"custom_assistant_Shipped with the adapter":`Поставляются с адаптером`,custom_assistant_bundled_wake_word_hint:$m,custom_assistant_wake_word_installed:eh,custom_assistant_wake_word_installed_replaced:th,custom_assistant_wake_word_installed_full:nh,custom_assistant_write:rh,"custom_assistant_Add a model":`Добавить модель`,"custom_assistant_Answer time":`Время ответа`,"custom_assistant_Asked / answered / handed over":`Задано / отвечено / передано`,"custom_assistant_Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly":`Задаёт загруженной модели тестовые вопросы на языке ассистента и на английском: вопросы про дом она должна передать дальше, а на общие ответить правильно`,custom_assistant_Benchmark:ih,"custom_assistant_Delete model?":`Удалить модель?`,custom_assistant_Details:ah,custom_assistant_Download:oh,"custom_assistant_Estimate from the model size, not measured. Use the benchmark for real numbers.":`Оценка по размеру модели, не измерение. Реальные цифры даёт тест.`,custom_assistant_Expected:sh,custom_assistant_Failures:ch,"custom_assistant_First token":`Первый токен`,custom_assistant_Folder:lh,"custom_assistant_Free on the disk":`Свободно на диске`,"custom_assistant_Hugging Face links are fine, also hf:org/repo/file.gguf":`Подходят ссылки Hugging Face, а также hf:org/repo/file.gguf`,custom_assistant_Languages:uh,"custom_assistant_Load time":`Время загрузки`,"custom_assistant_Loaded model":`Загруженная модель`,custom_assistant_Model:dh,custom_assistant_Models:fh,"custom_assistant_No models in this folder yet. Download one below.":`В этой папке пока нет моделей. Скачайте модель ниже.`,"custom_assistant_Own model: link to a .gguf file":`Своя модель: ссылка на файл .gguf`,"custom_assistant_Questions asked / answered by the model / handed over to the next tier":`Задано вопросов / отвечено моделью / передано следующей ступени`,"custom_assistant_Reset statistics":`Сбросить статистику`,"custom_assistant_Save the settings to load the selected model. The instance restarts.":`Сохраните настройки, чтобы загрузить выбранную модель. Инстанция перезапустится.`,custom_assistant_Size:ph,"custom_assistant_Start the instance to manage the local models.":`Запустите инстанцию, чтобы управлять локальными моделями.`,"custom_assistant_The active model cannot be deleted":`Активную модель удалить нельзя`,'custom_assistant_The engine is not installed yet. Install it on the main tab ("Install local model").':`Движок ещё не установлен. Установите его на первой вкладке («Установить локальную модель»).`,"custom_assistant_The file %s is deleted from the disk. Its statistics stay.":`Файл %s будет удалён с диска. Статистика сохранится.`,"custom_assistant_Time until the first word: reading the question":`Время до первого слова: чтение вопроса`,"custom_assistant_Timeouts and errors among the questions asked":`Тайм-ауты и ошибки среди заданных вопросов`,"custom_assistant_Tokens/s":`Токенов/с`,custom_assistant_Use:mh,custom_assistant_correct:hh,custom_assistant_downloaded:gh,custom_assistant_downloading:_h,custom_assistant_failed:vh,"custom_assistant_hand over":`передать`,"custom_assistant_last used":`последний раз`,"custom_assistant_many languages":`много языков`,"custom_assistant_missed hand-overs":`пропущенные передачи`,"custom_assistant_needless hand-overs":`лишние передачи`,"custom_assistant_not enough space":`мало места`,"custom_assistant_not the language of the assistant":`не язык ассистента`,custom_assistant_parameters:yh,custom_assistant_speed:bh,custom_assistant_timeouts:xh,"custom_assistant_wrong answers":`неверные ответы`,"custom_assistant_very fast":`очень быстро`,custom_assistant_fast:Sh,custom_assistant_medium:Ch,custom_assistant_slow:wh,custom_assistant_llm_benchmark:Th,"Model folder":`Папка моделей`,"Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.":`Абсолютный путь, например /mnt/ssd/llm. Пусто = папка данных инстанции. Уже скачанные в другое место модели не переносятся.`,"custom_assistant_Start the instance to test the voice":`Запустите экземпляр, чтобы проверить голос`,"custom_assistant_Try this voice":`Попробовать этот голос`,custom_assistant_synthesis:Eh,"custom_assistant_%s answers in the journal":`Ответов в журнале: %s`,"custom_assistant_Request comes from":`Откуда приходит запрос`,custom_assistant_Voice:Dh,"custom_assistant_Voice is off":`Голос выключен`,"custom_assistant_No telegram instance sends here":`Ни один экземпляр telegram не отправляет сюда`,"custom_assistant_The tab Chat of these settings":`Вкладка «Чат» этих настроек`,"custom_assistant_No smart-text2command instance chosen":`Экземпляр smart-text2command не выбран`,"custom_assistant_%s is not running":`%s не запущен`,"custom_assistant_Local decision":`Локальное решение`,"custom_assistant_First the routines:":`Сначала рутины:`,"custom_assistant_Off: everything goes to the models":`Выкл.: всё уходит к моделям`,"custom_assistant_Built-in rules:":`Встроенные правила:`,"custom_assistant_devices, timers, alarms, time, weather":`устройства, таймеры, будильники, время, погода`,"custom_assistant_Devices:":`Устройства:`,"custom_assistant_timers, alarms, time, weather":`таймеры, будильники, время, погода`,"custom_assistant_default model":`модель по умолчанию`,"custom_assistant_Model:":`Модель:`,"custom_assistant_The last step":`Последний шаг`,"custom_assistant_Asked before the cloud":`Спрашивается до облака`,"custom_assistant_Gives up after:":`Сдаётся через:`,custom_assistant_Off:Oh,"custom_assistant_No pi-agent instance chosen":`Экземпляр pi-agent не выбран`,"custom_assistant_Off: answers only locally":`Выкл.: отвечает только локально`,"custom_assistant_with its own model, tools and permissions":`со своей моделью, инструментами и правами`,"custom_assistant_Provider:":`Поставщик:`,custom_assistant_automatic:kh,"custom_assistant_with the tools of this adapter":`с инструментами этого адаптера`,"custom_assistant_as text":`текстом`,"custom_assistant_not understood":`не понято`,"custom_assistant_handed on":`передано дальше`,"custom_assistant_only if the cloud fails":`только если облако недоступно`,"custom_assistant_not running":`не запущен`,"custom_assistant_Install %s":`Установить %s`,"custom_assistant_Voice satellites (speech recognition and speech output)":`Голосовые сателлиты (распознавание и синтез речи)`,"custom_assistant_Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.":`Сателлиты адаптера assistant-satellite работают всегда. Подробности на вкладках «Голос» и «Спутники».`,"custom_assistant_Messages of %s come here.":`Сообщения из %s приходят сюда.`,"custom_assistant_In the settings of the telegram adapter, choose %s as the assistant instance.":`В настройках адаптера telegram выберите %s как экземпляр ассистента.`,"custom_assistant_The tab Chat of these settings, also to try out every step.":`Вкладка «Чат» этих настроек — в том числе чтобы опробовать каждый шаг.`,"custom_assistant_From a script: %s, or write the question into %s.":`Из скрипта: %s, или запишите вопрос в %s.`,"custom_assistant_Built-in rules":`Встроенные правила`,"custom_assistant_Every request goes to the models. Only the routines are still checked first.":`Каждый запрос уходит к моделям. Сначала проверяются только рутины.`,"custom_assistant_Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.":`Жёсткие правила понимают включение, диммирование и состояние устройств, таймеры, будильники, время и погоду — за несколько миллисекунд, офлайн. Что они не поняли, идёт дальше.`,"custom_assistant_The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.":`Адаптер smart-text2command учится вашим формулировкам на примерах, выполняет только разрешённые в нём действия и переспрашивает, если комната или устройство неясны. Он понимает немецкий и английский. Таймеры, будильники, время и погода остаются за встроенными правилами; что не понял ни один из них, идёт дальше.`,"custom_assistant_smart-text2command instance":`Экземпляр smart-text2command`,"custom_assistant_Before this, %s routines are checked (tab Commands).":`Перед этим проверяются рутины: %s (вкладка «Команды»).`,"custom_assistant_Routines (fixed phrases with their own actions) are set up on the tab Commands.":`Рутины (готовые фразы со своими действиями) настраиваются на вкладке «Команды».`,"custom_assistant_Use a local LLM":`Использовать локальную LLM`,"custom_assistant_The list of models needs the running instance.":`Для списка моделей экземпляр должен быть запущен.`,"custom_assistant_Ask before the cloud":`Спрашивать до облака`,"custom_assistant_Without a cloud step the local model is the last step.":`Без облачного шага локальная модель — последний шаг.`,"custom_assistant_Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.":`Каждый запрос, который не поняло локальное решение, сначала идёт к ней. Экономит обращения к облаку, но на Raspberry Pi добавляет 10–25 секунд.`,"custom_assistant_It only answers when the cloud fails (offline, quota).":`Отвечает только тогда, когда облако недоступно (нет сети, исчерпана квота).`,"custom_assistant_Gives up after (s)":`Сдаётся через (с)`,"custom_assistant_Download and compare models on the tab Local models.":`Скачивать и сравнивать модели — на вкладке «Локальные модели».`,"custom_assistant_AI provider":`Поставщик ИИ`,"custom_assistant_Only the local steps answer; a request they do not understand gets a fixed sentence.":`Отвечают только локальные шаги; на непонятый запрос приходит готовая фраза.`,custom_assistant_Provider:Ah,"custom_assistant_empty = automatic":`пусто = автоматически`,"custom_assistant_Provider, model and key come from the system settings of admin (tab AI there).":`Поставщик, модель и ключ берутся из системных настроек admin (там вкладка «ИИ»).`,"custom_assistant_The API key and the other details are on the tab AI.":`Ключ API и остальные подробности — на вкладке «ИИ».`,"custom_assistant_The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.":`Адаптер pi-agent отвечает своей моделью, своими инструментами и правами записи; у каждого источника запросов там свой разговор.`,"custom_assistant_pi-agent instance":`Экземпляр pi-agent`,"custom_assistant_Changes take effect when the settings are saved.":`Изменения вступают в силу после сохранения настроек.`,"custom_assistant_How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.":`Как запрос проходит через ассистента. Каждый шаг отвечает на то, что понял, остальное идёт к следующему. Нажмите на шаг, чтобы настроить его.`,'custom_assistant_Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.':`Перед всеми шагами: стоп-слово выключает звенящий таймер, ответ на открытый вопрос уходит тому, кто спросил, а «режим диалога вкл./выкл.» переключает диалог сателлита. Запрос о скрипте или с картинкой идёт сразу к облачному шагу.`,"custom_assistant_%s s on average (%s in the journal)":`в среднем %s с (%s в журнале)`,"custom_assistant_No ioBroker.voice instance chosen":`Экземпляр ioBroker.voice не выбран`,"custom_assistant_Server:":`Сервер:`,"custom_assistant_Reserve:":`Резерв:`,"custom_assistant_Language:":`Язык:`,"custom_assistant_Text requests skip this step.":`Текстовые запросы пропускают этот шаг.`,"custom_assistant_Off: only text requests":`Выкл.: только текстовые запросы`,"custom_assistant_Voice:":`Голос:`,"custom_assistant_default voice":`голос по умолчанию`,"custom_assistant_Switch commands: a beep":`Команды переключения: звуковой сигнал`,"custom_assistant_Longest answer: %s characters":`Самый длинный ответ: %s символов`,"custom_assistant_Long answers are not cut":`Длинные ответы не обрезаются`,"custom_assistant_Only answers to speech; text requests get text back.":`Только ответы на речь; на текстовые запросы приходит текст.`,"custom_assistant_Off: answers as text":`Выкл.: ответы текстом`,custom_assistant_speech:jh,"custom_assistant_Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.":`Превращает речь сателлитов в текст. Он же слушает голосовые сообщения из Telegram и режим диалога в чате. Ключи и другие настройки — на вкладке «Голос».`,"custom_assistant_Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.":`Произносит ответ на том сателлите, который спросил, а также объявления. Ключи и другие настройки — на вкладке «Голос».`,"custom_assistant_Follow-up questions in a conversation go straight to the cloud.":`Уточняющие вопросы в идущем разговоре сразу уходят в облако.`,"custom_assistant_What no step understands gets a fixed sentence.":`На то, что не понял ни один шаг, приходит готовая фраза.`,custom_assistant_Music:Mh,"custom_assistant_Adapter command":`Команда адаптера`},Ph=e({custom_assistant_Announcement:()=>Fh,custom_assistant_Answer:()=>Ih,custom_assistant_Benchmark:()=>Hg,custom_assistant_Cancel:()=>Lh,custom_assistant_Chat:()=>Rh,custom_assistant_Close:()=>zh,custom_assistant_Context:()=>Bh,custom_assistant_Copied:()=>Vh,custom_assistant_Copy:()=>Hh,custom_assistant_Delete:()=>Uh,custom_assistant_Details:()=>Ug,custom_assistant_Download:()=>Wg,custom_assistant_Error:()=>Wh,custom_assistant_Expected:()=>Gg,custom_assistant_Failures:()=>Kg,custom_assistant_Folder:()=>qg,custom_assistant_Host:()=>Gh,custom_assistant_Languages:()=>Jg,custom_assistant_Model:()=>Yg,custom_assistant_Models:()=>Xg,custom_assistant_Music:()=>g_,custom_assistant_Off:()=>f_,custom_assistant_Provider:()=>m_,custom_assistant_Question:()=>Kh,custom_assistant_Recognized:()=>qh,custom_assistant_Record:()=>Jh,custom_assistant_Request:()=>Yh,custom_assistant_Room:()=>Xh,custom_assistant_Routine:()=>Zh,custom_assistant_Satellite:()=>Qh,custom_assistant_Satellites:()=>$h,custom_assistant_Script:()=>eg,custom_assistant_Size:()=>Zg,custom_assistant_Source:()=>tg,custom_assistant_Speak:()=>ng,custom_assistant_Spoken:()=>rg,custom_assistant_State:()=>ig,custom_assistant_Status:()=>ag,custom_assistant_Steps:()=>og,custom_assistant_Stop:()=>sg,custom_assistant_Time:()=>cg,custom_assistant_Tool:()=>lg,custom_assistant_Upload:()=>ug,custom_assistant_Use:()=>Qg,custom_assistant_Voice:()=>d_,custom_assistant_auto:()=>dg,custom_assistant_automatic:()=>p_,custom_assistant_bundled_wake_word_hint:()=>Lg,custom_assistant_correct:()=>$g,custom_assistant_delete_wake_word_confirm:()=>fg,custom_assistant_device:()=>pg,custom_assistant_downloaded:()=>e_,custom_assistant_downloading:()=>t_,custom_assistant_failed:()=>n_,custom_assistant_fast:()=>o_,custom_assistant_filter:()=>mg,custom_assistant_hint:()=>hg,custom_assistant_llm_benchmark:()=>l_,custom_assistant_llm_downloading:()=>gg,custom_assistant_llm_error:()=>_g,custom_assistant_llm_idle:()=>vg,custom_assistant_llm_installing:()=>yg,custom_assistant_llm_loading:()=>bg,custom_assistant_llm_ready:()=>xg,custom_assistant_medium:()=>s_,custom_assistant_offline:()=>Sg,custom_assistant_online:()=>Cg,custom_assistant_parameters:()=>r_,custom_assistant_read:()=>wg,custom_assistant_room:()=>Tg,custom_assistant_sat_idle:()=>Eg,custom_assistant_sat_listening:()=>Dg,custom_assistant_sat_offline:()=>Og,custom_assistant_sat_processing:()=>kg,custom_assistant_sat_speaking:()=>Ag,custom_assistant_slow:()=>c_,custom_assistant_speech:()=>h_,custom_assistant_speed:()=>i_,custom_assistant_synthesis:()=>u_,custom_assistant_timeouts:()=>a_,custom_assistant_type:()=>jg,custom_assistant_wake_word_deleted:()=>Mg,custom_assistant_wake_word_hint:()=>Ng,custom_assistant_wake_word_installed:()=>Rg,custom_assistant_wake_word_installed_full:()=>Bg,custom_assistant_wake_word_installed_replaced:()=>zg,custom_assistant_wake_word_phrase_hint:()=>Pg,custom_assistant_wake_word_upload_hint:()=>Fg,custom_assistant_wake_word_uploaded:()=>Ig,custom_assistant_write:()=>Vg,default:()=>__}),Fh=`Оголошення`,Ih=`Відповідь`,Lh=`Cancel`,Rh=`Chat`,zh=`Close`,Bh=`Контекст`,Vh=`Скопійовано`,Hh=`Копіювати`,Uh=`Delete`,Wh=`Помилка`,Gh=`Хост`,Kh=`Питання`,qh=`Розпізнано`,Jh=`Записати`,Yh=`Запит`,Xh=`Room`,Zh=`Routine`,Qh=`Супутник`,$h=`Супутники`,eg=`Script`,tg=`Source`,ng=`Говоріть`,rg=`Вимовлено`,ig=`State`,ag=`Статус`,og=`Кроки`,sg=`Стоп`,cg=`Час`,lg=`Інструмент`,ug=`Завантажити`,dg=`авто`,fg=`Видалити «%s»? Його більше не буде запропоновано пристроям; пристрій, який уже завантажив його, збереже його.`,pg=`Пристрій`,mg=`Фільтр`,hg=`Зніміть позначку «Читання», щоб приховати пристрій від помічника, або «Запис», щоб залишити його в режимі лише для читання (наприклад, блокування). За замовчуванням пристрої повністю дозволені.`,gg=`завантаження моделі…`,_g=`помилка`,vg=`бездіяльність`,yg=`встановлення двигуна…`,bg=`завантаження…`,xg=`готовий`,Sg=`офлайн`,Cg=`онлайн`,wg=`Читати`,Tg=`Кімната`,Eg=`бездіяльність`,Dg=`прослуховування`,Og=`офлайн`,kg=`обробка`,Ag=`розмова`,jg=`Тип`,Mg=`«%s» видалено. Пристрій, який уже завантажив його, зберігає свою копію.`,Ng=`Слово активації обробляється на пристрої. Наведіть курсор на слово, щоб побачити, якими мовами його навчено — більшість лише англійською.`,Pg=`Що потрібно сказати, щоб розбудити пристрій, — так воно з'явиться у списку.`,Fg=`Модель microWakeWord: файл .tflite, бажано разом з його .json. Інші типи моделей (openWakeWord, Porcupine) так встановити не можна.`,Ig=`«%s» завантажено. Виберіть його вище, щоб активувати, — тоді пристрій завантажить модель.`,Lg=`Клік: завантажити на пристрій і ввімкнути — замінює старішу версію того самого слова`,Rg=`«%s» увімкнено — пристрій завантажує модель.`,zg=`«%s» увімкнено замість «%s» — пристрій завантажує модель.`,Bg=`«%s» тепер у списку, але всі місця зайняті. Спершу вимкніть інше слово активації, потім виберіть «%s».`,Vg=`Написати`,Hg=`Тест`,Ug=`Подробиці`,Wg=`Завантажити`,Gg=`Очікувалось`,Kg=`Збої`,qg=`Папка`,Jg=`Мови`,Yg=`Модель`,Xg=`Моделі`,Zg=`Розмір`,Qg=`Використати`,$g=`правильно`,e_=`завантажено`,t_=`завантажується`,n_=`помилка`,r_=`параметрів`,i_=`швидкість`,a_=`тайм-аути`,o_=`швидко`,s_=`середньо`,c_=`повільно`,l_=`триває тест`,u_=`синтез`,d_=`Голос`,f_=`Вимк.`,p_=`автоматично`,m_=`Постачальник`,h_=`мовлення`,g_=`Музика`,__={"custom_assistant_%s of %s active":`%s of %s active`,"custom_assistant_%s s audio":`%s с аудіо`,"custom_assistant_(no spoken answer)":`(no spoken answer)`,"custom_assistant_A satellite that is still configured appears again when it connects.":`Сателіт, який усе ще налаштований, знову з’явиться після підключення.`,"custom_assistant_All sources":`All sources`,custom_assistant_Announcement:Fh,custom_assistant_Answer:Ih,"custom_assistant_Audio file":`Аудіофайл`,custom_assistant_Cancel:Lh,custom_assistant_Chat:Rh,"custom_assistant_Clear chat":`Очистити чат`,"custom_assistant_Click for details":`Натисніть для подробиць`,custom_assistant_Close:zh,"custom_assistant_Cloud LLM":`Cloud LLM`,"custom_assistant_Collapse all":`Згорнути все`,custom_assistant_Context:Bh,custom_assistant_Copied:Vh,custom_assistant_Copy:Hh,"custom_assistant_Copy everything as JSON":`Скопіювати все як JSON`,custom_assistant_Delete:Uh,"custom_assistant_Delete the recorded history of all sources?":`Delete the recorded history of all sources?`,"custom_assistant_Device cache cleared.":`Кеш пристрою очищено.`,"custom_assistant_Device settings":`Device settings`,"custom_assistant_Dialog: everything you say becomes a question":`Діалог: усе, що ви скажете, стане запитанням — доки ви його не завершите`,"custom_assistant_Dialog: hearing you…":`Діалог: чую вас …`,"custom_assistant_Dialog: listening…":`Діалог: слухаю …`,"custom_assistant_Dialog: speaking…":`Діалог: говорю …`,"custom_assistant_Dialog: thinking…":`Діалог: думаю …`,"custom_assistant_Download as JSON":`Завантажити як JSON`,"custom_assistant_End the dialog":`Завершити діалог`,custom_assistant_Error:Wh,"custom_assistant_Expand all":`Розгорнути все`,"custom_assistant_Follow-up":`Уточнення`,"custom_assistant_Hide disabled":`Приховати вимкнено`,"custom_assistant_Hide processing details":`Hide processing details`,custom_assistant_Host:Gh,"custom_assistant_Last seen":`Бачили востаннє`,"custom_assistant_Listening…":`Слухання…`,"custom_assistant_Loading…":`Завантаження…`,"custom_assistant_Local LLM":`Local LLM`,"custom_assistant_Local model":`Локальна модель`,"custom_assistant_Mic re-opened without wake word":`Mic re-opened without wake word (follow-up or question)`,"custom_assistant_Name language: %s":`Мова назви: %s`,"custom_assistant_No answer":`Немає відповіді`,"custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.":`Пристроїв не виявлено. Призначте стани кімнатам та функціям в ioBroker.`,"custom_assistant_No messages yet. Type a question below.":`Поки що немає повідомлень. Введіть запитання нижче.`,"custom_assistant_No processing steps were recorded for this request.":`Для цього запиту кроки обробки не збережено. Подробиці зберігаються для останніх 200 запитів.`,"custom_assistant_No satellites registered yet.":`Поки що не зареєстровано жодного супутника.`,"custom_assistant_Not understood":`Not understood`,"custom_assistant_Nothing recognized":`Нічого не розпізнано`,"custom_assistant_Per-device permissions":`Дозволи для кожного пристрою`,"custom_assistant_Play answer (backend TTS)":`Відтворити відповідь (бекенд TTS)`,"custom_assistant_Please select a .tflite model file":`Виберіть файл моделі .tflite`,custom_assistant_Question:Kh,"custom_assistant_Read answers aloud":`Прочитайте відповіді вголос`,custom_assistant_Recognized:qh,custom_assistant_Record:Jh,"custom_assistant_Recorded audio":`Записане аудіо`,"custom_assistant_Refresh device cache":`Оновити кеш пристрою`,"custom_assistant_Remove satellite":`Видалити сателіт`,"custom_assistant_Remove satellite %s and all its states?":`Видалити сателіт %s з усіма його станами?`,"custom_assistant_Reply audio":`Аудіо відповіді`,"custom_assistant_Reply to a question":`Reply to a question`,custom_assistant_Request:Yh,"custom_assistant_Request details":`Подробиці запиту`,custom_assistant_Room:Xh,custom_assistant_Routine:Zh,"custom_assistant_Rule-based NLU":`Rule-based NLU (local)`,custom_assistant_Satellite:Qh,custom_assistant_Satellites:$h,"custom_assistant_Save the configuration (the instance will restart) before chatting.":`Збережіть конфігурацію (екземпляр перезавантажиться) перед спілкуванням у чаті.`,custom_assistant_Script:eg,"custom_assistant_Send announcement":`Надіслати оголошення`,"custom_assistant_Settings for %s":`Settings for %s`,"custom_assistant_Show processing details":`Show processing details`,"custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.":`Shows all requests live: satellites, Telegram, scripts and this chat.`,custom_assistant_Source:tg,custom_assistant_Speak:ng,"custom_assistant_Speak on all satellites":`Розмовляйте на всіх супутниках`,"custom_assistant_Speak the test sentence and recognize it":`Вимовити тестову фразу й розпізнати`,"custom_assistant_Speech output":`Синтез мовлення`,"custom_assistant_Speech recognition":`Розпізнавання мовлення`,"custom_assistant_Speech recognition time":`Speech recognition time`,"custom_assistant_Speech synthesis":`Синтез мовлення`,custom_assistant_Spoken:rg,"custom_assistant_Start the assistant instance to chat.":`Запустіть екземпляр помічника для спілкування в чаті.`,"custom_assistant_Start the assistant instance to load the device list.":`Запустіть екземпляр помічника, щоб завантажити список пристроїв.`,custom_assistant_State:ig,"custom_assistant_States read":`Прочитані стани`,"custom_assistant_States written":`Записані стани`,custom_assistant_Status:ag,custom_assistant_Steps:og,custom_assistant_Stop:sg,"custom_assistant_Stop listening":`Перестань слухати`,"custom_assistant_Stop reading answers aloud":`Перестаньте читати відповіді вголос`,"custom_assistant_Stop word":`Stop word`,"custom_assistant_Test chat":`Тестовий чат`,"custom_assistant_Test sentence":`Тестова фраза`,"custom_assistant_Test voice":`Перевірити голос`,"custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.":`Для діалогу потрібне розпізнавання мовлення: увімкніть голос на вкладці «Голос».`,"custom_assistant_The instance must be running to test the voice.":`Щоб перевірити голос, екземпляр має бути запущений.`,"custom_assistant_The microphone could not be opened:":`Не вдалося відкрити мікрофон:`,"custom_assistant_The microphone only works over https or on localhost.":`Мікрофон працює лише через https або на localhost.`,"custom_assistant_Thinking…":`Мислення…`,"custom_assistant_This satellite exposes no settings.":`This satellite exposes no settings.`,custom_assistant_Time:cg,custom_assistant_Tool:lg,"custom_assistant_Tool calls":`Виклики інструментів`,"custom_assistant_Tool result":`Результат інструмента`,"custom_assistant_Tools & states":`Інструменти та стани`,"custom_assistant_Total duration":`Загальна тривалість`,"custom_assistant_Translate all missing (%s)":`Перекласти все, що відсутні (%s)`,"custom_assistant_Translate name into %s":`Перекладіть назву мовою %s`,"custom_assistant_Type a message…":`Введіть повідомлення…`,custom_assistant_Upload:ug,"custom_assistant_Upload own wake word":`Завантажити власне слово активації`,"custom_assistant_Uploaded wake word":`Завантажене слово активації`,"custom_assistant_Wake word":`Wake word`,"custom_assistant_Wake word phrase":`Фраза активації`,"custom_assistant_Wake words":`Wake words`,custom_assistant_auto:dg,"custom_assistant_change it on the Voice tab":`змінити це на вкладці «Голос»`,custom_assistant_delete_wake_word_confirm:fg,custom_assistant_device:pg,custom_assistant_filter:mg,"custom_assistant_follow-up":`follow-up`,custom_assistant_hint:hg,"custom_assistant_in progress":`виконується`,custom_assistant_llm_downloading:gg,custom_assistant_llm_error:_g,custom_assistant_llm_idle:vg,custom_assistant_llm_installing:yg,custom_assistant_llm_loading:bg,"custom_assistant_llm_not installed":`не встановлено`,custom_assistant_llm_ready:xg,"custom_assistant_made in %s ms":`створено за %s мс`,"custom_assistant_no name in %s (showing %s)":`Немає імені в "%s" — відображається "%s"`,custom_assistant_offline:Sg,custom_assistant_online:Cg,custom_assistant_read:wg,"custom_assistant_recognized in %s ms":`розпізнано за %s мс`,custom_assistant_room:Tg,custom_assistant_sat_idle:Eg,custom_assistant_sat_listening:Dg,custom_assistant_sat_offline:Og,custom_assistant_sat_processing:kg,custom_assistant_sat_speaking:Ag,custom_assistant_type:jg,"custom_assistant_waits for reply":`waits for reply`,custom_assistant_wake_word_deleted:Mg,custom_assistant_wake_word_hint:Ng,custom_assistant_wake_word_phrase_hint:Pg,custom_assistant_wake_word_upload_hint:Fg,custom_assistant_wake_word_uploaded:Ig,"custom_assistant_Shipped with the adapter":`Постачаються з адаптером`,custom_assistant_bundled_wake_word_hint:Lg,custom_assistant_wake_word_installed:Rg,custom_assistant_wake_word_installed_replaced:zg,custom_assistant_wake_word_installed_full:Bg,custom_assistant_write:Vg,"custom_assistant_Add a model":`Додати модель`,"custom_assistant_Answer time":`Час відповіді`,"custom_assistant_Asked / answered / handed over":`Задано / відповіли / передано`,"custom_assistant_Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly":`Ставить завантаженій моделі тестові питання мовою асистента та англійською: питання про дім вона має передати далі, а на загальні відповісти правильно`,custom_assistant_Benchmark:Hg,"custom_assistant_Delete model?":`Видалити модель?`,custom_assistant_Details:Ug,custom_assistant_Download:Wg,"custom_assistant_Estimate from the model size, not measured. Use the benchmark for real numbers.":`Оцінка за розміром моделі, не вимірювання. Реальні цифри дає тест.`,custom_assistant_Expected:Gg,custom_assistant_Failures:Kg,"custom_assistant_First token":`Перший токен`,custom_assistant_Folder:qg,"custom_assistant_Free on the disk":`Вільно на диску`,"custom_assistant_Hugging Face links are fine, also hf:org/repo/file.gguf":`Підходять посилання Hugging Face, а також hf:org/repo/file.gguf`,custom_assistant_Languages:Jg,"custom_assistant_Load time":`Час завантаження`,"custom_assistant_Loaded model":`Завантажена модель`,custom_assistant_Model:Yg,custom_assistant_Models:Xg,"custom_assistant_No models in this folder yet. Download one below.":`У цій папці ще немає моделей. Завантажте модель нижче.`,"custom_assistant_Own model: link to a .gguf file":`Своя модель: посилання на файл .gguf`,"custom_assistant_Questions asked / answered by the model / handed over to the next tier":`Поставлено питань / відповіла модель / передано наступному рівню`,"custom_assistant_Reset statistics":`Скинути статистику`,"custom_assistant_Save the settings to load the selected model. The instance restarts.":`Збережіть налаштування, щоб завантажити вибрану модель. Інстанція перезапуститься.`,custom_assistant_Size:Zg,"custom_assistant_Start the instance to manage the local models.":`Запустіть інстанцію, щоб керувати локальними моделями.`,"custom_assistant_The active model cannot be deleted":`Активну модель видалити не можна`,'custom_assistant_The engine is not installed yet. Install it on the main tab ("Install local model").':`Рушій ще не встановлено. Встановіть його на першій вкладці («Встановити локальну модель»).`,"custom_assistant_The file %s is deleted from the disk. Its statistics stay.":`Файл %s буде видалено з диска. Статистика збережеться.`,"custom_assistant_Time until the first word: reading the question":`Час до першого слова: читання питання`,"custom_assistant_Timeouts and errors among the questions asked":`Тайм-аути та помилки серед поставлених питань`,"custom_assistant_Tokens/s":`Токенів/с`,custom_assistant_Use:Qg,custom_assistant_correct:$g,custom_assistant_downloaded:e_,custom_assistant_downloading:t_,custom_assistant_failed:n_,"custom_assistant_hand over":`передати`,"custom_assistant_last used":`востаннє`,"custom_assistant_many languages":`багато мов`,"custom_assistant_missed hand-overs":`пропущені передачі`,"custom_assistant_needless hand-overs":`зайві передачі`,"custom_assistant_not enough space":`мало місця`,"custom_assistant_not the language of the assistant":`не мова асистента`,custom_assistant_parameters:r_,custom_assistant_speed:i_,custom_assistant_timeouts:a_,"custom_assistant_wrong answers":`неправильні відповіді`,"custom_assistant_very fast":`дуже швидко`,custom_assistant_fast:o_,custom_assistant_medium:s_,custom_assistant_slow:c_,custom_assistant_llm_benchmark:l_,"Model folder":`Папка моделей`,"Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.":`Абсолютний шлях, наприклад /mnt/ssd/llm. Порожньо = папка даних інстанції. Уже завантажені в інше місце моделі не переносяться.`,"custom_assistant_Start the instance to test the voice":`Запустіть екземпляр, щоб перевірити голос`,"custom_assistant_Try this voice":`Спробувати цей голос`,custom_assistant_synthesis:u_,"custom_assistant_%s answers in the journal":`Відповідей у журналі: %s`,"custom_assistant_Request comes from":`Звідки надходить запит`,custom_assistant_Voice:d_,"custom_assistant_Voice is off":`Голос вимкнено`,"custom_assistant_No telegram instance sends here":`Жоден екземпляр telegram не надсилає сюди`,"custom_assistant_The tab Chat of these settings":`Вкладка «Чат» цих налаштувань`,"custom_assistant_No smart-text2command instance chosen":`Екземпляр smart-text2command не вибрано`,"custom_assistant_%s is not running":`%s не запущено`,"custom_assistant_Local decision":`Локальне рішення`,"custom_assistant_First the routines:":`Спершу рутини:`,"custom_assistant_Off: everything goes to the models":`Вимк.: усе йде до моделей`,"custom_assistant_Built-in rules:":`Вбудовані правила:`,"custom_assistant_devices, timers, alarms, time, weather":`пристрої, таймери, будильники, час, погода`,"custom_assistant_Devices:":`Пристрої:`,"custom_assistant_timers, alarms, time, weather":`таймери, будильники, час, погода`,"custom_assistant_default model":`модель за замовчуванням`,"custom_assistant_Model:":`Модель:`,"custom_assistant_The last step":`Останній крок`,"custom_assistant_Asked before the cloud":`Питають до хмари`,"custom_assistant_Gives up after:":`Здається через:`,custom_assistant_Off:f_,"custom_assistant_No pi-agent instance chosen":`Екземпляр pi-agent не вибрано`,"custom_assistant_Off: answers only locally":`Вимк.: відповідає лише локально`,"custom_assistant_with its own model, tools and permissions":`зі своєю моделлю, інструментами та правами`,"custom_assistant_Provider:":`Постачальник:`,custom_assistant_automatic:p_,"custom_assistant_with the tools of this adapter":`з інструментами цього адаптера`,"custom_assistant_as text":`текстом`,"custom_assistant_not understood":`не зрозуміло`,"custom_assistant_handed on":`передано далі`,"custom_assistant_only if the cloud fails":`лише якщо хмара недоступна`,"custom_assistant_not running":`не запущено`,"custom_assistant_Install %s":`Встановити %s`,"custom_assistant_Voice satellites (speech recognition and speech output)":`Голосові сателіти (розпізнавання та синтез мовлення)`,"custom_assistant_Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.":`Сателіти адаптера assistant-satellite працюють завжди. Подробиці на вкладках «Голос» і «Супутники».`,"custom_assistant_Messages of %s come here.":`Повідомлення з %s надходять сюди.`,"custom_assistant_In the settings of the telegram adapter, choose %s as the assistant instance.":`У налаштуваннях адаптера telegram виберіть %s як екземпляр асистента.`,"custom_assistant_The tab Chat of these settings, also to try out every step.":`Вкладка «Чат» цих налаштувань — зокрема, щоб випробувати кожен крок.`,"custom_assistant_From a script: %s, or write the question into %s.":`Зі скрипта: %s, або запишіть запитання в %s.`,"custom_assistant_Built-in rules":`Вбудовані правила`,"custom_assistant_Every request goes to the models. Only the routines are still checked first.":`Кожен запит іде до моделей. Спершу перевіряються лише рутини.`,"custom_assistant_Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.":`Сталі правила розуміють вмикання, диммування та стан пристроїв, таймери, будильники, час і погоду — за кілька мілісекунд, офлайн. Що вони не зрозуміли, іде далі.`,"custom_assistant_The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.":`Адаптер smart-text2command вчиться вашим формулюванням на прикладах, виконує лише дозволені в ньому дії та перепитує, якщо кімната чи пристрій незрозумілі. Він розуміє німецьку та англійську. Таймери, будильники, час і погода залишаються за вбудованими правилами; що не зрозумів жоден із них, іде далі.`,"custom_assistant_smart-text2command instance":`Екземпляр smart-text2command`,"custom_assistant_Before this, %s routines are checked (tab Commands).":`Перед цим перевіряються рутини: %s (вкладка «Команди»).`,"custom_assistant_Routines (fixed phrases with their own actions) are set up on the tab Commands.":`Рутини (готові фрази з власними діями) налаштовуються на вкладці «Команди».`,"custom_assistant_Use a local LLM":`Використовувати локальну LLM`,"custom_assistant_The list of models needs the running instance.":`Для списку моделей екземпляр має бути запущений.`,"custom_assistant_Ask before the cloud":`Питати до хмари`,"custom_assistant_Without a cloud step the local model is the last step.":`Без хмарного кроку локальна модель — останній крок.`,"custom_assistant_Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.":`Кожен запит, який не зрозуміло локальне рішення, спершу йде до неї. Заощаджує звернення до хмари, але на Raspberry Pi додає 10–25 секунд.`,"custom_assistant_It only answers when the cloud fails (offline, quota).":`Відповідає лише тоді, коли хмара недоступна (немає мережі, вичерпано квоту).`,"custom_assistant_Gives up after (s)":`Здається через (с)`,"custom_assistant_Download and compare models on the tab Local models.":`Завантажувати й порівнювати моделі — на вкладці «Локальні моделі».`,"custom_assistant_AI provider":`Постачальник ШІ`,"custom_assistant_Only the local steps answer; a request they do not understand gets a fixed sentence.":`Відповідають лише локальні кроки; на незрозумілий запит надходить готова фраза.`,custom_assistant_Provider:m_,"custom_assistant_empty = automatic":`порожньо = автоматично`,"custom_assistant_Provider, model and key come from the system settings of admin (tab AI there).":`Постачальник, модель і ключ беруться із системних налаштувань admin (там вкладка «ШІ»).`,"custom_assistant_The API key and the other details are on the tab AI.":`Ключ API та інші подробиці — на вкладці «ШІ».`,"custom_assistant_The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.":`Адаптер pi-agent відповідає своєю моделлю, своїми інструментами та правами запису; кожне джерело запитів має там власну розмову.`,"custom_assistant_pi-agent instance":`Екземпляр pi-agent`,"custom_assistant_Changes take effect when the settings are saved.":`Зміни набувають чинності після збереження налаштувань.`,"custom_assistant_How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.":`Як запит проходить через асистента. Кожен крок відповідає на те, що зрозумів, решта йде до наступного. Натисніть на крок, щоб налаштувати його.`,'custom_assistant_Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.':`Перед усіма кроками: стоп-слово вимикає таймер, що дзвонить, відповідь на відкрите запитання йде тому, хто запитав, а «режим діалогу ввімк./вимк.» перемикає діалог сателіта. Запит про скрипт або із зображенням іде одразу до хмарного кроку.`,"custom_assistant_%s s on average (%s in the journal)":`у середньому %s с (%s у журналі)`,"custom_assistant_No ioBroker.voice instance chosen":`Екземпляр ioBroker.voice не вибрано`,"custom_assistant_Server:":`Сервер:`,"custom_assistant_Reserve:":`Резерв:`,"custom_assistant_Language:":`Мова:`,"custom_assistant_Text requests skip this step.":`Текстові запити пропускають цей крок.`,"custom_assistant_Off: only text requests":`Вимк.: лише текстові запити`,"custom_assistant_Voice:":`Голос:`,"custom_assistant_default voice":`голос за замовчуванням`,"custom_assistant_Switch commands: a beep":`Команди перемикання: звуковий сигнал`,"custom_assistant_Longest answer: %s characters":`Найдовша відповідь: %s символів`,"custom_assistant_Long answers are not cut":`Довгі відповіді не обрізаються`,"custom_assistant_Only answers to speech; text requests get text back.":`Лише відповіді на мовлення; на текстові запити надходить текст.`,"custom_assistant_Off: answers as text":`Вимк.: відповіді текстом`,custom_assistant_speech:h_,"custom_assistant_Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.":`Перетворює мовлення сателітів на текст. Він також слухає голосові повідомлення з Telegram і режим діалогу в чаті. Ключі та інші налаштування — на вкладці «Голос».`,"custom_assistant_Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.":`Промовляє відповідь на тому сателіті, який запитав, а також оголошення. Ключі та інші налаштування — на вкладці «Голос».`,"custom_assistant_Follow-up questions in a conversation go straight to the cloud.":`Уточнювальні запитання в поточній розмові одразу йдуть у хмару.`,"custom_assistant_What no step understands gets a fixed sentence.":`На те, що не зрозумів жоден крок, надходить готова фраза.`,custom_assistant_Music:g_,"custom_assistant_Adapter command":`Команда адаптера`},v_=e({custom_assistant_Announcement:()=>y_,custom_assistant_Answer:()=>b_,custom_assistant_Benchmark:()=>wv,custom_assistant_Cancel:()=>x_,custom_assistant_Chat:()=>S_,custom_assistant_Close:()=>C_,custom_assistant_Context:()=>w_,custom_assistant_Copied:()=>T_,custom_assistant_Copy:()=>E_,custom_assistant_Delete:()=>D_,custom_assistant_Details:()=>Tv,custom_assistant_Download:()=>Ev,custom_assistant_Error:()=>O_,custom_assistant_Expected:()=>Dv,custom_assistant_Failures:()=>Ov,custom_assistant_Folder:()=>kv,custom_assistant_Host:()=>k_,custom_assistant_Languages:()=>Av,custom_assistant_Model:()=>jv,custom_assistant_Models:()=>Mv,custom_assistant_Music:()=>Xv,custom_assistant_Off:()=>Kv,custom_assistant_Provider:()=>Jv,custom_assistant_Question:()=>A_,custom_assistant_Recognized:()=>j_,custom_assistant_Record:()=>M_,custom_assistant_Request:()=>N_,custom_assistant_Room:()=>P_,custom_assistant_Routine:()=>F_,custom_assistant_Satellite:()=>I_,custom_assistant_Satellites:()=>L_,custom_assistant_Script:()=>R_,custom_assistant_Size:()=>Nv,custom_assistant_Source:()=>z_,custom_assistant_Speak:()=>B_,custom_assistant_Spoken:()=>V_,custom_assistant_State:()=>H_,custom_assistant_Status:()=>U_,custom_assistant_Steps:()=>W_,custom_assistant_Stop:()=>G_,custom_assistant_Time:()=>K_,custom_assistant_Tool:()=>q_,custom_assistant_Upload:()=>J_,custom_assistant_Use:()=>Pv,custom_assistant_Voice:()=>Gv,custom_assistant_auto:()=>Y_,custom_assistant_automatic:()=>qv,custom_assistant_bundled_wake_word_hint:()=>bv,custom_assistant_correct:()=>Fv,custom_assistant_delete_wake_word_confirm:()=>X_,custom_assistant_device:()=>Z_,custom_assistant_downloaded:()=>Iv,custom_assistant_downloading:()=>Lv,custom_assistant_failed:()=>Rv,custom_assistant_fast:()=>`快`,custom_assistant_filter:()=>Q_,custom_assistant_hint:()=>$_,custom_assistant_llm_benchmark:()=>Uv,custom_assistant_llm_downloading:()=>ev,custom_assistant_llm_error:()=>tv,custom_assistant_llm_idle:()=>nv,custom_assistant_llm_installing:()=>rv,custom_assistant_llm_loading:()=>iv,custom_assistant_llm_ready:()=>av,custom_assistant_medium:()=>Hv,custom_assistant_offline:()=>ov,custom_assistant_online:()=>sv,custom_assistant_parameters:()=>zv,custom_assistant_read:()=>`读`,custom_assistant_room:()=>cv,custom_assistant_sat_idle:()=>lv,custom_assistant_sat_listening:()=>uv,custom_assistant_sat_offline:()=>dv,custom_assistant_sat_processing:()=>fv,custom_assistant_sat_speaking:()=>pv,custom_assistant_slow:()=>`慢`,custom_assistant_speech:()=>Yv,custom_assistant_speed:()=>Bv,custom_assistant_synthesis:()=>Wv,custom_assistant_timeouts:()=>Vv,custom_assistant_type:()=>mv,custom_assistant_wake_word_deleted:()=>hv,custom_assistant_wake_word_hint:()=>gv,custom_assistant_wake_word_installed:()=>xv,custom_assistant_wake_word_installed_full:()=>Cv,custom_assistant_wake_word_installed_replaced:()=>Sv,custom_assistant_wake_word_phrase_hint:()=>_v,custom_assistant_wake_word_upload_hint:()=>vv,custom_assistant_wake_word_uploaded:()=>yv,custom_assistant_write:()=>`写`,default:()=>Zv}),y_=`公告`,b_=`回答`,x_=`Cancel`,S_=`Chat`,C_=`Close`,w_=`上下文`,T_=`已复制`,E_=`复制`,D_=`Delete`,O_=`错误`,k_=`主持人`,A_=`问题`,j_=`识别结果`,M_=`录音`,N_=`请求`,P_=`Room`,F_=`Routine`,I_=`卫星`,L_=`卫星`,R_=`Script`,z_=`Source`,B_=`说话`,V_=`朗读内容`,H_=`State`,U_=`地位`,W_=`步骤`,G_=`停止`,K_=`时间`,q_=`工具`,J_=`上传`,Y_=`汽车`,X_=`删除“%s”?它将不再提供给设备;已下载它的设备会保留它。`,Z_=`设备`,Q_=`筛选`,$_=`取消勾选“读取”选项可将设备对语音助手隐藏,取消勾选“写入”选项可将其设置为只读(例如,锁定设备)。设备默认设置为完全允许访问。`,ev=`正在下载模型…`,tv=`错误`,nv=`闲置的`,rv=`安装发动机…`,iv=`加载中…`,av=`准备好`,ov=`离线`,sv=`在线的`,cv=`房间`,lv=`闲置的`,uv=`聆听`,dv=`离线`,fv=`加工`,pv=`请讲`,mv=`类型`,hv=`“%s”已删除。已下载它的设备会保留其副本。`,gv=`唤醒词在设备上运行。将鼠标悬停在某个词上可查看它训练所用的语言——大多数仅支持英语。`,_v=`唤醒设备时要说的话——列表中会这样显示。`,vv=`microWakeWord 模型:.tflite 文件,最好连同其 .json 一起。其他模型类型(openWakeWord、Porcupine)无法通过此方式安装。`,yv=`“%s”已上传。在上方选择它即可启用——设备会在此时下载模型。`,bv=`点击:加载到设备并启用——替换同一唤醒词的旧版本`,xv=`“%s”已启用——设备正在下载模型。`,Sv=`“%s”已替代“%s”启用——设备正在下载模型。`,Cv=`“%s”已在列表中,但所有位置都已占用。请先停用另一个唤醒词,然后选择“%s”。`,wv=`测试`,Tv=`详情`,Ev=`下载`,Dv=`预期`,Ov=`失败`,kv=`文件夹`,Av=`语言`,jv=`模型`,Mv=`模型`,Nv=`大小`,Pv=`使用`,Fv=`正确`,Iv=`已下载`,Lv=`下载中`,Rv=`失败`,zv=`参数`,Bv=`速度`,Vv=`超时`,Hv=`中等`,Uv=`测试中`,Wv=`合成`,Gv=`语音`,Kv=`关闭`,qv=`自动`,Jv=`提供商`,Yv=`语音`,Xv=`音乐`,Zv={"custom_assistant_%s of %s active":`%s of %s active`,"custom_assistant_%s s audio":`%s 秒音频`,"custom_assistant_(no spoken answer)":`(no spoken answer)`,"custom_assistant_A satellite that is still configured appears again when it connects.":`仍在配置中的卫星设备在重新连接后会再次出现。`,"custom_assistant_All sources":`All sources`,custom_assistant_Announcement:y_,custom_assistant_Answer:b_,"custom_assistant_Audio file":`音频文件`,custom_assistant_Cancel:x_,custom_assistant_Chat:S_,"custom_assistant_Clear chat":`清晰聊天`,"custom_assistant_Click for details":`点击查看详情`,custom_assistant_Close:C_,"custom_assistant_Cloud LLM":`Cloud LLM`,"custom_assistant_Collapse all":`全部折叠`,custom_assistant_Context:w_,custom_assistant_Copied:T_,custom_assistant_Copy:E_,"custom_assistant_Copy everything as JSON":`全部复制为 JSON`,custom_assistant_Delete:D_,"custom_assistant_Delete the recorded history of all sources?":`Delete the recorded history of all sources?`,"custom_assistant_Device cache cleared.":`设备缓存已清除。`,"custom_assistant_Device settings":`Device settings`,"custom_assistant_Dialog: everything you say becomes a question":`对话:你说的每句话都会成为一个问题,直到你结束对话`,"custom_assistant_Dialog: hearing you…":`对话:正在听你说 …`,"custom_assistant_Dialog: listening…":`对话:正在聆听 …`,"custom_assistant_Dialog: speaking…":`对话:正在说话 …`,"custom_assistant_Dialog: thinking…":`对话:正在思考 …`,"custom_assistant_Download as JSON":`下载为 JSON`,"custom_assistant_End the dialog":`结束对话`,custom_assistant_Error:O_,"custom_assistant_Expand all":`全部展开`,"custom_assistant_Follow-up":`追问`,"custom_assistant_Hide disabled":`隐藏已禁用`,"custom_assistant_Hide processing details":`Hide processing details`,custom_assistant_Host:k_,"custom_assistant_Last seen":`最后一次出现`,"custom_assistant_Listening…":`正在听……`,"custom_assistant_Loading…":`加载中…`,"custom_assistant_Local LLM":`Local LLM`,"custom_assistant_Local model":`本地模型`,"custom_assistant_Mic re-opened without wake word":`Mic re-opened without wake word (follow-up or question)`,"custom_assistant_Name language: %s":`名称语言:%s`,"custom_assistant_No answer":`无应答`,"custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.":`未检测到设备。请在ioBroker中为房间和功能分配状态。`,"custom_assistant_No messages yet. Type a question below.":`暂无消息。请在下方输入问题。`,"custom_assistant_No processing steps were recorded for this request.":`此请求没有记录处理步骤。仅保留最近 200 个请求的详细信息。`,"custom_assistant_No satellites registered yet.":`目前尚未注册任何卫星。`,"custom_assistant_Not understood":`Not understood`,"custom_assistant_Nothing recognized":`未识别到内容`,"custom_assistant_Per-device permissions":`每个设备的权限`,"custom_assistant_Play answer (backend TTS)":`播放答案(后端 TTS)`,"custom_assistant_Please select a .tflite model file":`请选择 .tflite 模型文件`,custom_assistant_Question:A_,"custom_assistant_Read answers aloud":`大声朗读答案`,custom_assistant_Recognized:j_,custom_assistant_Record:M_,"custom_assistant_Recorded audio":`录制的音频`,"custom_assistant_Refresh device cache":`刷新设备缓存`,"custom_assistant_Remove satellite":`删除卫星设备`,"custom_assistant_Remove satellite %s and all its states?":`删除卫星设备 %s 及其所有状态?`,"custom_assistant_Reply audio":`回复音频`,"custom_assistant_Reply to a question":`Reply to a question`,custom_assistant_Request:N_,"custom_assistant_Request details":`请求详情`,custom_assistant_Room:P_,custom_assistant_Routine:F_,"custom_assistant_Rule-based NLU":`Rule-based NLU (local)`,custom_assistant_Satellite:I_,custom_assistant_Satellites:L_,"custom_assistant_Save the configuration (the instance will restart) before chatting.":`聊天前请保存配置(实例将重启)。`,custom_assistant_Script:R_,"custom_assistant_Send announcement":`发送公告`,"custom_assistant_Settings for %s":`Settings for %s`,"custom_assistant_Show processing details":`Show processing details`,"custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.":`Shows all requests live: satellites, Telegram, scripts and this chat.`,custom_assistant_Source:z_,custom_assistant_Speak:B_,"custom_assistant_Speak on all satellites":`在所有卫星上通话`,"custom_assistant_Speak the test sentence and recognize it":`朗读测试句子并识别`,"custom_assistant_Speech output":`语音输出`,"custom_assistant_Speech recognition":`语音识别`,"custom_assistant_Speech recognition time":`Speech recognition time`,"custom_assistant_Speech synthesis":`语音合成`,custom_assistant_Spoken:V_,"custom_assistant_Start the assistant instance to chat.":`启动助手实例进行聊天。`,"custom_assistant_Start the assistant instance to load the device list.":`启动助手实例以加载设备列表。`,custom_assistant_State:H_,"custom_assistant_States read":`读取的状态`,"custom_assistant_States written":`写入的状态`,custom_assistant_Status:U_,custom_assistant_Steps:W_,custom_assistant_Stop:G_,"custom_assistant_Stop listening":`别听了`,"custom_assistant_Stop reading answers aloud":`停止大声朗读答案`,"custom_assistant_Stop word":`Stop word`,"custom_assistant_Test chat":`测试聊天`,"custom_assistant_Test sentence":`测试句子`,"custom_assistant_Test voice":`测试语音`,"custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.":`对话需要语音识别:请在“嗓音”选项卡中启用语音。`,"custom_assistant_The instance must be running to test the voice.":`实例必须正在运行才能测试语音。`,"custom_assistant_The microphone could not be opened:":`无法打开麦克风:`,"custom_assistant_The microphone only works over https or on localhost.":`麦克风仅在 https 或 localhost 下可用。`,"custom_assistant_Thinking…":`思维…`,"custom_assistant_This satellite exposes no settings.":`This satellite exposes no settings.`,custom_assistant_Time:K_,custom_assistant_Tool:q_,"custom_assistant_Tool calls":`工具调用`,"custom_assistant_Tool result":`工具结果`,"custom_assistant_Tools & states":`工具和状态`,"custom_assistant_Total duration":`总耗时`,"custom_assistant_Translate all missing (%s)":`翻译所有缺失值(%s)`,"custom_assistant_Translate name into %s":`将名称翻译成 %s`,"custom_assistant_Type a message…":`输入消息…`,custom_assistant_Upload:J_,"custom_assistant_Upload own wake word":`上传自定义唤醒词`,"custom_assistant_Uploaded wake word":`已上传的唤醒词`,"custom_assistant_Wake word":`Wake word`,"custom_assistant_Wake word phrase":`唤醒短语`,"custom_assistant_Wake words":`Wake words`,custom_assistant_auto:Y_,"custom_assistant_change it on the Voice tab":`在“语音”选项卡上更改。`,custom_assistant_delete_wake_word_confirm:X_,custom_assistant_device:Z_,custom_assistant_filter:Q_,"custom_assistant_follow-up":`follow-up`,custom_assistant_hint:$_,"custom_assistant_in progress":`进行中`,custom_assistant_llm_downloading:ev,custom_assistant_llm_error:tv,custom_assistant_llm_idle:nv,custom_assistant_llm_installing:rv,custom_assistant_llm_loading:iv,"custom_assistant_llm_not installed":`未安装`,custom_assistant_llm_ready:av,"custom_assistant_made in %s ms":`用时 %s 毫秒`,"custom_assistant_no name in %s (showing %s)":`“%s”中没有名称——显示“%s”`,custom_assistant_offline:ov,custom_assistant_online:sv,custom_assistant_read:`读`,"custom_assistant_recognized in %s ms":`识别用时 %s 毫秒`,custom_assistant_room:cv,custom_assistant_sat_idle:lv,custom_assistant_sat_listening:uv,custom_assistant_sat_offline:dv,custom_assistant_sat_processing:fv,custom_assistant_sat_speaking:pv,custom_assistant_type:mv,"custom_assistant_waits for reply":`waits for reply`,custom_assistant_wake_word_deleted:hv,custom_assistant_wake_word_hint:gv,custom_assistant_wake_word_phrase_hint:_v,custom_assistant_wake_word_upload_hint:vv,custom_assistant_wake_word_uploaded:yv,"custom_assistant_Shipped with the adapter":`随适配器提供`,custom_assistant_bundled_wake_word_hint:bv,custom_assistant_wake_word_installed:xv,custom_assistant_wake_word_installed_replaced:Sv,custom_assistant_wake_word_installed_full:Cv,custom_assistant_write:`写`,"custom_assistant_Add a model":`添加模型`,"custom_assistant_Answer time":`回答时间`,"custom_assistant_Asked / answered / handed over":`提问 / 回答 / 转交`,"custom_assistant_Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly":`用助手语言和英语向已加载的模型提出测试问题:有关家居的问题必须转交,一般问题必须答对`,custom_assistant_Benchmark:wv,"custom_assistant_Delete model?":`删除模型?`,custom_assistant_Details:Tv,custom_assistant_Download:Ev,"custom_assistant_Estimate from the model size, not measured. Use the benchmark for real numbers.":`根据模型大小估算,并非实测。真实数据请运行测试。`,custom_assistant_Expected:Dv,custom_assistant_Failures:Ov,"custom_assistant_First token":`首个令牌`,custom_assistant_Folder:kv,"custom_assistant_Free on the disk":`磁盘可用`,"custom_assistant_Hugging Face links are fine, also hf:org/repo/file.gguf":`可使用 Hugging Face 链接,也可用 hf:org/repo/file.gguf`,custom_assistant_Languages:Av,"custom_assistant_Load time":`加载时间`,"custom_assistant_Loaded model":`已加载模型`,custom_assistant_Model:jv,custom_assistant_Models:Mv,"custom_assistant_No models in this folder yet. Download one below.":`此文件夹中还没有模型。请在下方下载。`,"custom_assistant_Own model: link to a .gguf file":`自定义模型:.gguf 文件链接`,"custom_assistant_Questions asked / answered by the model / handed over to the next tier":`提问数 / 模型回答数 / 转交下一层数`,"custom_assistant_Reset statistics":`重置统计`,"custom_assistant_Save the settings to load the selected model. The instance restarts.":`保存设置以加载所选模型。实例将重新启动。`,custom_assistant_Size:Nv,"custom_assistant_Start the instance to manage the local models.":`启动实例以管理本地模型。`,"custom_assistant_The active model cannot be deleted":`无法删除当前使用的模型`,'custom_assistant_The engine is not installed yet. Install it on the main tab ("Install local model").':`引擎尚未安装。请在第一个选项卡中安装(“安装本地模型”)。`,"custom_assistant_The file %s is deleted from the disk. Its statistics stay.":`文件 %s 将从磁盘删除。其统计数据会保留。`,"custom_assistant_Time until the first word: reading the question":`到第一个词的时间:读取问题`,"custom_assistant_Timeouts and errors among the questions asked":`提问中的超时和错误`,"custom_assistant_Tokens/s":`令牌/秒`,custom_assistant_Use:Pv,custom_assistant_correct:Fv,custom_assistant_downloaded:Iv,custom_assistant_downloading:Lv,custom_assistant_failed:Rv,"custom_assistant_hand over":`转交`,"custom_assistant_last used":`最近使用`,"custom_assistant_many languages":`多种语言`,"custom_assistant_missed hand-overs":`漏转交`,"custom_assistant_needless hand-overs":`多余转交`,"custom_assistant_not enough space":`空间不足`,"custom_assistant_not the language of the assistant":`不是助手的语言`,custom_assistant_parameters:zv,custom_assistant_speed:Bv,custom_assistant_timeouts:Vv,"custom_assistant_wrong answers":`错误答案`,"custom_assistant_very fast":`非常快`,custom_assistant_fast:`快`,custom_assistant_medium:Hv,custom_assistant_slow:`慢`,custom_assistant_llm_benchmark:Uv,"Model folder":`模型文件夹`,"Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.":`绝对路径,例如 /mnt/ssd/llm。为空 = 实例的数据文件夹。已下载到其他位置的模型不会被移动。`,"custom_assistant_Start the instance to test the voice":`启动实例以测试声音`,"custom_assistant_Try this voice":`试听此声音`,custom_assistant_synthesis:Wv,"custom_assistant_%s answers in the journal":`日志中有 %s 条回答`,"custom_assistant_Request comes from":`请求来源`,custom_assistant_Voice:Gv,"custom_assistant_Voice is off":`语音已关闭`,"custom_assistant_No telegram instance sends here":`没有 telegram 实例发送到这里`,"custom_assistant_The tab Chat of these settings":`本设置中的“聊天”选项卡`,"custom_assistant_No smart-text2command instance chosen":`未选择 smart-text2command 实例`,"custom_assistant_%s is not running":`%s 未运行`,"custom_assistant_Local decision":`本地判断`,"custom_assistant_First the routines:":`先检查例程:`,"custom_assistant_Off: everything goes to the models":`关闭:全部交给模型`,"custom_assistant_Built-in rules:":`内置规则:`,"custom_assistant_devices, timers, alarms, time, weather":`设备、计时器、闹钟、时间、天气`,"custom_assistant_Devices:":`设备:`,"custom_assistant_timers, alarms, time, weather":`计时器、闹钟、时间、天气`,"custom_assistant_default model":`默认模型`,"custom_assistant_Model:":`模型:`,"custom_assistant_The last step":`最后一步`,"custom_assistant_Asked before the cloud":`先于云端询问`,"custom_assistant_Gives up after:":`超时放弃:`,custom_assistant_Off:Kv,"custom_assistant_No pi-agent instance chosen":`未选择 pi-agent 实例`,"custom_assistant_Off: answers only locally":`关闭:仅本地回答`,"custom_assistant_with its own model, tools and permissions":`使用其自己的模型、工具和权限`,"custom_assistant_Provider:":`提供商:`,custom_assistant_automatic:qv,"custom_assistant_with the tools of this adapter":`使用本适配器的工具`,"custom_assistant_as text":`文字`,"custom_assistant_not understood":`未理解`,"custom_assistant_handed on":`转交下一步`,"custom_assistant_only if the cloud fails":`仅在云端失败时`,"custom_assistant_not running":`未运行`,"custom_assistant_Install %s":`安装 %s`,"custom_assistant_Voice satellites (speech recognition and speech output)":`语音卫星(语音识别和语音输出)`,"custom_assistant_Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.":`assistant-satellite 适配器的卫星始终可用。详情见“语音”和“卫星”选项卡。`,"custom_assistant_Messages of %s come here.":`%s 的消息会发到这里。`,"custom_assistant_In the settings of the telegram adapter, choose %s as the assistant instance.":`在 telegram 适配器的设置中,将 %s 选为助手实例。`,"custom_assistant_The tab Chat of these settings, also to try out every step.":`本设置中的“聊天”选项卡,也可用于试用每一步。`,"custom_assistant_From a script: %s, or write the question into %s.":`在脚本中:%s,或将问题写入 %s。`,"custom_assistant_Built-in rules":`内置规则`,"custom_assistant_Every request goes to the models. Only the routines are still checked first.":`所有请求都交给模型。只有例程会先被检查。`,"custom_assistant_Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.":`固定规则可理解设备的开关、调光和状态,以及计时器、闹钟、时间和天气——只需几毫秒,离线运行。无法理解的请求会继续传递。`,"custom_assistant_The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.":`smart-text2command 适配器通过示例学习你的说法,只执行在其中批准的操作,并在房间或设备不明确时追问。它理解德语和英语。计时器、闹钟、时间和天气仍由内置规则处理;两者都无法理解的请求会继续传递。`,"custom_assistant_smart-text2command instance":`smart-text2command 实例`,"custom_assistant_Before this, %s routines are checked (tab Commands).":`在此之前会检查 %s 个例程(“命令”选项卡)。`,"custom_assistant_Routines (fixed phrases with their own actions) are set up on the tab Commands.":`例程(带有自身操作的固定语句)在“命令”选项卡中设置。`,"custom_assistant_Use a local LLM":`使用本地 LLM`,"custom_assistant_The list of models needs the running instance.":`模型列表需要实例正在运行。`,"custom_assistant_Ask before the cloud":`先于云端询问`,"custom_assistant_Without a cloud step the local model is the last step.":`没有云端步骤时,本地模型是最后一步。`,"custom_assistant_Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.":`本地判断无法理解的请求会先交给它。可减少云端调用,但在 Raspberry Pi 上会增加 10–25 秒。`,"custom_assistant_It only answers when the cloud fails (offline, quota).":`仅在云端失败(离线、配额用尽)时回答。`,"custom_assistant_Gives up after (s)":`超时放弃(秒)`,"custom_assistant_Download and compare models on the tab Local models.":`在“本地模型”选项卡中下载和比较模型。`,"custom_assistant_AI provider":`AI 提供商`,"custom_assistant_Only the local steps answer; a request they do not understand gets a fixed sentence.":`仅由本地步骤回答;无法理解的请求会得到一句固定回复。`,custom_assistant_Provider:Jv,"custom_assistant_empty = automatic":`留空 = 自动`,"custom_assistant_Provider, model and key come from the system settings of admin (tab AI there).":`提供商、模型和密钥来自 admin 的系统设置(其中的“AI”选项卡)。`,"custom_assistant_The API key and the other details are on the tab AI.":`API 密钥和其他详细信息在“AI”选项卡中。`,"custom_assistant_The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.":`pi-agent 适配器使用其自己的模型、工具和写入权限回答;每个请求来源在那里都有自己的对话。`,"custom_assistant_pi-agent instance":`pi-agent 实例`,"custom_assistant_Changes take effect when the settings are saved.":`保存设置后更改生效。`,"custom_assistant_How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.":`请求如何经过助手:每一步回答它能理解的内容,其余的交给下一步。点击某一步即可进行设置。`,'custom_assistant_Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.':`在所有步骤之前:停止词会让正在响铃的计时器静音,对未决问题的回答会交给提问者,“对话模式开/关”会切换卫星的对话。关于脚本或带图片的请求会直接进入云端步骤。`,"custom_assistant_%s s on average (%s in the journal)":`平均 %s 秒(日志中 %s 条)`,"custom_assistant_No ioBroker.voice instance chosen":`未选择 ioBroker.voice 实例`,"custom_assistant_Server:":`服务器:`,"custom_assistant_Reserve:":`备用:`,"custom_assistant_Language:":`语言:`,"custom_assistant_Text requests skip this step.":`文字请求跳过此步骤。`,"custom_assistant_Off: only text requests":`关闭:仅文字请求`,"custom_assistant_Voice:":`声音:`,"custom_assistant_default voice":`默认声音`,"custom_assistant_Switch commands: a beep":`开关命令:提示音`,"custom_assistant_Longest answer: %s characters":`最长回答:%s 个字符`,"custom_assistant_Long answers are not cut":`长回答不会被截断`,"custom_assistant_Only answers to speech; text requests get text back.":`仅用于语音请求的回答;文字请求得到文字回复。`,"custom_assistant_Off: answers as text":`关闭:以文字回答`,custom_assistant_speech:Yv,"custom_assistant_Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.":`将对卫星设备说的话转换为文字。它也用于 Telegram 的语音消息和聊天的对话模式。密钥和更多选项在“语音”选项卡中。`,"custom_assistant_Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.":`在提问的卫星设备上朗读回答,以及广播通知。密钥和更多选项在“语音”选项卡中。`,"custom_assistant_Follow-up questions in a conversation go straight to the cloud.":`对话中的追问会直接交给云端。`,"custom_assistant_What no step understands gets a fixed sentence.":`任何步骤都无法理解的请求会得到一句固定回复。`,custom_assistant_Music:Xv,"custom_assistant_Adapter command":`适配器命令`};we();var Qv={},$v=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries($v)){var ey;let n=((ey=e.split(`/`).pop())==null?void 0:ey.replace(`.json`,``))||`en`;Qv[n]=t.default}A.extendTranslations(Qv);var ty=new Set([`temperature`,`humidity`,`illuminance`,`motion`,`door`,`window`,`windowTilt`,`fireAlarm`,`floodAlarm`,`camera`,`weatherCurrent`,`weatherForecast`,`warning`,`location`,`info`,`chart`,`image`,`instance`]);function ny(e){return e===`lock`?{read:!0,write:!1}:{read:!0,write:!0}}var ry=[{value:`en`,label:`English`},{value:`de`,label:`Deutsch`},{value:`ru`,label:`Русский`},{value:`pt`,label:`Português`},{value:`nl`,label:`Nederlands`},{value:`fr`,label:`Français`},{value:`it`,label:`Italiano`},{value:`es`,label:`Español`},{value:`pl`,label:`Polski`},{value:`uk`,label:`Українська`},{value:`zh-cn`,label:`简体中文`}],iy=class extends G{constructor(e){super(e),W(this,`aliveSubId`,``),W(this,`onAliveChange`,(e,t)=>{let n=!!(t!=null&&t.val);n!==this.state.alive&&this.setState({alive:n,loading:n},()=>{n&&this.loadDevices()})}),this.state={...this.state,devices:[],loading:!0,alive:!1,filter:``,edits:{},savingKey:``,translatingKeys:{},rowStatus:{},hideDisabled:!1}}rowColor(e){switch(this.state.rowStatus[e]){case`dirty`:return`rgba(128,128,128,0.20)`;case`saving`:return`rgba(244,67,54,0.20)`;case`saved`:return`rgba(76,175,80,0.28)`;default:return}}setRowStatus(e,t){this.setState(n=>{let r={...n.rowStatus};return t?r[e]=t:delete r[e],{rowStatus:r}})}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}get editLang(){return String(this.props.data.voiceLanguage||``)||A.getLanguage()}componentDidUpdate(e){String(e.data.voiceLanguage||``)!==String(this.props.data.voiceLanguage||``)&&Object.keys(this.state.edits).length&&this.setState({edits:{}})}async componentDidMount(){super.componentDidMount(),this.aliveSubId=`system.adapter.${this.instanceId}.alive`;let e=!1;try{let t=await this.props.oContext.socket.getState(this.aliveSubId);e=!!(t!=null&&t.val)}catch{e=!1}this.setState({alive:e},()=>void this.loadDevices()),this.props.oContext.socket.subscribeState(this.aliveSubId,this.onAliveChange)}componentWillUnmount(){var e;this.aliveSubId&&this.props.oContext.socket.unsubscribeState(this.aliveSubId,this.onAliveChange),(e=super.componentWillUnmount)==null||e.call(this)}async loadDevices(e=4){if(!this.state.alive){this.setState({loading:!1});return}let t=[];try{let e=await this.props.oContext.socket.sendTo(this.instanceId,`getDevices`,{language:A.getLanguage()});t=(Array.isArray(e)?e:[]).filter(e=>e.type!==`button`)}catch{t=[]}!t.length&&e>0?setTimeout(()=>{this.state.alive&&this.loadDevices(e-1)},1200):this.setState({devices:t,edits:{},loading:!1})}nameFor(e){let t=this.editLang,n=e.smartName;if(typeof n==`string`&&n)return{value:n,exact:!0,from:``};if(n&&typeof n==`object`){if(n[t])return{value:n[t],exact:!0,from:t};let e=n.en?`en`:Object.keys(n)[0];if(e&&n[e])return{value:n[e],exact:!1,from:e}}return{value:e.autoName||e.name||``,exact:!1,from:`auto`}}fieldValue(e){return this.state.edits[e.key]??this.nameFor(e).value}onNameChange(e,t){let n=this.state.devices.find(t=>t.key===e),r=n?this.nameFor(n).value:``;this.setState(n=>{let i={...n.rowStatus};return t===r?i[e]===`dirty`&&delete i[e]:i[e]=`dirty`,{edits:{...n.edits,[e]:t},rowStatus:i}})}flashSaved(e){this.setRowStatus(e,`saved`),setTimeout(()=>{this.state.rowStatus[e]===`saved`&&this.setRowStatus(e,null)},2e3)}applyLocalName(e,t,n){this.setState(r=>({devices:r.devices.map(r=>{if(r.key!==e)return r;let i=r.smartName&&typeof r.smartName==`object`?{...r.smartName}:typeof r.smartName==`string`&&r.smartName?{en:r.smartName}:{};return n?i[t]=n:delete i[t],{...r,smartName:i}}),edits:(()=>{let t={...r.edits};return delete t[e],t})()}))}async saveName(e){let t=this.state.edits[e.key];if(t===void 0||t===this.nameFor(e).value)return;let n=this.editLang;this.setState({savingKey:e.key}),this.setRowStatus(e.key,`saving`);try{await this.props.oContext.socket.sendTo(this.instanceId,`setDeviceName`,{stateId:e.key,name:t,language:n}),this.applyLocalName(e.key,n,t.trim()),this.flashSaved(e.key)}catch{this.setRowStatus(e.key,`dirty`)}this.setState({savingKey:``})}async translateName(e){let t=this.nameFor(e).value,n=e.key;if(!t||this.state.translatingKeys[n])return;let r=this.editLang;this.setState(e=>({translatingKeys:{...e.translatingKeys,[n]:!0}})),this.setRowStatus(n,`saving`);try{var i;let e=await this.props.oContext.socket.sendTo(this.instanceId,`translateName`,{text:t,targetLang:r}),a=e==null||(i=e.translation)==null?void 0:i.trim();a?(await this.props.oContext.socket.sendTo(this.instanceId,`setDeviceName`,{stateId:n,name:a,language:r}),this.applyLocalName(n,r,a),this.flashSaved(n)):this.setRowStatus(n,null)}catch{this.setRowStatus(n,null)}this.setState(e=>{let t={...e.translatingKeys};return delete t[n],{translatingKeys:t}})}async translateAllMissing(){let e=this.state.devices.filter(e=>!this.nameFor(e).exact&&!this.state.translatingKeys[e.key]);await Promise.all(e.map(e=>this.translateName(e)))}getAcl(e){var t;return((t=this.props.data.deviceAcl)==null?void 0:t[e.key])||ny(e.type)}setAcl(e,t){let n=JSON.parse(JSON.stringify(this.props.data));n.deviceAcl=n.deviceAcl||{};let r=ny(e.type),i={...n.deviceAcl[e.key]||r,...t};i.read===r.read&&i.write===r.write?delete n.deviceAcl[e.key]:n.deviceAcl[e.key]=i,this.props.onChange(n)}renderItem(){var e;if(this.state.loading)return O(g,{});if(!this.state.alive)return O(I,{sx:{p:2},color:`warning.main`,children:A.t(`custom_assistant_Start the assistant instance to load the device list.`)});if(!this.state.devices.length)return O(I,{sx:{p:2},children:A.t(`custom_assistant_No devices detected. Assign states to rooms and functions in ioBroker.`)});let t=this.state.filter.trim().toLowerCase(),n=t?this.state.devices.filter(e=>`${e.name} ${e.type} ${e.room}`.toLowerCase().includes(t)):this.state.devices;this.state.hideDisabled&&(n=n.filter(e=>this.getAcl(e).read));let r=this.props.oContext.themeType===`dark`;return R(M,{sx:{width:`100%`},children:[O(I,{variant:`h6`,sx:{mt:1},children:A.t(`custom_assistant_Per-device permissions`)}),O(I,{variant:`body2`,sx:{mb:1},color:`text.secondary`,children:A.t(`custom_assistant_hint`)}),R(M,{sx:{display:`flex`,alignItems:`center`,gap:1,mb:1,flexWrap:`wrap`},children:[O(a,{size:`small`,color:`primary`,variant:`outlined`,label:A.t(`custom_assistant_Name language: %s`,((e=ry.find(e=>e.value===this.editLang))==null?void 0:e.label)||this.editLang)}),O(I,{variant:`caption`,color:`text.secondary`,children:A.t(`custom_assistant_change it on the Voice tab`)}),(()=>{let e=this.state.devices.filter(e=>!this.nameFor(e).exact).length,t=Object.keys(this.state.translatingKeys).length>0;return O(H,{size:`small`,variant:`outlined`,startIcon:t?O(U,{size:14}):O(D,{}),disabled:!e||t,onClick:()=>void this.translateAllMissing(),children:A.t(`custom_assistant_Translate all missing (%s)`,e)})})(),O(M,{sx:{flex:1}}),O(_,{control:O(j,{size:`small`,checked:this.state.hideDisabled,onChange:e=>this.setState({hideDisabled:e.target.checked})}),label:A.t(`custom_assistant_Hide disabled`)}),O(V,{variant:`standard`,size:`small`,label:`Filter`,value:this.state.filter,onChange:e=>this.setState({filter:e.target.value}),sx:{width:320}})]}),O(k,{component:le,sx:{width:`100%`},children:R(L,{size:`small`,children:[O(_e,{children:R(B,{sx:{background:r?`#333`:`#DDD`},children:[O(P,{children:A.t(`custom_assistant_device`)}),O(P,{children:A.t(`custom_assistant_type`)}),O(P,{children:A.t(`custom_assistant_room`)}),O(P,{align:`center`,children:A.t(`custom_assistant_read`)}),O(P,{align:`center`,children:A.t(`custom_assistant_write`)})]})}),O(ve,{children:n.map(e=>{let t=this.getAcl(e),n=e.writableStateIds.length>0&&!ty.has(e.type),r=!t.read;return R(B,{sx:{background:this.rowColor(e.key),opacity:r?.5:1,transition:`background-color 0.4s`},children:[R(P,{children:[(()=>{let t=this.nameFor(e),n=!!this.state.translatingKeys[e.key],r=this.state.savingKey===e.key||n;return R(M,{sx:{display:`flex`,alignItems:`flex-start`,gap:.5},children:[O(V,{variant:`standard`,size:`small`,fullWidth:!0,value:this.fieldValue(e),disabled:r,error:!t.exact&&!this.state.edits[e.key],helperText:!t.exact&&!this.state.edits[e.key]?A.t(`custom_assistant_no name in %s (showing %s)`,this.editLang,t.from===`auto`?A.t(`custom_assistant_auto`):t.from):` `,onChange:t=>this.onNameChange(e.key,t.target.value),onBlur:()=>void this.saveName(e),onKeyDown:e=>{e.key===`Enter`&&e.target.blur()},slotProps:{input:{endAdornment:this.state.savingKey===e.key?O(U,{size:14}):null}}}),O(z,{title:A.t(`custom_assistant_Translate name into %s`,this.editLang),children:O(`span`,{children:O(d,{size:`small`,disabled:r,onClick:()=>void this.translateName(e),children:n?O(U,{size:16}):O(D,{fontSize:`small`})})})})]})})(),e.stateIds.length?O(I,{variant:`caption`,component:`div`,sx:{wordBreak:`break-all`,fontStyle:`italic`,opacity:.7,fontSize:`smaller`},children:e.stateIds.join(`, `)}):null]}),O(P,{children:R(M,{sx:{display:`flex`,alignItems:`center`,gap:.75},children:[O(Se,{type:e.type,style:{width:20,height:20}}),O(`span`,{children:A.t(`type-${e.type}`)})]})}),O(P,{children:e.room&&e.room!==`No room`?e.room:`-`}),O(P,{align:`center`,children:O(x,{checked:t.read,onChange:()=>this.setAcl(e,{read:!t.read})})}),O(P,{align:`center`,children:O(x,{checked:t.write&&n,disabled:!n,onChange:()=>this.setAcl(e,{write:!t.write})})})]},e.key)})})]})})]})}},ay={chat:`Chat`,script:`custom_assistant_Script`,state:`custom_assistant_State`,telegram:`Telegram`,esphome:`ESPHome`,udp:`UDP`,native:`ioBroker`,wyoming:`Wyoming`},oy={stop:`custom_assistant_Stop word`,askReply:`custom_assistant_Reply to a question`,routine:`custom_assistant_Routine`,nlu:`custom_assistant_Rule-based NLU`,smartT2c:`smart-text2command`,localLlm:`custom_assistant_Local LLM`,cloud:`custom_assistant_Cloud LLM`,none:`custom_assistant_Not understood`},sy={stop:`#78909c`,askReply:`#78909c`,routine:`#00897b`,nlu:`#43a047`,smartT2c:`#7cb342`,localLlm:`#8e24aa`,cloud:`#1e88e5`,none:`#e53935`},cy={...oy,request:`custom_assistant_Request`,stt:`custom_assistant_Speech recognition`,context:`custom_assistant_Context`,youtube:`YouTube`,music:`custom_assistant_Music`,standard:`custom_assistant_Adapter command`,tool:`custom_assistant_Tool`,state:`custom_assistant_State`,answer:`custom_assistant_Answer`,tts:`custom_assistant_Speech synthesis`,error:`custom_assistant_Error`},ly={...sy,request:`#607d8b`,stt:`#00838f`,context:`#8d6e63`,youtube:`#ff7043`,music:`#1db954`,standard:`#7e57c2`,tool:`#fb8c00`,state:`#6d4c41`,answer:`#3949ab`,tts:`#00acc1`,error:`#c62828`};function uy(e){return typeof e==`string`?`"${e}"`:JSON.stringify(e)}function K(e){return e===void 0?``:Math.abs(e)<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(1)} s`}function dy(e){let t=e=>e.toLocaleString(),n=`${t(e.input)} in · ${t(e.output)} out`;return e.cacheRead&&(n+=` · ${t(e.cacheRead)} cached`),e.cacheWrite&&(n+=` · ${t(e.cacheWrite)} to cache`),n}var q=`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`;async function fy(e){try{return await navigator.clipboard.writeText(e),!0}catch{}let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=!1;try{n=document.execCommand(`copy`)}catch{n=!1}return document.body.removeChild(t),n}function py(e,t){let n=URL.createObjectURL(new Blob([t],{type:`application/json`})),r=document.createElement(`a`);r.href=n,r.download=e,r.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}function my(e){return`${e<0?`−`:`+`}${K(Math.abs(e))}`}function hy(e){let t=e.trim();if(/^[[{]/.test(t))try{return JSON.parse(t)}catch{return}}function gy(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function _y(e){return gy(e)&&typeof e.role==`string`&&(`content`in e||`tool_calls`in e)}function vy(e){return Array.isArray(e)&&e.length>0&&e.every(e=>gy(e)&&typeof e.type==`string`&&(`text`in e||`input`in e||`content`in e||`thinking`in e))}function yy(e){return O(z,{title:A.t(`custom_assistant_Copy`),children:O(d,{size:`small`,onClick:t=>{t.stopPropagation(),e.ctx.onCopy(e.text)},sx:{position:`absolute`,top:2,right:2,p:.25,opacity:.5,"&:hover":{opacity:1}},children:O(n,{sx:{fontSize:`0.9rem`}})})})}function by(e){return R(M,{sx:{position:`relative`},children:[O(M,{component:`pre`,sx:{m:0,p:1,pr:3.5,fontFamily:q,fontSize:`0.74rem`,lineHeight:1.45,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxHeight:e.maxHeight??360,overflow:`auto`,borderRadius:1,background:e.ctx.dark?`rgba(255,255,255,0.05)`:`rgba(0,0,0,0.04)`},children:e.text}),O(yy,{text:e.text,ctx:e.ctx})]})}function xy(e){return O(by,{text:JSON.stringify(e.value,null,2),ctx:e.ctx})}function Sy(e){let t=hy(e.text);return t===void 0?e.text.length>100||e.text.includes(`
|
|
2
|
-
`)?O(by,{text:e.text,ctx:e.ctx}):O(`span`,{style:{fontFamily:q,fontSize:`0.78rem`},children:uy(e.text)}):O(xy,{value:t,ctx:e.ctx})}var Cy={system:`#757575`,user:`#1e88e5`,assistant:`#43a047`,tool:`#fb8c00`};function J(e){return O(a,{size:`small`,label:e.label,sx:{height:18,fontSize:`0.68rem`,mr:.5,color:e.color?`#fff`:`inherit`,background:e.color||`rgba(127,127,127,0.25)`,"& .MuiChip-label":{px:.75}}})}function wy(e){let{block:t,ctx:n}=e,r=t.cache_control?O(J,{label:`cache_control`}):null,i=null,a;return t.type===`text`?a=O(by,{text:String(t.text??``),ctx:n}):t.type===`tool_use`?(i=`🔧 ${String(t.name)}`,a=O(xy,{value:t.input,ctx:n})):t.type===`tool_result`?(i=`↩ ${A.t(`custom_assistant_Tool result`)}`,a=typeof t.content==`string`?O(Sy,{text:t.content,ctx:n}):O(xy,{value:t.content,ctx:n})):t.type===`thinking`?(i=`💭 thinking`,a=O(by,{text:String(t.thinking??``),ctx:n})):a=O(xy,{value:t,ctx:n}),R(M,{sx:{mb:.75},children:[i||r?R(M,{sx:{display:`flex`,alignItems:`center`,mb:.25,fontFamily:q,fontSize:`0.76rem`},children:[O(`span`,{style:{marginRight:6},children:i}),r]}):null,a]})}function Ty(e){let{msg:t,ctx:n}=e,r=String(t.role),i=t.content,a=Array.isArray(t.tool_calls)?t.tool_calls:[];return R(M,{sx:{mb:1,pl:1,borderLeft:`3px solid ${Cy[r]||`#9e9e9e`}`},children:[O(M,{sx:{mb:.5},children:O(J,{label:r,color:Cy[r]})}),typeof i==`string`&&i?O(Sy,{text:i,ctx:n}):null,vy(i)?i.map((e,t)=>O(wy,{block:e,ctx:n},t)):null,a.map((e,t)=>{let r=gy(e.function)?e.function:{},i=typeof r.arguments==`string`?hy(r.arguments)??r.arguments:r.arguments;return R(M,{sx:{mb:.75},children:[R(M,{sx:{fontFamily:q,fontSize:`0.76rem`,mb:.25},children:[`🔧 `,String(r.name)]}),O(xy,{value:i,ctx:n})]},t)})]})}function Ey(e){let{value:t,ctx:n,depth:r}=e;if(t==null)return O(`span`,{style:{opacity:.5},children:`—`});if(typeof t==`string`)return O(Sy,{text:t,ctx:n});if(typeof t!=`object`)return O(`span`,{style:{fontFamily:q,fontSize:`0.78rem`},children:String(t)});if(Array.isArray(t)&&t.length&&t.every(_y))return O(M,{children:t.map((e,t)=>O(Ty,{msg:e,ctx:n},t))});if(vy(t))return O(M,{children:t.map((e,t)=>O(wy,{block:e,ctx:n},t))});if(_y(t))return O(Ty,{msg:t,ctx:n});if(Array.isArray(t)&&t.every(e=>typeof e!=`object`||!e)){let e=t.map(e=>typeof e==`string`?e:JSON.stringify(e)).join(`, `);return e.length>160?O(by,{text:e,ctx:n}):O(`span`,{style:{fontFamily:q,fontSize:`0.78rem`},children:e||`[]`})}return gy(t)&&r<2?O(Dy,{data:t,ctx:n,depth:r+1}):O(xy,{value:t,ctx:n})}function Dy(e){let n=Object.keys(e.data).filter(t=>e.data[t]!==void 0);return O(M,{sx:{display:`grid`,gridTemplateColumns:`minmax(90px, max-content) 1fr`,columnGap:1.5,rowGap:.5},children:n.map(n=>R(t.Fragment,{children:[O(M,{sx:{fontFamily:q,fontSize:`0.74rem`,opacity:.65,pt:`2px`},children:n}),O(M,{sx:{minWidth:0},children:O(Ey,{value:e.data[n],ctx:e.ctx,depth:e.depth})})]},n))})}function Y(e){return R(M,{sx:{minWidth:0},children:[O(I,{variant:`caption`,component:`div`,sx:{opacity:.6,lineHeight:1.2},children:e.label}),O(M,{sx:{fontSize:`0.85rem`,wordBreak:`break-word`},children:e.children})]})}function Oy(e){let{entry:r,dark:i}=e,[a,s]=t.useState(void 0),[l,u]=t.useState(``),[f,p]=t.useState(0),[m,h]=t.useState({}),[g,_]=t.useState(!1),ee=t.useRef(!1),te=t.useRef(!1),{fetchTrace:ne}=e,v=t.useCallback(async()=>{if(ee.current)te.current=!0;else{ee.current=!0;try{do{te.current=!1;try{let e=await ne(r.id);u(e.error||``),s(e.error?null:e.steps??null)}catch(e){u(e.message)}}while(te.current)}finally{ee.current=!1}}},[ne,r.id]);t.useEffect(()=>{v()},[r,v]);let b={dark:i,onCopy:e=>{fy(e).then(e=>{e&&(_(!0),setTimeout(()=>_(!1),1500))})}},x=[...a||[]].map((e,t)=>({...e,i:t})).sort((e,t)=>e.t-t.t||e.i-t.i),S=Math.min(0,...x.map(e=>e.t)),C=Math.max(r.ms||0,...x.map(e=>e.t+(e.ms||0))),ie=Math.max(1,C-S),w=x.length>0&&x.every(e=>m[e.i]||e.data===void 0),T=JSON.stringify({entry:r,steps:a??null},null,2),oe={p:1,borderRadius:1,background:i?`rgba(255,255,255,0.04)`:`rgba(0,0,0,0.03)`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,fontSize:`0.9rem`},se=e=>{let t=e.level===`error`?`#c62828`:ly[e.stage]||`#9e9e9e`,n=e.data!==void 0||!!e.tokens,r=!!m[e.i],a=()=>h(t=>({...t,[e.i]:!t[e.i]})),o=(e.t-S)/ie*100,s=e.ms===void 0?0:Math.max(e.ms/ie*100,.4);return R(M,{sx:{borderBottom:`1px solid ${i?`#333`:`#eee`}`,background:e.level===`error`?`rgba(198,40,40,0.08)`:e.level===`warn`?`rgba(251,140,0,0.08)`:void 0},children:[R(M,{role:n?`button`:void 0,tabIndex:n?0:void 0,onClick:n?a:void 0,onKeyDown:e=>{n&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a())},sx:{display:`grid`,gridTemplateColumns:`64px 132px 1fr 64px 16px`,alignItems:`center`,columnGap:1,px:1,pt:.6,cursor:n?`pointer`:`default`,"&:hover":n?{background:i?`rgba(255,255,255,0.04)`:`rgba(0,0,0,0.03)`}:{}},children:[O(M,{sx:{fontFamily:q,fontSize:`0.72rem`,opacity:.6,textAlign:`right`},children:my(e.t)}),O(M,{children:O(J,{label:cy[e.stage]?A.t(cy[e.stage]):e.stage,color:ly[e.stage]})}),R(M,{sx:{fontSize:`0.82rem`,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:r?`normal`:`nowrap`,color:e.level===`error`?`error.main`:e.level===`warn`?`warning.main`:void 0},title:e.title,children:[e.title,e.tokens?O(`span`,{style:{opacity:.6,fontSize:`0.72rem`,marginLeft:8},children:dy(e.tokens)}):null]}),O(M,{sx:{fontFamily:q,fontSize:`0.72rem`,textAlign:`right`,opacity:.8},children:K(e.ms)}),O(M,{sx:{fontSize:`0.7rem`,opacity:.5},children:n?r?`▾`:`▸`:``})]}),R(M,{sx:{position:`relative`,height:4,mx:1,mt:.4,mb:.6,ml:`calc(64px + 132px + 24px)`},children:[O(M,{sx:{position:`absolute`,inset:0,borderRadius:2,background:i?`rgba(255,255,255,0.05)`:`rgba(0,0,0,0.04)`}}),O(M,{sx:{position:`absolute`,top:s?0:-1,height:s?4:6,left:`${o}%`,width:s?`${s}%`:2,borderRadius:2,background:t}})]}),r&&n?R(M,{sx:{px:1,pb:1.5,ml:{xs:0,sm:`calc(64px + 8px)`}},children:[e.tokens?R(I,{variant:`caption`,component:`div`,sx:{mb:.5,opacity:.75},children:[`Tokens: `,dy(e.tokens)]}):null,e.data===void 0?null:O(Ey,{value:e.data,ctx:b,depth:0})]}):null]},e.i)},E=()=>a===void 0&&!l?R(M,{sx:{display:`flex`,alignItems:`center`,gap:1,p:2},children:[O(U,{size:18}),O(I,{variant:`body2`,children:A.t(`custom_assistant_Loading…`)})]}):x.length?O(M,{children:x.map(se)}):O(I,{variant:`body2`,sx:{p:2,opacity:.7},children:l||A.t(`custom_assistant_No processing steps were recorded for this request.`)}),D=()=>{let e={fontFamily:q,fontSize:`0.78rem`};return R(M,{sx:{p:1},children:[R(I,{variant:`subtitle2`,sx:{mb:.5},children:[A.t(`custom_assistant_Tool calls`),` (`,r.tools.length,`)`]}),r.tools.length?r.tools.map((t,n)=>R(M,{sx:{...e,mb:.75,color:t.error?`error.main`:void 0},children:[`🔧 `,O(`b`,{children:t.name}),`(`,JSON.stringify(t.args),`)`,` `,O(`span`,{style:{opacity:.6},children:K(t.ms)}),R(M,{sx:{pl:2.5,opacity:.85},children:[`→ `,t.error?`⚠ ${t.error}`:t.result]})]},n)):O(I,{variant:`body2`,sx:{opacity:.6,mb:1},children:`—`}),R(I,{variant:`subtitle2`,sx:{mt:2,mb:.5},children:[A.t(`custom_assistant_States read`),` (`,r.read.length,`)`]}),r.read.length?r.read.map(t=>R(M,{sx:e,children:[`📖 `,t]},t)):O(I,{variant:`body2`,sx:{opacity:.6},children:`—`}),R(I,{variant:`subtitle2`,sx:{mt:2,mb:.5},children:[A.t(`custom_assistant_States written`),` (`,r.written.length,`)`]}),r.written.length?r.written.map((t,n)=>R(M,{sx:e,children:[`✏️ `,t.id,` = `,uy(t.value)]},n)):O(I,{variant:`body2`,sx:{opacity:.6},children:`—`})]})},k=r.satellite||r.source,ce=new Date(r.ts).toLocaleString(void 0,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3});return R(o,{open:!0,onClose:e.onClose,maxWidth:`lg`,fullWidth:!0,scroll:`paper`,slotProps:{paper:{sx:{height:`90vh`}}},children:[R(me,{sx:{display:`flex`,alignItems:`center`,gap:1,pr:1},children:[R(M,{sx:{flex:1,minWidth:0},children:[A.t(`custom_assistant_Request details`),O(I,{variant:`caption`,component:`span`,sx:{ml:1,opacity:.6,fontFamily:q},children:r.id})]}),g?O(I,{variant:`caption`,color:`success.main`,children:A.t(`custom_assistant_Copied`)}):null,O(z,{title:A.t(`custom_assistant_Copy everything as JSON`),children:O(d,{size:`small`,onClick:()=>b.onCopy(T),children:O(n,{fontSize:`small`})})}),O(z,{title:A.t(`custom_assistant_Download as JSON`),children:O(d,{size:`small`,onClick:()=>py(`assistant-request-${r.id}.json`,T),children:O(ge,{fontSize:`small`})})}),O(d,{size:`small`,onClick:e.onClose,children:O(ae,{fontSize:`small`})})]}),R(F,{dividers:!0,children:[R(M,{sx:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:.5,mb:1},children:[O(J,{label:A.t(ay[r.transport]||r.transport)}),k&&k!==`chat`?O(J,{label:k}):null,r.room&&r.room!==k?O(J,{label:r.room}):null,r.wakeWord===void 0?null:O(J,{label:`🎙 ${r.wakeWord||A.t(`custom_assistant_follow-up`)}`}),r.tier?O(J,{label:A.t(oy[r.tier]),color:sy[r.tier]}):null,r.detail?O(I,{variant:`caption`,sx:{fontFamily:q},children:r.detail}):null,r.done?null:R(M,{sx:{display:`flex`,alignItems:`center`,gap:.5,ml:1},children:[O(U,{size:12}),O(I,{variant:`caption`,children:A.t(`custom_assistant_in progress`)})]})]}),R(M,{sx:{display:`grid`,gridTemplateColumns:{xs:`1fr`,md:`1fr 1fr`},gap:1,mb:1.5},children:[R(M,{children:[O(I,{variant:`caption`,sx:{opacity:.6},children:A.t(`custom_assistant_Question`)}),O(M,{sx:oe,children:r.question})]}),R(M,{children:[O(I,{variant:`caption`,sx:{opacity:.6},children:A.t(r.error?`custom_assistant_Error`:`custom_assistant_Answer`)}),O(M,{sx:{...oe,color:r.error?`error.main`:void 0},children:r.error||r.answer||(r.done?O(`i`,{style:{opacity:.6},children:A.t(`custom_assistant_(no spoken answer)`)}):`…`)})]})]}),R(M,{sx:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(150px, 1fr))`,gap:1.5,mb:1.5},children:[O(Y,{label:A.t(`custom_assistant_Time`),children:ce}),O(Y,{label:A.t(`custom_assistant_Total duration`),children:r.done?K(r.ms):`…`}),O(Y,{label:A.t(`custom_assistant_Source`),children:r.source||`—`}),r.audioMs===void 0?null:O(Y,{label:A.t(`custom_assistant_Recorded audio`),children:K(r.audioMs)}),r.sttMs===void 0?null:O(Y,{label:A.t(`custom_assistant_Speech recognition`),children:K(r.sttMs)}),r.ttsMs===void 0?null:O(Y,{label:A.t(`custom_assistant_Speech synthesis`),children:K(r.ttsMs)}),r.replyAudioMs===void 0?null:O(Y,{label:A.t(`custom_assistant_Reply audio`),children:K(r.replyAudioMs)}),r.tokens?O(Y,{label:`Tokens`,children:dy(r.tokens)}):null,O(Y,{label:A.t(`custom_assistant_Tool calls`),children:r.tools.length}),O(Y,{label:A.t(`custom_assistant_States read`),children:r.read.length}),O(Y,{label:A.t(`custom_assistant_States written`),children:r.written.length}),r.followUp?O(Y,{label:A.t(`custom_assistant_Follow-up`),children:A.t(`custom_assistant_waits for reply`)}):null]}),R(M,{sx:{display:`flex`,alignItems:`center`,borderBottom:`1px solid ${i?`#444`:`#ddd`}`,mb:.5},children:[R(he,{value:f,onChange:(e,t)=>p(t),sx:{flex:1,minHeight:36,"& .MuiTab-root":{minHeight:36,py:0}},children:[O(be,{label:`${A.t(`custom_assistant_Steps`)}${x.length?` (${x.length})`:``}`}),O(be,{label:A.t(`custom_assistant_Tools & states`)}),O(be,{label:`JSON`})]}),f===0&&x.length?O(z,{title:A.t(w?`custom_assistant_Collapse all`:`custom_assistant_Expand all`),children:O(d,{size:`small`,onClick:()=>h(w?{}:Object.fromEntries(x.map(e=>[e.i,!0]))),children:O(w?y:c,{fontSize:`small`})})}):null]}),f===0?E():null,f===1?D():null,f===2?O(by,{text:T,ctx:b,maxHeight:1e4}):null]}),O(re,{children:O(H,{onClick:e.onClose,children:A.t(`custom_assistant_Close`)})})]})}var ky=16e3,X=30,Ay=ky*X/1e3,jy=.02,My=400,Ny={minStartLevel:400,minEndLevel:240,startFactor:3.5,endFactor:2,silenceMs:1e3,longSilenceMs:1600,longAfterMs:2500,minSpeechMs:250,speechGapMs:300,maxMs:3e4,preRollMs:400,tailMs:300,warmupMs:150};function Py(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n]*e[n];return Math.sqrt(t/e.length)}var Fy=class{constructor(e={}){W(this,`opts`,void 0),W(this,`pending`,new Int16Array),W(this,`floor`,null),W(this,`seenMs`,0),W(this,`history`,[]),W(this,`frames`,null),W(this,`speech`,!1),W(this,`voicedMs`,0),W(this,`quietMs`,0),W(this,`spokenMs`,0),W(this,`level`,0),this.opts={...Ny,...e}}get startLevel(){return Math.max(this.opts.minStartLevel,(this.floor??0)*this.opts.startFactor)}get endLevel(){return Math.min(this.startLevel,Math.max(this.opts.minEndLevel,(this.floor??0)*this.opts.endFactor))}get hearing(){return this.frames!==null}reset(){this.pending=new Int16Array,this.history=[],this.frames=null,this.speech=!1,this.voicedMs=0,this.quietMs=0,this.spokenMs=0,this.level=0}push(e){let t=e;this.pending.length&&(t=new Int16Array(this.pending.length+e.length),t.set(this.pending),t.set(e,this.pending.length));let n=0,r=null;for(;t.length-n>=Ay;){let e=t.slice(n,n+Ay);n+=Ay,r=this.frame(e)||r}return this.pending=t.slice(n),r}frame(e){let t=this.opts,n=Py(e);if(this.level=n,this.seenMs+=X,this.floor=this.floor===null?0:n<this.floor?n:this.frames?this.floor:this.floor+(n-this.floor)*jy,!this.frames)return this.history.push(e),this.history.length>Math.ceil(t.preRollMs/X)+1&&this.history.shift(),this.seenMs>=t.warmupMs&&n>=this.startLevel&&(this.frames=this.history,this.history=[],this.voicedMs=X,this.quietMs=0),null;this.frames.push(e);let r=n>=this.endLevel;if(!this.speech){if(r)this.voicedMs+=X,this.quietMs=0;else if(this.quietMs+=X,this.quietMs>=t.speechGapMs)return this.history=this.frames.slice(-(Math.ceil(t.preRollMs/X)+1)),this.frames=null,null;return this.voicedMs>=t.minSpeechMs&&(this.speech=!0,this.spokenMs=this.voicedMs+this.quietMs),null}this.spokenMs+=X,r?this.quietMs=0:this.quietMs+=X;let i=this.spokenMs-this.quietMs,a=t.longAfterMs&&i>=t.longAfterMs?t.longSilenceMs:t.silenceMs;if(this.quietMs>=a||this.spokenMs>=t.maxMs){let e=Math.max(0,Math.floor((this.quietMs-t.tailMs)/X)),n=this.frames.slice(0,this.frames.length-e);return this.reset(),Iy(n)}return null}};function Iy(e){let t=new Int16Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}var Ly=class{constructor(e){W(this,`pos`,0),W(this,`last`,0),W(this,`ratio`,void 0),this.ratio=e/ky}process(e){let t=new Int16Array(Math.ceil((e.length+1)/this.ratio)+1),n=0;for(;this.pos<e.length-1;){let r=Math.floor(this.pos),i=r<0?this.last:e[r],a=i+(e[r+1]-i)*(this.pos-r);t[n++]=Math.round(Math.max(-1,Math.min(1,a))*32767),this.pos+=this.ratio}return this.pos-=e.length,this.last=e.length?e[e.length-1]:this.last,t.subarray(0,n)}};function Ry(e){let t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),n=``;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(n)}var zy=class{constructor(e){W(this,`handlers`,void 0),W(this,`context`,null),W(this,`stream`,null),W(this,`node`,null),W(this,`resampler`,null),W(this,`detector`,new Fy),W(this,`busy`,!1),W(this,`resumeAt`,0),W(this,`stopped`,!1),this.handlers=e}static get supported(){var e;return typeof window<`u`&&window.isSecureContext&&!!((e=navigator.mediaDevices)!=null&&e.getUserMedia)}async start(){let e=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}});if(this.stopped){e.getTracks().forEach(e=>e.stop());return}let t=new AudioContext;t.state===`suspended`&&await t.resume();let n=t.createMediaStreamSource(e),r=t.createScriptProcessor(2048,1,1);this.resampler=new Ly(t.sampleRate),r.onaudioprocess=e=>this.onAudio(e.inputBuffer.getChannelData(0)),n.connect(r),r.connect(t.destination),this.context=t,this.stream=e,this.node=r}stop(){var e,t;this.stopped=!0,this.node&&(this.node.onaudioprocess=null,this.node.disconnect()),(e=this.stream)==null||e.getTracks().forEach(e=>e.stop()),(t=this.context)==null||t.close().catch(()=>{}),this.node=null,this.stream=null,this.context=null}onAudio(e){var t,n,r,i;if(this.stopped||!this.resampler)return;let a=this.resampler.process(e);if(this.busy||Date.now()<this.resumeAt)return;let o=this.detector.push(a);(t=(n=this.handlers).onLevel)==null||t.call(n,Math.min(1,this.detector.level/this.detector.startLevel),this.detector.hearing),o&&(this.busy=!0,(r=(i=this.handlers).onLevel)==null||r.call(i,0,!1),this.handlers.onUtterance(o).catch(()=>{}).finally(()=>{this.busy=!1,this.resumeAt=Date.now()+My,this.detector.reset()}))}},By={},Vy=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(Vy)){var Hy;let n=((Hy=e.split(`/`).pop())==null?void 0:Hy.replace(`.json`,``))||`en`;By[n]=t.default}A.extendTranslations(By);function Uy(e){return e.satellite||e.source||e.transport}var Wy=class extends G{constructor(e){super(e),W(this,`scrollRef`,t.createRef()),W(this,`aliveSubId`,``),W(this,`journalSubId`,``),W(this,`recognition`,null),W(this,`voiceDialog`,null),W(this,`stopSpeaking`,null),W(this,`levelAt`,0),W(this,`scrollTimeout`,null),W(this,`onJournalChange`,(e,t)=>{if(!(t!=null&&t.val)||typeof t.val!=`string`)return;let n;try{n=JSON.parse(t.val)}catch{return}if(!(n!=null&&n.id))return;let r=this.isNearBottom();this.setState(e=>({entries:{...e.entries,[n.id]:n}}),()=>r&&this.scrollToBottom())}),W(this,`onAliveChange`,(e,t)=>{let n=!!(t!=null&&t.val),r=this.state.alive;this.setState({alive:n}),n||this.stopDialog(),n&&!r&&(this.checkTtsAvailable(),this.loadJournal())}),W(this,`onKeyDown`,e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),this.send())}),W(this,`fetchTrace`,async e=>await this.props.oContext.socket.sendTo(this.instanceId,`getJournalTrace`,{id:e})||{error:`no answer from the adapter`});let n=!0;try{n=window.localStorage.getItem(`assistant.chat.details`)!==`0`}catch{}this.state={...this.state,messages:[],entries:{},journalEnabled:null,showDetails:n,detailsId:``,filter:``,confirmClear:!1,input:``,sending:!1,alive:!1,listening:!1,speak:!1,ttsPlaying:``,ttsAvailable:!1,dialog:``,dialogLevel:0}}async checkTtsAvailable(){try{let e=await this.props.oContext.socket.sendTo(this.instanceId,`ttsAvailable`,{});this.setState({ttsAvailable:!!(e!=null&&e.available)})}catch{this.setState({ttsAvailable:!1})}}async loadJournal(){try{let e=await this.props.oContext.socket.sendTo(this.instanceId,`getJournal`,{});if(!e||e.enabled===void 0){this.setState({journalEnabled:!1});return}let t={};for(let n of e.entries||[])t[n.id]=n;this.setState(n=>({journalEnabled:!!e.enabled,entries:{...t,...n.entries}}),()=>this.scrollToBottom())}catch{this.setState({journalEnabled:!1})}}get speechSupported(){let e=window;return(!!e.SpeechRecognition||!!e.webkitSpeechRecognition)&&window.isSecureContext}get ttsSupported(){return typeof window<`u`&&`speechSynthesis`in window}speechLang(e){return{de:`de-DE`,en:`en-US`,ru:`ru-RU`,pt:`pt-PT`,nl:`nl-NL`,fr:`fr-FR`,it:`it-IT`,es:`es-ES`,pl:`pl-PL`,uk:`uk-UA`,"zh-cn":`zh-CN`}[e||A.getLanguage()]||`en-US`}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}async componentDidMount(){await super.componentDidMount(),this.aliveSubId=`system.adapter.${this.instanceId}.alive`,this.journalSubId=`${this.instanceId}.journal.last`;let e=!1;try{let t=await this.props.oContext.socket.getState(this.aliveSubId);e=!!(t!=null&&t.val)}catch{e=!1}this.setState({alive:e}),e&&(this.checkTtsAvailable(),this.loadJournal()),await this.props.oContext.socket.subscribeState(this.aliveSubId,this.onAliveChange),await this.props.oContext.socket.subscribeState(this.journalSubId,this.onJournalChange)}componentWillUnmount(){var e;this.aliveSubId&&this.props.oContext.socket.unsubscribeState(this.aliveSubId,this.onAliveChange),this.journalSubId&&this.props.oContext.socket.unsubscribeState(this.journalSubId,this.onJournalChange),this.scrollTimeout&&=(clearTimeout(this.scrollTimeout),null);try{var t;(t=this.recognition)==null||t.stop()}catch{}this.stopDialog(),this.ttsSupported&&window.speechSynthesis.cancel(),(e=super.componentWillUnmount)==null||e.call(this)}toggleListening(){if(this.state.listening){var e;(e=this.recognition)==null||e.stop();return}let t=window,n=t.SpeechRecognition||t.webkitSpeechRecognition;if(!n)return;let r=new n;r.lang=this.speechLang(),r.interimResults=!1,r.continuous=!1,r.onresult=e=>{var t;let n=((t=e.results)==null||(t=t[0])==null||(t=t[0])==null?void 0:t.transcript)||``;n&&this.setState({input:n},()=>void this.send())},r.onerror=()=>this.setState({listening:!1}),r.onend=()=>this.setState({listening:!1}),this.recognition=r,this.setState({listening:!0});try{r.start()}catch{this.setState({listening:!1})}}get voiceSettings(){let e=this.props.data||{};return{enabled:!!e.voiceEnabled,language:e.voiceLanguage||``}}async toggleDialog(){if(this.voiceDialog){this.stopDialog();return}try{var e;(e=this.recognition)==null||e.stop()}catch{}this.ttsSupported&&window.speechSynthesis.cancel();let t=new zy({onUtterance:e=>this.dialogTurn(e),onLevel:(e,t)=>this.onDialogLevel(e,t)});this.voiceDialog=t,this.setState({dialog:`listening`,dialogLevel:0});try{await t.start()}catch(e){this.voiceDialog===t&&this.stopDialog(),this.addMessage({role:`error`,text:`${A.t(`custom_assistant_The microphone could not be opened:`)} ${e.message}`,ts:Date.now()})}}stopDialog(){var e,t;(e=this.voiceDialog)==null||e.stop(),this.voiceDialog=null,(t=this.stopSpeaking)==null||t.call(this),this.state.dialog&&this.setState({dialog:``,dialogLevel:0})}onDialogLevel(e,t){let n=Date.now();n-this.levelAt<100&&t===(this.state.dialog===`hearing`)||(this.levelAt=n,this.setState(n=>n.dialog===`listening`||n.dialog===`hearing`?{dialogLevel:e,dialog:t?`hearing`:`listening`}:null))}async dialogTurn(e){let t=this.voiceDialog;if(!t||!this.ready)return;let n=!!this.state.journalEnabled,r=this.state.filter&&this.state.filter!==`chat`?``:this.state.filter;this.setState({dialog:`thinking`,dialogLevel:0,sending:!0,filter:r});try{let r=await this.props.oContext.socket.sendTo(this.instanceId,`ask`,{audio:Ry(e),format:`pcm`,sampleRate:ky,spoken:!0});if(this.voiceDialog!==t)return;if(!r){this.addMessage({role:`error`,text:`no answer from the adapter`,ts:Date.now()});return}if(r.heard===``)return;n&&r.journaled||(r.heard&&this.addMessage({role:`user`,text:r.heard,ts:Date.now()}),this.addMessage(r.error===void 0?{role:`assistant`,text:r.answer??``,ts:Date.now()}:{role:`error`,text:r.error,ts:Date.now()})),r.answer&&(this.setState({dialog:`speaking`}),await this.speakAndWait(r.answer))}catch(e){this.addMessage({role:`error`,text:e.message,ts:Date.now()})}finally{this.setState({sending:!1}),this.voiceDialog===t&&this.setState({dialog:`listening`,dialogLevel:0})}}speakAndWait(e){return new Promise(t=>{let n=!1,r=null,i=()=>{n||(n=!0,clearTimeout(a),this.stopSpeaking=null,t())},a=setTimeout(i,15e3+e.length*120);this.stopSpeaking=()=>{r==null||r.pause(),this.ttsSupported&&window.speechSynthesis.cancel(),i()};let o=()=>{if(n||!this.ttsSupported){i();return}let t=new SpeechSynthesisUtterance(e);t.lang=this.speechLang(this.voiceSettings.language),t.onend=i,t.onerror=i,window.speechSynthesis.cancel(),window.speechSynthesis.speak(t)};this.state.ttsAvailable?(async()=>{try{let t=await this.props.oContext.socket.sendTo(this.instanceId,`tts`,{text:e});if(n)return;if(t!=null&&t.audio){r=new Audio(`data:${t.mime||`audio/wav`};base64,${t.audio}`),r.onended=i,r.onerror=i,await r.play();return}}catch{}o()})():o()})}speak(e){if(!this.ttsSupported||!e)return;window.speechSynthesis.cancel();let t=new SpeechSynthesisUtterance(e);t.lang=this.speechLang(),window.speechSynthesis.speak(t)}async playViaBackend(e,t){if(this.ready&&t){this.setState({ttsPlaying:e});try{let e=await this.props.oContext.socket.sendTo(this.instanceId,`tts`,{text:t});if(e!=null&&e.audio){let t=new Audio(`data:${e.mime||`audio/wav`};base64,${e.audio}`);t.onended=()=>this.setState({ttsPlaying:``}),t.onerror=()=>this.setState({ttsPlaying:``}),await t.play()}else this.setState({ttsPlaying:``})}catch{this.setState({ttsPlaying:``})}}}isNearBottom(){let e=this.scrollRef.current;return!e||e.scrollHeight-e.scrollTop-e.clientHeight<80}scrollToBottom(e){e||=0;let t=this.scrollRef.current;t?t.scrollTop=t.scrollHeight:e<15&&(this.scrollTimeout=setTimeout(()=>{this.scrollTimeout=null,this.scrollToBottom(e+1)},100))}get ready(){return this.state.alive&&!this.props.changed}addMessage(e){this.setState(t=>({messages:[...t.messages,e]}),()=>this.scrollToBottom())}async send(){let e=this.state.input.trim();if(!e||this.state.sending||!this.ready)return;let t=!!this.state.journalEnabled,n=this.state.filter&&this.state.filter!==`chat`?``:this.state.filter;this.setState({input:``,sending:!0,filter:n},()=>this.scrollToBottom()),t||this.addMessage({role:`user`,text:e,ts:Date.now()});try{let t=await this.props.oContext.socket.sendTo(this.instanceId,`ask`,{text:e});(t==null?void 0:t.error)===void 0?t!=null&&t.journaled||this.addMessage({role:`assistant`,text:(t==null?void 0:t.answer)??``,ts:Date.now()}):t.journaled||this.addMessage({role:`error`,text:t.error,ts:Date.now()}),this.state.speak&&t!=null&&t.answer&&this.speak(t.answer)}catch(e){this.addMessage({role:`error`,text:e.message,ts:Date.now()})}this.setState({sending:!1})}async refreshCache(){if(this.ready)try{await this.props.oContext.socket.sendTo(this.instanceId,`clearCache`,{}),this.addMessage({role:`info`,text:A.t(`custom_assistant_Device cache cleared.`),ts:Date.now()})}catch{}}async clearHistory(){if(this.setState({confirmClear:!1,messages:[],entries:{}}),this.state.journalEnabled&&this.state.alive)try{await this.props.oContext.socket.sendTo(this.instanceId,`clearJournal`,{})}catch{}}openDetails(e){var t;(t=window.getSelection())!=null&&t.toString()||this.setState({detailsId:e})}toggleDetails(){let e=!this.state.showDetails;this.setState({showDetails:e});try{window.localStorage.setItem(`assistant.chat.details`,e?`1`:`0`)}catch{}}bubbleColors(e){let t=this.props.oContext.themeType===`dark`;return e===`user`?{bg:t?`#1e88e5`:`#2196f3`,color:`#fff`}:e===`error`?{bg:t?`#5d1f1f`:`#f8d7da`,color:t?`#ffb4b4`:`#842029`}:{bg:t?`#3a3a3a`:`#eceff1`,color:t?`#eee`:`#111`}}renderBubble(e,t,n,r,i={}){let a=t===`user`,{bg:o,color:s}=this.bubbleColors(t);return O(M,{sx:{display:`flex`,justifyContent:a?`flex-end`:`flex-start`,mb:.5},children:R(le,{elevation:1,onClick:i.onClick,title:i.onClick?A.t(`custom_assistant_Click for details`):void 0,sx:{px:1.5,py:1,maxWidth:`75%`,background:o,color:s,borderRadius:2,whiteSpace:`pre-wrap`,wordBreak:`break-word`,cursor:i.onClick?`pointer`:void 0,outline:`2px solid transparent`,transition:`outline-color 0.15s`,"&:hover":i.onClick?{outlineColor:`rgba(127,127,127,0.45)`}:void 0},children:[i.header,O(I,{variant:`body2`,component:`div`,children:n}),R(M,{sx:{display:`flex`,alignItems:`center`,justifyContent:`flex-end`,gap:.5},children:[i.footer,i.playText&&this.state.ttsAvailable?O(z,{title:A.t(`custom_assistant_Play answer (backend TTS)`),children:O(`span`,{children:O(d,{size:`small`,disabled:!this.ready||this.state.ttsPlaying===e,onClick:t=>{t.stopPropagation(),this.playViaBackend(e,i.playText||``)},sx:{p:.25,color:`inherit`,opacity:.7},children:this.state.ttsPlaying===e?O(U,{size:12}):O(v,{sx:{fontSize:`0.9rem`}})})})}):null,O(I,{variant:`caption`,component:`div`,sx:{opacity:.6,fontSize:`0.65rem`},children:new Date(r).toLocaleTimeString()})]})]})},e)}renderMessage(e,t){return e.role===`info`?O(I,{variant:`caption`,component:`div`,sx:{textAlign:`center`,opacity:.6,my:1,fontStyle:`italic`},children:e.text},`m${t}`):this.renderBubble(`m${t}`,e.role,e.text,e.ts,{playText:e.role===`assistant`?e.text:void 0})}chip(e,n,r){let i=O(a,{size:`small`,label:e,sx:{height:18,fontSize:`0.68rem`,mr:.5,color:r?`#fff`:`inherit`,background:r||`rgba(127,127,127,0.25)`,"& .MuiChip-label":{px:.75}}});return n?O(z,{title:n,children:i},e):O(t.Fragment,{children:i},e)}renderOrigin(e){let t=[this.chip(A.t(ay[e.transport]||e.transport))],n=e.satellite||(e.transport===`chat`||e.transport===`state`?``:e.source);return n&&t.push(this.chip(n,A.t(`custom_assistant_Source`))),e.room&&e.room!==n&&t.push(this.chip(e.room,A.t(`custom_assistant_Room`))),e.wakeWord!==void 0&&t.push(e.wakeWord?this.chip(`🎙 ${e.wakeWord}`,A.t(`custom_assistant_Wake word`)):this.chip(`🎙 ${A.t(`custom_assistant_follow-up`)}`,A.t(`custom_assistant_Mic re-opened without wake word`))),e.sttMs!==void 0&&t.push(this.chip(`STT ${K(e.sttMs)}`,A.t(`custom_assistant_Speech recognition time`))),O(M,{sx:{mb:.5,opacity:.9},children:t})}renderDetails(e){if(!this.state.showDetails)return null;let t={fontFamily:`monospace`,fontSize:`0.72rem`},n=[];for(let[r,i]of e.tools.entries())n.push(R(M,{sx:{...t,color:i.error?`error.main`:void 0},children:[`🔧 `,i.name,`(`,JSON.stringify(i.args),`) → `,i.error?`⚠ ${i.error}`:i.result,` `,``,O(`span`,{style:{opacity:.6},children:K(i.ms)})]},`t${r}`));e.read.length&&n.push(R(M,{sx:t,children:[`📖 `,e.read.join(`, `)]},`r`));for(let[r,i]of e.written.entries())n.push(R(M,{sx:t,children:[`✏️ `,i.id,` = `,uy(i.value)]},`w${r}`));return R(M,{onClick:()=>this.openDetails(e.id),title:A.t(`custom_assistant_Click for details`),sx:{ml:1,mb:1.5,pl:1,borderLeft:`2px solid rgba(127,127,127,0.35)`,opacity:.85,cursor:`pointer`,"&:hover":{opacity:1,borderLeftColor:`rgba(127,127,127,0.8)`}},children:[R(M,{sx:{display:`flex`,alignItems:`center`,flexWrap:`wrap`,gap:.25},children:[e.tier?this.chip(A.t(oy[e.tier]),void 0,sy[e.tier]):null,e.detail?O(I,{variant:`caption`,sx:{...t,mr:1},children:e.detail}):null,e.done?O(I,{variant:`caption`,sx:{opacity:.7,mr:1},children:K(e.ms)}):null,e.tokens?O(I,{variant:`caption`,sx:{opacity:.6,mr:1},children:dy(e.tokens)}):null,e.ttsMs===void 0?null:this.chip(`TTS ${K(e.ttsMs)}`,A.t(`custom_assistant_Speech synthesis`)),e.followUp?this.chip(A.t(`custom_assistant_waits for reply`)):null]}),n]})}renderEntry(e){let n=()=>this.openDetails(e.id),r;return r=e.done?e.error?this.renderBubble(`${e.id}a`,`error`,e.error,e.ts+(e.ms||0),{onClick:n}):this.renderBubble(`${e.id}a`,`assistant`,e.answer||O(`i`,{style:{opacity:.6},children:A.t(`custom_assistant_(no spoken answer)`)}),e.ts+(e.ms||0),{playText:e.answer||void 0,onClick:n}):R(M,{onClick:n,title:A.t(`custom_assistant_Click for details`),sx:{display:`flex`,alignItems:`center`,gap:1,p:1,opacity:.7,cursor:`pointer`},children:[O(U,{size:16}),O(I,{variant:`body2`,children:A.t(`custom_assistant_Thinking…`)})]},`${e.id}a`),R(t.Fragment,{children:[this.renderBubble(`${e.id}q`,`user`,e.question,e.ts,{header:this.renderOrigin(e),onClick:n}),r,this.renderDetails(e)]},e.id)}renderTimeline(){let{entries:e,messages:t,filter:n}=this.state,r=[];for(let t of Object.values(e))n&&Uy(t)!==n||r.push({ts:t.ts,el:()=>this.renderEntry(t)});return n&&n!==`chat`||t.forEach((e,t)=>r.push({ts:e.ts,el:()=>this.renderMessage(e,t)})),r.sort((e,t)=>e.ts-t.ts),r.map(e=>e.el())}renderFilter(){let e=[...new Set(Object.values(this.state.entries).map(Uy))].sort();return!this.state.journalEnabled||e.length<2?null:R(ye,{size:`small`,variant:`standard`,value:e.includes(this.state.filter)?this.state.filter:``,displayEmpty:!0,onChange:e=>this.setState({filter:String(e.target.value)}),sx:{mr:1,minWidth:140,fontSize:`0.85rem`},children:[O(E,{value:``,children:A.t(`custom_assistant_All sources`)}),e.map(e=>O(E,{value:e,children:e},e))]})}renderItem(){let e=this.props.oContext.themeType===`dark`,{alive:t,messages:n,entries:i,sending:a,input:c,listening:l,speak:u,journalEnabled:f,showDetails:p,dialog:m}=this.state,h=this.ready,_=this.renderTimeline(),te=!n.length&&!Object.keys(i).length;return R(M,{sx:{width:`100%`,display:`flex`,flexDirection:`column`,height:`calc(100vh - 300px)`},children:[R(M,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,mb:1},children:[R(M,{children:[O(I,{variant:`h6`,children:A.t(f?`custom_assistant_Chat`:`custom_assistant_Test chat`)}),f?O(I,{variant:`caption`,sx:{opacity:.7},children:A.t(`custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.`)}):null]}),R(M,{sx:{display:`flex`,alignItems:`center`},children:[this.renderFilter(),f?O(z,{title:A.t(p?`custom_assistant_Hide processing details`:`custom_assistant_Show processing details`),children:O(d,{size:`small`,color:p?`primary`:`default`,onClick:()=>this.toggleDetails(),children:O(p?fe:de,{})})}):null,this.ttsSupported?O(z,{title:A.t(u?`custom_assistant_Stop reading answers aloud`:`custom_assistant_Read answers aloud`),children:O(d,{size:`small`,color:u?`primary`:`default`,onClick:()=>{u&&window.speechSynthesis.cancel(),this.setState({speak:!u})},children:O(u?S:r,{})})}):null,O(z,{title:A.t(`custom_assistant_Refresh device cache`),children:O(`span`,{children:O(d,{size:`small`,disabled:!h,onClick:()=>void this.refreshCache(),children:O(b,{})})})}),O(z,{title:A.t(`custom_assistant_Clear chat`),children:O(`span`,{children:O(d,{size:`small`,disabled:te,onClick:()=>f?this.setState({confirmClear:!0}):void this.clearHistory(),children:O(xe,{})})})})]})]}),h?null:O(I,{sx:{p:2},color:`warning.main`,children:t?A.t(`custom_assistant_Save the configuration (the instance will restart) before chatting.`):A.t(`custom_assistant_Start the assistant instance to chat.`)}),R(M,{ref:this.scrollRef,sx:{flex:1,overflowY:`auto`,p:1,border:`1px solid ${e?`#444`:`#ccc`}`,borderRadius:1,background:e?`#1e1e1e`:`#fafafa`,mb:1},children:[_.length?_:O(I,{sx:{p:2,textAlign:`center`,opacity:.6},variant:`body2`,children:A.t(`custom_assistant_No messages yet. Type a question below.`)}),a&&!f?R(M,{sx:{display:`flex`,alignItems:`center`,gap:1,p:1,opacity:.7},children:[O(U,{size:16}),O(I,{variant:`body2`,children:A.t(`custom_assistant_Thinking…`)})]}):null]}),m?O(g,{sx:{mb:.5,height:3,borderRadius:1},variant:m===`thinking`||m===`speaking`?`indeterminate`:`determinate`,color:m===`hearing`?`error`:m===`speaking`?`secondary`:`primary`,value:Math.round(this.state.dialogLevel*100)}):null,R(M,{sx:{display:`flex`,alignItems:`flex-end`,gap:1},children:[zy.supported?O(z,{title:A.t(m?`custom_assistant_End the dialog`:this.voiceSettings.enabled?`custom_assistant_Dialog: everything you say becomes a question`:`custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.`),children:O(`span`,{children:O(d,{color:m?`error`:`primary`,disabled:!m&&(!h||a||!this.voiceSettings.enabled),onClick:()=>void this.toggleDialog(),children:O(ee,{})})})}):null,this.speechSupported&&!m?O(z,{title:A.t(l?`custom_assistant_Stop listening`:`custom_assistant_Speak`),children:O(`span`,{children:O(d,{color:l?`error`:`primary`,disabled:!h||a,onClick:()=>this.toggleListening(),children:O(s,{})})})}):null,O(V,{fullWidth:!0,multiline:!0,maxRows:4,size:`small`,variant:`outlined`,placeholder:A.t(m===`listening`?`custom_assistant_Dialog: listening…`:m===`hearing`?`custom_assistant_Dialog: hearing you…`:m===`thinking`?`custom_assistant_Dialog: thinking…`:m===`speaking`?`custom_assistant_Dialog: speaking…`:l?`custom_assistant_Listening…`:`custom_assistant_Type a message…`),value:c,disabled:!h||a||!!m,onChange:e=>this.setState({input:e.target.value}),onKeyDown:this.onKeyDown}),O(d,{color:`primary`,disabled:!h||a||!!m||!c.trim(),onClick:()=>void this.send(),children:O(w,{})})]}),this.state.detailsId&&i[this.state.detailsId]?O(Oy,{entry:i[this.state.detailsId],fetchTrace:this.fetchTrace,dark:e,onClose:()=>this.setState({detailsId:``})}):null,R(o,{open:this.state.confirmClear,onClose:()=>this.setState({confirmClear:!1}),children:[O(me,{children:A.t(`custom_assistant_Clear chat`)}),O(F,{children:O(I,{variant:`body2`,children:A.t(`custom_assistant_Delete the recorded history of all sources?`)})}),R(re,{children:[O(H,{color:`error`,variant:`contained`,onClick:()=>void this.clearHistory(),children:A.t(`custom_assistant_Delete`)}),O(H,{onClick:()=>this.setState({confirmClear:!1}),children:A.t(`custom_assistant_Cancel`)})]})]})]})}},Gy={},Ky=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(Ky)){var qy;let n=((qy=e.split(`/`).pop())==null?void 0:qy.replace(`.json`,``))||`en`;Gy[n]=t.default}A.extendTranslations(Gy);var Z=(e,...t)=>A.t(`custom_assistant_${e}`,...t),Jy=[{value:`system`,label:`System-wide AI settings (admin)`},{value:`openai`,label:`OpenAI`},{value:`anthropic`,label:`Anthropic (Claude)`},{value:`gemini`,label:`Google Gemini`},{value:`deepseek`,label:`DeepSeek`},{value:`openrouter`,label:`OpenRouter`},{value:`custom`,label:`OpenAI-compatible (custom)`}],Yy=[{value:`openai`,label:`OpenAI (Whisper)`},{value:`openrouter`,label:`OpenRouter`},{value:`azure`,label:`Azure Speech`},{value:`aws`,label:`AWS Transcribe`},{value:`vosk`,label:`Vosk (local)`},{value:`parakeet`,label:`ioBroker.voice (local adapter)`}],Xy=[{value:`openai`,label:`OpenAI`},{value:`openrouter`,label:`OpenRouter`},{value:`azure`,label:`Azure Speech`},{value:`aws`,label:`AWS Polly`},{value:`piper`,label:`Piper (local)`}],Zy={openai:{field:`ttsVoice`,label:`TTS voice`},openrouter:{field:`openrouterVoice`,label:`OpenRouter voice (optional)`},azure:{field:`azureVoice`,label:`Azure voice (optional)`},aws:{field:`awsVoice`,label:`AWS Polly voice (optional)`},piper:{field:`piperVoice`,label:`Piper voice (optional)`}},Qy={openai:{field:`sttModel`,label:`OpenAI STT model (optional)`},openrouter:{field:`openrouterSttModel`,label:`OpenRouter STT model (optional)`},vosk:{field:`voskModel`,label:`Vosk model (optional)`}},$y={openai:{field:`ttsModel`,label:`OpenAI TTS model (optional)`},openrouter:{field:`openrouterTtsModel`,label:`OpenRouter TTS model (optional)`}},eb=[{value:`de`,label:`Deutsch`},{value:`en`,label:`English`},{value:`ru`,label:`Русский`},{value:`fr`,label:`Français`},{value:`it`,label:`Italiano`},{value:`es`,label:`Español`},{value:`nl`,label:`Nederlands`},{value:`pl`,label:`Polski`},{value:`pt`,label:`Português`},{value:`uk`,label:`Українська`},{value:`zh-cn`,label:`中文`}],tb={sources:`#607d8b`,stt:`#ef6c00`,local:sy.nlu,localLlm:sy.localLlm,cloud:sy.cloud,tts:`#d81b60`};function nb(e){return String(e||``).replace(/^system\.adapter\./,``)}var rb=class extends G{constructor(e){super(e),W(this,`unmounted`,!1),W(this,`onAlive`,(e,t)=>{let n=!!(t!=null&&t.val);n!==this.state.alive&&this.setState({alive:n},()=>n&&void this.loadFromAdapter())}),this.state={...this.state,open:null,alive:!1,t2cInstances:null,piInstances:null,voiceInstances:null,telegram:[],models:null,counts:null,timing:null,voices:null,voicesKey:``,installing:``,error:``}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}get form(){return this.props.data||{}}set(e){this.props.onChange({...this.form,...e})}async componentDidMount(){super.componentDidMount();let e=this.props.oContext.socket;try{let t=await e.getState(`system.adapter.${this.instanceId}.alive`);this.onAlive(``,t)}catch{}await e.subscribeState(`system.adapter.${this.instanceId}.alive`,this.onAlive),this.loadInstances()}componentWillUnmount(){var e;this.unmounted=!0,this.props.oContext.socket.unsubscribeState(`system.adapter.${this.instanceId}.alive`,this.onAlive),(e=super.componentWillUnmount)==null||e.call(this)}async instancesOf(e){let t=this.props.oContext.socket;try{let n=await t.getAdapterInstances(e,!0),r=[];for(let e of n||[]){let n=e._id.replace(/^system\.adapter\./,``),i=await t.getState(`system.adapter.${n}.alive`).catch(()=>null);r.push({id:n,alive:!!(i!=null&&i.val)})}return r.sort((e,t)=>e.id.localeCompare(t.id))}catch{return[]}}async loadInstances(){let[e,t,n]=await Promise.all([this.instancesOf(`smart-text2command`),this.instancesOf(`pi-agent`),this.instancesOf(`voice`)]),r=[];try{r=(await this.props.oContext.socket.getAdapterInstances(`telegram`,!0)||[]).filter(e=>{var t;return String(((t=e.native)==null?void 0:t.assistantInstance)||``).replace(/^system\.adapter\./,``)===this.instanceId}).map(e=>e._id.replace(/^system\.adapter\./,``))}catch{}this.unmounted||this.setState({t2cInstances:e,piInstances:t,voiceInstances:n,telegram:r})}async loadFromAdapter(){let e=this.props.oContext.socket;try{let t=await e.sendTo(this.instanceId,`listLocalModels`,{dir:this.form.localLlmModelDir||``,active:this.form.localLlmModel||``});!this.unmounted&&t!=null&&t.models&&this.setState({models:t.models.map(e=>({file:e.file,name:e.name||e.file}))})}catch{}try{let t=await e.sendTo(this.instanceId,`getJournal`,{});if(!this.unmounted&&t!=null&&t.enabled){let e={},n={stt:{ms:0,n:0},tts:{ms:0,n:0}};for(let r of t.entries||[])r.tier&&(e[r.tier]=(e[r.tier]||0)+1),r.sttMs&&(n.stt.ms+=r.sttMs,n.stt.n++),r.ttsMs&&(n.tts.ms+=r.ttsMs,n.tts.n++);this.setState({counts:e,timing:n})}}catch{}}componentDidUpdate(){this.state.open===`tts`&&this.state.alive&&this.state.voicesKey!==this.voicesKey&&this.loadVoices()}get voicesKey(){let e=this.form;return[this.ttsProvider,e.voiceLanguage||``,e.openrouterTtsModel||``].join(`|`)}async loadVoices(){let e=this.voicesKey;this.setState({voicesKey:e,voices:null});let t=this.form,n=[];try{let e={ttsProvider:this.ttsProvider,language:t.voiceLanguage||``};t.openrouterTtsModel&&(e.openrouterTtsModel=t.openrouterTtsModel);let r=await this.props.oContext.socket.sendTo(this.instanceId,`getVoices`,e);n=Array.isArray(r)?r.map(String):[]}catch{}!this.unmounted&&this.state.voicesKey===e&&this.setState({voices:n})}get sttProvider(){return this.form.sttProvider||`openai`}get ttsProvider(){return this.form.ttsProvider||`openai`}label(e,t){var n;let r=(n=e.find(e=>e.value===t))==null?void 0:n.label;return r?A.t(r):t}get languageLabel(){let e=this.form.voiceLanguage||``;return e?this.label(eb,e):A.t(`System language`)}get localMode(){return this.form.useLocalNlu?this.form.nluEngine===`smart-text2command`?`t2c`:`rules`:`off`}get cloudMode(){let e=this.form.provider||`openai`;return e===`none`?`off`:e===`pi-agent`?`pi-agent`:`cloud`}get localLlmFirst(){return this.cloudMode===`off`||!!this.form.localLlmFirst}modelName(e){var t;return((t=this.state.models)==null||(t=t.find(t=>t.file===e))==null?void 0:t.name)||e}count(...e){if(!this.state.counts)return null;let t=e.reduce((e,t)=>{var n;return e+(((n=this.state.counts)==null?void 0:n[t])||0)},0);return O(I,{variant:`caption`,sx:{display:`block`,mt:1,opacity:.7},children:Z(`%s answers in the journal`,t)})}renderStep(e,t,n,r,i,a,o,s=!1){let c=tb[e];return R(le,{variant:`outlined`,onClick:()=>this.setState({open:e,error:``}),sx:{flex:s?`0 0 auto`:`1 1 auto`,minWidth:0,p:s?1:1.5,cursor:`pointer`,borderWidth:2,borderColor:r?`divider`:c,borderStyle:r?`dashed`:`solid`,opacity:r?.6:1,transition:`box-shadow 0.2s`,"&:hover":{boxShadow:4,opacity:1}},children:[R(M,{sx:{display:`flex`,alignItems:`center`,gap:1,mb:1},children:[O(M,{sx:{width:24,height:24,borderRadius:`50%`,backgroundColor:r?`text.disabled`:c,color:`#fff`,fontSize:13,fontWeight:`bold`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:t}),O(I,{lang:A.getLanguage(),sx:{fontWeight:`bold`,flexGrow:1,minWidth:0,hyphens:`auto`},children:n})]}),i,o?O(C,{severity:`warning`,sx:{mt:1,py:0},children:o}):null,a]},e)}renderArrow(e,t=!1){return R(M,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,px:.5,py:{xs:.5,md:0},width:{xs:`auto`,md:e?88:40},flexShrink:0,opacity:t?.6:.85},children:[O(I,{sx:{fontSize:28,lineHeight:1,display:{xs:`none`,md:`block`}},style:t?{letterSpacing:-2}:void 0,children:t?`⇢`:`→`}),O(I,{sx:{fontSize:28,lineHeight:1,display:{xs:`block`,md:`none`}},children:t?`⇣`:`↓`}),O(I,{variant:`caption`,lang:A.getLanguage(),sx:{textAlign:`center`,lineHeight:1.2,hyphens:`auto`,maxWidth:`100%`},children:e})]})}renderUnit(e,t,n,r){return R(M,{sx:{display:`flex`,flexDirection:{xs:`column`,md:`row`},alignItems:`stretch`,minWidth:0},children:[n?this.renderArrow(n.label):null,R(M,{sx:{display:`flex`,flexDirection:`column`,flex:`1 1 auto`,minWidth:0},children:[t,r?R(N,{children:[R(I,{variant:`caption`,sx:{textAlign:`center`,opacity:.7,my:.5},children:[`⇣ `,r.label]}),r.card]}):null]})]},e)}line(e,t){return R(I,{variant:`body2`,sx:{mb:.5},children:[e,t?R(`b`,{style:{overflowWrap:`anywhere`},children:[` `,t]}):null]})}renderSourcesStep(e){let t=this.form,n=[t.esphomeEnabled?`ESPHome`:``,t.udpServerEnabled?`UDP`:``,t.wyomingEnabled?`Wyoming`:``,`ioBroker`].filter(Boolean),r=(e,t,n,r)=>O(z,{title:r,children:O(a,{size:`small`,icon:e,label:t,variant:n?`filled`:`outlined`,sx:{opacity:n?1:.5}})},t);return this.renderStep(`sources`,e,Z(`Request comes from`),!1,R(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5},children:[r(O(s,{}),Z(`Voice`),!!t.voiceEnabled,t.voiceEnabled?n.join(`, `):Z(`Voice is off`)),r(O(w,{}),`Telegram`,this.state.telegram.length>0,this.state.telegram.length?this.state.telegram.join(`, `):Z(`No telegram instance sends here`)),r(O(ne,{}),Z(`Chat`),!0,Z(`The tab Chat of these settings`)),r(O(u,{}),`sendTo / Scripts`,!0,`sendTo('${this.instanceId}', 'ask', {text})`)]}))}duration(e){var t;let n=(t=this.state.timing)==null?void 0:t[e];return n!=null&&n.n?O(I,{variant:`caption`,sx:{display:`block`,mt:1,opacity:.7},children:Z(`%s s on average (%s in the journal)`,(n.ms/n.n/1e3).toFixed(1),n.n)}):null}caption(e){return O(I,{variant:`caption`,sx:{display:`block`,mt:.5,opacity:.7},children:e})}renderSttStep(e){var t;let n=this.form,r=!!n.voiceEnabled,i=this.sttProvider,a=Qy[i]?n[Qy[i].field]:``,o=Array.isArray(n.wakeWordLanguages)?n.wakeWordLanguages.length:0,s=i===`parakeet`||n.sttFallback===`parakeet`,c=nb(n.parakeetInstance),l=``;return r&&s&&!c?l=Z(`No ioBroker.voice instance chosen`):r&&s&&this.state.voiceInstances&&!((t=this.state.voiceInstances.find(e=>e.id===c))!=null&&t.alive)&&(l=Z(`%s is not running`,c)),this.renderStep(`stt`,e,Z(`Speech recognition`),!r,r?R(N,{children:[this.line(Z(`Provider:`),this.label(Yy,i)),a?this.line(Z(`Model:`),a):null,i===`openai`&&n.sttBaseUrl?this.line(Z(`Server:`),n.sttBaseUrl):null,n.sttFallback?this.line(Z(`Reserve:`),this.label(Yy,n.sttFallback)):null,this.line(Z(`Language:`),this.languageLabel),o?this.line(`${A.t(`Language and purpose per wake word`)}:`,String(o)):null,this.caption(Z(`Text requests skip this step.`))]}):this.line(Z(`Off: only text requests`)),r?this.duration(`stt`):null,l)}renderTtsStep(e){let t=this.form,n=!!t.voiceEnabled,r=this.ttsProvider,i=Zy[r]?t[Zy[r].field]:``,a=$y[r]?t[$y[r].field]:``,o=Array.isArray(t.ttsVoices)?t.ttsVoices.length:0,s=t.ttsMaxChars??400;return this.renderStep(`tts`,e,Z(`Speech output`),!n,n?R(N,{children:[this.line(Z(`Provider:`),this.label(Xy,r)),this.line(Z(`Voice:`),i||Z(`default voice`)),a?this.line(Z(`Model:`),a):null,t.ttsFallback?this.line(Z(`Reserve:`),this.label(Xy,t.ttsFallback)):null,o?this.line(`${A.t(`Voice per answer language`)}:`,String(o)):null,t.confirmWithTone?this.line(Z(`Switch commands: a beep`)):null,this.line(Number(s)>0?Z(`Longest answer: %s characters`,s):Z(`Long answers are not cut`)),this.caption(Z(`Only answers to speech; text requests get text back.`))]}):this.line(Z(`Off: answers as text`)),n?this.duration(`tts`):null)}renderLocalStep(e){var t;let n=this.localMode,r=Array.isArray(this.form.routines)?this.form.routines.length:0,i=nb(this.form.smartT2cInstance),a=(t=this.state.t2cInstances)==null||(t=t.find(e=>e.id===i))==null?void 0:t.alive,o=``;return n===`t2c`&&!i?o=Z(`No smart-text2command instance chosen`):n===`t2c`&&this.state.t2cInstances&&!a&&(o=Z(`%s is not running`,i)),this.renderStep(`local`,e,Z(`Local decision`),n===`off`,R(N,{children:[r?this.line(Z(`First the routines:`),String(r)):null,n===`off`?this.line(Z(`Off: everything goes to the models`)):null,n===`rules`?this.line(Z(`Built-in rules:`),Z(`devices, timers, alarms, time, weather`)):null,n===`t2c`?R(N,{children:[this.line(Z(`Devices:`),i||`smart-text2command`),this.line(Z(`Built-in rules:`),Z(`timers, alarms, time, weather`))]}):null]}),this.count(`routine`,`nlu`,`smartT2c`),o)}renderLocalLlmStep(e,t=!1){let n=!!this.form.useLocalLlm,r=this.cloudMode===`off`,i=this.form.localLlmModel?this.modelName(this.form.localLlmModel):Z(`default model`);return this.renderStep(`localLlm`,e,Z(`Local LLM`),!n,n?R(N,{children:[this.line(Z(`Model:`),i),t?null:this.line(Z(r?`The last step`:`Asked before the cloud`)),this.line(Z(`Gives up after:`),`${this.form.localLlmTimeoutSec||15} s`),!t&&!r?this.caption(Z(`Follow-up questions in a conversation go straight to the cloud.`)):null]}):this.line(Z(`Off`)),this.count(`localLlm`),void 0,t)}renderCloudStep(e){var t,n;let r=this.cloudMode,i=this.form.provider||`openai`,a=((t=Jy.find(e=>e.value===i))==null?void 0:t.label)||i,o=nb(this.form.piAgentInstance),s=``;return r===`pi-agent`&&!o?s=Z(`No pi-agent instance chosen`):r===`pi-agent`&&this.state.piInstances&&!((n=this.state.piInstances.find(e=>e.id===o))!=null&&n.alive)&&(s=Z(`%s is not running`,o)),this.renderStep(`cloud`,e,Z(`Cloud LLM`),r===`off`,r===`off`?R(N,{children:[this.line(Z(`Off: answers only locally`)),this.form.useLocalLlm?null:this.caption(Z(`What no step understands gets a fixed sentence.`))]}):r===`pi-agent`?R(N,{children:[this.line(`pi-agent:`,o||`—`),this.line(Z(`with its own model, tools and permissions`))]}):R(N,{children:[this.line(Z(`Provider:`),A.t(a)),i===`system`?null:this.line(Z(`Model:`),this.form.model||Z(`automatic`)),this.line(Z(`with the tools of this adapter`))]}),this.count(`cloud`),s)}renderDiagram(){let e=this.cloudMode===`off`,t=!!this.form.useLocalLlm,n=!!this.form.voiceEnabled,r=1,i=[this.renderUnit(`sources`,this.renderSourcesStep(r++)),this.renderUnit(`stt`,this.renderSttStep(r++),{label:n?Z(`speech`):``}),this.renderUnit(`local`,this.renderLocalStep(r++),{label:n?Z(`as text`):``})];if(this.localLlmFirst)i.push(this.renderUnit(`localLlm`,this.renderLocalLlmStep(r++),{label:Z(`not understood`)}),this.renderUnit(`cloud`,this.renderCloudStep(r++),{label:t&&!e?Z(`handed on`):``}));else{let e=this.renderCloudStep(r++);i.push(this.renderUnit(`cloud`,e,{label:Z(`not understood`)},{label:Z(`only if the cloud fails`),card:this.renderLocalLlmStep(r++,!0)}))}return i.push(this.renderUnit(`tts`,this.renderTtsStep(r++),{label:``})),O(M,{sx:{display:`grid`,gridTemplateColumns:{xs:`1fr`,md:`repeat(3, minmax(0, 1fr))`},rowGap:2},children:i})}renderModes(e,t,n){return O(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:1,mb:2},children:t.map(t=>O(H,{variant:t.value===e?`contained`:`outlined`,onClick:()=>n(t.value),children:t.label},t.value))})}renderInstanceSelect(e,t,n,r){return n?R(p,{variant:`standard`,fullWidth:!0,sx:{mb:2},children:[O(l,{children:e}),O(ye,{value:n.some(e=>e.id===t)?t:``,onChange:e=>r(String(e.target.value)),children:n.map(e=>R(E,{value:e.id,children:[e.id,` `,e.alive?``:`(${Z(`not running`)})`]},e.id))})]}):O(U,{size:20})}async install(e,t){this.setState({installing:e,error:``});try{var n;let r=await this.props.oContext.socket.sendTo(this.instanceId,`installAdapter`,{adapter:e});if(r!=null&&r.error)throw Error(r.error);r!=null&&(n=r.native)!=null&&n[t]&&this.set({[t]:r.native[t]}),await this.loadInstances()}catch(e){this.setState({error:e.message})}this.setState({installing:``})}renderInstallButton(e,t,n=e){return O(H,{variant:`outlined`,sx:{mb:2},disabled:!this.state.alive||!!this.state.installing,startIcon:this.state.installing===e?O(U,{size:16}):void 0,onClick:()=>void this.install(e,t),children:Z(`Install %s`,n)})}renderSelect(e,t,n,r,i){return R(p,{variant:`standard`,fullWidth:!0,sx:{mb:2},children:[O(l,{children:e}),O(ye,{value:n.some(e=>e.value===t)?t:``,onChange:e=>r(String(e.target.value)),children:n.map(e=>O(E,{value:e.value,children:e.label},e.value))}),i?O(I,{variant:`caption`,sx:{mt:.5,opacity:.7},children:i}):null]})}renderText(e,t,n){return O(V,{variant:`standard`,fullWidth:!0,label:e,helperText:n,value:this.form[t]||``,onChange:e=>this.set({[t]:e.target.value}),sx:{mb:2}},t)}renderVoiceSwitch(){return O(_,{sx:{mb:1},control:O(j,{checked:!!this.form.voiceEnabled,onChange:e=>this.set({voiceEnabled:e.target.checked})}),label:Z(`Voice satellites (speech recognition and speech output)`)})}providerOptions(e,t=!1){let n=e.map(e=>({value:e.value,label:A.t(e.label)}));return t?[{value:``,label:A.t(`None`)},...n]:n}renderSttSettings(){let e=this.form;if(!e.voiceEnabled)return R(N,{children:[this.renderVoiceSwitch(),this.info(Z(`Off: only text requests`))]});let t=this.sttProvider,n=t===`parakeet`||e.sttFallback===`parakeet`,r=Qy[t];return R(N,{children:[this.renderVoiceSwitch(),this.info(Z(`Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.`)),this.renderSelect(A.t(`Voice language`),e.voiceLanguage||``,[{value:``,label:A.t(`System language`)},...eb],e=>this.set({voiceLanguage:e})),this.renderSelect(A.t(`Speech-to-text provider`),t,this.providerOptions(Yy),e=>this.set({sttProvider:e})),r?this.renderText(A.t(r.label),r.field,Z(`empty = automatic`)):null,t===`openai`?this.renderText(A.t(`Speech recognition server (optional)`),`sttBaseUrl`,A.t(`OpenAI-compatible server instead of OpenAI, e.g. a local Whisper: http://192.168.1.10:8000/v1 (speaches, faster-whisper-server, LocalAI). Empty = OpenAI.`)):null,this.renderSelect(A.t(`Speech-to-text fallback`),e.sttFallback||``,this.providerOptions(Yy.filter(e=>e.value!==t),!0),e=>this.set({sttFallback:e}),A.t(`Used when the provider above fails (outage, expired key, empty quota) or returns no text for speech. A local engine keeps voice working without the internet.`)),n?R(N,{children:[this.renderInstanceSelect(A.t(`ioBroker.voice instance`),nb(e.parakeetInstance),this.state.voiceInstances,e=>this.set({parakeetInstance:e})),this.state.voiceInstances&&!this.state.voiceInstances.length?this.renderInstallButton(`voice`,`parakeetInstance`,`ioBroker.voice`):null]}):null]})}renderTtsSettings(){let e=this.form;if(!e.voiceEnabled)return R(N,{children:[this.renderVoiceSwitch(),this.info(Z(`Off: answers as text`))]});let t=this.ttsProvider,n=Zy[t],r=$y[t],i=this.state.alive?this.state.voices:[],a=n?String(e[n.field]||``):``;return R(N,{children:[this.renderVoiceSwitch(),this.info(Z(`Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.`)),this.renderSelect(A.t(`Text-to-speech provider`),t,this.providerOptions(Xy),e=>this.set({ttsProvider:e})),r?this.renderText(A.t(r.label),r.field,Z(`empty = automatic`)):null,n&&i!=null&&i.length?this.renderSelect(A.t(n.label),a,[{value:``,label:Z(`default voice`)},...(a&&!i.includes(a)?[a]:[]).concat(i).map(e=>({value:e,label:e}))],e=>this.set({[n.field]:e}),this.languageLabel):null,n&&i&&!i.length?this.renderText(A.t(n.label),n.field):null,n&&!i?O(U,{size:20,sx:{mb:2}}):null,this.renderSelect(A.t(`Text-to-speech fallback`),e.ttsFallback||``,this.providerOptions(Xy.filter(e=>e.value!==t),!0),e=>this.set({ttsFallback:e}),A.t(`Used when the provider above fails. Piper keeps the assistant speaking without the internet.`)),O(V,{variant:`standard`,type:`number`,label:A.t(`Longest spoken answer (characters)`),value:e.ttsMaxChars??400,onChange:e=>this.set({ttsMaxChars:Math.max(0,Number(e.target.value)||0)}),slotProps:{htmlInput:{min:0,max:1e4}},sx:{mb:2}}),O(_,{sx:{display:`flex`,mb:1},control:O(j,{checked:!!e.confirmWithTone,onChange:e=>this.set({confirmWithTone:e.target.checked})}),label:A.t(`Confirm switch commands with a beep`)}),Array.isArray(e.ttsVoices)&&e.ttsVoices.length?this.info(`${A.t(`Voice per answer language`)}: ${e.ttsVoices.length}`):null]})}info(e){return O(I,{variant:`body2`,sx:{mb:2,opacity:.8},children:e})}renderSourcesSettings(){let e=this.form;return R(N,{children:[O(_,{control:O(j,{checked:!!e.voiceEnabled,onChange:e=>this.set({voiceEnabled:e.target.checked})}),label:Z(`Voice satellites (speech recognition and speech output)`)}),e.voiceEnabled?R(M,{sx:{pl:4,display:`flex`,flexDirection:`column`},children:[[[`esphomeEnabled`,`ESPHome`],[`udpServerEnabled`,`UDP`],[`wyomingEnabled`,`Wyoming`]].map(([t,n])=>O(_,{control:O(j,{size:`small`,checked:!!e[t],onChange:e=>this.set({[t]:e.target.checked})}),label:n},t)),this.info(Z(`Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.`))]}):null,O(I,{sx:{fontWeight:`bold`,mt:1},children:`Telegram`}),this.info(this.state.telegram.length?Z(`Messages of %s come here.`,this.state.telegram.join(`, `)):Z(`In the settings of the telegram adapter, choose %s as the assistant instance.`,this.instanceId)),O(I,{sx:{fontWeight:`bold`},children:Z(`Chat`)}),this.info(Z(`The tab Chat of these settings, also to try out every step.`)),O(I,{sx:{fontWeight:`bold`},children:`sendTo / Scripts`}),this.info(Z(`From a script: %s, or write the question into %s.`,`sendTo('${this.instanceId}', 'ask', { text: '…' })`,`${this.instanceId}.text.request`))]})}renderLocalSettings(){let e=this.localMode,t=Array.isArray(this.form.routines)?this.form.routines.length:0;return R(N,{children:[this.renderModes(e,[{value:`off`,label:Z(`Off`)},{value:`rules`,label:Z(`Built-in rules`)},{value:`t2c`,label:`smart-text2command`}],e=>this.set(e===`off`?{useLocalNlu:!1}:{useLocalNlu:!0,nluEngine:e===`t2c`?`smart-text2command`:`rules`})),e===`off`?this.info(Z(`Every request goes to the models. Only the routines are still checked first.`)):null,e===`rules`?this.info(Z(`Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.`)):null,e===`t2c`?R(N,{children:[this.info(Z(`The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.`)),this.renderInstanceSelect(Z(`smart-text2command instance`),nb(this.form.smartT2cInstance),this.state.t2cInstances,e=>this.set({smartT2cInstance:e})),this.state.t2cInstances&&!this.state.t2cInstances.length?this.renderInstallButton(`smart-text2command`,`smartT2cInstance`):null]}):null,this.info(t?Z(`Before this, %s routines are checked (tab Commands).`,t):Z(`Routines (fixed phrases with their own actions) are set up on the tab Commands.`))]})}renderLocalLlmSettings(){let e=this.form,t=this.state.models;return R(N,{children:[O(_,{sx:{mb:1},control:O(j,{checked:!!e.useLocalLlm,onChange:e=>this.set({useLocalLlm:e.target.checked})}),label:Z(`Use a local LLM`)}),e.useLocalLlm?R(N,{children:[t?R(p,{variant:`standard`,fullWidth:!0,sx:{mb:2},children:[O(l,{children:Z(`Model`)}),R(ye,{value:t.some(t=>t.file===e.localLlmModel)?e.localLlmModel:``,onChange:e=>this.set({localLlmModel:String(e.target.value)}),children:[O(E,{value:``,children:Z(`default model`)}),t.map(e=>O(E,{value:e.file,children:e.name},e.file))]})]}):this.info(Z(`The list of models needs the running instance.`)),O(_,{control:O(j,{checked:this.localLlmFirst,disabled:this.cloudMode===`off`,onChange:e=>this.set({localLlmFirst:e.target.checked})}),label:Z(`Ask before the cloud`)}),this.info(this.cloudMode===`off`?Z(`Without a cloud step the local model is the last step.`):this.localLlmFirst?Z(`Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.`):Z(`It only answers when the cloud fails (offline, quota).`)),O(V,{variant:`standard`,type:`number`,label:Z(`Gives up after (s)`),value:e.localLlmTimeoutSec??15,onChange:e=>this.set({localLlmTimeoutSec:Number(e.target.value)||15}),slotProps:{htmlInput:{min:1,max:300}},sx:{mb:2}}),this.info(Z(`Download and compare models on the tab Local models.`))]}):null]})}renderCloudSettings(){let e=this.cloudMode,t=this.form.provider||`openai`;return R(N,{children:[this.renderModes(e,[{value:`off`,label:Z(`Off`)},{value:`cloud`,label:Z(`AI provider`)},{value:`pi-agent`,label:`pi-agent`}],e=>this.set({provider:e===`off`?`none`:e===`pi-agent`?`pi-agent`:Jy.some(e=>e.value===t)?t:`system`})),e===`off`?this.info(Z(`Only the local steps answer; a request they do not understand gets a fixed sentence.`)):null,e===`cloud`?R(N,{children:[R(p,{variant:`standard`,fullWidth:!0,sx:{mb:2},children:[O(l,{children:Z(`Provider`)}),O(ye,{value:t,onChange:e=>this.set({provider:String(e.target.value)}),children:Jy.map(e=>O(E,{value:e.value,children:A.t(e.label)},e.value))})]}),t===`system`?null:O(V,{variant:`standard`,fullWidth:!0,label:Z(`Model`),helperText:Z(`empty = automatic`),value:this.form.model||``,onChange:e=>this.set({model:e.target.value}),sx:{mb:2}}),this.info(Z(t===`system`?`Provider, model and key come from the system settings of admin (tab AI there).`:`The API key and the other details are on the tab AI.`))]}):null,e===`pi-agent`?R(N,{children:[this.info(Z(`The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.`)),this.renderInstanceSelect(Z(`pi-agent instance`),nb(this.form.piAgentInstance),this.state.piInstances,e=>this.set({piAgentInstance:e})),this.state.piInstances&&!this.state.piInstances.length?this.renderInstallButton(`pi-agent`,`piAgentInstance`):null]}):null]})}renderDialog(){let e=this.state.open;if(!e)return null;let t={sources:Z(`Request comes from`),stt:Z(`Speech recognition`),local:Z(`Local decision`),localLlm:Z(`Local LLM`),cloud:Z(`Cloud LLM`),tts:Z(`Speech output`)};return R(o,{open:!0,fullWidth:!0,maxWidth:`sm`,onClose:()=>this.setState({open:null}),children:[O(me,{sx:{borderLeft:`6px solid ${tb[e]}`},children:t[e]}),R(F,{children:[this.state.error?O(C,{severity:`error`,sx:{mb:2},children:this.state.error}):null,e===`sources`?this.renderSourcesSettings():null,e===`stt`?this.renderSttSettings():null,e===`local`?this.renderLocalSettings():null,e===`localLlm`?this.renderLocalLlmSettings():null,e===`cloud`?this.renderCloudSettings():null,e===`tts`?this.renderTtsSettings():null,O(I,{variant:`caption`,sx:{display:`block`,opacity:.7},children:Z(`Changes take effect when the settings are saved.`)})]}),O(re,{children:O(H,{variant:`contained`,onClick:()=>this.setState({open:null}),children:Z(`Close`)})})]})}renderItem(){return R(M,{sx:{width:`100%`},children:[O(I,{sx:{mb:2},children:Z(`How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.`)}),this.renderDiagram(),O(I,{variant:`body2`,sx:{mt:3,opacity:.8},children:Z(`Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.`)}),this.renderDialog()]})}},ib={},ab=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(ab)){var ob;let n=((ob=e.split(`/`).pop())==null?void 0:ob.replace(`.json`,``))||`en`;ib[n]=t.default}A.extendTranslations(ib);var sb={ready:`success`,error:`error`,installing:`info`,downloading:`info`,loading:`info`},cb=class extends G{constructor(e){super(e),W(this,`statusId`,``),W(this,`progressId`,``),W(this,`onStatus`,(e,t)=>{this.setState({status:(t==null?void 0:t.val)||`idle`})}),W(this,`onProgress`,(e,t)=>{this.setState({progress:Number(t==null?void 0:t.val)||0})}),this.state={...this.state,status:`idle`,progress:0}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}async componentDidMount(){super.componentDidMount(),this.statusId=`${this.instanceId}.localLlm.status`,this.progressId=`${this.instanceId}.localLlm.progress`;let e=this.props.oContext.socket;try{let t=await e.getState(this.statusId),n=await e.getState(this.progressId);this.setState({status:(t==null?void 0:t.val)||`idle`,progress:Number(n==null?void 0:n.val)||0})}catch{}e.subscribeState(this.statusId,this.onStatus),e.subscribeState(this.progressId,this.onProgress)}componentWillUnmount(){var e;let t=this.props.oContext.socket;this.statusId&&(t.unsubscribeState(this.statusId,this.onStatus),t.unsubscribeState(this.progressId,this.onProgress)),(e=super.componentWillUnmount)==null||e.call(this)}renderItem(){let{status:e,progress:t}=this.state,n=e===`installing`||e===`downloading`||e===`loading`,r=e===`downloading`;return R(M,{sx:{width:`100%`,mt:.5,mb:1},children:[R(M,{sx:{display:`flex`,alignItems:`center`,gap:1,mb:.5},children:[R(I,{variant:`body2`,children:[A.t(`custom_assistant_Local model`),`:`]}),O(a,{size:`small`,color:sb[e]||`default`,variant:`outlined`,label:A.t(`custom_assistant_llm_${e}`)}),r?R(I,{variant:`body2`,children:[Math.round(t),`%`]}):null]}),n?O(g,{variant:r?`determinate`:`indeterminate`,value:r?t:void 0}):null]})}},lb={},ub=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(ub)){var db;let n=((db=e.split(`/`).pop())==null?void 0:db.replace(`.json`,``))||`en`;lb[n]=t.default}A.extendTranslations(lb);var Q=(e,...t)=>A.t(`custom_assistant_${e}`,...t),fb=[8,3,11];function pb(e,t){let n=/^(\d+)\.(\d+)\.(\d+)/.exec(e||``);if(!n)return!1;for(let e=0;e<3;e++){let r=Number(n[e+1]);if(r!==t[e])return r<t[e]}return!1}function $(e){return e>=1024**3?`${(e/1024**3).toFixed(2)} GB`:e>=1024**2?`${Math.round(e/1024**2)} MB`:`${Math.round(e/1024)} KB`}function mb(e){return e==null?`-`:e>=1e4?`${Math.round(e/1e3)} s`:e>=1e3?`${(e/1e3).toFixed(1)} s`:`${Math.round(e)} ms`}function hb(e){if(e===`multi`)return Q(`many languages`);try{return new Intl.DisplayNames([A.getLanguage()],{type:`language`}).of(e)||e}catch{return e}}var gb=class extends G{constructor(e){super(e),W(this,`timer`,null),W(this,`aliveId`,``),W(this,`statusId`,``),W(this,`progressId`,``),W(this,`unmounted`,!1),W(this,`onAlive`,(e,t)=>{let n=!!(t!=null&&t.val);n!==this.state.alive&&this.setState({alive:n},()=>void this.refresh())}),W(this,`onStatus`,(e,t)=>{this.setState({status:(t==null?void 0:t.val)||``})}),W(this,`onProgress`,(e,t)=>{this.setState({progress:Number(t==null?void 0:t.val)||0})}),this.state={...this.state,list:null,alive:!1,error:``,url:``,busy:``,status:``,progress:0,confirmDelete:``,details:null,folderField:!1}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}get form(){return this.props.data||{}}async componentDidMount(){super.componentDidMount();let e=this.props.oContext.socket;this.aliveId=`system.adapter.${this.instanceId}.alive`,this.statusId=`${this.instanceId}.localLlm.status`,this.progressId=`${this.instanceId}.localLlm.progress`;try{let t=await e.getState(this.aliveId),n=await e.getState(this.statusId),r=await e.getState(this.progressId);this.setState({alive:!!(t!=null&&t.val),status:(n==null?void 0:n.val)||``,progress:Number(r==null?void 0:r.val)||0})}catch{}await e.subscribeState(this.aliveId,this.onAlive),await e.subscribeState(this.statusId,this.onStatus),await e.subscribeState(this.progressId,this.onProgress),this.refresh(),this.checkAdmin()}async checkAdmin(){try{let e=await this.props.oContext.socket.getVersion();!this.unmounted&&(e==null?void 0:e.serverName)===`admin`&&pb(e.version,fb)&&this.setState({folderField:!0})}catch{}}renderFolderField(){return this.state.folderField?O(V,{variant:`standard`,fullWidth:!0,sx:{mb:2},label:Q(`Model folder`),helperText:Q(`Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.`),value:this.form.localLlmModelDir||``,onChange:e=>void this.onChange(`localLlmModelDir`,e.target.value)}):null}componentWillUnmount(){var e;this.unmounted=!0,this.timer&&clearTimeout(this.timer);let t=this.props.oContext.socket;t.unsubscribeState(this.aliveId,this.onAlive),t.unsubscribeState(this.statusId,this.onStatus),t.unsubscribeState(this.progressId,this.onProgress),(e=super.componentWillUnmount)==null||e.call(this)}componentDidUpdate(e){var t;((t=e.data)==null?void 0:t.localLlmModelDir)!==this.form.localLlmModelDir&&this.refresh()}async send(e,t={}){let n=await this.props.oContext.socket.sendTo(this.instanceId,e,{dir:this.form.localLlmModelDir||``,active:this.form.localLlmModel||``,...t});if(n!=null&&n.error)throw Error(n.error);return n}async refresh(){if(this.timer&&=(clearTimeout(this.timer),null),!this.unmounted){if(!this.state.alive)this.setState({list:null});else try{let e=await this.send(`listLocalModels`);if(this.unmounted)return;this.setState({list:e,error:``});let t=e.downloads.some(e=>!e.error)||e.benchmarkRunning;this.timer=setTimeout(()=>void this.refresh(),t?1e3:1e4)}catch(e){this.setState({error:e.message}),this.timer=setTimeout(()=>void this.refresh(),1e4)}}}async run(e,t,n={}){this.setState({busy:e,error:``});try{await this.send(t,n)}catch(e){this.setState({error:e.message})}this.setState({busy:``}),await this.refresh()}useModel(e){this.props.onChange({...this.form,localLlmModel:e})}renderHeader(e){let t=this.form.localLlmModel||e.active,n=e.loaded&&t&&e.loaded!==t,r=e.disk?e.disk.total-e.disk.free:0;return R(M,{sx:{mb:2},children:[e.engineInstalled?null:O(C,{severity:`warning`,sx:{mb:1},children:Q(`The engine is not installed yet. Install it on the main tab ("Install local model").`)}),n?O(C,{severity:`info`,sx:{mb:1},children:Q(`Save the settings to load the selected model. The instance restarts.`)}):null,R(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:2,alignItems:`center`},children:[R(I,{variant:`body2`,children:[Q(`Folder`),`: `,O(`code`,{children:e.dir})]}),R(I,{variant:`body2`,children:[Q(`Models`),`: `,e.models.length,`, `,$(e.totalBytes)]}),e.disk?O(z,{title:`${$(r)} / ${$(e.disk.total)}`,children:R(M,{sx:{minWidth:220},children:[R(I,{variant:`body2`,children:[Q(`Free on the disk`),`: `,$(e.disk.free)]}),O(g,{variant:`determinate`,value:e.disk.total?100*r/e.disk.total:0,color:e.disk.free<2*1024**3?`warning`:`primary`})]})}):null,this.state.status?O(a,{size:`small`,variant:`outlined`,color:this.state.status===`ready`?`success`:this.state.status===`error`?`error`:`default`,label:`${Q(`Loaded model`)}: ${A.t(`custom_assistant_llm_${this.state.status}`)}${[`downloading`,`benchmark`].includes(this.state.status)?` ${Math.round(this.state.progress)}%`:``}`}):null]})]})}renderBenchmark(e){let t=e.stats.benchmark;if(!t)return`-`;let n=t.cases-t.correct;return O(z,{title:Q(`Details`),children:O(a,{size:`small`,clickable:!0,onClick:()=>this.setState({details:e}),color:n===0?`success`:n<=t.cases/4?`warning`:`error`,label:`${t.correct}/${t.cases} · ${t.tokensPerSec} t/s`})})}renderModels(e){let t=this.form.localLlmModel||e.active;return e.models.length?O(M,{sx:{overflowX:`auto`},children:R(L,{size:`small`,children:[O(_e,{children:R(B,{children:[O(P,{children:Q(`Model`)}),O(P,{align:`right`,children:Q(`Size`)}),O(P,{align:`right`,children:O(z,{title:Q(`Questions asked / answered by the model / handed over to the next tier`),children:O(`span`,{children:Q(`Asked / answered / handed over`)})})}),O(P,{align:`right`,children:O(z,{title:Q(`Timeouts and errors among the questions asked`),children:O(`span`,{children:Q(`Failures`)})})}),O(P,{align:`right`,children:Q(`Tokens/s`)}),O(P,{align:`right`,children:O(z,{title:Q(`Time until the first word: reading the question`),children:O(`span`,{children:Q(`First token`)})})}),O(P,{align:`right`,children:Q(`Answer time`)}),O(P,{align:`right`,children:Q(`Load time`)}),O(P,{children:Q(`Benchmark`)}),O(P,{})]})}),O(ve,{children:e.models.map(n=>{let r=n.stats,i=n.file===t,a=n.file===e.loaded;return R(B,{selected:i,children:[R(P,{children:[R(M,{sx:{display:`flex`,alignItems:`center`,gap:.5},children:[i?O(m,{fontSize:`small`,color:`success`}):null,O(z,{title:n.url||n.file,children:O(`span`,{children:n.name})})]}),r.lastUsed?R(I,{variant:`caption`,sx:{opacity:.7},children:[Q(`last used`),` `,new Date(r.lastUsed).toLocaleString()]}):null]}),O(P,{align:`right`,children:$(n.sizeBytes)}),R(P,{align:`right`,children:[r.asked,` / `,r.answered,` / `,r.handoffs]}),O(P,{align:`right`,children:r.failureRate===null?`-`:`${Math.round(r.failureRate*100)} % (${r.timeouts+r.errors})`}),O(P,{align:`right`,children:r.tokensPerSec===null?`-`:r.tokensPerSec.toFixed(1)}),O(P,{align:`right`,children:mb(r.avgFirstTokenMs)}),O(P,{align:`right`,children:mb(r.avgAnswerMs)}),O(P,{align:`right`,children:r.loads?mb(r.lastLoadMs):`-`}),O(P,{children:this.renderBenchmark(n)}),R(P,{sx:{whiteSpace:`nowrap`},children:[i?null:O(H,{size:`small`,onClick:()=>this.useModel(n.file),children:Q(`Use`)}),a?O(z,{title:Q(`Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly`),children:O(`span`,{children:O(d,{size:`small`,disabled:!!this.state.busy||e.benchmarkRunning,onClick:()=>void this.run(`bench:${n.file}`,`benchmarkLocalModel`),children:O(se,{fontSize:`small`})})})}):null,O(z,{title:Q(`Reset statistics`),children:O(d,{size:`small`,onClick:()=>void this.run(`reset:${n.file}`,`resetLocalModelStats`,{file:n.file}),children:O(ie,{fontSize:`small`})})}),O(z,{title:Q(i||a?`The active model cannot be deleted`:`Delete`),children:O(`span`,{children:O(d,{size:`small`,disabled:i||a,onClick:()=>this.setState({confirmDelete:n.file}),children:O(ue,{fontSize:`small`})})})})]})]},n.file)})})]})}):O(I,{variant:`body2`,sx:{my:1},children:Q(`No models in this folder yet. Download one below.`)})}renderDownloads(e){return e.downloads.length?O(M,{sx:{my:2},children:e.downloads.map(e=>R(M,{sx:{mb:1},children:[R(M,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[R(I,{variant:`body2`,sx:{flexGrow:1},children:[e.file,`:`,` `,e.error?`${Q(`failed`)}: ${e.error}`:`${$(e.received)}${e.total?` / ${$(e.total)}`:``}`]}),e.error?null:O(z,{title:Q(`Cancel`),children:O(d,{size:`small`,onClick:()=>void this.run(`cancel:${e.file}`,`cancelLocalModelDownload`,{file:e.file}),children:O(ae,{fontSize:`small`})})})]}),e.error?null:O(g,{variant:e.total?`determinate`:`indeterminate`,value:e.total?100*e.received/e.total:void 0})]},e.file))}):null}renderPresets(e){let t=A.getLanguage(),n=(e.language||`en`).split(`-`)[0],r=new Set(e.models.map(e=>e.file)),i=new Set(e.downloads.filter(e=>!e.error).map(e=>e.file));return O(M,{sx:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(280px, 1fr))`,gap:1.5,my:1},children:e.presets.map(o=>{let s=o.languages.includes(`multi`)||o.languages.includes(n),c=e.disk?o.sizeBytes+200*1024**2>e.disk.free:!1;return R(Te,{variant:`outlined`,sx:{display:`flex`,flexDirection:`column`},children:[R(Ce,{sx:{flexGrow:1,pb:1},children:[O(I,{variant:`subtitle2`,children:o.name}),R(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5,my:.5},children:[O(a,{size:`small`,label:`${o.params} ${Q(`parameters`)}`}),O(a,{size:`small`,label:$(o.sizeBytes)}),O(z,{title:Q(`Estimate from the model size, not measured. Use the benchmark for real numbers.`),children:O(a,{size:`small`,variant:`outlined`,label:`${Q(`speed`)}: ${Q(o.speed)}`})})]}),O(I,{variant:`body2`,sx:{mb:.5},children:o.description[t]||o.description.en}),R(I,{variant:`caption`,color:s?`text.secondary`:`warning.main`,children:[Q(`Languages`),`: `,o.languages.map(hb).join(`, `),s?``:`. ${Q(`not the language of the assistant`)}`]})]}),O(ce,{children:O(H,{size:`small`,startIcon:O(ge,{}),disabled:r.has(o.file)||i.has(o.file)||c||!!this.state.busy,onClick:()=>void this.run(`add:${o.id}`,`addLocalModel`,{preset:o.id}),children:r.has(o.file)?Q(`downloaded`):i.has(o.file)?Q(`downloading`):Q(c?`not enough space`:`Download`)})})]},o.id)})})}renderOwnLink(){return R(M,{sx:{display:`flex`,gap:1,alignItems:`flex-start`,my:1},children:[O(V,{variant:`standard`,fullWidth:!0,label:Q(`Own model: link to a .gguf file`),helperText:Q(`Hugging Face links are fine, also hf:org/repo/file.gguf`),value:this.state.url,onChange:e=>this.setState({url:e.target.value})}),O(H,{variant:`outlined`,startIcon:O(ge,{}),disabled:!this.state.url.trim()||!!this.state.busy,onClick:()=>void this.run(`add:url`,`addLocalModel`,{url:this.state.url.trim()}).then(()=>this.setState({url:this.state.error?this.state.url:``})),sx:{mt:1.5,whiteSpace:`nowrap`},children:Q(`Download`)})]})}renderDetails(){let e=this.state.details,t=e==null?void 0:e.stats.benchmark;return!e||!t?null:R(o,{open:!0,fullWidth:!0,maxWidth:`md`,onClose:()=>this.setState({details:null}),children:[R(me,{children:[Q(`Benchmark`),`: `,e.name]}),R(F,{children:[R(I,{variant:`body2`,sx:{mb:1},children:[new Date(t.at).toLocaleString(),` · `,t.correct,`/`,t.cases,` `,Q(`correct`),` ·`,` `,Q(`missed hand-overs`),`: `,t.missedHandoffs,` · `,Q(`needless hand-overs`),`: `,t.needlessHandoffs,` `,`· `,Q(`wrong answers`),`: `,t.wrongAnswers,` · `,Q(`timeouts`),`: `,t.timeouts,` · `,t.tokensPerSec,` t/s · `,Q(`First token`),` `,mb(t.avgFirstTokenMs),` · `,Q(`Answer time`),` `,mb(t.avgMs)]}),R(L,{size:`small`,children:[O(_e,{children:R(B,{children:[O(P,{}),O(P,{children:Q(`Question`)}),O(P,{children:Q(`Expected`)}),O(P,{children:Q(`Answer`)}),O(P,{align:`right`,children:Q(`Time`)})]})}),O(ve,{children:t.details.map((e,t)=>R(B,{children:[O(P,{children:e.ok?`✓`:`✗`}),R(P,{children:[`[`,e.lang,`] `,e.question]}),O(P,{children:e.expect===`handoff`?Q(`hand over`):e.expect}),O(P,{sx:{maxWidth:360,wordBreak:`break-word`},children:e.answer}),O(P,{align:`right`,children:mb(e.ms)})]},t))})]})]}),O(re,{children:O(H,{onClick:()=>this.setState({details:null}),children:Q(`Close`)})})]})}renderConfirmDelete(){let e=this.state.confirmDelete;return e?R(o,{open:!0,onClose:()=>this.setState({confirmDelete:``}),children:[O(me,{children:Q(`Delete model?`)}),O(F,{children:O(I,{children:Q(`The file %s is deleted from the disk. Its statistics stay.`,e)})}),R(re,{children:[O(H,{color:`error`,variant:`contained`,onClick:()=>{this.setState({confirmDelete:``}),this.run(`delete:${e}`,`deleteLocalModel`,{file:e})},children:Q(`Delete`)}),O(H,{onClick:()=>this.setState({confirmDelete:``}),children:Q(`Cancel`)})]})]}):null}renderItem(){if(!this.state.alive)return R(M,{sx:{width:`100%`},children:[this.renderFolderField(),O(C,{severity:`info`,children:Q(`Start the instance to manage the local models.`)})]});let e=this.state.list;return e?R(M,{sx:{width:`100%`},children:[this.renderFolderField(),this.state.error?O(C,{severity:`error`,sx:{mb:1},onClose:()=>this.setState({error:``}),children:this.state.error}):null,this.renderHeader(e),this.renderModels(e),this.renderDownloads(e),O(I,{variant:`h6`,sx:{mt:3},children:Q(`Add a model`)}),this.renderPresets(e),this.renderOwnLink(),this.renderDetails(),this.renderConfirmDelete()]}):R(M,{sx:{width:`100%`},children:[this.renderFolderField(),this.state.error?O(C,{severity:`error`,children:this.state.error}):O(g,{})]})}};function _b(e){let t=``,n=e.replace(/^.*[\\/]/,``).toLowerCase().replace(/\.(tflite|json|onnx)$/,``).normalize(`NFKD`).replace(/[̀-ͯ]/g,``).replace(/ß/g,`ss`).split(/[^a-z0-9]+/).filter(Boolean).filter(e=>{let n=!t&&/^20(\d{2})(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])$/.exec(e);return n?(t=`${n[1]}${n[2]}${n[3]}`,!1):!(/^\d{4,}$/.test(e)||/^[0-9a-f]{4,8}$/.test(e)&&/\d/.test(e)&&/[a-f]/.test(e)||[`microwakeword`,`openwakeword`,`wakeword`].includes(e))});return t?`${t}_${n.join(`_`)||`wake_word`}`.slice(0,40):null}function vb(e){return e.replace(/\.tflite$/i,``).split(/[_\-\s]+/).filter(Boolean).map(e=>e[0].toUpperCase()+e.slice(1)).join(` `)}function yb(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).replace(/^data:[^,]*,/,``)),r.onerror=()=>n(r.error||Error(`read failed`)),r.readAsDataURL(e)})}function bb(e,t){if(!Number.isFinite(e))return String(e);if(t&&t>0&&t<1){let n=Math.min(6,Math.ceil(-Math.log10(t)-1e-6));return String(Number(e.toFixed(n)))}return String(Number(e.toPrecision(7)))}function xb(e){let t=e.replace(/^controls\./,``),n=t.indexOf(`.`);return n<0?``:t.slice(n+1)}var Sb=[`currentVersion`,`latestVersion`,`check`,`install`,`progress`];function Cb(e){let t=e.map(xb);return t.includes(`latestVersion`)&&t.includes(`install`)&&t.includes(`progress`)}function wb(e){return e.common.write===!1}function Tb(e){var n,r;let{values:i,objects:s,loading:c,onWrite:u}=e,d=t.useMemo(()=>{try{let e=i.availableWakeWords;return e?JSON.parse(String(e)):null}catch{return null}},[i.availableWakeWords]),m=String(i.wakeWords??``).split(`,`).map(e=>e.trim()).filter(Boolean),h=e=>{let t=m.includes(e)?m.filter(t=>t!==e):[...m,e];u(`wakeWords`,t.join(`,`))},_=(d==null?void 0:d.max)||0,ee=_>0&&m.length>=_,v=t.useRef(null),[y,b]=t.useState(null),[x,S]=t.useState(!1),[ie,w]=t.useState(null),[ae,T]=t.useState(null),[oe,se]=t.useState([]),{sendTo:D}=e,k=t.useCallback(async()=>{try{let e=await D(`listWakeWords`,{});se(Array.isArray(e==null?void 0:e.bundled)?e.bundled:[])}catch{se([])}},[D]);t.useEffect(()=>{k()},[]);let ce=async t=>{w(null),S(!0);try{var n;let r=await D(`installWakeWord`,{id:t.id,satellite:e.satId}),i=(r==null?void 0:r.phrase)||t.phrase;r!=null&&r.error?w({severity:`error`,text:r.error}):r!=null&&r.full?w({severity:`error`,text:A.t(`custom_assistant_wake_word_installed_full`,i,i)}):r!=null&&(n=r.replaced)!=null&&n.length?w({severity:`success`,text:A.t(`custom_assistant_wake_word_installed_replaced`,i,r.replaced.join(`, `))}):w({severity:`success`,text:A.t(`custom_assistant_wake_word_installed`,i)})}catch(e){w({severity:`error`,text:String(e.message||e)})}finally{S(!1),k()}},le=oe.filter(e=>{var t;return!e.installed&&!(d!=null&&(t=d.words)!=null&&t.some(t=>t.id===e.id))}),ue=async e=>{w(null);let t=Array.from(e||[]),n=t.find(e=>/\.tflite$/i.test(e.name)),r=t.find(e=>/\.json$/i.test(e.name));if(!n)w({severity:`error`,text:A.t(`custom_assistant_Please select a .tflite model file`)});else try{let e=r?await r.text():``,t=``;try{let n=e?JSON.parse(e):{};t=typeof n.wake_word==`string`?n.wake_word:``}catch{}b({fileName:n.name,model:await yb(n),config:e,configName:(r==null?void 0:r.name)||``,phrase:_b(n.name)||t||vb(n.name)})}catch(e){w({severity:`error`,text:String(e.message||e)})}},de=async()=>{if(y){S(!0);try{let e=await D(`uploadWakeWord`,{model:y.model,fileName:y.fileName,config:y.config||void 0,phrase:y.phrase.trim()});e!=null&&e.error?w({severity:`error`,text:e.error}):(b(null),w({severity:`success`,text:A.t(`custom_assistant_wake_word_uploaded`,(e==null?void 0:e.phrase)||y.phrase)}))}catch(e){w({severity:`error`,text:String(e.message||e)})}finally{S(!1),k()}}},fe=async e=>{T(null),S(!0);try{let t=await D(`deleteWakeWord`,{id:e.id});w(t!=null&&t.error?{severity:`error`,text:t.error}:{severity:`success`,text:A.t(`custom_assistant_wake_word_deleted`,e.phrase)})}catch(e){w({severity:`error`,text:String(e.message||e)})}finally{S(!1),k()}};function P(e,t){let n=t=>i[`controls.${e}.${t}`],r=String(n(`currentVersion`)??``),a=String(n(`latestVersion`)??``),o=n(`inProgress`)===!0,c=Math.min(100,Math.max(0,Number(n(`progress`))||0)),l=e=>{let t=Sb.indexOf(xb(e));return t<0?Sb.length:t};return[...t].sort((e,t)=>l(e)-l(t)).map(e=>{let t=xb(e);if(t===`inProgress`)return null;if(t===`install`)return a&&a!==r&&!o?ge(e):null;if(t===`check`)return o?null:ge(e);if(t===`progress`){var n;if(!o)return null;let r=(n=s[e])==null||(n=n.common)==null?void 0:n.name;return R(M,{children:[R(I,{variant:`caption`,sx:{opacity:.7},children:[typeof r==`string`?r:t,c>0?` ${Math.round(c)} %`:``]}),O(g,{variant:c>0?`determinate`:`indeterminate`,value:c,sx:{height:8,borderRadius:4}})]},e)}return ge(e)})}let he=Object.keys(s).sort(),L=new Map;for(let e of he){let t=e.replace(/^controls\./,``),n=t.indexOf(`.`),r=n<0?t:t.slice(0,n);L.set(r,[...L.get(r)||[],e])}function ge(e){let t=s[e],n=t.common,r=n.name&&typeof n.name==`string`?n.name:e,a=i[e];if(n.role===`button`)return O(H,{size:`small`,variant:`outlined`,onClick:()=>u(e,!0),children:r},e);if(wb(t))return R(M,{children:[O(I,{variant:`caption`,sx:{opacity:.7},children:r}),O(I,{variant:`body2`,children:a==null?`—`:typeof a==`number`?bb(a,n.step):String(a)})]},e);if(n.type===`boolean`)return R(M,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[O(I,{variant:`body2`,children:r}),O(j,{size:`small`,checked:!!a,onChange:t=>u(e,t.target.checked)})]},e);if(n.states){let t=Array.isArray(n.states)?Object.fromEntries(n.states.map(e=>[e,e])):n.states;return R(p,{size:`small`,fullWidth:!0,children:[O(l,{children:r}),O(ye,{label:r,value:a==null?``:String(a),onChange:t=>u(e,t.target.value),children:Object.entries(t).map(([e,t])=>O(E,{value:e,children:t},e))})]},e)}if(n.type===`number`&&n.min!==void 0&&n.max!==void 0){let t=Number(a??n.min),i=n.step?Number(n.step.toPrecision(7)):1;return R(M,{children:[R(I,{variant:`body2`,children:[r,R(I,{component:`span`,variant:`caption`,sx:{ml:1,opacity:.7},children:[bb(t,i),n.unit||``,` (`,bb(n.min,i),`…`,bb(n.max,i),`)`]})]}),O(pe,{size:`small`,value:Number.isFinite(t)?t:n.min,min:n.min,max:n.max,step:i,onChangeCommitted:(t,n)=>{let r=Array.isArray(n)?n[0]:n;u(e,Number(bb(r,i)))},valueLabelDisplay:`auto`,valueLabelFormat:e=>bb(e,i)})]},e)}let o=a==null?``:String(a),c=t=>{t!==o&&u(e,t)};return O(V,{size:`small`,fullWidth:!0,label:r,defaultValue:o,onBlur:e=>c(e.target.value),onKeyDown:e=>{e.key===`Enter`&&c(e.target.value)}},`${e}\n${o}`)}return R(o,{open:!0,onClose:e.onClose,maxWidth:`sm`,fullWidth:!0,children:[R(me,{children:[A.t(`custom_assistant_Settings for %s`,e.satId),e.room?O(I,{variant:`caption`,sx:{ml:1,opacity:.7},children:e.room}):null]}),O(F,{dividers:!0,children:c?O(M,{sx:{display:`flex`,justifyContent:`center`,p:3},children:O(U,{size:28})}):R(M,{sx:{display:`flex`,flexDirection:`column`,gap:2},children:[d!=null&&(n=d.words)!=null&&n.length?R(M,{children:[R(I,{variant:`subtitle2`,children:[A.t(`custom_assistant_Wake words`),O(I,{component:`span`,variant:`caption`,sx:{ml:1,opacity:.7},children:A.t(`custom_assistant_%s of %s active`,m.length,_)})]}),O(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5,mt:1},children:d.words.map(e=>{let t=m.includes(e.id);return O(z,{title:e.custom?`${A.t(`custom_assistant_Uploaded wake word`)} · ${e.id}${e.languages.length?` · ${e.languages.join(`, `)}`:``}`:e.languages.join(`, `),children:O(a,{size:`small`,label:e.phrase||e.id,color:t?`primary`:`default`,variant:t?`filled`:`outlined`,icon:e.custom?O(ne,{}):void 0,disabled:!t&&ee||x,onClick:()=>h(e.id),onDelete:e.custom?()=>T(e):void 0,sx:{border:`1px solid`,borderColor:t?`primary.main`:`text.secondary`,bgcolor:t?void 0:`action.hover`,fontWeight:t?600:400}})},e.id)})}),O(I,{variant:`caption`,sx:{display:`block`,mt:.5,opacity:.7},children:A.t(`custom_assistant_wake_word_hint`)}),le.length?R(M,{sx:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:.5,mt:1},children:[R(I,{variant:`caption`,sx:{mr:.5,opacity:.7},children:[A.t(`custom_assistant_Shipped with the adapter`),`:`]}),le.map(e=>O(z,{title:`${e.languages.length?`${e.languages.join(`, `)} · `:``}${A.t(`custom_assistant_bundled_wake_word_hint`)}`,children:O(a,{size:`small`,variant:`outlined`,color:`primary`,label:e.phrase,icon:O(f,{}),disabled:x,onClick:()=>void ce(e),sx:{borderStyle:`dashed`}})},e.id))]}):null,ae?O(C,{severity:`warning`,sx:{mt:1},action:R(N,{children:[O(H,{color:`inherit`,size:`small`,onClick:()=>void fe(ae),children:A.t(`custom_assistant_Delete`)}),O(H,{color:`inherit`,size:`small`,onClick:()=>T(null),children:A.t(`custom_assistant_Cancel`)})]}),children:A.t(`custom_assistant_delete_wake_word_confirm`,ae.phrase)}):null,O(`input`,{ref:v,type:`file`,accept:`.tflite,.json`,multiple:!0,style:{display:`none`},onChange:e=>{ue(e.target.files),e.target.value=``}}),y?R(M,{sx:{mt:1,p:1.5,border:`1px solid`,borderColor:`divider`,borderRadius:1,display:`flex`,flexDirection:`column`,gap:1},children:[R(I,{variant:`caption`,sx:{opacity:.7},children:[y.fileName,y.configName?` + ${y.configName}`:``]}),O(V,{size:`small`,fullWidth:!0,autoFocus:!0,label:A.t(`custom_assistant_Wake word phrase`),helperText:A.t(`custom_assistant_wake_word_phrase_hint`),value:y.phrase,onChange:e=>b({...y,phrase:e.target.value}),onKeyDown:e=>{e.key===`Enter`&&y.phrase.trim()&&de()}}),R(M,{sx:{display:`flex`,gap:1,justifyContent:`flex-end`},children:[O(H,{size:`small`,disabled:x,onClick:()=>b(null),children:A.t(`custom_assistant_Cancel`)}),O(H,{size:`small`,variant:`contained`,disabled:x||!y.phrase.trim(),startIcon:x?O(U,{size:14}):O(f,{}),onClick:()=>void de(),children:A.t(`custom_assistant_Upload`)})]})]}):O(z,{title:A.t(`custom_assistant_wake_word_upload_hint`),children:O(H,{size:`small`,variant:`outlined`,sx:{mt:1},startIcon:O(f,{}),disabled:x,onClick:()=>{var e;return(e=v.current)==null?void 0:e.click()},children:A.t(`custom_assistant_Upload own wake word`)})}),ie?O(C,{severity:ie.severity,sx:{mt:1},onClose:()=>w(null),children:ie.text}):null]}):null,d!=null&&(r=d.words)!=null&&r.length&&L.size?O(te,{}):null,[...L.entries()].map(([t,n])=>{var r;return R(M,{sx:{display:`flex`,flexDirection:`column`,gap:1},children:[n.length>1?O(I,{variant:`subtitle2`,sx:{opacity:.8},children:((r=e.groupNames)==null?void 0:r[t])||t}):null,Cb(n)?P(t,n):n.map(ge)]},t)}),!L.size&&!d?O(I,{variant:`body2`,sx:{opacity:.7},children:A.t(`custom_assistant_This satellite exposes no settings.`)}):null]})}),O(re,{children:O(H,{onClick:e.onClose,children:A.t(`custom_assistant_Close`)})})]})}var Eb={},Db=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(Db)){var Ob;let n=((Ob=e.split(`/`).pop())==null?void 0:Ob.replace(`.json`,``))||`en`;Eb[n]=t.default}A.extendTranslations(Eb);var kb={idle:`default`,listening:`info`,processing:`warning`,speaking:`success`,offline:`error`},Ab=`__all__`,jb=class extends G{constructor(e){super(e),W(this,`pattern`,``),W(this,`onState`,(e,t)=>{this.setState(n=>{let r={...n.sats},i=this.parse(e);i&&r[i.satId]&&(r[i.satId]={...r[i.satId]}),this.applyToMap(r,e,t);let a={...n.vals};return this.applyToVals(a,e,t),{sats:r,vals:a}})}),this.state={...this.state,sats:{},speak:{},vals:{},settingsFor:null,settingsObjects:{},settingsGroupNames:{},settingsLoading:!1,confirmDelete:null,deleteError:``}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}async componentDidMount(){super.componentDidMount(),this.pattern=`${this.instanceId}.satellites.*`;try{let e=await this.props.oContext.socket.getForeignStates(this.pattern),t={},n={};for(let[r,i]of Object.entries(e||{}))this.applyToMap(t,r,i),this.applyToVals(n,r,i);this.setState({sats:t,vals:n})}catch{}this.props.oContext.socket.subscribeState(this.pattern,this.onState)}componentWillUnmount(){var e;this.pattern&&this.props.oContext.socket.unsubscribeState(this.pattern,this.onState),(e=super.componentWillUnmount)==null||e.call(this)}parse(e){let t=`${this.instanceId}.satellites.`;if(!e.startsWith(t))return null;let n=e.slice(t.length),r=n.indexOf(`.`);return r<0?null:{satId:n.slice(0,r),prop:n.slice(r+1)}}applyToMap(e,t,n){let r=this.parse(t);if(!r)return;let i=e[r.satId]||{status:`idle`,room:``,host:``,alive:!1,lastSeen:0};r.prop===`status`?i.status=String((n==null?void 0:n.val)??`idle`):r.prop===`room`?i.room=String((n==null?void 0:n.val)??``):r.prop===`host`?i.host=String((n==null?void 0:n.val)??``):r.prop===`alive`?i.alive=!!(n!=null&&n.val):r.prop===`lastSeen`&&(i.lastSeen=Number(n==null?void 0:n.val)||0),e[r.satId]=i}applyToVals(e,t,n){let r=this.parse(t);r&&(e[r.satId]={...e[r.satId]||{},[r.prop]:(n==null?void 0:n.val)??null})}async openSettings(e){this.setState({settingsFor:e,settingsObjects:{},settingsLoading:!0});let t=`${this.instanceId}.satellites.${e}.`;try{let e=await this.props.oContext.socket.getForeignObjects(`${t}controls.*`,`state`),r={};for(let[n,i]of Object.entries(e||{}))i!=null&&i.common&&(r[n.slice(t.length)]=i);let i=await this.props.oContext.socket.getForeignObjects(`${t}controls.*`,`channel`).catch(()=>({})),a={},o=A.getLanguage();for(let[e,r]of Object.entries(i||{})){var n;let i=r==null||(n=r.common)==null?void 0:n.name,s=typeof i==`string`?i:i&&(i[o]||i.en)||``;s&&(a[e.slice(`${t}controls.`.length)]=s)}this.setState({settingsObjects:r,settingsGroupNames:a,settingsLoading:!1})}catch{this.setState({settingsLoading:!1})}}writeSetting(e,t,n){this.props.oContext.socket.setState(`${this.instanceId}.satellites.${e}.${t}`,{val:n,ack:!1}).catch(()=>{})}announce(e){let t=(this.state.speak[e]||``).trim();if(!t)return;let n=e===Ab?`${this.instanceId}.tts.text`:`${this.instanceId}.satellites.${e}.tts`;this.props.oContext.socket.setState(n,{val:t,ack:!1}).catch(()=>{}),this.setState(t=>({speak:{...t.speak,[e]:``}}))}async deleteSatellite(e){try{let t=await this.props.oContext.socket.sendTo(this.instanceId,`deleteSatellite`,{id:e});if(t!=null&&t.error){this.setState({deleteError:t.error});return}}catch(e){this.setState({deleteError:String((e==null?void 0:e.message)||e)});return}this.setState(t=>{let n={...t.sats},r={...t.vals};return delete n[e],delete r[e],{sats:n,vals:r,confirmDelete:null,deleteError:``}})}ago(e){if(!e)return`—`;let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<60?`${t} s`:t<3600?`${Math.round(t/60)} min`:t<86400?`${Math.round(t/3600)} h`:`${Math.round(t/86400)} d`}renderComposer(e,t){let n=this.state.speak[e]||``;return R(M,{sx:{display:`flex`,alignItems:`center`,gap:.5},children:[O(V,{size:`small`,variant:`outlined`,placeholder:t,value:n,onChange:t=>this.setState(n=>({speak:{...n.speak,[e]:t.target.value}})),onKeyDown:t=>{t.key===`Enter`&&(t.preventDefault(),this.announce(e))},sx:{minWidth:180}}),O(z,{title:A.t(`custom_assistant_Send announcement`),children:O(`span`,{children:O(d,{size:`small`,color:`primary`,disabled:!n.trim(),onClick:()=>this.announce(e),children:O(h,{})})})})]})}renderItem(){var e;let t=Object.keys(this.state.sats).sort();return R(M,{sx:{width:`100%`},children:[R(M,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,mb:1},children:[O(I,{variant:`h6`,children:A.t(`custom_assistant_Satellites`)}),t.length?this.renderComposer(Ab,A.t(`custom_assistant_Speak on all satellites`)):null]}),t.length?R(L,{size:`small`,sx:{"& td, & th":{px:1}},children:[O(_e,{children:R(B,{children:[O(P,{}),O(P,{children:A.t(`custom_assistant_Satellite`)}),O(P,{children:A.t(`custom_assistant_room`)}),O(P,{children:A.t(`custom_assistant_Host`)}),O(P,{children:A.t(`custom_assistant_Status`)}),O(P,{children:A.t(`custom_assistant_Last seen`)}),O(P,{children:A.t(`custom_assistant_Announcement`)}),O(P,{})]})}),O(ve,{children:t.map(e=>{let t=this.state.sats[e];return R(B,{children:[O(P,{sx:{width:24},children:O(z,{title:t.alive?A.t(`custom_assistant_online`):A.t(`custom_assistant_offline`),children:O(oe,{sx:{fontSize:`0.8rem`,color:t.alive?`success.main`:`error.main`}})})}),O(P,{children:e}),O(P,{children:t.room||`—`}),O(P,{children:t.host||`—`}),O(P,{children:O(a,{size:`small`,variant:`outlined`,color:kb[t.status]||`default`,label:A.t(`custom_assistant_sat_${t.status}`)})}),O(P,{children:O(z,{title:t.lastSeen?new Date(t.lastSeen).toLocaleString():``,children:O(`span`,{children:this.ago(t.lastSeen)})})}),O(P,{children:this.renderComposer(e,A.t(`custom_assistant_Type a message…`))}),O(P,{sx:{width:40},children:t.alive?O(z,{title:A.t(`custom_assistant_Device settings`),children:O(d,{size:`small`,onClick:()=>void this.openSettings(e),children:O(u,{})})}):O(z,{title:A.t(`custom_assistant_Remove satellite`),children:O(d,{size:`small`,onClick:()=>this.setState({confirmDelete:e,deleteError:``}),children:O(ue,{})})})})]},e)})})]}):O(I,{sx:{p:2,opacity:.7},variant:`body2`,children:A.t(`custom_assistant_No satellites registered yet.`)}),this.state.settingsFor?O(Tb,{instanceId:this.instanceId,satId:this.state.settingsFor,room:((e=this.state.sats[this.state.settingsFor])==null?void 0:e.room)||``,values:this.state.vals[this.state.settingsFor]||{},objects:this.state.settingsObjects,groupNames:this.state.settingsGroupNames,loading:this.state.settingsLoading,onWrite:(e,t)=>this.writeSetting(this.state.settingsFor,e,t),sendTo:(e,t)=>this.props.oContext.socket.sendTo(this.instanceId,e,t),onClose:()=>this.setState({settingsFor:null,settingsObjects:{},settingsGroupNames:{}})}):null,R(o,{open:!!this.state.confirmDelete,onClose:()=>this.setState({confirmDelete:null,deleteError:``}),children:[O(me,{children:A.t(`custom_assistant_Remove satellite`)}),R(F,{children:[O(I,{variant:`body2`,children:A.t(`custom_assistant_Remove satellite %s and all its states?`,this.state.confirmDelete||``)}),O(I,{variant:`body2`,sx:{mt:1,opacity:.7},children:A.t(`custom_assistant_A satellite that is still configured appears again when it connects.`)}),this.state.deleteError?O(I,{variant:`body2`,color:`error`,sx:{mt:1},children:this.state.deleteError}):null]}),R(re,{children:[O(H,{color:`error`,variant:`contained`,onClick:()=>void this.deleteSatellite(this.state.confirmDelete),children:A.t(`custom_assistant_Delete`)}),O(H,{onClick:()=>this.setState({confirmDelete:null,deleteError:``}),children:A.t(`custom_assistant_Cancel`)})]})]})]})}},Mb={de:`Hallo, ich bin dein ioBroker-Assistent. Im Wohnzimmer sind es 21,5 Grad.`,en:`Hello, I'm your ioBroker assistant. It is 21.5 degrees in the living room.`,ru:`Привет, я твой ассистент ioBroker. В гостиной 21,5 градуса.`,fr:`Bonjour, je suis ton assistant ioBroker. Il fait 21,5 degrés dans le salon.`,it:`Ciao, sono il tuo assistente ioBroker. In soggiorno ci sono 21,5 gradi.`,es:`Hola, soy tu asistente de ioBroker. En el salón hace 21,5 grados.`,nl:`Hallo, ik ben je ioBroker-assistent. In de woonkamer is het 21,5 graden.`,pl:`Cześć, jestem twoim asystentem ioBroker. W salonie jest 21,5 stopnia.`,pt:`Olá, sou o teu assistente ioBroker. Na sala estão 21,5 graus.`,uk:`Привіт, я твій асистент ioBroker. У вітальні 21,5 градуса.`,"zh-cn":`你好,我是你的 ioBroker 助手。客厅现在是 21.5 度。`,zh:`你好,我是你的 ioBroker 助手。客厅现在是 21.5 度。`,ja:`こんにちは、ioBroker アシスタントです。リビングは 21.5 度です。`,el:`Γεια σου, είμαι ο βοηθός σου ioBroker. Στο σαλόνι έχει 21,5 βαθμούς.`,tr:`Merhaba, ben ioBroker asistanınım. Oturma odasında sıcaklık 21,5 derece.`,cs:`Ahoj, jsem tvůj asistent ioBroker. V obývacím pokoji je 21,5 stupně.`,sv:`Hej, jag är din ioBroker-assistent. I vardagsrummet är det 21,5 grader.`};function Nb(e){let t=String(e||``).trim().toLowerCase();return Mb[t]||Mb[t.split(/[-_]/)[0]]||Mb.en}var Pb={},Fb=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(Fb)){var Ib;let n=((Ib=e.split(`/`).pop())==null?void 0:Ib.replace(`.json`,``))||`en`;Pb[n]=t.default}A.extendTranslations(Pb);var Lb=16e3,Rb=15e3;function zb(e,t){let n=e.reduce((e,t)=>e+t.length,0),r=new Float32Array(n),i=0;for(let t of e)r.set(t,i),i+=t.length;let a=t/Lb,o=Math.floor(n/a),s=new DataView(new ArrayBuffer(44+o*2)),c=(e,t)=>[...t].forEach((t,n)=>s.setUint8(e+n,t.charCodeAt(0)));c(0,`RIFF`),s.setUint32(4,36+o*2,!0),c(8,`WAVE`),c(12,`fmt `),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,Lb,!0),s.setUint32(28,Lb*2,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),c(36,`data`),s.setUint32(40,o*2,!0);for(let e=0;e<o;e++){let t=e*a,n=Math.floor(t),i=r[n]+((r[n+1]??r[n])-r[n])*(t-n);s.setInt16(44+e*2,Math.max(-1,Math.min(1,i))*32767,!0)}return new Uint8Array(s.buffer)}function Bb(e){let t=``;for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return btoa(t)}var Vb={DeviceAclComponent:iy,ChatComponent:Wy,FlowComponent:rb,LocalLlmProgress:cb,LocalModelsComponent:gb,SatellitesComponent:jb,VoiceTestComponent:class extends G{constructor(e){super(e),W(this,`aliveId`,``),W(this,`audio`,null),W(this,`recorder`,null),W(this,`fileInput`,null),W(this,`onAlive`,(e,t)=>{this.setState({alive:!!(t!=null&&t.val)})}),W(this,`test`,async()=>{this.stop(),this.setState({busy:!0,result:null});let e=await this.synthesize(this.sentence);this.setState({busy:!1,result:e}),e.audio&&this.play(e)}),W(this,`roundTrip`,async()=>{let e=this.sentence;this.setState({sttBusy:`roundTrip`,sttResult:null});let t=await this.synthesize(e);if(!t.audio){this.setState({sttBusy:``,sttResult:{error:t.error||A.t(`custom_assistant_No answer`)}});return}let n=await this.transcribe(t.audio,`wav`);this.setState({sttBusy:``,sttResult:{...n,spoken:e}})}),W(this,`startRecording`,async()=>{this.setState({sttResult:null});try{let e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new AudioContext,n=t.createMediaStreamSource(e),r=t.createScriptProcessor(4096,1,1),i=[];r.onaudioprocess=e=>i.push(new Float32Array(e.inputBuffer.getChannelData(0))),n.connect(r),r.connect(t.destination);let a=setTimeout(()=>void this.stopRecording(),Rb);this.recorder={context:t,stream:e,node:r,chunks:i,timer:a},this.setState({recording:!0})}catch(e){this.setState({sttResult:{error:e.message}})}}),W(this,`stopRecording`,async()=>{let e=this.closeRecorder();if(this.setState({recording:!1}),!(e!=null&&e.chunks.length))return;this.setState({sttBusy:`record`});let t=await this.transcribe(Bb(zb(e.chunks,e.rate)),`wav`);this.setState({sttBusy:``,sttResult:t})}),W(this,`onFile`,async e=>{var t;let n=(t=e.target.files)==null?void 0:t[0];if(e.target.value=``,!n)return;this.setState({sttBusy:`file`,sttResult:null});let r=new Uint8Array(await n.arrayBuffer()),i=(n.name.split(`.`).pop()||``).toLowerCase(),a=await this.transcribe(Bb(r),i);this.setState({sttBusy:``,sttResult:a})}),this.state={...this.state,alive:!1,text:``,busy:!1,playing:!1,result:null,sttBusy:``,recording:!1,sttResult:null}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}get language(){let e=this.props.data;return String(e.voiceLanguage||A.getLanguage()||`en`)}get sentence(){return this.state.text.trim()||Nb(this.language)}async componentDidMount(){super.componentDidMount(),this.aliveId=`system.adapter.${this.instanceId}.alive`;let e=this.props.oContext.socket;try{let t=await e.getState(this.aliveId);this.setState({alive:!!(t!=null&&t.val)})}catch{}e.subscribeState(this.aliveId,this.onAlive)}componentWillUnmount(){var e;this.aliveId&&this.props.oContext.socket.unsubscribeState(this.aliveId,this.onAlive),this.stop(),this.closeRecorder(),(e=super.componentWillUnmount)==null||e.call(this)}stop(){this.audio&&=(this.audio.pause(),null),this.state.playing&&this.setState({playing:!1})}synthesize(e){return this.props.oContext.socket.sendTo(this.instanceId,`tts`,{text:e,language:this.language,config:this.props.data}).then(e=>e||{error:A.t(`custom_assistant_No answer`)}).catch(e=>({error:e.message}))}transcribe(e,t){return this.props.oContext.socket.sendTo(this.instanceId,`stt`,{audio:e,format:t,language:this.language,config:this.props.data}).then(e=>e||{error:A.t(`custom_assistant_No answer`)}).catch(e=>({error:e.message}))}play(e){let t=new Audio(`data:${e.mime||`audio/wav`};base64,${e.audio}`);t.onended=()=>this.stop(),t.onerror=()=>this.stop(),this.audio=t,this.setState({playing:!0}),t.play().catch(t=>{this.stop(),this.setState({result:{...e,error:t.message}})})}closeRecorder(){let e=this.recorder;if(!e)return null;this.recorder=null,clearTimeout(e.timer),e.node.disconnect(),e.stream.getTracks().forEach(e=>e.stop());let t=e.context.sampleRate;return e.context.close(),{chunks:e.chunks,rate:t}}renderTtsResult(){let e=this.state.result;if(!e)return null;if(e.error)return O(I,{variant:`body2`,color:`error`,sx:{wordBreak:`break-word`},children:e.error});let t=[e.sampleRate?`${e.sampleRate} Hz`:``,e.audioMs===void 0?``:A.t(`custom_assistant_%s s audio`,(e.audioMs/1e3).toFixed(1)),e.ms===void 0?``:A.t(`custom_assistant_made in %s ms`,e.ms)].filter(Boolean);return O(I,{variant:`body2`,sx:{opacity:.7},children:t.join(` · `)})}renderSttResult(){let e=this.state.sttResult;if(!e)return null;if(e.error)return O(I,{variant:`body2`,color:`error`,sx:{wordBreak:`break-word`},children:e.error});let t=[e.audioMs===void 0?``:A.t(`custom_assistant_%s s audio`,(e.audioMs/1e3).toFixed(1)),e.ms===void 0?``:A.t(`custom_assistant_recognized in %s ms`,e.ms)].filter(Boolean);return R(M,{children:[e.spoken?R(I,{variant:`body2`,children:[A.t(`custom_assistant_Spoken`),`: „`,e.spoken,`“`]}):null,R(I,{variant:`body2`,children:[A.t(`custom_assistant_Recognized`),`:`,` `,e.text?`„${e.text}“`:O(`i`,{children:A.t(`custom_assistant_Nothing recognized`)})]}),O(I,{variant:`body2`,sx:{opacity:.7},children:t.join(` · `)})]})}renderItem(){var e;let{alive:t,busy:n,playing:r,text:a,sttBusy:o,recording:c}=this.state,l=window.isSecureContext&&!!((e=navigator.mediaDevices)!=null&&e.getUserMedia),u=!t||!!o,d=(e,t)=>o===e?O(U,{size:16}):t;return R(M,{sx:{width:`100%`,mt:1,mb:1},children:[O(I,{variant:`subtitle2`,sx:{mb:.5},children:A.t(`custom_assistant_Speech output`)}),R(M,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[O(V,{variant:`standard`,fullWidth:!0,value:a,placeholder:Nb(this.language),label:A.t(`custom_assistant_Test sentence`),onChange:e=>this.setState({text:e.target.value}),onKeyDown:e=>{e.key===`Enter`&&t&&!n&&this.test()}}),O(H,{variant:`contained`,sx:{whiteSpace:`nowrap`,flexShrink:0},disabled:!t||n,startIcon:n?O(U,{size:16}):O(r?T:v,{}),onClick:()=>r?this.stop():void this.test(),children:A.t(r?`custom_assistant_Stop`:`custom_assistant_Test voice`)})]}),O(M,{sx:{mt:.5},children:this.renderTtsResult()}),O(I,{variant:`subtitle2`,sx:{mt:2,mb:.5},children:A.t(`custom_assistant_Speech recognition`)}),R(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:1},children:[l?O(H,{variant:c?`contained`:`outlined`,color:c?`error`:`primary`,disabled:!t||!!o&&!c,startIcon:d(`record`,O(c?T:s,{})),onClick:()=>void(c?this.stopRecording():this.startRecording()),children:A.t(c?`custom_assistant_Stop`:`custom_assistant_Record`)}):null,O(H,{variant:`outlined`,disabled:u||c,startIcon:d(`file`,O(f,{})),onClick:()=>{var e;return(e=this.fileInput)==null?void 0:e.click()},children:A.t(`custom_assistant_Audio file`)}),O(H,{variant:`outlined`,disabled:u||c,startIcon:d(`roundTrip`,O(i,{})),onClick:()=>void this.roundTrip(),children:A.t(`custom_assistant_Speak the test sentence and recognize it`)}),O(`input`,{ref:e=>{this.fileInput=e},type:`file`,accept:`audio/*`,style:{display:`none`},onChange:e=>void this.onFile(e)})]}),l?null:O(I,{variant:`body2`,sx:{opacity:.7,mt:.5},children:A.t(`custom_assistant_The microphone only works over https or on localhost.`)}),O(M,{sx:{mt:.5},children:this.renderSttResult()}),t?null:O(I,{variant:`body2`,sx:{opacity:.7,mt:1},children:A.t(`custom_assistant_The instance must be running to test the voice.`)})]})}},VoiceRowTestComponent:class extends G{constructor(e){super(e),W(this,`aliveId`,``),W(this,`audio`,null),W(this,`onAlive`,(e,t)=>{this.setState({alive:!!(t!=null&&t.val)})}),W(this,`test`,async()=>{if(this.state.playing){this.stop();return}let e=this.row,t={...this.props.globalData||{},ttsVoices:[e]};this.setState({busy:!0,result:null});let n=await this.props.oContext.socket.sendTo(this.instanceId,`tts`,{text:Nb(e.language),language:e.language,config:t}).then(e=>e||{error:A.t(`custom_assistant_No answer`)}).catch(e=>({error:e.message}));if(this.setState({busy:!1,result:n}),!n.audio)return;let r=new Audio(`data:${n.mime||`audio/wav`};base64,${n.audio}`);r.onended=()=>this.stop(),r.onerror=()=>this.stop(),this.audio=r,this.setState({playing:!0}),r.play().catch(e=>{this.stop(),this.setState({result:{...n,error:e.message}})})}),this.state={...this.state,alive:!1,busy:!1,playing:!1,result:null}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}get row(){let e=this.props.data||{};return{language:String(e.language||``).trim(),voice:String(e.voice||``).trim(),model:String(e.model||``).trim()}}async componentDidMount(){super.componentDidMount(),this.aliveId=`system.adapter.${this.instanceId}.alive`;let e=this.props.oContext.socket;try{let t=await e.getState(this.aliveId);this.setState({alive:!!(t!=null&&t.val)})}catch{}e.subscribeState(this.aliveId,this.onAlive)}componentWillUnmount(){var e;this.aliveId&&this.props.oContext.socket.unsubscribeState(this.aliveId,this.onAlive),this.stop(),(e=super.componentWillUnmount)==null||e.call(this)}stop(){this.audio&&=(this.audio.pause(),null),this.state.playing&&this.setState({playing:!1})}tooltip(){let{alive:e,result:t}=this.state;return e?t!=null&&t.error?t.error:t!=null&&t.audio?[t.sampleRate?`${t.sampleRate} Hz`:``,t.audioMs?`${(t.audioMs/1e3).toFixed(1)} s`:``,t.ms?`${A.t(`custom_assistant_synthesis`)} ${t.ms} ms`:``].filter(Boolean).join(` · `):A.t(`custom_assistant_Try this voice`):A.t(`custom_assistant_Start the instance to test the voice`)}renderItem(){let{alive:e,busy:t,playing:n,result:r}=this.state,i=!e||t||!this.row.language;return O(z,{title:this.tooltip(),children:O(`span`,{children:O(d,{size:`small`,disabled:i,color:r!=null&&r.error?`error`:`primary`,onClick:this.test,children:t?O(U,{size:20}):O(n?T:v,{})})})})}}};export{Vb as default};
|
|
2
|
+
`)?O(by,{text:e.text,ctx:e.ctx}):O(`span`,{style:{fontFamily:q,fontSize:`0.78rem`},children:uy(e.text)}):O(xy,{value:t,ctx:e.ctx})}var Cy={system:`#757575`,user:`#1e88e5`,assistant:`#43a047`,tool:`#fb8c00`};function J(e){return O(a,{size:`small`,label:e.label,sx:{height:18,fontSize:`0.68rem`,mr:.5,color:e.color?`#fff`:`inherit`,background:e.color||`rgba(127,127,127,0.25)`,"& .MuiChip-label":{px:.75}}})}function wy(e){let{block:t,ctx:n}=e,r=t.cache_control?O(J,{label:`cache_control`}):null,i=null,a;return t.type===`text`?a=O(by,{text:String(t.text??``),ctx:n}):t.type===`tool_use`?(i=`🔧 ${String(t.name)}`,a=O(xy,{value:t.input,ctx:n})):t.type===`tool_result`?(i=`↩ ${A.t(`custom_assistant_Tool result`)}`,a=typeof t.content==`string`?O(Sy,{text:t.content,ctx:n}):O(xy,{value:t.content,ctx:n})):t.type===`thinking`?(i=`💭 thinking`,a=O(by,{text:String(t.thinking??``),ctx:n})):a=O(xy,{value:t,ctx:n}),R(M,{sx:{mb:.75},children:[i||r?R(M,{sx:{display:`flex`,alignItems:`center`,mb:.25,fontFamily:q,fontSize:`0.76rem`},children:[O(`span`,{style:{marginRight:6},children:i}),r]}):null,a]})}function Ty(e){let{msg:t,ctx:n}=e,r=String(t.role),i=t.content,a=Array.isArray(t.tool_calls)?t.tool_calls:[];return R(M,{sx:{mb:1,pl:1,borderLeft:`3px solid ${Cy[r]||`#9e9e9e`}`},children:[O(M,{sx:{mb:.5},children:O(J,{label:r,color:Cy[r]})}),typeof i==`string`&&i?O(Sy,{text:i,ctx:n}):null,vy(i)?i.map((e,t)=>O(wy,{block:e,ctx:n},t)):null,a.map((e,t)=>{let r=gy(e.function)?e.function:{},i=typeof r.arguments==`string`?hy(r.arguments)??r.arguments:r.arguments;return R(M,{sx:{mb:.75},children:[R(M,{sx:{fontFamily:q,fontSize:`0.76rem`,mb:.25},children:[`🔧 `,String(r.name)]}),O(xy,{value:i,ctx:n})]},t)})]})}function Ey(e){let{value:t,ctx:n,depth:r}=e;if(t==null)return O(`span`,{style:{opacity:.5},children:`—`});if(typeof t==`string`)return O(Sy,{text:t,ctx:n});if(typeof t!=`object`)return O(`span`,{style:{fontFamily:q,fontSize:`0.78rem`},children:String(t)});if(Array.isArray(t)&&t.length&&t.every(_y))return O(M,{children:t.map((e,t)=>O(Ty,{msg:e,ctx:n},t))});if(vy(t))return O(M,{children:t.map((e,t)=>O(wy,{block:e,ctx:n},t))});if(_y(t))return O(Ty,{msg:t,ctx:n});if(Array.isArray(t)&&t.every(e=>typeof e!=`object`||!e)){let e=t.map(e=>typeof e==`string`?e:JSON.stringify(e)).join(`, `);return e.length>160?O(by,{text:e,ctx:n}):O(`span`,{style:{fontFamily:q,fontSize:`0.78rem`},children:e||`[]`})}return gy(t)&&r<2?O(Dy,{data:t,ctx:n,depth:r+1}):O(xy,{value:t,ctx:n})}function Dy(e){let n=Object.keys(e.data).filter(t=>e.data[t]!==void 0);return O(M,{sx:{display:`grid`,gridTemplateColumns:`minmax(90px, max-content) 1fr`,columnGap:1.5,rowGap:.5},children:n.map(n=>R(t.Fragment,{children:[O(M,{sx:{fontFamily:q,fontSize:`0.74rem`,opacity:.65,pt:`2px`},children:n}),O(M,{sx:{minWidth:0},children:O(Ey,{value:e.data[n],ctx:e.ctx,depth:e.depth})})]},n))})}function Y(e){return R(M,{sx:{minWidth:0},children:[O(I,{variant:`caption`,component:`div`,sx:{opacity:.6,lineHeight:1.2},children:e.label}),O(M,{sx:{fontSize:`0.85rem`,wordBreak:`break-word`},children:e.children})]})}function Oy(e){let{entry:r,dark:i}=e,[a,s]=t.useState(void 0),[l,u]=t.useState(``),[f,p]=t.useState(0),[m,h]=t.useState({}),[g,_]=t.useState(!1),ee=t.useRef(!1),te=t.useRef(!1),{fetchTrace:ne}=e,v=t.useCallback(async()=>{if(ee.current)te.current=!0;else{ee.current=!0;try{do{te.current=!1;try{let e=await ne(r.id);u(e.error||``),s(e.error?null:e.steps??null)}catch(e){u(e.message)}}while(te.current)}finally{ee.current=!1}}},[ne,r.id]);t.useEffect(()=>{v()},[r,v]);let b={dark:i,onCopy:e=>{fy(e).then(e=>{e&&(_(!0),setTimeout(()=>_(!1),1500))})}},x=[...a||[]].map((e,t)=>({...e,i:t})).sort((e,t)=>e.t-t.t||e.i-t.i),S=Math.min(0,...x.map(e=>e.t)),C=Math.max(r.ms||0,...x.map(e=>e.t+(e.ms||0))),ie=Math.max(1,C-S),w=x.length>0&&x.every(e=>m[e.i]||e.data===void 0),T=JSON.stringify({entry:r,steps:a??null},null,2),oe={p:1,borderRadius:1,background:i?`rgba(255,255,255,0.04)`:`rgba(0,0,0,0.03)`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,fontSize:`0.9rem`},se=e=>{let t=e.level===`error`?`#c62828`:ly[e.stage]||`#9e9e9e`,n=e.data!==void 0||!!e.tokens,r=!!m[e.i],a=()=>h(t=>({...t,[e.i]:!t[e.i]})),o=(e.t-S)/ie*100,s=e.ms===void 0?0:Math.max(e.ms/ie*100,.4);return R(M,{sx:{borderBottom:`1px solid ${i?`#333`:`#eee`}`,background:e.level===`error`?`rgba(198,40,40,0.08)`:e.level===`warn`?`rgba(251,140,0,0.08)`:void 0},children:[R(M,{role:n?`button`:void 0,tabIndex:n?0:void 0,onClick:n?a:void 0,onKeyDown:e=>{n&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a())},sx:{display:`grid`,gridTemplateColumns:`64px 132px 1fr 64px 16px`,alignItems:`center`,columnGap:1,px:1,pt:.6,cursor:n?`pointer`:`default`,"&:hover":n?{background:i?`rgba(255,255,255,0.04)`:`rgba(0,0,0,0.03)`}:{}},children:[O(M,{sx:{fontFamily:q,fontSize:`0.72rem`,opacity:.6,textAlign:`right`},children:my(e.t)}),O(M,{children:O(J,{label:cy[e.stage]?A.t(cy[e.stage]):e.stage,color:ly[e.stage]})}),R(M,{sx:{fontSize:`0.82rem`,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:r?`normal`:`nowrap`,color:e.level===`error`?`error.main`:e.level===`warn`?`warning.main`:void 0},title:e.title,children:[e.title,e.tokens?O(`span`,{style:{opacity:.6,fontSize:`0.72rem`,marginLeft:8},children:dy(e.tokens)}):null]}),O(M,{sx:{fontFamily:q,fontSize:`0.72rem`,textAlign:`right`,opacity:.8},children:K(e.ms)}),O(M,{sx:{fontSize:`0.7rem`,opacity:.5},children:n?r?`▾`:`▸`:``})]}),R(M,{sx:{position:`relative`,height:4,mx:1,mt:.4,mb:.6,ml:`calc(64px + 132px + 24px)`},children:[O(M,{sx:{position:`absolute`,inset:0,borderRadius:2,background:i?`rgba(255,255,255,0.05)`:`rgba(0,0,0,0.04)`}}),O(M,{sx:{position:`absolute`,top:s?0:-1,height:s?4:6,left:`${o}%`,width:s?`${s}%`:2,borderRadius:2,background:t}})]}),r&&n?R(M,{sx:{px:1,pb:1.5,ml:{xs:0,sm:`calc(64px + 8px)`}},children:[e.tokens?R(I,{variant:`caption`,component:`div`,sx:{mb:.5,opacity:.75},children:[`Tokens: `,dy(e.tokens)]}):null,e.data===void 0?null:O(Ey,{value:e.data,ctx:b,depth:0})]}):null]},e.i)},E=()=>a===void 0&&!l?R(M,{sx:{display:`flex`,alignItems:`center`,gap:1,p:2},children:[O(U,{size:18}),O(I,{variant:`body2`,children:A.t(`custom_assistant_Loading…`)})]}):x.length?O(M,{children:x.map(se)}):O(I,{variant:`body2`,sx:{p:2,opacity:.7},children:l||A.t(`custom_assistant_No processing steps were recorded for this request.`)}),D=()=>{let e={fontFamily:q,fontSize:`0.78rem`};return R(M,{sx:{p:1},children:[R(I,{variant:`subtitle2`,sx:{mb:.5},children:[A.t(`custom_assistant_Tool calls`),` (`,r.tools.length,`)`]}),r.tools.length?r.tools.map((t,n)=>R(M,{sx:{...e,mb:.75,color:t.error?`error.main`:void 0},children:[`🔧 `,O(`b`,{children:t.name}),`(`,JSON.stringify(t.args),`)`,` `,O(`span`,{style:{opacity:.6},children:K(t.ms)}),R(M,{sx:{pl:2.5,opacity:.85},children:[`→ `,t.error?`⚠ ${t.error}`:t.result]})]},n)):O(I,{variant:`body2`,sx:{opacity:.6,mb:1},children:`—`}),R(I,{variant:`subtitle2`,sx:{mt:2,mb:.5},children:[A.t(`custom_assistant_States read`),` (`,r.read.length,`)`]}),r.read.length?r.read.map(t=>R(M,{sx:e,children:[`📖 `,t]},t)):O(I,{variant:`body2`,sx:{opacity:.6},children:`—`}),R(I,{variant:`subtitle2`,sx:{mt:2,mb:.5},children:[A.t(`custom_assistant_States written`),` (`,r.written.length,`)`]}),r.written.length?r.written.map((t,n)=>R(M,{sx:e,children:[`✏️ `,t.id,` = `,uy(t.value)]},n)):O(I,{variant:`body2`,sx:{opacity:.6},children:`—`})]})},k=r.satellite||r.source,ce=new Date(r.ts).toLocaleString(void 0,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3});return R(o,{open:!0,onClose:e.onClose,maxWidth:`lg`,fullWidth:!0,scroll:`paper`,slotProps:{paper:{sx:{height:`90vh`}}},children:[R(me,{sx:{display:`flex`,alignItems:`center`,gap:1,pr:1},children:[R(M,{sx:{flex:1,minWidth:0},children:[A.t(`custom_assistant_Request details`),O(I,{variant:`caption`,component:`span`,sx:{ml:1,opacity:.6,fontFamily:q},children:r.id})]}),g?O(I,{variant:`caption`,color:`success.main`,children:A.t(`custom_assistant_Copied`)}):null,O(z,{title:A.t(`custom_assistant_Copy everything as JSON`),children:O(d,{size:`small`,onClick:()=>b.onCopy(T),children:O(n,{fontSize:`small`})})}),O(z,{title:A.t(`custom_assistant_Download as JSON`),children:O(d,{size:`small`,onClick:()=>py(`assistant-request-${r.id}.json`,T),children:O(ge,{fontSize:`small`})})}),O(d,{size:`small`,onClick:e.onClose,children:O(ae,{fontSize:`small`})})]}),R(F,{dividers:!0,children:[R(M,{sx:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:.5,mb:1},children:[O(J,{label:A.t(ay[r.transport]||r.transport)}),k&&k!==`chat`?O(J,{label:k}):null,r.room&&r.room!==k?O(J,{label:r.room}):null,r.wakeWord===void 0?null:O(J,{label:`🎙 ${r.wakeWord||A.t(`custom_assistant_follow-up`)}`}),r.tier?O(J,{label:A.t(oy[r.tier]),color:sy[r.tier]}):null,r.detail?O(I,{variant:`caption`,sx:{fontFamily:q},children:r.detail}):null,r.done?null:R(M,{sx:{display:`flex`,alignItems:`center`,gap:.5,ml:1},children:[O(U,{size:12}),O(I,{variant:`caption`,children:A.t(`custom_assistant_in progress`)})]})]}),R(M,{sx:{display:`grid`,gridTemplateColumns:{xs:`1fr`,md:`1fr 1fr`},gap:1,mb:1.5},children:[R(M,{children:[O(I,{variant:`caption`,sx:{opacity:.6},children:A.t(`custom_assistant_Question`)}),O(M,{sx:oe,children:r.question})]}),R(M,{children:[O(I,{variant:`caption`,sx:{opacity:.6},children:A.t(r.error?`custom_assistant_Error`:`custom_assistant_Answer`)}),O(M,{sx:{...oe,color:r.error?`error.main`:void 0},children:r.error||r.answer||(r.done?O(`i`,{style:{opacity:.6},children:A.t(`custom_assistant_(no spoken answer)`)}):`…`)})]})]}),R(M,{sx:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(150px, 1fr))`,gap:1.5,mb:1.5},children:[O(Y,{label:A.t(`custom_assistant_Time`),children:ce}),O(Y,{label:A.t(`custom_assistant_Total duration`),children:r.done?K(r.ms):`…`}),O(Y,{label:A.t(`custom_assistant_Source`),children:r.source||`—`}),r.audioMs===void 0?null:O(Y,{label:A.t(`custom_assistant_Recorded audio`),children:K(r.audioMs)}),r.sttMs===void 0?null:O(Y,{label:A.t(`custom_assistant_Speech recognition`),children:K(r.sttMs)}),r.ttsMs===void 0?null:O(Y,{label:A.t(`custom_assistant_Speech synthesis`),children:K(r.ttsMs)}),r.replyAudioMs===void 0?null:O(Y,{label:A.t(`custom_assistant_Reply audio`),children:K(r.replyAudioMs)}),r.tokens?O(Y,{label:`Tokens`,children:dy(r.tokens)}):null,O(Y,{label:A.t(`custom_assistant_Tool calls`),children:r.tools.length}),O(Y,{label:A.t(`custom_assistant_States read`),children:r.read.length}),O(Y,{label:A.t(`custom_assistant_States written`),children:r.written.length}),r.followUp?O(Y,{label:A.t(`custom_assistant_Follow-up`),children:A.t(`custom_assistant_waits for reply`)}):null]}),R(M,{sx:{display:`flex`,alignItems:`center`,borderBottom:`1px solid ${i?`#444`:`#ddd`}`,mb:.5},children:[R(he,{value:f,onChange:(e,t)=>p(t),sx:{flex:1,minHeight:36,"& .MuiTab-root":{minHeight:36,py:0}},children:[O(be,{label:`${A.t(`custom_assistant_Steps`)}${x.length?` (${x.length})`:``}`}),O(be,{label:A.t(`custom_assistant_Tools & states`)}),O(be,{label:`JSON`})]}),f===0&&x.length?O(z,{title:A.t(w?`custom_assistant_Collapse all`:`custom_assistant_Expand all`),children:O(d,{size:`small`,onClick:()=>h(w?{}:Object.fromEntries(x.map(e=>[e.i,!0]))),children:O(w?y:c,{fontSize:`small`})})}):null]}),f===0?E():null,f===1?D():null,f===2?O(by,{text:T,ctx:b,maxHeight:1e4}):null]}),O(re,{children:O(H,{onClick:e.onClose,children:A.t(`custom_assistant_Close`)})})]})}var ky=16e3,X=30,Ay=ky*X/1e3,jy=.02,My=400,Ny={minStartLevel:400,minEndLevel:240,startFactor:3.5,endFactor:2,silenceMs:1e3,longSilenceMs:1600,longAfterMs:2500,minSpeechMs:250,speechGapMs:300,maxMs:3e4,preRollMs:400,tailMs:300,warmupMs:150};function Py(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n]*e[n];return Math.sqrt(t/e.length)}var Fy=class{constructor(e={}){W(this,`opts`,void 0),W(this,`pending`,new Int16Array),W(this,`floor`,null),W(this,`seenMs`,0),W(this,`history`,[]),W(this,`frames`,null),W(this,`speech`,!1),W(this,`voicedMs`,0),W(this,`quietMs`,0),W(this,`spokenMs`,0),W(this,`level`,0),this.opts={...Ny,...e}}get startLevel(){return Math.max(this.opts.minStartLevel,(this.floor??0)*this.opts.startFactor)}get endLevel(){return Math.min(this.startLevel,Math.max(this.opts.minEndLevel,(this.floor??0)*this.opts.endFactor))}get hearing(){return this.frames!==null}reset(){this.pending=new Int16Array,this.history=[],this.frames=null,this.speech=!1,this.voicedMs=0,this.quietMs=0,this.spokenMs=0,this.level=0}push(e){let t=e;this.pending.length&&(t=new Int16Array(this.pending.length+e.length),t.set(this.pending),t.set(e,this.pending.length));let n=0,r=null;for(;t.length-n>=Ay;){let e=t.slice(n,n+Ay);n+=Ay,r=this.frame(e)||r}return this.pending=t.slice(n),r}frame(e){let t=this.opts,n=Py(e);if(this.level=n,this.seenMs+=X,this.floor=this.floor===null?0:n<this.floor?n:this.frames?this.floor:this.floor+(n-this.floor)*jy,!this.frames)return this.history.push(e),this.history.length>Math.ceil(t.preRollMs/X)+1&&this.history.shift(),this.seenMs>=t.warmupMs&&n>=this.startLevel&&(this.frames=this.history,this.history=[],this.voicedMs=X,this.quietMs=0),null;this.frames.push(e);let r=n>=this.endLevel;if(!this.speech){if(r)this.voicedMs+=X,this.quietMs=0;else if(this.quietMs+=X,this.quietMs>=t.speechGapMs)return this.history=this.frames.slice(-(Math.ceil(t.preRollMs/X)+1)),this.frames=null,null;return this.voicedMs>=t.minSpeechMs&&(this.speech=!0,this.spokenMs=this.voicedMs+this.quietMs),null}this.spokenMs+=X,r?this.quietMs=0:this.quietMs+=X;let i=this.spokenMs-this.quietMs,a=t.longAfterMs&&i>=t.longAfterMs?t.longSilenceMs:t.silenceMs;if(this.quietMs>=a||this.spokenMs>=t.maxMs){let e=Math.max(0,Math.floor((this.quietMs-t.tailMs)/X)),n=this.frames.slice(0,this.frames.length-e);return this.reset(),Iy(n)}return null}};function Iy(e){let t=new Int16Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}var Ly=class{constructor(e){W(this,`pos`,0),W(this,`last`,0),W(this,`ratio`,void 0),this.ratio=e/ky}process(e){let t=new Int16Array(Math.ceil((e.length+1)/this.ratio)+1),n=0;for(;this.pos<e.length-1;){let r=Math.floor(this.pos),i=r<0?this.last:e[r],a=i+(e[r+1]-i)*(this.pos-r);t[n++]=Math.round(Math.max(-1,Math.min(1,a))*32767),this.pos+=this.ratio}return this.pos-=e.length,this.last=e.length?e[e.length-1]:this.last,t.subarray(0,n)}};function Ry(e){let t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),n=``;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(n)}var zy=class{constructor(e){W(this,`handlers`,void 0),W(this,`context`,null),W(this,`stream`,null),W(this,`node`,null),W(this,`resampler`,null),W(this,`detector`,new Fy),W(this,`busy`,!1),W(this,`resumeAt`,0),W(this,`stopped`,!1),this.handlers=e}static get supported(){var e;return typeof window<`u`&&window.isSecureContext&&!!((e=navigator.mediaDevices)!=null&&e.getUserMedia)}async start(){let e=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}});if(this.stopped){e.getTracks().forEach(e=>e.stop());return}let t=new AudioContext;t.state===`suspended`&&await t.resume();let n=t.createMediaStreamSource(e),r=t.createScriptProcessor(2048,1,1);this.resampler=new Ly(t.sampleRate),r.onaudioprocess=e=>this.onAudio(e.inputBuffer.getChannelData(0)),n.connect(r),r.connect(t.destination),this.context=t,this.stream=e,this.node=r}stop(){var e,t;this.stopped=!0,this.node&&(this.node.onaudioprocess=null,this.node.disconnect()),(e=this.stream)==null||e.getTracks().forEach(e=>e.stop()),(t=this.context)==null||t.close().catch(()=>{}),this.node=null,this.stream=null,this.context=null}onAudio(e){var t,n,r,i;if(this.stopped||!this.resampler)return;let a=this.resampler.process(e);if(this.busy||Date.now()<this.resumeAt)return;let o=this.detector.push(a);(t=(n=this.handlers).onLevel)==null||t.call(n,Math.min(1,this.detector.level/this.detector.startLevel),this.detector.hearing),o&&(this.busy=!0,(r=(i=this.handlers).onLevel)==null||r.call(i,0,!1),this.handlers.onUtterance(o).catch(()=>{}).finally(()=>{this.busy=!1,this.resumeAt=Date.now()+My,this.detector.reset()}))}},By={},Vy=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(Vy)){var Hy;let n=((Hy=e.split(`/`).pop())==null?void 0:Hy.replace(`.json`,``))||`en`;By[n]=t.default}A.extendTranslations(By);function Uy(e){return e.satellite||e.source||e.transport}var Wy=class extends G{constructor(e){super(e),W(this,`scrollRef`,t.createRef()),W(this,`aliveSubId`,``),W(this,`journalSubId`,``),W(this,`recognition`,null),W(this,`voiceDialog`,null),W(this,`stopSpeaking`,null),W(this,`levelAt`,0),W(this,`scrollTimeout`,null),W(this,`onJournalChange`,(e,t)=>{if(!(t!=null&&t.val)||typeof t.val!=`string`)return;let n;try{n=JSON.parse(t.val)}catch{return}if(!(n!=null&&n.id))return;let r=this.isNearBottom();this.setState(e=>({entries:{...e.entries,[n.id]:n}}),()=>r&&this.scrollToBottom())}),W(this,`onAliveChange`,(e,t)=>{let n=!!(t!=null&&t.val),r=this.state.alive;this.setState({alive:n}),n||this.stopDialog(),n&&!r&&(this.checkTtsAvailable(),this.loadJournal())}),W(this,`onKeyDown`,e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),this.send())}),W(this,`fetchTrace`,async e=>await this.props.oContext.socket.sendTo(this.instanceId,`getJournalTrace`,{id:e})||{error:`no answer from the adapter`});let n=!0;try{n=window.localStorage.getItem(`assistant.chat.details`)!==`0`}catch{}this.state={...this.state,messages:[],entries:{},journalEnabled:null,showDetails:n,detailsId:``,filter:``,confirmClear:!1,input:``,sending:!1,alive:!1,listening:!1,speak:!1,ttsPlaying:``,ttsAvailable:!1,dialog:``,dialogLevel:0}}async checkTtsAvailable(){try{let e=await this.props.oContext.socket.sendTo(this.instanceId,`ttsAvailable`,{});this.setState({ttsAvailable:!!(e!=null&&e.available)})}catch{this.setState({ttsAvailable:!1})}}async loadJournal(){try{let e=await this.props.oContext.socket.sendTo(this.instanceId,`getJournal`,{});if(!e||e.enabled===void 0){this.setState({journalEnabled:!1});return}let t={};for(let n of e.entries||[])t[n.id]=n;this.setState(n=>({journalEnabled:!!e.enabled,entries:{...t,...n.entries}}),()=>this.scrollToBottom())}catch{this.setState({journalEnabled:!1})}}get speechSupported(){let e=window;return(!!e.SpeechRecognition||!!e.webkitSpeechRecognition)&&window.isSecureContext}get ttsSupported(){return typeof window<`u`&&`speechSynthesis`in window}speechLang(e){return{de:`de-DE`,en:`en-US`,ru:`ru-RU`,pt:`pt-PT`,nl:`nl-NL`,fr:`fr-FR`,it:`it-IT`,es:`es-ES`,pl:`pl-PL`,uk:`uk-UA`,"zh-cn":`zh-CN`}[e||A.getLanguage()]||`en-US`}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}async componentDidMount(){await super.componentDidMount(),this.aliveSubId=`system.adapter.${this.instanceId}.alive`,this.journalSubId=`${this.instanceId}.journal.last`;let e=!1;try{let t=await this.props.oContext.socket.getState(this.aliveSubId);e=!!(t!=null&&t.val)}catch{e=!1}this.setState({alive:e}),e&&(this.checkTtsAvailable(),this.loadJournal()),await this.props.oContext.socket.subscribeState(this.aliveSubId,this.onAliveChange),await this.props.oContext.socket.subscribeState(this.journalSubId,this.onJournalChange)}componentWillUnmount(){var e;this.aliveSubId&&this.props.oContext.socket.unsubscribeState(this.aliveSubId,this.onAliveChange),this.journalSubId&&this.props.oContext.socket.unsubscribeState(this.journalSubId,this.onJournalChange),this.scrollTimeout&&=(clearTimeout(this.scrollTimeout),null);try{var t;(t=this.recognition)==null||t.stop()}catch{}this.stopDialog(),this.ttsSupported&&window.speechSynthesis.cancel(),(e=super.componentWillUnmount)==null||e.call(this)}toggleListening(){if(this.state.listening){var e;(e=this.recognition)==null||e.stop();return}let t=window,n=t.SpeechRecognition||t.webkitSpeechRecognition;if(!n)return;let r=new n;r.lang=this.speechLang(),r.interimResults=!1,r.continuous=!1,r.onresult=e=>{var t;let n=((t=e.results)==null||(t=t[0])==null||(t=t[0])==null?void 0:t.transcript)||``;n&&this.setState({input:n},()=>void this.send())},r.onerror=()=>this.setState({listening:!1}),r.onend=()=>this.setState({listening:!1}),this.recognition=r,this.setState({listening:!0});try{r.start()}catch{this.setState({listening:!1})}}get voiceSettings(){let e=this.props.data||{};return{enabled:!!e.voiceEnabled,language:e.voiceLanguage||``}}async toggleDialog(){if(this.voiceDialog){this.stopDialog();return}try{var e;(e=this.recognition)==null||e.stop()}catch{}this.ttsSupported&&window.speechSynthesis.cancel();let t=new zy({onUtterance:e=>this.dialogTurn(e),onLevel:(e,t)=>this.onDialogLevel(e,t)});this.voiceDialog=t,this.setState({dialog:`listening`,dialogLevel:0});try{await t.start()}catch(e){this.voiceDialog===t&&this.stopDialog(),this.addMessage({role:`error`,text:`${A.t(`custom_assistant_The microphone could not be opened:`)} ${e.message}`,ts:Date.now()})}}stopDialog(){var e,t;(e=this.voiceDialog)==null||e.stop(),this.voiceDialog=null,(t=this.stopSpeaking)==null||t.call(this),this.state.dialog&&this.setState({dialog:``,dialogLevel:0})}onDialogLevel(e,t){let n=Date.now();n-this.levelAt<100&&t===(this.state.dialog===`hearing`)||(this.levelAt=n,this.setState(n=>n.dialog===`listening`||n.dialog===`hearing`?{dialogLevel:e,dialog:t?`hearing`:`listening`}:null))}async dialogTurn(e){let t=this.voiceDialog;if(!t||!this.ready)return;let n=!!this.state.journalEnabled,r=this.state.filter&&this.state.filter!==`chat`?``:this.state.filter;this.setState({dialog:`thinking`,dialogLevel:0,sending:!0,filter:r});try{let r=await this.props.oContext.socket.sendTo(this.instanceId,`ask`,{audio:Ry(e),format:`pcm`,sampleRate:ky,spoken:!0});if(this.voiceDialog!==t)return;if(!r){this.addMessage({role:`error`,text:`no answer from the adapter`,ts:Date.now()});return}if(r.heard===``)return;n&&r.journaled||(r.heard&&this.addMessage({role:`user`,text:r.heard,ts:Date.now()}),this.addMessage(r.error===void 0?{role:`assistant`,text:r.answer??``,ts:Date.now()}:{role:`error`,text:r.error,ts:Date.now()})),r.answer&&(this.setState({dialog:`speaking`}),await this.speakAndWait(r.answer))}catch(e){this.addMessage({role:`error`,text:e.message,ts:Date.now()})}finally{this.setState({sending:!1}),this.voiceDialog===t&&this.setState({dialog:`listening`,dialogLevel:0})}}speakAndWait(e){return new Promise(t=>{let n=!1,r=null,i=()=>{n||(n=!0,clearTimeout(a),this.stopSpeaking=null,t())},a=setTimeout(i,15e3+e.length*120);this.stopSpeaking=()=>{r==null||r.pause(),this.ttsSupported&&window.speechSynthesis.cancel(),i()};let o=()=>{if(n||!this.ttsSupported){i();return}let t=new SpeechSynthesisUtterance(e);t.lang=this.speechLang(this.voiceSettings.language),t.onend=i,t.onerror=i,window.speechSynthesis.cancel(),window.speechSynthesis.speak(t)};this.state.ttsAvailable?(async()=>{try{let t=await this.props.oContext.socket.sendTo(this.instanceId,`tts`,{text:e});if(n)return;if(t!=null&&t.audio){r=new Audio(`data:${t.mime||`audio/wav`};base64,${t.audio}`),r.onended=i,r.onerror=i,await r.play();return}}catch{}o()})():o()})}speak(e){if(!this.ttsSupported||!e)return;window.speechSynthesis.cancel();let t=new SpeechSynthesisUtterance(e);t.lang=this.speechLang(),window.speechSynthesis.speak(t)}async playViaBackend(e,t){if(this.ready&&t){this.setState({ttsPlaying:e});try{let e=await this.props.oContext.socket.sendTo(this.instanceId,`tts`,{text:t});if(e!=null&&e.audio){let t=new Audio(`data:${e.mime||`audio/wav`};base64,${e.audio}`);t.onended=()=>this.setState({ttsPlaying:``}),t.onerror=()=>this.setState({ttsPlaying:``}),await t.play()}else this.setState({ttsPlaying:``})}catch{this.setState({ttsPlaying:``})}}}isNearBottom(){let e=this.scrollRef.current;return!e||e.scrollHeight-e.scrollTop-e.clientHeight<80}scrollToBottom(e){e||=0;let t=this.scrollRef.current;t?t.scrollTop=t.scrollHeight:e<15&&(this.scrollTimeout=setTimeout(()=>{this.scrollTimeout=null,this.scrollToBottom(e+1)},100))}get ready(){return this.state.alive&&!this.props.changed}addMessage(e){this.setState(t=>({messages:[...t.messages,e]}),()=>this.scrollToBottom())}async send(){let e=this.state.input.trim();if(!e||this.state.sending||!this.ready)return;let t=!!this.state.journalEnabled,n=this.state.filter&&this.state.filter!==`chat`?``:this.state.filter;this.setState({input:``,sending:!0,filter:n},()=>this.scrollToBottom()),t||this.addMessage({role:`user`,text:e,ts:Date.now()});try{let t=await this.props.oContext.socket.sendTo(this.instanceId,`ask`,{text:e});(t==null?void 0:t.error)===void 0?t!=null&&t.journaled||this.addMessage({role:`assistant`,text:(t==null?void 0:t.answer)??``,ts:Date.now()}):t.journaled||this.addMessage({role:`error`,text:t.error,ts:Date.now()}),this.state.speak&&t!=null&&t.answer&&this.speak(t.answer)}catch(e){this.addMessage({role:`error`,text:e.message,ts:Date.now()})}this.setState({sending:!1})}async refreshCache(){if(this.ready)try{await this.props.oContext.socket.sendTo(this.instanceId,`clearCache`,{}),this.addMessage({role:`info`,text:A.t(`custom_assistant_Device cache cleared.`),ts:Date.now()})}catch{}}async clearHistory(){if(this.setState({confirmClear:!1,messages:[],entries:{}}),this.state.journalEnabled&&this.state.alive)try{await this.props.oContext.socket.sendTo(this.instanceId,`clearJournal`,{})}catch{}}openDetails(e){var t;(t=window.getSelection())!=null&&t.toString()||this.setState({detailsId:e})}toggleDetails(){let e=!this.state.showDetails;this.setState({showDetails:e});try{window.localStorage.setItem(`assistant.chat.details`,e?`1`:`0`)}catch{}}bubbleColors(e){let t=this.props.oContext.themeType===`dark`;return e===`user`?{bg:t?`#1e88e5`:`#2196f3`,color:`#fff`}:e===`error`?{bg:t?`#5d1f1f`:`#f8d7da`,color:t?`#ffb4b4`:`#842029`}:{bg:t?`#3a3a3a`:`#eceff1`,color:t?`#eee`:`#111`}}renderBubble(e,t,n,r,i={}){let a=t===`user`,{bg:o,color:s}=this.bubbleColors(t);return O(M,{sx:{display:`flex`,justifyContent:a?`flex-end`:`flex-start`,mb:.5},children:R(le,{elevation:1,onClick:i.onClick,title:i.onClick?A.t(`custom_assistant_Click for details`):void 0,sx:{px:1.5,py:1,maxWidth:`75%`,background:o,color:s,borderRadius:2,whiteSpace:`pre-wrap`,wordBreak:`break-word`,cursor:i.onClick?`pointer`:void 0,outline:`2px solid transparent`,transition:`outline-color 0.15s`,"&:hover":i.onClick?{outlineColor:`rgba(127,127,127,0.45)`}:void 0},children:[i.header,O(I,{variant:`body2`,component:`div`,children:n}),R(M,{sx:{display:`flex`,alignItems:`center`,justifyContent:`flex-end`,gap:.5},children:[i.footer,i.playText&&this.state.ttsAvailable?O(z,{title:A.t(`custom_assistant_Play answer (backend TTS)`),children:O(`span`,{children:O(d,{size:`small`,disabled:!this.ready||this.state.ttsPlaying===e,onClick:t=>{t.stopPropagation(),this.playViaBackend(e,i.playText||``)},sx:{p:.25,color:`inherit`,opacity:.7},children:this.state.ttsPlaying===e?O(U,{size:12}):O(v,{sx:{fontSize:`0.9rem`}})})})}):null,O(I,{variant:`caption`,component:`div`,sx:{opacity:.6,fontSize:`0.65rem`},children:new Date(r).toLocaleTimeString()})]})]})},e)}renderMessage(e,t){return e.role===`info`?O(I,{variant:`caption`,component:`div`,sx:{textAlign:`center`,opacity:.6,my:1,fontStyle:`italic`},children:e.text},`m${t}`):this.renderBubble(`m${t}`,e.role,e.text,e.ts,{playText:e.role===`assistant`?e.text:void 0})}chip(e,n,r){let i=O(a,{size:`small`,label:e,sx:{height:18,fontSize:`0.68rem`,mr:.5,color:r?`#fff`:`inherit`,background:r||`rgba(127,127,127,0.25)`,"& .MuiChip-label":{px:.75}}});return n?O(z,{title:n,children:i},e):O(t.Fragment,{children:i},e)}renderOrigin(e){let t=[this.chip(A.t(ay[e.transport]||e.transport))],n=e.satellite||(e.transport===`chat`||e.transport===`state`?``:e.source);return n&&t.push(this.chip(n,A.t(`custom_assistant_Source`))),e.room&&e.room!==n&&t.push(this.chip(e.room,A.t(`custom_assistant_Room`))),e.wakeWord!==void 0&&t.push(e.wakeWord?this.chip(`🎙 ${e.wakeWord}`,A.t(`custom_assistant_Wake word`)):this.chip(`🎙 ${A.t(`custom_assistant_follow-up`)}`,A.t(`custom_assistant_Mic re-opened without wake word`))),e.sttMs!==void 0&&t.push(this.chip(`STT ${K(e.sttMs)}`,A.t(`custom_assistant_Speech recognition time`))),O(M,{sx:{mb:.5,opacity:.9},children:t})}renderDetails(e){if(!this.state.showDetails)return null;let t={fontFamily:`monospace`,fontSize:`0.72rem`},n=[];for(let[r,i]of e.tools.entries())n.push(R(M,{sx:{...t,color:i.error?`error.main`:void 0},children:[`🔧 `,i.name,`(`,JSON.stringify(i.args),`) → `,i.error?`⚠ ${i.error}`:i.result,` `,``,O(`span`,{style:{opacity:.6},children:K(i.ms)})]},`t${r}`));e.read.length&&n.push(R(M,{sx:t,children:[`📖 `,e.read.join(`, `)]},`r`));for(let[r,i]of e.written.entries())n.push(R(M,{sx:t,children:[`✏️ `,i.id,` = `,uy(i.value)]},`w${r}`));return R(M,{onClick:()=>this.openDetails(e.id),title:A.t(`custom_assistant_Click for details`),sx:{ml:1,mb:1.5,pl:1,borderLeft:`2px solid rgba(127,127,127,0.35)`,opacity:.85,cursor:`pointer`,"&:hover":{opacity:1,borderLeftColor:`rgba(127,127,127,0.8)`}},children:[R(M,{sx:{display:`flex`,alignItems:`center`,flexWrap:`wrap`,gap:.25},children:[e.tier?this.chip(A.t(oy[e.tier]),void 0,sy[e.tier]):null,e.detail?O(I,{variant:`caption`,sx:{...t,mr:1},children:e.detail}):null,e.done?O(I,{variant:`caption`,sx:{opacity:.7,mr:1},children:K(e.ms)}):null,e.tokens?O(I,{variant:`caption`,sx:{opacity:.6,mr:1},children:dy(e.tokens)}):null,e.ttsMs===void 0?null:this.chip(`TTS ${K(e.ttsMs)}`,A.t(`custom_assistant_Speech synthesis`)),e.followUp?this.chip(A.t(`custom_assistant_waits for reply`)):null]}),n]})}renderEntry(e){let n=()=>this.openDetails(e.id),r;return r=e.done?e.error?this.renderBubble(`${e.id}a`,`error`,e.error,e.ts+(e.ms||0),{onClick:n}):this.renderBubble(`${e.id}a`,`assistant`,e.answer||O(`i`,{style:{opacity:.6},children:A.t(`custom_assistant_(no spoken answer)`)}),e.ts+(e.ms||0),{playText:e.answer||void 0,onClick:n}):R(M,{onClick:n,title:A.t(`custom_assistant_Click for details`),sx:{display:`flex`,alignItems:`center`,gap:1,p:1,opacity:.7,cursor:`pointer`},children:[O(U,{size:16}),O(I,{variant:`body2`,children:A.t(`custom_assistant_Thinking…`)})]},`${e.id}a`),R(t.Fragment,{children:[this.renderBubble(`${e.id}q`,`user`,e.question,e.ts,{header:this.renderOrigin(e),onClick:n}),r,this.renderDetails(e)]},e.id)}renderTimeline(){let{entries:e,messages:t,filter:n}=this.state,r=[];for(let t of Object.values(e))n&&Uy(t)!==n||r.push({ts:t.ts,el:()=>this.renderEntry(t)});return n&&n!==`chat`||t.forEach((e,t)=>r.push({ts:e.ts,el:()=>this.renderMessage(e,t)})),r.sort((e,t)=>e.ts-t.ts),r.map(e=>e.el())}renderFilter(){let e=[...new Set(Object.values(this.state.entries).map(Uy))].sort();return!this.state.journalEnabled||e.length<2?null:R(ye,{size:`small`,variant:`standard`,value:e.includes(this.state.filter)?this.state.filter:``,displayEmpty:!0,onChange:e=>this.setState({filter:String(e.target.value)}),sx:{mr:1,minWidth:140,fontSize:`0.85rem`},children:[O(E,{value:``,children:A.t(`custom_assistant_All sources`)}),e.map(e=>O(E,{value:e,children:e},e))]})}renderItem(){let e=this.props.oContext.themeType===`dark`,{alive:t,messages:n,entries:i,sending:a,input:c,listening:l,speak:u,journalEnabled:f,showDetails:p,dialog:m}=this.state,h=this.ready,_=this.renderTimeline(),te=!n.length&&!Object.keys(i).length;return R(M,{sx:{width:`100%`,display:`flex`,flexDirection:`column`,height:`calc(100vh - 300px)`},children:[R(M,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,mb:1},children:[R(M,{children:[O(I,{variant:`h6`,children:A.t(f?`custom_assistant_Chat`:`custom_assistant_Test chat`)}),f?O(I,{variant:`caption`,sx:{opacity:.7},children:A.t(`custom_assistant_Shows all requests live: satellites, Telegram, scripts and this chat.`)}):null]}),R(M,{sx:{display:`flex`,alignItems:`center`},children:[this.renderFilter(),f?O(z,{title:A.t(p?`custom_assistant_Hide processing details`:`custom_assistant_Show processing details`),children:O(d,{size:`small`,color:p?`primary`:`default`,onClick:()=>this.toggleDetails(),children:O(p?fe:de,{})})}):null,this.ttsSupported?O(z,{title:A.t(u?`custom_assistant_Stop reading answers aloud`:`custom_assistant_Read answers aloud`),children:O(d,{size:`small`,color:u?`primary`:`default`,onClick:()=>{u&&window.speechSynthesis.cancel(),this.setState({speak:!u})},children:O(u?S:r,{})})}):null,O(z,{title:A.t(`custom_assistant_Refresh device cache`),children:O(`span`,{children:O(d,{size:`small`,disabled:!h,onClick:()=>void this.refreshCache(),children:O(b,{})})})}),O(z,{title:A.t(`custom_assistant_Clear chat`),children:O(`span`,{children:O(d,{size:`small`,disabled:te,onClick:()=>f?this.setState({confirmClear:!0}):void this.clearHistory(),children:O(xe,{})})})})]})]}),h?null:O(I,{sx:{p:2},color:`warning.main`,children:t?A.t(`custom_assistant_Save the configuration (the instance will restart) before chatting.`):A.t(`custom_assistant_Start the assistant instance to chat.`)}),R(M,{ref:this.scrollRef,sx:{flex:1,overflowY:`auto`,p:1,border:`1px solid ${e?`#444`:`#ccc`}`,borderRadius:1,background:e?`#1e1e1e`:`#fafafa`,mb:1},children:[_.length?_:O(I,{sx:{p:2,textAlign:`center`,opacity:.6},variant:`body2`,children:A.t(`custom_assistant_No messages yet. Type a question below.`)}),a&&!f?R(M,{sx:{display:`flex`,alignItems:`center`,gap:1,p:1,opacity:.7},children:[O(U,{size:16}),O(I,{variant:`body2`,children:A.t(`custom_assistant_Thinking…`)})]}):null]}),m?O(g,{sx:{mb:.5,height:3,borderRadius:1},variant:m===`thinking`||m===`speaking`?`indeterminate`:`determinate`,color:m===`hearing`?`error`:m===`speaking`?`secondary`:`primary`,value:Math.round(this.state.dialogLevel*100)}):null,R(M,{sx:{display:`flex`,alignItems:`flex-end`,gap:1},children:[zy.supported?O(z,{title:A.t(m?`custom_assistant_End the dialog`:this.voiceSettings.enabled?`custom_assistant_Dialog: everything you say becomes a question`:`custom_assistant_The dialog needs speech recognition: enable voice on the Voice tab.`),children:O(`span`,{children:O(d,{color:m?`error`:`primary`,disabled:!m&&(!h||a||!this.voiceSettings.enabled),onClick:()=>void this.toggleDialog(),children:O(ee,{})})})}):null,this.speechSupported&&!m?O(z,{title:A.t(l?`custom_assistant_Stop listening`:`custom_assistant_Speak`),children:O(`span`,{children:O(d,{color:l?`error`:`primary`,disabled:!h||a,onClick:()=>this.toggleListening(),children:O(s,{})})})}):null,O(V,{fullWidth:!0,multiline:!0,maxRows:4,size:`small`,variant:`outlined`,placeholder:A.t(m===`listening`?`custom_assistant_Dialog: listening…`:m===`hearing`?`custom_assistant_Dialog: hearing you…`:m===`thinking`?`custom_assistant_Dialog: thinking…`:m===`speaking`?`custom_assistant_Dialog: speaking…`:l?`custom_assistant_Listening…`:`custom_assistant_Type a message…`),value:c,disabled:!h||a||!!m,onChange:e=>this.setState({input:e.target.value}),onKeyDown:this.onKeyDown}),O(d,{color:`primary`,disabled:!h||a||!!m||!c.trim(),onClick:()=>void this.send(),children:O(w,{})})]}),this.state.detailsId&&i[this.state.detailsId]?O(Oy,{entry:i[this.state.detailsId],fetchTrace:this.fetchTrace,dark:e,onClose:()=>this.setState({detailsId:``})}):null,R(o,{open:this.state.confirmClear,onClose:()=>this.setState({confirmClear:!1}),children:[O(me,{children:A.t(`custom_assistant_Clear chat`)}),O(F,{children:O(I,{variant:`body2`,children:A.t(`custom_assistant_Delete the recorded history of all sources?`)})}),R(re,{children:[O(H,{color:`error`,variant:`contained`,onClick:()=>void this.clearHistory(),children:A.t(`custom_assistant_Delete`)}),O(H,{onClick:()=>this.setState({confirmClear:!1}),children:A.t(`custom_assistant_Cancel`)})]})]})]})}},Gy={},Ky=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(Ky)){var qy;let n=((qy=e.split(`/`).pop())==null?void 0:qy.replace(`.json`,``))||`en`;Gy[n]=t.default}A.extendTranslations(Gy);var Z=(e,...t)=>A.t(`custom_assistant_${e}`,...t),Jy=[{value:`system`,label:`System-wide AI settings (admin)`},{value:`openai`,label:`OpenAI`},{value:`anthropic`,label:`Anthropic (Claude)`},{value:`gemini`,label:`Google Gemini`},{value:`deepseek`,label:`DeepSeek`},{value:`openrouter`,label:`OpenRouter`},{value:`custom`,label:`OpenAI-compatible (custom)`}],Yy=[{value:`openai`,label:`OpenAI (Whisper)`},{value:`openrouter`,label:`OpenRouter`},{value:`azure`,label:`Azure Speech`},{value:`aws`,label:`AWS Transcribe`},{value:`vosk`,label:`Vosk (local)`},{value:`parakeet`,label:`ioBroker.voice (local adapter)`}],Xy=[{value:`openai`,label:`OpenAI`},{value:`openrouter`,label:`OpenRouter`},{value:`azure`,label:`Azure Speech`},{value:`aws`,label:`AWS Polly`},{value:`piper`,label:`Piper (local)`}],Zy={openai:{field:`ttsVoice`,label:`TTS voice`},openrouter:{field:`openrouterVoice`,label:`OpenRouter voice (optional)`},azure:{field:`azureVoice`,label:`Azure voice (optional)`},aws:{field:`awsVoice`,label:`AWS Polly voice (optional)`},piper:{field:`piperVoice`,label:`Piper voice (optional)`}},Qy={openai:{field:`sttModel`,label:`OpenAI STT model (optional)`},openrouter:{field:`openrouterSttModel`,label:`OpenRouter STT model (optional)`},vosk:{field:`voskModel`,label:`Vosk model (optional)`}},$y={openai:{field:`ttsModel`,label:`OpenAI TTS model (optional)`},openrouter:{field:`openrouterTtsModel`,label:`OpenRouter TTS model (optional)`}},eb=[{value:`de`,label:`Deutsch`},{value:`en`,label:`English`},{value:`ru`,label:`Русский`},{value:`fr`,label:`Français`},{value:`it`,label:`Italiano`},{value:`es`,label:`Español`},{value:`nl`,label:`Nederlands`},{value:`pl`,label:`Polski`},{value:`pt`,label:`Português`},{value:`uk`,label:`Українська`},{value:`zh-cn`,label:`中文`}],tb={sources:`#607d8b`,stt:`#ef6c00`,local:sy.nlu,localLlm:sy.localLlm,cloud:sy.cloud,tts:`#d81b60`};function nb(e){return String(e||``).replace(/^system\.adapter\./,``)}var rb=class extends G{constructor(e){super(e),W(this,`unmounted`,!1),W(this,`onAlive`,(e,t)=>{let n=!!(t!=null&&t.val);n!==this.state.alive&&this.setState({alive:n},()=>n&&void this.loadFromAdapter())}),this.state={...this.state,open:null,alive:!1,t2cInstances:null,piInstances:null,voiceInstances:null,telegram:[],models:null,counts:null,timing:null,voices:null,voicesKey:``,installing:``,error:``}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}get form(){return this.props.data||{}}set(e){this.props.onChange({...this.form,...e})}async componentDidMount(){super.componentDidMount();let e=this.props.oContext.socket;try{let t=await e.getState(`system.adapter.${this.instanceId}.alive`);this.onAlive(``,t)}catch{}await e.subscribeState(`system.adapter.${this.instanceId}.alive`,this.onAlive),this.loadInstances()}componentWillUnmount(){var e;this.unmounted=!0,this.props.oContext.socket.unsubscribeState(`system.adapter.${this.instanceId}.alive`,this.onAlive),(e=super.componentWillUnmount)==null||e.call(this)}async instancesOf(e){let t=this.props.oContext.socket;try{let n=await t.getAdapterInstances(e,!0),r=[];for(let e of n||[]){let n=e._id.replace(/^system\.adapter\./,``),i=await t.getState(`system.adapter.${n}.alive`).catch(()=>null);r.push({id:n,alive:!!(i!=null&&i.val)})}return r.sort((e,t)=>e.id.localeCompare(t.id))}catch{return[]}}async loadInstances(){let[e,t,n]=await Promise.all([this.instancesOf(`smart-text2command`),this.instancesOf(`pi-agent`),this.instancesOf(`voice`)]),r=[];try{r=(await this.props.oContext.socket.getAdapterInstances(`telegram`,!0)||[]).filter(e=>{var t;return String(((t=e.native)==null?void 0:t.assistantInstance)||``).replace(/^system\.adapter\./,``)===this.instanceId}).map(e=>e._id.replace(/^system\.adapter\./,``))}catch{}this.unmounted||this.setState({t2cInstances:e,piInstances:t,voiceInstances:n,telegram:r})}async loadFromAdapter(){let e=this.props.oContext.socket;try{let t=await e.sendTo(this.instanceId,`listLocalModels`,{dir:this.form.localLlmModelDir||``,active:this.form.localLlmModel||``});!this.unmounted&&t!=null&&t.models&&this.setState({models:t.models.map(e=>({file:e.file,name:e.name||e.file}))})}catch{}try{let t=await e.sendTo(this.instanceId,`getJournal`,{});if(!this.unmounted&&t!=null&&t.enabled){let e={},n={stt:{ms:0,n:0},tts:{ms:0,n:0}};for(let r of t.entries||[])r.tier&&(e[r.tier]=(e[r.tier]||0)+1),r.sttMs&&(n.stt.ms+=r.sttMs,n.stt.n++),r.ttsMs&&(n.tts.ms+=r.ttsMs,n.tts.n++);this.setState({counts:e,timing:n})}}catch{}}componentDidUpdate(){this.state.open===`tts`&&this.state.alive&&this.state.voicesKey!==this.voicesKey&&this.loadVoices()}get voicesKey(){let e=this.form;return[this.ttsProvider,e.voiceLanguage||``,e.openrouterTtsModel||``].join(`|`)}async loadVoices(){let e=this.voicesKey;this.setState({voicesKey:e,voices:null});let t=this.form,n=[];try{let e={ttsProvider:this.ttsProvider,language:t.voiceLanguage||``};t.openrouterTtsModel&&(e.openrouterTtsModel=t.openrouterTtsModel);let r=await this.props.oContext.socket.sendTo(this.instanceId,`getVoices`,e);n=Array.isArray(r)?r.map(String):[]}catch{}!this.unmounted&&this.state.voicesKey===e&&this.setState({voices:n})}get sttProvider(){return this.form.sttProvider||`openai`}get ttsProvider(){return this.form.ttsProvider||`openai`}label(e,t){var n;let r=(n=e.find(e=>e.value===t))==null?void 0:n.label;return r?A.t(r):t}get languageLabel(){let e=this.form.voiceLanguage||``;return e?this.label(eb,e):A.t(`System language`)}get localMode(){return this.form.useLocalNlu?this.form.nluEngine===`smart-text2command`?`t2c`:`rules`:`off`}get cloudMode(){let e=this.form.provider||`openai`;return e===`none`?`off`:e===`pi-agent`?`pi-agent`:`cloud`}get localLlmFirst(){return this.cloudMode===`off`||!!this.form.localLlmFirst}modelName(e){var t;return((t=this.state.models)==null||(t=t.find(t=>t.file===e))==null?void 0:t.name)||e}count(...e){if(!this.state.counts)return null;let t=e.reduce((e,t)=>{var n;return e+(((n=this.state.counts)==null?void 0:n[t])||0)},0);return O(I,{variant:`caption`,sx:{display:`block`,mt:1,opacity:.7},children:Z(`%s answers in the journal`,t)})}renderStep(e,t,n,r,i,a,o,s=!1){let c=tb[e];return R(le,{variant:`outlined`,onClick:()=>this.setState({open:e,error:``}),sx:{flex:s?`0 0 auto`:`1 1 auto`,minWidth:0,p:s?1:1.5,cursor:`pointer`,borderWidth:2,borderColor:r?`divider`:c,borderStyle:r?`dashed`:`solid`,opacity:r?.6:1,transition:`box-shadow 0.2s`,"&:hover":{boxShadow:4,opacity:1}},children:[R(M,{sx:{display:`flex`,alignItems:`center`,gap:1,mb:1},children:[O(M,{sx:{width:24,height:24,borderRadius:`50%`,backgroundColor:r?`text.disabled`:c,color:`#fff`,fontSize:13,fontWeight:`bold`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:t}),O(I,{lang:A.getLanguage(),sx:{fontWeight:`bold`,flexGrow:1,minWidth:0,hyphens:`auto`},children:n})]}),i,o?O(C,{severity:`warning`,sx:{mt:1,py:0},children:o}):null,a]},e)}renderArrow(e,t=!1){return R(M,{sx:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,px:.5,py:{xs:.5,md:0},width:{xs:`auto`,md:e?88:40},flexShrink:0,opacity:t?.6:.85},children:[O(I,{sx:{fontSize:28,lineHeight:1,display:{xs:`none`,md:`block`}},style:t?{letterSpacing:-2}:void 0,children:t?`⇢`:`→`}),O(I,{sx:{fontSize:28,lineHeight:1,display:{xs:`block`,md:`none`}},children:t?`⇣`:`↓`}),O(I,{variant:`caption`,lang:A.getLanguage(),sx:{textAlign:`center`,lineHeight:1.2,hyphens:`auto`,maxWidth:`100%`},children:e})]})}renderUnit(e,t,n,r){return R(M,{sx:{display:`flex`,flexDirection:{xs:`column`,md:`row`},alignItems:`stretch`,minWidth:0},children:[n?this.renderArrow(n.label):null,R(M,{sx:{display:`flex`,flexDirection:`column`,flex:`1 1 auto`,minWidth:0},children:[t,r?R(N,{children:[R(I,{variant:`caption`,sx:{textAlign:`center`,opacity:.7,my:.5},children:[`⇣ `,r.label]}),r.card]}):null]})]},e)}line(e,t){return R(I,{variant:`body2`,sx:{mb:.5},children:[e,t?R(`b`,{style:{overflowWrap:`anywhere`},children:[` `,t]}):null]})}renderSourcesStep(e){let t=this.form,n=[t.esphomeEnabled?`ESPHome`:``,t.udpServerEnabled?`UDP`:``,t.wyomingEnabled?`Wyoming`:``,`ioBroker`].filter(Boolean),r=(e,t,n,r)=>O(z,{title:r,children:O(a,{size:`small`,icon:e,label:t,variant:n?`filled`:`outlined`,sx:{opacity:n?1:.5}})},t);return this.renderStep(`sources`,e,Z(`Request comes from`),!1,R(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5},children:[r(O(s,{}),Z(`Voice`),!!t.voiceEnabled,t.voiceEnabled?n.join(`, `):Z(`Voice is off`)),r(O(w,{}),`Telegram`,this.state.telegram.length>0,this.state.telegram.length?this.state.telegram.join(`, `):Z(`No telegram instance sends here`)),r(O(ne,{}),Z(`Chat`),!0,Z(`The tab Chat of these settings`)),r(O(u,{}),`sendTo / Scripts`,!0,`sendTo('${this.instanceId}', 'ask', {text})`)]}))}duration(e){var t;let n=(t=this.state.timing)==null?void 0:t[e];return n!=null&&n.n?O(I,{variant:`caption`,sx:{display:`block`,mt:1,opacity:.7},children:Z(`%s s on average (%s in the journal)`,(n.ms/n.n/1e3).toFixed(1),n.n)}):null}caption(e){return O(I,{variant:`caption`,sx:{display:`block`,mt:.5,opacity:.7},children:e})}renderSttStep(e){var t;let n=this.form,r=!!n.voiceEnabled,i=this.sttProvider,a=Qy[i]?n[Qy[i].field]:``,o=Array.isArray(n.wakeWordLanguages)?n.wakeWordLanguages.length:0,s=i===`parakeet`||n.sttFallback===`parakeet`,c=nb(n.parakeetInstance),l=``;return r&&s&&!c?l=Z(`No ioBroker.voice instance chosen`):r&&s&&this.state.voiceInstances&&!((t=this.state.voiceInstances.find(e=>e.id===c))!=null&&t.alive)&&(l=Z(`%s is not running`,c)),this.renderStep(`stt`,e,Z(`Speech recognition`),!r,r?R(N,{children:[this.line(Z(`Provider:`),this.label(Yy,i)),a?this.line(Z(`Model:`),a):null,i===`openai`&&n.sttBaseUrl?this.line(Z(`Server:`),n.sttBaseUrl):null,n.sttFallback?this.line(Z(`Reserve:`),this.label(Yy,n.sttFallback)):null,this.line(Z(`Language:`),this.languageLabel),o?this.line(`${A.t(`Language and purpose per wake word`)}:`,String(o)):null,this.caption(Z(`Text requests skip this step.`))]}):this.line(Z(`Off: only text requests`)),r?this.duration(`stt`):null,l)}renderTtsStep(e){let t=this.form,n=!!t.voiceEnabled,r=this.ttsProvider,i=Zy[r]?t[Zy[r].field]:``,a=$y[r]?t[$y[r].field]:``,o=Array.isArray(t.ttsVoices)?t.ttsVoices.length:0,s=t.ttsMaxChars??400;return this.renderStep(`tts`,e,Z(`Speech output`),!n,n?R(N,{children:[this.line(Z(`Provider:`),this.label(Xy,r)),this.line(Z(`Voice:`),i||Z(`default voice`)),a?this.line(Z(`Model:`),a):null,t.ttsFallback?this.line(Z(`Reserve:`),this.label(Xy,t.ttsFallback)):null,o?this.line(`${A.t(`Voice per answer language`)}:`,String(o)):null,t.confirmWithTone?this.line(Z(`Switch commands: a beep`)):null,this.line(Number(s)>0?Z(`Longest answer: %s characters`,s):Z(`Long answers are not cut`)),this.caption(Z(`Only answers to speech; text requests get text back.`))]}):this.line(Z(`Off: answers as text`)),n?this.duration(`tts`):null)}renderLocalStep(e){var t;let n=this.localMode,r=Array.isArray(this.form.routines)?this.form.routines.length:0,i=nb(this.form.smartT2cInstance),a=(t=this.state.t2cInstances)==null||(t=t.find(e=>e.id===i))==null?void 0:t.alive,o=``;return n===`t2c`&&!i?o=Z(`No smart-text2command instance chosen`):n===`t2c`&&this.state.t2cInstances&&!a&&(o=Z(`%s is not running`,i)),this.renderStep(`local`,e,Z(`Local decision`),n===`off`,R(N,{children:[r?this.line(Z(`First the routines:`),String(r)):null,n===`off`?this.line(Z(`Off: everything goes to the models`)):null,n===`rules`?this.line(Z(`Built-in rules:`),Z(`devices, timers, alarms, time, weather`)):null,n===`t2c`?R(N,{children:[this.line(Z(`Devices:`),i||`smart-text2command`),this.line(Z(`Built-in rules:`),Z(`timers, alarms, time, weather`))]}):null]}),this.count(`routine`,`nlu`,`smartT2c`),o)}renderLocalLlmStep(e,t=!1){let n=!!this.form.useLocalLlm,r=this.cloudMode===`off`,i=this.form.localLlmModel?this.modelName(this.form.localLlmModel):Z(`default model`);return this.renderStep(`localLlm`,e,Z(`Local LLM`),!n,n?R(N,{children:[this.line(Z(`Model:`),i),t?null:this.line(Z(r?`The last step`:`Asked before the cloud`)),this.line(Z(`Gives up after:`),`${this.form.localLlmTimeoutSec||15} s`),!t&&!r?this.caption(Z(`Follow-up questions in a conversation go straight to the cloud.`)):null]}):this.line(Z(`Off`)),this.count(`localLlm`),void 0,t)}renderCloudStep(e){var t,n;let r=this.cloudMode,i=this.form.provider||`openai`,a=((t=Jy.find(e=>e.value===i))==null?void 0:t.label)||i,o=nb(this.form.piAgentInstance),s=``;return r===`pi-agent`&&!o?s=Z(`No pi-agent instance chosen`):r===`pi-agent`&&this.state.piInstances&&!((n=this.state.piInstances.find(e=>e.id===o))!=null&&n.alive)&&(s=Z(`%s is not running`,o)),this.renderStep(`cloud`,e,Z(`Cloud LLM`),r===`off`,r===`off`?R(N,{children:[this.line(Z(`Off: answers only locally`)),this.form.useLocalLlm?null:this.caption(Z(`What no step understands gets a fixed sentence.`))]}):r===`pi-agent`?R(N,{children:[this.line(`pi-agent:`,o||`—`),this.line(Z(`with its own model, tools and permissions`))]}):R(N,{children:[this.line(Z(`Provider:`),A.t(a)),i===`system`?null:this.line(Z(`Model:`),this.form.model||Z(`automatic`)),this.line(Z(`with the tools of this adapter`))]}),this.count(`cloud`),s)}renderDiagram(){let e=this.cloudMode===`off`,t=!!this.form.useLocalLlm,n=!!this.form.voiceEnabled,r=1,i=[this.renderUnit(`sources`,this.renderSourcesStep(r++)),this.renderUnit(`stt`,this.renderSttStep(r++),{label:n?Z(`speech`):``}),this.renderUnit(`local`,this.renderLocalStep(r++),{label:n?Z(`as text`):``})];if(this.localLlmFirst)i.push(this.renderUnit(`localLlm`,this.renderLocalLlmStep(r++),{label:Z(`not understood`)}),this.renderUnit(`cloud`,this.renderCloudStep(r++),{label:t&&!e?Z(`handed on`):``}));else{let e=this.renderCloudStep(r++);i.push(this.renderUnit(`cloud`,e,{label:Z(`not understood`)},{label:Z(`only if the cloud fails`),card:this.renderLocalLlmStep(r++,!0)}))}return i.push(this.renderUnit(`tts`,this.renderTtsStep(r++),{label:``})),O(M,{sx:{display:`grid`,gridTemplateColumns:{xs:`1fr`,md:`repeat(3, minmax(0, 1fr))`},rowGap:2},children:i})}renderModes(e,t,n){return O(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:1,mb:2},children:t.map(t=>O(H,{variant:t.value===e?`contained`:`outlined`,onClick:()=>n(t.value),children:t.label},t.value))})}renderInstanceSelect(e,t,n,r){return n?R(p,{variant:`standard`,fullWidth:!0,sx:{mb:2},children:[O(l,{children:e}),O(ye,{value:n.some(e=>e.id===t)?t:``,onChange:e=>r(String(e.target.value)),children:n.map(e=>R(E,{value:e.id,children:[e.id,` `,e.alive?``:`(${Z(`not running`)})`]},e.id))})]}):O(U,{size:20})}async install(e,t){this.setState({installing:e,error:``});try{var n;let r=await this.props.oContext.socket.sendTo(this.instanceId,`installAdapter`,{adapter:e});if(r!=null&&r.error)throw Error(r.error);r!=null&&(n=r.native)!=null&&n[t]&&this.set({[t]:r.native[t]}),await this.loadInstances()}catch(e){this.setState({error:e.message})}this.setState({installing:``})}renderInstallButton(e,t,n=e){return O(H,{variant:`outlined`,sx:{mb:2},disabled:!this.state.alive||!!this.state.installing,startIcon:this.state.installing===e?O(U,{size:16}):void 0,onClick:()=>void this.install(e,t),children:Z(`Install %s`,n)})}renderSelect(e,t,n,r,i){return R(p,{variant:`standard`,fullWidth:!0,sx:{mb:2},children:[O(l,{children:e}),O(ye,{value:n.some(e=>e.value===t)?t:``,onChange:e=>r(String(e.target.value)),children:n.map(e=>O(E,{value:e.value,children:e.label},e.value))}),i?O(I,{variant:`caption`,sx:{mt:.5,opacity:.7},children:i}):null]})}renderText(e,t,n){return O(V,{variant:`standard`,fullWidth:!0,label:e,helperText:n,value:this.form[t]||``,onChange:e=>this.set({[t]:e.target.value}),sx:{mb:2}},t)}renderVoiceSwitch(){return O(_,{sx:{mb:1},control:O(j,{checked:!!this.form.voiceEnabled,onChange:e=>this.set({voiceEnabled:e.target.checked})}),label:Z(`Voice satellites (speech recognition and speech output)`)})}providerOptions(e,t=!1){let n=e.map(e=>({value:e.value,label:A.t(e.label)}));return t?[{value:``,label:A.t(`None`)},...n]:n}renderSttSettings(){let e=this.form;if(!e.voiceEnabled)return R(N,{children:[this.renderVoiceSwitch(),this.info(Z(`Off: only text requests`))]});let t=this.sttProvider,n=t===`parakeet`||e.sttFallback===`parakeet`,r=Qy[t];return R(N,{children:[this.renderVoiceSwitch(),this.info(Z(`Turns the speech of the satellites into text. It also hears voice messages from Telegram and the dialog mode of the chat. Keys and more options are on the tab Voice.`)),this.renderSelect(A.t(`Voice language`),e.voiceLanguage||``,[{value:``,label:A.t(`System language`)},...eb],e=>this.set({voiceLanguage:e})),this.renderSelect(A.t(`Speech-to-text provider`),t,this.providerOptions(Yy),e=>this.set({sttProvider:e})),r?this.renderText(A.t(r.label),r.field,Z(`empty = automatic`)):null,t===`openai`?this.renderText(A.t(`Speech recognition server (optional)`),`sttBaseUrl`,A.t(`OpenAI-compatible server instead of OpenAI, e.g. a local Whisper: http://192.168.1.10:8000/v1 (speaches, faster-whisper-server, LocalAI). Empty = OpenAI.`)):null,this.renderSelect(A.t(`Speech-to-text fallback`),e.sttFallback||``,this.providerOptions(Yy.filter(e=>e.value!==t),!0),e=>this.set({sttFallback:e}),A.t(`Used when the provider above fails (outage, expired key, empty quota) or returns no text for speech. A local engine keeps voice working without the internet.`)),n?R(N,{children:[this.renderInstanceSelect(A.t(`ioBroker.voice instance`),nb(e.parakeetInstance),this.state.voiceInstances,e=>this.set({parakeetInstance:e})),this.state.voiceInstances&&!this.state.voiceInstances.length?this.renderInstallButton(`voice`,`parakeetInstance`,`ioBroker.voice`):null]}):null]})}renderTtsSettings(){let e=this.form;if(!e.voiceEnabled)return R(N,{children:[this.renderVoiceSwitch(),this.info(Z(`Off: answers as text`))]});let t=this.ttsProvider,n=Zy[t],r=$y[t],i=this.state.alive?this.state.voices:[],a=n?String(e[n.field]||``):``;return R(N,{children:[this.renderVoiceSwitch(),this.info(Z(`Speaks the answer on the satellite that asked, and the announcements. Keys and more options are on the tab Voice.`)),this.renderSelect(A.t(`Text-to-speech provider`),t,this.providerOptions(Xy),e=>this.set({ttsProvider:e})),r?this.renderText(A.t(r.label),r.field,Z(`empty = automatic`)):null,n&&i!=null&&i.length?this.renderSelect(A.t(n.label),a,[{value:``,label:Z(`default voice`)},...(a&&!i.includes(a)?[a]:[]).concat(i).map(e=>({value:e,label:e}))],e=>this.set({[n.field]:e}),this.languageLabel):null,n&&i&&!i.length?this.renderText(A.t(n.label),n.field):null,n&&!i?O(U,{size:20,sx:{mb:2}}):null,this.renderSelect(A.t(`Text-to-speech fallback`),e.ttsFallback||``,this.providerOptions(Xy.filter(e=>e.value!==t),!0),e=>this.set({ttsFallback:e}),A.t(`Used when the provider above fails. Piper keeps the assistant speaking without the internet.`)),O(V,{variant:`standard`,type:`number`,label:A.t(`Longest spoken answer (characters)`),value:e.ttsMaxChars??400,onChange:e=>this.set({ttsMaxChars:Math.max(0,Number(e.target.value)||0)}),slotProps:{htmlInput:{min:0,max:1e4}},sx:{mb:2}}),O(_,{sx:{display:`flex`,mb:1},control:O(j,{checked:!!e.confirmWithTone,onChange:e=>this.set({confirmWithTone:e.target.checked})}),label:A.t(`Confirm switch commands with a beep`)}),Array.isArray(e.ttsVoices)&&e.ttsVoices.length?this.info(`${A.t(`Voice per answer language`)}: ${e.ttsVoices.length}`):null]})}info(e){return O(I,{variant:`body2`,sx:{mb:2,opacity:.8},children:e})}renderSourcesSettings(){let e=this.form;return R(N,{children:[O(_,{control:O(j,{checked:!!e.voiceEnabled,onChange:e=>this.set({voiceEnabled:e.target.checked})}),label:Z(`Voice satellites (speech recognition and speech output)`)}),e.voiceEnabled?R(M,{sx:{pl:4,display:`flex`,flexDirection:`column`},children:[[[`esphomeEnabled`,`ESPHome`],[`udpServerEnabled`,`UDP`],[`wyomingEnabled`,`Wyoming`]].map(([t,n])=>O(_,{control:O(j,{size:`small`,checked:!!e[t],onChange:e=>this.set({[t]:e.target.checked})}),label:n},t)),this.info(Z(`Satellites of the adapter assistant-satellite always work. Details on the tabs Voice and Satellites.`))]}):null,O(I,{sx:{fontWeight:`bold`,mt:1},children:`Telegram`}),this.info(this.state.telegram.length?Z(`Messages of %s come here.`,this.state.telegram.join(`, `)):Z(`In the settings of the telegram adapter, choose %s as the assistant instance.`,this.instanceId)),O(I,{sx:{fontWeight:`bold`},children:Z(`Chat`)}),this.info(Z(`The tab Chat of these settings, also to try out every step.`)),O(I,{sx:{fontWeight:`bold`},children:`sendTo / Scripts`}),this.info(Z(`From a script: %s, or write the question into %s.`,`sendTo('${this.instanceId}', 'ask', { text: '…' })`,`${this.instanceId}.text.request`))]})}renderLocalSettings(){let e=this.localMode,t=Array.isArray(this.form.routines)?this.form.routines.length:0;return R(N,{children:[this.renderModes(e,[{value:`off`,label:Z(`Off`)},{value:`rules`,label:Z(`Built-in rules`)},{value:`t2c`,label:`smart-text2command`}],e=>this.set(e===`off`?{useLocalNlu:!1}:{useLocalNlu:!0,nluEngine:e===`t2c`?`smart-text2command`:`rules`})),e===`off`?this.info(Z(`Every request goes to the models. Only the routines are still checked first.`)):null,e===`rules`?this.info(Z(`Fixed rules understand switching, dimming and status of devices, timers, alarms, the time and the weather — in a few milliseconds, offline. What they do not understand goes on.`)):null,e===`t2c`?R(N,{children:[this.info(Z(`The adapter smart-text2command learns your phrasing from examples, runs only the actions you approved there and asks back when the room or the device is unclear. It understands German and English. Timers, alarms, the time and the weather stay with the built-in rules; what neither understands goes on.`)),this.renderInstanceSelect(Z(`smart-text2command instance`),nb(this.form.smartT2cInstance),this.state.t2cInstances,e=>this.set({smartT2cInstance:e})),this.state.t2cInstances&&!this.state.t2cInstances.length?this.renderInstallButton(`smart-text2command`,`smartT2cInstance`):null]}):null,this.info(t?Z(`Before this, %s routines are checked (tab Commands).`,t):Z(`Routines (fixed phrases with their own actions) are set up on the tab Commands.`))]})}renderLocalLlmSettings(){let e=this.form,t=this.state.models;return R(N,{children:[O(_,{sx:{mb:1},control:O(j,{checked:!!e.useLocalLlm,onChange:e=>this.set({useLocalLlm:e.target.checked})}),label:Z(`Use a local LLM`)}),e.useLocalLlm?R(N,{children:[t?R(p,{variant:`standard`,fullWidth:!0,sx:{mb:2},children:[O(l,{children:Z(`Model`)}),R(ye,{value:t.some(t=>t.file===e.localLlmModel)?e.localLlmModel:``,onChange:e=>this.set({localLlmModel:String(e.target.value)}),children:[O(E,{value:``,children:Z(`default model`)}),t.map(e=>O(E,{value:e.file,children:e.name},e.file))]})]}):this.info(Z(`The list of models needs the running instance.`)),O(_,{control:O(j,{checked:this.localLlmFirst,disabled:this.cloudMode===`off`,onChange:e=>this.set({localLlmFirst:e.target.checked})}),label:Z(`Ask before the cloud`)}),this.info(this.cloudMode===`off`?Z(`Without a cloud step the local model is the last step.`):this.localLlmFirst?Z(`Every request the local decision does not understand goes to it first. Saves cloud calls, but on a Raspberry Pi it adds 10–25 seconds.`):Z(`It only answers when the cloud fails (offline, quota).`)),O(V,{variant:`standard`,type:`number`,label:Z(`Gives up after (s)`),value:e.localLlmTimeoutSec??15,onChange:e=>this.set({localLlmTimeoutSec:Number(e.target.value)||15}),slotProps:{htmlInput:{min:1,max:300}},sx:{mb:2}}),this.info(Z(`Download and compare models on the tab Local models.`))]}):null]})}renderCloudSettings(){let e=this.cloudMode,t=this.form.provider||`openai`;return R(N,{children:[this.renderModes(e,[{value:`off`,label:Z(`Off`)},{value:`cloud`,label:Z(`AI provider`)},{value:`pi-agent`,label:`pi-agent`}],e=>this.set({provider:e===`off`?`none`:e===`pi-agent`?`pi-agent`:Jy.some(e=>e.value===t)?t:`system`})),e===`off`?this.info(Z(`Only the local steps answer; a request they do not understand gets a fixed sentence.`)):null,e===`cloud`?R(N,{children:[R(p,{variant:`standard`,fullWidth:!0,sx:{mb:2},children:[O(l,{children:Z(`Provider`)}),O(ye,{value:t,onChange:e=>this.set({provider:String(e.target.value)}),children:Jy.map(e=>O(E,{value:e.value,children:A.t(e.label)},e.value))})]}),t===`system`?null:O(V,{variant:`standard`,fullWidth:!0,label:Z(`Model`),helperText:Z(`empty = automatic`),value:this.form.model||``,onChange:e=>this.set({model:e.target.value}),sx:{mb:2}}),this.info(Z(t===`system`?`Provider, model and key come from the system settings of admin (tab AI there).`:`The API key and the other details are on the tab AI.`))]}):null,e===`pi-agent`?R(N,{children:[this.info(Z(`The adapter pi-agent answers with its own model, tools and write permissions; every request source gets a conversation of its own there.`)),this.renderInstanceSelect(Z(`pi-agent instance`),nb(this.form.piAgentInstance),this.state.piInstances,e=>this.set({piAgentInstance:e})),this.state.piInstances&&!this.state.piInstances.length?this.renderInstallButton(`pi-agent`,`piAgentInstance`):null]}):null]})}renderDialog(){let e=this.state.open;if(!e)return null;let t={sources:Z(`Request comes from`),stt:Z(`Speech recognition`),local:Z(`Local decision`),localLlm:Z(`Local LLM`),cloud:Z(`Cloud LLM`),tts:Z(`Speech output`)};return R(o,{open:!0,fullWidth:!0,maxWidth:`sm`,onClose:()=>this.setState({open:null}),children:[O(me,{sx:{borderLeft:`6px solid ${tb[e]}`},children:t[e]}),R(F,{children:[this.state.error?O(C,{severity:`error`,sx:{mb:2},children:this.state.error}):null,e===`sources`?this.renderSourcesSettings():null,e===`stt`?this.renderSttSettings():null,e===`local`?this.renderLocalSettings():null,e===`localLlm`?this.renderLocalLlmSettings():null,e===`cloud`?this.renderCloudSettings():null,e===`tts`?this.renderTtsSettings():null,O(I,{variant:`caption`,sx:{display:`block`,opacity:.7},children:Z(`Changes take effect when the settings are saved.`)})]}),O(re,{children:O(H,{variant:`contained`,onClick:()=>this.setState({open:null}),children:Z(`Close`)})})]})}renderItem(){return R(M,{sx:{width:`100%`},children:[O(I,{sx:{mb:2},children:Z(`How a request goes through the assistant. Every step answers what it understands, the rest goes on to the next one. Click a step to set it up.`)}),this.renderDiagram(),O(I,{variant:`body2`,sx:{mt:3,opacity:.8},children:Z(`Before every step: a stop word silences a ringing timer, the answer to an open question goes to whoever asked, and "dialog mode on/off" switches the dialog of a satellite. A request about a script or with a picture goes straight to the cloud step.`)}),this.renderDialog()]})}},ib={},ab=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(ab)){var ob;let n=((ob=e.split(`/`).pop())==null?void 0:ob.replace(`.json`,``))||`en`;ib[n]=t.default}A.extendTranslations(ib);var sb={ready:`success`,error:`error`,installing:`info`,downloading:`info`,loading:`info`},cb=class extends G{constructor(e){super(e),W(this,`statusId`,``),W(this,`progressId`,``),W(this,`onStatus`,(e,t)=>{this.setState({status:(t==null?void 0:t.val)||`idle`})}),W(this,`onProgress`,(e,t)=>{this.setState({progress:Number(t==null?void 0:t.val)||0})}),this.state={...this.state,status:`idle`,progress:0}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}async componentDidMount(){super.componentDidMount(),this.statusId=`${this.instanceId}.localLlm.status`,this.progressId=`${this.instanceId}.localLlm.progress`;let e=this.props.oContext.socket;try{let t=await e.getState(this.statusId),n=await e.getState(this.progressId);this.setState({status:(t==null?void 0:t.val)||`idle`,progress:Number(n==null?void 0:n.val)||0})}catch{}e.subscribeState(this.statusId,this.onStatus),e.subscribeState(this.progressId,this.onProgress)}componentWillUnmount(){var e;let t=this.props.oContext.socket;this.statusId&&(t.unsubscribeState(this.statusId,this.onStatus),t.unsubscribeState(this.progressId,this.onProgress)),(e=super.componentWillUnmount)==null||e.call(this)}renderItem(){let{status:e,progress:t}=this.state,n=e===`installing`||e===`downloading`||e===`loading`,r=e===`downloading`;return R(M,{sx:{width:`100%`,mt:.5,mb:1},children:[R(M,{sx:{display:`flex`,alignItems:`center`,gap:1,mb:.5},children:[R(I,{variant:`body2`,children:[A.t(`custom_assistant_Local model`),`:`]}),O(a,{size:`small`,color:sb[e]||`default`,variant:`outlined`,label:A.t(`custom_assistant_llm_${e}`)}),r?R(I,{variant:`body2`,children:[Math.round(t),`%`]}):null]}),n?O(g,{variant:r?`determinate`:`indeterminate`,value:r?t:void 0}):null]})}},lb={},ub=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(ub)){var db;let n=((db=e.split(`/`).pop())==null?void 0:db.replace(`.json`,``))||`en`;lb[n]=t.default}A.extendTranslations(lb);var Q=(e,...t)=>A.t(`custom_assistant_${e}`,...t),fb=[8,3,11];function pb(e,t){let n=/^(\d+)\.(\d+)\.(\d+)/.exec(e||``);if(!n)return!1;for(let e=0;e<3;e++){let r=Number(n[e+1]);if(r!==t[e])return r<t[e]}return!1}function $(e){return e>=1024**3?`${(e/1024**3).toFixed(2)} GB`:e>=1024**2?`${Math.round(e/1024**2)} MB`:`${Math.round(e/1024)} KB`}function mb(e){return e==null?`-`:e>=1e4?`${Math.round(e/1e3)} s`:e>=1e3?`${(e/1e3).toFixed(1)} s`:`${Math.round(e)} ms`}function hb(e){if(e===`multi`)return Q(`many languages`);try{return new Intl.DisplayNames([A.getLanguage()],{type:`language`}).of(e)||e}catch{return e}}var gb=class extends G{constructor(e){super(e),W(this,`timer`,null),W(this,`aliveId`,``),W(this,`statusId`,``),W(this,`progressId`,``),W(this,`unmounted`,!1),W(this,`onAlive`,(e,t)=>{let n=!!(t!=null&&t.val);n!==this.state.alive&&this.setState({alive:n},()=>void this.refresh())}),W(this,`onStatus`,(e,t)=>{this.setState({status:(t==null?void 0:t.val)||``})}),W(this,`onProgress`,(e,t)=>{this.setState({progress:Number(t==null?void 0:t.val)||0})}),this.state={...this.state,list:null,alive:!1,error:``,url:``,busy:``,status:``,progress:0,confirmDelete:``,details:null,folderField:!1}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}get form(){return this.props.data||{}}async componentDidMount(){super.componentDidMount();let e=this.props.oContext.socket;this.aliveId=`system.adapter.${this.instanceId}.alive`,this.statusId=`${this.instanceId}.localLlm.status`,this.progressId=`${this.instanceId}.localLlm.progress`;try{let t=await e.getState(this.aliveId),n=await e.getState(this.statusId),r=await e.getState(this.progressId);this.setState({alive:!!(t!=null&&t.val),status:(n==null?void 0:n.val)||``,progress:Number(r==null?void 0:r.val)||0})}catch{}await e.subscribeState(this.aliveId,this.onAlive),await e.subscribeState(this.statusId,this.onStatus),await e.subscribeState(this.progressId,this.onProgress),this.refresh(),this.checkAdmin()}async checkAdmin(){try{let e=await this.props.oContext.socket.getVersion();!this.unmounted&&(e==null?void 0:e.serverName)===`admin`&&pb(e.version,fb)&&this.setState({folderField:!0})}catch{}}renderFolderField(){return this.state.folderField?O(V,{variant:`standard`,fullWidth:!0,sx:{mb:2},label:Q(`Model folder`),helperText:Q(`Absolute path, e.g. /mnt/ssd/llm. Empty = data folder of the instance. Models already downloaded elsewhere are not moved.`),value:this.form.localLlmModelDir||``,onChange:e=>void this.onChange(`localLlmModelDir`,e.target.value)}):null}componentWillUnmount(){var e;this.unmounted=!0,this.timer&&clearTimeout(this.timer);let t=this.props.oContext.socket;t.unsubscribeState(this.aliveId,this.onAlive),t.unsubscribeState(this.statusId,this.onStatus),t.unsubscribeState(this.progressId,this.onProgress),(e=super.componentWillUnmount)==null||e.call(this)}componentDidUpdate(e){var t;((t=e.data)==null?void 0:t.localLlmModelDir)!==this.form.localLlmModelDir&&this.refresh()}async send(e,t={}){let n=await this.props.oContext.socket.sendTo(this.instanceId,e,{dir:this.form.localLlmModelDir||``,active:this.form.localLlmModel||``,...t});if(n!=null&&n.error)throw Error(n.error);return n}async refresh(){if(this.timer&&=(clearTimeout(this.timer),null),!this.unmounted){if(!this.state.alive)this.setState({list:null});else try{let e=await this.send(`listLocalModels`);if(this.unmounted)return;this.setState({list:e,error:``});let t=e.downloads.some(e=>!e.error)||e.benchmarkRunning;this.timer=setTimeout(()=>void this.refresh(),t?1e3:1e4)}catch(e){this.setState({error:e.message}),this.timer=setTimeout(()=>void this.refresh(),1e4)}}}async run(e,t,n={}){this.setState({busy:e,error:``});try{await this.send(t,n)}catch(e){this.setState({error:e.message})}this.setState({busy:``}),await this.refresh()}useModel(e){this.props.onChange({...this.form,localLlmModel:e})}renderHeader(e){let t=this.form.localLlmModel||e.active,n=e.loaded&&t&&e.loaded!==t,r=e.disk?e.disk.total-e.disk.free:0;return R(M,{sx:{mb:2},children:[e.engineInstalled?null:O(C,{severity:`warning`,sx:{mb:1},children:Q(`The engine is not installed yet. Install it on the main tab ("Install local model").`)}),n?O(C,{severity:`info`,sx:{mb:1},children:Q(`Save the settings to load the selected model. The instance restarts.`)}):null,R(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:2,alignItems:`center`},children:[R(I,{variant:`body2`,children:[Q(`Folder`),`: `,O(`code`,{children:e.dir})]}),R(I,{variant:`body2`,children:[Q(`Models`),`: `,e.models.length,`, `,$(e.totalBytes)]}),e.disk?O(z,{title:`${$(r)} / ${$(e.disk.total)}`,children:R(M,{sx:{minWidth:220},children:[R(I,{variant:`body2`,children:[Q(`Free on the disk`),`: `,$(e.disk.free)]}),O(g,{variant:`determinate`,value:e.disk.total?100*r/e.disk.total:0,color:e.disk.free<2*1024**3?`warning`:`primary`})]})}):null,this.state.status?O(a,{size:`small`,variant:`outlined`,color:this.state.status===`ready`?`success`:this.state.status===`error`?`error`:`default`,label:`${Q(`Loaded model`)}: ${A.t(`custom_assistant_llm_${this.state.status}`)}${[`downloading`,`benchmark`].includes(this.state.status)?` ${Math.round(this.state.progress)}%`:``}`}):null]})]})}renderBenchmark(e){let t=e.stats.benchmark;if(!t)return`-`;let n=t.cases-t.correct;return O(z,{title:Q(`Details`),children:O(a,{size:`small`,clickable:!0,onClick:()=>this.setState({details:e}),color:n===0?`success`:n<=t.cases/4?`warning`:`error`,label:`${t.correct}/${t.cases} · ${t.tokensPerSec} t/s`})})}renderModels(e){let t=this.form.localLlmModel||e.active;return e.models.length?O(M,{sx:{overflowX:`auto`},children:R(L,{size:`small`,children:[O(_e,{children:R(B,{children:[O(P,{children:Q(`Model`)}),O(P,{align:`right`,children:Q(`Size`)}),O(P,{align:`right`,children:O(z,{title:Q(`Questions asked / answered by the model / handed over to the next tier`),children:O(`span`,{children:Q(`Asked / answered / handed over`)})})}),O(P,{align:`right`,children:O(z,{title:Q(`Timeouts and errors among the questions asked`),children:O(`span`,{children:Q(`Failures`)})})}),O(P,{align:`right`,children:Q(`Tokens/s`)}),O(P,{align:`right`,children:O(z,{title:Q(`Time until the first word: reading the question`),children:O(`span`,{children:Q(`First token`)})})}),O(P,{align:`right`,children:Q(`Answer time`)}),O(P,{align:`right`,children:Q(`Load time`)}),O(P,{children:Q(`Benchmark`)}),O(P,{})]})}),O(ve,{children:e.models.map(n=>{let r=n.stats,i=n.file===t,a=n.file===e.loaded;return R(B,{selected:i,children:[R(P,{children:[R(M,{sx:{display:`flex`,alignItems:`center`,gap:.5},children:[i?O(m,{fontSize:`small`,color:`success`}):null,O(z,{title:n.url||n.file,children:O(`span`,{children:n.name})})]}),r.lastUsed?R(I,{variant:`caption`,sx:{opacity:.7},children:[Q(`last used`),` `,new Date(r.lastUsed).toLocaleString()]}):null]}),O(P,{align:`right`,children:$(n.sizeBytes)}),R(P,{align:`right`,children:[r.asked,` / `,r.answered,` / `,r.handoffs]}),O(P,{align:`right`,children:r.failureRate===null?`-`:`${Math.round(r.failureRate*100)} % (${r.timeouts+r.errors})`}),O(P,{align:`right`,children:r.tokensPerSec===null?`-`:r.tokensPerSec.toFixed(1)}),O(P,{align:`right`,children:mb(r.avgFirstTokenMs)}),O(P,{align:`right`,children:mb(r.avgAnswerMs)}),O(P,{align:`right`,children:r.loads?mb(r.lastLoadMs):`-`}),O(P,{children:this.renderBenchmark(n)}),R(P,{sx:{whiteSpace:`nowrap`},children:[i?null:O(H,{size:`small`,onClick:()=>this.useModel(n.file),children:Q(`Use`)}),a?O(z,{title:Q(`Asks the loaded model test questions in the language of the assistant and in English: home questions must be handed over, general ones answered correctly`),children:O(`span`,{children:O(d,{size:`small`,disabled:!!this.state.busy||e.benchmarkRunning,onClick:()=>void this.run(`bench:${n.file}`,`benchmarkLocalModel`),children:O(se,{fontSize:`small`})})})}):null,O(z,{title:Q(`Reset statistics`),children:O(d,{size:`small`,onClick:()=>void this.run(`reset:${n.file}`,`resetLocalModelStats`,{file:n.file}),children:O(ie,{fontSize:`small`})})}),O(z,{title:Q(i||a?`The active model cannot be deleted`:`Delete`),children:O(`span`,{children:O(d,{size:`small`,disabled:i||a,onClick:()=>this.setState({confirmDelete:n.file}),children:O(ue,{fontSize:`small`})})})})]})]},n.file)})})]})}):O(I,{variant:`body2`,sx:{my:1},children:Q(`No models in this folder yet. Download one below.`)})}renderDownloads(e){return e.downloads.length?O(M,{sx:{my:2},children:e.downloads.map(e=>R(M,{sx:{mb:1},children:[R(M,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[R(I,{variant:`body2`,sx:{flexGrow:1},children:[e.file,`:`,` `,e.error?`${Q(`failed`)}: ${e.error}`:`${$(e.received)}${e.total?` / ${$(e.total)}`:``}`]}),e.error?null:O(z,{title:Q(`Cancel`),children:O(d,{size:`small`,onClick:()=>void this.run(`cancel:${e.file}`,`cancelLocalModelDownload`,{file:e.file}),children:O(ae,{fontSize:`small`})})})]}),e.error?null:O(g,{variant:e.total?`determinate`:`indeterminate`,value:e.total?100*e.received/e.total:void 0})]},e.file))}):null}renderPresets(e){let t=A.getLanguage(),n=(e.language||`en`).split(`-`)[0],r=new Set(e.models.map(e=>e.file)),i=new Set(e.downloads.filter(e=>!e.error).map(e=>e.file));return O(M,{sx:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(280px, 1fr))`,gap:1.5,my:1},children:e.presets.map(o=>{let s=o.languages.includes(`multi`)||o.languages.includes(n),c=e.disk?o.sizeBytes+200*1024**2>e.disk.free:!1;return R(Te,{variant:`outlined`,sx:{display:`flex`,flexDirection:`column`},children:[R(Ce,{sx:{flexGrow:1,pb:1},children:[O(I,{variant:`subtitle2`,children:o.name}),R(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5,my:.5},children:[O(a,{size:`small`,label:`${o.params} ${Q(`parameters`)}`}),O(a,{size:`small`,label:$(o.sizeBytes)}),O(z,{title:Q(`Estimate from the model size, not measured. Use the benchmark for real numbers.`),children:O(a,{size:`small`,variant:`outlined`,label:`${Q(`speed`)}: ${Q(o.speed)}`})})]}),O(I,{variant:`body2`,sx:{mb:.5},children:o.description[t]||o.description.en}),R(I,{variant:`caption`,color:s?`text.secondary`:`warning.main`,children:[Q(`Languages`),`: `,o.languages.map(hb).join(`, `),s?``:`. ${Q(`not the language of the assistant`)}`]})]}),O(ce,{children:O(H,{size:`small`,startIcon:O(ge,{}),disabled:r.has(o.file)||i.has(o.file)||c||!!this.state.busy,onClick:()=>void this.run(`add:${o.id}`,`addLocalModel`,{preset:o.id}),children:r.has(o.file)?Q(`downloaded`):i.has(o.file)?Q(`downloading`):Q(c?`not enough space`:`Download`)})})]},o.id)})})}renderOwnLink(){return R(M,{sx:{display:`flex`,gap:1,alignItems:`flex-start`,my:1},children:[O(V,{variant:`standard`,fullWidth:!0,label:Q(`Own model: link to a .gguf file`),helperText:Q(`Hugging Face links are fine, also hf:org/repo/file.gguf`),value:this.state.url,onChange:e=>this.setState({url:e.target.value})}),O(H,{variant:`outlined`,startIcon:O(ge,{}),disabled:!this.state.url.trim()||!!this.state.busy,onClick:()=>void this.run(`add:url`,`addLocalModel`,{url:this.state.url.trim()}).then(()=>this.setState({url:this.state.error?this.state.url:``})),sx:{mt:1.5,whiteSpace:`nowrap`},children:Q(`Download`)})]})}renderDetails(){let e=this.state.details,t=e==null?void 0:e.stats.benchmark;return!e||!t?null:R(o,{open:!0,fullWidth:!0,maxWidth:`md`,onClose:()=>this.setState({details:null}),children:[R(me,{children:[Q(`Benchmark`),`: `,e.name]}),R(F,{children:[R(I,{variant:`body2`,sx:{mb:1},children:[new Date(t.at).toLocaleString(),` · `,t.correct,`/`,t.cases,` `,Q(`correct`),` ·`,` `,Q(`missed hand-overs`),`: `,t.missedHandoffs,` · `,Q(`needless hand-overs`),`: `,t.needlessHandoffs,` `,`· `,Q(`wrong answers`),`: `,t.wrongAnswers,` · `,Q(`timeouts`),`: `,t.timeouts,` · `,t.tokensPerSec,` t/s · `,Q(`First token`),` `,mb(t.avgFirstTokenMs),` · `,Q(`Answer time`),` `,mb(t.avgMs)]}),R(L,{size:`small`,children:[O(_e,{children:R(B,{children:[O(P,{}),O(P,{children:Q(`Question`)}),O(P,{children:Q(`Expected`)}),O(P,{children:Q(`Answer`)}),O(P,{align:`right`,children:Q(`Time`)})]})}),O(ve,{children:t.details.map((e,t)=>R(B,{children:[O(P,{children:e.ok?`✓`:`✗`}),R(P,{children:[`[`,e.lang,`] `,e.question]}),O(P,{children:e.expect===`handoff`?Q(`hand over`):e.expect}),O(P,{sx:{maxWidth:360,wordBreak:`break-word`},children:e.answer}),O(P,{align:`right`,children:mb(e.ms)})]},t))})]})]}),O(re,{children:O(H,{onClick:()=>this.setState({details:null}),children:Q(`Close`)})})]})}renderConfirmDelete(){let e=this.state.confirmDelete;return e?R(o,{open:!0,onClose:()=>this.setState({confirmDelete:``}),children:[O(me,{children:Q(`Delete model?`)}),O(F,{children:O(I,{children:Q(`The file %s is deleted from the disk. Its statistics stay.`,e)})}),R(re,{children:[O(H,{color:`error`,variant:`contained`,onClick:()=>{this.setState({confirmDelete:``}),this.run(`delete:${e}`,`deleteLocalModel`,{file:e})},children:Q(`Delete`)}),O(H,{onClick:()=>this.setState({confirmDelete:``}),children:Q(`Cancel`)})]})]}):null}renderItem(){if(!this.state.alive)return R(M,{sx:{width:`100%`},children:[this.renderFolderField(),O(C,{severity:`info`,children:Q(`Start the instance to manage the local models.`)})]});let e=this.state.list;return e?R(M,{sx:{width:`100%`},children:[this.renderFolderField(),this.state.error?O(C,{severity:`error`,sx:{mb:1},onClose:()=>this.setState({error:``}),children:this.state.error}):null,this.renderHeader(e),this.renderModels(e),this.renderDownloads(e),O(I,{variant:`h6`,sx:{mt:3},children:Q(`Add a model`)}),this.renderPresets(e),this.renderOwnLink(),this.renderDetails(),this.renderConfirmDelete()]}):R(M,{sx:{width:`100%`},children:[this.renderFolderField(),this.state.error?O(C,{severity:`error`,children:this.state.error}):O(g,{})]})}};function _b(e){let t=``,n=e.replace(/^.*[\\/]/,``).toLowerCase().replace(/\.(tflite|json|onnx)$/,``).normalize(`NFKD`).replace(/[̀-ͯ]/g,``).replace(/ß/g,`ss`).split(/[^a-z0-9]+/).filter(Boolean).filter(e=>{let n=!t&&/^20(\d{2})(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])$/.exec(e);return n?(t=`${n[1]}${n[2]}${n[3]}`,!1):!(/^\d{4,}$/.test(e)||/^[0-9a-f]{4,8}$/.test(e)&&/\d/.test(e)&&/[a-f]/.test(e)||[`microwakeword`,`openwakeword`,`wakeword`].includes(e))});return t?`${t}_${n.join(`_`)||`wake_word`}`.slice(0,40):null}function vb(e){return e.replace(/\.tflite$/i,``).split(/[_\-\s]+/).filter(Boolean).map(e=>e[0].toUpperCase()+e.slice(1)).join(` `)}function yb(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).replace(/^data:[^,]*,/,``)),r.onerror=()=>n(r.error||Error(`read failed`)),r.readAsDataURL(e)})}function bb(e,t){if(!Number.isFinite(e))return String(e);if(t&&t>0&&t<1){let n=Math.min(6,Math.ceil(-Math.log10(t)-1e-6));return String(Number(e.toFixed(n)))}return String(Number(e.toPrecision(7)))}function xb(e){let t=e.replace(/^controls\./,``),n=t.indexOf(`.`);return n<0?``:t.slice(n+1)}var Sb=[`currentVersion`,`latestVersion`,`check`,`install`,`progress`];function Cb(e){let t=e.map(xb);return t.includes(`latestVersion`)&&t.includes(`install`)&&t.includes(`progress`)}function wb(e){return e.common.write===!1}function Tb(e){var n,r;let{values:i,objects:s,loading:c,onWrite:u}=e,d=t.useMemo(()=>{try{let e=i.availableWakeWords;return e?JSON.parse(String(e)):null}catch{return null}},[i.availableWakeWords]),m=String(i.wakeWords??``).split(`,`).map(e=>e.trim()).filter(Boolean),h=e=>{let t=m.includes(e)?m.filter(t=>t!==e):[...m,e];u(`wakeWords`,t.join(`,`))},_=(d==null?void 0:d.max)||0,ee=_>0&&m.length>=_,v=t.useRef(null),[y,b]=t.useState(null),[x,S]=t.useState(!1),[ie,w]=t.useState(null),[ae,T]=t.useState(null),[oe,se]=t.useState([]),{sendTo:D}=e,k=t.useCallback(async()=>{try{let e=await D(`listWakeWords`,{});se(Array.isArray(e==null?void 0:e.bundled)?e.bundled:[])}catch{se([])}},[D]);t.useEffect(()=>{k()},[]);let ce=async t=>{w(null),S(!0);try{var n;let r=await D(`installWakeWord`,{id:t.id,satellite:e.satId}),i=(r==null?void 0:r.phrase)||t.phrase;r!=null&&r.error?w({severity:`error`,text:r.error}):r!=null&&r.full?w({severity:`error`,text:A.t(`custom_assistant_wake_word_installed_full`,i,i)}):r!=null&&(n=r.replaced)!=null&&n.length?w({severity:`success`,text:A.t(`custom_assistant_wake_word_installed_replaced`,i,r.replaced.join(`, `))}):w({severity:`success`,text:A.t(`custom_assistant_wake_word_installed`,i)})}catch(e){w({severity:`error`,text:String(e.message||e)})}finally{S(!1),k()}},le=oe.filter(e=>{var t;return!e.installed&&!(d!=null&&(t=d.words)!=null&&t.some(t=>t.id===e.id))}),ue=async e=>{w(null);let t=Array.from(e||[]),n=t.find(e=>/\.tflite$/i.test(e.name)),r=t.find(e=>/\.json$/i.test(e.name));if(!n)w({severity:`error`,text:A.t(`custom_assistant_Please select a .tflite model file`)});else try{let e=r?await r.text():``,t=``;try{let n=e?JSON.parse(e):{};t=typeof n.wake_word==`string`?n.wake_word:``}catch{}b({fileName:n.name,model:await yb(n),config:e,configName:(r==null?void 0:r.name)||``,phrase:_b(n.name)||t||vb(n.name)})}catch(e){w({severity:`error`,text:String(e.message||e)})}},de=async()=>{if(y){S(!0);try{let e=await D(`uploadWakeWord`,{model:y.model,fileName:y.fileName,config:y.config||void 0,phrase:y.phrase.trim()});e!=null&&e.error?w({severity:`error`,text:e.error}):(b(null),w({severity:`success`,text:A.t(`custom_assistant_wake_word_uploaded`,(e==null?void 0:e.phrase)||y.phrase)}))}catch(e){w({severity:`error`,text:String(e.message||e)})}finally{S(!1),k()}}},fe=async e=>{T(null),S(!0);try{let t=await D(`deleteWakeWord`,{id:e.id});w(t!=null&&t.error?{severity:`error`,text:t.error}:{severity:`success`,text:A.t(`custom_assistant_wake_word_deleted`,e.phrase)})}catch(e){w({severity:`error`,text:String(e.message||e)})}finally{S(!1),k()}};function P(e,t){let n=t=>i[`controls.${e}.${t}`],r=String(n(`currentVersion`)??``),a=String(n(`latestVersion`)??``),o=n(`inProgress`)===!0,c=Math.min(100,Math.max(0,Number(n(`progress`))||0)),l=e=>{let t=Sb.indexOf(xb(e));return t<0?Sb.length:t};return[...t].sort((e,t)=>l(e)-l(t)).map(e=>{let t=xb(e);if(t===`inProgress`)return null;if(t===`install`)return a&&a!==r&&!o?ge(e):null;if(t===`check`)return o?null:ge(e);if(t===`progress`){var n;if(!o)return null;let r=(n=s[e])==null||(n=n.common)==null?void 0:n.name;return R(M,{children:[R(I,{variant:`caption`,sx:{opacity:.7},children:[typeof r==`string`?r:t,c>0?` ${Math.round(c)} %`:``]}),O(g,{variant:c>0?`determinate`:`indeterminate`,value:c,sx:{height:8,borderRadius:4}})]},e)}return ge(e)})}let he=Object.keys(s).sort(),L=new Map;for(let e of he){let t=e.replace(/^controls\./,``),n=t.indexOf(`.`),r=n<0?t:t.slice(0,n);L.set(r,[...L.get(r)||[],e])}function ge(e){let t=s[e],n=t.common,r=n.name&&typeof n.name==`string`?n.name:e,a=i[e];if(n.role===`button`)return O(H,{size:`small`,variant:`outlined`,onClick:()=>u(e,!0),children:r},e);if(wb(t))return R(M,{children:[O(I,{variant:`caption`,sx:{opacity:.7},children:r}),O(I,{variant:`body2`,children:a==null?`—`:typeof a==`number`?bb(a,n.step):String(a)})]},e);if(n.type===`boolean`)return R(M,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[O(I,{variant:`body2`,children:r}),O(j,{size:`small`,checked:!!a,onChange:t=>u(e,t.target.checked)})]},e);if(n.states){let t=Array.isArray(n.states)?Object.fromEntries(n.states.map(e=>[e,e])):n.states;return R(p,{size:`small`,fullWidth:!0,children:[O(l,{children:r}),O(ye,{label:r,value:a==null?``:String(a),onChange:t=>u(e,t.target.value),children:Object.entries(t).map(([e,t])=>O(E,{value:e,children:t},e))})]},e)}if(n.type===`number`&&n.min!==void 0&&n.max!==void 0){let t=Number(a??n.min),i=n.step?Number(n.step.toPrecision(7)):1;return R(M,{children:[R(I,{variant:`body2`,children:[r,R(I,{component:`span`,variant:`caption`,sx:{ml:1,opacity:.7},children:[bb(t,i),n.unit||``,` (`,bb(n.min,i),`…`,bb(n.max,i),`)`]})]}),O(pe,{size:`small`,value:Number.isFinite(t)?t:n.min,min:n.min,max:n.max,step:i,onChangeCommitted:(t,n)=>{let r=Array.isArray(n)?n[0]:n;u(e,Number(bb(r,i)))},valueLabelDisplay:`auto`,valueLabelFormat:e=>bb(e,i)})]},e)}let o=a==null?``:String(a),c=t=>{t!==o&&u(e,t)};return O(V,{size:`small`,fullWidth:!0,label:r,defaultValue:o,onBlur:e=>c(e.target.value),onKeyDown:e=>{e.key===`Enter`&&c(e.target.value)}},`${e}\n${o}`)}return R(o,{open:!0,onClose:e.onClose,maxWidth:`sm`,fullWidth:!0,children:[R(me,{children:[A.t(`custom_assistant_Settings for %s`,e.satId),e.room?O(I,{variant:`caption`,sx:{ml:1,opacity:.7},children:e.room}):null]}),O(F,{dividers:!0,children:c?O(M,{sx:{display:`flex`,justifyContent:`center`,p:3},children:O(U,{size:28})}):R(M,{sx:{display:`flex`,flexDirection:`column`,gap:2},children:[d!=null&&(n=d.words)!=null&&n.length?R(M,{children:[R(I,{variant:`subtitle2`,children:[A.t(`custom_assistant_Wake words`),O(I,{component:`span`,variant:`caption`,sx:{ml:1,opacity:.7},children:A.t(`custom_assistant_%s of %s active`,m.length,_)})]}),O(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5,mt:1},children:d.words.map(e=>{let t=m.includes(e.id);return O(z,{title:e.custom?`${A.t(`custom_assistant_Uploaded wake word`)} · ${e.id}${e.languages.length?` · ${e.languages.join(`, `)}`:``}`:e.languages.join(`, `),children:O(a,{size:`small`,label:e.phrase||e.id,color:t?`primary`:`default`,variant:t?`filled`:`outlined`,icon:e.custom?O(ne,{}):void 0,disabled:!t&&ee||x,onClick:()=>h(e.id),onDelete:e.custom?()=>T(e):void 0,sx:{border:`1px solid`,borderColor:t?`primary.main`:`text.secondary`,bgcolor:t?void 0:`action.hover`,fontWeight:t?600:400}})},e.id)})}),O(I,{variant:`caption`,sx:{display:`block`,mt:.5,opacity:.7},children:A.t(`custom_assistant_wake_word_hint`)}),le.length?R(M,{sx:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:.5,mt:1},children:[R(I,{variant:`caption`,sx:{mr:.5,opacity:.7},children:[A.t(`custom_assistant_Shipped with the adapter`),`:`]}),le.map(e=>O(z,{title:`${e.languages.length?`${e.languages.join(`, `)} · `:``}${A.t(`custom_assistant_bundled_wake_word_hint`)}`,children:O(a,{size:`small`,variant:`outlined`,color:`primary`,label:e.phrase,icon:O(f,{}),disabled:x,onClick:()=>void ce(e),sx:{borderStyle:`dashed`}})},e.id))]}):null,ae?O(C,{severity:`warning`,sx:{mt:1},action:R(N,{children:[O(H,{color:`inherit`,size:`small`,onClick:()=>void fe(ae),children:A.t(`custom_assistant_Delete`)}),O(H,{color:`inherit`,size:`small`,onClick:()=>T(null),children:A.t(`custom_assistant_Cancel`)})]}),children:A.t(`custom_assistant_delete_wake_word_confirm`,ae.phrase)}):null,O(`input`,{ref:v,type:`file`,accept:`.tflite,.json`,multiple:!0,style:{display:`none`},onChange:e=>{ue(e.target.files),e.target.value=``}}),y?R(M,{sx:{mt:1,p:1.5,border:`1px solid`,borderColor:`divider`,borderRadius:1,display:`flex`,flexDirection:`column`,gap:1},children:[R(I,{variant:`caption`,sx:{opacity:.7},children:[y.fileName,y.configName?` + ${y.configName}`:``]}),O(V,{size:`small`,fullWidth:!0,autoFocus:!0,label:A.t(`custom_assistant_Wake word phrase`),helperText:A.t(`custom_assistant_wake_word_phrase_hint`),value:y.phrase,onChange:e=>b({...y,phrase:e.target.value}),onKeyDown:e=>{e.key===`Enter`&&y.phrase.trim()&&de()}}),R(M,{sx:{display:`flex`,gap:1,justifyContent:`flex-end`},children:[O(H,{size:`small`,disabled:x,onClick:()=>b(null),children:A.t(`custom_assistant_Cancel`)}),O(H,{size:`small`,variant:`contained`,disabled:x||!y.phrase.trim(),startIcon:x?O(U,{size:14}):O(f,{}),onClick:()=>void de(),children:A.t(`custom_assistant_Upload`)})]})]}):O(z,{title:A.t(`custom_assistant_wake_word_upload_hint`),children:O(H,{size:`small`,variant:`outlined`,sx:{mt:1},startIcon:O(f,{}),disabled:x,onClick:()=>{var e;return(e=v.current)==null?void 0:e.click()},children:A.t(`custom_assistant_Upload own wake word`)})}),ie?O(C,{severity:ie.severity,sx:{mt:1},onClose:()=>w(null),children:ie.text}):null]}):null,d!=null&&(r=d.words)!=null&&r.length&&L.size?O(te,{}):null,[...L.entries()].map(([t,n])=>{var r;return R(M,{sx:{display:`flex`,flexDirection:`column`,gap:1},children:[n.length>1?O(I,{variant:`subtitle2`,sx:{opacity:.8},children:((r=e.groupNames)==null?void 0:r[t])||t}):null,Cb(n)?P(t,n):n.map(ge)]},t)}),!L.size&&!d?O(I,{variant:`body2`,sx:{opacity:.7},children:A.t(`custom_assistant_This satellite exposes no settings.`)}):null]})}),O(re,{children:O(H,{onClick:e.onClose,children:A.t(`custom_assistant_Close`)})})]})}var Eb={},Db=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(Db)){var Ob;let n=((Ob=e.split(`/`).pop())==null?void 0:Ob.replace(`.json`,``))||`en`;Eb[n]=t.default}A.extendTranslations(Eb);var kb={idle:`default`,listening:`info`,processing:`warning`,speaking:`success`,offline:`error`},Ab=`__all__`,jb=class extends G{constructor(e){super(e),W(this,`pattern`,``),W(this,`onState`,(e,t)=>{this.setState(n=>{let r={...n.sats},i=this.parse(e);i&&r[i.satId]&&(r[i.satId]={...r[i.satId]}),this.applyToMap(r,e,t);let a={...n.vals};return this.applyToVals(a,e,t),{sats:r,vals:a}})}),this.state={...this.state,sats:{},speak:{},vals:{},settingsFor:null,settingsObjects:{},settingsGroupNames:{},settingsLoading:!1,confirmDelete:null,deleteError:``}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}async componentDidMount(){super.componentDidMount(),this.pattern=`${this.instanceId}.satellites.*`;try{let e=await this.props.oContext.socket.getForeignStates(this.pattern),t={},n={};for(let[r,i]of Object.entries(e||{}))this.applyToMap(t,r,i),this.applyToVals(n,r,i);this.setState({sats:t,vals:n})}catch{}this.props.oContext.socket.subscribeState(this.pattern,this.onState)}componentWillUnmount(){var e;this.pattern&&this.props.oContext.socket.unsubscribeState(this.pattern,this.onState),(e=super.componentWillUnmount)==null||e.call(this)}parse(e){let t=`${this.instanceId}.satellites.`;if(!e.startsWith(t))return null;let n=e.slice(t.length),r=n.indexOf(`.`);return r<0?null:{satId:n.slice(0,r),prop:n.slice(r+1)}}applyToMap(e,t,n){let r=this.parse(t);if(!r)return;let i=e[r.satId]||{status:`idle`,room:``,host:``,alive:!1,lastSeen:0};r.prop===`status`?i.status=String((n==null?void 0:n.val)??`idle`):r.prop===`room`?i.room=String((n==null?void 0:n.val)??``):r.prop===`host`?i.host=String((n==null?void 0:n.val)??``):r.prop===`alive`?i.alive=!!(n!=null&&n.val):r.prop===`lastSeen`&&(i.lastSeen=Number(n==null?void 0:n.val)||0),e[r.satId]=i}applyToVals(e,t,n){let r=this.parse(t);r&&(e[r.satId]={...e[r.satId]||{},[r.prop]:(n==null?void 0:n.val)??null})}async openSettings(e){this.setState({settingsFor:e,settingsObjects:{},settingsLoading:!0});let t=`${this.instanceId}.satellites.${e}.`;try{let e=await this.props.oContext.socket.getForeignObjects(`${t}controls.*`,`state`),r={};for(let[n,i]of Object.entries(e||{}))i!=null&&i.common&&(r[n.slice(t.length)]=i);let i=await this.props.oContext.socket.getForeignObjects(`${t}controls.*`,`channel`).catch(()=>({})),a={},o=A.getLanguage();for(let[e,r]of Object.entries(i||{})){var n;let i=r==null||(n=r.common)==null?void 0:n.name,s=typeof i==`string`?i:i&&(i[o]||i.en)||``;s&&(a[e.slice(`${t}controls.`.length)]=s)}this.setState({settingsObjects:r,settingsGroupNames:a,settingsLoading:!1})}catch{this.setState({settingsLoading:!1})}}writeSetting(e,t,n){this.props.oContext.socket.setState(`${this.instanceId}.satellites.${e}.${t}`,{val:n,ack:!1}).catch(()=>{})}announce(e){let t=(this.state.speak[e]||``).trim();if(!t)return;let n=e===Ab?`${this.instanceId}.tts.text`:`${this.instanceId}.satellites.${e}.tts`;this.props.oContext.socket.setState(n,{val:t,ack:!1}).catch(()=>{}),this.setState(t=>({speak:{...t.speak,[e]:``}}))}async deleteSatellite(e){try{let t=await this.props.oContext.socket.sendTo(this.instanceId,`deleteSatellite`,{id:e});if(t!=null&&t.error){this.setState({deleteError:t.error});return}}catch(e){this.setState({deleteError:String((e==null?void 0:e.message)||e)});return}this.setState(t=>{let n={...t.sats},r={...t.vals};return delete n[e],delete r[e],{sats:n,vals:r,confirmDelete:null,deleteError:``}})}ago(e){if(!e)return`—`;let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<60?`${t} s`:t<3600?`${Math.round(t/60)} min`:t<86400?`${Math.round(t/3600)} h`:`${Math.round(t/86400)} d`}renderComposer(e,t){let n=this.state.speak[e]||``;return R(M,{sx:{display:`flex`,alignItems:`center`,gap:.5},children:[O(V,{size:`small`,variant:`outlined`,placeholder:t,value:n,onChange:t=>this.setState(n=>({speak:{...n.speak,[e]:t.target.value}})),onKeyDown:t=>{t.key===`Enter`&&(t.preventDefault(),this.announce(e))},sx:{minWidth:180}}),O(z,{title:A.t(`custom_assistant_Send announcement`),children:O(`span`,{children:O(d,{size:`small`,color:`primary`,disabled:!n.trim(),onClick:()=>this.announce(e),children:O(h,{})})})})]})}renderItem(){var e;let t=Object.keys(this.state.sats).sort();return R(M,{sx:{width:`100%`,pr:8,boxSizing:`border-box`},children:[R(M,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,mb:1},children:[O(I,{variant:`h6`,children:A.t(`custom_assistant_Satellites`)}),t.length?this.renderComposer(Ab,A.t(`custom_assistant_Speak on all satellites`)):null]}),t.length?R(L,{size:`small`,sx:{"& td, & th":{px:1}},children:[O(_e,{children:R(B,{children:[O(P,{}),O(P,{children:A.t(`custom_assistant_Satellite`)}),O(P,{children:A.t(`custom_assistant_room`)}),O(P,{children:A.t(`custom_assistant_Host`)}),O(P,{children:A.t(`custom_assistant_Status`)}),O(P,{children:A.t(`custom_assistant_Last seen`)}),O(P,{children:A.t(`custom_assistant_Announcement`)}),O(P,{})]})}),O(ve,{children:t.map(e=>{let t=this.state.sats[e];return R(B,{children:[O(P,{sx:{width:24},children:O(z,{title:t.alive?A.t(`custom_assistant_online`):A.t(`custom_assistant_offline`),children:O(oe,{sx:{fontSize:`0.8rem`,color:t.alive?`success.main`:`error.main`}})})}),O(P,{children:e}),O(P,{children:t.room||`—`}),O(P,{children:t.host||`—`}),O(P,{children:O(a,{size:`small`,variant:`outlined`,color:kb[t.status]||`default`,label:A.t(`custom_assistant_sat_${t.status}`)})}),O(P,{children:O(z,{title:t.lastSeen?new Date(t.lastSeen).toLocaleString():``,children:O(`span`,{children:this.ago(t.lastSeen)})})}),O(P,{children:this.renderComposer(e,A.t(`custom_assistant_Type a message…`))}),O(P,{sx:{width:40},children:t.alive?O(z,{title:A.t(`custom_assistant_Device settings`),children:O(d,{size:`small`,onClick:()=>void this.openSettings(e),children:O(u,{})})}):O(z,{title:A.t(`custom_assistant_Remove satellite`),children:O(d,{size:`small`,onClick:()=>this.setState({confirmDelete:e,deleteError:``}),children:O(ue,{})})})})]},e)})})]}):O(I,{sx:{p:2,opacity:.7},variant:`body2`,children:A.t(`custom_assistant_No satellites registered yet.`)}),this.state.settingsFor?O(Tb,{instanceId:this.instanceId,satId:this.state.settingsFor,room:((e=this.state.sats[this.state.settingsFor])==null?void 0:e.room)||``,values:this.state.vals[this.state.settingsFor]||{},objects:this.state.settingsObjects,groupNames:this.state.settingsGroupNames,loading:this.state.settingsLoading,onWrite:(e,t)=>this.writeSetting(this.state.settingsFor,e,t),sendTo:(e,t)=>this.props.oContext.socket.sendTo(this.instanceId,e,t),onClose:()=>this.setState({settingsFor:null,settingsObjects:{},settingsGroupNames:{}})}):null,R(o,{open:!!this.state.confirmDelete,onClose:()=>this.setState({confirmDelete:null,deleteError:``}),children:[O(me,{children:A.t(`custom_assistant_Remove satellite`)}),R(F,{children:[O(I,{variant:`body2`,children:A.t(`custom_assistant_Remove satellite %s and all its states?`,this.state.confirmDelete||``)}),O(I,{variant:`body2`,sx:{mt:1,opacity:.7},children:A.t(`custom_assistant_A satellite that is still configured appears again when it connects.`)}),this.state.deleteError?O(I,{variant:`body2`,color:`error`,sx:{mt:1},children:this.state.deleteError}):null]}),R(re,{children:[O(H,{color:`error`,variant:`contained`,onClick:()=>void this.deleteSatellite(this.state.confirmDelete),children:A.t(`custom_assistant_Delete`)}),O(H,{onClick:()=>this.setState({confirmDelete:null,deleteError:``}),children:A.t(`custom_assistant_Cancel`)})]})]})]})}},Mb={de:`Hallo, ich bin dein ioBroker-Assistent. Im Wohnzimmer sind es 21,5 Grad.`,en:`Hello, I'm your ioBroker assistant. It is 21.5 degrees in the living room.`,ru:`Привет, я твой ассистент ioBroker. В гостиной 21,5 градуса.`,fr:`Bonjour, je suis ton assistant ioBroker. Il fait 21,5 degrés dans le salon.`,it:`Ciao, sono il tuo assistente ioBroker. In soggiorno ci sono 21,5 gradi.`,es:`Hola, soy tu asistente de ioBroker. En el salón hace 21,5 grados.`,nl:`Hallo, ik ben je ioBroker-assistent. In de woonkamer is het 21,5 graden.`,pl:`Cześć, jestem twoim asystentem ioBroker. W salonie jest 21,5 stopnia.`,pt:`Olá, sou o teu assistente ioBroker. Na sala estão 21,5 graus.`,uk:`Привіт, я твій асистент ioBroker. У вітальні 21,5 градуса.`,"zh-cn":`你好,我是你的 ioBroker 助手。客厅现在是 21.5 度。`,zh:`你好,我是你的 ioBroker 助手。客厅现在是 21.5 度。`,ja:`こんにちは、ioBroker アシスタントです。リビングは 21.5 度です。`,el:`Γεια σου, είμαι ο βοηθός σου ioBroker. Στο σαλόνι έχει 21,5 βαθμούς.`,tr:`Merhaba, ben ioBroker asistanınım. Oturma odasında sıcaklık 21,5 derece.`,cs:`Ahoj, jsem tvůj asistent ioBroker. V obývacím pokoji je 21,5 stupně.`,sv:`Hej, jag är din ioBroker-assistent. I vardagsrummet är det 21,5 grader.`};function Nb(e){let t=String(e||``).trim().toLowerCase();return Mb[t]||Mb[t.split(/[-_]/)[0]]||Mb.en}var Pb={},Fb=Object.assign({"./i18n/de.json":Ee,"./i18n/en.json":ln,"./i18n/es.json":Gr,"./i18n/fr.json":Da,"./i18n/it.json":fs,"./i18n/nl.json":Jc,"./i18n/pl.json":Au,"./i18n/pt.json":mf,"./i18n/ru.json":Xp,"./i18n/uk.json":Ph,"./i18n/zh-cn.json":v_});for(let[e,t]of Object.entries(Fb)){var Ib;let n=((Ib=e.split(`/`).pop())==null?void 0:Ib.replace(`.json`,``))||`en`;Pb[n]=t.default}A.extendTranslations(Pb);var Lb=16e3,Rb=15e3;function zb(e,t){let n=e.reduce((e,t)=>e+t.length,0),r=new Float32Array(n),i=0;for(let t of e)r.set(t,i),i+=t.length;let a=t/Lb,o=Math.floor(n/a),s=new DataView(new ArrayBuffer(44+o*2)),c=(e,t)=>[...t].forEach((t,n)=>s.setUint8(e+n,t.charCodeAt(0)));c(0,`RIFF`),s.setUint32(4,36+o*2,!0),c(8,`WAVE`),c(12,`fmt `),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,Lb,!0),s.setUint32(28,Lb*2,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),c(36,`data`),s.setUint32(40,o*2,!0);for(let e=0;e<o;e++){let t=e*a,n=Math.floor(t),i=r[n]+((r[n+1]??r[n])-r[n])*(t-n);s.setInt16(44+e*2,Math.max(-1,Math.min(1,i))*32767,!0)}return new Uint8Array(s.buffer)}function Bb(e){let t=``;for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return btoa(t)}var Vb={DeviceAclComponent:iy,ChatComponent:Wy,FlowComponent:rb,LocalLlmProgress:cb,LocalModelsComponent:gb,SatellitesComponent:jb,VoiceTestComponent:class extends G{constructor(e){super(e),W(this,`aliveId`,``),W(this,`audio`,null),W(this,`recorder`,null),W(this,`fileInput`,null),W(this,`onAlive`,(e,t)=>{this.setState({alive:!!(t!=null&&t.val)})}),W(this,`test`,async()=>{this.stop(),this.setState({busy:!0,result:null});let e=await this.synthesize(this.sentence);this.setState({busy:!1,result:e}),e.audio&&this.play(e)}),W(this,`roundTrip`,async()=>{let e=this.sentence;this.setState({sttBusy:`roundTrip`,sttResult:null});let t=await this.synthesize(e);if(!t.audio){this.setState({sttBusy:``,sttResult:{error:t.error||A.t(`custom_assistant_No answer`)}});return}let n=await this.transcribe(t.audio,`wav`);this.setState({sttBusy:``,sttResult:{...n,spoken:e}})}),W(this,`startRecording`,async()=>{this.setState({sttResult:null});try{let e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new AudioContext,n=t.createMediaStreamSource(e),r=t.createScriptProcessor(4096,1,1),i=[];r.onaudioprocess=e=>i.push(new Float32Array(e.inputBuffer.getChannelData(0))),n.connect(r),r.connect(t.destination);let a=setTimeout(()=>void this.stopRecording(),Rb);this.recorder={context:t,stream:e,node:r,chunks:i,timer:a},this.setState({recording:!0})}catch(e){this.setState({sttResult:{error:e.message}})}}),W(this,`stopRecording`,async()=>{let e=this.closeRecorder();if(this.setState({recording:!1}),!(e!=null&&e.chunks.length))return;this.setState({sttBusy:`record`});let t=await this.transcribe(Bb(zb(e.chunks,e.rate)),`wav`);this.setState({sttBusy:``,sttResult:t})}),W(this,`onFile`,async e=>{var t;let n=(t=e.target.files)==null?void 0:t[0];if(e.target.value=``,!n)return;this.setState({sttBusy:`file`,sttResult:null});let r=new Uint8Array(await n.arrayBuffer()),i=(n.name.split(`.`).pop()||``).toLowerCase(),a=await this.transcribe(Bb(r),i);this.setState({sttBusy:``,sttResult:a})}),this.state={...this.state,alive:!1,text:``,busy:!1,playing:!1,result:null,sttBusy:``,recording:!1,sttResult:null}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}get language(){let e=this.props.data;return String(e.voiceLanguage||A.getLanguage()||`en`)}get sentence(){return this.state.text.trim()||Nb(this.language)}async componentDidMount(){super.componentDidMount(),this.aliveId=`system.adapter.${this.instanceId}.alive`;let e=this.props.oContext.socket;try{let t=await e.getState(this.aliveId);this.setState({alive:!!(t!=null&&t.val)})}catch{}e.subscribeState(this.aliveId,this.onAlive)}componentWillUnmount(){var e;this.aliveId&&this.props.oContext.socket.unsubscribeState(this.aliveId,this.onAlive),this.stop(),this.closeRecorder(),(e=super.componentWillUnmount)==null||e.call(this)}stop(){this.audio&&=(this.audio.pause(),null),this.state.playing&&this.setState({playing:!1})}synthesize(e){return this.props.oContext.socket.sendTo(this.instanceId,`tts`,{text:e,language:this.language,config:this.props.data}).then(e=>e||{error:A.t(`custom_assistant_No answer`)}).catch(e=>({error:e.message}))}transcribe(e,t){return this.props.oContext.socket.sendTo(this.instanceId,`stt`,{audio:e,format:t,language:this.language,config:this.props.data}).then(e=>e||{error:A.t(`custom_assistant_No answer`)}).catch(e=>({error:e.message}))}play(e){let t=new Audio(`data:${e.mime||`audio/wav`};base64,${e.audio}`);t.onended=()=>this.stop(),t.onerror=()=>this.stop(),this.audio=t,this.setState({playing:!0}),t.play().catch(t=>{this.stop(),this.setState({result:{...e,error:t.message}})})}closeRecorder(){let e=this.recorder;if(!e)return null;this.recorder=null,clearTimeout(e.timer),e.node.disconnect(),e.stream.getTracks().forEach(e=>e.stop());let t=e.context.sampleRate;return e.context.close(),{chunks:e.chunks,rate:t}}renderTtsResult(){let e=this.state.result;if(!e)return null;if(e.error)return O(I,{variant:`body2`,color:`error`,sx:{wordBreak:`break-word`},children:e.error});let t=[e.sampleRate?`${e.sampleRate} Hz`:``,e.audioMs===void 0?``:A.t(`custom_assistant_%s s audio`,(e.audioMs/1e3).toFixed(1)),e.ms===void 0?``:A.t(`custom_assistant_made in %s ms`,e.ms)].filter(Boolean);return O(I,{variant:`body2`,sx:{opacity:.7},children:t.join(` · `)})}renderSttResult(){let e=this.state.sttResult;if(!e)return null;if(e.error)return O(I,{variant:`body2`,color:`error`,sx:{wordBreak:`break-word`},children:e.error});let t=[e.audioMs===void 0?``:A.t(`custom_assistant_%s s audio`,(e.audioMs/1e3).toFixed(1)),e.ms===void 0?``:A.t(`custom_assistant_recognized in %s ms`,e.ms)].filter(Boolean);return R(M,{children:[e.spoken?R(I,{variant:`body2`,children:[A.t(`custom_assistant_Spoken`),`: „`,e.spoken,`“`]}):null,R(I,{variant:`body2`,children:[A.t(`custom_assistant_Recognized`),`:`,` `,e.text?`„${e.text}“`:O(`i`,{children:A.t(`custom_assistant_Nothing recognized`)})]}),O(I,{variant:`body2`,sx:{opacity:.7},children:t.join(` · `)})]})}renderItem(){var e;let{alive:t,busy:n,playing:r,text:a,sttBusy:o,recording:c}=this.state,l=window.isSecureContext&&!!((e=navigator.mediaDevices)!=null&&e.getUserMedia),u=!t||!!o,d=(e,t)=>o===e?O(U,{size:16}):t;return R(M,{sx:{width:`100%`,mt:1,mb:1},children:[O(I,{variant:`subtitle2`,sx:{mb:.5},children:A.t(`custom_assistant_Speech output`)}),R(M,{sx:{display:`flex`,alignItems:`center`,gap:1},children:[O(V,{variant:`standard`,fullWidth:!0,value:a,placeholder:Nb(this.language),label:A.t(`custom_assistant_Test sentence`),onChange:e=>this.setState({text:e.target.value}),onKeyDown:e=>{e.key===`Enter`&&t&&!n&&this.test()}}),O(H,{variant:`contained`,sx:{whiteSpace:`nowrap`,flexShrink:0},disabled:!t||n,startIcon:n?O(U,{size:16}):O(r?T:v,{}),onClick:()=>r?this.stop():void this.test(),children:A.t(r?`custom_assistant_Stop`:`custom_assistant_Test voice`)})]}),O(M,{sx:{mt:.5},children:this.renderTtsResult()}),O(I,{variant:`subtitle2`,sx:{mt:2,mb:.5},children:A.t(`custom_assistant_Speech recognition`)}),R(M,{sx:{display:`flex`,flexWrap:`wrap`,gap:1},children:[l?O(H,{variant:c?`contained`:`outlined`,color:c?`error`:`primary`,disabled:!t||!!o&&!c,startIcon:d(`record`,O(c?T:s,{})),onClick:()=>void(c?this.stopRecording():this.startRecording()),children:A.t(c?`custom_assistant_Stop`:`custom_assistant_Record`)}):null,O(H,{variant:`outlined`,disabled:u||c,startIcon:d(`file`,O(f,{})),onClick:()=>{var e;return(e=this.fileInput)==null?void 0:e.click()},children:A.t(`custom_assistant_Audio file`)}),O(H,{variant:`outlined`,disabled:u||c,startIcon:d(`roundTrip`,O(i,{})),onClick:()=>void this.roundTrip(),children:A.t(`custom_assistant_Speak the test sentence and recognize it`)}),O(`input`,{ref:e=>{this.fileInput=e},type:`file`,accept:`audio/*`,style:{display:`none`},onChange:e=>void this.onFile(e)})]}),l?null:O(I,{variant:`body2`,sx:{opacity:.7,mt:.5},children:A.t(`custom_assistant_The microphone only works over https or on localhost.`)}),O(M,{sx:{mt:.5},children:this.renderSttResult()}),t?null:O(I,{variant:`body2`,sx:{opacity:.7,mt:1},children:A.t(`custom_assistant_The instance must be running to test the voice.`)})]})}},VoiceRowTestComponent:class extends G{constructor(e){super(e),W(this,`aliveId`,``),W(this,`audio`,null),W(this,`onAlive`,(e,t)=>{this.setState({alive:!!(t!=null&&t.val)})}),W(this,`test`,async()=>{if(this.state.playing){this.stop();return}let e=this.row,t={...this.props.globalData||{},ttsVoices:[e]};this.setState({busy:!0,result:null});let n=await this.props.oContext.socket.sendTo(this.instanceId,`tts`,{text:Nb(e.language),language:e.language,config:t}).then(e=>e||{error:A.t(`custom_assistant_No answer`)}).catch(e=>({error:e.message}));if(this.setState({busy:!1,result:n}),!n.audio)return;let r=new Audio(`data:${n.mime||`audio/wav`};base64,${n.audio}`);r.onended=()=>this.stop(),r.onerror=()=>this.stop(),this.audio=r,this.setState({playing:!0}),r.play().catch(e=>{this.stop(),this.setState({result:{...n,error:e.message}})})}),this.state={...this.state,alive:!1,busy:!1,playing:!1,result:null}}get instanceId(){let e=this.props.oContext;return`${e.adapterName}.${e.instance}`}get row(){let e=this.props.data||{};return{language:String(e.language||``).trim(),voice:String(e.voice||``).trim(),model:String(e.model||``).trim()}}async componentDidMount(){super.componentDidMount(),this.aliveId=`system.adapter.${this.instanceId}.alive`;let e=this.props.oContext.socket;try{let t=await e.getState(this.aliveId);this.setState({alive:!!(t!=null&&t.val)})}catch{}e.subscribeState(this.aliveId,this.onAlive)}componentWillUnmount(){var e;this.aliveId&&this.props.oContext.socket.unsubscribeState(this.aliveId,this.onAlive),this.stop(),(e=super.componentWillUnmount)==null||e.call(this)}stop(){this.audio&&=(this.audio.pause(),null),this.state.playing&&this.setState({playing:!1})}tooltip(){let{alive:e,result:t}=this.state;return e?t!=null&&t.error?t.error:t!=null&&t.audio?[t.sampleRate?`${t.sampleRate} Hz`:``,t.audioMs?`${(t.audioMs/1e3).toFixed(1)} s`:``,t.ms?`${A.t(`custom_assistant_synthesis`)} ${t.ms} ms`:``].filter(Boolean).join(` · `):A.t(`custom_assistant_Try this voice`):A.t(`custom_assistant_Start the instance to test the voice`)}renderItem(){let{alive:e,busy:t,playing:n,result:r}=this.state,i=!e||t||!this.row.language;return O(z,{title:this.tooltip(),children:O(`span`,{children:O(d,{size:`small`,disabled:i,color:r!=null&&r.error?`error`:`primary`,onClick:this.test,children:t?O(U,{size:20}):O(n?T:v,{})})})})}}};export{Vb as default};
|