@templatical/editor 0.49.0 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/README.md +4 -2
  2. package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
  3. package/dist/AiAltTextReview-DoBEudnE.js +206 -0
  4. package/dist/AiChatPanel-Bs6sES3b.js +550 -0
  5. package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
  6. package/dist/AiPanels-CfN7A-ZA.js +33 -0
  7. package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
  8. package/dist/{BlockIssueBadge-BdpJwim0.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
  9. package/dist/{BlockPreviewCanvas-D_sowkf0.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
  10. package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
  11. package/dist/{CloudPanels-1hwFiJ0G.js → CloudPanels-B4F5m7vy.js} +66 -85
  12. package/dist/{CollaborationNotices-BWpKzueF.js → CollaborationNotices-CNuDp7Y2.js} +19 -16
  13. package/dist/{CollaboratorBar-D87phJsw.js → CollaboratorBar-BtHPiuHq.js} +22 -22
  14. package/dist/{CommentsPanel-BUvUzO3T.js → CommentsPanel-CyCM-BvT.js} +4 -4
  15. package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
  16. package/dist/{cdn/chunks/CountdownBlock-DB4JNdqh.js → CountdownBlock-DR4Xm2-T.js} +24 -26
  17. package/dist/{CountdownToolbar-CLMIwfK7.js → CountdownToolbar-CEIMPojJ.js} +55 -55
  18. package/dist/IssuesPanel-C8nMUccy.js +360 -0
  19. package/dist/{LoadingTrack-BXOptf5g.js → LoadingTrack-B0RKQWq3.js} +2 -2
  20. package/dist/{LogicTagInsertButton-CR5E4jSG.js → LogicTagInsertButton-CqfU52CO.js} +273 -268
  21. package/dist/{cdn/chunks/MediaEditModal-DD0SZ-S3.js → MediaEditModal-DHtkZ4OU.js} +202 -186
  22. package/dist/{MediaPanels-BVXDkqtH.js → MediaPanels-CGcOB2pR.js} +4 -4
  23. package/dist/{MergeTagInput-BEw_r0PJ.js → MergeTagInput-YnEkorTZ.js} +25 -25
  24. package/dist/{MergeTagModeToggle-CJTpFmVd.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
  25. package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
  26. package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
  27. package/dist/{RestoreVersionDialog-BaDpy3cL.js → RestoreVersionDialog-Bq_IGOLJ.js} +21 -21
  28. package/dist/{RichTextEditorContent-CsvniFlI.js → RichTextEditorContent-AOM6fylS.js} +48 -48
  29. package/dist/{SaveBlockDialog-DzWURF_e.js → SaveBlockDialog-C8GngfQx.js} +87 -87
  30. package/dist/{cdn/chunks/SavedBlocksBrowserModal-BMtyUrUP.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
  31. package/dist/{SavedBlocksPanels-B3Af8ns2.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
  32. package/dist/{SavedBlocksPickBar-Dj11-Lqp.js → SavedBlocksPickBar-BjcTiV87.js} +13 -13
  33. package/dist/TemplateSettings-BVBWpiDU.js +237 -0
  34. package/dist/{TestEmailModal-BeRYV3eg.js → TestEmailModal-SyhO9bn3.js} +57 -57
  35. package/dist/{TestEmailPanel-B8c3fQi2.js → TestEmailPanel-BDd2Rtav.js} +4 -4
  36. package/dist/{TitleEditor-CvpNUoAp.js → TitleEditor-pxD53y_l.js} +75 -75
  37. package/dist/ToggleSwitch-D51U9cmR.js +37 -0
  38. package/dist/{Toolbar-BadDSkkF.js → Toolbar-CZSPZYbj.js} +1138 -1138
  39. package/dist/{TplModal-BZgi9Tes.js → TplModal-DCzBzicE.js} +19 -19
  40. package/dist/{VersionHistoryMenu-BRlcQ8wX.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
  41. package/dist/{VersionHistoryPanels-DGkllN3a.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
  42. package/dist/{VersionPreviewBanner-F-811aps.js → VersionPreviewBanner-DUGF0tUJ.js} +9 -9
  43. package/dist/WrapperBlock-BO619LAb.js +45 -0
  44. package/dist/aiErrors-D5UOoYOt.js +41 -0
  45. package/dist/aiImageContext-BH4Ss1h3.js +48 -0
  46. package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
  47. package/dist/{blockTypeIcons-CayLluou.js → blockTypeIcons-NzaYvAI4.js} +15 -14
  48. package/dist/bundle-stats.json +8 -8
  49. package/dist/{cdn/chunks/ca-DSJwJ5ov.js → ca-C7mTzW1r.js} +130 -13
  50. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
  51. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
  52. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
  53. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
  54. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
  55. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
  56. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
  57. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
  58. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
  59. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
  60. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
  61. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
  62. package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
  63. package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
  64. package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js → BlockPreviewCanvas-D0--EQkP.js} +38 -38
  65. package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
  66. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
  67. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
  68. package/dist/cdn/chunks/{CloudPanels-XufhBZYF.js → CloudPanels-C3jsxo_f.js} +52 -71
  69. package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
  70. package/dist/cdn/chunks/{CollaborationNotices-CBvKEj1Q.js → CollaborationNotices-DjRI8gvs.js} +23 -20
  71. package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
  72. package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js → CollaboratorBar-Dfzm6A9A.js} +20 -20
  73. package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js.map → CollaboratorBar-Dfzm6A9A.js.map} +1 -1
  74. package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
  75. package/dist/cdn/chunks/{CommentsPanel-R8YLLO3v.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
  76. package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
  77. package/dist/cdn/chunks/{CommentsSidebar-96NZHVq3.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
  78. package/dist/{CountdownBlock-DPQXWRvU.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
  79. package/dist/cdn/chunks/{CountdownBlock-DB4JNdqh.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
  80. package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js → CountdownToolbar-Cjud2Tos.js} +70 -70
  81. package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
  82. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
  83. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
  84. package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js → LoadingTrack-BIcL4NiY.js} +2 -2
  85. package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
  86. package/dist/cdn/chunks/{LogicTagInsertButton-BJ2t2vxC.js → LogicTagInsertButton-CsL2JDOG.js} +367 -362
  87. package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
  88. package/dist/{MediaEditModal-C_wxoUMG.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
  89. package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
  90. package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
  91. package/dist/cdn/chunks/{MediaPanels-CkdJ_kGp.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
  92. package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js → MergeTagInput-C8U-7LxL.js} +33 -33
  93. package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
  94. package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
  95. package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
  96. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
  97. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
  98. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
  99. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
  100. package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js → RestoreVersionDialog-CdA5osuA.js} +25 -25
  101. package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
  102. package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
  103. package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
  104. package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js → SaveBlockDialog-CijargAy.js} +77 -77
  105. package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
  106. package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
  107. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BMtyUrUP.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
  108. package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
  109. package/dist/cdn/chunks/{SavedBlocksPanels-s_gxi1im.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
  110. package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js → SavedBlocksPickBar-BPRaJBv3.js} +18 -18
  111. package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
  112. package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
  113. package/dist/cdn/chunks/{TemplateSettings-CtrzzQWl.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
  114. package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js → TestEmailModal-BUVTj3Ic.js} +54 -54
  115. package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
  116. package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
  117. package/dist/cdn/chunks/{TestEmailPanel-DERaCdpG.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
  118. package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
  119. package/dist/cdn/chunks/{TitleEditor-CEgxjtUX.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
  120. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
  121. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
  122. package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js → Toolbar-DoprRgTn.js} +986 -987
  123. package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js.map → Toolbar-DoprRgTn.js.map} +1 -1
  124. package/dist/cdn/chunks/{TplModal-DDrbWJcE.js → TplModal-BXQzmsJX.js} +21 -21
  125. package/dist/cdn/chunks/{TplModal-DDrbWJcE.js.map → TplModal-BXQzmsJX.js.map} +1 -1
  126. package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
  127. package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
  128. package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
  129. package/dist/cdn/chunks/{VersionHistoryPanels-DVOV8QLv.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
  130. package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js → VersionPreviewBanner-BaGcn-b1.js} +12 -12
  131. package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
  132. package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
  133. package/dist/cdn/chunks/{WrapperBlock-CFuP4R0c.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
  134. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
  135. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
  136. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
  137. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
  138. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
  139. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
  140. package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
  141. package/dist/cdn/chunks/{blockTypeIcons-BnAd8qsP.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
  142. package/dist/{ca-DSJwJ5ov.js → cdn/chunks/ca-C7mTzW1r.js} +132 -11
  143. package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
  144. package/dist/cdn/chunks/{cloud-CI_fgDyy.js → createCloudRuntime-DpBWhrv3.js} +489 -593
  145. package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
  146. package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
  147. package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
  148. package/dist/{de-CBE6O79z.js → cdn/chunks/de-DNuYQTmS.js} +132 -11
  149. package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
  150. package/dist/{dist-Bv_GBr2l.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
  151. package/dist/cdn/chunks/{dist-Doy3r07H.js.map → dist-Bo8Thh8v.js.map} +1 -1
  152. package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
  153. package/dist/cdn/chunks/{dist-DdwjXLme.js.map → dist-S-rLGqax.js.map} +1 -1
  154. package/dist/cdn/chunks/{draggable-akeQH_JP.js → draggable-DZ0gwUJ6.js} +1822 -1728
  155. package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
  156. package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js → editor-modal-CI6EfeMd.js} +884 -884
  157. package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
  158. package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
  159. package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
  160. package/dist/{en-CDexnk0p.js → cdn/chunks/en-CW71OK66.js} +132 -11
  161. package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
  162. package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
  163. package/dist/{es-BE42B6uN.js → cdn/chunks/es-DdK7zQfi.js} +132 -11
  164. package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
  165. package/dist/cdn/chunks/{extensions-koOuDeZS.js → extensions-taJTZlLK.js} +59 -59
  166. package/dist/cdn/chunks/{extensions-koOuDeZS.js.map → extensions-taJTZlLK.js.map} +1 -1
  167. package/dist/{fr-DlJFPDQR.js → cdn/chunks/fr-Dz5Bgb7-.js} +132 -11
  168. package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
  169. package/dist/cdn/chunks/{icons-CjlNV8xD.js → icons-DNX6StSs.js} +178 -145
  170. package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
  171. package/dist/{ja-CUT8gkNI.js → cdn/chunks/ja-Di-zJiT8.js} +132 -11
  172. package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
  173. package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
  174. package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
  175. package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
  176. package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
  177. package/dist/{nl-bXWqqRyS.js → cdn/chunks/nl-CvVuHYFL.js} +132 -11
  178. package/dist/cdn/chunks/{nl-bXWqqRyS.js.map → nl-CvVuHYFL.js.map} +1 -1
  179. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
  180. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
  181. package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
  182. package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
  183. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
  184. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
  185. package/dist/{pt-BR-2_H4-wlb.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +132 -11
  186. package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
  187. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
  188. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
  189. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
  190. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
  191. package/dist/{dist-DBG3nh3k.js → cdn/chunks/src-BNFnxfrA.js} +552 -350
  192. package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
  193. package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
  194. package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
  195. package/dist/cdn/chunks/{src-B77z1iw4.js → src-K6fw_35b.js} +113 -113
  196. package/dist/cdn/chunks/{src-B77z1iw4.js.map → src-K6fw_35b.js.map} +1 -1
  197. package/dist/cdn/chunks/{tiptap-B1RfWFzB.js → tiptap-CtVrAViq.js} +43 -43
  198. package/dist/cdn/chunks/{tiptap-B1RfWFzB.js.map → tiptap-CtVrAViq.js.map} +1 -1
  199. package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js → useCloudI18n-AVXhzbhQ.js} +4 -4
  200. package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
  201. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
  202. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
  203. package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
  204. package/dist/cdn/chunks/{useEditorRoot-5SBqm90x.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
  205. package/dist/cdn/chunks/{useI18n-DEqtEgOs.js → useI18n-CbVubQhM.js} +3 -3
  206. package/dist/cdn/chunks/{useI18n-DEqtEgOs.js.map → useI18n-CbVubQhM.js.map} +1 -1
  207. package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js → useLogicTag-B49Nc53Y.js} +5 -5
  208. package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
  209. package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js → useMergeTag-B0KryMj8.js} +5 -5
  210. package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
  211. package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js → usePopoverPosition-C829ps5i.js} +4 -4
  212. package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
  213. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
  214. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
  215. package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js → withCurrentFont-DFPXeVfG.js} +2 -2
  216. package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
  217. package/dist/cdn/editor.css +1 -1
  218. package/dist/cdn/editor.js +2151 -1480
  219. package/dist/cdn/editor.js.map +1 -1
  220. package/dist/{check-DQQzkmIC.js → check-yYsp5Xpk.js} +1 -1
  221. package/dist/{chevron-down-CIF4bdon.js → chevron-down-DTmD06_j.js} +1 -1
  222. package/dist/{chevron-right-Cg7Xu-ev.js → chevron-right-BSeYZOxc.js} +1 -1
  223. package/dist/{chevron-up-Csu7ISD-.js → chevron-up-BOApwrxi.js} +1 -1
  224. package/dist/{circle-alert-YUvIJAgY.js → circle-alert-BMszY8im.js} +1 -1
  225. package/dist/{clock-CnSIGKQW.js → clock-HADxnl6-.js} +1 -1
  226. package/dist/{cloud-YUYDtdHt.js → createCloudRuntime-DVQI_ReU.js} +474 -570
  227. package/dist/{createLucideIcon-BcP1sjdp.js → createLucideIcon-0lYYH3EW.js} +6 -6
  228. package/dist/de-DBOTcDj2.js +20 -0
  229. package/dist/{cdn/chunks/de-CBE6O79z.js → de-DNuYQTmS.js} +130 -13
  230. package/dist/{cdn/chunks/dist-Doy3r07H.js → dist-C7EtxNCb.js} +49 -51
  231. package/dist/{dist-CNqjHA8e.js → dist-C_dV9QAx.js} +130 -130
  232. package/dist/{cdn/chunks/dist-DdwjXLme.js → dist-DI4_YSnG.js} +111 -110
  233. package/dist/{cdn/chunks/src-CvLTYGdO.js → dist-DtOF3bDW.js} +446 -393
  234. package/dist/{editor-modal--7_9A6j-.js → editor-modal-Bzhl-PgI.js} +832 -834
  235. package/dist/en-CDhWRrF_.js +20 -0
  236. package/dist/{cdn/chunks/en-CDexnk0p.js → en-CW71OK66.js} +130 -13
  237. package/dist/en-DwV15ltA.js +1 -0
  238. package/dist/{cdn/chunks/es-BE42B6uN.js → es-DdK7zQfi.js} +130 -13
  239. package/dist/{extensions-zwsZlWjH.js → extensions-CdyweA50.js} +57 -57
  240. package/dist/{eye-B1bua-ck.js → eye-DWkSvYpj.js} +1 -1
  241. package/dist/{cdn/chunks/fr-DlJFPDQR.js → fr-Dz5Bgb7-.js} +130 -13
  242. package/dist/image-DesWjcZ4.js +28 -0
  243. package/dist/index.d.ts +361 -24
  244. package/dist/{info-x26nGOo2.js → info-ClWJGoZy.js} +1 -1
  245. package/dist/{cdn/chunks/ja-CUT8gkNI.js → ja-Di-zJiT8.js} +130 -13
  246. package/dist/keys-Zd9KWRD1.js +10 -0
  247. package/dist/{link-CezhndyR.js → link-BqRicFTA.js} +1 -1
  248. package/dist/{list-DQqdptI0.js → list-bojQr9bn.js} +1 -1
  249. package/dist/{loader-circle-DCEeoYoi.js → loader-circle-B2B8LbUu.js} +1 -1
  250. package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
  251. package/dist/{message-circle-BLGzfv_7.js → message-circle-BEuiNsyZ.js} +1 -1
  252. package/dist/{cdn/chunks/nl-bXWqqRyS.js → nl-CvVuHYFL.js} +130 -13
  253. package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
  254. package/dist/{package-D_kEQCMU.js → package-DCROB4aM.js} +1 -1
  255. package/dist/{pencil-Dct8zGLy.js → pencil-CEotCKbf.js} +1 -1
  256. package/dist/{preRenderCustomBlocks-CtKJecE-.js → preRenderCustomBlocks-D8rr61_z.js} +4 -4
  257. package/dist/pt-BR-CHM-ZKvE.js +20 -0
  258. package/dist/{cdn/chunks/pt-BR-2_H4-wlb.js → pt-BR-ZhO4vgyq.js} +130 -13
  259. package/dist/{refresh-cw-tGMRDxr8.js → refresh-cw-C6M2mHNC.js} +12 -2
  260. package/dist/{runtime-dom.esm-bundler-DYn1z2Xf.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
  261. package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
  262. package/dist/{search-Bm2cCQpe.js → search-Cy99zPYf.js} +1 -1
  263. package/dist/{send-sVLaKZ7f.js → send-BDLJFsf3.js} +1 -1
  264. package/dist/{smartphone-B2W81p02.js → smartphone-CVvQaNA4.js} +1 -1
  265. package/dist/{cdn/chunks/socialIcons-CkZSYpoG.js → socialIcons-Dd-jRiVe.js} +688 -693
  266. package/dist/{sparkles-a1qkBZ8X.js → sparkles-Ce0Qz0ox.js} +1 -1
  267. package/dist/square-BWlolnXe.js +15 -0
  268. package/dist/style.css +1 -1
  269. package/dist/templatical-editor.js +2114 -1422
  270. package/dist/{text-align-start-CTuwQ5YW.js → text-align-start-D1V5gPTy.js} +1 -1
  271. package/dist/{trash-I3D2peFQ.js → trash-CZfiUFmw.js} +1 -1
  272. package/dist/{triangle-alert-CenxmLRE.js → triangle-alert-CFDzyFC7.js} +1 -1
  273. package/dist/upload-BJfvdIrD.js +36 -0
  274. package/dist/{useCloudI18n-CGVEZV3o.js → useCloudI18n-Dcjua65H.js} +5 -5
  275. package/dist/{useEditorCore-DRbMRe8F.js → useEditorCore-BTLeAVlM.js} +1463 -1499
  276. package/dist/{useEditorRoot-BVm2-1N8.js → useEditorRoot-DUy67lJu.js} +2 -2
  277. package/dist/{useI18n-CSh4gO5c.js → useI18n-BdoY7xDE.js} +4 -4
  278. package/dist/{useLogicTag-zcI6BWIf.js → useLogicTag-DKLZ1T9H.js} +3 -3
  279. package/dist/{useMergeTag-C-iBLlp0.js → useMergeTag-Bhdx7AKk.js} +3 -3
  280. package/dist/{usePopoverPosition-CMcsMBtK.js → usePopoverPosition-BZea45XK.js} +2 -2
  281. package/dist/useScrollToBlock-FmNMALM_.js +74 -0
  282. package/dist/{vue.runtime.esm-bundler-DV0Wx4r_.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1428 -1332
  283. package/dist/{withCurrentFont-D62njRLu.js → withCurrentFont-BATJHNve.js} +1 -1
  284. package/dist/{x-KFQ4S-Kz.js → x-CZ0Js0hA.js} +1 -1
  285. package/package.json +14 -12
  286. package/dist/AiChatSidebar-CdjTb9ej.js +0 -230
  287. package/dist/AiFeatureMenu-DKm7VYCs.js +0 -57
  288. package/dist/CloudHeaderExtras-CI8RR9hG.js +0 -55
  289. package/dist/CommentsSidebar-J65znlrH.js +0 -500
  290. package/dist/DesignReferenceSidebar-BTwCFgz8.js +0 -279
  291. package/dist/IssuesPanel-DeeVsfG7.js +0 -117
  292. package/dist/ParagraphEditor-zLV44z-R.js +0 -797
  293. package/dist/SavedBlocksBrowserModal-B8DCFW7t.js +0 -360
  294. package/dist/TemplateScoringPanel-Ba9sgvjS.js +0 -273
  295. package/dist/TemplateSettings-Cu5X9DgA.js +0 -246
  296. package/dist/ToggleSwitch-DHweVJOr.js +0 -102
  297. package/dist/WrapperBlock-DiiaxpMb.js +0 -45
  298. package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js +0 -205
  299. package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js.map +0 -1
  300. package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js +0 -57
  301. package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js.map +0 -1
  302. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js +0 -56
  303. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +0 -1
  304. package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +0 -1
  305. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +0 -1
  306. package/dist/cdn/chunks/CommentsPanel-R8YLLO3v.js +0 -20
  307. package/dist/cdn/chunks/CommentsSidebar-96NZHVq3.js +0 -470
  308. package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js +0 -229
  309. package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js.map +0 -1
  310. package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js +0 -100
  311. package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js.map +0 -1
  312. package/dist/cdn/chunks/LogicTagInsertButton-BJ2t2vxC.js.map +0 -1
  313. package/dist/cdn/chunks/MediaEditModal-DD0SZ-S3.js.map +0 -1
  314. package/dist/cdn/chunks/MediaPanels-CkdJ_kGp.js +0 -45
  315. package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js +0 -632
  316. package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js.map +0 -1
  317. package/dist/cdn/chunks/SavedBlocksPanels-s_gxi1im.js +0 -38
  318. package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js +0 -237
  319. package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js.map +0 -1
  320. package/dist/cdn/chunks/TemplateSettings-CtrzzQWl.js +0 -208
  321. package/dist/cdn/chunks/TestEmailPanel-DERaCdpG.js +0 -35
  322. package/dist/cdn/chunks/TitleEditor-CEgxjtUX.js +0 -199
  323. package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js +0 -104
  324. package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js.map +0 -1
  325. package/dist/cdn/chunks/VersionHistoryPanels-DVOV8QLv.js +0 -48
  326. package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +0 -47
  327. package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +0 -22
  328. package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +0 -1
  329. package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +0 -1
  330. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js +0 -358
  331. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +0 -1
  332. package/dist/cdn/chunks/de-CBE6O79z.js.map +0 -1
  333. package/dist/cdn/chunks/de-D_atmUVB.js +0 -89
  334. package/dist/cdn/chunks/de-D_atmUVB.js.map +0 -1
  335. package/dist/cdn/chunks/draggable-akeQH_JP.js.map +0 -1
  336. package/dist/cdn/chunks/en-CDexnk0p.js.map +0 -1
  337. package/dist/cdn/chunks/en-DhJLnaBx.js +0 -89
  338. package/dist/cdn/chunks/en-DhJLnaBx.js.map +0 -1
  339. package/dist/cdn/chunks/en-Ve-PWSXu.js +0 -1
  340. package/dist/cdn/chunks/es-BE42B6uN.js.map +0 -1
  341. package/dist/cdn/chunks/fr-DlJFPDQR.js.map +0 -1
  342. package/dist/cdn/chunks/icons-CjlNV8xD.js.map +0 -1
  343. package/dist/cdn/chunks/ja-CUT8gkNI.js.map +0 -1
  344. package/dist/cdn/chunks/keys-UAWhQ3zW.js +0 -12
  345. package/dist/cdn/chunks/keys-UAWhQ3zW.js.map +0 -1
  346. package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
  347. package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +0 -1
  348. package/dist/cdn/chunks/pt-BR-BphMoUTw.js +0 -89
  349. package/dist/cdn/chunks/pt-BR-BphMoUTw.js.map +0 -1
  350. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +0 -1
  351. package/dist/cdn/chunks/src-B1e5SSYP.js +0 -1272
  352. package/dist/cdn/chunks/src-B1e5SSYP.js.map +0 -1
  353. package/dist/cdn/chunks/src-CvLTYGdO.js.map +0 -1
  354. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +0 -6
  355. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +0 -1
  356. package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js +0 -12
  357. package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js.map +0 -1
  358. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js +0 -2623
  359. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +0 -1
  360. package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +0 -10
  361. package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js +0 -21
  362. package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js.map +0 -1
  363. package/dist/copy-CUC43md_.js +0 -19
  364. package/dist/createCloudRuntime-BMDRjL0k.js +0 -356
  365. package/dist/de-D_atmUVB.js +0 -87
  366. package/dist/dist-CCqn-RqE.js +0 -407
  367. package/dist/en-BHCMzqib.js +0 -1
  368. package/dist/en-DhJLnaBx.js +0 -87
  369. package/dist/image-up-BqiO7KCO.js +0 -27
  370. package/dist/keys-BymCnLHD.js +0 -10
  371. package/dist/plus-BDd0gTEm.js +0 -14
  372. package/dist/pt-BR-BphMoUTw.js +0 -87
  373. package/dist/shield-check-YhsbXfQc.js +0 -14
  374. package/dist/socialIcons-Bwv-49EB.js +0 -2167
  375. package/dist/timeouts-o5Y9BuqI.js +0 -4
  376. package/dist/upload-uU2cK0Ce.js +0 -21
  377. package/dist/useAliveFlag-BjP0Gxza.js +0 -10
  378. package/dist/useScrollToBlock-CdCQK9QQ.js +0 -47
@@ -0,0 +1,2032 @@
1
+ import { $ as e, C as t, D as n, G as r, P as i, Q as a, V as o, X as s, Z as c, _ as l, b as u, dt as d, it as f, j as p, lt as m, ot as h, p as g, q as _, st as v, tt as y, u as b, ut as x, x as S } from "./draggable-DZ0gwUJ6.js";
2
+ import { A as C, At as w, Ct as T, E, St as D, T as O, Vt as k, Y as A, _t as j, bt as ee, gt as M, k as N, mt as P, n as F, q as I, r as L, st as R, vt as z, w as B, wt as V, xt as H, yt as U } from "./src-BNFnxfrA.js";
3
+ import { r as W } from "./dist-S-rLGqax.js";
4
+ import { L as G, P as te, c as ne, x as K } from "./keys-BTpmg2Tt.js";
5
+ import { t as re } from "./useI18n-CbVubQhM.js";
6
+ import { o as ie, s as q } from "./usePopoverPosition-C829ps5i.js";
7
+ import { ot as ae, s as oe } from "./icons-DNX6StSs.js";
8
+ //#region ../core/src/error-reporting.ts
9
+ function se(e) {
10
+ return e instanceof Error ? e : Error(String(e), { cause: e });
11
+ }
12
+ function J(e, t) {
13
+ try {
14
+ t();
15
+ } catch (t) {
16
+ e?.(se(t));
17
+ }
18
+ }
19
+ //#endregion
20
+ //#region ../core/src/editor.ts
21
+ function ce(t) {
22
+ let n = t.content ?? A(t.defaultFontFamily, t.templateDefaults);
23
+ O(n), E(n);
24
+ let i = c({
25
+ template: null,
26
+ content: n,
27
+ selectedBlockId: null,
28
+ viewport: "desktop",
29
+ darkMode: !1,
30
+ previewMode: !1,
31
+ isDirty: !1,
32
+ isSaving: !1,
33
+ isLoading: !1,
34
+ uiTheme: "auto"
35
+ }), o = e(0), s = 0, l = 0;
36
+ function u() {
37
+ i.isDirty = !0, l++;
38
+ }
39
+ let d = r({
40
+ get: () => i.content,
41
+ set: (e) => {
42
+ i.content = e, u();
43
+ }
44
+ }), f = r(() => i.selectedBlockId ? p(i.content.blocks, i.selectedBlockId) : null);
45
+ function p(e, t) {
46
+ for (let n of e) {
47
+ if (n.id === t) return n;
48
+ if (n.type === "section") for (let e of n.children) {
49
+ let n = p(e, t);
50
+ if (n) return n;
51
+ }
52
+ }
53
+ return null;
54
+ }
55
+ function m(e, t) {
56
+ if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) m(e, t);
57
+ }
58
+ function h(e, t, n = { blocks: e }) {
59
+ for (let r = 0; r < e.length; r++) {
60
+ let i = e[r];
61
+ if (i.id === t) return n;
62
+ if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
63
+ let n = h(i.children[e], t, {
64
+ blocks: i.children[e],
65
+ sectionId: i.id,
66
+ columnIndex: e
67
+ });
68
+ if (n) return n;
69
+ }
70
+ }
71
+ return null;
72
+ }
73
+ function g(e) {
74
+ return t.lockedBlocks?.value.has(e) ?? !1;
75
+ }
76
+ function _(e) {
77
+ let t = h(i.content.blocks, e);
78
+ if (!t) return null;
79
+ let n = t.blocks.findIndex((t) => t.id === e);
80
+ return n === -1 ? null : {
81
+ targetSectionId: t.sectionId,
82
+ columnIndex: t.columnIndex,
83
+ index: n
84
+ };
85
+ }
86
+ function v(e, t = !0) {
87
+ O(e), E(e), i.content = e, t && u();
88
+ }
89
+ function y(e) {
90
+ e && g(e) || (i.selectedBlockId = e);
91
+ }
92
+ function b(e) {
93
+ i.viewport = e;
94
+ }
95
+ function x(e) {
96
+ i.darkMode = e;
97
+ }
98
+ function S(e) {
99
+ i.uiTheme = e;
100
+ }
101
+ function C(e) {
102
+ i.previewMode = e, e && (i.selectedBlockId = null);
103
+ }
104
+ function w(e, t) {
105
+ if (g(e)) return;
106
+ let n = p(i.content.blocks, e);
107
+ n && (Object.assign(n, t), u());
108
+ }
109
+ function T(e) {
110
+ i.content.settings = {
111
+ ...i.content.settings,
112
+ ...e
113
+ }, u();
114
+ }
115
+ function D(e, t, n = 0, r) {
116
+ let a = {
117
+ settings: i.content.settings,
118
+ blocks: [e]
119
+ };
120
+ if (O(a), E(a), !(t && e.type === "section")) {
121
+ if (t) {
122
+ if (g(t)) return;
123
+ let a = p(i.content.blocks, t);
124
+ if (a && a.type === "section") {
125
+ if (n < 0 || n >= H(a.columns)) return;
126
+ a.children[n] = a.children[n] || [];
127
+ let t = a.children[n];
128
+ r !== void 0 && r < t.length ? t.splice(r, 0, e) : t.push(e);
129
+ }
130
+ } else r !== void 0 && r < i.content.blocks.length ? i.content.blocks.splice(r, 0, e) : i.content.blocks.push(e);
131
+ u();
132
+ }
133
+ }
134
+ function k(e) {
135
+ if (g(e)) return;
136
+ let t = h(i.content.blocks, e);
137
+ if (t) {
138
+ let n = t.blocks.findIndex((t) => t.id === e);
139
+ if (n !== -1) {
140
+ let [e] = t.blocks.splice(n, 1);
141
+ if (i.selectedBlockId) {
142
+ let t = /* @__PURE__ */ new Set();
143
+ m(e, t), t.has(i.selectedBlockId) && (i.selectedBlockId = null);
144
+ }
145
+ u();
146
+ }
147
+ }
148
+ }
149
+ function j(e, t, n, r = 0) {
150
+ if (g(e) || n && g(n)) return;
151
+ let a = h(i.content.blocks, e);
152
+ if (!a) return;
153
+ let o = a.blocks.findIndex((t) => t.id === e);
154
+ if (o === -1 || n && a.blocks[o].type === "section") return;
155
+ let s;
156
+ if (n) {
157
+ let e = p(i.content.blocks, n);
158
+ if (!e || e.type !== "section" || r < 0 || r >= H(e.columns)) return;
159
+ e.children[r] = e.children[r] || [], s = e.children[r];
160
+ } else s = i.content.blocks;
161
+ let [c] = a.blocks.splice(o, 1);
162
+ s.splice(t, 0, c), u();
163
+ }
164
+ function ee() {
165
+ u();
166
+ }
167
+ function N(e, t) {
168
+ throw new M(`[Templatical] Templates: ${e} ${t}`);
169
+ }
170
+ function P(e) {
171
+ J(t.onError, e);
172
+ }
173
+ function F(e) {
174
+ let { templates: n } = t;
175
+ return n || N(e, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
176
+ }
177
+ function I(e) {
178
+ i.template && (i.template = {
179
+ ...i.template,
180
+ name: e
181
+ }, u());
182
+ }
183
+ async function L(e) {
184
+ let n = F("create()"), { create: r } = n;
185
+ typeof r != "function" && N("create()", "is disabled by the provider — its `create` is `false`.");
186
+ let a, c = ++s;
187
+ i.isLoading = !0;
188
+ try {
189
+ e?.content && (i.content = e.content);
190
+ let t = l;
191
+ a = await r(e?.name === void 0 ? { content: i.content } : {
192
+ name: e.name,
193
+ content: i.content
194
+ }), i.template = a, l === t && (i.isDirty = !1), o.value++;
195
+ } catch (e) {
196
+ throw t.onError?.(e), e;
197
+ } finally {
198
+ s === c && (i.isLoading = !1);
199
+ }
200
+ return P(() => n.onCreated?.(a)), a;
201
+ }
202
+ async function R(e, n) {
203
+ let r = F("load()"), a, c = ++s;
204
+ i.isLoading = !0;
205
+ try {
206
+ if (a = await r.load(e), O(a.content), E(a.content), n && !n()) return a;
207
+ i.template = a, i.content = a.content, i.isDirty = !1, o.value++;
208
+ } catch (e) {
209
+ throw t.onError?.(e), e;
210
+ } finally {
211
+ s === c && (i.isLoading = !1);
212
+ }
213
+ return P(() => r.onLoaded?.(a)), a;
214
+ }
215
+ async function z(e = "api") {
216
+ let n = F("save()"), { save: r } = n;
217
+ typeof r != "function" && N("save()", "is disabled by the provider — its `save` is `false`.");
218
+ let a = i.template;
219
+ a || N("save()", "has no template loaded. Call create() or load() first.");
220
+ let o = a.name === void 0 ? { content: i.content } : {
221
+ name: a.name,
222
+ content: i.content
223
+ }, s;
224
+ i.isSaving = !0;
225
+ try {
226
+ let e = l;
227
+ if (s = await r(a.id, o), i.template?.id === a.id) {
228
+ let e = i.template.name;
229
+ i.template = e === a.name ? s : {
230
+ ...s,
231
+ name: e
232
+ };
233
+ }
234
+ l === e && (i.isDirty = !1);
235
+ } catch (e) {
236
+ throw t.onError?.(e), e;
237
+ } finally {
238
+ i.isSaving = !1;
239
+ }
240
+ return P(() => n.onSaved?.(s, { trigger: e })), s;
241
+ }
242
+ function B() {
243
+ return i.template?.id !== void 0;
244
+ }
245
+ return {
246
+ state: a(i),
247
+ loadVersion: a(o),
248
+ content: d,
249
+ selectedBlock: f,
250
+ isBlockLocked: g,
251
+ setContent: v,
252
+ selectBlock: y,
253
+ setViewport: b,
254
+ setDarkMode: x,
255
+ setUiTheme: S,
256
+ setPreviewMode: C,
257
+ updateBlock: w,
258
+ updateSettings: T,
259
+ addBlock: D,
260
+ removeBlock: k,
261
+ moveBlock: j,
262
+ markDirty: ee,
263
+ findBlockLocation: _,
264
+ setName: I,
265
+ create: L,
266
+ load: R,
267
+ save: z,
268
+ hasTemplate: B
269
+ };
270
+ }
271
+ //#endregion
272
+ //#region ../core/src/history.ts
273
+ var le = 50, ue = 300, de = 1500;
274
+ function Y(t) {
275
+ let { content: n, setContent: i, maxSize: a = le } = t, o = e([]), s = e([]), c = e(!1), l = null, u = null, d = r(() => o.value.length > 0), f = r(() => s.value.length > 0);
276
+ function p() {
277
+ return T(n.value);
278
+ }
279
+ function m(e) {
280
+ o.value.push(e), o.value.length > a && o.value.splice(0, o.value.length - a);
281
+ }
282
+ function h() {
283
+ u &&= (clearTimeout(u.timeoutId), null);
284
+ }
285
+ function g() {
286
+ h(), m(p()), s.value = [];
287
+ }
288
+ function _(e) {
289
+ u && u.blockId === e ? (clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
290
+ u = null;
291
+ }, ue)) : (h(), m(p()), s.value = [], u = {
292
+ blockId: e,
293
+ timeoutId: setTimeout(() => {
294
+ u = null;
295
+ }, ue)
296
+ });
297
+ }
298
+ function v() {
299
+ c.value = !0, l && clearTimeout(l), l = setTimeout(() => {
300
+ c.value = !1, l = null;
301
+ }, de);
302
+ }
303
+ function y() {
304
+ if (o.value.length === 0) return;
305
+ h();
306
+ let e = o.value.pop();
307
+ s.value.push(p()), i(e, !0), v();
308
+ }
309
+ function b() {
310
+ if (s.value.length === 0) return;
311
+ h();
312
+ let e = s.value.pop();
313
+ o.value.push(p()), i(e, !0), v();
314
+ }
315
+ function x() {
316
+ o.value = [], s.value = [], h();
317
+ }
318
+ function S() {
319
+ x(), l &&= (clearTimeout(l), null);
320
+ }
321
+ return {
322
+ canUndo: d,
323
+ canRedo: f,
324
+ isNavigating: c,
325
+ undo: y,
326
+ redo: b,
327
+ record: g,
328
+ recordDebounced: _,
329
+ clear: x,
330
+ destroy: S
331
+ };
332
+ }
333
+ //#endregion
334
+ //#region ../core/src/block-actions.ts
335
+ function fe(e) {
336
+ let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
337
+ function o(n, r, a) {
338
+ let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = C(n, o);
339
+ return t(s, r, a), i(s.id), s;
340
+ }
341
+ function s(e, n, r) {
342
+ let o = N(e);
343
+ if (n !== void 0 || r !== void 0) t(o, n, r);
344
+ else {
345
+ let i = a?.(e.id) ?? null;
346
+ i ? t(o, i.targetSectionId, i.columnIndex, i.index + 1) : t(o, n, r);
347
+ }
348
+ return i(o.id), o;
349
+ }
350
+ function c(e) {
351
+ n(e);
352
+ }
353
+ function l(e, t, n) {
354
+ r(e, { [t]: n });
355
+ }
356
+ return {
357
+ createAndAddBlock: o,
358
+ duplicateBlock: s,
359
+ deleteBlock: c,
360
+ updateBlockProperty: l
361
+ };
362
+ }
363
+ //#endregion
364
+ //#region ../core/src/auto-save.ts
365
+ var pe = 2e3;
366
+ function X(e) {
367
+ let { content: t, isDirty: n, onChange: r, debounce: i = pe, enabled: a = !0 } = e, o = null, s = !1;
368
+ function c() {
369
+ return typeof a == "function" ? a() : a;
370
+ }
371
+ function l() {
372
+ s = !0, d();
373
+ }
374
+ function u() {
375
+ s = !1;
376
+ }
377
+ function d() {
378
+ o &&= (clearTimeout(o), null);
379
+ }
380
+ function f() {
381
+ d(), n() && r(JSON.parse(JSON.stringify(t.value)));
382
+ }
383
+ function p() {
384
+ c() && !s && (d(), o = setTimeout(() => {
385
+ o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
386
+ }, i));
387
+ }
388
+ let m = v(t, () => {
389
+ p();
390
+ }, { deep: !0 });
391
+ function h() {
392
+ m(), d();
393
+ }
394
+ return {
395
+ flush: f,
396
+ cancel: d,
397
+ pause: l,
398
+ resume: u,
399
+ destroy: h
400
+ };
401
+ }
402
+ //#endregion
403
+ //#region ../core/src/condition-preview.ts
404
+ function me(e) {
405
+ let t = c(/* @__PURE__ */ new Set()), n = r(() => t.size > 0);
406
+ function i(e) {
407
+ return t.has(e);
408
+ }
409
+ function a(n) {
410
+ t.has(n) ? t.delete(n) : (t.add(n), e.state.selectedBlockId === n && e.selectBlock(null));
411
+ }
412
+ function o() {
413
+ t.clear();
414
+ }
415
+ return {
416
+ isHidden: i,
417
+ toggleBlock: a,
418
+ reset: o,
419
+ hasHiddenBlocks: n
420
+ };
421
+ }
422
+ //#endregion
423
+ //#region ../core/src/data-source-fetch.ts
424
+ function he(t) {
425
+ let n = e(!1), i = e(!1), a = r(() => !!t.definition.value?.dataSource), o = r(() => a.value && !t.block.value.dataSourceFetched);
426
+ async function s() {
427
+ let e = t.definition.value;
428
+ if (e?.dataSource) {
429
+ n.value = !0, i.value = !1;
430
+ try {
431
+ let n = await e.dataSource.onFetch({
432
+ fieldValues: { ...t.block.value.fieldValues },
433
+ blockId: t.block.value.id
434
+ });
435
+ if (n == null) return;
436
+ let r = { ...t.block.value.fieldValues };
437
+ for (let e of Object.keys(r)) e in n && (r[e] = n[e]);
438
+ t.onUpdate(r, !0);
439
+ } catch (e) {
440
+ console.warn("[Templatical] Data source fetch error:", e), i.value = !0;
441
+ } finally {
442
+ n.value = !1;
443
+ }
444
+ }
445
+ }
446
+ return {
447
+ isFetching: n,
448
+ fetchError: i,
449
+ fetch: s,
450
+ hasDataSource: a,
451
+ needsFetch: o
452
+ };
453
+ }
454
+ //#endregion
455
+ //#region ../core/src/history-interceptor.ts
456
+ function ge(e, t) {
457
+ let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
458
+ e.addBlock = (r, i, a, o) => {
459
+ i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
460
+ }, e.removeBlock = (n) => {
461
+ e.isBlockLocked(n) || (t.record(), r(n));
462
+ }, e.moveBlock = (n, r, a, o) => {
463
+ e.isBlockLocked(n) || a && e.isBlockLocked(a) || (t.record(), i(n, r, a, o));
464
+ }, e.updateBlock = (n, r) => {
465
+ e.isBlockLocked(n) || (t.recordDebounced(n), a(n, r));
466
+ }, e.updateSettings = (e) => {
467
+ t.record(), o(e);
468
+ };
469
+ }
470
+ //#endregion
471
+ //#region ../core/src/diff-content.ts
472
+ var _e = "root", ve = /* @__PURE__ */ new Set([
473
+ "id",
474
+ "type",
475
+ "children"
476
+ ]), ye = /* @__PURE__ */ new Set([
477
+ "id",
478
+ "type",
479
+ "children",
480
+ "columns"
481
+ ]), be = /* @__PURE__ */ new Set();
482
+ function xe(e) {
483
+ return e === null ? _e : JSON.stringify([e.sectionId, e.column]);
484
+ }
485
+ function Z(e) {
486
+ let t = e.children;
487
+ return e.type === "section" && Array.isArray(t) ? t : [];
488
+ }
489
+ function Se(e) {
490
+ let t = /* @__PURE__ */ new Map(), n = (e, r) => {
491
+ e.forEach((e, i) => {
492
+ t.has(e.id) || t.set(e.id, {
493
+ block: e,
494
+ key: xe(r),
495
+ index: i
496
+ }), Z(e).forEach((t, r) => {
497
+ Array.isArray(t) && n(t, {
498
+ sectionId: e.id,
499
+ column: r
500
+ });
501
+ });
502
+ });
503
+ };
504
+ return n(e, null), t;
505
+ }
506
+ function Ce(e) {
507
+ let t = [], n = Array(e.length).fill(-1);
508
+ e.forEach((r, i) => {
509
+ let a = 0, o = t.length;
510
+ for (; a < o;) {
511
+ let n = a + o >> 1;
512
+ e[t[n]] < r ? a = n + 1 : o = n;
513
+ }
514
+ a > 0 && (n[i] = t[a - 1]), t[a] = i;
515
+ });
516
+ let r = /* @__PURE__ */ new Set(), i = t.length > 0 ? t[t.length - 1] : -1;
517
+ for (; i !== -1;) r.add(i), i = n[i];
518
+ return r;
519
+ }
520
+ function we(e, t, n) {
521
+ let r = {}, i = [];
522
+ for (let i of Object.keys(t)) n.has(i) || t[i] === void 0 || D(e[i], t[i]) || (r[i] = T(t[i]));
523
+ for (let r of Object.keys(e)) n.has(r) || e[r] === void 0 || t[r] === void 0 && i.push(r);
524
+ return {
525
+ set: r,
526
+ unset: i
527
+ };
528
+ }
529
+ function Te(e, t) {
530
+ let n = Se(e.blocks), r = Se(t.blocks), i = [], a = (e) => {
531
+ let t = r.get(e), i = n.get(e);
532
+ return t !== void 0 && i !== void 0 && t.block.type !== i.block.type;
533
+ }, o = (e) => r.has(e.id) && !a(e.id), s = (e) => Z(e).some((e) => Array.isArray(e) && e.some((e) => o(e) || !a(e.id) && s(e))), c = /* @__PURE__ */ new Set(), l = [], u = (e, t) => {
534
+ let n = "kept";
535
+ t === "dropped" ? (c.add(e.id), n = "dropped") : a(e.id) ? (i.push({
536
+ op: "deleteBlock",
537
+ blockId: e.id
538
+ }), c.add(e.id), n = "dropped") : r.has(e.id) || (t === "deferred" ? n = "deferred" : s(e) ? (l.push(e.id), n = "deferred") : (i.push({
539
+ op: "deleteBlock",
540
+ blockId: e.id
541
+ }), c.add(e.id), n = "dropped"));
542
+ for (let t of Z(e)) if (Array.isArray(t)) for (let e of t) u(e, n);
543
+ };
544
+ for (let t of e.blocks) u(t, "kept");
545
+ let d = (e) => n.has(e) && !c.has(e), f = (e) => {
546
+ let t = T(e);
547
+ return t.type === "section" && (t.children = Z(e).map((e) => Array.isArray(e) ? e.filter((e) => !d(e.id)).map((e) => T(e)) : e)), t;
548
+ }, p = (e, t, r) => {
549
+ let a = xe(e), o = [], s = [];
550
+ t.forEach((e, t) => {
551
+ let r = n.get(e.id);
552
+ d(e.id) && r !== void 0 && r.key === a && (o.push(r.index), s.push(t));
553
+ });
554
+ let c = new Set([...Ce(o)].map((e) => s[e]));
555
+ t.forEach((n, a) => {
556
+ if (c.has(a) || r(n)) return;
557
+ let o = a > 0 ? t[a - 1].id : null;
558
+ i.push(d(n.id) ? {
559
+ op: "moveBlock",
560
+ blockId: n.id,
561
+ parent: e,
562
+ after: o
563
+ } : {
564
+ op: "addBlock",
565
+ block: f(n),
566
+ parent: e,
567
+ after: o
568
+ });
569
+ });
570
+ };
571
+ p(null, t.blocks, () => !1);
572
+ let m = t.blocks.filter((e) => e.type === "section"), h = /* @__PURE__ */ new Set(), g = (e) => {
573
+ for (let t of m) {
574
+ if (!d(t.id)) continue;
575
+ let r = Z(n.get(t.id).block).length, a = Z(t).length;
576
+ (e ? a > r : a < r) && (i.push({
577
+ op: "updateBlock",
578
+ blockId: t.id,
579
+ set: { columns: t.columns }
580
+ }), h.add(t.id));
581
+ }
582
+ };
583
+ g(!0);
584
+ for (let e of m) {
585
+ let t = !d(e.id);
586
+ Z(e).forEach((n, r) => {
587
+ Array.isArray(n) && p({
588
+ sectionId: e.id,
589
+ column: r
590
+ }, n, (e) => t && !d(e.id));
591
+ });
592
+ }
593
+ g(!1);
594
+ for (let e of l) i.push({
595
+ op: "deleteBlock",
596
+ blockId: e
597
+ });
598
+ for (let [e, t] of r) {
599
+ if (!d(e)) continue;
600
+ let { set: r, unset: a } = we(n.get(e).block, t.block, h.has(e) ? ye : ve);
601
+ (Object.keys(r).length !== 0 || a.length !== 0) && i.push({
602
+ op: "updateBlock",
603
+ blockId: e,
604
+ ...Object.keys(r).length > 0 ? { set: r } : {},
605
+ ...a.length > 0 ? { unset: a } : {}
606
+ });
607
+ }
608
+ let _ = we(e.settings, t.settings, be);
609
+ return (Object.keys(_.set).length > 0 || _.unset.length > 0) && i.push({
610
+ op: "updateSettings",
611
+ ...Object.keys(_.set).length > 0 ? { set: _.set } : {},
612
+ ..._.unset.length > 0 ? { unset: _.unset } : {}
613
+ }), i;
614
+ }
615
+ var Ee = 1e3, De = 1e4, Oe = [
616
+ 1e3,
617
+ 2e3,
618
+ 5e3,
619
+ 1e4,
620
+ 3e4
621
+ ], ke = 50, Ae = 100, Q = /* @__PURE__ */ new Set([
622
+ "block_exists",
623
+ "block_missing",
624
+ "anchor_missing",
625
+ "precondition_failed",
626
+ "lock_held",
627
+ "locked_by_others",
628
+ "invalid_operation",
629
+ "lock_lost",
630
+ "content_too_large"
631
+ ]);
632
+ function je(e) {
633
+ let t = e?.code;
634
+ return typeof t == "string" && Q.has(t) ? t : null;
635
+ }
636
+ function Me(e) {
637
+ let t = e?.holder;
638
+ return typeof t == "object" && t && typeof t.sessionId == "string" ? t : void 0;
639
+ }
640
+ function Ne(e) {
641
+ let t = e?.statusCode;
642
+ return typeof t != "number" || t >= 500 || t === 408 || t === 429;
643
+ }
644
+ function Pe(e, t) {
645
+ return e.some((e) => {
646
+ if (e.id === t) return !0;
647
+ let n = e.children;
648
+ return e.type === "section" && Array.isArray(n) && n.some((e) => Array.isArray(e) && Pe(e, t));
649
+ });
650
+ }
651
+ function Fe(e) {
652
+ if (e.length === 1 && e[0].op === "updateSettings") return !0;
653
+ let t = e[0];
654
+ return t.op === "updateBlock" && e.every((e) => e.op === "updateBlock" && e.blockId === t.blockId);
655
+ }
656
+ function Ie(e) {
657
+ return e.map((e) => {
658
+ if (!("expect" in e)) return e;
659
+ let { expect: t, ...n } = e;
660
+ return n;
661
+ });
662
+ }
663
+ function Le(t) {
664
+ let { provider: n } = t, i = t.sessionId ?? crypto.randomUUID(), a = t.maxUndo ?? ke, o = typeof n.acquireLock == "function" && typeof n.renewLock == "function" && typeof n.releaseLock == "function", c = y([]), l = y(/* @__PURE__ */ new Map()), u = e(null), d = e(0), f = e(0), p = null, m = null, h = !1, g = !1, b = !1, x = null, S = 0, C = !1, w = [], E = null, O = null, k = Promise.resolve(), A = null, M = r(() => (m?.undo.length ?? 0) > 0), N = r(() => (m?.redo.length ?? 0) > 0);
665
+ function P(e) {
666
+ t.onError?.(e instanceof Error ? e : Error(String(e)));
667
+ }
668
+ function F(e, n = m) {
669
+ n !== m || C || t.onNotice?.(e);
670
+ }
671
+ function I() {
672
+ return {
673
+ locks: [...l.value.values()].map((e) => ({
674
+ blockId: e.blockId,
675
+ sessionId: e.holder.sessionId
676
+ })),
677
+ session: i
678
+ };
679
+ }
680
+ function L() {
681
+ f.value++;
682
+ }
683
+ function R(e, t) {
684
+ e.push(t), e.length > a && e.splice(0, e.length - a);
685
+ }
686
+ function B(e) {
687
+ if (!p || h) return;
688
+ g = !0;
689
+ try {
690
+ let t = p.content.value, n = Te(t, e);
691
+ if (n.length > 0) try {
692
+ ee(t, n);
693
+ } catch {
694
+ p.setContent(T(e), !1);
695
+ }
696
+ D(p.content.value, e) || p.setContent(T(e), !1);
697
+ } finally {
698
+ g = !1;
699
+ }
700
+ let t = p.state.selectedBlockId;
701
+ t && !Pe(e.blocks, t) && p.selectBlock(null);
702
+ }
703
+ function V() {
704
+ g || b || (b = !0, queueMicrotask(() => {
705
+ b = !1, W(!1);
706
+ }));
707
+ }
708
+ function H() {
709
+ x &&= (clearTimeout(x), null);
710
+ }
711
+ function W(e, t = !1) {
712
+ let n = m;
713
+ if (!p || !n || h || g || p.state.isLoading && !t || p.state.template?.id !== n.templateId) return;
714
+ let r = Te(n.view, p.content.value);
715
+ if (r.length === 0) H();
716
+ else {
717
+ if (!e && Fe(r)) {
718
+ let e = Date.now();
719
+ if (x === null && (S = e), e - S < 1e3) {
720
+ x && clearTimeout(x), x = setTimeout(() => {
721
+ x = null, W(!0);
722
+ }, 300);
723
+ return;
724
+ }
725
+ }
726
+ H(), te(n, r);
727
+ }
728
+ }
729
+ function G() {
730
+ W(!0);
731
+ }
732
+ function te(e, t) {
733
+ let n = t, r;
734
+ try {
735
+ r = U(e.view, n, I());
736
+ } catch (t) {
737
+ if (!(t instanceof z)) throw t;
738
+ B(e.view);
739
+ let n = t.blockId === void 0 ? void 0 : l.value.get(t.blockId)?.holder;
740
+ F({
741
+ type: "editRefused",
742
+ code: t.code,
743
+ ...n ? { holder: n } : {}
744
+ }), t.code === "invalid_operation" && P(t);
745
+ return;
746
+ }
747
+ let i = p.content.value;
748
+ if (!D(r, i)) {
749
+ P(/* @__PURE__ */ Error("[Templatical] Collaboration: a change couldn't be expressed as block operations, so the whole content was sent.")), n = [{
750
+ op: "setContent",
751
+ content: T(i)
752
+ }];
753
+ try {
754
+ r = U(e.view, n, I());
755
+ } catch (t) {
756
+ if (!(t instanceof z)) throw t;
757
+ B(e.view), F({
758
+ type: "editRefused",
759
+ code: t.code
760
+ });
761
+ return;
762
+ }
763
+ }
764
+ let a = { ops: j(e.view, n) };
765
+ R(e.undo, a), e.redo = [], L(), e.view = r, ne(e, n, "edit", a);
766
+ }
767
+ function ne(e, t, n, r) {
768
+ let i = { dropped: !1 }, a = 0;
769
+ do
770
+ e.pending.push({
771
+ batchId: crypto.randomUUID(),
772
+ ops: t.slice(a, a + Ae),
773
+ origin: n,
774
+ entry: r,
775
+ group: i,
776
+ sent: !1,
777
+ revision: null
778
+ }), a += Ae;
779
+ while (a < t.length);
780
+ K(e);
781
+ }
782
+ function K(e) {
783
+ if (e.inFlight) return;
784
+ let t = e.pending.find((e) => !e.sent);
785
+ t ? (t.sent = !0, e.inFlight = t, re(e, t, 0)) : J(e);
786
+ }
787
+ function re(e, t, r) {
788
+ n.submit(e.templateId, {
789
+ batchId: t.batchId,
790
+ baseRevision: e.revision,
791
+ ops: t.ops,
792
+ ...t.origin === "ai" ? { origin: "ai" } : {}
793
+ }).then(({ revision: n }) => {
794
+ e.inFlight = null, ie(e, t, n), K(e);
795
+ }, (n) => {
796
+ if (je(n) !== null) e.inFlight = null, se(e, t, n), K(e);
797
+ else if (Ne(n)) {
798
+ ce(e, n);
799
+ let i = Oe[Math.min(r, Oe.length - 1)];
800
+ setTimeout(() => {
801
+ C || re(e, t, r + 1);
802
+ }, i);
803
+ } else e.inFlight = null, P(n), se(e, t, n), K(e);
804
+ });
805
+ }
806
+ function ie(e, t, n) {
807
+ t.revision === null && (t.revision = n, n <= e.revision ? (q(e, t), Y(e)) : (e.own.set(n, t), de(e)));
808
+ }
809
+ function q(e, t) {
810
+ e.pending = e.pending.filter((e) => e !== t), J(e);
811
+ }
812
+ function ae(e, t) {
813
+ if (t.entry) {
814
+ for (let n of [e.undo, e.redo]) {
815
+ let e = n.indexOf(t.entry);
816
+ e !== -1 && n.splice(e, 1);
817
+ }
818
+ L();
819
+ }
820
+ }
821
+ function oe(e, t) {
822
+ let n = !t.group.dropped;
823
+ return t.group.dropped = !0, e.pending = e.pending.filter((e) => e.group !== t.group || e.sent), n && ae(e, t), J(e), n;
824
+ }
825
+ function se(e, t, n) {
826
+ if (q(e, t), oe(e, t)) {
827
+ let r = je(n) ?? "invalid_operation";
828
+ if (t.origin === "edit" || t.origin === "ai") {
829
+ let t = Me(n);
830
+ F({
831
+ type: "editRefused",
832
+ code: r,
833
+ ...t ? { holder: t } : {}
834
+ }, e);
835
+ } else F({
836
+ type: "undoSkipped",
837
+ code: r
838
+ }, e);
839
+ }
840
+ Y(e), e === m && X();
841
+ }
842
+ function J(e) {
843
+ if (!(e.pending.length > 0 || e.waiters.length === 0)) for (let t of e.waiters.splice(0)) t.resolve();
844
+ }
845
+ function ce(e, t) {
846
+ let n = t instanceof Error ? t : Error(String(t));
847
+ for (let t of e.waiters.splice(0)) t.reject(n);
848
+ }
849
+ function le(e, t) {
850
+ if (t.revision <= e.revision) return;
851
+ let n = e.pending.find((e) => e.batchId === t.batchId);
852
+ n ? ie(e, n, t.revision) : (e.remote.set(t.revision, t), de(e));
853
+ }
854
+ function ue(e, n) {
855
+ let r = n.ops;
856
+ if (t.normalizeRemoteOperations) try {
857
+ r = t.normalizeRemoteOperations(n.ops, e.confirmed);
858
+ } catch (e) {
859
+ P(e);
860
+ }
861
+ return Ie(r);
862
+ }
863
+ function de(e) {
864
+ let n = [], r = !1;
865
+ for (;;) {
866
+ let t = e.revision + 1, i = e.remote.get(t), a = e.own.get(t);
867
+ if (!i && !a) break;
868
+ try {
869
+ e.confirmed = U(e.confirmed, i ? ue(e, i) : a.ops);
870
+ } catch {
871
+ if (e.recovering) {
872
+ e.remote.clear(), e.own.clear(), P(/* @__PURE__ */ Error("[Templatical] Collaboration: this editor can't follow the template's changes. Reload the page."));
873
+ return;
874
+ }
875
+ me(e);
876
+ return;
877
+ }
878
+ e.revision = t, i ? (e.remote.delete(t), n.push(i)) : (e.own.delete(t), a.group.dropped && (r = !0), q(e, a));
879
+ }
880
+ if (e === m && (d.value = e.revision), e.remote.size > 0 || e.own.size > 0 ? fe(e) : pe(e), (n.length !== 0 || r) && (Y(e), e === m)) for (let e of n) try {
881
+ t.onRemoteChange?.({
882
+ actor: e.actor,
883
+ ops: e.ops
884
+ });
885
+ } catch (e) {
886
+ P(e);
887
+ }
888
+ }
889
+ function Y(e) {
890
+ e === m && G();
891
+ let t = e.confirmed;
892
+ for (let n = 0; n < e.pending.length; n++) {
893
+ let r = e.pending[n];
894
+ try {
895
+ t = U(t, r.ops);
896
+ } catch (i) {
897
+ if (r.sent) continue;
898
+ if (oe(e, r)) {
899
+ let t = i instanceof z ? i.code : "invalid_operation";
900
+ F(r.origin === "edit" || r.origin === "ai" ? {
901
+ type: "editRefused",
902
+ code: t
903
+ } : {
904
+ type: "undoSkipped",
905
+ code: t
906
+ }, e);
907
+ }
908
+ t = e.confirmed, n = -1;
909
+ }
910
+ }
911
+ e.view = t, J(e), e === m && B(t);
912
+ }
913
+ function fe(e) {
914
+ e.gapTimer ||= setTimeout(() => {
915
+ e.gapTimer = null, e === m && X();
916
+ }, Ee);
917
+ }
918
+ function pe(e) {
919
+ e.gapTimer &&= (clearTimeout(e.gapTimer), null);
920
+ }
921
+ function X() {
922
+ let e = m;
923
+ return e ? (e.catchingUp ||= (async () => {
924
+ try {
925
+ let t = await n.operationsAfter(e.templateId, e.revision);
926
+ if (e.retired) return;
927
+ if ("resync" in t) {
928
+ await me(e);
929
+ return;
930
+ }
931
+ for (let n of t.batches) le(e, n);
932
+ } catch (e) {
933
+ P(e);
934
+ } finally {
935
+ e.catchingUp = null;
936
+ }
937
+ })(), e.catchingUp) : Promise.resolve();
938
+ }
939
+ async function me(e) {
940
+ e.recovering = !0;
941
+ try {
942
+ let n = await t.loadTemplate(e.templateId);
943
+ if (e.retired) return;
944
+ let r = n.revision ?? e.revision;
945
+ e.confirmed = T(n.content), e.revision = r, e.remote = new Map([...e.remote].filter(([e]) => e > r));
946
+ for (let [t, n] of [...e.own]) t <= r && (e.own.delete(t), q(e, n));
947
+ e === m && (d.value = r), Y(e), de(e);
948
+ } catch (e) {
949
+ P(e);
950
+ } finally {
951
+ e.recovering = !1;
952
+ }
953
+ }
954
+ function he(e) {
955
+ let n = () => e === m && !e.retired;
956
+ return {
957
+ onBatch: (t) => {
958
+ n() && le(e, t);
959
+ },
960
+ onResync: (r, i) => {
961
+ if (!(!n() || r <= e.revision)) {
962
+ if (i) try {
963
+ t.onRemoteResync?.({
964
+ revision: r,
965
+ actor: i
966
+ });
967
+ } catch (e) {
968
+ P(e);
969
+ }
970
+ X();
971
+ }
972
+ },
973
+ onLock: (e) => {
974
+ n() && xe(e);
975
+ },
976
+ onUnlock: (e, t) => {
977
+ n() && Z(e, t);
978
+ },
979
+ onMembers: (e) => {
980
+ n() && Ce(e);
981
+ },
982
+ onConnectionChange: (t) => {
983
+ n() && ye(e, t);
984
+ }
985
+ };
986
+ }
987
+ function ge(e, t) {
988
+ n.join(e.templateId, { sessionId: i }, he(e)).then((n) => {
989
+ e.retired || e !== m ? t || n.leave() : (e.leave = n.leave, Se(n.locks, !t), Ce(n.members), n.members.length > 0 && (u.value = "connected"), n.revision > e.revision && X(), t && Q());
990
+ }, (e) => P(e));
991
+ }
992
+ function _e(e) {
993
+ let t = T(e.content), n = {
994
+ templateId: e.id,
995
+ confirmed: t,
996
+ revision: e.revision ?? 0,
997
+ pending: [],
998
+ view: T(t),
999
+ remote: /* @__PURE__ */ new Map(),
1000
+ own: /* @__PURE__ */ new Map(),
1001
+ inFlight: null,
1002
+ gapTimer: null,
1003
+ catchingUp: null,
1004
+ leave: null,
1005
+ retired: !1,
1006
+ recovering: !1,
1007
+ undo: [],
1008
+ redo: [],
1009
+ waiters: []
1010
+ };
1011
+ m = n, d.value = n.revision, L(), ge(n, !1), p?.state.selectedBlockId && Be(p.state.selectedBlockId), V();
1012
+ }
1013
+ function ve(e) {
1014
+ e.retired = !0, pe(e), e.leave?.(), e.leave = null, ce(e, /* @__PURE__ */ Error("[Templatical] The template was closed."));
1015
+ }
1016
+ function ye(e, t) {
1017
+ let n = u.value;
1018
+ u.value = t, t === "connected" && n !== null && n !== "connected" && ge(e, !0);
1019
+ }
1020
+ function be(e) {
1021
+ m && m.templateId === e?.id || (m &&= (H(), ve(m), null), c.value = [], l.value = /* @__PURE__ */ new Map(), u.value = null, E = null, Q(), L(), e && _e(e));
1022
+ }
1023
+ function xe(e) {
1024
+ if (e.holder.sessionId === i) return;
1025
+ let t = new Map([...l.value].filter(([, t]) => t.holder.sessionId !== e.holder.sessionId));
1026
+ t.set(e.blockId, e), l.value = t, p?.state.selectedBlockId === e.blockId && (p.selectBlock(null), F({
1027
+ type: "selectionRefused",
1028
+ blockId: e.blockId,
1029
+ holder: e.holder
1030
+ }));
1031
+ }
1032
+ function Z(e, t) {
1033
+ if (l.value.get(e)?.holder.sessionId !== t) return;
1034
+ let n = new Map(l.value);
1035
+ n.delete(e), l.value = n;
1036
+ }
1037
+ function Se(e, t) {
1038
+ let n = t ? new Map(l.value) : /* @__PURE__ */ new Map();
1039
+ for (let r of e) r.holder.sessionId !== i && (t && n.has(r.blockId) || n.set(r.blockId, r));
1040
+ l.value = n;
1041
+ }
1042
+ function Ce(e) {
1043
+ let t = new Set(e.map((e) => e.sessionId)), n = new Set(c.value.map((e) => e.sessionId).filter((e) => !t.has(e)));
1044
+ if (c.value = e, n.size === 0) return;
1045
+ let r = new Map([...l.value].filter(([, e]) => !n.has(e.holder.sessionId)));
1046
+ r.size !== l.value.size && (l.value = r);
1047
+ }
1048
+ function we(e) {
1049
+ k = k.then(e).catch(P);
1050
+ }
1051
+ function Q() {
1052
+ o && we(async () => {
1053
+ if (O && (E === null || O.templateId !== E.templateId)) {
1054
+ let e = O;
1055
+ O = null, $(), await n.releaseLock(e.templateId, e.blockId);
1056
+ }
1057
+ let e = E;
1058
+ if (!(!e || O?.templateId === e.templateId && O.blockId === e.blockId)) try {
1059
+ await n.acquireLock(e.templateId, e.blockId), O = e, ze(), Le(e.blockId);
1060
+ } catch (t) {
1061
+ if (O?.templateId === e.templateId) {
1062
+ let e = O;
1063
+ O = null, $(), await n.releaseLock(e.templateId, e.blockId).catch(() => {});
1064
+ }
1065
+ if (E !== e) return;
1066
+ Re(e.blockId, t);
1067
+ }
1068
+ });
1069
+ }
1070
+ function Le(e) {
1071
+ if (!l.value.has(e)) return;
1072
+ let t = new Map(l.value);
1073
+ t.delete(e), l.value = t;
1074
+ }
1075
+ function Re(e, t) {
1076
+ let n = je(t);
1077
+ if (n === "lock_held" || n === "block_missing") {
1078
+ E = null;
1079
+ let n = Me(t);
1080
+ n ? xe({
1081
+ blockId: e,
1082
+ holder: n,
1083
+ expiresAt: ""
1084
+ }) : p?.state.selectedBlockId === e && p.selectBlock(null);
1085
+ } else P(t), setTimeout(() => {
1086
+ E?.blockId === e && Q();
1087
+ }, Oe[0]);
1088
+ }
1089
+ function ze() {
1090
+ A ||= setInterval(() => {
1091
+ we(async () => {
1092
+ let e = O;
1093
+ if (e) try {
1094
+ await n.renewLock(e.templateId, e.blockId);
1095
+ } catch (e) {
1096
+ if (je(e) === "lock_lost") {
1097
+ O = null, $(), Q();
1098
+ return;
1099
+ }
1100
+ P(e);
1101
+ }
1102
+ });
1103
+ }, De);
1104
+ }
1105
+ function $() {
1106
+ A &&= (clearInterval(A), null);
1107
+ }
1108
+ function Be(e) {
1109
+ G(), m && (E = e ? {
1110
+ templateId: m.templateId,
1111
+ blockId: e
1112
+ } : null, Q());
1113
+ }
1114
+ function Ve() {
1115
+ G(), O && o && (n.releaseLock(O.templateId, O.blockId).catch(() => {}), O = null, $()), m?.leave?.(), m && (m.leave = null);
1116
+ }
1117
+ function He(e) {
1118
+ let t = m;
1119
+ if (!t || h) return;
1120
+ G();
1121
+ let n = (e === "undo" ? t.undo : t.redo).pop();
1122
+ if (!n) return;
1123
+ L();
1124
+ let r;
1125
+ try {
1126
+ r = U(t.view, n.ops, I());
1127
+ } catch (e) {
1128
+ if (!(e instanceof z)) throw e;
1129
+ F({
1130
+ type: "undoSkipped",
1131
+ code: e.code
1132
+ });
1133
+ return;
1134
+ }
1135
+ let i = { ops: j(t.view, n.ops) };
1136
+ R(e === "undo" ? t.redo : t.undo, i), t.view = r, B(r), p?.markDirty(), ne(t, n.ops, e, i);
1137
+ }
1138
+ function Ue(e, t) {
1139
+ let n = m;
1140
+ if (!p || !n || h) return {
1141
+ applied: !1,
1142
+ error: new z("invalid_operation", 0, "No template is open for editing.")
1143
+ };
1144
+ G();
1145
+ let r, i;
1146
+ try {
1147
+ r = U(n.view, e, I()), i = j(n.view, e);
1148
+ } catch (e) {
1149
+ if (e instanceof z) return {
1150
+ applied: !1,
1151
+ error: e
1152
+ };
1153
+ throw e;
1154
+ }
1155
+ let a = n.undo.at(-1), o;
1156
+ return a && a.turn === t.turn ? (a.ops = [...i, ...a.ops], o = a) : (o = {
1157
+ ops: i,
1158
+ turn: t.turn
1159
+ }, R(n.undo, o)), n.redo = [], L(), n.view = r, B(r), p.markDirty(), ne(n, e, t.origin, o), {
1160
+ applied: !0,
1161
+ inverse: i
1162
+ };
1163
+ }
1164
+ function We(e) {
1165
+ p = e, w.push(v(() => e.state.template, (e) => be(e), { immediate: !0 }), v(() => e.content.value, V, { deep: !0 }), v(() => e.state.selectedBlockId, Be), v(() => e.state.isLoading, (e) => e ? W(!0, !0) : V())), typeof window < "u" && (window.addEventListener("pagehide", Ve), window.addEventListener("blur", G)), _() && s(Je);
1166
+ }
1167
+ function Ge() {
1168
+ G();
1169
+ let e = m;
1170
+ return !e || e.pending.length === 0 ? Promise.resolve() : new Promise((t, n) => e.waiters.push({
1171
+ resolve: t,
1172
+ reject: n
1173
+ }));
1174
+ }
1175
+ function Ke() {
1176
+ G(), h = !0;
1177
+ }
1178
+ function qe() {
1179
+ h = !1, m && B(m.view);
1180
+ }
1181
+ function Je() {
1182
+ if (!C) {
1183
+ G();
1184
+ for (let e of w.splice(0)) e();
1185
+ H(), Ve(), C = !0, m && ve(m), m = null, $(), typeof window < "u" && (window.removeEventListener("pagehide", Ve), window.removeEventListener("blur", G));
1186
+ }
1187
+ }
1188
+ return {
1189
+ sessionId: i,
1190
+ members: c,
1191
+ locks: l,
1192
+ connection: u,
1193
+ revision: d,
1194
+ canUndo: M,
1195
+ canRedo: N,
1196
+ attach: We,
1197
+ undo: () => He("undo"),
1198
+ redo: () => He("redo"),
1199
+ clearHistory: () => {
1200
+ m && (m.undo = [], m.redo = [], L());
1201
+ },
1202
+ flush: G,
1203
+ settle: Ge,
1204
+ suspend: Ke,
1205
+ resume: qe,
1206
+ catchUp: X,
1207
+ hasConfirmedBlock: (e) => m ? Pe(m.confirmed.blocks, e) : !1,
1208
+ applyOperations: Ue,
1209
+ destroy: Je
1210
+ };
1211
+ }
1212
+ //#endregion
1213
+ //#region ../core/src/saved-blocks.ts
1214
+ function Re(t) {
1215
+ let { provider: n } = t, r = e([]), i = e(!1), a = g(() => {
1216
+ let e = /* @__PURE__ */ new Set();
1217
+ for (let t of r.value) {
1218
+ let n = t.category?.trim();
1219
+ n && e.add(n);
1220
+ }
1221
+ return [...e].sort((e, t) => e.localeCompare(t));
1222
+ }), o = g(() => typeof n.create == "function"), s = g(() => typeof n.update == "function"), c = g(() => typeof n.delete == "function");
1223
+ function l(e) {
1224
+ return s.value && e.canUpdate !== !1;
1225
+ }
1226
+ function u(e) {
1227
+ return c.value && e.canDelete !== !1;
1228
+ }
1229
+ function d(e, t) {
1230
+ throw new M(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
1231
+ }
1232
+ function f(e) {
1233
+ J(t.onError, e);
1234
+ }
1235
+ async function p(e) {
1236
+ i.value = !0;
1237
+ try {
1238
+ r.value = await n.list(e);
1239
+ } catch (e) {
1240
+ throw t.onError?.(e), e;
1241
+ } finally {
1242
+ i.value = !1;
1243
+ }
1244
+ }
1245
+ async function m(e, i, a) {
1246
+ let { create: o } = n;
1247
+ typeof o != "function" && d("create", "disabled by the provider");
1248
+ try {
1249
+ let t = await o(a ? {
1250
+ name: e,
1251
+ content: i,
1252
+ category: a
1253
+ } : {
1254
+ name: e,
1255
+ content: i
1256
+ });
1257
+ return r.value = [t, ...r.value], f(() => n.onCreated?.(t)), t;
1258
+ } catch (e) {
1259
+ throw t.onError?.(e), e;
1260
+ }
1261
+ }
1262
+ async function h(e, i) {
1263
+ let { update: a } = n;
1264
+ typeof a != "function" && d("update", "disabled by the provider");
1265
+ let o = r.value.find((t) => t.id === e);
1266
+ o && o.canUpdate === !1 && d("update", `not permitted for entry "${e}"`);
1267
+ try {
1268
+ let t = await a(e, i);
1269
+ return r.value = r.value.map((n) => n.id === e ? t : n), f(() => n.onUpdated?.(t)), t;
1270
+ } catch (e) {
1271
+ throw t.onError?.(e), e;
1272
+ }
1273
+ }
1274
+ async function _(e) {
1275
+ let { delete: i } = n;
1276
+ typeof i != "function" && d("delete", "disabled by the provider");
1277
+ let a = r.value.find((t) => t.id === e) ?? null;
1278
+ a && a.canDelete === !1 && d("delete", `not permitted for entry "${e}"`);
1279
+ try {
1280
+ await i(e), r.value = r.value.filter((t) => t.id !== e), a && f(() => n.onDeleted?.(a));
1281
+ } catch (e) {
1282
+ throw t.onError?.(e), e;
1283
+ }
1284
+ }
1285
+ return {
1286
+ savedBlocks: r,
1287
+ isLoading: i,
1288
+ categories: a,
1289
+ canCreate: o,
1290
+ canUpdate: s,
1291
+ canDelete: c,
1292
+ canUpdateBlock: l,
1293
+ canDeleteBlock: u,
1294
+ load: p,
1295
+ create: m,
1296
+ update: h,
1297
+ remove: _
1298
+ };
1299
+ }
1300
+ //#endregion
1301
+ //#region ../core/src/saved-blocks-local.ts
1302
+ var ze = "templatical:saved-blocks";
1303
+ function $(e = {}) {
1304
+ let t = e.key ?? ze;
1305
+ function n() {
1306
+ if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
1307
+ return localStorage;
1308
+ }
1309
+ function r() {
1310
+ let e = n().getItem(t);
1311
+ if (!e) return [];
1312
+ try {
1313
+ let t = JSON.parse(e);
1314
+ return Array.isArray(t) ? t : [];
1315
+ } catch {
1316
+ return [];
1317
+ }
1318
+ }
1319
+ function i(e) {
1320
+ n().setItem(t, JSON.stringify(e));
1321
+ }
1322
+ return {
1323
+ async list(e) {
1324
+ let t = r(), n = e?.search?.trim().toLowerCase(), i = e?.category?.trim();
1325
+ return t.filter((e) => !(n && !e.name.toLowerCase().includes(n) || i && e.category !== i));
1326
+ },
1327
+ async create(e) {
1328
+ let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
1329
+ id: I(),
1330
+ name: e.name,
1331
+ content: e.content,
1332
+ ...e.category ? { category: e.category } : {},
1333
+ createdAt: t,
1334
+ updatedAt: t
1335
+ };
1336
+ return i([n, ...r()]), n;
1337
+ },
1338
+ async update(e, t) {
1339
+ let n = r(), a = n.findIndex((t) => t.id === e);
1340
+ if (a === -1) throw Error(`[Templatical] Saved block not found: ${e}`);
1341
+ let o = {
1342
+ ...n[a],
1343
+ ...t,
1344
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1345
+ }, s = [...n];
1346
+ return s[a] = o, i(s), o;
1347
+ },
1348
+ async delete(e) {
1349
+ let t = r();
1350
+ if (!t.some((t) => t.id === e)) throw Error(`[Templatical] Saved block not found: ${e}`);
1351
+ i(t.filter((t) => t.id !== e));
1352
+ }
1353
+ };
1354
+ }
1355
+ //#endregion
1356
+ //#region ../core/src/media-local.ts
1357
+ var Be = "templatical:media", Ve = 50;
1358
+ function He(e = {}) {
1359
+ let t = e.key ?? Be;
1360
+ function n() {
1361
+ if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with localStorage. Supply your own MediaProvider for server-side or non-browser use.");
1362
+ return localStorage;
1363
+ }
1364
+ function r() {
1365
+ let e = n().getItem(t);
1366
+ if (!e) return [];
1367
+ try {
1368
+ let t = JSON.parse(e);
1369
+ return Array.isArray(t) ? t : [];
1370
+ } catch {
1371
+ return [];
1372
+ }
1373
+ }
1374
+ function i(e) {
1375
+ n().setItem(t, JSON.stringify(e));
1376
+ }
1377
+ function a(e) {
1378
+ return typeof FileReader > "u" ? Promise.reject(/* @__PURE__ */ Error("[Templatical] createLocalStorageMediaProvider requires a browser environment with FileReader.")) : new Promise((t, n) => {
1379
+ let r = new FileReader();
1380
+ r.onload = () => {
1381
+ typeof r.result == "string" ? t(r.result) : n(/* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
1382
+ }, r.onerror = () => {
1383
+ n(r.error ?? /* @__PURE__ */ Error("[Templatical] Failed to read file as a data URL."));
1384
+ }, r.readAsDataURL(e);
1385
+ });
1386
+ }
1387
+ return {
1388
+ async list(e) {
1389
+ let t = r(), n = e?.search?.trim().toLowerCase(), i = n ? t.filter((e) => {
1390
+ let t = e.filename?.toLowerCase() ?? "", r = e.alt?.toLowerCase() ?? "";
1391
+ return t.includes(n) || r.includes(n);
1392
+ }) : t, a = e?.cursor ? Number.parseInt(e.cursor, 10) : 0, o = Number.isFinite(a) && a > 0 ? a : 0, s = i.slice(o, o + Ve), c = { items: s }, l = o + s.length;
1393
+ return l < i.length && (c.nextCursor = String(l)), c;
1394
+ },
1395
+ async create(e) {
1396
+ let t = await a(e.file), n = (/* @__PURE__ */ new Date()).toISOString(), o = {
1397
+ id: I(),
1398
+ url: t,
1399
+ filename: e.filename || e.file.name,
1400
+ createdAt: n,
1401
+ updatedAt: n,
1402
+ size: e.file.size
1403
+ };
1404
+ return e.alt !== void 0 && (o.alt = e.alt), e.file.type && (o.mimeType = e.file.type), e.folderId !== void 0 && (o.folderId = e.folderId), i([o, ...r()]), o;
1405
+ },
1406
+ async update(e, t) {
1407
+ let n = r(), a = n.findIndex((t) => t.id === e);
1408
+ if (a === -1) throw Error(`[Templatical] Media asset not found: ${e}`);
1409
+ let o = n[a], s = {
1410
+ ...o,
1411
+ ...t,
1412
+ id: o.id,
1413
+ url: o.url,
1414
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
1415
+ }, c = [...n];
1416
+ return c[a] = s, i(c), s;
1417
+ },
1418
+ async delete(e) {
1419
+ let t = r();
1420
+ for (let n of e) if (!t.some((e) => e.id === n)) throw Error(`[Templatical] Media asset not found: ${n}`);
1421
+ let n = new Set(e);
1422
+ i(t.filter((e) => !n.has(e.id)));
1423
+ },
1424
+ folders: !1,
1425
+ replace: !1,
1426
+ importFromUrl: !1,
1427
+ checkUsage: !1,
1428
+ frequentlyUsed: !1,
1429
+ storage: !1
1430
+ };
1431
+ }
1432
+ //#endregion
1433
+ //#region ../core/src/version-history.ts
1434
+ function Ue(t) {
1435
+ let { provider: n, getTemplateId: r } = t, i = e([]), a = e(!1), o = e(void 0), s = e(!1), c = /* @__PURE__ */ new Map(), l = g(() => typeof n.create == "function"), u = g(() => typeof n.restore == "function");
1436
+ function d(e) {
1437
+ let t = r();
1438
+ if (!t) throw new M(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
1439
+ return t;
1440
+ }
1441
+ function f(e) {
1442
+ throw new M(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
1443
+ }
1444
+ function p(e) {
1445
+ J(t.onError, e);
1446
+ }
1447
+ async function m(e) {
1448
+ let r = d("list");
1449
+ a.value = !0;
1450
+ try {
1451
+ let t = await n.list(r, e);
1452
+ i.value = t.versions, o.value = t.nextCursor;
1453
+ } catch (e) {
1454
+ throw t.onError?.(e), e;
1455
+ } finally {
1456
+ a.value = !1;
1457
+ }
1458
+ }
1459
+ function h(e) {
1460
+ return e.content ?? c.get(e.id) ?? null;
1461
+ }
1462
+ async function _(e) {
1463
+ let r = h(e);
1464
+ if (r) return r;
1465
+ let i = d("get");
1466
+ try {
1467
+ let t = await n.get(i, e.id);
1468
+ return c.set(e.id, t), t;
1469
+ } catch (e) {
1470
+ throw t.onError?.(e), e;
1471
+ }
1472
+ }
1473
+ async function v(e, r) {
1474
+ let { create: a } = n;
1475
+ typeof a != "function" && f("create");
1476
+ let o = d("create");
1477
+ try {
1478
+ let t = await a(o, e, r);
1479
+ return i.value = [t, ...i.value], p(() => n.onCreated?.(t)), t;
1480
+ } catch (e) {
1481
+ throw t.onError?.(e), e;
1482
+ }
1483
+ }
1484
+ async function y(e) {
1485
+ let { restore: r } = n;
1486
+ typeof r != "function" && f("restore");
1487
+ let i = d("restore"), a;
1488
+ s.value = !0;
1489
+ try {
1490
+ a = await r(i, e);
1491
+ } catch (e) {
1492
+ throw t.onError?.(e), e;
1493
+ } finally {
1494
+ s.value = !1;
1495
+ }
1496
+ return p(() => n.onRestored?.(a)), a;
1497
+ }
1498
+ return {
1499
+ nextCursor: o,
1500
+ versions: i,
1501
+ isLoading: a,
1502
+ isRestoring: s,
1503
+ canCreate: l,
1504
+ canRestore: u,
1505
+ load: m,
1506
+ peekContent: h,
1507
+ resolveContent: _,
1508
+ create: v,
1509
+ restore: y
1510
+ };
1511
+ }
1512
+ //#endregion
1513
+ //#region ../core/src/comments.ts
1514
+ function We(t) {
1515
+ let { provider: n, getTemplateId: r, getUser: i } = t, a = e([]), o = e(!1), s = e(!1), c = g(() => typeof n.create == "function"), l = g(() => typeof n.update == "function"), u = g(() => typeof n.delete == "function"), d = g(() => typeof n.setResolved == "function"), f = g(() => a.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), p = g(() => a.value.filter((e) => !e.resolvedAt).length), m = g(() => {
1516
+ let e = /* @__PURE__ */ new Map();
1517
+ for (let t of a.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
1518
+ return e;
1519
+ });
1520
+ function h(e) {
1521
+ let t = r();
1522
+ if (!t) throw new M(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
1523
+ return t;
1524
+ }
1525
+ function _(e) {
1526
+ let t = i();
1527
+ if (!t) throw new M(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
1528
+ return t;
1529
+ }
1530
+ function v(e) {
1531
+ throw new M(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
1532
+ }
1533
+ function y(e) {
1534
+ for (let t of a.value) {
1535
+ if (t.id === e) return t;
1536
+ for (let n of t.replies ?? []) if (n.id === e) return n;
1537
+ }
1538
+ return null;
1539
+ }
1540
+ function b(e) {
1541
+ let t = i();
1542
+ return t !== null && e.author.id === t.id;
1543
+ }
1544
+ function x(e) {
1545
+ let n = se(e);
1546
+ throw t.onError?.(n), n;
1547
+ }
1548
+ function S(e) {
1549
+ J(t.onError, e);
1550
+ }
1551
+ function C(e, t, n) {
1552
+ return [
1553
+ ...e.slice(0, t),
1554
+ n,
1555
+ ...e.slice(t + 1)
1556
+ ];
1557
+ }
1558
+ function w(e, t) {
1559
+ return e !== void 0 && JSON.stringify(e) === JSON.stringify(t);
1560
+ }
1561
+ function T(e) {
1562
+ if (e.parentId) {
1563
+ let t = !1, n = a.value.map((n) => {
1564
+ if (n.id !== e.parentId) return n;
1565
+ let r = n.replies ?? [], i = r.findIndex((t) => t.id === e.id);
1566
+ return i !== -1 && w(r[i], e) ? n : (t = !0, {
1567
+ ...n,
1568
+ replies: i === -1 ? [...r, e] : C(r, i, e)
1569
+ });
1570
+ });
1571
+ return t && (a.value = n), t;
1572
+ }
1573
+ let t = a.value.findIndex((t) => t.id === e.id);
1574
+ if (t === -1) return a.value = [...a.value, e], !0;
1575
+ let n = {
1576
+ ...e,
1577
+ replies: e.replies ?? a.value[t].replies
1578
+ };
1579
+ return !w(a.value[t], n) && (a.value = C(a.value, t, n), !0);
1580
+ }
1581
+ function E(e, t) {
1582
+ let n = y(e), r = t ?? n?.parentId ?? null;
1583
+ return r ? a.value = a.value.map((t) => t.id === r ? {
1584
+ ...t,
1585
+ replies: (t.replies ?? []).filter((t) => t.id !== e)
1586
+ } : t) : a.value = a.value.filter((t) => t.id !== e), n;
1587
+ }
1588
+ async function D(e) {
1589
+ let t = h("list");
1590
+ o.value = !0;
1591
+ try {
1592
+ a.value = await n.list(t, e);
1593
+ } catch (e) {
1594
+ x(e);
1595
+ } finally {
1596
+ o.value = !1;
1597
+ }
1598
+ }
1599
+ async function O(e) {
1600
+ let { create: t } = n;
1601
+ typeof t != "function" && v("create");
1602
+ let r = h("create");
1603
+ _("create"), s.value = !0;
1604
+ try {
1605
+ let i = await t(r, e);
1606
+ return T(i), S(() => n.onCreated?.(i, { origin: "local" })), i;
1607
+ } catch (e) {
1608
+ x(e);
1609
+ } finally {
1610
+ s.value = !1;
1611
+ }
1612
+ }
1613
+ async function k(e, t) {
1614
+ let { update: r } = n;
1615
+ typeof r != "function" && v("update");
1616
+ let i = h("update");
1617
+ _("update"), s.value = !0;
1618
+ try {
1619
+ let a = await r(i, e, t);
1620
+ return T(a), S(() => n.onUpdated?.(a, { origin: "local" })), a;
1621
+ } catch (e) {
1622
+ x(e);
1623
+ } finally {
1624
+ s.value = !1;
1625
+ }
1626
+ }
1627
+ async function A(e) {
1628
+ let { delete: t } = n;
1629
+ typeof t != "function" && v("delete");
1630
+ let r = h("delete");
1631
+ _("delete");
1632
+ let i = y(e);
1633
+ s.value = !0;
1634
+ try {
1635
+ await t(r, e), E(e), i && S(() => n.onDeleted?.(i, { origin: "local" }));
1636
+ } catch (e) {
1637
+ x(e);
1638
+ } finally {
1639
+ s.value = !1;
1640
+ }
1641
+ }
1642
+ async function j(e, t) {
1643
+ let { setResolved: r } = n;
1644
+ typeof r != "function" && v("setResolved");
1645
+ let i = h("setResolved");
1646
+ _("setResolved"), s.value = !0;
1647
+ try {
1648
+ let a = await r(i, e, t);
1649
+ return T(a), S(() => (a.resolvedAt ? n.onResolved : n.onUnresolved)?.(a, { origin: "local" })), a;
1650
+ } catch (e) {
1651
+ x(e);
1652
+ } finally {
1653
+ s.value = !1;
1654
+ }
1655
+ }
1656
+ function ee(e) {
1657
+ T(e) && S(() => n.onCreated?.(e, { origin: "remote" }));
1658
+ }
1659
+ function N(e) {
1660
+ T(e) && S(() => (e.resolvedAt ? n.onResolved : n.onUpdated)?.(e, { origin: "remote" }));
1661
+ }
1662
+ function P(e, t) {
1663
+ let r = E(e, t);
1664
+ r && S(() => n.onDeleted?.(r, { origin: "remote" }));
1665
+ }
1666
+ return {
1667
+ comments: a,
1668
+ isLoading: o,
1669
+ isSubmitting: s,
1670
+ canCreate: c,
1671
+ canUpdate: l,
1672
+ canDelete: u,
1673
+ canResolve: d,
1674
+ totalCount: f,
1675
+ unresolvedCount: p,
1676
+ commentCountByBlock: m,
1677
+ load: D,
1678
+ create: O,
1679
+ update: k,
1680
+ remove: A,
1681
+ setResolved: j,
1682
+ find: y,
1683
+ isOwn: b,
1684
+ applyRemoteCreate: ee,
1685
+ applyRemoteUpdate: N,
1686
+ applyRemoteDelete: P
1687
+ };
1688
+ }
1689
+ function Ge(e) {
1690
+ let { comments: t, provider: n, getTemplateId: r } = e, { subscribe: i } = n;
1691
+ if (typeof i != "function") return;
1692
+ let a = null;
1693
+ function c() {
1694
+ a?.(), a = null;
1695
+ }
1696
+ o(() => r(), (e) => {
1697
+ c(), e && (a = i(e, (e) => {
1698
+ switch (e.type) {
1699
+ case "created":
1700
+ t.applyRemoteCreate(e.comment);
1701
+ break;
1702
+ case "updated":
1703
+ t.applyRemoteUpdate(e.comment);
1704
+ break;
1705
+ case "deleted": t.applyRemoteDelete(e.commentId, e.parentId);
1706
+ }
1707
+ }));
1708
+ }, { immediate: !0 }), s(c);
1709
+ }
1710
+ //#endregion
1711
+ //#region src/constants/timeouts.ts
1712
+ var Ke = 1e4;
1713
+ //#endregion
1714
+ //#region src/composables/useImageUrlResolver.ts
1715
+ function qe(e) {
1716
+ let t = c(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
1717
+ function r(e) {
1718
+ return t.get(e);
1719
+ }
1720
+ function i(e) {
1721
+ return t.has(e) || n.has(e);
1722
+ }
1723
+ function a(r) {
1724
+ if (i(r)) return;
1725
+ let a;
1726
+ try {
1727
+ a = e(r);
1728
+ } catch {
1729
+ t.set(r, null);
1730
+ return;
1731
+ }
1732
+ a === null || typeof a == "string" ? t.set(r, a) : (n.add(r), Promise.resolve(a).then((e) => {
1733
+ t.set(r, typeof e == "string" ? e : null);
1734
+ }, () => {
1735
+ t.set(r, null);
1736
+ }).finally(() => n.delete(r)));
1737
+ }
1738
+ return {
1739
+ get: r,
1740
+ has: i,
1741
+ lookup: a
1742
+ };
1743
+ }
1744
+ function Je(e) {
1745
+ let t = n(K, null), r = g(e);
1746
+ if (!t) return r;
1747
+ let i;
1748
+ function a() {
1749
+ i !== void 0 && (clearTimeout(i), i = void 0);
1750
+ }
1751
+ _() && s(a);
1752
+ let c = !0;
1753
+ return o(r, (e) => {
1754
+ a();
1755
+ let n = c;
1756
+ c = !1, e && !t.has(e) && (n ? t.lookup(e) : i = setTimeout(() => {
1757
+ i = void 0, t.lookup(e);
1758
+ }, 300));
1759
+ }, { immediate: !0 }), g(() => {
1760
+ let e = r.value;
1761
+ if (!e) return e;
1762
+ let n = t.get(e);
1763
+ return typeof n == "string" && n.length > 0 ? n : e;
1764
+ });
1765
+ }
1766
+ function Ye(e, t) {
1767
+ if (!e || !t) return t;
1768
+ let n = e.get(t);
1769
+ return typeof n == "string" && n.length > 0 ? n : t;
1770
+ }
1771
+ function Xe(e, t) {
1772
+ return typeof e?.url == "string" && L(e.url, t);
1773
+ }
1774
+ function Ze(e, t) {
1775
+ let n = e?.url;
1776
+ if (typeof n == "string" && n.trim() !== "") return L(n, t) ? void 0 : n;
1777
+ }
1778
+ function Qe(e) {
1779
+ let t = n(te, F.liquid), r = Je(() => Ze(e(), t));
1780
+ return g(() => Xe(e(), t) ? null : r.value);
1781
+ }
1782
+ function $e(e, t, n) {
1783
+ return Xe(t, n) ? null : Ye(e, Ze(t, n));
1784
+ }
1785
+ //#endregion
1786
+ //#region src/utils/blockTypeLabels.ts
1787
+ function et(e, t) {
1788
+ return t.blocks[e] ?? e;
1789
+ }
1790
+ function tt(e, t, n = []) {
1791
+ if (e.type !== "custom") return et(e.type, t);
1792
+ let { customType: r } = e;
1793
+ return n.find((e) => e.type === r)?.name ?? r;
1794
+ }
1795
+ //#endregion
1796
+ //#region src/utils/resolveFieldColors.ts
1797
+ function nt(e, t) {
1798
+ let n = q({ presets: e.presets }, ie), r = n.presets.length === 0;
1799
+ return {
1800
+ presets: r ? t.presets : n.presets,
1801
+ allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
1802
+ invalidPresets: n.invalidPresets,
1803
+ emptyPresets: e.presets !== void 0 && e.presets.length === 0,
1804
+ presetsInherited: r,
1805
+ allowCustomIgnored: e.allowCustom === !0 && t.allowCustom === !1
1806
+ };
1807
+ }
1808
+ //#endregion
1809
+ //#region src/utils/imageNaturalSize.ts
1810
+ function rt(e) {
1811
+ return typeof e == "number" && Number.isFinite(e) && e > 0;
1812
+ }
1813
+ function it(e, t) {
1814
+ return rt(e) && rt(t) ? {
1815
+ width: e,
1816
+ height: t
1817
+ } : null;
1818
+ }
1819
+ function at(e) {
1820
+ return it(e.naturalWidth, e.naturalHeight);
1821
+ }
1822
+ function ot(e) {
1823
+ return e ? {
1824
+ naturalWidth: e.width,
1825
+ naturalHeight: e.height
1826
+ } : {
1827
+ naturalWidth: void 0,
1828
+ naturalHeight: void 0
1829
+ };
1830
+ }
1831
+ function st(e, t) {
1832
+ if (typeof Image > "u") return t(null), () => {};
1833
+ let n = new Image(), r = () => {
1834
+ n.onload = null, n.onerror = null;
1835
+ };
1836
+ return n.onload = () => {
1837
+ r(), t(it(n.naturalWidth, n.naturalHeight));
1838
+ }, n.onerror = () => {
1839
+ r(), t(null);
1840
+ }, n.src = e, r;
1841
+ }
1842
+ function ct(e) {
1843
+ return new Promise((t) => {
1844
+ let n = setTimeout(() => {
1845
+ r(), t(null);
1846
+ }, Ke), r = st(e, (e) => {
1847
+ clearTimeout(n), t(e);
1848
+ });
1849
+ });
1850
+ }
1851
+ //#endregion
1852
+ //#region src/components/MediaDropOverlay.vue
1853
+ var lt = /* @__PURE__ */ t({
1854
+ __name: "MediaDropOverlay",
1855
+ props: {
1856
+ uploading: { type: Boolean },
1857
+ size: { default: "field" }
1858
+ },
1859
+ setup(e) {
1860
+ let t = e, { t: n } = re(), r = {
1861
+ field: {
1862
+ gap: "tpl:gap-1.5",
1863
+ icon: 18,
1864
+ veil: "90%"
1865
+ },
1866
+ canvas: {
1867
+ gap: "tpl:gap-2",
1868
+ icon: 20,
1869
+ veil: "85%"
1870
+ }
1871
+ }, a = g(() => r[t.size]);
1872
+ return (t, r) => (i(), l("div", {
1873
+ class: m(["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)]", a.value.gap]),
1874
+ style: x({ backgroundColor: `color-mix(in srgb, var(--tpl-bg) ${a.value.veil}, transparent)` })
1875
+ }, [e.uploading ? (i(), l(b, { key: 0 }, [S(h(ae), {
1876
+ class: "tpl-spinner",
1877
+ size: a.value.icon,
1878
+ "stroke-width": 2
1879
+ }, null, 8, ["size"]), u(" " + d(h(n).image.uploading), 1)], 64)) : (i(), l(b, { key: 1 }, [S(h(oe), {
1880
+ size: a.value.icon,
1881
+ "stroke-width": 1.5
1882
+ }, null, 8, ["size"]), u(" " + d(h(n).image.dropToUpload), 1)], 64))], 6));
1883
+ }
1884
+ });
1885
+ //#endregion
1886
+ //#region src/composables/useAliveFlag.ts
1887
+ function ut() {
1888
+ let e = { alive: !0 };
1889
+ return p(() => {
1890
+ e.alive = !1;
1891
+ }), e;
1892
+ }
1893
+ //#endregion
1894
+ //#region src/composables/useImageDrop.ts
1895
+ var dt = "image/";
1896
+ function ft(e) {
1897
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || f(r), { isOverDropZone: a } = W(t, {
1898
+ preventDefaultForUnhandled: !0,
1899
+ onDrop: (e) => {
1900
+ if (!i()) return;
1901
+ let t = (e ?? []).filter((e) => e.type.startsWith(dt));
1902
+ t.length > 0 && n([t[0]]);
1903
+ }
1904
+ });
1905
+ return { isOver: g(() => i() && a.value) };
1906
+ }
1907
+ //#endregion
1908
+ //#region src/composables/useMediaDropField.ts
1909
+ function pt(t) {
1910
+ let { target: r, blocked: i, apply: a } = t, o = n(G, null), s = n(ne, null), c = ut();
1911
+ async function l() {
1912
+ let e = await o?.({ accept: ["images"] });
1913
+ c.alive && e && a(e);
1914
+ }
1915
+ let u = e(!1), d = g(() => (s?.value ?? !!o) && !u.value && !f(i));
1916
+ async function p(e) {
1917
+ if (o) {
1918
+ u.value = !0;
1919
+ try {
1920
+ let t = await o({
1921
+ accept: ["images"],
1922
+ files: e
1923
+ });
1924
+ if (!c.alive) return;
1925
+ t && a(t);
1926
+ } finally {
1927
+ c.alive && (u.value = !1);
1928
+ }
1929
+ }
1930
+ }
1931
+ let { isOver: m } = ft({
1932
+ target: r,
1933
+ enabled: d,
1934
+ onFiles: p
1935
+ }), h = g(() => d.value && m.value || u.value);
1936
+ return {
1937
+ canBrowse: !!o,
1938
+ dropEnabled: d,
1939
+ isUploading: u,
1940
+ showOverlay: h,
1941
+ openMediaBrowser: l
1942
+ };
1943
+ }
1944
+ function mt(e, t = "desktop") {
1945
+ return t === "mobile" ? 375 : e?.width ?? 600;
1946
+ }
1947
+ var ht = "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)", gt = {
1948
+ 1: [100],
1949
+ 2: [50, 50],
1950
+ 3: [
1951
+ 33.33,
1952
+ 33.33,
1953
+ 33.34
1954
+ ],
1955
+ "1-2": [33.33, 66.67],
1956
+ "2-1": [66.67, 33.33]
1957
+ };
1958
+ function _t(e, t) {
1959
+ let n = (e) => Math.trunc(e ?? 0), r = (e) => k(e) === null ? 0 : Math.trunc(e.width);
1960
+ return n(e?.left) + n(e?.right) + r(t?.left) + r(t?.right);
1961
+ }
1962
+ function vt(e, t) {
1963
+ return Math.floor(e) - _t(t);
1964
+ }
1965
+ function yt(e, t) {
1966
+ let n = "border" in e ? e.border : void 0;
1967
+ return Math.floor(t) - _t(e.styles.padding, n);
1968
+ }
1969
+ function* bt(e, t) {
1970
+ for (let n of e) P(n) ? yield* bt(n.children, vt(t, n.styles.padding)) : yield {
1971
+ block: n,
1972
+ bandWidth: R(n) && n.wrapper ? vt(t, n.wrapper.padding) : t
1973
+ };
1974
+ }
1975
+ function xt(e, t) {
1976
+ if (!t) return e;
1977
+ try {
1978
+ return B(t, e);
1979
+ } catch {
1980
+ return e;
1981
+ }
1982
+ }
1983
+ function St(e, t, n) {
1984
+ let r = xt(e, n);
1985
+ for (let { block: e, bandWidth: n } of bt(r.blocks, r.settings.width)) if (R(e)) {
1986
+ let r = w(e)?.applied ? void 0 : e.border, i = Math.floor(n) - _t(e.styles.padding, r), a = gt[e.columns] ?? [100];
1987
+ for (let n = 0; n < e.children.length; n++) {
1988
+ let r = Math.floor(i * (a[n] ?? 100) / 100), o = e.children[n].find((e) => e.id === t);
1989
+ if (o) return yt(o, r);
1990
+ }
1991
+ } else if (e.id === t) return yt(e, n);
1992
+ return null;
1993
+ }
1994
+ function Ct(e, t, n) {
1995
+ let r = xt(e, n);
1996
+ for (let { block: e, bandWidth: n } of bt(r.blocks, r.settings.width)) if (e.id === t) return Math.floor(n);
1997
+ return null;
1998
+ }
1999
+ function wt(e, t, n) {
2000
+ if (!R(e)) return;
2001
+ let r = w(e);
2002
+ if (r?.applied && r.height === "image") return (t ? Ct(t, e.id, n) : null) ?? mt(t?.settings);
2003
+ }
2004
+ //#endregion
2005
+ //#region src/constants/socialIcons.ts
2006
+ var Tt = V, Et = {
2007
+ small: 24,
2008
+ medium: 32,
2009
+ large: 48
2010
+ }, Dt = [
2011
+ "facebook",
2012
+ "twitter",
2013
+ "instagram",
2014
+ "linkedin",
2015
+ "youtube",
2016
+ "tiktok",
2017
+ "pinterest",
2018
+ "email",
2019
+ "website",
2020
+ "whatsapp",
2021
+ "telegram",
2022
+ "discord",
2023
+ "snapchat",
2024
+ "reddit",
2025
+ "github",
2026
+ "dribbble",
2027
+ "behance"
2028
+ ];
2029
+ //#endregion
2030
+ export { Re as A, Qe as C, Ue as D, We as E, pe as F, X as I, fe as L, ge as M, he as N, He as O, me as P, Y as R, $e as S, Ge as T, nt as _, wt as a, qe as b, mt as c, lt as d, st as f, it as g, at as h, St as i, Le as j, $ as k, pt as l, ot as m, Tt as n, Ct as o, ct as p, Dt as r, ht as s, Et as t, ut as u, tt as v, Je as w, Ze as x, et as y, ce as z };
2031
+
2032
+ //# sourceMappingURL=socialIcons-BBvsTwCV.js.map