Files
cartlog-admin/node_modules/jodit/es5/plugins/speech-recognize/speech-recognize.js
2026-01-01 15:25:19 +05:30

1218 lines
50 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*!
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
* Version: v4.7.9
* Url: https://xdsoft.net/jodit/
* License(s): MIT
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(self, function() {
return (self["webpackChunkjodit"] = self["webpackChunkjodit"] || []).push([[882],{
/***/ 8858:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'חדשות',
delete: 'מחק',
space: 'שטח',
'Speech Recognize': 'דיבור מזהה',
Sound: 'קול',
'Interim Results': 'תוצאות ביניים'
};
/***/ }),
/***/ 8962:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ execSpellCommand: function() { return /* binding */ execSpellCommand; }
/* harmony export */ });
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50684);
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ /**
* @module plugins/speech-recognize
*/
function execSpellCommand(jodit, commandSentence) {
var _commandSentence_split = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__._)(commandSentence.split('::'), 2), command = _commandSentence_split[0], value = _commandSentence_split[1];
jodit.execCommand(command, null, value);
}
/***/ }),
/***/ 10179:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'новая строка|перенос|ентер',
delete: 'видалити',
space: 'пробел',
'Speech Recognize': 'Распознавание речи',
Sound: 'Звук',
'Interim Results': 'Проміжні результати'
};
/***/ }),
/***/ 18712:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: '改行',
delete: '削除',
space: 'スペース',
'Speech Recognize': '音声認識',
Sound: '音',
'Interim Results': '中間結果'
};
/***/ }),
/***/ 19922:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'الخط الجديد',
delete: 'حذف',
space: 'الفضاء',
'Speech Recognize': 'التعرف على الكلام',
Sound: 'الصوت',
'Interim Results': 'النتائج المؤقتة'
};
/***/ }),
/***/ 20759:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'řádek',
delete: 'odstranit',
space: 'prostora',
'Speech Recognize': 'Rozpoznání Řeči',
Sound: 'Zvuk',
'Interim Results': 'Průběžné Výsledky'
};
/***/ }),
/***/ 22227:
/***/ (function(module) {
module.exports = "<svg viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z\"/> <path d=\"M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z\"/> </svg>"
/***/ }),
/***/ 22350:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'Zeilenumbruch',
delete: 'löschen',
space: 'Raum',
'Speech Recognize': 'Sprache Erkennen',
Sound: 'Sound',
'Interim Results': 'Zwischenergebnis'
};
/***/ }),
/***/ 22922:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'újsor',
delete: 'törlés',
space: 'tér',
'Speech Recognize': 'A Beszéd Felismeri',
Sound: 'Hang',
'Interim Results': 'Időközi Eredmények'
};
/***/ }),
/***/ 29475:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: '換行',
delete: '刪除',
space: '空白',
'Speech Recognize': '語音辨識',
Sound: '聲音',
'Interim Results': '階段性辨識結果'
};
/***/ }),
/***/ 31262:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ SpeechRecognizeNative: function() { return /* binding */ SpeechRecognizeNative; }
/* harmony export */ });
/* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69262);
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73104);
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34918);
/* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(38574);
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(68616);
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23211);
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(28077);
/* harmony import */ var jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(71125);
/* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(91206);
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(75143);
/* harmony import */ var _jodit__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(73302);
/* harmony import */ var _helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(8962);
/* harmony import */ var _langs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(43219);
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ /**
* [[include:plugins/speech-recognize/README.md]]
* @packageDocumentation
* @module plugins/speech-recognize
*/
var SpeechRecognizeNative = /*#__PURE__*/ function(Plugin) {
"use strict";
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__._)(SpeechRecognizeNative, Plugin);
function SpeechRecognizeNative() {
(0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, SpeechRecognizeNative);
var _this;
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, SpeechRecognizeNative, arguments), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "buttons", [
{
group: 'state',
name: 'speechRecognize'
}
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "messagePopup", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__hidePopupTimeout", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "_commandToWord", {});
return _this;
}
(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(SpeechRecognizeNative, [
{
key: "afterInit",
value: function afterInit(jodit) {
var _this = this;
var commands = jodit.o.speechRecognize.commands;
if (commands) {
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_9__.extendLang)(_langs__WEBPACK_IMPORTED_MODULE_15__);
(0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_10__.keys)(commands, false).forEach(function(words) {
var _$keys = words.split('|');
_$keys.forEach(function(key) {
key = key.trim().toLowerCase();
_this._commandToWord[key] = commands[words];
var translatedKeys = jodit.i18n(key);
if (translatedKeys !== key) {
translatedKeys.split('|').forEach(function(translatedKey) {
_this._commandToWord[translatedKey.trim().toLowerCase()] = commands[words].trim();
});
}
});
});
}
}
},
{
key: "beforeDestruct",
value: function beforeDestruct(jodit) {
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.safeRemove(this.messagePopup);
}
},
{
key: "onSpeechRecognizeProgressResult",
value: function onSpeechRecognizeProgressResult(text) {
var _this = this;
if (!this.messagePopup) {
this.messagePopup = this.j.create.div('jodit-speech-recognize__popup');
}
this.j.workplace.appendChild(this.messagePopup);
this.j.async.clearTimeout(this.__hidePopupTimeout);
this.__hidePopupTimeout = this.j.async.setTimeout(function() {
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.safeRemove(_this.messagePopup);
}, 1000);
this.messagePopup.innerText = text + '|';
}
},
{
key: "onSpeechRecognizeResult",
value: function onSpeechRecognizeResult(text) {
this.j.async.clearTimeout(this.__hidePopupTimeout);
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.safeRemove(this.messagePopup);
var j = this.j;
var s = j.s;
if (!this._checkCommand(text)) {
var range = s.range, node = s.current();
if (s.isCollapsed() && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isText(node) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_8__.Dom.isOrContains(j.editor, node) && node.nodeValue) {
var sentence = node.nodeValue;
node.nodeValue = sentence + (/[\u00A0 ]\uFEFF*$/.test(sentence) ? '' : ' ') + text;
range.setStartAfter(node);
s.selectRange(range);
j.synchronizeValues();
} else {
s.insertHTML(text);
}
}
}
},
{
key: "_checkCommand",
value: function _checkCommand(command) {
command = command.toLowerCase().replace(/\./g, '');
if (this._commandToWord[command]) {
(0,_helpers_exec_spell_command__WEBPACK_IMPORTED_MODULE_14__.execSpellCommand)(this.j, this._commandToWord[command]);
return true;
}
return false;
}
}
]);
return SpeechRecognizeNative;
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_5__._)(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_11__.Plugin));
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_7__.watch)(':speechRecognizeProgressResult')
], SpeechRecognizeNative.prototype, "onSpeechRecognizeProgressResult", null);
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_7__.watch)(':speechRecognizeResult')
], SpeechRecognizeNative.prototype, "onSpeechRecognizeResult", null);
_jodit__WEBPACK_IMPORTED_MODULE_13__.Jodit.plugins.add('speech-recognize', SpeechRecognizeNative);
/***/ }),
/***/ 32560:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ sound: function() { return /* binding */ sound; }
/* harmony export */ });
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
/* harmony import */ var jodit_plugins_speech_recognize_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94092);
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ /**
* @module plugins/speech-recognize
*/
/**
* @internal
*/ function sound() {
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref_sec = _ref.sec, sec = _ref_sec === void 0 ? 0.1 : _ref_sec, _ref_frequency = _ref.frequency, frequency = _ref_frequency === void 0 ? jodit_plugins_speech_recognize_constants__WEBPACK_IMPORTED_MODULE_1__.PII : _ref_frequency, _ref_gain = _ref.gain, gain = _ref_gain === void 0 ? 0.1 : _ref_gain, _ref_type = _ref.type, type = _ref_type === void 0 ? 'sine' : _ref_type;
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow || typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.AudioContext === 'undefined' && typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.webkitAudioContext === 'undefined') {
return;
}
// one context per document
var context = new (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.AudioContext || jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.webkitAudioContext)();
var vol = context.createGain();
var osc = context.createOscillator();
osc.type = type;
osc.frequency.value = frequency; // Hz
osc.connect(vol);
vol.connect(context.destination);
osc.start(); // start the oscillator
osc.stop(context.currentTime + sec);
vol.gain.value = gain;
}
/***/ }),
/***/ 33276:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
'Speech Recognize': 'Puheentunnistus',
newline: 'uusi rivi',
delete: 'poistaa',
space: 'tilaa',
Sound: 'Ääni',
'Interim Results': 'Välitulokset'
};
/***/ }),
/***/ 35420:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'nuova riga',
delete: 'eliminare',
space: 'spazio',
'Speech Recognize': 'Discorso Riconoscere',
Sound: 'Suono',
'Interim Results': 'Risultati intermedi'
};
/***/ }),
/***/ 37161:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'newline',
delete: 'usunąć',
space: 'przestrzeń',
'Speech Recognize': 'Rozpoznawanie Mowy',
Sound: 'Dźwięk',
'Interim Results': 'Wyniki Okresowe'
};
/***/ }),
/***/ 39996:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'новая строка|перенос|энтер',
delete: 'удалить',
space: 'пробел',
'Speech Recognize': 'Распознавание речи',
Sound: 'Звук',
'Interim Results': 'Промежуточные результаты'
};
/***/ }),
/***/ 43219:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ ar: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
/* harmony export */ cs_cz: function() { return /* reexport module object */ _cs_cz_js__WEBPACK_IMPORTED_MODULE_1__; },
/* harmony export */ de: function() { return /* reexport module object */ _de_js__WEBPACK_IMPORTED_MODULE_2__; },
/* harmony export */ es: function() { return /* reexport module object */ _es_js__WEBPACK_IMPORTED_MODULE_3__; },
/* harmony export */ fa: function() { return /* reexport module object */ _fa_js__WEBPACK_IMPORTED_MODULE_4__; },
/* harmony export */ fi: function() { return /* reexport module object */ _fi_js__WEBPACK_IMPORTED_MODULE_5__; },
/* harmony export */ fr: function() { return /* reexport module object */ _fr_js__WEBPACK_IMPORTED_MODULE_6__; },
/* harmony export */ he: function() { return /* reexport module object */ _he_js__WEBPACK_IMPORTED_MODULE_7__; },
/* harmony export */ hu: function() { return /* reexport module object */ _hu_js__WEBPACK_IMPORTED_MODULE_8__; },
/* harmony export */ id: function() { return /* reexport module object */ _id_js__WEBPACK_IMPORTED_MODULE_9__; },
/* harmony export */ it: function() { return /* reexport module object */ _it_js__WEBPACK_IMPORTED_MODULE_10__; },
/* harmony export */ ja: function() { return /* reexport module object */ _ja_js__WEBPACK_IMPORTED_MODULE_11__; },
/* harmony export */ ko: function() { return /* reexport module object */ _ko_js__WEBPACK_IMPORTED_MODULE_12__; },
/* harmony export */ mn: function() { return /* reexport module object */ _mn_js__WEBPACK_IMPORTED_MODULE_13__; },
/* harmony export */ nl: function() { return /* reexport module object */ _nl_js__WEBPACK_IMPORTED_MODULE_14__; },
/* harmony export */ no: function() { return /* reexport module object */ _no_js__WEBPACK_IMPORTED_MODULE_15__; },
/* harmony export */ pl: function() { return /* reexport module object */ _pl_js__WEBPACK_IMPORTED_MODULE_16__; },
/* harmony export */ pt_br: function() { return /* reexport module object */ _pt_br_js__WEBPACK_IMPORTED_MODULE_17__; },
/* harmony export */ ru: function() { return /* reexport module object */ _ru_js__WEBPACK_IMPORTED_MODULE_18__; },
/* harmony export */ tr: function() { return /* reexport module object */ _tr_js__WEBPACK_IMPORTED_MODULE_19__; },
/* harmony export */ ua: function() { return /* reexport module object */ _ua_js__WEBPACK_IMPORTED_MODULE_20__; },
/* harmony export */ zh_cn: function() { return /* reexport module object */ _zh_cn_js__WEBPACK_IMPORTED_MODULE_21__; },
/* harmony export */ zh_tw: function() { return /* reexport module object */ _zh_tw_js__WEBPACK_IMPORTED_MODULE_22__; }
/* harmony export */ });
/* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19922);
/* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ar_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _cs_cz_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20759);
/* harmony import */ var _cs_cz_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_cs_cz_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _de_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22350);
/* harmony import */ var _de_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_de_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _es_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97509);
/* harmony import */ var _es_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_es_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _fa_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49668);
/* harmony import */ var _fa_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_fa_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _fi_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(33276);
/* harmony import */ var _fi_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_fi_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _fr_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43517);
/* harmony import */ var _fr_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_fr_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _he_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8858);
/* harmony import */ var _he_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_he_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _hu_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(22922);
/* harmony import */ var _hu_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_hu_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _id_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(81900);
/* harmony import */ var _id_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_id_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _it_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(35420);
/* harmony import */ var _it_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_it_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _ja_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(18712);
/* harmony import */ var _ja_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_ja_js__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _ko_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(73363);
/* harmony import */ var _ko_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_ko_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var _mn_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(74762);
/* harmony import */ var _mn_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_mn_js__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _nl_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(73759);
/* harmony import */ var _nl_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_nl_js__WEBPACK_IMPORTED_MODULE_14__);
/* harmony import */ var _no_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(72850);
/* harmony import */ var _no_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_no_js__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var _pl_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(37161);
/* harmony import */ var _pl_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_pl_js__WEBPACK_IMPORTED_MODULE_16__);
/* harmony import */ var _pt_br_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(62896);
/* harmony import */ var _pt_br_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_pt_br_js__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var _ru_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(39996);
/* harmony import */ var _ru_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_ru_js__WEBPACK_IMPORTED_MODULE_18__);
/* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(93423);
/* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_tr_js__WEBPACK_IMPORTED_MODULE_19__);
/* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(10179);
/* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_ua_js__WEBPACK_IMPORTED_MODULE_20__);
/* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(62547);
/* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_zh_cn_js__WEBPACK_IMPORTED_MODULE_21__);
/* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(29475);
/* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_zh_tw_js__WEBPACK_IMPORTED_MODULE_22__);
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ // @ts-nocheck
/***/ }),
/***/ 43517:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'nouvelle ligne',
delete: 'supprimer',
space: 'espace',
'Speech Recognize': 'Reconnaissance Vocale',
Sound: 'Son',
'Interim Results': 'Résultats Intermédiaires'
};
/***/ }),
/***/ 49668:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'خط جدید',
delete: 'حذف',
space: 'فضا',
'Speech Recognize': 'گفتار را تشخیص دهید',
Sound: 'صدا',
'Interim Results': 'نتایج موقت'
};
/***/ }),
/***/ 62547:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: '新行',
delete: '删除',
space: '空间',
'Speech Recognize': '言语识别',
Sound: '声音',
'Interim Results': '中期业绩'
};
/***/ }),
/***/ 62896:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'linha',
delete: 'excluir',
space: 'espaco',
'Speech Recognize': 'Discurso Reconhecer',
Sound: 'Som',
'Interim Results': 'Resultados Provisórios'
};
/***/ }),
/***/ 68097:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ RecognizeManager: function() { return /* binding */ RecognizeManager; }
/* harmony export */ });
/* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69262);
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73104);
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
/* harmony import */ var _swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22248);
/* harmony import */ var _swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66773);
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34918);
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(84839);
/* harmony import */ var jodit_core_event_emitter_eventify__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(60216);
/* harmony import */ var _sound__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(32560);
/* harmony import */ var jodit_plugins_speech_recognize_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(94092);
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ /**
* @module plugins/speech-recognize
*/
var RecognizeManager = /*#__PURE__*/ function(Eventify) {
"use strict";
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__._)(RecognizeManager, Eventify);
function RecognizeManager(async, api) {
(0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, RecognizeManager);
var _this;
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, RecognizeManager), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "async", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "_lang", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "_continuous", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "_interimResults", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "sound", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "_isEnabled", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "_restartTimeout", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "_onSpeechStart", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "_api", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__interimResults", void 0), _this.async = async, _this._continuous = false, _this._interimResults = false, _this.sound = true, _this._isEnabled = false, _this._restartTimeout = 0, _this._onSpeechStart = function(e) {
if (!_this._isEnabled) {
return;
}
_this.async.clearTimeout(_this._restartTimeout);
_this._restartTimeout = _this.async.setTimeout(function() {
_this.restart();
_this.emit('pulse', false);
_this._makeSound(jodit_plugins_speech_recognize_constants__WEBPACK_IMPORTED_MODULE_11__.WARN);
}, 5000);
_this.emit('pulse', true);
}, _this.__interimResults = '';
_this._api = api;
RecognizeManager._instances.add(_this);
return _this;
}
(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(RecognizeManager, [
{
key: "lang",
get: function get() {
return this._lang;
},
set: function set(v) {
this._lang = v;
this._api.lang = v;
}
},
{
key: "continuous",
get: function get() {
return this._continuous;
},
set: function set(v) {
this._continuous = v;
this._api.continuous = v;
}
},
{
key: "interimResults",
get: function get() {
return this._interimResults;
},
set: function set(v) {
this._interimResults = v;
this._api.interimResults = v;
}
},
{
key: "destruct",
value: function destruct() {
this.stop();
RecognizeManager._instances.delete(this);
(0,_swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__._)((0,_swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__._)(RecognizeManager.prototype), "destruct", this).call(this);
}
},
{
key: "isEnabled",
get: function get() {
return this._isEnabled;
}
},
{
key: "start",
value: function start() {
var _this = this;
if (this._isEnabled) {
return;
}
this._isEnabled = true;
RecognizeManager._instances.forEach(function(instance) {
if (instance !== _this) {
instance.stop();
}
});
try {
this._api.start();
} catch (e) {
this._onError(e);
this.stop();
return;
}
this.__on('speechstart', this._onSpeechStart).__on('error', this._onError).__on('result', this._onProgress).__on('end', this._onResults);
}
},
{
key: "stop",
value: function stop() {
if (!this._isEnabled) {
return;
}
this._api.abort();
this._api.stop();
this.__off('speechstart', this._onSpeechStart).__off('error', this._onError).__off('result', this._onProgress).__off('end', this._onResults);
this.async.clearTimeout(this._restartTimeout);
this._isEnabled = false;
this.emit('pulse', false);
}
},
{
key: "toggle",
value: function toggle() {
if (!this._isEnabled) {
this.start();
} else {
this.stop();
}
}
},
{
key: "restart",
value: function restart() {
this.stop();
this.start();
}
},
{
key: "__on",
value: function __on(event, callback) {
this._api.addEventListener(event, callback);
return this;
}
},
{
key: "__off",
value: function __off(event, callback) {
this._api.removeEventListener(event, callback);
return this;
}
},
{
key: "_onResults",
value: function _onResults(e) {
this.emit('pulse', false);
this.emit('result', this.__interimResults);
this.__interimResults = '';
this._makeSound(jodit_plugins_speech_recognize_constants__WEBPACK_IMPORTED_MODULE_11__.PII);
this.restart();
}
},
{
key: "_onProgress",
value: function _onProgress(e) {
if (!this._isEnabled) {
return;
}
this.__interimResults = '';
if (!e.results) {
return;
}
for(var i = 0; i < e.results.length; i++){
var resultItem = e.results.item(i);
if (resultItem.length) {
var transcript = resultItem.item(0).transcript;
this.__interimResults += transcript;
}
}
if (this.__interimResults) {
this.emit('progress', this.__interimResults);
}
}
},
{
key: "_onError",
value: function _onError(e) {
if (e.error === 'voice-unavailable') {
this.emit('error', 'Voice unavailable');
}
if (e.error === 'not-allowed') {
this.emit('error', 'Not allowed');
}
if (e.error === 'language-unavailable' || // @ts-ignore
e.error === 'language-not-supported') {
this.emit('error', 'Language unavailable');
}
this._makeSound(jodit_plugins_speech_recognize_constants__WEBPACK_IMPORTED_MODULE_11__.WARN);
this.emit('pulse', false);
this.stop();
}
},
{
key: "_makeSound",
value: function _makeSound(frequency) {
if (this.sound) {
(0,_sound__WEBPACK_IMPORTED_MODULE_10__.sound)({
frequency: frequency
});
}
}
}
]);
return RecognizeManager;
}(jodit_core_event_emitter_eventify__WEBPACK_IMPORTED_MODULE_9__.Eventify);
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(RecognizeManager, "_instances", new Set());
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
], RecognizeManager.prototype, "_onResults", null);
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
], RecognizeManager.prototype, "_onProgress", null);
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_8__.autobind
], RecognizeManager.prototype, "_onError", null);
/***/ }),
/***/ 72850:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'nylinje',
delete: 'slette',
space: 'rom',
'Speech Recognize': 'Talegjenkjenning',
Sound: 'Lyd',
'Interim Results': 'Midlertidige resultater'
};
/***/ }),
/***/ 73363:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: '줄 바꿈',
delete: '삭제',
space: '공간',
'Speech Recognize': '음성 인식',
Sound: '소리',
'Interim Results': '중간 결과'
};
/***/ }),
/***/ 73759:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'regel',
delete: 'verwijderen',
space: 'ruimte',
'Speech Recognize': 'Spraak Herkennen',
Sound: 'Geluid',
'Interim Results': 'Tussentijdse Resultaten'
};
/***/ }),
/***/ 74762:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'Шинэ мөр',
delete: 'Устгах',
space: 'Зай',
'Speech Recognize': 'Дуу хоолой таних',
Sound: 'Дуу',
'Interim Results': 'Түр зуурын үр дүн'
};
/***/ }),
/***/ 75143:
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var jodit_core_helpers_checker_is_boolean__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22289);
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85932);
/* harmony import */ var jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7909);
/* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36400);
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29434);
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5266);
/* harmony import */ var _helpers_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97743);
/* harmony import */ var _helpers_recognize_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(68097);
/* harmony import */ var _speech_recognize_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(22227);
/* harmony import */ var _speech_recognize_svg__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_speech_recognize_svg__WEBPACK_IMPORTED_MODULE_8__);
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ /**
* @module plugins/speech-recognize
*/
jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.speechRecognize = {
api: typeof _helpers_api__WEBPACK_IMPORTED_MODULE_6__.SpeechRecognition !== 'undefined' ? _helpers_api__WEBPACK_IMPORTED_MODULE_6__.SpeechRecognition : null,
sound: true,
continuous: false,
interimResults: true,
commands: {
'newline|enter': 'enter',
'delete|remove word|delete word': 'backspaceWordButton',
comma: 'inserthtml::,',
underline: 'inserthtml::_',
hyphen: 'inserthtml::-',
space: 'inserthtml:: ',
question: 'inserthtml::?',
dot: 'inserthtml::.',
'quote|quotes|open quote': "inserthtml::'",
'header|header h1': 'formatblock::h1',
'select all': 'selectall'
}
};
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__.Icon.set('speech-recognize', (_speech_recognize_svg__WEBPACK_IMPORTED_MODULE_8___default()));
jodit_config__WEBPACK_IMPORTED_MODULE_5__.Config.prototype.controls.speechRecognize = {
isVisible: function isVisible(j) {
return Boolean(j.o.speechRecognize.api);
},
isActive: function isActive(jodit, _) {
var api = (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_3__.dataBind)(jodit, 'speech');
return Boolean(api === null || api === void 0 ? void 0 : api.isEnabled);
},
isDisabled: function isDisabled(jodit) {
return !jodit.o.speechRecognize.api;
},
exec: function exec(jodit, current, param) {
var button = param.button, control = param.control;
var _jodit_o_speechRecognize = jodit.o.speechRecognize, ApiConstructor = _jodit_o_speechRecognize.api, lang = _jodit_o_speechRecognize.lang, continuous = _jodit_o_speechRecognize.continuous, interimResults = _jodit_o_speechRecognize.interimResults, sound = _jodit_o_speechRecognize.sound;
if (!ApiConstructor) {
jodit.alert('Speech recognize API unsupported in your browser');
return;
}
var api = (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_3__.dataBind)(jodit, 'speech');
if (!api) {
var nativeApi = new ApiConstructor();
api = new _helpers_recognize_manager__WEBPACK_IMPORTED_MODULE_7__.RecognizeManager(jodit.async, nativeApi);
var _attr;
api.lang = (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__.isString)(lang) ? lang : (_attr = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(jodit.od.documentElement, 'lang')) !== null && _attr !== void 0 ? _attr : undefined;
api.continuous = continuous;
api.interimResults = interimResults;
api.sound = sound;
(0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_3__.dataBind)(jodit, 'speech', api);
api.on('pulse', function(enable) {
button.setMod('pulse', enable);
});
api.on('result', function(text) {
return jodit.e.fire('speechRecognizeResult', text);
});
api.on('progress', function(text) {
return jodit.e.fire('speechRecognizeProgressResult', text);
});
api.on('error', function(text) {
return jodit.message.error(text);
});
button.hookStatus('beforeDestruct', function() {
(0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_3__.dataBind)(jodit, 'speech', null);
api.destruct();
});
}
if (control.args) {
var key = control.args[0];
if ((0,jodit_core_helpers_checker_is_boolean__WEBPACK_IMPORTED_MODULE_0__.isBoolean)(api[key])) {
api[key] = !api[key];
if (api.isEnabled) {
api.restart();
}
return;
}
}
api.toggle();
if (api.isEnabled) {
button.setMod('pulse', true);
}
button.state.activated = api.isEnabled;
},
name: 'speechRecognize',
command: 'toggleSpeechRecognize',
tooltip: 'Speech Recognize',
list: {
sound: 'Sound',
interimResults: 'Interim Results'
},
childTemplate: function childTemplate(jodit, key, value) {
var _api_key;
var api = (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_3__.dataBind)(jodit, 'speech'), checked = (_api_key = api === null || api === void 0 ? void 0 : api[key]) !== null && _api_key !== void 0 ? _api_key : jodit.o.speechRecognize[key];
return "<span class='jodit-speech-recognize__list-item'><input ".concat(checked ? 'checked' : '', " class='jodit-checkbox' type='checkbox'>&nbsp;").concat(value, "</span>");
},
mods: {
stroke: false
}
};
/***/ }),
/***/ 81900:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'newline',
delete: 'Hapus',
space: 'ruang',
'Speech Recognize': 'Pidato Mengenali',
Sound: 'Suara',
'Interim Results': 'Hasil Sementara'
};
/***/ }),
/***/ 93423:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'yeni satır',
delete: 'silmek',
space: 'uzay',
'Speech Recognize': 'Konuşma Tanıma',
Sound: 'Ses',
'Interim Results': 'Ara Sonuçlar'
};
/***/ }),
/***/ 94092:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ PII: function() { return /* binding */ PII; },
/* harmony export */ WARN: function() { return /* binding */ WARN; }
/* harmony export */ });
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ /**
* @module plugins/speech-recognize
* @internal
*/ var PII = 440;
var WARN = 940;
/***/ }),
/***/ 97509:
/***/ (function(module) {
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ module.exports = {
newline: 'nueva línea',
delete: 'eliminar',
space: 'espacio',
'Speech Recognize': 'Reconocimiento de Voz',
Sound: 'Sonido',
'Interim Results': 'Resultados Provisionales'
};
/***/ }),
/***/ 97743:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ SpeechRecognition: function() { return /* binding */ SpeechRecognition; }
/* harmony export */ });
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81937);
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/ /**
* @module plugins/speech-recognize
*/
var SpeechRecognition = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow ? jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.SpeechRecognition || jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.webkitSpeechRecognition : undefined;
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ var __webpack_exports__ = (__webpack_exec__(31262));
/******/ return __webpack_exports__;
/******/ }
]);
});