!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).search=e()}}(function(){return function s(o,l,a){function h(i,e){if(!l[i]){if(!o[i]){var t="function"==typeof require&&require;if(!e&&t)return t(i,!0);if(f)return f(i,!0);var r=new Error("Cannot find module '"+i+"'");throw r.code="MODULE_NOT_FOUND",r}var n=l[i]={exports:{}};o[i][0].call(n.exports,function(e){return h(o[i][1][e]||e)},n,n.exports,s,o,l,a)}return l[i].exports}for(var f="function"==typeof require&&require,e=0;e?",n=(s.prototype.findNext=function(e,i){var t,r=i.incremental;if(!e||0===e.length)return this._terminal.clearSelection(),!1;var n=0,s=this._terminal.buffer.viewportY;if(this._terminal.hasSelection()){var o=this._terminal.getSelectionPosition();s=r?o.startRow:o.endRow,n=r?o.startColumn:o.endColumn}this._initLinesCache();for(var l=s,a=n;this._terminal.buffer.getLine(l).isWrapped;)l--,a+=this._terminal.cols;if(!(t=this._findInLine(e,l,a,i)))for(var h=s+1;h=this._terminal.cols&&(i+=Math.floor(a/this._terminal.cols),a%=this._terminal.cols),r.wholeWord&&!this._isWholeWord(a,l,e))return;for(var c=this._terminal.buffer.getLine(i),u=0;u