@templatical/editor 0.60.4 → 0.61.0

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 (102) hide show
  1. package/dist/{AiChatPanel-CjUnhJGB.js → AiChatPanel-DF5TvO9H.js} +166 -166
  2. package/dist/{AiPanels-DwI9KjjI.js → AiPanels-zRqC5DIP.js} +1 -1
  3. package/dist/{AiRewriteMenu-Bh1cIX8F.js → AiRewriteMenu-CmZKTO-O.js} +1 -1
  4. package/dist/{BlockPreviewCanvas-C_N6f_FS.js → BlockPreviewCanvas-knSyWaCP.js} +2 -2
  5. package/dist/{CloudPanels-BS49EsuN.js → CloudPanels-BbHJHZri.js} +1 -1
  6. package/dist/{CommentsPanel-BSLk23YP.js → CommentsPanel-BMYvXRKK.js} +1 -1
  7. package/dist/{CommentsSidebar-L-DgP_kM.js → CommentsSidebar-_8at1Rug.js} +139 -139
  8. package/dist/{CountdownToolbar-B6erqTbz.js → CountdownToolbar-BprSuPJk.js} +2 -2
  9. package/dist/{LanguageMenu-DsfCHdVi.js → LanguageMenu-CkGqLYjf.js} +122 -122
  10. package/dist/{LocaleNotices-BxR3xcLl.js → LocaleNotices-D0be8ovO.js} +8 -8
  11. package/dist/{MergeTagTextarea-q6eeDD2l.js → MergeTagTextarea-BjHlamJv.js} +12 -12
  12. package/dist/{ParagraphEditor-25SNi_8O.js → ParagraphEditor-Ctu4fSsl.js} +2 -2
  13. package/dist/{RestoreVersionDialog-BXtCxJF1.js → RestoreVersionDialog-DvZoTJVa.js} +1 -1
  14. package/dist/{SaveBlockDialog-k1lxEBVW.js → SaveBlockDialog-DHfT-Tpx.js} +3 -3
  15. package/dist/{SavedBlocksBrowserModal-CV-8mDPj.js → SavedBlocksBrowserModal-BjJuuXQv.js} +3 -3
  16. package/dist/{SavedBlocksPanels-9nZj1jG_.js → SavedBlocksPanels-D6eiMQZ3.js} +1 -1
  17. package/dist/{SavedBlocksPickBar-Dy6NN9tm.js → SavedBlocksPickBar-BkgCDSXe.js} +1 -1
  18. package/dist/{TemplateSettings-DWxdUdM5.js → TemplateSettings-DQAbNsiS.js} +1 -1
  19. package/dist/{TestEmailModal-BAkkZTaZ.js → TestEmailModal-m_AEa36T.js} +3 -3
  20. package/dist/{TestEmailPanel-ccT2E3em.js → TestEmailPanel-OApkuaVd.js} +1 -1
  21. package/dist/{TitleEditor-B19dYnER.js → TitleEditor-Cwdtfk15.js} +1 -1
  22. package/dist/{Toolbar-DxlZq_36.js → Toolbar-D_T55elL.js} +359 -359
  23. package/dist/{TplModal-Bp2qPmQw.js → TplModal-2MKm5y6r.js} +1 -1
  24. package/dist/{VersionHistoryPanels-wAVDmhnP.js → VersionHistoryPanels-CCM0IQBg.js} +1 -1
  25. package/dist/{WrapperBlock-DHnD6Exl.js → WrapperBlock-BZl10HLy.js} +1 -1
  26. package/dist/bundle-stats.json +6 -6
  27. package/dist/cdn/chunks/{AiChatPanel-DTYmFRwb.js → AiChatPanel-BYAsgmoC.js} +146 -146
  28. package/dist/cdn/chunks/AiChatPanel-BYAsgmoC.js.map +1 -0
  29. package/dist/cdn/chunks/{AiPanels-BW9ze-6O.js → AiPanels-MY_YPls8.js} +2 -2
  30. package/dist/cdn/chunks/{AiPanels-BW9ze-6O.js.map → AiPanels-MY_YPls8.js.map} +1 -1
  31. package/dist/cdn/chunks/{AiRewriteMenu-B9b92d0R.js → AiRewriteMenu-BSePiXe_.js} +2 -2
  32. package/dist/cdn/chunks/{AiRewriteMenu-B9b92d0R.js.map → AiRewriteMenu-BSePiXe_.js.map} +1 -1
  33. package/dist/cdn/chunks/{BlockPreviewCanvas-CLid1x0c.js → BlockPreviewCanvas-B153A3hu.js} +3 -3
  34. package/dist/cdn/chunks/{BlockPreviewCanvas-CLid1x0c.js.map → BlockPreviewCanvas-B153A3hu.js.map} +1 -1
  35. package/dist/cdn/chunks/{CloudPanels-D4dslsyk.js → CloudPanels-Bv26_Sd8.js} +2 -2
  36. package/dist/cdn/chunks/{CloudPanels-D4dslsyk.js.map → CloudPanels-Bv26_Sd8.js.map} +1 -1
  37. package/dist/cdn/chunks/{CommentsPanel-BynxXJ-F.js → CommentsPanel-R27fqh9O.js} +2 -2
  38. package/dist/cdn/chunks/{CommentsPanel-BynxXJ-F.js.map → CommentsPanel-R27fqh9O.js.map} +1 -1
  39. package/dist/cdn/chunks/{CommentsSidebar-C81N5Hwr.js → CommentsSidebar-BEiOQ_zT.js} +133 -133
  40. package/dist/cdn/chunks/CommentsSidebar-BEiOQ_zT.js.map +1 -0
  41. package/dist/cdn/chunks/{CountdownToolbar-f1aqEba0.js → CountdownToolbar-DOhXnbsq.js} +3 -3
  42. package/dist/cdn/chunks/{CountdownToolbar-f1aqEba0.js.map → CountdownToolbar-DOhXnbsq.js.map} +1 -1
  43. package/dist/cdn/chunks/{LanguageMenu-CJp7XdfG.js → LanguageMenu-B6kt8SgX.js} +104 -104
  44. package/dist/cdn/chunks/LanguageMenu-B6kt8SgX.js.map +1 -0
  45. package/dist/cdn/chunks/{LocaleNotices-D5vZzcUj.js → LocaleNotices-Bleg4gTu.js} +9 -9
  46. package/dist/cdn/chunks/LocaleNotices-Bleg4gTu.js.map +1 -0
  47. package/dist/cdn/chunks/{MergeTagTextarea-DMXZgGUF.js → MergeTagTextarea-DGDv-pdn.js} +13 -13
  48. package/dist/cdn/chunks/MergeTagTextarea-DGDv-pdn.js.map +1 -0
  49. package/dist/cdn/chunks/{ParagraphEditor-Ce7_Ix0K.js → ParagraphEditor-D0q36Myd.js} +3 -3
  50. package/dist/cdn/chunks/{ParagraphEditor-Ce7_Ix0K.js.map → ParagraphEditor-D0q36Myd.js.map} +1 -1
  51. package/dist/cdn/chunks/{RestoreVersionDialog-JmMLhN6G.js → RestoreVersionDialog-CJggFdbi.js} +2 -2
  52. package/dist/cdn/chunks/{RestoreVersionDialog-JmMLhN6G.js.map → RestoreVersionDialog-CJggFdbi.js.map} +1 -1
  53. package/dist/cdn/chunks/{SaveBlockDialog-B-2amBN5.js → SaveBlockDialog-BzES5tqd.js} +4 -4
  54. package/dist/cdn/chunks/{SaveBlockDialog-B-2amBN5.js.map → SaveBlockDialog-BzES5tqd.js.map} +1 -1
  55. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BR6fQ222.js → SavedBlocksBrowserModal-CLNcZcLd.js} +4 -4
  56. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BR6fQ222.js.map → SavedBlocksBrowserModal-CLNcZcLd.js.map} +1 -1
  57. package/dist/cdn/chunks/{SavedBlocksPanels-DVNNshfr.js → SavedBlocksPanels-R0W9LElD.js} +2 -2
  58. package/dist/cdn/chunks/{SavedBlocksPanels-DVNNshfr.js.map → SavedBlocksPanels-R0W9LElD.js.map} +1 -1
  59. package/dist/cdn/chunks/{SavedBlocksPickBar-BfxLHLQV.js → SavedBlocksPickBar-JNi5Rx4V.js} +2 -2
  60. package/dist/cdn/chunks/{SavedBlocksPickBar-BfxLHLQV.js.map → SavedBlocksPickBar-JNi5Rx4V.js.map} +1 -1
  61. package/dist/cdn/chunks/{TemplateSettings-TMFrRV2c.js → TemplateSettings-C5wsNcgX.js} +2 -2
  62. package/dist/cdn/chunks/{TemplateSettings-TMFrRV2c.js.map → TemplateSettings-C5wsNcgX.js.map} +1 -1
  63. package/dist/cdn/chunks/{TestEmailModal-tTU35BKZ.js → TestEmailModal-BxIAwjww.js} +4 -4
  64. package/dist/cdn/chunks/{TestEmailModal-tTU35BKZ.js.map → TestEmailModal-BxIAwjww.js.map} +1 -1
  65. package/dist/cdn/chunks/{TestEmailPanel-BNJBVwx0.js → TestEmailPanel-B8BsWXjE.js} +2 -2
  66. package/dist/cdn/chunks/{TestEmailPanel-BNJBVwx0.js.map → TestEmailPanel-B8BsWXjE.js.map} +1 -1
  67. package/dist/cdn/chunks/{TitleEditor-BbscL_C1.js → TitleEditor-DhcI1aRS.js} +2 -2
  68. package/dist/cdn/chunks/{TitleEditor-BbscL_C1.js.map → TitleEditor-DhcI1aRS.js.map} +1 -1
  69. package/dist/cdn/chunks/{Toolbar-BxzyS69X.js → Toolbar-Ch3h2BUs.js} +194 -194
  70. package/dist/cdn/chunks/Toolbar-Ch3h2BUs.js.map +1 -0
  71. package/dist/cdn/chunks/{TplModal-Bzhc_l8y.js → TplModal-CPOqOxVf.js} +2 -2
  72. package/dist/cdn/chunks/{TplModal-Bzhc_l8y.js.map → TplModal-CPOqOxVf.js.map} +1 -1
  73. package/dist/cdn/chunks/{VersionHistoryPanels-Bbb1xUJs.js → VersionHistoryPanels-CVrXHYxT.js} +2 -2
  74. package/dist/cdn/chunks/{VersionHistoryPanels-Bbb1xUJs.js.map → VersionHistoryPanels-CVrXHYxT.js.map} +1 -1
  75. package/dist/cdn/chunks/{WrapperBlock-BboijK5T.js → WrapperBlock-B8SJ7Q4w.js} +2 -2
  76. package/dist/cdn/chunks/{WrapperBlock-BboijK5T.js.map → WrapperBlock-B8SJ7Q4w.js.map} +1 -1
  77. package/dist/cdn/chunks/{composables-C77dGo-I.js → composables-CKXPwWo9.js} +148 -148
  78. package/dist/cdn/chunks/composables-CKXPwWo9.js.map +1 -0
  79. package/dist/cdn/chunks/keys-ywH4jHJ2.js.map +1 -1
  80. package/dist/cdn/chunks/{src-1MSPRtI8.js → src-Bk1LF1np.js} +2 -2
  81. package/dist/cdn/chunks/{src-1MSPRtI8.js.map → src-Bk1LF1np.js.map} +1 -1
  82. package/dist/cdn/chunks/useLanguageName-DDhdVpqh.js +41 -0
  83. package/dist/cdn/chunks/useLanguageName-DDhdVpqh.js.map +1 -0
  84. package/dist/cdn/editor.css +1 -1
  85. package/dist/cdn/editor.js +58 -56
  86. package/dist/cdn/editor.js.map +1 -1
  87. package/dist/{composables-Bu_OmyjT.js → composables-26aR45W3.js} +1222 -1222
  88. package/dist/index.d.ts +5 -1
  89. package/dist/style.css +1 -1
  90. package/dist/templatical-editor.js +57 -55
  91. package/dist/useLanguageName-CEFzafHB.js +39 -0
  92. package/package.json +8 -8
  93. package/dist/cdn/chunks/AiChatPanel-DTYmFRwb.js.map +0 -1
  94. package/dist/cdn/chunks/CommentsSidebar-C81N5Hwr.js.map +0 -1
  95. package/dist/cdn/chunks/LanguageMenu-CJp7XdfG.js.map +0 -1
  96. package/dist/cdn/chunks/LocaleNotices-D5vZzcUj.js.map +0 -1
  97. package/dist/cdn/chunks/MergeTagTextarea-DMXZgGUF.js.map +0 -1
  98. package/dist/cdn/chunks/Toolbar-BxzyS69X.js.map +0 -1
  99. package/dist/cdn/chunks/composables-C77dGo-I.js.map +0 -1
  100. package/dist/cdn/chunks/languageName-DEEOhDWI.js +0 -12
  101. package/dist/cdn/chunks/languageName-DEEOhDWI.js.map +0 -1
  102. package/dist/languageName-DEEOhDWI.js +0 -10
