Liferay.Loader.define("fragment-web$codemirror@5.65.2/addon/edit/continuelist",["module","exports","require","../../lib/codemirror"],(function(e,n,t){var i,r=void 0;window;i=function(e){"use strict";var n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;function incrementRemainingMarkdownListNumbers(e,t){var i=t.line,r=0,o=0,a=n.exec(e.getLine(i)),d=a[1];do{var s=i+(r+=1),l=e.getLine(s),c=n.exec(l);if(c){var m=c[1],f=parseInt(a[3],10)+r-o,u=parseInt(c[3],10),g=u;if(d!==m||isNaN(u)){if(d.length>m.length)return;if(d.length<m.length&&1===r)return;o+=1}else f===u&&(g=u+1),f>u&&(g=f+1),e.replaceRange(l.replace(n,m+g+c[4]+c[5]),{line:s,ch:0},{line:s,ch:l.length})}}while(c)}e.commands.newlineAndIndentContinueMarkdownList=function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),a=[],d=0;d<o.length;d++){var s=o[d].head,l=r.getStateAfter(s.line),c=e.innerMode(r.getMode(),l);if("markdown"!==c.mode.name&&"markdown"!==c.mode.helperType)return void r.execCommand("newlineAndIndent");var m=!1!==(l=c.state).list,f=0!==l.quote,u=r.getLine(s.line),g=n.exec(u),p=/^\s*$/.test(u.slice(0,s.ch));if(!o[d].empty()||!m&&!f||!g||p)return void r.execCommand("newlineAndIndent");if(t.test(u)){var h=f&&/>\s*$/.test(u),v=!/>\s*$/.test(u);(h||v)&&r.replaceRange("",{line:s.line,ch:0},{line:s.line,ch:s.ch+1}),a[d]="\n"}else{var w=g[1],x=g[5],b=!(i.test(g[2])||g[2].indexOf(">")>=0),L=b?parseInt(g[3],10)+1+g[4]:g[2].replace("x"," ");a[d]="\n"+w+L+x,b&&incrementRemainingMarkdownListNumbers(r,s)}}r.replaceSelections(a)}},"object"==typeof n&&"object"==typeof e?i(t("../../lib/codemirror")):"function"==typeof r&&r.amd?r(["../../lib/codemirror"],i):i(CodeMirror)}));
//# sourceMappingURL=continuelist.js.map