@templatical/editor 0.52.0 → 0.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/dist/{AiAltTextPopover-Cm11CsKH.js → AiAltTextPopover-DawbUywc.js} +13 -13
  2. package/dist/{AiAltTextReview-DE8t8Rud.js → AiAltTextReview-9ySsXOTU.js} +22 -22
  3. package/dist/{AiChatPanel-7ftS7d40.js → AiChatPanel-CupPhmsN.js} +137 -137
  4. package/dist/{AiPanels-CxGp6klr.js → AiPanels-DqT4PgQ0.js} +4 -4
  5. package/dist/{AiRewriteMenu-DNI-5CUj.js → AiRewriteMenu-28agTycW.js} +62 -62
  6. package/dist/BlockIssueBadge-BxpDy3u-.js +33 -0
  7. package/dist/{BlockPreviewCanvas-Df9iz7sK.js → BlockPreviewCanvas-B-4bmJ3t.js} +23 -23
  8. package/dist/{CloudHeaderExtras-CsgyNNV1.js → CloudHeaderExtras-QI82yF54.js} +3 -3
  9. package/dist/{CloudPanels-BDV4XQ_l.js → CloudPanels-BKJaLkUN.js} +50 -50
  10. package/dist/{CollaborationNotices-JQ3vQoqO.js → CollaborationNotices-CTw4JThq.js} +11 -11
  11. package/dist/{CollaboratorBar-EeqqWcX6.js → CollaboratorBar-CXQqN3VP.js} +15 -15
  12. package/dist/{CommentsPanel-BuftXc0U.js → CommentsPanel-DwwFuh1h.js} +2 -2
  13. package/dist/CommentsSidebar-9ZfiC2DO.js +500 -0
  14. package/dist/{CountdownBlock-BT3ZTH1F.js → CountdownBlock-CU2yTWtF.js} +20 -20
  15. package/dist/{CountdownToolbar-CrL4WKy9.js → CountdownToolbar-BqoYzf_6.js} +53 -53
  16. package/dist/IssuesPanel-4ykrf1ax.js +359 -0
  17. package/dist/{LoadingTrack-DZA5AoP9.js → LoadingTrack-DM4g6j7b.js} +1 -1
  18. package/dist/{LogicTagInsertButton-CSD9cfJB.js → LogicTagInsertButton-CfscnwCn.js} +234 -234
  19. package/dist/{MediaEditModal-DQl5w44r.js → MediaEditModal-Dy08GEwE.js} +446 -446
  20. package/dist/{MediaPanels-BFWYuJot.js → MediaPanels-BgEp7iCp.js} +2 -2
  21. package/dist/{MergeTagInput-DE7kWwXx.js → MergeTagInput-B9dtUthD.js} +11 -11
  22. package/dist/{MergeTagModeToggle-DvD0ne7N.js → MergeTagModeToggle-DxujhYJ4.js} +30 -30
  23. package/dist/{MergeTagTextarea-DVPQkiYY.js → MergeTagTextarea-CPFEjJZd.js} +11 -11
  24. package/dist/{ParagraphEditor-D-nqs82g.js → ParagraphEditor-CWXfurGh.js} +201 -201
  25. package/dist/{RestoreVersionDialog-DqUPsLB9.js → RestoreVersionDialog-C4s_JYCx.js} +14 -14
  26. package/dist/{RichTextEditorContent-Xq9D0Zs3.js → RichTextEditorContent-o6HmE8GR.js} +40 -39
  27. package/dist/{SaveBlockDialog-DAPv70p4.js → SaveBlockDialog-CWLrly6l.js} +56 -56
  28. package/dist/SavedBlocksBrowserModal-CE8n4EBS.js +359 -0
  29. package/dist/{SavedBlocksPanels-ChbL9v9x.js → SavedBlocksPanels-BE1N9rNZ.js} +6 -6
  30. package/dist/{SavedBlocksPickBar-hRaiLNdu.js → SavedBlocksPickBar-Dwl94xhP.js} +12 -12
  31. package/dist/{TemplateSettings-D0XcH32O.js → TemplateSettings-CS0f1Ues.js} +74 -74
  32. package/dist/{TestEmailModal-Cb5t0yB2.js → TestEmailModal-DBD0X5nV.js} +52 -52
  33. package/dist/{TestEmailPanel-COJQa2A9.js → TestEmailPanel-DaFjP9QK.js} +2 -2
  34. package/dist/{TitleEditor-BYk_9SpQ.js → TitleEditor-DSqtle77.js} +75 -75
  35. package/dist/{ToggleSwitch-poGWbduy.js → ToggleSwitch-JykPyD_8.js} +4 -4
  36. package/dist/{Toolbar-Dku_pZni.js → Toolbar-BZPFfKrf.js} +913 -913
  37. package/dist/{TplModal-9IndEYk5.js → TplModal-DLMssVlt.js} +15 -15
  38. package/dist/{VersionHistoryMenu-BG5qayvg.js → VersionHistoryMenu-BkbYUs0Q.js} +35 -35
  39. package/dist/{VersionHistoryPanels-hPg7Q5-f.js → VersionHistoryPanels-DP7HaYWv.js} +4 -4
  40. package/dist/{VersionPreviewBanner-CSs7zum_.js → VersionPreviewBanner-DECaBwLq.js} +9 -9
  41. package/dist/{WrapperBlock-DwjK_IdJ.js → WrapperBlock-BsJv_Fiw.js} +16 -16
  42. package/dist/{blockTypeIcons-yt7SLzub.js → blockTypeIcons-BHjlPnPf.js} +23 -22
  43. package/dist/bundle-stats.json +6 -6
  44. package/dist/cdn/chunks/{AiAltTextPopover-DjMoJCgU.js → AiAltTextPopover-SEEjkd-I.js} +21 -21
  45. package/dist/cdn/chunks/{AiAltTextPopover-DjMoJCgU.js.map → AiAltTextPopover-SEEjkd-I.js.map} +1 -1
  46. package/dist/cdn/chunks/{AiAltTextReview-BafAtBoA.js → AiAltTextReview-BGLLSKLm.js} +41 -41
  47. package/dist/cdn/chunks/{AiAltTextReview-BafAtBoA.js.map → AiAltTextReview-BGLLSKLm.js.map} +1 -1
  48. package/dist/cdn/chunks/{AiChatPanel-DXeZgc7D.js → AiChatPanel-DKDAaBNi.js} +127 -127
  49. package/dist/cdn/chunks/{AiChatPanel-DXeZgc7D.js.map → AiChatPanel-DKDAaBNi.js.map} +1 -1
  50. package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js → AiPanels-0wBarZSH.js} +3 -3
  51. package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js.map → AiPanels-0wBarZSH.js.map} +1 -1
  52. package/dist/cdn/chunks/{AiRewriteMenu-4F6vwhJ5.js → AiRewriteMenu-qf-cfEpy.js} +43 -43
  53. package/dist/cdn/chunks/{AiRewriteMenu-4F6vwhJ5.js.map → AiRewriteMenu-qf-cfEpy.js.map} +1 -1
  54. package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js +34 -0
  55. package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js.map +1 -0
  56. package/dist/cdn/chunks/{BlockPreviewCanvas-Ny1X_mee.js → BlockPreviewCanvas-DGBh6mqe.js} +20 -20
  57. package/dist/cdn/chunks/{BlockPreviewCanvas-Ny1X_mee.js.map → BlockPreviewCanvas-DGBh6mqe.js.map} +1 -1
  58. package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js → CloudHeaderExtras-BMNK_F9p.js} +3 -3
  59. package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js.map → CloudHeaderExtras-BMNK_F9p.js.map} +1 -1
  60. package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js → CloudPanels-JMWIoVWh.js} +32 -32
  61. package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js.map → CloudPanels-JMWIoVWh.js.map} +1 -1
  62. package/dist/cdn/chunks/{CollaborationNotices-Hf8r08Sw.js → CollaborationNotices-Bsf1rGW9.js} +12 -12
  63. package/dist/cdn/chunks/{CollaborationNotices-Hf8r08Sw.js.map → CollaborationNotices-Bsf1rGW9.js.map} +1 -1
  64. package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js → CollaboratorBar-CXByAoUz.js} +14 -14
  65. package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js.map → CollaboratorBar-CXByAoUz.js.map} +1 -1
  66. package/dist/cdn/chunks/{CommentsPanel-CAiwilM2.js → CommentsPanel-DoJnKLXI.js} +3 -3
  67. package/dist/cdn/chunks/{CommentsPanel-CAiwilM2.js.map → CommentsPanel-DoJnKLXI.js.map} +1 -1
  68. package/dist/cdn/chunks/{CommentsSidebar-Dj8sDiLN.js → CommentsSidebar-CUtgvdBC.js} +100 -99
  69. package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js.map +1 -0
  70. package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js → CountdownBlock-BqRw147R.js} +18 -18
  71. package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js.map → CountdownBlock-BqRw147R.js.map} +1 -1
  72. package/dist/cdn/chunks/{CountdownToolbar-CguFJdqn.js → CountdownToolbar-xobieKoU.js} +26 -26
  73. package/dist/cdn/chunks/{CountdownToolbar-CguFJdqn.js.map → CountdownToolbar-xobieKoU.js.map} +1 -1
  74. package/dist/cdn/chunks/{IssuesPanel-pr7_nuLI.js → IssuesPanel-C7LfxaAY.js} +75 -75
  75. package/dist/cdn/chunks/{IssuesPanel-pr7_nuLI.js.map → IssuesPanel-C7LfxaAY.js.map} +1 -1
  76. package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js → LoadingTrack-CZuLTazv.js} +2 -2
  77. package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js.map → LoadingTrack-CZuLTazv.js.map} +1 -1
  78. package/dist/cdn/chunks/{LogicTagInsertButton-B_ldj3TO.js → LogicTagInsertButton-BIi05UQu.js} +250 -250
  79. package/dist/cdn/chunks/{LogicTagInsertButton-B_ldj3TO.js.map → LogicTagInsertButton-BIi05UQu.js.map} +1 -1
  80. package/dist/cdn/chunks/{MediaEditModal-CGfzcHwP.js → MediaEditModal-Cpcod6_U.js} +148 -148
  81. package/dist/cdn/chunks/{MediaEditModal-CGfzcHwP.js.map → MediaEditModal-Cpcod6_U.js.map} +1 -1
  82. package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js → MediaPanels-BIdcW_1f.js} +3 -3
  83. package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js.map → MediaPanels-BIdcW_1f.js.map} +1 -1
  84. package/dist/cdn/chunks/{MergeTagInput-CFu9VXPS.js → MergeTagInput-BvWg8o5E.js} +32 -32
  85. package/dist/cdn/chunks/{MergeTagInput-CFu9VXPS.js.map → MergeTagInput-BvWg8o5E.js.map} +1 -1
  86. package/dist/cdn/chunks/{MergeTagModeToggle-BFpK5dxg.js → MergeTagModeToggle-BgKEVUtV.js} +27 -27
  87. package/dist/cdn/chunks/{MergeTagModeToggle-BFpK5dxg.js.map → MergeTagModeToggle-BgKEVUtV.js.map} +1 -1
  88. package/dist/cdn/chunks/{MergeTagTextarea-Zo0mYWbf.js → MergeTagTextarea-tBz8McZf.js} +32 -32
  89. package/dist/cdn/chunks/{MergeTagTextarea-Zo0mYWbf.js.map → MergeTagTextarea-tBz8McZf.js.map} +1 -1
  90. package/dist/cdn/chunks/{ParagraphEditor-DsPLVAgm.js → ParagraphEditor-B3Rj_cWF.js} +191 -191
  91. package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js.map +1 -0
  92. package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js → RestoreVersionDialog-CjOdD2xj.js} +19 -19
  93. package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js.map → RestoreVersionDialog-CjOdD2xj.js.map} +1 -1
  94. package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js → RichTextEditorContent-DNjR_sNN.js} +29 -29
  95. package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js.map → RichTextEditorContent-DNjR_sNN.js.map} +1 -1
  96. package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js → SaveBlockDialog-CUhpawq0.js} +75 -75
  97. package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js.map → SaveBlockDialog-CUhpawq0.js.map} +1 -1
  98. package/dist/cdn/chunks/SavedBlocksBrowserModal-BPYcRoGa.js +356 -0
  99. package/dist/cdn/chunks/{SavedBlocksBrowserModal-B9XCjDfm.js.map → SavedBlocksBrowserModal-BPYcRoGa.js.map} +1 -1
  100. package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js → SavedBlocksPanels-C6--Bc81.js} +3 -3
  101. package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js.map → SavedBlocksPanels-C6--Bc81.js.map} +1 -1
  102. package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js → SavedBlocksPickBar-DUavxpbU.js} +14 -14
  103. package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js.map → SavedBlocksPickBar-DUavxpbU.js.map} +1 -1
  104. package/dist/cdn/chunks/{TemplateSettings-jWpmuWDR.js → TemplateSettings-CKtI-dof.js} +69 -69
  105. package/dist/cdn/chunks/{TemplateSettings-jWpmuWDR.js.map → TemplateSettings-CKtI-dof.js.map} +1 -1
  106. package/dist/cdn/chunks/{TestEmailModal-DcwKhFnI.js → TestEmailModal-CDQTgESD.js} +65 -65
  107. package/dist/cdn/chunks/{TestEmailModal-DcwKhFnI.js.map → TestEmailModal-CDQTgESD.js.map} +1 -1
  108. package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js → TestEmailPanel-CcUpEpAn.js} +3 -3
  109. package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js.map → TestEmailPanel-CcUpEpAn.js.map} +1 -1
  110. package/dist/cdn/chunks/{TitleEditor-R2lQw6WA.js → TitleEditor-Cob7RLyK.js} +70 -70
  111. package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js.map +1 -0
  112. package/dist/cdn/chunks/{ToggleSwitch-BDMugNES.js → ToggleSwitch-J7Vwhvha.js} +5 -5
  113. package/dist/cdn/chunks/{ToggleSwitch-BDMugNES.js.map → ToggleSwitch-J7Vwhvha.js.map} +1 -1
  114. package/dist/cdn/chunks/{Toolbar-CnvfW72e.js → Toolbar-CdpsvNOR.js} +893 -893
  115. package/dist/cdn/chunks/{Toolbar-CnvfW72e.js.map → Toolbar-CdpsvNOR.js.map} +1 -1
  116. package/dist/cdn/chunks/TplModal-CFPDgbwQ.js +51 -0
  117. package/dist/cdn/chunks/{TplModal-BDyeS69p.js.map → TplModal-CFPDgbwQ.js.map} +1 -1
  118. package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js → VersionHistoryMenu-BYlLRvRJ.js} +32 -32
  119. package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js.map → VersionHistoryMenu-BYlLRvRJ.js.map} +1 -1
  120. package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js → VersionHistoryPanels-C6SOVoiT.js} +3 -3
  121. package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js.map → VersionHistoryPanels-C6SOVoiT.js.map} +1 -1
  122. package/dist/cdn/chunks/{VersionPreviewBanner-CZ--HOoa.js → VersionPreviewBanner-Dvg0ZfAW.js} +10 -10
  123. package/dist/cdn/chunks/{VersionPreviewBanner-CZ--HOoa.js.map → VersionPreviewBanner-Dvg0ZfAW.js.map} +1 -1
  124. package/dist/cdn/chunks/{WrapperBlock-D3obNGab.js → WrapperBlock-C7Md56IT.js} +13 -13
  125. package/dist/cdn/chunks/{WrapperBlock-D3obNGab.js.map → WrapperBlock-C7Md56IT.js.map} +1 -1
  126. package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js +21 -0
  127. package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js.map +1 -0
  128. package/dist/cdn/chunks/{createCloudRuntime-D6niZ2Rc.js → createCloudRuntime-Cth2JCEh.js} +36 -36
  129. package/dist/cdn/chunks/{createCloudRuntime-D6niZ2Rc.js.map → createCloudRuntime-Cth2JCEh.js.map} +1 -1
  130. package/dist/cdn/chunks/{dist-C2epoAwW.js → dist-8ym3y-pH.js} +43 -43
  131. package/dist/cdn/chunks/{dist-C2epoAwW.js.map → dist-8ym3y-pH.js.map} +1 -1
  132. package/dist/{dist-BA-jTQgw.js → cdn/chunks/dist-BMzNabtD.js} +106 -107
  133. package/dist/cdn/chunks/{dist-CONcGNwy.js.map → dist-BMzNabtD.js.map} +1 -1
  134. package/dist/cdn/chunks/{draggable-B8hTTYFO.js → draggable-Du8AUMFT.js} +639 -636
  135. package/dist/cdn/chunks/draggable-Du8AUMFT.js.map +1 -0
  136. package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js → editor-modal-CyCe560f.js} +891 -891
  137. package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js.map → editor-modal-CyCe560f.js.map} +1 -1
  138. package/dist/cdn/chunks/en-TIqv4ag3.js +1 -0
  139. package/dist/cdn/chunks/{extensions-ClDhn88e.js → extensions-CFF2KWy-.js} +55 -55
  140. package/dist/cdn/chunks/{extensions-ClDhn88e.js.map → extensions-CFF2KWy-.js.map} +1 -1
  141. package/dist/cdn/chunks/{icons-HCBP93Ch.js → icons-okSPsLOa.js} +99 -97
  142. package/dist/cdn/chunks/icons-okSPsLOa.js.map +1 -0
  143. package/dist/cdn/chunks/{keys-BF9gazbd.js → keys-CUj6UA38.js} +2 -2
  144. package/dist/cdn/chunks/{keys-BF9gazbd.js.map → keys-CUj6UA38.js.map} +1 -1
  145. package/dist/cdn/chunks/{liquid.browser-DkLBNrft.js → liquid.browser-rubac0VA.js} +782 -746
  146. package/dist/cdn/chunks/liquid.browser-rubac0VA.js.map +1 -0
  147. package/dist/cdn/chunks/{normalizeMergeTagMarkup-DpHCSESZ.js → normalizeMergeTagMarkup-C_KlfSW4.js} +2 -2
  148. package/dist/cdn/chunks/{normalizeMergeTagMarkup-DpHCSESZ.js.map → normalizeMergeTagMarkup-C_KlfSW4.js.map} +1 -1
  149. package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js → preRenderCustomBlocks-BcXIz7oJ.js} +2 -2
  150. package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js.map → preRenderCustomBlocks-BcXIz7oJ.js.map} +1 -1
  151. package/dist/cdn/chunks/{sanitizeHtml-B2h15u0_.js → sanitizeHtml-CN85EDrO.js} +2 -2
  152. package/dist/cdn/chunks/{sanitizeHtml-B2h15u0_.js.map → sanitizeHtml-CN85EDrO.js.map} +1 -1
  153. package/dist/cdn/chunks/{socialIcons-rJoqO1TJ.js → socialIcons-jsTDmkbb.js} +480 -480
  154. package/dist/cdn/chunks/{socialIcons-rJoqO1TJ.js.map → socialIcons-jsTDmkbb.js.map} +1 -1
  155. package/dist/cdn/chunks/{src-CUH_EI7k.js → src-C7bkofBL.js} +6 -6
  156. package/dist/cdn/chunks/{src-CUH_EI7k.js.map → src-C7bkofBL.js.map} +1 -1
  157. package/dist/cdn/chunks/{src-BKpAis_q.js → src-DEd87i_U.js} +2 -2
  158. package/dist/cdn/chunks/{src-BKpAis_q.js.map → src-DEd87i_U.js.map} +1 -1
  159. package/dist/cdn/chunks/{src-C9DTvn1H.js → src-DwWrYnUj.js} +3 -22
  160. package/dist/cdn/chunks/src-DwWrYnUj.js.map +1 -0
  161. package/dist/cdn/chunks/{tiptap-ChSZybTi.js → tiptap-CbiTlECY.js} +45 -45
  162. package/dist/cdn/chunks/{tiptap-ChSZybTi.js.map → tiptap-CbiTlECY.js.map} +1 -1
  163. package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js → useCloudI18n-DY8_-ETE.js} +3 -3
  164. package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js.map → useCloudI18n-DY8_-ETE.js.map} +1 -1
  165. package/dist/cdn/chunks/useEditorCore-BrY66C2y.js +2582 -0
  166. package/dist/cdn/chunks/useEditorCore-BrY66C2y.js.map +1 -0
  167. package/dist/cdn/chunks/useEditorRoot-vjZJwKrV.js +9 -0
  168. package/dist/cdn/chunks/{useEditorRoot-BT3c9CXj.js.map → useEditorRoot-vjZJwKrV.js.map} +1 -1
  169. package/dist/cdn/chunks/{useI18n-11iqzC6m.js → useI18n-D8pY4LTq.js} +3 -3
  170. package/dist/cdn/chunks/{useI18n-11iqzC6m.js.map → useI18n-D8pY4LTq.js.map} +1 -1
  171. package/dist/{useLogicTag-DFDYJeMN.js → cdn/chunks/useLogicTag-DBJDtpKA.js} +5 -3
  172. package/dist/cdn/chunks/{useLogicTag-vy5KGg5D.js.map → useLogicTag-DBJDtpKA.js.map} +1 -1
  173. package/dist/{useMergeTag-B46vACAG.js → cdn/chunks/useMergeTag-B-aG--s1.js} +7 -5
  174. package/dist/cdn/chunks/{useMergeTag-BFBBjnwh.js.map → useMergeTag-B-aG--s1.js.map} +1 -1
  175. package/dist/cdn/chunks/{usePopoverPosition-AnVIwiVv.js → usePopoverPosition-DSMtmu2W.js} +4 -4
  176. package/dist/cdn/chunks/{usePopoverPosition-AnVIwiVv.js.map → usePopoverPosition-DSMtmu2W.js.map} +1 -1
  177. package/dist/cdn/chunks/{useScrollToBlock-C0dawxGr.js → useScrollToBlock-vjQ0fe-L.js} +3 -3
  178. package/dist/cdn/chunks/{useScrollToBlock-C0dawxGr.js.map → useScrollToBlock-vjQ0fe-L.js.map} +1 -1
  179. package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js → withCurrentFont-hZTvYBHO.js} +2 -2
  180. package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js.map → withCurrentFont-hZTvYBHO.js.map} +1 -1
  181. package/dist/cdn/editor.css +1 -1
  182. package/dist/cdn/editor.js +1422 -1422
  183. package/dist/cdn/editor.js.map +1 -1
  184. package/dist/{check-N3x4z_rH.js → check-BZ8o0eet.js} +1 -1
  185. package/dist/{chevron-down-gXu9qNwO.js → chevron-down-DfAAfILv.js} +1 -1
  186. package/dist/{chevron-right-rL0ayGk5.js → chevron-right-Bk4mGdr7.js} +1 -1
  187. package/dist/{chevron-up-0ugh8HnW.js → chevron-up-MhUf_azW.js} +1 -1
  188. package/dist/{circle-alert-B9Ls75B5.js → circle-alert-CShJwVFv.js} +1 -1
  189. package/dist/{clock-BqHBaCLm.js → clock-CTfD6OCt.js} +1 -1
  190. package/dist/{createCloudRuntime-B5VIdnwz.js → createCloudRuntime-DCgO4A1r.js} +24 -24
  191. package/dist/{createLucideIcon-BV7Gwz_Z.js → createLucideIcon-CvhTA2KG.js} +6 -6
  192. package/dist/{cdn/chunks/dist-CONcGNwy.js → dist-ByCWA2Tv.js} +100 -99
  193. package/dist/{dist-CzrLYq2s.js → dist-CKi_npZM.js} +2 -21
  194. package/dist/{dist-CEdyyDn7.js → dist-CVy-7PHQ.js} +54 -54
  195. package/dist/{dist-DDN7yR-w.js → dist-D6cMdrfG.js} +129 -129
  196. package/dist/{editor-modal-Du9VI9q4.js → editor-modal-zaZHcmlO.js} +812 -812
  197. package/dist/en-Db76vJbY.js +1 -0
  198. package/dist/{extensions-FRYhx7qa.js → extensions-fo_c-vqf.js} +32 -32
  199. package/dist/{eye-BKj9Tfnc.js → eye-7W4t5e0Q.js} +1 -1
  200. package/dist/{image-DNdvdTla.js → image-BDiRFzSd.js} +1 -1
  201. package/dist/{info-Bx-kBkbH.js → info-Cxi3-Kh9.js} +1 -1
  202. package/dist/{keys-DBjrQkYH.js → keys-BgRERHzu.js} +1 -1
  203. package/dist/{link-D8-rYdIQ.js → link-ju_2Cmir.js} +1 -1
  204. package/dist/{liquid.browser-D1RxawkY.js → liquid.browser-DUXEekoN.js} +781 -745
  205. package/dist/{list-BneisA27.js → list-DYZJf0aZ.js} +1 -1
  206. package/dist/{loader-circle-DBEXphyx.js → loader-circle-BZRD0a4I.js} +1 -1
  207. package/dist/{message-circle-Bg4xInCM.js → message-circle-DuEw4Zfx.js} +1 -1
  208. package/dist/{normalizeMergeTagMarkup-IH8COHzd.js → normalizeMergeTagMarkup-CELnOlgK.js} +1 -1
  209. package/dist/{package-B40Vkfsp.js → package-CePMr2kK.js} +1 -1
  210. package/dist/{pencil-CYdAHTds.js → pencil-D3aFCL7c.js} +1 -1
  211. package/dist/{preRenderCustomBlocks-AbZArwkR.js → preRenderCustomBlocks--_xc0XK3.js} +1 -1
  212. package/dist/{refresh-cw-Bb1FWrU0.js → refresh-cw-xnro7_Sk.js} +1 -1
  213. package/dist/{runtime-dom.esm-bundler-CLGymEyk.js → runtime-dom.esm-bundler-BURR-bj5.js} +118 -118
  214. package/dist/{sanitizeHtml-CnOA1efV.js → sanitizeHtml-BzfzpYJY.js} +1 -1
  215. package/dist/{search-BZEo08gi.js → search-CDrstRBv.js} +1 -1
  216. package/dist/{send-DHtrnXQs.js → send-DROkPOaX.js} +1 -1
  217. package/dist/{smartphone-dlN3vpA3.js → smartphone-Bx6u_tjn.js} +1 -1
  218. package/dist/{socialIcons-B_d52_eS.js → socialIcons-D7MGsg0d.js} +366 -366
  219. package/dist/{sparkles-NOttoDnJ.js → sparkles-CdaTtvoz.js} +1 -1
  220. package/dist/{square-B1CJgdt2.js → square-BbCROH_f.js} +1 -1
  221. package/dist/style.css +1 -1
  222. package/dist/templatical-editor.js +1096 -1096
  223. package/dist/{text-align-start-zpoXmb-Z.js → text-align-start-CGacJ9Vw.js} +1 -1
  224. package/dist/{trash-CGbk4Sgt.js → trash-DxCd7zIy.js} +1 -1
  225. package/dist/{triangle-alert-CKLMyGVp.js → triangle-alert-7_oaitpf.js} +1 -1
  226. package/dist/{upload-DQoackAn.js → upload-DuFEOi_0.js} +1 -1
  227. package/dist/{useCloudI18n-DcLtxOQZ.js → useCloudI18n-DEMmUKuO.js} +2 -2
  228. package/dist/{useEditorCore-DG9UvWUm.js → useEditorCore-BSo2sSID.js} +1518 -1470
  229. package/dist/useEditorRoot-BMcoCLBx.js +7 -0
  230. package/dist/{useI18n-CeTm777E.js → useI18n-BBrHTdu8.js} +2 -2
  231. package/dist/{cdn/chunks/useLogicTag-vy5KGg5D.js → useLogicTag-ZPC39rfH.js} +3 -5
  232. package/dist/{cdn/chunks/useMergeTag-BFBBjnwh.js → useMergeTag-BQ4qqWpQ.js} +5 -7
  233. package/dist/{usePopoverPosition-C42kD7zt.js → usePopoverPosition-DV1PxL66.js} +3 -3
  234. package/dist/{useScrollToBlock-C-NzvjeO.js → useScrollToBlock-BSyAV4pk.js} +3 -3
  235. package/dist/{vue.runtime.esm-bundler-CrlI8j5R.js → vue.runtime.esm-bundler-CnEeTfhs.js} +993 -990
  236. package/dist/{withCurrentFont-v_a4Oso8.js → withCurrentFont-B22FXAF5.js} +1 -1
  237. package/dist/{x-zcrnmcmU.js → x-BpfG7v9g.js} +1 -1
  238. package/package.json +10 -10
  239. package/dist/BlockIssueBadge-6Ri2FfX-.js +0 -33
  240. package/dist/CommentsSidebar-Co3x4uH0.js +0 -499
  241. package/dist/IssuesPanel-BHFQ3wrP.js +0 -359
  242. package/dist/SavedBlocksBrowserModal-SRtN5h9q.js +0 -359
  243. package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js +0 -34
  244. package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js.map +0 -1
  245. package/dist/cdn/chunks/CommentsSidebar-Dj8sDiLN.js.map +0 -1
  246. package/dist/cdn/chunks/ParagraphEditor-DsPLVAgm.js.map +0 -1
  247. package/dist/cdn/chunks/SavedBlocksBrowserModal-B9XCjDfm.js +0 -356
  248. package/dist/cdn/chunks/TitleEditor-R2lQw6WA.js.map +0 -1
  249. package/dist/cdn/chunks/TplModal-BDyeS69p.js +0 -51
  250. package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js +0 -21
  251. package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js.map +0 -1
  252. package/dist/cdn/chunks/draggable-B8hTTYFO.js.map +0 -1
  253. package/dist/cdn/chunks/en-CKAXAo3Z.js +0 -1
  254. package/dist/cdn/chunks/icons-HCBP93Ch.js.map +0 -1
  255. package/dist/cdn/chunks/liquid.browser-DkLBNrft.js.map +0 -1
  256. package/dist/cdn/chunks/src-C9DTvn1H.js.map +0 -1
  257. package/dist/cdn/chunks/useEditorCore-CjaEV_01.js +0 -2534
  258. package/dist/cdn/chunks/useEditorCore-CjaEV_01.js.map +0 -1
  259. package/dist/cdn/chunks/useEditorRoot-BT3c9CXj.js +0 -9
  260. package/dist/en-CyEE7FPY.js +0 -1
  261. package/dist/useEditorRoot-BKr6nNkC.js +0 -7
