if(function(t,e){function n(t){var e=t.length,n=ct.type(t);return!ct.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===n||"function"!==n&&(0===e||"number"==typeof e&&e>0&&e-1 in t)))}function r(t){var e=Dt[t]={};return ct.each(t.match(ht)||[],function(t,n){e[n]=!0}),e}function i(t,n,r,i){if(ct.acceptData(t)){var o,a,s=ct.expando,l=t.nodeType,u=l?ct.cache:t,c=l?t[s]:t[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==e||"string"!=typeof n)return c||(c=l?t[s]=et.pop()||ct.guid++:s),u[c]||(u[c]=l?{}:{toJSON:ct.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=ct.extend(u[c],n):u[c].data=ct.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==e&&(a[ct.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[ct.camelCase(n)])):o=a,o}}function o(t,e,n){if(ct.acceptData(t)){var r,i,o=t.nodeType,a=o?ct.cache:t,l=o?t[ct.expando]:ct.expando;if(a[l]){if(e&&(r=n?a[l]:a[l].data)){ct.isArray(e)?e=e.concat(ct.map(e,ct.camelCase)):e in r?e=[e]:(e=ct.camelCase(e),e=e in r?[e]:e.split(" ")),i=e.length;for(;i--;)delete r[e[i]];if(n?!s(r):!ct.isEmptyObject(r))return}(n||(delete a[l].data,s(a[l])))&&(o?ct.cleanData([t],!0):ct.support.deleteExpando||a!=a.window?delete a[l]:a[l]=null)}}}function a(t,n,r){if(r===e&&1===t.nodeType){var i="data-"+n.replace(kt,"-$1").toLowerCase();if(r=t.getAttribute(i),"string"==typeof r){try{r="true"===r||"false"!==r&&("null"===r?null:+r+""===r?+r:Tt.test(r)?ct.parseJSON(r):r)}catch(t){}ct.data(t,n,r)}else r=e}return r}function s(t){var e;for(e in t)if(("data"!==e||!ct.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function l(){return!0}function u(){return!1}function c(){try{return J.activeElement}catch(t){}}function f(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function h(t,e,n){if(ct.isFunction(e))return ct.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return ct.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(zt.test(e))return ct.filter(e,t,n);e=ct.filter(e,t)}return ct.grep(t,function(t){return ct.inArray(t,e)>=0!==n})}function d(t){var e=Yt.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function p(t,e){return ct.nodeName(t,"table")&&ct.nodeName(1===e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function g(t){return t.type=(null!==ct.find.attr(t,"type"))+"/"+t.type,t}function m(t){var e=ie.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function y(t,e){for(var n,r=0;null!=(n=t[r]);r++)ct._data(n,"globalEval",!e||ct._data(e[r],"globalEval"))}function v(t,e){if(1===e.nodeType&&ct.hasData(t)){var n,r,i,o=ct._data(t),a=ct._data(e,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)ct.event.add(e,n,s[n][r])}a.data&&(a.data=ct.extend({},a.data))}}function b(t,e){var n,r,i;if(1===e.nodeType){if(n=e.nodeName.toLowerCase(),!ct.support.noCloneEvent&&e[ct.expando]){i=ct._data(e);for(r in i.events)ct.removeEvent(e,r,i.handle);e.removeAttribute(ct.expando)}"script"===n&&e.text!==t.text?(g(e).text=t.text,m(e)):"object"===n?(e.parentNode&&(e.outerHTML=t.outerHTML),ct.support.html5Clone&&t.innerHTML&&!ct.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===n&&ee.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===n?e.defaultSelected=e.selected=t.defaultSelected:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}}function x(t,n){var r,i,o=0,a=typeof t.getElementsByTagName!==G?t.getElementsByTagName(n||"*"):typeof t.querySelectorAll!==G?t.querySelectorAll(n||"*"):e;if(!a)for(a=[],r=t.childNodes||t;null!=(i=r[o]);o++)!n||ct.nodeName(i,n)?a.push(i):ct.merge(a,x(i,n));return n===e||n&&ct.nodeName(t,n)?ct.merge([t],a):a}function w(t){ee.test(t.type)&&(t.defaultChecked=t.checked)}function _(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),r=e,i=Ce.length;i--;)if(e=Ce[i]+n,e in t)return e;return r}function S(t,e){return t=e||t,"none"===ct.css(t,"display")||!ct.contains(t.ownerDocument,t)}function C(t,e){for(var n,r,i,o=[],a=0,s=t.length;s>a;a++)r=t[a],r.style&&(o[a]=ct._data(r,"olddisplay"),n=r.style.display,e?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&S(r)&&(o[a]=ct._data(r,"olddisplay",M(r.nodeName)))):o[a]||(i=S(r),(n&&"none"!==n||!i)&&ct._data(r,"olddisplay",i?n:ct.css(r,"display"))));for(a=0;s>a;a++)r=t[a],r.style&&(e&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=e?o[a]||"":"none"));return t}function D(t,e,n){var r=ye.exec(e);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):e}function T(t,e,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===e?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=ct.css(t,n+Se[o],!0,i)),r?("content"===n&&(a-=ct.css(t,"padding"+Se[o],!0,i)),"margin"!==n&&(a-=ct.css(t,"border"+Se[o]+"Width",!0,i))):(a+=ct.css(t,"padding"+Se[o],!0,i),"padding"!==n&&(a+=ct.css(t,"border"+Se[o]+"Width",!0,i)));return a}function k(t,e,n){var r=!0,i="width"===e?t.offsetWidth:t.offsetHeight,o=ce(t),a=ct.support.boxSizing&&"border-box"===ct.css(t,"boxSizing",!1,o);if(0>=i||null==i){if(i=fe(t,e,o),(0>i||null==i)&&(i=t.style[e]),ve.test(i))return i;r=a&&(ct.support.boxSizingReliable||i===t.style[e]),i=parseFloat(i)||0}return i+T(t,e,n||(a?"border":"content"),r,o)+"px"}function M(t){var e=J,n=xe[t];return n||(n=E(t,e),"none"!==n&&n||(ue=(ue||ct("').bind("load",function(){var e,o=t.isArray(n.paramName)?n.paramName:[n.paramName];i.unbind("load").bind("load",function(){var e;try{if(e=i.contents(),!e.length||!e[0].firstChild)throw new Error}catch(t){e=void 0}l(200,"success",{iframe:e}),t('').appendTo(r),window.setTimeout(function(){r.remove()},0)}),r.prop("target",i.prop("name")).prop("action",n.url).prop("method",n.type),n.formData&&t.each(n.formData,function(e,n){t('').prop("name",n.name).val(n.value).appendTo(r)}),n.fileInput&&n.fileInput.length&&"POST"===n.type&&(e=n.fileInput.clone(),n.fileInput.after(function(t){return e[t]}),n.paramName&&n.fileInput.each(function(e){t(this).prop("name",o[e]||n.paramName)}),r.append(n.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),n.fileInput.removeAttr("form")),r.submit(),e&&e.length&&n.fileInput.each(function(n,r){var i=t(e[n]);t(r).prop("name",i.prop("name")).attr("form",i.attr("form")),i.replaceWith(r)})}),r.append(i).appendTo(document.body)},abort:function(){i&&i.unbind("load").prop("src",a),r&&r.remove()}}}}),t.ajaxSetup({converters:{"iframe text":function(e){return e&&t(e[0].body).text()},"iframe json":function(e){return e&&t.parseJSON(t(e[0].body).text())},"iframe html":function(e){return e&&t(e[0].body).html()},"iframe xml":function(e){var n=e&&e[0];return n&&t.isXMLDoc(n)?n:t.parseXML(n.XMLDocument&&n.XMLDocument.xml||t(n.body).html())},"iframe script":function(e){return e&&t.globalEval(t(e[0].body).text())}}})}),!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Sweetalert2=e()}(this,function(){"use strict";function t(){if(void 0===arguments[0])return console.error("sweetAlert2 expects at least 1 attribute!"),!1;var t=l({},O);switch(typeof arguments[0]){case"string":t.title=arguments[0],t.text=arguments[1]||"",t.type=arguments[2]||"";break;case"object":l(t,arguments[0]),t.extraParams=arguments[0].extraParams,"email"===t.input&&null===t.inputValidator&&(t.inputValidator=function(t){return new Promise(function(e,n){var r=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;r.test(t)?e():n("Invalid email address")})});break;default:return console.error('Unexpected type of argument! Expected "string" or "object", got '+typeof arguments[0]),!1}I(t);var r=d();return new Promise(function(o,a){function s(t,e){for(var n=0;n0;)O.removeAttribute(O.attributes[0].name);for(var H in t.inputAttributes)O.setAttribute(H,t.inputAttributes[H]);O.className=R,t.inputClass&&b(O,t.inputClass),C(O)}var q;switch(t.input){case"text":case"email":case"password":case"file":O=w(r,i.input),O.value=t.inputValue,O.placeholder=t.inputPlaceholder,O.type=t.input,_(O);break;case"select":var B=w(r,i.select);if(B.innerHTML="",t.inputPlaceholder){var z=document.createElement("option");z.innerHTML=t.inputPlaceholder,z.value="",z.disabled=!0,z.selected=!0,B.appendChild(z)}q=function(e){for(var n in e){var r=document.createElement("option");r.value=n,r.innerHTML=e[n],t.inputValue===n&&(r.selected=!0),B.appendChild(r)}_(B),B.focus()};break;case"radio":var U=w(r,i.radio);U.innerHTML="",q=function(e){for(var n in e){var r=1,o=document.createElement("input"),a=document.createElement("label"),s=document.createElement("span");o.type="radio",o.name=i.radio,o.value=n,o.id=i.radio+"-"+r++,t.inputValue===n&&(o.checked=!0),s.innerHTML=e[n],a.appendChild(o),a.appendChild(s),a.for=o.id,U.appendChild(a)}_(U);var l=U.querySelectorAll("input");l.length&&l[0].focus()};break;case"checkbox":var $=w(r,i.checkbox),W=r.querySelector("#"+i.checkbox);W.value=1,W.checked=Boolean(t.inputValue);var Y=$.getElementsByTagName("span");Y.length&&$.removeChild(Y[0]),Y=document.createElement("span"),Y.innerHTML=t.inputPlaceholder,$.appendChild(Y),_($);break;case"textarea":var V=w(r,i.textarea);V.value=t.inputValue,V.placeholder=t.inputPlaceholder,_(V);break;case null:break;default:console.error('Unexpected type of input! Expected "text" or "email" or "password", "select", "checkbox", "textarea" or "file", got '+typeof arguments[0])}"select"!==t.input&&"radio"!==t.input||(t.inputOptions instanceof Promise?(e.showLoading(), t.inputOptions.then(function(t){e.hideLoading(),q(t)})):"object"==typeof t.inputOptions?q(t.inputOptions):console.error("Unexpected type of inputOptions! Expected object or Promise, got "+t.inputOptions)),F(),j(t.animation,t.onOpen),s(-1,1)})}function e(){var n=arguments,r=d();return null===r&&(e.init(),r=d()),y(r,"visible")&&L(),t.apply(this,n)}var n="swal2-",r=function(t){var e={};for(var r in t)e[t[r]]=n+t[r];return e},i=r(["container","modal","overlay","close","content","spacer","confirm","cancel","icon","image","input","select","radio","checkbox","textarea","validationerror"]),o=r(["success","warning","info","question","error"]),a={title:"",text:"",html:"",type:null,animation:!0,allowOutsideClick:!0,allowEscapeKey:!0,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonColor:"#3085d6",confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonColor:"#aaa",cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,showCloseButton:!1,showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageClass:null,timer:null,width:500,padding:20,background:"#fff",input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,onOpen:null,onClose:null},s='
',l=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},u=function(t,e){t=String(t).replace(/[^0-9a-f]/gi,""),t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),e=e||0;for(var n="#",r=0;3>r;r++){var i=parseInt(t.substr(2*r,2),16);i=Math.round(Math.min(Math.max(0,i+i*e),255)).toString(16),n+=("00"+i).substr(i.length)}return n},c=n+"mediaquery",f={previousDocumentClick:null,previousWindowKeyDown:null,previousActiveElement:null},h=function(t){return document.querySelector("."+t)},d=function(){return h(i.modal)},p=function(){return h(i.overlay)},g=function(){return h(i.confirm)},m=function(){return h(i.cancel)},y=function(t,e){return new RegExp(" "+e+" ").test(" "+t.className+" ")},v=function(t){t.focus();var e=t.value;t.value="",t.value=e},b=function(t,e){e&&!y(t,e)&&(t.className+=" "+e)},x=function(t,e){var n=" "+t.className.replace(/[\t\r\n]/g," ")+" ";if(y(t,e)){for(;n.indexOf(" "+e+" ")>=0;)n=n.replace(" "+e+" "," ");t.className=n.replace(/^\s+|\s+$/g,"")}},w=function(t,e){for(var n=0;n1?1:i,n=+new Date,+t.style.opacity<1&&setTimeout(r,e)};r()}},E=function(t,e){if(+t.style.opacity>0){e=e||16;var n=t.style.opacity,r=+new Date,i=function(){var o=new Date-r,a=+t.style.opacity-o/(100*n);t.style.opacity=a,r=+new Date,+t.style.opacity>0?setTimeout(i,e):C(t)};i()}},A=function(t){if("function"==typeof MouseEvent){var e=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0});t.dispatchEvent(e)}else if(document.createEvent){var n=document.createEvent("MouseEvents");n.initEvent("click",!1,!1),t.dispatchEvent(n)}else document.createEventObject?t.fireEvent("onclick"):"function"==typeof t.onclick&&t.onclick()},P=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):window.event&&window.event.hasOwnProperty("cancelBubble")&&(window.event.cancelBubble=!0)},N=function(){var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd oanimationend",msAnimation:"MSAnimationEnd",animation:"animationend"};for(var n in e)if(e.hasOwnProperty(n)&&void 0!==t.style[n])return e[n];return!1}(),L=function(){var t=d();window.onkeydown=f.previousWindowKeyDown,document.onclick=f.previousDocumentClick,f.previousActiveElement&&f.previousActiveElement.focus(),clearTimeout(t.timeout);var e=document.getElementsByTagName("head")[0],n=document.getElementById(c);n&&e.removeChild(n)},O=l({},a),I=function(t){var e,n=d();n.style.width=t.width+"px",n.style.padding=t.padding+"px",n.style.marginLeft=-t.width/2+"px",n.style.background=t.background;var r=document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",a.id=c;var s=5,l=t.width+parseInt(t.width*(s/100)*2,10);a.innerHTML="@media screen and (max-width: "+l+"px) {."+i.modal+" {width: auto !important;left: "+s+"% !important;right: "+s+"% !important;margin-left: 0 !important;}}",r.appendChild(a);var u=n.querySelector("h2"),f=n.querySelector("."+i.content),h=g(),p=m(),y=n.querySelector("."+i.spacer),v=n.querySelector("."+i.close);if(u.innerHTML=t.title.split("\n").join("
"),t.text||t.html){if("object"==typeof t.html)if(f.innerHTML="",0 in t.html)for(e=0;e in t.html;e++)f.appendChild(t.html[e]);else f.appendChild(t.html);else f.innerHTML=t.html||t.text.split("\n").join("
");S(f)}else D(f);if(t.showCloseButton?S(v):D(v),n.className=i.modal,t.customClass&&b(n,t.customClass),D(n.querySelectorAll("."+i.icon)),t.type){var w=!1;for(var _ in o)if(t.type===_){w=!0;break}if(!w)return console.error("Unknown alert type: "+t.type),!1;var C=n.querySelector("."+i.icon+"."+o[t.type]);switch(S(C),t.type){case"success":b(C,"animate"),b(C.querySelector(".tip"),"animate-success-tip"),b(C.querySelector(".long"),"animate-success-long");break;case"error":b(C,"animate-error-icon"),b(C.querySelector(".x-mark"),"animate-x-mark");break;case"warning":b(C,"pulse-warning")}}var k=n.querySelector("."+i.image);t.imageUrl?(k.setAttribute("src",t.imageUrl),S(k),t.imageWidth&&k.setAttribute("width",t.imageWidth),t.imageHeight&&k.setAttribute("height",t.imageHeight),t.imageClass&&b(k,t.imageClass)):D(k),t.showCancelButton?p.style.display="inline-block":D(p),t.showConfirmButton?T(h,"display"):D(h),t.showConfirmButton||t.showCancelButton?S(y):D(y),h.innerHTML=t.confirmButtonText,p.innerHTML=t.cancelButtonText,t.buttonsStyling&&(h.style.backgroundColor=t.confirmButtonColor,p.style.backgroundColor=t.cancelButtonColor),h.className=i.confirm,b(h,t.confirmButtonClass),p.className=i.cancel,b(p,t.cancelButtonClass),t.buttonsStyling?(b(h,"styled"),b(p,"styled")):(x(h,"styled"),x(p,"styled"),h.style.backgroundColor=h.style.borderLeftColor=h.style.borderRightColor="",p.style.backgroundColor=p.style.borderLeftColor=p.style.borderRightColor=""),t.animation===!0?x(n,"no-animation"):b(n,"no-animation")},j=function(t,e){var n=d();t?(M(p(),10),b(n,"show-swal2"),x(n,"hide-swal2")):S(p()),S(n),f.previousActiveElement=document.activeElement,b(n,"visible"),null!==e&&"function"==typeof e&&e.call(this,n)},F=function(){var t=d();t.style.marginTop=k(t)};return e.queue=function(t){return new Promise(function(n,r){!function i(o,a){o=u?(clearTimeout(i),i=null,a=l,o=t.apply(n,r)):i||(i=setTimeout(s,u)),o}},stringify:function(t){return e.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),n="0.11.1",r=function(){"use strict";function t(t){return t=e.toStr(t),t?t.split(/\s+/):[]}function n(t){return t=e.toStr(t),t?t.split(/\W+/):[]}function r(t){return function(n){return n=e.isArray(n)?n:[].slice.call(arguments,0),function(r){var i=[];return e.each(n,function(n){i=i.concat(t(e.toStr(r[n])))}),i}}}return{nonword:n,whitespace:t,obj:{nonword:r(n),whitespace:r(t)}}}(),i=function(){"use strict";function n(n){this.maxSize=e.isNumber(n)?n:100,this.reset(),this.maxSize<=0&&(this.set=this.get=t.noop)}function r(){this.head=this.tail=null}function i(t,e){this.key=t,this.val=e,this.prev=this.next=null}return e.mixin(n.prototype,{set:function(t,e){var n,r=this.list.tail;this.size>=this.maxSize&&(this.list.remove(r),delete this.hash[r.key],this.size--),(n=this.hash[t])?(n.val=e,this.list.moveToFront(n)):(n=new i(t,e),this.list.add(n),this.hash[t]=n,this.size++)},get:function(t){var e=this.hash[t];return e?(this.list.moveToFront(e),e.val):void 0},reset:function(){this.size=0,this.hash={},this.list=new r}}),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)}}),n}(),o=function(){"use strict";function n(t,n){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+e.escapeRegExChars(this.prefix)),this.ls=n||s,!this.ls&&this._noop()}function r(){return(new Date).getTime()}function i(t){return JSON.stringify(e.isUndefined(t)?null:t)}function o(e){return t.parseJSON(e)}function a(t){var e,n,r=[],i=s.length;for(e=0;i>e;e++)(n=s.key(e)).match(t)&&r.push(n.replace(t,""));return r}var s;try{s=window.localStorage,s.setItem("~~~","!"),s.removeItem("~~~")}catch(t){s=null}return e.mixin(n.prototype,{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=e.noop},_safeSet:function(t,e){try{this.ls.setItem(t,e)}catch(t){"QuotaExceededError"===t.name&&(this.clear(),this._noop())}},get:function(t){return this.isExpired(t)&&this.remove(t),o(this.ls.getItem(this._prefix(t)))},set:function(t,n,o){return e.isNumber(o)?this._safeSet(this._ttlKey(t),i(r()+o)):this.ls.removeItem(this._ttlKey(t)),this._safeSet(this._prefix(t),i(n))},remove:function(t){return this.ls.removeItem(this._ttlKey(t)),this.ls.removeItem(this._prefix(t)),this},clear:function(){var t,e=a(this.keyMatcher);for(t=e.length;t--;)this.remove(e[t]);return this},isExpired:function(t){var n=o(this.ls.getItem(this._ttlKey(t)));return!!(e.isNumber(n)&&r()>n)}}),n}(),a=function(){"use strict";function n(t){t=t||{},this.cancelled=!1,this.lastReq=null,this._send=t.transport,this._get=t.limiter?t.limiter(this._get):this._get,this._cache=t.cache===!1?new i(0):s}var r=0,o={},a=6,s=new i(10);return n.setMaxPendingRequests=function(t){a=t},n.resetCache=function(){s.reset()},e.mixin(n.prototype,{_fingerprint:function(e){return e=e||{},e.url+e.type+t.param(e.data||{})},_get:function(t,e){function n(t){e(null,t),c._cache.set(l,t)}function i(){e(!0)}function s(){r--,delete o[l],c.onDeckRequestArgs&&(c._get.apply(c,c.onDeckRequestArgs),c.onDeckRequestArgs=null)}var l,u,c=this;l=this._fingerprint(t),this.cancelled||l!==this.lastReq||((u=o[l])?u.done(n).fail(i):a>r?(r++,o[l]=this._send(t).done(n).fail(i).always(s)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(n,r){var i,o;r=r||t.noop,n=e.isString(n)?{url:n}:n||{},o=this._fingerprint(n),this.cancelled=!1,this.lastReq=o,(i=this._cache.get(o))?r(null,i):this._get(n,r)},cancel:function(){this.cancelled=!0}}),n}(),s=window.SearchIndex=function(){"use strict";function n(n){n=n||{},n.datumTokenizer&&n.queryTokenizer||t.error("datumTokenizer and queryTokenizer are both required"),this.identify=n.identify||e.stringify,this.datumTokenizer=n.datumTokenizer,this.queryTokenizer=n.queryTokenizer,this.reset()}function r(t){return t=e.filter(t,function(t){return!!t}),t=e.map(t,function(t){return t.toLowerCase()})}function i(){var t={};return t[l]=[],t[s]={},t}function o(t){for(var e={},n=[],r=0,i=t.length;i>r;r++)e[t[r]]||(e[t[r]]=!0,n.push(t[r]));return n}function a(t,e){var n=0,r=0,i=[];t=t.sort(),e=e.sort();for(var o=t.length,a=e.length;o>n&&a>r;)t[n]e[r]?r++:(i.push(t[n]),n++,r++);return i}var s="c",l="i";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 o,a;n.datums[o=n.identify(t)]=t,a=r(n.datumTokenizer(t)),e.each(a,function(t){var e,r,a;for(e=n.trie,r=t.split("");a=r.shift();)e=e[s][a]||(e[s][a]=i()),e[l].push(o)})})},get:function(t){var n=this;return e.map(t,function(t){return n.datums[t]})},search:function(t){var n,i,u=this;return n=r(this.queryTokenizer(t)),e.each(n,function(t){var e,n,r,o;if(i&&0===i.length)return!1;for(e=u.trie,n=t.split("");e&&(r=n.shift());)e=e[s][r];return e&&0===n.length?(o=e[l].slice(0),void(i=i?a(i,o):o)):(i=[],!1)}),i?e.map(o(i),function(t){return u.datums[t]}):[]},all:function(){var t=[];for(var e in this.datums)t.push(this.datums[e]);return t},reset:function(){this.datums={},this.trie=i()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),n}(),l=function(){"use strict";function t(t){this.url=t.url,this.ttl=t.ttl,this.cache=t.cache,this.prepare=t.prepare,this.transform=t.transform,this.transport=t.transport,this.thumbprint=t.thumbprint,this.storage=new o(t.cacheKey)}var n;return n={data:"data",protocol:"protocol",thumbprint:"thumbprint"},e.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(t){this.cache&&(this.storage.set(n.data,t,this.ttl),this.storage.set(n.protocol,location.protocol,this.ttl),this.storage.set(n.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var t,e={};return this.cache?(e.data=this.storage.get(n.data),e.protocol=this.storage.get(n.protocol),e.thumbprint=this.storage.get(n.thumbprint),t=e.thumbprint!==this.thumbprint||e.protocol!==location.protocol,e.data&&!t?e.data:null):null},fromNetwork:function(t){function e(){t(!0)}function n(e){t(null,i.transform(e))}var r,i=this;t&&(r=this.prepare(this._settings()),this.transport(r).fail(e).done(n))},clear:function(){return this.storage.clear(),this}}),t}(),u=function(){"use strict";function t(t){this.url=t.url,this.prepare=t.prepare,this.transform=t.transform,this.transport=new a({cache:t.cache,limiter:t.limiter,transport:t.transport})}return e.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(t,e){function n(t,n){e(t?[]:i.transform(n))}var r,i=this;if(e)return t=t||"",r=this.prepare(t,this._settings()),this.transport.get(r,n)},cancelLastRequest:function(){this.transport.cancel()}}),t}(),c=function(){"use strict";function r(r){var i;return r?(i={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:e.identity,transform:e.identity,transport:null},r=e.isString(r)?{url:r}:r,r=e.mixin(i,r),!r.url&&t.error("prefetch requires url to be set"),r.transform=r.filter||r.transform,r.cacheKey=r.cacheKey||r.url,r.thumbprint=n+r.thumbprint,r.transport=r.transport?s(r.transport):t.ajax,r):null}function i(n){var r;if(n)return r={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:e.identity,transport:null},n=e.isString(n)?{url:n}:n,n=e.mixin(r,n),!n.url&&t.error("remote requires url to be set"),n.transform=n.filter||n.transform,n.prepare=o(n),n.limiter=a(n),n.transport=n.transport?s(n.transport):t.ajax,delete n.replace,delete n.wildcard,delete n.rateLimitBy,delete n.rateLimitWait,n}function o(t){function e(t,e){return e.url=o(e.url,t),e}function n(t,e){return e.url=e.url.replace(a,encodeURIComponent(t)),e}function r(t,e){return e}var i,o,a;return i=t.prepare,o=t.replace,a=t.wildcard,i?i:i=o?e:t.wildcard?n:r}function a(t){function n(t){return function(n){return e.debounce(n,t)}}function r(t){return function(n){return e.throttle(n,t)}}var i,o,a;return i=t.limiter,o=t.rateLimitBy,a=t.rateLimitWait,i||(i=/^throttle$/i.test(o)?r(a):n(a)),i}function s(n){return function(r){function i(t){e.defer(function(){a.resolve(t)})}function o(t){e.defer(function(){a.reject(t)})}var a=t.Deferred();return n(r,i,o),a}}return function(n){var o,a;return o={initialize:!0,identify:e.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null},n=e.mixin(o,n||{}),!n.datumTokenizer&&t.error("datumTokenizer is required"),!n.queryTokenizer&&t.error("queryTokenizer is required"),a=n.sorter,n.sorter=a?function(t){return t.sort(a)}:e.identity,n.local=e.isFunction(n.local)?n.local():n.local,n.prefetch=r(n.prefetch),n.remote=i(n.remote),n}}(),f=function(){"use strict";function n(t){t=c(t),this.sorter=t.sorter,this.identify=t.identify,this.sufficient=t.sufficient,this.local=t.local,this.remote=t.remote?new u(t.remote):null,this.prefetch=t.prefetch?new l(t.prefetch):null,this.index=new s({identify:this.identify,datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer}),t.initialize!==!1&&this.initialize()}var i;return i=window&&window.Bloodhound,n.noConflict=function(){return window&&(window.Bloodhound=i),n},n.tokenizers=r,e.mixin(n.prototype,{__ttAdapter:function(){function t(t,e,r){return n.search(t,e,r)}function e(t,e){return n.search(t,e)}var n=this;return this.remote?t:e},_loadPrefetch:function(){function e(t,e){return t?n.reject():(i.add(e),i.prefetch.store(i.index.serialize()),void n.resolve())}var n,r,i=this;return n=t.Deferred(),this.prefetch?(r=this.prefetch.fromCache())?(this.index.bootstrap(r),n.resolve()):this.prefetch.fromNetwork(e):n.resolve(),n.promise()},_initialize:function(){function t(){e.add(e.local)}var e=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(t),this.initPromise},initialize:function(t){return!this.initPromise||t?this._initialize():this.initPromise},add:function(t){return this.index.add(t),this},get:function(t){return t=e.isArray(t)?t:[].slice.call(arguments),this.index.get(t)},search:function(t,n,r){function i(t){var n=[];e.each(t,function(t){!e.some(o,function(e){return a.identify(t)===a.identify(e)})&&n.push(t)}),r&&r(n)}var o,a=this;return o=this.sorter(this.index.search(t)),n(this.remote?o.slice():o),this.remote&&o.length=u?(clearTimeout(i),i=null,a=l,o=t.apply(n,r)):i||(i=setTimeout(s,u)),o}},stringify:function(t){return e.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),n=function(){"use strict";function t(t){var a,s;return s=e.mixin({},o,t),a={css:i(),classes:s,html:n(s),selectors:r(s)},{css:a.css,html:a.html,classes:a.classes,selectors:a.selectors,mixin:function(t){e.mixin(t,a)}}}function n(t){return{wrapper:'',menu:'
'}}function r(t){var n={};return e.each(t,function(t,e){n[e]="."+t}),n}function i(){var t={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 e.isMsie()&&e.mixin(t.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t}var o={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 t}(),r=function(){"use strict";function n(e){e&&e.el||t.error("EventBus initialized without el"),this.$el=t(e.el)}var r,i;return r="typeahead:",i={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},e.mixin(n.prototype,{_trigger:function(e,n){var i;return i=t.Event(r+e),(n=n||[]).unshift(i),this.$el.trigger.apply(this.$el,n),i},before:function(t){var e,n;return e=[].slice.call(arguments,1),n=this._trigger("before"+t,e),n.isDefaultPrevented()},trigger:function(t){var e;this._trigger(t,[].slice.call(arguments,1)),(e=i[t])&&this._trigger(e,[].slice.call(arguments,1))}}),n}(),i=function(){"use strict";function t(t,e,n,r){var i;if(!n)return this;for(e=e.split(l),n=r?s(n,r):n,this._callbacks=this._callbacks||{};i=e.shift();)this._callbacks[i]=this._callbacks[i]||{sync:[],async:[]},this._callbacks[i][t].push(n);return this}function e(e,n,r){return t.call(this,"async",e,n,r)}function n(e,n,r){return t.call(this,"sync",e,n,r)}function r(t){var e;if(!this._callbacks)return this;for(t=t.split(l);e=t.shift();)delete this._callbacks[e];return this}function i(t){var e,n,r,i,a;if(!this._callbacks)return this;for(t=t.split(l),r=[].slice.call(arguments,1);(e=t.shift())&&(n=this._callbacks[e]);)i=o(n.sync,this,[e].concat(r)),a=o(n.async,this,[e].concat(r)),i()&&u(a);return this}function o(t,e,n){function r(){for(var r,i=0,o=t.length;!r&&o>i;i+=1)r=t[i].apply(e,n)===!1;return!r}return r}function a(){var t;return t=window.setImmediate?function(t){setImmediate(function(){t()})}:function(t){setTimeout(function(){t()},0)}}function s(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}var l=/\s+/,u=a();return{onSync:n,onAsync:e,off:r,trigger:i}}(),o=function(t){"use strict";function n(t,n,r){for(var i,o=[],a=0,s=t.length;s>a;a++)o.push(e.escapeRegExChars(t[a]));return i=r?"\\b("+o.join("|")+")\\b":"("+o.join("|")+")",n?new RegExp(i):new RegExp(i,"i")}var r={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(i){function o(e){var n,r,o;return(n=s.exec(e.data))&&(o=t.createElement(i.tagName),i.className&&(o.className=i.className),r=e.splitText(n.index),r.splitText(n[0].length),o.appendChild(r.cloneNode(!0)),e.parentNode.replaceChild(o,r)),!!n}function a(t,e){for(var n,r=3,i=0;i