@@ -5,7 +5,7 @@ import { t as G } from "./useI18n-DPg6rPbu.js";
5
5
  import "./useCloudI18n-BTV9uu3c.js";
6
6
  import { t as K } from "./useMergeTag-Dwy3U0PI.js";
7
7
  import { _ as ne, h as q, v as J, y as re } from "./dist-BtWMy7UQ.js";
8
- import { $ as ie, A as ae, An as Y, B as X, C as Z, D as Q, Dn as oe, E as se, En as ce, G as le, Gt as ue, H as de, I as fe, K as pe, Kt as me, L as he, Lt as ge, M as _e, Mn as ve, Mt as ye, N as be, O as xe, On as Se, P as Ce, Q as we, R as Te, Rt as Ee, S as De, T as Oe, Vt as ke, W as Ae, X as je, Y as Me, Yt as Ne, Z as Pe, a as Fe, at as Ie, b as Le, bn as Re, ct as ze, d as Be, et as Ve, ft as He, gt as Ue, hn as We, ht as Ge, i as Ke, it as qe, j as Je, jn as Ye, kn as Xe, ln as Ze, lt as Qe, mn as $e, mt as et, nt as tt, ot as nt, p as rt, q as it, rt as at, t as ot, tt as st, u as ct, ut as lt, w as ut, x as dt, xn as ft, y as pt, yt as mt, zt as ht } from "./src-A0kzK-pR.js";
8
+ import { $ as ie, A as ae, An as oe, B as Y, C as X, D as Z, Dn as se, E as ce, En as le, G as ue, Gt as Q, H as de, I as fe, K as pe, Kt as me, L as he, Lt as ge, M as _e, Mn as ve, Mt as ye, N as be, O as xe, On as Se, P as Ce, Q as we, R as Te, Rt as Ee, S as De, T as Oe, Vt as ke, W as Ae, X as je, Y as Me, Yt as Ne, Z as Pe, a as Fe, at as Ie, b as Le, bn as Re, ct as ze, d as Be, et as Ve, ft as He, gt as Ue, hn as We, ht as Ge, i as Ke, it as qe, j as Je, jn as Ye, kn as Xe, ln as Ze, lt as Qe, mn as $e, mt as et, nt as tt, ot as nt, p as rt, q as it, rt as at, t as ot, tt as st, u as ct, ut as lt, w as ut, x as dt, xn as ft, y as pt, yt as mt, zt as ht } from "./src-A0kzK-pR.js";
9
9
  import { t as $ } from "./logger-CqQTfJGx.js";
