diff -r 000000000000 -r bca7a7e058a3 src/pyams_skin/resources/js/ext/jquery-typeahead.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_skin/resources/js/ext/jquery-typeahead.min.js Thu Feb 13 11:43:31 2020 +0100 @@ -0,0 +1,1 @@ +!function(t){var e={isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return void 0===t},bind:t.proxy,each:function(e,n){t.each(e,function(t,e){return n(e,t)})},map:t.map,filter:t.grep,every:function(e,n){var i=!0;return e?(t.each(e,function(t,r){if(!(i=n.call(null,r,t,e)))return!1}),!!i):i},some:function(e,n){var i=!1;return e?(t.each(e,function(t,r){if(i=n.call(null,r,t,e))return!1}),!!i):i},mixin:t.extend,getUniqueId:function(){var t=0;return function(){return t++}}(),templatify:function(e){return t.isFunction(e)?e:function(){return String(e)}},defer:function(t){setTimeout(t,0)},debounce:function(t,e,n){var i,r;return function(){var s,o,u=this,a=arguments;return s=function(){i=null,n||(r=t.apply(u,a))},o=n&&!i,clearTimeout(i),i=setTimeout(s,e),o&&(r=t.apply(u,a)),r}},throttle:function(t,e){var n,i,r,s,o,u;return o=0,u=function(){o=new Date,r=null,s=t.apply(n,i)},function(){var a=new Date,h=e-(a-o);return n=this,i=arguments,h<=0?(clearTimeout(r),r=null,o=a,s=t.apply(n,i)):r||(r=setTimeout(u,h)),s}},noop:function(){}},n="0.10.0",i=function(t,n){function i(t){this.maxSize=t||100,this.size=0,this.hash={},this.list=new r}function r(){this.head=this.tail=null}function s(t,e){this.key=t,this.val=e,this.prev=this.next=null}return e.mixin(i.prototype,{set:function(t,e){var n,i=this.list.tail;this.size>=this.maxSize&&(this.list.remove(i),delete this.hash[i.key]),(n=this.hash[t])?(n.val=e,this.list.moveToFront(n)):(n=new s(t,e),this.list.add(n),this.hash[t]=n,this.size++)},get:function(t){var e=this.hash[t];if(e)return this.list.moveToFront(e),e.val}}),e.mixin(r.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(t){this.remove(t),this.add(t)}}),i}(),r=function(){function t(t){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+this.prefix)}function n(){return(new Date).getTime()}function i(t){return JSON.stringify(e.isUndefined(t)?null:t)}function r(t){return JSON.parse(t)}var s,o;try{(s=window.localStorage).setItem("~~~","!"),s.removeItem("~~~")}catch(t){s=null}return o=s&&window.JSON?{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},get:function(t){return this.isExpired(t)&&this.remove(t),r(s.getItem(this._prefix(t)))},set:function(t,r,o){return e.isNumber(o)?s.setItem(this._ttlKey(t),i(n()+o)):s.removeItem(this._ttlKey(t)),s.setItem(this._prefix(t),i(r))},remove:function(t){return s.removeItem(this._ttlKey(t)),s.removeItem(this._prefix(t)),this},clear:function(){var t,e,n=[],i=s.length;for(t=0;ti)}}:{get:e.noop,set:e.noop,remove:e.noop,clear:e.noop,isExpired:e.noop},e.mixin(t.prototype,o),t}(),s=function(){function n(e){e=e||{},this._send=e.send?r(e.send):t.ajax,this._get=e.rateLimiter?e.rateLimiter(this._get):this._get}function r(n){return function(i,r){var s=t.Deferred();return n(i,r,function(t){e.defer(function(){s.resolve(t)})},function(t){e.defer(function(){s.reject(t)})}),s}}var s=0,o={},u=6,a=new i(10);return n.setMaxPendingRequests=function(t){u=t},n.resetCache=function(){a=new i(10)},e.mixin(n.prototype,{_get:function(t,e,n){function i(e){n&&n(e),a.set(t,e)}var r,h=this;(r=o[t])?r.done(i):se[r]?r++:(s.push(t[i]),i++,r++);return s}return e.mixin(n.prototype,{bootstrap:function(t){this.datums=t.datums,this.trie=t.trie},add:function(t){var n=this;t=e.isArray(t)?t:[t],e.each(t,function(t){var r,s;r=n.datums.push(t)-1,s=i(n.datumTokenizer(t)),e.each(s,function(t){var e,i,s;for(e=n.trie,i=t.split("");s=i.shift();)(e=e.children[s]||(e.children[s]={ids:[],children:{}})).ids.push(r)})})},get:function(t){var n,o,u=this;return n=i(this.queryTokenizer(t)),e.each(n,function(t){var e,n,i,r;if(o&&0===o.length)return!1;for(e=u.trie,n=t.split("");e&&(i=n.shift());)e=e.children[i];if(!e||0!==n.length)return o=[],!1;r=e.ids.slice(0),o=o?s(o,r):r}),o?e.map(r(o),function(t){return u.datums[t]}):[]},serialize:function(){return{datums:this.datums,trie:this.trie}}}),n}(),u=function(){return{local:function(t){return t.local||null},prefetch:function(i){var r,s;return s={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(r=i.prefetch||null)&&(r=e.isString(r)?{url:r}:r,(r=e.mixin(s,r)).thumbprint=n+r.thumbprint,r.ajax.method=r.ajax.method||"get",r.ajax.dataType=r.ajax.dataType||"json",!r.url&&t.error("prefetch requires url to be set")),r},remote:function(n){var i,r;return r={url:null,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(i=n.remote||null)&&(i=e.isString(i)?{url:i}:i,(i=e.mixin(r,i)).rateLimiter=/^throttle$/i.test(i.rateLimitBy)?function(t){return function(n){return e.throttle(n,t)}}(i.rateLimitWait):function(t){return function(n){return e.debounce(n,t)}}(i.rateLimitWait),i.ajax.method=i.ajax.method||"get",i.ajax.dataType=i.ajax.dataType||"json",delete i.rateLimitBy,delete i.rateLimitWait,!i.url&&t.error("remote requires url to be set")),i}}}(),a=(window.Bloodhound=function(){function n(e){e&&(e.local||e.prefetch||e.remote)||t.error("one of local, prefetch, or remote is required"),this.limit=e.limit||5,this.sorter=e.sorter||i,this.dupDetector=e.dupDetector||a,this.local=u.local(e),this.prefetch=u.prefetch(e),this.remote=u.remote(e),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new o({datumTokenizer:e.datumTokenizer,queryTokenizer:e.queryTokenizer}),this.storage=this.cacheKey?new r(this.cacheKey):null}function i(){return 0}function a(){return!1}var h;return h={data:"data",protocol:"protocol",thumbprint:"thumbprint"},n.tokenizers={whitespace:function(t){return t.split(/\s+/)},nonword:function(t){return t.split(/\W+/)}},e.mixin(n.prototype,{_loadPrefetch:function(e){var n,i,r=this;return(n=this._readFromStorage(e.thumbprint))?(this.index.bootstrap(n),i=t.Deferred().resolve()):i=t.ajax(e.url,e.ajax).done(function(t){var n;n=e.filter?e.filter(t):t,r.add(n),r._saveToStorage(r.index.serialize(),e.thumbprint,e.ttl)}),i},_getFromRemote:function(t,e){var n,i,r=this;return t=t||"",i=encodeURIComponent(t),n=this.remote.replace?this.remote.replace(this.remote.url,t):this.remote.url.replace(this.remote.wildcard,i),this.transport.get(n,this.remote.ajax,function(t){var n=r.remote.filter?r.remote.filter(t):t;e(n)})},_saveToStorage:function(t,e,n){this.storage&&(this.storage.set(h.data,t,n),this.storage.set(h.protocol,location.protocol,n),this.storage.set(h.thumbprint,e,n))},_readFromStorage:function(t){var e={};return this.storage&&(e.data=this.storage.get(h.data),e.protocol=this.storage.get(h.protocol),e.thumbprint=this.storage.get(h.thumbprint)),isExpired=e.thumbprint!==t||e.protocol!==location.protocol,e.data&&!isExpired?e.data:null},initialize:function(){var e,n=this;return e=this.prefetch?this._loadPrefetch(this.prefetch):t.Deferred().resolve(),this.local&&e.done(function(){n.add(n.local)}),this.transport=this.remote?new s(this.remote):null,this.initialize=function(){return e.promise()},e.promise()},add:function(t){this.index.add(t)},get:function(t,n){var i,r=this,s=!1;(i=this.index.get(t).sort(this.sorter).slice(0,this.limit)).length