bariweb-widget 0.1.11 → 0.1.15

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.
Files changed (38) hide show
  1. package/dist/bariweb.iife.js +176 -116
  2. package/dist/bariweb.js +619 -447
  3. package/package.json +1 -1
  4. package/dist/types/components/accordion/accordion-item.d.ts +0 -8
  5. package/dist/types/components/accordion/accordion.d.ts +0 -1
  6. package/dist/types/components/accordion/accordion.styles.d.ts +0 -1
  7. package/dist/types/components/button/button.d.ts +0 -8
  8. package/dist/types/components/button/button.styles.d.ts +0 -1
  9. package/dist/types/components/card/card.d.ts +0 -6
  10. package/dist/types/components/card/card.styles.d.ts +0 -1
  11. package/dist/types/controllers/a11y.controller.d.ts +0 -50
  12. package/dist/types/controllers/ai-a11y.controller.d.ts +0 -17
  13. package/dist/types/controllers/chat.controller.d.ts +0 -100
  14. package/dist/types/controllers/scanner.controller.d.ts +0 -1
  15. package/dist/types/controllers/tts.controller.d.ts +0 -11
  16. package/dist/types/index.d.ts +0 -1
  17. package/dist/types/lib/AdminUI.d.ts +0 -8
  18. package/dist/types/lib/Fingerprint.d.ts +0 -44
  19. package/dist/types/lib/Watcher.d.ts +0 -62
  20. package/dist/types/lib/api/client/client.gen.d.ts +0 -2
  21. package/dist/types/lib/api/client/index.d.ts +0 -8
  22. package/dist/types/lib/api/client/types.gen.d.ts +0 -117
  23. package/dist/types/lib/api/client/utils.gen.d.ts +0 -33
  24. package/dist/types/lib/api/client.gen.d.ts +0 -12
  25. package/dist/types/lib/api/core/auth.gen.d.ts +0 -18
  26. package/dist/types/lib/api/core/bodySerializer.gen.d.ts +0 -25
  27. package/dist/types/lib/api/core/params.gen.d.ts +0 -43
  28. package/dist/types/lib/api/core/pathSerializer.gen.d.ts +0 -33
  29. package/dist/types/lib/api/core/queryKeySerializer.gen.d.ts +0 -18
  30. package/dist/types/lib/api/core/serverSentEvents.gen.d.ts +0 -71
  31. package/dist/types/lib/api/core/types.gen.d.ts +0 -78
  32. package/dist/types/lib/api/core/utils.gen.d.ts +0 -19
  33. package/dist/types/lib/api/index.d.ts +0 -2
  34. package/dist/types/lib/api/sdk.gen.d.ts +0 -118
  35. package/dist/types/lib/api/types.gen.d.ts +0 -694
  36. package/dist/types/lib/icons.d.ts +0 -28
  37. package/dist/types/widget.d.ts +0 -67
  38. package/dist/types/widget.styles.d.ts +0 -1
package/dist/bariweb.js CHANGED
@@ -744,34 +744,34 @@ var w = class extends HTMLElement {
744
744
  w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, w[x("elementProperties")] = /* @__PURE__ */ new Map(), w[x("finalized")] = /* @__PURE__ */ new Map(), Ee?.({ ReactiveElement: w }), (b.reactiveElementVersions ??= []).push("2.1.2");
745
745
  //#endregion
746
746
  //#region node_modules/lit-html/lit-html.js
747
- var T = globalThis, Oe = (e) => e, E = T.trustedTypes, ke = E ? E.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Ae = "$lit$", D = `lit$${Math.random().toFixed(9).slice(2)}$`, je = "?" + D, Me = `<${je}>`, O = document, k = () => O.createComment(""), A = (e) => e === null || typeof e != "object" && typeof e != "function", j = Array.isArray, Ne = (e) => j(e) || typeof e?.[Symbol.iterator] == "function", M = "[ \n\f\r]", N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pe = /-->/g, Fe = />/g, P = RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), Ie = /'/g, Le = /"/g, Re = /^(?:script|style|textarea|title)$/i, F = ((e) => (t, ...n) => ({
747
+ var T = globalThis, Oe = (e) => e, E = T.trustedTypes, ke = E ? E.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Ae = "$lit$", D = `lit$${Math.random().toFixed(9).slice(2)}$`, je = "?" + D, Me = `<${je}>`, O = document, k = () => O.createComment(""), A = (e) => e === null || typeof e != "object" && typeof e != "function", j = Array.isArray, Ne = (e) => j(e) || typeof e?.[Symbol.iterator] == "function", M = "[ \n\f\r]", N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pe = /-->/g, Fe = />/g, P = RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), Ie = /'/g, Le = /"/g, F = /^(?:script|style|textarea|title)$/i, I = ((e) => (t, ...n) => ({
748
748
  _$litType$: e,
749
749
  strings: t,
750
750
  values: n
