/
WebBridge.bundle.js
66 lines (66 loc) · 249 KB
/
WebBridge.bundle.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t,n){"use strict";var r=n(10),i=n(32),o=Object.prototype.toString;function u(e){return"[object Array]"===o.call(e)}function a(e){return null!==e&&"object"==typeof e}function s(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),u(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:u,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:i,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:s,isStream:function(e){return a(e)&&s(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,i=arguments.length;r<i;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,n){e.exports=n(31)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6),i=n(3);!function(e){e.ERROR="ERROR",e.DEBUG="DEBUG",e.WARNING="WARNING"}(t.DebugType||(t.DebugType={})),t.debug=function(e,t){const n=r("#terminal-contents");let o="",u="";i.TIMESTAMPS&&(u=o+=`[${(new Date).toISOString().slice(11,-5)}] `),null!=t&&(o+=`${t}: `),i.DEBUG&&(o+=e,u+=e,console.log(o)),n.text(`${n.text()}${u}\n`),n.scrollTop(n[0].scrollHeight)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.API_ENDPOINT="http://127.0.0.1:4000/api/v1",t.TOKEN_TYPE=Object.freeze({API_AUTH:"apiAuth",DASHBOARD_AUTH:"dashboardAuth"}),function(e){e.ADMIN="admin",e.SLE_ADMIN="sle_admin",e.SEM_ADMIN="sem_admin",e.TEACHER="teacher",e.PUPIL="pupil",e.ES_ADMIN="es_admin",e.ES_USER="es_user"}(t.RoleNames||(t.RoleNames={})),t.DEBUG=!0,t.TIMESTAMPS=!0},function(e,t,n){"use strict";(function(t){var r=n(0),i=n(35),o={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,s={adapter:("undefined"!=typeof XMLHttpRequest?a=n(11):void 0!==t&&(a=n(11)),a),transformRequest:[function(e,t){return i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(u(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(e){s.headers[e]={}}),r.forEach(["post","put","patch"],function(e){s.headers[e]=r.merge(o)}),e.exports=s}).call(this,n(34))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=i(n(53)),a=o(n(55)),s=o(n(1)),c=n(3);class f{constructor(){this.axiosInterceptors={auth:null},s.default.defaults.baseURL=c.API_ENDPOINT,s.default.defaults.headers.post["Content-Type"]="application/json",this.injectAxiosInterceptors("auth"),s.default.interceptors.response.use(u.identity,e=>r(this,void 0,void 0,function*(){if("ECONNABORTED"!==e.code&&e.response.status!==f.UNAUTHORIZED_CODE||!this.RefreshToken||e.config.isRefreshTokenRequest||e.config.isRetryRequest)return Promise.reject(e);return this.ejectAuthInterceptors("auth"),(yield this.fetchAccessToken())?(this.injectAxiosInterceptors("auth"),s.default(Object.assign({},e.config,{url:e.config.url.replace(s.default.defaults.baseURL,""),isRetryRequest:!0}))):Promise.reject(e)}))}injectAxiosInterceptors(e){const t=Array.isArray(e)?e:[e],n=e=>u.merge(e,{headers:{authorization:`Bearer ${this.AccessToken}`}});for(const e of t){let t=null;switch(e){case"auth":t=s.default.interceptors.request.use(n)}this.axiosInterceptors[e]=t}}ejectAuthInterceptors(e){const t=Array.isArray(e)?e:[e];for(const e of t)s.default.interceptors.request.eject(this.axiosInterceptors[e]),this.axiosInterceptors[e]=null}fetchAccessToken(){return r(this,void 0,void 0,function*(){const{data:e}=yield s.default(Object.assign({url:f.FETCH_ACCESS_TOKEN_ENDPOINT,method:"POST",data:{[f.REFRESH_TOKEN_PARAM]:this.RefreshToken}},{isRefreshTokenRequest:!0}));return f.ACCESS_TOKEN_PARAM in e&&(this.AccessToken=e[f.ACCESS_TOKEN_PARAM],!0)})}get AccessToken(){try{return JSON.parse(localStorage.getItem(f.EIS_TOKEN_PARAM))[f.ACCESS_TOKEN_PARAM]}catch(e){return localStorage.getItem(f.ACCESS_TOKEN_PARAM)}}set AccessToken(e){localStorage.setItem(f.ACCESS_TOKEN_PARAM,e)}get RefreshToken(){return localStorage.getItem(f.REFRESH_TOKEN_PARAM)}set RefreshToken(e){localStorage.setItem(f.REFRESH_TOKEN_PARAM,e)}get RoleName(){if(!this.AccessToken)throw new Error("No access token");const e=a.default(this.AccessToken).role;return c.RoleNames[e.toUpperCase()]}cleanTokens(){localStorage.removeItem(f.ACCESS_TOKEN_PARAM),localStorage.removeItem(f.REFRESH_TOKEN_PARAM),localStorage.removeItem(f.EIS_TOKEN_PARAM)}}f.ACCESS_TOKEN_PARAM="access",f.REFRESH_TOKEN_PARAM="refresh",f.EIS_TOKEN_PARAM="apiAuth",f.UNAUTHORIZED_CODE=401,f.FETCH_ACCESS_TOKEN_ENDPOINT="/token/refresh/",t.AbstractApiService=f;t.AbstractHubAuthApiService=class{constructor(e,t){s.default.defaults.headers.post["Content-Type"]="application/json",s.default.defaults.headers.common["school-id"]=e,s.default.defaults.headers.common["pi-id"]=t}}},function(e,t,n){var r;
/*!
* jQuery JavaScript Library v3.3.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2018-01-20T17:24Z
*/
/*!
* jQuery JavaScript Library v3.3.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2018-01-20T17:24Z
*/
!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,i){"use strict";var o=[],u=n.document,a=Object.getPrototypeOf,s=o.slice,c=o.concat,f=o.push,l=o.indexOf,p={},h=p.toString,d=p.hasOwnProperty,g=d.toString,v=g.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},_=function(e){return null!=e&&e===e.window},w={type:!0,src:!0,noModule:!0};function b(e,t,n){var r,i=(t=t||u).createElement("script");if(i.text=e,n)for(r in w)n[r]&&(i[r]=n[r]);t.head.appendChild(i).parentNode.removeChild(i)}function E(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?p[h.call(e)]||"object":typeof e}var T=function(e,t){return new T.fn.init(e,t)},x=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function A(e){var t=!!e&&"length"in e&&e.length,n=E(e);return!m(e)&&!_(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}T.fn=T.prototype={jquery:"3.3.1",constructor:T,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(e){return this.pushStack(T.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:f,sort:o.sort,splice:o.splice},T.extend=T.fn.extend=function(){var e,t,n,r,i,o,u=arguments[0]||{},a=1,s=arguments.length,c=!1;for("boolean"==typeof u&&(c=u,u=arguments[a]||{},a++),"object"==typeof u||m(u)||(u={}),a===s&&(u=this,a--);a<s;a++)if(null!=(e=arguments[a]))for(t in e)n=u[t],u!==(r=e[t])&&(c&&r&&(T.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&T.isPlainObject(n)?n:{},u[t]=T.extend(c,o,r)):void 0!==r&&(u[t]=r));return u},T.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==h.call(e))&&(!(t=a(e))||"function"==typeof(n=d.call(t,"constructor")&&t.constructor)&&g.call(n)===v)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){b(e)},each:function(e,t){var n,r=0;if(A(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(x,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(A(Object(e))?T.merge(n,"string"==typeof e?[e]:e):f.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:l.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,u=!n;i<o;i++)!t(e[i],i)!==u&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,u=[];if(A(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&u.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&u.push(i);return c.apply([],u)},guid:1,support:y}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=o[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){p["[object "+t+"]"]=t.toLowerCase()});var S=
/*!
* Sizzle CSS Selector Engine v2.3.3
* https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-08-08
*/
function(e){var t,n,r,i,o,u,a,s,c,f,l,p,h,d,g,v,y,m,_,w="sizzle"+1*new Date,b=e.document,E=0,T=0,x=ue(),A=ue(),S=ue(),R=function(e,t){return e===t&&(l=!0),0},C={}.hasOwnProperty,P=[],O=P.pop,L=P.push,D=P.push,N=P.slice,U=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",k="[\\x20\\t\\r\\n\\f]",I="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",B="\\["+k+"*("+I+")(?:"+k+"*([*^$|!~]?=)"+k+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+k+"*\\]",M=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+B+")*)|.*)\\)|)",q=new RegExp(k+"+","g"),H=new RegExp("^"+k+"+|((?:^|[^\\\\])(?:\\\\.)*)"+k+"+$","g"),F=new RegExp("^"+k+"*,"+k+"*"),$=new RegExp("^"+k+"*([>+~]|"+k+")"+k+"*"),W=new RegExp("="+k+"*([^\\]'\"]*?)"+k+"*\\]","g"),Y=new RegExp(M),z=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+k+"*(even|odd|(([+-]|)(\\d*)n|)"+k+"*(?:([+-]|)"+k+"*(\\d+)|))"+k+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+k+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+k+"*((?:-\\d)?\\d*)"+k+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+k+"?|("+k+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{D.apply(P=N.call(b.childNodes),b.childNodes),P[b.childNodes.length].nodeType}catch(e){D={apply:P.length?function(e,t){L.apply(e,N.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,r,i){var o,a,c,f,l,d,y,m=t&&t.ownerDocument,E=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==E&&9!==E&&11!==E)return r;if(!i&&((t?t.ownerDocument||t:b)!==h&&p(t),t=t||h,g)){if(11!==E&&(l=K.exec(e)))if(o=l[1]){if(9===E){if(!(c=t.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(m&&(c=m.getElementById(o))&&_(t,c)&&c.id===o)return r.push(c),r}else{if(l[2])return D.apply(r,t.getElementsByTagName(e)),r;if((o=l[3])&&n.getElementsByClassName&&t.getElementsByClassName)return D.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!v||!v.test(e))){if(1!==E)m=t,y=e;else if("object"!==t.nodeName.toLowerCase()){for((f=t.getAttribute("id"))?f=f.replace(te,ne):t.setAttribute("id",f=w),a=(d=u(e)).length;a--;)d[a]="#"+f+" "+ye(d[a]);y=d.join(","),m=J.test(e)&&ge(t.parentNode)||t}if(y)try{return D.apply(r,m.querySelectorAll(y)),r}catch(e){}finally{f===w&&t.removeAttribute("id")}}}return s(e.replace(H,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ae(e){return e[w]=!0,e}function se(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function le(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function he(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function de(e){return ae(function(t){return t=+t,ae(function(n,r){for(var i,o=e([],n.length,t),u=o.length;u--;)n[i=o[u]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,u=e?e.ownerDocument||e:b;return u!==h&&9===u.nodeType&&u.documentElement?(d=(h=u).documentElement,g=!o(h),b!==h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=se(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=se(function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(h.getElementsByClassName),n.getById=se(function(e){return d.appendChild(e).id=w,!h.getElementsByName||!h.getElementsByName(w).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],v=[],(n.qsa=Q.test(h.querySelectorAll))&&(se(function(e){d.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+k+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+k+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+w+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]")}),se(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+k+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),d.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(n.matchesSelector=Q.test(m=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&se(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",M)}),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),t=Q.test(d.compareDocumentPosition),_=t||Q.test(d.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},R=t?function(e,t){if(e===t)return l=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===h||e.ownerDocument===b&&_(b,e)?-1:t===h||t.ownerDocument===b&&_(b,t)?1:f?U(f,e)-U(f,t):0:4&r?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,u=[e],a=[t];if(!i||!o)return e===h?-1:t===h?1:i?-1:o?1:f?U(f,e)-U(f,t):0;if(i===o)return fe(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;u[r]===a[r];)r++;return r?fe(u[r],a[r]):u[r]===b?-1:a[r]===b?1:0},h):h},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==h&&p(e),t=t.replace(W,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!y||!y.test(t))&&(!v||!v.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,h,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==h&&p(e),_(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==h&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&C.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(l=!n.detectDuplicates,f=!n.sortStable&&e.slice(0),e.sort(R),l){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return f=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:ae,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&Y.test(n)&&(t=u(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=x[e+" "];return t||(t=new RegExp("(^|"+k+")"+e+"("+k+"|$)"))&&x(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(q," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),u="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,s){var c,f,l,p,h,d,g=o!==u?"nextSibling":"previousSibling",v=t.parentNode,y=a&&t.nodeName.toLowerCase(),m=!s&&!a,_=!1;if(v){if(o){for(;g;){for(p=t;p=p[g];)if(a?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[u?v.firstChild:v.lastChild],u&&m){for(_=(h=(c=(f=(l=(p=v)[w]||(p[w]={}))[p.uniqueID]||(l[p.uniqueID]={}))[e]||[])[0]===E&&c[1])&&c[2],p=h&&v.childNodes[h];p=++h&&p&&p[g]||(_=h=0)||d.pop();)if(1===p.nodeType&&++_&&p===t){f[e]=[E,h,_];break}}else if(m&&(_=h=(c=(f=(l=(p=t)[w]||(p[w]={}))[p.uniqueID]||(l[p.uniqueID]={}))[e]||[])[0]===E&&c[1]),!1===_)for(;(p=++h&&p&&p[g]||(_=h=0)||d.pop())&&((a?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++_||(m&&((f=(l=p[w]||(p[w]={}))[p.uniqueID]||(l[p.uniqueID]={}))[e]=[E,_]),p!==t)););return(_-=i)===r||_%r==0&&_/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ae(function(e,n){for(var r,o=i(e,t),u=o.length;u--;)e[r=U(e,o[u])]=!(n[r]=o[u])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ae(function(e){var t=[],n=[],r=a(e.replace(H,"$1"));return r[w]?ae(function(e,t,n,i){for(var o,u=r(e,null,i,[]),a=e.length;a--;)(o=u[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:ae(function(e){return function(t){return oe(e,t).length>0}}),contains:ae(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:ae(function(e){return z.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:he(!1),disabled:he(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return V.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:de(function(){return[0]}),last:de(function(e,t){return[t-1]}),eq:de(function(e,t,n){return[n<0?n+t:n]}),even:de(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:de(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:de(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:de(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=le(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ve(){}function ye(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,o=i||r,u=n&&"parentNode"===o,a=T++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||u)return e(t,n,i);return!1}:function(t,n,s){var c,f,l,p=[E,a];if(s){for(;t=t[r];)if((1===t.nodeType||u)&&e(t,n,s))return!0}else for(;t=t[r];)if(1===t.nodeType||u)if(f=(l=t[w]||(t[w]={}))[t.uniqueID]||(l[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=f[o])&&c[0]===E&&c[1]===a)return p[2]=c[2];if(f[o]=p,p[2]=e(t,n,s))return!0}return!1}}function _e(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function we(e,t,n,r,i){for(var o,u=[],a=0,s=e.length,c=null!=t;a<s;a++)(o=e[a])&&(n&&!n(o,r,i)||(u.push(o),c&&t.push(a)));return u}function be(e,t,n,r,i,o){return r&&!r[w]&&(r=be(r)),i&&!i[w]&&(i=be(i,o)),ae(function(o,u,a,s){var c,f,l,p=[],h=[],d=u.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}(t||"*",a.nodeType?[a]:a,[]),v=!e||!o&&t?g:we(g,p,e,a,s),y=n?i||(o?e:d||r)?[]:u:v;if(n&&n(v,y,a,s),r)for(c=we(y,h),r(c,[],a,s),f=c.length;f--;)(l=c[f])&&(y[h[f]]=!(v[h[f]]=l));if(o){if(i||e){if(i){for(c=[],f=y.length;f--;)(l=y[f])&&c.push(v[f]=l);i(null,y=[],c,s)}for(f=y.length;f--;)(l=y[f])&&(c=i?U(o,l):p[f])>-1&&(o[c]=!(u[c]=l))}}else y=we(y===u?y.splice(d,y.length):y),i?i(null,u,y,s):D.apply(u,y)})}function Ee(e){for(var t,n,i,o=e.length,u=r.relative[e[0].type],a=u||r.relative[" "],s=u?1:0,f=me(function(e){return e===t},a,!0),l=me(function(e){return U(t,e)>-1},a,!0),p=[function(e,n,r){var i=!u&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r));return t=null,i}];s<o;s++)if(n=r.relative[e[s].type])p=[me(_e(p),n)];else{if((n=r.filter[e[s].type].apply(null,e[s].matches))[w]){for(i=++s;i<o&&!r.relative[e[i].type];i++);return be(s>1&&_e(p),s>1&&ye(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(H,"$1"),n,s<i&&Ee(e.slice(s,i)),i<o&&Ee(e=e.slice(i)),i<o&&ye(e))}p.push(n)}return _e(p)}return ve.prototype=r.filters=r.pseudos,r.setFilters=new ve,u=oe.tokenize=function(e,t){var n,i,o,u,a,s,c,f=A[e+" "];if(f)return t?0:f.slice(0);for(a=e,s=[],c=r.preFilter;a;){for(u in n&&!(i=F.exec(a))||(i&&(a=a.slice(i[0].length)||a),s.push(o=[])),n=!1,(i=$.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace(H," ")}),a=a.slice(n.length)),r.filter)!(i=G[u].exec(a))||c[u]&&!(i=c[u](i))||(n=i.shift(),o.push({value:n,type:u,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?oe.error(e):A(e,s).slice(0)},a=oe.compile=function(e,t){var n,i=[],o=[],a=S[e+" "];if(!a){for(t||(t=u(e)),n=t.length;n--;)(a=Ee(t[n]))[w]?i.push(a):o.push(a);(a=S(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,u,a,s,f){var l,d,v,y=0,m="0",_=o&&[],w=[],b=c,T=o||i&&r.find.TAG("*",f),x=E+=null==b?1:Math.random()||.1,A=T.length;for(f&&(c=u===h||u||f);m!==A&&null!=(l=T[m]);m++){if(i&&l){for(d=0,u||l.ownerDocument===h||(p(l),a=!g);v=e[d++];)if(v(l,u||h,a)){s.push(l);break}f&&(E=x)}n&&((l=!v&&l)&&y--,o&&_.push(l))}if(y+=m,n&&m!==y){for(d=0;v=t[d++];)v(_,w,u,a);if(o){if(y>0)for(;m--;)_[m]||w[m]||(w[m]=O.call(s));w=we(w)}D.apply(s,w),f&&!o&&w.length>0&&y+t.length>1&&oe.uniqueSort(s)}return f&&(E=x,c=b),_};return n?ae(o):o}(o,i))).selector=e}return a},s=oe.select=function(e,t,n,i){var o,s,c,f,l,p="function"==typeof e&&e,h=!i&&u(e=p.selector||e);if(n=n||[],1===h.length){if((s=h[0]=h[0].slice(0)).length>2&&"ID"===(c=s[0]).type&&9===t.nodeType&&g&&r.relative[s[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(s.shift().value.length)}for(o=G.needsContext.test(e)?0:s.length;o--&&(c=s[o],!r.relative[f=c.type]);)if((l=r.find[f])&&(i=l(c.matches[0].replace(Z,ee),J.test(s[0].type)&&ge(t.parentNode)||t))){if(s.splice(o,1),!(e=i.length&&ye(s)))return D.apply(n,i),n;break}}return(p||a(e,h))(i,t,!g,n,!t||J.test(e)&&ge(t.parentNode)||t),n},n.sortStable=w.split("").sort(R).join("")===w,n.detectDuplicates=!!l,p(),n.sortDetached=se(function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))}),se(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ce("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&se(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ce("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),se(function(e){return null==e.getAttribute("disabled")})||ce(j,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(n);T.find=S,T.expr=S.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=S.uniqueSort,T.text=S.getText,T.isXMLDoc=S.isXML,T.contains=S.contains,T.escapeSelector=S.escape;var R=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&T(e).is(n))break;r.push(e)}return r},C=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},P=T.expr.match.needsContext;function O(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var L=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,t,n){return m(t)?T.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?T.grep(e,function(e){return e===t!==n}):"string"!=typeof t?T.grep(e,function(e){return l.call(t,e)>-1!==n}):T.filter(t,e,n)}T.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?T.find.matchesSelector(r,e)?[r]:[]:T.find.matches(e,T.grep(t,function(e){return 1===e.nodeType}))},T.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(T(e).filter(function(){for(t=0;t<r;t++)if(T.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)T.find(e,i[t],n);return r>1?T.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&P.test(e)?T(e):e||[],!1).length}});var N,U=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||N,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:U.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),L.test(r[1])&&T.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=u.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this)}).prototype=T.fn,N=T(u);var j=/^(?:parents|prev(?:Until|All))/,k={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(T.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],u="string"!=typeof e&&T(e);if(!P.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(u?u.index(n)>-1:1===n.nodeType&&T.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?l.call(T(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return R(e,"parentNode")},parentsUntil:function(e,t,n){return R(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return R(e,"nextSibling")},prevAll:function(e){return R(e,"previousSibling")},nextUntil:function(e,t,n){return R(e,"nextSibling",n)},prevUntil:function(e,t,n){return R(e,"previousSibling",n)},siblings:function(e){return C((e.parentNode||{}).firstChild,e)},children:function(e){return C(e.firstChild)},contents:function(e){return O(e,"iframe")?e.contentDocument:(O(e,"template")&&(e=e.content||e),T.merge([],e.childNodes))}},function(e,t){T.fn[e]=function(n,r){var i=T.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&(k[e]||T.uniqueSort(i),j.test(e)&&i.reverse()),this.pushStack(i)}});var B=/[^\x20\t\r\n\f]+/g;function M(e){return e}function q(e){throw e}function H(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}T.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return T.each(e.match(B)||[],function(e,n){t[n]=!0}),t}(e):T.extend({},e);var t,n,r,i,o=[],u=[],a=-1,s=function(){for(i=i||e.once,r=t=!0;u.length;a=-1)for(n=u.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(a=o.length-1,u.push(n)),function t(n){T.each(n,function(n,r){m(r)?e.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==E(r)&&t(r)})}(arguments),n&&!t&&s()),this},remove:function(){return T.each(arguments,function(e,t){for(var n;(n=T.inArray(t,o,n))>-1;)o.splice(n,1),n<=a&&a--}),this},has:function(e){return e?T.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=u=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=u=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],u.push(n),t||s()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},T.extend({Deferred:function(e){var t=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return T.Deferred(function(n){T.each(t,function(t,r){var i=m(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){var o=0;function u(e,t,r,i){return function(){var a=this,s=arguments,c=function(){var n,c;if(!(e<o)){if((n=r.apply(a,s))===t.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"==typeof n||"function"==typeof n)&&n.then,m(c)?i?c.call(n,u(o,t,M,i),u(o,t,q,i)):(o++,c.call(n,u(o,t,M,i),u(o,t,q,i),u(o,t,M,t.notifyWith))):(r!==M&&(a=void 0,s=[n]),(i||t.resolveWith)(a,s))}},f=i?c:function(){try{c()}catch(n){T.Deferred.exceptionHook&&T.Deferred.exceptionHook(n,f.stackTrace),e+1>=o&&(r!==q&&(a=void 0,s=[n]),t.rejectWith(a,s))}};e?f():(T.Deferred.getStackHook&&(f.stackTrace=T.Deferred.getStackHook()),n.setTimeout(f))}}return T.Deferred(function(n){t[0][3].add(u(0,n,m(i)?i:M,n.notifyWith)),t[1][3].add(u(0,n,m(e)?e:M)),t[2][3].add(u(0,n,m(r)?r:q))}).promise()},promise:function(e){return null!=e?T.extend(e,i):i}},o={};return T.each(t,function(e,n){var u=n[2],a=n[5];i[n[1]]=u.add,a&&u.add(function(){r=a},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),u.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=u.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=T.Deferred(),u=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(H(e,o.done(u(n)).resolve,o.reject,!t),"pending"===o.state()||m(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],u(n),o.reject);return o.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&F.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},T.readyException=function(e){n.setTimeout(function(){throw e})};var $=T.Deferred();function W(){u.removeEventListener("DOMContentLoaded",W),n.removeEventListener("load",W),T.ready()}T.fn.ready=function(e){return $.then(e).catch(function(e){T.readyException(e)}),this},T.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==e&&--T.readyWait>0||$.resolveWith(u,[T]))}}),T.ready.then=$.then,"complete"===u.readyState||"loading"!==u.readyState&&!u.documentElement.doScroll?n.setTimeout(T.ready):(u.addEventListener("DOMContentLoaded",W),n.addEventListener("load",W));var Y=function(e,t,n,r,i,o,u){var a=0,s=e.length,c=null==n;if("object"===E(n))for(a in i=!0,n)Y(e,t,a,n[a],!0,o,u);else if(void 0!==r&&(i=!0,m(r)||(u=!0),c&&(u?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(T(e),n)})),t))for(;a<s;a++)t(e[a],n,u?r:r.call(e[a],a,t(e[a],n)));return i?e:c?t.call(e):s?t(e[0],n):o},z=/^-ms-/,G=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function X(e){return e.replace(z,"ms-").replace(G,V)}var Q=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function K(){this.expando=T.expando+K.uid++}K.uid=1,K.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Q(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(B)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||T.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!T.isEmptyObject(t)}};var J=new K,Z=new K,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}Z.set(e,t,n)}else n=void 0;return n}T.extend({hasData:function(e){return Z.hasData(e)||J.hasData(e)},data:function(e,t,n){return Z.access(e,t,n)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),T.fn.extend({data:function(e,t){var n,r,i,o=this[0],u=o&&o.attributes;if(void 0===e){if(this.length&&(i=Z.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){for(n=u.length;n--;)u[n]&&0===(r=u[n].name).indexOf("data-")&&(r=X(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Z.set(this,e)}):Y(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=Z.get(o,e))?n:void 0!==(n=ne(o,e))?n:void 0;this.each(function(){Z.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Z.remove(this,e)})}}),T.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),r=n.length,i=n.shift(),o=T._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){T.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:T.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),T.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?T.queue(this[0],e):void 0===t?this:this.each(function(){var n=T.queue(this,e,t);T._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&T.dequeue(this,e)})},dequeue:function(e){return this.each(function(){T.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=T.Deferred(),o=this,u=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";u--;)(n=J.get(o[u],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ue=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&T.contains(e.ownerDocument,e)&&"none"===T.css(e,"display")},ae=function(e,t,n,r){var i,o,u={};for(o in t)u[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=u[o];return i};function se(e,t,n,r){var i,o,u=20,a=r?function(){return r.cur()}:function(){return T.css(e,t,"")},s=a(),c=n&&n[3]||(T.cssNumber[t]?"":"px"),f=(T.cssNumber[t]||"px"!==c&&+s)&&ie.exec(T.css(e,t));if(f&&f[3]!==c){for(s/=2,c=c||f[3],f=+s||1;u--;)T.style(e,t,f+c),(1-o)*(1-(o=a()/s||.5))<=0&&(u=0),f/=o;f*=2,T.style(e,t,f+c),n=n||[]}return n&&(f=+f||+s||0,i=n[1]?f+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=f,r.end=i)),i}var ce={};function fe(e){var t,n=e.ownerDocument,r=e.nodeName,i=ce[r];return i||(t=n.body.appendChild(n.createElement(r)),i=T.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),ce[r]=i,i)}function le(e,t){for(var n,r,i=[],o=0,u=e.length;o<u;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ue(r)&&(i[o]=fe(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<u;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}T.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ue(this)?T(this).show():T(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,he=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,de=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&O(e,t)?T.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var me,_e,we=/<|&#?\w+;/;function be(e,t,n,r,i){for(var o,u,a,s,c,f,l=t.createDocumentFragment(),p=[],h=0,d=e.length;h<d;h++)if((o=e[h])||0===o)if("object"===E(o))T.merge(p,o.nodeType?[o]:o);else if(we.test(o)){for(u=u||l.appendChild(t.createElement("div")),a=(he.exec(o)||["",""])[1].toLowerCase(),s=ge[a]||ge._default,u.innerHTML=s[1]+T.htmlPrefilter(o)+s[2],f=s[0];f--;)u=u.lastChild;T.merge(p,u.childNodes),(u=l.firstChild).textContent=""}else p.push(t.createTextNode(o));for(l.textContent="",h=0;o=p[h++];)if(r&&T.inArray(o,r)>-1)i&&i.push(o);else if(c=T.contains(o.ownerDocument,o),u=ve(l.appendChild(o),"script"),c&&ye(u),n)for(f=0;o=u[f++];)de.test(o.type||"")&&n.push(o);return l}me=u.createDocumentFragment().appendChild(u.createElement("div")),(_e=u.createElement("input")).setAttribute("type","radio"),_e.setAttribute("checked","checked"),_e.setAttribute("name","t"),me.appendChild(_e),y.checkClone=me.cloneNode(!0).cloneNode(!0).lastChild.checked,me.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Ee=u.documentElement,Te=/^key/,xe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ae=/^([^.]*)(?:\.(.+)|)/;function Se(){return!0}function Re(){return!1}function Ce(){try{return u.activeElement}catch(e){}}function Pe(e,t,n,r,i,o){var u,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)Pe(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Re;else if(!i)return e;return 1===o&&(u=i,(i=function(e){return T().off(e),u.apply(this,arguments)}).guid=u.guid||(u.guid=T.guid++)),e.each(function(){T.event.add(this,t,i,r,n)})}T.event={global:{},add:function(e,t,n,r,i){var o,u,a,s,c,f,l,p,h,d,g,v=J.get(e);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&T.find.matchesSelector(Ee,i),n.guid||(n.guid=T.guid++),(s=v.events)||(s=v.events={}),(u=v.handle)||(u=v.handle=function(t){return void 0!==T&&T.event.triggered!==t.type?T.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(B)||[""]).length;c--;)h=g=(a=Ae.exec(t[c])||[])[1],d=(a[2]||"").split(".").sort(),h&&(l=T.event.special[h]||{},h=(i?l.delegateType:l.bindType)||h,l=T.event.special[h]||{},f=T.extend({type:h,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:d.join(".")},o),(p=s[h])||((p=s[h]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(e,r,d,u)||e.addEventListener&&e.addEventListener(h,u)),l.add&&(l.add.call(e,f),f.handler.guid||(f.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,f):p.push(f),T.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,u,a,s,c,f,l,p,h,d,g,v=J.hasData(e)&&J.get(e);if(v&&(s=v.events)){for(c=(t=(t||"").match(B)||[""]).length;c--;)if(h=g=(a=Ae.exec(t[c])||[])[1],d=(a[2]||"").split(".").sort(),h){for(l=T.event.special[h]||{},p=s[h=(r?l.delegateType:l.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=p.length;o--;)f=p[o],!i&&g!==f.origType||n&&n.guid!==f.guid||a&&!a.test(f.namespace)||r&&r!==f.selector&&("**"!==r||!f.selector)||(p.splice(o,1),f.selector&&p.delegateCount--,l.remove&&l.remove.call(e,f));u&&!p.length&&(l.teardown&&!1!==l.teardown.call(e,d,v.handle)||T.removeEvent(e,h,v.handle),delete s[h])}else for(h in s)T.event.remove(e,h+t[c],n,r,!0);T.isEmptyObject(s)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,u,a=T.event.fix(e),s=new Array(arguments.length),c=(J.get(this,"events")||{})[a.type]||[],f=T.event.special[a.type]||{};for(s[0]=a,t=1;t<arguments.length;t++)s[t]=arguments[t];if(a.delegateTarget=this,!f.preDispatch||!1!==f.preDispatch.call(this,a)){for(u=T.event.handlers.call(this,a,c),t=0;(i=u[t++])&&!a.isPropagationStopped();)for(a.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,void 0!==(r=((T.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(a.result=r)&&(a.preventDefault(),a.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,r,i,o,u,a=[],s=t.delegateCount,c=e.target;if(s&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],u={},n=0;n<s;n++)void 0===u[i=(r=t[n]).selector+" "]&&(u[i]=r.needsContext?T(i,this).index(c)>-1:T.find(i,this,null,[c]).length),u[i]&&o.push(r);o.length&&a.push({elem:c,handlers:o})}return c=this,s<t.length&&a.push({elem:c,handlers:t.slice(s)}),a},addProp:function(e,t){Object.defineProperty(T.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[T.expando]?e:new T.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Ce()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Ce()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&O(this,"input"))return this.click(),!1},_default:function(e){return O(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},T.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},T.Event=function(e,t){if(!(this instanceof T.Event))return new T.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Se:Re,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&T.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[T.expando]=!0},T.Event.prototype={constructor:T.Event,isDefaultPrevented:Re,isPropagationStopped:Re,isImmediatePropagationStopped:Re,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Se,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Se,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Se,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},T.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Te.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&xe.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},T.event.addProp),T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){T.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||T.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),T.fn.extend({on:function(e,t,n,r){return Pe(this,e,t,n,r)},one:function(e,t,n,r){return Pe(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,T(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Re),this.each(function(){T.event.remove(this,e,n,t)})}});var Oe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ue(e,t){return O(e,"table")&&O(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function je(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ke(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ie(e,t){var n,r,i,o,u,a,s,c;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),u=J.set(t,o),c=o.events))for(i in delete u.handle,u.events={},c)for(n=0,r=c[i].length;n<r;n++)T.event.add(t,i,c[i][n]);Z.hasData(e)&&(a=Z.access(e),s=T.extend({},a),Z.set(t,s))}}function Be(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Me(e,t,n,r){t=c.apply([],t);var i,o,u,a,s,f,l=0,p=e.length,h=p-1,d=t[0],g=m(d);if(g||p>1&&"string"==typeof d&&!y.checkClone&&De.test(d))return e.each(function(i){var o=e.eq(i);g&&(t[0]=d.call(this,i,o.html())),Me(o,t,n,r)});if(p&&(o=(i=be(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(u=T.map(ve(i,"script"),je)).length;l<p;l++)s=i,l!==h&&(s=T.clone(s,!0,!0),a&&T.merge(u,ve(s,"script"))),n.call(e[l],s,l);if(a)for(f=u[u.length-1].ownerDocument,T.map(u,ke),l=0;l<a;l++)s=u[l],de.test(s.type||"")&&!J.access(s,"globalEval")&&T.contains(f,s)&&(s.src&&"module"!==(s.type||"").toLowerCase()?T._evalUrl&&T._evalUrl(s.src):b(s.textContent.replace(Ne,""),f,s))}return e}function qe(e,t,n){for(var r,i=t?T.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||T.cleanData(ve(r)),r.parentNode&&(n&&T.contains(r.ownerDocument,r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}T.extend({htmlPrefilter:function(e){return e.replace(Oe,"<$1></$2>")},clone:function(e,t,n){var r,i,o,u,a=e.cloneNode(!0),s=T.contains(e.ownerDocument,e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(u=ve(a),r=0,i=(o=ve(e)).length;r<i;r++)Be(o[r],u[r]);if(t)if(n)for(o=o||ve(e),u=u||ve(a),r=0,i=o.length;r<i;r++)Ie(o[r],u[r]);else Ie(e,a);return(u=ve(a,"script")).length>0&&ye(u,!s&&ve(e,"script")),a},cleanData:function(e){for(var t,n,r,i=T.event.special,o=0;void 0!==(n=e[o]);o++)if(Q(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),T.fn.extend({detach:function(e){return qe(this,e,!0)},remove:function(e){return qe(this,e)},text:function(e){return Y(this,function(e){return void 0===e?T.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Me(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ue(this,e).appendChild(e)})},prepend:function(){return Me(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ue(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Me(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Me(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(T.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return T.clone(this,e,t)})},html:function(e){return Y(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!ge[(he.exec(e)||["",""])[1].toLowerCase()]){e=T.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(T.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Me(this,arguments,function(t){var n=this.parentNode;T.inArray(this,e)<0&&(T.cleanData(ve(this)),n&&n.replaceChild(t,this))},e)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){T.fn[e]=function(e){for(var n,r=[],i=T(e),o=i.length-1,u=0;u<=o;u++)n=u===o?this:this.clone(!0),T(i[u])[t](n),f.apply(r,n.get());return this.pushStack(r)}});var He=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),Fe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},$e=new RegExp(oe.join("|"),"i");function We(e,t,n){var r,i,o,u,a=e.style;return(n=n||Fe(e))&&(""!==(u=n.getPropertyValue(t)||n[t])||T.contains(e.ownerDocument,e)||(u=T.style(e,t)),!y.pixelBoxStyles()&&He.test(u)&&$e.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=u,u=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==u?u+"":u}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(f){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",f.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Ee.appendChild(c).appendChild(f);var e=n.getComputedStyle(f);r="1%"!==e.top,s=12===t(e.marginLeft),f.style.right="60%",a=36===t(e.right),i=36===t(e.width),f.style.position="absolute",o=36===f.offsetWidth||"absolute",Ee.removeChild(c),f=null}}function t(e){return Math.round(parseFloat(e))}var r,i,o,a,s,c=u.createElement("div"),f=u.createElement("div");f.style&&(f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===f.style.backgroundClip,T.extend(y,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),o}}))}();var ze=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Xe={letterSpacing:"0",fontWeight:"400"},Qe=["Webkit","Moz","ms"],Ke=u.createElement("div").style;function Je(e){var t=T.cssProps[e];return t||(t=T.cssProps[e]=function(e){if(e in Ke)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;n--;)if((e=Qe[n]+t)in Ke)return e}(e)||e),t}function Ze(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function et(e,t,n,r,i,o){var u="width"===t?1:0,a=0,s=0;if(n===(r?"border":"content"))return 0;for(;u<4;u+=2)"margin"===n&&(s+=T.css(e,n+oe[u],!0,i)),r?("content"===n&&(s-=T.css(e,"padding"+oe[u],!0,i)),"margin"!==n&&(s-=T.css(e,"border"+oe[u]+"Width",!0,i))):(s+=T.css(e,"padding"+oe[u],!0,i),"padding"!==n?s+=T.css(e,"border"+oe[u]+"Width",!0,i):a+=T.css(e,"border"+oe[u]+"Width",!0,i));return!r&&o>=0&&(s+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-s-a-.5))),s}function tt(e,t,n){var r=Fe(e),i=We(e,t,r),o="border-box"===T.css(e,"boxSizing",!1,r),u=o;if(He.test(i)){if(!n)return i;i="auto"}return u=u&&(y.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===T.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],u=!0),(i=parseFloat(i)||0)+et(e,t,n||(o?"border":"content"),u,r,i)+"px"}function nt(e,t,n,r,i){return new nt.prototype.init(e,t,n,r,i)}T.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,u,a=X(t),s=Ge.test(t),c=e.style;if(s||(t=Je(a)),u=T.cssHooks[t]||T.cssHooks[a],void 0===n)return u&&"get"in u&&void 0!==(i=u.get(e,!1,r))?i:c[t];"string"===(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(T.cssNumber[a]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),u&&"set"in u&&void 0===(n=u.set(e,n,r))||(s?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,u,a=X(t);return Ge.test(t)||(t=Je(a)),(u=T.cssHooks[t]||T.cssHooks[a])&&"get"in u&&(i=u.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Xe&&(i=Xe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),T.each(["height","width"],function(e,t){T.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(T.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,t,r):ae(e,Ve,function(){return tt(e,t,r)})},set:function(e,n,r){var i,o=Fe(e),u="border-box"===T.css(e,"boxSizing",!1,o),a=r&&et(e,t,r,u,o);return u&&y.scrollboxSize()===o.position&&(a-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-et(e,t,"border",!1,o)-.5)),a&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=T.css(e,t)),Ze(0,n,a)}}}),T.cssHooks.marginLeft=Ye(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-ae(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),T.each({margin:"",padding:"",border:"Width"},function(e,t){T.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(T.cssHooks[e+t].set=Ze)}),T.fn.extend({css:function(e,t){return Y(this,function(e,t,n){var r,i,o={},u=0;if(Array.isArray(t)){for(r=Fe(e),i=t.length;u<i;u++)o[t[u]]=T.css(e,t[u],!1,r);return o}return void 0!==n?T.style(e,t,n):T.css(e,t)},e,t,arguments.length>1)}}),T.Tween=nt,nt.prototype={constructor:nt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||T.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(T.cssNumber[n]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.options.duration?this.pos=t=T.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):nt.propHooks._default.set(this),this}},nt.prototype.init.prototype=nt.prototype,nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[T.cssProps[e.prop]]&&!T.cssHooks[e.prop]?e.elem[e.prop]=e.now:T.style(e.elem,e.prop,e.now+e.unit)}}},nt.propHooks.scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},T.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},T.fx=nt.prototype.init,T.fx.step={};var rt,it,ot=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function at(){it&&(!1===u.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(at):n.setTimeout(at,T.fx.interval),T.fx.tick())}function st(){return n.setTimeout(function(){rt=void 0}),rt=Date.now()}function ct(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ft(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,u=i.length;o<u;o++)if(r=i[o].call(n,t,e))return r}function lt(e,t,n){var r,i,o=0,u=lt.prefilters.length,a=T.Deferred().always(function(){delete s.elem}),s=function(){if(i)return!1;for(var t=rt||st(),n=Math.max(0,c.startTime+c.duration-t),r=1-(n/c.duration||0),o=0,u=c.tweens.length;o<u;o++)c.tweens[o].run(r);return a.notifyWith(e,[c,r,n]),r<1&&u?n:(u||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:T.extend({},t),opts:T.extend(!0,{specialEasing:{},easing:T.easing._default},n),originalProperties:t,originalOptions:n,startTime:rt||st(),duration:n.duration,tweens:[],createTween:function(t,n){var r=T.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),f=c.props;for(!function(e,t){var n,r,i,o,u;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(u=T.cssHooks[r])&&"expand"in u)for(n in o=u.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(f,c.opts.specialEasing);o<u;o++)if(r=lt.prefilters[o].call(c,e,f,c.opts))return m(r.stop)&&(T._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return T.map(f,ft,c),m(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),T.fx.timer(T.extend(s,{elem:e,anim:c,queue:c.opts.queue})),c}T.Animation=T.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(B);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,u,a,s,c,f,l="width"in t||"height"in t,p=this,h={},d=e.style,g=e.nodeType&&ue(e),v=J.get(e,"fxshow");for(r in n.queue||(null==(u=T._queueHooks(e,"fx")).unqueued&&(u.unqueued=0,a=u.empty.fire,u.empty.fire=function(){u.unqueued||a()}),u.unqueued++,p.always(function(){p.always(function(){u.unqueued--,T.queue(e,"fx").length||u.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}h[r]=v&&v[r]||T.style(e,r)}if((s=!T.isEmptyObject(t))||!T.isEmptyObject(h))for(r in l&&1===e.nodeType&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],null==(c=v&&v.display)&&(c=J.get(e,"display")),"none"===(f=T.css(e,"display"))&&(c?f=c:(le([e],!0),c=e.style.display||c,f=T.css(e,"display"),le([e]))),("inline"===f||"inline-block"===f&&null!=c)&&"none"===T.css(e,"float")&&(s||(p.done(function(){d.display=c}),null==c&&(f=d.display,c="none"===f?"":f)),d.display="inline-block")),n.overflow&&(d.overflow="hidden",p.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]})),s=!1,h)s||(v?"hidden"in v&&(g=v.hidden):v=J.access(e,"fxshow",{display:c}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),J.remove(e,"fxshow"),h)T.style(e,r,h[r])})),s=ft(g?v[r]:0,r,p),r in v||(v[r]=s.start,g&&(s.end=s.start,s.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),T.speed=function(e,t,n){var r=e&&"object"==typeof e?T.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return T.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in T.fx.speeds?r.duration=T.fx.speeds[r.duration]:r.duration=T.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&T.dequeue(this,r.queue)},r},T.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=T.isEmptyObject(e),o=T.speed(t,n,r),u=function(){var t=lt(this,T.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return u.finish=u,i||!1===o.queue?this.each(u):this.queue(o.queue,u)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=T.timers,u=J.get(this);if(i)u[i]&&u[i].stop&&r(u[i]);else for(i in u)u[i]&&u[i].stop&&ut.test(i)&&r(u[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||T.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=T.timers,u=r?r.length:0;for(n.finish=!0,T.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<u;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),T.each(["toggle","show","hide"],function(e,t){var n=T.fn[t];T.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ct(t,!0),e,r,i)}}),T.each({slideDown:ct("show"),slideUp:ct("hide"),slideToggle:ct("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){T.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),T.timers=[],T.fx.tick=function(){var e,t=0,n=T.timers;for(rt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||T.fx.stop(),rt=void 0},T.fx.timer=function(e){T.timers.push(e),T.fx.start()},T.fx.interval=13,T.fx.start=function(){it||(it=!0,at())},T.fx.stop=function(){it=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fn.delay=function(e,t){return e=T.fx&&T.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}})},function(){var e=u.createElement("input"),t=u.createElement("select").appendChild(u.createElement("option"));e.type="checkbox",y.checkOn=""!==e.value,y.optSelected=t.selected,(e=u.createElement("input")).value="t",e.type="radio",y.radioValue="t"===e.value}();var pt,ht=T.expr.attrHandle;T.fn.extend({attr:function(e,t){return Y(this,T.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){T.removeAttr(this,e)})}}),T.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?T.prop(e,t,n):(1===o&&T.isXMLDoc(e)||(i=T.attrHooks[t.toLowerCase()]||(T.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void T.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=T.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&O(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(B);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?T.removeAttr(e,n):e.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||T.find.attr;ht[t]=function(e,t,r){var i,o,u=t.toLowerCase();return r||(o=ht[u],ht[u]=i,i=null!=n(e,t,r)?u:null,ht[u]=o),i}});var dt=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(B)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(B)||[]}T.fn.extend({prop:function(e,t){return Y(this,T.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[T.propFix[e]||e]})}}),T.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(e)||(t=T.propFix[t]||t,i=T.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=T.find.attr(e,"tabindex");return t?parseInt(t,10):dt.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(T.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this}),T.fn.extend({addClass:function(e){var t,n,r,i,o,u,a,s=0;if(m(e))return this.each(function(t){T(this).addClass(e.call(this,t,yt(this)))});if((t=mt(e)).length)for(;n=this[s++];)if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){for(u=0;o=t[u++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=vt(r))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,u,a,s=0;if(m(e))return this.each(function(t){T(this).removeClass(e.call(this,t,yt(this)))});if(!arguments.length)return this.attr("class","");if((t=mt(e)).length)for(;n=this[s++];)if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){for(u=0;o=t[u++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(a=vt(r))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):m(e)?this.each(function(n){T(this).toggleClass(e.call(this,n,yt(this),t),t)}):this.each(function(){var t,i,o,u;if(r)for(i=0,o=T(this),u=mt(e);t=u[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=yt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+vt(yt(n))+" ").indexOf(t)>-1)return!0;return!1}});var _t=/\r/g;T.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=m(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,T(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,function(e){return null==e?"":e+""})),(t=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(_t,""):null==n?"":n:void 0}}),T.extend({valHooks:{option:{get:function(e){var t=T.find.attr(e,"value");return null!=t?t:vt(T.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,u="select-one"===e.type,a=u?null:[],s=u?o+1:i.length;for(r=o<0?s:u?o:0;r<s;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!O(n.parentNode,"optgroup"))){if(t=T(n).val(),u)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=T.makeArray(t),u=i.length;u--;)((r=i[u]).selected=T.inArray(T.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=T.inArray(T(e).val(),t)>-1}},y.checkOn||(T.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in n;var wt=/^(?:focusinfocus|focusoutblur)$/,bt=function(e){e.stopPropagation()};T.extend(T.event,{trigger:function(e,t,r,i){var o,a,s,c,f,l,p,h,g=[r||u],v=d.call(e,"type")?e.type:e,y=d.call(e,"namespace")?e.namespace.split("."):[];if(a=h=s=r=r||u,3!==r.nodeType&&8!==r.nodeType&&!wt.test(v+T.event.triggered)&&(v.indexOf(".")>-1&&(y=v.split("."),v=y.shift(),y.sort()),f=v.indexOf(":")<0&&"on"+v,(e=e[T.expando]?e:new T.Event(v,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:T.makeArray(t,[e]),p=T.event.special[v]||{},i||!p.trigger||!1!==p.trigger.apply(r,t))){if(!i&&!p.noBubble&&!_(r)){for(c=p.delegateType||v,wt.test(c+v)||(a=a.parentNode);a;a=a.parentNode)g.push(a),s=a;s===(r.ownerDocument||u)&&g.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=g[o++])&&!e.isPropagationStopped();)h=a,e.type=o>1?c:p.bindType||v,(l=(J.get(a,"events")||{})[e.type]&&J.get(a,"handle"))&&l.apply(a,t),(l=f&&a[f])&&l.apply&&Q(a)&&(e.result=l.apply(a,t),!1===e.result&&e.preventDefault());return e.type=v,i||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(g.pop(),t)||!Q(r)||f&&m(r[v])&&!_(r)&&((s=r[f])&&(r[f]=null),T.event.triggered=v,e.isPropagationStopped()&&h.addEventListener(v,bt),r[v](),e.isPropagationStopped()&&h.removeEventListener(v,bt),T.event.triggered=void 0,s&&(r[f]=s)),e.result}},simulate:function(e,t,n){var r=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(r,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each(function(){T.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}}),y.focusin||T.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){T.event.simulate(t,e.target,T.event.fix(e))};T.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Et=n.location,Tt=Date.now(),xt=/\?/;T.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||T.error("Invalid XML: "+e),t};var At=/\[\]$/,St=/\r?\n/g,Rt=/^(?:submit|button|image|reset|file)$/i,Ct=/^(?:input|select|textarea|keygen)/i;function Pt(e,t,n,r){var i;if(Array.isArray(t))T.each(t,function(t,i){n||At.test(e)?r(e,i):Pt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==E(t))r(e,t);else for(i in t)Pt(e+"["+i+"]",t[i],n,r)}T.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&Ct.test(this.nodeName)&&!Rt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,function(e){return{name:t.name,value:e.replace(St,"\r\n")}}):{name:t.name,value:n.replace(St,"\r\n")}}).get()}});var Ot=/%20/g,Lt=/#.*$/,Dt=/([?&])_=[^&]*/,Nt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ut=/^(?:GET|HEAD)$/,jt=/^\/\//,kt={},It={},Bt="*/".concat("*"),Mt=u.createElement("a");function qt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(B)||[];if(m(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ht(e,t,n,r){var i={},o=e===It;function u(a){var s;return i[a]=!0,T.each(e[a]||[],function(e,a){var c=a(t,n,r);return"string"!=typeof c||o||i[c]?o?!(s=c):void 0:(t.dataTypes.unshift(c),u(c),!1)}),s}return u(t.dataTypes[0])||!i["*"]&&u("*")}function Ft(e,t){var n,r,i=T.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&T.extend(!0,e,r),e}Mt.href=Et.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,T.ajaxSettings),t):Ft(T.ajaxSettings,e)},ajaxPrefilter:qt(kt),ajaxTransport:qt(It),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,s,c,f,l,p,h,d=T.ajaxSetup({},t),g=d.context||d,v=d.context&&(g.nodeType||g.jquery)?T(g):T.event,y=T.Deferred(),m=T.Callbacks("once memory"),_=d.statusCode||{},w={},b={},E="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(f){if(!a)for(a={};t=Nt.exec(o);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return f?o:null},setRequestHeader:function(e,t){return null==f&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==f&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(f)x.always(e[x.status]);else for(t in e)_[t]=[_[t],e[t]];return this},abort:function(e){var t=e||E;return r&&r.abort(t),A(0,t),this}};if(y.promise(x),d.url=((e||d.url||Et.href)+"").replace(jt,Et.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(B)||[""],null==d.crossDomain){c=u.createElement("a");try{c.href=d.url,c.href=c.href,d.crossDomain=Mt.protocol+"//"+Mt.host!=c.protocol+"//"+c.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=T.param(d.data,d.traditional)),Ht(kt,d,t,x),f)return x;for(p in(l=T.event&&d.global)&&0==T.active++&&T.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ut.test(d.type),i=d.url.replace(Lt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Ot,"+")):(h=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(xt.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Dt,"$1"),h=(xt.test(i)?"&":"?")+"_="+Tt+++h),d.url=i+h),d.ifModified&&(T.lastModified[i]&&x.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&x.setRequestHeader("If-None-Match",T.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Bt+"; q=0.01":""):d.accepts["*"]),d.headers)x.setRequestHeader(p,d.headers[p]);if(d.beforeSend&&(!1===d.beforeSend.call(g,x,d)||f))return x.abort();if(E="abort",m.add(d.complete),x.done(d.success),x.fail(d.error),r=Ht(It,d,t,x)){if(x.readyState=1,l&&v.trigger("ajaxSend",[x,d]),f)return x;d.async&&d.timeout>0&&(s=n.setTimeout(function(){x.abort("timeout")},d.timeout));try{f=!1,r.send(w,A)}catch(e){if(f)throw e;A(-1,e)}}else A(-1,"No Transport");function A(e,t,u,a){var c,p,h,w,b,E=t;f||(f=!0,s&&n.clearTimeout(s),r=void 0,o=a||"",x.readyState=e>0?4:0,c=e>=200&&e<300||304===e,u&&(w=function(e,t,n){for(var r,i,o,u,a=e.contents,s=e.dataTypes;"*"===s[0];)s.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){s.unshift(i);break}if(s[0]in n)o=s[0];else{for(i in n){if(!s[0]||e.converters[i+" "+s[0]]){o=i;break}u||(u=i)}o=o||u}if(o)return o!==s[0]&&s.unshift(o),n[o]}(d,x,u)),w=function(e,t,n,r){var i,o,u,a,s,c={},f=e.dataTypes.slice();if(f[1])for(u in e.converters)c[u.toLowerCase()]=e.converters[u];for(o=f.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!s&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),s=o,o=f.shift())if("*"===o)o=s;else if("*"!==s&&s!==o){if(!(u=c[s+" "+o]||c["* "+o]))for(i in c)if((a=i.split(" "))[1]===o&&(u=c[s+" "+a[0]]||c["* "+a[0]])){!0===u?u=c[i]:!0!==c[i]&&(o=a[0],f.unshift(a[1]));break}if(!0!==u)if(u&&e.throws)t=u(t);else try{t=u(t)}catch(e){return{state:"parsererror",error:u?e:"No conversion from "+s+" to "+o}}}return{state:"success",data:t}}(d,w,x,c),c?(d.ifModified&&((b=x.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=b),(b=x.getResponseHeader("etag"))&&(T.etag[i]=b)),204===e||"HEAD"===d.type?E="nocontent":304===e?E="notmodified":(E=w.state,p=w.data,c=!(h=w.error))):(h=E,!e&&E||(E="error",e<0&&(e=0))),x.status=e,x.statusText=(t||E)+"",c?y.resolveWith(g,[p,E,x]):y.rejectWith(g,[x,E,h]),x.statusCode(_),_=void 0,l&&v.trigger(c?"ajaxSuccess":"ajaxError",[x,d,c?p:h]),m.fireWith(g,[x,E]),l&&(v.trigger("ajaxComplete",[x,d]),--T.active||T.event.trigger("ajaxStop")))}return x},getJSON:function(e,t,n){return T.get(e,t,n,"json")},getScript:function(e,t){return T.get(e,void 0,t,"script")}}),T.each(["get","post"],function(e,t){T[t]=function(e,n,r,i){return m(n)&&(i=i||r,r=n,n=void 0),T.ajax(T.extend({url:e,type:t,dataType:i,data:n,success:r},T.isPlainObject(e)&&e))}}),T._evalUrl=function(e){return T.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},T.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=T(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return m(e)?this.each(function(t){T(this).wrapInner(e.call(this,t))}):this.each(function(){var t=T(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=m(e);return this.each(function(n){T(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){T(this).replaceWith(this.childNodes)}),this}}),T.expr.pseudos.hidden=function(e){return!T.expr.pseudos.visible(e)},T.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var $t={0:200,1223:204},Wt=T.ajaxSettings.xhr();y.cors=!!Wt&&"withCredentials"in Wt,y.ajax=Wt=!!Wt,T.ajaxTransport(function(e){var t,r;if(y.cors||Wt&&!e.crossDomain)return{send:function(i,o){var u,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(u in e.xhrFields)a[u]=e.xhrFields[u];for(u in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(u,i[u]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o($t[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),T.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return T.globalEval(e),e}}}),T.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),T.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(r,i){t=T("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),u.head.appendChild(t[0])},abort:function(){n&&n()}}});var Yt,zt=[],Gt=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||T.expando+"_"+Tt++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",function(e,t,r){var i,o,u,a=!1!==e.jsonp&&(Gt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Gt,"$1"+i):!1!==e.jsonp&&(e.url+=(xt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return u||T.error(i+" was not called"),u[0]},e.dataTypes[0]="json",o=n[i],n[i]=function(){u=arguments},r.always(function(){void 0===o?T(n).removeProp(i):n[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,zt.push(i)),u&&m(o)&&o(u[0]),u=o=void 0}),"script"}),y.createHTMLDocument=((Yt=u.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Yt.childNodes.length),T.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=u.implementation.createHTMLDocument("")).createElement("base")).href=u.location.href,t.head.appendChild(r)):t=u),o=!n&&[],(i=L.exec(e))?[t.createElement(i[1])]:(i=be([e],t,o),o&&o.length&&T(o).remove(),T.merge([],i.childNodes)));var r,i,o},T.fn.load=function(e,t,n){var r,i,o,u=this,a=e.indexOf(" ");return a>-1&&(r=vt(e.slice(a)),e=e.slice(0,a)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),u.length>0&&T.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,u.html(r?T("<div>").append(T.parseHTML(e)).find(r):e)}).always(n&&function(e,t){u.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.expr.pseudos.animated=function(e){return T.grep(T.timers,function(t){return e===t.elem}).length},T.offset={setOffset:function(e,t,n){var r,i,o,u,a,s,c=T.css(e,"position"),f=T(e),l={};"static"===c&&(e.style.position="relative"),a=f.offset(),o=T.css(e,"top"),s=T.css(e,"left"),("absolute"===c||"fixed"===c)&&(o+s).indexOf("auto")>-1?(u=(r=f.position()).top,i=r.left):(u=parseFloat(o)||0,i=parseFloat(s)||0),m(t)&&(t=t.call(e,n,T.extend({},a))),null!=t.top&&(l.top=t.top-a.top+u),null!=t.left&&(l.left=t.left-a.left+i),"using"in t?t.using.call(e,l):f.css(l)}},T.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){T.offset.setOffset(this,e,t)});var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===T.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===T.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=T(e).offset()).top+=T.css(e,"borderTopWidth",!0),i.left+=T.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-T.css(r,"marginTop",!0),left:t.left-i.left-T.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||Ee})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;T.fn[e]=function(r){return Y(this,function(e,r,i){var o;if(_(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),T.each(["top","left"],function(e,t){T.cssHooks[t]=Ye(y.pixelPosition,function(e,n){if(n)return n=We(e,t),He.test(n)?T(e).position()[t]+"px":n})}),T.each({Height:"height",Width:"width"},function(e,t){T.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){T.fn[r]=function(i,o){var u=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return Y(this,function(t,n,i){var o;return _(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?T.css(t,n,a):T.style(t,n,i,a)},t,u?i:void 0,u)}})}),T.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){T.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),T.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),T.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||T.guid++,i},T.holdReady=function(e){e?T.readyWait++:T.ready(!0)},T.isArray=Array.isArray,T.parseJSON=JSON.parse,T.nodeName=O,T.isFunction=m,T.isWindow=_,T.camelCase=X,T.type=E,T.now=Date.now,T.isNumeric=function(e){var t=T.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},void 0===(r=function(){return T}.apply(t,[]))||(e.exports=r);var Vt=n.jQuery,Xt=n.$;return T.noConflict=function(e){return n.$===T&&(n.$=Xt),e&&n.jQuery===T&&(n.jQuery=Vt),T},i||(n.jQuery=n.$=T),T})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(16),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.isBufferBinary=function(e){for(var t=Array.prototype.slice.call(new Uint16Array(e,0,50)),n=String.fromCharCode.apply(null,t),r=0;r<n.length;r++){var i=n.charCodeAt(r);if(65533===i||i<=8)return!0}return!1},t.prototype.writeBuffer=function(e,n,r){var i=this;void 0===r&&(r=0);var o=Math.min(e.byteLength,r+n),u=e.slice(r,o),a=new Uint8Array(u.byteLength+1);return a.set([u.byteLength]),a.set(new Uint8Array(u),1),this.send(140,a).then(function(){return i.emit(t.EVENT_PROGRESS,r/e.byteLength),o<e.byteLength?i.writeBuffer(e,n,o):Promise.resolve()})},t.prototype.flash=function(e,n){var r=this;void 0===n&&(n=62);var i=void 0!==e.buffer?e.buffer:e,o=this.isBufferBinary(i)?0:1;return this.send(138,new Uint32Array([o])).then(function(e){return 0!==e.getUint8(1)?Promise.reject("Flash error"):r.writeBuffer(i,n)}).then(function(){return r.emit(t.EVENT_PROGRESS,1),r.send(139)}).then(function(e){return 0!==e.getUint8(1)?Promise.reject("Flash error"):r.send(137)}).then(function(){})},t.prototype.getSerialBaudrate=function(){return this.send(129).then(function(e){return e.getUint32(1,!0)})},t.prototype.setSerialBaudrate=function(e){return void 0===e&&(e=9600),this.send(130,new Uint32Array([e])).then(function(){})},t.prototype.startSerialRead=function(e){var n=this;void 0===e&&(e=200),this.stopSerialRead(),this.timer=setInterval(function(){return n.send(131).then(function(e){if(e.byteLength>0){var r=e.getUint8(1);if(0!==r){var i=e.buffer.slice(2,2+r),o=Array.prototype.slice.call(new Uint8Array(i)),u=String.fromCharCode.apply(null,o);n.emit(t.EVENT_SERIAL_DATA,u)}}})},e)},t.prototype.stopSerialRead=function(){this.timer&&(clearInterval(this.timer),this.timer=void 0)},t.prototype.serialWrite=function(e){var t=e.split("").map(function(e){return e.charCodeAt(0)});return t.unshift(t.length),this.send(132,new Uint8Array(t).buffer).then(function(){})},t.EVENT_PROGRESS="progress",t.EVENT_SERIAL_DATA="serial",t}(o.CmsisDAP);t.DAPLink=u,function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(2),i=n(23);var o,u,a;!function(e){e[e.SUBTYPE_STRING=1]="SUBTYPE_STRING",e[e.SUBTYPE_INT=2]="SUBTYPE_INT",e[e.SUBTYPE_FLOAT=4]="SUBTYPE_FLOAT",e[e.SUBTYPE_EVENT=8]="SUBTYPE_EVENT"}(o=t.SubType||(t.SubType={})),function(e){e[e.REQUEST_TYPE_GET_REQUEST=1]="REQUEST_TYPE_GET_REQUEST",e[e.REQUEST_TYPE_POST_REQUEST=2]="REQUEST_TYPE_POST_REQUEST",e[e.REQUEST_TYPE_CLOUD_VARIABLE=4]="REQUEST_TYPE_CLOUD_VARIABLE",e[e.REQUEST_TYPE_BROADCAST=8]="REQUEST_TYPE_BROADCAST",e[e.REQUEST_TYPE_HELLO=16]="REQUEST_TYPE_HELLO"}(t.RequestType||(t.RequestType={})),function(e){e[e.REQUEST_STATUS_ACK=32]="REQUEST_STATUS_ACK",e[e.REQUEST_STATUS_ERROR=64]="REQUEST_STATUS_ERROR",e[e.REQUEST_STATUS_OK=128]="REQUEST_STATUS_OK"}(u=t.RequestStatus||(t.RequestStatus={})),function(e){e[e.SLIP_END=192]="SLIP_END",e[e.SLIP_ESC=219]="SLIP_ESC",e[e.SLIP_ESC_END=220]="SLIP_ESC_END",e[e.SLIP_ESC_ESC=221]="SLIP_ESC_ESC"}(a=t.SlipChar||(t.SlipChar={})),t.HEADER_LENGTH=5,t.HEADER_STRUCTURE="<BBHB";class s{constructor(e,t,n,r,i){this.app_id=e,this.namespace_id=t,this.uid=n,this.request_type=r,this.payload=[],null!=i&&this.decode(i)}getAppID(){return this.app_id}getNamespaceID(){return this.namespace_id}getUID(){return this.uid}getReqRes(){return this.request_type}getHeader(){return i.pack(t.HEADER_STRUCTURE,[this.app_id,this.namespace_id,this.uid,this.request_type])}getPayload(){return this.payload}getFormattedPayloadParts(){let e=[];function t(e){return Number(e)===e&&e%1!=0}for(let u=0;u<this.payload.length;u++){let a=this.payload[u];switch(typeof a){case"number":n=a,Number(n)===n&&n%1==0?e.push(i.pack("<Bi",[o.SUBTYPE_INT,a])):t(a)&&e.push(i.pack("<Bf",[o.SUBTYPE_FLOAT,a]));break;case"string":e.push(i.pack(`<B${a.length+1}s`,[o.SUBTYPE_STRING,a+"\0"]));break;default:r.debug(`FOUND UNIMPLEMENTED SUBTYPE WHILE ENCODING PACKET ${typeof a} (${a})`,r.DebugType.WARNING)}}var n;return e}getFormattedPacket(){let e=new Uint8Array(this.length());e.set(this.getHeader());let t=this.getHeader().length;this.getFormattedPayloadParts().forEach(n=>{e.set(n,t),t+=n.length});let n=Array.from(e),r=63-n.length;return n=(n=n.concat(new Array(r).fill(0)).slice(0,61)).concat(a.SLIP_END)}length(){let e=0;return e+=this.getHeader().length,this.getFormattedPayloadParts().forEach(t=>{e+=t.length}),e}setRequestBit(e){this.request_type|=e}clearRequestBit(e){this.request_type&=~e}clearAndError(e){return this.setRequestBit(u.REQUEST_STATUS_OK),this.clear(),this.append(0),this}append(e){this.payload.push(e)}remove(e){this.payload=this.payload.slice(0,e).concat(this.payload.slice(e+1))}get(e){return this.payload[e]}clear(){this.payload=[]}decode(e){if(0==e.length)return;let t,n=0,r=i.unpack("b",e,0),u=e.slice(1);if(r&o.SUBTYPE_STRING){t="";for(let e in u){if("\0"==String.fromCharCode(u[e]))break;t+=String.fromCharCode(u[e])}n=t.length+1}else r&o.SUBTYPE_INT?(t=i.unpack("<i",u)[0],n=4):r&o.SUBTYPE_FLOAT&&(t=i.unpack("<f",u)[0],n=4);this.payload.push(t),this.decode(u.slice(n))}static dataToSerialPacket(e){let n,r,o=[];for(let t=0;t<e.length-1;t++)o.push(e.codePointAt(t));return r=i.unpack(t.HEADER_STRUCTURE,o.slice(0,t.HEADER_LENGTH)),n=o.slice(t.HEADER_LENGTH),new s(r[0],r[1],r[2],r[3],n)}}t.SerialPacket=s},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(0),i=n(36),o=n(38),u=n(39),a=n(40),s=n(12),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(41);e.exports=function(e){return new Promise(function(t,f){var l=e.data,p=e.headers;r.isFormData(l)&&delete p["Content-Type"];var h=new XMLHttpRequest,d="onreadystatechange",g=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||a(e.url)||(h=new window.XDomainRequest,d="onload",g=!0,h.onprogress=function(){},h.ontimeout=function(){}),e.auth){var v=e.auth.username||"",y=e.auth.password||"";p.Authorization="Basic "+c(v+":"+y)}if(h.open(e.method.toUpperCase(),o(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h[d]=function(){if(h&&(4===h.readyState||g)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:n,config:e,request:h};i(t,f,r),h=null}},h.onerror=function(){f(s("Network Error",e,null,h)),h=null},h.ontimeout=function(){f(s("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var m=n(42),_=(e.withCredentials||a(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;_&&(p[e.xsrfHeaderName]=_)}if("setRequestHeader"in h&&r.forEach(p,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),f(e),h=null)}),void 0===l&&(l=null),h.send(l)})}},function(e,t,n){"use strict";var r=n(37);e.exports=function(e,t,n,i,o){var u=new Error(e);return r(u,t,n,i,o)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=n(6),u=n(7),a=n(21),s=n(2),c=n(22),f=i(n(58)),l=i(n(59)),p="Connect to a micro:bit to start the hub",h=o("#status"),d=o("#connect"),g=o("#flash"),v=o("#loginButton"),y=o("#logout"),m=o("#hubSelect");n(60);let _,w,b,E="-1",T={authenticated:!1,credentials:{school_id:"",pi_id:""},cloud_variable_socket:{address:"localhost",port:8001},translations:{url:"translations.json",poll_updates:!1,poll_time:6e4,json:{}},proxy:{address:"/proxy",proxy_requests:!0},dapjs:{serial_delay:100,baud_rate:115200,flash_timeout:5e3,reset_pause:1e3}};function x(){return S("Select a device"),new Promise((e,t)=>{navigator.usb.requestDevice({filters:[{vendorId:3368,productId:516}]}).then(t=>{e(t)}).catch(e=>{t(e)})})}function A(){const e="Couldn't safely disconnect from the micro:bit. This can happen if the micro:bit was unplugged before being disconnected, all is safe!";d.text("Connect"),S(p),T.authenticated=!1,T.school_id="",T.pi_id="",b=null,w="";try{_.removeAllListeners(),_.stopSerialRead(),_.disconnect().catch(t=>{console.log(t),console.log(e)})}catch(t){console.log(t),console.log(e)}_=null}function S(e){h.text(e)}!function e(){return r(this,void 0,void 0,function*(){(T.translations.poll_updates||0===Object.entries(T.translations.json).length)&&(s.debug("Checking for translations updates",s.DebugType.DEBUG),o.ajax({url:T.translations.url,method:"GET",dataType:"JSON",cache:!1,timeout:1e4,error:e=>{s.debug("Error receiving translations",s.DebugType.ERROR),console.log(e)},success:e=>{T.translations.json!={}&&e.version==T.translations.json.version||(s.debug(`Translations have updated! (v${e.version})`,s.DebugType.DEBUG),T.translations.json=e)}}),setTimeout(e,T.translations.poll_time))})}(),navigator.usb.addEventListener("disconnect",e=>{e.device.serialNumber==w&&A()}),d.on("click",()=>{"Connect"==d.text()?x().then(e=>(S("Connecting..."),function(e){return new Promise((t,n)=>{_&&_.stopSerialRead();const r=new a.WebUSB(e);_=new u.DAPLink(r),w=e.serialNumber,_.disconnect(),_.connect().then(()=>_.setSerialBaudrate(T.dapjs.baud_rate)).then(()=>_.getSerialBaudrate()).then(n=>{_.startSerialRead(T.dapjs.serial_delay),console.log(`Listening at ${n} baud...`),b=new c.SerialHandler(_,T,n),t("Connected to "+(""!=e.productName?e.productName:"micro:bit"))}).catch(e=>{console.log(e),n(`Failed to connect : ${e}`)})})}(e))).then(e=>{d.text("Disconnect"),S(e)}).catch(e=>{S(e)}):A()}),g.on("click",()=>{"-1"!==E?x().then(e=>(function(e){return new Promise((t,n)=>{T.authenticated=!1,T.school_id="",T.pi_id="",_&&_.stopSerialRead(),l.default.getHubFirmware(E).then(r=>{const i=new a.WebUSB(e);return(_=new u.DAPLink(i)).disconnect(),_.on(u.DAPLink.EVENT_PROGRESS,function(e){S(`Flashing: ${Math.round(100*e)}%`)}),_.connect().then(()=>(console.log("Flashing"),_.flash(r))).then(()=>(console.log("Finished flashing! Reconnect micro:bit"),t("Finished flashing! Reconnect micro:bit"),_.disconnect())).catch(e=>{n("Error flashing: "+e),console.log("Error flashing: "+e)})}).catch(()=>{n("Failed to get hub firmware")})})})(e)).then(e=>{S(e)}).catch(e=>{S(e)}):alert("Hub firmware should be selected!")}),y.on("click",()=>{f.default.cleanTokens(),window.location.reload()}),v.on("click",()=>{const e={username:o("#userName").val().toString(),password:o("#inputPassword").val().toString()};f.default.login(e.username,e.password).then(()=>{window.location.reload()}).catch(e=>{o("#loginError").show(),o("#loginError").text(e.message)})}),m.on("change",function(){E=this.value}),window.onload=()=>{f.default.AccessToken?(o("#loginpage").hide(),o("#main").show(),l.default.getWebHubs().then(e=>{for(const t of e)m.append(`<option value='${t.uid}'>${t.name}</option>`)})):(o("#loginpage").show(),o("#main").hide())}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(17)),r(n(19))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18);t.DEFAULT_CLOCK_FREQUENCY=1e7;var u=4,a=2,s=5,c=function(e){function n(n,r,i){void 0===r&&(r=0),void 0===i&&(i=t.DEFAULT_CLOCK_FREQUENCY);var o=e.call(this)||this;o.transport=n,o.mode=r,o.clockFrequency=i,o.blockSize=o.transport.packetSize-u-1;var c=o.transport.packetSize-a-1;return o.operationCount=Math.floor(c/s),o}return i(n,e),n.prototype.delay=function(e){return new Promise(function(t,n){setTimeout(t,e)})},n.prototype.bufferSourceToUint8Array=function(e,t){if(!t)return new Uint8Array([e]);var n=void 0!==t.buffer?t.buffer:t,r=new Uint8Array(n.byteLength+1);return r.set([e]),r.set(new Uint8Array(n),1),r},n.prototype.selectProtocol=function(e){var t=this,n=2===e?59196:59294;return this.swjSequence(new Uint8Array([255,255,255,255,255,255,255])).then(function(){return t.swjSequence(new Uint16Array([n]))}).then(function(){return t.swjSequence(new Uint8Array([255,255,255,255,255,255,255]))}).then(function(){return t.swjSequence(new Uint8Array([0]))})},n.prototype.send=function(e,t){var n=this,r=this.bufferSourceToUint8Array(e,t);return this.transport.write(r).then(function(){return n.transport.read()}).then(function(t){if(t.getUint8(0)!==e)throw new Error("Bad response for "+e+" -> "+t.getUint8(0));switch(e){case 3:case 8:case 9:case 10:case 17:case 18:case 19:case 29:case 23:case 24:case 26:case 21:case 22:case 4:if(0!==t.getUint8(1))throw new Error("Bad status for "+e+" -> "+t.getUint8(1))}return t})},n.prototype.dapInfo=function(e){return this.send(0,new Uint8Array([e])).then(function(t){var n=t.getUint8(1);if(0===n)throw new Error("DAP Info Failure");switch(e){case 240:case 254:case 255:case 253:if(1===n)return t.getUint8(2);if(2===n)return t.getUint16(2);if(4===n)return t.getUint32(2)}var r=Array.prototype.slice.call(new Uint8Array(t.buffer,2,n));return String.fromCharCode.apply(null,r)})},n.prototype.swjSequence=function(e){var t=8*e.byteLength,n=this.bufferSourceToUint8Array(t,e);return this.send(18,n).then(function(){})},n.prototype.configureTransfer=function(e,t,n){var r=new Uint8Array(5),i=new DataView(r.buffer);return i.setUint8(0,e),i.setUint16(1,t,!0),i.setUint16(3,n,!0),this.send(4,r).then(function(){})},n.prototype.connect=function(){var e=this;return this.transport.open().then(function(){return e.send(17,new Uint32Array([e.clockFrequency]))}).then(function(){return e.send(2,new Uint8Array([e.mode]))}).then(function(t){if(0===t.getUint8(1)||0!==e.mode&&t.getUint8(1)!==e.mode)throw new Error("Mode not enabled.")}).then(function(){return e.configureTransfer(0,100,0)}).then(function(){return e.selectProtocol(1)})},n.prototype.disconnect=function(){var e=this;return this.send(3).then(function(){return e.transport.close()})},n.prototype.reconnect=function(){var e=this;return this.disconnect().then(function(){return e.delay(100)}).then(function(){return e.connect()})},n.prototype.reset=function(){return this.send(10).then(function(e){return 1===e.getUint8(2)})},n.prototype.transfer=function(e,t,n,r){var i;void 0===t&&(t=2),void 0===n&&(n=0),void 0===r&&(r=0),i="number"==typeof e?[{port:e,mode:t,register:n,value:r}]:e;var o=new Uint8Array(a+i.length*s),u=new DataView(o.buffer);return u.setUint8(0,0),u.setUint8(1,i.length),i.forEach(function(e,t){var n=a+t*s;u.setUint8(n,e.port|e.mode|e.register),u.setUint32(n+1,e.value||0,!0)}),this.send(5,o).then(function(t){if(t.getUint8(1)!==i.length)throw new Error("Transfer count mismatch");var n=t.getUint8(2);if(2===n)throw new Error("Transfer response WAIT");if(4===n)throw new Error("Transfer response FAULT");if(8===n)throw new Error("Transfer response PROTOCOL_ERROR");if(16===n)throw new Error("Transfer response VALUE_MISMATCH");if(7===n)throw new Error("Transfer response NO_ACK");if("number"==typeof e)return t.getUint32(3,!0);var r=4*i.length;return new Uint32Array(t.buffer.slice(3,3+r))})},n.prototype.transferBlock=function(e,t,n){var r,i,o=u;"number"==typeof n?(r=n,i=2):(r=n.length,i=0,o+=n.byteLength);var a=new Uint8Array(o),s=new DataView(a.buffer);return s.setUint8(0,0),s.setUint16(1,r,!0),s.setUint8(3,e|i|t),"number"!=typeof n&&a.set(n,u),this.send(6,s).then(function(e){if(e.getUint16(1,!0)!==r)throw new Error("Transfer count mismatch");var t=e.getUint8(3);if(2&t)throw new Error("Transfer response WAIT");if(4&t)throw new Error("Transfer response FAULT");if(8&t)throw new Error("Transfer response PROTOCOL_ERROR");if(7&t)throw new Error("Transfer response NO_ACK");if("number"==typeof n)return new Uint32Array(e.buffer.slice(4))})},n}(o.EventEmitter);t.CmsisDAP=c},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var u=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,u,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),u=o[t]),void 0===u)u=o[t]=n,++e._eventsCount;else if("function"==typeof u?u=o[t]=r?[n,u]:[u,n]:r?u.unshift(n):u.push(n),(i=c(e))>0&&u.length>i&&!u.warned){u.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=u.length,a=s,console&&console.warn&&console.warn(a)}return e}function l(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,o(this.listener,this.target,e))}.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):d(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||u(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||u(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var u;if(t.length>0&&(u=t[0]),u instanceof Error)throw u;var a=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw a.context=u,a}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)o(s,this,t);else{var c=s.length,f=d(s,c);for(n=0;n<c;++n)o(f[n],this,t)}return!0},a.prototype.addListener=function(e,t){return f(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return f(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,l(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,l(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,o,u;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){u=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,u||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=1,i=255,o=function(){function e(e,t,n){void 0===t&&(t=i),void 0===n&&(n=r),this.device=e,this.interfaceClass=t,this.configuration=n,this.packetSize=64}return e.prototype.extendBuffer=function(e,t){var n=void 0!==e.buffer?e.buffer:e,r=Math.min(n.byteLength,t),i=new Uint8Array(r);return i.set(new Uint8Array(n)),i},e.prototype.open=function(){var e=this;return this.device.open().then(function(){return e.device.selectConfiguration(e.configuration)}).then(function(){var t=e.device.configuration.interfaces.filter(function(t){return t.alternates[0].interfaceClass===e.interfaceClass});if(!t.length)throw new Error("No valid interfaces found.");return e.interfaceNumber=t[0].interfaceNumber,e.device.claimInterface(e.interfaceNumber)})},e.prototype.close=function(){return this.device.close()},e.prototype.read=function(){return this.interfaceNumber?this.device.controlTransferIn({requestType:"class",recipient:"interface",request:1,value:256,index:this.interfaceNumber},this.packetSize).then(function(e){return e.data}):Promise.reject("No device opened")},e.prototype.write=function(e){if(!this.interfaceNumber)return Promise.reject("No device opened");var t=this.extendBuffer(e,this.packetSize);return this.device.controlTransferOut({requestType:"class",recipient:"interface",request:9,value:512,index:this.interfaceNumber},t).then(function(){})},e}();t.WebUSB=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7),o=n(8),u=n(2),a=n(28),s=n(3);t.SerialHandler=class{constructor(e,t,n=115200){this.targetDevice=e,this.baud=n,this.hubVariables=t,this.packetCount=0,this.isPaused=!1,this.setupSerialHandler()}write(e){return r(this,void 0,void 0,function*(){this.targetDevice.stopSerialRead(),this.pause(),yield this.sendSerialPacket(e),this.play(),this.targetDevice.startSerialRead(this.hubVariables.serial_delay)})}setupSerialHandler(){return r(this,void 0,void 0,function*(){this.targetDevice.on(i.DAPLink.EVENT_SERIAL_DATA,e=>r(this,void 0,void 0,function*(){if(this.isPaused)return;if(-1===e.search(String.fromCharCode(o.SlipChar.SLIP_END))||0!==e.charCodeAt(0))return;let t,n="";for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r===o.SlipChar.SLIP_END){n+=String.fromCharCode(r);break}if(r!==o.SlipChar.SLIP_ESC)n+=String.fromCharCode(r);else{let i=e.charCodeAt(t+1);i===o.SlipChar.SLIP_ESC_END?n+=String.fromCharCode(o.SlipChar.SLIP_END):i===o.SlipChar.SLIP_ESC_ESC?n+=String.fromCharCode(o.SlipChar.SLIP_ESC):(n+=String.fromCharCode(r),n+=String.fromCharCode(i)),t+=1}}this.packetCount++,u.debug(`Packet count: ${this.packetCount}`,u.DebugType.DEBUG);try{let e=new a.RequestHandler(this.hubVariables);if(t=o.SerialPacket.dataToSerialPacket(n),s.DEBUG){console.log("Input Packet: ");let e=[];for(let t=0;t<n.length;t++)e.push(n.charCodeAt(t));console.log(n),console.log(e),console.log(t)}let r=yield e.handleRequest(t);r.setRequestBit(o.RequestStatus.REQUEST_STATUS_OK),yield this.write(r)}catch(e){u.debug(`${e}`,u.DebugType.ERROR);let n=new o.SerialPacket(t.getAppID(),t.getNamespaceID(),t.getUID(),t.getReqRes());n.clearAndError(e),yield this.write(n)}}))})}sendSerialPacket(e){return r(this,void 0,void 0,function*(){s.DEBUG&&(console.log("Output Packet"),console.log(e),console.log(e.getFormattedPacket()));let t=String.fromCharCode(...e.getFormattedPacket());try{return yield this.targetDevice.serialWrite(t)}catch(e){console.log(e)}})}sendSadFace(){let e=new o.SerialPacket(0,0,0,o.RequestType.REQUEST_TYPE_HELLO);e.append(-1),this.write(e)}sendHappyFace(){let e=new o.SerialPacket(0,0,0,o.RequestType.REQUEST_TYPE_HELLO);e.append(0),this.write(e)}pause(){this.isPaused=!0}play(){this.isPaused=!1}}},function(e,t,n){(function(t){e.exports=new
/*!
* Copyright 2008 Fair Oaks Labs, Inc.
* All rights reserved.
*/
function(){var e,n=!1,r=this;r._DeArray=function(e,t,n){return[e.slice(t,t+n)]},r._EnArray=function(e,t,n,r){for(var i=0;i<n;e[t+i]=r[i]?r[i]:0,i++);},r._DeChar=function(e,t){return String.fromCharCode(e[t])},r._EnChar=function(e,t,n){e[t]=n.charCodeAt(0)},r._DeInt=function(t,r){var i,o,u,a=n?e.len-1:0,s=n?-1:1,c=a+s*e.len;for(i=0,o=a,u=1;o!=c;i+=t[r+o]*u,o+=s,u*=256);return e.bSigned&&i&Math.pow(2,8*e.len-1)&&(i-=Math.pow(2,8*e.len)),i},r._EnInt=function(t,r,i){var o,u=n?e.len-1:0,a=n?-1:1,s=u+a*e.len;for(i=i<e.min?e.min:i>e.max?e.max:i,o=u;o!=s;t[r+o]=255&i,o+=a,i>>=8);},r._DeString=function(e,t,n){for(var r=new Array(n),i=0;i<n;r[i]=String.fromCharCode(e[t+i]),i++);return r.join("")},r._EnString=function(e,t,n,r){for(var i,o=0;o<n;e[t+o]=(i=r.charCodeAt(o))?i:0,o++);},r._DeNullString=function(e,t,n,i){var o=r._DeString(e,t,n,i);return o.substring(0,o.length-1)},r._De754=function(t,r){var i,o,u,a,s,c,f,l,p,h;for(f=e.mLen,p=(h=(1<<(l=8*e.len-e.mLen-1))-1)>>1,a=n?0:e.len-1,s=n?1:-1,i=t[r+a],a+=s,o=i&(1<<-(c=-7))-1,i>>=-c,c+=l;c>0;o=256*o+t[r+a],a+=s,c-=8);for(u=o&(1<<-c)-1,o>>=-c,c+=f;c>0;u=256*u+t[r+a],a+=s,c-=8);switch(o){case 0:o=1-p;break;case h:return u?NaN:1/0*(i?-1:1);default:u+=Math.pow(2,f),o-=p}return(i?-1:1)*u*Math.pow(2,o-f)},r._En754=function(t,r,i){var o,u,a,s,c,f,l,p,h,d;for(l=e.mLen,h=(d=(1<<(p=8*e.len-e.mLen-1))-1)>>1,o=i<0?1:0,i=Math.abs(i),isNaN(i)||i==1/0?(a=isNaN(i)?1:0,u=d):(u=Math.floor(Math.log(i)/Math.LN2),i*(f=Math.pow(2,-u))<1&&(u--,f*=2),(i+=u+h>=1?e.rt/f:e.rt*Math.pow(2,1-h))*f>=2&&(u++,f/=2),u+h>=d?(a=0,u=d):u+h>=1?(a=(i*f-1)*Math.pow(2,l),u+=h):(a=i*Math.pow(2,h-1)*Math.pow(2,l),u=0)),s=n?e.len-1:0,c=n?-1:1;l>=8;t[r+s]=255&a,s+=c,a/=256,l-=8);for(u=u<<l|a,p+=l;p>0;t[r+s]=255&u,s+=c,u/=256,p-=8);t[r+s-c]|=128*o},r._sPattern="(\\d+)?([AxcbBhHsSfdiIlL])(\\(([a-zA-Z0-9]+)\\))?",r._lenLut={A:1,x:1,c:1,b:1,B:1,h:2,H:2,s:1,S:1,f:4,d:8,i:4,I:4,l:4,L:4},r._elLut={A:{en:r._EnArray,de:r._DeArray},s:{en:r._EnString,de:r._DeString},S:{en:r._EnString,de:r._DeNullString},c:{en:r._EnChar,de:r._DeChar},b:{en:r._EnInt,de:r._DeInt,len:1,bSigned:!0,min:-Math.pow(2,7),max:Math.pow(2,7)-1},B:{en:r._EnInt,de:r._DeInt,len:1,bSigned:!1,min:0,max:Math.pow(2,8)-1},h:{en:r._EnInt,de:r._DeInt,len:2,bSigned:!0,min:-Math.pow(2,15),max:Math.pow(2,15)-1},H:{en:r._EnInt,de:r._DeInt,len:2,bSigned:!1,min:0,max:Math.pow(2,16)-1},i:{en:r._EnInt,de:r._DeInt,len:4,bSigned:!0,min:-Math.pow(2,31),max:Math.pow(2,31)-1},I:{en:r._EnInt,de:r._DeInt,len:4,bSigned:!1,min:0,max:Math.pow(2,32)-1},l:{en:r._EnInt,de:r._DeInt,len:4,bSigned:!0,min:-Math.pow(2,31),max:Math.pow(2,31)-1},L:{en:r._EnInt,de:r._DeInt,len:4,bSigned:!1,min:0,max:Math.pow(2,32)-1},f:{en:r._En754,de:r._De754,len:4,mLen:23,rt:Math.pow(2,-24)-Math.pow(2,-77)},d:{en:r._En754,de:r._De754,len:8,mLen:52,rt:0}},r._UnpackSeries=function(t,n,r,i){for(var o=e.de,u=[],a=0;a<t;u.push(o(r,i+a*n)),a++);return u},r._PackSeries=function(t,n,r,i,o,u){for(var a=e.en,s=0;s<t;a(r,i+s*n,o[u+s]),s++);},r._zip=function(e,t){for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n},r.unpack=function(t,r,i){n="<"!=t.charAt(0),i=i||0;for(var o,u,a,s=new RegExp(this._sPattern,"g"),c=[],f=[];o=s.exec(t);){if(u=null==o[1]||""==o[1]?1:parseInt(o[1]),"S"===o[2]){for(u=0;0!==r[i+u];)u++;u++}if(i+u*(a=this._lenLut[o[2]])>r.length)return;switch(o[2]){case"A":case"s":case"S":f.push(this._elLut[o[2]].de(r,i,u));break;case"c":case"b":case"B":case"h":case"H":case"i":case"I":case"l":case"L":case"f":case"d":e=this._elLut[o[2]],f.push(this._UnpackSeries(u,a,r,i))}c.push(o[4]),i+=u*a}return f=Array.prototype.concat.apply([],f),-1!==c.indexOf(void 0)?f:this._zip(c,f)},r.packTo=function(t,r,i,o){n="<"!=t.charAt(0);for(var u,a,s,c,f=new RegExp(this._sPattern,"g"),l=0;u=f.exec(t);){if(a=null==u[1]||""==u[1]?1:parseInt(u[1]),"S"===u[2]&&(a=o[l].length+1),i+a*(s=this._lenLut[u[2]])>r.length)return!1;switch(u[2]){case"A":case"s":case"S":if(l+1>o.length)return!1;this._elLut[u[2]].en(r,i,a,o[l]),l+=1;break;case"c":case"b":case"B":case"h":case"H":case"i":case"I":case"l":case"L":case"f":case"d":if(e=this._elLut[u[2]],l+a>o.length)return!1;this._PackSeries(a,s,r,i,o,l),l+=a;break;case"x":for(c=0;c<a;c++)r[i+c]=0}i+=a*s}return r},r.pack=function(e,n){return this.packTo(e,new t(this.calcLength(e,n)),0,n)},r.calcLength=function(e,t){for(var n,r=new RegExp(this._sPattern,"g"),i=0,o=0;n=r.exec(e);){var u=(null==n[1]||""==n[1]?1:parseInt(n[1]))*this._lenLut[n[2]];"S"===n[2]&&(u=t[o].length+1),i+=u,o++}return i}}}).call(this,n(24).Buffer)},function(e,t,n){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var r=n(25),i=n(26),o=n(27);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(u()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=p(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|h(t.length);return 0===(e=a(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):p(e,t);if("Buffer"===t.type&&o(t.data))return p(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(f(t),e=a(e,t<0?0:0|h(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|h(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,u=1,a=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;u=2,a/=2,s/=2,n/=2}function c(e,t){return 1===u?e[t]:e.readUInt16BE(t*u)}if(i){var f=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===s)return f*u}else-1!==f&&(o-=o-f),f=-1}else for(n+s>a&&(n=a-s),o=n;o>=0;o--){for(var l=!0,p=0;p<s;p++)if(c(e,o+p)!==c(t,p)){l=!1;break}if(l)return o}return-1}function m(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u<r;++u){var a=parseInt(t.substr(2*u,2),16);if(isNaN(a))return u;e[n+u]=a}return u}function _(e,t,n,r){return F(q(t,e.length-n),e,n,r)}function w(e,t,n,r){return F(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function b(e,t,n,r){return w(e,t,n,r)}function E(e,t,n,r){return F(H(t),e,n,r)}function T(e,t,n,r){return F(function(e,t){for(var n,r,i,o=[],u=0;u<e.length&&!((t-=2)<0);++u)n=e.charCodeAt(u),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,u,a,s,c=e[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(s=(31&c)<<6|63&o)>127&&(f=s);break;case 3:o=e[i+1],u=e[i+2],128==(192&o)&&128==(192&u)&&(s=(15&c)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:o=e[i+1],u=e[i+2],a=e[i+3],128==(192&o)&&128==(192&u)&&128==(192&a)&&(s=(15&c)<<18|(63&o)<<12|(63&u)<<6|63&a)>65535&&s<1114112&&(f=s)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=S));return n}(r)}t.Buffer=s,t.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=u(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return c(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return function(e,t,n,r){return f(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},s.allocUnsafe=function(e){return l(null,e)},s.allocUnsafeSlow=function(e){return l(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var u=e[n];if(!s.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(r,i),i+=u.length}return r},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,r,i){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),u=(n>>>=0)-(t>>>=0),a=Math.min(o,u),c=this.slice(r,i),f=e.slice(t,n),l=0;l<a;++l)if(c[l]!==f[l]){o=c[l],u=f[l];break}return o<u?-1:u<o?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return m(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return b(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=M(e[o]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function U(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(e,t,n,r,o){return o||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function I(e,t,n,r,o){return o||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),s.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=s.prototype;else{var i=t-e;n=new s(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},s.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},s.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var o=0,u=1,a=0;for(this[t]=255&e;++o<n&&(u*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/u>>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var o=n-1,u=1,a=0;for(this[t+o]=255&e;--o>=0&&(u*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/u>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return k(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return k(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return I(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return I(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var u=s.isBuffer(e)?e:q(new s(e,r).toString()),a=u.length;for(o=0;o<n-t;++o)this[o+t]=u[o%a]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],u=0;u<r;++u){if((n=e.charCodeAt(u))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(u+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(9))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=c(e),r=n[0],u=n[1],a=new o(function(e,t,n){return 3*(t+n)/4-n}(0,r,u)),s=0,f=u>0?r-4:r,l=0;l<f;l+=4)t=i[e.charCodeAt(l)]<<18|i[e.charCodeAt(l+1)]<<12|i[e.charCodeAt(l+2)]<<6|i[e.charCodeAt(l+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;2===u&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,a[s++]=255&t);1===u&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t);return a},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],u=0,a=n-i;u<a;u+=16383)o.push(f(e,u,u+16383>a?a:u+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=u.length;a<s;++a)r[a]=u[a],i[u.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function f(e,t,n){for(var i,o,u=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),u.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return u.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,u,a=8*i-r-1,s=(1<<a)-1,c=s>>1,f=-7,l=n?i-1:0,p=n?-1:1,h=e[t+l];for(l+=p,o=h&(1<<-f)-1,h>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=p,f-=8);for(u=o&(1<<-f)-1,o>>=-f,f+=r;f>0;u=256*u+e[t+l],l+=p,f-=8);if(0===o)o=1-c;else{if(o===s)return u?NaN:1/0*(h?-1:1);u+=Math.pow(2,r),o-=c}return(h?-1:1)*u*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var u,a,s,c=8*o-i-1,f=(1<<c)-1,l=f>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=f):(u=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-u))<1&&(u--,s*=2),(t+=u+l>=1?p/s:p*Math.pow(2,1-l))*s>=2&&(u++,s/=2),u+l>=f?(a=0,u=f):u+l>=1?(a=(t*s-1)*Math.pow(2,i),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),u=0));i>=8;e[n+h]=255&a,h+=d,a/=256,i-=8);for(u=u<<i|a,c+=i;c>0;e[n+h]=255&u,h+=d,u/=256,c-=8);e[n+h-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=i(n(29)),a=n(8),s=n(2),c=o(n(1)),f=o(n(50)),l=o(n(52));t.RequestHandler=class{constructor(e){this.translations=e.translations.json,this.hub_variables=e}handleRequest(e){return r(this,void 0,void 0,function*(){return e.request_type===a.RequestType.REQUEST_TYPE_HELLO?yield this.handleHelloPacket(e):e.getReqRes()&(a.RequestType.REQUEST_TYPE_GET_REQUEST|a.RequestType.REQUEST_TYPE_POST_REQUEST)?yield this.handleRESTRequest(e):e.getReqRes()&a.RequestType.REQUEST_TYPE_CLOUD_VARIABLE?yield this.handleCloudVariable(e):e.getReqRes()&a.RequestType.REQUEST_TYPE_BROADCAST?yield this.handleBroadcast(e):new Promise((t,n)=>{n(`Unrecognised packet type (${e.getReqRes()})`)})})}mapQueryString(e,t){let n=t.split("/").filter(e=>e),r=e.split("/").filter(e=>e),i=r[0],o=new RegExp("%(.*)%"),u=[];u.service=i,r.shift(),i=r[0];for(let e of n){let t=o.exec(e)[1];if("?"==t[t.length-1]){if(""==i)break;t=t.substr(0,t.length-1)}u[t]=i,0!=r.length?(r.shift(),i=r[0]):i=""}return u}processRESTRequest(e,t,n,r){try{let i=n[r].microbitQueryString,o=this.mapQueryString(e.get(0),i);console.log(o);let u=n[r].baseURL;console.log(u);let a=o.endpoint?n[r].endpoint[o.endpoint]:{};console.log(a);let c,f=a.queryObject;null==f&&(f=[]);let l=new RegExp("%([^%]*)%","g"),p=u;for(;null!==(c=l.exec(u));){let e=c[1].split("?=");p=e[0]in f?p.replace(c[0],f[e[0]]):e.length>1?p.replace(c[0],e[1]):p.replace(c[0],"")}return s.debug(`Service: ${o.service.toUpperCase()}`,s.DebugType.DEBUG),this.temporaryTranslation(o,p,a,t,e,r)}catch(e){return console.log(e),new Promise((e,t)=>{t("REST REQUEST ERROR")})}}temporaryTranslation(e,t,n,r,i,o){return new Promise((a,s)=>{const p=this.hub_variables.credentials.school_id,h=this.hub_variables.credentials.pi_id;let d={"school-id":p,"pi-id":h,"Content-Type":"application/json","Access-Control-Allow-Origin":"*"};switch(e.service){case"share":if("fetchData"==e.endpoint)try{t+=e.unit,c.default.get(t,{headers:d}).then(e=>{let t=String(u.apply(n.jspath,e.data)[0]);r.append(t),a(r)}).catch(e=>{console.log("ERROR"+e),s("COULD NOT GET VARIABLE")})}catch(e){s("COULD NOT GET VARIABLE")}else if("shareData"==e.endpoint)try{let e={key:i.get(2),value:i.get(1),share_with:i.get(3)?"SCHOOL":"ALL"};c.default.post(`${t}${i.get(2)}`,e,{headers:d}).then(e=>{r.append("DATA SENT"),a(r)}).catch(e=>{s("COULD NOT SHARE DATA")})}catch(e){s("COULD NOT SHARE DATA")}else if("historicalData"==e.endpoint)try{let e={namespace:i.get(3),name:i.get(2),type:0,unit:i.get(4),value:Number(i.get(1))};c.default.post(`${t}`,e,{headers:d}).then(e=>{r.append("DATA SENT"),a(r)}).catch(e=>{s("COULD NOT SHARE DATA")})}catch(e){s("COULD NOT SHARE DATA")}break;case"iot":let g={value:null};if("POST"==o)try{t=t.replace("^device^",i.get(1)),"bulbState"==e.endpoint||"switchState"==e.endpoint?g.value=0==i.get(2)?"off":"on":g.value=String(i.get(2)),c.default.post(t,g,{headers:d}).then(e=>{r.append(g.value),a(r)}).catch(e=>{console.log(e.response),404==e.response.status?s("DEVICE NOT FOUND"):s("COULD NOT REACH DEVICE")})}catch(e){s("COULD NOT REACH DEVICE")}else if("GET"==o)try{t=t.replace("^device^",e.device),console.log(t),console.log(e),c.default.get(`${t}`,{headers:d}).then(e=>{console.log(e);let t=String(u.apply(n.jspath,e.data)[0]);r.append(t),a(r)}).catch(e=>{console.log("ERROR"+e),s("COULD NOT GET VARIABLE")})}catch(e){s("COULD NOT REACH DEVICE")}break;case"energy":try{let i=new Date,o=new Date;if("energyLevel"==e.endpoint&&(0==e.unit?t+="energy_type=ELECTRICITY":1==e.unit?t+="energy_type=GAS":2==e.unit&&(t+="energy_type=SOLAR")),"local"==e.location?t+="&location_uid="+this.hub_variables.credentials.school_id:t+="&location_uid="+e.location,"historical"==e.type){switch(e.period){case"hour":i.setHours(i.getHours()-e.amount);break;case"day":i.setDate(i.getDate()-e.amount);break;case"week":i.setDate(i.getDate()-7*e.amount);break;case"month":i.setMonth(i.getMonth()-e.amount)}t+=`&from=${f.default({date:i})}&to=${f.default({date:o})}`}c.default.get(encodeURI(t),{headers:d}).then(e=>{console.log(e);let t=String(u.apply(n.jspath,e.data)[0]);r.append(t),a(r)}).catch(e=>{console.log("ERROR"+e),s("COULD NOT GET ENERGY USAGE")})}catch(e){console.log(e),s("COULD NOT GET ENERGY USAGE")}break;case"energyMeter":try{let e={namespace:n.queryObject.namespace,name:i.get(1),type:i.get(3),unit:n.queryObject.unit,value:Number(i.get(2))};console.log(e),c.default.post(`${t}`,e,{headers:d}).then(e=>{r.append("DATA SENT"),a(r)}).catch(e=>{console.log(e),s("COULD NOT SHARE DATA")})}catch(e){s("COULD NOT SHARE DATA")}break;case"weather":const v=new l.default(p,h),y=i.get(0),m=i.get(2),_={[0===i.get(1)?"city":"postal_code"]:m};let w=v.getCurrentWeather;"/weather/forecastTomorrow/"===y&&(w=v.getTomorrowWeather),w(_).then(e=>{if("/weather/temperature/"===y)r.append(e.temperature.average.toString());else if("/weather/wind/"===y){const t=e.wind.degree&&this.degToCompass(e.wind.degree);r.append(t)}else"/weather/forecastNow/"!==y&&"/weather/forecastTomorrow/"!==y||r.append(e.detailed_status);a(r)}).catch(()=>{s("NOT AVAILABLE")});case"carbon":if("index"==e.endpoint)try{c.default.get(`${t}`).then(e=>{console.log(e);let t=String(u.apply(n.jspath,e.data)[0]);r.append(t),a(r)}).catch(e=>{s("COULD NOT GET DATA")})}catch(e){s("COULD NOT GET DATA")}else if("value"==e.endpoint)try{c.default.get(`${t}`).then(e=>{console.log(e);let t=String(u.apply(n.jspath,e.data)[0]);r.append(t),a(r)}).catch(e=>{s("COULD NOT GET DATA")})}catch(e){s("COULD NOT GET DATA")}else if("genmix"==e.endpoint)try{c.default.get(`${t}`).then(t=>{console.log(t);let i=String(u.apply(n.jspath.replace("%unit%",e.unit),t.data)[0]);console.log(i),r.append(i),a(r)}).catch(e=>{s("COULD NOT GET DATA")})}catch(e){s("COULD NOT GET DATA")}break;default:s(`UNKNOWN SERVICE ${e.service}`)}})}handleRESTRequest(e){s.debug("REST REQUEST PACKET",s.DebugType.DEBUG);try{let t=new a.SerialPacket(e.getAppID(),e.getNamespaceID(),e.getUID()),n=e.get(0).split("/").filter(e=>e),r=n[0];if(n.shift(),!(r in this.translations))return new Promise((e,t)=>{t(`INVALID SERVICE (${r})`)});let i,o=this.translations[r];if(e.getReqRes()&a.RequestType.REQUEST_TYPE_GET_REQUEST)i="GET",t.request_type|=a.RequestType.REQUEST_TYPE_GET_REQUEST;else{if(!(e.getReqRes()&a.RequestType.REQUEST_TYPE_POST_REQUEST))return new Promise((e,t)=>{t("INVALID REQUEST TYPE")});i="POST",t.request_type|=a.RequestType.REQUEST_TYPE_POST_REQUEST}return this.processRESTRequest(e,t,o,i)}catch(e){return console.log(e),new Promise((e,t)=>{t("REST PACKET ERROR")})}}handleCloudVariable(e){return new Promise((e,t)=>{t("CLOUD UNIMPLEMENTED")})}handleBroadcast(e){return new Promise((e,t)=>{t("BROADCAST UNIMPLEMENTED")})}handleHelloPacket(e){return new Promise((t,n)=>{s.debug("HELLO PACKET",s.DebugType.DEBUG),s.debug(`School_ID: ${e.get(1)} hub_id: ${e.get(2)}`,s.DebugType.DEBUG);let r=new a.SerialPacket(e.getAppID(),e.getNamespaceID(),e.getUID());this.hub_variables.authenticated?n("ALREADY AUTHENTICATED"):e.get(1)?e.get(1)?(this.hub_variables.credentials.school_id=e.get(1),this.hub_variables.credentials.pi_id=e.get(2),this.hub_variables.authenticated=!0,r.setRequestBit(a.RequestType.REQUEST_TYPE_HELLO),r.setRequestBit(a.RequestStatus.REQUEST_STATUS_OK),r.append(0),t(r)):n("BAD HUB ID"):n("BAD SCHOOL ID")})}static processGETRequest(e,t){return c.default.get(e,t)}processPOSTRequest(e,t){return new Promise((e,t)=>{t("")})}degToCompass(e){return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.floor(e/22.5+.5)%16]}}},function(e,t,n){e.exports=n(30)},function(e,t,n){"use strict";var r;!function(){var i={PATH:1,SELECTOR:2,OBJ_PRED:3,POS_PRED:4,LOGICAL_EXPR:5,COMPARISON_EXPR:6,MATH_EXPR:7,CONCAT_EXPR:8,UNARY_EXPR:9,POS_EXPR:10,LITERAL:11},o=function(){var e,t,n,r,o={ID:1,NUM:2,STR:3,BOOL:4,NULL:5,PUNCT:6,EOP:7},u={UNEXP_TOKEN:'Unexpected token "%0"',UNEXP_EOP:"Unexpected end of path"};function a(){for(var e,t=s();y("|");)x(),(e||(e=[t])).push(s());return e?{type:i.CONCAT_EXPR,args:e}:t}function s(){return y("(")?c():l()}function c(){b("(");var e=a();b(")");for(var t,n=[];t=f();)n.push(t);return n.length?e.type===i.PATH?(e.parts=e.parts.concat(n),e):(n.unshift(e),{type:i.PATH,parts:n}):e}function f(){return y("[")?function(){b("[");var e=function(){if(y(":"))return x(),{type:i.POS_EXPR,toIdx:v()};var e=v();if(y(":"))return x(),y("]")?{type:i.POS_EXPR,fromIdx:e}:{type:i.POS_EXPR,fromIdx:e,toIdx:v()};return{type:i.POS_EXPR,idx:e}}();return b("]"),{type:i.POS_PRED,arg:e}}():y("{")?function(){b("{");var e=p();return b("}"),{type:i.OBJ_PRED,arg:e}}():y("(")?c():void 0}function l(){m()||C(x());var e,t=!1;y("^")?(x(),t=!0):w()&&(e=x().val.substr(1));for(var n,r=[];n=_()?function(){var e,t=x().val,n=E();(y("*")||n.type===o.ID||n.type===o.STR)&&(e=x().val);return{type:i.SELECTOR,selector:t,prop:e}}():f();)r.push(n);return{type:i.PATH,fromRoot:t,subst:e,parts:r}}function p(){for(var e,t=h();y("||");)x(),(e||(e=[t])).push(h());return e?{type:i.LOGICAL_EXPR,op:"||",args:e}:t}function h(){for(var e,t=d();y("&&");)x(),(e||(e=[t])).push(d());return e?{type:i.LOGICAL_EXPR,op:"&&",args:e}:t}function d(){for(var e=function e(){var t=function(){var e=g();for(;y("+")||y("-");)e={type:i.MATH_EXPR,op:x().val,args:[e,g()]};return e}();for(;y("<")||y(">")||y("<=")||y(">=");)t={type:i.COMPARISON_EXPR,op:x().val,args:[t,e()]};return t}();y("==")||y("!=")||y("===")||y("!==")||y("^==")||y("==^")||y("^=")||y("=^")||y("$==")||y("==$")||y("$=")||y("=$")||y("*==")||y("==*")||y("*=")||y("=*");)e={type:i.COMPARISON_EXPR,op:x().val,args:[e,d()]};return e}function g(){for(var e=v();y("*")||y("/")||y("%");)e={type:i.MATH_EXPR,op:x().val,args:[e,g()]};return e}function v(){return y("!")||y("-")?{type:i.UNARY_EXPR,op:x().val,arg:v()}:function(){var e=E().type;if(e===o.STR||e===o.NUM||e===o.BOOL||e===o.NULL)return{type:i.LITERAL,val:x().val};if(m())return l();if(y("("))return function(){b("(");var e=p();return b(")"),e}();return C(x())}()}function y(e){var t=E();return t.type===o.PUNCT&&t.val===e}function m(){return _()||w()||y("^")}function _(){var e=E();if(e.type===o.PUNCT){var t=e.val;return"."===t||".."===t}return!1}function w(){var e=E();return e.type===o.ID&&"$"===e.val[0]}function b(e){var t=x();t.type===o.PUNCT&&t.val===e||C(t)}function E(){if(null!==n)return n;var e=t;return n=T(),t=e,n}function T(){for(;n=e[t]," \r\n\t".indexOf(n)>-1;)++t;var n;if(t>=r)return{type:o.EOP,range:[t,t]};var i=function(){var n=t,r=e[t],i=e[t+1];if("."===r){if(A(i))return;return"."===e[++t]?{type:o.PUNCT,val:"..",range:[n,++t]}:{type:o.PUNCT,val:".",range:[n,t]}}if("="===i){var u=e[t+2];if("="===u){if("=!^$*".indexOf(r)>=0)return{type:o.PUNCT,val:r+i+u,range:[n,t+=3]}}else if("^$*".indexOf(u)>=0){if("="===r)return{type:o.PUNCT,val:r+i+u,range:[n,t+=3]}}else if("=!^$*><".indexOf(r)>=0)return{type:o.PUNCT,val:r+i,range:[n,t+=2]}}else if("="===r&&"^$*".indexOf(i)>=0)return{type:o.PUNCT,val:r+i,range:[n,t+=2]};if(r===i&&("|"===r||"&"===r))return{type:o.PUNCT,val:r+i,range:[n,t+=2]};if(":{}()[]^+-*/%!><|".indexOf(r)>=0)return{type:o.PUNCT,val:r,range:[n,++t]}}();if(i||(i=function(){var n=e[t];if(!S(n))return;var i=t,u=n;for(;++t<r&&R(n=e[t]);)u+=n;switch(u){case"true":case"false":return{type:o.BOOL,val:"true"===u,range:[i,t]};case"null":return{type:o.NULL,val:null,range:[i,t]};default:return{type:o.ID,val:u,range:[i,t]}}}())||(i=function(){if('"'!==e[t]&&"'"!==e[t])return;var n,i=e[t],u=++t,a="",s=!1;for(;t<r;){if("\\"===(n=e[t++]))n=e[t++];else if(('"'===n||"'"===n)&&n===i){s=!0;break}a+=n}if(s)return{type:o.STR,val:a,range:[u,t]}}())||(i=function(){var n=t,i=e[t],u="."===i;if(u||A(i)){for(var a=i;++t<r;){if("."===(i=e[t])){if(u)return;u=!0}else if(!A(i))break;a+=i}return{type:o.NUM,val:u?parseFloat(a):parseInt(a,10),range:[n,t]}}}()))return i;i={range:[t,t]},t>=r?i.type=o.EOP:i.val=e[t],C(i)}function x(){var e;return n?(t=n.range[1],e=n,n=null,e):T()}function A(e){return"0123456789".indexOf(e)>=0}function S(e){return"$"===e||"@"===e||"_"===e||e>="a"&&e<="z"||e>="A"&&e<="Z"}function R(e){return S(e)||e>="0"&&e<="9"}function C(e){e.type===o.EOP&&P(e,u.UNEXP_EOP),P(e,u.UNEXP_TOKEN,e.val)}function P(e,t){var n=Array.prototype.slice.call(arguments,2),r=t.replace(/%(\d)/g,function(e,t){return n[t]||""}),i=new Error(r);throw i.column=e.range[0],i}return function(i){e=i.split(""),t=0,n=null,r=e.length;var u=a(),s=x();return s.type!==o.EOP&&C(s),u}}(),u=function(){var e,t,n,r;function o(){if(r.length)return r.shift();var e="v"+ ++n;return t.push(e),e}function u(){for(var e=arguments,t=e.length;t--;)r.push(e[t])}function a(t,n,r){if(t.prop){var i=d(t.prop),a=o(),s=o(),c=o(),f=o(),l=o(),p=o(),h=o();e.push(a,"= [];",s,"= 0;",c,"=",r,".length;",h,"= [];","while(",s,"<",c,") {",f,"=",r,"[",s,"++];","if(",f,"!= null) {"),"*"===t.prop?(e.push("if(typeof ",f,'=== "object") {',"if(isArr(",f,")) {",a,"=",a,".concat(",f,");","}","else {","for(",l," in ",f,") {","if(",f,".hasOwnProperty(",l,")) {",p,"=",f,"[",l,"];"),g(a,p),e.push("}","}","}","}")):(e.push(p,"=",f,"[",i,"];"),g(a,p,h,c)),e.push("}","}",n,"=",c,"> 1 &&",h,".length?",h,".length > 1?","concat.apply(",a,",",h,") :",a,".concat(",h,"[0]) :",a,";"),u(a,s,c,f,l,p,h)}}function s(t,n,r){var i=t.prop,a=o(),s=o(),c=o(),f=o(),l=o(),p=o(),h=o(),d=o();e.push(a,"=",r,".slice(),",d,"= [];","while(",a,".length) {",s,"=",a,".shift();"),i?e.push("if(typeof ",s,'=== "object" &&',s,") {"):e.push("if(typeof ",s,"!= null) {"),e.push(c,"= [];","if(isArr(",s,")) {",f,"= 0,",h,"=",s,".length;","while(",f,"<",h,") {",p,"=",s,"[",f,"++];"),i&&e.push("if(typeof ",p,'=== "object") {'),g(c,p),i&&e.push("}"),e.push("}","}","else {"),i?"*"!==i&&(e.push(p,"=",s,'["'+i+'"];'),g(d,p)):(g(d,s),e.push("if(typeof ",s,'=== "object") {')),e.push("for(",l," in ",s,") {","if(",s,".hasOwnProperty(",l,")) {",p,"=",s,"[",l,"];"),g(c,p),"*"===i&&g(d,p),e.push("}","}"),i||e.push("}"),e.push("}",c,".length &&",a,".unshift.apply(",a,",",c,");","}","}",n,"=",d,";"),u(a,s,c,f,l,p,h,d)}function c(t,n,r){var i=o(),a=o(),s=o(),c=o(),f=o();e.push(i,"= [];",a,"= 0;",s,"=",r,".length;","while(",a,"<",s,") {",f,"=",r,"[",a,"++];"),l(t.arg,c,f),e.push(y(t.arg,c),"&&",i,".push(",f,");","}",n,"=",i,";"),u(i,a,s,f,c)}function f(t,n,r){var i,a,s=t.arg;if(s.idx){var c=o();return l(s.idx,c,r),e.push(c,"< 0 && (",c,"=",r,".length +",c,");",n,"=",r,"[",c,"] == null? [] : [",r,"[",c,"]];"),u(c),!1}s.fromIdx?s.toIdx?(l(s.fromIdx,i=o(),r),l(s.toIdx,a=o(),r),e.push(n,"=",r,".slice(",i,",",a,");"),u(i,a)):(l(s.fromIdx,i=o(),r),e.push(n,"=",r,".slice(",i,");"),u(i)):(l(s.toIdx,a=o(),r),e.push(n,"=",r,".slice(0,",a,");"),u(a))}function l(t,n,r){switch(t.type){case i.PATH:!function(t,n,r){var o=t.parts,u=0,l=o.length;for(e.push(n,"=",t.fromRoot?"data":t.subst?"subst."+t.subst:r,";","isArr("+n+") || ("+n+" = ["+n+"]);");u<l;){var p=o[u++];switch(p.type){case i.SELECTOR:".."===p.selector?s(p,n,n):a(p,n,n);break;case i.OBJ_PRED:c(p,n,n);break;case i.POS_PRED:f(p,n,n);break;case i.CONCAT_EXPR:h(p,n,n)}}}(t,n,r);break;case i.CONCAT_EXPR:h(t,n,r);break;case i.COMPARISON_EXPR:!function(t,n,r){var a=o(),s=o(),c=o(),f=o(),h=o(),d=o(),g=o(),v=o(),y=t.args[0],m=t.args[1];e.push(n,"= false;"),l(y,a,r),l(m,s,r);var _=y.type===i.PATH,w=m.type===i.LITERAL;e.push(c,"="),_?e.push("true;"):e.push("isArr(",a,");"),e.push(f,"="),w?e.push("false;"):e.push("isArr(",s,");"),e.push("if("),_||e.push(c,"&&"),e.push(a,".length === 1) {",a,"=",a,"[0];",c,"= false;","}"),w||e.push("if(",f,"&&",s,".length === 1) {",s,"=",s,"[0];",f,"= false;","}"),e.push(h,"= 0;","if(",c,") {",g,"=",a,".length;"),w||(e.push("if(",f,") {",v,"=",s,".length;","while(",h,"<",g,"&& !",n,") {",d,"= 0;","while(",d,"<",v,") {"),p(t.op,[a,"[",h,"]"].join(""),[s,"[",d,"]"].join("")),e.push(n,"= true;","break;","}","++",d,";","}","++",h,";","}","}","else {"));e.push("while(",h,"<",g,") {"),p(t.op,[a,"[",h,"]"].join(""),s),e.push(n,"= true;","break;","}","++",h,";","}"),w||e.push("}"),e.push("}"),w||(e.push("else if(",f,") {",v,"=",s,".length;","while(",h,"<",v,") {"),p(t.op,a,[s,"[",h,"]"].join("")),e.push(n,"= true;","break;","}","++",h,";","}","}"));e.push("else {",n,"=",A[t.op](a,s),";","}"),u(a,s,c,f,h,d,g,v)}(t,n,r);break;case i.MATH_EXPR:!function(t,n,r){var i=o(),a=o(),s=t.args;l(s[0],i,r),l(s[1],a,r),e.push(n,"=",A[t.op](m(s[0],i),m(s[1],a)),";"),u(i,a)}(t,n,r);break;case i.LOGICAL_EXPR:!function(t,n,r){var i,a=[],s=t.args,c=s.length,f=0;switch(e.push(n,"= false;"),t.op){case"&&":for(;f<c;)a.push(i=o()),l(s[f],i,r),e.push("if(",y(s[f++],i),") {");e.push(n,"= true;");break;case"||":for(;f<c;)a.push(i=o()),l(s[f],i,r),e.push("if(",y(s[f],i),") {",n,"= true;","}"),1+f++<c&&e.push("else {");--c}for(;c--;)e.push("}");u.apply(null,a)}(t,n,r);break;case i.UNARY_EXPR:!function(t,n,r){var i=o(),a=t.arg;switch(l(a,i,r),t.op){case"!":e.push(n,"= !",y(a,i)+";");break;case"-":e.push(n,"= -",m(a,i)+";")}u(i)}(t,n,r);break;case i.LITERAL:e.push(n,"="),g=t.val,e.push("string"==typeof g?d(g):null===g?"null":g),e.push(";")}var g}function p(t,n,r){e.push("if(",A[t](n,r),") {")}function h(t,n,r){for(var i=[],a=t.args,s=a.length,c=0;c<s;)i.push(o()),l(a[c],i[c++],r);e.push(n,"= concat.call(",i.join(","),");"),u.apply(null,i)}function d(e){return"'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'"}function g(t,n,r,i){e.push("if(typeof ",n,'!== "undefined") {',"if(isArr(",n,")) {"),r&&(e.push(i,"> 1?"),v(r,n),e.push(":")),e.push(t,"=",t,".length?",t,".concat(",n,") :",n,".slice()",";","}","else {"),r&&e.push("if(",r,".length) {",t,"= concat.apply(",t,",",r,");",r,"= [];","}"),v(t,n),e.push(";","}","}")}function v(t,n){e.push(t,".length?",t,".push(",n,") :",t,"[0] =",n)}function y(e,t){switch(e.type){case i.LOGICAL_EXPR:return t;case i.LITERAL:return"!!"+t;case i.PATH:return t+".length > 0";default:return["(typeof ",t,'=== "boolean"?',t,":","isArr(",t,")?",t,".length > 0 : !!",t,")"].join("")}}function m(e,t){switch(e.type){case i.LITERAL:return t;case i.PATH:return t+"[0]";default:return["(isArr(",t,")?",t,"[0] : ",t,")"].join("")}}function _(e,t){return["typeof ",e,'=== "string" && typeof ',t,'=== "string" &&',e,".indexOf(",t,") === 0"].join("")}function w(e,t){return[e,"!= null &&",t,"!= null &&",e,".toString().toLowerCase().indexOf(",t,".toString().toLowerCase()) === 0"].join("")}function b(e,t){return["typeof ",e,'=== "string" && typeof ',t,'=== "string" &&',e,".length >=",t,".length &&",e,".lastIndexOf(",t,") ===",e,".length -",t,".length"].join("")}function E(e,t){return[e,"!= null &&",t,"!= null &&","(",e,"=",e,".toString()).length >=","(",t,"=",t,".toString()).length &&","(",e,".toLowerCase()).lastIndexOf(","(",t,".toLowerCase())) ===",e,".length -",t,".length"].join("")}function T(e,t){return["typeof ",e,'=== "string" && typeof ',t,'=== "string" &&',e,".indexOf(",t,") > -1"].join("")}function x(e,t){return[e,"!= null && ",t,"!= null &&",e,".toString().toLowerCase().indexOf(",t,".toString().toLowerCase()) > -1"].join("")}var A={"===":function(e,t){return e+"==="+t},"==":function(e,t){return["typeof ",e,'=== "string" && typeof ',t,'=== "string"?',e,".toLowerCase() ===",t,".toLowerCase() :"+e,"==",t].join("")},">=":function(e,t){return e+">="+t},">":function(e,t){return e+">"+t},"<=":function(e,t){return e+"<="+t},"<":function(e,t){return e+"<"+t},"!==":function(e,t){return e+"!=="+t},"!=":function(e,t){return e+"!="+t},"^==":_,"==^":function(e,t){return _(t,e)},"^=":w,"=^":function(e,t){return w(t,e)},"$==":b,"==$":function(e,t){return b(t,e)},"$=":E,"=$":function(e,t){return E(t,e)},"*==":T,"==*":function(e,t){return T(t,e)},"=*":function(e,t){return x(t,e)},"*=":x,"+":function(e,t){return e+"+"+t},"-":function(e,t){return e+"-"+t},"*":function(e,t){return e+"*"+t},"/":function(e,t){return e+"/"+t},"%":function(e,t){return e+"%"+t}};return function(o){if(e=[],t=["res"],n=0,r=[],l(o,"res","data"),e.unshift("var ",Array.isArray?"isArr = Array.isArray":'toStr = Object.prototype.toString, isArr = function(o) { return toStr.call(o) === "[object Array]"; }',", concat = Array.prototype.concat",",",t.join(","),";"),o.type===i.PATH){var u=o.parts[o.parts.length-1];u&&u.type===i.POS_PRED&&"idx"in u.arg&&e.push("res = res[0];")}return e.push("return res;"),e.join("")}}();function a(e){return Function("data,subst",u(o(e)))}var s={},c=[],f={cacheSize:100},l={cacheSize:function(e,t){if(t<e&&c.length>t)for(var n=c.splice(0,c.length-t),r=n.length;r--;)delete s[n[r]]}},p=function(e,t,n){return s[e]||(s[e]=a(e),c.push(e)>f.cacheSize&&delete s[c.shift()]),s[e](t,n||{})};p.version="0.3.4",p.params=function(e){if(!arguments.length)return f;for(var t in e)e.hasOwnProperty(t)&&(l[t]&&l[t](f[t],e[t]),f[t]=e[t])},p.compile=a,p.apply=p,"object"==typeof e.exports?e.exports=p:"object"==typeof modules?modules.define("jspath",function(e){e(p)}):void 0===(r=function(e,t,n){n.exports=p}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";var r=n(0),i=n(10),o=n(33),u=n(4);function a(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var s=a(u);s.Axios=o,s.create=function(e){return a(r.merge(u,e))},s.Cancel=n(14),s.CancelToken=n(48),s.isCancel=n(13),s.all=function(e){return Promise.all(e)},s.spread=n(49),e.exports=s,e.exports.default=s},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var r=n(4),i=n(0),o=n(43),u=n(44);function a(e){this.defaults=e,this.interceptors={request:new o,response:new o}}a.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(r,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[u,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){a.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){a.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=a},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var s,c=[],f=!1,l=-1;function p(){f&&s&&(f=!1,s.length?c=s.concat(c):l=-1,c.length&&h())}function h(){if(!f){var e=a(p);f=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||f||a(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(12);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e}},function(e,t,n){"use strict";var r=n(0);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var u=[];r.forEach(t,function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),u.push(i(t)+"="+i(e))}))}),o=u.join("&")}return o&&(e+=(-1===e.indexOf("?")?"?":"&")+o),e}},function(e,t,n){"use strict";var r=n(0),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,u={};return e?(r.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(u[t]&&i.indexOf(t)>=0)return;u[t]="set-cookie"===t?(u[t]?u[t]:[]).concat([n]):u[t]?u[t]+", "+n:n}}),u):u}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,n,o=String(e),u="",a=0,s=r;o.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&t>>8-a%1*8)){if((n=o.charCodeAt(a+=.75))>255)throw new i;t=t<<8|n}return u}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,u){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===u&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(0);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},function(e,t,n){"use strict";var r=n(0),i=n(45),o=n(13),u=n(4),a=n(46),s=n(47);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!a(e.url)&&(e.url=s(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||u.adapter)(e).then(function(t){return c(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return o(t)||(c(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(14);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";const r=n(51),i=e=>{e=Object.assign({date:new Date,local:!0,showTimeZone:!1,showMilliseconds:!1},e);let{date:t}=e;e.local&&(t=new Date(t.getTime()-6e4*t.getTimezoneOffset()));let n="";return e.showTimeZone&&(n=" UTC"+(e.local?r(t):"")),e.showMilliseconds&&t.getUTCMilliseconds()>0&&(n=` ${t.getUTCMilliseconds()}ms${n}`),t.toISOString().replace(/T/," ").replace(/\..+/,n)};e.exports=i,e.exports.default=i},function(e,t,n){"use strict";e.exports=e=>{const t=(e||new Date).getTimezoneOffset(),n=Math.abs(t),r=n%60;return(t<0?"+":"-")+Math.floor(n/60)+(r>0?":"+("0"+r).slice(-2):"")}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(1)),u=n(5);t.default=class extends u.AbstractHubAuthApiService{getCurrentWeather(e){return r(this,void 0,void 0,function*(){try{return(yield o.default.get("/micro-bit/weather/current/",{params:e})).data}catch(e){throw new Error(JSON.stringify(e.response.data))}})}getTomorrowWeather(e){return r(this,void 0,void 0,function*(){try{return(yield o.default.get("/micro-bit/weather/forecast/tomorrow/",{params:e})).data}catch(e){throw new Error(JSON.stringify(e.response.data))}})}}},function(e,t,n){(function(e,r){var i;
/**
* @license
* Lodash <https://lodash.com/>
* Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/(function(){var o,u=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",c="__lodash_hash_undefined__",f=500,l="__lodash_placeholder__",p=1,h=2,d=4,g=1,v=2,y=1,m=2,_=4,w=8,b=16,E=32,T=64,x=128,A=256,S=512,R=30,C="...",P=800,O=16,L=1,D=2,N=1/0,U=9007199254740991,j=1.7976931348623157e308,k=NaN,I=4294967295,B=I-1,M=I>>>1,q=[["ary",x],["bind",y],["bindKey",m],["curry",w],["curryRight",b],["flip",S],["partial",E],["partialRight",T],["rearg",A]],H="[object Arguments]",F="[object Array]",$="[object AsyncFunction]",W="[object Boolean]",Y="[object Date]",z="[object DOMException]",G="[object Error]",V="[object Function]",X="[object GeneratorFunction]",Q="[object Map]",K="[object Number]",J="[object Null]",Z="[object Object]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object Undefined]",ue="[object WeakMap]",ae="[object WeakSet]",se="[object ArrayBuffer]",ce="[object DataView]",fe="[object Float32Array]",le="[object Float64Array]",pe="[object Int8Array]",he="[object Int16Array]",de="[object Int32Array]",ge="[object Uint8Array]",ve="[object Uint8ClampedArray]",ye="[object Uint16Array]",me="[object Uint32Array]",_e=/\b__p \+= '';/g,we=/\b(__p \+=) '' \+/g,be=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ee=/&(?:amp|lt|gt|quot|#39);/g,Te=/[&<>"']/g,xe=RegExp(Ee.source),Ae=RegExp(Te.source),Se=/<%-([\s\S]+?)%>/g,Re=/<%([\s\S]+?)%>/g,Ce=/<%=([\s\S]+?)%>/g,Pe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oe=/^\w*$/,Le=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,De=/[\\^$.*+?()[\]{}|]/g,Ne=RegExp(De.source),Ue=/^\s+|\s+$/g,je=/^\s+/,ke=/\s+$/,Ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Be=/\{\n\/\* \[wrapped with (.+)\] \*/,Me=/,? & /,qe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,He=/\\(\\)?/g,Fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$e=/\w*$/,We=/^[-+]0x[0-9a-f]+$/i,Ye=/^0b[01]+$/i,ze=/^\[object .+?Constructor\]$/,Ge=/^0o[0-7]+$/i,Ve=/^(?:0|[1-9]\d*)$/,Xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,Ke=/['\n\r\u2028\u2029\\]/g,Je="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ze="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",et="[\\ud800-\\udfff]",tt="["+Ze+"]",nt="["+Je+"]",rt="\\d+",it="[\\u2700-\\u27bf]",ot="[a-z\\xdf-\\xf6\\xf8-\\xff]",ut="[^\\ud800-\\udfff"+Ze+rt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",at="\\ud83c[\\udffb-\\udfff]",st="[^\\ud800-\\udfff]",ct="(?:\\ud83c[\\udde6-\\uddff]){2}",ft="[\\ud800-\\udbff][\\udc00-\\udfff]",lt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",pt="(?:"+ot+"|"+ut+")",ht="(?:"+lt+"|"+ut+")",dt="(?:"+nt+"|"+at+")"+"?",gt="[\\ufe0e\\ufe0f]?"+dt+("(?:\\u200d(?:"+[st,ct,ft].join("|")+")[\\ufe0e\\ufe0f]?"+dt+")*"),vt="(?:"+[it,ct,ft].join("|")+")"+gt,yt="(?:"+[st+nt+"?",nt,ct,ft,et].join("|")+")",mt=RegExp("['’]","g"),_t=RegExp(nt,"g"),wt=RegExp(at+"(?="+at+")|"+yt+gt,"g"),bt=RegExp([lt+"?"+ot+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[tt,lt,"$"].join("|")+")",ht+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[tt,lt+pt,"$"].join("|")+")",lt+"?"+pt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rt,vt].join("|"),"g"),Et=RegExp("[\\u200d\\ud800-\\udfff"+Je+"\\ufe0e\\ufe0f]"),Tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],At=-1,St={};St[fe]=St[le]=St[pe]=St[he]=St[de]=St[ge]=St[ve]=St[ye]=St[me]=!0,St[H]=St[F]=St[se]=St[W]=St[ce]=St[Y]=St[G]=St[V]=St[Q]=St[K]=St[Z]=St[te]=St[ne]=St[re]=St[ue]=!1;var Rt={};Rt[H]=Rt[F]=Rt[se]=Rt[ce]=Rt[W]=Rt[Y]=Rt[fe]=Rt[le]=Rt[pe]=Rt[he]=Rt[de]=Rt[Q]=Rt[K]=Rt[Z]=Rt[te]=Rt[ne]=Rt[re]=Rt[ie]=Rt[ge]=Rt[ve]=Rt[ye]=Rt[me]=!0,Rt[G]=Rt[V]=Rt[ue]=!1;var Ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pt=parseFloat,Ot=parseInt,Lt="object"==typeof e&&e&&e.Object===Object&&e,Dt="object"==typeof self&&self&&self.Object===Object&&self,Nt=Lt||Dt||Function("return this")(),Ut=t&&!t.nodeType&&t,jt=Ut&&"object"==typeof r&&r&&!r.nodeType&&r,kt=jt&&jt.exports===Ut,It=kt&&Lt.process,Bt=function(){try{var e=jt&&jt.require&&jt.require("util").types;return e||It&&It.binding&&It.binding("util")}catch(e){}}(),Mt=Bt&&Bt.isArrayBuffer,qt=Bt&&Bt.isDate,Ht=Bt&&Bt.isMap,Ft=Bt&&Bt.isRegExp,$t=Bt&&Bt.isSet,Wt=Bt&&Bt.isTypedArray;function Yt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function zt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var u=e[i];t(r,u,n(u),e)}return r}function Gt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Vt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Xt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Qt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var u=e[n];t(u,n,e)&&(o[i++]=u)}return o}function Kt(e,t){return!!(null==e?0:e.length)&&sn(e,t,0)>-1}function Jt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Zt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function en(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function tn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function nn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function rn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var on=pn("length");function un(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function an(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function sn(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):an(e,fn,n)}function cn(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function fn(e){return e!=e}function ln(e,t){var n=null==e?0:e.length;return n?gn(e,t)/n:k}function pn(e){return function(t){return null==t?o:t[e]}}function hn(e){return function(t){return null==e?o:e[t]}}function dn(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function gn(e,t){for(var n,r=-1,i=e.length;++r<i;){var u=t(e[r]);u!==o&&(n=n===o?u:n+u)}return n}function vn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function yn(e){return function(t){return e(t)}}function mn(e,t){return Zt(t,function(t){return e[t]})}function _n(e,t){return e.has(t)}function wn(e,t){for(var n=-1,r=e.length;++n<r&&sn(t,e[n],0)>-1;);return n}function bn(e,t){for(var n=e.length;n--&&sn(t,e[n],0)>-1;);return n}var En=hn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Tn=hn({"&":"&","<":"<",">":">",'"':""","'":"'"});function xn(e){return"\\"+Ct[e]}function An(e){return Et.test(e)}function Sn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Rn(e,t){return function(n){return e(t(n))}}function Cn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var u=e[n];u!==t&&u!==l||(e[n]=l,o[i++]=n)}return o}function Pn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function On(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function Ln(e){return An(e)?function(e){var t=wt.lastIndex=0;for(;wt.test(e);)++t;return t}(e):on(e)}function Dn(e){return An(e)?function(e){return e.match(wt)||[]}(e):function(e){return e.split("")}(e)}var Nn=hn({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Un=function e(t){var n,r=(t=null==t?Nt:Un.defaults(Nt.Object(),t,Un.pick(Nt,xt))).Array,i=t.Date,Je=t.Error,Ze=t.Function,et=t.Math,tt=t.Object,nt=t.RegExp,rt=t.String,it=t.TypeError,ot=r.prototype,ut=Ze.prototype,at=tt.prototype,st=t["__core-js_shared__"],ct=ut.toString,ft=at.hasOwnProperty,lt=0,pt=(n=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",ht=at.toString,dt=ct.call(tt),gt=Nt._,vt=nt("^"+ct.call(ft).replace(De,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yt=kt?t.Buffer:o,wt=t.Symbol,Et=t.Uint8Array,Ct=yt?yt.allocUnsafe:o,Lt=Rn(tt.getPrototypeOf,tt),Dt=tt.create,Ut=at.propertyIsEnumerable,jt=ot.splice,It=wt?wt.isConcatSpreadable:o,Bt=wt?wt.iterator:o,on=wt?wt.toStringTag:o,hn=function(){try{var e=Mo(tt,"defineProperty");return e({},"",{}),e}catch(e){}}(),jn=t.clearTimeout!==Nt.clearTimeout&&t.clearTimeout,kn=i&&i.now!==Nt.Date.now&&i.now,In=t.setTimeout!==Nt.setTimeout&&t.setTimeout,Bn=et.ceil,Mn=et.floor,qn=tt.getOwnPropertySymbols,Hn=yt?yt.isBuffer:o,Fn=t.isFinite,$n=ot.join,Wn=Rn(tt.keys,tt),Yn=et.max,zn=et.min,Gn=i.now,Vn=t.parseInt,Xn=et.random,Qn=ot.reverse,Kn=Mo(t,"DataView"),Jn=Mo(t,"Map"),Zn=Mo(t,"Promise"),er=Mo(t,"Set"),tr=Mo(t,"WeakMap"),nr=Mo(tt,"create"),rr=tr&&new tr,ir={},or=lu(Kn),ur=lu(Jn),ar=lu(Zn),sr=lu(er),cr=lu(tr),fr=wt?wt.prototype:o,lr=fr?fr.valueOf:o,pr=fr?fr.toString:o;function hr(e){if(Ca(e)&&!ya(e)&&!(e instanceof yr)){if(e instanceof vr)return e;if(ft.call(e,"__wrapped__"))return pu(e)}return new vr(e)}var dr=function(){function e(){}return function(t){if(!Ra(t))return{};if(Dt)return Dt(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function gr(){}function vr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function yr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=I,this.__views__=[]}function mr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function wr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function br(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new wr;++t<n;)this.add(e[t])}function Er(e){var t=this.__data__=new _r(e);this.size=t.size}function Tr(e,t){var n=ya(e),r=!n&&va(e),i=!n&&!r&&ba(e),o=!n&&!r&&!i&&ka(e),u=n||r||i||o,a=u?vn(e.length,rt):[],s=a.length;for(var c in e)!t&&!ft.call(e,c)||u&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||zo(c,s))||a.push(c);return a}function xr(e){var t=e.length;return t?e[bi(0,t-1)]:o}function Ar(e,t){return su(no(e),Ur(t,0,e.length))}function Sr(e){return su(no(e))}function Rr(e,t,n){(n===o||ha(e[t],n))&&(n!==o||t in e)||Dr(e,t,n)}function Cr(e,t,n){var r=e[t];ft.call(e,t)&&ha(r,n)&&(n!==o||t in e)||Dr(e,t,n)}function Pr(e,t){for(var n=e.length;n--;)if(ha(e[n][0],t))return n;return-1}function Or(e,t,n,r){return Mr(e,function(e,i,o){t(r,e,n(e),o)}),r}function Lr(e,t){return e&&ro(t,is(t),e)}function Dr(e,t,n){"__proto__"==t&&hn?hn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Nr(e,t){for(var n=-1,i=t.length,u=r(i),a=null==e;++n<i;)u[n]=a?o:Za(e,t[n]);return u}function Ur(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function jr(e,t,n,r,i,u){var a,s=t&p,c=t&h,f=t&d;if(n&&(a=i?n(e,r,i,u):n(e)),a!==o)return a;if(!Ra(e))return e;var l=ya(e);if(l){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ft.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return no(e,a)}else{var g=Fo(e),v=g==V||g==X;if(ba(e))return Qi(e,s);if(g==Z||g==H||v&&!i){if(a=c||v?{}:Wo(e),!s)return c?function(e,t){return ro(e,Ho(e),t)}(e,function(e,t){return e&&ro(t,os(t),e)}(a,e)):function(e,t){return ro(e,qo(e),t)}(e,Lr(a,e))}else{if(!Rt[g])return i?e:{};a=function(e,t,n){var r,i=e.constructor;switch(t){case se:return Ki(e);case W:case Y:return new i(+e);case ce:return function(e,t){var n=t?Ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case fe:case le:case pe:case he:case de:case ge:case ve:case ye:case me:return Ji(e,n);case Q:return new i;case K:case re:return new i(e);case te:return function(e){var t=new e.constructor(e.source,$e.exec(e));return t.lastIndex=e.lastIndex,t}(e);case ne:return new i;case ie:return r=e,lr?tt(lr.call(r)):{}}}(e,g,s)}}u||(u=new Er);var y=u.get(e);if(y)return y;if(u.set(e,a),Na(e))return e.forEach(function(r){a.add(jr(r,t,n,r,e,u))}),a;if(Pa(e))return e.forEach(function(r,i){a.set(i,jr(r,t,n,i,e,u))}),a;var m=l?o:(f?c?Do:Lo:c?os:is)(e);return Gt(m||e,function(r,i){m&&(r=e[i=r]),Cr(a,i,jr(r,t,n,i,e,u))}),a}function kr(e,t,n){var r=n.length;if(null==e)return!r;for(e=tt(e);r--;){var i=n[r],u=t[i],a=e[i];if(a===o&&!(i in e)||!u(a))return!1}return!0}function Ir(e,t,n){if("function"!=typeof e)throw new it(s);return iu(function(){e.apply(o,n)},t)}function Br(e,t,n,r){var i=-1,o=Kt,a=!0,s=e.length,c=[],f=t.length;if(!s)return c;n&&(t=Zt(t,yn(n))),r?(o=Jt,a=!1):t.length>=u&&(o=_n,a=!1,t=new br(t));e:for(;++i<s;){var l=e[i],p=null==n?l:n(l);if(l=r||0!==l?l:0,a&&p==p){for(var h=f;h--;)if(t[h]===p)continue e;c.push(l)}else o(t,p,r)||c.push(l)}return c}hr.templateSettings={escape:Se,evaluate:Re,interpolate:Ce,variable:"",imports:{_:hr}},hr.prototype=gr.prototype,hr.prototype.constructor=hr,vr.prototype=dr(gr.prototype),vr.prototype.constructor=vr,yr.prototype=dr(gr.prototype),yr.prototype.constructor=yr,mr.prototype.clear=function(){this.__data__=nr?nr(null):{},this.size=0},mr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},mr.prototype.get=function(e){var t=this.__data__;if(nr){var n=t[e];return n===c?o:n}return ft.call(t,e)?t[e]:o},mr.prototype.has=function(e){var t=this.__data__;return nr?t[e]!==o:ft.call(t,e)},mr.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=nr&&t===o?c:t,this},_r.prototype.clear=function(){this.__data__=[],this.size=0},_r.prototype.delete=function(e){var t=this.__data__,n=Pr(t,e);return!(n<0||(n==t.length-1?t.pop():jt.call(t,n,1),--this.size,0))},_r.prototype.get=function(e){var t=this.__data__,n=Pr(t,e);return n<0?o:t[n][1]},_r.prototype.has=function(e){return Pr(this.__data__,e)>-1},_r.prototype.set=function(e,t){var n=this.__data__,r=Pr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},wr.prototype.clear=function(){this.size=0,this.__data__={hash:new mr,map:new(Jn||_r),string:new mr}},wr.prototype.delete=function(e){var t=Io(this,e).delete(e);return this.size-=t?1:0,t},wr.prototype.get=function(e){return Io(this,e).get(e)},wr.prototype.has=function(e){return Io(this,e).has(e)},wr.prototype.set=function(e,t){var n=Io(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},br.prototype.add=br.prototype.push=function(e){return this.__data__.set(e,c),this},br.prototype.has=function(e){return this.__data__.has(e)},Er.prototype.clear=function(){this.__data__=new _r,this.size=0},Er.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Er.prototype.get=function(e){return this.__data__.get(e)},Er.prototype.has=function(e){return this.__data__.has(e)},Er.prototype.set=function(e,t){var n=this.__data__;if(n instanceof _r){var r=n.__data__;if(!Jn||r.length<u-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new wr(r)}return n.set(e,t),this.size=n.size,this};var Mr=uo(Gr),qr=uo(Vr,!0);function Hr(e,t){var n=!0;return Mr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function Fr(e,t,n){for(var r=-1,i=e.length;++r<i;){var u=e[r],a=t(u);if(null!=a&&(s===o?a==a&&!ja(a):n(a,s)))var s=a,c=u}return c}function $r(e,t){var n=[];return Mr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Wr(e,t,n,r,i){var o=-1,u=e.length;for(n||(n=Yo),i||(i=[]);++o<u;){var a=e[o];t>0&&n(a)?t>1?Wr(a,t-1,n,r,i):en(i,a):r||(i[i.length]=a)}return i}var Yr=ao(),zr=ao(!0);function Gr(e,t){return e&&Yr(e,t,is)}function Vr(e,t){return e&&zr(e,t,is)}function Xr(e,t){return Qt(t,function(t){return xa(e[t])})}function Qr(e,t){for(var n=0,r=(t=zi(t,e)).length;null!=e&&n<r;)e=e[fu(t[n++])];return n&&n==r?e:o}function Kr(e,t,n){var r=t(e);return ya(e)?r:en(r,n(e))}function Jr(e){return null==e?e===o?oe:J:on&&on in tt(e)?function(e){var t=ft.call(e,on),n=e[on];try{e[on]=o;var r=!0}catch(e){}var i=ht.call(e);return r&&(t?e[on]=n:delete e[on]),i}(e):function(e){return ht.call(e)}(e)}function Zr(e,t){return e>t}function ei(e,t){return null!=e&&ft.call(e,t)}function ti(e,t){return null!=e&&t in tt(e)}function ni(e,t,n){for(var i=n?Jt:Kt,u=e[0].length,a=e.length,s=a,c=r(a),f=1/0,l=[];s--;){var p=e[s];s&&t&&(p=Zt(p,yn(t))),f=zn(p.length,f),c[s]=!n&&(t||u>=120&&p.length>=120)?new br(s&&p):o}p=e[0];var h=-1,d=c[0];e:for(;++h<u&&l.length<f;){var g=p[h],v=t?t(g):g;if(g=n||0!==g?g:0,!(d?_n(d,v):i(l,v,n))){for(s=a;--s;){var y=c[s];if(!(y?_n(y,v):i(e[s],v,n)))continue e}d&&d.push(v),l.push(g)}}return l}function ri(e,t,n){var r=null==(e=tu(e,t=zi(t,e)))?e:e[fu(Tu(t))];return null==r?o:Yt(r,e,n)}function ii(e){return Ca(e)&&Jr(e)==H}function oi(e,t,n,r,i){return e===t||(null==e||null==t||!Ca(e)&&!Ca(t)?e!=e&&t!=t:function(e,t,n,r,i,u){var a=ya(e),s=ya(t),c=a?F:Fo(e),f=s?F:Fo(t),l=(c=c==H?Z:c)==Z,p=(f=f==H?Z:f)==Z,h=c==f;if(h&&ba(e)){if(!ba(t))return!1;a=!0,l=!1}if(h&&!l)return u||(u=new Er),a||ka(e)?Po(e,t,n,r,i,u):function(e,t,n,r,i,o,u){switch(n){case ce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case se:return!(e.byteLength!=t.byteLength||!o(new Et(e),new Et(t)));case W:case Y:case K:return ha(+e,+t);case G:return e.name==t.name&&e.message==t.message;case te:case re:return e==t+"";case Q:var a=Sn;case ne:var s=r&g;if(a||(a=Pn),e.size!=t.size&&!s)return!1;var c=u.get(e);if(c)return c==t;r|=v,u.set(e,t);var f=Po(a(e),a(t),r,i,o,u);return u.delete(e),f;case ie:if(lr)return lr.call(e)==lr.call(t)}return!1}(e,t,c,n,r,i,u);if(!(n&g)){var d=l&&ft.call(e,"__wrapped__"),y=p&&ft.call(t,"__wrapped__");if(d||y){var m=d?e.value():e,_=y?t.value():t;return u||(u=new Er),i(m,_,n,r,u)}}return!!h&&(u||(u=new Er),function(e,t,n,r,i,u){var a=n&g,s=Lo(e),c=s.length,f=Lo(t).length;if(c!=f&&!a)return!1;for(var l=c;l--;){var p=s[l];if(!(a?p in t:ft.call(t,p)))return!1}var h=u.get(e);if(h&&u.get(t))return h==t;var d=!0;u.set(e,t),u.set(t,e);for(var v=a;++l<c;){p=s[l];var y=e[p],m=t[p];if(r)var _=a?r(m,y,p,t,e,u):r(y,m,p,e,t,u);if(!(_===o?y===m||i(y,m,n,r,u):_)){d=!1;break}v||(v="constructor"==p)}if(d&&!v){var w=e.constructor,b=t.constructor;w!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b)&&(d=!1)}return u.delete(e),u.delete(t),d}(e,t,n,r,i,u))}(e,t,n,r,oi,i))}function ui(e,t,n,r){var i=n.length,u=i,a=!r;if(null==e)return!u;for(e=tt(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<u;){var c=(s=n[i])[0],f=e[c],l=s[1];if(a&&s[2]){if(f===o&&!(c in e))return!1}else{var p=new Er;if(r)var h=r(f,l,c,e,t,p);if(!(h===o?oi(l,f,g|v,r,p):h))return!1}}return!0}function ai(e){return!(!Ra(e)||(t=e,pt&&pt in t))&&(xa(e)?vt:ze).test(lu(e));var t}function si(e){return"function"==typeof e?e:null==e?Os:"object"==typeof e?ya(e)?di(e[0],e[1]):hi(e):Ms(e)}function ci(e){if(!Ko(e))return Wn(e);var t=[];for(var n in tt(e))ft.call(e,n)&&"constructor"!=n&&t.push(n);return t}function fi(e){if(!Ra(e))return function(e){var t=[];if(null!=e)for(var n in tt(e))t.push(n);return t}(e);var t=Ko(e),n=[];for(var r in e)("constructor"!=r||!t&&ft.call(e,r))&&n.push(r);return n}function li(e,t){return e<t}function pi(e,t){var n=-1,i=_a(e)?r(e.length):[];return Mr(e,function(e,r,o){i[++n]=t(e,r,o)}),i}function hi(e){var t=Bo(e);return 1==t.length&&t[0][2]?Zo(t[0][0],t[0][1]):function(n){return n===e||ui(n,e,t)}}function di(e,t){return Vo(e)&&Jo(t)?Zo(fu(e),t):function(n){var r=Za(n,e);return r===o&&r===t?es(n,e):oi(t,r,g|v)}}function gi(e,t,n,r,i){e!==t&&Yr(t,function(u,a){if(Ra(u))i||(i=new Er),function(e,t,n,r,i,u,a){var s=nu(e,n),c=nu(t,n),f=a.get(c);if(f)Rr(e,n,f);else{var l=u?u(s,c,n+"",e,t,a):o,p=l===o;if(p){var h=ya(c),d=!h&&ba(c),g=!h&&!d&&ka(c);l=c,h||d||g?ya(s)?l=s:wa(s)?l=no(s):d?(p=!1,l=Qi(c,!0)):g?(p=!1,l=Ji(c,!0)):l=[]:La(c)||va(c)?(l=s,va(s)?l=Wa(s):Ra(s)&&!xa(s)||(l=Wo(c))):p=!1}p&&(a.set(c,l),i(l,c,r,u,a),a.delete(c)),Rr(e,n,l)}}(e,t,a,n,gi,r,i);else{var s=r?r(nu(e,a),u,a+"",e,t,i):o;s===o&&(s=u),Rr(e,a,s)}},os)}function vi(e,t){var n=e.length;if(n)return zo(t+=t<0?n:0,n)?e[t]:o}function yi(e,t,n){var r=-1;return t=Zt(t.length?t:[Os],yn(ko())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(pi(e,function(e,n,i){return{criteria:Zt(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,u=i.length,a=n.length;++r<u;){var s=Zi(i[r],o[r]);if(s){if(r>=a)return s;var c=n[r];return s*("desc"==c?-1:1)}}return e.index-t.index}(e,t,n)})}function mi(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var u=t[r],a=Qr(e,u);n(a,u)&&Si(o,zi(u,e),a)}return o}function _i(e,t,n,r){var i=r?cn:sn,o=-1,u=t.length,a=e;for(e===t&&(t=no(t)),n&&(a=Zt(e,yn(n)));++o<u;)for(var s=0,c=t[o],f=n?n(c):c;(s=i(a,f,s,r))>-1;)a!==e&&jt.call(a,s,1),jt.call(e,s,1);return e}function wi(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;zo(i)?jt.call(e,i,1):Bi(e,i)}}return e}function bi(e,t){return e+Mn(Xn()*(t-e+1))}function Ei(e,t){var n="";if(!e||t<1||t>U)return n;do{t%2&&(n+=e),(t=Mn(t/2))&&(e+=e)}while(t);return n}function Ti(e,t){return ou(eu(e,t,Os),e+"")}function xi(e){return xr(hs(e))}function Ai(e,t){var n=hs(e);return su(n,Ur(t,0,n.length))}function Si(e,t,n,r){if(!Ra(e))return e;for(var i=-1,u=(t=zi(t,e)).length,a=u-1,s=e;null!=s&&++i<u;){var c=fu(t[i]),f=n;if(i!=a){var l=s[c];(f=r?r(l,c,s):o)===o&&(f=Ra(l)?l:zo(t[i+1])?[]:{})}Cr(s,c,f),s=s[c]}return e}var Ri=rr?function(e,t){return rr.set(e,t),e}:Os,Ci=hn?function(e,t){return hn(e,"toString",{configurable:!0,enumerable:!1,value:Rs(t),writable:!0})}:Os;function Pi(e){return su(hs(e))}function Oi(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var u=r(o);++i<o;)u[i]=e[i+t];return u}function Li(e,t){var n;return Mr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function Di(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=M){for(;r<i;){var o=r+i>>>1,u=e[o];null!==u&&!ja(u)&&(n?u<=t:u<t)?r=o+1:i=o}return i}return Ni(e,t,Os,n)}function Ni(e,t,n,r){t=n(t);for(var i=0,u=null==e?0:e.length,a=t!=t,s=null===t,c=ja(t),f=t===o;i<u;){var l=Mn((i+u)/2),p=n(e[l]),h=p!==o,d=null===p,g=p==p,v=ja(p);if(a)var y=r||g;else y=f?g&&(r||h):s?g&&h&&(r||!d):c?g&&h&&!d&&(r||!v):!d&&!v&&(r?p<=t:p<t);y?i=l+1:u=l}return zn(u,B)}function Ui(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var u=e[n],a=t?t(u):u;if(!n||!ha(a,s)){var s=a;o[i++]=0===u?0:u}}return o}function ji(e){return"number"==typeof e?e:ja(e)?k:+e}function ki(e){if("string"==typeof e)return e;if(ya(e))return Zt(e,ki)+"";if(ja(e))return pr?pr.call(e):"";var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Ii(e,t,n){var r=-1,i=Kt,o=e.length,a=!0,s=[],c=s;if(n)a=!1,i=Jt;else if(o>=u){var f=t?null:To(e);if(f)return Pn(f);a=!1,i=_n,c=new br}else c=t?[]:s;e:for(;++r<o;){var l=e[r],p=t?t(l):l;if(l=n||0!==l?l:0,a&&p==p){for(var h=c.length;h--;)if(c[h]===p)continue e;t&&c.push(p),s.push(l)}else i(c,p,n)||(c!==s&&c.push(p),s.push(l))}return s}function Bi(e,t){return null==(e=tu(e,t=zi(t,e)))||delete e[fu(Tu(t))]}function Mi(e,t,n,r){return Si(e,t,n(Qr(e,t)),r)}function qi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Oi(e,r?0:o,r?o+1:i):Oi(e,r?o+1:0,r?i:o)}function Hi(e,t){var n=e;return n instanceof yr&&(n=n.value()),tn(t,function(e,t){return t.func.apply(t.thisArg,en([e],t.args))},n)}function Fi(e,t,n){var i=e.length;if(i<2)return i?Ii(e[0]):[];for(var o=-1,u=r(i);++o<i;)for(var a=e[o],s=-1;++s<i;)s!=o&&(u[o]=Br(u[o]||a,e[s],t,n));return Ii(Wr(u,1),t,n)}function $i(e,t,n){for(var r=-1,i=e.length,u=t.length,a={};++r<i;){var s=r<u?t[r]:o;n(a,e[r],s)}return a}function Wi(e){return wa(e)?e:[]}function Yi(e){return"function"==typeof e?e:Os}function zi(e,t){return ya(e)?e:Vo(e,t)?[e]:cu(Ya(e))}var Gi=Ti;function Vi(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:Oi(e,t,n)}var Xi=jn||function(e){return Nt.clearTimeout(e)};function Qi(e,t){if(t)return e.slice();var n=e.length,r=Ct?Ct(n):new e.constructor(n);return e.copy(r),r}function Ki(e){var t=new e.constructor(e.byteLength);return new Et(t).set(new Et(e)),t}function Ji(e,t){var n=t?Ki(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Zi(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,u=ja(e),a=t!==o,s=null===t,c=t==t,f=ja(t);if(!s&&!f&&!u&&e>t||u&&a&&c&&!s&&!f||r&&a&&c||!n&&c||!i)return 1;if(!r&&!u&&!f&&e<t||f&&n&&i&&!r&&!u||s&&n&&i||!a&&i||!c)return-1}return 0}function eo(e,t,n,i){for(var o=-1,u=e.length,a=n.length,s=-1,c=t.length,f=Yn(u-a,0),l=r(c+f),p=!i;++s<c;)l[s]=t[s];for(;++o<a;)(p||o<u)&&(l[n[o]]=e[o]);for(;f--;)l[s++]=e[o++];return l}function to(e,t,n,i){for(var o=-1,u=e.length,a=-1,s=n.length,c=-1,f=t.length,l=Yn(u-s,0),p=r(l+f),h=!i;++o<l;)p[o]=e[o];for(var d=o;++c<f;)p[d+c]=t[c];for(;++a<s;)(h||o<u)&&(p[d+n[a]]=e[o++]);return p}function no(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function ro(e,t,n,r){var i=!n;n||(n={});for(var u=-1,a=t.length;++u<a;){var s=t[u],c=r?r(n[s],e[s],s,n,e):o;c===o&&(c=e[s]),i?Dr(n,s,c):Cr(n,s,c)}return n}function io(e,t){return function(n,r){var i=ya(n)?zt:Or,o=t?t():{};return i(n,e,ko(r,2),o)}}function oo(e){return Ti(function(t,n){var r=-1,i=n.length,u=i>1?n[i-1]:o,a=i>2?n[2]:o;for(u=e.length>3&&"function"==typeof u?(i--,u):o,a&&Go(n[0],n[1],a)&&(u=i<3?o:u,i=1),t=tt(t);++r<i;){var s=n[r];s&&e(t,s,r,u)}return t})}function uo(e,t){return function(n,r){if(null==n)return n;if(!_a(n))return e(n,r);for(var i=n.length,o=t?i:-1,u=tt(n);(t?o--:++o<i)&&!1!==r(u[o],o,u););return n}}function ao(e){return function(t,n,r){for(var i=-1,o=tt(t),u=r(t),a=u.length;a--;){var s=u[e?a:++i];if(!1===n(o[s],s,o))break}return t}}function so(e){return function(t){var n=An(t=Ya(t))?Dn(t):o,r=n?n[0]:t.charAt(0),i=n?Vi(n,1).join(""):t.slice(1);return r[e]()+i}}function co(e){return function(t){return tn(xs(vs(t).replace(mt,"")),e,"")}}function fo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=dr(e.prototype),r=e.apply(n,t);return Ra(r)?r:n}}function lo(e){return function(t,n,r){var i=tt(t);if(!_a(t)){var u=ko(n,3);t=is(t),n=function(e){return u(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[u?t[a]:a]:o}}function po(e){return Oo(function(t){var n=t.length,r=n,i=vr.prototype.thru;for(e&&t.reverse();r--;){var u=t[r];if("function"!=typeof u)throw new it(s);if(i&&!a&&"wrapper"==Uo(u))var a=new vr([],!0)}for(r=a?r:n;++r<n;){var c=Uo(u=t[r]),f="wrapper"==c?No(u):o;a=f&&Xo(f[0])&&f[1]==(x|w|E|A)&&!f[4].length&&1==f[9]?a[Uo(f[0])].apply(a,f[3]):1==u.length&&Xo(u)?a[c]():a.thru(u)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&ya(r))return a.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}})}function ho(e,t,n,i,u,a,s,c,f,l){var p=t&x,h=t&y,d=t&m,g=t&(w|b),v=t&S,_=d?o:fo(e);return function y(){for(var m=arguments.length,w=r(m),b=m;b--;)w[b]=arguments[b];if(g)var E=jo(y),T=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,E);if(i&&(w=eo(w,i,u,g)),a&&(w=to(w,a,s,g)),m-=T,g&&m<l){var x=Cn(w,E);return bo(e,t,ho,y.placeholder,n,w,x,c,f,l-m)}var A=h?n:this,S=d?A[e]:e;return m=w.length,c?w=function(e,t){for(var n=e.length,r=zn(t.length,n),i=no(e);r--;){var u=t[r];e[r]=zo(u,n)?i[u]:o}return e}(w,c):v&&m>1&&w.reverse(),p&&f<m&&(w.length=f),this&&this!==Nt&&this instanceof y&&(S=_||fo(S)),S.apply(A,w)}}function go(e,t){return function(n,r){return function(e,t,n,r){return Gr(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function vo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ki(n),r=ki(r)):(n=ji(n),r=ji(r)),i=e(n,r)}return i}}function yo(e){return Oo(function(t){return t=Zt(t,yn(ko())),Ti(function(n){var r=this;return e(t,function(e){return Yt(e,r,n)})})})}function mo(e,t){var n=(t=t===o?" ":ki(t)).length;if(n<2)return n?Ei(t,e):t;var r=Ei(t,Bn(e/Ln(t)));return An(t)?Vi(Dn(r),0,e).join(""):r.slice(0,e)}function _o(e){return function(t,n,i){return i&&"number"!=typeof i&&Go(t,n,i)&&(n=i=o),t=qa(t),n===o?(n=t,t=0):n=qa(n),function(e,t,n,i){for(var o=-1,u=Yn(Bn((t-e)/(n||1)),0),a=r(u);u--;)a[i?u:++o]=e,e+=n;return a}(t,n,i=i===o?t<n?1:-1:qa(i),e)}}function wo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=$a(t),n=$a(n)),e(t,n)}}function bo(e,t,n,r,i,u,a,s,c,f){var l=t&w;t|=l?E:T,(t&=~(l?T:E))&_||(t&=~(y|m));var p=[e,t,i,l?u:o,l?a:o,l?o:u,l?o:a,s,c,f],h=n.apply(o,p);return Xo(e)&&ru(h,p),h.placeholder=r,uu(h,e,t)}function Eo(e){var t=et[e];return function(e,n){if(e=$a(e),n=null==n?0:zn(Ha(n),292)){var r=(Ya(e)+"e").split("e");return+((r=(Ya(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var To=er&&1/Pn(new er([,-0]))[1]==N?function(e){return new er(e)}:js;function xo(e){return function(t){var n=Fo(t);return n==Q?Sn(t):n==ne?On(t):function(e,t){return Zt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Ao(e,t,n,i,u,a,c,f){var p=t&m;if(!p&&"function"!=typeof e)throw new it(s);var h=i?i.length:0;if(h||(t&=~(E|T),i=u=o),c=c===o?c:Yn(Ha(c),0),f=f===o?f:Ha(f),h-=u?u.length:0,t&T){var d=i,g=u;i=u=o}var v=p?o:No(e),S=[e,t,n,i,u,d,g,a,c,f];if(v&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<(y|m|x),u=r==x&&n==w||r==x&&n==A&&e[7].length<=t[8]||r==(x|A)&&t[7].length<=t[8]&&n==w;if(!o&&!u)return e;r&y&&(e[2]=t[2],i|=n&y?0:_);var a=t[3];if(a){var s=e[3];e[3]=s?eo(s,a,t[4]):a,e[4]=s?Cn(e[3],l):t[4]}(a=t[5])&&(s=e[5],e[5]=s?to(s,a,t[6]):a,e[6]=s?Cn(e[5],l):t[6]),(a=t[7])&&(e[7]=a),r&x&&(e[8]=null==e[8]?t[8]:zn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(S,v),e=S[0],t=S[1],n=S[2],i=S[3],u=S[4],!(f=S[9]=S[9]===o?p?0:e.length:Yn(S[9]-h,0))&&t&(w|b)&&(t&=~(w|b)),t&&t!=y)R=t==w||t==b?function(e,t,n){var i=fo(e);return function u(){for(var a=arguments.length,s=r(a),c=a,f=jo(u);c--;)s[c]=arguments[c];var l=a<3&&s[0]!==f&&s[a-1]!==f?[]:Cn(s,f);return(a-=l.length)<n?bo(e,t,ho,u.placeholder,o,s,l,o,o,n-a):Yt(this&&this!==Nt&&this instanceof u?i:e,this,s)}}(e,t,f):t!=E&&t!=(y|E)||u.length?ho.apply(o,S):function(e,t,n,i){var o=t&y,u=fo(e);return function t(){for(var a=-1,s=arguments.length,c=-1,f=i.length,l=r(f+s),p=this&&this!==Nt&&this instanceof t?u:e;++c<f;)l[c]=i[c];for(;s--;)l[c++]=arguments[++a];return Yt(p,o?n:this,l)}}(e,t,n,i);else var R=function(e,t,n){var r=t&y,i=fo(e);return function t(){return(this&&this!==Nt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return uu((v?Ri:ru)(R,S),e,t)}function So(e,t,n,r){return e===o||ha(e,at[n])&&!ft.call(r,n)?t:e}function Ro(e,t,n,r,i,u){return Ra(e)&&Ra(t)&&(u.set(t,e),gi(e,t,o,Ro,u),u.delete(t)),e}function Co(e){return La(e)?o:e}function Po(e,t,n,r,i,u){var a=n&g,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var f=u.get(e);if(f&&u.get(t))return f==t;var l=-1,p=!0,h=n&v?new br:o;for(u.set(e,t),u.set(t,e);++l<s;){var d=e[l],y=t[l];if(r)var m=a?r(y,d,l,t,e,u):r(d,y,l,e,t,u);if(m!==o){if(m)continue;p=!1;break}if(h){if(!rn(t,function(e,t){if(!_n(h,t)&&(d===e||i(d,e,n,r,u)))return h.push(t)})){p=!1;break}}else if(d!==y&&!i(d,y,n,r,u)){p=!1;break}}return u.delete(e),u.delete(t),p}function Oo(e){return ou(eu(e,o,mu),e+"")}function Lo(e){return Kr(e,is,qo)}function Do(e){return Kr(e,os,Ho)}var No=rr?function(e){return rr.get(e)}:js;function Uo(e){for(var t=e.name+"",n=ir[t],r=ft.call(ir,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function jo(e){return(ft.call(hr,"placeholder")?hr:e).placeholder}function ko(){var e=hr.iteratee||Ls;return e=e===Ls?si:e,arguments.length?e(arguments[0],arguments[1]):e}function Io(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Bo(e){for(var t=is(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Jo(i)]}return t}function Mo(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return ai(n)?n:o}var qo=qn?function(e){return null==e?[]:(e=tt(e),Qt(qn(e),function(t){return Ut.call(e,t)}))}:Fs,Ho=qn?function(e){for(var t=[];e;)en(t,qo(e)),e=Lt(e);return t}:Fs,Fo=Jr;function $o(e,t,n){for(var r=-1,i=(t=zi(t,e)).length,o=!1;++r<i;){var u=fu(t[r]);if(!(o=null!=e&&n(e,u)))break;e=e[u]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Sa(i)&&zo(u,i)&&(ya(e)||va(e))}function Wo(e){return"function"!=typeof e.constructor||Ko(e)?{}:dr(Lt(e))}function Yo(e){return ya(e)||va(e)||!!(It&&e&&e[It])}function zo(e,t){var n=typeof e;return!!(t=null==t?U:t)&&("number"==n||"symbol"!=n&&Ve.test(e))&&e>-1&&e%1==0&&e<t}function Go(e,t,n){if(!Ra(n))return!1;var r=typeof t;return!!("number"==r?_a(n)&&zo(t,n.length):"string"==r&&t in n)&&ha(n[t],e)}function Vo(e,t){if(ya(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ja(e))||Oe.test(e)||!Pe.test(e)||null!=t&&e in tt(t)}function Xo(e){var t=Uo(e),n=hr[t];if("function"!=typeof n||!(t in yr.prototype))return!1;if(e===n)return!0;var r=No(n);return!!r&&e===r[0]}(Kn&&Fo(new Kn(new ArrayBuffer(1)))!=ce||Jn&&Fo(new Jn)!=Q||Zn&&"[object Promise]"!=Fo(Zn.resolve())||er&&Fo(new er)!=ne||tr&&Fo(new tr)!=ue)&&(Fo=function(e){var t=Jr(e),n=t==Z?e.constructor:o,r=n?lu(n):"";if(r)switch(r){case or:return ce;case ur:return Q;case ar:return"[object Promise]";case sr:return ne;case cr:return ue}return t});var Qo=st?xa:$s;function Ko(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||at)}function Jo(e){return e==e&&!Ra(e)}function Zo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in tt(n))}}function eu(e,t,n){return t=Yn(t===o?e.length-1:t,0),function(){for(var i=arguments,o=-1,u=Yn(i.length-t,0),a=r(u);++o<u;)a[o]=i[t+o];o=-1;for(var s=r(t+1);++o<t;)s[o]=i[o];return s[t]=n(a),Yt(e,this,s)}}function tu(e,t){return t.length<2?e:Qr(e,Oi(t,0,-1))}function nu(e,t){if("__proto__"!=t)return e[t]}var ru=au(Ri),iu=In||function(e,t){return Nt.setTimeout(e,t)},ou=au(Ci);function uu(e,t,n){var r=t+"";return ou(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Gt(q,function(n){var r="_."+n[0];t&n[1]&&!Kt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(Be);return t?t[1].split(Me):[]}(r),n)))}function au(e){var t=0,n=0;return function(){var r=Gn(),i=O-(r-n);if(n=r,i>0){if(++t>=P)return arguments[0]}else t=0;return e.apply(o,arguments)}}function su(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var u=bi(n,i),a=e[u];e[u]=e[n],e[n]=a}return e.length=t,e}var cu=function(e){var t=aa(e,function(e){return n.size===f&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Le,function(e,n,r,i){t.push(r?i.replace(He,"$1"):n||e)}),t});function fu(e){if("string"==typeof e||ja(e))return e;var t=e+"";return"0"==t&&1/e==-N?"-0":t}function lu(e){if(null!=e){try{return ct.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function pu(e){if(e instanceof yr)return e.clone();var t=new vr(e.__wrapped__,e.__chain__);return t.__actions__=no(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var hu=Ti(function(e,t){return wa(e)?Br(e,Wr(t,1,wa,!0)):[]}),du=Ti(function(e,t){var n=Tu(t);return wa(n)&&(n=o),wa(e)?Br(e,Wr(t,1,wa,!0),ko(n,2)):[]}),gu=Ti(function(e,t){var n=Tu(t);return wa(n)&&(n=o),wa(e)?Br(e,Wr(t,1,wa,!0),o,n):[]});function vu(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Ha(n);return i<0&&(i=Yn(r+i,0)),an(e,ko(t,3),i)}function yu(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=Ha(n),i=n<0?Yn(r+i,0):zn(i,r-1)),an(e,ko(t,3),i,!0)}function mu(e){return null!=e&&e.length?Wr(e,1):[]}function _u(e){return e&&e.length?e[0]:o}var wu=Ti(function(e){var t=Zt(e,Wi);return t.length&&t[0]===e[0]?ni(t):[]}),bu=Ti(function(e){var t=Tu(e),n=Zt(e,Wi);return t===Tu(n)?t=o:n.pop(),n.length&&n[0]===e[0]?ni(n,ko(t,2)):[]}),Eu=Ti(function(e){var t=Tu(e),n=Zt(e,Wi);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?ni(n,o,t):[]});function Tu(e){var t=null==e?0:e.length;return t?e[t-1]:o}var xu=Ti(Au);function Au(e,t){return e&&e.length&&t&&t.length?_i(e,t):e}var Su=Oo(function(e,t){var n=null==e?0:e.length,r=Nr(e,t);return wi(e,Zt(t,function(e){return zo(e,n)?+e:e}).sort(Zi)),r});function Ru(e){return null==e?e:Qn.call(e)}var Cu=Ti(function(e){return Ii(Wr(e,1,wa,!0))}),Pu=Ti(function(e){var t=Tu(e);return wa(t)&&(t=o),Ii(Wr(e,1,wa,!0),ko(t,2))}),Ou=Ti(function(e){var t=Tu(e);return t="function"==typeof t?t:o,Ii(Wr(e,1,wa,!0),o,t)});function Lu(e){if(!e||!e.length)return[];var t=0;return e=Qt(e,function(e){if(wa(e))return t=Yn(e.length,t),!0}),vn(t,function(t){return Zt(e,pn(t))})}function Du(e,t){if(!e||!e.length)return[];var n=Lu(e);return null==t?n:Zt(n,function(e){return Yt(t,o,e)})}var Nu=Ti(function(e,t){return wa(e)?Br(e,t):[]}),Uu=Ti(function(e){return Fi(Qt(e,wa))}),ju=Ti(function(e){var t=Tu(e);return wa(t)&&(t=o),Fi(Qt(e,wa),ko(t,2))}),ku=Ti(function(e){var t=Tu(e);return t="function"==typeof t?t:o,Fi(Qt(e,wa),o,t)}),Iu=Ti(Lu);var Bu=Ti(function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,Du(e,n)});function Mu(e){var t=hr(e);return t.__chain__=!0,t}function qu(e,t){return t(e)}var Hu=Oo(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Nr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof yr&&zo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:qu,args:[i],thisArg:o}),new vr(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)});var Fu=io(function(e,t,n){ft.call(e,n)?++e[n]:Dr(e,n,1)});var $u=lo(vu),Wu=lo(yu);function Yu(e,t){return(ya(e)?Gt:Mr)(e,ko(t,3))}function zu(e,t){return(ya(e)?Vt:qr)(e,ko(t,3))}var Gu=io(function(e,t,n){ft.call(e,n)?e[n].push(t):Dr(e,n,[t])});var Vu=Ti(function(e,t,n){var i=-1,o="function"==typeof t,u=_a(e)?r(e.length):[];return Mr(e,function(e){u[++i]=o?Yt(t,e,n):ri(e,t,n)}),u}),Xu=io(function(e,t,n){Dr(e,n,t)});function Qu(e,t){return(ya(e)?Zt:pi)(e,ko(t,3))}var Ku=io(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var Ju=Ti(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Go(e,t[0],t[1])?t=[]:n>2&&Go(t[0],t[1],t[2])&&(t=[t[0]]),yi(e,Wr(t,1),[])}),Zu=kn||function(){return Nt.Date.now()};function ea(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Ao(e,x,o,o,o,o,t)}function ta(e,t){var n;if("function"!=typeof t)throw new it(s);return e=Ha(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var na=Ti(function(e,t,n){var r=y;if(n.length){var i=Cn(n,jo(na));r|=E}return Ao(e,r,t,n,i)}),ra=Ti(function(e,t,n){var r=y|m;if(n.length){var i=Cn(n,jo(ra));r|=E}return Ao(t,r,e,n,i)});function ia(e,t,n){var r,i,u,a,c,f,l=0,p=!1,h=!1,d=!0;if("function"!=typeof e)throw new it(s);function g(t){var n=r,u=i;return r=i=o,l=t,a=e.apply(u,n)}function v(e){var n=e-f;return f===o||n>=t||n<0||h&&e-l>=u}function y(){var e=Zu();if(v(e))return m(e);c=iu(y,function(e){var n=t-(e-f);return h?zn(n,u-(e-l)):n}(e))}function m(e){return c=o,d&&r?g(e):(r=i=o,a)}function _(){var e=Zu(),n=v(e);if(r=arguments,i=this,f=e,n){if(c===o)return function(e){return l=e,c=iu(y,t),p?g(e):a}(f);if(h)return c=iu(y,t),g(f)}return c===o&&(c=iu(y,t)),a}return t=$a(t)||0,Ra(n)&&(p=!!n.leading,u=(h="maxWait"in n)?Yn($a(n.maxWait)||0,t):u,d="trailing"in n?!!n.trailing:d),_.cancel=function(){c!==o&&Xi(c),l=0,r=f=i=c=o},_.flush=function(){return c===o?a:m(Zu())},_}var oa=Ti(function(e,t){return Ir(e,1,t)}),ua=Ti(function(e,t,n){return Ir(e,$a(t)||0,n)});function aa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new it(s);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var u=e.apply(this,r);return n.cache=o.set(i,u)||o,u};return n.cache=new(aa.Cache||wr),n}function sa(e){if("function"!=typeof e)throw new it(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}aa.Cache=wr;var ca=Gi(function(e,t){var n=(t=1==t.length&&ya(t[0])?Zt(t[0],yn(ko())):Zt(Wr(t,1),yn(ko()))).length;return Ti(function(r){for(var i=-1,o=zn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Yt(e,this,r)})}),fa=Ti(function(e,t){var n=Cn(t,jo(fa));return Ao(e,E,o,t,n)}),la=Ti(function(e,t){var n=Cn(t,jo(la));return Ao(e,T,o,t,n)}),pa=Oo(function(e,t){return Ao(e,A,o,o,o,t)});function ha(e,t){return e===t||e!=e&&t!=t}var da=wo(Zr),ga=wo(function(e,t){return e>=t}),va=ii(function(){return arguments}())?ii:function(e){return Ca(e)&&ft.call(e,"callee")&&!Ut.call(e,"callee")},ya=r.isArray,ma=Mt?yn(Mt):function(e){return Ca(e)&&Jr(e)==se};function _a(e){return null!=e&&Sa(e.length)&&!xa(e)}function wa(e){return Ca(e)&&_a(e)}var ba=Hn||$s,Ea=qt?yn(qt):function(e){return Ca(e)&&Jr(e)==Y};function Ta(e){if(!Ca(e))return!1;var t=Jr(e);return t==G||t==z||"string"==typeof e.message&&"string"==typeof e.name&&!La(e)}function xa(e){if(!Ra(e))return!1;var t=Jr(e);return t==V||t==X||t==$||t==ee}function Aa(e){return"number"==typeof e&&e==Ha(e)}function Sa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=U}function Ra(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ca(e){return null!=e&&"object"==typeof e}var Pa=Ht?yn(Ht):function(e){return Ca(e)&&Fo(e)==Q};function Oa(e){return"number"==typeof e||Ca(e)&&Jr(e)==K}function La(e){if(!Ca(e)||Jr(e)!=Z)return!1;var t=Lt(e);if(null===t)return!0;var n=ft.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==dt}var Da=Ft?yn(Ft):function(e){return Ca(e)&&Jr(e)==te};var Na=$t?yn($t):function(e){return Ca(e)&&Fo(e)==ne};function Ua(e){return"string"==typeof e||!ya(e)&&Ca(e)&&Jr(e)==re}function ja(e){return"symbol"==typeof e||Ca(e)&&Jr(e)==ie}var ka=Wt?yn(Wt):function(e){return Ca(e)&&Sa(e.length)&&!!St[Jr(e)]};var Ia=wo(li),Ba=wo(function(e,t){return e<=t});function Ma(e){if(!e)return[];if(_a(e))return Ua(e)?Dn(e):no(e);if(Bt&&e[Bt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Bt]());var t=Fo(e);return(t==Q?Sn:t==ne?Pn:hs)(e)}function qa(e){return e?(e=$a(e))===N||e===-N?(e<0?-1:1)*j:e==e?e:0:0===e?e:0}function Ha(e){var t=qa(e),n=t%1;return t==t?n?t-n:t:0}function Fa(e){return e?Ur(Ha(e),0,I):0}function $a(e){if("number"==typeof e)return e;if(ja(e))return k;if(Ra(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ra(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ue,"");var n=Ye.test(e);return n||Ge.test(e)?Ot(e.slice(2),n?2:8):We.test(e)?k:+e}function Wa(e){return ro(e,os(e))}function Ya(e){return null==e?"":ki(e)}var za=oo(function(e,t){if(Ko(t)||_a(t))ro(t,is(t),e);else for(var n in t)ft.call(t,n)&&Cr(e,n,t[n])}),Ga=oo(function(e,t){ro(t,os(t),e)}),Va=oo(function(e,t,n,r){ro(t,os(t),e,r)}),Xa=oo(function(e,t,n,r){ro(t,is(t),e,r)}),Qa=Oo(Nr);var Ka=Ti(function(e,t){e=tt(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&Go(t[0],t[1],i)&&(r=1);++n<r;)for(var u=t[n],a=os(u),s=-1,c=a.length;++s<c;){var f=a[s],l=e[f];(l===o||ha(l,at[f])&&!ft.call(e,f))&&(e[f]=u[f])}return e}),Ja=Ti(function(e){return e.push(o,Ro),Yt(as,o,e)});function Za(e,t,n){var r=null==e?o:Qr(e,t);return r===o?n:r}function es(e,t){return null!=e&&$o(e,t,ti)}var ts=go(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ht.call(t)),e[t]=n},Rs(Os)),ns=go(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ht.call(t)),ft.call(e,t)?e[t].push(n):e[t]=[n]},ko),rs=Ti(ri);function is(e){return _a(e)?Tr(e):ci(e)}function os(e){return _a(e)?Tr(e,!0):fi(e)}var us=oo(function(e,t,n){gi(e,t,n)}),as=oo(function(e,t,n,r){gi(e,t,n,r)}),ss=Oo(function(e,t){var n={};if(null==e)return n;var r=!1;t=Zt(t,function(t){return t=zi(t,e),r||(r=t.length>1),t}),ro(e,Do(e),n),r&&(n=jr(n,p|h|d,Co));for(var i=t.length;i--;)Bi(n,t[i]);return n});var cs=Oo(function(e,t){return null==e?{}:function(e,t){return mi(e,t,function(t,n){return es(e,n)})}(e,t)});function fs(e,t){if(null==e)return{};var n=Zt(Do(e),function(e){return[e]});return t=ko(t),mi(e,n,function(e,n){return t(e,n[0])})}var ls=xo(is),ps=xo(os);function hs(e){return null==e?[]:mn(e,is(e))}var ds=co(function(e,t,n){return t=t.toLowerCase(),e+(n?gs(t):t)});function gs(e){return Ts(Ya(e).toLowerCase())}function vs(e){return(e=Ya(e))&&e.replace(Xe,En).replace(_t,"")}var ys=co(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),ms=co(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),_s=so("toLowerCase");var ws=co(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var bs=co(function(e,t,n){return e+(n?" ":"")+Ts(t)});var Es=co(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ts=so("toUpperCase");function xs(e,t,n){return e=Ya(e),(t=n?o:t)===o?function(e){return Tt.test(e)}(e)?function(e){return e.match(bt)||[]}(e):function(e){return e.match(qe)||[]}(e):e.match(t)||[]}var As=Ti(function(e,t){try{return Yt(e,o,t)}catch(e){return Ta(e)?e:new Je(e)}}),Ss=Oo(function(e,t){return Gt(t,function(t){t=fu(t),Dr(e,t,na(e[t],e))}),e});function Rs(e){return function(){return e}}var Cs=po(),Ps=po(!0);function Os(e){return e}function Ls(e){return si("function"==typeof e?e:jr(e,p))}var Ds=Ti(function(e,t){return function(n){return ri(n,e,t)}}),Ns=Ti(function(e,t){return function(n){return ri(e,n,t)}});function Us(e,t,n){var r=is(t),i=Xr(t,r);null!=n||Ra(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Xr(t,is(t)));var o=!(Ra(n)&&"chain"in n&&!n.chain),u=xa(e);return Gt(i,function(n){var r=t[n];e[n]=r,u&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=no(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,en([this.value()],arguments))})}),e}function js(){}var ks=yo(Zt),Is=yo(Xt),Bs=yo(rn);function Ms(e){return Vo(e)?pn(fu(e)):function(e){return function(t){return Qr(t,e)}}(e)}var qs=_o(),Hs=_o(!0);function Fs(){return[]}function $s(){return!1}var Ws=vo(function(e,t){return e+t},0),Ys=Eo("ceil"),zs=vo(function(e,t){return e/t},1),Gs=Eo("floor");var Vs,Xs=vo(function(e,t){return e*t},1),Qs=Eo("round"),Ks=vo(function(e,t){return e-t},0);return hr.after=function(e,t){if("function"!=typeof t)throw new it(s);return e=Ha(e),function(){if(--e<1)return t.apply(this,arguments)}},hr.ary=ea,hr.assign=za,hr.assignIn=Ga,hr.assignInWith=Va,hr.assignWith=Xa,hr.at=Qa,hr.before=ta,hr.bind=na,hr.bindAll=Ss,hr.bindKey=ra,hr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return ya(e)?e:[e]},hr.chain=Mu,hr.chunk=function(e,t,n){t=(n?Go(e,t,n):t===o)?1:Yn(Ha(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var u=0,a=0,s=r(Bn(i/t));u<i;)s[a++]=Oi(e,u,u+=t);return s},hr.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},hr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return en(ya(n)?no(n):[n],Wr(t,1))},hr.cond=function(e){var t=null==e?0:e.length,n=ko();return e=t?Zt(e,function(e){if("function"!=typeof e[1])throw new it(s);return[n(e[0]),e[1]]}):[],Ti(function(n){for(var r=-1;++r<t;){var i=e[r];if(Yt(i[0],this,n))return Yt(i[1],this,n)}})},hr.conforms=function(e){return function(e){var t=is(e);return function(n){return kr(n,e,t)}}(jr(e,p))},hr.constant=Rs,hr.countBy=Fu,hr.create=function(e,t){var n=dr(e);return null==t?n:Lr(n,t)},hr.curry=function e(t,n,r){var i=Ao(t,w,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},hr.curryRight=function e(t,n,r){var i=Ao(t,b,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},hr.debounce=ia,hr.defaults=Ka,hr.defaultsDeep=Ja,hr.defer=oa,hr.delay=ua,hr.difference=hu,hr.differenceBy=du,hr.differenceWith=gu,hr.drop=function(e,t,n){var r=null==e?0:e.length;return r?Oi(e,(t=n||t===o?1:Ha(t))<0?0:t,r):[]},hr.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Oi(e,0,(t=r-(t=n||t===o?1:Ha(t)))<0?0:t):[]},hr.dropRightWhile=function(e,t){return e&&e.length?qi(e,ko(t,3),!0,!0):[]},hr.dropWhile=function(e,t){return e&&e.length?qi(e,ko(t,3),!0):[]},hr.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&Go(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=Ha(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:Ha(r))<0&&(r+=i),r=n>r?0:Fa(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},hr.filter=function(e,t){return(ya(e)?Qt:$r)(e,ko(t,3))},hr.flatMap=function(e,t){return Wr(Qu(e,t),1)},hr.flatMapDeep=function(e,t){return Wr(Qu(e,t),N)},hr.flatMapDepth=function(e,t,n){return n=n===o?1:Ha(n),Wr(Qu(e,t),n)},hr.flatten=mu,hr.flattenDeep=function(e){return null!=e&&e.length?Wr(e,N):[]},hr.flattenDepth=function(e,t){return null!=e&&e.length?Wr(e,t=t===o?1:Ha(t)):[]},hr.flip=function(e){return Ao(e,S)},hr.flow=Cs,hr.flowRight=Ps,hr.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},hr.functions=function(e){return null==e?[]:Xr(e,is(e))},hr.functionsIn=function(e){return null==e?[]:Xr(e,os(e))},hr.groupBy=Gu,hr.initial=function(e){return null!=e&&e.length?Oi(e,0,-1):[]},hr.intersection=wu,hr.intersectionBy=bu,hr.intersectionWith=Eu,hr.invert=ts,hr.invertBy=ns,hr.invokeMap=Vu,hr.iteratee=Ls,hr.keyBy=Xu,hr.keys=is,hr.keysIn=os,hr.map=Qu,hr.mapKeys=function(e,t){var n={};return t=ko(t,3),Gr(e,function(e,r,i){Dr(n,t(e,r,i),e)}),n},hr.mapValues=function(e,t){var n={};return t=ko(t,3),Gr(e,function(e,r,i){Dr(n,r,t(e,r,i))}),n},hr.matches=function(e){return hi(jr(e,p))},hr.matchesProperty=function(e,t){return di(e,jr(t,p))},hr.memoize=aa,hr.merge=us,hr.mergeWith=as,hr.method=Ds,hr.methodOf=Ns,hr.mixin=Us,hr.negate=sa,hr.nthArg=function(e){return e=Ha(e),Ti(function(t){return vi(t,e)})},hr.omit=ss,hr.omitBy=function(e,t){return fs(e,sa(ko(t)))},hr.once=function(e){return ta(2,e)},hr.orderBy=function(e,t,n,r){return null==e?[]:(ya(t)||(t=null==t?[]:[t]),ya(n=r?o:n)||(n=null==n?[]:[n]),yi(e,t,n))},hr.over=ks,hr.overArgs=ca,hr.overEvery=Is,hr.overSome=Bs,hr.partial=fa,hr.partialRight=la,hr.partition=Ku,hr.pick=cs,hr.pickBy=fs,hr.property=Ms,hr.propertyOf=function(e){return function(t){return null==e?o:Qr(e,t)}},hr.pull=xu,hr.pullAll=Au,hr.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?_i(e,t,ko(n,2)):e},hr.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?_i(e,t,o,n):e},hr.pullAt=Su,hr.range=qs,hr.rangeRight=Hs,hr.rearg=pa,hr.reject=function(e,t){return(ya(e)?Qt:$r)(e,sa(ko(t,3)))},hr.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=ko(t,3);++r<o;){var u=e[r];t(u,r,e)&&(n.push(u),i.push(r))}return wi(e,i),n},hr.rest=function(e,t){if("function"!=typeof e)throw new it(s);return Ti(e,t=t===o?t:Ha(t))},hr.reverse=Ru,hr.sampleSize=function(e,t,n){return t=(n?Go(e,t,n):t===o)?1:Ha(t),(ya(e)?Ar:Ai)(e,t)},hr.set=function(e,t,n){return null==e?e:Si(e,t,n)},hr.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Si(e,t,n,r)},hr.shuffle=function(e){return(ya(e)?Sr:Pi)(e)},hr.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Go(e,t,n)?(t=0,n=r):(t=null==t?0:Ha(t),n=n===o?r:Ha(n)),Oi(e,t,n)):[]},hr.sortBy=Ju,hr.sortedUniq=function(e){return e&&e.length?Ui(e):[]},hr.sortedUniqBy=function(e,t){return e&&e.length?Ui(e,ko(t,2)):[]},hr.split=function(e,t,n){return n&&"number"!=typeof n&&Go(e,t,n)&&(t=n=o),(n=n===o?I:n>>>0)?(e=Ya(e))&&("string"==typeof t||null!=t&&!Da(t))&&!(t=ki(t))&&An(e)?Vi(Dn(e),0,n):e.split(t,n):[]},hr.spread=function(e,t){if("function"!=typeof e)throw new it(s);return t=null==t?0:Yn(Ha(t),0),Ti(function(n){var r=n[t],i=Vi(n,0,t);return r&&en(i,r),Yt(e,this,i)})},hr.tail=function(e){var t=null==e?0:e.length;return t?Oi(e,1,t):[]},hr.take=function(e,t,n){return e&&e.length?Oi(e,0,(t=n||t===o?1:Ha(t))<0?0:t):[]},hr.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Oi(e,(t=r-(t=n||t===o?1:Ha(t)))<0?0:t,r):[]},hr.takeRightWhile=function(e,t){return e&&e.length?qi(e,ko(t,3),!1,!0):[]},hr.takeWhile=function(e,t){return e&&e.length?qi(e,ko(t,3)):[]},hr.tap=function(e,t){return t(e),e},hr.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new it(s);return Ra(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ia(e,t,{leading:r,maxWait:t,trailing:i})},hr.thru=qu,hr.toArray=Ma,hr.toPairs=ls,hr.toPairsIn=ps,hr.toPath=function(e){return ya(e)?Zt(e,fu):ja(e)?[e]:no(cu(Ya(e)))},hr.toPlainObject=Wa,hr.transform=function(e,t,n){var r=ya(e),i=r||ba(e)||ka(e);if(t=ko(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ra(e)&&xa(o)?dr(Lt(e)):{}}return(i?Gt:Gr)(e,function(e,r,i){return t(n,e,r,i)}),n},hr.unary=function(e){return ea(e,1)},hr.union=Cu,hr.unionBy=Pu,hr.unionWith=Ou,hr.uniq=function(e){return e&&e.length?Ii(e):[]},hr.uniqBy=function(e,t){return e&&e.length?Ii(e,ko(t,2)):[]},hr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?Ii(e,o,t):[]},hr.unset=function(e,t){return null==e||Bi(e,t)},hr.unzip=Lu,hr.unzipWith=Du,hr.update=function(e,t,n){return null==e?e:Mi(e,t,Yi(n))},hr.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Mi(e,t,Yi(n),r)},hr.values=hs,hr.valuesIn=function(e){return null==e?[]:mn(e,os(e))},hr.without=Nu,hr.words=xs,hr.wrap=function(e,t){return fa(Yi(t),e)},hr.xor=Uu,hr.xorBy=ju,hr.xorWith=ku,hr.zip=Iu,hr.zipObject=function(e,t){return $i(e||[],t||[],Cr)},hr.zipObjectDeep=function(e,t){return $i(e||[],t||[],Si)},hr.zipWith=Bu,hr.entries=ls,hr.entriesIn=ps,hr.extend=Ga,hr.extendWith=Va,Us(hr,hr),hr.add=Ws,hr.attempt=As,hr.camelCase=ds,hr.capitalize=gs,hr.ceil=Ys,hr.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=$a(n))==n?n:0),t!==o&&(t=(t=$a(t))==t?t:0),Ur($a(e),t,n)},hr.clone=function(e){return jr(e,d)},hr.cloneDeep=function(e){return jr(e,p|d)},hr.cloneDeepWith=function(e,t){return jr(e,p|d,t="function"==typeof t?t:o)},hr.cloneWith=function(e,t){return jr(e,d,t="function"==typeof t?t:o)},hr.conformsTo=function(e,t){return null==t||kr(e,t,is(t))},hr.deburr=vs,hr.defaultTo=function(e,t){return null==e||e!=e?t:e},hr.divide=zs,hr.endsWith=function(e,t,n){e=Ya(e),t=ki(t);var r=e.length,i=n=n===o?r:Ur(Ha(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},hr.eq=ha,hr.escape=function(e){return(e=Ya(e))&&Ae.test(e)?e.replace(Te,Tn):e},hr.escapeRegExp=function(e){return(e=Ya(e))&&Ne.test(e)?e.replace(De,"\\$&"):e},hr.every=function(e,t,n){var r=ya(e)?Xt:Hr;return n&&Go(e,t,n)&&(t=o),r(e,ko(t,3))},hr.find=$u,hr.findIndex=vu,hr.findKey=function(e,t){return un(e,ko(t,3),Gr)},hr.findLast=Wu,hr.findLastIndex=yu,hr.findLastKey=function(e,t){return un(e,ko(t,3),Vr)},hr.floor=Gs,hr.forEach=Yu,hr.forEachRight=zu,hr.forIn=function(e,t){return null==e?e:Yr(e,ko(t,3),os)},hr.forInRight=function(e,t){return null==e?e:zr(e,ko(t,3),os)},hr.forOwn=function(e,t){return e&&Gr(e,ko(t,3))},hr.forOwnRight=function(e,t){return e&&Vr(e,ko(t,3))},hr.get=Za,hr.gt=da,hr.gte=ga,hr.has=function(e,t){return null!=e&&$o(e,t,ei)},hr.hasIn=es,hr.head=_u,hr.identity=Os,hr.includes=function(e,t,n,r){e=_a(e)?e:hs(e),n=n&&!r?Ha(n):0;var i=e.length;return n<0&&(n=Yn(i+n,0)),Ua(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&sn(e,t,n)>-1},hr.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Ha(n);return i<0&&(i=Yn(r+i,0)),sn(e,t,i)},hr.inRange=function(e,t,n){return t=qa(t),n===o?(n=t,t=0):n=qa(n),function(e,t,n){return e>=zn(t,n)&&e<Yn(t,n)}(e=$a(e),t,n)},hr.invoke=rs,hr.isArguments=va,hr.isArray=ya,hr.isArrayBuffer=ma,hr.isArrayLike=_a,hr.isArrayLikeObject=wa,hr.isBoolean=function(e){return!0===e||!1===e||Ca(e)&&Jr(e)==W},hr.isBuffer=ba,hr.isDate=Ea,hr.isElement=function(e){return Ca(e)&&1===e.nodeType&&!La(e)},hr.isEmpty=function(e){if(null==e)return!0;if(_a(e)&&(ya(e)||"string"==typeof e||"function"==typeof e.splice||ba(e)||ka(e)||va(e)))return!e.length;var t=Fo(e);if(t==Q||t==ne)return!e.size;if(Ko(e))return!ci(e).length;for(var n in e)if(ft.call(e,n))return!1;return!0},hr.isEqual=function(e,t){return oi(e,t)},hr.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?oi(e,t,o,n):!!r},hr.isError=Ta,hr.isFinite=function(e){return"number"==typeof e&&Fn(e)},hr.isFunction=xa,hr.isInteger=Aa,hr.isLength=Sa,hr.isMap=Pa,hr.isMatch=function(e,t){return e===t||ui(e,t,Bo(t))},hr.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,ui(e,t,Bo(t),n)},hr.isNaN=function(e){return Oa(e)&&e!=+e},hr.isNative=function(e){if(Qo(e))throw new Je(a);return ai(e)},hr.isNil=function(e){return null==e},hr.isNull=function(e){return null===e},hr.isNumber=Oa,hr.isObject=Ra,hr.isObjectLike=Ca,hr.isPlainObject=La,hr.isRegExp=Da,hr.isSafeInteger=function(e){return Aa(e)&&e>=-U&&e<=U},hr.isSet=Na,hr.isString=Ua,hr.isSymbol=ja,hr.isTypedArray=ka,hr.isUndefined=function(e){return e===o},hr.isWeakMap=function(e){return Ca(e)&&Fo(e)==ue},hr.isWeakSet=function(e){return Ca(e)&&Jr(e)==ae},hr.join=function(e,t){return null==e?"":$n.call(e,t)},hr.kebabCase=ys,hr.last=Tu,hr.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=Ha(n))<0?Yn(r+i,0):zn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):an(e,fn,i,!0)},hr.lowerCase=ms,hr.lowerFirst=_s,hr.lt=Ia,hr.lte=Ba,hr.max=function(e){return e&&e.length?Fr(e,Os,Zr):o},hr.maxBy=function(e,t){return e&&e.length?Fr(e,ko(t,2),Zr):o},hr.mean=function(e){return ln(e,Os)},hr.meanBy=function(e,t){return ln(e,ko(t,2))},hr.min=function(e){return e&&e.length?Fr(e,Os,li):o},hr.minBy=function(e,t){return e&&e.length?Fr(e,ko(t,2),li):o},hr.stubArray=Fs,hr.stubFalse=$s,hr.stubObject=function(){return{}},hr.stubString=function(){return""},hr.stubTrue=function(){return!0},hr.multiply=Xs,hr.nth=function(e,t){return e&&e.length?vi(e,Ha(t)):o},hr.noConflict=function(){return Nt._===this&&(Nt._=gt),this},hr.noop=js,hr.now=Zu,hr.pad=function(e,t,n){e=Ya(e);var r=(t=Ha(t))?Ln(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return mo(Mn(i),n)+e+mo(Bn(i),n)},hr.padEnd=function(e,t,n){e=Ya(e);var r=(t=Ha(t))?Ln(e):0;return t&&r<t?e+mo(t-r,n):e},hr.padStart=function(e,t,n){e=Ya(e);var r=(t=Ha(t))?Ln(e):0;return t&&r<t?mo(t-r,n)+e:e},hr.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Vn(Ya(e).replace(je,""),t||0)},hr.random=function(e,t,n){if(n&&"boolean"!=typeof n&&Go(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=qa(e),t===o?(t=e,e=0):t=qa(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Xn();return zn(e+i*(t-e+Pt("1e-"+((i+"").length-1))),t)}return bi(e,t)},hr.reduce=function(e,t,n){var r=ya(e)?tn:dn,i=arguments.length<3;return r(e,ko(t,4),n,i,Mr)},hr.reduceRight=function(e,t,n){var r=ya(e)?nn:dn,i=arguments.length<3;return r(e,ko(t,4),n,i,qr)},hr.repeat=function(e,t,n){return t=(n?Go(e,t,n):t===o)?1:Ha(t),Ei(Ya(e),t)},hr.replace=function(){var e=arguments,t=Ya(e[0]);return e.length<3?t:t.replace(e[1],e[2])},hr.result=function(e,t,n){var r=-1,i=(t=zi(t,e)).length;for(i||(i=1,e=o);++r<i;){var u=null==e?o:e[fu(t[r])];u===o&&(r=i,u=n),e=xa(u)?u.call(e):u}return e},hr.round=Qs,hr.runInContext=e,hr.sample=function(e){return(ya(e)?xr:xi)(e)},hr.size=function(e){if(null==e)return 0;if(_a(e))return Ua(e)?Ln(e):e.length;var t=Fo(e);return t==Q||t==ne?e.size:ci(e).length},hr.snakeCase=ws,hr.some=function(e,t,n){var r=ya(e)?rn:Li;return n&&Go(e,t,n)&&(t=o),r(e,ko(t,3))},hr.sortedIndex=function(e,t){return Di(e,t)},hr.sortedIndexBy=function(e,t,n){return Ni(e,t,ko(n,2))},hr.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Di(e,t);if(r<n&&ha(e[r],t))return r}return-1},hr.sortedLastIndex=function(e,t){return Di(e,t,!0)},hr.sortedLastIndexBy=function(e,t,n){return Ni(e,t,ko(n,2),!0)},hr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Di(e,t,!0)-1;if(ha(e[n],t))return n}return-1},hr.startCase=bs,hr.startsWith=function(e,t,n){return e=Ya(e),n=null==n?0:Ur(Ha(n),0,e.length),t=ki(t),e.slice(n,n+t.length)==t},hr.subtract=Ks,hr.sum=function(e){return e&&e.length?gn(e,Os):0},hr.sumBy=function(e,t){return e&&e.length?gn(e,ko(t,2)):0},hr.template=function(e,t,n){var r=hr.templateSettings;n&&Go(e,t,n)&&(t=o),e=Ya(e),t=Va({},t,r,So);var i,u,a=Va({},t.imports,r.imports,So),s=is(a),c=mn(a,s),f=0,l=t.interpolate||Qe,p="__p += '",h=nt((t.escape||Qe).source+"|"+l.source+"|"+(l===Ce?Fe:Qe).source+"|"+(t.evaluate||Qe).source+"|$","g"),d="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++At+"]")+"\n";e.replace(h,function(t,n,r,o,a,s){return r||(r=o),p+=e.slice(f,s).replace(Ke,xn),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=s+t.length,t}),p+="';\n";var g=t.variable;g||(p="with (obj) {\n"+p+"\n}\n"),p=(u?p.replace(_e,""):p).replace(we,"$1").replace(be,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=As(function(){return Ze(s,d+"return "+p).apply(o,c)});if(v.source=p,Ta(v))throw v;return v},hr.times=function(e,t){if((e=Ha(e))<1||e>U)return[];var n=I,r=zn(e,I);t=ko(t),e-=I;for(var i=vn(r,t);++n<e;)t(n);return i},hr.toFinite=qa,hr.toInteger=Ha,hr.toLength=Fa,hr.toLower=function(e){return Ya(e).toLowerCase()},hr.toNumber=$a,hr.toSafeInteger=function(e){return e?Ur(Ha(e),-U,U):0===e?e:0},hr.toString=Ya,hr.toUpper=function(e){return Ya(e).toUpperCase()},hr.trim=function(e,t,n){if((e=Ya(e))&&(n||t===o))return e.replace(Ue,"");if(!e||!(t=ki(t)))return e;var r=Dn(e),i=Dn(t);return Vi(r,wn(r,i),bn(r,i)+1).join("")},hr.trimEnd=function(e,t,n){if((e=Ya(e))&&(n||t===o))return e.replace(ke,"");if(!e||!(t=ki(t)))return e;var r=Dn(e);return Vi(r,0,bn(r,Dn(t))+1).join("")},hr.trimStart=function(e,t,n){if((e=Ya(e))&&(n||t===o))return e.replace(je,"");if(!e||!(t=ki(t)))return e;var r=Dn(e);return Vi(r,wn(r,Dn(t))).join("")},hr.truncate=function(e,t){var n=R,r=C;if(Ra(t)){var i="separator"in t?t.separator:i;n="length"in t?Ha(t.length):n,r="omission"in t?ki(t.omission):r}var u=(e=Ya(e)).length;if(An(e)){var a=Dn(e);u=a.length}if(n>=u)return e;var s=n-Ln(r);if(s<1)return r;var c=a?Vi(a,0,s).join(""):e.slice(0,s);if(i===o)return c+r;if(a&&(s+=c.length-s),Da(i)){if(e.slice(s).search(i)){var f,l=c;for(i.global||(i=nt(i.source,Ya($e.exec(i))+"g")),i.lastIndex=0;f=i.exec(l);)var p=f.index;c=c.slice(0,p===o?s:p)}}else if(e.indexOf(ki(i),s)!=s){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+r},hr.unescape=function(e){return(e=Ya(e))&&xe.test(e)?e.replace(Ee,Nn):e},hr.uniqueId=function(e){var t=++lt;return Ya(e)+t},hr.upperCase=Es,hr.upperFirst=Ts,hr.each=Yu,hr.eachRight=zu,hr.first=_u,Us(hr,(Vs={},Gr(hr,function(e,t){ft.call(hr.prototype,t)||(Vs[t]=e)}),Vs),{chain:!1}),hr.VERSION="4.17.11",Gt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){hr[e].placeholder=hr}),Gt(["drop","take"],function(e,t){yr.prototype[e]=function(n){n=n===o?1:Yn(Ha(n),0);var r=this.__filtered__&&!t?new yr(this):this.clone();return r.__filtered__?r.__takeCount__=zn(n,r.__takeCount__):r.__views__.push({size:zn(n,I),type:e+(r.__dir__<0?"Right":"")}),r},yr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Gt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==L||3==n;yr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ko(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Gt(["head","last"],function(e,t){var n="take"+(t?"Right":"");yr.prototype[e]=function(){return this[n](1).value()[0]}}),Gt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");yr.prototype[e]=function(){return this.__filtered__?new yr(this):this[n](1)}}),yr.prototype.compact=function(){return this.filter(Os)},yr.prototype.find=function(e){return this.filter(e).head()},yr.prototype.findLast=function(e){return this.reverse().find(e)},yr.prototype.invokeMap=Ti(function(e,t){return"function"==typeof e?new yr(this):this.map(function(n){return ri(n,e,t)})}),yr.prototype.reject=function(e){return this.filter(sa(ko(e)))},yr.prototype.slice=function(e,t){e=Ha(e);var n=this;return n.__filtered__&&(e>0||t<0)?new yr(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=Ha(t))<0?n.dropRight(-t):n.take(t-e)),n)},yr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},yr.prototype.toArray=function(){return this.take(I)},Gr(yr.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=hr[r?"take"+("last"==t?"Right":""):t],u=r||/^find/.test(t);i&&(hr.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof yr,c=a[0],f=s||ya(t),l=function(e){var t=i.apply(hr,en([e],a));return r&&p?t[0]:t};f&&n&&"function"==typeof c&&1!=c.length&&(s=f=!1);var p=this.__chain__,h=!!this.__actions__.length,d=u&&!p,g=s&&!h;if(!u&&f){t=g?t:new yr(this);var v=e.apply(t,a);return v.__actions__.push({func:qu,args:[l],thisArg:o}),new vr(v,p)}return d&&g?e.apply(this,a):(v=this.thru(l),d?r?v.value()[0]:v.value():v)})}),Gt(["pop","push","shift","sort","splice","unshift"],function(e){var t=ot[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);hr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ya(i)?i:[],e)}return this[n](function(n){return t.apply(ya(n)?n:[],e)})}}),Gr(yr.prototype,function(e,t){var n=hr[t];if(n){var r=n.name+"";(ir[r]||(ir[r]=[])).push({name:t,func:n})}}),ir[ho(o,m).name]=[{name:"wrapper",func:o}],yr.prototype.clone=function(){var e=new yr(this.__wrapped__);return e.__actions__=no(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=no(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=no(this.__views__),e},yr.prototype.reverse=function(){if(this.__filtered__){var e=new yr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},yr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=ya(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],u=o.size;switch(o.type){case"drop":e+=u;break;case"dropRight":t-=u;break;case"take":t=zn(t,e+u);break;case"takeRight":e=Yn(e,t-u)}}return{start:e,end:t}}(0,i,this.__views__),u=o.start,a=o.end,s=a-u,c=r?a:u-1,f=this.__iteratees__,l=f.length,p=0,h=zn(s,this.__takeCount__);if(!n||!r&&i==s&&h==s)return Hi(e,this.__actions__);var d=[];e:for(;s--&&p<h;){for(var g=-1,v=e[c+=t];++g<l;){var y=f[g],m=y.iteratee,_=y.type,w=m(v);if(_==D)v=w;else if(!w){if(_==L)continue e;break e}}d[p++]=v}return d},hr.prototype.at=Hu,hr.prototype.chain=function(){return Mu(this)},hr.prototype.commit=function(){return new vr(this.value(),this.__chain__)},hr.prototype.next=function(){this.__values__===o&&(this.__values__=Ma(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},hr.prototype.plant=function(e){for(var t,n=this;n instanceof gr;){var r=pu(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},hr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof yr){var t=e;return this.__actions__.length&&(t=new yr(this)),(t=t.reverse()).__actions__.push({func:qu,args:[Ru],thisArg:o}),new vr(t,this.__chain__)}return this.thru(Ru)},hr.prototype.toJSON=hr.prototype.valueOf=hr.prototype.value=function(){return Hi(this.__wrapped__,this.__actions__)},hr.prototype.first=hr.prototype.head,Bt&&(hr.prototype[Bt]=function(){return this}),hr}();Nt._=Un,(i=function(){return Un}.call(t,n,t,r))===o||(r.exports=i)}).call(this)}).call(this,n(9),n(54)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";var r=n(56);function i(e){this.message=e}i.prototype=new Error,i.prototype.name="InvalidTokenError",e.exports=function(e,t){if("string"!=typeof e)throw new i("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(r(e.split(".")[n]))}catch(e){throw new i("Invalid token specified: "+e.message)}},e.exports.InvalidTokenError=i},function(e,t,n){var r=n(57);e.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}(t)}catch(e){return r(t)}}},function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError",e.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,o,u=0,a=0,s="";o=t.charAt(a++);~o&&(i=u%4?64*i+o:o,u++%4)?s+=String.fromCharCode(255&i>>(-2*u&6)):0)o=n.indexOf(o);return s}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(1)),u=n(5),a=n(3);t.default=new class extends u.AbstractApiService{login(e,t){return r(this,void 0,void 0,function*(){try{const n=yield o.default.post("/token/",{username:e,password:t});console.log(n),localStorage.setItem(u.AbstractApiService.ACCESS_TOKEN_PARAM,n.data.access),localStorage.setItem(u.AbstractApiService.REFRESH_TOKEN_PARAM,n.data.refresh)}catch(e){throw new Error(JSON.stringify(e.response.data))}if(![a.RoleNames.TEACHER,a.RoleNames.SLE_ADMIN].includes(this.RoleName))throw this.cleanTokens(),new Error("You don't have permissions to view this page");return!0})}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(u,a)}s((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(1)),u=n(5);t.default=new class extends u.AbstractApiService{getWebHubs(){return r(this,void 0,void 0,function*(){try{return(yield o.default.get("/hubs/")).data.filter(e=>"browser"===e.type)}catch(e){throw new Error(JSON.stringify(e.response.data))}})}getHubFirmware(e){return r(this,void 0,void 0,function*(){try{return(yield o.default.get("/hubs/microbit-firmware/",{params:{uid:e},responseType:"arraybuffer"})).data}catch(e){throw new Error(JSON.stringify(e.response.data))}})}}},function(e,t,n){}]);