(function(){"use strict";var e=/[\w$]+/,t=500;CodeMirror.registerHelper("hint","anyword",function(n,r){function p(e){var t=o.line,r=Math.min(Math.max(t+e*s,n.firstLine()),n.lastLine())+e;for(;t!=r;t+=e){var u=n.getLine(t),a,f=new RegExp(i.source,"g");while(a=f.exec(u)){if(t==o.line&&a[0]===l)continue;(!l||a[0].indexOf(l)==0)&&!h.hasOwnProperty(a[0])&&(h[a[0]]=!0,c.push(a[0]))}}}var i=r&&r.word||e,s=r&&r.range||t,o=n.getCursor(),u=n.getLine(o.line),a=o.ch,f=a;while(f<u.length&&i.test(u.charAt(f)))++f;while(a&&i.test(u.charAt(a-1)))--a;var l=a!=f&&u.slice(a,f),c=[],h={};return p(-1),p(1),{list:c,from:CodeMirror.Pos(o.line,a),to:CodeMirror.Pos(o.line,f)}})})();