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

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 (371) 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/chip/chip.js +1 -1
  5. package/dist/components/chip/gator/chip.gator.js +5 -5
  6. package/dist/components/input-rich-text/ckeditor-config.js +1 -1
  7. package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
  8. package/dist/components/panel/gator/panel.storybook-test.js +1 -1
  9. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-alignment@45.0.0/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +4 -0
  10. 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
  11. 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
  12. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@45.0.0/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +4 -0
  13. 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
  14. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@45.0.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +20 -0
  15. 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
  16. 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
  17. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +4 -0
  18. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@45.0.0/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +4 -0
  19. 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
  20. 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
  21. 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
  22. 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
  23. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@45.0.0/node_modules/@ckeditor/ckeditor5-font/dist/index.js +7 -0
  24. 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
  25. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-highlight@45.0.0/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +4 -0
  26. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-horizontal-line@45.0.0/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +4 -0
  27. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@45.0.0/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +4 -0
  28. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@45.0.0/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +12 -0
  29. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-icons@45.0.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +6 -0
  30. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@45.0.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +10 -0
  31. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@45.0.0/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +10 -0
  32. 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
  33. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@45.0.0/node_modules/@ckeditor/ckeditor5-link/dist/index.js +4 -0
  34. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@45.0.0/node_modules/@ckeditor/ckeditor5-list/dist/index.js +13 -0
  35. 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
  36. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@45.0.0/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +7 -0
  37. 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
  38. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-page-break@45.0.0/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +4 -0
  39. 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
  40. 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
  41. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-remove-format@45.0.0/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +4 -0
  42. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-select-all@45.0.0/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +4 -0
  43. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-show-blocks@45.0.0/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +4 -0
  44. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@45.0.0/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +12 -0
  45. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@45.0.0/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +4 -0
  46. 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
  47. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@45.0.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +16 -0
  48. 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
  49. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +28 -0
  50. 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
  51. 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
  52. 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
  53. 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
  54. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@45.0.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +4 -0
  55. 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
  56. 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
  57. package/dist/node_modules/.pnpm/color-parse@1.4.2/node_modules/color-parse/index.js +1 -1
  58. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +1 -0
  59. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/getTag.js +1 -0
  60. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +1 -0
  61. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.js +1 -0
  62. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +1 -0
  63. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/normalizeForCase.js +1 -0
  64. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/tags.js +1 -0
  65. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/toKey.js +1 -0
  66. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/debounce.js +1 -0
  67. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/throttle.js +1 -0
  68. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/assignIn.js +1 -0
  69. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -0
  70. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +1 -0
  71. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/get.js +1 -0
  72. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/keysIn.js +1 -0
  73. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/mapValues.js +1 -0
  74. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/merge.js +1 -0
  75. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/mergeWith.js +1 -0
  76. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/property.js +1 -0
  77. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/set.js +1 -0
  78. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/unset.js +1 -0
  79. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +1 -0
  80. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +1 -0
  81. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isElement.js +1 -0
  82. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js +1 -0
  83. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isObject.js +1 -0
  84. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +1 -0
  85. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +1 -0
  86. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isString.js +1 -0
  87. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js +1 -0
  88. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js +1 -0
  89. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js +1 -0
  90. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/startCase.js +1 -0
  91. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/upperFirst.js +1 -0
  92. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/eq.js +1 -0
  93. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/times.js +1 -0
  94. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toFinite.js +1 -0
  95. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toInteger.js +1 -0
  96. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toNumber.js +1 -0
  97. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toPath.js +1 -0
  98. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toString.js +1 -0
  99. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/after.js +1 -0
  100. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/debounce.js +1 -0
  101. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/identity.js +1 -0
  102. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/noop.js +1 -0
  103. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/clone.js +1 -0
  104. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/cloneDeepWith.js +1 -0
  105. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/mapValues.js +1 -0
  106. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isBuffer.js +1 -0
  107. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqual.js +1 -0
  108. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqualWith.js +1 -0
  109. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isFunction.js +1 -0
  110. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isLength.js +1 -0
  111. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isPlainObject.js +1 -0
  112. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isPrimitive.js +1 -0
  113. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isTypedArray.js +1 -0
  114. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/string/escapeRegExp.js +1 -0
  115. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/string/upperFirst.js +1 -0
  116. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/string/words.js +1 -0
  117. package/dist/packages/web-components/src/components/chip/gator/chip.gator.scss.js +1 -1
  118. package/dist/packages/web-components/src/tokens/semantic.tokens.scss.js +1 -1
  119. package/dist/types/components/chip/chip.d.ts +9 -2
  120. package/dist/types/components/chip/gator/chip.gator.d.ts +2 -0
  121. package/dist/types/components/scoped-notification/scoped-notification.slds.d.ts +1 -1
  122. package/dist/utils/vitest-a11y-utils.js +1 -1
  123. package/package.json +2 -2
  124. package/web-types.json +19 -3
  125. package/dist/assets/node_modules/.pnpm/ckeditor5@44.3.0/node_modules/ckeditor5/dist/ckeditor5.css +0 -4
  126. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-alignment@44.3.0/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +0 -4
  127. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@44.3.0/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +0 -4
  128. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@44.3.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +0 -20
  129. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@44.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +0 -6
  130. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@44.3.0/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +0 -4
  131. 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
  132. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@44.3.0/node_modules/@ckeditor/ckeditor5-font/dist/index.js +0 -7
  133. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-highlight@44.3.0/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +0 -4
  134. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-horizontal-line@44.3.0/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +0 -4
  135. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@44.3.0/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +0 -4
  136. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@44.3.0/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +0 -12
  137. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@44.3.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +0 -10
  138. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@44.3.0/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +0 -10
  139. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@44.3.0/node_modules/@ckeditor/ckeditor5-link/dist/index.js +0 -4
  140. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@44.3.0/node_modules/@ckeditor/ckeditor5-list/dist/index.js +0 -13
  141. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@44.3.0/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +0 -7
  142. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-page-break@44.3.0/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +0 -4
  143. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-remove-format@44.3.0/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +0 -4
  144. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-select-all@44.3.0/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +0 -4
  145. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-show-blocks@44.3.0/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +0 -4
  146. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@44.3.0/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +0 -12
  147. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@44.3.0/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +0 -4
  148. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@44.3.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +0 -19
  149. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@44.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +0 -29
  150. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@44.3.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +0 -4
  151. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_DataView.js +0 -1
  152. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js +0 -1
  153. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js +0 -1
  154. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js +0 -1
  155. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js +0 -1
  156. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Promise.js +0 -1
  157. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.js +0 -1
  158. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.js +0 -1
  159. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Stack.js +0 -1
  160. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +0 -1
  161. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Uint8Array.js +0 -1
  162. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_WeakMap.js +0 -1
  163. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_apply.js +0 -1
  164. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayEach.js +0 -1
  165. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayFilter.js +0 -1
  166. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayLikeKeys.js +0 -1
  167. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayMap.js +0 -1
  168. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayPush.js +0 -1
  169. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayReduce.js +0 -1
  170. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arraySome.js +0 -1
  171. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiToArray.js +0 -1
  172. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiWords.js +0 -1
  173. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignMergeValue.js +0 -1
  174. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignValue.js +0 -1
  175. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js +0 -1
  176. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssign.js +0 -1
  177. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignIn.js +0 -1
  178. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignValue.js +0 -1
  179. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseClone.js +0 -1
  180. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseCreate.js +0 -1
  181. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseEach.js +0 -1
  182. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFor.js +0 -1
  183. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseForOwn.js +0 -1
  184. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGet.js +0 -1
  185. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetAllKeys.js +0 -1
  186. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +0 -1
  187. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseHasIn.js +0 -1
  188. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsArguments.js +0 -1
  189. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqual.js +0 -1
  190. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqualDeep.js +0 -1
  191. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsMap.js +0 -1
  192. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsMatch.js +0 -1
  193. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js +0 -1
  194. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsSet.js +0 -1
  195. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsTypedArray.js +0 -1
  196. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIteratee.js +0 -1
  197. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeys.js +0 -1
  198. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeysIn.js +0 -1
  199. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMap.js +0 -1
  200. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMatches.js +0 -1
  201. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMatchesProperty.js +0 -1
  202. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMerge.js +0 -1
  203. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMergeDeep.js +0 -1
  204. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseProperty.js +0 -1
  205. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyDeep.js +0 -1
  206. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyOf.js +0 -1
  207. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseRest.js +0 -1
  208. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSet.js +0 -1
  209. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSetToString.js +0 -1
  210. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSlice.js +0 -1
  211. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTimes.js +0 -1
  212. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseToString.js +0 -1
  213. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +0 -1
  214. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUnary.js +0 -1
  215. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUnset.js +0 -1
  216. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.js +0 -1
  217. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castPath.js +0 -1
  218. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castSlice.js +0 -1
  219. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneArrayBuffer.js +0 -1
  220. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneBuffer.js +0 -1
  221. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneDataView.js +0 -1
  222. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneRegExp.js +0 -1
  223. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneSymbol.js +0 -1
  224. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneTypedArray.js +0 -1
  225. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyArray.js +0 -1
  226. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyObject.js +0 -1
  227. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copySymbols.js +0 -1
  228. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copySymbolsIn.js +0 -1
  229. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js +0 -1
  230. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createAssigner.js +0 -1
  231. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createBaseEach.js +0 -1
  232. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createBaseFor.js +0 -1
  233. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCaseFirst.js +0 -1
  234. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCompounder.js +0 -1
  235. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_deburrLetter.js +0 -1
  236. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_defineProperty.js +0 -1
  237. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalArrays.js +0 -1
  238. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalByTag.js +0 -1
  239. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalObjects.js +0 -1
  240. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +0 -1
  241. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeys.js +0 -1
  242. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeysIn.js +0 -1
  243. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js +0 -1
  244. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMatchData.js +0 -1
  245. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js +0 -1
  246. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getPrototype.js +0 -1
  247. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +0 -1
  248. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getSymbols.js +0 -1
  249. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getSymbolsIn.js +0 -1
  250. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getTag.js +0 -1
  251. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +0 -1
  252. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasPath.js +0 -1
  253. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicode.js +0 -1
  254. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicodeWord.js +0 -1
  255. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js +0 -1
  256. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js +0 -1
  257. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js +0 -1
  258. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js +0 -1
  259. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js +0 -1
  260. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneArray.js +0 -1
  261. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneByTag.js +0 -1
  262. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneObject.js +0 -1
  263. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIndex.js +0 -1
  264. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIterateeCall.js +0 -1
  265. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKey.js +0 -1
  266. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js +0 -1
  267. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js +0 -1
  268. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isPrototype.js +0 -1
  269. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isStrictComparable.js +0 -1
  270. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js +0 -1
  271. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js +0 -1
  272. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js +0 -1
  273. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js +0 -1
  274. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js +0 -1
  275. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js +0 -1
  276. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js +0 -1
  277. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js +0 -1
  278. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js +0 -1
  279. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js +0 -1
  280. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapToArray.js +0 -1
  281. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_matchesStrictComparable.js +0 -1
  282. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_memoizeCapped.js +0 -1
  283. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js +0 -1
  284. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeys.js +0 -1
  285. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeysIn.js +0 -1
  286. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nodeUtil.js +0 -1
  287. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +0 -1
  288. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overArg.js +0 -1
  289. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overRest.js +0 -1
  290. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_parent.js +0 -1
  291. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +0 -1
  292. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_safeGet.js +0 -1
  293. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.js +0 -1
  294. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.js +0 -1
  295. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js +0 -1
  296. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToString.js +0 -1
  297. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_shortOut.js +0 -1
  298. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackClear.js +0 -1
  299. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackDelete.js +0 -1
  300. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackGet.js +0 -1
  301. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackHas.js +0 -1
  302. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackSet.js +0 -1
  303. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringToArray.js +0 -1
  304. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringToPath.js +0 -1
  305. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toKey.js +0 -1
  306. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js +0 -1
  307. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +0 -1
  308. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeToArray.js +0 -1
  309. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeWords.js +0 -1
  310. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/assignIn.js +0 -1
  311. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/clone.js +0 -1
  312. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/cloneDeep.js +0 -1
  313. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/cloneDeepWith.js +0 -1
  314. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/constant.js +0 -1
  315. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +0 -1
  316. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/deburr.js +0 -1
  317. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js +0 -1
  318. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/escapeRegExp.js +0 -1
  319. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get.js +0 -1
  320. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/hasIn.js +0 -1
  321. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/identity.js +0 -1
  322. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArguments.js +0 -1
  323. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js +0 -1
  324. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLike.js +0 -1
  325. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLikeObject.js +0 -1
  326. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isBuffer.js +0 -1
  327. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isElement.js +0 -1
  328. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqual.js +0 -1
  329. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqualWith.js +0 -1
  330. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js +0 -1
  331. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isLength.js +0 -1
  332. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isMap.js +0 -1
  333. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +0 -1
  334. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +0 -1
  335. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isPlainObject.js +0 -1
  336. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSet.js +0 -1
  337. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isString.js +0 -1
  338. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +0 -1
  339. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isTypedArray.js +0 -1
  340. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keys.js +0 -1
  341. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keysIn.js +0 -1
  342. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/last.js +0 -1
  343. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/map.js +0 -1
  344. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/mapValues.js +0 -1
  345. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/memoize.js +0 -1
  346. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.js +0 -1
  347. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/mergeWith.js +0 -1
  348. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +0 -1
  349. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/property.js +0 -1
  350. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set.js +0 -1
  351. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/startCase.js +0 -1
  352. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubArray.js +0 -1
  353. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubFalse.js +0 -1
  354. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/throttle.js +0 -1
  355. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +0 -1
  356. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toPlainObject.js +0 -1
  357. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toString.js +0 -1
  358. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/unset.js +0 -1
  359. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/upperFirst.js +0 -1
  360. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/words.js +0 -1
  361. /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
  362. /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
  363. /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
  364. /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
  365. /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
  366. /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
  367. /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
  368. /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
  369. /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
  370. /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
  371. /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
