{"version":3,"file":"ckeditor.js","sources":["webpack://ClassicEditor/ckeditor.js"],"sourcesContent":["/*!\n * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n(function(e){e[\"en\"]=Object.assign(e[\"en\"]||{},{a:\"Image toolbar\",b:\"Media toolbar\",c:\"Table toolbar\",d:\"Dollar sign\",e:\"Euro sign\",f:\"Yen sign\",g:\"Pound sign\",h:\"Cent sign\",i:\"Euro-currency sign\",j:\"Colon sign\",k:\"Cruzeiro sign\",l:\"French franc sign\",m:\"Lira sign\",n:\"Currency sign\",o:\"Bitcoin sign\",p:\"Mill sign\",q:\"Naira sign\",r:\"Peseta sign\",s:\"Rupee sign\",t:\"Won sign\",u:\"New sheqel sign\",v:\"Dong sign\",w:\"Kip sign\",x:\"Tugrik sign\",y:\"Drachma sign\",z:\"German penny sign\",aa:\"Peso sign\",ab:\"Guarani sign\",ac:\"Austral sign\",ad:\"Hryvnia sign\",ae:\"Cedi sign\",af:\"Livre tournois sign\",ag:\"Spesmilo sign\",ah:\"Tenge sign\",ai:\"Indian rupee sign\",aj:\"Turkish lira sign\",ak:\"Nordic mark sign\",al:\"Manat sign\",am:\"Ruble sign\",an:\"Special characters\",ao:\"leftwards double arrow\",ap:\"rightwards double arrow\",aq:\"upwards double arrow\",ar:\"downwards double arrow\",as:\"leftwards dashed arrow\",at:\"rightwards dashed arrow\",au:\"upwards dashed arrow\",av:\"downwards dashed arrow\",aw:\"leftwards arrow to bar\",ax:\"rightwards arrow to bar\",ay:\"upwards arrow to bar\",az:\"downwards arrow to bar\",ba:\"up down arrow with base\",bb:\"back with leftwards arrow above\",bc:\"end with leftwards arrow above\",bd:\"on with exclamation mark with left right arrow above\",be:\"soon with rightwards arrow above\",bf:\"top with upwards arrow above\",bg:\"Block quote\",bh:\"Choose heading\",bi:\"Heading\",bj:\"Increase indent\",bk:\"Decrease indent\",bl:\"Link\",bm:\"Numbered List\",bn:\"Bulleted List\",bo:\"media widget\",bp:\"Insert media\",bq:\"The URL must not be empty.\",br:\"This media URL is not supported.\",bs:\"Bold\",bt:\"Italic\",bu:\"Underline\",bv:\"Code\",bw:\"image widget\",bx:\"Enter image caption\",by:\"Full size image\",bz:\"Side image\",ca:\"Left aligned image\",cb:\"Centered image\",cc:\"Right aligned image\",cd:\"Insert image\",ce:\"Upload failed\",cf:\"Widget toolbar\",cg:\"Table properties\",ch:\"Cell properties\",ci:\"Horizontal line\",cj:\"Disable editing\",ck:\"Enable editing\",cl:\"Remove Format\",cm:\"Yellow marker\",cn:\"Green marker\",co:\"Pink marker\",cp:\"Blue marker\",cq:\"Red pen\",cr:\"Green pen\",cs:\"Remove highlight\",ct:\"Highlight\",cu:\"Text highlight toolbar\",cv:\"Upload in progress\",cw:\"Character categories\",cx:\"Font Family\",cy:\"Default\",cz:\"Font Size\",da:\"Tiny\",db:\"Small\",dc:\"Big\",dd:\"Huge\",de:\"Font Color\",df:\"Font Background Color\",dg:\"Change image text alternative\",dh:\"Dropdown toolbar\",di:\"Rich Text Editor\",dj:\"Black\",dk:\"Dim grey\",dl:\"Grey\",dm:\"Light grey\",dn:\"White\",do:\"Red\",dp:\"Orange\",dq:\"Yellow\",dr:\"Light green\",ds:\"Green\",dt:\"Aquamarine\",du:\"Turquoise\",dv:\"Light blue\",dw:\"Blue\",dx:\"Purple\",dy:\"Remove color\",dz:\"Document colors\",ea:\"Save\",eb:\"Cancel\",ec:\"Text alternative\",ed:\"Undo\",ee:\"Redo\",ef:\"%0 of %1\",eg:\"Previous\",eh:\"Next\",ei:\"Editor toolbar\",ej:\"Show more items\",ek:\"None\",el:\"Solid\",em:\"Dotted\",en:\"Dashed\",eo:\"Double\",ep:\"Groove\",eq:\"Ridge\",er:\"Inset\",es:\"Outset\",et:'The color is invalid. Try \"#FF0000\" or \"rgb(255,0,0)\" or \"red\".',eu:'The value is invalid. Try \"10px\" or \"2em\" or simply \"2\".',ev:\"Border\",ew:\"Style\",ex:\"Width\",ey:\"Color\",ez:\"Background\",fa:\"Dimensions\",fb:\"Height\",fc:\"Padding\",fd:\"Table cell text alignment\",fe:\"Horizontal text alignment toolbar\",ff:\"Vertical text alignment toolbar\",fg:\"Align cell text to the left\",fh:\"Align cell text to the center\",fi:\"Align cell text to the right\",fj:\"Justify cell text\",fk:\"Align cell text to the top\",fl:\"Align cell text to the middle\",fm:\"Align cell text to the bottom\",fn:\"Alignment\",fo:\"Table alignment toolbar\",fp:\"Align table to the left\",fq:\"Center table\",fr:\"Align table to the right\",fs:\"Paste the media URL in the input.\",ft:\"Tip: Paste the URL into the content to embed faster.\",fu:\"Media URL\",fv:\"Open in a new tab\",fw:\"Downloadable\",fx:\"Unlink\",fy:\"Edit link\",fz:\"Open link in new tab\",ga:\"This link has no URL\",gb:\"Link URL\",gc:\"Paragraph\",gd:\"Heading 1\",ge:\"Heading 2\",gf:\"Heading 3\",gg:\"Heading 4\",gh:\"Heading 5\",gi:\"Heading 6\",gj:\"Rich Text Editor, %0\",gk:\"Insert code block\",gl:\"Align left\",gm:\"Align right\",gn:\"Align center\",go:\"Justify\",gp:\"Text alignment\",gq:\"Text alignment toolbar\",gr:\"Insert table\",gs:\"Header column\",gt:\"Insert column left\",gu:\"Insert column right\",gv:\"Delete column\",gw:\"Column\",gx:\"Header row\",gy:\"Insert row below\",gz:\"Insert row above\",ha:\"Delete row\",hb:\"Row\",hc:\"Merge cell up\",hd:\"Merge cell right\",he:\"Merge cell down\",hf:\"Merge cell left\",hg:\"Split cell vertically\",hh:\"Split cell horizontally\",hi:\"Merge cells\",hj:\"Plain text\"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));(function e(t,i){if(typeof exports===\"object\"&&typeof module===\"object\")module.exports=i();else if(typeof define===\"function\"&&define.amd)define([],i);else if(typeof exports===\"object\")exports[\"ClassicEditor\"]=i();else t[\"ClassicEditor\"]=i()})(window,(function(){return function(e){var t={};function i(n){if(t[n]){return t[n].exports}var o=t[n]={i:n,l:false,exports:{}};e[n].call(o.exports,o,o.exports,i);o.l=true;return o.exports}i.m=e;i.c=t;i.d=function(e,t,n){if(!i.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:n})}};i.r=function(e){if(typeof Symbol!==\"undefined\"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"})}Object.defineProperty(e,\"__esModule\",{value:true})};i.t=function(e,t){if(t&1)e=i(e);if(t&8)return e;if(t&4&&typeof e===\"object\"&&e&&e.__esModule)return e;var n=Object.create(null);i.r(n);Object.defineProperty(n,\"default\",{enumerable:true,value:e});if(t&2&&typeof e!=\"string\")for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n};i.n=function(e){var t=e&&e.__esModule?function t(){return e[\"default\"]}:function t(){return e};i.d(t,\"a\",t);return t};i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};i.p=\"\";return i(i.s=140)}([function(e,t,i){\"use strict\";i.d(t,\"b\",(function(){return o}));i.d(t,\"a\",(function(){return r}));const n=\"https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html\";class o extends Error{constructor(e,t,i){e=r(e);if(i){e+=\" \"+JSON.stringify(i)}super(e);this.name=\"CKEditorError\";this.context=t;this.data=i}is(e){return e===\"CKEditorError\"}static rethrowUnexpectedError(e,t){if(e.is&&e.is(\"CKEditorError\")){throw e}const i=new o(e.message,t);i.stack=e.stack;throw i}}function r(e){const t=e.match(/^([^:]+):/);if(!t){return e}return e+` Read more: ${n}#error-${t[1]}\\n`}},function(e,t,i){\"use strict\";var n=function e(){var t;return function e(){if(typeof t===\"undefined\"){t=Boolean(window&&document&&document.all&&!window.atob)}return t}}();var o=function e(){var t={};return function e(i){if(typeof t[i]===\"undefined\"){var n=document.querySelector(i);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement){try{n=n.contentDocument.head}catch(e){n=null}}t[i]=n}return t[i]}}();var r=[];function s(e){var t=-1;for(var i=0;i
\";else if(typeof console!=\"undefined\"&&console.log!=null)console.log(i)};js.Boot.__clear_trace=function(){var e=document.getElementById(\"haxe:trace\");if(e!=null)e.innerHTML=\"\"};js.Boot.isClass=function(e){return e.__name__};js.Boot.isEnum=function(e){return e.__ename__};js.Boot.getClass=function(e){return e.__class__};js.Boot.__string_rec=function(e,t){if(e==null)return\"null\";if(t.length>=5)return\"<...>\";var i=typeof e;if(i==\"function\"&&(e.__name__||e.__ename__))i=\"object\";switch(i){case\"object\":if(e instanceof Array){if(e.__enum__){if(e.length==2)return e[0];var n=e[0]+\"(\";t+=\"\\t\";var o=2,r=e.length;while(o
\";else if(typeof console!=\"undefined\"&&console.log!=null)console.log(i)};js.Boot.__clear_trace=function(){var e=document.getElementById(\"haxe:trace\");if(e!=null)e.innerHTML=\"\"};js.Boot.isClass=function(e){return e.__name__};js.Boot.isEnum=function(e){return e.__ename__};js.Boot.getClass=function(e){return e.__class__};js.Boot.__string_rec=function(e,t){if(e==null)return\"null\";if(t.length>=5)return\"<...>\";var i=typeof e;if(i==\"function\"&&(e.__name__||e.__ename__))i=\"object\";switch(i){case\"object\":if(e instanceof Array){if(e.__enum__){if(e.length==2)return e[0];var n=e[0]+\"(\";t+=\"\\t\";var o=2,r=e.length;while(o
\").replace(/^\\s/,\" \").replace(/\\s$/,\" \").replace(/\\s\\s/g,\" \");if(e.indexOf(\"
\")>-1){e=`
${e}
`}return e}function ty(e){return e.replace(/(\\s+)<\\/span>/g,(e,t)=>{if(t.length==1){return\" \"}return t})}const iy=[\"figcaption\",\"li\"];function ny(e){let t=\"\";if(e.is(\"text\")||e.is(\"textProxy\")){t=e.data}else if(e.is(\"img\")&&e.hasAttribute(\"alt\")){t=e.getAttribute(\"alt\")}else{let i=null;for(const n of e.getChildren()){const e=ny(n);if(i&&(i.is(\"containerElement\")||n.is(\"containerElement\"))){if(iy.includes(i.name)||iy.includes(n.name)){t+=\"\\n\"}else{t+=\"\\n\\n\"}}t+=e;i=n}}return t}class oy extends Nw{static get pluginName(){return\"Clipboard\"}init(){const e=this.editor;const t=e.model.document;const i=e.editing.view;const n=i.document;this._htmlDataProcessor=new vp(n);i.addObserver(Kk);this.listenTo(n,\"clipboardInput\",t=>{if(e.isReadOnly){t.stop()}},{priority:\"highest\"});this.listenTo(n,\"clipboardInput\",(e,t)=>{const n=t.dataTransfer;let o=\"\";if(n.getData(\"text/html\")){o=ty(n.getData(\"text/html\"))}else if(n.getData(\"text/plain\")){o=ey(n.getData(\"text/plain\"))}o=this._htmlDataProcessor.toView(o);this.fire(\"inputTransformation\",{content:o,dataTransfer:n});i.scrollToTheSelection()},{priority:\"low\"});this.listenTo(this,\"inputTransformation\",(e,t)=>{if(!t.content.isEmpty){const e=this.editor.data;const i=this.editor.model;const n=e.toModel(t.content,\"$clipboardHolder\");if(n.childCount==0){return}i.insertContent(n)}},{priority:\"low\"});function o(i,o){const r=o.dataTransfer;o.preventDefault();const s=e.data.toView(e.model.getSelectedContent(t.selection));n.fire(\"clipboardOutput\",{dataTransfer:r,content:s,method:i.name})}this.listenTo(n,\"copy\",o,{priority:\"low\"});this.listenTo(n,\"cut\",(t,i)=>{if(e.isReadOnly){i.preventDefault()}else{o(t,i)}},{priority:\"low\"});this.listenTo(n,\"clipboardOutput\",(i,n)=>{if(!n.content.isEmpty){n.dataTransfer.setData(\"text/html\",this._htmlDataProcessor.toData(n.content));n.dataTransfer.setData(\"text/plain\",ny(n.content))}if(n.method==\"cut\"){e.model.deleteContent(t.selection)}},{priority:\"low\"})}}class ry{constructor(e){this.document=e}createDocumentFragment(e){return new Ul(this.document,e)}createElement(e,t,i){return new jc(this.document,e,t,i)}createText(e){return new Ds(this.document,e)}clone(e,t=false){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;if(t){return this.removeChildren(t.getChildIndex(e),1,t)}return[]}replace(e,t){const i=e.parent;if(i){const n=i.getChildIndex(e);this.removeChildren(n,1,i);this.insertChild(n,t,i);return true}return false}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 jc(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){if(L(e)&&i===undefined){i=t}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 dl._createAt(e,t)}createPositionAfter(e){return dl._createAfter(e)}createPositionBefore(e){return dl._createBefore(e)}createRange(e,t){return new ul(e,t)}createRangeOn(e){return ul._createOn(e)}createRangeIn(e){return ul._createIn(e)}createSelection(e,t,i){return new ml(e,t,i)}}class sy extends zw{refresh(){this.isEnabled=D_(this.editor.model)}execute(e){const t=this.editor;const i=t.model;const n=t.plugins.get(Sk);i.change(t=>{const o=Array.isArray(e.file)?e.file:[e.file];for(const e of o){ay(t,i,n,e)}})}}function ay(e,t,i,n){const o=i.createLoader(n);if(!o){return}j_(e,t,{uploadId:o.id})}class cy extends Nw{static get requires(){return[Sk,Jk,oy]}static get pluginName(){return\"ImageUploadEditing\"}constructor(e){super(e);e.config.define(\"image\",{upload:{types:[\"jpeg\",\"png\",\"gif\",\"bmp\",\"webp\",\"tiff\"]}})}init(){const e=this.editor;const t=e.model.document;const i=e.model.schema;const n=e.conversion;const o=e.plugins.get(Sk);const r=kk(e.config.get(\"image.upload.types\"));i.extend(\"image\",{allowAttributes:[\"uploadId\",\"uploadStatus\"]});e.commands.add(\"imageUpload\",new sy(e));n.for(\"upcast\").attributeToAttribute({view:{name:\"img\",key:\"uploadId\"},model:\"uploadId\"});this.listenTo(e.editing.view.document,\"clipboardInput\",(t,i)=>{if(ly(i.dataTransfer)){return}const n=Array.from(i.dataTransfer.files).filter(e=>{if(!e){return false}return r.test(e.type)});const o=i.targetRanges.map(t=>e.editing.mapper.toModelRange(t));e.model.change(i=>{i.setSelection(o);if(n.length){t.stop();e.model.enqueueChange(\"default\",()=>{e.execute(\"imageUpload\",{file:n})})}})});this.listenTo(e.plugins.get(oy),\"inputTransformation\",(t,i)=>{const n=Array.from(e.editing.view.createRangeIn(i.content)).filter(e=>xk(e.item)&&!e.item.getAttribute(\"uploadProcessed\")).map(e=>({promise:yk(e.item),imageElement:e.item}));if(!n.length){return}const r=new ry(e.editing.view.document);for(const e of n){r.setAttribute(\"uploadProcessed\",true,e.imageElement);const t=o.createLoader(e.promise);if(t){r.setAttribute(\"src\",\"\",e.imageElement);r.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:true});for(const t of i){if(t.type==\"insert\"&&t.name!=\"$text\"){const i=t.position.nodeAfter;const n=t.position.root.rootName==\"$graveyard\";for(const t of dy(e,i)){const e=t.getAttribute(\"uploadId\");if(!e){continue}const i=o.loaders.get(e);if(!i){continue}if(n){i.abort()}else if(i.status==\"idle\"){this._readAndUpload(i,t)}}}}})}_readAndUpload(e,t){const i=this.editor;const n=i.model;const o=i.locale.t;const r=i.plugins.get(Sk);const s=i.plugins.get(Jk);n.enqueueChange(\"transparent\",e=>{e.setAttribute(\"uploadStatus\",\"reading\",t)});return e.read().then(()=>{const o=e.upload();if(Cl.isSafari){const e=i.editing.mapper.toViewElement(t);const n=B_(e);i.editing.view.once(\"render\",()=>{if(!n.parent){return}const e=i.editing.view.domConverter.mapViewToDom(n.parent);if(!e){return}const t=e.style.display;e.style.display=\"none\";e._ckHack=e.offsetHeight;e.style.display=t})}n.enqueueChange(\"transparent\",e=>{e.setAttribute(\"uploadStatus\",\"uploading\",t)});return o}).then(e=>{n.enqueueChange(\"transparent\",i=>{i.setAttributes({uploadStatus:\"complete\",src:e.default},t);this._parseAndSetSrcsetAttributeOnImage(e,t,i)});a()}).catch(i=>{if(e.status!==\"error\"&&e.status!==\"aborted\"){throw i}if(e.status==\"error\"&&i){s.showWarning(i,{title:o(\"ce\"),namespace:\"upload\"})}a();n.enqueueChange(\"transparent\",e=>{e.remove(t)})});function a(){n.enqueueChange(\"transparent\",e=>{e.removeAttribute(\"uploadId\",t);e.removeAttribute(\"uploadStatus\",t)});r.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,i){let n=0;const o=Object.keys(e).filter(e=>{const t=parseInt(e,10);if(!isNaN(t)){n=Math.max(n,t);return true}}).map(t=>`${e[t]} ${t}w`).join(\", \");if(o!=\"\"){i.setAttribute(\"srcset\",{data:o,width:n},t)}}}function ly(e){return Array.from(e.types).includes(\"text/html\")&&e.getData(\"text/html\")!==\"\"}function dy(e,t){return Array.from(e.model.createRangeOn(t)).filter(e=>e.item.is(\"image\")).map(e=>e.item)}class uy extends Nw{static get pluginName(){return\"ImageUpload\"}static get requires(){return[cy,Tk,zk]}}class hy extends zw{constructor(e){super(e);this._childCommands=[]}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();t.execute(e)}registerChildCommand(e){this._childCommands.push(e);e.on(\"change:isEnabled\",()=>this._checkEnabled());this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){return this._childCommands.find(e=>e.isEnabled)}}class fy extends Nw{static get pluginName(){return\"IndentEditing\"}init(){const e=this.editor;e.commands.add(\"indent\",new hy(e));e.commands.add(\"outdent\",new hy(e))}}var my='';var gy='';class py extends Nw{static get pluginName(){return\"IndentUI\"}init(){const e=this.editor;const t=e.locale;const i=e.t;const n=t.uiLanguageDirection==\"ltr\"?my:gy;const o=t.uiLanguageDirection==\"ltr\"?gy:my;this._defineButton(\"indent\",i(\"bj\"),n);this._defineButton(\"outdent\",i(\"bk\"),o)}_defineButton(e,t,i){const n=this.editor;n.ui.componentFactory.add(e,o=>{const r=n.commands.get(e);const s=new Kb(o);s.set({label:t,icon:i,tooltip:true});s.bind(\"isOn\",\"isEnabled\").to(r,\"value\",\"isEnabled\");this.listenTo(s,\"execute\",()=>{n.execute(e);n.editing.view.focus()});return s})}}class by extends Nw{static get pluginName(){return\"Indent\"}static get requires(){return[fy,py]}}const wy=\"italic\";class _y extends Nw{static get pluginName(){return\"ItalicEditing\"}init(){const e=this.editor;e.model.schema.extend(\"$text\",{allowAttributes:wy});e.model.schema.setAttributeProperties(wy,{isFormatting:true,copyOnEnter:true});e.conversion.attributeToElement({model:wy,view:\"i\",upcastAlso:[\"em\",{styles:{\"font-style\":\"italic\"}}]});e.commands.add(wy,new Gw(e,wy));e.keystrokes.set(\"CTRL+I\",wy)}}var vy='';const ky=\"italic\";class yy extends Nw{init(){const e=this.editor;const t=e.t;e.ui.componentFactory.add(ky,i=>{const n=e.commands.get(ky);const o=new Kb(i);o.set({label:t(\"bt\"),icon:vy,keystroke:\"CTRL+I\",tooltip:true,isToggleable:true});o.bind(\"isOn\",\"isEnabled\").to(n,\"value\",\"isEnabled\");this.listenTo(o,\"execute\",()=>{e.execute(ky);e.editing.view.focus()});return o})}}class xy extends Nw{static get requires(){return[_y,yy]}static get pluginName(){return\"Italic\"}}function Ay(e,t,i){return i.createRange(Cy(e,t,true,i),Cy(e,t,false,i))}function Cy(e,t,i,n){let o=e.textNode||(i?e.nodeBefore:e.nodeAfter);let r=null;while(o&&o.getAttribute(\"linkHref\")==t){r=o;o=i?o.previousSibling:o.nextSibling}return r?n.createPositionAt(r,i?\"before\":\"after\"):e}class Ty extends zw{constructor(e){super(e);this.manualDecorators=new ys}restoreManualDecoratorStates(){for(const e of this.manualDecorators){e.value=this._getDecoratorStateFromModel(e.id)}}refresh(){const e=this.editor.model;const t=e.document;this.value=t.selection.getAttribute(\"linkHref\");for(const e of this.manualDecorators){e.value=this._getDecoratorStateFromModel(e.id)}this.isEnabled=e.schema.checkAttributeInSelection(t.selection,\"linkHref\")}execute(e,t={}){const i=this.editor.model;const n=i.document.selection;const o=[];const r=[];for(const e in t){if(t[e]){o.push(e)}else{r.push(e)}}i.change(t=>{if(n.isCollapsed){const s=n.getFirstPosition();if(n.hasAttribute(\"linkHref\")){const a=Ay(s,n.getAttribute(\"linkHref\"),i);t.setAttribute(\"linkHref\",e,a);o.forEach(e=>{t.setAttribute(e,true,a)});r.forEach(e=>{t.removeAttribute(e,a)});t.setSelection(a)}else if(e!==\"\"){const r=Hs(n.getAttributes());r.set(\"linkHref\",e);o.forEach(e=>{r.set(e,true)});const a=t.createText(e,r);i.insertContent(a,s);t.setSelection(t.createRangeOn(a))}}else{const s=i.schema.getValidRanges(n.getRanges(),\"linkHref\");for(const i of s){t.setAttribute(\"linkHref\",e,i);o.forEach(e=>{t.setAttribute(e,true,i)});r.forEach(e=>{t.removeAttribute(e,i)})}}})}_getDecoratorStateFromModel(e){const t=this.editor.model.document;return t.selection.getAttribute(e)||false}}class Ey extends zw{refresh(){this.isEnabled=this.editor.model.document.selection.hasAttribute(\"linkHref\")}execute(){const e=this.editor;const t=this.editor.model;const i=t.document.selection;const n=e.commands.get(\"link\");t.change(e=>{const o=i.isCollapsed?[Ay(i.getFirstPosition(),i.getAttribute(\"linkHref\"),t)]:i.getRanges();for(const t of o){e.removeAttribute(\"linkHref\",t);if(n){for(const i of n.manualDecorators){e.removeAttribute(i.id,t)}}}})}}function My(e,t,i){var n=e.length;i=i===undefined?n:i;return!t&&i>=n?e:Ia(e,t,i)}var Py=My;var Sy=\"\\\\ud800-\\\\udfff\",Iy=\"\\\\u0300-\\\\u036f\",Ny=\"\\\\ufe20-\\\\ufe2f\",Oy=\"\\\\u20d0-\\\\u20ff\",Ly=Iy+Ny+Oy,Ry=\"\\\\ufe0e\\\\ufe0f\";var zy=\"\\\\u200d\";var jy=RegExp(\"[\"+zy+Sy+Ly+Ry+\"]\");function Dy(e){return jy.test(e)}var By=Dy;function Vy(e){return e.split(\"\")}var Fy=Vy;var Hy=\"\\\\ud800-\\\\udfff\",Wy=\"\\\\u0300-\\\\u036f\",Uy=\"\\\\ufe20-\\\\ufe2f\",$y=\"\\\\u20d0-\\\\u20ff\",qy=Wy+Uy+$y,Yy=\"\\\\ufe0e\\\\ufe0f\";var Gy=\"[\"+Hy+\"]\",Jy=\"[\"+qy+\"]\",Xy=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",Qy=\"(?:\"+Jy+\"|\"+Xy+\")\",Ky=\"[^\"+Hy+\"]\",Zy=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",ex=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",tx=\"\\\\u200d\";var ix=Qy+\"?\",nx=\"[\"+Yy+\"]?\",ox=\"(?:\"+tx+\"(?:\"+[Ky,Zy,ex].join(\"|\")+\")\"+nx+ix+\")*\",rx=nx+ix+ox,sx=\"(?:\"+[Ky+Jy+\"?\",Jy,Zy,ex,Gy].join(\"|\")+\")\";var ax=RegExp(Xy+\"(?=\"+Xy+\")|\"+sx+rx,\"g\");function cx(e){return e.match(ax)||[]}var lx=cx;function dx(e){return By(e)?lx(e):Fy(e)}var ux=dx;function hx(e){return function(t){t=va(t);var i=By(t)?ux(t):undefined;var n=i?i[0]:t.charAt(0);var o=i?Py(i,1).join(\"\"):t.slice(1);return n[e]()+o}}var fx=hx;var mx=fx(\"toUpperCase\");var gx=mx;const px=/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205f\\u3000]/g;const bx=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function wx(e){return e.is(\"attributeElement\")&&!!e.getCustomProperty(\"link\")}function _x(e,t){const i=t.createAttributeElement(\"a\",{href:e},{priority:5});t.setCustomProperty(\"link\",true,i);return i}function vx(e){e=String(e);return kx(e)?e:\"#\"}function kx(e){const t=e.replace(px,\"\");return t.match(bx)}function yx(e,t){const i={\"Open in a new tab\":e(\"fv\"),Downloadable:e(\"fw\")};t.forEach(e=>{if(e.label&&i[e.label]){e.label=i[e.label]}return e});return t}function xx(e){const t=[];if(e){for(const[i,n]of Object.entries(e)){const e=Object.assign({},n,{id:`link${gx(i)}`});t.push(e)}}return t}class Ax{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){if(Array.isArray(e)){e.forEach(e=>this._definitions.add(e))}else{this._definitions.add(e)}}getDispatcher(){return e=>{e.on(\"attribute:linkHref\",(e,t,i)=>{if(!i.consumable.test(t.item,\"attribute:linkHref\")){return}const n=i.writer;const o=n.document.selection;for(const e of this._definitions){const r=n.createAttributeElement(\"a\",e.attributes,{priority:5});n.setCustomProperty(\"link\",true,r);if(e.callback(t.attributeNewValue)){if(t.item.is(\"selection\")){n.wrap(o.getFirstRange(),r)}else{n.wrap(i.mapper.toViewRange(t.range),r)}}else{n.unwrap(i.mapper.toViewRange(t.range),r)}}},{priority:\"high\"})}}}class Cx{constructor({id:e,label:t,attributes:i}){this.id=e;this.set(\"value\");this.label=t;this.attributes=i}}ks(Cx,Jc);function Tx({view:e,model:t,emitter:i,attribute:n,locale:o}){const r=new Ex(t,i,n);const s=t.document.selection;i.listenTo(e.document,\"keydown\",(e,t)=>{if(!s.isCollapsed){return}if(t.shiftKey||t.altKey||t.ctrlKey){return}const i=t.keyCode==Ll.arrowright;const n=t.keyCode==Ll.arrowleft;if(!i&&!n){return}const a=s.getFirstPosition();const c=o.contentLanguageDirection;let l;if(c===\"ltr\"&&i||c===\"rtl\"&&n){l=r.handleForwardMovement(a,t)}else{l=r.handleBackwardMovement(a,t)}if(l){e.stop()}},{priority:os.get(\"high\")+1})}class Ex{constructor(e,t,i){this.model=e;this.attribute=i;this._modelSelection=e.document.selection;this._overrideUid=null;this._isNextGravityRestorationSkipped=false;t.listenTo(this._modelSelection,\"change:range\",(e,t)=>{if(this._isNextGravityRestorationSkipped){this._isNextGravityRestorationSkipped=false;return}if(!this._isGravityOverridden){return}if(!t.directChange&&Mx(this._modelSelection.getFirstPosition(),i)){return}this._restoreGravity()})}handleForwardMovement(e,t){const i=this.attribute;if(this._isGravityOverridden){return}if(e.isAtStart&&this._hasSelectionAttribute){return}if(Ix(e,i)&&this._hasSelectionAttribute){this._preventCaretMovement(t);this._removeSelectionAttribute();return true}if(Px(e,i)){this._preventCaretMovement(t);this._overrideGravity();return true}if(Sx(e,i)&&this._hasSelectionAttribute){this._preventCaretMovement(t);this._overrideGravity();return true}}handleBackwardMovement(e,t){const i=this.attribute;if(this._isGravityOverridden){if(Ix(e,i)&&this._hasSelectionAttribute){this._preventCaretMovement(t);this._restoreGravity();this._removeSelectionAttribute();return true}else{this._preventCaretMovement(t);this._restoreGravity();if(e.isAtStart){this._removeSelectionAttribute()}return true}}else{if(Ix(e,i)&&!this._hasSelectionAttribute){this._preventCaretMovement(t);this._setSelectionAttributeFromTheNodeBefore(e);return true}if(e.isAtEnd&&Sx(e,i)){if(this._hasSelectionAttribute){if(Nx(e,i)){this._skipNextAutomaticGravityRestoration();this._overrideGravity()}return}else{this._preventCaretMovement(t);this._setSelectionAttributeFromTheNodeBefore(e);return true}}if(e.isAtStart){if(this._hasSelectionAttribute){this._removeSelectionAttribute();this._preventCaretMovement(t);return true}return}if(Nx(e,i)){this._skipNextAutomaticGravityRestoration();this._overrideGravity()}}}get _isGravityOverridden(){return!!this._overrideUid}get _hasSelectionAttribute(){return this._modelSelection.hasAttribute(this.attribute)}_overrideGravity(){this._overrideUid=this.model.change(e=>e.overrideSelectionGravity())}_restoreGravity(){this.model.change(e=>{e.restoreSelectionGravity(this._overrideUid);this._overrideUid=null})}_preventCaretMovement(e){e.preventDefault()}_removeSelectionAttribute(){this.model.change(e=>{e.removeSelectionAttribute(this.attribute)})}_setSelectionAttributeFromTheNodeBefore(e){const t=this.attribute;this.model.change(i=>{i.setSelectionAttribute(this.attribute,e.nodeBefore.getAttribute(t))})}_skipNextAutomaticGravityRestoration(){this._isNextGravityRestorationSkipped=true}}function Mx(e,t){return Px(e,t)||Sx(e,t)}function Px(e,t){const{nodeBefore:i,nodeAfter:n}=e;const o=i?i.hasAttribute(t):false;const r=n?n.hasAttribute(t):false;return r&&(!o||i.getAttribute(t)!==n.getAttribute(t))}function Sx(e,t){const{nodeBefore:i,nodeAfter:n}=e;const o=i?i.hasAttribute(t):false;const r=n?n.hasAttribute(t):false;return o&&(!r||i.getAttribute(t)!==n.getAttribute(t))}function Ix(e,t){const{nodeBefore:i,nodeAfter:n}=e;const o=i?i.hasAttribute(t):false;const r=n?n.hasAttribute(t):false;if(!r||!o){return}return n.getAttribute(t)!==i.getAttribute(t)}function Nx(e,t){return Mx(e.getShiftedBy(-1),t)}var Ox=i(76);const Lx=\"ck-link_selected\";const Rx=\"automatic\";const zx=\"manual\";const jx=/^(https?:)?\\/\\//;class Dx extends Nw{static get pluginName(){return\"LinkEditing\"}constructor(e){super(e);e.config.define(\"link\",{addTargetToExternalLinks:false})}init(){const e=this.editor;const t=e.locale;e.model.schema.extend(\"$text\",{allowAttributes:\"linkHref\"});e.conversion.for(\"dataDowncast\").attributeToElement({model:\"linkHref\",view:_x});e.conversion.for(\"editingDowncast\").attributeToElement({model:\"linkHref\",view:(e,t)=>_x(vx(e),t)});e.conversion.for(\"upcast\").elementToAttribute({view:{name:\"a\",attributes:{href:true}},model:{key:\"linkHref\",value:e=>e.getAttribute(\"href\")}});e.commands.add(\"link\",new Ty(e));e.commands.add(\"unlink\",new Ey(e));const i=yx(e.t,xx(e.config.get(\"link.decorators\")));this._enableAutomaticDecorators(i.filter(e=>e.mode===Rx));this._enableManualDecorators(i.filter(e=>e.mode===zx));Tx({view:e.editing.view,model:e.model,emitter:this,attribute:\"linkHref\",locale:t});this._setupLinkHighlight()}_enableAutomaticDecorators(e){const t=this.editor;const i=new Ax;if(t.config.get(\"link.addTargetToExternalLinks\")){i.add({id:\"linkIsExternal\",mode:Rx,callback:e=>jx.test(e),attributes:{target:\"_blank\",rel:\"noopener noreferrer\"}})}i.add(e);if(i.length){t.conversion.for(\"downcast\").add(i.getDispatcher())}}_enableManualDecorators(e){if(!e.length){return}const t=this.editor;const i=t.commands.get(\"link\");const n=i.manualDecorators;e.forEach(e=>{t.model.schema.extend(\"$text\",{allowAttributes:e.id});n.add(new Cx(e));t.conversion.for(\"downcast\").attributeToElement({model:e.id,view:(t,i)=>{if(t){const t=n.get(e.id).attributes;const o=i.createAttributeElement(\"a\",t,{priority:5});i.setCustomProperty(\"link\",true,o);return o}}});t.conversion.for(\"upcast\").elementToAttribute({view:{name:\"a\",attributes:n.get(e.id).attributes},model:{key:e.id}})})}_setupLinkHighlight(){const e=this.editor;const t=e.editing.view;const i=new Set;t.document.registerPostFixer(t=>{const n=e.model.document.selection;let o=false;if(n.hasAttribute(\"linkHref\")){const r=Ay(n.getFirstPosition(),n.getAttribute(\"linkHref\"),e.model);const s=e.editing.mapper.toViewRange(r);for(const e of s.getItems()){if(e.is(\"a\")&&!e.hasClass(Lx)){t.addClass(Lx,e);i.add(e);o=true}}}return o});e.conversion.for(\"editingDowncast\").add(e=>{e.on(\"insert\",n,{priority:\"highest\"});e.on(\"remove\",n,{priority:\"highest\"});e.on(\"attribute\",n,{priority:\"highest\"});e.on(\"selection\",n,{priority:\"highest\"});function n(){t.change(e=>{for(const t of i.values()){e.removeClass(Lx,t);i.delete(t)}})}})}}class Bx extends Ju{constructor(e){super(e);this.domEventType=\"click\"}onDomEvent(e){this.fire(e.type,e)}}var Vx=i(78);class Fx extends gb{constructor(e,t=[]){super(e);const i=e.t;this.focusTracker=new xp;this.keystrokes=new dp;this.urlInputView=this._createUrlInput();this.saveButtonView=this._createButton(i(\"ea\"),hv,\"ck-button-save\");this.saveButtonView.type=\"submit\";this.cancelButtonView=this._createButton(i(\"eb\"),fv,\"ck-button-cancel\",\"cancel\");this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t);this.children=this._createFormChildren(t);this._focusables=new Bp;this._focusCycler=new Nb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:\"shift + tab\",focusNext:\"tab\"}});const n=[\"ck\",\"ck-link-form\"];if(t.length){n.push(\"ck-link-form_layout-vertical\")}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;return e},{})}render(){super.render();uv({view:this});const e=[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView];e.forEach(e=>{this._focusables.add(e);this.focusTracker.add(e.element)});this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t;const t=new cv(this.locale,dv);t.label=e(\"gb\");t.inputView.placeholder=\"https://example.com\";return t}_createButton(e,t,i,n){const o=new Kb(this.locale);o.set({label:e,icon:t,tooltip:true});o.extendTemplate({attributes:{class:i}});if(n){o.delegate(\"execute\").to(this,n)}return o}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const i of e){const e=new sw(this.locale);e.set({name:i.id,label:i.label,withText:true});e.bind(\"isOn\").to(i,\"value\");e.on(\"execute\",()=>{i.set(\"value\",!e.isOn)});t.add(e)}return t}_createFormChildren(e){const t=this.createCollection();t.add(this.urlInputView);if(e.length){const e=new gb;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)}t.add(this.saveButtonView);t.add(this.cancelButtonView);return t}}var Hx='';var Wx='';var Ux=i(80);class $x extends gb{constructor(e){super(e);const t=e.t;this.focusTracker=new xp;this.keystrokes=new dp;this.previewButtonView=this._createPreviewButton();this.unlinkButtonView=this._createButton(t(\"fx\"),Hx,\"unlink\");this.editButtonView=this._createButton(t(\"fy\"),Wx,\"edit\");this.set(\"href\");this._focusables=new Bp;this._focusCycler=new Nb({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\"],tabindex:\"-1\"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();const e=[this.previewButtonView,this.editButtonView,this.unlinkButtonView];e.forEach(e=>{this._focusables.add(e);this.focusTracker.add(e.element)});this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(e,t,i){const n=new Kb(this.locale);n.set({label:e,icon:t,tooltip:true});n.delegate(\"execute\").to(this,i);return n}_createPreviewButton(){const e=new Kb(this.locale);const t=this.bindTemplate;const i=this.t;e.set({withText:true,tooltip:i(\"fz\")});e.extendTemplate({attributes:{class:[\"ck\",\"ck-link-actions__preview\"],href:t.to(\"href\",e=>e&&vx(e)),target:\"_blank\",rel:\"noopener noreferrer\"}});e.bind(\"label\").to(this,\"href\",e=>e||i(\"ga\"));e.bind(\"isEnabled\").to(this,\"href\",e=>!!e);e.template.tag=\"a\";e.template.eventListeners={};return e}}var qx='';const Yx=\"Ctrl+K\";class Gx extends Nw{static get requires(){return[Mv]}static get pluginName(){return\"LinkUI\"}init(){const e=this.editor;e.editing.view.addObserver(Bx);this.actionsView=this._createActionsView();this.formView=this._createFormView();this._balloon=e.plugins.get(Mv);this._createToolbarLinkButton();this._enableUserBalloonInteractions()}destroy(){super.destroy();this.formView.destroy()}_createActionsView(){const e=this.editor;const t=new $x(e.locale);const i=e.commands.get(\"link\");const n=e.commands.get(\"unlink\");t.bind(\"href\").to(i,\"value\");t.editButtonView.bind(\"isEnabled\").to(i);t.unlinkButtonView.bind(\"isEnabled\").to(n);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(Yx,(e,t)=>{this._addFormView();t()});return t}_createFormView(){const e=this.editor;const t=e.commands.get(\"link\");const i=new Fx(e.locale,t.manualDecorators);i.urlInputView.bind(\"value\").to(t,\"value\");i.urlInputView.bind(\"isReadOnly\").to(t,\"isEnabled\",e=>!e);i.saveButtonView.bind(\"isEnabled\").to(t);this.listenTo(i,\"submit\",()=>{e.execute(\"link\",i.urlInputView.inputView.element.value,i.getDecoratorSwitchesState());this._closeFormView()});this.listenTo(i,\"cancel\",()=>{this._closeFormView()});i.keystrokes.set(\"Esc\",(e,t)=>{this._closeFormView();t()});return i}_createToolbarLinkButton(){const e=this.editor;const t=e.commands.get(\"link\");const i=e.t;e.keystrokes.set(Yx,(e,t)=>{t();this._showUI(true)});e.ui.componentFactory.add(\"link\",e=>{const n=new Kb(e);n.isEnabled=true;n.label=i(\"bl\");n.icon=qx;n.keystroke=Yx;n.tooltip=true;n.isToggleable=true;n.bind(\"isEnabled\").to(t,\"isEnabled\");n.bind(\"isOn\").to(t,\"value\",e=>!!e);this.listenTo(n,\"execute\",()=>this._showUI(true));return n})}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,\"click\",()=>{const e=this._getSelectedLinkElement();if(e){this._showUI()}});this.editor.keystrokes.set(\"Tab\",(e,t)=>{if(this._areActionsVisible&&!this.actionsView.focusTracker.isFocused){this.actionsView.focus();t()}},{priority:\"high\"});this.editor.keystrokes.set(\"Esc\",(e,t)=>{if(this._isUIVisible){this._hideUI();t()}});aw({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){if(this._areActionsInPanel){return}this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel){return}const e=this.editor;const t=e.commands.get(\"link\");this._balloon.add({view:this.formView,position:this._getBalloonPositionData()});if(this._balloon.visibleView===this.formView){this.formView.urlInputView.select()}this.formView.urlInputView.inputView.element.value=t.value||\"\"}_closeFormView(){const e=this.editor.commands.get(\"link\");e.restoreManualDecoratorStates();if(e.value!==undefined){this._removeFormView()}else{this._hideUI()}}_removeFormView(){if(this._isFormInPanel){this.formView.saveButtonView.focus();this._balloon.remove(this.formView);this.editor.editing.view.focus()}}_showUI(e=false){if(!this._getSelectedLinkElement()){this._addActionsView();if(e){this._balloon.showStack(\"main\")}this._addFormView()}else{if(this._areActionsVisible){this._addFormView()}else{this._addActionsView()}if(e){this._balloon.showStack(\"main\")}}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)}_startUpdatingUI(){const e=this.editor;const t=e.editing.view.document;let i=this._getSelectedLinkElement();let n=r();const o=()=>{const e=this._getSelectedLinkElement();const t=r();if(i&&!e||!i&&t!==n){this._hideUI()}else if(this._isUIVisible){this._balloon.updatePosition(this._getBalloonPositionData())}i=e;n=t};function r(){return t.selection.focus.getAncestors().reverse().find(e=>e.is(\"element\"))}this.listenTo(e.ui,\"update\",o);this.listenTo(this._balloon,\"change:visibleView\",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view;const t=e.document;const i=this._getSelectedLinkElement();const n=i?e.domConverter.mapViewToDom(i):e.domConverter.viewRangeToDom(t.selection.getFirstRange());return{target:n}}_getSelectedLinkElement(){const e=this.editor.editing.view;const t=e.document.selection;if(t.isCollapsed){return Jx(t.getFirstPosition())}else{const i=t.getFirstRange().getTrimmed();const n=Jx(i.start);const o=Jx(i.end);if(!n||n!=o){return null}if(e.createRangeIn(n).getTrimmed().isEqual(i)){return n}else{return null}}}}function Jx(e){return e.getAncestors().find(e=>wx(e))}class Xx extends Nw{static get requires(){return[Dx,Gx]}static get pluginName(){return\"Link\"}}class Qx extends zw{constructor(e,t){super(e);this.type=t}refresh(){this.value=this._getValue();this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model;const t=e.document;const i=Array.from(t.selection.getSelectedBlocks()).filter(t=>Zx(t,e.schema));const n=this.value===true;e.change(e=>{if(n){let t=i[i.length-1].nextSibling;let n=Number.POSITIVE_INFINITY;let o=[];while(t&&t.name==\"listItem\"&&t.getAttribute(\"listIndent\")!==0){const e=t.getAttribute(\"listIndent\");if(e