@jackuait/blok 0.6.0-beta.8 → 0.6.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 (320) hide show
  1. package/dist/blok.mjs +2 -2
  2. package/dist/chunks/{blok-bzxy6Olq.mjs → blok-BAh1rvUC.mjs} +3410 -2927
  3. package/dist/chunks/i18next-B47TKgbU.mjs +1303 -0
  4. package/dist/chunks/{i18next-loader-CzL6YHyQ.mjs → i18next-loader-CHtGO6IK.mjs} +2 -2
  5. package/dist/chunks/{index-DSSrx_Co.mjs → index-DBWWKrDe.mjs} +12 -12
  6. package/dist/chunks/{inline-tool-convert-D4SXxjDd.mjs → inline-tool-convert-DduRc0fF.mjs} +1467 -951
  7. package/dist/chunks/{messages-BogRq8lt.mjs → messages-0AbcLMLm.mjs} +6 -0
  8. package/dist/chunks/{messages-DJDG55Vq.mjs → messages-0E0AkrNu.mjs} +6 -0
  9. package/dist/{messages-DnXLrlHh.mjs → chunks/messages-4v4MuVEc.mjs} +6 -0
  10. package/dist/chunks/{messages-DnIhyAJk.mjs → messages-62v-CLC-.mjs} +6 -0
  11. package/dist/chunks/{messages-Dzwxv9v1.mjs → messages-8DeO60Oo.mjs} +6 -0
  12. package/dist/chunks/{messages-B1Aww8q7.mjs → messages-8IPXkrDl.mjs} +6 -0
  13. package/dist/{messages-uKX8WBaD.mjs → chunks/messages-96kNZDll.mjs} +6 -0
  14. package/dist/chunks/{messages-BL0tXcDf.mjs → messages-B1FZ8lxU.mjs} +6 -0
  15. package/dist/{messages-DBn76jVV.mjs → chunks/messages-B217znr-.mjs} +8 -2
  16. package/dist/{messages-DT4dP5uK.mjs → chunks/messages-B8WNljW3.mjs} +6 -0
  17. package/dist/chunks/{messages-BdeLo0N9.mjs → messages-BC8IN4Bf.mjs} +6 -0
  18. package/dist/{messages-CZygwLwM.mjs → chunks/messages-BI43k_BD.mjs} +6 -0
  19. package/dist/{messages-CzTufCHu.mjs → chunks/messages-BJ6zrz2j.mjs} +6 -0
  20. package/dist/{messages-BoJc_p1r.mjs → chunks/messages-BUl_Rcnj.mjs} +6 -0
  21. package/dist/chunks/{messages-CnwibSvh.mjs → messages-BZlmVRwn.mjs} +6 -0
  22. package/dist/{messages-C2htQ_3F.mjs → chunks/messages-BcpCubnC.mjs} +6 -0
  23. package/dist/{messages-D5C3J9qr.mjs → chunks/messages-Bm-E4iRC.mjs} +6 -0
  24. package/dist/chunks/{messages-BELRf6DU.mjs → messages-C4jL-90N.mjs} +6 -0
  25. package/dist/chunks/{messages-1fC8IMyX.mjs → messages-CDBLbUOQ.mjs} +6 -0
  26. package/dist/chunks/{messages-7QoX8DkW.mjs → messages-CH4hrauY.mjs} +6 -0
  27. package/dist/{messages-Dz9L52ol.mjs → chunks/messages-CRJ_mchV.mjs} +6 -0
  28. package/dist/chunks/{messages-JELdtT6E.mjs → messages-CW4c4cRk.mjs} +6 -0
  29. package/dist/chunks/{messages-CKI54h6O.mjs → messages-C_4otP7U.mjs} +6 -0
  30. package/dist/{messages-R3hUSvr3.mjs → chunks/messages-CfiyT2Wi.mjs} +6 -0
  31. package/dist/{messages-CJdUsQ-c.mjs → chunks/messages-CgTq3QhU.mjs} +6 -0
  32. package/dist/chunks/{messages-D1Hv8XGo.mjs → messages-Chb7k3Rg.mjs} +6 -0
  33. package/dist/{messages-Q7AO_FLv.mjs → chunks/messages-Cjjo7yHR.mjs} +6 -0
  34. package/dist/{messages-C99mq906.mjs → chunks/messages-Cl6ayUaq.mjs} +6 -0
  35. package/dist/chunks/{messages-Diu6jAaR.mjs → messages-CmR9ftc_.mjs} +6 -0
  36. package/dist/chunks/{messages-LPVfA-8K.mjs → messages-Cr49Nt3U.mjs} +6 -0
  37. package/dist/chunks/{messages-DqM1LFg5.mjs → messages-Cr94GzbX.mjs} +6 -0
  38. package/dist/{messages-BWF-zUpY.mjs → chunks/messages-CrCYPCk3.mjs} +6 -0
  39. package/dist/{messages-D-ZtY5v0.mjs → chunks/messages-Cs8zmZ3L.mjs} +6 -0
  40. package/dist/{messages-DprmQg6V.mjs → chunks/messages-CzK0LEhb.mjs} +6 -0
  41. package/dist/chunks/{messages-BSbjsyHY.mjs → messages-D00x4S8o.mjs} +6 -0
  42. package/dist/chunks/{messages-Xq8UmkVs.mjs → messages-D1mn7Zd5.mjs} +6 -0
  43. package/dist/chunks/{messages-BC86qLvI.mjs → messages-D2NOpHn9.mjs} +6 -0
  44. package/dist/{messages-kep5wtm4.mjs → chunks/messages-D4qqwVgQ.mjs} +6 -0
  45. package/dist/chunks/{messages-7W4d0DwD.mjs → messages-D5S1Dnpm.mjs} +6 -0
  46. package/dist/{messages-CY8_RyFE.mjs → chunks/messages-D7u2bmP2.mjs} +6 -0
  47. package/dist/chunks/{messages-BFG6Wlgy.mjs → messages-D85FqxgY.mjs} +6 -0
  48. package/dist/{messages-DLfR5bMd.mjs → chunks/messages-D9ndgBnU.mjs} +6 -0
  49. package/dist/{messages-CVw84KdI.mjs → chunks/messages-DDTQgImT.mjs} +6 -0
  50. package/dist/{messages-_ErNTNhk.mjs → chunks/messages-DH_jBeED.mjs} +6 -0
  51. package/dist/chunks/{messages-CMkNSDTo.mjs → messages-DRXWF0PV.mjs} +6 -0
  52. package/dist/chunks/{messages-BYyy6Wqf.mjs → messages-DVQvl8Qj.mjs} +6 -0
  53. package/dist/chunks/{messages-CznZadDf.mjs → messages-DXktiao_.mjs} +6 -0
  54. package/dist/chunks/{messages-DhLKYm2j.mjs → messages-DdK-nFGm.mjs} +6 -0
  55. package/dist/chunks/{messages-BMXCuEKO.mjs → messages-DlJbPF2T.mjs} +6 -0
  56. package/dist/chunks/{messages-CvGLfqmV.mjs → messages-DnVlmiNT.mjs} +6 -0
  57. package/dist/{messages-Z9nEU2xK.mjs → chunks/messages-DviiFSv2.mjs} +6 -0
  58. package/dist/chunks/{messages-BB5z9Uba.mjs → messages-DzqM3Fel.mjs} +6 -0
  59. package/dist/{messages-w7v1GNaE.mjs → chunks/messages-Dzzn6XoD.mjs} +6 -0
  60. package/dist/{messages-CqWJcCbY.mjs → chunks/messages-GSByFygY.mjs} +6 -0
  61. package/dist/chunks/{messages-_ncGrKHh.mjs → messages-L_kl2Qvh.mjs} +6 -0
  62. package/dist/chunks/{messages-BrPFGbM-.mjs → messages-Phkd7XmE.mjs} +6 -0
  63. package/dist/{messages-BU2nlrLK.mjs → chunks/messages-RonBBCnh.mjs} +6 -0
  64. package/dist/{messages-Bmu_S7GM.mjs → chunks/messages-VDriF5Qy.mjs} +6 -0
  65. package/dist/{messages-CLhcMlTc.mjs → chunks/messages-ZjUAIWb1.mjs} +6 -0
  66. package/dist/{messages-9SihnaXQ.mjs → chunks/messages-b1EdvUm0.mjs} +6 -0
  67. package/dist/{messages-DvFLX36Q.mjs → chunks/messages-begYOTgC.mjs} +6 -0
  68. package/dist/{messages-BMv4xwIr.mjs → chunks/messages-jrncnb-H.mjs} +6 -0
  69. package/dist/{messages-D5iv1Kox.mjs → chunks/messages-nefz1S71.mjs} +6 -0
  70. package/dist/{messages-CQwpzUFp.mjs → chunks/messages-ucTVgS5G.mjs} +6 -0
  71. package/dist/chunks/{messages-DBRw-7Zc.mjs → messages-v3GipbFl.mjs} +6 -0
  72. package/dist/{messages-C9eaarcK.mjs → chunks/messages-wmi-iFkH.mjs} +6 -0
  73. package/dist/chunks/{messages-O5tQus_0.mjs → messages-yHcs38yI.mjs} +6 -0
  74. package/dist/full.mjs +2 -2
  75. package/dist/locales.mjs +90 -84
  76. package/dist/{messages-BogRq8lt.mjs → messages-0AbcLMLm.mjs} +6 -0
  77. package/dist/{messages-DJDG55Vq.mjs → messages-0E0AkrNu.mjs} +6 -0
  78. package/dist/{chunks/messages-DnXLrlHh.mjs → messages-4v4MuVEc.mjs} +6 -0
  79. package/dist/{messages-DnIhyAJk.mjs → messages-62v-CLC-.mjs} +6 -0
  80. package/dist/{messages-Dzwxv9v1.mjs → messages-8DeO60Oo.mjs} +6 -0
  81. package/dist/{messages-B1Aww8q7.mjs → messages-8IPXkrDl.mjs} +6 -0
  82. package/dist/{chunks/messages-uKX8WBaD.mjs → messages-96kNZDll.mjs} +6 -0
  83. package/dist/{messages-BL0tXcDf.mjs → messages-B1FZ8lxU.mjs} +6 -0
  84. package/dist/{chunks/messages-DBn76jVV.mjs → messages-B217znr-.mjs} +8 -2
  85. package/dist/{chunks/messages-DT4dP5uK.mjs → messages-B8WNljW3.mjs} +6 -0
  86. package/dist/{messages-BdeLo0N9.mjs → messages-BC8IN4Bf.mjs} +6 -0
  87. package/dist/{chunks/messages-CZygwLwM.mjs → messages-BI43k_BD.mjs} +6 -0
  88. package/dist/{chunks/messages-CzTufCHu.mjs → messages-BJ6zrz2j.mjs} +6 -0
  89. package/dist/{chunks/messages-BoJc_p1r.mjs → messages-BUl_Rcnj.mjs} +6 -0
  90. package/dist/{messages-CnwibSvh.mjs → messages-BZlmVRwn.mjs} +6 -0
  91. package/dist/{chunks/messages-C2htQ_3F.mjs → messages-BcpCubnC.mjs} +6 -0
  92. package/dist/{chunks/messages-D5C3J9qr.mjs → messages-Bm-E4iRC.mjs} +6 -0
  93. package/dist/{messages-BELRf6DU.mjs → messages-C4jL-90N.mjs} +6 -0
  94. package/dist/{messages-1fC8IMyX.mjs → messages-CDBLbUOQ.mjs} +6 -0
  95. package/dist/{messages-7QoX8DkW.mjs → messages-CH4hrauY.mjs} +6 -0
  96. package/dist/{chunks/messages-Dz9L52ol.mjs → messages-CRJ_mchV.mjs} +6 -0
  97. package/dist/{messages-JELdtT6E.mjs → messages-CW4c4cRk.mjs} +6 -0
  98. package/dist/{messages-CKI54h6O.mjs → messages-C_4otP7U.mjs} +6 -0
  99. package/dist/{chunks/messages-R3hUSvr3.mjs → messages-CfiyT2Wi.mjs} +6 -0
  100. package/dist/{chunks/messages-CJdUsQ-c.mjs → messages-CgTq3QhU.mjs} +6 -0
  101. package/dist/{messages-D1Hv8XGo.mjs → messages-Chb7k3Rg.mjs} +6 -0
  102. package/dist/{chunks/messages-Q7AO_FLv.mjs → messages-Cjjo7yHR.mjs} +6 -0
  103. package/dist/{chunks/messages-C99mq906.mjs → messages-Cl6ayUaq.mjs} +6 -0
  104. package/dist/{messages-Diu6jAaR.mjs → messages-CmR9ftc_.mjs} +6 -0
  105. package/dist/{messages-LPVfA-8K.mjs → messages-Cr49Nt3U.mjs} +6 -0
  106. package/dist/{messages-DqM1LFg5.mjs → messages-Cr94GzbX.mjs} +6 -0
  107. package/dist/{chunks/messages-BWF-zUpY.mjs → messages-CrCYPCk3.mjs} +6 -0
  108. package/dist/{chunks/messages-D-ZtY5v0.mjs → messages-Cs8zmZ3L.mjs} +6 -0
  109. package/dist/{chunks/messages-DprmQg6V.mjs → messages-CzK0LEhb.mjs} +6 -0
  110. package/dist/{messages-BSbjsyHY.mjs → messages-D00x4S8o.mjs} +6 -0
  111. package/dist/{messages-Xq8UmkVs.mjs → messages-D1mn7Zd5.mjs} +6 -0
  112. package/dist/{messages-BC86qLvI.mjs → messages-D2NOpHn9.mjs} +6 -0
  113. package/dist/{chunks/messages-kep5wtm4.mjs → messages-D4qqwVgQ.mjs} +6 -0
  114. package/dist/{messages-7W4d0DwD.mjs → messages-D5S1Dnpm.mjs} +6 -0
  115. package/dist/{chunks/messages-CY8_RyFE.mjs → messages-D7u2bmP2.mjs} +6 -0
  116. package/dist/{messages-BFG6Wlgy.mjs → messages-D85FqxgY.mjs} +6 -0
  117. package/dist/{chunks/messages-DLfR5bMd.mjs → messages-D9ndgBnU.mjs} +6 -0
  118. package/dist/{chunks/messages-CVw84KdI.mjs → messages-DDTQgImT.mjs} +6 -0
  119. package/dist/{chunks/messages-_ErNTNhk.mjs → messages-DH_jBeED.mjs} +6 -0
  120. package/dist/{messages-CMkNSDTo.mjs → messages-DRXWF0PV.mjs} +6 -0
  121. package/dist/{messages-BYyy6Wqf.mjs → messages-DVQvl8Qj.mjs} +6 -0
  122. package/dist/{messages-CznZadDf.mjs → messages-DXktiao_.mjs} +6 -0
  123. package/dist/{messages-DhLKYm2j.mjs → messages-DdK-nFGm.mjs} +6 -0
  124. package/dist/{messages-BMXCuEKO.mjs → messages-DlJbPF2T.mjs} +6 -0
  125. package/dist/{messages-CvGLfqmV.mjs → messages-DnVlmiNT.mjs} +6 -0
  126. package/dist/{chunks/messages-Z9nEU2xK.mjs → messages-DviiFSv2.mjs} +6 -0
  127. package/dist/{messages-BB5z9Uba.mjs → messages-DzqM3Fel.mjs} +6 -0
  128. package/dist/{chunks/messages-w7v1GNaE.mjs → messages-Dzzn6XoD.mjs} +6 -0
  129. package/dist/{chunks/messages-CqWJcCbY.mjs → messages-GSByFygY.mjs} +6 -0
  130. package/dist/{messages-_ncGrKHh.mjs → messages-L_kl2Qvh.mjs} +6 -0
  131. package/dist/{messages-BrPFGbM-.mjs → messages-Phkd7XmE.mjs} +6 -0
  132. package/dist/{chunks/messages-BU2nlrLK.mjs → messages-RonBBCnh.mjs} +6 -0
  133. package/dist/{chunks/messages-Bmu_S7GM.mjs → messages-VDriF5Qy.mjs} +6 -0
  134. package/dist/{chunks/messages-CLhcMlTc.mjs → messages-ZjUAIWb1.mjs} +6 -0
  135. package/dist/{chunks/messages-9SihnaXQ.mjs → messages-b1EdvUm0.mjs} +6 -0
  136. package/dist/{chunks/messages-DvFLX36Q.mjs → messages-begYOTgC.mjs} +6 -0
  137. package/dist/{chunks/messages-BMv4xwIr.mjs → messages-jrncnb-H.mjs} +6 -0
  138. package/dist/{chunks/messages-D5iv1Kox.mjs → messages-nefz1S71.mjs} +6 -0
  139. package/dist/{chunks/messages-CQwpzUFp.mjs → messages-ucTVgS5G.mjs} +6 -0
  140. package/dist/{messages-DBRw-7Zc.mjs → messages-v3GipbFl.mjs} +6 -0
  141. package/dist/{chunks/messages-C9eaarcK.mjs → messages-wmi-iFkH.mjs} +6 -0
  142. package/dist/{messages-O5tQus_0.mjs → messages-yHcs38yI.mjs} +6 -0
  143. package/dist/tools.mjs +3194 -1690
  144. package/dist/vendor.LICENSE.txt +109 -109
  145. package/package.json +43 -57
  146. package/src/blok.ts +12 -0
  147. package/src/components/__module.ts +21 -0
  148. package/src/components/block/api.ts +17 -0
  149. package/src/components/block/style-manager.ts +6 -2
  150. package/src/components/block/tool-renderer.ts +33 -30
  151. package/src/components/blocks.ts +132 -15
  152. package/src/components/i18n/locales/am/messages.json +6 -0
  153. package/src/components/i18n/locales/ar/messages.json +6 -0
  154. package/src/components/i18n/locales/az/messages.json +6 -0
  155. package/src/components/i18n/locales/bg/messages.json +6 -0
  156. package/src/components/i18n/locales/bn/messages.json +6 -0
  157. package/src/components/i18n/locales/bs/messages.json +6 -0
  158. package/src/components/i18n/locales/cs/messages.json +6 -0
  159. package/src/components/i18n/locales/da/messages.json +6 -0
  160. package/src/components/i18n/locales/de/messages.json +6 -0
  161. package/src/components/i18n/locales/dv/messages.json +6 -0
  162. package/src/components/i18n/locales/el/messages.json +6 -0
  163. package/src/components/i18n/locales/en/messages.json +6 -0
  164. package/src/components/i18n/locales/es/messages.json +6 -0
  165. package/src/components/i18n/locales/et/messages.json +6 -0
  166. package/src/components/i18n/locales/fa/messages.json +6 -0
  167. package/src/components/i18n/locales/fi/messages.json +6 -0
  168. package/src/components/i18n/locales/fil/messages.json +6 -0
  169. package/src/components/i18n/locales/fr/messages.json +6 -0
  170. package/src/components/i18n/locales/gu/messages.json +6 -0
  171. package/src/components/i18n/locales/he/messages.json +6 -0
  172. package/src/components/i18n/locales/hi/messages.json +6 -0
  173. package/src/components/i18n/locales/hr/messages.json +6 -0
  174. package/src/components/i18n/locales/hu/messages.json +6 -0
  175. package/src/components/i18n/locales/hy/messages.json +6 -0
  176. package/src/components/i18n/locales/id/messages.json +6 -0
  177. package/src/components/i18n/locales/it/messages.json +6 -0
  178. package/src/components/i18n/locales/ja/messages.json +6 -0
  179. package/src/components/i18n/locales/ka/messages.json +6 -0
  180. package/src/components/i18n/locales/km/messages.json +6 -0
  181. package/src/components/i18n/locales/kn/messages.json +6 -0
  182. package/src/components/i18n/locales/ko/messages.json +6 -0
  183. package/src/components/i18n/locales/ku/messages.json +6 -0
  184. package/src/components/i18n/locales/lo/messages.json +6 -0
  185. package/src/components/i18n/locales/lt/messages.json +6 -0
  186. package/src/components/i18n/locales/lv/messages.json +6 -0
  187. package/src/components/i18n/locales/mk/messages.json +6 -0
  188. package/src/components/i18n/locales/ml/messages.json +6 -0
  189. package/src/components/i18n/locales/mn/messages.json +6 -0
  190. package/src/components/i18n/locales/mr/messages.json +6 -0
  191. package/src/components/i18n/locales/ms/messages.json +6 -0
  192. package/src/components/i18n/locales/my/messages.json +6 -0
  193. package/src/components/i18n/locales/ne/messages.json +6 -0
  194. package/src/components/i18n/locales/nl/messages.json +6 -0
  195. package/src/components/i18n/locales/no/messages.json +6 -0
  196. package/src/components/i18n/locales/pa/messages.json +6 -0
  197. package/src/components/i18n/locales/pl/messages.json +6 -0
  198. package/src/components/i18n/locales/ps/messages.json +6 -0
  199. package/src/components/i18n/locales/pt/messages.json +6 -0
  200. package/src/components/i18n/locales/ro/messages.json +6 -0
  201. package/src/components/i18n/locales/ru/messages.json +6 -0
  202. package/src/components/i18n/locales/sd/messages.json +6 -0
  203. package/src/components/i18n/locales/si/messages.json +6 -0
  204. package/src/components/i18n/locales/sk/messages.json +6 -0
  205. package/src/components/i18n/locales/sl/messages.json +6 -0
  206. package/src/components/i18n/locales/sq/messages.json +6 -0
  207. package/src/components/i18n/locales/sr/messages.json +6 -0
  208. package/src/components/i18n/locales/sv/messages.json +6 -0
  209. package/src/components/i18n/locales/sw/messages.json +6 -0
  210. package/src/components/i18n/locales/ta/messages.json +6 -0
  211. package/src/components/i18n/locales/te/messages.json +6 -0
  212. package/src/components/i18n/locales/th/messages.json +6 -0
  213. package/src/components/i18n/locales/tr/messages.json +6 -0
  214. package/src/components/i18n/locales/ug/messages.json +6 -0
  215. package/src/components/i18n/locales/uk/messages.json +6 -0
  216. package/src/components/i18n/locales/ur/messages.json +6 -0
  217. package/src/components/i18n/locales/vi/messages.json +6 -0
  218. package/src/components/i18n/locales/yi/messages.json +6 -0
  219. package/src/components/i18n/locales/zh/messages.json +6 -0
  220. package/src/components/icons/index.ts +17 -0
  221. package/src/components/inline-tools/inline-tool-link.ts +1 -1
  222. package/src/components/inline-tools/inline-tool-marker.ts +737 -0
  223. package/src/components/inline-tools/utils/formatting-range-utils.ts +6 -3
  224. package/src/components/inline-tools/utils/marker-dom-utils.ts +17 -0
  225. package/src/components/modules/api/blocks.ts +34 -9
  226. package/src/components/modules/blockEvents/composers/keyboardNavigation.ts +75 -29
  227. package/src/components/modules/blockEvents/index.ts +13 -5
  228. package/src/components/modules/blockManager/blockManager.ts +81 -2
  229. package/src/components/modules/blockManager/hierarchy.ts +20 -2
  230. package/src/components/modules/blockManager/operations.ts +70 -35
  231. package/src/components/modules/blockManager/repository.ts +22 -0
  232. package/src/components/modules/blockManager/types.ts +3 -1
  233. package/src/components/modules/blockManager/yjs-sync.ts +173 -39
  234. package/src/components/modules/blockSelection.ts +3 -0
  235. package/src/components/modules/crossBlockSelection.ts +11 -3
  236. package/src/components/modules/drag/preview/DragPreview.ts +10 -2
  237. package/src/components/modules/drag/target/DropTargetDetector.ts +100 -11
  238. package/src/components/modules/drag/utils/drag.constants.ts +1 -1
  239. package/src/components/modules/normalizeInlineImages.ts +263 -0
  240. package/src/components/modules/paste/google-docs-preprocessor.ts +197 -0
  241. package/src/components/modules/paste/handlers/base.ts +43 -2
  242. package/src/components/modules/paste/handlers/html-handler.ts +1 -1
  243. package/src/components/modules/paste/handlers/index.ts +1 -0
  244. package/src/components/modules/paste/handlers/table-cells-handler.ts +104 -0
  245. package/src/components/modules/paste/index.ts +20 -3
  246. package/src/components/modules/readonly.ts +8 -2
  247. package/src/components/modules/rectangleSelection.ts +5 -2
  248. package/src/components/modules/renderer.ts +35 -0
  249. package/src/components/modules/saver.ts +52 -2
  250. package/src/components/modules/toolbar/blockSettings.ts +52 -44
  251. package/src/components/modules/toolbar/index.ts +124 -17
  252. package/src/components/modules/toolbar/inline/index.ts +4 -4
  253. package/src/components/modules/toolbar/plus-button.ts +3 -3
  254. package/src/components/modules/toolbar/settings-toggler.ts +3 -3
  255. package/src/components/modules/toolbar/styles.ts +7 -7
  256. package/src/components/modules/ui.ts +6 -6
  257. package/src/components/modules/uiControllers/controllers/blockHover.ts +16 -2
  258. package/src/components/modules/uiControllers/handlers/touch.ts +83 -10
  259. package/src/components/modules/yjs/block-observer.ts +9 -3
  260. package/src/components/modules/yjs/document-store.ts +10 -7
  261. package/src/components/modules/yjs/types.ts +8 -6
  262. package/src/components/modules/yjs/undo-history.ts +90 -11
  263. package/src/components/selection/fake-background/shadows.ts +1 -1
  264. package/src/components/shared/color-picker.ts +211 -0
  265. package/src/components/shared/color-presets.ts +25 -0
  266. package/src/components/ui/toolbox.ts +19 -11
  267. package/src/components/utils/color-mapping.ts +241 -0
  268. package/src/components/utils/notifier/draw.ts +9 -9
  269. package/src/components/utils/placeholder.ts +24 -8
  270. package/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.const.ts +2 -2
  271. package/src/components/utils/popover/components/popover-item/popover-item-default/popover-item-default.ts +14 -12
  272. package/src/components/utils/popover/components/search-input/search-input.const.ts +2 -2
  273. package/src/components/utils/popover/popover-abstract.ts +27 -3
  274. package/src/components/utils/popover/popover-desktop.ts +26 -3
  275. package/src/components/utils/popover/popover-inline.ts +14 -1
  276. package/src/components/utils/popover/popover-mobile.ts +4 -4
  277. package/src/components/utils/popover/popover.const.ts +2 -2
  278. package/src/components/utils/sanitizer.ts +24 -3
  279. package/src/components/utils/tw.ts +17 -5
  280. package/src/stories/Header.stories.ts +106 -0
  281. package/src/stories/MarkerColors.stories.ts +730 -0
  282. package/src/stories/Popover.stories.ts +1 -3
  283. package/src/stories/Table.stories.ts +1662 -0
  284. package/src/styles/main.css +207 -37
  285. package/src/tools/header/index.ts +1 -1
  286. package/src/tools/index.ts +3 -1
  287. package/src/tools/list/caret-manager.ts +28 -10
  288. package/src/tools/list/constants.ts +2 -2
  289. package/src/tools/list/dom-builder.ts +3 -3
  290. package/src/tools/list/static-configs.ts +0 -1
  291. package/src/tools/paragraph/index.ts +15 -7
  292. package/src/tools/table/core/table-commands.ts +99 -0
  293. package/src/tools/table/core/table-controller.ts +231 -0
  294. package/src/tools/table/core/table-events.ts +102 -0
  295. package/src/tools/table/index.ts +1070 -174
  296. package/src/tools/table/ownership/table-event-broker.ts +74 -0
  297. package/src/tools/table/ownership/table-ownership-registry.ts +126 -0
  298. package/src/tools/table/table-add-controls.ts +85 -15
  299. package/src/tools/table/table-cell-blocks.ts +336 -38
  300. package/src/tools/table/table-cell-clipboard.ts +415 -0
  301. package/src/tools/table/table-cell-color-picker.ts +34 -0
  302. package/src/tools/table/table-cell-selection.ts +264 -15
  303. package/src/tools/table/table-core.ts +3 -42
  304. package/src/tools/table/table-heading-toggle.ts +2 -2
  305. package/src/tools/table/table-model.ts +623 -0
  306. package/src/tools/table/table-operations.ts +59 -78
  307. package/src/tools/table/table-resize.ts +15 -11
  308. package/src/tools/table/table-restrictions.ts +69 -3
  309. package/src/tools/table/table-row-col-action-handler.ts +22 -7
  310. package/src/tools/table/table-row-col-controls.ts +129 -12
  311. package/src/tools/table/table-row-col-drag.ts +14 -0
  312. package/src/tools/table/table-scroll-haze.ts +152 -0
  313. package/src/tools/table/types.ts +22 -1
  314. package/src/tools/table/view/table-cell-blocks-adapter.ts +47 -0
  315. package/src/variants/blok-minimum.ts +13 -0
  316. package/types/api/block.d.ts +13 -0
  317. package/types/api/blocks.d.ts +16 -0
  318. package/types/tools/table.d.ts +2 -0
  319. package/dist/chunks/i18next-CugVlwWp.mjs +0 -1292
  320. package/src/tools/table/data-normalizer.ts +0 -32
