filesbox/web/dist/45905.195b76fb.async.js
2024-07-26 14:10:54 +08:00

52 lines
24 KiB
JavaScript

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[45905],{45905:function(M,O,w){M=w.nmd(M),ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"],function(p,f,b){"use strict";var $=this&&this.__extends||function(){var l=function(s,u){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,e){h.__proto__=e}||function(h,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(h[n]=e[n])},l(s,u)};return function(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");l(s,u);function h(){this.constructor=s}s.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)}}(),y=p("./lib/oop"),k=p("./search").Search,v=p("./edit_session").EditSession,C=p("./search_highlight").SearchHighlight,c=function(l){$(s,l);function s(){return l!==null&&l.apply(this,arguments)||this}return s.prototype.enter=function(u,h){if(!h.needle)return!1;var e=u.getCursorPosition();this.displayOccurContent(u,h);var n=this.originalToOccurPosition(u.session,e);return u.moveCursorToPosition(n),!0},s.prototype.exit=function(u,h){var e=h.translatePosition&&u.getCursorPosition(),n=e&&this.occurToOriginalPosition(u.session,e);return this.displayOriginalContent(u),n&&u.moveCursorToPosition(n),!0},s.prototype.highlight=function(u,h){var e=u.$occurHighlight=u.$occurHighlight||u.addDynamicMarker(new C(null,"ace_occur-highlight","text"));e.setRegexp(h),u._emit("changeBackMarker")},s.prototype.displayOccurContent=function(u,h){this.$originalSession=u.session;var e=this.matchingLines(u.session,h),n=e.map(function(o){return o.content}),a=new v(n.join(`
`));a.$occur=this,a.$occurMatchingLines=e,u.setSession(a),this.$useEmacsStyleLineStart=this.$originalSession.$useEmacsStyleLineStart,a.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart,this.highlight(a,h.re),a._emit("changeBackMarker")},s.prototype.displayOriginalContent=function(u){u.setSession(this.$originalSession),this.$originalSession.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart},s.prototype.originalToOccurPosition=function(u,h){var e=u.$occurMatchingLines,n={row:0,column:0};if(!e)return n;for(var a=0;a<e.length;a++)if(e[a].row===h.row)return{row:a,column:h.column};return n},s.prototype.occurToOriginalPosition=function(u,h){var e=u.$occurMatchingLines;return!e||!e[h.row]?h:{row:e[h.row].row,column:h.column}},s.prototype.matchingLines=function(u,h){if(h=y.mixin({},h),!u||!h.needle)return[];var e=new k;return e.set(h),e.findAll(u).reduce(function(n,a){var o=a.start.row,r=n[n.length-1];return r&&r.row===o?n:n.concat({row:o,content:u.getLine(o)})},[])},s}(k),m=p("./lib/dom");m.importCssString(`.ace_occur-highlight {
border-radius: 4px;
background-color: rgba(87, 255, 8, 0.25);
position: absolute;
z-index: 4;
box-sizing: border-box;
box-shadow: 0 0 4px rgb(91, 255, 50);
}
.ace_dark .ace_occur-highlight {
background-color: rgb(80, 140, 85);
box-shadow: 0 0 4px rgb(60, 120, 70);
}
`,"incremental-occur-highlighting",!1),f.Occur=c}),ace.define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"],function(p,f,b){var $=p("../config"),y=p("../occur").Occur,k={name:"occur",exec:function(l,s){var u=!!l.session.$occur,h=new y().enter(l,s);h&&!u&&m.installIn(l)},readOnly:!0},v=[{name:"occurexit",bindKey:"esc|Ctrl-G",exec:function(l){var s=l.session.$occur;!s||(s.exit(l,{}),l.session.$occur||m.uninstallFrom(l))},readOnly:!0},{name:"occuraccept",bindKey:"enter",exec:function(l){var s=l.session.$occur;!s||(s.exit(l,{translatePosition:!0}),l.session.$occur||m.uninstallFrom(l))},readOnly:!0}],C=p("../keyboard/hash_handler").HashHandler,c=p("../lib/oop");function m(){}c.inherits(m,C),function(){this.isOccurHandler=!0,this.attach=function(s){C.call(this,v,s.commands.platform),this.$editor=s};var l=this.handleKeyboard;this.handleKeyboard=function(s,u,h,e){var n=l.call(this,s,u,h,e);return n&&n.command?n:void 0}}.call(m.prototype),m.installIn=function(l){var s=new this;l.keyBinding.addKeyboardHandler(s),l.commands.addCommands(v)},m.uninstallFrom=function(l){l.commands.removeCommands(v);var s=l.getKeyboardHandler();s.isOccurHandler&&l.keyBinding.removeKeyboardHandler(s)},f.occurStartCommand=k}),ace.define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"],function(p,f,b){var $=p("../config"),y=p("../lib/oop"),k=p("../keyboard/hash_handler").HashHandler,v=p("./occur_commands").occurStartCommand;f.iSearchStartCommands=[{name:"iSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(c,m){$.loadModule(["core","ace/incremental_search"],function(l){var s=l.iSearch=l.iSearch||new l.IncrementalSearch;s.activate(c,m.backwards),m.jumpToFirstMatch&&s.next(m)})},readOnly:!0},{name:"iSearchBackwards",exec:function(c,m){c.execCommand("iSearch",{backwards:!0})},readOnly:!0},{name:"iSearchAndGo",bindKey:{win:"Ctrl-K",mac:"Command-G"},exec:function(c,m){c.execCommand("iSearch",{jumpToFirstMatch:!0,useCurrentOrPrevSearch:!0})},readOnly:!0},{name:"iSearchBackwardsAndGo",bindKey:{win:"Ctrl-Shift-K",mac:"Command-Shift-G"},exec:function(c){c.execCommand("iSearch",{jumpToFirstMatch:!0,backwards:!0,useCurrentOrPrevSearch:!0})},readOnly:!0}],f.iSearchCommands=[{name:"restartSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(c){c.cancelSearch(!0)}},{name:"searchForward",bindKey:{win:"Ctrl-S|Ctrl-K",mac:"Ctrl-S|Command-G"},exec:function(c,m){m.useCurrentOrPrevSearch=!0,c.next(m)}},{name:"searchBackward",bindKey:{win:"Ctrl-R|Ctrl-Shift-K",mac:"Ctrl-R|Command-Shift-G"},exec:function(c,m){m.useCurrentOrPrevSearch=!0,m.backwards=!0,c.next(m)}},{name:"extendSearchTerm",exec:function(c,m){c.addString(m)}},{name:"extendSearchTermSpace",bindKey:"space",exec:function(c){c.addString(" ")}},{name:"shrinkSearchTerm",bindKey:"backspace",exec:function(c){c.removeChar()}},{name:"confirmSearch",bindKey:"return",exec:function(c){c.deactivate()}},{name:"cancelSearch",bindKey:"esc|Ctrl-G",exec:function(c){c.deactivate(!0)}},{name:"occurisearch",bindKey:"Ctrl-O",exec:function(c){var m=y.mixin({},c.$options);c.deactivate(),v.exec(c.$editor,m)}},{name:"yankNextWord",bindKey:"Ctrl-w",exec:function(c){var m=c.$editor,l=m.selection.getRangeOfMovements(function(u){u.moveCursorWordRight()}),s=m.session.getTextRange(l);c.addString(s)}},{name:"yankNextChar",bindKey:"Ctrl-Alt-y",exec:function(c){var m=c.$editor,l=m.selection.getRangeOfMovements(function(u){u.moveCursorRight()}),s=m.session.getTextRange(l);c.addString(s)}},{name:"recenterTopBottom",bindKey:"Ctrl-l",exec:function(c){c.$editor.execCommand("recenterTopBottom")}},{name:"selectAllMatches",bindKey:"Ctrl-space",exec:function(c){var m=c.$editor,l=m.session.$isearchHighlight,s=l&&l.cache?l.cache.reduce(function(u,h){return u.concat(h||[])},[]):[];c.deactivate(!1),s.forEach(m.selection.addRange.bind(m.selection))}},{name:"searchAsRegExp",bindKey:"Alt-r",exec:function(c){c.convertNeedleToRegExp()}}].map(function(c){return c.readOnly=!0,c.isIncrementalSearchCommand=!0,c.scrollIntoView="animate-cursor",c});function C(c){this.$iSearch=c}y.inherits(C,k),function(){this.attach=function(m){var l=this.$iSearch;k.call(this,f.iSearchCommands,m.commands.platform),this.$commandExecHandler=m.commands.on("exec",function(s){if(!s.command.isIncrementalSearchCommand)return l.deactivate();s.stopPropagation(),s.preventDefault();var u=m.session.getScrollTop(),h=s.command.exec(l,s.args||{});return m.renderer.scrollCursorIntoView(null,.5),m.renderer.animateScrolling(u),h})},this.detach=function(m){!this.$commandExecHandler||(m.commands.off("exec",this.$commandExecHandler),delete this.$commandExecHandler)};var c=this.handleKeyboard;this.handleKeyboard=function(m,l,s,u){if((l===1||l===8)&&s==="v"||l===1&&s==="y")return null;var h=c.call(this,m,l,s,u);if(h&&h.command)return h;if(l==-1){var e=this.commands.extendSearchTerm;if(e)return{command:e,args:s}}return!1}}.call(C.prototype),f.IncrementalSearchKeyboardHandler=C}),ace.define("ace/incremental_search",["require","exports","module","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"],function(p,f,b){"use strict";var $=this&&this.__extends||function(){var o=function(r,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,g){i.__proto__=g}||function(i,g){for(var d in g)Object.prototype.hasOwnProperty.call(g,d)&&(i[d]=g[d])},o(r,t)};return function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(r,t);function i(){this.constructor=r}r.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),y=p("./range").Range,k=p("./search").Search,v=p("./search_highlight").SearchHighlight,C=p("./commands/incremental_search_commands"),c=C.IncrementalSearchKeyboardHandler;function m(o){return o instanceof RegExp}function l(o){var r=String(o),t=r.indexOf("/"),i=r.lastIndexOf("/");return{expression:r.slice(t+1,i),flags:r.slice(i+1)}}function s(o,r){try{return new RegExp(o,r)}catch(t){return o}}function u(o){return s(o.expression,o.flags)}var h=function(o){$(r,o);function r(){var t=o.call(this)||this;return t.$options={wrap:!1,skipCurrent:!1},t.$keyboardHandler=new c(t),t}return r.prototype.activate=function(t,i){this.$editor=t,this.$startPos=this.$currentPos=t.getCursorPosition(),this.$options.needle="",this.$options.backwards=i,t.keyBinding.addKeyboardHandler(this.$keyboardHandler),this.$originalEditorOnPaste=t.onPaste,t.onPaste=this.onPaste.bind(this),this.$mousedownHandler=t.on("mousedown",this.onMouseDown.bind(this)),this.selectionFix(t),this.statusMessage(!0)},r.prototype.deactivate=function(t){this.cancelSearch(t);var i=this.$editor;i.keyBinding.removeKeyboardHandler(this.$keyboardHandler),this.$mousedownHandler&&(i.off("mousedown",this.$mousedownHandler),delete this.$mousedownHandler),i.onPaste=this.$originalEditorOnPaste,this.message("")},r.prototype.selectionFix=function(t){t.selection.isEmpty()&&!t.session.$emacsMark&&t.clearSelection()},r.prototype.highlight=function(t){var i=this.$editor.session,g=i.$isearchHighlight=i.$isearchHighlight||i.addDynamicMarker(new v(null,"ace_isearch-result","text"));g.setRegexp(t),i._emit("changeBackMarker")},r.prototype.cancelSearch=function(t){var i=this.$editor;return this.$prevNeedle=this.$options.needle,this.$options.needle="",t?(i.moveCursorToPosition(this.$startPos),this.$currentPos=this.$startPos):i.pushEmacsMark&&i.pushEmacsMark(this.$startPos,!1),this.highlight(null),y.fromPoints(this.$currentPos,this.$currentPos)},r.prototype.highlightAndFindWithNeedle=function(t,i){if(!this.$editor)return null;var g=this.$options;if(i&&(g.needle=i.call(this,g.needle||"")||""),g.needle.length===0)return this.statusMessage(!0),this.cancelSearch(!0);g.start=this.$currentPos;var d=this.$editor.session,S=this.find(d),_=this.$editor.emacsMark?!!this.$editor.emacsMark():!this.$editor.selection.isEmpty();return S&&(g.backwards&&(S=y.fromPoints(S.end,S.start)),this.$editor.selection.setRange(y.fromPoints(_?this.$startPos:S.end,S.end)),t&&(this.$currentPos=S.end),this.highlight(g.re)),this.statusMessage(S),S},r.prototype.addString=function(t){return this.highlightAndFindWithNeedle(!1,function(i){if(!m(i))return i+t;var g=l(i);return g.expression+=t,u(g)})},r.prototype.removeChar=function(t){return this.highlightAndFindWithNeedle(!1,function(i){if(!m(i))return i.substring(0,i.length-1);var g=l(i);return g.expression=g.expression.substring(0,g.expression.length-1),u(g)})},r.prototype.next=function(t){return t=t||{},this.$options.backwards=!!t.backwards,this.$currentPos=this.$editor.getCursorPosition(),this.highlightAndFindWithNeedle(!0,function(i){return t.useCurrentOrPrevSearch&&i.length===0?this.$prevNeedle||"":i})},r.prototype.onMouseDown=function(t){return this.deactivate(),!0},r.prototype.onPaste=function(t){this.addString(t)},r.prototype.convertNeedleToRegExp=function(){return this.highlightAndFindWithNeedle(!1,function(t){return m(t)?t:s(t,"ig")})},r.prototype.convertNeedleToString=function(){return this.highlightAndFindWithNeedle(!1,function(t){return m(t)?l(t).expression:t})},r.prototype.statusMessage=function(t){var i=this.$options,g="";g+=i.backwards?"reverse-":"",g+="isearch: "+i.needle,g+=t?"":" (not found)",this.message(g)},r.prototype.message=function(t){this.$editor.showCommandLine&&(this.$editor.showCommandLine(t),this.$editor.focus())},r}(k);f.IncrementalSearch=h;var e=p("./lib/dom");e.importCssString(`
.ace_marker-layer .ace_isearch-result {
position: absolute;
z-index: 6;
box-sizing: border-box;
}
div.ace_isearch-result {
border-radius: 4px;
background-color: rgba(255, 200, 0, 0.5);
box-shadow: 0 0 4px rgb(255, 200, 0);
}
.ace_dark div.ace_isearch-result {
background-color: rgb(100, 110, 160);
box-shadow: 0 0 4px rgb(80, 90, 140);
}`,"incremental-search-highlighting",!1);var n=p("./commands/command_manager");(function(){this.setupIncrementalSearch=function(o,r){if(this.usesIncrementalSearch!=r){this.usesIncrementalSearch=r;var t=C.iSearchStartCommands,i=r?"addCommands":"removeCommands";this[i](t)}}}).call(n.CommandManager.prototype);var a=p("./editor").Editor;p("./config").defineOptions(a.prototype,"editor",{useIncrementalSearch:{set:function(o){this.keyBinding.$handlers.forEach(function(r){r.setupIncrementalSearch&&r.setupIncrementalSearch(this,o)}),this._emit("incrementalSearchSettingChanged",{isEnabled:o})}}})}),ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"],function(p,f,b){"use strict";var $=p("../lib/dom");p("../incremental_search");var y=p("../commands/incremental_search_commands"),k=p("./hash_handler").HashHandler;f.handler=new k,f.handler.isEmacs=!0,f.handler.$id="ace/keyboard/emacs",$.importCssString(`
.emacs-mode .ace_cursor{
border: 1px rgba(50,250,50,0.8) solid!important;
box-sizing: border-box!important;
background-color: rgba(0,250,0,0.9);
opacity: 0.5;
}
.emacs-mode .ace_hidden-cursors .ace_cursor{
opacity: 1;
background-color: transparent;
}
.emacs-mode .ace_overwrite-cursors .ace_cursor {
opacity: 1;
background-color: transparent;
border-width: 0 0 2px 2px !important;
}
.emacs-mode .ace_text-layer {
z-index: 4
}
.emacs-mode .ace_cursor-layer {
z-index: 2
}`,"emacsMode");var v,C;f.handler.attach=function(e){v=e.session.$selectLongWords,e.session.$selectLongWords=!0,C=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.$emacsMark=null,e.session.$emacsMarkRing=e.session.$emacsMarkRing||[],e.emacsMark=function(){return this.session.$emacsMark},e.setEmacsMark=function(n){this.session.$emacsMark=n},e.pushEmacsMark=function(n,a){var o=this.session.$emacsMark;o&&this.session.$emacsMarkRing.push(o),!n||a?this.setEmacsMark(n):this.session.$emacsMarkRing.push(n)},e.popEmacsMark=function(){var n=this.emacsMark();return n?(this.setEmacsMark(null),n):this.session.$emacsMarkRing.pop()},e.getLastEmacsMark=function(n){return this.session.$emacsMark||this.session.$emacsMarkRing.slice(-1)[0]},e.emacsMarkForSelection=function(n){var a=this.selection,o=this.multiSelect?this.multiSelect.getAllRanges().length:1,r=a.index||0,t=this.session.$emacsMarkRing,i=t.length-(o-r),g=t[i]||a.anchor;return n&&t.splice(i,1,"row"in n&&"column"in n?n:void 0),g},e.on("click",m),e.on("changeSession",c),e.renderer.$blockCursor=!0,e.setStyle("emacs-mode"),e.commands.addCommands(h),f.handler.platform=e.commands.platform,e.$emacsModeHandler=this,e.on("copy",this.onCopy),e.on("paste",this.onPaste)},f.handler.detach=function(e){e.renderer.$blockCursor=!1,e.session.$selectLongWords=v,e.session.$useEmacsStyleLineStart=C,e.off("click",m),e.off("changeSession",c),e.unsetStyle("emacs-mode"),e.commands.removeCommands(h),e.off("copy",this.onCopy),e.off("paste",this.onPaste),e.$emacsModeHandler=null};var c=function(e){e.oldSession&&(e.oldSession.$selectLongWords=v,e.oldSession.$useEmacsStyleLineStart=C),v=e.session.$selectLongWords,e.session.$selectLongWords=!0,C=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.hasOwnProperty("$emacsMark")||(e.session.$emacsMark=null),e.session.hasOwnProperty("$emacsMarkRing")||(e.session.$emacsMarkRing=[])},m=function(e){e.editor.session.$emacsMark=null},l=p("../lib/keys").KEY_MODS,s={C:"ctrl",S:"shift",M:"alt",CMD:"command"},u=["C-S-M-CMD","S-M-CMD","C-M-CMD","C-S-CMD","C-S-M","M-CMD","S-CMD","S-M","C-CMD","C-M","C-S","CMD","M","S","C"];u.forEach(function(e){var n=0;e.split("-").forEach(function(a){n=n|l[s[a]]}),s[n]=e.toLowerCase()+"-"}),f.handler.onCopy=function(e,n){n.$handlesEmacsOnCopy||(n.$handlesEmacsOnCopy=!0,f.handler.commands.killRingSave.exec(n),n.$handlesEmacsOnCopy=!1)},f.handler.onPaste=function(e,n){n.pushEmacsMark(n.getCursorPosition())},f.handler.bindKey=function(e,n){if(typeof e=="object"&&(e=e[this.platform]),!!e){var a=this.commandKeyBinding;e.split("|").forEach(function(o){o=o.toLowerCase(),a[o]=n;var r=o.split(" ").slice(0,-1);r.reduce(function(t,i,g){var d=t[g-1]?t[g-1]+" ":"";return t.concat([d+i])},[]).forEach(function(t){a[t]||(a[t]="null")})},this)}},f.handler.getStatusText=function(e,n){var a="";return n.count&&(a+=n.count),n.keyChain&&(a+=" "+n.keyChain),a},f.handler.handleKeyboard=function(e,n,a,o){if(o!==-1){var r=e.editor;if(r._signal("changeStatus"),n==-1&&(r.pushEmacsMark(),e.count)){var t=new Array(e.count+1).join(a);return e.count=null,{command:"insertstring",args:t}}var i=s[n];if(i=="c-"||e.count){var g=parseInt(a[a.length-1]);if(typeof g=="number"&&!isNaN(g))return e.count=Math.max(e.count,0)||0,e.count=10*e.count+g,{command:"null"}}i&&(a=i+a),e.keyChain&&(a=e.keyChain+=" "+a);var d=this.commandKeyBinding[a];if(e.keyChain=d=="null"?a:"",!!d){if(d==="null")return{command:"null"};if(d==="universalArgument")return e.count=-4,{command:"null"};var S;if(typeof d!="string"&&(S=d.args,d.command&&(d=d.command),d==="goorselect"&&(d=r.emacsMark()?S[1]:S[0],S=null)),!(typeof d=="string"&&((d==="insertstring"||d==="splitline"||d==="togglecomment")&&r.pushEmacsMark(),d=this.commands[d]||r.commands.commands[d],!d))){if(!d.readOnly&&!d.isYank&&(e.lastCommand=null),!d.readOnly&&r.emacsMark()&&r.setEmacsMark(null),e.count){var g=e.count;if(e.count=0,!d||!d.handlesCount)return{args:S,command:{exec:function(E,R){for(var x=0;x<g;x++)d.exec(E,R)},multiSelectAction:d.multiSelectAction}};S||(S={}),typeof S=="object"&&(S.count=g)}return{command:d,args:S}}}}},f.emacsKeys={"Up|C-p":{command:"goorselect",args:["golineup","selectup"]},"Down|C-n":{command:"goorselect",args:["golinedown","selectdown"]},"Left|C-b":{command:"goorselect",args:["gotoleft","selectleft"]},"Right|C-f":{command:"goorselect",args:["gotoright","selectright"]},"C-Left|M-b":{command:"goorselect",args:["gotowordleft","selectwordleft"]},"C-Right|M-f":{command:"goorselect",args:["gotowordright","selectwordright"]},"Home|C-a":{command:"goorselect",args:["gotolinestart","selecttolinestart"]},"End|C-e":{command:"goorselect",args:["gotolineend","selecttolineend"]},"C-Home|S-M-,":{command:"goorselect",args:["gotostart","selecttostart"]},"C-End|S-M-.":{command:"goorselect",args:["gotoend","selecttoend"]},"S-Up|S-C-p":"selectup","S-Down|S-C-n":"selectdown","S-Left|S-C-b":"selectleft","S-Right|S-C-f":"selectright","S-C-Left|S-M-b":"selectwordleft","S-C-Right|S-M-f":"selectwordright","S-Home|S-C-a":"selecttolinestart","S-End|S-C-e":"selecttolineend","S-C-Home":"selecttostart","S-C-End":"selecttoend","C-l":"recenterTopBottom","M-s":"centerselection","M-g":"gotoline","C-x C-p":"selectall","C-Down":{command:"goorselect",args:["gotopagedown","selectpagedown"]},"C-Up":{command:"goorselect",args:["gotopageup","selectpageup"]},"PageDown|C-v":{command:"goorselect",args:["gotopagedown","selectpagedown"]},"PageUp|M-v":{command:"goorselect",args:["gotopageup","selectpageup"]},"S-C-Down":"selectpagedown","S-C-Up":"selectpageup","C-s":"iSearch","C-r":"iSearchBackwards","M-C-s":"findnext","M-C-r":"findprevious","S-M-5":"replace",Backspace:"backspace","Delete|C-d":"del","Return|C-m":{command:"insertstring",args:`
`},"C-o":"splitline","M-d|C-Delete":{command:"killWord",args:"right"},"C-Backspace|M-Backspace|M-Delete":{command:"killWord",args:"left"},"C-k":"killLine","C-y|S-Delete":"yank","M-y":"yankRotate","C-g":"keyboardQuit","C-w|C-S-W":"killRegion","M-w":"killRingSave","C-Space":"setMark","C-x C-x":"exchangePointAndMark","C-t":"transposeletters","M-u":"touppercase","M-l":"tolowercase","M-/":"autocomplete","C-u":"universalArgument","M-;":"togglecomment","C-/|C-x u|S-C--|C-z":"undo","S-C-/|S-C-x u|C--|S-C-z":"redo","C-x r":"selectRectangularRegion","M-x":{command:"focusCommandLine",args:"M-x "}},f.handler.bindKeys(f.emacsKeys),f.handler.addCommands({recenterTopBottom:function(e){var n=e.renderer,a=n.$cursorLayer.getPixelPosition(),o=n.$size.scrollerHeight-n.lineHeight,r=n.scrollTop;Math.abs(a.top-r)<2?r=a.top-o:Math.abs(a.top-r-o*.5)<2?r=a.top:r=a.top-o*.5,e.session.setScrollTop(r)},selectRectangularRegion:function(e){e.multiSelect.toggleBlockSelection()},setMark:{exec:function(e,n){if(n&&n.count){e.inMultiSelectMode?e.forEachSelection(g):g(),g();return}var a=e.emacsMark(),o=e.selection.getAllRanges(),r=o.map(function(d){return{row:d.start.row,column:d.start.column}}),t=!0,i=o.every(function(d){return d.isEmpty()});if(t&&(a||!i)){e.inMultiSelectMode?e.forEachSelection({exec:e.clearSelection.bind(e)}):e.clearSelection(),a&&e.pushEmacsMark(null);return}if(!a){r.forEach(function(d){e.pushEmacsMark(d)}),e.setEmacsMark(r[r.length-1]);return}function g(){var d=e.popEmacsMark();d&&e.moveCursorToPosition(d)}},readOnly:!0,handlesCount:!0},exchangePointAndMark:{exec:function(n,a){var o=n.selection;if(!a.count&&!o.isEmpty()){o.setSelectionRange(o.getRange(),!o.isBackwards());return}if(a.count){var r={row:o.lead.row,column:o.lead.column};o.clearSelection(),o.moveCursorToPosition(n.emacsMarkForSelection(r))}else o.selectToPosition(n.emacsMarkForSelection())},readOnly:!0,handlesCount:!0,multiSelectAction:"forEach"},killWord:{exec:function(e,n){e.clearSelection(),n=="left"?e.selection.selectWordLeft():e.selection.selectWordRight();var a=e.getSelectionRange(),o=e.session.getTextRange(a);f.killRing.add(o),e.session.remove(a),e.clearSelection()},multiSelectAction:"forEach"},killLine:function(e){e.pushEmacsMark(null),e.clearSelection();var n=e.getSelectionRange(),a=e.session.getLine(n.start.row);n.end.column=a.length,a=a.substr(n.start.column);var o=e.session.getFoldLine(n.start.row);o&&n.end.row!=o.end.row&&(n.end.row=o.end.row,a="x"),/^\s*$/.test(a)&&(n.end.row++,a=e.session.getLine(n.end.row),n.end.column=/^\s*$/.test(a)?a.length:0);var r=e.session.getTextRange(n);e.prevOp.command==this?f.killRing.append(r):f.killRing.add(r),e.session.remove(n),e.clearSelection()},yank:function(e){e.onPaste(f.killRing.get()||""),e.keyBinding.$data.lastCommand="yank"},yankRotate:function(e){e.keyBinding.$data.lastCommand=="yank"&&(e.undo(),e.session.$emacsMarkRing.pop(),e.onPaste(f.killRing.rotate()),e.keyBinding.$data.lastCommand="yank")},killRegion:{exec:function(e){f.killRing.add(e.getCopyText()),e.commands.byName.cut.exec(e),e.setEmacsMark(null)},readOnly:!0,multiSelectAction:"forEach"},killRingSave:{exec:function(e){e.$handlesEmacsOnCopy=!0;var n=e.session.$emacsMarkRing.slice(),a=[];f.killRing.add(e.getCopyText()),setTimeout(function(){function o(){var r=e.selection,t=r.getRange(),i=r.isBackwards()?t.end:t.start;a.push({row:i.row,column:i.column}),r.clearSelection()}e.$handlesEmacsOnCopy=!1,e.inMultiSelectMode?e.forEachSelection({exec:o}):o(),e.setEmacsMark(null),e.session.$emacsMarkRing=n.concat(a.reverse())},0)},readOnly:!0},keyboardQuit:function(e){e.selection.clearSelection(),e.setEmacsMark(null),e.keyBinding.$data.count=null},focusCommandLine:function(e,n){e.showCommandLine&&e.showCommandLine(n)}}),f.handler.addCommands(y.iSearchStartCommands);var h=f.handler.commands;h.yank.isYank=!0,h.yankRotate.isYank=!0,f.killRing={$data:[],add:function(e){e&&this.$data.push(e),this.$data.length>30&&this.$data.shift()},append:function(e){var n=this.$data.length-1,a=this.$data[n]||"";e&&(a+=e),a&&(this.$data[n]=a)},get:function(e){return e=e||1,this.$data.slice(this.$data.length-e,this.$data.length).reverse().join(`
`)},pop:function(){return this.$data.length>1&&this.$data.pop(),this.get()},rotate:function(){return this.$data.unshift(this.$data.pop()),this.get()}}}),function(){ace.require(["ace/keyboard/emacs"],function(p){M&&(M.exports=p)})}()}}]);