@templatical/editor 0.39.0 → 0.39.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/README.md +2 -4
  2. package/dist/{AiChatSidebar-jVlXXND3.js → AiChatSidebar-pOxCZWz9.js} +14 -14
  3. package/dist/{AiFeatureMenu-C1HCntyQ.js → AiFeatureMenu-Bljk6Qjv.js} +7 -7
  4. package/dist/{BlockIssueBadge-JhNgcUmZ.js → BlockIssueBadge-D5oGxOQP.js} +5 -5
  5. package/dist/{BlockPreviewCanvas-C_rA5LJN.js → BlockPreviewCanvas-DXGjUECG.js} +27 -27
  6. package/dist/{CloudHeaderExtras-DvYyNsPB.js → CloudHeaderExtras-DaocwNmy.js} +5 -5
  7. package/dist/{CloudPanels-CDPhPVdd.js → CloudPanels-CyZAnSJY.js} +7 -7
  8. package/dist/{CollaboratorBar-Co9UPoB0.js → CollaboratorBar-C7Zca3g1.js} +4 -4
  9. package/dist/{CommentsPanel-CRcVN9Ri.js → CommentsPanel-CNOb7YCm.js} +2 -2
  10. package/dist/{CommentsSidebar-gDU977br.js → CommentsSidebar-VmwjU9va.js} +14 -14
  11. package/dist/{CountdownBlock-CEzrfe5R.js → CountdownBlock-DSvbf3qU.js} +3 -3
  12. package/dist/{CountdownToolbar-B00zhkNJ.js → CountdownToolbar-C2kfS6Oy.js} +31 -30
  13. package/dist/{DesignReferenceSidebar-DedivZZl.js → DesignReferenceSidebar-QC4gEUWp.js} +11 -11
  14. package/dist/{IssuesPanel-C-PjdmAV.js → IssuesPanel-DL2Xr14_.js} +8 -8
  15. package/dist/{LoadingTrack-BlTL4zFv.js → LoadingTrack-C2jKCU2d.js} +1 -1
  16. package/dist/LogicTagInsertButton-D8IwH-9Z.js +1071 -0
  17. package/dist/MediaEditModal-D4GEq2md.js +3545 -0
  18. package/dist/{MediaPanels-BpQNY8YX.js → MediaPanels-sapgKtxu.js} +2 -2
  19. package/dist/MergeTagInput-QI-5KG2R.js +81 -0
  20. package/dist/{MergeTagModeToggle-DGuzSAdX.js → MergeTagModeToggle-D793Bj_E.js} +14 -55
  21. package/dist/{ParagraphEditor-jMKLLTa8.js → ParagraphEditor-DkkPSexG.js} +65 -66
  22. package/dist/{RestoreVersionDialog-DG1jUdBM.js → RestoreVersionDialog-BgueZnZr.js} +5 -5
  23. package/dist/{RichTextEditorContent-JrNEg0kv.js → RichTextEditorContent-BC5UTVnb.js} +11 -11
  24. package/dist/{SaveBlockDialog-C0KC-OKs.js → SaveBlockDialog-BuTuVlLr.js} +12 -11
  25. package/dist/{SavedBlocksBrowserModal-zyOiRgWZ.js → SavedBlocksBrowserModal-Srhix8BB.js} +17 -16
  26. package/dist/{SavedBlocksPanels-epMd799w.js → SavedBlocksPanels-B2iScCS-.js} +2 -2
  27. package/dist/{SavedBlocksPickBar-CJqqQ3jd.js → SavedBlocksPickBar-cI7bDQQi.js} +4 -4
  28. package/dist/{TemplateScoringPanel-m2FOeaai.js → TemplateScoringPanel-C2Rdlyn6.js} +16 -16
  29. package/dist/TemplateSettings-C_5leDdF.js +245 -0
  30. package/dist/{TestEmailModal-D58kYkMV.js → TestEmailModal-DJ5q_u4N.js} +10 -10
  31. package/dist/{TestEmailPanel-BmFVBIQt.js → TestEmailPanel-CP24UGst.js} +2 -2
  32. package/dist/{TitleEditor-C4BGPXnf.js → TitleEditor-QBBOXtxx.js} +15 -15
  33. package/dist/ToggleSwitch-JvQ_CmI1.js +102 -0
  34. package/dist/Toolbar-COD2TW20.js +2426 -0
  35. package/dist/{TplModal-BIDJw4Kj.js → TplModal-C8xGjC1l.js} +5 -5
  36. package/dist/{VersionHistoryMenu-dt_aZQfh.js → VersionHistoryMenu-BVQityes.js} +10 -10
  37. package/dist/{VersionHistoryPanels-B_5SBRrr.js → VersionHistoryPanels-BrK6na4A.js} +2 -2
  38. package/dist/{VersionPreviewBanner-DttvOkwd.js → VersionPreviewBanner-BaMSgA1O.js} +3 -3
  39. package/dist/{blockTypeIcons-CzTizYmK.js → blockTypeIcons-CdXugKyV.js} +16 -37
  40. package/dist/bundle-stats.json +8 -8
  41. package/dist/{ca-Jx2CDwtn.js → ca-BTf1Zbqb.js} +9 -0
  42. package/dist/cdn/chunks/{AiChatSidebar-DeZl9Tk0.js → AiChatSidebar-CjSEoK4x.js} +8 -8
  43. package/dist/cdn/chunks/{AiChatSidebar-DeZl9Tk0.js.map → AiChatSidebar-CjSEoK4x.js.map} +1 -1
  44. package/dist/cdn/chunks/{AiFeatureMenu-Bv8jMu9p.js → AiFeatureMenu-l0K5TOSn.js} +6 -6
  45. package/dist/cdn/chunks/{AiFeatureMenu-Bv8jMu9p.js.map → AiFeatureMenu-l0K5TOSn.js.map} +1 -1
  46. package/dist/cdn/chunks/{BlockIssueBadge-B6PpoOPv.js → BlockIssueBadge-9hHpaXb9.js} +5 -5
  47. package/dist/cdn/chunks/{BlockIssueBadge-B6PpoOPv.js.map → BlockIssueBadge-9hHpaXb9.js.map} +1 -1
  48. package/dist/cdn/chunks/{BlockPreviewCanvas-DfEtDosD.js → BlockPreviewCanvas-lQrAdgG3.js} +30 -30
  49. package/dist/cdn/chunks/{BlockPreviewCanvas-DfEtDosD.js.map → BlockPreviewCanvas-lQrAdgG3.js.map} +1 -1
  50. package/dist/cdn/chunks/{CloudHeaderExtras-Hk98ub-C.js → CloudHeaderExtras-CXNe7Q-4.js} +5 -5
  51. package/dist/cdn/chunks/{CloudHeaderExtras-Hk98ub-C.js.map → CloudHeaderExtras-CXNe7Q-4.js.map} +1 -1
  52. package/dist/cdn/chunks/{CloudPanels-Ba3GLmvF.js → CloudPanels-bHhh9AUA.js} +6 -6
  53. package/dist/cdn/chunks/{CloudPanels-Ba3GLmvF.js.map → CloudPanels-bHhh9AUA.js.map} +1 -1
  54. package/dist/cdn/chunks/{CollaboratorBar-D2dCQ9gg.js → CollaboratorBar-DgqcaGGI.js} +5 -5
  55. package/dist/cdn/chunks/{CollaboratorBar-D2dCQ9gg.js.map → CollaboratorBar-DgqcaGGI.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsPanel-CV2HveQk.js → CommentsPanel-Cy4TlTHC.js} +3 -3
  57. package/dist/cdn/chunks/{CommentsPanel-CV2HveQk.js.map → CommentsPanel-Cy4TlTHC.js.map} +1 -1
  58. package/dist/cdn/chunks/{CommentsSidebar-Dok_vaRc.js → CommentsSidebar-C7oAP3Mx.js} +5 -5
  59. package/dist/cdn/chunks/{CommentsSidebar-Dok_vaRc.js.map → CommentsSidebar-C7oAP3Mx.js.map} +1 -1
  60. package/dist/cdn/chunks/{CountdownBlock-DGDl3ota.js → CountdownBlock-DdC8Lg5F.js} +4 -4
  61. package/dist/cdn/chunks/{CountdownBlock-DGDl3ota.js.map → CountdownBlock-DdC8Lg5F.js.map} +1 -1
  62. package/dist/cdn/chunks/{CountdownToolbar-B9Rin64t.js → CountdownToolbar-CN9h4nlC.js} +22 -21
  63. package/dist/cdn/chunks/{CountdownToolbar-B9Rin64t.js.map → CountdownToolbar-CN9h4nlC.js.map} +1 -1
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-eCuTFak2.js → DesignReferenceSidebar-Bjo0M-AY.js} +7 -7
  65. package/dist/cdn/chunks/{DesignReferenceSidebar-eCuTFak2.js.map → DesignReferenceSidebar-Bjo0M-AY.js.map} +1 -1
  66. package/dist/cdn/chunks/{IssuesPanel-CP7FEzw7.js → IssuesPanel-DdFk-Blf.js} +6 -6
  67. package/dist/cdn/chunks/{IssuesPanel-CP7FEzw7.js.map → IssuesPanel-DdFk-Blf.js.map} +1 -1
  68. package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js → LoadingTrack-Ba5xh5HD.js} +2 -2
  69. package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js.map → LoadingTrack-Ba5xh5HD.js.map} +1 -1
  70. package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js +1035 -0
  71. package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js.map +1 -0
  72. package/dist/cdn/chunks/MediaEditModal-BBZRcYKe.js +3529 -0
  73. package/dist/cdn/chunks/MediaEditModal-BBZRcYKe.js.map +1 -0
  74. package/dist/cdn/chunks/{MediaPanels-TYrKKHX5.js → MediaPanels-CSBCsFwT.js} +3 -3
  75. package/dist/cdn/chunks/{MediaPanels-TYrKKHX5.js.map → MediaPanels-CSBCsFwT.js.map} +1 -1
  76. package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js +83 -0
  77. package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js.map +1 -0
  78. package/dist/cdn/chunks/{MergeTagModeToggle-QGTUIWWo.js → MergeTagModeToggle-n3nvSNeQ.js} +5 -5
  79. package/dist/cdn/chunks/{MergeTagModeToggle-QGTUIWWo.js.map → MergeTagModeToggle-n3nvSNeQ.js.map} +1 -1
  80. package/dist/cdn/chunks/{ParagraphEditor-D1tsPv4v.js → ParagraphEditor-DO4RzP8l.js} +40 -40
  81. package/dist/cdn/chunks/{ParagraphEditor-D1tsPv4v.js.map → ParagraphEditor-DO4RzP8l.js.map} +1 -1
  82. package/dist/cdn/chunks/{RestoreVersionDialog-BeCxNPLS.js → RestoreVersionDialog-CzZ_sFnz.js} +5 -5
  83. package/dist/cdn/chunks/{RestoreVersionDialog-BeCxNPLS.js.map → RestoreVersionDialog-CzZ_sFnz.js.map} +1 -1
  84. package/dist/cdn/chunks/{RichTextEditorContent-BBxzACFQ.js → RichTextEditorContent-Ch5zeyZ7.js} +8 -8
  85. package/dist/cdn/chunks/{RichTextEditorContent-BBxzACFQ.js.map → RichTextEditorContent-Ch5zeyZ7.js.map} +1 -1
  86. package/dist/cdn/chunks/{SaveBlockDialog-CLgh_g7H.js → SaveBlockDialog-LgxYrXyx.js} +10 -9
  87. package/dist/cdn/chunks/{SaveBlockDialog-CLgh_g7H.js.map → SaveBlockDialog-LgxYrXyx.js.map} +1 -1
  88. package/dist/cdn/chunks/{SavedBlocksBrowserModal-B4TcUJJe.js → SavedBlocksBrowserModal-CdeSsTpb.js} +9 -9
  89. package/dist/cdn/chunks/{SavedBlocksBrowserModal-B4TcUJJe.js.map → SavedBlocksBrowserModal-CdeSsTpb.js.map} +1 -1
  90. package/dist/cdn/chunks/{SavedBlocksPanels-CaBsHoRC.js → SavedBlocksPanels-B5hakNJj.js} +3 -3
  91. package/dist/cdn/chunks/{SavedBlocksPanels-CaBsHoRC.js.map → SavedBlocksPanels-B5hakNJj.js.map} +1 -1
  92. package/dist/cdn/chunks/{SavedBlocksPickBar-iG35XCDx.js → SavedBlocksPickBar-Cl6PLwwV.js} +5 -5
  93. package/dist/cdn/chunks/{SavedBlocksPickBar-iG35XCDx.js.map → SavedBlocksPickBar-Cl6PLwwV.js.map} +1 -1
  94. package/dist/cdn/chunks/{TemplateScoringPanel-DuQJBykq.js → TemplateScoringPanel--JxR6CsQ.js} +6 -6
  95. package/dist/cdn/chunks/{TemplateScoringPanel-DuQJBykq.js.map → TemplateScoringPanel--JxR6CsQ.js.map} +1 -1
  96. package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js +207 -0
  97. package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js.map +1 -0
  98. package/dist/cdn/chunks/{TestEmailModal-D6Woss3r.js → TestEmailModal-BAuDxJtD.js} +9 -9
  99. package/dist/cdn/chunks/{TestEmailModal-D6Woss3r.js.map → TestEmailModal-BAuDxJtD.js.map} +1 -1
  100. package/dist/cdn/chunks/{TestEmailPanel-CWQFB7J3.js → TestEmailPanel-GUGZisLp.js} +3 -3
  101. package/dist/cdn/chunks/{TestEmailPanel-CWQFB7J3.js.map → TestEmailPanel-GUGZisLp.js.map} +1 -1
  102. package/dist/cdn/chunks/{TitleEditor-CbY1tgSl.js → TitleEditor-uKu33Nwr.js} +12 -12
  103. package/dist/cdn/chunks/{TitleEditor-CbY1tgSl.js.map → TitleEditor-uKu33Nwr.js.map} +1 -1
  104. package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js +104 -0
  105. package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js.map +1 -0
  106. package/dist/cdn/chunks/Toolbar-dxDYwN5E.js +2385 -0
  107. package/dist/cdn/chunks/Toolbar-dxDYwN5E.js.map +1 -0
  108. package/dist/cdn/chunks/{TplModal-CGpp-d_r.js → TplModal-DuwS2ifK.js} +5 -5
  109. package/dist/cdn/chunks/{TplModal-CGpp-d_r.js.map → TplModal-DuwS2ifK.js.map} +1 -1
  110. package/dist/cdn/chunks/{VersionHistoryMenu-ByVJXDbK.js → VersionHistoryMenu-Dij1pTEb.js} +6 -6
  111. package/dist/cdn/chunks/{VersionHistoryMenu-ByVJXDbK.js.map → VersionHistoryMenu-Dij1pTEb.js.map} +1 -1
  112. package/dist/cdn/chunks/{VersionHistoryPanels-CQJ5OggF.js → VersionHistoryPanels-GeR6MStB.js} +3 -3
  113. package/dist/cdn/chunks/{VersionHistoryPanels-CQJ5OggF.js.map → VersionHistoryPanels-GeR6MStB.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionPreviewBanner-G4lLbfr8.js → VersionPreviewBanner-Df3FVlig.js} +4 -4
  115. package/dist/cdn/chunks/{VersionPreviewBanner-G4lLbfr8.js.map → VersionPreviewBanner-Df3FVlig.js.map} +1 -1
  116. package/dist/cdn/chunks/{blockTypeIcons-CQY-vxdM.js → blockTypeIcons-raBjStuv.js} +2 -2
  117. package/dist/cdn/chunks/{blockTypeIcons-CQY-vxdM.js.map → blockTypeIcons-raBjStuv.js.map} +1 -1
  118. package/dist/cdn/chunks/{ca-Jx2CDwtn.js → ca-BTf1Zbqb.js} +10 -1
  119. package/dist/cdn/chunks/{ca-Jx2CDwtn.js.map → ca-BTf1Zbqb.js.map} +1 -1
  120. package/dist/cdn/chunks/{cloud-BLgCKP7Z.js → cloud-eaXyxZ8l.js} +2 -2
  121. package/dist/cdn/chunks/{cloud-BLgCKP7Z.js.map → cloud-eaXyxZ8l.js.map} +1 -1
  122. package/dist/cdn/chunks/{createCloudRuntime-ClvtMBF1.js → createCloudRuntime-D5bXzcTe.js} +6 -6
  123. package/dist/cdn/chunks/{createCloudRuntime-ClvtMBF1.js.map → createCloudRuntime-D5bXzcTe.js.map} +1 -1
  124. package/dist/{de-Ck0pBGHu.js → cdn/chunks/de-xzrh9PA3.js} +11 -0
  125. package/dist/cdn/chunks/{de-Ck0pBGHu.js.map → de-xzrh9PA3.js.map} +1 -1
  126. package/dist/cdn/chunks/{dist-BW6Y49zE.js → dist-BRZhN8qJ.js} +4 -4
  127. package/dist/cdn/chunks/dist-BRZhN8qJ.js.map +1 -0
  128. package/dist/cdn/chunks/{dist-CAFTQ6Y2.js → dist-CXB2_kBa.js} +27 -22
  129. package/dist/cdn/chunks/dist-CXB2_kBa.js.map +1 -0
  130. package/dist/cdn/chunks/{draggable-kbOhCgnk.js → draggable-IB4x6w2O.js} +1477 -1470
  131. package/dist/cdn/chunks/draggable-IB4x6w2O.js.map +1 -0
  132. package/dist/cdn/chunks/editor-modal-C-yBlj2C.js +2700 -0
  133. package/dist/cdn/chunks/editor-modal-C-yBlj2C.js.map +1 -0
  134. package/dist/cdn/chunks/en-DYtFUE2l.js +2 -0
  135. package/dist/cdn/chunks/{es-lagTvUfX.js → es-BT4LSpE2.js} +10 -1
  136. package/dist/cdn/chunks/{es-lagTvUfX.js.map → es-BT4LSpE2.js.map} +1 -1
  137. package/dist/cdn/chunks/{extensions-D2YIhF7u.js → extensions-Bhu8UEE5.js} +105 -45
  138. package/dist/cdn/chunks/extensions-Bhu8UEE5.js.map +1 -0
  139. package/dist/cdn/chunks/{fr-C4hVl5Lk.js → fr-CI7OJoql.js} +10 -1
  140. package/dist/cdn/chunks/{fr-C4hVl5Lk.js.map → fr-CI7OJoql.js.map} +1 -1
  141. package/dist/cdn/chunks/{icons-DdrAicM2.js → icons-BKkJ-5xF.js} +43 -43
  142. package/dist/cdn/chunks/{icons-DdrAicM2.js.map → icons-BKkJ-5xF.js.map} +1 -1
  143. package/dist/cdn/chunks/{keys-DXYJTLZF.js → keys-dJbD1QPs.js} +2 -2
  144. package/dist/cdn/chunks/{keys-DXYJTLZF.js.map → keys-dJbD1QPs.js.map} +1 -1
  145. package/dist/{nl-CReD7Apd.js → cdn/chunks/nl-D8y5OWGB.js} +11 -0
  146. package/dist/cdn/chunks/{nl-CReD7Apd.js.map → nl-D8y5OWGB.js.map} +1 -1
  147. package/dist/cdn/chunks/{pt-BR-BRA0-vGP.js → pt-BR-DMCbUBvJ.js} +10 -1
  148. package/dist/cdn/chunks/{pt-BR-BRA0-vGP.js.map → pt-BR-DMCbUBvJ.js.map} +1 -1
  149. package/dist/cdn/chunks/socialIcons-9VrG8X3m.js +1054 -0
  150. package/dist/cdn/chunks/socialIcons-9VrG8X3m.js.map +1 -0
  151. package/dist/cdn/chunks/{src-fn7uy1FD.js → src-O5Sp_qJ7.js} +3 -3
  152. package/dist/cdn/chunks/{src-fn7uy1FD.js.map → src-O5Sp_qJ7.js.map} +1 -1
  153. package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js +36 -0
  154. package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js.map +1 -0
  155. package/dist/cdn/chunks/{tiptap-Epe8m3Vo.js → tiptap-DhLuKyDc.js} +2776 -2773
  156. package/dist/cdn/chunks/tiptap-DhLuKyDc.js.map +1 -0
  157. package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js → useAliveFlag-DAlQLbM2.js} +2 -2
  158. package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js.map → useAliveFlag-DAlQLbM2.js.map} +1 -1
  159. package/dist/cdn/chunks/{useCloudI18n-OezCj0cx.js → useCloudI18n-C09JcFS0.js} +3 -3
  160. package/dist/cdn/chunks/{useCloudI18n-OezCj0cx.js.map → useCloudI18n-C09JcFS0.js.map} +1 -1
  161. package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js +2592 -0
  162. package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js.map +1 -0
  163. package/dist/cdn/chunks/useEditorRoot-DFx2fXJP.js +10 -0
  164. package/dist/cdn/chunks/{useEditorRoot-ByHPMqYT.js.map → useEditorRoot-DFx2fXJP.js.map} +1 -1
  165. package/dist/cdn/chunks/{useI18n-BhE7ndNr.js → useI18n-DTZ9sIcv.js} +3 -3
  166. package/dist/cdn/chunks/{useI18n-BhE7ndNr.js.map → useI18n-DTZ9sIcv.js.map} +1 -1
  167. package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js +38 -0
  168. package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js.map +1 -0
  169. package/dist/cdn/chunks/{useMergeTag-DE2mpy1w.js → useMergeTag-BE8oDoha.js} +3 -3
  170. package/dist/cdn/chunks/{useMergeTag-DE2mpy1w.js.map → useMergeTag-BE8oDoha.js.map} +1 -1
  171. package/dist/cdn/chunks/{usePopoverPosition-BPL891uG.js → usePopoverPosition-gB9q-ql7.js} +3 -3
  172. package/dist/cdn/chunks/{usePopoverPosition-BPL891uG.js.map → usePopoverPosition-gB9q-ql7.js.map} +1 -1
  173. package/dist/cdn/chunks/{useScrollToBlock-DwF4pVur.js → useScrollToBlock-CtTXwmiU.js} +3 -3
  174. package/dist/cdn/chunks/{useScrollToBlock-DwF4pVur.js.map → useScrollToBlock-CtTXwmiU.js.map} +1 -1
  175. package/dist/cdn/editor.css +1 -1
  176. package/dist/cdn/editor.js +809 -3337
  177. package/dist/cdn/editor.js.map +1 -1
  178. package/dist/{check-9xX6RVHz.js → check-eqb2JhqU.js} +1 -1
  179. package/dist/{chevron-down-J5hFJ6TL.js → chevron-down-Dkr-7Ywl.js} +1 -1
  180. package/dist/{chevron-right-BJuo5PQ-.js → chevron-right-Bge4XF_B.js} +1 -1
  181. package/dist/{chevron-up-Qfi5k52_.js → chevron-up-CQAyl0kC.js} +1 -1
  182. package/dist/{circle-alert-BiArYmkB.js → circle-alert-CYgTHKWr.js} +1 -1
  183. package/dist/{clock-BkYJZ7Y0.js → clock-BgSJZJP5.js} +1 -1
  184. package/dist/{cloud-DdidMW6f.js → cloud-C9xWZXhg.js} +1 -1
  185. package/dist/{copy-BRLUNHwF.js → copy-mw6PVnOJ.js} +1 -1
  186. package/dist/{createCloudRuntime-CNFXaTNQ.js → createCloudRuntime-BGd5--Bq.js} +5 -5
  187. package/dist/{createLucideIcon-CDDkF1Tm.js → createLucideIcon-BxY5yz5u.js} +6 -6
  188. package/dist/{cdn/chunks/de-Ck0pBGHu.js → de-xzrh9PA3.js} +9 -2
  189. package/dist/{dist-D8i1ixHK.js → dist-8VFzbeu9.js} +3 -3
  190. package/dist/{dist-DBirAJIs.js → dist-BDuPwOyn.js} +26 -21
  191. package/dist/{dist-CtF9STPS.js → dist-BJM3eFyT.js} +1 -1
  192. package/dist/{dist-DkcA6epL.js → dist-BdHF7nyq.js} +3 -3
  193. package/dist/{dist-ByT5fgKq.js → dist-Bl4rxpX9.js} +1 -1
  194. package/dist/{dist-BVqAYoRB.js → dist-BmsLcnrO.js} +4 -4
  195. package/dist/{dist-CtMXAH7a.js → dist-BxVnMgXZ.js} +1 -1
  196. package/dist/{dist-DC-3T0ED.js → dist-CQSVro7b.js} +1 -1
  197. package/dist/{dist-f7HXo6j6.js → dist-DQbOebGW.js} +1 -1
  198. package/dist/{dist-DL9334yz.js → dist-DerFNpDY.js} +3 -3
  199. package/dist/{dist-D08oVYhr.js → dist-Djmzp6wi.js} +1 -1
  200. package/dist/{dist-D7WY8VPq.js → dist-DyrEOKEJ.js} +1 -1
  201. package/dist/{dist-DzdeVn-W.js → dist-EDkj3Ub1.js} +1 -1
  202. package/dist/{dist-C1tsW_99.js → dist-wyXxj3R1.js} +1 -1
  203. package/dist/editor-modal-oD1qNz_P.js +2773 -0
  204. package/dist/en-CM5fTFSo.js +2 -0
  205. package/dist/{es-lagTvUfX.js → es-BT4LSpE2.js} +9 -0
  206. package/dist/extensions-DRN-elXT.js +1645 -0
  207. package/dist/{eye-DwhBOaV8.js → eye-DphkRtAD.js} +1 -1
  208. package/dist/{fr-C4hVl5Lk.js → fr-CI7OJoql.js} +9 -0
  209. package/dist/{image-up-CiyQNZBt.js → image-up-Qi2BXD7T.js} +1 -1
  210. package/dist/{info-D6A1qEiF.js → info-VSyAs02q.js} +1 -1
  211. package/dist/{keys-DD1rl72F.js → keys-BdoSgsz9.js} +1 -1
  212. package/dist/{link-tKGmYWsB.js → link-CNuozGqD.js} +1 -1
  213. package/dist/{list-DjZQRpeI.js → list-BA0I5Wmu.js} +1 -1
  214. package/dist/{loader-circle-D9ZL3Sv0.js → loader-circle-z5eeqasv.js} +1 -1
  215. package/dist/{message-circle-KTHxCcpB.js → message-circle-BsQ9hEup.js} +1 -1
  216. package/dist/{cdn/chunks/nl-CReD7Apd.js → nl-D8y5OWGB.js} +9 -2
  217. package/dist/package-OkXfuRoO.js +25 -0
  218. package/dist/{pencil-Bq-nbQ7F.js → pencil-DFVFA7Dj.js} +1 -1
  219. package/dist/{plus-CRMnR4IG.js → plus-D8bkVjZ7.js} +1 -1
  220. package/dist/{pt-BR-BRA0-vGP.js → pt-BR-DMCbUBvJ.js} +9 -0
  221. package/dist/{refresh-cw-D7bYS5tm.js → refresh-cw-DPB7YFuz.js} +1 -1
  222. package/dist/{runtime-dom.esm-bundler-PnoZU512.js → runtime-dom.esm-bundler-BGbPz4-g.js} +2 -2
  223. package/dist/{search-DUo0YwPz.js → search-C-dCgqIa.js} +1 -1
  224. package/dist/{send-DaVMQphu.js → send-Cm2fy2zm.js} +1 -1
  225. package/dist/{shield-check-DxaaurL9.js → shield-check-COgBYFDF.js} +1 -1
  226. package/dist/smartphone-v0u_MOEV.js +46 -0
  227. package/dist/socialIcons-DkGcpEwC.js +1130 -0
  228. package/dist/{sparkles-D6T6k30e.js → sparkles-Ds0RF8Iu.js} +1 -1
  229. package/dist/style.css +1 -1
  230. package/dist/templateSettingsFields-YCFVBVYh.js +34 -0
  231. package/dist/templatical-editor.js +895 -3498
  232. package/dist/{text-align-start-vreFpmCX.js → text-align-start-DiavaIm6.js} +1 -1
  233. package/dist/{trash-DBv8MGY6.js → trash-DnOkfu2V.js} +1 -1
  234. package/dist/{triangle-alert-CmNS2LLv.js → triangle-alert-DGLAyXnh.js} +1 -1
  235. package/dist/{upload-DDB9Fs0P.js → upload-BBDme2cy.js} +1 -1
  236. package/dist/{useAliveFlag-oyByIcjy.js → useAliveFlag-BkKyhkwZ.js} +1 -1
  237. package/dist/{useCloudI18n-C1wuXik6.js → useCloudI18n-D1iedlP3.js} +2 -2
  238. package/dist/{useEditorCore-jfwgLThK.js → useEditorCore-C5APBjjV.js} +1140 -2325
  239. package/dist/{useEditorRoot-eVv4doqZ.js → useEditorRoot-BOxn5EfP.js} +2 -2
  240. package/dist/{useI18n-VOtdfENx.js → useI18n-Ds_-druD.js} +2 -2
  241. package/dist/useLogicTag-DoHfc08B.js +36 -0
  242. package/dist/{useMergeTag-CQM9pFca.js → useMergeTag-DXyum3kG.js} +2 -2
  243. package/dist/{usePopoverPosition-gZjRywai.js → usePopoverPosition-Du-Ah8E9.js} +2 -2
  244. package/dist/{useScrollToBlock-C0Ehnyl4.js → useScrollToBlock-DXQYPCnJ.js} +3 -3
  245. package/dist/{vue.runtime.esm-bundler-DShF3P6k.js → vue.runtime.esm-bundler-CyqhBwpY.js} +1133 -1126
  246. package/dist/{x-B7sgO_z8.js → x-3BHV3Q6K.js} +1 -1
  247. package/package.json +14 -14
  248. package/dist/ColorPicker-BTtN94te.js +0 -501
  249. package/dist/FieldRow-C8nOknr_.js +0 -128
  250. package/dist/MergeTagInput-Cw1RoMly.js +0 -509
  251. package/dist/MergeTagSuggestion-BXO3UIXW.js +0 -1329
  252. package/dist/cdn/chunks/ColorPicker-BaonTCAQ.js +0 -502
  253. package/dist/cdn/chunks/ColorPicker-BaonTCAQ.js.map +0 -1
  254. package/dist/cdn/chunks/FieldRow-D9OJhYeb.js +0 -130
  255. package/dist/cdn/chunks/FieldRow-D9OJhYeb.js.map +0 -1
  256. package/dist/cdn/chunks/MergeTagInput-CSIThqkz.js +0 -470
  257. package/dist/cdn/chunks/MergeTagInput-CSIThqkz.js.map +0 -1
  258. package/dist/cdn/chunks/MergeTagSuggestion-CY6WK8Eb.js +0 -215
  259. package/dist/cdn/chunks/MergeTagSuggestion-CY6WK8Eb.js.map +0 -1
  260. package/dist/cdn/chunks/dist-BW6Y49zE.js.map +0 -1
  261. package/dist/cdn/chunks/dist-CAFTQ6Y2.js.map +0 -1
  262. package/dist/cdn/chunks/draggable-kbOhCgnk.js.map +0 -1
  263. package/dist/cdn/chunks/editor-modal-B6IdQWlf.js +0 -5908
  264. package/dist/cdn/chunks/editor-modal-B6IdQWlf.js.map +0 -1
  265. package/dist/cdn/chunks/en-DjunooBz.js +0 -2
  266. package/dist/cdn/chunks/extensions-D2YIhF7u.js.map +0 -1
  267. package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +0 -1
  268. package/dist/cdn/chunks/useEditorCore-06PtcUi1.js +0 -3698
  269. package/dist/cdn/chunks/useEditorCore-06PtcUi1.js.map +0 -1
  270. package/dist/cdn/chunks/useEditorRoot-ByHPMqYT.js +0 -10
  271. package/dist/editor-modal-uAEB6xKz.js +0 -5998
  272. package/dist/en-CQWkDCpm.js +0 -2
  273. package/dist/extensions-CcGj7OfS.js +0 -470
