'use strict';(function(){var d;CodeMirror.defineOption("autoTrimTrailingSpace",!1,function(a,b){if(d=b)a.on("change",e);else!b&&a.state.clearEmptyLines&&a.off("change",e)});CodeMirror.commands.trimTrailingSpacesIfEnabled=function(a){d&&l(a,!0,!0)};var e=function(a,b){if("undo"!==b.origin){var f=CodeMirror.changeEnd(b);a.getDoc().markText(b.from,f,{className:"user_change",history:!0})}},l=function(a){var b,f,d,e,g,h,k;a.getDoc().getAllMarks().forEach(function(c){if("user_change"==c.className&&(b=c.find()))for(c=
b.from.line;c<=b.to.line;c++)(f=a.getLine(c))&&(d=f.match(/\s+$/))&&(e=d[0].length)&&(g=f.length,h=new CodeMirror.Pos(c,g-e),k=new CodeMirror.Pos(c,g),a.replaceRange("",h,k,void 0))})}})();
(function(){var d;CodeMirror.defineOption("autoTrimTrailingSpace",!1,function(a,b){if(d=b)a.on("change",e);else!b&&a.state.clearEmptyLines&&a.off("change",e)});CodeMirror.commands.trimTrailingSpacesIfEnabled=function(a){d&&l(a,!0,!0)};var e=function(a,b){if("undo"!==b.origin){var f=CodeMirror.changeEnd(b);a.getDoc().markText(b.from,f,{className:"user_change",history:!0})}},l=function(a){var b,f,d,e,g,h,k;a.getDoc().getAllMarks().forEach(function(c){if("user_change"==c.className&&(b=c.find()))for(c=
b.from.line;c<=b.to.line;c++)(f=a.getLine(c))&&(d=f.match(/\s+$/))&&(e=d[0].length)&&(g=f.length,h=new CodeMirror.Pos(c,g-e),k=new CodeMirror.Pos(c,g),a.replaceRange("",h,k,void 0))})}})();