@@ -1,16 +1,19 @@
1
- var Pt = Object.defineProperty, $t = Object.defineProperties;
2
- var Dt = Object.getOwnPropertyDescriptors;
3
- var wt = Object.getOwnPropertySymbols;
4
- var jt = Object.prototype.hasOwnProperty, Gt = Object.prototype.propertyIsEnumerable;
5
- var kt = (n, t, e) => t in n ? Pt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, E = (n, t) => {
1
+ var le = Object.defineProperty, ce = Object.defineProperties;
2
+ var de = Object.getOwnPropertyDescriptors;
3
+ var Mt = Object.getOwnPropertySymbols;
4
+ var he = Object.prototype.hasOwnProperty, ue = Object.prototype.propertyIsEnumerable;
5
+ var Bt = (s, t, e) => t in s ? le(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, L = (s, t) => {
6
6
  for (var e in t || (t = {}))
7
- jt.call(t, e) && kt(n, e, t[e]);
8
- if (wt)
9
- for (var e of wt(t))
10
- Gt.call(t, e) && kt(n, e, t[e]);
11
- return n;
12
- }, M = (n, t) => $t(n, Dt(t));
13
- const d = {
7
+ he.call(t, e) && Bt(s, e, t[e]);
8
+ if (Mt)
9
+ for (var e of Mt(t))
10
+ ue.call(t, e) && Bt(s, e, t[e]);
11
+ return s;
12
+ }, D = (s, t) => ce(s, de(t));
13
+ function pe(s) {
14
+ return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
15
+ }
16
+ const p = {
14
17
  // ============================================
15
18
  // Core Element Identifiers
16
19
  // ============================================
@@ -267,7 +270,7 @@ const d = {
267
270
  testid: "data-blok-testid",
268
271
  /** Force hover state (for tests/storybook) */
269
272
  forceHover: "data-blok-force-hover"
270
- }, z = (n, t) => t === void 0 ? `[${n}]` : `[${n}="${t}"]`, g = {
273
+ }, st = (s, t) => t === void 0 ? `[${s}]` : `[${s}="${t}"]`, v = {
271
274
  BACKSPACE: 8,
272
275
  TAB: 9,
273
276
  ENTER: 13,
@@ -276,16 +279,16 @@ const d = {
276
279
  DOWN: 40,
277
280
  RIGHT: 39,
278
281
  DELETE: 46
279
- }, Ae = {
282
+ }, ko = {
280
283
  LEFT: 0
281
- }, Se = 650, Wt = () => "0.6.0-beta.8";
282
- var Vt = /* @__PURE__ */ ((n) => (n.VERBOSE = "VERBOSE", n.INFO = "INFO", n.WARN = "WARN", n.ERROR = "ERROR", n))(Vt || {});
283
- const V = (n, t, e = "log", o, s = "color: inherit") => {
284
- const i = typeof console == "undefined" ? void 0 : console;
285
- if (!i || typeof i[e] != "function")
284
+ }, Co = 650, fe = () => "0.6.0";
285
+ var ge = /* @__PURE__ */ ((s) => (s.VERBOSE = "VERBOSE", s.INFO = "INFO", s.WARN = "WARN", s.ERROR = "ERROR", s))(ge || {});
286
+ const Q = (s, t, e = "log", o, n = "color: inherit") => {
287
+ const r = typeof console == "undefined" ? void 0 : console;
288
+ if (!r || typeof r[e] != "function")
286
289
  return;
287
- const r = ["info", "log", "warn", "error"].includes(e), a = [];
288
- switch (V.logLevel) {
290
+ const i = ["info", "log", "warn", "error"].includes(e), a = [];
291
+ switch (Q.logLevel) {
289
292
  case "VERBOSE":
290
293
  break;
291
294
  case "ERROR":
@@ -297,12 +300,12 @@ const V = (n, t, e = "log", o, s = "color: inherit") => {
297
300
  return;
298
301
  break;
299
302
  case "INFO":
300
- if (!r || n)
303
+ if (!i || s)
301
304
  return;
302
305
  break;
303
306
  }
304
307
  o && a.push(o);
305
- const c = `Blok ${Wt()}`, l = `line-height: 1em;
308
+ const l = `Blok ${fe()}`, d = s ? i ? (a.unshift(`line-height: 1em;
306
309
  color: #006FEA;
307
310
  display: inline-block;
308
311
  font-size: 11px;
@@ -311,164 +314,164 @@ const V = (n, t, e = "log", o, s = "color: inherit") => {
311
314
  padding: 4px 9px;
312
315
  border-radius: 30px;
313
316
  border: 1px solid rgba(56, 138, 229, 0.16);
314
- margin: 4px 5px 4px 0;`, h = n ? r ? (a.unshift(l, s), `%c${c}%c ${t}`) : `( ${c} )${t}` : t, u = r ? o !== void 0 ? [`${h} %o`, ...a] : [h, ...a] : [h];
317
+ margin: 4px 5px 4px 0;`, n), `%c${l}%c ${t}`) : `( ${l} )${t}` : t, u = i ? o !== void 0 ? [`${d} %o`, ...a] : [d, ...a] : [d];
315
318
  try {
316
- i[e](...u);
317
- } catch (p) {
319
+ r[e](...u);
320
+ } catch (h) {
318
321
  }
319
322
  };
320
- V.logLevel = "VERBOSE";
321
- const Le = (n) => {
322
- V.logLevel = n;
323
- }, q = (n, t = "log", e, o) => {
324
- V(!1, n, t, e, o);
325
- }, Ne = (n, t = "log", e, o) => {
326
- V(!0, n, t, e, o);
327
- }, J = (n) => typeof n == "function", X = (n) => {
328
- if (n === null || typeof n != "object")
323
+ Q.logLevel = "VERBOSE";
324
+ const yo = (s) => {
325
+ Q.logLevel = s;
326
+ }, rt = (s, t = "log", e, o) => {
327
+ Q(!1, s, t, e, o);
328
+ }, Eo = (s, t = "log", e, o) => {
329
+ Q(!0, s, t, e, o);
330
+ }, E = (s) => typeof s == "function", T = (s) => {
331
+ if (s === null || typeof s != "object")
329
332
  return !1;
330
- const t = Object.getPrototypeOf(n);
333
+ const t = Object.getPrototypeOf(s);
331
334
  return t === null || t === Object.prototype;
332
- }, j = (n) => typeof n == "string", Re = (n) => typeof n == "boolean", Ct = (n) => typeof n == "number", Be = function(n) {
333
- return n === void 0;
334
- }, ht = (n) => n == null ? !0 : typeof n == "string" || Array.isArray(n) ? n.length === 0 : n instanceof Map || n instanceof Set ? n.size === 0 : typeof n == "object" ? Object.keys(n).length === 0 : !1, _t = (n, t) => function(...e) {
335
- setTimeout(() => n.apply(this, e), t);
336
- }, Oe = (n, t, e) => {
335
+ }, P = (s) => typeof s == "string", Xt = (s) => typeof s == "boolean", Ht = (s) => typeof s == "number", To = function(s) {
336
+ return s === void 0;
337
+ }, R = (s) => s == null ? !0 : typeof s == "string" || Array.isArray(s) ? s.length === 0 : s instanceof Map || s instanceof Set ? s.size === 0 : typeof s == "object" ? Object.keys(s).length === 0 : !1, me = (s, t) => function(...e) {
338
+ setTimeout(() => s.apply(this, e), t);
339
+ }, xo = (s, t, e) => {
337
340
  const o = {
338
341
  timeoutId: null
339
342
  };
340
- return function(...s) {
341
- const i = () => {
342
- o.timeoutId = null, n.apply(this, s);
343
+ return function(...n) {
344
+ const r = () => {
345
+ o.timeoutId = null, s.apply(this, n);
343
346
  };
344
- o.timeoutId !== null && clearTimeout(o.timeoutId), o.timeoutId = setTimeout(i, t);
347
+ o.timeoutId !== null && clearTimeout(o.timeoutId), o.timeoutId = setTimeout(r, t);
345
348
  };
346
- }, Me = (n, t, e) => {
349
+ }, Io = (s, t, e) => {
347
350
  const o = {
348
351
  lastCallTime: void 0,
349
352
  lastInvokeTime: 0,
350
353
  timerId: void 0,
351
354
  lastArgs: void 0,
352
355
  lastThis: void 0
353
- }, s = (l) => {
354
- o.lastInvokeTime = l;
355
- const h = o.lastArgs, u = o.lastThis;
356
- return o.lastArgs = void 0, o.lastThis = void 0, n.apply(u, h != null ? h : []);
357
- }, i = (l) => {
358
- var v;
359
- const h = l - ((v = o.lastCallTime) != null ? v : 0), u = l - o.lastInvokeTime, p = t - h;
360
- return Math.min(p, t - u);
361
- }, r = (l) => {
362
- var p;
363
- const h = l - ((p = o.lastCallTime) != null ? p : 0), u = l - o.lastInvokeTime;
364
- return o.lastCallTime === void 0 || h >= t || h < 0 || u >= t;
356
+ }, n = (c) => {
357
+ o.lastInvokeTime = c;
358
+ const d = o.lastArgs, u = o.lastThis;
359
+ return o.lastArgs = void 0, o.lastThis = void 0, s.apply(u, d != null ? d : []);
360
+ }, r = (c) => {
361
+ var g;
362
+ const d = c - ((g = o.lastCallTime) != null ? g : 0), u = c - o.lastInvokeTime, h = t - d;
363
+ return Math.min(h, t - u);
364
+ }, i = (c) => {
365
+ var h;
366
+ const d = c - ((h = o.lastCallTime) != null ? h : 0), u = c - o.lastInvokeTime;
367
+ return o.lastCallTime === void 0 || d >= t || d < 0 || u >= t;
365
368
  }, a = () => {
366
- const l = Date.now();
367
- if (!r(l)) {
368
- o.timerId = setTimeout(a, i(l));
369
+ const c = Date.now();
370
+ if (!i(c)) {
371
+ o.timerId = setTimeout(a, r(c));
369
372
  return;
370
373
  }
371
- o.timerId = void 0, o.lastArgs !== void 0 && s(l), o.lastArgs = void 0, o.lastThis = void 0;
374
+ o.timerId = void 0, o.lastArgs !== void 0 && n(c), o.lastArgs = void 0, o.lastThis = void 0;
372
375
  };
373
- return function(...l) {
374
- const h = Date.now(), u = r(h);
375
- if (o.lastArgs = l, o.lastThis = this, o.lastCallTime = h, !!(u && o.timerId === void 0))
376
- return o.lastInvokeTime = h, o.timerId = setTimeout(a, t), s(h);
376
+ return function(...c) {
377
+ const d = Date.now(), u = i(d);
378
+ if (o.lastArgs = c, o.lastThis = this, o.lastCallTime = d, !!(u && o.timerId === void 0))
379
+ return o.lastInvokeTime = d, o.timerId = setTimeout(a, t), n(d);
377
380
  };
378
- }, w = (() => {
381
+ }, S = (() => {
379
382
  try {
380
383
  return new Function("return this")();
381
- } catch (n) {
384
+ } catch (s) {
382
385
  return;
383
386
  }
384
387
  })();
385
- w && typeof w.window == "undefined" && (w.window = w);
386
- const tt = () => {
387
- if (w != null && w.window)
388
- return w.window;
389
- }, St = () => {
390
- if (w != null && w.navigator)
391
- return w.navigator;
392
- const n = tt();
393
- return n == null ? void 0 : n.navigator;
394
- }, Fe = (n) => /^[-\w]+\/([-+\w]+|\*)$/.test(n), Ut = () => {
395
- var s, i;
396
- const n = {
388
+ S && typeof S.window == "undefined" && (S.window = S);
389
+ const ht = () => {
390
+ if (S != null && S.window)
391
+ return S.window;
392
+ }, Yt = () => {
393
+ if (S != null && S.navigator)
394
+ return S.navigator;
395
+ const s = ht();
396
+ return s == null ? void 0 : s.navigator;
397
+ }, Ao = (s) => /^[-\w]+\/([-+\w]+|\*)$/.test(s), ve = () => {
398
+ var n, r;
399
+ const s = {
397
400
  win: !1,
398
401
  mac: !1,
399
402
  x11: !1,
400
403
  linux: !1
401
- }, t = St(), e = (i = (s = t == null ? void 0 : t.userAgent) == null ? void 0 : s.toLowerCase()) != null ? i : "", o = e ? Object.keys(n).find((r) => e.indexOf(r) !== -1) : void 0;
402
- return o !== void 0 && (n[o] = !0), n;
403
- }, Kt = 650, zt = () => {
404
- const n = tt();
405
- return !n || typeof n.matchMedia != "function" ? !1 : n.matchMedia(`(max-width: ${Kt}px)`).matches;
406
- }, He = (() => {
407
- var c;
408
- const n = St();
409
- if (!n)
404
+ }, t = Yt(), e = (r = (n = t == null ? void 0 : t.userAgent) == null ? void 0 : n.toLowerCase()) != null ? r : "", o = e ? Object.keys(s).find((i) => e.indexOf(i) !== -1) : void 0;
405
+ return o !== void 0 && (s[o] = !0), s;
406
+ }, be = 650, we = () => {
407
+ const s = ht();
408
+ return !s || typeof s.matchMedia != "function" ? !1 : s.matchMedia(`(max-width: ${be}px)`).matches;
409
+ }, So = (() => {
410
+ var l;
411
+ const s = Yt();
412
+ if (!s)
410
413
  return !1;
411
- const t = n.userAgent || "", e = n.userAgentData, o = e == null ? void 0 : e.platform;
414
+ const t = s.userAgent || "", e = s.userAgentData, o = e == null ? void 0 : e.platform;
412
415
  if (/iP(ad|hone|od)/.test(t) || o !== void 0 && o !== "" && /iP(ad|hone|od)/.test(o))
413
416
  return !0;
414
- const s = ((c = n.maxTouchPoints) != null ? c : 0) > 1, i = () => (
417
+ const n = ((l = s.maxTouchPoints) != null ? l : 0) > 1, r = () => (
415
418
  // eslint-disable-next-line @typescript-eslint/no-deprecated -- Fallback for older browsers that don't support User-Agent Client Hints
416
- n.platform
417
- ), r = o !== void 0 && o !== "" ? o : void 0;
418
- return (s ? r != null ? r : i() : void 0) === "MacIntel";
419
- })(), Pe = (n) => {
419
+ s.platform
420
+ ), i = o !== void 0 && o !== "" ? o : void 0;
421
+ return (n ? i != null ? i : r() : void 0) === "MacIntel";
422
+ })(), Lo = (s) => {
420
423
  try {
421
- return new URL(n).href;
424
+ return new URL(s).href;
422
425
  } catch (e) {
423
426
  }
424
- const t = tt();
425
- return n.substring(0, 2) === "//" ? t ? `${t.location.protocol}${n}` : n : t ? `${t.location.origin}${n}` : n;
426
- }, $e = (n) => {
427
- const t = tt();
428
- t && t.open(n, "_blank");
429
- }, qt = (n) => n && n.slice(0, 1).toUpperCase() + n.slice(1), De = (n) => {
430
- const t = Ut(), e = n.replace(/shift/gi, "⇧").replace(/backspace/gi, "⌫").replace(/enter/gi, "⏎").replace(/up/gi, "↑").replace(/left/gi, "→").replace(/down/gi, "↓").replace(/right/gi, "←").replace(/escape/gi, "⎋").replace(/insert/gi, "Ins").replace(/delete/gi, "␡").replace(/\+/gi, " + ");
427
+ const t = ht();
428
+ return s.substring(0, 2) === "//" ? t ? `${t.location.protocol}${s}` : s : t ? `${t.location.origin}${s}` : s;
429
+ }, No = (s) => {
430
+ const t = ht();
431
+ t && t.open(s, "_blank");
432
+ }, ke = (s) => s && s.slice(0, 1).toUpperCase() + s.slice(1), Oo = (s) => {
433
+ const t = ve(), e = s.replace(/shift/gi, "⇧").replace(/backspace/gi, "⌫").replace(/enter/gi, "⏎").replace(/up/gi, "↑").replace(/left/gi, "→").replace(/down/gi, "↓").replace(/right/gi, "←").replace(/escape/gi, "⎋").replace(/insert/gi, "Ins").replace(/delete/gi, "␡").replace(/\+/gi, " + ");
431
434
  return t.mac ? e.replace(/ctrl|cmd/gi, "⌘").replace(/alt/gi, "⌥") : e.replace(/cmd/gi, "Ctrl").replace(/windows/gi, "WIN");
432
- }, Lt = (n, t) => {
433
- const e = E({}, n);
435
+ }, Jt = (s, t) => {
436
+ const e = L({}, s);
434
437
  return Object.keys(t).forEach((o) => {
435
- const s = e[o], i = t[o];
436
- if (i === void 0)
438
+ const n = e[o], r = t[o];
439
+ if (r === void 0)
437
440
  return;
438
- if (X(i) && X(s) && !Array.isArray(i)) {
439
- e[o] = Lt(
440
- s,
441
- i
441
+ if (T(r) && T(n) && !Array.isArray(r)) {
442
+ e[o] = Jt(
443
+ n,
444
+ r
442
445
  );
443
446
  return;
444
447
  }
445
- e[o] = i;
448
+ e[o] = r;
446
449
  }), e;
447
- }, je = (n, ...t) => {
448
- if (!X(n) || t.length === 0)
449
- return n;
450
- const e = t.reduce((o, s) => X(s) ? Lt(o, s) : o, n);
451
- return Object.assign(n, e), n;
452
- }, Xt = (n, t) => n.length !== t.length ? !1 : n.every((e, o) => pt(e, t[o])), pt = (n, t) => {
453
- if (n === t)
450
+ }, it = (s, ...t) => {
451
+ if (!T(s) || t.length === 0)
452
+ return s;
453
+ const e = t.reduce((o, n) => T(n) ? Jt(o, n) : o, s);
454
+ return Object.assign(s, e), s;
455
+ }, Ce = (s, t) => s.length !== t.length ? !1 : s.every((e, o) => xt(e, t[o])), xt = (s, t) => {
456
+ if (s === t)
454
457
  return !0;
455
- if (n === null || t === null || typeof n != "object" || typeof t != "object" || Array.isArray(n) !== Array.isArray(t))
458
+ if (s === null || t === null || typeof s != "object" || typeof t != "object" || Array.isArray(s) !== Array.isArray(t))
456
459
  return !1;
457
- if (Array.isArray(n) && Array.isArray(t))
458
- return Xt(n, t);
459
- const e = Object.keys(n), o = Object.keys(t);
460
+ if (Array.isArray(s) && Array.isArray(t))
461
+ return Ce(s, t);
462
+ const e = Object.keys(s), o = Object.keys(t);
460
463
  return e.length !== o.length ? !1 : e.every(
461
- (s) => Object.prototype.hasOwnProperty.call(t, s) && pt(n[s], t[s])
464
+ (n) => Object.prototype.hasOwnProperty.call(t, n) && xt(s[n], t[n])
462
465
  );
463
- }, Yt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
464
- let Zt = (n = 21) => {
465
- let t = "", e = crypto.getRandomValues(new Uint8Array(n |= 0));
466
- for (; n--; )
467
- t += Yt[e[n] & 63];
466
+ }, ye = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
467
+ let Ee = (s = 21) => {
468
+ let t = "", e = crypto.getRandomValues(new Uint8Array(s |= 0));
469
+ for (; s--; )
470
+ t += ye[e[s] & 63];
468
471
  return t;
469
472
  };
470
- const Qt = 1e8, Jt = 16, Ge = () => Zt(10), te = (n = "") => `${n}${Math.floor(Math.random() * Qt).toString(Jt)}`;
471
- class f {
473
+ const Te = 1e8, xe = 16, Ro = () => Ee(10), Ie = (s = "") => `${s}${Math.floor(Math.random() * Te).toString(xe)}`;
474
+ class m {
472
475
  /**
473
476
  * Check if passed tag has no closed tag
474
477
  * @param {HTMLElement} tag - element to check
@@ -523,12 +526,12 @@ class f {
523
526
  * @param classNames - array of class names to add
524
527
  */
525
528
  static safelyAddClasses(t, e) {
526
- const o = [], s = [];
527
- for (const i of e)
528
- f.isValidClassName(i) ? o.push(i) : s.push(i);
529
- if (o.length > 0 && t.classList.add(...o), s.length > 0) {
530
- const i = t.className, r = i ? `${i} ${s.join(" ")}` : s.join(" ");
531
- t.setAttribute("class", r);
529
+ const o = [], n = [];
530
+ for (const r of e)
531
+ m.isValidClassName(r) ? o.push(r) : n.push(r);
532
+ if (o.length > 0 && t.classList.add(...o), n.length > 0) {
533
+ const r = t.className, i = r ? `${r} ${n.join(" ")}` : n.join(" ");
534
+ t.setAttribute("class", i);
532
535
  }
533
536
  }
534
537
  /**
@@ -539,28 +542,28 @@ class f {
539
542
  * @returns {HTMLElement}
540
543
  */
541
544
  static make(t, e = null, o = {}) {
542
- const s = document.createElement(t);
545
+ const n = document.createElement(t);
543
546
  if (Array.isArray(e)) {
544
- const i = e.filter((r) => r !== void 0 && r !== "").flatMap((r) => r.split(" ")).filter((r) => r !== "");
545
- f.safelyAddClasses(s, i);
547
+ const r = e.filter((i) => i !== void 0 && i !== "").flatMap((i) => i.split(" ")).filter((i) => i !== "");
548
+ m.safelyAddClasses(n, r);
546
549
  }
547
550
  if (typeof e == "string" && e !== "") {
548
- const i = e.split(" ").filter((r) => r !== "");
549
- f.safelyAddClasses(s, i);
551
+ const r = e.split(" ").filter((i) => i !== "");
552
+ m.safelyAddClasses(n, r);
550
553
  }
551
- for (const i in o) {
552
- if (!Object.prototype.hasOwnProperty.call(o, i))
554
+ for (const r in o) {
555
+ if (!Object.prototype.hasOwnProperty.call(o, r))
553
556
  continue;
554
- const r = o[i];
555
- if (r != null) {
556
- if (i in s) {
557
- s[i] = r;
557
+ const i = o[r];
558
+ if (i != null) {
559
+ if (r in n) {
560
+ n[r] = i;
558
561
  continue;
559
562
  }
560
- s.setAttribute(i, String(r));
563
+ n.setAttribute(r, String(i));
561
564
  }
562
565
  }
563
- return s;
566
+ return n;
564
567
  }
565
568
  /**
566
569
  * Creates Text Node with the passed content
@@ -584,7 +587,7 @@ class f {
584
587
  * @param {Element|Element[]} elements - element or elements list
585
588
  */
586
589
  static prepend(t, e) {
587
- Array.isArray(e) ? [...e].reverse().forEach((s) => t.prepend(s)) : t.prepend(e);
590
+ Array.isArray(e) ? [...e].reverse().forEach((n) => t.prepend(n)) : t.prepend(e);
588
591
  }
589
592
  /**
590
593
  * Selector Decorator
@@ -627,10 +630,10 @@ class f {
627
630
  * @param holder - element where to find inputs
628
631
  */
629
632
  static findAllInputs(t) {
630
- const e = Array.from(t.querySelectorAll(f.allInputsSelector)), o = [];
631
- for (const s of e)
632
- s instanceof HTMLElement && o.push(s);
633
- return o.reduce((s, i) => f.isNativeInput(i) || f.containsOnlyInlineElements(i) ? [...s, i] : [...s, ...f.getDeepestBlockElements(i)], []);
633
+ const e = Array.from(t.querySelectorAll(m.allInputsSelector)), o = [];
634
+ for (const n of e)
635
+ n instanceof HTMLElement && o.push(n);
636
+ return o.reduce((n, r) => m.isNativeInput(r) || m.containsOnlyInlineElements(r) ? [...n, r] : [...n, ...m.getDeepestBlockElements(r)], []);
634
637
  }
635
638
  /**
636
639
  * Search for deepest node which is Leaf.
@@ -643,21 +646,21 @@ class f {
643
646
  * Can return null if node is Document or DocumentFragment, or node is not attached to the DOM
644
647
  */
645
648
  static getDeepestNode(t, e = !1) {
646
- var h;
647
- const o = e ? "lastChild" : "firstChild", s = e ? "previousSibling" : "nextSibling";
649
+ var d;
650
+ const o = e ? "lastChild" : "firstChild", n = e ? "previousSibling" : "nextSibling";
648
651
  if (t === null || t.nodeType !== Node.ELEMENT_NODE)
649
652
  return t;
650
- const i = t[o];
651
- if (i === null)
653
+ const r = t[o];
654
+ if (r === null)
652
655
  return t;
653
- const r = i;
654
- if (!(f.isSingleTag(r) && !f.isNativeInput(r) && !f.isLineBreakTag(r)))
655
- return this.getDeepestNode(r, e);
656
- const c = r[s];
657
- if (c)
658
- return this.getDeepestNode(c, e);
659
- const l = (h = r.parentNode) == null ? void 0 : h[s];
660
- return l ? this.getDeepestNode(l, e) : r.parentNode;
656
+ const i = r;
657
+ if (!(m.isSingleTag(i) && !m.isNativeInput(i) && !m.isLineBreakTag(i)))
658
+ return this.getDeepestNode(i, e);
659
+ const l = i[n];
660
+ if (l)
661
+ return this.getDeepestNode(l, e);
662
+ const c = (d = i.parentNode) == null ? void 0 : d[n];
663
+ return c ? this.getDeepestNode(c, e) : i.parentNode;
661
664
  }
662
665
  /**
663
666
  * Check if object is DOM node
@@ -665,7 +668,7 @@ class f {
665
668
  * @returns {boolean}
666
669
  */
667
670
  static isElement(t) {
668
- return Ct(t) ? !1 : t != null && typeof t == "object" && "nodeType" in t && t.nodeType === Node.ELEMENT_NODE;
671
+ return Ht(t) ? !1 : t != null && typeof t == "object" && "nodeType" in t && t.nodeType === Node.ELEMENT_NODE;
669
672
  }
670
673
  /**
671
674
  * Check if object is DocumentFragment node
@@ -673,7 +676,7 @@ class f {
673
676
  * @returns {boolean}
674
677
  */
675
678
  static isFragment(t) {
676
- return Ct(t) ? !1 : t != null && typeof t == "object" && "nodeType" in t && t.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
679
+ return Ht(t) ? !1 : t != null && typeof t == "object" && "nodeType" in t && t.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
677
680
  }
678
681
  /**
679
682
  * Check if passed element is contenteditable
@@ -701,7 +704,7 @@ class f {
701
704
  * @returns {boolean}
702
705
  */
703
706
  static canSetCaret(t) {
704
- return f.isNativeInput(t) ? !(/* @__PURE__ */ new Set([
707
+ return m.isNativeInput(t) ? !(/* @__PURE__ */ new Set([
705
708
  "file",
706
709
  "checkbox",
707
710
  "radio",
@@ -710,7 +713,7 @@ class f {
710
713
  "button",
711
714
  "image",
712
715
  "reset"
713
- ])).has(t.type) : f.isContentEditable(t);
716
+ ])).has(t.type) : m.isContentEditable(t);
714
717
  }
715
718
  /**
716
719
  * Checks node if it is empty
@@ -721,11 +724,11 @@ class f {
721
724
  * @returns {boolean} true if it is empty
722
725
  */
723
726
  static isNodeEmpty(t, e) {
724
- var i, r;
727
+ var r, i;
725
728
  if (this.isSingleTag(t) && !this.isLineBreakTag(t))
726
729
  return !1;
727
- const o = this.isElement(t) && this.isNativeInput(t) ? t.value : (i = t.textContent) == null ? void 0 : i.replace("​", ""), s = e ? o == null ? void 0 : o.replace(new RegExp(e, "g"), "") : o;
728
- return ((r = s == null ? void 0 : s.length) != null ? r : 0) === 0;
730
+ const o = this.isElement(t) && this.isNativeInput(t) ? t.value : (r = t.textContent) == null ? void 0 : r.replace("​", ""), n = e ? o == null ? void 0 : o.replace(new RegExp(e, "g"), "") : o;
731
+ return ((i = n == null ? void 0 : n.length) != null ? i : 0) === 0;
729
732
  }
730
733
  /**
731
734
  * checks node if it is doesn't have any child nodes
@@ -746,11 +749,11 @@ class f {
746
749
  static isEmpty(t, e) {
747
750
  const o = [t];
748
751
  for (; o.length > 0; ) {
749
- const s = o.shift();
750
- if (s) {
751
- if (this.isLeaf(s) && !this.isNodeEmpty(s, e))
752
+ const n = o.shift();
753
+ if (n) {
754
+ if (this.isLeaf(n) && !this.isNodeEmpty(n, e))
752
755
  return !1;
753
- o.push(...Array.from(s.childNodes));
756
+ o.push(...Array.from(n.childNodes));
754
757
  }
755
758
  }
756
759
  return !0;
@@ -761,7 +764,7 @@ class f {
761
764
  * @returns {boolean}
762
765
  */
763
766
  static isHTMLString(t) {
764
- const e = f.make("div");
767
+ const e = m.make("div");
765
768
  return e.innerHTML = t, e.childElementCount > 0;
766
769
  }
767
770
  /**
@@ -771,7 +774,7 @@ class f {
771
774
  */
772
775
  static getContentLength(t) {
773
776
  var e, o;
774
- return f.isNativeInput(t) ? t.value.length : t.nodeType === Node.TEXT_NODE ? t.length : (o = (e = t.textContent) == null ? void 0 : e.length) != null ? o : 0;
777
+ return m.isNativeInput(t) ? t.value.length : t.nodeType === Node.TEXT_NODE ? t.length : (o = (e = t.textContent) == null ? void 0 : e.length) != null ? o : 0;
775
778
  }
776
779
  /**
777
780
  * Return array of names of block html elements
@@ -826,10 +829,10 @@ class f {
826
829
  * @returns {boolean}
827
830
  */
828
831
  static containsOnlyInlineElements(t) {
829
- const e = j(t) ? (() => {
830
- const s = document.createElement("div");
831
- return s.innerHTML = t, s;
832
- })() : t, o = (s) => !f.blockElements.includes(s.tagName.toLowerCase()) && Array.from(s.children).every(o);
832
+ const e = P(t) ? (() => {
833
+ const n = document.createElement("div");
834
+ return n.innerHTML = t, n;
835
+ })() : t, o = (n) => !m.blockElements.includes(n.tagName.toLowerCase()) && Array.from(n.children).every(o);
833
836
  return Array.from(e.children).every(o);
834
837
  }
835
838
  /**
@@ -838,7 +841,7 @@ class f {
838
841
  * @returns {HTMLElement[]}
839
842
  */
840
843
  static getDeepestBlockElements(t) {
841
- return f.containsOnlyInlineElements(t) ? [t] : Array.from(t.children).reduce((e, o) => [...e, ...f.getDeepestBlockElements(o)], []);
844
+ return m.containsOnlyInlineElements(t) ? [t] : Array.from(t.children).reduce((e, o) => [...e, ...m.getDeepestBlockElements(o)], []);
842
845
  }
843
846
  /**
844
847
  * Helper for get holder from {string} or return HTMLElement
@@ -846,7 +849,7 @@ class f {
846
849
  * @returns {HTMLElement}
847
850
  */
848
851
  static getHolder(t) {
849
- if (!j(t))
852
+ if (!P(t))
850
853
  return t;
851
854
  const e = document.getElementById(t);
852
855
  if (e !== null)
@@ -867,12 +870,12 @@ class f {
867
870
  * @param el - element to compute offset
868
871
  */
869
872
  static offset(t) {
870
- const e = t.getBoundingClientRect(), o = window.scrollX || document.documentElement.scrollLeft, s = window.scrollY || document.documentElement.scrollTop, i = e.top + s, r = e.left + o;
873
+ const e = t.getBoundingClientRect(), o = window.scrollX || document.documentElement.scrollLeft, n = window.scrollY || document.documentElement.scrollTop, r = e.top + n, i = e.left + o;
871
874
  return {
872
- top: i,
873
- left: r,
874
- bottom: i + e.height,
875
- right: r + e.width
875
+ top: r,
876
+ left: i,
877
+ bottom: r + e.height,
878
+ right: i + e.width
876
879
  };
877
880
  }
878
881
  /**
@@ -886,55 +889,67 @@ class f {
886
889
  t,
887
890
  NodeFilter.SHOW_TEXT,
888
891
  null
889
- ), s = (l, h, u, p) => {
890
- var y;
891
- if (!l && u) {
892
- const H = h - p, B = Math.max(e - H, 0), O = Math.min(B, p);
892
+ ), n = (c, d, u, h) => {
893
+ var w;
894
+ if (!c && u) {
895
+ const C = d - h, k = Math.max(e - C, 0), x = Math.min(k, h);
893
896
  return {
894
897
  node: u,
895
- offset: O
898
+ offset: x
896
899
  };
897
900
  }
898
- if (!l)
901
+ if (!c)
899
902
  return {
900
903
  node: null,
901
904
  offset: 0
902
905
  };
903
- const b = ((y = l.textContent) != null ? y : "").length;
904
- return h + b >= e ? {
905
- node: l,
906
- offset: Math.min(e - h, b)
907
- } : s(
906
+ const f = ((w = c.textContent) != null ? w : "").length;
907
+ return d + f >= e ? {
908
+ node: c,
909
+ offset: Math.min(e - d, f)
910
+ } : n(
908
911
  o.nextNode(),
909
- h + b,
910
- l,
911
- b
912
+ d + f,
913
+ c,
914
+ f
912
915
  );
913
- }, i = o.nextNode(), { node: r, offset: a } = s(i, 0, null, 0);
914
- if (!r)
916
+ }, r = o.nextNode(), { node: i, offset: a } = n(r, 0, null, 0);
917
+ if (!i)
915
918
  return {
916
919
  node: null,
917
920
  offset: 0
918
921
  };
919
- const c = r.textContent;
920
- return !c || c.length === 0 ? {
922
+ const l = i.textContent;
923
+ return !l || l.length === 0 ? {
921
924
  node: null,
922
925
  offset: 0
923
926
  } : {
924
- node: r,
927
+ node: i,
925
928
  offset: a
926
929
  };
927
930
  }
928
931
  }
929
- const ee = (n) => !/[^\t\n\r \u200B]/.test(n), oe = (n) => {
930
- n.setAttribute("data-blok-empty", f.isEmpty(n) ? "true" : "false");
931
- }, We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
932
- __proto__: null,
933
- Dom: f,
934
- isCollapsedWhitespaces: ee,
935
- toggleEmptyMark: oe
936
- }, Symbol.toStringTag, { value: "Module" }));
937
- class Nt {
932
+ const Mo = (s) => !/[^\t\n\r \u200B]/.test(s), Bo = (s) => {
933
+ s.setAttribute("data-blok-empty", m.isEmpty(s) ? "true" : "false");
934
+ }, Zt = ["header", "table"], G = /* @__PURE__ */ new Map(), Ho = (s) => {
935
+ var o;
936
+ const t = [...new Set(s)];
937
+ for (const n of t) {
938
+ const r = (o = G.get(n)) != null ? o : 0;
939
+ G.set(n, r + 1);
940
+ }
941
+ const e = { cleanedUp: !1 };
942
+ return () => {
943
+ if (!e.cleanedUp) {
944
+ e.cleanedUp = !0;
945
+ for (const n of t) {
946
+ const r = G.get(n);
947
+ r !== void 0 && (r <= 1 ? G.delete(n) : G.set(n, r - 1));
948
+ }
949
+ }
950
+ };
951
+ }, Fo = () => [...Zt, ...G.keys()], Po = (s) => s ? (s instanceof HTMLElement ? s : s.holder).closest("[data-blok-table-cell-blocks]") !== null : !1, $o = (s) => Zt.includes(s) || G.has(s);
952
+ class Qt {
938
953
  constructor() {
939
954
  this.allListeners = [];
940
955
  }
@@ -945,17 +960,17 @@ class Nt {
945
960
  * @param {Function} handler - method that will be fired on event
946
961
  * @param {boolean|AddEventListenerOptions} options - useCapture or {capture, passive, once}
947
962
  */
948
- on(t, e, o, s = !1) {
949
- if (this.findOne(t, e, o, s))
963
+ on(t, e, o, n = !1) {
964
+ if (this.findOne(t, e, o, n))
950
965
  return;
951
- const r = te("l"), a = {
952
- id: r,
966
+ const i = Ie("l"), a = {
967
+ id: i,
953
968
  element: t,
954
969
  eventType: e,
955
970
  handler: o,
956
- options: s
971
+ options: n
957
972
  };
958
- return this.allListeners.push(a), t.addEventListener(e, o, s), r;
973
+ return this.allListeners.push(a), t.addEventListener(e, o, n), i;
959
974
  }
960
975
  /**
961
976
  * Removes event listener from element
@@ -964,11 +979,11 @@ class Nt {
964
979
  * @param {Function} handler - remove handler, if element listens several handlers on the same event type
965
980
  * @param {boolean|AddEventListenerOptions} options - useCapture or {capture, passive, once}
966
981
  */
967
- off(t, e, o, s) {
968
- const i = this.findAll(t, e, o, s);
969
- i.forEach((r, a) => {
970
- const c = this.allListeners.indexOf(i[a]);
971
- c > -1 && (this.allListeners.splice(c, 1), r.element.removeEventListener(r.eventType, r.handler, r.options));
982
+ off(t, e, o, n) {
983
+ const r = this.findAll(t, e, o, n);
984
+ r.forEach((i, a) => {
985
+ const l = this.allListeners.indexOf(r[a]);
986
+ l > -1 && (this.allListeners.splice(l, 1), i.element.removeEventListener(i.eventType, i.handler, i.options));
972
987
  });
973
988
  }
974
989
  /**
@@ -991,9 +1006,9 @@ class Nt {
991
1006
  * @param {boolean|AddEventListenerOptions} [options] - event options
992
1007
  * @returns {ListenerData|null}
993
1008
  */
994
- findOne(t, e, o, s) {
995
- var r;
996
- return (r = this.findAll(t, e, o, s)[0]) != null ? r : null;
1009
+ findOne(t, e, o, n) {
1010
+ var i;
1011
+ return (i = this.findAll(t, e, o, n)[0]) != null ? i : null;
997
1012
  }
998
1013
  /**
999
1014
  * Return all stored listeners by passed params
@@ -1003,10 +1018,10 @@ class Nt {
1003
1018
  * @param {boolean|AddEventListenerOptions} [options] - event options
1004
1019
  * @returns {ListenerData[]}
1005
1020
  */
1006
- findAll(t, e, o, s) {
1007
- return t ? this.findByEventTarget(t).filter((r) => {
1008
- const a = e === void 0 || r.eventType === e, c = o === void 0 || r.handler === o, l = this.areOptionsEqual(r.options, s);
1009
- return a && c && l;
1021
+ findAll(t, e, o, n) {
1022
+ return t ? this.findByEventTarget(t).filter((i) => {
1023
+ const a = e === void 0 || i.eventType === e, l = o === void 0 || i.handler === o, c = this.areOptionsEqual(i.options, n);
1024
+ return a && l && c;
1010
1025
  }) : [];
1011
1026
  }
1012
1027
  /**
@@ -1061,7 +1076,7 @@ class Nt {
1061
1076
  * @returns {NormalizedListenerOptions}
1062
1077
  */
1063
1078
  normalizeListenerOptions(t) {
1064
- var e, o, s;
1079
+ var e, o, n;
1065
1080
  return typeof t == "boolean" ? {
1066
1081
  capture: t,
1067
1082
  once: !1,
@@ -1069,7 +1084,7 @@ class Nt {
1069
1084
  } : t ? {
1070
1085
  capture: (e = t.capture) != null ? e : !1,
1071
1086
  once: (o = t.once) != null ? o : !1,
1072
- passive: (s = t.passive) != null ? s : !1,
1087
+ passive: (n = t.passive) != null ? n : !1,
1073
1088
  signal: t.signal
1074
1089
  } : {
1075
1090
  capture: !1,
@@ -1086,79 +1101,79 @@ class Nt {
1086
1101
  areOptionsEqual(t, e) {
1087
1102
  if (e === void 0)
1088
1103
  return !0;
1089
- const o = this.normalizeListenerOptions(t), s = this.normalizeListenerOptions(e);
1090
- return o.capture === s.capture && o.once === s.once && o.passive === s.passive && o.signal === s.signal;
1104
+ const o = this.normalizeListenerOptions(t), n = this.normalizeListenerOptions(e);
1105
+ return o.capture === n.capture && o.once === n.once && o.passive === n.passive && o.signal === n.signal;
1091
1106
  }
1092
1107
  }
1093
- const G = (n, t) => {
1094
- if (!n.conversionConfig)
1108
+ const J = (s, t) => {
1109
+ if (!s.conversionConfig)
1095
1110
  return !1;
1096
- const e = n.conversionConfig[t];
1097
- return J(e) || j(e);
1098
- }, D = (n, t) => {
1111
+ const e = s.conversionConfig[t];
1112
+ return E(e) || P(e);
1113
+ }, Y = (s, t) => {
1099
1114
  const e = t.includes(".") ? t : `toolNames.${t}`;
1100
- return n.has(e) ? n.t(e) : void 0;
1101
- }, yt = (n, t, e = "") => {
1102
- const o = t.titleKey ? D(n, t.titleKey) : void 0;
1115
+ return s.has(e) ? s.t(e) : void 0;
1116
+ }, Ft = (s, t, e = "") => {
1117
+ const o = t.titleKey ? Y(s, t.titleKey) : void 0;
1103
1118
  if (o !== void 0)
1104
1119
  return o;
1105
- const s = t.title ? D(n, t.title) : void 0;
1106
- if (s !== void 0)
1107
- return s;
1120
+ const n = t.title ? Y(s, t.title) : void 0;
1121
+ if (n !== void 0)
1122
+ return n;
1108
1123
  if (t.title)
1109
1124
  return t.title;
1110
- const i = e ? D(n, e) : void 0;
1111
- return i != null ? i : e;
1112
- }, se = (n, t, e) => {
1113
- const o = t ? D(n, t) : void 0;
1125
+ const r = e ? Y(s, e) : void 0;
1126
+ return r != null ? r : e;
1127
+ }, Ae = (s, t, e) => {
1128
+ const o = t ? Y(s, t) : void 0;
1114
1129
  if (o !== void 0)
1115
1130
  return o;
1116
- const s = D(n, e);
1117
- return s != null ? s : e;
1118
- }, Et = (n, t) => G(n.tool, t), ne = (n, t) => Object.entries(n).some((([e, o]) => t[e] && pt(t[e], o))), Rt = async (n, t) => {
1119
- const o = (await n.save()).data, s = t.find((i) => i.name === n.name);
1120
- return s !== void 0 && !G(s, "export") ? [] : t.reduce((i, r) => {
1121
- if (!G(r, "import") || r.toolbox === void 0)
1122
- return i;
1123
- const a = r.toolbox.filter((c) => {
1124
- if (ht(c) || c.icon === void 0)
1131
+ const n = Y(s, e);
1132
+ return n != null ? n : e;
1133
+ }, Pt = (s, t) => J(s.tool, t), Se = (s, t) => Object.entries(s).some((([e, o]) => t[e] && xt(t[e], o))), te = async (s, t) => {
1134
+ const o = (await s.save()).data, n = t.find((r) => r.name === s.name);
1135
+ return n !== void 0 && !J(n, "export") ? [] : t.reduce((r, i) => {
1136
+ if (!J(i, "import") || i.toolbox === void 0)
1137
+ return r;
1138
+ const a = i.toolbox.filter((l) => {
1139
+ if (R(l) || l.icon === void 0)
1125
1140
  return !1;
1126
- const l = c.data !== void 0;
1127
- return !(l && c.data !== void 0 && ne(c.data, o) || !l && r.name === n.name);
1141
+ const c = l.data !== void 0;
1142
+ return !(c && l.data !== void 0 && Se(l.data, o) || !c && i.name === s.name);
1128
1143
  });
1129
- return i.push(M(E({}, r), {
1144
+ return r.push(D(L({}, i), {
1130
1145
  toolbox: a
1131
- })), i;
1146
+ })), r;
1132
1147
  }, []);
1133
- }, Ve = (n, t) => n.mergeable ? n.name === t.name ? !0 : Et(t, "export") && Et(n, "import") : !1, _e = async (n, t) => {
1134
- if (n.length === 0)
1148
+ }, Do = (s, t) => s.mergeable ? s.name === t.name ? !0 : Pt(t, "export") && Pt(s, "import") : !1, jo = async (s, t) => {
1149
+ if (s.length === 0)
1135
1150
  return [];
1136
- if (n.length === 1)
1137
- return Rt(n[0], t);
1138
- for (const o of n) {
1139
- const s = t.find((i) => i.name === o.name);
1140
- if (s !== void 0 && !G(s, "export"))
1151
+ if (s.length === 1)
1152
+ return te(s[0], t);
1153
+ for (const o of s) {
1154
+ const n = t.find((r) => r.name === o.name);
1155
+ if (n !== void 0 && !J(n, "export"))
1141
1156
  return [];
1142
1157
  }
1143
- const e = new Set(n.map((o) => o.name));
1144
- return t.reduce((o, s) => {
1145
- if (!G(s, "import") || s.toolbox === void 0)
1158
+ const e = new Set(s.map((o) => o.name));
1159
+ return t.reduce((o, n) => {
1160
+ if (!J(n, "import") || n.toolbox === void 0)
1146
1161
  return o;
1147
- const i = s.toolbox.filter((r) => !(ht(r) || r.icon === void 0 || !(r.data !== void 0) && e.size === 1 && e.has(s.name)));
1148
- return i.length > 0 && o.push(M(E({}, s), {
1149
- toolbox: i
1162
+ const r = n.toolbox.filter((i) => !(R(i) || i.icon === void 0 || !(i.data !== void 0) && e.size === 1 && e.has(n.name)));
1163
+ return r.length > 0 && o.push(D(L({}, n), {
1164
+ toolbox: r
1150
1165
  })), o;
1151
1166
  }, []);
1152
- }, Ue = (n, t) => {
1167
+ }, _o = (s, t) => {
1153
1168
  const e = t == null ? void 0 : t.export;
1154
- return J(e) ? e(n) : j(e) ? n[e] : (e !== void 0 && q("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."), "");
1155
- }, Ke = (n, t, e) => {
1169
+ return E(e) ? e(s) : P(e) ? s[e] : (e !== void 0 && rt("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."), "");
1170
+ }, Go = (s, t, e) => {
1156
1171
  const o = t == null ? void 0 : t.import;
1157
- return J(o) ? o(n, e) : j(o) ? {
1158
- [o]: n
1159
- } : (o !== void 0 && q("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."), {});
1172
+ return E(o) ? o(s, e) : P(o) ? {
1173
+ [o]: s
1174
+ } : (o !== void 0 && rt("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."), {});
1160
1175
  };
1161
- class Bt {
1176
+ class ee {
1162
1177
  constructor() {
1163
1178
  this.subscribers = {};
1164
1179
  }
@@ -1177,9 +1192,9 @@ class Bt {
1177
1192
  */
1178
1193
  once(t, e) {
1179
1194
  t in this.subscribers || (this.subscribers[t] = []);
1180
- const o = (s) => {
1181
- const i = e(s), r = this.subscribers[t].indexOf(o);
1182
- return r !== -1 && this.subscribers[t].splice(r, 1), i;
1195
+ const o = (n) => {
1196
+ const r = e(n), i = this.subscribers[t].indexOf(o);
1197
+ return i !== -1 && this.subscribers[t].splice(i, 1), r;
1183
1198
  };
1184
1199
  this.subscribers[t].push(o);
1185
1200
  }
@@ -1189,9 +1204,9 @@ class Bt {
1189
1204
  * @param data - subscribers get this data when they were fired
1190
1205
  */
1191
1206
  emit(t, e) {
1192
- ht(this.subscribers) || !this.subscribers[t] || this.subscribers[t].reduce((o, s) => {
1193
- const i = s(o);
1194
- return i !== void 0 ? i : o;
1207
+ R(this.subscribers) || !this.subscribers[t] || this.subscribers[t].reduce((o, n) => {
1208
+ const r = n(o);
1209
+ return r !== void 0 ? r : o;
1195
1210
  }, e);
1196
1211
  }
1197
1212
  /**
@@ -1205,8 +1220,8 @@ class Bt {
1205
1220
  console.warn(`EventDispatcher .off(): there is no subscribers for event "${t.toString()}". Probably, .off() called before .on()`);
1206
1221
  return;
1207
1222
  }
1208
- const s = o.indexOf(e);
1209
- s !== -1 && o.splice(s, 1);
1223
+ const n = o.indexOf(e);
1224
+ n !== -1 && o.splice(n, 1);
1210
1225
  }
1211
1226
  /**
1212
1227
  * Destroyer
@@ -1216,9 +1231,8 @@ class Bt {
1216
1231
  this.subscribers = {};
1217
1232
  }
1218
1233
  }
1219
- const ze = 180, qe = 400, Xe = "blok", Ye = "inline-toolbar", ot = "tooltip", Ze = "[data-blok-interface=inline-toolbar]";
1220
- typeof process != "undefined" ? process.platform === "darwin" ? "Meta" : "Control" : typeof navigator != "undefined" && navigator.userAgent.toLowerCase().includes("mac") ? "Meta" : "Control";
1221
- class m {
1234
+ const Wo = 180, Vo = 400, Uo = "blok", zo = "inline-toolbar", pt = "tooltip", Ko = "[data-blok-interface=inline-toolbar]", qo = typeof process != "undefined" ? process.platform === "darwin" ? "Meta" : "Control" : typeof navigator != "undefined" && navigator.userAgent.toLowerCase().includes("mac") ? "Meta" : "Control";
1235
+ class y {
1222
1236
  /**
1223
1237
  * Returns selected anchor node
1224
1238
  * {@link https://developer.mozilla.org/en-US/docs/Web/API/Selection/anchorNode}
@@ -1235,7 +1249,7 @@ class m {
1235
1249
  if (!t)
1236
1250
  return null;
1237
1251
  const e = t.anchorNode;
1238
- return e ? f.isElement(e) ? e : e.parentElement : null;
1252
+ return e ? m.isElement(e) ? e : e.parentElement : null;
1239
1253
  }
1240
1254
  /**
1241
1255
  * Returns selection offset according to the anchor node
@@ -1259,8 +1273,8 @@ class m {
1259
1273
  static isSelectionAtBlok(t) {
1260
1274
  if (!t)
1261
1275
  return !1;
1262
- const e = t.anchorNode || t.focusNode, o = e && e.nodeType === Node.TEXT_NODE ? e.parentNode : e, s = o && o instanceof Element ? o.closest(z(d.redactor)) : null;
1263
- return s ? s.nodeType === Node.ELEMENT_NODE : !1;
1276
+ const e = t.anchorNode || t.focusNode, o = e && e.nodeType === Node.TEXT_NODE ? e.parentNode : e, n = o && o instanceof Element ? o.closest(st(p.redactor)) : null;
1277
+ return n ? n.nodeType === Node.ELEMENT_NODE : !1;
1264
1278
  }
1265
1279
  /**
1266
1280
  * Check if current selection is at Blok's zone
@@ -1275,7 +1289,7 @@ class m {
1275
1289
  static isRangeAtBlok(t) {
1276
1290
  if (!t)
1277
1291
  return;
1278
- const e = t.startContainer && t.startContainer.nodeType === Node.TEXT_NODE ? t.startContainer.parentNode : t.startContainer, o = e && e instanceof Element ? e.closest(z(d.redactor)) : null;
1292
+ const e = t.startContainer && t.startContainer.nodeType === Node.TEXT_NODE ? t.startContainer.parentNode : t.startContainer, o = e && e instanceof Element ? e.closest(st(p.redactor)) : null;
1279
1293
  return o ? o.nodeType === Node.ELEMENT_NODE : !1;
1280
1294
  }
1281
1295
  /**
@@ -1316,19 +1330,19 @@ class m {
1316
1330
  height: 0
1317
1331
  }, e = window.getSelection();
1318
1332
  if (!e)
1319
- return q("Method window.getSelection returned null", "warn"), t;
1333
+ return rt("Method window.getSelection returned null", "warn"), t;
1320
1334
  if (e.rangeCount === null || Number.isNaN(e.rangeCount))
1321
- return q("Method SelectionUtils.rangeCount is not supported", "warn"), t;
1335
+ return rt("Method SelectionUtils.rangeCount is not supported", "warn"), t;
1322
1336
  if (e.rangeCount === 0)
1323
1337
  return t;
1324
- const o = e.getRangeAt(0).cloneRange(), s = o.getBoundingClientRect();
1325
- if (s.x === 0 && s.y === 0) {
1326
- const i = document.createElement("span");
1327
- i.appendChild(document.createTextNode("​")), o.insertNode(i);
1328
- const r = i.getBoundingClientRect(), a = i.parentNode;
1329
- return a == null || a.removeChild(i), a == null || a.normalize(), r;
1338
+ const o = e.getRangeAt(0).cloneRange(), n = o.getBoundingClientRect();
1339
+ if (n.x === 0 && n.y === 0) {
1340
+ const r = document.createElement("span");
1341
+ r.appendChild(document.createTextNode("​")), o.insertNode(r);
1342
+ const i = r.getBoundingClientRect(), a = r.parentNode;
1343
+ return a == null || a.removeChild(r), a == null || a.normalize(), i;
1330
1344
  }
1331
- return s;
1345
+ return n;
1332
1346
  }
1333
1347
  /**
1334
1348
  * Returns selected text as String
@@ -1339,22 +1353,22 @@ class m {
1339
1353
  return (e = t == null ? void 0 : t.toString()) != null ? e : "";
1340
1354
  }
1341
1355
  }
1342
- class st {
1356
+ class ft {
1343
1357
  /**
1344
1358
  * Set focus to contenteditable or native input element
1345
1359
  * @param element - element where to set focus
1346
1360
  * @param offset - offset of cursor
1347
1361
  */
1348
1362
  static setCursor(t, e = 0) {
1349
- const o = document.createRange(), s = window.getSelection(), i = f.isNativeInput(t);
1350
- return i && !f.canSetCaret(t) ? t.getBoundingClientRect() : i ? (t.focus(), t.selectionStart = e, t.selectionEnd = e, t.getBoundingClientRect()) : (o.setStart(t, e), o.setEnd(t, e), s ? (s.removeAllRanges(), s.addRange(o), o.getBoundingClientRect()) : t.getBoundingClientRect());
1363
+ const o = document.createRange(), n = window.getSelection(), r = m.isNativeInput(t);
1364
+ return r && !m.canSetCaret(t) ? t.getBoundingClientRect() : r ? (t.focus(), t.selectionStart = e, t.selectionEnd = e, t.getBoundingClientRect()) : (o.setStart(t, e), o.setEnd(t, e), n ? (n.removeAllRanges(), n.addRange(o), o.getBoundingClientRect()) : t.getBoundingClientRect());
1351
1365
  }
1352
1366
  /**
1353
1367
  * Check if current range exists and belongs to container
1354
1368
  * @param container - where range should be
1355
1369
  */
1356
1370
  static isRangeInsideContainer(t) {
1357
- const e = m.getRange();
1371
+ const e = y.getRange();
1358
1372
  return e === null ? !1 : t.contains(e.startContainer);
1359
1373
  }
1360
1374
  /**
@@ -1368,7 +1382,7 @@ class st {
1368
1382
  e.selectNodeContents(t.focusNode), e.collapse(!1), t.removeAllRanges(), t.addRange(e);
1369
1383
  }
1370
1384
  }
1371
- const gt = class gt {
1385
+ const Nt = class Nt {
1372
1386
  /**
1373
1387
  * Applies box-shadow to a wrapper to extend the background to fill line-height
1374
1388
  * @param wrapper - the wrapper element
@@ -1377,8 +1391,8 @@ const gt = class gt {
1377
1391
  const e = t.parentElement;
1378
1392
  if (!e)
1379
1393
  return;
1380
- const o = window.getComputedStyle(e), s = window.getComputedStyle(t), i = parseFloat(o.lineHeight), r = parseFloat(s.fontSize), a = Number.isNaN(i) ? r * 1.2 : i, c = t.getBoundingClientRect(), l = Math.max(0, (a - c.height) / 2);
1381
- l > 0 && (t.style.boxShadow = `0 ${l}px 0 ${this.BG_COLOR}, 0 -${l}px 0 ${this.BG_COLOR}`);
1394
+ const o = window.getComputedStyle(e), n = window.getComputedStyle(t), r = parseFloat(o.lineHeight), i = parseFloat(n.fontSize), a = Number.isNaN(r) ? i * 1.2 : r, l = t.getBoundingClientRect(), c = Math.max(0, (a - l.height) / 2);
1395
+ c > 0 && (t.style.boxShadow = `0 ${c}px 0 ${this.BG_COLOR}, 0 -${c}px 0 ${this.BG_COLOR}`);
1382
1396
  }
1383
1397
  /**
1384
1398
  * Applies additional box-shadow extensions to fill gaps between separate spans
@@ -1389,10 +1403,10 @@ const gt = class gt {
1389
1403
  const e = this.collectAllLineRects(t);
1390
1404
  if (e.length === 0)
1391
1405
  return;
1392
- e.sort((s, i) => s.top - i.top);
1406
+ e.sort((n, r) => n.top - r.top);
1393
1407
  const o = this.groupRectsByLine(e);
1394
- t.forEach((s) => {
1395
- this.applyMultiLineBoxShadow(s, o);
1408
+ t.forEach((n) => {
1409
+ this.applyMultiLineBoxShadow(n, o);
1396
1410
  });
1397
1411
  }
1398
1412
  /**
@@ -1402,11 +1416,11 @@ const gt = class gt {
1402
1416
  static collectAllLineRects(t) {
1403
1417
  const e = [];
1404
1418
  return t.forEach((o) => {
1405
- const s = o.getClientRects();
1406
- Array.from(s).forEach((i) => {
1419
+ const n = o.getClientRects();
1420
+ Array.from(n).forEach((r) => {
1407
1421
  e.push({
1408
- top: i.top,
1409
- bottom: i.bottom,
1422
+ top: r.top,
1423
+ bottom: r.bottom,
1410
1424
  span: o
1411
1425
  });
1412
1426
  });
@@ -1419,9 +1433,9 @@ const gt = class gt {
1419
1433
  static groupRectsByLine(t) {
1420
1434
  const e = [];
1421
1435
  return t.forEach((o) => {
1422
- const s = e.find((i) => Math.abs(i.top - o.top) < 2);
1423
- s ? (s.top = Math.min(s.top, o.top), s.bottom = Math.max(s.bottom, o.bottom)) : e.push({ top: o.top, bottom: o.bottom });
1424
- }), e.sort((o, s) => o.top - s.top), e;
1436
+ const n = e.find((r) => Math.abs(r.top - o.top) < 2);
1437
+ n ? (n.top = Math.min(n.top, o.top), n.bottom = Math.max(n.bottom, o.bottom)) : e.push({ top: o.top, bottom: o.bottom });
1438
+ }), e.sort((o, n) => o.top - n.top), e;
1425
1439
  }
1426
1440
  /**
1427
1441
  * Applies box-shadow to a span that may span multiple lines
@@ -1433,11 +1447,11 @@ const gt = class gt {
1433
1447
  const o = t.getClientRects();
1434
1448
  if (o.length === 0)
1435
1449
  return;
1436
- const s = t.parentElement;
1437
- if (!s)
1450
+ const n = t.parentElement;
1451
+ if (!n)
1438
1452
  return;
1439
- const i = window.getComputedStyle(s), r = parseFloat(i.lineHeight), a = parseFloat(window.getComputedStyle(t).fontSize), c = Number.isNaN(r) ? a * 1.2 : r, l = o[0], h = o[o.length - 1], u = this.findLineIndex(l.top, e), p = this.findLineIndex(h.top, e), v = o.length > 1 && u !== p, b = u === 0, F = p === e.length - 1, y = Math.max(0, (c - l.height) / 2), H = v ? this.calculateLineTopExtension(y, b, e, u) : y, B = v ? this.calculateLineBottomExtension(y, F, e, p) : y, O = this.buildBoxShadow(H, B);
1440
- t.style.boxShadow = O;
1453
+ const r = window.getComputedStyle(n), i = parseFloat(r.lineHeight), a = parseFloat(window.getComputedStyle(t).fontSize), l = Number.isNaN(i) ? a * 1.2 : i, c = o[0], d = o[o.length - 1], u = this.findLineIndex(c.top, e), h = this.findLineIndex(d.top, e), g = o.length > 1 && u !== h, f = u === 0, b = h === e.length - 1, w = Math.max(0, (l - c.height) / 2), C = g ? this.calculateLineTopExtension(w, f, e, u) : w, k = g ? this.calculateLineBottomExtension(w, b, e, h) : w, x = this.buildBoxShadow(C, k);
1454
+ t.style.boxShadow = x;
1441
1455
  }
1442
1456
  /**
1443
1457
  * Finds the line index for a given top position
@@ -1445,7 +1459,7 @@ const gt = class gt {
1445
1459
  * @param lineGroups - grouped line rectangles
1446
1460
  */
1447
1461
  static findLineIndex(t, e) {
1448
- const o = e.findIndex((s) => Math.abs(s.top - t) < 5);
1462
+ const o = e.findIndex((n) => Math.abs(n.top - t) < 5);
1449
1463
  return o >= 0 ? o : 0;
1450
1464
  }
1451
1465
  /**
@@ -1456,23 +1470,23 @@ const gt = class gt {
1456
1470
  * @param _lineGroups - grouped line rectangles
1457
1471
  * @param _lineIndex - the line index
1458
1472
  */
1459
- static calculateLineTopExtension(t, e, o, s) {
1473
+ static calculateLineTopExtension(t, e, o, n) {
1460
1474
  return t;
1461
1475
  }
1462
1476
  /**
1463
1477
  * Calculates bottom extension for a line, accounting for gap to next line
1464
1478
  * The bottom extension fills the gap up to where the next line's top extension begins
1465
- * This prevents overlap: line N's bottom shadow meets line N+1's top shadow exactly
1479
+ * This prevents overlap: line N's bottom shadow-sm meets line N+1's top shadow exactly
1466
1480
  * @param baseExtension - the base extension value
1467
1481
  * @param isLastLine - whether this is the last line
1468
1482
  * @param lineGroups - grouped line rectangles
1469
1483
  * @param lineIndex - the line index
1470
1484
  */
1471
- static calculateLineBottomExtension(t, e, o, s) {
1485
+ static calculateLineBottomExtension(t, e, o, n) {
1472
1486
  if (e)
1473
1487
  return t;
1474
- const i = o[s], a = o[s + 1].top - i.bottom, l = Math.max(0, a - t);
1475
- return t + l;
1488
+ const r = o[n], a = o[n + 1].top - r.bottom, c = Math.max(0, a - t);
1489
+ return t + c;
1476
1490
  }
1477
1491
  /**
1478
1492
  * Builds box-shadow CSS value from top and bottom extensions
@@ -1486,9 +1500,9 @@ const gt = class gt {
1486
1500
  return o.push(`inset 0 0 0 9999px ${this.BG_COLOR}`), e > 0 && o.push(`0 ${e}px 0 ${this.BG_COLOR}`), t > 0 && o.push(`0 -${t}px 0 ${this.BG_COLOR}`), o.join(", ");
1487
1501
  }
1488
1502
  };
1489
- gt.BG_COLOR = "rgba(0, 0, 0, 0.08)";
1490
- let R = gt;
1491
- class ct {
1503
+ Nt.BG_COLOR = "rgba(0, 0, 0, 0.08)";
1504
+ let U = Nt;
1505
+ class Ct {
1492
1506
  /**
1493
1507
  * Collects text nodes that intersect with the passed range
1494
1508
  * @param range - selection range
@@ -1497,15 +1511,15 @@ class ct {
1497
1511
  const e = [], { commonAncestorContainer: o } = t;
1498
1512
  if (o.nodeType === Node.TEXT_NODE)
1499
1513
  return e.push(o), e;
1500
- const s = document.createTreeWalker(
1514
+ const n = document.createTreeWalker(
1501
1515
  o,
1502
1516
  NodeFilter.SHOW_TEXT,
1503
1517
  {
1504
- acceptNode: (i) => t.intersectsNode(i) && i.textContent && i.textContent.length > 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT
1518
+ acceptNode: (r) => t.intersectsNode(r) && r.textContent && r.textContent.length > 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT
1505
1519
  }
1506
1520
  );
1507
- for (; s.nextNode(); )
1508
- e.push(s.currentNode);
1521
+ for (; n.nextNode(); )
1522
+ e.push(n.currentNode);
1509
1523
  return e;
1510
1524
  }
1511
1525
  /**
@@ -1514,14 +1528,14 @@ class ct {
1514
1528
  * @param expectedLines - expected number of lines
1515
1529
  */
1516
1530
  static findLineBreakPositions(t, e) {
1517
- const o = t.textContent || "", s = document.createRange();
1518
- return Array.from({ length: o.length }, (a, c) => c).reduce(
1519
- (a, c) => {
1531
+ const o = t.textContent || "", n = document.createRange();
1532
+ return Array.from({ length: o.length }, (a, l) => l).reduce(
1533
+ (a, l) => {
1520
1534
  if (a.positions.length >= e - 1)
1521
1535
  return a;
1522
- s.setStart(t, c), s.setEnd(t, c + 1);
1523
- const l = s.getBoundingClientRect();
1524
- return a.lastTop !== -1 && Math.abs(l.top - a.lastTop) > 5 && a.positions.push(c), { positions: a.positions, lastTop: l.top };
1536
+ n.setStart(t, l), n.setEnd(t, l + 1);
1537
+ const c = n.getBoundingClientRect();
1538
+ return a.lastTop !== -1 && Math.abs(c.top - a.lastTop) > 5 && a.positions.push(l), { positions: a.positions, lastTop: c.top };
1525
1539
  },
1526
1540
  { positions: [], lastTop: -1 }
1527
1541
  ).positions;
@@ -1533,10 +1547,10 @@ class ct {
1533
1547
  */
1534
1548
  static splitTextAtPositions(t, e) {
1535
1549
  const o = [0, ...e, t.length];
1536
- return o.slice(0, -1).map((s, i) => t.substring(s, o[i + 1])).filter((s) => s.length > 0);
1550
+ return o.slice(0, -1).map((n, r) => t.substring(n, o[r + 1])).filter((n) => n.length > 0);
1537
1551
  }
1538
1552
  }
1539
- class _ {
1553
+ class tt {
1540
1554
  /**
1541
1555
  * Wraps passed range with a highlight span styled like an unfocused selection (gray)
1542
1556
  * @param range - range to wrap
@@ -1544,7 +1558,7 @@ class _ {
1544
1558
  static wrapRangeWithHighlight(t) {
1545
1559
  if (t.collapsed)
1546
1560
  return null;
1547
- const e = f.make("span");
1561
+ const e = m.make("span");
1548
1562
  e.setAttribute("data-blok-testid", "fake-background"), e.setAttribute("data-blok-fake-background", "true"), e.setAttribute("data-blok-mutation-free", "true"), e.style.color = "inherit", e.style.boxDecorationBreak = "clone", e.style["-webkit-box-decoration-break"] = "clone", e.style.whiteSpace = "pre-wrap";
1549
1563
  const o = t.extractContents();
1550
1564
  return o.childNodes.length === 0 ? null : (e.appendChild(o), t.insertNode(e), e);
@@ -1557,8 +1571,8 @@ class _ {
1557
1571
  static postProcessHighlightWrappers(t) {
1558
1572
  const e = [];
1559
1573
  return t.forEach((o) => {
1560
- const s = this.splitMultiLineWrapper(o);
1561
- e.push(...s);
1574
+ const n = this.splitMultiLineWrapper(o);
1575
+ e.push(...n);
1562
1576
  }), e;
1563
1577
  }
1564
1578
  /**
@@ -1570,23 +1584,23 @@ class _ {
1570
1584
  static splitMultiLineWrapper(t) {
1571
1585
  const e = t.getClientRects();
1572
1586
  if (e.length <= 1)
1573
- return R.applyBoxShadowToWrapper(t), [t];
1574
- const o = t.textContent || "", s = t.parentNode;
1575
- if (!s || !o)
1576
- return R.applyBoxShadowToWrapper(t), [t];
1577
- const i = [], r = t.firstChild;
1578
- if (!r || r.nodeType !== Node.TEXT_NODE)
1579
- return R.applyBoxShadowToWrapper(t), [t];
1580
- const a = ct.findLineBreakPositions(r, e.length);
1587
+ return U.applyBoxShadowToWrapper(t), [t];
1588
+ const o = t.textContent || "", n = t.parentNode;
1589
+ if (!n || !o)
1590
+ return U.applyBoxShadowToWrapper(t), [t];
1591
+ const r = [], i = t.firstChild;
1592
+ if (!i || i.nodeType !== Node.TEXT_NODE)
1593
+ return U.applyBoxShadowToWrapper(t), [t];
1594
+ const a = Ct.findLineBreakPositions(i, e.length);
1581
1595
  if (a.length === 0)
1582
- return R.applyBoxShadowToWrapper(t), [t];
1583
- const c = ct.splitTextAtPositions(o, a), l = document.createDocumentFragment();
1584
- return c.forEach((h) => {
1585
- if (h.length === 0)
1596
+ return U.applyBoxShadowToWrapper(t), [t];
1597
+ const l = Ct.splitTextAtPositions(o, a), c = document.createDocumentFragment();
1598
+ return l.forEach((d) => {
1599
+ if (d.length === 0)
1586
1600
  return;
1587
- const u = f.make("span");
1588
- u.setAttribute("data-blok-testid", "fake-background"), u.setAttribute("data-blok-fake-background", "true"), u.setAttribute("data-blok-mutation-free", "true"), u.style.color = "inherit", u.style.boxDecorationBreak = "clone", u.style["-webkit-box-decoration-break"] = "clone", u.style.whiteSpace = "pre-wrap", u.textContent = h, l.appendChild(u), i.push(u);
1589
- }), s.replaceChild(l, t), i;
1601
+ const u = m.make("span");
1602
+ u.setAttribute("data-blok-testid", "fake-background"), u.setAttribute("data-blok-fake-background", "true"), u.setAttribute("data-blok-mutation-free", "true"), u.style.color = "inherit", u.style.boxDecorationBreak = "clone", u.style["-webkit-box-decoration-break"] = "clone", u.style.whiteSpace = "pre-wrap", u.textContent = d, c.appendChild(u), r.push(u);
1603
+ }), n.replaceChild(c, t), r;
1590
1604
  }
1591
1605
  /**
1592
1606
  * Removes fake background wrapper
@@ -1601,7 +1615,7 @@ class _ {
1601
1615
  }
1602
1616
  }
1603
1617
  }
1604
- class ie {
1618
+ class Le {
1605
1619
  constructor(t) {
1606
1620
  this.selectionUtils = t;
1607
1621
  }
@@ -1618,26 +1632,26 @@ class ie {
1618
1632
  const e = t.getRangeAt(0);
1619
1633
  if (e.collapsed)
1620
1634
  return;
1621
- const o = ct.collectTextNodes(e);
1635
+ const o = Ct.collectTextNodes(e);
1622
1636
  if (o.length === 0)
1623
1637
  return;
1624
- const s = e.startContainer, i = e.startOffset, r = e.endContainer, a = e.endOffset, c = [];
1625
- if (o.forEach((p) => {
1626
- var mt, bt;
1627
- const v = document.createRange(), b = p === s, F = p === r, y = b ? i : 0, H = (bt = (mt = p.textContent) == null ? void 0 : mt.length) != null ? bt : 0, B = F ? a : H;
1628
- if (y === B)
1638
+ const n = e.startContainer, r = e.startOffset, i = e.endContainer, a = e.endOffset, l = [];
1639
+ if (o.forEach((h) => {
1640
+ var I, $;
1641
+ const g = document.createRange(), f = h === n, b = h === i, w = f ? r : 0, C = ($ = (I = h.textContent) == null ? void 0 : I.length) != null ? $ : 0, k = b ? a : C;
1642
+ if (w === k)
1629
1643
  return;
1630
- v.setStart(p, y), v.setEnd(p, B);
1631
- const O = _.wrapRangeWithHighlight(v);
1632
- O && c.push(O);
1633
- }), c.length === 0)
1644
+ g.setStart(h, w), g.setEnd(h, k);
1645
+ const x = tt.wrapRangeWithHighlight(g);
1646
+ x && l.push(x);
1647
+ }), l.length === 0)
1634
1648
  return;
1635
- const l = _.postProcessHighlightWrappers(c);
1636
- R.applyLineHeightExtensions(l);
1637
- const h = document.createRange();
1638
- h.setStartBefore(l[0]), h.setEndAfter(l[l.length - 1]), this.selectionUtils.savedSelectionRange = h.cloneRange();
1649
+ const c = tt.postProcessHighlightWrappers(l);
1650
+ U.applyLineHeightExtensions(c);
1651
+ const d = document.createRange();
1652
+ d.setStartBefore(c[0]), d.setEndAfter(c[c.length - 1]), this.selectionUtils.savedSelectionRange = d.cloneRange();
1639
1653
  const u = window.getSelection();
1640
- u && (u.removeAllRanges(), u.addRange(h)), this.selectionUtils.isFakeBackgroundEnabled = !0;
1654
+ u && (u.removeAllRanges(), u.addRange(d)), this.selectionUtils.isFakeBackgroundEnabled = !0;
1641
1655
  }
1642
1656
  /**
1643
1657
  * Removes fake background
@@ -1653,7 +1667,7 @@ class ie {
1653
1667
  */
1654
1668
  removeOrphanedFakeBackgroundElements() {
1655
1669
  document.querySelectorAll('[data-blok-fake-background="true"]').forEach((e) => {
1656
- _.unwrapFakeBackground(e);
1670
+ tt.unwrapFakeBackground(e);
1657
1671
  });
1658
1672
  }
1659
1673
  /**
@@ -1667,47 +1681,47 @@ class ie {
1667
1681
  * Removes highlight spans and reconstructs the saved selection range
1668
1682
  */
1669
1683
  removeHighlightSpans() {
1670
- var r;
1684
+ var i;
1671
1685
  const t = document.querySelectorAll('[data-blok-fake-background="true"]');
1672
1686
  if (t.length === 0)
1673
1687
  return;
1674
- const e = t[0], o = t[t.length - 1], s = e.firstChild, i = o.lastChild;
1688
+ const e = t[0], o = t[t.length - 1], n = e.firstChild, r = o.lastChild;
1675
1689
  if (t.forEach((a) => {
1676
- _.unwrapFakeBackground(a);
1677
- }), s && i) {
1690
+ tt.unwrapFakeBackground(a);
1691
+ }), n && r) {
1678
1692
  const a = document.createRange();
1679
- a.setStart(s, 0), a.setEnd(i, ((r = i.textContent) == null ? void 0 : r.length) || 0), this.selectionUtils.savedSelectionRange = a;
1693
+ a.setStart(n, 0), a.setEnd(r, ((i = r.textContent) == null ? void 0 : i.length) || 0), this.selectionUtils.savedSelectionRange = a;
1680
1694
  }
1681
1695
  }
1682
1696
  }
1683
- class nt {
1697
+ class gt {
1684
1698
  /**
1685
1699
  * Adds fake cursor to the current range
1686
1700
  */
1687
1701
  static addFakeCursor() {
1688
- const t = m.getRange();
1702
+ const t = y.getRange();
1689
1703
  if (t === null)
1690
1704
  return;
1691
- const e = f.make("span");
1692
- e.setAttribute(d.fakeCursor, ""), e.setAttribute("data-blok-mutation-free", "true"), t.collapse(), t.insertNode(e);
1705
+ const e = m.make("span");
1706
+ e.setAttribute(p.fakeCursor, ""), e.setAttribute("data-blok-mutation-free", "true"), t.collapse(), t.insertNode(e);
1693
1707
  }
1694
1708
  /**
1695
1709
  * Check if passed element contains a fake cursor
1696
1710
  * @param el - where to check
1697
1711
  */
1698
1712
  static isFakeCursorInsideContainer(t) {
1699
- return f.find(t, z(d.fakeCursor)) !== null;
1713
+ return m.find(t, st(p.fakeCursor)) !== null;
1700
1714
  }
1701
1715
  /**
1702
1716
  * Removes fake cursor from a container
1703
1717
  * @param container - container to look for
1704
1718
  */
1705
1719
  static removeFakeCursor(t = document.body) {
1706
- const e = f.find(t, z(d.fakeCursor));
1720
+ const e = m.find(t, st(p.fakeCursor));
1707
1721
  e && e.remove();
1708
1722
  }
1709
1723
  }
1710
- class Tt {
1724
+ class $t {
1711
1725
  /**
1712
1726
  * Looks ahead to find passed tag from current selection
1713
1727
  * @param tagName - tag to find
@@ -1715,30 +1729,30 @@ class Tt {
1715
1729
  * @param searchDepth - count of tags that can be included. For better performance.
1716
1730
  */
1717
1731
  static findParentTag(t, e, o = 10) {
1718
- const s = window.getSelection();
1719
- if (!s || !s.anchorNode || !s.focusNode)
1732
+ const n = window.getSelection();
1733
+ if (!n || !n.anchorNode || !n.focusNode)
1720
1734
  return null;
1721
- const i = [
1722
- s.anchorNode,
1723
- s.focusNode
1724
- ], r = (a) => {
1725
- const c = (l, h) => {
1726
- if (h <= 0 || !l)
1735
+ const r = [
1736
+ n.anchorNode,
1737
+ n.focusNode
1738
+ ], i = (a) => {
1739
+ const l = (c, d) => {
1740
+ if (d <= 0 || !c)
1727
1741
  return null;
1728
- const u = l.nodeType === Node.ELEMENT_NODE && l.tagName === t, p = !e || l.classList && l.classList.contains(e);
1729
- if (u && p)
1730
- return l;
1731
- if (!l.parentNode)
1742
+ const u = c.nodeType === Node.ELEMENT_NODE && c.tagName === t, h = !e || c.classList && c.classList.contains(e);
1743
+ if (u && h)
1744
+ return c;
1745
+ if (!c.parentNode)
1732
1746
  return null;
1733
- const v = l.parentNode, b = !e || v.classList && v.classList.contains(e);
1734
- return v.tagName === t && b ? v : c(v, h - 1);
1747
+ const g = c.parentNode, f = !e || g.classList && g.classList.contains(e);
1748
+ return g.tagName === t && f ? g : l(g, d - 1);
1735
1749
  };
1736
- return c(a, o);
1750
+ return l(a, o);
1737
1751
  };
1738
- for (const a of i) {
1739
- const c = r(a);
1740
- if (c)
1741
- return c;
1752
+ for (const a of r) {
1753
+ const l = i(a);
1754
+ if (l)
1755
+ return l;
1742
1756
  }
1743
1757
  return null;
1744
1758
  }
@@ -1755,9 +1769,9 @@ class Tt {
1755
1769
  o.selectNodeContents(t), e.addRange(o);
1756
1770
  }
1757
1771
  }
1758
- class Ot {
1772
+ class oe {
1759
1773
  constructor() {
1760
- this.instance = null, this.selection = null, this.savedSelectionRange = null, this.isFakeBackgroundEnabled = !1, this.fakeBackgroundManager = new ie(this);
1774
+ this.instance = null, this.selection = null, this.savedSelectionRange = null, this.isFakeBackgroundEnabled = !1, this.fakeBackgroundManager = new Le(this);
1761
1775
  }
1762
1776
  // ========================
1763
1777
  // Static getters - delegate to core module
@@ -1768,14 +1782,14 @@ class Ot {
1768
1782
  * @returns {Node|null}
1769
1783
  */
1770
1784
  static get anchorNode() {
1771
- return m.getAnchorNode();
1785
+ return y.getAnchorNode();
1772
1786
  }
1773
1787
  /**
1774
1788
  * Returns selected anchor element
1775
1789
  * @returns {Element|null}
1776
1790
  */
1777
1791
  static get anchorElement() {
1778
- return m.getAnchorElement();
1792
+ return y.getAnchorElement();
1779
1793
  }
1780
1794
  /**
1781
1795
  * Returns selection offset according to the anchor node
@@ -1783,69 +1797,69 @@ class Ot {
1783
1797
  * @returns {number|null}
1784
1798
  */
1785
1799
  static get anchorOffset() {
1786
- return m.getAnchorOffset();
1800
+ return y.getAnchorOffset();
1787
1801
  }
1788
1802
  /**
1789
1803
  * Is current selection range collapsed
1790
1804
  * @returns {boolean|null}
1791
1805
  */
1792
1806
  static get isCollapsed() {
1793
- return m.getIsCollapsed();
1807
+ return y.getIsCollapsed();
1794
1808
  }
1795
1809
  /**
1796
1810
  * Check current selection if it is at Blok's zone
1797
1811
  * @returns {boolean}
1798
1812
  */
1799
1813
  static get isAtBlok() {
1800
- return m.getIsAtBlok();
1814
+ return y.getIsAtBlok();
1801
1815
  }
1802
1816
  /**
1803
1817
  * Check if passed selection is at Blok's zone
1804
1818
  * @param selection - Selection object to check
1805
1819
  */
1806
1820
  static isSelectionAtBlok(t) {
1807
- return m.isSelectionAtBlok(t);
1821
+ return y.isSelectionAtBlok(t);
1808
1822
  }
1809
1823
  /**
1810
1824
  * Check if passed range at Blok zone
1811
1825
  * @param range - range to check
1812
1826
  */
1813
1827
  static isRangeAtBlok(t) {
1814
- return m.isRangeAtBlok(t);
1828
+ return y.isRangeAtBlok(t);
1815
1829
  }
1816
1830
  /**
1817
1831
  * Methods return boolean that true if selection exists on the page
1818
1832
  */
1819
1833
  static get isSelectionExists() {
1820
- return m.getIsSelectionExists();
1834
+ return y.getIsSelectionExists();
1821
1835
  }
1822
1836
  /**
1823
1837
  * Return first range
1824
1838
  * @returns {Range|null}
1825
1839
  */
1826
1840
  static get range() {
1827
- return m.getRange();
1841
+ return y.getRange();
1828
1842
  }
1829
1843
  /**
1830
1844
  * Returns range from passed Selection object
1831
1845
  * @param selection - Selection object to get Range from
1832
1846
  */
1833
1847
  static getRangeFromSelection(t) {
1834
- return m.getRangeFromSelection(t);
1848
+ return y.getRangeFromSelection(t);
1835
1849
  }
1836
1850
  /**
1837
1851
  * Calculates position and size of selected text
1838
1852
  * @returns {DOMRect}
1839
1853
  */
1840
1854
  static get rect() {
1841
- return m.getRect();
1855
+ return y.getRect();
1842
1856
  }
1843
1857
  /**
1844
1858
  * Returns selected text as String
1845
1859
  * @returns {string}
1846
1860
  */
1847
1861
  static get text() {
1848
- return m.getText();
1862
+ return y.getText();
1849
1863
  }
1850
1864
  /**
1851
1865
  * Returns window Selection
@@ -1853,7 +1867,7 @@ class Ot {
1853
1867
  * @returns {Selection}
1854
1868
  */
1855
1869
  static get() {
1856
- return m.get();
1870
+ return y.get();
1857
1871
  }
1858
1872
  // ========================
1859
1873
  // Static methods - delegate to appropriate modules
@@ -1864,34 +1878,34 @@ class Ot {
1864
1878
  * @param offset - offset of cursor
1865
1879
  */
1866
1880
  static setCursor(t, e = 0) {
1867
- return st.setCursor(t, e);
1881
+ return ft.setCursor(t, e);
1868
1882
  }
1869
1883
  /**
1870
1884
  * Check if current range exists and belongs to container
1871
1885
  * @param container - where range should be
1872
1886
  */
1873
1887
  static isRangeInsideContainer(t) {
1874
- return st.isRangeInsideContainer(t);
1888
+ return ft.isRangeInsideContainer(t);
1875
1889
  }
1876
1890
  /**
1877
1891
  * Adds fake cursor to the current range
1878
1892
  */
1879
1893
  static addFakeCursor() {
1880
- nt.addFakeCursor();
1894
+ gt.addFakeCursor();
1881
1895
  }
1882
1896
  /**
1883
1897
  * Check if passed element contains a fake cursor
1884
1898
  * @param el - where to check
1885
1899
  */
1886
1900
  static isFakeCursorInsideContainer(t) {
1887
- return nt.isFakeCursorInsideContainer(t);
1901
+ return gt.isFakeCursorInsideContainer(t);
1888
1902
  }
1889
1903
  /**
1890
1904
  * Removes fake cursor from a container
1891
1905
  * @param container - container to look for
1892
1906
  */
1893
1907
  static removeFakeCursor(t = document.body) {
1894
- nt.removeFakeCursor(t);
1908
+ gt.removeFakeCursor(t);
1895
1909
  }
1896
1910
  // ========================
1897
1911
  // Instance methods - delegate to FakeBackgroundManager or use instance state
@@ -1930,7 +1944,7 @@ class Ot {
1930
1944
  * Save Selection's range
1931
1945
  */
1932
1946
  save() {
1933
- this.savedSelectionRange = m.getRange();
1947
+ this.savedSelectionRange = y.getRange();
1934
1948
  }
1935
1949
  /**
1936
1950
  * Restore saved Selection's range
@@ -1951,7 +1965,7 @@ class Ot {
1951
1965
  * Collapse current selection
1952
1966
  */
1953
1967
  collapseToEnd() {
1954
- st.collapseToEnd();
1968
+ ft.collapseToEnd();
1955
1969
  }
1956
1970
  /**
1957
1971
  * Looks ahead to find passed tag from current selection
@@ -1961,25 +1975,29 @@ class Ot {
1961
1975
  * @returns {HTMLElement|null}
1962
1976
  */
1963
1977
  findParentTag(t, e, o = 10) {
1964
- return Tt.findParentTag(t, e, o);
1978
+ return $t.findParentTag(t, e, o);
1965
1979
  }
1966
1980
  /**
1967
1981
  * Expands selection range to the passed parent node
1968
1982
  * @param element - element which contents should be selected
1969
1983
  */
1970
1984
  expandToTag(t) {
1971
- Tt.expandToTag(t);
1985
+ $t.expandToTag(t);
1972
1986
  }
1973
1987
  }
1974
- const re = [
1988
+ const Ne = [
1975
1989
  // Max-width: max-w-* classes conflict with each other
1976
1990
  { pattern: /^max-w-(.+)$/, getGroup: () => "max-w" },
1977
1991
  // Width: w-* classes conflict with each other
1978
1992
  { pattern: /^w-(.+)$/, getGroup: () => "w" },
1979
1993
  // Min-width: min-w-* classes conflict with each other
1980
1994
  { pattern: /^min-w-(.+)$/, getGroup: () => "min-w" },
1995
+ // Max-height: max-h-* classes conflict with each other
1996
+ { pattern: /^max-h-(.+)$/, getGroup: () => "max-h" },
1981
1997
  // Height: h-* classes conflict with each other
1982
1998
  { pattern: /^h-(.+)$/, getGroup: () => "h" },
1999
+ // Min-height: min-h-* classes conflict with each other
2000
+ { pattern: /^min-h-(.+)$/, getGroup: () => "min-h" },
1983
2001
  // Display: block, inline-block, flex, hidden, etc.
1984
2002
  { pattern: /^(block|inline-block|inline|flex|inline-flex|grid|inline-grid|hidden|contents|flow-root|list-item)$/, getGroup: () => "display" },
1985
2003
  // Flex direction: flex-row, flex-col
@@ -2003,7 +2021,7 @@ const re = [
2003
2021
  // Inset (all sides): inset-*
2004
2022
  { pattern: /^inset-(.+)$/, getGroup: () => "inset" },
2005
2023
  // Top/Right/Bottom/Left positioning
2006
- { pattern: /^(top|right|bottom|left)-(.+)$/, getGroup: (n) => n[1] },
2024
+ { pattern: /^(top|right|bottom|left)-(.+)$/, getGroup: (s) => s[1] },
2007
2025
  // Margin: m-*, mx-*, my-*, mt-*, mr-*, mb-*, ml-*
2008
2026
  { pattern: /^!?m-(.+)$/, getGroup: () => "m" },
2009
2027
  { pattern: /^!?mx-(.+)$/, getGroup: () => "mx" },
@@ -2023,7 +2041,7 @@ const re = [
2023
2041
  // Gap: gap-*, gap-x-*, gap-y-*
2024
2042
  { pattern: /^gap-(.+)$/, getGroup: () => "gap" },
2025
2043
  // Border radius: rounded-*
2026
- { pattern: /^rounded(-.*)?$/, getGroup: () => "rounded" },
2044
+ { pattern: /^rounded(-.*)?$/, getGroup: () => "rounded-sm" },
2027
2045
  // Visibility: visible, invisible
2028
2046
  { pattern: /^(visible|invisible)$/, getGroup: () => "visibility" },
2029
2047
  // Overflow: overflow-*
@@ -2047,33 +2065,37 @@ const re = [
2047
2065
  // Line height: leading-*
2048
2066
  { pattern: /^leading-(.+)$/, getGroup: () => "leading" },
2049
2067
  // Outline: outline-*
2050
- { pattern: /^outline(-.*)?$/, getGroup: () => "outline" },
2051
- // Border: border-*
2052
- { pattern: /^border(-.*)?$/, getGroup: () => "border" },
2068
+ { pattern: /^outline(-.*)?$/, getGroup: () => "outline-solid" },
2069
+ // Border width/style: border, border-0, border-none
2070
+ { pattern: /^border(?:-(?:none|0))?$/, getGroup: () => "border-w" },
2071
+ // Border side width: border-{t,r,b,l}(-{suffix})?
2072
+ { pattern: /^border-([trlb])(?:-|$)/, getGroup: (s) => `border-${s[1]}` },
2073
+ // Border color: everything else with border- prefix
2074
+ { pattern: /^border-.+$/, getGroup: () => "border-color" },
2053
2075
  // Shadow: shadow-*
2054
- { pattern: /^shadow(-.*)?$/, getGroup: () => "shadow" }
2055
- ], it = /* @__PURE__ */ new Map(), ae = (n) => {
2056
- const t = it.get(n);
2076
+ { pattern: /^shadow(-.*)?$/, getGroup: () => "shadow-sm" }
2077
+ ], mt = /* @__PURE__ */ new Map(), Oe = (s) => {
2078
+ const t = mt.get(s);
2057
2079
  if (t !== void 0)
2058
2080
  return t;
2059
- for (const { pattern: e, getGroup: o } of re) {
2060
- const s = n.match(e);
2061
- if (s) {
2062
- const i = o(s);
2063
- return it.set(n, i), i;
2081
+ for (const { pattern: e, getGroup: o } of Ne) {
2082
+ const n = s.match(e);
2083
+ if (n) {
2084
+ const r = o(n);
2085
+ return mt.set(s, r), r;
2064
2086
  }
2065
2087
  }
2066
- return it.set(n, null), null;
2067
- }, le = (n, t, e) => {
2068
- const o = ae(n);
2088
+ return mt.set(s, null), null;
2089
+ }, Re = (s, t, e) => {
2090
+ const o = Oe(s);
2069
2091
  if (o) {
2070
- t.set(o, n);
2092
+ t.set(o, s);
2071
2093
  return;
2072
2094
  }
2073
- e.includes(n) || e.push(n);
2074
- }, ce = (n) => {
2095
+ e.includes(s) || e.push(s);
2096
+ }, Me = (s) => {
2075
2097
  const t = [];
2076
- for (const e of n)
2098
+ for (const e of s)
2077
2099
  if (e) {
2078
2100
  if (Array.isArray(e)) {
2079
2101
  t.push(...e.filter(Boolean));
@@ -2082,14 +2104,237 @@ const re = [
2082
2104
  t.push(e);
2083
2105
  }
2084
2106
  return t;
2085
- }, C = (...n) => {
2086
- const t = /* @__PURE__ */ new Map(), e = [], o = ce(n);
2087
- for (const s of o)
2088
- s.split(/\s+/).filter(Boolean).forEach((r) => le(r, t, e));
2107
+ }, A = (...s) => {
2108
+ const t = /* @__PURE__ */ new Map(), e = [], o = Me(s);
2109
+ for (const n of o)
2110
+ n.split(/\s+/).filter(Boolean).forEach((i) => Re(i, t, e));
2089
2111
  return [...e, ...t.values()].join(" ");
2090
- }, It = (...n) => n.filter(Boolean).join(" ");
2091
- var S = /* @__PURE__ */ ((n) => (n.Default = "default", n.Separator = "separator", n.Html = "html", n))(S || {});
2092
- const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe = "visibility", ge = "visible", ve = "hidden", x = class x {
2112
+ }, Dt = (...s) => s.filter(Boolean).join(" ");
2113
+ var _ = /* @__PURE__ */ ((s) => (s.Default = "default", s.Separator = "separator", s.Html = "html", s))(_ || {}), nt = { exports: {} }, Be = nt.exports, jt;
2114
+ function He() {
2115
+ return jt || (jt = 1, (function(s, t) {
2116
+ (function(e, o) {
2117
+ s.exports = o();
2118
+ })(Be, function() {
2119
+ function e(u) {
2120
+ var h = u.tags, g = Object.keys(h), f = g.map(function(b) {
2121
+ return typeof h[b];
2122
+ }).every(function(b) {
2123
+ return b === "object" || b === "boolean" || b === "function";
2124
+ });
2125
+ if (!f)
2126
+ throw new Error("The configuration was invalid");
2127
+ this.config = u;
2128
+ }
2129
+ var o = ["P", "LI", "TD", "TH", "DIV", "H1", "H2", "H3", "H4", "H5", "H6", "PRE"];
2130
+ function n(u) {
2131
+ return o.indexOf(u.nodeName) !== -1;
2132
+ }
2133
+ var r = ["A", "B", "STRONG", "I", "EM", "SUB", "SUP", "U", "STRIKE"];
2134
+ function i(u) {
2135
+ return r.indexOf(u.nodeName) !== -1;
2136
+ }
2137
+ e.prototype.clean = function(u) {
2138
+ const h = document.implementation.createHTMLDocument(), g = h.createElement("div");
2139
+ return g.innerHTML = u, this._sanitize(h, g), g.innerHTML;
2140
+ }, e.prototype._sanitize = function(u, h) {
2141
+ var g = a(u, h), f = g.firstChild();
2142
+ if (f)
2143
+ do {
2144
+ if (f.nodeType === Node.TEXT_NODE)
2145
+ if (f.data.trim() === "" && (f.previousElementSibling && n(f.previousElementSibling) || f.nextElementSibling && n(f.nextElementSibling))) {
2146
+ h.removeChild(f), this._sanitize(u, h);
2147
+ break;
2148
+ } else
2149
+ continue;
2150
+ if (f.nodeType === Node.COMMENT_NODE) {
2151
+ h.removeChild(f), this._sanitize(u, h);
2152
+ break;
2153
+ }
2154
+ var b = i(f), w;
2155
+ b && (w = Array.prototype.some.call(f.childNodes, n));
2156
+ var C = !!h.parentNode, k = n(h) && n(f) && C, x = f.nodeName.toLowerCase(), I = l(this.config, x, f), $ = b && w;
2157
+ if ($ || c(f, I) || !this.config.keepNestedBlockElements && k) {
2158
+ if (!(f.nodeName === "SCRIPT" || f.nodeName === "STYLE"))
2159
+ for (; f.childNodes.length > 0; )
2160
+ h.insertBefore(f.childNodes[0], f);
2161
+ h.removeChild(f), this._sanitize(u, h);
2162
+ break;
2163
+ }
2164
+ for (var M = 0; M < f.attributes.length; M += 1) {
2165
+ var K = f.attributes[M];
2166
+ d(K, I, f) && (f.removeAttribute(K.name), M = M - 1);
2167
+ }
2168
+ this._sanitize(u, f);
2169
+ } while (f = g.nextSibling());
2170
+ };
2171
+ function a(u, h) {
2172
+ return u.createTreeWalker(
2173
+ h,
2174
+ NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT,
2175
+ null,
2176
+ !1
2177
+ );
2178
+ }
2179
+ function l(u, h, g) {
2180
+ return typeof u.tags[h] == "function" ? u.tags[h](g) : u.tags[h];
2181
+ }
2182
+ function c(u, h) {
2183
+ return typeof h == "undefined" ? !0 : typeof h == "boolean" ? !h : !1;
2184
+ }
2185
+ function d(u, h, g) {
2186
+ var f = u.name.toLowerCase();
2187
+ return h === !0 ? !1 : typeof h[f] == "function" ? !h[f](u.value, g) : typeof h[f] == "undefined" || h[f] === !1 ? !0 : typeof h[f] == "string" ? h[f] !== u.value : !1;
2188
+ }
2189
+ return e;
2190
+ });
2191
+ })(nt)), nt.exports;
2192
+ }
2193
+ var Fe = He();
2194
+ const Pe = /* @__PURE__ */ pe(Fe), $e = /^\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)/i, De = /\s*(?:href|src)\s*=\s*(?:"\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^"]*"|'\s*(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^']*|(?:javascript\s*:|data\s*:\s*text\s*\/\s*html)[^ \t\r\n>]*)/gi, Xo = (s, t, e = {}) => s.map((o) => {
2195
+ const n = E(t) ? t(o.tool) : t, r = n != null ? n : {};
2196
+ return T(r) && R(r) && R(e) ? o : D(L({}, o), {
2197
+ data: It(o.data, r, e)
2198
+ });
2199
+ }), yt = (s, t = {}) => {
2200
+ const e = {
2201
+ tags: t
2202
+ };
2203
+ return new Pe(e).clean(s);
2204
+ }, It = (s, t, e) => Array.isArray(s) ? je(s, t, e) : T(s) ? _e(s, t, e) : P(s) ? Ge(s, t, e) : s, je = (s, t, e) => s.map((o) => It(o, t, e)), _e = (s, t, e) => {
2205
+ const o = {}, n = s;
2206
+ for (const r in s) {
2207
+ if (!Object.prototype.hasOwnProperty.call(s, r))
2208
+ continue;
2209
+ const i = n[r], a = T(t) ? t : void 0, l = a == null ? void 0 : a[r], c = l !== void 0 && We(l) ? l : t;
2210
+ o[r] = It(i, c, e);
2211
+ }
2212
+ return o;
2213
+ }, Ge = (s, t, e) => {
2214
+ const o = Xe(t, e);
2215
+ if (o) {
2216
+ const n = yt(s, o);
2217
+ return vt(Gt(n, o));
2218
+ }
2219
+ if (!R(e)) {
2220
+ const n = yt(s, e);
2221
+ return vt(Gt(n, e));
2222
+ }
2223
+ return vt(s);
2224
+ }, We = (s) => T(s) || Xt(s) || E(s), Ve = (s) => s ? $e.test(s) : !1, vt = (s) => {
2225
+ if (!s || s.indexOf("<") === -1)
2226
+ return s;
2227
+ if (typeof document != "undefined") {
2228
+ const t = document.createElement("template");
2229
+ return t.innerHTML = s, t.content.querySelectorAll("[href],[src]").forEach((o) => {
2230
+ ["href", "src"].forEach((n) => {
2231
+ const r = o.getAttribute(n);
2232
+ Ve(r) && o.removeAttribute(n);
2233
+ });
2234
+ }), t.innerHTML;
2235
+ }
2236
+ return s.replace(De, "");
2237
+ }, At = (s) => {
2238
+ if (R(s))
2239
+ return {};
2240
+ const t = {};
2241
+ for (const e in s)
2242
+ Object.prototype.hasOwnProperty.call(s, e) && (t[e] = F(s[e]));
2243
+ return t;
2244
+ }, _t = (s) => function(e) {
2245
+ const o = s.call(this, e);
2246
+ return o == null ? {} : o;
2247
+ }, Ue = /* @__PURE__ */ new Set(["class", "id", "title", "role", "dir", "lang"]), ze = (s) => {
2248
+ const t = s.toLowerCase();
2249
+ return t.startsWith("data-") || t.startsWith("aria-") || Ue.has(t);
2250
+ }, Ke = (s) => {
2251
+ const t = {};
2252
+ return Array.from(s.attributes).forEach((e) => {
2253
+ ze(e.name) && (t[e.name] = !0);
2254
+ }), t;
2255
+ }, F = (s) => s === !0 ? _t(Ke) : s === !1 ? !1 : E(s) ? _t(s) : P(s) ? s : T(s) ? it({}, s) : s, qe = (s, t) => {
2256
+ if (R(s))
2257
+ return At(t);
2258
+ const e = {};
2259
+ for (const o in s) {
2260
+ if (!Object.prototype.hasOwnProperty.call(s, o))
2261
+ continue;
2262
+ const n = s[o], r = t ? t[o] : void 0;
2263
+ if (E(r)) {
2264
+ e[o] = F(r);
2265
+ continue;
2266
+ }
2267
+ if (E(n)) {
2268
+ e[o] = F(n);
2269
+ continue;
2270
+ }
2271
+ if (T(n) && T(r)) {
2272
+ e[o] = it({}, r, n);
2273
+ continue;
2274
+ }
2275
+ if (r !== void 0) {
2276
+ e[o] = F(r);
2277
+ continue;
2278
+ }
2279
+ e[o] = F(n);
2280
+ }
2281
+ if (!t)
2282
+ return e;
2283
+ for (const o in t)
2284
+ Object.prototype.hasOwnProperty.call(t, o) && (Object.prototype.hasOwnProperty.call(e, o) || (e[o] = F(t[o])));
2285
+ return e;
2286
+ }, Xe = (s, t) => T(s) && !E(s) ? qe(t, s) : s === !1 ? {} : R(t) ? null : At(t), Yo = (s, ...t) => {
2287
+ if (R(s))
2288
+ return Object.assign({}, ...t);
2289
+ const e = At(s);
2290
+ return t.forEach((o) => {
2291
+ if (o)
2292
+ for (const n in o) {
2293
+ if (!Object.prototype.hasOwnProperty.call(o, n))
2294
+ continue;
2295
+ const r = o[n];
2296
+ if (!Object.prototype.hasOwnProperty.call(e, n))
2297
+ continue;
2298
+ const i = e[n];
2299
+ if (E(r)) {
2300
+ e[n] = r;
2301
+ continue;
2302
+ }
2303
+ if (!(r === !0 && E(i))) {
2304
+ if (r === !0) {
2305
+ const a = T(i) && !E(i);
2306
+ e[n] = a ? it({}, i) : F(r);
2307
+ continue;
2308
+ }
2309
+ if (T(r) && T(i)) {
2310
+ e[n] = it({}, i, r);
2311
+ continue;
2312
+ }
2313
+ e[n] = F(r);
2314
+ }
2315
+ }
2316
+ }), e;
2317
+ }, Gt = (s, t) => {
2318
+ if (typeof document == "undefined" || !s || s.indexOf("<") === -1)
2319
+ return s;
2320
+ const e = Object.entries(t).filter(([, n]) => E(n));
2321
+ if (e.length === 0)
2322
+ return s;
2323
+ const o = document.createElement("template");
2324
+ return o.innerHTML = s, e.forEach(([n, r]) => {
2325
+ o.content.querySelectorAll(n).forEach((a) => {
2326
+ const l = r(a);
2327
+ if (!(Xt(l) || E(l) || l == null))
2328
+ for (const [c, d] of Object.entries(l)) {
2329
+ if (d === !1) {
2330
+ a.removeAttribute(c);
2331
+ continue;
2332
+ }
2333
+ d !== !0 && P(d) && a.setAttribute(c, d);
2334
+ }
2335
+ });
2336
+ }), o.innerHTML;
2337
+ }, bt = 10, Ye = "tooltip", Je = "aria-hidden", Ze = "false", Qe = "true", to = "visibility", eo = "visible", oo = "hidden", H = class H {
2093
2338
  /**
2094
2339
  * Module constructor
2095
2340
  */
@@ -2097,7 +2342,7 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2097
2342
  this.nodes = {
2098
2343
  wrapper: null,
2099
2344
  content: null
2100
- }, this.showed = !1, this.offsetTop = rt, this.offsetLeft = rt, this.offsetRight = rt, this.showingTimeout = null, this.ariaObserver = null, this.handleWindowScroll = () => {
2345
+ }, this.showed = !1, this.offsetTop = bt, this.offsetLeft = bt, this.offsetRight = bt, this.showingTimeout = null, this.ariaObserver = null, this.handleWindowScroll = () => {
2101
2346
  this.showed && this.hide();
2102
2347
  }, this.prepare(), window.addEventListener("scroll", this.handleWindowScroll, { passive: !0 });
2103
2348
  }
@@ -2107,7 +2352,7 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2107
2352
  */
2108
2353
  get CSS() {
2109
2354
  return {
2110
- tooltip: It(
2355
+ tooltip: Dt(
2111
2356
  "absolute z-overlay top-0 left-0",
2112
2357
  "bg-tooltip-bg opacity-0",
2113
2358
  "select-none pointer-events-none",
@@ -2115,7 +2360,7 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2115
2360
  "before:content-[''] before:absolute before:inset-0 before:bg-tooltip-bg before:-z-10 before:rounded-lg",
2116
2361
  "mobile:hidden"
2117
2362
  ).split(" "),
2118
- tooltipContent: It(
2363
+ tooltipContent: Dt(
2119
2364
  "px-2.5 py-1.5",
2120
2365
  "text-tooltip-font text-xs text-center",
2121
2366
  "tracking-[0.02em] leading-[1em]"
@@ -2127,7 +2372,7 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2127
2372
  * Get singleton instance
2128
2373
  */
2129
2374
  static getInstance() {
2130
- return x.instance || (x.instance = new x()), x.instance;
2375
+ return H.instance || (H.instance = new H()), H.instance;
2131
2376
  }
2132
2377
  /**
2133
2378
  * Show Tooltip near passed element with specified HTML content
@@ -2137,7 +2382,7 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2137
2382
  */
2138
2383
  show(t, e, o = {}) {
2139
2384
  this.nodes.wrapper || this.prepare(), this.showingTimeout && (clearTimeout(this.showingTimeout), this.showingTimeout = null);
2140
- const i = Object.assign({
2385
+ const r = Object.assign({
2141
2386
  placement: "bottom",
2142
2387
  marginTop: 0,
2143
2388
  marginLeft: 0,
@@ -2146,34 +2391,33 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2146
2391
  delay: 0
2147
2392
  }, o);
2148
2393
  if (this.nodes.content && (this.nodes.content.innerHTML = "", this.nodes.content.appendChild(this.createContentNode(e)), !!this.nodes.wrapper)) {
2149
- switch (i.placement) {
2394
+ switch (r.placement) {
2150
2395
  case "top":
2151
- this.placeTop(t, i);
2396
+ this.placeTop(t, r);
2152
2397
  break;
2153
2398
  case "left":
2154
- this.placeLeft(t, i);
2399
+ this.placeLeft(t, r);
2155
2400
  break;
2156
2401
  case "right":
2157
- this.placeRight(t, i);
2402
+ this.placeRight(t, r);
2158
2403
  break;
2159
- case "bottom":
2160
2404
  default:
2161
- this.placeBottom(t, i);
2405
+ this.placeBottom(t, r);
2162
2406
  break;
2163
2407
  }
2164
- if (i && i.delay) {
2408
+ if (r && r.delay) {
2165
2409
  this.showingTimeout = setTimeout(() => {
2166
2410
  if (this.showingTimeout = null, this.nodes.wrapper) {
2167
- const r = Array.isArray(this.CSS.tooltipShown) ? this.CSS.tooltipShown : [this.CSS.tooltipShown];
2168
- this.nodes.wrapper.classList.add(...r), this.updateTooltipVisibility();
2411
+ const i = Array.isArray(this.CSS.tooltipShown) ? this.CSS.tooltipShown : [this.CSS.tooltipShown];
2412
+ this.nodes.wrapper.classList.add(...i), this.updateTooltipVisibility();
2169
2413
  }
2170
2414
  this.showed = !0;
2171
- }, i.delay);
2415
+ }, r.delay);
2172
2416
  return;
2173
2417
  }
2174
2418
  if (this.nodes.wrapper) {
2175
- const r = Array.isArray(this.CSS.tooltipShown) ? this.CSS.tooltipShown : [this.CSS.tooltipShown];
2176
- this.nodes.wrapper.classList.add(...r), this.updateTooltipVisibility();
2419
+ const i = Array.isArray(this.CSS.tooltipShown) ? this.CSS.tooltipShown : [this.CSS.tooltipShown];
2420
+ this.nodes.wrapper.classList.add(...i), this.updateTooltipVisibility();
2177
2421
  }
2178
2422
  this.showed = !0;
2179
2423
  }
@@ -2207,8 +2451,8 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2207
2451
  */
2208
2452
  onHover(t, e, o = {}) {
2209
2453
  t.addEventListener("mouseenter", () => {
2210
- const s = document.querySelector('[data-blok-popover-opened="true"]');
2211
- s !== null && !s.contains(t) || this.show(t, e, o);
2454
+ const n = document.querySelector('[data-blok-popover-opened="true"]');
2455
+ n !== null && !n.contains(t) || this.show(t, e, o);
2212
2456
  }), t.addEventListener("mouseleave", () => {
2213
2457
  this.hide();
2214
2458
  });
@@ -2218,13 +2462,13 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2218
2462
  */
2219
2463
  destroy() {
2220
2464
  var t;
2221
- (t = this.ariaObserver) == null || t.disconnect(), this.ariaObserver = null, this.nodes.wrapper && this.nodes.wrapper.remove(), window.removeEventListener("scroll", this.handleWindowScroll), x.instance = null;
2465
+ (t = this.ariaObserver) == null || t.disconnect(), this.ariaObserver = null, this.nodes.wrapper && this.nodes.wrapper.remove(), window.removeEventListener("scroll", this.handleWindowScroll), H.instance = null;
2222
2466
  }
2223
2467
  /**
2224
2468
  * Module Preparation method
2225
2469
  */
2226
2470
  prepare() {
2227
- this.nodes.wrapper = this.make("div", this.CSS.tooltip), this.nodes.wrapper.setAttribute(d.interface, ot), this.nodes.wrapper.setAttribute("data-blok-testid", "tooltip"), this.nodes.content = this.make("div", this.CSS.tooltipContent), this.nodes.content.setAttribute("data-blok-testid", "tooltip-content"), this.nodes.wrapper && this.nodes.content && (this.append(this.nodes.wrapper, this.nodes.content), this.append(document.body, this.nodes.wrapper), this.ensureTooltipAttributes());
2471
+ this.nodes.wrapper = this.make("div", this.CSS.tooltip), this.nodes.wrapper.setAttribute(p.interface, pt), this.nodes.wrapper.setAttribute("data-blok-testid", "tooltip"), this.nodes.content = this.make("div", this.CSS.tooltipContent), this.nodes.content.setAttribute("data-blok-testid", "tooltip-content"), this.nodes.wrapper && this.nodes.content && (this.append(this.nodes.wrapper, this.nodes.content), this.append(document.body, this.nodes.wrapper), this.ensureTooltipAttributes());
2228
2472
  }
2229
2473
  /**
2230
2474
  * Update tooltip visibility based on shown state
@@ -2233,7 +2477,7 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2233
2477
  if (!this.nodes.wrapper)
2234
2478
  return;
2235
2479
  const t = Array.isArray(this.CSS.tooltipShown) ? this.CSS.tooltipShown[0] : this.CSS.tooltipShown, e = this.nodes.wrapper.classList.contains(t);
2236
- this.nodes.wrapper.style.setProperty(fe, e ? ge : ve), this.nodes.wrapper.setAttribute(he, e ? pe : ue), this.nodes.wrapper.setAttribute("data-blok-shown", e ? "true" : "false");
2480
+ this.nodes.wrapper.style.setProperty(to, e ? eo : oo), this.nodes.wrapper.setAttribute(Je, e ? Ze : Qe), this.nodes.wrapper.setAttribute("data-blok-shown", e ? "true" : "false");
2237
2481
  }
2238
2482
  /**
2239
2483
  * Watch tooltip visibility changes for accessibility
@@ -2251,7 +2495,7 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2251
2495
  * Ensure tooltip has proper accessibility attributes
2252
2496
  */
2253
2497
  ensureTooltipAttributes() {
2254
- this.nodes.wrapper && ((!this.nodes.wrapper.hasAttribute(d.interface) || this.nodes.wrapper.getAttribute(d.interface) !== ot) && this.nodes.wrapper.setAttribute(d.interface, ot), this.nodes.wrapper.setAttribute("role", de), this.watchTooltipVisibility());
2498
+ this.nodes.wrapper && ((!this.nodes.wrapper.hasAttribute(p.interface) || this.nodes.wrapper.getAttribute(p.interface) !== pt) && this.nodes.wrapper.setAttribute(p.interface, pt), this.nodes.wrapper.setAttribute("role", Ye), this.watchTooltipVisibility());
2255
2499
  }
2256
2500
  /**
2257
2501
  * Calculates element coords and moves tooltip bottom of the element
@@ -2259,11 +2503,11 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2259
2503
  * @param {TooltipOptions} showingOptions - placement options
2260
2504
  */
2261
2505
  placeBottom(t, e) {
2262
- var r;
2506
+ var i;
2263
2507
  if (!this.nodes.wrapper)
2264
2508
  return;
2265
- const o = t.getBoundingClientRect(), s = o.left + t.clientWidth / 2 - this.nodes.wrapper.offsetWidth / 2, i = o.bottom + this.getScrollTop() + this.offsetTop + ((r = e.marginTop) != null ? r : 0);
2266
- this.applyPlacement("bottom", s, i);
2509
+ const o = t.getBoundingClientRect(), n = o.left + t.clientWidth / 2 - this.nodes.wrapper.offsetWidth / 2, r = o.bottom + this.getScrollTop() + this.offsetTop + ((i = e.marginTop) != null ? i : 0);
2510
+ this.applyPlacement("bottom", n, r);
2267
2511
  }
2268
2512
  /**
2269
2513
  * Calculates element coords and moves tooltip top of the element
@@ -2273,8 +2517,8 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2273
2517
  placeTop(t, e) {
2274
2518
  if (!this.nodes.wrapper)
2275
2519
  return;
2276
- const o = t.getBoundingClientRect(), s = o.left + t.clientWidth / 2 - this.nodes.wrapper.offsetWidth / 2, i = o.top + this.getScrollTop() - this.nodes.wrapper.clientHeight - this.offsetTop;
2277
- this.applyPlacement("top", s, i);
2520
+ const o = t.getBoundingClientRect(), n = o.left + t.clientWidth / 2 - this.nodes.wrapper.offsetWidth / 2, r = o.top + this.getScrollTop() - this.nodes.wrapper.clientHeight - this.offsetTop;
2521
+ this.applyPlacement("top", n, r);
2278
2522
  }
2279
2523
  /**
2280
2524
  * Calculates element coords and moves tooltip left of the element
@@ -2282,11 +2526,11 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2282
2526
  * @param {TooltipOptions} showingOptions - placement options
2283
2527
  */
2284
2528
  placeLeft(t, e) {
2285
- var r;
2529
+ var i;
2286
2530
  if (!this.nodes.wrapper)
2287
2531
  return;
2288
- const o = t.getBoundingClientRect(), s = o.left - this.nodes.wrapper.offsetWidth - this.offsetLeft - ((r = e.marginLeft) != null ? r : 0), i = o.top + this.getScrollTop() + t.clientHeight / 2 - this.nodes.wrapper.offsetHeight / 2;
2289
- this.applyPlacement("left", s, i);
2532
+ const o = t.getBoundingClientRect(), n = o.left - this.nodes.wrapper.offsetWidth - this.offsetLeft - ((i = e.marginLeft) != null ? i : 0), r = o.top + this.getScrollTop() + t.clientHeight / 2 - this.nodes.wrapper.offsetHeight / 2;
2533
+ this.applyPlacement("left", n, r);
2290
2534
  }
2291
2535
  /**
2292
2536
  * Calculates element coords and moves tooltip right of the element
@@ -2294,11 +2538,11 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2294
2538
  * @param {TooltipOptions} showingOptions - placement options
2295
2539
  */
2296
2540
  placeRight(t, e) {
2297
- var r;
2541
+ var i;
2298
2542
  if (!this.nodes.wrapper)
2299
2543
  return;
2300
- const o = t.getBoundingClientRect(), s = o.right + this.offsetRight + ((r = e.marginRight) != null ? r : 0), i = o.top + this.getScrollTop() + t.clientHeight / 2 - this.nodes.wrapper.offsetHeight / 2;
2301
- this.applyPlacement("right", s, i);
2544
+ const o = t.getBoundingClientRect(), n = o.right + this.offsetRight + ((i = e.marginRight) != null ? i : 0), r = o.top + this.getScrollTop() + t.clientHeight / 2 - this.nodes.wrapper.offsetHeight / 2;
2545
+ this.applyPlacement("right", n, r);
2302
2546
  }
2303
2547
  /**
2304
2548
  * Set wrapper position
@@ -2324,11 +2568,11 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2324
2568
  * @returns {HTMLElement}
2325
2569
  */
2326
2570
  make(t, e = null, o = {}) {
2327
- const s = document.createElement(t);
2328
- Array.isArray(e) && s.classList.add(...e), typeof e == "string" && s.classList.add(e);
2329
- for (const i in o)
2330
- Object.prototype.hasOwnProperty.call(o, i) && (s[i] = o[i]);
2331
- return s;
2571
+ const n = document.createElement(t);
2572
+ Array.isArray(e) && n.classList.add(...e), typeof e == "string" && n.classList.add(e);
2573
+ for (const r in o)
2574
+ Object.prototype.hasOwnProperty.call(o, r) && (n[r] = o[r]);
2575
+ return n;
2332
2576
  }
2333
2577
  /**
2334
2578
  * Append one or several elements to the parent
@@ -2339,17 +2583,17 @@ const rt = 10, de = "tooltip", he = "aria-hidden", pe = "false", ue = "true", fe
2339
2583
  Array.isArray(e) ? e.forEach((o) => t.appendChild(o)) : t.appendChild(e);
2340
2584
  }
2341
2585
  };
2342
- x.instance = null;
2343
- let dt = x;
2344
- const et = () => dt.getInstance(), Qe = (n, t, e) => {
2345
- et().show(n, t, e != null ? e : {});
2346
- }, me = () => {
2347
- et().hide();
2348
- }, be = (n, t, e) => {
2349
- et().onHover(n, t, e != null ? e : {});
2350
- }, Je = () => {
2351
- et().destroy();
2352
- }, N = class N {
2586
+ H.instance = null;
2587
+ let Et = H;
2588
+ const ut = () => Et.getInstance(), Jo = (s, t, e) => {
2589
+ ut().show(s, t, e != null ? e : {});
2590
+ }, no = () => {
2591
+ ut().hide();
2592
+ }, so = (s, t, e) => {
2593
+ ut().onHover(s, t, e != null ? e : {});
2594
+ }, Zo = () => {
2595
+ ut().destroy();
2596
+ }, V = class V {
2353
2597
  /**
2354
2598
  * @param {HTMLElement[]} nodeList — the list of iterable HTML-items
2355
2599
  * @param {string} focusedCssClass - user-provided CSS-class that will be set in flipping process
@@ -2388,13 +2632,13 @@ const et = () => dt.getInstance(), Qe = (n, t, e) => {
2388
2632
  * Sets cursor next to the current
2389
2633
  */
2390
2634
  next() {
2391
- this.cursor = this.leafNodesAndReturnIndex(N.directions.RIGHT);
2635
+ this.cursor = this.leafNodesAndReturnIndex(V.directions.RIGHT);
2392
2636
  }
2393
2637
  /**
2394
2638
  * Sets cursor before current
2395
2639
  */
2396
2640
  previous() {
2397
- this.cursor = this.leafNodesAndReturnIndex(N.directions.LEFT);
2641
+ this.cursor = this.leafNodesAndReturnIndex(V.directions.LEFT);
2398
2642
  }
2399
2643
  /**
2400
2644
  * Sets cursor to the default position and removes CSS-class from previously focused item
@@ -2410,9 +2654,9 @@ const et = () => dt.getInstance(), Qe = (n, t, e) => {
2410
2654
  leafNodesAndReturnIndex(t) {
2411
2655
  if (this.items.length === 0)
2412
2656
  return this.cursor;
2413
- const e = t === N.directions.RIGHT ? -1 : 0, o = this.cursor === -1 ? e : this.cursor;
2657
+ const e = t === V.directions.RIGHT ? -1 : 0, o = this.cursor === -1 ? e : this.cursor;
2414
2658
  o !== -1 && (this.items[o].classList.remove(this.focusedCssClass), this.items[o].removeAttribute("data-blok-focused"));
2415
- const s = t === N.directions.RIGHT ? (
2659
+ const n = t === V.directions.RIGHT ? (
2416
2660
  /**
2417
2661
  * If we go right then choose next (+1) Tool
2418
2662
  * @type {number}
@@ -2426,48 +2670,48 @@ const et = () => dt.getInstance(), Qe = (n, t, e) => {
2426
2670
  */
2427
2671
  (this.items.length + o - 1) % this.items.length
2428
2672
  );
2429
- return f.canSetCaret(this.items[s]) && _t(() => Ot.setCursor(this.items[s]), 50)(), this.items[s].classList.add(this.focusedCssClass), this.items[s].setAttribute("data-blok-focused", "true"), s;
2673
+ return m.canSetCaret(this.items[n]) && me(() => oe.setCursor(this.items[n]), 50)(), this.items[n].classList.add(this.focusedCssClass), this.items[n].setAttribute("data-blok-focused", "true"), n;
2430
2674
  }
2431
2675
  };
2432
- N.directions = {
2676
+ V.directions = {
2433
2677
  RIGHT: "right",
2434
2678
  LEFT: "left"
2435
2679
  };
2436
- let L = N;
2437
- class Y {
2680
+ let W = V;
2681
+ class at {
2438
2682
  /**
2439
2683
  * @param options - different constructing settings
2440
2684
  */
2441
2685
  constructor(t) {
2442
2686
  var e, o;
2443
- this.iterator = null, this.activated = !1, this.skipNextTabFocus = !1, this.flipCallbacks = [], this.onKeyDown = (s) => {
2444
- var l, h;
2445
- const i = s.target;
2446
- if (this.shouldSkipTarget(i, s))
2687
+ this.iterator = null, this.activated = !1, this.skipNextTabFocus = !1, this.flipCallbacks = [], this.onKeyDown = (n) => {
2688
+ var c, d;
2689
+ const r = n.target;
2690
+ if (this.shouldSkipTarget(r, n))
2447
2691
  return;
2448
- const r = this.getKeyCode(s), a = r === g.LEFT || r === g.RIGHT || r === g.UP || r === g.DOWN;
2449
- if (!(s.shiftKey && a || !this.isEventReadyForHandling(s)) && !(r === g.ENTER && !((l = this.iterator) != null && l.currentItem)))
2450
- switch (s.stopPropagation(), s.stopImmediatePropagation(), r !== null && Y.usedKeys.includes(r) && s.preventDefault(), r) {
2451
- case g.TAB:
2452
- this.handleTabPress(s);
2692
+ const i = this.getKeyCode(n), a = i === v.LEFT || i === v.RIGHT || i === v.UP || i === v.DOWN;
2693
+ if (!(n.shiftKey && a || !this.isEventReadyForHandling(n)) && !(i === v.ENTER && !((c = this.iterator) != null && c.currentItem)))
2694
+ switch (n.stopPropagation(), n.stopImmediatePropagation(), i !== null && at.usedKeys.includes(i) && n.preventDefault(), i) {
2695
+ case v.TAB:
2696
+ this.handleTabPress(n);
2453
2697
  break;
2454
- case g.LEFT:
2698
+ case v.LEFT:
2455
2699
  this.onArrowLeftCallback && this.onArrowLeftCallback();
2456
2700
  break;
2457
- case g.UP:
2701
+ case v.UP:
2458
2702
  this.flipLeft();
2459
2703
  break;
2460
- case g.RIGHT:
2461
- (h = this.iterator) != null && h.currentItem && this.currentItemHasChildren() && this.handleEnterPress(s);
2704
+ case v.RIGHT:
2705
+ (d = this.iterator) != null && d.currentItem && this.currentItemHasChildren() && this.handleEnterPress(n);
2462
2706
  break;
2463
- case g.DOWN:
2707
+ case v.DOWN:
2464
2708
  this.flipRight();
2465
2709
  break;
2466
- case g.ENTER:
2467
- this.handleEnterPress(s);
2710
+ case v.ENTER:
2711
+ this.handleEnterPress(n);
2468
2712
  break;
2469
2713
  }
2470
- }, this.iterator = new L(t.items || [], (e = t.focusedItemClass) != null ? e : ""), this.activateCallback = t.activateCallback, this.allowedKeys = t.allowedKeys || Y.usedKeys, this.handleContentEditableTargets = (o = t.handleContentEditableTargets) != null ? o : !1, this.onArrowLeftCallback = t.onArrowLeft;
2714
+ }, this.iterator = new W(t.items || [], (e = t.focusedItemClass) != null ? e : ""), this.activateCallback = t.activateCallback, this.allowedKeys = t.allowedKeys || at.usedKeys, this.handleContentEditableTargets = (o = t.handleContentEditableTargets) != null ? o : !1, this.onArrowLeftCallback = t.onArrowLeft;
2471
2715
  }
2472
2716
  /**
2473
2717
  * True if flipper is currently activated
@@ -2483,12 +2727,12 @@ class Y {
2483
2727
  */
2484
2728
  static get usedKeys() {
2485
2729
  return [
2486
- g.TAB,
2487
- g.LEFT,
2488
- g.RIGHT,
2489
- g.ENTER,
2490
- g.UP,
2491
- g.DOWN
2730
+ v.TAB,
2731
+ v.LEFT,
2732
+ v.RIGHT,
2733
+ v.ENTER,
2734
+ v.UP,
2735
+ v.DOWN
2492
2736
  ];
2493
2737
  }
2494
2738
  /**
@@ -2497,8 +2741,8 @@ class Y {
2497
2741
  * @param cursorPosition - index of the item that should be focused once flipper is activated
2498
2742
  */
2499
2743
  activate(t, e) {
2500
- var o, s;
2501
- this.activated = !0, t && ((o = this.iterator) == null || o.setItems(t)), e !== void 0 && ((s = this.iterator) == null || s.setCursor(e)), document.addEventListener("keydown", this.onKeyDown, !0), window.addEventListener("keydown", this.onKeyDown, !0);
2744
+ var o, n;
2745
+ this.activated = !0, t && ((o = this.iterator) == null || o.setItems(t)), e !== void 0 && ((n = this.iterator) == null || n.setCursor(e)), document.addEventListener("keydown", this.onKeyDown, !0), window.addEventListener("keydown", this.onKeyDown, !0);
2502
2746
  }
2503
2747
  /**
2504
2748
  * Disable tab/arrows handling by flipper
@@ -2519,7 +2763,7 @@ class Y {
2519
2763
  * @param options.skipNextTab - if true, skip the next Tab press (default: true for position 0 when no current item)
2520
2764
  */
2521
2765
  focusItem(t, e) {
2522
- var i;
2766
+ var r;
2523
2767
  const o = this.iterator;
2524
2768
  if (!o || !o.hasItems())
2525
2769
  return;
@@ -2527,7 +2771,7 @@ class Y {
2527
2771
  o.dropCursor();
2528
2772
  return;
2529
2773
  }
2530
- ((i = e == null ? void 0 : e.skipNextTab) != null ? i : !o.currentItem && t === 0) && (this.skipNextTabFocus = !0), o.setCursor(t);
2774
+ ((r = e == null ? void 0 : e.skipNextTab) != null ? r : !o.currentItem && t === 0) && (this.skipNextTabFocus = !0), o.setCursor(t);
2531
2775
  }
2532
2776
  /**
2533
2777
  * Focuses previous flipper iterator item
@@ -2589,12 +2833,12 @@ class Y {
2589
2833
  getKeyCode(t) {
2590
2834
  var o;
2591
2835
  return (o = {
2592
- Tab: g.TAB,
2593
- Enter: g.ENTER,
2594
- ArrowLeft: g.LEFT,
2595
- ArrowRight: g.RIGHT,
2596
- ArrowUp: g.UP,
2597
- ArrowDown: g.DOWN
2836
+ Tab: v.TAB,
2837
+ Enter: v.ENTER,
2838
+ ArrowLeft: v.LEFT,
2839
+ ArrowRight: v.RIGHT,
2840
+ ArrowUp: v.UP,
2841
+ ArrowDown: v.DOWN
2598
2842
  }[t.key]) != null ? o : null;
2599
2843
  }
2600
2844
  /**
@@ -2625,16 +2869,16 @@ class Y {
2625
2869
  * @param {KeyboardEvent} event - tab keydown event
2626
2870
  */
2627
2871
  handleTabPress(t) {
2628
- const o = t.shiftKey ? L.directions.LEFT : L.directions.RIGHT;
2872
+ const o = t.shiftKey ? W.directions.LEFT : W.directions.RIGHT;
2629
2873
  if (this.skipNextTabFocus) {
2630
2874
  this.skipNextTabFocus = !1;
2631
2875
  return;
2632
2876
  }
2633
2877
  switch (o) {
2634
- case L.directions.RIGHT:
2878
+ case W.directions.RIGHT:
2635
2879
  this.flipRight();
2636
2880
  break;
2637
- case L.directions.LEFT:
2881
+ case W.directions.LEFT:
2638
2882
  this.flipLeft();
2639
2883
  break;
2640
2884
  }
@@ -2652,7 +2896,7 @@ class Y {
2652
2896
  */
2653
2897
  handleEnterPress(t) {
2654
2898
  var e, o;
2655
- this.activated && ((e = this.iterator) != null && e.currentItem && (t.stopPropagation(), t.preventDefault(), this.iterator.currentItem.click()), J(this.activateCallback) && ((o = this.iterator) != null && o.currentItem) && this.activateCallback(this.iterator.currentItem));
2899
+ this.activated && ((e = this.iterator) != null && e.currentItem && (t.stopPropagation(), t.preventDefault(), this.iterator.currentItem.click()), E(this.activateCallback) && ((o = this.iterator) != null && o.currentItem) && this.activateCallback(this.iterator.currentItem));
2656
2900
  }
2657
2901
  /**
2658
2902
  * Scrolls the given element into view using the best available method
@@ -2681,15 +2925,236 @@ class Y {
2681
2925
  shouldSkipTarget(t, e) {
2682
2926
  if (!t)
2683
2927
  return !1;
2684
- const o = t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement, s = e.key === "Tab" || e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "Enter" || e.key === "ArrowRight" || e.key === "ArrowLeft", i = t.getAttribute("data-blok-flipper-navigation-target") === "true" && s, r = t.isContentEditable, a = t.closest('[data-blok-link-tool-input-opened="true"]') !== null, c = r && !this.handleContentEditableTargets;
2685
- return o && !i || c || a;
2928
+ const o = t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement, n = e.key === "Tab" || e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "Enter" || e.key === "ArrowRight" || e.key === "ArrowLeft", r = t.getAttribute("data-blok-flipper-navigation-target") === "true" && n, i = t.isContentEditable, a = t.closest('[data-blok-link-tool-input-opened="true"]') !== null, l = i && !this.handleContentEditableTargets;
2929
+ return o && !r || l || a;
2686
2930
  }
2687
2931
  }
2688
- const to = `
2932
+ const ro = [
2933
+ { name: "gray", text: "#787774", bg: "#f1f1ef" },
2934
+ { name: "brown", text: "#9f6b53", bg: "#f4eeee" },
2935
+ { name: "orange", text: "#d9730d", bg: "#fbecdd" },
2936
+ { name: "yellow", text: "#cb9b00", bg: "#fbf3db" },
2937
+ { name: "green", text: "#448361", bg: "#edf3ec" },
2938
+ { name: "teal", text: "#2b9a8f", bg: "#e4f5f3" },
2939
+ { name: "blue", text: "#337ea9", bg: "#e7f3f8" },
2940
+ { name: "purple", text: "#9065b0", bg: "#f6f3f9" },
2941
+ { name: "pink", text: "#c14c8a", bg: "#f9f0f5" },
2942
+ { name: "red", text: "#d44c47", bg: "#fdebec" }
2943
+ ];
2944
+ function io(s, t, e) {
2945
+ const o = t / 100, n = e / 100;
2946
+ if (o === 0) {
2947
+ const d = Math.round(n * 255);
2948
+ return [d, d, d];
2949
+ }
2950
+ const r = (d) => d < 0 ? d + 1 : d > 1 ? d - 1 : d, i = (d, u, h) => {
2951
+ const g = r(h);
2952
+ return g < 1 / 6 ? d + (u - d) * 6 * g : g < 1 / 2 ? u : g < 2 / 3 ? d + (u - d) * (2 / 3 - g) * 6 : d;
2953
+ }, a = n < 0.5 ? n * (1 + o) : n + o - n * o, l = 2 * n - a, c = s / 360;
2954
+ return [
2955
+ Math.round(i(l, a, c + 1 / 3) * 255),
2956
+ Math.round(i(l, a, c) * 255),
2957
+ Math.round(i(l, a, c - 1 / 3) * 255)
2958
+ ];
2959
+ }
2960
+ function Wt(s) {
2961
+ const t = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(s);
2962
+ if (t)
2963
+ return [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)];
2964
+ const e = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})[0-9a-f]{2}$/i.exec(s);
2965
+ if (e)
2966
+ return [parseInt(e[1], 16), parseInt(e[2], 16), parseInt(e[3], 16)];
2967
+ const o = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(s);
2968
+ if (o)
2969
+ return [
2970
+ parseInt(o[1] + o[1], 16),
2971
+ parseInt(o[2] + o[2], 16),
2972
+ parseInt(o[3] + o[3], 16)
2973
+ ];
2974
+ const n = /^#([0-9a-f])([0-9a-f])([0-9a-f])[0-9a-f]$/i.exec(s);
2975
+ if (n)
2976
+ return [
2977
+ parseInt(n[1] + n[1], 16),
2978
+ parseInt(n[2] + n[2], 16),
2979
+ parseInt(n[3] + n[3], 16)
2980
+ ];
2981
+ const r = /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(s);
2982
+ if (r)
2983
+ return [Number(r[1]), Number(r[2]), Number(r[3])];
2984
+ const i = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(s);
2985
+ return i ? io(Number(i[1]), Number(i[2]), Number(i[3])) : null;
2986
+ }
2987
+ const Vt = 0.1;
2988
+ function Ut(s) {
2989
+ const t = s[0] / 255, e = s[1] / 255, o = s[2] / 255, n = Math.max(t, e, o), r = Math.min(t, e, o), i = (n + r) / 2;
2990
+ if (n === r)
2991
+ return [0, 0, i];
2992
+ const a = n - r, l = i > 0.5 ? a / (2 - n - r) : a / (n + r);
2993
+ return [((d) => d === t ? ((e - o) / a + (e < o ? 6 : 0)) / 6 : d === e ? ((o - t) / a + 2) / 6 : ((t - e) / a + 4) / 6)(n) * 360, l, i];
2994
+ }
2995
+ function ao(s, t) {
2996
+ const r = s[1] < Vt, i = t[1] < Vt;
2997
+ if (r && i) {
2998
+ const u = Math.abs(s[2] - t[2]);
2999
+ return u * u;
3000
+ }
3001
+ if (r !== i)
3002
+ return 1e3;
3003
+ const a = Math.abs(s[0] - t[0]), l = Math.min(a, 360 - a) / 180, c = Math.abs(s[1] - t[1]), d = Math.abs(s[2] - t[2]);
3004
+ return 8 * l * l + 1 * c * c + 1 * d * d;
3005
+ }
3006
+ function z(s, t) {
3007
+ const e = Wt(s);
3008
+ if (e === null)
3009
+ return s;
3010
+ const o = Ut(e);
3011
+ return ro.reduce(
3012
+ (r, i) => {
3013
+ const a = Wt(i[t]);
3014
+ if (a === null)
3015
+ return r;
3016
+ const l = ao(o, Ut(a));
3017
+ return l < r.distance ? { color: i[t], distance: l } : r;
3018
+ },
3019
+ { color: s, distance: 1 / 0 }
3020
+ ).color;
3021
+ }
3022
+ const lt = "data-blok-table-cells";
3023
+ function zt(s, t, e) {
3024
+ return s ? `background-color: ${e}` : t ? "background-color: transparent" : "";
3025
+ }
3026
+ function Qo(s) {
3027
+ if (s.length === 0)
3028
+ return { rows: 0, cols: 0, cells: [] };
3029
+ const t = Math.min(...s.map((l) => l.row)), e = Math.min(...s.map((l) => l.col)), o = Math.max(...s.map((l) => l.row)), n = Math.max(...s.map((l) => l.col)), r = o - t + 1, i = n - e + 1, a = Array.from(
3030
+ { length: r },
3031
+ () => Array.from({ length: i }, () => ({ blocks: [] }))
3032
+ );
3033
+ for (const l of s) {
3034
+ const c = l.row - t, d = l.col - e;
3035
+ a[c][d] = { blocks: l.blocks }, l.color !== void 0 && (a[c][d].color = l.color), l.textColor !== void 0 && (a[c][d].textColor = l.textColor);
3036
+ }
3037
+ return { rows: r, cols: i, cells: a };
3038
+ }
3039
+ function ne(s) {
3040
+ const { data: t } = s;
3041
+ return typeof t.text == "string" ? t.text : Array.isArray(t.items) ? t.items.filter((e) => typeof e == "string").join(" ") : "";
3042
+ }
3043
+ function tn(s) {
3044
+ const t = JSON.stringify(s).replace(/'/g, "&#39;"), e = s.cells.map((o) => `<tr>${o.map((r) => {
3045
+ const i = r.blocks.map(ne).join(" "), a = [
3046
+ r.color ? `background-color: ${r.color}` : "",
3047
+ r.textColor ? `color: ${r.textColor}` : ""
3048
+ ].filter(Boolean).join("; ");
3049
+ return `<td${a ? ` style="${a}"` : ""}>${i}</td>`;
3050
+ }).join("")}</tr>`).join("");
3051
+ return `<table ${lt}='${t}'>${e}</table>`;
3052
+ }
3053
+ function en(s) {
3054
+ return s.cells.map(
3055
+ (t) => t.map((e) => e.blocks.map(ne).join(" ")).join(" ")
3056
+ ).join(`
3057
+ `);
3058
+ }
3059
+ const lo = /* @__PURE__ */ new Set(["color", "background-color"]), co = {
3060
+ b: !0,
3061
+ strong: !0,
3062
+ i: !0,
3063
+ em: !0,
3064
+ br: !0,
3065
+ a: { href: !0 },
3066
+ mark: (s) => {
3067
+ const e = s.style, o = Array.from({ length: e.length }, (n, r) => e.item(r));
3068
+ for (const n of o)
3069
+ lo.has(n) || e.removeProperty(n);
3070
+ return e.length > 0 ? { style: !0 } : {};
3071
+ }
3072
+ };
3073
+ function Tt(s) {
3074
+ const t = s.replace(/\s/g, "");
3075
+ return t === "rgb(0,0,0)" || t === "#000000";
3076
+ }
3077
+ function ho(s) {
3078
+ var o, n, r, i, a, l;
3079
+ const t = s.cloneNode(!0);
3080
+ for (const c of Array.from(t.querySelectorAll("span"))) {
3081
+ const d = (o = c.getAttribute("style")) != null ? o : "", u = /font-weight\s*:\s*(700|bold)/i.test(d), h = /font-style\s*:\s*italic/i.test(d), g = new RegExp("(?<![a-z-])color\\s*:\\s*([^;]+)", "i").exec(d), f = /background-color\s*:\s*([^;]+)/i.exec(d), b = (n = g == null ? void 0 : g[1]) == null ? void 0 : n.trim(), w = (r = f == null ? void 0 : f[1]) == null ? void 0 : r.trim(), C = b !== void 0 && !Tt(b), k = w !== void 0 && w !== "transparent";
3082
+ if (!u && !h && !C && !k)
3083
+ continue;
3084
+ const x = C ? z(b, "text") : "", I = k ? z(w, "bg") : "", $ = [
3085
+ C ? `color: ${x}` : "",
3086
+ zt(k, C, I)
3087
+ ].filter(Boolean).join("; "), M = c.innerHTML, K = $ ? `<mark style="${$};">${M}</mark>` : M, Rt = h ? `<i>${K}</i>` : K, ae = u ? `<b>${Rt}</b>` : Rt;
3088
+ c.replaceWith(document.createRange().createContextualFragment(ae));
3089
+ }
3090
+ for (const c of Array.from(t.querySelectorAll("a[style]"))) {
3091
+ const d = (i = c.getAttribute("style")) != null ? i : "", u = new RegExp("(?<![a-z-])color\\s*:\\s*([^;]+)", "i").exec(d), h = /background-color\s*:\s*([^;]+)/i.exec(d), g = (a = u == null ? void 0 : u[1]) == null ? void 0 : a.trim(), f = (l = h == null ? void 0 : h[1]) == null ? void 0 : l.trim(), b = g !== void 0 && !Tt(g) && g !== "inherit", w = f !== void 0 && f !== "transparent" && f !== "inherit";
3092
+ if (!b && !w)
3093
+ continue;
3094
+ const C = b ? z(g, "text") : "", k = w ? z(f, "bg") : "", x = [
3095
+ b ? `color: ${C}` : "",
3096
+ zt(w, b, k)
3097
+ ].filter(Boolean).join("; "), I = c;
3098
+ I.innerHTML = `<mark style="${x};">${I.innerHTML}</mark>`, I.style.removeProperty("color"), I.style.removeProperty("background-color");
3099
+ }
3100
+ for (const c of Array.from(t.querySelectorAll("p"))) {
3101
+ const d = document.createRange().createContextualFragment(c.innerHTML + "<br>");
3102
+ c.replaceWith(d);
3103
+ }
3104
+ return yt(t.innerHTML, co).replace(/(<br\s*\/?>|\s)+$/i, "").trim();
3105
+ }
3106
+ function on(s) {
3107
+ if (!s)
3108
+ return null;
3109
+ const e = new DOMParser().parseFromString(s, "text/html").querySelector("table");
3110
+ if (!e || e.hasAttribute(lt))
3111
+ return null;
3112
+ const o = e.querySelectorAll("tr");
3113
+ if (o.length === 0)
3114
+ return null;
3115
+ const n = [];
3116
+ o.forEach((i) => {
3117
+ const a = i.querySelectorAll("td, th"), l = [];
3118
+ a.forEach((c) => {
3119
+ var C;
3120
+ const u = ho(c).split(/<br\s*\/?>/i).map((k) => k.trim()).filter(Boolean), g = { blocks: u.length > 0 ? u.map((k) => ({ tool: "paragraph", data: { text: k } })) : [{ tool: "paragraph", data: { text: "" } }] }, f = (C = c.getAttribute("style")) != null ? C : "", b = /background-color\s*:\s*([^;]+)/i.exec(f);
3121
+ b != null && b[1] && (g.color = z(b[1].trim(), "bg"));
3122
+ const w = new RegExp("(?<![a-z-])color\\s*:\\s*([^;]+)", "i").exec(f);
3123
+ w != null && w[1] && !Tt(w[1].trim()) && (g.textColor = z(w[1].trim(), "text")), l.push(g);
3124
+ }), n.push(l);
3125
+ });
3126
+ const r = Math.max(0, ...n.map((i) => i.length));
3127
+ if (n.length === 0 || r === 0)
3128
+ return null;
3129
+ for (const i of n)
3130
+ for (; i.length < r; )
3131
+ i.push({ blocks: [{ tool: "paragraph", data: { text: "" } }] });
3132
+ return {
3133
+ rows: n.length,
3134
+ cols: r,
3135
+ cells: n
3136
+ };
3137
+ }
3138
+ function nn(s) {
3139
+ var o;
3140
+ const e = new RegExp(`${lt}='([^']*)'|${lt}="([^"]*)"`, "s").exec(s);
3141
+ if (!e)
3142
+ return null;
3143
+ try {
3144
+ const n = (o = e[1]) != null ? o : e[2];
3145
+ if (n === void 0)
3146
+ return null;
3147
+ const r = n.replace(/&#39;/g, "'").replace(/&quot;/g, '"');
3148
+ return JSON.parse(r);
3149
+ } catch (n) {
3150
+ return null;
3151
+ }
3152
+ }
3153
+ const sn = `
2689
3154
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2690
3155
  <path d="m5 15 10-10m0 10L5 5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2691
3156
  </svg>
2692
- `, eo = `
3157
+ `, rn = `
2693
3158
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2694
3159
  <path
2695
3160
  d="M5.5 11h4.9231c.6528 0 1.2789-.3161 1.7405-.8787.4617-.56259.721-1.32565.721-2.1213 0-.79565-.2593-1.55871-.721-2.12132C11.702 5.31607 11.0759 5 10.4231 5H5.5v6Zm0 0h5.5385c.6528 0 1.2789.3161 1.7405.8787.4617.5626.721 1.3257.721 2.1213 0 .7956-.2593 1.5587-.721 2.1213-.4616.5626-1.0877.8787-1.7405.8787H5.5v-6Z"
@@ -2699,7 +3164,7 @@ const to = `
2699
3164
  stroke-linejoin="round"
2700
3165
  />
2701
3166
  </svg>
2702
- `, oo = `
3167
+ `, an = `
2703
3168
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2704
3169
  <path
2705
3170
  d="M8.5 5h6m-10 12h6m1-12-4 12"
@@ -2709,19 +3174,25 @@ const to = `
2709
3174
  stroke-linejoin="round"
2710
3175
  />
2711
3176
  </svg>
2712
- `, so = `
3177
+ `, ln = `
2713
3178
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2714
3179
  <path d="M8.5 11.5a3.5 3.5 0 0 0 5 0l2-2a3.536 3.536 0 0 0-5-5l-1 1" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2715
3180
  <path d="M11.5 8.5a3.5 3.5 0 0 0-5 0l-2 2a3.536 3.536 0 0 0 5 5l1-1" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2716
3181
  </svg>
2717
- `, no = `
3182
+ `, cn = `
3183
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3184
+ <path d="M6.5 14L10 5l3.5 9" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
3185
+ <path d="M7.5 11.5h5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
3186
+ <rect x="4.5" y="16" width="11" height="1.5" rx="0.75" fill="currentColor"/>
3187
+ </svg>
3188
+ `, dn = `
2718
3189
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2719
3190
  <path d="M14.5 6.5l2-2-2-2" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2720
3191
  <path d="M16.5 4.5h-4a5 5 0 0 0-5 5v1" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2721
3192
  <path d="M5.5 13.5l-2 2 2 2" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2722
3193
  <path d="M3.5 15.5h4a5 5 0 0 0 5-5v-1" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2723
3194
  </svg>
2724
- `, io = `
3195
+ `, hn = `
2725
3196
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2726
3197
  <circle cx="7.5" cy="5.5" r="1" fill="currentColor"/>
2727
3198
  <circle cx="12.5" cy="5.5" r="1" fill="currentColor"/>
@@ -2730,24 +3201,24 @@ const to = `
2730
3201
  <circle cx="7.5" cy="14.5" r="1" fill="currentColor"/>
2731
3202
  <circle cx="12.5" cy="14.5" r="1" fill="currentColor"/>
2732
3203
  </svg>
2733
- `, ro = `
3204
+ `, un = `
2734
3205
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2735
3206
  <path d="M4.5 10h11M10 4.5v11" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2736
3207
  </svg>
2737
- `, ao = `
3208
+ `, pn = `
2738
3209
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2739
3210
  <path d="m12 5-5 5 5 5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2740
3211
  </svg>
2741
- `, we = `
3212
+ `, uo = `
2742
3213
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2743
3214
  <path d="m8 5 5 5-5 5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2744
3215
  </svg>
2745
- `, ke = `
3216
+ `, po = `
2746
3217
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2747
3218
  <circle cx="9" cy="9" r="4.5" stroke="currentColor" stroke-width="1.25"/>
2748
3219
  <path d="m12.5 12.5 3.5 3.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
2749
3220
  </svg>
2750
- `, lo = `
3221
+ `, fn = `
2751
3222
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2752
3223
  <path
2753
3224
  d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.1667 5 2.5-1.66667V15"
@@ -2757,7 +3228,7 @@ const to = `
2757
3228
  stroke-linejoin="round"
2758
3229
  />
2759
3230
  </svg>
2760
- `, co = `
3231
+ `, gn = `
2761
3232
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2762
3233
  <path
2763
3234
  d="M3.33334 10H10m-6.66666 5V5M10 15V5m7.5 10h-3.3333c0-3.3333 3.3333-2.5 3.3333-5 0-1.25-1.6667-2.08333-3.3333-.83333"
@@ -2767,7 +3238,7 @@ const to = `
2767
3238
  stroke-linejoin="round"
2768
3239
  />
2769
3240
  </svg>
2770
- `, ho = `
3241
+ `, mn = `
2771
3242
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2772
3243
  <path
2773
3244
  d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.5833 3.75C16 7.91667 17.5 8.75 17.5 10c0 .442-.1756.866-.4882 1.1785-.3125.3126-.7364.4882-1.1785.4882.4421 0 .866.1756 1.1785.4881.3126.3126.4882.7365.4882 1.1785 0 1.5-1.6667 2.5-3.3333 1.25"
@@ -2777,7 +3248,7 @@ const to = `
2777
3248
  stroke-linejoin="round"
2778
3249
  />
2779
3250
  </svg>
2780
- `, po = `
3251
+ `, vn = `
2781
3252
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2782
3253
  <path
2783
3254
  d="M10 15V5M14.1667 8.33333V10.8333C14.1667 11.0543 14.2545 11.2663 14.4107 11.4226C14.567 11.5789 14.779 11.6667 15 11.6667H17.5M17.5 8.33333V15M3.33334 10H10M3.33334 15V5"
@@ -2787,7 +3258,7 @@ const to = `
2787
3258
  stroke-linejoin="round"
2788
3259
  />
2789
3260
  </svg>
2790
- `, uo = `
3261
+ `, bn = `
2791
3262
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2792
3263
  <path
2793
3264
  d="M3.33334 10H10M3.33334 15V5M10 15V5M17.5 8.33333H14.1667V10.8333H15.25C16.5 10.8333 17.5 11.75 17.5 12.9167C17.5 14.0833 16.5 15 15.25 15C14.8333 15 14.5 14.9167 14.1667 14.75"
@@ -2797,7 +3268,7 @@ const to = `
2797
3268
  stroke-linejoin="round"
2798
3269
  />
2799
3270
  </svg>
2800
- `, fo = `
3271
+ `, wn = `
2801
3272
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2802
3273
  <path
2803
3274
  d="M3.33334 10H10m-6.66666 5V5M10 15V5m4.1667 8.3333c0 .9205.7462 1.6667 1.6666 1.6667.9205 0 1.6667-.7462 1.6667-1.6667 0-.9204-.7462-1.6666-1.6667-1.6666-.9204 0-1.6666.7462-1.6666 1.6666Zm0 0c0-2.0833.8333-3.3333 2.5-4.99997"
@@ -2807,7 +3278,7 @@ const to = `
2807
3278
  stroke-linejoin="round"
2808
3279
  />
2809
3280
  </svg>
2810
- `, go = `
3281
+ `, kn = `
2811
3282
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2812
3283
  <path
2813
3284
  d="M6.5 10h6.6667M6.5 15V5m6.6667 10V5"
@@ -2817,7 +3288,7 @@ const to = `
2817
3288
  stroke-linejoin="round"
2818
3289
  />
2819
3290
  </svg>
2820
- `, vo = `
3291
+ `, Cn = `
2821
3292
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2822
3293
  <path
2823
3294
  d="M14.5 7.28571V6h-9v1.28571M10 6v9m0 0H8.71429M10 15h1.2857"
@@ -2827,12 +3298,12 @@ const to = `
2827
3298
  stroke-linejoin="round"
2828
3299
  />
2829
3300
  </svg>
2830
- `, mo = `
3301
+ `, yn = `
2831
3302
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2832
3303
  <path d="M10 4 3 16h14Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2833
3304
  <path d="M10 8.5v3.5m0 2v.01" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
2834
3305
  </svg>
2835
- `, bo = `
3306
+ `, En = `
2836
3307
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2837
3308
  <path
2838
3309
  d="M8 5h9M8 10h9M8 15h9M4 5h.01M4 10h.01M4 15h.01"
@@ -2842,7 +3313,7 @@ const to = `
2842
3313
  stroke-linejoin="round"
2843
3314
  />
2844
3315
  </svg>
2845
- `, wo = `
3316
+ `, Tn = `
2846
3317
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2847
3318
  <path
2848
3319
  d="M8 5h9M8 10h9M8 15h9M3.5 4.5l1-1v3M3.5 9.5a1 1 0 1 1 2 0c0 .75-2 1.25-2 2h2M3.5 13.5h1a.75.75 0 0 1 0 1.5.75.75 0 0 1 0 1.5h-1"
@@ -2852,7 +3323,7 @@ const to = `
2852
3323
  stroke-linejoin="round"
2853
3324
  />
2854
3325
  </svg>
2855
- `, ko = `
3326
+ `, xn = `
2856
3327
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2857
3328
  <path
2858
3329
  d="M10 5h7M10 10h7M10 15h7M3 5l1 1 2-2M3 10l1 1 2-2M3 15l1 1 2-2"
@@ -2862,54 +3333,59 @@ const to = `
2862
3333
  stroke-linejoin="round"
2863
3334
  />
2864
3335
  </svg>
2865
- `, Co = `
3336
+ `, In = `
2866
3337
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2867
3338
  <rect x="3" y="4" width="14" height="12" rx="1.5" stroke="currentColor" stroke-width="1.25"/>
2868
3339
  <path d="M3 8h14M3 12h14M7.5 4v12M12.5 4v12" stroke="currentColor" stroke-width="1.25"/>
2869
3340
  </svg>
2870
- `, yo = `
3341
+ `, An = `
2871
3342
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2872
3343
  <path d="M4.5 4h11A1.5 1.5 0 0 1 17 5.5V8H3V5.5A1.5 1.5 0 0 1 4.5 4Z" fill="currentColor"/>
2873
3344
  <rect x="3" y="4" width="14" height="12" rx="1.5" stroke="currentColor" stroke-width="1.25"/>
2874
3345
  <path d="M3 8h14M3 12h14M7.5 4v12M12.5 4v12" stroke="currentColor" stroke-width="1.25"/>
2875
3346
  </svg>
2876
- `, Eo = `
3347
+ `, Sn = `
2877
3348
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2878
3349
  <path d="M4.5 4H7.5v12H4.5A1.5 1.5 0 0 1 3 14.5v-9A1.5 1.5 0 0 1 4.5 4Z" fill="currentColor"/>
2879
3350
  <rect x="3" y="4" width="14" height="12" rx="1.5" stroke="currentColor" stroke-width="1.25"/>
2880
3351
  <path d="M3 8h14M3 12h14M7.5 4v12M12.5 4v12" stroke="currentColor" stroke-width="1.25"/>
2881
3352
  </svg>
2882
- `, To = `
3353
+ `, Ln = `
2883
3354
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2884
3355
  <path d="M10 4l-3 3m3-3l3 3M10 4v7M5 16h10" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2885
3356
  </svg>
2886
- `, Io = `
3357
+ `, Nn = `
2887
3358
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2888
3359
  <path d="M10 16l-3-3m3 3l3-3M10 16V9M5 4h10" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2889
3360
  </svg>
2890
- `, xo = `
3361
+ `, On = `
2891
3362
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2892
3363
  <path d="M4 10l3-3M4 10l3 3M4 10h7M16 5v10" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2893
3364
  </svg>
2894
- `, Ao = `
3365
+ `, Rn = `
2895
3366
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2896
3367
  <path d="M16 10l-3-3m3 3l-3 3M16 10H9M4 5v10" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2897
3368
  </svg>
2898
- `, So = `
3369
+ `, Mn = `
3370
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3371
+ <rect x="7" y="7" width="9" height="9" rx="1.5" stroke="currentColor" stroke-width="1.25"/>
3372
+ <path d="M5 13h-.5A1.5 1.5 0 0 1 3 11.5v-7A1.5 1.5 0 0 1 4.5 3h7A1.5 1.5 0 0 1 13 4.5V5" stroke="currentColor" stroke-width="1.25"/>
3373
+ </svg>
3374
+ `, Bn = `
2899
3375
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2900
3376
  <path d="M4.5 6.5h11" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
2901
3377
  <path d="M8 6.5V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2902
3378
  <path d="M6.5 6.5l.5 8.5a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1l.5-8.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
2903
3379
  <path d="M8.5 9.5v3.5M11.5 9.5v3.5" stroke="currentColor" stroke-width="1.25" stroke-linecap="round"/>
2904
3380
  </svg>
2905
- `, P = {
3381
+ `, q = {
2906
3382
  root: "",
2907
3383
  alignedStart: "text-start",
2908
3384
  alignedCenter: "text-center",
2909
3385
  title: "",
2910
3386
  description: "opacity-60 mt-[3px]"
2911
3387
  };
2912
- class Ce {
3388
+ class fo {
2913
3389
  /**
2914
3390
  * Constructs the hint content instance
2915
3391
  * @param params - hint content parameters
@@ -2917,9 +3393,9 @@ class Ce {
2917
3393
  constructor(t) {
2918
3394
  const e = t.alignment === "center" ? "center" : "start";
2919
3395
  this.nodes = {
2920
- root: f.make("div", [P.root, e === "center" ? P.alignedCenter : P.alignedStart]),
2921
- title: f.make("div", P.title, { textContent: t.title })
2922
- }, this.nodes.root.setAttribute("data-alignment", e), this.nodes.root.appendChild(this.nodes.title), t.description !== void 0 && (this.nodes.description = f.make("div", P.description, { textContent: t.description }), this.nodes.root.appendChild(this.nodes.description));
3396
+ root: m.make("div", [q.root, e === "center" ? q.alignedCenter : q.alignedStart]),
3397
+ title: m.make("div", q.title, { textContent: t.title })
3398
+ }, this.nodes.root.setAttribute("data-alignment", e), this.nodes.root.appendChild(this.nodes.title), t.description !== void 0 && (this.nodes.description = m.make("div", q.description, { textContent: t.description }), this.nodes.root.appendChild(this.nodes.description));
2923
3399
  }
2924
3400
  /**
2925
3401
  * Returns the root element of the hint content
@@ -2928,7 +3404,7 @@ class Ce {
2928
3404
  return this.nodes.root;
2929
3405
  }
2930
3406
  }
2931
- class ut {
3407
+ class St {
2932
3408
  /**
2933
3409
  * Constructs the instance
2934
3410
  * @param params - instance parameters
@@ -2947,7 +3423,7 @@ class ut {
2947
3423
  * Destroys the instance
2948
3424
  */
2949
3425
  destroy() {
2950
- me();
3426
+ no();
2951
3427
  }
2952
3428
  /**
2953
3429
  * Called when children popover is opened (if exists)
@@ -2976,8 +3452,8 @@ class ut {
2976
3452
  * @param hintData - hint data
2977
3453
  */
2978
3454
  addHint(t, e) {
2979
- const o = new Ce(e);
2980
- be(t, o.getElement(), {
3455
+ const o = new fo(e);
3456
+ so(t, o.getElement(), {
2981
3457
  placement: e.position
2982
3458
  });
2983
3459
  }
@@ -3049,7 +3525,7 @@ class ut {
3049
3525
  return this.params === void 0 || !("isActive" in this.params) ? !1 : typeof this.params.isActive == "function" ? this.params.isActive() : this.params.isActive === !0;
3050
3526
  }
3051
3527
  }
3052
- const $ = {
3528
+ const X = {
3053
3529
  /**
3054
3530
  * Base item styles with hover, focus, and active support
3055
3531
  * Hover is applied via can-hover:hover: for real hover and data-blok-force-hover for tests
@@ -3058,7 +3534,7 @@ const $ = {
3058
3534
  * Note: noHover state is handled via [data-blok-popover-item-no-hover] which disables hover
3059
3535
  * Priority order: active < hover < focus (focus wins when navigating with keyboard)
3060
3536
  */
3061
- item: 'flex items-center select-none border-none bg-transparent rounded-md px-2 py-[var(--item-padding)] text-text-primary mb-px [&[data-blok-popover-item-active]]:bg-icon-active-bg [&[data-blok-popover-item-active]]:text-icon-active-text can-hover:hover:cursor-pointer can-hover:hover:bg-item-hover-bg [&[data-blok-force-hover]]:cursor-pointer [&[data-blok-force-hover]]:bg-item-hover-bg [&[data-blok-focused="true"]]:bg-item-focus-bg [&[data-blok-popover-item-no-hover]]:hover:bg-transparent [&[data-blok-popover-item-no-hover]]:cursor-default can-hover:[&[data-blok-popover-item-destructive]]:hover:text-item-destructive-text can-hover:[&[data-blok-popover-item-destructive]]:hover:bg-item-destructive-hover-bg [&[data-blok-popover-item-destructive][data-blok-force-hover]]:text-item-destructive-text [&[data-blok-popover-item-destructive][data-blok-force-hover]]:bg-item-destructive-hover-bg [&[data-blok-popover-item-destructive][data-blok-focused="true"]]:text-item-destructive-text [&[data-blok-popover-item-destructive][data-blok-focused="true"]]:bg-item-destructive-hover-bg',
3537
+ item: 'flex items-center select-none border-none bg-transparent rounded-md px-2 py-(--item-padding) text-text-primary mb-px data-blok-popover-item-active:bg-icon-active-bg data-blok-popover-item-active:text-icon-active-text can-hover:hover:cursor-pointer can-hover:hover:bg-item-hover-bg data-blok-force-hover:cursor-pointer data-blok-force-hover:bg-item-hover-bg data-[blok-focused="true"]:bg-item-focus-bg data-blok-popover-item-no-hover:hover:bg-transparent data-blok-popover-item-no-hover:cursor-default can-hover:data-blok-popover-item-destructive:hover:text-item-destructive-text can-hover:data-blok-popover-item-destructive:hover:bg-item-destructive-hover-bg [&[data-blok-popover-item-destructive][data-blok-force-hover]]:text-item-destructive-text [&[data-blok-popover-item-destructive][data-blok-force-hover]]:bg-item-destructive-hover-bg [&[data-blok-popover-item-destructive][data-blok-focused="true"]]:text-item-destructive-text [&[data-blok-popover-item-destructive][data-blok-focused="true"]]:bg-item-destructive-hover-bg',
3062
3538
  /**
3063
3539
  * Item disabled state
3064
3540
  */
@@ -3072,18 +3548,18 @@ const $ = {
3072
3548
  * Used alongside data-blok-focused attribute.
3073
3549
  */
3074
3550
  focused: "is-focused"
3075
- }, ye = {
3551
+ }, go = {
3076
3552
  /**
3077
3553
  * Item in inline context - more compact styling
3078
3554
  */
3079
- item: "rounded p-1"
3080
- }, Ee = {
3555
+ item: "rounded-sm p-1"
3556
+ }, mo = {
3081
3557
  /**
3082
3558
  * Nested item - back to desktop popover styling
3083
3559
  */
3084
3560
  item: "rounded-md p-[3px] mobile:p-1"
3085
3561
  };
3086
- class I extends ut {
3562
+ class B extends St {
3087
3563
  /**
3088
3564
  * Constructs popover item instance
3089
3565
  * @param params - popover item construction params
@@ -3143,7 +3619,7 @@ class I extends ut {
3143
3619
  * True if item is focused in keyboard navigation process
3144
3620
  */
3145
3621
  get isFocused() {
3146
- return this.nodes.root === null ? !1 : this.nodes.root.hasAttribute(d.focused);
3622
+ return this.nodes.root === null ? !1 : this.nodes.root.hasAttribute(p.focused);
3147
3623
  }
3148
3624
  /**
3149
3625
  * Returns popover item root element
@@ -3168,7 +3644,7 @@ class I extends ut {
3168
3644
  toggleActive(t) {
3169
3645
  if (this.nodes.root === null)
3170
3646
  return;
3171
- const e = this.nodes.root.hasAttribute(d.popoverItemActive), o = t !== void 0 ? t : !e;
3647
+ const e = this.nodes.root.hasAttribute(p.popoverItemActive), o = t !== void 0 ? t : !e;
3172
3648
  this.setActive(o);
3173
3649
  }
3174
3650
  /**
@@ -3196,76 +3672,76 @@ class I extends ut {
3196
3672
  * @param renderParams - popover item render params
3197
3673
  */
3198
3674
  createRootElement(t, e) {
3199
- var r, a, c, l;
3200
- const o = (r = e == null ? void 0 : e.wrapperTag) != null ? r : "div", s = document.createElement(o);
3201
- return o === "button" && s.setAttribute("type", "button"), s.className = this.getContainerClass(), s.setAttribute(d.popoverItem, ""), s.setAttribute("data-blok-testid", "popover-item"), t.name && s.setAttribute("data-blok-item-name", t.name), t.dataset && Object.entries(t.dataset).forEach(([h, u]) => {
3202
- s.setAttribute(`data-${h}`, u);
3203
- }), t.isDisabled && s.setAttribute(d.disabled, "true"), "isDestructive" in t && t.isDestructive && s.setAttribute(d.popoverItemDestructive, "true"), this.isActive && s.setAttribute(d.popoverItemActive, "true"), this.hasChildren && s.setAttribute(d.hasChildren, "true"), this.createContentElements(s, t, e), t.hint !== void 0 && ((a = e == null ? void 0 : e.hint) == null ? void 0 : a.enabled) !== !1 && t.hint !== void 0 && this.addHint(s, M(E({}, t.hint), {
3204
- position: ((c = e == null ? void 0 : e.hint) == null ? void 0 : c.position) || "right",
3205
- alignment: ((l = e == null ? void 0 : e.hint) == null ? void 0 : l.alignment) || "center"
3206
- })), s;
3675
+ var i, a, l, c;
3676
+ const o = (i = e == null ? void 0 : e.wrapperTag) != null ? i : "div", n = document.createElement(o);
3677
+ return o === "button" && n.setAttribute("type", "button"), n.className = this.getContainerClass(), n.setAttribute(p.popoverItem, ""), n.setAttribute("data-blok-testid", "popover-item"), t.name && n.setAttribute("data-blok-item-name", t.name), t.dataset && Object.entries(t.dataset).forEach(([d, u]) => {
3678
+ n.setAttribute(`data-${d}`, u);
3679
+ }), t.isDisabled && n.setAttribute(p.disabled, "true"), "isDestructive" in t && t.isDestructive && n.setAttribute(p.popoverItemDestructive, "true"), this.isActive && n.setAttribute(p.popoverItemActive, "true"), this.hasChildren && n.setAttribute(p.hasChildren, "true"), this.createContentElements(n, t, e), t.hint !== void 0 && ((a = e == null ? void 0 : e.hint) == null ? void 0 : a.enabled) !== !1 && t.hint !== void 0 && this.addHint(n, D(L({}, t.hint), {
3680
+ position: ((l = e == null ? void 0 : e.hint) == null ? void 0 : l.position) || "right",
3681
+ alignment: ((c = e == null ? void 0 : e.hint) == null ? void 0 : c.alignment) || "center"
3682
+ })), n;
3207
3683
  }
3208
3684
  /**
3209
3685
  * Creates the content elements (icon, title, secondary label, chevron)
3210
3686
  */
3211
3687
  createContentElements(t, e, o) {
3212
- var l, h, u;
3213
- const s = (l = o == null ? void 0 : o.iconWithGap) != null ? l : !0, i = (h = o == null ? void 0 : o.isInline) != null ? h : !1, r = (u = o == null ? void 0 : o.isNestedInline) != null ? u : !1, a = e.title;
3214
- if (e.icon && (this.nodes.icon = this.createIconElement(e.icon, s, i, r), t.appendChild(this.nodes.icon)), a !== void 0) {
3215
- const p = document.createElement("div");
3216
- p.className = "mr-auto truncate text-sm font-medium leading-5", p.setAttribute(d.popoverItemTitle, ""), p.setAttribute("data-blok-testid", "popover-item-title"), p.textContent = a, t.appendChild(p), this.nodes.titleEl = p;
3688
+ var c, d, u;
3689
+ const n = (c = o == null ? void 0 : o.iconWithGap) != null ? c : !0, r = (d = o == null ? void 0 : o.isInline) != null ? d : !1, i = (u = o == null ? void 0 : o.isNestedInline) != null ? u : !1, a = e.title;
3690
+ if (e.icon && (this.nodes.icon = this.createIconElement(e.icon, n, r, i), t.appendChild(this.nodes.icon)), a !== void 0) {
3691
+ const h = document.createElement("div");
3692
+ h.className = e.secondaryLabel ? "grow truncate text-sm font-medium leading-5" : "mr-auto truncate text-sm font-medium leading-5", h.setAttribute(p.popoverItemTitle, ""), h.setAttribute("data-blok-testid", "popover-item-title"), h.textContent = a, t.appendChild(h), this.nodes.titleEl = h;
3217
3693
  }
3218
3694
  if (e.secondaryLabel) {
3219
- const p = document.createElement("div");
3220
- p.className = "whitespace-nowrap pr-1.5 text-xs font-light tracking-[0.25px] text-text-secondary opacity-60", p.setAttribute(d.popoverItemSecondaryTitle, ""), p.setAttribute("data-blok-testid", "popover-item-secondary-title"), p.textContent = e.secondaryLabel, t.appendChild(p), this.nodes.secondaryLabelEl = p;
3695
+ const h = document.createElement("div");
3696
+ h.className = "min-w-14 text-right whitespace-nowrap pl-3 pr-1.5 text-xs font-light tracking-[0.25px] text-text-secondary opacity-60", h.setAttribute(p.popoverItemSecondaryTitle, ""), h.setAttribute("data-blok-testid", "popover-item-secondary-title"), h.textContent = e.secondaryLabel, t.appendChild(h), this.nodes.secondaryLabelEl = h;
3221
3697
  }
3222
3698
  if (this.hasChildren && !this.isChevronHidden) {
3223
- const p = document.createElement("div");
3224
- p.className = this.getChevronClass(i), p.setAttribute(d.popoverItemIcon, ""), p.setAttribute(d.popoverItemIconChevronRight, ""), p.setAttribute("data-blok-testid", "popover-item-chevron-right"), p.innerHTML = we, t.appendChild(p), this.nodes.chevron = p;
3699
+ const h = document.createElement("div");
3700
+ h.className = this.getChevronClass(r), h.setAttribute(p.popoverItemIcon, ""), h.setAttribute(p.popoverItemIconChevronRight, ""), h.setAttribute("data-blok-testid", "popover-item-chevron-right"), h.innerHTML = uo, t.appendChild(h), this.nodes.chevron = h;
3225
3701
  }
3226
3702
  }
3227
3703
  /**
3228
3704
  * Creates an icon element
3229
3705
  */
3230
- createIconElement(t, e, o, s) {
3231
- const i = document.createElement("div");
3232
- return i.className = this.getIconClass(e, o, s, !1), i.setAttribute(d.popoverItemIcon, ""), i.setAttribute("data-blok-testid", "popover-item-icon"), i.innerHTML = t, e && i.setAttribute(d.tool, ""), i;
3706
+ createIconElement(t, e, o, n) {
3707
+ const r = document.createElement("div");
3708
+ return r.className = this.getIconClass(e, o, n, !1), r.setAttribute(p.popoverItemIcon, ""), r.setAttribute("data-blok-testid", "popover-item-icon"), r.innerHTML = t, e && r.setAttribute(p.tool, ""), r;
3233
3709
  }
3234
3710
  /**
3235
3711
  * Gets the container class based on current state
3236
3712
  */
3237
3713
  getContainerClass() {
3238
- var o, s, i, r;
3239
- const t = (s = (o = this.renderParams) == null ? void 0 : o.isInline) != null ? s : !1, e = (r = (i = this.renderParams) == null ? void 0 : i.isNestedInline) != null ? r : !1;
3240
- return C(
3241
- $.item,
3242
- // Asymmetric padding for vertical popovers (better visual balance)
3243
- !t && !e && "pl-2 pr-8",
3244
- t && ye.item,
3245
- e && Ee.item,
3246
- this.params.isDisabled && $.itemDisabled
3714
+ var o, n, r, i;
3715
+ const t = (n = (o = this.renderParams) == null ? void 0 : o.isInline) != null ? n : !1, e = (i = (r = this.renderParams) == null ? void 0 : r.isNestedInline) != null ? i : !1;
3716
+ return A(
3717
+ X.item,
3718
+ // Asymmetric padding: pr-8 for visual balance, pr-2 when secondary label or chevron occupies right edge
3719
+ !t && !e && (this.params.secondaryLabel || this.hasChildren && !this.isChevronHidden ? "pl-2 pr-2" : "pl-2 pr-8"),
3720
+ t && go.item,
3721
+ e && mo.item,
3722
+ this.params.isDisabled && X.itemDisabled
3247
3723
  );
3248
3724
  }
3249
3725
  /**
3250
3726
  * Gets the icon class based on context
3251
3727
  */
3252
- getIconClass(t, e, o, s) {
3253
- return C(
3254
- $.icon,
3728
+ getIconClass(t, e, o, n) {
3729
+ return A(
3730
+ X.icon,
3255
3731
  e && "w-auto h-auto [&_svg]:w-icon [&_svg]:h-icon mobile:[&_svg]:w-icon-mobile mobile:[&_svg]:h-icon-mobile",
3256
3732
  o && "w-toolbox-btn h-toolbox-btn",
3257
3733
  t && "mr-3",
3258
- t && e && "shadow-none bg-transparent !mr-0",
3259
- t && o && "!mr-2",
3260
- s && "animate-wobble"
3734
+ t && e && "shadow-none bg-transparent mr-0!",
3735
+ t && o && "mr-2!",
3736
+ n && "animate-wobble"
3261
3737
  );
3262
3738
  }
3263
3739
  /**
3264
3740
  * Gets the chevron class based on context
3265
3741
  */
3266
3742
  getChevronClass(t) {
3267
- return C(
3268
- $.icon,
3743
+ return A(
3744
+ X.icon,
3269
3745
  t && "rotate-90"
3270
3746
  );
3271
3747
  }
@@ -3273,32 +3749,32 @@ class I extends ut {
3273
3749
  * Sets the active state of the item
3274
3750
  */
3275
3751
  setActive(t) {
3276
- this.nodes.root && (t ? this.nodes.root.setAttribute(d.popoverItemActive, "true") : this.nodes.root.removeAttribute(d.popoverItemActive));
3752
+ this.nodes.root && (t ? this.nodes.root.setAttribute(p.popoverItemActive, "true") : this.nodes.root.removeAttribute(p.popoverItemActive));
3277
3753
  }
3278
3754
  /**
3279
3755
  * Sets the hidden state of the item
3280
3756
  */
3281
3757
  setHidden(t) {
3282
- this.nodes.root && (t ? (this.nodes.root.setAttribute(d.hidden, "true"), this.nodes.root.classList.add("!hidden")) : (this.nodes.root.removeAttribute(d.hidden), this.nodes.root.classList.remove("!hidden")));
3758
+ this.nodes.root && (t ? (this.nodes.root.setAttribute(p.hidden, "true"), this.nodes.root.classList.add("hidden!")) : (this.nodes.root.removeAttribute(p.hidden), this.nodes.root.classList.remove("hidden!")));
3283
3759
  }
3284
3760
  /**
3285
3761
  * Sets the focused state of the item
3286
3762
  * @param isFocused - true if item should be focused
3287
3763
  */
3288
3764
  setFocused(t) {
3289
- this.nodes.root && (t ? (this.nodes.root.setAttribute(d.focused, "true"), this.nodes.root.classList.add("!bg-item-focus-bg")) : (this.nodes.root.removeAttribute(d.focused), this.nodes.root.classList.remove("!bg-item-focus-bg")));
3765
+ this.nodes.root && (t ? (this.nodes.root.setAttribute(p.focused, "true"), this.nodes.root.classList.add("bg-item-focus-bg!")) : (this.nodes.root.removeAttribute(p.focused), this.nodes.root.classList.remove("bg-item-focus-bg!")));
3290
3766
  }
3291
3767
  /**
3292
3768
  * Sets the no-hover state
3293
3769
  */
3294
3770
  setNoHover(t) {
3295
- this.nodes.root && (t ? this.nodes.root.setAttribute(d.popoverItemNoHover, "true") : this.nodes.root.removeAttribute(d.popoverItemNoHover));
3771
+ this.nodes.root && (t ? this.nodes.root.setAttribute(p.popoverItemNoHover, "true") : this.nodes.root.removeAttribute(p.popoverItemNoHover));
3296
3772
  }
3297
3773
  /**
3298
3774
  * Sets the no-focus state
3299
3775
  */
3300
3776
  setNoFocus(t) {
3301
- this.nodes.root && (t ? this.nodes.root.setAttribute(d.popoverItemNoFocus, "true") : this.nodes.root.removeAttribute(d.popoverItemNoFocus));
3777
+ this.nodes.root && (t ? this.nodes.root.setAttribute(p.popoverItemNoFocus, "true") : this.nodes.root.removeAttribute(p.popoverItemNoFocus));
3302
3778
  }
3303
3779
  /**
3304
3780
  * Activates confirmation mode for the item.
@@ -3307,7 +3783,7 @@ class I extends ut {
3307
3783
  enableConfirmationMode(t) {
3308
3784
  if (this.nodes.root === null)
3309
3785
  return;
3310
- const e = M(E(E({}, this.params), t), {
3786
+ const e = D(L(L({}, this.params), t), {
3311
3787
  confirmation: "confirmation" in t ? t.confirmation : void 0
3312
3788
  });
3313
3789
  this.setConfirmation(e), this.confirmationState = t, this.enableSpecialHoverAndFocusBehavior();
@@ -3328,13 +3804,13 @@ class I extends ut {
3328
3804
  * Clears confirmation state and restores original content
3329
3805
  */
3330
3806
  clearConfirmationState() {
3331
- this.nodes.root && (this.nodes.root.removeAttribute(d.popoverItemConfirmation), this.nodes.root.classList.remove("!bg-item-confirm-bg", "!text-white"), this.restoreOriginalIcon(), this.restoreOriginalTitle(), this.restoreOriginalSecondaryLabel());
3807
+ this.nodes.root && (this.nodes.root.removeAttribute(p.popoverItemConfirmation), this.nodes.root.classList.remove("bg-item-confirm-bg!", "text-white!"), this.restoreOriginalIcon(), this.restoreOriginalTitle(), this.restoreOriginalSecondaryLabel());
3332
3808
  }
3333
3809
  /**
3334
3810
  * Applies confirmation state with new params
3335
3811
  */
3336
3812
  applyConfirmationState(t) {
3337
- this.nodes.root && (this.nodes.root.setAttribute(d.popoverItemConfirmation, "true"), this.nodes.root.classList.add("!bg-item-confirm-bg", "!text-white"), this.updateIcon(t.icon), this.updateTitle(t), this.updateSecondaryLabel(t.secondaryLabel));
3813
+ this.nodes.root && (this.nodes.root.setAttribute(p.popoverItemConfirmation, "true"), this.nodes.root.classList.add("bg-item-confirm-bg!", "text-white!"), this.updateIcon(t.icon), this.updateTitle(t), this.updateSecondaryLabel(t.secondaryLabel));
3338
3814
  }
3339
3815
  /**
3340
3816
  * Restores the original icon
@@ -3419,15 +3895,15 @@ class I extends ut {
3419
3895
  * Triggers wobble animation on the icon
3420
3896
  */
3421
3897
  triggerWobble() {
3422
- var i, r, a, c, l, h;
3898
+ var r, i, a, l, c, d;
3423
3899
  if (!this.nodes.icon)
3424
3900
  return;
3425
- const t = (r = (i = this.renderParams) == null ? void 0 : i.isInline) != null ? r : !1, e = (c = (a = this.renderParams) == null ? void 0 : a.isNestedInline) != null ? c : !1, o = (h = (l = this.renderParams) == null ? void 0 : l.iconWithGap) != null ? h : !0;
3426
- this.nodes.icon.setAttribute(d.popoverItemWobble, "true"), this.nodes.icon.className = this.getIconClass(o, t, e, !0);
3427
- const s = () => {
3428
- this.nodes.icon && (this.nodes.icon.removeAttribute(d.popoverItemWobble), this.nodes.icon.className = this.getIconClass(o, t, e, !1));
3901
+ const t = (i = (r = this.renderParams) == null ? void 0 : r.isInline) != null ? i : !1, e = (l = (a = this.renderParams) == null ? void 0 : a.isNestedInline) != null ? l : !1, o = (d = (c = this.renderParams) == null ? void 0 : c.iconWithGap) != null ? d : !0;
3902
+ this.nodes.icon.setAttribute(p.popoverItemWobble, "true"), this.nodes.icon.className = this.getIconClass(o, t, e, !0);
3903
+ const n = () => {
3904
+ this.nodes.icon && (this.nodes.icon.removeAttribute(p.popoverItemWobble), this.nodes.icon.className = this.getIconClass(o, t, e, !1));
3429
3905
  };
3430
- this.nodes.icon.addEventListener("animationend", s, { once: !0 });
3906
+ this.nodes.icon.addEventListener("animationend", n, { once: !0 });
3431
3907
  }
3432
3908
  /**
3433
3909
  * Gets reference to the icon element
@@ -3436,11 +3912,11 @@ class I extends ut {
3436
3912
  return this.nodes.icon;
3437
3913
  }
3438
3914
  }
3439
- const A = {
3915
+ const j = {
3440
3916
  container: "py-1 px-[3px]",
3441
3917
  containerHidden: "hidden",
3442
3918
  line: "h-px w-full bg-popover-border"
3443
- }, U = {
3919
+ }, et = {
3444
3920
  // Inline context: horizontal separator
3445
3921
  container: "px-1 py-0",
3446
3922
  line: "h-full w-px",
@@ -3448,7 +3924,7 @@ const A = {
3448
3924
  nestedContainer: "py-1 px-[3px]",
3449
3925
  nestedLine: "w-full h-px"
3450
3926
  };
3451
- class Mt extends ut {
3927
+ class se extends St {
3452
3928
  /**
3453
3929
  * Constructs the instance
3454
3930
  * @param renderParams - optional render params for styling context
@@ -3471,38 +3947,38 @@ class Mt extends ut {
3471
3947
  if (!this.nodes.root)
3472
3948
  return;
3473
3949
  const e = this.getContainerClass(!1), o = this.getContainerClass(!0);
3474
- this.nodes.root.className = t ? o : e, t ? this.nodes.root.setAttribute(d.hidden, "true") : this.nodes.root.removeAttribute(d.hidden);
3950
+ this.nodes.root.className = t ? o : e, t ? this.nodes.root.setAttribute(p.hidden, "true") : this.nodes.root.removeAttribute(p.hidden);
3475
3951
  }
3476
3952
  /**
3477
3953
  * Build container class based on context
3478
3954
  */
3479
3955
  getContainerClass(t) {
3480
- const e = A.container;
3481
- return this.isNestedInline ? C(e, U.nestedContainer, t && A.containerHidden) : this.isInline ? C(e, U.container, t && A.containerHidden) : C(e, t && A.containerHidden);
3956
+ const e = j.container;
3957
+ return this.isNestedInline ? A(e, et.nestedContainer, t && j.containerHidden) : this.isInline ? A(e, et.container, t && j.containerHidden) : A(e, t && j.containerHidden);
3482
3958
  }
3483
3959
  /**
3484
3960
  * Build line class based on context
3485
3961
  */
3486
3962
  getLineClass() {
3487
- return this.isNestedInline ? C(A.line, U.nestedLine) : this.isInline ? C(A.line, U.line) : A.line;
3963
+ return this.isNestedInline ? A(j.line, et.nestedLine) : this.isInline ? A(j.line, et.line) : j.line;
3488
3964
  }
3489
3965
  /**
3490
3966
  * Creates the root container element
3491
3967
  */
3492
3968
  createRootElement() {
3493
3969
  const t = document.createElement("div");
3494
- t.className = this.getContainerClass(!1), t.setAttribute(d.popoverItemSeparator, ""), t.setAttribute("data-blok-testid", "popover-item-separator");
3970
+ t.className = this.getContainerClass(!1), t.setAttribute(p.popoverItemSeparator, ""), t.setAttribute("data-blok-testid", "popover-item-separator");
3495
3971
  const e = document.createElement("div");
3496
- return e.className = this.getLineClass(), e.setAttribute(d.popoverItemSeparatorLine, ""), t.appendChild(e), this.nodes.line = e, t;
3972
+ return e.className = this.getLineClass(), e.setAttribute(p.popoverItemSeparatorLine, ""), t.appendChild(e), this.nodes.line = e, t;
3497
3973
  }
3498
3974
  }
3499
- const at = {
3975
+ const wt = {
3500
3976
  root: "",
3501
3977
  rootHidden: "hidden"
3502
- }, xt = {
3978
+ }, Kt = {
3503
3979
  root: "flex items-center"
3504
3980
  };
3505
- class Z extends ut {
3981
+ class ct extends St {
3506
3982
  /**
3507
3983
  * Constructs the instance
3508
3984
  * @param params – instance parameters
@@ -3524,7 +4000,7 @@ class Z extends ut {
3524
4000
  * @param isHidden - true if item should be hidden
3525
4001
  */
3526
4002
  toggleHidden(t) {
3527
- this.isHidden = t, this.updateRootClasses(), this.nodes.root && (t ? this.nodes.root.setAttribute(d.hidden, "true") : this.nodes.root.removeAttribute(d.hidden));
4003
+ this.isHidden = t, this.updateRootClasses(), this.nodes.root && (t ? this.nodes.root.setAttribute(p.hidden, "true") : this.nodes.root.removeAttribute(p.hidden));
3528
4004
  }
3529
4005
  /**
3530
4006
  * Returns list of buttons and inputs inside custom content
@@ -3533,7 +4009,7 @@ class Z extends ut {
3533
4009
  if (!this.nodes.root)
3534
4010
  return [];
3535
4011
  const t = this.nodes.root.querySelectorAll(
3536
- `button, ${f.allInputsSelector}`
4012
+ `button, ${m.allInputsSelector}`
3537
4013
  );
3538
4014
  return Array.from(t);
3539
4015
  }
@@ -3541,10 +4017,10 @@ class Z extends ut {
3541
4017
  * Updates the root element's class list based on current state
3542
4018
  */
3543
4019
  updateRootClasses() {
3544
- this.nodes.root && (this.nodes.root.className = C(
3545
- at.root,
3546
- this.isInline && xt.root,
3547
- this.isHidden && at.rootHidden
4020
+ this.nodes.root && (this.nodes.root.className = A(
4021
+ wt.root,
4022
+ this.isInline && Kt.root,
4023
+ this.isHidden && wt.rootHidden
3548
4024
  ));
3549
4025
  }
3550
4026
  /**
@@ -3553,28 +4029,28 @@ class Z extends ut {
3553
4029
  * @param renderParams - render configuration
3554
4030
  */
3555
4031
  createRootElement(t, e) {
3556
- var s, i, r;
4032
+ var n, r, i;
3557
4033
  const o = document.createElement("div");
3558
- return o.className = C(
3559
- at.root,
3560
- this.isInline && xt.root
3561
- ), o.setAttribute(d.popoverItemHtml, ""), o.setAttribute("data-blok-testid", "popover-item-html"), t.name && o.setAttribute("data-blok-item-name", t.name), o.appendChild(t.element), t.hint !== void 0 && ((s = e == null ? void 0 : e.hint) == null ? void 0 : s.enabled) !== !1 && this.addHint(o, M(E({}, t.hint), {
3562
- position: ((i = e == null ? void 0 : e.hint) == null ? void 0 : i.position) || "right",
3563
- alignment: ((r = e == null ? void 0 : e.hint) == null ? void 0 : r.alignment) || "center"
4034
+ return o.className = A(
4035
+ wt.root,
4036
+ this.isInline && Kt.root
4037
+ ), o.setAttribute(p.popoverItemHtml, ""), o.setAttribute("data-blok-testid", "popover-item-html"), t.name && o.setAttribute("data-blok-item-name", t.name), o.appendChild(t.element), t.hint !== void 0 && ((n = e == null ? void 0 : e.hint) == null ? void 0 : n.enabled) !== !1 && this.addHint(o, D(L({}, t.hint), {
4038
+ position: ((r = e == null ? void 0 : e.hint) == null ? void 0 : r.position) || "right",
4039
+ alignment: ((i = e == null ? void 0 : e.hint) == null ? void 0 : i.alignment) || "center"
3564
4040
  })), o;
3565
4041
  }
3566
4042
  }
3567
- const lt = {
3568
- wrapper: "bg-[#F8F8F8] border border-[rgba(226,226,229,0.20)] rounded p-0.5 grid grid-cols-[auto_auto_1fr] grid-rows-[auto]",
4043
+ const kt = {
4044
+ wrapper: "bg-[#F8F8F8] border border-[rgba(226,226,229,0.20)] rounded-sm p-0.5 grid grid-cols-[auto_auto_1fr] grid-rows-[auto]",
3569
4045
  icon: "w-toolbox-btn h-toolbox-btn flex items-center justify-center mr-2 [&_svg]:w-icon [&_svg]:h-icon [&_svg]:text-gray-text",
3570
- input: "text-sm outline-none font-medium font-inherit border-0 bg-transparent m-0 p-0 leading-[22px] min-w-[calc(100%-theme('spacing.6')-10px)] placeholder:text-gray-text placeholder:font-medium"
3571
- }, Ft = (n, t) => {
3572
- var r, a, c, l, h;
3573
- const e = t.toLowerCase(), o = (a = (r = n.title) == null ? void 0 : r.toLowerCase()) != null ? a : "", s = (l = (c = n.englishTitle) == null ? void 0 : c.toLowerCase()) != null ? l : "", i = (h = n.searchTerms) != null ? h : [];
3574
- return o.includes(e) || s.includes(e) || i.some((u) => u.toLowerCase().includes(e));
4046
+ input: "text-sm outline-hidden font-medium font-inherit border-0 bg-transparent m-0 p-0 leading-[22px] min-w-[calc(100%-(--spacing(6))-10px)] placeholder:text-gray-text placeholder:font-medium"
4047
+ }, re = (s, t) => {
4048
+ var i, a, l, c, d;
4049
+ const e = t.toLowerCase(), o = (a = (i = s.title) == null ? void 0 : i.toLowerCase()) != null ? a : "", n = (c = (l = s.englishTitle) == null ? void 0 : l.toLowerCase()) != null ? c : "", r = (d = s.searchTerms) != null ? d : [];
4050
+ return o.includes(e) || n.includes(e) || r.some((u) => u.toLowerCase().includes(e));
3575
4051
  };
3576
- var ft = /* @__PURE__ */ ((n) => (n.Search = "search", n))(ft || {});
3577
- class Te extends Bt {
4052
+ var Lt = /* @__PURE__ */ ((s) => (s.Search = "search", s))(Lt || {});
4053
+ class vo extends ee {
3578
4054
  /**
3579
4055
  * @param options - available config
3580
4056
  * @param options.items - searchable items list
@@ -3583,11 +4059,11 @@ class Te extends Bt {
3583
4059
  constructor({ items: t, placeholder: e }) {
3584
4060
  super(), this.searchQuery = "", this.handleValueChange = () => {
3585
4061
  this.applySearch(this.input.value);
3586
- }, this.listeners = new Nt(), this.items = t, this.wrapper = f.make("div", lt.wrapper), this.wrapper.setAttribute("data-blok-testid", "popover-search-field");
3587
- const o = f.make("div", lt.icon, {
3588
- innerHTML: ke
4062
+ }, this.listeners = new Qt(), this.items = t, this.wrapper = m.make("div", kt.wrapper), this.wrapper.setAttribute("data-blok-testid", "popover-search-field");
4063
+ const o = m.make("div", kt.icon, {
4064
+ innerHTML: po
3589
4065
  });
3590
- this.input = f.make("input", lt.input, {
4066
+ this.input = m.make("input", kt.input, {
3591
4067
  type: "search",
3592
4068
  placeholder: e,
3593
4069
  /**
@@ -3596,8 +4072,8 @@ class Te extends Bt {
3596
4072
  * so Tab in the last block will focus this hidden input if this property is not set)
3597
4073
  */
3598
4074
  tabIndex: -1
3599
- }), this.input.setAttribute("data-blok-flipper-navigation-target", "true"), this.input.setAttribute("data-blok-testid", "popover-search-input"), this.wrapper.appendChild(o), this.wrapper.appendChild(this.input), this.overrideValueProperty(), ["input", "keyup", "search", "change"].forEach((i) => {
3600
- this.listeners.on(this.input, i, this.handleValueChange);
4075
+ }), this.input.setAttribute("data-blok-flipper-navigation-target", "true"), this.input.setAttribute("data-blok-testid", "popover-search-input"), this.wrapper.appendChild(o), this.wrapper.appendChild(this.input), this.overrideValueProperty(), ["input", "keyup", "search", "change"].forEach((r) => {
4076
+ this.listeners.on(this.input, r, this.handleValueChange);
3601
4077
  });
3602
4078
  }
3603
4079
  /**
@@ -3623,7 +4099,7 @@ class Te extends Bt {
3623
4099
  * @param query - search query to apply
3624
4100
  */
3625
4101
  applySearch(t) {
3626
- this.searchQuery !== t && (this.searchQuery = t, this.emit(ft.Search, {
4102
+ this.searchQuery !== t && (this.searchQuery = t, this.emit(Lt.Search, {
3627
4103
  query: t,
3628
4104
  items: this.foundItems
3629
4105
  }));
@@ -3632,20 +4108,20 @@ class Te extends Bt {
3632
4108
  * Overrides value property setter to catch programmatic changes
3633
4109
  */
3634
4110
  overrideValueProperty() {
3635
- var r, a;
4111
+ var i, a;
3636
4112
  const t = Object.getPrototypeOf(this.input), e = Object.getOwnPropertyDescriptor(t, "value");
3637
4113
  if ((e == null ? void 0 : e.set) === void 0 || e.get === void 0)
3638
4114
  return;
3639
- const o = this.applySearch.bind(this), s = e.get, i = e.set;
4115
+ const o = this.applySearch.bind(this), n = e.get, r = e.set;
3640
4116
  Object.defineProperty(this.input, "value", {
3641
- configurable: (r = e.configurable) != null ? r : !0,
4117
+ configurable: (i = e.configurable) != null ? i : !0,
3642
4118
  enumerable: (a = e.enumerable) != null ? a : !1,
3643
4119
  get() {
3644
- const c = s == null ? void 0 : s.call(this);
3645
- return typeof c == "string" ? c : "";
4120
+ const l = n == null ? void 0 : n.call(this);
4121
+ return typeof l == "string" ? l : "";
3646
4122
  },
3647
- set(c) {
3648
- i == null || i.call(this, c), o(c);
4123
+ set(l) {
4124
+ r == null || r.call(this, l), o(l);
3649
4125
  }
3650
4126
  });
3651
4127
  }
@@ -3666,10 +4142,10 @@ class Te extends Bt {
3666
4142
  * @param item - item to be checked
3667
4143
  */
3668
4144
  checkItem(t) {
3669
- return Ft(t, this.searchQuery);
4145
+ return re(t, this.searchQuery);
3670
4146
  }
3671
4147
  }
3672
- const k = class k {
4148
+ const N = class N {
3673
4149
  constructor() {
3674
4150
  this.stack = [], this.boundPointerDown = null;
3675
4151
  }
@@ -3677,7 +4153,7 @@ const k = class k {
3677
4153
  * Returns the singleton instance, creating it if necessary
3678
4154
  */
3679
4155
  static get instance() {
3680
- return k._instance === null && (k._instance = new k()), k._instance;
4156
+ return N._instance === null && (N._instance = new N()), N._instance;
3681
4157
  }
3682
4158
  /**
3683
4159
  * Resets the singleton for testing purposes.
@@ -3685,7 +4161,7 @@ const k = class k {
3685
4161
  */
3686
4162
  static resetForTests() {
3687
4163
  var t;
3688
- return (t = k._instance) == null || t.destroy(), k._instance = new k(), k._instance;
4164
+ return (t = N._instance) == null || t.destroy(), N._instance = new N(), N._instance;
3689
4165
  }
3690
4166
  /**
3691
4167
  * Registers a popover with mutual exclusion.
@@ -3695,8 +4171,8 @@ const k = class k {
3695
4171
  */
3696
4172
  register(t, e) {
3697
4173
  const o = [...this.stack];
3698
- for (const s of o)
3699
- s.popover !== t && (s.popover.hide(), this.removeFromStack(s.popover));
4174
+ for (const n of o)
4175
+ n.popover !== t && (n.popover.hide(), this.removeFromStack(n.popover));
3700
4176
  this.stack.push({ popover: t, triggerElement: e }), this.ensureDocumentListener();
3701
4177
  }
3702
4178
  /**
@@ -3739,13 +4215,13 @@ const k = class k {
3739
4215
  if (!(e instanceof Node))
3740
4216
  return;
3741
4217
  const o = [];
3742
- for (const s of [...this.stack].reverse()) {
3743
- if (s.popover.hasNode(e) || s.triggerElement.contains(e))
4218
+ for (const n of [...this.stack].reverse()) {
4219
+ if (n.popover.hasNode(e) || n.triggerElement.contains(e))
3744
4220
  break;
3745
- o.push(s);
4221
+ o.push(n);
3746
4222
  }
3747
- for (const s of o)
3748
- s.popover.hide();
4223
+ for (const n of o)
4224
+ n.popover.hide();
3749
4225
  }
3750
4226
  /**
3751
4227
  * Lazily adds the pointerdown listener to the document when there are entries in the stack
@@ -3768,27 +4244,27 @@ const k = class k {
3768
4244
  e !== -1 && this.stack.splice(e, 1);
3769
4245
  }
3770
4246
  };
3771
- k._instance = null;
3772
- let Q = k;
3773
- const K = {
4247
+ N._instance = null;
4248
+ let dt = N;
4249
+ const ot = {
3774
4250
  // Popover container - base styles
3775
- popoverContainer: "absolute flex flex-col overflow-hidden box-border opacity-0 pointer-events-none p-0 border-none z-[4] max-h-0 min-w-[var(--width)] w-[var(--width)] rounded-lg shadow-[0_3px_15px_-3px_theme(colors.popover-shadow)] left-[var(--popover-left)] top-[var(--popover-top)] bg-popover-bg",
4251
+ popoverContainer: "absolute flex flex-col overflow-hidden box-border opacity-0 pointer-events-none p-0 border-none z-4 max-h-0 min-w-(--width) w-(--width) rounded-lg shadow-[0_3px_15px_-3px_var(--color-popover-shadow)] left-(--popover-left) top-(--popover-top) bg-popover-bg",
3776
4252
  // Popover container - mobile styles (applied conditionally)
3777
4253
  // Reset left/top from base class since inset shorthand may not properly override them in twMerge
3778
4254
  popoverContainerMobile: "fixed max-w-none rounded-[10px] min-w-[calc(100%-var(--offset)*2)] left-auto top-auto inset-[auto_var(--offset)_calc(var(--offset)+env(safe-area-inset-bottom))_var(--offset)]",
3779
4255
  // Popover container - opened state
3780
- popoverContainerOpened: "opacity-100 pointer-events-auto p-1 max-h-[var(--max-height)] border border-popover-border animate-[panelShowing_100ms_ease]",
4256
+ popoverContainerOpened: "opacity-100 pointer-events-auto p-1 max-h-(--max-height) border border-popover-border animate-[panelShowing_100ms_ease]",
3781
4257
  // Popover overlay
3782
4258
  popoverOverlay: "hidden bg-dark",
3783
4259
  items: "overflow-y-auto overscroll-contain"
3784
- }, Lo = {
4260
+ }, Hn = {
3785
4261
  // Popover root element for inline
3786
4262
  popover: "relative",
3787
4263
  // Container for inline popover
3788
4264
  popoverContainer: "flex-row top-0 min-w-max w-max p-1 mobile:absolute"
3789
- }, No = (n) => `level-${n}`;
3790
- var T = /* @__PURE__ */ ((n) => (n.NestingLevel = "--nesting-level", n.PopoverHeight = "--popover-height", n.InlinePopoverWidth = "--inline-popover-width", n.PopoverTop = "--popover-top", n.PopoverLeft = "--popover-left", n.TriggerItemLeft = "--trigger-item-left", n.TriggerItemTop = "--trigger-item-top", n))(T || {}), W = /* @__PURE__ */ ((n) => (n.Closed = "closed", n.ClosedOnActivate = "closed-on-activate", n))(W || {});
3791
- class Ie extends Bt {
4265
+ }, Fn = (s) => `level-${s}`;
4266
+ var O = /* @__PURE__ */ ((s) => (s.NestingLevel = "--nesting-level", s.PopoverHeight = "--popover-height", s.InlinePopoverWidth = "--inline-popover-width", s.PopoverTop = "--popover-top", s.PopoverLeft = "--popover-left", s.TriggerItemLeft = "--trigger-item-left", s.TriggerItemTop = "--trigger-item-top", s))(O || {}), Z = /* @__PURE__ */ ((s) => (s.Closed = "closed", s.ClosedOnActivate = "closed-on-activate", s))(Z || {});
4267
+ class bo extends ee {
3792
4268
  /**
3793
4269
  * Constructs the instance
3794
4270
  * @param params - popover construction params
@@ -3796,16 +4272,16 @@ class Ie extends Bt {
3796
4272
  * The parameters that are not set by user via popover api but rather depend on technical implementation
3797
4273
  */
3798
4274
  constructor(t, e = {}) {
3799
- super(), this.params = t, this.itemsRenderParams = e, this.listeners = new Nt(), this.messages = {
4275
+ super(), this.params = t, this.itemsRenderParams = e, this.listeners = new Qt(), this.messages = {
3800
4276
  nothingFound: "Nothing found",
3801
4277
  search: "Search"
3802
- }, this.items = this.buildItems(t.items), t.messages && (this.messages = E(E({}, this.messages), t.messages)), this.nodes = this.createPopoverDOM(), this.appendItemElements(), this.nodes.popoverContainer && this.listeners.on(this.nodes.popoverContainer, "click", (o) => this.handleClick(o));
4278
+ }, this.permanentlyHiddenNames = /* @__PURE__ */ new Set(), this.items = this.buildItems(t.items), t.messages && (this.messages = L(L({}, this.messages), t.messages)), this.nodes = this.createPopoverDOM(), this.appendItemElements(), this.nodes.popoverContainer && this.listeners.on(this.nodes.popoverContainer, "click", (o) => this.handleClick(o));
3803
4279
  }
3804
4280
  /**
3805
4281
  * List of default popover items that are searchable and may have confirmation state
3806
4282
  */
3807
4283
  get itemsDefault() {
3808
- return this.items.filter((t) => t instanceof I);
4284
+ return this.items.filter((t) => t instanceof B);
3809
4285
  }
3810
4286
  /**
3811
4287
  * Returns HTML element corresponding to the popover
@@ -3823,17 +4299,20 @@ class Ie extends Bt {
3823
4299
  * Open popover
3824
4300
  */
3825
4301
  show() {
3826
- var s;
4302
+ var n;
3827
4303
  const t = this.nodes.popover;
3828
- t !== null && !t.isConnected && document.body.appendChild(t), this.nodes.popover.setAttribute(d.popoverOpened, "true"), this.nodes.popoverContainer.classList.add(...K.popoverContainerOpened.split(" ")), this.itemsDefault.forEach((i) => this.refreshItemActiveState(i)), this.search !== void 0 && this.search.focus();
4304
+ t !== null && !t.isConnected && document.body.appendChild(t), this.nodes.popover.setAttribute(p.popoverOpened, "true"), this.nodes.popoverContainer.className = A(
4305
+ this.nodes.popoverContainer.className,
4306
+ ot.popoverContainerOpened
4307
+ ), this.itemsDefault.forEach((r) => this.refreshItemActiveState(r)), this.search !== void 0 && this.search.focus();
3829
4308
  const { trigger: e } = this.params;
3830
- ((s = this.params.nestingLevel) != null ? s : 0) === 0 && e !== void 0 && Q.instance.register(this, e);
4309
+ ((n = this.params.nestingLevel) != null ? n : 0) === 0 && e !== void 0 && dt.instance.register(this, e);
3831
4310
  }
3832
4311
  /**
3833
4312
  * Closes popover
3834
4313
  */
3835
4314
  hide() {
3836
- this.nodes.popover.removeAttribute(d.popoverOpened), this.nodes.popover.removeAttribute(d.popoverOpenTop), this.nodes.popover.removeAttribute(d.popoverOpenLeft), this.nodes.popoverContainer.classList.remove(...K.popoverContainerOpened.split(" ")), this.itemsDefault.forEach((t) => t.reset()), this.search !== void 0 && this.search.clear(), Q.instance.unregister(this), this.emit(W.Closed);
4315
+ this.nodes.popover.removeAttribute(p.popoverOpened), this.nodes.popover.removeAttribute(p.popoverOpenTop), this.nodes.popover.removeAttribute(p.popoverOpenLeft), this.nodes.popoverContainer.className = ot.popoverContainer, this.itemsDefault.forEach((t) => t.reset()), this.search !== void 0 && this.search.clear(), dt.instance.unregister(this), this.emit(Z.Closed);
3837
4316
  }
3838
4317
  /**
3839
4318
  * Clears memory
@@ -3855,7 +4334,15 @@ class Ie extends Bt {
3855
4334
  * @param isHidden - true to hide, false to show
3856
4335
  */
3857
4336
  toggleItemHiddenByName(t, e) {
3858
- this.items.filter((o) => o.name === t).forEach((o) => o.toggleHidden(e));
4337
+ this.items.filter((o) => o.name === t).forEach((o) => o.toggleHidden(e)), e ? this.permanentlyHiddenNames.add(t) : this.permanentlyHiddenNames.delete(t);
4338
+ }
4339
+ /**
4340
+ * Returns true if the given item name was explicitly hidden via toggleItemHiddenByName.
4341
+ * Used by subclasses to prevent filter logic from un-hiding restricted items.
4342
+ * @param name - item name to check
4343
+ */
4344
+ isNamePermanentlyHidden(t) {
4345
+ return this.permanentlyHiddenNames.has(t);
3859
4346
  }
3860
4347
  /**
3861
4348
  * Looks for the item by name and imitates click on it
@@ -3872,13 +4359,13 @@ class Ie extends Bt {
3872
4359
  buildItems(t) {
3873
4360
  return t.map((e) => {
3874
4361
  switch (e.type) {
3875
- case S.Separator:
3876
- return new Mt(this.itemsRenderParams[S.Separator]);
3877
- case S.Html:
3878
- return new Z(e, this.itemsRenderParams[S.Html]);
3879
- case S.Default:
4362
+ case _.Separator:
4363
+ return new se(this.itemsRenderParams[_.Separator]);
4364
+ case _.Html:
4365
+ return new ct(e, this.itemsRenderParams[_.Html]);
4366
+ case _.Default:
3880
4367
  case void 0:
3881
- return new I(e, this.itemsRenderParams[S.Default]);
4368
+ return new B(e, this.itemsRenderParams[_.Default]);
3882
4369
  }
3883
4370
  });
3884
4371
  }
@@ -3887,7 +4374,7 @@ class Ie extends Bt {
3887
4374
  * @param event - event to retrieve popover item from
3888
4375
  */
3889
4376
  getTargetItem(t) {
3890
- return this.items.filter((e) => e instanceof I || e instanceof Z).find((e) => {
4377
+ return this.items.filter((e) => e instanceof B || e instanceof ct).find((e) => {
3891
4378
  const o = e.getElement();
3892
4379
  return o === null ? !1 : t.composedPath().includes(o);
3893
4380
  });
@@ -3897,12 +4384,12 @@ class Ie extends Bt {
3897
4384
  * @param item - item to handle click of
3898
4385
  */
3899
4386
  handleItemClick(t) {
3900
- if (!(t instanceof I && t.isDisabled)) {
4387
+ if (!(t instanceof B && t.isDisabled)) {
3901
4388
  if (t.hasChildren) {
3902
4389
  this.showNestedItems(t), this.callHandleClickIfPresent(t);
3903
4390
  return;
3904
4391
  }
3905
- this.itemsDefault.filter((e) => e !== t).forEach((e) => e.reset()), this.callHandleClickIfPresent(t), this.toggleItemActivenessIfNeeded(t), this.refreshItemActiveState(t), t.closeOnActivate === !0 && (this.hide(), this.emit(W.ClosedOnActivate));
4392
+ this.itemsDefault.filter((e) => e !== t).forEach((e) => e.reset()), this.callHandleClickIfPresent(t), this.toggleItemActivenessIfNeeded(t), this.refreshItemActiveState(t), t.closeOnActivate === !0 && (this.hide(), this.emit(Z.ClosedOnActivate));
3906
4393
  }
3907
4394
  }
3908
4395
  /**
@@ -3921,7 +4408,7 @@ class Ie extends Bt {
3921
4408
  * @param clickedItem - popover item that was clicked
3922
4409
  */
3923
4410
  toggleItemActivenessIfNeeded(t) {
3924
- if (!(t instanceof I) || (t.toggle === !0 && t.toggleActive(), typeof t.toggle != "string"))
4411
+ if (!(t instanceof B) || (t.toggle === !0 && t.toggleActive(), typeof t.toggle != "string"))
3925
4412
  return;
3926
4413
  const e = this.itemsDefault.filter((o) => o.toggle === t.toggle);
3927
4414
  if (e.length === 1) {
@@ -3938,7 +4425,7 @@ class Ie extends Bt {
3938
4425
  * @param item - popover item to refresh
3939
4426
  */
3940
4427
  refreshItemActiveState(t) {
3941
- t instanceof I && t.toggle === void 0 && t.toggleActive(t.isActive);
4428
+ t instanceof B && t.toggle === void 0 && t.toggleActive(t.isActive);
3942
4429
  }
3943
4430
  /**
3944
4431
  * Executes handleClick if it is present on item.
@@ -3952,21 +4439,21 @@ class Ie extends Bt {
3952
4439
  * @param isDisplayed - true if the message should be displayed
3953
4440
  */
3954
4441
  toggleNothingFoundMessage(t) {
3955
- t ? (this.nodes.nothingFoundMessage.classList.remove("hidden"), this.nodes.nothingFoundMessage.setAttribute(d.nothingFoundDisplayed, "true")) : (this.nodes.nothingFoundMessage.classList.add("hidden"), this.nodes.nothingFoundMessage.removeAttribute(d.nothingFoundDisplayed));
4442
+ t ? (this.nodes.nothingFoundMessage.classList.remove("hidden"), this.nodes.nothingFoundMessage.setAttribute(p.nothingFoundDisplayed, "true")) : (this.nodes.nothingFoundMessage.classList.add("hidden"), this.nodes.nothingFoundMessage.removeAttribute(p.nothingFoundDisplayed));
3956
4443
  }
3957
4444
  /**
3958
4445
  * Sets the open-top state for the popover
3959
4446
  * @param openTop - true if popover should open above trigger
3960
4447
  */
3961
4448
  setOpenTop(t) {
3962
- t ? this.nodes.popover.setAttribute(d.popoverOpenTop, "true") : this.nodes.popover.removeAttribute(d.popoverOpenTop);
4449
+ t ? this.nodes.popover.setAttribute(p.popoverOpenTop, "true") : this.nodes.popover.removeAttribute(p.popoverOpenTop);
3963
4450
  }
3964
4451
  /**
3965
4452
  * Sets the open-left state for the popover
3966
4453
  * @param openLeft - true if popover should open to the left
3967
4454
  */
3968
4455
  setOpenLeft(t) {
3969
- t ? this.nodes.popover.setAttribute(d.popoverOpenLeft, "true") : this.nodes.popover.removeAttribute(d.popoverOpenLeft);
4456
+ t ? this.nodes.popover.setAttribute(p.popoverOpenLeft, "true") : this.nodes.popover.removeAttribute(p.popoverOpenLeft);
3970
4457
  }
3971
4458
  /**
3972
4459
  * Checks if popover contains the node
@@ -3980,22 +4467,22 @@ class Ie extends Bt {
3980
4467
  * @returns PopoverNodes object with all required elements
3981
4468
  */
3982
4469
  createPopoverDOM() {
3983
- var i, r;
4470
+ var r, i;
3984
4471
  const t = document.createElement("div");
3985
- this.params.class && (t.className = this.params.class), t.setAttribute(d.popover, ""), this.params.class && t.setAttribute("data-blok-popover-custom-class", this.params.class), t.setAttribute("data-blok-testid", "popover"), t.style.setProperty("--width", (i = this.params.width) != null ? i : "auto"), t.style.setProperty("--item-padding", "3px"), t.style.setProperty("--item-height", "calc(1.25rem + 2 * var(--item-padding))"), t.style.setProperty("--popover-top", "calc(100% + 0.5rem)"), t.style.setProperty("--popover-left", "0"), t.style.setProperty("--nested-popover-overlap", "0.25rem");
4472
+ this.params.class && (t.className = this.params.class), t.setAttribute(p.popover, ""), this.params.class && t.setAttribute("data-blok-popover-custom-class", this.params.class), t.setAttribute("data-blok-testid", "popover"), t.style.setProperty("--width", (r = this.params.width) != null ? r : "auto"), t.style.setProperty("--item-padding", "3px"), t.style.setProperty("--item-height", "calc(1.25rem + 2 * var(--item-padding))"), t.style.setProperty("--popover-top", "calc(100% + 0.5rem)"), t.style.setProperty("--popover-left", "0"), t.style.setProperty("--nested-popover-overlap", "0.25rem");
3986
4473
  const e = document.createElement("div");
3987
- e.className = K.popoverContainer, e.setAttribute(d.popoverContainer, ""), e.setAttribute("data-blok-testid", "popover-container");
4474
+ e.className = ot.popoverContainer, e.setAttribute(p.popoverContainer, ""), e.setAttribute("data-blok-testid", "popover-container");
3988
4475
  const o = document.createElement("div");
3989
- o.className = C(
4476
+ o.className = A(
3990
4477
  "cursor-default text-sm leading-5 font-medium whitespace-nowrap overflow-hidden text-ellipsis text-gray-text p-[3px]",
3991
4478
  "hidden"
3992
- ), o.setAttribute("data-blok-testid", "popover-nothing-found"), o.textContent = (r = this.messages.nothingFound) != null ? r : "Nothing found";
3993
- const s = document.createElement("div");
3994
- return s.className = K.items, s.setAttribute(d.popoverItems, ""), s.setAttribute("data-blok-testid", "popover-items"), e.appendChild(o), e.appendChild(s), t.appendChild(e), {
4479
+ ), o.setAttribute("data-blok-testid", "popover-nothing-found"), o.textContent = (i = this.messages.nothingFound) != null ? i : "Nothing found";
4480
+ const n = document.createElement("div");
4481
+ return n.className = ot.items, n.setAttribute(p.popoverItems, ""), n.setAttribute("data-blok-testid", "popover-items"), e.appendChild(o), e.appendChild(n), t.appendChild(e), {
3995
4482
  popover: t,
3996
4483
  popoverContainer: e,
3997
4484
  nothingFoundMessage: o,
3998
- items: s
4485
+ items: n
3999
4486
  };
4000
4487
  }
4001
4488
  /**
@@ -4003,13 +4490,13 @@ class Ie extends Bt {
4003
4490
  */
4004
4491
  appendItemElements() {
4005
4492
  this.items.forEach((t) => {
4006
- var o, s, i;
4007
- const e = (s = (o = t.getMountElement) == null ? void 0 : o.call(t)) != null ? s : t.getElement();
4008
- e !== null && ((i = this.nodes.items) == null || i.appendChild(e));
4493
+ var o, n, r;
4494
+ const e = (n = (o = t.getMountElement) == null ? void 0 : o.call(t)) != null ? n : t.getElement();
4495
+ e !== null && ((r = this.nodes.items) == null || r.appendChild(e));
4009
4496
  });
4010
4497
  }
4011
4498
  }
4012
- class Ht extends Ie {
4499
+ class ie extends bo {
4013
4500
  /**
4014
4501
  * Construct the instance
4015
4502
  * @param params - popover params
@@ -4017,39 +4504,39 @@ class Ht extends Ie {
4017
4504
  * The parameters that are not set by user via popover api but rather depend on technical implementation
4018
4505
  */
4019
4506
  constructor(t, e) {
4020
- var s;
4507
+ var n;
4021
4508
  if (super(t, e), this.nestingLevel = 0, this.nestedPopoverTriggerItem = null, this.previouslyHoveredItem = null, this.scopeElement = document.body, this.hide = () => {
4022
- var i;
4023
- super.hide(), this.destroyNestedPopoverIfExists(), (i = this.flipper) == null || i.deactivate(), this.previouslyHoveredItem = null;
4509
+ var r;
4510
+ super.hide(), this.destroyNestedPopoverIfExists(), (r = this.flipper) == null || r.deactivate(), this.previouslyHoveredItem = null;
4024
4511
  }, this.onFlip = () => {
4025
- const i = this.itemsDefault.find((r) => r.isFocused);
4026
- i == null || i.onFocus();
4027
- }, this.onSearch = (i) => {
4028
- var h;
4029
- const r = i.query === "", a = i.items.length === 0, c = i.items;
4512
+ const r = this.itemsDefault.find((i) => i.isFocused);
4513
+ r == null || r.onFocus();
4514
+ }, this.onSearch = (r) => {
4515
+ var d;
4516
+ const i = r.query === "", a = r.items.length === 0, l = r.items;
4030
4517
  this.items.forEach((u) => {
4031
- const p = u instanceof I, v = u instanceof Mt || u instanceof Z, b = p ? !c.includes(u) : v && (a || !r);
4032
- u.toggleHidden(b);
4518
+ const h = u instanceof B, g = u instanceof se || u instanceof ct, f = h ? !l.includes(u) || u.name !== void 0 && this.isNamePermanentlyHidden(u.name) : g && (a || !i);
4519
+ u.toggleHidden(f);
4033
4520
  }), this.toggleNothingFoundMessage(a);
4034
- const l = r ? this.flippableElements : i.items.map((u) => u.getElement());
4035
- (h = this.flipper) != null && h.isActivated && (this.flipper.deactivate(), this.flipper.activate(l), l.length > 0 && this.flipper.focusItem(0, { skipNextTab: !0 }));
4036
- }, t.trigger && (this.trigger = t.trigger), t.nestingLevel !== void 0 && (this.nestingLevel = t.nestingLevel), this.nestingLevel > 0 && this.nodes.popover.setAttribute(d.nested, "true"), t.scopeElement !== void 0 && (this.scopeElement = t.scopeElement), this.nodes.popoverContainer !== null && this.listeners.on(this.nodes.popoverContainer, "mouseover", (i) => this.handleHover(i)), t.searchable && this.addSearch(), t.flippable === !1)
4521
+ const c = i ? this.flippableElements : r.items.map((u) => u.getElement());
4522
+ (d = this.flipper) != null && d.isActivated && (this.flipper.deactivate(), this.flipper.activate(c), c.length > 0 && this.flipper.focusItem(0, { skipNextTab: !0 }));
4523
+ }, t.trigger && (this.trigger = t.trigger), t.nestingLevel !== void 0 && (this.nestingLevel = t.nestingLevel), this.nestingLevel > 0 && this.nodes.popover.setAttribute(p.nested, "true"), t.scopeElement !== void 0 && (this.scopeElement = t.scopeElement), this.nodes.popoverContainer !== null && this.listeners.on(this.nodes.popoverContainer, "mouseover", (r) => this.handleHover(r)), t.searchable && this.addSearch(), t.flippable === !1)
4037
4524
  return;
4038
4525
  const o = t.flipper;
4039
- o !== void 0 ? (o.deactivate(), o.removeOnFlip(this.onFlip), this.flipper = o) : this.flipper = new Y({
4526
+ o !== void 0 ? (o.deactivate(), o.removeOnFlip(this.onFlip), this.flipper = o) : this.flipper = new at({
4040
4527
  items: this.flippableElements,
4041
- focusedItemClass: $.focused,
4528
+ focusedItemClass: X.focused,
4042
4529
  allowedKeys: [
4043
- g.TAB,
4044
- g.UP,
4045
- g.DOWN,
4046
- g.ENTER,
4047
- g.RIGHT,
4048
- g.LEFT
4530
+ v.TAB,
4531
+ v.UP,
4532
+ v.DOWN,
4533
+ v.ENTER,
4534
+ v.RIGHT,
4535
+ v.LEFT
4049
4536
  ],
4050
4537
  onArrowLeft: t.onNavigateBack,
4051
4538
  handleContentEditableTargets: t.handleContentEditableNavigation
4052
- }), (s = this.flipper) == null || s.onFlip(this.onFlip);
4539
+ }), (n = this.flipper) == null || n.onFlip(this.onFlip);
4053
4540
  }
4054
4541
  /**
4055
4542
  * Returns true if some item inside popover is focused
@@ -4057,6 +4544,15 @@ class Ht extends Ie {
4057
4544
  hasFocus() {
4058
4545
  return this.flipper === void 0 ? !1 : this.flipper.hasFocus();
4059
4546
  }
4547
+ /**
4548
+ * Toggles hidden state of all items matching the given name.
4549
+ * Invalidates the cached size so the next access re-measures the popover.
4550
+ * @param name - name of the items to toggle
4551
+ * @param isHidden - true to hide, false to show
4552
+ */
4553
+ toggleItemHiddenByName(t, e) {
4554
+ super.toggleItemHiddenByName(t, e), this._size = void 0;
4555
+ }
4060
4556
  /**
4061
4557
  * Scroll position inside items container of the popover
4062
4558
  */
@@ -4076,10 +4572,10 @@ class Ht extends Ie {
4076
4572
  var e;
4077
4573
  const t = this.getMountElement();
4078
4574
  if (this.trigger && t && document.body.appendChild(t), this.trigger) {
4079
- const { top: o, left: s } = this.calculatePosition();
4080
- this.nodes.popover.style.position = "absolute", this.nodes.popover.style.top = `${o}px`, this.nodes.popover.style.left = `${s}px`, this.nodes.popover.style.setProperty(T.PopoverTop, "0px"), this.nodes.popover.style.setProperty(T.PopoverLeft, "0px");
4575
+ const { top: o, left: n } = this.calculatePosition();
4576
+ this.nodes.popover.style.position = "absolute", this.nodes.popover.style.top = `${o}px`, this.nodes.popover.style.left = `${n}px`, this.nodes.popover.style.setProperty(O.PopoverTop, "0px"), this.nodes.popover.style.setProperty(O.PopoverLeft, "0px");
4081
4577
  }
4082
- this.nodes.popover.style.setProperty(T.PopoverHeight, this.size.height + "px"), !this.trigger && !this.shouldOpenBottom && (this.setOpenTop(!0), this.nodes.popover.style.setProperty(T.PopoverTop, "calc(-1 * (0.5rem + var(--popover-height)))")), !this.trigger && !this.shouldOpenRight && (this.setOpenLeft(!0), this.nodes.popover.style.setProperty(T.PopoverLeft, "calc(-1 * var(--width) + 100%)")), super.show(), (e = this.flipper) == null || e.activate(this.flippableElements), requestAnimationFrame(() => {
4578
+ this.nodes.popover.style.setProperty(O.PopoverHeight, this.size.height + "px"), !this.trigger && !this.shouldOpenBottom && (this.setOpenTop(!0), this.nodes.popover.style.setProperty(O.PopoverTop, "calc(-1 * (0.5rem + var(--popover-height)))")), !this.trigger && !this.shouldOpenRight && (this.setOpenLeft(!0), this.nodes.popover.style.setProperty(O.PopoverLeft, "calc(-1 * var(--width) + 100%)")), super.show(), (e = this.flipper) == null || e.activate(this.flippableElements), requestAnimationFrame(() => {
4083
4579
  this.focusInitialElement();
4084
4580
  });
4085
4581
  }
@@ -4111,16 +4607,16 @@ class Ht extends Ie {
4111
4607
  * Calculates position for the popover
4112
4608
  */
4113
4609
  calculatePosition() {
4114
- var p, v;
4115
- const t = (v = this.params.position) != null ? v : (p = this.trigger) == null ? void 0 : p.getBoundingClientRect();
4610
+ var h, g;
4611
+ const t = (g = this.params.position) != null ? g : (h = this.trigger) == null ? void 0 : h.getBoundingClientRect();
4116
4612
  if (!t)
4117
4613
  return {
4118
4614
  top: 0,
4119
4615
  left: 0
4120
4616
  };
4121
- const e = this.size, o = window.innerWidth, s = window.innerHeight, i = 8, r = t.bottom + i + window.scrollY, c = t.bottom + i + e.height > s + window.scrollY && t.top - i - e.height > window.scrollY ? t.top - i - e.height + window.scrollY : r, l = t.left + window.scrollX, u = l + e.width > o + window.scrollX ? Math.max(0, t.right - e.width + window.scrollX) : l;
4617
+ const e = this.size, o = window.innerWidth, n = window.innerHeight, r = 8, i = t.bottom + r + window.scrollY, l = t.bottom + r + e.height > n + window.scrollY && t.top - r - e.height > window.scrollY ? t.top - r - e.height + window.scrollY : i, c = t.left + window.scrollX, u = c + e.width > o + window.scrollX ? Math.max(0, t.right - e.width + window.scrollX) : c;
4122
4618
  return {
4123
- top: c,
4619
+ top: l,
4124
4620
  left: u
4125
4621
  };
4126
4622
  }
@@ -4160,18 +4656,18 @@ class Ht extends Ie {
4160
4656
  * @param item – item near which nested popover should be displayed
4161
4657
  */
4162
4658
  setTriggerItemPosition(t, e) {
4163
- const o = e.getElement(), s = (o ? o.offsetTop : 0) - this.scrollTop, i = this.offsetTop + s, r = t.querySelector(`[${d.popover}]`);
4164
- (r instanceof HTMLElement ? r : t).style.setProperty(T.TriggerItemTop, i + "px");
4659
+ const o = e.getElement(), n = (o ? o.offsetTop : 0) - this.scrollTop, r = this.offsetTop + n, i = t.querySelector(`[${p.popover}]`);
4660
+ (i instanceof HTMLElement ? i : t).style.setProperty(O.TriggerItemTop, r + "px");
4165
4661
  }
4166
4662
  /**
4167
4663
  * Destroys existing nested popover
4168
4664
  */
4169
4665
  destroyNestedPopoverIfExists() {
4170
- var o, s, i;
4666
+ var o, n, r;
4171
4667
  if (this.nestedPopover === void 0 || this.nestedPopover === null)
4172
4668
  return;
4173
4669
  const t = (o = this.nestedPopoverTriggerItem) == null ? void 0 : o.getElement(), e = this.nestedPopover.getElement();
4174
- this.nestedPopover.off(W.ClosedOnActivate, this.hide), this.nestedPopover.hide(), this.nestedPopover.destroy(), e.remove(), this.nestedPopover = null, (s = this.flipper) == null || s.activate(this.flippableElements), this.focusAfterNestedPopoverClose(t), (i = this.nestedPopoverTriggerItem) == null || i.onChildrenClose(), this.nestedPopoverTriggerItem = null;
4670
+ this.nestedPopover.off(Z.ClosedOnActivate, this.hide), this.nestedPopover.hide(), this.nestedPopover.destroy(), e.remove(), this.nestedPopover = null, (n = this.flipper) == null || n.activate(this.flippableElements), this.focusAfterNestedPopoverClose(t), (r = this.nestedPopoverTriggerItem) == null || r.onChildrenClose(), this.nestedPopoverTriggerItem = null;
4175
4671
  }
4176
4672
  /**
4177
4673
  * Focuses the appropriate item after nested popover closes.
@@ -4197,9 +4693,9 @@ class Ht extends Ie {
4197
4693
  * @param item - item to display nested popover by
4198
4694
  */
4199
4695
  showNestedPopoverForItem(t) {
4200
- var i, r;
4201
- const e = (i = this.flipper) == null ? void 0 : i.getHandleContentEditableTargets();
4202
- this.nestedPopover = new Ht({
4696
+ var r, i;
4697
+ const e = (r = this.flipper) == null ? void 0 : r.getHandleContentEditableTargets();
4698
+ this.nestedPopover = new ie({
4203
4699
  searchable: t.isChildrenSearchable,
4204
4700
  items: t.children,
4205
4701
  nestingLevel: this.nestingLevel + 1,
@@ -4208,9 +4704,11 @@ class Ht extends Ie {
4208
4704
  onNavigateBack: this.destroyNestedPopoverIfExists.bind(this),
4209
4705
  width: t.childrenWidth,
4210
4706
  handleContentEditableNavigation: e
4211
- }), t.onChildrenOpen(), this.nestedPopover.on(W.ClosedOnActivate, this.hide);
4212
- const o = this.nestedPopover.getMountElement(), s = this.nestedPopover.getElement();
4213
- return this.nodes.popover.appendChild(o), this.setTriggerItemPosition(o, t), s.style.setProperty(T.NestingLevel, this.nestedPopover.nestingLevel.toString()), this.applyNestedPopoverPositioning(o), this.nestedPopover.show(), (r = this.flipper) == null || r.deactivate(), this.nestedPopover;
4707
+ }), t.onChildrenOpen(), this.nestedPopover.on(Z.ClosedOnActivate, this.hide);
4708
+ const o = this.nestedPopover.getMountElement(), n = this.nestedPopover.getElement();
4709
+ return this.nodes.popover.appendChild(o), this.setTriggerItemPosition(o, t), n.style.setProperty(O.NestingLevel, this.nestedPopover.nestingLevel.toString()), this.applyNestedPopoverPositioning(o), this.listeners.on(o, "click", () => {
4710
+ this.nestedPopoverTriggerItem !== null && this.refreshItemActiveState(this.nestedPopoverTriggerItem);
4711
+ }), this.nestedPopover.show(), (i = this.flipper) == null || i.deactivate(), this.nestedPopover;
4214
4712
  }
4215
4713
  /**
4216
4714
  * Applies positioning styles to nested popover container.
@@ -4218,13 +4716,13 @@ class Ht extends Ie {
4218
4716
  * @param nestedPopoverEl - the nested popover element (mount element)
4219
4717
  */
4220
4718
  applyNestedPopoverPositioning(t) {
4221
- const e = t.querySelector(`[${d.popoverContainer}]`);
4719
+ const e = t.querySelector(`[${p.popoverContainer}]`);
4222
4720
  if (!(e instanceof HTMLElement))
4223
4721
  return;
4224
- const o = e, s = t.querySelector(`[${d.popover}]`), i = s instanceof HTMLElement ? s : t, r = this.nodes.popover.hasAttribute(d.popoverOpenTop), a = this.nodes.popover.hasAttribute(d.popoverOpenLeft);
4722
+ const o = e, n = t.querySelector(`[${p.popover}]`), r = n instanceof HTMLElement ? n : t, i = this.nodes.popover.hasAttribute(p.popoverOpenTop), a = this.nodes.popover.hasAttribute(p.popoverOpenLeft);
4225
4723
  o.style.position = "absolute";
4226
- const c = this.params.width === "auto" ? `${this.nodes.popoverContainer.offsetWidth}px` : "var(--width)";
4227
- a ? i.style.setProperty(T.PopoverLeft, `calc(-1 * (var(--nesting-level) + 1) * ${c} + 100%)`) : i.style.setProperty(T.PopoverLeft, `calc(var(--nesting-level) * (${c} - var(--nested-popover-overlap)))`), r ? o.style.top = "calc(var(--trigger-item-top) - var(--popover-height) + var(--item-height) + 0.5rem + var(--nested-popover-overlap))" : o.style.top = "calc(var(--trigger-item-top) - var(--nested-popover-overlap))";
4724
+ const l = this.params.width === void 0 || this.params.width === "auto" ? `${this.nodes.popoverContainer.offsetWidth}px` : "var(--width)";
4725
+ a ? r.style.setProperty(O.PopoverLeft, `calc(-1 * (var(--nesting-level) + 1) * ${l} + 100%)`) : r.style.setProperty(O.PopoverLeft, `calc(var(--nesting-level) * (${l} - var(--nested-popover-overlap)))`), i ? o.style.top = "calc(var(--trigger-item-top) - var(--popover-height) + var(--item-height) + 0.5rem + var(--nested-popover-overlap))" : o.style.top = "calc(var(--trigger-item-top) - var(--nested-popover-overlap))";
4228
4726
  }
4229
4727
  /**
4230
4728
  * Checks if popover should be opened bottom.
@@ -4233,8 +4731,8 @@ class Ht extends Ie {
4233
4731
  get shouldOpenBottom() {
4234
4732
  if (this.nodes.popover === void 0 || this.nodes.popover === null)
4235
4733
  return !1;
4236
- const t = this.nodes.popoverContainer.getBoundingClientRect(), e = this.scopeElement.getBoundingClientRect(), o = this.size.height, s = t.top + o, i = t.top - o, r = Math.min(window.innerHeight, e.bottom);
4237
- return i < e.top || s <= r;
4734
+ const t = this.nodes.popoverContainer.getBoundingClientRect(), e = this.scopeElement.getBoundingClientRect(), o = this.size.height, n = t.top + o, r = t.top - o, i = Math.min(window.innerHeight, e.bottom);
4735
+ return r < e.top || n <= i;
4238
4736
  }
4239
4737
  /**
4240
4738
  * Checks if popover should be opened left.
@@ -4243,15 +4741,15 @@ class Ht extends Ie {
4243
4741
  get shouldOpenRight() {
4244
4742
  if (this.nodes.popover === void 0 || this.nodes.popover === null)
4245
4743
  return !1;
4246
- const t = this.nodes.popover.getBoundingClientRect(), e = this.scopeElement.getBoundingClientRect(), o = this.size.width, s = t.right + o, i = t.left - o, r = Math.min(window.innerWidth, e.right);
4247
- return i < e.left || s <= r;
4744
+ const t = this.nodes.popover.getBoundingClientRect(), e = this.scopeElement.getBoundingClientRect(), o = this.size.width, n = t.right + o, r = t.left - o, i = Math.min(window.innerWidth, e.right);
4745
+ return r < e.left || n <= i;
4248
4746
  }
4249
4747
  /**
4250
4748
  * Helps to calculate size of popover that is only resolved when popover is displayed on screen.
4251
4749
  * Renders invisible clone of popover to get actual values.
4252
4750
  */
4253
4751
  get size() {
4254
- var s;
4752
+ var n;
4255
4753
  if (this._size)
4256
4754
  return this._size;
4257
4755
  const t = {
@@ -4261,8 +4759,8 @@ class Ht extends Ie {
4261
4759
  if (this.nodes.popover === null)
4262
4760
  return t;
4263
4761
  const e = this.nodes.popover.cloneNode(!0);
4264
- e.style.visibility = "hidden", e.style.position = "absolute", e.style.top = "-1000px", e.setAttribute(d.popoverOpened, "true"), (s = e.querySelector(`[${d.nested}]`)) == null || s.remove(), document.body.appendChild(e);
4265
- const o = e.querySelector(`[${d.popoverContainer}]`);
4762
+ e.style.visibility = "hidden", e.style.position = "absolute", e.style.top = "-1000px", e.setAttribute(p.popoverOpened, "true"), (n = e.querySelector(`[${p.nested}]`)) == null || n.remove(), document.body.appendChild(e);
4763
+ const o = e.querySelector(`[${p.popoverContainer}]`);
4266
4764
  return t.height = o.offsetHeight, t.width = o.offsetWidth, e.remove(), this._size = t, t;
4267
4765
  }
4268
4766
  /**
@@ -4277,11 +4775,11 @@ class Ht extends Ie {
4277
4775
  * @returns array of HTML elements for keyboard navigation
4278
4776
  */
4279
4777
  getFlippableElementsForItem(t) {
4280
- if (t instanceof Z) {
4778
+ if (t instanceof ct) {
4281
4779
  const o = t.getElement();
4282
4780
  return o ? [o] : [];
4283
4781
  }
4284
- if (!(t instanceof I))
4782
+ if (!(t instanceof B))
4285
4783
  return [];
4286
4784
  if (t.isDisabled)
4287
4785
  return [];
@@ -4292,10 +4790,10 @@ class Ht extends Ie {
4292
4790
  * Adds search to the popover
4293
4791
  */
4294
4792
  addSearch() {
4295
- this.search = new Te({
4793
+ this.search = new vo({
4296
4794
  items: this.itemsDefault,
4297
4795
  placeholder: this.messages.search
4298
- }), this.search.on(ft.Search, this.onSearch);
4796
+ }), this.search.on(Lt.Search, this.onSearch);
4299
4797
  const t = this.search.getElement();
4300
4798
  t.classList.add("mb-1.5"), this.nodes.popoverContainer.insertBefore(t, this.nodes.popoverContainer.firstChild);
4301
4799
  }
@@ -4305,25 +4803,25 @@ class Ht extends Ie {
4305
4803
  * @param query - search query text
4306
4804
  */
4307
4805
  filterItems(t) {
4308
- const e = this.itemsDefault.filter((o) => Ft(o, t));
4806
+ const e = this.itemsDefault.filter((o) => re(o, t));
4309
4807
  this.onSearch({
4310
4808
  query: t,
4311
4809
  items: e
4312
4810
  });
4313
4811
  }
4314
4812
  }
4315
- const Ro = function(n) {
4316
- const t = f.make("div");
4317
- return t.style.display = "flex", t.style.flexDirection = "column", t.style.gap = "4px", n.forEach((e) => {
4318
- const o = f.make("div"), s = e.indexOf(" ");
4319
- if (s > 0) {
4320
- const i = e.substring(0, s), r = e.substring(s), a = f.make("span", null, { textContent: i });
4321
- a.style.color = "white", o.appendChild(a), o.appendChild(document.createTextNode(r));
4813
+ const Pn = function(s) {
4814
+ const t = m.make("div");
4815
+ return t.style.display = "flex", t.style.flexDirection = "column", t.style.gap = "4px", s.forEach((e) => {
4816
+ const o = m.make("div"), n = e.indexOf(" ");
4817
+ if (n > 0) {
4818
+ const r = e.substring(0, n), i = e.substring(n), a = m.make("span", null, { textContent: r });
4819
+ a.style.color = "white", o.appendChild(a), o.appendChild(document.createTextNode(i));
4322
4820
  } else
4323
4821
  o.appendChild(document.createTextNode(e));
4324
4822
  t.appendChild(o);
4325
4823
  }), t;
4326
- }, vt = class vt {
4824
+ }, Ot = class Ot {
4327
4825
  /**
4328
4826
  * @param api - Blok API
4329
4827
  */
@@ -4337,31 +4835,31 @@ const Ro = function(n) {
4337
4835
  * Returns tool's UI config
4338
4836
  */
4339
4837
  async render() {
4340
- const t = Ot.get();
4838
+ const t = oe.get();
4341
4839
  if (t === null)
4342
4840
  return [];
4343
4841
  const e = this.blocksAPI.getBlockByElement(t.anchorNode);
4344
4842
  if (e === void 0)
4345
4843
  return [];
4346
- const o = this.toolsAPI.getBlockTools(), s = await Rt(e, o);
4347
- if (s.length === 0)
4844
+ const o = this.toolsAPI.getBlockTools(), n = await te(e, o);
4845
+ if (n.length === 0)
4348
4846
  return [];
4349
- const i = s.reduce((l, h) => {
4847
+ const r = n.reduce((c, d) => {
4350
4848
  var u;
4351
- return (u = h.toolbox) == null || u.forEach((p) => {
4352
- var v;
4353
- p.title !== void 0 && l.push({
4354
- icon: p.icon,
4355
- title: yt(this.i18nInstance, p, h.name),
4356
- name: (v = p.name) != null ? v : h.name,
4849
+ return (u = d.toolbox) == null || u.forEach((h) => {
4850
+ var g;
4851
+ h.title !== void 0 && c.push({
4852
+ icon: h.icon,
4853
+ title: Ft(this.i18nInstance, h, d.name),
4854
+ name: (g = h.name) != null ? g : d.name,
4357
4855
  closeOnActivate: !0,
4358
4856
  onActivate: async () => {
4359
- const b = await this.blocksAPI.convert(e.id, h.name, p.data);
4360
- this.caretAPI.setToBlock(b, "end");
4857
+ const f = await this.blocksAPI.convert(e.id, d.name, h.data);
4858
+ this.caretAPI.setToBlock(f, "end");
4361
4859
  }
4362
4860
  });
4363
- }), l;
4364
- }, []), r = await e.getActiveToolboxEntry(), a = r ? yt(this.i18nInstance, r, e.name) : se(this.i18nInstance, e.name, qt(e.name)), c = !zt();
4861
+ }), c;
4862
+ }, []), i = await e.getActiveToolboxEntry(), a = i ? Ft(this.i18nInstance, i, e.name) : Ae(this.i18nInstance, e.name, ke(e.name)), l = !we();
4365
4863
  return {
4366
4864
  name: "convert-to",
4367
4865
  title: a,
@@ -4369,118 +4867,136 @@ const Ro = function(n) {
4369
4867
  title: this.i18nAPI.t("popover.convertTo")
4370
4868
  },
4371
4869
  children: {
4372
- items: i,
4870
+ items: r,
4373
4871
  width: "auto",
4374
4872
  onOpen: () => {
4375
- c && (this.selectionAPI.setFakeBackground(), this.selectionAPI.save());
4873
+ l && (this.selectionAPI.setFakeBackground(), this.selectionAPI.save());
4376
4874
  },
4377
4875
  onClose: () => {
4378
- c && (this.selectionAPI.restore(), this.selectionAPI.removeFakeBackground());
4876
+ l && (this.selectionAPI.restore(), this.selectionAPI.removeFakeBackground());
4379
4877
  }
4380
4878
  }
4381
4879
  };
4382
4880
  }
4383
4881
  };
4384
- vt.isInline = !0;
4385
- let At = vt;
4882
+ Ot.isInline = !0;
4883
+ let qt = Ot;
4386
4884
  export {
4387
- no as $,
4388
- Ae as A,
4389
- qe as B,
4390
- Fe as C,
4391
- d as D,
4392
- Bt as E,
4393
- Y as F,
4394
- Me as G,
4395
- Wt as H,
4396
- Ze as I,
4397
- Ht as J,
4398
- zt as K,
4399
- Nt as L,
4400
- $ as M,
4401
- Lo as N,
4402
- K as O,
4403
- S as P,
4404
- W as Q,
4405
- I as R,
4406
- Ot as S,
4407
- Z as T,
4408
- T as U,
4409
- No as V,
4410
- ao as W,
4411
- Ie as X,
4412
- _e as Y,
4413
- Rt as Z,
4414
- yt as _,
4415
- f as a,
4416
- So as a0,
4417
- De as a1,
4418
- It as a2,
4419
- ro as a3,
4420
- Ut as a4,
4421
- Ro as a5,
4422
- io as a6,
4423
- se as a7,
4424
- Ye as a8,
4425
- mo as a9,
4426
- To as aA,
4427
- Io as aB,
4428
- Eo as aC,
4429
- yo as aD,
4430
- Co as aE,
4431
- eo as aF,
4432
- oo as aG,
4433
- so as aH,
4434
- We as aI,
4435
- Be as aa,
4436
- At as ab,
4437
- Q as ac,
4438
- Oe as ad,
4439
- ze as ae,
4440
- Xe as af,
4441
- Pe as ag,
4442
- $e as ah,
4443
- Se as ai,
4444
- Vt as aj,
4445
- Le as ak,
4446
- Je as al,
4447
- vo as am,
4448
- go as an,
4449
- lo as ao,
4450
- co as ap,
4451
- ho as aq,
4452
- po as ar,
4453
- uo as as,
4454
- fo as at,
4455
- bo as au,
4456
- wo as av,
4457
- ko as aw,
4458
- to as ax,
4459
- xo as ay,
4460
- Ao as az,
4461
- J as b,
4462
- Ue as c,
4463
- ne as d,
4464
- oe as e,
4465
- qt as f,
4466
- Ge as g,
4467
- Ne as h,
4468
- ht as i,
4469
- X as j,
4470
- je as k,
4471
- q as l,
4472
- j as m,
4473
- Re as n,
4474
- me as o,
4475
- be as p,
4476
- ee as q,
4477
- g as r,
4478
- Qe as s,
4479
- C as t,
4480
- He as u,
4481
- Ve as v,
4482
- _t as w,
4483
- Et as x,
4484
- Ke as y,
4485
- z
4885
+ ct as $,
4886
+ T as A,
4887
+ Go as B,
4888
+ Yo as C,
4889
+ p as D,
4890
+ ee as E,
4891
+ at as F,
4892
+ st as G,
4893
+ ko as H,
4894
+ Vo as I,
4895
+ z as J,
4896
+ Fo as K,
4897
+ Qt as L,
4898
+ nn as M,
4899
+ Ao as N,
4900
+ Ko as O,
4901
+ _ as P,
4902
+ Io as Q,
4903
+ fe as R,
4904
+ oe as S,
4905
+ ie as T,
4906
+ we as U,
4907
+ X as V,
4908
+ Hn as W,
4909
+ ot as X,
4910
+ dt as Y,
4911
+ Z,
4912
+ B as _,
4913
+ m as a,
4914
+ O as a0,
4915
+ Fn as a1,
4916
+ pn as a2,
4917
+ bo as a3,
4918
+ jo as a4,
4919
+ te as a5,
4920
+ Ft as a6,
4921
+ dn as a7,
4922
+ Bn as a8,
4923
+ Oo as a9,
4924
+ bn as aA,
4925
+ wn as aB,
4926
+ En as aC,
4927
+ Tn as aD,
4928
+ xn as aE,
4929
+ ro as aF,
4930
+ Wt as aG,
4931
+ cn as aH,
4932
+ Mn as aI,
4933
+ sn as aJ,
4934
+ qo as aK,
4935
+ On as aL,
4936
+ Rn as aM,
4937
+ Ln as aN,
4938
+ Nn as aO,
4939
+ Sn as aP,
4940
+ An as aQ,
4941
+ Ho as aR,
4942
+ In as aS,
4943
+ Tt as aT,
4944
+ Qo as aU,
4945
+ tn as aV,
4946
+ en as aW,
4947
+ on as aX,
4948
+ rn as aY,
4949
+ an as aZ,
4950
+ ln as a_,
4951
+ Dt as aa,
4952
+ un as ab,
4953
+ ve as ac,
4954
+ Pn as ad,
4955
+ hn as ae,
4956
+ Ae as af,
4957
+ zo as ag,
4958
+ yn as ah,
4959
+ it as ai,
4960
+ To as aj,
4961
+ qt as ak,
4962
+ xo as al,
4963
+ Wo as am,
4964
+ Uo as an,
4965
+ Lo as ao,
4966
+ No as ap,
4967
+ Co as aq,
4968
+ ge as ar,
4969
+ yo as as,
4970
+ Zo as at,
4971
+ Cn as au,
4972
+ kn as av,
4973
+ fn as aw,
4974
+ gn as ax,
4975
+ mn as ay,
4976
+ vn as az,
4977
+ E as b,
4978
+ _o as c,
4979
+ Se as d,
4980
+ Bo as e,
4981
+ Po as f,
4982
+ Ro as g,
4983
+ $o as h,
4984
+ R as i,
4985
+ ke as j,
4986
+ Eo as k,
4987
+ rt as l,
4988
+ yt as m,
4989
+ no as n,
4990
+ so as o,
4991
+ xt as p,
4992
+ Mo as q,
4993
+ v as r,
4994
+ Jo as s,
4995
+ A as t,
4996
+ So as u,
4997
+ Do as v,
4998
+ me as w,
4999
+ Xo as x,
5000
+ Pt as y,
5001
+ P as z
4486
5002
  };