(this.webpackChunktocco_widget_showcase=this.webpackChunktocco_widget_showcase||[]).push([[3636],{43636(e,t,n){e=n.nmd(e),ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],(function(e,t,n){"use strict";var r=e("../range").Range;function a(e,t){for(var n=t.column||e.getOption("printMarginColumn"),a=0!=t.allowMerge,o=Math.min(t.startRow,t.endRow),s=Math.max(t.startRow,t.endRow),i=e.session;o<=s;){var c=i.getLine(o);if(c.length>n){if(d=p(c,n,5)){var l=/^\s*/.exec(c)[0];i.replace(new r(o,d.start,o,d.end),"\n"+l)}s++}else if(a&&/\S/.test(c)&&o!=s){var g=i.getLine(o+1);if(g&&/\S/.test(g)){var d,h=c.replace(/\s+$/,""),u=g.replace(/^\s+/,""),f=h+" "+u;if((d=p(f,n,5))&&d.start>h.length||f.length<n){var w=new r(o,h.length,o+1,g.length-u.length);i.replace(w," "),o--,s--}else h.length<c.length&&i.remove(new r(o,h.length,o,c.length))}}o++}function p(e,t,n){if(!(e.length<t)){var r=e.slice(0,t),a=e.slice(t),o=/^(?:(\s+)|(\S+)(\s+))/.exec(a),s=/(?:(\s+)|(\s+)(\S+))$/.exec(r),i=0,c=0;return s&&!s[2]&&(i=t-s[1].length,c=t),o&&!o[2]&&(i||(i=t),c=t+o[1].length),i?{start:i,end:c}:s&&s[2]&&s.index>n?{start:s.index,end:s.index+s[2].length}:o&&o[2]?{start:i=t+o[2].length,end:i+o[3].length}:void 0}}}function o(e){if("insertstring"==e.command.name&&/\S/.test(e.args)){var t=e.editor,n=t.selection.cursor;if(n.column<=t.renderer.$printMarginColumn)return;var r=t.session.$undoManager.$lastDelta;a(t,{startRow:n.row,endRow:n.row,allowMerge:!1}),r!=t.session.$undoManager.$lastDelta&&t.session.markUndoGroup()}}var s=e("../editor").Editor;e("../config").defineOptions(s.prototype,"editor",{hardWrap:{set:function(e){e?this.commands.on("afterExec",o):this.commands.off("afterExec",o)},value:!1}}),t.hardWrap=a})),ace.require(["ace/ext/hardwrap"],(function(t){e&&(e.exports=t)}))}}]);