@ncino/web-components 3.4.0-preview.2 → 3.4.0-preview.3

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 (364) hide show
  1. package/dist/_virtual/index.js +1 -1
  2. package/dist/_virtual/index2.js +1 -1
  3. package/dist/assets/node_modules/.pnpm/ckeditor5@45.0.0/node_modules/ckeditor5/dist/ckeditor5.css +4 -0
  4. package/dist/components/input-rich-text/ckeditor-config.js +1 -1
  5. package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
  6. package/dist/components/panel/gator/panel.storybook-test.js +1 -1
  7. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-alignment@45.0.0/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +4 -0
  8. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autoformat@44.3.0 → @ckeditor_ckeditor5-autoformat@45.0.0}/node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js +1 -1
  9. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autosave@44.3.0 → @ckeditor_ckeditor5-autosave@45.0.0}/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +1 -1
  10. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@45.0.0/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +4 -0
  11. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-block-quote@44.3.0 → @ckeditor_ckeditor5-block-quote@45.0.0}/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js +2 -2
  12. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@45.0.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +20 -0
  13. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-cloud-services@44.3.0 → @ckeditor_ckeditor5-cloud-services@45.0.0}/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +2 -2
  14. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-code-block@44.3.0 → @ckeditor_ckeditor5-code-block@45.0.0}/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +5 -5
  15. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +4 -0
  16. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@45.0.0/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +4 -0
  17. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-engine@44.3.0 → @ckeditor_ckeditor5-engine@45.0.0}/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +3 -3
  18. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-enter@44.3.0 → @ckeditor_ckeditor5-enter@45.0.0}/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +1 -1
  19. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-essentials@44.3.0 → @ckeditor_ckeditor5-essentials@45.0.0}/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +1 -1
  20. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-find-and-replace@45.0.0/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +5 -0
  21. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@45.0.0/node_modules/@ckeditor/ckeditor5-font/dist/index.js +7 -0
  22. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-heading@44.3.0 → @ckeditor_ckeditor5-heading@45.0.0}/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +1 -1
  23. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-highlight@45.0.0/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +4 -0
  24. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-horizontal-line@45.0.0/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +4 -0
  25. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@45.0.0/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +4 -0
  26. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@45.0.0/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +12 -0
  27. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-icons@45.0.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +6 -0
  28. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@45.0.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +10 -0
  29. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@45.0.0/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +10 -0
  30. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-language@44.3.0 → @ckeditor_ckeditor5-language@45.0.0}/node_modules/@ckeditor/ckeditor5-language/dist/index.js +1 -1
  31. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@45.0.0/node_modules/@ckeditor/ckeditor5-link/dist/index.js +4 -0
  32. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@45.0.0/node_modules/@ckeditor/ckeditor5-list/dist/index.js +13 -0
  33. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-markdown-gfm@44.3.0 → @ckeditor_ckeditor5-markdown-gfm@45.0.0}/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +1 -1
  34. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@45.0.0/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +7 -0
  35. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-mention@44.3.0 → @ckeditor_ckeditor5-mention@45.0.0}/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +1 -1
  36. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-page-break@45.0.0/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +4 -0
  37. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paragraph@44.3.0 → @ckeditor_ckeditor5-paragraph@45.0.0}/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +2 -2
  38. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paste-from-office@44.3.0 → @ckeditor_ckeditor5-paste-from-office@45.0.0}/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +1 -1
  39. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-remove-format@45.0.0/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +4 -0
  40. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-select-all@45.0.0/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +4 -0
  41. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-show-blocks@45.0.0/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +4 -0
  42. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@45.0.0/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +12 -0
  43. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@45.0.0/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +4 -0
  44. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-style@44.3.0 → @ckeditor_ckeditor5-style@45.0.0}/node_modules/@ckeditor/ckeditor5-style/dist/index.js +1 -1
  45. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@45.0.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +16 -0
  46. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-typing@44.3.0 → @ckeditor_ckeditor5-typing@45.0.0}/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +3 -3
  47. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +28 -0
  48. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-undo@44.3.0 → @ckeditor_ckeditor5-undo@45.0.0}/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +2 -2
  49. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-upload@44.3.0 → @ckeditor_ckeditor5-upload@45.0.0}/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +1 -1
  50. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-utils@44.3.0 → @ckeditor_ckeditor5-utils@45.0.0}/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +9 -9
  51. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-watchdog@44.3.0 → @ckeditor_ckeditor5-watchdog@45.0.0}/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +1 -1
  52. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@45.0.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +4 -0
  53. package/dist/node_modules/.pnpm/{@storybook_instrumenter@8.6.12_storybook@8.6.12_prettier@3.4.2_ → @storybook_instrumenter@8.6.12_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/instrumenter/dist/index.js +1 -1
  54. package/dist/node_modules/.pnpm/{@storybook_test@8.6.12_storybook@8.6.12_prettier@3.4.2_ → @storybook_test@8.6.12_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/test/dist/index.js +1 -1
  55. package/dist/node_modules/.pnpm/color-parse@1.4.2/node_modules/color-parse/index.js +1 -1
  56. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +1 -0
  57. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/getTag.js +1 -0
  58. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +1 -0
  59. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.js +1 -0
  60. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +1 -0
  61. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/normalizeForCase.js +1 -0
  62. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/tags.js +1 -0
  63. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/toKey.js +1 -0
  64. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/debounce.js +1 -0
  65. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/throttle.js +1 -0
  66. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/assignIn.js +1 -0
  67. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -0
  68. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +1 -0
  69. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/get.js +1 -0
  70. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/keysIn.js +1 -0
  71. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/mapValues.js +1 -0
  72. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/merge.js +1 -0
  73. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/mergeWith.js +1 -0
  74. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/property.js +1 -0
  75. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/set.js +1 -0
  76. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/unset.js +1 -0
  77. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +1 -0
  78. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +1 -0
  79. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isElement.js +1 -0
  80. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js +1 -0
  81. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isObject.js +1 -0
  82. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +1 -0
  83. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +1 -0
  84. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isString.js +1 -0
  85. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js +1 -0
  86. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js +1 -0
  87. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js +1 -0
  88. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/startCase.js +1 -0
  89. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/upperFirst.js +1 -0
  90. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/eq.js +1 -0
  91. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/times.js +1 -0
  92. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toFinite.js +1 -0
  93. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toInteger.js +1 -0
  94. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toNumber.js +1 -0
  95. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toPath.js +1 -0
  96. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toString.js +1 -0
  97. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/after.js +1 -0
  98. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/debounce.js +1 -0
  99. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/identity.js +1 -0
  100. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/noop.js +1 -0
  101. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/clone.js +1 -0
  102. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/cloneDeepWith.js +1 -0
  103. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/mapValues.js +1 -0
  104. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isBuffer.js +1 -0
  105. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqual.js +1 -0
  106. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqualWith.js +1 -0
  107. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isFunction.js +1 -0
  108. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isLength.js +1 -0
  109. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isPlainObject.js +1 -0
  110. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isPrimitive.js +1 -0
  111. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isTypedArray.js +1 -0
  112. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/string/escapeRegExp.js +1 -0
  113. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/string/upperFirst.js +1 -0
  114. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/string/words.js +1 -0
  115. package/dist/utils/vitest-a11y-utils.js +1 -1
  116. package/package.json +2 -2
  117. package/web-types.json +1 -1
  118. package/dist/assets/node_modules/.pnpm/ckeditor5@44.3.0/node_modules/ckeditor5/dist/ckeditor5.css +0 -4
  119. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-alignment@44.3.0/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +0 -4
  120. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@44.3.0/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +0 -4
  121. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@44.3.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +0 -20
  122. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@44.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +0 -6
  123. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@44.3.0/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +0 -4
  124. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-find-and-replace@44.3.0/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +0 -5
  125. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@44.3.0/node_modules/@ckeditor/ckeditor5-font/dist/index.js +0 -7
  126. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-highlight@44.3.0/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +0 -4
  127. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-horizontal-line@44.3.0/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +0 -4
  128. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@44.3.0/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +0 -4
  129. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@44.3.0/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +0 -12
  130. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@44.3.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +0 -10
  131. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@44.3.0/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +0 -10
  132. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@44.3.0/node_modules/@ckeditor/ckeditor5-link/dist/index.js +0 -4
  133. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@44.3.0/node_modules/@ckeditor/ckeditor5-list/dist/index.js +0 -13
  134. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@44.3.0/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +0 -7
  135. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-page-break@44.3.0/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +0 -4
  136. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-remove-format@44.3.0/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +0 -4
  137. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-select-all@44.3.0/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +0 -4
  138. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-show-blocks@44.3.0/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +0 -4
  139. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@44.3.0/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +0 -12
  140. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@44.3.0/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +0 -4
  141. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@44.3.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +0 -19
  142. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@44.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +0 -29
  143. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@44.3.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +0 -4
  144. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_DataView.js +0 -1
  145. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js +0 -1
  146. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js +0 -1
  147. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js +0 -1
  148. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js +0 -1
  149. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Promise.js +0 -1
  150. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.js +0 -1
  151. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.js +0 -1
  152. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Stack.js +0 -1
  153. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +0 -1
  154. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Uint8Array.js +0 -1
  155. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_WeakMap.js +0 -1
  156. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_apply.js +0 -1
  157. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayEach.js +0 -1
  158. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayFilter.js +0 -1
  159. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayLikeKeys.js +0 -1
  160. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayMap.js +0 -1
  161. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayPush.js +0 -1
  162. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayReduce.js +0 -1
  163. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arraySome.js +0 -1
  164. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiToArray.js +0 -1
  165. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiWords.js +0 -1
  166. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignMergeValue.js +0 -1
  167. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignValue.js +0 -1
  168. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js +0 -1
  169. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssign.js +0 -1
  170. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignIn.js +0 -1
  171. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignValue.js +0 -1
  172. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseClone.js +0 -1
  173. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseCreate.js +0 -1
  174. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseEach.js +0 -1
  175. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFor.js +0 -1
  176. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseForOwn.js +0 -1
  177. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGet.js +0 -1
  178. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetAllKeys.js +0 -1
  179. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +0 -1
  180. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseHasIn.js +0 -1
  181. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsArguments.js +0 -1
  182. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqual.js +0 -1
  183. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqualDeep.js +0 -1
  184. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsMap.js +0 -1
  185. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsMatch.js +0 -1
  186. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js +0 -1
  187. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsSet.js +0 -1
  188. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsTypedArray.js +0 -1
  189. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIteratee.js +0 -1
  190. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeys.js +0 -1
  191. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeysIn.js +0 -1
  192. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMap.js +0 -1
  193. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMatches.js +0 -1
  194. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMatchesProperty.js +0 -1
  195. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMerge.js +0 -1
  196. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMergeDeep.js +0 -1
  197. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseProperty.js +0 -1
  198. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyDeep.js +0 -1
  199. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyOf.js +0 -1
  200. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseRest.js +0 -1
  201. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSet.js +0 -1
  202. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSetToString.js +0 -1
  203. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSlice.js +0 -1
  204. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTimes.js +0 -1
  205. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseToString.js +0 -1
  206. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +0 -1
  207. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUnary.js +0 -1
  208. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUnset.js +0 -1
  209. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.js +0 -1
  210. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castPath.js +0 -1
  211. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castSlice.js +0 -1
  212. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneArrayBuffer.js +0 -1
  213. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneBuffer.js +0 -1
  214. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneDataView.js +0 -1
  215. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneRegExp.js +0 -1
  216. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneSymbol.js +0 -1
  217. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneTypedArray.js +0 -1
  218. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyArray.js +0 -1
  219. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyObject.js +0 -1
  220. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copySymbols.js +0 -1
  221. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copySymbolsIn.js +0 -1
  222. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js +0 -1
  223. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createAssigner.js +0 -1
  224. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createBaseEach.js +0 -1
  225. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createBaseFor.js +0 -1
  226. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCaseFirst.js +0 -1
  227. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCompounder.js +0 -1
  228. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_deburrLetter.js +0 -1
  229. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_defineProperty.js +0 -1
  230. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalArrays.js +0 -1
  231. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalByTag.js +0 -1
  232. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalObjects.js +0 -1
  233. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +0 -1
  234. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeys.js +0 -1
  235. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeysIn.js +0 -1
  236. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js +0 -1
  237. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMatchData.js +0 -1
  238. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js +0 -1
  239. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getPrototype.js +0 -1
  240. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +0 -1
  241. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getSymbols.js +0 -1
  242. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getSymbolsIn.js +0 -1
  243. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getTag.js +0 -1
  244. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +0 -1
  245. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasPath.js +0 -1
  246. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicode.js +0 -1
  247. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicodeWord.js +0 -1
  248. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js +0 -1
  249. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js +0 -1
  250. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js +0 -1
  251. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js +0 -1
  252. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js +0 -1
  253. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneArray.js +0 -1
  254. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneByTag.js +0 -1
  255. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneObject.js +0 -1
  256. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIndex.js +0 -1
  257. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIterateeCall.js +0 -1
  258. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKey.js +0 -1
  259. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js +0 -1
  260. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js +0 -1
  261. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isPrototype.js +0 -1
  262. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isStrictComparable.js +0 -1
  263. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js +0 -1
  264. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js +0 -1
  265. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js +0 -1
  266. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js +0 -1
  267. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js +0 -1
  268. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js +0 -1
  269. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js +0 -1
  270. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js +0 -1
  271. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js +0 -1
  272. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js +0 -1
  273. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapToArray.js +0 -1
  274. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_matchesStrictComparable.js +0 -1
  275. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_memoizeCapped.js +0 -1
  276. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js +0 -1
  277. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeys.js +0 -1
  278. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeysIn.js +0 -1
  279. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nodeUtil.js +0 -1
  280. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +0 -1
  281. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overArg.js +0 -1
  282. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overRest.js +0 -1
  283. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_parent.js +0 -1
  284. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +0 -1
  285. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_safeGet.js +0 -1
  286. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.js +0 -1
  287. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.js +0 -1
  288. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js +0 -1
  289. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToString.js +0 -1
  290. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_shortOut.js +0 -1
  291. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackClear.js +0 -1
  292. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackDelete.js +0 -1
  293. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackGet.js +0 -1
  294. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackHas.js +0 -1
  295. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackSet.js +0 -1
  296. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringToArray.js +0 -1
  297. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringToPath.js +0 -1
  298. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toKey.js +0 -1
  299. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js +0 -1
  300. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +0 -1
  301. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeToArray.js +0 -1
  302. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeWords.js +0 -1
  303. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/assignIn.js +0 -1
  304. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/clone.js +0 -1
  305. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/cloneDeep.js +0 -1
  306. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/cloneDeepWith.js +0 -1
  307. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/constant.js +0 -1
  308. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +0 -1
  309. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/deburr.js +0 -1
  310. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js +0 -1
  311. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/escapeRegExp.js +0 -1
  312. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get.js +0 -1
  313. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/hasIn.js +0 -1
  314. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/identity.js +0 -1
  315. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArguments.js +0 -1
  316. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js +0 -1
  317. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLike.js +0 -1
  318. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLikeObject.js +0 -1
  319. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isBuffer.js +0 -1
  320. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isElement.js +0 -1
  321. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqual.js +0 -1
  322. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqualWith.js +0 -1
  323. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js +0 -1
  324. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isLength.js +0 -1
  325. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isMap.js +0 -1
  326. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +0 -1
  327. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +0 -1
  328. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isPlainObject.js +0 -1
  329. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSet.js +0 -1
  330. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isString.js +0 -1
  331. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +0 -1
  332. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isTypedArray.js +0 -1
  333. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keys.js +0 -1
  334. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keysIn.js +0 -1
  335. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/last.js +0 -1
  336. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/map.js +0 -1
  337. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/mapValues.js +0 -1
  338. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/memoize.js +0 -1
  339. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.js +0 -1
  340. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/mergeWith.js +0 -1
  341. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +0 -1
  342. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/property.js +0 -1
  343. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set.js +0 -1
  344. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/startCase.js +0 -1
  345. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubArray.js +0 -1
  346. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubFalse.js +0 -1
  347. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/throttle.js +0 -1
  348. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +0 -1
  349. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toPlainObject.js +0 -1
  350. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toString.js +0 -1
  351. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/unset.js +0 -1
  352. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/upperFirst.js +0 -1
  353. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/words.js +0 -1
  354. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/channels/index.js +0 -0
  355. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/client-logger/index.js +0 -0
  356. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/core-events/index.js +0 -0
  357. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/csf/index.js +0 -0
  358. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/preview-api/index.js +0 -0
  359. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/preview-errors.js +0 -0
  360. /package/dist/node_modules/.pnpm/{@vitest_browser@3.1.2_msw@2.7.3_@types_node@22.13.10_typescript@5.8.3__playwright@1.52._d9f437d9be40af4c1087950720317100 → @vitest_browser@3.1.2_msw@2.7.3_@types_node@22.14.1_typescript@5.8.3__playwright@1.52.0_92e0976dd8f8178c7dbbaa4988dfa8c8}/node_modules/@vitest/browser/context.js +0 -0
  361. /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.13.10_@vitest_browser@3.1.2_@vitest_ui@_b3e273fb96cdae5dad1113241e94b66d → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.14.1_@vitest_browser@3.1.2_@vitest_ui@3_941980ac824345de547571ef69676a52}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +0 -0
  362. /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.13.10_@vitest_browser@3.1.2_@vitest_ui@_b3e273fb96cdae5dad1113241e94b66d → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.14.1_@vitest_browser@3.1.2_@vitest_ui@3_941980ac824345de547571ef69676a52}/node_modules/vitest/dist/chunks/date.CDOsz-HY.js +0 -0
  363. /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.13.10_@vitest_browser@3.1.2_@vitest_ui@_b3e273fb96cdae5dad1113241e94b66d → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.14.1_@vitest_browser@3.1.2_@vitest_ui@3_941980ac824345de547571ef69676a52}/node_modules/vitest/dist/chunks/utils.CgTj3MsC.js +0 -0
  364. /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.13.10_@vitest_browser@3.1.2_@vitest_ui@_b3e273fb96cdae5dad1113241e94b66d → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.14.1_@vitest_browser@3.1.2_@vitest_ui@3_941980ac824345de547571ef69676a52}/node_modules/vitest/dist/chunks/vi.ClIskdbk.js +0 -0
