From: Alexander Ebert Date: Wed, 19 Jul 2023 15:41:26 +0000 (+0200) Subject: Update the CKEditor 5 bundle X-Git-Tag: 6.0.0_Alpha_7~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=74bf0f9a6832babf079fc278b52b7b35d68fd108;p=GitHub%2FWoltLab%2FWCF.git Update the CKEditor 5 bundle --- diff --git a/wcfsetup/install/files/js/3rdParty/ckeditor/ckeditor5.bundle.js b/wcfsetup/install/files/js/3rdParty/ckeditor/ckeditor5.bundle.js index 75707f7f75..0e4e5ce972 100644 --- a/wcfsetup/install/files/js/3rdParty/ckeditor/ckeditor5.bundle.js +++ b/wcfsetup/install/files/js/3rdParty/ckeditor/ckeditor5.bundle.js @@ -1,2 +1,2 @@ /*! For license information please see ckeditor5.bundle.js.LICENSE.txt */ -var CKEditor5;!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1","Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue","Blue marker":"Blue marker",Bold:"Bold",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colors",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Edit source":"Edit source","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor editing area: %0":"Editor editing area: %0","Editor toolbar":"Editor toolbar","Empty snippet content":"Empty snippet content","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green","Green marker":"Green marker","Green pen":"Green pen",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",Height:"Height",Highlight:"Highlight","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","HTML snippet":"HTML snippet",Huge:"Huge","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent",Insert:"Insert","Insert code block":"Insert code block","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert HTML":"Insert HTML","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset",Italic:"Italic",Justify:"Justify","Justify cell text":"Justify cell text","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells",Next:"Next","No preview available":"No preview available",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Paste raw HTML here...":"Paste raw HTML here...","Pink marker":"Pink marker","Plain text":"Plain text","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous",Purple:"Purple",Red:"Red","Red pen":"Red pen",Redo:"Redo","Remove color":"Remove color","Remove Format":"Remove Format","Remove highlight":"Remove highlight","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Rich Text Editor":"Rich Text Editor",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Save changes":"Save changes","Saving changes":"Saving changes","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Side image":"Side image",Small:"Small",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative","Text highlight toolbar":"Text highlight toolbar",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"This link has no URL":"This link has no URL",Tiny:"Tiny","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower–latin list style":"Toggle the lower–latin list style","Toggle the lower–roman list style":"Toggle the lower–roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper–latin list style":"Toggle the upper–latin list style","Toggle the upper–roman list style":"Toggle the upper–roman list style",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow","Yellow marker":"Yellow marker"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),(()=>{var e={511:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Alignment:()=>p,AlignmentEditing:()=>u,AlignmentUI:()=>g});var o=i(6854),n=i(6553);const r=["left","right","center","justify"];function s(e){return r.includes(e)}function a(e,t){return"rtl"==t.contentLanguageDirection?"right"===e:"left"===e}function l(e){const t=e.map((e=>{let t;return t="string"==typeof e?{name:e}:e,t})).filter((e=>{const t=r.includes(e.name);return t||(0,n.KE)("alignment-config-name-not-recognized",{option:e}),t})),i=t.filter((e=>Boolean(e.className))).length;if(i&&i{const r=o.slice(i+1);if(r.some((e=>e.name==t.name)))throw new n.Bb("alignment-config-name-already-defined",{option:t,configuredOptions:e});if(t.className&&r.some((e=>e.className==t.className)))throw new n.Bb("alignment-config-classname-already-defined",{option:t,configuredOptions:e})})),t}const c="alignment";class d extends o.mY{refresh(){const e=this.editor.locale,t=(0,n.Ps)(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=Boolean(t)&&this._canBeAligned(t),this.isEnabled&&t.hasAttribute("alignment")?this.value=t.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}execute(e={}){const t=this.editor,i=t.locale,o=t.model,n=o.document,r=e.value;o.change((e=>{const t=Array.from(n.selection.getSelectedBlocks()).filter((e=>this._canBeAligned(e))),o=t[0].getAttribute("alignment");a(r,i)||o===r||!r?function(e,t){for(const i of e)t.removeAttribute(c,i)}(t,e):function(e,t,i){for(const o of e)t.setAttribute(c,i,o)}(t,e,r)}))}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,c)}}class u extends o.Sy{static get pluginName(){return"AlignmentEditing"}constructor(e){super(e),e.config.define("alignment",{options:r.map((e=>({name:e})))})}init(){const e=this.editor,t=e.locale,i=e.model.schema,o=l(e.config.get("alignment.options")).filter((e=>s(e.name)&&!a(e.name,t))),n=o.some((e=>!!e.className));i.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),n?e.conversion.attributeToAttribute(function(e){const t={};for(const i of e)t[i.name]={key:"class",value:i.className};return{model:{key:"alignment",values:e.map((e=>e.name))},view:t}}(o)):e.conversion.for("downcast").attributeToAttribute(function(e){const t={};for(const{name:i}of e)t[i]={key:"style",value:{"text-align":i}};return{model:{key:"alignment",values:e.map((e=>e.name))},view:t}}(o));const r=function(e){const t=[];for(const{name:i}of e)t.push({view:{key:"style",value:{"text-align":i}},model:{key:"alignment",value:i}});return t}(o);for(const t of r)e.conversion.for("upcast").attributeToAttribute(t);const c=function(e){const t=[];for(const{name:i}of e)t.push({view:{key:"align",value:i},model:{key:"alignment",value:i}});return t}(o);for(const t of c)e.conversion.for("upcast").attributeToAttribute(t);e.commands.add("alignment",new d(e))}}var h=i(7095);const m=new Map([["left",o.icons.alignLeft],["right",o.icons.alignRight],["center",o.icons.alignCenter],["justify",o.icons.alignJustify]]);class g extends o.Sy{get localizedOptionTitles(){const e=this.editor.t;return{left:e("Align left"),right:e("Align right"),center:e("Align center"),justify:e("Justify")}}static get pluginName(){return"AlignmentUI"}init(){const e=this.editor,t=e.ui.componentFactory,i=e.t,o=l(e.config.get("alignment.options"));o.map((e=>e.name)).filter(s).forEach((e=>this._addButton(e))),t.add("alignment",(n=>{const r=(0,h.t9)(n);(0,h.up)(r,(()=>o.map((e=>t.create(`alignment:${e.name}`)))),{enableActiveItemFocusOnDropdownOpen:!0,isVertical:!0,ariaLabel:i("Text alignment toolbar")}),r.buttonView.set({label:i("Text alignment"),tooltip:!0}),r.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const s="rtl"===n.contentLanguageDirection?m.get("right"):m.get("left"),a=e.commands.get("alignment");return r.buttonView.bind("icon").to(a,"value",(e=>m.get(e)||s)),r.bind("isEnabled").to(a,"isEnabled"),this.listenTo(r,"execute",(()=>{e.editing.view.focus()})),r}))}_addButton(e){const t=this.editor;t.ui.componentFactory.add(`alignment:${e}`,(i=>{const o=t.commands.get("alignment"),n=new h.r5(i);return n.set({label:this.localizedOptionTitles[e],icon:m.get(e),tooltip:!0,isToggleable:!0}),n.bind("isEnabled").to(o),n.bind("isOn").to(o,"value",(t=>t===e)),this.listenTo(n,"execute",(()=>{t.execute("alignment",{value:e}),t.editing.view.focus()})),n}))}}class p extends o.Sy{static get requires(){return[u,g]}static get pluginName(){return"Alignment"}}},6549:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Autosave:()=>s});var o=i(6854),n=i(6553),r=i(6682);class s extends o.Sy{static get pluginName(){return"Autosave"}static get requires(){return[o.lR]}constructor(e){super(e),this._action=null;const t=e.config.get("autosave")||{},i=t.waitingTime||1e3;this.set("state","synchronized"),this._debouncedSave=(0,r.Z)(this._save.bind(this),i),this._lastDocumentVersion=e.model.document.version,this._savePromise=null,this._domEmitter=new((0,n.Xu)()),this._config=t,this._pendingActions=e.plugins.get(o.lR),this._makeImmediateSave=!1}init(){const e=this.editor,t=e.model.document;this.listenTo(e,"ready",(()=>{this.listenTo(t,"change:data",((e,t)=>{this._saveCallbacks.length&&t.isLocal&&("synchronized"===this.state&&(this.state="waiting",this._setPendingAction()),"waiting"===this.state&&this._debouncedSave())}))})),this.listenTo(e,"destroy",(()=>this._flush()),{priority:"highest"}),this._domEmitter.listenTo(window,"beforeunload",((e,t)=>{this._pendingActions.hasAny&&(t.returnValue=this._pendingActions.first.message)}))}destroy(){this._domEmitter.stopListening(),super.destroy()}save(){return this._debouncedSave.cancel(),this._save()}_flush(){this._debouncedSave.flush()}_save(){return this._savePromise?(this._makeImmediateSave=this.editor.model.document.version>this._lastDocumentVersion,this._savePromise):(this._setPendingAction(),this.state="saving",this._lastDocumentVersion=this.editor.model.document.version,this._savePromise=Promise.resolve().then((()=>Promise.all(this._saveCallbacks.map((e=>e(this.editor)))))).finally((()=>{this._savePromise=null})).then((()=>{if(this._makeImmediateSave)return this._makeImmediateSave=!1,this._save();this.editor.model.document.version>this._lastDocumentVersion?(this.state="waiting",this._debouncedSave()):(this.state="synchronized",this._pendingActions.remove(this._action),this._action=null)})).catch((e=>{throw this.state="error",this.state="saving",this._debouncedSave(),e})),this._savePromise)}_setPendingAction(){const e=this.editor.t;this._action||(this._action=this._pendingActions.add(e("Saving changes")))}get _saveCallbacks(){const e=[];return this.adapter&&this.adapter.save&&e.push(this.adapter.save),this._config.save&&e.push(this._config.save),e}}},1214:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Bold:()=>d,BoldEditing:()=>s,BoldUI:()=>c,Code:()=>S,CodeEditing:()=>m,CodeUI:()=>T,Italic:()=>O,ItalicEditing:()=>I,ItalicUI:()=>R,Strikethrough:()=>D,StrikethroughEditing:()=>M,StrikethroughUI:()=>N,Subscript:()=>Z,SubscriptEditing:()=>F,SubscriptUI:()=>W,Superscript:()=>K,SuperscriptEditing:()=>j,SuperscriptUI:()=>q,Underline:()=>X,UnderlineEditing:()=>J,UnderlineUI:()=>Q});var o=i(6854);class n extends o.mY{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,i=t.document.selection,o=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(i.isCollapsed)o?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const n=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of n)o?e.setAttribute(this.attributeKey,o,t):e.removeAttribute(this.attributeKey,t)}}))}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,i=e.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const e of i.getRanges())for(const i of e.getItems())if(t.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}const r="bold";class s extends o.Sy{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:r}),e.model.schema.setAttributeProperties(r,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:r,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t&&("bold"==t||Number(t)>=600)?{name:!0,styles:["font-weight"]}:null}]}),e.commands.add(r,new n(e,r)),e.keystrokes.set("CTRL+B",r)}}var a=i(7095);const l="bold";class c extends o.Sy{static get pluginName(){return"BoldUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(l,(i=>{const n=e.commands.get(l),r=new a.r5(i);return r.set({label:t("Bold"),icon:o.icons.bold,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute(l),e.editing.view.focus()})),r}))}}class d extends o.Sy{static get requires(){return[s,c]}static get pluginName(){return"Bold"}}var u=i(5187);const h="code";class m extends o.Sy{static get pluginName(){return"CodeEditing"}static get requires(){return[u.mh]}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:h}),e.model.schema.setAttributeProperties(h,{isFormatting:!0,copyOnEnter:!1}),e.conversion.attributeToElement({model:h,view:"code",upcastAlso:{styles:{"word-wrap":"break-word"}}}),e.commands.add(h,new n(e,h)),e.plugins.get(u.mh).registerAttribute(h),(0,u.Im)(e,h,"code","ck-code_selected")}}var g=i(3379),p=i.n(g),f=i(9037),b=i.n(f),w=i(569),k=i.n(w),_=i(8575),v=i.n(_),y=i(9216),C=i.n(y),x=i(5363),A={attributes:{"data-cke":!0}};A.setAttributes=v(),A.insert=k().bind(null,"head"),A.domAPI=b(),A.insertStyleElement=C(),p()(x.Z,A),x.Z&&x.Z.locals&&x.Z.locals;const E="code";class T extends o.Sy{static get pluginName(){return"CodeUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(E,(i=>{const o=e.commands.get(E),n=new a.r5(i);return n.set({label:t("Code"),icon:'',tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute(E),e.editing.view.focus()})),n}))}}class S extends o.Sy{static get requires(){return[m,T]}static get pluginName(){return"Code"}}const P="italic";class I extends o.Sy{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:P}),e.model.schema.setAttributeProperties(P,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:P,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(P,new n(e,P)),e.keystrokes.set("CTRL+I",P)}}const V="italic";class R extends o.Sy{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(V,(i=>{const o=e.commands.get(V),n=new a.r5(i);return n.set({label:t("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute(V),e.editing.view.focus()})),n}))}}class O extends o.Sy{static get requires(){return[I,R]}static get pluginName(){return"Italic"}}const B="strikethrough";class M extends o.Sy{static get pluginName(){return"StrikethroughEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:B}),e.model.schema.setAttributeProperties(B,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:B,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add(B,new n(e,B)),e.keystrokes.set("CTRL+SHIFT+X","strikethrough")}}const z="strikethrough";class N extends o.Sy{static get pluginName(){return"StrikethroughUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(z,(i=>{const o=e.commands.get(z),n=new a.r5(i);return n.set({label:t("Strikethrough"),icon:'',keystroke:"CTRL+SHIFT+X",tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute(z),e.editing.view.focus()})),n}))}}class D extends o.Sy{static get requires(){return[M,N]}static get pluginName(){return"Strikethrough"}}const L="subscript";class F extends o.Sy{static get pluginName(){return"SubscriptEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:L}),e.model.schema.setAttributeProperties(L,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:L,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),e.commands.add(L,new n(e,L))}}const H="subscript";class W extends o.Sy{static get pluginName(){return"SubscriptUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(H,(i=>{const o=e.commands.get(H),n=new a.r5(i);return n.set({label:t("Subscript"),icon:'',tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute(H),e.editing.view.focus()})),n}))}}class Z extends o.Sy{static get requires(){return[F,W]}static get pluginName(){return"Subscript"}}const U="superscript";class j extends o.Sy{static get pluginName(){return"SuperscriptEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:U}),e.model.schema.setAttributeProperties(U,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:U,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),e.commands.add(U,new n(e,U))}}const $="superscript";class q extends o.Sy{static get pluginName(){return"SuperscriptUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add($,(i=>{const o=e.commands.get($),n=new a.r5(i);return n.set({label:t("Superscript"),icon:'',tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute($),e.editing.view.focus()})),n}))}}class K extends o.Sy{static get requires(){return[j,q]}static get pluginName(){return"Superscript"}}const G="underline";class J extends o.Sy{static get pluginName(){return"UnderlineEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:G}),e.model.schema.setAttributeProperties(G,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:G,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),e.commands.add(G,new n(e,G)),e.keystrokes.set("CTRL+U","underline")}}const Y="underline";class Q extends o.Sy{static get pluginName(){return"UnderlineUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Y,(i=>{const o=e.commands.get(Y),n=new a.r5(i);return n.set({label:t("Underline"),icon:'',keystroke:"CTRL+U",tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute(Y),e.editing.view.focus()})),n}))}}class X extends o.Sy{static get requires(){return[J,Q]}static get pluginName(){return"Underline"}}},4210:(e,t,i)=>{"use strict";i.r(t),i.d(t,{BlockQuote:()=>E,BlockQuoteEditing:()=>u,BlockQuoteUI:()=>A});var o=i(6854),n=i(1863),r=i(5187),s=i(6553);class a extends o.mY{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.schema,o=t.document.selection,n=Array.from(o.getSelectedBlocks()),r=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(r){const t=n.filter((e=>l(e)||d(i,e)));this._applyQuote(e,t)}else this._removeQuote(e,n.filter(l))}))}_getValue(){const e=this.editor.model.document.selection,t=(0,s.Ps)(e.getSelectedBlocks());return!(!t||!l(t))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,i=(0,s.Ps)(e.getSelectedBlocks());return!!i&&d(t,i)}_removeQuote(e,t){c(e,t).reverse().forEach((t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const i=e.createPositionBefore(t.start.parent);return void e.move(t,i)}t.end.isAtEnd||e.split(t.end);const i=e.createPositionAfter(t.end.parent);e.move(t,i)}))}_applyQuote(e,t){const i=[];c(e,t).reverse().forEach((t=>{let o=l(t.start);o||(o=e.createElement("blockQuote"),e.wrap(t,o)),i.push(o)})),i.reverse().reduce(((t,i)=>t.nextSibling==i?(e.merge(e.createPositionAfter(t)),t):i))}}function l(e){return"blockQuote"==e.parent.name?e.parent:null}function c(e,t){let i,o=0;const n=[];for(;o{const o=e.model.document.differ.getChanges();for(const e of o)if("insert"==e.type){const o=e.position.nodeAfter;if(!o)continue;if(o.is("element","blockQuote")&&o.isEmpty)return i.remove(o),!0;if(o.is("element","blockQuote")&&!t.checkChild(e.position,o))return i.unwrap(o),!0;if(o.is("element")){const e=i.createRangeIn(o);for(const o of e.getItems())if(o.is("element","blockQuote")&&!t.checkChild(i.createPositionBefore(o),o))return i.unwrap(o),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return i.remove(t),!0}return!1}));const i=this.editor.editing.view.document,o=e.model.document.selection,n=e.commands.get("blockQuote");this.listenTo(i,"enter",((t,i)=>{o.isCollapsed&&n.value&&o.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),i.preventDefault(),t.stop())}),{context:"blockquote"}),this.listenTo(i,"delete",((t,i)=>{if("backward"!=i.direction||!o.isCollapsed||!n.value)return;const r=o.getLastPosition().parent;r.isEmpty&&!r.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),i.preventDefault(),t.stop())}),{context:"blockquote"})}}var h=i(7095),m=i(3379),g=i.n(m),p=i(9037),f=i.n(p),b=i(569),w=i.n(b),k=i(8575),_=i.n(k),v=i(9216),y=i.n(v),C=i(3789),x={attributes:{"data-cke":!0}};x.setAttributes=_(),x.insert=w().bind(null,"head"),x.domAPI=f(),x.insertStyleElement=y(),g()(C.Z,x),C.Z&&C.Z.locals&&C.Z.locals;class A extends o.Sy{static get pluginName(){return"BlockQuoteUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("blockQuote",(i=>{const n=e.commands.get("blockQuote"),r=new h.r5(i);return r.set({label:t("Block quote"),icon:o.icons.quote,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute("blockQuote"),e.editing.view.focus()})),r}))}}class E extends o.Sy{static get requires(){return[u,A]}static get pluginName(){return"BlockQuote"}}},9998:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CodeBlock:()=>V,CodeBlockEditing:()=>g,CodeBlockUI:()=>I});var o=i(6854),n=i(1863),r=i(3291),s=i(6553),a=i(4934);class l extends o.mY{constructor(e){super(e),this._lastLanguage=null}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor,i=t.model,o=i.document.selection,n=(0,a.getNormalizedAndLocalizedLanguageDefinitions)(t)[0],r=Array.from(o.getSelectedBlocks()),s=null==e.forceValue?!this.value:e.forceValue,l=function(e,t,i){return e.language?e.language:e.usePreviousLanguageChoice&&t?t:i}(e,this._lastLanguage,n.language);i.change((e=>{s?this._applyCodeBlock(e,r,l):this._removeCodeBlock(e,r)}))}_getValue(){const e=this.editor.model.document.selection,t=(0,s.Ps)(e.getSelectedBlocks());return!(!t||!t.is("element","codeBlock"))&&t.getAttribute("language")}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,i=(0,s.Ps)(e.getSelectedBlocks());return!!i&&(0,a.canBeCodeBlock)(t,i)}_applyCodeBlock(e,t,i){this._lastLanguage=i;const o=this.editor.model.schema,n=t.filter((e=>(0,a.canBeCodeBlock)(o,e)));for(const t of n)e.rename(t,"codeBlock"),e.setAttribute("language",i,t),o.removeDisallowedAttributes([t],e),Array.from(t.getChildren()).filter((e=>!o.checkChild(t,e))).forEach((t=>e.remove(t)));n.reverse().forEach(((t,i)=>{const o=n[i+1];t.previousSibling===o&&(e.appendElement("softBreak",o),e.merge(e.createPositionBefore(t)))}))}_removeCodeBlock(e,t){const i=t.filter((e=>e.is("element","codeBlock")));for(const t of i){const i=e.createRangeOn(t);for(const t of Array.from(i.getItems()).reverse())if(t.is("element","softBreak")&&t.parent.is("element","codeBlock")){const{position:i}=e.split(e.createPositionBefore(t)),o=i.nodeAfter;e.rename(o,"paragraph"),e.removeAttribute("language",o),e.remove(t)}e.rename(t,"paragraph"),e.removeAttribute("language",t)}}}class c extends o.mY{constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model;e.change((t=>{const i=(0,a.getIndentOutdentPositions)(e);for(const o of i){const i=t.createText(this._indentSequence);e.insertContent(i,o)}}))}_checkEnabled(){return!!this._indentSequence&&(0,a.isModelSelectionInCodeBlock)(this.editor.model.document.selection)}}class d extends o.mY{constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model;e.change((()=>{const t=(0,a.getIndentOutdentPositions)(e);for(const i of t){const t=u(e,i,this._indentSequence);t&&e.deleteContent(e.createSelection(t))}}))}_checkEnabled(){if(!this._indentSequence)return!1;const e=this.editor.model;return!!(0,a.isModelSelectionInCodeBlock)(e.document.selection)&&(0,a.getIndentOutdentPositions)(e).some((t=>u(e,t,this._indentSequence)))}}function u(e,t,i){const o=function(e){let t=e.parent.getChild(e.index);return t&&!t.is("element","softBreak")||(t=e.nodeBefore),!t||t.is("element","softBreak")?null:t}(t);if(!o)return null;const n=(0,a.getLeadingWhiteSpaces)(o),r=n.lastIndexOf(i);if(r+i.length!==n.length)return null;if(-1===r)return null;const{parent:s,startOffset:l}=o;return e.createRange(e.createPositionAt(s,l+r),e.createPositionAt(s,l+r+i.length))}function h(e,t,i=!1){const o=(0,a.getPropertyAssociation)(t,"language","class"),n=(0,a.getPropertyAssociation)(t,"language","label");return(t,r,s)=>{const{writer:a,mapper:l,consumable:c}=s;if(!c.consume(r.item,"insert"))return;const d=r.item.getAttribute("language"),u=l.toViewPosition(e.createPositionBefore(r.item)),h={};i&&(h["data-language"]=n[d],h.spellcheck="false");const m=o[d]?{class:o[d]}:void 0,g=a.createContainerElement("code",m),p=a.createContainerElement("pre",h,g);a.insert(u,p),l.bindElements(r.item,g)}}const m="paragraph";class g extends o.Sy{static get pluginName(){return"CodeBlockEditing"}static get requires(){return[n.G]}constructor(e){super(e),e.config.define("codeBlock",{languages:[{language:"plaintext",label:"Plain text"},{language:"c",label:"C"},{language:"cs",label:"C#"},{language:"cpp",label:"C++"},{language:"css",label:"CSS"},{language:"diff",label:"Diff"},{language:"html",label:"HTML"},{language:"java",label:"Java"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"python",label:"Python"},{language:"ruby",label:"Ruby"},{language:"typescript",label:"TypeScript"},{language:"xml",label:"XML"}],indentSequence:"\t"})}init(){const e=this.editor,t=e.model.schema,i=e.model,o=e.editing.view,n=e.plugins.has("DocumentListEditing"),s=(0,a.getNormalizedAndLocalizedLanguageDefinitions)(e);e.commands.add("codeBlock",new l(e)),e.commands.add("indentCodeBlock",new c(e)),e.commands.add("outdentCodeBlock",new d(e)),this.listenTo(o.document,"tab",((t,i)=>{const o=i.shiftKey?"outdentCodeBlock":"indentCodeBlock";e.commands.get(o).isEnabled&&(e.execute(o),i.stopPropagation(),i.preventDefault(),t.stop())}),{context:"pre"}),t.register("codeBlock",{allowWhere:"$block",allowChildren:"$text",isBlock:!0,allowAttributes:["language"]}),t.addAttributeCheck(((e,t)=>{const i=e.endsWith("codeBlock")&&t.startsWith("list")&&"list"!==t;return!(!n||!i)||!e.endsWith("codeBlock $text")&&void 0})),e.model.schema.addChildCheck(((e,t)=>{if(e.endsWith("codeBlock")&&t.isObject)return!1})),e.editing.downcastDispatcher.on("insert:codeBlock",h(i,s,!0)),e.data.downcastDispatcher.on("insert:codeBlock",h(i,s)),e.data.downcastDispatcher.on("insert:softBreak",function(e){return(t,i,o)=>{if("codeBlock"!==i.item.parent.name)return;const{writer:n,mapper:r,consumable:s}=o;if(!s.consume(i.item,"insert"))return;const a=r.toViewPosition(e.createPositionBefore(i.item));n.insert(a,n.createText("\n"))}}(i),{priority:"high"}),e.data.upcastDispatcher.on("element:code",function(e,t){const i=(0,a.getPropertyAssociation)(t,"class","language"),o=t[0].language;return(e,t,n)=>{const r=t.viewItem,s=r.parent;if(!s||!s.is("element","pre"))return;if(t.modelCursor.findAncestor("codeBlock"))return;const{consumable:a,writer:l}=n;if(!a.test(r,{name:!0}))return;const c=l.createElement("codeBlock"),d=[...r.getClassNames()];d.length||d.push("");for(const e of d){const t=i[e];if(t){l.setAttribute("language",t,c);break}}c.hasAttribute("language")||l.setAttribute("language",o,c),n.convertChildren(r,c),n.safeInsert(c,t.modelCursor)&&(a.consume(r,{name:!0}),n.updateConversionResult(c,t))}}(0,s)),e.data.upcastDispatcher.on("text",((e,t,{consumable:i,writer:o})=>{let n=t.modelCursor;if(!i.test(t.viewItem))return;if(!n.findAncestor("codeBlock"))return;i.consume(t.viewItem);const r=t.viewItem.data.split("\n").map((e=>o.createText(e))),s=r[r.length-1];for(const e of r)if(o.insert(e,n),n=n.getShiftedBy(e.offsetSize),e!==s){const e=o.createElement("softBreak");o.insert(e,n),n=o.createPositionAfter(e)}t.modelRange=o.createRange(t.modelCursor,n),t.modelCursor=n})),e.data.upcastDispatcher.on("element:pre",((e,t,{consumable:i})=>{const o=t.viewItem;if(o.findAncestor("pre"))return;const n=Array.from(o.getChildren()),r=n.find((e=>e.is("element","code")));if(r)for(const e of n)e!==r&&e.is("$text")&&i.consume(e,{name:!0})}),{priority:"high"}),this.listenTo(e.editing.view.document,"clipboardInput",((t,o)=>{let n=i.createRange(i.document.selection.anchor);if(o.targetRanges&&(n=e.editing.mapper.toModelRange(o.targetRanges[0])),!n.start.parent.is("element","codeBlock"))return;const s=o.dataTransfer.getData("text/plain"),l=new r.yj(e.editing.view.document);o.content=(0,a.rawSnippetTextToViewDocumentFragment)(l,s)})),this.listenTo(i,"getSelectedContent",((e,[o])=>{const n=o.anchor;!o.isCollapsed&&n.parent.is("element","codeBlock")&&n.hasSameParentAs(o.focus)&&i.change((i=>{const r=e.return;if(n.parent.is("element")&&(r.childCount>1||o.containsEntireContent(n.parent))){const t=i.createElement("codeBlock",n.parent.getAttributes());i.append(r,t);const o=i.createDocumentFragment();return i.append(t,o),void(e.return=o)}const s=r.getChild(0);t.checkAttribute(s,"code")&&i.setAttribute("code",!0,s)}))}))}afterInit(){const e=this.editor,t=e.commands,i=t.get("indent"),o=t.get("outdent");i&&i.registerChildCommand(t.get("indentCodeBlock"),{priority:"highest"}),o&&o.registerChildCommand(t.get("outdentCodeBlock")),this.listenTo(e.editing.view.document,"enter",((t,i)=>{e.model.document.selection.getLastPosition().parent.is("element","codeBlock")&&(function(e,t){const i=e.model.document,o=e.editing.view,n=i.selection.getLastPosition(),r=n.nodeAfter;return!(t||!i.selection.isCollapsed||!n.isAtStart)&&(!!f(r)&&(e.model.change((t=>{e.execute("enter");const o=i.selection.anchor.parent.previousSibling;t.rename(o,m),t.setSelection(o,"in"),e.model.schema.removeDisallowedAttributes([o],t),t.remove(r)})),o.scrollToTheSelection(),!0))}(e,i.isSoft)||function(e,t){const i=e.model,o=i.document,n=e.editing.view,r=o.selection.getLastPosition(),s=r.nodeBefore;let a;if(t||!o.selection.isCollapsed||!r.isAtEnd||!s||!s.previousSibling)return!1;if(f(s)&&f(s.previousSibling))a=i.createRange(i.createPositionBefore(s.previousSibling),i.createPositionAfter(s));else if(p(s)&&f(s.previousSibling)&&f(s.previousSibling.previousSibling))a=i.createRange(i.createPositionBefore(s.previousSibling.previousSibling),i.createPositionAfter(s));else{if(!(p(s)&&f(s.previousSibling)&&p(s.previousSibling.previousSibling)&&s.previousSibling.previousSibling&&f(s.previousSibling.previousSibling.previousSibling)))return!1;a=i.createRange(i.createPositionBefore(s.previousSibling.previousSibling.previousSibling),i.createPositionAfter(s))}return e.model.change((t=>{t.remove(a),e.execute("enter");const i=o.selection.anchor.parent;t.rename(i,m),e.model.schema.removeDisallowedAttributes([i],t)})),n.scrollToTheSelection(),!0}(e,i.isSoft)||function(e){const t=e.model.document,i=t.selection.getLastPosition(),o=i.nodeBefore||i.textNode;let n;o&&o.is("$text")&&(n=(0,a.getLeadingWhiteSpaces)(o)),e.model.change((i=>{e.execute("shiftEnter"),n&&i.insertText(n,t.selection.anchor)}))}(e),i.preventDefault(),t.stop())}),{context:"pre"})}}function p(e){return e&&e.is("$text")&&!e.data.match(/\S/)}function f(e){return e&&e.is("element","softBreak")}var b=i(7095),w=i(3379),k=i.n(w),_=i(9037),v=i.n(_),y=i(569),C=i.n(y),x=i(8575),A=i.n(x),E=i(9216),T=i.n(E),S=i(3229),P={attributes:{"data-cke":!0}};P.setAttributes=A(),P.insert=C().bind(null,"head"),P.domAPI=v(),P.insertStyleElement=T(),k()(S.Z,P),S.Z&&S.Z.locals&&S.Z.locals;class I extends o.Sy{static get pluginName(){return"CodeBlockUI"}init(){const e=this.editor,t=e.t,i=e.ui.componentFactory,o=(0,a.getNormalizedAndLocalizedLanguageDefinitions)(e);i.add("codeBlock",(i=>{const n=e.commands.get("codeBlock"),r=(0,b.t9)(i,b.Rm),s=r.buttonView;return s.set({label:t("Insert code block"),tooltip:!0,icon:'',isToggleable:!0}),s.bind("isOn").to(n,"value",(e=>!!e)),s.on("execute",(()=>{e.execute("codeBlock",{usePreviousLanguageChoice:!0}),e.editing.view.focus()})),r.on("execute",(t=>{e.execute("codeBlock",{language:t.source._codeBlockLanguage,forceValue:!0}),e.editing.view.focus()})),r.class="ck-code-block-dropdown",r.bind("isEnabled").to(n),(0,b.Pm)(r,(()=>this._getLanguageListItemDefinitions(o))),r}))}_getLanguageListItemDefinitions(e){const t=this.editor.commands.get("codeBlock"),i=new s.FE;for(const o of e){const e={type:"button",model:new b.Hn({_codeBlockLanguage:o.language,label:o.label,withText:!0})};e.model.bind("isOn").to(t,"value",(t=>t===e.model._codeBlockLanguage)),i.add(e)}return i}}class V extends o.Sy{static get requires(){return[g,I]}static get pluginName(){return"CodeBlock"}}},4934:(e,t,i)=>{"use strict";i.r(t),i.d(t,{canBeCodeBlock:()=>d,getIndentOutdentPositions:()=>l,getLeadingWhiteSpaces:()=>s,getNormalizedAndLocalizedLanguageDefinitions:()=>n,getPropertyAssociation:()=>r,isModelSelectionInCodeBlock:()=>c,rawSnippetTextToViewDocumentFragment:()=>a});var o=i(6553);function n(e){const t=e.t,i=e.config.get("codeBlock.languages");for(const e of i)"Plain text"===e.label&&(e.label=t("Plain text")),void 0===e.class&&(e.class=`language-${e.language}`);return i}function r(e,t,i){const o={};for(const n of e)"class"===t?o[n[t].split(" ").shift()]=n[i]:o[n[t]]=n[i];return o}function s(e){return e.data.match(/^(\s*)/)[0]}function a(e,t){const i=e.createDocumentFragment(),o=t.split("\n"),n=o.reduce(((t,i,n)=>(t.push(i),n{"use strict";i.r(t),i.d(t,{Command:()=>s,Context:()=>d,ContextPlugin:()=>u,DataApiMixin:()=>w,Editor:()=>p,ElementApiMixin:()=>k,MultiCommand:()=>l,PendingActions:()=>v,Plugin:()=>n,attachToForm:()=>b,icons:()=>y,secureSourceElement:()=>_});var o=i(7732);class n extends((0,o.ObservableMixin)()){constructor(e){super(),this._disableStack=new Set,this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",r,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",r),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function r(e){e.return=!1,e.stop()}class s extends((0,o.ObservableMixin)()){constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"}),this.listenTo(e,"change:isReadOnly",((e,t,i)=>{i&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}))}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",a,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",a),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function a(e){e.return=!1,e.stop()}class l extends s{constructor(){super(...arguments),this._childCommandsDefinitions=[]}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){(0,o.insertToPriorityArray)(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find((({command:e})=>e.isEnabled));return e&&e.command}}class c extends((0,o.EmitterMixin)()){constructor(e,t=[],i=[]){super(),this._plugins=new Map,this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of i)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new o.CKEditorError("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],i=[]){const n=this,r=this._context;!function e(t,i=new Set){t.forEach((t=>{l(t)&&(i.has(t)||(i.add(t),t.pluginName&&!n._availablePlugins.has(t.pluginName)&&n._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,i)))}))}(e),h(e);const s=[...function e(t,i=new Set){return t.map((e=>l(e)?e:n._availablePlugins.get(e))).reduce(((t,o)=>i.has(o)?t:(i.add(o),o.requires&&(h(o.requires,o),e(o.requires,i).forEach((e=>t.add(e)))),t.add(o))),new Set)}(e.filter((e=>!d(e,t))))];!function(e,t){for(const i of t){if("function"!=typeof i)throw new o.CKEditorError("plugincollection-replace-plugin-invalid-type",null,{pluginItem:i});const t=i.pluginName;if(!t)throw new o.CKEditorError("plugincollection-replace-plugin-missing-name",null,{pluginItem:i});if(i.requires&&i.requires.length)throw new o.CKEditorError("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const r=n._availablePlugins.get(t);if(!r)throw new o.CKEditorError("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const s=e.indexOf(r);if(-1===s){if(n._contextPlugins.has(r))return;throw new o.CKEditorError("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(r.requires&&r.requires.length)throw new o.CKEditorError("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(s,1,i),n._availablePlugins.set(t,i)}}(s,i);const a=function(e){return e.map((e=>{let t=n._contextPlugins.get(e);return t=t||new e(r),n._add(e,t),t}))}(s);return m(a,"init").then((()=>m(a,"afterInit"))).then((()=>a));function l(e){return"function"==typeof e}function c(e){return l(e)&&!!e.isContextPlugin}function d(e,t){return t.some((t=>t===e||u(e)===t||u(t)===e))}function u(e){return l(e)?e.pluginName||e.name:e}function h(e,i=null){e.map((e=>l(e)?e:n._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(!l(e)){if(t)throw new o.CKEditorError("plugincollection-soft-required",r,{missingPlugin:e,requiredBy:u(t)});throw new o.CKEditorError("plugincollection-plugin-not-found",r,{plugin:e})}}(e,i),function(e,t){if(c(t)&&!c(e))throw new o.CKEditorError("plugincollection-context-required",r,{plugin:u(e),requiredBy:u(t)})}(e,i),function(e,i){if(i&&d(e,t))throw new o.CKEditorError("plugincollection-required",r,{plugin:u(e),requiredBy:u(i)})}(e,i)}))}function m(e,t){return e.reduce(((e,i)=>i[t]?n._contextPlugins.has(i)?e:e.then(i[t].bind(i)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const i=e.pluginName;if(i){if(this._plugins.has(i))throw new o.CKEditorError("plugincollection-plugin-name-conflict",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:e});this._plugins.set(i,t)}}}class d{constructor(e){this._contextOwner=null,this.config=new o.Config(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new c(this,t);const i=this.config.get("language")||{};this.locale=new o.Locale({uiLanguage:"string"==typeof i?i:i.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new o.Collection}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const i of e.concat(t)){if("function"!=typeof i)throw new o.CKEditorError("context-initplugins-constructor-only",null,{Plugin:i});if(!0!==i.isContextPlugin)throw new o.CKEditorError("context-initplugins-invalid-plugin",null,{Plugin:i})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new o.CKEditorError("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const i=new this(e);t(i.initPlugins().then((()=>i)))}))}}class u extends((0,o.ObservableMixin)()){constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}var h=i(600);class m{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const i=this.get(e);if(!i)throw new o.CKEditorError("commandcollection-command-not-found",this,{commandName:e});return i.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class g extends o.KeystrokeHandler{constructor(e){super(),this.editor=e}set(e,t,i={}){if("string"==typeof t){const e=t;t=(t,i)=>{this.editor.execute(e),i()}}super.set(e,t,i)}}class p extends((0,o.ObservableMixin)()){constructor(e={}){super();const t=this.constructor,i=e.language||t.defaultConfig&&t.defaultConfig.language;this._context=e.context||new d({language:i}),this._context._addEditor(this,!e.context);const n=Array.from(t.builtinPlugins||[]);this.config=new o.Config(e,t.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new c(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new m,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new h.Model;const r=new h.StylesProcessor;this.data=new h.DataController(this.model,r),this.editing=new h.EditingController(this.model,r),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new h.Conversion([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new g(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new o.CKEditorError("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new o.CKEditorError("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new o.CKEditorError("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),i=e.get("removePlugins")||[],o=e.get("extraPlugins")||[],n=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(o),i,n)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){o.CKEditorError.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}}var f=i(3234);function b(e){if(!(0,f.Z)(e.updateSourceElement))throw new o.CKEditorError("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(function(e){return!!e&&"textarea"===e.tagName.toLowerCase()}(t)&&t.form){let i;const o=t.form,n=()=>e.updateSourceElement();(0,f.Z)(o.submit)&&(i=o.submit,o.submit=()=>{n(),i.apply(o)}),o.addEventListener("submit",n),e.on("destroy",(()=>{o.removeEventListener("submit",n),i&&(o.submit=i)}))}}function w(e){return class extends e{setData(e){this.data.set(e)}getData(e){return this.data.get(e)}}}{const e=w(Object);w.setData=e.prototype.setData,w.getData=e.prototype.getData}function k(e){return class extends e{updateSourceElement(e=this.data.get()){if(!this.sourceElement)throw new o.CKEditorError("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),i=this.sourceElement instanceof HTMLTextAreaElement;t||i?(0,o.setDataInElement)(this.sourceElement,e):(0,o.setDataInElement)(this.sourceElement,"")}}}function _(e,t){if(t.ckeditorInstance)throw new o.CKEditorError("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}k.updateSourceElement=k(Object).prototype.updateSourceElement;class v extends u{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new o.Collection({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new o.CKEditorError("pendingactions-add-invalid-message",this);const t=new((0,o.ObservableMixin)());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const y={bold:'',cancel:'',caption:'',check:'',cog:'',eraser:'',image:'',lowVision:'',importExport:'',paragraph:'',plus:'',text:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:'',quote:'',threeVerticalDots:''}},1184:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ClassicEditor:()=>R});var o=i(7095),n=i(3291),r=i(6553);class s extends o.S8{constructor(e,t){super(e),this.view=t,this._toolbarConfig=(0,o.iw)(e.config.get("toolbar")),this._elementReplacer=new r.a6}get element(){return this.view.element}init(e){const t=this.editor,i=this.view,o=t.editing.view,n=i.editable,r=o.document.getRoot();n.name=r.rootName,i.render();const s=n.element;this.setEditableElement(n.name,s),i.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(s),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",(({top:e})=>e||0)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),o=e.sourceElement;let r;const s=e.config.get("placeholder");s&&(r="string"==typeof s?s:s[this.view.editable.name]),!r&&o&&"textarea"===o.tagName.toLowerCase()&&(r=o.getAttribute("placeholder")),r&&(0,n.ID)({view:t,element:i,text:r,isDirectHost:!1,keepOnFocus:!0})}}var a=i(3379),l=i.n(a),c=i(9037),d=i.n(c),u=i(569),h=i.n(u),m=i(8575),g=i.n(m),p=i(9216),f=i.n(p),b=i(3624),w={attributes:{"data-cke":!0}};w.setAttributes=g(),w.insert=h().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=f(),l()(b.Z,w),b.Z&&b.Z.locals&&b.Z.locals;class k extends o.py{constructor(e,t,i={}){super(e),this.stickyPanel=new o.lp(e),this.toolbar=new o.jB(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.editable=new o.r1(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}var _=i(6854);class v{constructor(e){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const i=this._listeners[e]||[];for(const e of i)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const i=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:i}),i?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){return this.crashes.length<=this._crashNumberLimit||(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function y(e,t=new Set){const i=[e],o=new Set;let n=0;for(;i.length>n;){const e=i[n++];if(!o.has(e)&&C(e)&&!t.has(e))if(o.add(e),Symbol.iterator in e)try{for(const t of e)i.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&i.push(e[t])}return o}function C(e){const t=Object.prototype.toString.call(e),i=typeof e;return!("number"===i||"boolean"===i||"string"===i||"symbol"===i||"function"===i||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function x(e,t,i=new Set){if(e===t&&"object"==typeof(o=e)&&null!==o)return!0;var o;const n=y(e,i),r=y(t,i);for(const e of n)if(r.has(e))return!0;return!1}var A=i(111),E=i(4612),T=i(3251);class S extends v{constructor(e,t={}){super(t),this._editor=null,this._throttledSave=(0,A.Z)(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,i)=>e.create(t,i)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{if("string"==typeof this._elementOrData)return this.create(this._data,this._config,this._config.context);{const e=Object.assign({},this._config,{initialData:this._data});return this.create(this._elementOrData,e,e.context)}})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,i){return Promise.resolve().then((()=>(super._startErrorHandling(),this._elementOrData=e,this._config=this._cloneEditorConfiguration(t)||{},this._config.context=i,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this.state="ready",this._fire("stateChange")}))}destroy(){return Promise.resolve().then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.flush();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e={};for(const t of this._editor.model.document.getRootNames())e[t]=this._editor.data.get({rootName:t});return e}_isErrorComingFromThisItem(e){return x(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return(0,E.Z)(e,((e,t)=>(0,T.Z)(e)||"context"===t?e:void 0))}}const P=Symbol("MainQueueId");class I{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const i=e===P;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const o=(i?Promise.all(this._queues.values()):Promise.all([this._queues.get(P),this._queues.get(e)])).then(t),n=o.catch((()=>{}));return this._queues.set(e,n),o.finally((()=>{this._activeActions--,this._queues.get(e)===n&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function V(e){return Array.isArray(e)?e:[e]}class R extends((0,_.W9)((0,_.xK)(_.ML))){constructor(e,t={}){if(!O(e)&&void 0!==t.initialData)throw new r.Bb("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return O(e)?(0,r.yy)(e):e}(e)),O(e)&&(this.sourceElement=e),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),o=new k(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i});this.ui=new s(this,o),(0,_.P$)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((i=>{const o=new this(e,t);i(o.initPlugins().then((()=>o.ui.init(O(e)?e:null))).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}function O(e){return(0,T.Z)(e)}R.Context=_._y,R.EditorWatchdog=S,R.ContextWatchdog=class extends v{constructor(e,t={}){super(t),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new I,this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(P,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=V(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new S(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((i,{error:o,causesRestart:n})=>{this._fire("itemError",{itemId:e.id,error:o}),n&&this._actionQueues.enqueue(e.id,(()=>new Promise((i=>{const o=()=>{t.off("restart",o),this._fire("itemRestart",{itemId:e.id}),i()};t.on("restart",o)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=V(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue(P,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(P,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=y(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return x(this._context,e.context)}}},600:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AttributeElement:()=>Ge,AttributeOperation:()=>rn,BubblingEventInfo:()=>He,ClickObserver:()=>lr,Conversion:()=>Ho,DataController:()=>Fo,DataTransfer:()=>ti,DocumentFragment:()=>Ln,DocumentSelection:()=>Li,DomConverter:()=>Nt,DomEventData:()=>Zt,DomEventObserver:()=>Ut,DowncastWriter:()=>rt,EditingController:()=>bo,Element:()=>hi,History:()=>Vn,HtmlDataProcessor:()=>Do,InsertOperation:()=>Xo,LivePosition:()=>Cn,LiveRange:()=>Mi,MarkerOperation:()=>on,Matcher:()=>R,MergeOperation:()=>tn,Model:()=>sr,MouseObserver:()=>cr,MoveOperation:()=>Qo,Observer:()=>Ht,OperationFactory:()=>un,Position:()=>pi,Range:()=>vi,RenameOperation:()=>an,Renderer:()=>Et,RootAttributeOperation:()=>ln,RootOperation:()=>cn,SplitOperation:()=>en,StylesProcessor:()=>Ae,TabObserver:()=>ri,Text:()=>di,TextProxy:()=>ui,TreeWalker:()=>mi,UpcastWriter:()=>dr,View:()=>si,ViewAttributeElement:()=>Ge,ViewContainerElement:()=>Ie,ViewDocument:()=>Ke,ViewDocumentFragment:()=>nt,ViewEditableElement:()=>Re,ViewElement:()=>Se,ViewEmptyElement:()=>Qe,ViewRawElement:()=>it,ViewText:()=>P,ViewUIElement:()=>et,addBackgroundRules:()=>Nr,addBorderRules:()=>Dr,addMarginRules:()=>Kr,addPaddingRules:()=>Gr,disablePlaceholder:()=>b,enablePlaceholder:()=>f,findOptimalInsertionRange:()=>er,getBoxSidesShorthandValue:()=>Br,getBoxSidesValueReducer:()=>Or,getBoxSidesValues:()=>Rr,getFillerOffset:()=>Ve,getPositionShorthandNormalizer:()=>Mr,getShorthandValues:()=>zr,hidePlaceholder:()=>k,isAttachment:()=>Pr,isColor:()=>br,isLength:()=>vr,isLineStyle:()=>kr,isPercentage:()=>Cr,isPosition:()=>Tr,isRepeat:()=>Ar,isURL:()=>Vr,needsPlaceholder:()=>_,showPlaceholder:()=>w,transformSets:()=>fn});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(7372),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals;const p=new WeakMap;function f({view:e,element:t,text:i,isDirectHost:o=!0,keepOnFocus:n=!1}){const r=e.document;p.has(r)||(p.set(r,new Map),r.registerPostFixer((e=>v(r,e))),r.on("change:isComposing",(()=>{e.change((e=>v(r,e)))}),{priority:"high"})),p.get(r).set(t,{text:i,isDirectHost:o,keepOnFocus:n,hostElement:o?t:null}),e.change((e=>v(r,e)))}function b(e,t){const i=t.document;p.has(i)&&e.change((e=>{const o=p.get(i),n=o.get(t);e.removeAttribute("data-placeholder",n.hostElement),k(e,n.hostElement),o.delete(t)}))}function w(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}function k(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function _(e,t){if(!e.isAttached())return!1;const i=Array.from(e.getChildren()).some((e=>!e.is("uiElement")));if(i)return!1;const o=e.document,n=o.selection.anchor;return!(o.isComposing&&n&&n.parent===e||!t&&o.isFocused&&(!n||n.parent===e))}function v(e,t){const i=p.get(e),o=[];let n=!1;for(const[e,r]of i)r.isDirectHost&&(o.push(e),y(t,e,r)&&(n=!0));for(const[e,r]of i){if(r.isDirectHost)continue;const i=C(e);i&&(o.includes(i)||(r.hostElement=i,y(t,e,r)&&(n=!0)))}return n}function y(e,t,i){const{text:o,isDirectHost:n,hostElement:r}=i;let s=!1;return r.getAttribute("data-placeholder")!==o&&(e.setAttribute("data-placeholder",o,r),s=!0),(n||1==t.childCount)&&_(r,i.keepOnFocus)?w(e,r)&&(s=!0):k(e,r)&&(s=!0),s}function C(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}var x=i(7732);class A{is(){throw new Error("is() method is abstract")}}var E=i(9256);const T=function(e){return(0,E.Z)(e,4)};i(9807);class S extends((0,x.EmitterMixin)(A)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new x.CKEditorError("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e,t={}){const i=this.getAncestors(t),o=e.getAncestors(t);let n=0;for(;i[n]==o[n]&&i[n];)n++;return 0===n?null:i[n-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),o=(0,x.compareArrays)(t,i);switch(o){case"prefix":return!0;case"extension":return!1;default:return t[o]e.data.length)throw new x.CKEditorError("view-textproxy-wrong-offsetintext",this);if(i<0||t+i>e.data.length)throw new x.CKEditorError("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let i=e.includeSelf?this.textNode:this.parent;for(;null!==i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}}I.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};var V=i(7514);class R{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const i=O(t,e);if(i)return{element:t,pattern:e,match:i}}return null}matchAll(...e){const t=[];for(const i of e)for(const e of this._patterns){const o=O(i,e);o&&t.push({element:i,pattern:e,match:o})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function O(e,t){if("function"==typeof t)return t(e);const i={};return t.name&&(i.name=function(e,t){return e instanceof RegExp?!!t.match(e):e===t}(t.name,e.name),!i.name)||t.attributes&&(i.attributes=function(e,t){const i=new Set(t.getAttributeKeys());return(0,V.Z)(e)?(void 0!==e.style&&(0,x.logWarning)("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&(0,x.logWarning)("matcher-pattern-deprecated-attributes-class-key",e)):(i.delete("style"),i.delete("class")),B(e,i,(e=>t.getAttribute(e)))}(t.attributes,e),!i.attributes)||t.classes&&(i.classes=function(e,t){return B(e,t.getClassNames(),(()=>{}))}(t.classes,e),!i.classes)||t.styles&&(i.styles=function(e,t){return B(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!i.styles)?null:i}function B(e,t,i){const o=function(e){return Array.isArray(e)?e.map((e=>(0,V.Z)(e)?(void 0!==e.key&&void 0!==e.value||(0,x.logWarning)("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0])):(0,V.Z)(e)?Object.entries(e):[[e,!0]]}(e),n=Array.from(t),r=[];if(o.forEach((([e,t])=>{n.forEach((o=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,o)&&function(e,t,i){if(!0===e)return!0;const o=i(t);return e===o||e instanceof RegExp&&!!String(o).match(e)}(t,o,i)&&r.push(o)}))})),o.length&&!(r.lengtht===e));return Array.isArray(t)}set(e,t){if((0,M.Z)(e))for(const[t,i]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,i,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=Ee(e);(function(e,t){null==e||Q(e,t)})(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!(0,M.Z)(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){return this.isEmpty?[]:e?this._styleProcessor.getStyleNames(this._styles):this._getStylesEntries().map((([e])=>e))}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const i of t)e.push(...this._styleProcessor.getReducedForm(i,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const i=t.splice(0,t.length-1).join("."),o=X(this._styles,i);o&&!Array.from(Object.keys(o)).length&&this.remove(i)}}class Ae{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,i){if((0,M.Z)(t))Te(i,Ee(e),t);else if(this._normalizers.has(e)){const o=this._normalizers.get(e),{path:n,value:r}=o(t);Te(i,n,r)}else Te(i,e,t)}getNormalized(e,t){if(!e)return _e({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const i=this._extractors.get(e);if("string"==typeof i)return X(t,i);const o=i(e,t);if(o)return o}return X(t,Ee(e))}getReducedForm(e,t){const i=this.getNormalized(e,t);return void 0===i?[]:this._reducers.has(e)?this._reducers.get(e)(i):[[e,i]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const i=this.getNormalized(t,e);return i&&"object"==typeof i?Object.keys(i).length:i})),i=new Set([...t,...Object.keys(e)]);return Array.from(i.values())}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const i of t)this._mapStyleNames(i,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function Ee(e){return e.replace("-",".")}function Te(e,t,i){let o=i;(0,M.Z)(i)&&(o=_e({},X(e,t),i)),Ce(e,t,o)}class Se extends S{constructor(e,t,i,o){if(super(e),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=t,this._attrs=function(e){const t=(0,x.toMap)(e);for(const[e,i]of t)null===i?t.delete(e):"string"!=typeof i&&t.set(e,String(i));return t}(i),this._children=[],o&&this._insertChild(0,o),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Pe(this._classes,e),this._attrs.delete("class")}this._styles=new xe(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof Se))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,i]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==i)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new R(...e);let i=this.parent;for(;i&&!i.is("documentFragment");){if(t.match(i))return i;i=i.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),i=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==i?"":` ${i}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const i of this.getChildren())t.push(i._clone(e));const i=new this.constructor(this.document,this.name,this._attrs,t);return i._classes=new Set(this._classes),i._styles.set(this._styles.getNormalized()),i._customProperties=new Map(this._customProperties),i.getFillerOffset=this.getFillerOffset,i._unsafeAttributesToRender=this._unsafeAttributesToRender,i}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let i=0;const o=function(e,t){return"string"==typeof t?[new P(e,t)]:((0,x.isIterable)(t)||(t=[t]),Array.from(t).map((t=>"string"==typeof t?new P(e,t):t instanceof I?new P(e,t.data):t)))}(this.document,t);for(const t of o)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of(0,x.toArray)(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of(0,x.toArray)(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of(0,x.toArray)(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function Pe(e,t){const i=t.split(/\s+/);e.clear(),i.forEach((t=>e.add(t)))}Se.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ie extends Se{constructor(e,t,i,o){super(e,t,i,o),this.getFillerOffset=Ve}}function Ve(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}Ie.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Re extends((0,x.ObservableMixin)(Ie)){constructor(e,t,i,o){super(e,t,i,o),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}Re.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const Oe=Symbol("rootName");class Be extends Re{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(Oe)}set rootName(e){this._setCustomProperty(Oe,e)}set _name(e){this.name=e}}Be.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Me{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new x.CKEditorError("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new x.CKEditorError("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=ze._createAt(e.startPosition):this._position=ze._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,i;do{i=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&e.offset===i.childCount)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let o;if(i instanceof P){if(e.isAtEnd)return this._position=ze._createAfter(i),this._next();o=i.data[e.offset]}else o=i.getChild(e.offset);if(o instanceof Se)return this.shallow?e.offset++:e=new ze(o,0),this._position=e,this._formatReturnValue("elementStart",o,t,e,1);if(o instanceof P){if(this.singleCharacters)return e=new ze(o,0),this._position=e,this._next();{let i,n=o.data.length;return o==this._boundaryEndParent?(n=this.boundaries.end.offset,i=new I(o,0,n),e=ze._createAfter(i)):(i=new I(o,0,o.data.length),e.offset++),this._position=e,this._formatReturnValue("text",i,t,e,n)}}if("string"==typeof o){let o;o=this.singleCharacters?1:(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-e.offset;const n=new I(i,e.offset,o);return e.offset+=o,this._position=e,this._formatReturnValue("text",n,t,e,o)}return e=ze._createAfter(i),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",i,t,e)}_previous(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&0===e.offset)return{done:!0,value:void 0};if(i==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let o;if(i instanceof P){if(e.isAtStart)return this._position=ze._createBefore(i),this._previous();o=i.data[e.offset-1]}else o=i.getChild(e.offset-1);if(o instanceof Se)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",o,t,e,1)):(e=new ze(o,o.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",o,t,e));if(o instanceof P){if(this.singleCharacters)return e=new ze(o,o.data.length),this._position=e,this._previous();{let i,n=o.data.length;if(o==this._boundaryStartParent){const t=this.boundaries.start.offset;i=new I(o,t,o.data.length-t),n=i.data.length,e=ze._createBefore(i)}else i=new I(o,0,o.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",i,t,e,n)}}if("string"==typeof o){let o;if(this.singleCharacters)o=1;else{const t=i===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-t}e.offset-=o;const n=new I(i,e.offset,o);return this._position=e,this._formatReturnValue("text",n,t,e,o)}return e=ze._createBefore(i),this._position=e,this._formatReturnValue("elementStart",i,t,e,1)}_formatReturnValue(e,t,i,o,n){return t instanceof I&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?i=ze._createAfter(t.textNode):(o=ze._createAfter(t.textNode),this._position=o)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?i=ze._createBefore(t.textNode):(o=ze._createBefore(t.textNode),this._position=o))),{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:o,length:n}}}}class ze extends A{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof Re);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=ze._createAt(this),i=t.offset+e;return t.offset=i<0?0:i,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const i=new Me(t);return i.skip(e),i.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),i=e.getAncestors();let o=0;for(;t[o]==i[o]&&t[o];)o++;return 0===o?null:t[o-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],i=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),i.push(e.offset);const o=(0,x.compareArrays)(t,i);switch(o){case"prefix":return"before";case"extension":return"after";default:return t[o]0?new this(i,o):new this(o,i)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(ze._createBefore(e),t)}}function De(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}Ne.prototype.is=function(e){return"range"===e||"view:range"===e};class Le extends((0,x.EmitterMixin)(A)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const o of e._ranges)if(t.isEqual(o)){i=!0;break}if(!i)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=(0,x.count)(this.getRanges());if(t!=(0,x.count)(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let i=!1;for(let o of e.getRanges())if(o=o.getTrimmed(),t.start.isEqual(o.start)&&t.end.isEqual(o.end)){i=!0;break}if(!i)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,i,o]=e;if("object"==typeof i&&(o=i,i=void 0),null===t)this._setRanges([]),this._setFakeOptions(o);else if(t instanceof Le||t instanceof Fe)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof Ne)this._setRanges([t],o&&o.backward),this._setFakeOptions(o);else if(t instanceof ze)this._setRanges([new Ne(t)]),this._setFakeOptions(o);else if(t instanceof S){const e=!!o&&!!o.backward;let n;if(void 0===i)throw new x.CKEditorError("view-selection-setto-required-second-parameter",this);n="in"==i?Ne._createIn(t):"on"==i?Ne._createOn(t):new Ne(ze._createAt(t,i)),this._setRanges([n],e),this._setFakeOptions(o)}else{if(!(0,x.isIterable)(t))throw new x.CKEditorError("view-selection-setto-not-selectable",this);this._setRanges(t,o&&o.backward),this._setFakeOptions(o)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new x.CKEditorError("view-selection-setfocus-no-ranges",this);const i=ze._createAt(e,t);if("same"==i.compareWith(this.focus))return;const o=this.anchor;this._ranges.pop(),"before"==i.compareWith(o)?this._addRange(new Ne(i,o),!0):this._addRange(new Ne(o,i)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof Ne))throw new x.CKEditorError("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new x.CKEditorError("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new Ne(e.start,e.end))}}Le.prototype.is=function(e){return"selection"===e||"view:selection"===e};class Fe extends((0,x.EmitterMixin)(A)){constructor(...e){super(),this._selection=new Le,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}Fe.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class He extends x.EventInfo{constructor(e,t,i){super(e,t),this.startRange=i,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const We=Symbol("bubbling contexts");function Ze(e){return class extends e{fire(e,...t){try{const i=e instanceof x.EventInfo?e:new x.EventInfo(this,e),o=qe(this);if(!o.size)return;if(Ue(i,"capturing",this),je(o,"$capture",i,...t))return i.return;const n=i.startRange||this.selection.getFirstRange(),r=n?n.getContainedElement():null,s=!!r&&Boolean($e(o,r));let a=r||function(e){if(!e)return null;const t=e.start.parent,i=e.end.parent,o=t.getPath(),n=i.getPath();return o.length>n.length?t:i}(n);if(Ue(i,"atTarget",a),!s){if(je(o,"$text",i,...t))return i.return;Ue(i,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(je(o,"$root",i,...t))return i.return}else if(a.is("element")&&je(o,a.name,i,...t))return i.return;if(je(o,a,i,...t))return i.return;a=a.parent,Ue(i,"bubbling",a)}return Ue(i,"bubbling",this),je(o,"$document",i,...t),i.return}catch(e){x.CKEditorError.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,i){const o=(0,x.toArray)(i.context||"$document"),n=qe(this);for(const r of o){let o=n.get(r);o||(o=new((0,x.EmitterMixin)()),n.set(r,o)),this.listenTo(o,e,t,i)}}_removeEventListener(e,t){const i=qe(this);for(const o of i.values())this.stopListening(o,e,t)}}}{const e=Ze(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{Ze[t]=e.prototype[t]}))}function Ue(e,t,i){e instanceof He&&(e._eventPhase=t,e._currentTarget=i)}function je(e,t,i,...o){const n="string"==typeof t?e.get(t):$e(e,t);return!!n&&(n.fire(i,...o),i.stop.called)}function $e(e,t){for(const[i,o]of e)if("function"==typeof i&&i(t))return o;return null}function qe(e){return e[We]||(e[We]=new Map),e[We]}class Ke extends(Ze((0,x.ObservableMixin)())){constructor(e){super(),this._postFixers=new Set,this.selection=new Fe,this.roots=new x.Collection({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(t=i(e),t)break}while(t)}}class Ge extends Se{constructor(e,t,i,o){super(e,t,i,o),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Je}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new x.CKEditorError("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function Je(){if(Ye(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(Ye(e)>1)return null;e=e.parent}return!e||Ye(e)>1?null:this.childCount}function Ye(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}Ge.DEFAULT_PRIORITY=10,Ge.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Qe extends Se{constructor(e,t,i,o){super(e,t,i,o),this.getFillerOffset=Xe}_insertChild(e,t){if(t&&(t instanceof S||Array.from(t).length>0))throw new x.CKEditorError("view-emptyelement-cannot-add",[this,t]);return 0}}function Xe(){return null}Qe.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class et extends Se{constructor(e,t,i,o){super(e,t,i,o),this.getFillerOffset=tt}_insertChild(e,t){if(t&&(t instanceof S||Array.from(t).length>0))throw new x.CKEditorError("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function tt(){return null}et.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class it extends Se{constructor(e,t,i,o){super(e,t,i,o),this.getFillerOffset=ot}_insertChild(e,t){if(t&&(t instanceof S||Array.from(t).length>0))throw new x.CKEditorError("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function ot(){return null}it.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class nt extends((0,x.EmitterMixin)(A)){constructor(e,t){super(),this._children=[],this._customProperties=new Map,this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let i=0;const o=function(e,t){return"string"==typeof t?[new P(e,t)]:((0,x.isIterable)(t)||(t=[t]),Array.from(t).map((t=>"string"==typeof t?new P(e,t):t instanceof I?new P(e,t.data):t)))}(this.document,t);for(const t of o)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i{const i=e[e.length-1],o=!t.is("uiElement");return i&&i.breakAttributes==o?i.nodes.push(t):e.push({breakAttributes:o,nodes:[t]}),e}),[]);let o=null,n=e;for(const{nodes:e,breakAttributes:t}of i){const i=this._insertNodes(n,e,t);o||(o=i.start),n=i.end}return o?new Ne(o,n):new Ne(e)}remove(e){const t=e instanceof Ne?e:Ne._createOn(e);if(mt(t,this.document),t.isCollapsed)return new nt(this.document);const{start:i,end:o}=this._breakAttributesRange(t,!0),n=i.parent,r=o.offset-i.offset,s=n._removeChildren(i.offset,r);for(const e of s)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(i);return t.start=a,t.end=a.clone(),new nt(this.document,s)}clear(e,t){mt(e,this.document);const i=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const o of i){const i=o.item;let n;if(i.is("element")&&t.isSimilar(i))n=Ne._createOn(i);else if(!o.nextPosition.isAfter(e.start)&&i.is("$textProxy")){const e=i.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(n=Ne._createIn(e))}n&&(n.end.isAfter(e.end)&&(n.end=e.end),n.start.isBefore(e.start)&&(n.start=e.start),this.remove(n))}}move(e,t){let i;if(t.isAfter(e.end)){const o=(t=this._breakAttributes(t,!0)).parent,n=o.childCount;e=this._breakAttributesRange(e,!0),i=this.remove(e),t.offset+=o.childCount-n}else i=this.remove(e);return this.insert(t,i)}wrap(e,t){if(!(t instanceof Ge))throw new x.CKEditorError("view-writer-wrap-invalid-attribute",this.document);if(mt(e,this.document),e.isCollapsed){let o=e.start;o.parent.is("element")&&(i=o.parent,!Array.from(i.getChildren()).some((e=>!e.is("uiElement"))))&&(o=o.getLastMatchingPosition((e=>e.item.is("uiElement")))),o=this._wrapPosition(o,t);const n=this.document.selection;return n.isCollapsed&&n.getFirstPosition().isEqual(e.start)&&this.setSelection(o),new Ne(o)}return this._wrapRange(e,t);var i}unwrap(e,t){if(!(t instanceof Ge))throw new x.CKEditorError("view-writer-unwrap-invalid-attribute",this.document);if(mt(e,this.document),e.isCollapsed)return e;const{start:i,end:o}=this._breakAttributesRange(e,!0),n=i.parent,r=this._unwrapChildren(n,i.offset,o.offset,t),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new Ne(s,a)}rename(e,t){const i=new Ie(this.document,e,t.getAttributes());return this.insert(ze._createAfter(t),i),this.move(Ne._createIn(t),ze._createAt(i,0)),this.remove(Ne._createOn(t)),i}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return ze._createAt(e,t)}createPositionAfter(e){return ze._createAfter(e)}createPositionBefore(e){return ze._createBefore(e)}createRange(e,t){return new Ne(e,t)}createRangeOn(e){return Ne._createOn(e)}createRangeIn(e){return Ne._createIn(e)}createSelection(...e){return new Le(...e)}createSlot(e="children"){if(!this._slotFactory)throw new x.CKEditorError("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,i){let o,n;if(o=i?st(e):e.parent.is("$text")?e.parent.parent:e.parent,!o)throw new x.CKEditorError("view-writer-invalid-position-container",this.document);n=i?this._breakAttributes(e,!0):e.parent.is("$text")?lt(e):e;const r=o._insertChild(n.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const s=n.getShiftedBy(r),a=this.mergeAttributes(n);a.isEqual(n)||s.offset--;const l=this.mergeAttributes(s);return new Ne(a,l)}_wrapChildren(e,t,i,o){let n=t;const r=[];for(;na.priority)&&s.getIdentity()!1,e.parent._insertChild(e.offset,i);const o=new Ne(e,e.getShiftedBy(1));this.wrap(o,t);const n=new ze(i.parent,i.index);i._remove();const r=n.nodeBefore,s=n.nodeAfter;return r instanceof P&&s instanceof P?ct(r,s):at(n)}_wrapAttributeElement(e,t){if(!gt(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&t.hasAttribute(i)&&t.getAttribute(i)!==e.getAttribute(i))return!1;for(const i of e.getStyleNames())if(t.hasStyle(i)&&t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&(t.hasAttribute(i)||this.setAttribute(i,e.getAttribute(i),t));for(const i of e.getStyleNames())t.hasStyle(i)||this.setStyle(i,e.getStyle(i),t);for(const i of e.getClassNames())t.hasClass(i)||this.addClass(i,t);return!0}_unwrapAttributeElement(e,t){if(!gt(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&(!t.hasAttribute(i)||t.getAttribute(i)!==e.getAttribute(i)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const i of e.getStyleNames())if(!t.hasStyle(i)||t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&this.removeAttribute(i,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const i=e.start,o=e.end;if(mt(e,this.document),e.isCollapsed){const i=this._breakAttributes(e.start,t);return new Ne(i,i)}const n=this._breakAttributes(o,t),r=n.parent.childCount,s=this._breakAttributes(i,t);return n.offset+=n.parent.childCount-r,new Ne(s,n)}_breakAttributes(e,t=!1){const i=e.offset,o=e.parent;if(e.parent.is("emptyElement"))throw new x.CKEditorError("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new x.CKEditorError("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new x.CKEditorError("view-writer-cannot-break-raw-element",this.document);if(!t&&o.is("$text")&&ht(o.parent))return e.clone();if(ht(o))return e.clone();if(o.is("$text"))return this._breakAttributes(lt(e),t);if(i==o.childCount){const e=new ze(o.parent,o.index+1);return this._breakAttributes(e,t)}if(0===i){const e=new ze(o.parent,o.index);return this._breakAttributes(e,t)}{const e=o.index+1,n=o._clone();o.parent._insertChild(e,n),this._addToClonedElementsGroup(n);const r=o.childCount-i,s=o._removeChildren(i,r);n._appendChild(s);const a=new ze(o.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let i=this._cloneGroups.get(t);i||(i=new Set,this._cloneGroups.set(t,i)),i.add(e),e._clonesGroup=i}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const i=this._cloneGroups.get(t);i&&i.delete(e)}}function st(e){let t=e.parent;for(;!ht(t);){if(!t)return;t=t.parent}return t}function at(e){const t=e.nodeBefore;if(t&&t.is("$text"))return new ze(t,t.data.length);const i=e.nodeAfter;return i&&i.is("$text")?new ze(i,0):e}function lt(e){if(e.offset==e.parent.data.length)return new ze(e.parent.parent,e.parent.index+1);if(0===e.offset)return new ze(e.parent.parent,e.parent.index);const t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new P(e.root.document,t)),new ze(e.parent.parent,e.parent.index+1)}function ct(e,t){const i=e.data.length;return e._data+=t.data,t._remove(),new ze(e,i)}const dt=[P,Ge,Ie,Qe,it,et];function ut(e,t){for(const i of e){if(!dt.some((e=>i instanceof e)))throw new x.CKEditorError("view-writer-insert-invalid-node-type",t);i.is("$text")||ut(i.getChildren(),t)}}function ht(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function mt(e,t){const i=st(e.start),o=st(e.end);if(!i||!o||i!==o)throw new x.CKEditorError("view-writer-invalid-range-container",t)}function gt(e,t){return null===e.id&&null===t.id}const pt=e=>e.createTextNode(" "),ft=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},bt=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},wt=7,kt="⁠".repeat(wt);function _t(e){return(0,x.isText)(e)&&e.data.substr(0,wt)===kt}function vt(e){return e.data.length==wt&&_t(e)}function yt(e){return _t(e)?e.data.slice(wt):e.data}function Ct(e,t){if(t.keyCode==x.keyCodes.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,i=e.getRangeAt(0).startOffset;_t(t)&&i<=wt&&e.collapse(t,0)}}}var xt=i(5037),At={attributes:{"data-cke":!0}};At.setAttributes=d(),At.insert=l().bind(null,"head"),At.domAPI=s(),At.insertStyleElement=h(),n()(xt.Z,At),xt.Z&&xt.Z.locals&&xt.Z.locals;class Et extends((0,x.ObservableMixin)()){constructor(e,t){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),x.env.isBlink&&!x.env.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new x.CKEditorError("view-renderer-unknown-type",this);this.markedChildren.add(t)}}}render(){if(this.isComposing&&!x.env.isAndroid)return;let e=null;const t=!(x.env.isBlink&&!x.env.isAndroid&&this.isSelecting);for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=ze._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),i=t.parent.ownerDocument;_t(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=Tt(i,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){if(!this.domConverter.mapViewToDom(e))return;const t=Array.from(this.domConverter.mapViewToDom(e).childNodes),i=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),o=this._diffNodeLists(t,i),n=this._findUpdateActions(o,t,i,St);if(-1!==n.indexOf("update")){const o={equal:0,insert:0,delete:0};for(const r of n)if("update"===r){const n=o.equal+o.insert,r=o.equal+o.delete,s=e.getChild(n);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,t[r]),(0,x.remove)(i[n]),o.equal++}else o[r]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?ze._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&(0,x.isText)(t.parent)&&_t(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!_t(e))throw new x.CKEditorError("view-renderer-filler-was-lost",this);vt(e)?e.remove():e.data=e.data.substr(wt),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,i=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(i===t.getFillerOffset())return!1;const o=e.nodeBefore,n=e.nodeAfter;return!(o instanceof P||n instanceof P||x.env.isAndroid&&(o||n))}_updateText(e,t){const i=this.domConverter.findCorrespondingDomText(e);let o=this.domConverter.viewToDom(e).data;const n=t.inlineFillerPosition;n&&n.parent==e.parent&&n.offset==e.index&&(o=kt+o),Vt(i,o)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const i=Array.from(t.attributes).map((e=>e.name)),o=e.getAttributeKeys();for(const i of o)this.domConverter.setDomElementAttribute(t,i,e.getAttribute(i),e);for(const o of i)e.hasAttribute(o)||this.domConverter.removeDomElementAttribute(t,o)}_updateChildren(e,t){const i=this.domConverter.mapViewToDom(e);if(!i)return;if(x.env.isAndroid){let e=null;for(const t of Array.from(i.childNodes)){if(e&&(0,x.isText)(e)&&(0,x.isText)(t)){i.normalize();break}e=t}}const o=t.inlineFillerPosition,n=i.childNodes,r=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));o&&o.parent===e&&Tt(i.ownerDocument,r,o.offset);const s=this._diffNodeLists(n,r),a=this._findUpdateActions(s,n,r,Pt);let l=0;const c=new Set;for(const e of a)"delete"===e?(c.add(n[l]),(0,x.remove)(n[l])):"equal"!==e&&"update"!==e||l++;l=0;for(const e of a)"insert"===e?((0,x.insertAt)(i,l,r[l]),l++):"update"===e?(Vt(n[l],r[l].data),l++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(r[l])),l++);for(const e of c)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const i=Array.from(e);if(0==i.length||!t)return i;return i[i.length-1]==t&&i.pop(),i}(e,this._fakeSelectionContainer),(0,x.diff)(e,t,It.bind(null,this.domConverter))}_findUpdateActions(e,t,i,o){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let n=[],r=[],s=[];const a={equal:0,insert:0,delete:0};for(const l of e)"insert"===l?s.push(i[a.equal+a.insert]):"delete"===l?r.push(t[a.equal+a.delete]):(n=n.concat((0,x.diff)(r,s,o).map((e=>"equal"===e?"update":e))),n.push("equal"),r=[],s=[]),a[l]++;return n.concat((0,x.diff)(r,s,o).map((e=>"equal"===e?"update":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(x.env.isBlink&&!x.env.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&x.env.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const i=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(i,this.selection),!this._fakeSelectionNeedsUpdate(e))return;i.parentElement&&i.parentElement==e||e.appendChild(i),i.textContent=this.selection.fakeSelectionLabel||" ";const o=t.getSelection(),n=t.createRange();o.removeAllRanges(),n.selectNodeContents(i),o.addRange(n)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const i=this.domConverter.viewPositionToDom(this.selection.anchor),o=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(i.parent,i.offset),t.extend(o.parent,o.offset),x.env.isGecko&&function(e,t){const i=e.parent;if(i.nodeType!=Node.ELEMENT_NODE||e.offset!=i.childNodes.length-1)return;const o=i.childNodes[e.offset];o&&"BR"==o.tagName&&t.addRange(t.getRangeAt(0))}(o,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return!(t&&this.selection.isEqual(t)||!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,i=e.ownerDocument.getSelection();return!t||t.parentElement!==e||i.anchorNode!==t&&!t.contains(i.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const i=e.activeElement,o=this.domConverter.mapDomToView(i);i&&o&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function Tt(e,t,i){const o=t instanceof Array?t:t.childNodes,n=o[i];if((0,x.isText)(n))return n.data=kt+n.data,n;{const n=e.createTextNode(kt);return Array.isArray(t)?o.splice(i,0,n):(0,x.insertAt)(t,i,n),n}}function St(e,t){return(0,x.isNode)(e)&&(0,x.isNode)(t)&&!(0,x.isText)(e)&&!(0,x.isText)(t)&&!(0,x.isComment)(e)&&!(0,x.isComment)(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function Pt(e,t){return(0,x.isNode)(e)&&(0,x.isNode)(t)&&(0,x.isText)(e)&&(0,x.isText)(t)}function It(e,t,i){return t===i||((0,x.isText)(t)&&(0,x.isText)(i)?t.data===i.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(i)))}function Vt(e,t){const i=e.data;if(i==t)return;const o=(0,x.fastDiff)(i,t);for(const t of o)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}const Rt=bt(x.global.document),Ot=pt(x.global.document),Bt=ft(x.global.document),Mt="data-ck-unsafe-attribute-",zt="data-ck-unsafe-element";class Nt{constructor(e,{blockFillerMode:t,renderingMode:i="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new R,this._encounteredRawContentDomNodes=new WeakSet,this.document=e,this.renderingMode=i,this.blockFillerMode=t||("editing"===i?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?x.global.document:x.global.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Le(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,i){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===i&&("src"===e||"srcset"===e)||"source"===i&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const i=(new DOMParser).parseFromString(t,"text/html"),o=i.createDocumentFragment(),n=i.body.childNodes;for(;n.length>0;)o.appendChild(n[0]);const r=i.createTreeWalker(o,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=r.nextNode();)s.push(a);for(const e of s){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(Ft(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(o)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let i;if(e.is("documentFragment"))i=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(i,e);else{if(e.is("uiElement"))return i="$comment"===e.name?this._domDocument.createComment(e.getCustomProperty("$rawContent")):e.render(this._domDocument,this),t.bind&&this.bindElements(i,e),i;this._shouldRenameElement(e.name)?(Ft(e.name),i=this._createReplacementDomElement(e.name)):i=e.hasAttribute("xmlns")?this._domDocument.createElementNS(e.getAttribute("xmlns"),e.name):this._domDocument.createElement(e.name),e.is("rawElement")&&e.render(i,this),t.bind&&this.bindElements(i,e);for(const t of e.getAttributeKeys())this.setDomElementAttribute(i,t,e.getAttribute(t),e)}if(!1!==t.withChildren)for(const o of this.viewChildrenToDom(e,t))i.appendChild(o);return i}}setDomElementAttribute(e,t,i,o){const n=this.shouldRenderAttribute(t,i,e.tagName.toLowerCase())||o&&o.shouldRenderUnsafeAttribute(t);n||(0,x.logWarning)("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:i}),e.hasAttribute(t)&&!n?e.removeAttribute(t):e.hasAttribute(Mt+t)&&n&&e.removeAttribute(Mt+t),e.setAttribute(n?t:Mt+t,i)}removeDomElementAttribute(e,t){t!=zt&&(e.removeAttribute(t),e.removeAttribute(Mt+t))}*viewChildrenToDom(e,t={}){const i=e.getFillerOffset&&e.getFillerOffset();let o=0;for(const n of e.getChildren()){i===o&&(yield this._getBlockFiller());const e=n.is("element")&&!!n.getCustomProperty("dataPipeline:transparentRendering")&&!(0,x.first)(n.getAttributes());e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(n,t):(e&&(0,x.logWarning)("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:n}),yield this.viewToDom(n,t)),o++}i===o&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),i=this.viewPositionToDom(e.end),o=this._domDocument.createRange();return o.setStart(t.parent,t.offset),o.setEnd(i.parent,i.offset),o}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const i=this.findCorrespondingDomText(t);if(!i)return null;let o=e.offset;return _t(i)&&(o+=wt),{parent:i,offset:o}}{let i,o,n;if(0===e.offset){if(i=this.mapViewToDom(t),!i)return null;n=i.childNodes[0]}else{const t=e.nodeBefore;if(o=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!o)return null;i=o.parentNode,n=o.nextSibling}return(0,x.isText)(n)&&_t(n)?{parent:n,offset:wt}:{parent:i,offset:o?(0,x.indexOf)(o)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e))return null;const i=this.getHostViewElement(e);if(i)return i;if((0,x.isComment)(e)&&t.skipComments)return null;if((0,x.isText)(e)){if(vt(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new P(this.document,t)}}{if(this.mapDomToView(e))return this.mapDomToView(e);let i;if(this.isDocumentFragment(e))i=new nt(this.document),t.bind&&this.bindDocumentFragments(e,i);else{i=this._createViewElement(e,t),t.bind&&this.bindElements(e,i);const o=e.attributes;if(o)for(let e=o.length,t=0;t{const{scrollLeft:t,scrollTop:i}=e;o.push([t,i])})),t.focus(),Dt(t,(e=>{const[t,i]=o.shift();e.scrollLeft=t,e.scrollTop=i})),x.global.window.scrollTo(e,i)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(Rt):!("BR"!==e.tagName||!Lt(e,this.blockElements)||1!==e.parentNode.childNodes.length)||e.isEqualNode(Bt)||function(e,t){return e.isEqualNode(Ot)&&Lt(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const i=t.collapsed;return t.detach(),i}getHostViewElement(e){const t=(0,x.getAncestors)(e);for(t.pop();t.length;){const e=t.pop(),i=this._domToViewMapping.get(e);if(i&&(i.is("uiElement")||i.is("rawElement")))return i}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return pt(this._domDocument);case"markedNbsp":return ft(this._domDocument);case"br":return bt(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if((0,x.isText)(e)&&_t(e)&&tthis.preElements.includes(e.name))))return t;if(" "==t.charAt(0)){const i=this._getTouchingInlineViewNode(e,!1);!(i&&i.is("$textProxy")&&this._nodeEndsWithSpace(i))&&i||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const i=this._getTouchingInlineViewNode(e,!0),o=i&&i.is("$textProxy")&&" "==i.data.charAt(0);" "!=t.charAt(t.length-2)&&i&&!o||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(function(e,t){return(0,x.getAncestors)(e).some((e=>e.tagName&&t.includes(e.tagName.toLowerCase())))}(e,this.preElements))return yt(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const i=this._getTouchingInlineDomNode(e,!1),o=this._getTouchingInlineDomNode(e,!0),n=this._checkShouldLeftTrimDomText(e,i),r=this._checkShouldRightTrimDomText(e,o);n&&(t=t.replace(/^ /,"")),r&&(t=t.replace(/ $/,"")),t=yt(new Text(t)),t=t.replace(/ \u00A0/g," ");const s=o&&this.isElement(o)&&"BR"!=o.tagName,a=o&&(0,x.isText)(o)&&" "==o.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(t)||!o||s||a)&&(t=t.replace(/\u00A0$/," ")),(n||i&&this.isElement(i)&&"BR"!=i.tagName)&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e,t){return!t||(this.isElement(t)?"BR"===t.tagName:!this._encounteredRawContentDomNodes.has(e.previousSibling)&&/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!_t(e)}_getTouchingInlineViewNode(e,t){const i=new Me({startPosition:t?ze._createAfter(e):ze._createBefore(e),direction:t?"forward":"backward"});for(const e of i){if(e.item.is("element")&&this.inlineObjectElements.includes(e.item.name))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const i=t?"firstChild":"lastChild",o=t?"nextSibling":"previousSibling";let n=!0,r=e;do{if(!n&&r[i]?r=r[i]:r[o]?(r=r[o],n=!1):(r=r.parentNode,n=!0),!r||this._isBlockElement(r))return null}while(!(0,x.isText)(r)&&"BR"!=r.tagName&&!this._isInlineObjectElement(r));return r}_isBlockElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isInlineObjectElement(e){return this.isElement(e)&&this.inlineObjectElements.includes(e.tagName.toLowerCase())}_createViewElement(e,t){if((0,x.isComment)(e))return new et(this.document,"$comment");const i=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new Se(this.document,i)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const i=this._domDocument.createElement("span");if(i.setAttribute(zt,e),t){for(;t.firstChild;)i.appendChild(t.firstChild);for(const e of t.getAttributeNames())i.setAttribute(e,t.getAttribute(e))}return i}}function Dt(e,t){let i=e;for(;i;)t(i),i=i.parentElement}function Lt(e,t){const i=e.parentNode;return!!i&&!!i.tagName&&t.includes(i.tagName.toLowerCase())}function Ft(e){"script"===e&&(0,x.logWarning)("domconverter-unsafe-script-element-detected"),"style"===e&&(0,x.logWarning)("domconverter-unsafe-style-element-detected")}class Ht extends((0,x.DomEmitterMixin)()){constructor(e){super(),this._isEnabled=!1,this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}var Wt=i(207);class Zt{constructor(e,t,i){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,(0,Wt.Z)(this,i)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Ut extends Ht{constructor(){super(...arguments),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,i){this.isEnabled&&this.document.fire(e,new Zt(this.view,t,i))}}class jt extends Ut{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return(0,x.getCode)(this)}};this.fire(e.type,e,t)}}var $t=i(6682);class qt extends Ht{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=(0,$t.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,i)=>{e.selection.isFake&&this.isEnabled&&i.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,i)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(i.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,i=new Le(t.getRanges(),{backward:t.isBackward,fake:!1});e!=x.keyCodes.arrowleft&&e!=x.keyCodes.arrowup||i.setTo(i.getFirstPosition()),e!=x.keyCodes.arrowright&&e!=x.keyCodes.arrowdown||i.setTo(i.getLastPosition());const o={oldSelection:t,newSelection:i,domSelection:null};this.document.fire("selectionChange",o),this._fireSelectionChangeDoneDebounced(o)}}var Kt=i(1152);const Gt=function(e,t,i){var o=(i="function"==typeof i?i:void 0)?i(e,t):void 0;return void 0===o?(0,Kt.Z)(e,t,void 0,i):!!o};class Jt extends Ht{constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,i=new Set,o=new Set;for(const i of e){const e=t.mapDomToView(i.target);e&&(e.is("uiElement")||e.is("rawElement")||"childList"!==i.type||this._isBogusBrMutation(i)||o.add(e))}for(const n of e){const e=t.mapDomToView(n.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===n.type){const e=t.findCorrespondingViewText(n.target);e&&!o.has(e.parent)?i.add(e):!e&&_t(n.target)&&o.add(t.mapDomToView(n.target.parentNode))}}let n=!1;for(const e of i)n=!0,this.renderer.markToSync("text",e);for(const e of o){const i=t.mapViewToDom(e),o=Array.from(e.getChildren()),r=Array.from(t.domChildrenToView(i,{withChildren:!1}));Gt(o,r,Yt)||(n=!0,this.renderer.markToSync("children",e))}n&&this.view.forceRender()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}function Yt(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}class Qt extends Ut{constructor(e){super(e),this._isFocusChanging=!1,this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",(()=>{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),e.change((()=>{}))}),50)})),t.on("blur",((i,o)=>{const n=t.selection.editableElement;null!==n&&n!==o.target||(t.isFocused=!1,this._isFocusChanging=!1,e.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class Xt extends Ht{constructor(e){super(e),this.mutationObserver=e.getObserver(Jt),this.focusObserver=e.getObserver(Qt),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=(0,$t.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=(0,$t.Z)((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,i=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",i,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",i,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",i,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,i)=>{this.document.isComposing&&!x.env.isAndroid||(this._handleSelectionChange(i,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e,t){if(!this.isEnabled)return;const i=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(i.anchorNode))return;this.mutationObserver.flush();const o=this.domConverter.domSelectionToView(i);if(0!=o.rangeCount){if(this.view.hasDomSelection=!0,!this.selection.isEqual(o)||!this.domConverter.isDomSelectionCorrect(i))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.focusObserver.flush(),this.selection.isSimilar(o))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:o,domSelection:i};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class ei extends Ut{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class ti{constructor(e,t={}){this._files=t.cacheFiles?ii(e):null,this._native=e}get files(){return this._files||(this._files=ii(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function ii(e){const t=Array.from(e.files||[]),i=Array.from(e.items||[]);return t.length?t:i.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class oi extends Ut{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(e){const t=e.getTargetRanges(),i=this.view,o=i.document;let n=null,r=null,s=[];if(e.dataTransfer&&(n=new ti(e.dataTransfer)),null!==e.data?r=e.data:n&&(r=n.getData("text/plain")),o.selection.isFake)s=Array.from(o.selection.getRanges());else if(t.length)s=t.map((e=>i.domConverter.domRangeToView(e)));else if(x.env.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();s=Array.from(i.domConverter.domSelectionToView(t).getRanges())}if(x.env.isAndroid&&"insertCompositionText"==e.inputType&&r&&r.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[i.createRange(s[0].end)]});else if("insertText"==e.inputType&&r&&r.includes("\n")){const t=r.split(/\n{1,2}/g);let i=s;for(let r=0;r{if(this.isEnabled&&(0,x.isArrowKeyCode)(t.keyCode)){const i=new He(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(i,t),i.stop.called&&e.stop()}}))}observe(){}stopObserving(){}}class ri extends Ht{constructor(e){super(e);const t=this.document;t.on("keydown",((e,i)=>{if(!this.isEnabled||i.keyCode!=x.keyCodes.tab||i.ctrlKey)return;const o=new He(t,"tab",t.selection.getFirstRange());t.fire(o,i),o.stop.called&&e.stop()}))}observe(){}stopObserving(){}}class si extends((0,x.ObservableMixin)()){constructor(e){var t;super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new Ke(e),this.domConverter=new Nt(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new Et(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new rt(this.document),this.addObserver(Jt),this.addObserver(Qt),this.addObserver(Xt),this.addObserver(jt),this.addObserver(qt),this.addObserver(ei),this.addObserver(ni),this.addObserver(oi),this.addObserver(ri),this.document.on("arrowKey",Ct,{priority:"low"}),(t=this).document.on("arrowKey",((e,i)=>function(e,t,i){if(t.keyCode==x.keyCodes.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),o=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(o||t.shiftKey){const t=e.focusNode,n=e.focusOffset,r=i.domPositionToView(t,n);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(s=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(s){const t=i.viewPositionToDom(a);o?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,i,t.domConverter)),{priority:"low"}),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0}))}attachDomRoot(e,t="main"){const i=this.document.getRoot(t);i._name=e.tagName.toLowerCase();const o={};for(const{name:t,value:n}of Array.from(e.attributes))o[t]=n,"class"===t?this._writer.addClass(n.split(" "),i):this._writer.setAttribute(t,n,i);this._initialDomRootAttributes.set(e,o);const n=()=>{this._writer.setAttribute("contenteditable",(!i.isReadOnly).toString(),i),i.isReadOnly?this._writer.addClass("ck-read-only",i):this._writer.removeClass("ck-read-only",i)};n(),this.domRoots.set(t,e),this.domConverter.bindElements(e,i),this._renderer.markToSync("children",i),this._renderer.markToSync("attributes",i),this._renderer.domDocuments.add(e.ownerDocument),i.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),i.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),i.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),i.on("change:isReadOnly",(()=>this.change(n))),i.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const i of this._observers.values())i.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const i=this._initialDomRootAttributes.get(t);for(const e in i)t.setAttribute(e,i[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,i]of this.domRoots)t.observe(i,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:i=20,ancestorOffset:o=20}={}){const n=this.document.selection.getFirstRange();n&&(0,x.scrollViewportToShowTarget)({target:this.domConverter.viewRangeToDom(n),viewportOffset:i,ancestorOffset:o,alignToTop:e,forceScroll:t})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new x.CKEditorError("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){x.CKEditorError.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(Qt).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return ze._createAt(e,t)}createPositionAfter(e){return ze._createAfter(e)}createPositionBefore(e){return ze._createBefore(e)}createRange(e,t){return new Ne(e,t)}createRangeOn(e){return Ne._createOn(e)}createRangeIn(e){return Ne._createIn(e)}createSelection(...e){return new Le(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class ai{is(){throw new Error("is() method is abstract")}}class li extends ai{constructor(e){super(),this.parent=null,this._attrs=(0,x.toMap)(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new x.CKEditorError("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new x.CKEditorError("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e,t={}){const i=this.getAncestors(t),o=e.getAncestors(t);let n=0;for(;i[n]==o[n]&&i[n];)n++;return 0===n?null:i[n-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),o=(0,x.compareArrays)(t,i);switch(o){case"prefix":return!0;case"extension":return!1;default:return t[o](e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=(0,x.toMap)(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}li.prototype.is=function(e){return"node"===e||"model:node"===e};class ci{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new x.CKEditorError("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const i of this._nodes){if(e>=t&&ee.toJSON()))}}class di extends li{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new di(this.data,this.getAttributes())}static fromJSON(e){return new di(e.data,e.attributes)}}di.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class ui extends ai{constructor(e,t,i){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new x.CKEditorError("model-textproxy-wrong-offsetintext",this);if(i<0||t+i>e.offsetSize)throw new x.CKEditorError("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}ui.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class hi extends li{constructor(e,t,i){super(t),this._children=new ci,this.name=e,i&&this._insertChild(0,i)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}findAncestor(e,t={}){let i=t.includeSelf?this:this.parent;for(;i;){if(i.name===e)return i;i=i.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new hi(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){return"string"==typeof e?[new di(e)]:((0,x.isIterable)(e)||(e=[e]),Array.from(e).map((e=>"string"==typeof e?new di(e):e instanceof ui?new di(e.data,e.getAttributes()):e)))}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}static fromJSON(e){let t;if(e.children){t=[];for(const i of e.children)i.name?t.push(hi.fromJSON(i)):t.push(di.fromJSON(i))}return new hi(e.name,e.attributes,t)}}hi.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class mi{constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new x.CKEditorError("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new x.CKEditorError("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=pi._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,i,o,n;do{o=this.position,n=this._visitedParent,({done:t,value:i}=this.next())}while(!t&&e(i));t||(this._position=o,this._visitedParent=n)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),i=this._visitedParent;if(null===i.parent&&t.offset===i.maxOffset)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const o=fi(t,i),n=o||bi(t,i,o);if(n instanceof hi)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=n),this._position=t,gi("elementStart",n,e,t,1);if(n instanceof di){let o;if(this.singleCharacters)o=1;else{let e=n.endOffset;this._boundaryEndParent==i&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),o=t.offset-e}const n=t.offset-r.startOffset,s=new ui(r,n-o,o);return t.offset-=o,this._position=t,gi("text",s,e,t,o)}return t.path.pop(),this._position=t,this._visitedParent=i.parent,gi("elementStart",i,e,t,1)}}function gi(e,t,i,o,n){return{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:o,length:n}}}class pi extends ai{constructor(e,t,i="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new x.CKEditorError("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new x.CKEditorError("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=i}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t1)return!1;if(1===t)return ki(e,this,i);if(-1===t)return ki(this,e,i)}return this.path.length===e.path.length||(this.path.length>e.path.length?_i(this.path,t):_i(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;const t=this.getParentPath(),i=e.getParentPath();return"same"==(0,x.compareArrays)(t,i)}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=pi._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let i;return t.containsPosition(this)||t.start.isEqual(this)?(i=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(i=i._getTransformedByDeletion(e.deletionPosition,1))):i=this.isEqual(e.deletionPosition)?pi._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),i}_getTransformedByDeletion(e,t){const i=pi._createAt(this);if(this.root!=e.root)return i;if("same"==(0,x.compareArrays)(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;i.offset-=t}}else if("prefix"==(0,x.compareArrays)(e.getParentPath(),this.getParentPath())){const o=e.path.length-1;if(e.offset<=this.path[o]){if(e.offset+t>this.path[o])return null;i.path[o]-=t}}return i}_getTransformedByInsertion(e,t){const i=pi._createAt(this);if(this.root!=e.root)return i;if("same"==(0,x.compareArrays)(e.getParentPath(),this.getParentPath()))(e.offset=t;){if(e.path[o]+n!==i.maxOffset)return!1;n=1,o--,i=i.parent}return!0}(e,i+1)}function _i(e,t){for(;tt+1;){const t=o.maxOffset-i.offset;0!==t&&e.push(new vi(i,i.getShiftedBy(t))),i.path=i.path.slice(0,-1),i.offset++,o=o.parent}for(;i.path.length<=this.end.path.length;){const t=this.end.path[i.path.length-1],o=t-i.offset;0!==o&&e.push(new vi(i,i.getShiftedBy(o))),i.offset=t,i.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new mi(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new mi(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new mi(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new vi(this.start,this.end)]}getTransformedByOperations(e){const t=[new vi(this.start,this.end)];for(const i of e)for(let e=0;e0?new this(i,o):new this(o,i)}static _createIn(e){return new this(pi._createAt(e,0),pi._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(pi._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new x.CKEditorError("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const i=e.indexOf(t),o=new this(t.start,t.end);if(i>0)for(let t=i-1;e[t].end.isEqual(o.start);t++)o.start=pi._createAt(e[t].start);for(let t=i+1;t{if(t.viewPosition)return;const i=this._modelToViewMapping.get(t.modelPosition.parent);if(!i)throw new x.CKEditorError("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(i,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const i=this.findMappedViewAncestor(t.viewPosition),o=this._viewToModelMapping.get(i),n=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,i);t.modelPosition=pi._createAt(o,n)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const i=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(i)==e&&this._modelToViewMapping.delete(i))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const i=this._markerNameToElements.get(t)||new Set;i.add(e);const o=this._elementToMarkerNames.get(e)||new Set;o.add(t),this._markerNameToElements.set(t,i),this._elementToMarkerNames.set(e,o)}unbindElementFromMarkerName(e,t){const i=this._markerNameToElements.get(t);i&&(i.delete(e),0==i.size&&this._markerNameToElements.delete(t));const o=this._elementToMarkerNames.get(e);o&&(o.delete(t),0==o.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new vi(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new Ne(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const i={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",i),i.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const i=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())i.add(t);else i.add(e);return i}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,i){if(i!=e)return this._toModelOffset(e.parent,e.index,i)+this._toModelOffset(e,t,e);if(e.is("$text"))return t;let o=0;for(let i=0;i1?t[0]+":"+t[1]:t[0]}class Ai extends((0,x.EmitterMixin)()){constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,i){const o=this._createConversionApi(i,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,o);const n=this._reduceChanges(e.getChanges());for(const e of n)"insert"===e.type?this._convertInsert(vi._createFromPositionAndShift(e.position,e.length),o):"reinsert"===e.type?this._convertReinsert(vi._createFromPositionAndShift(e.position,e.length),o):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,o):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,o);for(const e of o.mapper.flushUnboundMarkerNames()){const i=t.get(e).getRange();this._convertMarkerRemove(e,i,o),this._convertMarkerAdd(e,i,o)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,o);o.mapper.flushDeferredBindings(),o.consumable.verifyAllConsumed("insert")}convert(e,t,i,o={}){const n=this._createConversionApi(i,void 0,o);this._convertInsert(e,n);for(const[e,i]of t)this._convertMarkerAdd(e,i,n);n.consumable.verifyAllConsumed("insert")}convertSelection(e,t,i){const o=Array.from(t.getMarkersAtPosition(e.getFirstPosition())),n=this._createConversionApi(i);if(this._addConsumablesForSelection(n.consumable,e,o),this.fire("selection",{selection:e},n),e.isCollapsed){for(const t of o){const i=t.getRange();if(!Ei(e.getFirstPosition(),t,n.mapper))continue;const o={item:e,markerName:t.name,markerRange:i};n.consumable.test(e,"addMarker:"+t.name)&&this.fire(`addMarker:${t.name}`,o,n)}for(const t of e.getAttributeKeys()){const i={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};n.consumable.test(e,"attribute:"+i.attributeKey)&&this.fire(`attribute:${i.attributeKey}:$text`,i,n)}}}_convertInsert(e,t,i={}){i.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,Array.from(e));for(const i of Array.from(e.getWalker({shallow:!0})).map(Ti))this._testAndFire("insert",i,t)}_convertRemove(e,t,i,o){this.fire(`remove:${i}`,{position:e,length:t},o)}_convertAttribute(e,t,i,o,n){this._addConsumablesForRange(n.consumable,e,`attribute:${t}`);for(const r of e){const e={item:r.item,range:vi._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:t,attributeOldValue:i,attributeNewValue:o};this._testAndFire(`attribute:${t}`,e,n)}}_convertReinsert(e,t){const i=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,i);for(const e of i.map(Ti))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,i){if("$graveyard"==t.root.rootName)return;const o=`addMarker:${e}`;if(i.consumable.add(t,o),this.fire(o,{markerName:e,markerRange:t},i),i.consumable.consume(t,o)){this._addConsumablesForRange(i.consumable,t,o);for(const n of t.getItems()){if(!i.consumable.test(n,o))continue;const r={item:n,range:vi._createOn(n),markerName:e,markerRange:t};this.fire(o,r,i)}}}_convertMarkerRemove(e,t,i){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},i)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const i of t){const t=i.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const i of t.getAttributeKeys())e.add(t,"attribute:"+i)}}return e}_addConsumablesForRange(e,t,i){for(const o of t.getItems())e.add(o,i);return e}_addConsumablesForSelection(e,t,i){e.add(t,"selection");for(const o of i)e.add(t,"addMarker:"+o.name);for(const i of t.getAttributeKeys())e.add(t,"attribute:"+i);return e}_testAndFire(e,t,i){const o=function(e,t){return`${e}:${t.item.is("element")?t.item.name:"$text"}`}(e,t),n=t.item.is("$textProxy")?i.consumable._getSymbolForTextProxy(t.item):t.item,r=this._firedEventsMap.get(i),s=r.get(n);if(s){if(s.has(o))return;s.add(o)}else r.set(n,new Set([o]));this.fire(o,t,i)}_testAndFireAddAttributes(e,t){const i={item:e,range:vi._createOn(e)};for(const e of i.item.getAttributeKeys())i.attributeKey=e,i.attributeOldValue=null,i.attributeNewValue=i.item.getAttribute(e),this._testAndFire(`attribute:${e}`,i,t)}_createConversionApi(e,t=new Set,i={}){const o={...this._conversionApi,consumable:new Ci,writer:e,options:i,convertItem:e=>this._convertInsert(vi._createOn(e),o),convertChildren:e=>this._convertInsert(vi._createIn(e),o,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,o),canReuseView:e=>!t.has(o.mapper.toModelElement(e))};return this._firedEventsMap.set(o,new Map),o}}function Ei(e,t,i){const o=t.getRange(),n=Array.from(e.getAncestors());return n.shift(),n.reverse(),!n.some((e=>{if(o.containsItem(e))return!!i.toViewElement(e).getCustomProperty("addHighlight")}))}function Ti(e){return{item:e.item,range:vi._createFromPositionAndShift(e.previousPosition,e.length)}}class Si extends((0,x.EmitterMixin)(ai)){constructor(...e){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const o of e._ranges)if(t.isEqual(o)){i=!0;break}if(!i)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new vi(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new vi(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new vi(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,i,o]=e;if("object"==typeof i&&(o=i,i=void 0),null===t)this._setRanges([]);else if(t instanceof Si)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof vi)this._setRanges([t],!!o&&!!o.backward);else if(t instanceof pi)this._setRanges([new vi(t)]);else if(t instanceof li){const e=!!o&&!!o.backward;let n;if("in"==i)n=vi._createIn(t);else if("on"==i)n=vi._createOn(t);else{if(void 0===i)throw new x.CKEditorError("model-selection-setto-required-second-parameter",[this,t]);n=new vi(pi._createAt(t,i))}this._setRanges([n],e)}else{if(!(0,x.isIterable)(t))throw new x.CKEditorError("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,o&&!!o.backward)}}_setRanges(e,t=!1){const i=Array.from(e),o=i.some((t=>{if(!(t instanceof vi))throw new x.CKEditorError("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(i.length!==this._ranges.length||o)&&(this._replaceAllRanges(i),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new x.CKEditorError("model-selection-setfocus-no-ranges",[this,e]);const i=pi._createAt(e,t);if("same"==i.compareWith(this.focus))return;const o=this.anchor;this._ranges.length&&this._popRange(),"before"==i.compareWith(o)?(this._pushRange(new vi(i,o)),this._lastRangeBackward=!0):(this._pushRange(new vi(o,i)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const i=Vi(t.start,e);Oi(i,t)&&(yield i);for(const i of t.getWalker()){const o=i.item;"elementEnd"==i.type&&Ii(o,e,t)&&(yield o)}const o=Vi(t.end,e);Bi(o,t)&&(yield o)}}containsEntireContent(e=this.anchor.root){const t=pi._createAt(e,0),i=pi._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new vi(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function Pi(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function Ii(e,t,i){return Pi(e,t)&&Ri(e,i)}function Vi(e,t){const i=e.parent.root.document.model.schema,o=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let n=!1;const r=o.find((e=>!n&&(n=i.isLimit(e),!n&&Pi(e,t))));return o.forEach((e=>t.add(e))),r}function Ri(e,t){const i=function(e){const t=e.root.document.model.schema;let i=e.parent;for(;i;){if(t.isBlock(i))return i;i=i.parent}}(e);return!i||!t.containsRange(vi._createOn(i),!0)}function Oi(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(pi._createAt(e,e.maxOffset))&&Ri(e,t))}function Bi(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(pi._createAt(e,0))&&Ri(e,t))}Si.prototype.is=function(e){return"selection"===e||"model:selection"===e};class Mi extends((0,x.EmitterMixin)(vi)){constructor(e,t){super(e,t),zi.call(this)}detach(){this.stopListening()}toRange(){return new vi(this.start,this.end)}static fromRange(e){return new Mi(e.start,e.end)}}function zi(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&Ni.call(this,i)}),{priority:"low"})}function Ni(e){const t=this.getTransformedByOperation(e),i=vi._createFromRanges(t),o=!i.isEqual(this),n=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let r=null;if(o){"$graveyard"==i.root.rootName&&(r="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=i.start,this.end=i.end,this.fire("change:range",t,{deletionPosition:r})}else n&&this.fire("change:content",this.toRange(),{deletionPosition:r})}Mi.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const Di="selection:";class Li extends((0,x.EmitterMixin)(ai)){constructor(e){super(),this._selection=new Fi(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return Di+e}static _isStoreAttributeKey(e){return e.startsWith(Di)}}Li.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class Fi extends Si{constructor(e){super(),this.markers=new x.Collection({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&"marker"!=i.type&&"rename"!=i.type&&"noop"!=i.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,i,o)=>{this._updateMarker(t,o)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const i=e.document.differ;for(const o of i.getChanges()){if("insert"!=o.type)continue;const i=o.position.parent;o.length===i.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(i.getAttributeKeys()).filter((e=>e.startsWith(Di)));for(const o of t)e.removeAttribute(o,i)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=o.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const i=t.name.split(":",1)[0];if(!this._observedMarkers.has(i))continue;const o=t.getRange();for(const i of this.getRanges())o.containsRange(i,!i.isCollapsed)&&e.push(t)}const i=Array.from(this.markers);for(const i of e)this.markers.has(i)||(this.markers.add(i),t=!0);for(const i of Array.from(this.markers))e.includes(i)||(this.markers.remove(i),t=!0);t&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateMarker(e,t){const i=e.name.split(":",1)[0];if(!this._observedMarkers.has(i))return;let o=!1;const n=Array.from(this.markers),r=this.markers.has(e);if(t){let i=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){i=!0;break}i&&!r?(this.markers.add(e),o=!0):!i&&r&&(this.markers.remove(e),o=!0)}else r&&(this.markers.remove(e),o=!0);o&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateAttributes(e){const t=(0,x.toMap)(this._getSurroundingAttributes()),i=(0,x.toMap)(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const o=[];for(const[e,t]of this.getAttributes())i.has(e)&&i.get(e)===t||o.push(e);for(const[e]of i)this.hasAttribute(e)||o.push(e);o.length>0&&this.fire("change:attribute",{attributeKeys:o,directChange:!1})}_setAttribute(e,t,i=!0){const o=i?"normal":"low";return("low"!=o||"normal"!=this._attributePriority.get(e))&&(super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,o),!0))}_removeAttribute(e,t=!0){const i=t?"normal":"low";return!("low"==i&&"normal"==this._attributePriority.get(e)||(this._attributePriority.set(e,i),!super.hasAttribute(e)||(this._attrs.delete(e),0)))}_setAttributesTo(e){const t=new Set;for(const[t,i]of this.getAttributes())e.get(t)!==i&&this._removeAttribute(t,!1);for(const[i,o]of e)this._setAttribute(i,o,!1)&&t.add(i);return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(Di)){const i=t.substr(10);yield[i,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let i=null;if(this.isCollapsed){const o=e.textNode?e.textNode:e.nodeBefore,n=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(i=Hi(o)),i||(i=Hi(n)),!this.isGravityOverridden&&!i){let e=o;for(;e&&!t.isInline(e)&&!i;)e=e.previousSibling,i=Hi(e)}if(!i){let e=n;for(;e&&!t.isInline(e)&&!i;)e=e.nextSibling,i=Hi(e)}i||(i=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const o of e){if(o.item.is("element")&&t.isObject(o.item))break;if("text"==o.type){i=o.item.getAttributes();break}}}return i}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function Hi(e){return e instanceof ui||e instanceof di?e.getAttributes():null}class Wi{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}const Zi=function(e){return(0,E.Z)(e,5)};class Ui extends Wi{elementToElement(e){return this.add(function(e){const t=qi(e.model),i=Ki(e.view,"container");return t.attributes.length&&(t.children=!0),o=>{o.on(`insert:${t.name}`,function(e,t=io){return(i,o,n)=>{if(!t(o.item,n.consumable,{preflight:!0}))return;const r=e(o.item,n,o);if(!r)return;t(o.item,n.consumable);const s=n.mapper.toViewPosition(o.range.start);n.mapper.bindElements(o.item,r),n.writer.insert(s,r),n.convertAttributes(o.item),eo(r,o.item.getChildren(),n,{reconversion:o.reconversion})}}(i,Xi(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&o.on("reduceChanges",Qi(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=qi(e.model),i=Ki(e.view,"container");return t.children=!0,o=>{if(o._conversionApi.schema.checkChild(t.name,"$text"))throw new x.CKEditorError("conversion-element-to-structure-disallowed-text",o,{elementName:t.name});var n,r;o.on(`insert:${t.name}`,(n=i,r=Xi(t),(e,t,i)=>{if(!r(t.item,i.consumable,{preflight:!0}))return;const o=new Map;i.writer._registerSlotFactory(function(e,t,i){return(o,n)=>{const r=o.createContainerElement("$slot");let s=null;if("children"===n)s=Array.from(e.getChildren());else{if("function"!=typeof n)throw new x.CKEditorError("conversion-slot-mode-unknown",i.dispatcher,{modeOrFilter:n});s=Array.from(e.getChildren()).filter((e=>n(e)))}return t.set(r,s),r}}(t.item,o,i));const s=n(t.item,i,t);if(i.writer._clearSlotFactory(),!s)return;!function(e,t,i){const o=Array.from(t.values()).flat(),n=new Set(o);if(n.size!=o.length)throw new x.CKEditorError("conversion-slot-filter-overlap",i.dispatcher,{element:e});if(n.size!=e.childCount)throw new x.CKEditorError("conversion-slot-filter-incomplete",i.dispatcher,{element:e})}(t.item,o,i),r(t.item,i.consumable);const a=i.mapper.toViewPosition(t.range.start);i.mapper.bindElements(t.item,s),i.writer.insert(a,s),i.convertAttributes(t.item),function(e,t,i,o){i.mapper.on("modelToViewPosition",s,{priority:"highest"});let n=null,r=null;for([n,r]of t)eo(e,r,i,o),i.writer.move(i.writer.createRangeIn(n),i.writer.createPositionBefore(n)),i.writer.remove(n);function s(e,t){const i=t.modelPosition.nodeAfter,o=r.indexOf(i);o<0||(t.viewPosition=t.mapper.findPositionIn(n,o))}i.mapper.off("modelToViewPosition",s)}(s,o,i,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),o.on("reduceChanges",Qi(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){let t=(e=Zi(e)).model;"string"==typeof t&&(t={key:t});let i=`attribute:${t.key}`;if(t.name&&(i+=":"+t.name),t.values)for(const i of t.values)e.view[i]=Ki(e.view[i],"attribute");else e.view=Ki(e.view,"attribute");const o=Gi(e);return t=>{t.on(i,function(e){return(t,i,o)=>{if(!o.consumable.test(i.item,t.name))return;const n=e(i.attributeOldValue,o,i),r=e(i.attributeNewValue,o,i);if(!n&&!r)return;o.consumable.consume(i.item,t.name);const s=o.writer,a=s.document.selection;if(i.item instanceof Si||i.item instanceof Li)s.wrap(a.getFirstRange(),r);else{let e=o.mapper.toViewRange(i.range);null!==i.attributeOldValue&&n&&(e=s.unwrap(e,n)),null!==i.attributeNewValue&&r&&s.wrap(e,r)}}}(o),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=(e=Zi(e)).model;"string"==typeof t&&(t={key:t});let i=`attribute:${t.key}`;if(t.name&&(i+=":"+t.name),t.values)for(const i of t.values)e.view[i]=Ji(e.view[i]);else e.view=Ji(e.view);const o=Gi(e);return t=>{var n;t.on(i,(n=o,(e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;const o=n(t.attributeOldValue,i,t),r=n(t.attributeNewValue,i,t);if(!o&&!r)return;i.consumable.consume(t.item,e.name);const s=i.mapper.toViewElement(t.item),a=i.writer;if(!s)throw new x.CKEditorError("conversion-attribute-to-attribute-on-text",i.dispatcher,t);if(null!==t.attributeOldValue&&o)if("class"==o.key){const e=(0,x.toArray)(o.value);for(const t of e)a.removeClass(t,s)}else if("style"==o.key){const e=Object.keys(o.value);for(const t of e)a.removeStyle(t,s)}else a.removeAttribute(o.key,s);if(null!==t.attributeNewValue&&r)if("class"==r.key){const e=(0,x.toArray)(r.value);for(const t of e)a.addClass(t,s)}else if("style"==r.key){const e=Object.keys(r.value);for(const t of e)a.setStyle(t,r.value[t],s)}else a.setAttribute(r.key,r.value,s)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=Ki(e.view,"ui");return i=>{var o;i.on(`addMarker:${e.model}`,(o=t,(e,t,i)=>{t.isOpening=!0;const n=o(t,i);t.isOpening=!1;const r=o(t,i);if(!n||!r)return;const s=t.markerRange;if(s.isCollapsed&&!i.consumable.consume(s,e.name))return;for(const t of s)if(!i.consumable.consume(t.item,e.name))return;const a=i.mapper,l=i.writer;l.insert(a.toViewPosition(s.start),n),i.mapper.bindElementToMarker(n,t.markerName),s.isCollapsed||(l.insert(a.toViewPosition(s.end),r),i.mapper.bindElementToMarker(r,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),i.on(`removeMarker:${e.model}`,((e,t,i)=>{const o=i.mapper.markerNameToElements(t.markerName);if(o){for(const e of o)i.mapper.unbindElementFromMarkerName(e,t.markerName),i.writer.clear(i.writer.createRangeOn(e),e);i.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var i;t.on(`addMarker:${e.model}`,(i=e.view,(e,t,o)=>{if(!t.item)return;if(!(t.item instanceof Si||t.item instanceof Li||t.item.is("$textProxy")))return;const n=Yi(i,t,o);if(!n)return;if(!o.consumable.consume(t.item,e.name))return;const r=o.writer,s=ji(r,n),a=r.document.selection;if(t.item instanceof Si||t.item instanceof Li)r.wrap(a.getFirstRange(),s);else{const e=o.mapper.toViewRange(t.range),i=r.wrap(e,s);for(const e of i.getItems())if(e.is("attributeElement")&&e.isSimilar(s)){o.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,i,o)=>{if(!i.item)return;if(!(i.item instanceof hi))return;const n=Yi(e,i,o);if(!n)return;if(!o.consumable.test(i.item,t.name))return;const r=o.mapper.toViewElement(i.item);if(r&&r.getCustomProperty("addHighlight")){o.consumable.consume(i.item,t.name);for(const e of vi._createIn(i.item))o.consumable.consume(e.item,t.name);r.getCustomProperty("addHighlight")(r,n,o.writer),o.mapper.bindElementToMarker(r,i.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,i,o)=>{if(i.markerRange.isCollapsed)return;const n=Yi(e,i,o);if(!n)return;const r=ji(o.writer,n),s=o.mapper.markerNameToElements(i.markerName);if(s){for(const e of s)o.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("attributeElement")?o.writer.unwrap(o.writer.createRangeOn(e),r):e.getCustomProperty("removeHighlight")(e,n.id,o.writer);o.writer.clearClonedElementsGroup(i.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){const t=(e=Zi(e)).model;let i=e.view;return i||(i=i=>({group:t,name:i.substr(e.model.length+1)})),o=>{var n;o.on(`addMarker:${t}`,(n=i,(e,t,i)=>{const o=n(t.markerName,i);if(!o)return;const r=t.markerRange;i.consumable.consume(r,e.name)&&($i(r,!1,i,t,o),$i(r,!0,i,t,o),e.stop())}),{priority:e.converterPriority||"normal"}),o.on(`removeMarker:${t}`,function(e){return(t,i,o)=>{const n=e(i.markerName,o);if(!n)return;const r=o.mapper.markerNameToElements(i.markerName);if(r){for(const e of r)o.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("containerElement")?(s(`data-${n.group}-start-before`,e),s(`data-${n.group}-start-after`,e),s(`data-${n.group}-end-before`,e),s(`data-${n.group}-end-after`,e)):o.writer.clear(o.writer.createRangeOn(e),e);o.writer.clearClonedElementsGroup(i.markerName),t.stop()}function s(e,t){if(t.hasAttribute(e)){const i=new Set(t.getAttribute(e).split(","));i.delete(n.name),0==i.size?o.writer.removeAttribute(e,t):o.writer.setAttribute(e,Array.from(i).join(","),t)}}}}(i),{priority:e.converterPriority||"normal"})}}(e))}}function ji(e,t){const i=e.createAttributeElement("span",t.attributes);return t.classes&&i._addClass(t.classes),"number"==typeof t.priority&&(i._priority=t.priority),i._id=t.id,i}function $i(e,t,i,o,n){const r=t?e.start:e.end,s=r.nodeAfter&&r.nodeAfter.is("element")?r.nodeAfter:null,a=r.nodeBefore&&r.nodeBefore.is("element")?r.nodeBefore:null;if(s||a){let e,r;t&&s||!t&&!a?(e=s,r=!0):(e=a,r=!1);const l=i.mapper.toViewElement(e);if(l)return void function(e,t,i,o,n,r){const s=`data-${r.group}-${t?"start":"end"}-${i?"before":"after"}`,a=e.hasAttribute(s)?e.getAttribute(s).split(","):[];a.unshift(r.name),o.writer.setAttribute(s,a.join(","),e),o.mapper.bindElementToMarker(e,n.markerName)}(l,t,r,i,o,n)}!function(e,t,i,o,n){const r=`${n.group}-${t?"start":"end"}`,s=n.name?{name:n.name}:null,a=i.writer.createUIElement(r,s);i.writer.insert(e,a),i.mapper.bindElementToMarker(a,o.markerName)}(i.mapper.toViewPosition(r),t,i,o,n)}function qi(e){return"string"==typeof e&&(e={name:e}),e.attributes?Array.isArray(e.attributes)||(e.attributes=[e.attributes]):e.attributes=[],e.children=!!e.children,e}function Ki(e,t){return"function"==typeof e?e:(i,o)=>function(e,t,i){let o;"string"==typeof e&&(e={name:e});const n=t.writer,r=Object.assign({},e.attributes);if("container"==i)o=n.createContainerElement(e.name,r);else if("attribute"==i){const t={priority:e.priority||Ge.DEFAULT_PRIORITY};o=n.createAttributeElement(e.name,r,t)}else o=n.createUIElement(e.name,r);if(e.styles){const t=Object.keys(e.styles);for(const i of t)n.setStyle(i,e.styles[i],o)}if(e.classes){const t=e.classes;if("string"==typeof t)n.addClass(t,o);else for(const e of t)n.addClass(e,o)}return o}(e,o,t)}function Gi(e){return e.model.values?(t,i,o)=>{const n=e.view[t];return n?n(t,i,o):null}:e.view}function Ji(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function Yi(e,t,i){const o="function"==typeof e?e(t,i):e;return o?(o.priority||(o.priority=10),o.id||(o.id=t.markerName),o):null}function Qi(e){const t=function(e){return(t,i)=>{if(!t.is("element",e.name))return!1;if("attribute"==i.type){if(e.attributes.includes(i.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,i)=>{const o=[];i.reconvertedElements||(i.reconvertedElements=new Set);for(const e of i.changes){const n="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(n&&t(n,e)){if(!i.reconvertedElements.has(n)){i.reconvertedElements.add(n);const e=pi._createBefore(n);let t=o.length;for(let i=o.length-1;i>=0;i--){const n=o[i],r=("attribute"==n.type?n.range.start:n.position).compareWith(e);if("before"==r||"remove"==n.type&&"same"==r)break;t=i}o.splice(t,0,{type:"remove",name:n.name,position:e,length:1},{type:"reinsert",name:n.name,position:e,length:1})}}else o.push(e)}i.changes=o}}function Xi(e){return(t,i,o={})=>{const n=["insert"];for(const i of e.attributes)t.hasAttribute(i)&&n.push(`attribute:${i}`);return!!n.every((e=>i.test(t,e)))&&(o.preflight||n.forEach((e=>i.consume(t,e))),!0)}}function eo(e,t,i,o){for(const n of t)to(e.root,n,i,o)||i.convertItem(n)}function to(e,t,i,o){const{writer:n,mapper:r}=i;if(!o.reconversion)return!1;const s=r.toViewElement(t);return!(!s||s.root==e||!i.canReuseView(s)||(n.move(n.createRangeOn(s),r.toViewPosition(pi._createBefore(t))),0))}function io(e,t,{preflight:i}={}){return i?t.test(e,"insert"):t.consume(e,"insert")}function oo(e){const{schema:t,document:i}=e.model;for(const o of i.getRootNames()){const n=i.getRoot(o);if(n.isEmpty&&!t.checkChild(n,"$text")&&t.checkChild(n,"paragraph"))return e.insertElement("paragraph",n),!0}return!1}function no(e,t,i){const o=i.createContext(e);return!!i.checkChild(o,"paragraph")&&!!i.checkChild(o.push("paragraph"),t)}function ro(e,t){const i=t.createElement("paragraph");return t.insert(i,e),t.createPositionAt(i,0)}class so extends Wi{elementToElement(e){return this.add(ao(e))}elementToAttribute(e){return this.add(function(e){uo(e=Zi(e));const t=ho(e,!1),i=lo(e.view),o=i?`element:${i}`:"element";return i=>{i.on(o,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=null;("string"==typeof(e=Zi(e)).view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let i;return i="class"==t||"style"==t?{["class"==t?"classes":"styles"]:e.view.value}:{attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}},e.view.name&&(i.name=e.view.name),e.view=i,t}(e)),uo(e,t);const i=ho(e,!0);return t=>{t.on("element",i,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,i)=>{const o="string"==typeof e?e:e(t,i);return i.writer.createElement("$marker",{"data-name":o})}}(e.model);return ao({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){(e=Zi(e)).model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},i=co(mo(t,"start")),o=co(mo(t,"end"));return n=>{n.on(`element:${e.view}-start`,i,{priority:e.converterPriority||"normal"}),n.on(`element:${e.view}-end`,o,{priority:e.converterPriority||"normal"});const r=x.priorities.get("low"),s=x.priorities.get("highest"),a=x.priorities.get(e.converterPriority)/s;n.on("element",function(e){return(t,i,o)=>{const n=`data-${e.view}`;function r(t,n){for(const r of n){const n=e.model(r,o),s=o.writer.createElement("$marker",{"data-name":n});o.writer.insert(s,t),i.modelCursor.isEqual(t)?i.modelCursor=i.modelCursor.getShiftedBy(1):i.modelCursor=i.modelCursor._getTransformedByInsertion(t,1),i.modelRange=i.modelRange._getTransformedByInsertion(t,1)[0]}}(o.consumable.test(i.viewItem,{attributes:n+"-end-after"})||o.consumable.test(i.viewItem,{attributes:n+"-start-after"})||o.consumable.test(i.viewItem,{attributes:n+"-end-before"})||o.consumable.test(i.viewItem,{attributes:n+"-start-before"}))&&(i.modelRange||Object.assign(i,o.convertChildren(i.viewItem,i.modelCursor)),o.consumable.consume(i.viewItem,{attributes:n+"-end-after"})&&r(i.modelRange.end,i.viewItem.getAttribute(n+"-end-after").split(",")),o.consumable.consume(i.viewItem,{attributes:n+"-start-after"})&&r(i.modelRange.end,i.viewItem.getAttribute(n+"-start-after").split(",")),o.consumable.consume(i.viewItem,{attributes:n+"-end-before"})&&r(i.modelRange.start,i.viewItem.getAttribute(n+"-end-before").split(",")),o.consumable.consume(i.viewItem,{attributes:n+"-start-before"})&&r(i.modelRange.start,i.viewItem.getAttribute(n+"-start-before").split(",")))}}(t),{priority:r+a})}}(e))}}function ao(e){const t=co(e=Zi(e)),i=lo(e.view),o=i?`element:${i}`:"element";return i=>{i.on(o,t,{priority:e.converterPriority||"normal"})}}function lo(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function co(e){const t=new R(e.view);return(i,o,n)=>{const r=t.match(o.viewItem);if(!r)return;const s=r.match;if(s.name=!0,!n.consumable.test(o.viewItem,s))return;const a=function(e,t,i){return e instanceof Function?e(t,i):i.writer.createElement(e)}(e.model,o.viewItem,n);a&&n.safeInsert(a,o.modelCursor)&&(n.consumable.consume(o.viewItem,s),n.convertChildren(o.viewItem,a),n.updateConversionResult(a,o))}}function uo(e,t=null){const i=null===t||(e=>e.getAttribute(t)),o="object"!=typeof e.model?e.model:e.model.key,n="object"!=typeof e.model||void 0===e.model.value?i:e.model.value;e.model={key:o,value:n}}function ho(e,t){const i=new R(e.view);return(o,n,r)=>{if(!n.modelRange&&t)return;const s=i.match(n.viewItem);if(!s)return;if(function(e,t){const i="function"==typeof e?e(t):e;return!("object"==typeof i&&!lo(i))&&(!i.classes&&!i.attributes&&!i.styles)}(e.view,n.viewItem)?s.match.name=!0:delete s.match.name,!r.consumable.test(n.viewItem,s.match))return;const a=e.model.key,l="function"==typeof e.model.value?e.model.value(n.viewItem,r):e.model.value;if(null===l)return;n.modelRange||Object.assign(n,r.convertChildren(n.viewItem,n.modelCursor));const c=function(e,t,i,o){let n=!1;for(const r of Array.from(e.getItems({shallow:i})))o.schema.checkAttribute(r,t.key)&&(n=!0,r.hasAttribute(t.key)||o.writer.setAttribute(t.key,t.value,r));return n}(n.modelRange,{key:a,value:l},t,r);c&&(r.consumable.test(n.viewItem,{name:!0})&&(s.match.name=!0),r.consumable.consume(n.viewItem,s.match))}}function mo(e,t){return{view:`${e.view}-${t}`,model:(t,i)=>{const o=t.getAttribute("name"),n=e.model(o,i);return i.writer.createElement("$marker",{"data-name":n})}}}function go(e,t){return e.isCollapsed?function(e,t){const i=e.start,o=t.getNearestSelectionRange(i);if(!o){const e=i.getAncestors().reverse().find((e=>t.isObject(e)));return e?vi._createOn(e):null}if(!o.isCollapsed)return o;const n=o.start;return i.isEqual(n)?null:new vi(n)}(e,t):function(e,t){const{start:i,end:o}=e,n=t.checkChild(i,"$text"),r=t.checkChild(o,"$text"),s=t.getLimitElement(i),a=t.getLimitElement(o);if(s===a){if(n&&r)return null;if(function(e,t,i){const o=e.nodeAfter&&!i.isLimit(e.nodeAfter)||i.checkChild(e,"$text"),n=t.nodeBefore&&!i.isLimit(t.nodeBefore)||i.checkChild(t,"$text");return o||n}(i,o,t)){const e=i.nodeAfter&&t.isSelectable(i.nodeAfter)?null:t.getNearestSelectionRange(i,"forward"),n=o.nodeBefore&&t.isSelectable(o.nodeBefore)?null:t.getNearestSelectionRange(o,"backward"),r=e?e.start:i,s=n?n.end:o;return new vi(r,s)}}const l=s&&!s.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const e=i.nodeAfter&&o.nodeBefore&&i.nodeAfter.parent===o.nodeBefore.parent,n=l&&(!e||!fo(i.nodeAfter,t)),r=c&&(!e||!fo(o.nodeBefore,t));let d=i,u=o;return n&&(d=pi._createBefore(po(s,t))),r&&(u=pi._createAfter(po(a,t))),new vi(d,u)}return null}(e,t)}function po(e,t){let i=e,o=i;for(;t.isLimit(o)&&o.parent;)i=o,o=o.parent;return i}function fo(e,t){return e&&t.isSelectable(e)}class bo extends((0,x.ObservableMixin)()){constructor(e,t){super(),this.model=e,this.view=new si(t),this.mapper=new yi,this.downcastDispatcher=new Ai({mapper:this.mapper,schema:e.schema});const i=this.model.document,o=i.selection,n=this.model.markers;var r,s,a;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(i,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(i.differ,n,e),this.downcastDispatcher.convertSelection(o,n,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(i,o)=>{const n=o.newSelection,r=[];for(const e of n.getRanges())r.push(t.toModelRange(e));const s=e.createSelection(r,{backward:n.isBackward});s.isEqual(e.document.selection)||e.change((e=>{e.setSelection(s)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(r=this.mapper,s=this.model.schema,a=this.view,(e,t)=>{if(!a.document.isComposing||x.env.isAndroid)for(let e=0;e{if(!i.consumable.consume(t.item,e.name))return;const o=i.writer,n=i.mapper.toViewPosition(t.range.start),r=o.createText(t.item.data);o.insert(n,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,i)=>{i.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||i.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,i)=>{const o=i.mapper.toViewPosition(t.position),n=t.position.getShiftedBy(t.length),r=i.mapper.toViewPosition(n,{isPhantom:!0}),s=i.writer.createRange(o,r),a=i.writer.remove(s.getTrimmed());for(const e of i.writer.createRangeIn(a).getItems())i.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,i)=>{const o=i.writer,n=o.document.selection;for(const e of n.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&i.writer.mergeAttributes(e.start);o.setSelection(null)}),{priority:"high"}),this.downcastDispatcher.on("selection",((e,t,i)=>{const o=t.selection;if(o.isCollapsed)return;if(!i.consumable.consume(o,"selection"))return;const n=[];for(const e of o.getRanges())n.push(i.mapper.toViewRange(e));i.writer.setSelection(n,{backward:o.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,i)=>{const o=t.selection;if(!o.isCollapsed)return;if(!i.consumable.consume(o,"selection"))return;const n=i.writer,r=o.getFirstPosition(),s=i.mapper.toViewPosition(r),a=n.breakAttributes(s);n.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new Be(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,i=this.model.markers.get(t);if(!i)throw new x.CKEditorError("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(i)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class wo{constructor(){this._consumables=new Map}add(e,t){let i;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?i=this._consumables.get(e):(i=new _o(e),this._consumables.set(e,i)),i.add(t))}test(e,t){const i=this._consumables.get(e);return void 0===i?null:e.is("$text")||e.is("documentFragment")?i:i.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const i=this._consumables.get(e);void 0!==i&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):i.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},i=e.getAttributeKeys();for(const e of i)"style"!=e&&"class"!=e&&t.attributes.push(e);const o=e.getClassNames();for(const e of o)t.classes.push(e);const n=e.getStyleNames();for(const e of n)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new wo),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,wo.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const i of e.getChildren())t=wo.createFrom(i,t);return t}}const ko=["attributes","classes","styles"];class _o{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of ko)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of ko)if(t in e){const i=this._test(t,e[t]);if(!0!==i)return i}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of ko)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of ko)t in e&&this._revert(t,e[t])}_add(e,t){const i=(0,z.Z)(t)?t:[t],o=this._consumables[e];for(const t of i){if("attributes"===e&&("class"===t||"style"===t))throw new x.CKEditorError("viewconsumable-invalid-attribute",this);if(o.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))o.set(e,!0)}}_test(e,t){const i=(0,z.Z)(t)?t:[t],o=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){const e=o.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",i=this._test(e,[...this._consumables[e].keys()]);if(!0!==i)return i}return!0}_consume(e,t){const i=(0,z.Z)(t)?t:[t],o=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){if(o.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))o.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const i=(0,z.Z)(t)?t:[t],o=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t)!1===o.get(t)&&o.set(t,!0);else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class vo extends((0,x.ObservableMixin)()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new yo(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new yo(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new x.CKEditorError("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new x.CKEditorError("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!(!t||!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!(!t||!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!(!t||!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const i=this.getDefinition(e.last);return!!i&&i.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof pi){const t=e.nodeBefore,i=e.nodeAfter;if(!(t instanceof hi))throw new x.CKEditorError("schema-check-merge-no-element-before",this);if(!(i instanceof hi))throw new x.CKEditorError("schema-check-merge-no-element-after",this);return this.checkMerge(t,i)}for(const i of t.getChildren())if(!this.checkChild(e,i))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[i,o])=>{if(!o)return;const n=e(i,o);"boolean"==typeof n&&(t.stop(),t.return=n)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[i,o])=>{const n=e(i,o);"boolean"==typeof n&&(t.stop(),t.return=n)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;for(t=e instanceof pi?e.parent:(e instanceof vi?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const i=t.getCommonAncestor();return e?e.getCommonAncestor(i,{includeSelf:!0}):i}),null);!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const i=[...e.getFirstPosition().getAncestors(),new di("",e.getAttributes())];return this.checkAttribute(i,t)}{const i=e.getRanges();for(const e of i)for(const i of e)if(this.checkAttribute(i.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const i of e)yield*this._getValidRangesForRange(i,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new vi(e);let i,o;const n=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(i=new mi({boundaries:vi._createIn(n),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(o=new mi({boundaries:vi._createIn(n),startPosition:e}));for(const e of function*(e,t){let i=!1;for(;!i;){if(i=!0,e){const t=e.next();t.done||(i=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(i=!1,yield{walker:t,value:e.value})}}}(i,o)){const t=e.walker==i?"elementEnd":"elementStart",o=e.value;if(o.type==t&&this.isObject(o.item))return vi._createOn(o.item);if(this.checkChild(o.nextPosition,"$text"))return new vi(o.nextPosition)}return null}findAllowedParent(e,t){let i=e.parent;for(;i;){if(this.checkChild(i,t))return i;if(this.isLimit(i))return null;i=i.parent}return null}setAllowedAttributes(e,t,i){const o=i.model;for(const[n,r]of Object.entries(t))o.schema.checkAttribute(e,n)&&i.setAttribute(n,r,e)}removeDisallowedAttributes(e,t){for(const i of e)if(i.is("$text"))Mo(this,i,t);else{const e=vi._createIn(i).getPositions();for(const i of e)Mo(this,i.nodeBefore||i.parent,t)}}getAttributesWithProperty(e,t,i){const o={};for(const[n,r]of e.getAttributes()){const e=this.getAttributeProperties(n);void 0!==e[t]&&(void 0!==i&&i!==e[t]||(o[n]=r))}return o}createContext(e){return new yo(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,i=Object.keys(t);for(const o of i)e[o]=Co(t[o],o);for(const t of i)xo(e,t);for(const t of i)Ao(e,t);for(const t of i)Eo(e,t);for(const t of i)To(e,t),So(e,t);for(const t of i)Po(e,t),Io(e,t),Vo(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,i=t.length-1){const o=t.getItem(i);if(e.allowIn.includes(o.name)){if(0==i)return!0;{const e=this.getDefinition(o);return this._checkContextMatch(e,t,i-1)}}return!1}*_getValidRangesForRange(e,t){let i=e.start,o=e.start;for(const n of e.getItems({shallow:!0}))n.is("element")&&(yield*this._getValidRangesForRange(vi._createIn(n),t)),this.checkAttribute(n,t)||(i.isEqual(o)||(yield new vi(i,o)),i=pi._createAfter(n)),o=pi._createAfter(n);i.isEqual(o)||(yield new vi(i,o))}}class yo{constructor(e){if(e instanceof yo)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(Bo)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new yo([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Co(e,t){const i={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const i of e){const e=Object.keys(i).filter((e=>e.startsWith("is")));for(const o of e)t[o]=!!i[o]}}(e,i),Ro(e,i,"allowIn"),Ro(e,i,"allowContentOf"),Ro(e,i,"allowWhere"),Ro(e,i,"allowAttributes"),Ro(e,i,"allowAttributesOf"),Ro(e,i,"allowChildren"),Ro(e,i,"inheritTypesFrom"),function(e,t){for(const i of e){const e=i.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,i),i}function xo(e,t){const i=e[t];for(const o of i.allowChildren){const i=e[o];i&&i.allowIn.push(t)}i.allowChildren.length=0}function Ao(e,t){for(const i of e[t].allowContentOf)e[i]&&Oo(e,i).forEach((e=>{e.allowIn.push(t)}));delete e[t].allowContentOf}function Eo(e,t){for(const i of e[t].allowWhere){const o=e[i];if(o){const i=o.allowIn;e[t].allowIn.push(...i)}}delete e[t].allowWhere}function To(e,t){for(const i of e[t].allowAttributesOf){const o=e[i];if(o){const i=o.allowAttributes;e[t].allowAttributes.push(...i)}}delete e[t].allowAttributesOf}function So(e,t){const i=e[t];for(const t of i.inheritTypesFrom){const o=e[t];if(o){const e=Object.keys(o).filter((e=>e.startsWith("is")));for(const t of e)t in i||(i[t]=o[t])}}delete i.inheritTypesFrom}function Po(e,t){const i=e[t],o=i.allowIn.filter((t=>e[t]));i.allowIn=Array.from(new Set(o))}function Io(e,t){const i=e[t];for(const o of i.allowIn)e[o].allowChildren.push(t)}function Vo(e,t){const i=e[t];i.allowAttributes=Array.from(new Set(i.allowAttributes))}function Ro(e,t,i){for(const o of e){const e=o[i];"string"==typeof e?t[i].push(e):Array.isArray(e)&&t[i].push(...e)}}function Oo(e,t){const i=e[t];return(o=e,Object.keys(o).map((e=>o[e]))).filter((e=>e.allowIn.includes(i.name)));var o}function Bo(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function Mo(e,t,i){for(const o of t.getAttributeKeys())e.checkAttribute(t,o)||i.removeAttribute(o,t)}class zo extends((0,x.EmitterMixin)()){constructor(e){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,i=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let i;for(const o of new yo(e)){const e={};for(const t of o.getAttributeKeys())e[t]=o.getAttribute(t);const n=t.createElement(o.name,e);i&&t.insert(n,i),i=pi._createAt(n,0)}return i}(i,t),this.conversionApi.writer=t,this.conversionApi.consumable=wo.createFrom(e),this.conversionApi.store={};const{modelRange:o}=this._convertItem(e,this._modelCursor),n=t.createDocumentFragment();if(o){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,n);n.markers=function(e,t){const i=new Set,o=new Map,n=vi._createIn(e).getItems();for(const e of n)e.is("element","$marker")&&i.add(e);for(const e of i){const i=e.getAttribute("data-name"),n=t.createPositionBefore(e);o.has(i)?o.get(i).end=n.clone():o.set(i,new vi(n.clone())),t.remove(e)}return o}(n,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,n}_convertItem(e,t){const i={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,i,this.conversionApi):e.is("$text")?this.fire("text",i,this.conversionApi):this.fire("documentFragment",i,this.conversionApi),i.modelRange&&!(i.modelRange instanceof vi))throw new x.CKEditorError("view-conversion-dispatcher-incorrect-result",this);return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(e,t){let i=t.is("position")?t:pi._createAt(t,0);const o=new vi(i);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,i);e.modelRange instanceof vi&&(o.end=e.modelRange.end,i=e.modelCursor)}return{modelRange:o,modelCursor:i}}_safeInsert(e,t){const i=this._splitToAllowedParent(e,t);return!!i&&(this.conversionApi.writer.insert(e,i.position),!0)}_updateConversionResult(e,t){const i=this._getSplitParts(e),o=this.conversionApi.writer;t.modelRange||(t.modelRange=o.createRange(o.createPositionBefore(e),o.createPositionAfter(i[i.length-1])));const n=this._cursorParents.get(e);t.modelCursor=n?o.createPositionAt(n,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:i,writer:o}=this.conversionApi;let n=i.findAllowedParent(t,e);if(n){if(n===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(n)&&(n=null)}if(!n)return no(t,e,i)?{position:ro(t,o)}:null;const r=this.conversionApi.writer.split(t,n),s=[];for(const e of r.range.getWalker())if("elementEnd"==e.type)s.push(e.item);else{const t=s.pop(),i=e.item;this._registerSplitPair(t,i)}const a=r.range.end.parent;return this._cursorParents.set(e,a),{position:r.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const i=this._splitParts.get(e);this._splitParts.set(t,i),i.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class No{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class Do{constructor(e){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new Nt(e,{renderingMode:"data"}),this.htmlWriter=new No}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`${e}`);const t=this.domParser.parseFromString(e,"text/html"),i=t.createDocumentFragment(),o=t.body.childNodes;for(;o.length>0;)i.appendChild(o[0]);return i}}var Lo=i(8378);class Fo extends((0,x.EmitterMixin)()){constructor(e,t){super(),this.model=e,this.mapper=new yi,this.downcastDispatcher=new Ai({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const o=i.writer,n=i.mapper.toViewPosition(t.range.start),r=o.createText(t.item.data);o.insert(n,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,i)=>{i.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||i.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new zo({schema:e.schema}),this.viewDocument=new Ke(t),this.stylesProcessor=t,this.htmlProcessor=new Do(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new rt(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:i,consumable:o,writer:n})=>{let r=t.modelCursor;if(!o.test(t.viewItem))return;if(!i.checkChild(r,"$text")){if(!no(r,"$text",i))return;if(0==t.viewItem.data.trim().length)return;const e=r.nodeBefore;r=ro(r,n),e&&e.is("element","$marker")&&(n.move(n.createRangeOn(e),r),r=n.createPositionAfter(e))}o.consume(t.viewItem);const s=n.createText(t.viewItem.data);n.insert(s,r),t.modelRange=n.createRange(r,r.getShiftedBy(s.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:o}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=o}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:o}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=o}}),{priority:"lowest"}),(0,x.ObservableMixin)().prototype.decorate.call(this,"init"),(0,x.ObservableMixin)().prototype.decorate.call(this,"set"),(0,x.ObservableMixin)().prototype.decorate.call(this,"get"),(0,x.ObservableMixin)().prototype.decorate.call(this,"toView"),(0,x.ObservableMixin)().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},oo)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:i="empty"}=e;if(!this._checkIfRootsExists([t]))throw new x.CKEditorError("datacontroller-get-non-existent-root",this);const o=this.model.document.getRoot(t);return o.isAttached()||(0,Lo.KE)("datacontroller-get-detached-root",this),"empty"!==i||this.model.hasContent(o,{ignoreWhitespaces:!0})?this.stringify(o,e):""}stringify(e,t={}){const i=this.toView(e,t);return this.processor.toData(i)}toView(e,t={}){const i=this.viewDocument,o=this._viewWriter;this.mapper.clearBindings();const n=vi._createIn(e),r=new nt(i);this.mapper.bindElements(e,r);const s=e.is("documentFragment")?e.markers:function(e){const t=[],i=e.root.document;if(!i)return new Map;const o=vi._createIn(e);for(const e of i.model.markers){const i=e.getRange(),n=i.isCollapsed,r=i.start.isEqual(o.start)||i.end.isEqual(o.end);if(n&&r)t.push([e.name,i]);else{const n=o.getIntersection(i);n&&t.push([e.name,n])}}return t.sort((([e,t],[i,o])=>{if("after"!==t.end.compareWith(o.start))return 1;if("before"!==t.start.compareWith(o.end))return-1;switch(t.start.compareWith(o.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(o.end)){case"before":return 1;case"after":return-1;default:return i.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(n,s,o,t),r}init(e){if(this.model.document.version)throw new x.CKEditorError("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new x.CKEditorError("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const i of Object.keys(t)){const o=this.model.document.getRoot(i);e.insert(this.parse(t[i],o),o,0)}})),Promise.resolve()}set(e,t={}){let i={};if("string"==typeof e?i.main=e:i=e,!this._checkIfRootsExists(Object.keys(i)))throw new x.CKEditorError("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(i)){const o=this.model.document.getRoot(t);e.remove(e.createRangeIn(o)),e.insert(this.parse(i[t],o),o,0)}}))}parse(e,t="$root"){const i=this.processor.toView(e);return this.toModel(i,t)}toModel(e,t="$root"){return this.model.change((i=>this.upcastDispatcher.convert(e,i,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class Ho{constructor(e,t){this._helpers=new Map,this._downcast=(0,x.toArray)(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=(0,x.toArray)(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const i=this._downcast.includes(t);if(!this._upcast.includes(t)&&!i)throw new x.CKEditorError("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:i})}for(e){if(!this._helpers.has(e))throw new x.CKEditorError("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:i}of Wo(e))this.for("upcast").elementToElement({model:t,view:i,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:i}of Wo(e))this.for("upcast").elementToAttribute({view:i,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:i}of Wo(e))this.for("upcast").attributeToAttribute({view:i,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:i}){if(this._helpers.has(e))throw new x.CKEditorError("conversion-group-exists",this);const o=i?new Ui(t):new so(t);this._helpers.set(e,o)}}function*Wo(e){if(e.model.values)for(const t of e.model.values){const i={key:e.model.key,value:t},o=e.view[t],n=e.upcastAlso?e.upcastAlso[t]:void 0;yield*Zo(i,o,n)}else yield*Zo(e.model,e.view,e.upcastAlso)}function*Zo(e,t,i){if(yield{model:e,view:t},i)for(const t of(0,x.toArray)(i))yield{model:e,view:t}}class Uo{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function jo(e,t){const i=Ko(t),o=i.reduce(((e,t)=>e+t.offsetSize),0),n=e.parent;Jo(e);const r=e.index;return n._insertChild(r,i),Go(n,r+i.length),Go(n,r),new vi(e,e.getShiftedBy(o))}function $o(e){if(!e.isFlat)throw new x.CKEditorError("operation-utils-remove-range-not-flat",this);const t=e.start.parent;Jo(e.start),Jo(e.end);const i=t._removeChildren(e.start.index,e.end.index-e.start.index);return Go(t,e.start.index),i}function qo(e,t){if(!e.isFlat)throw new x.CKEditorError("operation-utils-move-range-not-flat",this);const i=$o(e);return jo(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),i)}function Ko(e){const t=[];!function e(i){if("string"==typeof i)t.push(new di(i));else if(i instanceof ui)t.push(new di(i.data,i.getAttributes()));else if(i instanceof li)t.push(i);else if((0,x.isIterable)(i))for(const t of i)e(t)}(e);for(let e=1;ee.maxOffset)throw new x.CKEditorError("move-operation-nodes-do-not-exist",this);if(e===t&&i=i&&this.targetPosition.path[e]e._clone(!0)))),t=new Xo(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new pi(e,[0]);return new Qo(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0)))),jo(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const i=[];for(const t of e.nodes)t.name?i.push(hi.fromJSON(t)):i.push(di.fromJSON(t));const o=new Xo(pi.fromJSON(e.position,t),i,e.baseVersion);return o.shouldReceiveAttributes=e.shouldReceiveAttributes,o}}class en extends Uo{constructor(e,t,i,o,n){super(n),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=i,this.graveyardPosition=o?o.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new pi(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new vi(this.splitPosition,e)}clone(){return new en(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new pi(e,[0]);return new tn(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const o=e.range.getDifference(t.range).map((t=>new rn(t,e.key,e.oldValue,e.newValue,0))),n=e.range.getIntersection(t.range);return n&&i.aIsStrong&&o.push(new rn(n,t.key,t.newValue,e.newValue,0)),0==o.length?[new sn(0)]:o}return[e]})),mn(rn,Xo,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const i=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new rn(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const o=_n(t,e.key,e.oldValue);o&&i.unshift(o)}return i}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),mn(rn,tn,((e,t)=>{const i=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&i.push(vi._createFromPositionAndShift(t.graveyardPosition,1));const o=e.range._getTransformedByMergeOperation(t);return o.isCollapsed||i.push(o),i.map((t=>new rn(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),mn(rn,Qo,((e,t)=>function(e,t){const i=vi._createFromPositionAndShift(t.sourcePosition,t.howMany);let o=null,n=[];i.containsRange(e,!0)?o=e:e.start.hasSameParentAs(i.start)?(n=e.getDifference(i),o=e.getIntersection(i)):n=[e];const r=[];for(let e of n){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const i=t.getMovedRangeStart(),o=e.start.hasSameParentAs(i),n=e._getTransformedByInsertion(i,t.howMany,o);r.push(...n)}return o&&r.push(o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]),r}(e.range,t).map((t=>new rn(t,e.key,e.oldValue,e.newValue,e.baseVersion))))),mn(rn,en,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const i=e.clone();return i.range=new vi(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,i]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),mn(Xo,rn,((e,t)=>{const i=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const o=_n(e,t.key,t.newValue);o&&i.push(o)}return i})),mn(Xo,Xo,((e,t,i)=>(e.position.isEqual(t.position)&&i.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),mn(Xo,Qo,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),mn(Xo,en,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),mn(Xo,tn,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),mn(on,Xo,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),mn(on,on,((e,t,i)=>{if(e.name==t.name){if(!i.aIsStrong)return[new sn(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),mn(on,tn,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),mn(on,Qo,((e,t,i)=>{if(e.oldRange&&(e.oldRange=vi._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(i.abRelation){const o=vi._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=o.end,e.newRange.start.path=i.abRelation.path,[e];if("right"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=o.start,e.newRange.end.path=i.abRelation.path,[e]}e.newRange=vi._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),mn(on,en,((e,t,i)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(i.abRelation){const o=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&i.abRelation.wasStartBeforeMergedElement?e.newRange.start=pi._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!i.abRelation.wasInLeftElement&&(e.newRange.start=pi._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasInRightElement?e.newRange.end=pi._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasEndBeforeMergedElement?e.newRange.end=pi._createAt(t.insertionPosition):e.newRange.end=o.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),mn(tn,Xo,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),mn(tn,tn,((e,t,i)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(i.bWasUndone){const i=t.graveyardPosition.path.slice();return i.push(0),e.sourcePosition=new pi(t.graveyardPosition.root,i),e.howMany=0,[e]}return[new sn(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!i.bWasUndone&&"splitAtSource"!=i.abRelation){const o="$graveyard"==e.targetPosition.root.rootName,n="$graveyard"==t.targetPosition.root.rootName;if(n&&!o||(!o||n)&&i.aIsStrong){const i=t.targetPosition._getTransformedByMergeOperation(t),o=e.targetPosition._getTransformedByMergeOperation(t);return[new Qo(i,e.howMany,o,0)]}return[new sn(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&i.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),mn(tn,Qo,((e,t,i)=>{const o=vi._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!i.bWasUndone&&!i.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.sourcePosition)?[new sn(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),mn(tn,en,((e,t,i)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const o=0!=t.howMany,n=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(o||n||"mergeTargetNotMoved"==i.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==i.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==i.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),mn(Qo,Xo,((e,t)=>{const i=vi._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),mn(Qo,Qo,((e,t,i)=>{const o=vi._createFromPositionAndShift(e.sourcePosition,e.howMany),n=vi._createFromPositionAndShift(t.sourcePosition,t.howMany);let r,s=i.aIsStrong,a=!i.aIsStrong;if("insertBefore"==i.abRelation||"insertAfter"==i.baRelation?a=!0:"insertAfter"!=i.abRelation&&"insertBefore"!=i.baRelation||(a=!1),r=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),vn(e,t)&&vn(t,e))return[t.getReversed()];if(o.containsPosition(t.targetPosition)&&o.containsRange(n,!0))return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),yn([o],r);if(n.containsPosition(e.targetPosition)&&n.containsRange(o,!0))return o.start=o.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.end=o.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),yn([o],r);const l=(0,x.compareArrays)(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),yn([o],r);"remove"!=e.type||"remove"==t.type||i.aWasUndone||i.forceWeakRemove?"remove"==e.type||"remove"!=t.type||i.bWasUndone||i.forceWeakRemove||(s=!1):s=!0;const c=[],d=o.getDifference(n);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const i="same"==(0,x.compareArrays)(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),o=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,i);c.push(...o)}const u=o.getIntersection(n);return null!==u&&s&&(u.start=u.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),u.end=u.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(u):1==c.length?n.start.isBefore(o.start)||n.start.isEqual(o.start)?c.unshift(u):c.push(u):c.splice(1,0,u)),0===c.length?[new sn(e.baseVersion)]:yn(c,r)})),mn(Qo,en,((e,t,i)=>{let o=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=i.abRelation||(o=e.targetPosition._getTransformedBySplitOperation(t));const n=vi._createFromPositionAndShift(e.sourcePosition,e.howMany);if(n.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=o,[e];if(n.start.hasSameParentAs(t.splitPosition)&&n.containsPosition(t.splitPosition)){let e=new vi(t.splitPosition,n.end);return e=e._getTransformedBySplitOperation(t),yn([new vi(n.start,t.splitPosition),e],o)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==i.abRelation&&(o=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==i.abRelation&&(o=e.targetPosition);const r=[n._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const o=n.start.isEqual(t.graveyardPosition)||n.containsPosition(t.graveyardPosition);e.howMany>1&&o&&!i.aWasUndone&&r.push(vi._createFromPositionAndShift(t.insertionPosition,1))}return yn(r,o)})),mn(Qo,tn,((e,t,i)=>{const o=vi._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.sourcePosition))if("remove"!=e.type||i.forceWeakRemove){if(1==e.howMany)return i.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new sn(0)]}else if(!i.aWasUndone){const i=[];let o=t.graveyardPosition.clone(),n=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(i.push(new Qo(e.sourcePosition,e.howMany-1,e.targetPosition,0)),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),n=n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const r=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),s=new Qo(o,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const l=new pi(s.targetPosition.root,a);n=n._getTransformedByMove(o,r,1);const c=new Qo(n,t.howMany,l,0);return i.push(s),i.push(c),i}const n=vi._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=n.start,e.howMany=n.end.offset-n.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),mn(an,Xo,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),mn(an,tn,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),mn(an,Qo,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),mn(an,an,((e,t,i)=>{if(e.position.isEqual(t.position)){if(!i.aIsStrong)return[new sn(0)];e.oldName=t.newName}return[e]})),mn(an,en,((e,t)=>{const i=e.position.path,o=t.splitPosition.getParentPath();if("same"==(0,x.compareArrays)(i,o)&&!t.graveyardPosition){const t=new an(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),mn(ln,ln,((e,t,i)=>{if(e.root===t.root&&e.key===t.key){if(!i.aIsStrong||e.newValue===t.newValue)return[new sn(0)];e.oldValue=t.newValue}return[e]})),mn(cn,cn,((e,t,i)=>e.rootName!==t.rootName||e.isAdd!==t.isAdd||i.bWasUndone?[e]:[new sn(0)])),mn(en,Xo,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!i.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const i=t.graveyardPosition.path.slice();i.push(0);const o=new pi(t.graveyardPosition.root,i),n=en.getInsertionPosition(new pi(t.graveyardPosition.root,i)),r=new en(o,0,n,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=en.getInsertionPosition(e.splitPosition),e.graveyardPosition=r.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[r,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=en.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),mn(en,Qo,((e,t,i)=>{const o=vi._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const n=o.start.isEqual(e.graveyardPosition)||o.containsPosition(e.graveyardPosition);if(!i.bWasUndone&&n){const i=e.splitPosition._getTransformedByMoveOperation(t),o=e.graveyardPosition._getTransformedByMoveOperation(t),n=o.path.slice();n.push(0);const r=new pi(o.root,n);return[new Qo(i,e.howMany,r,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const n=e.splitPosition.isEqual(t.targetPosition);if(n&&("insertAtSource"==i.baRelation||"splitBefore"==i.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=en.getInsertionPosition(e.splitPosition),[e];if(n&&i.abRelation&&i.abRelation.howMany){const{howMany:t,offset:o}=i.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(o),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.splitPosition)){const i=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=i,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new sn(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new sn(0)];if("splitBefore"==i.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const o="$graveyard"==e.splitPosition.root.rootName,n="$graveyard"==t.splitPosition.root.rootName;if(n&&!o||(!o||n)&&i.aIsStrong){const i=[];return t.howMany&&i.push(new Qo(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&i.push(new Qo(e.splitPosition,e.howMany,e.moveTargetPosition,0)),i}return[new sn(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==i.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==i.baRelation){const i=t.insertionPosition.path.slice();i.push(0);const o=new pi(t.insertionPosition.root,i);return[e,new Qo(e.insertionPosition,1,o,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset{const i=t[0];i.isDocumentOperation&&An.call(this,i)}),{priority:"low"})}function An(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}Cn.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class En{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},(0,x.logWarning)("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:i=!0,isUndo:o=!1,isTyping:n=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=i,this.isUndo=o,this.isTyping=n}get type(){return(0,x.logWarning)("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class Tn{constructor(e){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),i=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),i||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=vi._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const i=t.graveyardPosition.parent;this._markInsert(i,t.graveyardPosition.offset,1);const o=t.targetPosition.parent;this._isInInsertedElement(o)||this._markInsert(o,t.targetPosition.offset,e.maxOffset);break}case"detachRoot":case"addRoot":this._bufferRootStateChange(t.rootName,t.isAdd);break;case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,i){const o=this._changedMarkers.get(e);o?(o.newMarkerData=i,null==o.oldMarkerData.range&&null==i.range&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{newMarkerData:i,oldMarkerData:t})}getMarkersToRemove(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.oldMarkerData.range&&e.push({name:t,range:i.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.newMarkerData.range&&e.push({name:t,range:i.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const i=e.range&&!t.range,o=!e.range&&t.range,n=e.range&&t.range&&!e.range.isEqual(t.range);if(i||o||n)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const i=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamee));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(In),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t={...e};return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const i=this._changedRoots.get(e);void 0!==i.state?(delete i.state,void 0===i.attributes&&this._changedRoots.delete(e)):i.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,i,o){const n=this._changedRoots.get(e)||{name:e},r=n.attributes||{};if(r[t]){const e=r[t];o===e.oldValue?delete r[t]:e.newValue=o}else r[t]={oldValue:i,newValue:o};0===Object.entries(r).length?(delete n.attributes,void 0===n.state&&this._changedRoots.delete(e)):(n.attributes=r,this._changedRoots.set(e,n))}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=vi._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_markInsert(e,t,i){const o={type:"insert",offset:t,howMany:i,count:this._changeCount++};this._markChange(e,o)}_markRemove(e,t,i){const o={type:"remove",offset:t,howMany:i,count:this._changeCount++};this._markChange(e,o),this._removeAllNestedChanges(e,t,i)}_markAttribute(e){const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const i=this._getChangesForElement(e);this._handleChange(t,i),i.push(t);for(let e=0;ei.offset){if(o>n){const e={type:"attribute",offset:n,howMany:o-n,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=i.offset&&e.offsetn?(e.nodesToHandle=o-n,e.offset=n):e.nodesToHandle=0);if("remove"==i.type&&e.offseti.offset){const n={type:"attribute",offset:i.offset,howMany:o-i.offset,count:this._changeCount++};this._handleChange(n,t),t.push(n),e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==i.type&&(e.offset>=i.offset&&o<=n?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=i.offset&&o>=n&&(i.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,i){return{type:"insert",position:pi._createAt(e,t),name:i.name,attributes:new Map(i.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,i){return{type:"remove",position:pi._createAt(e,t),name:i.name,attributes:new Map(i.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,i){const o=[];i=new Map(i);for(const[n,r]of t){const t=i.has(n)?i.get(n):null;t!==r&&o.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:n,attributeOldValue:r,attributeNewValue:t,changeCount:this._changeCount++}),i.delete(n)}for(const[t,n]of i)o.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:n,changeCount:this._changeCount++});return o}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const i=this._changesInElement.get(t),o=e.startOffset;if(i)for(const e of i)if("insert"==e.type&&o>=e.offset&&oo){for(let t=0;tthis._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new x.CKEditorError("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const i=this._operations[0];void 0===e&&(e=i.baseVersion);let o=t-1;for(const[t,i]of this._gaps)e>t&&et&&othis.lastOperation.baseVersion)return[];let n=this._baseVersionToOperationIndex.get(e);void 0===n&&(n=0);let r=this._baseVersionToOperationIndex.get(o);return void 0===r&&(r=this._operations.length-1),this._operations.slice(n,r+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class Rn extends hi{constructor(e,t,i="main"){super(t),this._isAttached=!0,this._document=e,this.rootName=i}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}Rn.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};const On="$graveyard";class Bn extends((0,x.EmitterMixin)()){constructor(e){super(),this.model=e,this.history=new Vn,this.selection=new Li(this),this.roots=new x.Collection({idProperty:"rootName"}),this.differ=new Tn(e.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",On),this.listenTo(e,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&this.differ.bufferOperation(i)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&this.history.addOperation(i)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,i,o,n)=>{const r={...t.getData(),range:o};this.differ.bufferMarkerChange(t.name,n,r),null===i&&t.on("change",((e,i)=>{const o=t.getData();this.differ.bufferMarkerChange(t.name,{...o,range:i},o)}))})),this.registerPostFixer((e=>{let t=!1;for(const i of this.roots)i.isAttached()||i.isEmpty||(e.remove(e.createRangeIn(i)),t=!0);for(const i of this.model.markers)i.getRange().root.isAttached()||(e.removeMarker(i),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(On)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new x.CKEditorError("model-document-createroot-name-exists",this,{name:t});const i=new Rn(this,e,t);return this.roots.add(i),i}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return Array.from(this.roots).filter((t=>t.rootName!=On&&(e||t.isAttached()))).map((e=>e.rootName))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=T(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,i=t.schema,o=t.createPositionFromPath(e,[0]);return i.getNearestSelectionRange(o)||t.createRange(o)}_validateSelectionRange(e){return Mn(e.start)&&Mn(e.end)}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(this.selection.refresh(),t=i(e),t)break}while(t)}}function Mn(e){const t=e.textNode;if(t){const i=t.data,o=e.offset-t.startOffset;return!(0,x.isInsideSurrogatePair)(i,o)&&!(0,x.isInsideCombinedSymbol)(i,o)}return!0}class zn extends((0,x.EmitterMixin)()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof Nn?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,i=!1,o=!1){const n=e instanceof Nn?e.name:e;if(n.includes(","))throw new x.CKEditorError("markercollection-incorrect-marker-name",this);const r=this._markers.get(n);if(r){const e=r.getData(),s=r.getRange();let a=!1;return s.isEqual(t)||(r._attachLiveRange(Mi.fromRange(t)),a=!0),i!=r.managedUsingOperations&&(r._managedUsingOperations=i,a=!0),"boolean"==typeof o&&o!=r.affectsData&&(r._affectsData=o,a=!0),a&&this.fire(`update:${n}`,r,s,t,e),r}const s=Mi.fromRange(t),a=new Nn(n,s,i,o);return this._markers.set(n,a),this.fire(`update:${n}`,a,null,t,{...a.getData(),range:null}),a}_remove(e){const t=e instanceof Nn?e.name:e,i=this._markers.get(t);return!!i&&(this._markers.delete(t),this.fire(`update:${t}`,i,i.getRange(),null,i.getData()),this._destroyMarker(i),!0)}_refresh(e){const t=e instanceof Nn?e.name:e,i=this._markers.get(t);if(!i)throw new x.CKEditorError("markercollection-refresh-marker-not-exists",this);const o=i.getRange();this.fire(`update:${t}`,i,o,o,i.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class Nn extends((0,x.EmitterMixin)(ai)){constructor(e,t,i,o){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=i,this._affectsData=o}get managedUsingOperations(){if(!this._liveRange)throw new x.CKEditorError("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new x.CKEditorError("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new x.CKEditorError("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new x.CKEditorError("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new x.CKEditorError("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Nn.prototype.is=function(e){return"marker"===e||"model:marker"===e};class Dn extends Uo{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new x.CKEditorError("detach-operation-on-document-node",this)}_execute(){$o(vi._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Ln extends ai{constructor(e){super(),this.markers=new Map,this._children=new ci,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const i of e)i.name?t.push(hi.fromJSON(i)):t.push(di.fromJSON(i));return new Ln(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){return"string"==typeof e?[new di(e)]:((0,x.isIterable)(e)||(e=[e]),Array.from(e).map((e=>"string"==typeof e?new di(e):e instanceof ui?new di(e.data,e.getAttributes()):e)))}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}}Ln.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class Fn{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new di(e,t)}createElement(e,t){return new hi(e,t)}createDocumentFragment(){return new Ln}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,i=0){if(this._assertWriterUsedCorrectly(),e instanceof di&&""==e.data)return;const o=pi._createAt(t,i);if(e.parent){if(jn(e.root,o.root))return void this.move(vi._createOn(e),o);if(e.root.document)throw new x.CKEditorError("model-writer-insert-forbidden-move",this);this.remove(e)}const n=o.root.document?o.root.document.version:null,r=new Xo(o,e,n);if(e instanceof di&&(r.shouldReceiveAttributes=!0),this.batch.addOperation(r),this.model.applyOperation(r),e instanceof Ln)for(const[t,i]of e.markers){const e=pi._createAt(i.root,0),n={range:new vi(i.start._getCombined(e,o),i.end._getCombined(e,o)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,n):this.addMarker(t,n)}}insertText(e,t,i,o){t instanceof Ln||t instanceof hi||t instanceof pi?this.insert(this.createText(e),t,i):this.insert(this.createText(e,t),i,o)}insertElement(e,t,i,o){t instanceof Ln||t instanceof hi||t instanceof pi?this.insert(this.createElement(e),t,i):this.insert(this.createElement(e,t),i,o)}append(e,t){this.insert(e,t,"end")}appendText(e,t,i){t instanceof Ln||t instanceof hi?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),i,"end")}appendElement(e,t,i){t instanceof Ln||t instanceof hi?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),i,"end")}setAttribute(e,t,i){if(this._assertWriterUsedCorrectly(),i instanceof vi){const o=i.getMinimalFlatRanges();for(const i of o)Hn(this,e,t,i)}else Wn(this,e,t,i)}setAttributes(e,t){for(const[i,o]of(0,x.toMap)(e))this.setAttribute(i,o,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof vi){const i=t.getMinimalFlatRanges();for(const t of i)Hn(this,e,null,t)}else Wn(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof vi)for(const i of e.getItems())t(i);else t(e)}move(e,t,i){if(this._assertWriterUsedCorrectly(),!(e instanceof vi))throw new x.CKEditorError("writer-move-invalid-range",this);if(!e.isFlat)throw new x.CKEditorError("writer-move-range-not-flat",this);const o=pi._createAt(t,i);if(o.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!jn(e.root,o.root))throw new x.CKEditorError("writer-move-different-document",this);const n=e.root.document?e.root.document.version:null,r=new Qo(e.start,e.end.offset-e.start.offset,o,n);this.batch.addOperation(r),this.model.applyOperation(r)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof vi?e:vi._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),Un(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,i=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof hi))throw new x.CKEditorError("writer-merge-no-element-before",this);if(!(i instanceof hi))throw new x.CKEditorError("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,i){return this.model.createPositionFromPath(e,t,i)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,i=e.nodeAfter;this.move(vi._createIn(i),pi._createAt(t,"end")),this.remove(i)}_merge(e){const t=pi._createAt(e.nodeBefore,"end"),i=pi._createAt(e.nodeAfter,0),o=e.root.document.graveyard,n=new pi(o,[0]),r=e.root.document.version,s=new tn(i,e.nodeAfter.maxOffset,t,n,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof hi))throw new x.CKEditorError("writer-rename-not-element-instance",this);const i=e.root.document?e.root.document.version:null,o=new an(pi._createBefore(e),e.name,t,i);this.batch.addOperation(o),this.model.applyOperation(o)}split(e,t){this._assertWriterUsedCorrectly();let i,o,n=e.parent;if(!n.parent)throw new x.CKEditorError("writer-split-element-no-parent",this);if(t||(t=n.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new x.CKEditorError("writer-split-invalid-limit-element",this);do{const t=n.root.document?n.root.document.version:null,r=n.maxOffset-e.offset,s=en.getInsertionPosition(e),a=new en(e,r,s,null,t);this.batch.addOperation(a),this.model.applyOperation(a),i||o||(i=n,o=e.parent.nextSibling),n=(e=this.createPositionAfter(e.parent)).parent}while(n!==t);return{position:e,range:new vi(pi._createAt(i,"end"),pi._createAt(o,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new x.CKEditorError("writer-wrap-range-not-flat",this);const i=t instanceof hi?t:new hi(t);if(i.childCount>0)throw new x.CKEditorError("writer-wrap-element-not-empty",this);if(null!==i.parent)throw new x.CKEditorError("writer-wrap-element-attached",this);this.insert(i,e.start);const o=new vi(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(o,pi._createAt(i,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new x.CKEditorError("writer-unwrap-element-no-parent",this);this.move(vi._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new x.CKEditorError("writer-addmarker-no-usingoperation",this);const i=t.usingOperation,o=t.range,n=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new x.CKEditorError("writer-addmarker-marker-exists",this);if(!o)throw new x.CKEditorError("writer-addmarker-no-range",this);return i?(Zn(this,e,null,o,n),this.model.markers.get(e)):this.model.markers._set(e,o,i,n)}updateMarker(e,t){this._assertWriterUsedCorrectly();const i="string"==typeof e?e:e.name,o=this.model.markers.get(i);if(!o)throw new x.CKEditorError("writer-updatemarker-marker-not-exists",this);if(!t)return(0,x.logWarning)("writer-updatemarker-reconvert-using-editingcontroller",{markerName:i}),void this.model.markers._refresh(o);const n="boolean"==typeof t.usingOperation,r="boolean"==typeof t.affectsData,s=r?t.affectsData:o.affectsData;if(!n&&!t.range&&!r)throw new x.CKEditorError("writer-updatemarker-wrong-options",this);const a=o.getRange(),l=t.range?t.range:a;n&&t.usingOperation!==o.managedUsingOperations?t.usingOperation?Zn(this,i,null,l,s):(Zn(this,i,a,null,s),this.model.markers._set(i,l,void 0,s)):o.managedUsingOperations?Zn(this,i,a,l,s):this.model.markers._set(i,l,void 0,s)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new x.CKEditorError("writer-removemarker-no-marker",this);const i=this.model.markers.get(t);i.managedUsingOperations?Zn(this,t,i.getRange(),null,i.affectsData):this.model.markers._remove(t)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const i=this.model.document.getRoot(e);if(i&&i.isAttached())throw new x.CKEditorError("writer-addroot-root-exists",this);const o=this.model.document,n=new cn(e,t,!0,o,o.version);return this.batch.addOperation(n),this.model.applyOperation(n),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new x.CKEditorError("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const i=this.model.document,o=new cn(t.rootName,t.name,!1,i,i.version);this.batch.addOperation(o),this.model.applyOperation(o)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,i]of(0,x.toMap)(e))this._setSelectionAttribute(t,i)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const o=Li._getStoreAttributeKey(e);this.setAttribute(o,t,i.anchor.parent)}i._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const i=Li._getStoreAttributeKey(e);this.removeAttribute(i,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new x.CKEditorError("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const i of this.model.markers){if(!i.managedUsingOperations)continue;const o=i.getRange();let n=!1;if("move"===e){const e=t;n=e.containsPosition(o.start)||e.start.isEqual(o.start)||e.containsPosition(o.end)||e.end.isEqual(o.end)}else{const e=t,i=e.nodeBefore,r=e.nodeAfter,s=o.start.parent==i&&o.start.isAtEnd,a=o.end.parent==r&&0==o.end.offset,l=o.end.nodeAfter==r,c=o.start.nodeAfter==r;n=s||a||l||c}n&&this.updateMarker(i.name,{range:o})}}}function Hn(e,t,i,o){const n=e.model,r=n.document;let s,a,l,c=o.start;for(const e of o.getWalker({shallow:!0}))l=e.item.getAttribute(t),s&&a!=l&&(a!=i&&d(),c=s),s=e.nextPosition,a=l;function d(){const o=new vi(c,s),l=o.root.document?r.version:null,d=new rn(o,t,a,i,l);e.batch.addOperation(d),n.applyOperation(d)}s instanceof pi&&s!=c&&a!=i&&d()}function Wn(e,t,i,o){const n=e.model,r=n.document,s=o.getAttribute(t);let a,l;if(s!=i){if(o.root===o){const e=o.document?r.version:null;l=new ln(o,t,s,i,e)}else{a=new vi(pi._createBefore(o),e.createPositionAfter(o));const n=a.root.document?r.version:null;l=new rn(a,t,s,i,n)}e.batch.addOperation(l),n.applyOperation(l)}}function Zn(e,t,i,o,n){const r=e.model,s=r.document,a=new on(t,i,o,r.markers,!!n,s.version);e.batch.addOperation(a),r.applyOperation(a)}function Un(e,t,i,o){let n;if(e.root.document){const i=o.document,r=new pi(i.graveyard,[0]);n=new Qo(e,t,r,i.version)}else n=new Dn(e,t);i.addOperation(n),o.applyOperation(n)}function jn(e,t){return e===t||e instanceof Rn&&t instanceof Rn}function $n(e,t,i={}){if(t.isCollapsed)return;const o=t.getFirstRange();if("$graveyard"==o.root.rootName)return;const n=e.schema;e.change((e=>{if(!i.doNotResetEntireContent&&function(e,t){const i=e.getLimitElement(t);if(!t.containsEntireContent(i))return!1;const o=t.getFirstRange();return o.start.parent!=o.end.parent&&e.checkChild(i,"paragraph")}(n,t))return void function(e,t){const i=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(i)),Jn(e,e.createPositionAt(i,0),t)}(e,t);const r={};if(!i.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(r,n.getAttributesWithProperty(e,"copyOnReplace",!0))}const[s,a]=function(e){const t=e.root.document.model,i=e.start;let o=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const i=function(e){const t=e.parent,i=t.root.document.model.schema,o=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of o){if(i.isLimit(e))return null;if(i.isBlock(e))return e}}(o);if(i&&o.isTouching(t.createPositionAt(i,0))){const i=t.createSelection(e);t.modifySelection(i,{direction:"backward"});const n=i.getLastPosition(),r=t.createRange(n,o);t.hasContent(r,{ignoreMarkers:!0})||(o=n)}}return[Cn.fromPosition(i,"toPrevious"),Cn.fromPosition(o,"toNext")]}(o);s.isTouching(a)||e.remove(e.createRange(s,a)),i.leaveUnmerged||(function(e,t,i){const o=e.model;if(!Gn(e.model.schema,t,i))return;const[n,r]=function(e,t){const i=e.getAncestors(),o=t.getAncestors();let n=0;for(;i[n]&&i[n]==o[n];)n++;return[i[n],o[n]]}(t,i);n&&r&&(!o.hasContent(n,{ignoreMarkers:!0})&&o.hasContent(r,{ignoreMarkers:!0})?Kn(e,t,i,n.parent):qn(e,t,i,n.parent))}(e,s,a),n.removeDisallowedAttributes(s.parent.getChildren(),e)),Yn(e,t,s),!i.doNotAutoparagraph&&function(e,t){const i=e.checkChild(t,"$text"),o=e.checkChild(t,"paragraph");return!i&&o}(n,s)&&Jn(e,s,t,r),s.detach(),a.detach()}))}function qn(e,t,i,o){const n=t.parent,r=i.parent;if(n!=o&&r!=o){for(t=e.createPositionAfter(n),(i=e.createPositionBefore(r)).isEqual(t)||e.insert(r,t),e.merge(t);i.parent.isEmpty;){const t=i.parent;i=e.createPositionBefore(t),e.remove(t)}Gn(e.model.schema,t,i)&&qn(e,t,i,o)}}function Kn(e,t,i,o){const n=t.parent,r=i.parent;if(n!=o&&r!=o){for(t=e.createPositionAfter(n),(i=e.createPositionBefore(r)).isEqual(t)||e.insert(n,i);t.parent.isEmpty;){const i=t.parent;t=e.createPositionBefore(i),e.remove(i)}i=e.createPositionBefore(r),function(e,t){const i=t.nodeBefore,o=t.nodeAfter;i.name!=o.name&&e.rename(i,o.name),e.clearAttributes(i),e.setAttributes(Object.fromEntries(o.getAttributes()),i),e.merge(t)}(e,i),Gn(e.model.schema,t,i)&&Kn(e,t,i,o)}}function Gn(e,t,i){const o=t.parent,n=i.parent;return o!=n&&!e.isLimit(o)&&!e.isLimit(n)&&function(e,t,i){const o=new vi(e,t);for(const e of o.getWalker())if(i.isLimit(e.item))return!1;return!0}(t,i,e)}function Jn(e,t,i,o={}){const n=e.createElement("paragraph");e.model.schema.setAllowedAttributes(n,o,e),e.insert(n,t),Yn(e,i,e.createPositionAt(n,0))}function Yn(e,t,i){t instanceof Li?e.setSelection(i):t.setTo(i)}function Qn(e,t){const i=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{i.push(e.start.parent),t.remove(e)})),i.forEach((e=>{let i=e;for(;i.parent&&i.isEmpty;){const e=t.createRangeOn(i);i=i.parent,t.remove(e)}}))}class Xn{constructor(e,t,i){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=e,this.writer=t,this.position=i,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),i=this.writer.createPositionAfter(e);if(i.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new x.CKEditorError("insertcontent-invalid-insertion-position",this);this.position=i,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?vi._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new vi(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=Cn.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new x.CKEditorError("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=Cn.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Cn.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof hi))return;if(!this._canMergeLeft(e))return;const t=Cn._createBefore(e);t.stickiness="toNext";const i=Cn.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=Cn._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=Cn._createAt(t.nodeBefore,"end","toNext")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof hi))return;if(!this._canMergeRight(e))return;const t=Cn._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new x.CKEditorError("insertcontent-invalid-insertion-position",this);this.position=pi._createAt(t.nodeBefore,"end");const i=Cn.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=Cn._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=Cn._createAt(t.nodeBefore,0,"toPrevious")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof hi&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof hi&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function er(e,t,i="auto"){const o=e.getSelectedElement();if(o&&t.schema.isObject(o)&&!t.schema.isInline(o))return"before"==i||"after"==i?t.createRange(t.createPositionAt(o,i)):t.createRangeOn(o);const n=(0,x.first)(e.getSelectedBlocks());if(!n)return t.createRange(e.focus);if(n.isEmpty)return t.createRange(t.createPositionAt(n,0));const r=t.createPositionAfter(n);return e.focus.isTouching(r)?t.createRange(r):t.createRange(t.createPositionBefore(n))}const tr=' ,.?!:;"-()';function ir(e,t){const{isForward:i,walker:o,unit:n,schema:r,treatEmojiAsSingleUnit:s}=e,{type:a,item:l,nextPosition:c}=t;if("text"==a)return"word"===e.unit?function(e,t){let i=e.position.textNode;for(i||(i=t?e.position.nodeAfter:e.position.nodeBefore);i&&i.is("$text");){const o=e.position.offset-i.startOffset;if(rr(i,o,t))i=t?e.position.nodeAfter:e.position.nodeBefore;else{if(nr(i.data,o,t))break;e.next()}}return e.position}(o,i):function(e,t,i){const o=e.position.textNode;if(o){const n=o.data;let r=e.position.offset-o.startOffset;for(;(0,x.isInsideSurrogatePair)(n,r)||"character"==t&&(0,x.isInsideCombinedSymbol)(n,r)||i&&(0,x.isInsideEmojiSequence)(n,r);)e.next(),r=e.position.offset-o.startOffset}return e.position}(o,n,s);if(a==(i?"elementStart":"elementEnd")){if(r.isSelectable(l))return pi._createAt(l,i?"after":"before");if(r.checkChild(c,"$text"))return c}else{if(r.isLimit(l))return void o.skip((()=>!0));if(r.checkChild(c,"$text"))return c}}function or(e,t){const i=e.root,o=pi._createAt(i,t?"end":0);return t?new vi(e,o):new vi(o,e)}function nr(e,t,i){const o=t+(i?0:-1);return tr.includes(e.charAt(o))}function rr(e,t,i){return t===(i?e.offsetSize:0)}class sr extends((0,x.ObservableMixin)()){constructor(){var e;super(),this.markers=new zn,this.document=new Bn(this),this.schema=new vo,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),(e=this).document.registerPostFixer((t=>function(e,t){const i=t.document.selection,o=t.schema,n=[];let r=!1;for(const e of i.getRanges()){const t=go(e,o);t&&!t.isEqual(e)?(n.push(t),r=!0):n.push(e)}return r&&e.setSelection(function(e){const t=[...e],i=new Set;let o=1;for(;o!i.has(t)))}(n),{backward:i.isBackward}),!1}(t,e))),this.document.registerPostFixer(oo),this.on("insertContent",((e,[t,i])=>{e.return=function(e,t,i){return e.change((o=>{const n=i||e.document.selection;n.isCollapsed||e.deleteContent(n,{doNotAutoparagraph:!0});const r=new Xn(e,o,n.anchor),s=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[i,o]of t.markers){const{start:t,end:n}=o,r=t.isEqual(n);e.push({position:t,name:i,isCollapsed:r},{position:n,name:i,isCollapsed:r})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:i,name:n,isCollapsed:r}of e){let e=null,a=null;const l=i.parent===t&&i.isAtStart,c=i.parent===t&&i.isAtEnd;l||c?r&&(a=l?"start":"end"):(e=o.createElement("$marker"),o.insert(e,i)),s.push({name:n,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];r.handleNodes(a);let l=r.getSelectionRange();if(t.is("documentFragment")&&s.length){const e=l?Mi.fromRange(l):null,t={};for(let e=s.length-1;e>=0;e--){const{name:i,element:n,collapsed:a}=s[e],l=!t[i];if(l&&(t[i]=[]),n){const e=o.createPositionAt(n,"before");t[i].push(e),o.remove(n)}else{const e=r.getAffectedRange();if(!e){a&&t[i].push(r.position);continue}a?t[i].push(e[a]):t[i].push(l?e.start:e.end)}}for(const[e,[i,n]]of Object.entries(t))i&&n&&i.root===n.root&&o.addMarker(e,{usingOperation:!0,affectsData:!0,range:new vi(i,n)});e&&(l=e.toRange(),e.detach())}l&&(n instanceof Li?o.setSelection(l):n.setTo(l));const c=r.getAffectedRange()||e.createRange(n.anchor);return r.destroy(),c}))}(this,t,i)})),this.on("insertObject",((e,[t,i,o])=>{e.return=function(e,t,i,o={}){if(!e.schema.isObject(t))throw new x.CKEditorError("insertobject-element-not-an-object",e,{object:t});const n=i||e.document.selection;let r=n;o.findOptimalPosition&&e.schema.isBlock(t)&&(r=e.createSelection(er(n,e,o.findOptimalPosition)));const s=(0,x.first)(n.getSelectedBlocks()),a={};return s&&Object.assign(a,e.schema.getAttributesWithProperty(s,"copyOnReplace",!0)),e.change((i=>{r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0});let n=t;const s=r.anchor.parent;!e.schema.checkChild(s,t)&&e.schema.checkChild(s,"paragraph")&&e.schema.checkChild("paragraph",t)&&(n=i.createElement("paragraph"),i.insert(t,n)),e.schema.setAllowedAttributes(n,a,i);const l=e.insertContent(n,r);return l.isCollapsed||o.setSelection&&function(e,t,i,o){const n=e.model;if("on"==i)return void e.setSelection(t,"on");if("after"!=i)throw new x.CKEditorError("insertobject-invalid-place-parameter-value",n);let r=t.nextSibling;n.schema.isInline(t)?e.setSelection(t,"after"):(!(r&&n.schema.checkChild(r,"$text"))&&n.schema.checkChild(t.parent,"paragraph")&&(r=e.createElement("paragraph"),n.schema.setAllowedAttributes(r,o,e),n.insertContent(r,e.createPositionAfter(t))),r&&e.setSelection(r,0))}(i,t,o.setSelection,a),l}))}(this,t,i,o)}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new En,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){x.CKEditorError.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new En):e instanceof En||(e=new En(e)):e=new En,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){x.CKEditorError.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,i,...o){const n=ar(t,i);return this.fire("insertContent",[e,n,i,...o])}insertObject(e,t,i,o,...n){const r=ar(t,i);return this.fire("insertObject",[e,r,o,o,...n])}deleteContent(e,t){$n(this,e,t)}modifySelection(e,t){!function(e,t,i={}){const o=e.schema,n="backward"!=i.direction,r=i.unit?i.unit:"character",s=!!i.treatEmojiAsSingleUnit,a=t.focus,l=new mi({boundaries:or(a,n),singleCharacters:!0,direction:n?"forward":"backward"}),c={walker:l,schema:o,isForward:n,unit:r,treatEmojiAsSingleUnit:s};let d;for(;d=l.next();){if(d.done)return;const i=ir(c,d.value);if(i)return void(t instanceof Li?e.change((e=>{e.setSelectionFocus(i)})):t.setFocus(i))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const i=e.createDocumentFragment(),o=t.getFirstRange();if(!o||o.isCollapsed)return i;const n=o.start.root,r=o.start.getCommonPath(o.end),s=n.getNodeByPath(r);let a;a=o.start.parent==o.end.parent?o:e.createRange(e.createPositionAt(s,o.start.path[r.length]),e.createPositionAt(s,o.end.path[r.length]+1));const l=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),i):e.append(e.cloneElement(t,!0),i);if(a!=o){const t=o._getTransformedByMove(a.start,e.createPositionAt(i,0),l)[0],n=e.createRange(e.createPositionAt(i,0),t.start);Qn(e.createRange(t.end,e.createPositionAt(i,"end")),e),Qn(n,e)}return i}))}(this,e)}hasContent(e,t={}){const i=e instanceof vi?e:vi._createIn(e);if(i.isCollapsed)return!1;const{ignoreWhitespaces:o=!1,ignoreMarkers:n=!1}=t;if(!n)for(const e of this.markers.getMarkersIntersectingRange(i))if(e.affectsData)return!0;for(const e of i.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!o)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}createPositionFromPath(e,t,i){return new pi(e,t,i)}createPositionAt(e,t){return pi._createAt(e,t)}createPositionAfter(e){return pi._createAfter(e)}createPositionBefore(e){return pi._createBefore(e)}createRange(e,t){return new vi(e,t)}createRangeIn(e){return vi._createIn(e)}createRangeOn(e){return vi._createOn(e)}createSelection(...e){return new Si(...e)}createBatch(e){return new En(e)}createOperationFromJSON(e){return un.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new Fn(this,t);const i=this._pendingChanges[0].callback(this._currentWriter);e.push(i),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function ar(e,t){if(e)return e instanceof Si||e instanceof Li?e:e instanceof li?new Si(e,t):new Si(e)}class lr extends Ut{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}class cr extends Ut{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}class dr{constructor(e){this.document=e}createDocumentFragment(e){return new nt(this.document,e)}createElement(e,t,i){return new Se(this.document,e,t,i)}createText(e){return new P(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,i){return i._insertChild(e,t)}removeChildren(e,t,i){return i._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const i=e.parent;if(i){const o=i.getChildIndex(e);return this.removeChildren(o,1,i),this.insertChild(o,t,i),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const i=t.getChildIndex(e);this.remove(e),this.insertChild(i,e.getChildren(),t)}}rename(e,t){const i=new Se(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,i)?i:null}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){(0,V.Z)(e)&&void 0===i?t._setStyle(e):i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return ze._createAt(e,t)}createPositionAfter(e){return ze._createAfter(e)}createPositionBefore(e){return ze._createBefore(e)}createRange(e,t){return new Ne(e,t)}createRangeOn(e){return Ne._createOn(e)}createRangeIn(e){return Ne._createIn(e)}createSelection(...e){return new Le(...e)}}const ur=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,hr=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,mr=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,gr=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,pr=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,fr=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function br(e){return e.startsWith("#")?ur.test(e):e.startsWith("rgb")?hr.test(e)||mr.test(e):e.startsWith("hsl")?gr.test(e)||pr.test(e):fr.has(e.toLowerCase())}const wr=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function kr(e){return wr.includes(e)}const _r=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function vr(e){return _r.test(e)}const yr=/^[+-]?[0-9]*([.][0-9]+)?%$/;function Cr(e){return yr.test(e)}const xr=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function Ar(e){return xr.includes(e)}const Er=["center","top","bottom","left","right"];function Tr(e){return Er.includes(e)}const Sr=["fixed","scroll","local"];function Pr(e){return Sr.includes(e)}const Ir=/^url\(/;function Vr(e){return Ir.test(e)}function Rr(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=zr(e),i=t[0],o=t[2]||i,n=t[1]||i;return{top:i,bottom:o,right:n,left:t[3]||n}}function Or(e){return t=>{const{top:i,right:o,bottom:n,left:r}=t,s=[];return[i,o,r,n].every((e=>!!e))?s.push([e,Br(t)]):(i&&s.push([e+"-top",i]),o&&s.push([e+"-right",o]),n&&s.push([e+"-bottom",n]),r&&s.push([e+"-left",r])),s}}function Br({top:e,right:t,bottom:i,left:o}){const n=[];return o!==t?n.push(e,t,i,o):i!==e?n.push(e,t,i):t!==e?n.push(e,t):n.push(e),n.join(" ")}function Mr(e){return t=>({path:e,value:Rr(t)})}function zr(e){return e.replace(/, /g,",").split(" ").map((e=>e.replace(/,/g,", ")))}function Nr(e){e.setNormalizer("background",(e=>{const t={},i=zr(e);for(const e of i)Ar(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):Tr(e)?(t.position=t.position||[],t.position.push(e)):Pr(e)?t.attachment=e:br(e)?t.color=e:Vr(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function Dr(e){e.setNormalizer("border",(e=>{const{color:t,style:i,width:o}=jr(e);return{path:"border",value:{color:Rr(t),style:Rr(i),width:Rr(o)}}})),e.setNormalizer("border-top",Lr("top")),e.setNormalizer("border-right",Lr("right")),e.setNormalizer("border-bottom",Lr("bottom")),e.setNormalizer("border-left",Lr("left")),e.setNormalizer("border-color",Fr("color")),e.setNormalizer("border-width",Fr("width")),e.setNormalizer("border-style",Fr("style")),e.setNormalizer("border-top-color",Wr("color","top")),e.setNormalizer("border-top-style",Wr("style","top")),e.setNormalizer("border-top-width",Wr("width","top")),e.setNormalizer("border-right-color",Wr("color","right")),e.setNormalizer("border-right-style",Wr("style","right")),e.setNormalizer("border-right-width",Wr("width","right")),e.setNormalizer("border-bottom-color",Wr("color","bottom")),e.setNormalizer("border-bottom-style",Wr("style","bottom")),e.setNormalizer("border-bottom-width",Wr("width","bottom")),e.setNormalizer("border-left-color",Wr("color","left")),e.setNormalizer("border-left-style",Wr("style","left")),e.setNormalizer("border-left-width",Wr("width","left")),e.setExtractor("border-top",Zr("top")),e.setExtractor("border-right",Zr("right")),e.setExtractor("border-bottom",Zr("bottom")),e.setExtractor("border-left",Zr("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",Or("border-color")),e.setReducer("border-style",Or("border-style")),e.setReducer("border-width",Or("border-width")),e.setReducer("border-top",$r("top")),e.setReducer("border-right",$r("right")),e.setReducer("border-bottom",$r("bottom")),e.setReducer("border-left",$r("left")),e.setReducer("border",function(){return t=>{const i=Ur(t,"top"),o=Ur(t,"right"),n=Ur(t,"bottom"),r=Ur(t,"left"),s=[i,o,n,r],a={width:e(s,"width"),style:e(s,"style"),color:e(s,"color")},l=qr(a,"all");if(l.length)return l;const c=Object.entries(a).reduce(((e,[t,i])=>(i&&(e.push([`border-${t}`,i]),s.forEach((e=>delete e[t]))),e)),[]);return[...c,...qr(i,"top"),...qr(o,"right"),...qr(n,"bottom"),...qr(r,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function Lr(e){return t=>{const{color:i,style:o,width:n}=jr(t),r={};return void 0!==i&&(r.color={[e]:i}),void 0!==o&&(r.style={[e]:o}),void 0!==n&&(r.width={[e]:n}),{path:"border",value:r}}}function Fr(e){return t=>({path:"border",value:Hr(t,e)})}function Hr(e,t){return{[t]:Rr(e)}}function Wr(e,t){return i=>({path:"border",value:{[e]:{[t]:i}}})}function Zr(e){return(t,i)=>{if(i.border)return Ur(i.border,e)}}function Ur(e,t){const i={};return e.width&&e.width[t]&&(i.width=e.width[t]),e.style&&e.style[t]&&(i.style=e.style[t]),e.color&&e.color[t]&&(i.color=e.color[t]),i}function jr(e){const t={},i=zr(e);for(const e of i)vr(e)||/thin|medium|thick/.test(e)?t.width=e:kr(e)?t.style=e:t.color=e;return t}function $r(e){return t=>qr(t,e)}function qr(e,t){const i=[];if(e&&e.width&&i.push("width"),e&&e.style&&i.push("style"),e&&e.color&&i.push("color"),3==i.length){const o=i.map((t=>e[t])).join(" ");return["all"==t?["border",o]:[`border-${t}`,o]]}return"all"==t?[]:i.map((i=>[`border-${t}-${i}`,e[i]]))}function Kr(e){e.setNormalizer("margin",Mr("margin")),e.setNormalizer("margin-top",(e=>({path:"margin.top",value:e}))),e.setNormalizer("margin-right",(e=>({path:"margin.right",value:e}))),e.setNormalizer("margin-bottom",(e=>({path:"margin.bottom",value:e}))),e.setNormalizer("margin-left",(e=>({path:"margin.left",value:e}))),e.setReducer("margin",Or("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function Gr(e){e.setNormalizer("padding",Mr("padding")),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",Or("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}},5725:(e,t,i)=>{"use strict";i.d(t,{C:()=>u,G:()=>p});var o=i(7578);function*n(e,t){for(const i of t)i&&e.getAttributeProperties(i[0]).copyOnEnter&&(yield i)}class r extends o.Command{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,i=t.document.selection,o=t.schema,r=i.isCollapsed,a=i.getFirstRange(),l=a.start.parent,c=a.end.parent;if(o.isLimit(l)||o.isLimit(c))return r||l!=c||t.deleteContent(i),!1;if(r){const t=n(e.model.schema,i.getAttributes());return s(e,a.start),e.setSelectionAttribute(t),!0}{const o=!(a.start.isAtStart&&a.end.isAtEnd),n=l==c;if(t.deleteContent(i,{leaveUnmerged:o}),o){if(n)return s(e,i.focus),!0;e.setSelection(c,0)}}return!1}}function s(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}var a=i(600),l=i(7732);const c={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class d extends a.Observer{constructor(e){super(e);const t=this.document;let i=!1;t.on("keydown",((e,t)=>{i=t.shiftKey})),t.on("beforeinput",((o,n)=>{if(!this.isEnabled)return;let r=n.inputType;l.env.isSafari&&i&&"insertParagraph"==r&&(r="insertLineBreak");const s=n.domEvent,d=c[r];if(!d)return;const u=new a.BubblingEventInfo(t,"enter",n.targetRanges[0]);t.fire(u,new a.DomEventData(e,s,{isSoft:d.isSoft})),u.stop.called&&o.stop()}))}observe(){}stopObserving(){}}class u extends o.Plugin{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,i=t.document;t.addObserver(d),e.commands.add("enter",new r(e)),this.listenTo(i,"enter",((o,n)=>{i.isComposing||n.preventDefault(),n.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"})}}class h extends o.Command{execute(){const e=this.editor.model,t=e.document;e.change((i=>{!function(e,t,i){const o=i.isCollapsed,r=i.getFirstRange(),s=r.start.parent,a=r.end.parent,l=s==a;if(o){const o=n(e.schema,i.getAttributes());m(e,t,r.end),t.removeSelectionAttribute(i.getAttributeKeys()),t.setSelectionAttribute(o)}else{const o=!(r.start.isAtStart&&r.end.isAtEnd);e.deleteContent(i,{leaveUnmerged:o}),l?m(e,t,i.focus):o&&t.setSelection(a,0)}}(e,i,t.selection),this.fire("afterExecute",{writer:i})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const i=t.anchor;if(!i||!e.checkChild(i,"softBreak"))return!1;const o=t.getFirstRange(),n=o.start.parent,r=o.end.parent;return!g(n,e)&&!g(r,e)||n===r}(e.schema,t.selection)}}function m(e,t,i){const o=t.createElement("softBreak");e.insertContent(o,i),t.setSelection(o,"after")}function g(e,t){return!e.is("rootElement")&&(t.isLimit(e)||g(e.parent,t))}class p extends o.Plugin{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,i=e.conversion,o=e.editing.view,n=o.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),i.for("upcast").elementToElement({model:"softBreak",view:"br"}),i.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),o.addObserver(d),e.commands.add("shiftEnter",new h(e)),this.listenTo(n,"enter",((t,i)=>{n.isComposing||i.preventDefault(),i.isSoft&&(e.execute("shiftEnter"),o.scrollToTheSelection())}),{priority:"low"})}}},1638:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Essentials:()=>b});var o=i(6854),n=i(7197),r=i(1863),s=i(7578),a=i(7732);class l extends s.Command{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let i=e.schema.getLimitElement(t);if(t.containsEntireContent(i)||!c(e.schema,i))do{if(i=i.parent,!i)return}while(!c(e.schema,i));e.change((e=>{e.setSelection(i,"in")}))}}function c(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const d=(0,a.parseKeystroke)("Ctrl+A");class u extends s.Plugin{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new l(e)),this.listenTo(t,"keydown",((t,i)=>{(0,a.getCode)(i)===d&&(e.execute("selectAll"),i.preventDefault())}))}}var h=i(3905);class m extends s.Plugin{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(t=>{const i=e.commands.get("selectAll"),o=new h.ButtonView(t),n=t.t;return o.set({label:n("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),o}))}}class g extends s.Plugin{static get requires(){return[u,m]}static get pluginName(){return"SelectAll"}}var p=i(5187),f=i(1903);class b extends o.Sy{static get requires(){return[n.TU,r.C,g,r.G,p.Mq,f.WP]}static get pluginName(){return"Essentials"}}},1281:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Font:()=>te,FontBackgroundColor:()=>ee,FontBackgroundColorEditing:()=>Q,FontBackgroundColorUI:()=>X,FontColor:()=>J,FontColorEditing:()=>q,FontColorUI:()=>G,FontFamily:()=>B,FontFamilyEditing:()=>R,FontFamilyUI:()=>O,FontSize:()=>j,FontSizeEditing:()=>H,FontSizeUI:()=>U});var o=i(6854);class n extends o.mY{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,i=t.document.selection,o=e.value;t.change((e=>{if(i.isCollapsed)o?e.setSelectionAttribute(this.attributeKey,o):e.removeSelectionAttribute(this.attributeKey);else{const n=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of n)o?e.setAttribute(this.attributeKey,o,t):e.removeAttribute(this.attributeKey,t)}}))}}var r=i(7095),s=i(6553);class a extends((0,s.Re)(s.FE)){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(e,t){return this.find((t=>t.color===e.color))?this:super.add(e,t)}hasColor(e){return!!this.find((t=>t.color===e))}}var l=i(3379),c=i.n(l),d=i(9037),u=i.n(d),h=i(569),m=i.n(h),g=i(8575),p=i.n(g),f=i(9216),b=i.n(f),w=i(8915),k={attributes:{"data-cke":!0}};k.setAttributes=p(),k.insert=m().bind(null,"head"),k.domAPI=u(),k.insertStyleElement=b(),c()(w.Z,k),w.Z&&w.Z.locals&&w.Z.locals;class _ extends r.G7{constructor(e,{colors:t,columns:i,removeButtonLabel:o,documentColorsLabel:n,documentColorsCount:l}){super(e),this.items=this.createCollection(),this.colorDefinitions=t,this.focusTracker=new s.Rh,this.keystrokes=new s.VD,this.set("selectedColor",void 0),this.removeButtonLabel=o,this.columns=i,this.documentColors=new a,this.documentColorsCount=l,this._focusables=new r.vX,this._focusCycler=new r.I0({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._documentColorsLabel=n,this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items}),this.items.add(this._createRemoveColorButton())}updateDocumentColors(e,t){const i=e.document,o=this.documentColorsCount;this.documentColors.clear();for(const n of i.getRootNames()){const r=i.getRoot(n),s=e.createRangeIn(r);for(const e of s.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=o))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,i=this.selectedColor;t.selectedColor=i,e&&(e.selectedColor=i)}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendGrids(){if(!this.staticColorsGrid&&(this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid),this.documentColorsCount)){const e=r.YS.bind(this.documentColors,this.documentColors),t=new r.Dn(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid),this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid)}}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_createRemoveColorButton(){const e=new r.r5;return e.set({withText:!0,icon:o.icons.eraser,label:this.removeButtonLabel}),e.class="ck-color-table__remove-color",e.on("execute",(()=>{this.fire("execute",{value:null})})),e.render(),this.focusTracker.add(e.element),this._focusables.add(e),e}_createStaticColorsGrid(){const e=new r.J6(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.delegate("execute").to(this),e}_createDocumentColorsGrid(){const e=r.YS.bind(this.documentColors,this.documentColors),t=new r.J6(this.locale,{columns:this.columns});return t.delegate("execute").to(this),t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using((e=>{const t=new r._9;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",(()=>{this.fire("execute",{value:e.color})})),t})),this.documentColors.on("change:isEmpty",((e,i,o)=>{o&&(t.selectedColor=null)})),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find((t=>t.color===e));t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}const v="fontSize",y="fontFamily",C="fontColor",x="fontBackgroundColor";function A(e,t){const i={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)i.model.values.push(e.model),i.view[e.model]=e.view,e.upcastAlso&&(i.upcastAlso[e.model]=e.upcastAlso);return i}function E(e){return t=>t.getStyle(e).replace(/\s/g,"")}function T(e){return(t,{writer:i})=>i.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}class S extends n{constructor(e){super(e,y)}}function P(e){return e.map(I).filter((e=>void 0!==e))}function I(e){return"object"==typeof e?e:"default"===e?{title:"Default",model:void 0}:"string"==typeof e?function(e){const t=e.replace(/"|'/g,"").split(","),i=t[0],o=t.map(V).join(", ");return{title:i,model:o,view:{name:"span",styles:{"font-family":o},priority:7}}}(e):void 0}function V(e){return(e=e.trim()).indexOf(" ")>0&&(e=`'${e}'`),e}class R extends o.Sy{static get pluginName(){return"FontFamilyEditing"}constructor(e){super(e),e.config.define(y,{options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:y}),e.model.schema.setAttributeProperties(y,{isFormatting:!0,copyOnEnter:!0});const t=P(e.config.get("fontFamily.options")).filter((e=>e.model)),i=A(y,t);e.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(i),e.commands.add(y,new S(e))}_prepareAnyValueConverters(){const e=this.editor;e.conversion.for("downcast").attributeToElement({model:y,view:(e,{writer:t})=>t.createAttributeElement("span",{style:"font-family:"+e},{priority:7})}),e.conversion.for("upcast").elementToAttribute({model:{key:y,value:e=>e.getStyle("font-family")},view:{name:"span",styles:{"font-family":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{face:/.*/}},model:{key:y,value:e=>e.getAttribute("face")}})}}class O extends o.Sy{static get pluginName(){return"FontFamilyUI"}init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),o=e.commands.get(y);e.ui.componentFactory.add(y,(n=>{const a=(0,r.t9)(n);return(0,r.Pm)(a,(()=>function(e,t){const i=new s.FE;for(const o of e){const e={type:"button",model:new r.Hn({commandName:y,commandParam:o.model,label:o.title,withText:!0})};e.model.bind("isOn").to(t,"value",(e=>e===o.model||!(!e||!o.model)&&e.split(",")[0].replace(/'/g,"").toLowerCase()===o.model.toLowerCase())),o.view&&"string"!=typeof o.view&&o.view.styles&&e.model.set("labelStyle",`font-family: ${o.view.styles["font-family"]}`),i.add(e)}return i}(i,o))),a.buttonView.set({label:t("Font Family"),icon:'',tooltip:!0}),a.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),a.bind("isEnabled").to(o),this.listenTo(a,"execute",(t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()})),a}))}_getLocalizedOptions(){const e=this.editor,t=e.t;return P(e.config.get(y).options).map((e=>("Default"===e.title&&(e.title=t("Default")),e)))}}class B extends o.Sy{static get requires(){return[R,O]}static get pluginName(){return"FontFamily"}}var M=i(3291);class z extends n{constructor(e){super(e,v)}}function N(e){return e.map((e=>function(e){if("number"==typeof e&&(e=String(e)),"object"==typeof e&&((t=e).title&&t.model&&t.view))return L(e);var t;const i=function(e){return"string"==typeof e?D[e]:D[e.model]}(e);return i?L(i):"default"===e?{model:void 0,title:"Default"}:function(e){let t;if("object"==typeof e){if(!e.model)throw new s.Bb("font-size-invalid-definition",null,e);t=parseFloat(e.model)}else t=parseFloat(e);return isNaN(t)}(e)?void 0:function(e){return"string"==typeof e&&(e={title:e,model:`${parseFloat(e)}px`}),e.view={name:"span",styles:{"font-size":e.model}},L(e)}(e)}(e))).filter((e=>void 0!==e))}const D={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function L(e){return e.view&&"string"!=typeof e.view&&!e.view.priority&&(e.view.priority=7),e}const F=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class H extends o.Sy{static get pluginName(){return"FontSizeEditing"}constructor(e){super(e),e.config.define(v,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:v}),e.model.schema.setAttributeProperties(v,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),i=N(this.editor.config.get("fontSize.options")).filter((e=>e.model)),o=A(v,i);t?(this._prepareAnyValueConverters(o),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(o),e.commands.add(v,new z(e))}_prepareAnyValueConverters(e){const t=this.editor,i=e.model.values.filter((e=>!(0,M.G9)(String(e))&&!(0,M.zz)(String(e))));if(i.length)throw new s.Bb("font-size-invalid-use-of-named-presets",null,{presets:i});t.conversion.for("downcast").attributeToElement({model:v,view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),t.conversion.for("upcast").elementToAttribute({model:{key:v,value:e=>e.getStyle("font-size")},view:{name:"span",styles:{"font-size":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{size:/^[+-]?\d{1,3}$/}},model:{key:v,value:e=>{const t=e.getAttribute("size"),i="-"===t[0]||"+"===t[0];let o=parseInt(t,10);i&&(o=3+o);const n=F.length-1,r=Math.min(Math.max(o,0),n);return F[r]}}})}}var W=i(5991),Z={attributes:{"data-cke":!0}};Z.setAttributes=p(),Z.insert=m().bind(null,"head"),Z.domAPI=u(),Z.insertStyleElement=b(),c()(W.Z,Z),W.Z&&W.Z.locals&&W.Z.locals;class U extends o.Sy{static get pluginName(){return"FontSizeUI"}init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),o=e.commands.get(v);e.ui.componentFactory.add(v,(n=>{const a=(0,r.t9)(n);return(0,r.Pm)(a,(()=>function(e,t){const i=new s.FE;for(const o of e){const e={type:"button",model:new r.Hn({commandName:v,commandParam:o.model,label:o.title,class:"ck-fontsize-option",withText:!0})};o.view&&"string"!=typeof o.view&&(o.view.styles&&e.model.set("labelStyle",`font-size:${o.view.styles["font-size"]}`),o.view.classes&&e.model.set("class",`${e.model.class} ${o.view.classes}`)),e.model.bind("isOn").to(t,"value",(e=>e===o.model)),i.add(e)}return i}(i,o))),a.buttonView.set({label:t("Font Size"),icon:'',tooltip:!0}),a.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),a.bind("isEnabled").to(o),this.listenTo(a,"execute",(t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()})),a}))}_getLocalizedOptions(){const e=this.editor,t=e.t,i={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return N(e.config.get(v).options).map((e=>{const t=i[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e}))}}class j extends o.Sy{static get requires(){return[H,U]}static get pluginName(){return"FontSize"}normalizeSizeOptions(e){return N(e)}}class $ extends n{constructor(e){super(e,C)}}class q extends o.Sy{static get pluginName(){return"FontColorEditing"}constructor(e){super(e),e.config.define(C,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:C,value:E("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:C,value:e=>e.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:C,view:T("color")}),e.commands.add(C,new $(e)),e.model.schema.extend("$text",{allowAttributes:C}),e.model.schema.setAttributeProperties(C,{isFormatting:!0,copyOnEnter:!0})}}class K extends o.Sy{constructor(e,{commandName:t,componentName:i,icon:o,dropdownLabel:n}){super(e),this.commandName=t,this.componentName=i,this.icon=o,this.dropdownLabel=n,this.columns=e.config.get(`${this.componentName}.columns`),this.colorTableView=void 0}init(){const e=this.editor,t=e.locale,i=t.t,o=e.commands.get(this.commandName),n=(0,r.S1)(e.config.get(this.componentName).colors),s=(0,r.k6)(t,n),a=e.config.get(`${this.componentName}.documentColors`);e.ui.componentFactory.add(this.componentName,(t=>{const n=(0,r.t9)(t);return this.colorTableView=function({dropdownView:e,colors:t,columns:i,removeButtonLabel:o,documentColorsLabel:n,documentColorsCount:r}){const s=e.locale,a=new _(s,{colors:t,columns:i,removeButtonLabel:o,documentColorsLabel:n,documentColorsCount:r});return e.colorTableView=a,e.panelView.children.add(a),a.delegate("execute").to(e,"execute"),a}({dropdownView:n,colors:s.map((e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}}))),columns:this.columns,removeButtonLabel:i("Remove color"),documentColorsLabel:0!==a?i("Document colors"):"",documentColorsCount:void 0===a?this.columns:a}),this.colorTableView.bind("selectedColor").to(o,"value"),n.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),n.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),n.bind("isEnabled").to(o),n.on("execute",((t,i)=>{e.execute(this.commandName,i),e.editing.view.focus()})),n.on("change:isOpen",((t,i,o)=>{n.colorTableView.appendGrids(),o&&(0!==a&&this.colorTableView.updateDocumentColors(e.model,this.componentName),this.colorTableView.updateSelectedColors())})),(0,r.Mh)(n,(()=>n.colorTableView.staticColorsGrid.items.find((e=>e.isOn)))),n}))}}class G extends K{constructor(e){const t=e.locale.t;super(e,{commandName:C,componentName:C,icon:'',dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class J extends o.Sy{static get requires(){return[q,G]}static get pluginName(){return"FontColor"}}class Y extends n{constructor(e){super(e,x)}}class Q extends o.Sy{static get pluginName(){return"FontBackgroundColorEditing"}constructor(e){super(e),e.config.define(x,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.data.addStyleProcessorRules(M.QR),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:x,value:E("background-color")}}),e.conversion.for("downcast").attributeToElement({model:x,view:T("background-color")}),e.commands.add(x,new Y(e)),e.model.schema.extend("$text",{allowAttributes:x}),e.model.schema.setAttributeProperties(x,{isFormatting:!0,copyOnEnter:!0})}}class X extends K{constructor(e){const t=e.locale.t;super(e,{commandName:x,componentName:x,icon:'',dropdownLabel:t("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class ee extends o.Sy{static get requires(){return[Q,X]}static get pluginName(){return"FontBackgroundColor"}}class te extends o.Sy{static get requires(){return[B,j,J,ee]}static get pluginName(){return"Font"}}},4507:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Heading:()=>A,HeadingButtonsUI:()=>T,HeadingEditing:()=>c,HeadingUI:()=>x,Title:()=>I});var o=i(6854),n=i(4690),r=i(6553);class s extends o.mY{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=(0,r.Ps)(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t=>a(e,t,this.editor.model.schema)))}execute(e){const t=this.editor.model,i=t.document,o=e.value;t.change((e=>{const n=Array.from(i.selection.getSelectedBlocks()).filter((e=>a(e,o,t.schema)));for(const t of n)t.is("element",o)||e.rename(t,o)}))}}function a(e,t,i){return i.checkChild(e.parent,t)&&!i.isObject(e)}const l="paragraph";class c extends o.Sy{static get pluginName(){return"HeadingEditing"}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[n.Paragraph]}init(){const e=this.editor,t=e.config.get("heading.options"),i=[];for(const o of t)"paragraph"!==o.model&&(e.model.schema.register(o.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(o),i.push(o.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new s(e,i))}afterInit(){const e=this.editor,t=e.commands.get("enter"),i=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",((t,o)=>{const n=e.model.document.selection.getFirstPosition().parent;i.some((e=>n.is("element",e.model)))&&!n.is("element",l)&&0===n.childCount&&o.writer.rename(n,l)}))}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:r.tA.get("low")+1})}}var d=i(7095);function u(e){const t=e.t,i={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map((e=>{const t=i[e.title];return t&&t!=e.title&&(e.title=t),e}))}var h=i(3379),m=i.n(h),g=i(9037),p=i.n(g),f=i(569),b=i.n(f),w=i(8575),k=i.n(w),_=i(9216),v=i.n(_),y=i(4249),C={attributes:{"data-cke":!0}};C.setAttributes=k(),C.insert=b().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=v(),m()(y.Z,C),y.Z&&y.Z.locals&&y.Z.locals;class x extends o.Sy{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,t=e.t,i=u(e),o=t("Choose heading"),n=t("Heading");e.ui.componentFactory.add("heading",(t=>{const s={},a=new r.FE,l=e.commands.get("heading"),c=e.commands.get("paragraph"),u=[l];for(const e of i){const t={type:"button",model:new d.Hn({label:e.title,class:e.class,withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(c,"value"),t.model.set("commandName","paragraph"),u.push(c)):(t.model.bind("isOn").to(l,"value",(t=>t===e.model)),t.model.set({commandName:"heading",commandValue:e.model})),a.add(t),s[e.model]=e.title}const h=(0,d.t9)(t);return(0,d.Pm)(h,a),h.buttonView.set({isOn:!1,withText:!0,tooltip:n}),h.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),h.bind("isEnabled").toMany(u,"isEnabled",((...e)=>e.some((e=>e)))),h.buttonView.bind("label").to(l,"value",c,"value",((e,t)=>{const i=e||t&&"paragraph";return"boolean"==typeof i?o:s[i]?s[i]:o})),this.listenTo(h,"execute",(t=>{const{commandName:i,commandValue:o}=t.source;e.execute(i,o?{value:o}:void 0),e.editing.view.focus()})),h}))}}class A extends o.Sy{static get requires(){return[c,x]}static get pluginName(){return"Heading"}}const E={heading1:'',heading2:'',heading3:'',heading4:'',heading5:'',heading6:''};class T extends o.Sy{init(){u(this.editor).filter((e=>"paragraph"!==e.model)).map((e=>this._createButton(e)))}_createButton(e){const t=this.editor;t.ui.componentFactory.add(e.model,(i=>{const o=new d.r5(i),n=t.commands.get("heading");return o.label=e.title,o.icon=e.icon||E[e.model],o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(n),o.bind("isOn").to(n,"value",(t=>t==e.model)),o.on("execute",(()=>{t.execute("heading",{value:e.model}),t.editing.view.focus()})),o}))}}var S=i(3291);const P=new Set(["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"]);class I extends o.Sy{static get pluginName(){return"Title"}static get requires(){return["Paragraph"]}init(){const e=this.editor,t=e.model;this._bodyPlaceholder=null,t.schema.register("title",{isBlock:!0,allowIn:"$root"}),t.schema.register("title-content",{isBlock:!0,allowIn:"title",allowAttributes:["alignment"]}),t.schema.extend("$text",{allowIn:"title-content"}),t.schema.addAttributeCheck((e=>{if(e.endsWith("title-content $text"))return!1})),e.editing.mapper.on("modelToViewPosition",R(e.editing.view)),e.data.mapper.on("modelToViewPosition",R(e.editing.view)),e.conversion.for("downcast").elementToElement({model:"title-content",view:"h1"}),e.conversion.for("downcast").add((e=>e.on("insert:title",((e,t,i)=>{i.consumable.consume(t.item,e.name)})))),e.data.upcastDispatcher.on("element:h1",V,{priority:"high"}),e.data.upcastDispatcher.on("element:h2",V,{priority:"high"}),e.data.upcastDispatcher.on("element:h3",V,{priority:"high"}),t.document.registerPostFixer((e=>this._fixTitleContent(e))),t.document.registerPostFixer((e=>this._fixTitleElement(e))),t.document.registerPostFixer((e=>this._fixBodyElement(e))),t.document.registerPostFixer((e=>this._fixExtraParagraph(e))),this._attachPlaceholders(),this._attachTabPressHandling()}getTitle(e={}){const t=this._getTitleElement().getChild(0);return this.editor.data.stringify(t,e)}getBody(e={}){const t=this.editor,i=t.data,o=t.model,n=t.model.document.getRoot(),r=t.editing.view,s=new S.qD(r.document),a=o.createRangeIn(n),l=s.createDocumentFragment(),c=o.createPositionAfter(n.getChild(0)),d=o.createRange(c,o.createPositionAt(n,"end")),u=new Map;for(const e of o.markers){const t=d.getIntersection(e.getRange());t&&u.set(e.name,t)}return i.mapper.clearBindings(),i.mapper.bindElements(n,l),i.downcastDispatcher.convert(a,u,s,e),s.remove(s.createRangeOn(l.getChild(0))),t.data.processor.toData(l)}_getTitleElement(){const e=this.editor.model.document.getRoot();for(const t of e.getChildren())if(O(t))return t}_fixTitleContent(e){const t=this._getTitleElement();if(!t||1===t.maxOffset)return!1;const i=Array.from(t.getChildren());i.shift();for(const o of i)e.move(e.createRangeOn(o),t,"after"),e.rename(o,"paragraph");return!0}_fixTitleElement(e){const t=this.editor.model,i=t.document.getRoot(),o=Array.from(i.getChildren()).filter(O),n=o[0],r=i.getChild(0);if(r.is("element","title"))return B(o,e,t);if(!n&&!P.has(r.name)){const t=e.createElement("title");return e.insert(t,i),e.insertElement("title-content",t),!0}return P.has(r.name)?function(e,t,i){const o=t.createElement("title");t.insert(o,e,"before"),t.insert(e,o,0),t.rename(e,"title-content"),i.schema.removeDisallowedAttributes([e],t)}(r,e,t):e.move(e.createRangeOn(n),i,0),B(o,e,t),!0}_fixBodyElement(e){const t=this.editor.model.document.getRoot();return t.childCount<2&&(this._bodyPlaceholder=e.createElement("paragraph"),e.insert(this._bodyPlaceholder,t,1),!0)}_fixExtraParagraph(e){const t=this.editor.model.document.getRoot(),i=this._bodyPlaceholder;return!!function(e,t){return!(!e||!e.is("element","paragraph")||e.childCount)&&!(t.childCount<=2||t.getChild(t.childCount-1)!==e)}(i,t)&&(this._bodyPlaceholder=null,e.remove(i),!0)}_attachPlaceholders(){const e=this.editor,t=e.t,i=e.editing.view,o=i.document.getRoot(),n=e.sourceElement,r=e.config.get("title.placeholder")||t("Type your title"),s=e.config.get("placeholder")||n&&"textarea"===n.tagName.toLowerCase()&&n.getAttribute("placeholder")||t("Type or paste your content here.");let a;e.editing.downcastDispatcher.on("insert:title-content",((e,t,o)=>{(0,S.ID)({view:i,element:o.mapper.toViewElement(t.item),text:r,keepOnFocus:!0})})),i.document.registerPostFixer((e=>{const t=o.getChild(1);let i=!1;return t!==a&&(a&&((0,S.$_)(e,a),e.removeAttribute("data-placeholder",a)),e.setAttribute("data-placeholder",s,t),a=t,i=!0),i=(0,S.Q7)(t,!0)&&2===o.childCount&&"p"===t.name?!!(0,S.NJ)(e,t)||i:!!(0,S.$_)(e,t)||i,i}))}_attachTabPressHandling(){const e=this.editor,t=e.model;e.keystrokes.set("TAB",((e,i)=>{t.change((e=>{const o=t.document.selection,n=Array.from(o.getSelectedBlocks());if(1===n.length&&n[0].is("element","title-content")){const o=t.document.getRoot().getChild(1);e.setSelection(o,0),i()}}))})),e.keystrokes.set("SHIFT + TAB",((i,o)=>{t.change((i=>{const n=t.document.selection;if(!n.isCollapsed)return;const s=e.model.document.getRoot(),a=(0,r.Ps)(n.getSelectedBlocks()),l=n.getFirstPosition(),c=s.getChild(0);a===s.getChild(1)&&l.isAtStart&&(i.setSelection(c.getChild(0),0),o())}))}))}}function V(e,t,i){const o=t.modelCursor,n=t.viewItem;if(!o.isAtStart||!o.parent.is("element","$root"))return;if(!i.consumable.consume(n,{name:!0}))return;const r=i.writer,s=r.createElement("title"),a=r.createElement("title-content");r.append(a,s),r.insert(s,o),i.convertChildren(n,a),i.updateConversionResult(s,t)}function R(e){return(t,i)=>{const o=i.modelPosition.parent;if(!o.is("element","title"))return;const n=o.parent,r=i.mapper.toViewElement(n);i.viewPosition=e.createPositionAt(r,0),t.stop()}}function O(e){return e.is("element","title")}function B(e,t,i){let o=!1;for(const n of e)0!==n.index&&(M(n,t,i),o=!0);return o}function M(e,t,i){const o=e.getChild(0);o.isEmpty?t.remove(e):(t.move(t.createRangeOn(o),e,"before"),t.rename(o,"paragraph"),t.remove(e),i.schema.removeDisallowedAttributes([o],t))}},128:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Highlight:()=>v,HighlightEditing:()=>r,HighlightUI:()=>k});var o=i(6854);class n extends o.mY{refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute("highlight"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"highlight")}execute(e={}){const t=this.editor.model,i=t.document.selection,o=e.value;t.change((e=>{if(i.isCollapsed){const t=i.getFirstPosition();if(i.hasAttribute("highlight")){const i=e=>e.item.hasAttribute("highlight")&&e.item.getAttribute("highlight")===this.value,n=t.getLastMatchingPosition(i,{direction:"backward"}),r=t.getLastMatchingPosition(i),s=e.createRange(n,r);o&&this.value!==o?(t.isEqual(r)||e.setAttribute("highlight",o,s),e.setSelectionAttribute("highlight",o)):(t.isEqual(r)||e.removeAttribute("highlight",s),e.removeSelectionAttribute("highlight"))}else o&&e.setSelectionAttribute("highlight",o)}else{const n=t.schema.getValidRanges(i.getRanges(),"highlight");for(const t of n)o?e.setAttribute("highlight",o,t):e.removeAttribute("highlight",t)}}))}}class r extends o.Sy{static get pluginName(){return"HighlightEditing"}constructor(e){super(e),e.config.define("highlight",{options:[{model:"yellowMarker",class:"marker-yellow",title:"Yellow marker",color:"var(--ck-highlight-marker-yellow)",type:"marker"},{model:"greenMarker",class:"marker-green",title:"Green marker",color:"var(--ck-highlight-marker-green)",type:"marker"},{model:"pinkMarker",class:"marker-pink",title:"Pink marker",color:"var(--ck-highlight-marker-pink)",type:"marker"},{model:"blueMarker",class:"marker-blue",title:"Blue marker",color:"var(--ck-highlight-marker-blue)",type:"marker"},{model:"redPen",class:"pen-red",title:"Red pen",color:"var(--ck-highlight-pen-red)",type:"pen"},{model:"greenPen",class:"pen-green",title:"Green pen",color:"var(--ck-highlight-pen-green)",type:"pen"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"highlight"});const t=e.config.get("highlight.options");e.conversion.attributeToElement(function(e){const t={model:{key:"highlight",values:[]},view:{}};for(const i of e)t.model.values.push(i.model),t.view[i.model]={name:"mark",classes:i.class};return t}(t)),e.commands.add("highlight",new n(e))}}var s=i(7095),a=i(3379),l=i.n(a),c=i(9037),d=i.n(c),u=i(569),h=i.n(u),m=i(8575),g=i.n(m),p=i(9216),f=i.n(p),b=i(7263),w={attributes:{"data-cke":!0}};w.setAttributes=g(),w.insert=h().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=f(),l()(b.Z,w),b.Z&&b.Z.locals&&b.Z.locals;class k extends o.Sy{get localizedOptionTitles(){const e=this.editor.t;return{"Yellow marker":e("Yellow marker"),"Green marker":e("Green marker"),"Pink marker":e("Pink marker"),"Blue marker":e("Blue marker"),"Red pen":e("Red pen"),"Green pen":e("Green pen")}}static get pluginName(){return"HighlightUI"}init(){const e=this.editor.config.get("highlight.options");for(const t of e)this._addHighlighterButton(t);this._addRemoveHighlightButton(),this._addDropdown(e)}_addRemoveHighlightButton(){const e=this.editor.t,t=this.editor.commands.get("highlight");this._addButton("removeHighlight",e("Remove highlight"),o.icons.eraser,null,(e=>{e.bind("isEnabled").to(t,"isEnabled")}))}_addHighlighterButton(e){const t=this.editor.commands.get("highlight");this._addButton("highlight:"+e.model,e.title,_(e.type),e.model,(function(i){i.bind("isEnabled").to(t,"isEnabled"),i.bind("isOn").to(t,"value",(t=>t===e.model)),i.iconView.fillColor=e.color,i.isToggleable=!0}))}_addButton(e,t,i,o,n){const r=this.editor;r.ui.componentFactory.add(e,(e=>{const a=new s.r5(e),l=this.localizedOptionTitles[t]?this.localizedOptionTitles[t]:t;return a.set({label:l,icon:i,tooltip:!0}),a.on("execute",(()=>{r.execute("highlight",{value:o}),r.editing.view.focus()})),n(a),a}))}_addDropdown(e){const t=this.editor,i=t.t,o=t.ui.componentFactory,n=e[0],r=e.reduce(((e,t)=>(e[t.model]=t,e)),{});o.add("highlight",(a=>{const l=t.commands.get("highlight"),c=(0,s.t9)(a,s.Rm),d=c.buttonView;function u(e,t){const i=e&&e!==d.lastExecuted?e:d.lastExecuted;return r[i][t]}return d.set({label:i("Highlight"),tooltip:!0,lastExecuted:n.model,commandValue:n.model,isToggleable:!0}),d.bind("icon").to(l,"value",(e=>_(u(e,"type")))),d.bind("color").to(l,"value",(e=>u(e,"color"))),d.bind("commandValue").to(l,"value",(e=>u(e,"model"))),d.bind("isOn").to(l,"value",(e=>!!e)),d.delegate("execute").to(c),c.bind("isEnabled").to(l,"isEnabled"),(0,s.up)(c,(()=>{const t=e.map((e=>{const t=o.create("highlight:"+e.model);return this.listenTo(t,"execute",(()=>{c.buttonView.set({lastExecuted:e.model})})),t}));return t.push(new s.$y),t.push(o.create("removeHighlight")),t}),{enableActiveItemFocusOnDropdownOpen:!0,ariaLabel:i("Text highlight toolbar")}),function(e){e.buttonView.actionView.iconView.bind("fillColor").to(e.buttonView,"color")}(c),d.on("execute",(()=>{t.execute("highlight",{value:d.commandValue})})),this.listenTo(c,"execute",(()=>{t.editing.view.focus()})),c}))}}function _(e){return"marker"===e?'':''}class v extends o.Sy{static get requires(){return[r,k]}static get pluginName(){return"Highlight"}}},8428:(e,t,i)=>{"use strict";i.r(t),i.d(t,{HorizontalLine:()=>v,HorizontalLineEditing:()=>w,HorizontalLineUI:()=>_});var o=i(6854),n=i(5549);class r extends o.mY{refresh(){const e=this.editor.model,t=e.schema,i=e.document.selection;this.isEnabled=function(e,t,i){const o=function(e,t){const i=(0,n.KT)(e,t).start.parent;return i.isEmpty&&!i.is("element","$root")?i.parent:i}(e,i);return t.checkChild(o,"horizontalLine")}(i,t,e)}execute(){const e=this.editor.model;e.change((t=>{const i=t.createElement("horizontalLine");e.insertObject(i,null,null,{setSelection:"after"})}))}}var s=i(3379),a=i.n(s),l=i(9037),c=i.n(l),d=i(569),u=i.n(d),h=i(8575),m=i.n(h),g=i(9216),p=i.n(g),f=i(9893),b={attributes:{"data-cke":!0}};b.setAttributes=m(),b.insert=u().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=p(),a()(f.Z,b),f.Z&&f.Z.locals&&f.Z.locals;class w extends o.Sy{static get pluginName(){return"HorizontalLineEditing"}init(){const e=this.editor,t=e.model.schema,i=e.t,o=e.conversion;t.register("horizontalLine",{inheritAllFrom:"$blockObject"}),o.for("dataDowncast").elementToElement({model:"horizontalLine",view:(e,{writer:t})=>t.createEmptyElement("hr")}),o.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(e,{writer:t})=>{const o=i("Horizontal line"),r=t.createContainerElement("div",null,t.createEmptyElement("hr"));return t.addClass("ck-horizontal-line",r),t.setCustomProperty("hr",!0,r),function(e,t,i){return t.setCustomProperty("horizontalLine",!0,e),(0,n.XC)(e,t,{label:i})}(r,t,o)}}),o.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new r(e))}}var k=i(7095);class _ extends o.Sy{static get pluginName(){return"HorizontalLineUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("horizontalLine",(i=>{const o=e.commands.get("horizontalLine"),n=new k.r5(i);return n.set({label:t("Horizontal line"),icon:'',tooltip:!0}),n.bind("isEnabled").to(o,"isEnabled"),this.listenTo(n,"execute",(()=>{e.execute("horizontalLine"),e.editing.view.focus()})),n}))}}class v extends o.Sy{static get requires(){return[w,_,n.$L]}static get pluginName(){return"HorizontalLine"}}},4195:(e,t,i)=>{"use strict";i.r(t),i.d(t,{HtmlEmbed:()=>x,HtmlEmbedEditing:()=>v,HtmlEmbedUI:()=>C});var o=i(6854),n=i(5549),r=i(7095),s=i(6553);class a extends o.mY{refresh(){const e=this.editor.model,t=e.schema,i=e.document.selection,o=l(i);this.isEnabled=function(e,t,i){const o=function(e,t){const i=(0,n.KT)(e,t).start.parent;return i.isEmpty&&!i.is("rootElement")?i.parent:i}(e,i);return t.checkChild(o,"rawHtml")}(i,t,e),this.value=o?o.getAttribute("value")||"":null}execute(e){const t=this.editor.model,i=t.document.selection;t.change((o=>{let n;null!==this.value?n=l(i):(n=o.createElement("rawHtml"),t.insertObject(n,null,null,{setSelection:"on"})),o.setAttribute("value",e,n)}))}}function l(e){const t=e.getSelectedElement();return t&&t.is("element","rawHtml")?t:null}var c=i(3379),d=i.n(c),u=i(9037),h=i.n(u),m=i(569),g=i.n(m),p=i(8575),f=i.n(p),b=i(9216),w=i.n(b),k=i(7319),_={attributes:{"data-cke":!0}};_.setAttributes=f(),_.insert=g().bind(null,"head"),_.domAPI=h(),_.insertStyleElement=w(),d()(k.Z,_),k.Z&&k.Z.locals&&k.Z.locals;class v extends o.Sy{static get pluginName(){return"HtmlEmbedEditing"}constructor(e){super(e),this._widgetButtonViewReferences=new Set,e.config.define("htmlEmbed",{showPreviews:!1,sanitizeHtml:e=>((0,s.KE)("html-embed-provide-sanitize-function"),{html:e,hasChanged:!1})})}init(){const e=this.editor;e.model.schema.register("rawHtml",{inheritAllFrom:"$blockObject",allowAttributes:["value"]}),e.commands.add("htmlEmbed",new a(e)),this._setupConversion()}_setupConversion(){const e=this.editor,t=e.t,i=e.editing.view,o=this._widgetButtonViewReferences,r=e.config.get("htmlEmbed");function a({editor:e,domElement:i,state:n,props:r}){i.textContent="";const a=i.ownerDocument;let c;if(n.isEditable){const e={isDisabled:!1,placeholder:r.textareaPlaceholder};c=l({domDocument:a,state:n,props:e}),i.append(c)}else if(n.showPreviews){const o={sanitizeHtml:r.sanitizeHtml};i.append(function({editor:e,domDocument:i,state:o,props:n}){const r=n.sanitizeHtml(o.getRawHtmlValue()),a=o.getRawHtmlValue().length>0?t("No preview available"):t("Empty snippet content"),l=(0,s.az)(i,"div",{class:"ck ck-reset_all raw-html-embed__preview-placeholder"},a),c=(0,s.az)(i,"div",{class:"raw-html-embed__preview-content",dir:e.locale.contentLanguageDirection}),d=i.createRange().createContextualFragment(r.html);c.appendChild(d);return(0,s.az)(i,"div",{class:"raw-html-embed__preview"},[l,c])}({domDocument:a,state:n,props:o,editor:e}))}else{const e={isDisabled:!0,placeholder:r.textareaPlaceholder};i.append(l({domDocument:a,state:n,props:e}))}const d={onEditClick:r.onEditClick,onSaveClick:()=>{r.onSaveClick(c.value)},onCancelClick:r.onCancelClick};i.prepend(function({editor:e,domDocument:t,state:i,props:n}){const r=(0,s.az)(t,"div",{class:"raw-html-embed__buttons-wrapper"});if(i.isEditable){const t=y(e,"save",n.onSaveClick),i=y(e,"cancel",n.onCancelClick);r.append(t.element,i.element),o.add(t).add(i)}else{const t=y(e,"edit",n.onEditClick);r.append(t.element),o.add(t)}return r}({editor:e,domDocument:a,state:n,props:d}))}function l({domDocument:e,state:t,props:i}){const o=(0,s.az)(e,"textarea",{placeholder:i.placeholder,class:"ck ck-reset ck-input ck-input-text raw-html-embed__source"});return o.disabled=i.isDisabled,o.value=t.getRawHtmlValue(),o}this.editor.editing.view.on("render",(()=>{for(const e of o){if(e.element&&e.element.isConnected)return;e.destroy(),o.delete(e)}}),{priority:"lowest"}),e.data.registerRawContentMatcher({name:"div",classes:"raw-html-embed"}),e.conversion.for("upcast").elementToElement({view:{name:"div",classes:"raw-html-embed"},model:(e,{writer:t})=>t.createElement("rawHtml",{value:e.getCustomProperty("$rawContent")})}),e.conversion.for("dataDowncast").elementToElement({model:"rawHtml",view:(e,{writer:t})=>t.createRawElement("div",{class:"raw-html-embed"},(function(t){t.innerHTML=e.getAttribute("value")||""}))}),e.conversion.for("editingDowncast").elementToStructure({model:{name:"rawHtml",attributes:["value"]},view:(o,{writer:s})=>{let l,c,d;const u=s.createRawElement("div",{class:"raw-html-embed__content-wrapper"},(function(t){l=t,a({editor:e,domElement:t,state:c,props:d}),l.addEventListener("mousedown",(()=>{if(c.isEditable){const t=e.model;t.document.selection.getSelectedElement()!==o&&t.change((e=>e.setSelection(o,"on")))}}),!0)})),h={makeEditable(){c=Object.assign({},c,{isEditable:!0}),a({domElement:l,editor:e,state:c,props:d}),i.change((e=>{e.setAttribute("data-cke-ignore-events","true",u)})),l.querySelector("textarea").focus()},save(t){t!==c.getRawHtmlValue()?(e.execute("htmlEmbed",t),e.editing.view.focus()):this.cancel()},cancel(){c=Object.assign({},c,{isEditable:!1}),a({domElement:l,editor:e,state:c,props:d}),e.editing.view.focus(),i.change((e=>{e.removeAttribute("data-cke-ignore-events",u)}))}};c={showPreviews:r.showPreviews,isEditable:!1,getRawHtmlValue:()=>o.getAttribute("value")||""},d={sanitizeHtml:r.sanitizeHtml,textareaPlaceholder:t("Paste raw HTML here..."),onEditClick(){h.makeEditable()},onSaveClick(e){h.save(e)},onCancelClick(){h.cancel()}};const m=s.createContainerElement("div",{class:"raw-html-embed","data-html-embed-label":t("HTML snippet"),dir:e.locale.uiLanguageDirection},u);return s.setCustomProperty("rawHtmlApi",h,m),s.setCustomProperty("rawHtml",!0,m),(0,n.XC)(m,s,{label:t("HTML snippet"),hasSelectionHandle:!0})}})}}function y(e,t,i){const{t:n}=e.locale,s=new r.r5(e.locale),a=e.commands.get("htmlEmbed");return s.set({class:`raw-html-embed__${t}-button`,icon:o.icons.pencil,tooltip:!0,tooltipPosition:"rtl"===e.locale.uiLanguageDirection?"e":"w"}),s.render(),"edit"===t?(s.set({icon:o.icons.pencil,label:n("Edit source")}),s.bind("isEnabled").to(a)):"save"===t?(s.set({icon:o.icons.check,label:n("Save changes")}),s.bind("isEnabled").to(a)):s.set({icon:o.icons.cancel,label:n("Cancel")}),s.on("execute",i),s}class C extends o.Sy{static get pluginName(){return"HtmlEmbedUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("htmlEmbed",(i=>{const o=e.commands.get("htmlEmbed"),n=new r.r5(i);return n.set({label:t("Insert HTML"),icon:'',tooltip:!0}),n.bind("isEnabled").to(o,"isEnabled"),this.listenTo(n,"execute",(()=>{e.execute("htmlEmbed"),e.editing.view.focus(),e.editing.view.document.selection.getSelectedElement().getCustomProperty("rawHtmlApi").makeEditable()})),n}))}}class x extends o.Sy{static get requires(){return[v,C,n.$L]}static get pluginName(){return"HtmlEmbed"}}},9211:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AutoImage:()=>f,Image:()=>G,ImageCaption:()=>ie,ImageCaptionEditing:()=>Q,ImageCaptionUtils:()=>J,ImageEditing:()=>H,ImageInsert:()=>Re,ImageInsertUI:()=>Ie,ImageResize:()=>Ze,ImageResizeButtons:()=>ze,ImageResizeEditing:()=>Be,ImageResizeHandles:()=>Fe,ImageStyle:()=>mt,ImageStyleEditing:()=>nt,ImageStyleUI:()=>ct,ImageTextAlternative:()=>M,ImageTextAlternativeEditing:()=>w,ImageTextAlternativeUI:()=>B,ImageToolbar:()=>gt,ImageUpload:()=>ye,ImageUploadEditing:()=>_e,ImageUploadProgress:()=>me,ImageUploadUI:()=>se,PictureEditing:()=>pt});var o=i(6854),n=i(7197),r=i(3291),s=i(1903),a=i(5187),l=i(6553),c=i(5549);function d(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot("children")])}function u(e,t){const i=e.plugins.get("ImageUtils"),o=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>i.isInlineImageView(e)?o&&("block"==e.getStyle("display")||e.findAncestor(i.isBlockImageView)?"imageBlock":"imageInline")!==t?null:n(e):null;function n(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function h(e,t){const i=(0,l.Ps)(t.getSelectedBlocks());return!i||e.isObject(i)||i.isEmpty&&"listItem"!=i.name?"imageBlock":"imageInline"}class m extends o.Sy{static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,i=null){const o=this.editor,n=o.model,r=n.document.selection;i=g(o,t||r,i),e={...Object.fromEntries(r.getAttributes()),...e};for(const t in e)n.schema.checkAttribute(i,t)||delete e[t];return n.change((o=>{const r=o.createElement(i,e);return n.insertObject(r,t,null,{setSelection:"on",findOptimalPosition:t||"imageInline"==i?void 0:"auto"}),r.parent?r:null}))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const i=e.getSelectedElement();if(i&&this.isImageWidget(i))return i;let o=t.parent;for(;o;){if(o.is("element")&&this.isImageWidget(o))return o;o=o.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){if("imageBlock"==g(e,t,null)){const i=function(e,t){const i=(0,c.KT)(e,t).start.parent;return i.isEmpty&&!i.is("element","$root")?i.parent:i}(t,e.model);if(e.model.schema.checkChild(i,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every((e=>!e.is("element","imageBlock")))}(e)}toImageWidget(e,t,i){return t.setCustomProperty("image",!0,e),(0,c.XC)(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${i}`:i}})}isImageWidget(e){return!!e.getCustomProperty("image")&&(0,c.Qd)(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:i}of t.createRangeIn(e))if(this.isInlineImageView(i))return i}}function g(e,t,i){const o=e.model.schema,n=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?i||("inline"===n?"imageInline":"block"===n?"imageBlock":t.is("selection")?h(o,t):o.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}const p=new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));class f extends o.Sy{static get requires(){return[n.TU,m,s.WP,a.HG]}static get pluginName(){return"AutoImage"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document,i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",(()=>{const e=t.selection.getFirstRange(),i=r.jP.fromPosition(e.start);i.stickiness="toPrevious";const o=r.jP.fromPosition(e.end);o.stickiness="toNext",t.once("change:data",(()=>{this._embedImageBetweenPositions(i,o),i.detach(),o.detach()}),{priority:"high"})})),e.commands.get("undo").on("execute",(()=>{this._timeoutId&&(l.CO.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_embedImageBetweenPositions(e,t){const i=this.editor,o=new r.iE(e,t),n=o.getWalker({ignoreElementEnd:!0}),s=Object.fromEntries(i.model.document.selection.getAttributes()),a=this.editor.plugins.get("ImageUtils");let l="";for(const e of n)e.item.is("$textProxy")&&(l+=e.item.data);l=l.trim(),l.match(p)?(this._positionToInsert=r.jP.fromPosition(e),this._timeoutId=setTimeout((()=>{i.commands.get("insertImage").isEnabled?(i.model.change((e=>{let t;this._timeoutId=null,e.remove(o),o.detach(),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert.toPosition()),a.insertImage({...s,src:l},t),this._positionToInsert.detach(),this._positionToInsert=null})),i.plugins.get("Delete").requestUndoOnBackspace()):o.detach()}),100)):o.detach()}}class b extends o.mY{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,i=t.plugins.get("ImageUtils"),o=t.model,n=i.getClosestSelectedImageElement(o.document.selection);o.change((t=>{t.setAttribute("alt",e.newValue,n)}))}}class w extends o.Sy{static get requires(){return[m]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new b(this.editor))}}var k=i(7095),_=i(3379),v=i.n(_),y=i(9037),C=i.n(y),x=i(569),A=i.n(x),E=i(8575),T=i.n(E),S=i(9216),P=i.n(S),I=i(5269),V={attributes:{"data-cke":!0}};V.setAttributes=T(),V.insert=A().bind(null,"head"),V.domAPI=C(),V.insertStyleElement=P(),v()(I.Z,V),I.Z&&I.Z.locals&&I.Z.locals,i(2151);class R extends k.G7{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new l.Rh,this.keystrokes=new l.VD,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),o.icons.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),o.icons.cancel,"ck-button-cancel","cancel"),this._focusables=new k.vX,this._focusCycler=new k.I0({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),(0,k.GI)({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,i,o){const n=new k.r5(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.extendTemplate({attributes:{class:i}}),o&&n.delegate("execute").to(this,o),n}_createLabeledInputView(){const e=this.locale.t,t=new k.KP(this.locale,k.R);return t.label=e("Text alternative"),t}}function O(e){const t=e.editing.view,i=k.no.defaultPositions,o=e.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(o.getClosestSelectedImageWidget(t.document.selection)),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast,i.viewportStickyNorth]}}class B extends o.Sy{static get requires(){return[k.WB]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",(i=>{const n=e.commands.get("imageTextAlternative"),r=new k.r5(i);return r.set({label:t("Change image text alternative"),icon:o.icons.lowVision,tooltip:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value",(e=>!!e)),this.listenTo(r,"execute",(()=>{this._showForm()})),r}))}_createForm(){const e=this.editor,t=e.editing.view.document,i=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new((0,k.RX)(R))(e.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)})),this.listenTo(this._form,"cancel",(()=>{this._hideForm(!0)})),this._form.keystrokes.set("Esc",((e,t)=>{this._hideForm(!0),t()})),this.listenTo(e.ui,"update",(()=>{i.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const i=O(e);t.updatePosition(i)}}(e):this._hideForm(!0)})),(0,k.eC)({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),i=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:O(e)}),i.fieldView.value=i.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class M extends o.Sy{static get requires(){return[w,B]}static get pluginName(){return"ImageTextAlternative"}}function z(e,t){const i=(t,i,o)=>{if(!o.consumable.consume(i.item,t.name))return;const n=o.writer,r=o.mapper.toViewElement(i.item),s=e.findViewImgElement(r);if(null===i.attributeNewValue){const e=i.attributeOldValue;e&&e.data&&(n.removeAttribute("srcset",s),n.removeAttribute("sizes",s),e.width&&n.removeAttribute("width",s))}else{const e=i.attributeNewValue;e&&e.data&&(n.setAttribute("srcset",e.data,s),n.setAttribute("sizes","100vw",s),e.width&&n.setAttribute("width",e.width,s))}};return e=>{e.on(`attribute:srcset:${t}`,i)}}function N(e,t,i){const o=(t,i,o)=>{if(!o.consumable.consume(i.item,t.name))return;const n=o.writer,r=o.mapper.toViewElement(i.item),s=e.findViewImgElement(r);n.setAttribute(i.attributeKey,i.attributeNewValue||"",s)};return e=>{e.on(`attribute:${i}:${t}`,o)}}class D extends r.Qj{observe(e){this.listenTo(e,"load",((e,t)=>{const i=t.target;this.checkShouldIgnoreEventFromTarget(i)||"IMG"==i.tagName&&this._fireEvents(t)}),{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class L extends o.mY{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&(0,l.KE)("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&(0,l.KE)("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=(0,l.qo)(e.source),i=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),n=Object.fromEntries(i.getAttributes());t.forEach(((e,t)=>{const r=i.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&r&&o.isImage(r)){const t=this.editor.model.createPositionAfter(r);o.insertImage({...e,...n},t)}else o.insertImage({...e,...n})}))}}class F extends o.mY{refresh(){const e=this.editor.plugins.get("ImageUtils"),t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=e.isImage(t),this.value=this.isEnabled?t.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement();this.editor.model.change((i=>{i.setAttribute("src",e.source,t),i.removeAttribute("srcset",t),i.removeAttribute("sizes",t)}))}}class H extends o.Sy{static get requires(){return[m]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(D),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:e=>{const t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}});const i=new L(e),o=new F(e);e.commands.add("insertImage",i),e.commands.add("replaceImageSource",o),e.commands.add("imageInsert",i)}}class W extends o.mY{constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(){const e=this.editor,t=this.editor.model,i=e.plugins.get("ImageUtils"),o=i.getClosestSelectedImageElement(t.document.selection),n=Object.fromEntries(o.getAttributes());return n.src||n.uploadId?t.change((e=>{const r=Array.from(t.markers).filter((e=>e.getRange().containsItem(o))),s=i.insertImage(n,t.createSelection(o,"on"),this._modelElementName);if(!s)return null;const a=e.createRangeOn(s);for(const t of r){const i=t.getRange(),o="$graveyard"!=i.root.rootName?i.getJoined(a,!0):a;e.updateMarker(t,{range:o})}return{oldElement:o,newElement:s}})):null}}class Z extends o.Sy{static get requires(){return[H,m,n._l]}static get pluginName(){return"ImageBlockEditing"}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new W(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,o=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:t})=>d(t)}),i.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:i})=>o.toImageWidget(d(i),i,t("image widget"))}),i.for("downcast").add(N(o,"imageBlock","src")).add(N(o,"imageBlock","alt")).add(z(o,"imageBlock")),i.for("upcast").elementToElement({view:u(e,"imageBlock"),model:(e,{writer:t})=>t.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)}).add(function(e){const t=(t,i,o)=>{if(!o.consumable.test(i.viewItem,{name:!0,classes:"image"}))return;const n=e.findViewImgElement(i.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(i.viewItem,{name:!0,classes:"image"});const r=o.convertItem(n,i.modelCursor),s=(0,l.Ps)(r.modelRange.getItems());s?(o.convertChildren(i.viewItem,s),o.updateConversionResult(s,i)):o.consumable.revert(i.viewItem,{name:!0,classes:"image"})};return e=>{e.on("element:figure",t)}}(o))}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,o=e.plugins.get("ImageUtils"),n=e.plugins.get("ClipboardPipeline");this.listenTo(n,"inputTransformation",((n,s)=>{const a=Array.from(s.content.getChildren());let l;if(!a.every(o.isInlineImageView))return;l=s.targetRanges?e.editing.mapper.toModelRange(s.targetRanges[0]):t.document.selection.getFirstRange();const c=t.createSelection(l);if("imageBlock"===h(t.schema,c)){const e=new r.yj(i.document),t=a.map((t=>e.createElement("figure",{class:"image"},t)));s.content=e.createDocumentFragment(t)}}))}}var U=i(2430),j={attributes:{"data-cke":!0}};j.setAttributes=T(),j.insert=A().bind(null,"head"),j.domAPI=C(),j.insertStyleElement=P(),v()(U.Z,j),U.Z&&U.Z.locals&&U.Z.locals;class $ extends o.Sy{static get requires(){return[Z,c.$L,M]}static get pluginName(){return"ImageBlock"}}class q extends o.Sy{static get requires(){return[H,m,n._l]}static get pluginName(){return"ImageInlineEditing"}init(){const e=this.editor,t=e.model.schema;t.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),t.addChildCheck(((e,t)=>{if(e.endsWith("caption")&&"imageInline"===t.name)return!1})),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new W(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,o=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),i.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,{writer:i})=>o.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(i),i,t("image widget"))}),i.for("downcast").add(N(o,"imageInline","src")).add(N(o,"imageInline","alt")).add(z(o,"imageInline")),i.for("upcast").elementToElement({view:u(e,"imageInline"),model:(e,{writer:t})=>t.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,o=e.plugins.get("ImageUtils"),n=e.plugins.get("ClipboardPipeline");this.listenTo(n,"inputTransformation",((n,s)=>{const a=Array.from(s.content.getChildren());let l;if(!a.every(o.isBlockImageView))return;l=s.targetRanges?e.editing.mapper.toModelRange(s.targetRanges[0]):t.document.selection.getFirstRange();const c=t.createSelection(l);if("imageInline"===h(t.schema,c)){const e=new r.yj(i.document),t=a.map((t=>1===t.childCount?(Array.from(t.getAttributes()).forEach((i=>e.setAttribute(...i,o.findViewImgElement(t)))),t.getChild(0)):t));s.content=e.createDocumentFragment(t)}}))}}class K extends o.Sy{static get requires(){return[q,c.$L,M]}static get pluginName(){return"ImageInline"}}class G extends o.Sy{static get requires(){return[$,K]}static get pluginName(){return"Image"}}class J extends o.Sy{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[m]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),i=e.getFirstPosition().findAncestor("caption");return i&&t.isBlockImage(i.parent)?i:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return"figcaption"==e.name&&t.isBlockImageView(e.parent)?{name:!0}:null}}class Y extends o.mY{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),i=e.plugins.get("ImageUtils");if(!e.plugins.has(Z))return this.isEnabled=!1,void(this.value=!1);const o=e.model.document.selection,n=o.getSelectedElement();if(!n){const e=t.getCaptionFromModelSelection(o);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=i.isImage(n),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(n):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change((e=>{this.value?this._hideImageCaption(e):this._showImageCaption(e,t)}))}_showImageCaption(e,t){const i=this.editor.model.document.selection,o=this.editor.plugins.get("ImageCaptionEditing"),n=this.editor.plugins.get("ImageUtils");let r=i.getSelectedElement();const s=o._getSavedCaption(r);n.isInlineImage(r)&&(this.editor.execute("imageTypeBlock"),r=i.getSelectedElement());const a=s||e.createElement("caption");e.append(a,r),t&&e.setSelection(a,"in")}_hideImageCaption(e){const t=this.editor,i=t.model.document.selection,o=t.plugins.get("ImageCaptionEditing"),n=t.plugins.get("ImageCaptionUtils");let r,s=i.getSelectedElement();s?r=n.getCaptionFromImageModelElement(s):(r=n.getCaptionFromModelSelection(i),s=r.parent),o._saveCaption(s,r),e.setSelection(s,"on"),e.remove(r)}}class Q extends o.Sy{static get requires(){return[m,J]}static get pluginName(){return"ImageCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new Y(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils"),o=e.plugins.get("ImageCaptionUtils"),n=e.t;e.conversion.for("upcast").elementToElement({view:e=>o.matchImageCaptionViewElement(e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>i.isBlockImage(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:o})=>{if(!i.isBlockImage(e.parent))return null;const s=o.createEditableElement("figcaption");o.setCustomProperty("imageCaption",!0,s),(0,r.ID)({view:t,element:s,text:n("Enter image caption"),keepOnFocus:!0});const a=e.parent.getAttribute("alt"),l=a?n("Caption for image: %0",[a]):n("Caption for the image");return(0,c.sC)(s,o,{label:l})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils"),o=e.commands.get("imageTypeInline"),n=e.commands.get("imageTypeBlock"),r=e=>{if(!e.return)return;const{oldElement:o,newElement:n}=e.return;if(!o)return;if(t.isBlockImage(o)){const e=i.getCaptionFromImageModelElement(o);if(e)return void this._saveCaption(n,e)}const r=this._getSavedCaption(o);r&&this._saveCaption(n,r)};o&&this.listenTo(o,"execute",r,{priority:"low"}),n&&this.listenTo(n,"execute",r,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?r.W_.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,i=e.plugins.get("ImageUtils"),o=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",(()=>{const n=t.document.differ.getChanges();for(const t of n){if("alt"!==t.attributeKey)continue;const n=t.range.start.nodeAfter;if(i.isBlockImage(n)){const t=o.getCaptionFromImageModelElement(n);if(!t)return;e.editing.reconvertItem(t)}}}))}}class X extends o.Sy{static get requires(){return[J]}static get pluginName(){return"ImageCaptionUI"}init(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageCaptionUtils"),n=e.t;e.ui.componentFactory.add("toggleImageCaption",(r=>{const s=e.commands.get("toggleImageCaption"),a=new k.r5(r);return a.set({icon:o.icons.caption,tooltip:!0,isToggleable:!0}),a.bind("isOn","isEnabled").to(s,"value","isEnabled"),a.bind("label").to(s,"value",(e=>n(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(a,"execute",(()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const o=i.getCaptionFromModelSelection(e.model.document.selection);if(o){const i=e.editing.mapper.toViewElement(o);t.scrollToTheSelection(),t.change((e=>{e.addClass("image__caption_highlighted",i)}))}e.editing.view.focus()})),a}))}}var ee=i(2423),te={attributes:{"data-cke":!0}};te.setAttributes=T(),te.insert=A().bind(null,"head"),te.domAPI=C(),te.insertStyleElement=P(),v()(ee.Z,te),ee.Z&&ee.Z.locals&&ee.Z.locals;class ie extends o.Sy{static get requires(){return[Q,X]}static get pluginName(){return"ImageCaption"}}var oe=i(1070);function ne(e){const t=e.map((e=>e.replace("+","\\+")));return new RegExp(`^image\\/(${t.join("|")})$`)}function re(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class se extends o.Sy{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=e.t,i=i=>{const n=new oe.FileDialogButtonView(i),r=e.commands.get("uploadImage"),s=e.config.get("image.upload.types"),a=ne(s);return n.set({acceptedType:s.map((e=>`image/${e}`)).join(","),allowMultipleFiles:!0}),n.buttonView.set({label:t("Insert image"),icon:o.icons.image,tooltip:!0}),n.buttonView.bind("isEnabled").to(r),n.on("done",((t,i)=>{const o=Array.from(i).filter((e=>a.test(e.type)));o.length&&(e.execute("uploadImage",{file:o}),e.editing.view.focus())})),n};e.ui.componentFactory.add("uploadImage",i),e.ui.componentFactory.add("imageUpload",i)}}var ae=i(2926),le={attributes:{"data-cke":!0}};le.setAttributes=T(),le.insert=A().bind(null,"head"),le.domAPI=C(),le.insertStyleElement=P(),v()(ae.Z,le),ae.Z&&ae.Z.locals&&ae.Z.locals;var ce=i(1547),de={attributes:{"data-cke":!0}};de.setAttributes=T(),de.insert=A().bind(null,"head"),de.domAPI=C(),de.insertStyleElement=P(),v()(ce.Z,de),ce.Z&&ce.Z.locals&&ce.Z.locals;var ue=i(6618),he={attributes:{"data-cke":!0}};he.setAttributes=T(),he.insert=A().bind(null,"head"),he.domAPI=C(),he.insertStyleElement=P(),v()(ue.Z,he),ue.Z&&ue.Z.locals&&ue.Z.locals;class me extends o.Sy{static get pluginName(){return"ImageUploadProgress"}constructor(e){super(e),this.uploadStatusChange=(e,t,i)=>{const o=this.editor,n=t.item,r=n.getAttribute("uploadId");if(!i.consumable.consume(t.item,e.name))return;const s=o.plugins.get("ImageUtils"),a=o.plugins.get(oe.FileRepository),l=r?t.attributeNewValue:null,c=this.placeholder,d=o.editing.mapper.toViewElement(n),u=i.writer;if("reading"==l)return ge(d,u),void pe(s,c,d,u);if("uploading"==l){const e=a.loaders.get(r);return ge(d,u),void(e?(fe(d,u),function(e,t,i,o){const n=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),n),i.on("change:uploadedPercent",((e,t,i)=>{o.change((e=>{e.setStyle("width",i+"%",n)}))}))}(d,u,e,o.editing.view),function(e,t,i,o){if(o.data){const n=e.findViewImgElement(t);i.setAttribute("src",o.data,n)}}(s,d,u,e)):pe(s,c,d,u))}"complete"==l&&a.loaders.get(r)&&function(e,t,i){const o=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),o),setTimeout((()=>{i.change((e=>e.remove(e.createRangeOn(o))))}),3e3)}(d,u,o.editing.view),function(e,t){we(e,t,"progressBar")}(d,u),fe(d,u),function(e,t){t.removeClass("ck-appear",e)}(d,u)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function ge(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function pe(e,t,i,o){i.hasClass("ck-image-upload-placeholder")||o.addClass("ck-image-upload-placeholder",i);const n=e.findViewImgElement(i);n.getAttribute("src")!==t&&o.setAttribute("src",t,n),be(i,"placeholder")||o.insert(o.createPositionAfter(n),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(o))}function fe(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),we(e,t,"placeholder")}function be(e,t){for(const i of e.getChildren())if(i.getCustomProperty(t))return i}function we(e,t,i){const o=be(e,i);o&&t.remove(t.createRangeOn(o))}class ke extends o.mY{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(i)}execute(e){const t=(0,l.qo)(e.file),i=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),n=Object.fromEntries(i.getAttributes());t.forEach(((e,t)=>{const r=i.getSelectedElement();if(t&&r&&o.isImage(r)){const t=this.editor.model.createPositionAfter(r);this._uploadImage(e,n,t)}else this._uploadImage(e,n)}))}_uploadImage(e,t,i){const o=this.editor,n=o.plugins.get(oe.FileRepository).createLoader(e),r=o.plugins.get("ImageUtils");n&&r.insertImage({...t,uploadId:n.id},i)}}class _e extends o.Sy{static get requires(){return[oe.FileRepository,k.P_,n._l,m]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,i=e.conversion,o=e.plugins.get(oe.FileRepository),n=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline"),a=ne(e.config.get("image.upload.types")),c=new ke(e);e.commands.add("uploadImage",c),e.commands.add("imageUpload",c),i.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",((t,i)=>{if(o=i.dataTransfer,Array.from(o.types).includes("text/html")&&""!==o.getData("text/html"))return;var o;const n=Array.from(i.dataTransfer.files).filter((e=>!!e&&a.test(e.type)));n.length&&(t.stop(),e.model.change((t=>{i.targetRanges&&t.setSelection(i.targetRanges.map((t=>e.editing.mapper.toModelRange(t)))),e.model.enqueueChange((()=>{e.execute("uploadImage",{file:n})}))})))})),this.listenTo(s,"inputTransformation",((t,i)=>{const s=Array.from(e.editing.view.createRangeIn(i.content)).map((e=>e.item)).filter((e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src")||!t.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!t.getAttribute("src").match(/^blob:/g))}(n,e)&&!e.getAttribute("uploadProcessed"))).map((e=>{return{promise:(t=e,new Promise(((e,i)=>{const o=t.getAttribute("src");fetch(o).then((e=>e.blob())).then((t=>{const i=re(t,o),n=i.replace("image/",""),r=new File([t],`image.${n}`,{type:i});e(r)})).catch((t=>t&&"TypeError"===t.name?function(e){return function(e){return new Promise(((t,i)=>{const o=l.CO.document.createElement("img");o.addEventListener("load",(()=>{const e=l.CO.document.createElement("canvas");e.width=o.width,e.height=o.height,e.getContext("2d").drawImage(o,0,0),e.toBlob((e=>e?t(e):i()))})),o.addEventListener("error",(()=>i())),o.src=e}))}(e).then((t=>{const i=re(t,e),o=i.replace("image/","");return new File([t],`image.${o}`,{type:i})}))}(o).then(e).catch(i):i(t)))}))),imageElement:e};var t}));if(!s.length)return;const a=new r.yj(e.editing.view.document);for(const e of s){a.setAttribute("uploadProcessed",!0,e.imageElement);const t=o.createLoader(e.promise);t&&(a.setAttribute("src","",e.imageElement),a.setAttribute("uploadId",t.id,e.imageElement))}})),e.editing.view.document.on("dragover",((e,t)=>{t.preventDefault()})),t.on("change",(()=>{const i=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),n=new Set;for(const t of i)if("insert"==t.type&&"$text"!=t.name){const i=t.position.nodeAfter,r="$graveyard"==t.position.root.rootName;for(const t of ve(e,i)){const e=t.getAttribute("uploadId");if(!e)continue;const i=o.loaders.get(e);i&&(r?n.has(e)||i.abort():(n.add(e),this._uploadImageElements.set(e,t),"idle"==i.status&&this._readAndUpload(i)))}}})),this.on("uploadComplete",((e,{imageElement:t,data:i})=>{const o=i.urls?i.urls:i;this.editor.model.change((e=>{e.setAttribute("src",o.default,t),this._parseAndSetSrcsetAttributeOnImage(o,t,e)}))}),{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){const t=this.editor,i=t.model,o=t.locale.t,n=t.plugins.get(oe.FileRepository),r=t.plugins.get(k.P_),s=t.plugins.get("ImageUtils"),a=this._uploadImageElements;return i.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","reading",a.get(e.id))})),e.read().then((()=>{const o=e.upload(),n=a.get(e.id);if(l.OB.isSafari){const e=t.editing.mapper.toViewElement(n),i=s.findViewImgElement(e);t.editing.view.once("render",(()=>{if(!i.parent)return;const e=t.editing.view.domConverter.mapViewToDom(i.parent);if(!e)return;const o=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=o}))}return i.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","uploading",n)})),o})).then((t=>{i.enqueueChange({isUndoable:!1},(i=>{const o=a.get(e.id);i.setAttribute("uploadStatus","complete",o),this.fire("uploadComplete",{data:t,imageElement:o})})),c()})).catch((t=>{if("error"!==e.status&&"aborted"!==e.status)throw t;"error"==e.status&&t&&r.showWarning(t,{title:o("Upload failed"),namespace:"upload"}),i.enqueueChange({isUndoable:!1},(t=>{t.remove(a.get(e.id))})),c()}));function c(){i.enqueueChange({isUndoable:!1},(t=>{const i=a.get(e.id);t.removeAttribute("uploadId",i),t.removeAttribute("uploadStatus",i),a.delete(e.id)})),n.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,i){let o=0;const n=Object.keys(e).filter((e=>{const t=parseInt(e,10);if(!isNaN(t))return o=Math.max(o,t),!0})).map((t=>`${e[t]} ${t}w`)).join(", ");""!=n&&i.setAttribute("srcset",{data:n,width:o},t)}}function ve(e,t){const i=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter((e=>i.isImage(e.item))).map((e=>e.item))}class ye extends o.Sy{static get pluginName(){return"ImageUpload"}static get requires(){return[_e,se,me]}}var Ce=i(8340),xe={attributes:{"data-cke":!0}};xe.setAttributes=T(),xe.insert=A().bind(null,"head"),xe.domAPI=C(),xe.insertStyleElement=P(),v()(Ce.Z,xe),Ce.Z&&Ce.Z.locals&&Ce.Z.locals;class Ae extends k.G7{constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",i.to("class")],role:i.to("_role"),"aria-labelledby":i.to("_ariaLabelledBy")},children:this.children})}}var Ee=i(8879),Te={attributes:{"data-cke":!0}};Te.setAttributes=T(),Te.insert=A().bind(null,"head"),Te.domAPI=C(),Te.insertStyleElement=P(),v()(Ee.Z,Te),Ee.Z&&Ee.Z.locals&&Ee.Z.locals;class Se extends k.G7{constructor(e,t={}){super(e);const{insertButtonView:i,cancelButtonView:o}=this._createActionButtons(e);this.insertButtonView=i,this.cancelButtonView=o,this.set("imageURLInputValue",""),this.focusTracker=new l.Rh,this.keystrokes=new l.VD,this._focusables=new k.vX,this._focusCycler=new k.I0({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.set("_integrations",new l.FE);for(const[e,i]of Object.entries(t))"insertImageViaUrl"===e&&(i.fieldView.bind("value").to(this,"imageURLInputValue",(e=>e||"")),i.fieldView.on("input",(()=>{this.imageURLInputValue=i.fieldView.element.value.trim()}))),i.name=e,this._integrations.add(i);this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:"-1"},children:[...this._integrations,new Ae(e,{children:[this.insertButtonView,this.cancelButtonView],class:"ck-image-insert-form__action-row"})]})}render(){super.render(),(0,k.GI)({view:this});const e=[...this._integrations,this.insertButtonView,this.cancelButtonView];e.forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element);const t=e=>e.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t),this.listenTo(e[0].element,"selectstart",((e,t)=>{t.stopPropagation()}),{priority:"high"})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}getIntegration(e){return this._integrations.find((t=>t.name===e))}_createActionButtons(e){const t=e.t,i=new k.r5(e),n=new k.r5(e);return i.set({label:t("Insert"),icon:o.icons.check,class:"ck-button-save",type:"submit",withText:!0,isEnabled:this.imageURLInputValue}),n.set({label:t("Cancel"),icon:o.icons.cancel,class:"ck-button-cancel",withText:!0}),i.bind("isEnabled").to(this,"imageURLInputValue",(e=>!!e)),i.delegate("execute").to(this,"submit"),n.delegate("execute").to(this,"cancel"),{insertButtonView:i,cancelButtonView:n}}focus(){this._focusCycler.focusFirst()}}function Pe(e){const t=e.t,i=new k.KP(e,k.R);return i.set({label:t("Insert image via URL")}),i.fieldView.placeholder="https://example.com/image.png",i}class Ie extends o.Sy{static get pluginName(){return"ImageInsertUI"}init(){const e=this.editor,t=e=>this._createDropdownView(e);e.ui.componentFactory.add("insertImage",t),e.ui.componentFactory.add("imageInsert",t)}_createDropdownView(e){const t=this.editor,i=e.t,n=t.commands.get("uploadImage"),r=t.commands.get("insertImage");this.dropdownView=(0,k.t9)(e,n?k.Rm:void 0);const s=this.dropdownView.buttonView,a=this.dropdownView.panelView;if(s.set({label:i("Insert image"),icon:o.icons.image,tooltip:!0}),a.extendTemplate({attributes:{class:"ck-image-insert__panel"}}),n){const e=this.dropdownView.buttonView;e.actionView=t.ui.componentFactory.create("uploadImage"),e.actionView.extendTemplate({attributes:{class:"ck ck-button ck-splitbutton__action"}})}return this._setUpDropdown(n||r)}_setUpDropdown(e){const t=this.editor,i=t.t,o=this.dropdownView,n=o.panelView,r=this.editor.plugins.get("ImageUtils"),s=t.commands.get("replaceImageSource");let a;function l(){t.editing.view.focus(),o.isOpen=!1}return o.bind("isEnabled").to(e),o.once("change:isOpen",(()=>{a=new Se(t.locale,function(e){const t=e.config.get("image.insert.integrations"),i=e.plugins.get("ImageInsertUI"),o={insertImageViaUrl:Pe(e.locale)};if(!t)return o;if(t.find((e=>"openCKFinder"===e))&&e.ui.componentFactory.has("ckfinder")){const t=e.ui.componentFactory.create("ckfinder");t.set({withText:!0,class:"ck-image-insert__ck-finder-button"}),t.delegate("execute").to(i,"cancel"),o.openCKFinder=t}return t.reduce(((t,i)=>(o[i]?t[i]=o[i]:e.ui.componentFactory.has(i)&&(t[i]=e.ui.componentFactory.create(i)),t)),{})}(t)),a.delegate("submit","cancel").to(o),n.children.add(a)})),o.on("change:isOpen",(()=>{const e=t.model.document.selection.getSelectedElement(),n=a.insertButtonView,l=a.getIntegration("insertImageViaUrl");o.isOpen&&(r.isImage(e)?(a.imageURLInputValue=s.value,n.label=i("Update"),l.label=i("Update image URL")):(a.imageURLInputValue="",n.label=i("Insert"),l.label=i("Insert image via URL")))}),{priority:"low"}),this.delegate("cancel").to(o),o.on("submit",(()=>{l(),function(){const e=t.model.document.selection.getSelectedElement();r.isImage(e)?t.execute("replaceImageSource",{source:a.imageURLInputValue}):t.execute("insertImage",{source:a.imageURLInputValue})}()})),o.on("cancel",(()=>{l()})),o}}class Ve extends o.Sy{static get pluginName(){return"ImageInsertViaUrl"}static get requires(){return[Ie]}}class Re extends o.Sy{static get pluginName(){return"ImageInsert"}static get requires(){return[ye,Ve,Ie]}}class Oe extends o.mY{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!t,t&&t.hasAttribute("width")?this.value={width:t.getAttribute("width"),height:null}:this.value=null}execute(e){const t=this.editor,i=t.model,o=t.plugins.get("ImageUtils").getClosestSelectedImageElement(i.document.selection);this.value={width:e.width,height:null},o&&i.change((t=>{t.setAttribute("width",e.width,o)}))}}class Be extends o.Sy{static get requires(){return[m]}static get pluginName(){return"ImageResizeEditing"}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new Oe(e);this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:"width"}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:"width"})}_registerConverters(e){const t=this.editor;t.conversion.for("downcast").add((t=>t.on(`attribute:width:${e}`,((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const o=i.writer,n=i.mapper.toViewElement(t.item);null!==t.attributeNewValue?(o.setStyle("width",t.attributeNewValue,n),o.addClass("image_resized",n)):(o.removeStyle("width",n),o.removeClass("image_resized",n))})))),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{width:/.+/}},model:{key:"width",value:e=>e.getStyle("width")}})}}const Me={small:o.icons.objectSizeSmall,medium:o.icons.objectSizeMedium,large:o.icons.objectSizeLarge,original:o.icons.objectSizeFull};class ze extends o.Sy{static get requires(){return[Be]}static get pluginName(){return"ImageResizeButtons"}constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),i=e.commands.get("resizeImage");this.bind("isEnabled").to(i);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:i,value:o,icon:n}=e,r=o?o+this._resizeUnit:null;t.ui.componentFactory.add(i,(i=>{const o=new k.r5(i),s=t.commands.get("resizeImage"),a=this._getOptionLabelValue(e,!0);if(!Me[n])throw new l.Bb("imageresizebuttons-missing-icon",t,e);return o.set({label:a,icon:Me[n],tooltip:a,isToggleable:!0}),o.bind("isEnabled").to(this),o.bind("isOn").to(s,"value",Ne(r)),this.listenTo(o,"execute",(()=>{t.execute("resizeImage",{width:r})})),o}))}_registerImageResizeDropdown(e){const t=this.editor,i=t.t,o=e.find((e=>!e.value)),n=n=>{const r=t.commands.get("resizeImage"),s=(0,k.t9)(n,k.J0),a=s.buttonView;return a.set({tooltip:i("Resize image"),commandValue:o.value,icon:Me.medium,isToggleable:!0,label:this._getOptionLabelValue(o),withText:!0,class:"ck-resize-image-button"}),a.bind("label").to(r,"value",(e=>e&&e.width?e.width:this._getOptionLabelValue(o))),s.bind("isEnabled").to(this),(0,k.Pm)(s,(()=>this._getResizeDropdownListItemDefinitions(e,r)),{ariaLabel:i("Image resize list")}),this.listenTo(s,"execute",(e=>{t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus()})),s};t.ui.componentFactory.add("resizeImage",n),t.ui.componentFactory.add("imageResize",n)}_getOptionLabelValue(e,t=!1){const i=this.editor.t;return e.label?e.label:t?e.value?i("Resize image to %0",e.value+this._resizeUnit):i("Resize image to the original size"):e.value?e.value+this._resizeUnit:i("Original")}_getResizeDropdownListItemDefinitions(e,t){const i=new l.FE;return e.map((e=>{const o=e.value?e.value+this._resizeUnit:null,n={type:"button",model:new k.Hn({commandName:"resizeImage",commandValue:o,label:this._getOptionLabelValue(e),withText:!0,icon:null})};n.model.bind("isOn").to(t,"value",Ne(o)),i.add(n)})),i}}function Ne(e){return t=>null===e&&t===e||null!==t&&t.width===e}const De=/(image|image-inline)/,Le="image_resized";class Fe extends o.Sy{static get requires(){return[c.WR]}static get pluginName(){return"ImageResizeHandles"}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view;t.addObserver(D),this.listenTo(t.document,"imageLoaded",((i,o)=>{if(!o.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const n=e.editing.view.domConverter,r=n.domToView(o.target).findAncestor({classes:De});let s=this.editor.plugins.get(c.WR).getResizerByViewElement(r);if(s)return void s.redraw();const a=e.editing.mapper,l=a.toModelElement(r);s=e.plugins.get(c.WR).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:l,viewElement:r,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:()=>n.mapViewToDom(a.toViewElement(l.parent)),isCentered(){const e=l.getAttribute("imageStyle");return!e||"block"==e||"alignCenter"==e},onCommit(i){t.change((e=>{e.removeClass(Le,r)})),e.execute("resizeImage",{width:i})}}),s.on("updateSize",(()=>{r.hasClass(Le)||t.change((e=>{e.addClass(Le,r)}))})),s.bind("isEnabled").to(this)}))}}var He=i(2400),We={attributes:{"data-cke":!0}};We.setAttributes=T(),We.insert=A().bind(null,"head"),We.domAPI=C(),We.insertStyleElement=P(),v()(He.Z,We),He.Z&&He.Z.locals&&He.Z.locals;class Ze extends o.Sy{static get requires(){return[Be,Fe,ze]}static get pluginName(){return"ImageResize"}}class Ue extends o.mY{constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map((e=>{if(e.isDefault)for(const t of e.modelElements)this._defaultStyles[t]=e.name;return[e.name,e]})))}refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?e.hasAttribute("imageStyle")?this.value=e.getAttribute("imageStyle"):this.value=this._defaultStyles[e.name]:this.value=!1}execute(e={}){const t=this.editor,i=t.model,o=t.plugins.get("ImageUtils");i.change((t=>{const n=e.value;let r=o.getClosestSelectedImageElement(i.document.selection);n&&this.shouldConvertImageType(n,r)&&(this.editor.execute(o.isBlockImage(r)?"imageTypeInline":"imageTypeBlock"),r=o.getClosestSelectedImageElement(i.document.selection)),!n||this._styles.get(n).isDefault?t.removeAttribute("imageStyle",r):t.setAttribute("imageStyle",n,r)}))}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const{objectFullWidth:je,objectInline:$e,objectLeft:qe,objectRight:Ke,objectCenter:Ge,objectBlockLeft:Je,objectBlockRight:Ye}=o.icons,Qe={get inline(){return{name:"inline",title:"In line",icon:$e,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:qe,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:Je,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:Ge,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:Ke,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:Ye,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:Ge,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:Ke,modelElements:["imageBlock"],className:"image-style-side"}}},Xe={full:je,left:Je,right:Ye,center:Ge,inlineLeft:qe,inlineRight:Ke,inline:$e},et=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function tt(e){(0,l.KE)("image-style-configuration-definition-invalid",e)}const it={normalizeStyles:function(e){return(e.configuredStyles.options||[]).map((e=>{return"string"==typeof(t="string"==typeof(t=e)?Qe[t]?{...Qe[t]}:{name:t}:function(e,t){const i={...t};for(const o in e)Object.prototype.hasOwnProperty.call(t,o)||(i[o]=e[o]);return i}(Qe[t.name],t)).icon&&(t.icon=Xe[t.icon]||t.icon),t;var t})).filter((t=>function(e,{isBlockPluginLoaded:t,isInlinePluginLoaded:i}){const{modelElements:o,name:n}=e;if(!(o&&o.length&&n))return tt({style:e}),!1;{const n=[t?"imageBlock":null,i?"imageInline":null];if(!o.some((e=>n.includes(e))))return(0,l.KE)("image-style-missing-dependency",{style:e,missingPlugins:o.map((e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(t,e)))},getDefaultStylesConfiguration:function(e,t){return e&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:e?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(e){return e.has("ImageBlockEditing")&&e.has("ImageInlineEditing")?[...et]:[]},warnInvalidStyle:tt,DEFAULT_OPTIONS:Qe,DEFAULT_ICONS:Xe,DEFAULT_DROPDOWN_DEFINITIONS:et};function ot(e,t){for(const i of t)if(i.name===e)return i}class nt extends o.Sy{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[m]}init(){const{normalizeStyles:e,getDefaultStylesConfiguration:t}=it,i=this.editor,o=i.plugins.has("ImageBlockEditing"),n=i.plugins.has("ImageInlineEditing");i.config.define("image.styles",t(o,n)),this.normalizedStyles=e({configuredStyles:i.config.get("image.styles"),isBlockPluginLoaded:o,isInlinePluginLoaded:n}),this._setupConversion(o,n),this._setupPostFixer(),i.commands.add("imageStyle",new Ue(i,this.normalizedStyles))}_setupConversion(e,t){const i=this.editor,o=i.model.schema,n=(r=this.normalizedStyles,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const o=ot(t.attributeNewValue,r),n=ot(t.attributeOldValue,r),s=i.mapper.toViewElement(t.item),a=i.writer;n&&a.removeClass(n.className,s),o&&a.addClass(o.className,s)});var r;const s=function(e){const t={imageInline:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageInline"))),imageBlock:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageBlock")))};return(e,i,o)=>{if(!i.modelRange)return;const n=i.viewItem,r=(0,l.Ps)(i.modelRange.getItems());if(r&&o.schema.checkAttribute(r,"imageStyle"))for(const e of t[r.name])o.consumable.consume(n,{classes:e.className})&&o.writer.setAttribute("imageStyle",e.name,r)}}(this.normalizedStyles);i.editing.downcastDispatcher.on("attribute:imageStyle",n),i.data.downcastDispatcher.on("attribute:imageStyle",n),e&&(o.extend("imageBlock",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),t&&(o.extend("imageInline",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,i=e.plugins.get(m),o=new Map(this.normalizedStyles.map((e=>[e.name,e])));t.registerPostFixer((e=>{let n=!1;for(const r of t.differ.getChanges())if("insert"==r.type||"attribute"==r.type&&"imageStyle"==r.attributeKey){let t="insert"==r.type?r.position.nodeAfter:r.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!i.isImage(t))continue;const s=t.getAttribute("imageStyle");if(!s)continue;const a=o.get(s);a&&a.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),n=!0)}return n}))}}var rt=i(7226),st=i(9203),at=i(3534),lt={attributes:{"data-cke":!0}};lt.setAttributes=T(),lt.insert=A().bind(null,"head"),lt.domAPI=C(),lt.insertStyleElement=P(),v()(at.Z,lt),at.Z&&at.Z.locals&&at.Z.locals;class ct extends o.Sy{static get requires(){return[nt]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],i=dt(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const e of i)this._createButton(e);const o=dt([...t.filter(rt.Z),...it.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const e of o)this._createDropdown(e,i)}_createDropdown(e,t){const i=this.editor.ui.componentFactory;i.add(e.name,(o=>{let n;const{defaultItem:r,items:s,title:a}=e,l=s.filter((e=>t.find((({name:t})=>ut(t)===e)))).map((e=>{const t=i.create(e);return e===r&&(n=t),t}));s.length!==l.length&&it.warnInvalidStyle({dropdown:e});const c=(0,k.t9)(o,k.Rm),d=c.buttonView,u=d.arrowView;return(0,k.up)(c,l,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:ht(a,n.label),class:null,tooltip:!0}),u.unbind("label"),u.set({label:a}),d.bind("icon").toMany(l,"isOn",((...e)=>{const t=e.findIndex(st.Z);return t<0?n.icon:l[t].icon})),d.bind("label").toMany(l,"isOn",((...e)=>{const t=e.findIndex(st.Z);return ht(a,t<0?n.label:l[t].label)})),d.bind("isOn").toMany(l,"isOn",((...e)=>e.some(st.Z))),d.bind("class").toMany(l,"isOn",((...e)=>e.some(st.Z)?"ck-splitbutton_flatten":void 0)),d.on("execute",(()=>{l.some((({isOn:e})=>e))?c.isOpen=!c.isOpen:n.fire("execute")})),c.bind("isEnabled").toMany(l,"isEnabled",((...e)=>e.some(st.Z))),this.listenTo(c,"execute",(()=>{this.editor.editing.view.focus()})),c}))}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(ut(t),(i=>{const o=this.editor.commands.get("imageStyle"),n=new k.r5(i);return n.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),n.bind("isEnabled").to(o,"isEnabled"),n.bind("isOn").to(o,"value",(e=>e===t)),n.on("execute",this._executeCommand.bind(this,t)),n}))}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function dt(e,t){for(const i of e)t[i.title]&&(i.title=t[i.title]);return e}function ut(e){return`imageStyle:${e}`}function ht(e,t){return(e?e+": ":"")+t}class mt extends o.Sy{static get requires(){return[nt,ct]}static get pluginName(){return"ImageStyle"}}class gt extends o.Sy{static get requires(){return[c.e8,m]}static get pluginName(){return"ImageToolbar"}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(c.e8),o=e.plugins.get("ImageUtils");var n;i.register("image",{ariaLabel:t("Image toolbar"),items:(n=e.config.get("image.toolbar")||[],n.map((e=>(0,rt.Z)(e)?e.name:e))),getRelatedElement:e=>o.getClosestSelectedImageWidget(e)})}}class pt extends o.Sy{static get requires(){return[H,m]}static get pluginName(){return"PictureEditing"}afterInit(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:["sources"]}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:["sources"]}),this._setupConversion(),this._setupImageUploadEditingIntegration()}_setupConversion(){const e=this.editor,t=e.conversion,i=e.plugins.get("ImageUtils");t.for("upcast").add(function(e){const t=["srcset","media","type","sizes"],i=(i,o,n)=>{const r=o.viewItem;if(!n.consumable.test(r,{name:!0}))return;const s=new Map;for(const e of r.getChildren())if(e.is("element","source")){const i={};for(const o of t)e.hasAttribute(o)&&n.consumable.test(e,{attributes:o})&&(i[o]=e.getAttribute(o));Object.keys(i).length&&s.set(e,i)}const a=e.findViewImgElement(r);if(!a)return;let c=o.modelCursor.parent;if(!c.is("element","imageBlock")){const e=n.convertItem(a,o.modelCursor);o.modelRange=e.modelRange,o.modelCursor=e.modelCursor,c=(0,l.Ps)(e.modelRange.getItems())}n.consumable.consume(r,{name:!0});for(const[e,t]of s)n.consumable.consume(e,{attributes:Object.keys(t)});s.size&&n.writer.setAttribute("sources",Array.from(s.values()),c),n.convertChildren(r,c)};return e=>{e.on("element:picture",i)}}(i)),t.for("downcast").add(function(e){const t=(t,i,o)=>{if(!o.consumable.consume(i.item,t.name))return;const n=o.writer,r=o.mapper.toViewElement(i.item),s=e.findViewImgElement(r),a=i.attributeNewValue;if(a&&a.length){const e=n.createContainerElement("picture",null,a.map((e=>n.createEmptyElement("source",e)))),t=[];let i=s.parent;for(;i&&i.is("attributeElement");){const e=i.parent;n.unwrap(n.createRangeOn(s),i),t.unshift(i),i=e}n.insert(n.createPositionBefore(s),e),n.move(n.createRangeOn(s),n.createPositionAt(e,"end"));for(const i of t)n.wrap(n.createRangeOn(e),i)}else if(s.parent.is("element","picture")){const e=s.parent;n.move(n.createRangeOn(s),n.createPositionBefore(e)),n.remove(e)}};return e=>{e.on("attribute:sources:imageBlock",t),e.on("attribute:sources:imageInline",t)}}(i))}_setupImageUploadEditingIntegration(){const e=this.editor;if(!e.plugins.has("ImageUploadEditing"))return;const t=e.plugins.get("ImageUploadEditing");this.listenTo(t,"uploadComplete",((t,{imageElement:i,data:o})=>{const n=o.sources;n&&e.model.change((e=>{e.setAttributes({sources:n},i)}))}))}}},3531:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Indent:()=>c,IndentBlock:()=>f,IndentEditing:()=>n,IndentUI:()=>l});var o=i(6854);class n extends o.Sy{static get pluginName(){return"IndentEditing"}init(){const e=this.editor;e.commands.add("indent",new o.AJ(e)),e.commands.add("outdent",new o.AJ(e))}}var r=i(7095);const s='',a='';class l extends o.Sy{static get pluginName(){return"IndentUI"}init(){const e=this.editor,t=e.locale,i=e.t,o="ltr"==t.uiLanguageDirection?s:a,n="ltr"==t.uiLanguageDirection?a:s;this._defineButton("indent",i("Increase indent"),o),this._defineButton("outdent",i("Decrease indent"),n)}_defineButton(e,t,i){const o=this.editor;o.ui.componentFactory.add(e,(n=>{const s=o.commands.get(e),a=new r.r5(n);return a.set({label:t,icon:i,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",(()=>{o.execute(e),o.editing.view.focus()})),a}))}}class c extends o.Sy{static get pluginName(){return"Indent"}static get requires(){return[n,l]}}var d=i(3291),u=i(6553);class h extends o.mY{constructor(e,t){super(e),this._indentBehavior=t}refresh(){const e=this.editor.model,t=(0,u.Ps)(e.document.selection.getSelectedBlocks());t&&e.schema.checkAttribute(t,"blockIndent")?this.isEnabled=this._indentBehavior.checkEnabled(t.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const e=this.editor.model,t=function(e){const t=e.document.selection,i=e.schema;return Array.from(t.getSelectedBlocks()).filter((e=>i.checkAttribute(e,"blockIndent")))}(e);e.change((e=>{for(const i of t){const t=i.getAttribute("blockIndent"),o=this._indentBehavior.getNextIndent(t);o?e.setAttribute("blockIndent",o,i):e.removeAttribute("blockIndent",i)}}))}}class m{constructor(e){this.isForward="forward"===e.direction,this.offset=e.offset,this.unit=e.unit}checkEnabled(e){const t=parseFloat(e||"0");return this.isForward||t>0}getNextIndent(e){const t=parseFloat(e||"0");if(e&&!e.endsWith(this.unit))return this.isForward?this.offset+this.unit:void 0;const i=t+(this.isForward?this.offset:-this.offset);return i>0?i+this.unit:void 0}}class g{constructor(e){this.isForward="forward"===e.direction,this.classes=e.classes}checkEnabled(e){const t=this.classes.indexOf(e);return this.isForward?t=0}getNextIndent(e){const t=this.classes.indexOf(e),i=this.isForward?1:-1;return this.classes[t+i]}}const p=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class f extends o.Sy{constructor(e){super(e),e.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}init(){const e=this.editor,t=e.config.get("indentBlock");t.classes&&t.classes.length?(this._setupConversionUsingClasses(t.classes),e.commands.add("indentBlock",new h(e,new g({direction:"forward",classes:t.classes}))),e.commands.add("outdentBlock",new h(e,new g({direction:"backward",classes:t.classes})))):(e.data.addStyleProcessorRules(d.vt),this._setupConversionUsingOffset(),e.commands.add("indentBlock",new h(e,new m({direction:"forward",offset:t.offset,unit:t.unit}))),e.commands.add("outdentBlock",new h(e,new m({direction:"backward",offset:t.offset,unit:t.unit}))))}afterInit(){const e=this.editor,t=e.model.schema,i=e.commands.get("indent"),o=e.commands.get("outdent"),n=e.config.get("heading.options");(n&&n.map((e=>e.model))||p).forEach((e=>{t.isRegistered(e)&&t.extend(e,{allowAttributes:"blockIndent"})})),t.setAttributeProperties("blockIndent",{isFormatting:!0}),i.registerChildCommand(e.commands.get("indentBlock")),o.registerChildCommand(e.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const e=this.editor.conversion,t="rtl"===this.editor.locale.contentLanguageDirection?"margin-right":"margin-left";e.for("upcast").attributeToAttribute({view:{styles:{[t]:/[\s\S]+/}},model:{key:"blockIndent",value:e=>e.getStyle(t)}}),e.for("downcast").attributeToAttribute({model:"blockIndent",view:e=>({key:"style",value:{[t]:e}})})}_setupConversionUsingClasses(e){const t={model:{key:"blockIndent",values:[]},view:{}};for(const i of e)t.model.values.push(i),t.view[i]={key:"class",value:[i]};this.editor.conversion.attributeToAttribute(t)}}},9920:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AutoLink:()=>ke,Link:()=>ve,LinkCommand:()=>D,LinkEditing:()=>ie,LinkImage:()=>Se,LinkImageEditing:()=>ye,LinkImageUI:()=>Ae,LinkUI:()=>fe,UnlinkCommand:()=>F});var o=i(6854),n=i(3291),r=i(5187),s=i(7197),a=i(6553);class l{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach((e=>this._definitions.add(e))):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",((e,t,i)=>{if(!i.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!i.schema.isInline(t.item))return;const o=i.writer,n=o.document.selection;for(const e of this._definitions){const r=o.createAttributeElement("a",e.attributes,{priority:5});e.classes&&o.addClass(e.classes,r);for(const t in e.styles)o.setStyle(t,e.styles[t],r);o.setCustomProperty("link",!0,r),e.callback(t.attributeNewValue)?t.item.is("selection")?o.wrap(n.getFirstRange(),r):o.wrap(i.mapper.toViewRange(t.range),r):o.unwrap(i.mapper.toViewRange(t.range),r)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",((e,t,{writer:i,mapper:o})=>{const n=o.toViewElement(t.item),r=Array.from(n.getChildren()).find((e=>e.is("element","a")));for(const e of this._definitions){const o=(0,a.qL)(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of o)"class"===e?i.addClass(t,r):i.setAttribute(e,t,r);e.classes&&i.addClass(e.classes,r);for(const t in e.styles)i.setStyle(t,e.styles[t],r)}else{for(const[e,t]of o)"class"===e?i.removeClass(t,r):i.removeAttribute(e,r);e.classes&&i.removeClass(e.classes,r);for(const t in e.styles)i.removeStyle(t,r)}}}))}}}var c=i(7855);var d=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const u=function(e){return d.test(e)};var h="\\ud800-\\udfff",m="["+h+"]",g="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",p="\\ud83c[\\udffb-\\udfff]",f="[^"+h+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",w="[\\ud800-\\udbff][\\udc00-\\udfff]",k="(?:"+g+"|"+p+")?",_="[\\ufe0e\\ufe0f]?",v=_+k+"(?:\\u200d(?:"+[f,b,w].join("|")+")"+_+k+")*",y="(?:"+[f+g+"?",g,b,w,m].join("|")+")",C=RegExp(p+"(?="+p+")|"+y+v,"g");const x=function(e){return u(e)?function(e){return e.match(C)||[]}(e):function(e){return e.split("")}(e)};var A=i(9939);const E=function(e){e=(0,A.Z)(e);var t,i,o,n,r=u(e)?x(e):void 0,s=r?r[0]:e.charAt(0),a=r?(t=r,i=1,n=t.length,o=void 0===o?n:o,!i&&o>=n?t:(0,c.Z)(t,i,o)).join(""):e.slice(1);return s.toUpperCase()+a},T=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,S=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,P=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,I=/^((\w+:(\/{2,})?)|(\W))/i,V="Ctrl+K";function R(e,{writer:t}){const i=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,i),i}function O(e){const t=String(e);return function(e){return!!e.replace(T,"").match(S)}(t)?t:"#"}function B(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function M(e,t){const i=(o=e,P.test(o)?"mailto:":t);var o;const n=!!i&&!z(e);return e&&n?i+e:e}function z(e){return I.test(e)}function N(e){window.open(e,"_blank","noopener")}class D extends o.mY{constructor(){super(...arguments),this.manualDecorators=new a.FE,this.automaticDecorators=new l}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement()||(0,a.Ps)(t.getSelectedBlocks());B(i,e.schema)?(this.value=i.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(i,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,t={}){const i=this.editor.model,o=i.document.selection,n=[],s=[];for(const e in t)t[e]?n.push(e):s.push(e);i.change((t=>{if(o.isCollapsed){const l=o.getFirstPosition();if(o.hasAttribute("linkHref")){const a=L(o);let c=(0,r.VD)(l,"linkHref",o.getAttribute("linkHref"),i);o.getAttribute("linkHref")===a&&(c=this._updateLinkContent(i,t,c,e)),t.setAttribute("linkHref",e,c),n.forEach((e=>{t.setAttribute(e,!0,c)})),s.forEach((e=>{t.removeAttribute(e,c)})),t.setSelection(t.createPositionAfter(c.end.nodeBefore))}else if(""!==e){const r=(0,a.qL)(o.getAttributes());r.set("linkHref",e),n.forEach((e=>{r.set(e,!0)}));const{end:s}=i.insertContent(t.createText(e,r),l);t.setSelection(s)}["linkHref",...n,...s].forEach((e=>{t.removeSelectionAttribute(e)}))}else{const r=i.schema.getValidRanges(o.getRanges(),"linkHref"),a=[];for(const e of o.getSelectedBlocks())i.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const l=a.slice();for(const e of r)this._isRangeToUpdate(e,a)&&l.push(e);for(const r of l){let a=r;if(1===l.length){const n=L(o);o.getAttribute("linkHref")===n&&(a=this._updateLinkContent(i,t,r,e),t.setSelection(t.createSelection(a)))}t.setAttribute("linkHref",e,a),n.forEach((e=>{t.setAttribute(e,!0,a)})),s.forEach((e=>{t.removeAttribute(e,a)}))}}}))}_getDecoratorStateFromModel(e){const t=this.editor.model,i=t.document.selection,o=i.getSelectedElement();return B(o,t.schema)?o.getAttribute(e):i.getAttribute(e)}_isRangeToUpdate(e,t){for(const i of t)if(i.containsRange(e))return!1;return!0}_updateLinkContent(e,t,i,o){const n=t.createText(o,{linkHref:o});return e.insertContent(n,i)}}function L(e){if(e.isCollapsed){const t=e.getFirstPosition();return t.textNode&&t.textNode.data}{const t=Array.from(e.getFirstRange().getItems());if(t.length>1)return null;const i=t[0];return i.is("$text")||i.is("$textProxy")?i.data:null}}class F extends o.mY{refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement();B(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,i=t.document.selection,o=e.commands.get("link");t.change((e=>{const n=i.isCollapsed?[(0,r.VD)(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),t)]:t.schema.getValidRanges(i.getRanges(),"linkHref");for(const t of n)if(e.removeAttribute("linkHref",t),o)for(const i of o.manualDecorators)e.removeAttribute(i.id,t)}))}}class H extends((0,a.Re)()){constructor({id:e,label:t,attributes:i,classes:o,styles:n,defaultValue:r}){super(),this.id=e,this.set("value",void 0),this.defaultValue=r,this.label=t,this.attributes=i,this.classes=o,this.styles=n}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var W=i(3379),Z=i.n(W),U=i(9037),j=i.n(U),$=i(569),q=i.n($),K=i(8575),G=i.n(K),J=i(9216),Y=i.n(J),Q=i(3925),X={attributes:{"data-cke":!0}};X.setAttributes=G(),X.insert=q().bind(null,"head"),X.domAPI=j(),X.insertStyleElement=Y(),Z()(Q.Z,X),Q.Z&&Q.Z.locals&&Q.Z.locals;const ee="automatic",te=/^(https?:)?\/\//;class ie extends o.Sy{static get pluginName(){return"LinkEditing"}static get requires(){return[r.mh,r.II,s._l]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:R}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>R(O(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new D(e)),e.commands.add("unlink",new F(e));const t=function(e,t){const i={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach((e=>("label"in e&&i[e.label]&&(e.label=i[e.label]),e))),t}(e.t,function(e){const t=[];if(e)for(const[i,o]of Object.entries(e)){const e=Object.assign({},o,{id:`link${E(i)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter((e=>e.mode===ee))),this._enableManualDecorators(t.filter((e=>"manual"===e.mode))),e.plugins.get(r.mh).registerAttribute("linkHref"),(0,r.Im)(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink(),this._enableClipboardIntegration()}_enableAutomaticDecorators(e){const t=this.editor,i=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&i.add({id:"linkIsExternal",mode:ee,callback:e=>!!e&&te.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),i.add(e),i.length&&t.conversion.for("downcast").add(i.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,i=t.commands.get("link").manualDecorators;e.forEach((e=>{t.model.schema.extend("$text",{allowAttributes:e.id});const o=new H(e);i.add(o),t.conversion.for("downcast").attributeToElement({model:o.id,view:(e,{writer:t,schema:i},{item:n})=>{if((n.is("selection")||i.isInline(n))&&e){const e=t.createAttributeElement("a",o.attributes,{priority:5});o.classes&&t.addClass(o.classes,e);for(const i in o.styles)t.setStyle(i,o.styles[i],e);return t.setCustomProperty("link",!0,e),e}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...o._createPattern()},model:{key:o.id}})}))}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((e,t)=>{if(!(a.OB.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let i=t.domTarget;if("a"!=i.tagName.toLowerCase()&&(i=i.closest("a")),!i)return;const o=i.getAttribute("href");o&&(e.stop(),t.preventDefault(),N(o))}),{context:"$capture"}),this.listenTo(t,"keydown",((t,i)=>{const o=e.commands.get("link").value;o&&i.keyCode===a.Do.enter&&i.altKey&&(t.stop(),N(o))}))}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(e,"insertContent",(()=>{const i=t.anchor.nodeBefore,o=t.anchor.nodeAfter;t.hasAttribute("linkHref")&&i&&i.hasAttribute("linkHref")&&(o&&o.hasAttribute("linkHref")||e.change((t=>{oe(t,re(e.schema))})))}),{priority:"low"})}_enableClickingAfterLink(){const e=this.editor,t=e.model;e.editing.view.addObserver(n.dM);let i=!1;this.listenTo(e.editing.view.document,"mousedown",(()=>{i=!0})),this.listenTo(e.editing.view.document,"selectionChange",(()=>{if(!i)return;i=!1;const e=t.document.selection;if(!e.isCollapsed)return;if(!e.hasAttribute("linkHref"))return;const o=e.getFirstPosition(),n=(0,r.VD)(o,"linkHref",e.getAttribute("linkHref"),t);(o.isTouching(n.start)||o.isTouching(n.end))&&t.change((e=>{oe(e,re(t.schema))}))}))}_enableTypingOverLink(){const e=this.editor,t=e.editing.view;let i=null,o=!1;this.listenTo(t.document,"delete",(()=>{o=!0}),{priority:"high"}),this.listenTo(e.model,"deleteContent",(()=>{const t=e.model.document.selection;t.isCollapsed||(o?o=!1:ne(e)&&function(e){const t=e.document.selection,i=t.getFirstPosition(),o=t.getLastPosition(),n=i.nodeAfter;if(!n)return!1;if(!n.is("$text"))return!1;if(!n.hasAttribute("linkHref"))return!1;return n===(o.textNode||o.nodeBefore)||(0,r.VD)(i,"linkHref",n.getAttribute("linkHref"),e).containsRange(e.createRange(i,o),!0)}(e.model)&&(i=t.getAttributes()))}),{priority:"high"}),this.listenTo(e.model,"insertContent",((t,[n])=>{o=!1,ne(e)&&i&&(e.model.change((e=>{for(const[t,o]of i)e.setAttribute(t,o,n)})),i=null)}),{priority:"high"})}_handleDeleteContentAfterLink(){const e=this.editor,t=e.model,i=t.document.selection,o=e.editing.view;let n=!1,s=!1;this.listenTo(o.document,"delete",((e,t)=>{s="backward"===t.direction}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{n=!1;const e=i.getFirstPosition(),o=i.getAttribute("linkHref");if(!o)return;const s=(0,r.VD)(e,"linkHref",o,t);n=s.containsPosition(e)||s.end.isEqual(e)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{s&&(s=!1,n||e.model.enqueueChange((e=>{oe(e,re(t.schema))})))}),{priority:"low"})}_enableClipboardIntegration(){const e=this.editor,t=e.model,i=this.editor.config.get("link.defaultProtocol");i&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",((e,o)=>{t.change((e=>{const t=e.createRangeIn(o.content);for(const o of t.getItems())if(o.hasAttribute("linkHref")){const t=M(o.getAttribute("linkHref"),i);e.setAttribute("linkHref",t,o)}}))}))}}function oe(e,t){e.removeSelectionAttribute("linkHref");for(const i of t)e.removeSelectionAttribute(i)}function ne(e){return e.model.change((e=>e.batch)).isTyping}function re(e){return e.getDefinition("$text").allowAttributes.filter((e=>e.startsWith("link")))}var se=i(7095),ae=i(5549),le=(i(2151),i(4874)),ce={attributes:{"data-cke":!0}};ce.setAttributes=G(),ce.insert=q().bind(null,"head"),ce.domAPI=j(),ce.insertStyleElement=Y(),Z()(le.Z,ce),le.Z&&le.Z.locals&&le.Z.locals;class de extends se.G7{constructor(e,t){super(e),this.focusTracker=new a.Rh,this.keystrokes=new a.VD,this._focusables=new se.vX;const i=e.t;this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(i("Save"),o.icons.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(i("Cancel"),o.icons.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusCycler=new se.I0({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const n=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&n.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:n,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((e,t)=>(e[t.name]=t.isOn,e)),{})}render(){super.render(),(0,se.GI)({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new se.KP(this.locale,se.R);return t.label=e("Link URL"),t}_createButton(e,t,i,o){const n=new se.r5(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.extendTemplate({attributes:{class:i}}),o&&n.delegate("execute").to(this,o),n}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const i of e.manualDecorators){const o=new se.BM(this.locale);o.set({name:i.id,label:i.label,withText:!0}),o.bind("isOn").toMany([i,e],"value",((e,t)=>void 0===t&&void 0===e?!!i.defaultValue:!!e)),o.on("execute",(()=>{i.set("value",!o.isOn)})),t.add(o)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new se.G7;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}var ue=i(7536),he={attributes:{"data-cke":!0}};he.setAttributes=G(),he.insert=q().bind(null,"head"),he.domAPI=j(),he.insertStyleElement=Y(),Z()(ue.Z,he),ue.Z&&ue.Z.locals&&ue.Z.locals;class me extends se.G7{constructor(e){super(e),this.focusTracker=new a.Rh,this.keystrokes=new a.VD,this._focusables=new se.vX;const t=e.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'',"unlink"),this.editButtonView=this._createButton(t("Edit link"),o.icons.pencil,"edit"),this.set("href",void 0),this._focusCycler=new se.I0({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,i){const o=new se.r5(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.delegate("execute").to(this,i),o}_createPreviewButton(){const e=new se.r5(this.locale),t=this.bindTemplate,i=this.t;return e.set({withText:!0,tooltip:i("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(e=>e&&O(e))),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(e=>e||i("This link has no URL"))),e.bind("isEnabled").to(this,"href",(e=>!!e)),e.template.tag="a",e.template.eventListeners={},e}}const ge='',pe="link-ui";class fe extends o.Sy{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[se.WB]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(n.KU),this._balloon=e.plugins.get(se.WB),this._createToolbarLinkButton(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:pe,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:pe,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new me(e.locale),i=e.commands.get("link"),o=e.commands.get("unlink");return t.bind("href").to(i,"value"),t.editButtonView.bind("isEnabled").to(i),t.unlinkButtonView.bind("isEnabled").to(o),this.listenTo(t,"edit",(()=>{this._addFormView()})),this.listenTo(t,"unlink",(()=>{e.execute("unlink"),this._hideUI()})),t.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),t.keystrokes.set(V,((e,t)=>{this._addFormView(),t()})),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),i=e.config.get("link.defaultProtocol"),o=new((0,se.RX)(de))(e.locale,t);return o.urlInputView.fieldView.bind("value").to(t,"value"),o.urlInputView.bind("isEnabled").to(t,"isEnabled"),o.saveButtonView.bind("isEnabled").to(t),this.listenTo(o,"submit",(()=>{const{value:t}=o.urlInputView.fieldView.element,n=M(t,i);e.execute("link",n,o.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(o,"cancel",(()=>{this._closeFormView()})),o.keystrokes.set("Esc",((e,t)=>{this._closeFormView(),t()})),o}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),i=e.t;e.ui.componentFactory.add("link",(e=>{const o=new se.r5(e);return o.isEnabled=!0,o.label=i("Link"),o.icon=ge,o.keystroke=V,o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(t,"isEnabled"),o.bind("isOn").to(t,"value",(e=>!!e)),this.listenTo(o,"execute",(()=>this._showUI(!0))),o}))}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),e.keystrokes.set(V,((t,i)=>{i(),e.commands.get("link").isEnabled&&this._showUI(!0)}))}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",((e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((e,t)=>{this._isUIVisible&&(this._hideUI(),t())})),(0,se.eC)({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this.actionsView||this._createViews(),this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedLinkElement(),o=r();const n=()=>{const e=this._getSelectedLinkElement(),t=r();i&&!e||!i&&t!==o?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=e,o=t};function r(){return t.selection.focus.getAncestors().reverse().find((e=>e.is("element")))}this.listenTo(e.ui,"update",n),this.listenTo(this._balloon,"change:visibleView",n)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _areActionsInPanel(){return!!this.actionsView&&this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return!!this.actionsView&&this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return!!this.formView&&e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,i=e.document;let o;if(t.markers.has(pe)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(pe)),i=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));o=e.domConverter.viewRangeToDom(i)}else o=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(i.selection.getFirstRange())};return{target:o}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,i=t.getSelectedElement();if(t.isCollapsed||i&&(0,ae.Qd)(i))return be(t.getFirstPosition());{const i=t.getFirstRange().getTrimmed(),o=be(i.start),n=be(i.end);return o&&o==n&&e.createRangeIn(o).getTrimmed().isEqual(i)?o:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(pe))t.updateMarker(pe,{range:i});else if(i.start.isAtEnd){const o=i.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:i});t.addMarker(pe,{usingOperation:!1,affectsData:!1,range:t.createRange(o,i.end)})}else t.addMarker(pe,{usingOperation:!1,affectsData:!1,range:i})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(pe)&&e.change((e=>{e.removeMarker(pe)}))}}function be(e){return e.getAncestors().find((e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))||null}const we=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class ke extends o.Sy{static get requires(){return[r.HG]}static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const e=this.editor,t=new r.uL(e.model,(e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=_e(e.substr(0,e.length-1));return t?{url:t}:void 0}));t.on("matched:data",((t,i)=>{const{batch:o,range:n,url:r}=i;if(!o.isTyping)return;const s=n.end.getShiftedBy(-1),a=s.getShiftedBy(-r.length),l=e.model.createRange(a,s);this._applyAutoLink(r,l)})),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("enter");i&&i.on("execute",(()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const i=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(i)}))}_enableShiftEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("shiftEnter");i&&i.on("execute",(()=>{const e=t.document.selection.getFirstPosition(),i=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(i)}))}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:i,range:o}=(0,r.Up)(e,t),n=_e(i);if(n){const e=t.createRange(o.end.getShiftedBy(-n.length),o.end);this._applyAutoLink(n,e)}}_applyAutoLink(e,t){const i=this.editor.model,o=M(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,i)&&z(o)&&!function(e){const t=e.start.nodeAfter;return!!t&&t.hasAttribute("linkHref")}(t)&&this._persistAutoLink(o,t)}_persistAutoLink(e,t){const i=this.editor.model,o=this.editor.plugins.get("Delete");i.enqueueChange((n=>{n.setAttribute("linkHref",e,t),i.enqueueChange((()=>{o.requestUndoOnBackspace()}))}))}}function _e(e){const t=we.exec(e);return t?t[2]:null}class ve extends o.Sy{static get requires(){return[ie,fe,ke]}static get pluginName(){return"Link"}}class ye extends o.Sy{static get requires(){return["ImageEditing","ImageUtils",ie]}static get pluginName(){return"LinkImageEditing"}init(){const e=this.editor,t=e.model.schema;e.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["linkHref"]}),e.conversion.for("upcast").add(function(e){const t=e.plugins.has("ImageInlineEditing"),i=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,o,n)=>{const r=o.viewItem,s=i.findViewImgElement(r);if(!s)return;const a=s.findAncestor((e=>i.isBlockImageView(e)));if(t&&!a)return;if(!n.consumable.consume(r,{attributes:["href"]}))return;const l=r.getAttribute("href");if(!l)return;let c=o.modelCursor.parent;if(!c.is("element","imageBlock")){const e=n.convertItem(s,o.modelCursor);o.modelRange=e.modelRange,o.modelCursor=e.modelCursor,c=o.modelCursor.nodeBefore}c&&c.is("element","imageBlock")&&n.writer.setAttribute("linkHref",l,c)}),{priority:"high"})}}(e)),e.conversion.for("downcast").add(function(e){const t=e.plugins.get("ImageUtils");return e=>{e.on("attribute:linkHref:imageBlock",((e,i,o)=>{if(!o.consumable.consume(i.item,e.name))return;const n=o.mapper.toViewElement(i.item),r=o.writer,s=Array.from(n.getChildren()).find((e=>e.is("element","a"))),a=t.findViewImgElement(n),l=a.parent.is("element","picture")?a.parent:a;if(s)i.attributeNewValue?r.setAttribute("href",i.attributeNewValue,s):(r.move(r.createRangeOn(l),r.createPositionAt(n,0)),r.remove(s));else{const e=r.createContainerElement("a",{href:i.attributeNewValue});r.insert(r.createPositionAt(n,0),e),r.move(r.createRangeOn(l),r.createPositionAt(e,0))}}),{priority:"high"})}}(e)),this._enableAutomaticDecorators(),this._enableManualDecorators()}_enableAutomaticDecorators(){const e=this.editor,t=e.commands.get("link").automaticDecorators;t.length&&e.conversion.for("downcast").add(t.getDispatcherForLinkedImage())}_enableManualDecorators(){const e=this.editor,t=e.commands.get("link");for(const i of t.manualDecorators)e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:i.id}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:i.id}),e.conversion.for("downcast").add(Ce(i)),e.conversion.for("upcast").add(xe(e,i))}}function Ce(e){return t=>{t.on(`attribute:${e.id}:imageBlock`,((t,i,o)=>{const n=o.mapper.toViewElement(i.item),r=Array.from(n.getChildren()).find((e=>e.is("element","a")));if(r){for(const[t,i]of(0,a.qL)(e.attributes))o.writer.setAttribute(t,i,r);e.classes&&o.writer.addClass(e.classes,r);for(const t in e.styles)o.writer.setStyle(t,e.styles[t],r)}}))}}function xe(e,t){const i=e.plugins.has("ImageInlineEditing"),o=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,r,s)=>{const a=r.viewItem,l=o.findViewImgElement(a);if(!l)return;const c=l.findAncestor((e=>o.isBlockImageView(e)));if(i&&!c)return;const d=new n.xO(t._createPattern()).match(a);if(!d)return;if(!s.consumable.consume(a,d.match))return;const u=r.modelCursor.nodeBefore||r.modelCursor.parent;s.writer.setAttribute(t.id,!0,u)}),{priority:"high"})}}class Ae extends o.Sy{static get requires(){return[ie,fe,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((t,i)=>{this._isSelectedLinkedImage(e.model.document.selection)&&(i.preventDefault(),t.stop())}),{priority:"high"}),this._createToolbarLinkImageButton()}_createToolbarLinkImageButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("linkImage",(i=>{const o=new se.r5(i),n=e.plugins.get("LinkUI"),r=e.commands.get("link");return o.set({isEnabled:!0,label:t("Link image"),icon:ge,keystroke:V,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(r,"isEnabled"),o.bind("isOn").to(r,"value",(e=>!!e)),this.listenTo(o,"execute",(()=>{this._isSelectedLinkedImage(e.model.document.selection)?n._addActionsView():n._showUI(!0)})),o}))}_isSelectedLinkedImage(e){const t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}}var Ee=i(4330),Te={attributes:{"data-cke":!0}};Te.setAttributes=G(),Te.insert=q().bind(null,"head"),Te.domAPI=j(),Te.insertStyleElement=Y(),Z()(Ee.Z,Te),Ee.Z&&Ee.Z.locals&&Ee.Z.locals;class Se extends o.Sy{static get requires(){return[ye,Ae]}static get pluginName(){return"LinkImage"}}},1640:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DocumentList:()=>Ae,DocumentListEditing:()=>se,DocumentListIndentCommand:()=>T,DocumentListProperties:()=>Qe,DocumentListPropertiesEditing:()=>Fe,DocumentListPropertiesUtils:()=>De,DocumentListUtils:()=>R,IndentCommand:()=>Xe,List:()=>kt,ListEditing:()=>bt,ListProperties:()=>It,ListPropertiesEditing:()=>xt,ListPropertiesUI:()=>Je,ListUI:()=>xe,ListUtils:()=>ot,TodoList:()=>Wt,TodoListEditing:()=>Dt,TodoListUI:()=>Lt});var o=i(6854),n=i(5187),r=i(1863),s=i(6553);class a{constructor(e,t){this._startElement=e,this._referenceIndent=e.getAttribute("listIndent"),this._isForward="forward"==t.direction,this._includeSelf=!!t.includeSelf,this._sameAttributes=(0,s.qo)(t.sameAttributes||[]),this._sameIndent=!!t.sameIndent,this._lowerIndent=!!t.lowerIndent,this._higherIndent=!!t.higherIndent}static first(e,t){const i=new this(e,t)[Symbol.iterator]();return(0,s.Ps)(i)}*[Symbol.iterator](){const e=[];for(const{node:t}of l(this._getStartNode(),this._isForward?"forward":"backward")){const i=t.getAttribute("listIndent");if(ithis._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){e.push(t);continue}}else{if(!this._sameIndent){if(this._higherIndent){e.length&&(yield*e,e.length=0);break}continue}if(this._sameAttributes.some((e=>t.getAttribute(e)!==this._startElement.getAttribute(e))))break}e.length&&(yield*e,e.length=0),yield t}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}function*l(e,t="forward"){const i="forward"==t;let o=null;for(;u(e);)yield{node:e,previous:o},o=e,e=i?e.nextSibling:e.previousSibling}class c{constructor(e){this._listHead=e}[Symbol.iterator](){return l(this._listHead,"forward")}}class d{static next(){return(0,s.hQ)()}}function u(e){return!!e&&e.is("element")&&e.hasAttribute("listItemId")}function h(e,t={}){return[...m(e,{...t,direction:"backward"}),...m(e,{...t,direction:"forward"})]}function m(e,t={}){const i="forward"==t.direction,o=Array.from(new a(e,{...t,includeSelf:i,sameIndent:!0,sameAttributes:"listItemId"}));return i?o:o.reverse()}function g(e){const t=new a(e,{sameIndent:!0,sameAttributes:"listType"}),i=new a(e,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward"});return[...Array.from(t).reverse(),...i]}function p(e){return!a.first(e,{sameIndent:!0,sameAttributes:"listItemId"})}function f(e){return!a.first(e,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function b(e,t={}){e=(0,s.qo)(e);const i=!1!==t.withNested,o=new Set;for(const t of e)for(const e of h(t,{higherIndent:i}))o.add(e);return x(o)}function w(e){e=(0,s.qo)(e);const t=new Set;for(const i of e)for(const e of g(i))t.add(e);return x(t)}function k(e,t){const i=m(e,{direction:"forward"}),o=d.next();for(const e of i)t.setAttribute("listItemId",o,e);return i}function _(e,t,i){const o={};for(const[e,i]of t.getAttributes())e.startsWith("list")&&(o[e]=i);const n=m(e,{direction:"forward"});for(const e of n)i.setAttributes(o,e);return n}function v(e,t,{expand:i,indentBy:o=1}={}){e=(0,s.qo)(e);const n=i?b(e):e;for(const e of n){const i=e.getAttribute("listIndent")+o;i<0?y(e,t):t.setAttribute("listIndent",i,e)}return n}function y(e,t){e=(0,s.qo)(e);for(const i of e)for(const e of i.getAttributeKeys())e.startsWith("list")&&t.removeAttribute(e,i);return e}function C(e){if(!e.length)return!1;const t=e[0].getAttribute("listItemId");return!!t&&!e.some((e=>e.getAttribute("listItemId")!=t))}function x(e){return Array.from(e).filter((e=>"$graveyard"!==e.root.rootName)).sort(((e,t)=>e.index-t.index))}function A(e){const t=e.document.selection.getSelectedElement();return t&&e.schema.isObject(t)&&e.schema.isBlock(t)?t:null}function E(e,t,i){return m(t,{direction:"forward"}).pop().index>e.index?_(e,t,i):[]}class T extends o.mY{constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=S(e.document.selection);e.change((e=>{const i=[];C(t)&&!p(t[0])?("forward"==this._direction&&i.push(...v(t,e)),i.push(...k(t[0],e))):"forward"==this._direction?i.push(...v(t,e,{expand:!0})):i.push(...function(e,t){const i=b(e=(0,s.qo)(e)),o=new Set,n=Math.min(...i.map((e=>e.getAttribute("listIndent")))),r=new Map;for(const e of i)r.set(e,a.first(e,{lowerIndent:!0}));for(const e of i){if(o.has(e))continue;o.add(e);const i=e.getAttribute("listIndent")-1;if(i<0)y(e,t);else{if(e.getAttribute("listIndent")==n){const i=E(e,r.get(e),t);for(const e of i)o.add(e);if(i.length)continue}t.setAttribute("listIndent",i,e)}}return x(o)}(t,e));for(const t of i){if(!t.hasAttribute("listType"))continue;const i=a.first(t,{sameIndent:!0});i&&e.setAttribute("listType",i.getAttribute("listType"),t)}this._fireAfterExecute(i)}))}_fireAfterExecute(e){this.fire("afterExecute",x(new Set(e)))}_checkEnabled(){let e=S(this.editor.model.document.selection),t=e[0];if(!t)return!1;if("backward"==this._direction)return!0;if(C(e)&&!p(e[0]))return!0;e=b(e),t=e[0];const i=a.first(t,{sameIndent:!0});return!!i&&i.getAttribute("listType")==t.getAttribute("listType")}}function S(e){const t=Array.from(e.getSelectedBlocks()),i=t.findIndex((e=>!u(e)));return-1!=i&&(t.length=i),t}class P extends o.mY{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.document,o=A(t),n=Array.from(i.selection.getSelectedBlocks()).filter((e=>t.schema.checkAttribute(e,"listType"))),r=void 0!==e.forceValue?!e.forceValue:this.value;t.change((e=>{if(r){const t=n[n.length-1],i=m(t,{direction:"forward"}),o=[];i.length>1&&o.push(...k(i[1],e)),o.push(...y(n,e)),o.push(...function(e,t){const i=[];let o=Number.POSITIVE_INFINITY;for(const{node:n}of l(e.nextSibling,"forward")){const e=n.getAttribute("listIndent");if(0==e)break;e{const{firstElement:r,lastElement:s}=this._getMergeSubjectElements(i,e),l=r.getAttribute("listIndent")||0,c=s.getAttribute("listIndent"),d=s.getAttribute("listItemId");if(l!=c){const e=(u=s,Array.from(new a(u,{direction:"forward",higherIndent:!0})));o.push(...v([s,...e],n,{indentBy:l-c,expand:l{const t=k(this._getStartBlock(),e);this._fireAfterExecute(t)}))}_fireAfterExecute(e){this.fire("afterExecute",x(new Set(e)))}_checkEnabled(){const e=this.editor.model.document.selection,t=this._getStartBlock();return e.isCollapsed&&u(t)&&!p(t)}_getStartBlock(){const e=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?e:e.nextSibling}}class R extends o.Sy{static get pluginName(){return"DocumentListUtils"}expandListBlocksToCompleteList(e){return w(e)}isFirstBlockOfListItem(e){return p(e)}isListItemBlock(e){return u(e)}}var O=i(3291);function B(e){return e.is("element","ol")||e.is("element","ul")}function M(e){return e.is("element","li")}function z(e){let t=0,i=e.parent;for(;i;){if(M(i))t++;else{const e=i.previousSibling;e&&M(e)&&t++}i=i.parent}return t}function N(e,t,i,o=F(i,t)){return e.createAttributeElement(L(i),null,{priority:2*t/100-100,id:o})}function D(e,t,i){return e.createAttributeElement("li",null,{priority:(2*t+1)/100-100,id:i})}function L(e){return"numbered"==e?"ol":"ul"}function F(e,t){return`list-${e}-${t}`}function H(e,t){const i=e.nodeBefore;if(u(i)){let e=i;for(const{node:i}of l(e,"backward"))if(e=i,t.has(e))return;t.set(i,e)}else{const i=e.nodeAfter;u(i)&&t.set(i,i)}}function W(){return(e,t,i)=>{if(!i.consumable.test(t.viewItem,{name:!0}))return;const o=new O.yj(t.viewItem.document);for(const e of Array.from(t.viewItem.getChildren()))M(e)||B(e)||o.remove(e)}}function Z(e,{dataPipeline:t}={}){return(i,{writer:o})=>{if(!U(i,e))return null;if(!t)return o.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const n=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}function U(e,t,i=h(e)){if(!u(e))return!1;for(const i of e.getAttributeKeys())if(!i.startsWith("selection:")&&!t.includes(i))return!1;return i.length<2}var j=i(3379),$=i.n(j),q=i(9037),K=i.n(q),G=i(569),J=i.n(G),Y=i(8575),Q=i.n(Y),X=i(9216),ee=i.n(X),te=i(3190),ie={attributes:{"data-cke":!0}};ie.setAttributes=Q(),ie.insert=J().bind(null,"head"),ie.domAPI=K(),ie.insertStyleElement=ee(),$()(te.Z,ie),te.Z&&te.Z.locals&&te.Z.locals;var oe=i(4784),ne={attributes:{"data-cke":!0}};ne.setAttributes=Q(),ne.insert=J().bind(null,"head"),ne.domAPI=K(),ne.insertStyleElement=ee(),$()(oe.Z,ne),oe.Z&&oe.Z.locals&&oe.Z.locals;const re=["listType","listIndent","listItemId"];class se extends o.Sy{constructor(){super(...arguments),this._downcastStrategies=[]}static get pluginName(){return"DocumentListEditing"}static get requires(){return[r.C,n.HG,R]}init(){const e=this.editor,t=e.model;if(e.plugins.has("ListEditing"))throw new s.Bb("document-list-feature-conflict",this,{conflictPlugin:"ListEditing"});t.schema.extend("$container",{allowAttributes:re}),t.schema.extend("$block",{allowAttributes:re}),t.schema.extend("$blockObject",{allowAttributes:re});for(const e of re)t.schema.setAttributeProperties(e,{copyOnReplace:!0});e.commands.add("numberedList",new P(e,"numbered")),e.commands.add("bulletedList",new P(e,"bulleted")),e.commands.add("indentList",new T(e,"forward")),e.commands.add("outdentList",new T(e,"backward")),e.commands.add("mergeListItemBackward",new I(e,"backward")),e.commands.add("mergeListItemForward",new I(e,"forward")),e.commands.add("splitListItemBefore",new V(e,"before")),e.commands.add("splitListItemAfter",new V(e,"after")),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration()}afterInit(){const e=this.editor.commands,t=e.get("indent"),i=e.get("outdent");t&&t.registerChildCommand(e.get("indentList"),{priority:"high"}),i&&i.registerChildCommand(e.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(e){this._downcastStrategies.push(e)}_getListAttributeNames(){return[...re,...this._downcastStrategies.map((e=>e.attributeName))]}_setupDeleteIntegration(){const e=this.editor,t=e.commands.get("mergeListItemBackward"),i=e.commands.get("mergeListItemForward");this.listenTo(e.editing.view.document,"delete",((o,n)=>{const r=e.model.document.selection;A(e.model)||e.model.change((()=>{const s=r.getFirstPosition();if(r.isCollapsed&&"backward"==n.direction){if(!s.isAtStart)return;const i=s.parent;if(!u(i))return;if(a.first(i,{sameAttributes:"listType",sameIndent:!0})||0!==i.getAttribute("listIndent")){if(!t.isEnabled)return;t.execute({shouldMergeOnBlocksContentLevel:ae(e.model,"backward")})}else f(i)||e.execute("splitListItemAfter"),e.execute("outdentList");n.preventDefault(),o.stop()}else{if(r.isCollapsed&&!r.getLastPosition().isAtEnd)return;if(!i.isEnabled)return;i.execute({shouldMergeOnBlocksContentLevel:ae(e.model,"forward")}),n.preventDefault(),o.stop()}}))}),{context:"li"})}_setupEnterIntegration(){const e=this.editor,t=e.model,i=e.commands,o=i.get("enter");this.listenTo(e.editing.view.document,"enter",((i,o)=>{const n=t.document,r=n.selection.getFirstPosition().parent;if(n.selection.isCollapsed&&u(r)&&r.isEmpty&&!o.isSoft){const t=p(r),n=f(r);t&&n?(e.execute("outdentList"),o.preventDefault(),i.stop()):t&&!n?(e.execute("splitListItemAfter"),o.preventDefault(),i.stop()):n&&(e.execute("splitListItemBefore"),o.preventDefault(),i.stop())}}),{context:"li"}),this.listenTo(o,"afterExecute",(()=>{const t=i.get("splitListItemBefore");t.refresh(),t.isEnabled&&2===h(e.model.document.selection.getLastPosition().parent).length&&t.execute()}))}_setupTabIntegration(){const e=this.editor;this.listenTo(e.editing.view.document,"tab",((t,i)=>{const o=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(o).isEnabled&&(e.execute(o),i.stopPropagation(),i.preventDefault(),t.stop())}),{context:"li"})}_setupConversion(){const e=this.editor,t=e.model,i=this._getListAttributeNames();e.conversion.for("upcast").elementToElement({view:"li",model:"paragraph"}).add((e=>{e.on("element:li",((e,t,i)=>{const{writer:o,schema:n}=i;if(!t.modelRange)return;const r=Array.from(t.modelRange.getItems({shallow:!0})).filter((e=>n.checkAttribute(e,"listItemId")));if(!r.length)return;const s={listItemId:d.next(),listIndent:z(t.viewItem),listType:t.viewItem.parent&&t.viewItem.parent.is("element","ol")?"numbered":"bulleted"};for(const e of r)u(e)||o.setAttributes(s,e);r.length>1&&r[1].getAttribute("listItemId")!=s.listItemId&&i.keepEmptyElement(r[0])})),e.on("element:ul",W(),{priority:"high"}),e.on("element:ol",W(),{priority:"high"})})),e.conversion.for("editingDowncast").elementToElement({model:"paragraph",view:Z(i),converterPriority:"high"}),e.conversion.for("dataDowncast").elementToElement({model:"paragraph",view:Z(i,{dataPipeline:!0}),converterPriority:"high"}),e.conversion.for("downcast").add((e=>{e.on("attribute",function(e,t,i){const o=function(e){return(t,i)=>{const o=[];for(const i of e)t.hasAttribute(i)&&o.push(`attribute:${i}`);return!!o.every((e=>!1!==i.test(t,e)))&&(o.forEach((e=>i.consume(t,e))),!0)}}(e);return(n,r,s)=>{const{writer:l,mapper:c,consumable:d}=s,u=r.item;if(!e.includes(r.attributeKey))return;if(!o(u,d))return;const h=function(e,t,i){const o=i.createRangeOn(e);return t.toViewRange(o).getTrimmed().getContainedElement()}(u,c,i);!function(e,t){let i=e.parent;for(;i.is("attributeElement")&&["ul","ol","li"].includes(i.name);){const o=i.parent;t.unwrap(t.createRangeOn(e),i),i=o}}(h,l),function(e,t,i,o){if(!e.hasAttribute("listIndent"))return;const n=e.getAttribute("listIndent");let r=e;for(let e=n;e>=0;e--){const n=D(o,e,r.getAttribute("listItemId")),s=N(o,e,r.getAttribute("listType"));for(const e of i)r.hasAttribute(e.attributeName)&&e.setAttributeOnDowncast(o,r.getAttribute(e.attributeName),"list"==e.scope?s:n);if(t=o.wrap(t,n),t=o.wrap(t,s),0==e)break;if(r=a.first(r,{lowerIndent:!0}),!r)break}}(u,l.createRangeOn(h),t,l)}}(i,this._downcastStrategies,t))})),this.listenTo(t.document,"change:data",function(e,t,i,o){return()=>{const o=e.document.differ.getChanges(),s=[],a=new Map,l=new Set;for(const e of o)if("insert"==e.type&&"$text"!=e.name)H(e.position,a),e.attributes.has("listItemId")?l.add(e.position.nodeAfter):H(e.position.getShiftedBy(e.length),a);else if("remove"==e.type&&e.attributes.has("listItemId"))H(e.position,a);else if("attribute"==e.type){const t=e.range.start.nodeAfter;i.includes(e.attributeKey)?(H(e.range.start,a),null===e.attributeNewValue?(H(e.range.start.getShiftedBy(1),a),r(t)&&s.push(t)):l.add(t)):u(t)&&r(t)&&s.push(t)}for(const e of a.values())s.push(...n(e,l));for(const e of new Set(s))t.reconvertItem(e)};function n(e,t){const o=[],n=new Set,a=[];for(const{node:c,previous:d}of l(e,"forward")){if(n.has(c))continue;const e=c.getAttribute("listIndent");d&&ei.includes(e))));const l=m(c,{direction:"forward"});for(const e of l)n.add(e),(r(e,l)||s(e,a,t))&&o.push(e)}return o}function r(e,o){if(!e.is("element","paragraph"))return!1;const n=t.mapper.toViewElement(e);if(!n)return!1;const r=U(e,i,o);return!(!r||!n.is("element","p"))||!(r||!n.is("element","span"))}function s(e,i,n){if(n.has(e))return!1;const r=t.mapper.toViewElement(e);let s=i.length-1;for(let e=r.parent;!e.is("editableElement");e=e.parent){const t=M(e),n=B(e);if(!n&&!t)continue;const r="checkAttributes:"+(t?"item":"list");if(o.fire(r,{viewElement:e,modelAttributes:i[s]}))break;if(n&&(s--,s<0))return!1}return!0}}(t,e.editing,i,this),{priority:"high"}),this.on("checkAttributes:item",((e,{viewElement:t,modelAttributes:i})=>{t.id!=i.listItemId&&(e.return=!0,e.stop())})),this.on("checkAttributes:list",((e,{viewElement:t,modelAttributes:i})=>{t.name==L(i.listType)&&t.id==F(i.listType,i.listIndent)||(e.return=!0,e.stop())}))}_setupModelPostFixing(){const e=this.editor.model,t=this._getListAttributeNames();e.document.registerPostFixer((i=>function(e,t,i,o){const n=e.document.differ.getChanges(),r=new Map;let s=!1;for(const o of n)if("insert"==o.type&&"$text"!=o.name){const n=o.position.nodeAfter;if(!e.schema.checkAttribute(n,"listItemId"))for(const e of Array.from(n.getAttributeKeys()))i.includes(e)&&(t.removeAttribute(e,n),s=!0);H(o.position,r),o.attributes.has("listItemId")||H(o.position.getShiftedBy(o.length),r);for(const{item:t,previousPosition:i}of e.createRangeIn(n))u(t)&&H(i,r)}else"remove"==o.type?H(o.position,r):"attribute"==o.type&&i.includes(o.attributeKey)&&(H(o.range.start,r),null===o.attributeNewValue&&H(o.range.start.getShiftedBy(1),r));const a=new Set;for(const e of r.values())s=o.fire("postFixer",{listNodes:new c(e),listHead:e,writer:t,seenIds:a})||s;return s}(e,i,t,this))),this.on("postFixer",((e,{listNodes:t,writer:i})=>{e.return=function(e,t){let i=0,o=-1,n=null,r=!1;for(const{node:s}of e){const e=s.getAttribute("listIndent");if(e>i){let a;null===n?(n=e-i,a=i):(n>e&&(n=e),a=e-n),a>o+1&&(a=o+1),t.setAttribute("listIndent",a,s),r=!0,o=a}else n=null,i=e+1,o=e}return r}(t,i)||e.return}),{priority:"high"}),this.on("postFixer",((e,{listNodes:t,writer:i,seenIds:o})=>{e.return=function(e,t,i){const o=new Set;let n=!1;for(const{node:r}of e){if(o.has(r))continue;let e=r.getAttribute("listType"),s=r.getAttribute("listItemId");t.has(s)&&(s=d.next()),t.add(s);for(const t of m(r,{direction:"forward"}))o.add(t),t.getAttribute("listType")!=e&&(s=d.next(),e=t.getAttribute("listType")),t.getAttribute("listItemId")!=s&&(i.setAttribute("listItemId",s,t),n=!0)}return n}(t,o,i)||e.return}),{priority:"high"})}_setupClipboardIntegration(){const e=this.editor.model;this.listenTo(e,"insertContent",function(e){return(t,[i,o])=>{const n=i.is("documentFragment")?i.getChild(0):i;if(!u(n))return;let r;r=o?e.createSelection(o):e.document.selection;const s=r.getFirstPosition();let a=null;if(u(s.parent)?a=s.parent:u(s.nodeBefore)&&(a=s.nodeBefore),!a)return;const c=a.getAttribute("listIndent")-n.getAttribute("listIndent");c<=0||e.change((e=>{for(const{node:t}of l(n,"forward"))e.setAttribute("listIndent",t.getAttribute("listIndent")+c,t)}))}}(e),{priority:"high"}),this.listenTo(e,"getSelectedContent",((t,[i])=>{C(Array.from(i.getSelectedBlocks()))&&e.change((e=>y(Array.from(t.return.getChildren()),e)))}))}}function ae(e,t){const i=e.document.selection;if(!i.isCollapsed)return!A(e);if("forward"===t)return!0;const o=i.getFirstPosition().parent,n=o.previousSibling;return!e.schema.isObject(n)&&(!!n.isEmpty||C([o,n]))}var le=i(7095);function ce(e,t){const i=t.mapper,o=t.writer,n="numbered"==e.getAttribute("listType")?"ol":"ul",r=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=ve,t}(o),s=o.createContainerElement(n,null);return o.insert(o.createPositionAt(s,0),r),i.bindElements(e,r),r}function de(e,t,i,o){const n=t.parent,r=i.mapper,s=i.writer;let a=r.toViewPosition(o.createPositionBefore(e));const l=me(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),c=e.previousSibling;if(l&&l.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=r.toViewElement(l);a=s.breakContainer(s.createPositionAfter(e))}else if(c&&"listItem"==c.name){a=r.toViewPosition(o.createPositionAt(c,"end"));const e=r.findMappedViewAncestor(a),t=pe(e);a=t?s.createPositionBefore(t):s.createPositionAt(e,"end")}else a=r.toViewPosition(o.createPositionBefore(e));if(a=he(a),s.insert(a,n),c&&"listItem"==c.name){const e=r.toViewElement(c),i=s.createRange(s.createPositionAt(e,0),a).getWalker({ignoreElementEnd:!0});for(const e of i)if(e.item.is("element","li")){const o=s.breakContainer(s.createPositionBefore(e.item)),n=e.item.parent,r=s.createPositionAt(t,"end");ue(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(n),r),i._position=o}}else{const i=n.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let o=null;for(const t of i.getChildren()){const i=r.toModelElement(t);if(!(i&&i.getAttribute("listIndent")>e.getAttribute("listIndent")))break;o=t}o&&(s.breakContainer(s.createPositionAfter(o)),s.move(s.createRangeOn(o.parent),s.createPositionAt(t,"end")))}}ue(s,n,n.nextSibling),ue(s,n.previousSibling,n)}function ue(e,t,i){return!t||!i||"ul"!=t.name&&"ol"!=t.name||t.name!=i.name||t.getAttribute("class")!==i.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function he(e){return e.getLastMatchingPosition((e=>e.item.is("uiElement")))}function me(e,t){const i=!!t.sameIndent,o=!!t.smallerIndent,n=t.listIndent;let r=e;for(;r&&"listItem"==r.name;){const e=r.getAttribute("listIndent");if(i&&n==e||o&&n>e)return r;r="forward"===t.direction?r.nextSibling:r.previousSibling}return null}function ge(e,t,i,o){e.ui.componentFactory.add(t,(n=>{const r=e.commands.get(t),s=new le.r5(n);return s.set({label:i,icon:o,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),s}))}function pe(e){for(const t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}function fe(e,t){const i=[],o=e.parent,n={ignoreElementEnd:!1,startPosition:e,shallow:!0,direction:t},r=o.getAttribute("listIndent"),s=[...new O.Po(n)].filter((e=>e.item.is("element"))).map((e=>e.item));for(const e of s){if(!e.is("element","listItem"))break;if(e.getAttribute("listIndent")r)){if(e.getAttribute("listType")!==o.getAttribute("listType"))break;if(e.getAttribute("listStyle")!==o.getAttribute("listStyle"))break;if(e.getAttribute("listReversed")!==o.getAttribute("listReversed"))break;if(e.getAttribute("listStart")!==o.getAttribute("listStart"))break;"backward"===t?i.unshift(e):i.push(e)}}return i}function be(e){let t=[...e.document.selection.getSelectedBlocks()].filter((e=>e.is("element","listItem"))).map((t=>{const i=e.change((e=>e.createPositionAt(t,0)));return[...fe(i,"backward"),...fe(i,"forward")]})).flat();return t=[...new Set(t)],t}const we=["disc","circle","square"],ke=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function _e(e){return we.includes(e)?"bulleted":ke.includes(e)?"numbered":null}function ve(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:O.YG.call(this)}const ye='',Ce='';class xe extends o.Sy{static get pluginName(){return"ListUI"}init(){const e=this.editor.t;ge(this.editor,"numberedList",e("Numbered List"),ye),ge(this.editor,"bulletedList",e("Bulleted List"),Ce)}}class Ae extends o.Sy{static get requires(){return[se,xe]}static get pluginName(){return"DocumentList"}}class Ee extends o.mY{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute({startIndex:e=1}={}){const t=this.editor.model,i=t.document;let o=Array.from(i.selection.getSelectedBlocks()).filter((e=>u(e)&&"numbered"==e.getAttribute("listType")));o=w(o),t.change((t=>{for(const i of o)t.setAttribute("listStart",e>=0?e:1,i)}))}_getValue(){const e=this.editor.model.document,t=(0,s.Ps)(e.selection.getSelectedBlocks());return t&&u(t)&&"numbered"==t.getAttribute("listType")?t.getAttribute("listStart"):null}}const Te={},Se={},Pe={},Ie=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(const{listStyle:e,typeAttribute:t,listType:i}of Ie)Te[e]=i,Se[e]=t,t&&(Pe[t]=e);function Ve(){return Ie.map((e=>e.listStyle))}function Re(e){return Te[e]||null}function Oe(e){return Pe[e]||null}function Be(e){return Se[e]||null}class Me extends o.mY{constructor(e,t,i){super(e),this.defaultType=t,this._supportedTypes=i}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.document;t.change((t=>{this._tryToConvertItemsToList(e);let o=Array.from(i.selection.getSelectedBlocks()).filter((e=>e.hasAttribute("listType")));if(o.length){o=w(o);for(const i of o)t.setAttribute("listStyle",e.type||this.defaultType,i)}}))}isStyleTypeSupported(e){return!this._supportedTypes||this._supportedTypes.includes(e)}_getValue(){const e=(0,s.Ps)(this.editor.model.document.selection.getSelectedBlocks());return u(e)?e.getAttribute("listStyle"):null}_checkEnabled(){const e=this.editor,t=e.commands.get("numberedList"),i=e.commands.get("bulletedList");return t.isEnabled||i.isEnabled}_tryToConvertItemsToList(e){if(!e.type)return;const t=Re(e.type);if(!t)return;const i=this.editor,o=`${t}List`;i.commands.get(o).value||i.execute(o)}}class ze extends o.mY{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute(e={}){const t=this.editor.model,i=t.document;let o=Array.from(i.selection.getSelectedBlocks()).filter((e=>u(e)&&"numbered"==e.getAttribute("listType")));o=w(o),t.change((t=>{for(const i of o)t.setAttribute("listReversed",!!e.reversed,i)}))}_getValue(){const e=this.editor.model.document,t=(0,s.Ps)(e.selection.getSelectedBlocks());return u(t)&&"numbered"==t.getAttribute("listType")?t.getAttribute("listReversed"):null}}function Ne(e){return(t,i,o)=>{const{writer:n,schema:r,consumable:s}=o;if(!1===s.test(i.viewItem,e.viewConsumables))return;i.modelRange||Object.assign(i,o.convertChildren(i.viewItem,i.modelCursor));let a=!1;for(const t of i.modelRange.getItems({shallow:!0}))r.checkAttribute(t,e.attributeName)&&e.appliesToListItem(t)&&(t.hasAttribute(e.attributeName)||(n.setAttribute(e.attributeName,e.getAttributeOnUpcast(i.viewItem),t),a=!0));a&&s.consume(i.viewItem,e.viewConsumables)}}class De extends o.Sy{static get pluginName(){return"DocumentListPropertiesUtils"}getAllSupportedStyleTypes(){return Ve()}getListTypeFromListStyleType(e){return Re(e)}getListStyleTypeFromTypeAttribute(e){return Oe(e)}getTypeAttributeFromListStyleType(e){return Be(e)}}const Le="default";class Fe extends o.Sy{static get requires(){return[se,De]}static get pluginName(){return"DocumentListPropertiesEditing"}constructor(e){super(e),e.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const e=this.editor,t=e.model,i=e.plugins.get(se),o=function(e){const t=[];if(e.styles){const i="object"==typeof e.styles&&e.styles.useAttribute;t.push({attributeName:"listStyle",defaultValue:Le,viewConsumables:{styles:"list-style-type"},addCommand(e){let t=Ve();i&&(t=t.filter((e=>!!Be(e)))),e.commands.add("listStyle",new Me(e,Le,t))},appliesToListItem:()=>!0,hasValidAttribute(e){if(!e.hasAttribute("listStyle"))return!1;const t=e.getAttribute("listStyle");return t==Le||Re(t)==e.getAttribute("listType")},setAttributeOnDowncast(e,t,o){if(t&&t!==Le){if(!i)return void e.setStyle("list-style-type",t,o);{const i=Be(t);if(i)return void e.setAttribute("type",i,o)}}e.removeStyle("list-style-type",o),e.removeAttribute("type",o)},getAttributeOnUpcast(e){const t=e.getStyle("list-style-type");if(t)return t;const i=e.getAttribute("type");return i?Oe(i):Le}})}return e.reversed&&t.push({attributeName:"listReversed",defaultValue:!1,viewConsumables:{attributes:"reversed"},addCommand(e){e.commands.add("listReversed",new ze(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),hasValidAttribute(e){return this.appliesToListItem(e)==e.hasAttribute("listReversed")},setAttributeOnDowncast(e,t,i){t?e.setAttribute("reversed","reversed",i):e.removeAttribute("reversed",i)},getAttributeOnUpcast:e=>e.hasAttribute("reversed")}),e.startIndex&&t.push({attributeName:"listStart",defaultValue:1,viewConsumables:{attributes:"start"},addCommand(e){e.commands.add("listStart",new Ee(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),hasValidAttribute(e){return this.appliesToListItem(e)==e.hasAttribute("listStart")},setAttributeOnDowncast(e,t,i){0==t||t>1?e.setAttribute("start",t,i):e.removeAttribute("start",i)},getAttributeOnUpcast(e){const t=e.getAttribute("start");return t>=0?t:1}}),t}(e.config.get("list.properties"));for(const n of o)n.addCommand(e),t.schema.extend("$container",{allowAttributes:n.attributeName}),t.schema.extend("$block",{allowAttributes:n.attributeName}),t.schema.extend("$blockObject",{allowAttributes:n.attributeName}),i.registerDowncastStrategy({scope:"list",attributeName:n.attributeName,setAttributeOnDowncast(e,t,i){n.setAttributeOnDowncast(e,t,i)}});e.conversion.for("upcast").add((e=>{for(const t of o)e.on("element:ol",Ne(t)),e.on("element:ul",Ne(t))})),i.on("checkAttributes:list",((e,{viewElement:t,modelAttributes:i})=>{for(const n of o)n.getAttributeOnUpcast(t)!=i[n.attributeName]&&(e.return=!0,e.stop())})),this.listenTo(e.commands.get("indentList"),"afterExecute",((e,i)=>{t.change((e=>{for(const t of i)for(const i of o)i.appliesToListItem(t)&&e.setAttribute(i.attributeName,i.defaultValue,t)}))})),i.on("postFixer",((e,{listNodes:t,writer:i})=>{for(const{node:n}of t)for(const t of o)t.hasValidAttribute(n)||(t.appliesToListItem(n)?i.setAttribute(t.attributeName,t.defaultValue,n):i.removeAttribute(t.attributeName,n),e.return=!0)})),i.on("postFixer",((e,{listNodes:t,writer:i})=>{const n=[];for(const{node:r,previous:s}of t){if(!s)continue;const t=r.getAttribute("listIndent"),a=s.getAttribute("listIndent");let l=null;if(t>a?n[a]=s:tString(e)))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",(e=>!e)),e.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),e}}var je=i(9938),$e={attributes:{"data-cke":!0}};$e.setAttributes=Q(),$e.insert=J().bind(null,"head"),$e.domAPI=K(),$e.insertStyleElement=ee(),$()(je.Z,$e),je.Z&&je.Z.locals&&je.Z.locals;class qe extends le.G7{constructor(e,{enabledProperties:t,styleButtonViews:i,styleGridAriaLabel:o}){super(e),this.stylesView=null,this.additionalPropertiesCollapsibleView=null,this.startIndexFieldView=null,this.reversedSwitchButtonView=null,this.focusTracker=new s.Rh,this.keystrokes=new s.VD,this.focusables=new le.vX;const n=["ck","ck-list-properties"];this.children=this.createCollection(),this.focusCycler=new le.I0({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),t.styles?(this.stylesView=this._createStylesView(i,o),this.children.add(this.stylesView)):n.push("ck-list-properties_without-styles"),(t.startIndex||t.reversed)&&(this._addNumberedListPropertyViews(t),n.push("ck-list-properties_with-numbered-properties")),this.setTemplate({tag:"div",attributes:{class:n},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element),(this.startIndexFieldView||this.reversedSwitchButtonView)&&(this.focusables.add(this.children.last.buttonView),this.focusTracker.add(this.children.last.buttonView.element));for(const e of this.stylesView.children)this.stylesView.focusTracker.add(e.element);(0,le.IJ)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>s.CO.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element),this.listenTo(this.startIndexFieldView.element,"selectstart",((e,t)=>{t.stopPropagation()}),{priority:"high"});const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}this.reversedSwitchButtonView&&(this.focusables.add(this.reversedSwitchButtonView),this.focusTracker.add(this.reversedSwitchButtonView.element)),this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createStylesView(e,t){const i=new le.G7(this.locale);return i.children=i.createCollection(),i.children.addMany(e),i.setTemplate({tag:"div",attributes:{"aria-label":t,class:["ck","ck-list-styles-list"]},children:i.children}),i.children.delegate("execute").to(this),i.focus=function(){this.children.first.focus()},i.focusTracker=new s.Rh,i.keystrokes=new s.VD,i.render(),i.keystrokes.listenTo(i.element),i}_addNumberedListPropertyViews(e){const t=this.locale.t,i=[];e.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),i.push(this.startIndexFieldView)),e.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),i.push(this.reversedSwitchButtonView)),e.styles?(this.additionalPropertiesCollapsibleView=new Ue(this.locale,i),this.additionalPropertiesCollapsibleView.set({label:t("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",((e,t,i)=>{i||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)})),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(i)}_createStartIndexField(){const e=this.locale.t,t=new le.KP(this.locale,le.sh);return t.set({label:e("Start at"),class:"ck-numbered-list-properties__start-index"}),t.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),t.fieldView.on("input",(()=>{const i=t.fieldView.element,o=i.valueAsNumber;Number.isNaN(o)||(i.checkValidity()?this.fire("listStart",{startIndex:o}):t.errorText=e("Start index must be greater than 0."))})),t}_createReversedSwitchButton(){const e=this.locale.t,t=new le.BM(this.locale);return t.set({withText:!0,label:e("Reversed order"),class:"ck-numbered-list-properties__reversed-order"}),t.delegate("execute").to(this,"listReversed"),t}}var Ke=i(2591),Ge={attributes:{"data-cke":!0}};Ge.setAttributes=Q(),Ge.insert=J().bind(null,"head"),Ge.domAPI=K(),Ge.insertStyleElement=ee(),$()(Ke.Z,Ge),Ke.Z&&Ke.Z.locals&&Ke.Z.locals;class Je extends o.Sy{static get pluginName(){return"ListPropertiesUI"}init(){const e=this.editor,t=e.locale.t,i=e.config.get("list.properties");i.styles&&e.ui.componentFactory.add("bulletedList",Ye({editor:e,parentCommandName:"bulletedList",buttonLabel:t("Bulleted List"),buttonIcon:Ce,styleGridAriaLabel:t("Bulleted list styles toolbar"),styleDefinitions:[{label:t("Toggle the disc list style"),tooltip:t("Disc"),type:"disc",icon:''},{label:t("Toggle the circle list style"),tooltip:t("Circle"),type:"circle",icon:''},{label:t("Toggle the square list style"),tooltip:t("Square"),type:"square",icon:''}]})),(i.styles||i.startIndex||i.reversed)&&e.ui.componentFactory.add("numberedList",Ye({editor:e,parentCommandName:"numberedList",buttonLabel:t("Numbered List"),buttonIcon:ye,styleGridAriaLabel:t("Numbered list styles toolbar"),styleDefinitions:[{label:t("Toggle the decimal list style"),tooltip:t("Decimal"),type:"decimal",icon:''},{label:t("Toggle the decimal with leading zero list style"),tooltip:t("Decimal with leading zero"),type:"decimal-leading-zero",icon:''},{label:t("Toggle the lower–roman list style"),tooltip:t("Lower–roman"),type:"lower-roman",icon:''},{label:t("Toggle the upper–roman list style"),tooltip:t("Upper-roman"),type:"upper-roman",icon:''},{label:t("Toggle the lower–latin list style"),tooltip:t("Lower-latin"),type:"lower-latin",icon:''},{label:t("Toggle the upper–latin list style"),tooltip:t("Upper-latin"),type:"upper-latin",icon:''}]}))}}function Ye({editor:e,parentCommandName:t,buttonLabel:i,buttonIcon:o,styleGridAriaLabel:n,styleDefinitions:r}){const s=e.commands.get(t);return a=>{const l=(0,le.t9)(a,le.Rm),c=l.buttonView;return l.bind("isEnabled").to(s),l.class="ck-list-styles-dropdown",c.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),c.set({label:i,icon:o,tooltip:!0,isToggleable:!0}),c.bind("isOn").to(s,"value",(e=>!!e)),l.once("change:isOpen",(()=>{const i=function({editor:e,dropdownView:t,parentCommandName:i,styleDefinitions:o,styleGridAriaLabel:n}){const r=e.locale,s=e.config.get("list.properties");let a=null;if("numberedList"!=i&&(s.startIndex=!1,s.reversed=!1),s.styles){const t=e.commands.get("listStyle"),n=function({editor:e,listStyleCommand:t,parentCommandName:i}){const o=e.locale,n=e.commands.get(i);return({label:i,type:r,icon:s,tooltip:a})=>{const l=new le.r5(o);return l.set({label:i,icon:s,tooltip:a}),t.on("change:value",(()=>{l.isOn=t.value===r})),l.on("execute",(()=>{n.value?t.value!==r?e.execute("listStyle",{type:r}):e.execute("listStyle",{type:t.defaultType}):e.model.change((()=>{e.execute("listStyle",{type:r})}))})),l}}({editor:e,parentCommandName:i,listStyleCommand:t}),r="function"==typeof t.isStyleTypeSupported?e=>t.isStyleTypeSupported(e.type):()=>!0;a=o.filter(r).map(n)}const l=new qe(r,{styleGridAriaLabel:n,enabledProperties:s,styleButtonViews:a});if(s.styles&&(0,le.Mh)(t,(()=>l.stylesView.children.find((e=>e.isOn)))),s.startIndex){const t=e.commands.get("listStart");l.startIndexFieldView.bind("isEnabled").to(t),l.startIndexFieldView.fieldView.bind("value").to(t),l.on("listStart",((t,i)=>e.execute("listStart",i)))}if(s.reversed){const t=e.commands.get("listReversed");l.reversedSwitchButtonView.bind("isEnabled").to(t),l.reversedSwitchButtonView.bind("isOn").to(t,"value",(e=>!!e)),l.on("listReversed",(()=>{const i=t.value;e.execute("listReversed",{reversed:!i})}))}return l.delegate("execute").to(t),l}({editor:e,dropdownView:l,parentCommandName:t,styleGridAriaLabel:n,styleDefinitions:r});l.panelView.children.add(i)})),l.on("execute",(()=>{e.editing.view.focus()})),l}}class Qe extends o.Sy{static get requires(){return[Fe,Je]}static get pluginName(){return"DocumentListProperties"}}class Xe extends o.mY{constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let i=Array.from(t.selection.getSelectedBlocks());e.change((e=>{const t=i[i.length-1];let o=t.nextSibling;for(;o&&"listItem"==o.name&&o.getAttribute("listIndent")>t.getAttribute("listIndent");)i.push(o),o=o.nextSibling;this._indentBy<0&&(i=i.reverse());for(const t of i){const i=t.getAttribute("listIndent")+this._indentBy;i<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",i,t)}this.fire("_executeCleanup",i)}))}_checkEnabled(){const e=(0,s.Ps)(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),i=e.getAttribute("listType");let o=e.previousSibling;for(;o&&o.is("element","listItem")&&o.getAttribute("listIndent")>=t;){if(o.getAttribute("listIndent")==t)return o.getAttribute("listType")==i;o=o.previousSibling}return!1}return!0}}class et extends o.mY{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.document,o=Array.from(i.selection.getSelectedBlocks()).filter((e=>it(e,t.schema))),n=void 0!==e.forceValue?!e.forceValue:this.value;t.change((e=>{if(n){let t=o[o.length-1].nextSibling,i=Number.POSITIVE_INFINITY,n=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e=i;)r>n.getAttribute("listIndent")&&(r=n.getAttribute("listIndent")),n.getAttribute("listIndent")==r&&e[t?"unshift":"push"](n),n=n[t?"previousSibling":"nextSibling"]}}function it(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class ot extends o.Sy{static get pluginName(){return"ListUtils"}getListTypeFromListStyleType(e){return _e(e)}getSelectedListItems(e){return be(e)}getSiblingNodes(e,t){return fe(e,t)}}function nt(e){return(t,i,o)=>{const n=o.consumable;if(!n.test(i.item,"insert")||!n.test(i.item,"attribute:listType")||!n.test(i.item,"attribute:listIndent"))return;n.consume(i.item,"insert"),n.consume(i.item,"attribute:listType"),n.consume(i.item,"attribute:listIndent");const r=i.item;de(r,ce(r,o),o,e)}}const rt=(e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;const o=i.mapper.toViewElement(t.item),n=i.writer;n.breakContainer(n.createPositionBefore(o)),n.breakContainer(n.createPositionAfter(o));const r=o.parent,s="numbered"==t.attributeNewValue?"ol":"ul";n.rename(s,r)},st=(e,t,i)=>{i.consumable.consume(t.item,e.name);const o=i.mapper.toViewElement(t.item).parent,n=i.writer;ue(n,o,o.nextSibling),ue(n,o.previousSibling,o)},at=(e,t,i)=>{if(i.consumable.test(t.item,e.name)&&"listItem"!=t.item.name){let e=i.mapper.toViewPosition(t.range.start);const o=i.writer,n=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&(e=o.breakContainer(e),"li"==e.parent.name);){const t=e,i=o.createPositionAt(e.parent,"end");if(!t.isEqual(i)){const e=o.remove(o.createRange(t,i));n.push(e)}e=o.createPositionAfter(e.parent)}if(n.length>0){for(let t=0;t0){const t=ue(o,i,i.nextSibling);t&&t.parent==i&&e.offset--}}ue(o,e.nodeBefore,e.nodeAfter)}}},lt=(e,t,i)=>{const o=i.mapper.toViewPosition(t.position),n=o.nodeBefore,r=o.nodeAfter;ue(i.writer,n,r)},ct=(e,t,i)=>{if(i.consumable.consume(t.viewItem,{name:!0})){const e=i.writer,o=e.createElement("listItem"),n=function(e){let t=0,i=e.parent;for(;i;){if(i.is("element","li"))t++;else{const e=i.previousSibling;e&&e.is("element","li")&&t++}i=i.parent}return t}(t.viewItem);e.setAttribute("listIndent",n,o);const r=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",r,o),!i.safeInsert(o,t.modelCursor))return;const s=function(e,t,i){const{writer:o,schema:n}=i;let r=o.createPositionAfter(e);for(const s of t)if("ul"==s.name||"ol"==s.name)r=i.convertItem(s,r).modelCursor;else{const t=i.convertItem(s,o.createPositionAt(e,"end")),a=t.modelRange.start.nodeAfter;a&&a.is("element")&&!n.checkChild(e,a.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:gt(t.modelCursor),r=o.createPositionAfter(e))}return r}(o,t.viewItem.getChildren(),i);t.modelRange=e.createRange(t.modelCursor,s),i.updateConversionResult(o,t)}},dt=(e,t,i)=>{if(i.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e)!t.is("element","li")&&!ft(t)&&t._remove()}},ut=(e,t,i)=>{if(i.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let i=!1;for(const t of e)i&&!ft(t)&&t._remove(),ft(t)&&(i=!0)}};function ht(e){return(t,i)=>{if(i.isPhantom)return;const o=i.modelPosition.nodeBefore;if(o&&o.is("element","listItem")){const t=i.mapper.toViewElement(o),n=t.getAncestors().find(ft),r=e.createPositionAt(t,0).getWalker();for(const e of r){if("elementStart"==e.type&&e.item.is("element","li")){i.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==n){i.viewPosition=e.nextPosition;break}}}}}const mt=function(e,[t,i]){let o,n=t.is("documentFragment")?t.getChild(0):t;if(o=i?this.createSelection(i):this.document.selection,n&&n.is("element","listItem")){const e=o.getFirstPosition();let t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;n&&n.is("element","listItem");)n._setAttribute("listIndent",n.getAttribute("listIndent")+e),n=n.nextSibling}}};function gt(e){const t=new O.Po({startPosition:e});let i;do{i=t.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function pt(e,t,i,o,n,r){const s=me(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e}),a=n.mapper,l=n.writer,c=s?s.getAttribute("listIndent"):null;let d;if(s)if(c==e){const e=a.toViewElement(s).parent;d=l.createPositionAfter(e)}else{const e=r.createPositionAt(s,"end");d=a.toViewPosition(e)}else d=i;d=he(d);for(const e of[...o.getChildren()])ft(e)&&(d=l.move(l.createRangeOn(e),d).end,ue(l,e,e.nextSibling),ue(l,e.previousSibling,e))}function ft(e){return e.is("element","ol")||e.is("element","ul")}class bt extends o.Sy{static get pluginName(){return"ListEditing"}static get requires(){return[r.C,n.HG,ot]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,i=e.editing;var o;e.model.document.registerPostFixer((t=>function(e,t){const i=e.document.differ.getChanges(),o=new Map;let n=!1;for(const o of i)if("insert"==o.type&&"listItem"==o.name)r(o.position);else if("insert"==o.type&&"listItem"!=o.name){if("$text"!=o.name){const i=o.position.nodeAfter;i.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",i),n=!0),i.hasAttribute("listType")&&(t.removeAttribute("listType",i),n=!0),i.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",i),n=!0),i.hasAttribute("listReversed")&&(t.removeAttribute("listReversed",i),n=!0),i.hasAttribute("listStart")&&(t.removeAttribute("listStart",i),n=!0);for(const t of Array.from(e.createRangeIn(i)).filter((e=>e.item.is("element","listItem"))))r(t.previousPosition)}r(o.position.getShiftedBy(o.length))}else"remove"==o.type&&"listItem"==o.name?r(o.position):("attribute"==o.type&&"listIndent"==o.attributeKey||"attribute"==o.type&&"listType"==o.attributeKey)&&r(o.range.start);for(const e of o.values())s(e),a(e);return n;function r(e){const t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(o.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,o.has(e))return;o.set(t,e)}else{const t=e.nodeAfter;t&&t.is("element","listItem")&&o.set(t,t)}}function s(e){let i=0,o=null;for(;e&&e.is("element","listItem");){const r=e.getAttribute("listIndent");if(r>i){let s;null===o?(o=r-i,s=i):(o>r&&(o=r),s=r-o),t.setAttribute("listIndent",s,e),n=!0}else o=null,i=e.getAttribute("listIndent")+1;e=e.nextSibling}}function a(e){let i=[],o=null;for(;e&&e.is("element","listItem");){const r=e.getAttribute("listIndent");if(o&&o.getAttribute("listIndent")>r&&(i=i.slice(0,r+1)),0!=r)if(i[r]){const o=i[r];e.getAttribute("listType")!=o&&(t.setAttribute("listType",o,e),n=!0)}else i[r]=e.getAttribute("listType");o=e,e=e.nextSibling}}}(e.model,t))),i.mapper.registerViewToModelLength("li",wt),t.mapper.registerViewToModelLength("li",wt),i.mapper.on("modelToViewPosition",ht(i.view)),i.mapper.on("viewToModelPosition",(o=e.model,(e,t)=>{const i=t.viewPosition,n=i.parent,r=t.mapper;if("ul"==n.name||"ol"==n.name){if(i.isAtEnd){const e=r.toModelElement(i.nodeBefore),n=r.getModelLength(i.nodeBefore);t.modelPosition=o.createPositionBefore(e).getShiftedBy(n)}else{const e=r.toModelElement(i.nodeAfter);t.modelPosition=o.createPositionBefore(e)}e.stop()}else if("li"==n.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const s=r.toModelElement(n);let a=1,l=i.nodeBefore;for(;l&&ft(l);)a+=r.getModelLength(l),l=l.previousSibling;t.modelPosition=o.createPositionBefore(s).getShiftedBy(a),e.stop()}})),t.mapper.on("modelToViewPosition",ht(i.view)),e.conversion.for("editingDowncast").add((t=>{t.on("insert",at,{priority:"high"}),t.on("insert:listItem",nt(e.model)),t.on("attribute:listType:listItem",rt,{priority:"high"}),t.on("attribute:listType:listItem",st,{priority:"low"}),t.on("attribute:listIndent:listItem",function(e){return(t,i,o)=>{if(!o.consumable.consume(i.item,"attribute:listIndent"))return;const n=o.mapper.toViewElement(i.item),r=o.writer;r.breakContainer(r.createPositionBefore(n)),r.breakContainer(r.createPositionAfter(n));const s=n.parent,a=s.previousSibling,l=r.createRangeOn(s);r.remove(l),a&&a.nextSibling&&ue(r,a,a.nextSibling),pt(i.attributeOldValue+1,i.range.start,l.start,n,o,e),de(i.item,n,o,e);for(const e of i.item.getChildren())o.consumable.consume(e,"insert")}}(e.model)),t.on("remove:listItem",function(e){return(t,i,o)=>{const n=o.mapper.toViewPosition(i.position).getLastMatchingPosition((e=>!e.item.is("element","li"))).nodeAfter,r=o.writer;r.breakContainer(r.createPositionBefore(n)),r.breakContainer(r.createPositionAfter(n));const s=n.parent,a=s.previousSibling,l=r.createRangeOn(s),c=r.remove(l);a&&a.nextSibling&&ue(r,a,a.nextSibling),pt(o.mapper.toModelElement(n).getAttribute("listIndent")+1,i.position,l.start,n,o,e);for(const e of r.createRangeIn(c).getItems())o.mapper.unbindViewElement(e);t.stop()}}(e.model)),t.on("remove",lt,{priority:"low"})})),e.conversion.for("dataDowncast").add((t=>{t.on("insert",at,{priority:"high"}),t.on("insert:listItem",nt(e.model))})),e.conversion.for("upcast").add((e=>{e.on("element:ul",dt,{priority:"high"}),e.on("element:ol",dt,{priority:"high"}),e.on("element:li",ut,{priority:"high"}),e.on("element:li",ct)})),e.model.on("insertContent",mt,{priority:"high"}),e.commands.add("numberedList",new et(e,"numbered")),e.commands.add("bulletedList",new et(e,"bulleted")),e.commands.add("indentList",new Xe(e,"forward")),e.commands.add("outdentList",new Xe(e,"backward"));const n=i.view.document;this.listenTo(n,"enter",((e,t)=>{const i=this.editor.model.document,o=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==o.name&&o.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())}),{context:"li"}),this.listenTo(n,"delete",((e,t)=>{if("backward"!==t.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const o=i.getFirstPosition();if(!o.isAtStart)return;const n=o.parent;"listItem"===n.name&&(n.previousSibling&&"listItem"===n.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop()))}),{context:"li"}),this.listenTo(e.editing.view.document,"tab",((t,i)=>{const o=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(o).isEnabled&&(e.execute(o),i.stopPropagation(),i.preventDefault(),t.stop())}),{context:"li"})}afterInit(){const e=this.editor.commands,t=e.get("indent"),i=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),i&&i.registerChildCommand(e.get("outdentList"))}}function wt(e){let t=1;for(const i of e.getChildren())if("ul"==i.name||"ol"==i.name)for(const e of i.getChildren())t+=wt(e);return t}class kt extends o.Sy{static get requires(){return[bt,xe]}static get pluginName(){return"List"}}class _t extends o.mY{constructor(e,t){super(e),this.defaultType=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){this._tryToConvertItemsToList(e);const t=this.editor.model,i=be(t);i.length&&t.change((t=>{for(const o of i)t.setAttribute("listStyle",e.type||this.defaultType,o)}))}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")?e.getAttribute("listStyle"):null}_checkEnabled(){const e=this.editor,t=e.commands.get("numberedList"),i=e.commands.get("bulletedList");return t.isEnabled||i.isEnabled}_tryToConvertItemsToList(e){if(!e.type)return;const t=_e(e.type);if(!t)return;const i=this.editor,o=`${t}List`;i.commands.get(o).value||i.execute(o)}}class vt extends o.mY{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute(e={}){const t=this.editor.model,i=be(t).filter((e=>"numbered"==e.getAttribute("listType")));t.change((t=>{for(const o of i)t.setAttribute("listReversed",!!e.reversed,o)}))}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")&&"numbered"==e.getAttribute("listType")?e.getAttribute("listReversed"):null}}class yt extends o.mY{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute({startIndex:e=1}={}){const t=this.editor.model,i=be(t).filter((e=>"numbered"==e.getAttribute("listType")));t.change((t=>{for(const o of i)t.setAttribute("listStart",e>=0?e:1,o)}))}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")&&"numbered"==e.getAttribute("listType")?e.getAttribute("listStart"):null}}const Ct="default";class xt extends o.Sy{static get requires(){return[bt]}static get pluginName(){return"ListPropertiesEditing"}constructor(e){super(e),e.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const e=this.editor,t=e.model,i=function(e){const t=[];return e.styles&&t.push({attributeName:"listStyle",defaultValue:Ct,addCommand(e){e.commands.add("listStyle",new _t(e,Ct))},appliesToListItem:()=>!0,setAttributeOnDowncast(e,t,i){t&&t!==Ct?e.setStyle("list-style-type",t,i):e.removeStyle("list-style-type",i)},getAttributeOnUpcast:e=>e.getStyle("list-style-type")||Ct}),e.reversed&&t.push({attributeName:"listReversed",defaultValue:!1,addCommand(e){e.commands.add("listReversed",new vt(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),setAttributeOnDowncast(e,t,i){t?e.setAttribute("reversed","reversed",i):e.removeAttribute("reversed",i)},getAttributeOnUpcast:e=>e.hasAttribute("reversed")}),e.startIndex&&t.push({attributeName:"listStart",defaultValue:1,addCommand(e){e.commands.add("listStart",new yt(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),setAttributeOnDowncast(e,t,i){0==t||t>1?e.setAttribute("start",t,i):e.removeAttribute("start",i)},getAttributeOnUpcast(e){const t=e.getAttribute("start");return t>=0?t:1}}),t}(e.config.get("list.properties"));t.schema.extend("listItem",{allowAttributes:i.map((e=>e.attributeName))});for(const t of i)t.addCommand(e);var o;this.listenTo(e.commands.get("indentList"),"_executeCleanup",function(e,t){return(i,o)=>{const n=o[0],r=n.getAttribute("listIndent"),s=o.filter((e=>e.getAttribute("listIndent")===r));let a=null;n.previousSibling.getAttribute("listIndent")+1!==r&&(a=me(n.previousSibling,{sameIndent:!0,direction:"backward",listIndent:r})),e.model.change((e=>{for(const i of s)for(const o of t)if(o.appliesToListItem(i)){const t=null==a?o.defaultValue:a.getAttribute(o.attributeName);e.setAttribute(o.attributeName,t,i)}}))}}(e,i)),this.listenTo(e.commands.get("outdentList"),"_executeCleanup",function(e,t){return(i,o)=>{if(!(o=o.reverse().filter((e=>e.is("element","listItem")))).length)return;const n=o[0].getAttribute("listIndent"),r=o[0].getAttribute("listType");let s=o[0].previousSibling;if(s.is("element","listItem"))for(;s.getAttribute("listIndent")!==n;)s=s.previousSibling;else s=null;s||(s=o[o.length-1].nextSibling),s&&s.is("element","listItem")&&s.getAttribute("listType")===r&&e.model.change((e=>{const i=o.filter((e=>e.getAttribute("listIndent")===n));for(const o of i)for(const i of t)if(i.appliesToListItem(o)){const t=i.attributeName,n=s.getAttribute(t);e.setAttribute(t,n,o)}}))}}(e,i)),this.listenTo(e.commands.get("bulletedList"),"_executeCleanup",Tt(e)),this.listenTo(e.commands.get("numberedList"),"_executeCleanup",Tt(e)),t.document.registerPostFixer(function(e,t){return i=>{let o=!1;const n=St(e.model.document.differ.getChanges()).filter((e=>"todo"!==e.getAttribute("listType")));if(!n.length)return o;let r=n[n.length-1].nextSibling;if((!r||!r.is("element","listItem"))&&(r=n[0].previousSibling,r)){const e=n[0].getAttribute("listIndent");for(;r.is("element","listItem")&&r.getAttribute("listIndent")!==e&&(r=r.previousSibling,r););}for(const e of t){const t=e.attributeName;for(const s of n)if(e.appliesToListItem(s))if(s.hasAttribute(t)){const n=s.previousSibling;Et(n,s,e.attributeName)&&(i.setAttribute(t,n.getAttribute(t),s),o=!0)}else At(r,s,e)?i.setAttribute(t,r.getAttribute(t),s):i.setAttribute(t,e.defaultValue,s),o=!0;else i.removeAttribute(t,s)}return o}}(e,i)),e.conversion.for("upcast").add((o=i,e=>{e.on("element:li",((e,t,i)=>{if(!t.modelRange)return;const n=t.viewItem.parent,r=t.modelRange.start.nodeAfter||t.modelRange.end.nodeBefore;for(const e of o)if(e.appliesToListItem(r)){const t=e.getAttributeOnUpcast(n);i.writer.setAttribute(e.attributeName,t,r)}}),{priority:"low"})})),e.conversion.for("downcast").add(function(e){return t=>{for(const i of e)t.on(`attribute:${i.attributeName}:listItem`,((e,t,o)=>{const n=o.writer,r=t.item,s=me(r.previousSibling,{sameIndent:!0,listIndent:r.getAttribute("listIndent"),direction:"backward"}),a=o.mapper.toViewElement(r);var l,c;l=r,(c=s)&&l.getAttribute("listType")===c.getAttribute("listType")&&l.getAttribute("listIndent")===c.getAttribute("listIndent")&&l.getAttribute("listStyle")===c.getAttribute("listStyle")&&l.getAttribute("listReversed")===c.getAttribute("listReversed")&&l.getAttribute("listStart")===c.getAttribute("listStart")||n.breakContainer(n.createPositionBefore(a)),i.setAttributeOnDowncast(n,t.attributeNewValue,a.parent)}),{priority:"low"})}}(i)),this._mergeListAttributesWhileMergingLists(i)}afterInit(){const e=this.editor;e.commands.get("todoList")&&e.model.document.registerPostFixer(function(e){return t=>{const i=St(e.model.document.differ.getChanges()).filter((e=>"todo"===e.getAttribute("listType")&&(e.hasAttribute("listStyle")||e.hasAttribute("listReversed")||e.hasAttribute("listStart"))));if(!i.length)return!1;for(const e of i)t.removeAttribute("listStyle",e),t.removeAttribute("listReversed",e),t.removeAttribute("listStart",e);return!0}}(e))}_mergeListAttributesWhileMergingLists(e){const t=this.editor.model;let i;this.listenTo(t,"deleteContent",((e,[t])=>{const o=t.getFirstPosition(),n=t.getLastPosition();if(o.parent===n.parent)return;if(!o.parent.is("element","listItem"))return;const r=n.parent.nextSibling;if(!r||!r.is("element","listItem"))return;const s=me(o.parent,{sameIndent:!0,listIndent:r.getAttribute("listIndent")});s&&s.getAttribute("listType")===r.getAttribute("listType")&&(i=s)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{i&&(t.change((t=>{const o=me(i.nextSibling,{sameIndent:!0,listIndent:i.getAttribute("listIndent"),direction:"forward"});if(!o)return void(i=null);const n=[o,...fe(t.createPositionAt(o,0),"forward")];for(const o of n)for(const n of e)if(n.appliesToListItem(o)){const e=n.attributeName,r=i.getAttribute(e);t.setAttribute(e,r,o)}})),i=null)}),{priority:"low"})}}function At(e,t,i){if(!e)return!1;const o=e.getAttribute(i.attributeName);return!!o&&o!=i.defaultValue&&e.getAttribute("listType")===t.getAttribute("listType")}function Et(e,t,i){if(!e||!e.is("element","listItem"))return!1;if(t.getAttribute("listType")!==e.getAttribute("listType"))return!1;const o=e.getAttribute("listIndent");if(o<1||o!==t.getAttribute("listIndent"))return!1;const n=e.getAttribute(i);return!(!n||n===t.getAttribute(i))}function Tt(e){return(t,i)=>{i=i.filter((e=>e.is("element","listItem"))),e.model.change((e=>{for(const t of i)e.removeAttribute("listStyle",t)}))}}function St(e){const t=[];for(const i of e){const e=Pt(i);e&&e.is("element","listItem")&&t.push(e)}return t}function Pt(e){return"attribute"===e.type?e.range.start.nodeAfter:"insert"===e.type?e.position.nodeAfter:null}class It extends o.Sy{static get requires(){return[xt,Je]}static get pluginName(){return"ListProperties"}}const Vt="todoListChecked";class Rt extends o.mY{constructor(e){super(e),this._selectedElements=[],this.on("execute",(()=>{this.refresh()}),{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every((e=>!!e.getAttribute(Vt))),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const e=this.editor.model,t=e.schema,i=e.document.selection.getFirstRange(),o=i.start.parent,n=[];t.checkAttribute(o,Vt)&&n.push(o);for(const e of i.getItems())t.checkAttribute(e,Vt)&&!n.includes(e)&&n.push(e);return n}execute(e={}){this.editor.model.change((t=>{for(const i of this._selectedElements)(void 0===e.forceValue?!this.value:e.forceValue)?t.setAttribute(Vt,!0,i):t.removeAttribute(Vt,i)}))}}const Ot=(e,t,i)=>{const o=t.modelCursor,n=o.parent,r=t.viewItem;if("checkbox"!=r.getAttribute("type")||"listItem"!=n.name||!o.isAtStart)return;if(!i.consumable.consume(r,{name:!0}))return;const s=i.writer;s.setAttribute("listType","todo",n),t.viewItem.hasAttribute("checked")&&s.setAttribute("todoListChecked",!0,n),t.modelRange=s.createRange(o)};function Bt(e){return(t,i)=>{const o=i.modelPosition,n=o.parent;if(!n.is("element","listItem")||"todo"!=n.getAttribute("listType"))return;const r=zt(i.mapper.toViewElement(n),e);r&&(i.viewPosition=i.mapper.findPositionIn(r,o.offset))}}function Mt(e,t,i,o){return t.createUIElement("label",{class:"todo-list__label",contenteditable:!1},(function(t){const n=(0,s.az)(document,"input",{type:"checkbox",tabindex:"-1"});i&&n.setAttribute("checked","checked"),n.addEventListener("change",(()=>o(e)));const r=this.toDomElement(t);return r.appendChild(n),r}))}function zt(e,t){const i=t.createRangeIn(e);for(const e of i)if(e.item.is("containerElement","span")&&e.item.hasClass("todo-list__label__description"))return e.item}const Nt=(0,s.Zz)("Ctrl+Enter");class Dt extends o.Sy{static get pluginName(){return"TodoListEditing"}static get requires(){return[bt]}init(){const e=this.editor,{editing:t,data:i,model:o}=e;o.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),o.schema.addAttributeCheck(((e,t)=>{const i=e.last;if("todoListChecked"==t&&"listItem"==i.name&&"todo"!=i.getAttribute("listType"))return!1})),e.commands.add("todoList",new et(e,"todo"));const n=new Rt(e);var r,a;e.commands.add("checkTodoList",n),e.commands.add("todoListCheck",n),i.downcastDispatcher.on("insert:listItem",function(e){return(t,i,o)=>{const n=o.consumable;if(!n.test(i.item,"insert")||!n.test(i.item,"attribute:listType")||!n.test(i.item,"attribute:listIndent"))return;if("todo"!=i.item.getAttribute("listType"))return;const r=i.item;n.consume(r,"insert"),n.consume(r,"attribute:listType"),n.consume(r,"attribute:listIndent"),n.consume(r,"attribute:todoListChecked");const s=o.writer,a=ce(r,o);s.addClass("todo-list",a.parent);const l=s.createContainerElement("label",{class:"todo-list__label"}),c=s.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),d=s.createContainerElement("span",{class:"todo-list__label__description"});r.getAttribute("todoListChecked")&&s.setAttribute("checked","checked",c),s.insert(s.createPositionAt(a,0),l),s.insert(s.createPositionAt(l,0),c),s.insert(s.createPositionAfter(c),d),de(r,a,o,e)}}(o),{priority:"high"}),i.upcastDispatcher.on("element:input",Ot,{priority:"high"}),t.downcastDispatcher.on("insert:listItem",function(e,t){return(i,o,n)=>{const r=n.consumable;if(!r.test(o.item,"insert")||!r.test(o.item,"attribute:listType")||!r.test(o.item,"attribute:listIndent"))return;if("todo"!=o.item.getAttribute("listType"))return;const s=o.item;r.consume(s,"insert"),r.consume(s,"attribute:listType"),r.consume(s,"attribute:listIndent"),r.consume(s,"attribute:todoListChecked");const a=n.writer,l=ce(s,n),c=!!s.getAttribute("todoListChecked"),d=Mt(s,a,c,t),u=a.createContainerElement("span",{class:"todo-list__label__description"});a.addClass("todo-list",l.parent),a.insert(a.createPositionAt(l,0),d),a.insert(a.createPositionAfter(d),u),de(s,l,n,e)}}(o,(e=>this._handleCheckmarkChange(e))),{priority:"high"}),t.downcastDispatcher.on("attribute:listType:listItem",(r=e=>this._handleCheckmarkChange(e),a=t.view,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const o=i.mapper.toViewElement(t.item),n=i.writer,s=function(e,t){const i=t.createRangeIn(e);for(const e of i)if(e.item.is("uiElement","label"))return e.item}(o,a);if("todo"==t.attributeNewValue){const e=!!t.item.getAttribute("todoListChecked"),i=Mt(t.item,n,e,r),s=n.createContainerElement("span",{class:"todo-list__label__description"}),a=n.createRangeIn(o),l=pe(o),c=he(a.start),d=l?n.createPositionBefore(l):a.end,u=n.createRange(c,d);n.addClass("todo-list",o.parent),n.move(u,n.createPositionAt(s,0)),n.insert(n.createPositionAt(o,0),i),n.insert(n.createPositionAfter(i),s)}else if("todo"==t.attributeOldValue){const e=zt(o,a);n.removeClass("todo-list",o.parent),n.remove(s),n.move(n.createRangeIn(e),n.createPositionBefore(e)),n.remove(e)}})),t.downcastDispatcher.on("attribute:todoListChecked:listItem",function(e){return(t,i,o)=>{if("todo"!=i.item.getAttribute("listType"))return;if(!o.consumable.consume(i.item,"attribute:todoListChecked"))return;const{mapper:n,writer:r}=o,s=!!i.item.getAttribute("todoListChecked"),a=n.toViewElement(i.item).getChild(0),l=Mt(i.item,r,s,e);r.insert(r.createPositionAfter(a),l),r.remove(a)}}((e=>this._handleCheckmarkChange(e)))),t.mapper.on("modelToViewPosition",Bt(t.view)),i.mapper.on("modelToViewPosition",Bt(t.view)),this.listenTo(t.view.document,"arrowKey",function(e,t){return(i,o)=>{if("left"!=(0,s.mA)(o.keyCode,t.contentLanguageDirection))return;const n=e.schema,r=e.document.selection;if(!r.isCollapsed)return;const a=r.getFirstPosition(),l=a.parent;if("listItem"===l.name&&"todo"==l.getAttribute("listType")&&a.isAtStart){const t=n.getNearestSelectionRange(e.createPositionBefore(l),"backward");t&&e.change((e=>e.setSelection(t))),o.preventDefault(),o.stopPropagation(),i.stop()}}}(o,e.locale),{context:"li"}),this.listenTo(t.view.document,"keydown",((t,i)=>{(0,s.Cq)(i)===Nt&&(e.execute("checkTodoList"),t.stop())}),{priority:"high"});const l=new Set;this.listenTo(o,"applyOperation",((e,t)=>{const i=t[0];if("rename"==i.type&&"listItem"==i.oldName){const e=i.position.nodeAfter;e.hasAttribute("todoListChecked")&&l.add(e)}else if("changeAttribute"==i.type&&"listType"==i.key&&"todo"===i.oldValue)for(const e of i.range.getItems())e.hasAttribute("todoListChecked")&&"todo"!==e.getAttribute("listType")&&l.add(e)})),o.document.registerPostFixer((e=>{let t=!1;for(const i of l)e.removeAttribute("todoListChecked",i),t=!0;return l.clear(),t}))}_handleCheckmarkChange(e){const t=this.editor,i=t.model,o=Array.from(i.document.selection.getRanges());i.change((i=>{i.setSelection(e,"end"),t.execute("checkTodoList"),i.setSelection(o)}))}}class Lt extends o.Sy{static get pluginName(){return"TodoListUI"}init(){const e=this.editor.t;ge(this.editor,"todoList",e("To-do List"),'')}}var Ft=i(9292),Ht={attributes:{"data-cke":!0}};Ht.setAttributes=Q(),Ht.insert=J().bind(null,"head"),Ht.domAPI=K(),Ht.insertStyleElement=ee(),$()(Ft.Z,Ht),Ft.Z&&Ft.Z.locals&&Ft.Z.locals;class Wt extends o.Sy{static get requires(){return[Dt,Lt]}static get pluginName(){return"TodoList"}}},9829:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Mention:()=>W,MentionEditing:()=>s,MentionUI:()=>O});var o=i(6854),n=i(6553);class r extends o.mY{refresh(){const e=this.editor.model,t=e.document;this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"mention")}execute(e){const t=this.editor.model,i=t.document.selection,o="string"==typeof e.mention?{id:e.mention}:e.mention,r=o.id,s=e.range||i.getFirstRange(),l=e.text||r,c=a({_text:l,id:r},o);if(1!=e.marker.length)throw new n.Bb("mentioncommand-incorrect-marker",this);if(r.charAt(0)!=e.marker)throw new n.Bb("mentioncommand-incorrect-id",this);t.change((e=>{const o=(0,n.qL)(i.getAttributes()),r=new Map(o.entries());r.set("mention",c),t.insertContent(e.createText(l,r),s),t.insertContent(e.createText(" ",o),s.start.getShiftedBy(l.length))}))}}class s extends o.Sy{static get pluginName(){return"MentionEditing"}init(){const e=this.editor,t=e.model,i=t.document;t.schema.extend("$text",{allowAttributes:"mention"}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",key:"data-mention",classes:"mention"},model:{key:"mention",value:e=>l(e)}}),e.conversion.for("downcast").attributeToElement({model:"mention",view:d}),e.conversion.for("downcast").add(c),i.registerPostFixer((e=>function(e,t,i){const o=t.differ.getChanges();let n=!1;for(const t of o){if("attribute"==t.type)continue;const o=t.position;if("$text"==t.name){const t=o.textNode&&o.textNode.nextSibling;n=h(o.textNode,e)||n,n=h(t,e)||n,n=h(o.nodeBefore,e)||n,n=h(o.nodeAfter,e)||n}if("$text"!=t.name&&"insert"==t.type){const t=o.nodeAfter;for(const i of e.createRangeIn(t).getItems())n=h(i,e)||n}if("insert"==t.type&&i.isInline(t.name)){const t=o.nodeAfter&&o.nodeAfter.nextSibling;n=h(o.nodeBefore,e)||n,n=h(t,e)||n}}return n}(e,i,t.schema))),i.registerPostFixer((e=>function(e,t){const i=t.differ.getChanges();let o=!1;for(const t of i)if("attribute"===t.type&&"mention"!=t.attributeKey){const i=t.range.start.nodeBefore,n=t.range.end.nodeAfter;for(const r of[i,n])u(r)&&r.getAttribute(t.attributeKey)!=t.attributeNewValue&&(e.setAttribute(t.attributeKey,t.attributeNewValue,r),o=!0)}return o}(e,i))),i.registerPostFixer((e=>function(e,t){const i=t.selection,o=i.focus;return!!(i.isCollapsed&&i.hasAttribute("mention")&&function(e){const t=e.isAtStart;return e.nodeBefore&&e.nodeBefore.is("$text")||t}(o))&&(e.removeSelectionAttribute("mention"),!0)}(e,i))),e.commands.add("mention",new r(e))}}function a(e,t){return Object.assign({uid:(0,n.hQ)()},e,t||{})}function l(e,t){const i=e.getAttribute("data-mention"),o=e.getChild(0);if(o)return a({id:i,_text:o.data},t)}function c(e){e.on("attribute:mention",((e,t,i)=>{const o=t.attributeNewValue;if(!t.item.is("$textProxy")||!o)return;const n=t.range.start;(n.textNode||n.nodeAfter).data!=o._text&&i.consumable.consume(t.item,e.name)}),{priority:"highest"})}function d(e,{writer:t}){if(!e)return;const i={class:"mention","data-mention":e.id},o={id:e.uid,priority:20};return t.createAttributeElement("span",i,o)}function u(e){return!(!e||!e.is("$text")&&!e.is("$textProxy")||!e.hasAttribute("mention"))&&e.data!=e.getAttribute("mention")._text}function h(e,t){return!!u(e)&&(t.removeAttribute("mention",e),!0)}var m=i(7095),g=i(5187),p=i(6682),f=i(3379),b=i.n(f),w=i(9037),k=i.n(w),_=i(569),v=i.n(_),y=i(8575),C=i.n(y),x=i(9216),A=i.n(x),E=i(9139),T={attributes:{"data-cke":!0}};T.setAttributes=C(),T.insert=v().bind(null,"head"),T.domAPI=k(),T.insertStyleElement=A(),b()(E.Z,T),E.Z&&E.Z.locals&&E.Z.locals;class S extends m.Bv{constructor(e){super(e),this.extendTemplate({attributes:{class:["ck-mentions"],tabindex:"-1"}})}selectFirst(){this.select(0)}selectNext(){const e=this.selected,t=this.items.getIndex(e);this.select(t+1)}selectPrevious(){const e=this.selected,t=this.items.getIndex(e);this.select(t-1)}select(e){let t=0;e>0&&e{i?(this.domElement.classList.add("ck-on"),this.domElement.classList.remove("ck-off")):(this.domElement.classList.add("ck-off"),this.domElement.classList.remove("ck-on"))})),this.listenTo(this.domElement,"click",(()=>{this.fire("execute")}))}render(){super.render(),this.element=this.domElement}}class I extends m.dn{highlight(){this.children.first.isOn=!0}removeHighlight(){this.children.first.isOn=!1}}const V=[n.Do.arrowup,n.Do.arrowdown,n.Do.esc],R=[n.Do.enter,n.Do.tab];class O extends o.Sy{static get pluginName(){return"MentionUI"}static get requires(){return[m.WB]}constructor(e){super(e),this._items=new n.FE,this._mentionsView=this._createMentionView(),this._mentionsConfigurations=new Map,this._requestFeedDebounced=(0,p.Z)(this._requestFeed,100),e.config.define("mention",{feeds:[]})}init(){const e=this.editor,t=e.config.get("mention.commitKeys")||R,i=V.concat(t);this._balloon=e.plugins.get(m.WB),e.editing.view.document.on("keydown",((e,o)=>{var r;r=o.keyCode,i.includes(r)&&this._isUIVisible&&(o.preventDefault(),e.stop(),o.keyCode==n.Do.arrowdown&&this._mentionsView.selectNext(),o.keyCode==n.Do.arrowup&&this._mentionsView.selectPrevious(),t.includes(o.keyCode)&&this._mentionsView.executeSelected(),o.keyCode==n.Do.esc&&this._hideUIAndRemoveMarker())}),{priority:"highest"}),(0,m.eC)({emitter:this._mentionsView,activator:()=>this._isUIVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUIAndRemoveMarker()});const o=e.config.get("mention.feeds");for(const e of o){const{feed:t,marker:i,dropdownLimit:o}=e;if(!D(i))throw new n.Bb("mentionconfig-incorrect-marker",null,{marker:i});const r={marker:i,feedCallback:"function"==typeof t?t.bind(this.editor):N(t),itemRenderer:e.itemRenderer,dropdownLimit:o};this._mentionsConfigurations.set(i,r)}this._setupTextWatcher(o),this.listenTo(e,"change:isReadOnly",(()=>{this._hideUIAndRemoveMarker()})),this.on("requestFeed:response",((e,t)=>this._handleFeedResponse(t))),this.on("requestFeed:error",(()=>this._hideUIAndRemoveMarker()))}destroy(){super.destroy(),this._mentionsView.destroy()}get _isUIVisible(){return this._balloon.visibleView===this._mentionsView}_createMentionView(){const e=this.editor.locale,t=new S(e);return t.items.bindTo(this._items).using((i=>{const{item:o,marker:n}=i,{dropdownLimit:r}=this._mentionsConfigurations.get(n),s=r||this.editor.config.get("mention.dropdownLimit")||10;if(t.items.length>=s)return null;const a=new I(e),l=this._renderItem(o,n);return l.delegate("execute").to(a),a.children.add(l),a.item=o,a.marker=n,a.on("execute",(()=>{t.fire("execute",{item:o,marker:n})})),a})),t.on("execute",((e,t)=>{const i=this.editor,o=i.model,n=t.item,r=t.marker,s=i.model.markers.get("mention"),a=o.createPositionAt(o.document.selection.focus),l=o.createPositionAt(s.getStart()),c=o.createRange(l,a);this._hideUIAndRemoveMarker(),i.execute("mention",{mention:n,text:n.text,marker:r,range:c}),i.editing.view.focus()})),t}_getItemRenderer(e){const{itemRenderer:t}=this._mentionsConfigurations.get(e);return t}_requestFeed(e,t){this._lastRequested=t;const{feedCallback:i}=this._mentionsConfigurations.get(e),o=i(t);o instanceof Promise?o.then((i=>{this._lastRequested==t?this.fire("requestFeed:response",{feed:i,marker:e,feedText:t}):this.fire("requestFeed:discarded",{feed:i,marker:e,feedText:t})})).catch((t=>{this.fire("requestFeed:error",{error:t}),(0,n.KE)("mention-feed-callback-error",{marker:e})})):this.fire("requestFeed:response",{feed:o,marker:e,feedText:t})}_setupTextWatcher(e){const t=this.editor,i=e.map((e=>({...e,pattern:z(e.marker,e.minimumCharacters||0)}))),o=new g.uL(t.model,function(e){return t=>{const i=M(e,t);if(!i)return!1;let o=0;0!==i.position&&(o=i.position-1);const n=t.substring(o);return i.pattern.test(n)}}(i));o.on("matched",((e,o)=>{const n=M(i,o.text),r=t.model.document.selection.focus,s=t.model.createPositionAt(r.parent,n.position);if(function(e){const t=e.textNode&&e.textNode.hasAttribute("mention"),i=e.nodeBefore;return t||i&&i.is("$text")&&i.hasAttribute("mention")}(r)||function(e){const t=e.nodeAfter;return t&&t.is("$text")&&t.hasAttribute("mention")}(s))return void this._hideUIAndRemoveMarker();const a=function(e,t){let i=0;0!==e.position&&(i=e.position-1);const o=z(e.marker,0);return t.substring(i).match(o)[2]}(n,o.text),l=n.marker.length+a.length,c=r.getShiftedBy(-l),d=r.getShiftedBy(-a.length),u=t.model.createRange(c,d);if(L(t)){const e=t.model.markers.get("mention");t.model.change((t=>{t.updateMarker(e,{range:u})}))}else t.model.change((e=>{e.addMarker("mention",{range:u,usingOperation:!1,affectsData:!1})}));this._requestFeedDebounced(n.marker,a)})),o.on("unmatched",(()=>{this._hideUIAndRemoveMarker()}));const n=t.commands.get("mention");return o.bind("isEnabled").to(n),o}_handleFeedResponse(e){const{feed:t,marker:i}=e;if(!L(this.editor))return;this._items.clear();for(const e of t){const t="object"!=typeof e?{id:e,text:e}:e;this._items.add({item:t,marker:i})}const o=this.editor.model.markers.get("mention");this._items.length?this._showOrUpdateUI(o):this._hideUIAndRemoveMarker()}_showOrUpdateUI(e){this._isUIVisible?this._balloon.updatePosition(this._getBalloonPanelPositionData(e,this._mentionsView.position)):this._balloon.add({view:this._mentionsView,position:this._getBalloonPanelPositionData(e,this._mentionsView.position),singleViewMode:!0}),this._mentionsView.position=this._balloon.view.position,this._mentionsView.selectFirst()}_hideUIAndRemoveMarker(){this._balloon.hasView(this._mentionsView)&&this._balloon.remove(this._mentionsView),L(this.editor)&&this.editor.model.change((e=>e.removeMarker("mention"))),this._mentionsView.position=void 0}_renderItem(e,t){const i=this.editor;let o,n=e.id;const r=this._getItemRenderer(t);if(r){const t=r(e);"string"!=typeof t?o=new P(i.locale,t):n=t}if(!o){const e=new m.r5(i.locale);e.label=n,e.withText=!0,o=e}return o}_getBalloonPanelPositionData(e,t){const i=this.editor,o=i.editing,r=o.view.domConverter,s=o.mapper;return{target:()=>{let t=e.getRange();"$graveyard"==t.start.root.rootName&&(t=i.model.document.selection.getFirstRange());const o=s.toViewRange(t);return n.UL.getDomRangeRects(r.viewRangeToDom(o)).pop()},limiter:()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},positions:B(t,i.locale.uiLanguageDirection)}}}function B(e,t){const i={caret_se:e=>({top:e.bottom+3,left:e.right,name:"caret_se",config:{withArrow:!1}}),caret_ne:(e,t)=>({top:e.top-t.height-3,left:e.right,name:"caret_ne",config:{withArrow:!1}}),caret_sw:(e,t)=>({top:e.bottom+3,left:e.right-t.width,name:"caret_sw",config:{withArrow:!1}}),caret_nw:(e,t)=>({top:e.top-t.height-3,left:e.right-t.width,name:"caret_nw",config:{withArrow:!1}})};return Object.prototype.hasOwnProperty.call(i,e)?[i[e]]:"rtl"!==t?[i.caret_se,i.caret_sw,i.caret_ne,i.caret_nw]:[i.caret_sw,i.caret_se,i.caret_nw,i.caret_ne]}function M(e,t){let i;for(const o of e){const e=t.lastIndexOf(o.marker);e>0&&!t.substring(e-1).match(o.pattern)||(!i||e>=i.position)&&(i={marker:o.marker,position:e,minimumCharacters:o.minimumCharacters,pattern:o.pattern})}return i}function z(e,t){const i=0==t?"*":`{${t},}`,o=n.OB.features.isRegExpUnicodePropertySupported?"\\p{Ps}\\p{Pi}\"'":"\\(\\[{\"'";return new RegExp(`(?:^|[ ${o}])([${e}])(.${i})$`,"u")}function N(e){return t=>e.filter((e=>("string"==typeof e?e:String(e.id)).toLowerCase().includes(t.toLowerCase())))}function D(e){return e&&1==e.length}function L(e){return e.model.markers.has("mention")}var F=i(8544),H={attributes:{"data-cke":!0}};H.setAttributes=C(),H.insert=v().bind(null,"head"),H.domAPI=k(),H.insertStyleElement=A(),b()(F.Z,H),F.Z&&F.Z.locals&&F.Z.locals;class W extends o.Sy{toMentionAttribute(e,t){return l(e,t)}static get pluginName(){return"Mention"}static get requires(){return[s,O]}}},4690:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Paragraph:()=>l,ParagraphButtonUI:()=>u});var o=i(7578),n=i(7732);class r extends o.Command{refresh(){const e=this.editor.model,t=e.document,i=(0,n.first)(t.selection.getSelectedBlocks());this.value=!!i&&i.is("element","paragraph"),this.isEnabled=!!i&&s(i,e.schema)}execute(e={}){const t=this.editor.model,i=t.document;t.change((o=>{const n=(e.selection||i.selection).getSelectedBlocks();for(const e of n)!e.is("element","paragraph")&&s(e,t.schema)&&o.rename(e,"paragraph")}))}}function s(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class a extends o.Command{execute(e){const t=this.editor.model,i=e.attributes;let o=e.position;t.change((e=>{const n=e.createElement("paragraph");if(i&&t.schema.setAllowedAttributes(n,i,e),!t.schema.checkChild(o.parent,n)){const i=t.schema.findAllowedParent(o,n);if(!i)return;o=e.split(o,i).position}t.insertContent(n,o),e.setSelection(n,"in")}))}}class l extends o.Plugin{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new r(e)),e.commands.add("insertParagraph",new a(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>l.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}l.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);var c=i(3905);const d=o.icons.paragraph;class u extends o.Plugin{static get requires(){return[l]}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("paragraph",(i=>{const o=new c.ButtonView(i),n=e.commands.get("paragraph");return o.label=t("Paragraph"),o.icon=d,o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(n),o.bind("isOn").to(n,"value"),o.on("execute",(()=>{e.execute("paragraph")})),o}))}}},189:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PasteFromOffice:()=>b});var o=i(6854),n=i(7197),r=i(3291);function s(e,t,i,{blockElements:o,inlineObjectElements:n}){let r=i.createPositionAt(e,"forward"==t?"after":"before");return r=r.getLastMatchingPosition((({item:e})=>e.is("element")&&!o.includes(e.name)&&!n.includes(e.name)),{direction:t}),"forward"==t?r.nodeAfter:r.nodeBefore}function a(e,t){return!!e&&e.is("element")&&t.includes(e.name)}function l(e){if(e.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(e){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return e;default:return null}}function c(e,t,i){const o=t.parent,n=i.createElement(e.type),r=o.getChildIndex(t)+1;return i.insertChild(r,n,o),e.style&&i.setStyle("list-style-type",e.style,n),e.startIndex&&e.startIndex>1&&i.setAttribute("start",e.startIndex,n),n}function d(e){const t={},i=e.getStyle("mso-list");if(i){const e=i.match(/(^|\s{1,100})l(\d+)/i),o=i.match(/\s{0,100}lfo(\d+)/i),n=i.match(/\s{0,100}level(\d+)/i);e&&o&&n&&(t.id=e[2],t.order=o[1],t.indent=parseInt(n[1]))}return t}const u=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class h{constructor(e){this.document=e}isActive(e){return u.test(e)}execute(e){const t=new r.yj(this.document),{body:i}=e._parsedData;!function(e,t){for(const i of e.getChildren())if(i.is("element","b")&&"normal"===i.getStyle("font-weight")){const o=e.getChildIndex(i);t.remove(i),t.insertChild(o,i.getChildren(),e)}}(i,t),function(e,t){for(const i of t.createRangeIn(e)){const e=i.item;if(e.is("element","li")){const i=e.getChild(0);i&&i.is("element","p")&&t.unwrapElement(i)}}}(i,t),function(e,t){const i=new r.Ux(t.document.stylesProcessor),o=new r.pG(i,{renderingMode:"data"}),n=o.blockElements,l=o.inlineObjectElements,c=[];for(const i of t.createRangeIn(e)){const e=i.item;if(e.is("element","br")){const i=s(e,"forward",t,{blockElements:n,inlineObjectElements:l}),o=s(e,"backward",t,{blockElements:n,inlineObjectElements:l}),r=a(i,n);(a(o,n)||r)&&c.push(e)}}for(const e of c)e.hasClass("Apple-interchange-newline")?t.remove(e):t.replace(e,t.createElement("p"))}(i,t),e.content=i}}const m=//i,g=/xmlns:o="urn:schemas-microsoft-com/i;class p{constructor(e){this.document=e}isActive(e){return m.test(e)||g.test(e)}execute(e){const{body:t,stylesString:i}=e._parsedData;(function(e,t){if(!e.childCount)return;const i=new r.yj(e.document),o=function(e,t){const i=t.createRangeIn(e),o=new r.xO({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),n=[];for(const e of i)if("elementStart"===e.type&&o.match(e.item)){const t=d(e.item);n.push({element:e.item,id:t.id,order:t.order,indent:t.indent})}return n}(e,i);if(!o.length)return;let n=null,s=1;o.forEach(((e,a)=>{const d=function(e,t){if(!e)return!0;if(e.id!==t.id)return t.indent-e.indent!=1;const i=t.element.previousSibling;return!i||!((o=i).is("element","ol")||o.is("element","ul"));var o}(o[a-1],e),u=(m=e,(h=d?null:o[a-1])?m.indent-h.indent:m.indent-1);var h,m;if(d&&(n=null,s=1),!n||0!==u){const o=function(e,t){const i=/mso-level-number-format:([^;]{0,100});/gi,o=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,n=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi").exec(t);let r="decimal",s="ol",a=null;if(n&&n[1]){const t=i.exec(n[1]);if(t&&t[1]&&(r=t[1].trim(),s="bullet"!==r&&"image"!==r?"ol":"ul"),"bullet"===r){const t=function(e){const t=function(e){if(e.getChild(0).is("$text"))return null;for(const t of e.getChildren()){if(!t.is("element","span"))continue;const e=t.getChild(0);if(e)return e.is("$text")?e:e.getChild(0)}return null}(e);if(!t)return null;const i=t._data;return"o"===i?"circle":"·"===i?"disc":"§"===i?"square":null}(e.element);t&&(r=t)}else{const e=o.exec(n[1]);e&&e[1]&&(a=parseInt(e[1]))}}return{type:s,startIndex:a,style:l(r)}}(e,t);if(n){if(e.indent>s){const e=n.getChild(n.childCount-1),t=e.getChild(e.childCount-1);n=c(o,t,i),s+=1}else if(e.indente.indexOf(t)>-1))?s.push(i):i.getAttribute("src")||s.push(i)}for(const e of s)i.remove(e)}(o,e,i),function(e,t,i){const o=i.createRangeIn(t),n=[];for(const t of o)if("elementStart"==t.type&&t.item.is("element","v:shape")){const i=t.item.getAttribute("id");if(e.includes(i))continue;r(t.item.parent.getChildren(),i)||n.push(t.item)}for(const e of n){const t={src:s(e)};e.hasAttribute("alt")&&(t.alt=e.getAttribute("alt"));const o=i.createElement("img",t);i.insertChild(e.index+1,o,e.parent)}function r(e,t){for(const i of e)if(i.is("element")){if("img"==i.name&&i.getAttribute("v:shapes")==t)return!0;if(r(i.getChildren(),t))return!0}return!1}function s(e){for(const t of e.getChildren())if(t.is("element")&&t.getAttribute("src"))return t.getAttribute("src")}}(o,e,i),function(e,t){const i=t.createRangeIn(e),o=new r.xO({name:/v:(.+)/}),n=[];for(const e of i)"elementStart"==e.type&&o.match(e.item)&&n.push(e.item);for(const e of n)t.remove(e)}(e,i);const n=function(e,t){const i=t.createRangeIn(e),o=new r.xO({name:"img"}),n=[];for(const e of i)e.item.is("element")&&o.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&n.push(e.item);return n}(e,i);n.length&&function(e,t,i){if(e.length===t.length)for(let n=0;nString.fromCharCode(parseInt(e,16)))).join(""))}`;i.setAttribute("src",r,e[n])}var o}(n,function(e){if(!e)return[];const t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,i=new RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),o=e.match(i),n=[];if(o)for(const e of o){let i=!1;e.includes("\\pngblip")?i="image/png":e.includes("\\jpegblip")&&(i="image/jpeg"),i&&n.push({hex:e.replace(t,"").replace(/[^\da-fA-F]/g,""),type:i})}return n}(t),i)}(t,e.dataTransfer.getData("text/rtf")),e.content=t}}function f(e){return e.replace(/(\s+)<\/span>/g,((e,t)=>1===t.length?" ":Array(t.length+1).join("  ").substr(0,t.length)))}class b extends o.Sy{static get pluginName(){return"PasteFromOffice"}static get requires(){return[n._l]}init(){const e=this.editor,t=e.plugins.get("ClipboardPipeline"),i=e.editing.view.document,o=[];o.push(new p(i)),o.push(new h(i)),t.on("inputTransformation",((t,n)=>{if(n._isTransformedWithPasteFromOffice)return;if(e.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const s=n.dataTransfer.getData("text/html"),a=o.find((e=>e.isActive(s)));a&&(n._parsedData=function(e,t){const i=new DOMParser,o=function(e){return f(f(e)).replace(/([^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/ <\//g," <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)<")}(function(e){const t="",i=e.indexOf(t);if(i<0)return e;const o=e.indexOf("",i+7);return e.substring(0,i+7)+(o>=0?e.substring(o):"")}(e=e.replace(//g,"")}(o.getData("text/html")):o.getData("text/plain")&&(((s=(s=o.getData("text/plain")).replace(//g,">").replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
").replace(/\t/g,"    ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).includes("

")||s.includes("
"))&&(s=`

${s}

`),e=s),r=this.editor.data.htmlProcessor.toView(e)}var s;const a=new n.EventInfo(this,"inputTransformation");this.fire(a,{content:r,dataTransfer:o,targetRanges:t.targetRanges,method:t.method}),a.stop.called&&e.stop(),i.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,i)=>{if(i.content.isEmpty)return;const o=this.editor.data.toModel(i.content,"$clipboardHolder");0!=o.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:o,method:i.method,dataTransfer:i.dataTransfer,targetRanges:i.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,i)=>{i.resultRange=t.insertContent(i.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,i=e.editing.view.document,o=(o,n)=>{const r=n.dataTransfer;n.preventDefault();const s=e.data.toView(e.model.getSelectedContent(t.selection));i.fire("clipboardOutput",{dataTransfer:r,content:s,method:o.name})};this.listenTo(i,"copy",o,{priority:"low"}),this.listenTo(i,"cut",((t,i)=>{e.isReadOnly?i.preventDefault():o(t,i)}),{priority:"low"}),this.listenTo(i,"clipboardOutput",((i,o)=>{o.content.isEmpty||(o.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(o.content)),o.dataTransfer.setData("text/plain",l(o.content))),"cut"==o.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}var d=i(4156),u=i(111),h=i(3379),m=i.n(h),g=i(9037),p=i.n(g),f=i(569),b=i.n(f),w=i(8575),k=i.n(w),_=i(9216),v=i.n(_),y=i(799),C={attributes:{"data-cke":!0}};C.setAttributes=k(),C.insert=b().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=v(),m()(y.Z,C),y.Z&&y.Z.locals&&y.Z.locals;class x extends o.Plugin{static get pluginName(){return"DragDrop"}static get requires(){return[c,d.Widget]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=(0,u.Z)((e=>this._updateDropMarker(e)),40),this._removeDropMarkerDelayed=T((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=T((()=>this._clearDraggableAttributes()),40),t.addObserver(s),t.addObserver(r.MouseObserver),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,i)=>{i?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,i)=>{i||this._finalizeDragging(!1)})),n.env.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,i=t.document,o=e.editing.view,s=o.document;this.listenTo(s,"dragstart",((o,a)=>{const l=i.selection;if(a.target&&a.target.is("editableElement"))return void a.preventDefault();const c=a.target?S(a.target):null;if(c){const i=e.editing.mapper.toModelElement(c);this._draggedRange=r.LiveRange.fromRange(t.createRangeOn(i)),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!s.selection.isCollapsed){const e=s.selection.getSelectedElement();e&&(0,d.isWidget)(e)||(this._draggedRange=r.LiveRange.fromRange(l.getFirstRange()))}if(!this._draggedRange)return void a.preventDefault();this._draggingUid=(0,n.uid)(),a.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",a.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const u=t.createSelection(this._draggedRange.toRange()),h=e.data.toView(t.getSelectedContent(u));s.fire("clipboardOutput",{dataTransfer:a.dataTransfer,content:h,method:"dragstart"}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(s,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(s,"dragenter",(()=>{this.isEnabled&&o.focus()})),this.listenTo(s,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(s,"dragging",((t,i)=>{if(!this.isEnabled)return void(i.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const o=A(e,i.targetRanges,i.target);this._draggedRange||(i.dataTransfer.dropEffect="copy"),n.env.isGecko||("copy"==i.dataTransfer.effectAllowed?i.dataTransfer.dropEffect="copy":["all","copyMove"].includes(i.dataTransfer.effectAllowed)&&(i.dataTransfer.dropEffect="move")),o&&this._updateDropMarkerThrottled(o)}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",((t,i)=>{if("drop"!=i.method)return;const o=A(e,i.targetRanges,i.target);return this._removeDropMarker(),o?(this._draggedRange&&this._draggingUid!=i.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),"move"==E(i.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(o,!0)?(this._finalizeDragging(!1),void t.stop()):void(i.targetRanges=[e.editing.mapper.toViewRange(o)])):(this._finalizeDragging(!1),void t.stop())}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(c);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const i=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(i)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const i="move"==E(t.dataTransfer),o=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(o&&i)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,i=t.document;this.listenTo(i,"mousedown",((o,r)=>{if(n.env.isAndroid||!r)return;this._clearDraggableAttributesDelayed.cancel();let s=S(r.target);if(n.env.isBlink&&!e.isReadOnly&&!s&&!i.selection.isCollapsed){const e=i.selection.getSelectedElement();e&&(0,d.isWidget)(e)||(s=i.selection.editableElement)}s&&(t.change((e=>{e.setAttribute("draggable","true",s)})),this._draggableElement=e.editing.mapper.toModelElement(s))})),this.listenTo(i,"mouseup",(()=>{n.env.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_setupDropMarker(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:i})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return i.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("⁠",e.createElement("span"),"⁠"),t}))}})}_updateDropMarker(e){const t=this.editor,i=t.model.markers;t.model.change((t=>{i.has("drop-target")?i.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const e=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_finalizeDragging(e){const t=this.editor,i=t.model;this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&i.deleteContent(i.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function A(e,t,i){const o=e.model,r=e.editing.mapper;let s=null;const a=t?t[0].start:null;if(i.is("uiElement")&&(i=i.parent),s=function(e,t){const i=e.model,o=e.editing.mapper;if((0,d.isWidget)(t))return i.createRangeOn(o.toModelElement(t));if(!t.is("editableElement")){const e=t.findAncestor((e=>(0,d.isWidget)(e)||e.is("editableElement")));if((0,d.isWidget)(e))return i.createRangeOn(o.toModelElement(e))}return null}(e,i),s)return s;const l=function(e,t){const i=e.editing.mapper,o=e.editing.view,n=i.toModelElement(t);if(n)return n;const r=o.createPositionBefore(t),s=i.findMappedViewAncestor(r);return i.toModelElement(s)}(e,i),c=a?r.toModelPosition(a):null;return c?(s=function(e,t,i){const o=e.model;if(!o.schema.checkChild(i,"$block"))return null;const n=o.createPositionAt(i,0),r=t.path.slice(0,n.path.length),s=o.createPositionFromPath(t.root,r).nodeAfter;return s&&o.schema.isObject(s)?o.createRangeOn(s):null}(e,c,l),s||(s=o.schema.getNearestSelectionRange(c,n.env.isGecko?"forward":"backward"),s||function(e,t){const i=e.model;let o=t;for(;o;){if(i.schema.isObject(o))return i.createRangeOn(o);o=o.parent}return null}(e,c.parent))):function(e,t){const i=e.model,o=i.schema,n=i.createPositionAt(t,0);return o.getNearestSelectionRange(n,"forward")}(e,l)}function E(e){return n.env.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function T(e,t){let i;function o(...n){o.cancel(),i=setTimeout((()=>e(...n)),t)}return o.cancel=()=>{clearTimeout(i)},o}function S(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(d.isWidget);if((0,d.isWidget)(e))return e;const t=e.findAncestor((e=>(0,d.isWidget)(e)||e.is("editableElement")));return(0,d.isWidget)(t)?t:null}class P extends o.Plugin{static get pluginName(){return"PastePlainText"}static get requires(){return[c]}init(){const e=this.editor,t=e.model,i=e.editing.view,o=i.document,n=t.document.selection;let r=!1;i.addObserver(s),this.listenTo(o,"keydown",((e,t)=>{r=t.shiftKey})),e.plugins.get(c).on("contentInsertion",((e,i)=>{(r||function(e,t){if(e.childCount>1)return!1;const i=e.getChild(0);return!t.isObject(i)&&0==Array.from(i.getAttributeKeys()).length}(i.content,t.schema))&&t.change((e=>{const o=Array.from(n.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));n.isCollapsed||t.deleteContent(n,{doNotAutoparagraph:!0}),o.push(...n.getAttributes());const r=e.createRangeIn(i.content);for(const t of r.getItems())t.is("$textProxy")&&e.setAttributes(o,t)}))}))}}class I extends o.Plugin{static get pluginName(){return"Clipboard"}static get requires(){return[c,x,P]}}},6854:(e,t,i)=>{"use strict";i.d(t,{AJ:()=>o.MultiCommand,ML:()=>o.Editor,P$:()=>o.attachToForm,Sy:()=>o.Plugin,W9:()=>o.DataApiMixin,_y:()=>o.Context,icons:()=>o.icons,lR:()=>o.PendingActions,mY:()=>o.Command,xK:()=>o.ElementApiMixin});var o=i(7578)},3291:(e,t,i)=>{"use strict";i.d(t,{$_:()=>o.hidePlaceholder,D5:()=>o.isColor,G9:()=>o.isLength,ID:()=>o.enablePlaceholder,J8:()=>o.addPaddingRules,KU:()=>o.ClickObserver,NJ:()=>o.showPlaceholder,Po:()=>o.TreeWalker,Q7:()=>o.needsPlaceholder,QR:()=>o.addBackgroundRules,Qj:()=>o.Observer,Ux:()=>o.ViewDocument,W_:()=>o.Element,YG:()=>o.getFillerOffset,dM:()=>o.MouseObserver,iE:()=>o.LiveRange,jP:()=>o.LivePosition,pG:()=>o.DomConverter,qD:()=>o.DowncastWriter,qZ:()=>o.DomEventObserver,sI:()=>o.addBorderRules,vt:()=>o.addMarginRules,xO:()=>o.Matcher,yj:()=>o.UpcastWriter,zz:()=>o.isPercentage});var o=i(600)},1863:(e,t,i)=>{"use strict";i.d(t,{C:()=>o.C,G:()=>o.G});var o=i(5725)},5187:(e,t,i)=>{"use strict";i.d(t,{HG:()=>o.HG,II:()=>o.II,Im:()=>o.Im,Mq:()=>o.Mq,Up:()=>o.Up,VD:()=>o.VD,mh:()=>o.mh,uL:()=>o.uL});var o=i(3701)},7095:(e,t,i)=>{"use strict";i.d(t,{$y:()=>o.ToolbarSeparatorView,BM:()=>o.SwitchButtonView,Bv:()=>o.ListView,Dn:()=>o.LabelView,FH:()=>o.createLabeledDropdown,G7:()=>o.View,GI:()=>o.submitHandler,Gp:()=>o.FormHeaderView,Hn:()=>o.Model,I0:()=>o.FocusCycler,IJ:()=>o.addKeyboardHandlingForGrid,J0:()=>o.DropdownButtonView,J6:()=>o.ColorGridView,KP:()=>o.LabeledFieldView,Mh:()=>o.focusChildOnDropdownOpen,P_:()=>o.Notification,Pm:()=>o.addListToDropdown,R:()=>o.createLabeledInputText,RX:()=>o.CssTransitionDisablerMixin,Rm:()=>o.SplitButtonView,S1:()=>o.normalizeColorOptions,S8:()=>o.EditorUI,WB:()=>o.ContextualBalloon,YS:()=>o.Template,_9:()=>o.ColorTileView,dn:()=>o.ListItemView,eC:()=>o.clickOutsideHandler,iw:()=>o.normalizeToolbarConfig,jB:()=>o.ToolbarView,k6:()=>o.getLocalizedColorOptions,lp:()=>o.StickyPanelView,no:()=>o.BalloonPanelView,pq:()=>o.InputTextView,py:()=>o.BoxedEditorUIView,r1:()=>o.InlineEditableUIView,r5:()=>o.ButtonView,sh:()=>o.createLabeledInputNumber,t9:()=>o.createDropdown,up:()=>o.addToolbarToDropdown,vX:()=>o.ViewCollection});var o=i(3905)},1903:(e,t,i)=>{"use strict";i.d(t,{WP:()=>o.Undo});var o=i(8779)},6553:(e,t,i)=>{"use strict";i.d(t,{Bb:()=>o.CKEditorError,CO:()=>o.global,Cq:()=>o.getCode,Do:()=>o.keyCodes,FE:()=>o.Collection,KE:()=>o.logWarning,OB:()=>o.env,Ps:()=>o.first,Re:()=>o.ObservableMixin,Rh:()=>o.FocusTracker,UL:()=>o.Rect,VD:()=>o.KeystrokeHandler,Xu:()=>o.DomEmitterMixin,Zz:()=>o.parseKeystroke,a6:()=>o.ElementReplacer,az:()=>o.createElement,hQ:()=>o.uid,mA:()=>o.getLocalizedArrowKeyCodeDirection,qL:()=>o.toMap,qo:()=>o.toArray,tA:()=>o.priorities,yy:()=>o.getDataFromElement});var o=i(7732)},5549:(e,t,i)=>{"use strict";i.d(t,{$L:()=>o.Widget,KT:()=>o.findOptimalInsertionRange,Qd:()=>o.isWidget,WR:()=>o.WidgetResize,XC:()=>o.toWidget,e8:()=>o.WidgetToolbarRepository,sC:()=>o.toWidgetEditable});var o=i(4156)},5363:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}",""]);const a=s},3789:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}",""]);const a=s},799:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}',""]);const a=s},3229:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content pre{background:hsla(0,0%,78%,.3);border:1px solid #c4c4c4;border-radius:2px;color:#353535;direction:ltr;font-style:normal;min-width:200px;padding:1em;tab-size:4;text-align:left;white-space:pre-wrap}.ck-content pre code{background:unset;border-radius:0;padding:0}.ck.ck-editor__editable pre{position:relative}.ck.ck-editor__editable pre[data-language]:after{content:attr(data-language);position:absolute}:root{--ck-color-code-block-label-background:#757575}.ck.ck-editor__editable pre[data-language]:after{background:var(--ck-color-code-block-label-background);color:#fff;font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);right:10px;top:-1px;white-space:nowrap}.ck.ck-code-block-dropdown .ck-dropdown__panel{max-height:250px;overflow-x:hidden;overflow-y:auto}",""]);const a=s},3624:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}",""]);const a=s},7372:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}",""]);const a=s},5037:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}",""]);const a=s},8915:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-button.ck-color-table__remove-color{align-items:center;display:flex;width:100%}label.ck.ck-color-grid__label{font-weight:unset}.ck .ck-button.ck-color-table__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}",""]);const a=s},5991:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content .text-tiny{font-size:.7em}.ck-content .text-small{font-size:.85em}.ck-content .text-big{font-size:1.4em}.ck-content .text-huge{font-size:1.8em}",""]);const a=s},4249:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}",""]);const a=s},7263:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-highlight-marker-yellow:#fdfd77;--ck-highlight-marker-green:#62f962;--ck-highlight-marker-pink:#fc7899;--ck-highlight-marker-blue:#72ccfd;--ck-highlight-pen-red:#e71313;--ck-highlight-pen-green:#128a00}.ck-content .marker-yellow{background-color:var(--ck-highlight-marker-yellow)}.ck-content .marker-green{background-color:var(--ck-highlight-marker-green)}.ck-content .marker-pink{background-color:var(--ck-highlight-marker-pink)}.ck-content .marker-blue{background-color:var(--ck-highlight-marker-blue)}.ck-content .pen-red{background-color:transparent;color:var(--ck-highlight-pen-red)}.ck-content .pen-green{background-color:transparent;color:var(--ck-highlight-pen-green)}",""]);const a=s},9893:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-editor__editable .ck-horizontal-line{display:flow-root}.ck-content hr{background:#dedede;border:0;height:4px;margin:15px 0}",""]);const a=s},7319:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-widget.raw-html-embed{display:flow-root;font-style:normal;margin:.9em auto;min-width:15em;position:relative}.ck-widget.raw-html-embed:before{position:absolute;z-index:1}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{display:flex;flex-direction:column;position:absolute}.ck-widget.raw-html-embed .raw-html-embed__preview{display:flex;overflow:hidden;position:relative}.ck-widget.raw-html-embed .raw-html-embed__preview-content{border-collapse:separate;border-spacing:7px;display:table;margin:auto;position:relative;width:100%}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}:root{--ck-html-embed-content-width:calc(100% - var(--ck-icon-size)*1.5);--ck-html-embed-source-height:10em;--ck-html-embed-unfocused-outline-width:1px;--ck-html-embed-content-min-height:calc(var(--ck-icon-size) + var(--ck-spacing-standard));--ck-html-embed-source-disabled-background:var(--ck-color-base-foreground);--ck-html-embed-source-disabled-color:#737373}.ck-widget.raw-html-embed{background-color:var(--ck-color-base-foreground);font-size:var(--ck-font-size-base)}.ck-widget.raw-html-embed:not(.ck-widget_selected):not(:hover){outline:var(--ck-html-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border)}.ck-widget.raw-html-embed[dir=ltr]{text-align:left}.ck-widget.raw-html-embed[dir=rtl]{text-align:right}.ck-widget.raw-html-embed:before{background:#999;border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius);color:var(--ck-color-base-background);content:attr(data-html-embed-label);font-family:var(--ck-font-face);font-size:var(--ck-font-size-tiny);left:var(--ck-spacing-standard);padding:calc(var(--ck-spacing-tiny) + var(--ck-html-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);top:calc(var(--ck-html-embed-unfocused-outline-width)*-1);transition:background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck-widget.raw-html-embed[dir=rtl]:before{left:auto;right:var(--ck-spacing-standard)}.ck-widget.raw-html-embed[dir=ltr] .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before{margin-left:50px}.ck.ck-editor__editable.ck-blurred .ck-widget.raw-html-embed.ck-widget_selected:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable:not(.ck-blurred) .ck-widget.raw-html-embed.ck-widget_selected:before{background:var(--ck-color-focus-border);padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable .ck-widget.raw-html-embed:not(.ck-widget_selected):hover:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck-widget.raw-html-embed .raw-html-embed__content-wrapper{padding:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{right:var(--ck-spacing-standard);top:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__save-button{color:var(--ck-color-button-save)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__cancel-button{color:var(--ck-color-button-cancel)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button:not(:first-child){margin-top:var(--ck-spacing-small)}.ck-widget.raw-html-embed[dir=rtl] .raw-html-embed__buttons-wrapper{left:var(--ck-spacing-standard);right:auto}.ck-widget.raw-html-embed .raw-html-embed__source{box-sizing:border-box;direction:ltr;font-family:monospace;font-size:var(--ck-font-size-base);height:var(--ck-html-embed-source-height);min-width:0;padding:var(--ck-spacing-standard);resize:none;tab-size:4;text-align:left;white-space:pre-wrap;width:var(--ck-html-embed-content-width)}.ck-widget.raw-html-embed .raw-html-embed__source[disabled]{-webkit-text-fill-color:var(--ck-html-embed-source-disabled-color);background:var(--ck-html-embed-source-disabled-background);color:var(--ck-html-embed-source-disabled-color);opacity:1}.ck-widget.raw-html-embed .raw-html-embed__preview{min-height:var(--ck-html-embed-content-min-height);width:var(--ck-html-embed-content-width)}.ck-editor__editable:not(.ck-read-only) .ck-widget.raw-html-embed .raw-html-embed__preview{pointer-events:none}.ck-widget.raw-html-embed .raw-html-embed__preview-content{background-color:var(--ck-color-base-foreground);box-sizing:border-box}.ck-widget.raw-html-embed .raw-html-embed__preview-content>*{margin-left:auto;margin-right:auto}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{color:var(--ck-html-embed-source-disabled-color)}",""]);const a=s},2430:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{align-items:flex-start;display:inline-flex;max-width:100%}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}.ck.ck-editor__editable .image-inline.ck-widget_selected,.ck.ck-editor__editable .image.ck-widget_selected{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}",""]);const a=s},2423:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highligted-background:#fd0}.ck-content .image>figcaption{background-color:var(--ck-color-image-caption-background);caption-side:bottom;color:var(--ck-color-image-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;word-break:break-word}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highligted-background)}to{background-color:var(--ck-color-image-caption-background)}}",""]);const a=s},8879:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-image-insert__panel{padding:var(--ck-spacing-large)}.ck.ck-image-insert__ck-finder-button{border:1px solid #ccc;border-radius:var(--ck-border-radius);display:block;margin:var(--ck-spacing-standard) auto;width:100%}.ck.ck-splitbutton>.ck-file-dialog-button.ck-button{border:none;margin:0;padding:0}",""]);const a=s},8340:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-image-insert-form:focus{outline:none}.ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-image-insert-form__action-row{margin-top:var(--ck-spacing-standard)}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const a=s},2400:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content .image.image_resized{box-sizing:border-box;display:block;max-width:100%}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}",""]);const a=s},3534:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-block-align-right{margin-left:auto;margin-right:0}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-bottom:var(--ck-inline-image-style-spacing);margin-top:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}",""]);const a=s},1547:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck-image-upload-complete-icon{border-radius:50%;display:block;position:absolute;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);z-index:1}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{animation-delay:0ms,3s;animation-duration:.5s,.5s;animation-fill-mode:forwards,forwards;animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;background:var(--ck-color-image-upload-icon-background);font-size:calc(1px*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));opacity:0;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.ck-image-upload-complete-icon:after{animation-delay:.5s;animation-duration:.5s;animation-fill-mode:forwards;animation-name:ck-upload-complete-icon-check;border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);box-sizing:border-box;height:0;left:25%;opacity:0;top:50%;transform:scaleX(-1) rotate(135deg);transform-origin:left top;width:0}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{height:0;opacity:1;width:0}33%{height:0;width:.3em}to{height:.45em;opacity:1;width:.3em}}',""]);const a=s},6618:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck .ck-upload-placeholder-loader{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px;--ck-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{margin:0;width:100%}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.ck .ck-upload-placeholder-loader{height:100%;width:100%}.ck .ck-upload-placeholder-loader:before{animation:ck-upload-placeholder-loader 1s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:3px solid var(--ck-color-upload-placeholder-loader);height:var(--ck-upload-placeholder-loader-size);width:var(--ck-upload-placeholder-loader-size)}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}',""]);const a=s},2926:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{left:0;position:absolute;top:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{background:var(--ck-color-upload-bar-background);height:2px;transition:width .1s;width:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}",""]);const a=s},5269:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}",""]);const a=s},3925:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}",""]);const a=s},7536:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}",""]);const a=s},4874:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical>.ck-button{border-radius:0;margin:0;padding:var(--ck-spacing-standard);width:50%}.ck.ck-link-form_layout-vertical>.ck-button:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form_layout-vertical>.ck-button,[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}",""]);const a=s},4330:(e,t,i)=>{"use strict";i.d(t,{Z:()=>h});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r),a=i(1667),l=i.n(a),c=new URL(i(8491),i.b),d=s()(n()),u=l()(c);d.push([e.id,".ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{display:block;position:absolute}:root{--ck-link-image-indicator-icon-size:20;--ck-link-image-indicator-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{background-color:rgba(0,0,0,.4);background-image:url("+u+');background-position:50%;background-repeat:no-repeat;background-size:14px;border-radius:100%;content:"";height:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size));overflow:hidden;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);width:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size))}',""]);const h=d},5782:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;color:inherit;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:0 var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}",""]);const a=s},3190:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}",""]);const a=s},4784:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:disc}.ck-content ul ul{list-style-type:circle}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}",""]);const a=s},9938:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}",""]);const a=s},2591:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}",""]);const a=s},9292:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out;width:100%}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable .todo-list .todo-list__label>input{cursor:pointer}.ck-editor__editable .todo-list .todo-list__label>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}',""]);const a=s},8544:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-mention-background:rgba(153,0,48,.1);--ck-color-mention-text:#990030}.ck-content .mention{background:var(--ck-color-mention-background);color:var(--ck-color-mention-text)}",""]);const a=s},9139:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-mention-list-max-height:300px}.ck.ck-mentions{max-height:var(--ck-mention-list-max-height);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.ck.ck-mentions>.ck-list__item{flex-shrink:0;overflow:hidden}",""]);const a=s},9953:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-input-text:focus{z-index:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}",""]);const a=s},7502:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}",""]);const a=s},6908:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const a=s},468:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label,.ck[dir=rtl] .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}",""]);const a=s},2510:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}",""]);const a=s},1111:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-table-caption-background:#f7f7f7;--ck-color-table-caption-text:#333;--ck-color-table-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-table-caption-background);caption-side:top;color:var(--ck-color-table-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-table-caption-highlighted-background)}to{background-color:var(--ck-color-table-caption-background)}}",""]);const a=s},3964:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}",""]);const a=s},7176:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-table-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table .ck-table-resized{table-layout:fixed}.ck-content .table table{overflow:hidden}.ck-content .table td,.ck-content .table th{position:relative}.ck.ck-editor__editable .table .ck-table-column-resizer{bottom:-999999px;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:-999999px;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer,.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer{display:none}.ck.ck-editor__editable .table .ck-table-column-resizer:hover,.ck.ck-editor__editable .table .ck-table-column-resizer__active{background-color:var(--ck-color-table-column-resizer-hover);opacity:.25}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}",""]);const a=s},8361:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-table-focused-cell-background:rgba(158,201,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}",""]);const a=s},9429:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',""]);const a=s},6596:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}",""]);const a=s},1546:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',""]);const a=s},4971:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}",""]);const a=s},7258:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}",""]);const a=s},4923:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}",""]);const a=s},5062:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}",""]);const a=s},1883:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}",""]);const a=s},4791:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton>.ck-splitbutton__arrow:not(:focus){border-bottom-width:0;border-top-width:0}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:focus:after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:focus:after{--ck-color-split-button-hover-border:var(--ck-color-focus-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',""]);const a=s},2704:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}",""]);const a=s},9847:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}",""]);const a=s},1874:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form__header .ck-form__header__label{font-weight:700}",""]);const a=s},1977:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}",""]);const a=s},2470:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}",""]);const a=s},3525:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}",""]);const a=s},2933:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}",""]);const a=s},179:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}",""]);const a=s},4460:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',""]);const a=s},7592:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}",""]);const a=s},6356:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}",""]);const a=s},3707:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}",""]);const a=s},6603:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',""]);const a=s},4176:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}",""]);const a=s},4768:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}",""]);const a=s},3888:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}",""]);const a=s},5167:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}",""]);const a=s},7153:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}",""]);const a=s},4875:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}",""]);const a=s},2347:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',""]);const a=s},7558:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-content blockquote{font-style:normal;padding-left:10px}.ck.ck-content blockquote>:first-child{margin-top:10px}.ck.ck-content blockquote>:last-child{margin-bottom:15px}.ck.ck-content blockquote:before{content:attr(data-source);display:block;margin:15px 0 10px}",""]);const a=s},3855:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-woltlabblockquote-insert-form:focus{outline:none}.ck.ck-woltlabblockquote-insert-form{display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:space-between;padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-large)}.ck.ck-woltlabblockquote-insert-form>:not(.ck-label){flex-grow:1}.ck.ck-woltlabblockquote-insert-form__action-row{padding:0}.ck.ck-woltlabblockquote-insert-form__action-row .ck-button-cancel,.ck.ck-woltlabblockquote-insert-form__action-row .ck-button-save{justify-content:center}.ck.ck-woltlabblockquote-insert-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const a=s},1857:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-woltlabcodeblock-insert-form:focus{outline:none}.ck.ck-woltlabcodeblock-insert-form{display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:space-between;padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-large)}.ck.ck-woltlabcodeblock-insert-form>:not(.ck-label){flex-grow:1}.ck.ck-woltlabcodeblock-insert-form__action-row{padding:0}.ck.ck-woltlabcodeblock-insert-form__action-row .ck-button-cancel,.ck.ck-woltlabcodeblock-insert-form__action-row .ck-button-save{justify-content:center}.ck.ck-woltlabcodeblock-insert-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const a=s},1491:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-widget.smiley{pointer-events:none}",""]);const a=s},5151:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck.ck-content .ck-woltlabspoiler{column-gap:10px;display:grid;grid-template-areas:"label title" "content content";grid-template-columns:minmax(0,max-content) auto;margin-top:var(--ck-spacing-large);padding:5px 5px 5px 15px;position:relative}.ck.ck-content .ck-woltlabspoiler:after{border:5px solid #ccc;border-right-width:0;bottom:1px;content:"";left:1px;position:absolute;top:1px;width:5px}.ck.ck-content .ck-woltlabspoiler:before{align-self:center;color:#999;content:attr(data-label);grid-area:label}.ck.ck-content .ck-woltlabspoiler__title{grid-area:title}.ck.ck-content .ck-woltlabspoiler__content{grid-area:content}',""]);const a=s},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,o,n,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}},1667:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},8217:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=''},2151:(e,t,i)=>{"use strict";var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(6603),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals},1627:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(7558),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g);const p=m.Z&&m.Z.locals?m.Z.locals:void 0},1158:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(3855),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g);const p=m.Z&&m.Z.locals?m.Z.locals:void 0},8375:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(1857),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g);const p=m.Z&&m.Z.locals?m.Z.locals:void 0},2997:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(1491),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g);const p=m.Z&&m.Z.locals?m.Z.locals:void 0},5025:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(5151),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g);const p=m.Z&&m.Z.locals?m.Z.locals:void 0},3379:e=>{"use strict";var t=[];function i(e){for(var i=-1,o=0;o{"use strict";var t={};e.exports=function(e,i){var o=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},8575:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(i){e.setAttribute(i,t[i])}))}},9037:e=>{"use strict";var t,i=(t=[],function(e,i){return t[e]=i,t.filter(Boolean).join("\n")});function o(e,t,o,n){var r;if(o)r="";else{r="",n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,s&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}")}if(e.styleSheet)e.styleSheet.cssText=i(t,r);else{var a=document.createTextNode(r),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(a,l[t]):e.appendChild(a)}}var n={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=n.singletonCounter++,i=n.singleton||(n.singleton=e.insertStyleElement(e));return{update:function(e){o(i,t,!1,e)},remove:function(e){o(i,t,!0,e)}}}},366:(e,t,i)=>{var o,n;o=[i,t,i(511),i(6549),i(1214),i(4210),i(9998),i(7578),i(1184),i(1638),i(1281),i(4507),i(128),i(4195),i(8428),i(9211),i(3531),i(9920),i(1640),i(9829),i(4690),i(189),i(9501),i(8497),i(8779),i(766),i(9910),i(2823),i(8029),i(3706),i(5600),i(8206),i(5825),i(9782),i(4201),i(7080),i(8427),i(5469),i(9402),i(8152)],n=function(e,t,i,o,n,r,s,a,l,c,d,u,h,m,g,p,f,b,w,k,_,v,y,C,x,A,E,T,S,P,I,V,R,O,B,M,z,N,D,L){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=void 0;const F={plugins:[o.Autosave,c.Essentials,f.Indent,k.Mention,_.Paragraph,v.PasteFromOffice,x.Undo,i.Alignment,n.Bold,n.Code,d.FontColor,d.FontFamily,d.FontSize,u.Heading,h.Highlight,n.Italic,y.RemoveFormat,n.Strikethrough,n.Subscript,n.Superscript,n.Underline,r.BlockQuote,s.CodeBlock,m.HtmlEmbed,g.HorizontalLine,p.Image,p.ImageInsertUI,p.ImageToolbar,p.ImageResizeEditing,p.ImageResizeHandles,p.ImageStyle,p.ImageUpload,p.ImageUploadUI,b.Link,b.LinkImage,w.List,C.Table,C.TableToolbar,A.WoltlabAttachment,E.WoltlabAutosave,S.WoltlabBlockQuote,T.WoltlabBbcode,P.WoltlabCode,I.WoltlabCodeBlock,V.WoltlabImage,R.WoltlabMagicParagraph,O.WoltlabMedia,B.WoltlabMention,M.WoltlabMetacode,z.WoltlabSmiley,N.WoltlabSpoiler,D.WoltlabToolbarGroup,L.WoltlabUpload]};t.create=async function(e,t){const i=(t=Object.assign(t,F)).removePlugins||[];i.includes("Image")||(t.image={insert:{integrations:["insertImageViaUrl"],type:"inline"},toolbar:["imageStyle:inline","imageStyle:sideLeft","imageStyle:block","imageStyle:side"],styles:{options:["inline",{name:"sideLeft",title:"Left aligned image",icon:a.icons.objectLeft,modelElements:["imageBlock"],className:"image-style-side-left"},"block","side"]}},i.includes("Link")||t.image.toolbar.push("|","linkImage")),i.includes("Table")||(t.table={contentToolbar:["tableColumn","tableRow","mergeTableCells"]});const o=await l.ClassicEditor.create(e,t),n=o.plugins.get(b.AutoLink);return n?.forceDisabled("app.ts"),o}}.apply(t,o),void 0===n||(e.exports=n)},766:(e,t,i)=>{var o,n;o=[i,t,i(4815)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabAttachment=void 0,Object.defineProperty(t,"WoltlabAttachment",{enumerable:!0,get:function(){return i.WoltlabAttachment}})}.apply(t,o),void 0===n||(e.exports=n)},4815:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(9211)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabAttachment=void 0;class n extends i.Plugin{static get pluginName(){return"WoltlabAttachment"}static get requires(){return[o.Image]}init(){const{conversion:e,model:t,plugins:i}=this.editor,{schema:o}=t,n=["imageBlock","imageInline"];n.forEach((e=>{o.extend(e,{allowAttributes:["attachmentId"]})}));const r=new Map([["attachmentId","data-attachment-id"]]);Array.from(r.entries()).forEach((([t,i])=>{e.for("upcast").attributeToAttribute({view:i,model:t}),e.for("downcast").add((e=>{n.forEach((o=>{e.on(`attribute:${t}:${o}`,((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer;let r=o.mapper.toViewElement(t.item);r.is("element","figure")&&(r=r.getChild(0)),r.is("element","img")&&(null!==t.attributeNewValue?(n.setAttribute(i,t.attributeNewValue,r),n.addClass("woltlabAttachment",r)):n.removeAttribute(i,r))}))}))}))})),i.get("ImageUploadEditing").on("uploadComplete",((e,{data:i,imageElement:o})=>{t.change((e=>{e.setAttribute("attachmentId",i["data-attachment-id"],o)}))})),this.#e()}#e(){const e=this.editor.config.get("woltlabAttachment");this.editor.plugins.get("WoltlabMetacode").on("upcast",((t,i)=>{if("attach"!==i.name)return;const o=parseInt(i.attributes[0].toString());if(Number.isNaN(o))return;let n=i.attributes[1]?i.attributes[1].toString():"none";"left"!==n&&"right"!==n&&"none"!==n&&(n="none");let r=i.attributes[2];"boolean"!=typeof r&&("string"==typeof r?"true"===r?r=!0:"false"===r?r=!1:(r=parseInt(r),r=!Number.isNaN(r)&&0!==r):r=!1);let s=i.attributes[3];void 0!==s&&/^(100%|\d{2}(\.\d{2})%)$/.test(s.toString())||(s="100%"),this.#t(i,e.resolveAttachmentUrl,o,n,r,s)&&t.stop()}))}#t(e,t,i,o,n,r){const{conversionApi:s,data:a}=e,{consumable:l,writer:c}=s,{viewItem:d}=a;let u="imageInline",h={attachmentId:i,src:t(i,n),width:r};"left"===o?(u="imageBlock",h.imageStyle="sideLeft"):"right"===o&&(u="imageBlock",h.imageStyle="side");const m=c.createElement(u);return c.setAttributes(h,m),s.convertChildren(d,m),!!s.safeInsert(m,a.modelCursor)&&(l.consume(d,{name:!0}),s.updateConversionResult(m,a),!0)}}t.WoltlabAttachment=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},9910:(e,t,i)=>{var o,n;o=[i,t,i(6076)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabAutosave=void 0,Object.defineProperty(t,"WoltlabAutosave",{enumerable:!0,get:function(){return i.WoltlabAutosave}})}.apply(t,o),void 0===n||(e.exports=n)},6076:(e,t,i)=>{var o,n;o=[i,t,i(6549),i(7578)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabAutosave=void 0;class n extends o.Plugin{static get pluginName(){return"WoltlabAutosave"}static get requires(){return[i.Autosave]}init(){const e=this.editor.plugins.get("PendingActions");e.hasAny=!1,e.on("set:hasAny",(e=>{e.return=!1,e.stop()}),{priority:"highest"})}}t.WoltlabAutosave=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},2823:(e,t,i)=>{var o,n;o=[i,t,i(9800),i(7489)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBbcodeCommand=t.WoltlabBbcode=void 0,Object.defineProperty(t,"WoltlabBbcode",{enumerable:!0,get:function(){return i.WoltlabBbcode}}),Object.defineProperty(t,"WoltlabBbcodeCommand",{enumerable:!0,get:function(){return o.WoltlabBbcodeCommand}})}.apply(t,o),void 0===n||(e.exports=n)},9800:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(3905),i(7489)],n=function(e,t,i,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBbcode=void 0;class r extends i.Plugin{static get pluginName(){return"WoltlabBbcode"}init(){const{componentFactory:e}=this.editor.ui,t=this.editor.config.get("woltlabBbcode");if(!t)return;const i=new n.default(this.editor);this.editor.commands.add("insertBbcode",i);for(const o of t)this.#i(o,e,i)}#i(e,t,i){const{icon:n,name:r,label:s}=e;t.add(`woltlabBbcode_${r}`,(()=>{const e=new o.ButtonView;if(e.label=s,e.tooltip=!0,e.withText=!0,n)if(n.includes(";")){const[t,i]=n.split(";",2);let o={name:t};"true"===i&&(o.solid="true"),e.labelView.setTemplate({tag:"fa-icon",attributes:o})}else e.labelView.setTemplate({tag:"img",attributes:{src:n}});return e.bind("isEnabled").to(i,"isEnabled"),this.listenTo(e,"execute",(()=>{this.editor.execute("insertBbcode",r)})),e}))}}t.WoltlabBbcode=r,t.default=r}.apply(t,o),void 0===n||(e.exports=n)},7489:(e,t,i)=>{var o,n;o=[i,t,i(7578)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBbcodeCommand=void 0;class o extends i.Command{execute(e){const{model:t}=this.editor,i=this.editor.sourceElement,o=new CustomEvent("ckeditor5:bbcode",{cancelable:!0,detail:{bbcode:e}});i.dispatchEvent(o),o.defaultPrevented||t.change((i=>{const o=i.createText(`[${e}][/${e}]`);t.insertContent(o),this.editor.editing.view.focus()}))}refresh(){this.isEnabled=this.#o()}#o(){const{document:e,schema:t}=this.editor.model,{selection:i}=e;return!!i.isCollapsed&&t.checkAttributeInSelection(i,"bold")}}t.WoltlabBbcodeCommand=o,t.default=o}.apply(t,o),void 0===n||(e.exports=n)},8029:(e,t,i)=>{var o,n;o=[i,t,i(4587)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBlockQuote=void 0,Object.defineProperty(t,"WoltlabBlockQuote",{enumerable:!0,get:function(){return i.WoltlabBlockQuote}})}.apply(t,o),void 0===n||(e.exports=n)},6812:(e,t,i)=>{var o,n;o=[i,t,i(3905),i(1158)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBlockQuoteFormRowView=void 0;class o extends i.View{children;constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("class",t.class||""),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",i.to("class")]},children:this.children})}}t.WoltlabBlockQuoteFormRowView=o,t.default=o}.apply(t,o),void 0===n||(e.exports=n)},8668:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(3905),i(7732),i(6812)],n=function(e,t,i,o,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBlockQuotePanelView=void 0;class s extends o.View{#n;#r;#s;#a;focusTracker;keystrokes;#l;#c;constructor(e){const{locale:t}=e;super(t),this.set("author",""),this.set("link",""),this.focusTracker=new n.FocusTracker,this.keystrokes=new n.KeystrokeHandler,this.#l=new o.ViewCollection,this.#c=this.#d();const i=this.#u(t);this.#s=i.fieldView;const r=this.#h(t);this.#a=r.fieldView,this.#n=this.#m(t),this.#r=this.#g(t),this.#p(t,i,r)}render(){super.render(),(0,o.submitHandler)({view:this});const e=[this.#s,this.#a,this.#n,this.#r];e.forEach((e=>{this.#l.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e=>e.stopPropagation())),this.keystrokes.set("arrowleft",(e=>e.stopPropagation())),this.keystrokes.set("arrowup",(e=>e.stopPropagation())),this.keystrokes.set("arrowdown",(e=>e.stopPropagation())),this.listenTo(e[0].element,"selectstart",((e,t)=>{t.stopPropagation()}),{priority:"high"}),this.on("submit",(()=>{this.fire("execute")}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.#c.focusFirst()}#u(e){const t=e.t,i=new o.LabeledFieldView(e,o.createLabeledInputText);return i.label=t("Author"),i.fieldView.bind("value").to(this,"author",(e=>e||"")),i.fieldView.on("input",(()=>{this.author=i.fieldView.element.value})),i}#h(e){const t=e.t,i=new o.LabeledFieldView(e,o.createLabeledInputText);return i.label=t("Link"),i.fieldView.bind("value").to(this,"link",(e=>e||"")),i.fieldView.on("input",(()=>{this.link=i.fieldView.element.value})),i}#m(e){const t=e.t,n=new o.ButtonView(e);return n.set({label:t("Insert"),icon:i.icons.check,class:"ck-button-save",type:"submit",withText:!0,isEnabled:!0}),n}#g(e){const t=e.t,n=new o.ButtonView(e);return n.set({label:t("Cancel"),icon:i.icons.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),n}#p(e,t,i){this.setTemplate({tag:"form",attributes:{class:["ck","ck-vertical-form","ck-woltlabblockquote-insert-form"],tabindex:"-1"},children:[t,i,new r.default(e,{children:[this.#n,this.#r],class:"ck-woltlabblockquote-insert-form__action-row"})]})}#d(){return new o.FocusCycler({focusables:this.#l,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}})}}t.WoltlabBlockQuotePanelView=s,t.default=s}.apply(t,o),void 0===n||(e.exports=n)},4587:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(3905),i(7732),i(8668),i(1627)],n=function(e,t,i,o,n,r){"use strict";function s(e){switch(typeof e){case"string":return e;case"number":case"boolean":return e.toString();default:return""}}Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBlockQuote=void 0;class a extends i.Plugin{#f=void 0;static get pluginName(){return"WoltlabBlockQuote"}init(){const e=this.editor;e.model.schema.extend("blockQuote",{allowAttributes:["author","link"]});const t=e.commands.get("blockQuote");this.#b(t),this.#w(),this.#k(),this.#_(),this.listenTo(t,"execute",(()=>{this.#v(this.#f)}),{priority:"high"})}#b(e){const t=this.editor,n=t.t;this.editor.ui.componentFactory.add("blockQuote",(a=>{const l=(0,o.createDropdown)(a,o.SplitButtonView),c=l.buttonView;c.set({label:n("Block quote"),tooltip:!0,icon:i.icons.quote,isToggleable:!0}),c.bind("isOn").to(e,"value",(e=>!!e)),c.on("execute",(()=>{t.execute("blockQuote"),t.editing.view.focus()})),l.on("submit",(e=>{const i=e.path.find((e=>e instanceof r.WoltlabBlockQuotePanelView));i instanceof r.WoltlabBlockQuotePanelView&&(this.#f=i,t.execute("blockQuote",{forceValue:!0}),this.#f=void 0,t.editing.view.focus(),l.isOpen=!1)})),l.on("cancel",(()=>{t.editing.view.focus(),l.isOpen=!1})),l.bind("isEnabled").to(e);const d=new r.WoltlabBlockQuotePanelView(t);return l.on("change:isOpen",(()=>{if(l.isOpen){const e=this.#y();e?(d.author=s(e.getAttribute("author")),d.link=s(e.getAttribute("link"))):(d.author="",d.link="")}})),l.panelView.children.add(d),d.delegate("submit","cancel").to(l),l}))}#w(){this.editor.data.upcastDispatcher.on("element:woltlab-quote",((e,t,i)=>{const{viewItem:o}=t,{consumable:n,writer:r}=i,s=r.createElement("blockQuote");r.setAttributes({author:o.getAttribute("data-author")||"",link:o.getAttribute("data-link")||""},s),i.convertChildren(o,s),i.safeInsert(s,t.modelCursor)&&(n.consume(o,{name:!0}),i.updateConversionResult(s,t))}),{priority:"high"})}#_(){this.editor.editing.downcastDispatcher.on("insert:blockQuote",((e,t,i)=>{const{writer:o,mapper:n,consumable:r}=i;if(!r.consume(t.item,"insert"))return;const a=s(t.item.getAttribute("author")),l=s(t.item.getAttribute("link")),c=this.getSource(a,l),d={};""!==c&&(d["data-source"]=c);const u=o.createContainerElement("blockquote",d),h=n.toViewPosition(this.editor.model.createPositionBefore(t.item));o.insert(h,u),n.bindElements(t.item,u)}),{priority:"high"}),this.editor.editing.downcastDispatcher.on("attribute:author:blockQuote",((e,t,i)=>{const{writer:o,mapper:n}=i,r=s(t.attributeNewValue),a=s(t.item.getAttribute("link")),l=this.getSource(r,a),c=n.toViewElement(t.item);""===l?o.removeAttribute("data-source",c):o.setAttribute("data-source",l,c)})),this.editor.editing.downcastDispatcher.on("attribute:link:blockQuote",((e,t,i)=>{const{writer:o,mapper:n}=i,r=s(t.item.getAttribute("author")),a=s(t.attributeNewValue),l=this.getSource(r,a),c=n.toViewElement(t.item);""===l?o.removeAttribute("data-source",c):o.setAttribute("data-source",l,c)}))}#k(){this.editor.data.downcastDispatcher.on("insert:blockQuote",((e,t,i)=>{const{writer:o,mapper:n,consumable:r}=i;if(!r.consume(t.item,"insert"))return;const a=s(t.item.getAttribute("author")),l=s(t.item.getAttribute("link")),c=n.toViewPosition(this.editor.model.createPositionBefore(t.item)),d=o.createContainerElement("woltlab-quote",{"data-author":a,"data-link":l});o.insert(c,d),n.bindElements(t.item,d)}),{priority:"high"})}#v(e){const t=this.#y();t&&void 0!==e&&this.editor.model.change((i=>{i.setAttribute("author",e.author,t),i.setAttribute("link",e.link,t)}))}#y(){const e=this.editor.model.document.selection,t=(0,n.first)(e.getSelectedBlocks());return this.#C(t)}#C(e){return e.is("element","blockQuote")?e:e.parent&&!e.parent.is("element","$root")?this.#C(e.parent):null}getSource(e,t){const{t:i}=this.editor;return e?i("Quote from %0",e):i("Quote")}}t.WoltlabBlockQuote=a,t.default=a}.apply(t,o),void 0===n||(e.exports=n)},5600:(e,t,i)=>{var o,n;o=[i,t,i(2806)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCodeBlock=void 0,Object.defineProperty(t,"WoltlabCodeBlock",{enumerable:!0,get:function(){return i.WoltlabCodeBlock}})}.apply(t,o),void 0===n||(e.exports=n)},8649:(e,t,i)=>{var o,n;o=[i,t,i(3905),i(8375)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCodeBlockFormRowView=void 0;class o extends i.View{children;constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("class",t.class||""),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",i.to("class")]},children:this.children})}}t.WoltlabCodeBlockFormRowView=o,t.default=o}.apply(t,o),void 0===n||(e.exports=n)},3953:(e,t,i)=>{var o,n;o=[i,t,i(4934),i(7578),i(3905),i(7732),i(8649)],n=function(e,t,i,o,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCodeBlockPanelView=void 0;class a extends n.View{#n;#r;#x;#A;#E;focusTracker;keystrokes;#l;#c;constructor(e){const{locale:t}=e;super(t),this.set("file",""),this.set("highlighter",""),this.set("line",""),this.focusTracker=new r.FocusTracker,this.keystrokes=new r.KeystrokeHandler,this.#l=new n.ViewCollection,this.#c=this.#d();const o=(0,i.getNormalizedAndLocalizedLanguageDefinitions)(e);this.#x=this.#T(t,o);const s=this.#S(t);this.#A=s.fieldView;const a=this.#h(t);this.#E=a.fieldView,this.#n=this.#m(t),this.#r=this.#g(t),this.#p(t,s,a)}render(){super.render(),(0,n.submitHandler)({view:this});const e=[this.#x,this.#A,this.#E,this.#n,this.#r];e.forEach((e=>{this.#l.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e=>e.stopPropagation())),this.keystrokes.set("arrowleft",(e=>e.stopPropagation())),this.keystrokes.set("arrowup",(e=>e.stopPropagation())),this.keystrokes.set("arrowdown",(e=>e.stopPropagation())),this.listenTo(e[0].element,"selectstart",((e,t)=>{t.stopPropagation()}),{priority:"high"}),this.on("submit",(()=>{this.fire("execute")}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.#c.focusFirst()}#T(e,t){const i=e.t,o=(0,n.createDropdown)(e),r=this.#P(t);return this.highlighter=r.first.model._codeBlockLanguage,o.buttonView.bind("label").to(this,"highlighter",(e=>{const i=e?e.toString():"plain";return t.find((e=>e.language==i)).label})),o.buttonView.set({isOn:!1,withText:!0,tooltip:i("Language"),class:["ck-dropdown__button_label-width_auto"]}),o.on("execute",(e=>{this.highlighter=e.source._codeBlockLanguage})),(0,n.addListToDropdown)(o,r),o}#S(e){const t=e.t,i=new n.LabeledFieldView(e,n.createLabeledInputNumber);i.label=t("Line number");const{fieldView:o}=i;return o.min=0,o.bind("value").to(this,"line",(e=>e||"")),o.on("input",(()=>{this.line=o.element.value})),i}#h(e){const t=e.t,i=new n.LabeledFieldView(e,n.createLabeledInputText);return i.label=t("Filename"),i.fieldView.bind("value").to(this,"file",(e=>e||"")),i.fieldView.on("input",(()=>{this.file=i.fieldView.element.value})),i}#P(e){const t=new r.Collection;for(const i of e){const e={type:"button",model:new n.Model({_codeBlockLanguage:i.language,label:i.label,withText:!0})};e.model.bind("isOn").to(this,"highlighter",(t=>t===e.model._codeBlockLanguage)),t.add(e)}return t}#m(e){const t=e.t,i=new n.ButtonView(e);return i.set({label:t("Insert"),icon:o.icons.check,class:"ck-button-save",type:"submit",withText:!0,isEnabled:!0}),i}#g(e){const t=e.t,i=new n.ButtonView(e);return i.set({label:t("Cancel"),icon:o.icons.cancel,class:"ck-button-cancel",withText:!0}),i.delegate("execute").to(this,"cancel"),i}#p(e,t,i){this.setTemplate({tag:"form",attributes:{class:["ck","ck-vertical-form","ck-woltlabcodeblock-insert-form"],tabindex:"-1"},children:[this.#x,t,i,new s.default(e,{children:[this.#n,this.#r],class:"ck-woltlabcodeblock-insert-form__action-row"})]})}#d(){return new n.FocusCycler({focusables:this.#l,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}})}}t.WoltlabCodeBlockPanelView=a,t.default=a}.apply(t,o),void 0===n||(e.exports=n)},2806:(e,t,i)=>{var o,n;o=[i,t,i(4934),i(7578),i(3905),i(7732),i(3953)],n=function(e,t,i,o,n,r,s){"use strict";function a(e){switch(typeof e){case"string":return e;case"number":case"boolean":return e.toString();default:return""}}Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCodeBlock=void 0;class l extends o.Plugin{#I;#f=void 0;static get pluginName(){return"WoltlabCodeBlock"}init(){const e=this.editor;this.#I=e.commands.get("codeBlock"),e.model.schema.extend("codeBlock",{allowAttributes:["file","line"]}),this.#V(),this.#w(),this.#k(),this.#_(),this.#R(),this.listenTo(this.#I,"execute",(()=>{this.#v(this.#f)}))}#V(){const e=this.editor,t=e.t;e.ui.componentFactory.add("codeBlock",(i=>{const o=(0,n.createDropdown)(i,n.SplitButtonView),r=o.buttonView;r.set({label:t("Insert code block"),tooltip:!0,icon:'',isToggleable:!0}),r.bind("isOn").to(this.#I,"value",(e=>!!e)),r.on("execute",(()=>{e.execute("codeBlock",{usePreviousLanguageChoice:!1}),e.editing.view.focus()})),o.on("submit",(t=>{const i=t.path.find((e=>e instanceof s.WoltlabCodeBlockPanelView));i instanceof s.WoltlabCodeBlockPanelView&&(this.#f=i,e.execute("codeBlock",{language:i.highlighter,forceValue:!0}),this.#f=void 0,e.editing.view.focus(),o.isOpen=!1)})),o.on("cancel",(()=>{e.editing.view.focus(),o.isOpen=!1})),o.bind("isEnabled").to(this.#I);const l=new s.WoltlabCodeBlockPanelView(e);return o.on("change:isOpen",(()=>{if(o.isOpen){const e=this.#O();e?(l.file=a(e.getAttribute("file")),l.highlighter=a(e.getAttribute("language")),l.line=a(e.getAttribute("line"))):(l.file="",l.highlighter="",l.line="")}})),o.panelView.children.add(l),l.delegate("submit","cancel").to(o),o}))}#w(){this.editor.data.upcastDispatcher.on("element:pre",((e,t,i)=>{const{viewItem:o}=t,{consumable:n,writer:r}=i,s=r.createElement("codeBlock");r.setAttributes({file:o.getAttribute("data-file")||"",language:o.getAttribute("data-highlighter")||"",line:o.getAttribute("data-line")||""},s),i.convertChildren(o,s),i.safeInsert(s,t.modelCursor)&&(n.consume(o,{name:!0}),i.updateConversionResult(s,t))}),{priority:"high"})}#_(){const e=(0,i.getNormalizedAndLocalizedLanguageDefinitions)(this.editor);this.editor.editing.downcastDispatcher.on("insert:codeBlock",((t,i,o)=>{const{writer:n,mapper:r,consumable:s}=o;if(!s.consume(i.item,"insert"))return;const l=a(i.item.getAttribute("file")),c=a(i.item.getAttribute("language")),d=a(i.item.getAttribute("line")),u=n.createContainerElement("code",{class:`language-${c}`});let h="";const m=e.find((e=>e.language===c));h+=m?m.label:`Unknown (${c})`,(l||d)&&(h+=" (",l&&(h+=l),d&&(l&&(h+=" "),h+=`@ ${d}`),h+=")");const g=n.createContainerElement("pre",{"data-language":h,spellcheck:"false"},u),p=r.toViewPosition(this.editor.model.createPositionBefore(i.item));n.insert(p,g),r.bindElements(i.item,u)}),{priority:"high"})}#k(){this.editor.data.downcastDispatcher.on("insert:codeBlock",((e,t,i)=>{const{writer:o,mapper:n,consumable:r}=i;if(!r.consume(t.item,"insert"))return;const s=a(t.item.getAttribute("file")),l=a(t.item.getAttribute("language")),c=a(t.item.getAttribute("line")),d=n.toViewPosition(this.editor.model.createPositionBefore(t.item)),u=o.createContainerElement("pre",{"data-file":s,"data-highlighter":l,"data-line":c});o.insert(d,u),n.bindElements(t.item,u)}),{priority:"high"})}#v(e){const t=this.#O();t&&void 0!==e&&this.editor.model.change((i=>{i.setAttribute("file",e.file,t),i.setAttribute("line",e.line,t)}))}#R(){const e=(0,i.getNormalizedAndLocalizedLanguageDefinitions)(this.editor),t=["file","line"];for(const i of t)this.editor.editing.downcastDispatcher.on(`attribute:${i}:codeBlock`,((t,i,o)=>{const{mapper:n}=o,r=n.toViewElement(i.item);if(void 0===r)return;const s=r.getAncestors(),l=s[s.length-1];if(!l.is("element","pre"))return;const c=a(i.item.getAttribute("file")),d=a(i.item.getAttribute("language")),u=a(i.item.getAttribute("line"));let h="";const m=e.find((e=>e.language===d));h+=m?m.label:`Unknown (${d})`,(c||u)&&(h+=" (",c&&(h+=c),u&&(c&&(h+=" "),h+=`@ ${u}`),h+=")"),this.editor.editing.view.change((e=>{e.setAttribute("data-language",h,l)}))}))}#O(){const e=this.editor.model.document.selection,t=(0,r.first)(e.getSelectedBlocks());return t&&t.is("element","codeBlock")?t:null}}t.WoltlabCodeBlock=l,t.default=l}.apply(t,o),void 0===n||(e.exports=n)},3706:(e,t,i)=>{var o,n;o=[i,t,i(2379)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCode=void 0,Object.defineProperty(t,"WoltlabCode",{enumerable:!0,get:function(){return i.WoltlabCode}})}.apply(t,o),void 0===n||(e.exports=n)},2379:(e,t,i)=>{var o,n;o=[i,t,i(1214),i(7578)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCode=void 0;class n extends o.Plugin{static get pluginName(){return"WoltlabCode"}static get requires(){return[i.Code]}init(){const{conversion:e}=this.editor;e.for("upcast").elementToAttribute({view:"kbd",model:"code",converterPriority:"high"}),e.for("dataDowncast").attributeToElement({model:"code",view:"kbd",converterPriority:"high"})}}t.WoltlabCode=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},8206:(e,t,i)=>{var o,n;o=[i,t,i(2265)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabImage=void 0,Object.defineProperty(t,"WoltlabImage",{enumerable:!0,get:function(){return i.WoltlabImage}})}.apply(t,o),void 0===n||(e.exports=n)},2265:(e,t,i)=>{var o,n;o=[i,t,i(7578)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabImage=void 0;class o extends i.Plugin{static get pluginName(){return"WoltlabImage"}init(){this.editor.conversion.for("dataDowncast").add((e=>{e.on("insert:imageInline",((e,t,i)=>{const{item:o}=t;if(!o.is("element"))return;const n=o.getAttribute("width");if("string"!=typeof n)return;const{mapper:r,writer:s}=i,a=r.toViewElement(o);void 0!==a&&s.setAttribute("data-width",n,a)}),{priority:"lowest"}),e.on("insert:imageBlock",((e,t,i)=>{const{item:o}=t;if(!o.is("element"))return;const n=o.getAttribute("width");if("string"!=typeof n)return;const{mapper:r,writer:s}=i,a=r.toViewElement(o);void 0!==a&&s.setAttribute("data-width",n,a)}),{priority:"lowest"})}))}}t.WoltlabImage=o,t.default=o}.apply(t,o),void 0===n||(e.exports=n)},5825:(e,t,i)=>{var o,n;o=[i,t,i(4413)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMagicParagraph=void 0,Object.defineProperty(t,"WoltlabMagicParagraph",{enumerable:!0,get:function(){return i.WoltlabMagicParagraph}})}.apply(t,o),void 0===n||(e.exports=n)},4413:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(600)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMagicParagraph=void 0;class n extends i.Plugin{static blockModels=["blockQuote","codeBlock","spoiler","table"];static get pluginName(){return"WoltlabMagicParagraph"}init(){const{mapper:e,view:t}=this.editor.editing,{document:i,domConverter:r}=t;t.addObserver(o.ClickObserver),this.listenTo(i,"click",((t,o)=>{const{domEvent:s,target:a}=o,l=a.getAncestors();l.push(a);for(const e of l)if(e.is("element","p")||e.is("element","li"))return;const{clientY:c}=s,d=i.getRoot(),u=d.getChild(0);if(void 0!==u){if(u.is("containerElement")){const i=e.toModelElement(u);if(i&&n.blockModels.includes(i.name)){const e=r.mapViewToDom(u),{top:i}=e.getBoundingClientRect();if(c<=i)return t.stop(),void this.#B(u)}}if(0!==d.childCount){const i=d.getChild(d.childCount-1);if(i.is("containerElement")){const o=e.toModelElement(i);if(o&&n.blockModels.includes(o.name)){const e=r.mapViewToDom(i),{bottom:o}=e.getBoundingClientRect();if(c>=o)return t.stop(),void this.#M(i)}}}for(const e of this.#z()){const i=r.mapViewToDom(e),{bottom:o,top:n}=i.getBoundingClientRect(),{marginBottom:s,marginTop:a}=window.getComputedStyle(i),l=n-parseInt(a),d=o+parseInt(s);if(c=l&&c<=n)return this.#B(e),void t.stop();if(c>=o&&c<=d)return this.#M(e),void t.stop()}}}))}#B(e){const{mapper:t}=this.editor.editing;let i;i=e.previousSibling&&e.previousSibling.is("element","p")?t.toModelElement(e.previousSibling):void 0,this.editor.model.change((o=>{if(void 0===i){i=o.createElement("paragraph");const n=o.createPositionBefore(t.toModelElement(e));o.insert(i,n)}o.setSelection(i,"end")}))}#M(e){const{mapper:t}=this.editor.editing;let i;i=e.nextSibling&&e.nextSibling.is("element","p")?t.toModelElement(e.nextSibling):void 0,this.editor.model.change((o=>{if(void 0===i){i=o.createElement("paragraph");const n=o.createPositionAfter(t.toModelElement(e));o.insert(i,n)}o.setSelection(i,"end")}))}*#z(){const{mapper:e,view:t}=this.editor.editing,i=t.document.getRoot(),o=t.createRangeIn(i);for(const t of o.getWalker({ignoreElementEnd:!0})){const i=t.item;if(!i.is("containerElement"))continue;const o=e.toModelElement(i);void 0!==o&&n.blockModels.includes(o.name)&&(yield i)}}}t.WoltlabMagicParagraph=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},9782:(e,t,i)=>{var o,n;o=[i,t,i(6761)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMedia=void 0,Object.defineProperty(t,"WoltlabMedia",{enumerable:!0,get:function(){return i.WoltlabMedia}})}.apply(t,o),void 0===n||(e.exports=n)},6761:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(9211),i(7080)],n=function(e,t,i,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMedia=void 0;class r extends i.Plugin{static get pluginName(){return"WoltlabMedia"}static get requires(){return[o.Image,n.WoltlabMetacode]}init(){this.#N(),this.#D()}#N(){const{conversion:e,model:t}=this.editor,{schema:i}=t,o=["imageBlock","imageInline"];o.forEach((e=>{i.extend(e,{allowAttributes:["mediaId","mediaSize"]})})),e.attributeToAttribute({model:"classList",view:{name:"img",key:"class",value:["woltlabSuiteMedia"]}});const n=new Map([["mediaId","data-media-id"],["mediaSize","data-media-size"]]);Array.from(n.entries()).forEach((([t,i])=>{e.for("upcast").attributeToAttribute({view:i,model:t}),e.for("downcast").add((e=>{o.forEach((o=>{e.on(`attribute:${t}:${o}`,((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer;let r=o.mapper.toViewElement(t.item);r.is("element","figure")&&(r=r.getChild(0)),r.is("element","img")&&(null!==t.attributeNewValue?n.setAttribute(i,t.attributeNewValue,r):n.removeAttribute(i,r))}))}))}))}))}#D(){const e=this.editor.config.get("woltlabMedia");this.editor.plugins.get("WoltlabMetacode").on("upcast",((t,i)=>{if("wsm"===i.name){const o=parseInt(i.attributes[0].toString());if(Number.isNaN(o))return;const n=i.attributes[1]?i.attributes[1].toString():"original";this.#L(i,e.resolveMediaUrl,o,n)&&t.stop()}}))}#L(e,t,i,o){const{conversionApi:n,data:r}=e,{consumable:s,writer:a}=n,{viewItem:l}=r,c=a.createElement("imageInline");return a.setAttributes({src:t(i,o),mediaId:i,mediaSize:o},c),n.convertChildren(l,c),!!n.safeInsert(c,r.modelCursor)&&(s.consume(l,{name:!0}),n.updateConversionResult(c,r),!0)}}t.WoltlabMedia=r,t.default=r}.apply(t,o),void 0===n||(e.exports=n)},4201:(e,t,i)=>{var o,n;o=[i,t,i(644)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMention=void 0,Object.defineProperty(t,"WoltlabMention",{enumerable:!0,get:function(){return i.WoltlabMention}})}.apply(t,o),void 0===n||(e.exports=n)},644:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(9829),i(7080),i(7732)],n=function(e,t,i,o,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMention=void 0;class s extends i.Plugin{static get pluginName(){return"WoltlabMention"}static get requires(){return[o.Mention,n.WoltlabMetacode]}init(){this.editor.plugins.get("WoltlabMetacode").on("upcast",((e,t)=>{"user"===t.name&&1===t.attributes.length&&(Number.isNaN(parseInt(t.attributes[0].toString()))||(e.stop(),this.#F(t)))})),this.#k()}#F(e){const{attributes:t,conversionApi:i,data:o,name:n}=e,{writer:s}=i,{viewItem:a}=o,l=a.getChild(0);Object.assign(o,i.convertChildren(o.viewItem,o.modelCursor));for(const e of Array.from(o.modelRange.getItems()))(e.is("$text")||e.is("$textProxy"))&&s.setAttribute("mention",{id:t[0].toString(),objectId:t[0],type:n,uid:(0,r.uid)(),_text:l.data},e)}#k(){this.editor.conversion.for("dataDowncast").attributeToElement({model:"mention",view:(e,{writer:t})=>{if(!e)return;const i=e.objectId;return t.createAttributeElement("woltlab-metacode",{"data-name":e.type,"data-attributes":btoa(JSON.stringify([i]))},{priority:20,id:e.uid})},converterPriority:"high"})}}t.WoltlabMention=s,t.default=s}.apply(t,o),void 0===n||(e.exports=n)},7080:(e,t,i)=>{var o,n;o=[i,t,i(2505)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMetacode=void 0,Object.defineProperty(t,"WoltlabMetacode",{enumerable:!0,get:function(){return i.WoltlabMetacode}})}.apply(t,o),void 0===n||(e.exports=n)},2505:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(7732)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMetacode=void 0;class n extends i.Plugin{static get pluginName(){return"WoltlabMetacode"}init(){this.#H()}#H(){this.editor.conversion.for("upcast").add((e=>{e.on("element:woltlab-metacode",((e,t,i)=>{const{consumable:n,writer:r}=i,{viewItem:s}=t;if(!n.test(s,{name:!0}))return;const a=s.getAttribute("data-name");if(void 0===a)return;const l=this.#W(s.getAttribute("data-attributes")||""),c=new o.EventInfo(this,"upcast"),d={attributes:l,conversionApi:i,data:t,name:a};if(this.fire(c,d),c.stop.called)return;let{modelCursor:u}=t;const h=u.getAncestors();let m;1===h.length&&"$root"===h[0].name&&(m=r.createElement("paragraph"),r.insert(m,u,0),u=r.createPositionAt(m,0));const g=this.#Z(l),p=r.createText(`[${a}${g}]`),f=r.createText(`[/${a}]`);r.insert(p,u,0),u=u.getShiftedBy(p.offsetSize),r.insert(f,u,"end"),void 0!==m&&(u=r.createPositionAfter(m)),t.modelCursor=u}))}))}#W(e){if(""===e)return[];const t=atob(e);let i;try{i=JSON.parse(t)}catch(e){return[]}return i}#Z(e){return 0===e.length?"":"="+e.map((e=>"number"==typeof e?e.toString():`'${e}'`)).join(",")}}t.WoltlabMetacode=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},8427:(e,t,i)=>{var o,n;o=[i,t,i(4054)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSmiley=void 0,Object.defineProperty(t,"WoltlabSmiley",{enumerable:!0,get:function(){return i.WoltlabSmiley}})}.apply(t,o),void 0===n||(e.exports=n)},4054:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(9211),i(2997)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSmiley=void 0;class n extends i.Plugin{static get pluginName(){return"WoltlabSmiley"}static get requires(){return[o.Image]}init(){const{conversion:e,model:t}=this.editor,i=["imageBlock","imageInline"];for(const e of i)t.schema.extend(e,{allowAttributes:["classList"]});e.attributeToAttribute({model:"classList",view:{name:"img",key:"class",value:["smiley"]}}),e.for("editingDowncast").add((e=>{e.on("insert:imageInline",((e,t,i)=>{const{item:o}=t;if("smiley"!==o.getAttribute("classList"))return;if(!o.is("element"))return;const{consumable:n,mapper:r,writer:s}=i;if(!n.test(o,"insert"))return;n.consume(o,"insert");const a=s.createEmptyElement("img"),l=r.toViewPosition(this.editor.model.createPositionBefore(o));s.insert(l,a),r.bindElements(o,a)}),{priority:"high"})}))}}t.WoltlabSmiley=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},5469:(e,t,i)=>{var o,n;o=[i,t,i(7591),i(2553)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSpoilerCommand=t.WoltlabSpoiler=void 0,Object.defineProperty(t,"WoltlabSpoiler",{enumerable:!0,get:function(){return i.WoltlabSpoiler}}),Object.defineProperty(t,"WoltlabSpoilerCommand",{enumerable:!0,get:function(){return o.WoltlabSpoilerCommand}})}.apply(t,o),void 0===n||(e.exports=n)},7591:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(6004)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSpoiler=void 0;class n extends i.Plugin{static get requires(){return[o.default]}static get pluginName(){return"WoltlabSpoiler"}}t.WoltlabSpoiler=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},2553:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(600),i(7732)],n=function(e,t,i,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSpoilerCommand=void 0;class r extends i.Command{execute(){const{model:e}=this.editor,{schema:t}=e,{selection:i}=e.document,o=Array.from(i.getSelectedBlocks());e.change((e=>{if(this.value)this.#U(e,o);else{const i=o.filter((e=>this.#j(e)||this.#$(t,e)));this.#q(e,i)}}))}refresh(){this.value=this.#K(),this.isEnabled=this.#o()}#U(e,t){for(const i of t){const t=this.#j(i);if(null===t)continue;const n=t.previousSibling;if(null===n||!n.is("element","spoilerTitle"))throw new Error("Invalid structure, expected a `` adjacent to ``",{cause:{spoilerTitle:n}});const r=t.parent;if(!(r instanceof o.Element&&r.is("element","spoiler")))throw new Error("Invalid structure, expected a `` as the parent of a ``",{cause:{spoiler:r}});e.remove(n),e.unwrap(r),e.unwrap(t)}}#q(e,t){const i=[];this.#G(e,t).reverse().forEach((t=>{let o=this.#j(t.start);o||(o=this.#J(e,t)),i.push(o.parent)})),i.reverse().reduce(((t,i)=>{if(t.nextSibling===i){const o=t.getChild(1),n=i.getChild(1);return e.move(e.createRangeIn(n),e.createPositionAt(o,"end")),e.remove(i),t}return i}))}#G(e,t){let i=null,o=0;const n=[];for(;o{var o,n;o=[i,t,i(7578),i(4156),i(600),i(3905),i(2553),i(5025)],n=function(e,t,i,o,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSpoilerEditing=void 0;class a extends i.Plugin{static get pluginName(){return"WoltlabSpoilerEditing"}static get requires(){return[o.Widget]}init(){this.#Y(),this.#H(),this.editor.commands.add("insertSpoiler",new s.default(this.editor)),this.#Q()}#Q(){const{t:e}=this.editor.locale;this.editor.ui.componentFactory.add("spoiler",(t=>{const i=this.editor.commands.get("insertSpoiler"),o=new r.ButtonView(t);return o.set({label:e("Spoiler"),tooltip:!0,withText:!0}),o.labelView.setTemplate({tag:"fa-icon",attributes:{name:"eye-slash"}}),o.bind("isOn").to(i,"value"),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",(()=>this.editor.execute("insertSpoiler"))),o}))}#Y(){const{schema:e}=this.editor.model;e.register("spoiler",{allowWhere:"$block",isObject:!0}),e.register("spoilerTitle",{allowChildren:"$text",allowIn:"spoiler",isLimit:!0}),e.register("spoilerContent",{allowContentOf:"$root",allowIn:"spoiler",isLimit:!0}),e.addChildCheck(((e,t)=>("spoiler"!==t.name||!Array.from(e.getNames()).includes("spoiler"))&&(!e.endsWith("spoilerContent")||"spoiler"!==t.name)&&(!e.endsWith("spoilerTitle")||"$text"===t.name)&&void 0)),e.addAttributeCheck((e=>{if(e.endsWith("spoilerTitle $text"))return!1}))}#H(){const{conversion:e}=this.editor,{t}=this.editor.locale;e.for("upcast").add((e=>{e.on("element:woltlab-spoiler",((e,t,i)=>{const{consumable:o,writer:n,safeInsert:r,convertChildren:s,updateConversionResult:a}=i,{viewItem:l}=t,c={name:!0};if(!o.test(l,c))return;const d=n.createElement("spoiler"),u=n.createElement("spoilerTitle");n.append(u,d);const h=(l.getAttribute("data-label")||"").trim();n.appendText(h,u);const m=n.createElement("spoilerContent");n.append(m,d),r(d,t.modelCursor)&&(o.consume(l,c),s(l,m),a(d,t))}))})),e.for("dataDowncast").add((e=>{e.on("insert:spoiler",((e,t,i)=>{const{item:o}=t,{consumable:n,mapper:r,writer:s}=i;if(2!==o.childCount)return null;const a=o.getChild(0);if(!a.is("element","spoilerTitle"))return null;if(!n.consume(o,"insert"))return;n.consume(a,"insert");let l="";if(1===a.childCount){const e=a.getChild(0);e.is("$text")&&(l=e.data)}const c=s.createContainerElement("woltlab-spoiler",{"data-label":l}),d=r.toViewPosition(this.editor.model.createPositionBefore(o));s.insert(d,c),r.bindElements(o,c),r.bindElements(a,c);const u=o.getChild(1);u.is("element","spoilerContent")&&(r.bindElements(u,c),n.consume(u,"insert"))})),e.on("insert:$text",((e,t,i)=>{const o=t.item.parent;o&&o.is("element","spoilerTitle")&&i.consumable.consume(t.item,"insert")}))})),e.for("editingDowncast").elementToElement({model:"spoiler",view:(e,{writer:i})=>{const n=i.createContainerElement("div",{class:"ck-woltlabspoiler","data-label":t("Spoiler")});return(0,o.toWidget)(n,i,{hasSelectionHandle:!0,label:"spoiler widget"})}}).elementToElement({model:"spoilerTitle",view:(e,{writer:i})=>{const r=i.createEditableElement("div",{class:"ck-woltlabspoiler__title"});return(0,n.enablePlaceholder)({view:this.editor.editing.view,element:r,text:t("Type your title"),keepOnFocus:!0}),(0,o.toWidgetEditable)(r,i)}}).elementToElement({model:"spoilerContent",view:(e,{writer:t})=>{const i=t.createEditableElement("div",{class:"ck-woltlabspoiler__content"});return(0,o.toWidgetEditable)(i,t)}})}}t.WoltlabSpoilerEditing=a,t.default=a}.apply(t,o),void 0===n||(e.exports=n)},9402:(e,t,i)=>{var o,n;o=[i,t,i(6909)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabToolbarGroup=void 0,Object.defineProperty(t,"WoltlabToolbarGroup",{enumerable:!0,get:function(){return i.WoltlabToolbarGroup}})}.apply(t,o),void 0===n||(e.exports=n)},6909:(e,t,i)=>{var o,n;o=[i,t,i(7578)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabToolbarGroup=void 0;class o extends i.Plugin{static get pluginName(){return"WoltlabToolbarGroup"}init(){const e=this.editor.config.get("woltlabToolbarGroup");e&&this.editor.once("ready",(()=>{const t=this.editor.ui.view.toolbar.items;Object.entries(e).forEach((([e,i])=>{const o=t.find((t=>null!==t.element?.querySelector(`[data-cke-tooltip-text="woltlabToolbarGroup_${e}"]`))),n=o.element,r=n.querySelector(".ck-button__icon"),[s,a]=i.icon.split(";",2),l=document.createElement("fa-icon");l.setIcon(s,"true"===a),r.replaceWith(l),o.buttonView.label=i.label,n.dataset.ckeTooltipText=i.label}))}))}}t.WoltlabToolbarGroup=o,t.default=o}.apply(t,o),void 0===n||(e.exports=n)},8152:(e,t,i)=>{var o,n;o=[i,t,i(6916)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabUpload=void 0,Object.defineProperty(t,"WoltlabUpload",{enumerable:!0,get:function(){return i.WoltlabUpload}})}.apply(t,o),void 0===n||(e.exports=n)},6916:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(1070),i(2263)],n=function(e,t,i,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabUpload=void 0;class r extends i.Plugin{static get pluginName(){return"WoltlabUpload"}static get requires(){return[o.FileRepository]}init(){const{config:e,editing:t,plugins:i}=this.editor,r=e.get("woltlabUpload");r&&"function"==typeof r.uploadImage&&(i.get(o.FileRepository).createUploadAdapter=e=>new n.WoltlabUploadAdapter(e,r),"function"==typeof r.uploadOther&&this.listenTo(t.view.document,"clipboardInput",((e,t)=>{if(e.stop.called)return;const{dataTransfer:i,method:o}=t;if("drop"===o){for(const e of i.files)null!==e&&r.uploadOther(e);e.stop()}}),{priority:"lowest"}))}}t.WoltlabUpload=r,t.default=r}.apply(t,o),void 0===n||(e.exports=n)},2263:(e,t,i)=>{var o;o=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabUploadAdapter=void 0;class i{#X;#ee;#te;constructor(e,t){this.#X=e,this.#ee=t}abort(){this.#te?.abort()}async upload(){const e=await this.#X.file;return this.#te=new AbortController,this.#ee.uploadImage(e,this.#te)}}t.WoltlabUploadAdapter=i,t.default=i}.apply(t,[i,t]),void 0===o||(e.exports=o)},8491:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+"},2536:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(9651);const n=function(e,t){for(var i=e.length;i--;)if((0,o.Z)(e[i][0],t))return i;return-1};var r=Array.prototype.splice;function s(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t-1},s.prototype.set=function(e,t){var i=this.__data__,o=n(i,e);return o<0?(++this.size,i.push([e,t])):i[o][1]=t,this};const a=s},6183:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(2119),n=i(6092);const r=(0,o.Z)(n.Z,"Map")},520:(e,t,i)=>{"use strict";i.d(t,{Z:()=>h});const o=(0,i(2119).Z)(Object,"create");var n=Object.prototype.hasOwnProperty;var r=Object.prototype.hasOwnProperty;function s(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t{"use strict";i.d(t,{Z:()=>a});var o=i(2536);var n=i(6183),r=i(520);function s(e){var t=this.__data__=new o.Z(e);this.size=t.size}s.prototype.clear=function(){this.__data__=new o.Z,this.size=0},s.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},s.prototype.get=function(e){return this.__data__.get(e)},s.prototype.has=function(e){return this.__data__.has(e)},s.prototype.set=function(e,t){var i=this.__data__;if(i instanceof o.Z){var s=i.__data__;if(!n.Z||s.length<199)return s.push([e,t]),this.size=++i.size,this;i=this.__data__=new r.Z(s)}return i.set(e,t),this.size=i.size,this};const a=s},7685:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=i(6092).Z.Symbol},4073:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=i(6092).Z.Uint8Array},9001:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var o=i(4732),n=i(7771),r=i(6706),s=i(6009),a=i(7212),l=Object.prototype.hasOwnProperty;const c=function(e,t){var i=(0,n.Z)(e),c=!i&&(0,o.Z)(e),d=!i&&!c&&(0,r.Z)(e),u=!i&&!c&&!d&&(0,a.Z)(e),h=i||c||d||u,m=h?function(e,t){for(var i=-1,o=Array(e);++i{"use strict";i.d(t,{Z:()=>o});const o=function(e,t){for(var i=-1,o=t.length,n=e.length;++i{"use strict";i.d(t,{Z:()=>s});var o=i(4752),n=i(9651),r=Object.prototype.hasOwnProperty;const s=function(e,t,i){var s=e[t];r.call(e,t)&&(0,n.Z)(s,i)&&(void 0!==i||t in e)||(0,o.Z)(e,t,i)}},4752:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=i(7904);const n=function(e,t,i){"__proto__"==t&&o.Z?(0,o.Z)(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}},9256:(e,t,i)=>{"use strict";i.d(t,{Z:()=>W});var o=i(5365);var n=i(2954),r=i(1899),s=i(703);var a=i(7590);var l=i(1050),c=i(7215),d=i(3573);var u=i(8694),h=i(2513),m=i(532);const g=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,u.Z)(t,(0,d.Z)(e)),e=(0,h.Z)(e);return t}:m.Z;var p=i(1808),f=i(3327);const b=function(e){return(0,f.Z)(e,a.Z,g)};var w=i(4158),k=Object.prototype.hasOwnProperty;var _=i(1884);var v=/\w*$/;var y=i(7685),C=y.Z?y.Z.prototype:void 0,x=C?C.valueOf:void 0;var A=i(2701);const E=function(e,t,i){var o,n,r,s=e.constructor;switch(t){case"[object ArrayBuffer]":return(0,_.Z)(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return function(e,t){var i=t?(0,_.Z)(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,A.Z)(e,i);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(r=new(n=e).constructor(n.source,v.exec(n))).lastIndex=n.lastIndex,r;case"[object Symbol]":return o=e,x?Object(x.call(o)):{}}};var T=i(5418),S=i(7771),P=i(6706),I=i(8533);var V=i(1162),R=i(8351),O=R.Z&&R.Z.isMap;const B=O?(0,V.Z)(O):function(e){return(0,I.Z)(e)&&"[object Map]"==(0,w.Z)(e)};var M=i(7226);var z=R.Z&&R.Z.isSet;const N=z?(0,V.Z)(z):function(e){return(0,I.Z)(e)&&"[object Set]"==(0,w.Z)(e)};var D="[object Arguments]",L="[object Function]",F="[object Object]",H={};H[D]=H["[object Array]"]=H["[object ArrayBuffer]"]=H["[object DataView]"]=H["[object Boolean]"]=H["[object Date]"]=H["[object Float32Array]"]=H["[object Float64Array]"]=H["[object Int8Array]"]=H["[object Int16Array]"]=H["[object Int32Array]"]=H["[object Map]"]=H["[object Number]"]=H[F]=H["[object RegExp]"]=H["[object Set]"]=H["[object String]"]=H["[object Symbol]"]=H["[object Uint8Array]"]=H["[object Uint8ClampedArray]"]=H["[object Uint16Array]"]=H["[object Uint32Array]"]=!0,H["[object Error]"]=H[L]=H["[object WeakMap]"]=!1;const W=function e(t,i,u,h,m,f){var _,v=1&i,y=2&i,C=4&i;if(u&&(_=m?u(t,h,m,f):u(t)),void 0!==_)return _;if(!(0,M.Z)(t))return t;var x=(0,S.Z)(t);if(x){if(_=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&k.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(t),!v)return(0,c.Z)(t,_)}else{var A=(0,w.Z)(t),I=A==L||"[object GeneratorFunction]"==A;if((0,P.Z)(t))return(0,l.Z)(t,v);if(A==F||A==D||I&&!m){if(_=y||I?{}:(0,T.Z)(t),!v)return y?function(e,t){return(0,r.Z)(e,g(e),t)}(t,function(e,t){return e&&(0,r.Z)(t,(0,a.Z)(t),e)}(_,t)):function(e,t){return(0,r.Z)(e,(0,d.Z)(e),t)}(t,function(e,t){return e&&(0,r.Z)(t,(0,s.Z)(t),e)}(_,t))}else{if(!H[A])return m?t:{};_=E(t,A,v)}}f||(f=new o.Z);var V=f.get(t);if(V)return V;f.set(t,_),N(t)?t.forEach((function(o){_.add(e(o,i,u,o,t,f))})):B(t)&&t.forEach((function(o,n){_.set(n,e(o,i,u,n,t,f))}));var R=C?y?b:p.Z:y?a.Z:s.Z,O=x?void 0:R(t);return function(e,t){for(var i=-1,o=null==e?0:e.length;++i{"use strict";i.d(t,{Z:()=>r});var o=i(8694),n=i(7771);const r=function(e,t,i){var r=t(e);return(0,n.Z)(e)?r:(0,o.Z)(r,i(e))}},3243:(e,t,i)=>{"use strict";i.d(t,{Z:()=>d});var o=i(7685),n=Object.prototype,r=n.hasOwnProperty,s=n.toString,a=o.Z?o.Z.toStringTag:void 0;var l=Object.prototype.toString;var c=o.Z?o.Z.toStringTag:void 0;const d=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=r.call(e,a),i=e[a];try{e[a]=void 0;var o=!0}catch(e){}var n=s.call(e);return o&&(t?e[a]=i:delete e[a]),n}(e):function(e){return l.call(e)}(e)}},1152:(e,t,i)=>{"use strict";i.d(t,{Z:()=>S});var o=i(5365),n=i(520);function r(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new n.Z;++tc))return!1;var u=r.get(e),h=r.get(t);if(u&&h)return u==t&&h==e;var m=-1,g=!0,p=2&i?new s:void 0;for(r.set(e,t),r.set(t,e);++m{"use strict";i.d(t,{Z:()=>o});const o=function(e,t,i){var o=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(i=i>n?n:i)<0&&(i+=n),n=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(n);++o{"use strict";i.d(t,{Z:()=>o});const o=function(e){return function(t){return e(t)}}},1884:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=i(4073);const n=function(e){var t=new e.constructor(e.byteLength);return new o.Z(t).set(new o.Z(e)),t}},1050:(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var o=i(6092),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=n&&"object"==typeof module&&module&&!module.nodeType&&module,s=r&&r.exports===n?o.Z.Buffer:void 0,a=s?s.allocUnsafe:void 0;const l=function(e,t){if(t)return e.slice();var i=e.length,o=a?a(i):new e.constructor(i);return e.copy(o),o}},2701:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=i(1884);const n=function(e,t){var i=t?(0,o.Z)(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}},7215:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e,t){var i=-1,o=e.length;for(t||(t=Array(o));++i{"use strict";i.d(t,{Z:()=>r});var o=i(2954),n=i(4752);const r=function(e,t,i,r){var s=!i;i||(i={});for(var a=-1,l=t.length;++a{"use strict";i.d(t,{Z:()=>b});var o=i(9203);var n=Math.max;var r=i(7904);const s=r.Z?function(e,t){return(0,r.Z)(e,"toString",{configurable:!0,enumerable:!1,value:(i=t,function(){return i}),writable:!0});var i}:o.Z;var a=Date.now;const l=(c=s,d=0,u=0,function(){var e=a(),t=16-(e-u);if(u=e,t>0){if(++d>=800)return arguments[0]}else d=0;return c.apply(void 0,arguments)});var c,d,u;const h=function(e,t){return l(function(e,t,i){return t=n(void 0===t?e.length-1:t,0),function(){for(var o=arguments,r=-1,s=n(o.length-t,0),a=Array(s);++r1?i[n-1]:void 0,s=n>2?i[2]:void 0;for(r=e.length>3&&"function"==typeof r?(n--,r):void 0,s&&function(e,t,i){if(!(0,f.Z)(i))return!1;var o=typeof t;return!!("number"==o?(0,g.Z)(i)&&(0,p.Z)(t,i.length):"string"==o&&t in i)&&(0,m.Z)(i[t],e)}(i[0],i[1],s)&&(r=n<3?void 0:r,n=1),t=Object(t);++o{"use strict";i.d(t,{Z:()=>n});var o=i(2119);const n=function(){try{var e=(0,o.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},3413:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o="object"==typeof global&&global&&global.Object===Object&&global},1808:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var o=i(3327),n=i(3573),r=i(703);const s=function(e){return(0,o.Z)(e,r.Z,n.Z)}},2119:(e,t,i)=>{"use strict";i.d(t,{Z:()=>f});var o=i(3234);const n=i(6092).Z["__core-js_shared__"];var r,s=(r=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";var a=i(7226),l=i(19),c=/^\[object .+?Constructor\]$/,d=Function.prototype,u=Object.prototype,h=d.toString,m=u.hasOwnProperty,g=RegExp("^"+h.call(m).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const p=function(e){return!(!(0,a.Z)(e)||(t=e,s&&s in t))&&((0,o.Z)(e)?g:c).test((0,l.Z)(e));var t},f=function(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return p(i)?i:void 0}},2513:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=(0,i(1851).Z)(Object.getPrototypeOf,Object)},3573:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var o=i(532),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;const s=r?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,o=null==e?0:e.length,n=0,r=[];++i{"use strict";i.d(t,{Z:()=>C});var o=i(2119),n=i(6092);const r=(0,o.Z)(n.Z,"DataView");var s=i(6183);const a=(0,o.Z)(n.Z,"Promise"),l=(0,o.Z)(n.Z,"Set"),c=(0,o.Z)(n.Z,"WeakMap");var d=i(3243),u=i(19),h="[object Map]",m="[object Promise]",g="[object Set]",p="[object WeakMap]",f="[object DataView]",b=(0,u.Z)(r),w=(0,u.Z)(s.Z),k=(0,u.Z)(a),_=(0,u.Z)(l),v=(0,u.Z)(c),y=d.Z;(r&&y(new r(new ArrayBuffer(1)))!=f||s.Z&&y(new s.Z)!=h||a&&y(a.resolve())!=m||l&&y(new l)!=g||c&&y(new c)!=p)&&(y=function(e){var t=(0,d.Z)(e),i="[object Object]"==t?e.constructor:void 0,o=i?(0,u.Z)(i):"";if(o)switch(o){case b:return f;case w:return h;case k:return m;case _:return g;case v:return p}return t});const C=y},5418:(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var o=i(7226),n=Object.create;const r=function(){function e(){}return function(t){if(!(0,o.Z)(t))return{};if(n)return n(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}();var s=i(2513),a=i(2764);const l=function(e){return"function"!=typeof e.constructor||(0,a.Z)(e)?{}:r((0,s.Z)(e))}},6009:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=/^(?:0|[1-9]\d*)$/;const n=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&o.test(e))&&e>-1&&e%1==0&&e{"use strict";i.d(t,{Z:()=>n});var o=Object.prototype;const n=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||o)}},8351:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(3413),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=n&&"object"==typeof module&&module&&!module.nodeType&&module,s=r&&r.exports===n&&o.Z.process;const a=function(){try{return r&&r.require&&r.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}()},1851:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e,t){return function(i){return e(t(i))}}},6092:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(3413),n="object"==typeof self&&self&&self.Object===Object&&self;const r=o.Z||n||Function("return this")()},19:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=Function.prototype.toString;const n=function(e){if(null!=e){try{return o.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},207:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var o=i(1899),n=i(288),r=i(7590);const s=(0,n.Z)((function(e,t){(0,o.Z)(t,(0,r.Z)(t),e)}))},4612:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=i(9256);const n=function(e,t){return t="function"==typeof t?t:void 0,(0,o.Z)(e,5,t)}},6682:(e,t,i)=>{"use strict";i.d(t,{Z:()=>b});var o=i(7226),n=i(6092);const r=function(){return n.Z.Date.now()};var s=/\s/;var a=/^\s+/;const l=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&s.test(e.charAt(t)););return t}(e)+1).replace(a,""):e};var c=i(2714),d=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,h=/^0o[0-7]+$/i,m=parseInt;const g=function(e){if("number"==typeof e)return e;if((0,c.Z)(e))return NaN;if((0,o.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,o.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=l(e);var i=u.test(e);return i||h.test(e)?m(e.slice(2),i?2:8):d.test(e)?NaN:+e};var p=Math.max,f=Math.min;const b=function(e,t,i){var n,s,a,l,c,d,u=0,h=!1,m=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var i=n,o=s;return n=s=void 0,u=t,l=e.apply(o,i)}function k(e){var i=e-d;return void 0===d||i>=t||i<0||m&&e-u>=a}function _(){var e=r();if(k(e))return v(e);c=setTimeout(_,function(e){var i=t-(e-d);return m?f(i,a-(e-u)):i}(e))}function v(e){return c=void 0,b&&n?w(e):(n=s=void 0,l)}function y(){var e=r(),i=k(e);if(n=arguments,s=this,d=e,i){if(void 0===c)return function(e){return u=e,c=setTimeout(_,t),h?w(e):l}(d);if(m)return clearTimeout(c),c=setTimeout(_,t),w(d)}return void 0===c&&(c=setTimeout(_,t)),l}return t=g(t)||0,(0,o.Z)(i)&&(h=!!i.leading,a=(m="maxWait"in i)?p(g(i.maxWait)||0,t):a,b="trailing"in i?!!i.trailing:b),y.cancel=function(){void 0!==c&&clearTimeout(c),u=0,n=d=s=c=void 0},y.flush=function(){return void 0===c?l:v(r())},y}},9651:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e,t){return e===t||e!=e&&t!=t}},9203:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e){return e}},4732:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var o=i(3243),n=i(8533);const r=function(e){return(0,n.Z)(e)&&"[object Arguments]"==(0,o.Z)(e)};var s=Object.prototype,a=s.hasOwnProperty,l=s.propertyIsEnumerable;const c=r(function(){return arguments}())?r:function(e){return(0,n.Z)(e)&&a.call(e,"callee")&&!l.call(e,"callee")}},7771:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=Array.isArray},585:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(3234),n=i(1656);const r=function(e){return null!=e&&(0,n.Z)(e.length)&&!(0,o.Z)(e)}},6706:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(6092);var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=n&&"object"==typeof module&&module&&!module.nodeType&&module,s=r&&r.exports===n?o.Z.Buffer:void 0;const a=(s?s.isBuffer:void 0)||function(){return!1}},3251:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(8533),n=i(7514);const r=function(e){return(0,o.Z)(e)&&1===e.nodeType&&!(0,n.Z)(e)}},576:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=i(1152);const n=function(e,t){return(0,o.Z)(e,t)}},3234:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(3243),n=i(7226);const r=function(e){if(!(0,n.Z)(e))return!1;var t=(0,o.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1656:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7226:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},8533:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e){return null!=e&&"object"==typeof e}},7514:(e,t,i)=>{"use strict";i.d(t,{Z:()=>u});var o=i(3243),n=i(2513),r=i(8533),s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,d=l.call(Object);const u=function(e){if(!(0,r.Z)(e)||"[object Object]"!=(0,o.Z)(e))return!1;var t=(0,n.Z)(e);if(null===t)return!0;var i=c.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&l.call(i)==d}},2714:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(3243),n=i(8533);const r=function(e){return"symbol"==typeof e||(0,n.Z)(e)&&"[object Symbol]"==(0,o.Z)(e)}},7212:(e,t,i)=>{"use strict";i.d(t,{Z:()=>d});var o=i(3243),n=i(1656),r=i(8533),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var a=i(1162),l=i(8351),c=l.Z&&l.Z.isTypedArray;const d=c?(0,a.Z)(c):function(e){return(0,r.Z)(e)&&(0,n.Z)(e.length)&&!!s[(0,o.Z)(e)]}},703:(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var o=i(9001),n=i(2764);const r=(0,i(1851).Z)(Object.keys,Object);var s=Object.prototype.hasOwnProperty;var a=i(585);const l=function(e){return(0,a.Z)(e)?(0,o.Z)(e):function(e){if(!(0,n.Z)(e))return r(e);var t=[];for(var i in Object(e))s.call(e,i)&&"constructor"!=i&&t.push(i);return t}(e)}},7590:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var o=i(9001),n=i(7226),r=i(2764);var s=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,n.Z)(e))return function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}(e);var t=(0,r.Z)(e),i=[];for(var o in e)("constructor"!=o||!t&&s.call(e,o))&&i.push(o);return i};var l=i(585);const c=function(e){return(0,l.Z)(e)?(0,o.Z)(e,!0):a(e)}},532:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(){return[]}},111:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(6682),n=i(7226);const r=function(e,t,i){var r=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return(0,n.Z)(i)&&(r="leading"in i?!!i.leading:r,s="trailing"in i?!!i.trailing:s),(0,o.Z)(e,t,{leading:r,maxWait:t,trailing:s})}},9939:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var o=i(7685);var n=i(7771),r=i(2714),s=o.Z?o.Z.prototype:void 0,a=s?s.toString:void 0;const l=function e(t){if("string"==typeof t)return t;if((0,n.Z)(t))return function(e,t){for(var i=-1,o=null==e?0:e.length,n=Array(o);++i{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.b=document.baseURI||self.location.href;var o=i(366);CKEditor5=o})(); \ No newline at end of file +var CKEditor5;!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1","Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue","Blue marker":"Blue marker",Bold:"Bold",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colors",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Edit source":"Edit source","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor editing area: %0":"Editor editing area: %0","Editor toolbar":"Editor toolbar","Empty snippet content":"Empty snippet content","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green","Green marker":"Green marker","Green pen":"Green pen",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",Height:"Height",Highlight:"Highlight","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","HTML snippet":"HTML snippet",Huge:"Huge","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent",Insert:"Insert","Insert code block":"Insert code block","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert HTML":"Insert HTML","Insert image":"Insert image","Insert image via URL":"Insert image via URL","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table",Inset:"Inset",Italic:"Italic",Justify:"Justify","Justify cell text":"Justify cell text","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells",Next:"Next","No preview available":"No preview available",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Paste raw HTML here...":"Paste raw HTML here...","Pink marker":"Pink marker","Plain text":"Plain text","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous",Purple:"Purple",Red:"Red","Red pen":"Red pen",Redo:"Redo","Remove color":"Remove color","Remove Format":"Remove Format","Remove highlight":"Remove highlight","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Rich Text Editor":"Rich Text Editor",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Save changes":"Save changes","Saving changes":"Saving changes","Select all":"Select all","Select column":"Select column","Select row":"Select row","Show more items":"Show more items","Side image":"Side image",Small:"Small",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative","Text highlight toolbar":"Text highlight toolbar",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".','The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"This link has no URL":"This link has no URL",Tiny:"Tiny","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower–latin list style":"Toggle the lower–latin list style","Toggle the lower–roman list style":"Toggle the lower–roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper–latin list style":"Toggle the upper–latin list style","Toggle the upper–roman list style":"Toggle the upper–roman list style",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow","Yellow marker":"Yellow marker"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),(()=>{var e={511:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Alignment:()=>p,AlignmentEditing:()=>u,AlignmentUI:()=>g});var o=i(6854),n=i(6553);const r=["left","right","center","justify"];function s(e){return r.includes(e)}function a(e,t){return"rtl"==t.contentLanguageDirection?"right"===e:"left"===e}function l(e){const t=e.map((e=>{let t;return t="string"==typeof e?{name:e}:e,t})).filter((e=>{const t=r.includes(e.name);return t||(0,n.KE)("alignment-config-name-not-recognized",{option:e}),t})),i=t.filter((e=>Boolean(e.className))).length;if(i&&i{const r=o.slice(i+1);if(r.some((e=>e.name==t.name)))throw new n.Bb("alignment-config-name-already-defined",{option:t,configuredOptions:e});if(t.className&&r.some((e=>e.className==t.className)))throw new n.Bb("alignment-config-classname-already-defined",{option:t,configuredOptions:e})})),t}const c="alignment";class d extends o.mY{refresh(){const e=this.editor.locale,t=(0,n.Ps)(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=Boolean(t)&&this._canBeAligned(t),this.isEnabled&&t.hasAttribute("alignment")?this.value=t.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}execute(e={}){const t=this.editor,i=t.locale,o=t.model,n=o.document,r=e.value;o.change((e=>{const t=Array.from(n.selection.getSelectedBlocks()).filter((e=>this._canBeAligned(e))),o=t[0].getAttribute("alignment");a(r,i)||o===r||!r?function(e,t){for(const i of e)t.removeAttribute(c,i)}(t,e):function(e,t,i){for(const o of e)t.setAttribute(c,i,o)}(t,e,r)}))}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,c)}}class u extends o.Sy{static get pluginName(){return"AlignmentEditing"}constructor(e){super(e),e.config.define("alignment",{options:r.map((e=>({name:e})))})}init(){const e=this.editor,t=e.locale,i=e.model.schema,o=l(e.config.get("alignment.options")).filter((e=>s(e.name)&&!a(e.name,t))),n=o.some((e=>!!e.className));i.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),n?e.conversion.attributeToAttribute(function(e){const t={};for(const i of e)t[i.name]={key:"class",value:i.className};return{model:{key:"alignment",values:e.map((e=>e.name))},view:t}}(o)):e.conversion.for("downcast").attributeToAttribute(function(e){const t={};for(const{name:i}of e)t[i]={key:"style",value:{"text-align":i}};return{model:{key:"alignment",values:e.map((e=>e.name))},view:t}}(o));const r=function(e){const t=[];for(const{name:i}of e)t.push({view:{key:"style",value:{"text-align":i}},model:{key:"alignment",value:i}});return t}(o);for(const t of r)e.conversion.for("upcast").attributeToAttribute(t);const c=function(e){const t=[];for(const{name:i}of e)t.push({view:{key:"align",value:i},model:{key:"alignment",value:i}});return t}(o);for(const t of c)e.conversion.for("upcast").attributeToAttribute(t);e.commands.add("alignment",new d(e))}}var h=i(7095);const m=new Map([["left",o.icons.alignLeft],["right",o.icons.alignRight],["center",o.icons.alignCenter],["justify",o.icons.alignJustify]]);class g extends o.Sy{get localizedOptionTitles(){const e=this.editor.t;return{left:e("Align left"),right:e("Align right"),center:e("Align center"),justify:e("Justify")}}static get pluginName(){return"AlignmentUI"}init(){const e=this.editor,t=e.ui.componentFactory,i=e.t,o=l(e.config.get("alignment.options"));o.map((e=>e.name)).filter(s).forEach((e=>this._addButton(e))),t.add("alignment",(n=>{const r=(0,h.t9)(n);(0,h.up)(r,(()=>o.map((e=>t.create(`alignment:${e.name}`)))),{enableActiveItemFocusOnDropdownOpen:!0,isVertical:!0,ariaLabel:i("Text alignment toolbar")}),r.buttonView.set({label:i("Text alignment"),tooltip:!0}),r.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const s="rtl"===n.contentLanguageDirection?m.get("right"):m.get("left"),a=e.commands.get("alignment");return r.buttonView.bind("icon").to(a,"value",(e=>m.get(e)||s)),r.bind("isEnabled").to(a,"isEnabled"),this.listenTo(r,"execute",(()=>{e.editing.view.focus()})),r}))}_addButton(e){const t=this.editor;t.ui.componentFactory.add(`alignment:${e}`,(i=>{const o=t.commands.get("alignment"),n=new h.r5(i);return n.set({label:this.localizedOptionTitles[e],icon:m.get(e),tooltip:!0,isToggleable:!0}),n.bind("isEnabled").to(o),n.bind("isOn").to(o,"value",(t=>t===e)),this.listenTo(n,"execute",(()=>{t.execute("alignment",{value:e}),t.editing.view.focus()})),n}))}}class p extends o.Sy{static get requires(){return[u,g]}static get pluginName(){return"Alignment"}}},6549:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Autosave:()=>s});var o=i(6854),n=i(6553),r=i(6682);class s extends o.Sy{static get pluginName(){return"Autosave"}static get requires(){return[o.lR]}constructor(e){super(e),this._action=null;const t=e.config.get("autosave")||{},i=t.waitingTime||1e3;this.set("state","synchronized"),this._debouncedSave=(0,r.Z)(this._save.bind(this),i),this._lastDocumentVersion=e.model.document.version,this._savePromise=null,this._domEmitter=new((0,n.Xu)()),this._config=t,this._pendingActions=e.plugins.get(o.lR),this._makeImmediateSave=!1}init(){const e=this.editor,t=e.model.document;this.listenTo(e,"ready",(()=>{this.listenTo(t,"change:data",((e,t)=>{this._saveCallbacks.length&&t.isLocal&&("synchronized"===this.state&&(this.state="waiting",this._setPendingAction()),"waiting"===this.state&&this._debouncedSave())}))})),this.listenTo(e,"destroy",(()=>this._flush()),{priority:"highest"}),this._domEmitter.listenTo(window,"beforeunload",((e,t)=>{this._pendingActions.hasAny&&(t.returnValue=this._pendingActions.first.message)}))}destroy(){this._domEmitter.stopListening(),super.destroy()}save(){return this._debouncedSave.cancel(),this._save()}_flush(){this._debouncedSave.flush()}_save(){return this._savePromise?(this._makeImmediateSave=this.editor.model.document.version>this._lastDocumentVersion,this._savePromise):(this._setPendingAction(),this.state="saving",this._lastDocumentVersion=this.editor.model.document.version,this._savePromise=Promise.resolve().then((()=>Promise.all(this._saveCallbacks.map((e=>e(this.editor)))))).finally((()=>{this._savePromise=null})).then((()=>{if(this._makeImmediateSave)return this._makeImmediateSave=!1,this._save();this.editor.model.document.version>this._lastDocumentVersion?(this.state="waiting",this._debouncedSave()):(this.state="synchronized",this._pendingActions.remove(this._action),this._action=null)})).catch((e=>{throw this.state="error",this.state="saving",this._debouncedSave(),e})),this._savePromise)}_setPendingAction(){const e=this.editor.t;this._action||(this._action=this._pendingActions.add(e("Saving changes")))}get _saveCallbacks(){const e=[];return this.adapter&&this.adapter.save&&e.push(this.adapter.save),this._config.save&&e.push(this._config.save),e}}},1214:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Bold:()=>d,BoldEditing:()=>s,BoldUI:()=>c,Code:()=>S,CodeEditing:()=>m,CodeUI:()=>T,Italic:()=>O,ItalicEditing:()=>I,ItalicUI:()=>R,Strikethrough:()=>D,StrikethroughEditing:()=>M,StrikethroughUI:()=>N,Subscript:()=>Z,SubscriptEditing:()=>F,SubscriptUI:()=>W,Superscript:()=>K,SuperscriptEditing:()=>j,SuperscriptUI:()=>q,Underline:()=>X,UnderlineEditing:()=>J,UnderlineUI:()=>Q});var o=i(6854);class n extends o.mY{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,i=t.document.selection,o=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(i.isCollapsed)o?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const n=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of n)o?e.setAttribute(this.attributeKey,o,t):e.removeAttribute(this.attributeKey,t)}}))}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,i=e.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const e of i.getRanges())for(const i of e.getItems())if(t.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}const r="bold";class s extends o.Sy{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:r}),e.model.schema.setAttributeProperties(r,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:r,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t&&("bold"==t||Number(t)>=600)?{name:!0,styles:["font-weight"]}:null}]}),e.commands.add(r,new n(e,r)),e.keystrokes.set("CTRL+B",r)}}var a=i(7095);const l="bold";class c extends o.Sy{static get pluginName(){return"BoldUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(l,(i=>{const n=e.commands.get(l),r=new a.r5(i);return r.set({label:t("Bold"),icon:o.icons.bold,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute(l),e.editing.view.focus()})),r}))}}class d extends o.Sy{static get requires(){return[s,c]}static get pluginName(){return"Bold"}}var u=i(5187);const h="code";class m extends o.Sy{static get pluginName(){return"CodeEditing"}static get requires(){return[u.mh]}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:h}),e.model.schema.setAttributeProperties(h,{isFormatting:!0,copyOnEnter:!1}),e.conversion.attributeToElement({model:h,view:"code",upcastAlso:{styles:{"word-wrap":"break-word"}}}),e.commands.add(h,new n(e,h)),e.plugins.get(u.mh).registerAttribute(h),(0,u.Im)(e,h,"code","ck-code_selected")}}var g=i(3379),p=i.n(g),f=i(9037),b=i.n(f),w=i(569),k=i.n(w),_=i(8575),v=i.n(_),y=i(9216),C=i.n(y),x=i(5363),A={attributes:{"data-cke":!0}};A.setAttributes=v(),A.insert=k().bind(null,"head"),A.domAPI=b(),A.insertStyleElement=C(),p()(x.Z,A),x.Z&&x.Z.locals&&x.Z.locals;const E="code";class T extends o.Sy{static get pluginName(){return"CodeUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(E,(i=>{const o=e.commands.get(E),n=new a.r5(i);return n.set({label:t("Code"),icon:'',tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute(E),e.editing.view.focus()})),n}))}}class S extends o.Sy{static get requires(){return[m,T]}static get pluginName(){return"Code"}}const P="italic";class I extends o.Sy{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:P}),e.model.schema.setAttributeProperties(P,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:P,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(P,new n(e,P)),e.keystrokes.set("CTRL+I",P)}}const V="italic";class R extends o.Sy{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(V,(i=>{const o=e.commands.get(V),n=new a.r5(i);return n.set({label:t("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute(V),e.editing.view.focus()})),n}))}}class O extends o.Sy{static get requires(){return[I,R]}static get pluginName(){return"Italic"}}const B="strikethrough";class M extends o.Sy{static get pluginName(){return"StrikethroughEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:B}),e.model.schema.setAttributeProperties(B,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:B,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add(B,new n(e,B)),e.keystrokes.set("CTRL+SHIFT+X","strikethrough")}}const z="strikethrough";class N extends o.Sy{static get pluginName(){return"StrikethroughUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(z,(i=>{const o=e.commands.get(z),n=new a.r5(i);return n.set({label:t("Strikethrough"),icon:'',keystroke:"CTRL+SHIFT+X",tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute(z),e.editing.view.focus()})),n}))}}class D extends o.Sy{static get requires(){return[M,N]}static get pluginName(){return"Strikethrough"}}const L="subscript";class F extends o.Sy{static get pluginName(){return"SubscriptEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:L}),e.model.schema.setAttributeProperties(L,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:L,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),e.commands.add(L,new n(e,L))}}const H="subscript";class W extends o.Sy{static get pluginName(){return"SubscriptUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(H,(i=>{const o=e.commands.get(H),n=new a.r5(i);return n.set({label:t("Subscript"),icon:'',tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute(H),e.editing.view.focus()})),n}))}}class Z extends o.Sy{static get requires(){return[F,W]}static get pluginName(){return"Subscript"}}const U="superscript";class j extends o.Sy{static get pluginName(){return"SuperscriptEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:U}),e.model.schema.setAttributeProperties(U,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:U,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),e.commands.add(U,new n(e,U))}}const $="superscript";class q extends o.Sy{static get pluginName(){return"SuperscriptUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add($,(i=>{const o=e.commands.get($),n=new a.r5(i);return n.set({label:t("Superscript"),icon:'',tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute($),e.editing.view.focus()})),n}))}}class K extends o.Sy{static get requires(){return[j,q]}static get pluginName(){return"Superscript"}}const G="underline";class J extends o.Sy{static get pluginName(){return"UnderlineEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:G}),e.model.schema.setAttributeProperties(G,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:G,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),e.commands.add(G,new n(e,G)),e.keystrokes.set("CTRL+U","underline")}}const Y="underline";class Q extends o.Sy{static get pluginName(){return"UnderlineUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Y,(i=>{const o=e.commands.get(Y),n=new a.r5(i);return n.set({label:t("Underline"),icon:'',keystroke:"CTRL+U",tooltip:!0,isToggleable:!0}),n.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(n,"execute",(()=>{e.execute(Y),e.editing.view.focus()})),n}))}}class X extends o.Sy{static get requires(){return[J,Q]}static get pluginName(){return"Underline"}}},4210:(e,t,i)=>{"use strict";i.r(t),i.d(t,{BlockQuote:()=>E,BlockQuoteEditing:()=>u,BlockQuoteUI:()=>A});var o=i(6854),n=i(1863),r=i(5187),s=i(6553);class a extends o.mY{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.schema,o=t.document.selection,n=Array.from(o.getSelectedBlocks()),r=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(r){const t=n.filter((e=>l(e)||d(i,e)));this._applyQuote(e,t)}else this._removeQuote(e,n.filter(l))}))}_getValue(){const e=this.editor.model.document.selection,t=(0,s.Ps)(e.getSelectedBlocks());return!(!t||!l(t))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,i=(0,s.Ps)(e.getSelectedBlocks());return!!i&&d(t,i)}_removeQuote(e,t){c(e,t).reverse().forEach((t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const i=e.createPositionBefore(t.start.parent);return void e.move(t,i)}t.end.isAtEnd||e.split(t.end);const i=e.createPositionAfter(t.end.parent);e.move(t,i)}))}_applyQuote(e,t){const i=[];c(e,t).reverse().forEach((t=>{let o=l(t.start);o||(o=e.createElement("blockQuote"),e.wrap(t,o)),i.push(o)})),i.reverse().reduce(((t,i)=>t.nextSibling==i?(e.merge(e.createPositionAfter(t)),t):i))}}function l(e){return"blockQuote"==e.parent.name?e.parent:null}function c(e,t){let i,o=0;const n=[];for(;o{const o=e.model.document.differ.getChanges();for(const e of o)if("insert"==e.type){const o=e.position.nodeAfter;if(!o)continue;if(o.is("element","blockQuote")&&o.isEmpty)return i.remove(o),!0;if(o.is("element","blockQuote")&&!t.checkChild(e.position,o))return i.unwrap(o),!0;if(o.is("element")){const e=i.createRangeIn(o);for(const o of e.getItems())if(o.is("element","blockQuote")&&!t.checkChild(i.createPositionBefore(o),o))return i.unwrap(o),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return i.remove(t),!0}return!1}));const i=this.editor.editing.view.document,o=e.model.document.selection,n=e.commands.get("blockQuote");this.listenTo(i,"enter",((t,i)=>{o.isCollapsed&&n.value&&o.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),i.preventDefault(),t.stop())}),{context:"blockquote"}),this.listenTo(i,"delete",((t,i)=>{if("backward"!=i.direction||!o.isCollapsed||!n.value)return;const r=o.getLastPosition().parent;r.isEmpty&&!r.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),i.preventDefault(),t.stop())}),{context:"blockquote"})}}var h=i(7095),m=i(3379),g=i.n(m),p=i(9037),f=i.n(p),b=i(569),w=i.n(b),k=i(8575),_=i.n(k),v=i(9216),y=i.n(v),C=i(3789),x={attributes:{"data-cke":!0}};x.setAttributes=_(),x.insert=w().bind(null,"head"),x.domAPI=f(),x.insertStyleElement=y(),g()(C.Z,x),C.Z&&C.Z.locals&&C.Z.locals;class A extends o.Sy{static get pluginName(){return"BlockQuoteUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("blockQuote",(i=>{const n=e.commands.get("blockQuote"),r=new h.r5(i);return r.set({label:t("Block quote"),icon:o.icons.quote,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(r,"execute",(()=>{e.execute("blockQuote"),e.editing.view.focus()})),r}))}}class E extends o.Sy{static get requires(){return[u,A]}static get pluginName(){return"BlockQuote"}}},9998:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CodeBlock:()=>V,CodeBlockEditing:()=>g,CodeBlockUI:()=>I});var o=i(6854),n=i(1863),r=i(3291),s=i(6553),a=i(4934);class l extends o.mY{constructor(e){super(e),this._lastLanguage=null}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor,i=t.model,o=i.document.selection,n=(0,a.getNormalizedAndLocalizedLanguageDefinitions)(t)[0],r=Array.from(o.getSelectedBlocks()),s=null==e.forceValue?!this.value:e.forceValue,l=function(e,t,i){return e.language?e.language:e.usePreviousLanguageChoice&&t?t:i}(e,this._lastLanguage,n.language);i.change((e=>{s?this._applyCodeBlock(e,r,l):this._removeCodeBlock(e,r)}))}_getValue(){const e=this.editor.model.document.selection,t=(0,s.Ps)(e.getSelectedBlocks());return!(!t||!t.is("element","codeBlock"))&&t.getAttribute("language")}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,i=(0,s.Ps)(e.getSelectedBlocks());return!!i&&(0,a.canBeCodeBlock)(t,i)}_applyCodeBlock(e,t,i){this._lastLanguage=i;const o=this.editor.model.schema,n=t.filter((e=>(0,a.canBeCodeBlock)(o,e)));for(const t of n)e.rename(t,"codeBlock"),e.setAttribute("language",i,t),o.removeDisallowedAttributes([t],e),Array.from(t.getChildren()).filter((e=>!o.checkChild(t,e))).forEach((t=>e.remove(t)));n.reverse().forEach(((t,i)=>{const o=n[i+1];t.previousSibling===o&&(e.appendElement("softBreak",o),e.merge(e.createPositionBefore(t)))}))}_removeCodeBlock(e,t){const i=t.filter((e=>e.is("element","codeBlock")));for(const t of i){const i=e.createRangeOn(t);for(const t of Array.from(i.getItems()).reverse())if(t.is("element","softBreak")&&t.parent.is("element","codeBlock")){const{position:i}=e.split(e.createPositionBefore(t)),o=i.nodeAfter;e.rename(o,"paragraph"),e.removeAttribute("language",o),e.remove(t)}e.rename(t,"paragraph"),e.removeAttribute("language",t)}}}class c extends o.mY{constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model;e.change((t=>{const i=(0,a.getIndentOutdentPositions)(e);for(const o of i){const i=t.createText(this._indentSequence);e.insertContent(i,o)}}))}_checkEnabled(){return!!this._indentSequence&&(0,a.isModelSelectionInCodeBlock)(this.editor.model.document.selection)}}class d extends o.mY{constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model;e.change((()=>{const t=(0,a.getIndentOutdentPositions)(e);for(const i of t){const t=u(e,i,this._indentSequence);t&&e.deleteContent(e.createSelection(t))}}))}_checkEnabled(){if(!this._indentSequence)return!1;const e=this.editor.model;return!!(0,a.isModelSelectionInCodeBlock)(e.document.selection)&&(0,a.getIndentOutdentPositions)(e).some((t=>u(e,t,this._indentSequence)))}}function u(e,t,i){const o=function(e){let t=e.parent.getChild(e.index);return t&&!t.is("element","softBreak")||(t=e.nodeBefore),!t||t.is("element","softBreak")?null:t}(t);if(!o)return null;const n=(0,a.getLeadingWhiteSpaces)(o),r=n.lastIndexOf(i);if(r+i.length!==n.length)return null;if(-1===r)return null;const{parent:s,startOffset:l}=o;return e.createRange(e.createPositionAt(s,l+r),e.createPositionAt(s,l+r+i.length))}function h(e,t,i=!1){const o=(0,a.getPropertyAssociation)(t,"language","class"),n=(0,a.getPropertyAssociation)(t,"language","label");return(t,r,s)=>{const{writer:a,mapper:l,consumable:c}=s;if(!c.consume(r.item,"insert"))return;const d=r.item.getAttribute("language"),u=l.toViewPosition(e.createPositionBefore(r.item)),h={};i&&(h["data-language"]=n[d],h.spellcheck="false");const m=o[d]?{class:o[d]}:void 0,g=a.createContainerElement("code",m),p=a.createContainerElement("pre",h,g);a.insert(u,p),l.bindElements(r.item,g)}}const m="paragraph";class g extends o.Sy{static get pluginName(){return"CodeBlockEditing"}static get requires(){return[n.G]}constructor(e){super(e),e.config.define("codeBlock",{languages:[{language:"plaintext",label:"Plain text"},{language:"c",label:"C"},{language:"cs",label:"C#"},{language:"cpp",label:"C++"},{language:"css",label:"CSS"},{language:"diff",label:"Diff"},{language:"html",label:"HTML"},{language:"java",label:"Java"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"python",label:"Python"},{language:"ruby",label:"Ruby"},{language:"typescript",label:"TypeScript"},{language:"xml",label:"XML"}],indentSequence:"\t"})}init(){const e=this.editor,t=e.model.schema,i=e.model,o=e.editing.view,n=e.plugins.has("DocumentListEditing"),s=(0,a.getNormalizedAndLocalizedLanguageDefinitions)(e);e.commands.add("codeBlock",new l(e)),e.commands.add("indentCodeBlock",new c(e)),e.commands.add("outdentCodeBlock",new d(e)),this.listenTo(o.document,"tab",((t,i)=>{const o=i.shiftKey?"outdentCodeBlock":"indentCodeBlock";e.commands.get(o).isEnabled&&(e.execute(o),i.stopPropagation(),i.preventDefault(),t.stop())}),{context:"pre"}),t.register("codeBlock",{allowWhere:"$block",allowChildren:"$text",isBlock:!0,allowAttributes:["language"]}),t.addAttributeCheck(((e,t)=>{const i=e.endsWith("codeBlock")&&t.startsWith("list")&&"list"!==t;return!(!n||!i)||!e.endsWith("codeBlock $text")&&void 0})),e.model.schema.addChildCheck(((e,t)=>{if(e.endsWith("codeBlock")&&t.isObject)return!1})),e.editing.downcastDispatcher.on("insert:codeBlock",h(i,s,!0)),e.data.downcastDispatcher.on("insert:codeBlock",h(i,s)),e.data.downcastDispatcher.on("insert:softBreak",function(e){return(t,i,o)=>{if("codeBlock"!==i.item.parent.name)return;const{writer:n,mapper:r,consumable:s}=o;if(!s.consume(i.item,"insert"))return;const a=r.toViewPosition(e.createPositionBefore(i.item));n.insert(a,n.createText("\n"))}}(i),{priority:"high"}),e.data.upcastDispatcher.on("element:code",function(e,t){const i=(0,a.getPropertyAssociation)(t,"class","language"),o=t[0].language;return(e,t,n)=>{const r=t.viewItem,s=r.parent;if(!s||!s.is("element","pre"))return;if(t.modelCursor.findAncestor("codeBlock"))return;const{consumable:a,writer:l}=n;if(!a.test(r,{name:!0}))return;const c=l.createElement("codeBlock"),d=[...r.getClassNames()];d.length||d.push("");for(const e of d){const t=i[e];if(t){l.setAttribute("language",t,c);break}}c.hasAttribute("language")||l.setAttribute("language",o,c),n.convertChildren(r,c),n.safeInsert(c,t.modelCursor)&&(a.consume(r,{name:!0}),n.updateConversionResult(c,t))}}(0,s)),e.data.upcastDispatcher.on("text",((e,t,{consumable:i,writer:o})=>{let n=t.modelCursor;if(!i.test(t.viewItem))return;if(!n.findAncestor("codeBlock"))return;i.consume(t.viewItem);const r=t.viewItem.data.split("\n").map((e=>o.createText(e))),s=r[r.length-1];for(const e of r)if(o.insert(e,n),n=n.getShiftedBy(e.offsetSize),e!==s){const e=o.createElement("softBreak");o.insert(e,n),n=o.createPositionAfter(e)}t.modelRange=o.createRange(t.modelCursor,n),t.modelCursor=n})),e.data.upcastDispatcher.on("element:pre",((e,t,{consumable:i})=>{const o=t.viewItem;if(o.findAncestor("pre"))return;const n=Array.from(o.getChildren()),r=n.find((e=>e.is("element","code")));if(r)for(const e of n)e!==r&&e.is("$text")&&i.consume(e,{name:!0})}),{priority:"high"}),this.listenTo(e.editing.view.document,"clipboardInput",((t,o)=>{let n=i.createRange(i.document.selection.anchor);if(o.targetRanges&&(n=e.editing.mapper.toModelRange(o.targetRanges[0])),!n.start.parent.is("element","codeBlock"))return;const s=o.dataTransfer.getData("text/plain"),l=new r.yj(e.editing.view.document);o.content=(0,a.rawSnippetTextToViewDocumentFragment)(l,s)})),this.listenTo(i,"getSelectedContent",((e,[o])=>{const n=o.anchor;!o.isCollapsed&&n.parent.is("element","codeBlock")&&n.hasSameParentAs(o.focus)&&i.change((i=>{const r=e.return;if(n.parent.is("element")&&(r.childCount>1||o.containsEntireContent(n.parent))){const t=i.createElement("codeBlock",n.parent.getAttributes());i.append(r,t);const o=i.createDocumentFragment();return i.append(t,o),void(e.return=o)}const s=r.getChild(0);t.checkAttribute(s,"code")&&i.setAttribute("code",!0,s)}))}))}afterInit(){const e=this.editor,t=e.commands,i=t.get("indent"),o=t.get("outdent");i&&i.registerChildCommand(t.get("indentCodeBlock"),{priority:"highest"}),o&&o.registerChildCommand(t.get("outdentCodeBlock")),this.listenTo(e.editing.view.document,"enter",((t,i)=>{e.model.document.selection.getLastPosition().parent.is("element","codeBlock")&&(function(e,t){const i=e.model.document,o=e.editing.view,n=i.selection.getLastPosition(),r=n.nodeAfter;return!(t||!i.selection.isCollapsed||!n.isAtStart)&&(!!f(r)&&(e.model.change((t=>{e.execute("enter");const o=i.selection.anchor.parent.previousSibling;t.rename(o,m),t.setSelection(o,"in"),e.model.schema.removeDisallowedAttributes([o],t),t.remove(r)})),o.scrollToTheSelection(),!0))}(e,i.isSoft)||function(e,t){const i=e.model,o=i.document,n=e.editing.view,r=o.selection.getLastPosition(),s=r.nodeBefore;let a;if(t||!o.selection.isCollapsed||!r.isAtEnd||!s||!s.previousSibling)return!1;if(f(s)&&f(s.previousSibling))a=i.createRange(i.createPositionBefore(s.previousSibling),i.createPositionAfter(s));else if(p(s)&&f(s.previousSibling)&&f(s.previousSibling.previousSibling))a=i.createRange(i.createPositionBefore(s.previousSibling.previousSibling),i.createPositionAfter(s));else{if(!(p(s)&&f(s.previousSibling)&&p(s.previousSibling.previousSibling)&&s.previousSibling.previousSibling&&f(s.previousSibling.previousSibling.previousSibling)))return!1;a=i.createRange(i.createPositionBefore(s.previousSibling.previousSibling.previousSibling),i.createPositionAfter(s))}return e.model.change((t=>{t.remove(a),e.execute("enter");const i=o.selection.anchor.parent;t.rename(i,m),e.model.schema.removeDisallowedAttributes([i],t)})),n.scrollToTheSelection(),!0}(e,i.isSoft)||function(e){const t=e.model.document,i=t.selection.getLastPosition(),o=i.nodeBefore||i.textNode;let n;o&&o.is("$text")&&(n=(0,a.getLeadingWhiteSpaces)(o)),e.model.change((i=>{e.execute("shiftEnter"),n&&i.insertText(n,t.selection.anchor)}))}(e),i.preventDefault(),t.stop())}),{context:"pre"})}}function p(e){return e&&e.is("$text")&&!e.data.match(/\S/)}function f(e){return e&&e.is("element","softBreak")}var b=i(7095),w=i(3379),k=i.n(w),_=i(9037),v=i.n(_),y=i(569),C=i.n(y),x=i(8575),A=i.n(x),E=i(9216),T=i.n(E),S=i(3229),P={attributes:{"data-cke":!0}};P.setAttributes=A(),P.insert=C().bind(null,"head"),P.domAPI=v(),P.insertStyleElement=T(),k()(S.Z,P),S.Z&&S.Z.locals&&S.Z.locals;class I extends o.Sy{static get pluginName(){return"CodeBlockUI"}init(){const e=this.editor,t=e.t,i=e.ui.componentFactory,o=(0,a.getNormalizedAndLocalizedLanguageDefinitions)(e);i.add("codeBlock",(i=>{const n=e.commands.get("codeBlock"),r=(0,b.t9)(i,b.Rm),s=r.buttonView;return s.set({label:t("Insert code block"),tooltip:!0,icon:'',isToggleable:!0}),s.bind("isOn").to(n,"value",(e=>!!e)),s.on("execute",(()=>{e.execute("codeBlock",{usePreviousLanguageChoice:!0}),e.editing.view.focus()})),r.on("execute",(t=>{e.execute("codeBlock",{language:t.source._codeBlockLanguage,forceValue:!0}),e.editing.view.focus()})),r.class="ck-code-block-dropdown",r.bind("isEnabled").to(n),(0,b.Pm)(r,(()=>this._getLanguageListItemDefinitions(o))),r}))}_getLanguageListItemDefinitions(e){const t=this.editor.commands.get("codeBlock"),i=new s.FE;for(const o of e){const e={type:"button",model:new b.Hn({_codeBlockLanguage:o.language,label:o.label,withText:!0})};e.model.bind("isOn").to(t,"value",(t=>t===e.model._codeBlockLanguage)),i.add(e)}return i}}class V extends o.Sy{static get requires(){return[g,I]}static get pluginName(){return"CodeBlock"}}},4934:(e,t,i)=>{"use strict";i.r(t),i.d(t,{canBeCodeBlock:()=>d,getIndentOutdentPositions:()=>l,getLeadingWhiteSpaces:()=>s,getNormalizedAndLocalizedLanguageDefinitions:()=>n,getPropertyAssociation:()=>r,isModelSelectionInCodeBlock:()=>c,rawSnippetTextToViewDocumentFragment:()=>a});var o=i(6553);function n(e){const t=e.t,i=e.config.get("codeBlock.languages");for(const e of i)"Plain text"===e.label&&(e.label=t("Plain text")),void 0===e.class&&(e.class=`language-${e.language}`);return i}function r(e,t,i){const o={};for(const n of e)"class"===t?o[n[t].split(" ").shift()]=n[i]:o[n[t]]=n[i];return o}function s(e){return e.data.match(/^(\s*)/)[0]}function a(e,t){const i=e.createDocumentFragment(),o=t.split("\n"),n=o.reduce(((t,i,n)=>(t.push(i),n{"use strict";i.r(t),i.d(t,{Command:()=>s,Context:()=>d,ContextPlugin:()=>u,DataApiMixin:()=>w,Editor:()=>p,ElementApiMixin:()=>k,MultiCommand:()=>l,PendingActions:()=>v,Plugin:()=>n,attachToForm:()=>b,icons:()=>y,secureSourceElement:()=>_});var o=i(7732);class n extends((0,o.ObservableMixin)()){constructor(e){super(),this._disableStack=new Set,this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",r,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",r),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function r(e){e.return=!1,e.stop()}class s extends((0,o.ObservableMixin)()){constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"}),this.listenTo(e,"change:isReadOnly",((e,t,i)=>{i&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}))}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",a,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",a),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function a(e){e.return=!1,e.stop()}class l extends s{constructor(){super(...arguments),this._childCommandsDefinitions=[]}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){(0,o.insertToPriorityArray)(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find((({command:e})=>e.isEnabled));return e&&e.command}}class c extends((0,o.EmitterMixin)()){constructor(e,t=[],i=[]){super(),this._plugins=new Map,this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of i)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new o.CKEditorError("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],i=[]){const n=this,r=this._context;!function e(t,i=new Set){t.forEach((t=>{l(t)&&(i.has(t)||(i.add(t),t.pluginName&&!n._availablePlugins.has(t.pluginName)&&n._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,i)))}))}(e),h(e);const s=[...function e(t,i=new Set){return t.map((e=>l(e)?e:n._availablePlugins.get(e))).reduce(((t,o)=>i.has(o)?t:(i.add(o),o.requires&&(h(o.requires,o),e(o.requires,i).forEach((e=>t.add(e)))),t.add(o))),new Set)}(e.filter((e=>!d(e,t))))];!function(e,t){for(const i of t){if("function"!=typeof i)throw new o.CKEditorError("plugincollection-replace-plugin-invalid-type",null,{pluginItem:i});const t=i.pluginName;if(!t)throw new o.CKEditorError("plugincollection-replace-plugin-missing-name",null,{pluginItem:i});if(i.requires&&i.requires.length)throw new o.CKEditorError("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const r=n._availablePlugins.get(t);if(!r)throw new o.CKEditorError("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const s=e.indexOf(r);if(-1===s){if(n._contextPlugins.has(r))return;throw new o.CKEditorError("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(r.requires&&r.requires.length)throw new o.CKEditorError("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(s,1,i),n._availablePlugins.set(t,i)}}(s,i);const a=function(e){return e.map((e=>{let t=n._contextPlugins.get(e);return t=t||new e(r),n._add(e,t),t}))}(s);return m(a,"init").then((()=>m(a,"afterInit"))).then((()=>a));function l(e){return"function"==typeof e}function c(e){return l(e)&&!!e.isContextPlugin}function d(e,t){return t.some((t=>t===e||u(e)===t||u(t)===e))}function u(e){return l(e)?e.pluginName||e.name:e}function h(e,i=null){e.map((e=>l(e)?e:n._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(!l(e)){if(t)throw new o.CKEditorError("plugincollection-soft-required",r,{missingPlugin:e,requiredBy:u(t)});throw new o.CKEditorError("plugincollection-plugin-not-found",r,{plugin:e})}}(e,i),function(e,t){if(c(t)&&!c(e))throw new o.CKEditorError("plugincollection-context-required",r,{plugin:u(e),requiredBy:u(t)})}(e,i),function(e,i){if(i&&d(e,t))throw new o.CKEditorError("plugincollection-required",r,{plugin:u(e),requiredBy:u(i)})}(e,i)}))}function m(e,t){return e.reduce(((e,i)=>i[t]?n._contextPlugins.has(i)?e:e.then(i[t].bind(i)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const i=e.pluginName;if(i){if(this._plugins.has(i))throw new o.CKEditorError("plugincollection-plugin-name-conflict",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:e});this._plugins.set(i,t)}}}class d{constructor(e){this._contextOwner=null,this.config=new o.Config(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new c(this,t);const i=this.config.get("language")||{};this.locale=new o.Locale({uiLanguage:"string"==typeof i?i:i.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new o.Collection}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const i of e.concat(t)){if("function"!=typeof i)throw new o.CKEditorError("context-initplugins-constructor-only",null,{Plugin:i});if(!0!==i.isContextPlugin)throw new o.CKEditorError("context-initplugins-invalid-plugin",null,{Plugin:i})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new o.CKEditorError("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const i=new this(e);t(i.initPlugins().then((()=>i)))}))}}class u extends((0,o.ObservableMixin)()){constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}var h=i(600);class m{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const i=this.get(e);if(!i)throw new o.CKEditorError("commandcollection-command-not-found",this,{commandName:e});return i.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class g extends o.KeystrokeHandler{constructor(e){super(),this.editor=e}set(e,t,i={}){if("string"==typeof t){const e=t;t=(t,i)=>{this.editor.execute(e),i()}}super.set(e,t,i)}}class p extends((0,o.ObservableMixin)()){constructor(e={}){super();const t=this.constructor,i=e.language||t.defaultConfig&&t.defaultConfig.language;this._context=e.context||new d({language:i}),this._context._addEditor(this,!e.context);const n=Array.from(t.builtinPlugins||[]);this.config=new o.Config(e,t.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new c(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new m,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new h.Model;const r=new h.StylesProcessor;this.data=new h.DataController(this.model,r),this.editing=new h.EditingController(this.model,r),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new h.Conversion([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new g(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new o.CKEditorError("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new o.CKEditorError("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new o.CKEditorError("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),i=e.get("removePlugins")||[],o=e.get("extraPlugins")||[],n=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(o),i,n)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){o.CKEditorError.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}}var f=i(3234);function b(e){if(!(0,f.Z)(e.updateSourceElement))throw new o.CKEditorError("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(function(e){return!!e&&"textarea"===e.tagName.toLowerCase()}(t)&&t.form){let i;const o=t.form,n=()=>e.updateSourceElement();(0,f.Z)(o.submit)&&(i=o.submit,o.submit=()=>{n(),i.apply(o)}),o.addEventListener("submit",n),e.on("destroy",(()=>{o.removeEventListener("submit",n),i&&(o.submit=i)}))}}function w(e){return class extends e{setData(e){this.data.set(e)}getData(e){return this.data.get(e)}}}{const e=w(Object);w.setData=e.prototype.setData,w.getData=e.prototype.getData}function k(e){return class extends e{updateSourceElement(e=this.data.get()){if(!this.sourceElement)throw new o.CKEditorError("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),i=this.sourceElement instanceof HTMLTextAreaElement;t||i?(0,o.setDataInElement)(this.sourceElement,e):(0,o.setDataInElement)(this.sourceElement,"")}}}function _(e,t){if(t.ckeditorInstance)throw new o.CKEditorError("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}k.updateSourceElement=k(Object).prototype.updateSourceElement;class v extends u{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new o.Collection({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new o.CKEditorError("pendingactions-add-invalid-message",this);const t=new((0,o.ObservableMixin)());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const y={bold:'',cancel:'',caption:'',check:'',cog:'',eraser:'',image:'',lowVision:'',importExport:'',paragraph:'',plus:'',text:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:'',quote:'',threeVerticalDots:''}},1184:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ClassicEditor:()=>R});var o=i(7095),n=i(3291),r=i(6553);class s extends o.S8{constructor(e,t){super(e),this.view=t,this._toolbarConfig=(0,o.iw)(e.config.get("toolbar")),this._elementReplacer=new r.a6}get element(){return this.view.element}init(e){const t=this.editor,i=this.view,o=t.editing.view,n=i.editable,r=o.document.getRoot();n.name=r.rootName,i.render();const s=n.element;this.setEditableElement(n.name,s),i.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(s),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",(({top:e})=>e||0)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,i=t.document.getRoot(),o=e.sourceElement;let r;const s=e.config.get("placeholder");s&&(r="string"==typeof s?s:s[this.view.editable.name]),!r&&o&&"textarea"===o.tagName.toLowerCase()&&(r=o.getAttribute("placeholder")),r&&(0,n.ID)({view:t,element:i,text:r,isDirectHost:!1,keepOnFocus:!0})}}var a=i(3379),l=i.n(a),c=i(9037),d=i.n(c),u=i(569),h=i.n(u),m=i(8575),g=i.n(m),p=i(9216),f=i.n(p),b=i(3624),w={attributes:{"data-cke":!0}};w.setAttributes=g(),w.insert=h().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=f(),l()(b.Z,w),b.Z&&b.Z.locals&&b.Z.locals;class k extends o.py{constructor(e,t,i={}){super(e),this.stickyPanel=new o.lp(e),this.toolbar=new o.jB(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),this.editable=new o.r1(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}var _=i(6854);class v{constructor(e){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const i=this._listeners[e]||[];for(const e of i)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const i=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:i}),i?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){return this.crashes.length<=this._crashNumberLimit||(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function y(e,t=new Set){const i=[e],o=new Set;let n=0;for(;i.length>n;){const e=i[n++];if(!o.has(e)&&C(e)&&!t.has(e))if(o.add(e),Symbol.iterator in e)try{for(const t of e)i.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&i.push(e[t])}return o}function C(e){const t=Object.prototype.toString.call(e),i=typeof e;return!("number"===i||"boolean"===i||"string"===i||"symbol"===i||"function"===i||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function x(e,t,i=new Set){if(e===t&&"object"==typeof(o=e)&&null!==o)return!0;var o;const n=y(e,i),r=y(t,i);for(const e of n)if(r.has(e))return!0;return!1}var A=i(111),E=i(4612),T=i(3251);class S extends v{constructor(e,t={}){super(t),this._editor=null,this._throttledSave=(0,A.Z)(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,i)=>e.create(t,i)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{if("string"==typeof this._elementOrData)return this.create(this._data,this._config,this._config.context);{const e=Object.assign({},this._config,{initialData:this._data});return this.create(this._elementOrData,e,e.context)}})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,i){return Promise.resolve().then((()=>(super._startErrorHandling(),this._elementOrData=e,this._config=this._cloneEditorConfiguration(t)||{},this._config.context=i,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this.state="ready",this._fire("stateChange")}))}destroy(){return Promise.resolve().then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.flush();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e={};for(const t of this._editor.model.document.getRootNames())e[t]=this._editor.data.get({rootName:t});return e}_isErrorComingFromThisItem(e){return x(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return(0,E.Z)(e,((e,t)=>(0,T.Z)(e)||"context"===t?e:void 0))}}const P=Symbol("MainQueueId");class I{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const i=e===P;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const o=(i?Promise.all(this._queues.values()):Promise.all([this._queues.get(P),this._queues.get(e)])).then(t),n=o.catch((()=>{}));return this._queues.set(e,n),o.finally((()=>{this._activeActions--,this._queues.get(e)===n&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function V(e){return Array.isArray(e)?e:[e]}class R extends((0,_.W9)((0,_.xK)(_.ML))){constructor(e,t={}){if(!O(e)&&void 0!==t.initialData)throw new r.Bb("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return O(e)?(0,r.yy)(e):e}(e)),O(e)&&(this.sourceElement=e),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),o=new k(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i});this.ui=new s(this,o),(0,_.P$)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((i=>{const o=new this(e,t);i(o.initPlugins().then((()=>o.ui.init(O(e)?e:null))).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}function O(e){return(0,T.Z)(e)}R.Context=_._y,R.EditorWatchdog=S,R.ContextWatchdog=class extends v{constructor(e,t={}){super(t),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new I,this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(P,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=V(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new S(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((i,{error:o,causesRestart:n})=>{this._fire("itemError",{itemId:e.id,error:o}),n&&this._actionQueues.enqueue(e.id,(()=>new Promise((i=>{const o=()=>{t.off("restart",o),this._fire("itemRestart",{itemId:e.id}),i()};t.on("restart",o)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=V(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue(P,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(P,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=y(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return x(this._context,e.context)}}},600:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AttributeElement:()=>Ge,AttributeOperation:()=>rn,BubblingEventInfo:()=>He,ClickObserver:()=>lr,Conversion:()=>Ho,DataController:()=>Fo,DataTransfer:()=>ti,DocumentFragment:()=>Ln,DocumentSelection:()=>Li,DomConverter:()=>Nt,DomEventData:()=>Zt,DomEventObserver:()=>Ut,DowncastWriter:()=>rt,EditingController:()=>bo,Element:()=>hi,History:()=>Vn,HtmlDataProcessor:()=>Do,InsertOperation:()=>Xo,LivePosition:()=>Cn,LiveRange:()=>Mi,MarkerOperation:()=>on,Matcher:()=>R,MergeOperation:()=>tn,Model:()=>sr,MouseObserver:()=>cr,MoveOperation:()=>Qo,Observer:()=>Ht,OperationFactory:()=>un,Position:()=>pi,Range:()=>vi,RenameOperation:()=>an,Renderer:()=>Et,RootAttributeOperation:()=>ln,RootOperation:()=>cn,SplitOperation:()=>en,StylesProcessor:()=>Ae,TabObserver:()=>ri,Text:()=>di,TextProxy:()=>ui,TreeWalker:()=>mi,UpcastWriter:()=>dr,View:()=>si,ViewAttributeElement:()=>Ge,ViewContainerElement:()=>Ie,ViewDocument:()=>Ke,ViewDocumentFragment:()=>nt,ViewEditableElement:()=>Re,ViewElement:()=>Se,ViewEmptyElement:()=>Qe,ViewRawElement:()=>it,ViewText:()=>P,ViewUIElement:()=>et,addBackgroundRules:()=>Nr,addBorderRules:()=>Dr,addMarginRules:()=>Kr,addPaddingRules:()=>Gr,disablePlaceholder:()=>b,enablePlaceholder:()=>f,findOptimalInsertionRange:()=>er,getBoxSidesShorthandValue:()=>Br,getBoxSidesValueReducer:()=>Or,getBoxSidesValues:()=>Rr,getFillerOffset:()=>Ve,getPositionShorthandNormalizer:()=>Mr,getShorthandValues:()=>zr,hidePlaceholder:()=>k,isAttachment:()=>Pr,isColor:()=>br,isLength:()=>vr,isLineStyle:()=>kr,isPercentage:()=>Cr,isPosition:()=>Tr,isRepeat:()=>Ar,isURL:()=>Vr,needsPlaceholder:()=>_,showPlaceholder:()=>w,transformSets:()=>fn});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(7372),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals;const p=new WeakMap;function f({view:e,element:t,text:i,isDirectHost:o=!0,keepOnFocus:n=!1}){const r=e.document;p.has(r)||(p.set(r,new Map),r.registerPostFixer((e=>v(r,e))),r.on("change:isComposing",(()=>{e.change((e=>v(r,e)))}),{priority:"high"})),p.get(r).set(t,{text:i,isDirectHost:o,keepOnFocus:n,hostElement:o?t:null}),e.change((e=>v(r,e)))}function b(e,t){const i=t.document;p.has(i)&&e.change((e=>{const o=p.get(i),n=o.get(t);e.removeAttribute("data-placeholder",n.hostElement),k(e,n.hostElement),o.delete(t)}))}function w(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}function k(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function _(e,t){if(!e.isAttached())return!1;const i=Array.from(e.getChildren()).some((e=>!e.is("uiElement")));if(i)return!1;const o=e.document,n=o.selection.anchor;return!(o.isComposing&&n&&n.parent===e||!t&&o.isFocused&&(!n||n.parent===e))}function v(e,t){const i=p.get(e),o=[];let n=!1;for(const[e,r]of i)r.isDirectHost&&(o.push(e),y(t,e,r)&&(n=!0));for(const[e,r]of i){if(r.isDirectHost)continue;const i=C(e);i&&(o.includes(i)||(r.hostElement=i,y(t,e,r)&&(n=!0)))}return n}function y(e,t,i){const{text:o,isDirectHost:n,hostElement:r}=i;let s=!1;return r.getAttribute("data-placeholder")!==o&&(e.setAttribute("data-placeholder",o,r),s=!0),(n||1==t.childCount)&&_(r,i.keepOnFocus)?w(e,r)&&(s=!0):k(e,r)&&(s=!0),s}function C(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}var x=i(7732);class A{is(){throw new Error("is() method is abstract")}}var E=i(9256);const T=function(e){return(0,E.Z)(e,4)};i(9807);class S extends((0,x.EmitterMixin)(A)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new x.CKEditorError("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e,t={}){const i=this.getAncestors(t),o=e.getAncestors(t);let n=0;for(;i[n]==o[n]&&i[n];)n++;return 0===n?null:i[n-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),o=(0,x.compareArrays)(t,i);switch(o){case"prefix":return!0;case"extension":return!1;default:return t[o]e.data.length)throw new x.CKEditorError("view-textproxy-wrong-offsetintext",this);if(i<0||t+i>e.data.length)throw new x.CKEditorError("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let i=e.includeSelf?this.textNode:this.parent;for(;null!==i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}}I.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};var V=i(7514);class R{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const i=O(t,e);if(i)return{element:t,pattern:e,match:i}}return null}matchAll(...e){const t=[];for(const i of e)for(const e of this._patterns){const o=O(i,e);o&&t.push({element:i,pattern:e,match:o})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function O(e,t){if("function"==typeof t)return t(e);const i={};return t.name&&(i.name=function(e,t){return e instanceof RegExp?!!t.match(e):e===t}(t.name,e.name),!i.name)||t.attributes&&(i.attributes=function(e,t){const i=new Set(t.getAttributeKeys());return(0,V.Z)(e)?(void 0!==e.style&&(0,x.logWarning)("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&(0,x.logWarning)("matcher-pattern-deprecated-attributes-class-key",e)):(i.delete("style"),i.delete("class")),B(e,i,(e=>t.getAttribute(e)))}(t.attributes,e),!i.attributes)||t.classes&&(i.classes=function(e,t){return B(e,t.getClassNames(),(()=>{}))}(t.classes,e),!i.classes)||t.styles&&(i.styles=function(e,t){return B(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!i.styles)?null:i}function B(e,t,i){const o=function(e){return Array.isArray(e)?e.map((e=>(0,V.Z)(e)?(void 0!==e.key&&void 0!==e.value||(0,x.logWarning)("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0])):(0,V.Z)(e)?Object.entries(e):[[e,!0]]}(e),n=Array.from(t),r=[];if(o.forEach((([e,t])=>{n.forEach((o=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,o)&&function(e,t,i){if(!0===e)return!0;const o=i(t);return e===o||e instanceof RegExp&&!!String(o).match(e)}(t,o,i)&&r.push(o)}))})),o.length&&!(r.lengtht===e));return Array.isArray(t)}set(e,t){if((0,M.Z)(e))for(const[t,i]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,i,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=Ee(e);(function(e,t){null==e||Q(e,t)})(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!(0,M.Z)(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){return this.isEmpty?[]:e?this._styleProcessor.getStyleNames(this._styles):this._getStylesEntries().map((([e])=>e))}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const i of t)e.push(...this._styleProcessor.getReducedForm(i,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const i=t.splice(0,t.length-1).join("."),o=X(this._styles,i);o&&!Array.from(Object.keys(o)).length&&this.remove(i)}}class Ae{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,i){if((0,M.Z)(t))Te(i,Ee(e),t);else if(this._normalizers.has(e)){const o=this._normalizers.get(e),{path:n,value:r}=o(t);Te(i,n,r)}else Te(i,e,t)}getNormalized(e,t){if(!e)return _e({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const i=this._extractors.get(e);if("string"==typeof i)return X(t,i);const o=i(e,t);if(o)return o}return X(t,Ee(e))}getReducedForm(e,t){const i=this.getNormalized(e,t);return void 0===i?[]:this._reducers.has(e)?this._reducers.get(e)(i):[[e,i]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const i=this.getNormalized(t,e);return i&&"object"==typeof i?Object.keys(i).length:i})),i=new Set([...t,...Object.keys(e)]);return Array.from(i.values())}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const i of t)this._mapStyleNames(i,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function Ee(e){return e.replace("-",".")}function Te(e,t,i){let o=i;(0,M.Z)(i)&&(o=_e({},X(e,t),i)),Ce(e,t,o)}class Se extends S{constructor(e,t,i,o){if(super(e),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=t,this._attrs=function(e){const t=(0,x.toMap)(e);for(const[e,i]of t)null===i?t.delete(e):"string"!=typeof i&&t.set(e,String(i));return t}(i),this._children=[],o&&this._insertChild(0,o),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Pe(this._classes,e),this._attrs.delete("class")}this._styles=new xe(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof Se))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,i]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==i)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new R(...e);let i=this.parent;for(;i&&!i.is("documentFragment");){if(t.match(i))return i;i=i.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),i=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==i?"":` ${i}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const i of this.getChildren())t.push(i._clone(e));const i=new this.constructor(this.document,this.name,this._attrs,t);return i._classes=new Set(this._classes),i._styles.set(this._styles.getNormalized()),i._customProperties=new Map(this._customProperties),i.getFillerOffset=this.getFillerOffset,i._unsafeAttributesToRender=this._unsafeAttributesToRender,i}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let i=0;const o=function(e,t){return"string"==typeof t?[new P(e,t)]:((0,x.isIterable)(t)||(t=[t]),Array.from(t).map((t=>"string"==typeof t?new P(e,t):t instanceof I?new P(e,t.data):t)))}(this.document,t);for(const t of o)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of(0,x.toArray)(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of(0,x.toArray)(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of(0,x.toArray)(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function Pe(e,t){const i=t.split(/\s+/);e.clear(),i.forEach((t=>e.add(t)))}Se.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ie extends Se{constructor(e,t,i,o){super(e,t,i,o),this.getFillerOffset=Ve}}function Ve(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}Ie.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Re extends((0,x.ObservableMixin)(Ie)){constructor(e,t,i,o){super(e,t,i,o),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}Re.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const Oe=Symbol("rootName");class Be extends Re{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(Oe)}set rootName(e){this._setCustomProperty(Oe,e)}set _name(e){this.name=e}}Be.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Me{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new x.CKEditorError("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new x.CKEditorError("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=ze._createAt(e.startPosition):this._position=ze._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,i;do{i=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&e.offset===i.childCount)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let o;if(i instanceof P){if(e.isAtEnd)return this._position=ze._createAfter(i),this._next();o=i.data[e.offset]}else o=i.getChild(e.offset);if(o instanceof Se)return this.shallow?e.offset++:e=new ze(o,0),this._position=e,this._formatReturnValue("elementStart",o,t,e,1);if(o instanceof P){if(this.singleCharacters)return e=new ze(o,0),this._position=e,this._next();{let i,n=o.data.length;return o==this._boundaryEndParent?(n=this.boundaries.end.offset,i=new I(o,0,n),e=ze._createAfter(i)):(i=new I(o,0,o.data.length),e.offset++),this._position=e,this._formatReturnValue("text",i,t,e,n)}}if("string"==typeof o){let o;o=this.singleCharacters?1:(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-e.offset;const n=new I(i,e.offset,o);return e.offset+=o,this._position=e,this._formatReturnValue("text",n,t,e,o)}return e=ze._createAfter(i),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",i,t,e)}_previous(){let e=this.position.clone();const t=this.position,i=e.parent;if(null===i.parent&&0===e.offset)return{done:!0,value:void 0};if(i==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let o;if(i instanceof P){if(e.isAtStart)return this._position=ze._createBefore(i),this._previous();o=i.data[e.offset-1]}else o=i.getChild(e.offset-1);if(o instanceof Se)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",o,t,e,1)):(e=new ze(o,o.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",o,t,e));if(o instanceof P){if(this.singleCharacters)return e=new ze(o,o.data.length),this._position=e,this._previous();{let i,n=o.data.length;if(o==this._boundaryStartParent){const t=this.boundaries.start.offset;i=new I(o,t,o.data.length-t),n=i.data.length,e=ze._createBefore(i)}else i=new I(o,0,o.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",i,t,e,n)}}if("string"==typeof o){let o;if(this.singleCharacters)o=1;else{const t=i===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-t}e.offset-=o;const n=new I(i,e.offset,o);return this._position=e,this._formatReturnValue("text",n,t,e,o)}return e=ze._createBefore(i),this._position=e,this._formatReturnValue("elementStart",i,t,e,1)}_formatReturnValue(e,t,i,o,n){return t instanceof I&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?i=ze._createAfter(t.textNode):(o=ze._createAfter(t.textNode),this._position=o)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?i=ze._createBefore(t.textNode):(o=ze._createBefore(t.textNode),this._position=o))),{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:o,length:n}}}}class ze extends A{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof Re);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=ze._createAt(this),i=t.offset+e;return t.offset=i<0?0:i,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const i=new Me(t);return i.skip(e),i.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),i=e.getAncestors();let o=0;for(;t[o]==i[o]&&t[o];)o++;return 0===o?null:t[o-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],i=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),i.push(e.offset);const o=(0,x.compareArrays)(t,i);switch(o){case"prefix":return"before";case"extension":return"after";default:return t[o]0?new this(i,o):new this(o,i)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(ze._createBefore(e),t)}}function De(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}Ne.prototype.is=function(e){return"range"===e||"view:range"===e};class Le extends((0,x.EmitterMixin)(A)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const o of e._ranges)if(t.isEqual(o)){i=!0;break}if(!i)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=(0,x.count)(this.getRanges());if(t!=(0,x.count)(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let i=!1;for(let o of e.getRanges())if(o=o.getTrimmed(),t.start.isEqual(o.start)&&t.end.isEqual(o.end)){i=!0;break}if(!i)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,i,o]=e;if("object"==typeof i&&(o=i,i=void 0),null===t)this._setRanges([]),this._setFakeOptions(o);else if(t instanceof Le||t instanceof Fe)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof Ne)this._setRanges([t],o&&o.backward),this._setFakeOptions(o);else if(t instanceof ze)this._setRanges([new Ne(t)]),this._setFakeOptions(o);else if(t instanceof S){const e=!!o&&!!o.backward;let n;if(void 0===i)throw new x.CKEditorError("view-selection-setto-required-second-parameter",this);n="in"==i?Ne._createIn(t):"on"==i?Ne._createOn(t):new Ne(ze._createAt(t,i)),this._setRanges([n],e),this._setFakeOptions(o)}else{if(!(0,x.isIterable)(t))throw new x.CKEditorError("view-selection-setto-not-selectable",this);this._setRanges(t,o&&o.backward),this._setFakeOptions(o)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new x.CKEditorError("view-selection-setfocus-no-ranges",this);const i=ze._createAt(e,t);if("same"==i.compareWith(this.focus))return;const o=this.anchor;this._ranges.pop(),"before"==i.compareWith(o)?this._addRange(new Ne(i,o),!0):this._addRange(new Ne(o,i)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof Ne))throw new x.CKEditorError("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new x.CKEditorError("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new Ne(e.start,e.end))}}Le.prototype.is=function(e){return"selection"===e||"view:selection"===e};class Fe extends((0,x.EmitterMixin)(A)){constructor(...e){super(),this._selection=new Le,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}Fe.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class He extends x.EventInfo{constructor(e,t,i){super(e,t),this.startRange=i,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const We=Symbol("bubbling contexts");function Ze(e){return class extends e{fire(e,...t){try{const i=e instanceof x.EventInfo?e:new x.EventInfo(this,e),o=qe(this);if(!o.size)return;if(Ue(i,"capturing",this),je(o,"$capture",i,...t))return i.return;const n=i.startRange||this.selection.getFirstRange(),r=n?n.getContainedElement():null,s=!!r&&Boolean($e(o,r));let a=r||function(e){if(!e)return null;const t=e.start.parent,i=e.end.parent,o=t.getPath(),n=i.getPath();return o.length>n.length?t:i}(n);if(Ue(i,"atTarget",a),!s){if(je(o,"$text",i,...t))return i.return;Ue(i,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(je(o,"$root",i,...t))return i.return}else if(a.is("element")&&je(o,a.name,i,...t))return i.return;if(je(o,a,i,...t))return i.return;a=a.parent,Ue(i,"bubbling",a)}return Ue(i,"bubbling",this),je(o,"$document",i,...t),i.return}catch(e){x.CKEditorError.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,i){const o=(0,x.toArray)(i.context||"$document"),n=qe(this);for(const r of o){let o=n.get(r);o||(o=new((0,x.EmitterMixin)()),n.set(r,o)),this.listenTo(o,e,t,i)}}_removeEventListener(e,t){const i=qe(this);for(const o of i.values())this.stopListening(o,e,t)}}}{const e=Ze(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{Ze[t]=e.prototype[t]}))}function Ue(e,t,i){e instanceof He&&(e._eventPhase=t,e._currentTarget=i)}function je(e,t,i,...o){const n="string"==typeof t?e.get(t):$e(e,t);return!!n&&(n.fire(i,...o),i.stop.called)}function $e(e,t){for(const[i,o]of e)if("function"==typeof i&&i(t))return o;return null}function qe(e){return e[We]||(e[We]=new Map),e[We]}class Ke extends(Ze((0,x.ObservableMixin)())){constructor(e){super(),this._postFixers=new Set,this.selection=new Fe,this.roots=new x.Collection({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(t=i(e),t)break}while(t)}}class Ge extends Se{constructor(e,t,i,o){super(e,t,i,o),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Je}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new x.CKEditorError("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function Je(){if(Ye(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(Ye(e)>1)return null;e=e.parent}return!e||Ye(e)>1?null:this.childCount}function Ye(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}Ge.DEFAULT_PRIORITY=10,Ge.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Qe extends Se{constructor(e,t,i,o){super(e,t,i,o),this.getFillerOffset=Xe}_insertChild(e,t){if(t&&(t instanceof S||Array.from(t).length>0))throw new x.CKEditorError("view-emptyelement-cannot-add",[this,t]);return 0}}function Xe(){return null}Qe.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class et extends Se{constructor(e,t,i,o){super(e,t,i,o),this.getFillerOffset=tt}_insertChild(e,t){if(t&&(t instanceof S||Array.from(t).length>0))throw new x.CKEditorError("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function tt(){return null}et.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class it extends Se{constructor(e,t,i,o){super(e,t,i,o),this.getFillerOffset=ot}_insertChild(e,t){if(t&&(t instanceof S||Array.from(t).length>0))throw new x.CKEditorError("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function ot(){return null}it.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class nt extends((0,x.EmitterMixin)(A)){constructor(e,t){super(),this._children=[],this._customProperties=new Map,this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let i=0;const o=function(e,t){return"string"==typeof t?[new P(e,t)]:((0,x.isIterable)(t)||(t=[t]),Array.from(t).map((t=>"string"==typeof t?new P(e,t):t instanceof I?new P(e,t.data):t)))}(this.document,t);for(const t of o)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;i{const i=e[e.length-1],o=!t.is("uiElement");return i&&i.breakAttributes==o?i.nodes.push(t):e.push({breakAttributes:o,nodes:[t]}),e}),[]);let o=null,n=e;for(const{nodes:e,breakAttributes:t}of i){const i=this._insertNodes(n,e,t);o||(o=i.start),n=i.end}return o?new Ne(o,n):new Ne(e)}remove(e){const t=e instanceof Ne?e:Ne._createOn(e);if(mt(t,this.document),t.isCollapsed)return new nt(this.document);const{start:i,end:o}=this._breakAttributesRange(t,!0),n=i.parent,r=o.offset-i.offset,s=n._removeChildren(i.offset,r);for(const e of s)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(i);return t.start=a,t.end=a.clone(),new nt(this.document,s)}clear(e,t){mt(e,this.document);const i=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const o of i){const i=o.item;let n;if(i.is("element")&&t.isSimilar(i))n=Ne._createOn(i);else if(!o.nextPosition.isAfter(e.start)&&i.is("$textProxy")){const e=i.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(n=Ne._createIn(e))}n&&(n.end.isAfter(e.end)&&(n.end=e.end),n.start.isBefore(e.start)&&(n.start=e.start),this.remove(n))}}move(e,t){let i;if(t.isAfter(e.end)){const o=(t=this._breakAttributes(t,!0)).parent,n=o.childCount;e=this._breakAttributesRange(e,!0),i=this.remove(e),t.offset+=o.childCount-n}else i=this.remove(e);return this.insert(t,i)}wrap(e,t){if(!(t instanceof Ge))throw new x.CKEditorError("view-writer-wrap-invalid-attribute",this.document);if(mt(e,this.document),e.isCollapsed){let o=e.start;o.parent.is("element")&&(i=o.parent,!Array.from(i.getChildren()).some((e=>!e.is("uiElement"))))&&(o=o.getLastMatchingPosition((e=>e.item.is("uiElement")))),o=this._wrapPosition(o,t);const n=this.document.selection;return n.isCollapsed&&n.getFirstPosition().isEqual(e.start)&&this.setSelection(o),new Ne(o)}return this._wrapRange(e,t);var i}unwrap(e,t){if(!(t instanceof Ge))throw new x.CKEditorError("view-writer-unwrap-invalid-attribute",this.document);if(mt(e,this.document),e.isCollapsed)return e;const{start:i,end:o}=this._breakAttributesRange(e,!0),n=i.parent,r=this._unwrapChildren(n,i.offset,o.offset,t),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new Ne(s,a)}rename(e,t){const i=new Ie(this.document,e,t.getAttributes());return this.insert(ze._createAfter(t),i),this.move(Ne._createIn(t),ze._createAt(i,0)),this.remove(Ne._createOn(t)),i}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return ze._createAt(e,t)}createPositionAfter(e){return ze._createAfter(e)}createPositionBefore(e){return ze._createBefore(e)}createRange(e,t){return new Ne(e,t)}createRangeOn(e){return Ne._createOn(e)}createRangeIn(e){return Ne._createIn(e)}createSelection(...e){return new Le(...e)}createSlot(e="children"){if(!this._slotFactory)throw new x.CKEditorError("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,i){let o,n;if(o=i?st(e):e.parent.is("$text")?e.parent.parent:e.parent,!o)throw new x.CKEditorError("view-writer-invalid-position-container",this.document);n=i?this._breakAttributes(e,!0):e.parent.is("$text")?lt(e):e;const r=o._insertChild(n.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const s=n.getShiftedBy(r),a=this.mergeAttributes(n);a.isEqual(n)||s.offset--;const l=this.mergeAttributes(s);return new Ne(a,l)}_wrapChildren(e,t,i,o){let n=t;const r=[];for(;na.priority)&&s.getIdentity()!1,e.parent._insertChild(e.offset,i);const o=new Ne(e,e.getShiftedBy(1));this.wrap(o,t);const n=new ze(i.parent,i.index);i._remove();const r=n.nodeBefore,s=n.nodeAfter;return r instanceof P&&s instanceof P?ct(r,s):at(n)}_wrapAttributeElement(e,t){if(!gt(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&t.hasAttribute(i)&&t.getAttribute(i)!==e.getAttribute(i))return!1;for(const i of e.getStyleNames())if(t.hasStyle(i)&&t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&(t.hasAttribute(i)||this.setAttribute(i,e.getAttribute(i),t));for(const i of e.getStyleNames())t.hasStyle(i)||this.setStyle(i,e.getStyle(i),t);for(const i of e.getClassNames())t.hasClass(i)||this.addClass(i,t);return!0}_unwrapAttributeElement(e,t){if(!gt(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const i of e.getAttributeKeys())if("class"!==i&&"style"!==i&&(!t.hasAttribute(i)||t.getAttribute(i)!==e.getAttribute(i)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const i of e.getStyleNames())if(!t.hasStyle(i)||t.getStyle(i)!==e.getStyle(i))return!1;for(const i of e.getAttributeKeys())"class"!==i&&"style"!==i&&this.removeAttribute(i,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const i=e.start,o=e.end;if(mt(e,this.document),e.isCollapsed){const i=this._breakAttributes(e.start,t);return new Ne(i,i)}const n=this._breakAttributes(o,t),r=n.parent.childCount,s=this._breakAttributes(i,t);return n.offset+=n.parent.childCount-r,new Ne(s,n)}_breakAttributes(e,t=!1){const i=e.offset,o=e.parent;if(e.parent.is("emptyElement"))throw new x.CKEditorError("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new x.CKEditorError("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new x.CKEditorError("view-writer-cannot-break-raw-element",this.document);if(!t&&o.is("$text")&&ht(o.parent))return e.clone();if(ht(o))return e.clone();if(o.is("$text"))return this._breakAttributes(lt(e),t);if(i==o.childCount){const e=new ze(o.parent,o.index+1);return this._breakAttributes(e,t)}if(0===i){const e=new ze(o.parent,o.index);return this._breakAttributes(e,t)}{const e=o.index+1,n=o._clone();o.parent._insertChild(e,n),this._addToClonedElementsGroup(n);const r=o.childCount-i,s=o._removeChildren(i,r);n._appendChild(s);const a=new ze(o.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let i=this._cloneGroups.get(t);i||(i=new Set,this._cloneGroups.set(t,i)),i.add(e),e._clonesGroup=i}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const i=this._cloneGroups.get(t);i&&i.delete(e)}}function st(e){let t=e.parent;for(;!ht(t);){if(!t)return;t=t.parent}return t}function at(e){const t=e.nodeBefore;if(t&&t.is("$text"))return new ze(t,t.data.length);const i=e.nodeAfter;return i&&i.is("$text")?new ze(i,0):e}function lt(e){if(e.offset==e.parent.data.length)return new ze(e.parent.parent,e.parent.index+1);if(0===e.offset)return new ze(e.parent.parent,e.parent.index);const t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new P(e.root.document,t)),new ze(e.parent.parent,e.parent.index+1)}function ct(e,t){const i=e.data.length;return e._data+=t.data,t._remove(),new ze(e,i)}const dt=[P,Ge,Ie,Qe,it,et];function ut(e,t){for(const i of e){if(!dt.some((e=>i instanceof e)))throw new x.CKEditorError("view-writer-insert-invalid-node-type",t);i.is("$text")||ut(i.getChildren(),t)}}function ht(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function mt(e,t){const i=st(e.start),o=st(e.end);if(!i||!o||i!==o)throw new x.CKEditorError("view-writer-invalid-range-container",t)}function gt(e,t){return null===e.id&&null===t.id}const pt=e=>e.createTextNode(" "),ft=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},bt=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},wt=7,kt="⁠".repeat(wt);function _t(e){return(0,x.isText)(e)&&e.data.substr(0,wt)===kt}function vt(e){return e.data.length==wt&&_t(e)}function yt(e){return _t(e)?e.data.slice(wt):e.data}function Ct(e,t){if(t.keyCode==x.keyCodes.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,i=e.getRangeAt(0).startOffset;_t(t)&&i<=wt&&e.collapse(t,0)}}}var xt=i(5037),At={attributes:{"data-cke":!0}};At.setAttributes=d(),At.insert=l().bind(null,"head"),At.domAPI=s(),At.insertStyleElement=h(),n()(xt.Z,At),xt.Z&&xt.Z.locals&&xt.Z.locals;class Et extends((0,x.ObservableMixin)()){constructor(e,t){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),x.env.isBlink&&!x.env.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new x.CKEditorError("view-renderer-unknown-type",this);this.markedChildren.add(t)}}}render(){if(this.isComposing&&!x.env.isAndroid)return;let e=null;const t=!(x.env.isBlink&&!x.env.isAndroid&&this.isSelecting);for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=ze._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),i=t.parent.ownerDocument;_t(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=Tt(i,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){if(!this.domConverter.mapViewToDom(e))return;const t=Array.from(this.domConverter.mapViewToDom(e).childNodes),i=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),o=this._diffNodeLists(t,i),n=this._findUpdateActions(o,t,i,St);if(-1!==n.indexOf("update")){const o={equal:0,insert:0,delete:0};for(const r of n)if("update"===r){const n=o.equal+o.insert,r=o.equal+o.delete,s=e.getChild(n);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,t[r]),(0,x.remove)(i[n]),o.equal++}else o[r]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?ze._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&(0,x.isText)(t.parent)&&_t(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!_t(e))throw new x.CKEditorError("view-renderer-filler-was-lost",this);vt(e)?e.remove():e.data=e.data.substr(wt),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,i=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(i===t.getFillerOffset())return!1;const o=e.nodeBefore,n=e.nodeAfter;return!(o instanceof P||n instanceof P||x.env.isAndroid&&(o||n))}_updateText(e,t){const i=this.domConverter.findCorrespondingDomText(e);let o=this.domConverter.viewToDom(e).data;const n=t.inlineFillerPosition;n&&n.parent==e.parent&&n.offset==e.index&&(o=kt+o),Vt(i,o)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const i=Array.from(t.attributes).map((e=>e.name)),o=e.getAttributeKeys();for(const i of o)this.domConverter.setDomElementAttribute(t,i,e.getAttribute(i),e);for(const o of i)e.hasAttribute(o)||this.domConverter.removeDomElementAttribute(t,o)}_updateChildren(e,t){const i=this.domConverter.mapViewToDom(e);if(!i)return;if(x.env.isAndroid){let e=null;for(const t of Array.from(i.childNodes)){if(e&&(0,x.isText)(e)&&(0,x.isText)(t)){i.normalize();break}e=t}}const o=t.inlineFillerPosition,n=i.childNodes,r=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));o&&o.parent===e&&Tt(i.ownerDocument,r,o.offset);const s=this._diffNodeLists(n,r),a=this._findUpdateActions(s,n,r,Pt);let l=0;const c=new Set;for(const e of a)"delete"===e?(c.add(n[l]),(0,x.remove)(n[l])):"equal"!==e&&"update"!==e||l++;l=0;for(const e of a)"insert"===e?((0,x.insertAt)(i,l,r[l]),l++):"update"===e?(Vt(n[l],r[l].data),l++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(r[l])),l++);for(const e of c)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const i=Array.from(e);if(0==i.length||!t)return i;return i[i.length-1]==t&&i.pop(),i}(e,this._fakeSelectionContainer),(0,x.diff)(e,t,It.bind(null,this.domConverter))}_findUpdateActions(e,t,i,o){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let n=[],r=[],s=[];const a={equal:0,insert:0,delete:0};for(const l of e)"insert"===l?s.push(i[a.equal+a.insert]):"delete"===l?r.push(t[a.equal+a.delete]):(n=n.concat((0,x.diff)(r,s,o).map((e=>"equal"===e?"update":e))),n.push("equal"),r=[],s=[]),a[l]++;return n.concat((0,x.diff)(r,s,o).map((e=>"equal"===e?"update":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(x.env.isBlink&&!x.env.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&x.env.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const i=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(i,this.selection),!this._fakeSelectionNeedsUpdate(e))return;i.parentElement&&i.parentElement==e||e.appendChild(i),i.textContent=this.selection.fakeSelectionLabel||" ";const o=t.getSelection(),n=t.createRange();o.removeAllRanges(),n.selectNodeContents(i),o.addRange(n)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const i=this.domConverter.viewPositionToDom(this.selection.anchor),o=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(i.parent,i.offset),t.extend(o.parent,o.offset),x.env.isGecko&&function(e,t){const i=e.parent;if(i.nodeType!=Node.ELEMENT_NODE||e.offset!=i.childNodes.length-1)return;const o=i.childNodes[e.offset];o&&"BR"==o.tagName&&t.addRange(t.getRangeAt(0))}(o,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return!(t&&this.selection.isEqual(t)||!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,i=e.ownerDocument.getSelection();return!t||t.parentElement!==e||i.anchorNode!==t&&!t.contains(i.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const i=e.activeElement,o=this.domConverter.mapDomToView(i);i&&o&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function Tt(e,t,i){const o=t instanceof Array?t:t.childNodes,n=o[i];if((0,x.isText)(n))return n.data=kt+n.data,n;{const n=e.createTextNode(kt);return Array.isArray(t)?o.splice(i,0,n):(0,x.insertAt)(t,i,n),n}}function St(e,t){return(0,x.isNode)(e)&&(0,x.isNode)(t)&&!(0,x.isText)(e)&&!(0,x.isText)(t)&&!(0,x.isComment)(e)&&!(0,x.isComment)(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function Pt(e,t){return(0,x.isNode)(e)&&(0,x.isNode)(t)&&(0,x.isText)(e)&&(0,x.isText)(t)}function It(e,t,i){return t===i||((0,x.isText)(t)&&(0,x.isText)(i)?t.data===i.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(i)))}function Vt(e,t){const i=e.data;if(i==t)return;const o=(0,x.fastDiff)(i,t);for(const t of o)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}const Rt=bt(x.global.document),Ot=pt(x.global.document),Bt=ft(x.global.document),Mt="data-ck-unsafe-attribute-",zt="data-ck-unsafe-element";class Nt{constructor(e,{blockFillerMode:t,renderingMode:i="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new R,this._encounteredRawContentDomNodes=new WeakSet,this.document=e,this.renderingMode=i,this.blockFillerMode=t||("editing"===i?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?x.global.document:x.global.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Le(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,i){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===i&&("src"===e||"srcset"===e)||"source"===i&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const i=(new DOMParser).parseFromString(t,"text/html"),o=i.createDocumentFragment(),n=i.body.childNodes;for(;n.length>0;)o.appendChild(n[0]);const r=i.createTreeWalker(o,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=r.nextNode();)s.push(a);for(const e of s){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(Ft(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(o)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let i;if(e.is("documentFragment"))i=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(i,e);else{if(e.is("uiElement"))return i="$comment"===e.name?this._domDocument.createComment(e.getCustomProperty("$rawContent")):e.render(this._domDocument,this),t.bind&&this.bindElements(i,e),i;this._shouldRenameElement(e.name)?(Ft(e.name),i=this._createReplacementDomElement(e.name)):i=e.hasAttribute("xmlns")?this._domDocument.createElementNS(e.getAttribute("xmlns"),e.name):this._domDocument.createElement(e.name),e.is("rawElement")&&e.render(i,this),t.bind&&this.bindElements(i,e);for(const t of e.getAttributeKeys())this.setDomElementAttribute(i,t,e.getAttribute(t),e)}if(!1!==t.withChildren)for(const o of this.viewChildrenToDom(e,t))i.appendChild(o);return i}}setDomElementAttribute(e,t,i,o){const n=this.shouldRenderAttribute(t,i,e.tagName.toLowerCase())||o&&o.shouldRenderUnsafeAttribute(t);n||(0,x.logWarning)("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:i}),e.hasAttribute(t)&&!n?e.removeAttribute(t):e.hasAttribute(Mt+t)&&n&&e.removeAttribute(Mt+t),e.setAttribute(n?t:Mt+t,i)}removeDomElementAttribute(e,t){t!=zt&&(e.removeAttribute(t),e.removeAttribute(Mt+t))}*viewChildrenToDom(e,t={}){const i=e.getFillerOffset&&e.getFillerOffset();let o=0;for(const n of e.getChildren()){i===o&&(yield this._getBlockFiller());const e=n.is("element")&&!!n.getCustomProperty("dataPipeline:transparentRendering")&&!(0,x.first)(n.getAttributes());e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(n,t):(e&&(0,x.logWarning)("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:n}),yield this.viewToDom(n,t)),o++}i===o&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),i=this.viewPositionToDom(e.end),o=this._domDocument.createRange();return o.setStart(t.parent,t.offset),o.setEnd(i.parent,i.offset),o}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const i=this.findCorrespondingDomText(t);if(!i)return null;let o=e.offset;return _t(i)&&(o+=wt),{parent:i,offset:o}}{let i,o,n;if(0===e.offset){if(i=this.mapViewToDom(t),!i)return null;n=i.childNodes[0]}else{const t=e.nodeBefore;if(o=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!o)return null;i=o.parentNode,n=o.nextSibling}return(0,x.isText)(n)&&_t(n)?{parent:n,offset:wt}:{parent:i,offset:o?(0,x.indexOf)(o)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e))return null;const i=this.getHostViewElement(e);if(i)return i;if((0,x.isComment)(e)&&t.skipComments)return null;if((0,x.isText)(e)){if(vt(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new P(this.document,t)}}{if(this.mapDomToView(e))return this.mapDomToView(e);let i;if(this.isDocumentFragment(e))i=new nt(this.document),t.bind&&this.bindDocumentFragments(e,i);else{i=this._createViewElement(e,t),t.bind&&this.bindElements(e,i);const o=e.attributes;if(o)for(let e=o.length,t=0;t{const{scrollLeft:t,scrollTop:i}=e;o.push([t,i])})),t.focus(),Dt(t,(e=>{const[t,i]=o.shift();e.scrollLeft=t,e.scrollTop=i})),x.global.window.scrollTo(e,i)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(Rt):!("BR"!==e.tagName||!Lt(e,this.blockElements)||1!==e.parentNode.childNodes.length)||e.isEqualNode(Bt)||function(e,t){return e.isEqualNode(Ot)&&Lt(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const i=t.collapsed;return t.detach(),i}getHostViewElement(e){const t=(0,x.getAncestors)(e);for(t.pop();t.length;){const e=t.pop(),i=this._domToViewMapping.get(e);if(i&&(i.is("uiElement")||i.is("rawElement")))return i}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return pt(this._domDocument);case"markedNbsp":return ft(this._domDocument);case"br":return bt(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if((0,x.isText)(e)&&_t(e)&&tthis.preElements.includes(e.name))))return t;if(" "==t.charAt(0)){const i=this._getTouchingInlineViewNode(e,!1);!(i&&i.is("$textProxy")&&this._nodeEndsWithSpace(i))&&i||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const i=this._getTouchingInlineViewNode(e,!0),o=i&&i.is("$textProxy")&&" "==i.data.charAt(0);" "!=t.charAt(t.length-2)&&i&&!o||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(function(e,t){return(0,x.getAncestors)(e).some((e=>e.tagName&&t.includes(e.tagName.toLowerCase())))}(e,this.preElements))return yt(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const i=this._getTouchingInlineDomNode(e,!1),o=this._getTouchingInlineDomNode(e,!0),n=this._checkShouldLeftTrimDomText(e,i),r=this._checkShouldRightTrimDomText(e,o);n&&(t=t.replace(/^ /,"")),r&&(t=t.replace(/ $/,"")),t=yt(new Text(t)),t=t.replace(/ \u00A0/g," ");const s=o&&this.isElement(o)&&"BR"!=o.tagName,a=o&&(0,x.isText)(o)&&" "==o.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(t)||!o||s||a)&&(t=t.replace(/\u00A0$/," ")),(n||i&&this.isElement(i)&&"BR"!=i.tagName)&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e,t){return!t||(this.isElement(t)?"BR"===t.tagName:!this._encounteredRawContentDomNodes.has(e.previousSibling)&&/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!_t(e)}_getTouchingInlineViewNode(e,t){const i=new Me({startPosition:t?ze._createAfter(e):ze._createBefore(e),direction:t?"forward":"backward"});for(const e of i){if(e.item.is("element")&&this.inlineObjectElements.includes(e.item.name))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const i=t?"firstChild":"lastChild",o=t?"nextSibling":"previousSibling";let n=!0,r=e;do{if(!n&&r[i]?r=r[i]:r[o]?(r=r[o],n=!1):(r=r.parentNode,n=!0),!r||this._isBlockElement(r))return null}while(!(0,x.isText)(r)&&"BR"!=r.tagName&&!this._isInlineObjectElement(r));return r}_isBlockElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isInlineObjectElement(e){return this.isElement(e)&&this.inlineObjectElements.includes(e.tagName.toLowerCase())}_createViewElement(e,t){if((0,x.isComment)(e))return new et(this.document,"$comment");const i=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new Se(this.document,i)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const i=this._domDocument.createElement("span");if(i.setAttribute(zt,e),t){for(;t.firstChild;)i.appendChild(t.firstChild);for(const e of t.getAttributeNames())i.setAttribute(e,t.getAttribute(e))}return i}}function Dt(e,t){let i=e;for(;i;)t(i),i=i.parentElement}function Lt(e,t){const i=e.parentNode;return!!i&&!!i.tagName&&t.includes(i.tagName.toLowerCase())}function Ft(e){"script"===e&&(0,x.logWarning)("domconverter-unsafe-script-element-detected"),"style"===e&&(0,x.logWarning)("domconverter-unsafe-style-element-detected")}class Ht extends((0,x.DomEmitterMixin)()){constructor(e){super(),this._isEnabled=!1,this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}var Wt=i(207);class Zt{constructor(e,t,i){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,(0,Wt.Z)(this,i)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Ut extends Ht{constructor(){super(...arguments),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,i){this.isEnabled&&this.document.fire(e,new Zt(this.view,t,i))}}class jt extends Ut{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return(0,x.getCode)(this)}};this.fire(e.type,e,t)}}var $t=i(6682);class qt extends Ht{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=(0,$t.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,i)=>{e.selection.isFake&&this.isEnabled&&i.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,i)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(i.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,i=new Le(t.getRanges(),{backward:t.isBackward,fake:!1});e!=x.keyCodes.arrowleft&&e!=x.keyCodes.arrowup||i.setTo(i.getFirstPosition()),e!=x.keyCodes.arrowright&&e!=x.keyCodes.arrowdown||i.setTo(i.getLastPosition());const o={oldSelection:t,newSelection:i,domSelection:null};this.document.fire("selectionChange",o),this._fireSelectionChangeDoneDebounced(o)}}var Kt=i(1152);const Gt=function(e,t,i){var o=(i="function"==typeof i?i:void 0)?i(e,t):void 0;return void 0===o?(0,Kt.Z)(e,t,void 0,i):!!o};class Jt extends Ht{constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,i=new Set,o=new Set;for(const i of e){const e=t.mapDomToView(i.target);e&&(e.is("uiElement")||e.is("rawElement")||"childList"!==i.type||this._isBogusBrMutation(i)||o.add(e))}for(const n of e){const e=t.mapDomToView(n.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===n.type){const e=t.findCorrespondingViewText(n.target);e&&!o.has(e.parent)?i.add(e):!e&&_t(n.target)&&o.add(t.mapDomToView(n.target.parentNode))}}let n=!1;for(const e of i)n=!0,this.renderer.markToSync("text",e);for(const e of o){const i=t.mapViewToDom(e),o=Array.from(e.getChildren()),r=Array.from(t.domChildrenToView(i,{withChildren:!1}));Gt(o,r,Yt)||(n=!0,this.renderer.markToSync("children",e))}n&&this.view.forceRender()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}function Yt(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}class Qt extends Ut{constructor(e){super(e),this._isFocusChanging=!1,this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",(()=>{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),e.change((()=>{}))}),50)})),t.on("blur",((i,o)=>{const n=t.selection.editableElement;null!==n&&n!==o.target||(t.isFocused=!1,this._isFocusChanging=!1,e.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class Xt extends Ht{constructor(e){super(e),this.mutationObserver=e.getObserver(Jt),this.focusObserver=e.getObserver(Qt),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=(0,$t.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=(0,$t.Z)((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,i=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",i,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",i,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",i,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,i)=>{this.document.isComposing&&!x.env.isAndroid||(this._handleSelectionChange(i,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e,t){if(!this.isEnabled)return;const i=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(i.anchorNode))return;this.mutationObserver.flush();const o=this.domConverter.domSelectionToView(i);if(0!=o.rangeCount){if(this.view.hasDomSelection=!0,!this.selection.isEqual(o)||!this.domConverter.isDomSelectionCorrect(i))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.focusObserver.flush(),this.selection.isSimilar(o))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:o,domSelection:i};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class ei extends Ut{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class ti{constructor(e,t={}){this._files=t.cacheFiles?ii(e):null,this._native=e}get files(){return this._files||(this._files=ii(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function ii(e){const t=Array.from(e.files||[]),i=Array.from(e.items||[]);return t.length?t:i.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class oi extends Ut{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(e){const t=e.getTargetRanges(),i=this.view,o=i.document;let n=null,r=null,s=[];if(e.dataTransfer&&(n=new ti(e.dataTransfer)),null!==e.data?r=e.data:n&&(r=n.getData("text/plain")),o.selection.isFake)s=Array.from(o.selection.getRanges());else if(t.length)s=t.map((e=>i.domConverter.domRangeToView(e)));else if(x.env.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();s=Array.from(i.domConverter.domSelectionToView(t).getRanges())}if(x.env.isAndroid&&"insertCompositionText"==e.inputType&&r&&r.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[i.createRange(s[0].end)]});else if("insertText"==e.inputType&&r&&r.includes("\n")){const t=r.split(/\n{1,2}/g);let i=s;for(let r=0;r{if(this.isEnabled&&(0,x.isArrowKeyCode)(t.keyCode)){const i=new He(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(i,t),i.stop.called&&e.stop()}}))}observe(){}stopObserving(){}}class ri extends Ht{constructor(e){super(e);const t=this.document;t.on("keydown",((e,i)=>{if(!this.isEnabled||i.keyCode!=x.keyCodes.tab||i.ctrlKey)return;const o=new He(t,"tab",t.selection.getFirstRange());t.fire(o,i),o.stop.called&&e.stop()}))}observe(){}stopObserving(){}}class si extends((0,x.ObservableMixin)()){constructor(e){var t;super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new Ke(e),this.domConverter=new Nt(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new Et(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new rt(this.document),this.addObserver(Jt),this.addObserver(Qt),this.addObserver(Xt),this.addObserver(jt),this.addObserver(qt),this.addObserver(ei),this.addObserver(ni),this.addObserver(oi),this.addObserver(ri),this.document.on("arrowKey",Ct,{priority:"low"}),(t=this).document.on("arrowKey",((e,i)=>function(e,t,i){if(t.keyCode==x.keyCodes.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),o=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(o||t.shiftKey){const t=e.focusNode,n=e.focusOffset,r=i.domPositionToView(t,n);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(s=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(s){const t=i.viewPositionToDom(a);o?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,i,t.domConverter)),{priority:"low"}),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0}))}attachDomRoot(e,t="main"){const i=this.document.getRoot(t);i._name=e.tagName.toLowerCase();const o={};for(const{name:t,value:n}of Array.from(e.attributes))o[t]=n,"class"===t?this._writer.addClass(n.split(" "),i):this._writer.setAttribute(t,n,i);this._initialDomRootAttributes.set(e,o);const n=()=>{this._writer.setAttribute("contenteditable",(!i.isReadOnly).toString(),i),i.isReadOnly?this._writer.addClass("ck-read-only",i):this._writer.removeClass("ck-read-only",i)};n(),this.domRoots.set(t,e),this.domConverter.bindElements(e,i),this._renderer.markToSync("children",i),this._renderer.markToSync("attributes",i),this._renderer.domDocuments.add(e.ownerDocument),i.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),i.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),i.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),i.on("change:isReadOnly",(()=>this.change(n))),i.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const i of this._observers.values())i.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const i=this._initialDomRootAttributes.get(t);for(const e in i)t.setAttribute(e,i[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,i]of this.domRoots)t.observe(i,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:i=20,ancestorOffset:o=20}={}){const n=this.document.selection.getFirstRange();n&&(0,x.scrollViewportToShowTarget)({target:this.domConverter.viewRangeToDom(n),viewportOffset:i,ancestorOffset:o,alignToTop:e,forceScroll:t})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new x.CKEditorError("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){x.CKEditorError.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(Qt).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return ze._createAt(e,t)}createPositionAfter(e){return ze._createAfter(e)}createPositionBefore(e){return ze._createBefore(e)}createRange(e,t){return new Ne(e,t)}createRangeOn(e){return Ne._createOn(e)}createRangeIn(e){return Ne._createIn(e)}createSelection(...e){return new Le(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class ai{is(){throw new Error("is() method is abstract")}}class li extends ai{constructor(e){super(),this.parent=null,this._attrs=(0,x.toMap)(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new x.CKEditorError("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new x.CKEditorError("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}getCommonAncestor(e,t={}){const i=this.getAncestors(t),o=e.getAncestors(t);let n=0;for(;i[n]==o[n]&&i[n];)n++;return 0===n?null:i[n-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),i=e.getPath(),o=(0,x.compareArrays)(t,i);switch(o){case"prefix":return!0;case"extension":return!1;default:return t[o](e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=(0,x.toMap)(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}li.prototype.is=function(e){return"node"===e||"model:node"===e};class ci{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new x.CKEditorError("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const i of this._nodes){if(e>=t&&ee.toJSON()))}}class di extends li{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new di(this.data,this.getAttributes())}static fromJSON(e){return new di(e.data,e.attributes)}}di.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class ui extends ai{constructor(e,t,i){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new x.CKEditorError("model-textproxy-wrong-offsetintext",this);if(i<0||t+i>e.offsetSize)throw new x.CKEditorError("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+i),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let i=e.includeSelf?this:this.parent;for(;i;)t[e.parentFirst?"push":"unshift"](i),i=i.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}ui.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class hi extends li{constructor(e,t,i){super(t),this._children=new ci,this.name=e,i&&this._insertChild(0,i)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}findAncestor(e,t={}){let i=t.includeSelf?this:this.parent;for(;i;){if(i.name===e)return i;i=i.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new hi(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){return"string"==typeof e?[new di(e)]:((0,x.isIterable)(e)||(e=[e]),Array.from(e).map((e=>"string"==typeof e?new di(e):e instanceof ui?new di(e.data,e.getAttributes()):e)))}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}static fromJSON(e){let t;if(e.children){t=[];for(const i of e.children)i.name?t.push(hi.fromJSON(i)):t.push(di.fromJSON(i))}return new hi(e.name,e.attributes,t)}}hi.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class mi{constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new x.CKEditorError("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new x.CKEditorError("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=pi._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,i,o,n;do{o=this.position,n=this._visitedParent,({done:t,value:i}=this.next())}while(!t&&e(i));t||(this._position=o,this._visitedParent=n)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),i=this._visitedParent;if(null===i.parent&&t.offset===i.maxOffset)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const o=fi(t,i),n=o||bi(t,i,o);if(n instanceof hi)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=n),this._position=t,gi("elementStart",n,e,t,1);if(n instanceof di){let o;if(this.singleCharacters)o=1;else{let e=n.endOffset;this._boundaryEndParent==i&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),o=t.offset-e}const n=t.offset-r.startOffset,s=new ui(r,n-o,o);return t.offset-=o,this._position=t,gi("text",s,e,t,o)}return t.path.pop(),this._position=t,this._visitedParent=i.parent,gi("elementStart",i,e,t,1)}}function gi(e,t,i,o,n){return{done:!1,value:{type:e,item:t,previousPosition:i,nextPosition:o,length:n}}}class pi extends ai{constructor(e,t,i="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new x.CKEditorError("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new x.CKEditorError("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=i}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t1)return!1;if(1===t)return ki(e,this,i);if(-1===t)return ki(this,e,i)}return this.path.length===e.path.length||(this.path.length>e.path.length?_i(this.path,t):_i(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;const t=this.getParentPath(),i=e.getParentPath();return"same"==(0,x.compareArrays)(t,i)}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=pi._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let i;return t.containsPosition(this)||t.start.isEqual(this)?(i=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(i=i._getTransformedByDeletion(e.deletionPosition,1))):i=this.isEqual(e.deletionPosition)?pi._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),i}_getTransformedByDeletion(e,t){const i=pi._createAt(this);if(this.root!=e.root)return i;if("same"==(0,x.compareArrays)(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;i.offset-=t}}else if("prefix"==(0,x.compareArrays)(e.getParentPath(),this.getParentPath())){const o=e.path.length-1;if(e.offset<=this.path[o]){if(e.offset+t>this.path[o])return null;i.path[o]-=t}}return i}_getTransformedByInsertion(e,t){const i=pi._createAt(this);if(this.root!=e.root)return i;if("same"==(0,x.compareArrays)(e.getParentPath(),this.getParentPath()))(e.offset=t;){if(e.path[o]+n!==i.maxOffset)return!1;n=1,o--,i=i.parent}return!0}(e,i+1)}function _i(e,t){for(;tt+1;){const t=o.maxOffset-i.offset;0!==t&&e.push(new vi(i,i.getShiftedBy(t))),i.path=i.path.slice(0,-1),i.offset++,o=o.parent}for(;i.path.length<=this.end.path.length;){const t=this.end.path[i.path.length-1],o=t-i.offset;0!==o&&e.push(new vi(i,i.getShiftedBy(o))),i.offset=t,i.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new mi(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new mi(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new mi(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new vi(this.start,this.end)]}getTransformedByOperations(e){const t=[new vi(this.start,this.end)];for(const i of e)for(let e=0;e0?new this(i,o):new this(o,i)}static _createIn(e){return new this(pi._createAt(e,0),pi._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(pi._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new x.CKEditorError("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const i=e.indexOf(t),o=new this(t.start,t.end);if(i>0)for(let t=i-1;e[t].end.isEqual(o.start);t++)o.start=pi._createAt(e[t].start);for(let t=i+1;t{if(t.viewPosition)return;const i=this._modelToViewMapping.get(t.modelPosition.parent);if(!i)throw new x.CKEditorError("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(i,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const i=this.findMappedViewAncestor(t.viewPosition),o=this._viewToModelMapping.get(i),n=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,i);t.modelPosition=pi._createAt(o,n)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const i=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(i)==e&&this._modelToViewMapping.delete(i))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const i=this._markerNameToElements.get(t)||new Set;i.add(e);const o=this._elementToMarkerNames.get(e)||new Set;o.add(t),this._markerNameToElements.set(t,i),this._elementToMarkerNames.set(e,o)}unbindElementFromMarkerName(e,t){const i=this._markerNameToElements.get(t);i&&(i.delete(e),0==i.size&&this._markerNameToElements.delete(t));const o=this._elementToMarkerNames.get(e);o&&(o.delete(t),0==o.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new vi(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new Ne(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const i={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",i),i.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const i=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())i.add(t);else i.add(e);return i}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,i){if(i!=e)return this._toModelOffset(e.parent,e.index,i)+this._toModelOffset(e,t,e);if(e.is("$text"))return t;let o=0;for(let i=0;i1?t[0]+":"+t[1]:t[0]}class Ai extends((0,x.EmitterMixin)()){constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,i){const o=this._createConversionApi(i,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,o);const n=this._reduceChanges(e.getChanges());for(const e of n)"insert"===e.type?this._convertInsert(vi._createFromPositionAndShift(e.position,e.length),o):"reinsert"===e.type?this._convertReinsert(vi._createFromPositionAndShift(e.position,e.length),o):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,o):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,o);for(const e of o.mapper.flushUnboundMarkerNames()){const i=t.get(e).getRange();this._convertMarkerRemove(e,i,o),this._convertMarkerAdd(e,i,o)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,o);o.mapper.flushDeferredBindings(),o.consumable.verifyAllConsumed("insert")}convert(e,t,i,o={}){const n=this._createConversionApi(i,void 0,o);this._convertInsert(e,n);for(const[e,i]of t)this._convertMarkerAdd(e,i,n);n.consumable.verifyAllConsumed("insert")}convertSelection(e,t,i){const o=Array.from(t.getMarkersAtPosition(e.getFirstPosition())),n=this._createConversionApi(i);if(this._addConsumablesForSelection(n.consumable,e,o),this.fire("selection",{selection:e},n),e.isCollapsed){for(const t of o){const i=t.getRange();if(!Ei(e.getFirstPosition(),t,n.mapper))continue;const o={item:e,markerName:t.name,markerRange:i};n.consumable.test(e,"addMarker:"+t.name)&&this.fire(`addMarker:${t.name}`,o,n)}for(const t of e.getAttributeKeys()){const i={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};n.consumable.test(e,"attribute:"+i.attributeKey)&&this.fire(`attribute:${i.attributeKey}:$text`,i,n)}}}_convertInsert(e,t,i={}){i.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,Array.from(e));for(const i of Array.from(e.getWalker({shallow:!0})).map(Ti))this._testAndFire("insert",i,t)}_convertRemove(e,t,i,o){this.fire(`remove:${i}`,{position:e,length:t},o)}_convertAttribute(e,t,i,o,n){this._addConsumablesForRange(n.consumable,e,`attribute:${t}`);for(const r of e){const e={item:r.item,range:vi._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:t,attributeOldValue:i,attributeNewValue:o};this._testAndFire(`attribute:${t}`,e,n)}}_convertReinsert(e,t){const i=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,i);for(const e of i.map(Ti))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,i){if("$graveyard"==t.root.rootName)return;const o=`addMarker:${e}`;if(i.consumable.add(t,o),this.fire(o,{markerName:e,markerRange:t},i),i.consumable.consume(t,o)){this._addConsumablesForRange(i.consumable,t,o);for(const n of t.getItems()){if(!i.consumable.test(n,o))continue;const r={item:n,range:vi._createOn(n),markerName:e,markerRange:t};this.fire(o,r,i)}}}_convertMarkerRemove(e,t,i){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},i)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const i of t){const t=i.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const i of t.getAttributeKeys())e.add(t,"attribute:"+i)}}return e}_addConsumablesForRange(e,t,i){for(const o of t.getItems())e.add(o,i);return e}_addConsumablesForSelection(e,t,i){e.add(t,"selection");for(const o of i)e.add(t,"addMarker:"+o.name);for(const i of t.getAttributeKeys())e.add(t,"attribute:"+i);return e}_testAndFire(e,t,i){const o=function(e,t){return`${e}:${t.item.is("element")?t.item.name:"$text"}`}(e,t),n=t.item.is("$textProxy")?i.consumable._getSymbolForTextProxy(t.item):t.item,r=this._firedEventsMap.get(i),s=r.get(n);if(s){if(s.has(o))return;s.add(o)}else r.set(n,new Set([o]));this.fire(o,t,i)}_testAndFireAddAttributes(e,t){const i={item:e,range:vi._createOn(e)};for(const e of i.item.getAttributeKeys())i.attributeKey=e,i.attributeOldValue=null,i.attributeNewValue=i.item.getAttribute(e),this._testAndFire(`attribute:${e}`,i,t)}_createConversionApi(e,t=new Set,i={}){const o={...this._conversionApi,consumable:new Ci,writer:e,options:i,convertItem:e=>this._convertInsert(vi._createOn(e),o),convertChildren:e=>this._convertInsert(vi._createIn(e),o,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,o),canReuseView:e=>!t.has(o.mapper.toModelElement(e))};return this._firedEventsMap.set(o,new Map),o}}function Ei(e,t,i){const o=t.getRange(),n=Array.from(e.getAncestors());return n.shift(),n.reverse(),!n.some((e=>{if(o.containsItem(e))return!!i.toViewElement(e).getCustomProperty("addHighlight")}))}function Ti(e){return{item:e.item,range:vi._createFromPositionAndShift(e.previousPosition,e.length)}}class Si extends((0,x.EmitterMixin)(ai)){constructor(...e){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let i=!1;for(const o of e._ranges)if(t.isEqual(o)){i=!0;break}if(!i)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new vi(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new vi(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new vi(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,i,o]=e;if("object"==typeof i&&(o=i,i=void 0),null===t)this._setRanges([]);else if(t instanceof Si)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof vi)this._setRanges([t],!!o&&!!o.backward);else if(t instanceof pi)this._setRanges([new vi(t)]);else if(t instanceof li){const e=!!o&&!!o.backward;let n;if("in"==i)n=vi._createIn(t);else if("on"==i)n=vi._createOn(t);else{if(void 0===i)throw new x.CKEditorError("model-selection-setto-required-second-parameter",[this,t]);n=new vi(pi._createAt(t,i))}this._setRanges([n],e)}else{if(!(0,x.isIterable)(t))throw new x.CKEditorError("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,o&&!!o.backward)}}_setRanges(e,t=!1){const i=Array.from(e),o=i.some((t=>{if(!(t instanceof vi))throw new x.CKEditorError("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(i.length!==this._ranges.length||o)&&(this._replaceAllRanges(i),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new x.CKEditorError("model-selection-setfocus-no-ranges",[this,e]);const i=pi._createAt(e,t);if("same"==i.compareWith(this.focus))return;const o=this.anchor;this._ranges.length&&this._popRange(),"before"==i.compareWith(o)?(this._pushRange(new vi(i,o)),this._lastRangeBackward=!0):(this._pushRange(new vi(o,i)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const i=Vi(t.start,e);Oi(i,t)&&(yield i);for(const i of t.getWalker()){const o=i.item;"elementEnd"==i.type&&Ii(o,e,t)&&(yield o)}const o=Vi(t.end,e);Bi(o,t)&&(yield o)}}containsEntireContent(e=this.anchor.root){const t=pi._createAt(e,0),i=pi._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new vi(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function Pi(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function Ii(e,t,i){return Pi(e,t)&&Ri(e,i)}function Vi(e,t){const i=e.parent.root.document.model.schema,o=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let n=!1;const r=o.find((e=>!n&&(n=i.isLimit(e),!n&&Pi(e,t))));return o.forEach((e=>t.add(e))),r}function Ri(e,t){const i=function(e){const t=e.root.document.model.schema;let i=e.parent;for(;i;){if(t.isBlock(i))return i;i=i.parent}}(e);return!i||!t.containsRange(vi._createOn(i),!0)}function Oi(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(pi._createAt(e,e.maxOffset))&&Ri(e,t))}function Bi(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(pi._createAt(e,0))&&Ri(e,t))}Si.prototype.is=function(e){return"selection"===e||"model:selection"===e};class Mi extends((0,x.EmitterMixin)(vi)){constructor(e,t){super(e,t),zi.call(this)}detach(){this.stopListening()}toRange(){return new vi(this.start,this.end)}static fromRange(e){return new Mi(e.start,e.end)}}function zi(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&Ni.call(this,i)}),{priority:"low"})}function Ni(e){const t=this.getTransformedByOperation(e),i=vi._createFromRanges(t),o=!i.isEqual(this),n=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let r=null;if(o){"$graveyard"==i.root.rootName&&(r="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=i.start,this.end=i.end,this.fire("change:range",t,{deletionPosition:r})}else n&&this.fire("change:content",this.toRange(),{deletionPosition:r})}Mi.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const Di="selection:";class Li extends((0,x.EmitterMixin)(ai)){constructor(e){super(),this._selection=new Fi(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return Di+e}static _isStoreAttributeKey(e){return e.startsWith(Di)}}Li.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class Fi extends Si{constructor(e){super(),this.markers=new x.Collection({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&"marker"!=i.type&&"rename"!=i.type&&"noop"!=i.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,i,o)=>{this._updateMarker(t,o)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const i=e.document.differ;for(const o of i.getChanges()){if("insert"!=o.type)continue;const i=o.position.parent;o.length===i.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(i.getAttributeKeys()).filter((e=>e.startsWith(Di)));for(const o of t)e.removeAttribute(o,i)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=o.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const i=t.name.split(":",1)[0];if(!this._observedMarkers.has(i))continue;const o=t.getRange();for(const i of this.getRanges())o.containsRange(i,!i.isCollapsed)&&e.push(t)}const i=Array.from(this.markers);for(const i of e)this.markers.has(i)||(this.markers.add(i),t=!0);for(const i of Array.from(this.markers))e.includes(i)||(this.markers.remove(i),t=!0);t&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateMarker(e,t){const i=e.name.split(":",1)[0];if(!this._observedMarkers.has(i))return;let o=!1;const n=Array.from(this.markers),r=this.markers.has(e);if(t){let i=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){i=!0;break}i&&!r?(this.markers.add(e),o=!0):!i&&r&&(this.markers.remove(e),o=!0)}else r&&(this.markers.remove(e),o=!0);o&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateAttributes(e){const t=(0,x.toMap)(this._getSurroundingAttributes()),i=(0,x.toMap)(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const o=[];for(const[e,t]of this.getAttributes())i.has(e)&&i.get(e)===t||o.push(e);for(const[e]of i)this.hasAttribute(e)||o.push(e);o.length>0&&this.fire("change:attribute",{attributeKeys:o,directChange:!1})}_setAttribute(e,t,i=!0){const o=i?"normal":"low";return("low"!=o||"normal"!=this._attributePriority.get(e))&&(super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,o),!0))}_removeAttribute(e,t=!0){const i=t?"normal":"low";return!("low"==i&&"normal"==this._attributePriority.get(e)||(this._attributePriority.set(e,i),!super.hasAttribute(e)||(this._attrs.delete(e),0)))}_setAttributesTo(e){const t=new Set;for(const[t,i]of this.getAttributes())e.get(t)!==i&&this._removeAttribute(t,!1);for(const[i,o]of e)this._setAttribute(i,o,!1)&&t.add(i);return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(Di)){const i=t.substr(10);yield[i,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let i=null;if(this.isCollapsed){const o=e.textNode?e.textNode:e.nodeBefore,n=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(i=Hi(o)),i||(i=Hi(n)),!this.isGravityOverridden&&!i){let e=o;for(;e&&!t.isInline(e)&&!i;)e=e.previousSibling,i=Hi(e)}if(!i){let e=n;for(;e&&!t.isInline(e)&&!i;)e=e.nextSibling,i=Hi(e)}i||(i=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const o of e){if(o.item.is("element")&&t.isObject(o.item))break;if("text"==o.type){i=o.item.getAttributes();break}}}return i}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function Hi(e){return e instanceof ui||e instanceof di?e.getAttributes():null}class Wi{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}const Zi=function(e){return(0,E.Z)(e,5)};class Ui extends Wi{elementToElement(e){return this.add(function(e){const t=qi(e.model),i=Ki(e.view,"container");return t.attributes.length&&(t.children=!0),o=>{o.on(`insert:${t.name}`,function(e,t=io){return(i,o,n)=>{if(!t(o.item,n.consumable,{preflight:!0}))return;const r=e(o.item,n,o);if(!r)return;t(o.item,n.consumable);const s=n.mapper.toViewPosition(o.range.start);n.mapper.bindElements(o.item,r),n.writer.insert(s,r),n.convertAttributes(o.item),eo(r,o.item.getChildren(),n,{reconversion:o.reconversion})}}(i,Xi(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&o.on("reduceChanges",Qi(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=qi(e.model),i=Ki(e.view,"container");return t.children=!0,o=>{if(o._conversionApi.schema.checkChild(t.name,"$text"))throw new x.CKEditorError("conversion-element-to-structure-disallowed-text",o,{elementName:t.name});var n,r;o.on(`insert:${t.name}`,(n=i,r=Xi(t),(e,t,i)=>{if(!r(t.item,i.consumable,{preflight:!0}))return;const o=new Map;i.writer._registerSlotFactory(function(e,t,i){return(o,n)=>{const r=o.createContainerElement("$slot");let s=null;if("children"===n)s=Array.from(e.getChildren());else{if("function"!=typeof n)throw new x.CKEditorError("conversion-slot-mode-unknown",i.dispatcher,{modeOrFilter:n});s=Array.from(e.getChildren()).filter((e=>n(e)))}return t.set(r,s),r}}(t.item,o,i));const s=n(t.item,i,t);if(i.writer._clearSlotFactory(),!s)return;!function(e,t,i){const o=Array.from(t.values()).flat(),n=new Set(o);if(n.size!=o.length)throw new x.CKEditorError("conversion-slot-filter-overlap",i.dispatcher,{element:e});if(n.size!=e.childCount)throw new x.CKEditorError("conversion-slot-filter-incomplete",i.dispatcher,{element:e})}(t.item,o,i),r(t.item,i.consumable);const a=i.mapper.toViewPosition(t.range.start);i.mapper.bindElements(t.item,s),i.writer.insert(a,s),i.convertAttributes(t.item),function(e,t,i,o){i.mapper.on("modelToViewPosition",s,{priority:"highest"});let n=null,r=null;for([n,r]of t)eo(e,r,i,o),i.writer.move(i.writer.createRangeIn(n),i.writer.createPositionBefore(n)),i.writer.remove(n);function s(e,t){const i=t.modelPosition.nodeAfter,o=r.indexOf(i);o<0||(t.viewPosition=t.mapper.findPositionIn(n,o))}i.mapper.off("modelToViewPosition",s)}(s,o,i,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),o.on("reduceChanges",Qi(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){let t=(e=Zi(e)).model;"string"==typeof t&&(t={key:t});let i=`attribute:${t.key}`;if(t.name&&(i+=":"+t.name),t.values)for(const i of t.values)e.view[i]=Ki(e.view[i],"attribute");else e.view=Ki(e.view,"attribute");const o=Gi(e);return t=>{t.on(i,function(e){return(t,i,o)=>{if(!o.consumable.test(i.item,t.name))return;const n=e(i.attributeOldValue,o,i),r=e(i.attributeNewValue,o,i);if(!n&&!r)return;o.consumable.consume(i.item,t.name);const s=o.writer,a=s.document.selection;if(i.item instanceof Si||i.item instanceof Li)s.wrap(a.getFirstRange(),r);else{let e=o.mapper.toViewRange(i.range);null!==i.attributeOldValue&&n&&(e=s.unwrap(e,n)),null!==i.attributeNewValue&&r&&s.wrap(e,r)}}}(o),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=(e=Zi(e)).model;"string"==typeof t&&(t={key:t});let i=`attribute:${t.key}`;if(t.name&&(i+=":"+t.name),t.values)for(const i of t.values)e.view[i]=Ji(e.view[i]);else e.view=Ji(e.view);const o=Gi(e);return t=>{var n;t.on(i,(n=o,(e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;const o=n(t.attributeOldValue,i,t),r=n(t.attributeNewValue,i,t);if(!o&&!r)return;i.consumable.consume(t.item,e.name);const s=i.mapper.toViewElement(t.item),a=i.writer;if(!s)throw new x.CKEditorError("conversion-attribute-to-attribute-on-text",i.dispatcher,t);if(null!==t.attributeOldValue&&o)if("class"==o.key){const e=(0,x.toArray)(o.value);for(const t of e)a.removeClass(t,s)}else if("style"==o.key){const e=Object.keys(o.value);for(const t of e)a.removeStyle(t,s)}else a.removeAttribute(o.key,s);if(null!==t.attributeNewValue&&r)if("class"==r.key){const e=(0,x.toArray)(r.value);for(const t of e)a.addClass(t,s)}else if("style"==r.key){const e=Object.keys(r.value);for(const t of e)a.setStyle(t,r.value[t],s)}else a.setAttribute(r.key,r.value,s)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=Ki(e.view,"ui");return i=>{var o;i.on(`addMarker:${e.model}`,(o=t,(e,t,i)=>{t.isOpening=!0;const n=o(t,i);t.isOpening=!1;const r=o(t,i);if(!n||!r)return;const s=t.markerRange;if(s.isCollapsed&&!i.consumable.consume(s,e.name))return;for(const t of s)if(!i.consumable.consume(t.item,e.name))return;const a=i.mapper,l=i.writer;l.insert(a.toViewPosition(s.start),n),i.mapper.bindElementToMarker(n,t.markerName),s.isCollapsed||(l.insert(a.toViewPosition(s.end),r),i.mapper.bindElementToMarker(r,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),i.on(`removeMarker:${e.model}`,((e,t,i)=>{const o=i.mapper.markerNameToElements(t.markerName);if(o){for(const e of o)i.mapper.unbindElementFromMarkerName(e,t.markerName),i.writer.clear(i.writer.createRangeOn(e),e);i.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var i;t.on(`addMarker:${e.model}`,(i=e.view,(e,t,o)=>{if(!t.item)return;if(!(t.item instanceof Si||t.item instanceof Li||t.item.is("$textProxy")))return;const n=Yi(i,t,o);if(!n)return;if(!o.consumable.consume(t.item,e.name))return;const r=o.writer,s=ji(r,n),a=r.document.selection;if(t.item instanceof Si||t.item instanceof Li)r.wrap(a.getFirstRange(),s);else{const e=o.mapper.toViewRange(t.range),i=r.wrap(e,s);for(const e of i.getItems())if(e.is("attributeElement")&&e.isSimilar(s)){o.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,i,o)=>{if(!i.item)return;if(!(i.item instanceof hi))return;const n=Yi(e,i,o);if(!n)return;if(!o.consumable.test(i.item,t.name))return;const r=o.mapper.toViewElement(i.item);if(r&&r.getCustomProperty("addHighlight")){o.consumable.consume(i.item,t.name);for(const e of vi._createIn(i.item))o.consumable.consume(e.item,t.name);r.getCustomProperty("addHighlight")(r,n,o.writer),o.mapper.bindElementToMarker(r,i.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,i,o)=>{if(i.markerRange.isCollapsed)return;const n=Yi(e,i,o);if(!n)return;const r=ji(o.writer,n),s=o.mapper.markerNameToElements(i.markerName);if(s){for(const e of s)o.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("attributeElement")?o.writer.unwrap(o.writer.createRangeOn(e),r):e.getCustomProperty("removeHighlight")(e,n.id,o.writer);o.writer.clearClonedElementsGroup(i.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){const t=(e=Zi(e)).model;let i=e.view;return i||(i=i=>({group:t,name:i.substr(e.model.length+1)})),o=>{var n;o.on(`addMarker:${t}`,(n=i,(e,t,i)=>{const o=n(t.markerName,i);if(!o)return;const r=t.markerRange;i.consumable.consume(r,e.name)&&($i(r,!1,i,t,o),$i(r,!0,i,t,o),e.stop())}),{priority:e.converterPriority||"normal"}),o.on(`removeMarker:${t}`,function(e){return(t,i,o)=>{const n=e(i.markerName,o);if(!n)return;const r=o.mapper.markerNameToElements(i.markerName);if(r){for(const e of r)o.mapper.unbindElementFromMarkerName(e,i.markerName),e.is("containerElement")?(s(`data-${n.group}-start-before`,e),s(`data-${n.group}-start-after`,e),s(`data-${n.group}-end-before`,e),s(`data-${n.group}-end-after`,e)):o.writer.clear(o.writer.createRangeOn(e),e);o.writer.clearClonedElementsGroup(i.markerName),t.stop()}function s(e,t){if(t.hasAttribute(e)){const i=new Set(t.getAttribute(e).split(","));i.delete(n.name),0==i.size?o.writer.removeAttribute(e,t):o.writer.setAttribute(e,Array.from(i).join(","),t)}}}}(i),{priority:e.converterPriority||"normal"})}}(e))}}function ji(e,t){const i=e.createAttributeElement("span",t.attributes);return t.classes&&i._addClass(t.classes),"number"==typeof t.priority&&(i._priority=t.priority),i._id=t.id,i}function $i(e,t,i,o,n){const r=t?e.start:e.end,s=r.nodeAfter&&r.nodeAfter.is("element")?r.nodeAfter:null,a=r.nodeBefore&&r.nodeBefore.is("element")?r.nodeBefore:null;if(s||a){let e,r;t&&s||!t&&!a?(e=s,r=!0):(e=a,r=!1);const l=i.mapper.toViewElement(e);if(l)return void function(e,t,i,o,n,r){const s=`data-${r.group}-${t?"start":"end"}-${i?"before":"after"}`,a=e.hasAttribute(s)?e.getAttribute(s).split(","):[];a.unshift(r.name),o.writer.setAttribute(s,a.join(","),e),o.mapper.bindElementToMarker(e,n.markerName)}(l,t,r,i,o,n)}!function(e,t,i,o,n){const r=`${n.group}-${t?"start":"end"}`,s=n.name?{name:n.name}:null,a=i.writer.createUIElement(r,s);i.writer.insert(e,a),i.mapper.bindElementToMarker(a,o.markerName)}(i.mapper.toViewPosition(r),t,i,o,n)}function qi(e){return"string"==typeof e&&(e={name:e}),e.attributes?Array.isArray(e.attributes)||(e.attributes=[e.attributes]):e.attributes=[],e.children=!!e.children,e}function Ki(e,t){return"function"==typeof e?e:(i,o)=>function(e,t,i){let o;"string"==typeof e&&(e={name:e});const n=t.writer,r=Object.assign({},e.attributes);if("container"==i)o=n.createContainerElement(e.name,r);else if("attribute"==i){const t={priority:e.priority||Ge.DEFAULT_PRIORITY};o=n.createAttributeElement(e.name,r,t)}else o=n.createUIElement(e.name,r);if(e.styles){const t=Object.keys(e.styles);for(const i of t)n.setStyle(i,e.styles[i],o)}if(e.classes){const t=e.classes;if("string"==typeof t)n.addClass(t,o);else for(const e of t)n.addClass(e,o)}return o}(e,o,t)}function Gi(e){return e.model.values?(t,i,o)=>{const n=e.view[t];return n?n(t,i,o):null}:e.view}function Ji(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function Yi(e,t,i){const o="function"==typeof e?e(t,i):e;return o?(o.priority||(o.priority=10),o.id||(o.id=t.markerName),o):null}function Qi(e){const t=function(e){return(t,i)=>{if(!t.is("element",e.name))return!1;if("attribute"==i.type){if(e.attributes.includes(i.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,i)=>{const o=[];i.reconvertedElements||(i.reconvertedElements=new Set);for(const e of i.changes){const n="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(n&&t(n,e)){if(!i.reconvertedElements.has(n)){i.reconvertedElements.add(n);const e=pi._createBefore(n);let t=o.length;for(let i=o.length-1;i>=0;i--){const n=o[i],r=("attribute"==n.type?n.range.start:n.position).compareWith(e);if("before"==r||"remove"==n.type&&"same"==r)break;t=i}o.splice(t,0,{type:"remove",name:n.name,position:e,length:1},{type:"reinsert",name:n.name,position:e,length:1})}}else o.push(e)}i.changes=o}}function Xi(e){return(t,i,o={})=>{const n=["insert"];for(const i of e.attributes)t.hasAttribute(i)&&n.push(`attribute:${i}`);return!!n.every((e=>i.test(t,e)))&&(o.preflight||n.forEach((e=>i.consume(t,e))),!0)}}function eo(e,t,i,o){for(const n of t)to(e.root,n,i,o)||i.convertItem(n)}function to(e,t,i,o){const{writer:n,mapper:r}=i;if(!o.reconversion)return!1;const s=r.toViewElement(t);return!(!s||s.root==e||!i.canReuseView(s)||(n.move(n.createRangeOn(s),r.toViewPosition(pi._createBefore(t))),0))}function io(e,t,{preflight:i}={}){return i?t.test(e,"insert"):t.consume(e,"insert")}function oo(e){const{schema:t,document:i}=e.model;for(const o of i.getRootNames()){const n=i.getRoot(o);if(n.isEmpty&&!t.checkChild(n,"$text")&&t.checkChild(n,"paragraph"))return e.insertElement("paragraph",n),!0}return!1}function no(e,t,i){const o=i.createContext(e);return!!i.checkChild(o,"paragraph")&&!!i.checkChild(o.push("paragraph"),t)}function ro(e,t){const i=t.createElement("paragraph");return t.insert(i,e),t.createPositionAt(i,0)}class so extends Wi{elementToElement(e){return this.add(ao(e))}elementToAttribute(e){return this.add(function(e){uo(e=Zi(e));const t=ho(e,!1),i=lo(e.view),o=i?`element:${i}`:"element";return i=>{i.on(o,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=null;("string"==typeof(e=Zi(e)).view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let i;return i="class"==t||"style"==t?{["class"==t?"classes":"styles"]:e.view.value}:{attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}},e.view.name&&(i.name=e.view.name),e.view=i,t}(e)),uo(e,t);const i=ho(e,!0);return t=>{t.on("element",i,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,i)=>{const o="string"==typeof e?e:e(t,i);return i.writer.createElement("$marker",{"data-name":o})}}(e.model);return ao({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){(e=Zi(e)).model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},i=co(mo(t,"start")),o=co(mo(t,"end"));return n=>{n.on(`element:${e.view}-start`,i,{priority:e.converterPriority||"normal"}),n.on(`element:${e.view}-end`,o,{priority:e.converterPriority||"normal"});const r=x.priorities.get("low"),s=x.priorities.get("highest"),a=x.priorities.get(e.converterPriority)/s;n.on("element",function(e){return(t,i,o)=>{const n=`data-${e.view}`;function r(t,n){for(const r of n){const n=e.model(r,o),s=o.writer.createElement("$marker",{"data-name":n});o.writer.insert(s,t),i.modelCursor.isEqual(t)?i.modelCursor=i.modelCursor.getShiftedBy(1):i.modelCursor=i.modelCursor._getTransformedByInsertion(t,1),i.modelRange=i.modelRange._getTransformedByInsertion(t,1)[0]}}(o.consumable.test(i.viewItem,{attributes:n+"-end-after"})||o.consumable.test(i.viewItem,{attributes:n+"-start-after"})||o.consumable.test(i.viewItem,{attributes:n+"-end-before"})||o.consumable.test(i.viewItem,{attributes:n+"-start-before"}))&&(i.modelRange||Object.assign(i,o.convertChildren(i.viewItem,i.modelCursor)),o.consumable.consume(i.viewItem,{attributes:n+"-end-after"})&&r(i.modelRange.end,i.viewItem.getAttribute(n+"-end-after").split(",")),o.consumable.consume(i.viewItem,{attributes:n+"-start-after"})&&r(i.modelRange.end,i.viewItem.getAttribute(n+"-start-after").split(",")),o.consumable.consume(i.viewItem,{attributes:n+"-end-before"})&&r(i.modelRange.start,i.viewItem.getAttribute(n+"-end-before").split(",")),o.consumable.consume(i.viewItem,{attributes:n+"-start-before"})&&r(i.modelRange.start,i.viewItem.getAttribute(n+"-start-before").split(",")))}}(t),{priority:r+a})}}(e))}}function ao(e){const t=co(e=Zi(e)),i=lo(e.view),o=i?`element:${i}`:"element";return i=>{i.on(o,t,{priority:e.converterPriority||"normal"})}}function lo(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function co(e){const t=new R(e.view);return(i,o,n)=>{const r=t.match(o.viewItem);if(!r)return;const s=r.match;if(s.name=!0,!n.consumable.test(o.viewItem,s))return;const a=function(e,t,i){return e instanceof Function?e(t,i):i.writer.createElement(e)}(e.model,o.viewItem,n);a&&n.safeInsert(a,o.modelCursor)&&(n.consumable.consume(o.viewItem,s),n.convertChildren(o.viewItem,a),n.updateConversionResult(a,o))}}function uo(e,t=null){const i=null===t||(e=>e.getAttribute(t)),o="object"!=typeof e.model?e.model:e.model.key,n="object"!=typeof e.model||void 0===e.model.value?i:e.model.value;e.model={key:o,value:n}}function ho(e,t){const i=new R(e.view);return(o,n,r)=>{if(!n.modelRange&&t)return;const s=i.match(n.viewItem);if(!s)return;if(function(e,t){const i="function"==typeof e?e(t):e;return!("object"==typeof i&&!lo(i))&&(!i.classes&&!i.attributes&&!i.styles)}(e.view,n.viewItem)?s.match.name=!0:delete s.match.name,!r.consumable.test(n.viewItem,s.match))return;const a=e.model.key,l="function"==typeof e.model.value?e.model.value(n.viewItem,r):e.model.value;if(null===l)return;n.modelRange||Object.assign(n,r.convertChildren(n.viewItem,n.modelCursor));const c=function(e,t,i,o){let n=!1;for(const r of Array.from(e.getItems({shallow:i})))o.schema.checkAttribute(r,t.key)&&(n=!0,r.hasAttribute(t.key)||o.writer.setAttribute(t.key,t.value,r));return n}(n.modelRange,{key:a,value:l},t,r);c&&(r.consumable.test(n.viewItem,{name:!0})&&(s.match.name=!0),r.consumable.consume(n.viewItem,s.match))}}function mo(e,t){return{view:`${e.view}-${t}`,model:(t,i)=>{const o=t.getAttribute("name"),n=e.model(o,i);return i.writer.createElement("$marker",{"data-name":n})}}}function go(e,t){return e.isCollapsed?function(e,t){const i=e.start,o=t.getNearestSelectionRange(i);if(!o){const e=i.getAncestors().reverse().find((e=>t.isObject(e)));return e?vi._createOn(e):null}if(!o.isCollapsed)return o;const n=o.start;return i.isEqual(n)?null:new vi(n)}(e,t):function(e,t){const{start:i,end:o}=e,n=t.checkChild(i,"$text"),r=t.checkChild(o,"$text"),s=t.getLimitElement(i),a=t.getLimitElement(o);if(s===a){if(n&&r)return null;if(function(e,t,i){const o=e.nodeAfter&&!i.isLimit(e.nodeAfter)||i.checkChild(e,"$text"),n=t.nodeBefore&&!i.isLimit(t.nodeBefore)||i.checkChild(t,"$text");return o||n}(i,o,t)){const e=i.nodeAfter&&t.isSelectable(i.nodeAfter)?null:t.getNearestSelectionRange(i,"forward"),n=o.nodeBefore&&t.isSelectable(o.nodeBefore)?null:t.getNearestSelectionRange(o,"backward"),r=e?e.start:i,s=n?n.end:o;return new vi(r,s)}}const l=s&&!s.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const e=i.nodeAfter&&o.nodeBefore&&i.nodeAfter.parent===o.nodeBefore.parent,n=l&&(!e||!fo(i.nodeAfter,t)),r=c&&(!e||!fo(o.nodeBefore,t));let d=i,u=o;return n&&(d=pi._createBefore(po(s,t))),r&&(u=pi._createAfter(po(a,t))),new vi(d,u)}return null}(e,t)}function po(e,t){let i=e,o=i;for(;t.isLimit(o)&&o.parent;)i=o,o=o.parent;return i}function fo(e,t){return e&&t.isSelectable(e)}class bo extends((0,x.ObservableMixin)()){constructor(e,t){super(),this.model=e,this.view=new si(t),this.mapper=new yi,this.downcastDispatcher=new Ai({mapper:this.mapper,schema:e.schema});const i=this.model.document,o=i.selection,n=this.model.markers;var r,s,a;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(i,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(i.differ,n,e),this.downcastDispatcher.convertSelection(o,n,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(i,o)=>{const n=o.newSelection,r=[];for(const e of n.getRanges())r.push(t.toModelRange(e));const s=e.createSelection(r,{backward:n.isBackward});s.isEqual(e.document.selection)||e.change((e=>{e.setSelection(s)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(r=this.mapper,s=this.model.schema,a=this.view,(e,t)=>{if(!a.document.isComposing||x.env.isAndroid)for(let e=0;e{if(!i.consumable.consume(t.item,e.name))return;const o=i.writer,n=i.mapper.toViewPosition(t.range.start),r=o.createText(t.item.data);o.insert(n,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,i)=>{i.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||i.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,i)=>{const o=i.mapper.toViewPosition(t.position),n=t.position.getShiftedBy(t.length),r=i.mapper.toViewPosition(n,{isPhantom:!0}),s=i.writer.createRange(o,r),a=i.writer.remove(s.getTrimmed());for(const e of i.writer.createRangeIn(a).getItems())i.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,i)=>{const o=i.writer,n=o.document.selection;for(const e of n.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&i.writer.mergeAttributes(e.start);o.setSelection(null)}),{priority:"high"}),this.downcastDispatcher.on("selection",((e,t,i)=>{const o=t.selection;if(o.isCollapsed)return;if(!i.consumable.consume(o,"selection"))return;const n=[];for(const e of o.getRanges())n.push(i.mapper.toViewRange(e));i.writer.setSelection(n,{backward:o.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,i)=>{const o=t.selection;if(!o.isCollapsed)return;if(!i.consumable.consume(o,"selection"))return;const n=i.writer,r=o.getFirstPosition(),s=i.mapper.toViewPosition(r),a=n.breakAttributes(s);n.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new Be(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,i=this.model.markers.get(t);if(!i)throw new x.CKEditorError("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(i)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class wo{constructor(){this._consumables=new Map}add(e,t){let i;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?i=this._consumables.get(e):(i=new _o(e),this._consumables.set(e,i)),i.add(t))}test(e,t){const i=this._consumables.get(e);return void 0===i?null:e.is("$text")||e.is("documentFragment")?i:i.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const i=this._consumables.get(e);void 0!==i&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):i.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},i=e.getAttributeKeys();for(const e of i)"style"!=e&&"class"!=e&&t.attributes.push(e);const o=e.getClassNames();for(const e of o)t.classes.push(e);const n=e.getStyleNames();for(const e of n)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new wo),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,wo.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const i of e.getChildren())t=wo.createFrom(i,t);return t}}const ko=["attributes","classes","styles"];class _o{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of ko)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of ko)if(t in e){const i=this._test(t,e[t]);if(!0!==i)return i}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of ko)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of ko)t in e&&this._revert(t,e[t])}_add(e,t){const i=(0,z.Z)(t)?t:[t],o=this._consumables[e];for(const t of i){if("attributes"===e&&("class"===t||"style"===t))throw new x.CKEditorError("viewconsumable-invalid-attribute",this);if(o.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))o.set(e,!0)}}_test(e,t){const i=(0,z.Z)(t)?t:[t],o=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){const e=o.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",i=this._test(e,[...this._consumables[e].keys()]);if(!0!==i)return i}return!0}_consume(e,t){const i=(0,z.Z)(t)?t:[t],o=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t){if(o.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))o.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const i=(0,z.Z)(t)?t:[t],o=this._consumables[e];for(const t of i)if("attributes"!==e||"class"!==t&&"style"!==t)!1===o.get(t)&&o.set(t,!0);else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class vo extends((0,x.ObservableMixin)()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new yo(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new yo(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new x.CKEditorError("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new x.CKEditorError("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!(!t||!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!(!t||!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!(!t||!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const i=this.getDefinition(e.last);return!!i&&i.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof pi){const t=e.nodeBefore,i=e.nodeAfter;if(!(t instanceof hi))throw new x.CKEditorError("schema-check-merge-no-element-before",this);if(!(i instanceof hi))throw new x.CKEditorError("schema-check-merge-no-element-after",this);return this.checkMerge(t,i)}for(const i of t.getChildren())if(!this.checkChild(e,i))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[i,o])=>{if(!o)return;const n=e(i,o);"boolean"==typeof n&&(t.stop(),t.return=n)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[i,o])=>{const n=e(i,o);"boolean"==typeof n&&(t.stop(),t.return=n)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;for(t=e instanceof pi?e.parent:(e instanceof vi?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const i=t.getCommonAncestor();return e?e.getCommonAncestor(i,{includeSelf:!0}):i}),null);!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const i=[...e.getFirstPosition().getAncestors(),new di("",e.getAttributes())];return this.checkAttribute(i,t)}{const i=e.getRanges();for(const e of i)for(const i of e)if(this.checkAttribute(i.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const i of e)yield*this._getValidRangesForRange(i,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new vi(e);let i,o;const n=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(i=new mi({boundaries:vi._createIn(n),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(o=new mi({boundaries:vi._createIn(n),startPosition:e}));for(const e of function*(e,t){let i=!1;for(;!i;){if(i=!0,e){const t=e.next();t.done||(i=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(i=!1,yield{walker:t,value:e.value})}}}(i,o)){const t=e.walker==i?"elementEnd":"elementStart",o=e.value;if(o.type==t&&this.isObject(o.item))return vi._createOn(o.item);if(this.checkChild(o.nextPosition,"$text"))return new vi(o.nextPosition)}return null}findAllowedParent(e,t){let i=e.parent;for(;i;){if(this.checkChild(i,t))return i;if(this.isLimit(i))return null;i=i.parent}return null}setAllowedAttributes(e,t,i){const o=i.model;for(const[n,r]of Object.entries(t))o.schema.checkAttribute(e,n)&&i.setAttribute(n,r,e)}removeDisallowedAttributes(e,t){for(const i of e)if(i.is("$text"))Mo(this,i,t);else{const e=vi._createIn(i).getPositions();for(const i of e)Mo(this,i.nodeBefore||i.parent,t)}}getAttributesWithProperty(e,t,i){const o={};for(const[n,r]of e.getAttributes()){const e=this.getAttributeProperties(n);void 0!==e[t]&&(void 0!==i&&i!==e[t]||(o[n]=r))}return o}createContext(e){return new yo(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,i=Object.keys(t);for(const o of i)e[o]=Co(t[o],o);for(const t of i)xo(e,t);for(const t of i)Ao(e,t);for(const t of i)Eo(e,t);for(const t of i)To(e,t),So(e,t);for(const t of i)Po(e,t),Io(e,t),Vo(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,i=t.length-1){const o=t.getItem(i);if(e.allowIn.includes(o.name)){if(0==i)return!0;{const e=this.getDefinition(o);return this._checkContextMatch(e,t,i-1)}}return!1}*_getValidRangesForRange(e,t){let i=e.start,o=e.start;for(const n of e.getItems({shallow:!0}))n.is("element")&&(yield*this._getValidRangesForRange(vi._createIn(n),t)),this.checkAttribute(n,t)||(i.isEqual(o)||(yield new vi(i,o)),i=pi._createAfter(n)),o=pi._createAfter(n);i.isEqual(o)||(yield new vi(i,o))}}class yo{constructor(e){if(e instanceof yo)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(Bo)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new yo([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Co(e,t){const i={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const i of e){const e=Object.keys(i).filter((e=>e.startsWith("is")));for(const o of e)t[o]=!!i[o]}}(e,i),Ro(e,i,"allowIn"),Ro(e,i,"allowContentOf"),Ro(e,i,"allowWhere"),Ro(e,i,"allowAttributes"),Ro(e,i,"allowAttributesOf"),Ro(e,i,"allowChildren"),Ro(e,i,"inheritTypesFrom"),function(e,t){for(const i of e){const e=i.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,i),i}function xo(e,t){const i=e[t];for(const o of i.allowChildren){const i=e[o];i&&i.allowIn.push(t)}i.allowChildren.length=0}function Ao(e,t){for(const i of e[t].allowContentOf)e[i]&&Oo(e,i).forEach((e=>{e.allowIn.push(t)}));delete e[t].allowContentOf}function Eo(e,t){for(const i of e[t].allowWhere){const o=e[i];if(o){const i=o.allowIn;e[t].allowIn.push(...i)}}delete e[t].allowWhere}function To(e,t){for(const i of e[t].allowAttributesOf){const o=e[i];if(o){const i=o.allowAttributes;e[t].allowAttributes.push(...i)}}delete e[t].allowAttributesOf}function So(e,t){const i=e[t];for(const t of i.inheritTypesFrom){const o=e[t];if(o){const e=Object.keys(o).filter((e=>e.startsWith("is")));for(const t of e)t in i||(i[t]=o[t])}}delete i.inheritTypesFrom}function Po(e,t){const i=e[t],o=i.allowIn.filter((t=>e[t]));i.allowIn=Array.from(new Set(o))}function Io(e,t){const i=e[t];for(const o of i.allowIn)e[o].allowChildren.push(t)}function Vo(e,t){const i=e[t];i.allowAttributes=Array.from(new Set(i.allowAttributes))}function Ro(e,t,i){for(const o of e){const e=o[i];"string"==typeof e?t[i].push(e):Array.isArray(e)&&t[i].push(...e)}}function Oo(e,t){const i=e[t];return(o=e,Object.keys(o).map((e=>o[e]))).filter((e=>e.allowIn.includes(i.name)));var o}function Bo(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function Mo(e,t,i){for(const o of t.getAttributeKeys())e.checkAttribute(t,o)||i.removeAttribute(o,t)}class zo extends((0,x.EmitterMixin)()){constructor(e){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,i=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let i;for(const o of new yo(e)){const e={};for(const t of o.getAttributeKeys())e[t]=o.getAttribute(t);const n=t.createElement(o.name,e);i&&t.insert(n,i),i=pi._createAt(n,0)}return i}(i,t),this.conversionApi.writer=t,this.conversionApi.consumable=wo.createFrom(e),this.conversionApi.store={};const{modelRange:o}=this._convertItem(e,this._modelCursor),n=t.createDocumentFragment();if(o){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,n);n.markers=function(e,t){const i=new Set,o=new Map,n=vi._createIn(e).getItems();for(const e of n)e.is("element","$marker")&&i.add(e);for(const e of i){const i=e.getAttribute("data-name"),n=t.createPositionBefore(e);o.has(i)?o.get(i).end=n.clone():o.set(i,new vi(n.clone())),t.remove(e)}return o}(n,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,n}_convertItem(e,t){const i={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,i,this.conversionApi):e.is("$text")?this.fire("text",i,this.conversionApi):this.fire("documentFragment",i,this.conversionApi),i.modelRange&&!(i.modelRange instanceof vi))throw new x.CKEditorError("view-conversion-dispatcher-incorrect-result",this);return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(e,t){let i=t.is("position")?t:pi._createAt(t,0);const o=new vi(i);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,i);e.modelRange instanceof vi&&(o.end=e.modelRange.end,i=e.modelCursor)}return{modelRange:o,modelCursor:i}}_safeInsert(e,t){const i=this._splitToAllowedParent(e,t);return!!i&&(this.conversionApi.writer.insert(e,i.position),!0)}_updateConversionResult(e,t){const i=this._getSplitParts(e),o=this.conversionApi.writer;t.modelRange||(t.modelRange=o.createRange(o.createPositionBefore(e),o.createPositionAfter(i[i.length-1])));const n=this._cursorParents.get(e);t.modelCursor=n?o.createPositionAt(n,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:i,writer:o}=this.conversionApi;let n=i.findAllowedParent(t,e);if(n){if(n===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(n)&&(n=null)}if(!n)return no(t,e,i)?{position:ro(t,o)}:null;const r=this.conversionApi.writer.split(t,n),s=[];for(const e of r.range.getWalker())if("elementEnd"==e.type)s.push(e.item);else{const t=s.pop(),i=e.item;this._registerSplitPair(t,i)}const a=r.range.end.parent;return this._cursorParents.set(e,a),{position:r.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const i=this._splitParts.get(e);this._splitParts.set(t,i),i.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class No{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class Do{constructor(e){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new Nt(e,{renderingMode:"data"}),this.htmlWriter=new No}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`${e}`);const t=this.domParser.parseFromString(e,"text/html"),i=t.createDocumentFragment(),o=t.body.childNodes;for(;o.length>0;)i.appendChild(o[0]);return i}}var Lo=i(8378);class Fo extends((0,x.EmitterMixin)()){constructor(e,t){super(),this.model=e,this.mapper=new yi,this.downcastDispatcher=new Ai({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const o=i.writer,n=i.mapper.toViewPosition(t.range.start),r=o.createText(t.item.data);o.insert(n,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,i)=>{i.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||i.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new zo({schema:e.schema}),this.viewDocument=new Ke(t),this.stylesProcessor=t,this.htmlProcessor=new Do(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new rt(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:i,consumable:o,writer:n})=>{let r=t.modelCursor;if(!o.test(t.viewItem))return;if(!i.checkChild(r,"$text")){if(!no(r,"$text",i))return;if(0==t.viewItem.data.trim().length)return;const e=r.nodeBefore;r=ro(r,n),e&&e.is("element","$marker")&&(n.move(n.createRangeOn(e),r),r=n.createPositionAfter(e))}o.consume(t.viewItem);const s=n.createText(t.viewItem.data);n.insert(s,r),t.modelRange=n.createRange(r,r.getShiftedBy(s.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:o}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=o}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,i)=>{if(!t.modelRange&&i.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:o}=i.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=o}}),{priority:"lowest"}),(0,x.ObservableMixin)().prototype.decorate.call(this,"init"),(0,x.ObservableMixin)().prototype.decorate.call(this,"set"),(0,x.ObservableMixin)().prototype.decorate.call(this,"get"),(0,x.ObservableMixin)().prototype.decorate.call(this,"toView"),(0,x.ObservableMixin)().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},oo)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:i="empty"}=e;if(!this._checkIfRootsExists([t]))throw new x.CKEditorError("datacontroller-get-non-existent-root",this);const o=this.model.document.getRoot(t);return o.isAttached()||(0,Lo.KE)("datacontroller-get-detached-root",this),"empty"!==i||this.model.hasContent(o,{ignoreWhitespaces:!0})?this.stringify(o,e):""}stringify(e,t={}){const i=this.toView(e,t);return this.processor.toData(i)}toView(e,t={}){const i=this.viewDocument,o=this._viewWriter;this.mapper.clearBindings();const n=vi._createIn(e),r=new nt(i);this.mapper.bindElements(e,r);const s=e.is("documentFragment")?e.markers:function(e){const t=[],i=e.root.document;if(!i)return new Map;const o=vi._createIn(e);for(const e of i.model.markers){const i=e.getRange(),n=i.isCollapsed,r=i.start.isEqual(o.start)||i.end.isEqual(o.end);if(n&&r)t.push([e.name,i]);else{const n=o.getIntersection(i);n&&t.push([e.name,n])}}return t.sort((([e,t],[i,o])=>{if("after"!==t.end.compareWith(o.start))return 1;if("before"!==t.start.compareWith(o.end))return-1;switch(t.start.compareWith(o.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(o.end)){case"before":return 1;case"after":return-1;default:return i.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(n,s,o,t),r}init(e){if(this.model.document.version)throw new x.CKEditorError("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new x.CKEditorError("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const i of Object.keys(t)){const o=this.model.document.getRoot(i);e.insert(this.parse(t[i],o),o,0)}})),Promise.resolve()}set(e,t={}){let i={};if("string"==typeof e?i.main=e:i=e,!this._checkIfRootsExists(Object.keys(i)))throw new x.CKEditorError("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(i)){const o=this.model.document.getRoot(t);e.remove(e.createRangeIn(o)),e.insert(this.parse(i[t],o),o,0)}}))}parse(e,t="$root"){const i=this.processor.toView(e);return this.toModel(i,t)}toModel(e,t="$root"){return this.model.change((i=>this.upcastDispatcher.convert(e,i,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class Ho{constructor(e,t){this._helpers=new Map,this._downcast=(0,x.toArray)(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=(0,x.toArray)(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const i=this._downcast.includes(t);if(!this._upcast.includes(t)&&!i)throw new x.CKEditorError("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:i})}for(e){if(!this._helpers.has(e))throw new x.CKEditorError("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:i}of Wo(e))this.for("upcast").elementToElement({model:t,view:i,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:i}of Wo(e))this.for("upcast").elementToAttribute({view:i,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:i}of Wo(e))this.for("upcast").attributeToAttribute({view:i,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:i}){if(this._helpers.has(e))throw new x.CKEditorError("conversion-group-exists",this);const o=i?new Ui(t):new so(t);this._helpers.set(e,o)}}function*Wo(e){if(e.model.values)for(const t of e.model.values){const i={key:e.model.key,value:t},o=e.view[t],n=e.upcastAlso?e.upcastAlso[t]:void 0;yield*Zo(i,o,n)}else yield*Zo(e.model,e.view,e.upcastAlso)}function*Zo(e,t,i){if(yield{model:e,view:t},i)for(const t of(0,x.toArray)(i))yield{model:e,view:t}}class Uo{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function jo(e,t){const i=Ko(t),o=i.reduce(((e,t)=>e+t.offsetSize),0),n=e.parent;Jo(e);const r=e.index;return n._insertChild(r,i),Go(n,r+i.length),Go(n,r),new vi(e,e.getShiftedBy(o))}function $o(e){if(!e.isFlat)throw new x.CKEditorError("operation-utils-remove-range-not-flat",this);const t=e.start.parent;Jo(e.start),Jo(e.end);const i=t._removeChildren(e.start.index,e.end.index-e.start.index);return Go(t,e.start.index),i}function qo(e,t){if(!e.isFlat)throw new x.CKEditorError("operation-utils-move-range-not-flat",this);const i=$o(e);return jo(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),i)}function Ko(e){const t=[];!function e(i){if("string"==typeof i)t.push(new di(i));else if(i instanceof ui)t.push(new di(i.data,i.getAttributes()));else if(i instanceof li)t.push(i);else if((0,x.isIterable)(i))for(const t of i)e(t)}(e);for(let e=1;ee.maxOffset)throw new x.CKEditorError("move-operation-nodes-do-not-exist",this);if(e===t&&i=i&&this.targetPosition.path[e]e._clone(!0)))),t=new Xo(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new pi(e,[0]);return new Qo(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0)))),jo(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const i=[];for(const t of e.nodes)t.name?i.push(hi.fromJSON(t)):i.push(di.fromJSON(t));const o=new Xo(pi.fromJSON(e.position,t),i,e.baseVersion);return o.shouldReceiveAttributes=e.shouldReceiveAttributes,o}}class en extends Uo{constructor(e,t,i,o,n){super(n),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=i,this.graveyardPosition=o?o.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new pi(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new vi(this.splitPosition,e)}clone(){return new en(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new pi(e,[0]);return new tn(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const o=e.range.getDifference(t.range).map((t=>new rn(t,e.key,e.oldValue,e.newValue,0))),n=e.range.getIntersection(t.range);return n&&i.aIsStrong&&o.push(new rn(n,t.key,t.newValue,e.newValue,0)),0==o.length?[new sn(0)]:o}return[e]})),mn(rn,Xo,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const i=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new rn(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const o=_n(t,e.key,e.oldValue);o&&i.unshift(o)}return i}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),mn(rn,tn,((e,t)=>{const i=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&i.push(vi._createFromPositionAndShift(t.graveyardPosition,1));const o=e.range._getTransformedByMergeOperation(t);return o.isCollapsed||i.push(o),i.map((t=>new rn(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),mn(rn,Qo,((e,t)=>function(e,t){const i=vi._createFromPositionAndShift(t.sourcePosition,t.howMany);let o=null,n=[];i.containsRange(e,!0)?o=e:e.start.hasSameParentAs(i.start)?(n=e.getDifference(i),o=e.getIntersection(i)):n=[e];const r=[];for(let e of n){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const i=t.getMovedRangeStart(),o=e.start.hasSameParentAs(i),n=e._getTransformedByInsertion(i,t.howMany,o);r.push(...n)}return o&&r.push(o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]),r}(e.range,t).map((t=>new rn(t,e.key,e.oldValue,e.newValue,e.baseVersion))))),mn(rn,en,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const i=e.clone();return i.range=new vi(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,i]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),mn(Xo,rn,((e,t)=>{const i=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const o=_n(e,t.key,t.newValue);o&&i.push(o)}return i})),mn(Xo,Xo,((e,t,i)=>(e.position.isEqual(t.position)&&i.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),mn(Xo,Qo,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),mn(Xo,en,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),mn(Xo,tn,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),mn(on,Xo,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),mn(on,on,((e,t,i)=>{if(e.name==t.name){if(!i.aIsStrong)return[new sn(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),mn(on,tn,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),mn(on,Qo,((e,t,i)=>{if(e.oldRange&&(e.oldRange=vi._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(i.abRelation){const o=vi._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=o.end,e.newRange.start.path=i.abRelation.path,[e];if("right"==i.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=o.start,e.newRange.end.path=i.abRelation.path,[e]}e.newRange=vi._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),mn(on,en,((e,t,i)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(i.abRelation){const o=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&i.abRelation.wasStartBeforeMergedElement?e.newRange.start=pi._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!i.abRelation.wasInLeftElement&&(e.newRange.start=pi._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasInRightElement?e.newRange.end=pi._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&i.abRelation.wasEndBeforeMergedElement?e.newRange.end=pi._createAt(t.insertionPosition):e.newRange.end=o.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),mn(tn,Xo,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),mn(tn,tn,((e,t,i)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(i.bWasUndone){const i=t.graveyardPosition.path.slice();return i.push(0),e.sourcePosition=new pi(t.graveyardPosition.root,i),e.howMany=0,[e]}return[new sn(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!i.bWasUndone&&"splitAtSource"!=i.abRelation){const o="$graveyard"==e.targetPosition.root.rootName,n="$graveyard"==t.targetPosition.root.rootName;if(n&&!o||(!o||n)&&i.aIsStrong){const i=t.targetPosition._getTransformedByMergeOperation(t),o=e.targetPosition._getTransformedByMergeOperation(t);return[new Qo(i,e.howMany,o,0)]}return[new sn(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&i.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),mn(tn,Qo,((e,t,i)=>{const o=vi._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!i.bWasUndone&&!i.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.sourcePosition)?[new sn(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),mn(tn,en,((e,t,i)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const o=0!=t.howMany,n=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(o||n||"mergeTargetNotMoved"==i.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==i.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==i.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),mn(Qo,Xo,((e,t)=>{const i=vi._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),mn(Qo,Qo,((e,t,i)=>{const o=vi._createFromPositionAndShift(e.sourcePosition,e.howMany),n=vi._createFromPositionAndShift(t.sourcePosition,t.howMany);let r,s=i.aIsStrong,a=!i.aIsStrong;if("insertBefore"==i.abRelation||"insertAfter"==i.baRelation?a=!0:"insertAfter"!=i.abRelation&&"insertBefore"!=i.baRelation||(a=!1),r=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),vn(e,t)&&vn(t,e))return[t.getReversed()];if(o.containsPosition(t.targetPosition)&&o.containsRange(n,!0))return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),yn([o],r);if(n.containsPosition(e.targetPosition)&&n.containsRange(o,!0))return o.start=o.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.end=o.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),yn([o],r);const l=(0,x.compareArrays)(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),yn([o],r);"remove"!=e.type||"remove"==t.type||i.aWasUndone||i.forceWeakRemove?"remove"==e.type||"remove"!=t.type||i.bWasUndone||i.forceWeakRemove||(s=!1):s=!0;const c=[],d=o.getDifference(n);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const i="same"==(0,x.compareArrays)(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),o=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,i);c.push(...o)}const u=o.getIntersection(n);return null!==u&&s&&(u.start=u.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),u.end=u.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(u):1==c.length?n.start.isBefore(o.start)||n.start.isEqual(o.start)?c.unshift(u):c.push(u):c.splice(1,0,u)),0===c.length?[new sn(e.baseVersion)]:yn(c,r)})),mn(Qo,en,((e,t,i)=>{let o=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=i.abRelation||(o=e.targetPosition._getTransformedBySplitOperation(t));const n=vi._createFromPositionAndShift(e.sourcePosition,e.howMany);if(n.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=o,[e];if(n.start.hasSameParentAs(t.splitPosition)&&n.containsPosition(t.splitPosition)){let e=new vi(t.splitPosition,n.end);return e=e._getTransformedBySplitOperation(t),yn([new vi(n.start,t.splitPosition),e],o)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==i.abRelation&&(o=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==i.abRelation&&(o=e.targetPosition);const r=[n._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const o=n.start.isEqual(t.graveyardPosition)||n.containsPosition(t.graveyardPosition);e.howMany>1&&o&&!i.aWasUndone&&r.push(vi._createFromPositionAndShift(t.insertionPosition,1))}return yn(r,o)})),mn(Qo,tn,((e,t,i)=>{const o=vi._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.sourcePosition))if("remove"!=e.type||i.forceWeakRemove){if(1==e.howMany)return i.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new sn(0)]}else if(!i.aWasUndone){const i=[];let o=t.graveyardPosition.clone(),n=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(i.push(new Qo(e.sourcePosition,e.howMany-1,e.targetPosition,0)),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),n=n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const r=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),s=new Qo(o,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const l=new pi(s.targetPosition.root,a);n=n._getTransformedByMove(o,r,1);const c=new Qo(n,t.howMany,l,0);return i.push(s),i.push(c),i}const n=vi._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=n.start,e.howMany=n.end.offset-n.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),mn(an,Xo,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),mn(an,tn,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),mn(an,Qo,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),mn(an,an,((e,t,i)=>{if(e.position.isEqual(t.position)){if(!i.aIsStrong)return[new sn(0)];e.oldName=t.newName}return[e]})),mn(an,en,((e,t)=>{const i=e.position.path,o=t.splitPosition.getParentPath();if("same"==(0,x.compareArrays)(i,o)&&!t.graveyardPosition){const t=new an(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),mn(ln,ln,((e,t,i)=>{if(e.root===t.root&&e.key===t.key){if(!i.aIsStrong||e.newValue===t.newValue)return[new sn(0)];e.oldValue=t.newValue}return[e]})),mn(cn,cn,((e,t,i)=>e.rootName!==t.rootName||e.isAdd!==t.isAdd||i.bWasUndone?[e]:[new sn(0)])),mn(en,Xo,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!i.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const i=t.graveyardPosition.path.slice();i.push(0);const o=new pi(t.graveyardPosition.root,i),n=en.getInsertionPosition(new pi(t.graveyardPosition.root,i)),r=new en(o,0,n,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=en.getInsertionPosition(e.splitPosition),e.graveyardPosition=r.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[r,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=en.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),mn(en,Qo,((e,t,i)=>{const o=vi._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const n=o.start.isEqual(e.graveyardPosition)||o.containsPosition(e.graveyardPosition);if(!i.bWasUndone&&n){const i=e.splitPosition._getTransformedByMoveOperation(t),o=e.graveyardPosition._getTransformedByMoveOperation(t),n=o.path.slice();n.push(0);const r=new pi(o.root,n);return[new Qo(i,e.howMany,r,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const n=e.splitPosition.isEqual(t.targetPosition);if(n&&("insertAtSource"==i.baRelation||"splitBefore"==i.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=en.getInsertionPosition(e.splitPosition),[e];if(n&&i.abRelation&&i.abRelation.howMany){const{howMany:t,offset:o}=i.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(o),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.splitPosition)){const i=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=i,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new sn(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new sn(0)];if("splitBefore"==i.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const o="$graveyard"==e.splitPosition.root.rootName,n="$graveyard"==t.splitPosition.root.rootName;if(n&&!o||(!o||n)&&i.aIsStrong){const i=[];return t.howMany&&i.push(new Qo(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&i.push(new Qo(e.splitPosition,e.howMany,e.moveTargetPosition,0)),i}return[new sn(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==i.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==i.baRelation){const i=t.insertionPosition.path.slice();i.push(0);const o=new pi(t.insertionPosition.root,i);return[e,new Qo(e.insertionPosition,1,o,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset{const i=t[0];i.isDocumentOperation&&An.call(this,i)}),{priority:"low"})}function An(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}Cn.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class En{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},(0,x.logWarning)("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:i=!0,isUndo:o=!1,isTyping:n=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=i,this.isUndo=o,this.isTyping=n}get type(){return(0,x.logWarning)("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class Tn{constructor(e){this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),i=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),i||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=vi._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const i=t.graveyardPosition.parent;this._markInsert(i,t.graveyardPosition.offset,1);const o=t.targetPosition.parent;this._isInInsertedElement(o)||this._markInsert(o,t.targetPosition.offset,e.maxOffset);break}case"detachRoot":case"addRoot":this._bufferRootStateChange(t.rootName,t.isAdd);break;case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,i){const o=this._changedMarkers.get(e);o?(o.newMarkerData=i,null==o.oldMarkerData.range&&null==i.range&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{newMarkerData:i,oldMarkerData:t})}getMarkersToRemove(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.oldMarkerData.range&&e.push({name:t,range:i.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,i]of this._changedMarkers)null!=i.newMarkerData.range&&e.push({name:t,range:i.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const i=e.range&&!t.range,o=!e.range&&t.range,n=e.range&&t.range&&!e.range.isEqual(t.range);if(i||o||n)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const i=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamee));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(In),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t={...e};return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const i=this._changedRoots.get(e);void 0!==i.state?(delete i.state,void 0===i.attributes&&this._changedRoots.delete(e)):i.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,i,o){const n=this._changedRoots.get(e)||{name:e},r=n.attributes||{};if(r[t]){const e=r[t];o===e.oldValue?delete r[t]:e.newValue=o}else r[t]={oldValue:i,newValue:o};0===Object.entries(r).length?(delete n.attributes,void 0===n.state&&this._changedRoots.delete(e)):(n.attributes=r,this._changedRoots.set(e,n))}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=vi._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_markInsert(e,t,i){const o={type:"insert",offset:t,howMany:i,count:this._changeCount++};this._markChange(e,o)}_markRemove(e,t,i){const o={type:"remove",offset:t,howMany:i,count:this._changeCount++};this._markChange(e,o),this._removeAllNestedChanges(e,t,i)}_markAttribute(e){const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const i=this._getChangesForElement(e);this._handleChange(t,i),i.push(t);for(let e=0;ei.offset){if(o>n){const e={type:"attribute",offset:n,howMany:o-n,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=i.offset&&e.offsetn?(e.nodesToHandle=o-n,e.offset=n):e.nodesToHandle=0);if("remove"==i.type&&e.offseti.offset){const n={type:"attribute",offset:i.offset,howMany:o-i.offset,count:this._changeCount++};this._handleChange(n,t),t.push(n),e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==i.type&&(e.offset>=i.offset&&o<=n?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=i.offset&&o>=n&&(i.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,i){return{type:"insert",position:pi._createAt(e,t),name:i.name,attributes:new Map(i.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,i){return{type:"remove",position:pi._createAt(e,t),name:i.name,attributes:new Map(i.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,i){const o=[];i=new Map(i);for(const[n,r]of t){const t=i.has(n)?i.get(n):null;t!==r&&o.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:n,attributeOldValue:r,attributeNewValue:t,changeCount:this._changeCount++}),i.delete(n)}for(const[t,n]of i)o.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:n,changeCount:this._changeCount++});return o}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const i=this._changesInElement.get(t),o=e.startOffset;if(i)for(const e of i)if("insert"==e.type&&o>=e.offset&&oo){for(let t=0;tthis._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new x.CKEditorError("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const i=this._operations[0];void 0===e&&(e=i.baseVersion);let o=t-1;for(const[t,i]of this._gaps)e>t&&et&&othis.lastOperation.baseVersion)return[];let n=this._baseVersionToOperationIndex.get(e);void 0===n&&(n=0);let r=this._baseVersionToOperationIndex.get(o);return void 0===r&&(r=this._operations.length-1),this._operations.slice(n,r+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class Rn extends hi{constructor(e,t,i="main"){super(t),this._isAttached=!0,this._document=e,this.rootName=i}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}Rn.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};const On="$graveyard";class Bn extends((0,x.EmitterMixin)()){constructor(e){super(),this.model=e,this.history=new Vn,this.selection=new Li(this),this.roots=new x.Collection({idProperty:"rootName"}),this.differ=new Tn(e.markers),this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",On),this.listenTo(e,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&this.differ.bufferOperation(i)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const i=t[0];i.isDocumentOperation&&this.history.addOperation(i)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,i,o,n)=>{const r={...t.getData(),range:o};this.differ.bufferMarkerChange(t.name,n,r),null===i&&t.on("change",((e,i)=>{const o=t.getData();this.differ.bufferMarkerChange(t.name,{...o,range:i},o)}))})),this.registerPostFixer((e=>{let t=!1;for(const i of this.roots)i.isAttached()||i.isEmpty||(e.remove(e.createRangeIn(i)),t=!0);for(const i of this.model.markers)i.getRange().root.isAttached()||(e.removeMarker(i),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(On)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new x.CKEditorError("model-document-createroot-name-exists",this,{name:t});const i=new Rn(this,e,t);return this.roots.add(i),i}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return Array.from(this.roots).filter((t=>t.rootName!=On&&(e||t.isAttached()))).map((e=>e.rootName))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=T(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,i=t.schema,o=t.createPositionFromPath(e,[0]);return i.getNearestSelectionRange(o)||t.createRange(o)}_validateSelectionRange(e){return Mn(e.start)&&Mn(e.end)}_callPostFixers(e){let t=!1;do{for(const i of this._postFixers)if(this.selection.refresh(),t=i(e),t)break}while(t)}}function Mn(e){const t=e.textNode;if(t){const i=t.data,o=e.offset-t.startOffset;return!(0,x.isInsideSurrogatePair)(i,o)&&!(0,x.isInsideCombinedSymbol)(i,o)}return!0}class zn extends((0,x.EmitterMixin)()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof Nn?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,i=!1,o=!1){const n=e instanceof Nn?e.name:e;if(n.includes(","))throw new x.CKEditorError("markercollection-incorrect-marker-name",this);const r=this._markers.get(n);if(r){const e=r.getData(),s=r.getRange();let a=!1;return s.isEqual(t)||(r._attachLiveRange(Mi.fromRange(t)),a=!0),i!=r.managedUsingOperations&&(r._managedUsingOperations=i,a=!0),"boolean"==typeof o&&o!=r.affectsData&&(r._affectsData=o,a=!0),a&&this.fire(`update:${n}`,r,s,t,e),r}const s=Mi.fromRange(t),a=new Nn(n,s,i,o);return this._markers.set(n,a),this.fire(`update:${n}`,a,null,t,{...a.getData(),range:null}),a}_remove(e){const t=e instanceof Nn?e.name:e,i=this._markers.get(t);return!!i&&(this._markers.delete(t),this.fire(`update:${t}`,i,i.getRange(),null,i.getData()),this._destroyMarker(i),!0)}_refresh(e){const t=e instanceof Nn?e.name:e,i=this._markers.get(t);if(!i)throw new x.CKEditorError("markercollection-refresh-marker-not-exists",this);const o=i.getRange();this.fire(`update:${t}`,i,o,o,i.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class Nn extends((0,x.EmitterMixin)(ai)){constructor(e,t,i,o){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=i,this._affectsData=o}get managedUsingOperations(){if(!this._liveRange)throw new x.CKEditorError("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new x.CKEditorError("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new x.CKEditorError("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new x.CKEditorError("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new x.CKEditorError("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Nn.prototype.is=function(e){return"marker"===e||"model:marker"===e};class Dn extends Uo{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new x.CKEditorError("detach-operation-on-document-node",this)}_execute(){$o(vi._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Ln extends ai{constructor(e){super(),this.markers=new Map,this._children=new ci,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const i of e)t=t.getChild(t.offsetToIndex(i));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const i of e)i.name?t.push(hi.fromJSON(i)):t.push(di.fromJSON(i));return new Ln(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const i=function(e){return"string"==typeof e?[new di(e)]:((0,x.isIterable)(e)||(e=[e]),Array.from(e).map((e=>"string"==typeof e?new di(e):e instanceof ui?new di(e.data,e.getAttributes()):e)))}(t);for(const e of i)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,t=1){const i=this._children._removeNodes(e,t);for(const e of i)e.parent=null;return i}}Ln.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class Fn{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new di(e,t)}createElement(e,t){return new hi(e,t)}createDocumentFragment(){return new Ln}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,i=0){if(this._assertWriterUsedCorrectly(),e instanceof di&&""==e.data)return;const o=pi._createAt(t,i);if(e.parent){if(jn(e.root,o.root))return void this.move(vi._createOn(e),o);if(e.root.document)throw new x.CKEditorError("model-writer-insert-forbidden-move",this);this.remove(e)}const n=o.root.document?o.root.document.version:null,r=new Xo(o,e,n);if(e instanceof di&&(r.shouldReceiveAttributes=!0),this.batch.addOperation(r),this.model.applyOperation(r),e instanceof Ln)for(const[t,i]of e.markers){const e=pi._createAt(i.root,0),n={range:new vi(i.start._getCombined(e,o),i.end._getCombined(e,o)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,n):this.addMarker(t,n)}}insertText(e,t,i,o){t instanceof Ln||t instanceof hi||t instanceof pi?this.insert(this.createText(e),t,i):this.insert(this.createText(e,t),i,o)}insertElement(e,t,i,o){t instanceof Ln||t instanceof hi||t instanceof pi?this.insert(this.createElement(e),t,i):this.insert(this.createElement(e,t),i,o)}append(e,t){this.insert(e,t,"end")}appendText(e,t,i){t instanceof Ln||t instanceof hi?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),i,"end")}appendElement(e,t,i){t instanceof Ln||t instanceof hi?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),i,"end")}setAttribute(e,t,i){if(this._assertWriterUsedCorrectly(),i instanceof vi){const o=i.getMinimalFlatRanges();for(const i of o)Hn(this,e,t,i)}else Wn(this,e,t,i)}setAttributes(e,t){for(const[i,o]of(0,x.toMap)(e))this.setAttribute(i,o,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof vi){const i=t.getMinimalFlatRanges();for(const t of i)Hn(this,e,null,t)}else Wn(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof vi)for(const i of e.getItems())t(i);else t(e)}move(e,t,i){if(this._assertWriterUsedCorrectly(),!(e instanceof vi))throw new x.CKEditorError("writer-move-invalid-range",this);if(!e.isFlat)throw new x.CKEditorError("writer-move-range-not-flat",this);const o=pi._createAt(t,i);if(o.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!jn(e.root,o.root))throw new x.CKEditorError("writer-move-different-document",this);const n=e.root.document?e.root.document.version:null,r=new Qo(e.start,e.end.offset-e.start.offset,o,n);this.batch.addOperation(r),this.model.applyOperation(r)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof vi?e:vi._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),Un(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,i=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof hi))throw new x.CKEditorError("writer-merge-no-element-before",this);if(!(i instanceof hi))throw new x.CKEditorError("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,i){return this.model.createPositionFromPath(e,t,i)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,i=e.nodeAfter;this.move(vi._createIn(i),pi._createAt(t,"end")),this.remove(i)}_merge(e){const t=pi._createAt(e.nodeBefore,"end"),i=pi._createAt(e.nodeAfter,0),o=e.root.document.graveyard,n=new pi(o,[0]),r=e.root.document.version,s=new tn(i,e.nodeAfter.maxOffset,t,n,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof hi))throw new x.CKEditorError("writer-rename-not-element-instance",this);const i=e.root.document?e.root.document.version:null,o=new an(pi._createBefore(e),e.name,t,i);this.batch.addOperation(o),this.model.applyOperation(o)}split(e,t){this._assertWriterUsedCorrectly();let i,o,n=e.parent;if(!n.parent)throw new x.CKEditorError("writer-split-element-no-parent",this);if(t||(t=n.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new x.CKEditorError("writer-split-invalid-limit-element",this);do{const t=n.root.document?n.root.document.version:null,r=n.maxOffset-e.offset,s=en.getInsertionPosition(e),a=new en(e,r,s,null,t);this.batch.addOperation(a),this.model.applyOperation(a),i||o||(i=n,o=e.parent.nextSibling),n=(e=this.createPositionAfter(e.parent)).parent}while(n!==t);return{position:e,range:new vi(pi._createAt(i,"end"),pi._createAt(o,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new x.CKEditorError("writer-wrap-range-not-flat",this);const i=t instanceof hi?t:new hi(t);if(i.childCount>0)throw new x.CKEditorError("writer-wrap-element-not-empty",this);if(null!==i.parent)throw new x.CKEditorError("writer-wrap-element-attached",this);this.insert(i,e.start);const o=new vi(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(o,pi._createAt(i,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new x.CKEditorError("writer-unwrap-element-no-parent",this);this.move(vi._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new x.CKEditorError("writer-addmarker-no-usingoperation",this);const i=t.usingOperation,o=t.range,n=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new x.CKEditorError("writer-addmarker-marker-exists",this);if(!o)throw new x.CKEditorError("writer-addmarker-no-range",this);return i?(Zn(this,e,null,o,n),this.model.markers.get(e)):this.model.markers._set(e,o,i,n)}updateMarker(e,t){this._assertWriterUsedCorrectly();const i="string"==typeof e?e:e.name,o=this.model.markers.get(i);if(!o)throw new x.CKEditorError("writer-updatemarker-marker-not-exists",this);if(!t)return(0,x.logWarning)("writer-updatemarker-reconvert-using-editingcontroller",{markerName:i}),void this.model.markers._refresh(o);const n="boolean"==typeof t.usingOperation,r="boolean"==typeof t.affectsData,s=r?t.affectsData:o.affectsData;if(!n&&!t.range&&!r)throw new x.CKEditorError("writer-updatemarker-wrong-options",this);const a=o.getRange(),l=t.range?t.range:a;n&&t.usingOperation!==o.managedUsingOperations?t.usingOperation?Zn(this,i,null,l,s):(Zn(this,i,a,null,s),this.model.markers._set(i,l,void 0,s)):o.managedUsingOperations?Zn(this,i,a,l,s):this.model.markers._set(i,l,void 0,s)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new x.CKEditorError("writer-removemarker-no-marker",this);const i=this.model.markers.get(t);i.managedUsingOperations?Zn(this,t,i.getRange(),null,i.affectsData):this.model.markers._remove(t)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const i=this.model.document.getRoot(e);if(i&&i.isAttached())throw new x.CKEditorError("writer-addroot-root-exists",this);const o=this.model.document,n=new cn(e,t,!0,o,o.version);return this.batch.addOperation(n),this.model.applyOperation(n),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new x.CKEditorError("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const i=this.model.document,o=new cn(t.rootName,t.name,!1,i,i.version);this.batch.addOperation(o),this.model.applyOperation(o)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,i]of(0,x.toMap)(e))this._setSelectionAttribute(t,i)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const o=Li._getStoreAttributeKey(e);this.setAttribute(o,t,i.anchor.parent)}i._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const i=Li._getStoreAttributeKey(e);this.removeAttribute(i,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new x.CKEditorError("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const i of this.model.markers){if(!i.managedUsingOperations)continue;const o=i.getRange();let n=!1;if("move"===e){const e=t;n=e.containsPosition(o.start)||e.start.isEqual(o.start)||e.containsPosition(o.end)||e.end.isEqual(o.end)}else{const e=t,i=e.nodeBefore,r=e.nodeAfter,s=o.start.parent==i&&o.start.isAtEnd,a=o.end.parent==r&&0==o.end.offset,l=o.end.nodeAfter==r,c=o.start.nodeAfter==r;n=s||a||l||c}n&&this.updateMarker(i.name,{range:o})}}}function Hn(e,t,i,o){const n=e.model,r=n.document;let s,a,l,c=o.start;for(const e of o.getWalker({shallow:!0}))l=e.item.getAttribute(t),s&&a!=l&&(a!=i&&d(),c=s),s=e.nextPosition,a=l;function d(){const o=new vi(c,s),l=o.root.document?r.version:null,d=new rn(o,t,a,i,l);e.batch.addOperation(d),n.applyOperation(d)}s instanceof pi&&s!=c&&a!=i&&d()}function Wn(e,t,i,o){const n=e.model,r=n.document,s=o.getAttribute(t);let a,l;if(s!=i){if(o.root===o){const e=o.document?r.version:null;l=new ln(o,t,s,i,e)}else{a=new vi(pi._createBefore(o),e.createPositionAfter(o));const n=a.root.document?r.version:null;l=new rn(a,t,s,i,n)}e.batch.addOperation(l),n.applyOperation(l)}}function Zn(e,t,i,o,n){const r=e.model,s=r.document,a=new on(t,i,o,r.markers,!!n,s.version);e.batch.addOperation(a),r.applyOperation(a)}function Un(e,t,i,o){let n;if(e.root.document){const i=o.document,r=new pi(i.graveyard,[0]);n=new Qo(e,t,r,i.version)}else n=new Dn(e,t);i.addOperation(n),o.applyOperation(n)}function jn(e,t){return e===t||e instanceof Rn&&t instanceof Rn}function $n(e,t,i={}){if(t.isCollapsed)return;const o=t.getFirstRange();if("$graveyard"==o.root.rootName)return;const n=e.schema;e.change((e=>{if(!i.doNotResetEntireContent&&function(e,t){const i=e.getLimitElement(t);if(!t.containsEntireContent(i))return!1;const o=t.getFirstRange();return o.start.parent!=o.end.parent&&e.checkChild(i,"paragraph")}(n,t))return void function(e,t){const i=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(i)),Jn(e,e.createPositionAt(i,0),t)}(e,t);const r={};if(!i.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(r,n.getAttributesWithProperty(e,"copyOnReplace",!0))}const[s,a]=function(e){const t=e.root.document.model,i=e.start;let o=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const i=function(e){const t=e.parent,i=t.root.document.model.schema,o=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of o){if(i.isLimit(e))return null;if(i.isBlock(e))return e}}(o);if(i&&o.isTouching(t.createPositionAt(i,0))){const i=t.createSelection(e);t.modifySelection(i,{direction:"backward"});const n=i.getLastPosition(),r=t.createRange(n,o);t.hasContent(r,{ignoreMarkers:!0})||(o=n)}}return[Cn.fromPosition(i,"toPrevious"),Cn.fromPosition(o,"toNext")]}(o);s.isTouching(a)||e.remove(e.createRange(s,a)),i.leaveUnmerged||(function(e,t,i){const o=e.model;if(!Gn(e.model.schema,t,i))return;const[n,r]=function(e,t){const i=e.getAncestors(),o=t.getAncestors();let n=0;for(;i[n]&&i[n]==o[n];)n++;return[i[n],o[n]]}(t,i);n&&r&&(!o.hasContent(n,{ignoreMarkers:!0})&&o.hasContent(r,{ignoreMarkers:!0})?Kn(e,t,i,n.parent):qn(e,t,i,n.parent))}(e,s,a),n.removeDisallowedAttributes(s.parent.getChildren(),e)),Yn(e,t,s),!i.doNotAutoparagraph&&function(e,t){const i=e.checkChild(t,"$text"),o=e.checkChild(t,"paragraph");return!i&&o}(n,s)&&Jn(e,s,t,r),s.detach(),a.detach()}))}function qn(e,t,i,o){const n=t.parent,r=i.parent;if(n!=o&&r!=o){for(t=e.createPositionAfter(n),(i=e.createPositionBefore(r)).isEqual(t)||e.insert(r,t),e.merge(t);i.parent.isEmpty;){const t=i.parent;i=e.createPositionBefore(t),e.remove(t)}Gn(e.model.schema,t,i)&&qn(e,t,i,o)}}function Kn(e,t,i,o){const n=t.parent,r=i.parent;if(n!=o&&r!=o){for(t=e.createPositionAfter(n),(i=e.createPositionBefore(r)).isEqual(t)||e.insert(n,i);t.parent.isEmpty;){const i=t.parent;t=e.createPositionBefore(i),e.remove(i)}i=e.createPositionBefore(r),function(e,t){const i=t.nodeBefore,o=t.nodeAfter;i.name!=o.name&&e.rename(i,o.name),e.clearAttributes(i),e.setAttributes(Object.fromEntries(o.getAttributes()),i),e.merge(t)}(e,i),Gn(e.model.schema,t,i)&&Kn(e,t,i,o)}}function Gn(e,t,i){const o=t.parent,n=i.parent;return o!=n&&!e.isLimit(o)&&!e.isLimit(n)&&function(e,t,i){const o=new vi(e,t);for(const e of o.getWalker())if(i.isLimit(e.item))return!1;return!0}(t,i,e)}function Jn(e,t,i,o={}){const n=e.createElement("paragraph");e.model.schema.setAllowedAttributes(n,o,e),e.insert(n,t),Yn(e,i,e.createPositionAt(n,0))}function Yn(e,t,i){t instanceof Li?e.setSelection(i):t.setTo(i)}function Qn(e,t){const i=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{i.push(e.start.parent),t.remove(e)})),i.forEach((e=>{let i=e;for(;i.parent&&i.isEmpty;){const e=t.createRangeOn(i);i=i.parent,t.remove(e)}}))}class Xn{constructor(e,t,i){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=e,this.writer=t,this.position=i,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),i=this.writer.createPositionAfter(e);if(i.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new x.CKEditorError("insertcontent-invalid-insertion-position",this);this.position=i,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?vi._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new vi(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=Cn.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new x.CKEditorError("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=Cn.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Cn.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof hi))return;if(!this._canMergeLeft(e))return;const t=Cn._createBefore(e);t.stickiness="toNext";const i=Cn.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=Cn._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=Cn._createAt(t.nodeBefore,"end","toNext")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof hi))return;if(!this._canMergeRight(e))return;const t=Cn._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new x.CKEditorError("insertcontent-invalid-insertion-position",this);this.position=pi._createAt(t.nodeBefore,"end");const i=Cn.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=Cn._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=Cn._createAt(t.nodeBefore,0,"toPrevious")),this.position=i.toPosition(),i.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof hi&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof hi&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function er(e,t,i="auto"){const o=e.getSelectedElement();if(o&&t.schema.isObject(o)&&!t.schema.isInline(o))return"before"==i||"after"==i?t.createRange(t.createPositionAt(o,i)):t.createRangeOn(o);const n=(0,x.first)(e.getSelectedBlocks());if(!n)return t.createRange(e.focus);if(n.isEmpty)return t.createRange(t.createPositionAt(n,0));const r=t.createPositionAfter(n);return e.focus.isTouching(r)?t.createRange(r):t.createRange(t.createPositionBefore(n))}const tr=' ,.?!:;"-()';function ir(e,t){const{isForward:i,walker:o,unit:n,schema:r,treatEmojiAsSingleUnit:s}=e,{type:a,item:l,nextPosition:c}=t;if("text"==a)return"word"===e.unit?function(e,t){let i=e.position.textNode;for(i||(i=t?e.position.nodeAfter:e.position.nodeBefore);i&&i.is("$text");){const o=e.position.offset-i.startOffset;if(rr(i,o,t))i=t?e.position.nodeAfter:e.position.nodeBefore;else{if(nr(i.data,o,t))break;e.next()}}return e.position}(o,i):function(e,t,i){const o=e.position.textNode;if(o){const n=o.data;let r=e.position.offset-o.startOffset;for(;(0,x.isInsideSurrogatePair)(n,r)||"character"==t&&(0,x.isInsideCombinedSymbol)(n,r)||i&&(0,x.isInsideEmojiSequence)(n,r);)e.next(),r=e.position.offset-o.startOffset}return e.position}(o,n,s);if(a==(i?"elementStart":"elementEnd")){if(r.isSelectable(l))return pi._createAt(l,i?"after":"before");if(r.checkChild(c,"$text"))return c}else{if(r.isLimit(l))return void o.skip((()=>!0));if(r.checkChild(c,"$text"))return c}}function or(e,t){const i=e.root,o=pi._createAt(i,t?"end":0);return t?new vi(e,o):new vi(o,e)}function nr(e,t,i){const o=t+(i?0:-1);return tr.includes(e.charAt(o))}function rr(e,t,i){return t===(i?e.offsetSize:0)}class sr extends((0,x.ObservableMixin)()){constructor(){var e;super(),this.markers=new zn,this.document=new Bn(this),this.schema=new vo,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),(e=this).document.registerPostFixer((t=>function(e,t){const i=t.document.selection,o=t.schema,n=[];let r=!1;for(const e of i.getRanges()){const t=go(e,o);t&&!t.isEqual(e)?(n.push(t),r=!0):n.push(e)}return r&&e.setSelection(function(e){const t=[...e],i=new Set;let o=1;for(;o!i.has(t)))}(n),{backward:i.isBackward}),!1}(t,e))),this.document.registerPostFixer(oo),this.on("insertContent",((e,[t,i])=>{e.return=function(e,t,i){return e.change((o=>{const n=i||e.document.selection;n.isCollapsed||e.deleteContent(n,{doNotAutoparagraph:!0});const r=new Xn(e,o,n.anchor),s=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[i,o]of t.markers){const{start:t,end:n}=o,r=t.isEqual(n);e.push({position:t,name:i,isCollapsed:r},{position:n,name:i,isCollapsed:r})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:i,name:n,isCollapsed:r}of e){let e=null,a=null;const l=i.parent===t&&i.isAtStart,c=i.parent===t&&i.isAtEnd;l||c?r&&(a=l?"start":"end"):(e=o.createElement("$marker"),o.insert(e,i)),s.push({name:n,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];r.handleNodes(a);let l=r.getSelectionRange();if(t.is("documentFragment")&&s.length){const e=l?Mi.fromRange(l):null,t={};for(let e=s.length-1;e>=0;e--){const{name:i,element:n,collapsed:a}=s[e],l=!t[i];if(l&&(t[i]=[]),n){const e=o.createPositionAt(n,"before");t[i].push(e),o.remove(n)}else{const e=r.getAffectedRange();if(!e){a&&t[i].push(r.position);continue}a?t[i].push(e[a]):t[i].push(l?e.start:e.end)}}for(const[e,[i,n]]of Object.entries(t))i&&n&&i.root===n.root&&o.addMarker(e,{usingOperation:!0,affectsData:!0,range:new vi(i,n)});e&&(l=e.toRange(),e.detach())}l&&(n instanceof Li?o.setSelection(l):n.setTo(l));const c=r.getAffectedRange()||e.createRange(n.anchor);return r.destroy(),c}))}(this,t,i)})),this.on("insertObject",((e,[t,i,o])=>{e.return=function(e,t,i,o={}){if(!e.schema.isObject(t))throw new x.CKEditorError("insertobject-element-not-an-object",e,{object:t});const n=i||e.document.selection;let r=n;o.findOptimalPosition&&e.schema.isBlock(t)&&(r=e.createSelection(er(n,e,o.findOptimalPosition)));const s=(0,x.first)(n.getSelectedBlocks()),a={};return s&&Object.assign(a,e.schema.getAttributesWithProperty(s,"copyOnReplace",!0)),e.change((i=>{r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0});let n=t;const s=r.anchor.parent;!e.schema.checkChild(s,t)&&e.schema.checkChild(s,"paragraph")&&e.schema.checkChild("paragraph",t)&&(n=i.createElement("paragraph"),i.insert(t,n)),e.schema.setAllowedAttributes(n,a,i);const l=e.insertContent(n,r);return l.isCollapsed||o.setSelection&&function(e,t,i,o){const n=e.model;if("on"==i)return void e.setSelection(t,"on");if("after"!=i)throw new x.CKEditorError("insertobject-invalid-place-parameter-value",n);let r=t.nextSibling;n.schema.isInline(t)?e.setSelection(t,"after"):(!(r&&n.schema.checkChild(r,"$text"))&&n.schema.checkChild(t.parent,"paragraph")&&(r=e.createElement("paragraph"),n.schema.setAllowedAttributes(r,o,e),n.insertContent(r,e.createPositionAfter(t))),r&&e.setSelection(r,0))}(i,t,o.setSelection,a),l}))}(this,t,i,o)}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new En,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){x.CKEditorError.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new En):e instanceof En||(e=new En(e)):e=new En,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){x.CKEditorError.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,i,...o){const n=ar(t,i);return this.fire("insertContent",[e,n,i,...o])}insertObject(e,t,i,o,...n){const r=ar(t,i);return this.fire("insertObject",[e,r,o,o,...n])}deleteContent(e,t){$n(this,e,t)}modifySelection(e,t){!function(e,t,i={}){const o=e.schema,n="backward"!=i.direction,r=i.unit?i.unit:"character",s=!!i.treatEmojiAsSingleUnit,a=t.focus,l=new mi({boundaries:or(a,n),singleCharacters:!0,direction:n?"forward":"backward"}),c={walker:l,schema:o,isForward:n,unit:r,treatEmojiAsSingleUnit:s};let d;for(;d=l.next();){if(d.done)return;const i=ir(c,d.value);if(i)return void(t instanceof Li?e.change((e=>{e.setSelectionFocus(i)})):t.setFocus(i))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const i=e.createDocumentFragment(),o=t.getFirstRange();if(!o||o.isCollapsed)return i;const n=o.start.root,r=o.start.getCommonPath(o.end),s=n.getNodeByPath(r);let a;a=o.start.parent==o.end.parent?o:e.createRange(e.createPositionAt(s,o.start.path[r.length]),e.createPositionAt(s,o.end.path[r.length]+1));const l=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),i):e.append(e.cloneElement(t,!0),i);if(a!=o){const t=o._getTransformedByMove(a.start,e.createPositionAt(i,0),l)[0],n=e.createRange(e.createPositionAt(i,0),t.start);Qn(e.createRange(t.end,e.createPositionAt(i,"end")),e),Qn(n,e)}return i}))}(this,e)}hasContent(e,t={}){const i=e instanceof vi?e:vi._createIn(e);if(i.isCollapsed)return!1;const{ignoreWhitespaces:o=!1,ignoreMarkers:n=!1}=t;if(!n)for(const e of this.markers.getMarkersIntersectingRange(i))if(e.affectsData)return!0;for(const e of i.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!o)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}createPositionFromPath(e,t,i){return new pi(e,t,i)}createPositionAt(e,t){return pi._createAt(e,t)}createPositionAfter(e){return pi._createAfter(e)}createPositionBefore(e){return pi._createBefore(e)}createRange(e,t){return new vi(e,t)}createRangeIn(e){return vi._createIn(e)}createRangeOn(e){return vi._createOn(e)}createSelection(...e){return new Si(...e)}createBatch(e){return new En(e)}createOperationFromJSON(e){return un.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new Fn(this,t);const i=this._pendingChanges[0].callback(this._currentWriter);e.push(i),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function ar(e,t){if(e)return e instanceof Si||e instanceof Li?e:e instanceof li?new Si(e,t):new Si(e)}class lr extends Ut{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}class cr extends Ut{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}class dr{constructor(e){this.document=e}createDocumentFragment(e){return new nt(this.document,e)}createElement(e,t,i){return new Se(this.document,e,t,i)}createText(e){return new P(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,i){return i._insertChild(e,t)}removeChildren(e,t,i){return i._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const i=e.parent;if(i){const o=i.getChildIndex(e);return this.removeChildren(o,1,i),this.insertChild(o,t,i),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const i=t.getChildIndex(e);this.remove(e),this.insertChild(i,e.getChildren(),t)}}rename(e,t){const i=new Se(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,i)?i:null}setAttribute(e,t,i){i._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,i){(0,V.Z)(e)&&void 0===i?t._setStyle(e):i._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,i){i._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return ze._createAt(e,t)}createPositionAfter(e){return ze._createAfter(e)}createPositionBefore(e){return ze._createBefore(e)}createRange(e,t){return new Ne(e,t)}createRangeOn(e){return Ne._createOn(e)}createRangeIn(e){return Ne._createIn(e)}createSelection(...e){return new Le(...e)}}const ur=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,hr=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,mr=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,gr=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,pr=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,fr=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function br(e){return e.startsWith("#")?ur.test(e):e.startsWith("rgb")?hr.test(e)||mr.test(e):e.startsWith("hsl")?gr.test(e)||pr.test(e):fr.has(e.toLowerCase())}const wr=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function kr(e){return wr.includes(e)}const _r=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function vr(e){return _r.test(e)}const yr=/^[+-]?[0-9]*([.][0-9]+)?%$/;function Cr(e){return yr.test(e)}const xr=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function Ar(e){return xr.includes(e)}const Er=["center","top","bottom","left","right"];function Tr(e){return Er.includes(e)}const Sr=["fixed","scroll","local"];function Pr(e){return Sr.includes(e)}const Ir=/^url\(/;function Vr(e){return Ir.test(e)}function Rr(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=zr(e),i=t[0],o=t[2]||i,n=t[1]||i;return{top:i,bottom:o,right:n,left:t[3]||n}}function Or(e){return t=>{const{top:i,right:o,bottom:n,left:r}=t,s=[];return[i,o,r,n].every((e=>!!e))?s.push([e,Br(t)]):(i&&s.push([e+"-top",i]),o&&s.push([e+"-right",o]),n&&s.push([e+"-bottom",n]),r&&s.push([e+"-left",r])),s}}function Br({top:e,right:t,bottom:i,left:o}){const n=[];return o!==t?n.push(e,t,i,o):i!==e?n.push(e,t,i):t!==e?n.push(e,t):n.push(e),n.join(" ")}function Mr(e){return t=>({path:e,value:Rr(t)})}function zr(e){return e.replace(/, /g,",").split(" ").map((e=>e.replace(/,/g,", ")))}function Nr(e){e.setNormalizer("background",(e=>{const t={},i=zr(e);for(const e of i)Ar(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):Tr(e)?(t.position=t.position||[],t.position.push(e)):Pr(e)?t.attachment=e:br(e)?t.color=e:Vr(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function Dr(e){e.setNormalizer("border",(e=>{const{color:t,style:i,width:o}=jr(e);return{path:"border",value:{color:Rr(t),style:Rr(i),width:Rr(o)}}})),e.setNormalizer("border-top",Lr("top")),e.setNormalizer("border-right",Lr("right")),e.setNormalizer("border-bottom",Lr("bottom")),e.setNormalizer("border-left",Lr("left")),e.setNormalizer("border-color",Fr("color")),e.setNormalizer("border-width",Fr("width")),e.setNormalizer("border-style",Fr("style")),e.setNormalizer("border-top-color",Wr("color","top")),e.setNormalizer("border-top-style",Wr("style","top")),e.setNormalizer("border-top-width",Wr("width","top")),e.setNormalizer("border-right-color",Wr("color","right")),e.setNormalizer("border-right-style",Wr("style","right")),e.setNormalizer("border-right-width",Wr("width","right")),e.setNormalizer("border-bottom-color",Wr("color","bottom")),e.setNormalizer("border-bottom-style",Wr("style","bottom")),e.setNormalizer("border-bottom-width",Wr("width","bottom")),e.setNormalizer("border-left-color",Wr("color","left")),e.setNormalizer("border-left-style",Wr("style","left")),e.setNormalizer("border-left-width",Wr("width","left")),e.setExtractor("border-top",Zr("top")),e.setExtractor("border-right",Zr("right")),e.setExtractor("border-bottom",Zr("bottom")),e.setExtractor("border-left",Zr("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",Or("border-color")),e.setReducer("border-style",Or("border-style")),e.setReducer("border-width",Or("border-width")),e.setReducer("border-top",$r("top")),e.setReducer("border-right",$r("right")),e.setReducer("border-bottom",$r("bottom")),e.setReducer("border-left",$r("left")),e.setReducer("border",function(){return t=>{const i=Ur(t,"top"),o=Ur(t,"right"),n=Ur(t,"bottom"),r=Ur(t,"left"),s=[i,o,n,r],a={width:e(s,"width"),style:e(s,"style"),color:e(s,"color")},l=qr(a,"all");if(l.length)return l;const c=Object.entries(a).reduce(((e,[t,i])=>(i&&(e.push([`border-${t}`,i]),s.forEach((e=>delete e[t]))),e)),[]);return[...c,...qr(i,"top"),...qr(o,"right"),...qr(n,"bottom"),...qr(r,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function Lr(e){return t=>{const{color:i,style:o,width:n}=jr(t),r={};return void 0!==i&&(r.color={[e]:i}),void 0!==o&&(r.style={[e]:o}),void 0!==n&&(r.width={[e]:n}),{path:"border",value:r}}}function Fr(e){return t=>({path:"border",value:Hr(t,e)})}function Hr(e,t){return{[t]:Rr(e)}}function Wr(e,t){return i=>({path:"border",value:{[e]:{[t]:i}}})}function Zr(e){return(t,i)=>{if(i.border)return Ur(i.border,e)}}function Ur(e,t){const i={};return e.width&&e.width[t]&&(i.width=e.width[t]),e.style&&e.style[t]&&(i.style=e.style[t]),e.color&&e.color[t]&&(i.color=e.color[t]),i}function jr(e){const t={},i=zr(e);for(const e of i)vr(e)||/thin|medium|thick/.test(e)?t.width=e:kr(e)?t.style=e:t.color=e;return t}function $r(e){return t=>qr(t,e)}function qr(e,t){const i=[];if(e&&e.width&&i.push("width"),e&&e.style&&i.push("style"),e&&e.color&&i.push("color"),3==i.length){const o=i.map((t=>e[t])).join(" ");return["all"==t?["border",o]:[`border-${t}`,o]]}return"all"==t?[]:i.map((i=>[`border-${t}-${i}`,e[i]]))}function Kr(e){e.setNormalizer("margin",Mr("margin")),e.setNormalizer("margin-top",(e=>({path:"margin.top",value:e}))),e.setNormalizer("margin-right",(e=>({path:"margin.right",value:e}))),e.setNormalizer("margin-bottom",(e=>({path:"margin.bottom",value:e}))),e.setNormalizer("margin-left",(e=>({path:"margin.left",value:e}))),e.setReducer("margin",Or("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function Gr(e){e.setNormalizer("padding",Mr("padding")),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",Or("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}},5725:(e,t,i)=>{"use strict";i.d(t,{C:()=>u,G:()=>p});var o=i(7578);function*n(e,t){for(const i of t)i&&e.getAttributeProperties(i[0]).copyOnEnter&&(yield i)}class r extends o.Command{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,i=t.document.selection,o=t.schema,r=i.isCollapsed,a=i.getFirstRange(),l=a.start.parent,c=a.end.parent;if(o.isLimit(l)||o.isLimit(c))return r||l!=c||t.deleteContent(i),!1;if(r){const t=n(e.model.schema,i.getAttributes());return s(e,a.start),e.setSelectionAttribute(t),!0}{const o=!(a.start.isAtStart&&a.end.isAtEnd),n=l==c;if(t.deleteContent(i,{leaveUnmerged:o}),o){if(n)return s(e,i.focus),!0;e.setSelection(c,0)}}return!1}}function s(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}var a=i(600),l=i(7732);const c={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class d extends a.Observer{constructor(e){super(e);const t=this.document;let i=!1;t.on("keydown",((e,t)=>{i=t.shiftKey})),t.on("beforeinput",((o,n)=>{if(!this.isEnabled)return;let r=n.inputType;l.env.isSafari&&i&&"insertParagraph"==r&&(r="insertLineBreak");const s=n.domEvent,d=c[r];if(!d)return;const u=new a.BubblingEventInfo(t,"enter",n.targetRanges[0]);t.fire(u,new a.DomEventData(e,s,{isSoft:d.isSoft})),u.stop.called&&o.stop()}))}observe(){}stopObserving(){}}class u extends o.Plugin{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,i=t.document;t.addObserver(d),e.commands.add("enter",new r(e)),this.listenTo(i,"enter",((o,n)=>{i.isComposing||n.preventDefault(),n.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"})}}class h extends o.Command{execute(){const e=this.editor.model,t=e.document;e.change((i=>{!function(e,t,i){const o=i.isCollapsed,r=i.getFirstRange(),s=r.start.parent,a=r.end.parent,l=s==a;if(o){const o=n(e.schema,i.getAttributes());m(e,t,r.end),t.removeSelectionAttribute(i.getAttributeKeys()),t.setSelectionAttribute(o)}else{const o=!(r.start.isAtStart&&r.end.isAtEnd);e.deleteContent(i,{leaveUnmerged:o}),l?m(e,t,i.focus):o&&t.setSelection(a,0)}}(e,i,t.selection),this.fire("afterExecute",{writer:i})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const i=t.anchor;if(!i||!e.checkChild(i,"softBreak"))return!1;const o=t.getFirstRange(),n=o.start.parent,r=o.end.parent;return!g(n,e)&&!g(r,e)||n===r}(e.schema,t.selection)}}function m(e,t,i){const o=t.createElement("softBreak");e.insertContent(o,i),t.setSelection(o,"after")}function g(e,t){return!e.is("rootElement")&&(t.isLimit(e)||g(e.parent,t))}class p extends o.Plugin{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,i=e.conversion,o=e.editing.view,n=o.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),i.for("upcast").elementToElement({model:"softBreak",view:"br"}),i.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),o.addObserver(d),e.commands.add("shiftEnter",new h(e)),this.listenTo(n,"enter",((t,i)=>{n.isComposing||i.preventDefault(),i.isSoft&&(e.execute("shiftEnter"),o.scrollToTheSelection())}),{priority:"low"})}}},1638:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Essentials:()=>b});var o=i(6854),n=i(7197),r=i(1863),s=i(7578),a=i(7732);class l extends s.Command{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let i=e.schema.getLimitElement(t);if(t.containsEntireContent(i)||!c(e.schema,i))do{if(i=i.parent,!i)return}while(!c(e.schema,i));e.change((e=>{e.setSelection(i,"in")}))}}function c(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const d=(0,a.parseKeystroke)("Ctrl+A");class u extends s.Plugin{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new l(e)),this.listenTo(t,"keydown",((t,i)=>{(0,a.getCode)(i)===d&&(e.execute("selectAll"),i.preventDefault())}))}}var h=i(3905);class m extends s.Plugin{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(t=>{const i=e.commands.get("selectAll"),o=new h.ButtonView(t),n=t.t;return o.set({label:n("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),o}))}}class g extends s.Plugin{static get requires(){return[u,m]}static get pluginName(){return"SelectAll"}}var p=i(5187),f=i(1903);class b extends o.Sy{static get requires(){return[n.TU,r.C,g,r.G,p.Mq,f.WP]}static get pluginName(){return"Essentials"}}},1281:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Font:()=>te,FontBackgroundColor:()=>ee,FontBackgroundColorEditing:()=>Q,FontBackgroundColorUI:()=>X,FontColor:()=>J,FontColorEditing:()=>q,FontColorUI:()=>G,FontFamily:()=>B,FontFamilyEditing:()=>R,FontFamilyUI:()=>O,FontSize:()=>j,FontSizeEditing:()=>H,FontSizeUI:()=>U});var o=i(6854);class n extends o.mY{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,i=t.document.selection,o=e.value;t.change((e=>{if(i.isCollapsed)o?e.setSelectionAttribute(this.attributeKey,o):e.removeSelectionAttribute(this.attributeKey);else{const n=t.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const t of n)o?e.setAttribute(this.attributeKey,o,t):e.removeAttribute(this.attributeKey,t)}}))}}var r=i(7095),s=i(6553);class a extends((0,s.Re)(s.FE)){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(e,t){return this.find((t=>t.color===e.color))?this:super.add(e,t)}hasColor(e){return!!this.find((t=>t.color===e))}}var l=i(3379),c=i.n(l),d=i(9037),u=i.n(d),h=i(569),m=i.n(h),g=i(8575),p=i.n(g),f=i(9216),b=i.n(f),w=i(8915),k={attributes:{"data-cke":!0}};k.setAttributes=p(),k.insert=m().bind(null,"head"),k.domAPI=u(),k.insertStyleElement=b(),c()(w.Z,k),w.Z&&w.Z.locals&&w.Z.locals;class _ extends r.G7{constructor(e,{colors:t,columns:i,removeButtonLabel:o,documentColorsLabel:n,documentColorsCount:l}){super(e),this.items=this.createCollection(),this.colorDefinitions=t,this.focusTracker=new s.Rh,this.keystrokes=new s.VD,this.set("selectedColor",void 0),this.removeButtonLabel=o,this.columns=i,this.documentColors=new a,this.documentColorsCount=l,this._focusables=new r.vX,this._focusCycler=new r.I0({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._documentColorsLabel=n,this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items}),this.items.add(this._createRemoveColorButton())}updateDocumentColors(e,t){const i=e.document,o=this.documentColorsCount;this.documentColors.clear();for(const n of i.getRootNames()){const r=i.getRoot(n),s=e.createRangeIn(r);for(const e of s.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=o))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,i=this.selectedColor;t.selectedColor=i,e&&(e.selectedColor=i)}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendGrids(){if(!this.staticColorsGrid&&(this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid),this.documentColorsCount)){const e=r.YS.bind(this.documentColors,this.documentColors),t=new r.Dn(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid),this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid)}}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_createRemoveColorButton(){const e=new r.r5;return e.set({withText:!0,icon:o.icons.eraser,label:this.removeButtonLabel}),e.class="ck-color-table__remove-color",e.on("execute",(()=>{this.fire("execute",{value:null})})),e.render(),this.focusTracker.add(e.element),this._focusables.add(e),e}_createStaticColorsGrid(){const e=new r.J6(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.delegate("execute").to(this),e}_createDocumentColorsGrid(){const e=r.YS.bind(this.documentColors,this.documentColors),t=new r.J6(this.locale,{columns:this.columns});return t.delegate("execute").to(this),t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using((e=>{const t=new r._9;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",(()=>{this.fire("execute",{value:e.color})})),t})),this.documentColors.on("change:isEmpty",((e,i,o)=>{o&&(t.selectedColor=null)})),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find((t=>t.color===e));t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}const v="fontSize",y="fontFamily",C="fontColor",x="fontBackgroundColor";function A(e,t){const i={model:{key:e,values:[]},view:{},upcastAlso:{}};for(const e of t)i.model.values.push(e.model),i.view[e.model]=e.view,e.upcastAlso&&(i.upcastAlso[e.model]=e.upcastAlso);return i}function E(e){return t=>t.getStyle(e).replace(/\s/g,"")}function T(e){return(t,{writer:i})=>i.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}class S extends n{constructor(e){super(e,y)}}function P(e){return e.map(I).filter((e=>void 0!==e))}function I(e){return"object"==typeof e?e:"default"===e?{title:"Default",model:void 0}:"string"==typeof e?function(e){const t=e.replace(/"|'/g,"").split(","),i=t[0],o=t.map(V).join(", ");return{title:i,model:o,view:{name:"span",styles:{"font-family":o},priority:7}}}(e):void 0}function V(e){return(e=e.trim()).indexOf(" ")>0&&(e=`'${e}'`),e}class R extends o.Sy{static get pluginName(){return"FontFamilyEditing"}constructor(e){super(e),e.config.define(y,{options:["default","Arial, Helvetica, sans-serif","Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif","Trebuchet MS, Helvetica, sans-serif","Verdana, Geneva, sans-serif"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:y}),e.model.schema.setAttributeProperties(y,{isFormatting:!0,copyOnEnter:!0});const t=P(e.config.get("fontFamily.options")).filter((e=>e.model)),i=A(y,t);e.config.get("fontFamily.supportAllValues")?(this._prepareAnyValueConverters(),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(i),e.commands.add(y,new S(e))}_prepareAnyValueConverters(){const e=this.editor;e.conversion.for("downcast").attributeToElement({model:y,view:(e,{writer:t})=>t.createAttributeElement("span",{style:"font-family:"+e},{priority:7})}),e.conversion.for("upcast").elementToAttribute({model:{key:y,value:e=>e.getStyle("font-family")},view:{name:"span",styles:{"font-family":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{face:/.*/}},model:{key:y,value:e=>e.getAttribute("face")}})}}class O extends o.Sy{static get pluginName(){return"FontFamilyUI"}init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),o=e.commands.get(y);e.ui.componentFactory.add(y,(n=>{const a=(0,r.t9)(n);return(0,r.Pm)(a,(()=>function(e,t){const i=new s.FE;for(const o of e){const e={type:"button",model:new r.Hn({commandName:y,commandParam:o.model,label:o.title,withText:!0})};e.model.bind("isOn").to(t,"value",(e=>e===o.model||!(!e||!o.model)&&e.split(",")[0].replace(/'/g,"").toLowerCase()===o.model.toLowerCase())),o.view&&"string"!=typeof o.view&&o.view.styles&&e.model.set("labelStyle",`font-family: ${o.view.styles["font-family"]}`),i.add(e)}return i}(i,o))),a.buttonView.set({label:t("Font Family"),icon:'',tooltip:!0}),a.extendTemplate({attributes:{class:"ck-font-family-dropdown"}}),a.bind("isEnabled").to(o),this.listenTo(a,"execute",(t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()})),a}))}_getLocalizedOptions(){const e=this.editor,t=e.t;return P(e.config.get(y).options).map((e=>("Default"===e.title&&(e.title=t("Default")),e)))}}class B extends o.Sy{static get requires(){return[R,O]}static get pluginName(){return"FontFamily"}}var M=i(3291);class z extends n{constructor(e){super(e,v)}}function N(e){return e.map((e=>function(e){if("number"==typeof e&&(e=String(e)),"object"==typeof e&&((t=e).title&&t.model&&t.view))return L(e);var t;const i=function(e){return"string"==typeof e?D[e]:D[e.model]}(e);return i?L(i):"default"===e?{model:void 0,title:"Default"}:function(e){let t;if("object"==typeof e){if(!e.model)throw new s.Bb("font-size-invalid-definition",null,e);t=parseFloat(e.model)}else t=parseFloat(e);return isNaN(t)}(e)?void 0:function(e){return"string"==typeof e&&(e={title:e,model:`${parseFloat(e)}px`}),e.view={name:"span",styles:{"font-size":e.model}},L(e)}(e)}(e))).filter((e=>void 0!==e))}const D={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function L(e){return e.view&&"string"!=typeof e.view&&!e.view.priority&&(e.view.priority=7),e}const F=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class H extends o.Sy{static get pluginName(){return"FontSizeEditing"}constructor(e){super(e),e.config.define(v,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:v}),e.model.schema.setAttributeProperties(v,{isFormatting:!0,copyOnEnter:!0});const t=e.config.get("fontSize.supportAllValues"),i=N(this.editor.config.get("fontSize.options")).filter((e=>e.model)),o=A(v,i);t?(this._prepareAnyValueConverters(o),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(o),e.commands.add(v,new z(e))}_prepareAnyValueConverters(e){const t=this.editor,i=e.model.values.filter((e=>!(0,M.G9)(String(e))&&!(0,M.zz)(String(e))));if(i.length)throw new s.Bb("font-size-invalid-use-of-named-presets",null,{presets:i});t.conversion.for("downcast").attributeToElement({model:v,view:(e,{writer:t})=>{if(e)return t.createAttributeElement("span",{style:"font-size:"+e},{priority:7})}}),t.conversion.for("upcast").elementToAttribute({model:{key:v,value:e=>e.getStyle("font-size")},view:{name:"span",styles:{"font-size":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{size:/^[+-]?\d{1,3}$/}},model:{key:v,value:e=>{const t=e.getAttribute("size"),i="-"===t[0]||"+"===t[0];let o=parseInt(t,10);i&&(o=3+o);const n=F.length-1,r=Math.min(Math.max(o,0),n);return F[r]}}})}}var W=i(5991),Z={attributes:{"data-cke":!0}};Z.setAttributes=p(),Z.insert=m().bind(null,"head"),Z.domAPI=u(),Z.insertStyleElement=b(),c()(W.Z,Z),W.Z&&W.Z.locals&&W.Z.locals;class U extends o.Sy{static get pluginName(){return"FontSizeUI"}init(){const e=this.editor,t=e.t,i=this._getLocalizedOptions(),o=e.commands.get(v);e.ui.componentFactory.add(v,(n=>{const a=(0,r.t9)(n);return(0,r.Pm)(a,(()=>function(e,t){const i=new s.FE;for(const o of e){const e={type:"button",model:new r.Hn({commandName:v,commandParam:o.model,label:o.title,class:"ck-fontsize-option",withText:!0})};o.view&&"string"!=typeof o.view&&(o.view.styles&&e.model.set("labelStyle",`font-size:${o.view.styles["font-size"]}`),o.view.classes&&e.model.set("class",`${e.model.class} ${o.view.classes}`)),e.model.bind("isOn").to(t,"value",(e=>e===o.model)),i.add(e)}return i}(i,o))),a.buttonView.set({label:t("Font Size"),icon:'',tooltip:!0}),a.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),a.bind("isEnabled").to(o),this.listenTo(a,"execute",(t=>{e.execute(t.source.commandName,{value:t.source.commandParam}),e.editing.view.focus()})),a}))}_getLocalizedOptions(){const e=this.editor,t=e.t,i={Default:t("Default"),Tiny:t("Tiny"),Small:t("Small"),Big:t("Big"),Huge:t("Huge")};return N(e.config.get(v).options).map((e=>{const t=i[e.title];return t&&t!=e.title&&(e=Object.assign({},e,{title:t})),e}))}}class j extends o.Sy{static get requires(){return[H,U]}static get pluginName(){return"FontSize"}normalizeSizeOptions(e){return N(e)}}class $ extends n{constructor(e){super(e,C)}}class q extends o.Sy{static get pluginName(){return"FontColorEditing"}constructor(e){super(e),e.config.define(C,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:C,value:E("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:C,value:e=>e.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:C,view:T("color")}),e.commands.add(C,new $(e)),e.model.schema.extend("$text",{allowAttributes:C}),e.model.schema.setAttributeProperties(C,{isFormatting:!0,copyOnEnter:!0})}}class K extends o.Sy{constructor(e,{commandName:t,componentName:i,icon:o,dropdownLabel:n}){super(e),this.commandName=t,this.componentName=i,this.icon=o,this.dropdownLabel=n,this.columns=e.config.get(`${this.componentName}.columns`),this.colorTableView=void 0}init(){const e=this.editor,t=e.locale,i=t.t,o=e.commands.get(this.commandName),n=(0,r.S1)(e.config.get(this.componentName).colors),s=(0,r.k6)(t,n),a=e.config.get(`${this.componentName}.documentColors`);e.ui.componentFactory.add(this.componentName,(t=>{const n=(0,r.t9)(t);return this.colorTableView=function({dropdownView:e,colors:t,columns:i,removeButtonLabel:o,documentColorsLabel:n,documentColorsCount:r}){const s=e.locale,a=new _(s,{colors:t,columns:i,removeButtonLabel:o,documentColorsLabel:n,documentColorsCount:r});return e.colorTableView=a,e.panelView.children.add(a),a.delegate("execute").to(e,"execute"),a}({dropdownView:n,colors:s.map((e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}}))),columns:this.columns,removeButtonLabel:i("Remove color"),documentColorsLabel:0!==a?i("Document colors"):"",documentColorsCount:void 0===a?this.columns:a}),this.colorTableView.bind("selectedColor").to(o,"value"),n.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),n.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),n.bind("isEnabled").to(o),n.on("execute",((t,i)=>{e.execute(this.commandName,i),e.editing.view.focus()})),n.on("change:isOpen",((t,i,o)=>{n.colorTableView.appendGrids(),o&&(0!==a&&this.colorTableView.updateDocumentColors(e.model,this.componentName),this.colorTableView.updateSelectedColors())})),(0,r.Mh)(n,(()=>n.colorTableView.staticColorsGrid.items.find((e=>e.isOn)))),n}))}}class G extends K{constructor(e){const t=e.locale.t;super(e,{commandName:C,componentName:C,icon:'',dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class J extends o.Sy{static get requires(){return[q,G]}static get pluginName(){return"FontColor"}}class Y extends n{constructor(e){super(e,x)}}class Q extends o.Sy{static get pluginName(){return"FontBackgroundColorEditing"}constructor(e){super(e),e.config.define(x,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.data.addStyleProcessorRules(M.QR),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:x,value:E("background-color")}}),e.conversion.for("downcast").attributeToElement({model:x,view:T("background-color")}),e.commands.add(x,new Y(e)),e.model.schema.extend("$text",{allowAttributes:x}),e.model.schema.setAttributeProperties(x,{isFormatting:!0,copyOnEnter:!0})}}class X extends K{constructor(e){const t=e.locale.t;super(e,{commandName:x,componentName:x,icon:'',dropdownLabel:t("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class ee extends o.Sy{static get requires(){return[Q,X]}static get pluginName(){return"FontBackgroundColor"}}class te extends o.Sy{static get requires(){return[B,j,J,ee]}static get pluginName(){return"Font"}}},4507:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Heading:()=>A,HeadingButtonsUI:()=>T,HeadingEditing:()=>c,HeadingUI:()=>x,Title:()=>I});var o=i(6854),n=i(4690),r=i(6553);class s extends o.mY{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=(0,r.Ps)(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t=>a(e,t,this.editor.model.schema)))}execute(e){const t=this.editor.model,i=t.document,o=e.value;t.change((e=>{const n=Array.from(i.selection.getSelectedBlocks()).filter((e=>a(e,o,t.schema)));for(const t of n)t.is("element",o)||e.rename(t,o)}))}}function a(e,t,i){return i.checkChild(e.parent,t)&&!i.isObject(e)}const l="paragraph";class c extends o.Sy{static get pluginName(){return"HeadingEditing"}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[n.Paragraph]}init(){const e=this.editor,t=e.config.get("heading.options"),i=[];for(const o of t)"paragraph"!==o.model&&(e.model.schema.register(o.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(o),i.push(o.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new s(e,i))}afterInit(){const e=this.editor,t=e.commands.get("enter"),i=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",((t,o)=>{const n=e.model.document.selection.getFirstPosition().parent;i.some((e=>n.is("element",e.model)))&&!n.is("element",l)&&0===n.childCount&&o.writer.rename(n,l)}))}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:r.tA.get("low")+1})}}var d=i(7095);function u(e){const t=e.t,i={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map((e=>{const t=i[e.title];return t&&t!=e.title&&(e.title=t),e}))}var h=i(3379),m=i.n(h),g=i(9037),p=i.n(g),f=i(569),b=i.n(f),w=i(8575),k=i.n(w),_=i(9216),v=i.n(_),y=i(4249),C={attributes:{"data-cke":!0}};C.setAttributes=k(),C.insert=b().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=v(),m()(y.Z,C),y.Z&&y.Z.locals&&y.Z.locals;class x extends o.Sy{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,t=e.t,i=u(e),o=t("Choose heading"),n=t("Heading");e.ui.componentFactory.add("heading",(t=>{const s={},a=new r.FE,l=e.commands.get("heading"),c=e.commands.get("paragraph"),u=[l];for(const e of i){const t={type:"button",model:new d.Hn({label:e.title,class:e.class,withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(c,"value"),t.model.set("commandName","paragraph"),u.push(c)):(t.model.bind("isOn").to(l,"value",(t=>t===e.model)),t.model.set({commandName:"heading",commandValue:e.model})),a.add(t),s[e.model]=e.title}const h=(0,d.t9)(t);return(0,d.Pm)(h,a),h.buttonView.set({isOn:!1,withText:!0,tooltip:n}),h.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),h.bind("isEnabled").toMany(u,"isEnabled",((...e)=>e.some((e=>e)))),h.buttonView.bind("label").to(l,"value",c,"value",((e,t)=>{const i=e||t&&"paragraph";return"boolean"==typeof i?o:s[i]?s[i]:o})),this.listenTo(h,"execute",(t=>{const{commandName:i,commandValue:o}=t.source;e.execute(i,o?{value:o}:void 0),e.editing.view.focus()})),h}))}}class A extends o.Sy{static get requires(){return[c,x]}static get pluginName(){return"Heading"}}const E={heading1:'',heading2:'',heading3:'',heading4:'',heading5:'',heading6:''};class T extends o.Sy{init(){u(this.editor).filter((e=>"paragraph"!==e.model)).map((e=>this._createButton(e)))}_createButton(e){const t=this.editor;t.ui.componentFactory.add(e.model,(i=>{const o=new d.r5(i),n=t.commands.get("heading");return o.label=e.title,o.icon=e.icon||E[e.model],o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(n),o.bind("isOn").to(n,"value",(t=>t==e.model)),o.on("execute",(()=>{t.execute("heading",{value:e.model}),t.editing.view.focus()})),o}))}}var S=i(3291);const P=new Set(["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"]);class I extends o.Sy{static get pluginName(){return"Title"}static get requires(){return["Paragraph"]}init(){const e=this.editor,t=e.model;this._bodyPlaceholder=null,t.schema.register("title",{isBlock:!0,allowIn:"$root"}),t.schema.register("title-content",{isBlock:!0,allowIn:"title",allowAttributes:["alignment"]}),t.schema.extend("$text",{allowIn:"title-content"}),t.schema.addAttributeCheck((e=>{if(e.endsWith("title-content $text"))return!1})),e.editing.mapper.on("modelToViewPosition",R(e.editing.view)),e.data.mapper.on("modelToViewPosition",R(e.editing.view)),e.conversion.for("downcast").elementToElement({model:"title-content",view:"h1"}),e.conversion.for("downcast").add((e=>e.on("insert:title",((e,t,i)=>{i.consumable.consume(t.item,e.name)})))),e.data.upcastDispatcher.on("element:h1",V,{priority:"high"}),e.data.upcastDispatcher.on("element:h2",V,{priority:"high"}),e.data.upcastDispatcher.on("element:h3",V,{priority:"high"}),t.document.registerPostFixer((e=>this._fixTitleContent(e))),t.document.registerPostFixer((e=>this._fixTitleElement(e))),t.document.registerPostFixer((e=>this._fixBodyElement(e))),t.document.registerPostFixer((e=>this._fixExtraParagraph(e))),this._attachPlaceholders(),this._attachTabPressHandling()}getTitle(e={}){const t=this._getTitleElement().getChild(0);return this.editor.data.stringify(t,e)}getBody(e={}){const t=this.editor,i=t.data,o=t.model,n=t.model.document.getRoot(),r=t.editing.view,s=new S.qD(r.document),a=o.createRangeIn(n),l=s.createDocumentFragment(),c=o.createPositionAfter(n.getChild(0)),d=o.createRange(c,o.createPositionAt(n,"end")),u=new Map;for(const e of o.markers){const t=d.getIntersection(e.getRange());t&&u.set(e.name,t)}return i.mapper.clearBindings(),i.mapper.bindElements(n,l),i.downcastDispatcher.convert(a,u,s,e),s.remove(s.createRangeOn(l.getChild(0))),t.data.processor.toData(l)}_getTitleElement(){const e=this.editor.model.document.getRoot();for(const t of e.getChildren())if(O(t))return t}_fixTitleContent(e){const t=this._getTitleElement();if(!t||1===t.maxOffset)return!1;const i=Array.from(t.getChildren());i.shift();for(const o of i)e.move(e.createRangeOn(o),t,"after"),e.rename(o,"paragraph");return!0}_fixTitleElement(e){const t=this.editor.model,i=t.document.getRoot(),o=Array.from(i.getChildren()).filter(O),n=o[0],r=i.getChild(0);if(r.is("element","title"))return B(o,e,t);if(!n&&!P.has(r.name)){const t=e.createElement("title");return e.insert(t,i),e.insertElement("title-content",t),!0}return P.has(r.name)?function(e,t,i){const o=t.createElement("title");t.insert(o,e,"before"),t.insert(e,o,0),t.rename(e,"title-content"),i.schema.removeDisallowedAttributes([e],t)}(r,e,t):e.move(e.createRangeOn(n),i,0),B(o,e,t),!0}_fixBodyElement(e){const t=this.editor.model.document.getRoot();return t.childCount<2&&(this._bodyPlaceholder=e.createElement("paragraph"),e.insert(this._bodyPlaceholder,t,1),!0)}_fixExtraParagraph(e){const t=this.editor.model.document.getRoot(),i=this._bodyPlaceholder;return!!function(e,t){return!(!e||!e.is("element","paragraph")||e.childCount)&&!(t.childCount<=2||t.getChild(t.childCount-1)!==e)}(i,t)&&(this._bodyPlaceholder=null,e.remove(i),!0)}_attachPlaceholders(){const e=this.editor,t=e.t,i=e.editing.view,o=i.document.getRoot(),n=e.sourceElement,r=e.config.get("title.placeholder")||t("Type your title"),s=e.config.get("placeholder")||n&&"textarea"===n.tagName.toLowerCase()&&n.getAttribute("placeholder")||t("Type or paste your content here.");let a;e.editing.downcastDispatcher.on("insert:title-content",((e,t,o)=>{(0,S.ID)({view:i,element:o.mapper.toViewElement(t.item),text:r,keepOnFocus:!0})})),i.document.registerPostFixer((e=>{const t=o.getChild(1);let i=!1;return t!==a&&(a&&((0,S.$_)(e,a),e.removeAttribute("data-placeholder",a)),e.setAttribute("data-placeholder",s,t),a=t,i=!0),i=(0,S.Q7)(t,!0)&&2===o.childCount&&"p"===t.name?!!(0,S.NJ)(e,t)||i:!!(0,S.$_)(e,t)||i,i}))}_attachTabPressHandling(){const e=this.editor,t=e.model;e.keystrokes.set("TAB",((e,i)=>{t.change((e=>{const o=t.document.selection,n=Array.from(o.getSelectedBlocks());if(1===n.length&&n[0].is("element","title-content")){const o=t.document.getRoot().getChild(1);e.setSelection(o,0),i()}}))})),e.keystrokes.set("SHIFT + TAB",((i,o)=>{t.change((i=>{const n=t.document.selection;if(!n.isCollapsed)return;const s=e.model.document.getRoot(),a=(0,r.Ps)(n.getSelectedBlocks()),l=n.getFirstPosition(),c=s.getChild(0);a===s.getChild(1)&&l.isAtStart&&(i.setSelection(c.getChild(0),0),o())}))}))}}function V(e,t,i){const o=t.modelCursor,n=t.viewItem;if(!o.isAtStart||!o.parent.is("element","$root"))return;if(!i.consumable.consume(n,{name:!0}))return;const r=i.writer,s=r.createElement("title"),a=r.createElement("title-content");r.append(a,s),r.insert(s,o),i.convertChildren(n,a),i.updateConversionResult(s,t)}function R(e){return(t,i)=>{const o=i.modelPosition.parent;if(!o.is("element","title"))return;const n=o.parent,r=i.mapper.toViewElement(n);i.viewPosition=e.createPositionAt(r,0),t.stop()}}function O(e){return e.is("element","title")}function B(e,t,i){let o=!1;for(const n of e)0!==n.index&&(M(n,t,i),o=!0);return o}function M(e,t,i){const o=e.getChild(0);o.isEmpty?t.remove(e):(t.move(t.createRangeOn(o),e,"before"),t.rename(o,"paragraph"),t.remove(e),i.schema.removeDisallowedAttributes([o],t))}},128:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Highlight:()=>v,HighlightEditing:()=>r,HighlightUI:()=>k});var o=i(6854);class n extends o.mY{refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute("highlight"),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"highlight")}execute(e={}){const t=this.editor.model,i=t.document.selection,o=e.value;t.change((e=>{if(i.isCollapsed){const t=i.getFirstPosition();if(i.hasAttribute("highlight")){const i=e=>e.item.hasAttribute("highlight")&&e.item.getAttribute("highlight")===this.value,n=t.getLastMatchingPosition(i,{direction:"backward"}),r=t.getLastMatchingPosition(i),s=e.createRange(n,r);o&&this.value!==o?(t.isEqual(r)||e.setAttribute("highlight",o,s),e.setSelectionAttribute("highlight",o)):(t.isEqual(r)||e.removeAttribute("highlight",s),e.removeSelectionAttribute("highlight"))}else o&&e.setSelectionAttribute("highlight",o)}else{const n=t.schema.getValidRanges(i.getRanges(),"highlight");for(const t of n)o?e.setAttribute("highlight",o,t):e.removeAttribute("highlight",t)}}))}}class r extends o.Sy{static get pluginName(){return"HighlightEditing"}constructor(e){super(e),e.config.define("highlight",{options:[{model:"yellowMarker",class:"marker-yellow",title:"Yellow marker",color:"var(--ck-highlight-marker-yellow)",type:"marker"},{model:"greenMarker",class:"marker-green",title:"Green marker",color:"var(--ck-highlight-marker-green)",type:"marker"},{model:"pinkMarker",class:"marker-pink",title:"Pink marker",color:"var(--ck-highlight-marker-pink)",type:"marker"},{model:"blueMarker",class:"marker-blue",title:"Blue marker",color:"var(--ck-highlight-marker-blue)",type:"marker"},{model:"redPen",class:"pen-red",title:"Red pen",color:"var(--ck-highlight-pen-red)",type:"pen"},{model:"greenPen",class:"pen-green",title:"Green pen",color:"var(--ck-highlight-pen-green)",type:"pen"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"highlight"});const t=e.config.get("highlight.options");e.conversion.attributeToElement(function(e){const t={model:{key:"highlight",values:[]},view:{}};for(const i of e)t.model.values.push(i.model),t.view[i.model]={name:"mark",classes:i.class};return t}(t)),e.commands.add("highlight",new n(e))}}var s=i(7095),a=i(3379),l=i.n(a),c=i(9037),d=i.n(c),u=i(569),h=i.n(u),m=i(8575),g=i.n(m),p=i(9216),f=i.n(p),b=i(7263),w={attributes:{"data-cke":!0}};w.setAttributes=g(),w.insert=h().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=f(),l()(b.Z,w),b.Z&&b.Z.locals&&b.Z.locals;class k extends o.Sy{get localizedOptionTitles(){const e=this.editor.t;return{"Yellow marker":e("Yellow marker"),"Green marker":e("Green marker"),"Pink marker":e("Pink marker"),"Blue marker":e("Blue marker"),"Red pen":e("Red pen"),"Green pen":e("Green pen")}}static get pluginName(){return"HighlightUI"}init(){const e=this.editor.config.get("highlight.options");for(const t of e)this._addHighlighterButton(t);this._addRemoveHighlightButton(),this._addDropdown(e)}_addRemoveHighlightButton(){const e=this.editor.t,t=this.editor.commands.get("highlight");this._addButton("removeHighlight",e("Remove highlight"),o.icons.eraser,null,(e=>{e.bind("isEnabled").to(t,"isEnabled")}))}_addHighlighterButton(e){const t=this.editor.commands.get("highlight");this._addButton("highlight:"+e.model,e.title,_(e.type),e.model,(function(i){i.bind("isEnabled").to(t,"isEnabled"),i.bind("isOn").to(t,"value",(t=>t===e.model)),i.iconView.fillColor=e.color,i.isToggleable=!0}))}_addButton(e,t,i,o,n){const r=this.editor;r.ui.componentFactory.add(e,(e=>{const a=new s.r5(e),l=this.localizedOptionTitles[t]?this.localizedOptionTitles[t]:t;return a.set({label:l,icon:i,tooltip:!0}),a.on("execute",(()=>{r.execute("highlight",{value:o}),r.editing.view.focus()})),n(a),a}))}_addDropdown(e){const t=this.editor,i=t.t,o=t.ui.componentFactory,n=e[0],r=e.reduce(((e,t)=>(e[t.model]=t,e)),{});o.add("highlight",(a=>{const l=t.commands.get("highlight"),c=(0,s.t9)(a,s.Rm),d=c.buttonView;function u(e,t){const i=e&&e!==d.lastExecuted?e:d.lastExecuted;return r[i][t]}return d.set({label:i("Highlight"),tooltip:!0,lastExecuted:n.model,commandValue:n.model,isToggleable:!0}),d.bind("icon").to(l,"value",(e=>_(u(e,"type")))),d.bind("color").to(l,"value",(e=>u(e,"color"))),d.bind("commandValue").to(l,"value",(e=>u(e,"model"))),d.bind("isOn").to(l,"value",(e=>!!e)),d.delegate("execute").to(c),c.bind("isEnabled").to(l,"isEnabled"),(0,s.up)(c,(()=>{const t=e.map((e=>{const t=o.create("highlight:"+e.model);return this.listenTo(t,"execute",(()=>{c.buttonView.set({lastExecuted:e.model})})),t}));return t.push(new s.$y),t.push(o.create("removeHighlight")),t}),{enableActiveItemFocusOnDropdownOpen:!0,ariaLabel:i("Text highlight toolbar")}),function(e){e.buttonView.actionView.iconView.bind("fillColor").to(e.buttonView,"color")}(c),d.on("execute",(()=>{t.execute("highlight",{value:d.commandValue})})),this.listenTo(c,"execute",(()=>{t.editing.view.focus()})),c}))}}function _(e){return"marker"===e?'':''}class v extends o.Sy{static get requires(){return[r,k]}static get pluginName(){return"Highlight"}}},8428:(e,t,i)=>{"use strict";i.r(t),i.d(t,{HorizontalLine:()=>v,HorizontalLineEditing:()=>w,HorizontalLineUI:()=>_});var o=i(6854),n=i(5549);class r extends o.mY{refresh(){const e=this.editor.model,t=e.schema,i=e.document.selection;this.isEnabled=function(e,t,i){const o=function(e,t){const i=(0,n.KT)(e,t).start.parent;return i.isEmpty&&!i.is("element","$root")?i.parent:i}(e,i);return t.checkChild(o,"horizontalLine")}(i,t,e)}execute(){const e=this.editor.model;e.change((t=>{const i=t.createElement("horizontalLine");e.insertObject(i,null,null,{setSelection:"after"})}))}}var s=i(3379),a=i.n(s),l=i(9037),c=i.n(l),d=i(569),u=i.n(d),h=i(8575),m=i.n(h),g=i(9216),p=i.n(g),f=i(9893),b={attributes:{"data-cke":!0}};b.setAttributes=m(),b.insert=u().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=p(),a()(f.Z,b),f.Z&&f.Z.locals&&f.Z.locals;class w extends o.Sy{static get pluginName(){return"HorizontalLineEditing"}init(){const e=this.editor,t=e.model.schema,i=e.t,o=e.conversion;t.register("horizontalLine",{inheritAllFrom:"$blockObject"}),o.for("dataDowncast").elementToElement({model:"horizontalLine",view:(e,{writer:t})=>t.createEmptyElement("hr")}),o.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(e,{writer:t})=>{const o=i("Horizontal line"),r=t.createContainerElement("div",null,t.createEmptyElement("hr"));return t.addClass("ck-horizontal-line",r),t.setCustomProperty("hr",!0,r),function(e,t,i){return t.setCustomProperty("horizontalLine",!0,e),(0,n.XC)(e,t,{label:i})}(r,t,o)}}),o.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new r(e))}}var k=i(7095);class _ extends o.Sy{static get pluginName(){return"HorizontalLineUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("horizontalLine",(i=>{const o=e.commands.get("horizontalLine"),n=new k.r5(i);return n.set({label:t("Horizontal line"),icon:'',tooltip:!0}),n.bind("isEnabled").to(o,"isEnabled"),this.listenTo(n,"execute",(()=>{e.execute("horizontalLine"),e.editing.view.focus()})),n}))}}class v extends o.Sy{static get requires(){return[w,_,n.$L]}static get pluginName(){return"HorizontalLine"}}},4195:(e,t,i)=>{"use strict";i.r(t),i.d(t,{HtmlEmbed:()=>x,HtmlEmbedEditing:()=>v,HtmlEmbedUI:()=>C});var o=i(6854),n=i(5549),r=i(7095),s=i(6553);class a extends o.mY{refresh(){const e=this.editor.model,t=e.schema,i=e.document.selection,o=l(i);this.isEnabled=function(e,t,i){const o=function(e,t){const i=(0,n.KT)(e,t).start.parent;return i.isEmpty&&!i.is("rootElement")?i.parent:i}(e,i);return t.checkChild(o,"rawHtml")}(i,t,e),this.value=o?o.getAttribute("value")||"":null}execute(e){const t=this.editor.model,i=t.document.selection;t.change((o=>{let n;null!==this.value?n=l(i):(n=o.createElement("rawHtml"),t.insertObject(n,null,null,{setSelection:"on"})),o.setAttribute("value",e,n)}))}}function l(e){const t=e.getSelectedElement();return t&&t.is("element","rawHtml")?t:null}var c=i(3379),d=i.n(c),u=i(9037),h=i.n(u),m=i(569),g=i.n(m),p=i(8575),f=i.n(p),b=i(9216),w=i.n(b),k=i(7319),_={attributes:{"data-cke":!0}};_.setAttributes=f(),_.insert=g().bind(null,"head"),_.domAPI=h(),_.insertStyleElement=w(),d()(k.Z,_),k.Z&&k.Z.locals&&k.Z.locals;class v extends o.Sy{static get pluginName(){return"HtmlEmbedEditing"}constructor(e){super(e),this._widgetButtonViewReferences=new Set,e.config.define("htmlEmbed",{showPreviews:!1,sanitizeHtml:e=>((0,s.KE)("html-embed-provide-sanitize-function"),{html:e,hasChanged:!1})})}init(){const e=this.editor;e.model.schema.register("rawHtml",{inheritAllFrom:"$blockObject",allowAttributes:["value"]}),e.commands.add("htmlEmbed",new a(e)),this._setupConversion()}_setupConversion(){const e=this.editor,t=e.t,i=e.editing.view,o=this._widgetButtonViewReferences,r=e.config.get("htmlEmbed");function a({editor:e,domElement:i,state:n,props:r}){i.textContent="";const a=i.ownerDocument;let c;if(n.isEditable){const e={isDisabled:!1,placeholder:r.textareaPlaceholder};c=l({domDocument:a,state:n,props:e}),i.append(c)}else if(n.showPreviews){const o={sanitizeHtml:r.sanitizeHtml};i.append(function({editor:e,domDocument:i,state:o,props:n}){const r=n.sanitizeHtml(o.getRawHtmlValue()),a=o.getRawHtmlValue().length>0?t("No preview available"):t("Empty snippet content"),l=(0,s.az)(i,"div",{class:"ck ck-reset_all raw-html-embed__preview-placeholder"},a),c=(0,s.az)(i,"div",{class:"raw-html-embed__preview-content",dir:e.locale.contentLanguageDirection}),d=i.createRange().createContextualFragment(r.html);c.appendChild(d);return(0,s.az)(i,"div",{class:"raw-html-embed__preview"},[l,c])}({domDocument:a,state:n,props:o,editor:e}))}else{const e={isDisabled:!0,placeholder:r.textareaPlaceholder};i.append(l({domDocument:a,state:n,props:e}))}const d={onEditClick:r.onEditClick,onSaveClick:()=>{r.onSaveClick(c.value)},onCancelClick:r.onCancelClick};i.prepend(function({editor:e,domDocument:t,state:i,props:n}){const r=(0,s.az)(t,"div",{class:"raw-html-embed__buttons-wrapper"});if(i.isEditable){const t=y(e,"save",n.onSaveClick),i=y(e,"cancel",n.onCancelClick);r.append(t.element,i.element),o.add(t).add(i)}else{const t=y(e,"edit",n.onEditClick);r.append(t.element),o.add(t)}return r}({editor:e,domDocument:a,state:n,props:d}))}function l({domDocument:e,state:t,props:i}){const o=(0,s.az)(e,"textarea",{placeholder:i.placeholder,class:"ck ck-reset ck-input ck-input-text raw-html-embed__source"});return o.disabled=i.isDisabled,o.value=t.getRawHtmlValue(),o}this.editor.editing.view.on("render",(()=>{for(const e of o){if(e.element&&e.element.isConnected)return;e.destroy(),o.delete(e)}}),{priority:"lowest"}),e.data.registerRawContentMatcher({name:"div",classes:"raw-html-embed"}),e.conversion.for("upcast").elementToElement({view:{name:"div",classes:"raw-html-embed"},model:(e,{writer:t})=>t.createElement("rawHtml",{value:e.getCustomProperty("$rawContent")})}),e.conversion.for("dataDowncast").elementToElement({model:"rawHtml",view:(e,{writer:t})=>t.createRawElement("div",{class:"raw-html-embed"},(function(t){t.innerHTML=e.getAttribute("value")||""}))}),e.conversion.for("editingDowncast").elementToStructure({model:{name:"rawHtml",attributes:["value"]},view:(o,{writer:s})=>{let l,c,d;const u=s.createRawElement("div",{class:"raw-html-embed__content-wrapper"},(function(t){l=t,a({editor:e,domElement:t,state:c,props:d}),l.addEventListener("mousedown",(()=>{if(c.isEditable){const t=e.model;t.document.selection.getSelectedElement()!==o&&t.change((e=>e.setSelection(o,"on")))}}),!0)})),h={makeEditable(){c=Object.assign({},c,{isEditable:!0}),a({domElement:l,editor:e,state:c,props:d}),i.change((e=>{e.setAttribute("data-cke-ignore-events","true",u)})),l.querySelector("textarea").focus()},save(t){t!==c.getRawHtmlValue()?(e.execute("htmlEmbed",t),e.editing.view.focus()):this.cancel()},cancel(){c=Object.assign({},c,{isEditable:!1}),a({domElement:l,editor:e,state:c,props:d}),e.editing.view.focus(),i.change((e=>{e.removeAttribute("data-cke-ignore-events",u)}))}};c={showPreviews:r.showPreviews,isEditable:!1,getRawHtmlValue:()=>o.getAttribute("value")||""},d={sanitizeHtml:r.sanitizeHtml,textareaPlaceholder:t("Paste raw HTML here..."),onEditClick(){h.makeEditable()},onSaveClick(e){h.save(e)},onCancelClick(){h.cancel()}};const m=s.createContainerElement("div",{class:"raw-html-embed","data-html-embed-label":t("HTML snippet"),dir:e.locale.uiLanguageDirection},u);return s.setCustomProperty("rawHtmlApi",h,m),s.setCustomProperty("rawHtml",!0,m),(0,n.XC)(m,s,{label:t("HTML snippet"),hasSelectionHandle:!0})}})}}function y(e,t,i){const{t:n}=e.locale,s=new r.r5(e.locale),a=e.commands.get("htmlEmbed");return s.set({class:`raw-html-embed__${t}-button`,icon:o.icons.pencil,tooltip:!0,tooltipPosition:"rtl"===e.locale.uiLanguageDirection?"e":"w"}),s.render(),"edit"===t?(s.set({icon:o.icons.pencil,label:n("Edit source")}),s.bind("isEnabled").to(a)):"save"===t?(s.set({icon:o.icons.check,label:n("Save changes")}),s.bind("isEnabled").to(a)):s.set({icon:o.icons.cancel,label:n("Cancel")}),s.on("execute",i),s}class C extends o.Sy{static get pluginName(){return"HtmlEmbedUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("htmlEmbed",(i=>{const o=e.commands.get("htmlEmbed"),n=new r.r5(i);return n.set({label:t("Insert HTML"),icon:'',tooltip:!0}),n.bind("isEnabled").to(o,"isEnabled"),this.listenTo(n,"execute",(()=>{e.execute("htmlEmbed"),e.editing.view.focus(),e.editing.view.document.selection.getSelectedElement().getCustomProperty("rawHtmlApi").makeEditable()})),n}))}}class x extends o.Sy{static get requires(){return[v,C,n.$L]}static get pluginName(){return"HtmlEmbed"}}},9211:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AutoImage:()=>f,Image:()=>G,ImageCaption:()=>ie,ImageCaptionEditing:()=>Q,ImageCaptionUtils:()=>J,ImageEditing:()=>H,ImageInsert:()=>Re,ImageInsertUI:()=>Ie,ImageResize:()=>Ze,ImageResizeButtons:()=>ze,ImageResizeEditing:()=>Be,ImageResizeHandles:()=>Fe,ImageStyle:()=>mt,ImageStyleEditing:()=>nt,ImageStyleUI:()=>ct,ImageTextAlternative:()=>M,ImageTextAlternativeEditing:()=>w,ImageTextAlternativeUI:()=>B,ImageToolbar:()=>gt,ImageUpload:()=>ye,ImageUploadEditing:()=>_e,ImageUploadProgress:()=>me,ImageUploadUI:()=>se,PictureEditing:()=>pt});var o=i(6854),n=i(7197),r=i(3291),s=i(1903),a=i(5187),l=i(6553),c=i(5549);function d(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot("children")])}function u(e,t){const i=e.plugins.get("ImageUtils"),o=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>i.isInlineImageView(e)?o&&("block"==e.getStyle("display")||e.findAncestor(i.isBlockImageView)?"imageBlock":"imageInline")!==t?null:n(e):null;function n(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function h(e,t){const i=(0,l.Ps)(t.getSelectedBlocks());return!i||e.isObject(i)||i.isEmpty&&"listItem"!=i.name?"imageBlock":"imageInline"}class m extends o.Sy{static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,i=null){const o=this.editor,n=o.model,r=n.document.selection;i=g(o,t||r,i),e={...Object.fromEntries(r.getAttributes()),...e};for(const t in e)n.schema.checkAttribute(i,t)||delete e[t];return n.change((o=>{const r=o.createElement(i,e);return n.insertObject(r,t,null,{setSelection:"on",findOptimalPosition:t||"imageInline"==i?void 0:"auto"}),r.parent?r:null}))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const i=e.getSelectedElement();if(i&&this.isImageWidget(i))return i;let o=t.parent;for(;o;){if(o.is("element")&&this.isImageWidget(o))return o;o=o.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){if("imageBlock"==g(e,t,null)){const i=function(e,t){const i=(0,c.KT)(e,t).start.parent;return i.isEmpty&&!i.is("element","$root")?i.parent:i}(t,e.model);if(e.model.schema.checkChild(i,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every((e=>!e.is("element","imageBlock")))}(e)}toImageWidget(e,t,i){return t.setCustomProperty("image",!0,e),(0,c.XC)(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${i}`:i}})}isImageWidget(e){return!!e.getCustomProperty("image")&&(0,c.Qd)(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:i}of t.createRangeIn(e))if(this.isInlineImageView(i))return i}}function g(e,t,i){const o=e.model.schema,n=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?i||("inline"===n?"imageInline":"block"===n?"imageBlock":t.is("selection")?h(o,t):o.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}const p=new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));class f extends o.Sy{static get requires(){return[n.TU,m,s.WP,a.HG]}static get pluginName(){return"AutoImage"}constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,t=e.model.document,i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",(()=>{const e=t.selection.getFirstRange(),i=r.jP.fromPosition(e.start);i.stickiness="toPrevious";const o=r.jP.fromPosition(e.end);o.stickiness="toNext",t.once("change:data",(()=>{this._embedImageBetweenPositions(i,o),i.detach(),o.detach()}),{priority:"high"})})),e.commands.get("undo").on("execute",(()=>{this._timeoutId&&(l.CO.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_embedImageBetweenPositions(e,t){const i=this.editor,o=new r.iE(e,t),n=o.getWalker({ignoreElementEnd:!0}),s=Object.fromEntries(i.model.document.selection.getAttributes()),a=this.editor.plugins.get("ImageUtils");let l="";for(const e of n)e.item.is("$textProxy")&&(l+=e.item.data);l=l.trim(),l.match(p)?(this._positionToInsert=r.jP.fromPosition(e),this._timeoutId=setTimeout((()=>{i.commands.get("insertImage").isEnabled?(i.model.change((e=>{let t;this._timeoutId=null,e.remove(o),o.detach(),"$graveyard"!==this._positionToInsert.root.rootName&&(t=this._positionToInsert.toPosition()),a.insertImage({...s,src:l},t),this._positionToInsert.detach(),this._positionToInsert=null})),i.plugins.get("Delete").requestUndoOnBackspace()):o.detach()}),100)):o.detach()}}class b extends o.mY{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,i=t.plugins.get("ImageUtils"),o=t.model,n=i.getClosestSelectedImageElement(o.document.selection);o.change((t=>{t.setAttribute("alt",e.newValue,n)}))}}class w extends o.Sy{static get requires(){return[m]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new b(this.editor))}}var k=i(7095),_=i(3379),v=i.n(_),y=i(9037),C=i.n(y),x=i(569),A=i.n(x),E=i(8575),T=i.n(E),S=i(9216),P=i.n(S),I=i(5269),V={attributes:{"data-cke":!0}};V.setAttributes=T(),V.insert=A().bind(null,"head"),V.domAPI=C(),V.insertStyleElement=P(),v()(I.Z,V),I.Z&&I.Z.locals&&I.Z.locals,i(2151);class R extends k.G7{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new l.Rh,this.keystrokes=new l.VD,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),o.icons.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),o.icons.cancel,"ck-button-cancel","cancel"),this._focusables=new k.vX,this._focusCycler=new k.I0({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),(0,k.GI)({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,i,o){const n=new k.r5(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.extendTemplate({attributes:{class:i}}),o&&n.delegate("execute").to(this,o),n}_createLabeledInputView(){const e=this.locale.t,t=new k.KP(this.locale,k.R);return t.label=e("Text alternative"),t}}function O(e){const t=e.editing.view,i=k.no.defaultPositions,o=e.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(o.getClosestSelectedImageWidget(t.document.selection)),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast,i.viewportStickyNorth]}}class B extends o.Sy{static get requires(){return[k.WB]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",(i=>{const n=e.commands.get("imageTextAlternative"),r=new k.r5(i);return r.set({label:t("Change image text alternative"),icon:o.icons.lowVision,tooltip:!0}),r.bind("isEnabled").to(n,"isEnabled"),r.bind("isOn").to(n,"value",(e=>!!e)),this.listenTo(r,"execute",(()=>{this._showForm()})),r}))}_createForm(){const e=this.editor,t=e.editing.view.document,i=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new((0,k.RX)(R))(e.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)})),this.listenTo(this._form,"cancel",(()=>{this._hideForm(!0)})),this._form.keystrokes.set("Esc",((e,t)=>{this._hideForm(!0),t()})),this.listenTo(e.ui,"update",(()=>{i.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const i=O(e);t.updatePosition(i)}}(e):this._hideForm(!0)})),(0,k.eC)({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),i=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:O(e)}),i.fieldView.value=i.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class M extends o.Sy{static get requires(){return[w,B]}static get pluginName(){return"ImageTextAlternative"}}function z(e,t){const i=(t,i,o)=>{if(!o.consumable.consume(i.item,t.name))return;const n=o.writer,r=o.mapper.toViewElement(i.item),s=e.findViewImgElement(r);if(null===i.attributeNewValue){const e=i.attributeOldValue;e&&e.data&&(n.removeAttribute("srcset",s),n.removeAttribute("sizes",s),e.width&&n.removeAttribute("width",s))}else{const e=i.attributeNewValue;e&&e.data&&(n.setAttribute("srcset",e.data,s),n.setAttribute("sizes","100vw",s),e.width&&n.setAttribute("width",e.width,s))}};return e=>{e.on(`attribute:srcset:${t}`,i)}}function N(e,t,i){const o=(t,i,o)=>{if(!o.consumable.consume(i.item,t.name))return;const n=o.writer,r=o.mapper.toViewElement(i.item),s=e.findViewImgElement(r);n.setAttribute(i.attributeKey,i.attributeNewValue||"",s)};return e=>{e.on(`attribute:${i}:${t}`,o)}}class D extends r.Qj{observe(e){this.listenTo(e,"load",((e,t)=>{const i=t.target;this.checkShouldIgnoreEventFromTarget(i)||"IMG"==i.tagName&&this._fireEvents(t)}),{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class L extends o.mY{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&(0,l.KE)("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&(0,l.KE)("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=(0,l.qo)(e.source),i=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),n=Object.fromEntries(i.getAttributes());t.forEach(((e,t)=>{const r=i.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&r&&o.isImage(r)){const t=this.editor.model.createPositionAfter(r);o.insertImage({...e,...n},t)}else o.insertImage({...e,...n})}))}}class F extends o.mY{refresh(){const e=this.editor.plugins.get("ImageUtils"),t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=e.isImage(t),this.value=this.isEnabled?t.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement();this.editor.model.change((i=>{i.setAttribute("src",e.source,t),i.removeAttribute("srcset",t),i.removeAttribute("sizes",t)}))}}class H extends o.Sy{static get requires(){return[m]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(D),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:e=>{const t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}});const i=new L(e),o=new F(e);e.commands.add("insertImage",i),e.commands.add("replaceImageSource",o),e.commands.add("imageInsert",i)}}class W extends o.mY{constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(){const e=this.editor,t=this.editor.model,i=e.plugins.get("ImageUtils"),o=i.getClosestSelectedImageElement(t.document.selection),n=Object.fromEntries(o.getAttributes());return n.src||n.uploadId?t.change((e=>{const r=Array.from(t.markers).filter((e=>e.getRange().containsItem(o))),s=i.insertImage(n,t.createSelection(o,"on"),this._modelElementName);if(!s)return null;const a=e.createRangeOn(s);for(const t of r){const i=t.getRange(),o="$graveyard"!=i.root.rootName?i.getJoined(a,!0):a;e.updateMarker(t,{range:o})}return{oldElement:o,newElement:s}})):null}}class Z extends o.Sy{static get requires(){return[H,m,n._l]}static get pluginName(){return"ImageBlockEditing"}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new W(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,o=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:t})=>d(t)}),i.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:i})=>o.toImageWidget(d(i),i,t("image widget"))}),i.for("downcast").add(N(o,"imageBlock","src")).add(N(o,"imageBlock","alt")).add(z(o,"imageBlock")),i.for("upcast").elementToElement({view:u(e,"imageBlock"),model:(e,{writer:t})=>t.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)}).add(function(e){const t=(t,i,o)=>{if(!o.consumable.test(i.viewItem,{name:!0,classes:"image"}))return;const n=e.findViewImgElement(i.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(i.viewItem,{name:!0,classes:"image"});const r=o.convertItem(n,i.modelCursor),s=(0,l.Ps)(r.modelRange.getItems());s?(o.convertChildren(i.viewItem,s),o.updateConversionResult(s,i)):o.consumable.revert(i.viewItem,{name:!0,classes:"image"})};return e=>{e.on("element:figure",t)}}(o))}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,o=e.plugins.get("ImageUtils"),n=e.plugins.get("ClipboardPipeline");this.listenTo(n,"inputTransformation",((n,s)=>{const a=Array.from(s.content.getChildren());let l;if(!a.every(o.isInlineImageView))return;l=s.targetRanges?e.editing.mapper.toModelRange(s.targetRanges[0]):t.document.selection.getFirstRange();const c=t.createSelection(l);if("imageBlock"===h(t.schema,c)){const e=new r.yj(i.document),t=a.map((t=>e.createElement("figure",{class:"image"},t)));s.content=e.createDocumentFragment(t)}}))}}var U=i(2430),j={attributes:{"data-cke":!0}};j.setAttributes=T(),j.insert=A().bind(null,"head"),j.domAPI=C(),j.insertStyleElement=P(),v()(U.Z,j),U.Z&&U.Z.locals&&U.Z.locals;class $ extends o.Sy{static get requires(){return[Z,c.$L,M]}static get pluginName(){return"ImageBlock"}}class q extends o.Sy{static get requires(){return[H,m,n._l]}static get pluginName(){return"ImageInlineEditing"}init(){const e=this.editor,t=e.model.schema;t.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),t.addChildCheck(((e,t)=>{if(e.endsWith("caption")&&"imageInline"===t.name)return!1})),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new W(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,i=e.conversion,o=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),i.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,{writer:i})=>o.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(i),i,t("image widget"))}),i.for("downcast").add(N(o,"imageInline","src")).add(N(o,"imageInline","alt")).add(z(o,"imageInline")),i.for("upcast").elementToElement({view:u(e,"imageInline"),model:(e,{writer:t})=>t.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,i=e.editing.view,o=e.plugins.get("ImageUtils"),n=e.plugins.get("ClipboardPipeline");this.listenTo(n,"inputTransformation",((n,s)=>{const a=Array.from(s.content.getChildren());let l;if(!a.every(o.isBlockImageView))return;l=s.targetRanges?e.editing.mapper.toModelRange(s.targetRanges[0]):t.document.selection.getFirstRange();const c=t.createSelection(l);if("imageInline"===h(t.schema,c)){const e=new r.yj(i.document),t=a.map((t=>1===t.childCount?(Array.from(t.getAttributes()).forEach((i=>e.setAttribute(...i,o.findViewImgElement(t)))),t.getChild(0)):t));s.content=e.createDocumentFragment(t)}}))}}class K extends o.Sy{static get requires(){return[q,c.$L,M]}static get pluginName(){return"ImageInline"}}class G extends o.Sy{static get requires(){return[$,K]}static get pluginName(){return"Image"}}class J extends o.Sy{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[m]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),i=e.getFirstPosition().findAncestor("caption");return i&&t.isBlockImage(i.parent)?i:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return"figcaption"==e.name&&t.isBlockImageView(e.parent)?{name:!0}:null}}class Y extends o.mY{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),i=e.plugins.get("ImageUtils");if(!e.plugins.has(Z))return this.isEnabled=!1,void(this.value=!1);const o=e.model.document.selection,n=o.getSelectedElement();if(!n){const e=t.getCaptionFromModelSelection(o);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=i.isImage(n),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(n):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change((e=>{this.value?this._hideImageCaption(e):this._showImageCaption(e,t)}))}_showImageCaption(e,t){const i=this.editor.model.document.selection,o=this.editor.plugins.get("ImageCaptionEditing"),n=this.editor.plugins.get("ImageUtils");let r=i.getSelectedElement();const s=o._getSavedCaption(r);n.isInlineImage(r)&&(this.editor.execute("imageTypeBlock"),r=i.getSelectedElement());const a=s||e.createElement("caption");e.append(a,r),t&&e.setSelection(a,"in")}_hideImageCaption(e){const t=this.editor,i=t.model.document.selection,o=t.plugins.get("ImageCaptionEditing"),n=t.plugins.get("ImageCaptionUtils");let r,s=i.getSelectedElement();s?r=n.getCaptionFromImageModelElement(s):(r=n.getCaptionFromModelSelection(i),s=r.parent),o._saveCaption(s,r),e.setSelection(s,"on"),e.remove(r)}}class Q extends o.Sy{static get requires(){return[m,J]}static get pluginName(){return"ImageCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new Y(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageUtils"),o=e.plugins.get("ImageCaptionUtils"),n=e.t;e.conversion.for("upcast").elementToElement({view:e=>o.matchImageCaptionViewElement(e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>i.isBlockImage(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:o})=>{if(!i.isBlockImage(e.parent))return null;const s=o.createEditableElement("figcaption");o.setCustomProperty("imageCaption",!0,s),(0,r.ID)({view:t,element:s,text:n("Enter image caption"),keepOnFocus:!0});const a=e.parent.getAttribute("alt"),l=a?n("Caption for image: %0",[a]):n("Caption for the image");return(0,c.sC)(s,o,{label:l})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils"),o=e.commands.get("imageTypeInline"),n=e.commands.get("imageTypeBlock"),r=e=>{if(!e.return)return;const{oldElement:o,newElement:n}=e.return;if(!o)return;if(t.isBlockImage(o)){const e=i.getCaptionFromImageModelElement(o);if(e)return void this._saveCaption(n,e)}const r=this._getSavedCaption(o);r&&this._saveCaption(n,r)};o&&this.listenTo(o,"execute",r,{priority:"low"}),n&&this.listenTo(n,"execute",r,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?r.W_.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,i=e.plugins.get("ImageUtils"),o=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",(()=>{const n=t.document.differ.getChanges();for(const t of n){if("alt"!==t.attributeKey)continue;const n=t.range.start.nodeAfter;if(i.isBlockImage(n)){const t=o.getCaptionFromImageModelElement(n);if(!t)return;e.editing.reconvertItem(t)}}}))}}class X extends o.Sy{static get requires(){return[J]}static get pluginName(){return"ImageCaptionUI"}init(){const e=this.editor,t=e.editing.view,i=e.plugins.get("ImageCaptionUtils"),n=e.t;e.ui.componentFactory.add("toggleImageCaption",(r=>{const s=e.commands.get("toggleImageCaption"),a=new k.r5(r);return a.set({icon:o.icons.caption,tooltip:!0,isToggleable:!0}),a.bind("isOn","isEnabled").to(s,"value","isEnabled"),a.bind("label").to(s,"value",(e=>n(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(a,"execute",(()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const o=i.getCaptionFromModelSelection(e.model.document.selection);if(o){const i=e.editing.mapper.toViewElement(o);t.scrollToTheSelection(),t.change((e=>{e.addClass("image__caption_highlighted",i)}))}e.editing.view.focus()})),a}))}}var ee=i(2423),te={attributes:{"data-cke":!0}};te.setAttributes=T(),te.insert=A().bind(null,"head"),te.domAPI=C(),te.insertStyleElement=P(),v()(ee.Z,te),ee.Z&&ee.Z.locals&&ee.Z.locals;class ie extends o.Sy{static get requires(){return[Q,X]}static get pluginName(){return"ImageCaption"}}var oe=i(1070);function ne(e){const t=e.map((e=>e.replace("+","\\+")));return new RegExp(`^image\\/(${t.join("|")})$`)}function re(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class se extends o.Sy{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=e.t,i=i=>{const n=new oe.FileDialogButtonView(i),r=e.commands.get("uploadImage"),s=e.config.get("image.upload.types"),a=ne(s);return n.set({acceptedType:s.map((e=>`image/${e}`)).join(","),allowMultipleFiles:!0}),n.buttonView.set({label:t("Insert image"),icon:o.icons.image,tooltip:!0}),n.buttonView.bind("isEnabled").to(r),n.on("done",((t,i)=>{const o=Array.from(i).filter((e=>a.test(e.type)));o.length&&(e.execute("uploadImage",{file:o}),e.editing.view.focus())})),n};e.ui.componentFactory.add("uploadImage",i),e.ui.componentFactory.add("imageUpload",i)}}var ae=i(2926),le={attributes:{"data-cke":!0}};le.setAttributes=T(),le.insert=A().bind(null,"head"),le.domAPI=C(),le.insertStyleElement=P(),v()(ae.Z,le),ae.Z&&ae.Z.locals&&ae.Z.locals;var ce=i(1547),de={attributes:{"data-cke":!0}};de.setAttributes=T(),de.insert=A().bind(null,"head"),de.domAPI=C(),de.insertStyleElement=P(),v()(ce.Z,de),ce.Z&&ce.Z.locals&&ce.Z.locals;var ue=i(6618),he={attributes:{"data-cke":!0}};he.setAttributes=T(),he.insert=A().bind(null,"head"),he.domAPI=C(),he.insertStyleElement=P(),v()(ue.Z,he),ue.Z&&ue.Z.locals&&ue.Z.locals;class me extends o.Sy{static get pluginName(){return"ImageUploadProgress"}constructor(e){super(e),this.uploadStatusChange=(e,t,i)=>{const o=this.editor,n=t.item,r=n.getAttribute("uploadId");if(!i.consumable.consume(t.item,e.name))return;const s=o.plugins.get("ImageUtils"),a=o.plugins.get(oe.FileRepository),l=r?t.attributeNewValue:null,c=this.placeholder,d=o.editing.mapper.toViewElement(n),u=i.writer;if("reading"==l)return ge(d,u),void pe(s,c,d,u);if("uploading"==l){const e=a.loaders.get(r);return ge(d,u),void(e?(fe(d,u),function(e,t,i,o){const n=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),n),i.on("change:uploadedPercent",((e,t,i)=>{o.change((e=>{e.setStyle("width",i+"%",n)}))}))}(d,u,e,o.editing.view),function(e,t,i,o){if(o.data){const n=e.findViewImgElement(t);i.setAttribute("src",o.data,n)}}(s,d,u,e)):pe(s,c,d,u))}"complete"==l&&a.loaders.get(r)&&function(e,t,i){const o=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),o),setTimeout((()=>{i.change((e=>e.remove(e.createRangeOn(o))))}),3e3)}(d,u,o.editing.view),function(e,t){we(e,t,"progressBar")}(d,u),fe(d,u),function(e,t){t.removeClass("ck-appear",e)}(d,u)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function ge(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function pe(e,t,i,o){i.hasClass("ck-image-upload-placeholder")||o.addClass("ck-image-upload-placeholder",i);const n=e.findViewImgElement(i);n.getAttribute("src")!==t&&o.setAttribute("src",t,n),be(i,"placeholder")||o.insert(o.createPositionAfter(n),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(o))}function fe(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),we(e,t,"placeholder")}function be(e,t){for(const i of e.getChildren())if(i.getCustomProperty(t))return i}function we(e,t,i){const o=be(e,i);o&&t.remove(t.createRangeOn(o))}class ke extends o.mY{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),i=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(i)}execute(e){const t=(0,l.qo)(e.file),i=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),n=Object.fromEntries(i.getAttributes());t.forEach(((e,t)=>{const r=i.getSelectedElement();if(t&&r&&o.isImage(r)){const t=this.editor.model.createPositionAfter(r);this._uploadImage(e,n,t)}else this._uploadImage(e,n)}))}_uploadImage(e,t,i){const o=this.editor,n=o.plugins.get(oe.FileRepository).createLoader(e),r=o.plugins.get("ImageUtils");n&&r.insertImage({...t,uploadId:n.id},i)}}class _e extends o.Sy{static get requires(){return[oe.FileRepository,k.P_,n._l,m]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,i=e.conversion,o=e.plugins.get(oe.FileRepository),n=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline"),a=ne(e.config.get("image.upload.types")),c=new ke(e);e.commands.add("uploadImage",c),e.commands.add("imageUpload",c),i.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",((t,i)=>{if(o=i.dataTransfer,Array.from(o.types).includes("text/html")&&""!==o.getData("text/html"))return;var o;const n=Array.from(i.dataTransfer.files).filter((e=>!!e&&a.test(e.type)));n.length&&(t.stop(),e.model.change((t=>{i.targetRanges&&t.setSelection(i.targetRanges.map((t=>e.editing.mapper.toModelRange(t)))),e.model.enqueueChange((()=>{e.execute("uploadImage",{file:n})}))})))})),this.listenTo(s,"inputTransformation",((t,i)=>{const s=Array.from(e.editing.view.createRangeIn(i.content)).map((e=>e.item)).filter((e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src")||!t.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!t.getAttribute("src").match(/^blob:/g))}(n,e)&&!e.getAttribute("uploadProcessed"))).map((e=>{return{promise:(t=e,new Promise(((e,i)=>{const o=t.getAttribute("src");fetch(o).then((e=>e.blob())).then((t=>{const i=re(t,o),n=i.replace("image/",""),r=new File([t],`image.${n}`,{type:i});e(r)})).catch((t=>t&&"TypeError"===t.name?function(e){return function(e){return new Promise(((t,i)=>{const o=l.CO.document.createElement("img");o.addEventListener("load",(()=>{const e=l.CO.document.createElement("canvas");e.width=o.width,e.height=o.height,e.getContext("2d").drawImage(o,0,0),e.toBlob((e=>e?t(e):i()))})),o.addEventListener("error",(()=>i())),o.src=e}))}(e).then((t=>{const i=re(t,e),o=i.replace("image/","");return new File([t],`image.${o}`,{type:i})}))}(o).then(e).catch(i):i(t)))}))),imageElement:e};var t}));if(!s.length)return;const a=new r.yj(e.editing.view.document);for(const e of s){a.setAttribute("uploadProcessed",!0,e.imageElement);const t=o.createLoader(e.promise);t&&(a.setAttribute("src","",e.imageElement),a.setAttribute("uploadId",t.id,e.imageElement))}})),e.editing.view.document.on("dragover",((e,t)=>{t.preventDefault()})),t.on("change",(()=>{const i=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),n=new Set;for(const t of i)if("insert"==t.type&&"$text"!=t.name){const i=t.position.nodeAfter,r="$graveyard"==t.position.root.rootName;for(const t of ve(e,i)){const e=t.getAttribute("uploadId");if(!e)continue;const i=o.loaders.get(e);i&&(r?n.has(e)||i.abort():(n.add(e),this._uploadImageElements.set(e,t),"idle"==i.status&&this._readAndUpload(i)))}}})),this.on("uploadComplete",((e,{imageElement:t,data:i})=>{const o=i.urls?i.urls:i;this.editor.model.change((e=>{e.setAttribute("src",o.default,t),this._parseAndSetSrcsetAttributeOnImage(o,t,e)}))}),{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){const t=this.editor,i=t.model,o=t.locale.t,n=t.plugins.get(oe.FileRepository),r=t.plugins.get(k.P_),s=t.plugins.get("ImageUtils"),a=this._uploadImageElements;return i.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","reading",a.get(e.id))})),e.read().then((()=>{const o=e.upload(),n=a.get(e.id);if(l.OB.isSafari){const e=t.editing.mapper.toViewElement(n),i=s.findViewImgElement(e);t.editing.view.once("render",(()=>{if(!i.parent)return;const e=t.editing.view.domConverter.mapViewToDom(i.parent);if(!e)return;const o=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=o}))}return i.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","uploading",n)})),o})).then((t=>{i.enqueueChange({isUndoable:!1},(i=>{const o=a.get(e.id);i.setAttribute("uploadStatus","complete",o),this.fire("uploadComplete",{data:t,imageElement:o})})),c()})).catch((t=>{if("error"!==e.status&&"aborted"!==e.status)throw t;"error"==e.status&&t&&r.showWarning(t,{title:o("Upload failed"),namespace:"upload"}),i.enqueueChange({isUndoable:!1},(t=>{t.remove(a.get(e.id))})),c()}));function c(){i.enqueueChange({isUndoable:!1},(t=>{const i=a.get(e.id);t.removeAttribute("uploadId",i),t.removeAttribute("uploadStatus",i),a.delete(e.id)})),n.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,i){let o=0;const n=Object.keys(e).filter((e=>{const t=parseInt(e,10);if(!isNaN(t))return o=Math.max(o,t),!0})).map((t=>`${e[t]} ${t}w`)).join(", ");""!=n&&i.setAttribute("srcset",{data:n,width:o},t)}}function ve(e,t){const i=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter((e=>i.isImage(e.item))).map((e=>e.item))}class ye extends o.Sy{static get pluginName(){return"ImageUpload"}static get requires(){return[_e,se,me]}}var Ce=i(8340),xe={attributes:{"data-cke":!0}};xe.setAttributes=T(),xe.insert=A().bind(null,"head"),xe.domAPI=C(),xe.insertStyleElement=P(),v()(Ce.Z,xe),Ce.Z&&Ce.Z.locals&&Ce.Z.locals;class Ae extends k.G7{constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",i.to("class")],role:i.to("_role"),"aria-labelledby":i.to("_ariaLabelledBy")},children:this.children})}}var Ee=i(8879),Te={attributes:{"data-cke":!0}};Te.setAttributes=T(),Te.insert=A().bind(null,"head"),Te.domAPI=C(),Te.insertStyleElement=P(),v()(Ee.Z,Te),Ee.Z&&Ee.Z.locals&&Ee.Z.locals;class Se extends k.G7{constructor(e,t={}){super(e);const{insertButtonView:i,cancelButtonView:o}=this._createActionButtons(e);this.insertButtonView=i,this.cancelButtonView=o,this.set("imageURLInputValue",""),this.focusTracker=new l.Rh,this.keystrokes=new l.VD,this._focusables=new k.vX,this._focusCycler=new k.I0({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.set("_integrations",new l.FE);for(const[e,i]of Object.entries(t))"insertImageViaUrl"===e&&(i.fieldView.bind("value").to(this,"imageURLInputValue",(e=>e||"")),i.fieldView.on("input",(()=>{this.imageURLInputValue=i.fieldView.element.value.trim()}))),i.name=e,this._integrations.add(i);this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:"-1"},children:[...this._integrations,new Ae(e,{children:[this.insertButtonView,this.cancelButtonView],class:"ck-image-insert-form__action-row"})]})}render(){super.render(),(0,k.GI)({view:this});const e=[...this._integrations,this.insertButtonView,this.cancelButtonView];e.forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element);const t=e=>e.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t),this.listenTo(e[0].element,"selectstart",((e,t)=>{t.stopPropagation()}),{priority:"high"})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}getIntegration(e){return this._integrations.find((t=>t.name===e))}_createActionButtons(e){const t=e.t,i=new k.r5(e),n=new k.r5(e);return i.set({label:t("Insert"),icon:o.icons.check,class:"ck-button-save",type:"submit",withText:!0,isEnabled:this.imageURLInputValue}),n.set({label:t("Cancel"),icon:o.icons.cancel,class:"ck-button-cancel",withText:!0}),i.bind("isEnabled").to(this,"imageURLInputValue",(e=>!!e)),i.delegate("execute").to(this,"submit"),n.delegate("execute").to(this,"cancel"),{insertButtonView:i,cancelButtonView:n}}focus(){this._focusCycler.focusFirst()}}function Pe(e){const t=e.t,i=new k.KP(e,k.R);return i.set({label:t("Insert image via URL")}),i.fieldView.placeholder="https://example.com/image.png",i}class Ie extends o.Sy{static get pluginName(){return"ImageInsertUI"}init(){const e=this.editor,t=e=>this._createDropdownView(e);e.ui.componentFactory.add("insertImage",t),e.ui.componentFactory.add("imageInsert",t)}_createDropdownView(e){const t=this.editor,i=e.t,n=t.commands.get("uploadImage"),r=t.commands.get("insertImage");this.dropdownView=(0,k.t9)(e,n?k.Rm:void 0);const s=this.dropdownView.buttonView,a=this.dropdownView.panelView;if(s.set({label:i("Insert image"),icon:o.icons.image,tooltip:!0}),a.extendTemplate({attributes:{class:"ck-image-insert__panel"}}),n){const e=this.dropdownView.buttonView;e.actionView=t.ui.componentFactory.create("uploadImage"),e.actionView.extendTemplate({attributes:{class:"ck ck-button ck-splitbutton__action"}})}return this._setUpDropdown(n||r)}_setUpDropdown(e){const t=this.editor,i=t.t,o=this.dropdownView,n=o.panelView,r=this.editor.plugins.get("ImageUtils"),s=t.commands.get("replaceImageSource");let a;function l(){t.editing.view.focus(),o.isOpen=!1}return o.bind("isEnabled").to(e),o.once("change:isOpen",(()=>{a=new Se(t.locale,function(e){const t=e.config.get("image.insert.integrations"),i=e.plugins.get("ImageInsertUI"),o={insertImageViaUrl:Pe(e.locale)};if(!t)return o;if(t.find((e=>"openCKFinder"===e))&&e.ui.componentFactory.has("ckfinder")){const t=e.ui.componentFactory.create("ckfinder");t.set({withText:!0,class:"ck-image-insert__ck-finder-button"}),t.delegate("execute").to(i,"cancel"),o.openCKFinder=t}return t.reduce(((t,i)=>(o[i]?t[i]=o[i]:e.ui.componentFactory.has(i)&&(t[i]=e.ui.componentFactory.create(i)),t)),{})}(t)),a.delegate("submit","cancel").to(o),n.children.add(a)})),o.on("change:isOpen",(()=>{const e=t.model.document.selection.getSelectedElement(),n=a.insertButtonView,l=a.getIntegration("insertImageViaUrl");o.isOpen&&(r.isImage(e)?(a.imageURLInputValue=s.value,n.label=i("Update"),l.label=i("Update image URL")):(a.imageURLInputValue="",n.label=i("Insert"),l.label=i("Insert image via URL")))}),{priority:"low"}),this.delegate("cancel").to(o),o.on("submit",(()=>{l(),function(){const e=t.model.document.selection.getSelectedElement();r.isImage(e)?t.execute("replaceImageSource",{source:a.imageURLInputValue}):t.execute("insertImage",{source:a.imageURLInputValue})}()})),o.on("cancel",(()=>{l()})),o}}class Ve extends o.Sy{static get pluginName(){return"ImageInsertViaUrl"}static get requires(){return[Ie]}}class Re extends o.Sy{static get pluginName(){return"ImageInsert"}static get requires(){return[ye,Ve,Ie]}}class Oe extends o.mY{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!t,t&&t.hasAttribute("width")?this.value={width:t.getAttribute("width"),height:null}:this.value=null}execute(e){const t=this.editor,i=t.model,o=t.plugins.get("ImageUtils").getClosestSelectedImageElement(i.document.selection);this.value={width:e.width,height:null},o&&i.change((t=>{t.setAttribute("width",e.width,o)}))}}class Be extends o.Sy{static get requires(){return[m]}static get pluginName(){return"ImageResizeEditing"}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new Oe(e);this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:"width"}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:"width"})}_registerConverters(e){const t=this.editor;t.conversion.for("downcast").add((t=>t.on(`attribute:width:${e}`,((e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const o=i.writer,n=i.mapper.toViewElement(t.item);null!==t.attributeNewValue?(o.setStyle("width",t.attributeNewValue,n),o.addClass("image_resized",n)):(o.removeStyle("width",n),o.removeClass("image_resized",n))})))),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{width:/.+/}},model:{key:"width",value:e=>e.getStyle("width")}})}}const Me={small:o.icons.objectSizeSmall,medium:o.icons.objectSizeMedium,large:o.icons.objectSizeLarge,original:o.icons.objectSizeFull};class ze extends o.Sy{static get requires(){return[Be]}static get pluginName(){return"ImageResizeButtons"}constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),i=e.commands.get("resizeImage");this.bind("isEnabled").to(i);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:i,value:o,icon:n}=e,r=o?o+this._resizeUnit:null;t.ui.componentFactory.add(i,(i=>{const o=new k.r5(i),s=t.commands.get("resizeImage"),a=this._getOptionLabelValue(e,!0);if(!Me[n])throw new l.Bb("imageresizebuttons-missing-icon",t,e);return o.set({label:a,icon:Me[n],tooltip:a,isToggleable:!0}),o.bind("isEnabled").to(this),o.bind("isOn").to(s,"value",Ne(r)),this.listenTo(o,"execute",(()=>{t.execute("resizeImage",{width:r})})),o}))}_registerImageResizeDropdown(e){const t=this.editor,i=t.t,o=e.find((e=>!e.value)),n=n=>{const r=t.commands.get("resizeImage"),s=(0,k.t9)(n,k.J0),a=s.buttonView;return a.set({tooltip:i("Resize image"),commandValue:o.value,icon:Me.medium,isToggleable:!0,label:this._getOptionLabelValue(o),withText:!0,class:"ck-resize-image-button"}),a.bind("label").to(r,"value",(e=>e&&e.width?e.width:this._getOptionLabelValue(o))),s.bind("isEnabled").to(this),(0,k.Pm)(s,(()=>this._getResizeDropdownListItemDefinitions(e,r)),{ariaLabel:i("Image resize list")}),this.listenTo(s,"execute",(e=>{t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus()})),s};t.ui.componentFactory.add("resizeImage",n),t.ui.componentFactory.add("imageResize",n)}_getOptionLabelValue(e,t=!1){const i=this.editor.t;return e.label?e.label:t?e.value?i("Resize image to %0",e.value+this._resizeUnit):i("Resize image to the original size"):e.value?e.value+this._resizeUnit:i("Original")}_getResizeDropdownListItemDefinitions(e,t){const i=new l.FE;return e.map((e=>{const o=e.value?e.value+this._resizeUnit:null,n={type:"button",model:new k.Hn({commandName:"resizeImage",commandValue:o,label:this._getOptionLabelValue(e),withText:!0,icon:null})};n.model.bind("isOn").to(t,"value",Ne(o)),i.add(n)})),i}}function Ne(e){return t=>null===e&&t===e||null!==t&&t.width===e}const De=/(image|image-inline)/,Le="image_resized";class Fe extends o.Sy{static get requires(){return[c.WR]}static get pluginName(){return"ImageResizeHandles"}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view;t.addObserver(D),this.listenTo(t.document,"imageLoaded",((i,o)=>{if(!o.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const n=e.editing.view.domConverter,r=n.domToView(o.target).findAncestor({classes:De});let s=this.editor.plugins.get(c.WR).getResizerByViewElement(r);if(s)return void s.redraw();const a=e.editing.mapper,l=a.toModelElement(r);s=e.plugins.get(c.WR).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:l,viewElement:r,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:()=>n.mapViewToDom(a.toViewElement(l.parent)),isCentered(){const e=l.getAttribute("imageStyle");return!e||"block"==e||"alignCenter"==e},onCommit(i){t.change((e=>{e.removeClass(Le,r)})),e.execute("resizeImage",{width:i})}}),s.on("updateSize",(()=>{r.hasClass(Le)||t.change((e=>{e.addClass(Le,r)}))})),s.bind("isEnabled").to(this)}))}}var He=i(2400),We={attributes:{"data-cke":!0}};We.setAttributes=T(),We.insert=A().bind(null,"head"),We.domAPI=C(),We.insertStyleElement=P(),v()(He.Z,We),He.Z&&He.Z.locals&&He.Z.locals;class Ze extends o.Sy{static get requires(){return[Be,Fe,ze]}static get pluginName(){return"ImageResize"}}class Ue extends o.mY{constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map((e=>{if(e.isDefault)for(const t of e.modelElements)this._defaultStyles[t]=e.name;return[e.name,e]})))}refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?e.hasAttribute("imageStyle")?this.value=e.getAttribute("imageStyle"):this.value=this._defaultStyles[e.name]:this.value=!1}execute(e={}){const t=this.editor,i=t.model,o=t.plugins.get("ImageUtils");i.change((t=>{const n=e.value;let r=o.getClosestSelectedImageElement(i.document.selection);n&&this.shouldConvertImageType(n,r)&&(this.editor.execute(o.isBlockImage(r)?"imageTypeInline":"imageTypeBlock"),r=o.getClosestSelectedImageElement(i.document.selection)),!n||this._styles.get(n).isDefault?t.removeAttribute("imageStyle",r):t.setAttribute("imageStyle",n,r)}))}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const{objectFullWidth:je,objectInline:$e,objectLeft:qe,objectRight:Ke,objectCenter:Ge,objectBlockLeft:Je,objectBlockRight:Ye}=o.icons,Qe={get inline(){return{name:"inline",title:"In line",icon:$e,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:qe,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:Je,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:Ge,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:Ke,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:Ye,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:Ge,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:Ke,modelElements:["imageBlock"],className:"image-style-side"}}},Xe={full:je,left:Je,right:Ye,center:Ge,inlineLeft:qe,inlineRight:Ke,inline:$e},et=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function tt(e){(0,l.KE)("image-style-configuration-definition-invalid",e)}const it={normalizeStyles:function(e){return(e.configuredStyles.options||[]).map((e=>{return"string"==typeof(t="string"==typeof(t=e)?Qe[t]?{...Qe[t]}:{name:t}:function(e,t){const i={...t};for(const o in e)Object.prototype.hasOwnProperty.call(t,o)||(i[o]=e[o]);return i}(Qe[t.name],t)).icon&&(t.icon=Xe[t.icon]||t.icon),t;var t})).filter((t=>function(e,{isBlockPluginLoaded:t,isInlinePluginLoaded:i}){const{modelElements:o,name:n}=e;if(!(o&&o.length&&n))return tt({style:e}),!1;{const n=[t?"imageBlock":null,i?"imageInline":null];if(!o.some((e=>n.includes(e))))return(0,l.KE)("image-style-missing-dependency",{style:e,missingPlugins:o.map((e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(t,e)))},getDefaultStylesConfiguration:function(e,t){return e&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:e?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(e){return e.has("ImageBlockEditing")&&e.has("ImageInlineEditing")?[...et]:[]},warnInvalidStyle:tt,DEFAULT_OPTIONS:Qe,DEFAULT_ICONS:Xe,DEFAULT_DROPDOWN_DEFINITIONS:et};function ot(e,t){for(const i of t)if(i.name===e)return i}class nt extends o.Sy{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[m]}init(){const{normalizeStyles:e,getDefaultStylesConfiguration:t}=it,i=this.editor,o=i.plugins.has("ImageBlockEditing"),n=i.plugins.has("ImageInlineEditing");i.config.define("image.styles",t(o,n)),this.normalizedStyles=e({configuredStyles:i.config.get("image.styles"),isBlockPluginLoaded:o,isInlinePluginLoaded:n}),this._setupConversion(o,n),this._setupPostFixer(),i.commands.add("imageStyle",new Ue(i,this.normalizedStyles))}_setupConversion(e,t){const i=this.editor,o=i.model.schema,n=(r=this.normalizedStyles,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const o=ot(t.attributeNewValue,r),n=ot(t.attributeOldValue,r),s=i.mapper.toViewElement(t.item),a=i.writer;n&&a.removeClass(n.className,s),o&&a.addClass(o.className,s)});var r;const s=function(e){const t={imageInline:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageInline"))),imageBlock:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageBlock")))};return(e,i,o)=>{if(!i.modelRange)return;const n=i.viewItem,r=(0,l.Ps)(i.modelRange.getItems());if(r&&o.schema.checkAttribute(r,"imageStyle"))for(const e of t[r.name])o.consumable.consume(n,{classes:e.className})&&o.writer.setAttribute("imageStyle",e.name,r)}}(this.normalizedStyles);i.editing.downcastDispatcher.on("attribute:imageStyle",n),i.data.downcastDispatcher.on("attribute:imageStyle",n),e&&(o.extend("imageBlock",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),t&&(o.extend("imageInline",{allowAttributes:"imageStyle"}),i.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,i=e.plugins.get(m),o=new Map(this.normalizedStyles.map((e=>[e.name,e])));t.registerPostFixer((e=>{let n=!1;for(const r of t.differ.getChanges())if("insert"==r.type||"attribute"==r.type&&"imageStyle"==r.attributeKey){let t="insert"==r.type?r.position.nodeAfter:r.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!i.isImage(t))continue;const s=t.getAttribute("imageStyle");if(!s)continue;const a=o.get(s);a&&a.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),n=!0)}return n}))}}var rt=i(7226),st=i(9203),at=i(3534),lt={attributes:{"data-cke":!0}};lt.setAttributes=T(),lt.insert=A().bind(null,"head"),lt.domAPI=C(),lt.insertStyleElement=P(),v()(at.Z,lt),at.Z&&at.Z.locals&&at.Z.locals;class ct extends o.Sy{static get requires(){return[nt]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],i=dt(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const e of i)this._createButton(e);const o=dt([...t.filter(rt.Z),...it.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const e of o)this._createDropdown(e,i)}_createDropdown(e,t){const i=this.editor.ui.componentFactory;i.add(e.name,(o=>{let n;const{defaultItem:r,items:s,title:a}=e,l=s.filter((e=>t.find((({name:t})=>ut(t)===e)))).map((e=>{const t=i.create(e);return e===r&&(n=t),t}));s.length!==l.length&&it.warnInvalidStyle({dropdown:e});const c=(0,k.t9)(o,k.Rm),d=c.buttonView,u=d.arrowView;return(0,k.up)(c,l,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:ht(a,n.label),class:null,tooltip:!0}),u.unbind("label"),u.set({label:a}),d.bind("icon").toMany(l,"isOn",((...e)=>{const t=e.findIndex(st.Z);return t<0?n.icon:l[t].icon})),d.bind("label").toMany(l,"isOn",((...e)=>{const t=e.findIndex(st.Z);return ht(a,t<0?n.label:l[t].label)})),d.bind("isOn").toMany(l,"isOn",((...e)=>e.some(st.Z))),d.bind("class").toMany(l,"isOn",((...e)=>e.some(st.Z)?"ck-splitbutton_flatten":void 0)),d.on("execute",(()=>{l.some((({isOn:e})=>e))?c.isOpen=!c.isOpen:n.fire("execute")})),c.bind("isEnabled").toMany(l,"isEnabled",((...e)=>e.some(st.Z))),this.listenTo(c,"execute",(()=>{this.editor.editing.view.focus()})),c}))}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(ut(t),(i=>{const o=this.editor.commands.get("imageStyle"),n=new k.r5(i);return n.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),n.bind("isEnabled").to(o,"isEnabled"),n.bind("isOn").to(o,"value",(e=>e===t)),n.on("execute",this._executeCommand.bind(this,t)),n}))}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function dt(e,t){for(const i of e)t[i.title]&&(i.title=t[i.title]);return e}function ut(e){return`imageStyle:${e}`}function ht(e,t){return(e?e+": ":"")+t}class mt extends o.Sy{static get requires(){return[nt,ct]}static get pluginName(){return"ImageStyle"}}class gt extends o.Sy{static get requires(){return[c.e8,m]}static get pluginName(){return"ImageToolbar"}afterInit(){const e=this.editor,t=e.t,i=e.plugins.get(c.e8),o=e.plugins.get("ImageUtils");var n;i.register("image",{ariaLabel:t("Image toolbar"),items:(n=e.config.get("image.toolbar")||[],n.map((e=>(0,rt.Z)(e)?e.name:e))),getRelatedElement:e=>o.getClosestSelectedImageWidget(e)})}}class pt extends o.Sy{static get requires(){return[H,m]}static get pluginName(){return"PictureEditing"}afterInit(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:["sources"]}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:["sources"]}),this._setupConversion(),this._setupImageUploadEditingIntegration()}_setupConversion(){const e=this.editor,t=e.conversion,i=e.plugins.get("ImageUtils");t.for("upcast").add(function(e){const t=["srcset","media","type","sizes"],i=(i,o,n)=>{const r=o.viewItem;if(!n.consumable.test(r,{name:!0}))return;const s=new Map;for(const e of r.getChildren())if(e.is("element","source")){const i={};for(const o of t)e.hasAttribute(o)&&n.consumable.test(e,{attributes:o})&&(i[o]=e.getAttribute(o));Object.keys(i).length&&s.set(e,i)}const a=e.findViewImgElement(r);if(!a)return;let c=o.modelCursor.parent;if(!c.is("element","imageBlock")){const e=n.convertItem(a,o.modelCursor);o.modelRange=e.modelRange,o.modelCursor=e.modelCursor,c=(0,l.Ps)(e.modelRange.getItems())}n.consumable.consume(r,{name:!0});for(const[e,t]of s)n.consumable.consume(e,{attributes:Object.keys(t)});s.size&&n.writer.setAttribute("sources",Array.from(s.values()),c),n.convertChildren(r,c)};return e=>{e.on("element:picture",i)}}(i)),t.for("downcast").add(function(e){const t=(t,i,o)=>{if(!o.consumable.consume(i.item,t.name))return;const n=o.writer,r=o.mapper.toViewElement(i.item),s=e.findViewImgElement(r),a=i.attributeNewValue;if(a&&a.length){const e=n.createContainerElement("picture",null,a.map((e=>n.createEmptyElement("source",e)))),t=[];let i=s.parent;for(;i&&i.is("attributeElement");){const e=i.parent;n.unwrap(n.createRangeOn(s),i),t.unshift(i),i=e}n.insert(n.createPositionBefore(s),e),n.move(n.createRangeOn(s),n.createPositionAt(e,"end"));for(const i of t)n.wrap(n.createRangeOn(e),i)}else if(s.parent.is("element","picture")){const e=s.parent;n.move(n.createRangeOn(s),n.createPositionBefore(e)),n.remove(e)}};return e=>{e.on("attribute:sources:imageBlock",t),e.on("attribute:sources:imageInline",t)}}(i))}_setupImageUploadEditingIntegration(){const e=this.editor;if(!e.plugins.has("ImageUploadEditing"))return;const t=e.plugins.get("ImageUploadEditing");this.listenTo(t,"uploadComplete",((t,{imageElement:i,data:o})=>{const n=o.sources;n&&e.model.change((e=>{e.setAttributes({sources:n},i)}))}))}}},3531:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Indent:()=>c,IndentBlock:()=>f,IndentEditing:()=>n,IndentUI:()=>l});var o=i(6854);class n extends o.Sy{static get pluginName(){return"IndentEditing"}init(){const e=this.editor;e.commands.add("indent",new o.AJ(e)),e.commands.add("outdent",new o.AJ(e))}}var r=i(7095);const s='',a='';class l extends o.Sy{static get pluginName(){return"IndentUI"}init(){const e=this.editor,t=e.locale,i=e.t,o="ltr"==t.uiLanguageDirection?s:a,n="ltr"==t.uiLanguageDirection?a:s;this._defineButton("indent",i("Increase indent"),o),this._defineButton("outdent",i("Decrease indent"),n)}_defineButton(e,t,i){const o=this.editor;o.ui.componentFactory.add(e,(n=>{const s=o.commands.get(e),a=new r.r5(n);return a.set({label:t,icon:i,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",(()=>{o.execute(e),o.editing.view.focus()})),a}))}}class c extends o.Sy{static get pluginName(){return"Indent"}static get requires(){return[n,l]}}var d=i(3291),u=i(6553);class h extends o.mY{constructor(e,t){super(e),this._indentBehavior=t}refresh(){const e=this.editor.model,t=(0,u.Ps)(e.document.selection.getSelectedBlocks());t&&e.schema.checkAttribute(t,"blockIndent")?this.isEnabled=this._indentBehavior.checkEnabled(t.getAttribute("blockIndent")):this.isEnabled=!1}execute(){const e=this.editor.model,t=function(e){const t=e.document.selection,i=e.schema;return Array.from(t.getSelectedBlocks()).filter((e=>i.checkAttribute(e,"blockIndent")))}(e);e.change((e=>{for(const i of t){const t=i.getAttribute("blockIndent"),o=this._indentBehavior.getNextIndent(t);o?e.setAttribute("blockIndent",o,i):e.removeAttribute("blockIndent",i)}}))}}class m{constructor(e){this.isForward="forward"===e.direction,this.offset=e.offset,this.unit=e.unit}checkEnabled(e){const t=parseFloat(e||"0");return this.isForward||t>0}getNextIndent(e){const t=parseFloat(e||"0");if(e&&!e.endsWith(this.unit))return this.isForward?this.offset+this.unit:void 0;const i=t+(this.isForward?this.offset:-this.offset);return i>0?i+this.unit:void 0}}class g{constructor(e){this.isForward="forward"===e.direction,this.classes=e.classes}checkEnabled(e){const t=this.classes.indexOf(e);return this.isForward?t=0}getNextIndent(e){const t=this.classes.indexOf(e),i=this.isForward?1:-1;return this.classes[t+i]}}const p=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class f extends o.Sy{constructor(e){super(e),e.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}init(){const e=this.editor,t=e.config.get("indentBlock");t.classes&&t.classes.length?(this._setupConversionUsingClasses(t.classes),e.commands.add("indentBlock",new h(e,new g({direction:"forward",classes:t.classes}))),e.commands.add("outdentBlock",new h(e,new g({direction:"backward",classes:t.classes})))):(e.data.addStyleProcessorRules(d.vt),this._setupConversionUsingOffset(),e.commands.add("indentBlock",new h(e,new m({direction:"forward",offset:t.offset,unit:t.unit}))),e.commands.add("outdentBlock",new h(e,new m({direction:"backward",offset:t.offset,unit:t.unit}))))}afterInit(){const e=this.editor,t=e.model.schema,i=e.commands.get("indent"),o=e.commands.get("outdent"),n=e.config.get("heading.options");(n&&n.map((e=>e.model))||p).forEach((e=>{t.isRegistered(e)&&t.extend(e,{allowAttributes:"blockIndent"})})),t.setAttributeProperties("blockIndent",{isFormatting:!0}),i.registerChildCommand(e.commands.get("indentBlock")),o.registerChildCommand(e.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const e=this.editor.conversion,t="rtl"===this.editor.locale.contentLanguageDirection?"margin-right":"margin-left";e.for("upcast").attributeToAttribute({view:{styles:{[t]:/[\s\S]+/}},model:{key:"blockIndent",value:e=>e.getStyle(t)}}),e.for("downcast").attributeToAttribute({model:"blockIndent",view:e=>({key:"style",value:{[t]:e}})})}_setupConversionUsingClasses(e){const t={model:{key:"blockIndent",values:[]},view:{}};for(const i of e)t.model.values.push(i),t.view[i]={key:"class",value:[i]};this.editor.conversion.attributeToAttribute(t)}}},9920:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AutoLink:()=>ke,Link:()=>ve,LinkCommand:()=>D,LinkEditing:()=>ie,LinkImage:()=>Se,LinkImageEditing:()=>ye,LinkImageUI:()=>Ae,LinkUI:()=>fe,UnlinkCommand:()=>F});var o=i(6854),n=i(3291),r=i(5187),s=i(7197),a=i(6553);class l{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach((e=>this._definitions.add(e))):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",((e,t,i)=>{if(!i.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!i.schema.isInline(t.item))return;const o=i.writer,n=o.document.selection;for(const e of this._definitions){const r=o.createAttributeElement("a",e.attributes,{priority:5});e.classes&&o.addClass(e.classes,r);for(const t in e.styles)o.setStyle(t,e.styles[t],r);o.setCustomProperty("link",!0,r),e.callback(t.attributeNewValue)?t.item.is("selection")?o.wrap(n.getFirstRange(),r):o.wrap(i.mapper.toViewRange(t.range),r):o.unwrap(i.mapper.toViewRange(t.range),r)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",((e,t,{writer:i,mapper:o})=>{const n=o.toViewElement(t.item),r=Array.from(n.getChildren()).find((e=>e.is("element","a")));for(const e of this._definitions){const o=(0,a.qL)(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of o)"class"===e?i.addClass(t,r):i.setAttribute(e,t,r);e.classes&&i.addClass(e.classes,r);for(const t in e.styles)i.setStyle(t,e.styles[t],r)}else{for(const[e,t]of o)"class"===e?i.removeClass(t,r):i.removeAttribute(e,r);e.classes&&i.removeClass(e.classes,r);for(const t in e.styles)i.removeStyle(t,r)}}}))}}}var c=i(7855);var d=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const u=function(e){return d.test(e)};var h="\\ud800-\\udfff",m="["+h+"]",g="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",p="\\ud83c[\\udffb-\\udfff]",f="[^"+h+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",w="[\\ud800-\\udbff][\\udc00-\\udfff]",k="(?:"+g+"|"+p+")?",_="[\\ufe0e\\ufe0f]?",v=_+k+"(?:\\u200d(?:"+[f,b,w].join("|")+")"+_+k+")*",y="(?:"+[f+g+"?",g,b,w,m].join("|")+")",C=RegExp(p+"(?="+p+")|"+y+v,"g");const x=function(e){return u(e)?function(e){return e.match(C)||[]}(e):function(e){return e.split("")}(e)};var A=i(9939);const E=function(e){e=(0,A.Z)(e);var t,i,o,n,r=u(e)?x(e):void 0,s=r?r[0]:e.charAt(0),a=r?(t=r,i=1,n=t.length,o=void 0===o?n:o,!i&&o>=n?t:(0,c.Z)(t,i,o)).join(""):e.slice(1);return s.toUpperCase()+a},T=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,S=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,P=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,I=/^((\w+:(\/{2,})?)|(\W))/i,V="Ctrl+K";function R(e,{writer:t}){const i=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,i),i}function O(e){const t=String(e);return function(e){return!!e.replace(T,"").match(S)}(t)?t:"#"}function B(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function M(e,t){const i=(o=e,P.test(o)?"mailto:":t);var o;const n=!!i&&!z(e);return e&&n?i+e:e}function z(e){return I.test(e)}function N(e){window.open(e,"_blank","noopener")}class D extends o.mY{constructor(){super(...arguments),this.manualDecorators=new a.FE,this.automaticDecorators=new l}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement()||(0,a.Ps)(t.getSelectedBlocks());B(i,e.schema)?(this.value=i.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(i,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,t={}){const i=this.editor.model,o=i.document.selection,n=[],s=[];for(const e in t)t[e]?n.push(e):s.push(e);i.change((t=>{if(o.isCollapsed){const l=o.getFirstPosition();if(o.hasAttribute("linkHref")){const a=L(o);let c=(0,r.VD)(l,"linkHref",o.getAttribute("linkHref"),i);o.getAttribute("linkHref")===a&&(c=this._updateLinkContent(i,t,c,e)),t.setAttribute("linkHref",e,c),n.forEach((e=>{t.setAttribute(e,!0,c)})),s.forEach((e=>{t.removeAttribute(e,c)})),t.setSelection(t.createPositionAfter(c.end.nodeBefore))}else if(""!==e){const r=(0,a.qL)(o.getAttributes());r.set("linkHref",e),n.forEach((e=>{r.set(e,!0)}));const{end:s}=i.insertContent(t.createText(e,r),l);t.setSelection(s)}["linkHref",...n,...s].forEach((e=>{t.removeSelectionAttribute(e)}))}else{const r=i.schema.getValidRanges(o.getRanges(),"linkHref"),a=[];for(const e of o.getSelectedBlocks())i.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const l=a.slice();for(const e of r)this._isRangeToUpdate(e,a)&&l.push(e);for(const r of l){let a=r;if(1===l.length){const n=L(o);o.getAttribute("linkHref")===n&&(a=this._updateLinkContent(i,t,r,e),t.setSelection(t.createSelection(a)))}t.setAttribute("linkHref",e,a),n.forEach((e=>{t.setAttribute(e,!0,a)})),s.forEach((e=>{t.removeAttribute(e,a)}))}}}))}_getDecoratorStateFromModel(e){const t=this.editor.model,i=t.document.selection,o=i.getSelectedElement();return B(o,t.schema)?o.getAttribute(e):i.getAttribute(e)}_isRangeToUpdate(e,t){for(const i of t)if(i.containsRange(e))return!1;return!0}_updateLinkContent(e,t,i,o){const n=t.createText(o,{linkHref:o});return e.insertContent(n,i)}}function L(e){if(e.isCollapsed){const t=e.getFirstPosition();return t.textNode&&t.textNode.data}{const t=Array.from(e.getFirstRange().getItems());if(t.length>1)return null;const i=t[0];return i.is("$text")||i.is("$textProxy")?i.data:null}}class F extends o.mY{refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement();B(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,i=t.document.selection,o=e.commands.get("link");t.change((e=>{const n=i.isCollapsed?[(0,r.VD)(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),t)]:t.schema.getValidRanges(i.getRanges(),"linkHref");for(const t of n)if(e.removeAttribute("linkHref",t),o)for(const i of o.manualDecorators)e.removeAttribute(i.id,t)}))}}class H extends((0,a.Re)()){constructor({id:e,label:t,attributes:i,classes:o,styles:n,defaultValue:r}){super(),this.id=e,this.set("value",void 0),this.defaultValue=r,this.label=t,this.attributes=i,this.classes=o,this.styles=n}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var W=i(3379),Z=i.n(W),U=i(9037),j=i.n(U),$=i(569),q=i.n($),K=i(8575),G=i.n(K),J=i(9216),Y=i.n(J),Q=i(3925),X={attributes:{"data-cke":!0}};X.setAttributes=G(),X.insert=q().bind(null,"head"),X.domAPI=j(),X.insertStyleElement=Y(),Z()(Q.Z,X),Q.Z&&Q.Z.locals&&Q.Z.locals;const ee="automatic",te=/^(https?:)?\/\//;class ie extends o.Sy{static get pluginName(){return"LinkEditing"}static get requires(){return[r.mh,r.II,s._l]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:R}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>R(O(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new D(e)),e.commands.add("unlink",new F(e));const t=function(e,t){const i={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach((e=>("label"in e&&i[e.label]&&(e.label=i[e.label]),e))),t}(e.t,function(e){const t=[];if(e)for(const[i,o]of Object.entries(e)){const e=Object.assign({},o,{id:`link${E(i)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter((e=>e.mode===ee))),this._enableManualDecorators(t.filter((e=>"manual"===e.mode))),e.plugins.get(r.mh).registerAttribute("linkHref"),(0,r.Im)(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink(),this._enableClipboardIntegration()}_enableAutomaticDecorators(e){const t=this.editor,i=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&i.add({id:"linkIsExternal",mode:ee,callback:e=>!!e&&te.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),i.add(e),i.length&&t.conversion.for("downcast").add(i.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,i=t.commands.get("link").manualDecorators;e.forEach((e=>{t.model.schema.extend("$text",{allowAttributes:e.id});const o=new H(e);i.add(o),t.conversion.for("downcast").attributeToElement({model:o.id,view:(e,{writer:t,schema:i},{item:n})=>{if((n.is("selection")||i.isInline(n))&&e){const e=t.createAttributeElement("a",o.attributes,{priority:5});o.classes&&t.addClass(o.classes,e);for(const i in o.styles)t.setStyle(i,o.styles[i],e);return t.setCustomProperty("link",!0,e),e}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...o._createPattern()},model:{key:o.id}})}))}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((e,t)=>{if(!(a.OB.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let i=t.domTarget;if("a"!=i.tagName.toLowerCase()&&(i=i.closest("a")),!i)return;const o=i.getAttribute("href");o&&(e.stop(),t.preventDefault(),N(o))}),{context:"$capture"}),this.listenTo(t,"keydown",((t,i)=>{const o=e.commands.get("link").value;o&&i.keyCode===a.Do.enter&&i.altKey&&(t.stop(),N(o))}))}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(e,"insertContent",(()=>{const i=t.anchor.nodeBefore,o=t.anchor.nodeAfter;t.hasAttribute("linkHref")&&i&&i.hasAttribute("linkHref")&&(o&&o.hasAttribute("linkHref")||e.change((t=>{oe(t,re(e.schema))})))}),{priority:"low"})}_enableClickingAfterLink(){const e=this.editor,t=e.model;e.editing.view.addObserver(n.dM);let i=!1;this.listenTo(e.editing.view.document,"mousedown",(()=>{i=!0})),this.listenTo(e.editing.view.document,"selectionChange",(()=>{if(!i)return;i=!1;const e=t.document.selection;if(!e.isCollapsed)return;if(!e.hasAttribute("linkHref"))return;const o=e.getFirstPosition(),n=(0,r.VD)(o,"linkHref",e.getAttribute("linkHref"),t);(o.isTouching(n.start)||o.isTouching(n.end))&&t.change((e=>{oe(e,re(t.schema))}))}))}_enableTypingOverLink(){const e=this.editor,t=e.editing.view;let i=null,o=!1;this.listenTo(t.document,"delete",(()=>{o=!0}),{priority:"high"}),this.listenTo(e.model,"deleteContent",(()=>{const t=e.model.document.selection;t.isCollapsed||(o?o=!1:ne(e)&&function(e){const t=e.document.selection,i=t.getFirstPosition(),o=t.getLastPosition(),n=i.nodeAfter;if(!n)return!1;if(!n.is("$text"))return!1;if(!n.hasAttribute("linkHref"))return!1;return n===(o.textNode||o.nodeBefore)||(0,r.VD)(i,"linkHref",n.getAttribute("linkHref"),e).containsRange(e.createRange(i,o),!0)}(e.model)&&(i=t.getAttributes()))}),{priority:"high"}),this.listenTo(e.model,"insertContent",((t,[n])=>{o=!1,ne(e)&&i&&(e.model.change((e=>{for(const[t,o]of i)e.setAttribute(t,o,n)})),i=null)}),{priority:"high"})}_handleDeleteContentAfterLink(){const e=this.editor,t=e.model,i=t.document.selection,o=e.editing.view;let n=!1,s=!1;this.listenTo(o.document,"delete",((e,t)=>{s="backward"===t.direction}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{n=!1;const e=i.getFirstPosition(),o=i.getAttribute("linkHref");if(!o)return;const s=(0,r.VD)(e,"linkHref",o,t);n=s.containsPosition(e)||s.end.isEqual(e)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{s&&(s=!1,n||e.model.enqueueChange((e=>{oe(e,re(t.schema))})))}),{priority:"low"})}_enableClipboardIntegration(){const e=this.editor,t=e.model,i=this.editor.config.get("link.defaultProtocol");i&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",((e,o)=>{t.change((e=>{const t=e.createRangeIn(o.content);for(const o of t.getItems())if(o.hasAttribute("linkHref")){const t=M(o.getAttribute("linkHref"),i);e.setAttribute("linkHref",t,o)}}))}))}}function oe(e,t){e.removeSelectionAttribute("linkHref");for(const i of t)e.removeSelectionAttribute(i)}function ne(e){return e.model.change((e=>e.batch)).isTyping}function re(e){return e.getDefinition("$text").allowAttributes.filter((e=>e.startsWith("link")))}var se=i(7095),ae=i(5549),le=(i(2151),i(4874)),ce={attributes:{"data-cke":!0}};ce.setAttributes=G(),ce.insert=q().bind(null,"head"),ce.domAPI=j(),ce.insertStyleElement=Y(),Z()(le.Z,ce),le.Z&&le.Z.locals&&le.Z.locals;class de extends se.G7{constructor(e,t){super(e),this.focusTracker=new a.Rh,this.keystrokes=new a.VD,this._focusables=new se.vX;const i=e.t;this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(i("Save"),o.icons.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(i("Cancel"),o.icons.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusCycler=new se.I0({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const n=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&n.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:n,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((e,t)=>(e[t.name]=t.isOn,e)),{})}render(){super.render(),(0,se.GI)({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new se.KP(this.locale,se.R);return t.label=e("Link URL"),t}_createButton(e,t,i,o){const n=new se.r5(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.extendTemplate({attributes:{class:i}}),o&&n.delegate("execute").to(this,o),n}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const i of e.manualDecorators){const o=new se.BM(this.locale);o.set({name:i.id,label:i.label,withText:!0}),o.bind("isOn").toMany([i,e],"value",((e,t)=>void 0===t&&void 0===e?!!i.defaultValue:!!e)),o.on("execute",(()=>{i.set("value",!o.isOn)})),t.add(o)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new se.G7;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}var ue=i(7536),he={attributes:{"data-cke":!0}};he.setAttributes=G(),he.insert=q().bind(null,"head"),he.domAPI=j(),he.insertStyleElement=Y(),Z()(ue.Z,he),ue.Z&&ue.Z.locals&&ue.Z.locals;class me extends se.G7{constructor(e){super(e),this.focusTracker=new a.Rh,this.keystrokes=new a.VD,this._focusables=new se.vX;const t=e.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'',"unlink"),this.editButtonView=this._createButton(t("Edit link"),o.icons.pencil,"edit"),this.set("href",void 0),this._focusCycler=new se.I0({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,i){const o=new se.r5(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.delegate("execute").to(this,i),o}_createPreviewButton(){const e=new se.r5(this.locale),t=this.bindTemplate,i=this.t;return e.set({withText:!0,tooltip:i("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(e=>e&&O(e))),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(e=>e||i("This link has no URL"))),e.bind("isEnabled").to(this,"href",(e=>!!e)),e.template.tag="a",e.template.eventListeners={},e}}const ge='',pe="link-ui";class fe extends o.Sy{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[se.WB]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(n.KU),this._balloon=e.plugins.get(se.WB),this._createToolbarLinkButton(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:pe,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:pe,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new me(e.locale),i=e.commands.get("link"),o=e.commands.get("unlink");return t.bind("href").to(i,"value"),t.editButtonView.bind("isEnabled").to(i),t.unlinkButtonView.bind("isEnabled").to(o),this.listenTo(t,"edit",(()=>{this._addFormView()})),this.listenTo(t,"unlink",(()=>{e.execute("unlink"),this._hideUI()})),t.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),t.keystrokes.set(V,((e,t)=>{this._addFormView(),t()})),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),i=e.config.get("link.defaultProtocol"),o=new((0,se.RX)(de))(e.locale,t);return o.urlInputView.fieldView.bind("value").to(t,"value"),o.urlInputView.bind("isEnabled").to(t,"isEnabled"),o.saveButtonView.bind("isEnabled").to(t),this.listenTo(o,"submit",(()=>{const{value:t}=o.urlInputView.fieldView.element,n=M(t,i);e.execute("link",n,o.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(o,"cancel",(()=>{this._closeFormView()})),o.keystrokes.set("Esc",((e,t)=>{this._closeFormView(),t()})),o}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),i=e.t;e.ui.componentFactory.add("link",(e=>{const o=new se.r5(e);return o.isEnabled=!0,o.label=i("Link"),o.icon=ge,o.keystroke=V,o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(t,"isEnabled"),o.bind("isOn").to(t,"value",(e=>!!e)),this.listenTo(o,"execute",(()=>this._showUI(!0))),o}))}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),e.keystrokes.set(V,((t,i)=>{i(),e.commands.get("link").isEnabled&&this._showUI(!0)}))}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",((e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((e,t)=>{this._isUIVisible&&(this._hideUI(),t())})),(0,se.eC)({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this.actionsView||this._createViews(),this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedLinkElement(),o=r();const n=()=>{const e=this._getSelectedLinkElement(),t=r();i&&!e||!i&&t!==o?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=e,o=t};function r(){return t.selection.focus.getAncestors().reverse().find((e=>e.is("element")))}this.listenTo(e.ui,"update",n),this.listenTo(this._balloon,"change:visibleView",n)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _areActionsInPanel(){return!!this.actionsView&&this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return!!this.actionsView&&this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return!!this.formView&&e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,i=e.document;let o;if(t.markers.has(pe)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(pe)),i=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));o=e.domConverter.viewRangeToDom(i)}else o=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(i.selection.getFirstRange())};return{target:o}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,i=t.getSelectedElement();if(t.isCollapsed||i&&(0,ae.Qd)(i))return be(t.getFirstPosition());{const i=t.getFirstRange().getTrimmed(),o=be(i.start),n=be(i.end);return o&&o==n&&e.createRangeIn(o).getTrimmed().isEqual(i)?o:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(pe))t.updateMarker(pe,{range:i});else if(i.start.isAtEnd){const o=i.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:i});t.addMarker(pe,{usingOperation:!1,affectsData:!1,range:t.createRange(o,i.end)})}else t.addMarker(pe,{usingOperation:!1,affectsData:!1,range:i})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(pe)&&e.change((e=>{e.removeMarker(pe)}))}}function be(e){return e.getAncestors().find((e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))||null}const we=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class ke extends o.Sy{static get requires(){return[r.HG]}static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const e=this.editor,t=new r.uL(e.model,(e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=_e(e.substr(0,e.length-1));return t?{url:t}:void 0}));t.on("matched:data",((t,i)=>{const{batch:o,range:n,url:r}=i;if(!o.isTyping)return;const s=n.end.getShiftedBy(-1),a=s.getShiftedBy(-r.length),l=e.model.createRange(a,s);this._applyAutoLink(r,l)})),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("enter");i&&i.on("execute",(()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const i=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(i)}))}_enableShiftEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("shiftEnter");i&&i.on("execute",(()=>{const e=t.document.selection.getFirstPosition(),i=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(i)}))}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:i,range:o}=(0,r.Up)(e,t),n=_e(i);if(n){const e=t.createRange(o.end.getShiftedBy(-n.length),o.end);this._applyAutoLink(n,e)}}_applyAutoLink(e,t){const i=this.editor.model,o=M(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,i)&&z(o)&&!function(e){const t=e.start.nodeAfter;return!!t&&t.hasAttribute("linkHref")}(t)&&this._persistAutoLink(o,t)}_persistAutoLink(e,t){const i=this.editor.model,o=this.editor.plugins.get("Delete");i.enqueueChange((n=>{n.setAttribute("linkHref",e,t),i.enqueueChange((()=>{o.requestUndoOnBackspace()}))}))}}function _e(e){const t=we.exec(e);return t?t[2]:null}class ve extends o.Sy{static get requires(){return[ie,fe,ke]}static get pluginName(){return"Link"}}class ye extends o.Sy{static get requires(){return["ImageEditing","ImageUtils",ie]}static get pluginName(){return"LinkImageEditing"}init(){const e=this.editor,t=e.model.schema;e.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["linkHref"]}),e.conversion.for("upcast").add(function(e){const t=e.plugins.has("ImageInlineEditing"),i=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,o,n)=>{const r=o.viewItem,s=i.findViewImgElement(r);if(!s)return;const a=s.findAncestor((e=>i.isBlockImageView(e)));if(t&&!a)return;if(!n.consumable.consume(r,{attributes:["href"]}))return;const l=r.getAttribute("href");if(!l)return;let c=o.modelCursor.parent;if(!c.is("element","imageBlock")){const e=n.convertItem(s,o.modelCursor);o.modelRange=e.modelRange,o.modelCursor=e.modelCursor,c=o.modelCursor.nodeBefore}c&&c.is("element","imageBlock")&&n.writer.setAttribute("linkHref",l,c)}),{priority:"high"})}}(e)),e.conversion.for("downcast").add(function(e){const t=e.plugins.get("ImageUtils");return e=>{e.on("attribute:linkHref:imageBlock",((e,i,o)=>{if(!o.consumable.consume(i.item,e.name))return;const n=o.mapper.toViewElement(i.item),r=o.writer,s=Array.from(n.getChildren()).find((e=>e.is("element","a"))),a=t.findViewImgElement(n),l=a.parent.is("element","picture")?a.parent:a;if(s)i.attributeNewValue?r.setAttribute("href",i.attributeNewValue,s):(r.move(r.createRangeOn(l),r.createPositionAt(n,0)),r.remove(s));else{const e=r.createContainerElement("a",{href:i.attributeNewValue});r.insert(r.createPositionAt(n,0),e),r.move(r.createRangeOn(l),r.createPositionAt(e,0))}}),{priority:"high"})}}(e)),this._enableAutomaticDecorators(),this._enableManualDecorators()}_enableAutomaticDecorators(){const e=this.editor,t=e.commands.get("link").automaticDecorators;t.length&&e.conversion.for("downcast").add(t.getDispatcherForLinkedImage())}_enableManualDecorators(){const e=this.editor,t=e.commands.get("link");for(const i of t.manualDecorators)e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:i.id}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:i.id}),e.conversion.for("downcast").add(Ce(i)),e.conversion.for("upcast").add(xe(e,i))}}function Ce(e){return t=>{t.on(`attribute:${e.id}:imageBlock`,((t,i,o)=>{const n=o.mapper.toViewElement(i.item),r=Array.from(n.getChildren()).find((e=>e.is("element","a")));if(r){for(const[t,i]of(0,a.qL)(e.attributes))o.writer.setAttribute(t,i,r);e.classes&&o.writer.addClass(e.classes,r);for(const t in e.styles)o.writer.setStyle(t,e.styles[t],r)}}))}}function xe(e,t){const i=e.plugins.has("ImageInlineEditing"),o=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,r,s)=>{const a=r.viewItem,l=o.findViewImgElement(a);if(!l)return;const c=l.findAncestor((e=>o.isBlockImageView(e)));if(i&&!c)return;const d=new n.xO(t._createPattern()).match(a);if(!d)return;if(!s.consumable.consume(a,d.match))return;const u=r.modelCursor.nodeBefore||r.modelCursor.parent;s.writer.setAttribute(t.id,!0,u)}),{priority:"high"})}}class Ae extends o.Sy{static get requires(){return[ie,fe,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((t,i)=>{this._isSelectedLinkedImage(e.model.document.selection)&&(i.preventDefault(),t.stop())}),{priority:"high"}),this._createToolbarLinkImageButton()}_createToolbarLinkImageButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("linkImage",(i=>{const o=new se.r5(i),n=e.plugins.get("LinkUI"),r=e.commands.get("link");return o.set({isEnabled:!0,label:t("Link image"),icon:ge,keystroke:V,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(r,"isEnabled"),o.bind("isOn").to(r,"value",(e=>!!e)),this.listenTo(o,"execute",(()=>{this._isSelectedLinkedImage(e.model.document.selection)?n._addActionsView():n._showUI(!0)})),o}))}_isSelectedLinkedImage(e){const t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}}var Ee=i(4330),Te={attributes:{"data-cke":!0}};Te.setAttributes=G(),Te.insert=q().bind(null,"head"),Te.domAPI=j(),Te.insertStyleElement=Y(),Z()(Ee.Z,Te),Ee.Z&&Ee.Z.locals&&Ee.Z.locals;class Se extends o.Sy{static get requires(){return[ye,Ae]}static get pluginName(){return"LinkImage"}}},1640:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DocumentList:()=>Ae,DocumentListEditing:()=>se,DocumentListIndentCommand:()=>T,DocumentListProperties:()=>Qe,DocumentListPropertiesEditing:()=>Fe,DocumentListPropertiesUtils:()=>De,DocumentListUtils:()=>R,IndentCommand:()=>Xe,List:()=>kt,ListEditing:()=>bt,ListProperties:()=>It,ListPropertiesEditing:()=>xt,ListPropertiesUI:()=>Je,ListUI:()=>xe,ListUtils:()=>ot,TodoList:()=>Wt,TodoListEditing:()=>Dt,TodoListUI:()=>Lt});var o=i(6854),n=i(5187),r=i(1863),s=i(6553);class a{constructor(e,t){this._startElement=e,this._referenceIndent=e.getAttribute("listIndent"),this._isForward="forward"==t.direction,this._includeSelf=!!t.includeSelf,this._sameAttributes=(0,s.qo)(t.sameAttributes||[]),this._sameIndent=!!t.sameIndent,this._lowerIndent=!!t.lowerIndent,this._higherIndent=!!t.higherIndent}static first(e,t){const i=new this(e,t)[Symbol.iterator]();return(0,s.Ps)(i)}*[Symbol.iterator](){const e=[];for(const{node:t}of l(this._getStartNode(),this._isForward?"forward":"backward")){const i=t.getAttribute("listIndent");if(ithis._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){e.push(t);continue}}else{if(!this._sameIndent){if(this._higherIndent){e.length&&(yield*e,e.length=0);break}continue}if(this._sameAttributes.some((e=>t.getAttribute(e)!==this._startElement.getAttribute(e))))break}e.length&&(yield*e,e.length=0),yield t}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}function*l(e,t="forward"){const i="forward"==t;let o=null;for(;u(e);)yield{node:e,previous:o},o=e,e=i?e.nextSibling:e.previousSibling}class c{constructor(e){this._listHead=e}[Symbol.iterator](){return l(this._listHead,"forward")}}class d{static next(){return(0,s.hQ)()}}function u(e){return!!e&&e.is("element")&&e.hasAttribute("listItemId")}function h(e,t={}){return[...m(e,{...t,direction:"backward"}),...m(e,{...t,direction:"forward"})]}function m(e,t={}){const i="forward"==t.direction,o=Array.from(new a(e,{...t,includeSelf:i,sameIndent:!0,sameAttributes:"listItemId"}));return i?o:o.reverse()}function g(e){const t=new a(e,{sameIndent:!0,sameAttributes:"listType"}),i=new a(e,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward"});return[...Array.from(t).reverse(),...i]}function p(e){return!a.first(e,{sameIndent:!0,sameAttributes:"listItemId"})}function f(e){return!a.first(e,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function b(e,t={}){e=(0,s.qo)(e);const i=!1!==t.withNested,o=new Set;for(const t of e)for(const e of h(t,{higherIndent:i}))o.add(e);return x(o)}function w(e){e=(0,s.qo)(e);const t=new Set;for(const i of e)for(const e of g(i))t.add(e);return x(t)}function k(e,t){const i=m(e,{direction:"forward"}),o=d.next();for(const e of i)t.setAttribute("listItemId",o,e);return i}function _(e,t,i){const o={};for(const[e,i]of t.getAttributes())e.startsWith("list")&&(o[e]=i);const n=m(e,{direction:"forward"});for(const e of n)i.setAttributes(o,e);return n}function v(e,t,{expand:i,indentBy:o=1}={}){e=(0,s.qo)(e);const n=i?b(e):e;for(const e of n){const i=e.getAttribute("listIndent")+o;i<0?y(e,t):t.setAttribute("listIndent",i,e)}return n}function y(e,t){e=(0,s.qo)(e);for(const i of e)for(const e of i.getAttributeKeys())e.startsWith("list")&&t.removeAttribute(e,i);return e}function C(e){if(!e.length)return!1;const t=e[0].getAttribute("listItemId");return!!t&&!e.some((e=>e.getAttribute("listItemId")!=t))}function x(e){return Array.from(e).filter((e=>"$graveyard"!==e.root.rootName)).sort(((e,t)=>e.index-t.index))}function A(e){const t=e.document.selection.getSelectedElement();return t&&e.schema.isObject(t)&&e.schema.isBlock(t)?t:null}function E(e,t,i){return m(t,{direction:"forward"}).pop().index>e.index?_(e,t,i):[]}class T extends o.mY{constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=S(e.document.selection);e.change((e=>{const i=[];C(t)&&!p(t[0])?("forward"==this._direction&&i.push(...v(t,e)),i.push(...k(t[0],e))):"forward"==this._direction?i.push(...v(t,e,{expand:!0})):i.push(...function(e,t){const i=b(e=(0,s.qo)(e)),o=new Set,n=Math.min(...i.map((e=>e.getAttribute("listIndent")))),r=new Map;for(const e of i)r.set(e,a.first(e,{lowerIndent:!0}));for(const e of i){if(o.has(e))continue;o.add(e);const i=e.getAttribute("listIndent")-1;if(i<0)y(e,t);else{if(e.getAttribute("listIndent")==n){const i=E(e,r.get(e),t);for(const e of i)o.add(e);if(i.length)continue}t.setAttribute("listIndent",i,e)}}return x(o)}(t,e));for(const t of i){if(!t.hasAttribute("listType"))continue;const i=a.first(t,{sameIndent:!0});i&&e.setAttribute("listType",i.getAttribute("listType"),t)}this._fireAfterExecute(i)}))}_fireAfterExecute(e){this.fire("afterExecute",x(new Set(e)))}_checkEnabled(){let e=S(this.editor.model.document.selection),t=e[0];if(!t)return!1;if("backward"==this._direction)return!0;if(C(e)&&!p(e[0]))return!0;e=b(e),t=e[0];const i=a.first(t,{sameIndent:!0});return!!i&&i.getAttribute("listType")==t.getAttribute("listType")}}function S(e){const t=Array.from(e.getSelectedBlocks()),i=t.findIndex((e=>!u(e)));return-1!=i&&(t.length=i),t}class P extends o.mY{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.document,o=A(t),n=Array.from(i.selection.getSelectedBlocks()).filter((e=>t.schema.checkAttribute(e,"listType"))),r=void 0!==e.forceValue?!e.forceValue:this.value;t.change((e=>{if(r){const t=n[n.length-1],i=m(t,{direction:"forward"}),o=[];i.length>1&&o.push(...k(i[1],e)),o.push(...y(n,e)),o.push(...function(e,t){const i=[];let o=Number.POSITIVE_INFINITY;for(const{node:n}of l(e.nextSibling,"forward")){const e=n.getAttribute("listIndent");if(0==e)break;e{const{firstElement:r,lastElement:s}=this._getMergeSubjectElements(i,e),l=r.getAttribute("listIndent")||0,c=s.getAttribute("listIndent"),d=s.getAttribute("listItemId");if(l!=c){const e=(u=s,Array.from(new a(u,{direction:"forward",higherIndent:!0})));o.push(...v([s,...e],n,{indentBy:l-c,expand:l{const t=k(this._getStartBlock(),e);this._fireAfterExecute(t)}))}_fireAfterExecute(e){this.fire("afterExecute",x(new Set(e)))}_checkEnabled(){const e=this.editor.model.document.selection,t=this._getStartBlock();return e.isCollapsed&&u(t)&&!p(t)}_getStartBlock(){const e=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?e:e.nextSibling}}class R extends o.Sy{static get pluginName(){return"DocumentListUtils"}expandListBlocksToCompleteList(e){return w(e)}isFirstBlockOfListItem(e){return p(e)}isListItemBlock(e){return u(e)}}var O=i(3291);function B(e){return e.is("element","ol")||e.is("element","ul")}function M(e){return e.is("element","li")}function z(e){let t=0,i=e.parent;for(;i;){if(M(i))t++;else{const e=i.previousSibling;e&&M(e)&&t++}i=i.parent}return t}function N(e,t,i,o=F(i,t)){return e.createAttributeElement(L(i),null,{priority:2*t/100-100,id:o})}function D(e,t,i){return e.createAttributeElement("li",null,{priority:(2*t+1)/100-100,id:i})}function L(e){return"numbered"==e?"ol":"ul"}function F(e,t){return`list-${e}-${t}`}function H(e,t){const i=e.nodeBefore;if(u(i)){let e=i;for(const{node:i}of l(e,"backward"))if(e=i,t.has(e))return;t.set(i,e)}else{const i=e.nodeAfter;u(i)&&t.set(i,i)}}function W(){return(e,t,i)=>{if(!i.consumable.test(t.viewItem,{name:!0}))return;const o=new O.yj(t.viewItem.document);for(const e of Array.from(t.viewItem.getChildren()))M(e)||B(e)||o.remove(e)}}function Z(e,{dataPipeline:t}={}){return(i,{writer:o})=>{if(!U(i,e))return null;if(!t)return o.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const n=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}function U(e,t,i=h(e)){if(!u(e))return!1;for(const i of e.getAttributeKeys())if(!i.startsWith("selection:")&&!t.includes(i))return!1;return i.length<2}var j=i(3379),$=i.n(j),q=i(9037),K=i.n(q),G=i(569),J=i.n(G),Y=i(8575),Q=i.n(Y),X=i(9216),ee=i.n(X),te=i(3190),ie={attributes:{"data-cke":!0}};ie.setAttributes=Q(),ie.insert=J().bind(null,"head"),ie.domAPI=K(),ie.insertStyleElement=ee(),$()(te.Z,ie),te.Z&&te.Z.locals&&te.Z.locals;var oe=i(4784),ne={attributes:{"data-cke":!0}};ne.setAttributes=Q(),ne.insert=J().bind(null,"head"),ne.domAPI=K(),ne.insertStyleElement=ee(),$()(oe.Z,ne),oe.Z&&oe.Z.locals&&oe.Z.locals;const re=["listType","listIndent","listItemId"];class se extends o.Sy{constructor(){super(...arguments),this._downcastStrategies=[]}static get pluginName(){return"DocumentListEditing"}static get requires(){return[r.C,n.HG,R]}init(){const e=this.editor,t=e.model;if(e.plugins.has("ListEditing"))throw new s.Bb("document-list-feature-conflict",this,{conflictPlugin:"ListEditing"});t.schema.extend("$container",{allowAttributes:re}),t.schema.extend("$block",{allowAttributes:re}),t.schema.extend("$blockObject",{allowAttributes:re});for(const e of re)t.schema.setAttributeProperties(e,{copyOnReplace:!0});e.commands.add("numberedList",new P(e,"numbered")),e.commands.add("bulletedList",new P(e,"bulleted")),e.commands.add("indentList",new T(e,"forward")),e.commands.add("outdentList",new T(e,"backward")),e.commands.add("mergeListItemBackward",new I(e,"backward")),e.commands.add("mergeListItemForward",new I(e,"forward")),e.commands.add("splitListItemBefore",new V(e,"before")),e.commands.add("splitListItemAfter",new V(e,"after")),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration()}afterInit(){const e=this.editor.commands,t=e.get("indent"),i=e.get("outdent");t&&t.registerChildCommand(e.get("indentList"),{priority:"high"}),i&&i.registerChildCommand(e.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(e){this._downcastStrategies.push(e)}_getListAttributeNames(){return[...re,...this._downcastStrategies.map((e=>e.attributeName))]}_setupDeleteIntegration(){const e=this.editor,t=e.commands.get("mergeListItemBackward"),i=e.commands.get("mergeListItemForward");this.listenTo(e.editing.view.document,"delete",((o,n)=>{const r=e.model.document.selection;A(e.model)||e.model.change((()=>{const s=r.getFirstPosition();if(r.isCollapsed&&"backward"==n.direction){if(!s.isAtStart)return;const i=s.parent;if(!u(i))return;if(a.first(i,{sameAttributes:"listType",sameIndent:!0})||0!==i.getAttribute("listIndent")){if(!t.isEnabled)return;t.execute({shouldMergeOnBlocksContentLevel:ae(e.model,"backward")})}else f(i)||e.execute("splitListItemAfter"),e.execute("outdentList");n.preventDefault(),o.stop()}else{if(r.isCollapsed&&!r.getLastPosition().isAtEnd)return;if(!i.isEnabled)return;i.execute({shouldMergeOnBlocksContentLevel:ae(e.model,"forward")}),n.preventDefault(),o.stop()}}))}),{context:"li"})}_setupEnterIntegration(){const e=this.editor,t=e.model,i=e.commands,o=i.get("enter");this.listenTo(e.editing.view.document,"enter",((i,o)=>{const n=t.document,r=n.selection.getFirstPosition().parent;if(n.selection.isCollapsed&&u(r)&&r.isEmpty&&!o.isSoft){const t=p(r),n=f(r);t&&n?(e.execute("outdentList"),o.preventDefault(),i.stop()):t&&!n?(e.execute("splitListItemAfter"),o.preventDefault(),i.stop()):n&&(e.execute("splitListItemBefore"),o.preventDefault(),i.stop())}}),{context:"li"}),this.listenTo(o,"afterExecute",(()=>{const t=i.get("splitListItemBefore");t.refresh(),t.isEnabled&&2===h(e.model.document.selection.getLastPosition().parent).length&&t.execute()}))}_setupTabIntegration(){const e=this.editor;this.listenTo(e.editing.view.document,"tab",((t,i)=>{const o=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(o).isEnabled&&(e.execute(o),i.stopPropagation(),i.preventDefault(),t.stop())}),{context:"li"})}_setupConversion(){const e=this.editor,t=e.model,i=this._getListAttributeNames();e.conversion.for("upcast").elementToElement({view:"li",model:"paragraph"}).add((e=>{e.on("element:li",((e,t,i)=>{const{writer:o,schema:n}=i;if(!t.modelRange)return;const r=Array.from(t.modelRange.getItems({shallow:!0})).filter((e=>n.checkAttribute(e,"listItemId")));if(!r.length)return;const s={listItemId:d.next(),listIndent:z(t.viewItem),listType:t.viewItem.parent&&t.viewItem.parent.is("element","ol")?"numbered":"bulleted"};for(const e of r)u(e)||o.setAttributes(s,e);r.length>1&&r[1].getAttribute("listItemId")!=s.listItemId&&i.keepEmptyElement(r[0])})),e.on("element:ul",W(),{priority:"high"}),e.on("element:ol",W(),{priority:"high"})})),e.conversion.for("editingDowncast").elementToElement({model:"paragraph",view:Z(i),converterPriority:"high"}),e.conversion.for("dataDowncast").elementToElement({model:"paragraph",view:Z(i,{dataPipeline:!0}),converterPriority:"high"}),e.conversion.for("downcast").add((e=>{e.on("attribute",function(e,t,i){const o=function(e){return(t,i)=>{const o=[];for(const i of e)t.hasAttribute(i)&&o.push(`attribute:${i}`);return!!o.every((e=>!1!==i.test(t,e)))&&(o.forEach((e=>i.consume(t,e))),!0)}}(e);return(n,r,s)=>{const{writer:l,mapper:c,consumable:d}=s,u=r.item;if(!e.includes(r.attributeKey))return;if(!o(u,d))return;const h=function(e,t,i){const o=i.createRangeOn(e);return t.toViewRange(o).getTrimmed().getContainedElement()}(u,c,i);!function(e,t){let i=e.parent;for(;i.is("attributeElement")&&["ul","ol","li"].includes(i.name);){const o=i.parent;t.unwrap(t.createRangeOn(e),i),i=o}}(h,l),function(e,t,i,o){if(!e.hasAttribute("listIndent"))return;const n=e.getAttribute("listIndent");let r=e;for(let e=n;e>=0;e--){const n=D(o,e,r.getAttribute("listItemId")),s=N(o,e,r.getAttribute("listType"));for(const e of i)r.hasAttribute(e.attributeName)&&e.setAttributeOnDowncast(o,r.getAttribute(e.attributeName),"list"==e.scope?s:n);if(t=o.wrap(t,n),t=o.wrap(t,s),0==e)break;if(r=a.first(r,{lowerIndent:!0}),!r)break}}(u,l.createRangeOn(h),t,l)}}(i,this._downcastStrategies,t))})),this.listenTo(t.document,"change:data",function(e,t,i,o){return()=>{const o=e.document.differ.getChanges(),s=[],a=new Map,l=new Set;for(const e of o)if("insert"==e.type&&"$text"!=e.name)H(e.position,a),e.attributes.has("listItemId")?l.add(e.position.nodeAfter):H(e.position.getShiftedBy(e.length),a);else if("remove"==e.type&&e.attributes.has("listItemId"))H(e.position,a);else if("attribute"==e.type){const t=e.range.start.nodeAfter;i.includes(e.attributeKey)?(H(e.range.start,a),null===e.attributeNewValue?(H(e.range.start.getShiftedBy(1),a),r(t)&&s.push(t)):l.add(t)):u(t)&&r(t)&&s.push(t)}for(const e of a.values())s.push(...n(e,l));for(const e of new Set(s))t.reconvertItem(e)};function n(e,t){const o=[],n=new Set,a=[];for(const{node:c,previous:d}of l(e,"forward")){if(n.has(c))continue;const e=c.getAttribute("listIndent");d&&ei.includes(e))));const l=m(c,{direction:"forward"});for(const e of l)n.add(e),(r(e,l)||s(e,a,t))&&o.push(e)}return o}function r(e,o){if(!e.is("element","paragraph"))return!1;const n=t.mapper.toViewElement(e);if(!n)return!1;const r=U(e,i,o);return!(!r||!n.is("element","p"))||!(r||!n.is("element","span"))}function s(e,i,n){if(n.has(e))return!1;const r=t.mapper.toViewElement(e);let s=i.length-1;for(let e=r.parent;!e.is("editableElement");e=e.parent){const t=M(e),n=B(e);if(!n&&!t)continue;const r="checkAttributes:"+(t?"item":"list");if(o.fire(r,{viewElement:e,modelAttributes:i[s]}))break;if(n&&(s--,s<0))return!1}return!0}}(t,e.editing,i,this),{priority:"high"}),this.on("checkAttributes:item",((e,{viewElement:t,modelAttributes:i})=>{t.id!=i.listItemId&&(e.return=!0,e.stop())})),this.on("checkAttributes:list",((e,{viewElement:t,modelAttributes:i})=>{t.name==L(i.listType)&&t.id==F(i.listType,i.listIndent)||(e.return=!0,e.stop())}))}_setupModelPostFixing(){const e=this.editor.model,t=this._getListAttributeNames();e.document.registerPostFixer((i=>function(e,t,i,o){const n=e.document.differ.getChanges(),r=new Map;let s=!1;for(const o of n)if("insert"==o.type&&"$text"!=o.name){const n=o.position.nodeAfter;if(!e.schema.checkAttribute(n,"listItemId"))for(const e of Array.from(n.getAttributeKeys()))i.includes(e)&&(t.removeAttribute(e,n),s=!0);H(o.position,r),o.attributes.has("listItemId")||H(o.position.getShiftedBy(o.length),r);for(const{item:t,previousPosition:i}of e.createRangeIn(n))u(t)&&H(i,r)}else"remove"==o.type?H(o.position,r):"attribute"==o.type&&i.includes(o.attributeKey)&&(H(o.range.start,r),null===o.attributeNewValue&&H(o.range.start.getShiftedBy(1),r));const a=new Set;for(const e of r.values())s=o.fire("postFixer",{listNodes:new c(e),listHead:e,writer:t,seenIds:a})||s;return s}(e,i,t,this))),this.on("postFixer",((e,{listNodes:t,writer:i})=>{e.return=function(e,t){let i=0,o=-1,n=null,r=!1;for(const{node:s}of e){const e=s.getAttribute("listIndent");if(e>i){let a;null===n?(n=e-i,a=i):(n>e&&(n=e),a=e-n),a>o+1&&(a=o+1),t.setAttribute("listIndent",a,s),r=!0,o=a}else n=null,i=e+1,o=e}return r}(t,i)||e.return}),{priority:"high"}),this.on("postFixer",((e,{listNodes:t,writer:i,seenIds:o})=>{e.return=function(e,t,i){const o=new Set;let n=!1;for(const{node:r}of e){if(o.has(r))continue;let e=r.getAttribute("listType"),s=r.getAttribute("listItemId");t.has(s)&&(s=d.next()),t.add(s);for(const t of m(r,{direction:"forward"}))o.add(t),t.getAttribute("listType")!=e&&(s=d.next(),e=t.getAttribute("listType")),t.getAttribute("listItemId")!=s&&(i.setAttribute("listItemId",s,t),n=!0)}return n}(t,o,i)||e.return}),{priority:"high"})}_setupClipboardIntegration(){const e=this.editor.model;this.listenTo(e,"insertContent",function(e){return(t,[i,o])=>{const n=i.is("documentFragment")?i.getChild(0):i;if(!u(n))return;let r;r=o?e.createSelection(o):e.document.selection;const s=r.getFirstPosition();let a=null;if(u(s.parent)?a=s.parent:u(s.nodeBefore)&&(a=s.nodeBefore),!a)return;const c=a.getAttribute("listIndent")-n.getAttribute("listIndent");c<=0||e.change((e=>{for(const{node:t}of l(n,"forward"))e.setAttribute("listIndent",t.getAttribute("listIndent")+c,t)}))}}(e),{priority:"high"}),this.listenTo(e,"getSelectedContent",((t,[i])=>{C(Array.from(i.getSelectedBlocks()))&&e.change((e=>y(Array.from(t.return.getChildren()),e)))}))}}function ae(e,t){const i=e.document.selection;if(!i.isCollapsed)return!A(e);if("forward"===t)return!0;const o=i.getFirstPosition().parent,n=o.previousSibling;return!e.schema.isObject(n)&&(!!n.isEmpty||C([o,n]))}var le=i(7095);function ce(e,t){const i=t.mapper,o=t.writer,n="numbered"==e.getAttribute("listType")?"ol":"ul",r=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=ve,t}(o),s=o.createContainerElement(n,null);return o.insert(o.createPositionAt(s,0),r),i.bindElements(e,r),r}function de(e,t,i,o){const n=t.parent,r=i.mapper,s=i.writer;let a=r.toViewPosition(o.createPositionBefore(e));const l=me(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),c=e.previousSibling;if(l&&l.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=r.toViewElement(l);a=s.breakContainer(s.createPositionAfter(e))}else if(c&&"listItem"==c.name){a=r.toViewPosition(o.createPositionAt(c,"end"));const e=r.findMappedViewAncestor(a),t=pe(e);a=t?s.createPositionBefore(t):s.createPositionAt(e,"end")}else a=r.toViewPosition(o.createPositionBefore(e));if(a=he(a),s.insert(a,n),c&&"listItem"==c.name){const e=r.toViewElement(c),i=s.createRange(s.createPositionAt(e,0),a).getWalker({ignoreElementEnd:!0});for(const e of i)if(e.item.is("element","li")){const o=s.breakContainer(s.createPositionBefore(e.item)),n=e.item.parent,r=s.createPositionAt(t,"end");ue(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(n),r),i._position=o}}else{const i=n.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let o=null;for(const t of i.getChildren()){const i=r.toModelElement(t);if(!(i&&i.getAttribute("listIndent")>e.getAttribute("listIndent")))break;o=t}o&&(s.breakContainer(s.createPositionAfter(o)),s.move(s.createRangeOn(o.parent),s.createPositionAt(t,"end")))}}ue(s,n,n.nextSibling),ue(s,n.previousSibling,n)}function ue(e,t,i){return!t||!i||"ul"!=t.name&&"ol"!=t.name||t.name!=i.name||t.getAttribute("class")!==i.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function he(e){return e.getLastMatchingPosition((e=>e.item.is("uiElement")))}function me(e,t){const i=!!t.sameIndent,o=!!t.smallerIndent,n=t.listIndent;let r=e;for(;r&&"listItem"==r.name;){const e=r.getAttribute("listIndent");if(i&&n==e||o&&n>e)return r;r="forward"===t.direction?r.nextSibling:r.previousSibling}return null}function ge(e,t,i,o){e.ui.componentFactory.add(t,(n=>{const r=e.commands.get(t),s=new le.r5(n);return s.set({label:i,icon:o,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),s}))}function pe(e){for(const t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}function fe(e,t){const i=[],o=e.parent,n={ignoreElementEnd:!1,startPosition:e,shallow:!0,direction:t},r=o.getAttribute("listIndent"),s=[...new O.Po(n)].filter((e=>e.item.is("element"))).map((e=>e.item));for(const e of s){if(!e.is("element","listItem"))break;if(e.getAttribute("listIndent")r)){if(e.getAttribute("listType")!==o.getAttribute("listType"))break;if(e.getAttribute("listStyle")!==o.getAttribute("listStyle"))break;if(e.getAttribute("listReversed")!==o.getAttribute("listReversed"))break;if(e.getAttribute("listStart")!==o.getAttribute("listStart"))break;"backward"===t?i.unshift(e):i.push(e)}}return i}function be(e){let t=[...e.document.selection.getSelectedBlocks()].filter((e=>e.is("element","listItem"))).map((t=>{const i=e.change((e=>e.createPositionAt(t,0)));return[...fe(i,"backward"),...fe(i,"forward")]})).flat();return t=[...new Set(t)],t}const we=["disc","circle","square"],ke=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function _e(e){return we.includes(e)?"bulleted":ke.includes(e)?"numbered":null}function ve(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:O.YG.call(this)}const ye='',Ce='';class xe extends o.Sy{static get pluginName(){return"ListUI"}init(){const e=this.editor.t;ge(this.editor,"numberedList",e("Numbered List"),ye),ge(this.editor,"bulletedList",e("Bulleted List"),Ce)}}class Ae extends o.Sy{static get requires(){return[se,xe]}static get pluginName(){return"DocumentList"}}class Ee extends o.mY{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute({startIndex:e=1}={}){const t=this.editor.model,i=t.document;let o=Array.from(i.selection.getSelectedBlocks()).filter((e=>u(e)&&"numbered"==e.getAttribute("listType")));o=w(o),t.change((t=>{for(const i of o)t.setAttribute("listStart",e>=0?e:1,i)}))}_getValue(){const e=this.editor.model.document,t=(0,s.Ps)(e.selection.getSelectedBlocks());return t&&u(t)&&"numbered"==t.getAttribute("listType")?t.getAttribute("listStart"):null}}const Te={},Se={},Pe={},Ie=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(const{listStyle:e,typeAttribute:t,listType:i}of Ie)Te[e]=i,Se[e]=t,t&&(Pe[t]=e);function Ve(){return Ie.map((e=>e.listStyle))}function Re(e){return Te[e]||null}function Oe(e){return Pe[e]||null}function Be(e){return Se[e]||null}class Me extends o.mY{constructor(e,t,i){super(e),this.defaultType=t,this._supportedTypes=i}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.document;t.change((t=>{this._tryToConvertItemsToList(e);let o=Array.from(i.selection.getSelectedBlocks()).filter((e=>e.hasAttribute("listType")));if(o.length){o=w(o);for(const i of o)t.setAttribute("listStyle",e.type||this.defaultType,i)}}))}isStyleTypeSupported(e){return!this._supportedTypes||this._supportedTypes.includes(e)}_getValue(){const e=(0,s.Ps)(this.editor.model.document.selection.getSelectedBlocks());return u(e)?e.getAttribute("listStyle"):null}_checkEnabled(){const e=this.editor,t=e.commands.get("numberedList"),i=e.commands.get("bulletedList");return t.isEnabled||i.isEnabled}_tryToConvertItemsToList(e){if(!e.type)return;const t=Re(e.type);if(!t)return;const i=this.editor,o=`${t}List`;i.commands.get(o).value||i.execute(o)}}class ze extends o.mY{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute(e={}){const t=this.editor.model,i=t.document;let o=Array.from(i.selection.getSelectedBlocks()).filter((e=>u(e)&&"numbered"==e.getAttribute("listType")));o=w(o),t.change((t=>{for(const i of o)t.setAttribute("listReversed",!!e.reversed,i)}))}_getValue(){const e=this.editor.model.document,t=(0,s.Ps)(e.selection.getSelectedBlocks());return u(t)&&"numbered"==t.getAttribute("listType")?t.getAttribute("listReversed"):null}}function Ne(e){return(t,i,o)=>{const{writer:n,schema:r,consumable:s}=o;if(!1===s.test(i.viewItem,e.viewConsumables))return;i.modelRange||Object.assign(i,o.convertChildren(i.viewItem,i.modelCursor));let a=!1;for(const t of i.modelRange.getItems({shallow:!0}))r.checkAttribute(t,e.attributeName)&&e.appliesToListItem(t)&&(t.hasAttribute(e.attributeName)||(n.setAttribute(e.attributeName,e.getAttributeOnUpcast(i.viewItem),t),a=!0));a&&s.consume(i.viewItem,e.viewConsumables)}}class De extends o.Sy{static get pluginName(){return"DocumentListPropertiesUtils"}getAllSupportedStyleTypes(){return Ve()}getListTypeFromListStyleType(e){return Re(e)}getListStyleTypeFromTypeAttribute(e){return Oe(e)}getTypeAttributeFromListStyleType(e){return Be(e)}}const Le="default";class Fe extends o.Sy{static get requires(){return[se,De]}static get pluginName(){return"DocumentListPropertiesEditing"}constructor(e){super(e),e.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const e=this.editor,t=e.model,i=e.plugins.get(se),o=function(e){const t=[];if(e.styles){const i="object"==typeof e.styles&&e.styles.useAttribute;t.push({attributeName:"listStyle",defaultValue:Le,viewConsumables:{styles:"list-style-type"},addCommand(e){let t=Ve();i&&(t=t.filter((e=>!!Be(e)))),e.commands.add("listStyle",new Me(e,Le,t))},appliesToListItem:()=>!0,hasValidAttribute(e){if(!e.hasAttribute("listStyle"))return!1;const t=e.getAttribute("listStyle");return t==Le||Re(t)==e.getAttribute("listType")},setAttributeOnDowncast(e,t,o){if(t&&t!==Le){if(!i)return void e.setStyle("list-style-type",t,o);{const i=Be(t);if(i)return void e.setAttribute("type",i,o)}}e.removeStyle("list-style-type",o),e.removeAttribute("type",o)},getAttributeOnUpcast(e){const t=e.getStyle("list-style-type");if(t)return t;const i=e.getAttribute("type");return i?Oe(i):Le}})}return e.reversed&&t.push({attributeName:"listReversed",defaultValue:!1,viewConsumables:{attributes:"reversed"},addCommand(e){e.commands.add("listReversed",new ze(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),hasValidAttribute(e){return this.appliesToListItem(e)==e.hasAttribute("listReversed")},setAttributeOnDowncast(e,t,i){t?e.setAttribute("reversed","reversed",i):e.removeAttribute("reversed",i)},getAttributeOnUpcast:e=>e.hasAttribute("reversed")}),e.startIndex&&t.push({attributeName:"listStart",defaultValue:1,viewConsumables:{attributes:"start"},addCommand(e){e.commands.add("listStart",new Ee(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),hasValidAttribute(e){return this.appliesToListItem(e)==e.hasAttribute("listStart")},setAttributeOnDowncast(e,t,i){0==t||t>1?e.setAttribute("start",t,i):e.removeAttribute("start",i)},getAttributeOnUpcast(e){const t=e.getAttribute("start");return t>=0?t:1}}),t}(e.config.get("list.properties"));for(const n of o)n.addCommand(e),t.schema.extend("$container",{allowAttributes:n.attributeName}),t.schema.extend("$block",{allowAttributes:n.attributeName}),t.schema.extend("$blockObject",{allowAttributes:n.attributeName}),i.registerDowncastStrategy({scope:"list",attributeName:n.attributeName,setAttributeOnDowncast(e,t,i){n.setAttributeOnDowncast(e,t,i)}});e.conversion.for("upcast").add((e=>{for(const t of o)e.on("element:ol",Ne(t)),e.on("element:ul",Ne(t))})),i.on("checkAttributes:list",((e,{viewElement:t,modelAttributes:i})=>{for(const n of o)n.getAttributeOnUpcast(t)!=i[n.attributeName]&&(e.return=!0,e.stop())})),this.listenTo(e.commands.get("indentList"),"afterExecute",((e,i)=>{t.change((e=>{for(const t of i)for(const i of o)i.appliesToListItem(t)&&e.setAttribute(i.attributeName,i.defaultValue,t)}))})),i.on("postFixer",((e,{listNodes:t,writer:i})=>{for(const{node:n}of t)for(const t of o)t.hasValidAttribute(n)||(t.appliesToListItem(n)?i.setAttribute(t.attributeName,t.defaultValue,n):i.removeAttribute(t.attributeName,n),e.return=!0)})),i.on("postFixer",((e,{listNodes:t,writer:i})=>{const n=[];for(const{node:r,previous:s}of t){if(!s)continue;const t=r.getAttribute("listIndent"),a=s.getAttribute("listIndent");let l=null;if(t>a?n[a]=s:tString(e)))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",(e=>!e)),e.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),e}}var je=i(9938),$e={attributes:{"data-cke":!0}};$e.setAttributes=Q(),$e.insert=J().bind(null,"head"),$e.domAPI=K(),$e.insertStyleElement=ee(),$()(je.Z,$e),je.Z&&je.Z.locals&&je.Z.locals;class qe extends le.G7{constructor(e,{enabledProperties:t,styleButtonViews:i,styleGridAriaLabel:o}){super(e),this.stylesView=null,this.additionalPropertiesCollapsibleView=null,this.startIndexFieldView=null,this.reversedSwitchButtonView=null,this.focusTracker=new s.Rh,this.keystrokes=new s.VD,this.focusables=new le.vX;const n=["ck","ck-list-properties"];this.children=this.createCollection(),this.focusCycler=new le.I0({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),t.styles?(this.stylesView=this._createStylesView(i,o),this.children.add(this.stylesView)):n.push("ck-list-properties_without-styles"),(t.startIndex||t.reversed)&&(this._addNumberedListPropertyViews(t),n.push("ck-list-properties_with-numbered-properties")),this.setTemplate({tag:"div",attributes:{class:n},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element),(this.startIndexFieldView||this.reversedSwitchButtonView)&&(this.focusables.add(this.children.last.buttonView),this.focusTracker.add(this.children.last.buttonView.element));for(const e of this.stylesView.children)this.stylesView.focusTracker.add(e.element);(0,le.IJ)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>s.CO.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element),this.listenTo(this.startIndexFieldView.element,"selectstart",((e,t)=>{t.stopPropagation()}),{priority:"high"});const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}this.reversedSwitchButtonView&&(this.focusables.add(this.reversedSwitchButtonView),this.focusTracker.add(this.reversedSwitchButtonView.element)),this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createStylesView(e,t){const i=new le.G7(this.locale);return i.children=i.createCollection(),i.children.addMany(e),i.setTemplate({tag:"div",attributes:{"aria-label":t,class:["ck","ck-list-styles-list"]},children:i.children}),i.children.delegate("execute").to(this),i.focus=function(){this.children.first.focus()},i.focusTracker=new s.Rh,i.keystrokes=new s.VD,i.render(),i.keystrokes.listenTo(i.element),i}_addNumberedListPropertyViews(e){const t=this.locale.t,i=[];e.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),i.push(this.startIndexFieldView)),e.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),i.push(this.reversedSwitchButtonView)),e.styles?(this.additionalPropertiesCollapsibleView=new Ue(this.locale,i),this.additionalPropertiesCollapsibleView.set({label:t("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",((e,t,i)=>{i||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)})),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(i)}_createStartIndexField(){const e=this.locale.t,t=new le.KP(this.locale,le.sh);return t.set({label:e("Start at"),class:"ck-numbered-list-properties__start-index"}),t.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),t.fieldView.on("input",(()=>{const i=t.fieldView.element,o=i.valueAsNumber;Number.isNaN(o)||(i.checkValidity()?this.fire("listStart",{startIndex:o}):t.errorText=e("Start index must be greater than 0."))})),t}_createReversedSwitchButton(){const e=this.locale.t,t=new le.BM(this.locale);return t.set({withText:!0,label:e("Reversed order"),class:"ck-numbered-list-properties__reversed-order"}),t.delegate("execute").to(this,"listReversed"),t}}var Ke=i(2591),Ge={attributes:{"data-cke":!0}};Ge.setAttributes=Q(),Ge.insert=J().bind(null,"head"),Ge.domAPI=K(),Ge.insertStyleElement=ee(),$()(Ke.Z,Ge),Ke.Z&&Ke.Z.locals&&Ke.Z.locals;class Je extends o.Sy{static get pluginName(){return"ListPropertiesUI"}init(){const e=this.editor,t=e.locale.t,i=e.config.get("list.properties");i.styles&&e.ui.componentFactory.add("bulletedList",Ye({editor:e,parentCommandName:"bulletedList",buttonLabel:t("Bulleted List"),buttonIcon:Ce,styleGridAriaLabel:t("Bulleted list styles toolbar"),styleDefinitions:[{label:t("Toggle the disc list style"),tooltip:t("Disc"),type:"disc",icon:''},{label:t("Toggle the circle list style"),tooltip:t("Circle"),type:"circle",icon:''},{label:t("Toggle the square list style"),tooltip:t("Square"),type:"square",icon:''}]})),(i.styles||i.startIndex||i.reversed)&&e.ui.componentFactory.add("numberedList",Ye({editor:e,parentCommandName:"numberedList",buttonLabel:t("Numbered List"),buttonIcon:ye,styleGridAriaLabel:t("Numbered list styles toolbar"),styleDefinitions:[{label:t("Toggle the decimal list style"),tooltip:t("Decimal"),type:"decimal",icon:''},{label:t("Toggle the decimal with leading zero list style"),tooltip:t("Decimal with leading zero"),type:"decimal-leading-zero",icon:''},{label:t("Toggle the lower–roman list style"),tooltip:t("Lower–roman"),type:"lower-roman",icon:''},{label:t("Toggle the upper–roman list style"),tooltip:t("Upper-roman"),type:"upper-roman",icon:''},{label:t("Toggle the lower–latin list style"),tooltip:t("Lower-latin"),type:"lower-latin",icon:''},{label:t("Toggle the upper–latin list style"),tooltip:t("Upper-latin"),type:"upper-latin",icon:''}]}))}}function Ye({editor:e,parentCommandName:t,buttonLabel:i,buttonIcon:o,styleGridAriaLabel:n,styleDefinitions:r}){const s=e.commands.get(t);return a=>{const l=(0,le.t9)(a,le.Rm),c=l.buttonView;return l.bind("isEnabled").to(s),l.class="ck-list-styles-dropdown",c.on("execute",(()=>{e.execute(t),e.editing.view.focus()})),c.set({label:i,icon:o,tooltip:!0,isToggleable:!0}),c.bind("isOn").to(s,"value",(e=>!!e)),l.once("change:isOpen",(()=>{const i=function({editor:e,dropdownView:t,parentCommandName:i,styleDefinitions:o,styleGridAriaLabel:n}){const r=e.locale,s=e.config.get("list.properties");let a=null;if("numberedList"!=i&&(s.startIndex=!1,s.reversed=!1),s.styles){const t=e.commands.get("listStyle"),n=function({editor:e,listStyleCommand:t,parentCommandName:i}){const o=e.locale,n=e.commands.get(i);return({label:i,type:r,icon:s,tooltip:a})=>{const l=new le.r5(o);return l.set({label:i,icon:s,tooltip:a}),t.on("change:value",(()=>{l.isOn=t.value===r})),l.on("execute",(()=>{n.value?t.value!==r?e.execute("listStyle",{type:r}):e.execute("listStyle",{type:t.defaultType}):e.model.change((()=>{e.execute("listStyle",{type:r})}))})),l}}({editor:e,parentCommandName:i,listStyleCommand:t}),r="function"==typeof t.isStyleTypeSupported?e=>t.isStyleTypeSupported(e.type):()=>!0;a=o.filter(r).map(n)}const l=new qe(r,{styleGridAriaLabel:n,enabledProperties:s,styleButtonViews:a});if(s.styles&&(0,le.Mh)(t,(()=>l.stylesView.children.find((e=>e.isOn)))),s.startIndex){const t=e.commands.get("listStart");l.startIndexFieldView.bind("isEnabled").to(t),l.startIndexFieldView.fieldView.bind("value").to(t),l.on("listStart",((t,i)=>e.execute("listStart",i)))}if(s.reversed){const t=e.commands.get("listReversed");l.reversedSwitchButtonView.bind("isEnabled").to(t),l.reversedSwitchButtonView.bind("isOn").to(t,"value",(e=>!!e)),l.on("listReversed",(()=>{const i=t.value;e.execute("listReversed",{reversed:!i})}))}return l.delegate("execute").to(t),l}({editor:e,dropdownView:l,parentCommandName:t,styleGridAriaLabel:n,styleDefinitions:r});l.panelView.children.add(i)})),l.on("execute",(()=>{e.editing.view.focus()})),l}}class Qe extends o.Sy{static get requires(){return[Fe,Je]}static get pluginName(){return"DocumentListProperties"}}class Xe extends o.mY{constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let i=Array.from(t.selection.getSelectedBlocks());e.change((e=>{const t=i[i.length-1];let o=t.nextSibling;for(;o&&"listItem"==o.name&&o.getAttribute("listIndent")>t.getAttribute("listIndent");)i.push(o),o=o.nextSibling;this._indentBy<0&&(i=i.reverse());for(const t of i){const i=t.getAttribute("listIndent")+this._indentBy;i<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",i,t)}this.fire("_executeCleanup",i)}))}_checkEnabled(){const e=(0,s.Ps)(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),i=e.getAttribute("listType");let o=e.previousSibling;for(;o&&o.is("element","listItem")&&o.getAttribute("listIndent")>=t;){if(o.getAttribute("listIndent")==t)return o.getAttribute("listType")==i;o=o.previousSibling}return!1}return!0}}class et extends o.mY{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.document,o=Array.from(i.selection.getSelectedBlocks()).filter((e=>it(e,t.schema))),n=void 0!==e.forceValue?!e.forceValue:this.value;t.change((e=>{if(n){let t=o[o.length-1].nextSibling,i=Number.POSITIVE_INFINITY,n=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e=i;)r>n.getAttribute("listIndent")&&(r=n.getAttribute("listIndent")),n.getAttribute("listIndent")==r&&e[t?"unshift":"push"](n),n=n[t?"previousSibling":"nextSibling"]}}function it(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class ot extends o.Sy{static get pluginName(){return"ListUtils"}getListTypeFromListStyleType(e){return _e(e)}getSelectedListItems(e){return be(e)}getSiblingNodes(e,t){return fe(e,t)}}function nt(e){return(t,i,o)=>{const n=o.consumable;if(!n.test(i.item,"insert")||!n.test(i.item,"attribute:listType")||!n.test(i.item,"attribute:listIndent"))return;n.consume(i.item,"insert"),n.consume(i.item,"attribute:listType"),n.consume(i.item,"attribute:listIndent");const r=i.item;de(r,ce(r,o),o,e)}}const rt=(e,t,i)=>{if(!i.consumable.test(t.item,e.name))return;const o=i.mapper.toViewElement(t.item),n=i.writer;n.breakContainer(n.createPositionBefore(o)),n.breakContainer(n.createPositionAfter(o));const r=o.parent,s="numbered"==t.attributeNewValue?"ol":"ul";n.rename(s,r)},st=(e,t,i)=>{i.consumable.consume(t.item,e.name);const o=i.mapper.toViewElement(t.item).parent,n=i.writer;ue(n,o,o.nextSibling),ue(n,o.previousSibling,o)},at=(e,t,i)=>{if(i.consumable.test(t.item,e.name)&&"listItem"!=t.item.name){let e=i.mapper.toViewPosition(t.range.start);const o=i.writer,n=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&(e=o.breakContainer(e),"li"==e.parent.name);){const t=e,i=o.createPositionAt(e.parent,"end");if(!t.isEqual(i)){const e=o.remove(o.createRange(t,i));n.push(e)}e=o.createPositionAfter(e.parent)}if(n.length>0){for(let t=0;t0){const t=ue(o,i,i.nextSibling);t&&t.parent==i&&e.offset--}}ue(o,e.nodeBefore,e.nodeAfter)}}},lt=(e,t,i)=>{const o=i.mapper.toViewPosition(t.position),n=o.nodeBefore,r=o.nodeAfter;ue(i.writer,n,r)},ct=(e,t,i)=>{if(i.consumable.consume(t.viewItem,{name:!0})){const e=i.writer,o=e.createElement("listItem"),n=function(e){let t=0,i=e.parent;for(;i;){if(i.is("element","li"))t++;else{const e=i.previousSibling;e&&e.is("element","li")&&t++}i=i.parent}return t}(t.viewItem);e.setAttribute("listIndent",n,o);const r=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",r,o),!i.safeInsert(o,t.modelCursor))return;const s=function(e,t,i){const{writer:o,schema:n}=i;let r=o.createPositionAfter(e);for(const s of t)if("ul"==s.name||"ol"==s.name)r=i.convertItem(s,r).modelCursor;else{const t=i.convertItem(s,o.createPositionAt(e,"end")),a=t.modelRange.start.nodeAfter;a&&a.is("element")&&!n.checkChild(e,a.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:gt(t.modelCursor),r=o.createPositionAfter(e))}return r}(o,t.viewItem.getChildren(),i);t.modelRange=e.createRange(t.modelCursor,s),i.updateConversionResult(o,t)}},dt=(e,t,i)=>{if(i.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e)!t.is("element","li")&&!ft(t)&&t._remove()}},ut=(e,t,i)=>{if(i.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let i=!1;for(const t of e)i&&!ft(t)&&t._remove(),ft(t)&&(i=!0)}};function ht(e){return(t,i)=>{if(i.isPhantom)return;const o=i.modelPosition.nodeBefore;if(o&&o.is("element","listItem")){const t=i.mapper.toViewElement(o),n=t.getAncestors().find(ft),r=e.createPositionAt(t,0).getWalker();for(const e of r){if("elementStart"==e.type&&e.item.is("element","li")){i.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==n){i.viewPosition=e.nextPosition;break}}}}}const mt=function(e,[t,i]){let o,n=t.is("documentFragment")?t.getChild(0):t;if(o=i?this.createSelection(i):this.document.selection,n&&n.is("element","listItem")){const e=o.getFirstPosition();let t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;n&&n.is("element","listItem");)n._setAttribute("listIndent",n.getAttribute("listIndent")+e),n=n.nextSibling}}};function gt(e){const t=new O.Po({startPosition:e});let i;do{i=t.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function pt(e,t,i,o,n,r){const s=me(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e}),a=n.mapper,l=n.writer,c=s?s.getAttribute("listIndent"):null;let d;if(s)if(c==e){const e=a.toViewElement(s).parent;d=l.createPositionAfter(e)}else{const e=r.createPositionAt(s,"end");d=a.toViewPosition(e)}else d=i;d=he(d);for(const e of[...o.getChildren()])ft(e)&&(d=l.move(l.createRangeOn(e),d).end,ue(l,e,e.nextSibling),ue(l,e.previousSibling,e))}function ft(e){return e.is("element","ol")||e.is("element","ul")}class bt extends o.Sy{static get pluginName(){return"ListEditing"}static get requires(){return[r.C,n.HG,ot]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,i=e.editing;var o;e.model.document.registerPostFixer((t=>function(e,t){const i=e.document.differ.getChanges(),o=new Map;let n=!1;for(const o of i)if("insert"==o.type&&"listItem"==o.name)r(o.position);else if("insert"==o.type&&"listItem"!=o.name){if("$text"!=o.name){const i=o.position.nodeAfter;i.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",i),n=!0),i.hasAttribute("listType")&&(t.removeAttribute("listType",i),n=!0),i.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",i),n=!0),i.hasAttribute("listReversed")&&(t.removeAttribute("listReversed",i),n=!0),i.hasAttribute("listStart")&&(t.removeAttribute("listStart",i),n=!0);for(const t of Array.from(e.createRangeIn(i)).filter((e=>e.item.is("element","listItem"))))r(t.previousPosition)}r(o.position.getShiftedBy(o.length))}else"remove"==o.type&&"listItem"==o.name?r(o.position):("attribute"==o.type&&"listIndent"==o.attributeKey||"attribute"==o.type&&"listType"==o.attributeKey)&&r(o.range.start);for(const e of o.values())s(e),a(e);return n;function r(e){const t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(o.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,o.has(e))return;o.set(t,e)}else{const t=e.nodeAfter;t&&t.is("element","listItem")&&o.set(t,t)}}function s(e){let i=0,o=null;for(;e&&e.is("element","listItem");){const r=e.getAttribute("listIndent");if(r>i){let s;null===o?(o=r-i,s=i):(o>r&&(o=r),s=r-o),t.setAttribute("listIndent",s,e),n=!0}else o=null,i=e.getAttribute("listIndent")+1;e=e.nextSibling}}function a(e){let i=[],o=null;for(;e&&e.is("element","listItem");){const r=e.getAttribute("listIndent");if(o&&o.getAttribute("listIndent")>r&&(i=i.slice(0,r+1)),0!=r)if(i[r]){const o=i[r];e.getAttribute("listType")!=o&&(t.setAttribute("listType",o,e),n=!0)}else i[r]=e.getAttribute("listType");o=e,e=e.nextSibling}}}(e.model,t))),i.mapper.registerViewToModelLength("li",wt),t.mapper.registerViewToModelLength("li",wt),i.mapper.on("modelToViewPosition",ht(i.view)),i.mapper.on("viewToModelPosition",(o=e.model,(e,t)=>{const i=t.viewPosition,n=i.parent,r=t.mapper;if("ul"==n.name||"ol"==n.name){if(i.isAtEnd){const e=r.toModelElement(i.nodeBefore),n=r.getModelLength(i.nodeBefore);t.modelPosition=o.createPositionBefore(e).getShiftedBy(n)}else{const e=r.toModelElement(i.nodeAfter);t.modelPosition=o.createPositionBefore(e)}e.stop()}else if("li"==n.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const s=r.toModelElement(n);let a=1,l=i.nodeBefore;for(;l&&ft(l);)a+=r.getModelLength(l),l=l.previousSibling;t.modelPosition=o.createPositionBefore(s).getShiftedBy(a),e.stop()}})),t.mapper.on("modelToViewPosition",ht(i.view)),e.conversion.for("editingDowncast").add((t=>{t.on("insert",at,{priority:"high"}),t.on("insert:listItem",nt(e.model)),t.on("attribute:listType:listItem",rt,{priority:"high"}),t.on("attribute:listType:listItem",st,{priority:"low"}),t.on("attribute:listIndent:listItem",function(e){return(t,i,o)=>{if(!o.consumable.consume(i.item,"attribute:listIndent"))return;const n=o.mapper.toViewElement(i.item),r=o.writer;r.breakContainer(r.createPositionBefore(n)),r.breakContainer(r.createPositionAfter(n));const s=n.parent,a=s.previousSibling,l=r.createRangeOn(s);r.remove(l),a&&a.nextSibling&&ue(r,a,a.nextSibling),pt(i.attributeOldValue+1,i.range.start,l.start,n,o,e),de(i.item,n,o,e);for(const e of i.item.getChildren())o.consumable.consume(e,"insert")}}(e.model)),t.on("remove:listItem",function(e){return(t,i,o)=>{const n=o.mapper.toViewPosition(i.position).getLastMatchingPosition((e=>!e.item.is("element","li"))).nodeAfter,r=o.writer;r.breakContainer(r.createPositionBefore(n)),r.breakContainer(r.createPositionAfter(n));const s=n.parent,a=s.previousSibling,l=r.createRangeOn(s),c=r.remove(l);a&&a.nextSibling&&ue(r,a,a.nextSibling),pt(o.mapper.toModelElement(n).getAttribute("listIndent")+1,i.position,l.start,n,o,e);for(const e of r.createRangeIn(c).getItems())o.mapper.unbindViewElement(e);t.stop()}}(e.model)),t.on("remove",lt,{priority:"low"})})),e.conversion.for("dataDowncast").add((t=>{t.on("insert",at,{priority:"high"}),t.on("insert:listItem",nt(e.model))})),e.conversion.for("upcast").add((e=>{e.on("element:ul",dt,{priority:"high"}),e.on("element:ol",dt,{priority:"high"}),e.on("element:li",ut,{priority:"high"}),e.on("element:li",ct)})),e.model.on("insertContent",mt,{priority:"high"}),e.commands.add("numberedList",new et(e,"numbered")),e.commands.add("bulletedList",new et(e,"bulleted")),e.commands.add("indentList",new Xe(e,"forward")),e.commands.add("outdentList",new Xe(e,"backward"));const n=i.view.document;this.listenTo(n,"enter",((e,t)=>{const i=this.editor.model.document,o=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==o.name&&o.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())}),{context:"li"}),this.listenTo(n,"delete",((e,t)=>{if("backward"!==t.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const o=i.getFirstPosition();if(!o.isAtStart)return;const n=o.parent;"listItem"===n.name&&(n.previousSibling&&"listItem"===n.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop()))}),{context:"li"}),this.listenTo(e.editing.view.document,"tab",((t,i)=>{const o=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(o).isEnabled&&(e.execute(o),i.stopPropagation(),i.preventDefault(),t.stop())}),{context:"li"})}afterInit(){const e=this.editor.commands,t=e.get("indent"),i=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),i&&i.registerChildCommand(e.get("outdentList"))}}function wt(e){let t=1;for(const i of e.getChildren())if("ul"==i.name||"ol"==i.name)for(const e of i.getChildren())t+=wt(e);return t}class kt extends o.Sy{static get requires(){return[bt,xe]}static get pluginName(){return"List"}}class _t extends o.mY{constructor(e,t){super(e),this.defaultType=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){this._tryToConvertItemsToList(e);const t=this.editor.model,i=be(t);i.length&&t.change((t=>{for(const o of i)t.setAttribute("listStyle",e.type||this.defaultType,o)}))}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")?e.getAttribute("listStyle"):null}_checkEnabled(){const e=this.editor,t=e.commands.get("numberedList"),i=e.commands.get("bulletedList");return t.isEnabled||i.isEnabled}_tryToConvertItemsToList(e){if(!e.type)return;const t=_e(e.type);if(!t)return;const i=this.editor,o=`${t}List`;i.commands.get(o).value||i.execute(o)}}class vt extends o.mY{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute(e={}){const t=this.editor.model,i=be(t).filter((e=>"numbered"==e.getAttribute("listType")));t.change((t=>{for(const o of i)t.setAttribute("listReversed",!!e.reversed,o)}))}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")&&"numbered"==e.getAttribute("listType")?e.getAttribute("listReversed"):null}}class yt extends o.mY{refresh(){const e=this._getValue();this.value=e,this.isEnabled=null!=e}execute({startIndex:e=1}={}){const t=this.editor.model,i=be(t).filter((e=>"numbered"==e.getAttribute("listType")));t.change((t=>{for(const o of i)t.setAttribute("listStart",e>=0?e:1,o)}))}_getValue(){const e=this.editor.model.document.selection.getFirstPosition().parent;return e&&e.is("element","listItem")&&"numbered"==e.getAttribute("listType")?e.getAttribute("listStart"):null}}const Ct="default";class xt extends o.Sy{static get requires(){return[bt]}static get pluginName(){return"ListPropertiesEditing"}constructor(e){super(e),e.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const e=this.editor,t=e.model,i=function(e){const t=[];return e.styles&&t.push({attributeName:"listStyle",defaultValue:Ct,addCommand(e){e.commands.add("listStyle",new _t(e,Ct))},appliesToListItem:()=>!0,setAttributeOnDowncast(e,t,i){t&&t!==Ct?e.setStyle("list-style-type",t,i):e.removeStyle("list-style-type",i)},getAttributeOnUpcast:e=>e.getStyle("list-style-type")||Ct}),e.reversed&&t.push({attributeName:"listReversed",defaultValue:!1,addCommand(e){e.commands.add("listReversed",new vt(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),setAttributeOnDowncast(e,t,i){t?e.setAttribute("reversed","reversed",i):e.removeAttribute("reversed",i)},getAttributeOnUpcast:e=>e.hasAttribute("reversed")}),e.startIndex&&t.push({attributeName:"listStart",defaultValue:1,addCommand(e){e.commands.add("listStart",new yt(e))},appliesToListItem:e=>"numbered"==e.getAttribute("listType"),setAttributeOnDowncast(e,t,i){0==t||t>1?e.setAttribute("start",t,i):e.removeAttribute("start",i)},getAttributeOnUpcast(e){const t=e.getAttribute("start");return t>=0?t:1}}),t}(e.config.get("list.properties"));t.schema.extend("listItem",{allowAttributes:i.map((e=>e.attributeName))});for(const t of i)t.addCommand(e);var o;this.listenTo(e.commands.get("indentList"),"_executeCleanup",function(e,t){return(i,o)=>{const n=o[0],r=n.getAttribute("listIndent"),s=o.filter((e=>e.getAttribute("listIndent")===r));let a=null;n.previousSibling.getAttribute("listIndent")+1!==r&&(a=me(n.previousSibling,{sameIndent:!0,direction:"backward",listIndent:r})),e.model.change((e=>{for(const i of s)for(const o of t)if(o.appliesToListItem(i)){const t=null==a?o.defaultValue:a.getAttribute(o.attributeName);e.setAttribute(o.attributeName,t,i)}}))}}(e,i)),this.listenTo(e.commands.get("outdentList"),"_executeCleanup",function(e,t){return(i,o)=>{if(!(o=o.reverse().filter((e=>e.is("element","listItem")))).length)return;const n=o[0].getAttribute("listIndent"),r=o[0].getAttribute("listType");let s=o[0].previousSibling;if(s.is("element","listItem"))for(;s.getAttribute("listIndent")!==n;)s=s.previousSibling;else s=null;s||(s=o[o.length-1].nextSibling),s&&s.is("element","listItem")&&s.getAttribute("listType")===r&&e.model.change((e=>{const i=o.filter((e=>e.getAttribute("listIndent")===n));for(const o of i)for(const i of t)if(i.appliesToListItem(o)){const t=i.attributeName,n=s.getAttribute(t);e.setAttribute(t,n,o)}}))}}(e,i)),this.listenTo(e.commands.get("bulletedList"),"_executeCleanup",Tt(e)),this.listenTo(e.commands.get("numberedList"),"_executeCleanup",Tt(e)),t.document.registerPostFixer(function(e,t){return i=>{let o=!1;const n=St(e.model.document.differ.getChanges()).filter((e=>"todo"!==e.getAttribute("listType")));if(!n.length)return o;let r=n[n.length-1].nextSibling;if((!r||!r.is("element","listItem"))&&(r=n[0].previousSibling,r)){const e=n[0].getAttribute("listIndent");for(;r.is("element","listItem")&&r.getAttribute("listIndent")!==e&&(r=r.previousSibling,r););}for(const e of t){const t=e.attributeName;for(const s of n)if(e.appliesToListItem(s))if(s.hasAttribute(t)){const n=s.previousSibling;Et(n,s,e.attributeName)&&(i.setAttribute(t,n.getAttribute(t),s),o=!0)}else At(r,s,e)?i.setAttribute(t,r.getAttribute(t),s):i.setAttribute(t,e.defaultValue,s),o=!0;else i.removeAttribute(t,s)}return o}}(e,i)),e.conversion.for("upcast").add((o=i,e=>{e.on("element:li",((e,t,i)=>{if(!t.modelRange)return;const n=t.viewItem.parent,r=t.modelRange.start.nodeAfter||t.modelRange.end.nodeBefore;for(const e of o)if(e.appliesToListItem(r)){const t=e.getAttributeOnUpcast(n);i.writer.setAttribute(e.attributeName,t,r)}}),{priority:"low"})})),e.conversion.for("downcast").add(function(e){return t=>{for(const i of e)t.on(`attribute:${i.attributeName}:listItem`,((e,t,o)=>{const n=o.writer,r=t.item,s=me(r.previousSibling,{sameIndent:!0,listIndent:r.getAttribute("listIndent"),direction:"backward"}),a=o.mapper.toViewElement(r);var l,c;l=r,(c=s)&&l.getAttribute("listType")===c.getAttribute("listType")&&l.getAttribute("listIndent")===c.getAttribute("listIndent")&&l.getAttribute("listStyle")===c.getAttribute("listStyle")&&l.getAttribute("listReversed")===c.getAttribute("listReversed")&&l.getAttribute("listStart")===c.getAttribute("listStart")||n.breakContainer(n.createPositionBefore(a)),i.setAttributeOnDowncast(n,t.attributeNewValue,a.parent)}),{priority:"low"})}}(i)),this._mergeListAttributesWhileMergingLists(i)}afterInit(){const e=this.editor;e.commands.get("todoList")&&e.model.document.registerPostFixer(function(e){return t=>{const i=St(e.model.document.differ.getChanges()).filter((e=>"todo"===e.getAttribute("listType")&&(e.hasAttribute("listStyle")||e.hasAttribute("listReversed")||e.hasAttribute("listStart"))));if(!i.length)return!1;for(const e of i)t.removeAttribute("listStyle",e),t.removeAttribute("listReversed",e),t.removeAttribute("listStart",e);return!0}}(e))}_mergeListAttributesWhileMergingLists(e){const t=this.editor.model;let i;this.listenTo(t,"deleteContent",((e,[t])=>{const o=t.getFirstPosition(),n=t.getLastPosition();if(o.parent===n.parent)return;if(!o.parent.is("element","listItem"))return;const r=n.parent.nextSibling;if(!r||!r.is("element","listItem"))return;const s=me(o.parent,{sameIndent:!0,listIndent:r.getAttribute("listIndent")});s&&s.getAttribute("listType")===r.getAttribute("listType")&&(i=s)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{i&&(t.change((t=>{const o=me(i.nextSibling,{sameIndent:!0,listIndent:i.getAttribute("listIndent"),direction:"forward"});if(!o)return void(i=null);const n=[o,...fe(t.createPositionAt(o,0),"forward")];for(const o of n)for(const n of e)if(n.appliesToListItem(o)){const e=n.attributeName,r=i.getAttribute(e);t.setAttribute(e,r,o)}})),i=null)}),{priority:"low"})}}function At(e,t,i){if(!e)return!1;const o=e.getAttribute(i.attributeName);return!!o&&o!=i.defaultValue&&e.getAttribute("listType")===t.getAttribute("listType")}function Et(e,t,i){if(!e||!e.is("element","listItem"))return!1;if(t.getAttribute("listType")!==e.getAttribute("listType"))return!1;const o=e.getAttribute("listIndent");if(o<1||o!==t.getAttribute("listIndent"))return!1;const n=e.getAttribute(i);return!(!n||n===t.getAttribute(i))}function Tt(e){return(t,i)=>{i=i.filter((e=>e.is("element","listItem"))),e.model.change((e=>{for(const t of i)e.removeAttribute("listStyle",t)}))}}function St(e){const t=[];for(const i of e){const e=Pt(i);e&&e.is("element","listItem")&&t.push(e)}return t}function Pt(e){return"attribute"===e.type?e.range.start.nodeAfter:"insert"===e.type?e.position.nodeAfter:null}class It extends o.Sy{static get requires(){return[xt,Je]}static get pluginName(){return"ListProperties"}}const Vt="todoListChecked";class Rt extends o.mY{constructor(e){super(e),this._selectedElements=[],this.on("execute",(()=>{this.refresh()}),{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every((e=>!!e.getAttribute(Vt))),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const e=this.editor.model,t=e.schema,i=e.document.selection.getFirstRange(),o=i.start.parent,n=[];t.checkAttribute(o,Vt)&&n.push(o);for(const e of i.getItems())t.checkAttribute(e,Vt)&&!n.includes(e)&&n.push(e);return n}execute(e={}){this.editor.model.change((t=>{for(const i of this._selectedElements)(void 0===e.forceValue?!this.value:e.forceValue)?t.setAttribute(Vt,!0,i):t.removeAttribute(Vt,i)}))}}const Ot=(e,t,i)=>{const o=t.modelCursor,n=o.parent,r=t.viewItem;if("checkbox"!=r.getAttribute("type")||"listItem"!=n.name||!o.isAtStart)return;if(!i.consumable.consume(r,{name:!0}))return;const s=i.writer;s.setAttribute("listType","todo",n),t.viewItem.hasAttribute("checked")&&s.setAttribute("todoListChecked",!0,n),t.modelRange=s.createRange(o)};function Bt(e){return(t,i)=>{const o=i.modelPosition,n=o.parent;if(!n.is("element","listItem")||"todo"!=n.getAttribute("listType"))return;const r=zt(i.mapper.toViewElement(n),e);r&&(i.viewPosition=i.mapper.findPositionIn(r,o.offset))}}function Mt(e,t,i,o){return t.createUIElement("label",{class:"todo-list__label",contenteditable:!1},(function(t){const n=(0,s.az)(document,"input",{type:"checkbox",tabindex:"-1"});i&&n.setAttribute("checked","checked"),n.addEventListener("change",(()=>o(e)));const r=this.toDomElement(t);return r.appendChild(n),r}))}function zt(e,t){const i=t.createRangeIn(e);for(const e of i)if(e.item.is("containerElement","span")&&e.item.hasClass("todo-list__label__description"))return e.item}const Nt=(0,s.Zz)("Ctrl+Enter");class Dt extends o.Sy{static get pluginName(){return"TodoListEditing"}static get requires(){return[bt]}init(){const e=this.editor,{editing:t,data:i,model:o}=e;o.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),o.schema.addAttributeCheck(((e,t)=>{const i=e.last;if("todoListChecked"==t&&"listItem"==i.name&&"todo"!=i.getAttribute("listType"))return!1})),e.commands.add("todoList",new et(e,"todo"));const n=new Rt(e);var r,a;e.commands.add("checkTodoList",n),e.commands.add("todoListCheck",n),i.downcastDispatcher.on("insert:listItem",function(e){return(t,i,o)=>{const n=o.consumable;if(!n.test(i.item,"insert")||!n.test(i.item,"attribute:listType")||!n.test(i.item,"attribute:listIndent"))return;if("todo"!=i.item.getAttribute("listType"))return;const r=i.item;n.consume(r,"insert"),n.consume(r,"attribute:listType"),n.consume(r,"attribute:listIndent"),n.consume(r,"attribute:todoListChecked");const s=o.writer,a=ce(r,o);s.addClass("todo-list",a.parent);const l=s.createContainerElement("label",{class:"todo-list__label"}),c=s.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),d=s.createContainerElement("span",{class:"todo-list__label__description"});r.getAttribute("todoListChecked")&&s.setAttribute("checked","checked",c),s.insert(s.createPositionAt(a,0),l),s.insert(s.createPositionAt(l,0),c),s.insert(s.createPositionAfter(c),d),de(r,a,o,e)}}(o),{priority:"high"}),i.upcastDispatcher.on("element:input",Ot,{priority:"high"}),t.downcastDispatcher.on("insert:listItem",function(e,t){return(i,o,n)=>{const r=n.consumable;if(!r.test(o.item,"insert")||!r.test(o.item,"attribute:listType")||!r.test(o.item,"attribute:listIndent"))return;if("todo"!=o.item.getAttribute("listType"))return;const s=o.item;r.consume(s,"insert"),r.consume(s,"attribute:listType"),r.consume(s,"attribute:listIndent"),r.consume(s,"attribute:todoListChecked");const a=n.writer,l=ce(s,n),c=!!s.getAttribute("todoListChecked"),d=Mt(s,a,c,t),u=a.createContainerElement("span",{class:"todo-list__label__description"});a.addClass("todo-list",l.parent),a.insert(a.createPositionAt(l,0),d),a.insert(a.createPositionAfter(d),u),de(s,l,n,e)}}(o,(e=>this._handleCheckmarkChange(e))),{priority:"high"}),t.downcastDispatcher.on("attribute:listType:listItem",(r=e=>this._handleCheckmarkChange(e),a=t.view,(e,t,i)=>{if(!i.consumable.consume(t.item,e.name))return;const o=i.mapper.toViewElement(t.item),n=i.writer,s=function(e,t){const i=t.createRangeIn(e);for(const e of i)if(e.item.is("uiElement","label"))return e.item}(o,a);if("todo"==t.attributeNewValue){const e=!!t.item.getAttribute("todoListChecked"),i=Mt(t.item,n,e,r),s=n.createContainerElement("span",{class:"todo-list__label__description"}),a=n.createRangeIn(o),l=pe(o),c=he(a.start),d=l?n.createPositionBefore(l):a.end,u=n.createRange(c,d);n.addClass("todo-list",o.parent),n.move(u,n.createPositionAt(s,0)),n.insert(n.createPositionAt(o,0),i),n.insert(n.createPositionAfter(i),s)}else if("todo"==t.attributeOldValue){const e=zt(o,a);n.removeClass("todo-list",o.parent),n.remove(s),n.move(n.createRangeIn(e),n.createPositionBefore(e)),n.remove(e)}})),t.downcastDispatcher.on("attribute:todoListChecked:listItem",function(e){return(t,i,o)=>{if("todo"!=i.item.getAttribute("listType"))return;if(!o.consumable.consume(i.item,"attribute:todoListChecked"))return;const{mapper:n,writer:r}=o,s=!!i.item.getAttribute("todoListChecked"),a=n.toViewElement(i.item).getChild(0),l=Mt(i.item,r,s,e);r.insert(r.createPositionAfter(a),l),r.remove(a)}}((e=>this._handleCheckmarkChange(e)))),t.mapper.on("modelToViewPosition",Bt(t.view)),i.mapper.on("modelToViewPosition",Bt(t.view)),this.listenTo(t.view.document,"arrowKey",function(e,t){return(i,o)=>{if("left"!=(0,s.mA)(o.keyCode,t.contentLanguageDirection))return;const n=e.schema,r=e.document.selection;if(!r.isCollapsed)return;const a=r.getFirstPosition(),l=a.parent;if("listItem"===l.name&&"todo"==l.getAttribute("listType")&&a.isAtStart){const t=n.getNearestSelectionRange(e.createPositionBefore(l),"backward");t&&e.change((e=>e.setSelection(t))),o.preventDefault(),o.stopPropagation(),i.stop()}}}(o,e.locale),{context:"li"}),this.listenTo(t.view.document,"keydown",((t,i)=>{(0,s.Cq)(i)===Nt&&(e.execute("checkTodoList"),t.stop())}),{priority:"high"});const l=new Set;this.listenTo(o,"applyOperation",((e,t)=>{const i=t[0];if("rename"==i.type&&"listItem"==i.oldName){const e=i.position.nodeAfter;e.hasAttribute("todoListChecked")&&l.add(e)}else if("changeAttribute"==i.type&&"listType"==i.key&&"todo"===i.oldValue)for(const e of i.range.getItems())e.hasAttribute("todoListChecked")&&"todo"!==e.getAttribute("listType")&&l.add(e)})),o.document.registerPostFixer((e=>{let t=!1;for(const i of l)e.removeAttribute("todoListChecked",i),t=!0;return l.clear(),t}))}_handleCheckmarkChange(e){const t=this.editor,i=t.model,o=Array.from(i.document.selection.getRanges());i.change((i=>{i.setSelection(e,"end"),t.execute("checkTodoList"),i.setSelection(o)}))}}class Lt extends o.Sy{static get pluginName(){return"TodoListUI"}init(){const e=this.editor.t;ge(this.editor,"todoList",e("To-do List"),'')}}var Ft=i(9292),Ht={attributes:{"data-cke":!0}};Ht.setAttributes=Q(),Ht.insert=J().bind(null,"head"),Ht.domAPI=K(),Ht.insertStyleElement=ee(),$()(Ft.Z,Ht),Ft.Z&&Ft.Z.locals&&Ft.Z.locals;class Wt extends o.Sy{static get requires(){return[Dt,Lt]}static get pluginName(){return"TodoList"}}},9829:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Mention:()=>W,MentionEditing:()=>s,MentionUI:()=>O});var o=i(6854),n=i(6553);class r extends o.mY{refresh(){const e=this.editor.model,t=e.document;this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"mention")}execute(e){const t=this.editor.model,i=t.document.selection,o="string"==typeof e.mention?{id:e.mention}:e.mention,r=o.id,s=e.range||i.getFirstRange(),l=e.text||r,c=a({_text:l,id:r},o);if(1!=e.marker.length)throw new n.Bb("mentioncommand-incorrect-marker",this);if(r.charAt(0)!=e.marker)throw new n.Bb("mentioncommand-incorrect-id",this);t.change((e=>{const o=(0,n.qL)(i.getAttributes()),r=new Map(o.entries());r.set("mention",c),t.insertContent(e.createText(l,r),s),t.insertContent(e.createText(" ",o),s.start.getShiftedBy(l.length))}))}}class s extends o.Sy{static get pluginName(){return"MentionEditing"}init(){const e=this.editor,t=e.model,i=t.document;t.schema.extend("$text",{allowAttributes:"mention"}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",key:"data-mention",classes:"mention"},model:{key:"mention",value:e=>l(e)}}),e.conversion.for("downcast").attributeToElement({model:"mention",view:d}),e.conversion.for("downcast").add(c),i.registerPostFixer((e=>function(e,t,i){const o=t.differ.getChanges();let n=!1;for(const t of o){if("attribute"==t.type)continue;const o=t.position;if("$text"==t.name){const t=o.textNode&&o.textNode.nextSibling;n=h(o.textNode,e)||n,n=h(t,e)||n,n=h(o.nodeBefore,e)||n,n=h(o.nodeAfter,e)||n}if("$text"!=t.name&&"insert"==t.type){const t=o.nodeAfter;for(const i of e.createRangeIn(t).getItems())n=h(i,e)||n}if("insert"==t.type&&i.isInline(t.name)){const t=o.nodeAfter&&o.nodeAfter.nextSibling;n=h(o.nodeBefore,e)||n,n=h(t,e)||n}}return n}(e,i,t.schema))),i.registerPostFixer((e=>function(e,t){const i=t.differ.getChanges();let o=!1;for(const t of i)if("attribute"===t.type&&"mention"!=t.attributeKey){const i=t.range.start.nodeBefore,n=t.range.end.nodeAfter;for(const r of[i,n])u(r)&&r.getAttribute(t.attributeKey)!=t.attributeNewValue&&(e.setAttribute(t.attributeKey,t.attributeNewValue,r),o=!0)}return o}(e,i))),i.registerPostFixer((e=>function(e,t){const i=t.selection,o=i.focus;return!!(i.isCollapsed&&i.hasAttribute("mention")&&function(e){const t=e.isAtStart;return e.nodeBefore&&e.nodeBefore.is("$text")||t}(o))&&(e.removeSelectionAttribute("mention"),!0)}(e,i))),e.commands.add("mention",new r(e))}}function a(e,t){return Object.assign({uid:(0,n.hQ)()},e,t||{})}function l(e,t){const i=e.getAttribute("data-mention"),o=e.getChild(0);if(o)return a({id:i,_text:o.data},t)}function c(e){e.on("attribute:mention",((e,t,i)=>{const o=t.attributeNewValue;if(!t.item.is("$textProxy")||!o)return;const n=t.range.start;(n.textNode||n.nodeAfter).data!=o._text&&i.consumable.consume(t.item,e.name)}),{priority:"highest"})}function d(e,{writer:t}){if(!e)return;const i={class:"mention","data-mention":e.id},o={id:e.uid,priority:20};return t.createAttributeElement("span",i,o)}function u(e){return!(!e||!e.is("$text")&&!e.is("$textProxy")||!e.hasAttribute("mention"))&&e.data!=e.getAttribute("mention")._text}function h(e,t){return!!u(e)&&(t.removeAttribute("mention",e),!0)}var m=i(7095),g=i(5187),p=i(6682),f=i(3379),b=i.n(f),w=i(9037),k=i.n(w),_=i(569),v=i.n(_),y=i(8575),C=i.n(y),x=i(9216),A=i.n(x),E=i(9139),T={attributes:{"data-cke":!0}};T.setAttributes=C(),T.insert=v().bind(null,"head"),T.domAPI=k(),T.insertStyleElement=A(),b()(E.Z,T),E.Z&&E.Z.locals&&E.Z.locals;class S extends m.Bv{constructor(e){super(e),this.extendTemplate({attributes:{class:["ck-mentions"],tabindex:"-1"}})}selectFirst(){this.select(0)}selectNext(){const e=this.selected,t=this.items.getIndex(e);this.select(t+1)}selectPrevious(){const e=this.selected,t=this.items.getIndex(e);this.select(t-1)}select(e){let t=0;e>0&&e{i?(this.domElement.classList.add("ck-on"),this.domElement.classList.remove("ck-off")):(this.domElement.classList.add("ck-off"),this.domElement.classList.remove("ck-on"))})),this.listenTo(this.domElement,"click",(()=>{this.fire("execute")}))}render(){super.render(),this.element=this.domElement}}class I extends m.dn{highlight(){this.children.first.isOn=!0}removeHighlight(){this.children.first.isOn=!1}}const V=[n.Do.arrowup,n.Do.arrowdown,n.Do.esc],R=[n.Do.enter,n.Do.tab];class O extends o.Sy{static get pluginName(){return"MentionUI"}static get requires(){return[m.WB]}constructor(e){super(e),this._items=new n.FE,this._mentionsView=this._createMentionView(),this._mentionsConfigurations=new Map,this._requestFeedDebounced=(0,p.Z)(this._requestFeed,100),e.config.define("mention",{feeds:[]})}init(){const e=this.editor,t=e.config.get("mention.commitKeys")||R,i=V.concat(t);this._balloon=e.plugins.get(m.WB),e.editing.view.document.on("keydown",((e,o)=>{var r;r=o.keyCode,i.includes(r)&&this._isUIVisible&&(o.preventDefault(),e.stop(),o.keyCode==n.Do.arrowdown&&this._mentionsView.selectNext(),o.keyCode==n.Do.arrowup&&this._mentionsView.selectPrevious(),t.includes(o.keyCode)&&this._mentionsView.executeSelected(),o.keyCode==n.Do.esc&&this._hideUIAndRemoveMarker())}),{priority:"highest"}),(0,m.eC)({emitter:this._mentionsView,activator:()=>this._isUIVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUIAndRemoveMarker()});const o=e.config.get("mention.feeds");for(const e of o){const{feed:t,marker:i,dropdownLimit:o}=e;if(!D(i))throw new n.Bb("mentionconfig-incorrect-marker",null,{marker:i});const r={marker:i,feedCallback:"function"==typeof t?t.bind(this.editor):N(t),itemRenderer:e.itemRenderer,dropdownLimit:o};this._mentionsConfigurations.set(i,r)}this._setupTextWatcher(o),this.listenTo(e,"change:isReadOnly",(()=>{this._hideUIAndRemoveMarker()})),this.on("requestFeed:response",((e,t)=>this._handleFeedResponse(t))),this.on("requestFeed:error",(()=>this._hideUIAndRemoveMarker()))}destroy(){super.destroy(),this._mentionsView.destroy()}get _isUIVisible(){return this._balloon.visibleView===this._mentionsView}_createMentionView(){const e=this.editor.locale,t=new S(e);return t.items.bindTo(this._items).using((i=>{const{item:o,marker:n}=i,{dropdownLimit:r}=this._mentionsConfigurations.get(n),s=r||this.editor.config.get("mention.dropdownLimit")||10;if(t.items.length>=s)return null;const a=new I(e),l=this._renderItem(o,n);return l.delegate("execute").to(a),a.children.add(l),a.item=o,a.marker=n,a.on("execute",(()=>{t.fire("execute",{item:o,marker:n})})),a})),t.on("execute",((e,t)=>{const i=this.editor,o=i.model,n=t.item,r=t.marker,s=i.model.markers.get("mention"),a=o.createPositionAt(o.document.selection.focus),l=o.createPositionAt(s.getStart()),c=o.createRange(l,a);this._hideUIAndRemoveMarker(),i.execute("mention",{mention:n,text:n.text,marker:r,range:c}),i.editing.view.focus()})),t}_getItemRenderer(e){const{itemRenderer:t}=this._mentionsConfigurations.get(e);return t}_requestFeed(e,t){this._lastRequested=t;const{feedCallback:i}=this._mentionsConfigurations.get(e),o=i(t);o instanceof Promise?o.then((i=>{this._lastRequested==t?this.fire("requestFeed:response",{feed:i,marker:e,feedText:t}):this.fire("requestFeed:discarded",{feed:i,marker:e,feedText:t})})).catch((t=>{this.fire("requestFeed:error",{error:t}),(0,n.KE)("mention-feed-callback-error",{marker:e})})):this.fire("requestFeed:response",{feed:o,marker:e,feedText:t})}_setupTextWatcher(e){const t=this.editor,i=e.map((e=>({...e,pattern:z(e.marker,e.minimumCharacters||0)}))),o=new g.uL(t.model,function(e){return t=>{const i=M(e,t);if(!i)return!1;let o=0;0!==i.position&&(o=i.position-1);const n=t.substring(o);return i.pattern.test(n)}}(i));o.on("matched",((e,o)=>{const n=M(i,o.text),r=t.model.document.selection.focus,s=t.model.createPositionAt(r.parent,n.position);if(function(e){const t=e.textNode&&e.textNode.hasAttribute("mention"),i=e.nodeBefore;return t||i&&i.is("$text")&&i.hasAttribute("mention")}(r)||function(e){const t=e.nodeAfter;return t&&t.is("$text")&&t.hasAttribute("mention")}(s))return void this._hideUIAndRemoveMarker();const a=function(e,t){let i=0;0!==e.position&&(i=e.position-1);const o=z(e.marker,0);return t.substring(i).match(o)[2]}(n,o.text),l=n.marker.length+a.length,c=r.getShiftedBy(-l),d=r.getShiftedBy(-a.length),u=t.model.createRange(c,d);if(L(t)){const e=t.model.markers.get("mention");t.model.change((t=>{t.updateMarker(e,{range:u})}))}else t.model.change((e=>{e.addMarker("mention",{range:u,usingOperation:!1,affectsData:!1})}));this._requestFeedDebounced(n.marker,a)})),o.on("unmatched",(()=>{this._hideUIAndRemoveMarker()}));const n=t.commands.get("mention");return o.bind("isEnabled").to(n),o}_handleFeedResponse(e){const{feed:t,marker:i}=e;if(!L(this.editor))return;this._items.clear();for(const e of t){const t="object"!=typeof e?{id:e,text:e}:e;this._items.add({item:t,marker:i})}const o=this.editor.model.markers.get("mention");this._items.length?this._showOrUpdateUI(o):this._hideUIAndRemoveMarker()}_showOrUpdateUI(e){this._isUIVisible?this._balloon.updatePosition(this._getBalloonPanelPositionData(e,this._mentionsView.position)):this._balloon.add({view:this._mentionsView,position:this._getBalloonPanelPositionData(e,this._mentionsView.position),singleViewMode:!0}),this._mentionsView.position=this._balloon.view.position,this._mentionsView.selectFirst()}_hideUIAndRemoveMarker(){this._balloon.hasView(this._mentionsView)&&this._balloon.remove(this._mentionsView),L(this.editor)&&this.editor.model.change((e=>e.removeMarker("mention"))),this._mentionsView.position=void 0}_renderItem(e,t){const i=this.editor;let o,n=e.id;const r=this._getItemRenderer(t);if(r){const t=r(e);"string"!=typeof t?o=new P(i.locale,t):n=t}if(!o){const e=new m.r5(i.locale);e.label=n,e.withText=!0,o=e}return o}_getBalloonPanelPositionData(e,t){const i=this.editor,o=i.editing,r=o.view.domConverter,s=o.mapper;return{target:()=>{let t=e.getRange();"$graveyard"==t.start.root.rootName&&(t=i.model.document.selection.getFirstRange());const o=s.toViewRange(t);return n.UL.getDomRangeRects(r.viewRangeToDom(o)).pop()},limiter:()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},positions:B(t,i.locale.uiLanguageDirection)}}}function B(e,t){const i={caret_se:e=>({top:e.bottom+3,left:e.right,name:"caret_se",config:{withArrow:!1}}),caret_ne:(e,t)=>({top:e.top-t.height-3,left:e.right,name:"caret_ne",config:{withArrow:!1}}),caret_sw:(e,t)=>({top:e.bottom+3,left:e.right-t.width,name:"caret_sw",config:{withArrow:!1}}),caret_nw:(e,t)=>({top:e.top-t.height-3,left:e.right-t.width,name:"caret_nw",config:{withArrow:!1}})};return Object.prototype.hasOwnProperty.call(i,e)?[i[e]]:"rtl"!==t?[i.caret_se,i.caret_sw,i.caret_ne,i.caret_nw]:[i.caret_sw,i.caret_se,i.caret_nw,i.caret_ne]}function M(e,t){let i;for(const o of e){const e=t.lastIndexOf(o.marker);e>0&&!t.substring(e-1).match(o.pattern)||(!i||e>=i.position)&&(i={marker:o.marker,position:e,minimumCharacters:o.minimumCharacters,pattern:o.pattern})}return i}function z(e,t){const i=0==t?"*":`{${t},}`,o=n.OB.features.isRegExpUnicodePropertySupported?"\\p{Ps}\\p{Pi}\"'":"\\(\\[{\"'";return new RegExp(`(?:^|[ ${o}])([${e}])(.${i})$`,"u")}function N(e){return t=>e.filter((e=>("string"==typeof e?e:String(e.id)).toLowerCase().includes(t.toLowerCase())))}function D(e){return e&&1==e.length}function L(e){return e.model.markers.has("mention")}var F=i(8544),H={attributes:{"data-cke":!0}};H.setAttributes=C(),H.insert=v().bind(null,"head"),H.domAPI=k(),H.insertStyleElement=A(),b()(F.Z,H),F.Z&&F.Z.locals&&F.Z.locals;class W extends o.Sy{toMentionAttribute(e,t){return l(e,t)}static get pluginName(){return"Mention"}static get requires(){return[s,O]}}},4690:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Paragraph:()=>l,ParagraphButtonUI:()=>u});var o=i(7578),n=i(7732);class r extends o.Command{refresh(){const e=this.editor.model,t=e.document,i=(0,n.first)(t.selection.getSelectedBlocks());this.value=!!i&&i.is("element","paragraph"),this.isEnabled=!!i&&s(i,e.schema)}execute(e={}){const t=this.editor.model,i=t.document;t.change((o=>{const n=(e.selection||i.selection).getSelectedBlocks();for(const e of n)!e.is("element","paragraph")&&s(e,t.schema)&&o.rename(e,"paragraph")}))}}function s(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class a extends o.Command{execute(e){const t=this.editor.model,i=e.attributes;let o=e.position;t.change((e=>{const n=e.createElement("paragraph");if(i&&t.schema.setAllowedAttributes(n,i,e),!t.schema.checkChild(o.parent,n)){const i=t.schema.findAllowedParent(o,n);if(!i)return;o=e.split(o,i).position}t.insertContent(n,o),e.setSelection(n,"in")}))}}class l extends o.Plugin{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new r(e)),e.commands.add("insertParagraph",new a(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>l.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}l.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);var c=i(3905);const d=o.icons.paragraph;class u extends o.Plugin{static get requires(){return[l]}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("paragraph",(i=>{const o=new c.ButtonView(i),n=e.commands.get("paragraph");return o.label=t("Paragraph"),o.icon=d,o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(n),o.bind("isOn").to(n,"value"),o.on("execute",(()=>{e.execute("paragraph")})),o}))}}},189:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PasteFromOffice:()=>b});var o=i(6854),n=i(7197),r=i(3291);function s(e,t,i,{blockElements:o,inlineObjectElements:n}){let r=i.createPositionAt(e,"forward"==t?"after":"before");return r=r.getLastMatchingPosition((({item:e})=>e.is("element")&&!o.includes(e.name)&&!n.includes(e.name)),{direction:t}),"forward"==t?r.nodeAfter:r.nodeBefore}function a(e,t){return!!e&&e.is("element")&&t.includes(e.name)}function l(e){if(e.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(e){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return e;default:return null}}function c(e,t,i){const o=t.parent,n=i.createElement(e.type),r=o.getChildIndex(t)+1;return i.insertChild(r,n,o),e.style&&i.setStyle("list-style-type",e.style,n),e.startIndex&&e.startIndex>1&&i.setAttribute("start",e.startIndex,n),n}function d(e){const t={},i=e.getStyle("mso-list");if(i){const e=i.match(/(^|\s{1,100})l(\d+)/i),o=i.match(/\s{0,100}lfo(\d+)/i),n=i.match(/\s{0,100}level(\d+)/i);e&&o&&n&&(t.id=e[2],t.order=o[1],t.indent=parseInt(n[1]))}return t}const u=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class h{constructor(e){this.document=e}isActive(e){return u.test(e)}execute(e){const t=new r.yj(this.document),{body:i}=e._parsedData;!function(e,t){for(const i of e.getChildren())if(i.is("element","b")&&"normal"===i.getStyle("font-weight")){const o=e.getChildIndex(i);t.remove(i),t.insertChild(o,i.getChildren(),e)}}(i,t),function(e,t){for(const i of t.createRangeIn(e)){const e=i.item;if(e.is("element","li")){const i=e.getChild(0);i&&i.is("element","p")&&t.unwrapElement(i)}}}(i,t),function(e,t){const i=new r.Ux(t.document.stylesProcessor),o=new r.pG(i,{renderingMode:"data"}),n=o.blockElements,l=o.inlineObjectElements,c=[];for(const i of t.createRangeIn(e)){const e=i.item;if(e.is("element","br")){const i=s(e,"forward",t,{blockElements:n,inlineObjectElements:l}),o=s(e,"backward",t,{blockElements:n,inlineObjectElements:l}),r=a(i,n);(a(o,n)||r)&&c.push(e)}}for(const e of c)e.hasClass("Apple-interchange-newline")?t.remove(e):t.replace(e,t.createElement("p"))}(i,t),e.content=i}}const m=//i,g=/xmlns:o="urn:schemas-microsoft-com/i;class p{constructor(e){this.document=e}isActive(e){return m.test(e)||g.test(e)}execute(e){const{body:t,stylesString:i}=e._parsedData;(function(e,t){if(!e.childCount)return;const i=new r.yj(e.document),o=function(e,t){const i=t.createRangeIn(e),o=new r.xO({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),n=[];for(const e of i)if("elementStart"===e.type&&o.match(e.item)){const t=d(e.item);n.push({element:e.item,id:t.id,order:t.order,indent:t.indent})}return n}(e,i);if(!o.length)return;let n=null,s=1;o.forEach(((e,a)=>{const d=function(e,t){if(!e)return!0;if(e.id!==t.id)return t.indent-e.indent!=1;const i=t.element.previousSibling;return!i||!((o=i).is("element","ol")||o.is("element","ul"));var o}(o[a-1],e),u=(m=e,(h=d?null:o[a-1])?m.indent-h.indent:m.indent-1);var h,m;if(d&&(n=null,s=1),!n||0!==u){const o=function(e,t){const i=/mso-level-number-format:([^;]{0,100});/gi,o=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,n=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi").exec(t);let r="decimal",s="ol",a=null;if(n&&n[1]){const t=i.exec(n[1]);if(t&&t[1]&&(r=t[1].trim(),s="bullet"!==r&&"image"!==r?"ol":"ul"),"bullet"===r){const t=function(e){const t=function(e){if(e.getChild(0).is("$text"))return null;for(const t of e.getChildren()){if(!t.is("element","span"))continue;const e=t.getChild(0);if(e)return e.is("$text")?e:e.getChild(0)}return null}(e);if(!t)return null;const i=t._data;return"o"===i?"circle":"·"===i?"disc":"§"===i?"square":null}(e.element);t&&(r=t)}else{const e=o.exec(n[1]);e&&e[1]&&(a=parseInt(e[1]))}}return{type:s,startIndex:a,style:l(r)}}(e,t);if(n){if(e.indent>s){const e=n.getChild(n.childCount-1),t=e.getChild(e.childCount-1);n=c(o,t,i),s+=1}else if(e.indente.indexOf(t)>-1))?s.push(i):i.getAttribute("src")||s.push(i)}for(const e of s)i.remove(e)}(o,e,i),function(e,t,i){const o=i.createRangeIn(t),n=[];for(const t of o)if("elementStart"==t.type&&t.item.is("element","v:shape")){const i=t.item.getAttribute("id");if(e.includes(i))continue;r(t.item.parent.getChildren(),i)||n.push(t.item)}for(const e of n){const t={src:s(e)};e.hasAttribute("alt")&&(t.alt=e.getAttribute("alt"));const o=i.createElement("img",t);i.insertChild(e.index+1,o,e.parent)}function r(e,t){for(const i of e)if(i.is("element")){if("img"==i.name&&i.getAttribute("v:shapes")==t)return!0;if(r(i.getChildren(),t))return!0}return!1}function s(e){for(const t of e.getChildren())if(t.is("element")&&t.getAttribute("src"))return t.getAttribute("src")}}(o,e,i),function(e,t){const i=t.createRangeIn(e),o=new r.xO({name:/v:(.+)/}),n=[];for(const e of i)"elementStart"==e.type&&o.match(e.item)&&n.push(e.item);for(const e of n)t.remove(e)}(e,i);const n=function(e,t){const i=t.createRangeIn(e),o=new r.xO({name:"img"}),n=[];for(const e of i)e.item.is("element")&&o.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&n.push(e.item);return n}(e,i);n.length&&function(e,t,i){if(e.length===t.length)for(let n=0;nString.fromCharCode(parseInt(e,16)))).join(""))}`;i.setAttribute("src",r,e[n])}var o}(n,function(e){if(!e)return[];const t=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,i=new RegExp("(?:("+t.source+"))([\\da-fA-F\\s]+)\\}","g"),o=e.match(i),n=[];if(o)for(const e of o){let i=!1;e.includes("\\pngblip")?i="image/png":e.includes("\\jpegblip")&&(i="image/jpeg"),i&&n.push({hex:e.replace(t,"").replace(/[^\da-fA-F]/g,""),type:i})}return n}(t),i)}(t,e.dataTransfer.getData("text/rtf")),e.content=t}}function f(e){return e.replace(/(\s+)<\/span>/g,((e,t)=>1===t.length?" ":Array(t.length+1).join("  ").substr(0,t.length)))}class b extends o.Sy{static get pluginName(){return"PasteFromOffice"}static get requires(){return[n._l]}init(){const e=this.editor,t=e.plugins.get("ClipboardPipeline"),i=e.editing.view.document,o=[];o.push(new p(i)),o.push(new h(i)),t.on("inputTransformation",((t,n)=>{if(n._isTransformedWithPasteFromOffice)return;if(e.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const s=n.dataTransfer.getData("text/html"),a=o.find((e=>e.isActive(s)));a&&(n._parsedData=function(e,t){const i=new DOMParser,o=function(e){return f(f(e)).replace(/([^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/ <\//g," <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)<")}(function(e){const t="",i=e.indexOf(t);if(i<0)return e;const o=e.indexOf("",i+7);return e.substring(0,i+7)+(o>=0?e.substring(o):"")}(e=e.replace(//g,"")}(o.getData("text/html")):o.getData("text/plain")&&(((s=(s=o.getData("text/plain")).replace(//g,">").replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
").replace(/\t/g,"    ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).includes("

")||s.includes("
"))&&(s=`

${s}

`),e=s),r=this.editor.data.htmlProcessor.toView(e)}var s;const a=new n.EventInfo(this,"inputTransformation");this.fire(a,{content:r,dataTransfer:o,targetRanges:t.targetRanges,method:t.method}),a.stop.called&&e.stop(),i.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,i)=>{if(i.content.isEmpty)return;const o=this.editor.data.toModel(i.content,"$clipboardHolder");0!=o.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:o,method:i.method,dataTransfer:i.dataTransfer,targetRanges:i.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,i)=>{i.resultRange=t.insertContent(i.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,i=e.editing.view.document,o=(o,n)=>{const r=n.dataTransfer;n.preventDefault();const s=e.data.toView(e.model.getSelectedContent(t.selection));i.fire("clipboardOutput",{dataTransfer:r,content:s,method:o.name})};this.listenTo(i,"copy",o,{priority:"low"}),this.listenTo(i,"cut",((t,i)=>{e.isReadOnly?i.preventDefault():o(t,i)}),{priority:"low"}),this.listenTo(i,"clipboardOutput",((i,o)=>{o.content.isEmpty||(o.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(o.content)),o.dataTransfer.setData("text/plain",l(o.content))),"cut"==o.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}var d=i(4156),u=i(111),h=i(3379),m=i.n(h),g=i(9037),p=i.n(g),f=i(569),b=i.n(f),w=i(8575),k=i.n(w),_=i(9216),v=i.n(_),y=i(799),C={attributes:{"data-cke":!0}};C.setAttributes=k(),C.insert=b().bind(null,"head"),C.domAPI=p(),C.insertStyleElement=v(),m()(y.Z,C),y.Z&&y.Z.locals&&y.Z.locals;class x extends o.Plugin{static get pluginName(){return"DragDrop"}static get requires(){return[c,d.Widget]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=(0,u.Z)((e=>this._updateDropMarker(e)),40),this._removeDropMarkerDelayed=T((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=T((()=>this._clearDraggableAttributes()),40),t.addObserver(s),t.addObserver(r.MouseObserver),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,i)=>{i?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,i)=>{i||this._finalizeDragging(!1)})),n.env.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,i=t.document,o=e.editing.view,s=o.document;this.listenTo(s,"dragstart",((o,a)=>{const l=i.selection;if(a.target&&a.target.is("editableElement"))return void a.preventDefault();const c=a.target?S(a.target):null;if(c){const i=e.editing.mapper.toModelElement(c);this._draggedRange=r.LiveRange.fromRange(t.createRangeOn(i)),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!s.selection.isCollapsed){const e=s.selection.getSelectedElement();e&&(0,d.isWidget)(e)||(this._draggedRange=r.LiveRange.fromRange(l.getFirstRange()))}if(!this._draggedRange)return void a.preventDefault();this._draggingUid=(0,n.uid)(),a.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",a.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const u=t.createSelection(this._draggedRange.toRange()),h=e.data.toView(t.getSelectedContent(u));s.fire("clipboardOutput",{dataTransfer:a.dataTransfer,content:h,method:"dragstart"}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(s,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(s,"dragenter",(()=>{this.isEnabled&&o.focus()})),this.listenTo(s,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(s,"dragging",((t,i)=>{if(!this.isEnabled)return void(i.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const o=A(e,i.targetRanges,i.target);this._draggedRange||(i.dataTransfer.dropEffect="copy"),n.env.isGecko||("copy"==i.dataTransfer.effectAllowed?i.dataTransfer.dropEffect="copy":["all","copyMove"].includes(i.dataTransfer.effectAllowed)&&(i.dataTransfer.dropEffect="move")),o&&this._updateDropMarkerThrottled(o)}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",((t,i)=>{if("drop"!=i.method)return;const o=A(e,i.targetRanges,i.target);return this._removeDropMarker(),o?(this._draggedRange&&this._draggingUid!=i.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),"move"==E(i.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(o,!0)?(this._finalizeDragging(!1),void t.stop()):void(i.targetRanges=[e.editing.mapper.toViewRange(o)])):(this._finalizeDragging(!1),void t.stop())}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(c);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const i=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(i)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const i="move"==E(t.dataTransfer),o=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(o&&i)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,i=t.document;this.listenTo(i,"mousedown",((o,r)=>{if(n.env.isAndroid||!r)return;this._clearDraggableAttributesDelayed.cancel();let s=S(r.target);if(n.env.isBlink&&!e.isReadOnly&&!s&&!i.selection.isCollapsed){const e=i.selection.getSelectedElement();e&&(0,d.isWidget)(e)||(s=i.selection.editableElement)}s&&(t.change((e=>{e.setAttribute("draggable","true",s)})),this._draggableElement=e.editing.mapper.toModelElement(s))})),this.listenTo(i,"mouseup",(()=>{n.env.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_setupDropMarker(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:i})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return i.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("⁠",e.createElement("span"),"⁠"),t}))}})}_updateDropMarker(e){const t=this.editor,i=t.model.markers;t.model.change((t=>{i.has("drop-target")?i.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const e=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_finalizeDragging(e){const t=this.editor,i=t.model;this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&i.deleteContent(i.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function A(e,t,i){const o=e.model,r=e.editing.mapper;let s=null;const a=t?t[0].start:null;if(i.is("uiElement")&&(i=i.parent),s=function(e,t){const i=e.model,o=e.editing.mapper;if((0,d.isWidget)(t))return i.createRangeOn(o.toModelElement(t));if(!t.is("editableElement")){const e=t.findAncestor((e=>(0,d.isWidget)(e)||e.is("editableElement")));if((0,d.isWidget)(e))return i.createRangeOn(o.toModelElement(e))}return null}(e,i),s)return s;const l=function(e,t){const i=e.editing.mapper,o=e.editing.view,n=i.toModelElement(t);if(n)return n;const r=o.createPositionBefore(t),s=i.findMappedViewAncestor(r);return i.toModelElement(s)}(e,i),c=a?r.toModelPosition(a):null;return c?(s=function(e,t,i){const o=e.model;if(!o.schema.checkChild(i,"$block"))return null;const n=o.createPositionAt(i,0),r=t.path.slice(0,n.path.length),s=o.createPositionFromPath(t.root,r).nodeAfter;return s&&o.schema.isObject(s)?o.createRangeOn(s):null}(e,c,l),s||(s=o.schema.getNearestSelectionRange(c,n.env.isGecko?"forward":"backward"),s||function(e,t){const i=e.model;let o=t;for(;o;){if(i.schema.isObject(o))return i.createRangeOn(o);o=o.parent}return null}(e,c.parent))):function(e,t){const i=e.model,o=i.schema,n=i.createPositionAt(t,0);return o.getNearestSelectionRange(n,"forward")}(e,l)}function E(e){return n.env.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function T(e,t){let i;function o(...n){o.cancel(),i=setTimeout((()=>e(...n)),t)}return o.cancel=()=>{clearTimeout(i)},o}function S(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(d.isWidget);if((0,d.isWidget)(e))return e;const t=e.findAncestor((e=>(0,d.isWidget)(e)||e.is("editableElement")));return(0,d.isWidget)(t)?t:null}class P extends o.Plugin{static get pluginName(){return"PastePlainText"}static get requires(){return[c]}init(){const e=this.editor,t=e.model,i=e.editing.view,o=i.document,n=t.document.selection;let r=!1;i.addObserver(s),this.listenTo(o,"keydown",((e,t)=>{r=t.shiftKey})),e.plugins.get(c).on("contentInsertion",((e,i)=>{(r||function(e,t){if(e.childCount>1)return!1;const i=e.getChild(0);return!t.isObject(i)&&0==Array.from(i.getAttributeKeys()).length}(i.content,t.schema))&&t.change((e=>{const o=Array.from(n.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));n.isCollapsed||t.deleteContent(n,{doNotAutoparagraph:!0}),o.push(...n.getAttributes());const r=e.createRangeIn(i.content);for(const t of r.getItems())t.is("$textProxy")&&e.setAttributes(o,t)}))}))}}class I extends o.Plugin{static get pluginName(){return"Clipboard"}static get requires(){return[c,x,P]}}},6854:(e,t,i)=>{"use strict";i.d(t,{AJ:()=>o.MultiCommand,ML:()=>o.Editor,P$:()=>o.attachToForm,Sy:()=>o.Plugin,W9:()=>o.DataApiMixin,_y:()=>o.Context,icons:()=>o.icons,lR:()=>o.PendingActions,mY:()=>o.Command,xK:()=>o.ElementApiMixin});var o=i(7578)},3291:(e,t,i)=>{"use strict";i.d(t,{$_:()=>o.hidePlaceholder,D5:()=>o.isColor,G9:()=>o.isLength,ID:()=>o.enablePlaceholder,J8:()=>o.addPaddingRules,KU:()=>o.ClickObserver,NJ:()=>o.showPlaceholder,Po:()=>o.TreeWalker,Q7:()=>o.needsPlaceholder,QR:()=>o.addBackgroundRules,Qj:()=>o.Observer,Ux:()=>o.ViewDocument,W_:()=>o.Element,YG:()=>o.getFillerOffset,dM:()=>o.MouseObserver,iE:()=>o.LiveRange,jP:()=>o.LivePosition,pG:()=>o.DomConverter,qD:()=>o.DowncastWriter,qZ:()=>o.DomEventObserver,sI:()=>o.addBorderRules,vt:()=>o.addMarginRules,xO:()=>o.Matcher,yj:()=>o.UpcastWriter,zz:()=>o.isPercentage});var o=i(600)},1863:(e,t,i)=>{"use strict";i.d(t,{C:()=>o.C,G:()=>o.G});var o=i(5725)},5187:(e,t,i)=>{"use strict";i.d(t,{HG:()=>o.HG,II:()=>o.II,Im:()=>o.Im,Mq:()=>o.Mq,Up:()=>o.Up,VD:()=>o.VD,mh:()=>o.mh,uL:()=>o.uL});var o=i(3701)},7095:(e,t,i)=>{"use strict";i.d(t,{$y:()=>o.ToolbarSeparatorView,BM:()=>o.SwitchButtonView,Bv:()=>o.ListView,Dn:()=>o.LabelView,FH:()=>o.createLabeledDropdown,G7:()=>o.View,GI:()=>o.submitHandler,Gp:()=>o.FormHeaderView,Hn:()=>o.Model,I0:()=>o.FocusCycler,IJ:()=>o.addKeyboardHandlingForGrid,J0:()=>o.DropdownButtonView,J6:()=>o.ColorGridView,KP:()=>o.LabeledFieldView,Mh:()=>o.focusChildOnDropdownOpen,P_:()=>o.Notification,Pm:()=>o.addListToDropdown,R:()=>o.createLabeledInputText,RX:()=>o.CssTransitionDisablerMixin,Rm:()=>o.SplitButtonView,S1:()=>o.normalizeColorOptions,S8:()=>o.EditorUI,WB:()=>o.ContextualBalloon,YS:()=>o.Template,_9:()=>o.ColorTileView,dn:()=>o.ListItemView,eC:()=>o.clickOutsideHandler,iw:()=>o.normalizeToolbarConfig,jB:()=>o.ToolbarView,k6:()=>o.getLocalizedColorOptions,lp:()=>o.StickyPanelView,no:()=>o.BalloonPanelView,pq:()=>o.InputTextView,py:()=>o.BoxedEditorUIView,r1:()=>o.InlineEditableUIView,r5:()=>o.ButtonView,sh:()=>o.createLabeledInputNumber,t9:()=>o.createDropdown,up:()=>o.addToolbarToDropdown,vX:()=>o.ViewCollection});var o=i(3905)},1903:(e,t,i)=>{"use strict";i.d(t,{WP:()=>o.Undo});var o=i(8779)},6553:(e,t,i)=>{"use strict";i.d(t,{Bb:()=>o.CKEditorError,CO:()=>o.global,Cq:()=>o.getCode,Do:()=>o.keyCodes,FE:()=>o.Collection,KE:()=>o.logWarning,OB:()=>o.env,Ps:()=>o.first,Re:()=>o.ObservableMixin,Rh:()=>o.FocusTracker,UL:()=>o.Rect,VD:()=>o.KeystrokeHandler,Xu:()=>o.DomEmitterMixin,Zz:()=>o.parseKeystroke,a6:()=>o.ElementReplacer,az:()=>o.createElement,hQ:()=>o.uid,mA:()=>o.getLocalizedArrowKeyCodeDirection,qL:()=>o.toMap,qo:()=>o.toArray,tA:()=>o.priorities,yy:()=>o.getDataFromElement});var o=i(7732)},5549:(e,t,i)=>{"use strict";i.d(t,{$L:()=>o.Widget,KT:()=>o.findOptimalInsertionRange,Qd:()=>o.isWidget,WR:()=>o.WidgetResize,XC:()=>o.toWidget,e8:()=>o.WidgetToolbarRepository,sC:()=>o.toWidgetEditable});var o=i(4156)},5363:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}",""]);const a=s},3789:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}",""]);const a=s},799:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}',""]);const a=s},3229:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content pre{background:hsla(0,0%,78%,.3);border:1px solid #c4c4c4;border-radius:2px;color:#353535;direction:ltr;font-style:normal;min-width:200px;padding:1em;tab-size:4;text-align:left;white-space:pre-wrap}.ck-content pre code{background:unset;border-radius:0;padding:0}.ck.ck-editor__editable pre{position:relative}.ck.ck-editor__editable pre[data-language]:after{content:attr(data-language);position:absolute}:root{--ck-color-code-block-label-background:#757575}.ck.ck-editor__editable pre[data-language]:after{background:var(--ck-color-code-block-label-background);color:#fff;font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);right:10px;top:-1px;white-space:nowrap}.ck.ck-code-block-dropdown .ck-dropdown__panel{max-height:250px;overflow-x:hidden;overflow-y:auto}",""]);const a=s},3624:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}",""]);const a=s},7372:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}",""]);const a=s},5037:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}",""]);const a=s},8915:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-button.ck-color-table__remove-color{align-items:center;display:flex;width:100%}label.ck.ck-color-grid__label{font-weight:unset}.ck .ck-button.ck-color-table__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}",""]);const a=s},5991:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content .text-tiny{font-size:.7em}.ck-content .text-small{font-size:.85em}.ck-content .text-big{font-size:1.4em}.ck-content .text-huge{font-size:1.8em}",""]);const a=s},4249:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}",""]);const a=s},7263:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-highlight-marker-yellow:#fdfd77;--ck-highlight-marker-green:#62f962;--ck-highlight-marker-pink:#fc7899;--ck-highlight-marker-blue:#72ccfd;--ck-highlight-pen-red:#e71313;--ck-highlight-pen-green:#128a00}.ck-content .marker-yellow{background-color:var(--ck-highlight-marker-yellow)}.ck-content .marker-green{background-color:var(--ck-highlight-marker-green)}.ck-content .marker-pink{background-color:var(--ck-highlight-marker-pink)}.ck-content .marker-blue{background-color:var(--ck-highlight-marker-blue)}.ck-content .pen-red{background-color:transparent;color:var(--ck-highlight-pen-red)}.ck-content .pen-green{background-color:transparent;color:var(--ck-highlight-pen-green)}",""]);const a=s},9893:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-editor__editable .ck-horizontal-line{display:flow-root}.ck-content hr{background:#dedede;border:0;height:4px;margin:15px 0}",""]);const a=s},7319:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-widget.raw-html-embed{display:flow-root;font-style:normal;margin:.9em auto;min-width:15em;position:relative}.ck-widget.raw-html-embed:before{position:absolute;z-index:1}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{display:flex;flex-direction:column;position:absolute}.ck-widget.raw-html-embed .raw-html-embed__preview{display:flex;overflow:hidden;position:relative}.ck-widget.raw-html-embed .raw-html-embed__preview-content{border-collapse:separate;border-spacing:7px;display:table;margin:auto;position:relative;width:100%}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}:root{--ck-html-embed-content-width:calc(100% - var(--ck-icon-size)*1.5);--ck-html-embed-source-height:10em;--ck-html-embed-unfocused-outline-width:1px;--ck-html-embed-content-min-height:calc(var(--ck-icon-size) + var(--ck-spacing-standard));--ck-html-embed-source-disabled-background:var(--ck-color-base-foreground);--ck-html-embed-source-disabled-color:#737373}.ck-widget.raw-html-embed{background-color:var(--ck-color-base-foreground);font-size:var(--ck-font-size-base)}.ck-widget.raw-html-embed:not(.ck-widget_selected):not(:hover){outline:var(--ck-html-embed-unfocused-outline-width) dashed var(--ck-color-widget-blurred-border)}.ck-widget.raw-html-embed[dir=ltr]{text-align:left}.ck-widget.raw-html-embed[dir=rtl]{text-align:right}.ck-widget.raw-html-embed:before{background:#999;border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius);color:var(--ck-color-base-background);content:attr(data-html-embed-label);font-family:var(--ck-font-face);font-size:var(--ck-font-size-tiny);left:var(--ck-spacing-standard);padding:calc(var(--ck-spacing-tiny) + var(--ck-html-embed-unfocused-outline-width)) var(--ck-spacing-small) var(--ck-spacing-tiny);top:calc(var(--ck-html-embed-unfocused-outline-width)*-1);transition:background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck-widget.raw-html-embed[dir=rtl]:before{left:auto;right:var(--ck-spacing-standard)}.ck-widget.raw-html-embed[dir=ltr] .ck-widget__type-around .ck-widget__type-around__button.ck-widget__type-around__button_before{margin-left:50px}.ck.ck-editor__editable.ck-blurred .ck-widget.raw-html-embed.ck-widget_selected:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable:not(.ck-blurred) .ck-widget.raw-html-embed.ck-widget_selected:before{background:var(--ck-color-focus-border);padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck.ck-editor__editable .ck-widget.raw-html-embed:not(.ck-widget_selected):hover:before{padding:var(--ck-spacing-tiny) var(--ck-spacing-small);top:0}.ck-widget.raw-html-embed .raw-html-embed__content-wrapper{padding:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper{right:var(--ck-spacing-standard);top:var(--ck-spacing-standard)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__save-button{color:var(--ck-color-button-save)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button.raw-html-embed__cancel-button{color:var(--ck-color-button-cancel)}.ck-widget.raw-html-embed .raw-html-embed__buttons-wrapper .ck-button:not(:first-child){margin-top:var(--ck-spacing-small)}.ck-widget.raw-html-embed[dir=rtl] .raw-html-embed__buttons-wrapper{left:var(--ck-spacing-standard);right:auto}.ck-widget.raw-html-embed .raw-html-embed__source{box-sizing:border-box;direction:ltr;font-family:monospace;font-size:var(--ck-font-size-base);height:var(--ck-html-embed-source-height);min-width:0;padding:var(--ck-spacing-standard);resize:none;tab-size:4;text-align:left;white-space:pre-wrap;width:var(--ck-html-embed-content-width)}.ck-widget.raw-html-embed .raw-html-embed__source[disabled]{-webkit-text-fill-color:var(--ck-html-embed-source-disabled-color);background:var(--ck-html-embed-source-disabled-background);color:var(--ck-html-embed-source-disabled-color);opacity:1}.ck-widget.raw-html-embed .raw-html-embed__preview{min-height:var(--ck-html-embed-content-min-height);width:var(--ck-html-embed-content-width)}.ck-editor__editable:not(.ck-read-only) .ck-widget.raw-html-embed .raw-html-embed__preview{pointer-events:none}.ck-widget.raw-html-embed .raw-html-embed__preview-content{background-color:var(--ck-color-base-foreground);box-sizing:border-box}.ck-widget.raw-html-embed .raw-html-embed__preview-content>*{margin-left:auto;margin-right:auto}.ck-widget.raw-html-embed .raw-html-embed__preview-placeholder{color:var(--ck-html-embed-source-disabled-color)}",""]);const a=s},2430:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{align-items:flex-start;display:inline-flex;max-width:100%}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}.ck.ck-editor__editable .image-inline.ck-widget_selected,.ck.ck-editor__editable .image.ck-widget_selected{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}",""]);const a=s},2423:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highligted-background:#fd0}.ck-content .image>figcaption{background-color:var(--ck-color-image-caption-background);caption-side:bottom;color:var(--ck-color-image-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;word-break:break-word}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highligted-background)}to{background-color:var(--ck-color-image-caption-background)}}",""]);const a=s},8879:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-image-insert__panel{padding:var(--ck-spacing-large)}.ck.ck-image-insert__ck-finder-button{border:1px solid #ccc;border-radius:var(--ck-border-radius);display:block;margin:var(--ck-spacing-standard) auto;width:100%}.ck.ck-splitbutton>.ck-file-dialog-button.ck-button{border:none;margin:0;padding:0}",""]);const a=s},8340:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-image-insert-form:focus{outline:none}.ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-image-insert-form__action-row{margin-top:var(--ck-spacing-standard)}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const a=s},2400:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content .image.image_resized{box-sizing:border-box;display:block;max-width:100%}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}",""]);const a=s},3534:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-block-align-right{margin-left:auto;margin-right:0}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-bottom:var(--ck-inline-image-style-spacing);margin-top:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}",""]);const a=s},1547:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck-image-upload-complete-icon{border-radius:50%;display:block;position:absolute;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);z-index:1}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{animation-delay:0ms,3s;animation-duration:.5s,.5s;animation-fill-mode:forwards,forwards;animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;background:var(--ck-color-image-upload-icon-background);font-size:calc(1px*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));opacity:0;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.ck-image-upload-complete-icon:after{animation-delay:.5s;animation-duration:.5s;animation-fill-mode:forwards;animation-name:ck-upload-complete-icon-check;border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);box-sizing:border-box;height:0;left:25%;opacity:0;top:50%;transform:scaleX(-1) rotate(135deg);transform-origin:left top;width:0}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{height:0;opacity:1;width:0}33%{height:0;width:.3em}to{height:.45em;opacity:1;width:.3em}}',""]);const a=s},6618:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck .ck-upload-placeholder-loader{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px;--ck-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{margin:0;width:100%}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.ck .ck-upload-placeholder-loader{height:100%;width:100%}.ck .ck-upload-placeholder-loader:before{animation:ck-upload-placeholder-loader 1s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:3px solid var(--ck-color-upload-placeholder-loader);height:var(--ck-upload-placeholder-loader-size);width:var(--ck-upload-placeholder-loader-size)}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}',""]);const a=s},2926:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{left:0;position:absolute;top:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{background:var(--ck-color-upload-bar-background);height:2px;transition:width .1s;width:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}",""]);const a=s},5269:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}",""]);const a=s},3925:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}",""]);const a=s},7536:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}",""]);const a=s},4874:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical>.ck-button{border-radius:0;margin:0;padding:var(--ck-spacing-standard);width:50%}.ck.ck-link-form_layout-vertical>.ck-button:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form_layout-vertical>.ck-button,[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}",""]);const a=s},4330:(e,t,i)=>{"use strict";i.d(t,{Z:()=>h});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r),a=i(1667),l=i.n(a),c=new URL(i(8491),i.b),d=s()(n()),u=l()(c);d.push([e.id,`.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{display:block;position:absolute}:root{--ck-link-image-indicator-icon-size:20;--ck-link-image-indicator-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{background-color:rgba(0,0,0,.4);background-image:url(${u});background-position:50%;background-repeat:no-repeat;background-size:14px;border-radius:100%;content:"";height:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size));overflow:hidden;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);width:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size))}`,""]);const h=d},5782:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;color:inherit;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:0 var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}",""]);const a=s},3190:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}",""]);const a=s},4784:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:disc}.ck-content ul ul{list-style-type:circle}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}",""]);const a=s},9938:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}",""]);const a=s},2591:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}",""]);const a=s},9292:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out;width:100%}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable .todo-list .todo-list__label>input{cursor:pointer}.ck-editor__editable .todo-list .todo-list__label>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}',""]);const a=s},8544:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-mention-background:rgba(153,0,48,.1);--ck-color-mention-text:#990030}.ck-content .mention{background:var(--ck-color-mention-background);color:var(--ck-color-mention-text)}",""]);const a=s},9139:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-mention-list-max-height:300px}.ck.ck-mentions{max-height:var(--ck-mention-list-max-height);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.ck.ck-mentions>.ck-list__item{flex-shrink:0;overflow:hidden}",""]);const a=s},9953:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-input-text:focus{z-index:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}",""]);const a=s},7502:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}",""]);const a=s},6908:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const a=s},468:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label,.ck[dir=rtl] .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}",""]);const a=s},2510:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}",""]);const a=s},1111:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-table-caption-background:#f7f7f7;--ck-color-table-caption-text:#333;--ck-color-table-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-table-caption-background);caption-side:top;color:var(--ck-color-table-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-table-caption-highlighted-background)}to{background-color:var(--ck-color-table-caption-background)}}",""]);const a=s},3964:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}",""]);const a=s},7176:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-table-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table .ck-table-resized{table-layout:fixed}.ck-content .table table{overflow:hidden}.ck-content .table td,.ck-content .table th{position:relative}.ck.ck-editor__editable .table .ck-table-column-resizer{bottom:-999999px;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:-999999px;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer,.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer{display:none}.ck.ck-editor__editable .table .ck-table-column-resizer:hover,.ck.ck-editor__editable .table .ck-table-column-resizer__active{background-color:var(--ck-color-table-column-resizer-hover);opacity:.25}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}",""]);const a=s},8361:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-table-focused-cell-background:rgba(158,201,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}",""]);const a=s},9429:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',""]);const a=s},6596:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}",""]);const a=s},1546:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',""]);const a=s},4971:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}",""]);const a=s},7258:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}",""]);const a=s},4923:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}",""]);const a=s},5062:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}",""]);const a=s},1883:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}",""]);const a=s},4791:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton>.ck-splitbutton__arrow:not(:focus){border-bottom-width:0;border-top-width:0}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:focus:after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:focus:after{--ck-color-split-button-hover-border:var(--ck-color-focus-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',""]);const a=s},2704:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}",""]);const a=s},9847:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}",""]);const a=s},1874:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form__header .ck-form__header__label{font-weight:700}",""]);const a=s},1977:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}",""]);const a=s},2470:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}",""]);const a=s},3525:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}",""]);const a=s},2933:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}",""]);const a=s},179:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}",""]);const a=s},4460:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',""]);const a=s},7592:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}",""]);const a=s},6356:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}",""]);const a=s},3707:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}",""]);const a=s},6603:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',""]);const a=s},4176:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}",""]);const a=s},4768:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}",""]);const a=s},3888:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}",""]);const a=s},5167:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}",""]);const a=s},7153:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}",""]);const a=s},4875:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}",""]);const a=s},2347:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',""]);const a=s},7558:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-content blockquote{font-style:normal;padding-left:10px}.ck.ck-content blockquote>:first-child{margin-top:10px}.ck.ck-content blockquote>:last-child{margin-bottom:15px}.ck.ck-content blockquote:before{content:attr(data-source);display:block;margin:15px 0 10px}",""]);const a=s},3855:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-woltlabblockquote-insert-form:focus{outline:none}.ck.ck-woltlabblockquote-insert-form{display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:space-between;padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-large)}.ck.ck-woltlabblockquote-insert-form>:not(.ck-label){flex-grow:1}.ck.ck-woltlabblockquote-insert-form__action-row{padding:0}.ck.ck-woltlabblockquote-insert-form__action-row .ck-button-cancel,.ck.ck-woltlabblockquote-insert-form__action-row .ck-button-save{justify-content:center}.ck.ck-woltlabblockquote-insert-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const a=s},1857:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck.ck-woltlabcodeblock-insert-form:focus{outline:none}.ck.ck-woltlabcodeblock-insert-form{display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:space-between;padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-large)}.ck.ck-woltlabcodeblock-insert-form>:not(.ck-label){flex-grow:1}.ck.ck-woltlabcodeblock-insert-form__action-row{padding:0}.ck.ck-woltlabcodeblock-insert-form__action-row .ck-button-cancel,.ck.ck-woltlabcodeblock-insert-form__action-row .ck-button-save{justify-content:center}.ck.ck-woltlabcodeblock-insert-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const a=s},1491:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,".ck .ck-widget.smiley{pointer-events:none}",""]);const a=s},5151:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(8081),n=i.n(o),r=i(3645),s=i.n(r)()(n());s.push([e.id,'.ck.ck-content .ck-woltlabspoiler{margin-top:var(--ck-spacing-large);padding:5px 5px 5px 15px;position:relative}.ck.ck-content .ck-woltlabspoiler:after{border:5px solid #ccc;border-right-width:0;bottom:1px;content:"";left:1px;position:absolute;top:1px;width:5px}.ck.ck-content .ck-woltlabspoiler__title{column-gap:10px;display:flex}.ck.ck-content .ck-woltlabspoiler__title:before{align-self:center;color:#999;content:attr(data-label)}',""]);const a=s},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,o,n,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}},1667:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},8217:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=''},2151:(e,t,i)=>{"use strict";var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(6603),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals},1627:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(7558),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g);const p=m.Z&&m.Z.locals?m.Z.locals:void 0},1158:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(3855),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g);const p=m.Z&&m.Z.locals?m.Z.locals:void 0},8375:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(1857),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g);const p=m.Z&&m.Z.locals?m.Z.locals:void 0},2997:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(1491),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g);const p=m.Z&&m.Z.locals?m.Z.locals:void 0},5025:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var o=i(3379),n=i.n(o),r=i(9037),s=i.n(r),a=i(569),l=i.n(a),c=i(8575),d=i.n(c),u=i(9216),h=i.n(u),m=i(5151),g={attributes:{"data-cke":!0}};g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=h(),n()(m.Z,g);const p=m.Z&&m.Z.locals?m.Z.locals:void 0},3379:e=>{"use strict";var t=[];function i(e){for(var i=-1,o=0;o{"use strict";var t={};e.exports=function(e,i){var o=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},8575:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(i){e.setAttribute(i,t[i])}))}},9037:e=>{"use strict";var t,i=(t=[],function(e,i){return t[e]=i,t.filter(Boolean).join("\n")});function o(e,t,o,n){var r;if(o)r="";else{r="",n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,s&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}")}if(e.styleSheet)e.styleSheet.cssText=i(t,r);else{var a=document.createTextNode(r),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(a,l[t]):e.appendChild(a)}}var n={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=n.singletonCounter++,i=n.singleton||(n.singleton=e.insertStyleElement(e));return{update:function(e){o(i,t,!1,e)},remove:function(e){o(i,t,!0,e)}}}},366:(e,t,i)=>{var o,n;o=[i,t,i(511),i(6549),i(1214),i(4210),i(9998),i(7578),i(1184),i(1638),i(1281),i(4507),i(128),i(4195),i(8428),i(9211),i(3531),i(9920),i(1640),i(9829),i(4690),i(189),i(9501),i(8497),i(8779),i(766),i(9910),i(2823),i(8029),i(3706),i(5600),i(8206),i(5825),i(9782),i(4201),i(7080),i(8427),i(5469),i(9402),i(8152)],n=function(e,t,i,o,n,r,s,a,l,c,d,u,h,m,g,p,f,b,w,k,_,v,y,C,x,A,E,T,S,P,I,V,R,O,B,M,z,N,D,L){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=void 0;const F={plugins:[o.Autosave,c.Essentials,f.Indent,k.Mention,_.Paragraph,v.PasteFromOffice,x.Undo,i.Alignment,n.Bold,n.Code,d.FontColor,d.FontFamily,d.FontSize,u.Heading,h.Highlight,n.Italic,y.RemoveFormat,n.Strikethrough,n.Subscript,n.Superscript,n.Underline,r.BlockQuote,s.CodeBlock,m.HtmlEmbed,g.HorizontalLine,p.Image,p.ImageInsertUI,p.ImageToolbar,p.ImageStyle,p.ImageUpload,p.ImageUploadUI,b.Link,b.LinkImage,w.List,C.Table,C.TableToolbar,A.WoltlabAttachment,E.WoltlabAutosave,S.WoltlabBlockQuote,T.WoltlabBbcode,P.WoltlabCode,I.WoltlabCodeBlock,V.WoltlabImage,R.WoltlabMagicParagraph,O.WoltlabMedia,B.WoltlabMention,M.WoltlabMetacode,z.WoltlabSmiley,N.WoltlabSpoiler,D.WoltlabToolbarGroup,L.WoltlabUpload]};t.create=async function(e,t){const i=(t=Object.assign(t,F)).removePlugins||[];i.includes("Image")||(t.image={insert:{integrations:["insertImageViaUrl"],type:"inline"},toolbar:["imageStyle:inline","imageStyle:sideLeft","imageStyle:block","imageStyle:side"],styles:{options:["inline",{name:"sideLeft",title:"Left aligned image",icon:a.icons.objectLeft,modelElements:["imageBlock"],className:"image-style-side-left"},"block","side"]}},i.includes("Link")||t.image.toolbar.push("|","linkImage")),i.includes("Table")||(t.table={contentToolbar:["tableColumn","tableRow","mergeTableCells"]});const o=await l.ClassicEditor.create(e,t),n=o.plugins.get(b.AutoLink);return n?.forceDisabled("app.ts"),o}}.apply(t,o),void 0===n||(e.exports=n)},766:(e,t,i)=>{var o,n;o=[i,t,i(4815)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabAttachment=void 0,Object.defineProperty(t,"WoltlabAttachment",{enumerable:!0,get:function(){return i.WoltlabAttachment}})}.apply(t,o),void 0===n||(e.exports=n)},4815:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(9211)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabAttachment=void 0;class n extends i.Plugin{static get pluginName(){return"WoltlabAttachment"}static get requires(){return[o.Image]}init(){const{conversion:e,model:t,plugins:i}=this.editor,{schema:o}=t,n=["imageBlock","imageInline"];n.forEach((e=>{o.extend(e,{allowAttributes:["attachmentId"]})}));const r=new Map([["attachmentId","data-attachment-id"]]);Array.from(r.entries()).forEach((([t,i])=>{e.for("upcast").attributeToAttribute({view:i,model:t}),e.for("downcast").add((e=>{n.forEach((o=>{e.on(`attribute:${t}:${o}`,((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer;let r=o.mapper.toViewElement(t.item);r.is("element","figure")&&(r=r.getChild(0)),r.is("element","img")&&(null!==t.attributeNewValue?(n.setAttribute(i,t.attributeNewValue,r),n.addClass("woltlabAttachment",r)):n.removeAttribute(i,r))}))}))}))})),i.get("ImageUploadEditing").on("uploadComplete",((e,{data:i,imageElement:o})=>{t.change((e=>{e.setAttribute("attachmentId",i["data-attachment-id"],o)}))})),this.#e()}#e(){const e=this.editor.config.get("woltlabAttachment");this.editor.plugins.get("WoltlabMetacode").on("upcast",((t,i)=>{if("attach"!==i.name)return;const o=parseInt(i.attributes[0].toString());if(Number.isNaN(o))return;if(!e.inlineImageIds.includes(o))return;let n=i.attributes[1]?i.attributes[1].toString():"none";"left"!==n&&"right"!==n&&"none"!==n&&(n="none");let r=i.attributes[2];"boolean"!=typeof r&&("string"==typeof r?"true"===r?r=!0:"false"===r?r=!1:(r=parseInt(r),r=!Number.isNaN(r)&&0!==r):r=!1);let s=i.attributes[3];void 0!==s&&/^(100%|\d{2}(\.\d{2})%)$/.test(s.toString())||(s="100%"),s="auto",this.#t(i,e.resolveAttachmentUrl,o,n,r,s)&&t.stop()}))}#t(e,t,i,o,n,r){const{conversionApi:s,data:a}=e,{consumable:l,writer:c}=s,{viewItem:d}=a;let u="imageInline",h={attachmentId:i,src:t(i,n),width:r};"left"===o?(u="imageBlock",h.imageStyle="sideLeft"):"right"===o&&(u="imageBlock",h.imageStyle="side");const m=c.createElement(u);return c.setAttributes(h,m),s.convertChildren(d,m),!!s.safeInsert(m,a.modelCursor)&&(l.consume(d,{name:!0}),s.updateConversionResult(m,a),!0)}}t.WoltlabAttachment=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},9910:(e,t,i)=>{var o,n;o=[i,t,i(6076)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabAutosave=void 0,Object.defineProperty(t,"WoltlabAutosave",{enumerable:!0,get:function(){return i.WoltlabAutosave}})}.apply(t,o),void 0===n||(e.exports=n)},6076:(e,t,i)=>{var o,n;o=[i,t,i(6549),i(7578)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabAutosave=void 0;class n extends o.Plugin{static get pluginName(){return"WoltlabAutosave"}static get requires(){return[i.Autosave]}init(){const e=this.editor.plugins.get("PendingActions");e.hasAny=!1,e.on("set:hasAny",(e=>{e.return=!1,e.stop()}),{priority:"highest"})}}t.WoltlabAutosave=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},2823:(e,t,i)=>{var o,n;o=[i,t,i(9800),i(7489)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBbcodeCommand=t.WoltlabBbcode=void 0,Object.defineProperty(t,"WoltlabBbcode",{enumerable:!0,get:function(){return i.WoltlabBbcode}}),Object.defineProperty(t,"WoltlabBbcodeCommand",{enumerable:!0,get:function(){return o.WoltlabBbcodeCommand}})}.apply(t,o),void 0===n||(e.exports=n)},9800:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(3905),i(7489)],n=function(e,t,i,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBbcode=void 0;class r extends i.Plugin{static get pluginName(){return"WoltlabBbcode"}init(){const{componentFactory:e}=this.editor.ui,t=this.editor.config.get("woltlabBbcode");if(!t)return;const i=new n.default(this.editor);this.editor.commands.add("insertBbcode",i);for(const o of t)this.#i(o,e,i)}#i(e,t,i){const{icon:n,name:r,label:s}=e;t.add(`woltlabBbcode_${r}`,(()=>{const e=new o.ButtonView;if(e.label=s,e.tooltip=!0,e.withText=!0,n)if(n.includes(";")){const[t,i]=n.split(";",2);let o={name:t};"true"===i&&(o.solid="true"),e.labelView.setTemplate({tag:"fa-icon",attributes:o})}else e.labelView.setTemplate({tag:"img",attributes:{src:n}});return e.bind("isEnabled").to(i,"isEnabled"),this.listenTo(e,"execute",(()=>{this.editor.execute("insertBbcode",r)})),e}))}}t.WoltlabBbcode=r,t.default=r}.apply(t,o),void 0===n||(e.exports=n)},7489:(e,t,i)=>{var o,n;o=[i,t,i(7578)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBbcodeCommand=void 0;class o extends i.Command{execute(e){const{model:t}=this.editor,i=this.editor.sourceElement,o=new CustomEvent("ckeditor5:bbcode",{cancelable:!0,detail:{bbcode:e}});i.dispatchEvent(o),o.defaultPrevented||t.change((i=>{const o=i.createText(`[${e}][/${e}]`);t.insertContent(o),this.editor.editing.view.focus()}))}refresh(){this.isEnabled=this.#o()}#o(){const{document:e,schema:t}=this.editor.model,{selection:i}=e;return!!i.isCollapsed&&t.checkAttributeInSelection(i,"bold")}}t.WoltlabBbcodeCommand=o,t.default=o}.apply(t,o),void 0===n||(e.exports=n)},8029:(e,t,i)=>{var o,n;o=[i,t,i(4587)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBlockQuote=void 0,Object.defineProperty(t,"WoltlabBlockQuote",{enumerable:!0,get:function(){return i.WoltlabBlockQuote}})}.apply(t,o),void 0===n||(e.exports=n)},6812:(e,t,i)=>{var o,n;o=[i,t,i(3905),i(1158)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBlockQuoteFormRowView=void 0;class o extends i.View{children;constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("class",t.class||""),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",i.to("class")]},children:this.children})}}t.WoltlabBlockQuoteFormRowView=o,t.default=o}.apply(t,o),void 0===n||(e.exports=n)},8668:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(3905),i(7732),i(6812)],n=function(e,t,i,o,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBlockQuotePanelView=void 0;class s extends o.View{#n;#r;#s;#a;focusTracker;keystrokes;#l;#c;constructor(e){const{locale:t}=e;super(t),this.set("author",""),this.set("link",""),this.focusTracker=new n.FocusTracker,this.keystrokes=new n.KeystrokeHandler,this.#l=new o.ViewCollection,this.#c=this.#d();const i=this.#u(t);this.#s=i.fieldView;const r=this.#h(t);this.#a=r.fieldView,this.#n=this.#m(t),this.#r=this.#g(t),this.#p(t,i,r)}render(){super.render(),(0,o.submitHandler)({view:this});const e=[this.#s,this.#a,this.#n,this.#r];e.forEach((e=>{this.#l.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e=>e.stopPropagation())),this.keystrokes.set("arrowleft",(e=>e.stopPropagation())),this.keystrokes.set("arrowup",(e=>e.stopPropagation())),this.keystrokes.set("arrowdown",(e=>e.stopPropagation())),this.listenTo(e[0].element,"selectstart",((e,t)=>{t.stopPropagation()}),{priority:"high"}),this.on("submit",(()=>{this.fire("execute")}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.#c.focusFirst()}#u(e){const t=e.t,i=new o.LabeledFieldView(e,o.createLabeledInputText);return i.label=t("Author"),i.fieldView.bind("value").to(this,"author",(e=>e||"")),i.fieldView.on("input",(()=>{this.author=i.fieldView.element.value})),i}#h(e){const t=e.t,i=new o.LabeledFieldView(e,o.createLabeledInputText);return i.label=t("Link"),i.fieldView.bind("value").to(this,"link",(e=>e||"")),i.fieldView.on("input",(()=>{this.link=i.fieldView.element.value})),i}#m(e){const t=e.t,n=new o.ButtonView(e);return n.set({label:t("Insert"),icon:i.icons.check,class:"ck-button-save",type:"submit",withText:!0,isEnabled:!0}),n}#g(e){const t=e.t,n=new o.ButtonView(e);return n.set({label:t("Cancel"),icon:i.icons.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),n}#p(e,t,i){this.setTemplate({tag:"form",attributes:{class:["ck","ck-vertical-form","ck-woltlabblockquote-insert-form"],tabindex:"-1"},children:[t,i,new r.default(e,{children:[this.#n,this.#r],class:"ck-woltlabblockquote-insert-form__action-row"})]})}#d(){return new o.FocusCycler({focusables:this.#l,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}})}}t.WoltlabBlockQuotePanelView=s,t.default=s}.apply(t,o),void 0===n||(e.exports=n)},4587:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(3905),i(7732),i(8668),i(1627)],n=function(e,t,i,o,n,r){"use strict";function s(e){switch(typeof e){case"string":return e;case"number":case"boolean":return e.toString();default:return""}}Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabBlockQuote=void 0;class a extends i.Plugin{#f=void 0;static get pluginName(){return"WoltlabBlockQuote"}init(){const e=this.editor;e.model.schema.extend("blockQuote",{allowAttributes:["author","link"]});const t=e.commands.get("blockQuote");this.#b(t),this.#w(),this.#k(),this.#_(),this.listenTo(t,"execute",(()=>{this.#v(this.#f)}),{priority:"high"})}#b(e){const t=this.editor,n=t.t;this.editor.ui.componentFactory.add("blockQuote",(a=>{const l=(0,o.createDropdown)(a,o.SplitButtonView),c=l.buttonView;c.set({label:n("Block quote"),tooltip:!0,icon:i.icons.quote,isToggleable:!0}),c.bind("isOn").to(e,"value",(e=>!!e)),c.on("execute",(()=>{t.execute("blockQuote"),t.editing.view.focus()})),l.on("submit",(e=>{const i=e.path.find((e=>e instanceof r.WoltlabBlockQuotePanelView));i instanceof r.WoltlabBlockQuotePanelView&&(this.#f=i,t.execute("blockQuote",{forceValue:!0}),this.#f=void 0,t.editing.view.focus(),l.isOpen=!1)})),l.on("cancel",(()=>{t.editing.view.focus(),l.isOpen=!1})),l.bind("isEnabled").to(e);const d=new r.WoltlabBlockQuotePanelView(t);return l.on("change:isOpen",(()=>{if(l.isOpen){const e=this.#y();e?(d.author=s(e.getAttribute("author")),d.link=s(e.getAttribute("link"))):(d.author="",d.link="")}})),l.panelView.children.add(d),d.delegate("submit","cancel").to(l),l}))}#w(){this.editor.data.upcastDispatcher.on("element:woltlab-quote",((e,t,i)=>{const{viewItem:o}=t,{consumable:n,writer:r}=i,s=r.createElement("blockQuote");r.setAttributes({author:o.getAttribute("data-author")||"",link:o.getAttribute("data-link")||""},s),i.convertChildren(o,s),i.safeInsert(s,t.modelCursor)&&(n.consume(o,{name:!0}),i.updateConversionResult(s,t))}),{priority:"high"})}#_(){this.editor.editing.downcastDispatcher.on("insert:blockQuote",((e,t,i)=>{const{writer:o,mapper:n,consumable:r}=i;if(!r.consume(t.item,"insert"))return;const a=s(t.item.getAttribute("author")),l=s(t.item.getAttribute("link")),c=this.getSource(a,l),d={};""!==c&&(d["data-source"]=c);const u=o.createContainerElement("blockquote",d),h=n.toViewPosition(this.editor.model.createPositionBefore(t.item));o.insert(h,u),n.bindElements(t.item,u)}),{priority:"high"}),this.editor.editing.downcastDispatcher.on("attribute:author:blockQuote",((e,t,i)=>{const{writer:o,mapper:n}=i,r=s(t.attributeNewValue),a=s(t.item.getAttribute("link")),l=this.getSource(r,a),c=n.toViewElement(t.item);""===l?o.removeAttribute("data-source",c):o.setAttribute("data-source",l,c)})),this.editor.editing.downcastDispatcher.on("attribute:link:blockQuote",((e,t,i)=>{const{writer:o,mapper:n}=i,r=s(t.item.getAttribute("author")),a=s(t.attributeNewValue),l=this.getSource(r,a),c=n.toViewElement(t.item);""===l?o.removeAttribute("data-source",c):o.setAttribute("data-source",l,c)}))}#k(){this.editor.data.downcastDispatcher.on("insert:blockQuote",((e,t,i)=>{const{writer:o,mapper:n,consumable:r}=i;if(!r.consume(t.item,"insert"))return;const a=s(t.item.getAttribute("author")),l=s(t.item.getAttribute("link")),c=n.toViewPosition(this.editor.model.createPositionBefore(t.item)),d=o.createContainerElement("woltlab-quote",{"data-author":a,"data-link":l});o.insert(c,d),n.bindElements(t.item,d)}),{priority:"high"})}#v(e){const t=this.#y();t&&void 0!==e&&this.editor.model.change((i=>{i.setAttribute("author",e.author,t),i.setAttribute("link",e.link,t)}))}#y(){const e=this.editor.model.document.selection,t=(0,n.first)(e.getSelectedBlocks());return this.#C(t)}#C(e){return e.is("element","blockQuote")?e:e.parent&&!e.parent.is("element","$root")?this.#C(e.parent):null}getSource(e,t){const{t:i}=this.editor;return e?i("Quote from %0",e):i("Quote")}}t.WoltlabBlockQuote=a,t.default=a}.apply(t,o),void 0===n||(e.exports=n)},5600:(e,t,i)=>{var o,n;o=[i,t,i(2806)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCodeBlock=void 0,Object.defineProperty(t,"WoltlabCodeBlock",{enumerable:!0,get:function(){return i.WoltlabCodeBlock}})}.apply(t,o),void 0===n||(e.exports=n)},8649:(e,t,i)=>{var o,n;o=[i,t,i(3905),i(8375)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCodeBlockFormRowView=void 0;class o extends i.View{children;constructor(e,t={}){super(e);const i=this.bindTemplate;this.set("class",t.class||""),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",i.to("class")]},children:this.children})}}t.WoltlabCodeBlockFormRowView=o,t.default=o}.apply(t,o),void 0===n||(e.exports=n)},3953:(e,t,i)=>{var o,n;o=[i,t,i(4934),i(7578),i(3905),i(7732),i(8649)],n=function(e,t,i,o,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCodeBlockPanelView=void 0;class a extends n.View{#n;#r;#x;#A;#E;focusTracker;keystrokes;#l;#c;constructor(e){const{locale:t}=e;super(t),this.set("file",""),this.set("highlighter",""),this.set("line",""),this.focusTracker=new r.FocusTracker,this.keystrokes=new r.KeystrokeHandler,this.#l=new n.ViewCollection,this.#c=this.#d();const o=(0,i.getNormalizedAndLocalizedLanguageDefinitions)(e);this.#x=this.#T(t,o);const s=this.#S(t);this.#A=s.fieldView;const a=this.#h(t);this.#E=a.fieldView,this.#n=this.#m(t),this.#r=this.#g(t),this.#p(t,s,a)}render(){super.render(),(0,n.submitHandler)({view:this});const e=[this.#x,this.#A,this.#E,this.#n,this.#r];e.forEach((e=>{this.#l.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e=>e.stopPropagation())),this.keystrokes.set("arrowleft",(e=>e.stopPropagation())),this.keystrokes.set("arrowup",(e=>e.stopPropagation())),this.keystrokes.set("arrowdown",(e=>e.stopPropagation())),this.listenTo(e[0].element,"selectstart",((e,t)=>{t.stopPropagation()}),{priority:"high"}),this.on("submit",(()=>{this.fire("execute")}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.#c.focusFirst()}#T(e,t){const i=e.t,o=(0,n.createDropdown)(e),r=this.#P(t);return this.highlighter=r.first.model._codeBlockLanguage,o.buttonView.bind("label").to(this,"highlighter",(e=>{const i=e?e.toString():"plain";return t.find((e=>e.language==i)).label})),o.buttonView.set({isOn:!1,withText:!0,tooltip:i("Language"),class:["ck-dropdown__button_label-width_auto"]}),o.on("execute",(e=>{this.highlighter=e.source._codeBlockLanguage})),(0,n.addListToDropdown)(o,r),o}#S(e){const t=e.t,i=new n.LabeledFieldView(e,n.createLabeledInputNumber);i.label=t("Line number");const{fieldView:o}=i;return o.min=0,o.bind("value").to(this,"line",(e=>e||"")),o.on("input",(()=>{this.line=o.element.value})),i}#h(e){const t=e.t,i=new n.LabeledFieldView(e,n.createLabeledInputText);return i.label=t("Filename"),i.fieldView.bind("value").to(this,"file",(e=>e||"")),i.fieldView.on("input",(()=>{this.file=i.fieldView.element.value})),i}#P(e){const t=new r.Collection;for(const i of e){const e={type:"button",model:new n.Model({_codeBlockLanguage:i.language,label:i.label,withText:!0})};e.model.bind("isOn").to(this,"highlighter",(t=>t===e.model._codeBlockLanguage)),t.add(e)}return t}#m(e){const t=e.t,i=new n.ButtonView(e);return i.set({label:t("Insert"),icon:o.icons.check,class:"ck-button-save",type:"submit",withText:!0,isEnabled:!0}),i}#g(e){const t=e.t,i=new n.ButtonView(e);return i.set({label:t("Cancel"),icon:o.icons.cancel,class:"ck-button-cancel",withText:!0}),i.delegate("execute").to(this,"cancel"),i}#p(e,t,i){this.setTemplate({tag:"form",attributes:{class:["ck","ck-vertical-form","ck-woltlabcodeblock-insert-form"],tabindex:"-1"},children:[this.#x,t,i,new s.default(e,{children:[this.#n,this.#r],class:"ck-woltlabcodeblock-insert-form__action-row"})]})}#d(){return new n.FocusCycler({focusables:this.#l,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}})}}t.WoltlabCodeBlockPanelView=a,t.default=a}.apply(t,o),void 0===n||(e.exports=n)},2806:(e,t,i)=>{var o,n;o=[i,t,i(4934),i(7578),i(3905),i(7732),i(3953)],n=function(e,t,i,o,n,r,s){"use strict";function a(e){switch(typeof e){case"string":return e;case"number":case"boolean":return e.toString();default:return""}}Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCodeBlock=void 0;class l extends o.Plugin{#I;#f=void 0;static get pluginName(){return"WoltlabCodeBlock"}init(){const e=this.editor;this.#I=e.commands.get("codeBlock"),e.model.schema.extend("codeBlock",{allowAttributes:["file","line"]}),this.#V(),this.#w(),this.#k(),this.#_(),this.#R(),this.listenTo(this.#I,"execute",(()=>{this.#v(this.#f)}))}#V(){const e=this.editor,t=e.t;e.ui.componentFactory.add("codeBlock",(i=>{const o=(0,n.createDropdown)(i,n.SplitButtonView),r=o.buttonView;r.set({label:t("Insert code block"),tooltip:!0,icon:'',isToggleable:!0}),r.bind("isOn").to(this.#I,"value",(e=>!!e)),r.on("execute",(()=>{e.execute("codeBlock",{usePreviousLanguageChoice:!1}),e.editing.view.focus()})),o.on("submit",(t=>{const i=t.path.find((e=>e instanceof s.WoltlabCodeBlockPanelView));i instanceof s.WoltlabCodeBlockPanelView&&(this.#f=i,e.execute("codeBlock",{language:i.highlighter,forceValue:!0}),this.#f=void 0,e.editing.view.focus(),o.isOpen=!1)})),o.on("cancel",(()=>{e.editing.view.focus(),o.isOpen=!1})),o.bind("isEnabled").to(this.#I);const l=new s.WoltlabCodeBlockPanelView(e);return o.on("change:isOpen",(()=>{if(o.isOpen){const e=this.#O();e?(l.file=a(e.getAttribute("file")),l.highlighter=a(e.getAttribute("language")),l.line=a(e.getAttribute("line"))):(l.file="",l.highlighter="",l.line="")}})),o.panelView.children.add(l),l.delegate("submit","cancel").to(o),o}))}#w(){this.editor.data.upcastDispatcher.on("element:pre",((e,t,i)=>{const{viewItem:o}=t,{consumable:n,writer:r}=i,s=r.createElement("codeBlock");r.setAttributes({file:o.getAttribute("data-file")||"",language:o.getAttribute("data-highlighter")||"",line:o.getAttribute("data-line")||""},s),i.convertChildren(o,s),i.safeInsert(s,t.modelCursor)&&(n.consume(o,{name:!0}),i.updateConversionResult(s,t))}),{priority:"high"})}#_(){const e=(0,i.getNormalizedAndLocalizedLanguageDefinitions)(this.editor);this.editor.editing.downcastDispatcher.on("insert:codeBlock",((t,i,o)=>{const{writer:n,mapper:r,consumable:s}=o;if(!s.consume(i.item,"insert"))return;const l=a(i.item.getAttribute("file")),c=a(i.item.getAttribute("language")),d=a(i.item.getAttribute("line")),u=n.createContainerElement("code",{class:`language-${c}`});let h="";const m=e.find((e=>e.language===c));h+=m?m.label:`Unknown (${c})`,(l||d)&&(h+=" (",l&&(h+=l),d&&(l&&(h+=" "),h+=`@ ${d}`),h+=")");const g=n.createContainerElement("pre",{"data-language":h,spellcheck:"false"},u),p=r.toViewPosition(this.editor.model.createPositionBefore(i.item));n.insert(p,g),r.bindElements(i.item,u)}),{priority:"high"})}#k(){this.editor.data.downcastDispatcher.on("insert:codeBlock",((e,t,i)=>{const{writer:o,mapper:n,consumable:r}=i;if(!r.consume(t.item,"insert"))return;const s=a(t.item.getAttribute("file")),l=a(t.item.getAttribute("language")),c=a(t.item.getAttribute("line")),d=n.toViewPosition(this.editor.model.createPositionBefore(t.item)),u=o.createContainerElement("pre",{"data-file":s,"data-highlighter":l,"data-line":c});o.insert(d,u),n.bindElements(t.item,u)}),{priority:"high"})}#v(e){const t=this.#O();t&&void 0!==e&&this.editor.model.change((i=>{i.setAttribute("file",e.file,t),i.setAttribute("line",e.line,t)}))}#R(){const e=(0,i.getNormalizedAndLocalizedLanguageDefinitions)(this.editor),t=["file","line"];for(const i of t)this.editor.editing.downcastDispatcher.on(`attribute:${i}:codeBlock`,((t,i,o)=>{const{mapper:n}=o,r=n.toViewElement(i.item);if(void 0===r)return;const s=r.getAncestors(),l=s[s.length-1];if(!l.is("element","pre"))return;const c=a(i.item.getAttribute("file")),d=a(i.item.getAttribute("language")),u=a(i.item.getAttribute("line"));let h="";const m=e.find((e=>e.language===d));h+=m?m.label:`Unknown (${d})`,(c||u)&&(h+=" (",c&&(h+=c),u&&(c&&(h+=" "),h+=`@ ${u}`),h+=")"),this.editor.editing.view.change((e=>{e.setAttribute("data-language",h,l)}))}))}#O(){const e=this.editor.model.document.selection,t=(0,r.first)(e.getSelectedBlocks());return t&&t.is("element","codeBlock")?t:null}}t.WoltlabCodeBlock=l,t.default=l}.apply(t,o),void 0===n||(e.exports=n)},3706:(e,t,i)=>{var o,n;o=[i,t,i(2379)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCode=void 0,Object.defineProperty(t,"WoltlabCode",{enumerable:!0,get:function(){return i.WoltlabCode}})}.apply(t,o),void 0===n||(e.exports=n)},2379:(e,t,i)=>{var o,n;o=[i,t,i(1214),i(7578)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCode=void 0;class n extends o.Plugin{static get pluginName(){return"WoltlabCode"}static get requires(){return[i.Code]}init(){const{conversion:e}=this.editor;e.for("upcast").elementToAttribute({view:"kbd",model:"code",converterPriority:"high"}),e.for("dataDowncast").attributeToElement({model:"code",view:"kbd",converterPriority:"high"})}}t.WoltlabCode=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},8206:(e,t,i)=>{var o,n;o=[i,t,i(2265)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabImage=void 0,Object.defineProperty(t,"WoltlabImage",{enumerable:!0,get:function(){return i.WoltlabImage}})}.apply(t,o),void 0===n||(e.exports=n)},2265:(e,t,i)=>{var o,n;o=[i,t,i(7578)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabImage=void 0;class o extends i.Plugin{static get pluginName(){return"WoltlabImage"}init(){this.editor.conversion.for("dataDowncast").add((e=>{e.on("insert:imageInline",((e,t,i)=>{const{item:o}=t;if(!o.is("element"))return;const n=o.getAttribute("width");if("string"!=typeof n)return;const{mapper:r,writer:s}=i,a=r.toViewElement(o);void 0!==a&&s.setAttribute("data-width",n,a)}),{priority:"lowest"}),e.on("insert:imageBlock",((e,t,i)=>{const{item:o}=t;if(!o.is("element"))return;const n=o.getAttribute("width");if("string"!=typeof n)return;const{mapper:r,writer:s}=i,a=r.toViewElement(o);void 0!==a&&s.setAttribute("data-width",n,a)}),{priority:"lowest"})}))}}t.WoltlabImage=o,t.default=o}.apply(t,o),void 0===n||(e.exports=n)},5825:(e,t,i)=>{var o,n;o=[i,t,i(4413)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMagicParagraph=void 0,Object.defineProperty(t,"WoltlabMagicParagraph",{enumerable:!0,get:function(){return i.WoltlabMagicParagraph}})}.apply(t,o),void 0===n||(e.exports=n)},4413:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(600)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMagicParagraph=void 0;class n extends i.Plugin{static blockModels=["blockQuote","codeBlock","spoiler","table"];static get pluginName(){return"WoltlabMagicParagraph"}init(){const{mapper:e,view:t}=this.editor.editing,{document:i,domConverter:r}=t;t.addObserver(o.ClickObserver),this.listenTo(i,"click",((t,o)=>{const{domEvent:s,target:a}=o,l=a.getAncestors();l.push(a);for(const e of l)if(e.is("element","p")||e.is("element","li"))return;const{clientY:c}=s,d=i.getRoot(),u=d.getChild(0);if(void 0!==u){if(u.is("containerElement")){const i=e.toModelElement(u);if(i&&n.blockModels.includes(i.name)){const e=r.mapViewToDom(u),{top:i}=e.getBoundingClientRect();if(c<=i)return t.stop(),void this.#B(u)}}if(0!==d.childCount){const i=d.getChild(d.childCount-1);if(i.is("containerElement")){const o=e.toModelElement(i);if(o&&n.blockModels.includes(o.name)){const e=r.mapViewToDom(i),{bottom:o}=e.getBoundingClientRect();if(c>=o)return t.stop(),void this.#M(i)}}}for(const e of this.#z()){const i=r.mapViewToDom(e),{bottom:o,top:n}=i.getBoundingClientRect(),{marginBottom:s,marginTop:a}=window.getComputedStyle(i),l=n-parseInt(a),d=o+parseInt(s);if(c=l&&c<=n)return this.#B(e),void t.stop();if(c>=o&&c<=d)return this.#M(e),void t.stop()}}}))}#B(e){const{mapper:t}=this.editor.editing;let i;i=e.previousSibling&&e.previousSibling.is("element","p")?t.toModelElement(e.previousSibling):void 0,this.editor.model.change((o=>{if(void 0===i){i=o.createElement("paragraph");const n=o.createPositionBefore(t.toModelElement(e));o.insert(i,n)}o.setSelection(i,"end")}))}#M(e){const{mapper:t}=this.editor.editing;let i;i=e.nextSibling&&e.nextSibling.is("element","p")?t.toModelElement(e.nextSibling):void 0,this.editor.model.change((o=>{if(void 0===i){i=o.createElement("paragraph");const n=o.createPositionAfter(t.toModelElement(e));o.insert(i,n)}o.setSelection(i,"end")}))}*#z(){const{mapper:e,view:t}=this.editor.editing,i=t.document.getRoot(),o=t.createRangeIn(i);for(const t of o.getWalker({ignoreElementEnd:!0})){const i=t.item;if(!i.is("containerElement"))continue;const o=e.toModelElement(i);void 0!==o&&n.blockModels.includes(o.name)&&(yield i)}}}t.WoltlabMagicParagraph=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},9782:(e,t,i)=>{var o,n;o=[i,t,i(6761)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMedia=void 0,Object.defineProperty(t,"WoltlabMedia",{enumerable:!0,get:function(){return i.WoltlabMedia}})}.apply(t,o),void 0===n||(e.exports=n)},6761:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(9211),i(7080)],n=function(e,t,i,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMedia=void 0;class r extends i.Plugin{static get pluginName(){return"WoltlabMedia"}static get requires(){return[o.Image,n.WoltlabMetacode]}init(){this.#N(),this.#D()}#N(){const{conversion:e,model:t}=this.editor,{schema:i}=t,o=["imageBlock","imageInline"];o.forEach((e=>{i.extend(e,{allowAttributes:["mediaId","mediaSize"]})})),e.attributeToAttribute({model:"classList",view:{name:"img",key:"class",value:["woltlabSuiteMedia"]}});const n=new Map([["mediaId","data-media-id"],["mediaSize","data-media-size"]]);Array.from(n.entries()).forEach((([t,i])=>{e.for("upcast").attributeToAttribute({view:i,model:t}),e.for("downcast").add((e=>{o.forEach((o=>{e.on(`attribute:${t}:${o}`,((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer;let r=o.mapper.toViewElement(t.item);r.is("element","figure")&&(r=r.getChild(0)),r.is("element","img")&&(null!==t.attributeNewValue?n.setAttribute(i,t.attributeNewValue,r):n.removeAttribute(i,r))}))}))}))}))}#D(){const e=this.editor.config.get("woltlabMedia");this.editor.plugins.get("WoltlabMetacode").on("upcast",((t,i)=>{if("wsm"===i.name){const o=parseInt(i.attributes[0].toString());if(Number.isNaN(o))return;const n=i.attributes[1]?i.attributes[1].toString():"original";this.#L(i,e.resolveMediaUrl,o,n)&&t.stop()}}))}#L(e,t,i,o){const{conversionApi:n,data:r}=e,{consumable:s,writer:a}=n,{viewItem:l}=r,c=a.createElement("imageInline");return a.setAttributes({src:t(i,o),mediaId:i,mediaSize:o},c),n.convertChildren(l,c),!!n.safeInsert(c,r.modelCursor)&&(s.consume(l,{name:!0}),n.updateConversionResult(c,r),!0)}}t.WoltlabMedia=r,t.default=r}.apply(t,o),void 0===n||(e.exports=n)},4201:(e,t,i)=>{var o,n;o=[i,t,i(644)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMention=void 0,Object.defineProperty(t,"WoltlabMention",{enumerable:!0,get:function(){return i.WoltlabMention}})}.apply(t,o),void 0===n||(e.exports=n)},644:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(9829),i(7080),i(7732)],n=function(e,t,i,o,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMention=void 0;class s extends i.Plugin{static get pluginName(){return"WoltlabMention"}static get requires(){return[o.Mention,n.WoltlabMetacode]}init(){this.editor.plugins.get("WoltlabMetacode").on("upcast",((e,t)=>{"user"===t.name&&1===t.attributes.length&&(Number.isNaN(parseInt(t.attributes[0].toString()))||(e.stop(),this.#F(t)))})),this.#k()}#F(e){const{attributes:t,conversionApi:i,data:o,name:n}=e,{writer:s}=i,{viewItem:a}=o,l=a.getChild(0);Object.assign(o,i.convertChildren(o.viewItem,o.modelCursor));for(const e of Array.from(o.modelRange.getItems()))(e.is("$text")||e.is("$textProxy"))&&s.setAttribute("mention",{id:t[0].toString(),objectId:t[0],type:n,uid:(0,r.uid)(),_text:l.data},e)}#k(){this.editor.conversion.for("dataDowncast").attributeToElement({model:"mention",view:(e,{writer:t})=>{if(!e)return;const i=e.objectId;return t.createAttributeElement("woltlab-metacode",{"data-name":e.type,"data-attributes":btoa(JSON.stringify([i]))},{priority:20,id:e.uid})},converterPriority:"high"})}}t.WoltlabMention=s,t.default=s}.apply(t,o),void 0===n||(e.exports=n)},7080:(e,t,i)=>{var o,n;o=[i,t,i(2505)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMetacode=void 0,Object.defineProperty(t,"WoltlabMetacode",{enumerable:!0,get:function(){return i.WoltlabMetacode}})}.apply(t,o),void 0===n||(e.exports=n)},2505:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(7732)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabMetacode=void 0;class n extends i.Plugin{static get pluginName(){return"WoltlabMetacode"}init(){this.#H()}#H(){this.editor.conversion.for("upcast").add((e=>{e.on("element:woltlab-metacode",((e,t,i)=>{const{consumable:n,writer:r}=i,{viewItem:s}=t;if(!n.test(s,{name:!0}))return;const a=s.getAttribute("data-name");if(void 0===a)return;const l=this.#W(s.getAttribute("data-attributes")||""),c=new o.EventInfo(this,"upcast"),d={attributes:l,conversionApi:i,data:t,name:a};if(this.fire(c,d),c.stop.called)return;let{modelCursor:u}=t;const h=u.getAncestors();let m;1===h.length&&"$root"===h[0].name&&(m=r.createElement("paragraph"),r.insert(m,u,0),u=r.createPositionAt(m,0));const g=this.#Z(l),p=r.createText(`[${a}${g}]`),f=r.createText(`[/${a}]`);r.insert(p,u,0),u=u.getShiftedBy(p.offsetSize),r.insert(f,u,"end"),void 0!==m&&(u=r.createPositionAfter(m)),t.modelCursor=u}))}))}#W(e){if(""===e)return[];const t=atob(e);let i;try{i=JSON.parse(t)}catch(e){return[]}return i}#Z(e){return 0===e.length?"":"="+e.map((e=>"number"==typeof e?e.toString():`'${e}'`)).join(",")}}t.WoltlabMetacode=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},8427:(e,t,i)=>{var o,n;o=[i,t,i(4054)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSmiley=void 0,Object.defineProperty(t,"WoltlabSmiley",{enumerable:!0,get:function(){return i.WoltlabSmiley}})}.apply(t,o),void 0===n||(e.exports=n)},4054:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(9211),i(2997)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSmiley=void 0;class n extends i.Plugin{static get pluginName(){return"WoltlabSmiley"}static get requires(){return[o.Image]}init(){const{conversion:e,model:t}=this.editor,i=["imageBlock","imageInline"];for(const e of i)t.schema.extend(e,{allowAttributes:["classList"]});e.attributeToAttribute({model:"classList",view:{name:"img",key:"class",value:["smiley"]}}),e.for("editingDowncast").add((e=>{e.on("insert:imageInline",((e,t,i)=>{const{item:o}=t;if("smiley"!==o.getAttribute("classList"))return;if(!o.is("element"))return;const{consumable:n,mapper:r,writer:s}=i;if(!n.test(o,"insert"))return;n.consume(o,"insert");const a=s.createEmptyElement("img"),l=r.toViewPosition(this.editor.model.createPositionBefore(o));s.insert(l,a),r.bindElements(o,a)}),{priority:"high"})}))}}t.WoltlabSmiley=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},5469:(e,t,i)=>{var o,n;o=[i,t,i(7591),i(2553)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSpoilerCommand=t.WoltlabSpoiler=void 0,Object.defineProperty(t,"WoltlabSpoiler",{enumerable:!0,get:function(){return i.WoltlabSpoiler}}),Object.defineProperty(t,"WoltlabSpoilerCommand",{enumerable:!0,get:function(){return o.WoltlabSpoilerCommand}})}.apply(t,o),void 0===n||(e.exports=n)},7591:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(6004)],n=function(e,t,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSpoiler=void 0;class n extends i.Plugin{static get requires(){return[o.default]}static get pluginName(){return"WoltlabSpoiler"}}t.WoltlabSpoiler=n,t.default=n}.apply(t,o),void 0===n||(e.exports=n)},2553:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(600),i(7732)],n=function(e,t,i,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSpoilerCommand=void 0;class r extends i.Command{execute(){const{model:e}=this.editor,{schema:t}=e,{selection:i}=e.document,o=Array.from(i.getSelectedBlocks());e.change((e=>{if(this.value)this.#U(e,o);else{const i=o.filter((e=>this.#j(e)||this.#$(t,e)));this.#q(e,i)}}))}refresh(){this.value=this.#K(),this.isEnabled=this.#o()}#U(e,t){for(const i of t){const t=this.#j(i);if(null===t)continue;const n=t.previousSibling;if(null===n||!n.is("element","spoilerTitle"))throw new Error("Invalid structure, expected a `` adjacent to ``",{cause:{spoilerTitle:n}});const r=t.parent;if(!(r instanceof o.Element&&r.is("element","spoiler")))throw new Error("Invalid structure, expected a `` as the parent of a ``",{cause:{spoiler:r}});e.remove(n),e.unwrap(r),e.unwrap(t)}}#q(e,t){const i=[];this.#G(e,t).reverse().forEach((t=>{let o=this.#j(t.start);o||(o=this.#J(e,t)),i.push(o.parent)})),i.reverse().reduce(((t,i)=>{if(t.nextSibling===i){const o=t.getChild(1),n=i.getChild(1);return e.move(e.createRangeIn(n),e.createPositionAt(o,"end")),e.remove(i),t}return i}))}#G(e,t){let i=null,o=0;const n=[];for(;o{var o,n;o=[i,t,i(7578),i(4156),i(600),i(3905),i(2553),i(5025)],n=function(e,t,i,o,n,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabSpoilerEditing=void 0;class a extends i.Plugin{static get pluginName(){return"WoltlabSpoilerEditing"}static get requires(){return[o.Widget]}init(){this.#Y(),this.#H(),this.editor.commands.add("insertSpoiler",new s.default(this.editor)),this.#Q()}#Q(){const{t:e}=this.editor.locale;this.editor.ui.componentFactory.add("spoiler",(t=>{const i=this.editor.commands.get("insertSpoiler"),o=new r.ButtonView(t);return o.set({label:e("Spoiler"),tooltip:!0,withText:!0}),o.labelView.setTemplate({tag:"fa-icon",attributes:{name:"eye-slash"}}),o.bind("isOn").to(i,"value"),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",(()=>this.editor.execute("insertSpoiler"))),o}))}#Y(){const{schema:e}=this.editor.model;e.register("spoiler",{allowWhere:"$block",isObject:!0}),e.register("spoilerTitle",{allowChildren:"$text",allowIn:"spoiler",isLimit:!0}),e.register("spoilerContent",{allowContentOf:"$root",allowIn:"spoiler",isLimit:!0}),e.addChildCheck(((e,t)=>("spoiler"!==t.name||!Array.from(e.getNames()).includes("spoiler"))&&(!e.endsWith("spoilerContent")||"spoiler"!==t.name)&&(!e.endsWith("spoilerTitle")||"$text"===t.name)&&void 0)),e.addAttributeCheck((e=>{if(e.endsWith("spoilerTitle $text"))return!1}))}#H(){const{conversion:e}=this.editor,{t}=this.editor.locale;e.for("upcast").add((e=>{e.on("element:woltlab-spoiler",((e,t,i)=>{const{consumable:o,writer:n,safeInsert:r,convertChildren:s,updateConversionResult:a}=i,{viewItem:l}=t,c={name:!0};if(!o.test(l,c))return;const d=n.createElement("spoiler"),u=n.createElement("spoilerTitle");n.append(u,d);const h=(l.getAttribute("data-label")||"").trim();n.appendText(h,u);const m=n.createElement("spoilerContent");n.append(m,d),r(d,t.modelCursor)&&(o.consume(l,c),s(l,m),a(d,t))}))})),e.for("dataDowncast").add((e=>{e.on("insert:spoiler",((e,t,i)=>{const{item:o}=t,{consumable:n,mapper:r,writer:s}=i;if(2!==o.childCount)return null;const a=o.getChild(0);if(!a.is("element","spoilerTitle"))return null;if(!n.consume(o,"insert"))return;n.consume(a,"insert");let l="";if(1===a.childCount){const e=a.getChild(0);e.is("$text")&&(l=e.data)}const c=s.createContainerElement("woltlab-spoiler",{"data-label":l}),d=r.toViewPosition(this.editor.model.createPositionBefore(o));s.insert(d,c),r.bindElements(o,c),r.bindElements(a,c);const u=o.getChild(1);u.is("element","spoilerContent")&&(r.bindElements(u,c),n.consume(u,"insert"))})),e.on("insert:$text",((e,t,i)=>{const o=t.item.parent;o&&o.is("element","spoilerTitle")&&i.consumable.consume(t.item,"insert")}))})),e.for("editingDowncast").elementToElement({model:"spoiler",view:(e,{writer:t})=>{const i=t.createContainerElement("div",{class:"ck-woltlabspoiler"});return(0,o.toWidget)(i,t,{hasSelectionHandle:!0,label:"spoiler widget"})}}).elementToElement({model:"spoilerTitle",view:(e,{writer:i})=>{const r=i.createEditableElement("div",{class:"ck-woltlabspoiler__title","data-label":t("Spoiler")});return(0,n.enablePlaceholder)({view:this.editor.editing.view,element:r,text:t("Type your title"),keepOnFocus:!0}),(0,o.toWidgetEditable)(r,i)}}).elementToElement({model:"spoilerContent",view:(e,{writer:t})=>{const i=t.createEditableElement("div",{class:"ck-woltlabspoiler__content"});return(0,o.toWidgetEditable)(i,t)}})}}t.WoltlabSpoilerEditing=a,t.default=a}.apply(t,o),void 0===n||(e.exports=n)},9402:(e,t,i)=>{var o,n;o=[i,t,i(6909)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabToolbarGroup=void 0,Object.defineProperty(t,"WoltlabToolbarGroup",{enumerable:!0,get:function(){return i.WoltlabToolbarGroup}})}.apply(t,o),void 0===n||(e.exports=n)},6909:(e,t,i)=>{var o,n;o=[i,t,i(7578)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabToolbarGroup=void 0;class o extends i.Plugin{static get pluginName(){return"WoltlabToolbarGroup"}init(){const e=this.editor.config.get("woltlabToolbarGroup");e&&this.editor.once("ready",(()=>{const t=this.editor.ui.view.toolbar.items;Object.entries(e).forEach((([e,i])=>{const o=t.find((t=>null!==t.element?.querySelector(`[data-cke-tooltip-text="woltlabToolbarGroup_${e}"]`))),n=o.element,r=n.querySelector(".ck-button__icon"),[s,a]=i.icon.split(";",2),l=document.createElement("fa-icon");l.setIcon(s,"true"===a),r.replaceWith(l),o.buttonView.label=i.label,n.dataset.ckeTooltipText=i.label}))}))}}t.WoltlabToolbarGroup=o,t.default=o}.apply(t,o),void 0===n||(e.exports=n)},8152:(e,t,i)=>{var o,n;o=[i,t,i(6916)],n=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabUpload=void 0,Object.defineProperty(t,"WoltlabUpload",{enumerable:!0,get:function(){return i.WoltlabUpload}})}.apply(t,o),void 0===n||(e.exports=n)},6916:(e,t,i)=>{var o,n;o=[i,t,i(7578),i(1070),i(2263)],n=function(e,t,i,o,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabUpload=void 0;class r extends i.Plugin{static get pluginName(){return"WoltlabUpload"}static get requires(){return[o.FileRepository]}init(){const{config:e,editing:t,plugins:i}=this.editor,r=e.get("woltlabUpload");r&&"function"==typeof r.uploadImage&&(i.get(o.FileRepository).createUploadAdapter=e=>new n.WoltlabUploadAdapter(e,r),"function"==typeof r.uploadOther&&this.listenTo(t.view.document,"clipboardInput",((e,t)=>{if(e.stop.called)return;const{dataTransfer:i,method:o}=t;if("drop"===o){for(const e of i.files)null!==e&&r.uploadOther(e);e.stop()}}),{priority:"lowest"}))}}t.WoltlabUpload=r,t.default=r}.apply(t,o),void 0===n||(e.exports=n)},2263:(e,t,i)=>{var o;o=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabUploadAdapter=void 0;class i{#X;#ee;#te;constructor(e,t){this.#X=e,this.#ee=t}abort(){this.#te?.abort()}async upload(){const e=await this.#X.file;return this.#te=new AbortController,this.#ee.uploadImage(e,this.#te)}}t.WoltlabUploadAdapter=i,t.default=i}.apply(t,[i,t]),void 0===o||(e.exports=o)},8491:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+"},2536:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(9651);const n=function(e,t){for(var i=e.length;i--;)if((0,o.Z)(e[i][0],t))return i;return-1};var r=Array.prototype.splice;function s(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t-1},s.prototype.set=function(e,t){var i=this.__data__,o=n(i,e);return o<0?(++this.size,i.push([e,t])):i[o][1]=t,this};const a=s},6183:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(2119),n=i(6092);const r=(0,o.Z)(n.Z,"Map")},520:(e,t,i)=>{"use strict";i.d(t,{Z:()=>h});const o=(0,i(2119).Z)(Object,"create");var n=Object.prototype.hasOwnProperty;var r=Object.prototype.hasOwnProperty;function s(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t{"use strict";i.d(t,{Z:()=>a});var o=i(2536);var n=i(6183),r=i(520);function s(e){var t=this.__data__=new o.Z(e);this.size=t.size}s.prototype.clear=function(){this.__data__=new o.Z,this.size=0},s.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},s.prototype.get=function(e){return this.__data__.get(e)},s.prototype.has=function(e){return this.__data__.has(e)},s.prototype.set=function(e,t){var i=this.__data__;if(i instanceof o.Z){var s=i.__data__;if(!n.Z||s.length<199)return s.push([e,t]),this.size=++i.size,this;i=this.__data__=new r.Z(s)}return i.set(e,t),this.size=i.size,this};const a=s},7685:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=i(6092).Z.Symbol},4073:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=i(6092).Z.Uint8Array},9001:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var o=i(4732),n=i(7771),r=i(6706),s=i(6009),a=i(7212),l=Object.prototype.hasOwnProperty;const c=function(e,t){var i=(0,n.Z)(e),c=!i&&(0,o.Z)(e),d=!i&&!c&&(0,r.Z)(e),u=!i&&!c&&!d&&(0,a.Z)(e),h=i||c||d||u,m=h?function(e,t){for(var i=-1,o=Array(e);++i{"use strict";i.d(t,{Z:()=>o});const o=function(e,t){for(var i=-1,o=t.length,n=e.length;++i{"use strict";i.d(t,{Z:()=>s});var o=i(4752),n=i(9651),r=Object.prototype.hasOwnProperty;const s=function(e,t,i){var s=e[t];r.call(e,t)&&(0,n.Z)(s,i)&&(void 0!==i||t in e)||(0,o.Z)(e,t,i)}},4752:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=i(7904);const n=function(e,t,i){"__proto__"==t&&o.Z?(0,o.Z)(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}},9256:(e,t,i)=>{"use strict";i.d(t,{Z:()=>W});var o=i(5365);var n=i(2954),r=i(1899),s=i(703);var a=i(7590);var l=i(1050),c=i(7215),d=i(3573);var u=i(8694),h=i(2513),m=i(532);const g=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,u.Z)(t,(0,d.Z)(e)),e=(0,h.Z)(e);return t}:m.Z;var p=i(1808),f=i(3327);const b=function(e){return(0,f.Z)(e,a.Z,g)};var w=i(4158),k=Object.prototype.hasOwnProperty;var _=i(1884);var v=/\w*$/;var y=i(7685),C=y.Z?y.Z.prototype:void 0,x=C?C.valueOf:void 0;var A=i(2701);const E=function(e,t,i){var o,n,r,s=e.constructor;switch(t){case"[object ArrayBuffer]":return(0,_.Z)(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return function(e,t){var i=t?(0,_.Z)(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,A.Z)(e,i);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(r=new(n=e).constructor(n.source,v.exec(n))).lastIndex=n.lastIndex,r;case"[object Symbol]":return o=e,x?Object(x.call(o)):{}}};var T=i(5418),S=i(7771),P=i(6706),I=i(8533);var V=i(1162),R=i(8351),O=R.Z&&R.Z.isMap;const B=O?(0,V.Z)(O):function(e){return(0,I.Z)(e)&&"[object Map]"==(0,w.Z)(e)};var M=i(7226);var z=R.Z&&R.Z.isSet;const N=z?(0,V.Z)(z):function(e){return(0,I.Z)(e)&&"[object Set]"==(0,w.Z)(e)};var D="[object Arguments]",L="[object Function]",F="[object Object]",H={};H[D]=H["[object Array]"]=H["[object ArrayBuffer]"]=H["[object DataView]"]=H["[object Boolean]"]=H["[object Date]"]=H["[object Float32Array]"]=H["[object Float64Array]"]=H["[object Int8Array]"]=H["[object Int16Array]"]=H["[object Int32Array]"]=H["[object Map]"]=H["[object Number]"]=H[F]=H["[object RegExp]"]=H["[object Set]"]=H["[object String]"]=H["[object Symbol]"]=H["[object Uint8Array]"]=H["[object Uint8ClampedArray]"]=H["[object Uint16Array]"]=H["[object Uint32Array]"]=!0,H["[object Error]"]=H[L]=H["[object WeakMap]"]=!1;const W=function e(t,i,u,h,m,f){var _,v=1&i,y=2&i,C=4&i;if(u&&(_=m?u(t,h,m,f):u(t)),void 0!==_)return _;if(!(0,M.Z)(t))return t;var x=(0,S.Z)(t);if(x){if(_=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&k.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(t),!v)return(0,c.Z)(t,_)}else{var A=(0,w.Z)(t),I=A==L||"[object GeneratorFunction]"==A;if((0,P.Z)(t))return(0,l.Z)(t,v);if(A==F||A==D||I&&!m){if(_=y||I?{}:(0,T.Z)(t),!v)return y?function(e,t){return(0,r.Z)(e,g(e),t)}(t,function(e,t){return e&&(0,r.Z)(t,(0,a.Z)(t),e)}(_,t)):function(e,t){return(0,r.Z)(e,(0,d.Z)(e),t)}(t,function(e,t){return e&&(0,r.Z)(t,(0,s.Z)(t),e)}(_,t))}else{if(!H[A])return m?t:{};_=E(t,A,v)}}f||(f=new o.Z);var V=f.get(t);if(V)return V;f.set(t,_),N(t)?t.forEach((function(o){_.add(e(o,i,u,o,t,f))})):B(t)&&t.forEach((function(o,n){_.set(n,e(o,i,u,n,t,f))}));var R=C?y?b:p.Z:y?a.Z:s.Z,O=x?void 0:R(t);return function(e,t){for(var i=-1,o=null==e?0:e.length;++i{"use strict";i.d(t,{Z:()=>r});var o=i(8694),n=i(7771);const r=function(e,t,i){var r=t(e);return(0,n.Z)(e)?r:(0,o.Z)(r,i(e))}},3243:(e,t,i)=>{"use strict";i.d(t,{Z:()=>d});var o=i(7685),n=Object.prototype,r=n.hasOwnProperty,s=n.toString,a=o.Z?o.Z.toStringTag:void 0;var l=Object.prototype.toString;var c=o.Z?o.Z.toStringTag:void 0;const d=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=r.call(e,a),i=e[a];try{e[a]=void 0;var o=!0}catch(e){}var n=s.call(e);return o&&(t?e[a]=i:delete e[a]),n}(e):function(e){return l.call(e)}(e)}},1152:(e,t,i)=>{"use strict";i.d(t,{Z:()=>S});var o=i(5365),n=i(520);function r(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new n.Z;++tc))return!1;var u=r.get(e),h=r.get(t);if(u&&h)return u==t&&h==e;var m=-1,g=!0,p=2&i?new s:void 0;for(r.set(e,t),r.set(t,e);++m{"use strict";i.d(t,{Z:()=>o});const o=function(e,t,i){var o=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(i=i>n?n:i)<0&&(i+=n),n=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(n);++o{"use strict";i.d(t,{Z:()=>o});const o=function(e){return function(t){return e(t)}}},1884:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=i(4073);const n=function(e){var t=new e.constructor(e.byteLength);return new o.Z(t).set(new o.Z(e)),t}},1050:(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var o=i(6092),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=n&&"object"==typeof module&&module&&!module.nodeType&&module,s=r&&r.exports===n?o.Z.Buffer:void 0,a=s?s.allocUnsafe:void 0;const l=function(e,t){if(t)return e.slice();var i=e.length,o=a?a(i):new e.constructor(i);return e.copy(o),o}},2701:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=i(1884);const n=function(e,t){var i=t?(0,o.Z)(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}},7215:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e,t){var i=-1,o=e.length;for(t||(t=Array(o));++i{"use strict";i.d(t,{Z:()=>r});var o=i(2954),n=i(4752);const r=function(e,t,i,r){var s=!i;i||(i={});for(var a=-1,l=t.length;++a{"use strict";i.d(t,{Z:()=>b});var o=i(9203);var n=Math.max;var r=i(7904);const s=r.Z?function(e,t){return(0,r.Z)(e,"toString",{configurable:!0,enumerable:!1,value:(i=t,function(){return i}),writable:!0});var i}:o.Z;var a=Date.now;const l=(c=s,d=0,u=0,function(){var e=a(),t=16-(e-u);if(u=e,t>0){if(++d>=800)return arguments[0]}else d=0;return c.apply(void 0,arguments)});var c,d,u;const h=function(e,t){return l(function(e,t,i){return t=n(void 0===t?e.length-1:t,0),function(){for(var o=arguments,r=-1,s=n(o.length-t,0),a=Array(s);++r1?i[n-1]:void 0,s=n>2?i[2]:void 0;for(r=e.length>3&&"function"==typeof r?(n--,r):void 0,s&&function(e,t,i){if(!(0,f.Z)(i))return!1;var o=typeof t;return!!("number"==o?(0,g.Z)(i)&&(0,p.Z)(t,i.length):"string"==o&&t in i)&&(0,m.Z)(i[t],e)}(i[0],i[1],s)&&(r=n<3?void 0:r,n=1),t=Object(t);++o{"use strict";i.d(t,{Z:()=>n});var o=i(2119);const n=function(){try{var e=(0,o.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},3413:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o="object"==typeof global&&global&&global.Object===Object&&global},1808:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var o=i(3327),n=i(3573),r=i(703);const s=function(e){return(0,o.Z)(e,r.Z,n.Z)}},2119:(e,t,i)=>{"use strict";i.d(t,{Z:()=>f});var o=i(3234);const n=i(6092).Z["__core-js_shared__"];var r,s=(r=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";var a=i(7226),l=i(19),c=/^\[object .+?Constructor\]$/,d=Function.prototype,u=Object.prototype,h=d.toString,m=u.hasOwnProperty,g=RegExp("^"+h.call(m).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const p=function(e){return!(!(0,a.Z)(e)||(t=e,s&&s in t))&&((0,o.Z)(e)?g:c).test((0,l.Z)(e));var t},f=function(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return p(i)?i:void 0}},2513:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=(0,i(1851).Z)(Object.getPrototypeOf,Object)},3573:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var o=i(532),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;const s=r?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,o=null==e?0:e.length,n=0,r=[];++i{"use strict";i.d(t,{Z:()=>C});var o=i(2119),n=i(6092);const r=(0,o.Z)(n.Z,"DataView");var s=i(6183);const a=(0,o.Z)(n.Z,"Promise"),l=(0,o.Z)(n.Z,"Set"),c=(0,o.Z)(n.Z,"WeakMap");var d=i(3243),u=i(19),h="[object Map]",m="[object Promise]",g="[object Set]",p="[object WeakMap]",f="[object DataView]",b=(0,u.Z)(r),w=(0,u.Z)(s.Z),k=(0,u.Z)(a),_=(0,u.Z)(l),v=(0,u.Z)(c),y=d.Z;(r&&y(new r(new ArrayBuffer(1)))!=f||s.Z&&y(new s.Z)!=h||a&&y(a.resolve())!=m||l&&y(new l)!=g||c&&y(new c)!=p)&&(y=function(e){var t=(0,d.Z)(e),i="[object Object]"==t?e.constructor:void 0,o=i?(0,u.Z)(i):"";if(o)switch(o){case b:return f;case w:return h;case k:return m;case _:return g;case v:return p}return t});const C=y},5418:(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var o=i(7226),n=Object.create;const r=function(){function e(){}return function(t){if(!(0,o.Z)(t))return{};if(n)return n(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}();var s=i(2513),a=i(2764);const l=function(e){return"function"!=typeof e.constructor||(0,a.Z)(e)?{}:r((0,s.Z)(e))}},6009:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=/^(?:0|[1-9]\d*)$/;const n=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&o.test(e))&&e>-1&&e%1==0&&e{"use strict";i.d(t,{Z:()=>n});var o=Object.prototype;const n=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||o)}},8351:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(3413),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=n&&"object"==typeof module&&module&&!module.nodeType&&module,s=r&&r.exports===n&&o.Z.process;const a=function(){try{return r&&r.require&&r.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}()},1851:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e,t){return function(i){return e(t(i))}}},6092:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(3413),n="object"==typeof self&&self&&self.Object===Object&&self;const r=o.Z||n||Function("return this")()},19:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=Function.prototype.toString;const n=function(e){if(null!=e){try{return o.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},207:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var o=i(1899),n=i(288),r=i(7590);const s=(0,n.Z)((function(e,t){(0,o.Z)(t,(0,r.Z)(t),e)}))},4612:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=i(9256);const n=function(e,t){return t="function"==typeof t?t:void 0,(0,o.Z)(e,5,t)}},6682:(e,t,i)=>{"use strict";i.d(t,{Z:()=>b});var o=i(7226),n=i(6092);const r=function(){return n.Z.Date.now()};var s=/\s/;var a=/^\s+/;const l=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&s.test(e.charAt(t)););return t}(e)+1).replace(a,""):e};var c=i(2714),d=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,h=/^0o[0-7]+$/i,m=parseInt;const g=function(e){if("number"==typeof e)return e;if((0,c.Z)(e))return NaN;if((0,o.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,o.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=l(e);var i=u.test(e);return i||h.test(e)?m(e.slice(2),i?2:8):d.test(e)?NaN:+e};var p=Math.max,f=Math.min;const b=function(e,t,i){var n,s,a,l,c,d,u=0,h=!1,m=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var i=n,o=s;return n=s=void 0,u=t,l=e.apply(o,i)}function k(e){var i=e-d;return void 0===d||i>=t||i<0||m&&e-u>=a}function _(){var e=r();if(k(e))return v(e);c=setTimeout(_,function(e){var i=t-(e-d);return m?f(i,a-(e-u)):i}(e))}function v(e){return c=void 0,b&&n?w(e):(n=s=void 0,l)}function y(){var e=r(),i=k(e);if(n=arguments,s=this,d=e,i){if(void 0===c)return function(e){return u=e,c=setTimeout(_,t),h?w(e):l}(d);if(m)return clearTimeout(c),c=setTimeout(_,t),w(d)}return void 0===c&&(c=setTimeout(_,t)),l}return t=g(t)||0,(0,o.Z)(i)&&(h=!!i.leading,a=(m="maxWait"in i)?p(g(i.maxWait)||0,t):a,b="trailing"in i?!!i.trailing:b),y.cancel=function(){void 0!==c&&clearTimeout(c),u=0,n=d=s=c=void 0},y.flush=function(){return void 0===c?l:v(r())},y}},9651:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e,t){return e===t||e!=e&&t!=t}},9203:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e){return e}},4732:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var o=i(3243),n=i(8533);const r=function(e){return(0,n.Z)(e)&&"[object Arguments]"==(0,o.Z)(e)};var s=Object.prototype,a=s.hasOwnProperty,l=s.propertyIsEnumerable;const c=r(function(){return arguments}())?r:function(e){return(0,n.Z)(e)&&a.call(e,"callee")&&!l.call(e,"callee")}},7771:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=Array.isArray},585:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(3234),n=i(1656);const r=function(e){return null!=e&&(0,n.Z)(e.length)&&!(0,o.Z)(e)}},6706:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var o=i(6092);var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=n&&"object"==typeof module&&module&&!module.nodeType&&module,s=r&&r.exports===n?o.Z.Buffer:void 0;const a=(s?s.isBuffer:void 0)||function(){return!1}},3251:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(8533),n=i(7514);const r=function(e){return(0,o.Z)(e)&&1===e.nodeType&&!(0,n.Z)(e)}},576:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});var o=i(1152);const n=function(e,t){return(0,o.Z)(e,t)}},3234:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(3243),n=i(7226);const r=function(e){if(!(0,n.Z)(e))return!1;var t=(0,o.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1656:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7226:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},8533:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(e){return null!=e&&"object"==typeof e}},7514:(e,t,i)=>{"use strict";i.d(t,{Z:()=>u});var o=i(3243),n=i(2513),r=i(8533),s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,d=l.call(Object);const u=function(e){if(!(0,r.Z)(e)||"[object Object]"!=(0,o.Z)(e))return!1;var t=(0,n.Z)(e);if(null===t)return!0;var i=c.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&l.call(i)==d}},2714:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(3243),n=i(8533);const r=function(e){return"symbol"==typeof e||(0,n.Z)(e)&&"[object Symbol]"==(0,o.Z)(e)}},7212:(e,t,i)=>{"use strict";i.d(t,{Z:()=>d});var o=i(3243),n=i(1656),r=i(8533),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var a=i(1162),l=i(8351),c=l.Z&&l.Z.isTypedArray;const d=c?(0,a.Z)(c):function(e){return(0,r.Z)(e)&&(0,n.Z)(e.length)&&!!s[(0,o.Z)(e)]}},703:(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var o=i(9001),n=i(2764);const r=(0,i(1851).Z)(Object.keys,Object);var s=Object.prototype.hasOwnProperty;var a=i(585);const l=function(e){return(0,a.Z)(e)?(0,o.Z)(e):function(e){if(!(0,n.Z)(e))return r(e);var t=[];for(var i in Object(e))s.call(e,i)&&"constructor"!=i&&t.push(i);return t}(e)}},7590:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var o=i(9001),n=i(7226),r=i(2764);var s=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,n.Z)(e))return function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t}(e);var t=(0,r.Z)(e),i=[];for(var o in e)("constructor"!=o||!t&&s.call(e,o))&&i.push(o);return i};var l=i(585);const c=function(e){return(0,l.Z)(e)?(0,o.Z)(e,!0):a(e)}},532:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});const o=function(){return[]}},111:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var o=i(6682),n=i(7226);const r=function(e,t,i){var r=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return(0,n.Z)(i)&&(r="leading"in i?!!i.leading:r,s="trailing"in i?!!i.trailing:s),(0,o.Z)(e,t,{leading:r,maxWait:t,trailing:s})}},9939:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var o=i(7685);var n=i(7771),r=i(2714),s=o.Z?o.Z.prototype:void 0,a=s?s.toString:void 0;const l=function e(t){if("string"==typeof t)return t;if((0,n.Z)(t))return function(e,t){for(var i=-1,o=null==e?0:e.length,n=Array(o);++i{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.b=document.baseURI||self.location.href;var o=i(366);CKEditor5=o})(); \ No newline at end of file