10
10
  import { a as gt, c as _t, i as vt, n as yt, o as bt, t as xt } from "./usePopoverPosition-CBp9uwjV.js";
11
11
  import { n as St } from "./useLocalizedDisplay-Brdkp3KH.js";
@@ -16,7 +16,7 @@ import { r as Jn, t as Yn } from "./templateSettingsFields-cjlP-jdw.js";
16
16
  import { r as Xn, t as Zn } from "./sanitizeHtml-Plkmw1Qt.js";
17
17
  import { At as Qn, G as $n, Mt as er, Nt as tr, Ot as nr, St as rr, Ut as ir, V as ar, Wt as or, X as sr, _t as cr, d as lr, f as ur, k as dr, mt as fr, nt as pr, o as mr, y as hr, yt as gr } from "./icons-DdVB-5WO.js";
18
18
  import { t as _r } from "./LoadingTrack-o-89hApJ.js";
19
- import { t as vr } from "./languageName-DEEOhDWI.js";
19
+ import { t as vr } from "./useLanguageName-DDhdVpqh.js";
20
20
  import { t as yr } from "./plural-CyxrJXL1.js";
21
21
  import { m as br, w as xr, x as Sr } from "./styleConstants-Br6CIRoS.js";
22
22
  import { t as Cr } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