@@ -1,19 +0,0 @@
1
- var to=Object.defineProperty;var oo=(i,t,e)=>t in i?to(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var g=(i,t,e)=>oo(i,typeof t!="symbol"?t+"":t,e);import{Plugin as y,icons as S,Command as R}from"../../../../../@ckeditor_ckeditor5-core@44.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Widget as no,WidgetToolbarRepository as He,toWidgetEditable as ht,isWidget as lo,toWidget as io}from"../../../../../@ckeditor_ckeditor5-widget@44.3.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{Collection as mt,first as gt,getLocalizedArrowKeyCodeDirection as so,DomEmitterMixin as ro,global as se,CKEditorError as Oe,KeystrokeHandler as me,FocusTracker as ge,Rect as De}from"../../../../../@ckeditor_ckeditor5-utils@44.3.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{createDropdown as oe,MenuBarMenuView as ao,SwitchButtonView as co,addListToDropdown as Pe,ButtonView as E,ContextualBalloon as re,normalizeColorOptions as ae,getLocalizedColorOptions as ce,clickOutsideHandler as bt,SplitButtonView as uo,View as L,addKeyboardHandlingForGrid as ho,ViewModel as ft,ViewCollection as Ee,FocusCycler as Be,FormHeaderView as pt,submitHandler as wt,LabelView as W,LabeledFieldView as k,createLabeledDropdown as Ct,createLabeledInputText as F,ToolbarView as we,BalloonPanelView as z,InputTextView as mo,ColorSelectorView as go}from"../../../../../@ckeditor_ckeditor5-ui@44.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{ClipboardMarkersUtils as fe,ClipboardPipeline as bo}from"../../../../../@ckeditor_ckeditor5-clipboard@44.3.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{enablePlaceholder as fo,Element as po,addBorderRules as Tt,addPaddingRules as wo,addBackgroundRules as vt,DomEventObserver as Co,isColor as To,isLength as _t,isPercentage as vo}from"../../../../../@ckeditor_ckeditor5-engine@44.3.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import yt from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/debounce.js";import Ue from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/isEqual.js";import _o from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/throttle.js";import yo from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/isObject.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
- *//**
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 We(i,t){const{modelAttribute:e,styleName:o,viewElement:n,defaultValue:l,reduceBoxSides:s=!1,shouldUpcast:r=()=>!0}=t;i.for("upcast").attributeToAttribute({view:{name:n,styles:{[o]:/[\s\S]+/}},model:{key:e,value:a=>{if(!r(a))return;const c=a.getNormalizedStyle(o),d=s?le(c):c;if(l!==d)return d}}})}function Ce(i,t,e,o){i.for("upcast").add(n=>n.on("element:"+t,(l,s,r)=>{if(!s.modelRange)return;const a=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter(m=>s.viewItem.hasStyle(m));if(!a.length)return;const c={styles:a};if(!r.consumable.test(s.viewItem,c))return;const d=[...s.modelRange.getItems({shallow:!0})].pop();r.consumable.consume(s.viewItem,c);const u={style:s.viewItem.getNormalizedStyle("border-style"),color:s.viewItem.getNormalizedStyle("border-color"),width:s.viewItem.getNormalizedStyle("border-width")},h={style:le(u.style),color:le(u.color),width:le(u.width)};h.style!==o.style&&r.writer.setAttribute(e.style,h.style,d),h.color!==o.color&&r.writer.setAttribute(e.color,h.color,d),h.width!==o.width&&r.writer.setAttribute(e.width,h.width,d)}))}function q(i,t){const{modelElement:e,modelAttribute:o,styleName:n}=t;i.for("downcast").attributeToAttribute({model:{name:e,key:o},view:l=>({key:"style",value:{[n]:l}})})}function ne(i,t){const{modelAttribute:e,styleName:o}=t;i.for("downcast").add(n=>n.on(`attribute:${e}:table`,(l,s,r)=>{const{item:a,attributeNewValue:c}=s,{mapper:d,writer:u}=r;if(!r.consumable.consume(s.item,l.name))return;const h=[...d.toViewElement(a).getChildren()].find(m=>m.is("element","table"));c?u.setStyle(o,c,h):u.removeStyle(o,h)}))}function le(i){if(!i)return;const t=["top","right","bottom","left"];if(!t.every(l=>i[l]))return i;const o=i.top;return t.every(l=>i[l]===o)?o:i}function _(i,t,e,o,n=1){t!=null&&n!==void 0&&n!==null&&t>n?o.setAttribute(i,t,e):o.removeAttribute(i,e)}function H(i,t,e={}){const o=i.createElement("tableCell",e);return i.insertElement("paragraph",o),i.insert(o,t),o}function Te(i,t){const e=t.parent.parent,o=parseInt(e.getAttribute("headingColumns")||"0"),{column:n}=i.getCellLocation(t);return!!o&&n<o}function ie(i,t,e){const{modelAttribute:o}=e;i.extend("tableCell",{allowAttributes:[o]}),We(t,{viewElement:/^(td|th)$/,...e}),q(t,{modelElement:"tableCell",...e})}function N(i){const t=i.getSelectedElement();return t&&t.is("element","table")?t:i.getFirstPosition().findAncestor("table")}function Ao(){return i=>{i.on("element:figure",(t,e,o)=>{if(!o.consumable.test(e.viewItem,{name:!0,classes:"table"}))return;const n=xo(e.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(e.viewItem,{name:!0,classes:"table"});const l=o.convertItem(n,e.modelCursor),s=gt(l.modelRange.getItems());if(!s){o.consumable.revert(e.viewItem,{name:!0,classes:"table"});return}o.convertChildren(e.viewItem,o.writer.createPositionAt(s,"end")),o.updateConversionResult(s,e)})}}function So(){return i=>{i.on("element:table",(t,e,o)=>{const n=e.viewItem;if(!o.consumable.test(n,{name:!0}))return;const{rows:l,headingRows:s,headingColumns:r}=Vo(n),a={};r&&(a.headingColumns=r),s&&(a.headingRows=s);const c=o.writer.createElement("table",a);if(o.safeInsert(c,e.modelCursor)){if(o.consumable.consume(n,{name:!0}),l.forEach(d=>o.convertItem(d,o.writer.createPositionAt(c,"end"))),o.convertChildren(n,o.writer.createPositionAt(c,"end")),c.isEmpty){const d=o.writer.createElement("tableRow");o.writer.insert(d,o.writer.createPositionAt(c,"end")),H(o.writer,o.writer.createPositionAt(d,"end"))}o.updateConversionResult(c,e)}})}}function Ro(){return i=>{i.on("element:tr",(t,e)=>{e.viewItem.isEmpty&&e.modelCursor.index==0&&t.stop()},{priority:"high"})}}function Ge(i){return t=>{t.on(`element:${i}`,(e,o,{writer:n})=>{if(!o.modelRange)return;const l=o.modelRange.start.nodeAfter,s=n.createPositionAt(l,0);if(o.viewItem.isEmpty){n.insertElement("paragraph",s);return}const r=Array.from(l.getChildren());if(r.every(a=>a.is("element","$marker"))){const a=n.createElement("paragraph");n.insert(a,n.createPositionAt(l,0));for(const c of r)n.move(n.createRangeOn(c),n.createPositionAt(a,"end"))}},{priority:"low"})}}function xo(i){for(const t of i.getChildren())if(t.is("element","table"))return t}function Vo(i){let t=0,e;const o=[],n=[];let l;for(const s of Array.from(i.getChildren())){if(s.name!=="tbody"&&s.name!=="thead"&&s.name!=="tfoot")continue;s.name==="thead"&&!l&&(l=s);const r=Array.from(s.getChildren()).filter(c=>c.is("element","tr"));let a=null;for(const c of r){const d=Array.from(c.getChildren()).filter(u=>u.is("element","td")||u.is("element","th"));if(l&&s===l||s.name==="tbody"&&d.length>0&&(a===null||d.length===a)&&d.every(u=>u.is("element","th")))t++,o.push(c);else{n.push(c);const u=Io(c);(!e||u<e)&&(e=u)}a=Math.max(a||0,d.length)}}return{headingRows:t,headingColumns:e||0,rows:[...o,...n]}}function Io(i){let t=0,e=0;const o=Array.from(i.getChildren()).filter(n=>n.name==="th"||n.name==="td");for(;e<o.length&&o[e].name==="th";){const n=o[e],l=parseInt(n.getAttribute("colspan")||"1");t=t+l,e++}return t}/**
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
- */class T{constructor(t,e={}){g(this,"_table");g(this,"_startRow");g(this,"_endRow");g(this,"_startColumn");g(this,"_endColumn");g(this,"_includeAllSlots");g(this,"_skipRows");g(this,"_row");g(this,"_rowIndex");g(this,"_column");g(this,"_cellIndex");g(this,"_spannedCells");g(this,"_nextCellAtColumn");g(this,"_jumpedToStartRow",!1);this._table=t,this._startRow=e.row!==void 0?e.row:e.startRow||0,this._endRow=e.row!==void 0?e.row:e.endRow,this._startColumn=e.column!==void 0?e.column:e.startColumn||0,this._endColumn=e.column!==void 0?e.column:e.endColumn,this._includeAllSlots=!!e.includeAllSlots,this._skipRows=new Set,this._row=0,this._rowIndex=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){this._canJumpToStartRow()&&this._jumpToNonSpannedRowClosestToStartRow();const t=this._table.getChild(this._rowIndex);if(!t||this._isOverEndRow())return{done:!0,value:void 0};if(!t.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let e=null;const o=this._getSpanned();if(o)this._includeAllSlots&&!this._shouldSkipSlot()&&(e=this._formatOutValue(o.cell,o.row,o.column));else{const n=t.getChild(this._cellIndex);if(!n)return this._advanceToNextRow();const l=parseInt(n.getAttribute("colspan")||"1"),s=parseInt(n.getAttribute("rowspan")||"1");(l>1||s>1)&&this._recordSpans(n,s,l),this._shouldSkipSlot()||(e=this._formatOutValue(n)),this._nextCellAtColumn=this._column+l}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,e||this.next()}skipRow(t){this._skipRows.add(t)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return this._endRow!==void 0&&this._row>this._endRow}_isOverEndColumn(){return this._endColumn!==void 0&&this._column>this._endColumn}_formatOutValue(t,e=this._row,o=this._column){return{done:!1,value:new ko(this,t,e,o)}}_shouldSkipSlot(){const t=this._skipRows.has(this._row),e=this._row<this._startRow,o=this._column<this._startColumn,n=this._endColumn!==void 0&&this._column>this._endColumn;return t||e||o||n}_getSpanned(){const t=this._spannedCells.get(this._row);return t&&t.get(this._column)||null}_recordSpans(t,e,o){const n={cell:t,row:this._row,column:this._column};for(let l=this._row;l<this._row+e;l++)for(let s=this._column;s<this._column+o;s++)(l!=this._row||s!=this._column)&&this._markSpannedCell(l,s,n)}_markSpannedCell(t,e,o){this._spannedCells.has(t)||this._spannedCells.set(t,new Map),this._spannedCells.get(t).set(e,o)}_canJumpToStartRow(){return!!this._startRow&&this._startRow>0&&!this._jumpedToStartRow}_jumpToNonSpannedRowClosestToStartRow(){const t=this._getRowLength(0);for(let e=this._startRow;!this._jumpedToStartRow;e--)t===this._getRowLength(e)&&(this._row=e,this._rowIndex=e,this._jumpedToStartRow=!0)}_getRowLength(t){return[...this._table.getChild(t).getChildren()].reduce((o,n)=>o+parseInt(n.getAttribute("colspan")||"1"),0)}}class ko{constructor(t,e,o,n){g(this,"cell");g(this,"row");g(this,"column");g(this,"cellAnchorRow");g(this,"cellAnchorColumn");g(this,"_cellIndex");g(this,"_rowIndex");g(this,"_table");this.cell=e,this.row=t._row,this.column=t._column,this.cellAnchorRow=o,this.cellAnchorColumn=n,this._cellIndex=t._cellIndex,this._rowIndex=t._rowIndex,this._table=t._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||"1")}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||"1")}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}function $e(i,t){return(e,{writer:o})=>{const n=e.getAttribute("headingRows")||0,l=o.createContainerElement("table",null,[]),s=o.createContainerElement("figure",{class:"table"},l);n>0&&o.insert(o.createPositionAt(l,"end"),o.createContainerElement("thead",null,o.createSlot(r=>r.is("element","tableRow")&&r.index<n))),n<i.getRows(e)&&o.insert(o.createPositionAt(l,"end"),o.createContainerElement("tbody",null,o.createSlot(r=>r.is("element","tableRow")&&r.index>=n)));for(const{positionOffset:r,filter:a}of t.additionalSlots)o.insert(o.createPositionAt(l,r),o.createSlot(a));return o.insert(o.createPositionAt(l,"after"),o.createSlot(r=>r.is("element","tableRow")?!1:!t.additionalSlots.some(({filter:a})=>a(r)))),t.asWidget?Eo(s,o):s}}function Po(){return(i,{writer:t})=>i.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}function je(i={}){return(t,{writer:e})=>{const o=t.parent,n=o.parent,l=n.getChildIndex(o),s=new T(n,{row:l}),r=n.getAttribute("headingRows")||0,a=n.getAttribute("headingColumns")||0;let c=null;for(const d of s)if(d.cell==t){const h=d.row<r||d.column<a?"th":"td";c=i.asWidget?ht(e.createEditableElement(h),e):e.createContainerElement(h);break}return c}}function qe(i={}){return(t,{writer:e})=>{if(!t.parent.is("element","tableCell")||!At(t))return null;if(i.asWidget)return e.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const o=e.createContainerElement("p");return e.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}}function At(i){return i.parent.childCount==1&&!Bo(i)}function Eo(i,t){return t.setCustomProperty("table",!0,i),io(i,t,{hasSelectionHandle:!0})}function Bo(i){for(const t of i.getAttributeKeys())if(!(t.startsWith("selection:")||t=="htmlEmptyBlock"))return!0;return!1}class Wo extends R{refresh(){const t=this.editor.model,e=t.document.selection,o=t.schema;this.isEnabled=Lo(e,o)}execute(t={}){const e=this.editor,o=e.model,n=e.plugins.get("TableUtils"),l=e.config.get("table.defaultHeadings.rows"),s=e.config.get("table.defaultHeadings.columns");t.headingRows===void 0&&l&&(t.headingRows=l),t.headingColumns===void 0&&s&&(t.headingColumns=s),o.change(r=>{const a=n.createTable(r,t);o.insertObject(a,null,null,{findOptimalPosition:"auto"}),r.setSelection(r.createPositionAt(a.getNodeByPath([0,0,0]),0))})}}function Lo(i,t){const e=i.getFirstPosition().parent,o=e===e.root?e:e.parent;return t.checkChild(o,"table")}class Ke extends R{constructor(e,o={}){super(e);g(this,"order");this.order=o.order||"below"}refresh(){const e=this.editor.model.document.selection,n=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=n}execute(){const e=this.editor,o=e.model.document.selection,n=e.plugins.get("TableUtils"),l=this.order==="above",s=n.getSelectionAffectedTableCells(o),r=n.getRowIndexes(s),a=l?r.first:r.last,c=s[0].findAncestor("table");n.insertRows(c,{at:l?a:a+1,copyStructureFromAbove:!l})}}class Xe extends R{constructor(e,o={}){super(e);g(this,"order");this.order=o.order||"right"}refresh(){const e=this.editor.model.document.selection,n=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=n}execute(){const e=this.editor,o=e.model.document.selection,n=e.plugins.get("TableUtils"),l=this.order==="left",s=n.getSelectionAffectedTableCells(o),r=n.getColumnIndexes(s),a=l?r.first:r.last,c=s[0].findAncestor("table");n.insertColumns(c,{columns:1,at:l?a:a+1})}}class Je extends R{constructor(e,o={}){super(e);g(this,"direction");this.direction=o.direction||"horizontally"}refresh(){const o=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=o.length===1}execute(){const e=this.editor.plugins.get("TableUtils"),o=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];this.direction==="horizontally"?e.splitCellHorizontally(o,2):e.splitCellVertically(o,2)}}function St(i,t,e){const{startRow:o,startColumn:n,endRow:l,endColumn:s}=t,r=e.createElement("table"),a=l-o+1;for(let d=0;d<a;d++)e.insertElement("tableRow",r,"end");const c=[...new T(i,{startRow:o,endRow:l,startColumn:n,endColumn:s,includeAllSlots:!0})];for(const{row:d,column:u,cell:h,isAnchor:m,cellAnchorRow:f,cellAnchorColumn:w}of c){const b=d-o,p=r.getChild(b);if(!m)(f<o||w<n)&&H(e,e.createPositionAt(p,"end"));else{const C=e.cloneElement(h);e.append(C,p),kt(C,d,u,l,s,e)}}return zo(r,i,o,n,e),r}function Rt(i,t,e=0){const o=[],n=new T(i,{startRow:e,endRow:t-1});for(const l of n){const{row:s,cellHeight:r}=l,a=s+r-1;s<t&&t<=a&&o.push(l)}return o}function xt(i,t,e){const o=i.parent,n=o.parent,l=o.index,s=parseInt(i.getAttribute("rowspan")),r=t-l,a={},c=s-r;c>1&&(a.rowspan=c);const d=parseInt(i.getAttribute("colspan")||"1");d>1&&(a.colspan=d);const u=l,h=u+r,m=[...new T(n,{startRow:u,endRow:h,includeAllSlots:!0})];let f=null,w;for(const b of m){const{row:p,column:C,cell:v}=b;v===i&&w===void 0&&(w=C),w!==void 0&&w===C&&p===h&&(f=H(e,b.getPositionBefore(),a))}return _("rowspan",r,i,e),f}function Vt(i,t){const e=[],o=new T(i);for(const n of o){const{column:l,cellWidth:s}=n,r=l+s-1;l<t&&t<=r&&e.push(n)}return e}function It(i,t,e,o){const n=parseInt(i.getAttribute("colspan")),l=e-t,s={},r=n-l;r>1&&(s.colspan=r);const a=parseInt(i.getAttribute("rowspan")||"1");a>1&&(s.rowspan=a);const c=H(o,o.createPositionAfter(i),s);return _("colspan",l,i,o),c}function kt(i,t,e,o,n,l){const s=parseInt(i.getAttribute("colspan")||"1"),r=parseInt(i.getAttribute("rowspan")||"1");if(e+s-1>n){const d=n-e+1;_("colspan",d,i,l,1)}if(t+r-1>o){const d=o-t+1;_("rowspan",d,i,l,1)}}function zo(i,t,e,o,n){const l=parseInt(t.getAttribute("headingRows")||"0");if(l>0){const r=l-e;_("headingRows",r,i,n,0)}const s=parseInt(t.getAttribute("headingColumns")||"0");if(s>0){const r=s-o;_("headingColumns",r,i,n,0)}}function ve(i,t){const e=t.getColumns(i),o=new Array(e).fill(0);for(const{column:l}of new T(i))o[l]++;const n=o.reduce((l,s,r)=>s?l:[...l,r],[]);if(n.length>0){const l=n[n.length-1];return t.removeColumns(i,{at:l}),!0}return!1}function _e(i,t){const e=[],o=t.getRows(i);for(let n=0;n<o;n++)i.getChild(n).isEmpty&&e.push(n);if(e.length>0){const n=e[e.length-1];return t.removeRows(i,{at:n}),!0}return!1}function Le(i,t){ve(i,t)||_e(i,t)}function Pt(i,t){const e=Array.from(new T(i,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(e.every(({cellHeight:l})=>l===1))return t.lastRow;const n=e[0].cellHeight-1;return t.lastRow+n}function Et(i,t){const e=Array.from(new T(i,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(e.every(({cellWidth:l})=>l===1))return t.lastColumn;const n=e[0].cellWidth-1;return t.lastColumn+n}class Z extends R{constructor(e,o){super(e);g(this,"direction");g(this,"isHorizontal");this.direction=o.direction,this.isHorizontal=this.direction=="right"||this.direction=="left"}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,o=e.document,l=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(o.selection)[0],s=this.value,r=this.direction;e.change(a=>{const c=r=="right"||r=="down",d=c?l:s,u=c?s:l,h=u.parent;Mo(u,d,a);const m=this.isHorizontal?"colspan":"rowspan",f=parseInt(l.getAttribute(m)||"1"),w=parseInt(s.getAttribute(m)||"1");a.setAttribute(m,f+w,d),a.setSelection(a.createRangeIn(d));const b=this.editor.plugins.get("TableUtils"),p=h.findAncestor("table");Le(p,b)})}_getMergeableCell(){const o=this.editor.model.document,n=this.editor.plugins.get("TableUtils"),l=n.getTableCellsContainingSelection(o.selection)[0];if(!l)return;const s=this.isHorizontal?Fo(l,this.direction,n):No(l,this.direction,n);if(!s)return;const r=this.isHorizontal?"rowspan":"colspan",a=parseInt(l.getAttribute(r)||"1");if(parseInt(s.getAttribute(r)||"1")===a)return s}}function Fo(i,t,e){const n=i.parent.parent,l=t=="right"?i.nextSibling:i.previousSibling,s=(n.getAttribute("headingColumns")||0)>0;if(!l)return;const r=t=="right"?i:l,a=t=="right"?l:i,{column:c}=e.getCellLocation(r),{column:d}=e.getCellLocation(a),u=parseInt(r.getAttribute("colspan")||"1"),h=Te(e,r),m=Te(e,a);return s&&h!=m?void 0:c+u===d?l:void 0}function No(i,t,e){const o=i.parent,n=o.parent,l=n.getChildIndex(o);if(t=="down"&&l===e.getRows(n)-1||t=="up"&&l===0)return null;const s=parseInt(i.getAttribute("rowspan")||"1"),r=n.getAttribute("headingRows")||0,a=t=="down"&&l+s===r,c=t=="up"&&l===r;if(r&&(a||c))return null;const d=parseInt(i.getAttribute("rowspan")||"1"),u=t=="down"?l+d:l,h=[...new T(n,{endRow:u})],f=h.find(b=>b.cell===i).column,w=h.find(({row:b,cellHeight:p,column:C})=>C!==f?!1:t=="down"?b===u:u===b+p);return w&&w.cell?w.cell:null}function Mo(i,t,e){Ye(i)||(Ye(t)&&e.remove(e.createRangeIn(t)),e.move(e.createRangeIn(i),e.createPositionAt(t,"end"))),e.remove(i)}function Ye(i){const t=i.getChild(0);return i.childCount==1&&t.is("element","paragraph")&&t.isEmpty}class Ho extends R{refresh(){const t=this.editor.plugins.get("TableUtils"),e=t.getSelectionAffectedTableCells(this.editor.model.document.selection),o=e[0];if(o){const n=o.findAncestor("table"),s=t.getRows(n)-1,r=t.getRowIndexes(e),a=r.first===0&&r.last===s;this.isEnabled=!a}else this.isEnabled=!1}execute(){const t=this.editor.model,e=this.editor.plugins.get("TableUtils"),o=e.getSelectionAffectedTableCells(t.document.selection),n=e.getRowIndexes(o),l=o[0],s=l.findAncestor("table"),r=e.getCellLocation(l).column;t.change(a=>{const c=n.last-n.first+1;e.removeRows(s,{at:n.first,rows:c});const d=Oo(s,n.first,r,e.getRows(s));a.setSelection(a.createPositionAt(d,0))})}}function Oo(i,t,e,o){const n=i.getChild(Math.min(t,o-1));let l=n.getChild(0),s=0;for(const r of n.getChildren()){if(s>e)return l;l=r,s+=parseInt(r.getAttribute("colspan")||"1")}return l}class Do extends R{refresh(){const t=this.editor.plugins.get("TableUtils"),e=t.getSelectionAffectedTableCells(this.editor.model.document.selection),o=e[0];if(o){const n=o.findAncestor("table"),l=t.getColumns(n),{first:s,last:r}=t.getColumnIndexes(e);this.isEnabled=r-s<l-1}else this.isEnabled=!1}execute(){const t=this.editor.plugins.get("TableUtils"),[e,o]=Go(this.editor.model.document.selection,t),n=e.parent.parent,l=[...new T(n)],s={first:l.find(a=>a.cell===e).column,last:l.find(a=>a.cell===o).column},r=Uo(l,e,o,s);this.editor.model.change(a=>{const c=s.last-s.first+1;t.removeColumns(n,{at:s.first,columns:c}),a.setSelection(a.createPositionAt(r,0))})}}function Uo(i,t,e,o){return parseInt(e.getAttribute("colspan")||"1")>1?e:t.previousSibling||e.nextSibling?e.nextSibling||t.previousSibling:o.first?i.reverse().find(({column:l})=>l<o.first).cell:i.reverse().find(({column:l})=>l>o.last).cell}function Go(i,t){const e=t.getSelectionAffectedTableCells(i),o=e[0],n=e.pop(),l=[o,n];return o.isBefore(n)?l:l.reverse()}class $o extends R{refresh(){const t=this.editor.plugins.get("TableUtils"),e=this.editor.model,o=t.getSelectionAffectedTableCells(e.document.selection),n=o.length>0;this.isEnabled=n,this.value=n&&o.every(l=>this._isInHeading(l,l.parent.parent))}execute(t={}){if(t.forceValue===this.value)return;const e=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=e.getSelectionAffectedTableCells(o.document.selection),l=n[0].findAncestor("table"),{first:s,last:r}=e.getRowIndexes(n),a=this.value?s:r+1,c=l.getAttribute("headingRows")||0;o.change(d=>{if(a){const u=a>c?c:0,h=Rt(l,a,u);for(const{cell:m}of h)xt(m,a,d)}_("headingRows",a,l,d,0)})}_isInHeading(t,e){const o=parseInt(e.getAttribute("headingRows")||"0");return!!o&&t.parent.index<o}}class jo extends R{refresh(){const t=this.editor.model,e=this.editor.plugins.get("TableUtils"),o=e.getSelectionAffectedTableCells(t.document.selection),n=o.length>0;this.isEnabled=n,this.value=n&&o.every(l=>Te(e,l))}execute(t={}){if(t.forceValue===this.value)return;const e=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=e.getSelectionAffectedTableCells(o.document.selection),l=n[0].findAncestor("table"),{first:s,last:r}=e.getColumnIndexes(n),a=this.value?s:r+1;o.change(c=>{if(a){const d=Vt(l,a);for(const{cell:u,column:h}of d)It(u,h,a,c)}_("headingColumns",a,l,c,0)})}}/**
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
- */const qo=5,ye=40,Ko=2;function Xo(i){const t=new Set;for(const e of i.document.differ.getChanges()){let o=null;switch(e.type){case"insert":o=["table","tableRow","tableCell"].includes(e.name)?e.position:null;break;case"remove":o=["tableRow","tableCell"].includes(e.name)?e.position:null;break;case"attribute":e.range.start.nodeAfter&&(o=["table","tableRow","tableCell"].includes(e.range.start.nodeAfter.name)?e.range.start:null);break}if(!o)continue;const n=o.nodeAfter&&o.nodeAfter.is("element","table")?o.nodeAfter:o.findAncestor("table");for(const l of i.createRangeOn(n).getItems())l.is("element","table")&&J(l)&&t.add(l)}return t}function Jo(i,t){return ye*100/Bt(i,t)}function Bt(i,t){const e=Qe(i,"tbody",t)||Qe(i,"thead",t),o=t.editing.view.domConverter.mapViewToDom(e);return Ae(o)}function Qe(i,t,e){return[...[...e.editing.mapper.toViewElement(i).getChildren()].find(l=>l.is("element","table")).getChildren()].find(l=>l.is("element",t))}function Ae(i){const t=se.window.getComputedStyle(i);return t.boxSizing==="border-box"?parseFloat(t.width)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth):parseFloat(t.width)}function Yo(i,t){const e=t.getCellLocation(i).column,o=i.getAttribute("colspan")||1;return{leftEdge:e,rightEdge:e+o-1}}function x(i){const t=Math.pow(10,Ko),e=typeof i=="number"?i:parseFloat(i);return Math.round(e*t)/t}function Qo(i,t,e){return i<=t?x(t):i>=e?x(e):x(i)}function Zo(i,t){return Array(i).fill(t)}function X(i){return i.map(t=>typeof t=="number"?t:parseFloat(t)).filter(t=>!Number.isNaN(t)).reduce((t,e)=>t+e,0)}function ze(i){const t=i.map(n=>n==="auto"?n:parseFloat(n.replace("%","")));let e=en(t);const o=X(e);return o!==100&&(e=e.map(n=>x(n*100/o)).map((n,l,s)=>{if(!(l===s.length-1))return n;const a=X(s);return x(n+100-a)})),e.map(n=>n+"%")}function en(i){const t=i.filter(n=>n==="auto").length;if(t===0)return i.map(n=>x(n));const e=X(i),o=Math.max((100-e)/t,qo);return i.map(n=>n==="auto"?o:n).map(n=>x(n))}function tn(i){const t=se.window.getComputedStyle(i);return t.boxSizing==="border-box"?parseInt(t.width):parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)+parseFloat(t.borderWidth)}function Wt(i,t,e,o){for(let n=0;n<Math.max(e.length,i.length);n++){const l=i[n],s=e[n];s?l?o.setAttribute("columnWidth",s,l):o.appendElement("tableColumn",{columnWidth:s},t):o.remove(l)}}function J(i){if(i.is("element","tableColumnGroup"))return i;const t=i.getChildren();return Array.from(t).find(e=>e.is("element","tableColumnGroup"))}function Y(i){const t=J(i);return t?Array.from(t.getChildren()):[]}function on(i){return Y(i).map(t=>t.getAttribute("columnWidth"))}function nn(i,t){return Y(i).reduce((o,n)=>{const l=n.getAttribute("columnWidth"),s=n.getAttribute("colSpan");if(!s)return o.push(l),o;for(let r=0;r<s;r++)o.push(l);return t.removeAttribute("colSpan",n),o},[])}class A extends y{static get pluginName(){return"TableUtils"}static get isOfficialPlugin(){return!0}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(t){const e=t.parent,o=e.parent,n=o.getChildIndex(e),l=new T(o,{row:n});for(const{cell:s,row:r,column:a}of l)if(s===t)return{row:r,column:a};/* istanbul ignore next -- @preserve */}createTable(t,e){const o=t.createElement("table"),n=e.rows||2,l=e.columns||2;return pe(t,o,0,n,l),e.headingRows&&_("headingRows",Math.min(e.headingRows,n),o,t,0),e.headingColumns&&_("headingColumns",Math.min(e.headingColumns,l),o,t,0),o}insertRows(t,e={}){const o=this.editor.model,n=e.at||0,l=e.rows||1,s=e.copyStructureFromAbove!==void 0,r=e.copyStructureFromAbove?n-1:n,a=this.getRows(t),c=this.getColumns(t);if(n>a)throw new Oe("tableutils-insertrows-insert-out-of-range",this,{options:e});o.change(d=>{const u=t.getAttribute("headingRows")||0;if(u>n&&_("headingRows",u+l,t,d,0),!s&&(n===0||n===a)){pe(d,t,n,l,c);return}const h=s?Math.max(n,r):n,m=new T(t,{endRow:h}),f=new Array(c).fill(1);for(const{row:w,column:b,cellHeight:p,cellWidth:C,cell:v}of m){const V=w+p-1,I=w<n&&n<=V,j=w<=r&&r<=V;I?(d.setAttribute("rowspan",p+l,v),f[b]=-C):s&&j&&(f[b]=C)}for(let w=0;w<l;w++){const b=d.createElement("tableRow");d.insert(b,t,n);for(let p=0;p<f.length;p++){const C=f[p],v=d.createPositionAt(b,"end");C>0&&H(d,v,C>1?{colspan:C}:void 0),p+=Math.abs(C)-1}}})}insertColumns(t,e={}){const o=this.editor.model,n=e.at||0,l=e.columns||1;o.change(s=>{const r=t.getAttribute("headingColumns");n<r&&s.setAttribute("headingColumns",r+l,t);const a=this.getColumns(t);if(n===0||a===n){for(const d of t.getChildren())d.is("element","tableRow")&&$(l,s,s.createPositionAt(d,n?"end":0));return}const c=new T(t,{column:n,includeAllSlots:!0});for(const d of c){const{row:u,cell:h,cellAnchorColumn:m,cellAnchorRow:f,cellWidth:w,cellHeight:b}=d;if(m<n){s.setAttribute("colspan",w+l,h);const p=f+b-1;for(let C=u;C<=p;C++)c.skipRow(C)}else $(l,s,d.getPositionBefore())}})}removeRows(t,e){const o=this.editor.model,n=e.rows||1,l=this.getRows(t),s=e.at,r=s+n-1;if(r>l-1)throw new Oe("tableutils-removerows-row-index-out-of-range",this,{table:t,options:e});o.change(a=>{const c={first:s,last:r},{cellsToMove:d,cellsToTrim:u}=rn(t,c);if(d.size){const h=r+1;an(t,h,d,a)}for(let h=r;h>=s;h--)a.remove(t.getChild(h));for(const{rowspan:h,cell:m}of u)_("rowspan",h,m,a);sn(t,c,a),ve(t,this)||_e(t,this)})}removeColumns(t,e){const o=this.editor.model,n=e.at,l=e.columns||1,s=e.at+l-1;o.change(r=>{ln(t,{first:n,last:s},r);const a=Y(t);for(let c=s;c>=n;c--){for(const{cell:d,column:u,cellWidth:h}of[...new T(t)])u<=c&&h>1&&u+h>c?_("colspan",h-1,d,r):u===c&&r.remove(d);if(a[c]){const d=c===0?a[1]:a[c-1],u=parseFloat(a[c].getAttribute("columnWidth")),h=parseFloat(d.getAttribute("columnWidth"));r.remove(a[c]),r.setAttribute("columnWidth",u+h+"%",d)}}_e(t,this)||ve(t,this)})}splitCellVertically(t,e=2){const o=this.editor.model,l=t.parent.parent,s=parseInt(t.getAttribute("rowspan")||"1"),r=parseInt(t.getAttribute("colspan")||"1");o.change(a=>{if(r>1){const{newCellsSpan:c,updatedSpan:d}=Ze(r,e);_("colspan",d,t,a);const u={};c>1&&(u.colspan=c),s>1&&(u.rowspan=s);const h=r>e?e-1:r-1;$(h,a,a.createPositionAfter(t),u)}if(r<e){const c=e-r,d=[...new T(l)],{column:u}=d.find(({cell:w})=>w===t),h=d.filter(({cell:w,cellWidth:b,column:p})=>{const C=w!==t&&p===u,v=p<u&&p+b>u;return C||v});for(const{cell:w,cellWidth:b}of h)a.setAttribute("colspan",b+c,w);const m={};s>1&&(m.rowspan=s),$(c,a,a.createPositionAfter(t),m);const f=l.getAttribute("headingColumns")||0;f>u&&_("headingColumns",f+c,l,a)}})}splitCellHorizontally(t,e=2){const o=this.editor.model,n=t.parent,l=n.parent,s=l.getChildIndex(n),r=parseInt(t.getAttribute("rowspan")||"1"),a=parseInt(t.getAttribute("colspan")||"1");o.change(c=>{if(r>1){const d=[...new T(l,{startRow:s,endRow:s+r-1,includeAllSlots:!0})],{newCellsSpan:u,updatedSpan:h}=Ze(r,e);_("rowspan",h,t,c);const{column:m}=d.find(({cell:b})=>b===t),f={};u>1&&(f.rowspan=u),a>1&&(f.colspan=a);let w=0;for(const b of d){const{column:p,row:C}=b,v=C>=s+h,V=p===m;w>=u&&V&&(w=0),v&&V&&(w||$(1,c,b.getPositionBefore(),f),w++)}}if(r<e){const d=e-r,u=[...new T(l,{startRow:0,endRow:s})];for(const{cell:f,cellHeight:w,row:b}of u)if(f!==t&&b+w>s){const p=w+d;c.setAttribute("rowspan",p,f)}const h={};a>1&&(h.colspan=a),pe(c,l,s+1,d,1,h);const m=l.getAttribute("headingRows")||0;m>s&&_("headingRows",m+d,l,c)}})}getColumns(t){return[...t.getChild(0).getChildren()].filter(o=>o.is("element","tableCell")).reduce((o,n)=>{const l=parseInt(n.getAttribute("colspan")||"1");return o+l},0)}getRows(t){return Array.from(t.getChildren()).reduce((e,o)=>o.is("element","tableRow")?e+1:e,0)}createTableWalker(t,e={}){return new T(t,e)}getSelectedTableCells(t){const e=[];for(const o of this.sortRanges(t.getRanges())){const n=o.getContainedElement();n&&n.is("element","tableCell")&&e.push(n)}return e}getTableCellsContainingSelection(t){const e=[];for(const o of t.getRanges()){const n=o.start.findAncestor("tableCell");n&&e.push(n)}return e}getSelectionAffectedTableCells(t){const e=this.getSelectedTableCells(t);return e.length?e:this.getTableCellsContainingSelection(t)}getRowIndexes(t){const e=t.map(o=>o.parent.index);return this._getFirstLastIndexesObject(e)}getColumnIndexes(t){const e=t[0].findAncestor("table"),n=[...new T(e)].filter(l=>t.includes(l.cell)).map(l=>l.column);return this._getFirstLastIndexesObject(n)}isSelectionRectangular(t){if(t.length<2||!this._areCellInTheSameTableSection(t))return!1;const e=new Set,o=new Set;let n=0;for(const s of t){const{row:r,column:a}=this.getCellLocation(s),c=parseInt(s.getAttribute("rowspan"))||1,d=parseInt(s.getAttribute("colspan"))||1;e.add(r),o.add(a),c>1&&e.add(r+c-1),d>1&&o.add(a+d-1),n+=c*d}return dn(e,o)==n}sortRanges(t){return Array.from(t).sort(cn)}_getFirstLastIndexesObject(t){const e=t.sort((l,s)=>l-s),o=e[0],n=e[e.length-1];return{first:o,last:n}}_areCellInTheSameTableSection(t){const e=t[0].findAncestor("table"),o=this.getRowIndexes(t),n=parseInt(e.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(o,n))return!1;const l=this.getColumnIndexes(t),s=parseInt(e.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(l,s)}_areIndexesInSameSection({first:t,last:e},o){const n=t<o,l=e<o;return n===l}}function pe(i,t,e,o,n,l={}){for(let s=0;s<o;s++){const r=i.createElement("tableRow");i.insert(r,t,e),$(n,i,i.createPositionAt(r,"end"),l)}}function $(i,t,e,o={}){for(let n=0;n<i;n++)H(t,e,o)}function Ze(i,t){if(i<t)return{newCellsSpan:1,updatedSpan:1};const e=Math.floor(i/t),o=i-e*t+e;return{newCellsSpan:e,updatedSpan:o}}function ln(i,t,e){const o=i.getAttribute("headingColumns")||0;if(o&&t.first<o){const n=Math.min(o-1,t.last)-t.first+1;e.setAttribute("headingColumns",o-n,i)}}function sn(i,{first:t,last:e},o){const n=i.getAttribute("headingRows")||0;if(t<n){const l=e<n?n-(e-t+1):t;_("headingRows",l,i,o,0)}}function rn(i,{first:t,last:e}){const o=new Map,n=[];for(const{row:l,column:s,cellHeight:r,cell:a}of new T(i,{endRow:e})){const c=l+r-1;if(l>=t&&l<=e&&c>e){const h=e-l+1,m=r-h;o.set(s,{cell:a,rowspan:m})}if(l<t&&c>=t){let h;c>=e?h=e-t+1:h=c-t+1,n.push({cell:a,rowspan:r-h})}}return{cellsToMove:o,cellsToTrim:n}}function an(i,t,e,o){const l=[...new T(i,{includeAllSlots:!0,row:t})],s=i.getChild(t);let r;for(const{column:a,cell:c,isAnchor:d}of l)if(e.has(a)){const{cell:u,rowspan:h}=e.get(a),m=r?o.createPositionAfter(r):o.createPositionAt(s,0);o.move(o.createRangeOn(u),m),_("rowspan",h,u,o),r=u}else d&&(r=c)}function cn(i,t){const e=i.start,o=t.start;return e.isBefore(o)?-1:1}function dn(i,t){const e=Array.from(i.values()),o=Array.from(t.values()),n=Math.max(...e),l=Math.min(...e),s=Math.max(...o),r=Math.min(...o);return(n-l+1)*(s-r+1)}class un extends R{refresh(){const t=this.editor.plugins.get(A),e=t.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=t.isSelectionRectangular(e)}execute(){const t=this.editor.model,e=this.editor.plugins.get(A);t.change(o=>{const n=e.getSelectedTableCells(t.document.selection),l=n.shift(),{mergeWidth:s,mergeHeight:r}=mn(l,n,e);_("colspan",s,l,o),_("rowspan",r,l,o);for(const c of n)hn(c,l,o);const a=l.findAncestor("table");Le(a,e),o.setSelection(l,"in")})}}function hn(i,t,e){et(i)||(et(t)&&e.remove(e.createRangeIn(t)),e.move(e.createRangeIn(i),e.createPositionAt(t,"end"))),e.remove(i)}function et(i){const t=i.getChild(0);return i.childCount==1&&t.is("element","paragraph")&&t.isEmpty}function mn(i,t,e){let o=0,n=0;for(const c of t){const{row:d,column:u}=e.getCellLocation(c);o=tt(c,u,o,"colspan"),n=tt(c,d,n,"rowspan")}const{row:l,column:s}=e.getCellLocation(i),r=o-s,a=n-l;return{mergeWidth:r,mergeHeight:a}}function tt(i,t,e,o){const n=parseInt(i.getAttribute(o)||"1");return Math.max(e,t+n)}class gn extends R{constructor(t){super(t),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const t=this.editor.model,e=this.editor.plugins.get("TableUtils"),o=e.getSelectionAffectedTableCells(t.document.selection),n=e.getRowIndexes(o),l=o[0].findAncestor("table"),s=[];for(let r=n.first;r<=n.last;r++)for(const a of l.getChild(r).getChildren())s.push(t.createRangeOn(a));t.change(r=>{r.setSelection(s)})}}class bn extends R{constructor(t){super(t),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const t=this.editor.plugins.get("TableUtils"),e=this.editor.model,o=t.getSelectionAffectedTableCells(e.document.selection),n=o[0],l=o.pop(),s=n.findAncestor("table"),r=t.getCellLocation(n),a=t.getCellLocation(l),c=Math.min(r.column,a.column),d=Math.max(r.column,a.column),u=[];for(const h of new T(s,{startColumn:c,endColumn:d}))u.push(e.createRangeOn(h.cell));e.change(h=>{h.setSelection(u)})}}function fn(i){i.document.registerPostFixer(t=>pn(t,i))}function pn(i,t){const e=t.document.differ.getChanges();let o=!1;const n=new Set;for(const l of e){let s=null;l.type=="insert"&&l.name=="table"&&(s=l.position.nodeAfter),(l.type=="insert"||l.type=="remove")&&(l.name=="tableRow"||l.name=="tableCell")&&(s=l.position.findAncestor("table")),_n(l)&&(s=l.range.start.findAncestor("table")),s&&!n.has(s)&&(o=wn(s,i)||o,o=Cn(s,i)||o,n.add(s))}return o}function wn(i,t){let e=!1;const o=Tn(i);if(o.length){e=!0;for(const n of o)_("rowspan",n.rowspan,n.cell,t,1)}return e}function Cn(i,t){let e=!1;const o=vn(i),n=[];for(const[a,c]of o.entries())!c&&i.getChild(a).is("element","tableRow")&&n.push(a);if(n.length){e=!0;for(const a of n.reverse())t.remove(i.getChild(a)),o.splice(a,1)}const l=o.filter((a,c)=>i.getChild(c).is("element","tableRow")),s=l[0];if(!l.every(a=>a===s)){const a=l.reduce((c,d)=>d>c?d:c,0);for(const[c,d]of l.entries()){const u=a-d;if(u){for(let h=0;h<u;h++)H(t,t.createPositionAt(i.getChild(c),"end"));e=!0}}}return e}function Tn(i){const t=parseInt(i.getAttribute("headingRows")||"0"),e=Array.from(i.getChildren()).reduce((n,l)=>l.is("element","tableRow")?n+1:n,0),o=[];for(const{row:n,cell:l,cellHeight:s}of new T(i)){if(s<2)continue;const a=n<t?t:e;if(n+s>a){const c=a-n;o.push({cell:l,rowspan:c})}}return o}function vn(i){const t=new Array(i.childCount).fill(0);for(const{rowIndex:e}of new T(i,{includeAllSlots:!0}))t[e]++;return t}function _n(i){if(i.type!=="attribute")return!1;const t=i.attributeKey;return t==="headingRows"||t==="colspan"||t==="rowspan"}/**
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 yn(i){i.document.registerPostFixer(t=>An(t,i))}function An(i,t){const e=t.document.differ.getChanges();let o=!1;for(const n of e)n.type=="insert"&&n.name=="table"&&(o=Sn(n.position.nodeAfter,i)||o),n.type=="insert"&&n.name=="tableRow"&&(o=Lt(n.position.nodeAfter,i)||o),n.type=="insert"&&n.name=="tableCell"&&(o=Se(n.position.nodeAfter,i)||o),(n.type=="remove"||n.type=="insert")&&Rn(n)&&(o=Se(n.position.parent,i)||o);return o}function Sn(i,t){let e=!1;for(const o of i.getChildren())o.is("element","tableRow")&&(e=Lt(o,t)||e);return e}function Lt(i,t){let e=!1;for(const o of i.getChildren())e=Se(o,t)||e;return e}function Se(i,t){if(i.childCount==0)return t.insertElement("paragraph",i),!0;const e=Array.from(i.getChildren()).filter(o=>o.is("$text"));for(const o of e)t.wrap(t.createRangeOn(o),"paragraph");return!!e.length}function Rn(i){return i.position.parent.is("element","tableCell")?i.type=="insert"&&i.name=="$text"||i.type=="remove":!1}function xn(i,t){const e=i.document.differ;for(const o of e.getChanges()){let n,l=!1;if(o.type=="attribute"){const c=o.range.start.nodeAfter;if(!c||!c.is("element","table")||o.attributeKey!="headingRows"&&o.attributeKey!="headingColumns")continue;n=c,l=o.attributeKey=="headingRows"}else(o.name=="tableRow"||o.name=="tableCell")&&(n=o.position.findAncestor("table"),l=o.name=="tableRow");if(!n)continue;const s=n.getAttribute("headingRows")||0,r=n.getAttribute("headingColumns")||0,a=new T(n);for(const c of a){const u=c.row<s||c.column<r?"th":"td",h=t.mapper.toViewElement(c.cell);h&&h.is("element")&&h.name!=u&&t.reconvertItem(l?c.cell.parent:c.cell)}}}function Vn(i,t){const e=i.document.differ,o=new Set;for(const n of e.getChanges()){const l=n.type=="attribute"?n.range.start.parent:n.position.parent;l.is("element","tableCell")&&o.add(l)}for(const n of o.values()){const l=Array.from(n.getChildren()).filter(s=>In(s,t.mapper));for(const s of l)t.reconvertItem(s)}}function In(i,t){if(!i.is("element","paragraph"))return!1;const e=t.toViewElement(i);return e?At(i)!==e.is("element","span"):!1}class Q extends y{constructor(e){super(e);g(this,"_additionalSlots");this._additionalSlots=[]}static get pluginName(){return"TableEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[A]}init(){const e=this.editor,o=e.model,n=o.schema,l=e.conversion,s=e.plugins.get(A);n.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),n.register("tableRow",{allowIn:"table",isLimit:!0}),n.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),l.for("upcast").add(Ao()),l.for("upcast").add(So()),l.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:$e(s,{asWidget:!0,additionalSlots:this._additionalSlots})}),l.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:$e(s,{additionalSlots:this._additionalSlots})}),l.for("upcast").elementToElement({model:"tableRow",view:"tr"}),l.for("upcast").add(Ro()),l.for("downcast").elementToElement({model:"tableRow",view:Po()}),l.for("upcast").elementToElement({model:"tableCell",view:"td"}),l.for("upcast").elementToElement({model:"tableCell",view:"th"}),l.for("upcast").add(Ge("td")),l.for("upcast").add(Ge("th")),l.for("editingDowncast").elementToElement({model:"tableCell",view:je({asWidget:!0})}),l.for("dataDowncast").elementToElement({model:"tableCell",view:je()}),l.for("editingDowncast").elementToElement({model:"paragraph",view:qe({asWidget:!0}),converterPriority:"high"}),l.for("dataDowncast").elementToElement({model:"paragraph",view:qe(),converterPriority:"high"}),l.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),l.for("upcast").attributeToAttribute({model:{key:"colspan",value:ot("colspan")},view:"colspan"}),l.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),l.for("upcast").attributeToAttribute({model:{key:"rowspan",value:ot("rowspan")},view:"rowspan"}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new Wo(e)),e.commands.add("insertTableRowAbove",new Ke(e,{order:"above"})),e.commands.add("insertTableRowBelow",new Ke(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new Xe(e,{order:"left"})),e.commands.add("insertTableColumnRight",new Xe(e,{order:"right"})),e.commands.add("removeTableRow",new Ho(e)),e.commands.add("removeTableColumn",new Do(e)),e.commands.add("splitTableCellVertically",new Je(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new Je(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new un(e)),e.commands.add("mergeTableCellRight",new Z(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new Z(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new Z(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new Z(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new jo(e)),e.commands.add("setTableRowHeader",new $o(e)),e.commands.add("selectTableRow",new gn(e)),e.commands.add("selectTableColumn",new bn(e)),fn(o),yn(o),this.listenTo(o.document,"change:data",()=>{xn(o,e.editing),Vn(o,e.editing)})}registerAdditionalSlot(e){this._additionalSlots.push(e)}}function ot(i){return t=>{const e=parseInt(t.getAttribute(i));return Number.isNaN(e)||e<=0?null:e}}class nt extends L{constructor(e){super(e);g(this,"items");g(this,"keystrokes");g(this,"focusTracker");const o=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new me,this.focusTracker=new ge,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(n,l)=>`${l} × ${n}`),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":o.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:o.to("label")}]}],on:{mousedown:o.to(n=>{n.preventDefault()}),click:o.to(()=>{this.fire("execute")})}}),this.on("boxover",(n,l)=>{const{row:s,column:r}=l.target.dataset;this.items.get((parseInt(s,10)-1)*10+(parseInt(r,10)-1)).focus()}),this.focusTracker.on("change:focusedElement",(n,l,s)=>{if(!s)return;const{row:r,column:a}=s.dataset;this.set({rows:parseInt(r),columns:parseInt(a)})}),this.on("change:columns",()=>this._highlightGridBoxes()),this.on("change:rows",()=>this._highlightGridBoxes())}render(){super.render(),ho({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}reset(){this.set({rows:1,columns:1})}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,o=this.columns;this.items.map((n,l)=>{const s=Math.floor(l/10),r=l%10,a=s<e&&r<o;n.set("isOn",a)})}_createGridButton(e,o,n,l){const s=new E(e);return s.set({label:l,class:"ck-insert-table-dropdown-grid-box"}),s.extendTemplate({attributes:{"data-row":o,"data-column":n}}),s}_createGridCollection(){const e=[];for(let o=0;o<100;o++){const n=Math.floor(o/10),l=o%10,s=`${n+1} × ${l+1}`;e.push(this._createGridButton(this.locale,n+1,l+1,s))}return this.createCollection(e)}}var kn='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M18 7v1H2V7h16zm0 5v1H2v-1h16z" opacity=".6"/><path d="M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1zm-2 1H8v4h4V2zm0 6H8v4h4V8zm0 6H8v4h4v-4z"/></svg>',Pn='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v16h-1V2z" opacity=".6"/><path d="M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm1 2v4h4V8H2zm6 0v4h4V8H8zm6 0v4h4V8h-4z"/></svg>',En='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1zM2 2v16h16V2H2z" opacity=".6"/><path d="M7 2h1v16H7V2zm5 0h1v7h-1V2zm6 5v1H2V7h16zM8 12v1H2v-1h6z" opacity=".6"/><path d="M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm1 2v9h10V9H8z"/></svg>';class Bn extends y{static get pluginName(){return"TableUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=this.editor.t,n=t.locale.contentLanguageDirection==="ltr";t.ui.componentFactory.add("insertTable",l=>{const s=t.commands.get("insertTable"),r=oe(l);r.bind("isEnabled").to(s),r.buttonView.set({icon:S.table,label:e("Insert table"),tooltip:!0});let a;return r.on("change:isOpen",()=>{a||(a=new nt(l),r.panelView.children.add(a),a.delegate("execute").to(r),r.on("execute",()=>{t.execute("insertTable",{rows:a.rows,columns:a.columns}),t.editing.view.focus()}))}),r}),t.ui.componentFactory.add("menuBar:insertTable",l=>{const s=t.commands.get("insertTable"),r=new ao(l),a=new nt(l);return a.delegate("execute").to(r),r.on("change:isOpen",(c,d,u)=>{u||a.reset()}),a.on("execute",()=>{t.execute("insertTable",{rows:a.rows,columns:a.columns}),t.editing.view.focus()}),r.buttonView.set({label:e("Table"),icon:S.table}),r.panelView.children.add(a),r.bind("isEnabled").to(s),r}),t.ui.componentFactory.add("tableColumn",l=>{const s=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:e("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:n?"insertTableColumnLeft":"insertTableColumnRight",label:e("Insert column left")}},{type:"button",model:{commandName:n?"insertTableColumnRight":"insertTableColumnLeft",label:e("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:e("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:e("Select column")}}];return this._prepareDropdown(e("Column"),kn,s,l)}),t.ui.componentFactory.add("tableRow",l=>{const s=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:e("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:e("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:e("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:e("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:e("Select row")}}];return this._prepareDropdown(e("Row"),Pn,s,l)}),t.ui.componentFactory.add("mergeTableCells",l=>{const s=[{type:"button",model:{commandName:"mergeTableCellUp",label:e("Merge cell up")}},{type:"button",model:{commandName:n?"mergeTableCellRight":"mergeTableCellLeft",label:e("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:e("Merge cell down")}},{type:"button",model:{commandName:n?"mergeTableCellLeft":"mergeTableCellRight",label:e("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:e("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:e("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(e("Merge cells"),En,s,l)})}_prepareDropdown(t,e,o,n){const l=this.editor,s=oe(n),r=this._fillDropdownWithListOptions(s,o);return s.buttonView.set({label:t,icon:e,tooltip:!0}),s.bind("isEnabled").toMany(r,"isEnabled",(...a)=>a.some(c=>c)),this.listenTo(s,"execute",a=>{l.execute(a.source.commandName),a.source instanceof co||l.editing.view.focus()}),s}_prepareMergeSplitButtonDropdown(t,e,o,n){const l=this.editor,s=oe(n,uo),r="mergeTableCells",a=l.commands.get(r),c=this._fillDropdownWithListOptions(s,o);return s.buttonView.set({label:t,icon:e,tooltip:!0,isEnabled:!0}),s.bind("isEnabled").toMany([a,...c],"isEnabled",(...d)=>d.some(u=>u)),this.listenTo(s.buttonView,"execute",()=>{l.execute(r),l.editing.view.focus()}),this.listenTo(s,"execute",d=>{l.execute(d.source.commandName),l.editing.view.focus()}),s}_fillDropdownWithListOptions(t,e){const o=this.editor,n=[],l=new mt;for(const s of e)Wn(s,o,n,l);return Pe(t,l),n}}function Wn(i,t,e,o){if(i.type==="button"||i.type==="switchbutton"){const n=i.model=new ft(i.model),{commandName:l,bindIsOn:s}=i.model,r=t.commands.get(l);e.push(r),n.set({commandName:l}),n.bind("isEnabled").to(r),s&&n.bind("isOn").to(r,"value"),n.set({withText:!0})}o.add(i)}class M extends y{static get pluginName(){return"TableSelection"}static get isOfficialPlugin(){return!0}static get requires(){return[A,A]}init(){const t=this.editor,e=t.model,o=t.editing.view;this.listenTo(e,"deleteContent",(n,l)=>this._handleDeleteContent(n,l),{priority:"high"}),this.listenTo(o.document,"insertText",(n,l)=>this._handleInsertTextEvent(n,l),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const t=this.editor.plugins.get(A),e=this.editor.model.document.selection,o=t.getSelectedTableCells(e);return o.length==0?null:o}getSelectionAsFragment(){const t=this.editor.plugins.get(A),e=this.getSelectedTableCells();return e?this.editor.model.change(o=>{const n=o.createDocumentFragment(),{first:l,last:s}=t.getColumnIndexes(e),{first:r,last:a}=t.getRowIndexes(e),c=e[0].findAncestor("table");let d=a,u=s;if(t.isSelectionRectangular(e)){const f={firstColumn:l,lastColumn:s,firstRow:r,lastRow:a};d=Pt(c,f),u=Et(c,f)}const m=St(c,{startRow:r,startColumn:l,endRow:d,endColumn:u},o);return o.insert(m,n,0),n}):null}setCellSelection(t,e){const o=this._getCellsToSelect(t,e);this.editor.model.change(n=>{n.setSelection(o.cells.map(l=>n.createRangeOn(l)),{backward:o.backward})})}getFocusCell(){const o=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return o&&o.is("element","tableCell")?o:null}getAnchorCell(){const t=this.editor.model.document.selection,o=gt(t.getRanges()).getContainedElement();return o&&o.is("element","tableCell")?o:null}_defineSelectionConverter(){const t=this.editor,e=new Set;t.conversion.for("editingDowncast").add(n=>n.on("selection",(l,s,r)=>{const a=r.writer;o(a);const c=this.getSelectedTableCells();if(!c)return;for(const u of c){const h=r.mapper.toViewElement(u);a.addClass("ck-editor__editable_selected",h),e.add(h)}const d=r.mapper.toViewElement(c[c.length-1]);a.setSelection(d,0)},{priority:"lowest"}));function o(n){for(const l of e)n.removeClass("ck-editor__editable_selected",l);e.clear()}}_enablePluginDisabling(){const t=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){const e=this.getSelectedTableCells();if(!e)return;t.model.change(o=>{const n=o.createPositionAt(e[0],0),l=t.model.schema.getNearestSelectionRange(n);o.setSelection(l)})}})}_handleDeleteContent(t,e){const o=this.editor.plugins.get(A),n=e[0],l=e[1],s=this.editor.model,r=!l||l.direction=="backward",a=o.getSelectedTableCells(n);a.length&&(t.stop(),s.change(c=>{const d=a[r?a.length-1:0];s.change(h=>{for(const m of a)s.deleteContent(h.createSelection(m,"in"))});const u=s.schema.getNearestSelectionRange(c.createPositionAt(d,0));n.is("documentSelection")?c.setSelection(u):n.setTo(u)}))}_handleInsertTextEvent(t,e){const o=this.editor,n=this.getSelectedTableCells();if(!n)return;const l=o.editing.view,s=o.editing.mapper,r=n.map(a=>l.createRangeOn(s.toViewElement(a)));e.selection=l.createSelection(r)}_getCellsToSelect(t,e){const o=this.editor.plugins.get("TableUtils"),n=o.getCellLocation(t),l=o.getCellLocation(e),s=Math.min(n.row,l.row),r=Math.max(n.row,l.row),a=Math.min(n.column,l.column),c=Math.max(n.column,l.column),d=new Array(r-s+1).fill(null).map(()=>[]),u={startRow:s,endRow:r,startColumn:a,endColumn:c};for(const{row:f,cell:w}of new T(t.findAncestor("table"),u))d[f-s].push(w);const h=l.row<n.row,m=l.column<n.column;return h&&d.reverse(),m&&d.forEach(f=>f.reverse()),{cells:d.flat(),backward:h||m}}}class Ln extends y{static get pluginName(){return"TableClipboard"}static get isOfficialPlugin(){return!0}static get requires(){return[fe,bo,M,A]}init(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"copy",(o,n)=>this._onCopyCut(o,n)),this.listenTo(e,"cut",(o,n)=>this._onCopyCut(o,n)),this.listenTo(t.model,"insertContent",(o,[n,l])=>this._onInsertContent(o,n,l),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(t,e){const o=this.editor.editing.view,n=this.editor.plugins.get(M),l=this.editor.plugins.get(fe);n.getSelectedTableCells()&&(t.name=="cut"&&!this.editor.model.canEditAt(this.editor.model.document.selection)||(e.preventDefault(),t.stop(),this.editor.model.enqueueChange({isUndoable:t.name==="cut"},()=>{const s=l._copySelectedFragmentWithMarkers(t.name,this.editor.model.document.selection,()=>n.getSelectionAsFragment());o.document.fire("clipboardOutput",{dataTransfer:e.dataTransfer,content:this.editor.data.toView(s),method:t.name})})))}_onInsertContent(t,e,o){if(o&&!o.is("documentSelection"))return;const n=this.editor.model,l=this.editor.plugins.get(A),s=this.editor.plugins.get(fe),r=this.getTableIfOnlyTableInContent(e,n);if(!r)return;const a=l.getSelectionAffectedTableCells(n.document.selection);if(!a.length){Le(r,l);return}t.stop(),e.is("documentFragment")?s._pasteMarkersIntoTransformedElement(e.markers,c=>this._replaceSelectedCells(r,a,c)):this.editor.model.change(c=>{this._replaceSelectedCells(r,a,c)})}_replaceSelectedCells(t,e,o){const n=this.editor.plugins.get(A),l={width:n.getColumns(t),height:n.getRows(t)},s=zn(e,l,o,n),r=s.lastRow-s.firstRow+1,a=s.lastColumn-s.firstColumn+1,c={startRow:0,startColumn:0,endRow:Math.min(r,l.height)-1,endColumn:Math.min(a,l.width)-1};t=St(t,c,o);const d=e[0].findAncestor("table"),u=this._replaceSelectedCellsWithPasted(t,l,d,s,o);if(this.editor.plugins.get("TableSelection").isEnabled){const h=n.sortRanges(u.map(m=>o.createRangeOn(m)));o.setSelection(h)}else o.setSelection(u[0],0);return d}_replaceSelectedCellsWithPasted(t,e,o,n,l){const{width:s,height:r}=e,a=Nn(t,s,r),c=[...new T(o,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],d=[];let u;for(const b of c){const{row:p,column:C}=b;C===n.firstColumn&&(u=b.getPositionBefore());const v=p-n.firstRow,V=C-n.firstColumn,I=a[v%r][V%s],j=I?l.cloneElement(I):null,G=this._replaceTableSlotCell(b,j,u,l);G&&(kt(G,p,C,n.lastRow,n.lastColumn,l),d.push(G),u=l.createPositionAfter(G))}const h=parseInt(o.getAttribute("headingRows")||"0"),m=parseInt(o.getAttribute("headingColumns")||"0"),f=n.firstRow<h&&h<=n.lastRow,w=n.firstColumn<m&&m<=n.lastColumn;if(f){const b={first:n.firstColumn,last:n.lastColumn},p=Re(o,h,b,l,n.firstRow);d.push(...p)}if(w){const b={first:n.firstRow,last:n.lastRow},p=xe(o,m,b,l);d.push(...p)}return d}_replaceTableSlotCell(t,e,o,n){const{cell:l,isAnchor:s}=t;return s&&n.remove(l),e?(n.insert(e,o),e):null}getTableIfOnlyTableInContent(t,e){if(!t.is("documentFragment")&&!t.is("element"))return null;if(t.is("element","table"))return t;if(t.childCount==1&&t.getChild(0).is("element","table"))return t.getChild(0);const o=e.createRangeIn(t);for(const n of o.getItems())if(n.is("element","table")){const l=e.createRange(o.start,e.createPositionBefore(n));if(e.hasContent(l,{ignoreWhitespaces:!0}))return null;const s=e.createRange(e.createPositionAfter(n),o.end);return e.hasContent(s,{ignoreWhitespaces:!0})?null:n}return null}}function zn(i,t,e,o){const n=i[0].findAncestor("table"),l=o.getColumnIndexes(i),s=o.getRowIndexes(i),r={firstColumn:l.first,lastColumn:l.last,firstRow:s.first,lastRow:s.last},a=i.length===1;return a&&(r.lastRow+=t.height-1,r.lastColumn+=t.width-1,Fn(n,r.lastRow+1,r.lastColumn+1,o)),a||!o.isSelectionRectangular(i)?Mn(n,r,e):(r.lastRow=Pt(n,r),r.lastColumn=Et(n,r)),r}function Fn(i,t,e,o){const n=o.getColumns(i),l=o.getRows(i);e>n&&o.insertColumns(i,{at:n,columns:e-n}),t>l&&o.insertRows(i,{at:l,rows:t-l})}function Nn(i,t,e){const o=new Array(e).fill(null).map(()=>new Array(t).fill(null));for(const{column:n,row:l,cell:s}of new T(i))o[l][n]=s;return o}function Mn(i,t,e){const{firstRow:o,lastRow:n,firstColumn:l,lastColumn:s}=t,r={first:o,last:n},a={first:l,last:s};xe(i,l,r,e),xe(i,s+1,r,e),Re(i,o,a,e),Re(i,n+1,a,e,o)}function Re(i,t,e,o,n=0){return t<1?void 0:Rt(i,t,n).filter(({column:r,cellWidth:a})=>zt(r,a,e)).map(({cell:r})=>xt(r,t,o))}function xe(i,t,e,o){return t<1?void 0:Vt(i,t).filter(({row:s,cellHeight:r})=>zt(s,r,e)).map(({cell:s,column:r})=>It(s,r,t,o))}function zt(i,t,e){const o=i+t-1,{first:n,last:l}=e,s=i>=n&&i<=l,r=i<n&&o>=n;return s||r}class Hn extends y{static get pluginName(){return"TableKeyboard"}static get isOfficialPlugin(){return!0}static get requires(){return[M,A]}init(){const t=this.editor,o=t.editing.view.document,n=t.t;this.listenTo(o,"arrowKey",(...l)=>this._onArrowKey(...l),{context:"table"}),this.listenTo(o,"tab",(...l)=>this._handleTabOnSelectedTable(...l),{context:"figure"}),this.listenTo(o,"tab",(...l)=>this._handleTab(...l),{context:["th","td"]}),t.accessibility.addKeystrokeInfoGroup({id:"table",label:n("Keystrokes that can be used in a table cell"),keystrokes:[{label:n("Move the selection to the next cell"),keystroke:"Tab"},{label:n("Move the selection to the previous cell"),keystroke:"Shift+Tab"},{label:n("Insert a new table row (when in the last cell of a table)"),keystroke:"Tab"},{label:n("Navigate through the table"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]}]})}_handleTabOnSelectedTable(t,e){const o=this.editor,l=o.model.document.selection.getSelectedElement();!l||!l.is("element","table")||(e.preventDefault(),e.stopPropagation(),t.stop(),o.model.change(s=>{s.setSelection(s.createRangeIn(l.getChild(0).getChild(0)))}))}_handleTab(t,e){const o=this.editor,n=this.editor.plugins.get(A),l=this.editor.plugins.get("TableSelection"),s=o.model.document.selection,r=!e.shiftKey;let a=n.getTableCellsContainingSelection(s)[0];if(a||(a=l.getFocusCell()),!a)return;e.preventDefault(),e.stopPropagation(),t.stop();const c=a.parent,d=c.parent,u=d.getChildIndex(c),h=c.getChildIndex(a),m=h===0;if(!r&&m&&u===0){o.model.change(p=>{p.setSelection(p.createRangeOn(d))});return}const f=h===c.childCount-1,w=u===n.getRows(d)-1;if(r&&w&&f&&(o.execute("insertTableRowBelow"),u===n.getRows(d)-1)){o.model.change(p=>{p.setSelection(p.createRangeOn(d))});return}let b;if(r&&f)b=d.getChild(u+1).getChild(0);else if(!r&&m){const p=d.getChild(u-1);b=p.getChild(p.childCount-1)}else b=c.getChild(h+(r?1:-1));o.model.change(p=>{p.setSelection(p.createRangeIn(b))})}_onArrowKey(t,e){const o=this.editor,n=e.keyCode,l=so(n,o.locale.contentLanguageDirection);this._handleArrowKeys(l,e.shiftKey)&&(e.preventDefault(),e.stopPropagation(),t.stop())}_handleArrowKeys(t,e){const o=this.editor.plugins.get(A),n=this.editor.plugins.get("TableSelection"),l=this.editor.model,s=l.document.selection,r=["right","down"].includes(t),a=o.getSelectedTableCells(s);if(a.length){let d;return e?d=n.getFocusCell():d=r?a[a.length-1]:a[0],this._navigateFromCellInDirection(d,t,e),!0}const c=s.focus.findAncestor("tableCell");/* istanbul ignore if: paranoid check -- @preserve */if(!c)return!1;if(!s.isCollapsed)if(e){if(s.isBackward==r&&!s.containsEntireContent(c))return!1}else{const d=s.getSelectedElement();if(!d||!l.schema.isObject(d))return!1}return this._isSelectionAtCellEdge(s,c,r)?(this._navigateFromCellInDirection(c,t,e),!0):!1}_isSelectionAtCellEdge(t,e,o){const n=this.editor.model,l=this.editor.model.schema,s=o?t.getLastPosition():t.getFirstPosition();if(!l.getLimitElement(s).is("element","tableCell"))return n.createPositionAt(e,o?"end":0).isTouching(s);const r=n.createSelection(s);return n.modifySelection(r,{direction:o?"forward":"backward"}),s.isEqual(r.focus)}_navigateFromCellInDirection(t,e,o=!1){const n=this.editor.model,l=t.findAncestor("table"),s=[...new T(l,{includeAllSlots:!0})],{row:r,column:a}=s[s.length-1],c=s.find(({cell:C})=>C==t);let{row:d,column:u}=c;switch(e){case"left":u--;break;case"up":d--;break;case"right":u+=c.cellWidth;break;case"down":d+=c.cellHeight;break}const h=d<0||d>r,m=u<0&&d<=0,f=u>a&&d>=r;if(h||m||f){n.change(C=>{C.setSelection(C.createRangeOn(l))});return}u<0?(u=o?0:a,d--):u>a&&(u=o?a:0,d++);const w=s.find(C=>C.row==d&&C.column==u).cell,b=["right","down"].includes(e),p=this.editor.plugins.get("TableSelection");if(o&&p.isEnabled){const C=p.getAnchorCell()||t;p.setCellSelection(C,w)}else{const C=n.createPositionAt(w,b?0:"end");n.change(v=>{v.setSelection(C)})}}}class Ft extends Co{constructor(){super(...arguments);g(this,"domEventType",["mousemove","mouseleave"])}onDomEvent(e){this.fire(e.type,e)}}class On extends y{static get pluginName(){return"TableMouse"}static get isOfficialPlugin(){return!0}static get requires(){return[M,A]}init(){this.editor.editing.view.addObserver(Ft),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const t=this.editor,e=t.plugins.get(A);let o=!1;const n=t.plugins.get(M);this.listenTo(t.editing.view.document,"mousedown",(l,s)=>{const r=t.model.document.selection;if(!this.isEnabled||!n.isEnabled||!s.domEvent.shiftKey)return;const a=n.getAnchorCell()||e.getTableCellsContainingSelection(r)[0];if(!a)return;const c=this._getModelTableCellFromDomEvent(s);c&&lt(a,c)&&(o=!0,n.setCellSelection(a,c),s.preventDefault())}),this.listenTo(t.editing.view.document,"mouseup",()=>{o=!1}),this.listenTo(t.editing.view.document,"selectionChange",l=>{o&&l.stop()},{priority:"highest"})}_enableMouseDragSelection(){const t=this.editor;let e,o,n=!1,l=!1;const s=t.plugins.get(M);this.listenTo(t.editing.view.document,"mousedown",(r,a)=>{!this.isEnabled||!s.isEnabled||a.domEvent.shiftKey||a.domEvent.ctrlKey||a.domEvent.altKey||(e=this._getModelTableCellFromDomEvent(a))}),this.listenTo(t.editing.view.document,"mousemove",(r,a)=>{if(!a.domEvent.buttons||!e)return;const c=this._getModelTableCellFromDomEvent(a);c&&lt(e,c)&&(o=c,!n&&o!=e&&(n=!0)),n&&(l=!0,s.setCellSelection(e,o),a.preventDefault())}),this.listenTo(t.editing.view.document,"mouseup",()=>{n=!1,l=!1,e=null,o=null}),this.listenTo(t.editing.view.document,"selectionChange",r=>{l&&r.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(t){const e=t.target,o=this.editor.editing.view.createPositionAt(e,0);return this.editor.editing.mapper.toModelPosition(o).parent.findAncestor("tableCell",{includeSelf:!0})}}function lt(i,t){return i.parent.parent==t.parent.parent}class ql extends y{static get requires(){return[Q,Bn,M,On,Hn,Ln,no]}static get pluginName(){return"Table"}static get isOfficialPlugin(){return!0}}function Nt(i){const t=Mt(i);return t||be(i)}function Mt(i){const t=i.getSelectedElement();return t&&Ht(t)?t:null}function be(i){const t=i.getFirstPosition();if(!t)return null;let e=t.parent;for(;e;){if(e.is("element")&&Ht(e))return e;e=e.parent}return null}function Ht(i){return!!i.getCustomProperty("table")&&lo(i)}class Kl extends y{static get requires(){return[He]}static get pluginName(){return"TableToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const t=this.editor,e=t.t,o=t.plugins.get(He),n=t.config.get("table.contentToolbar"),l=t.config.get("table.tableToolbar");n&&o.register("tableContent",{ariaLabel:e("Table toolbar"),items:n,getRelatedElement:be}),l&&o.register("table",{ariaLabel:e("Table toolbar"),items:l,getRelatedElement:Mt})}}class Dn extends L{constructor(e,o){super(e);g(this,"options");g(this,"focusTracker");g(this,"focusCycler");g(this,"_focusables");g(this,"dropdownView");g(this,"inputView");g(this,"keystrokes");g(this,"_stillTyping");this.set("value",""),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isEmpty",!0),this.options=o,this.focusTracker=new ge,this._focusables=new Ee,this.dropdownView=this._createDropdownView(),this.inputView=this._createInputTextView(),this.keystrokes=new me,this._stillTyping=!1,this.focusCycler=new Be({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-input-color"]},children:[this.dropdownView,this.inputView]}),this.on("change:value",(n,l,s)=>this._setInputValue(s))}render(){super.render(),[this.inputView,this.dropdownView.buttonView].forEach(e=>{this.focusTracker.add(e.element),this._focusables.add(e)}),this.keystrokes.listenTo(this.element)}focus(e){e===-1?this.focusCycler.focusLast():this.focusCycler.focusFirst()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,o=e.t,n=this.bindTemplate,l=this._createColorSelector(e),s=oe(e),r=new L;return r.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:n.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",n.if("value","ck-hidden",a=>a!="")]}}]}),s.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),s.buttonView.children.add(r),s.buttonView.label=o("Color picker"),s.buttonView.tooltip=!0,s.panelPosition=e.uiLanguageDirection==="rtl"?"se":"sw",s.panelView.children.add(l),s.bind("isEnabled").to(this,"isReadOnly",a=>!a),s.on("change:isOpen",(a,c,d)=>{d&&(l.updateSelectedColors(),l.showColorGridsFragment())}),s}_createInputTextView(){const e=this.locale,o=new mo(e);return o.extendTemplate({on:{blur:o.bindTemplate.to("blur")}}),o.value=this.value,o.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(o),o.on("input",()=>{const n=o.element.value,l=this.options.colorDefinitions.find(s=>n===s.label);this._stillTyping=!0,this.value=l&&l.color||n}),o.on("blur",()=>{this._stillTyping=!1,this._setInputValue(o.element.value)}),o.delegate("input").to(this),o}_createColorSelector(e){const o=e.t,n=this.options.defaultColorValue||"",l=o(n?"Restore default":"Remove color"),s=new go(e,{colors:this.options.colorDefinitions,columns:this.options.columns,removeButtonLabel:l,colorPickerLabel:o("Color picker"),colorPickerViewConfig:this.options.colorPickerConfig===!1?!1:{...this.options.colorPickerConfig,hideInput:!0}});s.appendUI(),s.on("execute",(a,c)=>{if(c.source==="colorPickerSaveButton"){this.dropdownView.isOpen=!1;return}this.value=c.value||n,this.fire("input"),c.source!=="colorPicker"&&(this.dropdownView.isOpen=!1)});let r=this.value;return s.on("colorPicker:cancel",()=>{this.value=r,this.fire("input"),this.dropdownView.isOpen=!1}),s.colorGridsFragmentView.colorPickerButtonView.on("execute",()=>{r=this.value}),s.bind("selectedColor").to(this,"value"),s}_setInputValue(e){if(!this._stillTyping){const o=it(e),n=this.options.colorDefinitions.find(l=>o===it(l.color));n?this.inputView.value=n.label:this.inputView.value=e||""}}}function it(i){return i.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const Fe=i=>i==="";function Ne(i){return{none:i("None"),solid:i("Solid"),dotted:i("Dotted"),dashed:i("Dashed"),double:i("Double"),groove:i("Groove"),ridge:i("Ridge"),inset:i("Inset"),outset:i("Outset")}}function Ot(i){return i('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function Dt(i){return i('The value is invalid. Try "10px" or "2em" or simply "2".')}function de(i){return i=i.trim().toLowerCase(),Fe(i)||To(i)}function K(i){return i=i.trim(),Fe(i)||$t(i)||_t(i)||vo(i)}function Ut(i){return i=i.trim(),Fe(i)||$t(i)||_t(i)}function Gt(i,t){const e=new mt,o=Ne(i.t);for(const n in o){const l={type:"button",model:new ft({_borderStyleValue:n,label:o[n],role:"menuitemradio",withText:!0})};n==="none"?l.model.bind("isOn").to(i,"borderStyle",s=>t==="none"?!s:s===n):l.model.bind("isOn").to(i,"borderStyle",s=>s===n),e.add(l)}return e}function Ve(i){const{view:t,icons:e,toolbar:o,labels:n,propertyName:l,nameToValue:s,defaultValue:r}=i;for(const a in n){const c=new E(t.locale);c.set({role:"radio",isToggleable:!0,label:n[a],icon:e[a],tooltip:n[a]});const d=s?s(a):a;c.bind("isOn").to(t,l,u=>{let h=u;return u===""&&r&&(h=r),d===h}),c.on("execute",()=>{t[l]=d}),o.items.add(c)}}const ue=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function he(i){return(t,e,o)=>{const n=new Dn(t.locale,{colorDefinitions:Un(i.colorConfig),columns:i.columns,defaultColorValue:i.defaultColorValue,colorPickerConfig:i.colorPickerConfig});return n.inputView.set({id:e,ariaDescribedById:o}),n.bind("isReadOnly").to(t,"isEnabled",l=>!l),n.bind("hasError").to(t,"errorText",l=>!!l),n.on("input",()=>{t.errorText=null}),t.bind("isEmpty","isFocused").to(n),n}}function $t(i){const t=parseFloat(i);return!Number.isNaN(t)&&i===String(t)}function Un(i){return i.map(t=>({color:t.model,label:t.label,options:{hasBorder:t.hasBorder}}))}class P extends L{constructor(e,o={}){super(e);g(this,"children");const n=this.bindTemplate;this.set("class",o.class||null),this.children=this.createCollection(),o.children&&o.children.forEach(l=>this.children.add(l)),this.set("_role",null),this.set("_ariaLabelledBy",null),o.labelView&&this.set({_role:"group",_ariaLabelledBy:o.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",n.to("class")],role:n.to("_role"),"aria-labelledby":n.to("_ariaLabelledBy")},children:this.children})}}class Gn extends L{constructor(e,o){super(e);g(this,"options");g(this,"focusTracker");g(this,"keystrokes");g(this,"children");g(this,"borderStyleDropdown");g(this,"borderWidthInput");g(this,"borderColorInput");g(this,"backgroundInput");g(this,"paddingInput");g(this,"widthInput");g(this,"heightInput");g(this,"horizontalAlignmentToolbar");g(this,"verticalAlignmentToolbar");g(this,"saveButtonView");g(this,"cancelButtonView");g(this,"_focusables");g(this,"_focusCycler");this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=o;const{borderStyleDropdown:n,borderWidthInput:l,borderColorInput:s,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:a,backgroundInput:c}=this._createBackgroundFields(),{widthInput:d,operatorLabel:u,heightInput:h,dimensionsLabel:m}=this._createDimensionFields(),{horizontalAlignmentToolbar:f,verticalAlignmentToolbar:w,alignmentLabel:b}=this._createAlignmentFields();this.focusTracker=new ge,this.keystrokes=new me,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=l,this.borderColorInput=s,this.backgroundInput=c,this.paddingInput=this._createPaddingField(),this.widthInput=d,this.heightInput=h,this.horizontalAlignmentToolbar=f,this.verticalAlignmentToolbar=w;const{saveButtonView:p,cancelButtonView:C}=this._createActionButtons();this.saveButtonView=p,this.cancelButtonView=C,this._focusables=new Ee,this._focusCycler=new Be({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new pt(e,{label:this.t("Cell properties")})),this.children.add(new P(e,{labelView:r,children:[r,n,s,l],class:"ck-table-form__border-row"})),this.children.add(new P(e,{labelView:a,children:[a,c],class:"ck-table-form__background-row"})),this.children.add(new P(e,{children:[new P(e,{labelView:m,children:[m,d,u,h],class:"ck-table-form__dimensions-row"}),new P(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new P(e,{labelView:b,children:[b,f,w],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new P(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),wt({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,o={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},n=he({colorConfig:this.options.borderColors,columns:5,defaultColorValue:o.color,colorPickerConfig:this.options.colorPickerConfig}),l=this.locale,s=this.t,r=s("Style"),a=new W(l);a.text=s("Border");const c=Ne(s),d=new k(l,Ct);d.set({label:r,class:"ck-table-form__border-style"}),d.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),d.fieldView.buttonView.bind("label").to(this,"borderStyle",m=>c[m||"none"]),d.fieldView.on("execute",m=>{this.borderStyle=m.source._borderStyleValue}),d.bind("isEmpty").to(this,"borderStyle",m=>!m),Pe(d.fieldView,Gt(this,o.style),{role:"menu",ariaLabel:r});const u=new k(l,F);u.set({label:s("Width"),class:"ck-table-form__border-width"}),u.fieldView.bind("value").to(this,"borderWidth"),u.bind("isEnabled").to(this,"borderStyle",ee),u.fieldView.on("input",()=>{this.borderWidth=u.fieldView.element.value});const h=new k(l,n);return h.set({label:s("Color"),class:"ck-table-form__border-color"}),h.fieldView.bind("value").to(this,"borderColor"),h.bind("isEnabled").to(this,"borderStyle",ee),h.fieldView.on("input",()=>{this.borderColor=h.fieldView.value}),this.on("change:borderStyle",(m,f,w,b)=>{ee(w)||(this.borderColor="",this.borderWidth=""),ee(b)||(this.borderColor=o.color,this.borderWidth=o.width)}),{borderRowLabel:a,borderStyleDropdown:d,borderColorInput:h,borderWidthInput:u}}_createBackgroundFields(){const e=this.locale,o=this.t,n=new W(e);n.text=o("Background");const l=he({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),s=new k(e,l);return s.set({label:o("Color"),class:"ck-table-cell-properties-form__background"}),s.fieldView.bind("value").to(this,"backgroundColor"),s.fieldView.on("input",()=>{this.backgroundColor=s.fieldView.value}),{backgroundRowLabel:n,backgroundInput:s}}_createDimensionFields(){const e=this.locale,o=this.t,n=new W(e);n.text=o("Dimensions");const l=new k(e,F);l.set({label:o("Width"),class:"ck-table-form__dimensions-row__width"}),l.fieldView.bind("value").to(this,"width"),l.fieldView.on("input",()=>{this.width=l.fieldView.element.value});const s=new L(e);s.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new k(e,F);return r.set({label:o("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",()=>{this.height=r.fieldView.element.value}),{dimensionsLabel:n,widthInput:l,operatorLabel:s,heightInput:r}}_createPaddingField(){const e=this.locale,o=this.t,n=new k(e,F);return n.set({label:o("Padding"),class:"ck-table-cell-properties-form__padding"}),n.fieldView.bind("value").to(this,"padding"),n.fieldView.on("input",()=>{this.padding=n.fieldView.element.value}),n}_createAlignmentFields(){const e=this.locale,o=this.t,n=new W(e),l={left:S.alignLeft,center:S.alignCenter,right:S.alignRight,justify:S.alignJustify,top:S.alignTop,middle:S.alignMiddle,bottom:S.alignBottom};n.text=o("Table cell text alignment");const s=new we(e),r=e.contentLanguageDirection==="rtl";s.set({isCompact:!0,role:"radiogroup",ariaLabel:o("Horizontal text alignment toolbar")}),Ve({view:this,icons:l,toolbar:s,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:c=>{if(r){if(c==="left")return"right";if(c==="right")return"left"}return c},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const a=new we(e);return a.set({isCompact:!0,role:"radiogroup",ariaLabel:o("Vertical text alignment toolbar")}),Ve({view:this,icons:l,toolbar:a,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:s,verticalAlignmentToolbar:a,alignmentLabel:n}}_createActionButtons(){const e=this.locale,o=this.t,n=new E(e),l=new E(e),s=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return n.set({label:o("Save"),icon:S.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(s,"errorText",(...r)=>r.every(a=>!a)),l.set({label:o("Cancel"),icon:S.cancel,class:"ck-button-cancel",withText:!0}),l.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:l}}get _horizontalAlignmentLabels(){const e=this.locale,o=this.t,n=o("Align cell text to the left"),l=o("Align cell text to the center"),s=o("Align cell text to the right"),r=o("Justify cell text");return e.uiLanguageDirection==="rtl"?{right:s,center:l,left:n,justify:r}:{left:n,center:l,right:s,justify:r}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function ee(i){return i!=="none"}const Ie=[z.defaultPositions.northArrowSouth,z.defaultPositions.northArrowSouthWest,z.defaultPositions.northArrowSouthEast,z.defaultPositions.southArrowNorth,z.defaultPositions.southArrowNorthWest,z.defaultPositions.southArrowNorthEast,z.defaultPositions.viewportStickyNorth];function jt(i,t){const e=i.plugins.get("ContextualBalloon"),o=i.editing.view.document.selection;let n;t==="cell"?be(o)&&(n=Kt(i)):Nt(o)&&(n=qt(i)),n&&e.updatePosition(n)}function qt(i){const t=i.model.document.selection,e=N(t),o=i.editing.mapper.toViewElement(e);return{target:i.editing.view.domConverter.mapViewToDom(o),positions:Ie}}function Kt(i){const t=i.editing.mapper,e=i.editing.view.domConverter,o=i.model.document.selection;if(o.rangeCount>1)return{target:()=>$n(o.getRanges(),i),positions:Ie};const n=Xt(o.getFirstPosition()),l=t.toViewElement(n);return{target:e.mapViewToDom(l),positions:Ie}}function Xt(i){return i.nodeAfter&&i.nodeAfter.is("element","tableCell")?i.nodeAfter:i.findAncestor("tableCell")}function $n(i,t){const e=t.editing.mapper,o=t.editing.view.domConverter,n=Array.from(i).map(l=>{const s=Xt(l.start),r=e.toViewElement(s);return new De(o.mapViewToDom(r))});return De.getBoundingRect(n)}var jn='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>';function O(i){if(!i||!yo(i))return i;const{top:t,right:e,bottom:o,left:n}=i;if(t==e&&e==o&&o==n)return t}function D(i,t){const e=parseFloat(i);return Number.isNaN(e)||String(e)!==String(i)?i:`${e}${t}`}function Jt(i,t={}){const e={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...i};return t.includeAlignmentProperty&&!e.alignment&&(e.alignment="center"),t.includePaddingProperty&&!e.padding&&(e.padding=""),t.includeVerticalAlignmentProperty&&!e.verticalAlignment&&(e.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!e.horizontalAlignment&&(e.horizontalAlignment=t.isRightToLeftContent?"right":"left"),e}function Yt(i,t){return Jt({borderStyle:"double",borderColor:"hsl(0, 0%, 70%)",borderWidth:"1px",...i},t)}function Me(i,t){return Jt({borderStyle:"solid",borderColor:"hsl(0, 0%, 75%)",borderWidth:"1px",...i},t)}const qn=500,st={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class Kn extends y{constructor(e){super(e);g(this,"_defaultTableCellProperties");g(this,"_balloon");g(this,"view");g(this,"_undoStepBatch");g(this,"_isReady");e.config.define("table.tableCellProperties",{borderColors:ue,backgroundColors:ue})}static get requires(){return[re]}static get pluginName(){return"TableCellPropertiesUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,o=e.t;this._defaultTableCellProperties=Me(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:e.locale.contentLanguageDirection==="rtl"}),this._balloon=e.plugins.get(re),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",n=>{const l=new E(n);l.set({label:o("Cell properties"),icon:jn,tooltip:!0}),this.listenTo(l,"execute",()=>this._showView());const s=Object.values(st).map(r=>e.commands.get(r));return l.bind("isEnabled").toMany(s,"isEnabled",(...r)=>r.some(a=>a)),l})}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,o=e.config.get("table.tableCellProperties"),n=ae(o.borderColors),l=ce(e.locale,n),s=ae(o.backgroundColors),r=ce(e.locale,s),a=o.colorPicker!==!1,c=new Gn(e.locale,{borderColors:l,backgroundColors:r,defaultTableCellProperties:this._defaultTableCellProperties,colorPickerConfig:a?o.colorPicker||{}:!1}),d=e.t;c.render(),this.listenTo(c,"submit",()=>{this._hideView()}),this.listenTo(c,"cancel",()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()}),c.keystrokes.set("Esc",(m,f)=>{this._hideView(),f()}),bt({emitter:c,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const u=Ot(d),h=Dt(d);return c.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),c.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:c.borderColorInput,commandName:"tableCellBorderColor",errorText:u,validator:de})),c.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:c.borderWidthInput,commandName:"tableCellBorderWidth",errorText:h,validator:Ut})),c.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:c.paddingInput,commandName:"tableCellPadding",errorText:h,validator:K})),c.on("change:width",this._getValidatedPropertyChangeCallback({viewField:c.widthInput,commandName:"tableCellWidth",errorText:h,validator:K})),c.on("change:height",this._getValidatedPropertyChangeCallback({viewField:c.heightInput,commandName:"tableCellHeight",errorText:h,validator:K})),c.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:c.backgroundInput,commandName:"tableCellBackgroundColor",errorText:u,validator:de})),c.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),c.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),c}_fillViewFormFromCommandValues(){const e=this.editor.commands,o=e.get("tableCellBorderStyle");Object.entries(st).map(([n,l])=>{const s=this._defaultTableCellProperties[n]||"";return[n,e.get(l).value||s]}).forEach(([n,l])=>{(n==="borderColor"||n==="borderWidth")&&o.value==="none"||this.view.set(n,l)}),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:Kt(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor,o=e.editing.view.document;be(o.selection)?this._isViewVisible&&jt(e,"cell"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(o,n,l)=>{this._isReady&&this.editor.execute(e,{value:l,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:o,viewField:n,validator:l,errorText:s}=e,r=yt(()=>{n.errorText=s},qn);return(a,c,d)=>{r.cancel(),this._isReady&&(l(d)?(this.editor.execute(o,{value:d,batch:this._undoStepBatch}),n.errorText=null):r())}}}class B extends R{constructor(e,o,n){super(e);g(this,"attributeName");g(this,"_defaultValue");this.attributeName=o,this._defaultValue=n}refresh(){const e=this.editor,n=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!n.length,this.value=this._getSingleValue(n)}execute(e={}){const{value:o,batch:n}=e,l=this.editor.model,r=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(l.document.selection),a=this._getValueToSet(o);l.enqueueChange(n,c=>{a?r.forEach(d=>c.setAttribute(this.attributeName,a,d)):r.forEach(d=>c.removeAttribute(this.attributeName,d))})}_getAttribute(e){if(!e)return;const o=e.getAttribute(this.attributeName);if(o!==this._defaultValue)return o}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const o=this._getAttribute(e[0]);return e.every(l=>this._getAttribute(l)===o)?o:void 0}}class Xn extends B{constructor(t,e){super(t,"tableCellWidth",e)}_getValueToSet(t){if(t=D(t,"px"),t!==this._defaultValue)return t}}class Qt extends y{static get pluginName(){return"TableCellWidthEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Q]}init(){const t=this.editor,e=Me(t.config.get("table.tableCellProperties.defaultProperties"));ie(t.model.schema,t.conversion,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:e.width}),t.commands.add("tableCellWidth",new Xn(t,e.width))}}class Jn extends B{constructor(t,e){super(t,"tableCellPadding",e)}_getAttribute(t){if(!t)return;const e=O(t.getAttribute(this.attributeName));if(e!==this._defaultValue)return e}_getValueToSet(t){const e=D(t,"px");if(e!==this._defaultValue)return e}}class Yn extends B{constructor(t,e){super(t,"tableCellHeight",e)}_getValueToSet(t){const e=D(t,"px");if(e!==this._defaultValue)return e}}class Qn extends B{constructor(t,e){super(t,"tableCellBackgroundColor",e)}}class Zn extends B{constructor(t,e){super(t,"tableCellVerticalAlignment",e)}}class el extends B{constructor(t,e){super(t,"tableCellHorizontalAlignment",e)}}class tl extends B{constructor(t,e){super(t,"tableCellBorderStyle",e)}_getAttribute(t){if(!t)return;const e=O(t.getAttribute(this.attributeName));if(e!==this._defaultValue)return e}}class ol extends B{constructor(t,e){super(t,"tableCellBorderColor",e)}_getAttribute(t){if(!t)return;const e=O(t.getAttribute(this.attributeName));if(e!==this._defaultValue)return e}}class nl extends B{constructor(t,e){super(t,"tableCellBorderWidth",e)}_getAttribute(t){if(!t)return;const e=O(t.getAttribute(this.attributeName));if(e!==this._defaultValue)return e}_getValueToSet(t){const e=D(t,"px");if(e!==this._defaultValue)return e}}const rt=/^(top|middle|bottom)$/,at=/^(left|center|right|justify)$/;class ll extends y{static get pluginName(){return"TableCellPropertiesEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Q,Qt]}init(){const t=this.editor,e=t.model.schema,o=t.conversion;t.config.define("table.tableCellProperties.defaultProperties",{});const n=Me(t.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:t.locale.contentLanguageDirection==="rtl"});t.data.addStyleProcessorRules(Tt),il(e,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),t.commands.add("tableCellBorderStyle",new tl(t,n.borderStyle)),t.commands.add("tableCellBorderColor",new ol(t,n.borderColor)),t.commands.add("tableCellBorderWidth",new nl(t,n.borderWidth)),ie(e,o,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:n.height}),t.commands.add("tableCellHeight",new Yn(t,n.height)),t.data.addStyleProcessorRules(wo),ie(e,o,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:n.padding}),t.commands.add("tableCellPadding",new Jn(t,n.padding)),t.data.addStyleProcessorRules(vt),ie(e,o,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),t.commands.add("tableCellBackgroundColor",new Qn(t,n.backgroundColor)),sl(e,o,n.horizontalAlignment),t.commands.add("tableCellHorizontalAlignment",new el(t,n.horizontalAlignment)),rl(e,o,n.verticalAlignment),t.commands.add("tableCellVerticalAlignment",new Zn(t,n.verticalAlignment))}}function il(i,t,e){const o={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};i.extend("tableCell",{allowAttributes:Object.values(o)}),Ce(t,"td",o,e),Ce(t,"th",o,e),q(t,{modelElement:"tableCell",modelAttribute:o.style,styleName:"border-style"}),q(t,{modelElement:"tableCell",modelAttribute:o.color,styleName:"border-color"}),q(t,{modelElement:"tableCell",modelAttribute:o.width,styleName:"border-width"})}function sl(i,t,e){i.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:o=>({key:"style",value:{"text-align":o}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":at}},model:{key:"tableCellHorizontalAlignment",value:o=>{const n=o.getStyle("text-align");return n===e?null:n}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:at}},model:{key:"tableCellHorizontalAlignment",value:o=>{const n=o.getAttribute("align");return n===e?null:n}}})}function rl(i,t,e){i.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:o=>({key:"style",value:{"vertical-align":o}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":rt}},model:{key:"tableCellVerticalAlignment",value:o=>{const n=o.getStyle("vertical-align");return n===e?null:n}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:rt}},model:{key:"tableCellVerticalAlignment",value:o=>{const n=o.getAttribute("valign");return n===e?null:n}}})}class Xl extends y{static get pluginName(){return"TableCellProperties"}static get isOfficialPlugin(){return!0}static get requires(){return[ll,Kn]}}class U extends R{constructor(e,o,n){super(e);g(this,"attributeName");g(this,"_defaultValue");this.attributeName=o,this._defaultValue=n}refresh(){const o=this.editor.model.document.selection,n=N(o);this.isEnabled=!!n,this.value=this._getValue(n)}execute(e={}){const o=this.editor.model,n=o.document.selection,{value:l,batch:s}=e,r=N(n),a=this._getValueToSet(l);o.enqueueChange(s,c=>{a?c.setAttribute(this.attributeName,a,r):c.removeAttribute(this.attributeName,r)})}_getValue(e){if(!e)return;const o=e.getAttribute(this.attributeName);if(o!==this._defaultValue)return o}_getValueToSet(e){if(e!==this._defaultValue)return e}}class al extends U{constructor(t,e){super(t,"tableBackgroundColor",e)}}class cl extends U{constructor(t,e){super(t,"tableBorderColor",e)}_getValue(t){if(!t)return;const e=O(t.getAttribute(this.attributeName));if(e!==this._defaultValue)return e}}class dl extends U{constructor(t,e){super(t,"tableBorderStyle",e)}_getValue(t){if(!t)return;const e=O(t.getAttribute(this.attributeName));if(e!==this._defaultValue)return e}}class ul extends U{constructor(t,e){super(t,"tableBorderWidth",e)}_getValue(t){if(!t)return;const e=O(t.getAttribute(this.attributeName));if(e!==this._defaultValue)return e}_getValueToSet(t){const e=D(t,"px");if(e!==this._defaultValue)return e}}class hl extends U{constructor(t,e){super(t,"tableWidth",e)}_getValueToSet(t){if(t=D(t,"px"),t!==this._defaultValue)return t}}class ml extends U{constructor(t,e){super(t,"tableHeight",e)}_getValueToSet(t){if(t=D(t,"px"),t!==this._defaultValue)return t}}class gl extends U{constructor(t,e){super(t,"tableAlignment",e)}}const bl=/^(left|center|right)$/,fl=/^(left|none|right)$/;class pl extends y{static get pluginName(){return"TablePropertiesEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Q]}init(){const t=this.editor,e=t.model.schema,o=t.conversion;t.config.define("table.tableProperties.defaultProperties",{});const n=Yt(t.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});t.data.addStyleProcessorRules(Tt),wl(e,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),t.commands.add("tableBorderColor",new cl(t,n.borderColor)),t.commands.add("tableBorderStyle",new dl(t,n.borderStyle)),t.commands.add("tableBorderWidth",new ul(t,n.borderWidth)),Cl(e,o,n.alignment),t.commands.add("tableAlignment",new gl(t,n.alignment)),ct(e,o,{modelAttribute:"tableWidth",styleName:"width",defaultValue:n.width}),t.commands.add("tableWidth",new hl(t,n.width)),ct(e,o,{modelAttribute:"tableHeight",styleName:"height",defaultValue:n.height}),t.commands.add("tableHeight",new ml(t,n.height)),t.data.addStyleProcessorRules(vt),Tl(e,o,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),t.commands.add("tableBackgroundColor",new al(t,n.backgroundColor))}}function wl(i,t,e){const o={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};i.extend("table",{allowAttributes:Object.values(o)}),Ce(t,"table",o,e),ne(t,{modelAttribute:o.color,styleName:"border-color"}),ne(t,{modelAttribute:o.style,styleName:"border-style"}),ne(t,{modelAttribute:o.width,styleName:"border-width"})}function Cl(i,t,e){i.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:o=>({key:"style",value:{float:o==="center"?"none":o}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:fl}},model:{key:"tableAlignment",value:o=>{let n=o.getStyle("float");return n==="none"&&(n="center"),n===e?null:n}}}).attributeToAttribute({view:{attributes:{align:bl}},model:{name:"table",key:"tableAlignment",value:o=>{const n=o.getAttribute("align");return n===e?null:n}}})}function Tl(i,t,e){const{modelAttribute:o}=e;i.extend("table",{allowAttributes:[o]}),We(t,{viewElement:"table",...e}),ne(t,e)}function ct(i,t,e){const{modelAttribute:o}=e;i.extend("table",{allowAttributes:[o]}),We(t,{viewElement:/^(table|figure)$/,shouldUpcast:n=>!(n.name=="table"&&n.parent.name=="figure"),...e}),q(t,{modelElement:"table",...e})}class vl extends L{constructor(e,o){super(e);g(this,"options");g(this,"focusTracker");g(this,"keystrokes");g(this,"children");g(this,"borderStyleDropdown");g(this,"borderWidthInput");g(this,"borderColorInput");g(this,"backgroundInput");g(this,"widthInput");g(this,"heightInput");g(this,"alignmentToolbar");g(this,"saveButtonView");g(this,"cancelButtonView");g(this,"_focusables");g(this,"_focusCycler");this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=o;const{borderStyleDropdown:n,borderWidthInput:l,borderColorInput:s,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:a,backgroundInput:c}=this._createBackgroundFields(),{widthInput:d,operatorLabel:u,heightInput:h,dimensionsLabel:m}=this._createDimensionFields(),{alignmentToolbar:f,alignmentLabel:w}=this._createAlignmentFields();this.focusTracker=new ge,this.keystrokes=new me,this.children=this.createCollection(),this.borderStyleDropdown=n,this.borderWidthInput=l,this.borderColorInput=s,this.backgroundInput=c,this.widthInput=d,this.heightInput=h,this.alignmentToolbar=f;const{saveButtonView:b,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=b,this.cancelButtonView=p,this._focusables=new Ee,this._focusCycler=new Be({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new pt(e,{label:this.t("Table properties")})),this.children.add(new P(e,{labelView:r,children:[r,n,s,l],class:"ck-table-form__border-row"})),this.children.add(new P(e,{labelView:a,children:[a,c],class:"ck-table-form__background-row"})),this.children.add(new P(e,{children:[new P(e,{labelView:m,children:[m,d,u,h],class:"ck-table-form__dimensions-row"}),new P(e,{labelView:w,children:[w,f],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new P(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),wt({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,o={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},n=he({colorConfig:this.options.borderColors,columns:5,defaultColorValue:o.color,colorPickerConfig:this.options.colorPickerConfig}),l=this.locale,s=this.t,r=s("Style"),a=new W(l);a.text=s("Border");const c=Ne(s),d=new k(l,Ct);d.set({label:r,class:"ck-table-form__border-style"}),d.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),d.fieldView.buttonView.bind("label").to(this,"borderStyle",m=>c[m||"none"]),d.fieldView.on("execute",m=>{this.borderStyle=m.source._borderStyleValue}),d.bind("isEmpty").to(this,"borderStyle",m=>!m),Pe(d.fieldView,Gt(this,o.style),{role:"menu",ariaLabel:r});const u=new k(l,F);u.set({label:s("Width"),class:"ck-table-form__border-width"}),u.fieldView.bind("value").to(this,"borderWidth"),u.bind("isEnabled").to(this,"borderStyle",te),u.fieldView.on("input",()=>{this.borderWidth=u.fieldView.element.value});const h=new k(l,n);return h.set({label:s("Color"),class:"ck-table-form__border-color"}),h.fieldView.bind("value").to(this,"borderColor"),h.bind("isEnabled").to(this,"borderStyle",te),h.fieldView.on("input",()=>{this.borderColor=h.fieldView.value}),this.on("change:borderStyle",(m,f,w,b)=>{te(w)||(this.borderColor="",this.borderWidth=""),te(b)||(this.borderColor=o.color,this.borderWidth=o.width)}),{borderRowLabel:a,borderStyleDropdown:d,borderColorInput:h,borderWidthInput:u}}_createBackgroundFields(){const e=this.locale,o=this.t,n=new W(e);n.text=o("Background");const l=he({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),s=new k(e,l);return s.set({label:o("Color"),class:"ck-table-properties-form__background"}),s.fieldView.bind("value").to(this,"backgroundColor"),s.fieldView.on("input",()=>{this.backgroundColor=s.fieldView.value}),{backgroundRowLabel:n,backgroundInput:s}}_createDimensionFields(){const e=this.locale,o=this.t,n=new W(e);n.text=o("Dimensions");const l=new k(e,F);l.set({label:o("Width"),class:"ck-table-form__dimensions-row__width"}),l.fieldView.bind("value").to(this,"width"),l.fieldView.on("input",()=>{this.width=l.fieldView.element.value});const s=new L(e);s.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new k(e,F);return r.set({label:o("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",()=>{this.height=r.fieldView.element.value}),{dimensionsLabel:n,widthInput:l,operatorLabel:s,heightInput:r}}_createAlignmentFields(){const e=this.locale,o=this.t,n=new W(e);n.text=o("Alignment");const l=new we(e);return l.set({role:"radiogroup",isCompact:!0,ariaLabel:o("Table alignment toolbar")}),Ve({view:this,icons:{left:S.objectLeft,center:S.objectCenter,right:S.objectRight},toolbar:l,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:n,alignmentToolbar:l}}_createActionButtons(){const e=this.locale,o=this.t,n=new E(e),l=new E(e),s=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return n.set({label:o("Save"),icon:S.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(s,"errorText",(...r)=>r.every(a=>!a)),l.set({label:o("Cancel"),icon:S.cancel,class:"ck-button-cancel",withText:!0}),l.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:l}}get _alignmentLabels(){const e=this.locale,o=this.t,n=o("Align table to the left"),l=o("Center table"),s=o("Align table to the right");return e.uiLanguageDirection==="rtl"?{right:s,center:l,left:n}:{left:n,center:l,right:s}}}function te(i){return i!=="none"}var _l='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>';const yl=500,dt={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class Al extends y{constructor(e){super(e);g(this,"_defaultTableProperties");g(this,"_balloon");g(this,"view",null);g(this,"_undoStepBatch");g(this,"_isReady");e.config.define("table.tableProperties",{borderColors:ue,backgroundColors:ue})}static get requires(){return[re]}static get pluginName(){return"TablePropertiesUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,o=e.t;this._defaultTableProperties=Yt(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(re),e.ui.componentFactory.add("tableProperties",n=>{const l=new E(n);l.set({label:o("Table properties"),icon:_l,tooltip:!0}),this.listenTo(l,"execute",()=>this._showView());const s=Object.values(dt).map(r=>e.commands.get(r));return l.bind("isEnabled").toMany(s,"isEnabled",(...r)=>r.some(a=>a)),l})}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,o=e.config.get("table.tableProperties"),n=ae(o.borderColors),l=ce(e.locale,n),s=ae(o.backgroundColors),r=ce(e.locale,s),a=o.colorPicker!==!1,c=new vl(e.locale,{borderColors:l,backgroundColors:r,defaultTableProperties:this._defaultTableProperties,colorPickerConfig:a?o.colorPicker||{}:!1}),d=e.t;c.render(),this.listenTo(c,"submit",()=>{this._hideView()}),this.listenTo(c,"cancel",()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()}),c.keystrokes.set("Esc",(m,f)=>{this._hideView(),f()}),bt({emitter:c,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const u=Ot(d),h=Dt(d);return c.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),c.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:c.borderColorInput,commandName:"tableBorderColor",errorText:u,validator:de})),c.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:c.borderWidthInput,commandName:"tableBorderWidth",errorText:h,validator:Ut})),c.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:c.backgroundInput,commandName:"tableBackgroundColor",errorText:u,validator:de})),c.on("change:width",this._getValidatedPropertyChangeCallback({viewField:c.widthInput,commandName:"tableWidth",errorText:h,validator:K})),c.on("change:height",this._getValidatedPropertyChangeCallback({viewField:c.heightInput,commandName:"tableHeight",errorText:h,validator:K})),c.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),c}_fillViewFormFromCommandValues(){const e=this.editor.commands,o=e.get("tableBorderStyle");Object.entries(dt).map(([n,l])=>{const s=n,r=this._defaultTableProperties[s]||"";return[s,e.get(l).value||r]}).forEach(([n,l])=>{(n==="borderColor"||n==="borderWidth")&&o.value==="none"||this.view.set(n,l)}),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:qt(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor,o=e.editing.view.document;Nt(o.selection)?this._isViewVisible&&jt(e,"table"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(o,n,l)=>{this._isReady&&this.editor.execute(e,{value:l,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:o,viewField:n,validator:l,errorText:s}=e,r=yt(()=>{n.errorText=s},yl);return(a,c,d)=>{r.cancel(),this._isReady&&(l(d)?(this.editor.execute(o,{value:d,batch:this._undoStepBatch}),n.errorText=null):r())}}}class Jl extends y{static get pluginName(){return"TableProperties"}static get isOfficialPlugin(){return!0}static get requires(){return[pl,Al]}}/**
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 Sl(i){i.document.registerPostFixer(t=>Rl(t,i))}function Rl(i,t){const e=t.document.differ.getChanges();let o=!1;for(const n of e){if(n.type!="insert")continue;const l=n.position.parent;if(l.is("element","table")||n.name=="table"){const s=n.name=="table"?n.position.nodeAfter:l,r=Array.from(s.getChildren()).filter(c=>c.is("element","caption")),a=r.shift();if(!a)continue;for(const c of r)i.move(i.createRangeIn(c),a,"end"),i.remove(c);a.nextSibling&&(i.move(i.createRangeOn(a),s,"end"),o=!0),o=!!r.length||o}}return o}function ut(i){return!!i&&i.is("element","table")}function ke(i){for(const t of i.getChildren())if(t.is("element","caption"))return t;return null}function xl(i){const t=N(i);return t?ke(t):null}function Vl(i){const t=i.parent;return i.name=="figcaption"&&t&&t.is("element","figure")&&t.hasClass("table")?{name:!0}:i.name=="caption"&&t&&t.is("element","table")?{name:!0}:null}class Il extends R{refresh(){const t=this.editor,e=N(t.model.document.selection);this.isEnabled=!!e,this.isEnabled?this.value=!!ke(e):this.value=!1}execute({focusCaptionOnShow:t=!1}={}){this.editor.model.change(e=>{this.value?this._hideTableCaption(e):this._showTableCaption(e,t)})}_showTableCaption(t,e){const o=this.editor.model,n=N(o.document.selection),r=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(n)||t.createElement("caption");o.insertContent(r,n,"end"),e&&t.setSelection(r,"in")}_hideTableCaption(t){const e=this.editor.model,o=N(e.document.selection),n=this.editor.plugins.get("TableCaptionEditing"),l=ke(o);n._saveCaption(o,l),e.deleteContent(t.createSelection(l,"on"))}}class kl extends y{constructor(e){super(e);g(this,"_savedCaptionsMap");this._savedCaptionsMap=new WeakMap}static get pluginName(){return"TableCaptionEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,o=e.model.schema,n=e.editing.view,l=e.t;o.isRegistered("caption")?o.extend("caption",{allowIn:"table"}):o.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new Il(this.editor)),e.conversion.for("upcast").elementToElement({view:Vl,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(s,{writer:r})=>ut(s.parent)?r.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(s,{writer:r})=>{if(!ut(s.parent))return null;const a=r.createEditableElement("figcaption");return r.setCustomProperty("tableCaption",!0,a),a.placeholder=l("Enter table caption"),fo({view:n,element:a,keepOnFocus:!0}),ht(a,r)}}),Sl(e.model)}_getSavedCaption(e){const o=this._savedCaptionsMap.get(e);return o?po.fromJSON(o):null}_saveCaption(e,o){this._savedCaptionsMap.set(e,o.toJSON())}}class Pl extends y{static get pluginName(){return"TableCaptionUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.editing.view,o=t.t;t.ui.componentFactory.add("toggleTableCaption",n=>{const l=t.commands.get("toggleTableCaption"),s=new E(n);return s.set({icon:S.caption,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(l,"value","isEnabled"),s.bind("label").to(l,"value",r=>o(r?"Toggle caption off":"Toggle caption on")),this.listenTo(s,"execute",()=>{if(t.execute("toggleTableCaption",{focusCaptionOnShow:!0}),l.value){const r=xl(t.model.document.selection),a=t.editing.mapper.toViewElement(r);if(!a)return;e.scrollToTheSelection(),e.change(c=>{c.addClass("table__caption_highlighted",a)})}t.editing.view.focus()}),s})}}class Yl extends y{static get pluginName(){return"TableCaption"}static get isOfficialPlugin(){return!0}static get requires(){return[kl,Pl]}}class El extends R{refresh(){this.isEnabled=!0}execute(t={}){const{model:e,plugins:o}=this.editor;let{table:n=e.document.selection.getSelectedElement(),columnWidths:l,tableWidth:s}=t;l&&(l=Array.isArray(l)?l:l.split(",")),e.change(r=>{s?r.setAttribute("tableWidth",s,n):r.removeAttribute("tableWidth",n);const a=o.get("TableColumnResizeEditing").getColumnGroupElement(n);if(!l&&!a)return;if(!l)return r.remove(a);const c=ze(l);if(a)Array.from(a.getChildren()).forEach((d,u)=>r.setAttribute("columnWidth",c[u],d));else{const d=r.createElement("tableColumnGroup");c.forEach(u=>r.appendElement("tableColumn",{columnWidth:u},d)),r.append(d,n)}})}}function Bl(i){return t=>t.on("element:colgroup",(e,o,n)=>{const l=o.modelCursor.findAncestor("table"),s=J(l);if(!s)return;const r=Y(s),a=i.getColumns(l);let c=nn(s,n.writer);c=Array.from({length:a},(d,u)=>c[u]||"auto"),(c.length!=r.length||c.includes("auto"))&&Wt(r,s,ze(c),n.writer)},{priority:"low"})}function Wl(){return i=>i.on("insert:table",(t,e,o)=>{const n=o.writer,l=e.item,s=o.mapper.toViewElement(l),r=s.is("element","table")?s:Array.from(s.getChildren()).find(c=>c.is("element","table"));J(l)?n.addClass("ck-table-resized",r):n.removeClass("ck-table-resized",r)},{priority:"low"})}class Ll extends y{constructor(e){super(e);g(this,"_isResizingActive");g(this,"_resizingData");g(this,"_domEmitter");g(this,"_tableUtilsPlugin");this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=new(ro()),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",(o,n,l)=>{const s=l?"removeClass":"addClass";e.editing.view.change(r=>{for(const a of e.editing.view.document.roots)r[s]("ck-column-resize_disabled",e.editing.view.document.getRoot(a.rootName))})})}static get requires(){return[Q,A]}static get pluginName(){return"TableColumnResizeEditing"}static get isOfficialPlugin(){return!0}init(){this._extendSchema(),this._registerPostFixer(),this._registerConverters(),this._registerResizingListeners(),this._registerResizerInserter();const e=this.editor,o=e.plugins.get("TableColumnResize");e.plugins.get("TableEditing").registerAdditionalSlot({filter:s=>s.is("element","tableColumnGroup"),positionOffset:0});const l=new El(e);e.commands.add("resizeTableWidth",l),e.commands.add("resizeColumnWidths",l),this.bind("_isResizingAllowed").to(e,"isReadOnly",o,"isEnabled",l,"isEnabled",(s,r,a)=>!s&&r&&a)}destroy(){this._domEmitter.stopListening(),super.destroy()}getColumnGroupElement(e){return J(e)}getTableColumnElements(e){return Y(e)}getTableColumnsWidths(e){return on(e)}_extendSchema(){this.editor.model.schema.extend("table",{allowAttributes:["tableWidth"]}),this.editor.model.schema.register("tableColumnGroup",{allowIn:"table",isLimit:!0}),this.editor.model.schema.register("tableColumn",{allowIn:"tableColumnGroup",allowAttributes:["columnWidth","colSpan"],isLimit:!0})}_registerPostFixer(){const o=this.editor.model;o.document.registerPostFixer(s=>{let r=!1;for(const a of Xo(o)){const c=this.getColumnGroupElement(a),d=this.getTableColumnElements(c),u=this.getTableColumnsWidths(c);let h=ze(u);h=n(h,a,this),!Ue(u,h)&&(Wt(d,c,h,s),r=!0)}return r});function n(s,r,a){const c=a._tableUtilsPlugin.getColumns(r);if(c-s.length===0)return s;const u=s.map(m=>Number(m.replace("%",""))),h=l(a.editor.model.document.differ,r);for(const m of h){const f=c-u.length;if(f===0)continue;const w=f>0,b=a._tableUtilsPlugin.getCellLocation(m).column;if(w){const p=Jo(r,a.editor),C=Zo(f,p);u.splice(b,0,...C)}else{const p=u.splice(b,Math.abs(f));u[b]+=X(p)}}return u.map(m=>m+"%")}function l(s,r){const a=new Set;for(const c of s.getChanges())if(c.type=="insert"&&c.position.nodeAfter&&c.position.nodeAfter.name=="tableCell"&&c.position.nodeAfter.getAncestors().includes(r))a.add(c.position.nodeAfter);else if(c.type=="remove"){const d=c.position.nodeBefore||c.position.nodeAfter;d.name=="tableCell"&&d.getAncestors().includes(r)&&a.add(d)}return a}}_registerConverters(){const o=this.editor.conversion;o.for("upcast").attributeToAttribute({view:{name:"figure",key:"style",value:{width:/[\s\S]+/}},model:{name:"table",key:"tableWidth",value:n=>n.getStyle("width")}}),o.for("downcast").attributeToAttribute({model:{name:"table",key:"tableWidth"},view:n=>({name:"figure",key:"style",value:{width:n}})}),o.elementToElement({model:"tableColumnGroup",view:"colgroup"}),o.elementToElement({model:"tableColumn",view:"col"}),o.for("downcast").add(Wl()),o.for("upcast").add(Bl(this._tableUtilsPlugin)),o.for("upcast").attributeToAttribute({view:{name:"col",styles:{width:/.*/}},model:{key:"columnWidth",value:n=>{const l=n.getStyle("width");return!l||!l.endsWith("%")&&!l.endsWith("pt")?"auto":l}}}),o.for("upcast").attributeToAttribute({view:{name:"col",key:"span"},model:"colSpan"}),o.for("downcast").attributeToAttribute({model:{name:"tableColumn",key:"columnWidth"},view:n=>({key:"style",value:{width:n}})})}_registerResizingListeners(){const e=this.editor.editing.view;e.addObserver(Ft),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),this._domEmitter.listenTo(se.window.document,"mousemove",_o(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo(se.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_onMouseDownHandler(e,o){const n=o.target;if(!n.hasClass("ck-table-column-resizer")||!this._isResizingAllowed)return;const l=this.editor,s=l.editing.mapper.toModelElement(n.findAncestor("figure"));if(!l.model.canEditAt(s))return;o.preventDefault(),e.stop();const r=d(s,this._tableUtilsPlugin,l),a=n.findAncestor("table"),c=l.editing.view;Array.from(a.getChildren()).find(m=>m.is("element","colgroup"))||c.change(m=>{u(m,r,a)}),this._isResizingActive=!0,this._resizingData=this._getResizingData(o,r),c.change(m=>h(m,a,this._resizingData));function d(m,f,w){const b=Array(f.getColumns(m)),p=new T(m);for(const C of p){const v=w.editing.mapper.toViewElement(C.cell),V=w.editing.view.domConverter.mapViewToDom(v),I=tn(V);(!b[C.column]||I<b[C.column])&&(b[C.column]=x(I))}return b}function u(m,f,w){const b=m.createContainerElement("colgroup");for(let p=0;p<f.length;p++){const C=m.createEmptyElement("col"),v=`${x(f[p]/X(f)*100)}%`;m.setStyle("width",v,C),m.insert(m.createPositionAt(b,"end"),C)}m.insert(m.createPositionAt(w,0),b)}function h(m,f,w){const b=w.widths.viewFigureWidth/w.widths.viewFigureParentWidth;m.addClass("ck-table-resized",f),m.addClass("ck-table-column-resizer__active",w.elements.viewResizer),m.setStyle("width",`${x(b*100)}%`,f.findAncestor("figure"))}}_onMouseMoveHandler(e,o){if(!this._isResizingActive)return;if(!this._isResizingAllowed){this._onMouseUpHandler();return}const{columnPosition:n,flags:{isRightEdge:l,isTableCentered:s,isLtrContent:r},elements:{viewFigure:a,viewLeftColumn:c,viewRightColumn:d},widths:{viewFigureParentWidth:u,tableWidth:h,leftColumnWidth:m,rightColumnWidth:f}}=this._resizingData,w=-m+ye,b=l?u-h:f-ye,p=(r?1:-1)*(l&&s?2:1),C=Qo((o.clientX-n)*p,Math.min(w,0),Math.max(b,0));C!==0&&this.editor.editing.view.change(v=>{const V=x((m+C)*100/h);if(v.setStyle("width",`${V}%`,c),l){const I=x((h+C)*100/u);v.setStyle("width",`${I}%`,a)}else{const I=x((f-C)*100/h);v.setStyle("width",`${I}%`,d)}})}_onMouseUpHandler(){if(!this._isResizingActive)return;const{viewResizer:e,modelTable:o,viewFigure:n,viewColgroup:l}=this._resizingData.elements,s=this.editor,r=s.editing.view,a=this.getColumnGroupElement(o),c=Array.from(l.getChildren()).filter(b=>b.is("view:element")),d=a?this.getTableColumnsWidths(a):null,u=c.map(b=>b.getStyle("width")),h=!Ue(d,u),m=o.getAttribute("tableWidth"),f=n.getStyle("width"),w=m!==f;(h||w)&&(this._isResizingAllowed?s.execute("resizeTableWidth",{table:o,tableWidth:`${x(f)}%`,columnWidths:u}):r.change(b=>{if(d)for(const p of c)b.setStyle("width",d.shift(),p);else b.remove(l);w&&(m?b.setStyle("width",m,n):b.removeStyle("width",n)),!d&&!m&&b.removeClass("ck-table-resized",[...n.getChildren()].find(p=>p.name==="table"))})),r.change(b=>{b.removeClass("ck-table-column-resizer__active",e)}),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,o){const n=this.editor,l=e.domEvent.clientX,s=e.target,r=s.findAncestor("td")||s.findAncestor("th"),a=n.editing.mapper.toModelElement(r),c=a.findAncestor("table"),d=Yo(a,this._tableUtilsPlugin).rightEdge,u=this._tableUtilsPlugin.getColumns(c)-1,h=d===u,m=!c.hasAttribute("tableAlignment"),f=n.locale.contentLanguageDirection!=="rtl",w=r.findAncestor("table"),b=w.findAncestor("figure"),p=[...w.getChildren()].find(eo=>eo.is("element","colgroup")),C=p.getChild(d),v=h?void 0:p.getChild(d+1),V=Ae(n.editing.view.domConverter.mapViewToDom(b.parent)),I=Ae(n.editing.view.domConverter.mapViewToDom(b)),j=Bt(c,n),G=o[d],Zt=h?void 0:o[d+1];return{columnPosition:l,flags:{isRightEdge:h,isTableCentered:m,isLtrContent:f},elements:{viewResizer:s,modelTable:c,viewFigure:b,viewColgroup:p,viewLeftColumn:C,viewRightColumn:v},widths:{viewFigureParentWidth:V,viewFigureWidth:I,tableWidth:j,leftColumnWidth:G,rightColumnWidth:Zt}}}_registerResizerInserter(){this.editor.conversion.for("editingDowncast").add(e=>{e.on("insert:tableCell",(o,n,l)=>{const s=n.item,r=l.mapper.toViewElement(s),a=l.writer;a.insert(a.createPositionAt(r,"end"),a.createUIElement("div",{class:"ck-table-column-resizer"}))},{priority:"lowest"})})}}class Ql extends y{static get requires(){return[Ll,Qt]}static get pluginName(){return"TableColumnResize"}static get isOfficialPlugin(){return!0}}export{ql as Table,Yl as TableCaption,kl as TableCaptionEditing,Pl as TableCaptionUI,Xl as TableCellProperties,ll as TableCellPropertiesEditing,Kn as TableCellPropertiesUI,Qt as TableCellWidthEditing,Ln as TableClipboard,Ql as TableColumnResize,Ll as TableColumnResizeEditing,Q as TableEditing,Hn as TableKeyboard,On as TableMouse,Jl as TableProperties,pl as TablePropertiesEditing,Al as TablePropertiesUI,M as TableSelection,Kl as TableToolbar,Bn as TableUI,A as TableUtils};