@kohost/api-client 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1 -1
- package/package.json +1 -1
- package/src/interceptors.js +5 -2
package/dist/bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=144)}([function(t,e,r){"use strict";var n=r(33),o=Object.prototype.toString;function s(t){return"[object Array]"===o.call(t)}function i(t){return void 0===t}function u(t){return null!==t&&"object"==typeof t}function a(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===o.call(t)}function h(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!i(t)&&null!==t.constructor&&!i(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:u,isPlainObject:a,isUndefined:i,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:c,isStream:function(t){return u(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:h,merge:function t(){var e={};function r(r,n){a(e[n])&&a(r)?e[n]=t(e[n],r):a(r)?e[n]=t({},r):s(r)?e[n]=r.slice():e[n]=r}for(var n=0,o=arguments.length;n<o;n++)h(arguments[n],r);return e},extend:function(t,e,r){return h(e,(function(e,o){t[o]=r&&"function"==typeof e?n(e,r):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){var n=r(19),o="object"==typeof self&&self&&self.Object===Object&&self,s=n||o||Function("return this")();t.exports=s},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,r){var n=r(50),o=r(51),s=r(52),i=r(53),u=r(54);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},function(t,e,r){var n=r(6);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(18),o=r(61),s=r(62),i=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":i&&i in Object(t)?o(t):s(t)}},function(t,e,r){var n=r(10)(Object,"create");t.exports=n},function(t,e,r){var n=r(76);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e,r){var n=r(60),o=r(66);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},function(t,e,r){var n=r(7),o=r(1);t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,r){var n=r(21);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){var n=r(11),o=r(26);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},function(t,e,r){"use strict";var n=r(0);function o(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var s;if(r)s=r(e);else if(n.isURLSearchParams(e))s=e.toString();else{var i=[];n.forEach(e,(function(t,e){null!=t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,(function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),i.push(o(e)+"="+o(t))})))})),s=i.join("&")}if(s){var u=t.indexOf("#");-1!==u&&(t=t.slice(0,u)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}},function(t,e,r){"use strict";var n=r(37);t.exports=function(t,e,r,o,s){var i=new Error(t);return n(i,e,r,o,s)}},function(t,e,r){var n=r(10)(r(2),"Map");t.exports=n},function(t,e,r){var n=r(2).Symbol;t.exports=n},function(t,e){var r="object"==typeof global&&global&&global.Object===Object&&global;t.exports=r},function(t,e,r){var n=r(12),o=r(6);t.exports=function(t,e,r){(void 0!==r&&!o(t[e],r)||void 0===r&&!(e in t))&&n(t,e,r)}},function(t,e,r){var n=r(10),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,r){var n=r(90)(Object.getPrototypeOf,Object);t.exports=n},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(91),o=r(3),s=Object.prototype,i=s.hasOwnProperty,u=s.propertyIsEnumerable,a=n(function(){return arguments}())?n:function(t){return o(t)&&i.call(t,"callee")&&!u.call(t,"callee")};t.exports=a},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){(function(t){var n=r(2),o=r(93),s=e&&!e.nodeType&&e,i=s&&"object"==typeof t&&t&&!t.nodeType&&t,u=i&&i.exports===s?n.Buffer:void 0,a=(u?u.isBuffer:void 0)||o;t.exports=a}).call(this,r(13)(t))},function(t,e,r){var n=r(95),o=r(96),s=r(97),i=s&&s.isTypedArray,u=i?o(i):n;t.exports=u},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e,r){var n=r(101),o=r(103),s=r(14);t.exports=function(t){return s(t)?n(t,!0):o(t)}},function(t,e){var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return t}},function(t,e,r){"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}}},function(t,e,r){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,r){"use strict";var n=r(0),o=r(119),s={"Content-Type":"application/x-www-form-urlencoded"};function i(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,a={adapter:("undefined"!=typeof XMLHttpRequest?u=r(120):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(u=r(126)),u),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)?t:n.isArrayBufferView(t)?t.buffer:n.isURLSearchParams(t)?(i(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)?(i(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(t){a.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){a.headers[t]=n.merge(s)})),t.exports=a},function(t,e,r){"use strict";var n=r(16);t.exports=function(t,e,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?e(n("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}},function(t,e,r){"use strict";t.exports=function(t,e,r,n,o){return t.config=e,r&&(t.code=r),t.request=n,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,r){"use strict";var n=r(122),o=r(123);t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},function(t,e){t.exports=require("http")},function(t,e){t.exports=require("https")},function(t,e,r){var n=r(42),o=n.URL,s=r(39),i=r(40),u=r(127).Writable,a=r(128),c=r(129),h=Object.create(null);["abort","aborted","connect","error","socket","timeout"].forEach((function(t){h[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}}));var f=C("ERR_FR_REDIRECTION_FAILURE",""),p=C("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),d=C("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),l=C("ERR_STREAM_WRITE_AFTER_END","write after end");function m(t,e){u.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(t){r._processResponse(t)},this._performRequest()}function g(t,e){clearTimeout(t._timeout),t._timeout=setTimeout((function(){t.emit("timeout")}),e)}function y(){clearTimeout(this._timeout)}function v(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach((function(s){var i=s+":",u=r[i]=t[s],h=e[s]=Object.create(u);Object.defineProperties(h,{request:{value:function(t,s,u){if("string"==typeof t){var h=t;try{t=x(new o(h))}catch(e){t=n.parse(h)}}else o&&t instanceof o?t=x(t):(u=s,s=t,t={protocol:i});return"function"==typeof s&&(u=s,s=null),(s=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},t,s)).nativeProtocols=r,a.equal(s.protocol,i,"protocol mismatch"),c("options",s),new m(s,u)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(t,e,r){var n=h.request(t,e,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),e}function b(){}function x(t){var e={protocol:t.protocol,hostname:t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:t.pathname+t.search,href:t.href};return""!==t.port&&(e.port=Number(t.port)),e}function _(t,e){var r;for(var n in e)t.test(n)&&(r=e[n],delete e[n]);return r}function C(t,e){function r(t){Error.captureStackTrace(this,this.constructor),this.message=t||e}return r.prototype=new Error,r.prototype.constructor=r,r.prototype.name="Error ["+t+"]",r.prototype.code=t,r}m.prototype=Object.create(u.prototype),m.prototype.write=function(t,e,r){if(this._ending)throw new l;if(!("string"==typeof t||"object"==typeof t&&"length"in t))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof e&&(r=e,e=null),0!==t.length?this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new d),this.abort()):r&&r()},m.prototype.end=function(t,e,r){if("function"==typeof t?(r=t,t=e=null):"function"==typeof e&&(r=e,e=null),t){var n=this,o=this._currentRequest;this.write(t,e,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},m.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)},m.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)},m.prototype.setTimeout=function(t,e){if(e&&this.once("timeout",e),this.socket)g(this,t);else{var r=this;this._currentRequest.once("socket",(function(){g(r,t)}))}return this.once("response",y),this.once("error",y),this},["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(t){m.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}})),["aborted","connection","socket"].forEach((function(t){Object.defineProperty(m.prototype,t,{get:function(){return this._currentRequest[t]}})})),m.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}},m.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(e){if(this._options.agents){var r=t.substr(0,t.length-1);this._options.agent=this._options.agents[r]}var o=this._currentRequest=e.request(this._options,this._onNativeResponse);for(var s in this._currentUrl=n.format(this._options),o._redirectable=this,h)s&&o.on(s,h[s]);if(this._isRedirect){var i=0,u=this,a=this._requestBodyBuffers;!function t(e){if(o===u._currentRequest)if(e)u.emit("error",e);else if(i<a.length){var r=a[i++];o.finished||o.write(r.data,r.encoding,t)}else u._ended&&o.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+t))},m.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(r&&!1!==this._options.followRedirects&&e>=300&&e<400){if(this._currentRequest.removeAllListeners(),this._currentRequest.on("error",b),this._currentRequest.abort(),t.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new p);((301===e||302===e)&&"POST"===this._options.method||303===e&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],_(/^content-/i,this._options.headers));var o=_(/^host$/i,this._options.headers)||n.parse(this._currentUrl).hostname,s=n.resolve(this._currentUrl,r);c("redirecting to",s),this._isRedirect=!0;var i=n.parse(s);if(Object.assign(this._options,i),i.hostname!==o&&_(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var u={headers:t.headers};try{this._options.beforeRedirect.call(null,this._options,u)}catch(t){return void this.emit("error",t)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(t){var a=new f("Redirected request failed: "+t.message);a.cause=t,this.emit("error",a)}}else t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[]},t.exports=v({http:s,https:i}),t.exports.wrap=v},function(t,e){t.exports=require("url")},function(t,e,r){t.exports=function(t){function e(t){let r,o=null;function s(...t){if(!s.enabled)return;const n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let u=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(r,o)=>{if("%%"===r)return"%";u++;const s=e.formatters[o];if("function"==typeof s){const e=t[u];r=s.call(n,e),t.splice(u,1),u--}return r}),e.formatArgs.call(n,t);(n.log||e.log).apply(n,t)}return s.namespace=t,s.useColors=e.useColors(),s.color=e.selectColor(t),s.extend=n,s.destroy=e.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===o?e.enabled(t):o,set:t=>{o=t}}),"function"==typeof e.init&&e.init(s),s}function n(t,r){const n=e(this.namespace+(void 0===r?":":r)+t);return n.log=this.log,n}function o(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(o),...e.skips.map(o).map(t=>"-"+t)].join(",");return e.enable(""),t},e.enable=function(t){let r;e.save(t),e.names=[],e.skips=[];const n=("string"==typeof t?t:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(t=n[r].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(132),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(r=>{e[r]=t[r]}),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e<t.length;e++)r=(r<<5)-r+t.charCodeAt(e),r|=0;return e.colors[Math.abs(r)%e.colors.length]},e.enable(e.load()),e}},function(t,e,r){"use strict";var n=r(0);t.exports=function(t,e){e=e||{};var r={},o=["url","method","data"],s=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],u=["validateStatus"];function a(t,e){return n.isPlainObject(t)&&n.isPlainObject(e)?n.merge(t,e):n.isPlainObject(e)?n.merge({},e):n.isArray(e)?e.slice():e}function c(o){n.isUndefined(e[o])?n.isUndefined(t[o])||(r[o]=a(void 0,t[o])):r[o]=a(t[o],e[o])}n.forEach(o,(function(t){n.isUndefined(e[t])||(r[t]=a(void 0,e[t]))})),n.forEach(s,c),n.forEach(i,(function(o){n.isUndefined(e[o])?n.isUndefined(t[o])||(r[o]=a(void 0,t[o])):r[o]=a(void 0,e[o])})),n.forEach(u,(function(n){n in e?r[n]=a(t[n],e[n]):n in t&&(r[n]=a(void 0,t[n]))}));var h=o.concat(s).concat(i).concat(u),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===h.indexOf(t)}));return n.forEach(f,c),r}},function(t,e,r){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,r){var n=r(48),o=r(105)((function(t,e,r){n(t,e,r)}));t.exports=o},function(t,e,r){t.exports=r(114)},function(t,e,r){var n=r(49),o=r(20),s=r(80),i=r(82),u=r(1),a=r(30),c=r(29);t.exports=function t(e,r,h,f,p){e!==r&&s(r,(function(s,a){if(p||(p=new n),u(s))i(e,r,a,h,t,f,p);else{var d=f?f(c(e,a),s,a+"",e,r,p):void 0;void 0===d&&(d=s),o(e,a,d)}}),a)}},function(t,e,r){var n=r(4),o=r(55),s=r(56),i=r(57),u=r(58),a=r(59);function c(t){var e=this.__data__=new n(t);this.size=e.size}c.prototype.clear=o,c.prototype.delete=s,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(5),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():o.call(e,r,1),--this.size,!0)}},function(t,e,r){var n=r(5);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(5);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(5);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},function(t,e,r){var n=r(4);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(4),o=r(17),s=r(67);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new s(i)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(11),o=r(63),s=r(1),i=r(65),u=/^\[object .+?Constructor\]$/,a=Function.prototype,c=Object.prototype,h=a.toString,f=c.hasOwnProperty,p=RegExp("^"+h.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||o(t))&&(n(t)?p:u).test(i(t))}},function(t,e,r){var n=r(18),o=Object.prototype,s=o.hasOwnProperty,i=o.toString,u=n?n.toStringTag:void 0;t.exports=function(t){var e=s.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=i.call(t);return n&&(e?t[u]=r:delete t[u]),o}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n,o=r(64),s=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!s&&s in t}},function(t,e,r){var n=r(2)["__core-js_shared__"];t.exports=n},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,r){var n=r(68),o=r(75),s=r(77),i=r(78),u=r(79);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},function(t,e,r){var n=r(69),o=r(4),s=r(17);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||o),string:new n}}},function(t,e,r){var n=r(70),o=r(71),s=r(72),i=r(73),u=r(74);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},function(t,e,r){var n=r(8);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(8),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(8),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},function(t,e,r){var n=r(8);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,r){var n=r(9);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(9);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(9);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(9);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},function(t,e,r){var n=r(81)();t.exports=n},function(t,e){t.exports=function(t){return function(e,r,n){for(var o=-1,s=Object(e),i=n(e),u=i.length;u--;){var a=i[t?u:++o];if(!1===r(s[a],a,s))break}return e}}},function(t,e,r){var n=r(20),o=r(83),s=r(84),i=r(87),u=r(88),a=r(24),c=r(25),h=r(92),f=r(27),p=r(11),d=r(1),l=r(94),m=r(28),g=r(29),y=r(98);t.exports=function(t,e,r,v,b,x,_){var C=g(t,r),w=g(e,r),R=_.get(w);if(R)n(t,r,R);else{var T=x?x(C,w,r+"",t,e,_):void 0,k=void 0===T;if(k){var $=c(w),O=!$&&f(w),j=!$&&!O&&m(w);T=w,$||O||j?c(C)?T=C:h(C)?T=i(C):O?(k=!1,T=o(w,!0)):j?(k=!1,T=s(w,!0)):T=[]:l(w)||a(w)?(T=C,a(C)?T=y(C):d(C)&&!p(C)||(T=u(w))):k=!1}k&&(_.set(w,T),b(T,w,v,x,_),_.delete(w)),n(t,r,T)}}},function(t,e,r){(function(t){var n=r(2),o=e&&!e.nodeType&&e,s=o&&"object"==typeof t&&t&&!t.nodeType&&t,i=s&&s.exports===o?n.Buffer:void 0,u=i?i.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(13)(t))},function(t,e,r){var n=r(85);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},function(t,e,r){var n=r(86);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},function(t,e,r){var n=r(2).Uint8Array;t.exports=n},function(t,e){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},function(t,e,r){var n=r(89),o=r(22),s=r(23);t.exports=function(t){return"function"!=typeof t.constructor||s(t)?{}:n(o(t))}},function(t,e,r){var n=r(1),o=Object.create,s=function(){function t(){}return function(e){if(!n(e))return{};if(o)return o(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=s},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(7),o=r(3);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},function(t,e,r){var n=r(14),o=r(3);t.exports=function(t){return o(t)&&n(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,r){var n=r(7),o=r(22),s=r(3),i=Function.prototype,u=Object.prototype,a=i.toString,c=u.hasOwnProperty,h=a.call(Object);t.exports=function(t){if(!s(t)||"[object Object]"!=n(t))return!1;var e=o(t);if(null===e)return!0;var r=c.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&a.call(r)==h}},function(t,e,r){var n=r(7),o=r(26),s=r(3),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,t.exports=function(t){return s(t)&&o(t.length)&&!!i[n(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){(function(t){var n=r(19),o=e&&!e.nodeType&&e,s=o&&"object"==typeof t&&t&&!t.nodeType&&t,i=s&&s.exports===o&&n.process,u=function(){try{var t=s&&s.require&&s.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=u}).call(this,r(13)(t))},function(t,e,r){var n=r(99),o=r(30);t.exports=function(t){return n(t,o(t))}},function(t,e,r){var n=r(100),o=r(12);t.exports=function(t,e,r,s){var i=!r;r||(r={});for(var u=-1,a=e.length;++u<a;){var c=e[u],h=s?s(r[c],t[c],c,r,t):void 0;void 0===h&&(h=t[c]),i?o(r,c,h):n(r,c,h)}return r}},function(t,e,r){var n=r(12),o=r(6),s=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var i=t[e];s.call(t,e)&&o(i,r)&&(void 0!==r||e in t)||n(t,e,r)}},function(t,e,r){var n=r(102),o=r(24),s=r(25),i=r(27),u=r(31),a=r(28),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=s(t),h=!r&&o(t),f=!r&&!h&&i(t),p=!r&&!h&&!f&&a(t),d=r||h||f||p,l=d?n(t.length,String):[],m=l.length;for(var g in t)!e&&!c.call(t,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||l.push(g);return l}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(1),o=r(23),s=r(104),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return s(t);var e=o(t),r=[];for(var u in t)("constructor"!=u||!e&&i.call(t,u))&&r.push(u);return r}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},function(t,e,r){var n=r(106),o=r(113);t.exports=function(t){return n((function(e,r){var n=-1,s=r.length,i=s>1?r[s-1]:void 0,u=s>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(s--,i):void 0,u&&o(r[0],r[1],u)&&(i=s<3?void 0:i,s=1),e=Object(e);++n<s;){var a=r[n];a&&t(e,a,n,i)}return e}))}},function(t,e,r){var n=r(32),o=r(107),s=r(109);t.exports=function(t,e){return s(o(t,e,n),t+"")}},function(t,e,r){var n=r(108),o=Math.max;t.exports=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var s=arguments,i=-1,u=o(s.length-e,0),a=Array(u);++i<u;)a[i]=s[e+i];i=-1;for(var c=Array(e+1);++i<e;)c[i]=s[i];return c[e]=r(a),n(t,this,c)}}},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(110),o=r(112)(n);t.exports=o},function(t,e,r){var n=r(111),o=r(21),s=r(32),i=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:s;t.exports=i},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var r=Date.now;t.exports=function(t){var e=0,n=0;return function(){var o=r(),s=16-(o-n);if(n=o,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){var n=r(6),o=r(14),s=r(31),i=r(1);t.exports=function(t,e,r){if(!i(r))return!1;var u=typeof e;return!!("number"==u?o(r)&&s(e,r.length):"string"==u&&e in r)&&n(r[e],t)}},function(t,e,r){"use strict";var n=r(0),o=r(33),s=r(115),i=r(44);function u(t){var e=new s(t),r=o(s.prototype.request,e);return n.extend(r,s.prototype,e),n.extend(r,e),r}var a=u(r(35));a.Axios=s,a.create=function(t){return u(i(a.defaults,t))},a.Cancel=r(45),a.CancelToken=r(141),a.isCancel=r(34),a.all=function(t){return Promise.all(t)},a.spread=r(142),a.isAxiosError=r(143),t.exports=a,t.exports.default=a},function(t,e,r){"use strict";var n=r(0),o=r(15),s=r(116),i=r(117),u=r(44);function a(t){this.defaults=t,this.interceptors={request:new s,response:new s}}a.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=u(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[i,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)r=r.then(e.shift(),e.shift());return r},a.prototype.getUri=function(t){return t=u(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){a.prototype[t]=function(e,r){return this.request(u(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){a.prototype[t]=function(e,r,n){return this.request(u(n||{},{method:t,url:e,data:r}))}})),t.exports=a},function(t,e,r){"use strict";var n=r(0);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(118),s=r(34),i=r(35);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||i.adapter)(t).then((function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,r){"use strict";var n=r(0);t.exports=function(t,e,r){return n.forEach(r,(function(r){t=r(t,e)})),t}},function(t,e,r){"use strict";var n=r(0);t.exports=function(t,e){n.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))}},function(t,e,r){"use strict";var n=r(0),o=r(36),s=r(121),i=r(15),u=r(38),a=r(124),c=r(125),h=r(16);t.exports=function(t){return new Promise((function(e,r){var f=t.data,p=t.headers;n.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var l=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";p.Authorization="Basic "+btoa(l+":"+m)}var g=u(t.baseURL,t.url);if(d.open(t.method.toUpperCase(),i(g,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,s={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:t,request:d};o(e,r,s),d=null}},d.onabort=function(){d&&(r(h("Request aborted",t,"ECONNABORTED",d)),d=null)},d.onerror=function(){r(h("Network Error",t,null,d)),d=null},d.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(h(e,t,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var y=(t.withCredentials||c(g))&&t.xsrfCookieName?s.read(t.xsrfCookieName):void 0;y&&(p[t.xsrfHeaderName]=y)}if("setRequestHeader"in d&&n.forEach(p,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete p[e]:d.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){d&&(d.abort(),r(t),d=null)})),f||(f=null),d.send(f)}))}},function(t,e,r){"use strict";var n=r(0);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,o,s,i){var u=[];u.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),n.isString(o)&&u.push("path="+o),n.isString(s)&&u.push("domain="+s),!0===i&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,r){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,r){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,r){"use strict";var n=r(0),o=["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"];t.exports=function(t){var e,r,s,i={};return t?(n.forEach(t.split("\n"),(function(t){if(s=t.indexOf(":"),e=n.trim(t.substr(0,s)).toLowerCase(),r=n.trim(t.substr(s+1)),e){if(i[e]&&o.indexOf(e)>=0)return;i[e]="set-cookie"===e?(i[e]?i[e]:[]).concat([r]):i[e]?i[e]+", "+r:r}})),i):i}},function(t,e,r){"use strict";var n=r(0);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=o(window.location.href),function(e){var r=n.isString(e)?o(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var n=r(0),o=r(36),s=r(38),i=r(15),u=r(39),a=r(40),c=r(41).http,h=r(41).https,f=r(42),p=r(139),d=r(140),l=r(16),m=r(37),g=/https:?/;t.exports=function(t){return new Promise((function(e,r){var y=function(t){e(t)},v=function(t){r(t)},b=t.data,x=t.headers;if(x["User-Agent"]||x["user-agent"]||(x["User-Agent"]="axios/"+d.version),b&&!n.isStream(b)){if(Buffer.isBuffer(b));else if(n.isArrayBuffer(b))b=Buffer.from(new Uint8Array(b));else{if(!n.isString(b))return v(l("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",t));b=Buffer.from(b,"utf-8")}x["Content-Length"]=b.length}var _=void 0;t.auth&&(_=(t.auth.username||"")+":"+(t.auth.password||""));var C=s(t.baseURL,t.url),w=f.parse(C),R=w.protocol||"http:";if(!_&&w.auth){var T=w.auth.split(":");_=(T[0]||"")+":"+(T[1]||"")}_&&delete x.Authorization;var k=g.test(R),$=k?t.httpsAgent:t.httpAgent,O={path:i(w.path,t.params,t.paramsSerializer).replace(/^\?/,""),method:t.method.toUpperCase(),headers:x,agent:$,agents:{http:t.httpAgent,https:t.httpsAgent},auth:_};t.socketPath?O.socketPath=t.socketPath:(O.hostname=w.hostname,O.port=w.port);var j,A=t.proxy;if(!A&&!1!==A){var E=R.slice(0,-1)+"_proxy",S=process.env[E]||process.env[E.toUpperCase()];if(S){var M=f.parse(S),F=process.env.no_proxy||process.env.NO_PROXY,P=!0;if(F)P=!F.split(",").map((function(t){return t.trim()})).some((function(t){return!!t&&("*"===t||("."===t[0]&&w.hostname.substr(w.hostname.length-t.length)===t||w.hostname===t))}));if(P&&(A={host:M.hostname,port:M.port,protocol:M.protocol},M.auth)){var L=M.auth.split(":");A.auth={username:L[0],password:L[1]}}}}A&&(O.headers.host=w.hostname+(w.port?":"+w.port:""),function t(e,r,n){if(e.hostname=r.host,e.host=r.host,e.port=r.port,e.path=n,r.auth){var o=Buffer.from(r.auth.username+":"+r.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+o}e.beforeRedirect=function(e){e.headers.host=e.host,t(e,r,e.href)}}(O,A,R+"//"+w.hostname+(w.port?":"+w.port:"")+O.path));var B=k&&(!A||g.test(A.protocol));t.transport?j=t.transport:0===t.maxRedirects?j=B?a:u:(t.maxRedirects&&(O.maxRedirects=t.maxRedirects),j=B?h:c),t.maxBodyLength>-1&&(O.maxBodyLength=t.maxBodyLength);var q=j.request(O,(function(e){if(!q.aborted){var r=e,s=e.req||q;if(204!==e.statusCode&&"HEAD"!==s.method&&!1!==t.decompress)switch(e.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(p.createUnzip()),delete e.headers["content-encoding"]}var i={status:e.statusCode,statusText:e.statusMessage,headers:e.headers,config:t,request:s};if("stream"===t.responseType)i.data=r,o(y,v,i);else{var u=[];r.on("data",(function(e){u.push(e),t.maxContentLength>-1&&Buffer.concat(u).length>t.maxContentLength&&(r.destroy(),v(l("maxContentLength size of "+t.maxContentLength+" exceeded",t,null,s)))})),r.on("error",(function(e){q.aborted||v(m(e,t,null,s))})),r.on("end",(function(){var e=Buffer.concat(u);"arraybuffer"!==t.responseType&&(e=e.toString(t.responseEncoding),t.responseEncoding&&"utf8"!==t.responseEncoding||(e=n.stripBOM(e))),i.data=e,o(y,v,i)}))}}}));q.on("error",(function(e){q.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||v(m(e,t,null,q))})),t.timeout&&q.setTimeout(t.timeout,(function(){q.abort(),v(l("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",q))})),t.cancelToken&&t.cancelToken.promise.then((function(t){q.aborted||(q.abort(),v(t))})),n.isStream(b)?b.on("error",(function(e){v(m(e,t,null,q))})).pipe(q):q.end(b)}))}},function(t,e){t.exports=require("stream")},function(t,e){t.exports=require("assert")},function(t,e,r){var n;try{n=r(130)("follow-redirects")}catch(t){n=function(){}}t.exports=n},function(t,e,r){"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?t.exports=r(131):t.exports=r(133)},function(t,e,r){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,o=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(n++,"%c"===t&&(o=n))}),e.splice(o,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=r(43)(e);const{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(t,e){var r=1e3,n=6e4,o=60*n,s=24*o;function i(t,e,r,n){var o=e>=1.5*r;return Math.round(t/r)+" "+n+(o?"s":"")}t.exports=function(t,e){e=e||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var i=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return 6048e5*i;case"days":case"day":case"d":return i*s;case"hours":case"hour":case"hrs":case"hr":case"h":return i*o;case"minutes":case"minute":case"mins":case"min":case"m":return i*n;case"seconds":case"second":case"secs":case"sec":case"s":return i*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}(t);if("number"===u&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=s)return i(t,e,s,"day");if(e>=o)return i(t,e,o,"hour");if(e>=n)return i(t,e,n,"minute");if(e>=r)return i(t,e,r,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=s)return Math.round(t/s)+"d";if(e>=o)return Math.round(t/o)+"h";if(e>=n)return Math.round(t/n)+"m";if(e>=r)return Math.round(t/r)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){const n=r(134),o=r(135);e.init=function(t){t.inspectOpts={};const r=Object.keys(e.inspectOpts);for(let n=0;n<r.length;n++)t.inspectOpts[r[n]]=e.inspectOpts[r[n]]},e.log=function(...t){return process.stderr.write(o.format(...t)+"\n")},e.formatArgs=function(r){const{namespace:n,useColors:o}=this;if(o){const e=this.color,o="[3"+(e<8?e:"8;5;"+e),s=` ${o};1m${n} [0m`;r[0]=s+r[0].split("\n").join("\n"+s),r.push(o+"m+"+t.exports.humanize(this.diff)+"[0m")}else r[0]=function(){if(e.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+r[0]},e.save=function(t){t?process.env.DEBUG=t:delete process.env.DEBUG},e.load=function(){return process.env.DEBUG},e.useColors=function(){return"colors"in e.inspectOpts?Boolean(e.inspectOpts.colors):n.isatty(process.stderr.fd)},e.destroy=o.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{const t=r(136);t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(t){}e.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{const r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(t,e)=>e.toUpperCase());let n=process.env[e];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),t[r]=n,t},{}),t.exports=r(43)(e);const{formatters:s}=t.exports;s.o=function(t){return this.inspectOpts.colors=this.useColors,o.inspect(t,this.inspectOpts).split("\n").map(t=>t.trim()).join(" ")},s.O=function(t){return this.inspectOpts.colors=this.useColors,o.inspect(t,this.inspectOpts)}},function(t,e){t.exports=require("tty")},function(t,e){t.exports=require("util")},function(t,e,r){"use strict";const n=r(137),o=r(138),s=process.env;let i;function u(t){return function(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(function(t){if(!1===i)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(t&&!t.isTTY&&!0!==i)return 0;const e=i?1:0;if("win32"===process.platform){const t=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in s)||"codeship"===s.CI_NAME?1:e;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("truecolor"===s.COLORTERM)return 3;if("TERM_PROGRAM"in s){const t=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:(s.TERM,e)}(t))}o("no-color")||o("no-colors")||o("color=false")?i=!1:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(i=!0),"FORCE_COLOR"in s&&(i=0===s.FORCE_COLOR.length||0!==parseInt(s.FORCE_COLOR,10)),t.exports={supportsColor:u,stdout:u(process.stdout),stderr:u(process.stderr)}},function(t,e){t.exports=require("os")},function(t,e,r){"use strict";t.exports=(t,e)=>{e=e||process.argv;const r=t.startsWith("-")?"":1===t.length?"-":"--",n=e.indexOf(r+t),o=e.indexOf("--");return-1!==n&&(-1===o||n<o)}},function(t,e){t.exports=require("zlib")},function(t){t.exports=JSON.parse('{"_args":[["axios@0.21.1","/opt/atlassian/pipelines/agent/build"]],"_from":"axios@0.21.1","_id":"axios@0.21.1","_inBundle":false,"_integrity":"sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.21.1","name":"axios","escapedName":"axios","rawSpec":"0.21.1","saveSpec":null,"fetchSpec":"0.21.1"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.1.tgz","_spec":"0.21.1","_where":"/opt/atlassian/pipelines/agent/build","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.10.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"homepage":"https://github.com/axios/axios","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test && bundlesize","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.1"}')},function(t,e,r){"use strict";var n=r(45);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},function(t,e,r){"use strict";r.r(e);var n=r(46),o=r.n(n),s=r(47),i=r.n(s);var u={handleHTTPError:function(t){const{config:e}=t;if(!t.response)return Promise.reject(t);const{status:r,data:n}=t.response,o=n&&n.error&&n.error.code;try{const n=r>=400&&r<500;n||this.handleLogAndNotifyError(t);const s=n&&1004===o&&401===r;if(401===r&&!s)return this.handleLoginRequired();if(400===r&&1010===o)return this.handleLoginRequired();if(s)return this.Auth.requestNewTokens().then(t=>{const r=t.headers[this.authTokenKey];return e.headers[this.authTokenKey]=r,this.handleNewToken(r),this.http(e)})}catch(t){this.handleLogAndNotifyError(t)}return Promise.reject(t)},handleHTTPResponse:function(t){return t&&t.data&&t.data.data&&(t.data=t.data.data),t},handleGenerateConfig:function(t){return this.config.secretKey&&this.config.clientId?(t.headers.clientId=this.config.clientId,t.headers.secretKey=this.config.secretKey):t.headers[this.authTokenKey]=this.getAuthToken(),t}};function a(t){return{getAll:function(){return this.get(t)},get:function(e){const r=`${t}/${e}`;return this.get(r)},update:function(e,r){const n=`${t}/${e}`;return this.put(n,r)},add:function(e){return this.post(t,e)},delete:function(e){const r=`${t}/${e}`;return this.delete(r)}}}function c(t){const e="/rooms";return{getAll:function(r){const n=`${e}/${r}/${t}`;return this.get(n)},get:function(r,n){const o=`${e}/${r}/${t}/${n}`;return this.get(o)},update:function(r,n,o){const s=`${e}/${r}/${t}/${n}`;return this.put(s,o)},add:function(r,n){const o=`${e}/${r}/${t}`;return this.post(o,n)},delete:function(r,n){const o=`${e}/${r}/${t}/${n}`;return this.delete(o)}}}function h(t){const e="/groups";return{getAll:function(r,n){const o=`${e}/${r}/rooms/${n}/${t}`;return this.get(o)},get:function(r,n,o){const s=`${e}/${r}/rooms/${n}/${t}/${o}`;return this.get(s)},update:function(r,n,o,s){const i=`${e}/${r}/rooms/${n}/${t}/${o}`;return this.put(i,s)},add:function(r,n,o){const s=`${e}/${r}/rooms/${n}/${t}`;return this.post(s,o)},delete:function(r,n,o){const s=`${e}/${r}/rooms/${n}/${t}/${o}`;return this.delete(s)}}}var f=a("/admins");var p={requestNewTokens:async function(){return this.getRefreshToken()?this.post("/auth/token",{},{headers:{[this.refreshTokenKey]:this.getRefreshToken()}}).then(t=>(this.setAuthToken(t.headers[this.authTokenKey]),this.setRefreshToken(t.headers[this.refreshTokenKey]),t)):this.handleLoginRequired()},loginUser:function(t,e){return this.post("/auth/user",{email:t.toLowerCase(),password:e}).then(t=>{const e=t.headers[this.authTokenKey],r=t.headers[this.refreshTokenKey],n=t.data[0];return this.setAuthToken(e),this.setRefreshToken(r),this.setCurrentUser(n),t})},loginGuest:function(t,e,r){return this.post("/auth/guest",{lastName:t,roomNumber:e,phone:r}).then(t=>{const e=t.headers[this.authTokenKey],r=t.headers[this.refreshTokenKey],n=t.data[0];return this.setAuthToken(e),this.setRefreshToken(r),this.setCurrentUser(n),t})},resetPassword:function(t,e,r){const n=`/auth/${t}/set-password`;let o={};return r&&(o.headers={"x-reset-token":r}),this.post(n,{password:e},o).then(t=>!(t.status>=400&&t.status<=500)||(body.error=t.data.error,body))},verifyToken:function(t){return this.post("/auth/verifyToken",{token:t}).then(t=>t.status>=400&&t.status<=500?(body.error=t.data.error,body):t)},sendResetPasswordLink:function(t){const e=`/auth/${t}/sendResetPasswordLink`;return this.post(e,{}).then(t=>t.status>=400&&t.status<=500?(body.error=t.data.error,body):t)},forgotPassword:function(t){return this.post("/users/forgot-password",{email:t}).then(t=>t.status>=400&&t.status<=500?(body.error=t.data.error,body):t)},getNewControllerAuthToken:function(t,e){return this.post("/auth/controller",{authKey:t,controllerId:e}).then(t=>t.status>=400&&t.status<=500?(body.error=t.data.error,body):(this.setAuthToken(t.headers[this.authTokenKey]),t)).catch(t=>{console.log("error",t)})},logout:function(){this.setAuthToken(null),this.setRefreshToken(null),this.setCurrentUser(null),this.removeItem(this.config.lsAuthTokenKey),this.removeItem(this.config.lsRefreshTokenKey),this.removeItem(this.config.lsUserKey)}};const d=a("/concierge");d.getTickets=function(t){return this.get("/concierge/tickets",t)},d.createTicket=function(t){return this.post("/concierge/tickets",t)},d.getPendingTickets=function(t){return this.post("/concierge/tickets/pending",t)},d.closeTickets=function(t){return this.post("/concierge/tickets/close",t)},d.updateTicket=function(t,e){const r="/concierge/tickets/"+t;return this.put(r,e)},d.markAsRead=function(t,e){const r=`/concierge/tickets/${t}/read`;return this.post(r,e)},d.postMessage=function(t,e){const r=`/concierge/tickets/${t}/message`;return this.post(r,e)};var l=d,m=a("/controllers");var g={post:function(t){return this.post("/commands",t)}};const y=a("/groups");y.Room=function(){const t="/groups";return{getAll:function(e){const r=`${t}/${e}/rooms`;return this.get(r)},get:function(e,r){const n=`${t}/${e}/rooms/${r}`;return this.get(n)},update:function(e,r,n){const o=`${t}/${e}/rooms/${r}`;return this.put(o,n)},add:function(e,r){const n=`${t}/${e}/rooms`;return this.post(n,r)},delete:function(e,r){const n=`${t}/${e}/rooms/${r}`;return this.delete(n)}}}(),y.Room.Light=h("lights"),y.Room.Shade=h("shades"),y.Room.Thermostat=h("thermostats"),y.Room.Privacy=h("privacy"),y.Room.Media={get:function(t,e){const r=`/groups/${t}/rooms/${e}/media`;return this.get(r)},update:function(t,e,r){const n=`/groups/${t}/rooms/${e}/media`;return this.put(n,r)}},y.Room.Security={get:function(t,e){const r=`/groups/${t}/rooms/${e}/security`;return this.get(r)},Locks:h("security/locks"),Cameras:h("security/cameras")};var v=y;const b=a("/guests");b.checkIn=function(t,e){const r=`/guests/${t}/checkin`;return this.post(r,e)},b.checkOut=function(t,e){const r=`/guests/${t}/checkout`;return this.post(r,e)},b.invite=function(t){const e=`/guests/${t}/invite`;return this.post(e)};var x=b;const _=a("/hotel-rooms");_.Room={getAll:function(t){const e=`/hotel-rooms/${t}/rooms`;return this.get(e)},add:function(t,e){const r=`/hotel-rooms/${t}/rooms`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/rooms`;return this.delete(r,e)}},_.Guest={getAll:function(t){const e=`/hotel-rooms/${t}/guests`;return this.get(e)}},_.Scenes={getAll:function(t){const e=`/hotel-rooms/${t}/scenes`;return this.get(e)},get:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}`;return this.get(r)},trigger:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}/trigger`;return this.post(r,{})},update:function(t,e,r){const n=`/hotel-rooms/${t}/scenes/${e}`;return this.put(n,r)},add:function(t,e){const r=`/hotel-rooms/${t}/scenes`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}`;return this.delete(r)}},_.Integrations={getAll:function(t){const e=`/hotel-rooms/${t}/integrations`;return this.get(e)},add:function(t,e){const r=`/hotel-rooms/${t}/integrations`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/integrations/${e}`;return this.delete(r)}},_.Alarms={getAll:function(t){const e=`/hotel-rooms/${t}/alarms`;return this.get(e)},get:function(t,e){const r=`/hotel-rooms/${t}/alarms/${e}`;return this.get(r)},add:function(t,e){const r=`/hotel-rooms/${t}/alarms`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/alarms/${e}`;return this.delete(r)}};var C=_;const w={getAll:function(){return this.get("/integrations")},get:function(t){const e="/integrations/"+t;return this.get(e)},update:function(t,e){const r="/integrations/"+t;return this.put(r,e)},add:function(t){return this.post("/integrations",t)}},R={getAll:function(){return this.get("/integrations/types")}},T={add:function(t,e){return this.post(`/integrations/${t}/deviceMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/deviceMap`,e)}},k={add:function(t,e){return this.post(`/integrations/${t}/roomMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/roomMap`,e)}},$={update:function(t,e){const r=`/integrations/${t}/metadata`;return this.post(r,e)}};w.Types=R,w.RoomMap=k,w.Metadata=$,w.DeviceMap=T;var O=w;const j=a("structure/images");j.uploadImage=async function(t,e){return await this.uploadFile("/structure/images/upload",t,e)};var A=j;var E=c("lights");var S=c("privacy");var M=c("security/locks"),F=a("/managers");const P={};P.get=function(){return this.get("/manifest.json")};var L=P;const B=function(){return{getAll:function(t){return this.get(`/rooms/${t}/media/sources`)},get:function(t,e){return this.get(`/rooms/${t}/media/sources/${e}`)},add:function(t,e){return this.post(`/rooms/${t}/media/sources`,e)}}};B.getGenres=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/genres`;return this.http.get(r,{})},B.getStations=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/stations`;return this.http.get(r,{})};var q=B;const I=a("/notifications");I.Response=function(t){return this.http.post("/notifications/response",{params:t})},I.Send=function(t,e){const r="/notifications/"+t;return this.http.post(r,{params:e})};var N=I;const U=a("/reports");U.getEnergyStats=function(t){return this.http.get("/reports/room/stats",{params:t})},U.getTicketStats=function(t){return this.http.get("/reports/ticket/stats",{params:t})};var z=U;const D=a("/rooms");D.Scenes={getAll:function(t){const e=`/rooms/${t}/scenes`;return this.get(e)},get:function(t,e){const r=`/rooms/${t}/scenes/${e}`;return this.get(r)},trigger:function(t,e){const r=`/rooms/${t}/scenes/${e}/trigger`;return this.post(r,{})},update:function(t,e,r){const n=`/rooms/${t}/scenes/${e}`;return this.put(n,r)},add:function(t,e){const r=`/rooms/${t}/scenes`;return this.post(r,e)},delete:function(t,e){const r=`/rooms/${t}/scenes/${e}`;return this.delete(r)}},D.Media={getAll:function(t){const e=`/rooms/${t}/media`;return this.get(e)},update:function(t,e){const r=`/rooms/${t}/media`;return this.put(r,e)},trigger:function(t,e){const r=`/rooms/${t}/media`;return this.post(r,e)}},D.Security={getAll:function(t){const e=`/rooms/${t}/security`;return this.get(e)},Locks:{getAll:function(t){const e=`/rooms/${t}/security/locks`;return this.get(e)},get:function(t,e){const r=`/rooms/${t}/security/locks/${e}`;return this.get(r)},update:function(t,e,r){const n=`/rooms/${t}/security/locks/${e}`;return this.put(n,r)},add:function(t,e){const r=`/rooms/${t}/security/locks`;return this.post(r,e)},delete:function(t,e){const r=`/rooms/${t}/security/locks/${e}`;return this.delete(r)},trigger:function(t,e){const r=`/rooms/${t}/security/locks/${e}`;return this.post(r,{})}},Cameras:{getAll:function(t){const e=`/rooms/${t}/security/cameras`;return this.get(e)},get:function(t,e){const r=`/rooms/${t}/security/cameras/${e}`;return this.get(r)},update:function(t,e,r){const n=`/rooms/${t}/security/cameras/${e}`;return this.put(n,r)},add:function(t,e){const r=`/rooms/${t}/security/cameras`;return this.post(r,e)},delete:function(t,e){const r=`/rooms/${t}/security/cameras/${e}`;return this.delete(r)}}};var H=D;var K={getAll:function(){return this.http.get("/settings",{})},get:function(t){return this.http.get("/settings/"+t,{})},save:function(t,e){return this.http.post("/settings/"+t,e)}};var G=c("shades");const V=a("sources");V.updatePlayer=function(t){return this.post(`sources/${t}/player`,{})},V.browse={get:function(t){const e=`sources/${t}/browse`;return this.get(e)},genres:{getAll:function(t){const e=`sources/${t}/browse/genres`;return this.get(e)},get:function(t,e){const r=`sources/${t}/browse/genres/${e}`;return this.get(r)},getStations:function(t,e){const r=`sources/${t}/browse/genres/${e}/stations`;return this.get(r)},update:function(t,e){const r=`sources/${t}/browse/genres`;return this.post(r,e)}},stations:{update:function(t,e){const r=`sources/${t}/browse/stations`;return this.post(r,e)},getAll:function(t){const e=`sources/${t}/browse/stations`;return this.get(e)}}};var J=V;const Y={};Y.getRoomList=function(){return this.http.get("/structure/roomList",{})},Y.getSummary=function(){return this.http.get("/structure/summary",{})},Y.getDeviceCount=function(){return this.http.get("/structure/deviceCount",{})};var X=Y;var W={add:function(t){return this.http.post("/subscription",t)},get:function(t){return this.http.get("/subscription/"+t,{})},getAll:function(){return this.http.get("/subscription",{})},delete:function(t){return this.http.delete("/subscription/"+t,{})}};var Z=c("thermostats");const Q=a("/users");function tt(t,e){if(t===this.getCurrentUser()._id){const{data:t,headers:r}=e;if(t){const e=t&&t[0];this.setCurrentUser(e)}if(r){const t=r[this.authTokenKey],e=r[this.refreshTokenKey];t&&this.setAuthToken(t),e&&this.setRefreshToken(e)}}return e}Q.update=function(t,e){const r="/users/"+t,n=tt.bind(this);return this.put(r,e).then(e=>n(t,e))},Q.get=function(t){const e="/users/"+t,r=tt.bind(this);return this.get(e).then(e=>r(t,e))},Q.changeAvatar=function(t){return this.http.post("/users/change-avatar",t)},Q.checkout=function(){return this.http.post("/users/checkout")},Q.resetPassword=function(t,{password:e,resetToken:r}){const n=`/users/${t}/reset-password`;return this.post(n,{password:e,resetToken:r}).then(t=>!(t.status>=400&&t.status<=500)||(body.error=t.data.error,body))},Q.invite=function(t){const e=`/users/${t}/invite`;return this.post(e)};var et=Q;const rt=new class{constructor(t){this.config={url:t,version:2,lsAuthTokenKey:"x-auth-token",lsRefreshTokenKey:"x-refresh-token",lsUserKey:"current-user",clientId:void 0,secretKey:void 0,autoRefreshTokens:!0,tenant:null,onNewToken:function(){},onLoginRequired:function(){throw new Error("API Client - login required")}},this.isBrowser="undefined"!=typeof window,this.authTokenKey="x-auth-token",this.refreshTokenKey="x-refresh-token",this.http=void 0,this.authToken="",this.currentUser=void 0,this.logger=console,this.config.update=this.updateConfig.bind(this),this.handleHTTPResponseError=u.handleHTTPError.bind(this),this.handleHTTPResponseSuccess=u.handleHTTPResponse.bind(this),this.handleHTTPRequestConfig=u.handleGenerateConfig.bind(this),this.Admin=this.bindMethods(f),this.Auth=this.bindMethods(p),this.Guest=this.bindMethods(x),this.User=this.bindMethods(et),this.Group=this.bindMethods(v),this.Group.Room=this.bindMethods(v.Room),this.Group.Room.Light=this.bindMethods(v.Room.Light),this.Group.Room.Shade=this.bindMethods(v.Room.Shade),this.Group.Room.Thermostat=this.bindMethods(v.Room.Thermostat),this.Group.Room.Media=this.bindMethods(v.Room.Media),this.Group.Room.Privacy=this.bindMethods(v.Room.Privacy),this.Group.Room.Security=this.bindMethods(v.Room.Security),this.Group.Room.Security.Locks=this.bindMethods(v.Room.Security.Locks),this.Group.Room.Security.Cameras=this.bindMethods(v.Room.Security.Cameras),this.HotelRoom=this.bindMethods(C),this.HotelRoom.Room=this.bindMethods(C.Room),this.HotelRoom.Guest=this.bindMethods(C.Guest),this.HotelRoom.Alarms=this.bindMethods(C.Alarms),this.HotelRoom.Scenes=this.bindMethods(C.Scenes),this.HotelRoom.Integrations=this.bindMethods(C.Integrations),this.Room=this.bindMethods(H),this.Room.Light=this.bindMethods(E),this.Room.Shade=this.bindMethods(G),this.Room.Thermostat=this.bindMethods(Z),this.Room.Lock=this.bindMethods(M),this.Room.Privacy=this.bindMethods(S),this.Room.Scenes=this.bindMethods(H.Scenes),this.Room.Media=this.bindMethods(H.Media),this.Room.Security=this.bindMethods(H.Security),this.Room.Security.Locks=this.bindMethods(H.Security.Locks),this.Room.Security.Cameras=this.bindMethods(H.Security.Cameras),this.Settings=this.bindMethods(K),this.Subscriptions=this.bindMethods(W),this.Reports=this.bindMethods(z),this.Controllers=this.bindMethods(m),this.Integrations=this.bindMethods(O),this.Integrations.Types=this.bindMethods(O.Types),this.Integrations.RoomMap=this.bindMethods(O.RoomMap),this.Integrations.Metadata=this.bindMethods(O.Metadata),this.Integrations.DeviceMap=this.bindMethods(O.DeviceMap),this.Concierge=this.bindMethods(l),this.Commands=this.bindMethods(g),this.Image=this.bindMethods(A),this.Source=this.bindMethods(J),this.Source.browse=this.bindMethods(J.browse),this.Source.browse.genres=this.bindMethods(J.browse.genres),this.Source.browse.stations=this.bindMethods(J.browse.stations),this.Structure=this.bindMethods(X),this.Structure.Images=this.bindMethods(A),this.Media=this.bindMethods(q),this.Manifest=this.bindMethods(L),this.Manager=this.bindMethods(F),this.Notifications=this.bindMethods(N),this.createHTTPClient()}bindMethods(t){const e=t=>t.bind(this),r={};return Object.keys(t).forEach(n=>{"function"==typeof t[n]&&(r[n]=e(t[n]))}),r}updateConfig(t){this.config=o()(this.config,t),this.createHTTPClient()}createHTTPClient(){this.http=i.a.create({baseURL:this.config.url,headers:{"Content-Type":"application/json; charset=utf-8","x-tenant-id":this.config.tenant}}),this.http.interceptors.response.use(this.handleHTTPResponseSuccess,this.handleHTTPResponseError),this.http.interceptors.request.use(this.handleHTTPRequestConfig,null)}getItem(t){if(this.isBrowser)try{return JSON.parse(localStorage.getItem(t))}catch(e){return localStorage.getItem(t)}}saveItem(t,e){this.isBrowser&&("object"==typeof e&&(e=JSON.stringify(e)),localStorage.setItem(t,e))}removeItem(t){this.isBrowser&&localStorage.removeItem(t)}setAuthToken(t){this.authToken=t,this.saveItem(this.config.lsAuthTokenKey,t)}setRefreshToken(t){this.refreshToken=t,this.saveItem(this.config.lsRefreshTokenKey,t)}setCurrentUser(t){this.currentUser=t,this.saveItem(this.config.lsUserKey,t)}getAuthToken(){return this.isBrowser?this.getItem(this.config.lsAuthTokenKey):this.authToken}getRefreshToken(){return this.isBrowser?this.getItem(this.config.lsRefreshTokenKey):this.refreshToken}getCurrentUser(){return this.isBrowser?this.getItem(this.config.lsUserKey):this.currentUser}handleLoginRequired(){return this.config.onLoginRequired()}handleNewToken(t){return this.config.onNewToken(t)}handleLogAndNotifyError(t){this.logger.log(t)}get(t,e={}){return this.http.get(t,e)}post(t,e,r={}){return this.http.post(t,e,r)}put(t,e,r={}){return this.http.put(t,e,r)}delete(t,e,r={}){return r.data=e,this.http.delete(t,r)}uploadFile(t,e,r=function(){}){return this.http({method:"POST",url:t,data:e,onUploadProgress:r,headers:{"Content-Type":"multipart/form-data; boundary="+e._boundary}})}};e.default=rt}]);
|
|
1
|
+
module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=144)}([function(t,e,r){"use strict";var n=r(33),o=Object.prototype.toString;function s(t){return"[object Array]"===o.call(t)}function i(t){return void 0===t}function u(t){return null!==t&&"object"==typeof t}function a(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===o.call(t)}function h(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!i(t)&&null!==t.constructor&&!i(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:u,isPlainObject:a,isUndefined:i,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:c,isStream:function(t){return u(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:h,merge:function t(){var e={};function r(r,n){a(e[n])&&a(r)?e[n]=t(e[n],r):a(r)?e[n]=t({},r):s(r)?e[n]=r.slice():e[n]=r}for(var n=0,o=arguments.length;n<o;n++)h(arguments[n],r);return e},extend:function(t,e,r){return h(e,(function(e,o){t[o]=r&&"function"==typeof e?n(e,r):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){var n=r(19),o="object"==typeof self&&self&&self.Object===Object&&self,s=n||o||Function("return this")();t.exports=s},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,r){var n=r(50),o=r(51),s=r(52),i=r(53),u=r(54);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},function(t,e,r){var n=r(6);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(18),o=r(61),s=r(62),i=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":i&&i in Object(t)?o(t):s(t)}},function(t,e,r){var n=r(10)(Object,"create");t.exports=n},function(t,e,r){var n=r(76);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e,r){var n=r(60),o=r(66);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},function(t,e,r){var n=r(7),o=r(1);t.exports=function(t){if(!o(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,r){var n=r(21);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){var n=r(11),o=r(26);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},function(t,e,r){"use strict";var n=r(0);function o(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var s;if(r)s=r(e);else if(n.isURLSearchParams(e))s=e.toString();else{var i=[];n.forEach(e,(function(t,e){null!=t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,(function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),i.push(o(e)+"="+o(t))})))})),s=i.join("&")}if(s){var u=t.indexOf("#");-1!==u&&(t=t.slice(0,u)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}},function(t,e,r){"use strict";var n=r(37);t.exports=function(t,e,r,o,s){var i=new Error(t);return n(i,e,r,o,s)}},function(t,e,r){var n=r(10)(r(2),"Map");t.exports=n},function(t,e,r){var n=r(2).Symbol;t.exports=n},function(t,e){var r="object"==typeof global&&global&&global.Object===Object&&global;t.exports=r},function(t,e,r){var n=r(12),o=r(6);t.exports=function(t,e,r){(void 0!==r&&!o(t[e],r)||void 0===r&&!(e in t))&&n(t,e,r)}},function(t,e,r){var n=r(10),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,r){var n=r(90)(Object.getPrototypeOf,Object);t.exports=n},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(91),o=r(3),s=Object.prototype,i=s.hasOwnProperty,u=s.propertyIsEnumerable,a=n(function(){return arguments}())?n:function(t){return o(t)&&i.call(t,"callee")&&!u.call(t,"callee")};t.exports=a},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){(function(t){var n=r(2),o=r(93),s=e&&!e.nodeType&&e,i=s&&"object"==typeof t&&t&&!t.nodeType&&t,u=i&&i.exports===s?n.Buffer:void 0,a=(u?u.isBuffer:void 0)||o;t.exports=a}).call(this,r(13)(t))},function(t,e,r){var n=r(95),o=r(96),s=r(97),i=s&&s.isTypedArray,u=i?o(i):n;t.exports=u},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e,r){var n=r(101),o=r(103),s=r(14);t.exports=function(t){return s(t)?n(t,!0):o(t)}},function(t,e){var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return t}},function(t,e,r){"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}}},function(t,e,r){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,r){"use strict";var n=r(0),o=r(119),s={"Content-Type":"application/x-www-form-urlencoded"};function i(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,a={adapter:("undefined"!=typeof XMLHttpRequest?u=r(120):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(u=r(126)),u),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)?t:n.isArrayBufferView(t)?t.buffer:n.isURLSearchParams(t)?(i(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)?(i(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(t){a.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){a.headers[t]=n.merge(s)})),t.exports=a},function(t,e,r){"use strict";var n=r(16);t.exports=function(t,e,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?e(n("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}},function(t,e,r){"use strict";t.exports=function(t,e,r,n,o){return t.config=e,r&&(t.code=r),t.request=n,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,r){"use strict";var n=r(122),o=r(123);t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},function(t,e){t.exports=require("http")},function(t,e){t.exports=require("https")},function(t,e,r){var n=r(42),o=n.URL,s=r(39),i=r(40),u=r(127).Writable,a=r(128),c=r(129),h=Object.create(null);["abort","aborted","connect","error","socket","timeout"].forEach((function(t){h[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}}));var f=C("ERR_FR_REDIRECTION_FAILURE",""),p=C("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),d=C("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),l=C("ERR_STREAM_WRITE_AFTER_END","write after end");function m(t,e){u.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(t){r._processResponse(t)},this._performRequest()}function g(t,e){clearTimeout(t._timeout),t._timeout=setTimeout((function(){t.emit("timeout")}),e)}function y(){clearTimeout(this._timeout)}function v(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach((function(s){var i=s+":",u=r[i]=t[s],h=e[s]=Object.create(u);Object.defineProperties(h,{request:{value:function(t,s,u){if("string"==typeof t){var h=t;try{t=x(new o(h))}catch(e){t=n.parse(h)}}else o&&t instanceof o?t=x(t):(u=s,s=t,t={protocol:i});return"function"==typeof s&&(u=s,s=null),(s=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},t,s)).nativeProtocols=r,a.equal(s.protocol,i,"protocol mismatch"),c("options",s),new m(s,u)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(t,e,r){var n=h.request(t,e,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),e}function b(){}function x(t){var e={protocol:t.protocol,hostname:t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:t.pathname+t.search,href:t.href};return""!==t.port&&(e.port=Number(t.port)),e}function _(t,e){var r;for(var n in e)t.test(n)&&(r=e[n],delete e[n]);return r}function C(t,e){function r(t){Error.captureStackTrace(this,this.constructor),this.message=t||e}return r.prototype=new Error,r.prototype.constructor=r,r.prototype.name="Error ["+t+"]",r.prototype.code=t,r}m.prototype=Object.create(u.prototype),m.prototype.write=function(t,e,r){if(this._ending)throw new l;if(!("string"==typeof t||"object"==typeof t&&"length"in t))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof e&&(r=e,e=null),0!==t.length?this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new d),this.abort()):r&&r()},m.prototype.end=function(t,e,r){if("function"==typeof t?(r=t,t=e=null):"function"==typeof e&&(r=e,e=null),t){var n=this,o=this._currentRequest;this.write(t,e,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},m.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)},m.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)},m.prototype.setTimeout=function(t,e){if(e&&this.once("timeout",e),this.socket)g(this,t);else{var r=this;this._currentRequest.once("socket",(function(){g(r,t)}))}return this.once("response",y),this.once("error",y),this},["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(t){m.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}})),["aborted","connection","socket"].forEach((function(t){Object.defineProperty(m.prototype,t,{get:function(){return this._currentRequest[t]}})})),m.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}},m.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(e){if(this._options.agents){var r=t.substr(0,t.length-1);this._options.agent=this._options.agents[r]}var o=this._currentRequest=e.request(this._options,this._onNativeResponse);for(var s in this._currentUrl=n.format(this._options),o._redirectable=this,h)s&&o.on(s,h[s]);if(this._isRedirect){var i=0,u=this,a=this._requestBodyBuffers;!function t(e){if(o===u._currentRequest)if(e)u.emit("error",e);else if(i<a.length){var r=a[i++];o.finished||o.write(r.data,r.encoding,t)}else u._ended&&o.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+t))},m.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(r&&!1!==this._options.followRedirects&&e>=300&&e<400){if(this._currentRequest.removeAllListeners(),this._currentRequest.on("error",b),this._currentRequest.abort(),t.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new p);((301===e||302===e)&&"POST"===this._options.method||303===e&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],_(/^content-/i,this._options.headers));var o=_(/^host$/i,this._options.headers)||n.parse(this._currentUrl).hostname,s=n.resolve(this._currentUrl,r);c("redirecting to",s),this._isRedirect=!0;var i=n.parse(s);if(Object.assign(this._options,i),i.hostname!==o&&_(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var u={headers:t.headers};try{this._options.beforeRedirect.call(null,this._options,u)}catch(t){return void this.emit("error",t)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(t){var a=new f("Redirected request failed: "+t.message);a.cause=t,this.emit("error",a)}}else t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[]},t.exports=v({http:s,https:i}),t.exports.wrap=v},function(t,e){t.exports=require("url")},function(t,e,r){t.exports=function(t){function e(t){let r,o=null;function s(...t){if(!s.enabled)return;const n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let u=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(r,o)=>{if("%%"===r)return"%";u++;const s=e.formatters[o];if("function"==typeof s){const e=t[u];r=s.call(n,e),t.splice(u,1),u--}return r}),e.formatArgs.call(n,t);(n.log||e.log).apply(n,t)}return s.namespace=t,s.useColors=e.useColors(),s.color=e.selectColor(t),s.extend=n,s.destroy=e.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===o?e.enabled(t):o,set:t=>{o=t}}),"function"==typeof e.init&&e.init(s),s}function n(t,r){const n=e(this.namespace+(void 0===r?":":r)+t);return n.log=this.log,n}function o(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(o),...e.skips.map(o).map(t=>"-"+t)].join(",");return e.enable(""),t},e.enable=function(t){let r;e.save(t),e.names=[],e.skips=[];const n=("string"==typeof t?t:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(t=n[r].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(132),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(r=>{e[r]=t[r]}),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e<t.length;e++)r=(r<<5)-r+t.charCodeAt(e),r|=0;return e.colors[Math.abs(r)%e.colors.length]},e.enable(e.load()),e}},function(t,e,r){"use strict";var n=r(0);t.exports=function(t,e){e=e||{};var r={},o=["url","method","data"],s=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],u=["validateStatus"];function a(t,e){return n.isPlainObject(t)&&n.isPlainObject(e)?n.merge(t,e):n.isPlainObject(e)?n.merge({},e):n.isArray(e)?e.slice():e}function c(o){n.isUndefined(e[o])?n.isUndefined(t[o])||(r[o]=a(void 0,t[o])):r[o]=a(t[o],e[o])}n.forEach(o,(function(t){n.isUndefined(e[t])||(r[t]=a(void 0,e[t]))})),n.forEach(s,c),n.forEach(i,(function(o){n.isUndefined(e[o])?n.isUndefined(t[o])||(r[o]=a(void 0,t[o])):r[o]=a(void 0,e[o])})),n.forEach(u,(function(n){n in e?r[n]=a(t[n],e[n]):n in t&&(r[n]=a(void 0,t[n]))}));var h=o.concat(s).concat(i).concat(u),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===h.indexOf(t)}));return n.forEach(f,c),r}},function(t,e,r){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,r){var n=r(48),o=r(105)((function(t,e,r){n(t,e,r)}));t.exports=o},function(t,e,r){t.exports=r(114)},function(t,e,r){var n=r(49),o=r(20),s=r(80),i=r(82),u=r(1),a=r(30),c=r(29);t.exports=function t(e,r,h,f,p){e!==r&&s(r,(function(s,a){if(p||(p=new n),u(s))i(e,r,a,h,t,f,p);else{var d=f?f(c(e,a),s,a+"",e,r,p):void 0;void 0===d&&(d=s),o(e,a,d)}}),a)}},function(t,e,r){var n=r(4),o=r(55),s=r(56),i=r(57),u=r(58),a=r(59);function c(t){var e=this.__data__=new n(t);this.size=e.size}c.prototype.clear=o,c.prototype.delete=s,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(5),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():o.call(e,r,1),--this.size,!0)}},function(t,e,r){var n=r(5);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(5);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(5);t.exports=function(t,e){var r=this.__data__,o=n(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}},function(t,e,r){var n=r(4);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(4),o=r(17),s=r(67);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new s(i)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(11),o=r(63),s=r(1),i=r(65),u=/^\[object .+?Constructor\]$/,a=Function.prototype,c=Object.prototype,h=a.toString,f=c.hasOwnProperty,p=RegExp("^"+h.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||o(t))&&(n(t)?p:u).test(i(t))}},function(t,e,r){var n=r(18),o=Object.prototype,s=o.hasOwnProperty,i=o.toString,u=n?n.toStringTag:void 0;t.exports=function(t){var e=s.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=i.call(t);return n&&(e?t[u]=r:delete t[u]),o}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n,o=r(64),s=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!s&&s in t}},function(t,e,r){var n=r(2)["__core-js_shared__"];t.exports=n},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,r){var n=r(68),o=r(75),s=r(77),i=r(78),u=r(79);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},function(t,e,r){var n=r(69),o=r(4),s=r(17);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||o),string:new n}}},function(t,e,r){var n=r(70),o=r(71),s=r(72),i=r(73),u=r(74);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},function(t,e,r){var n=r(8);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(8),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(8),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},function(t,e,r){var n=r(8);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,r){var n=r(9);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(9);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(9);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(9);t.exports=function(t,e){var r=n(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}},function(t,e,r){var n=r(81)();t.exports=n},function(t,e){t.exports=function(t){return function(e,r,n){for(var o=-1,s=Object(e),i=n(e),u=i.length;u--;){var a=i[t?u:++o];if(!1===r(s[a],a,s))break}return e}}},function(t,e,r){var n=r(20),o=r(83),s=r(84),i=r(87),u=r(88),a=r(24),c=r(25),h=r(92),f=r(27),p=r(11),d=r(1),l=r(94),m=r(28),g=r(29),y=r(98);t.exports=function(t,e,r,v,b,x,_){var C=g(t,r),w=g(e,r),R=_.get(w);if(R)n(t,r,R);else{var T=x?x(C,w,r+"",t,e,_):void 0,k=void 0===T;if(k){var $=c(w),j=!$&&f(w),O=!$&&!j&&m(w);T=w,$||j||O?c(C)?T=C:h(C)?T=i(C):j?(k=!1,T=o(w,!0)):O?(k=!1,T=s(w,!0)):T=[]:l(w)||a(w)?(T=C,a(C)?T=y(C):d(C)&&!p(C)||(T=u(w))):k=!1}k&&(_.set(w,T),b(T,w,v,x,_),_.delete(w)),n(t,r,T)}}},function(t,e,r){(function(t){var n=r(2),o=e&&!e.nodeType&&e,s=o&&"object"==typeof t&&t&&!t.nodeType&&t,i=s&&s.exports===o?n.Buffer:void 0,u=i?i.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(13)(t))},function(t,e,r){var n=r(85);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},function(t,e,r){var n=r(86);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},function(t,e,r){var n=r(2).Uint8Array;t.exports=n},function(t,e){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},function(t,e,r){var n=r(89),o=r(22),s=r(23);t.exports=function(t){return"function"!=typeof t.constructor||s(t)?{}:n(o(t))}},function(t,e,r){var n=r(1),o=Object.create,s=function(){function t(){}return function(e){if(!n(e))return{};if(o)return o(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=s},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(7),o=r(3);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},function(t,e,r){var n=r(14),o=r(3);t.exports=function(t){return o(t)&&n(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,r){var n=r(7),o=r(22),s=r(3),i=Function.prototype,u=Object.prototype,a=i.toString,c=u.hasOwnProperty,h=a.call(Object);t.exports=function(t){if(!s(t)||"[object Object]"!=n(t))return!1;var e=o(t);if(null===e)return!0;var r=c.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&a.call(r)==h}},function(t,e,r){var n=r(7),o=r(26),s=r(3),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,t.exports=function(t){return s(t)&&o(t.length)&&!!i[n(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){(function(t){var n=r(19),o=e&&!e.nodeType&&e,s=o&&"object"==typeof t&&t&&!t.nodeType&&t,i=s&&s.exports===o&&n.process,u=function(){try{var t=s&&s.require&&s.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=u}).call(this,r(13)(t))},function(t,e,r){var n=r(99),o=r(30);t.exports=function(t){return n(t,o(t))}},function(t,e,r){var n=r(100),o=r(12);t.exports=function(t,e,r,s){var i=!r;r||(r={});for(var u=-1,a=e.length;++u<a;){var c=e[u],h=s?s(r[c],t[c],c,r,t):void 0;void 0===h&&(h=t[c]),i?o(r,c,h):n(r,c,h)}return r}},function(t,e,r){var n=r(12),o=r(6),s=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var i=t[e];s.call(t,e)&&o(i,r)&&(void 0!==r||e in t)||n(t,e,r)}},function(t,e,r){var n=r(102),o=r(24),s=r(25),i=r(27),u=r(31),a=r(28),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=s(t),h=!r&&o(t),f=!r&&!h&&i(t),p=!r&&!h&&!f&&a(t),d=r||h||f||p,l=d?n(t.length,String):[],m=l.length;for(var g in t)!e&&!c.call(t,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||l.push(g);return l}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(1),o=r(23),s=r(104),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return s(t);var e=o(t),r=[];for(var u in t)("constructor"!=u||!e&&i.call(t,u))&&r.push(u);return r}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},function(t,e,r){var n=r(106),o=r(113);t.exports=function(t){return n((function(e,r){var n=-1,s=r.length,i=s>1?r[s-1]:void 0,u=s>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(s--,i):void 0,u&&o(r[0],r[1],u)&&(i=s<3?void 0:i,s=1),e=Object(e);++n<s;){var a=r[n];a&&t(e,a,n,i)}return e}))}},function(t,e,r){var n=r(32),o=r(107),s=r(109);t.exports=function(t,e){return s(o(t,e,n),t+"")}},function(t,e,r){var n=r(108),o=Math.max;t.exports=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var s=arguments,i=-1,u=o(s.length-e,0),a=Array(u);++i<u;)a[i]=s[e+i];i=-1;for(var c=Array(e+1);++i<e;)c[i]=s[i];return c[e]=r(a),n(t,this,c)}}},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(110),o=r(112)(n);t.exports=o},function(t,e,r){var n=r(111),o=r(21),s=r(32),i=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:s;t.exports=i},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var r=Date.now;t.exports=function(t){var e=0,n=0;return function(){var o=r(),s=16-(o-n);if(n=o,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){var n=r(6),o=r(14),s=r(31),i=r(1);t.exports=function(t,e,r){if(!i(r))return!1;var u=typeof e;return!!("number"==u?o(r)&&s(e,r.length):"string"==u&&e in r)&&n(r[e],t)}},function(t,e,r){"use strict";var n=r(0),o=r(33),s=r(115),i=r(44);function u(t){var e=new s(t),r=o(s.prototype.request,e);return n.extend(r,s.prototype,e),n.extend(r,e),r}var a=u(r(35));a.Axios=s,a.create=function(t){return u(i(a.defaults,t))},a.Cancel=r(45),a.CancelToken=r(141),a.isCancel=r(34),a.all=function(t){return Promise.all(t)},a.spread=r(142),a.isAxiosError=r(143),t.exports=a,t.exports.default=a},function(t,e,r){"use strict";var n=r(0),o=r(15),s=r(116),i=r(117),u=r(44);function a(t){this.defaults=t,this.interceptors={request:new s,response:new s}}a.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=u(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[i,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)r=r.then(e.shift(),e.shift());return r},a.prototype.getUri=function(t){return t=u(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){a.prototype[t]=function(e,r){return this.request(u(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){a.prototype[t]=function(e,r,n){return this.request(u(n||{},{method:t,url:e,data:r}))}})),t.exports=a},function(t,e,r){"use strict";var n=r(0);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(118),s=r(34),i=r(35);function u(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||i.adapter)(t).then((function(e){return u(t),e.data=o(e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(u(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,r){"use strict";var n=r(0);t.exports=function(t,e,r){return n.forEach(r,(function(r){t=r(t,e)})),t}},function(t,e,r){"use strict";var n=r(0);t.exports=function(t,e){n.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))}},function(t,e,r){"use strict";var n=r(0),o=r(36),s=r(121),i=r(15),u=r(38),a=r(124),c=r(125),h=r(16);t.exports=function(t){return new Promise((function(e,r){var f=t.data,p=t.headers;n.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var l=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";p.Authorization="Basic "+btoa(l+":"+m)}var g=u(t.baseURL,t.url);if(d.open(t.method.toUpperCase(),i(g,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,s={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:t,request:d};o(e,r,s),d=null}},d.onabort=function(){d&&(r(h("Request aborted",t,"ECONNABORTED",d)),d=null)},d.onerror=function(){r(h("Network Error",t,null,d)),d=null},d.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(h(e,t,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var y=(t.withCredentials||c(g))&&t.xsrfCookieName?s.read(t.xsrfCookieName):void 0;y&&(p[t.xsrfHeaderName]=y)}if("setRequestHeader"in d&&n.forEach(p,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete p[e]:d.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){d&&(d.abort(),r(t),d=null)})),f||(f=null),d.send(f)}))}},function(t,e,r){"use strict";var n=r(0);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,o,s,i){var u=[];u.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),n.isString(o)&&u.push("path="+o),n.isString(s)&&u.push("domain="+s),!0===i&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,r){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,r){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,r){"use strict";var n=r(0),o=["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"];t.exports=function(t){var e,r,s,i={};return t?(n.forEach(t.split("\n"),(function(t){if(s=t.indexOf(":"),e=n.trim(t.substr(0,s)).toLowerCase(),r=n.trim(t.substr(s+1)),e){if(i[e]&&o.indexOf(e)>=0)return;i[e]="set-cookie"===e?(i[e]?i[e]:[]).concat([r]):i[e]?i[e]+", "+r:r}})),i):i}},function(t,e,r){"use strict";var n=r(0);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=o(window.location.href),function(e){var r=n.isString(e)?o(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var n=r(0),o=r(36),s=r(38),i=r(15),u=r(39),a=r(40),c=r(41).http,h=r(41).https,f=r(42),p=r(139),d=r(140),l=r(16),m=r(37),g=/https:?/;t.exports=function(t){return new Promise((function(e,r){var y=function(t){e(t)},v=function(t){r(t)},b=t.data,x=t.headers;if(x["User-Agent"]||x["user-agent"]||(x["User-Agent"]="axios/"+d.version),b&&!n.isStream(b)){if(Buffer.isBuffer(b));else if(n.isArrayBuffer(b))b=Buffer.from(new Uint8Array(b));else{if(!n.isString(b))return v(l("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",t));b=Buffer.from(b,"utf-8")}x["Content-Length"]=b.length}var _=void 0;t.auth&&(_=(t.auth.username||"")+":"+(t.auth.password||""));var C=s(t.baseURL,t.url),w=f.parse(C),R=w.protocol||"http:";if(!_&&w.auth){var T=w.auth.split(":");_=(T[0]||"")+":"+(T[1]||"")}_&&delete x.Authorization;var k=g.test(R),$=k?t.httpsAgent:t.httpAgent,j={path:i(w.path,t.params,t.paramsSerializer).replace(/^\?/,""),method:t.method.toUpperCase(),headers:x,agent:$,agents:{http:t.httpAgent,https:t.httpsAgent},auth:_};t.socketPath?j.socketPath=t.socketPath:(j.hostname=w.hostname,j.port=w.port);var O,A=t.proxy;if(!A&&!1!==A){var E=R.slice(0,-1)+"_proxy",S=process.env[E]||process.env[E.toUpperCase()];if(S){var M=f.parse(S),F=process.env.no_proxy||process.env.NO_PROXY,P=!0;if(F)P=!F.split(",").map((function(t){return t.trim()})).some((function(t){return!!t&&("*"===t||("."===t[0]&&w.hostname.substr(w.hostname.length-t.length)===t||w.hostname===t))}));if(P&&(A={host:M.hostname,port:M.port,protocol:M.protocol},M.auth)){var B=M.auth.split(":");A.auth={username:B[0],password:B[1]}}}}A&&(j.headers.host=w.hostname+(w.port?":"+w.port:""),function t(e,r,n){if(e.hostname=r.host,e.host=r.host,e.port=r.port,e.path=n,r.auth){var o=Buffer.from(r.auth.username+":"+r.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+o}e.beforeRedirect=function(e){e.headers.host=e.host,t(e,r,e.href)}}(j,A,R+"//"+w.hostname+(w.port?":"+w.port:"")+j.path));var L=k&&(!A||g.test(A.protocol));t.transport?O=t.transport:0===t.maxRedirects?O=L?a:u:(t.maxRedirects&&(j.maxRedirects=t.maxRedirects),O=L?h:c),t.maxBodyLength>-1&&(j.maxBodyLength=t.maxBodyLength);var q=O.request(j,(function(e){if(!q.aborted){var r=e,s=e.req||q;if(204!==e.statusCode&&"HEAD"!==s.method&&!1!==t.decompress)switch(e.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(p.createUnzip()),delete e.headers["content-encoding"]}var i={status:e.statusCode,statusText:e.statusMessage,headers:e.headers,config:t,request:s};if("stream"===t.responseType)i.data=r,o(y,v,i);else{var u=[];r.on("data",(function(e){u.push(e),t.maxContentLength>-1&&Buffer.concat(u).length>t.maxContentLength&&(r.destroy(),v(l("maxContentLength size of "+t.maxContentLength+" exceeded",t,null,s)))})),r.on("error",(function(e){q.aborted||v(m(e,t,null,s))})),r.on("end",(function(){var e=Buffer.concat(u);"arraybuffer"!==t.responseType&&(e=e.toString(t.responseEncoding),t.responseEncoding&&"utf8"!==t.responseEncoding||(e=n.stripBOM(e))),i.data=e,o(y,v,i)}))}}}));q.on("error",(function(e){q.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||v(m(e,t,null,q))})),t.timeout&&q.setTimeout(t.timeout,(function(){q.abort(),v(l("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",q))})),t.cancelToken&&t.cancelToken.promise.then((function(t){q.aborted||(q.abort(),v(t))})),n.isStream(b)?b.on("error",(function(e){v(m(e,t,null,q))})).pipe(q):q.end(b)}))}},function(t,e){t.exports=require("stream")},function(t,e){t.exports=require("assert")},function(t,e,r){var n;try{n=r(130)("follow-redirects")}catch(t){n=function(){}}t.exports=n},function(t,e,r){"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?t.exports=r(131):t.exports=r(133)},function(t,e,r){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,o=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(n++,"%c"===t&&(o=n))}),e.splice(o,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=r(43)(e);const{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(t,e){var r=1e3,n=6e4,o=60*n,s=24*o;function i(t,e,r,n){var o=e>=1.5*r;return Math.round(t/r)+" "+n+(o?"s":"")}t.exports=function(t,e){e=e||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var i=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return 6048e5*i;case"days":case"day":case"d":return i*s;case"hours":case"hour":case"hrs":case"hr":case"h":return i*o;case"minutes":case"minute":case"mins":case"min":case"m":return i*n;case"seconds":case"second":case"secs":case"sec":case"s":return i*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}(t);if("number"===u&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=s)return i(t,e,s,"day");if(e>=o)return i(t,e,o,"hour");if(e>=n)return i(t,e,n,"minute");if(e>=r)return i(t,e,r,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=s)return Math.round(t/s)+"d";if(e>=o)return Math.round(t/o)+"h";if(e>=n)return Math.round(t/n)+"m";if(e>=r)return Math.round(t/r)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){const n=r(134),o=r(135);e.init=function(t){t.inspectOpts={};const r=Object.keys(e.inspectOpts);for(let n=0;n<r.length;n++)t.inspectOpts[r[n]]=e.inspectOpts[r[n]]},e.log=function(...t){return process.stderr.write(o.format(...t)+"\n")},e.formatArgs=function(r){const{namespace:n,useColors:o}=this;if(o){const e=this.color,o="[3"+(e<8?e:"8;5;"+e),s=` ${o};1m${n} [0m`;r[0]=s+r[0].split("\n").join("\n"+s),r.push(o+"m+"+t.exports.humanize(this.diff)+"[0m")}else r[0]=function(){if(e.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+r[0]},e.save=function(t){t?process.env.DEBUG=t:delete process.env.DEBUG},e.load=function(){return process.env.DEBUG},e.useColors=function(){return"colors"in e.inspectOpts?Boolean(e.inspectOpts.colors):n.isatty(process.stderr.fd)},e.destroy=o.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{const t=r(136);t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(t){}e.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{const r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(t,e)=>e.toUpperCase());let n=process.env[e];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),t[r]=n,t},{}),t.exports=r(43)(e);const{formatters:s}=t.exports;s.o=function(t){return this.inspectOpts.colors=this.useColors,o.inspect(t,this.inspectOpts).split("\n").map(t=>t.trim()).join(" ")},s.O=function(t){return this.inspectOpts.colors=this.useColors,o.inspect(t,this.inspectOpts)}},function(t,e){t.exports=require("tty")},function(t,e){t.exports=require("util")},function(t,e,r){"use strict";const n=r(137),o=r(138),s=process.env;let i;function u(t){return function(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(function(t){if(!1===i)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(t&&!t.isTTY&&!0!==i)return 0;const e=i?1:0;if("win32"===process.platform){const t=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in s)||"codeship"===s.CI_NAME?1:e;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("truecolor"===s.COLORTERM)return 3;if("TERM_PROGRAM"in s){const t=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:(s.TERM,e)}(t))}o("no-color")||o("no-colors")||o("color=false")?i=!1:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(i=!0),"FORCE_COLOR"in s&&(i=0===s.FORCE_COLOR.length||0!==parseInt(s.FORCE_COLOR,10)),t.exports={supportsColor:u,stdout:u(process.stdout),stderr:u(process.stderr)}},function(t,e){t.exports=require("os")},function(t,e,r){"use strict";t.exports=(t,e)=>{e=e||process.argv;const r=t.startsWith("-")?"":1===t.length?"-":"--",n=e.indexOf(r+t),o=e.indexOf("--");return-1!==n&&(-1===o||n<o)}},function(t,e){t.exports=require("zlib")},function(t){t.exports=JSON.parse('{"_args":[["axios@0.21.1","/opt/atlassian/pipelines/agent/build"]],"_from":"axios@0.21.1","_id":"axios@0.21.1","_inBundle":false,"_integrity":"sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.21.1","name":"axios","escapedName":"axios","rawSpec":"0.21.1","saveSpec":null,"fetchSpec":"0.21.1"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.1.tgz","_spec":"0.21.1","_where":"/opt/atlassian/pipelines/agent/build","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.10.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"homepage":"https://github.com/axios/axios","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test && bundlesize","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.1"}')},function(t,e,r){"use strict";var n=r(45);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},function(t,e,r){"use strict";r.r(e);var n=r(46),o=r.n(n),s=r(47),i=r.n(s);var u={handleHTTPError:function(t){const{config:e}=t;if(!t.response)return Promise.reject(t);const{status:r,data:n}=t.response,o=n&&n.error&&n.error.code;try{const n=r>=400&&r<500;n||this.handleLogAndNotifyError(t);const s=n&&1004===o&&401===r;if(401===r&&!s)return Promise.reject(t);if(400===r&&1010===o)return this.handleLoginRequired(),Promise.reject(t);if(s)return this.Auth.requestNewTokens().then(t=>{const r=t.headers[this.authTokenKey];return e.headers[this.authTokenKey]=r,this.handleNewToken(r),this.http(e)})}catch(t){this.handleLogAndNotifyError(t)}return Promise.reject(t)},handleHTTPResponse:function(t){return t&&t.data&&t.data.data&&(t.query=t.data.query,t.pagination=t.data.pagination,t.data=t.data.data),t},handleGenerateConfig:function(t){return this.config.secretKey&&this.config.clientId?(t.headers.clientId=this.config.clientId,t.headers.secretKey=this.config.secretKey):t.headers[this.authTokenKey]=this.getAuthToken(),t}};function a(t){return{getAll:function(){return this.get(t)},get:function(e){const r=`${t}/${e}`;return this.get(r)},update:function(e,r){const n=`${t}/${e}`;return this.put(n,r)},add:function(e){return this.post(t,e)},delete:function(e){const r=`${t}/${e}`;return this.delete(r)}}}function c(t){const e="/rooms";return{getAll:function(r){const n=`${e}/${r}/${t}`;return this.get(n)},get:function(r,n){const o=`${e}/${r}/${t}/${n}`;return this.get(o)},update:function(r,n,o){const s=`${e}/${r}/${t}/${n}`;return this.put(s,o)},add:function(r,n){const o=`${e}/${r}/${t}`;return this.post(o,n)},delete:function(r,n){const o=`${e}/${r}/${t}/${n}`;return this.delete(o)}}}function h(t){const e="/groups";return{getAll:function(r,n){const o=`${e}/${r}/rooms/${n}/${t}`;return this.get(o)},get:function(r,n,o){const s=`${e}/${r}/rooms/${n}/${t}/${o}`;return this.get(s)},update:function(r,n,o,s){const i=`${e}/${r}/rooms/${n}/${t}/${o}`;return this.put(i,s)},add:function(r,n,o){const s=`${e}/${r}/rooms/${n}/${t}`;return this.post(s,o)},delete:function(r,n,o){const s=`${e}/${r}/rooms/${n}/${t}/${o}`;return this.delete(s)}}}var f=a("/admins");var p={requestNewTokens:async function(){return this.getRefreshToken()?this.post("/auth/token",{},{headers:{[this.refreshTokenKey]:this.getRefreshToken()}}).then(t=>(this.setAuthToken(t.headers[this.authTokenKey]),this.setRefreshToken(t.headers[this.refreshTokenKey]),t)):this.handleLoginRequired()},loginUser:function(t,e){return this.post("/auth/user",{email:t.toLowerCase(),password:e}).then(t=>{const e=t.headers[this.authTokenKey],r=t.headers[this.refreshTokenKey],n=t.data[0];return this.setAuthToken(e),this.setRefreshToken(r),this.setCurrentUser(n),t})},loginGuest:function(t,e,r){return this.post("/auth/guest",{lastName:t,roomNumber:e,phone:r}).then(t=>{const e=t.headers[this.authTokenKey],r=t.headers[this.refreshTokenKey],n=t.data[0];return this.setAuthToken(e),this.setRefreshToken(r),this.setCurrentUser(n),t})},resetPassword:function(t,e,r){const n=`/auth/${t}/set-password`;let o={};return r&&(o.headers={"x-reset-token":r}),this.post(n,{password:e},o).then(t=>!(t.status>=400&&t.status<=500)||(body.error=t.data.error,body))},verifyToken:function(t){return this.post("/auth/verifyToken",{token:t}).then(t=>t.status>=400&&t.status<=500?(body.error=t.data.error,body):t)},sendResetPasswordLink:function(t){const e=`/auth/${t}/sendResetPasswordLink`;return this.post(e,{}).then(t=>t.status>=400&&t.status<=500?(body.error=t.data.error,body):t)},forgotPassword:function(t){return this.post("/users/forgot-password",{email:t}).then(t=>t.status>=400&&t.status<=500?(body.error=t.data.error,body):t)},getNewControllerAuthToken:function(t,e){return this.post("/auth/controller",{authKey:t,controllerId:e}).then(t=>t.status>=400&&t.status<=500?(body.error=t.data.error,body):(this.setAuthToken(t.headers[this.authTokenKey]),t)).catch(t=>{console.log("error",t)})},logout:function(){this.setAuthToken(null),this.setRefreshToken(null),this.setCurrentUser(null),this.removeItem(this.config.lsAuthTokenKey),this.removeItem(this.config.lsRefreshTokenKey),this.removeItem(this.config.lsUserKey)}};const d=a("/concierge");d.getTickets=function(t){return this.get("/concierge/tickets",t)},d.createTicket=function(t){return this.post("/concierge/tickets",t)},d.getPendingTickets=function(t){return this.post("/concierge/tickets/pending",t)},d.closeTickets=function(t){return this.post("/concierge/tickets/close",t)},d.updateTicket=function(t,e){const r="/concierge/tickets/"+t;return this.put(r,e)},d.markAsRead=function(t,e){const r=`/concierge/tickets/${t}/read`;return this.post(r,e)},d.postMessage=function(t,e){const r=`/concierge/tickets/${t}/message`;return this.post(r,e)};var l=d,m=a("/controllers");var g={post:function(t){return this.post("/commands",t)}};const y=a("/groups");y.Room=function(){const t="/groups";return{getAll:function(e){const r=`${t}/${e}/rooms`;return this.get(r)},get:function(e,r){const n=`${t}/${e}/rooms/${r}`;return this.get(n)},update:function(e,r,n){const o=`${t}/${e}/rooms/${r}`;return this.put(o,n)},add:function(e,r){const n=`${t}/${e}/rooms`;return this.post(n,r)},delete:function(e,r){const n=`${t}/${e}/rooms/${r}`;return this.delete(n)}}}(),y.Room.Light=h("lights"),y.Room.Shade=h("shades"),y.Room.Thermostat=h("thermostats"),y.Room.Privacy=h("privacy"),y.Room.Media={get:function(t,e){const r=`/groups/${t}/rooms/${e}/media`;return this.get(r)},update:function(t,e,r){const n=`/groups/${t}/rooms/${e}/media`;return this.put(n,r)}},y.Room.Security={get:function(t,e){const r=`/groups/${t}/rooms/${e}/security`;return this.get(r)},Locks:h("security/locks"),Cameras:h("security/cameras")};var v=y;const b=a("/guests");b.checkIn=function(t,e){const r=`/guests/${t}/checkin`;return this.post(r,e)},b.checkOut=function(t,e){const r=`/guests/${t}/checkout`;return this.post(r,e)},b.invite=function(t){const e=`/guests/${t}/invite`;return this.post(e)};var x=b;const _=a("/hotel-rooms");_.Room={getAll:function(t){const e=`/hotel-rooms/${t}/rooms`;return this.get(e)},add:function(t,e){const r=`/hotel-rooms/${t}/rooms`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/rooms`;return this.delete(r,e)}},_.Guest={getAll:function(t){const e=`/hotel-rooms/${t}/guests`;return this.get(e)}},_.Scenes={getAll:function(t){const e=`/hotel-rooms/${t}/scenes`;return this.get(e)},get:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}`;return this.get(r)},trigger:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}/trigger`;return this.post(r,{})},update:function(t,e,r){const n=`/hotel-rooms/${t}/scenes/${e}`;return this.put(n,r)},add:function(t,e){const r=`/hotel-rooms/${t}/scenes`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}`;return this.delete(r)}},_.Integrations={getAll:function(t){const e=`/hotel-rooms/${t}/integrations`;return this.get(e)},add:function(t,e){const r=`/hotel-rooms/${t}/integrations`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/integrations/${e}`;return this.delete(r)}},_.Alarms={getAll:function(t){const e=`/hotel-rooms/${t}/alarms`;return this.get(e)},get:function(t,e){const r=`/hotel-rooms/${t}/alarms/${e}`;return this.get(r)},add:function(t,e){const r=`/hotel-rooms/${t}/alarms`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/alarms/${e}`;return this.delete(r)}};var C=_;const w={getAll:function(){return this.get("/integrations")},get:function(t){const e="/integrations/"+t;return this.get(e)},update:function(t,e){const r="/integrations/"+t;return this.put(r,e)},add:function(t){return this.post("/integrations",t)}},R={getAll:function(){return this.get("/integrations/types")}},T={add:function(t,e){return this.post(`/integrations/${t}/deviceMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/deviceMap`,e)}},k={add:function(t,e){return this.post(`/integrations/${t}/roomMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/roomMap`,e)}},$={update:function(t,e){const r=`/integrations/${t}/metadata`;return this.post(r,e)}};w.Types=R,w.RoomMap=k,w.Metadata=$,w.DeviceMap=T;var j=w;const O=a("structure/images");O.uploadImage=async function(t,e){return await this.uploadFile("/structure/images/upload",t,e)};var A=O;var E=c("lights");var S=c("privacy");var M=c("security/locks"),F=a("/managers");const P={};P.get=function(){return this.get("/manifest.json")};var B=P;const L=function(){return{getAll:function(t){return this.get(`/rooms/${t}/media/sources`)},get:function(t,e){return this.get(`/rooms/${t}/media/sources/${e}`)},add:function(t,e){return this.post(`/rooms/${t}/media/sources`,e)}}};L.getGenres=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/genres`;return this.http.get(r,{})},L.getStations=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/stations`;return this.http.get(r,{})};var q=L;const I=a("/notifications");I.Response=function(t){return this.http.post("/notifications/response",{params:t})},I.Send=function(t,e){const r="/notifications/"+t;return this.http.post(r,{params:e})};var N=I;const U=a("/reports");U.getEnergyStats=function(t){return this.http.get("/reports/room/stats",{params:t})},U.getTicketStats=function(t){return this.http.get("/reports/ticket/stats",{params:t})};var z=U;const D=a("/rooms");D.Scenes={getAll:function(t){const e=`/rooms/${t}/scenes`;return this.get(e)},get:function(t,e){const r=`/rooms/${t}/scenes/${e}`;return this.get(r)},trigger:function(t,e){const r=`/rooms/${t}/scenes/${e}/trigger`;return this.post(r,{})},update:function(t,e,r){const n=`/rooms/${t}/scenes/${e}`;return this.put(n,r)},add:function(t,e){const r=`/rooms/${t}/scenes`;return this.post(r,e)},delete:function(t,e){const r=`/rooms/${t}/scenes/${e}`;return this.delete(r)}},D.Media={getAll:function(t){const e=`/rooms/${t}/media`;return this.get(e)},update:function(t,e){const r=`/rooms/${t}/media`;return this.put(r,e)},trigger:function(t,e){const r=`/rooms/${t}/media`;return this.post(r,e)}},D.Security={getAll:function(t){const e=`/rooms/${t}/security`;return this.get(e)},Locks:{getAll:function(t){const e=`/rooms/${t}/security/locks`;return this.get(e)},get:function(t,e){const r=`/rooms/${t}/security/locks/${e}`;return this.get(r)},update:function(t,e,r){const n=`/rooms/${t}/security/locks/${e}`;return this.put(n,r)},add:function(t,e){const r=`/rooms/${t}/security/locks`;return this.post(r,e)},delete:function(t,e){const r=`/rooms/${t}/security/locks/${e}`;return this.delete(r)},trigger:function(t,e){const r=`/rooms/${t}/security/locks/${e}`;return this.post(r,{})}},Cameras:{getAll:function(t){const e=`/rooms/${t}/security/cameras`;return this.get(e)},get:function(t,e){const r=`/rooms/${t}/security/cameras/${e}`;return this.get(r)},update:function(t,e,r){const n=`/rooms/${t}/security/cameras/${e}`;return this.put(n,r)},add:function(t,e){const r=`/rooms/${t}/security/cameras`;return this.post(r,e)},delete:function(t,e){const r=`/rooms/${t}/security/cameras/${e}`;return this.delete(r)}}};var H=D;var K={getAll:function(){return this.http.get("/settings",{})},get:function(t){return this.http.get("/settings/"+t,{})},save:function(t,e){return this.http.post("/settings/"+t,e)}};var G=c("shades");const V=a("sources");V.updatePlayer=function(t){return this.post(`sources/${t}/player`,{})},V.browse={get:function(t){const e=`sources/${t}/browse`;return this.get(e)},genres:{getAll:function(t){const e=`sources/${t}/browse/genres`;return this.get(e)},get:function(t,e){const r=`sources/${t}/browse/genres/${e}`;return this.get(r)},getStations:function(t,e){const r=`sources/${t}/browse/genres/${e}/stations`;return this.get(r)},update:function(t,e){const r=`sources/${t}/browse/genres`;return this.post(r,e)}},stations:{update:function(t,e){const r=`sources/${t}/browse/stations`;return this.post(r,e)},getAll:function(t){const e=`sources/${t}/browse/stations`;return this.get(e)}}};var J=V;const Y={};Y.getRoomList=function(){return this.http.get("/structure/roomList",{})},Y.getSummary=function(){return this.http.get("/structure/summary",{})},Y.getDeviceCount=function(){return this.http.get("/structure/deviceCount",{})};var X=Y;var W={add:function(t){return this.http.post("/subscription",t)},get:function(t){return this.http.get("/subscription/"+t,{})},getAll:function(){return this.http.get("/subscription",{})},delete:function(t){return this.http.delete("/subscription/"+t,{})}};var Z=c("thermostats");const Q=a("/users");function tt(t,e){if(t===this.getCurrentUser()._id){const{data:t,headers:r}=e;if(t){const e=t&&t[0];this.setCurrentUser(e)}if(r){const t=r[this.authTokenKey],e=r[this.refreshTokenKey];t&&this.setAuthToken(t),e&&this.setRefreshToken(e)}}return e}Q.update=function(t,e){const r="/users/"+t,n=tt.bind(this);return this.put(r,e).then(e=>n(t,e))},Q.get=function(t){const e="/users/"+t,r=tt.bind(this);return this.get(e).then(e=>r(t,e))},Q.changeAvatar=function(t){return this.http.post("/users/change-avatar",t)},Q.checkout=function(){return this.http.post("/users/checkout")},Q.resetPassword=function(t,{password:e,resetToken:r}){const n=`/users/${t}/reset-password`;return this.post(n,{password:e,resetToken:r}).then(t=>!(t.status>=400&&t.status<=500)||(body.error=t.data.error,body))},Q.invite=function(t){const e=`/users/${t}/invite`;return this.post(e)};var et=Q;const rt=new class{constructor(t){this.config={url:t,version:2,lsAuthTokenKey:"x-auth-token",lsRefreshTokenKey:"x-refresh-token",lsUserKey:"current-user",clientId:void 0,secretKey:void 0,autoRefreshTokens:!0,tenant:null,onNewToken:function(){},onLoginRequired:function(){throw new Error("API Client - login required")}},this.isBrowser="undefined"!=typeof window,this.authTokenKey="x-auth-token",this.refreshTokenKey="x-refresh-token",this.http=void 0,this.authToken="",this.currentUser=void 0,this.logger=console,this.config.update=this.updateConfig.bind(this),this.handleHTTPResponseError=u.handleHTTPError.bind(this),this.handleHTTPResponseSuccess=u.handleHTTPResponse.bind(this),this.handleHTTPRequestConfig=u.handleGenerateConfig.bind(this),this.Admin=this.bindMethods(f),this.Auth=this.bindMethods(p),this.Guest=this.bindMethods(x),this.User=this.bindMethods(et),this.Group=this.bindMethods(v),this.Group.Room=this.bindMethods(v.Room),this.Group.Room.Light=this.bindMethods(v.Room.Light),this.Group.Room.Shade=this.bindMethods(v.Room.Shade),this.Group.Room.Thermostat=this.bindMethods(v.Room.Thermostat),this.Group.Room.Media=this.bindMethods(v.Room.Media),this.Group.Room.Privacy=this.bindMethods(v.Room.Privacy),this.Group.Room.Security=this.bindMethods(v.Room.Security),this.Group.Room.Security.Locks=this.bindMethods(v.Room.Security.Locks),this.Group.Room.Security.Cameras=this.bindMethods(v.Room.Security.Cameras),this.HotelRoom=this.bindMethods(C),this.HotelRoom.Room=this.bindMethods(C.Room),this.HotelRoom.Guest=this.bindMethods(C.Guest),this.HotelRoom.Alarms=this.bindMethods(C.Alarms),this.HotelRoom.Scenes=this.bindMethods(C.Scenes),this.HotelRoom.Integrations=this.bindMethods(C.Integrations),this.Room=this.bindMethods(H),this.Room.Light=this.bindMethods(E),this.Room.Shade=this.bindMethods(G),this.Room.Thermostat=this.bindMethods(Z),this.Room.Lock=this.bindMethods(M),this.Room.Privacy=this.bindMethods(S),this.Room.Scenes=this.bindMethods(H.Scenes),this.Room.Media=this.bindMethods(H.Media),this.Room.Security=this.bindMethods(H.Security),this.Room.Security.Locks=this.bindMethods(H.Security.Locks),this.Room.Security.Cameras=this.bindMethods(H.Security.Cameras),this.Settings=this.bindMethods(K),this.Subscriptions=this.bindMethods(W),this.Reports=this.bindMethods(z),this.Controllers=this.bindMethods(m),this.Integrations=this.bindMethods(j),this.Integrations.Types=this.bindMethods(j.Types),this.Integrations.RoomMap=this.bindMethods(j.RoomMap),this.Integrations.Metadata=this.bindMethods(j.Metadata),this.Integrations.DeviceMap=this.bindMethods(j.DeviceMap),this.Concierge=this.bindMethods(l),this.Commands=this.bindMethods(g),this.Image=this.bindMethods(A),this.Source=this.bindMethods(J),this.Source.browse=this.bindMethods(J.browse),this.Source.browse.genres=this.bindMethods(J.browse.genres),this.Source.browse.stations=this.bindMethods(J.browse.stations),this.Structure=this.bindMethods(X),this.Structure.Images=this.bindMethods(A),this.Media=this.bindMethods(q),this.Manifest=this.bindMethods(B),this.Manager=this.bindMethods(F),this.Notifications=this.bindMethods(N),this.createHTTPClient()}bindMethods(t){const e=t=>t.bind(this),r={};return Object.keys(t).forEach(n=>{"function"==typeof t[n]&&(r[n]=e(t[n]))}),r}updateConfig(t){this.config=o()(this.config,t),this.createHTTPClient()}createHTTPClient(){this.http=i.a.create({baseURL:this.config.url,headers:{"Content-Type":"application/json; charset=utf-8","x-tenant-id":this.config.tenant}}),this.http.interceptors.response.use(this.handleHTTPResponseSuccess,this.handleHTTPResponseError),this.http.interceptors.request.use(this.handleHTTPRequestConfig,null)}getItem(t){if(this.isBrowser)try{return JSON.parse(localStorage.getItem(t))}catch(e){return localStorage.getItem(t)}}saveItem(t,e){this.isBrowser&&("object"==typeof e&&(e=JSON.stringify(e)),localStorage.setItem(t,e))}removeItem(t){this.isBrowser&&localStorage.removeItem(t)}setAuthToken(t){this.authToken=t,this.saveItem(this.config.lsAuthTokenKey,t)}setRefreshToken(t){this.refreshToken=t,this.saveItem(this.config.lsRefreshTokenKey,t)}setCurrentUser(t){this.currentUser=t,this.saveItem(this.config.lsUserKey,t)}getAuthToken(){return this.isBrowser?this.getItem(this.config.lsAuthTokenKey):this.authToken}getRefreshToken(){return this.isBrowser?this.getItem(this.config.lsRefreshTokenKey):this.refreshToken}getCurrentUser(){return this.isBrowser?this.getItem(this.config.lsUserKey):this.currentUser}handleLoginRequired(){return this.config.onLoginRequired()}handleNewToken(t){return this.config.onNewToken(t)}handleLogAndNotifyError(t){this.logger.log(t)}get(t,e={}){return this.http.get(t,e)}post(t,e,r={}){return this.http.post(t,e,r)}put(t,e,r={}){return this.http.put(t,e,r)}delete(t,e,r={}){return r.data=e,this.http.delete(t,r)}uploadFile(t,e,r=function(){}){return this.http({method:"POST",url:t,data:e,onUploadProgress:r,headers:{"Content-Type":"multipart/form-data; boundary="+e._boundary}})}};e.default=rt}]);
|
package/package.json
CHANGED
package/src/interceptors.js
CHANGED
|
@@ -11,10 +11,11 @@ function handleHTTPError(error) {
|
|
|
11
11
|
const newTokensNeeded = expectedError && errorCode === 1004 && status === 401
|
|
12
12
|
|
|
13
13
|
if (status === 401 && !newTokensNeeded) {
|
|
14
|
-
return
|
|
14
|
+
return Promise.reject(error);
|
|
15
15
|
}
|
|
16
16
|
if (status === 400 && errorCode === 1010) {
|
|
17
|
-
|
|
17
|
+
this.handleLoginRequired();
|
|
18
|
+
return Promise.reject(error);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
if (newTokensNeeded) {
|
|
@@ -35,6 +36,8 @@ function handleHTTPError(error) {
|
|
|
35
36
|
|
|
36
37
|
function handleHTTPResponse(response) {
|
|
37
38
|
if (response && response.data && response.data.data) {
|
|
39
|
+
response.query = response.data.query;
|
|
40
|
+
response.pagination = response.data.pagination;
|
|
38
41
|
response.data = response.data.data;
|
|
39
42
|
}
|
|
40
43
|
return response;
|