@hkyhy/marsun-components-core 0.1.89 → 0.1.98

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 (278) hide show
  1. package/dist/components/Audit/AuditLogList.d.ts +27 -0
  2. package/dist/components/Audit/AuditLogList.js +272 -0
  3. package/dist/components/Audit/AuditLogList.js.map +1 -0
  4. package/dist/components/Audit/formatAuditCurl.d.ts +27 -0
  5. package/dist/components/Audit/formatAuditCurl.js +115 -0
  6. package/dist/components/Audit/formatAuditCurl.js.map +1 -0
  7. package/dist/components/Audit/formatAuditJson.d.ts +15 -0
  8. package/dist/components/Audit/formatAuditJson.js +135 -0
  9. package/dist/components/Audit/formatAuditJson.js.map +1 -0
  10. package/dist/components/Audit/index.d.ts +3 -0
  11. package/dist/components/Audit/style.module.scss.js +30 -0
  12. package/dist/components/Audit/style.module.scss.js.map +1 -0
  13. package/dist/components/Audit/types.d.ts +39 -0
  14. package/dist/components/Editor/RichTextEditor/RichTextEditor.d.ts +24 -0
  15. package/dist/components/Editor/RichTextEditor/RichTextEditor.js +93 -0
  16. package/dist/components/Editor/RichTextEditor/RichTextEditor.js.map +1 -0
  17. package/dist/components/Editor/RichTextEditor/index.d.ts +2 -0
  18. package/dist/components/Editor/RichTextEditor/style.module.scss.js +11 -0
  19. package/dist/components/Editor/RichTextEditor/style.module.scss.js.map +1 -0
  20. package/dist/components/Editor/VariablePicker.d.ts +19 -0
  21. package/dist/components/Editor/VariablePicker.js +55 -0
  22. package/dist/components/Editor/VariablePicker.js.map +1 -0
  23. package/dist/components/Editor/index.d.ts +7 -0
  24. package/dist/components/Editor/index.js +21 -0
  25. package/dist/components/Editor/index.js.map +1 -0
  26. package/dist/components/Editor/msgVarTokenPlugin.d.ts +13 -0
  27. package/dist/components/Editor/msgVarTokenPlugin.js +94 -0
  28. package/dist/components/Editor/msgVarTokenPlugin.js.map +1 -0
  29. package/dist/components/Editor/variableMention.d.ts +37 -0
  30. package/dist/components/Editor/variableMention.js +64 -0
  31. package/dist/components/Editor/variableMention.js.map +1 -0
  32. package/dist/components/FormInfo/RichTextField/index.d.ts +21 -0
  33. package/dist/components/FormInfo/RichTextField/index.js +82 -0
  34. package/dist/components/FormInfo/RichTextField/index.js.map +1 -0
  35. package/dist/components/FormInfo/RichTextField/style.module.scss.js +9 -0
  36. package/dist/components/FormInfo/RichTextField/style.module.scss.js.map +1 -0
  37. package/dist/components/FormInfo/VariableMentionInput/index.d.ts +17 -0
  38. package/dist/components/FormInfo/VariableMentionInput/index.js +73 -0
  39. package/dist/components/FormInfo/VariableMentionInput/index.js.map +1 -0
  40. package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js +11 -0
  41. package/dist/components/FormInfo/VariableMentionInput/style.module.scss.js.map +1 -0
  42. package/dist/components/FormInfo/fields.d.ts +5 -0
  43. package/dist/components/FormInfo/fields.js +32 -23
  44. package/dist/components/FormInfo/fields.js.map +1 -1
  45. package/dist/components/FormInfo/index.d.ts +4 -0
  46. package/dist/components/StateBar/StateBar.d.ts +19 -6
  47. package/dist/components/StateBar/StateBar.js +87 -50
  48. package/dist/components/StateBar/StateBar.js.map +1 -1
  49. package/dist/components/StateBar/style.module.scss.js +13 -10
  50. package/dist/components/StateBar/style.module.scss.js.map +1 -1
  51. package/dist/components/Tools/Inbox/InboxBell/InboxBell.d.ts +45 -0
  52. package/dist/components/Tools/Inbox/InboxBell/InboxBell.js +156 -0
  53. package/dist/components/Tools/Inbox/InboxBell/InboxBell.js.map +1 -0
  54. package/dist/components/Tools/Inbox/InboxBell/index.d.ts +2 -0
  55. package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js +30 -0
  56. package/dist/components/Tools/Inbox/InboxBell/style.module.scss.js.map +1 -0
  57. package/dist/components/Tools/Inbox/index.d.ts +2 -0
  58. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.d.ts +8 -0
  59. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js +56 -0
  60. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/List/columns.js.map +1 -0
  61. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.d.ts +8 -0
  62. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js +216 -0
  63. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/MessageTemplateAdmin.js.map +1 -0
  64. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.d.ts +26 -0
  65. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js +190 -0
  66. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/Modal/TemplateFormModal.js.map +1 -0
  67. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/index.d.ts +3 -0
  68. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js +12 -0
  69. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/style.module.scss.js.map +1 -0
  70. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.d.ts +76 -0
  71. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js +26 -0
  72. package/dist/components/Tools/MessageCenter/MessageTemplateAdmin/types.js.map +1 -0
  73. package/dist/components/Tools/MessageCenter/index.d.ts +3 -0
  74. package/dist/components/Tools/MessageCenter/utils/templateCode.d.ts +8 -0
  75. package/dist/components/Tools/MessageCenter/utils/templateCode.js +25 -0
  76. package/dist/components/Tools/MessageCenter/utils/templateCode.js.map +1 -0
  77. package/dist/components/Tools/index.d.ts +5 -0
  78. package/dist/components/index.d.ts +3 -0
  79. package/dist/editor.d.ts +5 -0
  80. package/dist/editor.js +21 -0
  81. package/dist/editor.js.map +1 -0
  82. package/dist/form-info.js +33 -29
  83. package/dist/form-info.js.map +1 -1
  84. package/dist/index.d.ts +5 -0
  85. package/dist/index.js +805 -773
  86. package/dist/index.js.map +1 -1
  87. package/dist/marsun-components-core.css +4 -1
  88. package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +301 -0
  89. package/dist/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js.map +1 -0
  90. package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1256 -0
  91. package/dist/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js.map +1 -0
  92. package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js +2107 -0
  93. package/dist/node_modules/@ckeditor/ckeditor5-core/dist/index.js.map +1 -0
  94. package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +259 -0
  95. package/dist/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js.map +1 -0
  96. package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +23990 -0
  97. package/dist/node_modules/@ckeditor/ckeditor5-engine/dist/index.js.map +1 -0
  98. package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +249 -0
  99. package/dist/node_modules/@ckeditor/ckeditor5-enter/dist/index.js.map +1 -0
  100. package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +47 -0
  101. package/dist/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js.map +1 -0
  102. package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js +100 -0
  103. package/dist/node_modules/@ckeditor/ckeditor5-font/dist/index.js.map +1 -0
  104. package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +31 -0
  105. package/dist/node_modules/@ckeditor/ckeditor5-icons/dist/index.js.map +1 -0
  106. package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js +194 -0
  107. package/dist/node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js.map +1 -0
  108. package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js +2042 -0
  109. package/dist/node_modules/@ckeditor/ckeditor5-list/dist/index.js.map +1 -0
  110. package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +9 -0
  111. package/dist/node_modules/@ckeditor/ckeditor5-mention/dist/index.js.map +1 -0
  112. package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +167 -0
  113. package/dist/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js.map +1 -0
  114. package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js +471 -0
  115. package/dist/node_modules/@ckeditor/ckeditor5-react/dist/index.js.map +1 -0
  116. package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +139 -0
  117. package/dist/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js.map +1 -0
  118. package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +755 -0
  119. package/dist/node_modules/@ckeditor/ckeditor5-typing/dist/index.js.map +1 -0
  120. package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +7838 -0
  121. package/dist/node_modules/@ckeditor/ckeditor5-ui/dist/index.js.map +1 -0
  122. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js +422 -0
  123. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/conversions.js.map +1 -0
  124. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js +33 -0
  125. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/index.js.map +1 -0
  126. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js +47 -0
  127. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-convert/route.js.map +1 -0
  128. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js +156 -0
  129. package/dist/node_modules/@ckeditor/ckeditor5-ui/node_modules/color-name/index.js.map +1 -0
  130. package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +313 -0
  131. package/dist/node_modules/@ckeditor/ckeditor5-undo/dist/index.js.map +1 -0
  132. package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +2942 -0
  133. package/dist/node_modules/@ckeditor/ckeditor5-utils/dist/index.js.map +1 -0
  134. package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +892 -0
  135. package/dist/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js.map +1 -0
  136. package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1047 -0
  137. package/dist/node_modules/@ckeditor/ckeditor5-widget/dist/index.js.map +1 -0
  138. package/dist/node_modules/color-parse/node_modules/color-name/index.js +153 -0
  139. package/dist/node_modules/color-parse/node_modules/color-name/index.js.map +1 -0
  140. package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js +7 -0
  141. package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js.map +1 -0
  142. package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js +7 -0
  143. package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js.map +1 -0
  144. package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js +7 -0
  145. package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeToWriteProperty.js.map +1 -0
  146. package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js +9 -0
  147. package/dist/node_modules/es-toolkit/dist/compat/_internal/assignValue.js.map +1 -0
  148. package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +7 -0
  149. package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js.map +1 -0
  150. package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js +7 -0
  151. package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js.map +1 -0
  152. package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +16 -0
  153. package/dist/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js.map +1 -0
  154. package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js +15 -0
  155. package/dist/node_modules/es-toolkit/dist/compat/_internal/isIndex.js.map +1 -0
  156. package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js +9 -0
  157. package/dist/node_modules/es-toolkit/dist/compat/_internal/isKey.js.map +1 -0
  158. package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +8 -0
  159. package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js.map +1 -0
  160. package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js +30 -0
  161. package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js.map +1 -0
  162. package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js +8 -0
  163. package/dist/node_modules/es-toolkit/dist/compat/_internal/toKey.js.map +1 -0
  164. package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js +17 -0
  165. package/dist/node_modules/es-toolkit/dist/compat/function/debounce.js.map +1 -0
  166. package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js +13 -0
  167. package/dist/node_modules/es-toolkit/dist/compat/function/throttle.js.map +1 -0
  168. package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js +17 -0
  169. package/dist/node_modules/es-toolkit/dist/compat/object/assignIn.js.map +1 -0
  170. package/dist/node_modules/es-toolkit/dist/compat/object/clone.js +102 -0
  171. package/dist/node_modules/es-toolkit/dist/compat/object/clone.js.map +1 -0
  172. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +8 -0
  173. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js.map +1 -0
  174. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +33 -0
  175. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js.map +1 -0
  176. package/dist/node_modules/es-toolkit/dist/compat/object/get.js +39 -0
  177. package/dist/node_modules/es-toolkit/dist/compat/object/get.js.map +1 -0
  178. package/dist/node_modules/es-toolkit/dist/compat/object/has.js +21 -0
  179. package/dist/node_modules/es-toolkit/dist/compat/object/has.js.map +1 -0
  180. package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js +33 -0
  181. package/dist/node_modules/es-toolkit/dist/compat/object/keysIn.js.map +1 -0
  182. package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js +10 -0
  183. package/dist/node_modules/es-toolkit/dist/compat/object/mapValues.js.map +1 -0
  184. package/dist/node_modules/es-toolkit/dist/compat/object/merge.js +9 -0
  185. package/dist/node_modules/es-toolkit/dist/compat/object/merge.js.map +1 -0
  186. package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js +53 -0
  187. package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js.map +1 -0
  188. package/dist/node_modules/es-toolkit/dist/compat/object/property.js +10 -0
  189. package/dist/node_modules/es-toolkit/dist/compat/object/property.js.map +1 -0
  190. package/dist/node_modules/es-toolkit/dist/compat/object/set.js +9 -0
  191. package/dist/node_modules/es-toolkit/dist/compat/object/set.js.map +1 -0
  192. package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js +31 -0
  193. package/dist/node_modules/es-toolkit/dist/compat/object/updateWith.js.map +1 -0
  194. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +8 -0
  195. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js.map +1 -0
  196. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js +7 -0
  197. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js.map +1 -0
  198. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +8 -0
  199. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js.map +1 -0
  200. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js +9 -0
  201. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js.map +1 -0
  202. package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js +9 -0
  203. package/dist/node_modules/es-toolkit/dist/compat/predicate/isElement.js.map +1 -0
  204. package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js +15 -0
  205. package/dist/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js.map +1 -0
  206. package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js +7 -0
  207. package/dist/node_modules/es-toolkit/dist/compat/predicate/isFunction.js.map +1 -0
  208. package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js +9 -0
  209. package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatch.js.map +1 -0
  210. package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js +81 -0
  211. package/dist/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.js.map +1 -0
  212. package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js +7 -0
  213. package/dist/node_modules/es-toolkit/dist/compat/predicate/isObject.js.map +1 -0
  214. package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +7 -0
  215. package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js.map +1 -0
  216. package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +16 -0
  217. package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js.map +1 -0
  218. package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js +7 -0
  219. package/dist/node_modules/es-toolkit/dist/compat/predicate/isString.js.map +1 -0
  220. package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js +7 -0
  221. package/dist/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js.map +1 -0
  222. package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js +8 -0
  223. package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js.map +1 -0
  224. package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js +9 -0
  225. package/dist/node_modules/es-toolkit/dist/compat/predicate/matches.js.map +1 -0
  226. package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +23 -0
  227. package/dist/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js.map +1 -0
  228. package/dist/node_modules/es-toolkit/dist/compat/util/eq.js +7 -0
  229. package/dist/node_modules/es-toolkit/dist/compat/util/eq.js.map +1 -0
  230. package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js +19 -0
  231. package/dist/node_modules/es-toolkit/dist/compat/util/iteratee.js.map +1 -0
  232. package/dist/node_modules/es-toolkit/dist/compat/util/times.js +11 -0
  233. package/dist/node_modules/es-toolkit/dist/compat/util/times.js.map +1 -0
  234. package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js +8 -0
  235. package/dist/node_modules/es-toolkit/dist/compat/util/toFinite.js.map +1 -0
  236. package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js +9 -0
  237. package/dist/node_modules/es-toolkit/dist/compat/util/toInteger.js.map +1 -0
  238. package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js +8 -0
  239. package/dist/node_modules/es-toolkit/dist/compat/util/toNumber.js.map +1 -0
  240. package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js +37 -0
  241. package/dist/node_modules/es-toolkit/dist/compat/util/toPath.js.map +1 -0
  242. package/dist/node_modules/es-toolkit/dist/compat/util/toString.js +15 -0
  243. package/dist/node_modules/es-toolkit/dist/compat/util/toString.js.map +1 -0
  244. package/dist/node_modules/es-toolkit/dist/function/after.js +11 -0
  245. package/dist/node_modules/es-toolkit/dist/function/after.js.map +1 -0
  246. package/dist/node_modules/es-toolkit/dist/function/debounce.js +30 -0
  247. package/dist/node_modules/es-toolkit/dist/function/debounce.js.map +1 -0
  248. package/dist/node_modules/es-toolkit/dist/function/identity.js +7 -0
  249. package/dist/node_modules/es-toolkit/dist/function/identity.js.map +1 -0
  250. package/dist/node_modules/es-toolkit/dist/function/noop.js +6 -0
  251. package/dist/node_modules/es-toolkit/dist/function/noop.js.map +1 -0
  252. package/dist/node_modules/es-toolkit/dist/object/clone.js +27 -0
  253. package/dist/node_modules/es-toolkit/dist/object/clone.js.map +1 -0
  254. package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js +8 -0
  255. package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js.map +1 -0
  256. package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js +121 -0
  257. package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js.map +1 -0
  258. package/dist/node_modules/es-toolkit/dist/object/mapValues.js +12 -0
  259. package/dist/node_modules/es-toolkit/dist/object/mapValues.js.map +1 -0
  260. package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js +8 -0
  261. package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js.map +1 -0
  262. package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js +9 -0
  263. package/dist/node_modules/es-toolkit/dist/predicate/isEqual.js.map +1 -0
  264. package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js +110 -0
  265. package/dist/node_modules/es-toolkit/dist/predicate/isEqualWith.js.map +1 -0
  266. package/dist/node_modules/es-toolkit/dist/predicate/isLength.js +7 -0
  267. package/dist/node_modules/es-toolkit/dist/predicate/isLength.js.map +1 -0
  268. package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js +9 -0
  269. package/dist/node_modules/es-toolkit/dist/predicate/isPlainObject.js.map +1 -0
  270. package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js +7 -0
  271. package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js.map +1 -0
  272. package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js +7 -0
  273. package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js.map +1 -0
  274. package/dist/styles/global.css +4 -1
  275. package/dist/utils/copyText.d.ts +4 -0
  276. package/dist/utils/copyText.js +21 -0
  277. package/dist/utils/copyText.js.map +1 -0
  278. package/package.json +9 -2
