@templatical/editor 0.56.0 → 0.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-DdsvhE78.js → AiAltTextPopover-CpZ7UeAZ.js} +3 -3
- package/dist/{AiAltTextReview-P6to1_0t.js → AiAltTextReview-LYxvn7Qe.js} +4 -4
- package/dist/{AiChatPanel-BSlmzMRC.js → AiChatPanel-Cy05P-iO.js} +53 -53
- package/dist/{AiPanels-DAsnX-a3.js → AiPanels-CwKmXzyr.js} +1 -1
- package/dist/{AiRewriteMenu-DIISOR6U.js → AiRewriteMenu-DgqJHnza.js} +8 -8
- package/dist/{BlockIssueBadge-Bmtc50BQ.js → BlockIssueBadge-CxHJmuOh.js} +3 -3
- package/dist/{BlockPreviewCanvas-BYIzNn-9.js → BlockPreviewCanvas-DEmNZkEG.js} +44 -44
- package/dist/{CloudPanels-w34W8_BP.js → CloudPanels-Bmlf05Il.js} +11 -11
- package/dist/{CollaborationNotices-HTbCebjV.js → CollaborationNotices-C27GCMvK.js} +7 -7
- package/dist/{CommentsPanel-C5qG17Ki.js → CommentsPanel-B5NqPMmY.js} +1 -1
- package/dist/{CommentsSidebar-C7CWcUYZ.js → CommentsSidebar-BDrcrDxS.js} +42 -42
- package/dist/{CountdownBlock-BTXcCvjZ.js → CountdownBlock-D8dqjm3F.js} +6 -6
- package/dist/{CountdownToolbar-CP-pkntQ.js → CountdownToolbar-IjpCOjCd.js} +30 -30
- package/dist/{IssuesPanel-CiiNBzH0.js → IssuesPanel-uwuzeMSW.js} +87 -87
- package/dist/LanguageMenu-C-eQ0lFy.js +403 -0
- package/dist/{LocaleNotices-CTCZ7BYv.js → LocaleNotices-CDK_9D7P.js} +8 -8
- package/dist/{LogicTagInsertButton-DEOPc4RC.js → LogicTagInsertButton-BSolF7Fd.js} +3 -3
- package/dist/{MediaEditModal-DJsPLTwP.js → MediaEditModal-C8yc9dxt.js} +7 -7
- package/dist/{MediaPanels-D2WD2aE2.js → MediaPanels-FI4I8asn.js} +1 -1
- package/dist/{MergeTagInput-C9icdxw7.js → MergeTagInput-B1nl2ZMT.js} +12 -12
- package/dist/{MergeTagTextarea-CrAcmT3A.js → MergeTagTextarea-DJlf3VbS.js} +1 -1
- package/dist/{ParagraphEditor-BWBQ3jKz.js → ParagraphEditor-Dqco128s.js} +156 -156
- package/dist/{RestoreVersionDialog-CqAp16yQ.js → RestoreVersionDialog-hqLCuGV5.js} +12 -12
- package/dist/{RichTextEditorContent-xbBjVPVQ.js → RichTextEditorContent-xIEF0Y3Z.js} +2 -2
- package/dist/{SaveBlockDialog-pebNJBTc.js → SaveBlockDialog-CQlCP_XC.js} +46 -46
- package/dist/{SavedBlocksBrowserModal-CvagMcv7.js → SavedBlocksBrowserModal-BXA32Fx6.js} +23 -23
- package/dist/{SavedBlocksPanels-B9AAVBDm.js → SavedBlocksPanels-BKUzbamj.js} +1 -1
- package/dist/{SavedBlocksPickBar-BIANWe3i.js → SavedBlocksPickBar-BlvF-4UF.js} +9 -9
- package/dist/{TemplateSettings-ORq4PbCN.js → TemplateSettings-CYFtR8zv.js} +41 -41
- package/dist/{TestEmailModal-DRjCpcPl.js → TestEmailModal-BbaL17HO.js} +20 -20
- package/dist/{TestEmailPanel-H0v8El__.js → TestEmailPanel-DhB1CSpg.js} +1 -1
- package/dist/{TitleEditor-CEGbJXeU.js → TitleEditor-3BRl8u5l.js} +21 -21
- package/dist/{Toolbar-XT-uGA9J.js → Toolbar-pzNIakGM.js} +656 -656
- package/dist/{TplModal-7NQq5-VW.js → TplModal-WNuWhHZm.js} +4 -4
- package/dist/{VersionHistoryMenu-C8BE3Pr-.js → VersionHistoryMenu--T-Qp_mH.js} +15 -15
- package/dist/{VersionHistoryPanels-CuKuOSJG.js → VersionHistoryPanels-BPubvYIE.js} +1 -1
- package/dist/{VersionPreviewBanner-BVFBkveR.js → VersionPreviewBanner-ClL3Wkln.js} +7 -7
- package/dist/{WrapperBlock-Bdw-072t.js → WrapperBlock-CjfCPceb.js} +11 -11
- package/dist/{blockTypeIcons-CGplGmmr.js → blockTypeIcons-12OMwVyN.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js → AiAltTextPopover-PFjTrl0y.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js.map → AiAltTextPopover-PFjTrl0y.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js → AiAltTextReview-BMjzvApH.js} +5 -5
- package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js.map → AiAltTextReview-BMjzvApH.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js → AiChatPanel-C2gpq4kP.js} +107 -107
- package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js.map → AiChatPanel-C2gpq4kP.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-jMLVaiKx.js → AiPanels-Cx3PE2mE.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-jMLVaiKx.js.map → AiPanels-Cx3PE2mE.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js → AiRewriteMenu-CnkyjPEu.js} +11 -11
- package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js.map → AiRewriteMenu-CnkyjPEu.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js → BlockIssueBadge-DncZ-HDf.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js.map → BlockIssueBadge-DncZ-HDf.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-CCSEzL46.js +156 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-B3HkuENF.js.map → BlockPreviewCanvas-CCSEzL46.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js → CloudPanels-CRztnw4M.js} +2 -2
- package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js.map → CloudPanels-CRztnw4M.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js → CollaborationNotices-IuLYT2x7.js} +8 -8
- package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js.map → CollaborationNotices-IuLYT2x7.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-EtdTzTmq.js → CommentsPanel-lgjJNrrY.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-EtdTzTmq.js.map → CommentsPanel-lgjJNrrY.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-Qmj049QX.js → CommentsSidebar-DTold7iy.js} +214 -214
- package/dist/cdn/chunks/{CommentsSidebar-Qmj049QX.js.map → CommentsSidebar-DTold7iy.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js → CountdownBlock-8aPSExrv.js} +7 -7
- package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js.map → CountdownBlock-8aPSExrv.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js → CountdownToolbar-CnWQEW5g.js} +50 -50
- package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js.map → CountdownToolbar-CnWQEW5g.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js → IssuesPanel-CrplCzo8.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js.map → IssuesPanel-CrplCzo8.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js → LanguageMenu-B6MNInCL.js} +110 -110
- package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js.map → LanguageMenu-B6MNInCL.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js → LocaleNotices-TxeAl8Iq.js} +9 -9
- package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js.map → LocaleNotices-TxeAl8Iq.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js → LogicTagInsertButton-DvSVx2DB.js} +4 -4
- package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js.map → LogicTagInsertButton-DvSVx2DB.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js → MediaEditModal-tGK6htBl.js} +8 -8
- package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js.map → MediaEditModal-tGK6htBl.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js → MediaPanels-BVrQYz2C.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js.map → MediaPanels-BVrQYz2C.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js → MergeTagInput-DeuNH3re.js} +13 -13
- package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js.map → MergeTagInput-DeuNH3re.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js → MergeTagTextarea-B2xxIU3e.js} +2 -2
- package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js.map → MergeTagTextarea-B2xxIU3e.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js → ParagraphEditor-Bx_Hlw8d.js} +106 -106
- package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js.map → ParagraphEditor-Bx_Hlw8d.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js → RestoreVersionDialog-CPrrWTsT.js} +12 -12
- package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js.map → RestoreVersionDialog-CPrrWTsT.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js → RichTextEditorContent-Dze4C9VI.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js.map → RichTextEditorContent-Dze4C9VI.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js → SaveBlockDialog-CXVwnfsy.js} +51 -51
- package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js.map → SaveBlockDialog-CXVwnfsy.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js → SavedBlocksBrowserModal-BDTmenOE.js} +23 -23
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js.map → SavedBlocksBrowserModal-BDTmenOE.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js → SavedBlocksPanels-B41Rk_v1.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js.map → SavedBlocksPanels-B41Rk_v1.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js → SavedBlocksPickBar-B97z_rFH.js} +11 -11
- package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js.map → SavedBlocksPickBar-B97z_rFH.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js → TemplateSettings-YwwRbxPc.js} +102 -102
- package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js.map → TemplateSettings-YwwRbxPc.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js → TestEmailModal-BiFP2Cbx.js} +20 -20
- package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js.map → TestEmailModal-BiFP2Cbx.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js → TestEmailPanel-BrivPMk2.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js.map → TestEmailPanel-BrivPMk2.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js → TitleEditor-CzPkkL2s.js} +19 -19
- package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js.map → TitleEditor-CzPkkL2s.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-C_Hfsher.js → Toolbar-VH07SzX7.js} +550 -550
- package/dist/cdn/chunks/{Toolbar-C_Hfsher.js.map → Toolbar-VH07SzX7.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js → TplModal-DMe6J811.js} +6 -6
- package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js.map → TplModal-DMe6J811.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js → VersionHistoryMenu-DkwbKhBl.js} +15 -15
- package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js.map → VersionHistoryMenu-DkwbKhBl.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js → VersionHistoryPanels-CgxhMRAl.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js.map → VersionHistoryPanels-CgxhMRAl.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js → VersionPreviewBanner-WVBDBrwQ.js} +8 -8
- package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js.map → VersionPreviewBanner-WVBDBrwQ.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js → WrapperBlock-CCCIcqe2.js} +12 -12
- package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js.map → WrapperBlock-CCCIcqe2.js.map} +1 -1
- package/dist/cdn/chunks/{composables-CsfQlmcf.js → composables-D3lsO7Io.js} +925 -925
- package/dist/cdn/chunks/composables-D3lsO7Io.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js → createCloudRuntime-CE79GB1H.js} +15 -15
- package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js.map → createCloudRuntime-CE79GB1H.js.map} +1 -1
- package/dist/cdn/chunks/dist-Cf1pSluo.js +405 -0
- package/dist/cdn/chunks/{dist-DqGgijFI.js.map → dist-Cf1pSluo.js.map} +1 -1
- package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js → editor-modal-CN69NlOK.js} +170 -170
- package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js.map → editor-modal-CN69NlOK.js.map} +1 -1
- package/dist/cdn/chunks/en-Bcz4gS9U.js +1 -0
- package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js → extensions-8dlM-fU4.js} +96 -96
- package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js.map → extensions-8dlM-fU4.js.map} +1 -1
- package/dist/cdn/chunks/{sanitizeHtml-DJI7vvET.js → sanitizeHtml-B3njfkSy.js} +11 -11
- package/dist/cdn/chunks/{sanitizeHtml-DJI7vvET.js.map → sanitizeHtml-B3njfkSy.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js → socialIcons-BFgc3qqJ.js} +2 -2
- package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js.map → socialIcons-BFgc3qqJ.js.map} +1 -1
- package/dist/cdn/chunks/{src-Bfj1jHnn.js → src-GgKlXNxy.js} +2 -2
- package/dist/cdn/chunks/{src-Bfj1jHnn.js.map → src-GgKlXNxy.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js → tiptap-C940SvId.js} +3 -3
- package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js.map → tiptap-C940SvId.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js → useLogicTag-B0PDeDxl.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js.map → useLogicTag-B0PDeDxl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js → useMergeTag-BSU75bKk.js} +7 -7
- package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js.map → useMergeTag-BSU75bKk.js.map} +1 -1
- package/dist/cdn/editor.js +325 -325
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-CRX6rncm.js → composables-DreAt_0A.js} +1031 -1031
- package/dist/{createCloudRuntime-DplyIlsy.js → createCloudRuntime-CL4tUlDC.js} +14 -14
- package/dist/{dist-ChOb5XHW.js → dist-0GWMyHtM.js} +1 -1
- package/dist/{dist-6DU0me3E.js → dist-B_0FPmoy.js} +1 -1
- package/dist/{dist-B8dY8drK.js → dist-BjzK1g4Z.js} +1 -1
- package/dist/{dist-54VCNoC0.js → dist-BsumKKh9.js} +1 -1
- package/dist/{dist-BWflWcpW.js → dist-C3avsUq9.js} +2 -2
- package/dist/{dist-fqSers8_.js → dist-CCLRTtJP.js} +197 -197
- package/dist/dist-CiYotUR8.js +406 -0
- package/dist/{dist-C3hu_C3w.js → dist-Cr1CLCmx.js} +1 -1
- package/dist/{dist-D_XrUEET.js → dist-CsknfjrZ.js} +3 -3
- package/dist/{dist-TAv500j6.js → dist-DDytHU_6.js} +1 -1
- package/dist/{dist-CcOn7WCo.js → dist-DKV9m4Uu.js} +1 -1
- package/dist/{dist-B9a7iVye.js → dist-Dq9VnANT.js} +1 -1
- package/dist/{dist-DZ3X-uB8.js → dist-ZrT0vAB6.js} +1 -1
- package/dist/{editor-modal-D9HT9bD6.js → editor-modal-BD32TXws.js} +106 -106
- package/dist/en-Dgs_-NBw.js +1 -0
- package/dist/{extensions-Cm6K4SRX.js → extensions-DKxHlSd7.js} +179 -179
- package/dist/{socialIcons-CJD6OsI7.js → socialIcons-oo4uL16Y.js} +1 -1
- package/dist/templatical-editor.js +526 -526
- package/dist/{useLogicTag-DLkYos2Q.js → useLogicTag-B4Zpk3eo.js} +3 -3
- package/dist/{useMergeTag-IoWOO679.js → useMergeTag-B5qlq8px.js} +7 -7
- package/package.json +7 -7
- package/dist/LanguageMenu-B981Av-6.js +0 -403
- package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js +0 -156
- package/dist/cdn/chunks/composables-CsfQlmcf.js.map +0 -1
- package/dist/cdn/chunks/dist-DqGgijFI.js +0 -405
- package/dist/cdn/chunks/en-CVxNoHww.js +0 -1
- package/dist/dist-0alKVRc_.js +0 -406
- package/dist/en-De3uAutQ.js +0 -1
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { A as e, B as t, D as n, E as r, F as i, Ft as a, L as o, M as s, Mt as c, N as l, O as u, P as d, Pt as f, R as p, S as m, U as h, W as g, Z as _, _ as v, c as y, ct as b, d as x, et as S, f as C, g as w, h as T, j as E, k as D, l as O, m as k, nt as A, q as j, r as M, rt as N, tt as P, u as F, v as I, w as L, y as R } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
|
|
2
|
-
import { a as z, c as B, n as V, o as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { a as z, c as B, n as V, o as H, s as U, t as W } from "./runtime-dom.esm-bundler-DlHp8xgy.js";
|
|
3
|
+
import { G, I as ee, L as K, M as q, N as J, R as Y, V as te, W as ne, _ as re, b as ie, c as ae, j as oe, l as se } from "./socialIcons-oo4uL16Y.js";
|
|
4
|
+
import { At as ce, Bt as le, D as ue, E as de, Gt as X, I as fe, Mt as pe, O as me, Ot as he, P as ge, Q as _e, S as ve, T as ye, Tt as be, V as xe, W as Se, X as Ce, _ as Z, a as we, cn as Te, d as Ee, et as De, g as Oe, gt as ke, j as Ae, kt as je, lt as Me, qt as Ne, sn as Pe, tt as Q, vt as Fe, w as Ie, x as Le, yt as Re } from "./dist-BMUUt3zJ.js";
|
|
5
5
|
import { t as ze } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as xt } from "./check-CcuCoJDh.js";
|
|
9
|
-
import { t as St } from "./chevron-down-BfYIbFbC.js";
|
|
10
|
-
import { t as Ct } from "./circle-alert-Tq7kAh9S.js";
|
|
11
|
-
import { t as wt } from "./blockTypeIcons-CGplGmmr.js";
|
|
12
|
-
import { t as Tt } from "./eye-B3psrAqd.js";
|
|
13
|
-
import { r as Et, t as Dt } from "./sanitizeHtml-wBibnBF4.js";
|
|
14
|
-
import { i as Ot, n as kt, o as At, r as jt, t as Mt } from "./useScrollToBlock-BfOzc1Z6.js";
|
|
15
|
-
import { t as Nt } from "./loader-circle-DqKWsMHO.js";
|
|
16
|
-
import { t as Pt } from "./message-circle-C4TonoBs.js";
|
|
17
|
-
import { n as Ft } from "./smartphone-CVA29CU_.js";
|
|
18
|
-
import { t as It } from "./package-9OkiEO4S.js";
|
|
19
|
-
import { t as Lt } from "./rotate-ccw-BFTGCpHn.js";
|
|
20
|
-
import { t as Rt } from "./search-RuGJnMEn.js";
|
|
21
|
-
import { t as zt } from "./send-DGB1ar02.js";
|
|
22
|
-
import { t as Bt } from "./sparkles-IHfEwEcd.js";
|
|
23
|
-
import { n as Vt, t as Ht } from "./MergeTagModeToggle-DXvb80OE.js";
|
|
24
|
-
import { t as Ut } from "./x-DZSFHafL.js";
|
|
25
|
-
import { $ as Wt, B as Gt, E as Kt, I as qt, J as Jt, K as Yt, M as Xt, O as Zt, Q as Qt, R as $t, X as en, a as tn, at as nn, b as rn, c as an, d as on, et as sn, g as cn, h as ln, it as un, k as dn, l as fn, m as pn, n as mn, ot as hn, rt as gn, st as _n, t as vn, tt as yn, v as bn, z as xn } from "./keys-w_VRjoMu.js";
|
|
6
|
+
import { r as Be, t as Ve } from "./sanitizeHtml-wBibnBF4.js";
|
|
7
|
+
import { t as He } from "./x-DZSFHafL.js";
|
|
26
8
|
import { t as $ } from "./useI18n-zeWYtWSv.js";
|
|
27
|
-
import { n as
|
|
28
|
-
import { t as
|
|
29
|
-
import { t as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { t as
|
|
34
|
-
import { t as
|
|
35
|
-
import { t as
|
|
36
|
-
import {
|
|
37
|
-
import { t as
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import { t as
|
|
41
|
-
import { t as
|
|
9
|
+
import { n as Ue, t as We } from "./useLocalizedDisplay-Cbhx208c.js";
|
|
10
|
+
import { $ as Ge, B as Ke, E as qe, I as Je, J as Ye, K as Xe, M as Ze, O as Qe, Q as $e, R as et, X as tt, a as nt, at as rt, b as it, c as at, d as ot, et as st, g as ct, h as lt, it as ut, k as dt, l as ft, m as pt, n as mt, ot as ht, rt as gt, st as _t, t as vt, tt as yt, v as bt, z as xt } from "./keys-w_VRjoMu.js";
|
|
11
|
+
import { t as St } from "./plural-CyxrJXL1.js";
|
|
12
|
+
import { t as Ct } from "./languageName-DEEOhDWI.js";
|
|
13
|
+
import { C as wt, T as Tt, b as Et, h as Dt, m as Ot, w as kt, x as At } from "./styleConstants-CgiNKdnc.js";
|
|
14
|
+
import { t as jt } from "./TplModal-WNuWhHZm.js";
|
|
15
|
+
import { A as Mt, D as Nt, F as Pt, G as Ft, I as It, M as Lt, N as Rt, P as zt, R as Bt, S as Vt, V as Ht, _ as Ut, a as Wt, b as Gt, c as Kt, d as qt, f as Jt, g as Yt, h as Xt, i as Zt, j as Qt, k as $t, l as en, m as tn, n as nn, o as rn, p as an, r as on, s as sn, t as cn, u as ln, v as un, x as dn, y as fn } from "./composables-DreAt_0A.js";
|
|
16
|
+
import { a as pn, i as mn, n as hn, o as gn, t as _n } from "./normalizeMergeTagMarkup-Da9JAgx7.js";
|
|
17
|
+
import { t as vn } from "./aiErrors-C3QEMB0x.js";
|
|
18
|
+
import { n as yn, t as bn } from "./aiImageContext-BQ5mQ6B5.js";
|
|
19
|
+
import { i as xn, n as Sn, o as Cn, r as wn, t as Tn } from "./useScrollToBlock-BfOzc1Z6.js";
|
|
20
|
+
import { a as En } from "./dist-CiYotUR8.js";
|
|
21
|
+
import { t as Dn } from "./logger-BOu7oEtk.js";
|
|
22
|
+
import { t as On } from "./rotate-ccw-BFTGCpHn.js";
|
|
23
|
+
import { t as kn } from "./createLucideIcon-CfBdtoUw.js";
|
|
24
|
+
import { t as An } from "./sparkles-IHfEwEcd.js";
|
|
25
|
+
import { t as jn } from "./WrapperBlock-CjfCPceb.js";
|
|
26
|
+
import { t as Mn } from "./package-9OkiEO4S.js";
|
|
27
|
+
import { t as Nn } from "./blockTypeIcons-12OMwVyN.js";
|
|
28
|
+
import { t as Pn } from "./templateSettingsFields-cjlP-jdw.js";
|
|
29
|
+
import { n as Fn } from "./smartphone-CVA29CU_.js";
|
|
30
|
+
import { t as In } from "./loader-circle-DqKWsMHO.js";
|
|
31
|
+
import { t as Ln } from "./message-circle-C4TonoBs.js";
|
|
32
|
+
import { t as Rn } from "./send-DGB1ar02.js";
|
|
33
|
+
import { n as zn, t as Bn } from "./MergeTagModeToggle-DXvb80OE.js";
|
|
34
|
+
import { t as Vn } from "./eye-B3psrAqd.js";
|
|
35
|
+
import { _ as Hn, d as Un, g as Wn } from "./dist-CX7skkvG.js";
|
|
36
|
+
import { t as Gn } from "./formatAbsoluteDateTime-Ck2_zXra.js";
|
|
37
|
+
import { t as Kn } from "./formatRelativeTime-BTD8Ktt-.js";
|
|
38
|
+
import { t as qn } from "./check-CcuCoJDh.js";
|
|
39
|
+
import { t as Jn } from "./circle-alert-Tq7kAh9S.js";
|
|
40
|
+
import { t as Yn } from "./chevron-down-BfYIbFbC.js";
|
|
41
|
+
import { t as Xn } from "./search-RuGJnMEn.js";
|
|
42
42
|
import { t as Zn } from "./preRenderCustomBlocks-CdqSp2P7.js";
|
|
43
43
|
// src/utils/resolveTemplateDefaults.ts
|
|
44
44
|
var Qn = /^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i;
|
|
@@ -54,7 +54,7 @@ var er = {}, tr = { class: "tpl:pointer-events-none tpl:absolute tpl:top-16 tpl:
|
|
|
54
54
|
function nr(e, t) {
|
|
55
55
|
return s(), C("div", tr, [i(e.$slots, "default")]);
|
|
56
56
|
}
|
|
57
|
-
var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir =
|
|
57
|
+
var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir = kn({
|
|
58
58
|
name: "image-up",
|
|
59
59
|
size: 24,
|
|
60
60
|
node: [
|
|
@@ -77,7 +77,7 @@ var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir = Be({
|
|
|
77
77
|
key: "af1f0g"
|
|
78
78
|
}]
|
|
79
79
|
]
|
|
80
|
-
}), ar =
|
|
80
|
+
}), ar = kn({
|
|
81
81
|
name: "layout-template",
|
|
82
82
|
size: 24,
|
|
83
83
|
node: [
|
|
@@ -106,14 +106,14 @@ var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir = Be({
|
|
|
106
106
|
key: "q5h2i8"
|
|
107
107
|
}]
|
|
108
108
|
]
|
|
109
|
-
}), or =
|
|
109
|
+
}), or = kn({
|
|
110
110
|
name: "moon",
|
|
111
111
|
size: 24,
|
|
112
112
|
node: [["path", {
|
|
113
113
|
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
114
114
|
key: "kfwtm"
|
|
115
115
|
}]]
|
|
116
|
-
}), sr =
|
|
116
|
+
}), sr = kn({
|
|
117
117
|
name: "panel-top",
|
|
118
118
|
size: 24,
|
|
119
119
|
node: [["rect", {
|
|
@@ -127,7 +127,7 @@ var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir = Be({
|
|
|
127
127
|
d: "M3 9h18",
|
|
128
128
|
key: "1pudct"
|
|
129
129
|
}]]
|
|
130
|
-
}), cr =
|
|
130
|
+
}), cr = kn({
|
|
131
131
|
name: "save",
|
|
132
132
|
size: 24,
|
|
133
133
|
node: [
|
|
@@ -144,7 +144,7 @@ var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir = Be({
|
|
|
144
144
|
key: "t51u73"
|
|
145
145
|
}]
|
|
146
146
|
]
|
|
147
|
-
}), lr =
|
|
147
|
+
}), lr = kn({
|
|
148
148
|
name: "settings",
|
|
149
149
|
size: 24,
|
|
150
150
|
node: [["path", {
|
|
@@ -156,7 +156,7 @@ var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir = Be({
|
|
|
156
156
|
r: "3",
|
|
157
157
|
key: "1v7zrd"
|
|
158
158
|
}]]
|
|
159
|
-
}), ur =
|
|
159
|
+
}), ur = kn({
|
|
160
160
|
name: "square-plus",
|
|
161
161
|
size: 24,
|
|
162
162
|
node: [
|
|
@@ -178,7 +178,7 @@ var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir = Be({
|
|
|
178
178
|
}]
|
|
179
179
|
],
|
|
180
180
|
aliases: ["plus-square"]
|
|
181
|
-
}), dr =
|
|
181
|
+
}), dr = kn({
|
|
182
182
|
name: "sun",
|
|
183
183
|
size: 24,
|
|
184
184
|
node: [
|
|
@@ -252,15 +252,15 @@ var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir = Be({
|
|
|
252
252
|
change: {}
|
|
253
253
|
},
|
|
254
254
|
setup(e) {
|
|
255
|
-
let n = e, { t: r, format: i } = $(), o = L(
|
|
255
|
+
let n = e, { t: r, format: i } = $(), o = L(ut, void 0) ?? "en", l = L(lt, []), d = y(() => Q(n.editor.content.value)), f = y(() => n.editor.activeLocale?.value ?? d.value), p = y(() => n.locales.includes(f.value)), m = L(vt, null) ?? We(n.editor, l), g = y(() => p.value ? !m.value?.missing.length && !m.value?.stale.length ? r.localization.complete : i(r.localization.gapTooltip, {
|
|
256
256
|
missing: m.value.missing.length,
|
|
257
257
|
stale: m.value.stale.length
|
|
258
|
-
}) : i(r.localization.languageReadOnly, { language:
|
|
258
|
+
}) : i(r.localization.languageReadOnly, { language: Ct(f.value) })), _ = y(() => {
|
|
259
259
|
let e = n.feature?.lastResult.value;
|
|
260
260
|
if (!e) return "";
|
|
261
|
-
let t = [
|
|
262
|
-
return e.tagsChanged.length && t.push(
|
|
263
|
-
}), T = S(!1), E = !1, D = S(null), k = S(null), A = y(() => n.feature?.counts.value.all ?? 0), j = y(() =>
|
|
261
|
+
let t = [St(r.localization.translatedFields, e.translated, o)];
|
|
262
|
+
return e.tagsChanged.length && t.push(St(r.localization.translationTagsChanged, e.tagsChanged.length, o)), e.skippedLocked.length && t.push(St(r.localization.translationSkippedLocked, e.skippedLocked.length, o)), e.missing.length && t.push(St(r.localization.translationMissing, e.missing.length, o)), e.tooLarge.length && t.push(St(r.localization.translationTooLarge, e.tooLarge.length, o)), e.error && t.push(i(r.localization.translationError, { message: e.error.message })), t.join(" ");
|
|
263
|
+
}), T = S(!1), E = !1, D = S(null), k = S(null), A = y(() => n.feature?.counts.value.all ?? 0), j = y(() => St(r.localization.translationConfirmation, A.value, o));
|
|
264
264
|
function N() {
|
|
265
265
|
D.value = null, u(() => k.value?.focus());
|
|
266
266
|
}
|
|
@@ -284,20 +284,20 @@ var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir = Be({
|
|
|
284
284
|
(e ? kr.has(e) : E) || (e ? kr.add(e) : E = !0, T.value = !0);
|
|
285
285
|
}), (t, n) => f.value === d.value ? x("", !0) : (s(), C("div", fr, [
|
|
286
286
|
O("div", pr, [O("div", mr, [
|
|
287
|
-
O("span", hr, [v(b(
|
|
287
|
+
O("span", hr, [v(b(Be), {
|
|
288
288
|
size: 14,
|
|
289
289
|
"aria-hidden": "true",
|
|
290
290
|
class: "tpl:shrink-0"
|
|
291
|
-
}), w(" " + a(b(i)(b(r).localization.editingLanguage, { language: b(
|
|
291
|
+
}), w(" " + a(b(i)(b(r).localization.editingLanguage, { language: b(Ct)(f.value) })), 1)]),
|
|
292
292
|
O("span", gr, [e.feature?.running.value ? (s(), C(M, { key: 0 }, [w(a(b(i)(b(r).localization.translating, e.feature.running.value)), 1)], 64)) : e.feature?.lastResult.value ? (s(), C("span", _r, a(_.value), 1)) : (s(), C(M, { key: 2 }, [w(a(g.value), 1)], 64))]),
|
|
293
293
|
e.feature?.lastResult.value && !e.feature.running.value ? (s(), C("button", {
|
|
294
294
|
key: 0,
|
|
295
295
|
type: "button",
|
|
296
296
|
"data-testid": "translation-dismiss",
|
|
297
297
|
"aria-label": b(r).localization.dismiss,
|
|
298
|
-
class: c(b(
|
|
298
|
+
class: c(b(Ot)),
|
|
299
299
|
onClick: n[0] ||= (t) => e.feature.dismissResult()
|
|
300
|
-
}, [v(b(
|
|
300
|
+
}, [v(b(He), {
|
|
301
301
|
size: 14,
|
|
302
302
|
"aria-hidden": "true"
|
|
303
303
|
})], 10, vr)) : x("", !0)
|
|
@@ -306,42 +306,42 @@ var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir = Be({
|
|
|
306
306
|
key: 0,
|
|
307
307
|
type: "button",
|
|
308
308
|
"data-testid": "translation-cancel",
|
|
309
|
-
class: c(b(
|
|
309
|
+
class: c(b(Ot)),
|
|
310
310
|
onClick: n[1] ||= (t) => e.feature.cancel()
|
|
311
311
|
}, a(b(r).localization.cancel), 3)) : x("", !0),
|
|
312
312
|
p.value && e.feature?.isAvailable.value ? (s(), C(M, { key: 1 }, [e.feature.counts.value.gaps > 0 ? (s(), C("button", {
|
|
313
313
|
key: 0,
|
|
314
314
|
type: "button",
|
|
315
315
|
"data-testid": "translate-language",
|
|
316
|
-
class: c(b(
|
|
316
|
+
class: c(b(At)),
|
|
317
317
|
disabled: !!e.feature.running.value,
|
|
318
318
|
onClick: n[2] ||= (t) => e.feature.translate({ only: "gaps" })
|
|
319
|
-
}, a(b(
|
|
319
|
+
}, a(b(St)(b(r).localization.translateFields, e.feature.counts.value.gaps, b(o))), 11, br)) : x("", !0), O("button", {
|
|
320
320
|
ref_key: "allAgain",
|
|
321
321
|
ref: k,
|
|
322
322
|
type: "button",
|
|
323
323
|
"data-testid": "translate-all-again",
|
|
324
|
-
class: c(b(
|
|
324
|
+
class: c(b(Ot)),
|
|
325
325
|
disabled: !!e.feature.running.value || A.value === 0,
|
|
326
326
|
onClick: P
|
|
327
327
|
}, a(b(r).localization.translateAllAgain), 11, xr)], 64)) : x("", !0),
|
|
328
328
|
O("button", {
|
|
329
329
|
type: "button",
|
|
330
330
|
"data-testid": "language-back-default",
|
|
331
|
-
class: c(b(
|
|
331
|
+
class: c(b(Ot)),
|
|
332
332
|
onClick: n[3] ||= (t) => e.editor.setActiveLocale?.(null)
|
|
333
|
-
}, a(b(i)(b(r).localization.backToDefault, { default: b(
|
|
333
|
+
}, a(b(i)(b(r).localization.backToDefault, { default: b(Ct)(d.value) })), 3)
|
|
334
334
|
])]),
|
|
335
335
|
T.value ? (s(), C("div", Sr, [O("span", null, a(b(r).localization.structureNotice), 1), O("button", {
|
|
336
336
|
type: "button",
|
|
337
337
|
"aria-label": b(r).localization.dismiss,
|
|
338
|
-
class: c(b(
|
|
338
|
+
class: c(b(Ot)),
|
|
339
339
|
onClick: n[4] ||= (e) => T.value = !1
|
|
340
|
-
}, [v(b(
|
|
340
|
+
}, [v(b(He), {
|
|
341
341
|
size: 14,
|
|
342
342
|
"aria-hidden": "true"
|
|
343
343
|
})], 10, Cr)])) : x("", !0),
|
|
344
|
-
v(
|
|
344
|
+
v(jt, {
|
|
345
345
|
visible: D.value !== null,
|
|
346
346
|
onClose: N
|
|
347
347
|
}, {
|
|
@@ -352,19 +352,19 @@ var rr = /*#__PURE__*/ ze(er, [["render", nr]]), ir = Be({
|
|
|
352
352
|
class: "tpl:w-96 tpl:max-w-full tpl:max-h-[90%] tpl:overflow-y-auto tpl:box-border tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-lg)]"
|
|
353
353
|
}, [
|
|
354
354
|
O("h3", Tr, a(j.value), 1),
|
|
355
|
-
O("p", Er, a(b(i)(b(r).localization.translationDescription, { language: b(
|
|
355
|
+
O("p", Er, a(b(i)(b(r).localization.translationDescription, { language: b(Ct)(D.value?.locale ?? f.value) })), 1),
|
|
356
356
|
O("div", Dr, [O("button", {
|
|
357
357
|
type: "button",
|
|
358
358
|
"data-testid": "translation-confirm-cancel",
|
|
359
|
-
class: c(b(
|
|
359
|
+
class: c(b(wt)),
|
|
360
360
|
onClick: N
|
|
361
361
|
}, a(b(r).localization.cancel), 3), O("button", {
|
|
362
362
|
type: "button",
|
|
363
363
|
"data-testid": "translation-confirm",
|
|
364
|
-
class: c(b(
|
|
364
|
+
class: c(b(Et)),
|
|
365
365
|
disabled: !!e.feature?.running.value || !e.feature?.isAvailable.value || A.value === 0,
|
|
366
366
|
onClick: F
|
|
367
|
-
}, a(b(
|
|
367
|
+
}, a(b(St)(b(r).localization.translateAllFields, A.value, b(o))), 11, Or)])
|
|
368
368
|
], 8, wr)]),
|
|
369
369
|
_: 1
|
|
370
370
|
}, 8, ["visible"])
|
|
@@ -377,9 +377,9 @@ function jr(e) {
|
|
|
377
377
|
return { setDefaultLocale(n) {
|
|
378
378
|
let r;
|
|
379
379
|
try {
|
|
380
|
-
r = [t.createSetDefaultLocaleOperation(n)], e.collaboration ||
|
|
380
|
+
r = [t.createSetDefaultLocaleOperation(n)], e.collaboration || ke(t.content.value, r);
|
|
381
381
|
} catch (e) {
|
|
382
|
-
if (e instanceof
|
|
382
|
+
if (e instanceof Ee) return {
|
|
383
383
|
applied: !1,
|
|
384
384
|
error: e
|
|
385
385
|
};
|
|
@@ -388,7 +388,7 @@ function jr(e) {
|
|
|
388
388
|
if (e.collaboration) {
|
|
389
389
|
let t = e.collaboration.core.applyOperations(r, {});
|
|
390
390
|
if (!t.applied) return t;
|
|
391
|
-
} else e.history().record(),
|
|
391
|
+
} else e.history().record(), Ie(t.content.value, r), t.markDirty();
|
|
392
392
|
return t.setActiveLocale(n), { applied: !0 };
|
|
393
393
|
} };
|
|
394
394
|
}
|
|
@@ -414,7 +414,7 @@ function Pr(e, t) {
|
|
|
414
414
|
return [...Nr(e)].every((e) => n.has(e));
|
|
415
415
|
}
|
|
416
416
|
function Fr(e) {
|
|
417
|
-
let t = `tpl-translation-${crypto.randomUUID()}-`, n = [], r = e.replace(/<x id="\d+"\s*\/>|<x id="\d+"><\/x>|__x\d+__/g, (e) => `${t}${n.push(e)}-end`), i =
|
|
417
|
+
let t = `tpl-translation-${crypto.randomUUID()}-`, n = [], r = e.replace(/<x id="\d+"\s*\/>|<x id="\d+"><\/x>|__x\d+__/g, (e) => `${t}${n.push(e)}-end`), i = Ve(r);
|
|
418
418
|
return n.forEach((e, n) => {
|
|
419
419
|
i = i.replaceAll(`${t}${n + 1}-end`, e);
|
|
420
420
|
}), i;
|
|
@@ -439,7 +439,7 @@ function Lr(e) {
|
|
|
439
439
|
gaps: 0,
|
|
440
440
|
all: 0
|
|
441
441
|
};
|
|
442
|
-
let t = n.activeLocale.value, r = e.definitions(), i = e.coverage?.() ??
|
|
442
|
+
let t = n.activeLocale.value, r = e.definitions(), i = e.coverage?.() ?? ce(n.content.value, t, r), a = /* @__PURE__ */ new Set([...i.missing, ...i.stale]), { strings: o } = pe(n.content.value, t, {
|
|
443
443
|
definitions: r,
|
|
444
444
|
syntax: e.syntax(),
|
|
445
445
|
doNotTranslate: e.localization?.doNotTranslate,
|
|
@@ -470,7 +470,7 @@ function Lr(e) {
|
|
|
470
470
|
if (!s.value) throw new Z("Translation isn't available in this language.", 403, "feature_unavailable");
|
|
471
471
|
let o = e.collaboration?.core;
|
|
472
472
|
o?.flush();
|
|
473
|
-
let c = n.activeLocale.value, l = n.state.template?.id ?? null, u = Q(n.content.value), d =
|
|
473
|
+
let c = n.activeLocale.value, l = n.state.template?.id ?? null, u = Q(n.content.value), d = Ne(N([...e.definitions()])), f = e.syntax(), p = e.localization?.doNotTranslate?.slice(), m = pe(n.content.value, c, {
|
|
474
474
|
...t,
|
|
475
475
|
definitions: d,
|
|
476
476
|
syntax: f,
|
|
@@ -529,8 +529,8 @@ function Lr(e) {
|
|
|
529
529
|
h.missing.push(e.id);
|
|
530
530
|
continue;
|
|
531
531
|
}
|
|
532
|
-
let n = m.tokens[e.id], r =
|
|
533
|
-
r === null || e.format === "html" && !Pr(r,
|
|
532
|
+
let n = m.tokens[e.id], r = Pe(t.text, n);
|
|
533
|
+
r === null || e.format === "html" && !Pr(r, Pe(e.source, n)) ? h.tagsChanged.push(e.id) : _.push({
|
|
534
534
|
id: e.id,
|
|
535
535
|
text: e.format === "html" ? Fr(t.text) : t.text,
|
|
536
536
|
sourceHash: e.sourceHash
|
|
@@ -550,7 +550,7 @@ function Lr(e) {
|
|
|
550
550
|
try {
|
|
551
551
|
if (!g.discarded) {
|
|
552
552
|
o?.flush();
|
|
553
|
-
let t =
|
|
553
|
+
let t = ve(n.content.value, c, _, {
|
|
554
554
|
definitions: d,
|
|
555
555
|
syntax: f,
|
|
556
556
|
doNotTranslate: p,
|
|
@@ -573,7 +573,7 @@ function Lr(e) {
|
|
|
573
573
|
let t = o.locksOf(e.blockId).some((e) => e.holder.sessionId !== o.sessionId && (e.locale == null || e.locale === c));
|
|
574
574
|
return t && h.skippedLocked.push(...Object.keys(e.text ?? {}).map((t) => `${e.blockId}/${t}`)), !t;
|
|
575
575
|
});
|
|
576
|
-
s.length && (
|
|
576
|
+
s.length && (ke(N(n.content.value), s), e.history().record(), Ie(n.content.value, s), n.markDirty(), o?.flush(), h.translated = s.reduce((e, t) => e + (t.op === "updateBlockLocale" || t.op === "updateSettingsLocale" ? Object.keys(t.text ?? {}).length : 0), 0)), n.activeLocale.value === c && (i.value = h);
|
|
577
577
|
}
|
|
578
578
|
} finally {
|
|
579
579
|
a = null, r.value = null;
|
|
@@ -690,10 +690,10 @@ function Hr(e) {
|
|
|
690
690
|
id: u.noticeId
|
|
691
691
|
}], i(u.noticeId)) : (u.noticeId = a(p), c = u), n.templateUpdated || f(n.blockIds);
|
|
692
692
|
}
|
|
693
|
-
let m =
|
|
693
|
+
let m = ee({
|
|
694
694
|
provider: e.provider,
|
|
695
695
|
loadTemplate: e.loadTemplate,
|
|
696
|
-
normalizeRemoteOperations: (t, n) =>
|
|
696
|
+
normalizeRemoteOperations: (t, n) => mn(t, n, e.mergeTags),
|
|
697
697
|
onRemoteChange: (t) => {
|
|
698
698
|
try {
|
|
699
699
|
p(t.actor, Vr(t.ops));
|
|
@@ -764,13 +764,13 @@ function Hr(e) {
|
|
|
764
764
|
}
|
|
765
765
|
// src/composables/useCommentsFeature.ts
|
|
766
766
|
function Ur(e) {
|
|
767
|
-
let { provider: n, editor: r } = e, i =
|
|
767
|
+
let { provider: n, editor: r } = e, i = Y({
|
|
768
768
|
provider: n,
|
|
769
769
|
getTemplateId: () => r.state.template?.id ?? null,
|
|
770
770
|
getUser: () => e.user ?? null,
|
|
771
771
|
onError: e.onError
|
|
772
772
|
});
|
|
773
|
-
|
|
773
|
+
K({
|
|
774
774
|
comments: i,
|
|
775
775
|
provider: n,
|
|
776
776
|
getTemplateId: () => r.state.template?.id ?? null
|
|
@@ -818,7 +818,7 @@ function Ur(e) {
|
|
|
818
818
|
// src/composables/useAiFeature.ts
|
|
819
819
|
var Wr = 3e3, Gr = 1e3;
|
|
820
820
|
function Kr(e) {
|
|
821
|
-
return
|
|
821
|
+
return Ne(N(e));
|
|
822
822
|
}
|
|
823
823
|
var qr = (e) => e instanceof Error && e.name === "AbortError";
|
|
824
824
|
function Jr(e) {
|
|
@@ -842,7 +842,7 @@ function Zr(e) {
|
|
|
842
842
|
function Qr(e) {
|
|
843
843
|
let { provider: n, editor: r, collaboration: i } = e, a = n.conversation ?? null, o = crypto.randomUUID(), s = S(null), c = /* @__PURE__ */ new Map(), l = !1, u = 0, d = !1, f = 0, p = null, m = j();
|
|
844
844
|
function h(e) {
|
|
845
|
-
let t =
|
|
845
|
+
let t = ee(e);
|
|
846
846
|
return {
|
|
847
847
|
id: e,
|
|
848
848
|
memory: t,
|
|
@@ -904,23 +904,23 @@ function Qr(e) {
|
|
|
904
904
|
a(e);
|
|
905
905
|
return;
|
|
906
906
|
} finally {
|
|
907
|
-
t.active = null, t.busy.value = !1, --f === 0 &&
|
|
907
|
+
t.active = null, t.busy.value = !1, --f === 0 && De(), H(t);
|
|
908
908
|
}
|
|
909
909
|
i(e);
|
|
910
910
|
}
|
|
911
911
|
};
|
|
912
|
-
t.queue.push(o), f++ === 0 &&
|
|
912
|
+
t.queue.push(o), f++ === 0 && De(), H(t);
|
|
913
913
|
}) : Promise.resolve().then(r);
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function H(e) {
|
|
916
916
|
if (e.active) return;
|
|
917
917
|
let t = e.queue.shift();
|
|
918
918
|
t && (e.active = t, E(e) && (e.busy.value = !0), t.execute());
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function U(e) {
|
|
921
921
|
if (e.controller.signal.throwIfAborted(), !E(e.scope)) throw new DOMException("The template changed.", "AbortError");
|
|
922
922
|
}
|
|
923
|
-
async function
|
|
923
|
+
async function W(e, t) {
|
|
924
924
|
t.throwIfAborted();
|
|
925
925
|
let n, r = new Promise((e, r) => {
|
|
926
926
|
n = () => r(t.reason), t.addEventListener("abort", n, { once: !0 });
|
|
@@ -931,15 +931,15 @@ function Qr(e) {
|
|
|
931
931
|
t.removeEventListener("abort", n);
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
|
-
async function
|
|
934
|
+
async function G(t, n = !1, r = t.authorVersion) {
|
|
935
935
|
let { scope: i } = t, a = () => i.active === t && E(i) && (n || !t.controller.signal.aborted), o = () => a() ? r === u || (i.keptYourVersion.value = !0, !1) : !1;
|
|
936
936
|
if (e.reload && o()) try {
|
|
937
|
-
await
|
|
937
|
+
await W(e.reload(i.id, () => o() ? (i.keptYourVersion.value = !1, i.committingReload = !0, !0) : !1), i.lifetime.signal);
|
|
938
938
|
} finally {
|
|
939
939
|
i.committingReload = !1;
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function ee(e) {
|
|
943
943
|
let t = c.get(e);
|
|
944
944
|
return t || (t = {
|
|
945
945
|
generation: 0,
|
|
@@ -949,16 +949,16 @@ function Qr(e) {
|
|
|
949
949
|
recoveries: /* @__PURE__ */ new Map()
|
|
950
950
|
}, c.set(e, t)), t;
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function K(e, t, n) {
|
|
953
953
|
let r = setTimeout(() => {
|
|
954
954
|
e.timers.delete(r), t();
|
|
955
955
|
}, n);
|
|
956
956
|
e.timers.add(r);
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function q(t) {
|
|
959
959
|
qr(t) || e.onError?.(Jr(t));
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function Y(e, t) {
|
|
962
962
|
if (t.length === 0) return;
|
|
963
963
|
if (i) {
|
|
964
964
|
i.outline(t);
|
|
@@ -966,17 +966,17 @@ function Qr(e) {
|
|
|
966
966
|
}
|
|
967
967
|
let n = ++e.highlightSequence, r = new Map(e.highlights.value);
|
|
968
968
|
for (let e of t) r.set(e, n);
|
|
969
|
-
e.highlights.value = r,
|
|
969
|
+
e.highlights.value = r, K(e, () => {
|
|
970
970
|
let r = new Map(e.highlights.value);
|
|
971
971
|
for (let e of t) r.get(e) === n && r.delete(e);
|
|
972
972
|
e.highlights.value = r;
|
|
973
973
|
}, zr);
|
|
974
974
|
}
|
|
975
|
-
async function
|
|
976
|
-
i && await Promise.race([i.core.settle().catch(() => {}), new Promise((t) =>
|
|
975
|
+
async function te(e) {
|
|
976
|
+
i && await Promise.race([i.core.settle().catch(() => {}), new Promise((t) => K(e, t, Wr))]);
|
|
977
977
|
}
|
|
978
978
|
function ne(t) {
|
|
979
|
-
let n = N(r.content.value), a = r.activeLocale?.value ?? null, s =
|
|
979
|
+
let n = N(r.content.value), a = r.activeLocale?.value ?? null, s = X(n, a ?? Q(n));
|
|
980
980
|
if (a === null && n.settings.locale === void 0 && delete s.settings.locale, new TextEncoder().encode(JSON.stringify(s)).length > 2e5) throw new Z("This template is too large for AI.", 413, "content_too_large");
|
|
981
981
|
return {
|
|
982
982
|
templateId: t,
|
|
@@ -1000,7 +1000,7 @@ function Qr(e) {
|
|
|
1000
1000
|
try {
|
|
1001
1001
|
o = e.normalize(t, N(r.content.value));
|
|
1002
1002
|
} catch (e) {
|
|
1003
|
-
if (e instanceof
|
|
1003
|
+
if (e instanceof Ee) return Zr(e);
|
|
1004
1004
|
throw e;
|
|
1005
1005
|
}
|
|
1006
1006
|
if (o.length === 0) return {
|
|
@@ -1013,39 +1013,39 @@ function Qr(e) {
|
|
|
1013
1013
|
origin: "ai",
|
|
1014
1014
|
turn: n
|
|
1015
1015
|
});
|
|
1016
|
-
return e.applied ? (s.templateUpdated ||
|
|
1016
|
+
return e.applied ? (s.templateUpdated || Y(a, s.blockIds), {
|
|
1017
1017
|
applied: !0,
|
|
1018
1018
|
inverse: e.inverse
|
|
1019
1019
|
}) : Zr(e.error);
|
|
1020
1020
|
}
|
|
1021
1021
|
let c;
|
|
1022
1022
|
try {
|
|
1023
|
-
c =
|
|
1023
|
+
c = ke(N(r.content.value), o);
|
|
1024
1024
|
} catch (e) {
|
|
1025
|
-
if (e instanceof
|
|
1025
|
+
if (e instanceof Ee) return Zr(e);
|
|
1026
1026
|
throw e;
|
|
1027
1027
|
}
|
|
1028
1028
|
a.lastRecordedTurn !== n && (e.history().record(), a.lastRecordedTurn = n), d = !0;
|
|
1029
1029
|
try {
|
|
1030
|
-
|
|
1030
|
+
Ie(r.content.value, Ne(o)), r.markDirty();
|
|
1031
1031
|
} finally {
|
|
1032
1032
|
d = !1;
|
|
1033
1033
|
}
|
|
1034
1034
|
let l = r.state.selectedBlockId;
|
|
1035
|
-
return l && !Xr(r.content.value.blocks, l) && r.selectBlock(null), s.templateUpdated ||
|
|
1035
|
+
return l && !Xr(r.content.value.blocks, l) && r.selectBlock(null), s.templateUpdated || Y(a, s.blockIds), {
|
|
1036
1036
|
applied: !0,
|
|
1037
1037
|
inverse: c
|
|
1038
1038
|
};
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function ae(t, n, i, a) {
|
|
1041
1041
|
let o = t;
|
|
1042
1042
|
try {
|
|
1043
1043
|
if (a !== null) {
|
|
1044
|
-
if (e.localization && !e.localization.locales.includes(a)) throw new
|
|
1045
|
-
o =
|
|
1044
|
+
if (e.localization && !e.localization.locales.includes(a)) throw new Ee("invalid_operation", 0, `Locale "${a}" is not enabled.`);
|
|
1045
|
+
o = J(N(r.content.value), a, t, e.customBlockDefinitions?.());
|
|
1046
1046
|
}
|
|
1047
1047
|
} catch (e) {
|
|
1048
|
-
if (e instanceof
|
|
1048
|
+
if (e instanceof Ee) return Zr(e);
|
|
1049
1049
|
throw e;
|
|
1050
1050
|
}
|
|
1051
1051
|
let s = ie(o, n, i);
|
|
@@ -1056,14 +1056,14 @@ function Qr(e) {
|
|
|
1056
1056
|
"updateBlock"
|
|
1057
1057
|
].includes(e.op)) && e.onStructureChange?.(), s;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function oe(e, t) {
|
|
1060
1060
|
if (!i || !E(t)) return;
|
|
1061
1061
|
let n = i.core;
|
|
1062
|
-
n.revision.value >= e || (n.connection.value === "connected" ?
|
|
1062
|
+
n.revision.value >= e || (n.connection.value === "connected" ? K(t, () => {
|
|
1063
1063
|
E(t) && n.revision.value < e && n.catchUp();
|
|
1064
1064
|
}, Gr) : n.catchUp());
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function se(e, t, n) {
|
|
1067
1067
|
let r = e.memory;
|
|
1068
1068
|
r.items = r.items.map((e) => {
|
|
1069
1069
|
if (e.id !== t) return e;
|
|
@@ -1105,7 +1105,7 @@ function Qr(e) {
|
|
|
1105
1105
|
redo: null,
|
|
1106
1106
|
serverApplied: !1,
|
|
1107
1107
|
batchIds: /* @__PURE__ */ new Set()
|
|
1108
|
-
}, S, w = !1, T = !1, D = (e) =>
|
|
1108
|
+
}, S, w = !1, T = !1, D = (e) => se(u, g, e), O = () => {
|
|
1109
1109
|
let e = p.items.find((e) => e.id === g);
|
|
1110
1110
|
a && e && p.recoveries.set(m, {
|
|
1111
1111
|
item: e,
|
|
@@ -1117,10 +1117,10 @@ function Qr(e) {
|
|
|
1117
1117
|
try {
|
|
1118
1118
|
let n;
|
|
1119
1119
|
do
|
|
1120
|
-
n = _, !i && e.reload && await
|
|
1120
|
+
n = _, !i && e.reload && await G(t, !0, d.authorVersion), a && await me(t, !0, !0);
|
|
1121
1121
|
while (E(u) && n !== _);
|
|
1122
1122
|
} catch (e) {
|
|
1123
|
-
E(u) &&
|
|
1123
|
+
E(u) && q(e);
|
|
1124
1124
|
} finally {
|
|
1125
1125
|
T = !1;
|
|
1126
1126
|
}
|
|
@@ -1129,22 +1129,22 @@ function Qr(e) {
|
|
|
1129
1129
|
}));
|
|
1130
1130
|
}, A = {
|
|
1131
1131
|
onText: (e) => {
|
|
1132
|
-
|
|
1132
|
+
U(d), v += e, D({ text: v });
|
|
1133
1133
|
},
|
|
1134
1134
|
onOperations: async (e) => {
|
|
1135
|
-
|
|
1136
|
-
let t = i ? Kr(r.content.value) : null, n =
|
|
1137
|
-
return n.applied && n.inverse.length > 0 && (x.inverse = [...n.inverse, ...x.inverse], i && (x.view = x.view === void 0 || x.view !== null &&
|
|
1135
|
+
U(d), C(c);
|
|
1136
|
+
let t = i ? Kr(r.content.value) : null, n = ae(e, m, u, l);
|
|
1137
|
+
return n.applied && n.inverse.length > 0 && (x.inverse = [...n.inverse, ...x.inverse], i && (x.view = x.view === void 0 || x.view !== null && _e(x.view, t) ? Kr(r.content.value) : null), _ += e.length, D({ operationCount: _ })), n;
|
|
1138
1138
|
},
|
|
1139
1139
|
onApplied: (t) => {
|
|
1140
1140
|
if (!E(u)) throw new DOMException("The template changed.", "AbortError");
|
|
1141
|
-
if (!i && !e.reload) throw b ??= new Z(
|
|
1142
|
-
x.serverApplied = !0, x.batchIds.add(t.batchId), _ += t.operationCount, D({ operationCount: _ }),
|
|
1141
|
+
if (!i && !e.reload) throw b ??= new Z(vn, 502, "ai_provider_error"), b;
|
|
1142
|
+
x.serverApplied = !0, x.batchIds.add(t.batchId), _ += t.operationCount, D({ operationCount: _ }), oe(t.revision, u), w && (O(), k());
|
|
1143
1143
|
}
|
|
1144
1144
|
};
|
|
1145
1145
|
try {
|
|
1146
1146
|
try {
|
|
1147
|
-
await
|
|
1147
|
+
await me(d), U(d), C(c), u.failure.value = null, u.failedPrompt.value = null, u.failedAttachments.value = [];
|
|
1148
1148
|
let e = (/* @__PURE__ */ new Date()).toISOString();
|
|
1149
1149
|
p.records.set(g, x), p.items = [
|
|
1150
1150
|
...p.items,
|
|
@@ -1179,12 +1179,12 @@ function Qr(e) {
|
|
|
1179
1179
|
createdAt: e,
|
|
1180
1180
|
status: "streaming"
|
|
1181
1181
|
}
|
|
1182
|
-
], u.messages.value = p.items, await
|
|
1183
|
-
let r = await
|
|
1184
|
-
if (
|
|
1182
|
+
], u.messages.value = p.items, await W(te(u), d.controller.signal), U(d), C(c);
|
|
1183
|
+
let r = await W(o(ne(u.id), A, f.signal), f.signal);
|
|
1184
|
+
if (U(d), b) throw b;
|
|
1185
1185
|
if (r.text !== "" && (v = r.text), r.messageId !== null && a) {
|
|
1186
1186
|
let e = g;
|
|
1187
|
-
g = r.messageId, p.storedIds.add(g), p.records.delete(e), p.records.set(g, x),
|
|
1187
|
+
g = r.messageId, p.storedIds.add(g), p.records.delete(e), p.records.set(g, x), se(u, e, { id: g });
|
|
1188
1188
|
}
|
|
1189
1189
|
D({
|
|
1190
1190
|
text: v,
|
|
@@ -1197,7 +1197,7 @@ function Qr(e) {
|
|
|
1197
1197
|
};
|
|
1198
1198
|
} catch (e) {
|
|
1199
1199
|
let r = b ?? e;
|
|
1200
|
-
y = f.signal.aborted || qr(r), y ||
|
|
1200
|
+
y = f.signal.aborted || qr(r), y || q(r), _ === 0 && (!y || v === "") ? (p.items = p.items.filter((e) => e.id !== g && e.id !== h), E(u) && (u.messages.value = p.items, y || (t === "chat" && (u.failedPrompt.value = n, u.failedAttachments.value = s), u.failure.value = {
|
|
1201
1201
|
error: Jr(r),
|
|
1202
1202
|
context: "turn"
|
|
1203
1203
|
})), S = {
|
|
@@ -1221,10 +1221,10 @@ function Qr(e) {
|
|
|
1221
1221
|
a && S.messageId !== null && _ > 0 && (S.failed || y) && O();
|
|
1222
1222
|
let r;
|
|
1223
1223
|
do
|
|
1224
|
-
if (r = _, x.serverApplied && !i && e.reload && E(u) && await
|
|
1225
|
-
E(u) &&
|
|
1224
|
+
if (r = _, x.serverApplied && !i && e.reload && E(u) && await G(d, !0).catch((e) => {
|
|
1225
|
+
E(u) && q(e);
|
|
1226
1226
|
}), a && p.recoveries.has(m) && E(u)) {
|
|
1227
|
-
await
|
|
1227
|
+
await me(d, !0, !0);
|
|
1228
1228
|
let e = p.recoveries.get(m);
|
|
1229
1229
|
e && (S.messageId = e.item.id, S.text = e.item.text);
|
|
1230
1230
|
}
|
|
@@ -1235,27 +1235,27 @@ function Qr(e) {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
}, le);
|
|
1237
1237
|
}
|
|
1238
|
-
function
|
|
1238
|
+
function de(t, n) {
|
|
1239
1239
|
let s = T();
|
|
1240
1240
|
return !s || s.busy.value ? Promise.resolve() : V("replay", s, async (c) => {
|
|
1241
1241
|
let l = s.memory, u = l.items.find((e) => e.id === t);
|
|
1242
1242
|
if (!u) return;
|
|
1243
1243
|
let d = a?.[n], f = l.records.get(t);
|
|
1244
1244
|
try {
|
|
1245
|
-
if (
|
|
1245
|
+
if (U(c), l.storedIds.has(t)) {
|
|
1246
1246
|
if (typeof d != "function") throw new Z(`This AI backend does not support ${n}.`, 403, "feature_unavailable");
|
|
1247
1247
|
if (u.undone !== (n === "redo")) return;
|
|
1248
|
-
let r = await
|
|
1248
|
+
let r = await W(d(s.id, t, { sessionId: i ? i.core.sessionId : o }), s.lifetime.signal);
|
|
1249
1249
|
if (!E(s)) return;
|
|
1250
1250
|
if ("operations" in r) {
|
|
1251
1251
|
if (c.controller.signal.aborted) return;
|
|
1252
|
-
let e =
|
|
1253
|
-
e.applied &&
|
|
1252
|
+
let e = ae(r.operations, `${n}:${t}:${crypto.randomUUID()}`, s, u.locale ?? null);
|
|
1253
|
+
e.applied && se(s, t, {
|
|
1254
1254
|
undone: n === "undo",
|
|
1255
1255
|
failure: void 0
|
|
1256
1256
|
});
|
|
1257
1257
|
try {
|
|
1258
|
-
await
|
|
1258
|
+
await W(a.settleReplay(s.id, t, {
|
|
1259
1259
|
replayId: r.replayId,
|
|
1260
1260
|
direction: n,
|
|
1261
1261
|
applied: e.applied,
|
|
@@ -1263,52 +1263,52 @@ function Qr(e) {
|
|
|
1263
1263
|
}), s.lifetime.signal);
|
|
1264
1264
|
} catch (e) {
|
|
1265
1265
|
if (!E(s)) return;
|
|
1266
|
-
|
|
1266
|
+
q(e), se(s, t, { failure: {
|
|
1267
1267
|
error: Jr(e),
|
|
1268
1268
|
context: n
|
|
1269
1269
|
} });
|
|
1270
1270
|
}
|
|
1271
1271
|
if (!E(s)) return;
|
|
1272
|
-
if (!e.applied) throw new
|
|
1272
|
+
if (!e.applied) throw new we(e.message, {
|
|
1273
1273
|
code: e.code,
|
|
1274
1274
|
opIndex: e.opIndex
|
|
1275
1275
|
});
|
|
1276
1276
|
return;
|
|
1277
1277
|
}
|
|
1278
|
-
if (
|
|
1278
|
+
if (se(s, t, {
|
|
1279
1279
|
undone: n === "undo",
|
|
1280
1280
|
failure: void 0
|
|
1281
|
-
}), i)
|
|
1282
|
-
else if (e.reload) await
|
|
1283
|
-
else throw new Z(
|
|
1281
|
+
}), i) oe(r.applied.revision, s);
|
|
1282
|
+
else if (e.reload) await G(c, !0);
|
|
1283
|
+
else throw new Z(vn, 502, "ai_provider_error");
|
|
1284
1284
|
return;
|
|
1285
1285
|
}
|
|
1286
1286
|
{
|
|
1287
1287
|
if (u.undone !== (n === "redo")) return;
|
|
1288
1288
|
let e = n === "undo" ? f?.inverse : f?.redo;
|
|
1289
1289
|
if (!f || f.serverApplied || !e || e.length === 0) return;
|
|
1290
|
-
if (i && e.some((e) => e.op === "setContent") && (!f.view || !
|
|
1290
|
+
if (i && e.some((e) => e.op === "setContent") && (!f.view || !_e(f.view, N(r.content.value)))) throw new we(`The template changed since this message's changes, so ${n === "undo" ? "undoing" : "redoing"} them would overwrite that.`, { code: "precondition_failed" });
|
|
1291
1291
|
let a = ie(e, `${n}:${t}:${crypto.randomUUID()}`, s);
|
|
1292
|
-
if (!a.applied) throw new
|
|
1292
|
+
if (!a.applied) throw new we(a.message, {
|
|
1293
1293
|
code: a.code,
|
|
1294
1294
|
opIndex: a.opIndex
|
|
1295
1295
|
});
|
|
1296
1296
|
n === "undo" ? f.redo = a.inverse : f.inverse = a.inverse, i && (f.view = Kr(r.content.value));
|
|
1297
1297
|
}
|
|
1298
|
-
|
|
1298
|
+
se(s, t, {
|
|
1299
1299
|
undone: n === "undo",
|
|
1300
1300
|
failure: void 0
|
|
1301
1301
|
});
|
|
1302
1302
|
} catch (e) {
|
|
1303
1303
|
if (!E(s) || qr(e)) return;
|
|
1304
|
-
|
|
1304
|
+
q(e), se(s, t, { failure: {
|
|
1305
1305
|
error: Jr(e),
|
|
1306
1306
|
context: n
|
|
1307
1307
|
} });
|
|
1308
1308
|
}
|
|
1309
1309
|
}, () => {});
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function fe(e, t) {
|
|
1312
1312
|
let n = {
|
|
1313
1313
|
id: e.id,
|
|
1314
1314
|
role: e.role,
|
|
@@ -1328,10 +1328,10 @@ function Qr(e) {
|
|
|
1328
1328
|
...ce(n, t)
|
|
1329
1329
|
};
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1331
|
+
function pe(e, t) {
|
|
1332
1332
|
for (let n of e) t.storedIds.add(n.id);
|
|
1333
1333
|
let n = new Map(t.items.map((e) => [e.id, e])), r = e.map((e) => {
|
|
1334
|
-
let r =
|
|
1334
|
+
let r = fe(e, t), i = n.get(r.id);
|
|
1335
1335
|
return i?.status === "failed" ? {
|
|
1336
1336
|
...r,
|
|
1337
1337
|
status: i.status,
|
|
@@ -1343,7 +1343,7 @@ function Qr(e) {
|
|
|
1343
1343
|
if (s) {
|
|
1344
1344
|
t.records.delete(i.id), t.records.set(s.id, a);
|
|
1345
1345
|
let e = {
|
|
1346
|
-
...
|
|
1346
|
+
...fe(s, t),
|
|
1347
1347
|
status: i.status,
|
|
1348
1348
|
failure: i.failure
|
|
1349
1349
|
};
|
|
@@ -1355,7 +1355,7 @@ function Qr(e) {
|
|
|
1355
1355
|
}
|
|
1356
1356
|
return r;
|
|
1357
1357
|
}
|
|
1358
|
-
async function
|
|
1358
|
+
async function me(e, t = !1, n = !1, r = e.scope.historyGeneration) {
|
|
1359
1359
|
let { scope: i } = e;
|
|
1360
1360
|
if (!E(i) || r !== i.historyGeneration || !n && e.controller.signal.aborted || !t && i.loaded) return;
|
|
1361
1361
|
let o = i.memory;
|
|
@@ -1363,12 +1363,12 @@ function Qr(e) {
|
|
|
1363
1363
|
else {
|
|
1364
1364
|
i.isLoadingHistory.value = !0, i.loaded = !1;
|
|
1365
1365
|
try {
|
|
1366
|
-
await
|
|
1367
|
-
!l && o.generation === i.generation && r === i.historyGeneration && (n || E(i) && !e.controller.signal.aborted) && (o.items =
|
|
1366
|
+
await W(a.list(i.id).then((t) => {
|
|
1367
|
+
!l && o.generation === i.generation && r === i.historyGeneration && (n || E(i) && !e.controller.signal.aborted) && (o.items = pe(t, o), i.messages.value = o.items, i.loaded = !0, i.failure.value?.context === "history" && (i.failure.value = null));
|
|
1368
1368
|
}), n ? i.lifetime.signal : e.controller.signal);
|
|
1369
1369
|
} catch (e) {
|
|
1370
1370
|
if (!E(i) || r !== i.historyGeneration || qr(e)) return;
|
|
1371
|
-
|
|
1371
|
+
q(e), i.failure.value = {
|
|
1372
1372
|
error: Jr(e),
|
|
1373
1373
|
context: "history"
|
|
1374
1374
|
};
|
|
@@ -1377,7 +1377,7 @@ function Qr(e) {
|
|
|
1377
1377
|
}
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1380
|
+
function he(e = T()) {
|
|
1381
1381
|
if (!e || !E(e)) return Promise.resolve();
|
|
1382
1382
|
if (e.pendingHistory?.generation === e.historyGeneration) return e.pendingHistory.promise;
|
|
1383
1383
|
if (e.loaded) return Promise.resolve();
|
|
@@ -1385,11 +1385,11 @@ function Qr(e) {
|
|
|
1385
1385
|
generation: t,
|
|
1386
1386
|
promise: Promise.resolve()
|
|
1387
1387
|
};
|
|
1388
|
-
return n.promise = V("history", e, (e) =>
|
|
1388
|
+
return n.promise = V("history", e, (e) => me(e, !1, !1, t), () => {}).finally(() => {
|
|
1389
1389
|
e.pendingHistory === n && (e.pendingHistory = null);
|
|
1390
1390
|
}), e.pendingHistory = n, n.promise;
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1392
|
+
function ge() {
|
|
1393
1393
|
let e = T();
|
|
1394
1394
|
return !e || a && typeof a.clear != "function" || e.active && e.active.kind !== "history" && e.active.kind !== "read" || e.queue.some((e) => e.kind !== "history" && e.kind !== "read") ? Promise.resolve() : (B(e), e.active?.controller.abort(), V("clear", e, async () => {
|
|
1395
1395
|
try {
|
|
@@ -1397,40 +1397,40 @@ function Qr(e) {
|
|
|
1397
1397
|
c.delete(e.id), e.memory.items = [], e.memory.records.clear(), e.memory.storedIds.clear(), e.memory.recoveries.clear(), B(e), e.messages.value = [], e.loaded = !0, e.failure.value = null, e.failedPrompt.value = null, e.failedAttachments.value = [], E(e) && c.set(e.id, e.memory);
|
|
1398
1398
|
} catch (t) {
|
|
1399
1399
|
if (!E(e)) return;
|
|
1400
|
-
|
|
1400
|
+
q(t), e.failure.value = {
|
|
1401
1401
|
error: Jr(t),
|
|
1402
1402
|
context: "history"
|
|
1403
1403
|
};
|
|
1404
1404
|
}
|
|
1405
1405
|
}, () => {}));
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1408
|
-
E(e) &&
|
|
1407
|
+
function ve(e) {
|
|
1408
|
+
E(e) && he(e);
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function ye(t) {
|
|
1411
1411
|
let n = T();
|
|
1412
|
-
n && E(n) && (s.value !== t && n.busy.value &&
|
|
1412
|
+
n && E(n) && (s.value !== t && n.busy.value && Ce(), s.value = t, e.commentsOpen && (e.commentsOpen.value = !1), t === "chat" && ve(n));
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1415
|
-
e.length !== 0 && w("chatAttachments") && (z.value = [...e],
|
|
1414
|
+
function be(e) {
|
|
1415
|
+
e.length !== 0 && w("chatAttachments") && (z.value = [...e], ye("chat"));
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function xe(e) {
|
|
1418
1418
|
e.active?.controller.abort();
|
|
1419
1419
|
for (let t of e.queue) t.kind !== "reconcile" && t.controller.abort();
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1422
|
-
e.lifetime.abort(),
|
|
1421
|
+
function Se(e) {
|
|
1422
|
+
e.lifetime.abort(), xe(e), e.busy.value = !1, e.isLoadingHistory.value = !1;
|
|
1423
1423
|
for (let t of e.timers) clearTimeout(t);
|
|
1424
1424
|
e.timers.clear();
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1426
|
+
function Ce() {
|
|
1427
1427
|
let e = T();
|
|
1428
|
-
e &&
|
|
1428
|
+
e && xe(e);
|
|
1429
1429
|
}
|
|
1430
|
-
function
|
|
1431
|
-
|
|
1430
|
+
function Te() {
|
|
1431
|
+
Ce(), s.value = null;
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function De() {
|
|
1434
1434
|
if (l) return;
|
|
1435
1435
|
p?.();
|
|
1436
1436
|
let e = f === 0, n = () => t(r.content, () => {
|
|
@@ -1442,31 +1442,31 @@ function Qr(e) {
|
|
|
1442
1442
|
});
|
|
1443
1443
|
p = m?.active ? m.run(n) : n();
|
|
1444
1444
|
}
|
|
1445
|
-
|
|
1446
|
-
let
|
|
1445
|
+
De();
|
|
1446
|
+
let Oe = [() => p?.(), t(() => r.state.isDirty, (e, t) => {
|
|
1447
1447
|
t === !0 && e === !1 && r.state.isSaving && (I.value = !1);
|
|
1448
1448
|
}, { flush: "sync" })];
|
|
1449
|
-
e.commentsOpen &&
|
|
1450
|
-
e &&
|
|
1451
|
-
})),
|
|
1449
|
+
e.commentsOpen && Oe.push(t(e.commentsOpen, (e) => {
|
|
1450
|
+
e && Te();
|
|
1451
|
+
})), Oe.push(t(() => r.loadVersion?.value ?? g.value, () => {
|
|
1452
1452
|
if (l) return;
|
|
1453
1453
|
let e = _.value;
|
|
1454
1454
|
if (e?.committingReload && E(e)) {
|
|
1455
1455
|
e.committingReload = !1;
|
|
1456
1456
|
return;
|
|
1457
1457
|
}
|
|
1458
|
-
e &&
|
|
1458
|
+
e && Se(e);
|
|
1459
1459
|
let t = g.value, n = t === null ? null : h(t);
|
|
1460
|
-
_.value = n, n && s.value === "chat" &&
|
|
1460
|
+
_.value = n, n && s.value === "chat" && ve(n);
|
|
1461
1461
|
}, { flush: "sync" }));
|
|
1462
|
-
async function
|
|
1462
|
+
async function Ae(t, a) {
|
|
1463
1463
|
let s = b, c = T(), l = n.altText, u = new AbortController(), d = () => u.abort(a?.reason), f = () => u.abort();
|
|
1464
1464
|
try {
|
|
1465
1465
|
if (a?.throwIfAborted(), !c || typeof l != "function") throw new Z("This AI feature isn't available.", 403, "feature_unavailable");
|
|
1466
|
-
let n = N(r.content.value), p = r.activeLocale?.value ?? null, m =
|
|
1466
|
+
let n = N(r.content.value), p = r.activeLocale?.value ?? null, m = X(n, p ?? Q(n)), h = bn(m, t);
|
|
1467
1467
|
if (!h) throw new Z("The image is no longer available.", 409, "block_missing");
|
|
1468
1468
|
a?.addEventListener("abort", d, { once: !0 }), c.lifetime.signal.addEventListener("abort", f, { once: !0 });
|
|
1469
|
-
let { url: g, ..._ } = h, v = await
|
|
1469
|
+
let { url: g, ..._ } = h, v = await W(l({
|
|
1470
1470
|
templateId: c.id,
|
|
1471
1471
|
sessionId: i ? i.core.sessionId : o,
|
|
1472
1472
|
blockId: t,
|
|
@@ -1478,18 +1478,18 @@ function Qr(e) {
|
|
|
1478
1478
|
if (u.signal.throwIfAborted(), C(s), !E(c)) throw new DOMException("The template changed.", "AbortError");
|
|
1479
1479
|
return v.alt;
|
|
1480
1480
|
} catch (e) {
|
|
1481
|
-
throw
|
|
1481
|
+
throw q(e), e;
|
|
1482
1482
|
} finally {
|
|
1483
1483
|
a?.removeEventListener("abort", d), c?.lifetime.signal.removeEventListener("abort", f);
|
|
1484
1484
|
}
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1486
|
+
function je(e) {
|
|
1487
1487
|
let t = b, n = T();
|
|
1488
1488
|
if (!n || e.length === 0) return Promise.resolve();
|
|
1489
|
-
let i = r.activeLocale?.value ?? null, a = N(r.content.value), o =
|
|
1489
|
+
let i = r.activeLocale?.value ?? null, a = N(r.content.value), o = X(a, i ?? Q(a)), s = e.map(({ blockId: e, alt: t, decorative: n, expect: r }) => ({
|
|
1490
1490
|
op: "updateBlock",
|
|
1491
1491
|
blockId: e,
|
|
1492
|
-
expect: { ...r ??
|
|
1492
|
+
expect: { ...r ?? yn(o, e) ?? {
|
|
1493
1493
|
src: null,
|
|
1494
1494
|
alt: null,
|
|
1495
1495
|
decorative: null
|
|
@@ -1501,31 +1501,31 @@ function Qr(e) {
|
|
|
1501
1501
|
}));
|
|
1502
1502
|
return V("replay", n, async (e) => {
|
|
1503
1503
|
try {
|
|
1504
|
-
|
|
1504
|
+
U(e), C(t);
|
|
1505
1505
|
let r = crypto.randomUUID();
|
|
1506
1506
|
for (let t = 0; t < s.length; t += 100) {
|
|
1507
|
-
|
|
1508
|
-
let a =
|
|
1509
|
-
if (!a.applied) throw new
|
|
1507
|
+
U(e);
|
|
1508
|
+
let a = ae(s.slice(t, t + 100), r, n, i);
|
|
1509
|
+
if (!a.applied) throw new we(a.message, {
|
|
1510
1510
|
code: a.code,
|
|
1511
1511
|
opIndex: a.opIndex
|
|
1512
1512
|
});
|
|
1513
1513
|
}
|
|
1514
1514
|
} catch (e) {
|
|
1515
|
-
throw
|
|
1515
|
+
throw q(e), e;
|
|
1516
1516
|
}
|
|
1517
1517
|
}, () => {});
|
|
1518
1518
|
}
|
|
1519
1519
|
return {
|
|
1520
1520
|
capability: {
|
|
1521
1521
|
isFeatureEnabled: (e) => v.value && w(e),
|
|
1522
|
-
open:
|
|
1523
|
-
startImport:
|
|
1522
|
+
open: ye,
|
|
1523
|
+
startImport: be,
|
|
1524
1524
|
highlightOf: (e) => _.value?.highlights.value.get(e) ?? null
|
|
1525
1525
|
},
|
|
1526
1526
|
panel: s,
|
|
1527
|
-
open:
|
|
1528
|
-
close:
|
|
1527
|
+
open: ye,
|
|
1528
|
+
close: Te,
|
|
1529
1529
|
has: w,
|
|
1530
1530
|
templateId: g,
|
|
1531
1531
|
sessionIdentity: y(() => _.value),
|
|
@@ -1541,12 +1541,12 @@ function Qr(e) {
|
|
|
1541
1541
|
keptYourVersion: I,
|
|
1542
1542
|
reloadTemplate: () => {
|
|
1543
1543
|
let e = T();
|
|
1544
|
-
return e ? V("reconcile", e, (e) =>
|
|
1544
|
+
return e ? V("reconcile", e, (e) => G(e), () => {}) : Promise.resolve();
|
|
1545
1545
|
},
|
|
1546
1546
|
failedPrompt: L,
|
|
1547
1547
|
failedAttachments: R,
|
|
1548
1548
|
importQueue: z,
|
|
1549
|
-
startImport:
|
|
1549
|
+
startImport: be,
|
|
1550
1550
|
isTemplateEmpty: k,
|
|
1551
1551
|
send: (e, t = []) => {
|
|
1552
1552
|
let r = n.chat;
|
|
@@ -1578,26 +1578,26 @@ function Qr(e) {
|
|
|
1578
1578
|
failed: !0
|
|
1579
1579
|
});
|
|
1580
1580
|
},
|
|
1581
|
-
stop:
|
|
1582
|
-
newChat:
|
|
1583
|
-
undoMessage: (e) =>
|
|
1584
|
-
redoMessage: (e) =>
|
|
1581
|
+
stop: Ce,
|
|
1582
|
+
newChat: ge,
|
|
1583
|
+
undoMessage: (e) => de(e, "undo"),
|
|
1584
|
+
redoMessage: (e) => de(e, "redo"),
|
|
1585
1585
|
rewrite: (e, t, r) => {
|
|
1586
1586
|
let i = b, a = T(), o = n.rewrite;
|
|
1587
1587
|
return !a || typeof o != "function" ? Promise.reject(/* @__PURE__ */ Error("Rewrite isn't available.")) : V("read", a, async (n) => {
|
|
1588
1588
|
let s = () => n.controller.abort(r.reason);
|
|
1589
1589
|
r.addEventListener("abort", s, { once: !0 });
|
|
1590
1590
|
try {
|
|
1591
|
-
r.throwIfAborted(),
|
|
1592
|
-
let s = await
|
|
1591
|
+
r.throwIfAborted(), U(n), C(i);
|
|
1592
|
+
let s = await W(o({
|
|
1593
1593
|
...ne(a.id),
|
|
1594
1594
|
...e
|
|
1595
1595
|
}, { onText: (e) => {
|
|
1596
|
-
|
|
1596
|
+
U(n), C(i), t(e);
|
|
1597
1597
|
} }, n.controller.signal), n.controller.signal);
|
|
1598
1598
|
return C(i), s;
|
|
1599
1599
|
} catch (e) {
|
|
1600
|
-
throw
|
|
1600
|
+
throw q(e), e;
|
|
1601
1601
|
} finally {
|
|
1602
1602
|
r.removeEventListener("abort", s);
|
|
1603
1603
|
}
|
|
@@ -1605,15 +1605,15 @@ function Qr(e) {
|
|
|
1605
1605
|
throw new DOMException("Rewrite stopped.", "AbortError");
|
|
1606
1606
|
});
|
|
1607
1607
|
},
|
|
1608
|
-
draftAltText:
|
|
1609
|
-
applyAltTexts:
|
|
1608
|
+
draftAltText: Ae,
|
|
1609
|
+
applyAltTexts: je,
|
|
1610
1610
|
destroy: () => {
|
|
1611
1611
|
if (l) return;
|
|
1612
1612
|
l = !0;
|
|
1613
1613
|
let e = _.value;
|
|
1614
|
-
e &&
|
|
1615
|
-
for (let e of
|
|
1616
|
-
|
|
1614
|
+
e && Se(e), _.value = null, x();
|
|
1615
|
+
for (let e of Oe) e();
|
|
1616
|
+
Oe.length = 0;
|
|
1617
1617
|
}
|
|
1618
1618
|
};
|
|
1619
1619
|
}
|
|
@@ -1630,7 +1630,7 @@ function ei(e, t) {
|
|
|
1630
1630
|
return n.length > t ? n.slice(0, t).join("") : e;
|
|
1631
1631
|
}
|
|
1632
1632
|
function ti(e) {
|
|
1633
|
-
return
|
|
1633
|
+
return ue(e) ?? "custom";
|
|
1634
1634
|
}
|
|
1635
1635
|
function ni(e, t) {
|
|
1636
1636
|
let n = [];
|
|
@@ -1712,7 +1712,7 @@ function ai(e) {
|
|
|
1712
1712
|
};
|
|
1713
1713
|
}
|
|
1714
1714
|
function oi(e) {
|
|
1715
|
-
let t =
|
|
1715
|
+
let t = re(e.width, e.height);
|
|
1716
1716
|
return {
|
|
1717
1717
|
url: e.url,
|
|
1718
1718
|
alt: e.alt,
|
|
@@ -1724,7 +1724,7 @@ function oi(e) {
|
|
|
1724
1724
|
}
|
|
1725
1725
|
// src/composables/useSavedBlocksFeature.ts
|
|
1726
1726
|
function si(e) {
|
|
1727
|
-
let { provider: n, editor: r } = e, i =
|
|
1727
|
+
let { provider: n, editor: r } = e, i = ne({
|
|
1728
1728
|
provider: n,
|
|
1729
1729
|
onError: e.onError
|
|
1730
1730
|
}), a = S(!1), o = S(!1), s = S(!1), c = S(/* @__PURE__ */ new Set()), u = y(() => s.value), d = y(() => c.value.size);
|
|
@@ -1759,7 +1759,7 @@ function si(e) {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
function x(e, t) {
|
|
1761
1761
|
for (let n = 0; n < e.content.length; n++) {
|
|
1762
|
-
let i =
|
|
1762
|
+
let i = me(e.content[n]), a = t === void 0 ? void 0 : t + n;
|
|
1763
1763
|
r.addBlock(i, void 0, void 0, a);
|
|
1764
1764
|
}
|
|
1765
1765
|
o.value = !1;
|
|
@@ -1768,7 +1768,7 @@ function si(e) {
|
|
|
1768
1768
|
i.load().catch(() => {});
|
|
1769
1769
|
}
|
|
1770
1770
|
let w = y(() => i.savedBlocks.value.length), T = y(() => e.isAvailable?.() ?? !0);
|
|
1771
|
-
return l(
|
|
1771
|
+
return l(tt, i), {
|
|
1772
1772
|
headless: i,
|
|
1773
1773
|
isPicking: u,
|
|
1774
1774
|
pickedIds: c,
|
|
@@ -1806,7 +1806,7 @@ function si(e) {
|
|
|
1806
1806
|
// src/composables/useTemplatesFeature.ts
|
|
1807
1807
|
var ci = 3e3;
|
|
1808
1808
|
function li(e) {
|
|
1809
|
-
let { provider: t, editor: n } = e, r = S("idle"), i = S(""), { start: a, stop: o } =
|
|
1809
|
+
let { provider: t, editor: n } = e, r = S("idle"), i = S(""), { start: a, stop: o } = Hn(() => {
|
|
1810
1810
|
r.value = "idle";
|
|
1811
1811
|
}, ci, { immediate: !1 }), s = y(() => typeof t.create == "function"), c = y(() => typeof t.save == "function"), l = y(() => e.isAvailable?.() ?? !0), u = y(() => n.state.template?.name), d = y(() => {
|
|
1812
1812
|
let e = n.state.template;
|
|
@@ -1872,7 +1872,7 @@ function li(e) {
|
|
|
1872
1872
|
let t = e.trim();
|
|
1873
1873
|
t && t !== n.state.template?.name && (n.setName(t), w("rename"));
|
|
1874
1874
|
}
|
|
1875
|
-
return e.guardUnsavedChanges !== !1 &&
|
|
1875
|
+
return e.guardUnsavedChanges !== !1 && En(window, "beforeunload", (e) => {
|
|
1876
1876
|
n.state.isDirty && (e.preventDefault(), e.returnValue = "");
|
|
1877
1877
|
}), {
|
|
1878
1878
|
save: g,
|
|
@@ -1957,7 +1957,7 @@ function mi(e) {
|
|
|
1957
1957
|
return await e.renderMjml();
|
|
1958
1958
|
} catch (t) {
|
|
1959
1959
|
if ((e.usesLocalRenderer?.() ?? !0) && await ui() === null) {
|
|
1960
|
-
s || (s = !0,
|
|
1960
|
+
s || (s = !0, Dn.warn("testEmail.includeMjml is set but @templatical/renderer is not installed — sending the template as JSON only. Install it to receive `payload.mjml`."));
|
|
1961
1961
|
return;
|
|
1962
1962
|
}
|
|
1963
1963
|
throw t;
|
|
@@ -2014,7 +2014,7 @@ function mi(e) {
|
|
|
2014
2014
|
}
|
|
2015
2015
|
// src/composables/useVersionHistoryFeature.ts
|
|
2016
2016
|
function hi(e) {
|
|
2017
|
-
let { provider: t, editor: n, history: r, conditionPreview: i, autoSave: a } = e, o = e.collaboration ?? null, s =
|
|
2017
|
+
let { provider: t, editor: n, history: r, conditionPreview: i, autoSave: a } = e, o = e.collaboration ?? null, s = G({
|
|
2018
2018
|
provider: t,
|
|
2019
2019
|
getTemplateId: () => n.state.template?.id ?? null,
|
|
2020
2020
|
onError: e.onError
|
|
@@ -2040,7 +2040,7 @@ function hi(e) {
|
|
|
2040
2040
|
return;
|
|
2041
2041
|
}
|
|
2042
2042
|
let t = await s.resolveContent(e);
|
|
2043
|
-
f || (l.value =
|
|
2043
|
+
f || (l.value = Ne(n.content.value), a?.pause(), o?.suspend(), c.value = e, n.setContent(t, !1));
|
|
2044
2044
|
}
|
|
2045
2045
|
async function O() {
|
|
2046
2046
|
c.value && (n.state.isDirty ? u.value = !0 : await M());
|
|
@@ -2203,25 +2203,25 @@ var bi = ["aria-label"], xi = ["lang", "dir"], Si = {
|
|
|
2203
2203
|
emits: ["select-block"],
|
|
2204
2204
|
setup(e, { emit: t }) {
|
|
2205
2205
|
let r = {
|
|
2206
|
-
section:
|
|
2207
|
-
title:
|
|
2208
|
-
paragraph:
|
|
2209
|
-
image:
|
|
2210
|
-
button:
|
|
2211
|
-
divider:
|
|
2212
|
-
spacer:
|
|
2213
|
-
html:
|
|
2214
|
-
social:
|
|
2215
|
-
menu:
|
|
2216
|
-
table:
|
|
2217
|
-
video:
|
|
2218
|
-
custom:
|
|
2219
|
-
wrapper:
|
|
2220
|
-
}, i = e, u = t, { t: p } = $(), m =
|
|
2206
|
+
section: sn,
|
|
2207
|
+
title: qt,
|
|
2208
|
+
paragraph: tn,
|
|
2209
|
+
image: Yt,
|
|
2210
|
+
button: dn,
|
|
2211
|
+
divider: un,
|
|
2212
|
+
spacer: Wt,
|
|
2213
|
+
html: Ut,
|
|
2214
|
+
social: rn,
|
|
2215
|
+
menu: Xt,
|
|
2216
|
+
table: Zt,
|
|
2217
|
+
video: on,
|
|
2218
|
+
custom: fn,
|
|
2219
|
+
wrapper: jn
|
|
2220
|
+
}, i = e, u = t, { t: p } = $(), m = _t(bt, "Canvas"), { displayBlock: _, settings: T } = Ue({
|
|
2221
2221
|
content: y(() => i.content),
|
|
2222
2222
|
activeLocale: y(() => i.previewMode ? null : m.activeLocale?.value ?? null)
|
|
2223
|
-
}), E =
|
|
2224
|
-
l(
|
|
2223
|
+
}), E = _t(it, "Canvas"), D = L(pt, null), k = L(ft, null), A = L(ot, {}), j = L(et, null), N = L(Ye, null);
|
|
2224
|
+
l(ht, y(() => i.previewMode && (j?.value ?? !1) && !N?.isConfigured));
|
|
2225
2225
|
let P = y(() => A.ai?.isFeatureEnabled("chat") ?? !1), I = y(() => P.value && (A.ai?.isFeatureEnabled("chatAttachments") ?? !1)), R = S(null);
|
|
2226
2226
|
function z() {
|
|
2227
2227
|
R.value?.click();
|
|
@@ -2230,38 +2230,38 @@ var bi = ["aria-label"], xi = ["lang", "dir"], Si = {
|
|
|
2230
2230
|
let t = e.target, n = Array.from(t.files ?? []);
|
|
2231
2231
|
t.value = "", n.length && A.ai?.startImport(n);
|
|
2232
2232
|
}
|
|
2233
|
-
let V = L(
|
|
2233
|
+
let V = L(nt, null), U = y({
|
|
2234
2234
|
get: () => i.content.blocks,
|
|
2235
|
-
set: (e) =>
|
|
2236
|
-
}),
|
|
2237
|
-
function
|
|
2235
|
+
set: (e) => an(m, e)
|
|
2236
|
+
}), W = y(() => se(T.value, i.viewport)), G = y(() => W.value + 192), ee = y(() => Nt(T.value, E.resolveFontFamily)), K = y(() => T.value?.locale?.trim() || void 0), q = y(() => le(T.value)), J = y(() => U.value.length === 0 && !i.previewMode), Y = S(0), te = y(() => J.value && Y.value > 0);
|
|
2237
|
+
function ne() {
|
|
2238
2238
|
J.value && (Y.value += 1);
|
|
2239
2239
|
}
|
|
2240
|
-
function
|
|
2240
|
+
function re() {
|
|
2241
2241
|
J.value && (Y.value = Math.max(0, Y.value - 1));
|
|
2242
2242
|
}
|
|
2243
|
-
function
|
|
2243
|
+
function ie() {
|
|
2244
2244
|
Y.value = 0;
|
|
2245
2245
|
}
|
|
2246
2246
|
function oe(e) {
|
|
2247
2247
|
i.previewMode || A.savedBlocks?.isPicking.value || e.target === e.currentTarget && u("select-block", null);
|
|
2248
2248
|
}
|
|
2249
|
-
function
|
|
2250
|
-
return
|
|
2249
|
+
function ce(e) {
|
|
2250
|
+
return $t(e, k, r);
|
|
2251
2251
|
}
|
|
2252
|
-
function
|
|
2252
|
+
function ue(e) {
|
|
2253
2253
|
return A.collaboration?.lockOf(e) != null;
|
|
2254
2254
|
}
|
|
2255
|
-
function
|
|
2256
|
-
if (i.previewMode ||
|
|
2255
|
+
function de(e) {
|
|
2256
|
+
if (i.previewMode || ue(e)) return;
|
|
2257
2257
|
let t = A.savedBlocks;
|
|
2258
2258
|
t?.isPicking.value ? t.togglePick(e) : u("select-block", e);
|
|
2259
2259
|
}
|
|
2260
|
-
function
|
|
2260
|
+
function X(e) {
|
|
2261
2261
|
return A.savedBlocks?.isPicked(e) ?? !1;
|
|
2262
2262
|
}
|
|
2263
|
-
let
|
|
2264
|
-
function
|
|
2263
|
+
let fe = y(() => A.savedBlocks?.isPicking.value === !0);
|
|
2264
|
+
function pe(e, t) {
|
|
2265
2265
|
e.type === "custom" && m.updateBlock(e.id, {
|
|
2266
2266
|
fieldValues: t.fieldValues,
|
|
2267
2267
|
dataSourceFetched: t.dataSourceFetched
|
|
@@ -2270,11 +2270,11 @@ var bi = ["aria-label"], xi = ["lang", "dir"], Si = {
|
|
|
2270
2270
|
return (t, r) => (s(), C("div", {
|
|
2271
2271
|
class: "tpl-canvas-stage tpl:relative tpl:mx-auto tpl:flex tpl:justify-center tpl:rounded-lg",
|
|
2272
2272
|
style: f({
|
|
2273
|
-
width: `${
|
|
2273
|
+
width: `${G.value}px`,
|
|
2274
2274
|
maxWidth: "calc(100% - 4 * var(--tpl-base-size))",
|
|
2275
2275
|
minWidth: "min-content",
|
|
2276
2276
|
boxShadow: e.darkMode ? "none" : "var(--tpl-shadow-xl)",
|
|
2277
|
-
transition: b(
|
|
2277
|
+
transition: b(ae)
|
|
2278
2278
|
})
|
|
2279
2279
|
}, [O("div", {
|
|
2280
2280
|
class: "tpl-canvas-bg tpl:absolute tpl:inset-0 tpl:rounded-lg tpl:pointer-events-none",
|
|
@@ -2289,9 +2289,9 @@ var bi = ["aria-label"], xi = ["lang", "dir"], Si = {
|
|
|
2289
2289
|
"aria-label": b(p).landmarks.canvas,
|
|
2290
2290
|
class: "tpl-canvas-wrapper tpl:relative",
|
|
2291
2291
|
style: f({
|
|
2292
|
-
width: `${
|
|
2293
|
-
[b(
|
|
2294
|
-
transition: b(
|
|
2292
|
+
width: `${W.value}px`,
|
|
2293
|
+
[b(Vt)]: `${W.value}px`,
|
|
2294
|
+
transition: b(ae)
|
|
2295
2295
|
})
|
|
2296
2296
|
}, [O("div", {
|
|
2297
2297
|
class: c(["tpl-canvas tpl:relative tpl:rounded-lg", {
|
|
@@ -2300,15 +2300,15 @@ var bi = ["aria-label"], xi = ["lang", "dir"], Si = {
|
|
|
2300
2300
|
}]),
|
|
2301
2301
|
lang: K.value,
|
|
2302
2302
|
dir: q.value,
|
|
2303
|
-
style: f(
|
|
2303
|
+
style: f(ee.value),
|
|
2304
2304
|
onClick: oe
|
|
2305
2305
|
}, [b(N)?.isInitialResolve.value ? (s(), C("div", Si, [O("span", Ci, a(b(p).previewResolution.resolving), 1), (s(), C(M, null, d(3, (e) => O("div", {
|
|
2306
2306
|
key: e,
|
|
2307
2307
|
"aria-hidden": "true",
|
|
2308
2308
|
class: "tpl-pulse tpl:h-16 tpl:rounded-md tpl:bg-[var(--tpl-bg-hover)]"
|
|
2309
|
-
})), 64))])) : b(N)?.hasFailed.value ? (s(), C("p", wi, a(b(p).previewResolution.failed), 1)) : x("", !0), g(v(b(
|
|
2310
|
-
modelValue:
|
|
2311
|
-
"onUpdate:modelValue": r[1] ||= (e) =>
|
|
2309
|
+
})), 64))])) : b(N)?.hasFailed.value ? (s(), C("p", wi, a(b(p).previewResolution.failed), 1)) : x("", !0), g(v(b(Kt), {
|
|
2310
|
+
modelValue: U.value,
|
|
2311
|
+
"onUpdate:modelValue": r[1] ||= (e) => U.value = e,
|
|
2312
2312
|
group: "blocks",
|
|
2313
2313
|
animation: 150,
|
|
2314
2314
|
"ghost-class": "tpl-ghost",
|
|
@@ -2322,13 +2322,13 @@ var bi = ["aria-label"], xi = ["lang", "dir"], Si = {
|
|
|
2322
2322
|
class: c([
|
|
2323
2323
|
"tpl-canvas-blocks",
|
|
2324
2324
|
J.value ? "tpl-canvas-empty tpl:m-6 tpl:flex tpl:min-h-[400px] tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-xl tpl:border-2 tpl:border-dashed tpl:px-10 tpl:py-12 tpl:text-center tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)] tpl:transition-colors" : "",
|
|
2325
|
-
J.value &&
|
|
2326
|
-
J.value && !
|
|
2325
|
+
J.value && te.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
|
|
2326
|
+
J.value && !te.value ? "tpl:border-[var(--tpl-primary)]" : ""
|
|
2327
2327
|
]),
|
|
2328
|
-
onUpdate: r[2] ||= (e) => b(
|
|
2329
|
-
onDragenter:
|
|
2330
|
-
onDragleave:
|
|
2331
|
-
onDrop:
|
|
2328
|
+
onUpdate: r[2] ||= (e) => b(an)(b(m), U.value, void 0, 0, e),
|
|
2329
|
+
onDragenter: ne,
|
|
2330
|
+
onDragleave: re,
|
|
2331
|
+
onDrop: ie
|
|
2332
2332
|
}, {
|
|
2333
2333
|
default: h(() => [J.value ? (s(), C("div", Ti, [
|
|
2334
2334
|
O("div", Ei, [v(b(ur), {
|
|
@@ -2344,7 +2344,7 @@ var bi = ["aria-label"], xi = ["lang", "dir"], Si = {
|
|
|
2344
2344
|
"data-testid": "canvas-ai-chat",
|
|
2345
2345
|
class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
2346
2346
|
onClick: r[0] ||= (e) => b(A).ai?.open("chat")
|
|
2347
|
-
}, [v(b(
|
|
2347
|
+
}, [v(b(An), {
|
|
2348
2348
|
size: 14,
|
|
2349
2349
|
"stroke-width": 2,
|
|
2350
2350
|
"aria-hidden": "true"
|
|
@@ -2373,26 +2373,26 @@ var bi = ["aria-label"], xi = ["lang", "dir"], Si = {
|
|
|
2373
2373
|
onChange: B
|
|
2374
2374
|
}, null, 544)
|
|
2375
2375
|
])) : x("", !0)
|
|
2376
|
-
])) : x("", !0), (s(!0), C(M, null, d(
|
|
2376
|
+
])) : x("", !0), (s(!0), C(M, null, d(U.value, (t) => g((s(), C("div", {
|
|
2377
2377
|
key: t.id,
|
|
2378
2378
|
class: "tpl-block-item"
|
|
2379
|
-
}, [O("div", ji, [t.type === "wrapper" ? (s(), F(o(
|
|
2379
|
+
}, [O("div", ji, [t.type === "wrapper" ? (s(), F(o(ce(t)), {
|
|
2380
2380
|
key: 0,
|
|
2381
2381
|
block: t,
|
|
2382
2382
|
viewport: e.viewport
|
|
2383
|
-
}, null, 8, ["block", "viewport"])) : (s(), F(
|
|
2383
|
+
}, null, 8, ["block", "viewport"])) : (s(), F(Jt, {
|
|
2384
2384
|
key: 1,
|
|
2385
2385
|
block: t,
|
|
2386
2386
|
"display-block": b(_)(t),
|
|
2387
|
-
"is-selected": !e.previewMode && !
|
|
2388
|
-
picked:
|
|
2387
|
+
"is-selected": !e.previewMode && !fe.value && e.selectedBlockId === t.id && !ue(t.id),
|
|
2388
|
+
picked: X(t.id),
|
|
2389
2389
|
viewport: e.viewport,
|
|
2390
2390
|
"preview-mode": e.previewMode,
|
|
2391
|
-
onSelect: (e) =>
|
|
2391
|
+
onSelect: (e) => de(t.id)
|
|
2392
2392
|
}, {
|
|
2393
|
-
default: h(() => [(s(), F(o(
|
|
2393
|
+
default: h(() => [(s(), F(o(ce(t)), n({ block: b(_)(t) }, { ref_for: !0 }, t.type === "section" ? { sourceBlock: t } : {}, {
|
|
2394
2394
|
viewport: e.viewport,
|
|
2395
|
-
onFetchData: (e) =>
|
|
2395
|
+
onFetchData: (e) => pe(t, e),
|
|
2396
2396
|
onUpdate: (e) => b(m).updateBlock(t.id, e)
|
|
2397
2397
|
}), null, 16, [
|
|
2398
2398
|
"block",
|
|
@@ -2409,18 +2409,18 @@ var bi = ["aria-label"], xi = ["lang", "dir"], Si = {
|
|
|
2409
2409
|
"viewport",
|
|
2410
2410
|
"preview-mode",
|
|
2411
2411
|
"onSelect"
|
|
2412
|
-
]))])])), [[
|
|
2412
|
+
]))])])), [[H, b(V) === !1 || !b(D)?.isHidden(t.id)]])), 128))]),
|
|
2413
2413
|
_: 1
|
|
2414
2414
|
}, 8, [
|
|
2415
2415
|
"modelValue",
|
|
2416
2416
|
"disabled",
|
|
2417
2417
|
"class"
|
|
2418
|
-
]), [[
|
|
2418
|
+
]), [[H, !b(N)?.isInitialResolve.value]])], 14, xi)], 12, bi)], 4));
|
|
2419
2419
|
}
|
|
2420
2420
|
}), [["__scopeId", "data-v-c72f1327"]]), Ni = R({
|
|
2421
2421
|
name: "CustomBlockStylesheets",
|
|
2422
2422
|
setup() {
|
|
2423
|
-
let e = L(
|
|
2423
|
+
let e = L(ct, null);
|
|
2424
2424
|
return () => e ? e.value.map((e, t) => m("style", {
|
|
2425
2425
|
key: t,
|
|
2426
2426
|
"data-tpl-custom-block-stylesheet": "",
|
|
@@ -2464,7 +2464,7 @@ var Fi = ["aria-label"], Ii = {
|
|
|
2464
2464
|
}, Hi = 4, Ui = /* @__PURE__ */ R({
|
|
2465
2465
|
__name: "Sidebar",
|
|
2466
2466
|
setup(e) {
|
|
2467
|
-
let { t: n, format: r } = $(), i = L(
|
|
2467
|
+
let { t: n, format: r } = $(), i = L(lt, []), c = L(Xe, void 0), l = L(at, void 0), u = L(bt, null), p = Tn(), m = L(ot, {}), g = y(() => m.savedBlocks?.isAvailable.value === !0), w = S(!1), T = S(!1), E = S(null), D = !1, k = 0;
|
|
2468
2468
|
_(() => {
|
|
2469
2469
|
window.clearTimeout(k);
|
|
2470
2470
|
});
|
|
@@ -2505,7 +2505,7 @@ var Fi = ["aria-label"], Ii = {
|
|
|
2505
2505
|
}
|
|
2506
2506
|
let V = [
|
|
2507
2507
|
"section",
|
|
2508
|
-
|
|
2508
|
+
en,
|
|
2509
2509
|
"image",
|
|
2510
2510
|
"title",
|
|
2511
2511
|
"paragraph",
|
|
@@ -2517,41 +2517,41 @@ var Fi = ["aria-label"], Ii = {
|
|
|
2517
2517
|
"table",
|
|
2518
2518
|
"spacer",
|
|
2519
2519
|
"html"
|
|
2520
|
-
],
|
|
2520
|
+
], H = y(() => {
|
|
2521
2521
|
let e = V.map((e) => ({
|
|
2522
2522
|
type: e,
|
|
2523
|
-
label:
|
|
2523
|
+
label: ie(e, n)
|
|
2524
2524
|
}));
|
|
2525
2525
|
return m.plan && e.splice(-1, 0, {
|
|
2526
2526
|
type: "countdown",
|
|
2527
|
-
label:
|
|
2527
|
+
label: ie("countdown", n)
|
|
2528
2528
|
}), e;
|
|
2529
|
-
}),
|
|
2529
|
+
}), U = y(() => i.map((e) => ({
|
|
2530
2530
|
type: `custom:${e.type}`,
|
|
2531
2531
|
label: e.name,
|
|
2532
2532
|
isCustom: !0,
|
|
2533
2533
|
icon: e.icon
|
|
2534
|
-
}))),
|
|
2535
|
-
t(() =>
|
|
2536
|
-
for (let t of e)
|
|
2534
|
+
}))), W = y(() => [...H.value, ...U.value]), G = y(() => Pi(W.value, c)), ee = y(() => G.value.items), K = /* @__PURE__ */ new Set();
|
|
2535
|
+
t(() => G.value.unknown, (e) => {
|
|
2536
|
+
for (let t of e) K.has(t) || (K.add(t), Dn.warn(`config.paletteBlocks: "${t}" is not a built-in or registered custom block (use the "custom:" prefix for custom blocks) — skipping it in the palette.`));
|
|
2537
2537
|
}, { immediate: !0 });
|
|
2538
|
-
function
|
|
2538
|
+
function q(e) {
|
|
2539
2539
|
if (e.isCustom) {
|
|
2540
2540
|
let t = e.type.replace("custom:", ""), n = i.find((e) => e.type === t);
|
|
2541
|
-
if (n) return
|
|
2541
|
+
if (n) return ge(n);
|
|
2542
2542
|
}
|
|
2543
|
-
return e.type === "hero" ?
|
|
2543
|
+
return e.type === "hero" ? ln(l?.value, n.blockDefaults.paragraph) : Ae(e.type, l?.value);
|
|
2544
2544
|
}
|
|
2545
|
-
function
|
|
2545
|
+
function J(e) {
|
|
2546
2546
|
if (!u) return;
|
|
2547
|
-
let t =
|
|
2547
|
+
let t = q(e);
|
|
2548
2548
|
vi(u, t) && p(t.id);
|
|
2549
2549
|
}
|
|
2550
|
-
function
|
|
2551
|
-
D ||
|
|
2550
|
+
function Y(e) {
|
|
2551
|
+
D || J(e);
|
|
2552
2552
|
}
|
|
2553
|
-
function
|
|
2554
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
2553
|
+
function te(e, t) {
|
|
2554
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), J(t));
|
|
2555
2555
|
}
|
|
2556
2556
|
return (e, t) => (s(), C("aside", {
|
|
2557
2557
|
ref_key: "railEl",
|
|
@@ -2575,18 +2575,18 @@ var Fi = ["aria-label"], Ii = {
|
|
|
2575
2575
|
class: "tpl:flex tpl:h-10 tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)]",
|
|
2576
2576
|
style: f({ justifyContent: w.value ? "flex-start" : "center" }),
|
|
2577
2577
|
onClick: t[0] ||= (e) => b(m).savedBlocks?.openBrowser()
|
|
2578
|
-
}, [v(b(
|
|
2578
|
+
}, [v(b(Mn), {
|
|
2579
2579
|
size: 20,
|
|
2580
2580
|
"stroke-width": 1.5,
|
|
2581
2581
|
class: "tpl:shrink-0"
|
|
2582
|
-
}), w.value ? (s(), C("span", Ri, a(b(n).savedBlocks.title), 1)) : x("", !0)], 12, Li)])) : x("", !0), v(b(
|
|
2583
|
-
"model-value":
|
|
2582
|
+
}), w.value ? (s(), C("span", Ri, a(b(n).savedBlocks.title), 1)) : x("", !0)], 12, Li)])) : x("", !0), v(b(Kt), {
|
|
2583
|
+
"model-value": ee.value,
|
|
2584
2584
|
group: {
|
|
2585
2585
|
name: "blocks",
|
|
2586
2586
|
pull: "clone",
|
|
2587
2587
|
put: !1
|
|
2588
2588
|
},
|
|
2589
|
-
clone:
|
|
2589
|
+
clone: q,
|
|
2590
2590
|
sort: !1,
|
|
2591
2591
|
animation: 150,
|
|
2592
2592
|
"force-fallback": !0,
|
|
@@ -2597,20 +2597,20 @@ var Fi = ["aria-label"], Ii = {
|
|
|
2597
2597
|
onUnchoose: P,
|
|
2598
2598
|
onEnd: B
|
|
2599
2599
|
}, {
|
|
2600
|
-
default: h(() => [(s(!0), C(M, null, d(
|
|
2600
|
+
default: h(() => [(s(!0), C(M, null, d(ee.value, (e) => (s(), C("button", {
|
|
2601
2601
|
key: e.type,
|
|
2602
2602
|
type: "button",
|
|
2603
2603
|
"data-palette-type": e.type,
|
|
2604
2604
|
"aria-label": b(r)(b(n).sidebarNav.insertBlock, { block: e.label }),
|
|
2605
2605
|
class: "tpl:flex tpl:h-10 tpl:w-full tpl:shrink-0 tpl:cursor-grab tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:active:cursor-grabbing",
|
|
2606
2606
|
style: f({ justifyContent: w.value ? "flex-start" : "center" }),
|
|
2607
|
-
onClick: (t) =>
|
|
2608
|
-
onKeydown: (t) =>
|
|
2609
|
-
}, [O("div", Bi, [b(
|
|
2607
|
+
onClick: (t) => Y(e),
|
|
2608
|
+
onKeydown: (t) => te(t, e)
|
|
2609
|
+
}, [O("div", Bi, [b(Nn)[e.type] ? (s(), F(o(b(Nn)[e.type]), {
|
|
2610
2610
|
key: 0,
|
|
2611
2611
|
size: 20,
|
|
2612
2612
|
"stroke-width": 1.5
|
|
2613
|
-
})) : e.isCustom ? (s(), F(
|
|
2613
|
+
})) : e.isCustom ? (s(), F(Gt, {
|
|
2614
2614
|
key: 1,
|
|
2615
2615
|
icon: e.icon,
|
|
2616
2616
|
size: 20
|
|
@@ -2674,7 +2674,7 @@ var Fi = ["aria-label"], Ii = {
|
|
|
2674
2674
|
"update-settings"
|
|
2675
2675
|
], ["update:tab"]),
|
|
2676
2676
|
setup(e, { emit: n }) {
|
|
2677
|
-
let r = I(() => import("./Toolbar-
|
|
2677
|
+
let r = I(() => import("./Toolbar-pzNIakGM.js").then((e) => e.t)), i = I(() => import("./TemplateSettings-CYFtR8zv.js")), o = I(() => import("./IssuesPanel-uwuzeMSW.js")), l = e, u = n, { t: d } = $(), m = p(e, "tab"), h = L(Ge, null), g = y(() => h !== null && !h.unavailable.value), _ = y(() => h?.issues.value.length ?? 0), S = L(st, new Set(Pn)), w = y(() => S.size > 0);
|
|
2678
2678
|
function T(e) {
|
|
2679
2679
|
return m.value === e ? "tpl:flex-1 tpl:text-[var(--tpl-primary)]" : "tpl:shrink-0 tpl:text-[var(--tpl-text-muted)] tpl:hover:text-[var(--tpl-text)]";
|
|
2680
2680
|
}
|
|
@@ -2734,7 +2734,7 @@ var Fi = ["aria-label"], Ii = {
|
|
|
2734
2734
|
style: f(E("issues")),
|
|
2735
2735
|
onClick: n[2] ||= (e) => m.value = "issues"
|
|
2736
2736
|
}, [
|
|
2737
|
-
v(b(
|
|
2737
|
+
v(b(Cn), {
|
|
2738
2738
|
size: 14,
|
|
2739
2739
|
"stroke-width": 1.5
|
|
2740
2740
|
}),
|
|
@@ -2773,7 +2773,7 @@ var Fi = ["aria-label"], Ii = {
|
|
|
2773
2773
|
setup(e) {
|
|
2774
2774
|
let { t } = $();
|
|
2775
2775
|
return (e, n) => (s(), C("div", sa, [
|
|
2776
|
-
O("div", ca, [v(b(
|
|
2776
|
+
O("div", ca, [v(b(Fn), {
|
|
2777
2777
|
size: 48,
|
|
2778
2778
|
"stroke-width": 1.5
|
|
2779
2779
|
})]),
|
|
@@ -2942,7 +2942,7 @@ var _a = [
|
|
|
2942
2942
|
title: e.darkMode ? b(r).darkMode.disable : b(r).darkMode.enable,
|
|
2943
2943
|
"aria-pressed": e.darkMode,
|
|
2944
2944
|
onClick: i[0] ||= (t) => n("change", !e.darkMode)
|
|
2945
|
-
}, [v(
|
|
2945
|
+
}, [v(W, {
|
|
2946
2946
|
"enter-active-class": "tpl-icon-enter-active",
|
|
2947
2947
|
"leave-active-class": "tpl-icon-leave-active",
|
|
2948
2948
|
"enter-from-class": "tpl-icon-enter-from",
|
|
@@ -2981,18 +2981,18 @@ var _a = [
|
|
|
2981
2981
|
title: e.previewMode ? b(r).previewMode.disable : b(r).previewMode.enable,
|
|
2982
2982
|
"aria-pressed": e.previewMode,
|
|
2983
2983
|
onClick: i[0] ||= (t) => n("change", !e.previewMode)
|
|
2984
|
-
}, [v(
|
|
2984
|
+
}, [v(W, {
|
|
2985
2985
|
"enter-active-class": "tpl-icon-enter-active",
|
|
2986
2986
|
"leave-active-class": "tpl-icon-leave-active",
|
|
2987
2987
|
"enter-from-class": "tpl-icon-enter-from",
|
|
2988
2988
|
"leave-to-class": "tpl-icon-leave-to",
|
|
2989
2989
|
mode: "out-in"
|
|
2990
2990
|
}, {
|
|
2991
|
-
default: h(() => [e.previewMode ? (s(), F(b(
|
|
2991
|
+
default: h(() => [e.previewMode ? (s(), F(b(Vn), {
|
|
2992
2992
|
key: "eye",
|
|
2993
2993
|
size: 18,
|
|
2994
2994
|
"stroke-width": 1.5
|
|
2995
|
-
})) : (s(), F(b(
|
|
2995
|
+
})) : (s(), F(b(Ft), {
|
|
2996
2996
|
key: "eye-off",
|
|
2997
2997
|
size: 18,
|
|
2998
2998
|
"stroke-width": 1.5
|
|
@@ -3029,8 +3029,8 @@ var _a = [
|
|
|
3029
3029
|
type: "text",
|
|
3030
3030
|
"data-testid": "template-name-input",
|
|
3031
3031
|
"aria-label": b(i).header.templateName,
|
|
3032
|
-
class: c([b(
|
|
3033
|
-
onKeydown: [
|
|
3032
|
+
class: c([b(Dt), "tpl:h-8 tpl:max-w-[260px] tpl:text-sm tpl:font-medium"]),
|
|
3033
|
+
onKeydown: [U(B(p, ["prevent"]), ["enter"]), U(B(m, ["prevent"]), ["esc"])],
|
|
3034
3034
|
onBlur: p
|
|
3035
3035
|
}, null, 42, xa)), [[z, l.value]]) : e.editable ? (s(), C("button", {
|
|
3036
3036
|
key: 1,
|
|
@@ -3053,17 +3053,17 @@ var _a = [
|
|
|
3053
3053
|
kind: {}
|
|
3054
3054
|
},
|
|
3055
3055
|
setup(e) {
|
|
3056
|
-
let t = e, { t: n, format: r } = $(), i = L(
|
|
3057
|
-
|
|
3056
|
+
let t = e, { t: n, format: r } = $(), i = L(ut, void 0), o = S(0);
|
|
3057
|
+
Wn(() => {
|
|
3058
3058
|
o.value += 1;
|
|
3059
3059
|
}, 6e4);
|
|
3060
3060
|
let c = y(() => {
|
|
3061
3061
|
o.value;
|
|
3062
|
-
let e =
|
|
3062
|
+
let e = Kn(t.iso, n.time, r);
|
|
3063
3063
|
if (e === null) return "";
|
|
3064
3064
|
let i = e === n.time.justNow;
|
|
3065
3065
|
return t.kind === "updatedAt" ? i ? n.header.updatedJustNow : r(n.header.updatedAt, { time: e }) : i ? n.header.createdJustNow : r(n.header.createdAt, { time: e });
|
|
3066
|
-
}), l = y(() =>
|
|
3066
|
+
}), l = y(() => Gn(t.iso, i));
|
|
3067
3067
|
return (e, t) => c.value ? (s(), C("span", {
|
|
3068
3068
|
key: 0,
|
|
3069
3069
|
"data-testid": "template-timestamp",
|
|
@@ -3096,10 +3096,10 @@ var _a = [
|
|
|
3096
3096
|
"data-testid": "save-status-error",
|
|
3097
3097
|
class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
|
|
3098
3098
|
"data-tooltip": e.errorMessage
|
|
3099
|
-
}, [v(b(
|
|
3099
|
+
}, [v(b(Jn), {
|
|
3100
3100
|
size: 12,
|
|
3101
3101
|
"stroke-width": 2.5
|
|
3102
|
-
}), w(" " + a(b(t).header.saveFailed), 1)], 8, Ea)) : e.status === "saved" ? (s(), C("div", Da, [v(b(
|
|
3102
|
+
}), w(" " + a(b(t).header.saveFailed), 1)], 8, Ea)) : e.status === "saved" ? (s(), C("div", Da, [v(b(qn), {
|
|
3103
3103
|
size: 12,
|
|
3104
3104
|
"stroke-width": 2.5
|
|
3105
3105
|
}), w(" " + a(b(t).header.saved), 1)])) : e.isDirty ? (s(), C("div", Oa, [r[0] ||= O("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), w(" " + a(b(t).header.unsaved), 1)])) : x("", !0);
|
|
@@ -3123,13 +3123,13 @@ var _a = [
|
|
|
3123
3123
|
"aria-pressed": r.value,
|
|
3124
3124
|
"aria-label": b(n).ai.menu.chat,
|
|
3125
3125
|
title: b(n).ai.menu.chat,
|
|
3126
|
-
class: c(b(
|
|
3126
|
+
class: c(b(kt)),
|
|
3127
3127
|
style: f(r.value ? {
|
|
3128
3128
|
backgroundColor: "var(--tpl-primary-light)",
|
|
3129
3129
|
borderColor: "var(--tpl-primary-light)"
|
|
3130
3130
|
} : void 0),
|
|
3131
3131
|
onClick: B(i, ["stop"])
|
|
3132
|
-
}, [v(b(
|
|
3132
|
+
}, [v(b(An), {
|
|
3133
3133
|
size: 16,
|
|
3134
3134
|
"stroke-width": 2,
|
|
3135
3135
|
class: "tpl:text-[var(--tpl-primary-hover)]",
|
|
@@ -3166,7 +3166,7 @@ var _a = [
|
|
|
3166
3166
|
ai: {}
|
|
3167
3167
|
},
|
|
3168
3168
|
setup(e) {
|
|
3169
|
-
let t = I(() => import("./VersionHistoryMenu-
|
|
3169
|
+
let t = I(() => import("./VersionHistoryMenu--T-Qp_mH.js")), n = I(() => import("./LanguageMenu-C-eQ0lFy.js")), r = I(() => import("./CollaboratorBar-CLQjksX-.js")), o = A(null), l = A(null), { compact: u, fullWidth: d } = ga(o, l);
|
|
3170
3170
|
return (p, m) => (s(), C("div", {
|
|
3171
3171
|
ref_key: "containerElement",
|
|
3172
3172
|
ref: o,
|
|
@@ -3224,7 +3224,7 @@ var _a = [
|
|
|
3224
3224
|
i(p.$slots, "left-extras")
|
|
3225
3225
|
]),
|
|
3226
3226
|
O("div", Fa, [
|
|
3227
|
-
v(
|
|
3227
|
+
v(zn, {
|
|
3228
3228
|
viewport: e.editor.state.viewport,
|
|
3229
3229
|
onChange: e.editor.setViewport
|
|
3230
3230
|
}, null, 8, ["viewport", "onChange"]),
|
|
@@ -3256,14 +3256,14 @@ var _a = [
|
|
|
3256
3256
|
"aria-label": e.comments.unresolvedCount.value > 0 ? `${e.core.t.comments.button} (${e.comments.unresolvedCount.value})` : e.core.t.comments.button,
|
|
3257
3257
|
title: e.core.t.comments.button,
|
|
3258
3258
|
"aria-expanded": e.comments.isOpen.value,
|
|
3259
|
-
class: c(b(
|
|
3259
|
+
class: c(b(kt)),
|
|
3260
3260
|
style: f(e.comments.isOpen.value ? {
|
|
3261
3261
|
backgroundColor: "var(--tpl-primary-light)",
|
|
3262
3262
|
borderColor: "var(--tpl-primary-light)"
|
|
3263
3263
|
} : void 0),
|
|
3264
3264
|
onClick: m[2] ||= (t) => e.comments.toggle()
|
|
3265
3265
|
}, [
|
|
3266
|
-
v(b(
|
|
3266
|
+
v(b(Ln), {
|
|
3267
3267
|
size: 16,
|
|
3268
3268
|
"stroke-width": 2
|
|
3269
3269
|
}),
|
|
@@ -3282,14 +3282,14 @@ var _a = [
|
|
|
3282
3282
|
"aria-label": e.core.t.testEmail.title,
|
|
3283
3283
|
title: e.core.t.testEmail.title,
|
|
3284
3284
|
disabled: e.testEmail.isSending.value,
|
|
3285
|
-
class: c(b(
|
|
3285
|
+
class: c(b(kt)),
|
|
3286
3286
|
onClick: m[3] ||= (t) => e.testEmail.open()
|
|
3287
|
-
}, [e.testEmail.isSending.value ? (s(), F(b(
|
|
3287
|
+
}, [e.testEmail.isSending.value ? (s(), F(b(In), {
|
|
3288
3288
|
key: 1,
|
|
3289
3289
|
class: "tpl-spinner",
|
|
3290
3290
|
size: 16,
|
|
3291
3291
|
"stroke-width": 2
|
|
3292
|
-
})) : (s(), F(b(
|
|
3292
|
+
})) : (s(), F(b(Rn), {
|
|
3293
3293
|
key: 0,
|
|
3294
3294
|
size: 16,
|
|
3295
3295
|
"stroke-width": 2
|
|
@@ -3298,13 +3298,13 @@ var _a = [
|
|
|
3298
3298
|
key: 4,
|
|
3299
3299
|
type: "button",
|
|
3300
3300
|
"data-testid": "template-save",
|
|
3301
|
-
class: c(e.editor.state.isDirty && e.templates.hasTemplate.value ? b(
|
|
3301
|
+
class: c(e.editor.state.isDirty && e.templates.hasTemplate.value ? b(At) : b(kt)),
|
|
3302
3302
|
style: f(e.editor.state.isDirty && e.templates.hasTemplate.value ? { boxShadow: "var(--tpl-shadow-sm)" } : void 0),
|
|
3303
3303
|
"aria-label": e.templates.isSaving.value ? e.core.t.header.saving : e.core.t.header.save,
|
|
3304
3304
|
disabled: e.templates.isSaving.value || !e.templates.hasTemplate.value,
|
|
3305
3305
|
title: e.templates.hasTemplate.value ? e.core.t.header.save : e.core.t.header.saveNoTemplate,
|
|
3306
3306
|
onClick: m[4] ||= (t) => e.templates.requestSave()
|
|
3307
|
-
}, [e.templates.isSaving.value ? (s(), F(b(
|
|
3307
|
+
}, [e.templates.isSaving.value ? (s(), F(b(In), {
|
|
3308
3308
|
key: 1,
|
|
3309
3309
|
class: "tpl-spinner",
|
|
3310
3310
|
size: 16,
|
|
@@ -3359,11 +3359,11 @@ var _a = [
|
|
|
3359
3359
|
}, lo = "tpl-merge-tag-picker-list", uo = /* @__PURE__ */ R({
|
|
3360
3360
|
__name: "MergeTagPickerModal",
|
|
3361
3361
|
setup(e) {
|
|
3362
|
-
let n =
|
|
3362
|
+
let n = _t(Je, "MergeTagPickerModal"), { t: r, format: i } = $(), o = L(yt, null), l = L(rt, null), p = L(xt, !0), m = y(() => n.current.value !== null), _ = y(() => m.value ? r.mergeTag.picker.changeTitle : r.mergeTag.picker.title);
|
|
3363
3363
|
function w(e) {
|
|
3364
3364
|
return p ? e.description ? `${e.value} — ${e.description}` : e.value : e.description || void 0;
|
|
3365
3365
|
}
|
|
3366
|
-
let T = S(""), E =
|
|
3366
|
+
let T = S(""), E = Un(T, 200), D = S(null), k = y(() => E.value.trim().length > 0), A = S(0), j = y(() => n.tags.value.some((e) => !!e.group)), N = S(/* @__PURE__ */ new Set());
|
|
3367
3367
|
function P(e) {
|
|
3368
3368
|
return N.value.has(e);
|
|
3369
3369
|
}
|
|
@@ -3386,7 +3386,7 @@ var _a = [
|
|
|
3386
3386
|
t.has(n) || (t.add(n), i.push(n));
|
|
3387
3387
|
}
|
|
3388
3388
|
return i;
|
|
3389
|
-
}),
|
|
3389
|
+
}), H = y(() => {
|
|
3390
3390
|
let e = R.value;
|
|
3391
3391
|
if (!j.value || k.value) return e.map((e, t) => ({
|
|
3392
3392
|
kind: "tag",
|
|
@@ -3412,42 +3412,42 @@ var _a = [
|
|
|
3412
3412
|
}), o++;
|
|
3413
3413
|
}
|
|
3414
3414
|
return a;
|
|
3415
|
-
}),
|
|
3416
|
-
function
|
|
3415
|
+
}), W = y(() => H.value.flatMap((e) => e.kind === "tag" ? [e.tag] : [])), G = !1;
|
|
3416
|
+
function ee(e) {
|
|
3417
3417
|
let t = n.current.value;
|
|
3418
3418
|
if (!t) return !1;
|
|
3419
3419
|
let r = e.findIndex((e) => e.value === t.value);
|
|
3420
3420
|
return r !== -1 && (A.value = r, !0);
|
|
3421
3421
|
}
|
|
3422
|
-
function
|
|
3423
|
-
|
|
3422
|
+
function K(e) {
|
|
3423
|
+
G = !1, A.value = e;
|
|
3424
3424
|
}
|
|
3425
3425
|
t(() => n.isOpen.value, (e) => {
|
|
3426
|
-
e ? (T.value = "", A.value = 0, N.value = /* @__PURE__ */ new Set(),
|
|
3426
|
+
e ? (T.value = "", A.value = 0, N.value = /* @__PURE__ */ new Set(), G = !ee(W.value), u(() => {
|
|
3427
3427
|
D.value?.focus();
|
|
3428
|
-
})) :
|
|
3429
|
-
}), t(
|
|
3430
|
-
|
|
3428
|
+
})) : G = !1;
|
|
3429
|
+
}), t(W, (e) => {
|
|
3430
|
+
G && ee(e) ? G = !1 : A.value >= e.length && (A.value = Math.max(0, e.length - 1));
|
|
3431
3431
|
});
|
|
3432
|
-
function
|
|
3432
|
+
function q(e) {
|
|
3433
3433
|
n.resolve(e);
|
|
3434
3434
|
}
|
|
3435
|
-
function
|
|
3435
|
+
function J() {
|
|
3436
3436
|
n.resolve(null);
|
|
3437
3437
|
}
|
|
3438
|
-
function
|
|
3439
|
-
if (
|
|
3440
|
-
|
|
3438
|
+
function Y(e) {
|
|
3439
|
+
if (W.value.length === 0) return;
|
|
3440
|
+
G = !1;
|
|
3441
3441
|
let t = A.value + e;
|
|
3442
|
-
A.value = Math.max(0, Math.min(
|
|
3442
|
+
A.value = Math.max(0, Math.min(W.value.length - 1, t)), ie();
|
|
3443
3443
|
}
|
|
3444
|
-
let
|
|
3444
|
+
let te = S(null), ne = S({});
|
|
3445
3445
|
function re(e, t) {
|
|
3446
3446
|
ne.value[e] = t ?? null;
|
|
3447
3447
|
}
|
|
3448
3448
|
function ie() {
|
|
3449
3449
|
u(() => {
|
|
3450
|
-
let e =
|
|
3450
|
+
let e = te.value;
|
|
3451
3451
|
e && e.querySelector(`[data-merge-tag-index="${A.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3452
3452
|
});
|
|
3453
3453
|
}
|
|
@@ -3457,7 +3457,7 @@ var _a = [
|
|
|
3457
3457
|
t.delete(e), N.value = t;
|
|
3458
3458
|
}
|
|
3459
3459
|
u(() => {
|
|
3460
|
-
let t =
|
|
3460
|
+
let t = te.value;
|
|
3461
3461
|
if (!t) return;
|
|
3462
3462
|
let n = 0, r = !1;
|
|
3463
3463
|
for (let i of Array.from(t.children)) {
|
|
@@ -3474,24 +3474,24 @@ var _a = [
|
|
|
3474
3474
|
});
|
|
3475
3475
|
}
|
|
3476
3476
|
function oe(e) {
|
|
3477
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3478
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3477
|
+
if (e.key === "ArrowDown") e.preventDefault(), Y(1);
|
|
3478
|
+
else if (e.key === "ArrowUp") e.preventDefault(), Y(-1);
|
|
3479
3479
|
else if (e.key === "Enter") {
|
|
3480
3480
|
e.preventDefault();
|
|
3481
|
-
let t =
|
|
3482
|
-
t &&
|
|
3481
|
+
let t = W.value[A.value];
|
|
3482
|
+
t && q(t);
|
|
3483
3483
|
}
|
|
3484
3484
|
}
|
|
3485
3485
|
function se() {
|
|
3486
|
-
if (
|
|
3486
|
+
if (W.value.length !== 0) return `${lo}-opt-${A.value}`;
|
|
3487
3487
|
}
|
|
3488
|
-
function
|
|
3488
|
+
function ce(e) {
|
|
3489
3489
|
return `${lo}-opt-${e}`;
|
|
3490
3490
|
}
|
|
3491
|
-
let
|
|
3492
|
-
return (e, t) => (s(), F(
|
|
3491
|
+
let le = y(() => n.tags.value.length === 0), ue = y(() => !le.value && R.value.length === 0), de = y(() => j.value && V.value.length > 1 && !k.value);
|
|
3492
|
+
return (e, t) => (s(), F(jt, {
|
|
3493
3493
|
visible: b(n).isOpen.value,
|
|
3494
|
-
onClose:
|
|
3494
|
+
onClose: J,
|
|
3495
3495
|
onKeydown: oe
|
|
3496
3496
|
}, {
|
|
3497
3497
|
default: h(() => [O("div", {
|
|
@@ -3511,12 +3511,12 @@ var _a = [
|
|
|
3511
3511
|
class: "tpl:flex tpl:h-7 tpl:w-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3512
3512
|
"aria-label": b(r).mergeTag.picker.close,
|
|
3513
3513
|
"data-testid": "merge-tag-picker-close",
|
|
3514
|
-
onClick:
|
|
3515
|
-
}, [v(b(
|
|
3514
|
+
onClick: J
|
|
3515
|
+
}, [v(b(He), {
|
|
3516
3516
|
size: 16,
|
|
3517
3517
|
"stroke-width": 2
|
|
3518
3518
|
})], 8, Ja)]),
|
|
3519
|
-
O("div", Ya, [v(b(
|
|
3519
|
+
O("div", Ya, [v(b(Xn), {
|
|
3520
3520
|
class: "tpl:pointer-events-none tpl:absolute tpl:top-1/2 tpl:left-5 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]",
|
|
3521
3521
|
size: 14,
|
|
3522
3522
|
"stroke-width": 2
|
|
@@ -3532,9 +3532,9 @@ var _a = [
|
|
|
3532
3532
|
"aria-controls": lo,
|
|
3533
3533
|
"aria-activedescendant": se(),
|
|
3534
3534
|
"data-testid": "merge-tag-picker-search",
|
|
3535
|
-
onKeydown: t[1] ||=
|
|
3535
|
+
onKeydown: t[1] ||= U(B(() => {}, ["prevent"]), ["enter"])
|
|
3536
3536
|
}, null, 40, Xa), [[z, T.value]])]),
|
|
3537
|
-
|
|
3537
|
+
de.value ? (s(), C("div", Za, [(s(!0), C(M, null, d(V.value, (e) => (s(), C("button", {
|
|
3538
3538
|
key: e,
|
|
3539
3539
|
type: "button",
|
|
3540
3540
|
class: "tpl:flex tpl:flex-shrink-0 tpl:cursor-pointer tpl:items-center tpl:rounded-full tpl:border tpl:border-[var(--tpl-border)] tpl:bg-transparent tpl:px-2.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
@@ -3545,12 +3545,12 @@ var _a = [
|
|
|
3545
3545
|
O("div", {
|
|
3546
3546
|
id: lo,
|
|
3547
3547
|
ref_key: "listRef",
|
|
3548
|
-
ref:
|
|
3548
|
+
ref: te,
|
|
3549
3549
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3550
3550
|
role: "listbox",
|
|
3551
3551
|
"aria-label": _.value,
|
|
3552
3552
|
"data-testid": "merge-tag-picker-list"
|
|
3553
|
-
}, [
|
|
3553
|
+
}, [le.value ? (s(), C("div", eo, a(b(r).mergeTag.picker.empty), 1)) : ue.value ? (s(), C("div", to, a(b(r).mergeTag.picker.noResults), 1)) : (s(!0), C(M, { key: 2 }, d(H.value, (e, t) => (s(), C(M, { key: t }, [e.kind === "header" ? (s(), C("button", {
|
|
3554
3554
|
key: 0,
|
|
3555
3555
|
ref_for: !0,
|
|
3556
3556
|
ref: (t) => re(e.group, t),
|
|
@@ -3563,7 +3563,7 @@ var _a = [
|
|
|
3563
3563
|
"data-group-collapsed": P(e.group) ? "true" : "false",
|
|
3564
3564
|
onClick: (t) => I(e.group)
|
|
3565
3565
|
}, [
|
|
3566
|
-
v(b(
|
|
3566
|
+
v(b(Yn), {
|
|
3567
3567
|
size: 12,
|
|
3568
3568
|
"stroke-width": 2,
|
|
3569
3569
|
class: c(["tpl:transition-transform", P(e.group) ? "tpl:-rotate-90" : ""])
|
|
@@ -3572,7 +3572,7 @@ var _a = [
|
|
|
3572
3572
|
O("span", ro, " (" + a(b(i)(b(r).mergeTag.picker.groupCount, { count: e.count })) + ") ", 1)
|
|
3573
3573
|
], 8, no)) : (s(), C("button", {
|
|
3574
3574
|
key: 1,
|
|
3575
|
-
id:
|
|
3575
|
+
id: ce(e.index),
|
|
3576
3576
|
type: "button",
|
|
3577
3577
|
role: "option",
|
|
3578
3578
|
"aria-selected": e.index === A.value,
|
|
@@ -3583,8 +3583,8 @@ var _a = [
|
|
|
3583
3583
|
title: w(e.tag),
|
|
3584
3584
|
class: c(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index === A.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
3585
3585
|
"data-testid": "merge-tag-picker-item",
|
|
3586
|
-
onMousemove: (t) =>
|
|
3587
|
-
onClick: (t) =>
|
|
3586
|
+
onMousemove: (t) => K(e.index),
|
|
3587
|
+
onClick: (t) => q(e.tag)
|
|
3588
3588
|
}, [
|
|
3589
3589
|
O("span", ao, a(e.tag.label), 1),
|
|
3590
3590
|
O("span", oo, a(e.tag.value), 1),
|
|
@@ -3602,7 +3602,7 @@ var _a = [
|
|
|
3602
3602
|
syntax: {}
|
|
3603
3603
|
},
|
|
3604
3604
|
setup(e) {
|
|
3605
|
-
let t = e, n = y(() =>
|
|
3605
|
+
let t = e, n = y(() => Re(t.value, t.syntax)), r = y(() => Me(t.value, t.syntax));
|
|
3606
3606
|
return (e, t) => n.value ? (s(), C("span", {
|
|
3607
3607
|
key: 0,
|
|
3608
3608
|
class: "tpl:inline-flex tpl:flex-shrink-0 tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:leading-none tpl:font-bold tpl:tracking-wide tpl:uppercase",
|
|
@@ -3647,7 +3647,7 @@ var _a = [
|
|
|
3647
3647
|
}, jo = "tpl-logic-picker-list", Mo = /* @__PURE__ */ R({
|
|
3648
3648
|
__name: "LogicTagPickerModal",
|
|
3649
3649
|
setup(e) {
|
|
3650
|
-
let n =
|
|
3650
|
+
let n = _t(Ze, "LogicTagPickerModal"), { t: r } = $(), i = L(Ke, Oe.liquid), o = L(yt, null), l = L(rt, null), p = S(""), m = Un(p, 200), _ = S(null), w = y(() => m.value.trim().length > 0), T = S(0);
|
|
3651
3651
|
function E(e) {
|
|
3652
3652
|
let t = m.value.trim().toLowerCase();
|
|
3653
3653
|
return !t || e.filter(Boolean).join(" ").toLowerCase().includes(t);
|
|
@@ -3708,37 +3708,37 @@ var _a = [
|
|
|
3708
3708
|
}), t(I, (e) => {
|
|
3709
3709
|
T.value >= e.length && (T.value = Math.max(0, e.length - 1));
|
|
3710
3710
|
});
|
|
3711
|
-
let
|
|
3712
|
-
function
|
|
3711
|
+
let H = S(null);
|
|
3712
|
+
function W(e) {
|
|
3713
3713
|
n.resolve(e);
|
|
3714
3714
|
}
|
|
3715
|
-
function
|
|
3715
|
+
function G() {
|
|
3716
3716
|
n.resolve(null);
|
|
3717
3717
|
}
|
|
3718
|
-
function
|
|
3718
|
+
function ee(e) {
|
|
3719
3719
|
I.value.length !== 0 && (T.value = Math.max(0, Math.min(I.value.length - 1, T.value + e)), u(() => {
|
|
3720
|
-
|
|
3720
|
+
H.value?.querySelector(`[data-logic-index="${T.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3721
3721
|
}));
|
|
3722
3722
|
}
|
|
3723
|
-
function
|
|
3724
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3725
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3723
|
+
function K(e) {
|
|
3724
|
+
if (e.key === "ArrowDown") e.preventDefault(), ee(1);
|
|
3725
|
+
else if (e.key === "ArrowUp") e.preventDefault(), ee(-1);
|
|
3726
3726
|
else if (e.key === "Enter") {
|
|
3727
3727
|
e.preventDefault();
|
|
3728
3728
|
let t = I.value[T.value];
|
|
3729
|
-
t &&
|
|
3729
|
+
t && W(t);
|
|
3730
3730
|
}
|
|
3731
3731
|
}
|
|
3732
|
-
function
|
|
3732
|
+
function q(e) {
|
|
3733
3733
|
return `${jo}-opt-${e}`;
|
|
3734
3734
|
}
|
|
3735
|
-
function
|
|
3735
|
+
function J() {
|
|
3736
3736
|
return I.value.length === 0 ? void 0 : `${jo}-opt-${T.value}`;
|
|
3737
3737
|
}
|
|
3738
|
-
return (e, t) => (s(), F(
|
|
3738
|
+
return (e, t) => (s(), F(jt, {
|
|
3739
3739
|
visible: b(n).isOpen.value,
|
|
3740
|
-
onClose:
|
|
3741
|
-
onKeydown:
|
|
3740
|
+
onClose: G,
|
|
3741
|
+
onKeydown: K
|
|
3742
3742
|
}, {
|
|
3743
3743
|
default: h(() => [O("div", {
|
|
3744
3744
|
role: "dialog",
|
|
@@ -3757,12 +3757,12 @@ var _a = [
|
|
|
3757
3757
|
class: "tpl:flex tpl:h-7 tpl:w-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3758
3758
|
"aria-label": b(r).logicTag.picker.close,
|
|
3759
3759
|
"data-testid": "logic-picker-close",
|
|
3760
|
-
onClick:
|
|
3761
|
-
}, [v(b(
|
|
3760
|
+
onClick: G
|
|
3761
|
+
}, [v(b(He), {
|
|
3762
3762
|
size: 16,
|
|
3763
3763
|
"stroke-width": 2
|
|
3764
3764
|
})], 8, _o)]),
|
|
3765
|
-
O("div", vo, [v(b(
|
|
3765
|
+
O("div", vo, [v(b(Xn), {
|
|
3766
3766
|
class: "tpl:pointer-events-none tpl:absolute tpl:top-1/2 tpl:left-5 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]",
|
|
3767
3767
|
size: 14,
|
|
3768
3768
|
"stroke-width": 2
|
|
@@ -3776,14 +3776,14 @@ var _a = [
|
|
|
3776
3776
|
placeholder: b(r).logicTag.picker.searchPlaceholder,
|
|
3777
3777
|
"aria-label": b(r).logicTag.picker.searchAriaLabel,
|
|
3778
3778
|
"aria-controls": jo,
|
|
3779
|
-
"aria-activedescendant":
|
|
3779
|
+
"aria-activedescendant": J(),
|
|
3780
3780
|
"data-testid": "logic-picker-search",
|
|
3781
|
-
onKeydown: t[1] ||=
|
|
3781
|
+
onKeydown: t[1] ||= U(B(() => {}, ["prevent"]), ["enter"])
|
|
3782
3782
|
}, null, 40, yo), [[z, p.value]])]),
|
|
3783
3783
|
O("div", {
|
|
3784
3784
|
id: jo,
|
|
3785
3785
|
ref_key: "listRef",
|
|
3786
|
-
ref:
|
|
3786
|
+
ref: H,
|
|
3787
3787
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3788
3788
|
role: "listbox",
|
|
3789
3789
|
"aria-label": b(r).logicTag.picker.title,
|
|
@@ -3795,7 +3795,7 @@ var _a = [
|
|
|
3795
3795
|
"data-group-name": e.label
|
|
3796
3796
|
}, a(e.label), 9, Co)) : (s(), C("button", {
|
|
3797
3797
|
key: 1,
|
|
3798
|
-
id:
|
|
3798
|
+
id: q(e.index),
|
|
3799
3799
|
type: "button",
|
|
3800
3800
|
role: "option",
|
|
3801
3801
|
"aria-selected": e.index === T.value,
|
|
@@ -3805,7 +3805,7 @@ var _a = [
|
|
|
3805
3805
|
class: c(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index === T.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
3806
3806
|
"data-testid": "logic-picker-item",
|
|
3807
3807
|
onMousemove: (t) => T.value = e.index,
|
|
3808
|
-
onClick: (t) =>
|
|
3808
|
+
onClick: (t) => W(e.kind === "tag" ? e.tag : e.pair)
|
|
3809
3809
|
}, [
|
|
3810
3810
|
O("span", To, [O("span", Eo, a(e.kind === "tag" ? e.tag.label : e.pair.label), 1), e.kind === "tag" ? (s(), C("span", Do, [v(po, {
|
|
3811
3811
|
value: e.tag.value,
|
|
@@ -3847,7 +3847,7 @@ var _a = [
|
|
|
3847
3847
|
},
|
|
3848
3848
|
setup(n, { expose: r }) {
|
|
3849
3849
|
let i = n;
|
|
3850
|
-
l(
|
|
3850
|
+
l($e, {
|
|
3851
3851
|
renderHtml: () => i.renderHtml?.() ?? Promise.reject(/* @__PURE__ */ Error("HTML rendering is unavailable")),
|
|
3852
3852
|
canRenderHtml: () => i.canRenderHtml?.() ?? !1,
|
|
3853
3853
|
cloud: !!i.cloud,
|
|
@@ -3855,13 +3855,13 @@ var _a = [
|
|
|
3855
3855
|
});
|
|
3856
3856
|
let o = {
|
|
3857
3857
|
get tags() {
|
|
3858
|
-
return
|
|
3858
|
+
return X.mergeTags.value;
|
|
3859
3859
|
},
|
|
3860
3860
|
get syntax() {
|
|
3861
|
-
return
|
|
3861
|
+
return X.mergeTagSyntax;
|
|
3862
3862
|
}
|
|
3863
|
-
}, u = i.config.templates ?
|
|
3864
|
-
i.config.collaboration && !u &&
|
|
3863
|
+
}, u = i.config.templates ? gn(i.config.templates, o) : void 0;
|
|
3864
|
+
i.config.collaboration && !u && Dn.warn("config.collaboration needs config.templates: collaboration runs on a loaded template, and only a templates provider loads one. Collaboration is off.");
|
|
3865
3865
|
let d = i.config.collaboration && u ? Hr({
|
|
3866
3866
|
provider: i.config.collaboration,
|
|
3867
3867
|
loadTemplate: (e) => u.load(e),
|
|
@@ -3873,11 +3873,11 @@ var _a = [
|
|
|
3873
3873
|
let e = _.state.template;
|
|
3874
3874
|
return e ? {
|
|
3875
3875
|
...N(e),
|
|
3876
|
-
content:
|
|
3876
|
+
content: Ne(N(_.content.value))
|
|
3877
3877
|
} : null;
|
|
3878
3878
|
}) : u, m = S(0);
|
|
3879
|
-
l(
|
|
3880
|
-
let _ =
|
|
3879
|
+
l(Qe, i.config.localization);
|
|
3880
|
+
let _ = te({
|
|
3881
3881
|
localization: i.config.localization ?? { locales: [] },
|
|
3882
3882
|
onLocaleChange: i.config.onLocaleChange,
|
|
3883
3883
|
onStructureChange: () => {
|
|
@@ -3891,8 +3891,8 @@ var _a = [
|
|
|
3891
3891
|
lockedBlocks: d?.locks,
|
|
3892
3892
|
lockLocale: d?.core.lockLocale,
|
|
3893
3893
|
lockSessionId: d?.core.sessionId
|
|
3894
|
-
}), T =
|
|
3895
|
-
l(
|
|
3894
|
+
}), T = Ue(_);
|
|
3895
|
+
l(dt, T.content), _.setCustomBlockDefinitions(i.config.customBlocks ?? []), d && t(_.activeLocale, (e) => d.core.setLockLocale(e), { flush: "sync" }), d?.attach(_);
|
|
3896
3896
|
let D = i.cloud ? i.cloud.attach({ editor: _ }) : null, A = p ? li({
|
|
3897
3897
|
provider: p,
|
|
3898
3898
|
editor: _,
|
|
@@ -3905,19 +3905,19 @@ var _a = [
|
|
|
3905
3905
|
editor: _,
|
|
3906
3906
|
onError: i.config.onError,
|
|
3907
3907
|
isAvailable: i.cloud ? () => i.cloud.isSavedBlocksAvailable() : void 0
|
|
3908
|
-
}) : null, P = I(() => import("./SavedBlocksPanels-
|
|
3908
|
+
}) : null, P = I(() => import("./SavedBlocksPanels-BKUzbamj.js")), L = i.config.media || i.config.onRequestMedia ? ai({
|
|
3909
3909
|
provider: i.config.media,
|
|
3910
3910
|
onRequestMedia: i.config.onRequestMedia,
|
|
3911
3911
|
getTemplateId: () => _.state.template?.id,
|
|
3912
3912
|
onError: i.config.onError
|
|
3913
|
-
}) : null, R = I(() => import("./MediaPanels-
|
|
3913
|
+
}) : null, R = I(() => import("./MediaPanels-FI4I8asn.js")), z = i.config.testEmail ? mi({
|
|
3914
3914
|
provider: i.config.testEmail,
|
|
3915
3915
|
getContent: () => _.content.value,
|
|
3916
3916
|
renderMjml: i.renderMjml,
|
|
3917
3917
|
usesLocalRenderer: i.usesLocalRenderer,
|
|
3918
3918
|
onError: i.config.onError,
|
|
3919
3919
|
isAvailable: i.cloud ? () => i.cloud.isTestEmailAvailable() : void 0
|
|
3920
|
-
}) : null, V = I(() => import("./TestEmailPanel-
|
|
3920
|
+
}) : null, V = I(() => import("./TestEmailPanel-DhB1CSpg.js")), U = i.config.comments ? Ur({
|
|
3921
3921
|
provider: i.config.comments,
|
|
3922
3922
|
editor: _,
|
|
3923
3923
|
user: i.config.user,
|
|
@@ -3925,7 +3925,7 @@ var _a = [
|
|
|
3925
3925
|
onError: i.config.onError,
|
|
3926
3926
|
isAvailable: i.cloud ? () => i.cloud.isCommentsAvailable() : void 0,
|
|
3927
3927
|
isBlockSaved: i.cloud ? (e) => i.cloud.isBlockSaved(e) : void 0
|
|
3928
|
-
}) : null,
|
|
3928
|
+
}) : null, G = I(() => import("./CommentsPanel-B5NqPMmY.js")), ee = I(() => import("./AiPanels-CwKmXzyr.js")), K = i.config.ai ? Qr({
|
|
3929
3929
|
provider: i.config.ai,
|
|
3930
3930
|
editor: _,
|
|
3931
3931
|
localization: i.config.localization ?? { locales: [] },
|
|
@@ -3934,62 +3934,62 @@ var _a = [
|
|
|
3934
3934
|
m.value++;
|
|
3935
3935
|
},
|
|
3936
3936
|
collaboration: d,
|
|
3937
|
-
history: () =>
|
|
3937
|
+
history: () => X.history,
|
|
3938
3938
|
reload: A ? (e, t) => A.load(e, t) : null,
|
|
3939
|
-
altMaxLength: () =>
|
|
3940
|
-
mergeTags: () => ni(
|
|
3941
|
-
normalize: (e, t) =>
|
|
3942
|
-
commentsOpen:
|
|
3939
|
+
altMaxLength: () => xn(Bt(i.config)),
|
|
3940
|
+
mergeTags: () => ni(X.mergeTags.value, X.mergeTagSyntax),
|
|
3941
|
+
normalize: (e, t) => mn(e, t, o),
|
|
3942
|
+
commentsOpen: U?.isOpen ?? null,
|
|
3943
3943
|
onError: i.config.onError
|
|
3944
3944
|
}) : null;
|
|
3945
|
-
|
|
3946
|
-
let
|
|
3947
|
-
l(
|
|
3948
|
-
let
|
|
3945
|
+
K && l(mt, K);
|
|
3946
|
+
let q = We(_, i.config.customBlocks ?? []);
|
|
3947
|
+
l(vt, q);
|
|
3948
|
+
let J = i.config.translation ? Lr({
|
|
3949
3949
|
provider: i.config.translation,
|
|
3950
3950
|
editor: _,
|
|
3951
3951
|
localization: i.config.localization,
|
|
3952
3952
|
collaboration: d,
|
|
3953
|
-
history: () =>
|
|
3953
|
+
history: () => X.history,
|
|
3954
3954
|
definitions: () => i.config.customBlocks ?? [],
|
|
3955
|
-
syntax: () =>
|
|
3956
|
-
coverage: () =>
|
|
3955
|
+
syntax: () => X.mergeTagSyntax,
|
|
3956
|
+
coverage: () => q.value
|
|
3957
3957
|
}) : null;
|
|
3958
|
-
|
|
3959
|
-
let
|
|
3958
|
+
J && l(gt, J);
|
|
3959
|
+
let Y = S(null);
|
|
3960
3960
|
t([() => _.state.template?.id ?? null, _.loadVersion], () => {
|
|
3961
|
-
|
|
3961
|
+
Y.value = null;
|
|
3962
3962
|
}, { flush: "sync" }), t(() => Q(_.content.value), (e) => {
|
|
3963
|
-
|
|
3963
|
+
Y.value && Y.value.language !== e && (Y.value = null);
|
|
3964
3964
|
}, { flush: "sync" });
|
|
3965
|
-
let
|
|
3965
|
+
let ne = jr({
|
|
3966
3966
|
editor: _,
|
|
3967
|
-
history: () =>
|
|
3967
|
+
history: () => X.history,
|
|
3968
3968
|
collaboration: d
|
|
3969
3969
|
});
|
|
3970
|
-
l(
|
|
3970
|
+
l(qe, { setDefaultLocale(e) {
|
|
3971
3971
|
let t = {
|
|
3972
3972
|
language: e,
|
|
3973
3973
|
old: Q(_.content.value),
|
|
3974
|
-
count:
|
|
3975
|
-
}, n =
|
|
3976
|
-
return n.applied && (
|
|
3974
|
+
count: De(_.content.value, e, i.config.customBlocks).length
|
|
3975
|
+
}, n = ne.setDefaultLocale(e);
|
|
3976
|
+
return n.applied && (Y.value = t), n;
|
|
3977
3977
|
} });
|
|
3978
|
-
let re = I(() => import("./LocaleNotices-
|
|
3979
|
-
|
|
3980
|
-
let
|
|
3978
|
+
let re = I(() => import("./LocaleNotices-CDK_9D7P.js")), ie = I(() => import("./CollaborationNotices-C27GCMvK.js")), ae = I(() => import("./CloudPanels-Bmlf05Il.js")), oe = I(() => import("./CloudHeaderExtras-Cqhw-jMz.js")), se = I(() => import("./VersionHistoryPanels-BPubvYIE.js")), ce = gi(i.config.templates?.autoSave, !1), le = ce && A !== null;
|
|
3979
|
+
ce && A !== null && !A.canSave.value && Dn.warn("config.templates.autoSave is on but this provider's save is false — there is nothing to persist to. Give it a real save function, or use `onChange` to persist the content yourself."), i.config.changeDebounce !== void 0 && A !== null && i.config.templates?.autoSave === void 0 && !i.config.onChange && Dn.warn("config.changeDebounce is set but nothing will use it — config.templates.autoSave is unset and there is no onChange either, so the timer has no consumer. Set config.templates.autoSave, or add onChange, so the debounce takes effect.");
|
|
3980
|
+
let ue = i.config.onChange || le ? {
|
|
3981
3981
|
onChange: () => {
|
|
3982
|
-
i.config.onChange?.(JSON.parse(JSON.stringify(_.state.content))),
|
|
3982
|
+
i.config.onChange?.(JSON.parse(JSON.stringify(_.state.content))), le && A.requestAutoSave();
|
|
3983
3983
|
},
|
|
3984
3984
|
...i.config.changeDebounce === void 0 ? {} : { debounce: i.config.changeDebounce }
|
|
3985
|
-
} : null,
|
|
3985
|
+
} : null, de = {
|
|
3986
3986
|
...M ? { savedBlocks: M.capability } : {},
|
|
3987
3987
|
...A ? { templates: A.capability } : {},
|
|
3988
3988
|
...z ? { testEmail: z.capability } : {},
|
|
3989
|
-
...
|
|
3989
|
+
...U ? { comments: U.capability } : {},
|
|
3990
3990
|
...d ? { collaboration: d.capability } : {},
|
|
3991
|
-
...
|
|
3992
|
-
},
|
|
3991
|
+
...K ? { ai: K.capability } : {}
|
|
3992
|
+
}, X = nn({
|
|
3993
3993
|
editor: _,
|
|
3994
3994
|
containerEl: j,
|
|
3995
3995
|
config: {
|
|
@@ -4011,28 +4011,28 @@ var _a = [
|
|
|
4011
4011
|
canDropMedia: L?.canDrop ?? null,
|
|
4012
4012
|
resolvePreview: i.config.resolvePreview,
|
|
4013
4013
|
resolveImageUrl: i.config.resolveImageUrl,
|
|
4014
|
-
lint:
|
|
4014
|
+
lint: Bt(i.config),
|
|
4015
4015
|
locale: i.config.locale
|
|
4016
4016
|
},
|
|
4017
4017
|
translations: i.translations,
|
|
4018
4018
|
fontsManager: i.fontsManager,
|
|
4019
|
-
autoSaveOptions:
|
|
4020
|
-
capabilities:
|
|
4019
|
+
autoSaveOptions: ue,
|
|
4020
|
+
capabilities: de,
|
|
4021
4021
|
editorRoot: i.shadowRoot,
|
|
4022
4022
|
history: d?.history
|
|
4023
|
-
}),
|
|
4023
|
+
}), fe = S("content");
|
|
4024
4024
|
t(() => _.state.template?.id, () => {
|
|
4025
|
-
_.selectedBlock.value && (
|
|
4025
|
+
_.selectedBlock.value && (fe.value = "content");
|
|
4026
4026
|
});
|
|
4027
|
-
let
|
|
4028
|
-
core:
|
|
4029
|
-
capabilities:
|
|
4030
|
-
}) : null,
|
|
4027
|
+
let pe = i.cloud && D ? i.cloud.ready({
|
|
4028
|
+
core: X,
|
|
4029
|
+
capabilities: de
|
|
4030
|
+
}) : null, he = i.config.versionHistory ? hi({
|
|
4031
4031
|
provider: i.config.versionHistory,
|
|
4032
|
-
editor:
|
|
4033
|
-
history:
|
|
4034
|
-
conditionPreview:
|
|
4035
|
-
autoSave:
|
|
4032
|
+
editor: pn(_, o),
|
|
4033
|
+
history: X.history,
|
|
4034
|
+
conditionPreview: X.conditionPreview,
|
|
4035
|
+
autoSave: X.autoSave,
|
|
4036
4036
|
collaboration: d ? {
|
|
4037
4037
|
suspend: d.core.suspend,
|
|
4038
4038
|
resume: d.core.resume,
|
|
@@ -4045,44 +4045,44 @@ var _a = [
|
|
|
4045
4045
|
} : null,
|
|
4046
4046
|
onError: i.config.onError
|
|
4047
4047
|
}) : null;
|
|
4048
|
-
|
|
4049
|
-
let
|
|
4048
|
+
he && (de.versionHistory = he.capability);
|
|
4049
|
+
let ge = y(() => U?.isOpen.value === !0 || K !== null && K.panel.value !== null || D?.panelState.rightPanelOpen.value === !0), _e = y(() => _.state.previewMode ? "tpl:left-0 tpl:right-0" : ge.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"), ve = S(null), ye = S(0), be = y(() => ({ top: `calc(3.5 * var(--tpl-base-size) + ${ye.value}px)` })), xe;
|
|
4050
4050
|
e(() => {
|
|
4051
|
-
|
|
4052
|
-
e && (
|
|
4053
|
-
}), xe.observe(
|
|
4051
|
+
ye.value = ve.value?.offsetHeight ?? 0, ve.value && typeof ResizeObserver < "u" && (xe = new ResizeObserver(([e]) => {
|
|
4052
|
+
e && (ye.value = e.borderBoxSize?.[0]?.blockSize ?? e.contentRect.height);
|
|
4053
|
+
}), xe.observe(ve.value));
|
|
4054
4054
|
}), E(() => xe?.disconnect());
|
|
4055
|
-
let { showNotice: Se } =
|
|
4055
|
+
let { showNotice: Se } = cn(() => i.config.smallScreenNotice);
|
|
4056
4056
|
e(async () => {
|
|
4057
4057
|
await i.fontsManager.loadCustomFonts();
|
|
4058
4058
|
}), E(() => {
|
|
4059
|
-
i.fontsManager.cleanupFontLinks(),
|
|
4059
|
+
i.fontsManager.cleanupFontLinks(), K?.destroy(), i.cloud?.destroy(), X.destroy();
|
|
4060
4060
|
});
|
|
4061
|
-
let Ce = A ?? _,
|
|
4061
|
+
let Ce = A ?? _, Z = Tn(X.editorRoot);
|
|
4062
4062
|
return r({
|
|
4063
4063
|
getLocale: () => _.activeLocale.value ?? Q(_.content.value),
|
|
4064
4064
|
setLocale: (e) => _.setActiveLocale(e),
|
|
4065
4065
|
getContent: () => _.content.value,
|
|
4066
4066
|
setContent: (e) => _.setContent(e),
|
|
4067
4067
|
insertBlock: (e) => {
|
|
4068
|
-
if (_.state.previewMode) return
|
|
4069
|
-
let t =
|
|
4070
|
-
return vi(_, t) ? (
|
|
4068
|
+
if (_.state.previewMode) return Dn.warn("insertBlock() does nothing in preview mode."), null;
|
|
4069
|
+
let t = me(e);
|
|
4070
|
+
return vi(_, t) ? (Z(t.id), t.id) : null;
|
|
4071
4071
|
},
|
|
4072
4072
|
setTheme: (e) => _.setUiTheme(e),
|
|
4073
|
-
setMergeTags:
|
|
4073
|
+
setMergeTags: X.setMergeTags,
|
|
4074
4074
|
isDirty: () => _.state.isDirty,
|
|
4075
4075
|
create: Ce.create,
|
|
4076
4076
|
load: Ce.load,
|
|
4077
4077
|
save: Ce.save,
|
|
4078
|
-
renderCustomBlock:
|
|
4079
|
-
getCustomBlockStylesheet: (e) =>
|
|
4078
|
+
renderCustomBlock: X.registry.renderCustomBlock,
|
|
4079
|
+
getCustomBlockStylesheet: (e) => X.registry.getDefinition(e)?.stylesheet
|
|
4080
4080
|
}), (e, t) => (s(), C("div", {
|
|
4081
4081
|
ref_key: "rootEl",
|
|
4082
4082
|
ref: j,
|
|
4083
4083
|
class: c(["tpl tpl:relative tpl:h-full", { "tpl:dark": b(_).state.darkMode }]),
|
|
4084
|
-
"data-tpl-theme": b(
|
|
4085
|
-
style: f(b(
|
|
4084
|
+
"data-tpl-theme": b(X).resolvedTheme.value,
|
|
4085
|
+
style: f(b(X).themeStyles.value),
|
|
4086
4086
|
onDragover: t[8] ||= B(() => {}, ["prevent"]),
|
|
4087
4087
|
onDrop: t[9] ||= B(() => {}, ["prevent"])
|
|
4088
4088
|
}, [
|
|
@@ -4091,14 +4091,14 @@ var _a = [
|
|
|
4091
4091
|
v(Wa, {
|
|
4092
4092
|
editor: b(_),
|
|
4093
4093
|
localization: i.config.localization,
|
|
4094
|
-
core: b(
|
|
4094
|
+
core: b(X),
|
|
4095
4095
|
templates: b(A),
|
|
4096
4096
|
"show-template-name": n.config.templates?.nameField !== !1,
|
|
4097
4097
|
"test-email": b(z),
|
|
4098
|
-
"version-history": b(
|
|
4099
|
-
comments: b(
|
|
4098
|
+
"version-history": b(he),
|
|
4099
|
+
comments: b(U),
|
|
4100
4100
|
collaboration: b(d),
|
|
4101
|
-
ai: b(
|
|
4101
|
+
ai: b(K)
|
|
4102
4102
|
}, k({ _: 2 }, [b(D) ? {
|
|
4103
4103
|
name: "left-extras",
|
|
4104
4104
|
fn: h(() => [v(b(oe), {
|
|
@@ -4125,31 +4125,31 @@ var _a = [
|
|
|
4125
4125
|
"collaboration",
|
|
4126
4126
|
"ai"
|
|
4127
4127
|
]),
|
|
4128
|
-
g(v(Ui, { style: f(
|
|
4128
|
+
g(v(Ui, { style: f(be.value) }, null, 8, ["style"]), [[H, !b(_).state.previewMode]]),
|
|
4129
4129
|
O("div", {
|
|
4130
|
-
class: c(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:bg-[var(--tpl-canvas-bg)]",
|
|
4131
|
-
style: f([{ transition: "left var(--tpl-transition),\n right var(--tpl-transition)" },
|
|
4132
|
-
}, [O("div", Fo, [O("div", Io, [v(
|
|
4133
|
-
default: h(() => [b(_).state.previewMode && !b(
|
|
4134
|
-
"sample-mode": b(
|
|
4135
|
-
onChange: t[0] ||= (e) => b(
|
|
4130
|
+
class: c(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:bg-[var(--tpl-canvas-bg)]", _e.value]),
|
|
4131
|
+
style: f([{ transition: "left var(--tpl-transition),\n right var(--tpl-transition)" }, be.value])
|
|
4132
|
+
}, [O("div", Fo, [O("div", Io, [v(W, { name: "tpl-preview-pill" }, {
|
|
4133
|
+
default: h(() => [b(_).state.previewMode && !b(X).previewResolution.supersedesSamples.value ? (s(), C("div", Lo, [v(Bn, {
|
|
4134
|
+
"sample-mode": b(X).mergeTagSampleMode.value,
|
|
4135
|
+
onChange: t[0] ||= (e) => b(X).mergeTagSampleMode.value = e
|
|
4136
4136
|
}, null, 8, ["sample-mode"])])) : x("", !0)]),
|
|
4137
4137
|
_: 1
|
|
4138
|
-
}), v(
|
|
4139
|
-
default: h(() => [b(
|
|
4138
|
+
}), v(W, { name: "tpl-preview-pill" }, {
|
|
4139
|
+
default: h(() => [b(X).conditionPreview.hasHiddenBlocks.value && b(X).appliesConditionFilter.value ? (s(), C("button", {
|
|
4140
4140
|
key: 0,
|
|
4141
4141
|
type: "button",
|
|
4142
|
-
class: c([b(
|
|
4142
|
+
class: c([b(Tt), "tpl:shadow-[var(--tpl-shadow-md)]"]),
|
|
4143
4143
|
"data-testid": "restore-hidden-blocks",
|
|
4144
|
-
onClick: t[1] ||= (e) => b(
|
|
4145
|
-
}, [v(b(
|
|
4144
|
+
onClick: t[1] ||= (e) => b(X).conditionPreview.reset()
|
|
4145
|
+
}, [v(b(On), {
|
|
4146
4146
|
size: 16,
|
|
4147
4147
|
"stroke-width": 2
|
|
4148
|
-
}), w(" " + a(b(
|
|
4148
|
+
}), w(" " + a(b(X).t.blockSettings.restoreHiddenBlocks), 1)], 2)) : x("", !0)]),
|
|
4149
4149
|
_: 1
|
|
4150
4150
|
})])]), O("main", Ro, [v(Mi, {
|
|
4151
4151
|
viewport: b(_).state.viewport,
|
|
4152
|
-
content: b(
|
|
4152
|
+
content: b(X).previewResolution.content.value,
|
|
4153
4153
|
"selected-block-id": b(_).state.selectedBlockId,
|
|
4154
4154
|
"dark-mode": b(_).state.darkMode,
|
|
4155
4155
|
"preview-mode": b(_).state.previewMode,
|
|
@@ -4164,28 +4164,28 @@ var _a = [
|
|
|
4164
4164
|
])])], 6),
|
|
4165
4165
|
n.config.branding === !1 ? x("", !0) : (s(), F(pa, {
|
|
4166
4166
|
key: 0,
|
|
4167
|
-
"position-class": [
|
|
4167
|
+
"position-class": [_e.value]
|
|
4168
4168
|
}, null, 8, ["position-class"])),
|
|
4169
4169
|
O("div", {
|
|
4170
4170
|
class: "tpl-sr-only",
|
|
4171
4171
|
role: "status",
|
|
4172
4172
|
"aria-live": "polite",
|
|
4173
4173
|
"aria-atomic": "true",
|
|
4174
|
-
"aria-label": b(
|
|
4175
|
-
}, a(b(
|
|
4174
|
+
"aria-label": b(X).t.landmarks.reorderAnnouncements
|
|
4175
|
+
}, a(b(X).keyboardReorder.announcement.value), 9, zo),
|
|
4176
4176
|
g(v(oa, {
|
|
4177
|
-
tab:
|
|
4178
|
-
"onUpdate:tab": t[2] ||= (e) =>
|
|
4179
|
-
style: f([
|
|
4177
|
+
tab: fe.value,
|
|
4178
|
+
"onUpdate:tab": t[2] ||= (e) => fe.value = e,
|
|
4179
|
+
style: f([be.value, { "transition-property": "right" }]),
|
|
4180
4180
|
"selected-block": b(_).selectedBlock.value ? b(T).displayBlock(b(_).selectedBlock.value) : null,
|
|
4181
4181
|
settings: b(T).settings.value,
|
|
4182
|
-
"shifted-left":
|
|
4182
|
+
"shifted-left": ge.value,
|
|
4183
4183
|
onUpdateBlock: t[3] ||= (e) => b(_).updateBlock(b(_).state.selectedBlockId, e),
|
|
4184
4184
|
onDeleteBlock: t[4] ||= () => {
|
|
4185
|
-
b(_).state.selectedBlockId && b(
|
|
4185
|
+
b(_).state.selectedBlockId && b(X).blockActions.deleteBlock(b(_).state.selectedBlockId);
|
|
4186
4186
|
},
|
|
4187
4187
|
onDuplicateBlock: t[5] ||= () => {
|
|
4188
|
-
b(_).selectedBlock.value && b(
|
|
4188
|
+
b(_).selectedBlock.value && b(X).blockActions.duplicateBlock(b(_).selectedBlock.value);
|
|
4189
4189
|
},
|
|
4190
4190
|
onUpdateSettings: t[6] ||= (e) => b(_).updateSettings(e)
|
|
4191
4191
|
}, null, 8, [
|
|
@@ -4194,19 +4194,19 @@ var _a = [
|
|
|
4194
4194
|
"selected-block",
|
|
4195
4195
|
"settings",
|
|
4196
4196
|
"shifted-left"
|
|
4197
|
-
]), [[
|
|
4197
|
+
]), [[H, !b(_).state.previewMode]]),
|
|
4198
4198
|
O("div", {
|
|
4199
4199
|
ref_key: "topChrome",
|
|
4200
|
-
ref:
|
|
4200
|
+
ref: ve,
|
|
4201
4201
|
class: "tpl-top-chrome tpl:absolute tpl:top-14 tpl:right-0 tpl:left-0 tpl:z-40"
|
|
4202
|
-
}, [b(
|
|
4202
|
+
}, [b(he)?.isAvailable.value ? (s(), F(b(se), {
|
|
4203
4203
|
key: 0,
|
|
4204
|
-
feature: b(
|
|
4204
|
+
feature: b(he)
|
|
4205
4205
|
}, null, 8, ["feature"])) : x("", !0), n.config.localization ? (s(), F(Ar, {
|
|
4206
4206
|
key: 1,
|
|
4207
4207
|
editor: b(_),
|
|
4208
4208
|
locales: n.config.localization.locales,
|
|
4209
|
-
feature: b(
|
|
4209
|
+
feature: b(J),
|
|
4210
4210
|
change: m.value
|
|
4211
4211
|
}, null, 8, [
|
|
4212
4212
|
"editor",
|
|
@@ -4216,7 +4216,7 @@ var _a = [
|
|
|
4216
4216
|
])) : x("", !0)], 512)
|
|
4217
4217
|
]),
|
|
4218
4218
|
O("div", {
|
|
4219
|
-
ref: (e) => b(
|
|
4219
|
+
ref: (e) => b(X).popoverRoot.value = e,
|
|
4220
4220
|
class: "tpl-popover-root"
|
|
4221
4221
|
}, null, 512),
|
|
4222
4222
|
v(uo),
|
|
@@ -4230,8 +4230,8 @@ var _a = [
|
|
|
4230
4230
|
feature: b(L),
|
|
4231
4231
|
provider: n.config.media,
|
|
4232
4232
|
locale: n.config.locale,
|
|
4233
|
-
"ui-theme": b(
|
|
4234
|
-
"popover-target": b(
|
|
4233
|
+
"ui-theme": b(X).resolvedTheme.value,
|
|
4234
|
+
"popover-target": b(X).popoverRoot.value
|
|
4235
4235
|
}, null, 8, [
|
|
4236
4236
|
"feature",
|
|
4237
4237
|
"provider",
|
|
@@ -4243,32 +4243,32 @@ var _a = [
|
|
|
4243
4243
|
key: 2,
|
|
4244
4244
|
feature: b(z)
|
|
4245
4245
|
}, null, 8, ["feature"])) : x("", !0),
|
|
4246
|
-
b(
|
|
4246
|
+
b(U)?.isAvailable.value ? (s(), F(b(G), {
|
|
4247
4247
|
key: 3,
|
|
4248
|
-
feature: b(
|
|
4248
|
+
feature: b(U)
|
|
4249
4249
|
}, null, 8, ["feature"])) : x("", !0),
|
|
4250
|
-
b(
|
|
4250
|
+
b(K) ? (s(), F(b(ee), {
|
|
4251
4251
|
key: 4,
|
|
4252
|
-
feature: b(
|
|
4252
|
+
feature: b(K)
|
|
4253
4253
|
}, null, 8, ["feature"])) : x("", !0),
|
|
4254
|
-
b(d) ||
|
|
4254
|
+
b(d) || Y.value ? (s(), F(rr, { key: 5 }, {
|
|
4255
4255
|
default: h(() => [b(d) ? (s(), F(b(ie), {
|
|
4256
4256
|
key: 0,
|
|
4257
4257
|
feature: b(d)
|
|
4258
|
-
}, null, 8, ["feature"])) : x("", !0),
|
|
4258
|
+
}, null, 8, ["feature"])) : x("", !0), Y.value ? (s(), F(b(re), {
|
|
4259
4259
|
key: 1,
|
|
4260
|
-
notice:
|
|
4261
|
-
onDismiss: t[7] ||= (e) =>
|
|
4260
|
+
notice: Y.value,
|
|
4261
|
+
onDismiss: t[7] ||= (e) => Y.value = null
|
|
4262
4262
|
}, null, 8, ["notice"])) : x("", !0)]),
|
|
4263
4263
|
_: 1
|
|
4264
4264
|
})) : x("", !0),
|
|
4265
|
-
n.cloud && b(D) && b(
|
|
4265
|
+
n.cloud && b(D) && b(pe) ? (s(), F(b(ae), {
|
|
4266
4266
|
key: 6,
|
|
4267
4267
|
editor: b(_),
|
|
4268
|
-
core: b(
|
|
4268
|
+
core: b(X),
|
|
4269
4269
|
runtime: n.cloud,
|
|
4270
4270
|
cloud: b(D),
|
|
4271
|
-
ready: b(
|
|
4271
|
+
ready: b(pe)
|
|
4272
4272
|
}, null, 8, [
|
|
4273
4273
|
"editor",
|
|
4274
4274
|
"core",
|
|
@@ -4291,8 +4291,8 @@ function Uo(e) {
|
|
|
4291
4291
|
};
|
|
4292
4292
|
}
|
|
4293
4293
|
async function Wo(e, t) {
|
|
4294
|
-
let n =
|
|
4295
|
-
return a || (
|
|
4294
|
+
let n = Ne(e.getContent()), r = t?.locale ?? Q(n), i = t?.locale !== void 0 || n.settings?.locales?.length ? X(n, r) : n, a = e.getLayout?.(), o = a ? Le(X(a, r, { missing: "default" }), i) : i;
|
|
4295
|
+
return a || (ye(o), de(o)), await Zn(o, {
|
|
4296
4296
|
renderCustomBlock: e.renderCustomBlock,
|
|
4297
4297
|
getCustomBlockStylesheet: e.getCustomBlockStylesheet
|
|
4298
4298
|
}), {
|
|
@@ -4367,19 +4367,19 @@ function ns(e, t) {
|
|
|
4367
4367
|
n && (t && n.app !== t || (n.cleanup(), n.app.unmount(), Zo.delete(e), Qo === e && (Qo = null)));
|
|
4368
4368
|
}
|
|
4369
4369
|
function rs(e) {
|
|
4370
|
-
e.layout && (e.layout =
|
|
4370
|
+
e.layout && (e.layout = hn(e.layout, e.mergeTags), Te(e.layout)), e.content && (e.content = hn(e.content, e.mergeTags), ye(e.content), de(e.content));
|
|
4371
4371
|
}
|
|
4372
4372
|
async function is(e) {
|
|
4373
4373
|
let t = { ...e };
|
|
4374
4374
|
if (t.translation !== void 0 && (t.translation === null || typeof t.translation != "object" || typeof t.translation.translate != "function")) throw new Z("translation must be an object with a translate function.");
|
|
4375
|
-
for (let e of t.localization?.locales ?? []) if (!
|
|
4375
|
+
for (let e of t.localization?.locales ?? []) if (!Fe(e)) throw new Z(`Invalid localization locale "${e}".`);
|
|
4376
4376
|
let n = t.localization?.doNotTranslate;
|
|
4377
4377
|
if (n !== void 0 && (!Array.isArray(n) || n.length > 500 || n.some((e) => typeof e != "string" || e.trim().length < 1 || e.trim().length > 100))) throw new Z("localization.doNotTranslate must be an array of at most 500 terms, each 1–100 characters.");
|
|
4378
4378
|
return rs(t), as(t, ts(t.container));
|
|
4379
4379
|
}
|
|
4380
4380
|
async function as(e, { container: t, token: n }, r) {
|
|
4381
|
-
e.locale !== void 0 && !
|
|
4382
|
-
let i = await
|
|
4381
|
+
e.locale !== void 0 && !zt(e.locale) && Dn.warn(`config.locale: "${e.locale}" has no translations — falling back to English. Supported: ${Lt().sort().join(", ")}.`);
|
|
4382
|
+
let i = await It(e.locale ?? "en"), a = Ht(e.fonts);
|
|
4383
4383
|
if (es.get(t) !== n) return os({
|
|
4384
4384
|
config: e,
|
|
4385
4385
|
editorRef: S(null),
|
|
@@ -4417,7 +4417,7 @@ async function as(e, { container: t, token: n }, r) {
|
|
|
4417
4417
|
function os({ config: e, editorRef: t, fontsManager: n, unmount: r }) {
|
|
4418
4418
|
let i = {
|
|
4419
4419
|
getContent() {
|
|
4420
|
-
return t.value ?
|
|
4420
|
+
return t.value ? Ne(t.value.getContent()) : Ne(e.content ?? fe(e.fonts?.defaultFont, $n(e)));
|
|
4421
4421
|
},
|
|
4422
4422
|
getLocale() {
|
|
4423
4423
|
return t.value?.getLocale() ?? Q(i.getContent());
|
|
@@ -4428,12 +4428,12 @@ function os({ config: e, editorRef: t, fontsManager: n, unmount: r }) {
|
|
|
4428
4428
|
t.value?.setLocale(n);
|
|
4429
4429
|
},
|
|
4430
4430
|
setContent(n) {
|
|
4431
|
-
let r =
|
|
4431
|
+
let r = hn(n, e.mergeTags);
|
|
4432
4432
|
t.value && t.value.setContent(r), e.content = r;
|
|
4433
4433
|
},
|
|
4434
4434
|
insertBlock(n) {
|
|
4435
4435
|
let r = { blocks: [n] };
|
|
4436
|
-
return
|
|
4436
|
+
return ye(r), de(r), t.value ? t.value.insertBlock(_n(n, e.mergeTags)) : null;
|
|
4437
4437
|
},
|
|
4438
4438
|
setTheme(e) {
|
|
4439
4439
|
t.value && t.value.setTheme(e);
|
|
@@ -4448,7 +4448,7 @@ function os({ config: e, editorRef: t, fontsManager: n, unmount: r }) {
|
|
|
4448
4448
|
create(n) {
|
|
4449
4449
|
return t.value ? t.value.create(n?.content ? {
|
|
4450
4450
|
...n,
|
|
4451
|
-
content:
|
|
4451
|
+
content: hn(n.content, e.mergeTags)
|
|
4452
4452
|
} : n) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Editor not ready"));
|
|
4453
4453
|
},
|
|
4454
4454
|
load(e) {
|
|
@@ -4498,7 +4498,7 @@ async function ss(e) {
|
|
|
4498
4498
|
mergeTags: e.mergeTags
|
|
4499
4499
|
};
|
|
4500
4500
|
rs(t);
|
|
4501
|
-
let n = ts(e.container), [{ bootstrapCloud: r }, i] = await Promise.all([import("./createCloudRuntime-
|
|
4501
|
+
let n = ts(e.container), [{ bootstrapCloud: r }, i] = await Promise.all([import("./createCloudRuntime-CL4tUlDC.js"), Pt(e.locale ?? "en")]), { runtime: a, providers: o, user: s } = await r({
|
|
4502
4502
|
config: e,
|
|
4503
4503
|
cloudTranslations: i
|
|
4504
4504
|
});
|
|
@@ -4549,4 +4549,4 @@ async function ss(e) {
|
|
|
4549
4549
|
function cs() {
|
|
4550
4550
|
Qo && ns(Qo);
|
|
4551
4551
|
}
|
|
4552
|
-
export {
|
|
4552
|
+
export { Sn as AI_ALT_TEXT_RULES, wn as AI_FIXABLE_RULES, Le as applyLayout, fe as createDefaultTemplateContent, oe as createLocalStorageMediaProvider, q as createLocalStorageSavedBlocksProvider, xe as createParagraphBlock, Se as createSlotBlock, Ce as createWrapperBlock, Mt as getBaseLocale, Qt as getSupportedCloudLocales, Lt as getSupportedLocales, is as init, ss as initCloud, Rt as isCloudLocaleSupported, zt as isLocaleSupported, be as isSlot, he as isWrapper, je as layoutWrapsSlot, cs as unmount, Te as validateLayout };
|