PageSourceSearch

https://travelthru.com/_next/static/chunks/47a4d693-847fa845b8eeefc8.js

js travelthru.com collected 2026-10-07 06:12:50 UTC 52,798 bytes, 1 lines download raw bytes

1!function(){try{var t="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="052f2d9f-531b-449b-9d1d-fa193112af3c",t._sentryDebugIdIdentifier="sentry-dbid-052f2d9f-531b-449b-9d1d-fa193112af3c")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6133],{51944:(t,e,i)=>{i.d(e,{B8:()=>tu,an:()=>p,t0:()=>t_});var r=i(49873),n=i(68456),s=i(27438),l=i(6351),o=i(60079),a=i(70309),u=i(74050),d=i(64862),c=(i(57527),i(7554));class m{_startElement;_referenceIndent;_isForward;_includeSelf;_sameAttributes;_sameIndent;_lowerIndent;_higherIndent;constructor(t,e){this._startElement=t,this._referenceIndent=t.getAttribute("listIndent"),this._isForward="forward"==e.direction,this._includeSelf=!!e.includeSelf,this._sameAttributes=(0,l.$r)(e.sameAttributes||[]),this._sameIndent=!!e.sameIndent,this._lowerIndent=!!e.lowerIndent,this._higherIndent=!!e.higherIndent}static first(t,e){let i=new this(t,e)[Symbol.iterator]();return(0,l.$1)(i)}*[Symbol.iterator](){let t=[];for(let{node:e}of new f(this._getStartNode(),this._isForward?"forward":"backward")){let i=e.getAttribute("listIndent");if(i<this._referenceIndent){if(!this._lowerIndent)break;this._referenceIndent=i}else if(i>this._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){t.push(e);continue}}else{if(!this._sameIndent){if(this._higherIndent){t.length&&(yield*t,t.length=0);break}continue}if(this._sameAttributes.some(t=>e.getAttribute(t)!==this._startElement.getAttribute(t)))break}t.length&&(yield*t,t.length=0),yield e}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}class f{_node;_isForward;_previousNodesByIndent=[];_previous=null;_previousNodeIndent=null;constructor(t,e="forward"){this._node=t,this._isForward="forward"===e}[Symbol.iterator](){return this}next(){if(!p(this._node))return{done:!0,value:void 0};let t=this._node.getAttribute("listIndent"),e=null;if(this._previous){let i=this._previousNodeIndent;t>i?this._previousNodesByIndent[i]=this._previous:t<i?(e=this._previousNodesByIndent[t]||null,this._previousNodesByIndent.length=t):e=this._previous}let i={node:this._node,previous:this._previous,previousNodeInList:e};return this._previous=this._node,this._previousNodeIndent=t,this._node=this._isForward?this._node.nextSibling:this._node.previousSibling,{value:i,done:!1}}}class g{_listHead;constructor(t){this._listHead=t}[Symbol.iterator](){return new f(this._listHead)}}class h{static next(){return(0,l.Ld)()}}function p(t){return!!t&&t.is("element")&&t.hasAttribute("listItemId")}function b(t,e={}){return[...I(t,{...e,direction:"backward"}),...I(t,{...e,direction:"forward"})]}function I(t,e={}){let i="forward"==e.direction,r=Array.from(new m(t,{...e,includeSelf:i,sameIndent:!0,sameAttributes:"listItemId"}));return i?r:r.reverse()}function A(t,e){let i=new m(t,{sameIndent:!0,sameAttributes:"listType",...e}),r=new m(t,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward",...e});return[...Array.from(i).reverse(),...r]}function y(t){return!m.first(t,{sameIndent:!0,sameAttributes:"listItemId"})}function k(t){return!m.first(t,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function w(t,e={}){t=(0,l.$r)(t);let i=!1!==e.withNested,r=new Set;for(let e of t)for(let t of b(e,{higherIndent:i}))r.add(t);return C(r)}function _(t){t=(0,l.$r)(t);let e=new Set;for(let i of t)for(let t of A(i))e.add(t);return C(e)}function v(t,e){let i=I(t,{direction:"forward"}),r=h.next();for(let t of i)e.setAttribute("listItemId",r,t);return i}function S(t,e,i){let r={};for(let[t,i]of e.getAttributes())t.startsWith("list")&&(r[t]=i);let n=I(t,{direction:"forward"});for(let t of n)i.setAttributes(r,t);return n}function E(t,e,{expand:i,indentBy:r=1,attributeNames:n}){t=(0,l.$r)(t);let s=i?w(t):t;for(let t of s){let i=t.getAttribute("listIndent")+r;i<0?L(t,e,n):e.setAttribute("listIndent",i,t)}return s}function L(t,e,i){for(let i of t=(0,l.$r)(t))i.is("element","listItem")&&e.rename(i,"paragraph");for(let r of t)for(let t of r.getAttributeKeys())i.includes(t)&&e.removeAttribute(t,r);return t}function x(t){if(!t.length)return!1;let e=t[0].getAttribute("listItemId");return!!e&&!t.some(t=>t.getAttribute("listItemId")!=e)}function C(t){return Array.from(t).filter(t=>"$graveyard"!==t.root.rootName).sort((t,e)=>t.index-e.index)}function T(t){let e=t.document.selection.getSelectedElement();return e&&t.schema.isObject(e)&&t.schema.isBlock(e)?e:null}function F(t,e){return e.checkChild(t.parent,"listItem")&&e.checkChild(t,"$text")&&!e.isObject(t)}function P(t){return"numbered"==t||"customNumbered"==t}class B extends r.uB{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){let t=this.editor,e=t.model,i=N(e.document.selection),r=t.plugins.get("ListEditing").getListAttributeNames();e.change(t=>{let e=[];for(let n of(x(i)&&!y(i[0])?("forward"==this._direction&&e.push(...E(i,t,{attributeNames:r})),e.push(...v(i[0],t))):"forward"==this._direction?e.push(...E(i,t,{expand:!0,attributeNames:r})):e.push(...function(t,e,{attributeNames:i}){let r=w(t=(0,l.$r)(t)),n=new Set,s=Math.min(...r.map(t=>t.getAttribute("listIndent"))),o=new Map;for(let t of r)o.set(t,m.first(t,{lowerIndent:!0}));for(let t of r){if(n.has(t))continue;n.add(t);let r=t.getAttribute("listIndent")-1;if(r<0){L(t,e,i);continue}if(t.getAttribute("listIndent")==s&&o.get(t)){var a,u,d;let i=(a=t,u=o.get(t),d=e,I(u,{direction:"forward"}).pop().index>a.index?S(a,u,d):[]);for(let t of i)n.add(t);if(i.length)continue}e.setAttribute("listIndent",r,t)}return C(n)}(i,t,{attributeNames:r})),e)){if(!n.hasAttribute("listType"))continue;let e=m.first(n,{sameIndent:!0});e&&t.setAttribute("listType",e.getAttribute("listType"),n)}this._fireAfterExecute(e)})}_fireAfterExecute(t){this.fire("afterExecute",C(new Set(t)))}_checkEnabled(){let t=N(this.editor.model.document.selection),e=t[0];if(!e)return!1;if("backward"==this._direction||x(t)&&!y(t[0])||this.editor.config.get("list.enableSkipLevelLists"))return!0;e=(t=w(t))[0];let i=m.first(e,{sameIndent:!0});return!!i&&i.getAttribute("listType")==e.getAttribute("listType")}}function N(t){let e=Array.from(t.getSelectedBlocks()),i=e.findIndex(t=>!p(t));return -1!=i&&(e.length=i),e}class O extends r.uB{type;_listWalkerOptions;constructor(t,e,i={}){super(t),this.type=e,this._listWalkerOptions=i.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){let e=this.editor.model,i=e.document,r=T(e),n=Array.from(i.selection.getSelectedBlocks()).filter(t=>e.schema.checkAttribute(t,"listType")||F(t,e.schema)),s=void 0!==t.forceValue?!t.forceValue:this.value;e.change(l=>{if(s){let t=n[n.length-1],e=this.editor.plugins.get("ListEditing").getListAttributeNames(),i=I(t,{direction:"forward"}),r=[];i.length>1&&r.push(...v(i[1],l)),r.push(...L(n,l,e)),r.push(...function(t,e){let i=[],r=1/0;for(let{node:n}
1of new f(t.nextSibling)){let t=n.getAttribute("listIndent");if(0==t)break;t<r&&(r=t);let s=t-r;e.setAttribute("listIndent",s,n),i.push(n)}return i}(t,l)),this._fireAfterExecute(r)}else if((r||i.selection.isCollapsed)&&p(n[0])){let e=A(r||n[0],this._listWalkerOptions);for(let i of e)l.setAttributes({...t.additionalAttributes,listType:this.type},i);this._fireAfterExecute(e)}else{let i=[];for(let r of n)if(r.hasAttribute("listType"))for(let e of w(r,{withNested:!1}))e.getAttribute("listType")!=this.type&&(l.setAttributes({...t.additionalAttributes,listType:this.type},e),i.push(e));else!r.is("element","listItem")&&F(r,e.schema)&&l.rename(r,"listItem"),l.setAttributes({...t.additionalAttributes,listIndent:0,listItemId:h.next(),listType:this.type},r),i.push(r);this._fireAfterExecute(i)}})}_fireAfterExecute(t){this.fire("afterExecute",C(new Set(t)))}_getValue(){let t=Array.from(this.editor.model.document.selection.getSelectedBlocks());if(!t.length)return!1;for(let e of t)if(e.getAttribute("listType")!=this.type)return!1;return!0}_checkEnabled(){let t=this.editor.model,e=t.schema,i=Array.from(t.document.selection.getSelectedBlocks());if(!i.length)return!1;if(this.value)return!0;for(let t of i)if(e.checkAttribute(t,"listType")||F(t,e))return!0;return!1}}class $ extends r.uB{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute({shouldMergeOnBlocksContentLevel:t=!1}={}){let e=this.editor,i=e.model,r=i.document.selection,n=[],s=e.plugins.get("ListEditing").getListAttributeNames();i.change(e=>{let{firstElement:l,lastElement:o}=this._getMergeSubjectElements(r,t);if(!l||!o)return;let a=l.getAttribute("listIndent")||0,u=o.getAttribute("listIndent"),d=o.getAttribute("listItemId");if(a!=u){let t=Array.from(new m(o,{direction:"forward",higherIndent:!0}));n.push(...E([o,...t],e,{indentBy:a-u,expand:a<u,attributeNames:s}))}if(t){let t=r;r.isCollapsed&&(t=e.createSelection(e.createRange(e.createPositionAt(l,"end"),e.createPositionAt(o,0)))),i.deleteContent(t,{doNotResetEntireContent:r.isCollapsed});let s=t.getLastPosition().parent,a=s.nextSibling;n.push(s),a&&a!==o&&a.getAttribute("listItemId")==d&&n.push(...S(a,s,e))}else n.push(...S(o,l,e));this._fireAfterExecute(n)})}_fireAfterExecute(t){this.fire("afterExecute",C(new Set(t)))}_checkEnabled(){let t=this.editor.model,e=t.document.selection,i=T(t);if(e.isCollapsed||i){let t=i||e.getFirstPosition().parent;if(!p(t))return!1;let r="backward"==this._direction?t.previousSibling:t.nextSibling;if(!r||x([t,r]))return!1}else{let t=e.getLastPosition(),i=e.getFirstPosition();if(t.parent===i.parent||!p(t.parent))return!1}return!0}_getMergeSubjectElements(t,e){let i,r,n=T(this.editor.model);if(t.isCollapsed||n){let s=n||t.getFirstPosition().parent,l=y(s);"backward"==this._direction?(r=s,l&&!e?!(i=m.first(s,{sameIndent:!0,lowerIndent:!0}))&&p(s.previousSibling)&&(i=s.previousSibling):i=s.previousSibling):(i=s,r=s.nextSibling)}else i=t.getFirstPosition().parent,r=t.getLastPosition().parent;return{firstElement:i,lastElement:r}}}class D extends r.uB{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){this.editor.model.change(t=>{let e=v(this._getStartBlock(),t);this._fireAfterExecute(e)})}_fireAfterExecute(t){this.fire("afterExecute",C(new Set(t)))}_checkEnabled(){let t=this.editor.model.document.selection,e=this._getStartBlock();return t.isCollapsed&&p(e)&&!y(e)}_getStartBlock(){let t=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?t:t.nextSibling}}class M extends r.k_{static get pluginName(){return"ListItemBoldIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[tn]}init(){let t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(tn);t.plugins.has("BoldEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("bold","listItemBold"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemBold",setAttributeOnDowncast(t,e,i,r){e&&(t.addClass("ck-list-marker-bold",i),l._K.isSafari&&!(r&&r.dataPipeline)&&t.setStyle("--ck-content-list-marker-dummy-bold","0",i))}}))}afterInit(){let t=this.editor,e=t.model;t.plugins.has("BoldEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemBold"}),e.schema.setAttributeProperties("listItemBold",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemBold"),t.conversion.for("upcast").attributeToAttribute({model:"listItemBold",view:{name:"li",classes:"ck-list-marker-bold"}}))}}class R extends r.k_{static get pluginName(){return"ListItemItalicIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[tn]}init(){let t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(tn);t.plugins.has("ItalicEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("italic","listItemItalic"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemItalic",setAttributeOnDowncast(t,e,i,r){e&&(t.addClass("ck-list-marker-italic",i),l._K.isSafari&&!(r&&r.dataPipeline)&&t.setStyle("--ck-content-list-marker-dummy-italic","0",i))}}))}afterInit(){let t=this.editor,e=t.model;t.plugins.has("ItalicEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemItalic"}),e.schema.setAttributeProperties("listItemItalic",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemItalic"),t.conversion.for("upcast").attributeToAttribute({model:"listItemItalic",view:{name:"li",classes:"ck-list-marker-italic"}}))}}class z extends r.k_{static get pluginName(){return"ListItemFontSizeIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[tn]}init(){let t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(tn);if(!t.plugins.has("FontSizeEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting"))return;let r=(0,o.zJ)(t.config.get("fontSize.options"));e.registerFormatAttribute("fontSize","listItemFontSize"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontSize",setAttributeOnDowncast(t,e,i,n){if(e){let s=r.find(t=>t.model==e);s&&s.view&&"string"!=typeof s.view?s.view.styles?(t.addClass("ck-list-marker-font-size",i),t.setStyle("--ck-content-list-marker-font-size",s.view.styles["font-size"],i)):s.view.classes&&(t.addClass(`ck-list-marker-font-size-${e}`,i),l._K.isSafari&&!(n&&n.dataPipeline)&&t.setStyle("--ck-content-list-marker-dummy-font-size","0",i)):(t.addClass("ck-list-marker-font-size",i),t.setStyle("--ck-content-list-marker-font-size",e,i))}}})}afterInit(){let t=this.editor,e=t.model;if(t.plugins.has("FontSizeEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting"))for(let i of(e.schema.extend("$listItem",{allowAttributes:"listItemFontSize"}),e.schema.setAttributeProperties("listItemFontSize",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemFontSize"),t.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:t=>t.getStyle("--ck-content-list-marker-font-size")},view:{name:"li",classes:"ck-list-marker-font-size",styles:{"--ck-content-list-marker-font-size":/.*/}}}),(0,o.zJ)(t.config.get("fontSize.options"))))i.model&&i.view&&t.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:i.model},view:{name:"li",classes:`ck-list-marker-font-size-${i.model}`}})}}class V extends r.k_{static get pluginName(){return"ListItemFontColorIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[tn]}init(){let t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(tn);t.plugins.has("FontColorEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("fontColor","listItemFontColor"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontColor",setAttributeOnDowncast(t,e,i){e&&(t.addClass("ck-list-marker-color",i),t.setStyle("--ck-content-list-marker-color",e,i))}}))}afterInit(){let t=this.editor,e=t.model;t.plugins.has("FontColorEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemFontColor"}),e.schema.setAttributeProperties("listItemFontColor",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemFontColor"),t.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontColor",value:t=>t.getStyle("--ck-content-list-marker-color")},view:{name:"li",classes:"ck-list-marker-color",styles:{"--ck-content-list-marker-color":/.*/}}}))}}class K extends r.k_{static get pluginName(){return"ListItemFontFamilyIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[tn]}init(){let t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(tn);t.plugins.has("FontFamilyEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("fontFamily","listItemFontFamily"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontFamily",setAttributeOnDowncast(t,e,i){e&&(t.addClass("ck-list-marker-font-family",
1i),t.setStyle("--ck-content-list-marker-font-family",e,i))}}))}afterInit(){let t=this.editor,e=t.model;t.plugins.has("FontFamilyEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemFontFamily"}),e.schema.setAttributeProperties("listItemFontFamily",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemFontFamily"),t.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontFamily",value:t=>t.getStyle("--ck-content-list-marker-font-family")},view:{name:"li",classes:"ck-list-marker-font-family",styles:{"--ck-content-list-marker-font-family":/.*/}}}))}}class j extends r.k_{_loadedFormatting={};static get pluginName(){return"ListFormatting"}static get isOfficialPlugin(){return!0}static get requires(){return[M,R,z,V,K]}constructor(t){super(t),t.config.define("list.enableListItemMarkerFormatting",!0)}afterInit(){this.editor.config.get("list.enableListItemMarkerFormatting")&&this._registerPostfixerForListItemFormatting()}_registerPostfixerForListItemFormatting(){let t=this.editor.model;t.document.registerPostFixer(e=>{let i=t.document.differ.getChanges(),r=new Set,n=!1;for(let t of i)if("attribute"===t.type)("listItemId"==t.attributeKey||"listType"==t.attributeKey||this._isInlineOrSelectionFormatting(t.attributeKey)||Object.values(this._loadedFormatting).includes(t.attributeKey))&&(p(t.range.start.nodeAfter)?r.add(t.range.start.nodeAfter):p(t.range.start.parent)&&r.add(t.range.start.parent));else if(p(t.position.nodeAfter)&&r.add(t.position.nodeAfter),p(t.position.nodeBefore)&&r.add(t.position.nodeBefore),p(t.position.parent)&&r.add(t.position.parent),"insert"==t.type&&"$text"!=t.name)for(let i of e.createRangeIn(t.position.nodeAfter).getItems())p(i)&&r.add(i);for(let i of r){var s,l,o;for(let[r,a]of Object.entries((s=t,l=i,o=Object.keys(this._loadedFormatting),y(l)?W(s,l,o):W(s,b(l)[0],o)))){let t=this._loadedFormatting[r];a&&function(t,e,i,r){let n=b(e),s=!1;for(let e of n)e.hasAttribute(i)&&e.getAttribute(i)===r||(t.setAttribute(i,r,e),s=!0);return s}(e,i,t,a)?n=!0:!a&&function(t,e,i){let r=b(e),n=!1;for(let e of r)e.hasAttribute(i)&&(t.removeAttribute(i,e),n=!0);return n}(e,i,t)&&(n=!0)}}return n})}registerFormatAttribute(t,e){this._loadedFormatting[t]=e}_isInlineOrSelectionFormatting(t){return t.replace(/^selection:/,"")in this._loadedFormatting}}function W(t,e,i){if(!["numbered","bulleted","customNumbered","customBulleted"].includes(e.getAttribute("listType"))||t.schema.isLimit(e))return Object.fromEntries(i.map(t=>[t]));if(e.isEmpty)return Object.fromEntries(i.map(t=>[t,e.getAttribute(`selection:${t}`)]));let r=new Set(i),n={},s=t.createRangeIn(e).getWalker({ignoreElementEnd:!0});for(let{item:e}of s){for(let i of r)if(t.schema.checkAttribute(e,i)){let t=e.getAttribute(i);void 0===t?(r.delete(i),n[i]=void 0):void 0===n[i]?n[i]=t:n[i]!==t&&(r.delete(i),n[i]=void 0)}else i in n||(n[i]=void 0);if(!r.size)break;t.schema.isLimit(e)&&s.jumpTo(t.createPositionAfter(e))}return n}class q extends r.k_{static get pluginName(){return"ListUtils"}static get isOfficialPlugin(){return!0}expandListBlocksToCompleteList(t){return _(t)}isFirstBlockOfListItem(t){return y(t)}isListItemBlock(t){return p(t)}expandListBlocksToCompleteItems(t,e={}){return w(t,e)}isNumberedListType(t){return P(t)}isFirstListItemInList(t){return function(t){let e=t.getAttribute("listIndent"),i=t.getAttribute("listType"),r=t.getAttribute("listItemId"),n=t.previousSibling,s=!1;for(;p(n);){let t=n.getAttribute("listIndent");if(t<e)return!0;if(t===e){if(n.getAttribute("listItemId")===r)return!1;return n.getAttribute("listType")!==i}s=!0,n=n.previousSibling}return!s}(t)}}function U(t){return t.is("element","li")}function H(t,e,i,r=G(i,e)){return t.createAttributeElement(X(i),null,{priority:2*e/100-100,id:r})}function J(t,e,i){return t.createAttributeElement("li",null,{priority:(2*e+1)/100-100,id:i})}function X(t){return"numbered"==t||"customNumbered"==t?"ol":"ul"}function G(t,e){return`list-${t}-${e}`}function Q(t,e,i){let r=t.nodeBefore;if(p(r)){let t=r;for(let{node:n}of new f(t,"backward"))if(t=n,i.has(t)||(i.add(t),e.has(r)))return;e.add(t)}else{let i=t.nodeAfter;p(i)&&e.add(i)}}function Y(t,e,i,{dataPipeline:r,enableSkipLevelLists:n}){var s;let l,o=(s=t,l=e.filter(t=>!1===t.consume).map(t=>t.attributeName),(t,e)=>{let i=[];for(let e of s)t.hasAttribute(e)&&!l.includes(e)&&i.push(`attribute:${e}`);return!!i.every(i=>!1!==e.test(t,i))&&(i.forEach(i=>
1e.consume(t,i)),!0)});return(s,l,a)=>{let{writer:u,mapper:d,consumable:c}=a,f=l.item;if(!t.includes(l.attributeKey)||!o(f,c))return;let g={...a.options,dataPipeline:r,enableSkipLevelLists:n},h=function(t,e,i,r){let n=i.createRangeOn(t),s=e.toViewRange(n).getTrimmed().getWalker();for(let{item:t}of s)if(t.is("element")&&t.getCustomProperty("listItemMarker"))s.jumpTo(r.createPositionAfter(t));else if(t.is("element")&&!t.getCustomProperty("listItemWrapper"))return t}(f,d,i,u);tt(h,u,d),function(t,e){let i=t.parent;for(;i.is("attributeElement")&&["ul","ol","li"].includes(i.name);){let r=i.parent;e.unwrap(e.createRangeOn(t),i),i=r}}(h,u);let p=function(t,e,i,r,{dataPipeline:n}){let s=r.createRangeOn(e);if(!y(t))return s;for(let l of i){if("itemMarker"!=l.scope)continue;let i=l.createElement(r,t,{dataPipeline:n});if(!i||(r.setCustomProperty("listItemMarker",!0,i),l.canInjectMarkerIntoElement&&l.canInjectMarkerIntoElement(t)?r.insert(r.createPositionAt(e,0),i):(r.insert(s.start,i),s=r.createRange(r.createPositionBefore(i),r.createPositionAfter(e))),!l.createWrapperElement||!l.canWrapElement))continue;let o=l.createWrapperElement(r,t,{dataPipeline:n});r.setCustomProperty("listItemWrapper",!0,o),l.canWrapElement(t)?s=r.wrap(s,o):(s=r.wrap(r.createRangeOn(i),o),s=r.createRange(s.start,r.createPositionAfter(e)))}return s}(f,h,e,u,g);!function(t,e,i,r,n){if(!t.hasAttribute("listIndent"))return;let s=t.getAttribute("listIndent"),l=n.enableSkipLevelLists,o=t;for(let a=s;a>=0;a--){let s=o.getAttribute("listIndent")!==a;if(s){let s=te(t,a)||o,l=s.getAttribute("listType"),u=J(r,a,`list-item-skip-${a}`),d=H(r,a,l);for(let t of(r.setStyle("list-style-type","none",u),i))"list"==t.scope&&s.hasAttribute(t.attributeName)&&t.setAttributeOnDowncast(r,s.getAttribute(t.attributeName),d,n,s);e=r.wrap(e,u),e=r.wrap(e,d)}else{let t=J(r,a,o.getAttribute("listItemId")),s=H(r,a,o.getAttribute("listType"));for(let e of i)("list"==e.scope||"item"==e.scope)&&o.hasAttribute(e.attributeName)&&e.setAttributeOnDowncast(r,o.getAttribute(e.attributeName),"list"==e.scope?s:t,n,o);e=r.wrap(e,t),e=r.wrap(e,s)}if(0==a)break;if(!s){let t=m.first(o,{lowerIndent:!0});if(t)o=t;else if(!l)break}}}(f,p,e,u,g)}}function Z(t,{dataPipeline:e}={}){return(i,{writer:r})=>{if(!ti(i,t))return null;if(!e)return r.createContainerElement("span",{class:"ck-list-bogus-paragraph"});let n=r.createContainerElement("p");return r.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}function tt(t,e,i){for(;t.parent.is("attributeElement")&&t.parent.getCustomProperty("listItemWrapper");)e.unwrap(e.createRangeOn(t),t.parent);let r=[];for(let i of(n(e.createPositionBefore(t).getWalker({direction:"backward"})),n(e.createRangeIn(t).getWalker()),r))e.remove(i);function n(t){for(let{item:e}of t){if(e.is("element")&&i.toModelElement(e))break;e.is("element")&&e.getCustomProperty("listItemMarker")&&r.push(e)}}}function te(t,e){let i=t.nextSibling;for(;i&&p(i);){let t=i.getAttribute("listIndent");if(t<e)break;if(t===e)return i;i=i.nextSibling}return null}function ti(t,e,i=b(t)){if(!p(t))return!1;for(let i of t.getAttributeKeys())if(!i.startsWith("selection:")&&"htmlEmptyBlock"!=i&&!e.includes(i))return!1;return i.length<2}let tr=["listType","listIndent","listItemId"];class tn extends r.k_{_downcastStrategies=[];static get pluginName(){return"ListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[s.xy,n.ep,q,a.xz,j]}constructor(t){super(t),t.config.define("list.multiBlock",!0)}init(){let t=this.editor,e=t.model,i=t.config.get("list.multiBlock");if(t.plugins.has("LegacyListEditing"))throw new l.Yb("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});for(let t of(e.schema.register("$listItem",{allowAttributes:tr}),i?(e.schema.extend("$container",{allowAttributesOf:"$listItem"}),e.schema.extend("$block",{allowAttributesOf:"$listItem"}),e.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):e.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"}),tr))e.schema.setAttributeProperties(t,{copyOnReplace:!0});t.commands.add("numberedList",new O(t,"numbered")),t.commands.add("bulletedList",new O(t,"bulleted")),t.commands.add("customNumberedList",new O(t,"customNumbered",{multiLevel:!0})),t.commands.add("customBulletedList",new O(t,"customBulleted",{multiLevel:!0})),t.commands.add("indentList",new B(t,"forward")),t.commands.add("outde
1ntList",new B(t,"backward")),t.commands.add("splitListItemBefore",new D(t,"before")),t.commands.add("splitListItemAfter",new D(t,"after")),i&&(t.commands.add("mergeListItemBackward",new $(t,"backward")),t.commands.add("mergeListItemForward",new $(t,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration(),this._setupAccessibilityIntegration(),this._setupListItemIdConversionStrategy()}afterInit(){let t=this.editor.commands,e=t.get("indent"),i=t.get("outdent");e&&e.registerChildCommand(t.get("indentList"),{priority:"high"}),i&&i.registerChildCommand(t.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(t){this._downcastStrategies.push(t)}getListAttributeNames(){return[...tr,...this._downcastStrategies.map(t=>t.attributeName)]}_setupDeleteIntegration(){let t=this.editor,e=t.commands.get("mergeListItemBackward"),i=t.commands.get("mergeListItemForward");this.listenTo(t.editing.view.document,"delete",(r,n)=>{let s=t.model.document.selection;T(t.model)||t.model.change(()=>{let l=s.getFirstPosition();if(s.isCollapsed&&"backward"==n.direction){if(!l.isAtStart)return;let i=l.parent;if(!p(i))return;let s=m.first(i,{sameAttributes:"listType",sameIndent:!0}),o=0===i.getAttribute("listIndent")||!p(i.previousSibling);if(!s&&o)k(i)||t.execute("splitListItemAfter"),t.execute("outdentList");else{if(!e||!e.isEnabled)return;e.execute({shouldMergeOnBlocksContentLevel:ts(t.model,"backward")})}n.preventDefault(),r.stop()}else{if(s.isCollapsed&&!s.getLastPosition().isAtEnd||!i||!i.isEnabled)return;i.execute({shouldMergeOnBlocksContentLevel:ts(t.model,"forward")}),n.preventDefault(),r.stop()}})},{context:"li"})}_setupEnterIntegration(){let t=this.editor,e=t.model,i=t.commands,r=i.get("enter");this.listenTo(t.editing.view.document,"enter",(i,r)=>{let n=e.document,s=n.selection.getFirstPosition().parent;if(n.selection.isCollapsed&&p(s)&&s.isEmpty&&!r.isSoft){let e=y(s),n=k(s);e&&n?(t.execute("outdentList"),r.preventDefault(),i.stop()):e&&!n?(t.execute("splitListItemAfter"),r.preventDefault(),i.stop()):n&&(t.execute("splitListItemBefore"),r.preventDefault(),i.stop())}},{context:"li"}),this.listenTo(r,"afterExecute",()=>{let e=i.get("splitListItemBefore");e.refresh(),e.isEnabled&&2===b(t.model.document.selection.getLastPosition().parent).length&&e.execute()})}_setupTabIntegration(){let t=this.editor;this.listenTo(t.editing.view.document,"tab",(e,i)=>{let r=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(r).isEnabled&&(t.execute(r),i.stopPropagation(),i.preventDefault(),e.stop())},{context:"li"})}_setupConversion(){var t,e;let i=this.editor,r=i.model,n=this.getListAttributeNames(),s=i.config.get("list.multiBlock"),l=s?"paragraph":"listItem",o=!!i.config.get("list.enableSkipLevelLists");i.conversion.for("upcast").elementToElement({view:"li",model:(t,{writer:e})=>e.createElement(l,{listType:""})}).elementToElement({view:"p",model:(t,{writer:e})=>t.parent&&t.parent.is("element","li")?e.createElement(l,{listType:""}):null,converterPriority:"high"}).add(t=>{t.on("element:p",(t,e,i)=>{let r=e.viewItem;if(!r.parent||!r.parent.is("element","li")||r.isEmpty||!r.getAttributeKeys().next().done)return;for(let t of r.parent.getChildren())if(t!==r&&!(t.is("element","ol")||t.is("element","ul")))return;i.consumable.consume(r,{name:!0});let{modelRange:n,modelCursor:s}=i.convertChildren(r,e.modelCursor);e.modelRange=n,e.modelCursor=s},{priority:"highest"}),o&&t.on("element:li",(t,e,i)=>{let r=e.viewItem;if("none"!==r.getStyle("list-style-type")||!function(t){let e=!1;for(let i of t.getChildren()){if(i.is("element","ul")||i.is("element","ol")){e=!0;continue}return!1}return e}(r)||!i.consumable.consume(r,{name:!0}))return;let{modelRange:n,modelCursor:s}=i.convertChildren(r,e.modelCursor);e.modelRange=n,e.modelCursor=s},{priority:"high"}),t.on("element:li",(t,e,i)=>{let{writer:r,schema:n}=i;if(!e.modelRange)return;let s=Array.from(e.modelRange.getItems({shallow:!0})).filter(t=>n.checkAttribute(t,"listItemId"));if(!s.length||s.every(t=>t.hasAttribute("listItemId")))return;let l=e.viewItem.getAttribute("data-list-item-id")||h.next();i.consumable.consume(e.viewItem,{attributes:"data-list-item-id"});let o=function(t){let e=0,i=t.parent;for(;i;){if(U(i))e++;else{let t=i.previousSibling;t&&U(t)&&e++}i=i.parent}return e}(e.viewItem),a=e.viewItem.parent&&e.viewItem.parent.is("element","ol")?"numbered":"bulleted",u=s[0].getAttribute("listType");u&&(a=u);let d={listItemId:l,listIndent:o,listType:a};for(let t of s)t.hasAttribute("listItemId")||r.setAttributes(d,t);s.length>1&&s[1].getAttribute("listItemId")!=d.listItemId&&i.keepEmptyElement(s[0])})}),s||i.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),i.conversion.for("editingDowncast").elementToElement({model:l,view:Z(n),converterPriority:"high"}).add(t=>{var e;t.on("attribute",Y(n,this._downcastStrategies,r,{enableSkipLevelLists:o})),t.on("remove",(e=r.schema,(t,i,r)=>
1{let{writer:n,mapper:s}=r,l=t.name.split(":")[1];if(!e.checkAttribute(l,"listItemId"))return;let o=s.toViewPosition(i.position),a=i.position.getShiftedBy(i.length),u=s.toViewPosition(a,{isPhantom:!0}),d=n.createRange(o,u).getTrimmed().end.nodeBefore;d&&tt(d,n,s)}))}),i.conversion.for("dataDowncast").elementToElement({model:l,view:Z(n,{dataPipeline:!0}),converterPriority:"high"}).add(t=>{t.on("attribute",Y(n,this._downcastStrategies,r,{dataPipeline:!0,enableSkipLevelLists:o}))});let a=(t=this._downcastStrategies,e=i.editing.view,(i,r)=>{if(r.modelPosition.offset>0)return;let n=r.modelPosition.parent;if(!p(n)||!t.some(t=>"itemMarker"==t.scope&&t.canInjectMarkerIntoElement&&t.canInjectMarkerIntoElement(n)))return;let s=r.mapper.toViewElement(n),l=e.createRangeIn(s),o=l.getWalker(),a=l.start;for(let{item:t}of o){if(t.is("element")&&r.mapper.toModelElement(t)||t.is("$textProxy"))break;t.is("element")&&t.getCustomProperty("listItemMarker")&&(a=e.createPositionAfter(t),o.skip(({previousPosition:t})=>!t.isEqual(a)))}r.viewPosition=a});i.editing.mapper.on("modelToViewPosition",a),i.data.mapper.on("modelToViewPosition",a),this.listenTo(r.document,"change:data",function(t,e,i,r){return()=>{let l=t.document.differ.getChanges(),o=[],a=new Set,u=new Set,d=new Set;for(let t of l)if("insert"==t.type&&"$text"!=t.name)Q(t.position,a,d),t.attributes.has("listItemId")?u.add(t.position.nodeAfter):Q(t.position.getShiftedBy(t.length),a,d);else if("remove"==t.type&&t.attributes.has("listItemId"))Q(t.position,a,d);else if("attribute"==t.type){let e=t.range.start.nodeAfter;i.includes(t.attributeKey)?(Q(t.range.start,a,d),null===t.attributeNewValue?(Q(t.range.start.getShiftedBy(1),a,d),s(e)&&o.push(e)):u.add(e)):p(e)&&s(e)&&o.push(e)}for(let t of a.values())o.push(...function(t,i){let l=[],o=new Set,a=[];for(let{node:u,previous:d}of new f(t)){if(o.has(u))continue;let t=u.getAttribute("listIndent");d&&t<d.getAttribute("listIndent")&&(a.length=t+1),a[t]={modelAttributes:n(u),modelElement:u},function(t,e,i){for(let r=e-1;r>=0&&!i[r];r--){let e=te(t,r),s=null;if(!e){for(let t=r-1;t>=0;t--)if(i[t]){s=i[t].modelElement;break}}let l=e||s||t;i[r]={modelAttributes:{...n(l),listItemId:`list-item-skip-${r}`,listIndent:r},modelElement:l}}}(u,t,a);let c=I(u,{direction:"forward"});for(let t of c)o.add(t),s(t,c)?l.push(t):function(t,i,n){if(n.has(t))return!1;let s=e.mapper.toViewElement(t),l=i.length-1;for(let t=s.parent;!t.is("editableElement");t=t.parent){var o;let e=U(t),n=(o=t).is("element","ol")||o.is("element","ul");if(n||e){if(i[l]){let n=`checkAttributes:${e?"item":"list"}`;if(r.fire(n,{viewElement:t,modelAttributes:i[l].modelAttributes,modelReferenceElement:i[l].modelElement}))break}if(n&&--l<0)return!1}}return!0}(t,a,i)&&l.push(t)}return l}(t,u));for(let t of new Set(o))e.reconvertItem(t)};function n(t){return Object.fromEntries(Array.from(t.getAttributes()).filter(([t])=>i.includes(t)))}function s(t,n){let s=e.mapper.toViewElement(t);if(!s)return!1;if(function(t){for(t=t.parent;t.is("attributeElement")&&["ol","ul","li"].includes(t.name);)t=t.parent;return!(!t.getCustomProperty("$structureSlotParent")||e.mapper.toModelElement(t))}(s)||r.fire("checkElement",{modelElement:t,viewElement:s}))return!0;if(!t.is("element","paragraph")&&!t.is("element","listItem"))return!1;let l=ti(t,i,n);return!!(l&&s.is("element","p"))||!!(!l&&s.is("element","span"))}}(r,i.editing,n,this),{priority:"high"}),this.on("checkAttributes:item",(t,{viewElement:e,modelAttributes:i})=>{e.id!=i.listItemId&&(t.return=!0,t.stop())}),this.on("checkAttributes:list",(t,{viewElement:e,modelAttributes:i})=>{(e.name!=X(i.listType)||e.id!=G(i.listType,i.listIndent))&&(t.return=!0,t.stop())})}_setupModelPostFixing(){let t=this.editor.model,e=this.getListAttributeNames();t.document.registerPostFixer(i=>(function(t,e,i,r){let n=t.document.differ.getChanges(),s=new Set,l=new Set,o=r.editor.config.get("list.multiBlock"),a=!1;for(let r of n){if("insert"==r.type&&"$text"!=r.name){let n=r.position.nodeAfter;if(!t.schema.checkAttribute(n,"listItemId"))for(let t of Array.from(n.getAttributeKeys()))i.includes(t)&&(e.removeAttribute(t,n),a=!0);for(let{item:e,previousPosition:i}of(Q(r.position,l,s),r.attributes.has("listItemId")||Q(r.position.getShiftedBy(r.length),l,s),t.createRangeIn(n))
1)p(e)&&Q(i,l,s)}else"remove"==r.type?Q(r.position,l,s):"attribute"==r.type&&i.includes(r.attributeKey)&&(Q(r.range.start,l,s),null===r.attributeNewValue&&Q(r.range.start.getShiftedBy(1),l,s));if(!o&&"attribute"==r.type&&tr.includes(r.attributeKey)){let t=r.range.start.nodeAfter;null===r.attributeNewValue&&t&&t.is("element","listItem")?(e.rename(t,"paragraph"),a=!0):null===r.attributeOldValue&&t&&t.is("element")&&"listItem"!=t.name&&(e.rename(t,"listItem"),a=!0)}}let u=new Set;for(let t of l.values())a=r.fire("postFixer",{listNodes:new g(t),listHead:t,writer:e,seenIds:u})||a;return a})(t,i,e,this)),this.editor.config.get("list.enableSkipLevelLists")||this.on("postFixer",(t,{listNodes:e,writer:i})=>{t.return=function(t,e){let i=0,r=-1,n=null,s=!1;for(let{node:l}of t){let t=l.getAttribute("listIndent");if(t>i){let o;null===n?(n=t-i,o=i):(n>t&&(n=t),o=t-n),o>r+1&&(o=r+1),e.setAttribute("listIndent",o,l),s=!0,r=o}else n=null,i=t+1,r=t}return s}(e,i)||t.return},{priority:"high"}),this.on("postFixer",(t,{listNodes:e,writer:i,seenIds:r})=>{t.return=function(t,e,i){let r=new Set,n=!1;for(let{node:s}of t){if(r.has(s))continue;let t=s.getAttribute("listType"),l=s.getAttribute("listItemId");if(e.has(l)&&(l=h.next()),e.add(l),s.is("element","listItem")){s.getAttribute("listItemId")!=l&&(i.setAttribute("listItemId",l,s),n=!0);continue}for(let e of I(s,{direction:"forward"}))r.add(e),e.getAttribute("listType")!=t&&(l=h.next(),t=e.getAttribute("listType")),e.getAttribute("listItemId")!=l&&(i.setAttribute("listItemId",l,e),n=!0)}return n}(e,r,i)||t.return},{priority:"high"})}_setupClipboardIntegration(){var t;let e=this.editor.model,i=this.editor.plugins.get("ClipboardPipeline");this.listenTo(e,"insertContent",(t=e,(e,[i,r])=>{let n,s=(i.is("documentFragment")?Array.from(i.getChildren()):[i]).filter(e=>!t.schema.isInline(e));if(!s.length)return;let l=(r?t.createSelection(r):t.document.selection).getFirstPosition();if(p(l.parent))n=l.parent;else{if(!(p(l.nodeBefore)&&p(l.nodeAfter)))return;n=l.nodeBefore}t.change(t=>{let e=n.getAttribute("listType"),i=Math.max(n.getAttribute("listIndent")-(s[0].getAttribute("listIndent")||0),0);for(let r of s){let s=p(r);n.is("element","listItem")&&r.is("element","paragraph")&&t.rename(r,"listItem"),t.setAttributes({listIndent:(s?r.getAttribute("listIndent"):0)+i,listItemId:s?r.getAttribute("listItemId"):h.next(),listType:e},r)}})}),{priority:"high"}),this.listenTo(i,"outputTransformation",(t,i)=>{e.change(t=>{let e=Array.from(i.content.getChildren()),r=e[e.length-1];if(e.length>1&&r.is("element")&&r.isEmpty&&e.slice(0,-1).every(p)&&t.remove(r),"copy"==i.method||"cut"==i.method){let e=Array.from(i.content.getChildren());x(e)&&L(e,t,this.getListAttributeNames())}})})}_setupAccessibilityIntegration(){let t=this.editor,e=t.t;t.accessibility.addKeystrokeInfoGroup({id:"list",label:e("Keystrokes that can be used in a list"),keystrokes:[{label:e("Increase list item indent"),keystroke:"Tab"},{label:e("Decrease list item indent"),keystroke:"Shift+Tab"}]})}_setupListItemIdConversionStrategy(){this.registerDowncastStrategy({scope:"item",attributeName:"listItemId",setAttributeOnDowncast(t,e,i,r){r&&(r.skipListItemIds||r.isClipboardPipeline)||t.setAttribute("data-list-item-id",e,i)}})}}function ts(t,e){let i=t.document.selection;if(!i.isCollapsed)return!T(t);if("forward"===e)return!0;let r=i.getFirstPosition().parent,n=r.previousSibling;return!t.schema.isObject(n)&&(!!n.isEmpty||x([r,n]))}
1function tl(t,e,i,r){t.ui.componentFactory.add(e,()=>{let n=to(u._,t,e,i,r);return n.set({tooltip:!0,isToggleable:!0}),n}),t.ui.componentFactory.add(`menuBar:${e}`,()=>{let n=to(u.kS,t,e,i,r);return n.set({role:"menuitemcheckbox",isToggleable:!0}),n})}function to(t,e,i,r,n){let s=e.commands.get(i),l=new t(e.locale);return l.set({label:r,icon:n}),l.bind("isOn","isEnabled").to(s,"value","isEnabled"),l.on("execute",()=>{e.execute(i),e.editing.view.focus()}),l}class ta extends r.k_{static get pluginName(){return"ListUI"}static get isOfficialPlugin(){return!0}init(){let t=this.editor.t;this.editor.ui.componentFactory.has("numberedList")||tl(this.editor,"numberedList",t("Numbered List"),d.mgI),this.editor.ui.componentFactory.has("bulletedList")||tl(this.editor,"bulletedList",t("Bulleted List"),d.dwx)}}class tu extends r.k_{static get requires(){return[tn,ta]}static get pluginName(){return"List"}static get isOfficialPlugin(){return!0}}r.uB;let td={},tc={},tm={},tf=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"},{listStyle:"arabic-indic",typeAttribute:null,listType:"numbered"}];for(let{listStyle:t,typeAttribute:e,listType:i}of tf)td[t]=i,tc[t]=e,e&&(tm[e]=t);r.uB,r.uB;r.k_;r.k_,u.Ss;class tg extends r.uB{constructor(t){super(t),this.on("execute",()=>{this.refresh()},{priority:"highest"})}refresh(){let t=this._getSelectedItems();this.value=this._getValue(t),this.isEnabled=!!t.length}execute(t={}){this.editor.model.change(e=>{let i=this._getSelectedItems(),r=void 0===t.forceValue?!this._getValue(i):t.forceValue;for(let t of i)r?e.setAttribute("todoListChecked",!0,t):e.removeAttribute("todoListChecked",t)})}_getValue(t){return t.every(t=>t.getAttribute("todoListChecked"))}_getSelectedItems(){let t=this.editor.model,e=t.schema,i=t.document.selection.getFirstRange(),r=i.start.parent,n=[];for(let t of(e.checkAttribute(r,"todoListChecked")&&n.push(...b(r)),i.getItems({shallow:!0})))e.checkAttribute(t,"todoListChecked")&&!n.includes(t)&&n.push(...b(t));return n}}class th extends c.$AX{domEventType=["change"];onDomEvent(t){if(t.target){let e=this.view.domConverter.mapDomToView(t.target);e&&e.is("element","input")&&"checkbox"==e.getAttribute("type")&&e.findAncestor({classes:"todo-list__label"})&&this.fire("todoCheckboxChange",t)}}}let tp=(0,l.ZX)("Ctrl+Enter");class tb extends r.k_{static get pluginName(){return"TodoListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[tn]}init(){var t,e;let i=this.editor,r=i.model,n=i.editing,s=i.plugins.get(tn),o=i.config.get("list.multiBlock");i.commands.add("todoList",new O(i,"todo")),i.commands.add("checkTodoList",new tg(i)),n.view.addObserver(th),r.schema.extend("$listItem",{allowAttributes:"todoListChecked"}),r.schema.addAttributeCheck(t=>{let e=t.last;if(!e.getAttribute("listItemId")||"todo"!=e.getAttribute("listType"))return!1},"todoListChecked"),i.conversion.for("upcast").add(t=>{var e;let i;t.on("element:input",(t,e,i)=>{let r=e.modelCursor,n=r.parent,s=e.viewItem;if(!i.consumable.test(s,{name:!0})||"checkbox"!=s.getAttribute("type")||!r.isAtStart||!n.hasAttribute("listType"))return;i.consumable.consume(s,{name:!0});let l=i.writer;l.setAttribute("listType","todo",n),e.viewItem.hasAttribute("checked")&&l.setAttribute("todoListChecked",!0,n),e.modelRange=l.createRange(r)}),t.on("element:li",(t,e,i)=>{let{writer:r,schema:n}=i;if(e.modelRange){for(let[,t]of Array.from(e.modelRange.getItems({shallow:!0})).filter(t=>"todo"===t.getAttribute("listType")&&n.checkAttribute(t,"listItemId")).reduce((t,e)=>{let i=e.getAttribute("listItemId");return t.has(i)||t.set(i,b(e)),t},new Map).entries())if(t.some(t=>t.getAttribute("todoListChecked")))for(let e of t)r.setAttribute("todoListChecked",!0,e)}},{priority:"low"}
1),t.on("element:label",tI({name:"label",classes:"todo-list__label"})),t.on("element:label",tI({name:"label",classes:["todo-list__label","todo-list__label_without-description"]})),t.on("element:span",tI({name:"span",classes:"todo-list__label__description"})),t.on("element:ul",(e={name:"ul",classes:"todo-list"},i=new c.PNe(e),(t,e,r)=>{let n=i.match(e.viewItem);if(!n)return;let s=n.match;s.name=!1,r.consumable.consume(e.viewItem,s)}))}),i.conversion.for("downcast").elementToElement({model:o?"paragraph":"listItem",view:(t,{writer:e})=>{if(tA(t,s.getListAttributeNames()))return e.createContainerElement("span",{class:"todo-list__label__description"})},converterPriority:"highest"}),s.registerDowncastStrategy({scope:"list",attributeName:"listType",setAttributeOnDowncast(t,e,i){"todo"==e?t.addClass("todo-list",i):t.removeClass("todo-list",i)}}),s.registerDowncastStrategy({scope:"itemMarker",attributeName:"todoListChecked",createElement(t,e,{dataPipeline:i}){if("todo"!=e.getAttribute("listType"))return null;let r=t.createUIElement("input",{type:"checkbox",...e.getAttribute("todoListChecked")?{checked:"checked"}:null,...i?{disabled:"disabled"}:{tabindex:"-1"}});if(i)return r;let n=t.createContainerElement("span",{contenteditable:"false"},r);return n.getFillerOffset=()=>null,n},canWrapElement:t=>tA(t,s.getListAttributeNames()),createWrapperElement(t,e,{dataPipeline:i}){let r=["todo-list__label"];return tA(e,s.getListAttributeNames())||r.push("todo-list__label_without-description"),t.createAttributeElement(i?"label":"span",{class:r.join(" ")})}}),s.on("checkElement",(t,{modelElement:e,viewElement:i})=>{let r=tA(e,s.getListAttributeNames());i.hasClass("todo-list__label__description")!=r&&(t.return=!0,t.stop())}),s.on("checkElement",(t,{modelElement:e,viewElement:r})=>{let n="todo"==e.getAttribute("listType")&&y(e),s=!1;for(let{item:t}of i.editing.view.createPositionBefore(r).getWalker({direction:"backward"})){if(t.is("element")&&i.editing.mapper.toModelElement(t))break;t.is("element","input")&&"checkbox"==t.getAttribute("type")&&(s=!0)}s!=n&&(t.return=!0,t.stop())}),s.on("postFixer",(t,{listNodes:e,writer:i})=>{for(let{node:r,previousNodeInList:n}of e){if(!n||n.getAttribute("listItemId")!=r.getAttribute("listItemId"))continue;let e=n.hasAttribute("todoListChecked"),s=r.hasAttribute("todoListChecked");s&&!e?(i.removeAttribute("todoListChecked",r),t.return=!0):!s&&e&&(i.setAttribute("todoListChecked",!0,r),t.return=!0)}}),r.document.registerPostFixer(t=>{let e=r.document.differ.getChanges(),i=!1;for(let r of e)if("attribute"==r.type&&"listType"==r.attributeKey){let e=r.range.start.nodeAfter;"todo"==r.attributeOldValue&&e.hasAttribute("todoListChecked")&&(t.removeAttribute("todoListChecked",e),i=!0)}else if("insert"==r.type&&"$text"!=r.name)for(let{item:e}of t.createRangeOn(r.position.nodeAfter))e.is("element")&&"todo"!=e.getAttribute("listType")&&e.hasAttribute("todoListChecked")&&(t.removeAttribute("todoListChecked",e),i=!0);return i}),this.listenTo(n.view.document,"keydown",(t,e)=>{(0,l.QC)(e)===tp&&(i.execute("checkTodoList"),t.stop())},{priority:"high"}),this.listenTo(n.view.document,"todoCheckboxChange",(t,e)=>{let i=e.target;if(!i||!i.is("element","input"))return;let r=n.view.createPositionAfter(i),s=n.mapper.toModelPosition(r).parent;s&&p(s)&&"todo"==s.getAttribute("listType")&&this._handleCheckmarkChange(s)}),this.listenTo(n.view.document,"arrowKey",(t=r,e=i.locale,(i,r)=>{let n=(0,l.Kf)(r.keyCode,e.contentLanguageDirection),s=t.schema,o=t.document.selection;if(!o.isCollapsed)return;let a=o.getFirstPosition(),u=a.parent;if("right"==n&&a.isAtEnd){let e=s.getNearestSelectionRange(t.createPositionAfter(u),"forward");if(!e)return;let n=e.start.parent;n&&p(n)&&"todo"==n.getAttribute("listType")&&(t.change(t=>t.setSelection(e)),r.preventDefault(),r.stopPropagation(),i.stop())}else if("left"==n&&a.isAtStart&&p(u)&&"todo"==u.getAttribute("listType")){let e=s.getNearestSelectionRange(t.createPositionBefore(u),"backward");if(!e)return;t.change(t=>t.setSelection(e)),r.preventDefault(),r.stopPropagation(),i.stop()}}),{context:"$text"}),this.listenTo(n.mapper,"viewToModelPosition",(t,e)=>{let i=e.viewPosition.parent,n=i.is("attributeElement","li")&&0==e.viewPosition.offset,s=ty(i)&&e.viewPosition.offset<=1,l=i.is("element","span")&&"false"==i.getAttribute("contenteditable")&&ty(i.parent);if(!n&&!s&&!l)return;let o=e.modelPosition.nodeAfter;o&&"todo"==o.getAttribute("listType")&&(e.modelPosition=r.createPositionAt(o,0))},{priority:"low"}),this._initAriaAnnouncements()}_handleCheckmarkChange(t){let e=this.editor,i=e.model,r=Array.from(i.document.selection.getRanges());i.change(i=>{i.setSelection(t,"end"),e.execute("checkTodoList"),i.setSelection(r)})}_initAriaAnnouncements(){let{model:t,ui:e,t:i}=this.editor,r=null;e&&t.document.selection.on("change:range",()=>{let n=t.document.selection.focus.parent,s=tk(r),l=tk(n);s&&!l?e.ariaLiveAnnouncer.announce(i("Leaving a to-do list")):!s&&l&&e.ariaLiveAnnouncer.announce(i("Entering a to-do list")),r=n})}}function tI(t){let e=new c.PNe(t);return(t,i,r)=>{let n=e.match(i.viewItem);!n||r.consumable.consume(i.viewItem,n.match)&&Object.assign(i,r.convertChildren(i.viewItem,i.modelCursor))}}function tA(t,e){return(t.is("element","paragraph")||t.is("element","listItem"))&&"todo"==t.getAttribute("listType")&&y(t)&&function(t,e){for(let i of t.getAttributeKeys())if(!i.startsWith("selection:")&&!e.includes(i))return!1;return!0}(t,e)}function ty(t){return!!t&&t.is("attributeElement")&&t.hasClass("todo-list__label")}function tk(t){return!!t&&(!!t.is("element","paragraph")||!!t.is("element","listItem"))&&"todo"==t.getAttribute("listType")}class tw extends r.k_{static get pluginName(){return"TodoListUI"}static get isOfficialPlugin(){return!0}init(){let t=this.editor.t;tl(this.editor,"todoList",t("To-do List"),d.ecv)}}class t_ extends r.k_{static get requires(){return[tb,tw]}static get pluginName(){return"TodoList"}static get isOfficialPlugin(){return!0}}class tv extends r.uB{type;constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){let e=this.editor.model,i=Array.from(e.document.selection.getSelectedBlocks()).filter(t=>
1tE(t,e.schema)),r=void 0!==t.forceValue?!t.forceValue:this.value;e.change(t=>{if(r){let e=i[i.length-1].nextSibling,r=1/0,n=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){let t=e.getAttribute("listIndent");t<r&&(r=t);let i=t-r;n.push({element:e,listIndent:i}),e=e.nextSibling}for(let e of n=n.reverse())t.setAttribute("listIndent",e.listIndent,e.element)}if(!r){let t=1/0;for(let e of i)e.is("element","listItem")&&e.getAttribute("listIndent")<t&&(t=e.getAttribute("listIndent"));tS(i,!0,t=0===t?1:t),tS(i,!1,t)}for(let e of i.reverse())r&&"listItem"==e.name?t.rename(e,"paragraph"):r||"listItem"==e.name?r||"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",i)})}_getValue(){let t=(0,l.$1)(this.editor.model.document.selection.getSelectedBlocks());return!!t&&t.is("element","listItem")&&t.getAttribute("listType")==this.type}_checkEnabled(){if(this.value)return!0;let t=this.editor.model.document.selection,e=this.editor.model.schema,i=(0,l.$1)(t.getSelectedBlocks());return!!i&&tE(i,e)}}function tS(t,e,i){let r=e?t[0]:t[t.length-1];if(r.is("element","listItem")){let n=r[e?"previousSibling":"nextSibling"],s=r.getAttribute("listIndent");for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=i;)s>n.getAttribute("listIndent")&&(s=n.getAttribute("listIndent")),n.getAttribute("listIndent")==s&&t[e?"unshift":"push"](n),n=n[e?"previousSibling":"nextSibling"]}}function tE(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class tL extends r.uB{_indentBy;constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){let t=this.editor.model,e=Array.from(t.document.selection.getSelectedBlocks());t.change(t=>{let i=e[e.length-1],r=i.nextSibling;for(;r&&"listItem"==r.name&&r.getAttribute("listIndent")>i.getAttribute("listIndent");)e.push(r),r=r.nextSibling;for(let i of(this._indentBy<0&&(e=e.reverse()),e)){let e=i.getAttribute("listIndent")+this._indentBy;e<0?t.rename(i,"paragraph"):t.setAttribute("listIndent",e,i)}this.fire("_executeCleanup",e)})}_checkEnabled(){let t=(0,l.$1)(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("element","listItem"))return!1;if(this._indentBy>0){let e=t.getAttribute("listIndent"),i=t.getAttribute("listType"),r=t.previousSibling;for(;r&&r.is("element","listItem")&&r.getAttribute("listIndent")>=e;){if(r.getAttribute("listIndent")==e)return r.getAttribute("listType")==i;r=r.previousSibling}return!1}return!0}}function tx(t,e){let i=[],r=t.parent,n=r.getAttribute("listIndent");for(let s of[...new c.oDe({ignoreElementEnd:!1,startPosition:t,shallow:!0,direction:e})].filter(t=>t.item.is("element")).map(t=>t.item)){if(!s.is("element","listItem")||s.getAttribute("listIndent")<n)break;if(!(s.getAttribute("listIndent")>n)){if(s.getAttribute("listType")!==r.getAttribute("listType")||s.getAttribute("listStyle")!==r.getAttribute("listStyle")||s.getAttribute("listReversed")!==r.getAttribute("listReversed")||s.getAttribute("listStart")!==r.getAttribute("listStart"))break;"backward"===e?i.unshift(s):i.push(s)}}return i}function tC(t){let e=[...t.document.selection.getSelectedBlocks()].filter(t=>t.is("element","listItem")).map(e=>{let i=t.change(t=>t.createPositionAt(e,0));return[...tx(i,"backward"),...tx(i,"forward")]}).flat();return[...new Set(e)]}let tT=["disc","circle","square"],tF=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function tP(t){return tT.includes(t)?"bulleted":tF.includes(t)?"numbered":null}class tB extends r.k_{static get pluginName(){return"LegacyListUtils"}static get isOfficialPlugin(){return!0}getListTypeFromListStyleType(t){return tP(t)}getSelectedListItems(t){return tC(t)}getSiblingNodes(t,e){return tx(t,e)}}r.k_,r.uB,r.uB,r.uB;r.k_;r.uB}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.