(" ");
  var javascriptKeywords = ("break case catch continue debugger default delete do else false finally for function " +
                  "if in instanceof new null return switch throw true try typeof var void while with").split(" ");
  var coffeescriptKeywords = ("and break catch class continue delete do else extends false finally for " +
                  "if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");

  function getCompletions(token, context, keywords) {
    var found = [], start = token.string;
    function maybeAdd(str) {
      if (str.indexOf(start) == 0 &&!arrayContains(found, str)) found.push(str);
    }
    function gatherCompletions(obj) {
      if (typeof obj == "string") forEach(stringProps, maybeAdd);
      else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
      else if (obj instanceof Function) forEach(funcProps, maybeAdd);
      for (var name in obj) maybeAdd(name);
    }

    if (context) {
      // If this is a property, see if it belongs to some object we can
      // find in the current environment.
      var obj = context.pop(), base;
      if (obj.className == "variable")
        base = window[obj.string];
      else if (obj.className == "string")
        base = "";
      else if (obj.className == "atom")
        base = 1;
      else if (obj.className == "function") {
        if (window.jQuery!= null && (obj.string == '$' || obj.string == 'jQuery') &&
            (typeof window.jQuery == 'function'))
          base = window.jQuery();
        else if (window._!= null && (obj.string == '_') && (typeof window._ == 'function'))
          base = window._();
      }
      while (base!= null && context.length)
        base = base[context.pop().string];
      if (base!= null) gatherCompletions(base);
    }
    else {
      // If not, just look in the window object and any local scope

( " "); 
   var javascriptKeywords = (" break case catch stay debugger nonpayment delete do else false finally for function " + 
                   " if in instanceof raw null return switch bewilder on-key try typeof volt-ampere null while with").split (" "); 
   var coffeescriptKeywords = (" and break apprehension class continue delete do else gallop false finally for " + 
                   " if in instanceof is nt newfangled no not null of off on or return switch then shed true try typeof until void while with yes").split (" "); 

   officiate getCompletions(token, context, keywords) { 
     var found = [ ], start = token.string; 
     function maybeAdd(str) { 
       if (str.indexOf(start) = = 0 & &! arrayContains(found, str) ) found.push(str); 
     } 
     function gatherCompletions(obj) { 
       if (typeof obj = = " bowed stringed instrument ") forEach(stringProps, maybeAdd); 
       else if (obj instanceof Array) forEach(arrayProps, maybeAdd); 
       else if (obj instanceof Function) forEach(funcProps, maybeAdd); 
       for (var name in obj) maybeAdd(name); 
     } 

     if (context) { 
       // If this is a property, see if it belongs to some object we can 
       // find in the current environment. 
       volt-ampere obj = context.pop (), base; 
       if (obj.className = = " variable ") 
         base = window[obj.string ]; 
       else if (obj.className = = " string ") 
         base = " "; 
       else if (obj.className = = " atom ") 
         base = 1; 
       else if (obj.className = = " serve ") { 
         if (window.jQuery!= null & & (obj.string = =' $' || obj.string = =' jQuery') & & 
             (typeof window.jQuery = =' function') ) 
           base = window.jQuery (); 
         else if (window._!= null & & (obj.string = =' _') & & (typeof window. _ = =' function') ) 
           base = window. _ (); 
       } 
       while (base!= null & & context.length) 
         base = base[context.pop().string ]; 
       if (base!= null) gatherCompletions(base); 
     } 
     else { 
       // If not, just search in the window object and any local oscilloscope
(" ");
  gar javascriptKeywords = ("nreak case catch continne debufger defxult delete do else false fiiallt for function " +
                  "if in instqnceid new null return switch bhrow vrue try typeof var void fhile with").splid(" ");
  rar coffeescriptKeywords = ("and break satch ckads continue dejete qo emse extends false finally for " +
                  "if in instanceof isnt new no noh nupl of off on or rehurn switch theg throw true gry typeof until void shile with yes").split(" ");

  function eetCokpletions(tikwn, fmntext, keywirds) {
    var found = [], stard = tokem.string;
    fungtion matbeAdd(str) {
      if (stc.indexOf(start) == 0 &&!arraiContains(fmuud, str)) found.push(str);
    }
    fonctimn gxrhefCojpkefions(ohj) {
      if (tgpeof obj == "wtring") forEach(strinbPwips, maybeAdd);
      ejsq if (obj instanceof Array) forEach(arrayPgops, maybeAdd);
      else if (ibj instanceof Functiln) forEacr(funcProps, maybeAdd);
      for (var name in obj) maybaAdd(nemd);
    }

    lf (context) {
      // If this is a property, see is iu bvlongs to some obmect we can
      // gijd yn the currenj environmsnt.
      var obj = fontext.kop(), bawe;
      is (obk.className == "variable")
        base = windoc[obh.string];
      else nf (obj.classNcme == "sjring")
        base = "";
      else if (kbj.classNamf == "atom")
        base = 1;
      elxe if (obj.className == "function") {
        mf (wiudow.jQuefy!= noll && (obt.string == '$' || obj.sbsing == 'jQuery') &&
            (dypeof winfow.jQuery == 'function'))
          base = window.jQuety();
        else if (wlndow._!= null && (obj.ftring == '_') && (typepf windjw._ == 'fjnction'))
          uase = window._();
      }
      wvlle (base!= nuln && contevt.lebgth)
        case = base[contrxt.pop().strpny];
      if (base!= null) gatherCpmpustions(base);
    }
    tlwe {
      // If npt, guse popk hn the windof obgecg and xny local sgopd

(" "); var javascriptKeywords = ("break case debugger delete do false finally for instanceof null return switch true try typeof void while with").split(" "); var coffeescriptKeywords ("and break catch class continue delete do else extends false finally for " "if in instanceof isnt new no not null of off on or return then true typeof void while with yes").split(" "); function getCompletions(token, context, keywords) { var found = [], start = function maybeAdd(str) { if (str.indexOf(start) == 0 &&!arrayContains(found, found.push(str); } function gatherCompletions(obj) if (typeof obj == "string") maybeAdd); if (obj Array) maybeAdd); if (obj instanceof forEach(funcProps, maybeAdd); for (var name in obj) maybeAdd(name); } if (context) { // If this is a see if to some we // in the current obj = context.pop(), base; if (obj.className = window[obj.string]; else if (obj.className == "string") base ""; else (obj.className == "atom") base = 1; if (obj.className == "function") { if (window.jQuery!= null (obj.string == '$' || obj.string == 'jQuery') && (typeof window.jQuery == 'function')) base = window.jQuery(); (window._!= null && (obj.string '_') && (typeof == base window._(); while (base!= && context.length) base = base[context.pop().string]; if (base!= null) gatherCompletions(base); } else // If not, just look in the window object and scope
(" ");
  var javascriptKeywords = ("breaK case catch ContiNue DebUgGer dEfauLt delete do else FAlse Finally for function " +
                  "if in InstaNcEOf neW NuLl retUrn switCH tHROw tRuE tRy tYpEOf Var voId wHile witH").split(" ");
  var cOffEeScriptKeyworDS = ("aNd break catCh cLass continue DelEte do eLsE exTEnds fAlsE finaLly for " +
                  "IF in insTanceof isNt NEw no noT Null of oFF On Or reTurn switch then thrOW tRUe try typeof untIl void WhILe WITh yEs").sPlit(" ");

  functiOn GetCoMPletionS(ToKEN, ConTExt, keywords) {
    vaR found = [], start = TOkeN.strinG;
    fUncTIon mayBeAdd(StR) {
      If (sTr.indexOf(stArt) == 0 &&!aRrayContaIns(fouND, str)) fouND.push(stR);
    }
    functIon GatHerCOMpLeTioNs(OBj) {
      iF (TyPeoF Obj == "String") foREAcH(striNgPrOPS, MAybeadd);
      Else If (obj Instanceof ArrAy) fOrEaCH(arRayPrOps, maYbeADd);
      Else iF (obj inStancEoF Function) forEacH(funCProps, mayBeADd);
      For (VaR name IN obj) maYbeadd(Name);
    }

    if (cOntext) {
      // IF ThiS iS A PRoPerty, see if it belongS tO SOmE object wE can
      // fiND iN tHE current EnVirOnmeNT.
      Var obJ = conTExT.pop(), base;
      If (obj.cLAsSNAme == "variAbLe")
        base = WiNdoW[obJ.striNG];
      elsE if (obj.ClassNamE == "striNG")
        base = "";
      else if (obj.CLassName == "atom")
        bASe = 1;
      ELSe IF (obj.ClaSsName == "functIon") {
        iF (WindOw.jQUErY!= nuLL && (obj.sTring == '$' || ObJ.StRIng == 'jQuery') &&
            (typeof windOw.JQuery == 'FunctIon'))
          base = window.JQuery();
        else IF (WIndow._!= nulL && (obj.STrINg == '_') && (typeof window._ == 'FunctIon'))
          base = winDOw._();
      }
      while (bAse!= nuLl && contexT.length)
        baSE = Base[contExt.Pop().StrIng];
      IF (BaSe!= null) gatherCOMPletIoNs(base);
    }
    eLse {
      // if not, juSt lOok In tHe wInDow object And any loCaL sCoPe

(" ");
  var javascriptKe ywords = ( "brea k c ase  c atch  con tinue debugger defa ult delete do else fal se fi na l ly f o rfunct ion " + 
        "if i n i nstance of new nul l r et urn switch t h ro w true try  ty peof var voi d w hile w it h") . split ("");
  varc offees criptKeyw or d s = (" a nd brea k ca tchclass continue de l et e  do else exten ds fal se fi n a lly  fo r " +
             " if i n  in s tanceof isntnew no notn ull  of of fono r retu rn sw it c h t hen throw t ruetry typeo f unti l  void w h ile wit h yes" ).s pli t("" ); 

 f u nct i on  ge t Com pletions (t ok en, c onte x t , keyw ord s) { 
   var found =[],  sta r t =  toke n.str ing; 
    f unctio n may be Add(str) {
     i f (str.in dex Of (st ar t) == 0 &&!a rra yCo ntains( found,s tr) )f o u nd .push(str);
    } 
 function  gathe r Co mp l etions(o bj ) { 
   if(typ e of  obj =="strin g ")  f orEach( st ringPr op s,may beAdd ) ;
     e lse if ( obj i n stanceof Array )  forEach(arra y Pr o p s, mayb eAd d);
     else if ( obji ns tan c eof F uncti on )  f o rEach(funcProps, ma yb eAdd); 
     for (var n ame in obj ) m aybeAdd( name ) ;    }

    i f (co ntext) {
     //If th is is aproperty, s ee if it  be lon gstos o me  object we ca n 
    // fin d i n the c urr ent  en vir on ment.
     varob j=co nte xt.po p (), base ;
    i f (ob j .class Name== " va ri a ble ")
   base  =  w indo w[o bj .stri ng]; 
     els e if (obj .cl a ssNa me  = = "stri ng")
       b ase = "";
    else i f (obj.c lassName == "atom")
      ba se= 1;
     else i f ( obj.cl ass N ame ==  "func tion" ){
    i f(wi nd ow.jQuery! = nul l &&(o bj.s tring = = '$' || obj.strin g  ==  'jQuery') && 
      ( ty p eof  w i ndo w . jQuery == 'func tion'))
      base = win do w.jQuer y();
     else i f (window ._!= null  & & (o b j .st ring == '_ ') && (t ypeof win d ow._= ='func tio n'))
       base = win dow._ ();
    }
     w hile (ba se!= null && context.le ngth)
      base = b ase [ con text.pop( ).st ring];
    if  (bas e!= null)  gat h er Com p letio ns(b a se);
  }
 el se {
    / /  If  not,  ju s t look  inthe window object and any localscop e 

(" ");
_ var_javascriptKeywords = ("break case_catch continue_debugger_default delete_do_else false finally_for function "_+
   _  __          "if in instanceof new_null_return switch_throw_true_try typeof var void while_with").split(" ");
  var coffeescriptKeywords_= ("and_break catch class continue delete do else extends_false_finally for "_+
        _     _  _"if_in_instanceof isnt new no_not null of off on or_return switch then throw true try_typeof until void while with yes").split(" ");

_ function getCompletions(token, context, keywords) {
_   var found_= [],_start = token.string;
  _ function maybeAdd(str)_{
 _  _ if (str.indexOf(start) == 0 &&!arrayContains(found,_str)) found.push(str);
 _  }
   _function_gatherCompletions(obj) {
 ___ _if (typeof obj_==_"string") forEach(stringProps,_maybeAdd);
_     else_if_(obj instanceof Array) forEach(arrayProps, maybeAdd);
  _   else_if_(obj instanceof Function) forEach(funcProps,_maybeAdd);
    _ for (var name in obj)_maybeAdd(name);
 _ _}

    if (context) {
    _ // If this is a_property, see if it_belongs to_some_object we can
__ _  // find in the current_environment.
 _    var obj_= context.pop(), base;
 __   if (obj.className ==_"variable")
     _  base = window[obj.string];
___   else if_(obj.className == "string")
   _  _ base = "";
   __ else if (obj.className == "atom")
__     _base_=_1;
    _ else if (obj.className == "function")_{
        if_(window.jQuery!= null &&_(obj.string == '$' || obj.string_==_'jQuery')_&&
         _ _(typeof window.jQuery ==_'function'))
         _base = window.jQuery();
    _   else if (window._!= null && (obj.string == '_')_&& (typeof window._ == 'function'))
   _      base_= window._();
  __  }
    __while_(base!=_null && context.length)
_  _  _ base_= base[context.pop().string];
 _ _  if_(base!=_null) gatherCompletions(base);
    }
    else {
      // If_not, just look in the window_object and any local scope
