{"version":3,"file":"dist/jquery.textcomplete.min.js","sources":["dist/jquery.textcomplete.js"],"names":["jQuery","Error","$","warn","message","console","fn","textcomplete","strategies","option","args","Array","prototype","slice","call","arguments","this","each","$this","completer","data","Completer","shift","apply","obj","name","register","Strategy","parse","element","$el","id","uniqueId","views","extend","DEFAULTS","is","isContentEditable","document","activeElement","initialize","self","one","lock","func","locked","queuedArgsToReplay","unshift","replayOrFree","replayArgs","undefined","appendTo","input","dropdown","get","viewName","Dropdown","destroy","off","trigger","text","skipUnchangedTerm","searchQuery","_extractSearchQuery","length","term","_term","_search","deactivate","fire","eventName","push","select","value","strategy","focus","_clearAtNext","i","match","index","free","search","stillSearching","shown","activate","setPosition","getCaretPosition","clear","render","_zip","map","createElement","_data","$inputEl","listPosition","_i","_bindEvents","dropdownViews","include","zippedData","datum","elem","on","e","originalEvent","keepTextCompleteDropdown","key","view","css","display","left","position","zIndex","footer","header","maxCount","placement","contentsHtml","_buildContents","unzippedData","d","_renderHeader","_renderFooter","_renderContents","_activateIndexedItem","_setScroll","_applyPlacement","html","_index","_$header","_$footer","show","hide","isUp","keyCode","ctrlKey","isDown","isEnter","modifiers","altKey","metaKey","shiftKey","isPageup","isPagedown","proxy","_onClick","_onMouseover","_onKeydown","target","preventDefault","hasClass","closest","parseInt","setTimeout","_up","_down","_enter","_pageup","_pagedown","_getActiveElement","threshold","top","innerHeight","children","outerHeight","find","removeClass","addClass","$activeEl","itemTop","itemHeight","visibleHeight","visibleTop","scrollTop","template","prependTo","isFunction","before","append","indexOf","bottom","parent","height","lineHeight","right","options","cache","memoize","memo","callback","concat","optionsArray","replace","Input","el","constructor","_getCaretRelativePosition","offset","_onKeyup","_skipSearch","_getTextFromHeadToCaret","clickEvent","Textarea","DIV_PROPERTIES","whiteSpace","COPY_PROPERTIES","pre","selectionEnd","post","substring","newSubstr","isArray","val","selectionStart","selection","dummyDiv","_copyCss","span","remove","overflow","scrollHeight","offsetHeight","_getStyles","color","styles","property","range","createTextRange","moveStart","moveEnd","ContentEditable","sel","window","getSelection","getRangeAt","cloneRange","selectNodeContents","startContainer","content","toString","startOffset","deleteContents","node","createTextNode","insertNode","setStart","collapse","removeAllRanges","addRange","$node","dir","attr","listView","width"],"mappings":"AAQA,GAAsB,mBAAXA,QACT,KAAM,IAAIC,OAAM,wCAGjB,SAAUC,GACT,YAEA,IAAIC,GAAO,SAAUC,GACfC,QAAQF,MAAQE,QAAQF,KAAKC,GAGnCF,GAAEI,GAAGC,aAAe,SAAUC,EAAYC,GACxC,GAAIC,GAAOC,MAAMC,UAAUC,MAAMC,KAAKC,UACtC,OAAOC,MAAKC,KAAK,WACf,GAAIC,GAAQhB,EAAEc,MACVG,EAAYD,EAAME,KAAK,eACtBD,KACHA,EAAY,GAAIjB,GAAEI,GAAGC,aAAac,UAAUL,KAAMP,OAClDS,EAAME,KAAK,eAAgBD,IAEH,gBAAfX,IACTE,EAAKY,QACLH,EAAUX,GAAYe,MAAMJ,EAAWT,KAIvCR,EAAEe,KAAKT,EAAY,SAAUgB,GAC3BtB,EAAEe,MAAM,SAAU,SAAU,YAAa,YAAa,SAAUQ,GAC1DD,EAAIC,KACNhB,EAAOgB,GAAQD,EAAIC,GACnBtB,EAAKsB,EAAO,wDACLD,GAAIC,QAIjBN,EAAUO,SAASxB,EAAEI,GAAGC,aAAaoB,SAASC,MAAMpB,SAK1DR,SAED,SAAUE,GACT,YA4DA,SAASmB,GAAUQ,EAASpB,GAO1B,GANAO,KAAKc,IAAa5B,EAAE2B,GACpBb,KAAKe,GAAa,eAAiBC,IACnChB,KAAKR,cACLQ,KAAKiB,SACLjB,KAAKP,OAAaP,EAAEgC,UAAWb,EAAUc,SAAU1B,IAE9CO,KAAKc,IAAIM,GAAG,cAAgBP,EAAQQ,kBACvC,KAAM,IAAIpC,OAAM,kEAGlB,IAAI4B,IAAYS,SAASC,cAEvBvB,KAAKwB,iBACA,CAEL,GAAIC,GAAOzB,IACXA,MAAKc,IAAIY,IAAI,SAAW1B,KAAKe,GAA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