web-interface.assets.6.6.a37bd6c43e2b13149f99.js Maven / Gradle / Ivy
webpackJsonp([6],[,,,,,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(236);Object.defineProperty(t,"ChosenSelectInput",{enumerable:!0,get:function(){return r(n)["default"]}});var s=i(237);Object.defineProperty(t,"ClipboardButton",{enumerable:!0,get:function(){return r(s)["default"]}});var o=i(238);Object.defineProperty(t,"DataFilter",{enumerable:!0,get:function(){return r(o)["default"]}});var a=i(146);Object.defineProperty(t,"DataTable",{enumerable:!0,get:function(){return r(a)["default"]}});var l=i(240);Object.defineProperty(t,"DatePicker",{enumerable:!0,get:function(){return r(l)["default"]}});var u=i(241);Object.defineProperty(t,"DocumentTitle",{enumerable:!0,get:function(){return r(u)["default"]}});var c=i(128);Object.defineProperty(t,"EntityList",{enumerable:!0,get:function(){return r(c)["default"]}});var d=i(204);Object.defineProperty(t,"EntityListItem",{enumerable:!0,get:function(){return r(d)["default"]}});var p=i(242);Object.defineProperty(t,"GridsterContainer",{enumerable:!0,get:function(){return r(p)["default"]}});var h=i(243);Object.defineProperty(t,"GridsterWidget",{enumerable:!0,get:function(){return r(h)["default"]}});var f=i(245);Object.defineProperty(t,"IfPermitted",{enumerable:!0,get:function(){return r(f)["default"]}});var g=i(244);Object.defineProperty(t,"ISODurationInput",{enumerable:!0,get:function(){return r(g)["default"]}});var _=i(247);Object.defineProperty(t,"LinkToNode",{enumerable:!0,get:function(){return r(_)["default"]}});var y=i(248);Object.defineProperty(t,"LoadingIndicator",{enumerable:!0,get:function(){return r(y)["default"]}});var m=i(246);Object.defineProperty(t,"KeyValueTable",{enumerable:!0,get:function(){return r(m)["default"]}});var v=i(147);Object.defineProperty(t,"MultiSelect",{enumerable:!0,get:function(){return r(v)["default"]}});var b=i(249);Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return r(b)["default"]}});var w=i(250);Object.defineProperty(t,"PageErrorOverview",{enumerable:!0,get:function(){return r(w)["default"]}});var x=i(39);Object.defineProperty(t,"PageHeader",{enumerable:!0,get:function(){return r(x)["default"]}});var T=i(251);Object.defineProperty(t,"PaginatedList",{enumerable:!0,get:function(){return r(T)["default"]}});var D=i(252);Object.defineProperty(t,"Pluralize",{enumerable:!0,get:function(){return r(D)["default"]}});var C=i(253);Object.defineProperty(t,"SearchForm",{enumerable:!0,get:function(){return r(C)["default"]}});var S=i(101);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return r(S)["default"]}});var P=i(254);Object.defineProperty(t,"SelectableList",{enumerable:!0,get:function(){return r(P)["default"]}});var O=i(205);Object.defineProperty(t,"SortableList",{enumerable:!0,get:function(){return r(O)["default"]}});var E=i(148);Object.defineProperty(t,"SortableListItem",{enumerable:!0,get:function(){return r(E)["default"]}});var M=i(28);Object.defineProperty(t,"Spinner",{enumerable:!0,get:function(){return r(M)["default"]}});var k=i(206);Object.defineProperty(t,"TableList",{enumerable:!0,get:function(){return r(k)["default"]}});var I=i(255);Object.defineProperty(t,"Timestamp",{enumerable:!0,get:function(){return r(I)["default"]}});var N=i(256);Object.defineProperty(t,"TimezoneSelect",{enumerable:!0,get:function(){return r(N)["default"]}});var z=i(149);Object.defineProperty(t,"TypeAheadDataFilter",{enumerable:!0,get:function(){return r(z)["default"]}});var A=i(257);Object.defineProperty(t,"TypeAheadFieldInput",{enumerable:!0,get:function(){return r(A)["default"]}});var j=i(258);Object.defineProperty(t,"TypeAheadInput",{enumerable:!0,get:function(){return r(j)["default"]}})},,,,,,,,,,,,,,,,,,,,,,,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=s["default"].createClass({displayName:"Spinner",propTypes:{text:s["default"].PropTypes.string},getDefaultProps:function(){return{text:"Loading..."}},getInitialState:function(){return{}},render:function(){return s["default"].createElement("span",null,s["default"].createElement("i",{className:"fa fa-spin fa-spinner"})," ",this.props.text)}});t["default"]=o,e.exports=t["default"]},,,,,,,,,,,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=i(2),a=i(61),l=r(a),u=s["default"].createClass({displayName:"PageHeader",propTypes:{title:n.PropTypes.oneOfType([n.PropTypes.node,n.PropTypes.string]).isRequired,children:n.PropTypes.oneOfType([n.PropTypes.array,n.PropTypes.node]),experimental:n.PropTypes.bool,subpage:n.PropTypes.bool},getDefaultProps:function(){return{experimental:!1,subpage:!1}},render:function(){var e=void 0!==this.props.children&&void 0!==this.props.children.length?this.props.children:[this.props.children],t=void 0;this.props.experimental&&(t=s["default"].createElement("span",{style:{cursor:"help",marginLeft:5,fontSize:14,lineHeight:"20px",verticalAlign:"text-top"}},s["default"].createElement(o.OverlayTrigger,{placement:"bottom",overlay:s["default"].createElement(o.Tooltip,{id:"experimental"},"This feature of Graylog is new and should be considered experimental.")},s["default"].createElement(o.Label,{bsStyle:"primary"},"Experimental"))));var i=this.props.subpage?"content-head":"content content-head";return s["default"].createElement("div",null,s["default"].createElement(o.Row,{className:i},s["default"].createElement(o.Col,{sm:12},e[2]&&s["default"].createElement("div",{className:"actions-lg visible-lg visible-md"},s["default"].createElement("div",{className:"actions-container"},e[2])),s["default"].createElement("h1",null,this.props.title," ",s["default"].createElement("small",null,t)),e[0]&&s["default"].createElement("p",{className:"description"},e[0]),e[1]&&s["default"].createElement(l["default"],null,e[1])),e[2]&&s["default"].createElement(o.Col,{sm:12,lgHidden:!0,mdHidden:!0,className:"actions-sm"},e[2])))}});t["default"]=u,e.exports=t["default"]},,,,,,,,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={clone:function(e){return JSON.parse(JSON.stringify(e))},isEmpty:function(e){var t=Object.keys(e);return t&&0===t.length}};t["default"]=i,e.exports=t["default"]},,function(e,t){var i=Array.isArray;e.exports=i},function(e,t,i){function r(e){if(!s(e)||p.call(e)!=o)return!1;var t=n(e);if(null===t)return!0;var i=c.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&u.call(i)==d}var n=i(418),s=i(74),o="[object Object]",a=Function.prototype,l=Object.prototype,u=a.toString,c=l.hasOwnProperty,d=u.call(Object),p=l.toString;e.exports=r},,,,,,,,,function(e,t,i){function r(e,t){return o(s(e,t,n),e+"")}var n=i(188),s=i(443),o=i(446);e.exports=r},,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),s=r(n),o=s["default"].createClass({displayName:"SupportLink",propTypes:{small:s["default"].PropTypes.bool,children:s["default"].PropTypes.node.isRequired},render:function(){var e=this.props.small?"fa-stack":"fa-stack fa-lg";return s["default"].createElement("table",{className:"description-tooltips",style:{marginBottom:"10px"}},s["default"].createElement("tbody",null,s["default"].createElement("tr",null,s["default"].createElement("td",{style:{width:"40px"}},s["default"].createElement("span",{className:e},s["default"].createElement("i",{className:"fa fa-circle fa-stack-2x"}),s["default"].createElement("i",{className:"fa fa-lightbulb-o fa-stack-1x fa-inverse"}))),s["default"].createElement("td",null,s["default"].createElement("strong",null,this.props.children)))))}});t["default"]=o,e.exports=t["default"]},,,,,,,,,,,function(e,t,i){var r=i(185),n="object"==typeof self&&self&&self.Object===Object&&self,s=r||n||Function("return this")();e.exports=s},function(e,t){function i(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=i},function(e,t){function i(e){return null!=e&&"object"==typeof e}e.exports=i},function(e,t,i){e.exports=i(12)(6)},,,,,,,,,function(e,t,i){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function n(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.publishSource,r=void 0===i||i,n=t.clientOffset,s=void 0===n?null:n,o=t.getSourceClientOffset;p["default"](f["default"](e),"Expected sourceIds to be an array.");var a=this.getMonitor(),l=this.getRegistry();p["default"](!a.isDragging(),"Cannot call beginDrag while dragging.");for(var u=0;u=0;u--)if(a.canDragSource(e[u])){c=e[u];break}if(null!==c){var d=null;s&&(p["default"]("function"==typeof o,"When clientOffset is provided, getSourceClientOffset must be a function."),d=o(c));var h=l.getSource(c),g=h.beginDrag(a,c);p["default"](_["default"](g),"Item must be an object."),l.pinSource(c);var m=l.getSourceType(c);return{type:y,itemType:m,item:g,sourceId:c,clientOffset:s,sourceClientOffset:d,isSourcePublic:r}}}function s(e){var t=this.getMonitor();if(t.isDragging())return{type:m}}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.clientOffset,r=void 0===i?null:i;p["default"](f["default"](e),"Expected targetIds to be an array."),e=e.slice(0);var n=this.getMonitor(),s=this.getRegistry();p["default"](n.isDragging(),"Cannot call hover while not dragging."),p["default"](!n.didDrop(),"Cannot call hover after drop.");for(var o=0;o=0;o--){var a=e[o],d=s.getTargetType(a);c["default"](d,u)||e.splice(o,1)}for(var o=0;o50&&$("#scroll-to-search-hint").fadeIn("fast").delay(1500).fadeOut("fast")},substringMatcher:function(e,t,i){return function(r,n){var s=[];e.forEach(function(e){if(s.length-1}var n=i(403);e.exports=r},function(e,t){function i(e,t,i){for(var r=-1,n=e?e.length:0;++r0?Math.floor(r):Math.ceil(r),s=r-n,o=i+1===v.length,a=!i,u(t,function(t){t.type===e&&(y(t,{value:r,wholeValue:n,decimalValue:s,isLeast:o,isMost:a}),a&&null==x.forceLength&&t.length>1&&(x.forceLength=!0))}),T.subtract(n,e)}),x.trim&&(t=("left"===x.trim?g:_)(t,function(e){return!(e.isLeast||null!=e.type&&e.wholeValue)})),b=!1,"right"===x.trim&&t.reverse(),t=c(t,function(e){var t,i;if(!e.type)return e.token;if(t=e.isLeast&&x.precision<0?(Math.floor(e.wholeValue*Math.pow(10,x.precision))*Math.pow(10,-x.precision)).toString():e.wholeValue.toString(),t=t.replace(/^\-/,""),e.length>1&&(b||e.isMost||x.forceLength)&&(t=n(t,e.length)),e.isLeast&&x.precision>0)switch(i=e.decimalValue.toString().replace(/^\-/,"").split(/\.|e\-/),i.length){case 1:t+="."+n(i[0],x.precision,!0).slice(0,x.precision);break;case 2:t+="."+n(i[1],x.precision,!0).slice(0,x.precision);break;case 3:t+="."+n(r(+i[2]-1)+(i[0]||"0")+i[1],x.precision,!0).slice(0,x.precision);break;default:throw"Moment Duration Format: unable to parse token decimal value."}return e.isMost&&e.value<0&&(t="-"+t),b=!0,t}),"right"===x.trim&&t.reverse(),t.join("")):d(t,"token").join("")},m.duration.fn.format.defaults={escape:/\[(.+?)\]/,years:/[Yy]+/,months:/M+/,weeks:/[Ww]+/,days:/[Dd]+/,hours:/[Hh]+/,minutes:/m+/,seconds:/s+/,milliseconds:/S+/,general:/.+?/,types:"escape years months weeks days hours minutes seconds milliseconds general",trim:"left",precision:0,forceLength:null,template:function(){var e=this.types,t=this.duration,i=a(e,function(e){return t._data[e]});switch(i){case"seconds":return"h:mm:ss";case"minutes":return"d[d] h:mm";case"hours":return"d[d] h[h]";case"days":return"M[m] d[d]";case"weeks":return"y[y] w[w]";case"months":return"y[y] M[m]";case"years":return"y[y]";default:return"y[y] M[m] d[d] h:mm:ss"}}}}(this)},function(e,t){"use strict";t.__esModule=!0;var i="__NATIVE_FILE__";t.FILE=i;var r="__NATIVE_URL__";t.URL=r;var n="__NATIVE_TEXT__";t.TEXT=n},function(e,t){"use strict";function i(e,t){if(e===t)return!0;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(var n=Object.prototype.hasOwnProperty,s=0;s=this.maxSize&&(this.list.remove(r),delete this.hash[r.key],this.size--),(i=this.hash[e])?(i.val=t,this.list.moveToFront(i)):(i=new n(e,t),this.list.add(i),this.hash[e]=i,this.size++)},get:function(e){var t=this.hash[e];if(t)return this.list.moveToFront(t),t.val},reset:function(){this.size=0,this.hash={},this.list=new r}}),t.mixin(r.prototype,{add:function(e){this.head&&(e.next=this.head,this.head.prev=e),this.head=e,this.tail=this.tail||e},remove:function(e){e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev},moveToFront:function(e){this.remove(e),this.add(e)}}),i}(),s=function(){"use strict";function i(e,i){this.prefix=["__",e,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix)),this.ls=i||a,!this.ls&&this._noop()}function r(){return(new Date).getTime()}function n(e){return JSON.stringify(t.isUndefined(e)?null:e)}function s(t){return e.parseJSON(t)}function o(e){var t,i,r=[],n=a.length;for(t=0;ti)}}),i}(),o=function(){"use strict";function i(e){e=e||{},this.cancelled=!1,this.lastReq=null,this._send=e.transport,this._get=e.limiter?e.limiter(this._get):this._get,this._cache=e.cache===!1?new n(0):a}var r=0,s={},o=6,a=new n(10);return i.setMaxPendingRequests=function(e){o=e},i.resetCache=function(){a.reset()},t.mixin(i.prototype,{_fingerprint:function(t){return t=t||{},t.url+t.type+e.param(t.data||{})},_get:function(e,t){function i(e){t(null,e),c._cache.set(l,e)}function n(){t(!0)}function a(){r--,delete s[l],c.onDeckRequestArgs&&(c._get.apply(c,c.onDeckRequestArgs),c.onDeckRequestArgs=null)}var l,u,c=this;l=this._fingerprint(e),this.cancelled||l!==this.lastReq||((u=s[l])?u.done(i).fail(n):rt[r]?r++:(n.push(e[i]),i++,r++);return n}var a="c",l="i";return t.mixin(i.prototype,{bootstrap:function(e){this.datums=e.datums,this.trie=e.trie},add:function(e){var i=this;e=t.isArray(e)?e:[e],t.each(e,function(e){var s,o;i.datums[s=i.identify(e)]=e,o=r(i.datumTokenizer(e)),t.each(o,function(e){var t,r,o;for(t=i.trie,r=e.split("");o=r.shift();)t=t[a][o]||(t[a][o]=n()),t[l].push(s)})})},get:function(e){var i=this;return t.map(e,function(e){return i.datums[e]})},search:function(e){var i,n,u=this;return i=r(this.queryTokenizer(e)),t.each(i,function(e){var t,i,r,s;if(n&&0===n.length)return!1;for(t=u.trie,i=e.split("");t&&(r=i.shift());)t=t[a][r];return t&&0===i.length?(s=t[l].slice(0),void(n=n?o(n,s):s)):(n=[],!1)}),n?t.map(s(n),function(e){return u.datums[e]}):[]},all:function(){var e=[];for(var t in this.datums)e.push(this.datums[t]);return e},reset:function(){this.datums={},this.trie=n()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),i}(),l=function(){"use strict";function e(e){this.url=e.url,this.ttl=e.ttl,this.cache=e.cache,this.prepare=e.prepare,this.transform=e.transform,this.transport=e.transport,this.thumbprint=e.thumbprint,this.storage=new s(e.cacheKey)}var i;return i={data:"data",protocol:"protocol",thumbprint:"thumbprint"},t.mixin(e.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(e){this.cache&&(this.storage.set(i.data,e,this.ttl),this.storage.set(i.protocol,location.protocol,this.ttl),this.storage.set(i.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var e,t={};return this.cache?(t.data=this.storage.get(i.data),t.protocol=this.storage.get(i.protocol),t.thumbprint=this.storage.get(i.thumbprint),e=t.thumbprint!==this.thumbprint||t.protocol!==location.protocol,t.data&&!e?t.data:null):null},fromNetwork:function(e){function t(){e(!0)}function i(t){e(null,n.transform(t))}var r,n=this;e&&(r=this.prepare(this._settings()),this.transport(r).fail(t).done(i))},clear:function(){return this.storage.clear(),this}}),e}(),u=function(){"use strict";function e(e){this.url=e.url,this.prepare=e.prepare,this.transform=e.transform,this.transport=new o({cache:e.cache,limiter:e.limiter,transport:e.transport})}return t.mixin(e.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(e,t){function i(e,i){t(e?[]:n.transform(i))}var r,n=this;if(t)return e=e||"",r=this.prepare(e,this._settings()),this.transport.get(r,i)},cancelLastRequest:function(){this.transport.cancel()}}),e}(),c=function(){"use strict";function r(r){var n;return r?(n={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:t.identity,transform:t.identity,transport:null},r=t.isString(r)?{url:r}:r,r=t.mixin(n,r),!r.url&&e.error("prefetch requires url to be set"),r.transform=r.filter||r.transform,r.cacheKey=r.cacheKey||r.url,r.thumbprint=i+r.thumbprint,r.transport=r.transport?a(r.transport):e.ajax,r):null}function n(i){var r;if(i)return r={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:t.identity,transport:null},i=t.isString(i)?{url:i}:i,i=t.mixin(r,i),!i.url&&e.error("remote requires url to be set"),i.transform=i.filter||i.transform,i.prepare=s(i),i.limiter=o(i),i.transport=i.transport?a(i.transport):e.ajax,delete i.replace,delete i.wildcard,delete i.rateLimitBy,delete i.rateLimitWait,i}function s(e){function t(e,t){return t.url=s(t.url,e),t}function i(e,t){return t.url=t.url.replace(o,encodeURIComponent(e)),t}function r(e,t){return t}var n,s,o;return n=e.prepare,s=e.replace,o=e.wildcard,n?n:n=s?t:e.wildcard?i:r}function o(e){function i(e){return function(i){return t.debounce(i,e)}}function r(e){return function(i){return t.throttle(i,e)}}var n,s,o;return n=e.limiter,s=e.rateLimitBy,o=e.rateLimitWait,n||(n=/^throttle$/i.test(s)?r(o):i(o)),n}function a(i){return function(r){function n(e){t.defer(function(){o.resolve(e)})}function s(e){t.defer(function(){o.reject(e)})}var o=e.Deferred();return i(r,n,s),o}}return function(i){var s,o;return s={initialize:!0,identify:t.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null},i=t.mixin(s,i||{}),!i.datumTokenizer&&e.error("datumTokenizer is required"),!i.queryTokenizer&&e.error("queryTokenizer is required"),o=i.sorter,i.sorter=o?function(e){return e.sort(o)}:t.identity,i.local=t.isFunction(i.local)?i.local():i.local,i.prefetch=r(i.prefetch),i.remote=n(i.remote),i}}(),d=function(){"use strict";function i(e){e=c(e),this.sorter=e.sorter,this.identify=e.identify,this.sufficient=e.sufficient,this.local=e.local,this.remote=e.remote?new u(e.remote):null,this.prefetch=e.prefetch?new l(e.prefetch):null,this.index=new a({identify:this.identify,datumTokenizer:e.datumTokenizer,queryTokenizer:e.queryTokenizer}),e.initialize!==!1&&this.initialize()}var n;return n=window&&window.Bloodhound,i.noConflict=function(){return window&&(window.Bloodhound=n),i},i.tokenizers=r,t.mixin(i.prototype,{__ttAdapter:function(){function e(e,t,r){return i.search(e,t,r)}function t(e,t){return i.search(e,t)}var i=this;return this.remote?e:t},_loadPrefetch:function(){function t(e,t){return e?i.reject():(n.add(t),n.prefetch.store(n.index.serialize()),void i.resolve())}var i,r,n=this;return i=e.Deferred(),this.prefetch?(r=this.prefetch.fromCache())?(this.index.bootstrap(r),i.resolve()):this.prefetch.fromNetwork(t):i.resolve(),i.promise()},_initialize:function(){function e(){t.add(t.local)}var t=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(e),this.initPromise},initialize:function(e){return!this.initPromise||e?this._initialize():this.initPromise},add:function(e){return this.index.add(e),this},get:function(e){return e=t.isArray(e)?e:[].slice.call(arguments),this.index.get(e)},search:function(e,i,r){function n(e){var i=[];t.each(e,function(e){!t.some(s,function(t){return o.identify(e)===o.identify(t)})&&i.push(e)}),r&&r(i)}var s,o=this;return s=this.sorter(this.index.search(e)),i(this.remote?s.slice():s),this.remote&&s.length',menu:''}}function r(e){var i={};return t.each(e,function(e,t){i[t]="."+e}),i}function n(){var e={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(e.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),e}var s={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return e}(),r=function(){"use strict";function i(t){t&&t.el||e.error("EventBus initialized without el"),this.$el=e(t.el)}var r,n;return r="typeahead:",n={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},t.mixin(i.prototype,{_trigger:function(t,i){var n;return n=e.Event(r+t),(i=i||[]).unshift(n),this.$el.trigger.apply(this.$el,i),n},before:function(e){var t,i;return t=[].slice.call(arguments,1),i=this._trigger("before"+e,t),i.isDefaultPrevented()},trigger:function(e){var t;this._trigger(e,[].slice.call(arguments,1)),(t=n[e])&&this._trigger(t,[].slice.call(arguments,1))}}),i}(),n=function(){"use strict";function e(e,t,i,r){var n;if(!i)return this;for(t=t.split(u),i=r?l(i,r):i,this._callbacks=this._callbacks||{};n=t.shift();)this._callbacks[n]=this._callbacks[n]||{sync:[],async:[]},this._callbacks[n][e].push(i);return this}function t(t,i,r){return e.call(this,"async",t,i,r)}function i(t,i,r){return e.call(this,"sync",t,i,r)}function r(e){var t;if(!this._callbacks)return this;for(e=e.split(u);t=e.shift();)delete this._callbacks[t];return this}function n(e){var t,i,r,n,s;if(!this._callbacks)return this;for(e=e.split(u),r=[].slice.call(arguments,1);(t=e.shift())&&(i=this._callbacks[t]);)n=o(i.sync,this,[t].concat(r)),s=o(i.async,this,[t].concat(r)),n()&&c(s);return this}function o(e,t,i){function r(){for(var r,n=0,s=e.length;!r&&n
').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function s(e,t){return i.normalizeQuery(e)===i.normalizeQuery(t)}function o(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}var a;return a={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},i.normalizeQuery=function(e){return t.toStr(e).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},t.mixin(i.prototype,n,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query,this.trigger("focused")},_onKeydown:function(e){var t=a[e.which||e.keyCode];this._managePreventDefault(t,e),t&&this._shouldTrigger(t,e)&&this.trigger(t+"Keyed",e)},_onInput:function(){this._setQuery(this.getInputValue()),this.clearHintIfInvalid(),this._checkLanguageDirection()},_managePreventDefault:function(e,t){var i;switch(e){case"up":case"down":i=!o(t);break;default:i=!1}i&&t.preventDefault()},_shouldTrigger:function(e,t){var i;switch(e){case"tab":i=!o(t);break;default:i=!0}return i},_checkLanguageDirection:function(){var e=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==e&&(this.dir=e,this.$hint.attr("dir",e),this.trigger("langDirChanged",e))},_setQuery:function(e,t){var i,r;i=s(e,this.query),r=!!i&&this.query.length!==e.length,this.query=e,t||i?!t&&r&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},bind:function(){var e,i,r,n,s=this;return e=t.bind(this._onBlur,this),i=t.bind(this._onFocus,this),r=t.bind(this._onKeydown,this),n=t.bind(this._onInput,this),this.$input.on("blur.tt",e).on("focus.tt",i).on("keydown.tt",r),!t.isMsie()||t.isMsie()>9?this.$input.on("input.tt",n):this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(e){a[e.which||e.keyCode]||t.defer(t.bind(s._onInput,s,e))}),this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(e,t){this.setInputValue(e),this._setQuery(e,t)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(e){this.$input.val(e),this.clearHintIfInvalid(),this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(e){this.$hint.val(e)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var e,t,i,r;e=this.getInputValue(),t=this.getHint(),i=e!==t&&0===t.indexOf(e),r=""!==e&&i&&!this.hasOverflow(),!r&&this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var e=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=e},isCursorAtEnd:function(){var e,i,r;return e=this.$input.val().length,i=this.$input[0].selectionStart,t.isNumber(i)?i===e:!document.selection||(r=document.selection.createRange(),r.moveStart("character",-e),e===r.text.length)},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$overflowHelper.remove(),this.$hint=this.$input=this.$overflowHelper=e("-1&&e%1==0&&e