@@ -279,7 +279,7 @@ function Fr(e, t, n) {
279
279
  type: "logicMergeTagNode",
280
280
  attrs: {
281
281
  value: e,
282
- keyword: le(e, n)
282
+ keyword: ue(e, n)
283
283
  }
284
284
  } : {
285
285
  type: "mergeTagNode",
@@ -832,7 +832,7 @@ var ai = [
832
832
  },
833
833
  {
834
834
  type: "paragraph",
835
- createBlock: Q
835
+ createBlock: Z
836
836
  },
837
837
  {
838
838
  type: "image",
@@ -844,7 +844,7 @@ var ai = [
844
844
  },
845
845
  {
846
846
  type: "divider",
847
- createBlock: Z
847
+ createBlock: X
848
848
  },
849
849
  {
850
850
  type: "video",
@@ -856,7 +856,7 @@ var ai = [
856
856
  },
857
857
  {
858
858
  type: "menu",
859
- createBlock: se
859
+ createBlock: ce
860
860
  },
861
861
  {
862
862
  type: "table",
@@ -1143,7 +1143,7 @@ function zi(e, t) {
1143
1143
  if (t === null) return {};
1144
1144
  let n = me(e);
1145
1145
  if (n === null) return {};
1146
- let r = t?.trim(), i = r ? ue(r) : n.url;
1146
+ let r = t?.trim(), i = r ? Q(r) : n.url;
1147
1147
  return {
1148
1148
  backgroundImage: `url("${i}")`,
1149
1149
  backgroundSize: n.size,
@@ -1179,7 +1179,7 @@ function Wi(e, t = {}) {
1179
1179
  padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
1180
1180
  backgroundColor: r || "transparent"
1181
1181
  };
1182
- if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? oe.paragraphGap : oe.paragraphGap}px`), e.type === "section") {
1182
+ if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? se.paragraphGap : se.paragraphGap}px`), e.type === "section") {
1183
1183
  let n = ve(e.borderRadius);
1184
1184
  n !== null && (i.borderRadius = n);
1185
1185
  let r = ke(e);
@@ -1255,7 +1255,7 @@ function Qi(e, t, n, r = !1) {
1255
1255
  });
1256
1256
  } else Pe(s, n) ? i.push({
1257
1257
  type: "tag",
1258
- value: le(s, n)
1258
+ value: ue(s, n)
1259
1259
  }) : i.push({
1260
1260
  type: "text",
1261
1261
  value: s
@@ -1514,7 +1514,7 @@ var $i = o({
1514
1514
  blocked: o,
1515
1515
  apply: s
1516
1516
  }), h = I(() => ({ textAlign: n.block.align })), g = I(() => {
1517
- let e = n.block.border, t = ["left", "right"].map((t) => Y(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
1517
+ let e = n.block.border, t = ["left", "right"].map((t) => oe(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
1518
1518
  return t > 0 ? `calc(100% - ${t}px)` : "100%";
1519
1519
  }), _ = I(() => {
1520
1520
  let e = n.block.align;
@@ -1671,7 +1671,7 @@ var za = ["innerHTML"], Ba = /* @__PURE__ */ o({
1671
1671
  viewport: {}
1672
1672
  },
1673
1673
  setup(e) {
1674
- let t = e, n = b(() => import("./ParagraphEditor-Ce7_Ix0K.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: l } = Ra(() => t.block.content);
1674
+ let t = e, n = b(() => import("./ParagraphEditor-D0q36Myd.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: l } = Ra(() => t.block.content);
1675
1675
  return (t, u) => (c(), w("div", {
1676
1676
  ref_key: "blockRef",
1677
1677
  ref: i,
@@ -1799,228 +1799,228 @@ var Wa = [
1799
1799
  },
1800
1800
  emits: ["target"],
1801
1801
  setup(e, { emit: t }) {
1802
- let n = e, r = t, i = g(Sn, null), o = g(pn, null), s = g(Dt, null), l = g(yn, "en") ?? "en", { t: d, format: f } = G(), m = te(), h = yt(), { toLocal: v } = xt(), y = H(null), b = H(null), x = H(!1), S = H(!1), C = H(null), T = H(null), F = null, R = H({
1802
+ let n = e, r = t, i = g(Sn, null), o = vr(i), s = g(pn, null), l = g(Dt, null), d = g(yn, "en") ?? "en", { t: f, format: m } = G(), h = te(), v = yt(), { toLocal: y } = xt(), b = H(null), x = H(null), S = H(!1), C = H(!1), T = H(null), F = H(null), R = null, z = H({
1803
1803
  top: 0,
1804
1804
  left: 0
1805
- }), z = H({
1805
+ }), B = H({
1806
1806
  maxHeight: 0,
1807
1807
  maxWidth: 0
1808
- }), B = `tpl-locale-popover-${fe()}`, V = I(() => vr(i?.activeLocale?.value ?? "")), W = I(() => vr(i?.content.value.settings.locale ?? "en"));
1809
- function K(e, t) {
1808
+ }), V = `tpl-locale-popover-${fe()}`, W = I(() => o(i?.activeLocale?.value ?? "")), K = I(() => o(i?.content.value.settings.locale ?? "en"));
1809
+ function ne(e, t) {
1810
1810
  switch (e) {
1811
- case "tags-differ": return d.localization.tagsDiffer;
1812
- case "hidden": return f(d.localization.hidden, { language: V.value });
1813
- case "changed": return f(d.localization.changed, { language: V.value });
1814
- case "default-stale": return yr(d.localization.staleLanguages, t, l);
1815
- case "missing": return t === 1 ? d.localization.notTranslated : yr(d.localization.notTranslatedCount, t, l);
1816
- default: return t === 1 ? d.localization.outOfDate : yr(d.localization.staleCount, t, l);
1811
+ case "tags-differ": return f.localization.tagsDiffer;
1812
+ case "hidden": return m(f.localization.hidden, { language: W.value });
1813
+ case "changed": return m(f.localization.changed, { language: W.value });
1814
+ case "default-stale": return yr(f.localization.staleLanguages, t, d);
1815
+ case "missing": return t === 1 ? f.localization.notTranslated : yr(f.localization.notTranslatedCount, t, d);
1816
+ default: return t === 1 ? f.localization.outOfDate : yr(f.localization.staleCount, t, d);
1817
1817
  }
1818
1818
  }
1819
- let ne = I(() => K(n.state, n.count)), q = I(() => n.popoverState ?? n.state), J = I(() => n.popoverCount ?? n.count), re = I(() => K(q.value, J.value)), ie = I(() => n.state === "hidden" ? nr : n.state === "changed" ? $n : n.state === "default-stale" ? fr : n.state === "stale" ? tr : lr), ae = I(() => q.value === "default-stale" || (q.value === "missing" || q.value === "stale") && J.value > 1), Y = I(() => n.editable && n.eligibleGaps && o?.isAvailable.value);
1819
+ let q = I(() => ne(n.state, n.count)), J = I(() => n.popoverState ?? n.state), re = I(() => n.popoverCount ?? n.count), ie = I(() => ne(J.value, re.value)), ae = I(() => n.state === "hidden" ? nr : n.state === "changed" ? $n : n.state === "default-stale" ? fr : n.state === "stale" ? tr : lr), oe = I(() => J.value === "default-stale" || (J.value === "missing" || J.value === "stale") && re.value > 1), Y = I(() => n.editable && n.eligibleGaps && s?.isAvailable.value);
1820
1820
  function X(e = !1) {
1821
- x.value = !1, S.value = !1, F = null, e && y.value?.focus({ preventScroll: !0 });
1821
+ S.value = !1, C.value = !1, R = null, e && b.value?.focus({ preventScroll: !0 });
1822
1822
  }
1823
1823
  async function Z() {
1824
- if (x.value) return X();
1825
- h.value && (x.value = !0, await Q());
1824
+ if (S.value) return X();
1825
+ v.value && (S.value = !0, await se());
1826
1826
  }
1827
- async function Q() {
1828
- let e = h.value;
1829
- if (!e || !x.value) return;
1827
+ async function se() {
1828
+ let e = v.value;
1829
+ if (!e || !S.value) return;
1830
1830
  let t = e.ownerDocument.defaultView, n = t?.visualViewport, r = n?.offsetTop ?? 0, i = n?.offsetLeft ?? 0, a = r + (n?.height ?? t?.innerHeight ?? 0), o = i + (n?.width ?? t?.innerWidth ?? 0), s = e.parentElement?.getBoundingClientRect(), c = Math.max(r, s?.height ? s.top : r) + 8, l = Math.max(i, s?.width ? s.left : i) + 8, u = Math.max(c, Math.min(a, s?.height ? s.bottom : a) - 8), d = Math.max(l, Math.min(o, s?.width ? s.right : o) - 8);
1831
- z.value = {
1831
+ B.value = {
1832
1832
  maxHeight: u - c,
1833
1833
  maxWidth: d - l
1834
1834
  };
1835
- let f = y.value.getBoundingClientRect();
1836
- if (F = f, R.value = v({
1835
+ let f = b.value.getBoundingClientRect();
1836
+ if (R = f, z.value = y({
1837
1837
  top: c,
1838
1838
  left: l
1839
- }), await j(), !x.value || !b.value) return;
1840
- let p = b.value.getBoundingClientRect(), m = Math.min(p.height, z.value.maxHeight), g = Math.min(p.width, z.value.maxWidth), _ = f.bottom + 4, C = _ + m <= u ? _ : f.top - m - 4;
1841
- R.value = v({
1842
- top: Math.max(c, Math.min(C, u - m)),
1843
- left: Math.max(l, Math.min(f.left, d - g))
1844
- }), await j(), x.value && (S.value ? T.value : b.value)?.focus({ preventScroll: !0 });
1845
- }
1846
- u(S, async () => {
1847
- x.value && (await Q(), x.value && !S.value && C.value?.focus({ preventScroll: !0 }));
1839
+ }), await j(), !S.value || !x.value) return;
1840
+ let p = x.value.getBoundingClientRect(), m = Math.min(p.height, B.value.maxHeight), h = Math.min(p.width, B.value.maxWidth), g = f.bottom + 4, _ = g + m <= u ? g : f.top - m - 4;
1841
+ z.value = y({
1842
+ top: Math.max(c, Math.min(_, u - m)),
1843
+ left: Math.max(l, Math.min(f.left, d - h))
1844
+ }), await j(), S.value && (C.value ? F.value : x.value)?.focus({ preventScroll: !0 });
1845
+ }
1846
+ u(C, async () => {
1847
+ S.value && (await se(), S.value && !C.value && T.value?.focus({ preventScroll: !0 }));
1848
1848
  });
1849
- function oe(e) {
1849
+ function ce(e) {
1850
1850
  let t = e.composedPath();
1851
- !t.includes(y.value) && !t.includes(b.value) && X();
1851
+ !t.includes(b.value) && !t.includes(x.value) && X();
1852
1852
  }
1853
- function se(e) {
1854
- if (e.composedPath().includes(b.value)) return;
1855
- let t = y.value?.getBoundingClientRect();
1856
- t && F && t.top === F.top && t.right === F.right || X();
1853
+ function le(e) {
1854
+ if (e.composedPath().includes(x.value)) return;
1855
+ let t = b.value?.getBoundingClientRect();
1856
+ t && R && t.top === R.top && t.right === R.right || X();
1857
1857
  }
1858
- function ce() {
1859
- m.removeEventListener("click", oe, !0), m.removeEventListener("scroll", se, !0);
1858
+ function ue() {
1859
+ h.removeEventListener("click", ce, !0), h.removeEventListener("scroll", le, !0);
1860
1860
  }
1861
- u(x, (e) => {
1862
- ce(), e ? (m.addEventListener("click", oe, !0), m.addEventListener("scroll", se, !0)) : r("target", null);
1863
- }, { flush: "sync" }), u(q, () => {
1864
- S.value = !1, x.value && Q();
1861
+ u(S, (e) => {
1862
+ ue(), e ? (h.addEventListener("click", ce, !0), h.addEventListener("scroll", le, !0)) : r("target", null);
1863
+ }, { flush: "sync" }), u(J, () => {
1864
+ C.value = !1, S.value && se();
1865
1865
  }), u([
1866
1866
  () => n.blockId,
1867
1867
  () => n.state,
1868
1868
  () => i?.activeLocale?.value,
1869
1869
  () => i?.state.template?.id,
1870
1870
  () => i?.loadVersion?.value
1871
- ], () => X()), _(ce);
1872
- let le = (e) => {
1873
- (x.value || h.value) && (r("target", e ?? null), x.value || Z());
1871
+ ], () => X()), _(ue);
1872
+ let Q = (e) => {
1873
+ (S.value || v.value) && (r("target", e ?? null), S.value || Z());
1874
1874
  };
1875
1875
  u(() => n.blockId, (e, t) => {
1876
- t && s?.get(t) === le && s.delete(t), s?.set(e, le);
1876
+ t && l?.get(t) === Q && l.delete(t), l?.set(e, Q);
1877
1877
  }, { immediate: !0 }), _(() => {
1878
- s?.get(n.blockId) === le && s.delete(n.blockId);
1878
+ l?.get(n.blockId) === Q && l.delete(n.blockId);
1879
1879
  });
1880
- function ue() {
1880
+ function de() {
1881
1881
  i?.keepTranslations?.(n.blockId, n.stale), X(!0);
1882
1882
  }
1883
- function de(e) {
1883
+ function pe(e) {
1884
1884
  i?.resetLocaleFields?.(n.blockId, e), X(!0);
1885
1885
  }
1886
- function pe() {
1886
+ function me() {
1887
1887
  i?.setBlockHidden?.(n.blockId, !1), X(!0);
1888
1888
  }
1889
- function me(e) {
1889
+ function he(e) {
1890
1890
  i?.setActiveLocale?.(e), X();
1891
1891
  }
1892
- function he() {
1893
- Y.value && !o?.running.value && (q.value === "tags-differ" && n.replacesCurrent ? S.value = !0 : o?.translate({
1894
- only: q.value === "tags-differ" ? "all" : "gaps",
1892
+ function ge() {
1893
+ Y.value && !s?.running.value && (J.value === "tags-differ" && n.replacesCurrent ? C.value = !0 : s?.translate({
1894
+ only: J.value === "tags-differ" ? "all" : "gaps",
1895
1895
  blockId: n.blockId
1896
1896
  }));
1897
1897
  }
1898
- function ge() {
1899
- S.value = !1;
1900
- }
1901
1898
  function _e() {
1902
- S.value ? ge() : X(!0);
1899
+ C.value = !1;
1903
1900
  }
1904
1901
  function ve() {
1905
- Y.value && !o?.running.value && n.translationCount && (S.value = !1, o?.translate({
1902
+ C.value ? _e() : X(!0);
1903
+ }
1904
+ function ye() {
1905
+ Y.value && !s?.running.value && n.translationCount && (C.value = !1, s?.translate({
1906
1906
  only: "all",
1907
1907
  blockId: n.blockId
1908
1908
  }));
1909
1909
  }
1910
1910
  return (t, n) => (c(), w(U, null, [N("button", {
1911
1911
  ref_key: "trigger",
1912
- ref: y,
1912
+ ref: b,
1913
1913
  type: "button",
1914
1914
  "data-testid": "locale-chip",
1915
1915
  "data-state": e.state,
1916
- "aria-label": ne.value,
1917
- title: ne.value,
1918
- "aria-expanded": x.value,
1919
- "aria-controls": x.value ? B : void 0,
1916
+ "aria-label": q.value,
1917
+ title: q.value,
1918
+ "aria-expanded": S.value,
1919
+ "aria-controls": S.value ? V : void 0,
1920
1920
  "aria-haspopup": "dialog",
1921
1921
  class: "tpl-locale-chip tpl:flex tpl:size-5 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:p-0 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:shadow-[var(--tpl-shadow-sm)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:hover:focus-visible:shadow-[var(--tpl-ring),var(--tpl-shadow-sm)]",
1922
1922
  onClick: M(Z, ["stop"]),
1923
- onKeydown: [E(M(Z, ["stop", "prevent"]), ["enter"]), E(M(_e, ["stop", "prevent"]), ["esc"])]
1924
- }, [(c(), A(a(ie.value), {
1923
+ onKeydown: [E(M(Z, ["stop", "prevent"]), ["enter"]), E(M(ve, ["stop", "prevent"]), ["esc"])]
1924
+ }, [(c(), A(a(ae.value), {
1925
1925
  size: 12,
1926
1926
  "stroke-width": 2,
1927
1927
  "aria-hidden": "true"
1928
- }))], 40, Wa), D(h) && x.value ? (c(), A(ee, {
1928
+ }))], 40, Wa), D(v) && S.value ? (c(), A(ee, {
1929
1929
  key: 0,
1930
- to: D(h)
1930
+ to: D(v)
1931
1931
  }, [N("div", {
1932
- id: B,
1932
+ id: V,
1933
1933
  ref_key: "popover",
1934
- ref: b,
1934
+ ref: x,
1935
1935
  role: "dialog",
1936
- "aria-label": S.value ? void 0 : re.value,
1937
- "aria-labelledby": S.value ? `${B}-question` : void 0,
1938
- "aria-describedby": S.value ? `${B}-warning` : void 0,
1936
+ "aria-label": C.value ? void 0 : ie.value,
1937
+ "aria-labelledby": C.value ? `${V}-question` : void 0,
1938
+ "aria-describedby": C.value ? `${V}-warning` : void 0,
1939
1939
  tabindex: "-1",
1940
1940
  "data-testid": "locale-popover",
1941
1941
  class: "tpl-locale-popover tpl:absolute tpl:z-[10000] tpl:w-[300px] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-sm tpl:text-[var(--tpl-chrome-text)] tpl:shadow-[var(--tpl-shadow-md)] tpl:outline-none",
1942
1942
  style: L({
1943
- top: `${R.value.top}px`,
1944
- left: `${R.value.left}px`,
1945
- maxHeight: `${z.value.maxHeight}px`,
1946
- maxWidth: `${z.value.maxWidth}px`
1943
+ top: `${z.value.top}px`,
1944
+ left: `${z.value.left}px`,
1945
+ maxHeight: `${B.value.maxHeight}px`,
1946
+ maxWidth: `${B.value.maxWidth}px`
1947
1947
  }),
1948
1948
  onClick: n[2] ||= M(() => {}, ["stop"]),
1949
- onKeydown: E(M(_e, ["stop", "prevent"]), ["esc"])
1950
- }, [S.value ? (c(), w(U, { key: 0 }, [
1949
+ onKeydown: E(M(ve, ["stop", "prevent"]), ["esc"])
1950
+ }, [C.value ? (c(), w(U, { key: 0 }, [
1951
1951
  N("h3", {
1952
- id: `${B}-question`,
1952
+ id: `${V}-question`,
1953
1953
  class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
1954
- }, P(D(yr)(D(d).localization.translationConfirmation, e.translationCount ?? 0, D(l))), 9, Ka),
1954
+ }, P(D(yr)(D(f).localization.translationConfirmation, e.translationCount ?? 0, D(d))), 9, Ka),
1955
1955
  N("p", {
1956
- id: `${B}-warning`,
1956
+ id: `${V}-warning`,
1957
1957
  class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
1958
- }, P(D(f)(D(d).localization.translationDescription, { language: V.value })), 9, qa),
1958
+ }, P(D(m)(D(f).localization.translationDescription, { language: W.value })), 9, qa),
1959
1959
  N("div", Ja, [N("button", {
1960
1960
  ref_key: "confirmationCancel",
1961
- ref: T,
1961
+ ref: F,
1962
1962
  type: "button",
1963
1963
  "data-testid": "translation-confirm-cancel",
1964
1964
  class: O(D(xr)),
1965
- onClick: ge
1966
- }, P(D(d).localization.cancel), 3), N("button", {
1965
+ onClick: _e
1966
+ }, P(D(f).localization.cancel), 3), N("button", {
1967
1967
  type: "button",
1968
1968
  "data-testid": "translation-confirm",
1969
1969
  class: O(D(Sr)),
1970
- disabled: !Y.value || !!D(o)?.running.value || !e.translationCount,
1971
- onClick: ve
1972
- }, P(D(yr)(D(d).localization.translateAllFields, e.translationCount ?? 0, D(l))), 11, Ya)])
1970
+ disabled: !Y.value || !!D(s)?.running.value || !e.translationCount,
1971
+ onClick: ye
1972
+ }, P(D(yr)(D(f).localization.translateAllFields, e.translationCount ?? 0, D(d))), 11, Ya)])
1973
1973
  ], 64)) : (c(), w(U, { key: 1 }, [
1974
- ae.value ? (c(), w("p", Xa, P(re.value), 1)) : k("", !0),
1975
- q.value === "missing" ? (c(), w("p", Za, P(D(f)(D(d).localization.missingExplanation, { default: W.value })), 1)) : q.value === "stale" ? (c(), w(U, { key: 2 }, [N("p", Qa, P(D(f)(D(d).localization.staleExplanation, { default: W.value })), 1), N("p", $a, P(D(f)(D(d).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : q.value === "tags-differ" ? (c(), w("p", eo, P(D(f)(D(d).localization.tagsDifferExplanation, { default: W.value })), 1)) : q.value === "changed" ? (c(), w("p", to, P(D(yr)(D(d).localization.changedProperties, J.value, D(l), { default: W.value })), 1)) : q.value === "hidden" ? (c(), w("p", no, P(D(f)(D(d).localization.hiddenExplanation, { language: V.value })), 1)) : (c(), w("ul", ro, [(c(!0), w(U, null, p(e.staleLocales, (e) => (c(), w("li", {
1974
+ oe.value ? (c(), w("p", Xa, P(ie.value), 1)) : k("", !0),
1975
+ J.value === "missing" ? (c(), w("p", Za, P(D(m)(D(f).localization.missingExplanation, { default: K.value })), 1)) : J.value === "stale" ? (c(), w(U, { key: 2 }, [N("p", Qa, P(D(m)(D(f).localization.staleExplanation, { default: K.value })), 1), N("p", $a, P(D(m)(D(f).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : J.value === "tags-differ" ? (c(), w("p", eo, P(D(m)(D(f).localization.tagsDifferExplanation, { default: K.value })), 1)) : J.value === "changed" ? (c(), w("p", to, P(D(yr)(D(f).localization.changedProperties, re.value, D(d), { default: K.value })), 1)) : J.value === "hidden" ? (c(), w("p", no, P(D(m)(D(f).localization.hiddenExplanation, { language: W.value })), 1)) : (c(), w("ul", ro, [(c(!0), w(U, null, p(e.staleLocales, (e) => (c(), w("li", {
1976
1976
  key: e,
1977
1977
  class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
1978
- }, [N("span", null, P(D(vr)(e)), 1), N("button", {
1978
+ }, [N("span", null, P(D(o)(e)), 1), N("button", {
1979
1979
  type: "button",
1980
1980
  class: O(D(br)),
1981
- onClick: (t) => me(e)
1982
- }, P(D(d).localization.open), 11, io)]))), 128))])),
1983
- e.editable && q.value !== "default-stale" ? (c(), w("div", ao, [
1984
- Y.value && (q.value === "missing" || q.value === "stale" || q.value === "tags-differ") ? (c(), w("button", {
1981
+ onClick: (t) => he(e)
1982
+ }, P(D(f).localization.open), 11, io)]))), 128))])),
1983
+ e.editable && J.value !== "default-stale" ? (c(), w("div", ao, [
1984
+ Y.value && (J.value === "missing" || J.value === "stale" || J.value === "tags-differ") ? (c(), w("button", {
1985
1985
  key: 0,
1986
1986
  type: "button",
1987
1987
  ref_key: "retranslate",
1988
- ref: C,
1989
- "data-testid": q.value === "missing" ? "locale-translate" : "locale-retranslate",
1988
+ ref: T,
1989
+ "data-testid": J.value === "missing" ? "locale-translate" : "locale-retranslate",
1990
1990
  class: O(D(xr)),
1991
- disabled: !!D(o)?.running.value,
1992
- onClick: he
1993
- }, P(q.value === "missing" ? D(d).localization.translate : D(d).localization.retranslate), 11, oo)) : k("", !0),
1994
- q.value === "stale" || q.value === "tags-differ" ? (c(), w(U, { key: 1 }, [q.value === "stale" ? (c(), w("button", {
1991
+ disabled: !!D(s)?.running.value,
1992
+ onClick: ge
1993
+ }, P(J.value === "missing" ? D(f).localization.translate : D(f).localization.retranslate), 11, oo)) : k("", !0),
1994
+ J.value === "stale" || J.value === "tags-differ" ? (c(), w(U, { key: 1 }, [J.value === "stale" ? (c(), w("button", {
1995
1995
  key: 0,
1996
1996
  type: "button",
1997
1997
  "data-testid": "locale-keep",
1998
1998
  class: O(D(Y.value ? br : xr)),
1999
- onClick: ue
2000
- }, P(D(d).localization.keep), 3)) : k("", !0), N("button", {
1999
+ onClick: de
2000
+ }, P(D(f).localization.keep), 3)) : k("", !0), N("button", {
2001
2001
  type: "button",
2002
2002
  "data-testid": "locale-use-default",
2003
- class: O(D(q.value === "tags-differ" && !Y.value ? xr : br)),
2004
- onClick: n[0] ||= (t) => de(q.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
2005
- }, P(D(f)(D(d).localization.useDefaultLanguage, { default: W.value })), 3)], 64)) : k("", !0),
2006
- q.value === "changed" ? (c(), w("button", {
2003
+ class: O(D(J.value === "tags-differ" && !Y.value ? xr : br)),
2004
+ onClick: n[0] ||= (t) => pe(J.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
2005
+ }, P(D(m)(D(f).localization.useDefaultLanguage, { default: K.value })), 3)], 64)) : k("", !0),
2006
+ J.value === "changed" ? (c(), w("button", {
2007
2007
  key: 2,
2008
2008
  type: "button",
2009
2009
  "data-testid": "locale-reset",
2010
2010
  class: O(D(xr)),
2011
- onClick: n[1] ||= (t) => de(e.setPaths)
2012
- }, P(D(d).localization.resetChanges), 3)) : k("", !0),
2013
- q.value === "hidden" ? (c(), w("button", {
2011
+ onClick: n[1] ||= (t) => pe(e.setPaths)
2012
+ }, P(D(f).localization.resetChanges), 3)) : k("", !0),
2013
+ J.value === "hidden" ? (c(), w("button", {
2014
2014
  key: 3,
2015
2015
  type: "button",
2016
2016
  "data-testid": "locale-show",
2017
2017
  class: O(D(xr)),
2018
- onClick: pe
2019
- }, P(D(d).localization.show), 3)) : k("", !0)
2018
+ onClick: me
2019
+ }, P(D(f).localization.show), 3)) : k("", !0)
2020
2020
  ])) : k("", !0)
2021
2021
  ], 64))], 44, Ga)], 8, ["to"])) : k("", !0)], 64));
2022
2022
  }
2023
- }), [["__scopeId", "data-v-3343ae7d"]]), co = /* @__PURE__ */ o({
2023
+ }), [["__scopeId", "data-v-1ea4fa72"]]), co = /* @__PURE__ */ o({
2024
2024
  __name: "LocaleMarkers",
2025
2025
  props: { block: {} },
2026
2026
  setup(e) {
@@ -2040,7 +2040,7 @@ var Wa = [
2040
2040
  }), p = I(() => f.value.stale.map((e) => e.slice(t.block.id.length + 1))), m = I(() => f.value.translated.flatMap((e) => {
2041
2041
  let n = e.slice(t.block.id.length + 1), r = $e(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || Te[t.block.type]?.includes(n) ? "html" : "text";
2042
2042
  return typeof r == "string" && i !== void 0 && Ua(r, i, a, o) ? [n] : [];
2043
- })), h = H(null), _ = I(() => n && s.value && !o.value.has(s.value) ? X(d.value, s.value, {
2043
+ })), h = H(null), _ = I(() => n && s.value && !o.value.has(s.value) ? Y(d.value, s.value, {
2044
2044
  syntax: a,
2045
2045
  definitions: i,
2046
2046
  doNotTranslate: r?.doNotTranslate,
@@ -2134,21 +2134,21 @@ var Wa = [
2134
2134
  function v(e) {
2135
2135
  f && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), m.value ? f.drop(a.block.id) : f.lift(a.block.id)) : m.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), f.cancel(), _()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), f.moveUp(a.block.id), _()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), f.moveDown(a.block.id), _())));
2136
2136
  }
2137
- let S = I(() => !a.viewport || !o.value.visibility ? !1 : o.value.visibility[a.viewport] === !1), C = I(() => !!(ue?.activeLocale?.value && a.block.l10n?.[ue.activeLocale.value]?.hidden)), E = I(() => a.previewMode === !0 && (S.value || C.value)), ee = I(() => a.viewport ? {
2137
+ let S = I(() => !a.viewport || !o.value.visibility ? !1 : o.value.visibility[a.viewport] === !1), C = I(() => !!(Q?.activeLocale?.value && a.block.l10n?.[Q.activeLocale.value]?.hidden)), E = I(() => a.previewMode === !0 && (S.value || C.value)), ee = I(() => a.viewport ? {
2138
2138
  desktop: l.viewport.desktop,
2139
2139
  mobile: l.viewport.mobile
2140
2140
  }[a.viewport] ?? a.viewport : ""), F = I(() => !!o.value.displayCondition), R = g(vn, null), z = g(dn, null), B = g(en, {}), V = I(() => B.savedBlocks?.isPicking.value === !0), U = I(() => !a.nested && B.savedBlocks?.isAvailable.value === !0 && B.savedBlocks?.canCreate.value === !0), te = I(() => a.isSelected && !V.value), K = I(() => B.comments?.getBlockCount(a.block.id) ?? 0), ne = H(null), q = H(null), J = H(null), re = H(null), ie = H({
2141
2141
  left: "calc(100% + 8px)",
2142
2142
  top: "50%"
2143
- }), ae = H(!1), Y = I(() => q.value ?? re.value), X = I(() => Y.value?.closest(".tpl-body"));
2144
- function Z() {
2143
+ }), ae = H(!1), oe = I(() => q.value ?? re.value), Y = I(() => oe.value?.closest(".tpl-body"));
2144
+ function X() {
2145
2145
  let e = ae.value, t = q.value, n = re.value, r = ne.value;
2146
2146
  if (!t && !n || !r?.offsetWidth) return;
2147
- let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = X.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
2147
+ let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = Y.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
2148
2148
  if (n?.offsetWidth) {
2149
2149
  let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
2150
2150
  if (e === i) {
2151
- ae.value = !i, j(Z);
2151
+ ae.value = !i, j(X);
2152
2152
  return;
2153
2153
  }
2154
2154
  }
@@ -2170,19 +2170,19 @@ var Wa = [
2170
2170
  top: m
2171
2171
  });
2172
2172
  }
2173
- x(Z), r(I(() => Y.value ? [
2173
+ x(X), r(I(() => oe.value ? [
2174
2174
  ne.value,
2175
2175
  q.value,
2176
2176
  J.value,
2177
2177
  re.value,
2178
- X.value
2179
- ].filter((e) => !!e) : []), Z), e(X, "scroll", Z, { passive: !0 });
2180
- let Q = I(() => B.collaboration?.lockOf(a.block.id) ?? null), oe = I(() => Q.value?.holder.type === "guest" ? l.collaboration.guest : Q.value?.holder.name ?? ""), se = I(() => B.collaboration?.agentHighlightOf(a.block.id) ?? B.ai?.highlightOf(a.block.id) ?? null), ce = Wn(() => o.value.type === "section" ? o.value.backgroundImage : void 0), le = Wn(() => o.value.type === "section" ? o.value.wrapper?.backgroundImage : void 0), ue = g(Sn, null), de = ue ? St(ue) : null, fe = g(cn, null) ?? de?.content ?? null;
2181
- u([() => ue?.activeLocale?.value, () => de && He(de.settings.value)], Z, { flush: "post" });
2178
+ Y.value
2179
+ ].filter((e) => !!e) : []), X), e(Y, "scroll", X, { passive: !0 });
2180
+ let Z = I(() => B.collaboration?.lockOf(a.block.id) ?? null), se = I(() => Z.value?.holder.type === "guest" ? l.collaboration.guest : Z.value?.holder.name ?? ""), ce = I(() => B.collaboration?.agentHighlightOf(a.block.id) ?? B.ai?.highlightOf(a.block.id) ?? null), le = Wn(() => o.value.type === "section" ? o.value.backgroundImage : void 0), ue = Wn(() => o.value.type === "section" ? o.value.wrapper?.backgroundImage : void 0), Q = g(Sn, null), de = Q ? St(Q) : null, fe = g(cn, null) ?? de?.content ?? null;
2181
+ u([() => Q?.activeLocale?.value, () => de && He(de.settings.value)], X, { flush: "post" });
2182
2182
  let pe = g(Vt, void 0), me = I(() => Wi(o.value, {
2183
- backgroundImageUrl: ce.value,
2183
+ backgroundImageUrl: le.value,
2184
2184
  heroBoxWidth: In(o.value) ? Bn(o.value, fe?.value, pe) : void 0
2185
- })), he = I(() => Xi(o.value, { backgroundImageUrl: le.value })), ge = I(() => {
2185
+ })), he = I(() => Xi(o.value, { backgroundImageUrl: ue.value })), ge = I(() => {
2186
2186
  let e = o.value;
2187
2187
  return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
2188
2188
  }), _e = I(() => Yi(ge.value?.wrapper?.padding));
@@ -2239,24 +2239,24 @@ var Wa = [
2239
2239
  block: t.block
2240
2240
  }, null, 8, ["block"]))
2241
2241
  ], 512),
2242
- Q.value ? (c(), w("div", {
2242
+ Z.value ? (c(), w("div", {
2243
2243
  key: 0,
2244
2244
  "data-testid": "block-lock",
2245
- "data-lock-holder": Q.value.holder.sessionId,
2245
+ "data-lock-holder": Z.value.holder.sessionId,
2246
2246
  class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
2247
2247
  style: L({
2248
- outline: `2px solid ${Q.value.holder.color}`,
2248
+ outline: `2px solid ${Z.value.holder.color}`,
2249
2249
  outlineOffset: "-1px"
2250
2250
  })
2251
2251
  }, [N("span", {
2252
2252
  class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
2253
2253
  style: L({
2254
- backgroundColor: Q.value.holder.color,
2255
- color: D(wr)(Q.value.holder.color)
2254
+ backgroundColor: Z.value.holder.color,
2255
+ color: D(wr)(Z.value.holder.color)
2256
2256
  })
2257
- }, P(D(d)(D(l).collaboration.editing, { name: oe.value })), 5)], 12, fo)) : k("", !0),
2258
- se.value === null ? k("", !0) : (c(), w("div", {
2259
- key: se.value,
2257
+ }, P(D(d)(D(l).collaboration.editing, { name: se.value })), 5)], 12, fo)) : k("", !0),
2258
+ ce.value === null ? k("", !0) : (c(), w("div", {
2259
+ key: ce.value,
2260
2260
  "data-testid": "block-agent-highlight",
2261
2261
  "aria-hidden": "true",
2262
2262
  class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
@@ -2368,9 +2368,9 @@ var wo = /* @__PURE__ */ o({
2368
2368
  viewport: {}
2369
2369
  },
2370
2370
  setup(e) {
2371
- let t = e, n = b(() => import("./TitleEditor-BbscL_C1.js")), r = xn(Zt, "TitleBlock"), { isEditing: i, blockRef: o, toolbarPosition: s, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = Ra(() => t.block.content), f = I(() => {
2371
+ let t = e, n = b(() => import("./TitleEditor-DhcI1aRS.js")), r = xn(Zt, "TitleBlock"), { isEditing: i, blockRef: o, toolbarPosition: s, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = Ra(() => t.block.content), f = I(() => {
2372
2372
  let e = {
2373
- fontSize: `${ce[t.block.level]}px`,
2373
+ fontSize: `${le[t.block.level]}px`,
2374
2374
  lineHeight: String(Se),
2375
2375
  fontWeight: "700",
2376
2376
  textAlign: t.block.textAlign
@@ -3156,4 +3156,4 @@ function hs(e) {
3156
3156
  }
3157
3157
  export { Ei as A, Mr as B, Yi as C, Zi as D, Pi as E, xi as F, Er as H, Jr as I, Kr as L, wi as M, Ci as N, Fi as O, Si as P, Vr as R, Bi as S, Gi as T, Dr as V, ha as _, Yo as a, ta as b, To as c, So as d, Va as f, xa as g, Na as h, ts as i, Ti as j, vi as k, Oo as l, La as m, ps as n, Ko as o, Ba as p, ds as r, Fo as s, hs as t, wo as u, pa as v, Wi as w, Li as x, ia as y, zr as z };
3158
3158
 
3159
- //# sourceMappingURL=composables-C77dGo-I.js.map
3159
+ //# sourceMappingURL=composables-CKXPwWo9.js.map