@@ -0,0 +1,2385 @@
1
+ import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
2
+ import { B as t, E as n, F as r, H as i, I as a, N as o, Q as s, R as c, S as l, U as u, X as d, at as f, b as p, ct as m, f as h, g, h as _, lt as v, m as y, o as b, p as x, s as S, u as C, ut as w, x as T, y as E } from "./draggable-IB4x6w2O.js";
3
+ import { L as D, W as O, i as k, it as A, r as j } from "./src-Dwgq7hf4.js";
4
+ import { a as M, h as N, i as ee, r as P, s as te } from "./socialIcons-9VrG8X3m.js";
5
+ import { _ as ne } from "./dist-BRZhN8qJ.js";
6
+ import { I as re, N as ie, Z as F, c as ae, d as oe, h as se, n as ce, p as le, v as I } from "./keys-dJbD1QPs.js";
7
+ import { t as L } from "./useI18n-DTZ9sIcv.js";
8
+ import { a as ue } from "./usePopoverPosition-gB9q-ql7.js";
9
+ import { $ as de, D as fe, Et as pe, It as me, Mt as he, Ot as ge, U as R, d as _e, dt as ve, et as z, ft as ye, g as B, h as V, it as be, m as H, n as xe, nt as Se, rt as Ce, s as we, z as Te } from "./icons-BKkJ-5xF.js";
10
+ import { t as Ee } from "./_plugin-vue_export-helper-B3ysoDQm.js";
11
+ import { t as De } from "./useAliveFlag-DAlQLbM2.js";
12
+ import { _ as Oe, b as ke, c as Ae, g as U, h as W, m as G, p as K, r as je } from "./styleConstants-C_YAPdQS.js";
13
+ import { t as Me } from "./blockTypeIcons-raBjStuv.js";
14
+ import { c as q } from "./LogicTagInsertButton-DpyPozop.js";
15
+ import { n as Ne, t as J } from "./ToggleSwitch-CDy8OfcB.js";
16
+ import { t as Y } from "./MergeTagInput-ERJr7bP_.js";
17
+ //#region src/components/SlidingPillSelect.vue?vue&type=script&setup=true&lang.ts
18
+ var Pe = [
19
+ "aria-checked",
20
+ "aria-label",
21
+ "title",
22
+ "onClick"
23
+ ], Fe = { key: 1 }, X = /* @__PURE__ */ l({
24
+ __name: "SlidingPillSelect",
25
+ props: {
26
+ options: {},
27
+ modelValue: {}
28
+ },
29
+ emits: ["update:modelValue"],
30
+ setup(e, { emit: t }) {
31
+ let n = e, i = t, a = h(() => n.options.findIndex((e) => e.value === n.modelValue)), s = h(() => `translateX(${Math.max(a.value, 0) * 100}%)`);
32
+ return (t, n) => (o(), g("div", {
33
+ role: "radiogroup",
34
+ class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
35
+ style: v({
36
+ gridTemplateColumns: `repeat(${e.options.length}, 1fr)`,
37
+ backgroundColor: "var(--tpl-bg-hover)"
38
+ })
39
+ }, [a.value >= 0 ? (o(), g("div", {
40
+ key: 0,
41
+ class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
42
+ style: v({
43
+ left: "4px",
44
+ width: `calc((100% - 8px) / ${e.options.length})`,
45
+ transform: s.value,
46
+ backgroundColor: "var(--tpl-bg)",
47
+ boxShadow: "var(--tpl-shadow)",
48
+ transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
49
+ })
50
+ }, null, 4)) : _("", !0), (o(!0), g(C, null, r(e.options, (t) => (o(), g("button", {
51
+ key: t.value,
52
+ role: "radio",
53
+ "aria-checked": e.modelValue === t.value,
54
+ "aria-label": t.label,
55
+ class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:py-[5px] tpl:text-xs tpl:font-medium",
56
+ style: v({
57
+ color: e.modelValue === t.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
58
+ transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
59
+ }),
60
+ title: t.label,
61
+ onClick: (e) => i("update:modelValue", t.value)
62
+ }, [t.icon ? (o(), y(c(t.icon), {
63
+ key: 0,
64
+ size: 14,
65
+ "stroke-width": 2
66
+ })) : (o(), g("span", Fe, w(t.label), 1))], 12, Pe))), 128))], 4));
67
+ }
68
+ }), Ie = { class: "tpl:mb-3.5" }, Le = ["value"], Re = { value: "" }, ze = ["value"], Be = { class: "tpl:mb-3.5" }, Ve = { class: "tpl:mb-3.5" }, He = { class: "tpl:mb-3.5" }, Ue = { class: "tpl:mb-3.5" }, We = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Ge = { class: "tpl:mb-3.5" }, Ke = { class: "tpl:flex tpl:items-stretch" }, qe = ["value"], Je = { class: "tpl:mb-3.5" }, Ye = { class: "tpl:flex tpl:items-stretch" }, Xe = ["value"], Ze = { class: "tpl:mb-3.5" }, Qe = ["value"], $e = { value: "auto" }, et = { value: "full" }, tt = { value: "custom" }, nt = {
69
+ key: 0,
70
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
71
+ }, rt = ["value"], it = { class: "tpl:mb-3.5" }, at = 200, ot = /* @__PURE__ */ l({
72
+ __name: "ButtonToolbar",
73
+ props: {
74
+ block: {},
75
+ fontFamilies: {}
76
+ },
77
+ emits: ["update"],
78
+ setup(e, { emit: t }) {
79
+ let n = e, i = t, { t: a } = L(), s = h(() => n.block.width === "full" ? "full" : typeof n.block.width == "number" ? "custom" : "auto");
80
+ function c(e, t) {
81
+ i("update", { [e]: t });
82
+ }
83
+ function l(e) {
84
+ if (e === "full") {
85
+ c("width", "full");
86
+ return;
87
+ }
88
+ if (e === "custom") {
89
+ c("width", typeof n.block.width == "number" ? n.block.width : at);
90
+ return;
91
+ }
92
+ c("width", void 0);
93
+ }
94
+ function u(e) {
95
+ let t = Number(e);
96
+ !Number.isFinite(t) || t <= 0 || c("width", t);
97
+ }
98
+ return (t, n) => (o(), g(C, null, [
99
+ x("div", Ie, [x("label", { class: m(f(U)) }, w(f(a).button.fontFamily), 3), x("select", {
100
+ class: m(f(K)),
101
+ value: e.block.fontFamily || "",
102
+ onChange: n[0] ||= (e) => c("fontFamily", e.target.value || void 0)
103
+ }, [x("option", Re, w(f(a).button.inheritFont), 1), (o(!0), g(C, null, r(e.fontFamilies, (e) => (o(), g("option", {
104
+ key: e.value,
105
+ value: e.value
106
+ }, w(e.label), 9, ze))), 128))], 42, Le)]),
107
+ x("div", Be, [x("label", { class: m(f(U)) }, w(f(a).button.text), 3), p(Y, {
108
+ "model-value": e.block.text,
109
+ type: "text",
110
+ "onUpdate:modelValue": n[1] ||= (e) => c("text", e)
111
+ }, null, 8, ["model-value"])]),
112
+ x("div", Ve, [
113
+ x("label", { class: m(f(U)) }, w(f(a).button.url), 3),
114
+ p(Y, {
115
+ "model-value": e.block.url,
116
+ type: "url",
117
+ placeholder: f(a).button.urlPlaceholder,
118
+ "onUpdate:modelValue": n[2] ||= (e) => c("url", e)
119
+ }, null, 8, ["model-value", "placeholder"]),
120
+ e.block.url ? (o(), y(J, {
121
+ key: 0,
122
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
123
+ "model-value": e.block.openInNewTab ?? !1,
124
+ label: f(a).button.openInNewTab,
125
+ "onUpdate:modelValue": n[3] ||= (e) => c("openInNewTab", e)
126
+ }, null, 8, ["model-value", "label"])) : _("", !0)
127
+ ]),
128
+ x("div", He, [x("label", { class: m(f(U)) }, w(f(a).button.background), 3), p(q, {
129
+ "model-value": e.block.backgroundColor,
130
+ "onUpdate:modelValue": n[4] ||= (e) => c("backgroundColor", e)
131
+ }, null, 8, ["model-value"])]),
132
+ x("div", Ue, [x("label", { class: m(f(U)) }, w(f(a).button.textColor), 3), p(q, {
133
+ "model-value": e.block.textColor,
134
+ "onUpdate:modelValue": n[5] ||= (e) => c("textColor", e)
135
+ }, null, 8, ["model-value"])]),
136
+ x("div", We, [x("div", Ge, [x("label", { class: m(f(U)) }, w(f(a).button.borderRadius), 3), x("div", Ke, [x("input", {
137
+ type: "number",
138
+ class: m(f(G)),
139
+ value: e.block.borderRadius,
140
+ min: "0",
141
+ max: "50",
142
+ onInput: n[6] ||= (e) => c("borderRadius", Number(e.target.value))
143
+ }, null, 42, qe), x("span", { class: m(f(W)) }, "px", 2)])]), x("div", Je, [x("label", { class: m(f(U)) }, w(f(a).button.fontSize), 3), x("div", Ye, [x("input", {
144
+ type: "number",
145
+ class: m(f(G)),
146
+ value: e.block.fontSize,
147
+ min: "10",
148
+ max: "36",
149
+ onInput: n[7] ||= (e) => c("fontSize", Number(e.target.value))
150
+ }, null, 42, Xe), x("span", { class: m(f(W)) }, "px", 2)])])]),
151
+ x("div", Ze, [
152
+ x("label", { class: m(f(U)) }, w(f(a).button.width), 3),
153
+ x("select", {
154
+ class: m(f(K)),
155
+ value: s.value,
156
+ onChange: n[8] ||= (e) => l(e.target.value)
157
+ }, [
158
+ x("option", $e, w(f(a).button.widthAuto), 1),
159
+ x("option", et, w(f(a).button.fullWidth), 1),
160
+ x("option", tt, w(f(a).button.widthCustom), 1)
161
+ ], 42, Qe),
162
+ s.value === "custom" ? (o(), g("div", nt, [x("input", {
163
+ type: "number",
164
+ class: m(f(G)),
165
+ value: typeof e.block.width == "number" ? e.block.width : at,
166
+ min: "20",
167
+ onInput: n[9] ||= (e) => u(e.target.value)
168
+ }, null, 42, rt), x("span", { class: m(f(W)) }, "px", 2)])) : _("", !0)
169
+ ]),
170
+ x("div", it, [x("label", { class: m(f(U)) }, w(f(a).title.align), 3), p(X, {
171
+ options: [
172
+ {
173
+ value: "left",
174
+ label: f(a).title.alignLeft
175
+ },
176
+ {
177
+ value: "center",
178
+ label: f(a).title.alignCenter
179
+ },
180
+ {
181
+ value: "right",
182
+ label: f(a).title.alignRight
183
+ }
184
+ ],
185
+ "model-value": e.block.align ?? "center",
186
+ "onUpdate:modelValue": n[10] ||= (e) => c("align", e)
187
+ }, null, 8, ["options", "model-value"])])
188
+ ], 64));
189
+ }
190
+ }), st = { class: "spacing-control" }, ct = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, lt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, ut = { class: "tpl:flex tpl:items-center" }, dt = ["aria-label"], ft = ["value", "aria-label"], pt = ["aria-label"], mt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ht = { class: "tpl:flex tpl:items-center" }, gt = ["aria-label"], _t = ["value", "aria-label"], vt = ["aria-label"], yt = ["aria-label", "title"], bt = { class: "tpl:flex tpl:items-center" }, xt = ["aria-label"], St = ["value", "aria-label"], Ct = ["aria-label"], wt = { class: "tpl:flex tpl:items-center" }, Tt = ["aria-label"], Et = ["value", "aria-label"], Dt = ["aria-label"], Z = "tpl:flex tpl:items-center tpl:justify-center tpl:w-8 tpl:h-8 tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:cursor-pointer tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)] tpl:active:bg-[var(--tpl-bg-active)]", Ot = "tpl:w-10 tpl:h-8 tpl:text-center tpl:text-xs tpl:font-medium tpl:border-y tpl:border-x-0 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]", kt = /*#__PURE__*/ Ee(/* @__PURE__ */ l({
191
+ __name: "SpacingControl",
192
+ props: {
193
+ modelValue: {},
194
+ label: {}
195
+ },
196
+ emits: ["update:modelValue"],
197
+ setup(e, { emit: n }) {
198
+ let r = e, i = n, { t: a } = L(), c = h(() => r.modelValue.top === r.modelValue.right && r.modelValue.right === r.modelValue.bottom && r.modelValue.bottom === r.modelValue.left), l = s(c.value);
199
+ t(c, (e) => {
200
+ !e && l.value && (l.value = !1);
201
+ });
202
+ function u(e, t) {
203
+ let n = Math.max(0, r.modelValue[e] + t);
204
+ l.value ? i("update:modelValue", {
205
+ top: n,
206
+ right: n,
207
+ bottom: n,
208
+ left: n
209
+ }) : i("update:modelValue", {
210
+ ...r.modelValue,
211
+ [e]: n
212
+ });
213
+ }
214
+ function d(e, t) {
215
+ let n = Math.max(0, t);
216
+ l.value ? i("update:modelValue", {
217
+ top: n,
218
+ right: n,
219
+ bottom: n,
220
+ left: n
221
+ }) : i("update:modelValue", {
222
+ ...r.modelValue,
223
+ [e]: n
224
+ });
225
+ }
226
+ function _() {
227
+ if (l.value = !l.value, l.value) {
228
+ let e = r.modelValue.top;
229
+ i("update:modelValue", {
230
+ top: e,
231
+ right: e,
232
+ bottom: e,
233
+ left: e
234
+ });
235
+ }
236
+ }
237
+ return (t, n) => (o(), g("div", st, [x("label", ct, w(e.label), 1), x("div", lt, [
238
+ x("div", ut, [
239
+ x("button", {
240
+ "aria-label": f(a).spacingControl.decreaseTop,
241
+ class: m([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
242
+ onClick: n[0] ||= (e) => u("top", -1)
243
+ }, [p(f(z), {
244
+ size: 12,
245
+ "stroke-width": 2
246
+ })], 10, dt),
247
+ x("input", {
248
+ type: "number",
249
+ class: m(Ot),
250
+ value: e.modelValue.top,
251
+ "aria-label": f(a).spacingControl.top,
252
+ min: "0",
253
+ onInput: n[1] ||= (e) => d("top", Number(e.target.value))
254
+ }, null, 40, ft),
255
+ x("button", {
256
+ "aria-label": f(a).spacingControl.increaseTop,
257
+ class: m([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
258
+ onClick: n[2] ||= (e) => u("top", 1)
259
+ }, [p(f(R), {
260
+ size: 12,
261
+ "stroke-width": 2
262
+ })], 10, pt)
263
+ ]),
264
+ x("div", mt, [
265
+ x("div", ht, [
266
+ x("button", {
267
+ "aria-label": f(a).spacingControl.decreaseLeft,
268
+ class: m([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
269
+ onClick: n[3] ||= (e) => u("left", -1)
270
+ }, [p(f(z), {
271
+ size: 12,
272
+ "stroke-width": 2
273
+ })], 10, gt),
274
+ x("input", {
275
+ type: "number",
276
+ class: m(Ot),
277
+ value: e.modelValue.left,
278
+ "aria-label": f(a).spacingControl.left,
279
+ min: "0",
280
+ onInput: n[4] ||= (e) => d("left", Number(e.target.value))
281
+ }, null, 40, _t),
282
+ x("button", {
283
+ "aria-label": f(a).spacingControl.increaseLeft,
284
+ class: m([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
285
+ onClick: n[5] ||= (e) => u("left", 1)
286
+ }, [p(f(R), {
287
+ size: 12,
288
+ "stroke-width": 2
289
+ })], 10, vt)
290
+ ]),
291
+ x("button", {
292
+ class: m(["tpl:flex tpl:h-8 tpl:w-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", l.value ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
293
+ "aria-label": l.value ? f(a).spacingControl.unlock : f(a).spacingControl.lockAll,
294
+ title: l.value ? f(a).spacingControl.unlock : f(a).spacingControl.lockAll,
295
+ onClick: _
296
+ }, [l.value ? (o(), y(f(Se), {
297
+ key: 0,
298
+ size: 14,
299
+ "stroke-width": 2
300
+ })) : (o(), y(f(Ce), {
301
+ key: 1,
302
+ size: 14,
303
+ "stroke-width": 2
304
+ }))], 10, yt),
305
+ x("div", bt, [
306
+ x("button", {
307
+ "aria-label": f(a).spacingControl.decreaseRight,
308
+ class: m([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
309
+ onClick: n[6] ||= (e) => u("right", -1)
310
+ }, [p(f(z), {
311
+ size: 12,
312
+ "stroke-width": 2
313
+ })], 10, xt),
314
+ x("input", {
315
+ type: "number",
316
+ class: m(Ot),
317
+ value: e.modelValue.right,
318
+ "aria-label": f(a).spacingControl.right,
319
+ min: "0",
320
+ onInput: n[7] ||= (e) => d("right", Number(e.target.value))
321
+ }, null, 40, St),
322
+ x("button", {
323
+ "aria-label": f(a).spacingControl.increaseRight,
324
+ class: m([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
325
+ onClick: n[8] ||= (e) => u("right", 1)
326
+ }, [p(f(R), {
327
+ size: 12,
328
+ "stroke-width": 2
329
+ })], 10, Ct)
330
+ ])
331
+ ]),
332
+ x("div", wt, [
333
+ x("button", {
334
+ "aria-label": f(a).spacingControl.decreaseBottom,
335
+ class: m([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
336
+ onClick: n[9] ||= (e) => u("bottom", -1)
337
+ }, [p(f(z), {
338
+ size: 12,
339
+ "stroke-width": 2
340
+ })], 10, Tt),
341
+ x("input", {
342
+ type: "number",
343
+ class: m(Ot),
344
+ value: e.modelValue.bottom,
345
+ "aria-label": f(a).spacingControl.bottom,
346
+ min: "0",
347
+ onInput: n[10] ||= (e) => d("bottom", Number(e.target.value))
348
+ }, null, 40, Et),
349
+ x("button", {
350
+ "aria-label": f(a).spacingControl.increaseBottom,
351
+ class: m([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
352
+ onClick: n[11] ||= (e) => u("bottom", 1)
353
+ }, [p(f(R), {
354
+ size: 12,
355
+ "stroke-width": 2
356
+ })], 10, Dt)
357
+ ])
358
+ ])]));
359
+ }
360
+ }), [["__scopeId", "data-v-69591c1e"]]), At = ["data-testid"], jt = { class: "tpl:mt-3" }, Mt = /* @__PURE__ */ l({
361
+ __name: "CollapsibleSection",
362
+ props: {
363
+ title: {},
364
+ open: { type: Boolean },
365
+ noBorder: { type: Boolean },
366
+ headerTestId: {}
367
+ },
368
+ emits: ["toggle"],
369
+ setup(e) {
370
+ return (t, n) => (o(), g("div", { class: m(["tpl:py-3", e.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [x("button", {
371
+ type: "button",
372
+ "data-testid": e.headerTestId,
373
+ class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-1.5 tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
374
+ onClick: n[0] ||= (e) => t.$emit("toggle")
375
+ }, [p(f(me), {
376
+ class: m(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
377
+ size: 12,
378
+ "stroke-width": 2
379
+ }, null, 8, ["class"]), x("span", null, w(e.title), 1)], 8, At), u(x("div", jt, [a(t.$slots, "default")], 512), [[S, e.open]])], 2));
380
+ }
381
+ }), Nt = { class: "tpl:space-y-2" }, Pt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ft = { class: "tpl:space-y-2" }, It = ["value"], Lt = { value: "" }, Rt = ["label"], zt = ["value"], Bt = ["value"], Vt = {
382
+ key: 0,
383
+ value: "__custom__"
384
+ }, Ht = {
385
+ key: 0,
386
+ class: "tpl:space-y-2"
387
+ }, Ut = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Wt = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Gt = { class: "tpl:flex tpl:justify-end" }, Kt = ["disabled"], qt = {
388
+ key: 0,
389
+ class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
390
+ }, Jt = { class: "tpl:space-y-1" }, Yt = { class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]" }, Xt = {
391
+ key: 0,
392
+ class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
393
+ }, Zt = /* @__PURE__ */ l({
394
+ __name: "CommonBlockSettings",
395
+ props: {
396
+ block: {},
397
+ isFirstSection: { type: Boolean }
398
+ },
399
+ emits: ["update"],
400
+ setup(e, { emit: a }) {
401
+ let l = e, v = a, { t: S } = L(), T = n(se, []), D = n(ce, !1), O = d(/* @__PURE__ */ new Set()), k = s(!1), A = s(""), j = s(""), M = [{
402
+ key: "desktop",
403
+ icon: de,
404
+ labelKey: "showOnDesktop"
405
+ }, {
406
+ key: "mobile",
407
+ icon: fe,
408
+ labelKey: "showOnMobile"
409
+ }];
410
+ function N(e) {
411
+ O.has(e) ? O.delete(e) : O.add(e);
412
+ }
413
+ let ee = h(() => T.length > 0 || D), P = h(() => l.block.displayCondition ? !T.some((e) => e.label === l.block.displayCondition?.label) : !1);
414
+ function te() {
415
+ k.value = !0, P.value && l.block.displayCondition ? (A.value = l.block.displayCondition.before, j.value = l.block.displayCondition.after ?? "") : (A.value = "", j.value = "");
416
+ }
417
+ function ne() {
418
+ A.value.trim() && (v("update", { displayCondition: {
419
+ label: S.blockSettings.customCondition,
420
+ before: A.value.trim(),
421
+ after: j.value.trim()
422
+ } }), k.value = !1, A.value = "", j.value = "");
423
+ }
424
+ t(() => l.block.displayCondition, (e) => {
425
+ if (!e) {
426
+ k.value = !1, A.value = "", j.value = "";
427
+ return;
428
+ }
429
+ P.value && (A.value = e.before, j.value = e.after ?? "");
430
+ }, { immediate: !0 });
431
+ let re = h(() => {
432
+ let e = {};
433
+ for (let t of T) {
434
+ let n = t.group ?? "";
435
+ e[n] || (e[n] = []), e[n].push(t);
436
+ }
437
+ return e;
438
+ });
439
+ function ie(e, t) {
440
+ v("update", { styles: {
441
+ ...l.block.styles,
442
+ [e]: t
443
+ } });
444
+ }
445
+ function F(e) {
446
+ return l.block.visibility?.[e] !== !1;
447
+ }
448
+ function ae(e) {
449
+ let t = {
450
+ desktop: F("desktop"),
451
+ mobile: F("mobile")
452
+ };
453
+ t[e] = !t[e], v("update", { visibility: t });
454
+ }
455
+ return (t, n) => (o(), g("div", { class: m(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
456
+ p(Mt, {
457
+ title: f(S).blockSettings.spacing,
458
+ open: O.has("spacing"),
459
+ "no-border": e.isFirstSection,
460
+ onToggle: n[1] ||= (e) => N("spacing")
461
+ }, {
462
+ default: i(() => [p(kt, {
463
+ label: f(S).blockSettings.padding,
464
+ "model-value": e.block.styles.padding,
465
+ "onUpdate:modelValue": n[0] ||= (e) => ie("padding", e)
466
+ }, null, 8, ["label", "model-value"])]),
467
+ _: 1
468
+ }, 8, [
469
+ "title",
470
+ "open",
471
+ "no-border"
472
+ ]),
473
+ p(Mt, {
474
+ title: f(S).blockSettings.background,
475
+ open: O.has("bg"),
476
+ onToggle: n[3] ||= (e) => N("bg")
477
+ }, {
478
+ default: i(() => [x("label", { class: m(f(U)) }, w(f(S).blockSettings.color), 3), p(q, {
479
+ "model-value": e.block.styles.backgroundColor ?? "",
480
+ "onUpdate:modelValue": n[2] ||= (e) => ie("backgroundColor", e)
481
+ }, null, 8, ["model-value"])]),
482
+ _: 1
483
+ }, 8, ["title", "open"]),
484
+ p(Mt, {
485
+ title: f(S).blockSettings.display,
486
+ open: O.has("display"),
487
+ onToggle: n[4] ||= (e) => N("display")
488
+ }, {
489
+ default: i(() => [x("div", Nt, [(o(), g(C, null, r(M, (e) => p(J, {
490
+ key: e.key,
491
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
492
+ "model-value": F(e.key),
493
+ label: f(S).blockSettings[e.labelKey],
494
+ "onUpdate:modelValue": (t) => ae(e.key)
495
+ }, {
496
+ default: i(() => [x("span", Pt, [(o(), y(c(e.icon), {
497
+ size: 14,
498
+ "stroke-width": 1.5
499
+ })), E(" " + w(f(S).blockSettings[e.labelKey]), 1)])]),
500
+ _: 2
501
+ }, 1032, [
502
+ "model-value",
503
+ "label",
504
+ "onUpdate:modelValue"
505
+ ])), 64))])]),
506
+ _: 1
507
+ }, 8, ["title", "open"]),
508
+ ee.value ? (o(), y(Mt, {
509
+ key: 0,
510
+ "header-test-id": "display-condition-section",
511
+ title: f(S).blockSettings.displayCondition,
512
+ open: O.has("condition"),
513
+ onToggle: n[8] ||= (e) => N("condition")
514
+ }, {
515
+ default: i(() => [x("div", Ft, [x("select", {
516
+ "data-testid": "display-condition-select",
517
+ class: m(["tpl:w-full tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:outline-none tpl:transition-all tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", e.block.displayCondition ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-text)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"]),
518
+ value: k.value || P.value ? "__custom__" : e.block.displayCondition?.label ?? "",
519
+ onChange: n[5] ||= (e) => {
520
+ let t = e.target.value;
521
+ if (t === "__custom__") {
522
+ te();
523
+ return;
524
+ }
525
+ if (k.value = !1, !t) {
526
+ v("update", { displayCondition: void 0 });
527
+ return;
528
+ }
529
+ let n = f(T).find((e) => e.label === t);
530
+ n && v("update", { displayCondition: n });
531
+ }
532
+ }, [
533
+ x("option", Lt, w(f(S).blockSettings.noCondition), 1),
534
+ (o(!0), g(C, null, r(re.value, (e, t) => (o(), g(C, { key: t }, [t ? (o(), g("optgroup", {
535
+ key: 0,
536
+ label: String(t)
537
+ }, [(o(!0), g(C, null, r(e, (e) => (o(), g("option", {
538
+ key: e.label,
539
+ value: e.label
540
+ }, w(e.label), 9, zt))), 128))], 8, Rt)) : (o(!0), g(C, { key: 1 }, r(e, (e) => (o(), g("option", {
541
+ key: e.label,
542
+ value: e.label
543
+ }, w(e.label), 9, Bt))), 128))], 64))), 128)),
544
+ f(D) ? (o(), g("option", Vt, w(f(S).blockSettings.customCondition), 1)) : _("", !0)
545
+ ], 42, It), k.value || P.value ? (o(), g("div", Ht, [
546
+ x("div", null, [x("label", Ut, w(f(S).blockSettings.customConditionBefore), 1), u(x("textarea", {
547
+ "onUpdate:modelValue": n[6] ||= (e) => A.value = e,
548
+ rows: "2",
549
+ class: m(f(Oe))
550
+ }, null, 2), [[b, A.value]])]),
551
+ x("div", null, [x("label", Wt, w(f(S).blockSettings.customConditionAfter), 1), u(x("textarea", {
552
+ "onUpdate:modelValue": n[7] ||= (e) => j.value = e,
553
+ rows: "2",
554
+ class: m(f(Oe))
555
+ }, null, 2), [[b, j.value]])]),
556
+ x("div", Gt, [x("button", {
557
+ type: "button",
558
+ class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-[var(--tpl-primary)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-on-primary)] tpl:transition-all tpl:hover:opacity-90 tpl:disabled:opacity-50",
559
+ disabled: !A.value.trim(),
560
+ onClick: ne
561
+ }, w(f(S).blockSettings.applyCondition), 9, Kt)])
562
+ ])) : e.block.displayCondition && !P.value ? (o(), g(C, { key: 1 }, [e.block.displayCondition.description ? (o(), g("p", qt, w(e.block.displayCondition.description), 1)) : _("", !0), x("div", Jt, [x("pre", Yt, w(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (o(), g("pre", Xt, w(e.block.displayCondition.after), 1)) : _("", !0)])], 64)) : _("", !0)])]),
563
+ _: 1
564
+ }, 8, ["title", "open"])) : _("", !0)
565
+ ], 2));
566
+ }
567
+ }), Qt = ["title"], $t = /* @__PURE__ */ l({
568
+ __name: "BooleanField",
569
+ props: {
570
+ field: {},
571
+ modelValue: { type: Boolean },
572
+ readOnly: { type: Boolean }
573
+ },
574
+ emits: ["update:modelValue"],
575
+ setup(e, { emit: t }) {
576
+ let n = t, { t: r } = L();
577
+ return (t, a) => (o(), g("div", {
578
+ class: "tpl:mb-3.5",
579
+ title: e.readOnly ? f(r).customBlocks.dataSource.readOnlyTooltip : void 0
580
+ }, [p(J, {
581
+ class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
582
+ "model-value": e.modelValue,
583
+ label: e.field.label,
584
+ required: e.field.required,
585
+ disabled: e.readOnly,
586
+ "onUpdate:modelValue": a[0] ||= (e) => n("update:modelValue", e)
587
+ }, {
588
+ default: i(() => [E(w(e.field.label) + " ", 1), e.readOnly ? (o(), y(f(Se), {
589
+ key: 0,
590
+ size: 12,
591
+ class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
592
+ })) : _("", !0)]),
593
+ _: 1
594
+ }, 8, [
595
+ "model-value",
596
+ "label",
597
+ "required",
598
+ "disabled"
599
+ ])], 8, Qt));
600
+ }
601
+ }), en = { class: "tpl:mb-3.5" }, tn = ["title"], nn = { class: "tpl-sr-only" }, rn = ["title"], an = { class: "tpl-sr-only" }, Q = /* @__PURE__ */ l({
602
+ __name: "FieldWrapper",
603
+ props: {
604
+ label: {},
605
+ required: { type: Boolean },
606
+ readOnly: { type: Boolean }
607
+ },
608
+ setup(e) {
609
+ let { t } = L();
610
+ return (n, r) => (o(), g("div", en, [x("label", { class: m(f(U)) }, [
611
+ E(w(e.label) + " ", 1),
612
+ e.readOnly ? (o(), g("span", {
613
+ key: 0,
614
+ title: f(t).customBlocks.dataSource.readOnlyTooltip
615
+ }, [p(f(Se), {
616
+ size: 12,
617
+ class: "tpl:inline tpl:text-[var(--tpl-text-dim)]",
618
+ "aria-hidden": "true"
619
+ }), x("span", nn, w(f(t).customBlocks.dataSource.readOnlyTooltip), 1)], 8, tn)) : _("", !0),
620
+ e.required ? (o(), g("span", {
621
+ key: 1,
622
+ class: "tpl:text-[var(--tpl-danger)]",
623
+ title: f(t).customBlocks.fields.required
624
+ }, [r[0] ||= x("span", { "aria-hidden": "true" }, "*", -1), x("span", an, w(f(t).customBlocks.fields.required), 1)], 8, rn)) : _("", !0)
625
+ ], 2), a(n.$slots, "default")]));
626
+ }
627
+ }), on = /* @__PURE__ */ l({
628
+ __name: "ColorField",
629
+ props: {
630
+ field: {},
631
+ modelValue: {},
632
+ readOnly: { type: Boolean }
633
+ },
634
+ emits: ["update:modelValue"],
635
+ setup(e, { emit: t }) {
636
+ let r = e, a = t, { t: s } = L(), c = n(oe, ue), l = h(() => M(r.field, c));
637
+ return (t, n) => (o(), y(Q, {
638
+ label: e.field.label,
639
+ required: e.field.required,
640
+ "read-only": e.readOnly
641
+ }, {
642
+ default: i(() => [p(q, {
643
+ "model-value": e.modelValue,
644
+ placeholder: e.field.placeholder,
645
+ disabled: e.readOnly,
646
+ presets: l.value.presets,
647
+ "allow-custom": l.value.allowCustom,
648
+ title: e.readOnly ? f(s).customBlocks.dataSource.readOnlyTooltip : void 0,
649
+ "onUpdate:modelValue": n[0] ||= (e) => a("update:modelValue", e)
650
+ }, null, 8, [
651
+ "model-value",
652
+ "placeholder",
653
+ "disabled",
654
+ "presets",
655
+ "allow-custom",
656
+ "title"
657
+ ])]),
658
+ _: 1
659
+ }, 8, [
660
+ "label",
661
+ "required",
662
+ "read-only"
663
+ ]));
664
+ }
665
+ }), sn = {
666
+ key: 0,
667
+ class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
668
+ style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
669
+ }, cn = [
670
+ "value",
671
+ "placeholder",
672
+ "title"
673
+ ], ln = ["value", "placeholder"], un = /* @__PURE__ */ l({
674
+ __name: "ImageField",
675
+ props: {
676
+ field: {},
677
+ modelValue: {},
678
+ readOnly: { type: Boolean }
679
+ },
680
+ emits: ["update:modelValue"],
681
+ setup(e, { emit: t }) {
682
+ let r = e, a = t, { t: c } = L(), l = n(re, null), u = n(ae, null), d = De(), v = h(() => !!l);
683
+ async function b() {
684
+ let e = await l?.({ accept: ["images"] });
685
+ d.alive && e && a("update:modelValue", e.url);
686
+ }
687
+ let S = s(), T = s(!1), D = h(() => (u?.value ?? !!l) && !T.value && !r.readOnly);
688
+ async function O(e) {
689
+ if (l) {
690
+ T.value = !0;
691
+ try {
692
+ let t = await l({
693
+ accept: ["images"],
694
+ files: e
695
+ });
696
+ if (!d.alive) return;
697
+ t && a("update:modelValue", t.url);
698
+ } finally {
699
+ d.alive && (T.value = !1);
700
+ }
701
+ }
702
+ }
703
+ let { isOver: k } = ee({
704
+ target: S,
705
+ enabled: D,
706
+ onFiles: O
707
+ });
708
+ return (t, n) => (o(), y(Q, {
709
+ label: e.field.label,
710
+ required: e.field.required,
711
+ "read-only": e.readOnly
712
+ }, {
713
+ default: i(() => [x("div", {
714
+ ref_key: "dropZoneRef",
715
+ ref: S,
716
+ class: "tpl:relative"
717
+ }, [
718
+ D.value && (f(k) || T.value) ? (o(), g("div", sn, [T.value ? (o(), g(C, { key: 0 }, [p(f(be), {
719
+ class: "tpl-spinner",
720
+ size: 18,
721
+ "stroke-width": 2
722
+ }), E(" " + w(f(c).image.uploading), 1)], 64)) : (o(), g(C, { key: 1 }, [p(f(we), {
723
+ size: 18,
724
+ "stroke-width": 1.5
725
+ }), E(" " + w(f(c).image.dropToUpload), 1)], 64))])) : _("", !0),
726
+ e.readOnly ? (o(), g("input", {
727
+ key: 1,
728
+ type: "url",
729
+ class: m([f(K), "tpl:opacity-60 tpl:cursor-not-allowed"]),
730
+ value: e.modelValue,
731
+ placeholder: e.field.placeholder || "https://...",
732
+ disabled: "",
733
+ title: f(c).customBlocks.dataSource.readOnlyTooltip
734
+ }, null, 10, cn)) : (o(), g("input", {
735
+ key: 2,
736
+ type: "url",
737
+ class: m(f(K)),
738
+ value: e.modelValue,
739
+ placeholder: e.field.placeholder || "https://...",
740
+ onInput: n[0] ||= (e) => a("update:modelValue", e.target.value)
741
+ }, null, 42, ln)),
742
+ v.value && !e.readOnly ? (o(), g("button", {
743
+ key: 3,
744
+ class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
745
+ onClick: n[1] ||= (e) => b()
746
+ }, [p(f(ye), {
747
+ size: 14,
748
+ "stroke-width": 1.5
749
+ }), E(" " + w(f(c).image.browseMedia), 1)])) : _("", !0)
750
+ ], 512)]),
751
+ _: 1
752
+ }, 8, [
753
+ "label",
754
+ "required",
755
+ "read-only"
756
+ ]));
757
+ }
758
+ }), dn = [
759
+ "value",
760
+ "placeholder",
761
+ "min",
762
+ "max",
763
+ "step",
764
+ "disabled",
765
+ "title"
766
+ ], fn = /* @__PURE__ */ l({
767
+ __name: "NumberField",
768
+ props: {
769
+ field: {},
770
+ modelValue: {},
771
+ readOnly: { type: Boolean }
772
+ },
773
+ emits: ["update:modelValue"],
774
+ setup(e, { emit: t }) {
775
+ let n = t, { t: r } = L();
776
+ return (t, a) => (o(), y(Q, {
777
+ label: e.field.label,
778
+ required: e.field.required,
779
+ "read-only": e.readOnly
780
+ }, {
781
+ default: i(() => [x("input", {
782
+ type: "number",
783
+ class: m([f(K), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
784
+ value: e.modelValue,
785
+ placeholder: e.field.placeholder,
786
+ min: e.field.min,
787
+ max: e.field.max,
788
+ step: e.field.step,
789
+ disabled: e.readOnly,
790
+ title: e.readOnly ? f(r).customBlocks.dataSource.readOnlyTooltip : void 0,
791
+ onInput: a[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
792
+ }, null, 42, dn)]),
793
+ _: 1
794
+ }, 8, [
795
+ "label",
796
+ "required",
797
+ "read-only"
798
+ ]));
799
+ }
800
+ }), pn = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, mn = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, hn = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, gn = ["title", "onClick"], _n = {
801
+ key: 1,
802
+ class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
803
+ }, vn = {
804
+ key: 2,
805
+ class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
806
+ }, yn = /* @__PURE__ */ l({
807
+ __name: "RepeatableField",
808
+ props: {
809
+ field: {},
810
+ modelValue: {},
811
+ readOnly: { type: Boolean }
812
+ },
813
+ emits: ["update:modelValue"],
814
+ setup(e, { emit: t }) {
815
+ let n = e, a = t, { t: s, format: l } = L(), u = h(() => n.modelValue || []), d = h(() => !n.field.maxItems || u.value.length < n.field.maxItems), v = h(() => !n.field.minItems || u.value.length > n.field.minItems);
816
+ function b() {
817
+ if (!d.value || n.readOnly) return;
818
+ let e = {};
819
+ for (let t of n.field.fields) e[t.key] = t.default ?? "";
820
+ a("update:modelValue", [...u.value, e]);
821
+ }
822
+ function S(e) {
823
+ if (!v.value || n.readOnly) return;
824
+ let t = [...u.value];
825
+ t.splice(e, 1), a("update:modelValue", t);
826
+ }
827
+ function T(e, t, n) {
828
+ let r = u.value.map((r, i) => i === e ? {
829
+ ...r,
830
+ [t]: n
831
+ } : r);
832
+ a("update:modelValue", r);
833
+ }
834
+ return (t, n) => (o(), y(Q, {
835
+ label: e.field.label,
836
+ required: e.field.required,
837
+ "read-only": e.readOnly
838
+ }, {
839
+ default: i(() => [x("div", pn, [
840
+ (o(!0), g(C, null, r(u.value, (t, n) => (o(), g("div", {
841
+ key: `${e.field.key}-${n}`,
842
+ class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
843
+ }, [x("div", mn, [x("span", hn, " #" + w(n + 1), 1), v.value && !e.readOnly ? (o(), g("button", {
844
+ key: 0,
845
+ type: "button",
846
+ class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
847
+ title: f(s).customBlocks.fields.removeItem,
848
+ onClick: (e) => S(n)
849
+ }, [p(f(_e), {
850
+ size: 12,
851
+ "stroke-width": 2
852
+ })], 8, gn)) : _("", !0)]), (o(!0), g(C, null, r(e.field.fields, (r) => (o(), y(c(f(On)(r.type)), {
853
+ key: r.key,
854
+ field: r,
855
+ "model-value": t[r.key],
856
+ "read-only": e.readOnly,
857
+ "onUpdate:modelValue": (e) => T(n, r.key, e)
858
+ }, null, 8, [
859
+ "field",
860
+ "model-value",
861
+ "read-only",
862
+ "onUpdate:modelValue"
863
+ ]))), 128))]))), 128)),
864
+ d.value && !e.readOnly ? (o(), g("button", {
865
+ key: 0,
866
+ type: "button",
867
+ class: m(f(Ae)),
868
+ onClick: b
869
+ }, [p(f(R), {
870
+ size: 14,
871
+ "stroke-width": 2
872
+ }), E(" " + w(f(s).customBlocks.fields.addItem), 1)], 2)) : _("", !0),
873
+ !d.value && !e.readOnly ? (o(), g("p", _n, w(f(s).customBlocks.fields.maxItemsReached), 1)) : _("", !0),
874
+ !v.value && !e.readOnly ? (o(), g("p", vn, w(f(l)(f(s).customBlocks.fields.minItemsRequired, { count: e.field.minItems ?? 0 })), 1)) : _("", !0)
875
+ ])]),
876
+ _: 1
877
+ }, 8, [
878
+ "label",
879
+ "required",
880
+ "read-only"
881
+ ]));
882
+ }
883
+ }), bn = [
884
+ "value",
885
+ "disabled",
886
+ "title"
887
+ ], xn = ["value"], Sn = /* @__PURE__ */ l({
888
+ __name: "SelectField",
889
+ props: {
890
+ field: {},
891
+ modelValue: {},
892
+ readOnly: { type: Boolean }
893
+ },
894
+ emits: ["update:modelValue"],
895
+ setup(e, { emit: t }) {
896
+ let n = t, { t: a } = L();
897
+ return (t, s) => (o(), y(Q, {
898
+ label: e.field.label,
899
+ required: e.field.required,
900
+ "read-only": e.readOnly
901
+ }, {
902
+ default: i(() => [x("select", {
903
+ class: m([f(K), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
904
+ value: e.modelValue,
905
+ disabled: e.readOnly,
906
+ title: e.readOnly ? f(a).customBlocks.dataSource.readOnlyTooltip : void 0,
907
+ onChange: s[0] ||= (t) => !e.readOnly && n("update:modelValue", t.target.value)
908
+ }, [(o(!0), g(C, null, r(e.field.options, (e) => (o(), g("option", {
909
+ key: e.value,
910
+ value: e.value
911
+ }, w(e.label), 9, xn))), 128))], 42, bn)]),
912
+ _: 1
913
+ }, 8, [
914
+ "label",
915
+ "required",
916
+ "read-only"
917
+ ]));
918
+ }
919
+ }), Cn = [
920
+ "value",
921
+ "placeholder",
922
+ "title"
923
+ ], wn = /* @__PURE__ */ l({
924
+ __name: "TextField",
925
+ props: {
926
+ field: {},
927
+ modelValue: {},
928
+ readOnly: { type: Boolean }
929
+ },
930
+ emits: ["update:modelValue"],
931
+ setup(e, { emit: t }) {
932
+ let n = t, { t: r } = L();
933
+ return (t, a) => (o(), y(Q, {
934
+ label: e.field.label,
935
+ required: e.field.required,
936
+ "read-only": e.readOnly
937
+ }, {
938
+ default: i(() => [e.readOnly ? (o(), g("input", {
939
+ key: 0,
940
+ type: "text",
941
+ class: m([f(K), "tpl:opacity-60 tpl:cursor-not-allowed"]),
942
+ value: e.modelValue,
943
+ placeholder: e.field.placeholder,
944
+ disabled: "",
945
+ title: f(r).customBlocks.dataSource.readOnlyTooltip
946
+ }, null, 10, Cn)) : (o(), y(Y, {
947
+ key: 1,
948
+ "model-value": e.modelValue,
949
+ placeholder: e.field.placeholder,
950
+ "onUpdate:modelValue": a[0] ||= (e) => n("update:modelValue", e)
951
+ }, null, 8, ["model-value", "placeholder"]))]),
952
+ _: 1
953
+ }, 8, [
954
+ "label",
955
+ "required",
956
+ "read-only"
957
+ ]));
958
+ }
959
+ }), Tn = [
960
+ "value",
961
+ "placeholder",
962
+ "title"
963
+ ], En = "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:opacity-60 tpl:cursor-not-allowed", Dn = {
964
+ text: wn,
965
+ textarea: /* @__PURE__ */ l({
966
+ __name: "TextareaField",
967
+ props: {
968
+ field: {},
969
+ modelValue: {},
970
+ readOnly: { type: Boolean }
971
+ },
972
+ emits: ["update:modelValue"],
973
+ setup(e, { emit: t }) {
974
+ let n = t, { t: r } = L();
975
+ return (t, a) => (o(), y(Q, {
976
+ label: e.field.label,
977
+ required: e.field.required,
978
+ "read-only": e.readOnly
979
+ }, {
980
+ default: i(() => [e.readOnly ? (o(), g("textarea", {
981
+ key: 0,
982
+ value: e.modelValue,
983
+ placeholder: e.field.placeholder,
984
+ rows: "3",
985
+ disabled: "",
986
+ title: f(r).customBlocks.dataSource.readOnlyTooltip,
987
+ class: m(En)
988
+ }, null, 8, Tn)) : (o(), y(Ne, {
989
+ key: 1,
990
+ "model-value": e.modelValue,
991
+ placeholder: e.field.placeholder,
992
+ "onUpdate:modelValue": a[0] ||= (e) => n("update:modelValue", e)
993
+ }, null, 8, ["model-value", "placeholder"]))]),
994
+ _: 1
995
+ }, 8, [
996
+ "label",
997
+ "required",
998
+ "read-only"
999
+ ]));
1000
+ }
1001
+ }),
1002
+ image: un,
1003
+ color: on,
1004
+ number: fn,
1005
+ select: Sn,
1006
+ boolean: $t,
1007
+ repeatable: yn
1008
+ };
1009
+ function On(e) {
1010
+ return Dn[e] ?? wn;
1011
+ }
1012
+ //#endregion
1013
+ //#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
1014
+ var kn = {
1015
+ key: 0,
1016
+ class: "tpl:p-4"
1017
+ }, An = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, jn = { key: 1 }, Mn = {
1018
+ key: 0,
1019
+ class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1020
+ }, Nn = {
1021
+ key: 1,
1022
+ class: "tpl:mb-4"
1023
+ }, Pn = {
1024
+ key: 1,
1025
+ class: "tpl:flex tpl:h-[32px] tpl:items-center"
1026
+ }, Fn = {
1027
+ key: 0,
1028
+ class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
1029
+ }, In = {
1030
+ key: 2,
1031
+ class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
1032
+ }, Ln = /* @__PURE__ */ l({
1033
+ __name: "CustomBlockToolbar",
1034
+ props: { block: {} },
1035
+ emits: ["updateFieldValues", "updateDataSourceFetched"],
1036
+ setup(e, { emit: t }) {
1037
+ let i = e, a = t, { t: s } = L(), l = n(le, []), u = h(() => l.find((e) => e.type === i.block.customType)), d = h(() => i.block), { isFetching: m, fetchError: v, fetch: b, hasDataSource: S, needsFetch: T } = N({
1038
+ definition: u,
1039
+ block: d,
1040
+ onUpdate: (e, t) => {
1041
+ a("updateFieldValues", e), a("updateDataSourceFetched", t);
1042
+ }
1043
+ });
1044
+ function D(e) {
1045
+ return e.readOnly === !0 && S.value && !!i.block.dataSourceFetched;
1046
+ }
1047
+ function O(e, t) {
1048
+ a("updateFieldValues", {
1049
+ ...i.block.fieldValues,
1050
+ [e]: t
1051
+ });
1052
+ }
1053
+ return (t, n) => u.value ? (o(), g("div", jn, [
1054
+ u.value.description ? (o(), g("p", Mn, w(u.value.description), 1)) : _("", !0),
1055
+ f(S) ? (o(), g("div", Nn, [f(T) && !f(m) ? (o(), g("button", {
1056
+ key: 0,
1057
+ type: "button",
1058
+ class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-md tpl:px-3 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-on-primary)] tpl:transition-all tpl:bg-[var(--tpl-primary)]",
1059
+ onClick: n[0] ||= (...e) => f(b) && f(b)(...e)
1060
+ }, w(u.value?.dataSource?.label || f(s).customBlocks.dataSource.fetchButton), 1)) : (o(), g("div", Pn, [f(m) ? (o(), g("div", Fn, w(f(s).customBlocks.dataSource.fetching), 1)) : (o(), g("button", {
1061
+ key: 1,
1062
+ type: "button",
1063
+ class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]",
1064
+ onClick: n[1] ||= (...e) => f(b) && f(b)(...e)
1065
+ }, [p(f(Te), { size: 12 }), E(" " + w(f(s).customBlocks.dataSource.changeButton), 1)]))])), f(v) ? (o(), g("p", In, [p(f(he), {
1066
+ size: 14,
1067
+ class: "tpl:shrink-0"
1068
+ }), E(" " + w(f(s).customBlocks.dataSource.fetchError), 1)])) : _("", !0)])) : _("", !0),
1069
+ (o(!0), g(C, null, r(u.value.fields, (t) => (o(), y(c(f(On)(t.type)), {
1070
+ key: t.key,
1071
+ field: t,
1072
+ "model-value": e.block.fieldValues[t.key],
1073
+ "read-only": D(t),
1074
+ "onUpdate:modelValue": (e) => O(t.key, e)
1075
+ }, null, 8, [
1076
+ "field",
1077
+ "model-value",
1078
+ "read-only",
1079
+ "onUpdate:modelValue"
1080
+ ]))), 128))
1081
+ ])) : (o(), g("div", kn, [x("p", An, w(f(s).customBlocks.toolbar.noDefinition), 1)]));
1082
+ }
1083
+ }), Rn = { class: "tpl:mb-3.5" }, zn = { class: "tpl:mb-3.5" }, Bn = { class: "tpl:mb-3.5" }, Vn = { class: "tpl:flex tpl:items-stretch" }, Hn = ["value"], Un = /* @__PURE__ */ l({
1084
+ __name: "DividerToolbar",
1085
+ props: { block: {} },
1086
+ emits: ["update"],
1087
+ setup(e, { emit: t }) {
1088
+ let n = t, { t: r } = L();
1089
+ function i(e, t) {
1090
+ n("update", { [e]: t });
1091
+ }
1092
+ return (t, n) => (o(), g(C, null, [
1093
+ x("div", Rn, [x("label", { class: m(f(U)) }, w(f(r).divider.style), 3), p(X, {
1094
+ options: [
1095
+ {
1096
+ value: "solid",
1097
+ label: f(r).divider.solid
1098
+ },
1099
+ {
1100
+ value: "dashed",
1101
+ label: f(r).divider.dashed
1102
+ },
1103
+ {
1104
+ value: "dotted",
1105
+ label: f(r).divider.dotted
1106
+ }
1107
+ ],
1108
+ "model-value": e.block.lineStyle,
1109
+ "onUpdate:modelValue": n[0] ||= (e) => i("lineStyle", e)
1110
+ }, null, 8, ["options", "model-value"])]),
1111
+ x("div", zn, [x("label", { class: m(f(U)) }, w(f(r).divider.color), 3), p(q, {
1112
+ "model-value": e.block.color,
1113
+ "onUpdate:modelValue": n[1] ||= (e) => i("color", e)
1114
+ }, null, 8, ["model-value"])]),
1115
+ x("div", Bn, [x("label", { class: m(f(U)) }, w(f(r).divider.thickness), 3), x("div", Vn, [x("input", {
1116
+ type: "number",
1117
+ class: m(f(G)),
1118
+ value: e.block.thickness,
1119
+ min: "1",
1120
+ max: "10",
1121
+ onInput: n[2] ||= (e) => i("thickness", Number(e.target.value))
1122
+ }, null, 42, Hn), x("span", { class: m(f(W)) }, "px", 2)])])
1123
+ ], 64));
1124
+ }
1125
+ }), Wn = { class: "tpl:mb-3.5" }, Gn = ["value"], Kn = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, qn = /* @__PURE__ */ l({
1126
+ __name: "HtmlToolbar",
1127
+ props: { block: {} },
1128
+ emits: ["update"],
1129
+ setup(e, { emit: t }) {
1130
+ let n = t, { t: r } = L();
1131
+ return (t, i) => (o(), g("div", Wn, [
1132
+ x("label", { class: m(f(U)) }, w(f(r).html.content), 3),
1133
+ x("textarea", {
1134
+ value: e.block.content,
1135
+ placeholder: "<div>...</div>",
1136
+ rows: "10",
1137
+ class: m(f(Oe)),
1138
+ onInput: i[0] ||= (e) => n("update", { content: e.target.value })
1139
+ }, null, 42, Gn),
1140
+ x("p", Kn, [p(f(ve), {
1141
+ size: 12,
1142
+ class: "tpl:mt-0.5 tpl:shrink-0"
1143
+ }), E(" " + w(f(r).html.sanitizationHint), 1)])
1144
+ ]));
1145
+ }
1146
+ }), Jn = { class: "tpl:flex tpl:items-stretch" }, Yn = [
1147
+ "data-testid",
1148
+ "value",
1149
+ "min",
1150
+ "max"
1151
+ ], Xn = /* @__PURE__ */ l({
1152
+ __name: "NumberWithSuffix",
1153
+ props: {
1154
+ modelValue: {},
1155
+ min: {},
1156
+ max: {},
1157
+ suffix: {},
1158
+ testid: {}
1159
+ },
1160
+ emits: ["update:modelValue"],
1161
+ setup(e, { emit: t }) {
1162
+ let n = t;
1163
+ function r(e) {
1164
+ let t = e.target;
1165
+ t.validity?.badInput || n("update:modelValue", Number(t.value));
1166
+ }
1167
+ return (t, n) => (o(), g("div", Jn, [x("input", {
1168
+ type: "number",
1169
+ "data-testid": e.testid,
1170
+ class: m(f(G)),
1171
+ value: e.modelValue,
1172
+ min: e.min,
1173
+ max: e.max,
1174
+ onInput: r
1175
+ }, null, 42, Yn), x("span", { class: m(f(W)) }, w(e.suffix), 3)]));
1176
+ }
1177
+ }), Zn = { class: "tpl:mb-3.5" }, Qn = {
1178
+ key: 0,
1179
+ class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
1180
+ style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
1181
+ }, $n = {
1182
+ key: 0,
1183
+ class: "tpl:mb-3.5"
1184
+ }, er = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, tr = [
1185
+ "value",
1186
+ "placeholder",
1187
+ "title"
1188
+ ], nr = { class: "tpl:mb-3.5" }, rr = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, ir = { class: "tpl:mb-3.5" }, ar = ["value"], or = { value: "full" }, sr = { value: "custom" }, cr = {
1189
+ key: 0,
1190
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1191
+ }, lr = ["value"], ur = { class: "tpl:mb-3.5" }, dr = ["value"], fr = { value: "auto" }, pr = { value: "custom" }, mr = {
1192
+ key: 0,
1193
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1194
+ }, hr = ["value"], gr = { class: "tpl:mb-3.5" }, _r = { class: "tpl:mb-3.5" }, vr = { class: "tpl:mb-3.5" }, yr = 350, br = 200, xr = /* @__PURE__ */ l({
1195
+ __name: "ImageToolbar",
1196
+ props: { block: {} },
1197
+ emits: ["update"],
1198
+ setup(e, { emit: t }) {
1199
+ let r = e, a = t, { t: c } = L(), l = n(re, null), u = n(ae, null), d = n(ie, j.liquid), v = De(), b = h(() => !!l), S = s(!1), T = s(!1), { start: D } = ne(() => {
1200
+ S.value = !1;
1201
+ }, 1e3, { immediate: !1 }), O = [
1202
+ 300,
1203
+ 400,
1204
+ 500
1205
+ ], A = h(() => {
1206
+ let e = r.block.width;
1207
+ return e === "full" ? "full" : O.includes(e) ? String(e) : "custom";
1208
+ }), M = h(() => typeof r.block.height == "number" ? "custom" : "auto");
1209
+ function N(e, t) {
1210
+ a("update", { [e]: t });
1211
+ }
1212
+ function P(e) {
1213
+ if (e === "custom") {
1214
+ let e = r.block.width;
1215
+ (typeof e != "number" || O.includes(e)) && N("width", yr);
1216
+ return;
1217
+ }
1218
+ N("width", e === "full" ? "full" : Number(e));
1219
+ }
1220
+ function te(e) {
1221
+ N("height", e === "custom" ? br : void 0);
1222
+ }
1223
+ function F(e) {
1224
+ let t = Number(e);
1225
+ !Number.isFinite(t) || t <= 0 || N("height", t);
1226
+ }
1227
+ function oe(e) {
1228
+ !Number.isFinite(e) || e < 0 || N("borderRadius", e > 0 ? e : void 0);
1229
+ }
1230
+ function se(e) {
1231
+ let t = Number(e);
1232
+ !Number.isFinite(t) || t <= 0 || N("width", t);
1233
+ }
1234
+ async function ce() {
1235
+ let e = await l?.({ accept: ["images"] });
1236
+ v.alive && e && (N("src", e.url), e.alt && (N("alt", e.alt), T.value = !0), S.value = !0, D());
1237
+ }
1238
+ let le = s(), I = s(!1), ue = h(() => k(r.block.src, d)), de = h(() => (u?.value ?? !!l) && !I.value && !ue.value);
1239
+ async function fe(e) {
1240
+ if (l) {
1241
+ I.value = !0;
1242
+ try {
1243
+ let t = await l({
1244
+ accept: ["images"],
1245
+ files: e
1246
+ });
1247
+ if (!v.alive) return;
1248
+ t && (N("src", t.url), t.alt && (N("alt", t.alt), T.value = !0), S.value = !0, D());
1249
+ } finally {
1250
+ v.alive && (I.value = !1);
1251
+ }
1252
+ }
1253
+ }
1254
+ let { isOver: pe } = ee({
1255
+ target: le,
1256
+ enabled: de,
1257
+ onFiles: fe
1258
+ });
1259
+ return (t, n) => (o(), g(C, null, [
1260
+ x("div", Zn, [x("label", { class: m(f(U)) }, w(f(c).image.imageUrl), 3), x("div", {
1261
+ ref_key: "dropZoneRef",
1262
+ ref: le,
1263
+ class: "tpl:relative"
1264
+ }, [
1265
+ de.value && (f(pe) || I.value) ? (o(), g("div", Qn, [I.value ? (o(), g(C, { key: 0 }, [p(f(be), {
1266
+ class: "tpl-spinner",
1267
+ size: 18,
1268
+ "stroke-width": 2
1269
+ }), E(" " + w(f(c).image.uploading), 1)], 64)) : (o(), g(C, { key: 1 }, [p(f(we), {
1270
+ size: 18,
1271
+ "stroke-width": 1.5
1272
+ }), E(" " + w(f(c).image.dropToUpload), 1)], 64))])) : _("", !0),
1273
+ p(Y, {
1274
+ "model-value": e.block.src,
1275
+ type: "url",
1276
+ placeholder: f(c).image.imageUrlPlaceholder,
1277
+ pulse: S.value,
1278
+ "onUpdate:modelValue": n[0] ||= (e) => N("src", e)
1279
+ }, null, 8, [
1280
+ "model-value",
1281
+ "placeholder",
1282
+ "pulse"
1283
+ ]),
1284
+ b.value ? (o(), g("button", {
1285
+ key: 1,
1286
+ class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all",
1287
+ style: {
1288
+ "border-color": "var(--tpl-border)",
1289
+ color: "var(--tpl-primary)",
1290
+ "background-color": "var(--tpl-bg)"
1291
+ },
1292
+ onClick: ce
1293
+ }, [p(f(ye), {
1294
+ size: 14,
1295
+ "stroke-width": 1.5
1296
+ }), E(" " + w(f(c).image.browseMedia), 1)])) : _("", !0)
1297
+ ], 512)]),
1298
+ f(k)(e.block.src, f(d)) ? (o(), g("div", $n, [x("label", { class: m(f(U)) }, [E(w(f(c).image.placeholderUrl) + " ", 1), x("span", er, w(f(c).image.optional), 1)], 2), x("input", {
1299
+ type: "url",
1300
+ class: m(f(K)),
1301
+ value: e.block.placeholderUrl || "",
1302
+ placeholder: f(c).image.placeholderUrlPlaceholder,
1303
+ title: f(c).image.placeholderUrlTooltip,
1304
+ onInput: n[1] ||= (e) => N("placeholderUrl", e.target.value)
1305
+ }, null, 42, tr)])) : _("", !0),
1306
+ x("div", nr, [
1307
+ x("label", { class: m(f(U)) }, w(f(c).image.altText), 3),
1308
+ p(Y, {
1309
+ "model-value": e.block.alt,
1310
+ type: "text",
1311
+ placeholder: f(c).image.altTextPlaceholder,
1312
+ pulse: T.value,
1313
+ disabled: e.block.decorative === !0,
1314
+ "onUpdate:modelValue": n[2] ||= (e) => N("alt", e)
1315
+ }, null, 8, [
1316
+ "model-value",
1317
+ "placeholder",
1318
+ "pulse",
1319
+ "disabled"
1320
+ ]),
1321
+ p(J, {
1322
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
1323
+ "model-value": e.block.decorative === !0,
1324
+ label: f(c).image.decorative,
1325
+ "onUpdate:modelValue": n[3] ||= (e) => N("decorative", e)
1326
+ }, {
1327
+ default: i(() => [x("span", null, [E(w(f(c).image.decorative) + " ", 1), x("span", rr, w(f(c).image.decorativeHint), 1)])]),
1328
+ _: 1
1329
+ }, 8, ["model-value", "label"])
1330
+ ]),
1331
+ x("div", ir, [
1332
+ x("label", { class: m(f(U)) }, w(f(c).image.width), 3),
1333
+ x("select", {
1334
+ class: m(f(K)),
1335
+ value: A.value,
1336
+ onChange: n[4] ||= (e) => P(e.target.value)
1337
+ }, [
1338
+ x("option", or, w(f(c).image.fullWidth), 1),
1339
+ n[11] ||= x("option", { value: "300" }, "300px", -1),
1340
+ n[12] ||= x("option", { value: "400" }, "400px", -1),
1341
+ n[13] ||= x("option", { value: "500" }, "500px", -1),
1342
+ x("option", sr, w(f(c).image.widthCustom), 1)
1343
+ ], 42, ar),
1344
+ A.value === "custom" ? (o(), g("div", cr, [x("input", {
1345
+ type: "number",
1346
+ class: m(f(G)),
1347
+ value: typeof e.block.width == "number" ? e.block.width : yr,
1348
+ min: "20",
1349
+ onInput: n[5] ||= (e) => se(e.target.value)
1350
+ }, null, 42, lr), x("span", { class: m(f(W)) }, "px", 2)])) : _("", !0)
1351
+ ]),
1352
+ x("div", ur, [
1353
+ x("label", { class: m(f(U)) }, w(f(c).image.height), 3),
1354
+ x("select", {
1355
+ class: m(f(K)),
1356
+ "data-testid": "image-height-mode",
1357
+ value: M.value,
1358
+ onChange: n[6] ||= (e) => te(e.target.value)
1359
+ }, [x("option", fr, w(f(c).image.heightAuto), 1), x("option", pr, w(f(c).image.heightCustom), 1)], 42, dr),
1360
+ M.value === "custom" ? (o(), g("div", mr, [x("input", {
1361
+ type: "number",
1362
+ "data-testid": "image-height-input",
1363
+ class: m(f(G)),
1364
+ value: e.block.height,
1365
+ min: "20",
1366
+ onInput: n[7] ||= (e) => F(e.target.value)
1367
+ }, null, 42, hr), x("span", { class: m(f(W)) }, "px", 2)])) : _("", !0)
1368
+ ]),
1369
+ x("div", gr, [x("label", { class: m(f(U)) }, w(f(c).image.borderRadius), 3), p(Xn, {
1370
+ "model-value": e.block.borderRadius ?? 0,
1371
+ min: 0,
1372
+ suffix: "px",
1373
+ testid: "image-border-radius-input",
1374
+ "onUpdate:modelValue": oe
1375
+ }, null, 8, ["model-value"])]),
1376
+ x("div", _r, [x("label", { class: m(f(U)) }, w(f(c).title.align), 3), p(X, {
1377
+ options: [
1378
+ {
1379
+ value: "left",
1380
+ label: f(c).title.alignLeft
1381
+ },
1382
+ {
1383
+ value: "center",
1384
+ label: f(c).title.alignCenter
1385
+ },
1386
+ {
1387
+ value: "right",
1388
+ label: f(c).title.alignRight
1389
+ }
1390
+ ],
1391
+ "model-value": e.block.align,
1392
+ "onUpdate:modelValue": n[8] ||= (e) => N("align", e)
1393
+ }, null, 8, ["options", "model-value"])]),
1394
+ x("div", vr, [
1395
+ x("label", { class: m(f(U)) }, w(f(c).image.linkUrl), 3),
1396
+ p(Y, {
1397
+ "model-value": e.block.linkUrl || "",
1398
+ type: "url",
1399
+ placeholder: f(c).image.imageUrlPlaceholder,
1400
+ "onUpdate:modelValue": n[9] ||= (e) => N("linkUrl", e)
1401
+ }, null, 8, ["model-value", "placeholder"]),
1402
+ e.block.linkUrl ? (o(), y(J, {
1403
+ key: 0,
1404
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
1405
+ "model-value": e.block.linkOpenInNewTab ?? !1,
1406
+ label: f(c).image.openInNewTab,
1407
+ "onUpdate:modelValue": n[10] ||= (e) => N("linkOpenInNewTab", e)
1408
+ }, null, 8, ["model-value", "label"])) : _("", !0)
1409
+ ])
1410
+ ], 64));
1411
+ }
1412
+ }), Sr = { class: "tpl:mb-3.5" }, $ = /* @__PURE__ */ l({
1413
+ __name: "FieldRow",
1414
+ props: { label: {} },
1415
+ setup(e) {
1416
+ return (t, n) => (o(), g("div", Sr, [e.label ? (o(), g("label", {
1417
+ key: 0,
1418
+ class: m(f(U))
1419
+ }, w(e.label), 3)) : _("", !0), a(t.$slots, "default")]));
1420
+ }
1421
+ }), Cr = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, wr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Tr = [
1422
+ "value",
1423
+ "placeholder",
1424
+ "onInput"
1425
+ ], Er = ["title", "onClick"], Dr = { class: "tpl:flex tpl:flex-wrap tpl:items-center tpl:gap-x-3 tpl:gap-y-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Or = { class: "tpl:flex tpl:items-center tpl:gap-2" }, kr = ["value"], Ar = { value: "" }, jr = ["value"], Mr = ["value"], Nr = /* @__PURE__ */ l({
1426
+ __name: "MenuToolbar",
1427
+ props: {
1428
+ block: {},
1429
+ fontFamilies: {}
1430
+ },
1431
+ emits: ["update"],
1432
+ setup(e, { emit: t }) {
1433
+ let n = e, a = t, { t: s } = L(), c = h(() => [
1434
+ {
1435
+ key: "openInNewTab",
1436
+ label: s.menu.openInNewTab
1437
+ },
1438
+ {
1439
+ key: "bold",
1440
+ label: s.menu.bold
1441
+ },
1442
+ {
1443
+ key: "underline",
1444
+ label: s.menu.underline
1445
+ }
1446
+ ]), l = h(() => [
1447
+ {
1448
+ value: "left",
1449
+ label: s.title.alignLeft,
1450
+ icon: H
1451
+ },
1452
+ {
1453
+ value: "center",
1454
+ label: s.title.alignCenter,
1455
+ icon: B
1456
+ },
1457
+ {
1458
+ value: "right",
1459
+ label: s.title.alignRight,
1460
+ icon: V
1461
+ }
1462
+ ]);
1463
+ function u(e, t) {
1464
+ a("update", { [e]: t });
1465
+ }
1466
+ function d() {
1467
+ let e = {
1468
+ id: D(),
1469
+ text: "",
1470
+ url: "",
1471
+ openInNewTab: !1,
1472
+ bold: !1,
1473
+ underline: !1
1474
+ };
1475
+ a("update", { items: [...n.block.items, e] });
1476
+ }
1477
+ function _(e, t, r) {
1478
+ let i = n.block.items.map((n) => n.id === e ? {
1479
+ ...n,
1480
+ [t]: r
1481
+ } : n);
1482
+ a("update", { items: i });
1483
+ }
1484
+ function v(e) {
1485
+ a("update", { items: n.block.items.filter((t) => t.id !== e) });
1486
+ }
1487
+ return (t, n) => (o(), g(C, null, [
1488
+ p($, { label: f(s).menu.items }, {
1489
+ default: i(() => [x("div", Cr, [(o(!0), g(C, null, r(e.block.items, (t) => (o(), g("div", {
1490
+ key: t.id,
1491
+ class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
1492
+ }, [
1493
+ x("div", wr, [x("input", {
1494
+ type: "text",
1495
+ class: m([f(K), "tpl:flex-1"]),
1496
+ value: t.text,
1497
+ placeholder: f(s).menu.text,
1498
+ onInput: (e) => _(t.id, "text", e.target.value)
1499
+ }, null, 42, Tr), x("button", {
1500
+ class: m(f(ke)),
1501
+ title: f(s).menu.removeItem,
1502
+ onClick: (e) => v(t.id)
1503
+ }, [p(f(xe), {
1504
+ size: 14,
1505
+ "stroke-width": 2
1506
+ })], 10, Er)]),
1507
+ p(Y, {
1508
+ "model-value": t.url,
1509
+ type: "url",
1510
+ placeholder: f(s).menu.urlPlaceholder,
1511
+ "onUpdate:modelValue": (e) => _(t.id, "url", e)
1512
+ }, null, 8, [
1513
+ "model-value",
1514
+ "placeholder",
1515
+ "onUpdate:modelValue"
1516
+ ]),
1517
+ x("div", Dr, [(o(!0), g(C, null, r(c.value, (e) => (o(), y(J, {
1518
+ key: e.key,
1519
+ "model-value": t[e.key],
1520
+ label: e.label,
1521
+ "onUpdate:modelValue": (n) => _(t.id, e.key, n)
1522
+ }, null, 8, [
1523
+ "model-value",
1524
+ "label",
1525
+ "onUpdate:modelValue"
1526
+ ]))), 128))]),
1527
+ x("div", Or, [x("label", { class: m([f(U), "tpl:!mb-0"]) }, w(f(s).menu.color), 3), p(q, {
1528
+ "swatch-only": "",
1529
+ "model-value": t.color || e.block.linkColor || e.block.color || "",
1530
+ "onUpdate:modelValue": (e) => _(t.id, "color", e)
1531
+ }, null, 8, ["model-value", "onUpdate:modelValue"])])
1532
+ ]))), 128)), x("button", {
1533
+ class: m(f(Ae)),
1534
+ onClick: d
1535
+ }, [p(f(R), {
1536
+ size: 14,
1537
+ "stroke-width": 2
1538
+ }), E(" " + w(f(s).menu.addItem), 1)], 2)])]),
1539
+ _: 1
1540
+ }, 8, ["label"]),
1541
+ p($, { label: f(s).menu.fontFamily }, {
1542
+ default: i(() => [x("select", {
1543
+ class: m(f(K)),
1544
+ value: e.block.fontFamily || "",
1545
+ onChange: n[0] ||= (e) => u("fontFamily", e.target.value || void 0)
1546
+ }, [x("option", Ar, w(f(s).title.inheritFont), 1), (o(!0), g(C, null, r(e.fontFamilies, (e) => (o(), g("option", {
1547
+ key: e.value,
1548
+ value: e.value
1549
+ }, w(e.label), 9, jr))), 128))], 42, kr)]),
1550
+ _: 1
1551
+ }, 8, ["label"]),
1552
+ p($, { label: f(s).menu.fontSize }, {
1553
+ default: i(() => [p(Xn, {
1554
+ "model-value": e.block.fontSize,
1555
+ min: 8,
1556
+ max: 48,
1557
+ suffix: "px",
1558
+ "onUpdate:modelValue": n[1] ||= (e) => u("fontSize", e)
1559
+ }, null, 8, ["model-value"])]),
1560
+ _: 1
1561
+ }, 8, ["label"]),
1562
+ p($, { label: f(s).menu.color }, {
1563
+ default: i(() => [p(q, {
1564
+ "model-value": e.block.color ?? "",
1565
+ "onUpdate:modelValue": n[2] ||= (e) => u("color", e || void 0)
1566
+ }, null, 8, ["model-value"])]),
1567
+ _: 1
1568
+ }, 8, ["label"]),
1569
+ p($, { label: f(s).menu.linkColor }, {
1570
+ default: i(() => [p(q, {
1571
+ "model-value": e.block.linkColor || e.block.color || "",
1572
+ "onUpdate:modelValue": n[3] ||= (e) => u("linkColor", e || void 0)
1573
+ }, null, 8, ["model-value"])]),
1574
+ _: 1
1575
+ }, 8, ["label"]),
1576
+ p($, { label: f(s).menu.textAlign }, {
1577
+ default: i(() => [p(X, {
1578
+ options: l.value,
1579
+ "model-value": e.block.textAlign,
1580
+ "onUpdate:modelValue": n[4] ||= (e) => u("textAlign", e)
1581
+ }, null, 8, ["options", "model-value"])]),
1582
+ _: 1
1583
+ }, 8, ["label"]),
1584
+ p($, { label: f(s).menu.separator }, {
1585
+ default: i(() => [x("input", {
1586
+ type: "text",
1587
+ class: m(f(K)),
1588
+ value: e.block.separator,
1589
+ onInput: n[5] ||= (e) => u("separator", e.target.value)
1590
+ }, null, 42, Mr)]),
1591
+ _: 1
1592
+ }, 8, ["label"]),
1593
+ p($, { label: f(s).menu.separatorColor }, {
1594
+ default: i(() => [p(q, {
1595
+ "model-value": e.block.separatorColor,
1596
+ "onUpdate:modelValue": n[6] ||= (e) => u("separatorColor", e)
1597
+ }, null, 8, ["model-value"])]),
1598
+ _: 1
1599
+ }, 8, ["label"]),
1600
+ p($, { label: f(s).menu.spacing }, {
1601
+ default: i(() => [p(Xn, {
1602
+ "model-value": e.block.spacing,
1603
+ min: 0,
1604
+ max: 50,
1605
+ suffix: "px",
1606
+ "onUpdate:modelValue": n[7] ||= (e) => u("spacing", e)
1607
+ }, null, 8, ["model-value"])]),
1608
+ _: 1
1609
+ }, 8, ["label"])
1610
+ ], 64));
1611
+ }
1612
+ }), Pr = {
1613
+ class: "tpl:mb-3.5",
1614
+ "data-testid": "paragraph-spacing"
1615
+ }, Fr = { class: "tpl:flex tpl:items-stretch" }, Ir = ["value"], Lr = /* @__PURE__ */ l({
1616
+ __name: "ParagraphToolbar",
1617
+ props: { block: {} },
1618
+ emits: ["update"],
1619
+ setup(e, { emit: t }) {
1620
+ let n = t, { t: r } = L();
1621
+ return (t, i) => (o(), g("div", Pr, [x("label", { class: m(f(U)) }, w(f(r).paragraph.paragraphSpacing), 3), x("div", Fr, [x("input", {
1622
+ type: "number",
1623
+ class: m(f(G)),
1624
+ value: e.block.paragraphSpacing ?? f(A).paragraphGap,
1625
+ min: "0",
1626
+ max: "64",
1627
+ onInput: i[0] ||= (e) => n("update", { paragraphSpacing: Number(e.target.value) })
1628
+ }, null, 42, Ir), x("span", { class: m(f(W)) }, "px", 2)])]));
1629
+ }
1630
+ });
1631
+ //#endregion
1632
+ //#region src/utils/rebalanceColumnChildren.ts
1633
+ function Rr(e) {
1634
+ return e === "1" ? 1 : e === "3" ? 3 : 2;
1635
+ }
1636
+ function zr(e, t) {
1637
+ let n = Rr(t);
1638
+ if (e.length === n) return e;
1639
+ if (e.length < n) {
1640
+ let t = Array.from({ length: n - e.length }, () => []);
1641
+ return [...e, ...t];
1642
+ }
1643
+ let r = e.slice(0, n), i = e.slice(n).flat(), a = [...r[n - 1], ...i];
1644
+ return [...r.slice(0, n - 1), a];
1645
+ }
1646
+ //#endregion
1647
+ //#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
1648
+ var Br = { class: "tpl:mb-3.5" }, Vr = ["value"], Hr = ["value"], Ur = {
1649
+ key: 0,
1650
+ class: "tpl:mb-3.5"
1651
+ }, Wr = { class: "tpl:mb-3.5" }, Gr = { class: "tpl:flex tpl:items-stretch" }, Kr = ["value"], qr = { class: "tpl:mb-3.5" }, Jr = {
1652
+ key: 0,
1653
+ class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
1654
+ }, Yr = { class: "tpl:flex tpl:items-stretch" }, Xr = ["value"], Zr = /* @__PURE__ */ l({
1655
+ __name: "SectionToolbar",
1656
+ props: { block: {} },
1657
+ emits: ["update"],
1658
+ setup(e, { emit: t }) {
1659
+ let n = e, i = t, { t: a } = L(), s = h(() => [
1660
+ {
1661
+ value: "1",
1662
+ label: a.section.column1
1663
+ },
1664
+ {
1665
+ value: "2",
1666
+ label: a.section.column2
1667
+ },
1668
+ {
1669
+ value: "3",
1670
+ label: a.section.column3
1671
+ },
1672
+ {
1673
+ value: "1-2",
1674
+ label: a.section.ratio12
1675
+ },
1676
+ {
1677
+ value: "2-1",
1678
+ label: a.section.ratio21
1679
+ }
1680
+ ]);
1681
+ function c(e) {
1682
+ let t = e.target.value, r = zr(n.block.children, t);
1683
+ i("update", {
1684
+ columns: t,
1685
+ children: r
1686
+ });
1687
+ }
1688
+ function l(e) {
1689
+ i("update", { stackOnMobile: e });
1690
+ }
1691
+ function u(e) {
1692
+ let t = Number(e.target.value);
1693
+ i("update", { borderRadius: t });
1694
+ }
1695
+ function d(e) {
1696
+ i("update", { wrapper: e ? { padding: {
1697
+ top: 20,
1698
+ right: 20,
1699
+ bottom: 20,
1700
+ left: 20
1701
+ } } : void 0 });
1702
+ }
1703
+ function v(e) {
1704
+ i("update", { wrapper: {
1705
+ ...n.block.wrapper,
1706
+ ...e
1707
+ } });
1708
+ }
1709
+ function y(e) {
1710
+ v({ padding: e });
1711
+ }
1712
+ function b(e) {
1713
+ v({ borderRadius: Number(e.target.value) });
1714
+ }
1715
+ return (t, n) => (o(), g(C, null, [
1716
+ x("div", Br, [x("label", { class: m(f(U)) }, w(f(a).section.columns), 3), x("select", {
1717
+ class: m(f(K)),
1718
+ value: e.block.columns,
1719
+ onChange: c
1720
+ }, [(o(!0), g(C, null, r(s.value, (e) => (o(), g("option", {
1721
+ key: e.value,
1722
+ value: e.value
1723
+ }, w(e.label), 9, Hr))), 128))], 42, Vr)]),
1724
+ e.block.columns === "1" ? _("", !0) : (o(), g("div", Ur, [p(J, {
1725
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
1726
+ "model-value": e.block.stackOnMobile !== !1,
1727
+ label: f(a).section.stackOnMobile,
1728
+ "onUpdate:modelValue": n[0] ||= (e) => l(e)
1729
+ }, null, 8, ["model-value", "label"])])),
1730
+ x("div", Wr, [x("label", { class: m(f(U)) }, w(f(a).section.borderRadius), 3), x("div", Gr, [x("input", {
1731
+ type: "number",
1732
+ class: m(f(G)),
1733
+ value: e.block.borderRadius ?? 0,
1734
+ min: "0",
1735
+ max: "50",
1736
+ onInput: u
1737
+ }, null, 42, Kr), x("span", { class: m(f(W)) }, "px", 2)])]),
1738
+ x("div", qr, [p(J, {
1739
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
1740
+ "model-value": !!e.block.wrapper,
1741
+ label: f(a).section.wrapperEnable,
1742
+ "onUpdate:modelValue": n[1] ||= (e) => d(e)
1743
+ }, null, 8, ["model-value", "label"]), e.block.wrapper ? (o(), g("div", Jr, [
1744
+ x("div", null, [x("label", { class: m(f(U)) }, w(f(a).blockSettings.color), 3), p(q, {
1745
+ "model-value": e.block.wrapper.backgroundColor ?? "",
1746
+ "onUpdate:modelValue": n[2] ||= (e) => v({ backgroundColor: e })
1747
+ }, null, 8, ["model-value"])]),
1748
+ p(kt, {
1749
+ label: f(a).blockSettings.padding,
1750
+ "model-value": e.block.wrapper.padding ?? {
1751
+ top: 0,
1752
+ right: 0,
1753
+ bottom: 0,
1754
+ left: 0
1755
+ },
1756
+ "onUpdate:modelValue": y
1757
+ }, null, 8, ["label", "model-value"]),
1758
+ x("div", null, [x("label", { class: m(f(U)) }, w(f(a).section.borderRadius), 3), x("div", Yr, [x("input", {
1759
+ type: "number",
1760
+ class: m(f(G)),
1761
+ value: e.block.wrapper.borderRadius ?? 0,
1762
+ min: "0",
1763
+ max: "50",
1764
+ onInput: b
1765
+ }, null, 42, Xr), x("span", { class: m(f(W)) }, "px", 2)])])
1766
+ ])) : _("", !0)])
1767
+ ], 64));
1768
+ }
1769
+ }), Qr = { class: "tpl:mb-3.5" }, $r = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ei = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ti = ["value", "onChange"], ni = ["value"], ri = ["title", "onClick"], ii = { class: "tpl:mb-3.5" }, ai = ["value"], oi = { value: "solid" }, si = { value: "outlined" }, ci = { value: "rounded" }, li = { value: "square" }, ui = { value: "circle" }, di = { class: "tpl:mb-3.5" }, fi = { class: "tpl:mb-3.5" }, pi = { class: "tpl:flex tpl:items-stretch" }, mi = ["value"], hi = { class: "tpl:mb-3.5" }, gi = /* @__PURE__ */ l({
1770
+ __name: "SocialToolbar",
1771
+ props: { block: {} },
1772
+ emits: ["update"],
1773
+ setup(e, { emit: t }) {
1774
+ let n = e, i = t, { t: a } = L();
1775
+ function s(e, t) {
1776
+ i("update", { [e]: t });
1777
+ }
1778
+ function c() {
1779
+ let e = {
1780
+ id: D(),
1781
+ platform: "facebook",
1782
+ url: ""
1783
+ };
1784
+ i("update", { icons: [...n.block.icons, e] });
1785
+ }
1786
+ function l(e, t, r) {
1787
+ let a = n.block.icons.map((n) => n.id === e ? {
1788
+ ...n,
1789
+ [t]: r
1790
+ } : n);
1791
+ i("update", { icons: a });
1792
+ }
1793
+ function u(e) {
1794
+ i("update", { icons: n.block.icons.filter((t) => t.id !== e) });
1795
+ }
1796
+ return (t, n) => (o(), g(C, null, [
1797
+ x("div", Qr, [x("label", { class: m(f(U)) }, w(f(a).social.icons), 3), x("div", $r, [(o(!0), g(C, null, r(e.block.icons, (e) => (o(), g("div", {
1798
+ key: e.id,
1799
+ class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
1800
+ }, [x("div", ei, [x("select", {
1801
+ "data-testid": "social-platform-select",
1802
+ class: m([f(K), "tpl:flex-1"]),
1803
+ value: e.platform,
1804
+ onChange: (t) => l(e.id, "platform", t.target.value)
1805
+ }, [(o(!0), g(C, null, r(f(P), (e) => (o(), g("option", {
1806
+ key: e,
1807
+ value: e
1808
+ }, w(f(a).social.platforms[e]), 9, ni))), 128))], 42, ti), x("button", {
1809
+ class: m(f(ke)),
1810
+ title: f(a).social.removeIcon,
1811
+ onClick: (t) => u(e.id)
1812
+ }, [p(f(xe), {
1813
+ size: 14,
1814
+ "stroke-width": 2
1815
+ })], 10, ri)]), p(Y, {
1816
+ "model-value": e.url,
1817
+ type: "url",
1818
+ placeholder: f(a).social.urlPlaceholder,
1819
+ "onUpdate:modelValue": (t) => l(e.id, "url", t)
1820
+ }, null, 8, [
1821
+ "model-value",
1822
+ "placeholder",
1823
+ "onUpdate:modelValue"
1824
+ ])]))), 128)), x("button", {
1825
+ class: m(f(Ae)),
1826
+ onClick: c
1827
+ }, [p(f(R), {
1828
+ size: 14,
1829
+ "stroke-width": 2
1830
+ }), E(" " + w(f(a).social.addIcon), 1)], 2)])]),
1831
+ x("div", ii, [x("label", { class: m(f(U)) }, w(f(a).social.style), 3), x("select", {
1832
+ class: m(f(K)),
1833
+ value: e.block.iconStyle,
1834
+ onChange: n[0] ||= (e) => s("iconStyle", e.target.value)
1835
+ }, [
1836
+ x("option", oi, w(f(a).social.styleSolid), 1),
1837
+ x("option", si, w(f(a).social.styleOutlined), 1),
1838
+ x("option", ci, w(f(a).social.styleRounded), 1),
1839
+ x("option", li, w(f(a).social.styleSquare), 1),
1840
+ x("option", ui, w(f(a).social.styleCircle), 1)
1841
+ ], 42, ai)]),
1842
+ x("div", di, [x("label", { class: m(f(U)) }, w(f(a).social.size), 3), p(X, {
1843
+ options: [
1844
+ {
1845
+ value: "small",
1846
+ label: f(a).social.sizeSmall
1847
+ },
1848
+ {
1849
+ value: "medium",
1850
+ label: f(a).social.sizeMedium
1851
+ },
1852
+ {
1853
+ value: "large",
1854
+ label: f(a).social.sizeLarge
1855
+ }
1856
+ ],
1857
+ "model-value": e.block.iconSize,
1858
+ "onUpdate:modelValue": n[1] ||= (e) => s("iconSize", e)
1859
+ }, null, 8, ["options", "model-value"])]),
1860
+ x("div", fi, [x("label", { class: m(f(U)) }, w(f(a).social.spacing), 3), x("div", pi, [x("input", {
1861
+ type: "number",
1862
+ class: m(f(G)),
1863
+ value: e.block.spacing,
1864
+ min: "0",
1865
+ max: "50",
1866
+ onInput: n[2] ||= (e) => s("spacing", Number(e.target.value))
1867
+ }, null, 42, mi), x("span", { class: m(f(W)) }, "px", 2)])]),
1868
+ x("div", hi, [x("label", { class: m(f(U)) }, w(f(a).social.align), 3), p(X, {
1869
+ options: [
1870
+ {
1871
+ value: "left",
1872
+ label: f(a).title.alignLeft,
1873
+ icon: f(H)
1874
+ },
1875
+ {
1876
+ value: "center",
1877
+ label: f(a).title.alignCenter,
1878
+ icon: f(B)
1879
+ },
1880
+ {
1881
+ value: "right",
1882
+ label: f(a).title.alignRight,
1883
+ icon: f(V)
1884
+ }
1885
+ ],
1886
+ "model-value": e.block.align,
1887
+ "onUpdate:modelValue": n[3] ||= (e) => s("align", e)
1888
+ }, null, 8, ["options", "model-value"])])
1889
+ ], 64));
1890
+ }
1891
+ }), _i = { class: "tpl:mb-3.5" }, vi = { class: "tpl:flex tpl:items-stretch" }, yi = ["value"], bi = ["value"], xi = /* @__PURE__ */ l({
1892
+ __name: "SpacerToolbar",
1893
+ props: { block: {} },
1894
+ emits: ["update"],
1895
+ setup(e, { emit: t }) {
1896
+ let n = t, { t: r } = L();
1897
+ return (t, i) => (o(), g("div", _i, [
1898
+ x("label", { class: m(f(U)) }, w(f(r).spacer.height), 3),
1899
+ x("div", vi, [x("input", {
1900
+ type: "number",
1901
+ class: m(f(G)),
1902
+ value: e.block.height,
1903
+ min: "10",
1904
+ max: "100",
1905
+ onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
1906
+ }, null, 42, yi), x("span", { class: m(f(W)) }, "px", 2)]),
1907
+ x("input", {
1908
+ type: "range",
1909
+ class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
1910
+ value: e.block.height,
1911
+ min: "10",
1912
+ max: "100",
1913
+ onInput: i[1] ||= (e) => n("update", { height: Number(e.target.value) })
1914
+ }, null, 40, bi)
1915
+ ]));
1916
+ }
1917
+ }), Si = { class: "tpl:mb-3.5" }, Ci = { class: "tpl:flex tpl:items-center tpl:gap-3" }, wi = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Ti = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Ei = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Di = ["disabled"], Oi = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, ki = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Ai = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, ji = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Mi = ["disabled"], Ni = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Pi = { class: "tpl:mb-3.5" }, Fi = {
1918
+ key: 0,
1919
+ class: "tpl:mb-3.5"
1920
+ }, Ii = { class: "tpl:mb-3.5" }, Li = { class: "tpl:mb-3.5" }, Ri = { class: "tpl:flex tpl:items-stretch" }, zi = ["value"], Bi = { class: "tpl:mb-3.5" }, Vi = { class: "tpl:flex tpl:items-stretch" }, Hi = ["value"], Ui = { class: "tpl:mb-3.5" }, Wi = ["value"], Gi = { value: "" }, Ki = ["value"], qi = { class: "tpl:mb-3.5" }, Ji = { class: "tpl:flex tpl:items-stretch" }, Yi = ["value"], Xi = { class: "tpl:mb-3.5" }, Zi = { class: "tpl:mb-3.5" }, Qi = /* @__PURE__ */ l({
1921
+ __name: "TableToolbar",
1922
+ props: {
1923
+ block: {},
1924
+ fontFamilies: {}
1925
+ },
1926
+ emits: ["update"],
1927
+ setup(e, { emit: t }) {
1928
+ let n = e, i = t, { t: a } = L(), s = h(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
1929
+ function c(e, t) {
1930
+ i("update", { [e]: t });
1931
+ }
1932
+ function l() {
1933
+ let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
1934
+ id: D(),
1935
+ cells: Array.from({ length: e }, () => ({
1936
+ id: D(),
1937
+ content: ""
1938
+ }))
1939
+ };
1940
+ i("update", { rows: [...n.block.rows, t] });
1941
+ }
1942
+ function u(e) {
1943
+ i("update", { rows: n.block.rows.filter((t) => t.id !== e) });
1944
+ }
1945
+ function d() {
1946
+ let e = n.block.rows.map((e) => ({
1947
+ ...e,
1948
+ cells: [...e.cells, {
1949
+ id: D(),
1950
+ content: ""
1951
+ }]
1952
+ }));
1953
+ i("update", { rows: e });
1954
+ }
1955
+ function v(e) {
1956
+ let t = n.block.rows.map((t) => ({
1957
+ ...t,
1958
+ cells: t.cells.filter((t, n) => n !== e)
1959
+ }));
1960
+ i("update", { rows: t });
1961
+ }
1962
+ return (t, n) => (o(), g(C, null, [
1963
+ x("div", Si, [x("label", { class: m(f(U)) }, w(f(a).table.dimensions), 3), x("div", Ci, [x("div", wi, [x("span", Ti, w(f(a).table.rows), 1), x("div", Ei, [
1964
+ x("button", {
1965
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
1966
+ disabled: e.block.rows.length <= 1,
1967
+ onClick: n[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
1968
+ }, [p(f(z), {
1969
+ size: 12,
1970
+ "stroke-width": 2
1971
+ })], 8, Di),
1972
+ x("span", Oi, w(e.block.rows.length), 1),
1973
+ x("button", {
1974
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)]",
1975
+ onClick: l
1976
+ }, [p(f(R), {
1977
+ size: 12,
1978
+ "stroke-width": 2
1979
+ })])
1980
+ ])]), x("div", ki, [x("span", Ai, w(f(a).table.columns), 1), x("div", ji, [
1981
+ x("button", {
1982
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
1983
+ disabled: s.value <= 1,
1984
+ onClick: n[1] ||= (e) => v(s.value - 1)
1985
+ }, [p(f(z), {
1986
+ size: 12,
1987
+ "stroke-width": 2
1988
+ })], 8, Mi),
1989
+ x("span", Ni, w(s.value), 1),
1990
+ x("button", {
1991
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)]",
1992
+ onClick: d
1993
+ }, [p(f(R), {
1994
+ size: 12,
1995
+ "stroke-width": 2
1996
+ })])
1997
+ ])])])]),
1998
+ x("div", Pi, [p(J, {
1999
+ class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
2000
+ "model-value": e.block.hasHeaderRow,
2001
+ label: f(a).table.hasHeaderRow,
2002
+ "onUpdate:modelValue": n[2] ||= (e) => c("hasHeaderRow", e)
2003
+ }, null, 8, ["model-value", "label"])]),
2004
+ e.block.hasHeaderRow ? (o(), g("div", Fi, [x("label", { class: m(f(U)) }, w(f(a).table.headerBackgroundColor), 3), p(q, {
2005
+ "model-value": e.block.headerBackgroundColor ?? "",
2006
+ "seed-color": f(je),
2007
+ placeholder: f(a).table.noHeaderBg,
2008
+ "onUpdate:modelValue": n[3] ||= (e) => c("headerBackgroundColor", e || null)
2009
+ }, null, 8, [
2010
+ "model-value",
2011
+ "seed-color",
2012
+ "placeholder"
2013
+ ])])) : _("", !0),
2014
+ x("div", Ii, [x("label", { class: m(f(U)) }, w(f(a).table.borderColor), 3), p(q, {
2015
+ "model-value": e.block.borderColor,
2016
+ "onUpdate:modelValue": n[4] ||= (e) => c("borderColor", e)
2017
+ }, null, 8, ["model-value"])]),
2018
+ x("div", Li, [x("label", { class: m(f(U)) }, w(f(a).table.borderWidth), 3), x("div", Ri, [x("input", {
2019
+ type: "number",
2020
+ class: m(f(G)),
2021
+ value: e.block.borderWidth,
2022
+ min: "0",
2023
+ max: "10",
2024
+ onInput: n[5] ||= (e) => c("borderWidth", Number(e.target.value))
2025
+ }, null, 42, zi), x("span", { class: m(f(W)) }, "px", 2)])]),
2026
+ x("div", Bi, [x("label", { class: m(f(U)) }, w(f(a).table.cellPadding), 3), x("div", Vi, [x("input", {
2027
+ type: "number",
2028
+ class: m(f(G)),
2029
+ value: e.block.cellPadding,
2030
+ min: "0",
2031
+ max: "30",
2032
+ onInput: n[6] ||= (e) => c("cellPadding", Number(e.target.value))
2033
+ }, null, 42, Hi), x("span", { class: m(f(W)) }, "px", 2)])]),
2034
+ x("div", Ui, [x("label", { class: m(f(U)) }, w(f(a).table.fontFamily), 3), x("select", {
2035
+ class: m(f(K)),
2036
+ value: e.block.fontFamily || "",
2037
+ onChange: n[7] ||= (e) => c("fontFamily", e.target.value || void 0)
2038
+ }, [x("option", Gi, w(f(a).title.inheritFont), 1), (o(!0), g(C, null, r(e.fontFamilies, (e) => (o(), g("option", {
2039
+ key: e.value,
2040
+ value: e.value
2041
+ }, w(e.label), 9, Ki))), 128))], 42, Wi)]),
2042
+ x("div", qi, [x("label", { class: m(f(U)) }, w(f(a).table.fontSize), 3), x("div", Ji, [x("input", {
2043
+ type: "number",
2044
+ class: m(f(G)),
2045
+ value: e.block.fontSize,
2046
+ min: "10",
2047
+ max: "32",
2048
+ onInput: n[8] ||= (e) => c("fontSize", Number(e.target.value))
2049
+ }, null, 42, Yi), x("span", { class: m(f(W)) }, "px", 2)])]),
2050
+ x("div", Xi, [x("label", { class: m(f(U)) }, w(f(a).table.color), 3), p(q, {
2051
+ "model-value": e.block.color ?? "",
2052
+ "onUpdate:modelValue": n[9] ||= (e) => c("color", e || void 0)
2053
+ }, null, 8, ["model-value"])]),
2054
+ x("div", Zi, [x("label", { class: m(f(U)) }, w(f(a).table.textAlign), 3), p(X, {
2055
+ options: [
2056
+ {
2057
+ value: "left",
2058
+ label: f(a).title.alignLeft,
2059
+ icon: f(H)
2060
+ },
2061
+ {
2062
+ value: "center",
2063
+ label: f(a).title.alignCenter,
2064
+ icon: f(B)
2065
+ },
2066
+ {
2067
+ value: "right",
2068
+ label: f(a).title.alignRight,
2069
+ icon: f(V)
2070
+ }
2071
+ ],
2072
+ "model-value": e.block.textAlign,
2073
+ "onUpdate:modelValue": n[10] ||= (e) => c("textAlign", e)
2074
+ }, null, 8, ["options", "model-value"])])
2075
+ ], 64));
2076
+ }
2077
+ }), $i = { class: "tpl:mb-3.5" }, ea = ["value"], ta = { value: 1 }, na = { value: 2 }, ra = { value: 3 }, ia = { value: 4 }, aa = { class: "tpl:mb-3.5" }, oa = ["value"], sa = { value: "" }, ca = ["value"], la = { class: "tpl:mb-3.5" }, ua = { class: "tpl:mb-3.5" }, da = /* @__PURE__ */ l({
2078
+ __name: "TitleToolbar",
2079
+ props: {
2080
+ block: {},
2081
+ fontFamilies: {}
2082
+ },
2083
+ emits: ["update"],
2084
+ setup(e, { emit: t }) {
2085
+ let n = t, { t: i } = L();
2086
+ function a(e, t) {
2087
+ n("update", { [e]: t });
2088
+ }
2089
+ return (t, n) => (o(), g(C, null, [
2090
+ x("div", $i, [x("label", { class: m(f(U)) }, w(f(i).title.level), 3), x("select", {
2091
+ class: m(f(K)),
2092
+ value: e.block.level,
2093
+ onChange: n[0] ||= (e) => a("level", Number(e.target.value))
2094
+ }, [
2095
+ x("option", ta, w(f(i).title.heading1), 1),
2096
+ x("option", na, w(f(i).title.heading2), 1),
2097
+ x("option", ra, w(f(i).title.heading3), 1),
2098
+ x("option", ia, w(f(i).title.heading4), 1)
2099
+ ], 42, ea)]),
2100
+ x("div", aa, [x("label", { class: m(f(U)) }, w(f(i).title.fontFamily), 3), x("select", {
2101
+ class: m(f(K)),
2102
+ value: e.block.fontFamily || "",
2103
+ onChange: n[1] ||= (e) => a("fontFamily", e.target.value || void 0)
2104
+ }, [x("option", sa, w(f(i).title.inheritFont), 1), (o(!0), g(C, null, r(e.fontFamilies, (e) => (o(), g("option", {
2105
+ key: e.value,
2106
+ value: e.value
2107
+ }, w(e.label), 9, ca))), 128))], 42, oa)]),
2108
+ x("div", la, [x("label", { class: m(f(U)) }, w(f(i).title.color), 3), p(q, {
2109
+ "model-value": e.block.color ?? "",
2110
+ "onUpdate:modelValue": n[2] ||= (e) => a("color", e || void 0)
2111
+ }, null, 8, ["model-value"])]),
2112
+ x("div", ua, [x("label", { class: m(f(U)) }, w(f(i).title.align), 3), p(X, {
2113
+ options: [
2114
+ {
2115
+ value: "left",
2116
+ label: f(i).title.alignLeft,
2117
+ icon: f(H)
2118
+ },
2119
+ {
2120
+ value: "center",
2121
+ label: f(i).title.alignCenter,
2122
+ icon: f(B)
2123
+ },
2124
+ {
2125
+ value: "right",
2126
+ label: f(i).title.alignRight,
2127
+ icon: f(V)
2128
+ }
2129
+ ],
2130
+ "model-value": e.block.textAlign,
2131
+ "onUpdate:modelValue": n[3] ||= (e) => a("textAlign", e)
2132
+ }, null, 8, ["options", "model-value"])])
2133
+ ], 64));
2134
+ }
2135
+ }), fa = { class: "tpl:mb-3.5" }, pa = {
2136
+ key: 0,
2137
+ class: "tpl:mb-3.5"
2138
+ }, ma = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, ha = [
2139
+ "value",
2140
+ "placeholder",
2141
+ "title"
2142
+ ], ga = { class: "tpl:mb-3.5" }, _a = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, va = { class: "tpl:mb-3.5" }, ya = { class: "tpl:mb-3.5" }, ba = ["value"], xa = { value: "full" }, Sa = { class: "tpl:mb-3.5" }, Ca = ["value"], wa = { value: "auto" }, Ta = { value: "custom" }, Ea = {
2143
+ key: 0,
2144
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
2145
+ }, Da = ["value"], Oa = { class: "tpl:mb-3.5" }, ka = 200, Aa = /* @__PURE__ */ l({
2146
+ __name: "VideoToolbar",
2147
+ props: { block: {} },
2148
+ emits: ["update"],
2149
+ setup(e, { emit: t }) {
2150
+ let r = e, i = t, { t: a } = L(), c = n(re, null), l = n(ie, j.liquid), u = De(), d = h(() => !!c), v = h(() => k(r.block.url, l)), b = h(() => typeof r.block.height == "number" ? "custom" : "auto"), S = s(!1), { start: T } = ne(() => {
2151
+ S.value = !1;
2152
+ }, 1e3, { immediate: !1 });
2153
+ function D(e, t) {
2154
+ i("update", { [e]: t });
2155
+ }
2156
+ function O(e) {
2157
+ D("height", e === "custom" ? ka : void 0);
2158
+ }
2159
+ function A(e) {
2160
+ let t = Number(e);
2161
+ !Number.isFinite(t) || t <= 0 || D("height", t);
2162
+ }
2163
+ async function M() {
2164
+ let e = await c?.({ accept: ["images"] });
2165
+ u.alive && e && (D("thumbnailUrl", e.url), S.value = !0, T());
2166
+ }
2167
+ return (t, n) => (o(), g(C, null, [
2168
+ x("div", fa, [
2169
+ x("label", { class: m(f(U)) }, w(f(a).video.videoUrl), 3),
2170
+ p(Y, {
2171
+ "model-value": e.block.url,
2172
+ type: "url",
2173
+ placeholder: f(a).video.videoUrlPlaceholder,
2174
+ "onUpdate:modelValue": n[0] ||= (e) => D("url", e)
2175
+ }, null, 8, ["model-value", "placeholder"]),
2176
+ e.block.url ? (o(), y(J, {
2177
+ key: 0,
2178
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
2179
+ "model-value": e.block.openInNewTab ?? !1,
2180
+ label: f(a).video.openInNewTab,
2181
+ "onUpdate:modelValue": n[1] ||= (e) => D("openInNewTab", e)
2182
+ }, null, 8, ["model-value", "label"])) : _("", !0)
2183
+ ]),
2184
+ v.value ? (o(), g("div", pa, [x("label", { class: m(f(U)) }, [E(w(f(a).video.placeholderUrl) + " ", 1), x("span", ma, w(f(a).video.optional), 1)], 2), x("input", {
2185
+ type: "url",
2186
+ class: m(f(K)),
2187
+ value: e.block.placeholderUrl || "",
2188
+ placeholder: f(a).video.placeholderUrlPlaceholder,
2189
+ title: f(a).video.placeholderUrlTooltip,
2190
+ onInput: n[2] ||= (e) => D("placeholderUrl", e.target.value)
2191
+ }, null, 42, ha)])) : _("", !0),
2192
+ x("div", ga, [
2193
+ x("label", { class: m(f(U)) }, [E(w(f(a).video.customThumbnail) + " ", 1), x("span", _a, w(f(a).video.optional), 1)], 2),
2194
+ p(Y, {
2195
+ "model-value": e.block.thumbnailUrl,
2196
+ type: "url",
2197
+ placeholder: f(a).video.thumbnailPlaceholder,
2198
+ pulse: S.value,
2199
+ "onUpdate:modelValue": n[3] ||= (e) => D("thumbnailUrl", e)
2200
+ }, null, 8, [
2201
+ "model-value",
2202
+ "placeholder",
2203
+ "pulse"
2204
+ ]),
2205
+ d.value ? (o(), g("button", {
2206
+ key: 0,
2207
+ class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all",
2208
+ style: {
2209
+ "border-color": "var(--tpl-border)",
2210
+ color: "var(--tpl-primary)",
2211
+ "background-color": "var(--tpl-bg)"
2212
+ },
2213
+ onClick: M
2214
+ }, [p(f(ye), {
2215
+ size: 14,
2216
+ "stroke-width": 1.5
2217
+ }), E(" " + w(f(a).image.browseMedia), 1)])) : _("", !0)
2218
+ ]),
2219
+ x("div", va, [x("label", { class: m(f(U)) }, w(f(a).video.altText), 3), p(Y, {
2220
+ "model-value": e.block.alt,
2221
+ type: "text",
2222
+ placeholder: f(a).video.altTextPlaceholder,
2223
+ "onUpdate:modelValue": n[4] ||= (e) => D("alt", e)
2224
+ }, null, 8, ["model-value", "placeholder"])]),
2225
+ x("div", ya, [x("label", { class: m(f(U)) }, w(f(a).video.width), 3), x("select", {
2226
+ class: m(f(K)),
2227
+ value: e.block.width,
2228
+ onChange: n[5] ||= (e) => D("width", e.target.value === "full" ? "full" : Number(e.target.value))
2229
+ }, [
2230
+ x("option", xa, w(f(a).video.fullWidth), 1),
2231
+ n[9] ||= x("option", { value: "300" }, "300px", -1),
2232
+ n[10] ||= x("option", { value: "400" }, "400px", -1),
2233
+ n[11] ||= x("option", { value: "500" }, "500px", -1)
2234
+ ], 42, ba)]),
2235
+ x("div", Sa, [
2236
+ x("label", { class: m(f(U)) }, w(f(a).video.height), 3),
2237
+ x("select", {
2238
+ class: m(f(K)),
2239
+ "data-testid": "video-height-mode",
2240
+ value: b.value,
2241
+ onChange: n[6] ||= (e) => O(e.target.value)
2242
+ }, [x("option", wa, w(f(a).video.heightAuto), 1), x("option", Ta, w(f(a).video.heightCustom), 1)], 42, Ca),
2243
+ b.value === "custom" ? (o(), g("div", Ea, [x("input", {
2244
+ type: "number",
2245
+ "data-testid": "video-height-input",
2246
+ class: m(f(G)),
2247
+ value: e.block.height,
2248
+ min: "20",
2249
+ onInput: n[7] ||= (e) => A(e.target.value)
2250
+ }, null, 42, Da), x("span", { class: m(f(W)) }, "px", 2)])) : _("", !0)
2251
+ ]),
2252
+ x("div", Oa, [x("label", { class: m(f(U)) }, w(f(a).title.align), 3), p(X, {
2253
+ options: [
2254
+ {
2255
+ value: "left",
2256
+ label: f(a).title.alignLeft
2257
+ },
2258
+ {
2259
+ value: "center",
2260
+ label: f(a).title.alignCenter
2261
+ },
2262
+ {
2263
+ value: "right",
2264
+ label: f(a).title.alignRight
2265
+ }
2266
+ ],
2267
+ "model-value": e.block.align,
2268
+ "onUpdate:modelValue": n[8] ||= (e) => D("align", e)
2269
+ }, null, 8, ["options", "model-value"])])
2270
+ ], 64));
2271
+ }
2272
+ }), ja = ["aria-label"], Ma = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, Na = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, Pa = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Fa = { class: "tpl:flex tpl:gap-1" }, Ia = ["title"], La = ["title"], Ra = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, za = /*@__PURE__*/ l({
2273
+ __name: "Toolbar",
2274
+ props: { block: {} },
2275
+ emits: [
2276
+ "update",
2277
+ "delete",
2278
+ "duplicate"
2279
+ ],
2280
+ setup(e, { emit: t }) {
2281
+ let r = T(() => import("./CountdownToolbar-CN9h4nlC.js")), i = e, a = t, { t: s } = L(), l = F(I, "Toolbar"), u = n(le, []), d = h(() => i.block.type), m = h(() => O(i.block)), v = h(() => {
2282
+ if (m.value) return u.find((e) => e.type === i.block.customType);
2283
+ }), b = h(() => m.value ? v.value?.name ?? i.block.customType : te(d.value, s)), S = l.fonts;
2284
+ function C(e) {
2285
+ a("update", e);
2286
+ }
2287
+ return (t, n) => (o(), g("aside", {
2288
+ "data-testid": "block-toolbar",
2289
+ "aria-label": f(s).landmarks.blockToolbar,
2290
+ class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
2291
+ }, [x("div", Ma, [x("div", Na, [f(Me)[d.value] ? (o(), y(c(f(Me)[d.value]), {
2292
+ key: 0,
2293
+ size: 16,
2294
+ "stroke-width": 1.5
2295
+ })) : m.value ? (o(), y(f(ge), {
2296
+ key: 1,
2297
+ size: 16,
2298
+ "stroke-width": 1.5
2299
+ })) : _("", !0), x("h3", Pa, w(b.value), 1)]), x("div", Fa, [x("button", {
2300
+ class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)] tpl:hover:text-[var(--tpl-text)]",
2301
+ title: f(s).toolbar.duplicate,
2302
+ onClick: n[0] ||= (e) => a("duplicate")
2303
+ }, [p(f(pe), {
2304
+ size: 14,
2305
+ "stroke-width": 2
2306
+ })], 8, Ia), x("button", {
2307
+ class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
2308
+ title: f(s).toolbar.delete,
2309
+ onClick: n[1] ||= (e) => a("delete")
2310
+ }, [p(f(_e), {
2311
+ size: 14,
2312
+ "stroke-width": 2
2313
+ })], 8, La)])]), x("div", Ra, [m.value ? (o(), y(Ln, {
2314
+ key: 0,
2315
+ block: e.block,
2316
+ onUpdateFieldValues: n[2] ||= (e) => a("update", { fieldValues: e }),
2317
+ onUpdateDataSourceFetched: n[3] ||= (e) => a("update", { dataSourceFetched: e })
2318
+ }, null, 8, ["block"])) : d.value === "section" ? (o(), y(Zr, {
2319
+ key: 1,
2320
+ block: e.block,
2321
+ onUpdate: C
2322
+ }, null, 8, ["block"])) : d.value === "title" ? (o(), y(da, {
2323
+ key: 2,
2324
+ block: e.block,
2325
+ "font-families": f(S),
2326
+ onUpdate: C
2327
+ }, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (o(), y(Lr, {
2328
+ key: 3,
2329
+ block: e.block,
2330
+ onUpdate: C
2331
+ }, null, 8, ["block"])) : d.value === "image" ? (o(), y(xr, {
2332
+ key: 4,
2333
+ block: e.block,
2334
+ onUpdate: C
2335
+ }, null, 8, ["block"])) : d.value === "video" ? (o(), y(Aa, {
2336
+ key: 5,
2337
+ block: e.block,
2338
+ onUpdate: C
2339
+ }, null, 8, ["block"])) : d.value === "button" ? (o(), y(ot, {
2340
+ key: 6,
2341
+ block: e.block,
2342
+ "font-families": f(S),
2343
+ onUpdate: C
2344
+ }, null, 8, ["block", "font-families"])) : d.value === "divider" ? (o(), y(Un, {
2345
+ key: 7,
2346
+ block: e.block,
2347
+ onUpdate: C
2348
+ }, null, 8, ["block"])) : d.value === "social" ? (o(), y(gi, {
2349
+ key: 8,
2350
+ block: e.block,
2351
+ onUpdate: C
2352
+ }, null, 8, ["block"])) : d.value === "menu" ? (o(), y(Nr, {
2353
+ key: 9,
2354
+ block: e.block,
2355
+ "font-families": f(S),
2356
+ onUpdate: C
2357
+ }, null, 8, ["block", "font-families"])) : d.value === "table" ? (o(), y(Qi, {
2358
+ key: 10,
2359
+ block: e.block,
2360
+ "font-families": f(S),
2361
+ onUpdate: C
2362
+ }, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (o(), y(xi, {
2363
+ key: 11,
2364
+ block: e.block,
2365
+ onUpdate: C
2366
+ }, null, 8, ["block"])) : d.value === "html" ? (o(), y(qn, {
2367
+ key: 12,
2368
+ block: e.block,
2369
+ onUpdate: C
2370
+ }, null, 8, ["block"])) : d.value === "countdown" ? (o(), y(f(r), {
2371
+ key: 13,
2372
+ block: e.block,
2373
+ "font-families": f(S),
2374
+ onUpdate: C
2375
+ }, null, 8, ["block", "font-families"])) : _("", !0), p(Zt, {
2376
+ block: e.block,
2377
+ "is-first-section": d.value === "paragraph",
2378
+ onUpdate: C
2379
+ }, null, 8, ["block", "is-first-section"])])], 8, ja));
2380
+ }
2381
+ }), Ba = /* @__PURE__ */ e({ default: () => Va }), Va = /*#__PURE__*/ Ee(za, [["__scopeId", "data-v-1038bf62"]]);
2382
+ //#endregion
2383
+ export { Va as default, X as i, $ as n, Xn as r, Ba as t };
2384
+
2385
+ //# sourceMappingURL=Toolbar-dxDYwN5E.js.map