Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-list

Package Overview
Dependencies
Maintainers
1
Versions
793
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-list - npm Package Compare versions

Comparing version 29.1.0 to 29.2.0

build/translations/ar.js

2

build/list.js

@@ -5,2 +5,2 @@ /*!

*/
window.CKEditor5=window.CKEditor5||{},window.CKEditor5.list=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=12)}([function(t,e,i){t.exports=i(3)("./src/core.js")},function(t,e,i){t.exports=i(3)("./src/utils.js")},function(t,e,i){t.exports=i(3)("./src/ui.js")},function(t,e){t.exports=CKEditor5.dll},function(t,e,i){t.exports=i(3)("./src/engine.js")},function(t,e,i){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},s=function(){var t={};return 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(t){i=null}t[e]=i}return t[e]}}(),r=[];function l(t){for(var e=-1,i=0;i<r.length;i++)if(r[i].identifier===t){e=i;break}return e}function a(t,e){for(var i={},n=[],o=0;o<t.length;o++){var s=t[o],a=e.base?s[0]+e.base:s[0],c=i[a]||0,d="".concat(a," ").concat(c);i[a]=c+1;var u=l(d),m={css:s[1],media:s[2],sourceMap:s[3]};-1!==u?(r[u].references++,r[u].updater(m)):r.push({identifier:d,updater:h(m,e),references:1}),n.push(d)}return n}function c(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])})),"function"==typeof t.insert)t.insert(e);else{var r=s(t.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(e)}return e}var d,u=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function m(t,e,i,n){var o=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(t.styleSheet)t.styleSheet.cssText=u(e,o);else{var s=document.createTextNode(o),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(s,r[e]):t.appendChild(s)}}function p(t,e,i){var n=i.css,o=i.media,s=i.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var g=null,f=0;function h(t,e){var i,n,o;if(e.singleton){var s=f++;i=g||(g=c(e)),n=m.bind(null,i,s,!1),o=m.bind(null,i,s,!0)}else i=c(e),n=p.bind(null,i,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=o());var i=a(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var n=0;n<i.length;n++){var o=l(i[n]);r[o].references--}for(var s=a(t,e),c=0;c<i.length;c++){var d=l(i[c]);0===r[d].references&&(r[d].updater(),r.splice(d,1))}i=s}}}},function(t,e,i){t.exports=i(3)("./src/enter.js")},function(t,e,i){t.exports=i(3)("./src/typing.js")},function(t,e,i){var n=i(5),o=i(9);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var s={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,s);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-list-styles-dropdown>.ck-dropdown__panel>.ck-toolbar>.ck-toolbar__items{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-dropdown>.ck-dropdown__panel>.ck-toolbar{background:none;padding:0}.ck.ck-list-styles-dropdown>.ck-dropdown__panel>.ck-toolbar>.ck-toolbar__items{grid-template-columns:repeat(3,auto);row-gap:var(--ck-spacing-medium);column-gap:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}.ck.ck-list-styles-dropdown>.ck-dropdown__panel>.ck-toolbar>.ck-toolbar__items .ck-button{width:var(--ck-list-style-button-size);height:var(--ck-list-style-button-size);padding:0;margin:0;box-sizing:content-box}.ck.ck-list-styles-dropdown>.ck-dropdown__panel>.ck-toolbar>.ck-toolbar__items .ck-button .ck-icon{width:var(--ck-list-style-button-size);height:var(--ck-list-style-button-size)}"},function(t,e,i){var n=i(5),o=i(11);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var s={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,s);t.exports=o.locals||{}},function(t,e){t.exports=':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;display:inline-block;position:relative;width:var(--ck-todo-list-checkmark-size);height:var(--ck-todo-list-checkmark-size);vertical-align:middle;border:0;left:-25px;margin-right:-15px;right:0;margin-left:0}.ck-content .todo-list .todo-list__label>input:before{display:block;position:absolute;box-sizing:border-box;content:"";width:100%;height:100%;border:1px solid #333;border-radius:2px;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out}.ck-content .todo-list .todo-list__label>input:after{display:block;position:absolute;box-sizing:content-box;pointer-events:none;content:"";left:calc(var(--ck-todo-list-checkmark-size)/3);top:calc(var(--ck-todo-list-checkmark-size)/5.3);width:calc(var(--ck-todo-list-checkmark-size)/5.3);height:calc(var(--ck-todo-list-checkmark-size)/2.6);border-left:0 solid transparent;border-bottom:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-right:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-top:0 solid transparent;transform:rotate(45deg)}.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-right:0;right:-25px;margin-left:-15px}.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)}'},function(t,e,i){"use strict";i.r(e),i.d(e,"List",(function(){return R})),i.d(e,"ListEditing",(function(){return M})),i.d(e,"ListUI",(function(){return j})),i.d(e,"ListStyle",(function(){return G})),i.d(e,"ListStyleEditing",(function(){return F})),i.d(e,"ListStyleUI",(function(){return Y})),i.d(e,"TodoList",(function(){return st})),i.d(e,"TodoListEditing",(function(){return nt})),i.d(e,"TodoListUI",(function(){return ot}));var n=i(0),o=i(1);class s extends n.Command{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document,n=Array.from(i.selection.getSelectedBlocks()).filter(t=>l(t,e.schema)),o=void 0!==t.forceValue?!t.forceValue:this.value;e.change(t=>{if(o){let e=n[n.length-1].nextSibling,i=Number.POSITIVE_INFINITY,o=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){const t=e.getAttribute("listIndent");t<i&&(i=t);const n=t-i;o.push({element:e,listIndent:n}),e=e.nextSibling}o=o.reverse();for(const e of o)t.setAttribute("listIndent",e.listIndent,e.element)}if(!o){let t=Number.POSITIVE_INFINITY;for(const e of n)e.is("element","listItem")&&e.getAttribute("listIndent")<t&&(t=e.getAttribute("listIndent"));t=0===t?1:t,r(n,!0,t),r(n,!1,t)}for(const e of n.reverse())o&&"listItem"==e.name?t.rename(e,"paragraph"):o||"listItem"==e.name?o||"listItem"!=e.name||e.getAttribute("listType")==this.type||t.setAttribute("listType",this.type,e):(t.setAttributes({listType:this.type,listIndent:0},e),t.rename(e,"listItem"));this.fire("_executeCleanup",n)})}_getValue(){const t=Object(o.first)(this.editor.model.document.selection.getSelectedBlocks());return!!t&&t.is("element","listItem")&&t.getAttribute("listType")==this.type}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,i=Object(o.first)(t.getSelectedBlocks());return!!i&&l(i,e)}}function r(t,e,i){const n=e?t[0]:t[t.length-1];if(n.is("element","listItem")){let o=n[e?"previousSibling":"nextSibling"],s=n.getAttribute("listIndent");for(;o&&o.is("element","listItem")&&o.getAttribute("listIndent")>=i;)s>o.getAttribute("listIndent")&&(s=o.getAttribute("listIndent")),o.getAttribute("listIndent")==s&&t[e?"unshift":"push"](o),o=o[e?"previousSibling":"nextSibling"]}}function l(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class a extends n.Command{constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let i=Array.from(e.selection.getSelectedBlocks());t.change(t=>{const e=i[i.length-1];let n=e.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>e.getAttribute("listIndent");)i.push(n),n=n.nextSibling;this._indentBy<0&&(i=i.reverse());for(const e of i){const i=e.getAttribute("listIndent")+this._indentBy;i<0?t.rename(e,"paragraph"):t.setAttribute("listIndent",i,e)}this.fire("_executeCleanup",i)})}_checkEnabled(){const t=Object(o.first)(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("element","listItem"))return!1;if(this._indentBy>0){const e=t.getAttribute("listIndent"),i=t.getAttribute("listType");let n=t.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=e;){if(n.getAttribute("listIndent")==e)return n.getAttribute("listType")==i;n=n.previousSibling}return!1}return!0}}var c=i(6),d=i(7),u=i(4),m=i(2);function p(t,e){const i=e.mapper,n=e.writer,o="numbered"==t.getAttribute("listType")?"ol":"ul",s=function(t){const e=t.createContainerElement("li");return e.getFillerOffset=A,e}(n),r=n.createContainerElement(o,null);return n.insert(n.createPositionAt(r,0),s),i.bindElements(t,s),s}function g(t,e,i,n){const o=e.parent,s=i.mapper,r=i.writer;let l=s.toViewPosition(n.createPositionBefore(t));const a=b(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute("listIndent")}),c=t.previousSibling;if(a&&a.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=s.toViewElement(a);l=r.breakContainer(r.createPositionAfter(t))}else if(c&&"listItem"==c.name){l=s.toViewPosition(n.createPositionAt(c,"end"));const t=s.findMappedViewAncestor(l),e=y(t);l=e?r.createPositionBefore(e):r.createPositionAt(t,"end")}else l=s.toViewPosition(n.createPositionBefore(t));if(l=h(l),r.insert(l,o),c&&"listItem"==c.name){const t=s.toViewElement(c),i=r.createRange(r.createPositionAt(t,0),l).getWalker({ignoreElementEnd:!0});for(const t of i)if(t.item.is("element","li")){const n=r.breakContainer(r.createPositionBefore(t.item)),o=t.item.parent,s=r.createPositionAt(e,"end");f(r,s.nodeBefore,s.nodeAfter),r.move(r.createRangeOn(o),s),i.position=n}}else{const i=o.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let n=null;for(const e of i.getChildren()){const i=s.toModelElement(e);if(!(i&&i.getAttribute("listIndent")>t.getAttribute("listIndent")))break;n=e}n&&(r.breakContainer(r.createPositionAfter(n)),r.move(r.createRangeOn(n.parent),r.createPositionAt(e,"end")))}}f(r,o,o.nextSibling),f(r,o.previousSibling,o)}function f(t,e,i){return!e||!i||"ul"!=e.name&&"ol"!=e.name||e.name!=i.name||e.getAttribute("class")!==i.getAttribute("class")?null:t.mergeContainers(t.createPositionAfter(e))}function h(t){return t.getLastMatchingPosition(t=>t.item.is("uiElement"))}function b(t,e){const i=!!e.sameIndent,n=!!e.smallerIndent,o=e.listIndent;let s=t;for(;s&&"listItem"==s.name;){const t=s.getAttribute("listIndent");if(i&&o==t||n&&o>t)return s;s="forward"===e.direction?s.nextSibling:s.previousSibling}return null}function v(t,e,i,n){t.ui.componentFactory.add(e,o=>{const s=t.commands.get(e),r=new m.ButtonView(o);return r.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(s,"value","isEnabled"),r.on("execute",()=>{t.execute(e),t.editing.view.focus()}),r})}function y(t){for(const e of t.getChildren())if("ul"==e.name||"ol"==e.name)return e;return null}function w(t,e){const i=[],n=t.parent,o={ignoreElementEnd:!0,startPosition:t,shallow:!0,direction:e},s=n.getAttribute("listIndent"),r=[...new u.TreeWalker(o)].filter(t=>t.item.is("element")).map(t=>t.item);for(const t of r){if(!t.is("element","listItem"))break;if(t.getAttribute("listIndent")<s)break;if(!(t.getAttribute("listIndent")>s)){if(t.getAttribute("listType")!==n.getAttribute("listType"))break;if(t.getAttribute("listStyle")!==n.getAttribute("listStyle"))break;"backward"===e?i.unshift(t):i.push(t)}}return i}function A(){const t=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||t?0:u.getFillerOffset.call(this)}function I(t){return(e,i,n)=>{const o=n.consumable;if(!o.test(i.item,"insert")||!o.test(i.item,"attribute:listType")||!o.test(i.item,"attribute:listIndent"))return;o.consume(i.item,"insert"),o.consume(i.item,"attribute:listType"),o.consume(i.item,"attribute:listIndent");const s=i.item;g(s,p(s,n),n,t)}}function k(t,e,i){if(!i.consumable.consume(e.item,"attribute:listType"))return;const n=i.mapper.toViewElement(e.item),o=i.writer;o.breakContainer(o.createPositionBefore(n)),o.breakContainer(o.createPositionAfter(n));const s=n.parent,r="numbered"==e.attributeNewValue?"ol":"ul";o.rename(r,s)}function x(t,e,i){const n=i.mapper.toViewElement(e.item).parent,o=i.writer;f(o,n,n.nextSibling),f(o,n.previousSibling,n);for(const t of e.item.getChildren())i.consumable.consume(t,"insert")}function S(t,e,i){if("listItem"!=e.item.name){let t=i.mapper.toViewPosition(e.range.start);const n=i.writer,o=[];for(;("ul"==t.parent.name||"ol"==t.parent.name)&&(t=n.breakContainer(t),"li"==t.parent.name);){const e=t,i=n.createPositionAt(t.parent,"end");if(!e.isEqual(i)){const t=n.remove(n.createRange(e,i));o.push(t)}t=n.createPositionAfter(t.parent)}if(o.length>0){for(let e=0;e<o.length;e++){const i=t.nodeBefore;if(t=n.insert(t,o[e]).end,e>0){const e=f(n,i,i.nextSibling);e&&e.parent==i&&t.offset--}}f(n,t.nodeBefore,t.nodeAfter)}}}function z(t,e,i){const n=i.mapper.toViewPosition(e.position),o=n.nodeBefore,s=n.nodeAfter;f(i.writer,o,s)}function C(t,e,i){if(i.consumable.consume(e.viewItem,{name:!0})){const t=i.writer,n=t.createElement("listItem"),o=function(t){let e=0,i=t.parent;for(;i;){if(i.is("element","li"))e++;else{const t=i.previousSibling;t&&t.is("element","li")&&e++}i=i.parent}return e}(e.viewItem);t.setAttribute("listIndent",o,n);const s=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";if(t.setAttribute("listType",s,n),!i.safeInsert(n,e.modelCursor))return;const r=function(t,e,i){const{writer:n,schema:o}=i;let s=n.createPositionAfter(t);for(const r of e)if("ul"==r.name||"ol"==r.name)s=i.convertItem(r,s).modelCursor;else{const e=i.convertItem(r,n.createPositionAt(t,"end")),l=e.modelRange.start.nodeAfter;l&&l.is("element")&&!o.checkChild(t,l.name)&&(t=e.modelCursor.parent.is("element","listItem")?e.modelCursor.parent:V(e.modelCursor),s=n.createPositionAfter(t))}return s}(n,e.viewItem.getChildren(),i);e.modelRange=t.createRange(e.modelCursor,r),i.updateConversionResult(n,e)}}function _(t,e,i){if(i.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t){!(e.is("element","li")||B(e))&&e._remove()}}}function T(t,e,i){if(i.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let i=!1,n=!0;for(const e of t)i&&!B(e)&&e._remove(),e.is("$text")?(n&&(e._data=e.data.trimStart()),e.nextSibling&&!B(e.nextSibling)||(e._data=e.data.trimEnd())):B(e)&&(i=!0),n=!1}}function L(t){return(e,i)=>{if(i.isPhantom)return;const n=i.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const e=i.mapper.toViewElement(n),o=e.getAncestors().find(B),s=t.createPositionAt(e,0).getWalker();for(const t of s){if("elementStart"==t.type&&t.item.is("element","li")){i.viewPosition=t.previousPosition;break}if("elementEnd"==t.type&&t.item==o){i.viewPosition=t.nextPosition;break}}}}}function P(t,[e,i]){let n,o=e.is("documentFragment")?e.getChild(0):e;if(n=i?this.createSelection(i):this.document.selection,o&&o.is("element","listItem")){const t=n.getFirstPosition();let e=null;if(t.parent.is("element","listItem")?e=t.parent:t.nodeBefore&&t.nodeBefore.is("element","listItem")&&(e=t.nodeBefore),e){const t=e.getAttribute("listIndent");if(t>0)for(;o&&o.is("element","listItem");)o._setAttribute("listIndent",o.getAttribute("listIndent")+t),o=o.nextSibling}}}function V(t){const e=new u.TreeWalker({startPosition:t});let i;do{i=e.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function E(t,e,i,n,o,s){const r=b(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t,foo:"b"}),l=o.mapper,a=o.writer,c=r?r.getAttribute("listIndent"):null;let d;if(r)if(c==t){const t=l.toViewElement(r).parent;d=a.createPositionAfter(t)}else{const t=s.createPositionAt(r,"end");d=l.toViewPosition(t)}else d=i;d=h(d);for(const t of[...n.getChildren()])B(t)&&(d=a.move(a.createRangeOn(t),d).end,f(a,t,t.nextSibling),f(a,t.previousSibling,t))}function B(t){return t.is("element","ol")||t.is("element","ul")}class M extends n.Plugin{static get pluginName(){return"ListEditing"}static get requires(){return[c.Enter,d.Delete]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data,i=t.editing;var n;t.model.document.registerPostFixer(e=>function(t,e){const i=t.document.differ.getChanges(),n=new Map;let o=!1;for(const n of i)if("insert"==n.type&&"listItem"==n.name)s(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const i=n.position.nodeAfter;i.hasAttribute("listIndent")&&(e.removeAttribute("listIndent",i),o=!0),i.hasAttribute("listType")&&(e.removeAttribute("listType",i),o=!0),i.hasAttribute("listStyle")&&(e.removeAttribute("listStyle",i),o=!0);for(const e of Array.from(t.createRangeIn(i)).filter(t=>t.item.is("element","listItem")))s(e.previousPosition)}s(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?s(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&s(n.range.start);for(const t of n.values())r(t),l(t);return o;function s(t){const e=t.nodeBefore;if(e&&e.is("element","listItem")){let t=e;if(n.has(t))return;for(let e=t.previousSibling;e&&e.is("element","listItem");e=t.previousSibling)if(t=e,n.has(t))return;n.set(e,t)}else{const e=t.nodeAfter;e&&e.is("element","listItem")&&n.set(e,e)}}function r(t){let i=0,n=null;for(;t&&t.is("element","listItem");){const s=t.getAttribute("listIndent");if(s>i){let r;null===n?(n=s-i,r=i):(n>s&&(n=s),r=s-n),e.setAttribute("listIndent",r,t),o=!0}else n=null,i=t.getAttribute("listIndent")+1;t=t.nextSibling}}function l(t){let i=[],n=null;for(;t&&t.is("element","listItem");){const s=t.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>s&&(i=i.slice(0,s+1)),0!=s)if(i[s]){const n=i[s];t.getAttribute("listType")!=n&&(e.setAttribute("listType",n,t),o=!0)}else i[s]=t.getAttribute("listType");n=t,t=t.nextSibling}}}(t.model,e)),i.mapper.registerViewToModelLength("li",H),e.mapper.registerViewToModelLength("li",H),i.mapper.on("modelToViewPosition",L(i.view)),i.mapper.on("viewToModelPosition",(n=t.model,(t,e)=>{const i=e.viewPosition,o=i.parent,s=e.mapper;if("ul"==o.name||"ol"==o.name){if(i.isAtEnd){const t=s.toModelElement(i.nodeBefore),o=s.getModelLength(i.nodeBefore);e.modelPosition=n.createPositionBefore(t).getShiftedBy(o)}else{const t=s.toModelElement(i.nodeAfter);e.modelPosition=n.createPositionBefore(t)}t.stop()}else if("li"==o.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const r=s.toModelElement(o);let l=1,a=i.nodeBefore;for(;a&&B(a);)l+=s.getModelLength(a),a=a.previousSibling;e.modelPosition=n.createPositionBefore(r).getShiftedBy(l),t.stop()}})),e.mapper.on("modelToViewPosition",L(i.view)),t.conversion.for("editingDowncast").add(e=>{e.on("insert",S,{priority:"high"}),e.on("insert:listItem",I(t.model)),e.on("attribute:listType:listItem",k,{priority:"high"}),e.on("attribute:listType:listItem",x,{priority:"low"}),e.on("attribute:listIndent:listItem",function(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,"attribute:listIndent"))return;const o=n.mapper.toViewElement(i.item),s=n.writer;s.breakContainer(s.createPositionBefore(o)),s.breakContainer(s.createPositionAfter(o));const r=o.parent,l=r.previousSibling,a=s.createRangeOn(r);s.remove(a),l&&l.nextSibling&&f(s,l,l.nextSibling),E(i.attributeOldValue+1,i.range.start,a.start,o,n,t),g(i.item,o,n,t);for(const t of i.item.getChildren())n.consumable.consume(t,"insert")}}(t.model)),e.on("remove:listItem",function(t){return(e,i,n)=>{const o=n.mapper.toViewPosition(i.position).getLastMatchingPosition(t=>!t.item.is("element","li")).nodeAfter,s=n.writer;s.breakContainer(s.createPositionBefore(o)),s.breakContainer(s.createPositionAfter(o));const r=o.parent,l=r.previousSibling,a=s.createRangeOn(r),c=s.remove(a);l&&l.nextSibling&&f(s,l,l.nextSibling);E(n.mapper.toModelElement(o).getAttribute("listIndent")+1,i.position,a.start,o,n,t);for(const t of s.createRangeIn(c).getItems())n.mapper.unbindViewElement(t);e.stop()}}(t.model)),e.on("remove",z,{priority:"low"})}),t.conversion.for("dataDowncast").add(e=>{e.on("insert",S,{priority:"high"}),e.on("insert:listItem",I(t.model))}),t.conversion.for("upcast").add(t=>{t.on("element:ul",_,{priority:"high"}),t.on("element:ol",_,{priority:"high"}),t.on("element:li",T,{priority:"high"}),t.on("element:li",C)}),t.model.on("insertContent",P,{priority:"high"}),t.commands.add("numberedList",new s(t,"numbered")),t.commands.add("bulletedList",new s(t,"bulleted")),t.commands.add("indentList",new a(t,"forward")),t.commands.add("outdentList",new a(t,"backward"));const o=i.view.document;this.listenTo(o,"enter",(t,e)=>{const i=this.editor.model.document,n=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),e.preventDefault(),t.stop())},{context:"li"}),this.listenTo(o,"delete",(t,e)=>{if("backward"!==e.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const n=i.getFirstPosition();if(!n.isAtStart)return;const o=n.parent;if("listItem"!==o.name)return;o.previousSibling&&"listItem"===o.previousSibling.name||(this.editor.execute("outdentList"),e.preventDefault(),t.stop())},{context:"li"});const r=t=>(e,i)=>{this.editor.commands.get(t).isEnabled&&(this.editor.execute(t),i())};t.keystrokes.set("Tab",r("indentList")),t.keystrokes.set("Shift+Tab",r("outdentList"))}afterInit(){const t=this.editor.commands,e=t.get("indent"),i=t.get("outdent");e&&e.registerChildCommand(t.get("indentList")),i&&i.registerChildCommand(t.get("outdentList"))}}function H(t){let e=1;for(const i of t.getChildren())if("ul"==i.name||"ol"==i.name)for(const t of i.getChildren())e+=H(t);return e}var O='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>',N='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z"/></svg>';class j extends n.Plugin{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;v(this.editor,"numberedList",t("Numbered List"),O),v(this.editor,"bulletedList",t("Bulleted List"),N)}}class R extends n.Plugin{static get requires(){return[M,j]}static get pluginName(){return"List"}}class D extends n.Command{constructor(t,e){super(t),this._defaultType=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model;let i=[...e.document.selection.getSelectedBlocks()].filter(t=>t.is("element","listItem")).map(t=>{const i=e.change(e=>e.createPositionAt(t,0));return[...w(i,"backward"),...w(i,"forward")]}).flat();i=[...new Set(i)],i.length&&e.change(e=>{for(const n of i)e.setAttribute("listStyle",t.type||this._defaultType,n)})}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),i=t.commands.get("bulletedList");return e.isEnabled||i.isEnabled}}class F extends n.Plugin{static get requires(){return[M]}static get pluginName(){return"ListStyleEditing"}init(){const t=this.editor,e=t.model;e.schema.extend("listItem",{allowAttributes:["listStyle"]}),t.commands.add("listStyle",new D(t,"default")),this.listenTo(t.commands.get("indentList"),"_executeCleanup",function(t){return(e,i)=>{let n;const o=i[0],s=o.getAttribute("listIndent"),r=i.filter(t=>t.getAttribute("listIndent")===s);if(o.previousSibling.getAttribute("listIndent")+1===s)n="default";else{const t=b(o.previousSibling,{sameIndent:!0,direction:"backward",listIndent:s});n=t.getAttribute("listStyle")}t.model.change(t=>{for(const e of r)t.setAttribute("listStyle",n,e)})}}(t)),this.listenTo(t.commands.get("outdentList"),"_executeCleanup",function(t){return(e,i)=>{if(!(i=i.reverse().filter(t=>t.is("element","listItem"))).length)return;const n=i[0].getAttribute("listIndent"),o=i[0].getAttribute("listType");let s=i[0].previousSibling;if(s.is("element","listItem"))for(;s.getAttribute("listIndent")!==n;)s=s.previousSibling;else s=null;s||(s=i[i.length-1].nextSibling),s&&s.is("element","listItem")&&s.getAttribute("listType")===o&&t.model.change(t=>{const e=i.filter(t=>t.getAttribute("listIndent")===n);for(const i of e)t.setAttribute("listStyle",s.getAttribute("listStyle"),i)})}}(t)),this.listenTo(t.commands.get("bulletedList"),"_executeCleanup",K(t)),this.listenTo(t.commands.get("numberedList"),"_executeCleanup",K(t)),e.document.registerPostFixer(function(t){return e=>{let i=!1;const n=W(t.model.document.differ.getChanges()).filter(t=>"todo"!==t.getAttribute("listType"));if(!n.length)return i;let o=n[n.length-1].nextSibling;if((!o||!o.is("element","listItem"))&&(o=n[n.length-1].previousSibling,o)){const t=n[0].getAttribute("listIndent");for(;o.is("element","listItem")&&o.getAttribute("listIndent")!==t&&(o=o.previousSibling,o););}for(const t of n)if(t.hasAttribute("listStyle")){const n=t.previousSibling;U(n,t)&&(e.setAttribute("listStyle",n.getAttribute("listStyle"),t),i=!0)}else q(o,t)?e.setAttribute("listStyle",o.getAttribute("listStyle"),t):e.setAttribute("listStyle","default",t),i=!0;return i}}(t)),t.conversion.for("upcast").add(t=>{t.on("element:li",(t,e,i)=>{const n=e.viewItem.parent;if(!n)return;const o=n.getStyle("list-style-type")||"default",s=e.modelRange.start.nodeAfter||e.modelRange.end.nodeBefore;i.writer.setAttribute("listStyle",o,s)},{priority:"low"})}),t.conversion.for("downcast").add(t=>{t.on("attribute:listStyle:listItem",(t,e,i)=>{const n=i.writer,o=e.item,s=b(o.previousSibling,{sameIndent:!0,listIndent:o.getAttribute("listIndent"),direction:"backward"}),r=i.mapper.toViewElement(o);var l,a,c,d,u;l=o,(a=s)&&l.getAttribute("listType")===a.getAttribute("listType")&&l.getAttribute("listIndent")===a.getAttribute("listIndent")&&l.getAttribute("listStyle")===a.getAttribute("listStyle")||n.breakContainer(n.createPositionBefore(r)),c=n,d=e.attributeNewValue,u=r.parent,d&&"default"!==d?c.setStyle("list-style-type",d,u):c.removeStyle("list-style-type",u)},{priority:"low"})}),this._mergeListStyleAttributeWhileMergingLists()}afterInit(){const t=this.editor;t.commands.get("todoList")&&t.model.document.registerPostFixer(function(t){return e=>{const i=W(t.model.document.differ.getChanges()).filter(t=>"todo"===t.getAttribute("listType")&&t.hasAttribute("listStyle"));if(!i.length)return!1;for(const t of i)e.removeAttribute("listStyle",t);return!0}}(t))}_mergeListStyleAttributeWhileMergingLists(){const t=this.editor.model;let e;this.listenTo(t,"deleteContent",(t,[i])=>{const n=i.getFirstPosition(),o=i.getLastPosition();if(n.parent===o.parent)return;if(!n.parent.is("element","listItem"))return;const s=o.parent.nextSibling;if(!s||!s.is("element","listItem"))return;const r=b(n.parent,{sameIndent:!0,listIndent:s.getAttribute("listIndent")});r&&r.getAttribute("listType")===s.getAttribute("listType")&&(e=r)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{e&&(t.change(t=>{const i=b(e.nextSibling,{sameIndent:!0,listIndent:e.getAttribute("listIndent"),direction:"forward"}),n=[i,...w(t.createPositionAt(i,0),"forward")];for(const i of n)t.setAttribute("listStyle",e.getAttribute("listStyle"),i)}),e=null)},{priority:"low"})}}function q(t,e){if(!t)return!1;const i=t.getAttribute("listStyle");return!!i&&("default"!==i&&t.getAttribute("listType")===e.getAttribute("listType"))}function U(t,e){if(!t||!t.is("element","listItem"))return!1;if(e.getAttribute("listType")!==t.getAttribute("listType"))return!1;const i=t.getAttribute("listIndent");if(i<1||i!==e.getAttribute("listIndent"))return!1;const n=t.getAttribute("listStyle");return!(!n||n===e.getAttribute("listStyle"))}function K(t){return(e,i)=>{i=i.filter(t=>t.is("element","listItem")),t.model.change(t=>{for(const e of i)t.removeAttribute("listStyle",e)})}}function W(t){const e=[];for(const i of t){const t=$(i);t&&t.is("element","listItem")&&e.push(t)}return e}function $(t){return"attribute"===t.type?t.range.start.nodeAfter:"insert"===t.type?t.position.nodeAfter:null}i(8);class Y extends n.Plugin{static get pluginName(){return"ListStyleUI"}init(){const t=this.editor,e=t.locale.t;t.ui.componentFactory.add("bulletedList",J({editor:t,parentCommandName:"bulletedList",buttonLabel:e("Bulleted List"),buttonIcon:N,toolbarAriaLabel:e("Bulleted list styles toolbar"),styleDefinitions:[{label:e("Toggle the disc list style"),tooltip:e("Disc"),type:"disc",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6z"/></svg>'},{label:e("Toggle the circle list style"),tooltip:e("Circle"),type:"circle",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4z"/></svg>'},{label:e("Toggle the square list style"),tooltip:e("Square"),type:"square",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z"/></svg>'}]})),t.ui.componentFactory.add("numberedList",J({editor:t,parentCommandName:"numberedList",buttonLabel:e("Numbered List"),buttonIcon:O,toolbarAriaLabel:e("Numbered list styles toolbar"),styleDefinitions:[{label:e("Toggle the decimal list style"),tooltip:e("Decimal"),type:"decimal",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M10.29 15V8.531H9.286c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15h1.235zM11.3 24v-1.147H8.848c.064-.111.148-.226.252-.343.104-.117.351-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.494-.824.104-.263.156-.539.156-.829 0-.51-.182-.936-.545-1.279-.363-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.153-.155.358-.233.616-.233.26 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.468.536-1.024 1.055-.692.641-1.155 1.156-1.389 1.544-.234.389-.375.8-.422 1.233H11.3zm2.333 0v-1.235h-1.235V24h1.235zM9.204 34.11c.615 0 1.129-.2 1.542-.598.413-.398.62-.88.62-1.446 0-.39-.11-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.619-.337.928-.788.928-1.353 0-.399-.151-.756-.453-1.073-.366-.386-.852-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.668.55c-.16.232-.28.544-.358.933l1.138.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.215 0 .386.065.515.194s.193.302.193.518c0 .255-.087.46-.263.613-.176.154-.43.227-.765.218l-.136 1.006c.22-.061.409-.092.567-.092.24 0 .444.09.61.272.168.182.251.428.251.739 0 .328-.087.589-.261.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.307-.698l-1.196.145c.062.542.285.98.668 1.316.384.335.868.503 1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z"/></svg>'},{label:e("Toggle the decimal with leading zero list style"),tooltip:e("Decimal with leading zero"),type:"decimal-leading-zero",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M5.714 15.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm6.078.914V8.531H10.79c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.344 0v-1.235h-1.235V15h1.235zm-9.422 9.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm7.088.914v-1.147H10.35c.065-.111.149-.226.253-.343.104-.117.35-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.493-.824.104-.263.156-.539.156-.829 0-.51-.181-.936-.544-1.279-.364-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.152-.155.357-.233.615-.233.261 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.467.536-1.024 1.055-.691.641-1.154 1.156-1.388 1.544-.235.389-.375.8-.422 1.233h4.328zm2.334 0v-1.235h-1.235V24h1.235zM5.714 34.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm4.992 1.024c.616 0 1.13-.2 1.543-.598.413-.398.62-.88.62-1.446 0-.39-.111-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.618-.337.927-.788.927-1.353 0-.399-.15-.756-.452-1.073-.366-.386-.853-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.667.55c-.16.232-.28.544-.359.933l1.139.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.214 0 .386.065.515.194s.193.302.193.518c0 .255-.088.46-.264.613-.175.154-.43.227-.764.218l-.136 1.006c.22-.061.408-.092.566-.092.24 0 .444.09.611.272.167.182.25.428.25.739 0 .328-.086.589-.26.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.308-.698l-1.195.145c.062.542.284.98.668 1.316.384.335.867.503 1.45.503zm4.43-.11v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the lower–roman list style"),tooltip:e("Lower–roman"),type:"lower-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.88 8.7V7.558h-1.234V8.7h1.234zm0 5.3V9.333h-1.234V14h1.234zm2.5 0v-1.235h-1.234V14h1.235zm-4.75 4.7v-1.142H8.395V18.7H9.63zm0 5.3v-4.667H8.395V24H9.63zm2.5-5.3v-1.142h-1.234V18.7h1.235zm0 5.3v-4.667h-1.234V24h1.235zm2.501 0v-1.235h-1.235V24h1.235zM7.38 28.7v-1.142H6.145V28.7H7.38zm0 5.3v-4.667H6.145V34H7.38zm2.5-5.3v-1.142H8.646V28.7H9.88zm0 5.3v-4.667H8.646V34H9.88zm2.5-5.3v-1.142h-1.234V28.7h1.235zm0 5.3v-4.667h-1.234V34h1.235zm2.501 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the upper–roman list style"),tooltip:e("Upper-roman"),type:"upper-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.916 15V8.558h-1.301V15h1.3zm2.465 0v-1.235h-1.235V15h1.235zM9.665 25v-6.442h-1.3V25h1.3zm2.5 0v-6.442h-1.3V25h1.3zm2.466 0v-1.235h-1.235V25h1.235zm-7.216 9v-6.442h-1.3V34h1.3zm2.5 0v-6.442h-1.3V34h1.3zm2.501 0v-6.442h-1.3V34h1.3zm2.465 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the lower–latin list style"),tooltip:e("Lower-latin"),type:"lower-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M9.62 14.105c.272 0 .528-.05.768-.153s.466-.257.677-.462c.009.024.023.072.044.145.047.161.086.283.119.365h1.221a2.649 2.649 0 0 1-.222-.626c-.04-.195-.059-.498-.059-.908l.013-1.441c0-.536-.055-.905-.165-1.105-.11-.201-.3-.367-.569-.497-.27-.13-.68-.195-1.23-.195-.607 0-1.064.108-1.371.325-.308.217-.525.55-.65 1.002l1.12.202c.076-.217.176-.369.299-.455.123-.086.294-.13.514-.13.325 0 .546.05.663.152.118.101.176.27.176.508v.123c-.222.093-.622.194-1.2.303-.427.082-.755.178-.982.288-.227.11-.403.268-.53.474a1.327 1.327 0 0 0-.188.706c0 .398.138.728.415.988.277.261.656.391 1.136.391zm.368-.87a.675.675 0 0 1-.492-.189.606.606 0 0 1-.193-.448c0-.176.08-.32.241-.435.106-.07.33-.142.673-.215a7.19 7.19 0 0 0 .751-.19v.247c0 .296-.016.496-.048.602a.773.773 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14h1.235zM10.2 25.105c.542 0 1.003-.215 1.382-.646.38-.43.57-1.044.57-1.84 0-.771-.187-1.362-.559-1.774a1.82 1.82 0 0 0-1.41-.617c-.522 0-.973.216-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592c.26.133.523.2.79.2zm-.299-.975c-.354 0-.638-.164-.852-.492-.153-.232-.229-.59-.229-1.073 0-.468.098-.818.295-1.048a.93.93 0 0 1 .738-.345c.302 0 .55.118.743.354.193.236.29.62.29 1.154 0 .5-.096.868-.288 1.1-.192.233-.424.35-.697.35zm4.478.87v-1.235h-1.234V25h1.234zm-4.017 9.105c.6 0 1.08-.142 1.437-.426.357-.284.599-.704.725-1.261l-1.213-.207c-.061.326-.167.555-.316.688a.832.832 0 0 1-.576.2.916.916 0 0 1-.75-.343c-.185-.228-.278-.62-.278-1.173 0-.498.091-.853.274-1.066.183-.212.429-.318.736-.318.232 0 .42.061.565.184.145.123.238.306.28.55l1.216-.22c-.146-.501-.387-.874-.722-1.119-.336-.244-.788-.366-1.356-.366-.695 0-1.245.214-1.653.643-.407.43-.61 1.03-.61 1.8 0 .762.202 1.358.608 1.788.406.431.95.646 1.633.646zM14.633 34v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the upper–latin list style"),tooltip:e("Upper-latin"),type:"upper-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15h1.38zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15h1.234zM9.352 25c.83-.006 1.352-.02 1.569-.044.346-.038.636-.14.872-.305.236-.166.422-.387.558-.664.137-.277.205-.562.205-.855 0-.372-.106-.695-.317-.97-.21-.276-.512-.471-.905-.585a1.51 1.51 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83c0-.28-.066-.53-.197-.754a1.654 1.654 0 0 0-.495-.539 1.676 1.676 0 0 0-.672-.266c-.25-.042-.63-.063-1.14-.063H7.158V25h2.193zm.142-3.88H8.46v-1.49h.747c.612 0 .983.007 1.112.022.217.026.38.102.49.226.11.125.165.287.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 11.47 11.47 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05c.592 0 .977.03 1.154.092.177.062.313.16.406.295a.84.84 0 0 1 .14.492c0 .228-.06.41-.181.547a.806.806 0 0 1-.473.257c-.126.026-.423.04-.892.04zM14.88 25v-1.235h-1.234V25h1.234zm-5.018 9.11c.691 0 1.262-.17 1.711-.512.45-.341.772-.864.965-1.567l-1.261-.4c-.109.472-.287.818-.536 1.037-.25.22-.547.33-.892.33-.47 0-.85-.173-1.143-.519-.293-.345-.44-.925-.44-1.74 0-.767.15-1.322.447-1.665.297-.343.684-.514 1.162-.514.346 0 .64.096.881.29.242.193.4.457.477.79l1.288-.307c-.147-.516-.367-.911-.66-1.187-.492-.465-1.132-.698-1.92-.698-.902 0-1.63.296-2.184.89-.554.593-.83 1.426-.83 2.498 0 1.014.275 1.813.825 2.397.551.585 1.254.877 2.11.877zM14.88 34v-1.235h-1.234V34h1.234z"/></svg>'}]}))}}function J({editor:t,parentCommandName:e,buttonLabel:i,buttonIcon:n,toolbarAriaLabel:o,styleDefinitions:s}){const r=t.commands.get(e),l=t.commands.get("listStyle");return a=>{const c=Object(m.createDropdown)(a,m.SplitButtonView),d=c.buttonView,u=function({editor:t,listStyleCommand:e,parentCommandName:i}){const n=t.locale,o=t.commands.get(i);return({label:s,type:r,icon:l,tooltip:a})=>{const c=new m.ButtonView(n);return c.set({label:s,icon:l,tooltip:a}),e.on("change:value",()=>{c.isOn=e.value===r}),c.on("execute",()=>{o.value?e.value!==r?t.execute("listStyle",{type:r}):t.execute("listStyle",{type:e._defaultType}):t.model.change(()=>{t.execute(i),t.execute("listStyle",{type:r})}),t.editing.view.focus()}),c}}({editor:t,parentCommandName:e,listStyleCommand:l});return Object(m.addToolbarToDropdown)(c,s.map(u)),c.bind("isEnabled").to(r),c.toolbarView.ariaLabel=o,c.class="ck-list-styles-dropdown",d.on("execute",()=>{t.execute(e),t.editing.view.focus()}),d.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),d.bind("isOn").to(r,"value",t=>!!t),c}}class G extends n.Plugin{static get requires(){return[F,Y]}static get pluginName(){return"ListStyle"}}class Q extends n.Command{constructor(t){super(t),this._selectedElements=[],this.on("execute",()=>{this.refresh()},{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every(t=>!!t.getAttribute("todoListChecked")),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const t=this.editor.model,e=t.schema,i=t.document.selection.getFirstRange(),n=i.start.parent,o=[];e.checkAttribute(n,"todoListChecked")&&o.push(n);for(const t of i.getItems())e.checkAttribute(t,"todoListChecked")&&!o.includes(t)&&o.push(t);return o}execute(t={}){this.editor.model.change(e=>{for(const i of this._selectedElements){(void 0===t.forceValue?!this.value:t.forceValue)?e.setAttribute("todoListChecked",!0,i):e.removeAttribute("todoListChecked",i)}})}}function X(t,e,i){const n=e.modelCursor,o=n.parent,s=e.viewItem;if("checkbox"!=s.getAttribute("type")||"listItem"!=o.name||!n.isAtStart)return;if(!i.consumable.consume(s,{name:!0}))return;const r=i.writer;r.setAttribute("listType","todo",o),e.viewItem.hasAttribute("checked")&&r.setAttribute("todoListChecked",!0,o),e.modelRange=r.createRange(n)}function Z(t){return(e,i)=>{const n=i.modelPosition,o=n.parent;if(!o.is("element","listItem")||"todo"!=o.getAttribute("listType"))return;const s=et(i.mapper.toViewElement(o),t);s&&(i.viewPosition=i.mapper.findPositionIn(s,n.offset))}}function tt(t,e,i,n){return e.createUIElement("label",{class:"todo-list__label",contenteditable:!1},(function(e){const s=Object(o.createElement)(document,"input",{type:"checkbox"});i&&s.setAttribute("checked","checked"),s.addEventListener("change",()=>n(t));const r=this.toDomElement(e);return r.appendChild(s),r}))}function et(t,e){const i=e.createRangeIn(t);for(const t of i)if(t.item.is("containerElement","span")&&t.item.hasClass("todo-list__label__description"))return t.item}const it=Object(o.parseKeystroke)("Ctrl+Enter");class nt extends n.Plugin{static get pluginName(){return"TodoListEditing"}static get requires(){return[M]}init(){const t=this.editor,{editing:e,data:i,model:n}=t;n.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),n.schema.addAttributeCheck((t,e)=>{const i=t.last;if("todoListChecked"==e&&"listItem"==i.name&&"todo"!=i.getAttribute("listType"))return!1}),t.commands.add("todoList",new s(t,"todo"));const r=new Q(t);var l,a;t.commands.add("checkTodoList",r),t.commands.add("todoListCheck",r),i.downcastDispatcher.on("insert:listItem",function(t){return(e,i,n)=>{const o=n.consumable;if(!o.test(i.item,"insert")||!o.test(i.item,"attribute:listType")||!o.test(i.item,"attribute:listIndent"))return;if("todo"!=i.item.getAttribute("listType"))return;const s=i.item;o.consume(s,"insert"),o.consume(s,"attribute:listType"),o.consume(s,"attribute:listIndent"),o.consume(s,"attribute:todoListChecked");const r=n.writer,l=p(s,n);r.addClass("todo-list",l.parent);const a=r.createContainerElement("label",{class:"todo-list__label"}),c=r.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),d=r.createContainerElement("span",{class:"todo-list__label__description"});s.getAttribute("todoListChecked")&&r.setAttribute("checked","checked",c),r.insert(r.createPositionAt(l,0),a),r.insert(r.createPositionAt(a,0),c),r.insert(r.createPositionAfter(c),d),g(s,l,n,t)}}(n),{priority:"high"}),i.upcastDispatcher.on("element:input",X,{priority:"high"}),e.downcastDispatcher.on("insert:listItem",function(t,e){return(i,n,o)=>{const s=o.consumable;if(!s.test(n.item,"insert")||!s.test(n.item,"attribute:listType")||!s.test(n.item,"attribute:listIndent"))return;if("todo"!=n.item.getAttribute("listType"))return;const r=n.item;s.consume(r,"insert"),s.consume(r,"attribute:listType"),s.consume(r,"attribute:listIndent"),s.consume(r,"attribute:todoListChecked");const l=o.writer,a=p(r,o),c=!!r.getAttribute("todoListChecked"),d=tt(r,l,c,e),u=l.createContainerElement("span",{class:"todo-list__label__description"});l.addClass("todo-list",a.parent),l.insert(l.createPositionAt(a,0),d),l.insert(l.createPositionAfter(d),u),g(r,a,o,t)}}(n,t=>this._handleCheckmarkChange(t)),{priority:"high"}),e.downcastDispatcher.on("attribute:listType:listItem",(l=t=>this._handleCheckmarkChange(t),a=e.view,(t,e,i)=>{const n=i.mapper.toViewElement(e.item),o=i.writer,s=function(t,e){const i=e.createRangeIn(t);for(const t of i)if(t.item.is("uiElement","label"))return t.item}(n,a);if("todo"==e.attributeNewValue){const t=!!e.item.getAttribute("todoListChecked"),i=tt(e.item,o,t,l),s=o.createContainerElement("span",{class:"todo-list__label__description"}),r=o.createRangeIn(n),a=y(n),c=h(r.start),d=a?o.createPositionBefore(a):r.end,u=o.createRange(c,d);o.addClass("todo-list",n.parent),o.move(u,o.createPositionAt(s,0)),o.insert(o.createPositionAt(n,0),i),o.insert(o.createPositionAfter(i),s)}else if("todo"==e.attributeOldValue){const t=et(n,a);o.removeClass("todo-list",n.parent),o.remove(s),o.move(o.createRangeIn(t),o.createPositionBefore(t)),o.remove(t)}})),e.downcastDispatcher.on("attribute:todoListChecked:listItem",function(t){return(e,i,n)=>{if("todo"!=i.item.getAttribute("listType"))return;if(!n.consumable.consume(i.item,"attribute:todoListChecked"))return;const{mapper:o,writer:s}=n,r=!!i.item.getAttribute("todoListChecked"),l=o.toViewElement(i.item).getChild(0),a=tt(i.item,s,r,t);s.insert(s.createPositionAfter(l),a),s.remove(l)}}(t=>this._handleCheckmarkChange(t))),e.mapper.on("modelToViewPosition",Z(e.view)),i.mapper.on("modelToViewPosition",Z(e.view)),this.listenTo(e.view.document,"arrowKey",function(t,e){return(i,n)=>{if("left"!=Object(o.getLocalizedArrowKeyCodeDirection)(n.keyCode,e.contentLanguageDirection))return;const s=t.schema,r=t.document.selection;if(!r.isCollapsed)return;const l=r.getFirstPosition(),a=l.parent;if("listItem"===a.name&&"todo"==a.getAttribute("listType")&&l.isAtStart){const e=s.getNearestSelectionRange(t.createPositionBefore(a),"backward");e&&t.change(t=>t.setSelection(e)),n.preventDefault(),n.stopPropagation(),i.stop()}}}(n,t.locale),{context:"li"}),this.listenTo(e.view.document,"keydown",(e,i)=>{Object(o.getCode)(i)===it&&(t.execute("checkTodoList"),e.stop())},{priority:"high"});const c=new Set;this.listenTo(n,"applyOperation",(t,e)=>{const i=e[0];if("rename"==i.type&&"listItem"==i.oldName){const t=i.position.nodeAfter;t.hasAttribute("todoListChecked")&&c.add(t)}else if("changeAttribute"==i.type&&"listType"==i.key&&"todo"===i.oldValue)for(const t of i.range.getItems())t.hasAttribute("todoListChecked")&&"todo"!==t.getAttribute("listType")&&c.add(t)}),n.document.registerPostFixer(t=>{let e=!1;for(const i of c)t.removeAttribute("todoListChecked",i),e=!0;return c.clear(),e})}_handleCheckmarkChange(t){const e=this.editor,i=e.model,n=Array.from(i.document.selection.getRanges());i.change(i=>{i.setSelection(t,"end"),e.execute("checkTodoList"),i.setSelection(n)})}}class ot extends n.Plugin{static get pluginName(){return"TodoListUI"}init(){const t=this.editor.t;v(this.editor,"todoList",t("To-do List"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m2.315 14.705 2.224-2.24a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.682.682 0 0 1-.112.089.647.647 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.717.722zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75zM2.329 5.745l2.21-2.226a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.685.685 0 0 1-.496.196.644.644 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>')}}i(10);class st extends n.Plugin{static get requires(){return[nt,ot]}static get pluginName(){return"TodoList"}}}]);
!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Circle:"Circle",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero",Disc:"Disc","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar",Square:"Square","To-do List":"To-do List","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","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),window.CKEditor5=window.CKEditor5||{},window.CKEditor5.list=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=12)}([function(t,e,i){t.exports=i(3)("./src/core.js")},function(t,e,i){t.exports=i(3)("./src/utils.js")},function(t,e,i){t.exports=i(3)("./src/ui.js")},function(t,e){t.exports=CKEditor5.dll},function(t,e,i){t.exports=i(3)("./src/engine.js")},function(t,e,i){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},s=function(){var t={};return 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(t){i=null}t[e]=i}return t[e]}}(),r=[];function l(t){for(var e=-1,i=0;i<r.length;i++)if(r[i].identifier===t){e=i;break}return e}function a(t,e){for(var i={},n=[],o=0;o<t.length;o++){var s=t[o],a=e.base?s[0]+e.base:s[0],c=i[a]||0,d="".concat(a," ").concat(c);i[a]=c+1;var u=l(d),m={css:s[1],media:s[2],sourceMap:s[3]};-1!==u?(r[u].references++,r[u].updater(m)):r.push({identifier:d,updater:f(m,e),references:1}),n.push(d)}return n}function c(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])})),"function"==typeof t.insert)t.insert(e);else{var r=s(t.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(e)}return e}var d,u=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function m(t,e,i,n){var o=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(t.styleSheet)t.styleSheet.cssText=u(e,o);else{var s=document.createTextNode(o),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(s,r[e]):t.appendChild(s)}}function g(t,e,i){var n=i.css,o=i.media,s=i.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var p=null,h=0;function f(t,e){var i,n,o;if(e.singleton){var s=h++;i=p||(p=c(e)),n=m.bind(null,i,s,!1),o=m.bind(null,i,s,!0)}else i=c(e),n=g.bind(null,i,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=o());var i=a(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var n=0;n<i.length;n++){var o=l(i[n]);r[o].references--}for(var s=a(t,e),c=0;c<i.length;c++){var d=l(i[c]);0===r[d].references&&(r[d].updater(),r.splice(d,1))}i=s}}}},function(t,e,i){t.exports=i(3)("./src/enter.js")},function(t,e,i){t.exports=i(3)("./src/typing.js")},function(t,e,i){var n=i(5),o=i(9);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var s={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,s);t.exports=o.locals||{}},function(t,e){t.exports=".ck.ck-list-styles-dropdown>.ck-dropdown__panel>.ck-toolbar>.ck-toolbar__items{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-dropdown>.ck-dropdown__panel>.ck-toolbar{background:none;padding:0}.ck.ck-list-styles-dropdown>.ck-dropdown__panel>.ck-toolbar>.ck-toolbar__items{grid-template-columns:repeat(3,auto);row-gap:var(--ck-spacing-medium);column-gap:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}.ck.ck-list-styles-dropdown>.ck-dropdown__panel>.ck-toolbar>.ck-toolbar__items .ck-button{width:var(--ck-list-style-button-size);height:var(--ck-list-style-button-size);padding:0;margin:0;box-sizing:content-box}.ck.ck-list-styles-dropdown>.ck-dropdown__panel>.ck-toolbar>.ck-toolbar__items .ck-button .ck-icon{width:var(--ck-list-style-button-size);height:var(--ck-list-style-button-size)}"},function(t,e,i){var n=i(5),o=i(11);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var s={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n(o,s);t.exports=o.locals||{}},function(t,e){t.exports=':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;display:inline-block;position:relative;width:var(--ck-todo-list-checkmark-size);height:var(--ck-todo-list-checkmark-size);vertical-align:middle;border:0;left:-25px;margin-right:-15px;right:0;margin-left:0}.ck-content .todo-list .todo-list__label>input:before{display:block;position:absolute;box-sizing:border-box;content:"";width:100%;height:100%;border:1px solid #333;border-radius:2px;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out}.ck-content .todo-list .todo-list__label>input:after{display:block;position:absolute;box-sizing:content-box;pointer-events:none;content:"";left:calc(var(--ck-todo-list-checkmark-size)/3);top:calc(var(--ck-todo-list-checkmark-size)/5.3);width:calc(var(--ck-todo-list-checkmark-size)/5.3);height:calc(var(--ck-todo-list-checkmark-size)/2.6);border-left:0 solid transparent;border-bottom:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-right:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-top:0 solid transparent;transform:rotate(45deg)}.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-right:0;right:-25px;margin-left:-15px}.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)}'},function(t,e,i){"use strict";i.r(e),i.d(e,"List",(function(){return D})),i.d(e,"ListEditing",(function(){return M})),i.d(e,"ListUI",(function(){return j})),i.d(e,"ListStyle",(function(){return G})),i.d(e,"ListStyleEditing",(function(){return F})),i.d(e,"ListStyleUI",(function(){return Y})),i.d(e,"TodoList",(function(){return st})),i.d(e,"TodoListEditing",(function(){return nt})),i.d(e,"TodoListUI",(function(){return ot}));var n=i(0),o=i(1);class s extends n.Command{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document,n=Array.from(i.selection.getSelectedBlocks()).filter(t=>l(t,e.schema)),o=void 0!==t.forceValue?!t.forceValue:this.value;e.change(t=>{if(o){let e=n[n.length-1].nextSibling,i=Number.POSITIVE_INFINITY,o=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){const t=e.getAttribute("listIndent");t<i&&(i=t);const n=t-i;o.push({element:e,listIndent:n}),e=e.nextSibling}o=o.reverse();for(const e of o)t.setAttribute("listIndent",e.listIndent,e.element)}if(!o){let t=Number.POSITIVE_INFINITY;for(const e of n)e.is("element","listItem")&&e.getAttribute("listIndent")<t&&(t=e.getAttribute("listIndent"));t=0===t?1:t,r(n,!0,t),r(n,!1,t)}for(const e of n.reverse())o&&"listItem"==e.name?t.rename(e,"paragraph"):o||"listItem"==e.name?o||"listItem"!=e.name||e.getAttribute("listType")==this.type||t.setAttribute("listType",this.type,e):(t.setAttributes({listType:this.type,listIndent:0},e),t.rename(e,"listItem"));this.fire("_executeCleanup",n)})}_getValue(){const t=Object(o.first)(this.editor.model.document.selection.getSelectedBlocks());return!!t&&t.is("element","listItem")&&t.getAttribute("listType")==this.type}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,i=Object(o.first)(t.getSelectedBlocks());return!!i&&l(i,e)}}function r(t,e,i){const n=e?t[0]:t[t.length-1];if(n.is("element","listItem")){let o=n[e?"previousSibling":"nextSibling"],s=n.getAttribute("listIndent");for(;o&&o.is("element","listItem")&&o.getAttribute("listIndent")>=i;)s>o.getAttribute("listIndent")&&(s=o.getAttribute("listIndent")),o.getAttribute("listIndent")==s&&t[e?"unshift":"push"](o),o=o[e?"previousSibling":"nextSibling"]}}function l(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class a extends n.Command{constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let i=Array.from(e.selection.getSelectedBlocks());t.change(t=>{const e=i[i.length-1];let n=e.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>e.getAttribute("listIndent");)i.push(n),n=n.nextSibling;this._indentBy<0&&(i=i.reverse());for(const e of i){const i=e.getAttribute("listIndent")+this._indentBy;i<0?t.rename(e,"paragraph"):t.setAttribute("listIndent",i,e)}this.fire("_executeCleanup",i)})}_checkEnabled(){const t=Object(o.first)(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("element","listItem"))return!1;if(this._indentBy>0){const e=t.getAttribute("listIndent"),i=t.getAttribute("listType");let n=t.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=e;){if(n.getAttribute("listIndent")==e)return n.getAttribute("listType")==i;n=n.previousSibling}return!1}return!0}}var c=i(6),d=i(7),u=i(4),m=i(2);function g(t,e){const i=e.mapper,n=e.writer,o="numbered"==t.getAttribute("listType")?"ol":"ul",s=function(t){const e=t.createContainerElement("li");return e.getFillerOffset=A,e}(n),r=n.createContainerElement(o,null);return n.insert(n.createPositionAt(r,0),s),i.bindElements(t,s),s}function p(t,e,i,n){const o=e.parent,s=i.mapper,r=i.writer;let l=s.toViewPosition(n.createPositionBefore(t));const a=b(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute("listIndent")}),c=t.previousSibling;if(a&&a.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=s.toViewElement(a);l=r.breakContainer(r.createPositionAfter(t))}else if(c&&"listItem"==c.name){l=s.toViewPosition(n.createPositionAt(c,"end"));const t=s.findMappedViewAncestor(l),e=y(t);l=e?r.createPositionBefore(e):r.createPositionAt(t,"end")}else l=s.toViewPosition(n.createPositionBefore(t));if(l=f(l),r.insert(l,o),c&&"listItem"==c.name){const t=s.toViewElement(c),i=r.createRange(r.createPositionAt(t,0),l).getWalker({ignoreElementEnd:!0});for(const t of i)if(t.item.is("element","li")){const n=r.breakContainer(r.createPositionBefore(t.item)),o=t.item.parent,s=r.createPositionAt(e,"end");h(r,s.nodeBefore,s.nodeAfter),r.move(r.createRangeOn(o),s),i.position=n}}else{const i=o.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let n=null;for(const e of i.getChildren()){const i=s.toModelElement(e);if(!(i&&i.getAttribute("listIndent")>t.getAttribute("listIndent")))break;n=e}n&&(r.breakContainer(r.createPositionAfter(n)),r.move(r.createRangeOn(n.parent),r.createPositionAt(e,"end")))}}h(r,o,o.nextSibling),h(r,o.previousSibling,o)}function h(t,e,i){return!e||!i||"ul"!=e.name&&"ol"!=e.name||e.name!=i.name||e.getAttribute("class")!==i.getAttribute("class")?null:t.mergeContainers(t.createPositionAfter(e))}function f(t){return t.getLastMatchingPosition(t=>t.item.is("uiElement"))}function b(t,e){const i=!!e.sameIndent,n=!!e.smallerIndent,o=e.listIndent;let s=t;for(;s&&"listItem"==s.name;){const t=s.getAttribute("listIndent");if(i&&o==t||n&&o>t)return s;s="forward"===e.direction?s.nextSibling:s.previousSibling}return null}function v(t,e,i,n){t.ui.componentFactory.add(e,o=>{const s=t.commands.get(e),r=new m.ButtonView(o);return r.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(s,"value","isEnabled"),r.on("execute",()=>{t.execute(e),t.editing.view.focus()}),r})}function y(t){for(const e of t.getChildren())if("ul"==e.name||"ol"==e.name)return e;return null}function w(t,e){const i=[],n=t.parent,o={ignoreElementEnd:!0,startPosition:t,shallow:!0,direction:e},s=n.getAttribute("listIndent"),r=[...new u.TreeWalker(o)].filter(t=>t.item.is("element")).map(t=>t.item);for(const t of r){if(!t.is("element","listItem"))break;if(t.getAttribute("listIndent")<s)break;if(!(t.getAttribute("listIndent")>s)){if(t.getAttribute("listType")!==n.getAttribute("listType"))break;if(t.getAttribute("listStyle")!==n.getAttribute("listStyle"))break;"backward"===e?i.unshift(t):i.push(t)}}return i}function A(){const t=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||t?0:u.getFillerOffset.call(this)}function I(t){return(e,i,n)=>{const o=n.consumable;if(!o.test(i.item,"insert")||!o.test(i.item,"attribute:listType")||!o.test(i.item,"attribute:listIndent"))return;o.consume(i.item,"insert"),o.consume(i.item,"attribute:listType"),o.consume(i.item,"attribute:listIndent");const s=i.item;p(s,g(s,n),n,t)}}function k(t,e,i){if(!i.consumable.consume(e.item,"attribute:listType"))return;const n=i.mapper.toViewElement(e.item),o=i.writer;o.breakContainer(o.createPositionBefore(n)),o.breakContainer(o.createPositionAfter(n));const s=n.parent,r="numbered"==e.attributeNewValue?"ol":"ul";o.rename(r,s)}function S(t,e,i){const n=i.mapper.toViewElement(e.item).parent,o=i.writer;h(o,n,n.nextSibling),h(o,n.previousSibling,n);for(const t of e.item.getChildren())i.consumable.consume(t,"insert")}function x(t,e,i){if("listItem"!=e.item.name){let t=i.mapper.toViewPosition(e.range.start);const n=i.writer,o=[];for(;("ul"==t.parent.name||"ol"==t.parent.name)&&(t=n.breakContainer(t),"li"==t.parent.name);){const e=t,i=n.createPositionAt(t.parent,"end");if(!e.isEqual(i)){const t=n.remove(n.createRange(e,i));o.push(t)}t=n.createPositionAfter(t.parent)}if(o.length>0){for(let e=0;e<o.length;e++){const i=t.nodeBefore;if(t=n.insert(t,o[e]).end,e>0){const e=h(n,i,i.nextSibling);e&&e.parent==i&&t.offset--}}h(n,t.nodeBefore,t.nodeAfter)}}}function T(t,e,i){const n=i.mapper.toViewPosition(e.position),o=n.nodeBefore,s=n.nodeAfter;h(i.writer,o,s)}function z(t,e,i){if(i.consumable.consume(e.viewItem,{name:!0})){const t=i.writer,n=t.createElement("listItem"),o=function(t){let e=0,i=t.parent;for(;i;){if(i.is("element","li"))e++;else{const t=i.previousSibling;t&&t.is("element","li")&&e++}i=i.parent}return e}(e.viewItem);t.setAttribute("listIndent",o,n);const s=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";if(t.setAttribute("listType",s,n),!i.safeInsert(n,e.modelCursor))return;const r=function(t,e,i){const{writer:n,schema:o}=i;let s=n.createPositionAfter(t);for(const r of e)if("ul"==r.name||"ol"==r.name)s=i.convertItem(r,s).modelCursor;else{const e=i.convertItem(r,n.createPositionAt(t,"end")),l=e.modelRange.start.nodeAfter;l&&l.is("element")&&!o.checkChild(t,l.name)&&(t=e.modelCursor.parent.is("element","listItem")?e.modelCursor.parent:V(e.modelCursor),s=n.createPositionAfter(t))}return s}(n,e.viewItem.getChildren(),i);e.modelRange=t.createRange(e.modelCursor,r),i.updateConversionResult(n,e)}}function C(t,e,i){if(i.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t){!(e.is("element","li")||B(e))&&e._remove()}}}function _(t,e,i){if(i.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let i=!1,n=!0;for(const e of t)i&&!B(e)&&e._remove(),e.is("$text")?(n&&(e._data=e.data.trimStart()),e.nextSibling&&!B(e.nextSibling)||(e._data=e.data.trimEnd())):B(e)&&(i=!0),n=!1}}function L(t){return(e,i)=>{if(i.isPhantom)return;const n=i.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const e=i.mapper.toViewElement(n),o=e.getAncestors().find(B),s=t.createPositionAt(e,0).getWalker();for(const t of s){if("elementStart"==t.type&&t.item.is("element","li")){i.viewPosition=t.previousPosition;break}if("elementEnd"==t.type&&t.item==o){i.viewPosition=t.nextPosition;break}}}}}function P(t,[e,i]){let n,o=e.is("documentFragment")?e.getChild(0):e;if(n=i?this.createSelection(i):this.document.selection,o&&o.is("element","listItem")){const t=n.getFirstPosition();let e=null;if(t.parent.is("element","listItem")?e=t.parent:t.nodeBefore&&t.nodeBefore.is("element","listItem")&&(e=t.nodeBefore),e){const t=e.getAttribute("listIndent");if(t>0)for(;o&&o.is("element","listItem");)o._setAttribute("listIndent",o.getAttribute("listIndent")+t),o=o.nextSibling}}}function V(t){const e=new u.TreeWalker({startPosition:t});let i;do{i=e.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function E(t,e,i,n,o,s){const r=b(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t,foo:"b"}),l=o.mapper,a=o.writer,c=r?r.getAttribute("listIndent"):null;let d;if(r)if(c==t){const t=l.toViewElement(r).parent;d=a.createPositionAfter(t)}else{const t=s.createPositionAt(r,"end");d=l.toViewPosition(t)}else d=i;d=f(d);for(const t of[...n.getChildren()])B(t)&&(d=a.move(a.createRangeOn(t),d).end,h(a,t,t.nextSibling),h(a,t.previousSibling,t))}function B(t){return t.is("element","ol")||t.is("element","ul")}class M extends n.Plugin{static get pluginName(){return"ListEditing"}static get requires(){return[c.Enter,d.Delete]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data,i=t.editing;var n;t.model.document.registerPostFixer(e=>function(t,e){const i=t.document.differ.getChanges(),n=new Map;let o=!1;for(const n of i)if("insert"==n.type&&"listItem"==n.name)s(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const i=n.position.nodeAfter;i.hasAttribute("listIndent")&&(e.removeAttribute("listIndent",i),o=!0),i.hasAttribute("listType")&&(e.removeAttribute("listType",i),o=!0),i.hasAttribute("listStyle")&&(e.removeAttribute("listStyle",i),o=!0);for(const e of Array.from(t.createRangeIn(i)).filter(t=>t.item.is("element","listItem")))s(e.previousPosition)}s(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?s(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&s(n.range.start);for(const t of n.values())r(t),l(t);return o;function s(t){const e=t.nodeBefore;if(e&&e.is("element","listItem")){let t=e;if(n.has(t))return;for(let e=t.previousSibling;e&&e.is("element","listItem");e=t.previousSibling)if(t=e,n.has(t))return;n.set(e,t)}else{const e=t.nodeAfter;e&&e.is("element","listItem")&&n.set(e,e)}}function r(t){let i=0,n=null;for(;t&&t.is("element","listItem");){const s=t.getAttribute("listIndent");if(s>i){let r;null===n?(n=s-i,r=i):(n>s&&(n=s),r=s-n),e.setAttribute("listIndent",r,t),o=!0}else n=null,i=t.getAttribute("listIndent")+1;t=t.nextSibling}}function l(t){let i=[],n=null;for(;t&&t.is("element","listItem");){const s=t.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>s&&(i=i.slice(0,s+1)),0!=s)if(i[s]){const n=i[s];t.getAttribute("listType")!=n&&(e.setAttribute("listType",n,t),o=!0)}else i[s]=t.getAttribute("listType");n=t,t=t.nextSibling}}}(t.model,e)),i.mapper.registerViewToModelLength("li",H),e.mapper.registerViewToModelLength("li",H),i.mapper.on("modelToViewPosition",L(i.view)),i.mapper.on("viewToModelPosition",(n=t.model,(t,e)=>{const i=e.viewPosition,o=i.parent,s=e.mapper;if("ul"==o.name||"ol"==o.name){if(i.isAtEnd){const t=s.toModelElement(i.nodeBefore),o=s.getModelLength(i.nodeBefore);e.modelPosition=n.createPositionBefore(t).getShiftedBy(o)}else{const t=s.toModelElement(i.nodeAfter);e.modelPosition=n.createPositionBefore(t)}t.stop()}else if("li"==o.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const r=s.toModelElement(o);let l=1,a=i.nodeBefore;for(;a&&B(a);)l+=s.getModelLength(a),a=a.previousSibling;e.modelPosition=n.createPositionBefore(r).getShiftedBy(l),t.stop()}})),e.mapper.on("modelToViewPosition",L(i.view)),t.conversion.for("editingDowncast").add(e=>{e.on("insert",x,{priority:"high"}),e.on("insert:listItem",I(t.model)),e.on("attribute:listType:listItem",k,{priority:"high"}),e.on("attribute:listType:listItem",S,{priority:"low"}),e.on("attribute:listIndent:listItem",function(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,"attribute:listIndent"))return;const o=n.mapper.toViewElement(i.item),s=n.writer;s.breakContainer(s.createPositionBefore(o)),s.breakContainer(s.createPositionAfter(o));const r=o.parent,l=r.previousSibling,a=s.createRangeOn(r);s.remove(a),l&&l.nextSibling&&h(s,l,l.nextSibling),E(i.attributeOldValue+1,i.range.start,a.start,o,n,t),p(i.item,o,n,t);for(const t of i.item.getChildren())n.consumable.consume(t,"insert")}}(t.model)),e.on("remove:listItem",function(t){return(e,i,n)=>{const o=n.mapper.toViewPosition(i.position).getLastMatchingPosition(t=>!t.item.is("element","li")).nodeAfter,s=n.writer;s.breakContainer(s.createPositionBefore(o)),s.breakContainer(s.createPositionAfter(o));const r=o.parent,l=r.previousSibling,a=s.createRangeOn(r),c=s.remove(a);l&&l.nextSibling&&h(s,l,l.nextSibling);E(n.mapper.toModelElement(o).getAttribute("listIndent")+1,i.position,a.start,o,n,t);for(const t of s.createRangeIn(c).getItems())n.mapper.unbindViewElement(t);e.stop()}}(t.model)),e.on("remove",T,{priority:"low"})}),t.conversion.for("dataDowncast").add(e=>{e.on("insert",x,{priority:"high"}),e.on("insert:listItem",I(t.model))}),t.conversion.for("upcast").add(t=>{t.on("element:ul",C,{priority:"high"}),t.on("element:ol",C,{priority:"high"}),t.on("element:li",_,{priority:"high"}),t.on("element:li",z)}),t.model.on("insertContent",P,{priority:"high"}),t.commands.add("numberedList",new s(t,"numbered")),t.commands.add("bulletedList",new s(t,"bulleted")),t.commands.add("indentList",new a(t,"forward")),t.commands.add("outdentList",new a(t,"backward"));const o=i.view.document;this.listenTo(o,"enter",(t,e)=>{const i=this.editor.model.document,n=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),e.preventDefault(),t.stop())},{context:"li"}),this.listenTo(o,"delete",(t,e)=>{if("backward"!==e.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const n=i.getFirstPosition();if(!n.isAtStart)return;const o=n.parent;if("listItem"!==o.name)return;o.previousSibling&&"listItem"===o.previousSibling.name||(this.editor.execute("outdentList"),e.preventDefault(),t.stop())},{context:"li"});const r=t=>(e,i)=>{this.editor.commands.get(t).isEnabled&&(this.editor.execute(t),i())};t.keystrokes.set("Tab",r("indentList")),t.keystrokes.set("Shift+Tab",r("outdentList"))}afterInit(){const t=this.editor.commands,e=t.get("indent"),i=t.get("outdent");e&&e.registerChildCommand(t.get("indentList")),i&&i.registerChildCommand(t.get("outdentList"))}}function H(t){let e=1;for(const i of t.getChildren())if("ul"==i.name||"ol"==i.name)for(const t of i.getChildren())e+=H(t);return e}var N='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>',O='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z"/></svg>';class j extends n.Plugin{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;v(this.editor,"numberedList",t("Numbered List"),N),v(this.editor,"bulletedList",t("Bulleted List"),O)}}class D extends n.Plugin{static get requires(){return[M,j]}static get pluginName(){return"List"}}class R extends n.Command{constructor(t,e){super(t),this._defaultType=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model;let i=[...e.document.selection.getSelectedBlocks()].filter(t=>t.is("element","listItem")).map(t=>{const i=e.change(e=>e.createPositionAt(t,0));return[...w(i,"backward"),...w(i,"forward")]}).flat();i=[...new Set(i)],i.length&&e.change(e=>{for(const n of i)e.setAttribute("listStyle",t.type||this._defaultType,n)})}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),i=t.commands.get("bulletedList");return e.isEnabled||i.isEnabled}}class F extends n.Plugin{static get requires(){return[M]}static get pluginName(){return"ListStyleEditing"}init(){const t=this.editor,e=t.model;e.schema.extend("listItem",{allowAttributes:["listStyle"]}),t.commands.add("listStyle",new R(t,"default")),this.listenTo(t.commands.get("indentList"),"_executeCleanup",function(t){return(e,i)=>{let n;const o=i[0],s=o.getAttribute("listIndent"),r=i.filter(t=>t.getAttribute("listIndent")===s);if(o.previousSibling.getAttribute("listIndent")+1===s)n="default";else{const t=b(o.previousSibling,{sameIndent:!0,direction:"backward",listIndent:s});n=t.getAttribute("listStyle")}t.model.change(t=>{for(const e of r)t.setAttribute("listStyle",n,e)})}}(t)),this.listenTo(t.commands.get("outdentList"),"_executeCleanup",function(t){return(e,i)=>{if(!(i=i.reverse().filter(t=>t.is("element","listItem"))).length)return;const n=i[0].getAttribute("listIndent"),o=i[0].getAttribute("listType");let s=i[0].previousSibling;if(s.is("element","listItem"))for(;s.getAttribute("listIndent")!==n;)s=s.previousSibling;else s=null;s||(s=i[i.length-1].nextSibling),s&&s.is("element","listItem")&&s.getAttribute("listType")===o&&t.model.change(t=>{const e=i.filter(t=>t.getAttribute("listIndent")===n);for(const i of e)t.setAttribute("listStyle",s.getAttribute("listStyle"),i)})}}(t)),this.listenTo(t.commands.get("bulletedList"),"_executeCleanup",K(t)),this.listenTo(t.commands.get("numberedList"),"_executeCleanup",K(t)),e.document.registerPostFixer(function(t){return e=>{let i=!1;const n=W(t.model.document.differ.getChanges()).filter(t=>"todo"!==t.getAttribute("listType"));if(!n.length)return i;let o=n[n.length-1].nextSibling;if((!o||!o.is("element","listItem"))&&(o=n[n.length-1].previousSibling,o)){const t=n[0].getAttribute("listIndent");for(;o.is("element","listItem")&&o.getAttribute("listIndent")!==t&&(o=o.previousSibling,o););}for(const t of n)if(t.hasAttribute("listStyle")){const n=t.previousSibling;U(n,t)&&(e.setAttribute("listStyle",n.getAttribute("listStyle"),t),i=!0)}else q(o,t)?e.setAttribute("listStyle",o.getAttribute("listStyle"),t):e.setAttribute("listStyle","default",t),i=!0;return i}}(t)),t.conversion.for("upcast").add(t=>{t.on("element:li",(t,e,i)=>{const n=e.viewItem.parent;if(!n)return;const o=n.getStyle("list-style-type")||"default",s=e.modelRange.start.nodeAfter||e.modelRange.end.nodeBefore;i.writer.setAttribute("listStyle",o,s)},{priority:"low"})}),t.conversion.for("downcast").add(t=>{t.on("attribute:listStyle:listItem",(t,e,i)=>{const n=i.writer,o=e.item,s=b(o.previousSibling,{sameIndent:!0,listIndent:o.getAttribute("listIndent"),direction:"backward"}),r=i.mapper.toViewElement(o);var l,a,c,d,u;l=o,(a=s)&&l.getAttribute("listType")===a.getAttribute("listType")&&l.getAttribute("listIndent")===a.getAttribute("listIndent")&&l.getAttribute("listStyle")===a.getAttribute("listStyle")||n.breakContainer(n.createPositionBefore(r)),c=n,d=e.attributeNewValue,u=r.parent,d&&"default"!==d?c.setStyle("list-style-type",d,u):c.removeStyle("list-style-type",u)},{priority:"low"})}),this._mergeListStyleAttributeWhileMergingLists()}afterInit(){const t=this.editor;t.commands.get("todoList")&&t.model.document.registerPostFixer(function(t){return e=>{const i=W(t.model.document.differ.getChanges()).filter(t=>"todo"===t.getAttribute("listType")&&t.hasAttribute("listStyle"));if(!i.length)return!1;for(const t of i)e.removeAttribute("listStyle",t);return!0}}(t))}_mergeListStyleAttributeWhileMergingLists(){const t=this.editor.model;let e;this.listenTo(t,"deleteContent",(t,[i])=>{const n=i.getFirstPosition(),o=i.getLastPosition();if(n.parent===o.parent)return;if(!n.parent.is("element","listItem"))return;const s=o.parent.nextSibling;if(!s||!s.is("element","listItem"))return;const r=b(n.parent,{sameIndent:!0,listIndent:s.getAttribute("listIndent")});r&&r.getAttribute("listType")===s.getAttribute("listType")&&(e=r)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{e&&(t.change(t=>{const i=b(e.nextSibling,{sameIndent:!0,listIndent:e.getAttribute("listIndent"),direction:"forward"}),n=[i,...w(t.createPositionAt(i,0),"forward")];for(const i of n)t.setAttribute("listStyle",e.getAttribute("listStyle"),i)}),e=null)},{priority:"low"})}}function q(t,e){if(!t)return!1;const i=t.getAttribute("listStyle");return!!i&&("default"!==i&&t.getAttribute("listType")===e.getAttribute("listType"))}function U(t,e){if(!t||!t.is("element","listItem"))return!1;if(e.getAttribute("listType")!==t.getAttribute("listType"))return!1;const i=t.getAttribute("listIndent");if(i<1||i!==e.getAttribute("listIndent"))return!1;const n=t.getAttribute("listStyle");return!(!n||n===e.getAttribute("listStyle"))}function K(t){return(e,i)=>{i=i.filter(t=>t.is("element","listItem")),t.model.change(t=>{for(const e of i)t.removeAttribute("listStyle",e)})}}function W(t){const e=[];for(const i of t){const t=$(i);t&&t.is("element","listItem")&&e.push(t)}return e}function $(t){return"attribute"===t.type?t.range.start.nodeAfter:"insert"===t.type?t.position.nodeAfter:null}i(8);class Y extends n.Plugin{static get pluginName(){return"ListStyleUI"}init(){const t=this.editor,e=t.locale.t;t.ui.componentFactory.add("bulletedList",J({editor:t,parentCommandName:"bulletedList",buttonLabel:e("Bulleted List"),buttonIcon:O,toolbarAriaLabel:e("Bulleted list styles toolbar"),styleDefinitions:[{label:e("Toggle the disc list style"),tooltip:e("Disc"),type:"disc",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6z"/></svg>'},{label:e("Toggle the circle list style"),tooltip:e("Circle"),type:"circle",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4z"/></svg>'},{label:e("Toggle the square list style"),tooltip:e("Square"),type:"square",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z"/></svg>'}]})),t.ui.componentFactory.add("numberedList",J({editor:t,parentCommandName:"numberedList",buttonLabel:e("Numbered List"),buttonIcon:N,toolbarAriaLabel:e("Numbered list styles toolbar"),styleDefinitions:[{label:e("Toggle the decimal list style"),tooltip:e("Decimal"),type:"decimal",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M10.29 15V8.531H9.286c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15h1.235zM11.3 24v-1.147H8.848c.064-.111.148-.226.252-.343.104-.117.351-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.494-.824.104-.263.156-.539.156-.829 0-.51-.182-.936-.545-1.279-.363-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.153-.155.358-.233.616-.233.26 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.468.536-1.024 1.055-.692.641-1.155 1.156-1.389 1.544-.234.389-.375.8-.422 1.233H11.3zm2.333 0v-1.235h-1.235V24h1.235zM9.204 34.11c.615 0 1.129-.2 1.542-.598.413-.398.62-.88.62-1.446 0-.39-.11-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.619-.337.928-.788.928-1.353 0-.399-.151-.756-.453-1.073-.366-.386-.852-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.668.55c-.16.232-.28.544-.358.933l1.138.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.215 0 .386.065.515.194s.193.302.193.518c0 .255-.087.46-.263.613-.176.154-.43.227-.765.218l-.136 1.006c.22-.061.409-.092.567-.092.24 0 .444.09.61.272.168.182.251.428.251.739 0 .328-.087.589-.261.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.307-.698l-1.196.145c.062.542.285.98.668 1.316.384.335.868.503 1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z"/></svg>'},{label:e("Toggle the decimal with leading zero list style"),tooltip:e("Decimal with leading zero"),type:"decimal-leading-zero",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M5.714 15.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm6.078.914V8.531H10.79c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.344 0v-1.235h-1.235V15h1.235zm-9.422 9.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm7.088.914v-1.147H10.35c.065-.111.149-.226.253-.343.104-.117.35-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.493-.824.104-.263.156-.539.156-.829 0-.51-.181-.936-.544-1.279-.364-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.152-.155.357-.233.615-.233.261 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.467.536-1.024 1.055-.691.641-1.154 1.156-1.388 1.544-.235.389-.375.8-.422 1.233h4.328zm2.334 0v-1.235h-1.235V24h1.235zM5.714 34.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm4.992 1.024c.616 0 1.13-.2 1.543-.598.413-.398.62-.88.62-1.446 0-.39-.111-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.618-.337.927-.788.927-1.353 0-.399-.15-.756-.452-1.073-.366-.386-.853-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.667.55c-.16.232-.28.544-.359.933l1.139.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.214 0 .386.065.515.194s.193.302.193.518c0 .255-.088.46-.264.613-.175.154-.43.227-.764.218l-.136 1.006c.22-.061.408-.092.566-.092.24 0 .444.09.611.272.167.182.25.428.25.739 0 .328-.086.589-.26.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.308-.698l-1.195.145c.062.542.284.98.668 1.316.384.335.867.503 1.45.503zm4.43-.11v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the lower–roman list style"),tooltip:e("Lower–roman"),type:"lower-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.88 8.7V7.558h-1.234V8.7h1.234zm0 5.3V9.333h-1.234V14h1.234zm2.5 0v-1.235h-1.234V14h1.235zm-4.75 4.7v-1.142H8.395V18.7H9.63zm0 5.3v-4.667H8.395V24H9.63zm2.5-5.3v-1.142h-1.234V18.7h1.235zm0 5.3v-4.667h-1.234V24h1.235zm2.501 0v-1.235h-1.235V24h1.235zM7.38 28.7v-1.142H6.145V28.7H7.38zm0 5.3v-4.667H6.145V34H7.38zm2.5-5.3v-1.142H8.646V28.7H9.88zm0 5.3v-4.667H8.646V34H9.88zm2.5-5.3v-1.142h-1.234V28.7h1.235zm0 5.3v-4.667h-1.234V34h1.235zm2.501 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the upper–roman list style"),tooltip:e("Upper-roman"),type:"upper-roman",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M11.916 15V8.558h-1.301V15h1.3zm2.465 0v-1.235h-1.235V15h1.235zM9.665 25v-6.442h-1.3V25h1.3zm2.5 0v-6.442h-1.3V25h1.3zm2.466 0v-1.235h-1.235V25h1.235zm-7.216 9v-6.442h-1.3V34h1.3zm2.5 0v-6.442h-1.3V34h1.3zm2.501 0v-6.442h-1.3V34h1.3zm2.465 0v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the lower–latin list style"),tooltip:e("Lower-latin"),type:"lower-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="M9.62 14.105c.272 0 .528-.05.768-.153s.466-.257.677-.462c.009.024.023.072.044.145.047.161.086.283.119.365h1.221a2.649 2.649 0 0 1-.222-.626c-.04-.195-.059-.498-.059-.908l.013-1.441c0-.536-.055-.905-.165-1.105-.11-.201-.3-.367-.569-.497-.27-.13-.68-.195-1.23-.195-.607 0-1.064.108-1.371.325-.308.217-.525.55-.65 1.002l1.12.202c.076-.217.176-.369.299-.455.123-.086.294-.13.514-.13.325 0 .546.05.663.152.118.101.176.27.176.508v.123c-.222.093-.622.194-1.2.303-.427.082-.755.178-.982.288-.227.11-.403.268-.53.474a1.327 1.327 0 0 0-.188.706c0 .398.138.728.415.988.277.261.656.391 1.136.391zm.368-.87a.675.675 0 0 1-.492-.189.606.606 0 0 1-.193-.448c0-.176.08-.32.241-.435.106-.07.33-.142.673-.215a7.19 7.19 0 0 0 .751-.19v.247c0 .296-.016.496-.048.602a.773.773 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14h1.235zM10.2 25.105c.542 0 1.003-.215 1.382-.646.38-.43.57-1.044.57-1.84 0-.771-.187-1.362-.559-1.774a1.82 1.82 0 0 0-1.41-.617c-.522 0-.973.216-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592c.26.133.523.2.79.2zm-.299-.975c-.354 0-.638-.164-.852-.492-.153-.232-.229-.59-.229-1.073 0-.468.098-.818.295-1.048a.93.93 0 0 1 .738-.345c.302 0 .55.118.743.354.193.236.29.62.29 1.154 0 .5-.096.868-.288 1.1-.192.233-.424.35-.697.35zm4.478.87v-1.235h-1.234V25h1.234zm-4.017 9.105c.6 0 1.08-.142 1.437-.426.357-.284.599-.704.725-1.261l-1.213-.207c-.061.326-.167.555-.316.688a.832.832 0 0 1-.576.2.916.916 0 0 1-.75-.343c-.185-.228-.278-.62-.278-1.173 0-.498.091-.853.274-1.066.183-.212.429-.318.736-.318.232 0 .42.061.565.184.145.123.238.306.28.55l1.216-.22c-.146-.501-.387-.874-.722-1.119-.336-.244-.788-.366-1.356-.366-.695 0-1.245.214-1.653.643-.407.43-.61 1.03-.61 1.8 0 .762.202 1.358.608 1.788.406.431.95.646 1.633.646zM14.633 34v-1.235h-1.235V34h1.235z"/></svg>'},{label:e("Toggle the upper–latin list style"),tooltip:e("Upper-latin"),type:"upper-latin",icon:'<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163"/><path d="m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15h1.38zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15h1.234zM9.352 25c.83-.006 1.352-.02 1.569-.044.346-.038.636-.14.872-.305.236-.166.422-.387.558-.664.137-.277.205-.562.205-.855 0-.372-.106-.695-.317-.97-.21-.276-.512-.471-.905-.585a1.51 1.51 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83c0-.28-.066-.53-.197-.754a1.654 1.654 0 0 0-.495-.539 1.676 1.676 0 0 0-.672-.266c-.25-.042-.63-.063-1.14-.063H7.158V25h2.193zm.142-3.88H8.46v-1.49h.747c.612 0 .983.007 1.112.022.217.026.38.102.49.226.11.125.165.287.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 11.47 11.47 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05c.592 0 .977.03 1.154.092.177.062.313.16.406.295a.84.84 0 0 1 .14.492c0 .228-.06.41-.181.547a.806.806 0 0 1-.473.257c-.126.026-.423.04-.892.04zM14.88 25v-1.235h-1.234V25h1.234zm-5.018 9.11c.691 0 1.262-.17 1.711-.512.45-.341.772-.864.965-1.567l-1.261-.4c-.109.472-.287.818-.536 1.037-.25.22-.547.33-.892.33-.47 0-.85-.173-1.143-.519-.293-.345-.44-.925-.44-1.74 0-.767.15-1.322.447-1.665.297-.343.684-.514 1.162-.514.346 0 .64.096.881.29.242.193.4.457.477.79l1.288-.307c-.147-.516-.367-.911-.66-1.187-.492-.465-1.132-.698-1.92-.698-.902 0-1.63.296-2.184.89-.554.593-.83 1.426-.83 2.498 0 1.014.275 1.813.825 2.397.551.585 1.254.877 2.11.877zM14.88 34v-1.235h-1.234V34h1.234z"/></svg>'}]}))}}function J({editor:t,parentCommandName:e,buttonLabel:i,buttonIcon:n,toolbarAriaLabel:o,styleDefinitions:s}){const r=t.commands.get(e),l=t.commands.get("listStyle");return a=>{const c=Object(m.createDropdown)(a,m.SplitButtonView),d=c.buttonView,u=function({editor:t,listStyleCommand:e,parentCommandName:i}){const n=t.locale,o=t.commands.get(i);return({label:s,type:r,icon:l,tooltip:a})=>{const c=new m.ButtonView(n);return c.set({label:s,icon:l,tooltip:a}),e.on("change:value",()=>{c.isOn=e.value===r}),c.on("execute",()=>{o.value?e.value!==r?t.execute("listStyle",{type:r}):t.execute("listStyle",{type:e._defaultType}):t.model.change(()=>{t.execute(i),t.execute("listStyle",{type:r})}),t.editing.view.focus()}),c}}({editor:t,parentCommandName:e,listStyleCommand:l});return Object(m.addToolbarToDropdown)(c,s.map(u)),c.bind("isEnabled").to(r),c.toolbarView.ariaLabel=o,c.class="ck-list-styles-dropdown",d.on("execute",()=>{t.execute(e),t.editing.view.focus()}),d.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),d.bind("isOn").to(r,"value",t=>!!t),c}}class G extends n.Plugin{static get requires(){return[F,Y]}static get pluginName(){return"ListStyle"}}class Q extends n.Command{constructor(t){super(t),this._selectedElements=[],this.on("execute",()=>{this.refresh()},{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every(t=>!!t.getAttribute("todoListChecked")),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const t=this.editor.model,e=t.schema,i=t.document.selection.getFirstRange(),n=i.start.parent,o=[];e.checkAttribute(n,"todoListChecked")&&o.push(n);for(const t of i.getItems())e.checkAttribute(t,"todoListChecked")&&!o.includes(t)&&o.push(t);return o}execute(t={}){this.editor.model.change(e=>{for(const i of this._selectedElements){(void 0===t.forceValue?!this.value:t.forceValue)?e.setAttribute("todoListChecked",!0,i):e.removeAttribute("todoListChecked",i)}})}}function X(t,e,i){const n=e.modelCursor,o=n.parent,s=e.viewItem;if("checkbox"!=s.getAttribute("type")||"listItem"!=o.name||!n.isAtStart)return;if(!i.consumable.consume(s,{name:!0}))return;const r=i.writer;r.setAttribute("listType","todo",o),e.viewItem.hasAttribute("checked")&&r.setAttribute("todoListChecked",!0,o),e.modelRange=r.createRange(n)}function Z(t){return(e,i)=>{const n=i.modelPosition,o=n.parent;if(!o.is("element","listItem")||"todo"!=o.getAttribute("listType"))return;const s=et(i.mapper.toViewElement(o),t);s&&(i.viewPosition=i.mapper.findPositionIn(s,n.offset))}}function tt(t,e,i,n){return e.createUIElement("label",{class:"todo-list__label",contenteditable:!1},(function(e){const s=Object(o.createElement)(document,"input",{type:"checkbox"});i&&s.setAttribute("checked","checked"),s.addEventListener("change",()=>n(t));const r=this.toDomElement(e);return r.appendChild(s),r}))}function et(t,e){const i=e.createRangeIn(t);for(const t of i)if(t.item.is("containerElement","span")&&t.item.hasClass("todo-list__label__description"))return t.item}const it=Object(o.parseKeystroke)("Ctrl+Enter");class nt extends n.Plugin{static get pluginName(){return"TodoListEditing"}static get requires(){return[M]}init(){const t=this.editor,{editing:e,data:i,model:n}=t;n.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),n.schema.addAttributeCheck((t,e)=>{const i=t.last;if("todoListChecked"==e&&"listItem"==i.name&&"todo"!=i.getAttribute("listType"))return!1}),t.commands.add("todoList",new s(t,"todo"));const r=new Q(t);var l,a;t.commands.add("checkTodoList",r),t.commands.add("todoListCheck",r),i.downcastDispatcher.on("insert:listItem",function(t){return(e,i,n)=>{const o=n.consumable;if(!o.test(i.item,"insert")||!o.test(i.item,"attribute:listType")||!o.test(i.item,"attribute:listIndent"))return;if("todo"!=i.item.getAttribute("listType"))return;const s=i.item;o.consume(s,"insert"),o.consume(s,"attribute:listType"),o.consume(s,"attribute:listIndent"),o.consume(s,"attribute:todoListChecked");const r=n.writer,l=g(s,n);r.addClass("todo-list",l.parent);const a=r.createContainerElement("label",{class:"todo-list__label"}),c=r.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),d=r.createContainerElement("span",{class:"todo-list__label__description"});s.getAttribute("todoListChecked")&&r.setAttribute("checked","checked",c),r.insert(r.createPositionAt(l,0),a),r.insert(r.createPositionAt(a,0),c),r.insert(r.createPositionAfter(c),d),p(s,l,n,t)}}(n),{priority:"high"}),i.upcastDispatcher.on("element:input",X,{priority:"high"}),e.downcastDispatcher.on("insert:listItem",function(t,e){return(i,n,o)=>{const s=o.consumable;if(!s.test(n.item,"insert")||!s.test(n.item,"attribute:listType")||!s.test(n.item,"attribute:listIndent"))return;if("todo"!=n.item.getAttribute("listType"))return;const r=n.item;s.consume(r,"insert"),s.consume(r,"attribute:listType"),s.consume(r,"attribute:listIndent"),s.consume(r,"attribute:todoListChecked");const l=o.writer,a=g(r,o),c=!!r.getAttribute("todoListChecked"),d=tt(r,l,c,e),u=l.createContainerElement("span",{class:"todo-list__label__description"});l.addClass("todo-list",a.parent),l.insert(l.createPositionAt(a,0),d),l.insert(l.createPositionAfter(d),u),p(r,a,o,t)}}(n,t=>this._handleCheckmarkChange(t)),{priority:"high"}),e.downcastDispatcher.on("attribute:listType:listItem",(l=t=>this._handleCheckmarkChange(t),a=e.view,(t,e,i)=>{const n=i.mapper.toViewElement(e.item),o=i.writer,s=function(t,e){const i=e.createRangeIn(t);for(const t of i)if(t.item.is("uiElement","label"))return t.item}(n,a);if("todo"==e.attributeNewValue){const t=!!e.item.getAttribute("todoListChecked"),i=tt(e.item,o,t,l),s=o.createContainerElement("span",{class:"todo-list__label__description"}),r=o.createRangeIn(n),a=y(n),c=f(r.start),d=a?o.createPositionBefore(a):r.end,u=o.createRange(c,d);o.addClass("todo-list",n.parent),o.move(u,o.createPositionAt(s,0)),o.insert(o.createPositionAt(n,0),i),o.insert(o.createPositionAfter(i),s)}else if("todo"==e.attributeOldValue){const t=et(n,a);o.removeClass("todo-list",n.parent),o.remove(s),o.move(o.createRangeIn(t),o.createPositionBefore(t)),o.remove(t)}})),e.downcastDispatcher.on("attribute:todoListChecked:listItem",function(t){return(e,i,n)=>{if("todo"!=i.item.getAttribute("listType"))return;if(!n.consumable.consume(i.item,"attribute:todoListChecked"))return;const{mapper:o,writer:s}=n,r=!!i.item.getAttribute("todoListChecked"),l=o.toViewElement(i.item).getChild(0),a=tt(i.item,s,r,t);s.insert(s.createPositionAfter(l),a),s.remove(l)}}(t=>this._handleCheckmarkChange(t))),e.mapper.on("modelToViewPosition",Z(e.view)),i.mapper.on("modelToViewPosition",Z(e.view)),this.listenTo(e.view.document,"arrowKey",function(t,e){return(i,n)=>{if("left"!=Object(o.getLocalizedArrowKeyCodeDirection)(n.keyCode,e.contentLanguageDirection))return;const s=t.schema,r=t.document.selection;if(!r.isCollapsed)return;const l=r.getFirstPosition(),a=l.parent;if("listItem"===a.name&&"todo"==a.getAttribute("listType")&&l.isAtStart){const e=s.getNearestSelectionRange(t.createPositionBefore(a),"backward");e&&t.change(t=>t.setSelection(e)),n.preventDefault(),n.stopPropagation(),i.stop()}}}(n,t.locale),{context:"li"}),this.listenTo(e.view.document,"keydown",(e,i)=>{Object(o.getCode)(i)===it&&(t.execute("checkTodoList"),e.stop())},{priority:"high"});const c=new Set;this.listenTo(n,"applyOperation",(t,e)=>{const i=e[0];if("rename"==i.type&&"listItem"==i.oldName){const t=i.position.nodeAfter;t.hasAttribute("todoListChecked")&&c.add(t)}else if("changeAttribute"==i.type&&"listType"==i.key&&"todo"===i.oldValue)for(const t of i.range.getItems())t.hasAttribute("todoListChecked")&&"todo"!==t.getAttribute("listType")&&c.add(t)}),n.document.registerPostFixer(t=>{let e=!1;for(const i of c)t.removeAttribute("todoListChecked",i),e=!0;return c.clear(),e})}_handleCheckmarkChange(t){const e=this.editor,i=e.model,n=Array.from(i.document.selection.getRanges());i.change(i=>{i.setSelection(t,"end"),e.execute("checkTodoList"),i.setSelection(n)})}}class ot extends n.Plugin{static get pluginName(){return"TodoListUI"}init(){const t=this.editor.t;v(this.editor,"todoList",t("To-do List"),'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m2.315 14.705 2.224-2.24a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .949L2.865 16.07a.682.682 0 0 1-.112.089.647.647 0 0 1-.852-.051L.688 14.886a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.717.722zm5.185.045a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75zM2.329 5.745l2.21-2.226a.689.689 0 0 1 .963 0 .664.664 0 0 1 0 .95L2.865 7.125a.685.685 0 0 1-.496.196.644.644 0 0 1-.468-.187L.688 5.912a.635.635 0 0 1 0-.903.647.647 0 0 1 .91 0l.73.736zM7.5 5.75A.75.75 0 0 1 8.25 5h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z"/></svg>')}}i(10);class st extends n.Plugin{static get requires(){return[nt,ot]}static get pluginName(){return"TodoList"}}}]);
{
"name": "@ckeditor/ckeditor5-list",
"version": "29.1.0",
"version": "29.2.0",
"description": "Ordered and unordered lists feature to CKEditor 5.",

@@ -15,27 +15,27 @@ "keywords": [

"dependencies": {
"ckeditor5": "^29.1.0"
"ckeditor5": "^29.2.0"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "^29.1.0",
"@ckeditor/ckeditor5-block-quote": "^29.1.0",
"@ckeditor/ckeditor5-clipboard": "^29.1.0",
"@ckeditor/ckeditor5-core": "^29.1.0",
"@ckeditor/ckeditor5-dev-utils": "^25.3.0",
"@ckeditor/ckeditor5-editor-classic": "^29.1.0",
"@ckeditor/ckeditor5-engine": "^29.1.0",
"@ckeditor/ckeditor5-enter": "^29.1.0",
"@ckeditor/ckeditor5-essentials": "^29.1.0",
"@ckeditor/ckeditor5-font": "^29.1.0",
"@ckeditor/ckeditor5-heading": "^29.1.0",
"@ckeditor/ckeditor5-highlight": "^29.1.0",
"@ckeditor/ckeditor5-indent": "^29.1.0",
"@ckeditor/ckeditor5-link": "^29.1.0",
"@ckeditor/ckeditor5-paragraph": "^29.1.0",
"@ckeditor/ckeditor5-remove-format": "^29.1.0",
"@ckeditor/ckeditor5-table": "^29.1.0",
"@ckeditor/ckeditor5-theme-lark": "^29.1.0",
"@ckeditor/ckeditor5-typing": "^29.1.0",
"@ckeditor/ckeditor5-ui": "^29.1.0",
"@ckeditor/ckeditor5-undo": "^29.1.0",
"@ckeditor/ckeditor5-utils": "^29.1.0",
"@ckeditor/ckeditor5-basic-styles": "^29.2.0",
"@ckeditor/ckeditor5-block-quote": "^29.2.0",
"@ckeditor/ckeditor5-clipboard": "^29.2.0",
"@ckeditor/ckeditor5-core": "^29.2.0",
"@ckeditor/ckeditor5-dev-utils": "^25.4.0",
"@ckeditor/ckeditor5-editor-classic": "^29.2.0",
"@ckeditor/ckeditor5-engine": "^29.2.0",
"@ckeditor/ckeditor5-enter": "^29.2.0",
"@ckeditor/ckeditor5-essentials": "^29.2.0",
"@ckeditor/ckeditor5-font": "^29.2.0",
"@ckeditor/ckeditor5-heading": "^29.2.0",
"@ckeditor/ckeditor5-highlight": "^29.2.0",
"@ckeditor/ckeditor5-indent": "^29.2.0",
"@ckeditor/ckeditor5-link": "^29.2.0",
"@ckeditor/ckeditor5-paragraph": "^29.2.0",
"@ckeditor/ckeditor5-remove-format": "^29.2.0",
"@ckeditor/ckeditor5-table": "^29.2.0",
"@ckeditor/ckeditor5-theme-lark": "^29.2.0",
"@ckeditor/ckeditor5-typing": "^29.2.0",
"@ckeditor/ckeditor5-ui": "^29.2.0",
"@ckeditor/ckeditor5-undo": "^29.2.0",
"@ckeditor/ckeditor5-utils": "^29.2.0",
"webpack": "^4.43.0",

@@ -42,0 +42,0 @@ "webpack-cli": "^3.3.11"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc