'use strict';(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],a):a(CodeMirror)})(function(a){function h(b,c,k,a){b.openDialog?b.openDialog(c,a):a(prompt(k,""))}var d=a.keyMap.pcDefault,f=a.keyMap.macDefault,g=a.Pos;d["Shift-Ctrl-L"]=f["Shift-Cmd-L"]=function(b){for(var c=[],a=b.getCursor("from"),d=b.getCursor("to"),e=a.line;e<=d.line;++e)c.push({anchor:e==a.line?a:g(e,0),head:e==d.line?
d:g(e)});b.setSelections(c,0)};d["Ctrl-D"]=f["Cmd-D"]=function(b){var c=b.getCursor("to"),c=b.getSearchCursor(b.getRange(b.getCursor("from"),c),c);c.findNext()&&b.addSelection(c.from(),c.to())};d["Alt-F"]=f["Alt-F"]=function(b){b.somethingSelected()&&h(b,'Match: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp)</span>',"Match:",function(c){var a=c.match(/^\/(.*)\/([a-z]*)$/);a&&(c=RegExp(a[1],-1==a[2].indexOf("i")?"":"i"));b.selectMatches(c)})}});
