import{g as d}from"./index-Cq7z4i0o.js";import{r as g}from"./codemirror-DpyRu-EA.js";import{r as h}from"./dialog-CNuDh2gC.js";function b(p,l){for(var o=0;o<l.length;o++){const s=l[o];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in p)){const u=Object.getOwnPropertyDescriptor(s,i);u&&Object.defineProperty(p,i,u.get?u:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}var f={exports:{}},c;function j(){return c||(c=1,(function(p,l){(function(o){o(g(),h())})(function(o){o.defineOption("search",{bottom:!1});function s(e,t,n,r,a){e.openDialog?e.openDialog(t,a,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):a(prompt(n,r))}function i(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}function u(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}o.commands.jumpToLine=function(e){var t=e.getCursor();s(e,i(e),e.phrase("Jump to line:"),t.line+1+":"+t.ch,function(n){if(n){var r;if(r=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(n))e.setCursor(u(e,r[1]),Number(r[2]));else if(r=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(n)){var a=Math.round(e.lineCount()*Number(r[1])/100);/^[-+]/.test(r[1])&&(a=t.line+a+1),e.setCursor(a-1,t.ch)}else(r=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(n))&&e.setCursor(u(e,r[1]),t.ch)}})},o.keyMap.default["Alt-G"]="jumpToLine"})})()),f.exports}var m=j();const x=d(m),T=b({__proto__:null,default:x},[m]);export{T as j};
//# sourceMappingURL=jump-to-line-Cs0YrU2q.js.map