@@ -0,0 +1,2942 @@
1
+ var Ut = Object.defineProperty;
2
+ var Ht = (e, t, n) => t in e ? Ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var h = (e, t, n) => Ht(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { isPlainObject as P } from "../../../es-toolkit/dist/compat/predicate/isPlainObject.js";
5
+ import { isObject as $t } from "../../../es-toolkit/dist/compat/predicate/isObject.js";
6
+ import { cloneDeepWith as zt } from "../../../es-toolkit/dist/compat/object/cloneDeepWith.js";
7
+ import { isString as it } from "../../../es-toolkit/dist/compat/predicate/isString.js";
8
+ import { merge as Gt } from "../../../es-toolkit/dist/compat/object/merge.js";
9
+ import { isFunction as st } from "../../../es-toolkit/dist/compat/predicate/isFunction.js";
10
+ import { isElement as Tt } from "../../../es-toolkit/dist/compat/predicate/isElement.js";
11
+ /**
12
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
13
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
14
+ */
15
+ /**
16
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
17
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
18
+ */
19
+ let E;
20
+ try {
21
+ E = {
22
+ window,
23
+ document
24
+ };
25
+ } catch {
26
+ /* v8 ignore start -- @preserve */
27
+ E = {
28
+ window: {},
29
+ document: {}
30
+ };
31
+ }
32
+ /**
33
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
34
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
35
+ */
36
+ function Yt() {
37
+ try {
38
+ return navigator.userAgent.toLowerCase();
39
+ } catch {
40
+ return "";
41
+ }
42
+ }
43
+ const R = /* @__PURE__ */ Yt(), S = {
44
+ isMac: /* @__PURE__ */ xt(R),
45
+ isWindows: /* @__PURE__ */ qt(R),
46
+ isGecko: /* @__PURE__ */ Xt(R),
47
+ isSafari: /* @__PURE__ */ Jt(R),
48
+ isiOS: /* @__PURE__ */ Qt(R),
49
+ isAndroid: /* @__PURE__ */ Zt(R),
50
+ isBlink: /* @__PURE__ */ te(R)
51
+ };
52
+ function xt(e) {
53
+ return e.indexOf("macintosh") > -1;
54
+ }
55
+ function qt(e) {
56
+ return e.indexOf("windows") > -1;
57
+ }
58
+ function Xt(e) {
59
+ return !!e.match(/gecko\/\d+/);
60
+ }
61
+ function Jt(e) {
62
+ return e.indexOf(" applewebkit/") > -1 && e.indexOf("chrome") === -1;
63
+ }
64
+ function Qt(e) {
65
+ return !!e.match(/iphone|ipad/i) || xt(e) && navigator.maxTouchPoints > 0;
66
+ }
67
+ function Zt(e) {
68
+ return e.indexOf("android") > -1;
69
+ }
70
+ function te(e) {
71
+ return e.indexOf("chrome/") > -1 && e.indexOf("edge/") < 0;
72
+ }
73
+ /**
74
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
75
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
76
+ */
77
+ function ee(e, t, n, i) {
78
+ n = n || function(l, a) {
79
+ return l === a;
80
+ };
81
+ const s = Array.isArray(e) ? e : Array.prototype.slice.call(e), o = Array.isArray(t) ? t : Array.prototype.slice.call(t), r = ne(s, o, n);
82
+ return i ? se(r, o.length) : ie(o, r);
83
+ }
84
+ function ne(e, t, n) {
85
+ const i = ot(e, t, n);
86
+ if (i === -1) return {
87
+ firstIndex: -1,
88
+ lastIndexOld: -1,
89
+ lastIndexNew: -1
90
+ };
91
+ const s = ot(rt(e, i), rt(t, i), n);
92
+ return {
93
+ firstIndex: i,
94
+ lastIndexOld: e.length - s,
95
+ lastIndexNew: t.length - s
96
+ };
97
+ }
98
+ function ot(e, t, n) {
99
+ for (let i = 0; i < Math.max(e.length, t.length); i++) if (e[i] === void 0 || t[i] === void 0 || !n(e[i], t[i])) return i;
100
+ return -1;
101
+ }
102
+ function rt(e, t) {
103
+ return e.slice(t).reverse();
104
+ }
105
+ function ie(e, t) {
106
+ const n = [], { firstIndex: i, lastIndexOld: s, lastIndexNew: o } = t;
107
+ return o - i > 0 && n.push({
108
+ index: i,
109
+ type: "insert",
110
+ values: e.slice(i, o)
111
+ }), s - i > 0 && n.push({
112
+ index: i + (o - i),
113
+ type: "delete",
114
+ howMany: s - i
115
+ }), n;
116
+ }
117
+ function se(e, t) {
118
+ const { firstIndex: n, lastIndexOld: i, lastIndexNew: s } = e;
119
+ if (n === -1) return Array(t).fill("equal");
120
+ let o = [];
121
+ return n > 0 && (o = o.concat(Array(n).fill("equal"))), s - n > 0 && (o = o.concat(Array(s - n).fill("insert"))), i - n > 0 && (o = o.concat(Array(i - n).fill("delete"))), s < t && (o = o.concat(Array(t - s).fill("equal"))), o;
122
+ }
123
+ /**
124
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
125
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
126
+ */
127
+ const It = function(e, t, n) {
128
+ n = n || function(b, x) {
129
+ return b === x;
130
+ };
131
+ const i = e.length, s = t.length;
132
+ if (i > 200 || s > 200 || i + s > 300) return It.fastDiff(e, t, n, !0);
133
+ let o, r;
134
+ if (s < i) {
135
+ const b = e;
136
+ e = t, t = b, o = "delete", r = "insert";
137
+ } else
138
+ o = "insert", r = "delete";
139
+ const l = e.length, a = t.length, c = a - l, u = {}, f = {};
140
+ function d(b) {
141
+ const x = (f[b - 1] !== void 0 ? f[b - 1] : -1) + 1, L = f[b + 1] !== void 0 ? f[b + 1] : -1, nt = x > L ? -1 : 1;
142
+ u[b + nt] && (u[b] = u[b + nt].slice(0)), u[b] || (u[b] = []), u[b].push(x > L ? o : r);
143
+ let M = Math.max(x, L), j = M - b;
144
+ for (; j < l && M < a && n(e[j], t[M]); )
145
+ j++, M++, u[b].push("equal");
146
+ return M;
147
+ }
148
+ let _ = 0, m;
149
+ do {
150
+ for (m = -_; m < c; m++) f[m] = d(m);
151
+ for (m = c + _; m > c; m--) f[m] = d(m);
152
+ f[c] = d(c), _++;
153
+ } while (f[c] !== a);
154
+ return u[c].slice(1);
155
+ };
156
+ It.fastDiff = ee;
157
+ /**
158
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
159
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
160
+ */
161
+ function ct() {
162
+ return function e() {
163
+ e.called = !0;
164
+ };
165
+ }
166
+ /**
167
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
168
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
169
+ */
170
+ var $ = class {
171
+ /**
172
+ * @param source The emitter.
173
+ * @param name The event name.
174
+ */
175
+ constructor(e, t) {
176
+ /**
177
+ * The object that fired the event.
178
+ */
179
+ h(this, "source");
180
+ /**
181
+ * The event name.
182
+ */
183
+ h(this, "name");
184
+ /**
185
+ * Path this event has followed. See {@link module:utils/emittermixin~Emitter#delegate}.
186
+ */
187
+ h(this, "path");
188
+ /**
189
+ * Stops the event emitter to call further callbacks for this event interaction.
190
+ */
191
+ h(this, "stop");
192
+ /**
193
+ * Removes the current callback from future interactions of this event.
194
+ */
195
+ h(this, "off");
196
+ /**
197
+ * The value which will be returned by {@link module:utils/emittermixin~Emitter#fire}.
198
+ *
199
+ * It's `undefined` by default and can be changed by an event listener:
200
+ *
201
+ * ```ts
202
+ * dataController.fire( 'getSelectedContent', ( evt ) => {
203
+ * // This listener will make `dataController.fire( 'getSelectedContent' )`
204
+ * // always return an empty DocumentFragment.
205
+ * evt.return = new DocumentFragment();
206
+ *
207
+ * // Make sure no other listeners are executed.
208
+ * evt.stop();
209
+ * } );
210
+ * ```
211
+ */
212
+ h(this, "return");
213
+ this.source = e, this.name = t, this.path = [], this.stop = ct(), this.off = ct();
214
+ }
215
+ };
216
+ /**
217
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
218
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
219
+ */
220
+ const y = new Array(256).fill("").map((e, t) => ("0" + t.toString(16)).slice(-2));
221
+ function X() {
222
+ const [e, t, n, i] = crypto.getRandomValues(/* @__PURE__ */ new Uint32Array(4));
223
+ return "e" + y[e >> 0 & 255] + y[e >> 8 & 255] + y[e >> 16 & 255] + y[e >> 24 & 255] + y[t >> 0 & 255] + y[t >> 8 & 255] + y[t >> 16 & 255] + y[t >> 24 & 255] + y[n >> 0 & 255] + y[n >> 8 & 255] + y[n >> 16 & 255] + y[n >> 24 & 255] + y[i >> 0 & 255] + y[i >> 8 & 255] + y[i >> 16 & 255] + y[i >> 24 & 255];
224
+ }
225
+ /**
226
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
227
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
228
+ */
229
+ const z = {
230
+ get(e = "normal") {
231
+ return typeof e != "number" ? this[e] || this.normal : e;
232
+ },
233
+ highest: 1e5,
234
+ high: 1e3,
235
+ normal: 0,
236
+ low: -1e3,
237
+ lowest: -1e5
238
+ };
239
+ /**
240
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
241
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
242
+ */
243
+ function oe(e, t) {
244
+ const n = z.get(t.priority);
245
+ let i = 0, s = e.length;
246
+ for (; i < s; ) {
247
+ const o = i + s >> 1;
248
+ z.get(e[o].priority) < n ? s = o : i = o + 1;
249
+ }
250
+ e.splice(i, 0, t);
251
+ }
252
+ /**
253
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
254
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
255
+ */
256
+ const re = "https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";
257
+ var g = class vt extends Error {
258
+ /**
259
+ * Creates an instance of the CKEditorError class.
260
+ *
261
+ * @param errorName The error id in an `error-name` format. A link to this error documentation page will be added
262
+ * to the thrown error's `message`.
263
+ * @param context A context of the error by which the {@link module:watchdog/watchdog~Watchdog watchdog}
264
+ * is able to determine which editor crashed. It should be an editor instance or a property connected to it. It can be also
265
+ * a `null` value if the editor should not be restarted in case of the error (e.g. during the editor initialization).
266
+ * The error context should be checked using the `areConnectedThroughProperties( editor, context )` utility
267
+ * to check if the object works as the context.
268
+ * @param data Additional data describing the error. A stringified version of this object
269
+ * will be appended to the error message, so the data are quickly visible in the console. The original
270
+ * data object will also be later available under the {@link #data} property.
271
+ * @param originalError An optional original error that is being wrapped in the `CKEditorError` instance.
272
+ */
273
+ constructor(n, i, s, o) {
274
+ super(ce(n, s, o));
275
+ /**
276
+ * A context of the error by which the Watchdog is able to determine which editor crashed.
277
+ */
278
+ h(this, "context");
279
+ /**
280
+ * The additional error data passed to the constructor. Undefined if none was passed.
281
+ */
282
+ h(this, "data");
283
+ this.name = "CKEditorError", this.context = i, this.data = s, o && (this.stack = o.stack);
284
+ }
285
+ /**
286
+ * Checks if the error is of the `CKEditorError` type.
287
+ */
288
+ is(n) {
289
+ return n === "CKEditorError";
290
+ }
291
+ /**
292
+ * A utility that ensures that the thrown error is a {@link module:utils/ckeditorerror~CKEditorError} one.
293
+ * It is useful when combined with the {@link module:watchdog/watchdog~Watchdog} feature, which can restart the editor in case
294
+ * of a {@link module:utils/ckeditorerror~CKEditorError} error.
295
+ *
296
+ * @param error The error to rethrow.
297
+ * @param context An object connected through properties with the editor instance. This context will be used
298
+ * by the watchdog to verify which editor should be restarted.
299
+ */
300
+ static rethrowUnexpectedError(n, i) {
301
+ throw n.is && n.is("CKEditorError") ? n : new vt("unexpected-error", i, void 0, n);
302
+ }
303
+ };
304
+ function wn(e, t) {
305
+ console.warn(...At(e, t));
306
+ }
307
+ function yn(e, t) {
308
+ console.error(...At(e, t));
309
+ }
310
+ function Rt(e) {
311
+ return `
312
+ Read more: ${re}#error-${e}`;
313
+ }
314
+ function ce(e, t, n) {
315
+ const i = /* @__PURE__ */ new WeakSet(), o = t ? ` ${JSON.stringify(t, (a, c) => {
316
+ if (typeof c == "object" && c !== null) {
317
+ if (i.has(c)) return `[object ${c.constructor.name}]`;
318
+ i.add(c);
319
+ }
320
+ return c;
321
+ })}` : "", r = Rt(e), l = n ? `
322
+ Original error: ${n.name}: ${n.message}` : "";
323
+ return e + o + r + l;
324
+ }
325
+ function At(e, t) {
326
+ const n = Rt(e);
327
+ return t ? [
328
+ e,
329
+ t,
330
+ n
331
+ ] : [e, n];
332
+ }
333
+ /**
334
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
335
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
336
+ */
337
+ const le = "48.5.1", En = new Date(2026, 5, 2);
338
+ /* v8 ignore next -- @preserve */
339
+ if (globalThis.CKEDITOR_VERSION)
340
+ throw new g("ckeditor-duplicated-modules", null);
341
+ globalThis.CKEDITOR_VERSION = le;
342
+ /**
343
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
344
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
345
+ */
346
+ const k = Symbol("listeningTo"), G = Symbol("emitterId"), I = Symbol("delegations"), ae = /* @__PURE__ */ C(Object);
347
+ function C(e) {
348
+ if (!e) return ae;
349
+ class t extends e {
350
+ on(i, s, o) {
351
+ this.listenTo(this, i, s, o);
352
+ }
353
+ once(i, s, o) {
354
+ let r = !1;
355
+ const l = (a, ...c) => {
356
+ r || (r = !0, a.off(), s.call(this, a, ...c));
357
+ };
358
+ this.listenTo(this, i, l, o);
359
+ }
360
+ off(i, s) {
361
+ this.stopListening(this, i, s);
362
+ }
363
+ listenTo(i, s, o, r = {}) {
364
+ let l, a;
365
+ this[k] || (this[k] = {});
366
+ const c = this[k];
367
+ W(i) || Ct(i);
368
+ const u = W(i);
369
+ (l = c[u]) || (l = c[u] = {
370
+ emitter: i,
371
+ callbacks: {}
372
+ }), (a = l.callbacks[s]) || (a = l.callbacks[s] = []), a.push(o), pe(this, i, s, o, r);
373
+ }
374
+ stopListening(i, s, o) {
375
+ const r = this[k];
376
+ let l = i && W(i);
377
+ const a = r && l ? r[l] : void 0, c = a && s ? a.callbacks[s] : void 0;
378
+ if (!(!r || i && !a || s && !c))
379
+ if (o)
380
+ K(this, i, s, o), c.indexOf(o) !== -1 && (c.length === 1 ? delete a.callbacks[s] : K(this, i, s, o));
381
+ else if (c) {
382
+ for (; o = c.pop(); ) K(this, i, s, o);
383
+ delete a.callbacks[s];
384
+ } else if (a) {
385
+ for (s in a.callbacks) this.stopListening(i, s);
386
+ delete r[l];
387
+ } else {
388
+ for (l in r) this.stopListening(r[l].emitter);
389
+ delete this[k];
390
+ }
391
+ }
392
+ fire(i, ...s) {
393
+ try {
394
+ const o = i instanceof $ ? i : new $(this, i), r = o.name;
395
+ let l = de(this, r);
396
+ if (o.path.push(this), l) {
397
+ l = l.slice();
398
+ for (let c = 0; c < l.length; c++) {
399
+ const u = l[c].callback;
400
+ if (u.call(this, o, ...s), o.off.called && (delete o.off.called, this._removeEventListener(r, u)), o.stop.called) break;
401
+ }
402
+ }
403
+ const a = this[I];
404
+ if (a) {
405
+ const c = a.get(r), u = a.get("*");
406
+ c && lt(c, o, s), u && lt(u, o, s);
407
+ }
408
+ return o.return;
409
+ } catch (o) {
410
+ /* v8 ignore next -- @preserve */
411
+ g.rethrowUnexpectedError(o, this);
412
+ }
413
+ }
414
+ delegate(...i) {
415
+ return { to: (s, o) => {
416
+ this[I] || (this[I] = /* @__PURE__ */ new Map()), i.forEach((r) => {
417
+ const l = this[I].get(r);
418
+ l ? l.set(s, o) : this[I].set(r, /* @__PURE__ */ new Map([[s, o]]));
419
+ });
420
+ } };
421
+ }
422
+ stopDelegating(i, s) {
423
+ if (this[I])
424
+ if (!i) this[I].clear();
425
+ else if (!s) this[I].delete(i);
426
+ else {
427
+ const o = this[I].get(i);
428
+ o && o.delete(s);
429
+ }
430
+ }
431
+ _addEventListener(i, s, o) {
432
+ he(this, i);
433
+ const r = Y(this, i), l = {
434
+ callback: s,
435
+ priority: z.get(o.priority)
436
+ };
437
+ for (const a of r) oe(a, l);
438
+ }
439
+ _removeEventListener(i, s) {
440
+ const o = Y(this, i);
441
+ for (const r of o) for (let l = 0; l < r.length; l++) r[l].callback == s && (r.splice(l, 1), l--);
442
+ }
443
+ }
444
+ return t;
445
+ }
446
+ function ue(e, t) {
447
+ const n = e[k];
448
+ return n && n[t] ? n[t].emitter : null;
449
+ }
450
+ function Ct(e, t) {
451
+ e[G] || (e[G] = t || X());
452
+ }
453
+ function W(e) {
454
+ return e[G];
455
+ }
456
+ function Lt(e) {
457
+ return e._events || Object.defineProperty(e, "_events", { value: {} }), e._events;
458
+ }
459
+ function fe() {
460
+ return {
461
+ callbacks: [],
462
+ childEvents: []
463
+ };
464
+ }
465
+ function he(e, t) {
466
+ const n = Lt(e);
467
+ if (n[t]) return;
468
+ let i = t, s = null;
469
+ const o = [];
470
+ for (; i !== "" && !n[i]; )
471
+ n[i] = fe(), o.push(n[i]), s && n[i].childEvents.push(s), s = i, i = i.substr(0, i.lastIndexOf(":"));
472
+ if (i !== "") {
473
+ for (const r of o) r.callbacks = n[i].callbacks.slice();
474
+ n[i].childEvents.push(s);
475
+ }
476
+ }
477
+ function Y(e, t) {
478
+ const n = Lt(e)[t];
479
+ if (!n) return [];
480
+ let i = [n.callbacks];
481
+ for (let s = 0; s < n.childEvents.length; s++) {
482
+ const o = Y(e, n.childEvents[s]);
483
+ i = i.concat(o);
484
+ }
485
+ return i;
486
+ }
487
+ function de(e, t) {
488
+ if (!e._events) return null;
489
+ let n = t;
490
+ do {
491
+ const i = e._events[n];
492
+ if (i && i.callbacks && i.callbacks.length) return i.callbacks;
493
+ const s = n.lastIndexOf(":");
494
+ n = s > -1 ? n.substring(0, s) : "";
495
+ } while (n);
496
+ return null;
497
+ }
498
+ function lt(e, t, n) {
499
+ for (let [i, s] of e) {
500
+ s ? typeof s == "function" && (s = s(t.name)) : s = t.name;
501
+ const o = new $(t.source, s);
502
+ o.path = [...t.path], i.fire(o, ...n);
503
+ }
504
+ }
505
+ function pe(e, t, n, i, s) {
506
+ t._addEventListener ? t._addEventListener(n, i, s) : e._addEventListener.call(t, n, i, s);
507
+ }
508
+ function K(e, t, n, i) {
509
+ t._removeEventListener ? t._removeEventListener(n, i) : e._removeEventListener.call(t, n, i);
510
+ }
511
+ /**
512
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
513
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
514
+ */
515
+ const B = Symbol("observableProperties"), O = Symbol("boundObservables"), N = Symbol("boundProperties"), A = Symbol("decoratedMethods"), at = Symbol("decoratedOriginal"), ge = /* @__PURE__ */ kt(/* @__PURE__ */ C());
516
+ function kt(e) {
517
+ var n, i, s, o, r;
518
+ if (!e) return ge;
519
+ class t extends (r = e, o = B, s = A, i = N, n = O, r) {
520
+ constructor() {
521
+ super(...arguments);
522
+ h(this, o);
523
+ h(this, s);
524
+ h(this, i);
525
+ h(this, n);
526
+ }
527
+ set(c, u) {
528
+ if ($t(c)) {
529
+ Object.keys(c).forEach((d) => {
530
+ this.set(d, c[d]);
531
+ }, this);
532
+ return;
533
+ }
534
+ U(this);
535
+ const f = this[B];
536
+ if (c in this && !f.has(c))
537
+ throw new g("observable-set-cannot-override", this);
538
+ Object.defineProperty(this, c, {
539
+ enumerable: !0,
540
+ configurable: !0,
541
+ get() {
542
+ return f.get(c);
543
+ },
544
+ set(d) {
545
+ const _ = f.get(c);
546
+ let m = this.fire(`set:${c}`, c, d, _);
547
+ m === void 0 && (m = d), (_ !== m || !f.has(c)) && (f.set(c, m), this.fire(`change:${c}`, c, m, _));
548
+ }
549
+ }), this[c] = u;
550
+ }
551
+ bind(...c) {
552
+ if (!c.length || !ut(c))
553
+ throw new g("observable-bind-wrong-properties", this);
554
+ if (new Set(c).size !== c.length)
555
+ throw new g("observable-bind-duplicate-properties", this);
556
+ U(this);
557
+ const u = this[N];
558
+ c.forEach((d) => {
559
+ if (u.has(d))
560
+ throw new g("observable-bind-rebind", this);
561
+ });
562
+ const f = /* @__PURE__ */ new Map();
563
+ return c.forEach((d) => {
564
+ const _ = {
565
+ property: d,
566
+ to: []
567
+ };
568
+ u.set(d, _), f.set(d, _);
569
+ }), {
570
+ to: me,
571
+ toMany: be,
572
+ _observable: this,
573
+ _bindProperties: c,
574
+ _to: [],
575
+ _bindings: f
576
+ };
577
+ }
578
+ unbind(...c) {
579
+ if (!this[B]) return;
580
+ const u = this[N], f = this[O];
581
+ if (c.length) {
582
+ if (!ut(c))
583
+ throw new g("observable-unbind-wrong-properties", this);
584
+ c.forEach((d) => {
585
+ const _ = u.get(d);
586
+ _ && (_.to.forEach(([m, b]) => {
587
+ const x = f.get(m), L = x[b];
588
+ L.delete(_), L.size || delete x[b], Object.keys(x).length || (f.delete(m), this.stopListening(m, "change"));
589
+ }), u.delete(d));
590
+ });
591
+ } else
592
+ f.forEach((d, _) => {
593
+ this.stopListening(_, "change");
594
+ }), f.clear(), u.clear();
595
+ }
596
+ decorate(c) {
597
+ U(this);
598
+ const u = this[c];
599
+ if (!u)
600
+ throw new g("observablemixin-cannot-decorate-undefined", this, {
601
+ object: this,
602
+ methodName: c
603
+ });
604
+ this.on(c, (f, d) => {
605
+ f.return = u.apply(this, d);
606
+ }), this[c] = function(...f) {
607
+ return this.fire(c, f);
608
+ }, this[c][at] = u, this[A] || (this[A] = []), this[A].push(c);
609
+ }
610
+ stopListening(c, u, f) {
611
+ if (!c && this[A]) {
612
+ for (const d of this[A]) this[d] = this[d][at];
613
+ delete this[A];
614
+ }
615
+ super.stopListening(c, u, f);
616
+ }
617
+ }
618
+ return t;
619
+ }
620
+ function U(e) {
621
+ e[B] || (Object.defineProperty(e, B, { value: /* @__PURE__ */ new Map() }), Object.defineProperty(e, O, { value: /* @__PURE__ */ new Map() }), Object.defineProperty(e, N, { value: /* @__PURE__ */ new Map() }));
622
+ }
623
+ function me(...e) {
624
+ const t = we(...e), n = Array.from(this._bindings.keys()), i = n.length;
625
+ if (!t.callback && t.to.length > 1)
626
+ throw new g("observable-bind-to-no-callback", this);
627
+ if (i > 1 && t.callback)
628
+ throw new g("observable-bind-to-extra-callback", this);
629
+ t.to.forEach((s) => {
630
+ if (s.properties.length && s.properties.length !== i)
631
+ throw new g("observable-bind-to-properties-length", this);
632
+ s.properties.length || (s.properties = this._bindProperties);
633
+ }), this._to = t.to, t.callback && (this._bindings.get(n[0]).callback = t.callback), Te(this._observable, this._to), Ee(this), this._bindProperties.forEach((s) => {
634
+ St(this._observable, s);
635
+ });
636
+ }
637
+ function be(e, t, n) {
638
+ if (this._bindings.size > 1)
639
+ throw new g("observable-bind-to-many-not-one-binding", this);
640
+ this.to(..._e(e, t), n);
641
+ }
642
+ function _e(e, t) {
643
+ const n = e.map((i) => [i, t]);
644
+ return Array.prototype.concat.apply([], n);
645
+ }
646
+ function ut(e) {
647
+ return e.every((t) => typeof t == "string");
648
+ }
649
+ function we(...e) {
650
+ if (!e.length)
651
+ throw new g("observable-bind-to-parse-error", null);
652
+ const t = { to: [] };
653
+ let n;
654
+ return typeof e[e.length - 1] == "function" && (t.callback = e.pop()), e.forEach((i) => {
655
+ if (typeof i == "string") n.properties.push(i);
656
+ else if (typeof i == "object")
657
+ n = {
658
+ observable: i,
659
+ properties: []
660
+ }, t.to.push(n);
661
+ else throw new g("observable-bind-to-parse-error", null);
662
+ }), t;
663
+ }
664
+ function ye(e, t, n, i) {
665
+ const s = e[O], o = s.get(n), r = o || {};
666
+ r[i] || (r[i] = /* @__PURE__ */ new Set()), r[i].add(t), o || s.set(n, r);
667
+ }
668
+ function Ee(e) {
669
+ let t;
670
+ e._bindings.forEach((n, i) => {
671
+ e._to.forEach((s) => {
672
+ t = s.properties[n.callback ? 0 : e._bindProperties.indexOf(i)], n.to.push([s.observable, t]), ye(e._observable, n, s.observable, t);
673
+ });
674
+ });
675
+ }
676
+ function St(e, t) {
677
+ const n = e[N].get(t);
678
+ let i;
679
+ n.callback ? i = n.callback.apply(e, n.to.map((s) => s[0][s[1]])) : (i = n.to[0], i = i[0][i[1]]), Object.prototype.hasOwnProperty.call(e, t) ? e[t] = i : e.set(t, i);
680
+ }
681
+ function Te(e, t) {
682
+ t.forEach((n) => {
683
+ const i = e[O];
684
+ let s;
685
+ i.get(n.observable) || e.listenTo(n.observable, "change", (o, r) => {
686
+ s = i.get(n.observable)[r], s && s.forEach((l) => {
687
+ St(e, l.property);
688
+ });
689
+ });
690
+ });
691
+ }
692
+ /**
693
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
694
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
695
+ */
696
+ var Tn = class {
697
+ constructor() {
698
+ /**
699
+ * The elements replaced by {@link #replace} and their replacements.
700
+ */
701
+ h(this, "_replacedElements");
702
+ this._replacedElements = [];
703
+ }
704
+ /**
705
+ * Hides the `element` and, if specified, inserts the the given element next to it.
706
+ *
707
+ * The effect of this method can be reverted by {@link #restore}.
708
+ *
709
+ * @param element The element to replace.
710
+ * @param newElement The replacement element. If not passed, then the `element` will just be hidden.
711
+ */
712
+ replace(e, t) {
713
+ this._replacedElements.push({
714
+ element: e,
715
+ newElement: t
716
+ }), e.style.display = "none", t && e.parentNode.insertBefore(t, e.nextSibling);
717
+ }
718
+ /**
719
+ * Restores what {@link #replace} did.
720
+ */
721
+ restore() {
722
+ this._replacedElements.forEach(({ element: e, newElement: t }) => {
723
+ e.style.display = "", t && t.remove();
724
+ }), this._replacedElements = [];
725
+ }
726
+ };
727
+ /**
728
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
729
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
730
+ */
731
+ function xn(e) {
732
+ let t = 0;
733
+ for (const n of e) t++;
734
+ return t;
735
+ }
736
+ /**
737
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
738
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
739
+ */
740
+ function In(e, t) {
741
+ const n = Math.min(e.length, t.length);
742
+ for (let i = 0; i < n; i++) if (e[i] != t[i]) return i;
743
+ return e.length == t.length ? "same" : e.length < t.length ? "prefix" : "extension";
744
+ }
745
+ /**
746
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
747
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
748
+ */
749
+ function J(e) {
750
+ return !!(e && e[Symbol.iterator]);
751
+ }
752
+ /**
753
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
754
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
755
+ */
756
+ function vn(e, t, n = {}, i = []) {
757
+ const s = n && n.xmlns, o = s ? e.createElementNS(s, t) : e.createElement(t);
758
+ for (const r in n) o.setAttribute(r, n[r]);
759
+ (it(i) || !J(i)) && (i = [i]);
760
+ for (let r of i)
761
+ it(r) && (r = e.createTextNode(r)), o.appendChild(r);
762
+ return o;
763
+ }
764
+ /**
765
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
766
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
767
+ */
768
+ var Rn = class {
769
+ /**
770
+ * Creates an instance of the {@link ~Config} class.
771
+ *
772
+ * @param configurations The initial configurations to be set. Usually, provided by the user.
773
+ * @param defaultConfigurations The default configurations. Usually, provided by the system.
774
+ */
775
+ constructor(e, t) {
776
+ /**
777
+ * Store for the whole configuration.
778
+ */
779
+ h(this, "_config");
780
+ this._config = /* @__PURE__ */ Object.create(null), t && this.define(ft(t)), e && this._setObjectToTarget(this._config, e);
781
+ }
782
+ set(e, t) {
783
+ this._setToTarget(this._config, e, t);
784
+ }
785
+ define(e, t) {
786
+ this._setToTarget(this._config, e, t, !0);
787
+ }
788
+ /**
789
+ * Gets the value for a configuration entry.
790
+ *
791
+ * ```ts
792
+ * config.get( 'name' );
793
+ * ```
794
+ *
795
+ * Deep configurations can be retrieved by separating each part with a dot.
796
+ *
797
+ * ```ts
798
+ * config.get( 'toolbar.collapsed' );
799
+ * ```
800
+ *
801
+ * @param name The configuration name. Configuration names are case-sensitive.
802
+ * @returns The configuration value or `undefined` if the configuration entry was not found.
803
+ */
804
+ get(e) {
805
+ return this._getFromSource(this._config, e);
806
+ }
807
+ /**
808
+ * Iterates over all top level configuration names.
809
+ */
810
+ *names() {
811
+ for (const e of Object.keys(this._config)) yield e;
812
+ }
813
+ /**
814
+ * Saves passed configuration to the specified target (nested object).
815
+ *
816
+ * @param target Nested config object.
817
+ * @param name The configuration name or an object from which take properties as
818
+ * configuration entries. Configuration names are case-sensitive.
819
+ * @param value The configuration value. Used if a name is passed.
820
+ * @param isDefine Define if passed configuration should overwrite existing one.
821
+ */
822
+ _setToTarget(e, t, n, i = !1) {
823
+ if (P(t)) {
824
+ this._setObjectToTarget(e, t, i);
825
+ return;
826
+ }
827
+ const s = t.split(".");
828
+ t = s.pop();
829
+ for (const o of s)
830
+ P(e[o]) || (e[o] = /* @__PURE__ */ Object.create(null)), e = e[o];
831
+ if (P(n)) {
832
+ P(e[t]) || (e[t] = /* @__PURE__ */ Object.create(null)), e = e[t], this._setObjectToTarget(e, n, i);
833
+ return;
834
+ }
835
+ i && typeof e[t] < "u" || (e[t] = n);
836
+ }
837
+ /**
838
+ * Get specified configuration from specified source (nested object).
839
+ *
840
+ * @param source level of nested object.
841
+ * @param name The configuration name. Configuration names are case-sensitive.
842
+ * @returns The configuration value or `undefined` if the configuration entry was not found.
843
+ */
844
+ _getFromSource(e, t) {
845
+ const n = t.split(".");
846
+ t = n.pop();
847
+ for (const i of n) {
848
+ if (!P(e[i])) {
849
+ e = null;
850
+ break;
851
+ }
852
+ e = e[i];
853
+ }
854
+ return e ? ft(e[t]) : void 0;
855
+ }
856
+ /**
857
+ * Iterates through passed object and calls {@link #_setToTarget} method with object key and value for each property.
858
+ *
859
+ * @param target Nested config object.
860
+ * @param configuration Configuration data set
861
+ * @param isDefine Defines if passed configuration is default configuration or not.
862
+ */
863
+ _setObjectToTarget(e, t, n) {
864
+ Object.keys(t).forEach((i) => {
865
+ this._setToTarget(e, i, t[i], n);
866
+ });
867
+ }
868
+ };
869
+ function ft(e) {
870
+ return zt(e, xe);
871
+ }
872
+ function xe(e) {
873
+ return Tt(e) || typeof e == "function" ? e : void 0;
874
+ }
875
+ /**
876
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
877
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
878
+ */
879
+ function ht(e) {
880
+ if (e) {
881
+ if (e.defaultView) return e instanceof e.defaultView.Document;
882
+ if (e.ownerDocument && e.ownerDocument.defaultView) return e instanceof e.ownerDocument.defaultView.Node;
883
+ }
884
+ return !1;
885
+ }
886
+ /**
887
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
888
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
889
+ */
890
+ function D(e) {
891
+ const t = Object.prototype.toString.apply(e);
892
+ return t == "[object Window]" || t == "[object global]";
893
+ }
894
+ /**
895
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
896
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
897
+ */
898
+ const Ie = /* @__PURE__ */ Q(/* @__PURE__ */ C()), ve = /* @__PURE__ */ C();
899
+ function Q(e) {
900
+ if (!e) return Ie;
901
+ class t extends e {
902
+ listenTo(i, s, o, r = {}) {
903
+ if (ht(i) || D(i) || i instanceof E.window.EventTarget) {
904
+ const l = {
905
+ capture: !!r.useCapture,
906
+ passive: !!r.usePassive
907
+ }, a = this._getProxyEmitter(i, l) || new Re(i, l);
908
+ this.listenTo(a, s, o, r);
909
+ } else super.listenTo(i, s, o, r);
910
+ }
911
+ stopListening(i, s, o) {
912
+ if (ht(i) || D(i) || i instanceof E.window.EventTarget) {
913
+ const r = this._getAllProxyEmitters(i);
914
+ for (const l of r) this.stopListening(l, s, o);
915
+ } else super.stopListening(i, s, o);
916
+ }
917
+ /**
918
+ * Retrieves ProxyEmitter instance for given DOM Node residing in this Host and given options.
919
+ *
920
+ * @param node DOM Node of the ProxyEmitter.
921
+ * @param options Additional options.
922
+ * @param options.useCapture Indicates that events of this type will be dispatched to the registered
923
+ * listener before being dispatched to any EventTarget beneath it in the DOM tree.
924
+ * @param options.usePassive Indicates that the function specified by listener will never call preventDefault()
925
+ * and prevents blocking browser's main thread by this event handler.
926
+ * @returns ProxyEmitter instance bound to the DOM Node.
927
+ */
928
+ _getProxyEmitter(i, s) {
929
+ return ue(this, Mt(i, s));
930
+ }
931
+ /**
932
+ * Retrieves all the ProxyEmitter instances for given DOM Node residing in this Host.
933
+ *
934
+ * @param node DOM Node of the ProxyEmitter.
935
+ */
936
+ _getAllProxyEmitters(i) {
937
+ return [
938
+ {
939
+ capture: !1,
940
+ passive: !1
941
+ },
942
+ {
943
+ capture: !1,
944
+ passive: !0
945
+ },
946
+ {
947
+ capture: !0,
948
+ passive: !1
949
+ },
950
+ {
951
+ capture: !0,
952
+ passive: !0
953
+ }
954
+ ].map((s) => this._getProxyEmitter(i, s)).filter((s) => !!s);
955
+ }
956
+ }
957
+ return t;
958
+ }
959
+ var Re = class extends ve {
960
+ /**
961
+ * @param node DOM Node that fires events.
962
+ * @param options Additional options.
963
+ * @param options.useCapture Indicates that events of this type will be dispatched to the registered
964
+ * listener before being dispatched to any EventTarget beneath it in the DOM tree.
965
+ * @param options.usePassive Indicates that the function specified by listener will never call preventDefault()
966
+ * and prevents blocking browser's main thread by this event handler.
967
+ */
968
+ constructor(t, n) {
969
+ super();
970
+ h(this, "_domNode");
971
+ h(this, "_options");
972
+ /**
973
+ * Collection of native DOM listeners.
974
+ */
975
+ h(this, "_domListeners");
976
+ Ct(this, Mt(t, n)), this._domNode = t, this._options = n;
977
+ }
978
+ /**
979
+ * Registers a callback function to be executed when an event is fired.
980
+ *
981
+ * It attaches a native DOM listener to the DOM Node. When fired,
982
+ * a corresponding Emitter event will also fire with DOM Event object as an argument.
983
+ *
984
+ * **Note**: This is automatically called by the
985
+ * {@link module:utils/emittermixin~Emitter#listenTo `Emitter#listenTo()`}.
986
+ *
987
+ * @param event The name of the event.
988
+ */
989
+ attach(t) {
990
+ if (this._domListeners && this._domListeners[t]) return;
991
+ const n = this._createDomListener(t);
992
+ this._domNode.addEventListener(t, n, this._options), this._domListeners || (this._domListeners = {}), this._domListeners[t] = n;
993
+ }
994
+ /**
995
+ * Stops executing the callback on the given event.
996
+ *
997
+ * **Note**: This is automatically called by the
998
+ * {@link module:utils/emittermixin~Emitter#stopListening `Emitter#stopListening()`}.
999
+ *
1000
+ * @param event The name of the event.
1001
+ */
1002
+ detach(t) {
1003
+ let n;
1004
+ this._domListeners[t] && (!(n = this._events[t]) || !n.callbacks.length) && this._domListeners[t].removeListener();
1005
+ }
1006
+ /**
1007
+ * Adds callback to emitter for given event.
1008
+ *
1009
+ * @internal
1010
+ * @param event The name of the event.
1011
+ * @param callback The function to be called on event.
1012
+ * @param options Additional options.
1013
+ */
1014
+ _addEventListener(t, n, i) {
1015
+ this.attach(t), C().prototype._addEventListener.call(this, t, n, i);
1016
+ }
1017
+ /**
1018
+ * Removes callback from emitter for given event.
1019
+ *
1020
+ * @internal
1021
+ * @param event The name of the event.
1022
+ * @param callback The function to stop being called.
1023
+ */
1024
+ _removeEventListener(t, n) {
1025
+ C().prototype._removeEventListener.call(this, t, n), this.detach(t);
1026
+ }
1027
+ /**
1028
+ * Creates a native DOM listener callback. When the native DOM event
1029
+ * is fired it will fire corresponding event on this ProxyEmitter.
1030
+ * Note: A native DOM Event is passed as an argument.
1031
+ *
1032
+ * @param event The name of the event.
1033
+ * @returns The DOM listener callback.
1034
+ */
1035
+ _createDomListener(t) {
1036
+ const n = (i) => {
1037
+ this.fire(t, i);
1038
+ };
1039
+ return n.removeListener = () => {
1040
+ this._domNode.removeEventListener(t, n, this._options), delete this._domListeners[t];
1041
+ }, n;
1042
+ }
1043
+ };
1044
+ function Ae(e) {
1045
+ return e["data-ck-expando"] || (e["data-ck-expando"] = X());
1046
+ }
1047
+ function Mt(e, t) {
1048
+ let n = Ae(e);
1049
+ for (const i of Object.keys(t).sort()) t[i] && (n += "-" + i);
1050
+ return n;
1051
+ }
1052
+ /**
1053
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1054
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1055
+ */
1056
+ function An(e) {
1057
+ const t = [];
1058
+ let n = e;
1059
+ for (; n && n.nodeType != Node.DOCUMENT_NODE; )
1060
+ t.unshift(n), n = n.parentNode;
1061
+ return t;
1062
+ }
1063
+ /**
1064
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1065
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1066
+ */
1067
+ function Cn(e) {
1068
+ return e instanceof HTMLTextAreaElement ? e.value : e.innerHTML;
1069
+ }
1070
+ /**
1071
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1072
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1073
+ */
1074
+ function Pt(e) {
1075
+ const t = e.ownerDocument.defaultView.getComputedStyle(e);
1076
+ return {
1077
+ top: parseInt(t.borderTopWidth, 10),
1078
+ right: parseInt(t.borderRightWidth, 10),
1079
+ bottom: parseInt(t.borderBottomWidth, 10),
1080
+ left: parseInt(t.borderLeftWidth, 10)
1081
+ };
1082
+ }
1083
+ /**
1084
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1085
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1086
+ */
1087
+ function Ln(e) {
1088
+ if (!e.target) return null;
1089
+ const t = e.target.ownerDocument, n = e.clientX, i = e.clientY;
1090
+ let s = null;
1091
+ return t.caretRangeFromPoint && t.caretRangeFromPoint(n, i) ? s = t.caretRangeFromPoint(n, i) : e.rangeParent && (s = t.createRange(), s.setStart(e.rangeParent, e.rangeOffset), s.collapse(!0)), s;
1092
+ }
1093
+ /**
1094
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1095
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1096
+ */
1097
+ function Bt(e) {
1098
+ return !e || !e.parentNode || e.offsetParent === E.document.body ? null : e.offsetParent;
1099
+ }
1100
+ /**
1101
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1102
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1103
+ */
1104
+ function Z(e) {
1105
+ return Object.prototype.toString.call(e) == "[object Text]";
1106
+ }
1107
+ /**
1108
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1109
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1110
+ */
1111
+ function tt(e) {
1112
+ return Object.prototype.toString.apply(e) == "[object Range]";
1113
+ }
1114
+ /**
1115
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1116
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1117
+ */
1118
+ const Nt = [
1119
+ "top",
1120
+ "right",
1121
+ "bottom",
1122
+ "left",
1123
+ "width",
1124
+ "height"
1125
+ ], Ce = /* @__PURE__ */ new Set([
1126
+ "relative",
1127
+ "absolute",
1128
+ "fixed",
1129
+ "sticky"
1130
+ ]);
1131
+ var v = class T {
1132
+ /**
1133
+ * Creates an instance of rect.
1134
+ *
1135
+ * ```ts
1136
+ * // Rect of an HTMLElement.
1137
+ * const rectA = new Rect( document.body );
1138
+ *
1139
+ * // Rect of a DOM Range.
1140
+ * const rectB = new Rect( document.getSelection().getRangeAt( 0 ) );
1141
+ *
1142
+ * // Rect of a window (web browser viewport).
1143
+ * const rectC = new Rect( window );
1144
+ *
1145
+ * // Rect out of an object.
1146
+ * const rectD = new Rect( { top: 0, right: 10, bottom: 10, left: 0, width: 10, height: 10 } );
1147
+ *
1148
+ * // Rect out of another Rect instance.
1149
+ * const rectE = new Rect( rectD );
1150
+ *
1151
+ * // Rect out of a ClientRect.
1152
+ * const rectF = new Rect( document.body.getClientRects().item( 0 ) );
1153
+ * ```
1154
+ *
1155
+ * **Note**: By default a rect of an HTML element includes its CSS borders and scrollbars (if any)
1156
+ * ant the rect of a `window` includes scrollbars too. Use {@link #excludeScrollbarsAndBorders}
1157
+ * to get the inner part of the rect.
1158
+ *
1159
+ * @param source A source object to create the rect.
1160
+ */
1161
+ constructor(t) {
1162
+ /**
1163
+ * The "top" value of the rect.
1164
+ *
1165
+ * @readonly
1166
+ */
1167
+ h(this, "top");
1168
+ /**
1169
+ * The "right" value of the rect.
1170
+ *
1171
+ * @readonly
1172
+ */
1173
+ h(this, "right");
1174
+ /**
1175
+ * The "bottom" value of the rect.
1176
+ *
1177
+ * @readonly
1178
+ */
1179
+ h(this, "bottom");
1180
+ /**
1181
+ * The "left" value of the rect.
1182
+ *
1183
+ * @readonly
1184
+ */
1185
+ h(this, "left");
1186
+ /**
1187
+ * The "width" value of the rect.
1188
+ *
1189
+ * @readonly
1190
+ */
1191
+ h(this, "width");
1192
+ /**
1193
+ * The "height" value of the rect.
1194
+ *
1195
+ * @readonly
1196
+ */
1197
+ h(this, "height");
1198
+ /**
1199
+ * The object this rect is for.
1200
+ *
1201
+ * @readonly
1202
+ */
1203
+ h(this, "_source");
1204
+ const n = tt(t);
1205
+ if (Object.defineProperty(this, "_source", {
1206
+ value: t._source || t,
1207
+ writable: !0,
1208
+ enumerable: !1
1209
+ }), q(t) || n) if (n) {
1210
+ const i = T.getDomRangeRects(t);
1211
+ F(this, T.getBoundingRect(i));
1212
+ } else F(this, t.getBoundingClientRect());
1213
+ else if (D(t)) {
1214
+ const { innerWidth: i, innerHeight: s } = t;
1215
+ F(this, {
1216
+ top: 0,
1217
+ right: i,
1218
+ bottom: s,
1219
+ left: 0,
1220
+ width: i,
1221
+ height: s
1222
+ });
1223
+ } else F(this, t);
1224
+ }
1225
+ /**
1226
+ * Returns a clone of the rect.
1227
+ *
1228
+ * @returns A cloned rect.
1229
+ */
1230
+ clone() {
1231
+ return new T(this);
1232
+ }
1233
+ /**
1234
+ * Moves the rect so that its upper–left corner lands in desired `[ x, y ]` location.
1235
+ *
1236
+ * @param x Desired horizontal location.
1237
+ * @param y Desired vertical location.
1238
+ * @returns A rect which has been moved.
1239
+ */
1240
+ moveTo(t, n) {
1241
+ return this.top = n, this.right = t + this.width, this.bottom = n + this.height, this.left = t, this;
1242
+ }
1243
+ /**
1244
+ * Moves the rect in–place by a dedicated offset.
1245
+ *
1246
+ * @param x A horizontal offset.
1247
+ * @param y A vertical offset
1248
+ * @returns A rect which has been moved.
1249
+ */
1250
+ moveBy(t, n) {
1251
+ return this.top += n, this.right += t, this.left += t, this.bottom += n, this;
1252
+ }
1253
+ /**
1254
+ * Returns a new rect a a result of intersection with another rect.
1255
+ */
1256
+ getIntersection(t) {
1257
+ const n = {
1258
+ top: Math.max(this.top, t.top),
1259
+ right: Math.min(this.right, t.right),
1260
+ bottom: Math.min(this.bottom, t.bottom),
1261
+ left: Math.max(this.left, t.left),
1262
+ width: 0,
1263
+ height: 0
1264
+ };
1265
+ if (n.width = n.right - n.left, n.height = n.bottom - n.top, n.width < 0 || n.height < 0) return null;
1266
+ {
1267
+ const i = new T(n);
1268
+ return i._source = this._source, i;
1269
+ }
1270
+ }
1271
+ /**
1272
+ * Returns the area of intersection with another rect.
1273
+ *
1274
+ * @returns Area of intersection.
1275
+ */
1276
+ getIntersectionArea(t) {
1277
+ const n = this.getIntersection(t);
1278
+ return n ? n.getArea() : 0;
1279
+ }
1280
+ /**
1281
+ * Returns the area of the rect.
1282
+ */
1283
+ getArea() {
1284
+ return this.width * this.height;
1285
+ }
1286
+ /**
1287
+ * Returns a new rect, a part of the original rect, which is actually visible to the user and is relative to the,`body`,
1288
+ * e.g. an original rect cropped by parent element rects which have `overflow` set in CSS
1289
+ * other than `"visible"`.
1290
+ *
1291
+ * If there's no such visible rect, which is when the rect is limited by one or many of
1292
+ * the ancestors, `null` is returned.
1293
+ *
1294
+ * **Note**: This method does not consider the boundaries of the viewport (window).
1295
+ * To get a rect cropped by all ancestors and the viewport, use an intersection such as:
1296
+ *
1297
+ * ```ts
1298
+ * const visibleInViewportRect = new Rect( window ).getIntersection( new Rect( source ).getVisible() );
1299
+ * ```
1300
+ *
1301
+ * @returns A visible rect instance or `null`, if there's none.
1302
+ */
1303
+ getVisible() {
1304
+ const t = this._source;
1305
+ let n = this.clone();
1306
+ if (dt(t)) return n;
1307
+ let i = t, s = t.parentNode || t.commonAncestorContainer, o;
1308
+ for (; s && !dt(s); ) {
1309
+ const r = Le(s) === "visible";
1310
+ if (pt(i) && (o = i), r || o && Ot(o) === "absolute" && !pt(s)) {
1311
+ i = s, s = s.parentNode;
1312
+ continue;
1313
+ }
1314
+ const l = new T(s), a = n.getIntersection(l);
1315
+ if (a)
1316
+ a.getArea() < n.getArea() && (n = a);
1317
+ else return null;
1318
+ i = s, s = s.parentNode;
1319
+ }
1320
+ return n;
1321
+ }
1322
+ /**
1323
+ * Checks if all property values ({@link #top}, {@link #left}, {@link #right},
1324
+ * {@link #bottom}, {@link #width} and {@link #height}) are the equal in both rect
1325
+ * instances.
1326
+ *
1327
+ * @param anotherRect A rect instance to compare with.
1328
+ * @returns `true` when Rects are equal. `false` otherwise.
1329
+ */
1330
+ isEqual(t) {
1331
+ for (const n of Nt) if (this[n] !== t[n]) return !1;
1332
+ return !0;
1333
+ }
1334
+ /**
1335
+ * Checks whether a rect fully contains another rect instance.
1336
+ *
1337
+ * @param anotherRect
1338
+ * @returns `true` if contains, `false` otherwise.
1339
+ */
1340
+ contains(t) {
1341
+ const n = this.getIntersection(t);
1342
+ return !!(n && n.isEqual(t));
1343
+ }
1344
+ /**
1345
+ * Recalculates screen coordinates to coordinates relative to the positioned ancestor offset.
1346
+ */
1347
+ toAbsoluteRect() {
1348
+ const { scrollX: t, scrollY: n } = E.window, i = this.clone().moveBy(t, n);
1349
+ if (q(i._source)) {
1350
+ const s = Bt(i._source);
1351
+ s && ke(i, s);
1352
+ }
1353
+ return i;
1354
+ }
1355
+ /**
1356
+ * Excludes scrollbars and CSS borders from the rect.
1357
+ *
1358
+ * * Borders are removed when {@link #_source} is an HTML element.
1359
+ * * Scrollbars are excluded from HTML elements and the `window`.
1360
+ *
1361
+ * @returns A rect which has been updated.
1362
+ */
1363
+ excludeScrollbarsAndBorders() {
1364
+ const t = this._source;
1365
+ let n, i, s;
1366
+ if (D(t))
1367
+ n = t.innerWidth - t.document.documentElement.clientWidth, i = t.innerHeight - t.document.documentElement.clientHeight, s = t.getComputedStyle(t.document.documentElement).direction;
1368
+ else {
1369
+ const o = Pt(t);
1370
+ n = t.offsetWidth - t.clientWidth - o.left - o.right, i = t.offsetHeight - t.clientHeight - o.top - o.bottom, s = t.ownerDocument.defaultView.getComputedStyle(t).direction, this.left += o.left, this.top += o.top, this.right -= o.right, this.bottom -= o.bottom, this.width = this.right - this.left, this.height = this.bottom - this.top;
1371
+ }
1372
+ return this.width -= n, s === "ltr" ? this.right -= n : this.left += n, this.height -= i, this.bottom -= i, this;
1373
+ }
1374
+ /**
1375
+ * Returns an array of rects of the given native DOM Range.
1376
+ *
1377
+ * Also see {@link module:utils/dom/rect~Rect.getDomElementRects}.
1378
+ *
1379
+ * @param range A native DOM range.
1380
+ * @returns DOM Range rects.
1381
+ */
1382
+ static getDomRangeRects(t) {
1383
+ const n = [], i = Array.from(t.getClientRects());
1384
+ if (i.length) for (const s of i) {
1385
+ const o = new T(s);
1386
+ o._source = t, n.push(o);
1387
+ }
1388
+ else {
1389
+ let s = t.startContainer;
1390
+ Z(s) && (s = s.parentNode);
1391
+ const o = new T(s.getBoundingClientRect());
1392
+ o.right = o.left, o.width = 0, n.push(o);
1393
+ }
1394
+ return n;
1395
+ }
1396
+ /**
1397
+ * Returns an array of Rects of the given DOM Element based on its native `getClientRects()` method.
1398
+ *
1399
+ * Also see {@link module:utils/dom/rect~Rect.getDomRangeRects}.
1400
+ */
1401
+ static getDomElementRects(t) {
1402
+ return Array.from(t.getClientRects()).map((n) => {
1403
+ const i = new T(n);
1404
+ return i._source = t, i;
1405
+ });
1406
+ }
1407
+ /**
1408
+ * Returns a bounding rectangle that contains all the given `rects`.
1409
+ *
1410
+ * @param rects A list of rectangles that should be contained in the result rectangle.
1411
+ * @returns Bounding rectangle or `null` if no `rects` were given.
1412
+ */
1413
+ static getBoundingRect(t) {
1414
+ const n = {
1415
+ left: Number.POSITIVE_INFINITY,
1416
+ top: Number.POSITIVE_INFINITY,
1417
+ right: Number.NEGATIVE_INFINITY,
1418
+ bottom: Number.NEGATIVE_INFINITY,
1419
+ width: 0,
1420
+ height: 0
1421
+ };
1422
+ let i = 0;
1423
+ for (const s of t)
1424
+ i++, n.left = Math.min(n.left, s.left), n.top = Math.min(n.top, s.top), n.right = Math.max(n.right, s.right), n.bottom = Math.max(n.bottom, s.bottom);
1425
+ return i == 0 ? null : (n.width = n.right - n.left, n.height = n.bottom - n.top, new T(n));
1426
+ }
1427
+ };
1428
+ function F(e, t) {
1429
+ for (const n of Nt) e[n] = t[n];
1430
+ }
1431
+ function dt(e) {
1432
+ return q(e) ? e === e.ownerDocument.body : !1;
1433
+ }
1434
+ function q(e) {
1435
+ return e !== null && typeof e == "object" && e.nodeType === 1 && typeof e.getBoundingClientRect == "function";
1436
+ }
1437
+ function Ot(e) {
1438
+ return e.ownerDocument.defaultView.getComputedStyle(e).position;
1439
+ }
1440
+ function Le(e) {
1441
+ return e instanceof HTMLElement ? e.ownerDocument.defaultView.getComputedStyle(e).overflow : "visible";
1442
+ }
1443
+ function pt(e) {
1444
+ return e instanceof HTMLElement && Ce.has(Ot(e));
1445
+ }
1446
+ function ke(e, t) {
1447
+ const n = new v(t), i = Pt(t);
1448
+ let s = 0, o = 0;
1449
+ s -= n.left, o -= n.top, s += t.scrollLeft, o += t.scrollTop, s -= i.left, o -= i.top, e.moveBy(s, o);
1450
+ }
1451
+ /**
1452
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1453
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1454
+ */
1455
+ var p, kn = (p = class {
1456
+ /**
1457
+ * Creates an instance of the `ResizeObserver` class.
1458
+ *
1459
+ * @param element A DOM element that is to be observed for resizing. Note that
1460
+ * the element must be visible (i.e. not detached from DOM) for the observer to work.
1461
+ * @param callback A function called when the observed element was resized. It passes
1462
+ * the [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)
1463
+ * object with information about the resize event.
1464
+ */
1465
+ constructor(t, n) {
1466
+ /**
1467
+ * The element observed by this observer.
1468
+ */
1469
+ h(this, "_element");
1470
+ /**
1471
+ * The callback executed each time {@link #_element} is resized.
1472
+ */
1473
+ h(this, "_callback");
1474
+ p._observerInstance || p._createObserver(), this._element = t, this._callback = n, p._addElementCallback(t, n), p._observerInstance.observe(t);
1475
+ }
1476
+ /**
1477
+ * The element observed by this observer.
1478
+ */
1479
+ get element() {
1480
+ return this._element;
1481
+ }
1482
+ /**
1483
+ * Destroys the observer which disables the `callback` passed to the {@link #constructor}.
1484
+ */
1485
+ destroy() {
1486
+ p._deleteElementCallback(this._element, this._callback);
1487
+ }
1488
+ /**
1489
+ * Registers a new resize callback for the DOM element.
1490
+ */
1491
+ static _addElementCallback(t, n) {
1492
+ p._elementCallbacks || (p._elementCallbacks = /* @__PURE__ */ new Map());
1493
+ let i = p._elementCallbacks.get(t);
1494
+ i || (i = /* @__PURE__ */ new Set(), p._elementCallbacks.set(t, i)), i.add(n);
1495
+ }
1496
+ /**
1497
+ * Removes a resize callback from the DOM element. If no callbacks are left
1498
+ * for the element, it removes the element from the native observer.
1499
+ */
1500
+ static _deleteElementCallback(t, n) {
1501
+ const i = p._getElementCallbacks(t);
1502
+ i && (i.delete(n), i.size || (p._elementCallbacks.delete(t), p._observerInstance.unobserve(t))), p._elementCallbacks && !p._elementCallbacks.size && (p._observerInstance = null, p._elementCallbacks = null);
1503
+ }
1504
+ /**
1505
+ * Returns are registered resize callbacks for the DOM element.
1506
+ */
1507
+ static _getElementCallbacks(t) {
1508
+ return p._elementCallbacks ? p._elementCallbacks.get(t) : null;
1509
+ }
1510
+ /**
1511
+ * Creates the single native observer shared across all `ResizeObserver` instances.
1512
+ */
1513
+ static _createObserver() {
1514
+ p._observerInstance = new E.window.ResizeObserver((t) => {
1515
+ for (const n of t) {
1516
+ const i = p._getElementCallbacks(n.target);
1517
+ if (i) for (const s of i) s(n);
1518
+ }
1519
+ });
1520
+ }
1521
+ }, /**
1522
+ * The single native observer instance shared across all {@link module:utils/dom/resizeobserver~ResizeObserver} instances.
1523
+ */
1524
+ h(p, "_observerInstance", null), /**
1525
+ * A mapping of native DOM elements and their callbacks shared across all
1526
+ * {@link module:utils/dom/resizeobserver~ResizeObserver} instances.
1527
+ */
1528
+ h(p, "_elementCallbacks", null), p);
1529
+ /**
1530
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1531
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1532
+ */
1533
+ function Sn(e, t) {
1534
+ e instanceof HTMLTextAreaElement && (e.value = t), e.innerHTML = t;
1535
+ }
1536
+ /**
1537
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1538
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1539
+ */
1540
+ function Mn(e) {
1541
+ return (t) => t + e;
1542
+ }
1543
+ /**
1544
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1545
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1546
+ */
1547
+ function Pn(e) {
1548
+ let t = 0;
1549
+ for (; e.previousSibling; )
1550
+ e = e.previousSibling, t++;
1551
+ return t;
1552
+ }
1553
+ /**
1554
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1555
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1556
+ */
1557
+ function Bn(e, t, n) {
1558
+ e.insertBefore(n, e.childNodes[t] || null);
1559
+ }
1560
+ /**
1561
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1562
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1563
+ */
1564
+ function Nn(e) {
1565
+ return e && e.nodeType === Node.COMMENT_NODE;
1566
+ }
1567
+ /**
1568
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1569
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1570
+ */
1571
+ function On(e) {
1572
+ try {
1573
+ E.document.createAttribute(e);
1574
+ } catch {
1575
+ return !1;
1576
+ }
1577
+ return !0;
1578
+ }
1579
+ /**
1580
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1581
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1582
+ */
1583
+ function Se(e) {
1584
+ return e ? Z(e) ? Se(e.parentElement) : e.getClientRects ? !!e.getClientRects().length : !1 : !1;
1585
+ }
1586
+ /**
1587
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1588
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1589
+ */
1590
+ function Fn({ element: e, target: t, positions: n, limiter: i, fitInViewport: s, viewportOffsetConfig: o }) {
1591
+ st(t) && (t = t()), st(i) && (i = i());
1592
+ const r = Bt(e), l = Me(o), a = new v(e), c = gt(t, l);
1593
+ let u;
1594
+ if (!c || !l.getIntersection(c)) return null;
1595
+ const f = {
1596
+ targetRect: c,
1597
+ elementRect: a,
1598
+ positionedElementAncestor: r,
1599
+ viewportRect: l
1600
+ };
1601
+ if (!i && !s) u = new Ft(n[0], f);
1602
+ else {
1603
+ if (i) {
1604
+ const d = gt(i, l);
1605
+ d && (f.limiterRect = d);
1606
+ }
1607
+ u = Pe(n, f);
1608
+ }
1609
+ return u;
1610
+ }
1611
+ function gt(e, t) {
1612
+ const n = new v(e).getVisible();
1613
+ return n ? n.getIntersection(t) : null;
1614
+ }
1615
+ function Me(e) {
1616
+ e = Object.assign({
1617
+ top: 0,
1618
+ bottom: 0,
1619
+ left: 0,
1620
+ right: 0
1621
+ }, e);
1622
+ const t = new v(E.window);
1623
+ return t.top += e.top, t.height -= e.top, t.bottom -= e.bottom, t.height -= e.bottom, t.left += e.left, t.right -= e.right, t.width -= e.left + e.right, t;
1624
+ }
1625
+ function Pe(e, t) {
1626
+ const { elementRect: n } = t, i = n.getArea(), s = e.map((l) => new Ft(l, t)).filter((l) => !!l.name);
1627
+ let o = 0, r = null;
1628
+ for (const l of s) {
1629
+ const { limiterIntersectionArea: a, viewportIntersectionArea: c } = l;
1630
+ if (a === i) return l;
1631
+ const u = c ** 2 + a ** 2;
1632
+ u > o && (o = u, r = l);
1633
+ }
1634
+ return r;
1635
+ }
1636
+ var Ft = class {
1637
+ /**
1638
+ * Creates an instance of the {@link module:utils/dom/position~PositionObject} class.
1639
+ *
1640
+ * @param positioningFunction function The function that defines the expected
1641
+ * coordinates the positioned element should move to.
1642
+ * @param options options object.
1643
+ * @param options.elementRect The positioned element rect.
1644
+ * @param options.targetRect The target element rect.
1645
+ * @param options.viewportRect The viewport rect.
1646
+ * @param options.limiterRect The limiter rect.
1647
+ * @param options.positionedElementAncestor Nearest element ancestor element which CSS position is not "static".
1648
+ */
1649
+ constructor(e, t) {
1650
+ h(this, "name");
1651
+ h(this, "config");
1652
+ h(this, "_positioningFunctionCoordinates");
1653
+ h(this, "_options");
1654
+ h(this, "_cachedRect");
1655
+ h(this, "_cachedAbsoluteRect");
1656
+ const n = e(t.targetRect, t.elementRect, t.viewportRect, t.limiterRect);
1657
+ if (!n) return;
1658
+ const { left: i, top: s, name: o, config: r } = n;
1659
+ this.name = o, this.config = r, this._positioningFunctionCoordinates = {
1660
+ left: i,
1661
+ top: s
1662
+ }, this._options = t;
1663
+ }
1664
+ /**
1665
+ * The left value in pixels in the CSS `position: absolute` coordinate system.
1666
+ * Set it on the positioned element in DOM to move it to the position.
1667
+ */
1668
+ get left() {
1669
+ return this._absoluteRect.left;
1670
+ }
1671
+ /**
1672
+ * The top value in pixels in the CSS `position: absolute` coordinate system.
1673
+ * Set it on the positioned element in DOM to move it to the position.
1674
+ */
1675
+ get top() {
1676
+ return this._absoluteRect.top;
1677
+ }
1678
+ /**
1679
+ * An intersection area between positioned element and limiter within viewport constraints.
1680
+ */
1681
+ get limiterIntersectionArea() {
1682
+ const e = this._options.limiterRect;
1683
+ return e ? e.getIntersectionArea(this._rect) : 0;
1684
+ }
1685
+ /**
1686
+ * An intersection area between positioned element and viewport.
1687
+ */
1688
+ get viewportIntersectionArea() {
1689
+ return this._options.viewportRect.getIntersectionArea(this._rect);
1690
+ }
1691
+ /**
1692
+ * An already positioned element rect. A clone of the element rect passed to the constructor
1693
+ * but placed in the viewport according to the positioning function.
1694
+ */
1695
+ get _rect() {
1696
+ return this._cachedRect ? this._cachedRect : (this._cachedRect = this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left, this._positioningFunctionCoordinates.top), this._cachedRect);
1697
+ }
1698
+ /**
1699
+ * An already absolutely positioned element rect. See ({@link #_rect}).
1700
+ */
1701
+ get _absoluteRect() {
1702
+ return this._cachedAbsoluteRect ? this._cachedAbsoluteRect : (this._cachedAbsoluteRect = this._rect.toAbsoluteRect(), this._cachedAbsoluteRect);
1703
+ }
1704
+ };
1705
+ /**
1706
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1707
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1708
+ */
1709
+ function Dn(e) {
1710
+ const t = e.parentNode;
1711
+ t && t.removeChild(e);
1712
+ }
1713
+ /**
1714
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1715
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1716
+ */
1717
+ function Vn() {
1718
+ const e = E.window.visualViewport;
1719
+ return !e || !(S.isiOS || S.isSafari) ? {
1720
+ left: 0,
1721
+ top: 0
1722
+ } : {
1723
+ left: Math.max(Math.round(e.offsetLeft), 0),
1724
+ top: Math.max(Math.round(e.offsetTop), 0)
1725
+ };
1726
+ }
1727
+ /**
1728
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1729
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1730
+ */
1731
+ function jn({ target: e, viewportOffset: t = 0, ancestorOffset: n = 0, alignToTop: i, forceScroll: s }) {
1732
+ const o = et(e);
1733
+ let r = o, l = null;
1734
+ for (t = Oe(t); r; ) {
1735
+ let a;
1736
+ r == o ? a = mt(e) : a = mt(l), Ne({
1737
+ parent: a,
1738
+ getRect: () => H(e, r),
1739
+ alignToTop: i,
1740
+ ancestorOffset: n,
1741
+ forceScroll: s
1742
+ });
1743
+ let c = H(e, r);
1744
+ const u = H(a, r);
1745
+ if (c.height > u.height) {
1746
+ const f = c.getIntersection(u);
1747
+ f && (c = f);
1748
+ }
1749
+ if (Be({
1750
+ window: r,
1751
+ rect: c,
1752
+ viewportOffset: t,
1753
+ alignToTop: i,
1754
+ forceScroll: s
1755
+ }), r.parent != r) {
1756
+ if (l = r.frameElement, r = r.parent, !l) return;
1757
+ } else r = null;
1758
+ }
1759
+ }
1760
+ function Be({ window: e, rect: t, alignToTop: n, forceScroll: i, viewportOffset: s }) {
1761
+ const o = t.clone().moveBy(0, s.bottom), r = t.clone().moveBy(0, -s.top), l = new v(e).excludeScrollbarsAndBorders(), a = [r, o], c = n && i, u = a.every((b) => l.contains(b));
1762
+ let { scrollX: f, scrollY: d } = e;
1763
+ const _ = f, m = d;
1764
+ c ? d -= l.top - t.top + s.top : u || (Vt(r, l) ? d -= l.top - t.top + s.top : Dt(o, l) && (n ? d += t.top - l.top - s.top : d += t.bottom - l.bottom + s.bottom)), u || (jt(t, l) ? f -= l.left - t.left + s.left : Wt(t, l) && (f += t.right - l.right + s.right)), (f != _ || d !== m) && e.scrollTo(f, d);
1765
+ }
1766
+ function Ne({ parent: e, getRect: t, alignToTop: n, forceScroll: i, ancestorOffset: s = 0, limiterElement: o }) {
1767
+ const r = et(e), l = n && i;
1768
+ let a, c, u;
1769
+ const f = o || r.document.body;
1770
+ for (; e != f; )
1771
+ c = t(), a = new v(e).excludeScrollbarsAndBorders(), u = a.contains(c), l ? e.scrollTop -= a.top - c.top + s : u || (Vt(c, a) ? e.scrollTop -= a.top - c.top + s : Dt(c, a) && (n ? e.scrollTop += c.top - a.top - s : e.scrollTop += c.bottom - a.bottom + s)), u || (jt(c, a) ? e.scrollLeft -= a.left - c.left + s : Wt(c, a) && (e.scrollLeft += c.right - a.right + s)), e = e.parentNode;
1772
+ }
1773
+ function Dt(e, t) {
1774
+ return e.bottom > t.bottom;
1775
+ }
1776
+ function Vt(e, t) {
1777
+ return e.top < t.top;
1778
+ }
1779
+ function jt(e, t) {
1780
+ return e.left < t.left;
1781
+ }
1782
+ function Wt(e, t) {
1783
+ return e.right > t.right;
1784
+ }
1785
+ function et(e) {
1786
+ return tt(e) ? e.startContainer.ownerDocument.defaultView : e.ownerDocument.defaultView;
1787
+ }
1788
+ function mt(e) {
1789
+ if (tt(e)) {
1790
+ let t = e.commonAncestorContainer;
1791
+ return Z(t) && (t = t.parentNode), t;
1792
+ } else return e.parentNode;
1793
+ }
1794
+ function H(e, t) {
1795
+ const n = et(e), i = new v(e);
1796
+ if (n === t) return i;
1797
+ {
1798
+ let s = n;
1799
+ for (; s != t; ) {
1800
+ const o = s.frameElement, r = new v(o).excludeScrollbarsAndBorders();
1801
+ i.moveBy(r.left, r.top), s = s.parent;
1802
+ }
1803
+ }
1804
+ return i;
1805
+ }
1806
+ function Oe(e) {
1807
+ return typeof e == "number" ? {
1808
+ top: e,
1809
+ bottom: e,
1810
+ left: e,
1811
+ right: e
1812
+ } : e;
1813
+ }
1814
+ /**
1815
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1816
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1817
+ */
1818
+ const Fe = {
1819
+ ctrl: "⌃",
1820
+ cmd: "⌘",
1821
+ alt: "⌥",
1822
+ shift: "⇧"
1823
+ }, De = {
1824
+ ctrl: "Ctrl+",
1825
+ alt: "Alt+",
1826
+ shift: "Shift+"
1827
+ }, bt = {
1828
+ 37: "←",
1829
+ 38: "↑",
1830
+ 39: "→",
1831
+ 40: "↓",
1832
+ 9: "⇥",
1833
+ 33: "Page Up",
1834
+ 34: "Page Down"
1835
+ }, w = /* @__PURE__ */ Ke(), Ve = /* @__PURE__ */ Object.fromEntries(/* @__PURE__ */ Object.entries(w).map(([e, t]) => {
1836
+ let n;
1837
+ return t in bt ? n = bt[t] : n = e.charAt(0).toUpperCase() + e.slice(1), [t, n];
1838
+ }));
1839
+ function V(e) {
1840
+ let t;
1841
+ if (typeof e == "string") {
1842
+ if (t = w[e.toLowerCase()], !t)
1843
+ throw new g("keyboard-unknown-key", null, { key: e });
1844
+ } else t = e.keyCode + (e.altKey ? w.alt : 0) + (e.ctrlKey ? w.ctrl : 0) + (e.shiftKey ? w.shift : 0) + (e.metaKey ? w.cmd : 0);
1845
+ return t;
1846
+ }
1847
+ function Kt(e) {
1848
+ return typeof e == "string" && (e = Ue(e)), e.map((t) => typeof t == "string" ? We(t) : t).reduce((t, n) => n + t, 0);
1849
+ }
1850
+ function Wn(e, t) {
1851
+ let n = Kt(e);
1852
+ const i = S.isMac || S.isiOS;
1853
+ return Object.entries(i ? Fe : De).reduce((s, [o, r]) => ((n & w[o]) != 0 && (n &= ~w[o], s += r), s), "") + (n ? Ve[n] : "");
1854
+ }
1855
+ function Kn(e) {
1856
+ return e == w.arrowright || e == w.arrowleft || e == w.arrowup || e == w.arrowdown;
1857
+ }
1858
+ function je(e, t) {
1859
+ const n = t === "ltr";
1860
+ switch (e) {
1861
+ case w.arrowleft:
1862
+ return n ? "left" : "right";
1863
+ case w.arrowright:
1864
+ return n ? "right" : "left";
1865
+ case w.arrowup:
1866
+ return "up";
1867
+ case w.arrowdown:
1868
+ return "down";
1869
+ }
1870
+ }
1871
+ function We(e) {
1872
+ if (e.endsWith("!")) return V(e.slice(0, -1));
1873
+ const t = V(e);
1874
+ return (S.isMac || S.isiOS) && t == w.ctrl ? w.cmd : t;
1875
+ }
1876
+ function Un(e, t) {
1877
+ const n = je(e, t);
1878
+ return n === "down" || n === "right";
1879
+ }
1880
+ function Ke() {
1881
+ const e = {
1882
+ pageup: 33,
1883
+ pagedown: 34,
1884
+ end: 35,
1885
+ home: 36,
1886
+ arrowleft: 37,
1887
+ arrowup: 38,
1888
+ arrowright: 39,
1889
+ arrowdown: 40,
1890
+ backspace: 8,
1891
+ delete: 46,
1892
+ enter: 13,
1893
+ space: 32,
1894
+ esc: 27,
1895
+ tab: 9,
1896
+ ctrl: 1114112,
1897
+ shift: 2228224,
1898
+ alt: 4456448,
1899
+ cmd: 8912896
1900
+ };
1901
+ for (let t = 65; t <= 90; t++) {
1902
+ const n = String.fromCharCode(t);
1903
+ e[n.toLowerCase()] = t;
1904
+ }
1905
+ for (let t = 48; t <= 57; t++) e[t - 48] = t;
1906
+ for (let t = 112; t <= 123; t++) e["f" + (t - 111)] = t;
1907
+ return Object.assign(e, {
1908
+ "'": 222,
1909
+ ",": 108,
1910
+ "-": 109,
1911
+ ".": 110,
1912
+ "/": 111,
1913
+ ";": 186,
1914
+ "=": 187,
1915
+ "[": 219,
1916
+ "\\": 220,
1917
+ "]": 221,
1918
+ "`": 223
1919
+ }), e;
1920
+ }
1921
+ function Ue(e) {
1922
+ return e.split("+").map((t) => t.trim());
1923
+ }
1924
+ /**
1925
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1926
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1927
+ */
1928
+ const He = [
1929
+ "ar",
1930
+ "ara",
1931
+ "dv",
1932
+ "div",
1933
+ "fa",
1934
+ "per",
1935
+ "fas",
1936
+ "he",
1937
+ "heb",
1938
+ "ku",
1939
+ "kur",
1940
+ "ug",
1941
+ "uig",
1942
+ "ur",
1943
+ "urd"
1944
+ ];
1945
+ function _t(e) {
1946
+ return He.includes(e) ? "rtl" : "ltr";
1947
+ }
1948
+ /**
1949
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1950
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1951
+ */
1952
+ function $e(e) {
1953
+ return Array.isArray(e) ? e : [e];
1954
+ }
1955
+ /**
1956
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1957
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1958
+ */
1959
+ /* v8 ignore else -- @preserve */
1960
+ E.window.CKEDITOR_TRANSLATIONS || (E.window.CKEDITOR_TRANSLATIONS = {});
1961
+ function ze(e, t, n = 1, i) {
1962
+ if (typeof n != "number")
1963
+ throw new g("translation-service-quantity-not-a-number", null, { quantity: n });
1964
+ const s = i || E.window.CKEDITOR_TRANSLATIONS, o = qe(s);
1965
+ o === 1 && (e = Object.keys(s)[0]);
1966
+ const r = t.id || t.string;
1967
+ if (o === 0 || !Ye(e, r, s))
1968
+ return n !== 1 ? t.plural : t.string;
1969
+ const l = s[e].dictionary, a = s[e].getPluralForm || ((u) => u === 1 ? 0 : 1), c = l[r];
1970
+ return typeof c == "string" ? c : c[Number(a(n))];
1971
+ }
1972
+ function Ge(e) {
1973
+ return Array.isArray(e) ? e.reduce((t, n) => Gt(t, n)) : e;
1974
+ }
1975
+ function Ye(e, t, n) {
1976
+ return !!n[e] && !!n[e].dictionary[t];
1977
+ }
1978
+ function qe(e) {
1979
+ return Object.keys(e).length;
1980
+ }
1981
+ /**
1982
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
1983
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
1984
+ */
1985
+ var Hn = class {
1986
+ /**
1987
+ * Creates a new instance of the locale class. Learn more about
1988
+ * {@glink getting-started/setup/ui-language configuring the language of the editor}.
1989
+ *
1990
+ * @param options Locale configuration.
1991
+ * @param options.uiLanguage The editor UI language code in the
1992
+ * [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format. See {@link #uiLanguage}.
1993
+ * @param options.contentLanguage The editor content language code in the
1994
+ * [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format. If not specified, the same as `options.language`.
1995
+ * See {@link #contentLanguage}.
1996
+ * @param options.translations Translations passed as a editor config parameter.
1997
+ */
1998
+ constructor({ uiLanguage: e = "en", contentLanguage: t, translations: n } = {}) {
1999
+ /**
2000
+ * The editor UI language code in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
2001
+ *
2002
+ * If the {@link #contentLanguage content language} was not specified in the `Locale` constructor,
2003
+ * it also defines the language of the content.
2004
+ */
2005
+ h(this, "uiLanguage");
2006
+ /**
2007
+ * Text direction of the {@link #uiLanguage editor UI language}. Either `'ltr'` or `'rtl'`.
2008
+ */
2009
+ h(this, "uiLanguageDirection");
2010
+ /**
2011
+ * The editor content language code in the [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format.
2012
+ *
2013
+ * Usually the same as the {@link #uiLanguage editor language}, it can be customized by passing an optional
2014
+ * argument to the `Locale` constructor.
2015
+ */
2016
+ h(this, "contentLanguage");
2017
+ /**
2018
+ * Text direction of the {@link #contentLanguage editor content language}.
2019
+ *
2020
+ * If the content language was passed directly to the `Locale` constructor, this property represents the
2021
+ * direction of that language.
2022
+ *
2023
+ * If the {@link #contentLanguage editor content language} was derived from the {@link #uiLanguage editor language},
2024
+ * the content language direction is the same as the {@link #uiLanguageDirection UI language direction}.
2025
+ *
2026
+ * The value is either `'ltr'` or `'rtl'`.
2027
+ */
2028
+ h(this, "contentLanguageDirection");
2029
+ /**
2030
+ * Translates the given message to the {@link #uiLanguage}. This method is also available in
2031
+ * {@link module:core/editor/editor~Editor#t `Editor`} and {@link module:ui/view~View#t `View`}.
2032
+ *
2033
+ * This method's context is statically bound to the `Locale` instance and **should always be called as a function**:
2034
+ *
2035
+ * ```ts
2036
+ * const t = locale.t;
2037
+ * t( 'Label' );
2038
+ * ```
2039
+ *
2040
+ * The message can be either a string or an object implementing the {@link module:utils/translation-service~Message} interface.
2041
+ *
2042
+ * The message may contain placeholders (`%<index>`) for value(s) that are passed as a `values` parameter.
2043
+ * For an array of values, the `%<index>` will be changed to an element of that array at the given index.
2044
+ * For a single value passed as the second argument, only the `%0` placeholders will be changed to the provided value.
2045
+ *
2046
+ * ```ts
2047
+ * t( 'Created file "%0" in %1ms.', [ fileName, timeTaken ] );
2048
+ * t( 'Created file "%0", fileName );
2049
+ * ```
2050
+ *
2051
+ * The message supports plural forms. To specify the plural form, use the `plural` property. Singular or plural form
2052
+ * will be chosen depending on the first value from the passed `values`. The value of the `plural` property is used
2053
+ * as a default plural translation when the translation for the target language is missing.
2054
+ *
2055
+ * ```ts
2056
+ * t( { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Add a space' for the English language.
2057
+ * t( { string: 'Add a space', plural: 'Add %0 spaces' }, 5 ); // 'Add 5 spaces' for the English language.
2058
+ * t( { string: '%1 a space', plural: '%1 %0 spaces' }, [ 2, 'Add' ] ); // 'Add 2 spaces' for the English language.
2059
+ *
2060
+ * t( { string: 'Add a space', plural: 'Add %0 spaces' }, 1 ); // 'Dodaj spację' for the Polish language.
2061
+ * t( { string: 'Add a space', plural: 'Add %0 spaces' }, 5 ); // 'Dodaj 5 spacji' for the Polish language.
2062
+ * t( { string: '%1 a space', plural: '%1 %0 spaces' }, [ 2, 'Add' ] ); // 'Dodaj 2 spacje' for the Polish language.
2063
+ * ```
2064
+ *
2065
+ * * The message should provide an ID using the `id` property when the message strings are not unique and their
2066
+ * translations should be different.
2067
+ *
2068
+ * ```ts
2069
+ * translate( 'en', { string: 'image', id: 'ADD_IMAGE' } );
2070
+ * translate( 'en', { string: 'image', id: 'AN_IMAGE' } );
2071
+ * ```
2072
+ */
2073
+ h(this, "t");
2074
+ /**
2075
+ * Object that contains translations.
2076
+ */
2077
+ h(this, "translations");
2078
+ this.uiLanguage = e, this.contentLanguage = t || this.uiLanguage, this.uiLanguageDirection = _t(this.uiLanguage), this.contentLanguageDirection = _t(this.contentLanguage), this.translations = Ge(n), this.t = (i, s) => this._t(i, s);
2079
+ }
2080
+ /**
2081
+ * An unbound version of the {@link #t} method.
2082
+ */
2083
+ _t(e, t = []) {
2084
+ t = $e(t), typeof e == "string" && (e = { string: e });
2085
+ const n = e.plural ? t[0] : 1;
2086
+ return Xe(ze(this.uiLanguage, e, n, this.translations), t);
2087
+ }
2088
+ };
2089
+ function Xe(e, t) {
2090
+ return e.replace(/%(\d+)/g, (n, i) => i < t.length ? t[i] : n);
2091
+ }
2092
+ /**
2093
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2094
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2095
+ */
2096
+ const Je = /* @__PURE__ */ C();
2097
+ var $n = class extends Je {
2098
+ constructor(t = {}, n = {}) {
2099
+ super();
2100
+ /**
2101
+ * The internal list of items in the collection.
2102
+ */
2103
+ h(this, "_items");
2104
+ /**
2105
+ * The internal map of items in the collection.
2106
+ */
2107
+ h(this, "_itemMap");
2108
+ /**
2109
+ * The name of the property which is considered to identify an item.
2110
+ */
2111
+ h(this, "_idProperty");
2112
+ /**
2113
+ * A collection instance this collection is bound to as a result
2114
+ * of calling {@link #bindTo} method.
2115
+ */
2116
+ h(this, "_bindToCollection");
2117
+ /**
2118
+ * A helper mapping external items of a bound collection ({@link #bindTo})
2119
+ * and actual items of this collection. It provides information
2120
+ * necessary to properly remove items bound to another collection.
2121
+ *
2122
+ * See {@link #_bindToInternalToExternalMap}.
2123
+ */
2124
+ h(this, "_bindToExternalToInternalMap");
2125
+ /**
2126
+ * A helper mapping items of this collection to external items of a bound collection
2127
+ * ({@link #bindTo}). It provides information necessary to manage the bindings, e.g.
2128
+ * to avoid loops in two–way bindings.
2129
+ *
2130
+ * See {@link #_bindToExternalToInternalMap}.
2131
+ */
2132
+ h(this, "_bindToInternalToExternalMap");
2133
+ /**
2134
+ * Stores indexes of skipped items from bound external collection.
2135
+ */
2136
+ h(this, "_skippedIndexesFromExternal");
2137
+ const i = J(t);
2138
+ if (i || (n = t), this._items = [], this._itemMap = /* @__PURE__ */ new Map(), this._idProperty = n.idProperty || "id", this._bindToExternalToInternalMap = /* @__PURE__ */ new WeakMap(), this._bindToInternalToExternalMap = /* @__PURE__ */ new WeakMap(), this._skippedIndexesFromExternal = [], i) for (const s of t)
2139
+ this._items.push(s), this._itemMap.set(this._getItemIdBeforeAdding(s), s);
2140
+ }
2141
+ /**
2142
+ * The number of items available in the collection.
2143
+ */
2144
+ get length() {
2145
+ return this._items.length;
2146
+ }
2147
+ /**
2148
+ * Returns the first item from the collection or null when collection is empty.
2149
+ */
2150
+ get first() {
2151
+ return this._items[0] || null;
2152
+ }
2153
+ /**
2154
+ * Returns the last item from the collection or null when collection is empty.
2155
+ */
2156
+ get last() {
2157
+ return this._items[this.length - 1] || null;
2158
+ }
2159
+ /**
2160
+ * Adds an item into the collection.
2161
+ *
2162
+ * If the item does not have an id, then it will be automatically generated and set on the item.
2163
+ *
2164
+ * @param item
2165
+ * @param index The position of the item in the collection. The item
2166
+ * is pushed to the collection when `index` not specified.
2167
+ * @fires add
2168
+ * @fires change
2169
+ */
2170
+ add(t, n) {
2171
+ return this.addMany([t], n);
2172
+ }
2173
+ /**
2174
+ * Adds multiple items into the collection.
2175
+ *
2176
+ * Any item not containing an id will get an automatically generated one.
2177
+ *
2178
+ * @param items
2179
+ * @param index The position of the insertion. Items will be appended if no `index` is specified.
2180
+ * @fires add
2181
+ * @fires change
2182
+ */
2183
+ addMany(t, n) {
2184
+ if (n === void 0) n = this._items.length;
2185
+ else if (n > this._items.length || n < 0)
2186
+ throw new g("collection-add-item-invalid-index", this);
2187
+ let i = 0;
2188
+ for (const s of t) {
2189
+ const o = this._getItemIdBeforeAdding(s), r = n + i;
2190
+ this._items.splice(r, 0, s), this._itemMap.set(o, s), this.fire("add", s, r), i++;
2191
+ }
2192
+ return this.fire("change", {
2193
+ added: t,
2194
+ removed: [],
2195
+ index: n
2196
+ }), this;
2197
+ }
2198
+ /**
2199
+ * Gets an item by its ID or index.
2200
+ *
2201
+ * @param idOrIndex The item ID or index in the collection.
2202
+ * @returns The requested item or `null` if such item does not exist.
2203
+ */
2204
+ get(t) {
2205
+ let n;
2206
+ if (typeof t == "string") n = this._itemMap.get(t);
2207
+ else if (typeof t == "number") n = this._items[t];
2208
+ else
2209
+ throw new g("collection-get-invalid-arg", this);
2210
+ return n || null;
2211
+ }
2212
+ /**
2213
+ * Returns a Boolean indicating whether the collection contains an item.
2214
+ *
2215
+ * @param itemOrId The item or its ID in the collection.
2216
+ * @returns `true` if the collection contains the item, `false` otherwise.
2217
+ */
2218
+ has(t) {
2219
+ if (typeof t == "string") return this._itemMap.has(t);
2220
+ {
2221
+ const n = t[this._idProperty];
2222
+ return n && this._itemMap.has(n);
2223
+ }
2224
+ }
2225
+ /**
2226
+ * Gets an index of an item in the collection.
2227
+ * When an item is not defined in the collection, the index will equal -1.
2228
+ *
2229
+ * @param itemOrId The item or its ID in the collection.
2230
+ * @returns The index of a given item.
2231
+ */
2232
+ getIndex(t) {
2233
+ let n;
2234
+ return typeof t == "string" ? n = this._itemMap.get(t) : n = t, n ? this._items.indexOf(n) : -1;
2235
+ }
2236
+ /**
2237
+ * Removes an item from the collection.
2238
+ *
2239
+ * @param subject The item to remove, its ID or index in the collection.
2240
+ * @returns The removed item.
2241
+ * @fires remove
2242
+ * @fires change
2243
+ */
2244
+ remove(t) {
2245
+ const [n, i] = this._remove(t);
2246
+ return this.fire("change", {
2247
+ added: [],
2248
+ removed: [n],
2249
+ index: i
2250
+ }), n;
2251
+ }
2252
+ /**
2253
+ * Executes the callback for each item in the collection and composes an array or values returned by this callback.
2254
+ *
2255
+ * @typeParam U The result type of the callback.
2256
+ * @param callback
2257
+ * @param ctx Context in which the `callback` will be called.
2258
+ * @returns The result of mapping.
2259
+ */
2260
+ map(t, n) {
2261
+ return this._items.map(t, n);
2262
+ }
2263
+ /**
2264
+ * Performs the specified action for each item in the collection.
2265
+ *
2266
+ * @param ctx Context in which the `callback` will be called.
2267
+ */
2268
+ forEach(t, n) {
2269
+ this._items.forEach(t, n);
2270
+ }
2271
+ /**
2272
+ * Finds the first item in the collection for which the `callback` returns a true value.
2273
+ *
2274
+ * @param callback
2275
+ * @param ctx Context in which the `callback` will be called.
2276
+ * @returns The item for which `callback` returned a true value.
2277
+ */
2278
+ find(t, n) {
2279
+ return this._items.find(t, n);
2280
+ }
2281
+ /**
2282
+ * Returns an array with items for which the `callback` returned a true value.
2283
+ *
2284
+ * @param callback
2285
+ * @param ctx Context in which the `callback` will be called.
2286
+ * @returns The array with matching items.
2287
+ */
2288
+ filter(t, n) {
2289
+ return this._items.filter(t, n);
2290
+ }
2291
+ /**
2292
+ * Removes all items from the collection and destroys the binding created using
2293
+ * {@link #bindTo}.
2294
+ *
2295
+ * @fires remove
2296
+ * @fires change
2297
+ */
2298
+ clear() {
2299
+ this._bindToCollection && (this.stopListening(this._bindToCollection), this._bindToCollection = null);
2300
+ const t = Array.from(this._items);
2301
+ for (; this.length; ) this._remove(0);
2302
+ this.fire("change", {
2303
+ added: [],
2304
+ removed: t,
2305
+ index: 0
2306
+ });
2307
+ }
2308
+ /**
2309
+ * Binds and synchronizes the collection with another one.
2310
+ *
2311
+ * The binding can be a simple factory:
2312
+ *
2313
+ * ```ts
2314
+ * class FactoryClass {
2315
+ * public label: string;
2316
+ *
2317
+ * constructor( data: { label: string } ) {
2318
+ * this.label = data.label;
2319
+ * }
2320
+ * }
2321
+ *
2322
+ * const source = new Collection<{ label: string }>( { idProperty: 'label' } );
2323
+ * const target = new Collection<FactoryClass>();
2324
+ *
2325
+ * target.bindTo( source ).as( FactoryClass );
2326
+ *
2327
+ * source.add( { label: 'foo' } );
2328
+ * source.add( { label: 'bar' } );
2329
+ *
2330
+ * console.log( target.length ); // 2
2331
+ * console.log( target.get( 1 ).label ); // 'bar'
2332
+ *
2333
+ * source.remove( 0 );
2334
+ * console.log( target.length ); // 1
2335
+ * console.log( target.get( 0 ).label ); // 'bar'
2336
+ * ```
2337
+ *
2338
+ * or the factory driven by a custom callback:
2339
+ *
2340
+ * ```ts
2341
+ * class FooClass {
2342
+ * public label: string;
2343
+ *
2344
+ * constructor( data: { label: string } ) {
2345
+ * this.label = data.label;
2346
+ * }
2347
+ * }
2348
+ *
2349
+ * class BarClass {
2350
+ * public label: string;
2351
+ *
2352
+ * constructor( data: { label: string } ) {
2353
+ * this.label = data.label;
2354
+ * }
2355
+ * }
2356
+ *
2357
+ * const source = new Collection<{ label: string }>( { idProperty: 'label' } );
2358
+ * const target = new Collection<FooClass | BarClass>();
2359
+ *
2360
+ * target.bindTo( source ).using( ( item ) => {
2361
+ * if ( item.label == 'foo' ) {
2362
+ * return new FooClass( item );
2363
+ * } else {
2364
+ * return new BarClass( item );
2365
+ * }
2366
+ * } );
2367
+ *
2368
+ * source.add( { label: 'foo' } );
2369
+ * source.add( { label: 'bar' } );
2370
+ *
2371
+ * console.log( target.length ); // 2
2372
+ * console.log( target.get( 0 ) instanceof FooClass ); // true
2373
+ * console.log( target.get( 1 ) instanceof BarClass ); // true
2374
+ * ```
2375
+ *
2376
+ * or the factory out of property name:
2377
+ *
2378
+ * ```ts
2379
+ * const source = new Collection<{ nested: { value: string } }>();
2380
+ * const target = new Collection<{ value: string }>();
2381
+ *
2382
+ * target.bindTo( source ).using( 'nested' );
2383
+ *
2384
+ * source.add( { nested: { value: 'foo' } } );
2385
+ * source.add( { nested: { value: 'bar' } } );
2386
+ *
2387
+ * console.log( target.length ); // 2
2388
+ * console.log( target.get( 0 ).value ); // 'foo'
2389
+ * console.log( target.get( 1 ).value ); // 'bar'
2390
+ * ```
2391
+ *
2392
+ * It's possible to skip specified items by returning null value:
2393
+ *
2394
+ * ```ts
2395
+ * const source = new Collection<{ hidden: boolean }>();
2396
+ * const target = new Collection<{ hidden: boolean }>();
2397
+ *
2398
+ * target.bindTo( source ).using( item => {
2399
+ * if ( item.hidden ) {
2400
+ * return null;
2401
+ * }
2402
+ *
2403
+ * return item;
2404
+ * } );
2405
+ *
2406
+ * source.add( { hidden: true } );
2407
+ * source.add( { hidden: false } );
2408
+ *
2409
+ * console.log( source.length ); // 2
2410
+ * console.log( target.length ); // 1
2411
+ * ```
2412
+ *
2413
+ * **Note**: {@link #clear} can be used to break the binding.
2414
+ *
2415
+ * @typeParam S The type of `externalCollection` element.
2416
+ * @param externalCollection A collection to be bound.
2417
+ * @returns The binding chain object.
2418
+ */
2419
+ bindTo(t) {
2420
+ if (this._bindToCollection)
2421
+ throw new g("collection-bind-to-rebind", this);
2422
+ return this._bindToCollection = t, {
2423
+ as: (n) => {
2424
+ this._setUpBindToBinding((i) => new n(i));
2425
+ },
2426
+ using: (n) => {
2427
+ typeof n == "function" ? this._setUpBindToBinding(n) : this._setUpBindToBinding((i) => i[n]);
2428
+ }
2429
+ };
2430
+ }
2431
+ /**
2432
+ * Finalizes and activates a binding initiated by {@link #bindTo}.
2433
+ *
2434
+ * @param factory A function which produces collection items.
2435
+ */
2436
+ _setUpBindToBinding(t) {
2437
+ const n = this._bindToCollection, i = (s, o, r) => {
2438
+ const l = n._bindToCollection == this, a = n._bindToInternalToExternalMap.get(o);
2439
+ if (l && a)
2440
+ this._bindToExternalToInternalMap.set(o, a), this._bindToInternalToExternalMap.set(a, o);
2441
+ else {
2442
+ const c = t(o);
2443
+ if (!c) {
2444
+ this._skippedIndexesFromExternal.push(r);
2445
+ return;
2446
+ }
2447
+ let u = r;
2448
+ for (const f of this._skippedIndexesFromExternal) r > f && u--;
2449
+ for (const f of n._skippedIndexesFromExternal) u >= f && u++;
2450
+ this._bindToExternalToInternalMap.set(o, c), this._bindToInternalToExternalMap.set(c, o), this.add(c, u);
2451
+ for (let f = 0; f < n._skippedIndexesFromExternal.length; f++) u <= n._skippedIndexesFromExternal[f] && n._skippedIndexesFromExternal[f]++;
2452
+ }
2453
+ };
2454
+ for (const s of n) i(null, s, n.getIndex(s));
2455
+ this.listenTo(n, "add", i), this.listenTo(n, "remove", (s, o, r) => {
2456
+ const l = this._bindToExternalToInternalMap.get(o);
2457
+ l && this.remove(l), this._skippedIndexesFromExternal = this._skippedIndexesFromExternal.reduce((a, c) => (r < c && a.push(c - 1), r > c && a.push(c), a), []);
2458
+ });
2459
+ }
2460
+ /**
2461
+ * Returns an unique id property for a given `item`.
2462
+ *
2463
+ * The method will generate new id and assign it to the `item` if it doesn't have any.
2464
+ *
2465
+ * @param item Item to be added.
2466
+ */
2467
+ _getItemIdBeforeAdding(t) {
2468
+ const n = this._idProperty;
2469
+ let i;
2470
+ if (n in t) {
2471
+ if (i = t[n], typeof i != "string")
2472
+ throw new g("collection-add-invalid-id", this);
2473
+ if (this.get(i))
2474
+ throw new g("collection-add-item-already-exists", this);
2475
+ } else t[n] = i = X();
2476
+ return i;
2477
+ }
2478
+ /**
2479
+ * Core {@link #remove} method implementation shared in other functions.
2480
+ *
2481
+ * In contrast this method **does not** fire the {@link #event:change} event.
2482
+ *
2483
+ * @param subject The item to remove, its id or index in the collection.
2484
+ * @returns Returns an array with the removed item and its index.
2485
+ * @fires remove
2486
+ */
2487
+ _remove(t) {
2488
+ let n, i, s, o;
2489
+ const r = this._idProperty;
2490
+ if (typeof t == "string" ? (i = t, s = this._itemMap.get(i), o = !s, s && (n = this._items.indexOf(s))) : typeof t == "number" ? (n = t, s = this._items[n], o = !s, s && (i = s[r])) : (s = t, i = s[r], n = this._items.indexOf(s), o = n == -1 || !this._itemMap.get(i)), o)
2491
+ throw new g("collection-remove-404", this);
2492
+ this._items.splice(n, 1), this._itemMap.delete(i);
2493
+ const l = this._bindToInternalToExternalMap.get(s);
2494
+ return this._bindToInternalToExternalMap.delete(s), this._bindToExternalToInternalMap.delete(l), this.fire("remove", s, n), [s, n];
2495
+ }
2496
+ /**
2497
+ * Iterable interface.
2498
+ */
2499
+ [Symbol.iterator]() {
2500
+ return this._items[Symbol.iterator]();
2501
+ }
2502
+ };
2503
+ /**
2504
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2505
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2506
+ */
2507
+ function zn(e) {
2508
+ const t = e.next();
2509
+ return t.done ? null : t.value;
2510
+ }
2511
+ /**
2512
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2513
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2514
+ */
2515
+ const Qe = /* @__PURE__ */ Q(/* @__PURE__ */ kt());
2516
+ var Ze = class extends Qe {
2517
+ constructor() {
2518
+ super();
2519
+ /**
2520
+ * List of registered DOM elements.
2521
+ *
2522
+ * @internal
2523
+ */
2524
+ h(this, "_elements", /* @__PURE__ */ new Set());
2525
+ /**
2526
+ * List of views with external focus trackers that contribute to the state of this focus tracker.
2527
+ *
2528
+ * @internal
2529
+ */
2530
+ h(this, "_externalViews", /* @__PURE__ */ new Set());
2531
+ /**
2532
+ * Asynchronous blur event timeout.
2533
+ */
2534
+ h(this, "_blurTimeout", null);
2535
+ this.set("isFocused", !1), this.set("focusedElement", null);
2536
+ }
2537
+ /**
2538
+ * List of registered DOM elements.
2539
+ *
2540
+ * **Note**: The list does do not include elements from {@link #externalViews}.
2541
+ */
2542
+ get elements() {
2543
+ return Array.from(this._elements.values());
2544
+ }
2545
+ /**
2546
+ * List of external focusable views that contribute to the state of this focus tracker. See {@link #add} to learn more.
2547
+ */
2548
+ get externalViews() {
2549
+ return Array.from(this._externalViews.values());
2550
+ }
2551
+ /**
2552
+ * Starts tracking a specified DOM element or a {@link module:ui/view~View} instance.
2553
+ *
2554
+ * * If a DOM element is passed, the focus tracker listens to the `focus` and `blur` events on this element.
2555
+ * Tracked elements are listed in {@link #elements}.
2556
+ * * If a {@link module:ui/view~View} instance is passed that has a `FocusTracker` instance ({@link ~ViewWithFocusTracker}),
2557
+ * the external focus tracker's state ({@link #isFocused}, {@link #focusedElement}) starts contributing to the current tracker instance.
2558
+ * This allows for increasing the "reach" of a focus tracker instance, by connecting two or more focus trackers together when DOM
2559
+ * elements they track are located in different subtrees in DOM. External focus trackers are listed in {@link #externalViews}.
2560
+ * * If a {@link module:ui/view~View} instance is passed that has no `FocusTracker` (**not** a {@link ~ViewWithFocusTracker}),
2561
+ * its {@link module:ui/view~View#element} is used to track focus like any other DOM element.
2562
+ */
2563
+ add(t) {
2564
+ if (yt(t)) this._addElement(t);
2565
+ else if (wt(t)) this._addView(t);
2566
+ else {
2567
+ if (!t.element)
2568
+ throw new g("focustracker-add-view-missing-element", {
2569
+ focusTracker: this,
2570
+ view: t
2571
+ });
2572
+ this._addElement(t.element);
2573
+ }
2574
+ }
2575
+ /**
2576
+ * Stops tracking focus in the specified DOM element or a {@link module:ui/view~View view instance}. See {@link #add} to learn more.
2577
+ */
2578
+ remove(t) {
2579
+ yt(t) ? this._removeElement(t) : wt(t) ? this._removeView(t) : this._removeElement(t.element);
2580
+ }
2581
+ /**
2582
+ * Adds a DOM element to the focus tracker and starts listening to the `focus` and `blur` events on it.
2583
+ */
2584
+ _addElement(t) {
2585
+ if (this._elements.has(t))
2586
+ throw new g("focustracker-add-element-already-exist", this);
2587
+ this.listenTo(t, "focus", () => {
2588
+ const n = this.externalViews.find((i) => tn(t, i));
2589
+ n ? this._focus(n.element) : this._focus(t);
2590
+ }, { useCapture: !0 }), this.listenTo(t, "blur", () => {
2591
+ this._blur();
2592
+ }, { useCapture: !0 }), this._elements.add(t);
2593
+ }
2594
+ /**
2595
+ * Removes a DOM element from the focus tracker.
2596
+ */
2597
+ _removeElement(t) {
2598
+ this._elements.has(t) && (this.stopListening(t), this._elements.delete(t)), t === this.focusedElement && this._blur();
2599
+ }
2600
+ /**
2601
+ * Adds an external {@link module:ui/view~View view instance} to this focus tracker and makes it contribute to this focus tracker's
2602
+ * state either by its `View#element` or by its `View#focusTracker` instance.
2603
+ */
2604
+ _addView(t) {
2605
+ t.element && this._addElement(t.element), this.listenTo(t.focusTracker, "change:focusedElement", () => {
2606
+ t.focusTracker.focusedElement ? t.element && this._focus(t.element) : this._blur();
2607
+ }), this._externalViews.add(t);
2608
+ }
2609
+ /**
2610
+ * Removes an external {@link module:ui/view~View view instance} from this focus tracker.
2611
+ */
2612
+ _removeView(t) {
2613
+ t.element && this._removeElement(t.element), this.stopListening(t.focusTracker), this._externalViews.delete(t);
2614
+ }
2615
+ /**
2616
+ * Destroys the focus tracker by:
2617
+ * - Disabling all event listeners attached to tracked elements or external views.
2618
+ * - Removing all tracked elements and views that were previously added.
2619
+ */
2620
+ destroy() {
2621
+ this.stopListening(), this._elements.clear(), this._externalViews.clear(), this.isFocused = !1, this.focusedElement = null;
2622
+ }
2623
+ /**
2624
+ * Stores currently focused element as {@link #focusedElement} and sets {@link #isFocused} `true`.
2625
+ */
2626
+ _focus(t) {
2627
+ this._clearBlurTimeout(), this.focusedElement = t, this.isFocused = !0;
2628
+ }
2629
+ /**
2630
+ * Clears currently {@link #focusedElement} and sets {@link #isFocused} `false`.
2631
+ *
2632
+ * This method uses `setTimeout()` to change order of `blur` and `focus` events calls, ensuring that moving focus between
2633
+ * two elements within a single focus tracker's scope, will not cause `[ blurA, focusB ]` sequence but just `[ focusB ]`.
2634
+ * The former would cause a momentary change of `#isFocused` to `false` which is not desired because any logic listening to
2635
+ * a focus tracker state would experience UI flashes and glitches as the user focus travels across the UI.
2636
+ */
2637
+ _blur() {
2638
+ this.elements.find((t) => t.contains(document.activeElement)) || this.externalViews.find((t) => t.focusTracker.isFocused && !t.focusTracker._blurTimeout) || (this._clearBlurTimeout(), this._blurTimeout = setTimeout(() => {
2639
+ this.focusedElement = null, this.isFocused = !1;
2640
+ }, 0));
2641
+ }
2642
+ /**
2643
+ * Clears the asynchronous blur event timeout on demand. See {@link #_blur} to learn more.
2644
+ */
2645
+ _clearBlurTimeout() {
2646
+ clearTimeout(this._blurTimeout), this._blurTimeout = null;
2647
+ }
2648
+ };
2649
+ function wt(e) {
2650
+ return "focusTracker" in e && e.focusTracker instanceof Ze;
2651
+ }
2652
+ function yt(e) {
2653
+ return Tt(e);
2654
+ }
2655
+ function tn(e, t) {
2656
+ return Et(e, t) ? !0 : !!t.focusTracker.externalViews.find((n) => Et(e, n));
2657
+ }
2658
+ function Et(e, t) {
2659
+ return !!t.element && t.element.contains(document.activeElement) && e.contains(t.element);
2660
+ }
2661
+ /**
2662
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2663
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2664
+ */
2665
+ var Gn = class {
2666
+ /**
2667
+ * Creates an instance of the keystroke handler.
2668
+ */
2669
+ constructor() {
2670
+ /**
2671
+ * Listener used to listen to events for easier keystroke handler destruction.
2672
+ */
2673
+ h(this, "_listener");
2674
+ this._listener = new (Q())();
2675
+ }
2676
+ /**
2677
+ * Starts listening for `keydown` events from a given emitter.
2678
+ */
2679
+ listenTo(e) {
2680
+ this._listener.listenTo(e, "keydown", (t, n) => {
2681
+ this._listener.fire("_keydown:" + V(n), n);
2682
+ });
2683
+ }
2684
+ /**
2685
+ * Registers a handler for the specified keystroke.
2686
+ *
2687
+ * @param keystroke Keystroke defined in a format accepted by
2688
+ * the {@link module:utils/keyboard~parseKeystroke} function.
2689
+ * @param callback A function called with the
2690
+ * {@link module:engine/view/observer/keyobserver~ViewDocumentKeyEventData key event data} object and
2691
+ * a helper function to call both `preventDefault()` and `stopPropagation()` on the underlying event.
2692
+ * @param options Additional options.
2693
+ */
2694
+ set(e, t, n = {}) {
2695
+ const i = Kt(e), s = n.priority;
2696
+ this._listener.listenTo(this._listener, "_keydown:" + i, (o, r) => {
2697
+ n.filter && !n.filter(r) || (t(r, () => {
2698
+ r.preventDefault(), r.stopPropagation(), o.stop();
2699
+ }), o.return = !0);
2700
+ }, { priority: s });
2701
+ }
2702
+ /**
2703
+ * Triggers a keystroke handler for a specified key combination, if such a keystroke was {@link #set defined}.
2704
+ *
2705
+ * @param keyEvtData Key event data.
2706
+ * @returns Whether the keystroke was handled.
2707
+ */
2708
+ press(e) {
2709
+ return !!this._listener.fire("_keydown:" + V(e), e);
2710
+ }
2711
+ /**
2712
+ * Stops listening to `keydown` events from the given emitter.
2713
+ */
2714
+ stopListening(e) {
2715
+ this._listener.stopListening(e);
2716
+ }
2717
+ /**
2718
+ * Destroys the keystroke handler.
2719
+ */
2720
+ destroy() {
2721
+ this.stopListening();
2722
+ }
2723
+ };
2724
+ /**
2725
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2726
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2727
+ */
2728
+ function en(e) {
2729
+ const t = /* @__PURE__ */ new Map();
2730
+ for (const n in e) t.set(n, e[n]);
2731
+ return t;
2732
+ }
2733
+ /**
2734
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2735
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2736
+ */
2737
+ function Yn(e) {
2738
+ return J(e) ? new Map(e) : en(e);
2739
+ }
2740
+ /**
2741
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2742
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2743
+ */
2744
+ function qn(e, t, n) {
2745
+ const i = e.length, s = t.length;
2746
+ for (let o = i - 1; o >= n; o--) e[o + s] = e[o];
2747
+ for (let o = 0; o < s; o++) e[n + o] = t[o];
2748
+ }
2749
+ /**
2750
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2751
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2752
+ */
2753
+ function Xn(e, t) {
2754
+ let n;
2755
+ function i(...s) {
2756
+ i.cancel(), n = setTimeout(() => e(...s), t);
2757
+ }
2758
+ return i.cancel = () => {
2759
+ clearTimeout(n);
2760
+ }, i;
2761
+ }
2762
+ /**
2763
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2764
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2765
+ */
2766
+ function nn(e) {
2767
+ try {
2768
+ if (!e.startsWith("ey")) return null;
2769
+ const t = atob(e.replace(/-/g, "+").replace(/_/g, "/"));
2770
+ return JSON.parse(t);
2771
+ } catch {
2772
+ return null;
2773
+ }
2774
+ }
2775
+ /**
2776
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2777
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2778
+ */
2779
+ function sn() {
2780
+ const e = [];
2781
+ for (let t = 0; t < 256; t++) {
2782
+ let n = t;
2783
+ for (let i = 0; i < 8; i++) n & 1 ? n = 3988292384 ^ n >>> 1 : n = n >>> 1;
2784
+ e[t] = n;
2785
+ }
2786
+ return e;
2787
+ }
2788
+ function Jn(e) {
2789
+ const t = Array.isArray(e) ? e : [e], n = sn();
2790
+ let i = -1;
2791
+ const s = t.map((o) => Array.isArray(o) ? o.join("") : String(o)).join("");
2792
+ for (let o = 0; o < s.length; o++) {
2793
+ const r = s.charCodeAt(o);
2794
+ i = i >>> 8 ^ n[(i ^ r) & 255];
2795
+ }
2796
+ return i = (i ^ -1) >>> 0, i.toString(16).padStart(8, "0");
2797
+ }
2798
+ /**
2799
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2800
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2801
+ */
2802
+ function on(e) {
2803
+ return !!e && e.length == 1 && /[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(e);
2804
+ }
2805
+ function rn(e) {
2806
+ return !!e && e.length == 1 && /[\ud800-\udbff]/.test(e);
2807
+ }
2808
+ function cn(e) {
2809
+ return !!e && e.length == 1 && /[\udc00-\udfff]/.test(e);
2810
+ }
2811
+ function Qn(e, t) {
2812
+ return rn(e.charAt(t - 1)) && cn(e.charAt(t));
2813
+ }
2814
+ function Zn(e, t) {
2815
+ return on(e.charAt(t));
2816
+ }
2817
+ const ln = /* @__PURE__ */ an();
2818
+ function ti(e, t) {
2819
+ const n = String(e).matchAll(ln);
2820
+ return Array.from(n).some((i) => i.index < t && t < i.index + i[0].length);
2821
+ }
2822
+ function an() {
2823
+ const e = [
2824
+ new RegExp("\\p{Emoji}[\\u{E0020}-\\u{E007E}]+\\u{E007F}", "u"),
2825
+ new RegExp("\\p{Emoji}\\u{FE0F}?\\u{20E3}", "u"),
2826
+ new RegExp("\\p{Emoji}\\u{FE0F}", "u"),
2827
+ new RegExp("(?=\\p{General_Category=Other_Symbol})\\p{Emoji}\\p{Emoji_Modifier}*", "u")
2828
+ ], t = new RegExp("\\p{Regional_Indicator}{2}", "u").source, n = "(?:" + e.map((s) => s.source).join("|") + ")", i = `${t}|${n}(?:‍${n})*`;
2829
+ return new RegExp(i, "ug");
2830
+ }
2831
+ /**
2832
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2833
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2834
+ */
2835
+ function ei(e) {
2836
+ if (!e) return null;
2837
+ const t = un(e);
2838
+ return t ? nn(t) : null;
2839
+ }
2840
+ function un(e) {
2841
+ const t = e.split(".");
2842
+ return t.length != 3 ? null : t[1];
2843
+ }
2844
+ /**
2845
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
2846
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2847
+ */
2848
+ function ni(e, t) {
2849
+ return (e.removeFeatures || []).includes(t);
2850
+ }
2851
+ export {
2852
+ g as CKEditorError,
2853
+ $n as Collection,
2854
+ Rn as Config,
2855
+ re as DOCUMENTATION_URL,
2856
+ Q as DomEmitterMixin,
2857
+ Tn as ElementReplacer,
2858
+ C as EmitterMixin,
2859
+ $ as EventInfo,
2860
+ Ze as FocusTracker,
2861
+ Gn as KeystrokeHandler,
2862
+ Hn as Locale,
2863
+ kt as ObservableMixin,
2864
+ v as Rect,
2865
+ kn as ResizeObserver,
2866
+ W as _getEmitterId,
2867
+ ue as _getEmitterListenedTo,
2868
+ Yt as _getUserAgent,
2869
+ Zt as _isAndroid,
2870
+ te as _isBlink,
2871
+ Xt as _isGecko,
2872
+ xt as _isMac,
2873
+ Jt as _isSafari,
2874
+ qt as _isWindows,
2875
+ Qt as _isiOS,
2876
+ Ct as _setEmitterId,
2877
+ ze as _translate,
2878
+ Ge as _unifyTranslations,
2879
+ In as compareArrays,
2880
+ xn as count,
2881
+ Jn as crc32,
2882
+ vn as createElement,
2883
+ ei as decodeLicenseKey,
2884
+ Xn as delay,
2885
+ It as diff,
2886
+ S as env,
2887
+ ee as fastDiff,
2888
+ zn as first,
2889
+ An as getAncestors,
2890
+ Pt as getBorderWidths,
2891
+ V as getCode,
2892
+ Me as getConstrainedViewportRect,
2893
+ Cn as getDataFromElement,
2894
+ Wn as getEnvKeystrokeText,
2895
+ _t as getLanguageDirection,
2896
+ je as getLocalizedArrowKeyCodeDirection,
2897
+ Fn as getOptimalPosition,
2898
+ Bt as getPositionedAncestor,
2899
+ Ln as getRangeFromMouseEvent,
2900
+ Vn as getVisualViewportOffset,
2901
+ E as global,
2902
+ Pn as indexOf,
2903
+ Bn as insertAt,
2904
+ oe as insertToPriorityArray,
2905
+ Kn as isArrowKeyCode,
2906
+ on as isCombiningMark,
2907
+ Nn as isComment,
2908
+ ni as isFeatureBlockedByLicenseKey,
2909
+ Un as isForwardArrowKeyCode,
2910
+ rn as isHighSurrogateHalf,
2911
+ Zn as isInsideCombinedSymbol,
2912
+ ti as isInsideEmojiSequence,
2913
+ Qn as isInsideSurrogatePair,
2914
+ J as isIterable,
2915
+ cn as isLowSurrogateHalf,
2916
+ ht as isNode,
2917
+ tt as isRange,
2918
+ Z as isText,
2919
+ On as isValidAttributeName,
2920
+ wt as isViewWithFocusTracker,
2921
+ Se as isVisible,
2922
+ D as isWindow,
2923
+ w as keyCodes,
2924
+ yn as logError,
2925
+ wn as logWarning,
2926
+ en as objectToMap,
2927
+ nn as parseBase64EncodedObject,
2928
+ Kt as parseKeystroke,
2929
+ z as priorities,
2930
+ En as releaseDate,
2931
+ Dn as remove,
2932
+ jn as scrollViewportToShowTarget,
2933
+ Sn as setDataInElement,
2934
+ qn as spliceArray,
2935
+ ct as spy,
2936
+ $e as toArray,
2937
+ Yn as toMap,
2938
+ Mn as toUnit,
2939
+ X as uid,
2940
+ le as version
2941
+ };
2942
+ //# sourceMappingURL=index.js.map