@ncino/web-components 9.2.0-preview.1 → 9.2.0-preview.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/_virtual/eq.js +1 -0
  2. package/dist/_virtual/getSymbols.js +1 -0
  3. package/dist/_virtual/getTag.js +1 -0
  4. package/dist/_virtual/isEqual.js +1 -0
  5. package/dist/_virtual/isEqual2.js +1 -0
  6. package/dist/_virtual/isEqualWith.js +1 -0
  7. package/dist/_virtual/isPlainObject.js +1 -0
  8. package/dist/_virtual/noop.js +1 -0
  9. package/dist/_virtual/tags.js +1 -0
  10. package/dist/assets/node_modules/.pnpm/{ckeditor5@47.3.0 → ckeditor5@47.5.0}/node_modules/ckeditor5/dist/ckeditor5.css +1 -1
  11. package/dist/components/input/gator/input-file/input-file.gator.js +1 -1
  12. package/dist/components/input-rich-text/ckeditor-config.js +1 -1
  13. package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
  14. package/dist/components/panel/gator/panel.storybook-test.js +1 -1
  15. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-alignment@47.3.0 → @ckeditor_ckeditor5-alignment@47.5.0}/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +1 -1
  16. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autoformat@47.3.0 → @ckeditor_ckeditor5-autoformat@47.5.0}/node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js +1 -1
  17. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autosave@47.3.0 → @ckeditor_ckeditor5-autosave@47.5.0}/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +1 -1
  18. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@47.5.0/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +1 -0
  19. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-block-quote@47.3.0 → @ckeditor_ckeditor5-block-quote@47.5.0}/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js +1 -1
  20. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-clipboard@47.3.0 → @ckeditor_ckeditor5-clipboard@47.5.0}/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1 -1
  21. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-cloud-services@47.3.0 → @ckeditor_ckeditor5-cloud-services@47.5.0}/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +1 -1
  22. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-code-block@47.3.0 → @ckeditor_ckeditor5-code-block@47.5.0}/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +1 -1
  23. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@47.5.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +1 -0
  24. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-editor-classic@47.3.0 → @ckeditor_ckeditor5-editor-classic@47.5.0}/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +1 -1
  25. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-engine@47.3.0 → @ckeditor_ckeditor5-engine@47.5.0}/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +2 -2
  26. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-enter@47.3.0 → @ckeditor_ckeditor5-enter@47.5.0}/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +1 -1
  27. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-essentials@47.3.0 → @ckeditor_ckeditor5-essentials@47.5.0}/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +1 -1
  28. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-find-and-replace@47.3.0 → @ckeditor_ckeditor5-find-and-replace@47.5.0}/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +1 -1
  29. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@47.5.0/node_modules/@ckeditor/ckeditor5-font/dist/index.js +1 -0
  30. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-heading@47.3.0 → @ckeditor_ckeditor5-heading@47.5.0}/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +1 -1
  31. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-highlight@47.5.0/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +1 -0
  32. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-horizontal-line@47.3.0 → @ckeditor_ckeditor5-horizontal-line@47.5.0}/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +1 -1
  33. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-embed@47.3.0 → @ckeditor_ckeditor5-html-embed@47.5.0}/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +1 -1
  34. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@47.5.0/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +3 -0
  35. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@47.5.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +1 -0
  36. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-indent@47.3.0 → @ckeditor_ckeditor5-indent@47.5.0}/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +1 -1
  37. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-language@47.5.0/node_modules/@ckeditor/ckeditor5-language/dist/index.js +1 -0
  38. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-link@47.3.0 → @ckeditor_ckeditor5-link@47.5.0}/node_modules/@ckeditor/ckeditor5-link/dist/index.js +1 -1
  39. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-list@47.3.0 → @ckeditor_ckeditor5-list@47.5.0}/node_modules/@ckeditor/ckeditor5-list/dist/index.js +1 -1
  40. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-markdown-gfm@47.3.0 → @ckeditor_ckeditor5-markdown-gfm@47.5.0}/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +1 -1
  41. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@47.5.0/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +1 -0
  42. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-mention@47.3.0 → @ckeditor_ckeditor5-mention@47.5.0}/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +1 -1
  43. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-page-break@47.3.0 → @ckeditor_ckeditor5-page-break@47.5.0}/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +1 -1
  44. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paragraph@47.3.0 → @ckeditor_ckeditor5-paragraph@47.5.0}/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +1 -1
  45. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paste-from-office@47.3.0 → @ckeditor_ckeditor5-paste-from-office@47.5.0}/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +1 -1
  46. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-remove-format@47.3.0 → @ckeditor_ckeditor5-remove-format@47.5.0}/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +1 -1
  47. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-select-all@47.3.0 → @ckeditor_ckeditor5-select-all@47.5.0}/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +1 -1
  48. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-show-blocks@47.3.0 → @ckeditor_ckeditor5-show-blocks@47.5.0}/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +1 -1
  49. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-source-editing@47.3.0 → @ckeditor_ckeditor5-source-editing@47.5.0}/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +1 -1
  50. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-special-characters@47.3.0 → @ckeditor_ckeditor5-special-characters@47.5.0}/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +1 -1
  51. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-style@47.3.0 → @ckeditor_ckeditor5-style@47.5.0}/node_modules/@ckeditor/ckeditor5-style/dist/index.js +1 -1
  52. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@47.5.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +1 -0
  53. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@47.5.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +1 -0
  54. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@47.5.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +1 -0
  55. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-undo@47.3.0 → @ckeditor_ckeditor5-undo@47.5.0}/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +1 -1
  56. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-upload@47.3.0 → @ckeditor_ckeditor5-upload@47.5.0}/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +1 -1
  57. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@47.5.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +8 -0
  58. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-widget@47.3.0 → @ckeditor_ckeditor5-widget@47.5.0}/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1 -1
  59. package/dist/node_modules/.pnpm/@deltablot_dropzone@7.4.3/node_modules/@deltablot/dropzone/dist/dropzone.js +38 -0
  60. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/compat/isEqual.js +1 -0
  61. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/_internal/getSymbols2.js +1 -0
  62. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/_internal/getTag2.js +1 -0
  63. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/_internal/tags2.js +1 -0
  64. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/object/merge.js +1 -1
  65. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js +1 -1
  66. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/util/eq2.js +1 -0
  67. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/function/noop.js +1 -1
  68. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/function/noop2.js +1 -0
  69. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqual.js +1 -1
  70. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqual2.js +1 -0
  71. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqualWith.js +1 -1
  72. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqualWith2.js +1 -0
  73. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isPlainObject.js +1 -1
  74. package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isPlainObject2.js +1 -0
  75. package/dist/node_modules/.pnpm/{storybook@10.1.10_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/storybook/dist/_browser-chunks/chunk-RP5RXKFU.js → storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/storybook/dist/_browser-chunks/chunk-Q5RYDXT3.js} +19 -19
  76. package/dist/node_modules/.pnpm/storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/storybook/dist/_browser-chunks/chunk-VIJ7SQRO.js +1 -0
  77. package/dist/node_modules/.pnpm/storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/storybook/dist/core-events/index.js +1 -0
  78. package/dist/node_modules/.pnpm/{storybook@10.1.10_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/instrumenter/index.js +1 -1
  79. package/dist/node_modules/.pnpm/storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/storybook/dist/test/index.js +156 -0
  80. package/package.json +14 -14
  81. package/web-types.json +1 -1
  82. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@47.3.0/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +0 -1
  83. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@47.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +0 -1
  84. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@47.3.0/node_modules/@ckeditor/ckeditor5-font/dist/index.js +0 -1
  85. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-highlight@47.3.0/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +0 -1
  86. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@47.3.0/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +0 -3
  87. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@47.3.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +0 -1
  88. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-language@47.3.0/node_modules/@ckeditor/ckeditor5-language/dist/index.js +0 -1
  89. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@47.3.0/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +0 -1
  90. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@47.3.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +0 -1
  91. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@47.3.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +0 -1
  92. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@47.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +0 -1
  93. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@47.3.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +0 -8
  94. package/dist/node_modules/.pnpm/@deltablot_dropzone@7.3.1/node_modules/@deltablot/dropzone/dist/dropzone.js +0 -22
  95. package/dist/node_modules/.pnpm/storybook@10.1.10_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/storybook/dist/_browser-chunks/chunk-EZSQOHRI.js +0 -1
  96. package/dist/node_modules/.pnpm/storybook@10.1.10_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/storybook/dist/core-events/index.js +0 -1
  97. package/dist/node_modules/.pnpm/storybook@10.1.10_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/storybook/dist/test/index.js +0 -152
  98. /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-icons@47.3.0 → @ckeditor_ckeditor5-icons@47.5.0}/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +0 -0
  99. /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-watchdog@47.3.0 → @ckeditor_ckeditor5-watchdog@47.5.0}/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +0 -0
  100. /package/dist/node_modules/.pnpm/{storybook@10.1.10_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/storybook/dist/_browser-chunks/chunk-JP7NCOJX.js → storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/storybook/dist/_browser-chunks/chunk-3LY4VQVK.js} +0 -0
  101. /package/dist/node_modules/.pnpm/{storybook@10.1.10_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/_browser-chunks/chunk-A242L54C.js +0 -0
  102. /package/dist/node_modules/.pnpm/{storybook@10.1.10_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/_browser-chunks/chunk-ZUWEVLDX.js +0 -0
  103. /package/dist/node_modules/.pnpm/{storybook@10.1.10_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0 → storybook@10.2.8_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/storybook/dist/client-logger/index.js +0 -0
@@ -0,0 +1 @@
1
+ import{ObservableMixin as S,Collection as W,CKEditorError as c,insertToPriorityArray as H,setDataInElement as K,Config as z,decodeLicenseKey as U,toArray as V,crc32 as j,releaseDate as Y,uid as R,logError as J,isFeatureBlockedByLicenseKey as Q,Locale as X,EmitterMixin as Z,KeystrokeHandler as ee,global as A,env as k}from"../../../../../@ckeditor_ckeditor5-utils@47.5.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{Model as te,DataController as ie,StylesProcessor as ne,EditingController as se,Conversion as oe}from"../../../../../@ckeditor_ckeditor5-engine@47.5.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{EditorWatchdog as re,ContextWatchdog as ae}from"../../../../../@ckeditor_ckeditor5-watchdog@47.5.0/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js";import{isFunction as M}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isFunction.js";import{get as le}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/object/get.js";import{set as ce}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/object/set.js";class Le extends S(){editor;_disableStack=new Set;constructor(e){super(),this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),this._disableStack.size==1&&(this.on("set:isEnabled",q,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),this._disableStack.size==0&&(this.off("set:isEnabled",q),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}static get isOfficialPlugin(){return!1}static get isPremiumPlugin(){return!1}}function q(r){r.return=!1,r.stop()}class ue extends S(){editor;_isEnabledBasedOnSelection;_affectsData;_disableStack;static get _throwErrorWhenUsedAsAPlugin(){return!0}constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.listenTo(e,"change:isReadOnly",()=>{this.refresh()}),this.on("set:isEnabled",t=>{if(!this.affectsData)return;const i=e.model.document.selection,u=!(i.getFirstPosition().root.rootName=="$graveyard")&&e.model.canEditAt(i);(e.isReadOnly||this._isEnabledBasedOnSelection&&!u)&&(t.return=!1,t.stop())},{priority:"highest"}),this.on("execute",t=>{this.isEnabled||t.stop()},{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),this._disableStack.size==1&&(this.on("set:isEnabled",F,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),this._disableStack.size==0&&(this.off("set:isEnabled",F),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function F(r){r.return=!1,r.stop()}class Ie extends ue{_childCommandsDefinitions=[];refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){H(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find(({command:t})=>t.isEnabled);return e&&e.command}}class de{_commands;constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const i=this.get(e);if(!i)throw new c("commandcollection-command-not-found",this,{commandName:e});return i.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class $ extends Z(){_context;_plugins=new Map;_availablePlugins;_contextPlugins;constructor(e,t=[],i=[]){super(),this._context=e,this._availablePlugins=new Map;for(const s of t)s.pluginName&&this._availablePlugins.set(s.pluginName,s);this._contextPlugins=new Map;for(const[s,u]of i)this._contextPlugins.set(s,u),this._contextPlugins.set(u,s),s.pluginName&&this._availablePlugins.set(s.pluginName,s)}*[Symbol.iterator](){for(const e of this._plugins)typeof e[0]=="function"&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let i=e;throw typeof e=="function"&&(i=e.pluginName||e.name),new c("plugincollection-plugin-not-loaded",this._context,{plugin:i})}return t}has(e){return this._plugins.has(e)}async init(e,t=[],i=[]){const s=this,u=this._context;w(e),m(e);const g=e.filter(n=>!p(n,t)),h=[...P(g)];x(h,i);const b=d(h);return await I(b,"init"),await I(b,"afterInit"),b;function y(n){return typeof n=="function"}function E(n){return y(n)&&!!n.isContextPlugin}function p(n,a){return a.some(o=>o===n||f(n)===o||f(o)===n)}function f(n){return y(n)?n.pluginName||n.name:n}function w(n,a=new Set){n.forEach(o=>{y(o)&&(a.has(o)||(a.add(o),o.pluginName&&!s._availablePlugins.has(o.pluginName)&&s._availablePlugins.set(o.pluginName,o),o.requires&&w(o.requires,a)))})}function P(n,a=new Set){return n.map(o=>y(o)?o:s._availablePlugins.get(o)).reduce((o,l)=>a.has(l)?o:(a.add(l),l.requires&&(m(l.requires,l),P(l.requires,a).forEach(_=>o.add(_))),o.add(l)),new Set)}function m(n,a=null){n.map(o=>y(o)?o:s._availablePlugins.get(o)||o).forEach(o=>{C(o),O(o,a),D(o,a),L(o,a)})}function C(n){if(typeof n=="function"&&n._throwErrorWhenUsedAsAPlugin)throw new c("plugincollection-plugin-invalid-constructor",u,{name:n.name})}function O(n,a){if(!y(n))throw a?new c("plugincollection-soft-required",u,{missingPlugin:n,requiredBy:f(a)}):new c("plugincollection-plugin-not-found",u,{plugin:n})}function D(n,a){if(E(a)&&!E(n))throw new c("plugincollection-context-required",u,{plugin:f(n),requiredBy:f(a)})}function L(n,a){if(a&&p(n,t))throw new c("plugincollection-required",u,{plugin:f(n),requiredBy:f(a)})}function d(n){return n.map(a=>{let o=s._contextPlugins.get(a);return o=o||new a(u),s._add(a,o),o})}function I(n,a){return n.reduce((o,l)=>!l[a]||s._contextPlugins.has(l)?o:o.then(l[a].bind(l)),Promise.resolve())}function x(n,a){for(const o of a){if(typeof o!="function")throw new c("plugincollection-replace-plugin-invalid-type",null,{pluginItem:o});const l=o.pluginName;if(!l)throw new c("plugincollection-replace-plugin-missing-name",null,{pluginItem:o});if(o.requires&&o.requires.length)throw new c("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:l});const _=s._availablePlugins.get(l);if(!_)throw new c("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:l});const v=n.indexOf(_);if(v===-1){if(s._contextPlugins.has(_))return;throw new c("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:l})}if(_.requires&&_.requires.length)throw new c("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:l});n.splice(v,1,o),s._availablePlugins.set(l,o)}}}destroy(){const e=[];for(const[,t]of this)typeof t.destroy=="function"&&!this._contextPlugins.has(t)&&e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const i=e.pluginName;if(i){if(this._plugins.has(i))throw new c("plugincollection-plugin-name-conflict",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:e});this._plugins.set(i,t)}}}class G{config;plugins;locale;t;editors;static defaultConfig;static builtinPlugins;_contextOwner=null;constructor(e){const{translations:t,...i}=e||{};this.config=new z(i,this.constructor.defaultConfig);const s=this.constructor.builtinPlugins;this.config.define("plugins",s),this.plugins=new $(this,s);const u=this.config.get("language")||{};this.locale=new X({uiLanguage:typeof u=="string"?u:u.ui,contentLanguage:this.config.get("language.content"),translations:t}),this.t=this.locale.t,this.editors=new W}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const i of e.concat(t)){if(typeof i!="function")throw new c("context-initplugins-constructor-only",null,{Plugin:i});if(i.isContextPlugin!==!0)throw new c("context-initplugins-invalid-plugin",null,{Plugin:i})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,e=>e.destroy())).then(()=>this.plugins.destroy())}_addEditor(e,t){if(this._contextOwner)throw new c("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise(t=>{const i=new this(e);t(i.initPlugins().then(()=>i))})}static get _throwErrorWhenUsedAsAPlugin(){return!0}}class he extends S(){context;constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}static get isOfficialPlugin(){return!1}static get isPremiumPlugin(){return!1}}class fe extends ee{editor;constructor(e){super(),this.editor=e}set(e,t,i={}){if(typeof t=="string"){const s=t;t=(u,g)=>{this.editor.execute(s),g()}}super.set(e,t,i)}}const N="contentEditing",B="common";class ge{keystrokeInfos=new Map;_editor;constructor(e){this._editor=e;const t=e.config.get("menuBar.isVisible"),i=e.locale.t;this.addKeystrokeInfoCategory({id:N,label:i("Content editing keystrokes"),description:i("These keyboard shortcuts allow for quick access to content editing features.")});const s=[{label:i("Close contextual balloons, dropdowns, and dialogs"),keystroke:"Esc"},{label:i("Open the accessibility help dialog"),keystroke:"Alt+0"},{label:i("Move focus between form fields (inputs, buttons, etc.)"),keystroke:[["Tab"],["Shift+Tab"]]},{label:i("Move focus to the toolbar, navigate between toolbars"),keystroke:"Alt+F10",mayRequireFn:!0},{label:i("Navigate through the toolbar or menu bar"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]},{label:i("Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content."),keystroke:[["Enter"],["Space"]]}];t&&s.push({label:i("Move focus to the menu bar, navigate between menu bars"),keystroke:"Alt+F9",mayRequireFn:!0}),this.addKeystrokeInfoCategory({id:"navigation",label:i("User interface and content navigation keystrokes"),description:i("Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface."),groups:[{id:"common",keystrokes:s}]})}addKeystrokeInfoCategory({id:e,label:t,description:i,groups:s}){this.keystrokeInfos.set(e,{id:e,label:t,description:i,groups:new Map}),this.addKeystrokeInfoGroup({categoryId:e,id:B}),s&&s.forEach(u=>{this.addKeystrokeInfoGroup({categoryId:e,...u})})}addKeystrokeInfoGroup({categoryId:e=N,id:t,label:i,keystrokes:s}){const u=this.keystrokeInfos.get(e);if(!u)throw new c("accessibility-unknown-keystroke-info-category",this._editor,{groupId:t,categoryId:e});u.groups.set(t,{id:t,label:i,keystrokes:s||[]})}addKeystrokeInfos({categoryId:e=N,groupId:t=B,keystrokes:i}){if(!this.keystrokeInfos.has(e))throw new c("accessibility-unknown-keystroke-info-category",this._editor,{categoryId:e,keystrokes:i});const s=this.keystrokeInfos.get(e);if(!s.groups.has(t))throw new c("accessibility-unknown-keystroke-info-group",this._editor,{groupId:t,categoryId:e,keystrokes:i});s.groups.get(t).keystrokes.push(...i)}}function me(r){return{sessionId:_e(),pageSessionId:Ee(),hostname:window.location.hostname,version:globalThis.CKEDITOR_VERSION,type:ye(r),plugins:we(r.plugins),distribution:pe(),env:be(),integration:Object.create(null),menuBar:{isVisible:!!r.config.get("menuBar.isVisible")},language:{ui:r.locale.uiLanguage,content:r.locale.contentLanguage},toolbar:{main:T(r.config.get("toolbar")),block:T(r.config.get("blockToolbar")),balloon:T(r.config.get("balloonToolbar"))}}}function ye(r){return Object.getPrototypeOf(r).constructor.editorName}function we(r){return Array.from(r).filter(([e])=>!!e.pluginName).map(([e])=>{const{pluginName:t,isContextPlugin:i,isOfficialPlugin:s,isPremiumPlugin:u}=e;return{isContext:!!i,isOfficial:!!s,isPremium:!!u,name:t}})}function T(r){if(!r)return;const e=Array.isArray(r)?{items:r}:r,t=u(e.items||[]);return{isMultiline:t.includes("-"),shouldNotGroupWhenFull:!!e.shouldNotGroupWhenFull,items:s(t)};function s(g){return g.filter(h=>h!=="|"&&h!=="-")}function u(g){return g.flatMap(h=>typeof h=="string"?[h]:u(h.items))}}function pe(){return{channel:window[Symbol.for("cke distribution")]||"sh"}}function be(){let r="unknown",e="unknown";return k.isMac?r="mac":k.isWindows?r="windows":k.isiOS?r="ios":k.isAndroid&&(r="android"),k.isGecko?e="gecko":k.isBlink?e="blink":k.isSafari&&(e="safari"),{os:r,browser:e}}function _e(){return localStorage.getItem("__ckeditor-session-id")||localStorage.setItem("__ckeditor-session-id",R()),localStorage.getItem("__ckeditor-session-id")}function Ee(){return A.window.CKEDITOR_PAGE_SESSION_ID=A.window.CKEDITOR_PAGE_SESSION_ID||R(),A.window.CKEDITOR_PAGE_SESSION_ID}class Ae extends S(){static get editorName(){return"Editor"}accessibility;commands;config;conversion;data;editing;locale;model;plugins;keystrokes;t;static defaultConfig;static builtinPlugins;_context;_readOnlyLocks;static get _throwErrorWhenUsedAsAPlugin(){return!0}constructor(e={}){if(super(),typeof e!="object"||Array.isArray(e))throw new c("editor-config-invalid-type");if("sanitizeHtml"in e)throw new c("editor-config-sanitizehtml-not-supported");const t=this.constructor,{translations:i,...s}=t.defaultConfig||{},{translations:u=i,...g}=e,h=e.language||s.language;this._context=e.context||new G({language:h,translations:u}),this._context._addEditor(this,!e.context);const b=Array.from(t.builtinPlugins||[]);this.config=new z(g,s),this.config.define("plugins",b),this.config.define(this._context._getEditorConfig()),E(this.config),this.plugins=new $(this,b,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new de,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.model=new te(this.config),this.on("change:isReadOnly",()=>{this.model.document.isReadOnly=this.isReadOnly});const y=new ne;this.data=new ie(this.model,y),this.editing=new se(this.model,y),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new oe([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new fe(this),this.keystrokes.listenTo(this.editing.view.document),this.accessibility=new ge(this),p(this);function E(f){let w=f.get("licenseKey");if(!w&&window.CKEDITOR_GLOBAL_LICENSE_KEY&&(w=window.CKEDITOR_GLOBAL_LICENSE_KEY,f.set("licenseKey",w)),!w)throw new c("license-key-missing")}function p(f){const w=f.config.get("licenseKey"),P=window[Symbol.for("cke distribution")]||"sh";function m(n,a){f.enableReadOnlyMode(Symbol("invalidLicense")),f._showLicenseError(n,a)}function C(n){return["exp","jti","vc"].every(o=>o in n)}function O(n){return Object.getOwnPropertyNames(n).sort().filter(l=>l!="vc"&&n[l]!=null).map(l=>n[l])}function D(n){const{hostname:a}=new URL(window.location.href);if(n.includes(a))return!0;const o=a.split(".");return n.filter(l=>l.includes("*")).map(l=>l.split(".")).filter(l=>l.length<=o.length).map(l=>Array(o.length-l.length).fill(l[0]==="*"?"*":"").concat(l)).some(l=>o.every((_,v)=>l[v]===_||l[v]==="*"))}function L(n){const a=n[0].toUpperCase()+n.slice(1),o=n==="evaluation"?"an":"a";console.info(`%cCKEditor 5 ${a} License`,"color: #ffffff; background: #743CCD; font-size: 14px; padding: 4px 8px; border-radius: 4px;"),console.warn(`⚠️ You are using ${o} ${n} license of CKEditor 5${n==="trial"?" which is for evaluation purposes only":""}. For production usage, please obtain a production license at https://portal.ckeditor.com/`)}if(w=="GPL"){P=="cloud"&&m("distributionChannel");return}const d=U(w);if(!d){m("invalid");return}if(!C(d)){m("invalid");return}if(d.distributionChannel&&!V(d.distributionChannel).includes(P)){m("distributionChannel");return}if(j(O(d))!=d.vc.toLowerCase()){m("invalid");return}if(new Date(d.exp*1e3)<Y){m("expired");return}const x=d.licensedHosts;if(x&&x.length>0&&!D(x)){m("domainLimit");return}if(["evaluation","trial"].includes(d.licenseType)&&d.exp*1e3<Date.now()){m("expired");return}if(["development","evaluation","trial"].includes(d.licenseType)){const{licenseType:n}=d;window.CKEDITOR_WARNING_SUPPRESSIONS=window.CKEDITOR_WARNING_SUPPRESSIONS||{},window.CKEDITOR_WARNING_SUPPRESSIONS[n]||(L(n),window.CKEDITOR_WARNING_SUPPRESSIONS[n]=!0)}if(["evaluation","trial"].includes(d.licenseType)){const n=d.licenseType,a=setTimeout(()=>{m(`${n}Limit`)},6e5);f.on("destroy",()=>{clearTimeout(a)})}d.usageEndpoint&&f.once("ready",()=>{const n={requestId:R(),requestTime:Math.round(Date.now()/1e3),license:w,editor:ke(f)};f._sendUsageRequest(d.usageEndpoint,n).then(a=>{const{status:o,message:l}=a;l&&console.warn(l),o!="ok"&&m("usageLimit")},()=>{J("license-key-validation-endpoint-not-reachable",{url:d.usageEndpoint})})},{priority:"high"})}}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new c("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if(typeof e!="string"&&typeof e!="symbol")throw new c("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),this._readOnlyLocks.size===1&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if(typeof e!="string"&&typeof e!="symbol")throw new c("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),this._readOnlyLocks.size===0&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}setData(e){this.data.set(e)}getData(e){return this.data.get(e)}initPlugins(){const e=this.config,t=e.get("plugins"),i=e.get("removePlugins")||[],s=e.get("extraPlugins")||[],u=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(s),i,u).then(h=>(g(this),h));function g(h){const b=h.config.get("licenseKey");if(b==="GPL")return;const y=U(b);if(!y)return;const E=[...h.plugins].map(([p])=>p).find(p=>!p.pluginName||!p.licenseFeatureCode?!1:Q(y,p.licenseFeatureCode));E&&(h.enableReadOnlyMode(Symbol("invalidLicense")),h._showLicenseError("pluginNotAllowed",E.pluginName))}}destroy(){let e=Promise.resolve();return this.state=="initializing"&&(e=new Promise(t=>this.once("ready",t))),e.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(i){c.rethrowUnexpectedError(i,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}static Context=G;static EditorWatchdog=re;static ContextWatchdog=ae;_showLicenseError(e,t){setTimeout(()=>{if(e=="invalid")throw new c("invalid-license-key");if(e=="expired")throw new c("license-key-expired");if(e=="domainLimit")throw new c("license-key-domain-limit");if(e=="pluginNotAllowed"){const i=t.replace(/(Editing|UI)$/,""),s=this.plugins.has(i);throw new c("license-key-plugin-not-allowed",null,{pluginName:s?i:t})}if(e=="featureNotAllowed")throw new c("license-key-feature-not-allowed",null,{featureName:t});if(e=="evaluationLimit")throw new c("license-key-evaluation-limit");if(e=="trialLimit")throw new c("license-key-trial-limit");if(e=="developmentLimit")throw new c("license-key-development-limit");if(e=="usageLimit")throw new c("license-key-usage-limit");if(e=="distributionChannel")throw new c("license-key-invalid-distribution-channel")},0),this._showLicenseError=()=>{}}async _sendUsageRequest(e,t){const i=new Headers({"Content-Type":"application/json"}),s=await fetch(new URL(e),{method:"POST",headers:i,body:JSON.stringify(t)});if(!s.ok)throw new Error(`HTTP Response: ${s.status}`);return s.json()}}function ke(r){const e=me(r);function t(i,s){if(le(e,i)!==void 0)throw new c("editor-usage-data-path-already-set",{path:i});ce(e,i,s)}return r.fire("collectUsageData",{setUsageData:t}),e}function Ne(r){if(!M(r.updateSourceElement))throw new c("attachtoform-missing-elementapi-interface",r);const e=r.sourceElement;if(Pe(e)&&e.form){let t;const i=e.form,s=()=>r.updateSourceElement();M(i.submit)&&(t=i.submit,i.submit=()=>{s(),t.apply(i)}),i.addEventListener("submit",s),r.on("destroy",()=>{i.removeEventListener("submit",s),t&&(i.submit=t)})}}function Pe(r){return!!r&&r.tagName.toLowerCase()==="textarea"}function Te(r){class e extends r{sourceElement;updateSourceElement(i){if(!this.sourceElement)throw new c("editor-missing-sourceelement",this);const s=this.config.get("updateSourceElementOnDestroy"),u=this.sourceElement instanceof HTMLTextAreaElement;if(!s&&!u){K(this.sourceElement,"");return}const g=typeof i=="string"?i:this.data.get();K(this.sourceElement,g)}}return e}class Re extends he{_actions;static get pluginName(){return"PendingActions"}static get isOfficialPlugin(){return!0}init(){this.set("hasAny",!1),this._actions=new W({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if(typeof e!="string")throw new c("pendingactions-add-invalid-message",this);const t=new(S());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}export{ge as Accessibility,ue as Command,de as CommandCollection,G as Context,he as ContextPlugin,fe as EditingKeystrokeHandler,Ae as Editor,Te as ElementApiMixin,Ie as MultiCommand,Re as PendingActions,Le as Plugin,B as _DEFAULT_ACCESSIBILITY_GROUP_ID,me as _getEditorUsageData,Ne as attachToForm};
@@ -1 +1 @@
1
- import{BoxedEditorUIView as f,StickyPanelView as w,ToolbarView as m,MenuBarView as p,InlineEditableUIView as b,EditorUI as y,normalizeToolbarConfig as v,DialogView as u}from"../../../../../@ckeditor_ckeditor5-ui@47.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{enableViewPlaceholder as P}from"../../../../../@ckeditor_ckeditor5-engine@47.3.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{CKEditorError as k,getDataFromElement as T,ElementReplacer as V,Rect as a}from"../../../../../@ckeditor_ckeditor5-utils@47.3.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{ElementApiMixin as C,attachToForm as B,Editor as E}from"../../../../../@ckeditor_ckeditor5-core@47.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{isElement as S}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isElement.js";class _ extends y{view;_toolbarConfig;_elementReplacer;constructor(t,i){super(t),this.view=i,this._toolbarConfig=v(t.config.get("toolbar")),this._elementReplacer=new V,this.listenTo(t.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(t){const i=this.editor,o=this.view,n=i.editing.view,e=o.editable,s=n.document.getRoot();e.name=s.rootName,o.render();const r=e.element;this.setEditableElement(e.name,r),o.editable.bind("isFocused").to(this.focusTracker),n.attachDomRoot(r),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),o.menuBarView&&this.initMenuBar(o.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const t=this.view,i=this.editor.editing.view;this._elementReplacer.restore(),i.getDomRoot(t.editable.name)&&i.detachDomRoot(t.editable.name),t.destroy()}_initToolbar(){const t=this.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,t.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",({visualTop:i})=>i||0),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const t=this.editor,i=t.editing.view,o=i.document.getRoot(),n=t.sourceElement;let e;const s=t.config.get("placeholder");s&&(e=typeof s=="string"?s:s[this.view.editable.name]),!e&&n&&n.tagName.toLowerCase()==="textarea"&&(e=n.getAttribute("placeholder")),e&&(o.placeholder=e),P({view:i,element:o,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:t}=this.view,i=this.editor.plugins.get("ContextualBalloon");i.on("getPositionOptions",n=>{const e=n.return;if(!e||!t.isSticky||!t.element)return;const s=new a(t.element).height,r=typeof e.target=="function"?e.target():e.target,h=typeof e.limiter=="function"?e.limiter():e.limiter;if(r&&h&&new a(r).height>=new a(h).height-s)return;const d={...e.viewportOffsetConfig},g=(d.top||0)+s;n.return={...e,viewportOffsetConfig:{...d,top:g}}},{priority:"low"});const o=()=>{i.visibleView&&i.updatePosition()};this.listenTo(t,"change:isSticky",o),this.listenTo(this.editor.ui,"change:viewportOffset",o)}_handleScrollToTheSelectionWithStickyPanel(t,i,o){const n=this.view.stickyPanel;if(n.isSticky){const e=new a(n.element).height;i.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(o)};this.listenTo(n,"change:isSticky",e),setTimeout(()=>{this.stopListening(n,"change:isSticky",e)},20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const t=this.view.stickyPanel,i=this.editor.plugins.get("Dialog");i.on("show",()=>{const o=i.view;o.on("moveTo",(n,e)=>{if(!t.isSticky||o.wasMoved||o.isModal)return;const s=new a(t.contentPanelElement);e[1]<s.bottom+u.defaultOffset&&(e[1]=s.bottom+u.defaultOffset)},{priority:"high"})},{priority:"low"})}}class R extends f{stickyPanel;toolbar;editable;constructor(t,i,o={}){super(t),this.stickyPanel=new w(t),this.toolbar=new m(t,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),o.useMenuBar&&(this.menuBarView=new p(t)),this.editable=new b(t,i,void 0,{label:o.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class W extends C(E){static get editorName(){return"ClassicEditor"}ui;constructor(t,i={}){if(!c(t)&&i.initialData!==void 0)throw new k("editor-create-initial-data",null);super(i),this.config.define("menuBar.isVisible",!1),this.config.get("initialData")===void 0&&this.config.set("initialData",x(t)),c(t)&&(this.sourceElement=t),this.model.document.createRoot();const o=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=this.config.get("menuBar"),e=new R(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:o,useMenuBar:n.isVisible,label:this.config.get("label")});this.ui=new _(this,e),B(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,i={}){return new Promise(o=>{const n=new this(t,i);o(n.initPlugins().then(()=>n.ui.init(c(t)?t:null)).then(()=>n.data.init(n.config.get("initialData"))).then(()=>n.fire("ready")).then(()=>n))})}}function x(l){return c(l)?T(l):l}function c(l){return S(l)}export{W as ClassicEditor,_ as ClassicEditorUI,R as ClassicEditorUIView};
1
+ import{BoxedEditorUIView as f,StickyPanelView as w,ToolbarView as m,MenuBarView as p,InlineEditableUIView as b,EditorUI as y,normalizeToolbarConfig as v,DialogView as u}from"../../../../../@ckeditor_ckeditor5-ui@47.5.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{enableViewPlaceholder as P}from"../../../../../@ckeditor_ckeditor5-engine@47.5.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{CKEditorError as k,getDataFromElement as T,ElementReplacer as V,Rect as a}from"../../../../../@ckeditor_ckeditor5-utils@47.5.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{ElementApiMixin as C,attachToForm as B,Editor as E}from"../../../../../@ckeditor_ckeditor5-core@47.5.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{isElement as S}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isElement.js";class _ extends y{view;_toolbarConfig;_elementReplacer;constructor(t,i){super(t),this.view=i,this._toolbarConfig=v(t.config.get("toolbar")),this._elementReplacer=new V,this.listenTo(t.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(t){const i=this.editor,o=this.view,n=i.editing.view,e=o.editable,s=n.document.getRoot();e.name=s.rootName,o.render();const r=e.element;this.setEditableElement(e.name,r),o.editable.bind("isFocused").to(this.focusTracker),n.attachDomRoot(r),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),o.menuBarView&&this.initMenuBar(o.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const t=this.view,i=this.editor.editing.view;this._elementReplacer.restore(),i.getDomRoot(t.editable.name)&&i.detachDomRoot(t.editable.name),t.destroy()}_initToolbar(){const t=this.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,t.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",({visualTop:i})=>i||0),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const t=this.editor,i=t.editing.view,o=i.document.getRoot(),n=t.sourceElement;let e;const s=t.config.get("placeholder");s&&(e=typeof s=="string"?s:s[this.view.editable.name]),!e&&n&&n.tagName.toLowerCase()==="textarea"&&(e=n.getAttribute("placeholder")),e&&(o.placeholder=e),P({view:i,element:o,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:t}=this.view,i=this.editor.plugins.get("ContextualBalloon");i.on("getPositionOptions",n=>{const e=n.return;if(!e||!t.isSticky||!t.element)return;const s=new a(t.element).height,r=typeof e.target=="function"?e.target():e.target,h=typeof e.limiter=="function"?e.limiter():e.limiter;if(r&&h&&new a(r).height>=new a(h).height-s)return;const d={...e.viewportOffsetConfig},g=(d.top||0)+s;n.return={...e,viewportOffsetConfig:{...d,top:g}}},{priority:"low"});const o=()=>{i.visibleView&&i.updatePosition()};this.listenTo(t,"change:isSticky",o),this.listenTo(this.editor.ui,"change:viewportOffset",o)}_handleScrollToTheSelectionWithStickyPanel(t,i,o){const n=this.view.stickyPanel;if(n.isSticky){const e=new a(n.element).height;i.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(o)};this.listenTo(n,"change:isSticky",e),setTimeout(()=>{this.stopListening(n,"change:isSticky",e)},20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const t=this.view.stickyPanel,i=this.editor.plugins.get("Dialog");i.on("show",()=>{const o=i.view;o.on("moveTo",(n,e)=>{if(!t.isSticky||o.wasMoved||o.isModal)return;const s=new a(t.contentPanelElement);e[1]<s.bottom+u.defaultOffset&&(e[1]=s.bottom+u.defaultOffset)},{priority:"high"})},{priority:"low"})}}class R extends f{stickyPanel;toolbar;editable;constructor(t,i,o={}){super(t),this.stickyPanel=new w(t),this.toolbar=new m(t,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),o.useMenuBar&&(this.menuBarView=new p(t)),this.editable=new b(t,i,void 0,{label:o.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class W extends C(E){static get editorName(){return"ClassicEditor"}ui;constructor(t,i={}){if(!c(t)&&i.initialData!==void 0)throw new k("editor-create-initial-data",null);super(i),this.config.define("menuBar.isVisible",!1),this.config.get("initialData")===void 0&&this.config.set("initialData",x(t)),c(t)&&(this.sourceElement=t),this.model.document.createRoot();const o=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=this.config.get("menuBar"),e=new R(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:o,useMenuBar:n.isVisible,label:this.config.get("label")});this.ui=new _(this,e),B(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,i={}){return new Promise(o=>{const n=new this(t,i);o(n.initPlugins().then(()=>n.ui.init(c(t)?t:null)).then(()=>n.data.init(n.config.get("initialData"))).then(()=>n.fire("ready")).then(()=>n))})}}function x(l){return c(l)?T(l):l}function c(l){return S(l)}export{W as ClassicEditor,_ as ClassicEditorUI,R as ClassicEditorUIView};