@@ -1,12 +1,12 @@
1
- import { At as e, C as t, G as n, Mt as r, O as i, Q as a, U as o, X as s, Y as c, Z as l, _ as u, c as d, et as f, f as p, g as m, it as h, j as g, jt as _, ot as v, r as y, st as b, y as x, z as S } from "./vue.runtime.esm-bundler-CrlI8j5R.js";
2
- import { Ot as C, S as w, St as T, U as E, X as D, Y as O, _ as k, b as A, f as j, ft as M, g as N, it as P, k as F, l as I, m as L, p as R, ut as z, v as ee, vt as B, w as V, x as te, y as H } from "./dist-CzrLYq2s.js";
3
- import { r as U } from "./dist-BA-jTQgw.js";
4
- import { L as W, P as ne, c as re, x as G } from "./keys-DBjrQkYH.js";
5
- import { t as ie } from "./useI18n-CeTm777E.js";
6
- import { o as ae, s as K } from "./usePopoverPosition-C42kD7zt.js";
7
- import { t as q } from "./createLucideIcon-BV7Gwz_Z.js";
8
- import { t as oe } from "./upload-DQoackAn.js";
9
- import { t as se } from "./loader-circle-DBEXphyx.js";
1
+ import { $ as e, C as t, K as n, Mt as r, Nt as i, O as a, Q as o, W as s, X as c, Z as l, _ as u, at as d, c as f, ct as p, f as m, g as h, j as g, jt as _, r as v, st as y, tt as b, y as x, z as S } from "./vue.runtime.esm-bundler-CnEeTfhs.js";
2
+ import { Ot as C, S as w, St as T, U as E, X as D, Y as O, _ as k, b as A, f as j, ft as M, g as N, it as P, k as F, l as I, m as L, p as R, ut as z, v as ee, vt as B, w as V, x as te, y as H } from "./dist-CKi_npZM.js";
3
+ import { r as U } from "./dist-ByCWA2Tv.js";
4
+ import { L as W, P as ne, c as re, x as G } from "./keys-BgRERHzu.js";
5
+ import { t as ie } from "./useI18n-BBrHTdu8.js";
6
+ import { o as ae, s as K } from "./usePopoverPosition-DV1PxL66.js";
7
+ import { t as q } from "./createLucideIcon-CvhTA2KG.js";
8
+ import { t as oe } from "./upload-DuFEOi_0.js";
9
+ import { t as se } from "./loader-circle-BZRD0a4I.js";
10
10
  // ../core/dist/index.js