751
- }))(1), I = Symbol.for("lit-noChange"), L = Symbol.for("lit-nothing"), ze = /* @__PURE__ */ new WeakMap(), R = O.createTreeWalker(O, 129);
752
- function Be(e, t) {
751
+ }))(1), L = Symbol.for("lit-noChange"), R = Symbol.for("lit-nothing"), Re = /* @__PURE__ */ new WeakMap(), z = O.createTreeWalker(O, 129);
752
+ function ze(e, t) {
753
753
  if (!j(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
754
754
  return ke === void 0 ? t : ke.createHTML(t);
755
755
  }
756
- var Ve = (e, t) => {
756
+ var Be = (e, t) => {
757
757
  let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = N;
758
758
  for (let t = 0; t < n; t++) {
759
759
  let n = e[t], s, c, l = -1, u = 0;
760
- for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === N ? c[1] === "!--" ? o = Pe : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = P) : (Re.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = P) : o = Fe : o === P ? c[0] === ">" ? (o = i ?? N, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? P : c[3] === "\"" ? Le : Ie) : o === Le || o === Ie ? o = P : o === Pe || o === Fe ? o = N : (o = P, i = void 0);
760
+ for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === N ? c[1] === "!--" ? o = Pe : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = P) : (F.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = P) : o = Fe : o === P ? c[0] === ">" ? (o = i ?? N, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? P : c[3] === "\"" ? Le : Ie) : o === Le || o === Ie ? o = P : o === Pe || o === Fe ? o = N : (o = P, i = void 0);
761
761
  let d = o === P && e[t + 1].startsWith("/>") ? " " : "";
762
762
  a += o === N ? n + Me : l >= 0 ? (r.push(s), n.slice(0, l) + Ae + n.slice(l) + D + d) : n + D + (l === -2 ? t : d);
763
763
  }
764
- return [Be(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
765
- }, z = class e {
764
+ return [ze(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
765
+ }, B = class e {
766
766
  constructor({ strings: t, _$litType$: n }, r) {
767
767
  let i;
768
768
  this.parts = [];
769
- let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = Ve(t, n);
770
- if (this.el = e.createElement(l, r), R.currentNode = this.el.content, n === 2 || n === 3) {
769
+ let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = Be(t, n);
770
+ if (this.el = e.createElement(l, r), z.currentNode = this.el.content, n === 2 || n === 3) {
771
771
  let e = this.el.content.firstChild;
772
772
  e.replaceWith(...e.childNodes);
773
773
  }
774
- for (; (i = R.nextNode()) !== null && c.length < s;) {
774
+ for (; (i = z.nextNode()) !== null && c.length < s;) {
775
775
  if (i.nodeType === 1) {
776
776
  if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(Ae)) {
777
777
  let t = u[o++], n = i.getAttribute(e).split(D), r = /([.?@])?(.*)/.exec(t);
@@ -780,17 +780,17 @@ var Ve = (e, t) => {
780
780
  index: a,
781
781
  name: r[2],
782
782
  strings: n,
783
- ctor: r[1] === "." ? Ue : r[1] === "?" ? We : r[1] === "@" ? Ge : H
783
+ ctor: r[1] === "." ? He : r[1] === "?" ? Ue : r[1] === "@" ? We : U
784
784
  }), i.removeAttribute(e);
785
785
  } else e.startsWith(D) && (c.push({
786
786
  type: 6,
787
787
  index: a
788
788
  }), i.removeAttribute(e));
789
- if (Re.test(i.tagName)) {
789
+ if (F.test(i.tagName)) {
790
790
  let e = i.textContent.split(D), t = e.length - 1;
791
791
  if (t > 0) {
792
792
  i.textContent = E ? E.emptyScript : "";
793
- for (let n = 0; n < t; n++) i.append(e[n], k()), R.nextNode(), c.push({
793
+ for (let n = 0; n < t; n++) i.append(e[n], k()), z.nextNode(), c.push({
794
794
  type: 2,
795
795
  index: ++a
796
796
  });
@@ -816,12 +816,12 @@ var Ve = (e, t) => {
816
816
  return n.innerHTML = e, n;
817
817
  }
818
818
  };
819
- function B(e, t, n = e, r) {
820
- if (t === I) return t;
819
+ function V(e, t, n = e, r) {
820
+ if (t === L) return t;
821
821
  let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = A(t) ? void 0 : t._$litDirective$;
822
- return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = B(e, i._$AS(e, t.values), i, r)), t;
822
+ return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = V(e, i._$AS(e, t.values), i, r)), t;
823
823
  }
824
- var He = class {
824
+ var Ve = class {
825
825
  constructor(e, t) {
826
826
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
827
827
  }
@@ -833,27 +833,27 @@ var He = class {
833
833
  }
834
834
  u(e) {
835
835
  let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? O).importNode(t, !0);
836
- R.currentNode = r;
837
- let i = R.nextNode(), a = 0, o = 0, s = n[0];
836
+ z.currentNode = r;
837
+ let i = z.nextNode(), a = 0, o = 0, s = n[0];
838
838
  for (; s !== void 0;) {
839
839
  if (a === s.index) {
840
840
  let t;
841
- s.type === 2 ? t = new V(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new Ke(i, this, e)), this._$AV.push(t), s = n[++o];
841
+ s.type === 2 ? t = new H(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new Ge(i, this, e)), this._$AV.push(t), s = n[++o];
842
842
  }
843
- a !== s?.index && (i = R.nextNode(), a++);
843
+ a !== s?.index && (i = z.nextNode(), a++);
844
844
  }
845
- return R.currentNode = O, r;
845
+ return z.currentNode = O, r;
846
846
  }
847
847
  p(e) {
848
848
  let t = 0;
849
849
  for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
850
850
  }
851
- }, V = class e {
851
+ }, H = class e {
852
852
  get _$AU() {
853
853
  return this._$AM?._$AU ?? this._$Cv;
854
854
  }
855
855
  constructor(e, t, n, r) {
856
- this.type = 2, this._$AH = L, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
856
+ this.type = 2, this._$AH = R, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
857
857
  }
858
858
  get parentNode() {
859
859
  let e = this._$AA.parentNode, t = this._$AM;
@@ -866,7 +866,7 @@ var He = class {
866
866
  return this._$AB;
867
867
  }
868
868
  _$AI(e, t = this) {
869
- e = B(this, e, t), A(e) ? e === L || e == null || e === "" ? (this._$AH !== L && this._$AR(), this._$AH = L) : e !== this._$AH && e !== I && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? Ne(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
869
+ e = V(this, e, t), A(e) ? e === R || e == null || e === "" ? (this._$AH !== R && this._$AR(), this._$AH = R) : e !== this._$AH && e !== L && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? Ne(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
870
870
  }
871
871
  O(e) {
872
872
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -875,19 +875,19 @@ var He = class {
875
875
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
876
876
  }
877
877
  _(e) {
878
- this._$AH !== L && A(this._$AH) ? this._$AA.nextSibling.data = e : this.T(O.createTextNode(e)), this._$AH = e;
878
+ this._$AH !== R && A(this._$AH) ? this._$AA.nextSibling.data = e : this.T(O.createTextNode(e)), this._$AH = e;
879
879
  }
880
880
  $(e) {
881
- let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = z.createElement(Be(n.h, n.h[0]), this.options)), n);
881
+ let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = B.createElement(ze(n.h, n.h[0]), this.options)), n);
882
882
  if (this._$AH?._$AD === r) this._$AH.p(t);
883
883
  else {
884
- let e = new He(r, this), n = e.u(this.options);
884
+ let e = new Ve(r, this), n = e.u(this.options);
885
885
  e.p(t), this.T(n), this._$AH = e;
886
886
  }
887
887
  }
888
888
  _$AC(e) {
889
- let t = ze.get(e.strings);
890
- return t === void 0 && ze.set(e.strings, t = new z(e)), t;
889
+ let t = Re.get(e.strings);
890
+ return t === void 0 && Re.set(e.strings, t = new B(e)), t;
891
891
  }
892
892
  k(t) {
893
893
  j(this._$AH) || (this._$AH = [], this._$AR());
@@ -904,7 +904,7 @@ var He = class {
904
904
  setConnected(e) {
905
905
  this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
906
906
  }
907
- }, H = class {
907
+ }, U = class {
908
908
  get tagName() {
909
909
  return this.element.tagName;
910
910
  }
@@ -912,47 +912,47 @@ var He = class {
912
912
  return this._$AM._$AU;
913
913
  }
914
914
  constructor(e, t, n, r, i) {
915
- this.type = 1, this._$AH = L, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = L;
915
+ this.type = 1, this._$AH = R, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = R;
916
916
  }
917
917
  _$AI(e, t = this, n, r) {
918
918
  let i = this.strings, a = !1;
919
- if (i === void 0) e = B(this, e, t, 0), a = !A(e) || e !== this._$AH && e !== I, a && (this._$AH = e);
919
+ if (i === void 0) e = V(this, e, t, 0), a = !A(e) || e !== this._$AH && e !== L, a && (this._$AH = e);
920
920
  else {
921
921
  let r = e, o, s;
922
- for (e = i[0], o = 0; o < i.length - 1; o++) s = B(this, r[n + o], t, o), s === I && (s = this._$AH[o]), a ||= !A(s) || s !== this._$AH[o], s === L ? e = L : e !== L && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
922
+ for (e = i[0], o = 0; o < i.length - 1; o++) s = V(this, r[n + o], t, o), s === L && (s = this._$AH[o]), a ||= !A(s) || s !== this._$AH[o], s === R ? e = R : e !== R && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
923
923
  }
924
924
  a && !r && this.j(e);
925
925
  }
926
926
  j(e) {
927
- e === L ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
927
+ e === R ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
928
928
  }
929
- }, Ue = class extends H {
929
+ }, He = class extends U {
930
930
  constructor() {
931
931
  super(...arguments), this.type = 3;
932
932
  }
933
933
  j(e) {
934
- this.element[this.name] = e === L ? void 0 : e;
934
+ this.element[this.name] = e === R ? void 0 : e;
935
935
  }
936
- }, We = class extends H {
936
+ }, Ue = class extends U {
937
937
  constructor() {
938
938
  super(...arguments), this.type = 4;
939
939
  }
940
940
  j(e) {
941
- this.element.toggleAttribute(this.name, !!e && e !== L);
941
+ this.element.toggleAttribute(this.name, !!e && e !== R);
942
942
  }
943
- }, Ge = class extends H {
943
+ }, We = class extends U {
944
944
  constructor(e, t, n, r, i) {
945
945
  super(e, t, n, r, i), this.type = 5;
946
946
  }
947
947
  _$AI(e, t = this) {
948
- if ((e = B(this, e, t, 0) ?? L) === I) return;
949
- let n = this._$AH, r = e === L && n !== L || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== L && (n === L || r);
948
+ if ((e = V(this, e, t, 0) ?? R) === L) return;
949
+ let n = this._$AH, r = e === R && n !== R || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== R && (n === R || r);
950
950
  r && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
951
951
  }
952
952
  handleEvent(e) {
953
953
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
954
954
  }
955
- }, Ke = class {
955
+ }, Ge = class {
956
956
  constructor(e, t, n) {
957
957
  this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
958
958
  }
@@ -960,18 +960,18 @@ var He = class {
960
960
  return this._$AM._$AU;
961
961
  }
962
962
  _$AI(e) {
963
- B(this, e);
963
+ V(this, e);
964
964
  }
965
- }, qe = T.litHtmlPolyfillSupport;
966
- qe?.(z, V), (T.litHtmlVersions ??= []).push("3.3.2");
967
- var Je = (e, t, n) => {
965
+ }, Ke = T.litHtmlPolyfillSupport;
966
+ Ke?.(B, H), (T.litHtmlVersions ??= []).push("3.3.2");
967
+ var qe = (e, t, n) => {
968
968
  let r = n?.renderBefore ?? t, i = r._$litPart$;
969
969
  if (i === void 0) {
970
970
  let e = n?.renderBefore ?? null;
971
- r._$litPart$ = i = new V(t.insertBefore(k(), e), e, void 0, n ?? {});
971
+ r._$litPart$ = i = new H(t.insertBefore(k(), e), e, void 0, n ?? {});
972
972
  }
973
973
  return i._$AI(e), i;
974
- }, U = globalThis, W = class extends w {
974
+ }, W = globalThis, G = class extends w {
975
975
  constructor() {
976
976
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
977
977
  }
@@ -981,7 +981,7 @@ var Je = (e, t, n) => {
981
981
  }
982
982
  update(e) {
983
983
  let t = this.render();
984
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Je(t, this.renderRoot, this.renderOptions);
984
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = qe(t, this.renderRoot, this.renderOptions);
985
985
  }
986
986
  connectedCallback() {
987
987
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -990,25 +990,25 @@ var Je = (e, t, n) => {
990
990
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
991
991
  }
992
992
  render() {
993
- return I;
993
+ return L;
994
994
  }
995
995
  };
996
- W._$litElement$ = !0, W.finalized = !0, U.litElementHydrateSupport?.({ LitElement: W });
997
- var Ye = U.litElementPolyfillSupport;
998
- Ye?.({ LitElement: W }), (U.litElementVersions ??= []).push("4.2.2");
996
+ G._$litElement$ = !0, G.finalized = !0, W.litElementHydrateSupport?.({ LitElement: G });
997
+ var Je = W.litElementPolyfillSupport;
998
+ Je?.({ LitElement: G }), (W.litElementVersions ??= []).push("4.2.2");
999
999
  //#endregion
1000
1000
  //#region node_modules/@lit/reactive-element/decorators/custom-element.js
1001
- var Xe = (e) => (t, n) => {
1001
+ var Ye = (e) => (t, n) => {
1002
1002
  n === void 0 ? customElements.define(e, t) : n.addInitializer(() => {
1003
1003
  customElements.define(e, t);
1004
1004
  });
1005
- }, Ze = {
1005
+ }, Xe = {
1006
1006
  attribute: !0,
1007
1007
  type: String,
1008
1008
  converter: S,
1009
1009
  reflect: !1,
1010
1010
  hasChanged: C
1011
- }, Qe = (e = Ze, t, n) => {
1011
+ }, Ze = (e = Xe, t, n) => {
1012
1012
  let { kind: r, metadata: i } = n, a = globalThis.litPropertyMetadata.get(i);
1013
1013
  if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), a.set(n.name, e), r === "accessor") {
1014
1014
  let { name: r } = n;
@@ -1031,16 +1031,16 @@ var Xe = (e) => (t, n) => {
1031
1031
  }
1032
1032
  throw Error("Unsupported decorator location: " + r);
1033
1033
  };
1034
- function $e(e) {
1035
- return (t, n) => typeof n == "object" ? Qe(e, t, n) : ((e, t, n) => {
1034
+ function Qe(e) {
1035
+ return (t, n) => typeof n == "object" ? Ze(e, t, n) : ((e, t, n) => {
1036
1036
  let r = t.hasOwnProperty(n);
1037
1037
  return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
1038
1038
  })(e, t, n);
1039
1039
  }
1040
1040
  //#endregion
1041
1041
  //#region node_modules/@lit/reactive-element/decorators/state.js
1042
- function G(e) {
1043
- return $e({
1042
+ function K(e) {
1043
+ return Qe({
1044
1044
  ...e,
1045
1045
  state: !0,
1046
1046
  attribute: !1
@@ -1048,10 +1048,10 @@ function G(e) {
1048
1048
  }
1049
1049
  //#endregion
1050
1050
  //#region node_modules/@lit/reactive-element/decorators/base.js
1051
- var et = (e, t, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, n), n);
1051
+ var $e = (e, t, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, n), n);
1052
1052
  //#endregion
1053
1053
  //#region node_modules/@lit/reactive-element/decorators/query.js
1054
- function tt(e, t) {
1054
+ function et(e, t) {
1055
1055
  return (n, r, i) => {
1056
1056
  let a = (t) => t.renderRoot?.querySelector(e) ?? null;
1057
1057
  if (t) {
@@ -1066,29 +1066,29 @@ function tt(e, t) {
1066
1066
  }
1067
1067
  };
1068
1068
  })();
1069
- return et(n, r, { get() {
1069
+ return $e(n, r, { get() {
1070
1070
  let n = e.call(this);
1071
1071
  return n === void 0 && (n = a(this), (n !== null || this.hasUpdated) && t.call(this, n)), n;
1072
1072
  } });
1073
1073
  }
1074
- return et(n, r, { get() {
1074
+ return $e(n, r, { get() {
1075
1075
  return a(this);
1076
1076
  } });
1077
1077
  };
1078
1078
  }
1079
1079
  //#endregion
1080
1080
  //#region node_modules/lit-html/directive.js
1081
- var nt = {
1081
+ var tt = {
1082
1082
  ATTRIBUTE: 1,
1083
1083
  CHILD: 2,
1084
1084
  PROPERTY: 3,
1085
1085
  BOOLEAN_ATTRIBUTE: 4,
1086
1086
  EVENT: 5,
1087
1087
  ELEMENT: 6
1088
- }, rt = (e) => (...t) => ({
1088
+ }, nt = (e) => (...t) => ({
1089
1089
  _$litDirective$: e,
1090
1090
  values: t
1091
- }), it = class {
1091
+ }), rt = class {
1092
1092
  constructor(e) {}
1093
1093
  get _$AU() {
1094
1094
  return this._$AM._$AU;
@@ -1102,13 +1102,13 @@ var nt = {
1102
1102
  update(e, t) {
1103
1103
  return this.render(...t);
1104
1104
  }
1105
- }, K = class extends it {
1105
+ }, q = class extends rt {
1106
1106
  constructor(e) {
1107
- if (super(e), this.it = L, e.type !== nt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
1107
+ if (super(e), this.it = R, e.type !== tt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
1108
1108
  }
1109
1109
  render(e) {
1110
- if (e === L || e == null) return this._t = void 0, this.it = e;
1111
- if (e === I) return e;
1110
+ if (e === R || e == null) return this._t = void 0, this.it = e;
1111
+ if (e === L) return e;
1112
1112
  if (typeof e != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
1113
1113
  if (e === this.it) return this._t;
1114
1114
  this.it = e;
@@ -1120,8 +1120,8 @@ var nt = {
1120
1120
  };
1121
1121
  }
1122
1122
  };
1123
- K.directiveName = "unsafeHTML", K.resultType = 1;
1124
- var at = rt(K), q = (e) => F`${at(`
1123
+ q.directiveName = "unsafeHTML", q.resultType = 1;
1124
+ var it = nt(q), J = (e) => I`${it(`
1125
1125
  <svg
1126
1126
  viewBox="0 0 24 24"
1127
1127
  fill="none"
@@ -1132,29 +1132,39 @@ var at = rt(K), q = (e) => F`${at(`
1132
1132
  >
1133
1133
  ${e}
1134
1134
  </svg>
1135
- `)}`, J = {
1136
- accessibility: q("<circle cx=\"12\" cy=\"12\" r=\"10\" stroke-width=\"1.5\" stroke-dasharray=\"3 3\" stroke-linecap=\"butt\"/><circle cx=\"12\" cy=\"5\" r=\"1.5\"/><path d=\"M12 7v5\"/><path d=\"M6 8h12\"/><path d=\"M12 12l-3 5\"/><path d=\"M12 12l3 5\"/>"),
1137
- mic: q("<path d=\"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z\"/><path d=\"M19 10v2a7 7 0 0 1-14 0v-2\"/><line x1=\"12\" y1=\"19\" x2=\"12\" y2=\"23\"/><line x1=\"8\" y1=\"23\" x2=\"16\" y2=\"23\"/>"),
1138
- close: q("<path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/>"),
1139
- languages: q("<path d=\"m5 8 6 6\"/><path d=\"m4 14 6-6 2-3\"/><path d=\"M2 5h12\"/><path d=\"M7 2h1\"/><path d=\"m22 22-5-10-5 10\"/><path d=\"M14 18h6\"/>"),
1140
- profiles: q("<path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/>"),
1141
- textSize: q("<polyline points=\"4 7 4 4 20 4 20 7\"/><line x1=\"9\" y1=\"20\" x2=\"15\" y2=\"20\"/><line x1=\"12\" y1=\"4\" x2=\"12\" y2=\"20\"/>"),
1142
- contrast: q("<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 18a6 6 0 0 0 0-12v12z\"/>"),
1143
- grayscale: q("<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 2v20\"/><path d=\"M12 18a6 6 0 0 0 0-12\"/><path d=\"M12 14a2 2 0 0 0 0-4\"/>"),
1144
- cursor: q("<path d=\"M4 4l11.73 4.58a0.5 0 0 1 0 0.94l-4.47 1.35 1.35 4.47a0.5 0 0 1-0.94 0L6.7 9.61 4 4z\"/>"),
1145
- screenReader: q("<polygon points=\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\"/><path d=\"M15.54 8.46a5 5 0 0 1 0 7.07\"/><path d=\"M19.07 4.93a10 10 0 0 1 0 14.14\"/>"),
1146
- visualImpair: q("<path d=\"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/>"),
1147
- seizureSafe: q("<path d=\"M13 2L3 14h9l-1 8 10-12h-9l1-8z\"/>"),
1148
- cognitive: q("<path d=\"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 4.44-2.54z\"/><path d=\"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-4.44-2.54z\"/>"),
1149
- info: q("<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4\"/><path d=\"M12 8h.01\"/>"),
1150
- check: q("<path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"/><polyline points=\"22 4 12 14.01 9 11.01\"/>"),
1151
- chevronDown: q("<path d=\"m6 9 6 6 6-6\"/>"),
1152
- sun: q("<circle cx=\"12\" cy=\"12\" r=\"4\"/><path d=\"M12 2v2\"/><path d=\"M12 20v2\"/><path d=\"m4.93 4.93 1.41 1.41\"/><path d=\"m17.66 17.66 1.41 1.41\"/><path d=\"M2 12h2\"/><path d=\"M20 12h2\"/><path d=\"m6.34 17.66-1.41 1.41\"/><path d=\"m19.07 4.93-1.41 1.41\"/>"),
1153
- moon: q("<path d=\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z\"/>"),
1154
- droplet: q("<path d=\"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5s-3 3.5-3 5.5a7 7 0 0 0 7 7z\"/>"),
1155
- refresh: q("<path d=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\"/><path d=\"M21 3v5h-5\"/><path d=\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\"/><path d=\"M3 21v-5h5\"/>"),
1156
- send: q("<line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"13\"/><polygon points=\"22 2 15 22 11 13 2 9 22 2\"/>")
1157
- }, ot = he`
1135
+ `)}`, Y = {
1136
+ accessibility: J("<circle cx=\"12\" cy=\"4.5\" r=\"2\"/><path d=\"M4 9.5h16\"/><path d=\"M12 6.5v6\"/><path d=\"M9.5 20.5 12 12.5l2.5 8\"/>"),
1137
+ chat: J("<path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\"/>"),
1138
+ settings: J("<path d=\"M10.325 4.317a1.724 1.724 0 0 1 3.35 0 1.724 1.724 0 0 0 2.573 1.066 1.724 1.724 0 0 1 2.305 2.305 1.724 1.724 0 0 0 1.066 2.573 1.724 1.724 0 0 1 0 3.35 1.724 1.724 0 0 0-1.066 2.573 1.724 1.724 0 0 1-2.305 2.305 1.724 1.724 0 0 0-2.573 1.066 1.724 1.724 0 0 1-3.35 0 1.724 1.724 0 0 0-2.573-1.066 1.724 1.724 0 0 1-2.305-2.305 1.724 1.724 0 0 0-1.066-2.573 1.724 1.724 0 0 1 0-3.35 1.724 1.724 0 0 0 1.066-2.573 1.724 1.724 0 0 1 2.305-2.305 1.724 1.724 0 0 0 2.573-1.066z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/>"),
1139
+ mic: J("<path d=\"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z\"/><path d=\"M19 10v2a7 7 0 0 1-14 0v-2\"/><line x1=\"12\" y1=\"19\" x2=\"12\" y2=\"23\"/><line x1=\"8\" y1=\"23\" x2=\"16\" y2=\"23\"/>"),
1140
+ volumeOn: J("<polygon points=\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\"/><path d=\"M15.54 8.46a5 5 0 0 1 0 7.07\"/><path d=\"M19.07 4.93a10 10 0 0 1 0 14.14\"/>"),
1141
+ volumeOff: J("<polygon points=\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\"/><line x1=\"23\" y1=\"9\" x2=\"17\" y2=\"15\"/><line x1=\"17\" y1=\"9\" x2=\"23\" y2=\"15\"/>"),
1142
+ shield: J("<path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"/>"),
1143
+ close: J("<path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/>"),
1144
+ languages: J("<path d=\"m5 8 6 6\"/><path d=\"m4 14 6-6 2-3\"/><path d=\"M2 5h12\"/><path d=\"M7 2h1\"/><path d=\"m22 22-5-10-5 10\"/><path d=\"M14 18h6\"/>"),
1145
+ profiles: J("<path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"/><circle cx=\"12\" cy=\"7\" r=\"4\"/>"),
1146
+ textSize: J("<polyline points=\"4 7 4 4 20 4 20 7\"/><line x1=\"9\" y1=\"20\" x2=\"15\" y2=\"20\"/><line x1=\"12\" y1=\"4\" x2=\"12\" y2=\"20\"/>"),
1147
+ contrast: J("<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 18a6 6 0 0 0 0-12v12z\"/>"),
1148
+ grayscale: J("<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 2v20\"/><path d=\"M12 18a6 6 0 0 0 0-12\"/><path d=\"M12 14a2 2 0 0 0 0-4\"/>"),
1149
+ cursor: J("<path d=\"M4 3l7 17 2.2-6.2L20 11 4 3z\"/>"),
1150
+ screenReader: J("<polygon points=\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\"/><path d=\"M15.54 8.46a5 5 0 0 1 0 7.07\"/><path d=\"M19.07 4.93a10 10 0 0 1 0 14.14\"/>"),
1151
+ visualImpair: J("<path d=\"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/>"),
1152
+ seizureSafe: J("<path d=\"M13 2L3 14h9l-1 8 10-12h-9l1-8z\"/>"),
1153
+ cognitive: J("<path d=\"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 4.44-2.54z\"/><path d=\"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-4.44-2.54z\"/>"),
1154
+ info: J("<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4\"/><path d=\"M12 8h.01\"/>"),
1155
+ check: J("<path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"/><polyline points=\"22 4 12 14.01 9 11.01\"/>"),
1156
+ chevronDown: J("<path d=\"m6 9 6 6 6-6\"/>"),
1157
+ sun: J("<circle cx=\"12\" cy=\"12\" r=\"4\"/><path d=\"M12 2v2\"/><path d=\"M12 20v2\"/><path d=\"m4.93 4.93 1.41 1.41\"/><path d=\"m17.66 17.66 1.41 1.41\"/><path d=\"M2 12h2\"/><path d=\"M20 12h2\"/><path d=\"m6.34 17.66-1.41 1.41\"/><path d=\"m19.07 4.93-1.41 1.41\"/>"),
1158
+ moon: J("<path d=\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9z\"/>"),
1159
+ droplet: J("<path d=\"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5s-3 3.5-3 5.5a7 7 0 0 0 7 7z\"/>"),
1160
+ refresh: J("<path d=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\"/><path d=\"M21 3v5h-5\"/><path d=\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\"/><path d=\"M3 21v-5h5\"/>"),
1161
+ send: J("<line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"13\"/><polygon points=\"22 2 15 22 11 13 2 9 22 2\"/>"),
1162
+ code: J("<polyline points=\"16 18 22 12 16 6\"/><polyline points=\"8 6 2 12 8 18\"/>"),
1163
+ palette: J("<circle cx=\"13.5\" cy=\"6.5\" r=\".5\"/><circle cx=\"17.5\" cy=\"10.5\" r=\".5\"/><circle cx=\"8.5\" cy=\"7.5\" r=\".5\"/><circle cx=\"6.5\" cy=\"12.5\" r=\".5\"/><path d=\"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.92 0 1.76-.74 1.76-1.67 0-.42-.15-.81-.42-1.15-.28-.33-.45-.78-.45-1.26 0-.93.74-1.67 1.67-1.67h1.91c2.97 0 5.53-2.56 5.53-5.53C22 6.5 17.5 2 12 2z\"/>"),
1164
+ link: J("<path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/>"),
1165
+ type: J("<polyline points=\"4 7 4 4 20 4 20 7\"/><line x1=\"9\" y1=\"20\" x2=\"15\" y2=\"20\"/><line x1=\"12\" y1=\"4\" x2=\"12\" y2=\"20\"/>"),
1166
+ mouse: J("<path d=\"M15 6v6a3 3 0 0 1-6 0V6a3 3 0 0 1 6 0z\"/><rect x=\"6\" y=\"2\" width=\"12\" height=\"20\" rx=\"6\"/>")
1167
+ }, at = he`
1158
1168
  :host {
1159
1169
  display: block;
1160
1170
  pointer-events: none;
@@ -1325,6 +1335,7 @@ var at = rt(K), q = (e) => F`${at(`
1325
1335
  color: var(--bw-primary-fg);
1326
1336
  box-shadow: none;
1327
1337
  }
1338
+ .bw-tab svg { width: 14px; height: 14px; flex-shrink: 0; }
1328
1339
  .bw-tab[active] svg { color: var(--bw-primary-fg); }
1329
1340
 
1330
1341
  /* ─── Content area ─── */
@@ -1762,6 +1773,51 @@ var at = rt(K), q = (e) => F`${at(`
1762
1773
  gap: 8px;
1763
1774
  }
1764
1775
 
1776
+ .lang-row-icon {
1777
+ width: 16px;
1778
+ height: 16px;
1779
+ display: inline-flex;
1780
+ align-items: center;
1781
+ justify-content: center;
1782
+ flex-shrink: 0;
1783
+ }
1784
+ .lang-row-icon svg {
1785
+ width: 16px;
1786
+ height: 16px;
1787
+ display: block;
1788
+ }
1789
+
1790
+ .settings-actions {
1791
+ margin: 0 14px 14px;
1792
+ }
1793
+
1794
+ .reset-settings-btn {
1795
+ width: 100%;
1796
+ min-height: 44px;
1797
+ padding: 10px 14px;
1798
+ border-radius: var(--bw-radius-sm);
1799
+ border: 1.5px solid var(--bw-border);
1800
+ background: var(--bw-bg);
1801
+ color: var(--bw-fg);
1802
+ font-size: 13px;
1803
+ font-weight: 600;
1804
+ cursor: pointer;
1805
+ display: inline-flex;
1806
+ align-items: center;
1807
+ justify-content: center;
1808
+ gap: 8px;
1809
+ transition: all 0.18s;
1810
+ }
1811
+ .reset-settings-btn:hover {
1812
+ border-color: #ef4444;
1813
+ color: #ef4444;
1814
+ background: #fef2f2;
1815
+ }
1816
+ .reset-settings-btn svg {
1817
+ width: 16px;
1818
+ height: 16px;
1819
+ }
1820
+
1765
1821
  .trigger svg {
1766
1822
  width: 28px;
1767
1823
  height: 28px;
@@ -1809,7 +1865,8 @@ var at = rt(K), q = (e) => F`${at(`
1809
1865
  }
1810
1866
  @keyframes adminFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
1811
1867
 
1812
- .admin-overlay .admin-icon { font-size: 32px; margin-bottom: 12px; }
1868
+ .admin-overlay .admin-icon { margin-bottom: 12px; color: var(--bw-primary); }
1869
+ .admin-overlay .admin-icon svg { width: 32px; height: 32px; }
1813
1870
  .admin-overlay h4 { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--bw-fg); }
1814
1871
  .admin-overlay p { font-size: 13px; color: var(--bw-fg-muted); margin: 0 0 20px; }
1815
1872
  .admin-overlay input {
@@ -1840,7 +1897,7 @@ var at = rt(K), q = (e) => F`${at(`
1840
1897
  }
1841
1898
  .auth-error { color: #ef4444; font-size: 12px; margin: 0 0 12px; }
1842
1899
  .admin-status { color: #059669; font-size: 14px; font-weight: 600; margin: 0 0 16px; }
1843
- `, st = "bw-a11y-settings-v2", Y = {
1900
+ `, ot = "bw-a11y-settings-v2", X = {
1844
1901
  monochrome: !1,
1845
1902
  darkHighContrast: !1,
1846
1903
  brightHighContrast: !1,
@@ -1860,19 +1917,19 @@ var at = rt(K), q = (e) => F`${at(`
1860
1917
  cursorMagnifier: !1,
1861
1918
  animationsDisabled: !1,
1862
1919
  linkHighlight: !1
1863
- }, ct = class {
1920
+ }, st = class {
1864
1921
  constructor(e) {
1865
- this.settings = { ...Y }, (this.host = e).addController(this), this._loadSettings();
1922
+ this.settings = { ...X }, (this.host = e).addController(this), this._loadSettings();
1866
1923
  }
1867
1924
  hostConnected() {
1868
1925
  this._applySettings();
1869
1926
  }
1870
1927
  _loadSettings() {
1871
- let e = localStorage.getItem(st);
1928
+ let e = localStorage.getItem(ot);
1872
1929
  if (e) try {
1873
1930
  let t = JSON.parse(e);
1874
1931
  this.settings = {
1875
- ...Y,
1932
+ ...X,
1876
1933
  ...t
1877
1934
  };
1878
1935
  } catch (e) {
@@ -1880,7 +1937,7 @@ var at = rt(K), q = (e) => F`${at(`
1880
1937
  }
1881
1938
  }
1882
1939
  _saveSettings() {
1883
- localStorage.setItem(st, JSON.stringify(this.settings)), this._applySettings(), this.host.requestUpdate();
1940
+ localStorage.setItem(ot, JSON.stringify(this.settings)), this._applySettings(), this.host.requestUpdate();
1884
1941
  }
1885
1942
  _ensureGlobalStyles() {
1886
1943
  let e = "bw-global-a11y-styles", t = document.getElementById(e);
@@ -1963,9 +2020,9 @@ var at = rt(K), q = (e) => F`${at(`
1963
2020
  this.settings.linkHighlight = !this.settings.linkHighlight, this._saveSettings();
1964
2021
  }
1965
2022
  reset() {
1966
- this.settings = { ...Y }, this._saveSettings();
2023
+ this.settings = { ...X }, this._saveSettings();
1967
2024
  }
1968
- }, lt = "http://localhost:8000", ut = class {
2025
+ }, ct = "http://localhost:8000", lt = class {
1969
2026
  constructor(e) {
1970
2027
  this.isFixing = !1, this.simplifyEnabled = !1, this.autoA11yEnabled = !1, this._onParagraphKeydown = (e) => {
1971
2028
  if (this.simplifyEnabled && (e.key === "Enter" || e.key === " ") && e.target instanceof HTMLElement) {
@@ -2058,7 +2115,7 @@ var at = rt(K), q = (e) => F`${at(`
2058
2115
  console.log(`BariWeb AI: Found ${e.length} broken elements. Processing...`);
2059
2116
  let t = window.BariwebConfig?.clientId || "";
2060
2117
  for (let n = 0; n < e.length; n += 10) {
2061
- let r = e.slice(n, n + 10), i = await fetch(`${lt}/v1/widget/a11y/fix`, {
2118
+ let r = e.slice(n, n + 10), i = await fetch(`${ct}/v1/widget/a11y/fix`, {
2062
2119
  method: "POST",
2063
2120
  headers: {
2064
2121
  "Content-Type": "application/json",
@@ -2109,7 +2166,7 @@ var at = rt(K), q = (e) => F`${at(`
2109
2166
  i.remove(), e.style.outline = a, e.style.backgroundColor = o;
2110
2167
  });
2111
2168
  try {
2112
- let e = window.BariwebConfig?.clientId || "", t = await fetch(`${lt}/v1/widget/a11y/simplify`, {
2169
+ let e = window.BariwebConfig?.clientId || "", t = await fetch(`${ct}/v1/widget/a11y/simplify`, {
2113
2170
  method: "POST",
2114
2171
  headers: {
2115
2172
  "Content-Type": "application/json",
@@ -2126,9 +2183,11 @@ var at = rt(K), q = (e) => F`${at(`
2126
2183
  console.error("BariWeb AI: Simplify failed", e), i.classList.remove("bw-ai-tooltip-loading"), i.querySelector(".bw-ai-tooltip-content").innerHTML = "<span style=\"color:#ef4444; font-size:13px;\">Ошибка создания упрощенного текста. Попробуйте еще раз.</span>", i.focus();
2127
2184
  }
2128
2185
  }
2129
- }, dt = "bw-tts-enabled-v1", ft = class {
2186
+ }, ut = "bw-tts-enabled-v1", dt = class {
2130
2187
  constructor() {
2131
- this.enabled = !0, this.enabled = this.loadEnabled();
2188
+ this.enabled = !1, this.enabled = this.loadEnabled(), "speechSynthesis" in window && (window.speechSynthesis.getVoices(), window.speechSynthesis.onvoiceschanged = () => {
2189
+ window.speechSynthesis.getVoices();
2190
+ });
2132
2191
  }
2133
2192
  isEnabled() {
2134
2193
  return this.enabled;
@@ -2136,7 +2195,7 @@ var at = rt(K), q = (e) => F`${at(`
2136
2195
  setEnabled(e) {
2137
2196
  this.enabled = e;
2138
2197
  try {
2139
- localStorage.setItem(dt, e ? "1" : "0");
2198
+ localStorage.setItem(ut, e ? "1" : "0");
2140
2199
  } catch {}
2141
2200
  e || this.stop();
2142
2201
  }
@@ -2147,26 +2206,25 @@ var at = rt(K), q = (e) => F`${at(`
2147
2206
  if (!this.enabled || !("speechSynthesis" in window)) return;
2148
2207
  let t = (e || "").trim();
2149
2208
  if (t) try {
2150
- window.speechSynthesis.cancel();
2209
+ window.speechSynthesis.resume(), window.speechSynthesis.cancel();
2151
2210
  let e = new SpeechSynthesisUtterance(t), n = this.detectLanguage(t);
2152
2211
  e.lang = n;
2153
2212
  let r = this.pickVoice(n);
2154
- r && (e.voice = r), e.rate = 1, e.pitch = 1, window.speechSynthesis.speak(e);
2213
+ r && (e.voice = r), e.rate = 1, e.pitch = 1, e.volume = 1, window.speechSynthesis.speak(e);
2155
2214
  } catch (e) {
2156
2215
  console.warn("TTS speak failed", e);
2157
2216
  }
2158
2217
  }
2159
2218
  loadEnabled() {
2160
2219
  try {
2161
- let e = localStorage.getItem(dt);
2162
- return e === null ? !0 : e !== "0";
2220
+ let e = localStorage.getItem(ut);
2221
+ return e === null ? !1 : e !== "0";
2163
2222
  } catch {
2164
- return !0;
2223
+ return !1;
2165
2224
  }
2166
2225
  }
2167
2226
  detectLanguage(e) {
2168
- let t = e.toLowerCase();
2169
- return /[әіңғүұқөһ]/i.test(t) ? "kk-KZ" : /[а-яё]/i.test(t) ? "ru-RU" : /[a-z]/i.test(t) ? "en-US" : "ru-RU";
2227
+ return /[\u04D8\u04D9\u0492\u0493\u04AE\u04AF\u049A\u049B\u04E8\u04E9\u04BA\u04BB\u0406\u0456\u04A2\u04A3]/u.test(e) ? "kk-KZ" : /[\u0400-\u04FF]/u.test(e) ? "ru-RU" : /[a-z]/i.test(e) ? "en-US" : "ru-RU";
2170
2228
  }
2171
2229
  pickVoice(e) {
2172
2230
  if (!("speechSynthesis" in window)) return null;
@@ -2175,8 +2233,8 @@ var at = rt(K), q = (e) => F`${at(`
2175
2233
  let n = e.split("-")[0].toLowerCase();
2176
2234
  return t.find((t) => t.lang.toLowerCase() === e.toLowerCase()) || t.find((e) => e.lang.toLowerCase().startsWith(n)) || t[0] || null;
2177
2235
  }
2178
- }, X = "http://localhost:8000", pt = 5, mt = [/(submit|отправить|оплатить|сгенерировать|сохранить|перевести|подтвердит|купить|удалить|delete|pay|purchase|buy|send|transfer|confirm|place.?order|checkout|remove|drop|unsubscribe|sign.?out|выйти|уволить)/i];
2179
- function ht(e) {
2236
+ }, Z = "http://localhost:8000", ft = 5, pt = [/(submit|отправить|оплатить|сгенерировать|сохранить|перевести|подтвердит|купить|удалить|delete|pay|purchase|buy|send|transfer|confirm|place.?order|checkout|remove|drop|unsubscribe|sign.?out|выйти|уволить)/i];
2237
+ function mt(e) {
2180
2238
  if (e.type !== "click_element" || !e.element_id) return !1;
2181
2239
  let t = document.getElementById(e.element_id);
2182
2240
  if (!t) return !1;
@@ -2188,16 +2246,19 @@ function ht(e) {
2188
2246
  t.getAttribute("name") || "",
2189
2247
  t.getAttribute("value") || ""
2190
2248
  ].join(" ");
2191
- return mt.some((e) => e.test(n));
2249
+ return pt.some((e) => e.test(n));
2192
2250
  }
2193
- var gt = class {
2251
+ var ht = class {
2194
2252
  constructor(e) {
2195
- this.messages = [], this.isLoading = !1, this.error = null, this._tts = new ft(), this._voiceMode = !1, this.pendingConfirmation = null, (this.host = e).addController(this), this._loadMessages();
2253
+ this.messages = [], this.isLoading = !1, this.error = null, this._tts = new dt(), this._voiceMode = !1, this.pendingConfirmation = null, (this.host = e).addController(this), this._loadMessages();
2196
2254
  }
2197
2255
  hostConnected() {}
2198
2256
  hostDisconnected() {
2199
2257
  this._tts.stop();
2200
2258
  }
2259
+ _shouldSpeak() {
2260
+ return this._voiceMode || this._tts.isEnabled();
2261
+ }
2201
2262
  _loadMessages() {
2202
2263
  try {
2203
2264
  let e = sessionStorage.getItem("bw-chat-history");
@@ -2330,7 +2391,7 @@ var gt = class {
2330
2391
  async _callAPI(t) {
2331
2392
  let { page_text: n, elements: r, page_url: i } = this.gatherContext(), a = e(), o = this.host.clientId || window.__BARIWEB_CLIENT_ID__ || "", s = null;
2332
2393
  try {
2333
- let e = await fetch(`${X}/v1/training/match-screen`, {
2394
+ let e = await fetch(`${Z}/v1/training/match-screen`, {
2334
2395
  method: "POST",
2335
2396
  headers: {
2336
2397
  "Content-Type": "application/json",
@@ -2345,7 +2406,7 @@ var gt = class {
2345
2406
  } catch (e) {
2346
2407
  console.warn("Failed to match screen fingerprint", e);
2347
2408
  }
2348
- let c = await fetch(`${X}/v1/chat`, {
2409
+ let c = await fetch(`${Z}/v1/chat`, {
2349
2410
  method: "POST",
2350
2411
  headers: {
2351
2412
  "Content-Type": "application/json",
@@ -2393,11 +2454,11 @@ var gt = class {
2393
2454
  }], this._saveMessages()), this.host.requestUpdate();
2394
2455
  let r = e, i = 0;
2395
2456
  try {
2396
- for (; i < pt;) {
2457
+ for (; i < ft;) {
2397
2458
  i++;
2398
2459
  let e = await this._callAPI(r), t = e.text;
2399
2460
  if (e.action) {
2400
- if (ht(e.action)) {
2461
+ if (mt(e.action)) {
2401
2462
  let t = document.getElementById(e.action.element_id || "")?.textContent?.trim() || e.action.element_id || "кнопку";
2402
2463
  this.pendingConfirmation = {
2403
2464
  text: `${e.text}\n\n⚠️ Нажать «${t}»?`,
@@ -2408,7 +2469,7 @@ var gt = class {
2408
2469
  role: "assistant",
2409
2470
  text: `${e.text}\n\n🛑 **Подтвердите действие:** нажать «${t}»?`,
2410
2471
  timestamp: Date.now()
2411
- }], this._saveMessages(), this._voiceMode && this._tts.speak(e.text), this.isLoading = !1, this.host.requestUpdate();
2472
+ }], this._saveMessages(), this._shouldSpeak() && this._tts.speak(e.text), this.isLoading = !1, this.host.requestUpdate();
2412
2473
  return;
2413
2474
  }
2414
2475
  let n = this.gatherContext().page_text, { result: a, causesNavigation: o } = this.executeAction(e.action);
@@ -2417,7 +2478,7 @@ var gt = class {
2417
2478
  role: "assistant",
2418
2479
  text: "🔄 Анализирую...",
2419
2480
  timestamp: Date.now()
2420
- }], this._saveMessages(), this._voiceMode && this._tts.speak("Анализирую..."), this.host.requestUpdate(), await this._waitForDom(800), r = "Страница обновилась. Продолжай задачу, прочитай DOM.";
2481
+ }], this._saveMessages(), this._shouldSpeak() && this._tts.speak("Анализирую..."), this.host.requestUpdate(), await this._waitForDom(800), r = "Страница обновилась. Продолжай задачу, прочитай DOM.";
2421
2482
  continue;
2422
2483
  }
2423
2484
  if (t = `${e.text}\n${a}`, o) {
@@ -2425,7 +2486,7 @@ var gt = class {
2425
2486
  role: "assistant",
2426
2487
  text: t,
2427
2488
  timestamp: Date.now()
2428
- }], this._saveMessages(), this._voiceMode && this._tts.speak(t), this.host.requestUpdate(), await this._waitForDom(1500);
2489
+ }], this._saveMessages(), this._shouldSpeak() && this._tts.speak(t), this.host.requestUpdate(), await this._waitForDom(1500);
2429
2490
  let e = sessionStorage.getItem("bw-auto-resume");
2430
2491
  if (e === "true" || e === "verify-only") {
2431
2492
  sessionStorage.removeItem("bw-auto-resume"), r = e === "verify-only" ? "Страница загрузилась после отправки формы (SPA навигация). Проверь новый DOM: если задача выполнена — сообщи об успехе. НЕ нажимай ничего снова." : "Страница загрузилась (SPA навигация). Продолжай задачу, прочитай новый DOM.";
@@ -2437,14 +2498,14 @@ var gt = class {
2437
2498
  role: "assistant",
2438
2499
  text: t,
2439
2500
  timestamp: Date.now()
2440
- }], this._saveMessages(), this._voiceMode && this._tts.speak(t), this.host.requestUpdate(), e.action.type === "input_text" && e.action.element_id ? (await this._waitForDom(800), r = (document.getElementById(e.action.element_id)?.value ?? "").length > 0 ? "✅ Поле заполнено. Переходи к СЛЕДУЮЩЕМУ незаполненному полю или нажми кнопку отправки. НЕ повторяй ввод." : `⚠️ Поле не получило значение. Попробуй ввести снова в id="${e.action.element_id}".`) : (await this._waitForDom(800), r = n === this.gatherContext().page_text ? "⚠️ Страница не изменилась. Возможно кнопка не сработала. Проверь DOM." : "Действие выполнено. Если задача готова — сообщи. Иначе продолжай.");
2501
+ }], this._saveMessages(), this._shouldSpeak() && this._tts.speak(t), this.host.requestUpdate(), e.action.type === "input_text" && e.action.element_id ? (await this._waitForDom(800), r = (document.getElementById(e.action.element_id)?.value ?? "").length > 0 ? "✅ Поле заполнено. Переходи к СЛЕДУЮЩЕМУ незаполненному полю или нажми кнопку отправки. НЕ повторяй ввод." : `⚠️ Поле не получило значение. Попробуй ввести снова в id="${e.action.element_id}".`) : (await this._waitForDom(800), r = n === this.gatherContext().page_text ? "⚠️ Страница не изменилась. Возможно кнопка не сработала. Проверь DOM." : "Действие выполнено. Если задача готова — сообщи. Иначе продолжай.");
2441
2502
  continue;
2442
2503
  }
2443
2504
  this.messages = [...this.messages, {
2444
2505
  role: "assistant",
2445
2506
  text: t,
2446
2507
  timestamp: Date.now()
2447
- }], this._saveMessages(), this._voiceMode && this._tts.speak(t);
2508
+ }], this._saveMessages(), this._shouldSpeak() && this._tts.speak(t);
2448
2509
  break;
2449
2510
  }
2450
2511
  } catch (e) {
@@ -2452,7 +2513,7 @@ var gt = class {
2452
2513
  role: "assistant",
2453
2514
  text: `❌ Ошибка: ${this.error}`,
2454
2515
  timestamp: Date.now()
2455
- }], this._saveMessages(), this._voiceMode && this._tts.speak(`Ошибка: ${this.error}`);
2516
+ }], this._saveMessages(), this._shouldSpeak() && this._tts.speak(`Ошибка: ${this.error}`);
2456
2517
  } finally {
2457
2518
  this.isLoading = !1, this.host.requestUpdate();
2458
2519
  }
@@ -2470,7 +2531,7 @@ var gt = class {
2470
2531
  role: "assistant",
2471
2532
  text: t,
2472
2533
  timestamp: Date.now()
2473
- }], this._saveMessages(), this._voiceMode && this._tts.speak(t), this.host.requestUpdate(), !n && (await this._waitForDom(1200), await this._agentStep("Действие подтверждено и выполнено. Проверь результат в DOM."));
2534
+ }], this._saveMessages(), this._shouldSpeak() && this._tts.speak(t), this.host.requestUpdate(), !n && (await this._waitForDom(1200), await this._agentStep("Действие подтверждено и выполнено. Проверь результат в DOM."));
2474
2535
  }
2475
2536
  cancelAction() {
2476
2537
  this.pendingConfirmation && (this.pendingConfirmation = null, this.messages = [
@@ -2485,7 +2546,7 @@ var gt = class {
2485
2546
  text: "🚫 Действие отменено. Чем ещё могу помочь?",
2486
2547
  timestamp: Date.now()
2487
2548
  }
2488
- ], this._saveMessages(), this._voiceMode && this._tts.speak("Действие отменено. Чем ещё могу помочь?"), this.host.requestUpdate());
2549
+ ], this._saveMessages(), this._shouldSpeak() && this._tts.speak("Действие отменено. Чем ещё могу помочь?"), this.host.requestUpdate());
2489
2550
  }
2490
2551
  _waitForDom(e) {
2491
2552
  return new Promise((t) => setTimeout(t, e));
@@ -2514,7 +2575,7 @@ var gt = class {
2514
2575
  async transcribeAudio(e, t) {
2515
2576
  let n = this.host.clientId || window.__BARIWEB_CLIENT_ID__ || "", r = new FormData();
2516
2577
  r.append("language_mode", t), r.append("audio", e, "speech.wav");
2517
- let i = await fetch(`${X}/v1/stt/transcribe`, {
2578
+ let i = await fetch(`${Z}/v1/stt/transcribe`, {
2518
2579
  method: "POST",
2519
2580
  headers: { "X-Client-ID": n },
2520
2581
  body: r
@@ -2531,7 +2592,7 @@ var gt = class {
2531
2592
  };
2532
2593
  //#endregion
2533
2594
  //#region \0@oxc-project+runtime@0.122.0/helpers/decorate.js
2534
- function Z(e, t, n, r) {
2595
+ function Q(e, t, n, r) {
2535
2596
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
2536
2597
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
2537
2598
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
@@ -2539,171 +2600,249 @@ function Z(e, t, n, r) {
2539
2600
  }
2540
2601
  //#endregion
2541
2602
  //#region src/widget.ts
2542
- var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q = {
2543
- kz: {
2544
- langLabel: "Тану және виджет тілі",
2545
- langKz: "Қазақша",
2546
- langRu: "Орысша",
2547
- langEn: "Ағылшынша",
2548
- chatTab: "💬 Чат",
2549
- settingsTab: "♿ Баптаулар",
2550
- brandSub: "Инклюзия",
2551
- madeIn: "Қазақстанда жасалған 🇰🇿",
2552
- voiceBtnInit: "Дауыс",
2553
- voiceBtnRec: "Жазылуда...",
2554
- micBannerRec: "🎙️ Тыңдаудамын... (тыныштық болса тоқтаймын)",
2555
- micBannerWait: "⏳ Сөзді тану...",
2556
- micBannerErr: "⚠️",
2557
- micAriaL: "Голостық енгізуді қосу (жазу үшін ұстап тұрыңыз)",
2558
- inputAriaL: "Хабарламаны енгізу өрісі",
2559
- inputPl: "Хабарлама енгізіңіз...",
2560
- ttsAriaOn: "Жауапты дыбыстауды өшіру",
2561
- ttsAriaOff: "Жауапты дыбыстауды қосу",
2562
- sendAria: "Хабарлама жіберу",
2563
- onPage: "Бетте:",
2564
- emptyChatTitle: "Сіздің көмекшіңіз",
2565
- emptyChatSub: "Тапсырманы сипаттаңыз — мен қажетті түймелерді тауып, өрістерді сіз үшін толтырамын.",
2566
- confirmAction: "✅ Әрекетті растау",
2567
- cancelAction: "Болдырмау",
2568
- textScale: "Мәтін өлшемі",
2569
- monochrome: "А/Қ",
2570
- monochromeVal: "Монохром",
2571
- contrast: "Контраст",
2572
- contrastVal: "Қараңғы",
2573
- links: "Сілтемелер",
2574
- linksVal: "Ерекшелеу",
2575
- spacing: "Аралық",
2576
- spacingVal: "Үлкейту",
2577
- font: "Қаріп",
2578
- fontVal: "Дислексия",
2579
- cursor: "Курсор",
2580
- cursorVal: "Үлкейту",
2581
- colorSettingsTitle: "Түс баптаулары",
2582
- colorBg: "Фон",
2583
- colorHeader: "Бас киім",
2584
- colorText: "Мәтін",
2585
- aiSimplifyTitle: "AI Мәтінді оңтайландыру",
2586
- aiBlindTitle: "Зағиптар режимі (AI)",
2587
- on: "ҚОСУЛЫ",
2588
- off: "ӨШІРУЛІ",
2589
- closeAria: "Жабу"
2590
- },
2603
+ var gt = "bw-stt-lang-v1", _t = 200, vt = .015, yt = 1200, bt = 2e4, xt = 350, St = {
2591
2604
  ru: {
2592
- langLabel: "Язык распознавания и виджета",
2593
- langKz: "Казахский",
2594
- langRu: "Русский",
2595
- langEn: "Английский",
2596
- chatTab: "💬 Чат",
2597
- settingsTab: " Настройки",
2598
- brandSub: "Инклюзия",
2599
- madeIn: "Сделано в Казахстане 🇰🇿",
2600
- voiceBtnInit: "Нажмите",
2601
- voiceBtnRec: "Запись...",
2602
- micBannerRec: "🎙️ Слушаю... (остановлюсь по тишине)",
2603
- micBannerWait: " Распознаю речь...",
2604
- micBannerErr: "⚠️",
2605
- micAriaL: "Включить голосовой ввод (удерживайте для записи)",
2606
- inputAriaL: "Текстовое поле ввода сообщения",
2607
- inputPl: "Введите сообщение...",
2608
- ttsAriaOn: "Выключить озвучку ответа",
2609
- ttsAriaOff: "Включить озвучку ответа",
2605
+ announceVoiceInputAvailable: "Голосовой ввод доступен. Кнопка в нижнем правом углу.",
2606
+ announceWidgetOpened: "Виджет открыт.",
2607
+ announceSwitchedToChat: "Переход в чат. Голосовой ввод доступен.",
2608
+ errorMicNotSupported: "Микрофон не поддерживается.",
2609
+ errorNoMicAccess: "Нет доступа к микрофону.",
2610
+ errorProcessing: "Ошибка обработки.",
2611
+ errorTooShort: "Слишком короткая запись.",
2612
+ errorSpeechNotRecognized: "Речь не распознана.",
2613
+ errorRecognition: "Ошибка распознавания.",
2614
+ screenLabelPrefix: "На странице:",
2615
+ chatEmptyTitle: "Ваш помощник",
2616
+ chatEmptySub: "Опишите задачу — я найду нужные кнопки и заполню поля за вас.",
2617
+ confirmAction: "Подтвердить действие",
2618
+ cancel: "Отменить",
2619
+ listening: "Слушаю... (остановлюсь по тишине)",
2620
+ recognizingSpeech: "Распознаю речь...",
2621
+ micAria: "Включить голосовой ввод (удерживайте для записи)",
2622
+ inputPlaceholder: "Введите сообщение...",
2623
+ inputAria: "Текстовое поле ввода сообщения",
2624
+ ttsDisableAria: "Выключить озвучку ответа",
2625
+ ttsEnableAria: "Включить озвучку ответа",
2610
2626
  sendAria: "Отправить сообщение",
2611
- onPage: "На странице:",
2612
- emptyChatTitle: "Ваш помощник",
2613
- emptyChatSub: "Опишите задачу — я найду нужные кнопки и заполню поля за вас.",
2614
- confirmAction: "✅ Подтвердить действие",
2615
- cancelAction: "Отменить",
2616
- textScale: "Размер текста",
2617
- monochrome: "Ч/Б",
2618
- monochromeVal: "Монохром",
2619
- contrast: "Контраст",
2620
- contrastVal: "Тёмный",
2621
- links: "Ссылки",
2622
- linksVal: "Выделить",
2623
- spacing: "Отступы",
2624
- spacingVal: "Увеличить",
2625
- font: "Шрифт",
2626
- fontVal: "Дислексия",
2627
- cursor: "Курсор",
2628
- cursorVal: "Увеличить",
2629
- colorSettingsTitle: "Настройка цвета",
2630
- colorBg: "Фон",
2631
- colorHeader: "Шапка",
2632
- colorText: "Текст",
2633
- aiSimplifyTitle: "AI Упрощение текста",
2634
- aiBlindTitle: "Режим для незрячих (AI)",
2627
+ tileTextSize: "Размер текста",
2628
+ tileMonochrome: "Ч/Б",
2629
+ valueMonochrome: "Монохром",
2630
+ tileContrast: "Контраст",
2631
+ valueDark: "Тёмный",
2632
+ tileLinks: "Ссылки",
2633
+ valueHighlight: "Выделить",
2634
+ tileSpacing: "Отступы",
2635
+ valueEnlarge: "Увеличить",
2636
+ tileFont: "Шрифт",
2637
+ valueDyslexia: "Дислексия",
2638
+ tileCursor: "Курсор",
2639
+ tileVoice: "Голос",
2640
+ valueRecording: "Запись...",
2641
+ valuePress: "Нажмите",
2642
+ colorSetup: "Настройка цвета",
2643
+ tabBackground: "Фон",
2644
+ tabHeader: "Шапка",
2645
+ tabText: "Текст",
2646
+ decrease: "Уменьшить",
2647
+ hue: "Оттенок",
2648
+ increase: "Увеличить",
2649
+ recognitionLanguage: "Язык",
2650
+ changeRecognitionLanguage: "Изменить язык распознавания",
2651
+ languageAuto: "Автоопределение",
2652
+ languageKz: "Казахский",
2653
+ languageRu: "Русский",
2654
+ languageEn: "Английский",
2655
+ aiSimplify: "AI Упрощение текста",
2656
+ aiBlindMode: "Режим для незрячих (AI)",
2635
2657
  on: "ВКЛ",
2636
2658
  off: "ВЫКЛ",
2637
- closeAria: "Закрыть"
2659
+ resetSettings: "Сбросить настройки",
2660
+ adminMode: "Режим администратора",
2661
+ adminAccess: "Admin доступ",
2662
+ adminLoggedIn: "Вы вошли как администратор",
2663
+ adminLogout: "Выйти из аккаунта",
2664
+ adminPrompt: "Введите ключ для активации режима обучения",
2665
+ adminLogin: "Войти",
2666
+ close: "Закрыть",
2667
+ inclusion: "Инклюзия",
2668
+ tabChat: "Чат",
2669
+ tabSettings: "Настройки",
2670
+ madeInKazakhstan: "Сделано в Казахстане 🇰🇿",
2671
+ closeWidgetAria: "Закрыть",
2672
+ widgetDialogAria: "BariWeb Accessibility Widget",
2673
+ triggerAria: "Открыть/Закрыть меню доступности",
2674
+ adminKeyPlaceholder: "Admin Key"
2675
+ },
2676
+ kz: {
2677
+ announceVoiceInputAvailable: "Дауыстық енгізу қолжетімді. Түйме төменгі оң жақ бұрышта.",
2678
+ announceWidgetOpened: "Виджет ашылды.",
2679
+ announceSwitchedToChat: "Чатқа ауысты. Дауыстық енгізу қолжетімді.",
2680
+ errorMicNotSupported: "Микрофонға қолдау жоқ.",
2681
+ errorNoMicAccess: "Микрофонға рұқсат жоқ.",
2682
+ errorProcessing: "Өңдеу қатесі.",
2683
+ errorTooShort: "Жазба тым қысқа.",
2684
+ errorSpeechNotRecognized: "Сөйлеу танылмады.",
2685
+ errorRecognition: "Тану қатесі.",
2686
+ screenLabelPrefix: "Бетте:",
2687
+ chatEmptyTitle: "Сіздің көмекшіңіз",
2688
+ chatEmptySub: "Міндетті сипаттаңыз — мен керек батырмаларды тауып, өрістерді толтырамын.",
2689
+ confirmAction: "Әрекетті растау",
2690
+ cancel: "Бас тарту",
2691
+ listening: "Тыңдап тұрмын... (үнсіздікте тоқтаймын)",
2692
+ recognizingSpeech: "Сөйлеуді танып жатырмын...",
2693
+ micAria: "Дауыстық енгізуді қосу (жазу үшін ұстап тұрыңыз)",
2694
+ inputPlaceholder: "Хабарлама енгізіңіз...",
2695
+ inputAria: "Хабарлама енгізу өрісі",
2696
+ ttsDisableAria: "Жауап дауысын өшіру",
2697
+ ttsEnableAria: "Жауап дауысын қосу",
2698
+ sendAria: "Хабарламаны жіберу",
2699
+ tileTextSize: "Мәтін өлшемі",
2700
+ tileMonochrome: "Қ/А",
2701
+ valueMonochrome: "Монохром",
2702
+ tileContrast: "Контраст",
2703
+ valueDark: "Қою",
2704
+ tileLinks: "Сілтемелер",
2705
+ valueHighlight: "Белгілеу",
2706
+ tileSpacing: "Аралықтар",
2707
+ valueEnlarge: "Үлкейту",
2708
+ tileFont: "Қаріп",
2709
+ valueDyslexia: "Дислексия",
2710
+ tileCursor: "Курсор",
2711
+ tileVoice: "Дауыс",
2712
+ valueRecording: "Жазып жатыр...",
2713
+ valuePress: "Басыңыз",
2714
+ colorSetup: "Түсті баптау",
2715
+ tabBackground: "Фон",
2716
+ tabHeader: "Тақырып",
2717
+ tabText: "Мәтін",
2718
+ decrease: "Азайту",
2719
+ hue: "Реңк",
2720
+ increase: "Көбейту",
2721
+ recognitionLanguage: "Тіл",
2722
+ changeRecognitionLanguage: "Тану тілін өзгерту",
2723
+ languageAuto: "Автоанықтау",
2724
+ languageKz: "Қазақша",
2725
+ languageRu: "Орысша",
2726
+ languageEn: "Ағылшынша",
2727
+ aiSimplify: "AI мәтінді жеңілдету",
2728
+ aiBlindMode: "Көру қабілеті нашарларға режим (AI)",
2729
+ on: "ҚОС",
2730
+ off: "ӨШІК",
2731
+ resetSettings: "Баптауларды қалпына келтіру",
2732
+ adminMode: "Әкімші режимі",
2733
+ adminAccess: "Admin қолжетімділігі",
2734
+ adminLoggedIn: "Сіз әкімші ретінде кірдіңіз",
2735
+ adminLogout: "Аккаунттан шығу",
2736
+ adminPrompt: "Оқыту режимін қосу үшін кілт енгізіңіз",
2737
+ adminLogin: "Кіру",
2738
+ close: "Жабу",
2739
+ inclusion: "Инклюзия",
2740
+ tabChat: "Чат",
2741
+ tabSettings: "Баптаулар",
2742
+ madeInKazakhstan: "Қазақстанда жасалған 🇰🇿",
2743
+ closeWidgetAria: "Жабу",
2744
+ widgetDialogAria: "BariWeb қолжетімділік виджеті",
2745
+ triggerAria: "Қолжетімділік мәзірін ашу/жабу",
2746
+ adminKeyPlaceholder: "Admin Key"
2638
2747
  },
2639
2748
  en: {
2640
- langLabel: "Widget & Recognition Language",
2641
- langKz: "Kazakh",
2642
- langRu: "Russian",
2643
- langEn: "English",
2644
- chatTab: "💬 Chat",
2645
- settingsTab: " Settings",
2646
- brandSub: "Inclusion",
2647
- madeIn: "Made in Kazakhstan 🇰🇿",
2648
- voiceBtnInit: "Press",
2649
- voiceBtnRec: "Recording...",
2650
- micBannerRec: "🎙️ Listening... (stops on silence)",
2651
- micBannerWait: " Recognizing...",
2652
- micBannerErr: "⚠️",
2653
- micAriaL: "Enable voice input (hold to record)",
2654
- inputAriaL: "Text input field",
2655
- inputPl: "Type a message...",
2656
- ttsAriaOn: "Disable answer TTS",
2657
- ttsAriaOff: "Enable answer TTS",
2749
+ announceVoiceInputAvailable: "Voice input is available. The button is in the bottom-right corner.",
2750
+ announceWidgetOpened: "Widget opened.",
2751
+ announceSwitchedToChat: "Switched to chat. Voice input is available.",
2752
+ errorMicNotSupported: "Microphone is not supported.",
2753
+ errorNoMicAccess: "No access to microphone.",
2754
+ errorProcessing: "Processing error.",
2755
+ errorTooShort: "Recording is too short.",
2756
+ errorSpeechNotRecognized: "Speech was not recognized.",
2757
+ errorRecognition: "Recognition error.",
2758
+ screenLabelPrefix: "On page:",
2759
+ chatEmptyTitle: "Your assistant",
2760
+ chatEmptySub: "Describe your task — I will find the right buttons and fill fields for you.",
2761
+ confirmAction: "Confirm action",
2762
+ cancel: "Cancel",
2763
+ listening: "Listening... (will stop on silence)",
2764
+ recognizingSpeech: "Recognizing speech...",
2765
+ micAria: "Enable voice input (hold to record)",
2766
+ inputPlaceholder: "Type a message...",
2767
+ inputAria: "Message input field",
2768
+ ttsDisableAria: "Disable answer voice",
2769
+ ttsEnableAria: "Enable answer voice",
2658
2770
  sendAria: "Send message",
2659
- onPage: "On page:",
2660
- emptyChatTitle: "Your Assistant",
2661
- emptyChatSub: "Describe the task — I will find buttons and fill fields for you.",
2662
- confirmAction: "✅ Confirm Action",
2663
- cancelAction: "Cancel",
2664
- textScale: "Text size",
2665
- monochrome: "B/W",
2666
- monochromeVal: "Monochrome",
2667
- contrast: "Contrast",
2668
- contrastVal: "Dark",
2669
- links: "Links",
2670
- linksVal: "Highlight",
2671
- spacing: "Spacing",
2672
- spacingVal: "Increase",
2673
- font: "Font",
2674
- fontVal: "Dyslexia",
2675
- cursor: "Cursor",
2676
- cursorVal: "Increase",
2677
- colorSettingsTitle: "Color Settings",
2678
- colorBg: "Bg",
2679
- colorHeader: "Header",
2680
- colorText: "Text",
2681
- aiSimplifyTitle: "AI Text Simplification",
2682
- aiBlindTitle: "Blind Mode (AI)",
2771
+ tileTextSize: "Text size",
2772
+ tileMonochrome: "B/W",
2773
+ valueMonochrome: "Monochrome",
2774
+ tileContrast: "Contrast",
2775
+ valueDark: "Dark",
2776
+ tileLinks: "Links",
2777
+ valueHighlight: "Highlight",
2778
+ tileSpacing: "Spacing",
2779
+ valueEnlarge: "Enlarge",
2780
+ tileFont: "Font",
2781
+ valueDyslexia: "Dyslexia",
2782
+ tileCursor: "Cursor",
2783
+ tileVoice: "Voice",
2784
+ valueRecording: "Recording...",
2785
+ valuePress: "Press",
2786
+ colorSetup: "Color setup",
2787
+ tabBackground: "Background",
2788
+ tabHeader: "Header",
2789
+ tabText: "Text",
2790
+ decrease: "Decrease",
2791
+ hue: "Hue",
2792
+ increase: "Increase",
2793
+ recognitionLanguage: "Language",
2794
+ changeRecognitionLanguage: "Change recognition language",
2795
+ languageAuto: "Auto detect",
2796
+ languageKz: "Kazakh",
2797
+ languageRu: "Russian",
2798
+ languageEn: "English",
2799
+ aiSimplify: "AI text simplification",
2800
+ aiBlindMode: "Blind mode (AI)",
2683
2801
  on: "ON",
2684
2802
  off: "OFF",
2685
- closeAria: "Close"
2686
- }
2687
- }, $ = class extends W {
2803
+ resetSettings: "Reset settings",
2804
+ adminMode: "Administrator mode",
2805
+ adminAccess: "Admin access",
2806
+ adminLoggedIn: "You are logged in as administrator",
2807
+ adminLogout: "Log out",
2808
+ adminPrompt: "Enter key to activate training mode",
2809
+ adminLogin: "Log in",
2810
+ close: "Close",
2811
+ inclusion: "Inclusion",
2812
+ tabChat: "Chat",
2813
+ tabSettings: "Settings",
2814
+ madeInKazakhstan: "Made in Kazakhstan 🇰🇿",
2815
+ closeWidgetAria: "Close",
2816
+ widgetDialogAria: "BariWeb Accessibility Widget",
2817
+ triggerAria: "Open/close accessibility menu",
2818
+ adminKeyPlaceholder: "Admin Key"
2819
+ }
2820
+ }, $ = class extends G {
2688
2821
  static {
2689
- this.styles = [ot];
2822
+ this.styles = [at];
2690
2823
  }
2691
2824
  constructor() {
2692
- super(), this._a11y = new ct(this), this._aiA11y = new ut(this), this._chat = new gt(this), this.clientId = "", this._isOpen = !1, this._activeTab = "chat", this._inputValue = "", this._isAdmin = !1, this._adminPassword = "", this._authError = "", this._currentScreenLabel = "", this._sttState = "idle", this._sttLanguageMode = "ru", this._sttError = "", this._adminClickCount = 0, this._showAdminLogin = !1, this._mediaStream = null, this._audioContext = null, this._analyser = null, this._scriptProcessor = null, this._pcmChunks = [], this._sampleRate = 44100, this._recordingStartTs = 0, this._silenceStartedTs = null, this._silenceIntervalId = null, this._maxDurationTimeoutId = null, this._adminClickTimer = null, this._handleGlobalKeydown = (e) => {
2825
+ super(), this._a11y = new st(this), this._aiA11y = new lt(this), this._chat = new ht(this), this.clientId = "", this._isOpen = !1, this._activeTab = "chat", this._inputValue = "", this._isAdmin = !1, this._adminPassword = "", this._authError = "", this._currentScreenLabel = "", this._sttState = "idle", this._sttLanguageMode = "auto", this._sttError = "", this._adminClickCount = 0, this._showAdminLogin = !1, this._mediaStream = null, this._audioContext = null, this._analyser = null, this._scriptProcessor = null, this._pcmChunks = [], this._sampleRate = 44100, this._recordingStartTs = 0, this._silenceStartedTs = null, this._silenceIntervalId = null, this._maxDurationTimeoutId = null, this._adminClickTimer = null, this._handleGlobalKeydown = (e) => {
2693
2826
  this._isOpen && e.altKey && e.code === "KeyV" && (e.preventDefault(), this._toggleVoice());
2694
2827
  };
2695
2828
  try {
2696
- let e = localStorage.getItem(_t);
2697
- (e === "kz" || e === "ru" || e === "en") && (this._sttLanguageMode = e);
2829
+ let e = localStorage.getItem(gt);
2830
+ (e === "auto" || e === "kz" || e === "ru" || e === "en") && (this._sttLanguageMode = e);
2698
2831
  } catch {}
2699
2832
  this._checkAuthStatus();
2700
2833
  }
2701
2834
  _setSttLanguageMode(e) {
2702
2835
  this._sttLanguageMode = e;
2703
2836
  try {
2704
- localStorage.setItem(_t, e);
2837
+ localStorage.setItem(gt, e);
2705
2838
  } catch {}
2706
2839
  }
2840
+ _uiLang() {
2841
+ return this._sttLanguageMode === "kz" ? "kz" : this._sttLanguageMode === "en" ? "en" : "ru";
2842
+ }
2843
+ _t(e) {
2844
+ return St[this._uiLang()][e] ?? St.ru[e] ?? e;
2845
+ }
2707
2846
  async _checkAuthStatus() {
2708
2847
  let e = localStorage.getItem("bw_admin_token");
2709
2848
  if (e) try {
@@ -2777,17 +2916,21 @@ var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q
2777
2916
  super.disconnectedCallback(), t.stop(), this._cleanupRecording(), window.removeEventListener("keydown", this._handleGlobalKeydown);
2778
2917
  }
2779
2918
  _beep(e) {
2780
- let t = new (window.AudioContext || window.webkitAudioContext)(), n = t.createOscillator(), r = t.createGain();
2781
- n.type = "sine", n.frequency.setValueAtTime(e, t.currentTime), r.gain.setValueAtTime(.1, t.currentTime), r.gain.exponentialRampToValueAtTime(1e-5, t.currentTime + .1), n.connect(r), r.connect(t.destination), n.start(), n.stop(t.currentTime + .1);
2919
+ try {
2920
+ let t = new (window.AudioContext || window.webkitAudioContext)(), n = t.createOscillator(), r = t.createGain();
2921
+ n.type = "sine", n.frequency.setValueAtTime(e, t.currentTime), r.gain.setValueAtTime(.1, t.currentTime), r.gain.exponentialRampToValueAtTime(1e-5, t.currentTime + .1), n.connect(r), r.connect(t.destination), n.start(), n.stop(t.currentTime + .1);
2922
+ } catch {}
2782
2923
  }
2783
2924
  _toggle() {
2784
- this._isOpen = !this._isOpen;
2925
+ this._isOpen = !this._isOpen, this._isOpen && this._scrollMessages();
2785
2926
  }
2786
2927
  setOpen(e) {
2787
- this._isOpen = e;
2928
+ this._isOpen = e, e && this._scrollMessages();
2788
2929
  }
2789
2930
  _setTab(e) {
2790
- this._activeTab = e;
2931
+ this._activeTab = e, e === "chat" && (this._scrollMessages(), setTimeout(() => {
2932
+ this.renderRoot?.querySelector("#bw-voice-btn")?.focus();
2933
+ }, 300));
2791
2934
  }
2792
2935
  _handleInput(e) {
2793
2936
  this._inputValue = e.target.value;
@@ -2797,7 +2940,10 @@ var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q
2797
2940
  }
2798
2941
  async _handleSend() {
2799
2942
  let e = this._inputValue.trim();
2800
- !e || this._chat.isLoading || this._sttState !== "idle" || (this._inputValue = "", await this._chat.sendMessage(e, !1), this._scrollMessages());
2943
+ if (!e || this._chat.isLoading || this._sttState !== "idle") return;
2944
+ this._inputValue = "";
2945
+ let t = this._chat.sendMessage(e, !1);
2946
+ this._scrollMessages(), await t, this._scrollMessages();
2801
2947
  }
2802
2948
  _scrollMessages() {
2803
2949
  this.updateComplete.then(() => {
@@ -2808,6 +2954,9 @@ var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q
2808
2954
  let e = this._a11y.settings;
2809
2955
  return e.activeColorTab === "background" ? e.customBgHue || 0 : e.activeColorTab === "header" ? e.customHeaderHue || 0 : e.customContentHue || 0;
2810
2956
  }
2957
+ _resetWidgetSettings() {
2958
+ this._a11y.reset(), this._aiA11y.simplifyEnabled && this._aiA11y.toggleSimplify(), this._aiA11y.autoA11yEnabled && this._aiA11y.toggleAutoA11y(), this._setSttLanguageMode("auto"), this.requestUpdate();
2959
+ }
2811
2960
  _clearSttTimers() {
2812
2961
  this._silenceIntervalId !== null && (window.clearInterval(this._silenceIntervalId), this._silenceIntervalId = null), this._maxDurationTimeoutId !== null && (window.clearTimeout(this._maxDurationTimeoutId), this._maxDurationTimeoutId = null);
2813
2962
  }
@@ -2825,7 +2974,7 @@ var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q
2825
2974
  }
2826
2975
  async _startRecording() {
2827
2976
  if (!navigator.mediaDevices?.getUserMedia) {
2828
- this._sttState = "error", this._sttError = "Микрофон не поддерживается.";
2977
+ this._sttState = "error", this._sttError = this._t("errorMicNotSupported");
2829
2978
  return;
2830
2979
  }
2831
2980
  try {
@@ -2837,7 +2986,7 @@ var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q
2837
2986
  this._sttState === "recording" && (this._pcmChunks.push(new Float32Array(e.inputBuffer.getChannelData(0))), e.outputBuffer.getChannelData(0).fill(0));
2838
2987
  }, this._sttState = "recording", this._beep(880), this._maxDurationTimeoutId = window.setTimeout(() => {
2839
2988
  this._sttState === "recording" && this._stopRecording();
2840
- }, xt);
2989
+ }, bt);
2841
2990
  let n = new Uint8Array(this._analyser.fftSize);
2842
2991
  this._silenceIntervalId = window.setInterval(() => {
2843
2992
  if (!this._analyser || this._sttState !== "recording") return;
@@ -2847,34 +2996,34 @@ var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q
2847
2996
  let r = (n[t] - 128) / 128;
2848
2997
  e += r * r;
2849
2998
  }
2850
- Math.sqrt(e / n.length) < yt ? this._silenceStartedTs ? Date.now() - this._silenceStartedTs >= bt && this._stopRecording() : this._silenceStartedTs = Date.now() : this._silenceStartedTs = null;
2851
- }, vt);
2999
+ Math.sqrt(e / n.length) < vt ? this._silenceStartedTs ? Date.now() - this._silenceStartedTs >= yt && this._stopRecording() : this._silenceStartedTs = Date.now() : this._silenceStartedTs = null;
3000
+ }, _t);
2852
3001
  } catch {
2853
- this._sttState = "error", this._sttError = "Нет доступа к микрофону.", this._cleanupRecording();
3002
+ this._sttState = "error", this._sttError = this._t("errorNoMicAccess"), this._cleanupRecording();
2854
3003
  }
2855
3004
  }
2856
3005
  _stopRecording() {
2857
3006
  this._sttState === "recording" && (this._clearSttTimers(), this._sttState = "processing", this._beep(440), this._finalizeRecording().catch((e) => {
2858
- this._sttState = "error", this._sttError = e?.message || "Ошибка обработки.";
3007
+ this._sttState = "error", this._sttError = e?.message || this._t("errorProcessing");
2859
3008
  }));
2860
3009
  }
2861
3010
  async _finalizeRecording() {
2862
3011
  let e = Date.now() - this._recordingStartTs, t = this._pcmChunks.reduce((e, t) => e + t.length, 0), n = new Float32Array(t), r = 0;
2863
3012
  for (let e of this._pcmChunks) n.set(e, r), r += e.length;
2864
3013
  let i = this._encodeWav(n, this._sampleRate);
2865
- if (this._cleanupRecording(), e < St || i.size === 0) {
2866
- this._sttState = "error", this._sttError = "Слишком короткая запись.";
3014
+ if (this._cleanupRecording(), e < xt || i.size === 0) {
3015
+ this._sttState = "error", this._sttError = this._t("errorTooShort");
2867
3016
  return;
2868
3017
  }
2869
3018
  try {
2870
3019
  let e = (await this._chat.transcribeAudio(i, this._sttLanguageMode)).text?.trim();
2871
3020
  if (!e) {
2872
- this._sttState = "error", this._sttError = "Речь не распознана.";
3021
+ this._sttState = "error", this._sttError = this._t("errorSpeechNotRecognized");
2873
3022
  return;
2874
3023
  }
2875
3024
  await this._chat.sendMessage(e, !0), this._sttState = "idle", this._sttError = "", this._inputValue = "", this._scrollMessages();
2876
3025
  } catch (e) {
2877
- this._sttState = "error", this._sttError = e?.message || "Ошибка распознавания.";
3026
+ this._sttState = "error", this._sttError = e?.message || this._t("errorRecognition");
2878
3027
  }
2879
3028
  }
2880
3029
  _encodeWav(e, t) {
@@ -2893,51 +3042,66 @@ var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q
2893
3042
  "vibrate" in navigator && navigator.vibrate(20);
2894
3043
  }
2895
3044
  _renderChatTab() {
2896
- let e = Q[this._sttLanguageMode], t = this._chat.messages, n = this._chat.isLoading, r = this._chat.pendingConfirmation, i = n || this._sttState !== "idle";
2897
- return F`
3045
+ let e = this._chat.messages, t = this._chat.isLoading, n = this._chat.pendingConfirmation, r = t || this._sttState === "processing", i = (e) => this._t(e);
3046
+ return I`
2898
3047
  <div class="chat-messages" id="bw-chat-messages">
2899
- ${this._currentScreenLabel ? F`
3048
+ ${this._currentScreenLabel ? I`
2900
3049
  <div class="screen-label-badge">
2901
3050
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" width="12" height="12"><polyline points="20 6 9 17 4 12"/></svg>
2902
- ${e.onPage} <strong>${this._currentScreenLabel}</strong>
3051
+ ${i("screenLabelPrefix")} <strong>${this._currentScreenLabel}</strong>
2903
3052
  </div>
2904
3053
  ` : ""}
2905
3054
 
2906
- ${t.length === 0 ? F`
3055
+ ${e.length === 0 ? I`
2907
3056
  <div class="chat-empty">
2908
- ${J.accessibility}
2909
- <p class="chat-empty-title">${e.emptyChatTitle}</p>
2910
- <p class="chat-empty-sub">${e.emptyChatSub}</p>
3057
+ ${Y.accessibility}
3058
+ <p class="chat-empty-title">${i("chatEmptyTitle")}</p>
3059
+ <p class="chat-empty-sub">${i("chatEmptySub")}</p>
2911
3060
  </div>
2912
- ` : t.map((e) => e.role === "assistant" && (e.text.includes("✅") || e.text.includes("⌨️") || e.text.includes("🔄")) ? F`
3061
+ ` : e.map((e) => {
3062
+ if (e.role === "assistant" && (e.text.includes("✅") || e.text.includes("⌨️") || e.text.includes("🔄"))) {
3063
+ let t = e.text.split("\n")[0];
3064
+ return I`
2913
3065
  <details class="system-log">
2914
- <summary class="system-log-header"><span>${e.text.split("\n")[0]}</span></summary>
3066
+ <summary class="system-log-header">
3067
+ ${Y.code} <span>${t}</span>
3068
+ </summary>
2915
3069
  <div class="system-log-details">${e.text}</div>
2916
- </details>` : F`<div class="chat-bubble ${e.role}">${e.text}</div>`)}
3070
+ </details>
3071
+ `;
3072
+ }
3073
+ return I`
3074
+ <div class="chat-bubble ${e.role}">
3075
+ ${e.text}
3076
+ </div>
3077
+ `;
3078
+ })}
2917
3079
 
2918
- ${n ? F`
3080
+ ${t ? I`
2919
3081
  <div class="typing-indicator">
2920
- <div class="typing-dot"></div><div class="typing-dot"></div><div class="typing-dot"></div>
2921
- </div>` : ""}
3082
+ <div class="typing-dot"></div>
3083
+ <div class="typing-dot"></div>
3084
+ <div class="typing-dot"></div>
3085
+ </div>
3086
+ ` : ""}
2922
3087
  </div>
2923
3088
 
2924
- ${r ? F`
3089
+ ${n ? I`
2925
3090
  <div class="confirm-panel">
2926
3091
  <button class="btn-confirm" @click=${() => this._chat.confirmAction()} id="bw-confirm-action">
2927
- ${e.confirmAction}
3092
+ ${i("confirmAction")}
2928
3093
  </button>
2929
3094
  <button class="btn-cancel" @click=${() => this._chat.cancelAction()} id="bw-cancel-action">
2930
- ${e.cancelAction}
3095
+ ${i("cancel")}
2931
3096
  </button>
2932
3097
  </div>
2933
- ` : F`
3098
+ ` : I`
2934
3099
  <div class="chat-input-area">
2935
- ${this._sttState === "idle" ? "" : F`
3100
+ ${this._sttState === "idle" ? "" : I`
2936
3101
  <div class="stt-banner ${this._sttState}">
2937
- ${this._sttState === "recording" ? e.micBannerRec : this._sttState === "processing" ? e.micBannerWait : `${e.micBannerErr} ${this._sttError}`}
3102
+ ${this._sttState === "recording" ? `REC: ${i("listening")}` : this._sttState === "processing" ? `... ${i("recognizingSpeech")}` : `! ${this._sttError}`}
2938
3103
  </div>`}
2939
3104
  <div class="chat-input-row">
2940
- <!-- 🎙️ Primary Mic Button (Large Target Size) -->
2941
3105
  <button class="chat-icon-btn ${this._sttState === "recording" ? "recording" : ""}"
2942
3106
  @mouseenter=${this._vibrate}
2943
3107
  @focus=${this._vibrate}
@@ -2949,31 +3113,39 @@ var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q
2949
3113
  @touchend=${(e) => {
2950
3114
  e.preventDefault(), this._stopRecording();
2951
3115
  }}
2952
- @click=${this._toggleVoice}
2953
- ?disabled=${this._sttState === "processing" || n}
2954
- id="bw-voice-btn"
2955
- aria-label="${e.micAriaL}">
2956
- ${J.mic}
3116
+ @click=${this._toggleVoice}
3117
+ ?disabled=${this._sttState === "processing" || t}
3118
+ id="bw-voice-btn"
3119
+ aria-label=${i("micAria")}>
3120
+ ${Y.mic}
2957
3121
  </button>
2958
3122
 
2959
3123
  <input
2960
3124
  class="chat-input"
2961
3125
  type="text"
2962
- placeholder="${e.inputPl}"
3126
+ placeholder=${i("inputPlaceholder")}
2963
3127
  .value=${this._inputValue}
2964
3128
  @input=${this._handleInput}
2965
3129
  @keydown=${this._handleKeydown}
2966
- ?disabled=${i}
3130
+ ?disabled=${r}
2967
3131
  id="bw-chat-input"
2968
- aria-label="${e.inputAriaL}"
3132
+ aria-label=${i("inputAria")}
2969
3133
  />
2970
3134
 
2971
- <!-- Send Button -->
3135
+ <button class="chat-icon-btn ${this._chat.isTtsEnabled() ? "tts-on" : ""}"
3136
+ @click=${() => {
3137
+ this._chat.setTtsEnabled(!this._chat.isTtsEnabled()), this.requestUpdate();
3138
+ }}
3139
+ id="bw-tts-btn"
3140
+ aria-label=${this._chat.isTtsEnabled() ? i("ttsDisableAria") : i("ttsEnableAria")}>
3141
+ ${this._chat.isTtsEnabled() ? Y.volumeOn : Y.volumeOff}
3142
+ </button>
3143
+
2972
3144
  <button class="chat-send-btn" @click=${this._handleSend}
2973
- ?disabled=${!this._inputValue.trim() || i}
2974
- id="bw-send-btn"
2975
- aria-label="${e.sendAria}">
2976
- ${J.send}
3145
+ ?disabled=${!this._inputValue.trim() || r}
3146
+ id="bw-send-btn"
3147
+ aria-label=${i("sendAria")}>
3148
+ ${Y.send}
2977
3149
  </button>
2978
3150
  </div>
2979
3151
  </div>
@@ -2981,169 +3153,175 @@ var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q
2981
3153
  `;
2982
3154
  }
2983
3155
  _renderA11yTab() {
2984
- let e = Q[this._sttLanguageMode], t = this._a11y.settings, n = [
3156
+ let e = this._a11y.settings, t = (e) => this._t(e);
3157
+ return I`
3158
+ <div class="a11y-scroller">
3159
+ <div class="settings-grid">
3160
+ ${[
2985
3161
  {
2986
3162
  id: "bw-tile-textscale",
2987
- icon: J.textSize,
2988
- label: e.textScale,
2989
- value: `${Math.round(t.textScale * 100)}%`,
2990
- active: t.textScale > 1,
3163
+ icon: Y.textSize,
3164
+ label: t("tileTextSize"),
3165
+ value: `${Math.round(e.textScale * 100)}%`,
3166
+ active: e.textScale > 1,
2991
3167
  action: () => this._a11y.incrementTextScale()
2992
3168
  },
2993
3169
  {
2994
3170
  id: "bw-tile-monochrome",
2995
- icon: J.visualImpair,
2996
- label: e.monochrome,
2997
- value: e.monochromeVal,
2998
- active: t.monochrome,
3171
+ icon: Y.palette,
3172
+ label: t("tileMonochrome"),
3173
+ value: t("valueMonochrome"),
3174
+ active: e.monochrome,
2999
3175
  action: () => this._a11y.toggleMonochrome()
3000
3176
  },
3001
3177
  {
3002
3178
  id: "bw-tile-contrast",
3003
- icon: J.moon,
3004
- label: e.contrast,
3005
- value: e.contrastVal,
3006
- active: t.darkHighContrast,
3179
+ icon: Y.sun,
3180
+ label: t("tileContrast"),
3181
+ value: t("valueDark"),
3182
+ active: e.darkHighContrast,
3007
3183
  action: () => this._a11y.toggleDarkHighContrast()
3008
3184
  },
3009
3185
  {
3010
3186
  id: "bw-tile-links",
3011
- icon: J.visualImpair,
3012
- label: e.links,
3013
- value: e.linksVal,
3014
- active: t.linkHighlight,
3187
+ icon: Y.link,
3188
+ label: t("tileLinks"),
3189
+ value: t("valueHighlight"),
3190
+ active: e.linkHighlight,
3015
3191
  action: () => this._a11y.toggleLinkHighlight()
3016
3192
  },
3017
3193
  {
3018
3194
  id: "bw-tile-spacing",
3019
- icon: J.textSize,
3020
- label: e.spacing,
3021
- value: e.spacingVal,
3022
- active: t.textSpacing,
3195
+ icon: Y.type,
3196
+ label: t("tileSpacing"),
3197
+ value: t("valueEnlarge"),
3198
+ active: e.textSpacing,
3023
3199
  action: () => this._a11y.toggleTextSpacing()
3024
3200
  },
3025
3201
  {
3026
3202
  id: "bw-tile-font",
3027
- icon: J.textSize,
3028
- label: e.font,
3029
- value: e.fontVal,
3030
- active: t.dyslexicFont,
3203
+ icon: Y.type,
3204
+ label: t("tileFont"),
3205
+ value: t("valueDyslexia"),
3206
+ active: e.dyslexicFont,
3031
3207
  action: () => this._a11y.toggleDyslexicFont()
3032
3208
  },
3033
3209
  {
3034
3210
  id: "bw-tile-cursor",
3035
- icon: J.cursor,
3036
- label: e.cursor,
3037
- value: e.cursorVal,
3038
- active: t.cursorMagnifier,
3211
+ icon: Y.mouse,
3212
+ label: t("tileCursor"),
3213
+ value: t("valueEnlarge"),
3214
+ active: e.cursorMagnifier,
3039
3215
  action: () => this._a11y.toggleCursorMagnifier()
3040
3216
  },
3041
3217
  {
3042
3218
  id: "bw-tile-voice",
3043
3219
  icon: null,
3044
- label: e.voiceBtnInit,
3045
- value: this._sttState === "recording" ? e.voiceBtnRec : e.voiceBtnInit,
3220
+ label: t("tileVoice"),
3221
+ value: this._sttState === "recording" ? t("valueRecording") : t("valuePress"),
3046
3222
  active: this._sttState === "recording",
3047
3223
  action: () => this._toggleVoice()
3048
3224
  }
3049
- ];
3050
- return F`
3051
- <div class="a11y-scroller">
3052
-
3053
- <!-- Language config mapped to TOP of settings tab -->
3054
- <div style="padding: 16px 16px 0;">
3055
- <div style="display: flex; align-items: center; justify-content: space-between; padding: 12px; background: var(--bw-bg-subtle, #f8fafc); border-radius: var(--bw-radius, 14px); margin-bottom: 0px;">
3056
- <div style="display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--bw-fg, #1e293b);">
3057
- ${J.languages} ${e.langLabel}
3058
- </div>
3059
- <select style="height: 34px; padding: 0 8px; border: 1px solid var(--bw-primary, #6d28d9); border-radius: 8px; background: rgba(109, 40, 217, 0.05); color: var(--bw-primary, #6d28d9); cursor: pointer; outline: none; font-size: 13px; font-weight: 600;"
3060
- .value=${this._sttLanguageMode}
3061
- @change=${(e) => {
3062
- this._setSttLanguageMode(e.target.value), this.requestUpdate();
3063
- }}
3064
- aria-label="${e.langLabel}">
3065
- <option value="kz">${Q.kz.langKz}</option>
3066
- <option value="ru">${Q.ru.langRu}</option>
3067
- <option value="en">${Q.en.langEn}</option>
3068
- </select>
3069
- </div>
3070
- </div>
3071
-
3072
- <div class="settings-grid">
3073
- ${n.map((e) => F`
3225
+ ].map((e) => I`
3074
3226
  <button class="settings-card" ?active=${e.active} @click=${e.action} id=${e.id}
3075
3227
  aria-pressed=${e.active ? "true" : "false"} aria-label=${e.label}>
3076
- ${e.icon || J.mic}
3228
+ ${e.icon || Y.mic}
3077
3229
  <span class="settings-card-label">${e.label}</span>
3078
3230
  <span class="settings-card-value">${e.value}</span>
3079
- ${e.active ? F`<span class="active-badge">${J.check}</span>` : ""}
3231
+ ${e.active ? I`<span class="active-badge">${Y.check}</span>` : ""}
3080
3232
  </button>
3081
3233
  `)}
3082
3234
  </div>
3083
3235
 
3084
3236
  <div class="color-section">
3085
3237
  <div class="color-section-header">
3086
- ${J.droplet}
3087
- <h4 class="color-section-title">${e.colorSettingsTitle}</h4>
3238
+ ${Y.droplet}
3239
+ <h4 class="color-section-title">${t("colorSetup")}</h4>
3088
3240
  </div>
3089
3241
  <div class="color-tabs">
3090
- <button class="color-tab" ?active=${t.activeColorTab === "background"}
3242
+ <button class="color-tab" ?active=${e.activeColorTab === "background"}
3091
3243
  @click=${() => {
3092
- t.activeColorTab = "background", this.requestUpdate();
3093
- }}>${e.colorBg}</button>
3094
- <button class="color-tab" ?active=${t.activeColorTab === "header"}
3244
+ e.activeColorTab = "background", this.requestUpdate();
3245
+ }}>${t("tabBackground")}</button>
3246
+ <button class="color-tab" ?active=${e.activeColorTab === "header"}
3095
3247
  @click=${() => {
3096
- t.activeColorTab = "header", this.requestUpdate();
3097
- }}>${e.colorHeader}</button>
3098
- <button class="color-tab" ?active=${t.activeColorTab === "content"}
3248
+ e.activeColorTab = "header", this.requestUpdate();
3249
+ }}>${t("tabHeader")}</button>
3250
+ <button class="color-tab" ?active=${e.activeColorTab === "content"}
3099
3251
  @click=${() => {
3100
- t.activeColorTab = "content", this.requestUpdate();
3101
- }}>${e.colorText}</button>
3252
+ e.activeColorTab = "content", this.requestUpdate();
3253
+ }}>${t("tabText")}</button>
3102
3254
  </div>
3103
3255
  <div class="hue-row">
3104
- <button class="hue-step-btn" @click=${() => this._a11y.setCustomHue((this._getCurrentHue() - 15 + 360) % 360)} aria-label="Уменьшить">–</button>
3256
+ <button class="hue-step-btn" @click=${() => this._a11y.setCustomHue((this._getCurrentHue() - 15 + 360) % 360)} aria-label=${t("decrease")}>-</button>
3105
3257
  <input type="range" class="hue-slider" min="0" max="360"
3106
3258
  .value=${String(this._getCurrentHue())}
3107
3259
  @input=${(e) => this._a11y.setCustomHue(parseInt(e.target.value))}
3108
- aria-label="Оттенок" />
3109
- <button class="hue-step-btn" @click=${() => this._a11y.setCustomHue((this._getCurrentHue() + 15) % 360)} aria-label="Увеличить">+</button>
3260
+ aria-label=${t("hue")} />
3261
+ <button class="hue-step-btn" @click=${() => this._a11y.setCustomHue((this._getCurrentHue() + 15) % 360)} aria-label=${t("increase")}>+</button>
3110
3262
  </div>
3111
3263
  </div>
3112
3264
 
3113
- <div class="ai-tools-section" style="margin-top: 16px;">
3265
+ <div class="ai-tools-section">
3266
+ <div style="display: flex; align-items: center; justify-content: space-between; padding: 12px; background: var(--bw-bg-subtle, #f8fafc); border-radius: var(--bw-radius, 14px); margin-bottom: 12px;">
3267
+ <div class="lang-row-label" style="display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--bw-fg, #1e293b);">
3268
+ <span class="lang-row-icon">${Y.languages}</span>${t("recognitionLanguage")}
3269
+ </div>
3270
+ <select style="height: 34px; padding: 0 8px; border: 1px solid var(--bw-border); border-radius: 8px; background: #fff; cursor: pointer; outline: none; font-size: 13px;"
3271
+ .value=${this._sttLanguageMode}
3272
+ @change=${(e) => {
3273
+ this._setSttLanguageMode(e.target.value), this.requestUpdate();
3274
+ }}
3275
+ aria-label=${t("changeRecognitionLanguage")}>
3276
+ <option value="auto">${t("languageAuto")}</option>
3277
+ <option value="kz">${t("languageKz")}</option>
3278
+ <option value="ru">${t("languageRu")}</option>
3279
+ <option value="en">${t("languageEn")}</option>
3280
+ </select>
3281
+ </div>
3282
+
3114
3283
  <button class="ai-tool-btn ${this._aiA11y.simplifyEnabled ? "active" : ""}"
3115
3284
  @click=${() => this._aiA11y.toggleSimplify()} id="bw-ai-simplify">
3116
- ${J.textSize}
3117
- <span class="ai-tool-btn-label">${e.aiSimplifyTitle}</span>
3285
+ ${Y.textSize}
3286
+ <span class="ai-tool-btn-label">${t("aiSimplify")}</span>
3118
3287
  <span class="ai-tool-badge ${this._aiA11y.simplifyEnabled ? "on" : ""}">
3119
- ${this._aiA11y.simplifyEnabled ? e.on : e.off}
3288
+ ${this._aiA11y.simplifyEnabled ? t("on") : t("off")}
3120
3289
  </span>
3121
3290
  </button>
3122
-
3291
+
3123
3292
  <button class="ai-tool-btn ${this._aiA11y.autoA11yEnabled ? "active" : ""}"
3124
- @click=${() => this._aiA11y.toggleAutoA11y()}
3293
+ @click=${() => this._aiA11y.toggleAutoA11y()}
3125
3294
  id="bw-ai-fix">
3126
- ${J.accessibility}
3127
- <span class="ai-tool-btn-label">${e.aiBlindTitle}</span>
3295
+ ${Y.accessibility}
3296
+ <span class="ai-tool-btn-label">${t("aiBlindMode")}</span>
3128
3297
  <span class="ai-tool-badge ${this._aiA11y.autoA11yEnabled ? "on" : ""}">
3129
- ${this._aiA11y.autoA11yEnabled ? e.on : e.off}
3298
+ ${this._aiA11y.autoA11yEnabled ? t("on") : t("off")}
3130
3299
  </span>
3131
3300
  </button>
3132
3301
  </div>
3302
+
3303
+ <div class="settings-actions">
3304
+ <button class="reset-settings-btn" @click=${this._resetWidgetSettings} id="bw-reset-settings-btn">
3305
+ ${Y.refresh}
3306
+ ${t("resetSettings")}
3307
+ </button>
3308
+ </div>
3133
3309
  </div>
3134
3310
  `;
3135
3311
  }
3136
3312
  _renderAdminOverlay() {
3137
- return this._showAdminLogin ? F`
3313
+ if (!this._showAdminLogin) return "";
3314
+ let e = (e) => this._t(e);
3315
+ return I`
3138
3316
  <div class="admin-overlay">
3139
- <div class="admin-icon">🔐</div>
3140
- <h4>${this._isAdmin ? "Режим администратора" : "Admin доступ"}</h4>
3141
- ${this._isAdmin ? F`
3142
- <p class="admin-status">✅ Вы вошли как администратор</p>
3143
- <button class="admin-logout-btn" @click=${this._handleAdminLogout}>Выйти из аккаунта</button>
3144
- ` : F`
3145
- <p>Введите ключ для активации режима обучения</p>
3146
- <input type="password" placeholder="Admin Key"
3317
+ <div class="admin-icon">${Y.shield}</div>
3318
+ <h4>${this._isAdmin ? e("adminMode") : e("adminAccess")}</h4>
3319
+ ${this._isAdmin ? I`
3320
+ <p class="admin-status">${e("adminLoggedIn")}</p>
3321
+ <button class="admin-logout-btn" @click=${this._handleAdminLogout}>${e("adminLogout")}</button>
3322
+ ` : I`
3323
+ <p>${e("adminPrompt")}</p>
3324
+ <input type="password" placeholder=${e("adminKeyPlaceholder")}
3147
3325
  .value=${this._adminPassword}
3148
3326
  @input=${(e) => {
3149
3327
  this._adminPassword = e.target.value;
@@ -3151,54 +3329,50 @@ var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q
3151
3329
  @keydown=${(e) => {
3152
3330
  e.key === "Enter" && this._handleAdminLogin();
3153
3331
  }} />
3154
- ${this._authError ? F`<p class="auth-error">${this._authError}</p>` : ""}
3155
- <button class="admin-login-btn" @click=${this._handleAdminLogin}>Войти</button>
3332
+ ${this._authError ? I`<div class="auth-error">${this._authError}</div>` : ""}
3333
+ <button class="admin-login-btn" @click=${this._handleAdminLogin}>${e("adminLogin")}</button>
3156
3334
  `}
3157
3335
  <button class="admin-close-btn" @click=${() => {
3158
3336
  this._showAdminLogin = !1, this._authError = "";
3159
3337
  }}>
3160
- Закрыть
3338
+ ${e("close")}
3161
3339
  </button>
3162
3340
  </div>
3163
- ` : "";
3341
+ `;
3164
3342
  }
3165
3343
  render() {
3166
- let e = Q[this._sttLanguageMode];
3167
- return F`
3344
+ let e = (e) => this._t(e);
3345
+ return I`
3168
3346
  <div class="widget-container">
3169
- <!-- Panel -->
3170
3347
  <div class="bw-panel ${this._isOpen ? "panel-visible" : "panel-hidden"}"
3171
- role="dialog" aria-modal="true" aria-label="BariWeb Accessibility Widget">
3348
+ role="dialog" aria-modal="true" aria-label=${e("widgetDialogAria")}>
3172
3349
 
3173
- <!-- Header -->
3174
3350
  <div class="bw-header">
3175
3351
  <div class="header-branding" @click=${this._handleLogoClick} id="bw-logo">
3176
- ${J.accessibility}
3352
+ ${Y.accessibility}
3177
3353
  <div class="header-branding-text">
3178
3354
  <span class="header-brand-name">BariWeb</span>
3179
- <span class="header-brand-sub">${e.brandSub}</span>
3355
+ <span class="header-brand-sub">${e("inclusion")}</span>
3180
3356
  </div>
3181
3357
  </div>
3182
- <button class="close-btn" @click=${this._toggle} aria-label="${e.closeAria}" id="bw-close">
3183
- ${J.close}
3358
+ <button class="close-btn" @click=${this._toggle} aria-label=${e("closeWidgetAria")} id="bw-close">
3359
+ ${Y.close}
3184
3360
  </button>
3185
3361
  </div>
3186
3362
 
3187
- <!-- Tabs -->
3188
3363
  <div class="bw-tabs" role="tablist">
3189
3364
  <button class="bw-tab" ?active=${this._activeTab === "chat"}
3190
3365
  @click=${() => this._setTab("chat")} role="tab"
3191
- aria-selected=${this._activeTab === "chat"} id="bw-tab-chat">
3192
- ${e.chatTab}
3366
+ aria-selected=${this._activeTab === "chat" ? "true" : "false"} id="bw-tab-chat">
3367
+ ${Y.chat} ${e("tabChat")}
3193
3368
  </button>
3194
3369
  <button class="bw-tab" ?active=${this._activeTab === "a11y"}
3195
3370
  @click=${() => this._setTab("a11y")} role="tab"
3196
- aria-selected=${this._activeTab === "a11y"} id="bw-tab-settings">
3197
- ${e.settingsTab}
3371
+ aria-selected=${this._activeTab === "a11y" ? "true" : "false"} id="bw-tab-settings">
3372
+ ${Y.settings} ${e("tabSettings")}
3198
3373
  </button>
3199
3374
  </div>
3200
3375
 
3201
- <!-- Content -->
3202
3376
  <div class="bw-content">
3203
3377
  <div class="tab-panel" ?active=${this._activeTab === "chat"} role="tabpanel">
3204
3378
  ${this._renderChatTab()}
@@ -3209,29 +3383,27 @@ var _t = "bw-stt-lang-v1", vt = 200, yt = .015, bt = 1200, xt = 2e4, St = 350, Q
3209
3383
  ${this._renderAdminOverlay()}
3210
3384
  </div>
3211
3385
 
3212
- <!-- Footer -->
3213
3386
  <div class="bw-footer" @click=${this._handleLogoClick}>
3214
3387
  <div class="footer-brand">
3215
- ${J.accessibility} BariWeb
3388
+ ${Y.accessibility} BariWeb
3216
3389
  </div>
3217
- <span>${e.madeIn}</span>
3390
+ <span>${e("madeInKazakhstan")}</span>
3218
3391
  </div>
3219
3392
  </div>
3220
3393
 
3221
- <!-- FAB Trigger -->
3222
3394
  <button class="trigger" @click=${this._toggle}
3223
- aria-expanded=${this._isOpen} aria-label="Открыть/Закрыть меню доступности"
3224
- id="bw-trigger" style="position:fixed; bottom:24px; left:24px; width:60px; height:60px; border-radius:50%; background:var(--bw-primary, #6d28d9); color:var(--bw-primary-fg, #05050a); border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; pointer-events:auto; box-shadow:0 4px 20px rgba(0,0,0,0.3); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s;">
3225
- ${this._isOpen ? J.close : J.accessibility}
3395
+ aria-expanded=${this._isOpen} aria-label=${e("triggerAria")}
3396
+ id="bw-trigger" style="position:fixed; bottom:24px; left:24px; width:60px; height:60px; border-radius:50%; background:var(--bw-primary,#6d28d9); color:var(--bw-primary-fg, #05050a); border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; pointer-events:auto; box-shadow:0 4px 20px rgba(0,0,0,0.3); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s;">
3397
+ ${this._isOpen ? Y.close : Y.accessibility}
3226
3398
  </button>
3227
3399
  </div>
3228
3400
  `;
3229
3401
  }
3230
3402
  };
3231
- Z([$e({
3403
+ Q([Qe({
3232
3404
  type: String,
3233
3405
  attribute: "client-id"
3234
- })], $.prototype, "clientId", void 0), Z([G()], $.prototype, "_isOpen", void 0), Z([G()], $.prototype, "_activeTab", void 0), Z([G()], $.prototype, "_inputValue", void 0), Z([G()], $.prototype, "_isAdmin", void 0), Z([G()], $.prototype, "_adminPassword", void 0), Z([G()], $.prototype, "_authError", void 0), Z([G()], $.prototype, "_currentScreenLabel", void 0), Z([G()], $.prototype, "_sttState", void 0), Z([G()], $.prototype, "_sttLanguageMode", void 0), Z([G()], $.prototype, "_sttError", void 0), Z([G()], $.prototype, "_adminClickCount", void 0), Z([G()], $.prototype, "_showAdminLogin", void 0), Z([tt(".chat-messages")], $.prototype, "_messagesEl", void 0), $ = Z([Xe("bw-widget")], $);
3406
+ })], $.prototype, "clientId", void 0), Q([K()], $.prototype, "_isOpen", void 0), Q([K()], $.prototype, "_activeTab", void 0), Q([K()], $.prototype, "_inputValue", void 0), Q([K()], $.prototype, "_isAdmin", void 0), Q([K()], $.prototype, "_adminPassword", void 0), Q([K()], $.prototype, "_authError", void 0), Q([K()], $.prototype, "_currentScreenLabel", void 0), Q([K()], $.prototype, "_sttState", void 0), Q([K()], $.prototype, "_sttLanguageMode", void 0), Q([K()], $.prototype, "_sttError", void 0), Q([K()], $.prototype, "_adminClickCount", void 0), Q([K()], $.prototype, "_showAdminLogin", void 0), Q([et(".chat-messages")], $.prototype, "_messagesEl", void 0), $ = Q([Ye("bw-widget")], $);
3235
3407
  //#endregion
3236
3408
  //#region src/index.ts
3237
3409
  var Ct = () => {