@kohost/api-client 0.6.5-alpha.2 → 0.6.5-alpha.3
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/client.js +3 -0
package/dist/bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var t={9669:(t,e,r)=>{t.exports=r(1609)},7970:(t,e,r)=>{"use strict";var n=r(4867),o=r(6026),s=r(4097),i=r(5327),a=r(3685),u=r(5687),c=r(938).http,h=r(938).https,p=r(7310),f=r(9796),d=r(7288).version,l=r(5061),g=r(481),m=r(5655),y=r(5263),v=/https:?/;function b(t,e,r){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=r,e.auth){var n=Buffer.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+n}t.beforeRedirect=function(t){t.headers.host=t.host,b(t,e,t.href)}}t.exports=function(t){return new Promise((function(e,r){var _;function x(){t.cancelToken&&t.cancelToken.unsubscribe(_),t.signal&&t.signal.removeEventListener("abort",_)}var C=function(t){x(),e(t)},w=function(t){x(),r(t)},R=t.data,T=t.headers,$={};if(Object.keys(T).forEach((function(t){$[t.toLowerCase()]=t})),"user-agent"in $?T[$["user-agent"]]||delete T[$["user-agent"]]:T["User-Agent"]="axios/"+d,R&&!n.isStream(R)){if(Buffer.isBuffer(R));else if(n.isArrayBuffer(R))R=Buffer.from(new Uint8Array(R));else{if(!n.isString(R))return w(l("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",t));R=Buffer.from(R,"utf-8")}$["content-length"]||(T["Content-Length"]=R.length)}var O=void 0;t.auth&&(O=(t.auth.username||"")+":"+(t.auth.password||""));var k=s(t.baseURL,t.url),E=p.parse(k),A=E.protocol||"http:";if(!O&&E.auth){var j=E.auth.split(":");O=(j[0]||"")+":"+(j[1]||"")}O&&$.authorization&&delete T[$.authorization];var S=v.test(A),M=S?t.httpsAgent:t.httpAgent,F={path:i(E.path,t.params,t.paramsSerializer).replace(/^\?/,""),method:t.method.toUpperCase(),headers:T,agent:M,agents:{http:t.httpAgent,https:t.httpsAgent},auth:O};t.socketPath?F.socketPath=t.socketPath:(F.hostname=E.hostname,F.port=E.port);var P,L=t.proxy;if(!L&&!1!==L){var I=A.slice(0,-1)+"_proxy",N=process.env[I]||process.env[I.toUpperCase()];if(N){var B=p.parse(N),U=process.env.no_proxy||process.env.NO_PROXY,q=!0;if(U&&(q=!U.split(",").map((function(t){return t.trim()})).some((function(t){return!!t&&("*"===t||"."===t[0]&&E.hostname.substr(E.hostname.length-t.length)===t||E.hostname===t)}))),q&&(L={host:B.hostname,port:B.port,protocol:B.protocol},B.auth)){var z=B.auth.split(":");L.auth={username:z[0],password:z[1]}}}}L&&(F.headers.host=E.hostname+(E.port?":"+E.port:""),b(F,L,A+"//"+E.hostname+(E.port?":"+E.port:"")+F.path));var D=S&&(!L||v.test(L.protocol));t.transport?P=t.transport:0===t.maxRedirects?P=D?u:a:(t.maxRedirects&&(F.maxRedirects=t.maxRedirects),P=D?h:c),t.maxBodyLength>-1&&(F.maxBodyLength=t.maxBodyLength),t.insecureHTTPParser&&(F.insecureHTTPParser=t.insecureHTTPParser);var H=P.request(F,(function(e){if(!H.aborted){var r=e,s=e.req||H;if(204!==e.statusCode&&"HEAD"!==s.method&&!1!==t.decompress)switch(e.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(f.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(C,w,i);else{var a=[],u=0;r.on("data",(function(e){a.push(e),u+=e.length,t.maxContentLength>-1&&u>t.maxContentLength&&(r.destroy(),w(l("maxContentLength size of "+t.maxContentLength+" exceeded",t,null,s)))})),r.on("error",(function(e){H.aborted||w(g(e,t,null,s))})),r.on("end",(function(){var e=Buffer.concat(a);"arraybuffer"!==t.responseType&&(e=e.toString(t.responseEncoding),t.responseEncoding&&"utf8"!==t.responseEncoding||(e=n.stripBOM(e))),i.data=e,o(C,w,i)}))}}}));if(H.on("error",(function(e){H.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||w(g(e,t,null,H))})),t.timeout){var G=parseInt(t.timeout,10);if(isNaN(G))return void w(l("error trying to parse `config.timeout` to int",t,"ERR_PARSE_TIMEOUT",H));H.setTimeout(G,(function(){H.abort();var e=t.transitional||m.transitional;w(l("timeout of "+G+"ms exceeded",t,e.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",H))}))}(t.cancelToken||t.signal)&&(_=function(t){H.aborted||(H.abort(),w(!t||t&&t.type?new y("canceled"):t))},t.cancelToken&&t.cancelToken.subscribe(_),t.signal&&(t.signal.aborted?_():t.signal.addEventListener("abort",_))),n.isStream(R)?R.on("error",(function(e){w(g(e,t,null,H))})).pipe(H):H.end(R)}))}},5448:(t,e,r)=>{"use strict";var n=r(4867),o=r(6026),s=r(4372),i=r(5327),a=r(4097),u=r(4109),c=r(7985),h=r(5061),p=r(5655),f=r(5263);t.exports=function(t){return new Promise((function(e,r){var d,l=t.data,g=t.headers,m=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(d),t.signal&&t.signal.removeEventListener("abort",d)}n.isFormData(l)&&delete g["Content-Type"];var v=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",_=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+_)}var x=a(t.baseURL,t.url);function C(){if(v){var n="getAllResponseHeaders"in v?u(v.getAllResponseHeaders()):null,s={data:m&&"text"!==m&&"json"!==m?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:t,request:v};o((function(t){e(t),y()}),(function(t){r(t),y()}),s),v=null}}if(v.open(t.method.toUpperCase(),i(x,t.params,t.paramsSerializer),!0),v.timeout=t.timeout,"onloadend"in v?v.onloadend=C:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(C)},v.onabort=function(){v&&(r(h("Request aborted",t,"ECONNABORTED",v)),v=null)},v.onerror=function(){r(h("Network Error",t,null,v)),v=null},v.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",n=t.transitional||p.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(h(e,t,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},n.isStandardBrowserEnv()){var w=(t.withCredentials||c(x))&&t.xsrfCookieName?s.read(t.xsrfCookieName):void 0;w&&(g[t.xsrfHeaderName]=w)}"setRequestHeader"in v&&n.forEach(g,(function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete g[e]:v.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(v.withCredentials=!!t.withCredentials),m&&"json"!==m&&(v.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&v.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(d=function(t){v&&(r(!t||t&&t.type?new f("canceled"):t),v.abort(),v=null)},t.cancelToken&&t.cancelToken.subscribe(d),t.signal&&(t.signal.aborted?d():t.signal.addEventListener("abort",d))),l||(l=null),v.send(l)}))}},1609:(t,e,r)=>{"use strict";var n=r(4867),o=r(1849),s=r(321),i=r(7185),a=function t(e){var r=new s(e),a=o(s.prototype.request,r);return n.extend(a,s.prototype,r),n.extend(a,r),a.create=function(r){return t(i(e,r))},a}(r(5655));a.Axios=s,a.Cancel=r(5263),a.CancelToken=r(4972),a.isCancel=r(6502),a.VERSION=r(7288).version,a.all=function(t){return Promise.all(t)},a.spread=r(8713),a.isAxiosError=r(6268),t.exports=a,t.exports.default=a},5263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},4972:(t,e,r)=>{"use strict";var n=r(5263);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;this.promise.then((function(t){if(r._listeners){var e,n=r._listeners.length;for(e=0;e<n;e++)r._listeners[e](t);r._listeners=null}})),this.promise.then=function(t){var e,n=new Promise((function(t){r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},o.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},6502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,r)=>{"use strict";var n=r(4867),o=r(5327),s=r(782),i=r(3572),a=r(7185),u=r(4875),c=u.validators;function h(t){this.defaults=t,this.interceptors={request:new s,response:new s}}h.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&u.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(n=n&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,s=[];if(this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)})),!n){var h=[i,void 0];for(Array.prototype.unshift.apply(h,r),h=h.concat(s),o=Promise.resolve(t);h.length;)o=o.then(h.shift(),h.shift());return o}for(var p=t;r.length;){var f=r.shift(),d=r.shift();try{p=f(p)}catch(t){d(t);break}}try{o=i(p)}catch(t){return Promise.reject(t)}for(;s.length;)o=o.then(s.shift(),s.shift());return o},h.prototype.getUri=function(t){return t=a(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){h.prototype[t]=function(e,r){return this.request(a(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){h.prototype[t]=function(e,r,n){return this.request(a(n||{},{method:t,url:e,data:r}))}})),t.exports=h},782:(t,e,r)=>{"use strict";var n=r(4867);function o(){this.handlers=[]}o.prototype.use=function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),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},4097:(t,e,r)=>{"use strict";var n=r(1793),o=r(7303);t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},5061:(t,e,r)=>{"use strict";var n=r(481);t.exports=function(t,e,r,o,s){var i=new Error(t);return n(i,e,r,o,s)}},3572:(t,e,r)=>{"use strict";var n=r(4867),o=r(8527),s=r(6502),i=r(5655),a=r(5263);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new a("canceled")}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=o.call(t,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.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(u(t),e&&e.response&&(e.response.data=o.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"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,status:this.response&&this.response.status?this.response.status:null}},t}},7185:(t,e,r)=>{"use strict";var n=r(4867);t.exports=function(t,e){e=e||{};var r={};function o(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 s(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(t[r],e[r])}function i(t){if(!n.isUndefined(e[t]))return o(void 0,e[t])}function a(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(void 0,e[r])}function u(r){return r in e?o(t[r],e[r]):r in t?o(void 0,t[r]):void 0}var c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return n.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||s,o=e(t);n.isUndefined(o)&&e!==u||(r[t]=o)})),r}},6026:(t,e,r)=>{"use strict";var n=r(5061);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)}},8527:(t,e,r)=>{"use strict";var n=r(4867),o=r(5655);t.exports=function(t,e,r){var s=this||o;return n.forEach(r,(function(r){t=r.call(s,t,e)})),t}},5655:(t,e,r)=>{"use strict";var n=r(4867),o=r(6016),s=r(481),i={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?u=r(5448):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(u=r(7970)),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)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)||e&&"application/json"===e["Content-Type"]?(a(e,"application/json"),function(t,e,r){if(n.isString(t))try{return(0,JSON.parse)(t),n.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||c.transitional,r=e&&e.silentJSONParsing,o=e&&e.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||o&&n.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(i){if("SyntaxError"===t.name)throw s(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){c.headers[t]=n.merge(i)})),t.exports=c},7288:t=>{t.exports={version:"0.24.0"}},1849:t=>{"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)}}},5327:(t,e,r)=>{"use strict";var n=r(4867);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 a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,r)=>{"use strict";var n=r(4867);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,o,s,i){var a=[];a.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(s)&&a.push("domain="+s),!0===i&&a.push("secure"),document.cookie=a.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(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},6268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},7985:(t,e,r)=>{"use strict";var n=r(4867);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}},6016:(t,e,r)=>{"use strict";var n=r(4867);t.exports=function(t,e){n.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))}},4109:(t,e,r)=>{"use strict";var n=r(4867),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}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4875:(t,e,r)=>{"use strict";var n=r(7288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){o[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var s={};o.transitional=function(t,e,r){function o(t,e){return"[Axios v"+n+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,n,i){if(!1===t)throw new Error(o(n," has been removed"+(e?" in "+e:"")));return e&&!s[n]&&(s[n]=!0,console.warn(o(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,i)}},t.exports={assertOptions:function(t,e,r){if("object"!=typeof t)throw new TypeError("options must be an object");for(var n=Object.keys(t),o=n.length;o-- >0;){var s=n[o],i=e[s];if(i){var a=t[s],u=void 0===a||i(a,s,t);if(!0!==u)throw new TypeError("option "+s+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+s)}},validators:o}},4867:(t,e,r)=>{"use strict";var n=r(1849),o=Object.prototype.toString;function s(t){return"[object Array]"===o.call(t)}function i(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function u(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:a,isPlainObject:u,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 a(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){u(e[n])&&u(r)?e[n]=t(e[n],r):u(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.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},9435:t=>{var e=1e3,r=60*e,n=60*r,o=24*n;function s(t,e,r,n){var o=e>=1.5*r;return Math.round(t/r)+" "+n+(o?"s":"")}t.exports=function(t,i){i=i||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var s=/^(-?(?:\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(s){var i=parseFloat(s[1]);switch((s[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*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*n;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(t);if("number"===c&&isFinite(t))return i.long?(a=t,(u=Math.abs(a))>=o?s(a,u,o,"day"):u>=n?s(a,u,n,"hour"):u>=r?s(a,u,r,"minute"):u>=e?s(a,u,e,"second"):a+" ms"):function(t){var s=Math.abs(t);return s>=o?Math.round(t/o)+"d":s>=n?Math.round(t/n)+"h":s>=r?Math.round(t/r)+"m":s>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1227:(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){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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(2447)(e);const{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},2447:(t,e,r)=>{t.exports=function(t){function e(t){let r,o,s,i=null;function a(...t){if(!a.enabled)return;const n=a,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let i=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";i++;const s=e.formatters[o];if("function"==typeof s){const e=t[i];r=s.call(n,e),t.splice(i,1),i--}return r})),e.formatArgs.call(n,t),(n.log||e.log).apply(n,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=n,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(o!==e.namespaces&&(o=e.namespaces,s=e.enabled(t)),s),set:t=>{i=t}}),"function"==typeof e.init&&e.init(a),a}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){return t instanceof Error?t.stack||t.message: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.namespaces=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(9435),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}},5158:(t,e,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?t.exports=r(1227):t.exports=r(39)},39:(t,e,r)=>{const n=r(6224),o=r(3837);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]=(e.inspectOpts.hideDate?"":(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(2130);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(2447)(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)}},2261:(t,e,r)=>{var n;t.exports=function(){if(!n){try{n=r(5158)("follow-redirects")}catch(t){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},938:(t,e,r)=>{var n=r(7310),o=n.URL,s=r(3685),i=r(5687),a=r(2781).Writable,u=r(9491),c=r(2261),h=["abort","aborted","connect","error","socket","timeout"],p=Object.create(null);h.forEach((function(t){p[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}}));var f=x("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),d=x("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),l=x("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),g=x("ERR_STREAM_WRITE_AFTER_END","write after end");function m(t,e){a.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 y(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach((function(s){var i=s+":",a=r[i]=t[s],h=e[s]=Object.create(a);Object.defineProperties(h,{request:{value:function(t,s,a){if("string"==typeof t){var h=t;try{t=b(new o(h))}catch(e){t=n.parse(h)}}else o&&t instanceof o?t=b(t):(a=s,s=t,t={protocol:i});return"function"==typeof s&&(a=s,s=null),(s=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},t,s)).nativeProtocols=r,u.equal(s.protocol,i,"protocol mismatch"),c("options",s),new m(s,a)},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 v(){}function b(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 null==r?void 0:String(r).trim()}function x(t,e){function r(t){Error.captureStackTrace(this,this.constructor),t?(this.message=e+": "+t.message,this.cause=t):this.message=e}return r.prototype=new Error,r.prototype.constructor=r,r.prototype.name="Error ["+t+"]",r.prototype.code=t,r}function C(t){for(var e=0;e<h.length;e++)t.removeListener(h[e],p[h[e]]);t.on("error",v),t.abort()}m.prototype=Object.create(a.prototype),m.prototype.abort=function(){C(this._currentRequest),this.emit("abort")},m.prototype.write=function(t,e,r){if(this._ending)throw new g;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 l),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){var r=this;function n(e){e.setTimeout(t),e.removeListener("timeout",e.destroy),e.addListener("timeout",e.destroy)}function o(e){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),s()}),t),n(e)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",o)}return e&&this.on("timeout",e),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this},["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);this._currentUrl=n.format(this._options),o._redirectable=this;for(var s=0;s<h.length;s++)o.on(h[s],p[h[s]]);if(this._isRedirect){var i=0,a=this,u=this._requestBodyBuffers;!function t(e){if(o===a._currentRequest)if(e)a.emit("error",e);else if(i<u.length){var r=u[i++];o.finished||o.write(r.data,r.encoding,t)}else a._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(C(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new d);((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,s=_(/^host$/i,this._options.headers),i=n.parse(this._currentUrl),a=s||i.host,u=/^\w+:/.test(r)?this._currentUrl:n.format(Object.assign(i,{host:a}));try{o=n.resolve(u,r)}catch(t){return void this.emit("error",new f(t))}c("redirecting to",o),this._isRedirect=!0;var h=n.parse(o);if(Object.assign(this._options,h),h.host===a||function(t,e){const r=t.length-e.length-1;return r>0&&"."===t[r]&&t.endsWith(e)}(h.host,a)||_(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var p={headers:t.headers};try{this._options.beforeRedirect.call(null,this._options,p)}catch(t){return void this.emit("error",t)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(t){this.emit("error",new f(t))}}else t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[]},t.exports=y({http:s,https:i}),t.exports.wrap=y},8512:t=>{"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)}},1989:(t,e,r)=>{var n=r(1789),o=r(401),s=r(7667),i=r(1327),a=r(1866);function u(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])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=i,u.prototype.set=a,t.exports=u},8407:(t,e,r)=>{var n=r(7040),o=r(4125),s=r(2117),i=r(7518),a=r(4705);function u(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])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=i,u.prototype.set=a,t.exports=u},7071:(t,e,r)=>{var n=r(852)(r(5639),"Map");t.exports=n},3369:(t,e,r)=>{var n=r(4785),o=r(1285),s=r(6e3),i=r(9916),a=r(5265);function u(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])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=i,u.prototype.set=a,t.exports=u},6384:(t,e,r)=>{var n=r(8407),o=r(7465),s=r(3779),i=r(7599),a=r(4758),u=r(4309);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=a,c.prototype.set=u,t.exports=c},2705:(t,e,r)=>{var n=r(5639).Symbol;t.exports=n},1149:(t,e,r)=>{var n=r(5639).Uint8Array;t.exports=n},6874:t=>{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)}},4636:(t,e,r)=>{var n=r(2545),o=r(5694),s=r(1469),i=r(4144),a=r(5776),u=r(6719),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=s(t),h=!r&&o(t),p=!r&&!h&&i(t),f=!r&&!h&&!p&&u(t),d=r||h||p||f,l=d?n(t.length,String):[],g=l.length;for(var m in t)!e&&!c.call(t,m)||d&&("length"==m||p&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||l.push(m);return l}},6556:(t,e,r)=>{var n=r(9465),o=r(7813);t.exports=function(t,e,r){(void 0!==r&&!o(t[e],r)||void 0===r&&!(e in t))&&n(t,e,r)}},4865:(t,e,r)=>{var n=r(9465),o=r(7813),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)}},8470:(t,e,r)=>{var n=r(7813);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},9465:(t,e,r)=>{var n=r(8777);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},3118:(t,e,r)=>{var n=r(3218),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},8483:(t,e,r)=>{var n=r(5063)();t.exports=n},4239:(t,e,r)=>{var n=r(2705),o=r(9607),s=r(2333),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)}},9454:(t,e,r)=>{var n=r(4239),o=r(7005);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},8458:(t,e,r)=>{var n=r(3560),o=r(5346),s=r(3218),i=r(346),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,h=u.toString,p=c.hasOwnProperty,f=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||o(t))&&(n(t)?f:a).test(i(t))}},8749:(t,e,r)=>{var n=r(4239),o=r(1780),s=r(7005),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)]}},313:(t,e,r)=>{var n=r(3218),o=r(5726),s=r(3498),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return s(t);var e=o(t),r=[];for(var a in t)("constructor"!=a||!e&&i.call(t,a))&&r.push(a);return r}},2980:(t,e,r)=>{var n=r(6384),o=r(6556),s=r(8483),i=r(9783),a=r(3218),u=r(1704),c=r(6390);t.exports=function t(e,r,h,p,f){e!==r&&s(r,(function(s,u){if(f||(f=new n),a(s))i(e,r,u,h,t,p,f);else{var d=p?p(c(e,u),s,u+"",e,r,f):void 0;void 0===d&&(d=s),o(e,u,d)}}),u)}},9783:(t,e,r)=>{var n=r(6556),o=r(4626),s=r(7133),i=r(278),a=r(8517),u=r(5694),c=r(1469),h=r(9246),p=r(4144),f=r(3560),d=r(3218),l=r(8630),g=r(6719),m=r(6390),y=r(9881);t.exports=function(t,e,r,v,b,_,x){var C=m(t,r),w=m(e,r),R=x.get(w);if(R)n(t,r,R);else{var T=_?_(C,w,r+"",t,e,x):void 0,$=void 0===T;if($){var O=c(w),k=!O&&p(w),E=!O&&!k&&g(w);T=w,O||k||E?c(C)?T=C:h(C)?T=i(C):k?($=!1,T=o(w,!0)):E?($=!1,T=s(w,!0)):T=[]:l(w)||u(w)?(T=C,u(C)?T=y(C):d(C)&&!f(C)||(T=a(w))):$=!1}$&&(x.set(w,T),b(T,w,v,_,x),x.delete(w)),n(t,r,T)}}},5976:(t,e,r)=>{var n=r(6557),o=r(5357),s=r(61);t.exports=function(t,e){return s(o(t,e,n),t+"")}},6560:(t,e,r)=>{var n=r(5703),o=r(8777),s=r(6557),i=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:s;t.exports=i},2545:t=>{t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},1717:t=>{t.exports=function(t){return function(e){return t(e)}}},4318:(t,e,r)=>{var n=r(1149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},4626:(t,e,r)=>{t=r.nmd(t);var n=r(5639),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,i=s&&s.exports===o?n.Buffer:void 0,a=i?i.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}},7133:(t,e,r)=>{var n=r(4318);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},278:t=>{t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},8363:(t,e,r)=>{var n=r(4865),o=r(9465);t.exports=function(t,e,r,s){var i=!r;r||(r={});for(var a=-1,u=e.length;++a<u;){var c=e[a],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}},4429:(t,e,r)=>{var n=r(5639)["__core-js_shared__"];t.exports=n},1463:(t,e,r)=>{var n=r(5976),o=r(6612);t.exports=function(t){return n((function(e,r){var n=-1,s=r.length,i=s>1?r[s-1]:void 0,a=s>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(s--,i):void 0,a&&o(r[0],r[1],a)&&(i=s<3?void 0:i,s=1),e=Object(e);++n<s;){var u=r[n];u&&t(e,u,n,i)}return e}))}},5063:t=>{t.exports=function(t){return function(e,r,n){for(var o=-1,s=Object(e),i=n(e),a=i.length;a--;){var u=i[t?a:++o];if(!1===r(s[u],u,s))break}return e}}},8777:(t,e,r)=>{var n=r(852),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},1957:t=>{var e="object"==typeof global&&global&&global.Object===Object&&global;t.exports=e},5050:(t,e,r)=>{var n=r(7019);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},852:(t,e,r)=>{var n=r(8458),o=r(7801);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},5924:(t,e,r)=>{var n=r(5569)(Object.getPrototypeOf,Object);t.exports=n},9607:(t,e,r)=>{var n=r(2705),o=Object.prototype,s=o.hasOwnProperty,i=o.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=s.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(t){}var o=i.call(t);return n&&(e?t[a]=r:delete t[a]),o}},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},1789:(t,e,r)=>{var n=r(4536);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,r)=>{var n=r(4536),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}},1327:(t,e,r)=>{var n=r(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},1866:(t,e,r)=>{var n=r(4536);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}},8517:(t,e,r)=>{var n=r(3118),o=r(5924),s=r(5726);t.exports=function(t){return"function"!=typeof t.constructor||s(t)?{}:n(o(t))}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r}},6612:(t,e,r)=>{var n=r(7813),o=r(8612),s=r(5776),i=r(3218);t.exports=function(t,e,r){if(!i(r))return!1;var a=typeof e;return!!("number"==a?o(r)&&s(e,r.length):"string"==a&&e in r)&&n(r[e],t)}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,r)=>{var n,o=r(4429),s=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!s&&s in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,r)=>{var n=r(8470),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))}},2117:(t,e,r)=>{var n=r(8470);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},7518:(t,e,r)=>{var n=r(8470);t.exports=function(t){return n(this.__data__,t)>-1}},4705:(t,e,r)=>{var n=r(8470);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}},4785:(t,e,r)=>{var n=r(1989),o=r(8407),s=r(7071);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||o),string:new n}}},1285:(t,e,r)=>{var n=r(5050);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,r)=>{var n=r(5050);t.exports=function(t){return n(this,t).get(t)}},9916:(t,e,r)=>{var n=r(5050);t.exports=function(t){return n(this,t).has(t)}},5265:(t,e,r)=>{var n=r(5050);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}},4536:(t,e,r)=>{var n=r(852)(Object,"create");t.exports=n},3498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},1167:(t,e,r)=>{t=r.nmd(t);var n=r(1957),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,i=s&&s.exports===o&&n.process,a=function(){try{return s&&s.require&&s.require("util").types||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=a},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(r){return t(e(r))}}},5357:(t,e,r)=>{var n=r(6874),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,a=o(s.length-e,0),u=Array(a);++i<a;)u[i]=s[e+i];i=-1;for(var c=Array(e+1);++i<e;)c[i]=s[i];return c[e]=r(u),n(t,this,c)}}},5639:(t,e,r)=>{var n=r(1957),o="object"==typeof self&&self&&self.Object===Object&&self,s=n||o||Function("return this")();t.exports=s},6390:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},61:(t,e,r)=>{var n=r(6560),o=r(1275)(n);t.exports=o},1275:t=>{var e=Date.now;t.exports=function(t){var r=0,n=0;return function(){var o=e(),s=16-(o-n);if(n=o,s>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},7465:(t,e,r)=>{var n=r(8407);t.exports=function(){this.__data__=new n,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,r)=>{var n=r(8407),o=r(7071),s=r(3369);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}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},5703:t=>{t.exports=function(t){return function(){return t}}},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,r)=>{var n=r(9454),o=r(7005),s=Object.prototype,i=s.hasOwnProperty,a=s.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return o(t)&&i.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,r)=>{var n=r(3560),o=r(1780);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},9246:(t,e,r)=>{var n=r(8612),o=r(7005);t.exports=function(t){return o(t)&&n(t)}},4144:(t,e,r)=>{t=r.nmd(t);var n=r(5639),o=r(5062),s=e&&!e.nodeType&&e,i=s&&t&&!t.nodeType&&t,a=i&&i.exports===s?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||o;t.exports=u},3560:(t,e,r)=>{var n=r(4239),o=r(3218);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}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},8630:(t,e,r)=>{var n=r(4239),o=r(5924),s=r(7005),i=Function.prototype,a=Object.prototype,u=i.toString,c=a.hasOwnProperty,h=u.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&&u.call(r)==h}},6719:(t,e,r)=>{var n=r(8749),o=r(1717),s=r(1167),i=s&&s.isTypedArray,a=i?o(i):n;t.exports=a},1704:(t,e,r)=>{var n=r(4636),o=r(313),s=r(8612);t.exports=function(t){return s(t)?n(t,!0):o(t)}},2492:(t,e,r)=>{var n=r(2980),o=r(1463)((function(t,e,r){n(t,e,r)}));t.exports=o},5062:t=>{t.exports=function(){return!1}},9881:(t,e,r)=>{var n=r(8363),o=r(1704);t.exports=function(t){return n(t,o(t))}},2130:(t,e,r)=>{"use strict";const n=r(2037),o=r(8512),s=process.env;let i;function a(t){const e=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);return function(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(e)}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:a,stdout:a(process.stdout),stderr:a(process.stderr)}},9491:t=>{"use strict";t.exports=require("assert")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},2781:t=>{"use strict";t.exports=require("stream")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},9796:t=>{"use strict";t.exports=require("zlib")}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var s=e[n]={id:n,loaded:!1,exports:{}};return t[n](s,s.exports,r),s.loaded=!0,s.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};(()=>{"use strict";r.r(n),r.d(n,{default:()=>Q});var t=r(2492),e=r.n(t),o=r(9669),s=r.n(o);const i={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,s=n&&n.error&&n.error.message;try{const n=r>=400&&r<500;if(n||this.handleLogAndNotifyError(t),s&&"Login Required"===s)return this.handleLoginRequired(),Promise.reject(t);const i=n&&1004===o&&401===r;if(401===r&&!i)return Promise.reject(t);if(400===r&&1010===o)return this.handleLoginRequired(),Promise.reject(t);if(i)return this.Auth.requestNewTokens().then((t=>{if(t&&t.headers&&t.headers[this.authTokenKey]){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 u(t){return{getAll:function(e){const r=`/rooms/${e}/${t}`;return this.get(r)},get:function(e,r){const n=`/rooms/${e}/${t}/${r}`;return this.get(n)},update:function(e,r,n){const o=`/rooms/${e}/${t}/${r}`;return this.put(o,n)},add:function(e,r){const n=`/rooms/${e}/${t}`;return this.post(n,r)},delete:function(e,r){const n=`/rooms/${e}/${t}/${r}`;return this.delete(n)}}}function c(t){return{getAll:function(e,r){const n=`/groups/${e}/rooms/${r}/${t}`;return this.get(n)},get:function(e,r,n){const o=`/groups/${e}/rooms/${r}/${t}/${n}`;return this.get(o)},update:function(e,r,n,o){const s=`/groups/${e}/rooms/${r}/${t}/${n}`;return this.put(s,o)},add:function(e,r,n){const o=`/groups/${e}/rooms/${r}/${t}`;return this.post(o,n)},delete:function(e,r,n){const o=`/groups/${e}/rooms/${r}/${t}/${n}`;return this.delete(o)}}}const h=a("/admins");function p(t){if(t&&t.headers){const e=t.headers[this.authTokenKey],r=t.headers[this.refreshTokenKey];e&&this.setAuthToken(e),r&&this.setRefreshToken(r)}}const f={requestNewTokens:async function(){const t=p.bind(this);return this.getRefreshToken()?this.post("/auth/token",{},{headers:{[this.refreshTokenKey]:this.getRefreshToken()}}).then((e=>(t(e),e))):this.handleLoginRequired()},loginUser:function(t,e){const r=p.bind(this);return this.post("/auth/user",{email:t.toLowerCase(),password:e}).then((t=>{r(t);const e=t&&t.data&&t.data[0];return e&&this.setCurrentUser(e),t}))},loginGuest:function(t,e,r){const n=p.bind(this);return this.post("/auth/guest",{lastName:t,roomNumber:e,phone:r}).then((t=>{n(t);const e=t&&t.data&&t.data[0];return e&&this.setCurrentUser(e),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){const r=p.bind(this);return this.post("/auth/controller",{authKey:t,controllerId:e}).then((t=>t.status>=400&&t.status<=500?(body.error=t.data.error,body):(r(t),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)},setTokensFromResponse:p},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)};const l=d,g=a("/controllers"),m={post:function(t){return this.post("/commands",t)}},y=a("/groups");y.Room={getAll:function(t){const e=`/groups/${t}/rooms`;return this.get(e)},get:function(t,e){const r=`/groups/${t}/rooms/${e}`;return this.get(r)},update:function(t,e,r){const n=`/groups/${t}/rooms/${e}`;return this.put(n,r)},add:function(t,e){const r=`/groups/${t}/rooms`;return this.post(r,e)},delete:function(t,e){const r=`/groups/${t}/rooms/${e}`;return this.delete(r)}},y.Room.Light=c("lights"),y.Room.Shade=c("shades"),y.Room.Thermostat=c("thermostats"),y.Room.Privacy=c("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:c("security/locks"),Cameras:c("security/cameras"),Alarms:c("security/alarms")},y.Integrations={getAll:function(t){const e=`/groups/${t}/integrations`;return this.get(e)},add:function(t,e){const r=`/groups/${t}/integrations`;return this.post(r,e)},delete:function(t,e){const r=`/groups/${t}/integrations/${e}`;return this.delete(r)}};const v=y,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)};const _=b,x=a("/hotel-rooms");x.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)}},x.Guest={getAll:function(t){const e=`/hotel-rooms/${t}/guests`;return this.get(e)}},x.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)}},x.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)}},x.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)}};const C=x;let w="/integrations";const R={getAll:function(){return this.get(w)},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(w,t)}};R.Types={getAll:function(){return this.get("/integrations/types")}},R.RoomMap={add:function(t,e){return this.post(`/integrations/${t}/roomMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/roomMap`,e)}},R.Metadata={update:function(t,e){const r=`/integrations/${t}/metadata`;return this.post(r,e)}},R.DeviceMap={add:function(t,e){return this.post(`/integrations/${t}/deviceMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/deviceMap`,e)}};const T=R,$=a("structure/images");$.uploadImage=async function(t,e){return await this.uploadFile("/structure/images/upload",t,e)};const O=$,k=u("lights"),E=u("privacy"),A=u("security/locks"),j=a("/managers"),S={get:function(){return this.get("/manifest.json")}},M=S,F=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)}}};F.getGenres=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/genres`;return this.http.get(r,{})},F.getStations=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/stations`;return this.http.get(r,{})};const P=F,L=a("/notifications");L.Response=function(t){return this.http.post("/notifications/response",{params:t})},L.Send=function(t,e){const r=`/notifications/${t}`;return this.http.post(r,{params:e})};const I=L,N=a("/reports");N.getEnergyStats=function(t){return this.http.get("/reports/room/stats",{params:t})},N.getTicketStats=function(t){return this.http.get("/reports/ticket/stats",{params:t})};const B=N,U=a("/rooms");U.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)}},U.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)}},U.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)}}};const q=U,z={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)}},D=u("shades"),H=a("sources");H.updatePlayer=function(t){return this.post(`sources/${t}/player`,{})},H.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)}}};const G=H,K={getRoomList:function(){return this.http.get("/structure/roomList",{})},getSummary:function(){return this.http.get("/structure/summary",{})},getDeviceCount:function(){return this.http.get("/structure/deviceCount",{})}},J=K,V={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}`,{})}},W=u("thermostats"),X=a("/users");function Y(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}X.update=function(t,e){const r=`/users/${t}`,n=Y.bind(this);return this.put(r,e).then((e=>n(t,e)))},X.get=function(t){const e=`/users/${t}`,r=Y.bind(this);return this.get(e).then((e=>r(t,e)))},X.changeAvatar=function(t){return this.http.post("/users/change-avatar",t)},X.checkout=function(){return this.http.post("/users/checkout")},X.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)))},X.invite=function(t){const e=`/users/${t}/invite`;return this.post(e)};const Z=X,Q=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=i.handleHTTPError.bind(this),this.handleHTTPResponseSuccess=i.handleHTTPResponse.bind(this),this.handleHTTPRequestConfig=i.handleGenerateConfig.bind(this),this.Admin=this.bindMethods(h),this.Auth=this.bindMethods(f),this.Guest=this.bindMethods(_),this.User=this.bindMethods(Z),this.Group=this.bindMethods(v),this.Group.Integrations=this.bindMethods(v.Integrations),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(q),this.Room.Light=this.bindMethods(k),this.Room.Shade=this.bindMethods(D),this.Room.Thermostat=this.bindMethods(W),this.Room.Lock=this.bindMethods(A),this.Room.Privacy=this.bindMethods(E),this.Room.Scenes=this.bindMethods(q.Scenes),this.Room.Media=this.bindMethods(q.Media),this.Room.Security=this.bindMethods(q.Security),this.Room.Security.Locks=this.bindMethods(q.Security.Locks),this.Room.Security.Cameras=this.bindMethods(q.Security.Cameras),this.Settings=this.bindMethods(z),this.Subscriptions=this.bindMethods(V),this.Reports=this.bindMethods(B),this.Controllers=this.bindMethods(g),this.Integrations=this.bindMethods(T),this.Integrations.Types=this.bindMethods(T.Types),this.Integrations.RoomMap=this.bindMethods(T.RoomMap),this.Integrations.Metadata=this.bindMethods(T.Metadata),this.Integrations.DeviceMap=this.bindMethods(T.DeviceMap),this.Concierge=this.bindMethods(l),this.Commands=this.bindMethods(m),this.Image=this.bindMethods(O),this.Source=this.bindMethods(G),this.Source.browse=this.bindMethods(G.browse),this.Source.browse.genres=this.bindMethods(G.browse.genres),this.Source.browse.stations=this.bindMethods(G.browse.stations),this.Structure=this.bindMethods(J),this.Structure.Images=this.bindMethods(O),this.Media=this.bindMethods(P),this.Manifest=this.bindMethods(M),this.Manager=this.bindMethods(j),this.Notifications=this.bindMethods(I),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=e()(this.config,t),this.createHTTPClient()}createHTTPClient(){this.http=s().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}`}})}}})(),module.exports=n})();
|
|
1
|
+
(()=>{var t={9669:(t,e,r)=>{t.exports=r(1609)},7970:(t,e,r)=>{"use strict";var n=r(4867),o=r(6026),s=r(4097),i=r(5327),a=r(3685),u=r(5687),c=r(938).http,h=r(938).https,p=r(7310),f=r(9796),d=r(7288).version,l=r(5061),g=r(481),m=r(5655),y=r(5263),v=/https:?/;function b(t,e,r){if(t.hostname=e.host,t.host=e.host,t.port=e.port,t.path=r,e.auth){var n=Buffer.from(e.auth.username+":"+e.auth.password,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+n}t.beforeRedirect=function(t){t.headers.host=t.host,b(t,e,t.href)}}t.exports=function(t){return new Promise((function(e,r){var _;function x(){t.cancelToken&&t.cancelToken.unsubscribe(_),t.signal&&t.signal.removeEventListener("abort",_)}var C=function(t){x(),e(t)},w=function(t){x(),r(t)},R=t.data,T=t.headers,$={};if(Object.keys(T).forEach((function(t){$[t.toLowerCase()]=t})),"user-agent"in $?T[$["user-agent"]]||delete T[$["user-agent"]]:T["User-Agent"]="axios/"+d,R&&!n.isStream(R)){if(Buffer.isBuffer(R));else if(n.isArrayBuffer(R))R=Buffer.from(new Uint8Array(R));else{if(!n.isString(R))return w(l("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",t));R=Buffer.from(R,"utf-8")}$["content-length"]||(T["Content-Length"]=R.length)}var O=void 0;t.auth&&(O=(t.auth.username||"")+":"+(t.auth.password||""));var k=s(t.baseURL,t.url),E=p.parse(k),A=E.protocol||"http:";if(!O&&E.auth){var S=E.auth.split(":");O=(S[0]||"")+":"+(S[1]||"")}O&&$.authorization&&delete T[$.authorization];var j=v.test(A),M=j?t.httpsAgent:t.httpAgent,F={path:i(E.path,t.params,t.paramsSerializer).replace(/^\?/,""),method:t.method.toUpperCase(),headers:T,agent:M,agents:{http:t.httpAgent,https:t.httpsAgent},auth:O};t.socketPath?F.socketPath=t.socketPath:(F.hostname=E.hostname,F.port=E.port);var P,L=t.proxy;if(!L&&!1!==L){var I=A.slice(0,-1)+"_proxy",N=process.env[I]||process.env[I.toUpperCase()];if(N){var B=p.parse(N),U=process.env.no_proxy||process.env.NO_PROXY,q=!0;if(U&&(q=!U.split(",").map((function(t){return t.trim()})).some((function(t){return!!t&&("*"===t||"."===t[0]&&E.hostname.substr(E.hostname.length-t.length)===t||E.hostname===t)}))),q&&(L={host:B.hostname,port:B.port,protocol:B.protocol},B.auth)){var z=B.auth.split(":");L.auth={username:z[0],password:z[1]}}}}L&&(F.headers.host=E.hostname+(E.port?":"+E.port:""),b(F,L,A+"//"+E.hostname+(E.port?":"+E.port:"")+F.path));var D=j&&(!L||v.test(L.protocol));t.transport?P=t.transport:0===t.maxRedirects?P=D?u:a:(t.maxRedirects&&(F.maxRedirects=t.maxRedirects),P=D?h:c),t.maxBodyLength>-1&&(F.maxBodyLength=t.maxBodyLength),t.insecureHTTPParser&&(F.insecureHTTPParser=t.insecureHTTPParser);var H=P.request(F,(function(e){if(!H.aborted){var r=e,s=e.req||H;if(204!==e.statusCode&&"HEAD"!==s.method&&!1!==t.decompress)switch(e.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(f.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(C,w,i);else{var a=[],u=0;r.on("data",(function(e){a.push(e),u+=e.length,t.maxContentLength>-1&&u>t.maxContentLength&&(r.destroy(),w(l("maxContentLength size of "+t.maxContentLength+" exceeded",t,null,s)))})),r.on("error",(function(e){H.aborted||w(g(e,t,null,s))})),r.on("end",(function(){var e=Buffer.concat(a);"arraybuffer"!==t.responseType&&(e=e.toString(t.responseEncoding),t.responseEncoding&&"utf8"!==t.responseEncoding||(e=n.stripBOM(e))),i.data=e,o(C,w,i)}))}}}));if(H.on("error",(function(e){H.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||w(g(e,t,null,H))})),t.timeout){var G=parseInt(t.timeout,10);if(isNaN(G))return void w(l("error trying to parse `config.timeout` to int",t,"ERR_PARSE_TIMEOUT",H));H.setTimeout(G,(function(){H.abort();var e=t.transitional||m.transitional;w(l("timeout of "+G+"ms exceeded",t,e.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",H))}))}(t.cancelToken||t.signal)&&(_=function(t){H.aborted||(H.abort(),w(!t||t&&t.type?new y("canceled"):t))},t.cancelToken&&t.cancelToken.subscribe(_),t.signal&&(t.signal.aborted?_():t.signal.addEventListener("abort",_))),n.isStream(R)?R.on("error",(function(e){w(g(e,t,null,H))})).pipe(H):H.end(R)}))}},5448:(t,e,r)=>{"use strict";var n=r(4867),o=r(6026),s=r(4372),i=r(5327),a=r(4097),u=r(4109),c=r(7985),h=r(5061),p=r(5655),f=r(5263);t.exports=function(t){return new Promise((function(e,r){var d,l=t.data,g=t.headers,m=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(d),t.signal&&t.signal.removeEventListener("abort",d)}n.isFormData(l)&&delete g["Content-Type"];var v=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",_=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+_)}var x=a(t.baseURL,t.url);function C(){if(v){var n="getAllResponseHeaders"in v?u(v.getAllResponseHeaders()):null,s={data:m&&"text"!==m&&"json"!==m?v.response:v.responseText,status:v.status,statusText:v.statusText,headers:n,config:t,request:v};o((function(t){e(t),y()}),(function(t){r(t),y()}),s),v=null}}if(v.open(t.method.toUpperCase(),i(x,t.params,t.paramsSerializer),!0),v.timeout=t.timeout,"onloadend"in v?v.onloadend=C:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(C)},v.onabort=function(){v&&(r(h("Request aborted",t,"ECONNABORTED",v)),v=null)},v.onerror=function(){r(h("Network Error",t,null,v)),v=null},v.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",n=t.transitional||p.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(h(e,t,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},n.isStandardBrowserEnv()){var w=(t.withCredentials||c(x))&&t.xsrfCookieName?s.read(t.xsrfCookieName):void 0;w&&(g[t.xsrfHeaderName]=w)}"setRequestHeader"in v&&n.forEach(g,(function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete g[e]:v.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(v.withCredentials=!!t.withCredentials),m&&"json"!==m&&(v.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&v.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&v.upload&&v.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(d=function(t){v&&(r(!t||t&&t.type?new f("canceled"):t),v.abort(),v=null)},t.cancelToken&&t.cancelToken.subscribe(d),t.signal&&(t.signal.aborted?d():t.signal.addEventListener("abort",d))),l||(l=null),v.send(l)}))}},1609:(t,e,r)=>{"use strict";var n=r(4867),o=r(1849),s=r(321),i=r(7185),a=function t(e){var r=new s(e),a=o(s.prototype.request,r);return n.extend(a,s.prototype,r),n.extend(a,r),a.create=function(r){return t(i(e,r))},a}(r(5655));a.Axios=s,a.Cancel=r(5263),a.CancelToken=r(4972),a.isCancel=r(6502),a.VERSION=r(7288).version,a.all=function(t){return Promise.all(t)},a.spread=r(8713),a.isAxiosError=r(6268),t.exports=a,t.exports.default=a},5263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},4972:(t,e,r)=>{"use strict";var n=r(5263);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;this.promise.then((function(t){if(r._listeners){var e,n=r._listeners.length;for(e=0;e<n;e++)r._listeners[e](t);r._listeners=null}})),this.promise.then=function(t){var e,n=new Promise((function(t){r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},o.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},6502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,r)=>{"use strict";var n=r(4867),o=r(5327),s=r(782),i=r(3572),a=r(7185),u=r(4875),c=u.validators;function h(t){this.defaults=t,this.interceptors={request:new s,response:new s}}h.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&u.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(n=n&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,s=[];if(this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)})),!n){var h=[i,void 0];for(Array.prototype.unshift.apply(h,r),h=h.concat(s),o=Promise.resolve(t);h.length;)o=o.then(h.shift(),h.shift());return o}for(var p=t;r.length;){var f=r.shift(),d=r.shift();try{p=f(p)}catch(t){d(t);break}}try{o=i(p)}catch(t){return Promise.reject(t)}for(;s.length;)o=o.then(s.shift(),s.shift());return o},h.prototype.getUri=function(t){return t=a(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){h.prototype[t]=function(e,r){return this.request(a(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){h.prototype[t]=function(e,r,n){return this.request(a(n||{},{method:t,url:e,data:r}))}})),t.exports=h},782:(t,e,r)=>{"use strict";var n=r(4867);function o(){this.handlers=[]}o.prototype.use=function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),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},4097:(t,e,r)=>{"use strict";var n=r(1793),o=r(7303);t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},5061:(t,e,r)=>{"use strict";var n=r(481);t.exports=function(t,e,r,o,s){var i=new Error(t);return n(i,e,r,o,s)}},3572:(t,e,r)=>{"use strict";var n=r(4867),o=r(8527),s=r(6502),i=r(5655),a=r(5263);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new a("canceled")}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=o.call(t,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.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(u(t),e&&e.response&&(e.response.data=o.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"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,status:this.response&&this.response.status?this.response.status:null}},t}},7185:(t,e,r)=>{"use strict";var n=r(4867);t.exports=function(t,e){e=e||{};var r={};function o(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 s(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(t[r],e[r])}function i(t){if(!n.isUndefined(e[t]))return o(void 0,e[t])}function a(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(void 0,e[r])}function u(r){return r in e?o(t[r],e[r]):r in t?o(void 0,t[r]):void 0}var c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return n.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||s,o=e(t);n.isUndefined(o)&&e!==u||(r[t]=o)})),r}},6026:(t,e,r)=>{"use strict";var n=r(5061);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)}},8527:(t,e,r)=>{"use strict";var n=r(4867),o=r(5655);t.exports=function(t,e,r){var s=this||o;return n.forEach(r,(function(r){t=r.call(s,t,e)})),t}},5655:(t,e,r)=>{"use strict";var n=r(4867),o=r(6016),s=r(481),i={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?u=r(5448):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(u=r(7970)),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)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)||e&&"application/json"===e["Content-Type"]?(a(e,"application/json"),function(t,e,r){if(n.isString(t))try{return(0,JSON.parse)(t),n.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||c.transitional,r=e&&e.silentJSONParsing,o=e&&e.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||o&&n.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(i){if("SyntaxError"===t.name)throw s(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){c.headers[t]=n.merge(i)})),t.exports=c},7288:t=>{t.exports={version:"0.24.0"}},1849:t=>{"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)}}},5327:(t,e,r)=>{"use strict";var n=r(4867);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 a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,r)=>{"use strict";var n=r(4867);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,o,s,i){var a=[];a.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(s)&&a.push("domain="+s),!0===i&&a.push("secure"),document.cookie=a.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(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},6268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},7985:(t,e,r)=>{"use strict";var n=r(4867);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}},6016:(t,e,r)=>{"use strict";var n=r(4867);t.exports=function(t,e){n.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))}},4109:(t,e,r)=>{"use strict";var n=r(4867),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}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4875:(t,e,r)=>{"use strict";var n=r(7288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){o[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var s={};o.transitional=function(t,e,r){function o(t,e){return"[Axios v"+n+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,n,i){if(!1===t)throw new Error(o(n," has been removed"+(e?" in "+e:"")));return e&&!s[n]&&(s[n]=!0,console.warn(o(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,i)}},t.exports={assertOptions:function(t,e,r){if("object"!=typeof t)throw new TypeError("options must be an object");for(var n=Object.keys(t),o=n.length;o-- >0;){var s=n[o],i=e[s];if(i){var a=t[s],u=void 0===a||i(a,s,t);if(!0!==u)throw new TypeError("option "+s+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+s)}},validators:o}},4867:(t,e,r)=>{"use strict";var n=r(1849),o=Object.prototype.toString;function s(t){return"[object Array]"===o.call(t)}function i(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function u(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:a,isPlainObject:u,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 a(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){u(e[n])&&u(r)?e[n]=t(e[n],r):u(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.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},9435:t=>{var e=1e3,r=60*e,n=60*r,o=24*n;function s(t,e,r,n){var o=e>=1.5*r;return Math.round(t/r)+" "+n+(o?"s":"")}t.exports=function(t,i){i=i||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var s=/^(-?(?:\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(s){var i=parseFloat(s[1]);switch((s[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*o;case"hours":case"hour":case"hrs":case"hr":case"h":return i*n;case"minutes":case"minute":case"mins":case"min":case"m":return i*r;case"seconds":case"second":case"secs":case"sec":case"s":return i*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(t);if("number"===c&&isFinite(t))return i.long?(a=t,(u=Math.abs(a))>=o?s(a,u,o,"day"):u>=n?s(a,u,n,"hour"):u>=r?s(a,u,r,"minute"):u>=e?s(a,u,e,"second"):a+" ms"):function(t){var s=Math.abs(t);return s>=o?Math.round(t/o)+"d":s>=n?Math.round(t/n)+"h":s>=r?Math.round(t/r)+"m":s>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1227:(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){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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(2447)(e);const{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},2447:(t,e,r)=>{t.exports=function(t){function e(t){let r,o,s,i=null;function a(...t){if(!a.enabled)return;const n=a,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let i=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";i++;const s=e.formatters[o];if("function"==typeof s){const e=t[i];r=s.call(n,e),t.splice(i,1),i--}return r})),e.formatArgs.call(n,t),(n.log||e.log).apply(n,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=n,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(o!==e.namespaces&&(o=e.namespaces,s=e.enabled(t)),s),set:t=>{i=t}}),"function"==typeof e.init&&e.init(a),a}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){return t instanceof Error?t.stack||t.message: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.namespaces=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(9435),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}},5158:(t,e,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?t.exports=r(1227):t.exports=r(39)},39:(t,e,r)=>{const n=r(6224),o=r(3837);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]=(e.inspectOpts.hideDate?"":(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(2130);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(2447)(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)}},2261:(t,e,r)=>{var n;t.exports=function(){if(!n){try{n=r(5158)("follow-redirects")}catch(t){}"function"!=typeof n&&(n=function(){})}n.apply(null,arguments)}},938:(t,e,r)=>{var n=r(7310),o=n.URL,s=r(3685),i=r(5687),a=r(2781).Writable,u=r(9491),c=r(2261),h=["abort","aborted","connect","error","socket","timeout"],p=Object.create(null);h.forEach((function(t){p[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}}));var f=x("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),d=x("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),l=x("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),g=x("ERR_STREAM_WRITE_AFTER_END","write after end");function m(t,e){a.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 y(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach((function(s){var i=s+":",a=r[i]=t[s],h=e[s]=Object.create(a);Object.defineProperties(h,{request:{value:function(t,s,a){if("string"==typeof t){var h=t;try{t=b(new o(h))}catch(e){t=n.parse(h)}}else o&&t instanceof o?t=b(t):(a=s,s=t,t={protocol:i});return"function"==typeof s&&(a=s,s=null),(s=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},t,s)).nativeProtocols=r,u.equal(s.protocol,i,"protocol mismatch"),c("options",s),new m(s,a)},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 v(){}function b(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 null==r?void 0:String(r).trim()}function x(t,e){function r(t){Error.captureStackTrace(this,this.constructor),t?(this.message=e+": "+t.message,this.cause=t):this.message=e}return r.prototype=new Error,r.prototype.constructor=r,r.prototype.name="Error ["+t+"]",r.prototype.code=t,r}function C(t){for(var e=0;e<h.length;e++)t.removeListener(h[e],p[h[e]]);t.on("error",v),t.abort()}m.prototype=Object.create(a.prototype),m.prototype.abort=function(){C(this._currentRequest),this.emit("abort")},m.prototype.write=function(t,e,r){if(this._ending)throw new g;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 l),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){var r=this;function n(e){e.setTimeout(t),e.removeListener("timeout",e.destroy),e.addListener("timeout",e.destroy)}function o(e){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),s()}),t),n(e)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",o)}return e&&this.on("timeout",e),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this},["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);this._currentUrl=n.format(this._options),o._redirectable=this;for(var s=0;s<h.length;s++)o.on(h[s],p[h[s]]);if(this._isRedirect){var i=0,a=this,u=this._requestBodyBuffers;!function t(e){if(o===a._currentRequest)if(e)a.emit("error",e);else if(i<u.length){var r=u[i++];o.finished||o.write(r.data,r.encoding,t)}else a._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(C(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new d);((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,s=_(/^host$/i,this._options.headers),i=n.parse(this._currentUrl),a=s||i.host,u=/^\w+:/.test(r)?this._currentUrl:n.format(Object.assign(i,{host:a}));try{o=n.resolve(u,r)}catch(t){return void this.emit("error",new f(t))}c("redirecting to",o),this._isRedirect=!0;var h=n.parse(o);if(Object.assign(this._options,h),h.host===a||function(t,e){const r=t.length-e.length-1;return r>0&&"."===t[r]&&t.endsWith(e)}(h.host,a)||_(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var p={headers:t.headers};try{this._options.beforeRedirect.call(null,this._options,p)}catch(t){return void this.emit("error",t)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(t){this.emit("error",new f(t))}}else t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[]},t.exports=y({http:s,https:i}),t.exports.wrap=y},8512:t=>{"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)}},1989:(t,e,r)=>{var n=r(1789),o=r(401),s=r(7667),i=r(1327),a=r(1866);function u(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])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=i,u.prototype.set=a,t.exports=u},8407:(t,e,r)=>{var n=r(7040),o=r(4125),s=r(2117),i=r(7518),a=r(4705);function u(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])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=i,u.prototype.set=a,t.exports=u},7071:(t,e,r)=>{var n=r(852)(r(5639),"Map");t.exports=n},3369:(t,e,r)=>{var n=r(4785),o=r(1285),s=r(6e3),i=r(9916),a=r(5265);function u(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])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=i,u.prototype.set=a,t.exports=u},6384:(t,e,r)=>{var n=r(8407),o=r(7465),s=r(3779),i=r(7599),a=r(4758),u=r(4309);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=a,c.prototype.set=u,t.exports=c},2705:(t,e,r)=>{var n=r(5639).Symbol;t.exports=n},1149:(t,e,r)=>{var n=r(5639).Uint8Array;t.exports=n},6874:t=>{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)}},4636:(t,e,r)=>{var n=r(2545),o=r(5694),s=r(1469),i=r(4144),a=r(5776),u=r(6719),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=s(t),h=!r&&o(t),p=!r&&!h&&i(t),f=!r&&!h&&!p&&u(t),d=r||h||p||f,l=d?n(t.length,String):[],g=l.length;for(var m in t)!e&&!c.call(t,m)||d&&("length"==m||p&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||l.push(m);return l}},6556:(t,e,r)=>{var n=r(9465),o=r(7813);t.exports=function(t,e,r){(void 0!==r&&!o(t[e],r)||void 0===r&&!(e in t))&&n(t,e,r)}},4865:(t,e,r)=>{var n=r(9465),o=r(7813),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)}},8470:(t,e,r)=>{var n=r(7813);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},9465:(t,e,r)=>{var n=r(8777);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},3118:(t,e,r)=>{var n=r(3218),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},8483:(t,e,r)=>{var n=r(5063)();t.exports=n},4239:(t,e,r)=>{var n=r(2705),o=r(9607),s=r(2333),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)}},9454:(t,e,r)=>{var n=r(4239),o=r(7005);t.exports=function(t){return o(t)&&"[object Arguments]"==n(t)}},8458:(t,e,r)=>{var n=r(3560),o=r(5346),s=r(3218),i=r(346),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,h=u.toString,p=c.hasOwnProperty,f=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||o(t))&&(n(t)?f:a).test(i(t))}},8749:(t,e,r)=>{var n=r(4239),o=r(1780),s=r(7005),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)]}},313:(t,e,r)=>{var n=r(3218),o=r(5726),s=r(3498),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return s(t);var e=o(t),r=[];for(var a in t)("constructor"!=a||!e&&i.call(t,a))&&r.push(a);return r}},2980:(t,e,r)=>{var n=r(6384),o=r(6556),s=r(8483),i=r(9783),a=r(3218),u=r(1704),c=r(6390);t.exports=function t(e,r,h,p,f){e!==r&&s(r,(function(s,u){if(f||(f=new n),a(s))i(e,r,u,h,t,p,f);else{var d=p?p(c(e,u),s,u+"",e,r,f):void 0;void 0===d&&(d=s),o(e,u,d)}}),u)}},9783:(t,e,r)=>{var n=r(6556),o=r(4626),s=r(7133),i=r(278),a=r(8517),u=r(5694),c=r(1469),h=r(9246),p=r(4144),f=r(3560),d=r(3218),l=r(8630),g=r(6719),m=r(6390),y=r(9881);t.exports=function(t,e,r,v,b,_,x){var C=m(t,r),w=m(e,r),R=x.get(w);if(R)n(t,r,R);else{var T=_?_(C,w,r+"",t,e,x):void 0,$=void 0===T;if($){var O=c(w),k=!O&&p(w),E=!O&&!k&&g(w);T=w,O||k||E?c(C)?T=C:h(C)?T=i(C):k?($=!1,T=o(w,!0)):E?($=!1,T=s(w,!0)):T=[]:l(w)||u(w)?(T=C,u(C)?T=y(C):d(C)&&!f(C)||(T=a(w))):$=!1}$&&(x.set(w,T),b(T,w,v,_,x),x.delete(w)),n(t,r,T)}}},5976:(t,e,r)=>{var n=r(6557),o=r(5357),s=r(61);t.exports=function(t,e){return s(o(t,e,n),t+"")}},6560:(t,e,r)=>{var n=r(5703),o=r(8777),s=r(6557),i=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:s;t.exports=i},2545:t=>{t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},1717:t=>{t.exports=function(t){return function(e){return t(e)}}},4318:(t,e,r)=>{var n=r(1149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},4626:(t,e,r)=>{t=r.nmd(t);var n=r(5639),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,i=s&&s.exports===o?n.Buffer:void 0,a=i?i.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}},7133:(t,e,r)=>{var n=r(4318);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},278:t=>{t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},8363:(t,e,r)=>{var n=r(4865),o=r(9465);t.exports=function(t,e,r,s){var i=!r;r||(r={});for(var a=-1,u=e.length;++a<u;){var c=e[a],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}},4429:(t,e,r)=>{var n=r(5639)["__core-js_shared__"];t.exports=n},1463:(t,e,r)=>{var n=r(5976),o=r(6612);t.exports=function(t){return n((function(e,r){var n=-1,s=r.length,i=s>1?r[s-1]:void 0,a=s>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(s--,i):void 0,a&&o(r[0],r[1],a)&&(i=s<3?void 0:i,s=1),e=Object(e);++n<s;){var u=r[n];u&&t(e,u,n,i)}return e}))}},5063:t=>{t.exports=function(t){return function(e,r,n){for(var o=-1,s=Object(e),i=n(e),a=i.length;a--;){var u=i[t?a:++o];if(!1===r(s[u],u,s))break}return e}}},8777:(t,e,r)=>{var n=r(852),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},1957:t=>{var e="object"==typeof global&&global&&global.Object===Object&&global;t.exports=e},5050:(t,e,r)=>{var n=r(7019);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},852:(t,e,r)=>{var n=r(8458),o=r(7801);t.exports=function(t,e){var r=o(t,e);return n(r)?r:void 0}},5924:(t,e,r)=>{var n=r(5569)(Object.getPrototypeOf,Object);t.exports=n},9607:(t,e,r)=>{var n=r(2705),o=Object.prototype,s=o.hasOwnProperty,i=o.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=s.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(t){}var o=i.call(t);return n&&(e?t[a]=r:delete t[a]),o}},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},1789:(t,e,r)=>{var n=r(4536);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,r)=>{var n=r(4536),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}},1327:(t,e,r)=>{var n=r(4536),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:o.call(e,t)}},1866:(t,e,r)=>{var n=r(4536);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}},8517:(t,e,r)=>{var n=r(3118),o=r(5924),s=r(5726);t.exports=function(t){return"function"!=typeof t.constructor||s(t)?{}:n(o(t))}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r}},6612:(t,e,r)=>{var n=r(7813),o=r(8612),s=r(5776),i=r(3218);t.exports=function(t,e,r){if(!i(r))return!1;var a=typeof e;return!!("number"==a?o(r)&&s(e,r.length):"string"==a&&e in r)&&n(r[e],t)}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,r)=>{var n,o=r(4429),s=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!s&&s in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||e)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,r)=>{var n=r(8470),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))}},2117:(t,e,r)=>{var n=r(8470);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},7518:(t,e,r)=>{var n=r(8470);t.exports=function(t){return n(this.__data__,t)>-1}},4705:(t,e,r)=>{var n=r(8470);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}},4785:(t,e,r)=>{var n=r(1989),o=r(8407),s=r(7071);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||o),string:new n}}},1285:(t,e,r)=>{var n=r(5050);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,r)=>{var n=r(5050);t.exports=function(t){return n(this,t).get(t)}},9916:(t,e,r)=>{var n=r(5050);t.exports=function(t){return n(this,t).has(t)}},5265:(t,e,r)=>{var n=r(5050);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}},4536:(t,e,r)=>{var n=r(852)(Object,"create");t.exports=n},3498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},1167:(t,e,r)=>{t=r.nmd(t);var n=r(1957),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,i=s&&s.exports===o&&n.process,a=function(){try{return s&&s.require&&s.require("util").types||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=a},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(r){return t(e(r))}}},5357:(t,e,r)=>{var n=r(6874),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,a=o(s.length-e,0),u=Array(a);++i<a;)u[i]=s[e+i];i=-1;for(var c=Array(e+1);++i<e;)c[i]=s[i];return c[e]=r(u),n(t,this,c)}}},5639:(t,e,r)=>{var n=r(1957),o="object"==typeof self&&self&&self.Object===Object&&self,s=n||o||Function("return this")();t.exports=s},6390:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},61:(t,e,r)=>{var n=r(6560),o=r(1275)(n);t.exports=o},1275:t=>{var e=Date.now;t.exports=function(t){var r=0,n=0;return function(){var o=e(),s=16-(o-n);if(n=o,s>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},7465:(t,e,r)=>{var n=r(8407);t.exports=function(){this.__data__=new n,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,r)=>{var n=r(8407),o=r(7071),s=r(3369);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}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},5703:t=>{t.exports=function(t){return function(){return t}}},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,r)=>{var n=r(9454),o=r(7005),s=Object.prototype,i=s.hasOwnProperty,a=s.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return o(t)&&i.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,r)=>{var n=r(3560),o=r(1780);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},9246:(t,e,r)=>{var n=r(8612),o=r(7005);t.exports=function(t){return o(t)&&n(t)}},4144:(t,e,r)=>{t=r.nmd(t);var n=r(5639),o=r(5062),s=e&&!e.nodeType&&e,i=s&&t&&!t.nodeType&&t,a=i&&i.exports===s?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||o;t.exports=u},3560:(t,e,r)=>{var n=r(4239),o=r(3218);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}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},8630:(t,e,r)=>{var n=r(4239),o=r(5924),s=r(7005),i=Function.prototype,a=Object.prototype,u=i.toString,c=a.hasOwnProperty,h=u.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&&u.call(r)==h}},6719:(t,e,r)=>{var n=r(8749),o=r(1717),s=r(1167),i=s&&s.isTypedArray,a=i?o(i):n;t.exports=a},1704:(t,e,r)=>{var n=r(4636),o=r(313),s=r(8612);t.exports=function(t){return s(t)?n(t,!0):o(t)}},2492:(t,e,r)=>{var n=r(2980),o=r(1463)((function(t,e,r){n(t,e,r)}));t.exports=o},5062:t=>{t.exports=function(){return!1}},9881:(t,e,r)=>{var n=r(8363),o=r(1704);t.exports=function(t){return n(t,o(t))}},2130:(t,e,r)=>{"use strict";const n=r(2037),o=r(8512),s=process.env;let i;function a(t){const e=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);return function(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(e)}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:a,stdout:a(process.stdout),stderr:a(process.stderr)}},9491:t=>{"use strict";t.exports=require("assert")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},2781:t=>{"use strict";t.exports=require("stream")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},9796:t=>{"use strict";t.exports=require("zlib")}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var s=e[n]={id:n,loaded:!1,exports:{}};return t[n](s,s.exports,r),s.loaded=!0,s.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};(()=>{"use strict";r.r(n),r.d(n,{default:()=>Q});var t=r(2492),e=r.n(t),o=r(9669),s=r.n(o);const i={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,s=n&&n.error&&n.error.message;try{const n=r>=400&&r<500;if(n||this.handleLogAndNotifyError(t),s&&"Login Required"===s)return this.handleLoginRequired(),Promise.reject(t);const i=n&&1004===o&&401===r;if(401===r&&!i)return Promise.reject(t);if(400===r&&1010===o)return this.handleLoginRequired(),Promise.reject(t);if(i)return this.Auth.requestNewTokens().then((t=>{if(t&&t.headers&&t.headers[this.authTokenKey]){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 u(t){return{getAll:function(e){const r=`/rooms/${e}/${t}`;return this.get(r)},get:function(e,r){const n=`/rooms/${e}/${t}/${r}`;return this.get(n)},update:function(e,r,n){const o=`/rooms/${e}/${t}/${r}`;return this.put(o,n)},add:function(e,r){const n=`/rooms/${e}/${t}`;return this.post(n,r)},delete:function(e,r){const n=`/rooms/${e}/${t}/${r}`;return this.delete(n)}}}function c(t){return{getAll:function(e,r){const n=`/groups/${e}/rooms/${r}/${t}`;return this.get(n)},get:function(e,r,n){const o=`/groups/${e}/rooms/${r}/${t}/${n}`;return this.get(o)},update:function(e,r,n,o){const s=`/groups/${e}/rooms/${r}/${t}/${n}`;return this.put(s,o)},add:function(e,r,n){const o=`/groups/${e}/rooms/${r}/${t}`;return this.post(o,n)},delete:function(e,r,n){const o=`/groups/${e}/rooms/${r}/${t}/${n}`;return this.delete(o)}}}const h=a("/admins");function p(t){if(t&&t.headers){const e=t.headers[this.authTokenKey],r=t.headers[this.refreshTokenKey];e&&this.setAuthToken(e),r&&this.setRefreshToken(r)}}const f={requestNewTokens:async function(){const t=p.bind(this);return this.getRefreshToken()?this.post("/auth/token",{},{headers:{[this.refreshTokenKey]:this.getRefreshToken()}}).then((e=>(t(e),e))):this.handleLoginRequired()},loginUser:function(t,e){const r=p.bind(this);return this.post("/auth/user",{email:t.toLowerCase(),password:e}).then((t=>{r(t);const e=t&&t.data&&t.data[0];return e&&this.setCurrentUser(e),t}))},loginGuest:function(t,e,r){const n=p.bind(this);return this.post("/auth/guest",{lastName:t,roomNumber:e,phone:r}).then((t=>{n(t);const e=t&&t.data&&t.data[0];return e&&this.setCurrentUser(e),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){const r=p.bind(this);return this.post("/auth/controller",{authKey:t,controllerId:e}).then((t=>t.status>=400&&t.status<=500?(body.error=t.data.error,body):(r(t),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)},setTokensFromResponse:p},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)};const l=d,g=a("/controllers"),m={post:function(t){return this.post("/commands",t)}},y=a("/groups");y.Room={getAll:function(t){const e=`/groups/${t}/rooms`;return this.get(e)},get:function(t,e){const r=`/groups/${t}/rooms/${e}`;return this.get(r)},update:function(t,e,r){const n=`/groups/${t}/rooms/${e}`;return this.put(n,r)},add:function(t,e){const r=`/groups/${t}/rooms`;return this.post(r,e)},delete:function(t,e){const r=`/groups/${t}/rooms/${e}`;return this.delete(r)}},y.Room.Light=c("lights"),y.Room.Shade=c("shades"),y.Room.Thermostat=c("thermostats"),y.Room.Privacy=c("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:c("security/locks"),Cameras:c("security/cameras"),Alarms:c("security/alarms")},y.Integrations={getAll:function(t){const e=`/groups/${t}/integrations`;return this.get(e)},add:function(t,e){const r=`/groups/${t}/integrations`;return this.post(r,e)},delete:function(t,e){const r=`/groups/${t}/integrations/${e}`;return this.delete(r)}};const v=y,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)};const _=b,x=a("/hotel-rooms");x.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)}},x.Guest={getAll:function(t){const e=`/hotel-rooms/${t}/guests`;return this.get(e)}},x.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)}},x.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)}},x.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)}};const C=x;let w="/integrations";const R={getAll:function(){return this.get(w)},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(w,t)}};R.Types={getAll:function(){return this.get("/integrations/types")}},R.RoomMap={add:function(t,e){return this.post(`/integrations/${t}/roomMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/roomMap`,e)}},R.Metadata={update:function(t,e){const r=`/integrations/${t}/metadata`;return this.post(r,e)}},R.DeviceMap={add:function(t,e){return this.post(`/integrations/${t}/deviceMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/deviceMap`,e)}};const T=R,$=a("structure/images");$.uploadImage=async function(t,e){return await this.uploadFile("/structure/images/upload",t,e)};const O=$,k=u("lights"),E=u("privacy"),A=u("security/locks"),S=a("/managers"),j={get:function(){return this.get("/manifest.json")}},M=j,F=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)}}};F.getGenres=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/genres`;return this.http.get(r,{})},F.getStations=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/stations`;return this.http.get(r,{})};const P=F,L=a("/notifications");L.Response=function(t){return this.http.post("/notifications/response",{params:t})},L.Send=function(t,e){const r=`/notifications/${t}`;return this.http.post(r,{params:e})};const I=L,N=a("/reports");N.getEnergyStats=function(t){return this.http.get("/reports/room/stats",{params:t})},N.getTicketStats=function(t){return this.http.get("/reports/ticket/stats",{params:t})};const B=N,U=a("/rooms");U.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)}},U.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)}},U.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)}}};const q=U,z={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)}},D=u("shades"),H=a("sources");H.updatePlayer=function(t){return this.post(`sources/${t}/player`,{})},H.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)}}};const G=H,K={getRoomList:function(){return this.http.get("/structure/roomList",{})},getSummary:function(){return this.http.get("/structure/summary",{})},getDeviceCount:function(){return this.http.get("/structure/deviceCount",{})}},J=K,V={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}`,{})}},W=u("thermostats"),X=a("/users");function Y(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}X.update=function(t,e){const r=`/users/${t}`,n=Y.bind(this);return this.put(r,e).then((e=>n(t,e)))},X.get=function(t){const e=`/users/${t}`,r=Y.bind(this);return this.get(e).then((e=>r(t,e)))},X.changeAvatar=function(t){return this.http.post("/users/change-avatar",t)},X.checkout=function(){return this.http.post("/users/checkout")},X.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)))},X.invite=function(t){const e=`/users/${t}/invite`;return this.post(e)};const Z=X,Q=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=i.handleHTTPError.bind(this),this.handleHTTPResponseSuccess=i.handleHTTPResponse.bind(this),this.handleHTTPRequestConfig=i.handleGenerateConfig.bind(this),this.Admin=this.bindMethods(h),this.Auth=this.bindMethods(f),this.Guest=this.bindMethods(_),this.User=this.bindMethods(Z),this.Group=this.bindMethods(v),this.Group.Integrations=this.bindMethods(v.Integrations),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.Group.Room.Security.Alarms=this.bindMethods(v.Room.Security.Alarms),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(q),this.Room.Light=this.bindMethods(k),this.Room.Shade=this.bindMethods(D),this.Room.Thermostat=this.bindMethods(W),this.Room.Lock=this.bindMethods(A),this.Room.Privacy=this.bindMethods(E),this.Room.Scenes=this.bindMethods(q.Scenes),this.Room.Media=this.bindMethods(q.Media),this.Room.Security=this.bindMethods(q.Security),this.Room.Security.Locks=this.bindMethods(q.Security.Locks),this.Room.Security.Cameras=this.bindMethods(q.Security.Cameras),this.Settings=this.bindMethods(z),this.Subscriptions=this.bindMethods(V),this.Reports=this.bindMethods(B),this.Controllers=this.bindMethods(g),this.Integrations=this.bindMethods(T),this.Integrations.Types=this.bindMethods(T.Types),this.Integrations.RoomMap=this.bindMethods(T.RoomMap),this.Integrations.Metadata=this.bindMethods(T.Metadata),this.Integrations.DeviceMap=this.bindMethods(T.DeviceMap),this.Concierge=this.bindMethods(l),this.Commands=this.bindMethods(m),this.Image=this.bindMethods(O),this.Source=this.bindMethods(G),this.Source.browse=this.bindMethods(G.browse),this.Source.browse.genres=this.bindMethods(G.browse.genres),this.Source.browse.stations=this.bindMethods(G.browse.stations),this.Structure=this.bindMethods(J),this.Structure.Images=this.bindMethods(O),this.Media=this.bindMethods(P),this.Manifest=this.bindMethods(M),this.Manager=this.bindMethods(S),this.Notifications=this.bindMethods(I),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=e()(this.config,t),this.createHTTPClient()}createHTTPClient(){this.http=s().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}`}})}}})(),module.exports=n})();
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -79,6 +79,9 @@ class KohostAPIClient {
|
|
|
79
79
|
this.Group.Room.Security.Cameras = this.bindMethods(
|
|
80
80
|
Group.Room.Security.Cameras
|
|
81
81
|
);
|
|
82
|
+
this.Group.Room.Security.Alarms = this.bindMethods(
|
|
83
|
+
Group.Room.Security.Alarms
|
|
84
|
+
);
|
|
82
85
|
this.HotelRoom = this.bindMethods(HotelRoom);
|
|
83
86
|
|
|
84
87
|
this.HotelRoom.Room = this.bindMethods(HotelRoom.Room);
|