@ncino/web-components 9.1.0 → 9.2.0-preview.2
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.
- package/dist/_virtual/eq.js +1 -0
- package/dist/_virtual/getSymbols.js +1 -0
- package/dist/_virtual/getTag.js +1 -0
- package/dist/_virtual/isEqual.js +1 -0
- package/dist/_virtual/isEqual2.js +1 -0
- package/dist/_virtual/isEqualWith.js +1 -0
- package/dist/_virtual/isPlainObject.js +1 -0
- package/dist/_virtual/noop.js +1 -0
- package/dist/_virtual/tags.js +1 -0
- package/dist/assets/node_modules/.pnpm/{ckeditor5@47.3.0 → ckeditor5@47.4.0}/node_modules/ckeditor5/dist/ckeditor5.css +1 -1
- package/dist/components/input/gator/input-file/input-file.gator.js +1 -1
- package/dist/components/input-rich-text/ckeditor-config.js +1 -1
- package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
- package/dist/components/panel/gator/panel.storybook-test.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-alignment@47.3.0 → @ckeditor_ckeditor5-alignment@47.4.0}/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autoformat@47.3.0 → @ckeditor_ckeditor5-autoformat@47.4.0}/node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autosave@47.3.0 → @ckeditor_ckeditor5-autosave@47.4.0}/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-basic-styles@47.3.0 → @ckeditor_ckeditor5-basic-styles@47.4.0}/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-block-quote@47.3.0 → @ckeditor_ckeditor5-block-quote@47.4.0}/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-clipboard@47.3.0 → @ckeditor_ckeditor5-clipboard@47.4.0}/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-cloud-services@47.3.0 → @ckeditor_ckeditor5-cloud-services@47.4.0}/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-code-block@47.3.0 → @ckeditor_ckeditor5-code-block@47.4.0}/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@47.4.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-editor-classic@47.3.0 → @ckeditor_ckeditor5-editor-classic@47.4.0}/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-engine@47.3.0 → @ckeditor_ckeditor5-engine@47.4.0}/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-enter@47.3.0 → @ckeditor_ckeditor5-enter@47.4.0}/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-essentials@47.3.0 → @ckeditor_ckeditor5-essentials@47.4.0}/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-find-and-replace@47.3.0 → @ckeditor_ckeditor5-find-and-replace@47.4.0}/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-font@47.3.0 → @ckeditor_ckeditor5-font@47.4.0}/node_modules/@ckeditor/ckeditor5-font/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-heading@47.3.0 → @ckeditor_ckeditor5-heading@47.4.0}/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-highlight@47.3.0 → @ckeditor_ckeditor5-highlight@47.4.0}/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-horizontal-line@47.3.0 → @ckeditor_ckeditor5-horizontal-line@47.4.0}/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-embed@47.3.0 → @ckeditor_ckeditor5-html-embed@47.4.0}/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-support@47.3.0 → @ckeditor_ckeditor5-html-support@47.4.0}/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@47.4.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-indent@47.3.0 → @ckeditor_ckeditor5-indent@47.4.0}/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-language@47.3.0 → @ckeditor_ckeditor5-language@47.4.0}/node_modules/@ckeditor/ckeditor5-language/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-link@47.3.0 → @ckeditor_ckeditor5-link@47.4.0}/node_modules/@ckeditor/ckeditor5-link/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-list@47.3.0 → @ckeditor_ckeditor5-list@47.4.0}/node_modules/@ckeditor/ckeditor5-list/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-markdown-gfm@47.3.0 → @ckeditor_ckeditor5-markdown-gfm@47.4.0}/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@47.4.0/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-mention@47.3.0 → @ckeditor_ckeditor5-mention@47.4.0}/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-page-break@47.3.0 → @ckeditor_ckeditor5-page-break@47.4.0}/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paragraph@47.3.0 → @ckeditor_ckeditor5-paragraph@47.4.0}/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paste-from-office@47.3.0 → @ckeditor_ckeditor5-paste-from-office@47.4.0}/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-remove-format@47.3.0 → @ckeditor_ckeditor5-remove-format@47.4.0}/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-select-all@47.3.0 → @ckeditor_ckeditor5-select-all@47.4.0}/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-show-blocks@47.3.0 → @ckeditor_ckeditor5-show-blocks@47.4.0}/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-source-editing@47.3.0 → @ckeditor_ckeditor5-source-editing@47.4.0}/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-special-characters@47.3.0 → @ckeditor_ckeditor5-special-characters@47.4.0}/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-style@47.3.0 → @ckeditor_ckeditor5-style@47.4.0}/node_modules/@ckeditor/ckeditor5-style/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@47.4.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@47.4.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@47.4.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-undo@47.3.0 → @ckeditor_ckeditor5-undo@47.4.0}/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-upload@47.3.0 → @ckeditor_ckeditor5-upload@47.4.0}/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-utils@47.3.0 → @ckeditor_ckeditor5-utils@47.4.0}/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-widget@47.3.0 → @ckeditor_ckeditor5-widget@47.4.0}/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@deltablot_dropzone@7.4.3/node_modules/@deltablot/dropzone/dist/dropzone.js +38 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/compat/isEqual.js +1 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/_internal/getSymbols2.js +1 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/_internal/getTag2.js +1 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/_internal/tags2.js +1 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/object/merge.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/util/eq2.js +1 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/function/noop.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/function/noop2.js +1 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqual.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqual2.js +1 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqualWith.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqualWith2.js +1 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isPlainObject.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isPlainObject2.js +1 -0
- package/dist/node_modules/.pnpm/mdast-util-from-markdown@2.0.2/node_modules/mdast-util-from-markdown/lib/index.js +1 -1
- package/dist/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.js +1 -1
- package/dist/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.js +1 -1
- 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.1_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/storybook/dist/_browser-chunks/chunk-Q5RYDXT3.js} +19 -19
- package/dist/node_modules/.pnpm/storybook@10.2.1_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/storybook/dist/_browser-chunks/chunk-VIJ7SQRO.js +1 -0
- package/dist/node_modules/.pnpm/storybook@10.2.1_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/storybook/dist/core-events/index.js +1 -0
- 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.1_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/instrumenter/index.js +1 -1
- package/dist/node_modules/.pnpm/storybook@10.2.1_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/storybook/dist/test/index.js +156 -0
- package/package.json +14 -14
- package/web-types.json +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@47.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@47.3.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@47.3.0/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@47.3.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@47.3.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@47.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@deltablot_dropzone@7.3.1/node_modules/@deltablot/dropzone/dist/dropzone.js +0 -22
- 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
- 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
- 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
- /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-icons@47.3.0 → @ckeditor_ckeditor5-icons@47.4.0}/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-watchdog@47.3.0 → @ckeditor_ckeditor5-watchdog@47.4.0}/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{decode-named-character-reference@1.2.0 → decode-named-character-reference@1.3.0}/node_modules/decode-named-character-reference/index.dom.js +0 -0
- /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.1_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/storybook/dist/_browser-chunks/chunk-3LY4VQVK.js} +0 -0
- /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.1_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/_browser-chunks/chunk-A242L54C.js +0 -0
- /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.1_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/_browser-chunks/chunk-ZUWEVLDX.js +0 -0
- /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.1_@testing-library_dom@10.4.1_prettier@3.7.4_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/client-logger/index.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{isObject as Ot}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isObject.js";import{isString as nt}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isString.js";import{isFunction as it}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isFunction.js";import{isElement as Et}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isElement.js";import{isPlainObject as M}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js";import{cloneDeepWith as Wt}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js";import{merge as Kt}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/object/merge.js";let _;try{_={window,document}}catch{_={window:{},document:{}}}function $t(){try{return navigator.userAgent.toLowerCase()}catch{return""}}const T=$t(),L={isMac:Tt(T),isWindows:Ht(T),isGecko:Ut(T),isSafari:Gt(T),isiOS:qt(T),isAndroid:Yt(T),isBlink:Xt(T),get isMediaForcedColors(){return Jt()}};function Tt(e){return e.indexOf("macintosh")>-1}function Ht(e){return e.indexOf("windows")>-1}function Ut(e){return!!e.match(/gecko\/\d+/)}function Gt(e){return e.indexOf(" applewebkit/")>-1&&e.indexOf("chrome")===-1}function qt(e){return!!e.match(/iphone|ipad/i)||Tt(e)&&navigator.maxTouchPoints>0}function Yt(e){return e.indexOf("android")>-1}function Xt(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}function Jt(){return _.window.matchMedia?_.window.matchMedia("(forced-colors: active)").matches:!1}function Qt(e,t,n,i){n=n||function(a,c){return a===c};const s=Array.isArray(e)?e:Array.prototype.slice.call(e),o=Array.isArray(t)?t:Array.prototype.slice.call(t),r=Zt(s,o,n);return i?te(r,o.length):zt(o,r)}function Zt(e,t,n){const i=st(e,t,n);if(i===-1)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const s=ot(e,i),o=ot(t,i),r=st(s,o,n),l=e.length-r,a=t.length-r;return{firstIndex:i,lastIndexOld:l,lastIndexNew:a}}function st(e,t,n){for(let i=0;i<Math.max(e.length,t.length);i++)if(e[i]===void 0||t[i]===void 0||!n(e[i],t[i]))return i;return-1}function ot(e,t){return e.slice(t).reverse()}function zt(e,t){const n=[],{firstIndex:i,lastIndexOld:s,lastIndexNew:o}=t;return o-i>0&&n.push({index:i,type:"insert",values:e.slice(i,o)}),s-i>0&&n.push({index:i+(o-i),type:"delete",howMany:s-i}),n}function te(e,t){const{firstIndex:n,lastIndexOld:i,lastIndexNew:s}=e;if(n===-1)return Array(t).fill("equal");let o=[];return n>0&&(o=o.concat(Array(n).fill("equal"))),s-n>0&&(o=o.concat(Array(s-n).fill("insert"))),i-n>0&&(o=o.concat(Array(i-n).fill("delete"))),s<t&&(o=o.concat(Array(t-s).fill("equal"))),o}function xt(e,t,n){n=n||function(p,k){return p===k};const i=e.length,s=t.length;if(i>200||s>200||i+s>300)return xt.fastDiff(e,t,n,!0);let o,r;if(s<i){const p=e;e=t,t=p,o="delete",r="insert"}else o="insert",r="delete";const l=e.length,a=t.length,c=a-l,f={},u={};function w(p){const k=(u[p-1]!==void 0?u[p-1]:-1)+1,D=u[p+1]!==void 0?u[p+1]:-1,et=k>D?-1:1;f[p+et]&&(f[p]=f[p+et].slice(0)),f[p]||(f[p]=[]),f[p].push(k>D?o:r);let F=Math.max(k,D),j=F-p;for(;j<l&&F<a&&n(e[j],t[F]);)j++,F++,f[p].push("equal");return F}let C=0,y;do{for(y=-C;y<c;y++)u[y]=w(y);for(y=c+C;y>c;y--)u[y]=w(y);u[c]=w(c),C++}while(u[c]!==a);return f[c].slice(1)}xt.fastDiff=Qt;function rt(){return function e(){e.called=!0}}class H{source;name;path;stop;off;return;constructor(t,n){this.source=t,this.name=n,this.path=[],this.stop=rt(),this.off=rt()}}const b=new Array(256).fill("").map((e,t)=>("0"+t.toString(16)).slice(-2));function X(){const[e,t,n,i]=crypto.getRandomValues(new Uint32Array(4));return"e"+b[e>>0&255]+b[e>>8&255]+b[e>>16&255]+b[e>>24&255]+b[t>>0&255]+b[t>>8&255]+b[t>>16&255]+b[t>>24&255]+b[n>>0&255]+b[n>>8&255]+b[n>>16&255]+b[n>>24&255]+b[i>>0&255]+b[i>>8&255]+b[i>>16&255]+b[i>>24&255]}const U={get(e="normal"){return typeof e!="number"?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function ee(e,t){const n=U.get(t.priority);let i=0,s=e.length;for(;i<s;){const o=i+s>>1;U.get(e[o].priority)<n?s=o:i=o+1}e.splice(i,0,t)}const ne="https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";class d extends Error{context;data;constructor(t,n,i,s){super(ie(t,i,s)),this.name="CKEditorError",this.context=n,this.data=i,s&&(this.stack=s.stack)}is(t){return t==="CKEditorError"}static rethrowUnexpectedError(t,n){throw t.is&&t.is("CKEditorError")?t:new d("unexpected-error",n,void 0,t)}}function hn(e,t){console.warn(...At(e,t))}function pn(e,t){console.error(...At(e,t))}function It(e){return`
|
|
2
2
|
Read more: ${ne}#error-${e}`}function ie(e,t,n){const i=new WeakSet,o=t?` ${JSON.stringify(t,(a,c)=>{if(typeof c=="object"&&c!==null){if(i.has(c))return`[object ${c.constructor.name}]`;i.add(c)}return c})}`:"",r=It(e),l=n?`
|
|
3
|
-
Original error: ${n.name}: ${n.message}`:"";return e+o+r+l}function At(e,t){const n=It(e);return t?[e,t,n]:[e,n]}const se="47.3.0",gn=new Date(2025,11,3);if(globalThis.CKEDITOR_VERSION)throw new d("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=se;const A=Symbol("listeningTo"),G=Symbol("emitterId"),E=Symbol("delegations"),oe=I(Object);function I(e){if(!e)return oe;class t extends e{on(i,s,o){this.listenTo(this,i,s,o)}once(i,s,o){let r=!1;const l=(a,...c)=>{r||(r=!0,a.off(),s.call(this,a,...c))};this.listenTo(this,i,l,o)}off(i,s){this.stopListening(this,i,s)}listenTo(i,s,o,r={}){let l,a;this[A]||(this[A]={});const c=this[A];O(i)||Lt(i);const f=O(i);(l=c[f])||(l=c[f]={emitter:i,callbacks:{}}),(a=l.callbacks[s])||(a=l.callbacks[s]=[]),a.push(o),fe(this,i,s,o,r)}stopListening(i,s,o){const r=this[A];let l=i&&O(i);const a=r&&l?r[l]:void 0,c=a&&s?a.callbacks[s]:void 0;if(!(!r||i&&!a||s&&!c))if(o)W(this,i,s,o),c.indexOf(o)!==-1&&(c.length===1?delete a.callbacks[s]:W(this,i,s,o));else if(c){for(;o=c.pop();)W(this,i,s,o);delete a.callbacks[s]}else if(a){for(s in a.callbacks)this.stopListening(i,s);delete r[l]}else{for(l in r)this.stopListening(r[l].emitter);delete this[A]}}fire(i,...s){try{const o=i instanceof H?i:new H(this,i),r=o.name;let l=ae(this,r);if(o.path.push(this),l){l=l.slice();for(let c=0;c<l.length;c++){const f=l[c].callback;if(f.call(this,o,...s),o.off.called&&(delete o.off.called,this._removeEventListener(r,f)),o.stop.called)break}}const a=this[E];if(a){const c=a.get(r),f=a.get("*");c&<(c,o,s),f&<(f,o,s)}return o.return}catch(o){d.rethrowUnexpectedError(o,this)}}delegate(...i){return{to:(s,o)=>{this[E]||(this[E]=new Map),i.forEach(r=>{const l=this[E].get(r);l?l.set(s,o):this[E].set(r,new Map([[s,o]]))})}}}stopDelegating(i,s){if(this[E])if(!i)this[E].clear();else if(!s)this[E].delete(i);else{const o=this[E].get(i);o&&o.delete(s)}}_addEventListener(i,s,o){ce(this,i);const r=q(this,i),l=U.get(o.priority),a={callback:s,priority:l};for(const c of r)ee(c,a)}_removeEventListener(i,s){const o=q(this,i);for(const r of o)for(let l=0;l<r.length;l++)r[l].callback==s&&(r.splice(l,1),l--)}}return t}function re(e,t){const n=e[A];return n&&n[t]?n[t].emitter:null}function Lt(e,t){e[G]||(e[G]=t||X())}function O(e){return e[G]}function Ct(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function le(){return{callbacks:[],childEvents:[]}}function ce(e,t){const n=Ct(e);if(n[t])return;let i=t,s=null;const o=[];for(;i!==""&&!n[i];)n[i]=le(),o.push(n[i]),s&&n[i].childEvents.push(s),s=i,i=i.substr(0,i.lastIndexOf(":"));if(i!==""){for(const r of o)r.callbacks=n[i].callbacks.slice();n[i].childEvents.push(s)}}function q(e,t){const n=Ct(e)[t];if(!n)return[];let i=[n.callbacks];for(let s=0;s<n.childEvents.length;s++){const o=q(e,n.childEvents[s]);i=i.concat(o)}return i}function ae(e,t){if(!e._events)return null;let n=t;do{const i=e._events[n];if(i&&i.callbacks&&i.callbacks.length)return i.callbacks;const s=n.lastIndexOf(":");n=s>-1?n.substring(0,s):""}while(n);return null}function lt(e,t,n){for(let[i,s]of e){s?typeof s=="function"&&(s=s(t.name)):s=t.name;const o=new H(t.source,s);o.path=[...t.path],i.fire(o,...n)}}function fe(e,t,n,i,s){t._addEventListener?t._addEventListener(n,i,s):e._addEventListener.call(t,n,i,s)}function W(e,t,n,i){t._removeEventListener?t._removeEventListener(n,i):e._removeEventListener.call(t,n,i)}const S=Symbol("observableProperties"),R=Symbol("boundObservables"),V=Symbol("boundProperties"),x=Symbol("decoratedMethods"),ct=Symbol("decoratedOriginal"),ue=kt(I());function kt(e){if(!e)return ue;class t extends e{set(i,s){if(Ot(i)){Object.keys(i).forEach(r=>{this.set(r,i[r])},this);return}K(this);const o=this[S];if(i in this&&!o.has(i))throw new d("observable-set-cannot-override",this);Object.defineProperty(this,i,{enumerable:!0,configurable:!0,get(){return o.get(i)},set(r){const l=o.get(i);let a=this.fire(`set:${i}`,i,r,l);a===void 0&&(a=r),(l!==a||!o.has(i))&&(o.set(i,a),this.fire(`change:${i}`,i,a,l))}}),this[i]=s}bind(...i){if(!i.length||!at(i))throw new d("observable-bind-wrong-properties",this);if(new Set(i).size!==i.length)throw new d("observable-bind-duplicate-properties",this);K(this);const s=this[V];i.forEach(r=>{if(s.has(r))throw new d("observable-bind-rebind",this)});const o=new Map;return i.forEach(r=>{const l={property:r,to:[]};s.set(r,l),o.set(r,l)}),{to:de,toMany:he,_observable:this,_bindProperties:i,_to:[],_bindings:o}}unbind(...i){if(!this[S])return;const s=this[V],o=this[R];if(i.length){if(!at(i))throw new d("observable-unbind-wrong-properties",this);i.forEach(r=>{const l=s.get(r);l&&(l.to.forEach(([a,c])=>{const f=o.get(a),u=f[c];u.delete(l),u.size||delete f[c],Object.keys(f).length||(o.delete(a),this.stopListening(a,"change"))}),s.delete(r))})}else o.forEach((r,l)=>{this.stopListening(l,"change")}),o.clear(),s.clear()}decorate(i){K(this);const s=this[i];if(!s)throw new d("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:i});this.on(i,(o,r)=>{o.return=s.apply(this,r)}),this[i]=function(...o){return this.fire(i,o)},this[i][ct]=s,this[x]||(this[x]=[]),this[x].push(i)}stopListening(i,s,o){if(!i&&this[x]){for(const r of this[x])this[r]=this[r][ct];delete this[x]}super.stopListening(i,s,o)}[S];[x];[V];[R]}return t}function K(e){e[S]||(Object.defineProperty(e,S,{value:new Map}),Object.defineProperty(e,R,{value:new Map}),Object.defineProperty(e,V,{value:new Map}))}function de(...e){const t=ge(...e),n=Array.from(this._bindings.keys()),i=n.length;if(!t.callback&&t.to.length>1)throw new d("observable-bind-to-no-callback",this);if(i>1&&t.callback)throw new d("observable-bind-to-extra-callback",this);t.to.forEach(s=>{if(s.properties.length&&s.properties.length!==i)throw new d("observable-bind-to-properties-length",this);s.properties.length||(s.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),_e(this._observable,this._to),be(this),this._bindProperties.forEach(s=>{Ft(this._observable,s)})}function he(e,t,n){if(this._bindings.size>1)throw new d("observable-bind-to-many-not-one-binding",this);this.to(...pe(e,t),n)}function pe(e,t){const n=e.map(i=>[i,t]);return Array.prototype.concat.apply([],n)}function at(e){return e.every(t=>typeof t=="string")}function ge(...e){if(!e.length)throw new d("observable-bind-to-parse-error",null);const t={to:[]};let n;return typeof e[e.length-1]=="function"&&(t.callback=e.pop()),e.forEach(i=>{if(typeof i=="string")n.properties.push(i);else if(typeof i=="object")n={observable:i,properties:[]},t.to.push(n);else throw new d("observable-bind-to-parse-error",null)}),t}function me(e,t,n,i){const s=e[R],o=s.get(n),r=o||{};r[i]||(r[i]=new Set),r[i].add(t),o||s.set(n,r)}function be(e){let t;e._bindings.forEach((n,i)=>{e._to.forEach(s=>{t=s.properties[n.callback?0:e._bindProperties.indexOf(i)],n.to.push([s.observable,t]),me(e._observable,n,s.observable,t)})})}function Ft(e,t){const i=e[V].get(t);let s;i.callback?s=i.callback.apply(e,i.to.map(o=>o[0][o[1]])):(s=i.to[0],s=s[0][s[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=s:e.set(t,s)}function _e(e,t){t.forEach(n=>{const i=e[R];let s;i.get(n.observable)||e.listenTo(n.observable,"change",(o,r)=>{s=i.get(n.observable)[r],s&&s.forEach(l=>{Ft(e,l.property)})})})}class mn{_replacedElements;constructor(){this._replacedElements=[]}replace(t,n){this._replacedElements.push({element:t,newElement:n}),t.style.display="none",n&&t.parentNode.insertBefore(n,t.nextSibling)}restore(){this._replacedElements.forEach(({element:t,newElement:n})=>{t.style.display="",n&&n.remove()}),this._replacedElements=[]}}function bn(e){let t=0;for(const n of e)t++;return t}function _n(e,t){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++)if(e[i]!=t[i])return i;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}function J(e){return!!(e&&e[Symbol.iterator])}function wn(e,t,n={},i=[]){const s=n&&n.xmlns,o=s?e.createElementNS(s,t):e.createElement(t);for(const r in n)o.setAttribute(r,n[r]);(nt(i)||!J(i))&&(i=[i]);for(let r of i)nt(r)&&(r=e.createTextNode(r)),o.appendChild(r);return o}class yn{_config;constructor(t,n){this._config=Object.create(null),n&&this.define(ft(n)),t&&this._setObjectToTarget(this._config,t)}set(t,n){this._setToTarget(this._config,t,n)}define(t,n){this._setToTarget(this._config,t,n,!0)}get(t){return this._getFromSource(this._config,t)}*names(){for(const t of Object.keys(this._config))yield t}_setToTarget(t,n,i,s=!1){if(M(n)){this._setObjectToTarget(t,n,s);return}const o=n.split(".");n=o.pop();for(const r of o)M(t[r])||(t[r]=Object.create(null)),t=t[r];if(M(i)){M(t[n])||(t[n]=Object.create(null)),t=t[n],this._setObjectToTarget(t,i,s);return}s&&typeof t[n]<"u"||(t[n]=i)}_getFromSource(t,n){const i=n.split(".");n=i.pop();for(const s of i){if(!M(t[s])){t=null;break}t=t[s]}return t?ft(t[n]):void 0}_setObjectToTarget(t,n,i){Object.keys(n).forEach(s=>{this._setToTarget(t,s,n[s],i)})}}function ft(e){return Wt(e,we)}function we(e){return Et(e)||typeof e=="function"?e:void 0}function ut(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function B(e){const t=Object.prototype.toString.apply(e);return t=="[object Window]"||t=="[object global]"}const ye=Q(I());function Q(e){if(!e)return ye;class t extends e{listenTo(i,s,o,r={}){if(ut(i)||B(i)||i instanceof _.window.EventTarget){const l={capture:!!r.useCapture,passive:!!r.usePassive},a=this._getProxyEmitter(i,l)||new Ee(i,l);this.listenTo(a,s,o,r)}else super.listenTo(i,s,o,r)}stopListening(i,s,o){if(ut(i)||B(i)||i instanceof _.window.EventTarget){const r=this._getAllProxyEmitters(i);for(const l of r)this.stopListening(l,s,o)}else super.stopListening(i,s,o)}_getProxyEmitter(i,s){return re(this,Mt(i,s))}_getAllProxyEmitters(i){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map(s=>this._getProxyEmitter(i,s)).filter(s=>!!s)}}return t}class Ee extends I(){_domNode;_options;constructor(t,n){super(),Lt(this,Mt(t,n)),this._domNode=t,this._options=n}_domListeners;attach(t){if(this._domListeners&&this._domListeners[t])return;const n=this._createDomListener(t);this._domNode.addEventListener(t,n,this._options),this._domListeners||(this._domListeners={}),this._domListeners[t]=n}detach(t){let n;this._domListeners[t]&&(!(n=this._events[t])||!n.callbacks.length)&&this._domListeners[t].removeListener()}_addEventListener(t,n,i){this.attach(t),I().prototype._addEventListener.call(this,t,n,i)}_removeEventListener(t,n){I().prototype._removeEventListener.call(this,t,n),this.detach(t)}_createDomListener(t){const n=i=>{this.fire(t,i)};return n.removeListener=()=>{this._domNode.removeEventListener(t,n,this._options),delete this._domListeners[t]},n}}function Te(e){return e["data-ck-expando"]||(e["data-ck-expando"]=X())}function Mt(e,t){let n=Te(e);for(const i of Object.keys(t).sort())t[i]&&(n+="-"+i);return n}function En(e){const t=[];let n=e;for(;n&&n.nodeType!=Node.DOCUMENT_NODE;)t.unshift(n),n=n.parentNode;return t}function Tn(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function St(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function xn(e){if(!e.target)return null;const t=e.target.ownerDocument,n=e.clientX,i=e.clientY;let s=null;return t.caretRangeFromPoint&&t.caretRangeFromPoint(n,i)?s=t.caretRangeFromPoint(n,i):e.rangeParent&&(s=t.createRange(),s.setStart(e.rangeParent,e.rangeOffset),s.collapse(!0)),s}function Vt(e){return!e||!e.parentNode||e.offsetParent===_.document.body?null:e.offsetParent}function Z(e){return Object.prototype.toString.call(e)=="[object Text]"}function z(e){return Object.prototype.toString.apply(e)=="[object Range]"}const Rt=["top","right","bottom","left","width","height"];class m{top;right;bottom;left;width;height;_source;constructor(t){const n=z(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),Y(t)||n)if(n){const i=m.getDomRangeRects(t);v(this,m.getBoundingRect(i))}else v(this,t.getBoundingClientRect());else if(B(t)){const{innerWidth:i,innerHeight:s}=t;v(this,{top:0,right:i,bottom:s,left:0,width:i,height:s})}else v(this,t)}clone(){return new m(this)}moveTo(t,n){return this.top=n,this.right=t+this.width,this.bottom=n+this.height,this.left=t,this}moveBy(t,n){return this.top+=n,this.right+=t,this.left+=t,this.bottom+=n,this}getIntersection(t){const n={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left),width:0,height:0};if(n.width=n.right-n.left,n.height=n.bottom-n.top,n.width<0||n.height<0)return null;{const i=new m(n);return i._source=this._source,i}}getIntersectionArea(t){const n=this.getIntersection(t);return n?n.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let n=this.clone();if(dt(t))return n;let i=t,s=t.parentNode||t.commonAncestorContainer,o;for(;s&&!dt(s);){const r=xe(s)==="visible";i instanceof HTMLElement&&ht(i)==="absolute"&&(o=i);const l=ht(s);if(r||o&&(l==="relative"&&r||l!=="relative")){i=s,s=s.parentNode;continue}const a=new m(s),c=n.getIntersection(a);if(c)c.getArea()<n.getArea()&&(n=c);else return null;i=s,s=s.parentNode}return n}isEqual(t){for(const n of Rt)if(this[n]!==t[n])return!1;return!0}contains(t){const n=this.getIntersection(t);return!!(n&&n.isEqual(t))}toAbsoluteRect(){const{scrollX:t,scrollY:n}=_.window,i=this.clone().moveBy(t,n);if(Y(i._source)){const s=Vt(i._source);s&&Ie(i,s)}return i}excludeScrollbarsAndBorders(){const t=this._source;let n,i,s;if(B(t))n=t.innerWidth-t.document.documentElement.clientWidth,i=t.innerHeight-t.document.documentElement.clientHeight,s=t.getComputedStyle(t.document.documentElement).direction;else{const o=St(t);n=t.offsetWidth-t.clientWidth-o.left-o.right,i=t.offsetHeight-t.clientHeight-o.top-o.bottom,s=t.ownerDocument.defaultView.getComputedStyle(t).direction,this.left+=o.left,this.top+=o.top,this.right-=o.right,this.bottom-=o.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=n,s==="ltr"?this.right-=n:this.left+=n,this.height-=i,this.bottom-=i,this}static getDomRangeRects(t){const n=[],i=Array.from(t.getClientRects());if(i.length)for(const s of i)n.push(new m(s));else{let s=t.startContainer;Z(s)&&(s=s.parentNode);const o=new m(s.getBoundingClientRect());o.right=o.left,o.width=0,n.push(o)}return n}static getBoundingRect(t){const n={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let i=0;for(const s of t)i++,n.left=Math.min(n.left,s.left),n.top=Math.min(n.top,s.top),n.right=Math.max(n.right,s.right),n.bottom=Math.max(n.bottom,s.bottom);return i==0?null:(n.width=n.right-n.left,n.height=n.bottom-n.top,new m(n))}}function v(e,t){for(const n of Rt)e[n]=t[n]}function dt(e){return Y(e)?e===e.ownerDocument.body:!1}function Y(e){return e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.getBoundingClientRect=="function"}function ht(e){return e instanceof HTMLElement?e.ownerDocument.defaultView.getComputedStyle(e).position:"static"}function xe(e){return e instanceof HTMLElement?e.ownerDocument.defaultView.getComputedStyle(e).overflow:"visible"}function Ie(e,t){const n=new m(t),i=St(t);let s=0,o=0;s-=n.left,o-=n.top,s+=t.scrollLeft,o+=t.scrollTop,s-=i.left,o-=i.top,e.moveBy(s,o)}class h{_element;_callback;static _observerInstance=null;static _elementCallbacks=null;constructor(t,n){h._observerInstance||h._createObserver(),this._element=t,this._callback=n,h._addElementCallback(t,n),h._observerInstance.observe(t)}get element(){return this._element}destroy(){h._deleteElementCallback(this._element,this._callback)}static _addElementCallback(t,n){h._elementCallbacks||(h._elementCallbacks=new Map);let i=h._elementCallbacks.get(t);i||(i=new Set,h._elementCallbacks.set(t,i)),i.add(n)}static _deleteElementCallback(t,n){const i=h._getElementCallbacks(t);i&&(i.delete(n),i.size||(h._elementCallbacks.delete(t),h._observerInstance.unobserve(t))),h._elementCallbacks&&!h._elementCallbacks.size&&(h._observerInstance=null,h._elementCallbacks=null)}static _getElementCallbacks(t){return h._elementCallbacks?h._elementCallbacks.get(t):null}static _createObserver(){h._observerInstance=new _.window.ResizeObserver(t=>{for(const n of t){const i=h._getElementCallbacks(n.target);if(i)for(const s of i)s(n)}})}}function In(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function An(e){return t=>t+e}function Ln(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Cn(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function kn(e){return e&&e.nodeType===Node.COMMENT_NODE}function Fn(e){try{_.document.createAttribute(e)}catch{return!1}return!0}function Ae(e){return e?Z(e)?Ae(e.parentElement):e.getClientRects?!!e.getClientRects().length:!1:!1}function Mn({element:e,target:t,positions:n,limiter:i,fitInViewport:s,viewportOffsetConfig:o}){it(t)&&(t=t()),it(i)&&(i=i());const r=Vt(e),l=Le(o),a=new m(e),c=pt(t,l);let f;if(!c||!l.getIntersection(c))return null;const u={targetRect:c,elementRect:a,positionedElementAncestor:r,viewportRect:l};if(!i&&!s)f=new vt(n[0],u);else{if(i){const w=pt(i,l);w&&(u.limiterRect=w)}f=Ce(n,u)}return f}function pt(e,t){const n=new m(e).getVisible();return n?n.getIntersection(t):null}function Le(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new m(_.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t.left+=e.left,t.right-=e.right,t.width-=e.left+e.right,t}function Ce(e,t){const{elementRect:n}=t,i=n.getArea(),s=e.map(l=>new vt(l,t)).filter(l=>!!l.name);let o=0,r=null;for(const l of s){const{limiterIntersectionArea:a,viewportIntersectionArea:c}=l;if(a===i)return l;const f=c**2+a**2;f>o&&(o=f,r=l)}return r}class vt{name;config;_positioningFunctionCoordinates;_options;_cachedRect;_cachedAbsoluteRect;constructor(t,n){const i=t(n.targetRect,n.elementRect,n.viewportRect,n.limiterRect);if(!i)return;const{left:s,top:o,name:r,config:l}=i;this.name=r,this.config=l,this._positioningFunctionCoordinates={left:s,top:o},this._options=n}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const t=this._options.limiterRect;return t?t.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect?this._cachedRect:(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top),this._cachedRect)}get _absoluteRect(){return this._cachedAbsoluteRect?this._cachedAbsoluteRect:(this._cachedAbsoluteRect=this._rect.toAbsoluteRect(),this._cachedAbsoluteRect)}}function Sn(e){const t=e.parentNode;t&&t.removeChild(e)}function Vn(){const e=_.window.visualViewport;if(!e||!(L.isiOS||L.isSafari))return{left:0,top:0};const t=Math.max(Math.round(e.offsetLeft),0),n=Math.max(Math.round(e.offsetTop),0);return{left:t,top:n}}function Rn({target:e,viewportOffset:t=0,ancestorOffset:n=0,alignToTop:i,forceScroll:s}){const o=tt(e);let r=o,l=null;for(t=Me(t);r;){let a;r==o?a=gt(e):a=gt(l),Fe({parent:a,getRect:()=>$(e,r),alignToTop:i,ancestorOffset:n,forceScroll:s});let c=$(e,r);const f=$(a,r);if(c.height>f.height){const u=c.getIntersection(f);u&&(c=u)}if(ke({window:r,rect:c,viewportOffset:t,alignToTop:i,forceScroll:s}),r.parent!=r){if(l=r.frameElement,r=r.parent,!l)return}else r=null}}function ke({window:e,rect:t,alignToTop:n,forceScroll:i,viewportOffset:s}){const o=t.clone().moveBy(0,s.bottom),r=t.clone().moveBy(0,-s.top),l=new m(e).excludeScrollbarsAndBorders(),a=[r,o],c=n&&i,f=a.every(p=>l.contains(p));let{scrollX:u,scrollY:w}=e;const C=u,y=w;c?w-=l.top-t.top+s.top:f||(Bt(r,l)?w-=l.top-t.top+s.top:Pt(o,l)&&(n?w+=t.top-l.top-s.top:w+=t.bottom-l.bottom+s.bottom)),f||(Nt(t,l)?u-=l.left-t.left+s.left:Dt(t,l)&&(u+=t.right-l.right+s.right)),(u!=C||w!==y)&&e.scrollTo(u,w)}function Fe({parent:e,getRect:t,alignToTop:n,forceScroll:i,ancestorOffset:s=0,limiterElement:o}){const r=tt(e),l=n&&i;let a,c,f;const u=o||r.document.body;for(;e!=u;)c=t(),a=new m(e).excludeScrollbarsAndBorders(),f=a.contains(c),l?e.scrollTop-=a.top-c.top+s:f||(Bt(c,a)?e.scrollTop-=a.top-c.top+s:Pt(c,a)&&(n?e.scrollTop+=c.top-a.top-s:e.scrollTop+=c.bottom-a.bottom+s)),f||(Nt(c,a)?e.scrollLeft-=a.left-c.left+s:Dt(c,a)&&(e.scrollLeft+=c.right-a.right+s)),e=e.parentNode}function Pt(e,t){return e.bottom>t.bottom}function Bt(e,t){return e.top<t.top}function Nt(e,t){return e.left<t.left}function Dt(e,t){return e.right>t.right}function tt(e){return z(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function gt(e){if(z(e)){let t=e.commonAncestorContainer;return Z(t)&&(t=t.parentNode),t}else return e.parentNode}function $(e,t){const n=tt(e),i=new m(e);if(n===t)return i;{let s=n;for(;s!=t;){const o=s.frameElement,r=new m(o).excludeScrollbarsAndBorders();i.moveBy(r.left,r.top),s=s.parent}}return i}function Me(e){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:e}const Se={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},Ve={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},mt={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},g=Be(),Re=Object.fromEntries(Object.entries(g).map(([e,t])=>{let n;return t in mt?n=mt[t]:n=e.charAt(0).toUpperCase()+e.slice(1),[t,n]}));function N(e){let t;if(typeof e=="string"){if(t=g[e.toLowerCase()],!t)throw new d("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?g.alt:0)+(e.ctrlKey?g.ctrl:0)+(e.shiftKey?g.shift:0)+(e.metaKey?g.cmd:0);return t}function jt(e){return typeof e=="string"&&(e=Ne(e)),e.map(t=>typeof t=="string"?Pe(t):t).reduce((t,n)=>n+t,0)}function vn(e,t){let n=jt(e);const i=L.isMac||L.isiOS;return Object.entries(i?Se:Ve).reduce((r,[l,a])=>((n&g[l])!=0&&(n&=~g[l],r+=a),r),"")+(n?Re[n]:"")}function Pn(e){return e==g.arrowright||e==g.arrowleft||e==g.arrowup||e==g.arrowdown}function ve(e,t){const n=t==="ltr";switch(e){case g.arrowleft:return n?"left":"right";case g.arrowright:return n?"right":"left";case g.arrowup:return"up";case g.arrowdown:return"down"}}function Pe(e){if(e.endsWith("!"))return N(e.slice(0,-1));const t=N(e);return(L.isMac||L.isiOS)&&t==g.ctrl?g.cmd:t}function Bn(e,t){const n=ve(e,t);return n==="down"||n==="right"}function Be(){const e={pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){const n=String.fromCharCode(t);e[n.toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;return Object.assign(e,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),e}function Ne(e){return e.split("+").map(t=>t.trim())}const De=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig","ur","urd"];function bt(e){return De.includes(e)?"rtl":"ltr"}function je(e){return Array.isArray(e)?e:[e]}_.window.CKEDITOR_TRANSLATIONS||(_.window.CKEDITOR_TRANSLATIONS={});function Oe(e,t,n=1,i){if(typeof n!="number")throw new d("translation-service-quantity-not-a-number",null,{quantity:n});const s=i||_.window.CKEDITOR_TRANSLATIONS,o=$e(s);o===1&&(e=Object.keys(s)[0]);const r=t.id||t.string;if(o===0||!Ke(e,r,s))return n!==1?t.plural:t.string;const l=s[e].dictionary,a=s[e].getPluralForm||(u=>u===1?0:1),c=l[r];if(typeof c=="string")return c;const f=Number(a(n));return c[f]}function We(e){return Array.isArray(e)?e.reduce((t,n)=>Kt(t,n)):e}function Ke(e,t,n){return!!n[e]&&!!n[e].dictionary[t]}function $e(e){return Object.keys(e).length}class Nn{uiLanguage;uiLanguageDirection;contentLanguage;contentLanguageDirection;t;translations;constructor({uiLanguage:t="en",contentLanguage:n,translations:i}={}){this.uiLanguage=t,this.contentLanguage=n||this.uiLanguage,this.uiLanguageDirection=bt(this.uiLanguage),this.contentLanguageDirection=bt(this.contentLanguage),this.translations=We(i),this.t=(s,o)=>this._t(s,o)}_t(t,n=[]){n=je(n),typeof t=="string"&&(t={string:t});const s=!!t.plural?n[0]:1,o=Oe(this.uiLanguage,t,s,this.translations);return He(o,n)}}function He(e,t){return e.replace(/%(\d+)/g,(n,i)=>i<t.length?t[i]:n)}class Dn extends I(){_items;_itemMap;_idProperty;_bindToCollection;_bindToExternalToInternalMap;_bindToInternalToExternalMap;_skippedIndexesFromExternal;constructor(t={},n={}){super();const i=J(t);if(i||(n=t),this._items=[],this._itemMap=new Map,this._idProperty=n.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],i)for(const s of t)this._items.push(s),this._itemMap.set(this._getItemIdBeforeAdding(s),s)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(t,n){return this.addMany([t],n)}addMany(t,n){if(n===void 0)n=this._items.length;else if(n>this._items.length||n<0)throw new d("collection-add-item-invalid-index",this);let i=0;for(const s of t){const o=this._getItemIdBeforeAdding(s),r=n+i;this._items.splice(r,0,s),this._itemMap.set(o,s),this.fire("add",s,r),i++}return this.fire("change",{added:t,removed:[],index:n}),this}get(t){let n;if(typeof t=="string")n=this._itemMap.get(t);else if(typeof t=="number")n=this._items[t];else throw new d("collection-get-invalid-arg",this);return n||null}has(t){if(typeof t=="string")return this._itemMap.has(t);{const n=this._idProperty,i=t[n];return i&&this._itemMap.has(i)}}getIndex(t){let n;return typeof t=="string"?n=this._itemMap.get(t):n=t,n?this._items.indexOf(n):-1}remove(t){const[n,i]=this._remove(t);return this.fire("change",{added:[],removed:[n],index:i}),n}map(t,n){return this._items.map(t,n)}forEach(t,n){this._items.forEach(t,n)}find(t,n){return this._items.find(t,n)}filter(t,n){return this._items.filter(t,n)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const t=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:t,index:0})}bindTo(t){if(this._bindToCollection)throw new d("collection-bind-to-rebind",this);return this._bindToCollection=t,{as:n=>{this._setUpBindToBinding(i=>new n(i))},using:n=>{typeof n=="function"?this._setUpBindToBinding(n):this._setUpBindToBinding(i=>i[n])}}}_setUpBindToBinding(t){const n=this._bindToCollection,i=(s,o,r)=>{const l=n._bindToCollection==this,a=n._bindToInternalToExternalMap.get(o);if(l&&a)this._bindToExternalToInternalMap.set(o,a),this._bindToInternalToExternalMap.set(a,o);else{const c=t(o);if(!c){this._skippedIndexesFromExternal.push(r);return}let f=r;for(const u of this._skippedIndexesFromExternal)r>u&&f--;for(const u of n._skippedIndexesFromExternal)f>=u&&f++;this._bindToExternalToInternalMap.set(o,c),this._bindToInternalToExternalMap.set(c,o),this.add(c,f);for(let u=0;u<n._skippedIndexesFromExternal.length;u++)f<=n._skippedIndexesFromExternal[u]&&n._skippedIndexesFromExternal[u]++}};for(const s of n)i(null,s,n.getIndex(s));this.listenTo(n,"add",i),this.listenTo(n,"remove",(s,o,r)=>{const l=this._bindToExternalToInternalMap.get(o);l&&this.remove(l),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((a,c)=>(r<c&&a.push(c-1),r>c&&a.push(c),a),[])})}_getItemIdBeforeAdding(t){const n=this._idProperty;let i;if(n in t){if(i=t[n],typeof i!="string")throw new d("collection-add-invalid-id",this);if(this.get(i))throw new d("collection-add-item-already-exists",this)}else t[n]=i=X();return i}_remove(t){let n,i,s,o=!1;const r=this._idProperty;if(typeof t=="string"?(i=t,s=this._itemMap.get(i),o=!s,s&&(n=this._items.indexOf(s))):typeof t=="number"?(n=t,s=this._items[n],o=!s,s&&(i=s[r])):(s=t,i=s[r],n=this._items.indexOf(s),o=n==-1||!this._itemMap.get(i)),o)throw new d("collection-remove-404",this);this._items.splice(n,1),this._itemMap.delete(i);const l=this._bindToInternalToExternalMap.get(s);return this._bindToInternalToExternalMap.delete(s),this._bindToExternalToInternalMap.delete(l),this.fire("remove",s,n),[s,n]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function jn(e){const t=e.next();return t.done?null:t.value}class Ue extends Q(kt()){_elements=new Set;_externalViews=new Set;_blurTimeout=null;constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null)}get elements(){return Array.from(this._elements.values())}get externalViews(){return Array.from(this._externalViews.values())}add(t){if(wt(t))this._addElement(t);else if(_t(t))this._addView(t);else{if(!t.element)throw new d("focustracker-add-view-missing-element",{focusTracker:this,view:t});this._addElement(t.element)}}remove(t){wt(t)?this._removeElement(t):_t(t)?this._removeView(t):this._removeElement(t.element)}_addElement(t){if(this._elements.has(t))throw new d("focustracker-add-element-already-exist",this);this.listenTo(t,"focus",()=>{const n=this.externalViews.find(i=>Ge(t,i));n?this._focus(n.element):this._focus(t)},{useCapture:!0}),this.listenTo(t,"blur",()=>{this._blur()},{useCapture:!0}),this._elements.add(t)}_removeElement(t){this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t)),t===this.focusedElement&&this._blur()}_addView(t){t.element&&this._addElement(t.element),this.listenTo(t.focusTracker,"change:focusedElement",()=>{t.focusTracker.focusedElement?t.element&&this._focus(t.element):this._blur()}),this._externalViews.add(t)}_removeView(t){t.element&&this._removeElement(t.element),this.stopListening(t.focusTracker),this._externalViews.delete(t)}destroy(){this.stopListening(),this._elements.clear(),this._externalViews.clear(),this.isFocused=!1,this.focusedElement=null}_focus(t){this._clearBlurTimeout(),this.focusedElement=t,this.isFocused=!0}_blur(){this.elements.find(i=>i.contains(document.activeElement))||this.externalViews.find(i=>i.focusTracker.isFocused&&!i.focusTracker._blurTimeout)||(this._clearBlurTimeout(),this._blurTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0))}_clearBlurTimeout(){clearTimeout(this._blurTimeout),this._blurTimeout=null}}function _t(e){return"focusTracker"in e&&e.focusTracker instanceof Ue}function wt(e){return Et(e)}function Ge(e,t){return yt(e,t)?!0:!!t.focusTracker.externalViews.find(n=>yt(e,n))}function yt(e,t){return!!t.element&&t.element.contains(document.activeElement)&&e.contains(t.element)}class On{_listener;constructor(){this._listener=new(Q())}listenTo(t){this._listener.listenTo(t,"keydown",(n,i)=>{this._listener.fire("_keydown:"+N(i),i)})}set(t,n,i={}){const s=jt(t),o=i.priority;this._listener.listenTo(this._listener,"_keydown:"+s,(r,l)=>{i.filter&&!i.filter(l)||(n(l,()=>{l.preventDefault(),l.stopPropagation(),r.stop()}),r.return=!0)},{priority:o})}press(t){return!!this._listener.fire("_keydown:"+N(t),t)}stopListening(t){this._listener.stopListening(t)}destroy(){this.stopListening()}}function qe(e){const t=new Map;for(const n in e)t.set(n,e[n]);return t}function Wn(e){return J(e)?new Map(e):qe(e)}function Kn(e,t,n){const i=e.length,s=t.length;for(let o=i-1;o>=n;o--)e[o+s]=e[o];for(let o=0;o<s;o++)e[n+o]=t[o]}function $n(e,t){let n;function i(...s){i.cancel(),n=setTimeout(()=>e(...s),t)}return i.cancel=()=>{clearTimeout(n)},i}function Ye(e){try{if(!e.startsWith("ey"))return null;const t=atob(e.replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(t)}catch{return null}}function Xe(){const e=[];for(let t=0;t<256;t++){let n=t;for(let i=0;i<8;i++)n&1?n=3988292384^n>>>1:n=n>>>1;e[t]=n}return e}function Hn(e){const t=Array.isArray(e)?e:[e],n=Xe();let i=-1;const s=t.map(o=>Array.isArray(o)?o.join(""):String(o)).join("");for(let o=0;o<s.length;o++){const r=s.charCodeAt(o);i=i>>>8^n[(i^r)&255]}return i=(i^-1)>>>0,i.toString(16).padStart(8,"0")}function Un(e){const t=[{name:"address",isVoid:!1},{name:"article",isVoid:!1},{name:"aside",isVoid:!1},{name:"blockquote",isVoid:!1},{name:"details",isVoid:!1},{name:"dialog",isVoid:!1},{name:"dd",isVoid:!1},{name:"div",isVoid:!1},{name:"dl",isVoid:!1},{name:"dt",isVoid:!1},{name:"fieldset",isVoid:!1},{name:"figcaption",isVoid:!1},{name:"figure",isVoid:!1},{name:"footer",isVoid:!1},{name:"form",isVoid:!1},{name:"h1",isVoid:!1},{name:"h2",isVoid:!1},{name:"h3",isVoid:!1},{name:"h4",isVoid:!1},{name:"h5",isVoid:!1},{name:"h6",isVoid:!1},{name:"header",isVoid:!1},{name:"hgroup",isVoid:!1},{name:"hr",isVoid:!0},{name:"li",isVoid:!1},{name:"main",isVoid:!1},{name:"nav",isVoid:!1},{name:"ol",isVoid:!1},{name:"p",isVoid:!1},{name:"section",isVoid:!1},{name:"table",isVoid:!1},{name:"tbody",isVoid:!1},{name:"td",isVoid:!1},{name:"th",isVoid:!1},{name:"thead",isVoid:!1},{name:"tr",isVoid:!1},{name:"ul",isVoid:!1}],n=t.map(r=>r.name).join("|"),i=e.replace(new RegExp(`</?(${n})( .*?)?>`,"g"),`
|
|
3
|
+
Original error: ${n.name}: ${n.message}`:"";return e+o+r+l}function At(e,t){const n=It(e);return t?[e,t,n]:[e,n]}const se="47.4.0",gn=new Date(2026,0,14);if(globalThis.CKEDITOR_VERSION)throw new d("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=se;const A=Symbol("listeningTo"),G=Symbol("emitterId"),E=Symbol("delegations"),oe=I(Object);function I(e){if(!e)return oe;class t extends e{on(i,s,o){this.listenTo(this,i,s,o)}once(i,s,o){let r=!1;const l=(a,...c)=>{r||(r=!0,a.off(),s.call(this,a,...c))};this.listenTo(this,i,l,o)}off(i,s){this.stopListening(this,i,s)}listenTo(i,s,o,r={}){let l,a;this[A]||(this[A]={});const c=this[A];O(i)||Lt(i);const f=O(i);(l=c[f])||(l=c[f]={emitter:i,callbacks:{}}),(a=l.callbacks[s])||(a=l.callbacks[s]=[]),a.push(o),fe(this,i,s,o,r)}stopListening(i,s,o){const r=this[A];let l=i&&O(i);const a=r&&l?r[l]:void 0,c=a&&s?a.callbacks[s]:void 0;if(!(!r||i&&!a||s&&!c))if(o)W(this,i,s,o),c.indexOf(o)!==-1&&(c.length===1?delete a.callbacks[s]:W(this,i,s,o));else if(c){for(;o=c.pop();)W(this,i,s,o);delete a.callbacks[s]}else if(a){for(s in a.callbacks)this.stopListening(i,s);delete r[l]}else{for(l in r)this.stopListening(r[l].emitter);delete this[A]}}fire(i,...s){try{const o=i instanceof H?i:new H(this,i),r=o.name;let l=ae(this,r);if(o.path.push(this),l){l=l.slice();for(let c=0;c<l.length;c++){const f=l[c].callback;if(f.call(this,o,...s),o.off.called&&(delete o.off.called,this._removeEventListener(r,f)),o.stop.called)break}}const a=this[E];if(a){const c=a.get(r),f=a.get("*");c&<(c,o,s),f&<(f,o,s)}return o.return}catch(o){d.rethrowUnexpectedError(o,this)}}delegate(...i){return{to:(s,o)=>{this[E]||(this[E]=new Map),i.forEach(r=>{const l=this[E].get(r);l?l.set(s,o):this[E].set(r,new Map([[s,o]]))})}}}stopDelegating(i,s){if(this[E])if(!i)this[E].clear();else if(!s)this[E].delete(i);else{const o=this[E].get(i);o&&o.delete(s)}}_addEventListener(i,s,o){ce(this,i);const r=q(this,i),l=U.get(o.priority),a={callback:s,priority:l};for(const c of r)ee(c,a)}_removeEventListener(i,s){const o=q(this,i);for(const r of o)for(let l=0;l<r.length;l++)r[l].callback==s&&(r.splice(l,1),l--)}}return t}function re(e,t){const n=e[A];return n&&n[t]?n[t].emitter:null}function Lt(e,t){e[G]||(e[G]=t||X())}function O(e){return e[G]}function Ct(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function le(){return{callbacks:[],childEvents:[]}}function ce(e,t){const n=Ct(e);if(n[t])return;let i=t,s=null;const o=[];for(;i!==""&&!n[i];)n[i]=le(),o.push(n[i]),s&&n[i].childEvents.push(s),s=i,i=i.substr(0,i.lastIndexOf(":"));if(i!==""){for(const r of o)r.callbacks=n[i].callbacks.slice();n[i].childEvents.push(s)}}function q(e,t){const n=Ct(e)[t];if(!n)return[];let i=[n.callbacks];for(let s=0;s<n.childEvents.length;s++){const o=q(e,n.childEvents[s]);i=i.concat(o)}return i}function ae(e,t){if(!e._events)return null;let n=t;do{const i=e._events[n];if(i&&i.callbacks&&i.callbacks.length)return i.callbacks;const s=n.lastIndexOf(":");n=s>-1?n.substring(0,s):""}while(n);return null}function lt(e,t,n){for(let[i,s]of e){s?typeof s=="function"&&(s=s(t.name)):s=t.name;const o=new H(t.source,s);o.path=[...t.path],i.fire(o,...n)}}function fe(e,t,n,i,s){t._addEventListener?t._addEventListener(n,i,s):e._addEventListener.call(t,n,i,s)}function W(e,t,n,i){t._removeEventListener?t._removeEventListener(n,i):e._removeEventListener.call(t,n,i)}const S=Symbol("observableProperties"),R=Symbol("boundObservables"),V=Symbol("boundProperties"),x=Symbol("decoratedMethods"),ct=Symbol("decoratedOriginal"),ue=kt(I());function kt(e){if(!e)return ue;class t extends e{set(i,s){if(Ot(i)){Object.keys(i).forEach(r=>{this.set(r,i[r])},this);return}K(this);const o=this[S];if(i in this&&!o.has(i))throw new d("observable-set-cannot-override",this);Object.defineProperty(this,i,{enumerable:!0,configurable:!0,get(){return o.get(i)},set(r){const l=o.get(i);let a=this.fire(`set:${i}`,i,r,l);a===void 0&&(a=r),(l!==a||!o.has(i))&&(o.set(i,a),this.fire(`change:${i}`,i,a,l))}}),this[i]=s}bind(...i){if(!i.length||!at(i))throw new d("observable-bind-wrong-properties",this);if(new Set(i).size!==i.length)throw new d("observable-bind-duplicate-properties",this);K(this);const s=this[V];i.forEach(r=>{if(s.has(r))throw new d("observable-bind-rebind",this)});const o=new Map;return i.forEach(r=>{const l={property:r,to:[]};s.set(r,l),o.set(r,l)}),{to:de,toMany:he,_observable:this,_bindProperties:i,_to:[],_bindings:o}}unbind(...i){if(!this[S])return;const s=this[V],o=this[R];if(i.length){if(!at(i))throw new d("observable-unbind-wrong-properties",this);i.forEach(r=>{const l=s.get(r);l&&(l.to.forEach(([a,c])=>{const f=o.get(a),u=f[c];u.delete(l),u.size||delete f[c],Object.keys(f).length||(o.delete(a),this.stopListening(a,"change"))}),s.delete(r))})}else o.forEach((r,l)=>{this.stopListening(l,"change")}),o.clear(),s.clear()}decorate(i){K(this);const s=this[i];if(!s)throw new d("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:i});this.on(i,(o,r)=>{o.return=s.apply(this,r)}),this[i]=function(...o){return this.fire(i,o)},this[i][ct]=s,this[x]||(this[x]=[]),this[x].push(i)}stopListening(i,s,o){if(!i&&this[x]){for(const r of this[x])this[r]=this[r][ct];delete this[x]}super.stopListening(i,s,o)}[S];[x];[V];[R]}return t}function K(e){e[S]||(Object.defineProperty(e,S,{value:new Map}),Object.defineProperty(e,R,{value:new Map}),Object.defineProperty(e,V,{value:new Map}))}function de(...e){const t=ge(...e),n=Array.from(this._bindings.keys()),i=n.length;if(!t.callback&&t.to.length>1)throw new d("observable-bind-to-no-callback",this);if(i>1&&t.callback)throw new d("observable-bind-to-extra-callback",this);t.to.forEach(s=>{if(s.properties.length&&s.properties.length!==i)throw new d("observable-bind-to-properties-length",this);s.properties.length||(s.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),_e(this._observable,this._to),be(this),this._bindProperties.forEach(s=>{Ft(this._observable,s)})}function he(e,t,n){if(this._bindings.size>1)throw new d("observable-bind-to-many-not-one-binding",this);this.to(...pe(e,t),n)}function pe(e,t){const n=e.map(i=>[i,t]);return Array.prototype.concat.apply([],n)}function at(e){return e.every(t=>typeof t=="string")}function ge(...e){if(!e.length)throw new d("observable-bind-to-parse-error",null);const t={to:[]};let n;return typeof e[e.length-1]=="function"&&(t.callback=e.pop()),e.forEach(i=>{if(typeof i=="string")n.properties.push(i);else if(typeof i=="object")n={observable:i,properties:[]},t.to.push(n);else throw new d("observable-bind-to-parse-error",null)}),t}function me(e,t,n,i){const s=e[R],o=s.get(n),r=o||{};r[i]||(r[i]=new Set),r[i].add(t),o||s.set(n,r)}function be(e){let t;e._bindings.forEach((n,i)=>{e._to.forEach(s=>{t=s.properties[n.callback?0:e._bindProperties.indexOf(i)],n.to.push([s.observable,t]),me(e._observable,n,s.observable,t)})})}function Ft(e,t){const i=e[V].get(t);let s;i.callback?s=i.callback.apply(e,i.to.map(o=>o[0][o[1]])):(s=i.to[0],s=s[0][s[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=s:e.set(t,s)}function _e(e,t){t.forEach(n=>{const i=e[R];let s;i.get(n.observable)||e.listenTo(n.observable,"change",(o,r)=>{s=i.get(n.observable)[r],s&&s.forEach(l=>{Ft(e,l.property)})})})}class mn{_replacedElements;constructor(){this._replacedElements=[]}replace(t,n){this._replacedElements.push({element:t,newElement:n}),t.style.display="none",n&&t.parentNode.insertBefore(n,t.nextSibling)}restore(){this._replacedElements.forEach(({element:t,newElement:n})=>{t.style.display="",n&&n.remove()}),this._replacedElements=[]}}function bn(e){let t=0;for(const n of e)t++;return t}function _n(e,t){const n=Math.min(e.length,t.length);for(let i=0;i<n;i++)if(e[i]!=t[i])return i;return e.length==t.length?"same":e.length<t.length?"prefix":"extension"}function J(e){return!!(e&&e[Symbol.iterator])}function wn(e,t,n={},i=[]){const s=n&&n.xmlns,o=s?e.createElementNS(s,t):e.createElement(t);for(const r in n)o.setAttribute(r,n[r]);(nt(i)||!J(i))&&(i=[i]);for(let r of i)nt(r)&&(r=e.createTextNode(r)),o.appendChild(r);return o}class yn{_config;constructor(t,n){this._config=Object.create(null),n&&this.define(ft(n)),t&&this._setObjectToTarget(this._config,t)}set(t,n){this._setToTarget(this._config,t,n)}define(t,n){this._setToTarget(this._config,t,n,!0)}get(t){return this._getFromSource(this._config,t)}*names(){for(const t of Object.keys(this._config))yield t}_setToTarget(t,n,i,s=!1){if(M(n)){this._setObjectToTarget(t,n,s);return}const o=n.split(".");n=o.pop();for(const r of o)M(t[r])||(t[r]=Object.create(null)),t=t[r];if(M(i)){M(t[n])||(t[n]=Object.create(null)),t=t[n],this._setObjectToTarget(t,i,s);return}s&&typeof t[n]<"u"||(t[n]=i)}_getFromSource(t,n){const i=n.split(".");n=i.pop();for(const s of i){if(!M(t[s])){t=null;break}t=t[s]}return t?ft(t[n]):void 0}_setObjectToTarget(t,n,i){Object.keys(n).forEach(s=>{this._setToTarget(t,s,n[s],i)})}}function ft(e){return Wt(e,we)}function we(e){return Et(e)||typeof e=="function"?e:void 0}function ut(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function B(e){const t=Object.prototype.toString.apply(e);return t=="[object Window]"||t=="[object global]"}const ye=Q(I());function Q(e){if(!e)return ye;class t extends e{listenTo(i,s,o,r={}){if(ut(i)||B(i)||i instanceof _.window.EventTarget){const l={capture:!!r.useCapture,passive:!!r.usePassive},a=this._getProxyEmitter(i,l)||new Ee(i,l);this.listenTo(a,s,o,r)}else super.listenTo(i,s,o,r)}stopListening(i,s,o){if(ut(i)||B(i)||i instanceof _.window.EventTarget){const r=this._getAllProxyEmitters(i);for(const l of r)this.stopListening(l,s,o)}else super.stopListening(i,s,o)}_getProxyEmitter(i,s){return re(this,Mt(i,s))}_getAllProxyEmitters(i){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map(s=>this._getProxyEmitter(i,s)).filter(s=>!!s)}}return t}class Ee extends I(){_domNode;_options;constructor(t,n){super(),Lt(this,Mt(t,n)),this._domNode=t,this._options=n}_domListeners;attach(t){if(this._domListeners&&this._domListeners[t])return;const n=this._createDomListener(t);this._domNode.addEventListener(t,n,this._options),this._domListeners||(this._domListeners={}),this._domListeners[t]=n}detach(t){let n;this._domListeners[t]&&(!(n=this._events[t])||!n.callbacks.length)&&this._domListeners[t].removeListener()}_addEventListener(t,n,i){this.attach(t),I().prototype._addEventListener.call(this,t,n,i)}_removeEventListener(t,n){I().prototype._removeEventListener.call(this,t,n),this.detach(t)}_createDomListener(t){const n=i=>{this.fire(t,i)};return n.removeListener=()=>{this._domNode.removeEventListener(t,n,this._options),delete this._domListeners[t]},n}}function Te(e){return e["data-ck-expando"]||(e["data-ck-expando"]=X())}function Mt(e,t){let n=Te(e);for(const i of Object.keys(t).sort())t[i]&&(n+="-"+i);return n}function En(e){const t=[];let n=e;for(;n&&n.nodeType!=Node.DOCUMENT_NODE;)t.unshift(n),n=n.parentNode;return t}function Tn(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function St(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function xn(e){if(!e.target)return null;const t=e.target.ownerDocument,n=e.clientX,i=e.clientY;let s=null;return t.caretRangeFromPoint&&t.caretRangeFromPoint(n,i)?s=t.caretRangeFromPoint(n,i):e.rangeParent&&(s=t.createRange(),s.setStart(e.rangeParent,e.rangeOffset),s.collapse(!0)),s}function Vt(e){return!e||!e.parentNode||e.offsetParent===_.document.body?null:e.offsetParent}function Z(e){return Object.prototype.toString.call(e)=="[object Text]"}function z(e){return Object.prototype.toString.apply(e)=="[object Range]"}const Rt=["top","right","bottom","left","width","height"];class m{top;right;bottom;left;width;height;_source;constructor(t){const n=z(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),Y(t)||n)if(n){const i=m.getDomRangeRects(t);v(this,m.getBoundingRect(i))}else v(this,t.getBoundingClientRect());else if(B(t)){const{innerWidth:i,innerHeight:s}=t;v(this,{top:0,right:i,bottom:s,left:0,width:i,height:s})}else v(this,t)}clone(){return new m(this)}moveTo(t,n){return this.top=n,this.right=t+this.width,this.bottom=n+this.height,this.left=t,this}moveBy(t,n){return this.top+=n,this.right+=t,this.left+=t,this.bottom+=n,this}getIntersection(t){const n={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left),width:0,height:0};if(n.width=n.right-n.left,n.height=n.bottom-n.top,n.width<0||n.height<0)return null;{const i=new m(n);return i._source=this._source,i}}getIntersectionArea(t){const n=this.getIntersection(t);return n?n.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let n=this.clone();if(dt(t))return n;let i=t,s=t.parentNode||t.commonAncestorContainer,o;for(;s&&!dt(s);){const r=xe(s)==="visible";i instanceof HTMLElement&&ht(i)==="absolute"&&(o=i);const l=ht(s);if(r||o&&(l==="relative"&&r||l!=="relative")){i=s,s=s.parentNode;continue}const a=new m(s),c=n.getIntersection(a);if(c)c.getArea()<n.getArea()&&(n=c);else return null;i=s,s=s.parentNode}return n}isEqual(t){for(const n of Rt)if(this[n]!==t[n])return!1;return!0}contains(t){const n=this.getIntersection(t);return!!(n&&n.isEqual(t))}toAbsoluteRect(){const{scrollX:t,scrollY:n}=_.window,i=this.clone().moveBy(t,n);if(Y(i._source)){const s=Vt(i._source);s&&Ie(i,s)}return i}excludeScrollbarsAndBorders(){const t=this._source;let n,i,s;if(B(t))n=t.innerWidth-t.document.documentElement.clientWidth,i=t.innerHeight-t.document.documentElement.clientHeight,s=t.getComputedStyle(t.document.documentElement).direction;else{const o=St(t);n=t.offsetWidth-t.clientWidth-o.left-o.right,i=t.offsetHeight-t.clientHeight-o.top-o.bottom,s=t.ownerDocument.defaultView.getComputedStyle(t).direction,this.left+=o.left,this.top+=o.top,this.right-=o.right,this.bottom-=o.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=n,s==="ltr"?this.right-=n:this.left+=n,this.height-=i,this.bottom-=i,this}static getDomRangeRects(t){const n=[],i=Array.from(t.getClientRects());if(i.length)for(const s of i)n.push(new m(s));else{let s=t.startContainer;Z(s)&&(s=s.parentNode);const o=new m(s.getBoundingClientRect());o.right=o.left,o.width=0,n.push(o)}return n}static getBoundingRect(t){const n={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let i=0;for(const s of t)i++,n.left=Math.min(n.left,s.left),n.top=Math.min(n.top,s.top),n.right=Math.max(n.right,s.right),n.bottom=Math.max(n.bottom,s.bottom);return i==0?null:(n.width=n.right-n.left,n.height=n.bottom-n.top,new m(n))}}function v(e,t){for(const n of Rt)e[n]=t[n]}function dt(e){return Y(e)?e===e.ownerDocument.body:!1}function Y(e){return e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.getBoundingClientRect=="function"}function ht(e){return e instanceof HTMLElement?e.ownerDocument.defaultView.getComputedStyle(e).position:"static"}function xe(e){return e instanceof HTMLElement?e.ownerDocument.defaultView.getComputedStyle(e).overflow:"visible"}function Ie(e,t){const n=new m(t),i=St(t);let s=0,o=0;s-=n.left,o-=n.top,s+=t.scrollLeft,o+=t.scrollTop,s-=i.left,o-=i.top,e.moveBy(s,o)}class h{_element;_callback;static _observerInstance=null;static _elementCallbacks=null;constructor(t,n){h._observerInstance||h._createObserver(),this._element=t,this._callback=n,h._addElementCallback(t,n),h._observerInstance.observe(t)}get element(){return this._element}destroy(){h._deleteElementCallback(this._element,this._callback)}static _addElementCallback(t,n){h._elementCallbacks||(h._elementCallbacks=new Map);let i=h._elementCallbacks.get(t);i||(i=new Set,h._elementCallbacks.set(t,i)),i.add(n)}static _deleteElementCallback(t,n){const i=h._getElementCallbacks(t);i&&(i.delete(n),i.size||(h._elementCallbacks.delete(t),h._observerInstance.unobserve(t))),h._elementCallbacks&&!h._elementCallbacks.size&&(h._observerInstance=null,h._elementCallbacks=null)}static _getElementCallbacks(t){return h._elementCallbacks?h._elementCallbacks.get(t):null}static _createObserver(){h._observerInstance=new _.window.ResizeObserver(t=>{for(const n of t){const i=h._getElementCallbacks(n.target);if(i)for(const s of i)s(n)}})}}function In(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function An(e){return t=>t+e}function Ln(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Cn(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function kn(e){return e&&e.nodeType===Node.COMMENT_NODE}function Fn(e){try{_.document.createAttribute(e)}catch{return!1}return!0}function Ae(e){return e?Z(e)?Ae(e.parentElement):e.getClientRects?!!e.getClientRects().length:!1:!1}function Mn({element:e,target:t,positions:n,limiter:i,fitInViewport:s,viewportOffsetConfig:o}){it(t)&&(t=t()),it(i)&&(i=i());const r=Vt(e),l=Le(o),a=new m(e),c=pt(t,l);let f;if(!c||!l.getIntersection(c))return null;const u={targetRect:c,elementRect:a,positionedElementAncestor:r,viewportRect:l};if(!i&&!s)f=new vt(n[0],u);else{if(i){const w=pt(i,l);w&&(u.limiterRect=w)}f=Ce(n,u)}return f}function pt(e,t){const n=new m(e).getVisible();return n?n.getIntersection(t):null}function Le(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new m(_.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t.left+=e.left,t.right-=e.right,t.width-=e.left+e.right,t}function Ce(e,t){const{elementRect:n}=t,i=n.getArea(),s=e.map(l=>new vt(l,t)).filter(l=>!!l.name);let o=0,r=null;for(const l of s){const{limiterIntersectionArea:a,viewportIntersectionArea:c}=l;if(a===i)return l;const f=c**2+a**2;f>o&&(o=f,r=l)}return r}class vt{name;config;_positioningFunctionCoordinates;_options;_cachedRect;_cachedAbsoluteRect;constructor(t,n){const i=t(n.targetRect,n.elementRect,n.viewportRect,n.limiterRect);if(!i)return;const{left:s,top:o,name:r,config:l}=i;this.name=r,this.config=l,this._positioningFunctionCoordinates={left:s,top:o},this._options=n}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const t=this._options.limiterRect;return t?t.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect?this._cachedRect:(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top),this._cachedRect)}get _absoluteRect(){return this._cachedAbsoluteRect?this._cachedAbsoluteRect:(this._cachedAbsoluteRect=this._rect.toAbsoluteRect(),this._cachedAbsoluteRect)}}function Sn(e){const t=e.parentNode;t&&t.removeChild(e)}function Vn(){const e=_.window.visualViewport;if(!e||!(L.isiOS||L.isSafari))return{left:0,top:0};const t=Math.max(Math.round(e.offsetLeft),0),n=Math.max(Math.round(e.offsetTop),0);return{left:t,top:n}}function Rn({target:e,viewportOffset:t=0,ancestorOffset:n=0,alignToTop:i,forceScroll:s}){const o=tt(e);let r=o,l=null;for(t=Me(t);r;){let a;r==o?a=gt(e):a=gt(l),Fe({parent:a,getRect:()=>$(e,r),alignToTop:i,ancestorOffset:n,forceScroll:s});let c=$(e,r);const f=$(a,r);if(c.height>f.height){const u=c.getIntersection(f);u&&(c=u)}if(ke({window:r,rect:c,viewportOffset:t,alignToTop:i,forceScroll:s}),r.parent!=r){if(l=r.frameElement,r=r.parent,!l)return}else r=null}}function ke({window:e,rect:t,alignToTop:n,forceScroll:i,viewportOffset:s}){const o=t.clone().moveBy(0,s.bottom),r=t.clone().moveBy(0,-s.top),l=new m(e).excludeScrollbarsAndBorders(),a=[r,o],c=n&&i,f=a.every(p=>l.contains(p));let{scrollX:u,scrollY:w}=e;const C=u,y=w;c?w-=l.top-t.top+s.top:f||(Bt(r,l)?w-=l.top-t.top+s.top:Pt(o,l)&&(n?w+=t.top-l.top-s.top:w+=t.bottom-l.bottom+s.bottom)),f||(Nt(t,l)?u-=l.left-t.left+s.left:Dt(t,l)&&(u+=t.right-l.right+s.right)),(u!=C||w!==y)&&e.scrollTo(u,w)}function Fe({parent:e,getRect:t,alignToTop:n,forceScroll:i,ancestorOffset:s=0,limiterElement:o}){const r=tt(e),l=n&&i;let a,c,f;const u=o||r.document.body;for(;e!=u;)c=t(),a=new m(e).excludeScrollbarsAndBorders(),f=a.contains(c),l?e.scrollTop-=a.top-c.top+s:f||(Bt(c,a)?e.scrollTop-=a.top-c.top+s:Pt(c,a)&&(n?e.scrollTop+=c.top-a.top-s:e.scrollTop+=c.bottom-a.bottom+s)),f||(Nt(c,a)?e.scrollLeft-=a.left-c.left+s:Dt(c,a)&&(e.scrollLeft+=c.right-a.right+s)),e=e.parentNode}function Pt(e,t){return e.bottom>t.bottom}function Bt(e,t){return e.top<t.top}function Nt(e,t){return e.left<t.left}function Dt(e,t){return e.right>t.right}function tt(e){return z(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function gt(e){if(z(e)){let t=e.commonAncestorContainer;return Z(t)&&(t=t.parentNode),t}else return e.parentNode}function $(e,t){const n=tt(e),i=new m(e);if(n===t)return i;{let s=n;for(;s!=t;){const o=s.frameElement,r=new m(o).excludeScrollbarsAndBorders();i.moveBy(r.left,r.top),s=s.parent}}return i}function Me(e){return typeof e=="number"?{top:e,bottom:e,left:e,right:e}:e}const Se={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},Ve={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},mt={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},g=Be(),Re=Object.fromEntries(Object.entries(g).map(([e,t])=>{let n;return t in mt?n=mt[t]:n=e.charAt(0).toUpperCase()+e.slice(1),[t,n]}));function N(e){let t;if(typeof e=="string"){if(t=g[e.toLowerCase()],!t)throw new d("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?g.alt:0)+(e.ctrlKey?g.ctrl:0)+(e.shiftKey?g.shift:0)+(e.metaKey?g.cmd:0);return t}function jt(e){return typeof e=="string"&&(e=Ne(e)),e.map(t=>typeof t=="string"?Pe(t):t).reduce((t,n)=>n+t,0)}function vn(e,t){let n=jt(e);const i=L.isMac||L.isiOS;return Object.entries(i?Se:Ve).reduce((r,[l,a])=>((n&g[l])!=0&&(n&=~g[l],r+=a),r),"")+(n?Re[n]:"")}function Pn(e){return e==g.arrowright||e==g.arrowleft||e==g.arrowup||e==g.arrowdown}function ve(e,t){const n=t==="ltr";switch(e){case g.arrowleft:return n?"left":"right";case g.arrowright:return n?"right":"left";case g.arrowup:return"up";case g.arrowdown:return"down"}}function Pe(e){if(e.endsWith("!"))return N(e.slice(0,-1));const t=N(e);return(L.isMac||L.isiOS)&&t==g.ctrl?g.cmd:t}function Bn(e,t){const n=ve(e,t);return n==="down"||n==="right"}function Be(){const e={pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){const n=String.fromCharCode(t);e[n.toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;return Object.assign(e,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),e}function Ne(e){return e.split("+").map(t=>t.trim())}const De=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig","ur","urd"];function bt(e){return De.includes(e)?"rtl":"ltr"}function je(e){return Array.isArray(e)?e:[e]}_.window.CKEDITOR_TRANSLATIONS||(_.window.CKEDITOR_TRANSLATIONS={});function Oe(e,t,n=1,i){if(typeof n!="number")throw new d("translation-service-quantity-not-a-number",null,{quantity:n});const s=i||_.window.CKEDITOR_TRANSLATIONS,o=$e(s);o===1&&(e=Object.keys(s)[0]);const r=t.id||t.string;if(o===0||!Ke(e,r,s))return n!==1?t.plural:t.string;const l=s[e].dictionary,a=s[e].getPluralForm||(u=>u===1?0:1),c=l[r];if(typeof c=="string")return c;const f=Number(a(n));return c[f]}function We(e){return Array.isArray(e)?e.reduce((t,n)=>Kt(t,n)):e}function Ke(e,t,n){return!!n[e]&&!!n[e].dictionary[t]}function $e(e){return Object.keys(e).length}class Nn{uiLanguage;uiLanguageDirection;contentLanguage;contentLanguageDirection;t;translations;constructor({uiLanguage:t="en",contentLanguage:n,translations:i}={}){this.uiLanguage=t,this.contentLanguage=n||this.uiLanguage,this.uiLanguageDirection=bt(this.uiLanguage),this.contentLanguageDirection=bt(this.contentLanguage),this.translations=We(i),this.t=(s,o)=>this._t(s,o)}_t(t,n=[]){n=je(n),typeof t=="string"&&(t={string:t});const s=!!t.plural?n[0]:1,o=Oe(this.uiLanguage,t,s,this.translations);return He(o,n)}}function He(e,t){return e.replace(/%(\d+)/g,(n,i)=>i<t.length?t[i]:n)}class Dn extends I(){_items;_itemMap;_idProperty;_bindToCollection;_bindToExternalToInternalMap;_bindToInternalToExternalMap;_skippedIndexesFromExternal;constructor(t={},n={}){super();const i=J(t);if(i||(n=t),this._items=[],this._itemMap=new Map,this._idProperty=n.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],i)for(const s of t)this._items.push(s),this._itemMap.set(this._getItemIdBeforeAdding(s),s)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(t,n){return this.addMany([t],n)}addMany(t,n){if(n===void 0)n=this._items.length;else if(n>this._items.length||n<0)throw new d("collection-add-item-invalid-index",this);let i=0;for(const s of t){const o=this._getItemIdBeforeAdding(s),r=n+i;this._items.splice(r,0,s),this._itemMap.set(o,s),this.fire("add",s,r),i++}return this.fire("change",{added:t,removed:[],index:n}),this}get(t){let n;if(typeof t=="string")n=this._itemMap.get(t);else if(typeof t=="number")n=this._items[t];else throw new d("collection-get-invalid-arg",this);return n||null}has(t){if(typeof t=="string")return this._itemMap.has(t);{const n=this._idProperty,i=t[n];return i&&this._itemMap.has(i)}}getIndex(t){let n;return typeof t=="string"?n=this._itemMap.get(t):n=t,n?this._items.indexOf(n):-1}remove(t){const[n,i]=this._remove(t);return this.fire("change",{added:[],removed:[n],index:i}),n}map(t,n){return this._items.map(t,n)}forEach(t,n){this._items.forEach(t,n)}find(t,n){return this._items.find(t,n)}filter(t,n){return this._items.filter(t,n)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const t=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:t,index:0})}bindTo(t){if(this._bindToCollection)throw new d("collection-bind-to-rebind",this);return this._bindToCollection=t,{as:n=>{this._setUpBindToBinding(i=>new n(i))},using:n=>{typeof n=="function"?this._setUpBindToBinding(n):this._setUpBindToBinding(i=>i[n])}}}_setUpBindToBinding(t){const n=this._bindToCollection,i=(s,o,r)=>{const l=n._bindToCollection==this,a=n._bindToInternalToExternalMap.get(o);if(l&&a)this._bindToExternalToInternalMap.set(o,a),this._bindToInternalToExternalMap.set(a,o);else{const c=t(o);if(!c){this._skippedIndexesFromExternal.push(r);return}let f=r;for(const u of this._skippedIndexesFromExternal)r>u&&f--;for(const u of n._skippedIndexesFromExternal)f>=u&&f++;this._bindToExternalToInternalMap.set(o,c),this._bindToInternalToExternalMap.set(c,o),this.add(c,f);for(let u=0;u<n._skippedIndexesFromExternal.length;u++)f<=n._skippedIndexesFromExternal[u]&&n._skippedIndexesFromExternal[u]++}};for(const s of n)i(null,s,n.getIndex(s));this.listenTo(n,"add",i),this.listenTo(n,"remove",(s,o,r)=>{const l=this._bindToExternalToInternalMap.get(o);l&&this.remove(l),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((a,c)=>(r<c&&a.push(c-1),r>c&&a.push(c),a),[])})}_getItemIdBeforeAdding(t){const n=this._idProperty;let i;if(n in t){if(i=t[n],typeof i!="string")throw new d("collection-add-invalid-id",this);if(this.get(i))throw new d("collection-add-item-already-exists",this)}else t[n]=i=X();return i}_remove(t){let n,i,s,o=!1;const r=this._idProperty;if(typeof t=="string"?(i=t,s=this._itemMap.get(i),o=!s,s&&(n=this._items.indexOf(s))):typeof t=="number"?(n=t,s=this._items[n],o=!s,s&&(i=s[r])):(s=t,i=s[r],n=this._items.indexOf(s),o=n==-1||!this._itemMap.get(i)),o)throw new d("collection-remove-404",this);this._items.splice(n,1),this._itemMap.delete(i);const l=this._bindToInternalToExternalMap.get(s);return this._bindToInternalToExternalMap.delete(s),this._bindToExternalToInternalMap.delete(l),this.fire("remove",s,n),[s,n]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function jn(e){const t=e.next();return t.done?null:t.value}class Ue extends Q(kt()){_elements=new Set;_externalViews=new Set;_blurTimeout=null;constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null)}get elements(){return Array.from(this._elements.values())}get externalViews(){return Array.from(this._externalViews.values())}add(t){if(wt(t))this._addElement(t);else if(_t(t))this._addView(t);else{if(!t.element)throw new d("focustracker-add-view-missing-element",{focusTracker:this,view:t});this._addElement(t.element)}}remove(t){wt(t)?this._removeElement(t):_t(t)?this._removeView(t):this._removeElement(t.element)}_addElement(t){if(this._elements.has(t))throw new d("focustracker-add-element-already-exist",this);this.listenTo(t,"focus",()=>{const n=this.externalViews.find(i=>Ge(t,i));n?this._focus(n.element):this._focus(t)},{useCapture:!0}),this.listenTo(t,"blur",()=>{this._blur()},{useCapture:!0}),this._elements.add(t)}_removeElement(t){this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t)),t===this.focusedElement&&this._blur()}_addView(t){t.element&&this._addElement(t.element),this.listenTo(t.focusTracker,"change:focusedElement",()=>{t.focusTracker.focusedElement?t.element&&this._focus(t.element):this._blur()}),this._externalViews.add(t)}_removeView(t){t.element&&this._removeElement(t.element),this.stopListening(t.focusTracker),this._externalViews.delete(t)}destroy(){this.stopListening(),this._elements.clear(),this._externalViews.clear(),this.isFocused=!1,this.focusedElement=null}_focus(t){this._clearBlurTimeout(),this.focusedElement=t,this.isFocused=!0}_blur(){this.elements.find(i=>i.contains(document.activeElement))||this.externalViews.find(i=>i.focusTracker.isFocused&&!i.focusTracker._blurTimeout)||(this._clearBlurTimeout(),this._blurTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0))}_clearBlurTimeout(){clearTimeout(this._blurTimeout),this._blurTimeout=null}}function _t(e){return"focusTracker"in e&&e.focusTracker instanceof Ue}function wt(e){return Et(e)}function Ge(e,t){return yt(e,t)?!0:!!t.focusTracker.externalViews.find(n=>yt(e,n))}function yt(e,t){return!!t.element&&t.element.contains(document.activeElement)&&e.contains(t.element)}class On{_listener;constructor(){this._listener=new(Q())}listenTo(t){this._listener.listenTo(t,"keydown",(n,i)=>{this._listener.fire("_keydown:"+N(i),i)})}set(t,n,i={}){const s=jt(t),o=i.priority;this._listener.listenTo(this._listener,"_keydown:"+s,(r,l)=>{i.filter&&!i.filter(l)||(n(l,()=>{l.preventDefault(),l.stopPropagation(),r.stop()}),r.return=!0)},{priority:o})}press(t){return!!this._listener.fire("_keydown:"+N(t),t)}stopListening(t){this._listener.stopListening(t)}destroy(){this.stopListening()}}function qe(e){const t=new Map;for(const n in e)t.set(n,e[n]);return t}function Wn(e){return J(e)?new Map(e):qe(e)}function Kn(e,t,n){const i=e.length,s=t.length;for(let o=i-1;o>=n;o--)e[o+s]=e[o];for(let o=0;o<s;o++)e[n+o]=t[o]}function $n(e,t){let n;function i(...s){i.cancel(),n=setTimeout(()=>e(...s),t)}return i.cancel=()=>{clearTimeout(n)},i}function Ye(e){try{if(!e.startsWith("ey"))return null;const t=atob(e.replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(t)}catch{return null}}function Xe(){const e=[];for(let t=0;t<256;t++){let n=t;for(let i=0;i<8;i++)n&1?n=3988292384^n>>>1:n=n>>>1;e[t]=n}return e}function Hn(e){const t=Array.isArray(e)?e:[e],n=Xe();let i=-1;const s=t.map(o=>Array.isArray(o)?o.join(""):String(o)).join("");for(let o=0;o<s.length;o++){const r=s.charCodeAt(o);i=i>>>8^n[(i^r)&255]}return i=(i^-1)>>>0,i.toString(16).padStart(8,"0")}function Un(e){const t=[{name:"address",isVoid:!1},{name:"article",isVoid:!1},{name:"aside",isVoid:!1},{name:"blockquote",isVoid:!1},{name:"details",isVoid:!1},{name:"dialog",isVoid:!1},{name:"dd",isVoid:!1},{name:"div",isVoid:!1},{name:"dl",isVoid:!1},{name:"dt",isVoid:!1},{name:"fieldset",isVoid:!1},{name:"figcaption",isVoid:!1},{name:"figure",isVoid:!1},{name:"footer",isVoid:!1},{name:"form",isVoid:!1},{name:"h1",isVoid:!1},{name:"h2",isVoid:!1},{name:"h3",isVoid:!1},{name:"h4",isVoid:!1},{name:"h5",isVoid:!1},{name:"h6",isVoid:!1},{name:"header",isVoid:!1},{name:"hgroup",isVoid:!1},{name:"hr",isVoid:!0},{name:"li",isVoid:!1},{name:"main",isVoid:!1},{name:"nav",isVoid:!1},{name:"ol",isVoid:!1},{name:"p",isVoid:!1},{name:"section",isVoid:!1},{name:"table",isVoid:!1},{name:"tbody",isVoid:!1},{name:"td",isVoid:!1},{name:"th",isVoid:!1},{name:"thead",isVoid:!1},{name:"tr",isVoid:!1},{name:"ul",isVoid:!1}],n=t.map(r=>r.name).join("|"),i=e.replace(new RegExp(`</?(${n})( .*?)?>`,"g"),`
|
|
4
4
|
$&
|
|
5
5
|
`).replace(/<br[^>]*>/g,`$&
|
|
6
6
|
`).split(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Plugin as P}from"../../../../../@ckeditor_ckeditor5-core@47.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{MouseObserver as F,PointerObserver as q,ModelTreeWalker as G}from"../../../../../@ckeditor_ckeditor5-engine@47.3.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Delete as N}from"../../../../../@ckeditor_ckeditor5-typing@47.3.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{keyCodes as k,env as C,getLocalizedArrowKeyCodeDirection as Y,compareArrays as A,logWarning as X,CKEditorError as M,isForwardArrowKeyCode as J,getRangeFromMouseEvent as Q,global as x,DomEmitterMixin as Z,toArray as L,Rect as b,ObservableMixin as B,EmitterMixin as ee}from"../../../../../@ckeditor_ckeditor5-utils@47.3.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconReturnArrow as te,IconDragHandle as ie}from"../../../../../@ckeditor_ckeditor5-icons@47.3.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ContextualBalloon as oe,ToolbarView as ne,BalloonPanelView as se,IconView as re,Template as R,View as le}from"../../../../../@ckeditor_ckeditor5-ui@47.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{Enter as ce}from"../../../../../@ckeditor_ckeditor5-enter@47.3.0/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{throttle as ae}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/throttle.js";class de extends ee(){_stack=[];add(e,t){const i=this._stack,o=i[0];this._insertDescriptor(e);const n=i[0];o!==n&&!T(o,n)&&this.fire("change:top",{oldDescriptor:o,newDescriptor:n,writer:t})}remove(e,t){const i=this._stack,o=i[0];this._removeDescriptor(e);const n=i[0];o!==n&&!T(o,n)&&this.fire("change:top",{oldDescriptor:o,newDescriptor:n,writer:t})}_insertDescriptor(e){const t=this._stack,i=t.findIndex(n=>n.id===e.id);if(T(e,t[i]))return;i>-1&&t.splice(i,1);let o=0;for(;t[o]&&he(t[o],e);)o++;t.splice(o,0,e)}_removeDescriptor(e){const t=this._stack,i=t.findIndex(o=>o.id===e);i>-1&&t.splice(i,1)}}function T(s,e){return s&&e&&s.priority==e.priority&&S(s.classes)==S(e.classes)}function he(s,e){return s.priority>e.priority?!0:s.priority<e.priority?!1:S(s.classes)>S(e.classes)}function S(s){return Array.isArray(s)?s.sort().join(","):s}const ue="ck-widget",z="ck-widget_selected";function f(s){return s.is("element")?!!s.getCustomProperty("widget"):!1}function nt(s,e,t={}){if(!s.is("containerElement"))throw new M("widget-to-widget-wrong-element-type",null,{element:s});return e.setAttribute("contenteditable","false",s),e.addClass(ue,s),e.setCustomProperty("widget",!0,s),s.getFillerOffset=we,e.setCustomProperty("widgetLabel",[],s),t.label&&pe(s,t.label),t.hasSelectionHandle&&_e(s,e),K(s,e),s}function ge(s,e,t){if(e.classes&&t.addClass(L(e.classes),s),e.attributes)for(const i in e.attributes)t.setAttribute(i,e.attributes[i],s)}function fe(s,e,t){if(e.classes&&t.removeClass(L(e.classes),s),e.attributes)for(const i in e.attributes)t.removeAttribute(i,s)}function K(s,e,t=ge,i=fe){const o=new de;o.on("change:top",(l,c)=>{c.oldDescriptor&&i(s,c.oldDescriptor,c.writer),c.newDescriptor&&t(s,c.newDescriptor,c.writer)});const n=(l,c,a)=>o.add(c,a),r=(l,c,a)=>o.remove(c,a);e.setCustomProperty("addHighlight",n,s),e.setCustomProperty("removeHighlight",r,s)}function pe(s,e){s.getCustomProperty("widgetLabel").push(e)}function me(s){return s.getCustomProperty("widgetLabel").reduce((t,i)=>typeof i=="function"?t?t+". "+i():i():t?t+". "+i:i,"")}function st(s,e,t={}){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],s),t.withAriaRole!==!1&&e.setAttribute("role","textbox",s),s.isReadOnly||e.setAttribute("tabindex","-1",s),t.label&&e.setAttribute("aria-label",t.label,s),e.setAttribute("contenteditable",s.isReadOnly?"false":"true",s),s.on("change:isReadOnly",(i,o,n)=>{e.setAttribute("contenteditable",n?"false":"true",s),n?e.removeAttribute("tabindex",s):e.setAttribute("tabindex","-1",s)}),s.on("change:isFocused",(i,o,n)=>{n?e.addClass("ck-editor__nested-editable_focused",s):e.removeClass("ck-editor__nested-editable_focused",s)}),K(s,e),s}function rt(s,e){const t=s.getSelectedElement();if(t){const i=w(s);if(i)return e.createRange(e.createPositionAt(t,i))}return e.schema.findOptimalInsertionRange(s)}function we(){return null}function _e(s,e){const t=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},function(i){const o=this.toDomElement(i),n=new re;return n.set("content",ie),n.render(),o.appendChild(n.element),o});e.insert(e.createPositionAt(s,0),t),e.addClass(["ck-widget_with-selection-handle"],s)}function be(s){const e=l=>{const{width:c,paddingLeft:a,paddingRight:h}=l.ownerDocument.defaultView.getComputedStyle(l);return parseFloat(c)-(parseFloat(a)||0)-(parseFloat(h)||0)},t=s.parentElement;if(!t)return 0;let i=e(t);const o=5;let n=0,r=t;for(;isNaN(i);){if(r=r.parentElement,++n>o)return 0;i=e(r)}return i}function ye(s,e=new b(s)){const t=be(s);return t?e.width/t*100:0}const m="widget-type-around";function _(s,e,t){return!!s&&f(s)&&!t.isInline(e)}function ve(s){return s.closest(".ck-widget__type-around__button")}function Ee(s){return s.classList.contains("ck-widget__type-around__button_before")?"before":"after"}function Se(s,e){const t=s.closest(".ck-widget");return e.mapDomToView(t)}function w(s){return s.getAttribute(m)}const j=["before","after"],Pe=new DOMParser().parseFromString(te,"image/svg+xml").firstChild,V="ck-widget__type-around_disabled";class Te extends P{_currentFakeCaretModelElement=null;static get pluginName(){return"WidgetTypeAround"}static get isOfficialPlugin(){return!0}static get requires(){return[ce,N]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",(i,o,n)=>{t.change(r=>{for(const l of t.document.roots)n?r.removeClass(V,l):r.addClass(V,l)}),n||e.model.change(r=>{r.removeSelectionAttribute(m)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const i=this.editor,o=i.editing.view,n=i.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);i.execute("insertParagraph",{position:i.model.createPositionAt(e,t),attributes:n}),o.focus(),o.scrollToTheSelection()}_listenToIfEnabled(e,t,i,o){this.listenTo(e,t,(...n)=>{this.isEnabled&&i(...n)},o)}_insertParagraphAccordingToFakeCaretPosition(){const i=this.editor.model.document.selection,o=w(i);if(!o)return!1;const n=i.getSelectedElement();return this._insertParagraph(n,o),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,i=e.locale.t,o={before:i("Insert paragraph before block"),after:i("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(n,r,l)=>{const c=l.mapper.toViewElement(r.item);c&&_(c,r.item,t)&&(ke(l.writer,o,c),c.getCustomProperty("widgetLabel").push(()=>this.isEnabled?i("Press Enter to type after or press Shift + Enter to type before the widget"):""))},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,i=t.document.selection,o=t.schema,n=e.editing.view;this._listenToIfEnabled(n.document,"arrowKey",(l,c)=>{this._handleArrowKeyPress(l,c)},{context:[f,"$text"],priority:"high"}),this._listenToIfEnabled(i,"change:range",(l,c)=>{c.directChange&&e.model.change(a=>{a.removeSelectionAttribute(m)})}),this._listenToIfEnabled(t.document,"change:data",()=>{const l=i.getSelectedElement();if(l){const c=e.editing.mapper.toViewElement(l);if(_(c,l,o))return}e.model.change(c=>{c.removeSelectionAttribute(m)})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(l,c,a)=>{const h=a.writer;if(this._currentFakeCaretModelElement){const p=a.mapper.toViewElement(this._currentFakeCaretModelElement);p&&(h.removeClass(j.map(r),p),this._currentFakeCaretModelElement=null)}const d=c.selection.getSelectedElement();if(!d)return;const u=a.mapper.toViewElement(d);if(!_(u,d,o))return;const g=w(c.selection);g&&(h.addClass(r(g),u),this._currentFakeCaretModelElement=d)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(l,c,a)=>{a||e.model.change(h=>{h.removeSelectionAttribute(m)})});function r(l){return`ck-widget_type-around_show-fake-caret_${l}`}}_handleArrowKeyPress(e,t){const i=this.editor,o=i.model,n=o.document.selection,r=o.schema,l=i.editing.view;if(t.shiftKey)return;const c=t.keyCode,a=J(c,i.locale.contentLanguageDirection),h=l.document.selection.getSelectedElement(),d=i.editing.mapper.toModelElement(h);let u;_(h,d,r)?u=this._handleArrowKeyPressOnSelectedWidget(a):n.isCollapsed?u=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):t.shiftKey||(u=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),u&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const i=this.editor.model,o=i.document.selection,n=w(o);return i.change(r=>{if(n){if(!(n===(e?"after":"before")))return r.removeSelectionAttribute(m),!0}else return r.setSelectionAttribute(m,e?"after":"before"),!0;return!1})}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,i=t.model,o=i.schema,n=t.plugins.get("Widget"),r=n._getObjectElementNextToSelection(e),l=t.editing.mapper.toViewElement(r);return _(l,r,o)?(i.change(c=>{n._setSelectionOverElement(r),c.setSelectionAttribute(m,e?"before":"after")}),!0):!1}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,i=t.model,o=i.schema,n=t.editing.mapper,r=i.document.selection,l=e?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter,c=n.toViewElement(l);return _(c,l,o)?(i.change(a=>{a.setSelection(l,"on"),a.setSelectionAttribute(m,e?"after":"before")}),!0):!1}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(i,o)=>{const n=ve(o.domTarget);if(!n)return;const r=Ee(n),l=Se(n,t.domConverter),c=e.editing.mapper.toModelElement(l);this._insertParagraph(c,r),o.preventDefault(),i.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,i=e.editing.view;this._listenToIfEnabled(i.document,"enter",(o,n)=>{if(o.eventPhase!="atTarget")return;const r=t.getSelectedElement(),l=e.editing.mapper.toViewElement(r),c=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:_(l,r,c)&&(this._insertParagraph(r,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),o.stop())},{context:f})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view.document;this._listenToIfEnabled(t,"insertText",(i,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=t.selection)},{priority:"high"}),C.isAndroid?this._listenToIfEnabled(t,"keydown",(i,o)=>{o.keyCode==229&&this._insertParagraphAccordingToFakeCaretPosition()}):this._listenToIfEnabled(t,"compositionstart",()=>{this._insertParagraphAccordingToFakeCaretPosition()},{priority:"highest"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,i=e.model,o=i.schema;this._listenToIfEnabled(t.document,"delete",(n,r)=>{if(n.eventPhase!="atTarget")return;const l=w(i.document.selection);if(!l)return;const c=r.direction,a=i.document.selection.getSelectedElement(),h=l==="before",d=c=="forward";if(h===d)e.execute("delete",{selection:i.createSelection(a,"on")});else{const g=o.getNearestSelectionRange(i.createPositionAt(a,l),c);if(g)if(!g.isCollapsed)i.change(p=>{p.setSelection(g),e.execute(d?"deleteForward":"delete")});else{const p=i.createSelection(g.start);if(i.modifySelection(p,{direction:c}),!p.focus.isEqual(g.start))i.change(v=>{v.setSelection(g),e.execute(d?"deleteForward":"delete")});else{const v=Re(o,g.start.parent);i.deleteContent(i.createSelection(v,"on"),{doNotAutoparagraph:!0})}}}r.preventDefault(),n.stop()},{context:f})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,i=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(o,[n,r])=>{if(r&&!r.is("documentSelection"))return;const l=w(i);if(l)return o.stop(),t.change(c=>{const a=i.getSelectedElement(),h=t.createPositionAt(a,l),d=c.createSelection(h),u=t.insertContent(n,d);return c.setSelection(d),u})},{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,i=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",(o,n)=>{const[,r,l={}]=n;if(r&&!r.is("documentSelection"))return;const c=w(i);c&&(l.findOptimalPosition=c,n[3]=l)},{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,i=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",(o,[n])=>{if(n&&!n.is("documentSelection"))return;w(i)&&o.stop()},{priority:"high"})}}function ke(s,e,t){const i=s.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},function(o){const n=this.toDomElement(o);return Ce(n,e),Ae(n),n});s.insert(s.createPositionAt(t,"end"),i)}function Ce(s,e){for(const t of j){const i=new R({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${t}`],title:e[t],"aria-hidden":"true"},children:[s.ownerDocument.importNode(Pe,!0)]});s.appendChild(i.render())}}function Ae(s){const e=new R({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});s.appendChild(e.render())}function Re(s,e){let t=e;for(const i of e.getAncestors({parentFirst:!0})){if(i.childCount>1||s.isLimit(i))break;t=i}return t}function We(s){const e=s.model;return(t,i)=>{const o=i.keyCode==k.arrowup,n=i.keyCode==k.arrowdown,r=i.shiftKey,l=e.document.selection;if(!o&&!n)return;const c=n,a=xe(s,l,c);if(a){if(a.isCollapsed){if(l.isCollapsed)return;if(r)return}(a.isCollapsed||ze(s,a,c))&&(e.change(h=>{const d=c?a.end:a.start;if(r){const u=e.createSelection(l.anchor);u.setFocus(d),h.setSelection(u)}else h.setSelection(d)}),t.stop(),i.preventDefault(),i.stopPropagation())}}}function xe(s,e,t){const i=s.model;if(t){const o=e.focus,n=H(i,o,"forward");if(!n)return;const r=i.createRange(o,n),l=I(i.schema,r,"backward");if(l)return i.createRange(o,l)}else{const o=e.focus,n=H(i,o,"backward");if(!n)return;const r=i.createRange(n,o),l=I(i.schema,r,"forward");if(l)return i.createRange(l,o)}}function H(s,e,t){const i=s.schema,o=s.createRangeIn(e.root),n=t=="forward"?"elementStart":"elementEnd";for(const{previousPosition:r,item:l,type:c}of o.getWalker({startPosition:e,direction:t})){if(i.isLimit(l)&&!i.isInline(l))return r;if(c==n&&i.isBlock(l))return null}return null}function I(s,e,t){const i=t=="backward"?e.end:e.start;if(s.checkChild(i,"$text"))return i;for(const{nextPosition:o}of e.getWalker({direction:t}))if(s.checkChild(o,"$text"))return o}function ze(s,e,t){const i=s.model,o=s.view.domConverter;if(t){const a=i.createSelection(e.start);i.modifySelection(a),!a.focus.isAtEnd&&!e.start.isEqual(a.focus)&&(e=i.createRange(a.focus,e.end))}const n=s.mapper.toViewRange(e),r=o.viewRangeToDom(n),l=b.getDomRangeRects(r);let c;for(const a of l){if(c===void 0){c=Math.round(a.bottom);continue}if(Math.round(a.top)>=c)return!1;c=Math.max(c,Math.round(a.bottom))}return!0}class lt extends P{_previouslySelected=new Set;static get pluginName(){return"Widget"}static get isOfficialPlugin(){return!0}static get requires(){return[Te,N]}init(){const e=this.editor,t=e.editing.view,i=t.document,o=e.t;this.editor.editing.downcastDispatcher.on("selection",(n,r,l)=>{const c=l.writer,a=r.selection;if(a.isCollapsed)return;const h=a.getSelectedElement();if(!h)return;const d=e.editing.mapper.toViewElement(h);f(d)&&l.consumable.consume(a,"selection")&&c.setSelection(c.createRangeOn(d),{fake:!0,label:me(d)})}),this.editor.editing.downcastDispatcher.on("selection",(n,r,l)=>{this._clearPreviouslySelectedWidgets(l.writer);const c=l.writer,a=c.document.selection;let h=null;for(const d of a.getRanges())for(const u of d){const g=u.item;f(g)&&!Oe(g,h)&&(c.addClass(z,g),this._previouslySelected.add(g),h=g)}},{priority:"low"}),t.addObserver(F),t.addObserver(q),this.listenTo(i,"mousedown",(...n)=>this._onMousedown(...n)),this.listenTo(i,"pointerdown",(...n)=>this._onPointerdown(...n)),this.listenTo(i,"arrowKey",(...n)=>{this._handleSelectionChangeOnArrowKeyPress(...n)},{context:[f,"$text"]}),this.listenTo(i,"arrowKey",(...n)=>{this._preventDefaultOnArrowKeyPress(...n)},{context:"$root"}),this.listenTo(i,"arrowKey",We(this.editor.editing),{context:"$text"}),this.listenTo(i,"delete",(n,r)=>{this._handleDelete(r.direction=="forward")&&(r.preventDefault(),n.stop())},{context:"$root"}),this.listenTo(i,"tab",(n,r)=>{this._selectNextEditable(r.shiftKey?"backward":"forward")&&(t.scrollToTheSelection(),r.preventDefault(),n.stop())},{context:n=>f(n)||n.is("editableElement"),priority:"low"}),this.listenTo(i,"keydown",(n,r)=>{r.keystroke==k.esc&&this._selectAncestorWidget()&&(r.preventDefault(),n.stop())},{context:n=>n.is("editableElement"),priority:"low"}),e.accessibility.addKeystrokeInfoGroup({id:"widget",label:o("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:o("Move focus from an editable area back to the parent widget"),keystroke:"Esc"},{label:o("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:o("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:o("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:o("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(e,t){const i=t.target;i&&t.domEvent.detail>=3&&this._selectBlockContent(i)&&t.preventDefault()}_onPointerdown(e,t){if(!t.domEvent.isPrimary)return;const i=this.editor,o=i.editing.view,n=o.document;let r=t.target;if(!r)return;if(!f(r)){const c=Ie(r);if(!c)return;if(f(c))r=c;else{const a=De(o,t);if(a&&f(a))r=a;else return}}(C.isAndroid||C.isiOS)&&t.preventDefault(),n.isFocused||o.focus();const l=i.editing.mapper.toModelElement(r);this._setSelectionOverElement(l)}_selectBlockContent(e){const t=this.editor,i=t.model,o=t.editing.mapper,n=i.schema,r=o.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),l=Fe(o.toModelElement(r),i.schema);return l?(i.change(c=>{const a=n.isLimit(l)?null:Ne(c.createPositionAfter(l),n),h=c.createPositionAt(l,0),d=a?c.createPositionAt(a,0):c.createPositionAt(l,"end");c.setSelection(c.createRange(h,d))}),!0):!1}_handleSelectionChangeOnArrowKeyPress(e,t){const i=t.keyCode,o=this.editor.model,n=o.schema,r=o.document.selection,l=r.getSelectedElement(),c=Y(i,this.editor.locale.contentLanguageDirection),a=c=="down"||c=="right",h=c=="up"||c=="down";if(!t.shiftKey&&!r.isCollapsed){if(Ve(r,n)){const E=a?r.getLastPosition():r.getFirstPosition(),W=n.getNearestSelectionRange(E,a?"forward":"backward");W&&(o.change(U=>{U.setSelection(W)}),t.preventDefault(),e.stop())}return}const d=He(o,a),u=o.createSelection(d);if(o.modifySelection(u,{direction:a?"forward":"backward"}),u.isEqual(d))return;u.focus.isTouching(d.focus)&&o.modifySelection(u,{direction:a?"forward":"backward"});const g=a?d.focus.nodeBefore:d.focus.nodeAfter,p=u.focus.nodeBefore,v=u.focus.nodeAfter,y=a?p:v;if(t.shiftKey)(l&&n.isObject(l)||y&&n.isObject(y)||g&&n.isObject(g))&&(o.change(E=>{E.setSelection(u)}),t.preventDefault(),e.stop());else if(y&&n.isObject(y)){if(n.isInline(y)&&h)return;o.change(E=>{E.setSelection(y,"on")}),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const i=this.editor.model,o=i.schema,n=i.document.selection.getSelectedElement();n&&o.isObject(n)&&(t.preventDefault(),e.stop())}_handleDelete(e){const i=this.editor.model.document.selection;if(!this.editor.model.canEditAt(i)||!i.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);if(o)return this.editor.model.change(n=>{let r=i.anchor.parent;for(;r.isEmpty;){const l=r;r=l.parent,n.remove(l)}this._setSelectionOverElement(o)}),!0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,i=t.schema,o=t.document.selection,n=t.createSelection(o);if(t.modifySelection(n,{direction:e?"forward":"backward"}),n.isEqual(o))return null;const r=e?n.focus.nodeBefore:n.focus.nodeAfter;return r&&i.isObject(r)?r:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(z,t);this._previouslySelected.clear()}_selectNextEditable(e){const t=this.editor.editing,i=t.view,o=this.editor.model,n=i.document.selection,r=o.document.selection;let l;if(r.rangeCount>1){const a=r.isBackward?r.getFirstRange():r.getLastRange();l=t.mapper.toViewPosition(e=="forward"?a.end:a.start)}else l=e=="forward"?n.getFirstPosition():n.getLastPosition();const c=this._findNextFocusRange(l,e);return c?(o.change(a=>{a.setSelection(c)}),!0):!1}_findNextFocusRange(e,t){const i=this.editor.editing,o=i.view,n=this.editor.model,r=o.document.selection,l=r.editableElement,c=l.getPath();let a=r.getSelectedElement();a&&!f(a)&&(a=null);const h=t=="forward"?o.createRange(e,o.createPositionAt(e.root,"end")):o.createRange(o.createPositionAt(e.root,0),e);for(const{nextPosition:d}of h.getWalker({direction:t})){const u=d.parent;if(f(u)&&u!=a){const g=i.mapper.toModelElement(u);if(!n.schema.isBlock(g))continue;if(A(c,u.getPath())!="extension")return n.createRangeOn(g)}else if(u.is("editableElement")){if(u==l&&!a)continue;const g=i.mapper.toModelPosition(d),p=n.schema.getNearestSelectionRange(g,t);if(!p)continue;return u==l&&a?p:A(c,u.getPath())!="extension"?n.createRangeIn(n.schema.getLimitElement(p)):p}}return null}_selectAncestorWidget(){const e=this.editor,t=e.editing.mapper,o=e.editing.view.document.selection.getFirstPosition().parent,r=(o.is("$text")?o.parent:o).findAncestor(f);if(!r)return!1;const l=t.toModelElement(r);return l?(e.model.change(c=>{c.setSelection(l,"on")}),!0):!1}}function Ve(s,e){const t=s.getFirstPosition(),i=s.getLastPosition(),o=t.nodeAfter,n=i.nodeBefore;return!!o&&e.isObject(o)||!!n&&e.isObject(n)}function He(s,e){const t=s.document.selection,i=t.getSelectedElement(),o=w(t);return i&&o=="before"?s.createSelection(i,"before"):i&&o=="after"?s.createSelection(i,"after"):s.createSelection(t.getRanges(),{backward:i&&s.schema.isObject(i)?!e:t.isBackward})}function Ie(s){let e=s;for(;e;){if(e.is("editableElement")||f(e))return e;e=e.parent}return null}function De(s,e){const t=Q(e.domEvent);let i=null;if(t?i=s.domConverter.domRangeToView(t):i=s.createRange(s.createPositionAt(e.target,0)),!i)return null;const o=i.start;if(!o.parent)return null;let n=o.parent;return o.parent.is("editableElement")&&(o.isAtEnd&&o.nodeBefore?n=o.nodeBefore:o.isAtStart&&o.nodeAfter&&(n=o.nodeAfter)),n.is("$text")?n.parent:n}function Oe(s,e){return e?Array.from(s.getAncestors()).includes(e):!1}function Fe(s,e){for(const t of s.getAncestors({includeSelf:!0,parentFirst:!0})){if(e.checkChild(t,"$text"))return t;if(e.isLimit(t)&&!e.isObject(t))break}return null}function Ne(s,e){const t=new G({startPosition:s});for(const{item:i}of t){if(e.isLimit(i)||!i.is("element"))return null;if(e.checkChild(i,"$text"))return i}return null}class ct extends P{_toolbarDefinitions=new Map;_balloon;static get requires(){return[oe]}static get pluginName(){return"WidgetToolbarRepository"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",i=>{Me(e.editing.view.document.selection)&&i.stop()},{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:i,getRelatedElement:o,balloonClassName:n="ck-toolbar-container",positions:r}){if(!i.length){X("widget-toolbar-no-items",{toolbarId:e});return}const l=this.editor,c=l.t,a=new ne(l.locale);if(a.ariaLabel=t||c("Widget toolbar"),this._toolbarDefinitions.has(e))throw new M("widget-toolbar-duplicated",this,{toolbarId:e});const h={view:a,getRelatedElement:o,balloonClassName:n,itemsConfig:i,positions:r,initialized:!1};l.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const d=o(l.editing.view.document.selection);d&&this._showToolbar(h,d)},afterBlur:()=>{this._hideToolbar(h)}}),this._toolbarDefinitions.set(e,h)}_updateToolbarsVisibility(){let e=0,t=null,i=null;for(const o of this._toolbarDefinitions.values()){const n=o.getRelatedElement(this.editor.editing.view.document.selection);if(!this.isEnabled||!n)this._isToolbarInBalloon(o)&&this._hideToolbar(o);else if(!this.editor.ui.focusTracker.isFocused)this._isToolbarVisible(o)&&this._hideToolbar(o);else{const r=n.getAncestors().length;r>e&&(e=r,t=n,i=o)}}i&&this._showToolbar(i,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?D(this.editor,t,e.positions):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:$(this.editor,t,e.positions),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const i of this._toolbarDefinitions.values())if(this._isToolbarVisible(i)){const o=i.getRelatedElement(this.editor.editing.view.document.selection);D(this.editor,o,e.positions)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function D(s,e,t){const i=s.plugins.get("ContextualBalloon"),o=$(s,e,t);i.updatePosition(o)}function $(s,e,t){const i=s.editing.view,o=se.defaultPositions;return{target:i.domConverter.mapViewToDom(e),positions:t||[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}function Me(s){const e=s.getSelectedElement();return!!(e&&f(e))}class Le extends B(){_referenceCoordinates;_options;_originalWidth;_originalHeight;_originalWidthPercents;_aspectRatio;constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,i){const o=new b(t);this.activeHandlePosition=je(e),this._referenceCoordinates=Be(t,$e(this.activeHandlePosition)),this._originalWidth=o.width,this._originalHeight=o.height,this._aspectRatio=o.width/o.height;const n=i.style.width;n&&n.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(n):this._originalWidthPercents=ye(i,o)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function Be(s,e){const t=new b(s),i=e.split("-"),o={x:i[1]=="right"?t.right:t.left,y:i[0]=="bottom"?t.bottom:t.top};return o.x+=s.ownerDocument.defaultView.scrollX,o.y+=s.ownerDocument.defaultView.scrollY,o}function Ke(s){return`ck-widget__resizer__handle-${s}`}function je(s){const e=["top-left","top-right","bottom-right","bottom-left"];for(const t of e)if(s.classList.contains(Ke(t)))return t}function $e(s){const e=s.split("-"),t={top:"bottom",bottom:"top",left:"right",right:"left"};return`${t[e[0]]}-${t[e[1]]}`}class Ue extends le{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",t=>t?`ck-orientation-${t}`:"")],style:{display:e.if("_isVisible","none",t=>!t)}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",(i,o)=>i!==null&&o!==null),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",(i,o,n)=>e.unit==="px"?`${i}×${o}`:`${n}%`),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",(i,o,n)=>o<50||n<50?"above-center":i)}_dismiss(){this.unbind(),this._isVisible=!1}}class O extends B(){_state;_sizeView;_options;_viewResizerWrapper=null;_initialViewWidth;constructor(e){super(),this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",(t,i)=>t&&i),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",t=>{!this.state.proposedWidth&&!this.state.proposedWidthPercents&&(this._cleanup(),t.stop())},{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change(t=>{t.removeClass("ck-hidden",this._viewResizerWrapper)})}hide(){this._options.editor.editing.view.change(t=>{t.addClass("ck-hidden",this._viewResizerWrapper)})}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change(o=>{const n=o.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},function(r){const l=this.toDomElement(r);return e._appendHandles(l),e._appendSizeUI(l),l});o.insert(o.createPositionAt(t,"end"),n),o.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=n,this.isVisible||this.hide()}),this.on("change:isVisible",()=>{this.isVisible?(this.show(),this.redraw()):this.hide()})}begin(e){this._state=new Le(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change(a=>{const h=this._options.unit||"%",d=(h==="%"?t.widthPercents:t.width)+h;a.setStyle("width",d,this._options.viewElement)});const o=this._getHandleHost(),n=new b(o),r=Math.round(n.width),l=Math.round(n.height),c=new b(o);t.width=Math.round(c.width),t.height=Math.round(c.height),this.redraw(n),this.state.update({...t,handleHostWidth:r,handleHostHeight:l})}commit(){const e=this._options.unit||"%",t=(e==="%"?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(t)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!Ye(t))return;const i=t.parentElement,o=this._getHandleHost(),n=this._viewResizerWrapper,r=[n.getStyle("width"),n.getStyle("height"),n.getStyle("left"),n.getStyle("top")];let l;if(i.isSameNode(o)){const c=e||new b(o);l=[c.width+"px",c.height+"px",void 0,void 0]}else l=[o.offsetWidth+"px",o.offsetHeight+"px",o.offsetLeft+"px",o.offsetTop+"px"];A(r,l)!=="same"&&this._options.editor.editing.view.change(c=>{c.setStyle({width:l[0],height:l[1],left:l[2],top:l[3]},n)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss(),this._options.editor.editing.view.change(t=>{t.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){const t=this.state,i=Ge(e),o=this._options.isCentered?this._options.isCentered(this):!0,n={x:t._referenceCoordinates.x-(i.x+t.originalWidth),y:i.y-t.originalHeight-t._referenceCoordinates.y};o&&t.activeHandlePosition.endsWith("-right")&&(n.x=i.x-(t._referenceCoordinates.x+t.originalWidth)),o&&(n.x*=2);let r=Math.abs(t.originalWidth+n.x),l=Math.abs(t.originalHeight+n.y);return(r/t.aspectRatio>l?"width":"height")=="width"?l=r/t.aspectRatio:r=l*t.aspectRatio,{width:Math.round(r),height:Math.round(l),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*r*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const i of t)e.appendChild(new R({tag:"div",attributes:{class:`ck-widget__resizer__handle ${qe(i)}`}}).render())}_appendSizeUI(e){this._sizeView=new Ue,this._sizeView.render(),e.appendChild(this._sizeView.element)}}function qe(s){return`ck-widget__resizer__handle-${s}`}function Ge(s){return{x:s.pageX,y:s.pageY}}function Ye(s){return s&&s.ownerDocument&&s.ownerDocument.contains(s)}class at extends P{_resizers=new Map;_observer;_redrawSelectedResizerThrottled;static get pluginName(){return"WidgetResize"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.editing,t=x.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(F),this._observer=new(Z()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=ae(()=>this.redrawSelectedResizer(),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",()=>{for(const[o,n]of this._resizers)o.isAttached()||(this._resizers.delete(o),n.destroy())},{priority:"lowest"}),this._observer.listenTo(x.window,"resize",this._redrawSelectedResizerThrottled);const i=this.editor.editing.view.document.selection;i.on("change",()=>{const o=i.getSelectedElement(),n=this.getResizerByViewElement(o)||null;n?this.select(n):this.deselect()})}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new O(e),i=this.editor.plugins;if(t.attach(),i.has("WidgetToolbarRepository")){const r=i.get("WidgetToolbarRepository");t.on("begin",()=>{r.forceDisabled("resize")},{priority:"lowest"}),t.on("cancel",()=>{r.clearForceDisabled("resize")},{priority:"highest"}),t.on("commit",()=>{r.clearForceDisabled("resize")},{priority:"highest"})}this._resizers.set(e.viewElement,t);const n=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(n)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const i=t.domTarget;O.isResizeHandle(i)&&(this._activeResizer=this._getResizerByHandle(i)||null,this._activeResizer&&(this._activeResizer.begin(i),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}export{ue as WIDGET_CLASS_NAME,z as WIDGET_SELECTED_CLASS_NAME,lt as Widget,de as WidgetHighlightStack,at as WidgetResize,Le as WidgetResizeState,O as WidgetResizer,ct as WidgetToolbarRepository,Te as WidgetTypeAround,m as _WIDGET_TYPE_AROUND_SELECTION_ATTRIBUTE,Ue as _WidgetSizeView,ve as _getClosestWidgetTypeAroundDomButton,Se as _getClosestWidgetViewElement,Ee as _getWidgetTypeAroundButtonPosition,w as _getWidgetTypeAroundFakeCaretPosition,be as calculateResizeHostAncestorWidth,ye as calculateResizeHostPercentageWidth,rt as findOptimalInsertionRange,me as getLabel,_ as isTypeAroundWidget,f as isWidget,K as setHighlightHandling,pe as setLabel,nt as toWidget,st as toWidgetEditable,We as verticalWidgetNavigationHandler};
|
|
1
|
+
import{Plugin as P}from"../../../../../@ckeditor_ckeditor5-core@47.4.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{MouseObserver as F,PointerObserver as q,ModelTreeWalker as G}from"../../../../../@ckeditor_ckeditor5-engine@47.4.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Delete as N}from"../../../../../@ckeditor_ckeditor5-typing@47.4.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{keyCodes as k,env as C,getLocalizedArrowKeyCodeDirection as Y,compareArrays as A,logWarning as X,CKEditorError as M,isForwardArrowKeyCode as J,getRangeFromMouseEvent as Q,global as x,DomEmitterMixin as Z,toArray as L,Rect as b,ObservableMixin as B,EmitterMixin as ee}from"../../../../../@ckeditor_ckeditor5-utils@47.4.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconReturnArrow as te,IconDragHandle as ie}from"../../../../../@ckeditor_ckeditor5-icons@47.4.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ContextualBalloon as oe,ToolbarView as ne,BalloonPanelView as se,IconView as re,Template as R,View as le}from"../../../../../@ckeditor_ckeditor5-ui@47.4.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{Enter as ce}from"../../../../../@ckeditor_ckeditor5-enter@47.4.0/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{throttle as ae}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/throttle.js";class de extends ee(){_stack=[];add(e,t){const i=this._stack,o=i[0];this._insertDescriptor(e);const n=i[0];o!==n&&!T(o,n)&&this.fire("change:top",{oldDescriptor:o,newDescriptor:n,writer:t})}remove(e,t){const i=this._stack,o=i[0];this._removeDescriptor(e);const n=i[0];o!==n&&!T(o,n)&&this.fire("change:top",{oldDescriptor:o,newDescriptor:n,writer:t})}_insertDescriptor(e){const t=this._stack,i=t.findIndex(n=>n.id===e.id);if(T(e,t[i]))return;i>-1&&t.splice(i,1);let o=0;for(;t[o]&&he(t[o],e);)o++;t.splice(o,0,e)}_removeDescriptor(e){const t=this._stack,i=t.findIndex(o=>o.id===e);i>-1&&t.splice(i,1)}}function T(s,e){return s&&e&&s.priority==e.priority&&S(s.classes)==S(e.classes)}function he(s,e){return s.priority>e.priority?!0:s.priority<e.priority?!1:S(s.classes)>S(e.classes)}function S(s){return Array.isArray(s)?s.sort().join(","):s}const ue="ck-widget",z="ck-widget_selected";function f(s){return s.is("element")?!!s.getCustomProperty("widget"):!1}function nt(s,e,t={}){if(!s.is("containerElement"))throw new M("widget-to-widget-wrong-element-type",null,{element:s});return e.setAttribute("contenteditable","false",s),e.addClass(ue,s),e.setCustomProperty("widget",!0,s),s.getFillerOffset=we,e.setCustomProperty("widgetLabel",[],s),t.label&&pe(s,t.label),t.hasSelectionHandle&&_e(s,e),K(s,e),s}function ge(s,e,t){if(e.classes&&t.addClass(L(e.classes),s),e.attributes)for(const i in e.attributes)t.setAttribute(i,e.attributes[i],s)}function fe(s,e,t){if(e.classes&&t.removeClass(L(e.classes),s),e.attributes)for(const i in e.attributes)t.removeAttribute(i,s)}function K(s,e,t=ge,i=fe){const o=new de;o.on("change:top",(l,c)=>{c.oldDescriptor&&i(s,c.oldDescriptor,c.writer),c.newDescriptor&&t(s,c.newDescriptor,c.writer)});const n=(l,c,a)=>o.add(c,a),r=(l,c,a)=>o.remove(c,a);e.setCustomProperty("addHighlight",n,s),e.setCustomProperty("removeHighlight",r,s)}function pe(s,e){s.getCustomProperty("widgetLabel").push(e)}function me(s){return s.getCustomProperty("widgetLabel").reduce((t,i)=>typeof i=="function"?t?t+". "+i():i():t?t+". "+i:i,"")}function st(s,e,t={}){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],s),t.withAriaRole!==!1&&e.setAttribute("role","textbox",s),s.isReadOnly||e.setAttribute("tabindex","-1",s),t.label&&e.setAttribute("aria-label",t.label,s),e.setAttribute("contenteditable",s.isReadOnly?"false":"true",s),s.on("change:isReadOnly",(i,o,n)=>{e.setAttribute("contenteditable",n?"false":"true",s),n?e.removeAttribute("tabindex",s):e.setAttribute("tabindex","-1",s)}),s.on("change:isFocused",(i,o,n)=>{n?e.addClass("ck-editor__nested-editable_focused",s):e.removeClass("ck-editor__nested-editable_focused",s)}),K(s,e),s}function rt(s,e){const t=s.getSelectedElement();if(t){const i=w(s);if(i)return e.createRange(e.createPositionAt(t,i))}return e.schema.findOptimalInsertionRange(s)}function we(){return null}function _e(s,e){const t=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},function(i){const o=this.toDomElement(i),n=new re;return n.set("content",ie),n.render(),o.appendChild(n.element),o});e.insert(e.createPositionAt(s,0),t),e.addClass(["ck-widget_with-selection-handle"],s)}function be(s){const e=l=>{const{width:c,paddingLeft:a,paddingRight:h}=l.ownerDocument.defaultView.getComputedStyle(l);return parseFloat(c)-(parseFloat(a)||0)-(parseFloat(h)||0)},t=s.parentElement;if(!t)return 0;let i=e(t);const o=5;let n=0,r=t;for(;isNaN(i);){if(r=r.parentElement,++n>o)return 0;i=e(r)}return i}function ye(s,e=new b(s)){const t=be(s);return t?e.width/t*100:0}const m="widget-type-around";function _(s,e,t){return!!s&&f(s)&&!t.isInline(e)}function ve(s){return s.closest(".ck-widget__type-around__button")}function Ee(s){return s.classList.contains("ck-widget__type-around__button_before")?"before":"after"}function Se(s,e){const t=s.closest(".ck-widget");return e.mapDomToView(t)}function w(s){return s.getAttribute(m)}const j=["before","after"],Pe=new DOMParser().parseFromString(te,"image/svg+xml").firstChild,V="ck-widget__type-around_disabled";class Te extends P{_currentFakeCaretModelElement=null;static get pluginName(){return"WidgetTypeAround"}static get isOfficialPlugin(){return!0}static get requires(){return[ce,N]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",(i,o,n)=>{t.change(r=>{for(const l of t.document.roots)n?r.removeClass(V,l):r.addClass(V,l)}),n||e.model.change(r=>{r.removeSelectionAttribute(m)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const i=this.editor,o=i.editing.view,n=i.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);i.execute("insertParagraph",{position:i.model.createPositionAt(e,t),attributes:n}),o.focus(),o.scrollToTheSelection()}_listenToIfEnabled(e,t,i,o){this.listenTo(e,t,(...n)=>{this.isEnabled&&i(...n)},o)}_insertParagraphAccordingToFakeCaretPosition(){const i=this.editor.model.document.selection,o=w(i);if(!o)return!1;const n=i.getSelectedElement();return this._insertParagraph(n,o),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,i=e.locale.t,o={before:i("Insert paragraph before block"),after:i("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(n,r,l)=>{const c=l.mapper.toViewElement(r.item);c&&_(c,r.item,t)&&(ke(l.writer,o,c),c.getCustomProperty("widgetLabel").push(()=>this.isEnabled?i("Press Enter to type after or press Shift + Enter to type before the widget"):""))},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,i=t.document.selection,o=t.schema,n=e.editing.view;this._listenToIfEnabled(n.document,"arrowKey",(l,c)=>{this._handleArrowKeyPress(l,c)},{context:[f,"$text"],priority:"high"}),this._listenToIfEnabled(i,"change:range",(l,c)=>{c.directChange&&e.model.change(a=>{a.removeSelectionAttribute(m)})}),this._listenToIfEnabled(t.document,"change:data",()=>{const l=i.getSelectedElement();if(l){const c=e.editing.mapper.toViewElement(l);if(_(c,l,o))return}e.model.change(c=>{c.removeSelectionAttribute(m)})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(l,c,a)=>{const h=a.writer;if(this._currentFakeCaretModelElement){const p=a.mapper.toViewElement(this._currentFakeCaretModelElement);p&&(h.removeClass(j.map(r),p),this._currentFakeCaretModelElement=null)}const d=c.selection.getSelectedElement();if(!d)return;const u=a.mapper.toViewElement(d);if(!_(u,d,o))return;const g=w(c.selection);g&&(h.addClass(r(g),u),this._currentFakeCaretModelElement=d)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(l,c,a)=>{a||e.model.change(h=>{h.removeSelectionAttribute(m)})});function r(l){return`ck-widget_type-around_show-fake-caret_${l}`}}_handleArrowKeyPress(e,t){const i=this.editor,o=i.model,n=o.document.selection,r=o.schema,l=i.editing.view;if(t.shiftKey)return;const c=t.keyCode,a=J(c,i.locale.contentLanguageDirection),h=l.document.selection.getSelectedElement(),d=i.editing.mapper.toModelElement(h);let u;_(h,d,r)?u=this._handleArrowKeyPressOnSelectedWidget(a):n.isCollapsed?u=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):t.shiftKey||(u=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),u&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const i=this.editor.model,o=i.document.selection,n=w(o);return i.change(r=>{if(n){if(!(n===(e?"after":"before")))return r.removeSelectionAttribute(m),!0}else return r.setSelectionAttribute(m,e?"after":"before"),!0;return!1})}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,i=t.model,o=i.schema,n=t.plugins.get("Widget"),r=n._getObjectElementNextToSelection(e),l=t.editing.mapper.toViewElement(r);return _(l,r,o)?(i.change(c=>{n._setSelectionOverElement(r),c.setSelectionAttribute(m,e?"before":"after")}),!0):!1}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,i=t.model,o=i.schema,n=t.editing.mapper,r=i.document.selection,l=e?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter,c=n.toViewElement(l);return _(c,l,o)?(i.change(a=>{a.setSelection(l,"on"),a.setSelectionAttribute(m,e?"after":"before")}),!0):!1}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(i,o)=>{const n=ve(o.domTarget);if(!n)return;const r=Ee(n),l=Se(n,t.domConverter),c=e.editing.mapper.toModelElement(l);this._insertParagraph(c,r),o.preventDefault(),i.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,i=e.editing.view;this._listenToIfEnabled(i.document,"enter",(o,n)=>{if(o.eventPhase!="atTarget")return;const r=t.getSelectedElement(),l=e.editing.mapper.toViewElement(r),c=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:_(l,r,c)&&(this._insertParagraph(r,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),o.stop())},{context:f})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view.document;this._listenToIfEnabled(t,"insertText",(i,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=t.selection)},{priority:"high"}),C.isAndroid?this._listenToIfEnabled(t,"keydown",(i,o)=>{o.keyCode==229&&this._insertParagraphAccordingToFakeCaretPosition()}):this._listenToIfEnabled(t,"compositionstart",()=>{this._insertParagraphAccordingToFakeCaretPosition()},{priority:"highest"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,i=e.model,o=i.schema;this._listenToIfEnabled(t.document,"delete",(n,r)=>{if(n.eventPhase!="atTarget")return;const l=w(i.document.selection);if(!l)return;const c=r.direction,a=i.document.selection.getSelectedElement(),h=l==="before",d=c=="forward";if(h===d)e.execute("delete",{selection:i.createSelection(a,"on")});else{const g=o.getNearestSelectionRange(i.createPositionAt(a,l),c);if(g)if(!g.isCollapsed)i.change(p=>{p.setSelection(g),e.execute(d?"deleteForward":"delete")});else{const p=i.createSelection(g.start);if(i.modifySelection(p,{direction:c}),!p.focus.isEqual(g.start))i.change(v=>{v.setSelection(g),e.execute(d?"deleteForward":"delete")});else{const v=Re(o,g.start.parent);i.deleteContent(i.createSelection(v,"on"),{doNotAutoparagraph:!0})}}}r.preventDefault(),n.stop()},{context:f})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,i=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(o,[n,r])=>{if(r&&!r.is("documentSelection"))return;const l=w(i);if(l)return o.stop(),t.change(c=>{const a=i.getSelectedElement(),h=t.createPositionAt(a,l),d=c.createSelection(h),u=t.insertContent(n,d);return c.setSelection(d),u})},{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,i=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",(o,n)=>{const[,r,l={}]=n;if(r&&!r.is("documentSelection"))return;const c=w(i);c&&(l.findOptimalPosition=c,n[3]=l)},{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,i=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",(o,[n])=>{if(n&&!n.is("documentSelection"))return;w(i)&&o.stop()},{priority:"high"})}}function ke(s,e,t){const i=s.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},function(o){const n=this.toDomElement(o);return Ce(n,e),Ae(n),n});s.insert(s.createPositionAt(t,"end"),i)}function Ce(s,e){for(const t of j){const i=new R({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${t}`],title:e[t],"aria-hidden":"true"},children:[s.ownerDocument.importNode(Pe,!0)]});s.appendChild(i.render())}}function Ae(s){const e=new R({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});s.appendChild(e.render())}function Re(s,e){let t=e;for(const i of e.getAncestors({parentFirst:!0})){if(i.childCount>1||s.isLimit(i))break;t=i}return t}function We(s){const e=s.model;return(t,i)=>{const o=i.keyCode==k.arrowup,n=i.keyCode==k.arrowdown,r=i.shiftKey,l=e.document.selection;if(!o&&!n)return;const c=n,a=xe(s,l,c);if(a){if(a.isCollapsed){if(l.isCollapsed)return;if(r)return}(a.isCollapsed||ze(s,a,c))&&(e.change(h=>{const d=c?a.end:a.start;if(r){const u=e.createSelection(l.anchor);u.setFocus(d),h.setSelection(u)}else h.setSelection(d)}),t.stop(),i.preventDefault(),i.stopPropagation())}}}function xe(s,e,t){const i=s.model;if(t){const o=e.focus,n=H(i,o,"forward");if(!n)return;const r=i.createRange(o,n),l=I(i.schema,r,"backward");if(l)return i.createRange(o,l)}else{const o=e.focus,n=H(i,o,"backward");if(!n)return;const r=i.createRange(n,o),l=I(i.schema,r,"forward");if(l)return i.createRange(l,o)}}function H(s,e,t){const i=s.schema,o=s.createRangeIn(e.root),n=t=="forward"?"elementStart":"elementEnd";for(const{previousPosition:r,item:l,type:c}of o.getWalker({startPosition:e,direction:t})){if(i.isLimit(l)&&!i.isInline(l))return r;if(c==n&&i.isBlock(l))return null}return null}function I(s,e,t){const i=t=="backward"?e.end:e.start;if(s.checkChild(i,"$text"))return i;for(const{nextPosition:o}of e.getWalker({direction:t}))if(s.checkChild(o,"$text"))return o}function ze(s,e,t){const i=s.model,o=s.view.domConverter;if(t){const a=i.createSelection(e.start);i.modifySelection(a),!a.focus.isAtEnd&&!e.start.isEqual(a.focus)&&(e=i.createRange(a.focus,e.end))}const n=s.mapper.toViewRange(e),r=o.viewRangeToDom(n),l=b.getDomRangeRects(r);let c;for(const a of l){if(c===void 0){c=Math.round(a.bottom);continue}if(Math.round(a.top)>=c)return!1;c=Math.max(c,Math.round(a.bottom))}return!0}class lt extends P{_previouslySelected=new Set;static get pluginName(){return"Widget"}static get isOfficialPlugin(){return!0}static get requires(){return[Te,N]}init(){const e=this.editor,t=e.editing.view,i=t.document,o=e.t;this.editor.editing.downcastDispatcher.on("selection",(n,r,l)=>{const c=l.writer,a=r.selection;if(a.isCollapsed)return;const h=a.getSelectedElement();if(!h)return;const d=e.editing.mapper.toViewElement(h);f(d)&&l.consumable.consume(a,"selection")&&c.setSelection(c.createRangeOn(d),{fake:!0,label:me(d)})}),this.editor.editing.downcastDispatcher.on("selection",(n,r,l)=>{this._clearPreviouslySelectedWidgets(l.writer);const c=l.writer,a=c.document.selection;let h=null;for(const d of a.getRanges())for(const u of d){const g=u.item;f(g)&&!Oe(g,h)&&(c.addClass(z,g),this._previouslySelected.add(g),h=g)}},{priority:"low"}),t.addObserver(F),t.addObserver(q),this.listenTo(i,"mousedown",(...n)=>this._onMousedown(...n)),this.listenTo(i,"pointerdown",(...n)=>this._onPointerdown(...n)),this.listenTo(i,"arrowKey",(...n)=>{this._handleSelectionChangeOnArrowKeyPress(...n)},{context:[f,"$text"]}),this.listenTo(i,"arrowKey",(...n)=>{this._preventDefaultOnArrowKeyPress(...n)},{context:"$root"}),this.listenTo(i,"arrowKey",We(this.editor.editing),{context:"$text"}),this.listenTo(i,"delete",(n,r)=>{this._handleDelete(r.direction=="forward")&&(r.preventDefault(),n.stop())},{context:"$root"}),this.listenTo(i,"tab",(n,r)=>{this._selectNextEditable(r.shiftKey?"backward":"forward")&&(t.scrollToTheSelection(),r.preventDefault(),n.stop())},{context:n=>f(n)||n.is("editableElement"),priority:"low"}),this.listenTo(i,"keydown",(n,r)=>{r.keystroke==k.esc&&this._selectAncestorWidget()&&(r.preventDefault(),n.stop())},{context:n=>n.is("editableElement"),priority:"low"}),e.accessibility.addKeystrokeInfoGroup({id:"widget",label:o("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:o("Move focus from an editable area back to the parent widget"),keystroke:"Esc"},{label:o("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:o("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:o("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:o("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(e,t){const i=t.target;i&&t.domEvent.detail>=3&&this._selectBlockContent(i)&&t.preventDefault()}_onPointerdown(e,t){if(!t.domEvent.isPrimary)return;const i=this.editor,o=i.editing.view,n=o.document;let r=t.target;if(!r)return;if(!f(r)){const c=Ie(r);if(!c)return;if(f(c))r=c;else{const a=De(o,t);if(a&&f(a))r=a;else return}}(C.isAndroid||C.isiOS)&&t.preventDefault(),n.isFocused||o.focus();const l=i.editing.mapper.toModelElement(r);this._setSelectionOverElement(l)}_selectBlockContent(e){const t=this.editor,i=t.model,o=t.editing.mapper,n=i.schema,r=o.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),l=Fe(o.toModelElement(r),i.schema);return l?(i.change(c=>{const a=n.isLimit(l)?null:Ne(c.createPositionAfter(l),n),h=c.createPositionAt(l,0),d=a?c.createPositionAt(a,0):c.createPositionAt(l,"end");c.setSelection(c.createRange(h,d))}),!0):!1}_handleSelectionChangeOnArrowKeyPress(e,t){const i=t.keyCode,o=this.editor.model,n=o.schema,r=o.document.selection,l=r.getSelectedElement(),c=Y(i,this.editor.locale.contentLanguageDirection),a=c=="down"||c=="right",h=c=="up"||c=="down";if(!t.shiftKey&&!r.isCollapsed){if(Ve(r,n)){const E=a?r.getLastPosition():r.getFirstPosition(),W=n.getNearestSelectionRange(E,a?"forward":"backward");W&&(o.change(U=>{U.setSelection(W)}),t.preventDefault(),e.stop())}return}const d=He(o,a),u=o.createSelection(d);if(o.modifySelection(u,{direction:a?"forward":"backward"}),u.isEqual(d))return;u.focus.isTouching(d.focus)&&o.modifySelection(u,{direction:a?"forward":"backward"});const g=a?d.focus.nodeBefore:d.focus.nodeAfter,p=u.focus.nodeBefore,v=u.focus.nodeAfter,y=a?p:v;if(t.shiftKey)(l&&n.isObject(l)||y&&n.isObject(y)||g&&n.isObject(g))&&(o.change(E=>{E.setSelection(u)}),t.preventDefault(),e.stop());else if(y&&n.isObject(y)){if(n.isInline(y)&&h)return;o.change(E=>{E.setSelection(y,"on")}),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const i=this.editor.model,o=i.schema,n=i.document.selection.getSelectedElement();n&&o.isObject(n)&&(t.preventDefault(),e.stop())}_handleDelete(e){const i=this.editor.model.document.selection;if(!this.editor.model.canEditAt(i)||!i.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);if(o)return this.editor.model.change(n=>{let r=i.anchor.parent;for(;r.isEmpty;){const l=r;r=l.parent,n.remove(l)}this._setSelectionOverElement(o)}),!0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,i=t.schema,o=t.document.selection,n=t.createSelection(o);if(t.modifySelection(n,{direction:e?"forward":"backward"}),n.isEqual(o))return null;const r=e?n.focus.nodeBefore:n.focus.nodeAfter;return r&&i.isObject(r)?r:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(z,t);this._previouslySelected.clear()}_selectNextEditable(e){const t=this.editor.editing,i=t.view,o=this.editor.model,n=i.document.selection,r=o.document.selection;let l;if(r.rangeCount>1){const a=r.isBackward?r.getFirstRange():r.getLastRange();l=t.mapper.toViewPosition(e=="forward"?a.end:a.start)}else l=e=="forward"?n.getFirstPosition():n.getLastPosition();const c=this._findNextFocusRange(l,e);return c?(o.change(a=>{a.setSelection(c)}),!0):!1}_findNextFocusRange(e,t){const i=this.editor.editing,o=i.view,n=this.editor.model,r=o.document.selection,l=r.editableElement,c=l.getPath();let a=r.getSelectedElement();a&&!f(a)&&(a=null);const h=t=="forward"?o.createRange(e,o.createPositionAt(e.root,"end")):o.createRange(o.createPositionAt(e.root,0),e);for(const{nextPosition:d}of h.getWalker({direction:t})){const u=d.parent;if(f(u)&&u!=a){const g=i.mapper.toModelElement(u);if(!n.schema.isBlock(g))continue;if(A(c,u.getPath())!="extension")return n.createRangeOn(g)}else if(u.is("editableElement")){if(u==l&&!a)continue;const g=i.mapper.toModelPosition(d),p=n.schema.getNearestSelectionRange(g,t);if(!p)continue;return u==l&&a?p:A(c,u.getPath())!="extension"?n.createRangeIn(n.schema.getLimitElement(p)):p}}return null}_selectAncestorWidget(){const e=this.editor,t=e.editing.mapper,o=e.editing.view.document.selection.getFirstPosition().parent,r=(o.is("$text")?o.parent:o).findAncestor(f);if(!r)return!1;const l=t.toModelElement(r);return l?(e.model.change(c=>{c.setSelection(l,"on")}),!0):!1}}function Ve(s,e){const t=s.getFirstPosition(),i=s.getLastPosition(),o=t.nodeAfter,n=i.nodeBefore;return!!o&&e.isObject(o)||!!n&&e.isObject(n)}function He(s,e){const t=s.document.selection,i=t.getSelectedElement(),o=w(t);return i&&o=="before"?s.createSelection(i,"before"):i&&o=="after"?s.createSelection(i,"after"):s.createSelection(t.getRanges(),{backward:i&&s.schema.isObject(i)?!e:t.isBackward})}function Ie(s){let e=s;for(;e;){if(e.is("editableElement")||f(e))return e;e=e.parent}return null}function De(s,e){const t=Q(e.domEvent);let i=null;if(t?i=s.domConverter.domRangeToView(t):i=s.createRange(s.createPositionAt(e.target,0)),!i)return null;const o=i.start;if(!o.parent)return null;let n=o.parent;return o.parent.is("editableElement")&&(o.isAtEnd&&o.nodeBefore?n=o.nodeBefore:o.isAtStart&&o.nodeAfter&&(n=o.nodeAfter)),n.is("$text")?n.parent:n}function Oe(s,e){return e?Array.from(s.getAncestors()).includes(e):!1}function Fe(s,e){for(const t of s.getAncestors({includeSelf:!0,parentFirst:!0})){if(e.checkChild(t,"$text"))return t;if(e.isLimit(t)&&!e.isObject(t))break}return null}function Ne(s,e){const t=new G({startPosition:s});for(const{item:i}of t){if(e.isLimit(i)||!i.is("element"))return null;if(e.checkChild(i,"$text"))return i}return null}class ct extends P{_toolbarDefinitions=new Map;_balloon;static get requires(){return[oe]}static get pluginName(){return"WidgetToolbarRepository"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",i=>{Me(e.editing.view.document.selection)&&i.stop()},{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:i,getRelatedElement:o,balloonClassName:n="ck-toolbar-container",positions:r}){if(!i.length){X("widget-toolbar-no-items",{toolbarId:e});return}const l=this.editor,c=l.t,a=new ne(l.locale);if(a.ariaLabel=t||c("Widget toolbar"),this._toolbarDefinitions.has(e))throw new M("widget-toolbar-duplicated",this,{toolbarId:e});const h={view:a,getRelatedElement:o,balloonClassName:n,itemsConfig:i,positions:r,initialized:!1};l.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const d=o(l.editing.view.document.selection);d&&this._showToolbar(h,d)},afterBlur:()=>{this._hideToolbar(h)}}),this._toolbarDefinitions.set(e,h)}_updateToolbarsVisibility(){let e=0,t=null,i=null;for(const o of this._toolbarDefinitions.values()){const n=o.getRelatedElement(this.editor.editing.view.document.selection);if(!this.isEnabled||!n)this._isToolbarInBalloon(o)&&this._hideToolbar(o);else if(!this.editor.ui.focusTracker.isFocused)this._isToolbarVisible(o)&&this._hideToolbar(o);else{const r=n.getAncestors().length;r>e&&(e=r,t=n,i=o)}}i&&this._showToolbar(i,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?D(this.editor,t,e.positions):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:$(this.editor,t,e.positions),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const i of this._toolbarDefinitions.values())if(this._isToolbarVisible(i)){const o=i.getRelatedElement(this.editor.editing.view.document.selection);D(this.editor,o,e.positions)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function D(s,e,t){const i=s.plugins.get("ContextualBalloon"),o=$(s,e,t);i.updatePosition(o)}function $(s,e,t){const i=s.editing.view,o=se.defaultPositions;return{target:i.domConverter.mapViewToDom(e),positions:t||[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}function Me(s){const e=s.getSelectedElement();return!!(e&&f(e))}class Le extends B(){_referenceCoordinates;_options;_originalWidth;_originalHeight;_originalWidthPercents;_aspectRatio;constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,i){const o=new b(t);this.activeHandlePosition=je(e),this._referenceCoordinates=Be(t,$e(this.activeHandlePosition)),this._originalWidth=o.width,this._originalHeight=o.height,this._aspectRatio=o.width/o.height;const n=i.style.width;n&&n.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(n):this._originalWidthPercents=ye(i,o)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function Be(s,e){const t=new b(s),i=e.split("-"),o={x:i[1]=="right"?t.right:t.left,y:i[0]=="bottom"?t.bottom:t.top};return o.x+=s.ownerDocument.defaultView.scrollX,o.y+=s.ownerDocument.defaultView.scrollY,o}function Ke(s){return`ck-widget__resizer__handle-${s}`}function je(s){const e=["top-left","top-right","bottom-right","bottom-left"];for(const t of e)if(s.classList.contains(Ke(t)))return t}function $e(s){const e=s.split("-"),t={top:"bottom",bottom:"top",left:"right",right:"left"};return`${t[e[0]]}-${t[e[1]]}`}class Ue extends le{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",t=>t?`ck-orientation-${t}`:"")],style:{display:e.if("_isVisible","none",t=>!t)}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",(i,o)=>i!==null&&o!==null),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",(i,o,n)=>e.unit==="px"?`${i}×${o}`:`${n}%`),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",(i,o,n)=>o<50||n<50?"above-center":i)}_dismiss(){this.unbind(),this._isVisible=!1}}class O extends B(){_state;_sizeView;_options;_viewResizerWrapper=null;_initialViewWidth;constructor(e){super(),this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",(t,i)=>t&&i),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",t=>{!this.state.proposedWidth&&!this.state.proposedWidthPercents&&(this._cleanup(),t.stop())},{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change(t=>{t.removeClass("ck-hidden",this._viewResizerWrapper)})}hide(){this._options.editor.editing.view.change(t=>{t.addClass("ck-hidden",this._viewResizerWrapper)})}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change(o=>{const n=o.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},function(r){const l=this.toDomElement(r);return e._appendHandles(l),e._appendSizeUI(l),l});o.insert(o.createPositionAt(t,"end"),n),o.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=n,this.isVisible||this.hide()}),this.on("change:isVisible",()=>{this.isVisible?(this.show(),this.redraw()):this.hide()})}begin(e){this._state=new Le(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change(a=>{const h=this._options.unit||"%",d=(h==="%"?t.widthPercents:t.width)+h;a.setStyle("width",d,this._options.viewElement)});const o=this._getHandleHost(),n=new b(o),r=Math.round(n.width),l=Math.round(n.height),c=new b(o);t.width=Math.round(c.width),t.height=Math.round(c.height),this.redraw(n),this.state.update({...t,handleHostWidth:r,handleHostHeight:l})}commit(){const e=this._options.unit||"%",t=(e==="%"?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(t)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!Ye(t))return;const i=t.parentElement,o=this._getHandleHost(),n=this._viewResizerWrapper,r=[n.getStyle("width"),n.getStyle("height"),n.getStyle("left"),n.getStyle("top")];let l;if(i.isSameNode(o)){const c=e||new b(o);l=[c.width+"px",c.height+"px",void 0,void 0]}else l=[o.offsetWidth+"px",o.offsetHeight+"px",o.offsetLeft+"px",o.offsetTop+"px"];A(r,l)!=="same"&&this._options.editor.editing.view.change(c=>{c.setStyle({width:l[0],height:l[1],left:l[2],top:l[3]},n)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss(),this._options.editor.editing.view.change(t=>{t.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){const t=this.state,i=Ge(e),o=this._options.isCentered?this._options.isCentered(this):!0,n={x:t._referenceCoordinates.x-(i.x+t.originalWidth),y:i.y-t.originalHeight-t._referenceCoordinates.y};o&&t.activeHandlePosition.endsWith("-right")&&(n.x=i.x-(t._referenceCoordinates.x+t.originalWidth)),o&&(n.x*=2);let r=Math.abs(t.originalWidth+n.x),l=Math.abs(t.originalHeight+n.y);return(r/t.aspectRatio>l?"width":"height")=="width"?l=r/t.aspectRatio:r=l*t.aspectRatio,{width:Math.round(r),height:Math.round(l),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*r*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const i of t)e.appendChild(new R({tag:"div",attributes:{class:`ck-widget__resizer__handle ${qe(i)}`}}).render())}_appendSizeUI(e){this._sizeView=new Ue,this._sizeView.render(),e.appendChild(this._sizeView.element)}}function qe(s){return`ck-widget__resizer__handle-${s}`}function Ge(s){return{x:s.pageX,y:s.pageY}}function Ye(s){return s&&s.ownerDocument&&s.ownerDocument.contains(s)}class at extends P{_resizers=new Map;_observer;_redrawSelectedResizerThrottled;static get pluginName(){return"WidgetResize"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.editing,t=x.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(F),this._observer=new(Z()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=ae(()=>this.redrawSelectedResizer(),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",()=>{for(const[o,n]of this._resizers)o.isAttached()||(this._resizers.delete(o),n.destroy())},{priority:"lowest"}),this._observer.listenTo(x.window,"resize",this._redrawSelectedResizerThrottled);const i=this.editor.editing.view.document.selection;i.on("change",()=>{const o=i.getSelectedElement(),n=this.getResizerByViewElement(o)||null;n?this.select(n):this.deselect()})}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new O(e),i=this.editor.plugins;if(t.attach(),i.has("WidgetToolbarRepository")){const r=i.get("WidgetToolbarRepository");t.on("begin",()=>{r.forceDisabled("resize")},{priority:"lowest"}),t.on("cancel",()=>{r.clearForceDisabled("resize")},{priority:"highest"}),t.on("commit",()=>{r.clearForceDisabled("resize")},{priority:"highest"})}this._resizers.set(e.viewElement,t);const n=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(n)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const i=t.domTarget;O.isResizeHandle(i)&&(this._activeResizer=this._getResizerByHandle(i)||null,this._activeResizer&&(this._activeResizer.begin(i),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}export{ue as WIDGET_CLASS_NAME,z as WIDGET_SELECTED_CLASS_NAME,lt as Widget,de as WidgetHighlightStack,at as WidgetResize,Le as WidgetResizeState,O as WidgetResizer,ct as WidgetToolbarRepository,Te as WidgetTypeAround,m as _WIDGET_TYPE_AROUND_SELECTION_ATTRIBUTE,Ue as _WidgetSizeView,ve as _getClosestWidgetTypeAroundDomButton,Se as _getClosestWidgetViewElement,Ee as _getWidgetTypeAroundButtonPosition,w as _getWidgetTypeAroundFakeCaretPosition,be as calculateResizeHostAncestorWidth,ye as calculateResizeHostPercentageWidth,rt as findOptimalInsertionRange,me as getLabel,_ as isTypeAroundWidget,f as isWidget,K as setHighlightHandling,pe as setLabel,nt as toWidget,st as toWidgetEditable,We as verticalWidgetNavigationHandler};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
class v{on(e,i){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(i),this}emit(e,...i){this._callbacks=this._callbacks||{};let t=this._callbacks[e];if(t)for(let s of t)s.apply(this,i);return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+e,{args:i})),this}makeEvent(e,i){let t={bubbles:!0,cancelable:!0,detail:i};if(typeof window.CustomEvent=="function")return new CustomEvent(e,t);var s=document.createEvent("CustomEvent");return s.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),s}off(e,i){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;let t=this._callbacks[e];if(!t)return this;if(arguments.length===1)return delete this._callbacks[e],this;for(let s=0;s<t.length;s++)if(t[s]===i){t.splice(s,1);break}return this}}var y=`
|
|
2
|
+
<div class="dz-preview dz-file-preview">
|
|
3
|
+
<div class="dz-image"><img data-dz-thumbnail /></div>
|
|
4
|
+
<div class="dz-details">
|
|
5
|
+
<div class="dz-size"><span data-dz-size></span></div>
|
|
6
|
+
<div class="dz-filename"><span data-dz-name></span></div>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="dz-progress">
|
|
9
|
+
<span class="dz-upload" data-dz-uploadprogress></span>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="dz-error-message"><span data-dz-errormessage></span></div>
|
|
12
|
+
<div class="dz-success-mark">
|
|
13
|
+
<svg
|
|
14
|
+
width="54"
|
|
15
|
+
height="54"
|
|
16
|
+
viewBox="0 0 54 54"
|
|
17
|
+
fill="white"
|
|
18
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
19
|
+
>
|
|
20
|
+
<path
|
|
21
|
+
d="M10.2071 29.7929L14.2929 25.7071C14.6834 25.3166 15.3166 25.3166 15.7071 25.7071L21.2929 31.2929C21.6834 31.6834 22.3166 31.6834 22.7071 31.2929L38.2929 15.7071C38.6834 15.3166 39.3166 15.3166 39.7071 15.7071L43.7929 19.7929C44.1834 20.1834 44.1834 20.8166 43.7929 21.2071L22.7071 42.2929C22.3166 42.6834 21.6834 42.6834 21.2929 42.2929L10.2071 31.2071C9.81658 30.8166 9.81658 30.1834 10.2071 29.7929Z"
|
|
22
|
+
/>
|
|
23
|
+
</svg>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="dz-error-mark">
|
|
26
|
+
<svg
|
|
27
|
+
width="54"
|
|
28
|
+
height="54"
|
|
29
|
+
viewBox="0 0 54 54"
|
|
30
|
+
fill="white"
|
|
31
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
32
|
+
>
|
|
33
|
+
<path
|
|
34
|
+
d="M26.2929 20.2929L19.2071 13.2071C18.8166 12.8166 18.1834 12.8166 17.7929 13.2071L13.2071 17.7929C12.8166 18.1834 12.8166 18.8166 13.2071 19.2071L20.2929 26.2929C20.6834 26.6834 20.6834 27.3166 20.2929 27.7071L13.2071 34.7929C12.8166 35.1834 12.8166 35.8166 13.2071 36.2071L17.7929 40.7929C18.1834 41.1834 18.8166 41.1834 19.2071 40.7929L26.2929 33.7071C26.6834 33.3166 27.3166 33.3166 27.7071 33.7071L34.7929 40.7929C35.1834 41.1834 35.8166 41.1834 36.2071 40.7929L40.7929 36.2071C41.1834 35.8166 41.1834 35.1834 40.7929 34.7929L33.7071 27.7071C33.3166 27.3166 33.3166 26.6834 33.7071 26.2929L40.7929 19.2071C41.1834 18.8166 41.1834 18.1834 40.7929 17.7929L36.2071 13.2071C35.8166 12.8166 35.1834 12.8166 34.7929 13.2071L27.7071 20.2929C27.3166 20.6834 26.6834 20.6834 26.2929 20.2929Z"
|
|
35
|
+
/>
|
|
36
|
+
</svg>
|
|
37
|
+
</div>
|
|
38
|
+
</div>`;let E={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2097152,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,defaultHeaders:!0,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You cannot upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init(){},params(l,e,i){if(i)return{dzuuid:i.file.upload.uuid,dzchunkindex:i.index,dztotalfilesize:i.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:i.file.upload.totalChunkCount,dzchunkbyteoffset:i.index*this.options.chunkSize}},accept(l,e){return e()},chunksUploaded:function(l,e){e()},binaryBody:!1,fallback(){let l;this.element.className=`${this.element.className} dz-browser-not-supported`;for(let i of this.element.getElementsByTagName("div"))if(/(^| )dz-message($| )/.test(i.className)){l=i,i.className="dz-message";break}l||(l=r.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(l));let e=l.getElementsByTagName("span")[0];return e&&(e.textContent!=null?e.textContent=this.options.dictFallbackMessage:e.innerText!=null&&(e.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize(l,e,i,t){let s={srcX:0,srcY:0,srcWidth:l.width,srcHeight:l.height},n=l.width/l.height;e==null&&i==null?(e=s.srcWidth,i=s.srcHeight):e==null?e=i*n:i==null&&(i=e/n),e=Math.min(e,s.srcWidth),i=Math.min(i,s.srcHeight);let a=e/i;if(s.srcWidth>e||s.srcHeight>i)if(t==="crop")n>a?(s.srcHeight=l.height,s.srcWidth=s.srcHeight*a):(s.srcWidth=l.width,s.srcHeight=s.srcWidth/a);else if(t==="contain")n>a?i=e/n:e=i*n;else throw new Error(`Unknown resizeMethod '${t}'`);return s.srcX=(l.width-s.srcWidth)/2,s.srcY=(l.height-s.srcHeight)/2,s.trgWidth=e,s.trgHeight=i,s},transformFile(l,e){return(this.options.resizeWidth||this.options.resizeHeight)&&l.type.match(/image.*/)?this.resizeImage(l,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(l)},previewTemplate:y,drop(l){return this.element.classList.remove("dz-drag-hover")},dragstart(l){},dragend(l){return this.element.classList.remove("dz-drag-hover")},dragenter(l){return this.element.classList.add("dz-drag-hover")},dragover(l){return this.element.classList.add("dz-drag-hover")},dragleave(l){return this.element.classList.remove("dz-drag-hover")},paste(l){},reset(){return this.element.classList.remove("dz-started")},addedfile(l){if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){l.previewElement=r.createElement(this.options.previewTemplate.trim()),l.previewTemplate=l.previewElement,this.previewsContainer.appendChild(l.previewElement);for(var e of l.previewElement.querySelectorAll("[data-dz-name]"))e.textContent=l.name;for(e of l.previewElement.querySelectorAll("[data-dz-size]"))e.innerHTML=this.filesize(l.size);this.options.addRemoveLinks&&(l._removeLink=r.createElement(`<a class="dz-remove" href="javascript:undefined;" data-dz-remove>${this.options.dictRemoveFile}</a>`),l.previewElement.appendChild(l._removeLink));let i=t=>(t.preventDefault(),t.stopPropagation(),l.status===r.UPLOADING?this.options.dictCancelUploadConfirmation?r.confirm(this.options.dictCancelUploadConfirmation,()=>this.removeFile(l)):this.removeFile(l):this.options.dictRemoveFileConfirmation?r.confirm(this.options.dictRemoveFileConfirmation,()=>this.removeFile(l)):this.removeFile(l));for(let t of l.previewElement.querySelectorAll("[data-dz-remove]"))t.addEventListener("click",i)}},removedfile(l){return l.previewElement!=null&&l.previewElement.parentNode!=null&&l.previewElement.parentNode.removeChild(l.previewElement),this._updateMaxFilesReachedClass()},thumbnail(l,e){if(l.previewElement){l.previewElement.classList.remove("dz-file-preview");for(let i of l.previewElement.querySelectorAll("[data-dz-thumbnail]"))i.alt=l.name,i.src=e;return setTimeout(()=>l.previewElement.classList.add("dz-image-preview"),1)}},error(l,e){if(l.previewElement){l.previewElement.classList.add("dz-error"),typeof e!="string"&&e.error&&(e=e.error);for(let i of l.previewElement.querySelectorAll("[data-dz-errormessage]"))i.textContent=e}},errormultiple(){},processing(l){if(l.previewElement&&(l.previewElement.classList.add("dz-processing"),l._removeLink))return l._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple(){},uploadprogress(l,e,i){if(l.previewElement)for(let t of l.previewElement.querySelectorAll("[data-dz-uploadprogress]"))t.nodeName==="PROGRESS"?t.value=e:t.style.width=`${e}%`},totaluploadprogress(){},sending(){},sendingmultiple(){},success(l){if(l.previewElement)return l.previewElement.classList.add("dz-success")},successmultiple(){},canceled(l){return this.emit("error",l,this.options.dictUploadCanceled)},canceledmultiple(){},complete(l){if(l._removeLink&&(l._removeLink.innerHTML=this.options.dictRemoveFile),l.previewElement)return l.previewElement.classList.add("dz-complete")},completemultiple(){},maxfilesexceeded(){},maxfilesreached(){},queuecomplete(){},addedfiles(){},emptyfolder(){}};var C=E;class r extends v{static initClass(){this.prototype.Emitter=v,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete","emptyfolder"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}constructor(e,i){super();let t,s;if(this.element=e,this.clickableElements=[],this.listeners=[],this.files=[],typeof this.element=="string"&&(this.element=document.querySelector(this.element)),this.element===null||!this.element instanceof HTMLElement)throw new Error("Invalid dropzone element: not an instance of HTMLElement.");if(this.element.dropzone)throw new Error("Dropzone already attached.");r.instances.push(this),this.element.dropzone=this;let n=(s=r.optionsForElement(this.element))!=null?s:{};if(this.options=Object.assign({},C,n,i??{}),this.options.previewTemplate=this.options.previewTemplate.replace(/\n*/g,""),this.options.forceFallback||!r.isBrowserSupported())return this.options.fallback.call(this);if(this.options.url==null&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.uploadMultiple&&this.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");if(this.options.binaryBody&&this.options.uploadMultiple)throw new Error("You cannot set both: binaryBody and uploadMultiple.");typeof this.options.method=="string"&&(this.options.method=this.options.method.toUpperCase()),(t=this.getExistingFallback())&&t.parentNode&&t.parentNode.removeChild(t),this.options.previewsContainer!==!1&&(this.options.previewsContainer?this.previewsContainer=r.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(this.options.clickable===!0?this.clickableElements=[this.element]:this.clickableElements=r.getElements(this.options.clickable,"clickable")),this.init()}getAcceptedFiles(){return this.files.filter(e=>e.accepted).map(e=>e)}getRejectedFiles(){return this.files.filter(e=>!e.accepted).map(e=>e)}getFilesWithStatus(e){return this.files.filter(i=>i.status===e).map(i=>i)}getQueuedFiles(){return this.getFilesWithStatus(r.QUEUED)}getUploadingFiles(){return this.getFilesWithStatus(r.UPLOADING)}getAddedFiles(){return this.getFilesWithStatus(r.ADDED)}getActiveFiles(){return this.files.filter(e=>e.status===r.UPLOADING||e.status===r.QUEUED).map(e=>e)}init(){if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(r.createElement(`<div class="dz-default dz-message"><button class="dz-button" type="button">${this.options.dictDefaultMessage}</button></div>`)),this.clickableElements.length){let t=()=>{this.hiddenFileInput&&this.hiddenFileInput.parentNode?.removeChild(this.hiddenFileInput),this.hiddenFileInput=document.createElement("input"),this.hiddenFileInput.setAttribute("type","file"),this.hiddenFileInput.setAttribute("form",this.element.id),(this.options.maxFiles===null||this.options.maxFiles>1)&&this.hiddenFileInput.setAttribute("multiple","multiple"),this.hiddenFileInput.className="dz-hidden-input",this.options.acceptedFiles!==null&&this.hiddenFileInput.setAttribute("accept",this.options.acceptedFiles),this.options.capture!==null&&this.hiddenFileInput.setAttribute("capture",this.options.capture),this.hiddenFileInput.setAttribute("tabindex","-1"),this.hiddenFileInput.setAttribute("aria-label","dropzone hidden input"),this.hiddenFileInput.style.visibility="hidden",this.hiddenFileInput.style.position="absolute",this.hiddenFileInput.style.top="0",this.hiddenFileInput.style.left="0",this.hiddenFileInput.style.height="0",this.hiddenFileInput.style.width="0",r.getElement(this.options.hiddenInputContainer,"hiddenInputContainer").appendChild(this.hiddenFileInput),this.hiddenFileInput.addEventListener("change",()=>{let{files:s}=this.hiddenFileInput;if(s.length)for(let n of s)this.addFile(n);this.emit("addedfiles",s),t()})};t()}this.URL=window.URL!==null?window.URL:window.webkitURL;for(let t of this.events)this.on(t,this.options[t]);this.on("uploadprogress",()=>this.updateTotalUploadProgress()),this.on("removedfile",()=>this.updateTotalUploadProgress()),this.on("canceled",t=>this.emit("complete",t)),this.on("complete",t=>{if(this.getAddedFiles().length===0&&this.getUploadingFiles().length===0&&this.getQueuedFiles().length===0)return setTimeout(()=>this.emit("queuecomplete"),0)});const e=function(t){return t.dataTransfer.types&&t.dataTransfer.types.includes("Files")};let i=function(t){if(e(t))return t.stopPropagation(),t.preventDefault()};return this.listeners=[{element:this.element,events:{dragstart:t=>this.emit("dragstart",t),dragenter:t=>(i(t),this.emit("dragenter",t)),dragover:t=>{const s=t.dataTransfer.effectAllowed;return t.dataTransfer.dropEffect=s==="move"||s==="linkMove"?"move":"copy",i(t),this.emit("dragover",t)},dragleave:t=>this.emit("dragleave",t),drop:t=>(i(t),this.drop(t)),dragend:t=>this.emit("dragend",t)}}],this.clickableElements.forEach(t=>this.listeners.push({element:t,events:{click:s=>((t!==this.element||s.target===this.element||r.elementInside(s.target,this.element.querySelector(".dz-message")))&&this.hiddenFileInput.click(),!0)}})),this.enable(),this.options.init.call(this)}destroy(){return this.disable(),this.removeAllFiles(!0),this.hiddenFileInput!=null&&this.hiddenFileInput.parentNode&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,r.instances.splice(r.instances.indexOf(this),1)}updateTotalUploadProgress(){let e,i=0,t=0;if(this.getActiveFiles().length){for(let n of this.getActiveFiles())i+=n.upload.bytesSent,t+=n.upload.total;e=100*i/t}else e=100;return this.emit("totaluploadprogress",e,t,i)}_getParamName(e){return typeof this.options.paramName=="function"?this.options.paramName(e):`${this.options.paramName}${this.options.uploadMultiple?`[${e}]`:""}`}_renameFile(e){const i={...e,name:e.name.replace(/\u202F/g," ")};return typeof this.options.renameFile!="function"?i.name:this.options.renameFile(i)}getFallbackForm(){let e,i;if(e=this.getExistingFallback())return e;let t='<div class="dz-fallback">';this.options.dictFallbackText&&(t+=`<p>${this.options.dictFallbackText}</p>`),t+=`<input type="file" name="${this._getParamName(0)}" ${this.options.uploadMultiple?'multiple="multiple"':void 0} /><input type="submit" value="Upload!"></div>`;let s=r.createElement(t);return this.element.tagName!=="FORM"?(i=r.createElement(`<form action="${this.options.url}" enctype="multipart/form-data" method="${this.options.method}"></form>`),i.appendChild(s)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),i??s}getExistingFallback(){let e=function(t){for(let s of t)if(/(^| )fallback($| )/.test(s.className))return s};for(let t of["div","form"]){var i;if(i=e(this.element.getElementsByTagName(t)))return i}}setupEventListeners(){return this.listeners.map(e=>(()=>{let i=[];for(let t in e.events){let s=e.events[t];i.push(e.element.addEventListener(t,s,!1))}return i})())}removeEventListeners(){return this.listeners.map(e=>(()=>{let i=[];for(let t in e.events){let s=e.events[t];i.push(e.element.removeEventListener(t,s,!1))}return i})())}disable(){return this.clickableElements.forEach(e=>e.classList.remove("dz-clickable")),this.removeEventListeners(),this.disabled=!0,this.files.map(e=>this.cancelUpload(e))}enable(){return delete this.disabled,this.clickableElements.forEach(e=>e.classList.add("dz-clickable")),this.setupEventListeners()}filesize(e){let i=0,t="b";if(e>0){let s=["tb","gb","mb","kb","b"];for(let n=0;n<s.length;n++){let a=s[n],u=Math.pow(this.options.filesizeBase,4-n)/10;if(e>=u){i=e/Math.pow(this.options.filesizeBase,4-n),t=a;break}}i=Math.round(10*i)/10}return`<strong>${i}</strong> ${this.options.dictFileSizeUnits[t]}`}_updateMaxFilesReachedClass(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}drop(e){if(!e.dataTransfer)return;this.emit("drop",e);let i=[];for(let t=0;t<e.dataTransfer.files.length;t++)i[t]=e.dataTransfer.files[t];if(i.length){let{items:t}=e.dataTransfer;t&&t.length&&t[0].webkitGetAsEntry!=null?this._addFilesFromItems(t):this.handleFiles(i)}this.emit("addedfiles",i)}paste(e){if(A(e?.clipboardData,t=>t.items)==null)return;this.emit("paste",e);let{items:i}=e.clipboardData;if(i.length)return this._addFilesFromItems(i)}handleFiles(e){for(let i of e)this.addFile(i)}_addFilesFromItems(e){return(()=>{let i=[];for(let s of e){var t;s.webkitGetAsEntry!=null&&(t=s.webkitGetAsEntry())?t.isFile?i.push(this.addFile(s.getAsFile())):t.isDirectory?i.push(this._addFilesFromDirectory(t,t.name)):i.push(void 0):s.getAsFile!=null&&(s.kind==null||s.kind==="file")?i.push(this.addFile(s.getAsFile())):i.push(void 0)}return i})()}_addFilesFromDirectory(e,i){let t=e.createReader(),s=u=>S(console,"log",d=>d.log(u)),n=0;var a=()=>t.readEntries(u=>{if(u.length>0){for(let d of u)d.isFile?(++n,d.file(o=>{if(!(this.options.ignoreHiddenFiles&&o.name.substring(0,1)==="."))return o.fullPath=`${i}/${o.name}`,this.addFile(o)})):d.isDirectory&&this._addFilesFromDirectory(d,`${i}/${d.name}`);a()}else n===0&&this.emit("emptyfolder",i);return null},s);return a()}accept(e,i){this.options.maxFilesize&&e.size>this.options.maxFilesize*1048576?i(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):r.isValidFile(e,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(i(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,i):i(this.options.dictInvalidFileType)}addFile(e){e.upload={uuid:window.isSecureContext?self.crypto.randomUUID():r.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e)},this.files.push(e),e.status=r.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,i=>{i?(e.accepted=!1,this._errorProcessing([e],i)):(e.accepted=!0,this.options.autoQueue&&this.enqueueFile(e)),this._updateMaxFilesReachedClass()})}enqueueFiles(e){for(let i of e)this.enqueueFile(i);return null}enqueueFile(e){if(e.status===r.ADDED&&e.accepted===!0){if(e.status=r.QUEUED,this.options.autoProcessQueue)return setTimeout(()=>this.processQueue(),0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}_enqueueThumbnail(e){if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=this.options.maxThumbnailFilesize*1048576)return this._thumbnailQueue.push(e),setTimeout(()=>this._processThumbnailQueue(),0)}_processThumbnailQueue(){if(this._processingThumbnail||this._thumbnailQueue.length===0)return;this._processingThumbnail=!0;let e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,i=>(this.emit("thumbnail",e,i),this._processingThumbnail=!1,this._processThumbnailQueue()))}removeFile(e){if(e.status===r.UPLOADING&&this.cancelUpload(e),this.files=w(this.files,e),this.emit("removedfile",e),this.files.length===0)return this.emit("reset")}removeAllFiles(e){e==null&&(e=!1);for(let i of this.files.slice())(i.status!==r.UPLOADING||e)&&this.removeFile(i);return null}resizeImage(e,i,t,s,n){return this.createThumbnail(e,i,t,s,!0,(a,u)=>{if(u==null)return n(e);{let{resizeMimeType:d}=this.options;d==null&&(d=e.type);let o=u.toDataURL(d,this.options.resizeQuality);return(d==="image/jpeg"||d==="image/jpg")&&(o=U(e.dataURL,o)),n(r.dataURItoBlob(o))}},!0)}createThumbnail(e,i,t,s,n,a,u=!1){let d=new FileReader;d.onload=()=>{if(e.dataURL=d.result,e.type==="image/svg+xml"||e.type==="image/gif"){a?.(d.result);return}this.createThumbnailFromUrl(e,i,t,s,n,a,void 0,u)},d.readAsDataURL(e)}displayExistingFile(e,i,t,s,n=!0){if(this.emit("addedfile",e),this.emit("complete",e),!n)this.emit("thumbnail",e,i),t&&t();else{let a=u=>{this.emit("thumbnail",e,u),t&&t()};e.dataURL=i,this.createThumbnailFromUrl(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,a,s)}}createThumbnailFromUrl(e,i,t,s,n,a,u,d=!1){let o=document.createElement("img");u&&(o.crossOrigin=u),n=getComputedStyle(document.body).imageOrientation=="from-image"?!1:n,o.onload=()=>{let g=f=>f(1);return typeof EXIF<"u"&&EXIF!==null&&n&&(g=f=>EXIF.getData(o,function(){return f(EXIF.getTag(this,"Orientation"))})),g(f=>{e.width=o.width,e.height=o.height;let p=this.options.resize.call(this,e,i,t,s),m=document.createElement("canvas"),c=m.getContext("2d");switch(m.width=p.trgWidth,m.height=p.trgHeight,f>4&&(m.width=p.trgHeight,m.height=p.trgWidth),f){case 2:c.translate(m.width,0),c.scale(-1,1);break;case 3:c.translate(m.width,m.height),c.rotate(Math.PI);break;case 4:c.translate(0,m.height),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-m.width);break;case 7:c.rotate(.5*Math.PI),c.translate(m.height,-m.width),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-m.height,0);break}b(c,o,p.srcX!=null?p.srcX:0,p.srcY!=null?p.srcY:0,p.srcWidth,p.srcHeight,p.trgX!=null?p.trgX:0,p.trgY!=null?p.trgY:0,p.trgWidth,p.trgHeight);let F=m.toDataURL("image/png");if(a!=null)return a(F,m)})},a!=null&&(o.onerror=a);var h=e.dataURL;return d&&(h=L(h)),o.src=h}processQueue(){let{parallelUploads:e}=this.options,i=this.getUploadingFiles().length,t=i;if(i>=e)return;let s=this.getQueuedFiles();if(s.length>0){if(this.options.uploadMultiple)return this.processFiles(s.slice(0,e-i));for(;t<e;){if(!s.length)return;this.processFile(s.shift()),t++}}}processFile(e){return this.processFiles([e])}processFiles(e){for(let i of e)i.processing=!0,i.status=r.UPLOADING,this.emit("processing",i);return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}_getFilesWithXhr(e){return this.files.filter(i=>i.xhr===e).map(i=>i)}cancelUpload(e){if(e.status===r.UPLOADING){let i=this._getFilesWithXhr(e.xhr);for(let t of i)t.status=r.CANCELED;typeof e.xhr<"u"&&e.xhr.abort();for(let t of i)this.emit("canceled",t);this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else(e.status===r.ADDED||e.status===r.QUEUED)&&(e.status=r.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}resolveOption(e,...i){return typeof e=="function"?e.apply(this,i):e}uploadFile(e){return this.uploadFiles([e])}uploadFiles(e){this._transformFiles(e,i=>{if(this.options.chunking){let t=i[0];e[0].upload.chunked=this.options.chunking&&(this.options.forceChunking||t.size>this.options.chunkSize),e[0].upload.totalChunkCount=Math.ceil(t.size/this.options.chunkSize),t.size===0&&(e[0].upload.totalChunkCount=1)}if(e[0].upload.chunked){let t=e[0],s=i[0];t.upload.chunks=[];let n=()=>{let a=0;for(;t.upload.chunks[a]!==void 0;)a++;if(a>=t.upload.totalChunkCount)return;let u=a*this.options.chunkSize,d=Math.min(u+this.options.chunkSize,s.size),o={name:this._getParamName(0),data:s.webkitSlice?s.webkitSlice(u,d):s.slice(u,d),filename:t.upload.filename,chunkIndex:a};t.upload.chunks[a]={file:t,index:a,dataBlock:o,status:r.UPLOADING,progress:0,retries:0},this._uploadData(e,[o])};if(t.upload.finishedChunkUpload=(a,u)=>{let d=!0;a.status=r.SUCCESS,a.dataBlock=null,a.response=a.xhr.responseText,a.responseHeaders=a.xhr.getAllResponseHeaders(),a.xhr=null;for(let o=0;o<t.upload.totalChunkCount;o++){if(t.upload.chunks[o]===void 0)return n();t.upload.chunks[o].status!==r.SUCCESS&&(d=!1)}d&&this.options.chunksUploaded(t,()=>{this._finished(e,u,null)})},this.options.parallelChunkUploads){const a=Math.min(this.options.parallelChunkUploads===!0?this.options.parallelUploads:this.options.parallelChunkUploads,t.upload.totalChunkCount);for(let u=0;u<a;u++)n()}else n()}else{let t=[];for(let s=0;s<e.length;s++)t[s]={name:this._getParamName(s),data:i[s],filename:e[s].upload.filename};this._uploadData(e,t)}})}_getChunk(e,i){for(let t=0;t<e.upload.totalChunkCount;t++)if(e.upload.chunks[t]!==void 0&&e.upload.chunks[t].xhr===i)return e.upload.chunks[t]}_uploadData(e,i){let t=new XMLHttpRequest;for(let o of e)o.xhr=t;e[0].upload.chunked&&(e[0].upload.chunks[i[0].chunkIndex].xhr=t);let s=this.resolveOption(this.options.method,e,i),n=this.resolveOption(this.options.url,e,i);t.open(s,n,!0),this.resolveOption(this.options.timeout,e)&&(t.timeout=this.resolveOption(this.options.timeout,e)),t.withCredentials=!!this.options.withCredentials,t.onload=o=>{this._finishedUploading(e,t,o)},t.ontimeout=()=>{this._handleUploadError(e,t,`Request timedout after ${this.options.timeout/1e3} seconds`)},t.onerror=()=>{this._handleUploadError(e,t)};let u=t.upload!=null?t.upload:t;u.onprogress=o=>this._updateFilesUploadProgress(e,t,o);let d=this.options.defaultHeaders?{Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}:{};this.options.binaryBody&&(d["Content-Type"]=e[0].type),this.options.headers&&Object.assign(d,this.options.headers);for(let o in d){let h=d[o];h&&t.setRequestHeader(o,h)}if(this.options.binaryBody){for(let o of e)this.emit("sending",o,t);this.options.uploadMultiple&&this.emit("sendingmultiple",e,t),this.submitRequest(t,null,e)}else{let o=new FormData;if(this.options.params){let h=this.options.params;typeof h=="function"&&(h=h.call(this,e,t,e[0].upload.chunked?this._getChunk(e[0],t):null));for(let g in h){let f=h[g];if(Array.isArray(f))for(let p=0;p<f.length;p++)o.append(g,f[p]);else o.append(g,f)}}for(let h of e)this.emit("sending",h,t,o);this.options.uploadMultiple&&this.emit("sendingmultiple",e,t,o),this._addFormElementData(o);for(let h=0;h<i.length;h++){let g=i[h];o.append(g.name,g.data,g.filename)}this.submitRequest(t,o,e)}}_transformFiles(e,i){let t=[],s=0;for(let n=0;n<e.length;n++)this.options.transformFile.call(this,e[n],a=>{t[n]=a,++s===e.length&&i(t)})}_addFormElementData(e){if(this.element.tagName==="FORM")for(let i of this.element.querySelectorAll("input, textarea, select, button")){let t=i.getAttribute("name"),s=i.getAttribute("type");if(s&&(s=s.toLowerCase()),!(typeof t>"u"||t===null))if(i.tagName==="SELECT"&&i.hasAttribute("multiple"))for(let n of i.options)n.selected&&e.append(t,n.value);else(!s||s!=="checkbox"&&s!=="radio"||i.checked)&&e.append(t,i.value)}}_updateFilesUploadProgress(e,i,t){if(e[0].upload.chunked){let s=e[0],n=this._getChunk(s,i);t?(n.progress=100*t.loaded/t.total,n.total=t.total,n.bytesSent=t.loaded):(n.progress=100,n.bytesSent=n.total),s.upload.progress=0,s.upload.total=0,s.upload.bytesSent=0;for(let a=0;a<s.upload.totalChunkCount;a++)s.upload.chunks[a]&&typeof s.upload.chunks[a].progress<"u"&&(s.upload.progress+=s.upload.chunks[a].progress,s.upload.total+=s.upload.chunks[a].total,s.upload.bytesSent+=s.upload.chunks[a].bytesSent);s.upload.progress=s.upload.progress/s.upload.totalChunkCount,this.emit("uploadprogress",s,s.upload.progress,s.upload.bytesSent)}else for(let s of e)s.upload.total&&s.upload.bytesSent&&s.upload.bytesSent==s.upload.total||(t?(s.upload.progress=100*t.loaded/t.total,s.upload.total=t.total,s.upload.bytesSent=t.loaded):(s.upload.progress=100,s.upload.bytesSent=s.upload.total),this.emit("uploadprogress",s,s.upload.progress,s.upload.bytesSent))}_finishedUploading(e,i,t){let s;if(e[0].status!==r.CANCELED&&i.readyState===4){if(i.responseType!=="arraybuffer"&&i.responseType!=="blob"&&(s=i.responseText,i.getResponseHeader("content-type")&&~i.getResponseHeader("content-type").indexOf("application/json")))try{s=JSON.parse(s)}catch(n){t=n,s="Invalid JSON response from server."}this._updateFilesUploadProgress(e,i),200<=i.status&&i.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],i),s):this._finished(e,s,t):this._handleUploadError(e,i,s)}}_handleUploadError(e,i,t){if(e[0].status!==r.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){let s=this._getChunk(e[0],i);if(s.retries++<this.options.retryChunksLimit){this._uploadData(e,[s.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(e,t||this.options.dictResponseError.replace("{{statusCode}}",i.status),i)}}submitRequest(e,i,t){if(e.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}if(this.options.binaryBody)if(t[0].upload.chunked){const s=this._getChunk(t[0],e);e.send(s.dataBlock.data)}else e.send(t[0]);else e.send(i)}_finished(e,i,t){for(let s of e)s.status=r.SUCCESS,this.emit("success",s,i,t),this.emit("complete",s);if(this.options.uploadMultiple&&(this.emit("successmultiple",e,i,t),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}_errorProcessing(e,i,t){for(let s of e)s.status=r.ERROR,this.emit("error",s,i,t),this.emit("complete",s);if(this.options.uploadMultiple&&(this.emit("errormultiple",e,i,t),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}static uuidv4(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>+e/4).toString(16))}}r.initClass();r.options={};r.optionsForElement=function(l){if(l.getAttribute("id")&&typeof r.options<"u")return r.options[k(l.getAttribute("id"))]};r.instances=[];r.forElement=function(l){if(typeof l=="string"&&(l=document.querySelector(l)),l?.dropzone==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return l.dropzone};r.discover=function(){let l;if(document.querySelectorAll)l=document.querySelectorAll(".dropzone");else{l=[];let e=i=>(()=>{let t=[];for(let s of i)/(^| )dropzone($| )/.test(s.className)?t.push(l.push(s)):t.push(void 0);return t})();e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))}return(()=>{let e=[];for(let i of l)r.optionsForElement(i)!==!1?e.push(new r(i)):e.push(void 0);return e})()};r.isBrowserSupported=function(){return typeof Promise<"u"};r.dataURItoBlob=function(l){let e=atob(l.split(",")[1]),i=l.split(",")[0].split(":")[1].split(";")[0],t=new ArrayBuffer(e.length),s=new Uint8Array(t);for(let n=0,a=e.length,u=0<=a;u?n<=a:n>=a;u?n++:n--)s[n]=e.charCodeAt(n);return new Blob([t],{type:i})};const w=(l,e)=>l.filter(i=>i!==e).map(i=>i),k=l=>l.replace(/[\-_](\w)/g,e=>e.charAt(1).toUpperCase());r.createElement=function(l){let e=document.createElement("div");return e.innerHTML=l,e.childNodes[0]};r.elementInside=function(l,e){if(l===e)return!0;for(;l=l.parentNode;)if(l===e)return!0;return!1};r.getElement=function(l,e){let i;if(typeof l=="string"?i=document.querySelector(l):l.nodeType!=null&&(i=l),i==null)throw new Error(`Invalid \`${e}\` option provided. Please provide a CSS selector or a plain HTML element.`);return i};r.getElements=function(l,e){let i,t;if(l instanceof Array){t=[];try{for(i of l)t.push(this.getElement(i,e))}catch{t=null}}else if(typeof l=="string"){t=[];for(i of document.querySelectorAll(l))t.push(i)}else l.nodeType!=null&&(t=[l]);if(t==null||!t.length)throw new Error(`Invalid \`${e}\` option provided. Please provide a CSS selector, a plain HTML element or a list of those.`);return t};r.confirm=function(l,e,i){if(window.confirm(l))return e();if(i!=null)return i()};r.isValidFile=function(l,e){if(!e)return!0;e=e.split(",");let i=l.type,t=i.replace(/\/.*$/,"");for(let s of e)if(s=s.trim(),s.charAt(0)==="."){if(l.name.toLowerCase().indexOf(s.toLowerCase(),l.name.length-s.length)!==-1)return!0}else if(/\/\*$/.test(s)){if(t===s.replace(/\/.*$/,""))return!0}else if(i===s)return!0;return!1};typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(l){return this.each(function(){return new r(this,l)})});r.ADDED="added";r.QUEUED="queued";r.ACCEPTED=r.QUEUED;r.UPLOADING="uploading";r.PROCESSING=r.UPLOADING;r.CANCELED="canceled";r.ERROR="error";r.SUCCESS="success";let z=function(l){let e=l.naturalHeight,i=document.createElement("canvas");i.width=1,i.height=e;let t=i.getContext("2d");t.drawImage(l,0,0);let{data:s}=t.getImageData(1,0,1,e),n=0,a=e,u=e;for(;u>n;)s[(u-1)*4+3]===0?a=u:n=u,u=a+n>>1;let d=u/e;return d===0?1:d};var b=function(l,e,i,t,s,n,a,u,d,o){let h=z(e);return l.drawImage(e,i,t,s,n,a,u,d,o/h)};function L(l){var e="data:image/jpeg;base64,";if(!l.startsWith(e))return l;var i=window.atob(l.slice(e.length));if(!i.startsWith("ÿØÿ"))return l;for(var t=0,s="";t<i.length;)if(i.slice(t,t+2)=="ÿÚ"){s+=i.slice(t);break}else if(i.slice(t,t+2)=="ÿØ")s+=i.slice(t,t+2),t+=2;else{var n=i.charCodeAt(t+2)*256+i.charCodeAt(t+3),a=t+n+2,u=i.slice(t,a);u.startsWith("ÿá")||(s+=u),t=a}return e+window.btoa(s)}function U(l,e){var i="data:image/jpeg;base64,";if(!(l.startsWith(i)&&e.startsWith(i)))return e;var t=window.atob(l.slice(i.length));if(!t.startsWith("ÿØÿ"))return e;for(var s=0,n="";s<t.length&&t.slice(s,s+2)!="ÿÚ";)if(t.slice(s,s+2)=="ÿØ")s+=2;else{var a=t.charCodeAt(s+2)*256+t.charCodeAt(s+3),u=s+a+2,d=t.slice(s,u);d.startsWith("ÿá")&&(n+=d),s=u}if(n=="")return e;var o=window.atob(e.slice(i.length));if(!o.startsWith("ÿØÿ"))return e;var h=4+o.charCodeAt(4)*256+o.charCodeAt(5);return o=o.slice(0,h)+n+o.slice(h),i+window.btoa(o)}function A(l,e){return typeof l<"u"&&l!==null?e(l):void 0}function S(l,e,i){if(typeof l<"u"&&l!==null&&typeof l[e]=="function")return i(l,e)}export{r as Dropzone,r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__require as u}from"../dist/predicate/isEqual2.js";var r,e;function i(){return e||(e=1,r=u().isEqual),r}export{i as __require};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__exports as e}from"../../../../../../../../_virtual/getSymbols.js";var o;function i(){return o?e:(o=1,(function(r){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});function l(t){return Object.getOwnPropertySymbols(t).filter(n=>Object.prototype.propertyIsEnumerable.call(t,n))}r.getSymbols=l})(e),e)}export{i as __require};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__exports as t}from"../../../../../../../../_virtual/getTag.js";var n;function u(){return n?t:(n=1,(function(r){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});function o(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}r.getTag=o})(t),t)}export{u as __require};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__exports as r}from"../../../../../../../../_virtual/tags.js";var t;function v(){return t?r:(t=1,(function(a){Object.defineProperty(a,Symbol.toStringTag,{value:"Module"});const n="[object RegExp]",g="[object String]",c="[object Number]",o="[object Boolean]",T="[object Arguments]",e="[object Symbol]",i="[object Date]",y="[object Map]",b="[object Set]",A="[object Array]",j="[object Function]",u="[object ArrayBuffer]",l="[object Object]",f="[object Error]",m="[object DataView]",s="[object Uint8Array]",d="[object Uint8ClampedArray]",U="[object Uint16Array]",B="[object Uint32Array]",I="[object BigUint64Array]",S="[object Int8Array]",_="[object Int16Array]",q="[object Int32Array]",w="[object BigInt64Array]",C="[object Float32Array]",F="[object Float64Array]";a.argumentsTag=T,a.arrayBufferTag=u,a.arrayTag=A,a.bigInt64ArrayTag=w,a.bigUint64ArrayTag=I,a.booleanTag=o,a.dataViewTag=m,a.dateTag=i,a.errorTag=f,a.float32ArrayTag=C,a.float64ArrayTag=F,a.functionTag=j,a.int16ArrayTag=_,a.int32ArrayTag=q,a.int8ArrayTag=S,a.mapTag=y,a.numberTag=c,a.objectTag=l,a.regexpTag=n,a.setTag=b,a.stringTag=g,a.symbolTag=e,a.uint16ArrayTag=U,a.uint32ArrayTag=B,a.uint8ArrayTag=s,a.uint8ClampedArrayTag=d})(r),r)}export{v as __require};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeWith as e}from"./mergeWith.js";import{noop as m}from"../../function/
|
|
1
|
+
import{mergeWith as e}from"./mergeWith.js";import{noop as m}from"../../function/noop2.js";function n(r,...o){return e(r,...o,m)}export{n as merge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{after as i}from"../../function/after.js";import{isEqualWith as m}from"../../predicate/
|
|
1
|
+
import{after as i}from"../../function/after.js";import{isEqualWith as m}from"../../predicate/isEqualWith2.js";function o(r,n,t){return typeof t!="function"&&(t=()=>{}),m(r,n,(...e)=>{const f=t(...e);if(f!==void 0)return!!f;if(r instanceof Map&&n instanceof Map)return o(Array.from(r),Array.from(n),i(2,t));if(r instanceof Set&&n instanceof Set)return o(Array.from(r),Array.from(n),i(2,t))})}export{o as isEqualWith};
|
package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/util/eq2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__exports as e}from"../../../../../../../../_virtual/eq.js";var n;function q(){return n?e:(n=1,(function(r){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});function t(i,u){return i===u||Number.isNaN(i)&&Number.isNaN(u)}r.eq=t})(e),e)}export{q as __require};
|
package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/function/noop.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function o(){}export{
|
|
1
|
+
import{__exports as o}from"../../../../../../../_virtual/noop.js";var e;function i(){return e?o:(e=1,(function(r){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"});function n(){}r.noop=n})(o),o)}export{i as __require};
|
package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/function/noop2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function o(){}export{o as noop};
|
package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqual.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isEqualWith as i}from"./
|
|
1
|
+
import{isEqualWith as i}from"./isEqualWith2.js";import{noop as t}from"../function/noop2.js";function p(o,r){return i(o,r,t)}export{p as isEqual};
|
package/dist/node_modules/.pnpm/es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqual2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__exports as r}from"../../../../../../../_virtual/isEqual2.js";import{__require as q}from"./isEqualWith.js";import{__require as s}from"../function/noop.js";var i;function E(){return i?r:(i=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const u=q(),o=s();function t(a,n){return u.isEqualWith(a,n,o.noop)}e.isEqual=t})(r),r)}export{E as __require};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__exports as h}from"../../../../../../../_virtual/isEqualWith.js";import{__require as v}from"./isPlainObject.js";import{__require as I}from"../compat/_internal/getSymbols2.js";import{__require as P}from"../compat/_internal/getTag2.js";import{__require as B}from"../compat/_internal/tags2.js";import{__require as W}from"../compat/util/eq2.js";var j;function G(){return j?h:(j=1,(function(p){Object.defineProperty(p,Symbol.toStringTag,{value:"Module"});const O=v(),q=I(),A=P(),t=B(),_=W();function w(r,e,n){return g(r,e,void 0,void 0,void 0,void 0,n)}function g(r,e,n,u,f,a,c){const m=c(r,e,n,u,f,a);if(m!==void 0)return m;if(typeof r==typeof e)switch(typeof r){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return r===e;case"number":return r===e||Object.is(r,e);case"function":return r===e;case"object":return l(r,e,a,c)}return l(r,e,a,c)}function l(r,e,n,u){if(Object.is(r,e))return!0;let f=A.getTag(r),a=A.getTag(e);if(f===t.argumentsTag&&(f=t.objectTag),a===t.argumentsTag&&(a=t.objectTag),f!==a)return!1;switch(f){case t.stringTag:return r.toString()===e.toString();case t.numberTag:{const s=r.valueOf(),i=e.valueOf();return _.eq(s,i)}case t.booleanTag:case t.dateTag:case t.symbolTag:return Object.is(r.valueOf(),e.valueOf());case t.regexpTag:return r.source===e.source&&r.flags===e.flags;case t.functionTag:return r===e}n=n??new Map;const c=n.get(r),m=n.get(e);if(c!=null&&m!=null)return c===e;n.set(r,e),n.set(e,r);try{switch(f){case t.mapTag:{if(r.size!==e.size)return!1;for(const[s,i]of r.entries())if(!e.has(s)||!g(i,e.get(s),s,r,e,n,u))return!1;return!0}case t.setTag:{if(r.size!==e.size)return!1;const s=Array.from(r.values()),i=Array.from(e.values());for(let y=0;y<s.length;y++){const T=s[y],o=i.findIndex(d=>g(T,d,void 0,r,e,n,u));if(o===-1)return!1;i.splice(o,1)}return!0}case t.arrayTag:case t.uint8ArrayTag:case t.uint8ClampedArrayTag:case t.uint16ArrayTag:case t.uint32ArrayTag:case t.bigUint64ArrayTag:case t.int8ArrayTag:case t.int16ArrayTag:case t.int32ArrayTag:case t.bigInt64ArrayTag:case t.float32ArrayTag:case t.float64ArrayTag:{if(typeof Buffer<"u"&&Buffer.isBuffer(r)!==Buffer.isBuffer(e)||r.length!==e.length)return!1;for(let s=0;s<r.length;s++)if(!g(r[s],e[s],s,r,e,n,u))return!1;return!0}case t.arrayBufferTag:return r.byteLength!==e.byteLength?!1:l(new Uint8Array(r),new Uint8Array(e),n,u);case t.dataViewTag:return r.byteLength!==e.byteLength||r.byteOffset!==e.byteOffset?!1:l(new Uint8Array(r),new Uint8Array(e),n,u);case t.errorTag:return r.name===e.name&&r.message===e.message;case t.objectTag:{if(!(l(r.constructor,e.constructor,n,u)||O.isPlainObject(r)&&O.isPlainObject(e)))return!1;const i=[...Object.keys(r),...q.getSymbols(r)],y=[...Object.keys(e),...q.getSymbols(e)];if(i.length!==y.length)return!1;for(let T=0;T<i.length;T++){const o=i[T],d=r[o];if(!Object.hasOwn(e,o))return!1;const S=e[o];if(!g(d,S,o,r,e,n,u))return!1}return!0}default:return!1}}finally{n.delete(r),n.delete(e)}}p.isEqualWith=w})(h),h)}export{G as __require};
|