@@ -0,0 +1,28 @@
1
+ var Gt=Object.defineProperty;var Rt=(s,o,e)=>o in s?Gt(s,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[o]=e;var l=(s,o,e)=>Rt(s,typeof o!="symbol"?o+"":o,e);import{getEnvKeystrokeText as J,uid as ee,env as _,delay as Ht,createElement as O,KeystrokeHandler as P,FocusTracker as v,toUnit as re,global as p,Rect as x,DomEmitterMixin as ye,ObservableMixin as le,Collection as Ce,isIterable as De,CKEditorError as V,getOptimalPosition as Ve,logWarning as E,EmitterMixin as lt,isVisible as L,isNode as at,priorities as zt,isText as Ut,ResizeObserver as ct,toArray as ae,first as $t,parseBase64EncodedObject as ht,isRange as Kt}from"../../../../../@ckeditor_ckeditor5-utils@45.0.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{Plugin as xe,ContextPlugin as jt}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{IconAccessibility as Se,IconCancel as ut,IconDropdownArrow as ce,IconDragIndicator as Xt,IconPilcrow as qt,IconThreeVerticalDots as Ee,IconText as Yt,IconPlus as Qt,IconParagraph as Zt,IconImportExport as Jt,IconBold as ei,IconAlignLeft as ti,IconCheck as dt,IconPreviousArrow as ii,IconNextArrow as si,IconColorPalette as oi,IconEraser as ni,IconProjectLogo as ri,IconColorTileCheck as li}from"../../../../../@ckeditor_ckeditor5-icons@45.0.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import Me from"../../../../../color-parse@1.4.2/node_modules/color-parse/index.js";import*as ft from"../../../../../../../_virtual/index.js";import{HexBase as ai}from"../../../../../vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/entrypoints/hex.js";import"../../../../../@ckeditor_ckeditor5-engine@45.0.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{assignIn as ci}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/assignIn.js";import{isObject as te}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isObject.js";import{cloneDeep as Ie}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.js";import{debounce as be}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/debounce.js";import{isElement as Oe}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isElement.js";import{cloneDeepWith as hi}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js";import{throttle as ui}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/throttle.js";/**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */class D extends Ce{constructor(e=[]){super(e,{idProperty:"viewUid"});l(this,"_parentElement");this.on("add",(t,i,n)=>{this._renderViewIntoCollectionParent(i,n)}),this.on("remove",(t,i)=>{i.element&&this._parentElement&&i.element.remove()}),this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e;for(const t of this)this._renderViewIntoCollectionParent(t)}delegate(...e){if(!e.length||!di(e))throw new V("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const i of this)for(const n of e)i.delegate(n).to(t);this.on("add",(i,n)=>{for(const r of e)n.delegate(r).to(t)}),this.on("remove",(i,n)=>{for(const r of e)n.stopDelegating(r,t)})}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}function di(s){return s.every(o=>typeof o=="string")}const fi="http://www.w3.org/1999/xhtml";class I extends lt(){constructor(e){super();l(this,"ns");l(this,"tag");l(this,"text");l(this,"attributes");l(this,"children");l(this,"eventListeners");l(this,"_isRendered");l(this,"_revertData");Object.assign(this,We(Ne(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData=He(),this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new V("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){function*e(t){if(t.children)for(const i of t.children)ie(i)?yield i:Pe(i)&&(yield*e(i))}yield*e(this)}static bind(e,t){return{to(i,n){return new pi({eventNameOrFunction:i,attribute:i,observable:e,emitter:t,callback:n})},if(i,n,r){return new pt({observable:e,emitter:t,attribute:i,valueIfTrue:n,callback:r})}}}static extend(e,t){if(e._isRendered)throw new V("template-extend-render",[this,e]);gt(e,We(Ne(t)))}_renderNode(e){let t;if(e.node?t=this.tag&&this.text:t=this.tag?this.text:!this.text,t)throw new V("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||fi,this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),Y(this.text)?this._bindToObservable({schema:this.text,updater:wi(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,i=e.revertData;for(const n in this.attributes){const r=t.getAttribute(n),a=this.attributes[n];i&&(i.attributes[n]=r);const u=Re(a)?a[0].ns:null;if(Y(a)){const c=Re(a)?a[0].value:a;i&&ze(n)&&c.unshift(r),this._bindToObservable({schema:c,updater:bi(t,n,u),data:e})}else if(n=="style"&&typeof a[0]!="string")this._renderStyleAttribute(a[0],e);else{i&&r&&ze(n)&&a.unshift(r);const c=a.map(h=>h&&(h.value||h)).reduce((h,f)=>h.concat(f),[]).reduce(bt,"");G(c)||t.setAttributeNS(u,n,c)}}}_renderStyleAttribute(e,t){const i=t.node;for(const n in e){const r=e[n];Y(r)?this._bindToObservable({schema:[r],updater:gi(i,n),data:t}):i.style[n]=r}}_renderElementChildren(e){const t=e.node,i=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let r=0;for(const a of this.children)if(Be(a)){if(!n){a.setParent(t);for(const u of a)i.appendChild(u.element)}}else if(ie(a))n||(a.isRendered||a.render(),i.appendChild(a.element));else if(at(a))i.appendChild(a);else if(n){const u=e.revertData,c=He();u.children.push(c),a._renderNode({intoFragment:!1,node:i.childNodes[r++],isApplying:!0,revertData:c})}else i.appendChild(a.render());e.intoFragment&&t.appendChild(i)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const i=this.eventListeners[t].map(n=>{const[r,a]=t.split("@");return n.activateDomEventListener(r,a,e)});e.revertData&&e.revertData.bindings.push(i)}}_bindToObservable({schema:e,updater:t,data:i}){const n=i.revertData;mt(e,t,i);const r=e.filter(a=>!G(a)).filter(a=>a.observable).map(a=>a.activateAttributeListener(e,t,i));n&&n.bindings.push(r)}_revertTemplateFromNode(e,t){for(const n of t.bindings)for(const r of n)r();if(t.text){e.textContent=t.text;return}const i=e;for(const n in t.attributes){const r=t.attributes[n];r===null?i.removeAttribute(n):i.setAttribute(n,r)}for(let n=0;n<t.children.length;++n)this._revertTemplateFromNode(i.childNodes[n],t.children[n])}}class K{constructor(o){l(this,"attribute");l(this,"observable");l(this,"emitter");l(this,"callback");this.attribute=o.attribute,this.observable=o.observable,this.emitter=o.emitter,this.callback=o.callback}getValue(o){const e=this.observable[this.attribute];return this.callback?this.callback(e,o):e}activateAttributeListener(o,e,t){const i=()=>mt(o,e,t);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,i),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,i)}}}class pi extends K{constructor(e){super(e);l(this,"eventNameOrFunction");this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,i){const n=(r,a)=>{(!t||a.target.matches(t))&&(typeof this.eventNameOrFunction=="function"?this.eventNameOrFunction(a):this.observable.fire(this.eventNameOrFunction,a))};return this.emitter.listenTo(i.node,e,n),()=>{this.emitter.stopListening(i.node,e,n)}}}class pt extends K{constructor(e){super(e);l(this,"valueIfTrue");this.valueIfTrue=e.valueIfTrue}getValue(e){const t=super.getValue(e);return G(t)?!1:this.valueIfTrue||!0}}function Y(s){return s?(s.value&&(s=s.value),Array.isArray(s)?s.some(Y):s instanceof K):!1}function mi(s,o){return s.map(e=>e instanceof K?e.getValue(o):e)}function mt(s,o,{node:e}){const t=mi(s,e);let i;s.length==1&&s[0]instanceof pt?i=t[0]:i=t.reduce(bt,""),G(i)?o.remove():o.set(i)}function wi(s){return{set(o){s.textContent=o},remove(){s.textContent=""}}}function bi(s,o,e){return{set(t){s.setAttributeNS(e,o,t)},remove(){s.removeAttributeNS(e,o)}}}function gi(s,o){return{set(e){s.style[o]=e},remove(){s.style[o]=null}}}function Ne(s){return hi(s,e=>{if(e&&(e instanceof K||Pe(e)||ie(e)||Be(e)))return e})}function We(s){if(typeof s=="string"?s=Ti(s):s.text&&vi(s),s.on&&(s.eventListeners=ki(s.on),delete s.on),!s.text){s.attributes&&_i(s.attributes);const o=[];if(s.children)if(Be(s.children))o.push(s.children);else for(const e of s.children)Pe(e)||ie(e)||at(e)?o.push(e):o.push(new I(e));s.children=o}return s}function _i(s){for(const o in s)s[o].value&&(s[o].value=ae(s[o].value)),wt(s,o)}function ki(s){for(const o in s)wt(s,o);return s}function Ti(s){return{text:[s]}}function vi(s){s.text=ae(s.text)}function wt(s,o){s[o]=ae(s[o])}function bt(s,o){return G(o)?s:G(s)?o:`${s} ${o}`}function Ge(s,o){for(const e in o)s[e]?s[e].push(...o[e]):s[e]=o[e]}function gt(s,o){if(o.attributes&&(s.attributes||(s.attributes={}),Ge(s.attributes,o.attributes)),o.eventListeners&&(s.eventListeners||(s.eventListeners={}),Ge(s.eventListeners,o.eventListeners)),o.text&&s.text.push(...o.text),o.children&&o.children.length){if(s.children.length!=o.children.length)throw new V("ui-template-extend-children-mismatch",s);let e=0;for(const t of o.children)gt(s.children[e++],t)}}function G(s){return!s&&s!==0}function ie(s){return s instanceof d}function Pe(s){return s instanceof I}function Be(s){return s instanceof D}function Re(s){return te(s[0])&&s[0].ns}function He(){return{children:[],bindings:[],attributes:{}}}function ze(s){return s=="class"||s=="style"}class d extends ye(le()){constructor(e){super();l(this,"element");l(this,"isRendered");l(this,"locale");l(this,"t");l(this,"template");l(this,"_viewCollections");l(this,"_unboundChildren");l(this,"_bindTemplate");this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Ce,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,i)=>{i.locale=e,i.t=e&&e.t}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=I.bind(this,this)}createCollection(e){const t=new D(e);return this._viewCollections.add(t),t}registerChild(e){De(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){De(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new I(e)}extendTemplate(e){I.extend(this.template,e)}render(){if(this.isRendered)throw new V("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}/**
5
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
6
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
7
+ */function _t({emitter:s,activator:o,callback:e,contextElements:t,listenerOptions:i}){s.listenTo(document,"mousedown",(n,r)=>{if(!o())return;const a=typeof r.composedPath=="function"?r.composedPath():[],u=typeof t=="function"?t():t;for(const c of u)if(c.contains(r.target)||a.includes(c))return;e()},i)}/**
8
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
9
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
10
+ */function ho(s){class o extends s{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...t){super(...t),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}return o}/**
11
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
12
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
13
+ */function uo({view:s}){s.listenTo(s.element,"submit",(o,e)=>{e.preventDefault(),s.fire("submit")},{useCapture:!0})}/**
14
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
15
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
16
+ */function yi({keystrokeHandler:s,focusTracker:o,gridItems:e,numberOfColumns:t,uiLanguageDirection:i}){const n=typeof t=="number"?()=>t:t;s.set("arrowright",r((c,h)=>i==="rtl"?u(c,h.length):a(c,h.length))),s.set("arrowleft",r((c,h)=>i==="rtl"?a(c,h.length):u(c,h.length))),s.set("arrowup",r((c,h)=>{let f=c-n();return f<0&&(f=c+n()*Math.floor(h.length/n()),f>h.length-1&&(f-=n())),f})),s.set("arrowdown",r((c,h)=>{let f=c+n();return f>h.length-1&&(f=c%n()),f}));function r(c){return h=>{const f=e.find(S=>S.element===o.focusedElement),b=e.getIndex(f),k=c(b,e);e.get(k).focus(),h.stopPropagation(),h.preventDefault()}}function a(c,h){return c===h-1?0:c+1}function u(c,h){return c===0?h-1:c-1}}const se=class se extends d{constructor(){super();const o=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.set("isVisible",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon",o.if("isVisible","ck-hidden",e=>!e),"ck-reset_all-excluded",o.if("isColorInherited","ck-icon_inherit-color")],viewBox:o.to("viewBox"),"aria-hidden":!0}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const e=new DOMParser().parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg");if(!e)throw new V("ui-iconview-invalid-svg",this);const t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:i,value:n}of Array.from(e.attributes))se.presentationalAttributeNames.includes(i)&&this.element.setAttribute(i,n);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(o=>{o.style.fill=this.fillColor})}};l(se,"presentationalAttributeNames",["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"]);let F=se;class kt extends d{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const o=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:o.to("style"),id:o.to("id")},children:[{text:o.to("text")}]})}}class w extends d{constructor(e,t=new kt){super(e);l(this,"children");l(this,"labelView");l(this,"iconView");l(this,"keystrokeView");l(this,"_focusDelayed",null);const i=this.bindTemplate,n=ee();this.set("_ariaPressed",!1),this.set("_ariaChecked",!1),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${n}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._setupLabelView(t),this.iconView=new F,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.iconView.bind("content").to(this,"icon"),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const r={tag:"button",attributes:{class:["ck","ck-button",i.to("class"),i.if("isEnabled","ck-disabled",a=>!a),i.if("isVisible","ck-hidden",a=>!a),i.to("isOn",a=>a?"ck-on":"ck-off"),i.if("withText","ck-button_with-text"),i.if("withKeystroke","ck-button_with-keystroke")],role:i.to("role"),type:i.to("type",a=>a||"button"),tabindex:i.to("tabindex"),"aria-checked":i.to("_ariaChecked"),"aria-pressed":i.to("_ariaPressed"),"aria-label":i.to("ariaLabel"),"aria-labelledby":i.to("ariaLabelledBy"),"aria-disabled":i.if("isEnabled",!0,a=>!a),"data-cke-tooltip-text":i.to("_tooltipString"),"data-cke-tooltip-position":i.to("tooltipPosition")},children:this.children,on:{click:i.to(a=>{this.isEnabled?this.fire("execute"):a.preventDefault()})}};this.bind("_ariaPressed").to(this,"isOn",this,"isToggleable",this,"role",(a,u,c)=>!u||Ue(c)?!1:String(!!a)),this.bind("_ariaChecked").to(this,"isOn",this,"isToggleable",this,"role",(a,u,c)=>!u||!Ue(c)?!1:String(!!a)),_.isSafari&&(this._focusDelayed||(this._focusDelayed=Ht(()=>this.focus(),0)),r.on.mousedown=i.to(()=>{this._focusDelayed()}),r.on.mouseup=i.to(()=>{this._focusDelayed.cancel()})),this.setTemplate(r)}render(){super.render(),this.icon&&this.children.add(this.iconView),this.on("change:icon",(e,t,i,n)=>{i&&!n?this.children.add(this.iconView,0):!i&&n&&this.children.remove(this.iconView)}),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_setupLabelView(e){return e.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),e}_createKeystrokeView(){const e=new d;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",t=>J(t))}]}),e}_getTooltipString(e,t,i){return e?typeof e=="string"?e:(i&&(i=J(i)),e instanceof Function?e(t,i):`${t}${i?` (${i})`:""}`):""}}function Ue(s){switch(s){case"radio":case"checkbox":case"option":case"switch":case"menuitemcheckbox":case"menuitemradio":return!0;default:return!1}}class Ci extends d{constructor(e,t={}){super(e);l(this,"children");l(this,"iconView");const i=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",i.to("class")]},children:this.children}),t.icon&&(this.iconView=new F,this.iconView.content=t.icon,this.children.add(this.iconView));const n=new d(e);n.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"],role:"presentation"},children:[{text:i.to("label")}]}),this.children.add(n)}}class z extends lt(){constructor(e){super();l(this,"focusables");l(this,"focusTracker");l(this,"keystrokeHandler");l(this,"actions");if(this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let i=e.actions[t];typeof i=="string"&&(i=[i]);for(const n of i)e.keystrokeHandler.set(n,(r,a)=>{this[t](),a()},e.keystrokeHandlerOptions)}this.on("forwardCycle",()=>this.focusFirst(),{priority:"low"}),this.on("backwardCycle",()=>this.focusLast(),{priority:"low"})}get first(){return this.focusables.find(ue)||null}get last(){return this.focusables.filter(ue).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let e=null;return this.focusTracker.focusedElement===null?null:(this.focusables.find((t,i)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=i),n}),e)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const e=this.next;if(e&&this.focusables.getIndex(e)===this.current){this.fire("forwardCycle");return}e===this.first?this.fire("forwardCycle"):this._focus(e,1)}focusPrevious(){const e=this.previous;if(e&&this.focusables.getIndex(e)===this.current){this.fire("backwardCycle");return}e===this.last?this.fire("backwardCycle"):this._focus(e,-1)}chain(e){const t=()=>this.current===null?null:this.focusables.get(this.current);this.listenTo(e,"forwardCycle",i=>{const n=t();this.focusNext(),n!==t()&&i.stop()},{priority:"low"}),this.listenTo(e,"backwardCycle",i=>{const n=t();this.focusPrevious(),n!==t()&&i.stop()},{priority:"low"})}unchain(e){this.stopListening(e)}_focus(e,t){e&&this.focusTracker.focusedElement!==e.element&&e.focus(t)}_getDomFocusableItem(e){const t=this.focusables.length;if(!t)return null;const i=this.current;if(i===null)return this[e===1?"first":"last"];let n=this.focusables.get(i),r=(i+t+e)%t;do{const a=this.focusables.get(r);if(ue(a)){n=a;break}r=(r+t+e)%t}while(r!==i);return n}}function ue(s){return j(s)&&L(s.element)}function j(s){return"focus"in s&&typeof s.focus=="function"}function Vi(s){return j(s)&&"focusCycler"in s&&s.focusCycler instanceof z}function xi(s){class o extends s{constructor(...i){super(...i);l(this,"_onDragBound",this._onDrag.bind(this));l(this,"_onDragEndBound",this._onDragEnd.bind(this));l(this,"_lastDraggingCoordinates",{x:0,y:0});this.on("render",()=>{this._attachListeners()}),this.set("isDragging",!1)}_attachListeners(){this.listenTo(this.element,"mousedown",this._onDragStart.bind(this)),this.listenTo(this.element,"touchstart",this._onDragStart.bind(this))}_attachDragListeners(){this.listenTo(p.document,"mouseup",this._onDragEndBound),this.listenTo(p.document,"touchend",this._onDragEndBound),this.listenTo(p.document,"mousemove",this._onDragBound),this.listenTo(p.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening(p.document,"mouseup",this._onDragEndBound),this.stopListening(p.document,"touchend",this._onDragEndBound),this.stopListening(p.document,"mousemove",this._onDragBound),this.stopListening(p.document,"touchmove",this._onDragBound)}_onDragStart(i,n){if(!this._isHandleElementPressed(n))return;this._attachDragListeners();let r=0,a=0;n instanceof MouseEvent?(r=n.clientX,a=n.clientY):(r=n.touches[0].clientX,a=n.touches[0].clientY),this._lastDraggingCoordinates={x:r,y:a},this.isDragging=!0}_onDrag(i,n){if(!this.isDragging){this._detachDragListeners();return}let r=0,a=0;n instanceof MouseEvent?(r=n.clientX,a=n.clientY):(r=n.touches[0].clientX,a=n.touches[0].clientY),n.preventDefault(),this.fire("drag",{deltaX:Math.round(r-this._lastDraggingCoordinates.x),deltaY:Math.round(a-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:r,y:a}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(i){return this.dragHandleElement?this.dragHandleElement===i.target||i.target instanceof HTMLElement&&this.dragHandleElement.contains(i.target):!1}}return o}class Ei extends d{constructor(e){super(e);l(this,"children");l(this,"keystrokes");l(this,"focusCycler");l(this,"_focusTracker");l(this,"_focusables");this.children=this.createCollection(),this.keystrokes=new P,this._focusTracker=new v,this._focusables=new D,this.focusCycler=new z({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__actions"]},children:this.children})}render(){super.render(),this.keystrokes.listenTo(this.element)}setButtons(e){for(const t of e){const i=new w(this.locale);let n;i.on("execute",()=>t.onExecute()),t.onCreate&&t.onCreate(i);for(n in t)n!="onExecute"&&n!="onCreate"&&i.set(n,t[n]);this.children.add(i)}this._updateFocusCyclableItems()}focus(e){e===-1?this.focusCycler.focusLast():this.focusCycler.focusFirst()}_updateFocusCyclableItems(){Array.from(this.children).forEach(e=>{this._focusables.add(e),this._focusTracker.add(e.element)})}}class Ii extends d{constructor(e){super(e);l(this,"children");this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__content"]},children:this.children})}reset(){for(;this.children.length;)this.children.remove(0)}}const y={SCREEN_CENTER:"screen-center",EDITOR_CENTER:"editor-center",EDITOR_TOP_SIDE:"editor-top-side",EDITOR_TOP_CENTER:"editor-top-center",EDITOR_BOTTOM_CENTER:"editor-bottom-center",EDITOR_ABOVE_CENTER:"editor-above-center",EDITOR_BELOW_CENTER:"editor-below-center"},$e=re("px"),oe=class oe extends xi(d){constructor(e,{getCurrentDomRoot:t,getViewportOffset:i,keystrokeHandlerOptions:n}){super(e);l(this,"parts");l(this,"headerView");l(this,"closeButtonView");l(this,"actionsView");l(this,"contentView");l(this,"keystrokes");l(this,"focusTracker");l(this,"wasMoved",!1);l(this,"_getCurrentDomRoot");l(this,"_getViewportOffset");l(this,"_focusables");l(this,"_focusCycler");const r=this.bindTemplate,a=e.t;this.set("className",""),this.set("ariaLabel",a("Editor dialog")),this.set("isModal",!1),this.set("position",y.SCREEN_CENTER),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=t,this._getViewportOffset=i,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new P,this.focusTracker=new v,this._focusables=new D,this._focusCycler=new z({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"},keystrokeHandlerOptions:n}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",r.if("isModal","ck-dialog-overlay__transparent",u=>!u),r.if("_isVisible","ck-hidden",u=>!u)],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",r.if("isModal","ck-dialog_modal"),r.to("className")],role:"dialog","aria-label":r.to("ariaLabel"),style:{top:r.to("_top",u=>$e(u)),left:r.to("_left",u=>$e(u)),visibility:r.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",(e,t)=>{e.defaultPrevented||(this.fire("close",{source:"escKeyPress"}),t())}),this.on("drag",(e,{deltaX:t,deltaY:i})=>{this.wasMoved=!0,this.moveBy(t,i)}),this.listenTo(p.window,"resize",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.listenTo(p.document,"scroll",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.on("change:_isVisible",(e,t,i)=>{i&&(this._isTransparent=!0,setTimeout(()=>{this.updatePosition(),this._isTransparent=!1,this.focus()},10))}),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView&&!this.isModal?this.headerView.element:null}setupParts({icon:e,title:t,hasCloseButton:i=!0,content:n,actionButtons:r}){t&&(this.headerView=new Ci(this.locale,{icon:e}),i&&(this.closeButtonView=this._createCloseButton(),this.headerView.children.add(this.closeButtonView)),this.headerView.label=t,this.ariaLabel=t,this.parts.add(this.headerView,0)),n&&(n instanceof d&&(n=[n]),this.contentView=new Ii(this.locale),this.contentView.children.addMany(n),this.parts.add(this.contentView)),r&&(this.actionsView=new Ei(this.locale),this.actionsView.setButtons(r),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(e,t){const i=this._getViewportRect(),n=this._getDialogRect();e+n.width>i.right&&(e=i.right-n.width),e<i.left&&(e=i.left),t<i.top&&(t=i.top),this._moveTo(e,t)}_moveTo(e,t){this._left=e,this._top=t}moveBy(e,t){this.moveTo(this._left+e,this._top+t)}_moveOffScreen(){this._moveTo(-9999,-9999)}updatePosition(){if(!this.element||!this.element.parentNode)return;const e=this._getViewportRect();let t=this.position,i;this._getCurrentDomRoot()?i=this._getVisibleDomRootRect(e):t=y.SCREEN_CENTER;const n=oe.defaultOffset,r=this._getDialogRect();switch(t){case y.EDITOR_TOP_SIDE:{if(i){const a=this.locale.contentLanguageDirection==="ltr"?i.right-r.width-n:i.left+n;this.moveTo(a,i.top+n)}else this._moveOffScreen();break}case y.EDITOR_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-r.width/2),Math.round(i.top+i.height/2-r.height/2)):this._moveOffScreen();break}case y.SCREEN_CENTER:{this.moveTo(Math.round((e.width-r.width)/2),Math.round((e.height-r.height)/2));break}case y.EDITOR_TOP_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-r.width/2),i.top+n):this._moveOffScreen();break}case y.EDITOR_BOTTOM_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-r.width/2),i.bottom-r.height-n):this._moveOffScreen();break}case y.EDITOR_ABOVE_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-r.width/2),i.top-r.height-n):this._moveOffScreen();break}case y.EDITOR_BELOW_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-r.width/2),i.bottom+n):this._moveOffScreen();break}}}_getVisibleDomRootRect(e){let t=new x(this._getCurrentDomRoot()).getVisible();if(t){if(t=e.getIntersection(t),!t)return null}else return null;return t}_getDialogRect(){return new x(this.element.firstElementChild)}_getViewportRect(){const e=new x(p.window);if(this.isModal)return e;const t={top:0,bottom:0,left:0,right:0,...this._getViewportOffset()};return e.top+=t.top,e.height-=t.top,e.bottom-=t.bottom,e.height-=t.bottom,e.left+=t.left,e.right-=t.right,e.width-=t.left+t.right,e}_updateFocusCyclableItems(){const e=[];if(this.contentView)for(const t of this.contentView.children)j(t)&&e.push(t);this.actionsView&&e.push(this.actionsView),this.closeButtonView&&e.push(this.closeButtonView),e.forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element),Vi(t)&&this._focusCycler.chain(t.focusCycler)})}_createCloseButton(){const e=new w(this.locale),t=this.locale.t;return e.set({label:t("Close"),tooltip:!0,icon:ut}),e.on("execute",()=>this.fire("close",{source:"closeButton"})),e}};l(oe,"defaultOffset",15);let ge=oe;const C=class C extends xe{constructor(e){super(e);l(this,"view");l(this,"_onHide");const t=e.t;this._initShowHideListeners(),this._initFocusToggler(),this._initMultiRootIntegration(),this.set({id:null,isOpen:!1}),e.accessibility.addKeystrokeInfos({categoryId:"navigation",keystrokes:[{label:t("Move focus in and out of an active dialog window"),keystroke:"Ctrl+F6",mayRequireFn:!0}]})}static get pluginName(){return"Dialog"}static get isOfficialPlugin(){return!0}destroy(){super.destroy(),C._visibleDialogPlugin===this&&this._unlockBodyScroll()}_initShowHideListeners(){this.on("show",(e,t)=>{this._show(t)}),this.on("show",(e,t)=>{t.onShow&&t.onShow(this)},{priority:"low"}),this.on("hide",()=>{C._visibleDialogPlugin&&C._visibleDialogPlugin._hide()}),this.on("hide",()=>{this._onHide&&(this._onHide(this),this._onHide=void 0)},{priority:"low"})}_initFocusToggler(){const e=this.editor;e.keystrokes.set("Ctrl+F6",(t,i)=>{!this.isOpen||this.view.isModal||(this.view.focusTracker.isFocused?e.editing.view.focus():this.view.focus(),i())})}_initMultiRootIntegration(){const e=this.editor.model;e.document.on("change:data",()=>{if(!this.view)return;const t=e.document.differ.getChangedRoots();for(const i of t)i.state&&this.view.updatePosition()})}show(e){this.hide(),this.fire(`show:${e.id}`,e)}_show({id:e,icon:t,title:i,hasCloseButton:n=!0,content:r,actionButtons:a,className:u,isModal:c,position:h,onHide:f,keystrokeHandlerOptions:b}){const k=this.editor;this.view=new ge(k.locale,{getCurrentDomRoot:()=>k.editing.view.getDomRoot(k.model.document.selection.anchor.root.rootName),getViewportOffset:()=>k.ui.viewportOffset,keystrokeHandlerOptions:b});const S=this.view;S.on("close",()=>{this.hide()}),k.ui.view.body.add(S),k.keystrokes.listenTo(S.element),h||(h=c?y.SCREEN_CENTER:y.EDITOR_CENTER),c&&this._lockBodyScroll(),S.set({position:h,_isVisible:!0,className:u,isModal:c}),S.setupParts({icon:t,title:i,hasCloseButton:n,content:r,actionButtons:a}),this.id=e,f&&(this._onHide=f),this.isOpen=!0,C._visibleDialogPlugin=this}hide(){C._visibleDialogPlugin&&C._visibleDialogPlugin.fire(`hide:${C._visibleDialogPlugin.id}`)}_hide(){if(!this.view)return;const e=this.editor,t=this.view;t.isModal&&this._unlockBodyScroll(),t.contentView&&t.contentView.reset(),e.ui.view.body.remove(t),e.ui.focusTracker.remove(t.element),e.keystrokes.stopListening(t.element),t.destroy(),e.editing.view.focus(),this.id=null,this.isOpen=!1,C._visibleDialogPlugin=null}_lockBodyScroll(){document.documentElement.classList.add("ck-dialog-scroll-locked")}_unlockBodyScroll(){document.documentElement.classList.remove("ck-dialog-scroll-locked")}};l(C,"_visibleDialogPlugin");let _e=C;class R extends w{constructor(e,t=new kt){super(e,t);l(this,"_checkIconHolderView",new Oi);this.set({hasCheckSpace:!1,_hasCheck:this.isToggleable});const i=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-list-item-button",i.if("isToggleable","ck-list-item-button_toggleable")]}}),this.bind("_hasCheck").to(this,"hasCheckSpace",this,"isToggleable",(n,r)=>n||r)}render(){super.render(),this._hasCheck&&this.children.add(this._checkIconHolderView,0),this._watchCheckIconHolderMount()}_watchCheckIconHolderMount(){this._checkIconHolderView.bind("isOn").to(this,"isOn",e=>this.isToggleable&&e),this.on("change:_hasCheck",(e,t,i)=>{const{children:n,_checkIconHolderView:r}=this;i?n.add(r,0):n.remove(r)})}}class Oi extends d{constructor(){super();l(this,"children");l(this,"_checkIconView",this._createCheckIconView());const e=this.bindTemplate;this.children=this.createCollection(),this.set("isOn",!1),this.setTemplate({tag:"span",children:this.children,attributes:{class:["ck","ck-list-item-button__check-holder",e.to("isOn",t=>t?"ck-on":"ck-off")]}})}render(){super.render(),this.isOn&&this.children.add(this._checkIconView,0),this._watchCheckIconMount()}_watchCheckIconMount(){this.on("change:isOn",(e,t,i)=>{const{children:n,_checkIconView:r}=this;i&&!n.has(r)?n.add(r):!i&&n.has(r)&&n.remove(r)})}_createCheckIconView(){const e=new F;return e.content=dt,e.extendTemplate({attributes:{class:"ck-list-item-button__check-icon"}}),e}}class Tt extends R{constructor(o){super(o),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}class he extends d{constructor(e){super(e);l(this,"id");this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${ee()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class Pi extends d{constructor(o,e){super(o);const t=o.t,i=new he;i.text=t("Help Contents. To close this dialog press ESC."),this.setTemplate({tag:"div",attributes:{class:["ck","ck-accessibility-help-dialog__content"],"aria-labelledby":i.id,role:"document",tabindex:-1},children:[O(document,"p",{},t("Below, you can find a list of keyboard shortcuts that can be used in the editor.")),...this._createCategories(Array.from(e.values())),i]})}focus(){this.element.focus()}_createCategories(o){return o.map(e=>{const t=[O(document,"h3",{},e.label),...Array.from(e.groups.values()).map(i=>this._createGroup(i)).flat()];return e.description&&t.splice(1,0,O(document,"p",{},e.description)),O(document,"section",{},t)})}_createGroup(o){const e=o.keystrokes.sort((i,n)=>i.label.localeCompare(n.label)).map(i=>this._createGroupRow(i)).flat(),t=[O(document,"dl",{},e)];return o.label&&t.unshift(O(document,"h4",{},o.label)),t}_createGroupRow(o){const e=this.locale.t,t=O(document,"dt"),i=O(document,"dd"),n=Li(o.keystroke),r=[];for(const a of n)r.push(a.map(Bi).join(""));return t.innerHTML=o.label,i.innerHTML=r.join(", ")+(o.mayRequireFn&&_.isMac?` ${e("(may require <kbd>Fn</kbd>)")}`:""),[t,i]}}function Bi(s){return J(s).split("+").map(o=>`<kbd>${o}</kbd>`).join("+")}function Li(s){return typeof s=="string"?[[s]]:typeof s[0]=="string"?[s]:s}class fo extends xe{constructor(){super(...arguments);l(this,"contentView",null)}static get requires(){return[_e]}static get pluginName(){return"AccessibilityHelp"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("accessibilityHelp",()=>{const i=this._createButton(w);return i.set({tooltip:!0,withText:!1,label:t("Accessibility help")}),i}),e.ui.componentFactory.add("menuBar:accessibilityHelp",()=>{const i=this._createButton(Tt);return i.label=t("Accessibility"),i}),e.keystrokes.set("Alt+0",(i,n)=>{this._toggleDialog(),n()}),this._setupRootLabels()}_createButton(e){const t=this.editor,i=t.plugins.get("Dialog"),n=t.locale,r=new e(n);return r.set({keystroke:"Alt+0",icon:Se,isToggleable:!0}),r.on("execute",()=>this._toggleDialog()),r.bind("isOn").to(i,"id",a=>a==="accessibilityHelp"),r}_setupRootLabels(){const e=this.editor,t=e.editing.view,i=e.t;e.ui.on("ready",()=>{t.change(r=>{for(const a of t.document.roots)n(r,a)}),e.on("addRoot",(r,a)=>{const u=e.editing.view.document.getRoot(a.rootName);t.change(c=>n(c,u))},{priority:"low"})});function n(r,a){const c=[a.getAttribute("aria-label"),i("Press %0 for help.",[J("Alt+0")])].filter(h=>h).join(". ");r.setAttribute("aria-label",c,a)}}_toggleDialog(){const e=this.editor,t=e.plugins.get("Dialog"),i=e.locale.t;this.contentView||(this.contentView=new Pi(e.locale,e.accessibility.keystrokeInfos)),t.id==="accessibilityHelp"?t.hide():t.show({id:"accessibilityHelp",className:"ck-accessibility-help-dialog",title:i("Accessibility help"),icon:Se,hasCloseButton:!0,content:this.contentView})}}const T=class T extends D{constructor(e,t=[]){super(t);l(this,"locale");l(this,"_bodyCollectionContainer");this.locale=e}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new I({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection,role:"application"},children:this}).render(),(!T._bodyWrapper||!T._bodyWrapper.isConnected)&&(T._bodyWrapper=O(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(T._bodyWrapper)),T._bodyWrapper.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove(),T._bodyWrapper&&!T._bodyWrapper.childElementCount&&(T._bodyWrapper.remove(),delete T._bodyWrapper)}};l(T,"_bodyWrapper");let ke=T;class vt extends w{constructor(e){super(e);l(this,"toggleSwitchView");this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new d;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}class po extends yt(w){}class Fi extends yt(R){}function yt(s){class o extends s{constructor(...i){super(...i);l(this,"buttonView");l(this,"_fileInputView");this.buttonView=this,this._fileInputView=new Ai(this.locale),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.on("execute",()=>{this._fileInputView.open()}),this.extendTemplate({attributes:{class:"ck-file-dialog-button"}})}render(){super.render(),this.children.add(this._fileInputView)}}return o}class Ai extends d{constructor(o){super(o),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:e.to("acceptedType"),multiple:e.to("allowMultipleFiles")},on:{change:e.to(()=>{var t,i;(i=(t=this.element)==null?void 0:t.files)!=null&&i.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}class mo extends d{constructor(e,t){super(e);l(this,"buttonView");l(this,"children");const i=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),t&&this.children.addMany(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",i.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:i.if("isCollapsed","hidden"),"aria-labelledby":i.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}focus(){this.buttonView.focus()}_createButtonView(){const e=new w(this.locale),t=e.bindTemplate;return e.set({withText:!0,icon:ce}),e.extendTemplate({attributes:{"aria-expanded":t.to("isOn",i=>String(i))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",i=>!i),e.on("execute",()=>{this.isCollapsed=!this.isCollapsed}),e}}/**
17
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
18
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
19
+ */function wo(s,o){const e=s.t,t={Black:e("Black"),"Dim grey":e("Dim grey"),Grey:e("Grey"),"Light grey":e("Light grey"),White:e("White"),Red:e("Red"),Orange:e("Orange"),Yellow:e("Yellow"),"Light green":e("Light green"),Green:e("Green"),Aquamarine:e("Aquamarine"),Turquoise:e("Turquoise"),"Light blue":e("Light blue"),Blue:e("Blue"),Purple:e("Purple")};return o.map(i=>{const n=t[i.label];return n&&n!=i.label&&(i.label=n),i})}function bo(s){return s.map(Di).filter(o=>!!o)}function Di(s){return typeof s=="string"?{model:s,label:s,hasBorder:!1,view:{name:"span",styles:{color:s}}}:{model:s.color,label:s.label||s.color,hasBorder:s.hasBorder===void 0?!1:s.hasBorder,view:{name:"span",styles:{color:`${s.color}`}}}}class Ct extends w{constructor(o){super(o);const e=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon=li,this.extendTemplate({attributes:{style:{backgroundColor:e.to("color",t=>_.isMediaForcedColors?null:t)},class:["ck","ck-color-grid__tile",e.if("hasBorder","ck-color-selector__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}class Ke extends d{constructor(e,t){super(e);l(this,"columns");l(this,"items");l(this,"focusTracker");l(this,"keystrokes");const i=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=(t==null?void 0:t.columns)||5;const n={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new v,this.keystrokes=new P,this.items.on("add",(r,a)=>{a.isOn=a.color===this.selectedColor}),i.forEach(r=>{const a=new Ct;a.set({color:r.color,label:r.label,tooltip:!0,hasBorder:r.options.hasBorder}),a.on("execute",()=>{this.fire("execute",{value:r.color,hasBorder:r.options.hasBorder,label:r.label})}),this.items.add(a)}),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:n}}),this.on("change:selectedColor",(r,a,u)=>{for(const c of this.items)c.isOn=c.color===u})}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){var e;super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",(t,i)=>{this.focusTracker.add(i.element)}),this.items.on("remove",(t,i)=>{this.focusTracker.remove(i.element)}),this.keystrokes.listenTo(this.element),yi({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:(e=this.locale)==null?void 0:e.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}/**
20
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
21
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
22
+ */function Vt(s,o){if(!s)return"";const e=xt(s);if(!e)return"";if(e.space===o)return s;if(!Wi(e))return"";const i=ft[e.space][o];if(!i)return"";const n=i(e.space==="hex"?e.hexValue:e.values);return Ni(n,o)}function Si(s){if(!s)return"";const o=xt(s);return o?o.space==="hex"?o.hexValue:Vt(s,"hex"):"#000"}function Mi(s,o){customElements.get(s)===void 0&&customElements.define(s,o)}function Ni(s,o){switch(o){case"hex":return`#${s}`;case"rgb":return`rgb(${s[0]}, ${s[1]}, ${s[2]})`;case"hsl":return`hsl(${s[0]}, ${s[1]}%, ${s[2]}%)`;case"hwb":return`hwb(${s[0]}, ${s[1]}, ${s[2]})`;case"lab":return`lab(${s[0]}% ${s[1]} ${s[2]})`;case"lch":return`lch(${s[0]}% ${s[1]} ${s[2]})`;default:return""}}function xt(s){if(s.startsWith("#")){const e=Me(s);return{space:"hex",values:e.values,hexValue:s,alpha:e.alpha}}const o=Me(s);return o.space?o:null}function Wi(s){return Object.keys(ft).includes(s.space)}class Gi extends d{constructor(e,t){super(e);l(this,"fieldView");l(this,"labelView");l(this,"statusView");l(this,"fieldWrapperChildren");const i=`ck-labeled-field-view-${ee()}`,n=`ck-labeled-field-view-status-${ee()}`;this.fieldView=t(this,i,n),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(i),this.statusView=this._createStatusView(n),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",(a,u)=>a||u);const r=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",r.to("class"),r.if("isEnabled","ck-disabled",a=>!a),r.if("isEmpty","ck-labeled-field-view_empty"),r.if("isFocused","ck-labeled-field-view_focused"),r.if("placeholder","ck-labeled-field-view_placeholder"),r.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new he(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new d(this.locale),i=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",i.if("errorText","ck-labeled-field-view__status_error"),i.if("_statusText","ck-hidden",n=>!n)],id:e,role:i.if("errorText","alert")},children:[{text:i.to("_statusText")}]}),t}focus(e){this.fieldView.focus(e)}}class Ri extends d{constructor(e){super(e);l(this,"focusTracker");this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("tabIndex",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.set("ariaLabel",void 0),this.focusTracker=new v,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),tabindex:t.to("tabIndex"),readonly:t.to("isReadOnly"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById"),"aria-label":t.to("ariaLabel")},on:{input:t.to((...i)=>{this.fire("input",...i),this._updateIsEmpty()}),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",(e,t,i)=>{this._setDomElementValue(i),this._updateIsEmpty()})}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}reset(){this.value=this.element.value="",this._updateIsEmpty()}_updateIsEmpty(){this.isEmpty=Hi(this.element)}_setDomElementValue(e){this.element.value=!e&&e!==0?"":e}}function Hi(s){return!s.value}class Et extends Ri{constructor(o){super(o),this.set("inputMode","text");const e=this.bindTemplate;this.extendTemplate({attributes:{inputmode:e.to("inputMode")}})}}class zi extends Et{constructor(o){super(o),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class Ui extends Et{constructor(o,{min:e,max:t,step:i}={}){super(o);const n=this.bindTemplate;this.set("min",e),this.set("max",t),this.set("step",i),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:n.to("min"),max:n.to("max"),step:n.to("step")}})}}class $i extends d{constructor(e){super(e);l(this,"children");const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",i=>`ck-dropdown__panel_${i}`),t.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:t.to(i=>{i.target.tagName.toLocaleLowerCase()!=="input"&&i.preventDefault()})}})}focus(){if(this.children.length){const e=this.children.first;typeof e.focus=="function"?e.focus():E("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;typeof e.focusLast=="function"?e.focusLast():e.focus()}}}const W=class W extends d{constructor(e,t,i){super(e);l(this,"buttonView");l(this,"panelView");l(this,"focusTracker");l(this,"keystrokes");l(this,"listView");l(this,"toolbarView");l(this,"menuView");const n=this.bindTemplate;this.buttonView=t,this.panelView=i,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new P,this.focusTracker=new v,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",r=>!r)],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[t,i]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":n.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.on("change:isOpen",(t,i,n)=>{if(n)if(this.panelPosition==="auto"){const r=W._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=r?r.name:this._defaultPanelPositionName}else this.panelView.position=this.panelPosition}),this.keystrokes.listenTo(this.element);const e=(t,i)=>{this.isOpen&&(this.isOpen=!1,i())};this.keystrokes.set("arrowdown",(t,i)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,i())}),this.keystrokes.set("arrowright",(t,i)=>{this.isOpen&&i()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:i,southWest:n,northEast:r,northWest:a,southMiddleEast:u,southMiddleWest:c,northMiddleEast:h,northMiddleWest:f}=W.defaultPanelPositions;return this.locale.uiLanguageDirection!=="rtl"?[i,n,u,c,e,r,a,h,f,t]:[n,i,c,u,e,a,r,f,h,t]}get _defaultPanelPositionName(){return this.locale.uiLanguageDirection==="rtl"?"sw":"se"}};l(W,"defaultPanelPositions",{south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)*3/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)*3/4,name:"nmw"})}),l(W,"_getOptimalPosition",Ve);let Te=W;class Ki extends w{constructor(e){super(e);l(this,"arrowView");this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",t=>String(t))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new F;return e.content=ce,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class A extends d{constructor(e){super(e);l(this,"children");const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",i=>!i)],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class Le extends d{constructor(o){super(o),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class Q extends d{constructor(e,t=new he){super(e);l(this,"labelView");l(this,"items");l(this,"children");const i=this.bindTemplate,n=new Fe(e);this.set({label:"",isVisible:!0}),this.labelView=t,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,n]),n.set({role:"group",ariaLabelledBy:t.id}),n.focusTracker.destroy(),n.keystrokes.destroy(),this.items=n.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",i.if("isVisible","ck-hidden",r=>!r)]},children:this.children})}focus(){if(this.items){const e=this.items.find(t=>!(t instanceof Le));e&&e.focus()}}}class Fe extends d{constructor(e){super(e);l(this,"focusables");l(this,"items");l(this,"focusTracker");l(this,"keystrokes");l(this,"_focusCycler");l(this,"_listItemGroupToChangeListeners",new WeakMap);const t=this.bindTemplate;this.focusables=new D,this.items=this.createCollection(),this.focusTracker=new v,this.keystrokes=new P,this._focusCycler=new z({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const e of this.items)e instanceof Q?this._registerFocusableItemsGroup(e):e instanceof A&&this._registerFocusableListItem(e);this.items.on("change",(e,t)=>{for(const i of t.removed)i instanceof Q?this._deregisterFocusableItemsGroup(i):i instanceof A&&this._deregisterFocusableListItem(i);for(const i of Array.from(t.added).reverse())i instanceof Q?this._registerFocusableItemsGroup(i,t.index):this._registerFocusableListItem(i,t.index)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_registerFocusableListItem(e,t){this.focusTracker.add(e.element),this.focusables.add(e,t)}_deregisterFocusableListItem(e){this.focusTracker.remove(e.element),this.focusables.remove(e)}_getOnGroupItemsChangeCallback(e){return(t,i)=>{for(const n of i.removed)this._deregisterFocusableListItem(n);for(const n of Array.from(i.added).reverse())this._registerFocusableListItem(n,this.items.getIndex(e)+i.index)}}_registerFocusableItemsGroup(e,t){Array.from(e.items).forEach((n,r)=>{const a=typeof t<"u"?t+r:void 0;this._registerFocusableListItem(n,a)});const i=this._getOnGroupItemsChangeCallback(e);this._listItemGroupToChangeListeners.set(e,i),e.items.on("change",i)}_deregisterFocusableItemsGroup(e){for(const t of e.items)this._deregisterFocusableListItem(t);e.items.off("change",this._listItemGroupToChangeListeners.get(e)),this._listItemGroupToChangeListeners.delete(e)}}const je=re("px"),ji={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}},g=class g extends d{constructor(e){super(e);l(this,"content");l(this,"_pinWhenIsVisibleCallback");l(this,"_resizeObserver");const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this._resizeObserver=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",i=>`ck-balloon-panel_${i}`),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",je),left:t.to("left",je)}},children:this.content})}destroy(){this.hide(),super.destroy()}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){const t=Z(e.target);if(t&&!L(t))return!1;this.show();const i=g.defaultPositions,n=Object.assign({},{element:this.element,positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth],limiter:p.document.body,fitInViewport:!0},e),r=g._getOptimalPosition(n)||ji,a=parseInt(r.left),u=parseInt(r.top),c=r.name,h=r.config||{},{withArrow:f=!0}=h;return this.top=u,this.left=a,this.position=c,this.withArrow=f,!0}pin(e){this.unpin(),this._startPinning(e)&&(this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback))}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){if(!this.attachTo(e))return!1;let t=Z(e.target);const i=e.limiter?Z(e.limiter):p.document.body;if(this.listenTo(p.document,"scroll",(n,r)=>{const a=r.target,u=t&&a.contains(t),c=i&&a.contains(i);(u||c||!t||!i)&&this.attachTo(e)},{useCapture:!0}),this.listenTo(p.window,"resize",()=>{this.attachTo(e)}),!this._resizeObserver&&(t&&Ut(t)&&(t=t.parentElement),t)){const n=()=>{L(t)||this.unpin()};this._resizeObserver=new ct(t,n)}return!0}_stopPinning(){this.stopListening(p.document,"scroll"),this.stopListening(p.window,"resize"),this._resizeObserver&&(this._resizeObserver.destroy(),this._resizeObserver=null)}static generatePositions(e={}){const{sideOffset:t=g.arrowSideOffset,heightOffset:i=g.arrowHeightOffset,stickyVerticalOffset:n=g.stickyVerticalOffset,config:r}=e;return{northWestArrowSouthWest:(c,h)=>({top:a(c,h),left:c.left-t,name:"arrow_sw",...r&&{config:r}}),northWestArrowSouthMiddleWest:(c,h)=>({top:a(c,h),left:c.left-h.width*.25-t,name:"arrow_smw",...r&&{config:r}}),northWestArrowSouth:(c,h)=>({top:a(c,h),left:c.left-h.width/2,name:"arrow_s",...r&&{config:r}}),northWestArrowSouthMiddleEast:(c,h)=>({top:a(c,h),left:c.left-h.width*.75+t,name:"arrow_sme",...r&&{config:r}}),northWestArrowSouthEast:(c,h)=>({top:a(c,h),left:c.left-h.width+t,name:"arrow_se",...r&&{config:r}}),northArrowSouthWest:(c,h)=>({top:a(c,h),left:c.left+c.width/2-t,name:"arrow_sw",...r&&{config:r}}),northArrowSouthMiddleWest:(c,h)=>({top:a(c,h),left:c.left+c.width/2-h.width*.25-t,name:"arrow_smw",...r&&{config:r}}),northArrowSouth:(c,h)=>({top:a(c,h),left:c.left+c.width/2-h.width/2,name:"arrow_s",...r&&{config:r}}),northArrowSouthMiddleEast:(c,h)=>({top:a(c,h),left:c.left+c.width/2-h.width*.75+t,name:"arrow_sme",...r&&{config:r}}),northArrowSouthEast:(c,h)=>({top:a(c,h),left:c.left+c.width/2-h.width+t,name:"arrow_se",...r&&{config:r}}),northEastArrowSouthWest:(c,h)=>({top:a(c,h),left:c.right-t,name:"arrow_sw",...r&&{config:r}}),northEastArrowSouthMiddleWest:(c,h)=>({top:a(c,h),left:c.right-h.width*.25-t,name:"arrow_smw",...r&&{config:r}}),northEastArrowSouth:(c,h)=>({top:a(c,h),left:c.right-h.width/2,name:"arrow_s",...r&&{config:r}}),northEastArrowSouthMiddleEast:(c,h)=>({top:a(c,h),left:c.right-h.width*.75+t,name:"arrow_sme",...r&&{config:r}}),northEastArrowSouthEast:(c,h)=>({top:a(c,h),left:c.right-h.width+t,name:"arrow_se",...r&&{config:r}}),southWestArrowNorthWest:c=>({top:u(c),left:c.left-t,name:"arrow_nw",...r&&{config:r}}),southWestArrowNorthMiddleWest:(c,h)=>({top:u(c),left:c.left-h.width*.25-t,name:"arrow_nmw",...r&&{config:r}}),southWestArrowNorth:(c,h)=>({top:u(c),left:c.left-h.width/2,name:"arrow_n",...r&&{config:r}}),southWestArrowNorthMiddleEast:(c,h)=>({top:u(c),left:c.left-h.width*.75+t,name:"arrow_nme",...r&&{config:r}}),southWestArrowNorthEast:(c,h)=>({top:u(c),left:c.left-h.width+t,name:"arrow_ne",...r&&{config:r}}),southArrowNorthWest:c=>({top:u(c),left:c.left+c.width/2-t,name:"arrow_nw",...r&&{config:r}}),southArrowNorthMiddleWest:(c,h)=>({top:u(c),left:c.left+c.width/2-h.width*.25-t,name:"arrow_nmw",...r&&{config:r}}),southArrowNorth:(c,h)=>({top:u(c),left:c.left+c.width/2-h.width/2,name:"arrow_n",...r&&{config:r}}),southArrowNorthMiddleEast:(c,h)=>({top:u(c),left:c.left+c.width/2-h.width*.75+t,name:"arrow_nme",...r&&{config:r}}),southArrowNorthEast:(c,h)=>({top:u(c),left:c.left+c.width/2-h.width+t,name:"arrow_ne",...r&&{config:r}}),southEastArrowNorthWest:c=>({top:u(c),left:c.right-t,name:"arrow_nw",...r&&{config:r}}),southEastArrowNorthMiddleWest:(c,h)=>({top:u(c),left:c.right-h.width*.25-t,name:"arrow_nmw",...r&&{config:r}}),southEastArrowNorth:(c,h)=>({top:u(c),left:c.right-h.width/2,name:"arrow_n",...r&&{config:r}}),southEastArrowNorthMiddleEast:(c,h)=>({top:u(c),left:c.right-h.width*.75+t,name:"arrow_nme",...r&&{config:r}}),southEastArrowNorthEast:(c,h)=>({top:u(c),left:c.right-h.width+t,name:"arrow_ne",...r&&{config:r}}),westArrowEast:(c,h)=>({top:c.top+c.height/2-h.height/2,left:c.left-h.width-i,name:"arrow_e",...r&&{config:r}}),eastArrowWest:(c,h)=>({top:c.top+c.height/2-h.height/2,left:c.right+i,name:"arrow_w",...r&&{config:r}}),viewportStickyNorth:(c,h,f,b)=>{const k=b||f;return!c.getIntersection(k)||k.height-c.height>n?null:{top:k.top+n,left:c.left+c.width/2-h.width/2,name:"arrowless",config:{withArrow:!1,...r}}}};function a(c,h){return c.top-h.height-i}function u(c){return c.bottom+i}}};l(g,"arrowSideOffset",25),l(g,"arrowHeightOffset",10),l(g,"stickyVerticalOffset",20),l(g,"_getOptimalPosition",Ve),l(g,"defaultPositions",g.generatePositions());let H=g;function Z(s){return Oe(s)?s:Kt(s)?s.commonAncestorContainer:typeof s=="function"?Z(s()):null}class It extends d{constructor(o){super(o),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Xi extends d{constructor(o){super(o),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}/**
23
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
24
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
25
+ */function qi(s){return s.bindTemplate.to(o=>{o.target===s.element&&o.preventDefault()})}/**
26
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
27
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
28
+ */function Yi(s){if(Array.isArray(s))return{items:s,removeItems:[]};const o={items:[],removeItems:[]};return s?{...o,...s}:o}const Qi={alignLeft:ti,bold:ei,importExport:Jt,paragraph:Zt,plus:Qt,text:Yt,threeVerticalDots:Ee,pilcrow:qt,dragIndicator:Xt};class Zi extends d{constructor(e,t){super(e);l(this,"options");l(this,"items");l(this,"focusTracker");l(this,"keystrokes");l(this,"itemsView");l(this,"children");l(this,"focusables");l(this,"_focusCycler");l(this,"_behavior");const i=this.bindTemplate,n=this.t;this.options=t||{},this.set("ariaLabel",n("Editor toolbar")),this.set("maxWidth","auto"),this.set("role","toolbar"),this.set("isGrouping",!!this.options.shouldGroupWhenFull),this.items=this.createCollection(),this.focusTracker=new v,this.keystrokes=new P,this.set("class",void 0),this.set("isCompact",!1),this.set("isVertical",!1),this.itemsView=new Ji(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const r=e.uiLanguageDirection==="rtl";this._focusCycler=new z({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[r?"arrowright":"arrowleft","arrowup"],focusNext:[r?"arrowleft":"arrowright","arrowdown"]}});const a=["ck","ck-toolbar",i.to("class"),i.if("isCompact","ck-toolbar_compact"),i.if("isGrouping","ck-toolbar_grouping"),i.if("isVertical","ck-toolbar_vertical")];this.options.shouldGroupWhenFull&&this.options.isFloating&&a.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:a,role:i.to("role"),"aria-label":i.to("ariaLabel"),style:{maxWidth:i.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:qi(this)}}),this._behavior=this.options.shouldGroupWhenFull?new qe(this):new Xe(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e);this.items.on("add",(e,t)=>{this.focusTracker.add(t)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,i){this.items.addMany(this._buildItemsFromConfig(e,t,i))}switchBehavior(e){this._behavior.type!==e&&(this._behavior.destroy(),this.itemsView.children.clear(),this.focusables.clear(),e==="dynamic"?(this._behavior=new qe(this),this._behavior.render(this),this._behavior.refreshItems()):(this._behavior=new Xe(this),this._behavior.render(this)))}_buildItemsFromConfig(e,t,i){const n=Yi(e),r=i||n.removeItems;return this._cleanItemsConfiguration(n.items,t,r).map(u=>te(u)?this._createNestedToolbarDropdown(u,t,r):u==="|"?new It:u==="-"?new Xi:t.create(u)).filter(u=>!!u)}_cleanItemsConfiguration(e,t,i){const n=e.filter((r,a,u)=>r==="|"?!0:i.indexOf(r)!==-1?!1:r==="-"?this.options.shouldGroupWhenFull?(E("toolbarview-line-break-ignored-when-grouping-items",u),!1):!0:!te(r)&&!t.has(r)?(E("toolbarview-item-unavailable",{item:r}),!1):!0);return this._cleanSeparatorsAndLineBreaks(n)}_cleanSeparatorsAndLineBreaks(e){const t=a=>a!=="-"&&a!=="|",i=e.length,n=e.findIndex(t);if(n===-1)return[];const r=i-e.slice().reverse().findIndex(t);return e.slice(n,r).filter((a,u,c)=>t(a)?!0:!(u>0&&c[u-1]===a))}_createNestedToolbarDropdown(e,t,i){let{label:n,icon:r,items:a,tooltip:u=!0,withText:c=!1}=e;if(a=this._cleanItemsConfiguration(a,t,i),!a.length)return null;const h=this.locale,f=Ae(h);return n||E("toolbarview-nested-toolbar-dropdown-missing-label",e),f.class="ck-toolbar__nested-toolbar-dropdown",f.buttonView.set({label:n,tooltip:u,withText:!!c}),r!==!1?f.buttonView.icon=Qi[r]||r||Ee:f.buttonView.withText=!0,Ot(f,()=>f.toolbarView._buildItemsFromConfig(a,t,i)),f}}class Ji extends d{constructor(e){super(e);l(this,"children");this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class Xe{constructor(o){l(this,"type","static");o.isGrouping=!1,o.itemsView.children.bindTo(o.items).using(e=>e),o.focusables.bindTo(o.items).using(e=>j(e)?e:null)}render(){}destroy(){}}class qe{constructor(o){l(this,"type","dynamic");l(this,"view");l(this,"viewChildren");l(this,"viewFocusables");l(this,"viewItemsView");l(this,"viewFocusTracker");l(this,"viewLocale");l(this,"ungroupedItems");l(this,"groupedItems");l(this,"groupedItemsDropdown");l(this,"resizeObserver",null);l(this,"cachedPadding",null);l(this,"shouldUpdateGroupingOnNextResize",!1);l(this,"viewElement");this.view=o,this.viewChildren=o.children,this.viewFocusables=o.focusables,this.viewItemsView=o.itemsView,this.viewFocusTracker=o.focusTracker,this.viewLocale=o.locale,this.view.isGrouping=!0,this.ungroupedItems=o.createCollection(),this.groupedItems=o.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),o.itemsView.children.bindTo(this.ungroupedItems).using(e=>e),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),o.children.on("change",this._updateFocusCyclableItems.bind(this)),o.items.on("change",(e,t)=>{const i=t.index,n=Array.from(t.added);for(const r of t.removed)i>=this.ungroupedItems.length?this.groupedItems.remove(r):this.ungroupedItems.remove(r);for(let r=i;r<i+n.length;r++){const a=n[r-i];r>this.ungroupedItems.length?this.groupedItems.add(a,r-this.ungroupedItems.length):this.ungroupedItems.add(a,r)}this._updateGrouping()})}render(o){this.viewElement=o.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(o)}destroy(){this.groupedItemsDropdown.destroy(),this.viewChildren.length>1&&(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last)),this.resizeObserver.destroy()}refreshItems(){const o=this.view;if(o.items.length){for(let e=0;e<o.items.length;e++){const t=[...o.items][e];this.ungroupedItems.add(t,e)}this._updateGrouping()}}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!L(this.viewElement)){this.shouldUpdateGroupingOnNextResize=!0;return}const o=this.groupedItems.length;let e;for(;this._areItemsOverflowing;)this._groupLastItem(),e=!0;if(!e&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==o&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const o=this.viewElement,e=this.viewLocale.uiLanguageDirection,t=new x(o.lastChild),i=new x(o);if(!this.cachedPadding){const n=p.window.getComputedStyle(o),r=e==="ltr"?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[r])}return e==="ltr"?t.right>i.right-this.cachedPadding:t.left<i.left+this.cachedPadding}_enableGroupingOnResize(){let o;this.resizeObserver=new ct(this.viewElement,e=>{(!o||o!==e.contentRect.width||this.shouldUpdateGroupingOnNextResize)&&(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),o=e.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(o){o.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new It),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const o=this.viewLocale,e=o.t,t=Ae(o);return t.class="ck-toolbar__grouped-dropdown",t.panelPosition=o.uiLanguageDirection==="ltr"?"sw":"se",Ot(t,this.groupedItems),t.buttonView.set({label:e("Show more items"),tooltip:!0,tooltipPosition:o.uiLanguageDirection==="rtl"?"se":"sw",icon:Ee}),t}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(o=>{j(o)&&this.viewFocusables.add(o)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class es extends d{constructor(e,t){super(e);l(this,"children");l(this,"actionView");l(this,"arrowView");l(this,"keystrokes");l(this,"focusTracker");const i=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(t),this.arrowView=this._createArrowView(),this.keystrokes=new P,this.focusTracker=new v,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",i.to("class"),i.if("isVisible","ck-hidden",n=>!n),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())}),this.keystrokes.set("arrowleft",(e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(e){const t=e||new w;return e||t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const e=new w,t=e.bindTemplate;return e.icon=ce,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",i=>String(i))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}function Ae(s,o=Ki){const e=typeof o=="function"?new o(s):o,t=new $i(s),i=new Te(s,e,t);return e.bind("isEnabled").to(i),e instanceof es?e.arrowView.bind("isOn").to(i,"isOpen"):e.bind("isOn").to(i,"isOpen"),ts(i),i}function Ot(s,o,e={}){s.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),s.isOpen?Ye(s,o,e):s.once("change:isOpen",()=>Ye(s,o,e),{priority:"highest"}),e.enableActiveItemFocusOnDropdownOpen&&Pt(s,()=>s.toolbarView.items.find(t=>t.isOn))}function Ye(s,o,e){const t=s.locale,i=t.t,n=s.toolbarView=new Zi(t),r=typeof o=="function"?o():o;n.ariaLabel=e.ariaLabel||i("Dropdown toolbar"),e.maxWidth&&(n.maxWidth=e.maxWidth),e.class&&(n.class=e.class),e.isCompact&&(n.isCompact=e.isCompact),e.isVertical&&(n.isVertical=!0),r instanceof D?n.items.bindTo(r).using(a=>a):n.items.addMany(r),s.panelView.children.add(n),s.focusTracker.add(n),n.items.delegate("execute").to(s)}function go(s,o,e={}){s.isOpen?Qe(s,o,e):s.once("change:isOpen",()=>Qe(s,o,e),{priority:"highest"}),Pt(s,()=>s.listView.items.find(t=>t instanceof A?t.children.first.isOn:!1))}function Qe(s,o,e){const t=s.locale,i=s.listView=new Fe(t),n=typeof o=="function"?o():o;i.ariaLabel=e.ariaLabel,i.role=e.role,Lt(s,i.items,n,t),s.panelView.children.add(i),i.items.delegate("execute").to(s)}function Pt(s,o){s.on("change:isOpen",()=>{if(!s.isOpen)return;const e=o();e&&(typeof e.focus=="function"?e.focus():E("ui-dropdown-focus-child-on-open-child-missing-focus",{view:e}))},{priority:zt.low-10})}function ts(s){is(s),ss(s),os(s),ns(s),rs(s),ls(s)}function is(s){_t({emitter:s,activator:()=>s.isRendered&&s.isOpen,callback:()=>{s.isOpen=!1},contextElements:()=>[s.element,...Bt(s.focusTracker).filter(o=>!s.element.contains(o))]})}function Bt(s){return[...s.elements,...s.externalViews.flatMap(o=>Bt(o.focusTracker))]}function ss(s){s.on("execute",o=>{o.source instanceof vt||(s.isOpen=!1)})}function os(s){s.focusTracker.on("change:isFocused",(o,e,t)=>{t||!s.isOpen||(s.isOpen=!1)})}function ns(s){s.keystrokes.set("arrowdown",(o,e)=>{s.isOpen&&(s.panelView.focus(),e())}),s.keystrokes.set("arrowup",(o,e)=>{s.isOpen&&(s.panelView.focusLast(),e())})}function rs(s){s.on("change:isOpen",(o,e,t)=>{if(t)return;s.focusTracker.elements.some(n=>n.contains(p.document.activeElement))&&s.buttonView.focus()})}function ls(s){s.on("change:isOpen",(o,e,t)=>{t&&s.panelView.focus()},{priority:"low"})}function Lt(s,o,e,t){o.on("change",()=>{const i=[...o].reduce((r,a)=>(a instanceof A&&a.children.first instanceof R&&r.push(a.children.first),r),[]),n=i.some(r=>r.isToggleable);i.forEach(r=>{r.hasCheckSpace=n})}),o.bindTo(e).using(i=>{if(i.type==="separator")return new Le(t);if(i.type==="group"){const n=new Q(t);return n.set({label:i.label}),Lt(s,n.items,i.items,t),n.items.delegate("execute").to(s),n}else if(i.type==="button"||i.type==="switchbutton"){const n=i.model.role==="menuitemcheckbox"||i.model.role==="menuitemradio",r=new A(t);let a;return i.type==="button"?(a=new R(t),a.set({isToggleable:n})):a=new vt(t),a.bind(...Object.keys(i.model)).to(i.model),a.delegate("execute").to(r),r.children.add(a),r}return null})}const as=(s,o,e)=>{const t=new zi(s.locale);return t.set({id:o,ariaDescribedById:e}),t.bind("isReadOnly").to(s,"isEnabled",i=>!i),t.bind("hasError").to(s,"errorText",i=>!!i),t.on("input",()=>{s.errorText=null}),s.bind("isEmpty","isFocused","placeholder").to(t),t},_o=(s,o,e)=>{const t=new Ui(s.locale);return t.set({id:o,ariaDescribedById:e,inputMode:"numeric"}),t.bind("isReadOnly").to(s,"isEnabled",i=>!i),t.bind("hasError").to(s,"errorText",i=>!!i),t.on("input",()=>{s.errorText=null}),s.bind("isEmpty","isFocused","placeholder").to(t),t},ko=(s,o,e)=>{const t=Ae(s.locale);return t.set({id:o,ariaDescribedById:e}),t.bind("isEnabled").to(s),t},cs=150;class hs extends d{constructor(e,t={}){super(e);l(this,"hexInputRow");l(this,"_debounceColorPickerEvent");l(this,"_config");this.set({color:"",_hexColor:""}),this.hexInputRow=this._createInputRow();const i=this.createCollection();t.hideInput||i.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:i}),this._config=t,this._debounceColorPickerEvent=be(n=>{this.set("color",n),this.fire("colorSelected",{color:this.color})},cs,{leading:!0}),this.on("set:color",(n,r,a)=>{n.return=Vt(a,this._config.format||"hsl")}),this.on("change:color",()=>{this._hexColor=de(this.color)}),this.on("change:_hexColor",()=>{document.activeElement!==this.picker&&this.picker.setAttribute("color",this._hexColor),de(this.color)!=de(this._hexColor)&&(this.color=this._hexColor)})}render(){if(super.render(),Mi("hex-color-picker",ai),this.picker=p.document.createElement("hex-color-picker"),this.picker.setAttribute("class","hex-color-picker"),this.picker.setAttribute("tabindex","-1"),this._createSlidersView(),this.element){this.hexInputRow.element?this.element.insertBefore(this.picker,this.hexInputRow.element):this.element.appendChild(this.picker);const e=document.createElement("style");e.textContent='[role="slider"]:focus [part$="pointer"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}',this.picker.shadowRoot.appendChild(e)}this.picker.addEventListener("color-changed",e=>{const t=e.detail.value;this._debounceColorPickerEvent(t)})}focus(){/* istanbul ignore next -- @preserve */!this._config.hideInput&&(_.isGecko||_.isiOS||_.isSafari||_.isBlink)&&this.hexInputRow.children.get(1).focus(),this.slidersView.first.focus()}_createSlidersView(){const i=[...this.picker.shadowRoot.children].filter(n=>n.getAttribute("role")==="slider").map(n=>new us(n));this.slidersView=this.createCollection(),i.forEach(n=>{this.slidersView.add(n)})}_createInputRow(){const e=this._createColorInput();return new fs(this.locale,e)}_createColorInput(){const e=new Gi(this.locale,as),{t}=this.locale;return e.set({label:t("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",i=>e.isFocused?e.fieldView.value:i.startsWith("#")?i.substring(1):i),e.fieldView.on("input",()=>{const i=e.fieldView.element.value;if(i){const n=Ft(i);n&&this._debounceColorPickerEvent(n)}}),e}isValid(){const{t:e}=this.locale;return this._config.hideInput?!0:(this.resetValidationStatus(),this.hexInputRow.getParsedColor()?!0:(this.hexInputRow.inputView.errorText=e('Please enter a valid color (e.g. "ff0000").'),!1))}resetValidationStatus(){this.hexInputRow.inputView.errorText=null}}function de(s){let o=Si(s);return o||(o="#000"),o.length===4&&(o="#"+[o[1],o[1],o[2],o[2],o[3],o[3]].join("")),o.toLowerCase()}class us extends d{constructor(o){super(),this.element=o}focus(){this.element.focus()}}class ds extends d{constructor(o){super(o),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class fs extends d{constructor(e,t){super(e);l(this,"children");l(this,"inputView");this.inputView=t,this.children=this.createCollection([new ds,this.inputView]),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}getParsedColor(){return Ft(this.inputView.fieldView.element.value)}}function Ft(s){if(!s)return null;const o=s.trim().replace(/^#/,"");return![3,4,6,8].includes(o.length)||!/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test(o)?null:`#${o}`}class ps extends le(Ce){constructor(o){super(o),this.set("isEmpty",!0),this.on("change",()=>{this.set("isEmpty",this.length===0)})}add(o,e){return this.find(t=>t.color===o.color)?this:super.add(o,e)}hasColor(o){return!!this.find(e=>e.color===o)}}class ms extends d{constructor(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:r,documentColorsCount:a,colorPickerLabel:u,focusTracker:c,focusables:h}){super(e);l(this,"items");l(this,"colorDefinitions");l(this,"focusTracker");l(this,"columns");l(this,"documentColors");l(this,"documentColorsCount");l(this,"staticColorsGrid");l(this,"documentColorsGrid");l(this,"colorPickerButtonView");l(this,"removeColorButtonView");l(this,"_focusables");l(this,"_documentColorsLabel");l(this,"_removeButtonLabel");l(this,"_colorPickerLabel");const f=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=c,this.items=this.createCollection(),this.colorDefinitions=t,this.columns=i,this.documentColors=new ps,this.documentColorsCount=a,this._focusables=h,this._removeButtonLabel=n,this._colorPickerLabel=u,this._documentColorsLabel=r,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-fragment",f.if("isVisible","ck-hidden",b=>!b)]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,t){const i=e.document,n=this.documentColorsCount;this.documentColors.clear();for(const r of i.getRoots()){const a=e.createRangeIn(r);for(const u of a.getItems())if(u.is("$textProxy")&&u.hasAttribute(t)&&(this._addColorToDocumentColors(u.getAttribute(t)),this.documentColors.length>=n))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,i=this.selectedColor;t.selectedColor=i,e&&(e.selectedColor=i)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=I.bind(this.documentColors,this.documentColors),t=new d(this.locale);t.setTemplate({tag:"span",attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]},children:[{text:this._documentColorsLabel}]}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}this._createColorPickerButton(),this._addColorSelectorElementsToFocusTracker()}focus(){this.removeColorButtonView.focus()}destroy(){super.destroy()}addColorPickerButton(){this.colorPickerButtonView&&(this.items.add(this.colorPickerButtonView),this.focusTracker.add(this.colorPickerButtonView.element),this._focusables.add(this.colorPickerButtonView))}_addColorSelectorElementsToFocusTracker(){this.focusTracker.add(this.removeColorButtonView.element),this._focusables.add(this.removeColorButtonView),this.staticColorsGrid&&(this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid)),this.documentColorsGrid&&(this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid))}_createColorPickerButton(){this.colorPickerButtonView=new w,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:oi,class:"ck-color-selector__color-picker"}),this.colorPickerButtonView.on("execute",()=>{this.fire("colorPicker:show")})}_createRemoveColorButton(){const e=new w;return e.set({withText:!0,icon:ni,label:this._removeButtonLabel}),e.class="ck-color-selector__remove-color",e.on("execute",()=>{this.fire("execute",{value:null,source:"removeColorButton"})}),e.render(),e}_createStaticColorsGrid(){const e=new Ke(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",(t,i)=>{this.fire("execute",{value:i.value,source:"staticColorsGrid"})}),e}_createDocumentColorsGrid(){const e=I.bind(this.documentColors,this.documentColors),t=new Ke(this.locale,{columns:this.columns});return t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using(i=>{var r;const n=new Ct;return n.set({color:i.color,hasBorder:(r=i.options)==null?void 0:r.hasBorder}),i.label&&n.set({label:i.label,tooltip:!0}),n.on("execute",()=>{this.fire("execute",{value:i.color,source:"documentColorsGrid"})}),n}),this.documentColors.on("change:isEmpty",(i,n,r)=>{r&&(t.selectedColor=null)}),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find(i=>i.color===e);t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class ws extends d{constructor(e,{focusTracker:t,focusables:i,keystrokes:n,colorPickerViewConfig:r}){super(e);l(this,"items");l(this,"colorPickerView");l(this,"saveButtonView");l(this,"cancelButtonView");l(this,"actionBarView");l(this,"focusTracker");l(this,"keystrokes");l(this,"_focusables");l(this,"_colorPickerViewConfig");this.items=this.createCollection(),this.focusTracker=t,this.keystrokes=n,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=i,this._colorPickerViewConfig=r;const a=this.bindTemplate,{saveButtonView:u,cancelButtonView:c}=this._createActionButtons();this.saveButtonView=u,this.cancelButtonView=c,this.actionBarView=this._createActionBarView({saveButtonView:u,cancelButtonView:c}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-fragment",a.if("isVisible","ck-hidden",h=>!h)]},children:this.items})}render(){super.render();const e=new hs(this.locale,{...this._colorPickerViewConfig});this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",(t,i,n)=>{e.color=n}),this.items.add(this.colorPickerView),this.items.add(this.actionBarView),this._addColorPickersElementsToFocusTracker(),this._stopPropagationOnArrowsKeys(),this._executeOnEnterPress(),this._executeUponColorChange()}destroy(){super.destroy()}focus(){this.colorPickerView.focus()}resetValidationStatus(){this.colorPickerView.resetValidationStatus()}_executeOnEnterPress(){this.keystrokes.set("enter",e=>{this.isVisible&&this.focusTracker.focusedElement!==this.cancelButtonView.element&&this.colorPickerView.isValid()&&(this.fire("execute",{value:this.selectedColor}),e.stopPropagation(),e.preventDefault())})}_stopPropagationOnArrowsKeys(){const e=t=>t.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const t of this.colorPickerView.slidersView)this.focusTracker.add(t.element),this._focusables.add(t);const e=this.colorPickerView.hexInputRow.children.get(1);e.element&&(this.focusTracker.add(e.element),this._focusables.add(e)),this.focusTracker.add(this.saveButtonView.element),this._focusables.add(this.saveButtonView),this.focusTracker.add(this.cancelButtonView.element),this._focusables.add(this.cancelButtonView)}_createActionBarView({saveButtonView:e,cancelButtonView:t}){const i=new d,n=this.createCollection();return n.add(e),n.add(t),i.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector_action-bar"]},children:n}),i}_createActionButtons(){const e=this.locale,t=e.t,i=new w(e),n=new w(e);return i.set({icon:dt,class:"ck-button-save",type:"button",withText:!1,label:t("Accept")}),n.set({icon:ut,class:"ck-button-cancel",type:"button",withText:!1,label:t("Cancel")}),i.on("execute",()=>{this.colorPickerView.isValid()&&this.fire("execute",{source:"colorPickerSaveButton",value:this.selectedColor})}),n.on("execute",()=>{this.fire("colorPicker:cancel")}),{saveButtonView:i,cancelButtonView:n}}_executeUponColorChange(){this.colorPickerView.on("colorSelected",(e,t)=>{this.fire("execute",{value:t.color,source:"colorPicker"}),this.set("selectedColor",t.color)})}}class To extends d{constructor(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:r,documentColorsCount:a,colorPickerLabel:u,colorPickerViewConfig:c}){super(e);l(this,"focusTracker");l(this,"keystrokes");l(this,"items");l(this,"colorGridsFragmentView");l(this,"colorPickerFragmentView");l(this,"_focusCycler");l(this,"_focusables");l(this,"_colorPickerViewConfig");this.items=this.createCollection(),this.focusTracker=new v,this.keystrokes=new P,this._focusables=new D,this._colorPickerViewConfig=c,this._focusCycler=new z({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsFragmentView=new ms(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:r,documentColorsCount:a,colorPickerLabel:u,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerFragmentView=new ws(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerViewConfig:c}),this.set("_isColorGridsFragmentVisible",!0),this.set("_isColorPickerFragmentVisible",!1),this.set("selectedColor",void 0),this.colorGridsFragmentView.bind("isVisible").to(this,"_isColorGridsFragmentVisible"),this.colorPickerFragmentView.bind("isVisible").to(this,"_isColorPickerFragmentVisible"),this.on("change:selectedColor",(h,f,b)=>{this.colorGridsFragmentView.set("selectedColor",b),this.colorPickerFragmentView.set("selectedColor",b)}),this.colorGridsFragmentView.on("change:selectedColor",(h,f,b)=>{this.set("selectedColor",b)}),this.colorPickerFragmentView.on("change:selectedColor",(h,f,b)=>{this.set("selectedColor",b)}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector"]},children:this.items})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendUI(){this._appendColorGridsFragment(),this._colorPickerViewConfig&&this._appendColorPickerFragment()}showColorPickerFragment(){!this.colorPickerFragmentView.colorPickerView||this._isColorPickerFragmentVisible||(this._isColorPickerFragmentVisible=!0,this.colorPickerFragmentView.focus(),this.colorPickerFragmentView.resetValidationStatus(),this._isColorGridsFragmentVisible=!1)}showColorGridsFragment(){this._isColorGridsFragmentVisible||(this._isColorGridsFragmentVisible=!0,this.colorGridsFragmentView.focus(),this._isColorPickerFragmentVisible=!1)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}updateDocumentColors(e,t){this.colorGridsFragmentView.updateDocumentColors(e,t)}updateSelectedColors(){this.colorGridsFragmentView.updateSelectedColors()}_appendColorGridsFragment(){this.items.length||(this.items.add(this.colorGridsFragmentView),this.colorGridsFragmentView.delegate("execute").to(this),this.colorGridsFragmentView.delegate("colorPicker:show").to(this))}_appendColorPickerFragment(){this.items.length!==2&&(this.items.add(this.colorPickerFragmentView),this.colorGridsFragmentView.colorPickerButtonView&&this.colorGridsFragmentView.colorPickerButtonView.on("execute",()=>{this.showColorPickerFragment()}),this.colorGridsFragmentView.addColorPickerButton(),this.colorPickerFragmentView.delegate("execute").to(this),this.colorPickerFragmentView.delegate("colorPicker:cancel").to(this))}}class bs{constructor(o){l(this,"editor");l(this,"_components",new Map);this.editor=o}*names(){for(const o of this._components.values())yield o.originalName}add(o,e){this._components.set(fe(o),{callback:e,originalName:o})}create(o){if(!this.has(o))throw new V("componentfactory-item-missing",this,{name:o});return this._components.get(fe(o)).callback(this.editor.locale)}has(o){return this._components.has(fe(o))}}function fe(s){return String(s).toLowerCase()}const Ze="ck-tooltip",m=class m extends ye(){constructor(e){super();l(this,"tooltipTextView");l(this,"balloonPanelView");l(this,"_currentElementWithTooltip",null);l(this,"_currentTooltipPosition",null);l(this,"_mutationObserver",null);l(this,"_pinTooltipDebounced");l(this,"_unpinTooltipDebounced");l(this,"_watchdogExcluded");if(m._editors.add(e),m._instance)return m._instance;m._instance=this,this.tooltipTextView=new d(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new H(e.locale),this.balloonPanelView.class=Ze,this.balloonPanelView.content.add(this.tooltipTextView),this._mutationObserver=gs(()=>{this._updateTooltipPosition()}),this._pinTooltipDebounced=be(this._pinTooltip,600),this._unpinTooltipDebounced=be(this._unpinTooltip,400),this.listenTo(p.document,"keydown",this._onKeyDown.bind(this),{useCapture:!0}),this.listenTo(p.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(p.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(p.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(p.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(p.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;m._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),m._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),m._instance=null)}static getPositioningFunctions(e){const t=m.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onKeyDown(e,t){t.key==="Escape"&&this._currentElementWithTooltip&&(this._unpinTooltip(),t.stopPropagation())}_onEnterOrFocus(e,{target:t}){const i=pe(t);if(!i){e.name==="focus"&&this._unpinTooltip();return}if(i===this._currentElementWithTooltip){this._unpinTooltipDebounced.cancel();return}this._unpinTooltip(),e.name==="focus"&&!i.matches(":hover")||i.matches("[data-cke-tooltip-instant]")?this._pinTooltip(i,me(i)):this._pinTooltipDebounced(i,me(i))}_onLeaveOrBlur(e,{target:t,relatedTarget:i}){if(e.name==="mouseleave"){if(!Oe(t))return;const n=this.balloonPanelView.element,r=n&&(n===i||n.contains(i)),a=!r&&t===n;if(r){this._unpinTooltipDebounced.cancel();return}if(!a&&this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const u=pe(t),c=pe(i);(a||u&&u!==c)&&(this._pinTooltipDebounced.cancel(),this._currentElementWithTooltip&&this._currentElementWithTooltip.matches("[data-cke-tooltip-instant]")||u&&u.matches("[data-cke-tooltip-instant]")?this._unpinTooltip():this._unpinTooltipDebounced())}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._pinTooltipDebounced.cancel(),this._unpinTooltipDebounced()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:i,cssClass:n}){this._unpinTooltip();const r=$t(m._editors.values()).ui.view.body;r.has(this.balloonPanelView)||r.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.class=[Ze,n].filter(a=>a).join(" "),this.balloonPanelView.pin({target:e,positions:m.getPositioningFunctions(i)}),this._mutationObserver.attach(e);for(const a of m._editors)this.listenTo(a.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=i}_unpinTooltip(){this._unpinTooltipDebounced.cancel(),this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of m._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this.tooltipTextView.text="",this._mutationObserver.detach()}_updateTooltipPosition(){if(!this._currentElementWithTooltip)return;const e=me(this._currentElementWithTooltip);if(!L(this._currentElementWithTooltip)||!e.text){this._unpinTooltip();return}this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:m.getPositioningFunctions(e.position)})}};l(m,"defaultBalloonPositions",H.generatePositions({heightOffset:5,sideOffset:13})),l(m,"_editors",new Set),l(m,"_instance",null);let ve=m;function pe(s){return Oe(s)?s.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}function me(s){return{text:s.dataset.ckeTooltipText,position:s.dataset.ckeTooltipPosition||"s",cssClass:s.dataset.ckeTooltipClass||""}}function gs(s){const o=new MutationObserver(()=>{s()});return{attach(e){o.observe(e,{attributes:!0,attributeFilter:["data-cke-tooltip-text","data-cke-tooltip-position"]})},detach(){o.disconnect()}}}const _s=50,ks=350;class At extends ye(){constructor(e,t={}){super();l(this,"editor");l(this,"_balloonView",null);l(this,"_showBalloonThrottled",ui(()=>this._showBalloon(),50,{leading:!0}));l(this,"_lastFocusedEditableElement",null);l(this,"_balloonClass");this.editor=e,this._balloonClass=t.balloonClass,e.on("ready",()=>this._handleEditorReady())}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;this._isEnabled()&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",(t,i,n)=>{this._updateLastFocusedEditableElement(),n?this._showBalloon():this._hideBalloon()}),e.ui.focusTracker.on("change:focusedElement",(t,i,n)=>{this._updateLastFocusedEditableElement(),n&&this._showBalloon()}),e.ui.on("update",()=>{this._showBalloonThrottled()}))}_getNormalizedConfig(){return{side:this.editor.locale.contentLanguageDirection==="ltr"?"right":"left",position:"border",verticalOffset:0,horizontalOffset:5}}_showBalloon(){const e=this._getBalloonAttachOptions();e&&(this._balloonView||(this._balloonView=this._createBalloonView()),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_createBalloonView(){const e=this.editor,t=new H,i=this._createBadgeContent();return t.content.add(i),this._balloonClass&&(t.class=this._balloonClass),e.ui.view.body.add(t),t}_getBalloonAttachOptions(){if(!this._lastFocusedEditableElement)return null;const e=this._getNormalizedConfig(),t=e.side==="right"?Ts(this._lastFocusedEditableElement,e):vs(this._lastFocusedEditableElement,e);return{target:this._lastFocusedEditableElement,positions:[t]}}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,i=e.ui.focusTracker.focusedElement;if(!t||!i){this._lastFocusedEditableElement=null;return}const n=Array.from(e.ui.getEditableElementsNames()).map(r=>e.ui.getEditableElement(r));n.includes(i)?this._lastFocusedEditableElement=i:this._lastFocusedEditableElement=n[0]}}function Ts(s,o){return Dt(s,o,(e,t)=>e.left+e.width-t.width-o.horizontalOffset)}function vs(s,o){return Dt(s,o,e=>e.left+o.horizontalOffset)}function Dt(s,o,e){return(t,i)=>{const n=new x(s);if(n.width<ks||n.height<_s)return null;let r;o.position==="inside"?r=n.bottom-i.height:r=n.bottom-i.height/2,r-=o.verticalOffset;const a=e(n,i),c=t.clone().moveTo(a,r).getIntersection(i.clone().moveTo(a,r)).getVisible();return!c||c.getArea()<i.getArea()?null:{top:r,left:a,name:`position_${o.position}-side_${o.side}`,config:{withArrow:!1}}}}const ys="Powered by";class Cs extends At{constructor(o){super(o,{balloonClass:"ck-powered-by-balloon"})}_isEnabled(){const o=this.editor;if(o.config.get("ui.poweredBy.forceVisible"))return!0;const t=o.config.get("licenseKey");if(t=="GPL")return!0;const i=ht(t.split(".")[1]);return i?!i.whiteLabel:!0}_createBadgeContent(){return new Vs(this.editor.locale,this._getNormalizedConfig().label)}_getNormalizedConfig(){const o=super._getNormalizedConfig(),e=this.editor.config.get("ui.poweredBy")||{},t=e.position||o.position,i=t==="inside"?5:o.verticalOffset;return{position:t,side:e.side||o.side,label:e.label===void 0?ys:e.label,verticalOffset:e.verticalOffset!==void 0?e.verticalOffset:i,horizontalOffset:e.horizontalOffset!==void 0?e.horizontalOffset:o.horizontalOffset,forceVisible:!!e.forceVisible}}}class Vs extends d{constructor(o,e){super(o);const t=new F,i=this.bindTemplate;t.set({content:ri,isColorInherited:!1}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/powered-by-ckeditor/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...e?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[e]}]:[],t],on:{dragstart:i.to(n=>n.preventDefault())}}]})}}class xs extends At{constructor(e){super(e,{balloonClass:"ck-evaluation-badge-balloon"});l(this,"licenseTypeMessage",{evaluation:"For evaluation purposes only",trial:"For evaluation purposes only",development:"For development purposes only"})}_isEnabled(){const t=this.editor.config.get("licenseKey"),i=Je(t);return!!(i&&this.licenseTypeMessage[i])}_createBadgeContent(){const e=this.editor.config.get("licenseKey"),t=Je(e);return new Es(this.editor.locale,this.licenseTypeMessage[t])}_getNormalizedConfig(){const e=super._getNormalizedConfig(),t=this.editor.config.get("ui.poweredBy")||{},i=t.position||e.position,n=t.side||e.side;return{position:i,side:n==="left"?"right":"left",verticalOffset:e.verticalOffset,horizontalOffset:e.horizontalOffset}}}class Es extends d{constructor(o,e){super(o),this.setTemplate({tag:"div",attributes:{class:["ck","ck-evaluation-badge"],"aria-hidden":!0},children:[{tag:"span",attributes:{class:["ck","ck-evaluation-badge__label"]},children:[e]}]})}}function Je(s){if(s=="GPL")return"GPL";const o=ht(s.split(".")[1]);return o?o.licenseType||"production":null}const et={POLITE:"polite",ASSERTIVE:"assertive"};class Is{constructor(o){l(this,"editor");l(this,"view");this.editor=o,o.once("ready",()=>{for(const e of Object.values(et))this.announce("",e)})}announce(o,e=et.POLITE){const t=this.editor;if(!t.ui.view)return;this.view||(this.view=new Os(t.locale),t.ui.view.body.add(this.view));const{politeness:i,isUnsafeHTML:n}=typeof e=="string"?{politeness:e}:e;let r=this.view.regionViews.find(a=>a.politeness===i);r||(r=new Ps(t,i),this.view.regionViews.add(r)),r.announce({announcement:o,isUnsafeHTML:n})}}class Os extends d{constructor(e){super(e);l(this,"regionViews");this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class Ps extends d{constructor(e,t){super(e.locale);l(this,"politeness");l(this,"_domConverter");l(this,"_pruneAnnouncementsInterval");this.setTemplate({tag:"div",attributes:{"aria-live":t,"aria-relevant":"additions"},children:[{tag:"ul",attributes:{class:["ck","ck-aria-live-region-list"]}}]}),e.on("destroy",()=>{this._pruneAnnouncementsInterval!==null&&(clearInterval(this._pruneAnnouncementsInterval),this._pruneAnnouncementsInterval=null)}),this.politeness=t,this._domConverter=e.data.htmlProcessor.domConverter,this._pruneAnnouncementsInterval=setInterval(()=>{this.element&&this._listElement.firstChild&&this._listElement.firstChild.remove()},5e3)}announce({announcement:e,isUnsafeHTML:t}){if(!e.trim().length)return;const i=document.createElement("li");t?this._domConverter.setContentOf(i,e):i.innerText=e,this._listElement.appendChild(i)}get _listElement(){return this.element.querySelector("ul")}}class St extends A{constructor(o,e){super(o);const t=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item"]},on:{mouseenter:t.to("mouseenter")}}),this.delegate("mouseenter").to(e)}}const X=5,M={toggleMenusAndFocusItemsOnHover(s){s.on("menu:mouseenter",o=>{if(!(!s.isFocusBorderEnabled&&!s.isOpen)){if(s.isOpen)for(const e of s.menus){const t=o.path[0],i=t instanceof St&&t.children.first===e;e.isOpen=(o.path.includes(e)||i)&&e.isEnabled}o.source.focus()}})},focusCycleMenusOnArrows(s){const o=s.locale.uiLanguageDirection==="rtl";s.on("menu:arrowright",t=>{e(t.source,o?-1:1)}),s.on("menu:arrowleft",t=>{e(t.source,o?1:-1)});function e(t,i){const n=s.children.getIndex(t),r=t.isOpen,a=s.children.length,u=s.children.get((n+a+i)%a);t.isOpen=!1,r&&(u.isOpen=!0),u.buttonView.focus()}},closeMenusWhenTheBarCloses(s){s.on("change:isOpen",()=>{s.isOpen||s.menus.forEach(o=>{o.isOpen=!1})})},closeMenuWhenAnotherOnTheSameLevelOpens(s){s.on("menu:change:isOpen",(o,e,t)=>{t&&s.menus.filter(i=>o.source.parentMenuView===i.parentMenuView&&o.source!==i&&i.isOpen).forEach(i=>{i.isOpen=!1})})},closeOnClickOutside(s){_t({emitter:s,activator:()=>s.isOpen,callback:()=>s.close(),contextElements:()=>s.children.map(o=>o.element)})},enableFocusHighlightOnInteraction(s){let o=!1;s.on("change:isOpen",(e,t,i)=>{i||(o||(s.isFocusBorderEnabled=!1),o=!1)}),s.listenTo(s.element,"keydown",()=>{o=!0},{useCapture:!0}),s.listenTo(s.element,"keyup",()=>{o=!1},{useCapture:!0}),s.listenTo(s.element,"focus",()=>{o&&(s.isFocusBorderEnabled=!0)},{useCapture:!0})}},B={openAndFocusPanelOnArrowDownKey(s){s.keystrokes.set("arrowdown",(o,e)=>{s.isEnabled&&s.focusTracker.focusedElement===s.buttonView.element&&(s.isOpen||(s.isOpen=!0),s.panelView.focus(),e())})},openOnArrowRightKey(s){const o=s.locale.uiLanguageDirection==="rtl"?"arrowleft":"arrowright";s.keystrokes.set(o,(e,t)=>{s.focusTracker.focusedElement!==s.buttonView.element||!s.isEnabled||(s.isOpen||(s.isOpen=!0),s.panelView.focus(),t())})},openOnButtonClick(s){s.buttonView.on("execute",()=>{s.isOpen=!0})},toggleOnButtonClick(s){s.buttonView.on("execute",()=>{s.isOpen=!s.isOpen})},openAndFocusOnEnterKeyPress(s){s.keystrokes.set("enter",(o,e)=>{s.focusTracker.focusedElement===s.buttonView.element&&(s.isOpen=!0,s.panelView.focus(),e())})},closeOnArrowLeftKey(s){const o=s.locale.uiLanguageDirection==="rtl"?"arrowright":"arrowleft";s.keystrokes.set(o,(e,t)=>{s.isOpen&&(s.isOpen=!1,s.focus(),t())})},closeOnEscKey(s){s.keystrokes.set("esc",(o,e)=>{s.isOpen&&(s.isOpen=!1,s.focus(),e())})},closeOnParentClose(s){s.parentMenuView.on("change:isOpen",(o,e,t)=>{!t&&o.source===s.parentMenuView&&(s.isOpen=!1)})}},Bs={southEast:s=>({top:s.bottom,left:s.left,name:"se"}),southWest:(s,o)=>({top:s.bottom,left:s.left-o.width+s.width,name:"sw"}),northEast:(s,o)=>({top:s.top-o.height,left:s.left,name:"ne"}),northWest:(s,o)=>({top:s.top-o.height,left:s.left-o.width+s.width,name:"nw"}),eastSouth:s=>({top:s.top,left:s.right-X,name:"es"}),eastNorth:(s,o)=>({top:s.top-o.height,left:s.right-X,name:"en"}),westSouth:(s,o)=>({top:s.top,left:s.left-o.width+X,name:"ws"}),westNorth:(s,o)=>({top:s.top-o.height,left:s.left-o.width+X,name:"wn"})},Ls=[{menuId:"file",label:"File",groups:[{groupId:"export",items:["menuBar:exportPdf","menuBar:exportWord"]},{groupId:"import",items:["menuBar:importWord"]},{groupId:"revisionHistory",items:["menuBar:revisionHistory"]}]},{menuId:"edit",label:"Edit",groups:[{groupId:"undo",items:["menuBar:undo","menuBar:redo"]},{groupId:"selectAll",items:["menuBar:selectAll"]},{groupId:"findAndReplace",items:["menuBar:findAndReplace"]}]},{menuId:"view",label:"View",groups:[{groupId:"sourceEditingEnhanced",items:["menuBar:sourceEditingEnhanced"]},{groupId:"sourceEditing",items:["menuBar:sourceEditing"]},{groupId:"showBlocks",items:["menuBar:showBlocks"]},{groupId:"previewMergeFields",items:["menuBar:previewMergeFields"]},{groupId:"fullscreen",items:["menuBar:fullscreen"]},{groupId:"restrictedEditing",items:["menuBar:restrictedEditing"]}]},{menuId:"insert",label:"Insert",groups:[{groupId:"insertMainWidgets",items:["menuBar:insertImage","menuBar:ckbox","menuBar:ckfinder","menuBar:insertTable","menuBar:insertTableLayout"]},{groupId:"insertInline",items:["menuBar:link","menuBar:bookmark","menuBar:comment","menuBar:insertMergeField","menuBar:emoji"]},{groupId:"insertMinorWidgets",items:["menuBar:mediaEmbed","menuBar:insertTemplate","menuBar:specialCharacters","menuBar:blockQuote","menuBar:codeBlock","menuBar:htmlEmbed"]},{groupId:"insertStructureWidgets",items:["menuBar:horizontalLine","menuBar:pageBreak","menuBar:tableOfContents"]},{groupId:"restrictedEditingException",items:["menuBar:restrictedEditingException"]}]},{menuId:"format",label:"Format",groups:[{groupId:"textAndFont",items:[{menuId:"text",label:"Text",groups:[{groupId:"basicStyles",items:["menuBar:bold","menuBar:italic","menuBar:underline","menuBar:strikethrough","menuBar:superscript","menuBar:subscript","menuBar:code"]},{groupId:"textPartLanguage",items:["menuBar:textPartLanguage"]}]},{menuId:"font",label:"Font",groups:[{groupId:"fontProperties",items:["menuBar:fontSize","menuBar:fontFamily"]},{groupId:"fontColors",items:["menuBar:fontColor","menuBar:fontBackgroundColor"]},{groupId:"highlight",items:["menuBar:highlight"]}]},"menuBar:heading"]},{groupId:"list",items:["menuBar:bulletedList","menuBar:numberedList","menuBar:multiLevelList","menuBar:todoList"]},{groupId:"indent",items:["menuBar:alignment","menuBar:indent","menuBar:outdent"]},{groupId:"caseChange",items:["menuBar:caseChange"]},{groupId:"removeFormat",items:["menuBar:removeFormat"]}]},{menuId:"tools",label:"Tools",groups:[{groupId:"aiTools",items:["menuBar:aiAssistant","menuBar:aiCommands"]},{groupId:"tools",items:["menuBar:trackChanges","menuBar:commentsArchive"]}]},{menuId:"help",label:"Help",groups:[{groupId:"help",items:["menuBar:accessibilityHelp"]}]}];function Fs(s){let o;return!("items"in s)||!s.items?o={items:Ie(Ls),addItems:[],removeItems:[],isVisible:!0,isUsingDefaultConfig:!0,...s}:o={items:s.items,removeItems:[],addItems:[],isVisible:!0,isUsingDefaultConfig:!1,...s},o}function As({normalizedConfig:s,locale:o,componentFactory:e,extraItems:t}){const i=Ie(s);return tt(s,i,t),Ds(s,i),tt(s,i,i.addItems),Ss(s,i,e),Mt(s,i),Ms(i,o),i}function Ds(s,o){const e=o.removeItems,t=[];o.items=o.items.filter(({menuId:i})=>e.includes(i)?(t.push(i),!1):!0),U(o.items,i=>{i.groups=i.groups.filter(({groupId:n})=>e.includes(n)?(t.push(n),!1):!0);for(const n of i.groups)n.items=n.items.filter(r=>{const a=Nt(r);return e.includes(a)?(t.push(a),!1):!0})});for(const i of e)t.includes(i)||E("menu-bar-item-could-not-be-removed",{menuBarConfig:s,itemName:i})}function tt(s,o,e){const t=[];if(e.length!=0){for(const i of e){const n=Gs(i.position),r=Rs(i.position);if(Ns(i))if(!r)n==="start"?(o.items.unshift(i.menu),t.push(i)):n==="end"&&(o.items.push(i.menu),t.push(i));else{const a=o.items.findIndex(u=>u.menuId===r);a!=-1?n==="before"?(o.items.splice(a,0,i.menu),t.push(i)):n==="after"&&(o.items.splice(a+1,0,i.menu),t.push(i)):it(o,i.menu,r,n)&&t.push(i)}else Ws(i)?U(o.items,a=>{if(a.menuId===r)n==="start"?(a.groups.unshift(i.group),t.push(i)):n==="end"&&(a.groups.push(i.group),t.push(i));else{const u=a.groups.findIndex(c=>c.groupId===r);u!==-1&&(n==="before"?(a.groups.splice(u,0,i.group),t.push(i)):n==="after"&&(a.groups.splice(u+1,0,i.group),t.push(i)))}}):it(o,i.item,r,n)&&t.push(i)}for(const i of e)t.includes(i)||E("menu-bar-item-could-not-be-added",{menuBarConfig:s,addedItemConfig:i})}}function it(s,o,e,t){let i=!1;return U(s.items,n=>{for(const{groupId:r,items:a}of n.groups){if(i)return;if(r===e)t==="start"?(a.unshift(o),i=!0):t==="end"&&(a.push(o),i=!0);else{const u=a.findIndex(c=>Nt(c)===e);u!==-1&&(t==="before"?(a.splice(u,0,o),i=!0):t==="after"&&(a.splice(u+1,0,o),i=!0))}}}),i}function Ss(s,o,e){U(o.items,t=>{for(const i of t.groups)i.items=i.items.filter(n=>{const r=typeof n=="string"&&!e.has(n);return r&&!o.isUsingDefaultConfig&&E("menu-bar-item-unavailable",{menuBarConfig:s,parentMenuConfig:Ie(t),componentName:n}),!r})})}function Mt(s,o){const e=o.isUsingDefaultConfig;let t=!1;if(o.items=o.items.filter(i=>i.groups.length?!0:(we(s,i,e),!1)),!o.items.length){we(s,s,e);return}U(o.items,i=>{i.groups=i.groups.filter(n=>n.items.length?!0:(t=!0,!1));for(const n of i.groups)n.items=n.items.filter(r=>Wt(r)&&!r.groups.length?(we(s,r,e),t=!0,!1):!0)}),t&&Mt(s,o)}function we(s,o,e){e||E("menu-bar-menu-empty",{menuBarConfig:s,emptyMenuConfig:o})}function Ms(s,o){const e=o.t,t={File:e({string:"File",id:"MENU_BAR_MENU_FILE"}),Edit:e({string:"Edit",id:"MENU_BAR_MENU_EDIT"}),View:e({string:"View",id:"MENU_BAR_MENU_VIEW"}),Insert:e({string:"Insert",id:"MENU_BAR_MENU_INSERT"}),Format:e({string:"Format",id:"MENU_BAR_MENU_FORMAT"}),Tools:e({string:"Tools",id:"MENU_BAR_MENU_TOOLS"}),Help:e({string:"Help",id:"MENU_BAR_MENU_HELP"}),Text:e({string:"Text",id:"MENU_BAR_MENU_TEXT"}),Font:e({string:"Font",id:"MENU_BAR_MENU_FONT"})};U(s.items,i=>{i.label in t&&(i.label=t[i.label])})}function U(s,o){if(Array.isArray(s))for(const t of s)e(t);function e(t){o(t);for(const i of t.groups)for(const n of i.items)Wt(n)&&e(n)}}function Ns(s){return typeof s=="object"&&"menu"in s}function Ws(s){return typeof s=="object"&&"group"in s}function Gs(s){return s.startsWith("start")?"start":s.startsWith("end")?"end":s.startsWith("after")?"after":"before"}function Rs(s){const o=s.match(/^[^:]+:(.+)/);return o?o[1]:null}function Nt(s){return typeof s=="string"?s:s.menuId}function Wt(s){return typeof s=="object"&&"menuId"in s}class vo extends le(){constructor(e){super();l(this,"editor");l(this,"componentFactory");l(this,"focusTracker");l(this,"tooltipManager");l(this,"poweredBy");l(this,"evaluationBadge");l(this,"ariaLiveAnnouncer");l(this,"isReady",!1);l(this,"_editableElementsMap",new Map);l(this,"_focusableToolbarDefinitions",[]);l(this,"_extraMenuBarElements",[]);l(this,"_lastFocusedForeignElement",null);const t=e.editing.view;this.editor=e,this.componentFactory=new bs(e),this.focusTracker=new v,this.tooltipManager=new ve(e),this.poweredBy=new Cs(e),this.evaluationBadge=new xs(e),this.ariaLiveAnnouncer=new Is(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",()=>{this._bindBodyCollectionWithFocusTracker(),this.isReady=!0}),this.listenTo(t.document,"layoutChanged",this.update.bind(this)),this.listenTo(t,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy(),this.evaluationBadge.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const i=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?i():this.once("ready",i)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e),this.editor.keystrokes.listenTo(e.element)):e.once("render",()=>{this.focusTracker.add(e),this.editor.keystrokes.listenTo(e.element)}),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}extendMenuBar(e){this._extraMenuBarElements.push(e)}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}initMenuBar(e){const t=e.element;this.focusTracker.add(t),this.editor.keystrokes.listenTo(t);const i=Fs(this.editor.config.get("menuBar")||{});e.fillFromConfig(i,this.componentFactory,this._extraMenuBarElements),this.editor.keystrokes.set("Esc",(n,r)=>{t.contains(this.editor.ui.focusTracker.focusedElement)&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):this.editor.editing.view.focus(),r())}),this.editor.keystrokes.set("Alt+F9",(n,r)=>{t.contains(this.editor.ui.focusTracker.focusedElement)||(this._saveLastFocusedForeignElement(),e.isFocusBorderEnabled=!0,e.focus(),r())})}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const i=e.config.get("toolbar.viewportTopOffset");return i?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:i}):{top:0}}_initFocusTracking(){const e=this.editor;let t;e.keystrokes.set("Alt+F10",(i,n)=>{this._saveLastFocusedForeignElement();const r=this._getCurrentFocusedToolbarDefinition();(!r||!t)&&(t=this._getFocusableCandidateToolbarDefinitions());for(let a=0;a<t.length;a++){const u=t.shift();if(t.push(u),u!==r&&this._focusFocusableCandidateToolbar(u)){r&&r.options.afterBlur&&r.options.afterBlur();break}}n()}),e.keystrokes.set("Esc",(i,n)=>{const r=this._getCurrentFocusedToolbarDefinition();r&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):e.editing.view.focus(),r.options.afterBlur&&r.options.afterBlur(),n())})}_saveLastFocusedForeignElement(){const e=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(e)&&!Array.from(this.editor.editing.view.domRoots.values()).includes(e)&&(this._lastFocusedForeignElement=e)}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:i,options:n}=t;(L(i.element)||n.beforeFocus)&&e.push(t)}return e.sort((t,i)=>st(t)-st(i)),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:i}}=e;return i&&i(),L(t.element)?(t.focus(),!0):!1}_handleScrollToTheSelection(e,t){const i={top:0,bottom:0,left:0,right:0,...this.viewportOffset};t.viewportOffset.top+=i.top,t.viewportOffset.bottom+=i.bottom,t.viewportOffset.left+=i.left,t.viewportOffset.right+=i.right}_bindBodyCollectionWithFocusTracker(){const e=this.view.body;for(const t of e)this.focusTracker.add(t.element);e.on("add",(t,i)=>{this.focusTracker.add(i.element)}),e.on("remove",(t,i)=>{this.focusTracker.remove(i.element)})}}function st(s){const{toolbarView:o,options:e}=s;let t=10;return L(o.element)&&t--,e.isContextual&&(t-=2),t}class Hs extends d{constructor(e){super(e);l(this,"body");l(this,"menuBarView");l(this,"toolbar");this.body=new ke(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class yo extends Hs{constructor(e){super(e);l(this,"top");l(this,"main");l(this,"_voiceLabelView");this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new he;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class zs extends d{constructor(e,t,i){super(e);l(this,"name",null);l(this,"_editingView");l(this,"_editableElement");l(this,"_hasExternalElement");this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=i,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;e.isRenderingInProgress?i(this):t(this);function t(n){e.change(r=>{const a=e.document.getRoot(n.name);r.addClass(n.isFocused?"ck-focused":"ck-blurred",a),r.removeClass(n.isFocused?"ck-blurred":"ck-focused",a)})}function i(n){e.once("change:isRenderingInProgress",(r,a,u)=>{u?i(n):t(n)})}}}class Co extends zs{constructor(e,t,i,n={}){super(e,t,i);l(this,"_options");this._options=n,this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView;e.change(t=>{const i=e.document.getRoot(this.name);t.setAttribute("aria-label",this.getEditableAriaLabel(),i)})}getEditableAriaLabel(){const e=this.locale.t,t=this._options.label,i=this._editableElement,n=this.name;if(typeof t=="string")return t;if(typeof t=="object")return t[n];if(typeof t=="function")return t(this);if(i){const r=i.getAttribute("aria-label");if(r)return r}return e("Rich Text Editor. Editing area: %0",n)}}class Vo extends d{constructor(e,t={}){super(e);l(this,"children");const i=this.bindTemplate;this.set("class",["ck","ck-form__row",...ae(t.class||[])]),this.children=this.createCollection(),t.children&&t.children.forEach(n=>this.children.add(n)),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:i.to("class",n=>n.join(" ")),role:i.to("_role"),"aria-labelledby":i.to("_ariaLabelledBy")},children:this.children})}}class xo extends jt{static get pluginName(){return"Notification"}static get isOfficialPlugin(){return!0}init(){this.on("show:warning",(o,e)=>{window.alert(e.message)},{priority:"lowest"})}showSuccess(o,e={}){this._showNotification({message:o,type:"success",namespace:e.namespace,title:e.title})}showInfo(o,e={}){this._showNotification({message:o,type:"info",namespace:e.namespace,title:e.title})}showWarning(o,e={}){this._showNotification({message:o,type:"warning",namespace:e.namespace,title:e.title})}_showNotification(o){const e=o.namespace?`show:${o.type}:${o.namespace}`:`show:${o.type}`;this.fire(e,{message:o.message,type:o.type,title:o.title||""})}}class Eo extends le(){constructor(o,e){super(),e&&ci(this,e),o&&this.set(o)}}const q=re("px");class Io extends xe{constructor(e){super(e);l(this,"positionLimiter");l(this,"visibleStack");l(this,"_viewToStack",new Map);l(this,"_idToStack",new Map);l(this,"_view",null);l(this,"_rotatorView",null);l(this,"_fakePanelsView",null);this.positionLimiter=()=>{const t=this.editor.editing.view,n=t.document.selection.editableElement;return n?t.domConverter.mapViewToDom(n.root):null},this.decorate("getPositionOptions"),this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}static get pluginName(){return"ContextualBalloon"}static get isOfficialPlugin(){return!0}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new V("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t)){this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,(!this._visibleStack||e.singleViewMode)&&this.showStack(t);return}const i=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),i.set(e.view,e),this._viewToStack.set(e.view,i),i===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new V("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(t.size===1?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),t.size===1?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this.getPositionOptions()),this._fakePanelsView.updatePosition()}getPositionOptions(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new V("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new H(this.editor.locale),this.editor.ui.view.body.add(this._view),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find(i=>i[1]===e)[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new Us(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(i,n)=>!n&&i>1),e.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(i,n)=>{if(n<2)return"";const r=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[r,n])}),e.buttonNextView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),e.buttonPrevView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),e}_createFakePanelsView(){const e=new $s(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(t,i)=>!i&&t>=2?Math.min(t-1,2):0),e.listenTo(this.view,"change:top",()=>e.updatePosition()),e.listenTo(this.view,"change:left",()=>e.updatePosition()),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:i=!0,singleViewMode:n=!1}){this.view.class=t,this.view.withArrow=i,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this.getPositionOptions()),this._fakePanelsView.updatePosition(),n&&(this._singleViewMode=!0)}}class Us extends d{constructor(e){super(e);l(this,"focusTracker");l(this,"buttonPrevView");l(this,"buttonNextView");l(this,"content");const t=e.t,i=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new v,this.buttonPrevView=this._createButtonView(t("Previous"),ii),this.buttonNextView=this._createButtonView(t("Next"),si),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",i.to("isNavigationVisible",n=>n?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:i.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const i=new w(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i}}class $s extends d{constructor(e,t){super(e);l(this,"content");l(this,"_balloonPanelView");const i=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",i.to("numberOfPanels",n=>n?"":"ck-hidden")],style:{top:i.to("top",q),left:i.to("left",q),width:i.to("width",q),height:i.to("height",q)}},children:this.content}),this.on("change:numberOfPanels",(n,r,a,u)=>{a>u?this._addPanels(a-u):this._removePanels(u-a),this.updatePosition()})}_addPanels(e){for(;e--;){const t=new d;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}_removePanels(e){for(;e--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:i,height:n}=new x(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:i,height:n})}}}const N=re("px");class Oo extends d{constructor(e){super(e);l(this,"content");l(this,"contentPanelElement");l(this,"_contentPanelPlaceholder");const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new I({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",i=>i?"block":"none"),height:t.to("isSticky",i=>i?N(this._contentPanelRect.height):null)}}}).render(),this.contentPanelElement=new I({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",i=>i?N(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to("_stickyTopOffset",i=>i&&N(i)),bottom:t.to("_stickyBottomOffset",i=>i&&N(i)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this.contentPanelElement]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo(p.document,"scroll",()=>{this.checkIfShouldBeSticky()},{useCapture:!0}),this.listenTo(this,"change:isActive",()=>{this.checkIfShouldBeSticky()}),(_.isiOS||_.isSafari)&&p.window.visualViewport&&(this.listenTo(p.window.visualViewport,"scroll",()=>{this.checkIfShouldBeSticky()}),this.listenTo(p.window.visualViewport,"resize",()=>{this.checkIfShouldBeSticky()}))}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive){this._unstick();return}const{left:e,top:t}=this._getVisualViewportOffset(),i=new x(this.limiterElement);let n=i.getVisible();if(n){const r=new x(p.window);let a=this.viewportTopOffset;(_.isiOS||_.isSafari)&&(a=t>this.viewportTopOffset?0:this.viewportTopOffset-t),r.top+=a,r.height-=a,n=n.getIntersection(r)}if(i.moveBy(e,t),n&&n.moveBy(e,t),n&&i.top<n.top){const r=n.top;if(r+this._contentPanelRect.height+this.limiterBottomOffset>n.bottom){const a=Math.max(i.bottom-n.bottom,0)+this.limiterBottomOffset;i.bottom-a>i.top+this._contentPanelRect.height+1?this._stickToBottomOfLimiter(a):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset<i.height?this._stickToTopOfAncestors(r):this._unstick()}else this._unstick()}_stickToTopOfAncestors(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=e,this._stickyBottomOffset=null,this._marginLeft=N(-p.window.scrollX+this._getVisualViewportOffset().left)}_stickToBottomOfLimiter(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!0,this._stickyTopOffset=null,this._stickyBottomOffset=e,this._marginLeft=N(-p.window.scrollX+this._getVisualViewportOffset().left)}_unstick(){this.isSticky=!1,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=null,this._stickyBottomOffset=null,this._marginLeft=null}get _contentPanelRect(){return new x(this.contentPanelElement)}_getVisualViewportOffset(){const e=p.window.visualViewport;if(!(_.isiOS||_.isSafari)||!e)return{left:0,top:0};const t=Math.max(Math.round(e.offsetLeft),0),i=Math.max(Math.round(e.offsetTop),0);return{left:t,top:i}}}class Ks extends R{constructor(e){super(e);l(this,"arrowView");const t=this.bindTemplate;this.set({withText:!0,role:"menuitem"}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__button"],"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",i=>String(i)),"data-cke-tooltip-disabled":t.to("isOn")},on:{mouseenter:t.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new F;return e.content=ce,e.extendTemplate({attributes:{class:"ck-menu-bar__menu__button__arrow"}}),e}}class js extends d{constructor(e){super(e);l(this,"children");const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-menu-bar__menu__panel",t.to("position",i=>`ck-menu-bar__menu__panel_position_${i}`),t.if("isVisible","ck-hidden",i=>!i)],tabindex:"-1"},children:this.children,on:{selectstart:t.to(i=>{i.target.tagName.toLocaleLowerCase()!=="input"&&i.preventDefault()})}})}focus(e=1){this.children.length&&(e===1?this.children.first.focus():this.children.last.focus())}}const ne=class ne extends d{constructor(e){super(e);l(this,"buttonView");l(this,"panelView");l(this,"focusTracker");l(this,"keystrokes");const t=this.bindTemplate;this.buttonView=new Ks(e),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.panelView=new js(e),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new P,this.focusTracker=new v,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("panelPosition","w"),this.set("class",void 0),this.set("parentMenuView",null),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar__menu",t.to("class"),t.if("isEnabled","ck-disabled",i=>!i),t.if("parentMenuView","ck-menu-bar__menu_top-level",i=>!i)]},children:[this.buttonView,this.panelView]})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.keystrokes.listenTo(this.element),B.closeOnEscKey(this),this._repositionPanelOnOpen()}_attachBehaviors(){this.parentMenuView?(B.openOnButtonClick(this),B.openOnArrowRightKey(this),B.closeOnArrowLeftKey(this),B.openAndFocusOnEnterKeyPress(this),B.closeOnParentClose(this)):(this._propagateArrowKeystrokeEvents(),B.openAndFocusPanelOnArrowDownKey(this),B.toggleOnButtonClick(this))}_propagateArrowKeystrokeEvents(){this.keystrokes.set("arrowright",(e,t)=>{this.fire("arrowright"),t()}),this.keystrokes.set("arrowleft",(e,t)=>{this.fire("arrowleft"),t()})}_repositionPanelOnOpen(){this.on("change:isOpen",(e,t,i)=>{if(!i)return;const n=ne._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=n?n.name:this._defaultMenuPositionName})}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:t,northEast:i,northWest:n,westSouth:r,eastSouth:a,westNorth:u,eastNorth:c}=Bs;return this.locale.uiLanguageDirection==="ltr"?this.parentMenuView?[a,c,r,u]:[e,t,i,n]:this.parentMenuView?[r,u,a,c]:[t,e,n,i]}get _defaultMenuPositionName(){return this.locale.uiLanguageDirection==="ltr"?this.parentMenuView?"es":"se":this.parentMenuView?"ws":"sw"}};l(ne,"_getOptimalPosition",Ve);let $=ne;class ot extends Fe{constructor(o){super(o),this.role="menu",this.items.on("change",this._setItemsCheckSpace.bind(this))}_setItemsCheckSpace(){const o=Array.from(this.items).some(e=>{const t=nt(e);return t&&t.isToggleable});this.items.forEach(e=>{const t=nt(e);t&&(t.hasCheckSpace=o)})}}function nt(s){return s instanceof A?s.children.map(o=>Xs(o)?o.buttonView:o).find(o=>o instanceof R):null}function Xs(s){return typeof s=="object"&&"buttonView"in s&&s.buttonView instanceof w}class qs extends Fi{constructor(o){super(o),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}const rt=["mouseenter","arrowleft","arrowright","change:isOpen"];class Po extends d{constructor(e){super(e);l(this,"children");l(this,"menus",[]);const t=e.t,i=this.bindTemplate;this.set({isOpen:!1,isFocusBorderEnabled:!1}),this._setupIsOpenUpdater(),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar",i.if("isFocusBorderEnabled","ck-menu-bar_focus-border-enabled")],"aria-label":t("Editor menu bar"),role:"menubar"},children:this.children})}fillFromConfig(e,t,i=[]){const n=this.locale,a=As({normalizedConfig:e,locale:n,componentFactory:t,extraItems:i}).items.map(u=>this._createMenu({componentFactory:t,menuDefinition:u}));this.children.addMany(a)}render(){super.render(),M.toggleMenusAndFocusItemsOnHover(this),M.closeMenusWhenTheBarCloses(this),M.closeMenuWhenAnotherOnTheSameLevelOpens(this),M.focusCycleMenusOnArrows(this),M.closeOnClickOutside(this),M.enableFocusHighlightOnInteraction(this)}focus(){this.children.first&&this.children.first.focus()}close(){for(const e of this.children)e.isOpen=!1}disable(){for(const e of this.children)e.isEnabled=!1}enable(){for(const e of this.children)e.isEnabled=!0}registerMenu(e,t=null){t?(e.delegate(...rt).to(t),e.parentMenuView=t):e.delegate(...rt).to(this,i=>"menu:"+i),e._attachBehaviors(),this.menus.push(e)}_createMenu({componentFactory:e,menuDefinition:t,parentMenuView:i}){const n=this.locale,r=new $(n);return this.registerMenu(r,i),r.buttonView.set({label:t.label}),r.once("change:isOpen",()=>{const a=new ot(n);a.ariaLabel=t.label,r.panelView.children.add(a),a.items.addMany(this._createMenuItems({menuDefinition:t,parentMenuView:r,componentFactory:e}))}),r}_createMenuItems({menuDefinition:e,parentMenuView:t,componentFactory:i}){const n=this.locale,r=[];for(const a of e.groups){for(const u of a.items){const c=new St(n,t);if(te(u))c.children.add(this._createMenu({componentFactory:i,menuDefinition:u,parentMenuView:t}));else{const h=this._createMenuItemContentFromFactory({componentName:u,componentFactory:i,parentMenuView:t});if(!h)continue;c.children.add(h)}r.push(c)}a!==e.groups[e.groups.length-1]&&r.push(new Le(n))}return r}_createMenuItemContentFromFactory({componentName:e,parentMenuView:t,componentFactory:i}){const n=i.create(e);return n instanceof $||n instanceof Tt||n instanceof qs?(this._registerMenuTree(n,t),n.on("execute",()=>{this.close()}),n):(E("menu-bar-component-unsupported",{componentName:e,componentView:n}),null)}_registerMenuTree(e,t){if(!(e instanceof $)){e.delegate("mouseenter").to(t);return}this.registerMenu(e,t);const i=e.panelView.children.filter(r=>r instanceof ot)[0];if(!i){e.delegate("mouseenter").to(t);return}const n=i.items.filter(r=>r instanceof A);for(const r of n)this._registerMenuTree(r.children.get(0),e)}_setupIsOpenUpdater(){let e;this.on("menu:change:isOpen",(t,i,n)=>{clearTimeout(e),n?this.isOpen=!0:e=setTimeout(()=>{this.isOpen=Array.from(this.children).some(r=>r.isOpen)},0)})}}export{fo as AccessibilityHelp,H as BalloonPanelView,ke as BodyCollection,yo as BoxedEditorUIView,kt as ButtonLabelView,w as ButtonView,mo as CollapsibleView,Ke as ColorGridView,hs as ColorPickerView,To as ColorSelectorView,Ct as ColorTileView,bs as ComponentFactory,Io as ContextualBalloon,ho as CssTransitionDisablerMixin,Ls as DefaultMenuBarItems,_e as Dialog,ge as DialogView,y as DialogViewPosition,ps as DocumentColorCollection,Ki as DropdownButtonView,$i as DropdownPanelView,Te as DropdownView,vo as EditorUI,Hs as EditorUIView,po as FileDialogButtonView,Fi as FileDialogListItemButtonView,z as FocusCycler,Ci as FormHeaderView,Vo as FormRowView,F as IconView,Co as InlineEditableUIView,Ui as InputNumberView,zi as InputTextView,Et as InputView,he as LabelView,Gi as LabeledFieldView,R as ListItemButtonView,Q as ListItemGroupView,A as ListItemView,Le as ListSeparatorView,Fe as ListView,Tt as MenuBarMenuListItemButtonView,qs as MenuBarMenuListItemFileDialogButtonView,St as MenuBarMenuListItemView,ot as MenuBarMenuListView,$ as MenuBarMenuView,Po as MenuBarView,xo as Notification,es as SplitButtonView,Oo as StickyPanelView,vt as SwitchButtonView,I as Template,Xi as ToolbarLineBreakView,It as ToolbarSeparatorView,Zi as ToolbarView,ve as TooltipManager,d as View,D as ViewCollection,Eo as ViewModel,yi as addKeyboardHandlingForGrid,go as addListToDropdown,Ot as addToolbarToDropdown,_t as clickOutsideHandler,Ae as createDropdown,ko as createLabeledDropdown,_o as createLabeledInputNumber,as as createLabeledInputText,Pt as focusChildOnDropdownOpen,wo as getLocalizedColorOptions,j as isFocusable,Vi as isViewWithFocusCycler,bo as normalizeColorOptions,Fs as normalizeMenuBarConfig,Di as normalizeSingleColorDefinition,Yi as normalizeToolbarConfig,uo as submitHandler};
@@ -1,4 +1,4 @@
1
- var B=Object.defineProperty;var b=(i,e,t)=>e in i?B(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var u=(i,e,t)=>b(i,typeof e!="symbol"?e+"":e,t);import{Plugin as p,icons as f,Command as y}from"../../../../../@ckeditor_ckeditor5-core@44.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{transformSets as k,NoOperation as R}from"../../../../../@ckeditor_ckeditor5-engine@44.3.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{ButtonView as C,MenuBarMenuListItemButtonView as T}from"../../../../../@ckeditor_ckeditor5-ui@44.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
1
+ var b=Object.defineProperty;var y=(i,e,t)=>e in i?b(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var u=(i,e,t)=>y(i,typeof e!="symbol"?e+"":e,t);import{Plugin as f,Command as R}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{transformSets as k,NoOperation as C}from"../../../../../@ckeditor_ckeditor5-engine@45.0.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{ButtonView as T,MenuBarMenuListItemButtonView as U}from"../../../../../@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{IconUndo as g,IconRedo as _}from"../../../../../@ckeditor_ckeditor5-icons@45.0.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */class _ extends y{constructor(t){super(t);u(this,"_stack",[]);u(this,"_createdBatches",new WeakSet);this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(t.data,"set",(o,s)=>{s[1]={...s[1]};const n=s[1];n.batchType||(n.batchType={isUndoable:!1})},{priority:"high"}),this.listenTo(t.data,"set",(o,s)=>{s[1].batchType.isUndoable||this.clearStack()})}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(t){const o=this.editor.model.document.selection,s={ranges:o.hasOwnRange?Array.from(o.getRanges()):[],isBackward:o.isBackward};this._stack.push({batch:t,selection:s}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,o,s){const n=this.editor.model,r=n.document,a=[],h=t.map(l=>l.getTransformedByOperations(s)),c=h.flat();for(const l of h){const m=l.filter(d=>d.root!=r.graveyard).filter(d=>!U(d,c));m.length&&(O(m),a.push(m[0]))}a.length&&n.change(l=>{l.setSelection(a,{backward:o})})}_undo(t,o){const s=this.editor.model,n=s.document;this._createdBatches.add(o);const r=t.operations.slice().filter(a=>a.isDocumentOperation);r.reverse();for(const a of r){const h=a.baseVersion+1,c=Array.from(n.history.getOperations(h)),m=k([a.getReversed()],c,{useRelations:!0,document:this.editor.model.document,forceWeakRemove:!0}).operationsA;for(let d of m){const g=d.affectedSelectable;g&&!s.canEditAt(g)&&(d=new R(d.baseVersion)),o.addOperation(d),s.applyOperation(d),n.history.setOperationAsUndone(a,d)}}}}function O(i){i.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let e=1;e<i.length;e++){const o=i[e-1].getJoined(i[e],!0);o&&(e--,i.splice(e,2,o))}}function U(i,e){return e.some(t=>t!==i&&t.containsRange(i,!0))}class w extends _{execute(e=null){const t=e?this._stack.findIndex(n=>n.batch==e):this._stack.length-1,o=this._stack.splice(t,1)[0],s=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(s,()=>{this._undo(o.batch,s);const n=this.editor.model.document.history.getOperations(o.batch.baseVersion);this._restoreSelection(o.selection.ranges,o.selection.isBackward,n)}),this.fire("revert",o.batch,s),this.refresh()}}class S extends _{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,()=>{const s=e.batch.operations[e.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(s);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch,t)}),this.refresh()}}class v extends p{constructor(){super(...arguments);u(this,"_undoCommand");u(this,"_redoCommand");u(this,"_batchRegistry",new WeakSet)}static get pluginName(){return"UndoEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,o=t.t;this._undoCommand=new w(t),this._redoCommand=new S(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",(s,n)=>{const r=n[0];if(!r.isDocumentOperation)return;const a=r.batch,h=this._redoCommand.createdBatches.has(a),c=this._undoCommand.createdBatches.has(a);this._batchRegistry.has(a)||(this._batchRegistry.add(a),a.isUndoable&&(h?this._undoCommand.addBatch(a):c||(this._undoCommand.addBatch(a),this._redoCommand.clearStack())))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(s,n,r)=>{this._redoCommand.addBatch(r)}),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Undo"),keystroke:"CTRL+Z"},{label:o("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}class x extends p{static get pluginName(){return"UndoUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale,o=e.t,s=t.uiLanguageDirection=="ltr"?f.undo:f.redo,n=t.uiLanguageDirection=="ltr"?f.redo:f.undo;this._addButtonsToFactory("undo",o("Undo"),"CTRL+Z",s),this._addButtonsToFactory("redo",o("Redo"),"CTRL+Y",n)}_addButtonsToFactory(e,t,o,s){const n=this.editor;n.ui.componentFactory.add(e,()=>{const r=this._createButton(C,e,t,o,s);return r.set({tooltip:!0}),r}),n.ui.componentFactory.add("menuBar:"+e,()=>this._createButton(T,e,t,o,s))}_createButton(e,t,o,s,n){const r=this.editor,a=r.locale,h=r.commands.get(t),c=new e(a);return c.set({label:o,icon:n,keystroke:s}),c.bind("isEnabled").to(h,"isEnabled"),this.listenTo(c,"execute",()=>{r.execute(t),r.editing.view.focus()}),c}}class F extends p{static get requires(){return[v,x]}static get pluginName(){return"Undo"}static get isOfficialPlugin(){return!0}}export{F as Undo,v as UndoEditing,x as UndoUI};
4
+ */class B extends R{constructor(t){super(t);u(this,"_stack",[]);u(this,"_createdBatches",new WeakSet);this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(t.data,"set",(o,s)=>{s[1]={...s[1]};const n=s[1];n.batchType||(n.batchType={isUndoable:!1})},{priority:"high"}),this.listenTo(t.data,"set",(o,s)=>{s[1].batchType.isUndoable||this.clearStack()})}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(t){const o=this.editor.model.document.selection,s={ranges:o.hasOwnRange?Array.from(o.getRanges()):[],isBackward:o.isBackward};this._stack.push({batch:t,selection:s}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,o,s){const n=this.editor.model,r=n.document,a=[],h=t.map(l=>l.getTransformedByOperations(s)),c=h.flat();for(const l of h){const m=l.filter(d=>d.root!=r.graveyard).filter(d=>!w(d,c));m.length&&(O(m),a.push(m[0]))}a.length&&n.change(l=>{l.setSelection(a,{backward:o})})}_undo(t,o){const s=this.editor.model,n=s.document;this._createdBatches.add(o);const r=t.operations.slice().filter(a=>a.isDocumentOperation);r.reverse();for(const a of r){const h=a.baseVersion+1,c=Array.from(n.history.getOperations(h)),m=k([a.getReversed()],c,{useRelations:!0,document:this.editor.model.document,forceWeakRemove:!0}).operationsA;for(let d of m){const p=d.affectedSelectable;p&&!s.canEditAt(p)&&(d=new C(d.baseVersion)),o.addOperation(d),s.applyOperation(d),n.history.setOperationAsUndone(a,d)}}}}function O(i){i.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let e=1;e<i.length;e++){const o=i[e-1].getJoined(i[e],!0);o&&(e--,i.splice(e,2,o))}}function w(i,e){return e.some(t=>t!==i&&t.containsRange(i,!0))}class S extends B{execute(e=null){const t=e?this._stack.findIndex(n=>n.batch==e):this._stack.length-1,o=this._stack.splice(t,1)[0],s=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(s,()=>{this._undo(o.batch,s);const n=this.editor.model.document.history.getOperations(o.batch.baseVersion);this._restoreSelection(o.selection.ranges,o.selection.isBackward,n)}),this.fire("revert",o.batch,s),this.refresh()}}class v extends B{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,()=>{const s=e.batch.operations[e.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(s);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch,t)}),this.refresh()}}class x extends f{constructor(){super(...arguments);u(this,"_undoCommand");u(this,"_redoCommand");u(this,"_batchRegistry",new WeakSet)}static get pluginName(){return"UndoEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,o=t.t;this._undoCommand=new S(t),this._redoCommand=new v(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",(s,n)=>{const r=n[0];if(!r.isDocumentOperation)return;const a=r.batch,h=this._redoCommand.createdBatches.has(a),c=this._undoCommand.createdBatches.has(a);this._batchRegistry.has(a)||(this._batchRegistry.add(a),a.isUndoable&&(h?this._undoCommand.addBatch(a):c||(this._undoCommand.addBatch(a),this._redoCommand.clearStack())))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(s,n,r)=>{this._redoCommand.addBatch(r)}),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Undo"),keystroke:"CTRL+Z"},{label:o("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}class I extends f{static get pluginName(){return"UndoUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale,o=e.t,s=t.uiLanguageDirection=="ltr"?g:_,n=t.uiLanguageDirection=="ltr"?_:g;this._addButtonsToFactory("undo",o("Undo"),"CTRL+Z",s),this._addButtonsToFactory("redo",o("Redo"),"CTRL+Y",n)}_addButtonsToFactory(e,t,o,s){const n=this.editor;n.ui.componentFactory.add(e,()=>{const r=this._createButton(T,e,t,o,s);return r.set({tooltip:!0}),r}),n.ui.componentFactory.add("menuBar:"+e,()=>this._createButton(U,e,t,o,s))}_createButton(e,t,o,s,n){const r=this.editor,a=r.locale,h=r.commands.get(t),c=new e(a);return c.set({label:o,icon:n,keystroke:s}),c.bind("isEnabled").to(h,"isEnabled"),this.listenTo(c,"execute",()=>{r.execute(t),r.editing.view.focus()}),c}}class P extends f{static get requires(){return[x,I]}static get pluginName(){return"Undo"}static get isOfficialPlugin(){return!0}}export{P as Undo,x as UndoEditing,I as UndoUI};
@@ -1,4 +1,4 @@
1
- var g=Object.defineProperty;var _=(o,a,e)=>a in o?g(o,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[a]=e;var i=(o,a,e)=>_(o,typeof a!="symbol"?a+"":a,e);import{Plugin as u,PendingActions as n}from"../../../../../@ckeditor_ckeditor5-core@44.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Collection as f,logWarning as w,ObservableMixin as c,uid as m,CKEditorError as l}from"../../../../../@ckeditor_ckeditor5-utils@44.3.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";/**
1
+ var g=Object.defineProperty;var _=(o,a,e)=>a in o?g(o,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[a]=e;var i=(o,a,e)=>_(o,typeof a!="symbol"?a+"":a,e);import{Plugin as u,PendingActions as n}from"../../../../../@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Collection as f,logWarning as w,ObservableMixin as c,uid as m,CKEditorError as l}from"../../../../../@ckeditor_ckeditor5-utils@45.0.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class b extends c(){constructor(){super();i(this,"total");i(this,"_reader");i(this,"_data");const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=t=>{this.loaded=t.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise((r,s)=>{t.onload=()=>{const d=t.result;this._data=d,r(d)},t.onerror=()=>{s("error")},t.onabort=()=>{s("aborted")},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}class h extends u{constructor(){super(...arguments);i(this,"loaders",new f);i(this,"_loadersMap",new Map);i(this,"_pendingAction",null)}static get pluginName(){return"FileRepository"}static get isOfficialPlugin(){return!0}static get requires(){return[n]}init(){this.loaders.on("change",()=>this._updatePendingAction()),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0)}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return w("filerepository-no-upload-adapter"),null;const t=new p(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then(r=>{this._loadersMap.set(r,t)}).catch(()=>{}),t.on("change:uploaded",()=>{let r=0;for(const s of this.loaders)r+=s.uploaded;this.uploaded=r}),t.on("change:uploadTotal",()=>{let r=0;for(const s of this.loaders)s.uploadTotal&&(r+=s.uploadTotal);this.uploadTotal=r}),t}destroyLoader(e){const t=e instanceof p?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach((r,s)=>{r===t&&this._loadersMap.delete(s)})}_updatePendingAction(){const e=this.editor.plugins.get(n);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,r=s=>`${t("Upload in progress")} ${parseInt(s)}%.`;this._pendingAction=e.add(r(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",r)}}else e.remove(this._pendingAction),this._pendingAction=null}}class p extends c(){constructor(e,t){super();i(this,"id");i(this,"_filePromiseWrapper");i(this,"_adapter");i(this,"_reader");this.id=m(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new b,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(r,s)=>s?r/s*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(e=>this._filePromiseWrapper?e:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if(this.status!="idle")throw new l("filerepository-read-wrong-status",this);return this.status="reading",this.file.then(e=>this._reader.read(e)).then(e=>{if(this.status!=="reading")throw this.status;return this.status="idle",e}).catch(e=>{throw e==="aborted"?(this.status="aborted","aborted"):(this.status="error",this._reader.error?this._reader.error:e)})}upload(){if(this.status!="idle")throw new l("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then(()=>this._adapter.upload()).then(e=>(this.uploadResponse=e,this.status="idle",e)).catch(e=>{throw this.status==="aborted"?"aborted":(this.status="error",e)})}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?e=="reading"?this._reader.abort():e=="uploading"&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch(()=>{}),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise((r,s)=>{t.rejecter=s,t.isFulfilled=!1,e.then(d=>{t.isFulfilled=!0,r(d)}).catch(d=>{t.isFulfilled=!0,s(d)})}),t}}class R extends u{static get requires(){return[h]}static get pluginName(){return"Base64UploadAdapter"}static get isOfficialPlugin(){return!0}init(){this.editor.plugins.get(h).createUploadAdapter=a=>new P(a)}}let P=class{constructor(a){i(this,"loader");i(this,"reader");this.loader=a}upload(){return new Promise((a,e)=>{const t=this.reader=new window.FileReader;t.addEventListener("load",()=>{a({default:t.result})}),t.addEventListener("error",r=>{e(r)}),t.addEventListener("abort",()=>{e()}),this.loader.file.then(r=>{t.readAsDataURL(r)})})}abort(){this.reader.abort()}};export{R as Base64UploadAdapter,h as FileRepository};