11
11
  function J(e) {
12
12
  return e instanceof Error ? e : Error(String(e), { cause: e });
@@ -18,12 +18,12 @@ function Y(e, t) {
18
18
  e?.(J(t));
19
19
  }
20
20
  }
21
- function ce(e) {
22
- let t = e.content ?? F(e.defaultFontFamily, e.templateDefaults);
23
- H(t), A(t);
24
- let n = s({
21
+ function ce(t) {
22
+ let n = t.content ?? F(t.defaultFontFamily, t.templateDefaults);
23
+ H(n), A(n);
24
+ let r = l({
25
25
  template: null,
26
- content: t,
26
+ content: n,
27
27
  selectedBlockId: null,
28
28
  viewport: "desktop",
29
29
  darkMode: !1,
@@ -32,16 +32,16 @@ function ce(e) {
32
32
  isSaving: !1,
33
33
  isLoading: !1,
34
34
  uiTheme: "auto"
35
- }), r = a(0), i = 0, c = 0;
35
+ }), i = e(0), a = 0, c = 0;
36
36
  function u() {
37
- n.isDirty = !0, c++;
37
+ r.isDirty = !0, c++;
38
38
  }
39
- let d = o({
40
- get: () => n.content,
39
+ let d = s({
40
+ get: () => r.content,
41
41
  set: (e) => {
42
- n.content = e, u();
42
+ r.content = e, u();
43
43
  }
44
- }), f = o(() => n.selectedBlockId ? p(n.content.blocks, n.selectedBlockId) : null);
44
+ }), f = s(() => r.selectedBlockId ? p(r.content.blocks, r.selectedBlockId) : null);
45
45
  function p(e, t) {
46
46
  for (let n of e) {
47
47
  if (n.id === t) return n;
@@ -70,94 +70,94 @@ function ce(e) {
70
70
  }
71
71
  return null;
72
72
  }
73
- function g(t) {
74
- return e.lockedBlocks?.value.has(t) ?? !1;
73
+ function g(e) {
74
+ return t.lockedBlocks?.value.has(e) ?? !1;
75
75
  }
76
76
  function _(e) {
77
- let t = h(n.content.blocks, e);
77
+ let t = h(r.content.blocks, e);
78
78
  if (!t) return null;
79
- let r = t.blocks.findIndex((t) => t.id === e);
80
- return r === -1 ? null : {
79
+ let n = t.blocks.findIndex((t) => t.id === e);
80
+ return n === -1 ? null : {
81
81
  targetSectionId: t.sectionId,
82
82
  columnIndex: t.columnIndex,
83
- index: r
83
+ index: n
84
84
  };
85
85
  }
86
86
  function v(e, t = !0) {
87
- H(e), A(e), n.content = e, t && u();
87
+ H(e), A(e), r.content = e, t && u();
88
88
  }
89
89
  function y(e) {
90
- e && g(e) || (n.selectedBlockId = e);
90
+ e && g(e) || (r.selectedBlockId = e);
91
91
  }
92
92
  function b(e) {
93
- n.viewport = e;
93
+ r.viewport = e;
94
94
  }
95
95
  function x(e) {
96
- n.darkMode = e;
96
+ r.darkMode = e;
97
97
  }
98
98
  function S(e) {
99
- n.uiTheme = e;
99
+ r.uiTheme = e;
100
100
  }
101
101
  function C(e) {
102
- n.previewMode = e, e && (n.selectedBlockId = null);
102
+ r.previewMode = e, e && (r.selectedBlockId = null);
103
103
  }
104
104
  function w(e, t) {
105
105
  if (g(e)) return;
106
- let r = p(n.content.blocks, e);
107
- r && (Object.assign(r, t), u());
106
+ let n = p(r.content.blocks, e);
107
+ n && (Object.assign(n, t), u());
108
108
  }
109
109
  function T(e) {
110
- n.content.settings = {
111
- ...n.content.settings,
110
+ r.content.settings = {
111
+ ...r.content.settings,
112
112
  ...e
113
113
  }, u();
114
114
  }
115
- function E(e, t, r = 0, i) {
115
+ function E(e, t, n = 0, i) {
116
116
  let a = {
117
- settings: n.content.settings,
117
+ settings: r.content.settings,
118
118
  blocks: [e]
119
119
  };
120
120
  if (H(a), A(a), !(t && e.type === "section")) {
121
121
  if (t) {
122
122
  if (g(t)) return;
123
- let a = p(n.content.blocks, t);
123
+ let a = p(r.content.blocks, t);
124
124
  if (a && a.type === "section") {
125
- if (r < 0 || r >= D(a.columns)) return;
126
- a.children[r] = a.children[r] || [];
127
- let t = a.children[r];
125
+ if (n < 0 || n >= D(a.columns)) return;
126
+ a.children[n] = a.children[n] || [];
127
+ let t = a.children[n];
128
128
  i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
129
129
  }
130
- } else i !== void 0 && i < n.content.blocks.length ? n.content.blocks.splice(i, 0, e) : n.content.blocks.push(e);
130
+ } else i !== void 0 && i < r.content.blocks.length ? r.content.blocks.splice(i, 0, e) : r.content.blocks.push(e);
131
131
  u();
132
132
  }
133
133
  }
134
134
  function O(e) {
135
135
  if (g(e)) return;
136
- let t = h(n.content.blocks, e);
136
+ let t = h(r.content.blocks, e);
137
137
  if (t) {
138
- let r = t.blocks.findIndex((t) => t.id === e);
139
- if (r !== -1) {
140
- let [e] = t.blocks.splice(r, 1);
141
- if (n.selectedBlockId) {
138
+ let n = t.blocks.findIndex((t) => t.id === e);
139
+ if (n !== -1) {
140
+ let [e] = t.blocks.splice(n, 1);
141
+ if (r.selectedBlockId) {
142
142
  let t = /* @__PURE__ */ new Set();
143
- m(e, t), t.has(n.selectedBlockId) && (n.selectedBlockId = null);
143
+ m(e, t), t.has(r.selectedBlockId) && (r.selectedBlockId = null);
144
144
  }
145
145
  u();
146
146
  }
147
147
  }
148
148
  }
149
- function k(e, t, r, i = 0) {
150
- if (g(e) || r && g(r)) return;
151
- let a = h(n.content.blocks, e);
149
+ function k(e, t, n, i = 0) {
150
+ if (g(e) || n && g(n)) return;
151
+ let a = h(r.content.blocks, e);
152
152
  if (!a) return;
153
153
  let o = a.blocks.findIndex((t) => t.id === e);
154
- if (o === -1 || r && a.blocks[o].type === "section") return;
154
+ if (o === -1 || n && a.blocks[o].type === "section") return;
155
155
  let s;
156
- if (r) {
157
- let e = p(n.content.blocks, r);
156
+ if (n) {
157
+ let e = p(r.content.blocks, n);
158
158
  if (!e || e.type !== "section" || i < 0 || i >= D(e.columns)) return;
159
159
  e.children[i] = e.children[i] || [], s = e.children[i];
160
- } else s = n.content.blocks;
160
+ } else s = r.content.blocks;
161
161
  let [c] = a.blocks.splice(o, 1);
162
162
  s.splice(t, 0, c), u();
163
163
  }
@@ -167,84 +167,84 @@ function ce(e) {
167
167
  function M(e, t) {
168
168
  throw new L(`[Templatical] Templates: ${e} ${t}`);
169
169
  }
170
- function N(t) {
171
- Y(e.onError, t);
170
+ function N(e) {
171
+ Y(t.onError, e);
172
172
  }
173
- function P(t) {
174
- let { templates: n } = e;
175
- return n || M(t, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
173
+ function P(e) {
174
+ let { templates: n } = t;
175
+ return n || M(e, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
176
176
  }
177
177
  function I(e) {
178
- n.template && (n.template = {
179
- ...n.template,
178
+ r.template && (r.template = {
179
+ ...r.template,
180
180
  name: e
181
181
  }, u());
182
182
  }
183
- async function R(t) {
184
- let a = P("create()"), { create: o } = a;
183
+ async function R(e) {
184
+ let n = P("create()"), { create: o } = n;
185
185
  typeof o != "function" && M("create()", "is disabled by the provider — its `create` is `false`.");
186
- let s, l = ++i;
187
- n.isLoading = !0;
186
+ let s, l = ++a;
187
+ r.isLoading = !0;
188
188
  try {
189
- t?.content && (n.content = t.content);
190
- let e = c;
191
- s = await o(t?.name === void 0 ? { content: n.content } : {
192
- name: t.name,
193
- content: n.content
194
- }), n.template = s, c === e && (n.isDirty = !1), r.value++;
195
- } catch (t) {
196
- throw e.onError?.(t), t;
189
+ e?.content && (r.content = e.content);
190
+ let t = c;
191
+ s = await o(e?.name === void 0 ? { content: r.content } : {
192
+ name: e.name,
193
+ content: r.content
194
+ }), r.template = s, c === t && (r.isDirty = !1), i.value++;
195
+ } catch (e) {
196
+ throw t.onError?.(e), e;
197
197
  } finally {
198
- i === l && (n.isLoading = !1);
198
+ a === l && (r.isLoading = !1);
199
199
  }
200
- return N(() => a.onCreated?.(s)), s;
200
+ return N(() => n.onCreated?.(s)), s;
201
201
  }
202
- async function z(t, a) {
203
- let o = P("load()"), s, c = ++i;
204
- n.isLoading = !0;
202
+ async function z(e, n) {
203
+ let o = P("load()"), s, c = ++a;
204
+ r.isLoading = !0;
205
205
  try {
206
- if (s = await o.load(t), H(s.content), A(s.content), a && !a()) return s;
207
- n.template = s, n.content = s.content, n.isDirty = !1, r.value++;
208
- } catch (t) {
209
- throw e.onError?.(t), t;
206
+ if (s = await o.load(e), H(s.content), A(s.content), n && !n()) return s;
207
+ r.template = s, r.content = s.content, r.isDirty = !1, i.value++;
208
+ } catch (e) {
209
+ throw t.onError?.(e), e;
210
210
  } finally {
211
- i === c && (n.isLoading = !1);
211
+ a === c && (r.isLoading = !1);
212
212
  }
213
213
  return N(() => o.onLoaded?.(s)), s;
214
214
  }
215
- async function ee(t = "api") {
216
- let r = P("save()"), { save: i } = r;
215
+ async function ee(e = "api") {
216
+ let n = P("save()"), { save: i } = n;
217
217
  typeof i != "function" && M("save()", "is disabled by the provider — its `save` is `false`.");
218
- let a = n.template;
218
+ let a = r.template;
219
219
  a || M("save()", "has no template loaded. Call create() or load() first.");
220
- let o = a.name === void 0 ? { content: n.content } : {
220
+ let o = a.name === void 0 ? { content: r.content } : {
221
221
  name: a.name,
222
- content: n.content
222
+ content: r.content
223
223
  }, s;
224
- n.isSaving = !0;
224
+ r.isSaving = !0;
225
225
  try {
226
226
  let e = c;
227
- if (s = await i(a.id, o), n.template?.id === a.id) {
228
- let e = n.template.name;
229
- n.template = e === a.name ? s : {
227
+ if (s = await i(a.id, o), r.template?.id === a.id) {
228
+ let e = r.template.name;
229
+ r.template = e === a.name ? s : {
230
230
  ...s,
231
231
  name: e
232
232
  };
233
233
  }
234
- c === e && (n.isDirty = !1);
235
- } catch (t) {
236
- throw e.onError?.(t), t;
234
+ c === e && (r.isDirty = !1);
235
+ } catch (e) {
236
+ throw t.onError?.(e), e;
237
237
  } finally {
238
- n.isSaving = !1;
238
+ r.isSaving = !1;
239
239
  }
240
- return N(() => r.onSaved?.(s, { trigger: t })), s;
240
+ return N(() => n.onSaved?.(s, { trigger: e })), s;
241
241
  }
242
242
  function B() {
243
- return n.template?.id !== void 0;
243
+ return r.template?.id !== void 0;
244
244
  }
245
245
  return {
246
- state: l(n),
247
- loadVersion: l(r),
246
+ state: o(r),
247
+ loadVersion: o(i),
248
248
  content: d,
249
249
  selectedBlock: f,
250
250
  isBlockLocked: g,
@@ -269,24 +269,24 @@ function ce(e) {
269
269
  };
270
270
  }
271
271
  var le = 50, ue = 300, de = 1500;
272
- function fe(e) {
273
- let { content: t, setContent: n, maxSize: r = le } = e, i = a([]), s = a([]), c = a(!1), l = null, u = null, d = o(() => i.value.length > 0), f = o(() => s.value.length > 0);
272
+ function fe(t) {
273
+ let { content: n, setContent: r, maxSize: i = le } = t, a = e([]), o = e([]), c = e(!1), l = null, u = null, d = s(() => a.value.length > 0), f = s(() => o.value.length > 0);
274
274
  function p() {
275
- return T(t.value);
275
+ return T(n.value);
276
276
  }
277
277
  function m(e) {
278
- i.value.push(e), i.value.length > r && i.value.splice(0, i.value.length - r);
278
+ a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
279
279
  }
280
280
  function h() {
281
281
  u &&= (clearTimeout(u.timeoutId), null);
282
282
  }
283
283
  function g() {
284
- h(), m(p()), s.value = [];
284
+ h(), m(p()), o.value = [];
285
285
  }
286
286
  function _(e) {
287
287
  u && u.blockId === e ? (clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
288
288
  u = null;
289
- }, ue)) : (h(), m(p()), s.value = [], u = {
289
+ }, ue)) : (h(), m(p()), o.value = [], u = {
290
290
  blockId: e,
291
291
  timeoutId: setTimeout(() => {
292
292
  u = null;
@@ -299,19 +299,19 @@ function fe(e) {
299
299
  }, de);
300
300
  }
301
301
  function y() {
302
- if (i.value.length === 0) return;
302
+ if (a.value.length === 0) return;
303
303
  h();
304
- let e = i.value.pop();
305
- s.value.push(p()), n(e, !0), v();
304
+ let e = a.value.pop();
305
+ o.value.push(p()), r(e, !0), v();
306
306
  }
307
307
  function b() {
308
- if (s.value.length === 0) return;
308
+ if (o.value.length === 0) return;
309
309
  h();
310
- let e = s.value.pop();
311
- i.value.push(p()), n(e, !0), v();
310
+ let e = o.value.pop();
311
+ a.value.push(p()), r(e, !0), v();
312
312
  }
313
313
  function x() {
314
- i.value = [], s.value = [], h();
314
+ a.value = [], o.value = [], h();
315
315
  }
316
316
  function S() {
317
317
  x(), l &&= (clearTimeout(l), null);
@@ -374,27 +374,27 @@ function me(e) {
374
374
  function f() {
375
375
  d(), n() && r(JSON.parse(JSON.stringify(t.value)));
376
376
  }
377
- function p() {
377
+ function m() {
378
378
  c() && !s && (d(), o = setTimeout(() => {
379
379
  o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
380
380
  }, i));
381
381
  }
382
- let m = b(t, () => {
383
- p();
382
+ let h = p(t, () => {
383
+ m();
384
384
  }, { deep: !0 });
385
- function h() {
386
- m(), d();
385
+ function g() {
386
+ h(), d();
387
387
  }
388
388
  return {
389
389
  flush: f,
390
390
  cancel: d,
391
391
  pause: l,
392
392
  resume: u,
393
- destroy: h
393
+ destroy: g
394
394
  };
395
395
  }
396
396
  function he(e) {
397
- let t = s(/* @__PURE__ */ new Set()), n = o(() => t.size > 0);
397
+ let t = l(/* @__PURE__ */ new Set()), n = s(() => t.size > 0);
398
398
  function r(e) {
399
399
  return t.has(e);
400
400
  }
@@ -411,34 +411,34 @@ function he(e) {
411
411
  hasHiddenBlocks: n
412
412
  };
413
413
  }
414
- function ge(e) {
415
- let t = a(!1), n = a(!1), r = o(() => !!e.definition.value?.dataSource), i = o(() => r.value && !e.block.value.dataSourceFetched);
416
- async function s() {
417
- let r = e.definition.value;
418
- if (r?.dataSource) {
419
- t.value = !0, n.value = !1;
414
+ function ge(t) {
415
+ let n = e(!1), r = e(!1), i = s(() => !!t.definition.value?.dataSource), a = s(() => i.value && !t.block.value.dataSourceFetched);
416
+ async function o() {
417
+ let e = t.definition.value;
418
+ if (e?.dataSource) {
419
+ n.value = !0, r.value = !1;
420
420
  try {
421
- let t = await r.dataSource.onFetch({
422
- fieldValues: { ...e.block.value.fieldValues },
423
- blockId: e.block.value.id
421
+ let n = await e.dataSource.onFetch({
422
+ fieldValues: { ...t.block.value.fieldValues },
423
+ blockId: t.block.value.id
424
424
  });
425
- if (t == null) return;
426
- let n = { ...e.block.value.fieldValues };
427
- for (let e of Object.keys(n)) e in t && (n[e] = t[e]);
428
- e.onUpdate(n, !0);
425
+ if (n == null) return;
426
+ let r = { ...t.block.value.fieldValues };
427
+ for (let e of Object.keys(r)) e in n && (r[e] = n[e]);
428
+ t.onUpdate(r, !0);
429
429
  } catch (e) {
430
- console.warn("[Templatical] Data source fetch error:", e), n.value = !0;
430
+ console.warn("[Templatical] Data source fetch error:", e), r.value = !0;
431
431
  } finally {
432
- t.value = !1;
432
+ n.value = !1;
433
433
  }
434
434
  }
435
435
  }
436
436
  return {
437
- isFetching: t,
438
- fetchError: n,
439
- fetch: s,
440
- hasDataSource: r,
441
- needsFetch: i
437
+ isFetching: n,
438
+ fetchError: r,
439
+ fetch: o,
440
+ hasDataSource: i,
441
+ needsFetch: a
442
442
  };
443
443
  }
444
444
  function _e(e, t) {
@@ -646,13 +646,13 @@ function Le(e) {
646
646
  return n;
647
647
  });
648
648
  }
649
- function Re(e) {
650
- let { provider: t } = e, r = e.sessionId ?? crypto.randomUUID(), i = e.maxUndo ?? ke, s = typeof t.acquireLock == "function" && typeof t.renewLock == "function" && typeof t.releaseLock == "function", l = f([]), u = f(/* @__PURE__ */ new Map()), d = a(null), p = a(0), m = a(0), h = null, g = null, _ = !1, v = !1, y = !1, x = null, S = 0, C = !1, w = [], D = null, O = null, A = Promise.resolve(), j = null, M = o(() => (m.value, (g?.undo.length ?? 0) > 0)), N = o(() => (m.value, (g?.redo.length ?? 0) > 0));
651
- function F(t) {
652
- e.onError?.(t instanceof Error ? t : Error(String(t)));
649
+ function Re(t) {
650
+ let { provider: r } = t, i = t.sessionId ?? crypto.randomUUID(), a = t.maxUndo ?? ke, o = typeof r.acquireLock == "function" && typeof r.renewLock == "function" && typeof r.releaseLock == "function", l = b([]), u = b(/* @__PURE__ */ new Map()), d = e(null), f = e(0), m = e(0), h = null, g = null, _ = !1, v = !1, y = !1, x = null, S = 0, C = !1, w = [], D = null, O = null, A = Promise.resolve(), j = null, M = s(() => (m.value, (g?.undo.length ?? 0) > 0)), N = s(() => (m.value, (g?.redo.length ?? 0) > 0));
651
+ function F(e) {
652
+ t.onError?.(e instanceof Error ? e : Error(String(e)));
653
653
  }
654
- function L(t, n = g) {
655
- n !== g || C || e.onNotice?.(t);
654
+ function L(e, n = g) {
655
+ n !== g || C || t.onNotice?.(e);
656
656
  }
657
657
  function R() {
658
658
  return {
@@ -660,14 +660,14 @@ function Re(e) {
660
660
  blockId: e.blockId,
661
661
  sessionId: e.holder.sessionId
662
662
  })),
663
- session: r
663
+ session: i
664
664
  };
665
665
  }
666
666
  function z() {
667
667
  m.value++;
668
668
  }
669
669
  function B(e, t) {
670
- e.push(t), e.length > i && e.splice(0, e.length - i);
670
+ e.push(t), e.length > a && e.splice(0, e.length - a);
671
671
  }
672
672
  function V(e) {
673
673
  if (!h || _) return;
@@ -770,23 +770,23 @@ function Re(e) {
770
770
  let t = e.pending.find((e) => !e.sent);
771
771
  t ? (t.sent = !0, e.inFlight = t, ie(e, t, 0)) : J(e);
772
772
  }
773
- function ie(e, n, r) {
774
- t.submit(e.templateId, {
775
- batchId: n.batchId,
773
+ function ie(e, t, n) {
774
+ r.submit(e.templateId, {
775
+ batchId: t.batchId,
776
776
  baseRevision: e.revision,
777
- ops: n.ops,
778
- ...n.origin === "ai" ? { origin: "ai" } : {}
779
- }).then(({ revision: t }) => {
780
- e.inFlight = null, ae(e, n, t), G(e);
781
- }, (t) => {
782
- if (Me(t) !== null) e.inFlight = null, se(e, n, t), G(e);
783
- else if (Pe(t)) {
784
- Y(e, t);
785
- let i = Oe[Math.min(r, Oe.length - 1)];
777
+ ops: t.ops,
778
+ ...t.origin === "ai" ? { origin: "ai" } : {}
779
+ }).then(({ revision: n }) => {
780
+ e.inFlight = null, ae(e, t, n), G(e);
781
+ }, (r) => {
782
+ if (Me(r) !== null) e.inFlight = null, se(e, t, r), G(e);
783
+ else if (Pe(r)) {
784
+ Y(e, r);
785
+ let i = Oe[Math.min(n, Oe.length - 1)];
786
786
  setTimeout(() => {
787
- C || ie(e, n, r + 1);
787
+ C || ie(e, t, n + 1);
788
788
  }, i);
789
- } else e.inFlight = null, F(t), se(e, n, t), G(e);
789
+ } else e.inFlight = null, F(r), se(e, t, r), G(e);
790
790
  });
791
791
  }
792
792
  function ae(e, t, n) {
@@ -837,36 +837,36 @@ function Re(e) {
837
837
  let n = e.pending.find((e) => e.batchId === t.batchId);
838
838
  n ? ae(e, n, t.revision) : (e.remote.set(t.revision, t), ue(e));
839
839
  }
840
- function le(t, n) {
840
+ function le(e, n) {
841
841
  let r = n.ops;
842
- if (e.normalizeRemoteOperations) try {
843
- r = e.normalizeRemoteOperations(n.ops, t.confirmed);
842
+ if (t.normalizeRemoteOperations) try {
843
+ r = t.normalizeRemoteOperations(n.ops, e.confirmed);
844
844
  } catch (e) {
845
845
  F(e);
846
846
  }
847
847
  return Le(r);
848
848
  }
849
- function ue(t) {
849
+ function ue(e) {
850
850
  let n = [], r = !1;
851
851
  for (;;) {
852
- let e = t.revision + 1, i = t.remote.get(e), a = t.own.get(e);
852
+ let t = e.revision + 1, i = e.remote.get(t), a = e.own.get(t);
853
853
  if (!i && !a) break;
854
854
  try {
855
- t.confirmed = k(t.confirmed, i ? le(t, i) : a.ops);
855
+ e.confirmed = k(e.confirmed, i ? le(e, i) : a.ops);
856
856
  } catch {
857
- if (t.recovering) {
858
- t.remote.clear(), t.own.clear(), F(/* @__PURE__ */ Error("[Templatical] Collaboration: this editor can't follow the template's changes. Reload the page."));
857
+ if (e.recovering) {
858
+ e.remote.clear(), e.own.clear(), F(/* @__PURE__ */ Error("[Templatical] Collaboration: this editor can't follow the template's changes. Reload the page."));
859
859
  return;
860
860
  }
861
- me(t);
861
+ me(e);
862
862
  return;
863
863
  }
864
- t.revision = e, i ? (t.remote.delete(e), n.push(i)) : (t.own.delete(e), a.group.dropped && (r = !0), K(t, a));
864
+ e.revision = t, i ? (e.remote.delete(t), n.push(i)) : (e.own.delete(t), a.group.dropped && (r = !0), K(e, a));
865
865
  }
866
- if (t === g && (p.value = t.revision), t.remote.size > 0 || t.own.size > 0 ? fe(t) : pe(t), (n.length !== 0 || r) && (de(t), t === g)) for (let t of n) try {
867
- e.onRemoteChange?.({
868
- actor: t.actor,
869
- ops: t.ops
866
+ if (e === g && (f.value = e.revision), e.remote.size > 0 || e.own.size > 0 ? fe(e) : pe(e), (n.length !== 0 || r) && (de(e), e === g)) for (let e of n) try {
867
+ t.onRemoteChange?.({
868
+ actor: e.actor,
869
+ ops: e.ops
870
870
  });
871
871
  } catch (e) {
872
872
  F(e);
@@ -908,13 +908,13 @@ function Re(e) {
908
908
  let e = g;
909
909
  return e ? (e.catchingUp ||= (async () => {
910
910
  try {
911
- let n = await t.operationsAfter(e.templateId, e.revision);
911
+ let t = await r.operationsAfter(e.templateId, e.revision);
912
912
  if (e.retired) return;
913
- if ("resync" in n) {
913
+ if ("resync" in t) {
914
914
  await me(e);
915
915
  return;
916
916
  }
917
- for (let t of n.batches) ce(e, t);
917
+ for (let n of t.batches) ce(e, n);
918
918
  } catch (e) {
919
919
  F(e);
920
920
  } finally {
@@ -922,31 +922,31 @@ function Re(e) {
922
922
  }
923
923
  })(), e.catchingUp) : Promise.resolve();
924
924
  }
925
- async function me(t) {
926
- t.recovering = !0;
925
+ async function me(e) {
926
+ e.recovering = !0;
927
927
  try {
928
- let n = await e.loadTemplate(t.templateId);
929
- if (t.retired) return;
930
- let r = n.revision ?? t.revision;
931
- t.confirmed = T(n.content), t.revision = r, t.remote = new Map([...t.remote].filter(([e]) => e > r));
932
- for (let [e, n] of [...t.own]) e <= r && (t.own.delete(e), K(t, n));
933
- t === g && (p.value = r), de(t), ue(t);
928
+ let n = await t.loadTemplate(e.templateId);
929
+ if (e.retired) return;
930
+ let r = n.revision ?? e.revision;
931
+ e.confirmed = T(n.content), e.revision = r, e.remote = new Map([...e.remote].filter(([e]) => e > r));
932
+ for (let [t, n] of [...e.own]) t <= r && (e.own.delete(t), K(e, n));
933
+ e === g && (f.value = r), de(e), ue(e);
934
934
  } catch (e) {
935
935
  F(e);
936
936
  } finally {
937
- t.recovering = !1;
937
+ e.recovering = !1;
938
938
  }
939
939
  }
940
- function he(t) {
941
- let n = () => t === g && !t.retired;
940
+ function he(e) {
941
+ let n = () => e === g && !e.retired;
942
942
  return {
943
- onBatch: (e) => {
944
- n() && ce(t, e);
943
+ onBatch: (t) => {
944
+ n() && ce(e, t);
945
945
  },
946
946
  onResync: (r, i) => {
947
- if (!(!n() || r <= t.revision)) {
947
+ if (!(!n() || r <= e.revision)) {
948
948
  if (i) try {
949
- e.onRemoteResync?.({
949
+ t.onRemoteResync?.({
950
950
  revision: r,
951
951
  actor: i
952
952
  });
@@ -965,14 +965,14 @@ function Re(e) {
965
965
  onMembers: (e) => {
966
966
  n() && Ce(e);
967
967
  },
968
- onConnectionChange: (e) => {
969
- n() && ye(t, e);
968
+ onConnectionChange: (t) => {
969
+ n() && ye(e, t);
970
970
  }
971
971
  };
972
972
  }
973
- function ge(e, n) {
974
- t.join(e.templateId, { sessionId: r }, he(e)).then((t) => {
975
- e.retired || e !== g ? n || t.leave() : (e.leave = t.leave, Z(t.locks, !n), Ce(t.members), t.members.length > 0 && (d.value = "connected"), t.revision > e.revision && X(), n && Q());
973
+ function ge(e, t) {
974
+ r.join(e.templateId, { sessionId: i }, he(e)).then((n) => {
975
+ e.retired || e !== g ? t || n.leave() : (e.leave = n.leave, Z(n.locks, !t), Ce(n.members), n.members.length > 0 && (d.value = "connected"), n.revision > e.revision && X(), t && Q());
976
976
  }, (e) => F(e));
977
977
  }
978
978
  function _e(e) {
@@ -994,7 +994,7 @@ function Re(e) {
994
994
  redo: [],
995
995
  waiters: []
996
996
  };
997
- g = n, p.value = n.revision, z(), ge(n, !1), h?.state.selectedBlockId && Be(h.state.selectedBlockId), te();
997
+ g = n, f.value = n.revision, z(), ge(n, !1), h?.state.selectedBlockId && Be(h.state.selectedBlockId), te();
998
998
  }
999
999
  function ve(e) {
1000
1000
  e.retired = !0, pe(e), e.leave?.(), e.leave = null, Y(e, /* @__PURE__ */ Error("[Templatical] The template was closed."));
@@ -1007,7 +1007,7 @@ function Re(e) {
1007
1007
  g && g.templateId === e?.id || (g &&= (H(), ve(g), null), l.value = [], u.value = /* @__PURE__ */ new Map(), d.value = null, D = null, Q(), z(), e && _e(e));
1008
1008
  }
1009
1009
  function xe(e) {
1010
- if (e.holder.sessionId === r) return;
1010
+ if (e.holder.sessionId === i) return;
1011
1011
  let t = new Map([...u.value].filter(([, t]) => t.holder.sessionId !== e.holder.sessionId));
1012
1012
  t.set(e.blockId, e), u.value = t, h?.state.selectedBlockId === e.blockId && (h.selectBlock(null), L({
1013
1013
  type: "selectionRefused",
@@ -1022,7 +1022,7 @@ function Re(e) {
1022
1022
  }
1023
1023
  function Z(e, t) {
1024
1024
  let n = t ? new Map(u.value) : /* @__PURE__ */ new Map();
1025
- for (let i of e) i.holder.sessionId !== r && (t && n.has(i.blockId) || n.set(i.blockId, i));
1025
+ for (let r of e) r.holder.sessionId !== i && (t && n.has(r.blockId) || n.set(r.blockId, r));
1026
1026
  u.value = n;
1027
1027
  }
1028
1028
  function Ce(e) {
@@ -1035,21 +1035,21 @@ function Re(e) {
1035
1035
  A = A.then(e).catch(F);
1036
1036
  }
1037
1037
  function Q() {
1038
- s && we(async () => {
1038
+ o && we(async () => {
1039
1039
  if (O && (D === null || O.templateId !== D.templateId)) {
1040
1040
  let e = O;
1041
- O = null, $(), await t.releaseLock(e.templateId, e.blockId);
1041
+ O = null, $(), await r.releaseLock(e.templateId, e.blockId);
1042
1042
  }
1043
1043
  let e = D;
1044
1044
  if (!(!e || O?.templateId === e.templateId && O.blockId === e.blockId)) try {
1045
- await t.acquireLock(e.templateId, e.blockId), O = e, ze(), je(e.blockId);
1046
- } catch (n) {
1045
+ await r.acquireLock(e.templateId, e.blockId), O = e, ze(), je(e.blockId);
1046
+ } catch (t) {
1047
1047
  if (O?.templateId === e.templateId) {
1048
1048
  let e = O;
1049
- O = null, $(), await t.releaseLock(e.templateId, e.blockId).catch(() => {});
1049
+ O = null, $(), await r.releaseLock(e.templateId, e.blockId).catch(() => {});
1050
1050
  }
1051
1051
  if (D !== e) return;
1052
- Re(e.blockId, n);
1052
+ Re(e.blockId, t);
1053
1053
  }
1054
1054
  });
1055
1055
  }
@@ -1077,7 +1077,7 @@ function Re(e) {
1077
1077
  we(async () => {
1078
1078
  let e = O;
1079
1079
  if (e) try {
1080
- await t.renewLock(e.templateId, e.blockId);
1080
+ await r.renewLock(e.templateId, e.blockId);
1081
1081
  } catch (e) {
1082
1082
  if (Me(e) === "lock_lost") {
1083
1083
  O = null, $(), Q();
@@ -1098,7 +1098,7 @@ function Re(e) {
1098
1098
  } : null, Q());
1099
1099
  }
1100
1100
  function Ve() {
1101
- W(), O && s && (t.releaseLock(O.templateId, O.blockId).catch(() => {}), O = null, $()), g?.leave?.(), g && (g.leave = null);
1101
+ W(), O && o && (r.releaseLock(O.templateId, O.blockId).catch(() => {}), O = null, $()), g?.leave?.(), g && (g.leave = null);
1102
1102
  }
1103
1103
  function He(e) {
1104
1104
  let t = g;
@@ -1148,7 +1148,7 @@ function Re(e) {
1148
1148
  };
1149
1149
  }
1150
1150
  function We(e) {
1151
- h = e, w.push(b(() => e.state.template, (e) => be(e), { immediate: !0 }), b(() => e.content.value, te, { deep: !0 }), b(() => e.state.selectedBlockId, Be), b(() => e.state.isLoading, (e) => e ? U(!0, !0) : te())), typeof window < "u" && (window.addEventListener("pagehide", Ve), window.addEventListener("blur", W)), n() && c(Je);
1151
+ h = e, w.push(p(() => e.state.template, (e) => be(e), { immediate: !0 }), p(() => e.content.value, te, { deep: !0 }), p(() => e.state.selectedBlockId, Be), p(() => e.state.isLoading, (e) => e ? U(!0, !0) : te())), typeof window < "u" && (window.addEventListener("pagehide", Ve), window.addEventListener("blur", W)), n() && c(Je);
1152
1152
  }
1153
1153
  function Ge() {
1154
1154
  W();
@@ -1172,11 +1172,11 @@ function Re(e) {
1172
1172
  }
1173
1173
  }
1174
1174
  return {
1175
- sessionId: r,
1175
+ sessionId: i,
1176
1176
  members: l,
1177
1177
  locks: u,
1178
1178
  connection: d,
1179
- revision: p,
1179
+ revision: f,
1180
1180
  canUndo: M,
1181
1181
  canRedo: N,
1182
1182
  attach: We,
@@ -1195,81 +1195,81 @@ function Re(e) {
1195
1195
  destroy: Je
1196
1196
  };
1197
1197
  }
1198
- function ze(e) {
1199
- let { provider: t } = e, n = a([]), r = a(!1), i = d(() => {
1198
+ function ze(t) {
1199
+ let { provider: n } = t, r = e([]), i = e(!1), a = f(() => {
1200
1200
  let e = /* @__PURE__ */ new Set();
1201
- for (let t of n.value) {
1201
+ for (let t of r.value) {
1202
1202
  let n = t.category?.trim();
1203
1203
  n && e.add(n);
1204
1204
  }
1205
1205
  return [...e].sort((e, t) => e.localeCompare(t));
1206
- }), o = d(() => typeof t.create == "function"), s = d(() => typeof t.update == "function"), c = d(() => typeof t.delete == "function");
1206
+ }), o = f(() => typeof n.create == "function"), s = f(() => typeof n.update == "function"), c = f(() => typeof n.delete == "function");
1207
1207
  function l(e) {
1208
1208
  return s.value && e.canUpdate !== !1;
1209
1209
  }
1210
1210
  function u(e) {
1211
1211
  return c.value && e.canDelete !== !1;
1212
1212
  }
1213
- function f(e, t) {
1213
+ function d(e, t) {
1214
1214
  throw new L(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
1215
1215
  }
1216
- function p(t) {
1217
- Y(e.onError, t);
1216
+ function p(e) {
1217
+ Y(t.onError, e);
1218
1218
  }
1219
- async function m(i) {
1220
- r.value = !0;
1219
+ async function m(e) {
1220
+ i.value = !0;
1221
1221
  try {
1222
- n.value = await t.list(i);
1223
- } catch (t) {
1224
- throw e.onError?.(t), t;
1222
+ r.value = await n.list(e);
1223
+ } catch (e) {
1224
+ throw t.onError?.(e), e;
1225
1225
  } finally {
1226
- r.value = !1;
1226
+ i.value = !1;
1227
1227
  }
1228
1228
  }
1229
- async function h(r, i, a) {
1230
- let { create: o } = t;
1231
- typeof o != "function" && f("create", "disabled by the provider");
1229
+ async function h(e, i, a) {
1230
+ let { create: o } = n;
1231
+ typeof o != "function" && d("create", "disabled by the provider");
1232
1232
  try {
1233
- let e = await o(a ? {
1234
- name: r,
1233
+ let t = await o(a ? {
1234
+ name: e,
1235
1235
  content: i,
1236
1236
  category: a
1237
1237
  } : {
1238
- name: r,
1238
+ name: e,
1239
1239
  content: i
1240
1240
  });
1241
- return n.value = [e, ...n.value], p(() => t.onCreated?.(e)), e;
1242
- } catch (t) {
1243
- throw e.onError?.(t), t;
1241
+ return r.value = [t, ...r.value], p(() => n.onCreated?.(t)), t;
1242
+ } catch (e) {
1243
+ throw t.onError?.(e), e;
1244
1244
  }
1245
1245
  }
1246
- async function g(r, i) {
1247
- let { update: a } = t;
1248
- typeof a != "function" && f("update", "disabled by the provider");
1249
- let o = n.value.find((e) => e.id === r);
1250
- o && o.canUpdate === !1 && f("update", `not permitted for entry "${r}"`);
1246
+ async function g(e, i) {
1247
+ let { update: a } = n;
1248
+ typeof a != "function" && d("update", "disabled by the provider");
1249
+ let o = r.value.find((t) => t.id === e);
1250
+ o && o.canUpdate === !1 && d("update", `not permitted for entry "${e}"`);
1251
1251
  try {
1252
- let e = await a(r, i);
1253
- return n.value = n.value.map((t) => t.id === r ? e : t), p(() => t.onUpdated?.(e)), e;
1254
- } catch (t) {
1255
- throw e.onError?.(t), t;
1252
+ let t = await a(e, i);
1253
+ return r.value = r.value.map((n) => n.id === e ? t : n), p(() => n.onUpdated?.(t)), t;
1254
+ } catch (e) {
1255
+ throw t.onError?.(e), e;
1256
1256
  }
1257
1257
  }
1258
- async function _(r) {
1259
- let { delete: i } = t;
1260
- typeof i != "function" && f("delete", "disabled by the provider");
1261
- let a = n.value.find((e) => e.id === r) ?? null;
1262
- a && a.canDelete === !1 && f("delete", `not permitted for entry "${r}"`);
1258
+ async function _(e) {
1259
+ let { delete: i } = n;
1260
+ typeof i != "function" && d("delete", "disabled by the provider");
1261
+ let a = r.value.find((t) => t.id === e) ?? null;
1262
+ a && a.canDelete === !1 && d("delete", `not permitted for entry "${e}"`);
1263
1263
  try {
1264
- await i(r), n.value = n.value.filter((e) => e.id !== r), a && p(() => t.onDeleted?.(a));
1265
- } catch (t) {
1266
- throw e.onError?.(t), t;
1264
+ await i(e), r.value = r.value.filter((t) => t.id !== e), a && p(() => n.onDeleted?.(a));
1265
+ } catch (e) {
1266
+ throw t.onError?.(e), e;
1267
1267
  }
1268
1268
  }
1269
1269
  return {
1270
- savedBlocks: n,
1271
- isLoading: r,
1272
- categories: i,
1270
+ savedBlocks: r,
1271
+ isLoading: i,
1272
+ categories: a,
1273
1273
  canCreate: o,
1274
1274
  canUpdate: s,
1275
1275
  canDelete: c,
@@ -1409,74 +1409,74 @@ function Ue(e = {}) {
1409
1409
  storage: !1
1410
1410
  };
1411
1411
  }
1412
- function We(e) {
1413
- let { provider: t, getTemplateId: n } = e, r = a([]), i = a(!1), o = a(void 0), s = a(!1), c = /* @__PURE__ */ new Map(), l = d(() => typeof t.create == "function"), u = d(() => typeof t.restore == "function");
1414
- function f(e) {
1415
- let t = n();
1412
+ function We(t) {
1413
+ let { provider: n, getTemplateId: r } = t, i = e([]), a = e(!1), o = e(void 0), s = e(!1), c = /* @__PURE__ */ new Map(), l = f(() => typeof n.create == "function"), u = f(() => typeof n.restore == "function");
1414
+ function d(e) {
1415
+ let t = r();
1416
1416
  if (!t) throw new L(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
1417
1417
  return t;
1418
1418
  }
1419
1419
  function p(e) {
1420
1420
  throw new L(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
1421
1421
  }
1422
- function m(t) {
1423
- Y(e.onError, t);
1422
+ function m(e) {
1423
+ Y(t.onError, e);
1424
1424
  }
1425
- async function h(n) {
1426
- let a = f("list");
1427
- i.value = !0;
1425
+ async function h(e) {
1426
+ let r = d("list");
1427
+ a.value = !0;
1428
1428
  try {
1429
- let e = await t.list(a, n);
1430
- r.value = e.versions, o.value = e.nextCursor;
1431
- } catch (t) {
1432
- throw e.onError?.(t), t;
1429
+ let t = await n.list(r, e);
1430
+ i.value = t.versions, o.value = t.nextCursor;
1431
+ } catch (e) {
1432
+ throw t.onError?.(e), e;
1433
1433
  } finally {
1434
- i.value = !1;
1434
+ a.value = !1;
1435
1435
  }
1436
1436
  }
1437
1437
  function g(e) {
1438
1438
  return e.content ?? c.get(e.id) ?? null;
1439
1439
  }
1440
- async function _(n) {
1441
- let r = g(n);
1440
+ async function _(e) {
1441
+ let r = g(e);
1442
1442
  if (r) return r;
1443
- let i = f("get");
1443
+ let i = d("get");
1444
1444
  try {
1445
- let e = await t.get(i, n.id);
1446
- return c.set(n.id, e), e;
1447
- } catch (t) {
1448
- throw e.onError?.(t), t;
1445
+ let t = await n.get(i, e.id);
1446
+ return c.set(e.id, t), t;
1447
+ } catch (e) {
1448
+ throw t.onError?.(e), e;
1449
1449
  }
1450
1450
  }
1451
- async function v(n, i) {
1452
- let { create: a } = t;
1451
+ async function v(e, r) {
1452
+ let { create: a } = n;
1453
1453
  typeof a != "function" && p("create");
1454
- let o = f("create");
1454
+ let o = d("create");
1455
1455
  try {
1456
- let e = await a(o, n, i);
1457
- return r.value = [e, ...r.value], m(() => t.onCreated?.(e)), e;
1458
- } catch (t) {
1459
- throw e.onError?.(t), t;
1456
+ let t = await a(o, e, r);
1457
+ return i.value = [t, ...i.value], m(() => n.onCreated?.(t)), t;
1458
+ } catch (e) {
1459
+ throw t.onError?.(e), e;
1460
1460
  }
1461
1461
  }
1462
- async function y(n) {
1463
- let { restore: r } = t;
1462
+ async function y(e) {
1463
+ let { restore: r } = n;
1464
1464
  typeof r != "function" && p("restore");
1465
- let i = f("restore"), a;
1465
+ let i = d("restore"), a;
1466
1466
  s.value = !0;
1467
1467
  try {
1468
- a = await r(i, n);
1469
- } catch (t) {
1470
- throw e.onError?.(t), t;
1468
+ a = await r(i, e);
1469
+ } catch (e) {
1470
+ throw t.onError?.(e), e;
1471
1471
  } finally {
1472
1472
  s.value = !1;
1473
1473
  }
1474
- return m(() => t.onRestored?.(a)), a;
1474
+ return m(() => n.onRestored?.(a)), a;
1475
1475
  }
1476
1476
  return {
1477
1477
  nextCursor: o,
1478
- versions: r,
1479
- isLoading: i,
1478
+ versions: i,
1479
+ isLoading: a,
1480
1480
  isRestoring: s,
1481
1481
  canCreate: l,
1482
1482
  canRestore: u,
@@ -1487,19 +1487,19 @@ function We(e) {
1487
1487
  restore: y
1488
1488
  };
1489
1489
  }
1490
- function Ge(e) {
1491
- let { provider: t, getTemplateId: n, getUser: r } = e, i = a([]), o = a(!1), s = a(!1), c = d(() => typeof t.create == "function"), l = d(() => typeof t.update == "function"), u = d(() => typeof t.delete == "function"), f = d(() => typeof t.setResolved == "function"), p = d(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), m = d(() => i.value.filter((e) => !e.resolvedAt).length), h = d(() => {
1490
+ function Ge(t) {
1491
+ let { provider: n, getTemplateId: r, getUser: i } = t, a = e([]), o = e(!1), s = e(!1), c = f(() => typeof n.create == "function"), l = f(() => typeof n.update == "function"), u = f(() => typeof n.delete == "function"), d = f(() => typeof n.setResolved == "function"), p = f(() => a.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), m = f(() => a.value.filter((e) => !e.resolvedAt).length), h = f(() => {
1492
1492
  let e = /* @__PURE__ */ new Map();
1493
- for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
1493
+ for (let t of a.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
1494
1494
  return e;
1495
1495
  });
1496
1496
  function g(e) {
1497
- let t = n();
1497
+ let t = r();
1498
1498
  if (!t) throw new L(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
1499
1499
  return t;
1500
1500
  }
1501
1501
  function _(e) {
1502
- let t = r();
1502
+ let t = i();
1503
1503
  if (!t) throw new L(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
1504
1504
  return t;
1505
1505
  }
@@ -1507,22 +1507,22 @@ function Ge(e) {
1507
1507
  throw new L(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
1508
1508
  }
1509
1509
  function y(e) {
1510
- for (let t of i.value) {
1510
+ for (let t of a.value) {
1511
1511
  if (t.id === e) return t;
1512
1512
  for (let n of t.replies ?? []) if (n.id === e) return n;
1513
1513
  }
1514
1514
  return null;
1515
1515
  }
1516
1516
  function b(e) {
1517
- let t = r();
1517
+ let t = i();
1518
1518
  return t !== null && e.author.id === t.id;
1519
1519
  }
1520
- function x(t) {
1521
- let n = J(t);
1522
- throw e.onError?.(n), n;
1520
+ function x(e) {
1521
+ let n = J(e);
1522
+ throw t.onError?.(n), n;
1523
1523
  }
1524
- function S(t) {
1525
- Y(e.onError, t);
1524
+ function S(e) {
1525
+ Y(t.onError, e);
1526
1526
  }
1527
1527
  function C(e, t, n) {
1528
1528
  return [
@@ -1536,7 +1536,7 @@ function Ge(e) {
1536
1536
  }
1537
1537
  function T(e) {
1538
1538
  if (e.parentId) {
1539
- let t = !1, n = i.value.map((n) => {
1539
+ let t = !1, n = a.value.map((n) => {
1540
1540
  if (n.id !== e.parentId) return n;
1541
1541
  let r = n.replies ?? [], i = r.findIndex((t) => t.id === e.id);
1542
1542
  return i !== -1 && w(r[i], e) ? n : (t = !0, {
@@ -1544,28 +1544,28 @@ function Ge(e) {
1544
1544
  replies: i === -1 ? [...r, e] : C(r, i, e)
1545
1545
  });
1546
1546
  });
1547
- return t && (i.value = n), t;
1547
+ return t && (a.value = n), t;
1548
1548
  }
1549
- let t = i.value.findIndex((t) => t.id === e.id);
1550
- if (t === -1) return i.value = [...i.value, e], !0;
1549
+ let t = a.value.findIndex((t) => t.id === e.id);
1550
+ if (t === -1) return a.value = [...a.value, e], !0;
1551
1551
  let n = {
1552
1552
  ...e,
1553
- replies: e.replies ?? i.value[t].replies
1553
+ replies: e.replies ?? a.value[t].replies
1554
1554
  };
1555
- return !w(i.value[t], n) && (i.value = C(i.value, t, n), !0);
1555
+ return !w(a.value[t], n) && (a.value = C(a.value, t, n), !0);
1556
1556
  }
1557
1557
  function E(e, t) {
1558
1558
  let n = y(e), r = t ?? n?.parentId ?? null;
1559
- return r ? i.value = i.value.map((t) => t.id === r ? {
1559
+ return r ? a.value = a.value.map((t) => t.id === r ? {
1560
1560
  ...t,
1561
1561
  replies: (t.replies ?? []).filter((t) => t.id !== e)
1562
- } : t) : i.value = i.value.filter((t) => t.id !== e), n;
1562
+ } : t) : a.value = a.value.filter((t) => t.id !== e), n;
1563
1563
  }
1564
1564
  async function D(e) {
1565
- let n = g("list");
1565
+ let t = g("list");
1566
1566
  o.value = !0;
1567
1567
  try {
1568
- i.value = await t.list(n, e);
1568
+ a.value = await n.list(t, e);
1569
1569
  } catch (e) {
1570
1570
  x(e);
1571
1571
  } finally {
@@ -1573,27 +1573,27 @@ function Ge(e) {
1573
1573
  }
1574
1574
  }
1575
1575
  async function O(e) {
1576
- let { create: n } = t;
1577
- typeof n != "function" && v("create");
1576
+ let { create: t } = n;
1577
+ typeof t != "function" && v("create");
1578
1578
  let r = g("create");
1579
1579
  _("create"), s.value = !0;
1580
1580
  try {
1581
- let i = await n(r, e);
1582
- return T(i), S(() => t.onCreated?.(i, { origin: "local" })), i;
1581
+ let i = await t(r, e);
1582
+ return T(i), S(() => n.onCreated?.(i, { origin: "local" })), i;
1583
1583
  } catch (e) {
1584
1584
  x(e);
1585
1585
  } finally {
1586
1586
  s.value = !1;
1587
1587
  }
1588
1588
  }
1589
- async function k(e, n) {
1590
- let { update: r } = t;
1589
+ async function k(e, t) {
1590
+ let { update: r } = n;
1591
1591
  typeof r != "function" && v("update");
1592
1592
  let i = g("update");
1593
1593
  _("update"), s.value = !0;
1594
1594
  try {
1595
- let a = await r(i, e, n);
1596
- return T(a), S(() => t.onUpdated?.(a, { origin: "local" })), a;
1595
+ let a = await r(i, e, t);
1596
+ return T(a), S(() => n.onUpdated?.(a, { origin: "local" })), a;
1597
1597
  } catch (e) {
1598
1598
  x(e);
1599
1599
  } finally {
@@ -1601,28 +1601,28 @@ function Ge(e) {
1601
1601
  }
1602
1602
  }
1603
1603
  async function A(e) {
1604
- let { delete: n } = t;
1605
- typeof n != "function" && v("delete");
1604
+ let { delete: t } = n;
1605
+ typeof t != "function" && v("delete");
1606
1606
  let r = g("delete");
1607
1607
  _("delete");
1608
1608
  let i = y(e);
1609
1609
  s.value = !0;
1610
1610
  try {
1611
- await n(r, e), E(e), i && S(() => t.onDeleted?.(i, { origin: "local" }));
1611
+ await t(r, e), E(e), i && S(() => n.onDeleted?.(i, { origin: "local" }));
1612
1612
  } catch (e) {
1613
1613
  x(e);
1614
1614
  } finally {
1615
1615
  s.value = !1;
1616
1616
  }
1617
1617
  }
1618
- async function j(e, n) {
1619
- let { setResolved: r } = t;
1618
+ async function j(e, t) {
1619
+ let { setResolved: r } = n;
1620
1620
  typeof r != "function" && v("setResolved");
1621
1621
  let i = g("setResolved");
1622
1622
  _("setResolved"), s.value = !0;
1623
1623
  try {
1624
- let a = await r(i, e, n);
1625
- return T(a), S(() => (a.resolvedAt ? t.onResolved : t.onUnresolved)?.(a, { origin: "local" })), a;
1624
+ let a = await r(i, e, t);
1625
+ return T(a), S(() => (a.resolvedAt ? n.onResolved : n.onUnresolved)?.(a, { origin: "local" })), a;
1626
1626
  } catch (e) {
1627
1627
  x(e);
1628
1628
  } finally {
@@ -1630,23 +1630,23 @@ function Ge(e) {
1630
1630
  }
1631
1631
  }
1632
1632
  function M(e) {
1633
- T(e) && S(() => t.onCreated?.(e, { origin: "remote" }));
1633
+ T(e) && S(() => n.onCreated?.(e, { origin: "remote" }));
1634
1634
  }
1635
1635
  function N(e) {
1636
- T(e) && S(() => (e.resolvedAt ? t.onResolved : t.onUpdated)?.(e, { origin: "remote" }));
1636
+ T(e) && S(() => (e.resolvedAt ? n.onResolved : n.onUpdated)?.(e, { origin: "remote" }));
1637
1637
  }
1638
- function P(e, n) {
1639
- let r = E(e, n);
1640
- r && S(() => t.onDeleted?.(r, { origin: "remote" }));
1638
+ function P(e, t) {
1639
+ let r = E(e, t);
1640
+ r && S(() => n.onDeleted?.(r, { origin: "remote" }));
1641
1641
  }
1642
1642
  return {
1643
- comments: i,
1643
+ comments: a,
1644
1644
  isLoading: o,
1645
1645
  isSubmitting: s,
1646
1646
  canCreate: c,
1647
1647
  canUpdate: l,
1648
1648
  canDelete: u,
1649
- canResolve: f,
1649
+ canResolve: d,
1650
1650
  totalCount: p,
1651
1651
  unresolvedCount: m,
1652
1652
  commentCountByBlock: h,
@@ -1687,7 +1687,7 @@ function Ke(e) {
1687
1687
  var qe = 1e4;
1688
1688
  // src/composables/useImageUrlResolver.ts
1689
1689
  function Je(e) {
1690
- let t = s(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
1690
+ let t = l(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
1691
1691
  function r(e) {
1692
1692
  return t.get(e);
1693
1693
  }
@@ -1716,7 +1716,7 @@ function Je(e) {
1716
1716
  };
1717
1717
  }
1718
1718
  function Ye(e) {
1719
- let r = t(G, null), i = d(e);
1719
+ let r = t(G, null), i = f(e);
1720
1720
  if (!r) return i;
1721
1721
  let a;
1722
1722
  function o() {
@@ -1730,7 +1730,7 @@ function Ye(e) {
1730
1730
  s = !1, e && !r.has(e) && (t ? r.lookup(e) : a = setTimeout(() => {
1731
1731
  a = void 0, r.lookup(e);
1732
1732
  }, 300));
1733
- }, { immediate: !0 }), d(() => {
1733
+ }, { immediate: !0 }), f(() => {
1734
1734
  let e = i.value;
1735
1735
  if (!e) return e;
1736
1736
  let t = r.get(e);
@@ -1751,7 +1751,7 @@ function Qe(e, t) {
1751
1751
  }
1752
1752
  function $e(e) {
1753
1753
  let n = t(ne, R.liquid), r = Ye(() => Qe(e(), n));
1754
- return d(() => Ze(e(), n) ? null : r.value);
1754
+ return f(() => Ze(e(), n) ? null : r.value);
1755
1755
  }
1756
1756
  function et(e, t, n) {
1757
1757
  return Ze(t, n) ? null : Xe(e, Qe(t, n));
@@ -1906,8 +1906,8 @@ var mt = /* @__PURE__ */ x({
1906
1906
  uploading: { type: Boolean },
1907
1907
  size: { default: "field" }
1908
1908
  },
1909
- setup(t) {
1910
- let n = t, { t: i } = ie(), a = {
1909
+ setup(e) {
1910
+ let t = e, { t: n } = ie(), a = {
1911
1911
  field: {
1912
1912
  gap: "tpl:gap-1.5",
1913
1913
  icon: 18,
@@ -1918,31 +1918,31 @@ var mt = /* @__PURE__ */ x({
1918
1918
  icon: 20,
1919
1919
  veil: "85%"
1920
1920
  }
1921
- }, o = d(() => a[n.size]);
1922
- return (n, a) => (g(), p("div", {
1923
- class: e(["tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]", o.value.gap]),
1924
- style: _({ backgroundColor: `color-mix(in srgb, var(--tpl-bg) ${o.value.veil}, transparent)` })
1925
- }, [t.uploading ? (g(), p(y, { key: 0 }, [u(v(se), {
1921
+ }, o = f(() => a[t.size]);
1922
+ return (t, a) => (g(), m("div", {
1923
+ 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:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]", o.value.gap]),
1924
+ style: r({ backgroundColor: `color-mix(in srgb, var(--tpl-bg) ${o.value.veil}, transparent)` })
1925
+ }, [e.uploading ? (g(), m(v, { key: 0 }, [u(y(se), {
1926
1926
  class: "tpl-spinner",
1927
1927
  size: o.value.icon,
1928
1928
  "stroke-width": 2
1929
- }, null, 8, ["size"]), m(" " + r(v(i).image.uploading), 1)], 64)) : (g(), p(y, { key: 1 }, [u(v(oe), {
1929
+ }, null, 8, ["size"]), h(" " + i(y(n).image.uploading), 1)], 64)) : (g(), m(v, { key: 1 }, [u(y(oe), {
1930
1930
  size: o.value.icon,
1931
1931
  "stroke-width": 1.5
1932
- }, null, 8, ["size"]), m(" " + r(v(i).image.dropToUpload), 1)], 64))], 6));
1932
+ }, null, 8, ["size"]), h(" " + i(y(n).image.dropToUpload), 1)], 64))], 6));
1933
1933
  }
1934
1934
  });
1935
1935
  // src/composables/useAliveFlag.ts
1936
1936
  function ht() {
1937
1937
  let e = { alive: !0 };
1938
- return i(() => {
1938
+ return a(() => {
1939
1939
  e.alive = !1;
1940
1940
  }), e;
1941
1941
  }
1942
1942
  // src/composables/useImageDrop.ts
1943
1943
  var gt = "image/";
1944
1944
  function _t(e) {
1945
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || h(r), { isOverDropZone: a } = U(t, {
1945
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || d(r), { isOverDropZone: a } = U(t, {
1946
1946
  preventDefaultForUnhandled: !0,
1947
1947
  onDrop: (e) => {
1948
1948
  if (!i()) return;
@@ -1950,17 +1950,17 @@ function _t(e) {
1950
1950
  t.length > 0 && n([t[0]]);
1951
1951
  }
1952
1952
  });
1953
- return { isOver: d(() => i() && a.value) };
1953
+ return { isOver: f(() => i() && a.value) };
1954
1954
  }
1955
1955
  // src/composables/useMediaDropField.ts
1956
- function vt(e) {
1957
- let { target: n, blocked: r, apply: i } = e, o = t(W, null), s = t(re, null), c = ht();
1956
+ function vt(n) {
1957
+ let { target: r, blocked: i, apply: a } = n, o = t(W, null), s = t(re, null), c = ht();
1958
1958
  async function l() {
1959
1959
  let e = await o?.({ accept: ["images"] });
1960
- c.alive && e && i(e);
1960
+ c.alive && e && a(e);
1961
1961
  }
1962
- let u = a(!1), f = d(() => (s?.value ?? !!o) && !u.value && !h(r));
1963
- async function p(e) {
1962
+ let u = e(!1), p = f(() => (s?.value ?? !!o) && !u.value && !d(i));
1963
+ async function m(e) {
1964
1964
  if (o) {
1965
1965
  u.value = !0;
1966
1966
  try {
@@ -1969,20 +1969,20 @@ function vt(e) {
1969
1969
  files: e
1970
1970
  });
1971
1971
  if (!c.alive) return;
1972
- t && i(t);
1972
+ t && a(t);
1973
1973
  } finally {
1974
1974
  c.alive && (u.value = !1);
1975
1975
  }
1976
1976
  }
1977
1977
  }
1978
- let { isOver: m } = _t({
1979
- target: n,
1980
- enabled: f,
1981
- onFiles: p
1982
- }), g = d(() => f.value && m.value || u.value);
1978
+ let { isOver: h } = _t({
1979
+ target: r,
1980
+ enabled: p,
1981
+ onFiles: m
1982
+ }), g = f(() => p.value && h.value || u.value);
1983
1983
  return {
1984
1984
  canBrowse: !!o,
1985
- dropEnabled: f,
1985
+ dropEnabled: p,
1986
1986
  isUploading: u,
1987
1987
  showOverlay: g,
1988
1988
  openMediaBrowser: l