@kohost/api-client 0.6.5-alpha.1 → 0.6.5-alpha.5
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/dist/bundle.node.js +1 -1
- package/package.json +8 -4
- package/bitbucket-pipelines.yml +0 -24
- package/src/client.js +0 -260
- package/src/interceptors.js +0 -71
- package/src/methods/Admin.js +0 -3
- package/src/methods/Auth.js +0 -149
- package/src/methods/Commands.js +0 -12
- package/src/methods/Concierge.js +0 -50
- package/src/methods/Controller.js +0 -3
- package/src/methods/Group.js +0 -49
- package/src/methods/Guest.js +0 -25
- package/src/methods/HotelRoom.js +0 -88
- package/src/methods/Image.js +0 -14
- package/src/methods/Integrations.js +0 -56
- package/src/methods/Light.js +0 -5
- package/src/methods/Lock.js +0 -5
- package/src/methods/Manager.js +0 -3
- package/src/methods/Manifest.js +0 -11
- package/src/methods/Media.js +0 -28
- package/src/methods/Notifications.js +0 -18
- package/src/methods/Privacy.js +0 -5
- package/src/methods/Reports.js +0 -18
- package/src/methods/Room.js +0 -102
- package/src/methods/Settings.js +0 -16
- package/src/methods/Shade.js +0 -5
- package/src/methods/Source.js +0 -45
- package/src/methods/Structure.js +0 -20
- package/src/methods/Subscriptions.js +0 -21
- package/src/methods/Thermostat.js +0 -5
- package/src/methods/User.js +0 -72
- package/src/utils/generate.js +0 -156
- package/webpack.config.js +0 -36
package/dist/bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(self,(function(){return(()=>{var t={9669:(t,e,r)=>{t.exports=r(1609)},5448:(t,e,r)=>{"use strict";var n=r(4867),o=r(6026),s=r(4372),i=r(5327),u=r(4097),a=r(4109),c=r(7985),h=r(5061),f=r(5655),p=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||"",x=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+x)}var $=u(t.baseURL,t.url);function w(){if(v){var n="getAllResponseHeaders"in v?a(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($,t.params,t.paramsSerializer),!0),v.timeout=t.timeout,"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(w)},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||f.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(h(e,t,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},n.isStandardBrowserEnv()){var T=(t.withCredentials||c($))&&t.xsrfCookieName?s.read(t.xsrfCookieName):void 0;T&&(g[t.xsrfHeaderName]=T)}"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 p("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),u=function t(e){var r=new s(e),u=o(s.prototype.request,r);return n.extend(u,s.prototype,r),n.extend(u,r),u.create=function(r){return t(i(e,r))},u}(r(5655));u.Axios=s,u.Cancel=r(5263),u.CancelToken=r(4972),u.isCancel=r(6502),u.VERSION=r(7288).version,u.all=function(t){return Promise.all(t)},u.spread=r(8713),u.isAxiosError=r(6268),t.exports=u,t.exports.default=u},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),u=r(7185),a=r(4875),c=a.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=u(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&&a.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 f=t;r.length;){var p=r.shift(),d=r.shift();try{f=p(f)}catch(t){d(t);break}}try{o=i(f)}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=u(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(u(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(u(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),u=r(5263);function a(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new u("canceled")}t.exports=function(t){return a(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 a(t),e.data=o.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(a(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 u(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(void 0,e[r])}function a(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:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:a};return n.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||s,o=e(t);n.isUndefined(o)&&e!==a||(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 u(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(a=r(5448)),a),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)?(u(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)||e&&"application/json"===e["Content-Type"]?(u(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 u=t.indexOf("#");-1!==u&&(t=t.slice(0,u)),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 u=[];u.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),n.isString(o)&&u.push("path="+o),n.isString(s)&&u.push("domain="+s),!0===i&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},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 u=t[s],a=void 0===u||i(u,s,t);if(!0!==a)throw new TypeError("option "+s+" must be "+a)}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 u(t){return null!==t&&"object"==typeof t}function a(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===o.call(t)}function h(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!i(t)&&null!==t.constructor&&!i(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:u,isPlainObject:a,isUndefined:i,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:c,isStream:function(t){return u(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:h,merge:function t(){var e={};function r(r,n){a(e[n])&&a(r)?e[n]=t(e[n],r):a(r)?e[n]=t({},r):s(r)?e[n]=r.slice():e[n]=r}for(var n=0,o=arguments.length;n<o;n++)h(arguments[n],r);return e},extend:function(t,e,r){return h(e,(function(e,o){t[o]=r&&"function"==typeof e?n(e,r):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},1989:(t,e,r)=>{var n=r(1789),o=r(401),s=r(7667),i=r(1327),u=r(1866);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},8407:(t,e,r)=>{var n=r(7040),o=r(4125),s=r(2117),i=r(7518),u=r(4705);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},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),u=r(5265);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},6384:(t,e,r)=>{var n=r(8407),o=r(7465),s=r(3779),i=r(7599),u=r(4758),a=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=u,c.prototype.set=a,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),u=r(5776),a=r(6719),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=s(t),h=!r&&o(t),f=!r&&!h&&i(t),p=!r&&!h&&!f&&a(t),d=r||h||f||p,l=d?n(t.length,String):[],g=l.length;for(var m in t)!e&&!c.call(t,m)||d&&("length"==m||f&&("offset"==m||"parent"==m)||p&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||u(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),u=/^\[object .+?Constructor\]$/,a=Function.prototype,c=Object.prototype,h=a.toString,f=c.hasOwnProperty,p=RegExp("^"+h.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||o(t))&&(n(t)?p:u).test(i(t))}},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 u in t)("constructor"!=u||!e&&i.call(t,u))&&r.push(u);return r}},2980:(t,e,r)=>{var n=r(6384),o=r(6556),s=r(8483),i=r(9783),u=r(3218),a=r(1704),c=r(6390);t.exports=function t(e,r,h,f,p){e!==r&&s(r,(function(s,a){if(p||(p=new n),u(s))i(e,r,a,h,t,f,p);else{var d=f?f(c(e,a),s,a+"",e,r,p):void 0;void 0===d&&(d=s),o(e,a,d)}}),a)}},9783:(t,e,r)=>{var n=r(6556),o=r(4626),s=r(7133),i=r(278),u=r(8517),a=r(5694),c=r(1469),h=r(9246),f=r(4144),p=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 w=m(t,r),T=m(e,r),_=$.get(T);if(_)n(t,r,_);else{var j=x?x(w,T,r+"",t,e,$):void 0,k=void 0===j;if(k){var R=c(T),S=!R&&f(T),A=!R&&!S&&g(T);j=T,R||S||A?c(w)?j=w:h(w)?j=i(w):S?(k=!1,j=o(T,!0)):A?(k=!1,j=s(T,!0)):j=[]:l(T)||a(T)?(j=w,a(w)?j=y(w):d(w)&&!p(w)||(j=u(T))):k=!1}k&&($.set(T,j),b(j,T,v,x,$),$.delete(T)),n(t,r,j)}}},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,u=i?i.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}},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 u=-1,a=e.length;++u<a;){var c=e[u],h=s?s(r[c],t[c],c,r,t):void 0;void 0===h&&(h=t[c]),i?o(r,c,h):n(r,c,h)}return r}},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,u=s>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(s--,i):void 0,u&&o(r[0],r[1],u)&&(i=s<3?void 0:i,s=1),e=Object(e);++n<s;){var a=r[n];a&&t(e,a,n,i)}return e}))}},5063:t=>{t.exports=function(t){return function(e,r,n){for(var o=-1,s=Object(e),i=n(e),u=i.length;u--;){var a=i[t?u:++o];if(!1===r(s[a],a,s))break}return e}}},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,e,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},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,u=n?n.toStringTag:void 0;t.exports=function(t){var e=s.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=i.call(t);return n&&(e?t[u]=r:delete t[u]),o}},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 u=typeof e;return!!("number"==u?o(r)&&s(e,r.length):"string"==u&&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,u=function(){try{return s&&s.require&&s.require("util").types||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=u},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,u=o(s.length-e,0),a=Array(u);++i<u;)a[i]=s[e+i];i=-1;for(var c=Array(e+1);++i<e;)c[i]=s[i];return c[e]=r(a),n(t,this,c)}}},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,u=s.propertyIsEnumerable,a=n(function(){return arguments}())?n:function(t){return o(t)&&i.call(t,"callee")&&!u.call(t,"callee")};t.exports=a},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,u=i&&i.exports===s?n.Buffer:void 0,a=(u?u.isBuffer:void 0)||o;t.exports=a},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,u=Object.prototype,a=i.toString,c=u.hasOwnProperty,h=a.call(Object);t.exports=function(t){if(!s(t)||"[object Object]"!=n(t))return!1;var e=o(t);if(null===e)return!0;var r=c.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&a.call(r)==h}},6719:(t,e,r)=>{var n=r(8749),o=r(1717),s=r(1167),i=s&&s.isTypedArray,u=i?o(i):n;t.exports=u},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))}}},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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),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={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>Z});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 u(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 a(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=u("/admins");function f(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 p={requestNewTokens:async function(){const t=f.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=f.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=f.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=f.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:f},d=u("/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=u("/controllers"),m={post:function(t){return this.post("/commands",t)}},y=u("/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=u("/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 x=b,$=u("/hotel-rooms");$.Room={getAll:function(t){const e=`/hotel-rooms/${t}/rooms`;return this.get(e)},add:function(t,e){const r=`/hotel-rooms/${t}/rooms`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/rooms`;return this.delete(r,e)}},$.Guest={getAll:function(t){const e=`/hotel-rooms/${t}/guests`;return this.get(e)}},$.Scenes={getAll:function(t){const e=`/hotel-rooms/${t}/scenes`;return this.get(e)},get:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}`;return this.get(r)},trigger:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}/trigger`;return this.post(r,{})},update:function(t,e,r){const n=`/hotel-rooms/${t}/scenes/${e}`;return this.put(n,r)},add:function(t,e){const r=`/hotel-rooms/${t}/scenes`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}`;return this.delete(r)}},$.Integrations={getAll:function(t){const e=`/hotel-rooms/${t}/integrations`;return this.get(e)},add:function(t,e){const r=`/hotel-rooms/${t}/integrations`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/integrations/${e}`;return this.delete(r)}},$.Alarms={getAll:function(t){const e=`/hotel-rooms/${t}/alarms`;return this.get(e)},get:function(t,e){const r=`/hotel-rooms/${t}/alarms/${e}`;return this.get(r)},add:function(t,e){const r=`/hotel-rooms/${t}/alarms`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/alarms/${e}`;return this.delete(r)}};const w=$;let T="/integrations";const _={getAll:function(){return this.get(T)},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(T,t)}};_.Types={getAll:function(){return this.get("/integrations/types")}},_.RoomMap={add:function(t,e){return this.post(`/integrations/${t}/roomMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/roomMap`,e)}},_.Metadata={update:function(t,e){const r=`/integrations/${t}/metadata`;return this.post(r,e)}},_.DeviceMap={add:function(t,e){return this.post(`/integrations/${t}/deviceMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/deviceMap`,e)}};const j=_,k=u("structure/images");k.uploadImage=async function(t,e){return await this.uploadFile("/structure/images/upload",t,e)};const R=k,S=a("lights"),A=a("privacy"),O=a("security/locks"),M=u("/managers"),P={get:function(){return this.get("/manifest.json")}},C=P,E=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)}}};E.getGenres=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/genres`;return this.http.get(r,{})},E.getStations=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/stations`;return this.http.get(r,{})};const N=E,U=u("/notifications");U.Response=function(t){return this.http.post("/notifications/response",{params:t})},U.Send=function(t,e){const r=`/notifications/${t}`;return this.http.post(r,{params:e})};const L=U,I=u("/reports");I.getEnergyStats=function(t){return this.http.get("/reports/room/stats",{params:t})},I.getTicketStats=function(t){return this.http.get("/reports/ticket/stats",{params:t})};const B=I,q=u("/rooms");q.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)}},q.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)}},q.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 K=q,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)}},H=a("shades"),F=u("sources");F.updatePlayer=function(t){return this.post(`sources/${t}/player`,{})},F.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 D=F,G={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=G,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=a("thermostats"),X=u("/users");function Q(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=Q.bind(this);return this.put(r,e).then((e=>n(t,e)))},X.get=function(t){const e=`/users/${t}`,r=Q.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 Y=X,Z=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(p),this.Guest=this.bindMethods(x),this.User=this.bindMethods(Y),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(w),this.HotelRoom.Room=this.bindMethods(w.Room),this.HotelRoom.Guest=this.bindMethods(w.Guest),this.HotelRoom.Alarms=this.bindMethods(w.Alarms),this.HotelRoom.Scenes=this.bindMethods(w.Scenes),this.HotelRoom.Integrations=this.bindMethods(w.Integrations),this.Room=this.bindMethods(K),this.Room.Light=this.bindMethods(S),this.Room.Shade=this.bindMethods(H),this.Room.Thermostat=this.bindMethods(W),this.Room.Lock=this.bindMethods(O),this.Room.Privacy=this.bindMethods(A),this.Room.Scenes=this.bindMethods(K.Scenes),this.Room.Media=this.bindMethods(K.Media),this.Room.Security=this.bindMethods(K.Security),this.Room.Security.Locks=this.bindMethods(K.Security.Locks),this.Room.Security.Cameras=this.bindMethods(K.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(j),this.Integrations.Types=this.bindMethods(j.Types),this.Integrations.RoomMap=this.bindMethods(j.RoomMap),this.Integrations.Metadata=this.bindMethods(j.Metadata),this.Integrations.DeviceMap=this.bindMethods(j.DeviceMap),this.Concierge=this.bindMethods(l),this.Commands=this.bindMethods(m),this.Image=this.bindMethods(R),this.Source=this.bindMethods(D),this.Source.browse=this.bindMethods(D.browse),this.Source.browse.genres=this.bindMethods(D.browse.genres),this.Source.browse.stations=this.bindMethods(D.browse.stations),this.Structure=this.bindMethods(J),this.Structure.Images=this.bindMethods(R),this.Media=this.bindMethods(N),this.Manifest=this.bindMethods(C),this.Manager=this.bindMethods(M),this.Notifications=this.bindMethods(L),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}`}})}}})(),n})()}));
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(self,(function(){return(()=>{var t={9669:(t,e,r)=>{t.exports=r(1609)},5448:(t,e,r)=>{"use strict";var n=r(4867),o=r(6026),s=r(4372),i=r(5327),u=r(4097),a=r(4109),c=r(7985),h=r(5061),f=r(5655),p=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||"",x=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+x)}var $=u(t.baseURL,t.url);function w(){if(v){var n="getAllResponseHeaders"in v?a(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($,t.params,t.paramsSerializer),!0),v.timeout=t.timeout,"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){v&&4===v.readyState&&(0!==v.status||v.responseURL&&0===v.responseURL.indexOf("file:"))&&setTimeout(w)},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||f.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(h(e,t,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",v)),v=null},n.isStandardBrowserEnv()){var T=(t.withCredentials||c($))&&t.xsrfCookieName?s.read(t.xsrfCookieName):void 0;T&&(g[t.xsrfHeaderName]=T)}"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 p("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),u=function t(e){var r=new s(e),u=o(s.prototype.request,r);return n.extend(u,s.prototype,r),n.extend(u,r),u.create=function(r){return t(i(e,r))},u}(r(5655));u.Axios=s,u.Cancel=r(5263),u.CancelToken=r(4972),u.isCancel=r(6502),u.VERSION=r(7288).version,u.all=function(t){return Promise.all(t)},u.spread=r(8713),u.isAxiosError=r(6268),t.exports=u,t.exports.default=u},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),u=r(7185),a=r(4875),c=a.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=u(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&&a.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 f=t;r.length;){var p=r.shift(),d=r.shift();try{f=p(f)}catch(t){d(t);break}}try{o=i(f)}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=u(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(u(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(u(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),u=r(5263);function a(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new u("canceled")}t.exports=function(t){return a(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 a(t),e.data=o.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(a(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 u(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(void 0,e[r])}function a(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:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:a};return n.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||s,o=e(t);n.isUndefined(o)&&e!==a||(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 u(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(a=r(5448)),a),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)?(u(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)||e&&"application/json"===e["Content-Type"]?(u(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 u=t.indexOf("#");-1!==u&&(t=t.slice(0,u)),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 u=[];u.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),n.isString(o)&&u.push("path="+o),n.isString(s)&&u.push("domain="+s),!0===i&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},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 u=t[s],a=void 0===u||i(u,s,t);if(!0!==a)throw new TypeError("option "+s+" must be "+a)}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 u(t){return null!==t&&"object"==typeof t}function a(t){if("[object Object]"!==o.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===o.call(t)}function h(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!i(t)&&null!==t.constructor&&!i(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:u,isPlainObject:a,isUndefined:i,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:c,isStream:function(t){return u(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:h,merge:function t(){var e={};function r(r,n){a(e[n])&&a(r)?e[n]=t(e[n],r):a(r)?e[n]=t({},r):s(r)?e[n]=r.slice():e[n]=r}for(var n=0,o=arguments.length;n<o;n++)h(arguments[n],r);return e},extend:function(t,e,r){return h(e,(function(e,o){t[o]=r&&"function"==typeof e?n(e,r):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},1989:(t,e,r)=>{var n=r(1789),o=r(401),s=r(7667),i=r(1327),u=r(1866);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},8407:(t,e,r)=>{var n=r(7040),o=r(4125),s=r(2117),i=r(7518),u=r(4705);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},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),u=r(5265);function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}a.prototype.clear=n,a.prototype.delete=o,a.prototype.get=s,a.prototype.has=i,a.prototype.set=u,t.exports=a},6384:(t,e,r)=>{var n=r(8407),o=r(7465),s=r(3779),i=r(7599),u=r(4758),a=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=u,c.prototype.set=a,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),u=r(5776),a=r(6719),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=s(t),h=!r&&o(t),f=!r&&!h&&i(t),p=!r&&!h&&!f&&a(t),d=r||h||f||p,l=d?n(t.length,String):[],g=l.length;for(var m in t)!e&&!c.call(t,m)||d&&("length"==m||f&&("offset"==m||"parent"==m)||p&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||u(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),u=/^\[object .+?Constructor\]$/,a=Function.prototype,c=Object.prototype,h=a.toString,f=c.hasOwnProperty,p=RegExp("^"+h.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!s(t)||o(t))&&(n(t)?p:u).test(i(t))}},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 u in t)("constructor"!=u||!e&&i.call(t,u))&&r.push(u);return r}},2980:(t,e,r)=>{var n=r(6384),o=r(6556),s=r(8483),i=r(9783),u=r(3218),a=r(1704),c=r(6390);t.exports=function t(e,r,h,f,p){e!==r&&s(r,(function(s,a){if(p||(p=new n),u(s))i(e,r,a,h,t,f,p);else{var d=f?f(c(e,a),s,a+"",e,r,p):void 0;void 0===d&&(d=s),o(e,a,d)}}),a)}},9783:(t,e,r)=>{var n=r(6556),o=r(4626),s=r(7133),i=r(278),u=r(8517),a=r(5694),c=r(1469),h=r(9246),f=r(4144),p=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 w=m(t,r),T=m(e,r),_=$.get(T);if(_)n(t,r,_);else{var j=x?x(w,T,r+"",t,e,$):void 0,k=void 0===j;if(k){var R=c(T),S=!R&&f(T),A=!R&&!S&&g(T);j=T,R||S||A?c(w)?j=w:h(w)?j=i(w):S?(k=!1,j=o(T,!0)):A?(k=!1,j=s(T,!0)):j=[]:l(T)||a(T)?(j=w,a(w)?j=y(w):d(w)&&!p(w)||(j=u(T))):k=!1}k&&($.set(T,j),b(j,T,v,x,$),$.delete(T)),n(t,r,j)}}},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,u=i?i.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}},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 u=-1,a=e.length;++u<a;){var c=e[u],h=s?s(r[c],t[c],c,r,t):void 0;void 0===h&&(h=t[c]),i?o(r,c,h):n(r,c,h)}return r}},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,u=s>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(s--,i):void 0,u&&o(r[0],r[1],u)&&(i=s<3?void 0:i,s=1),e=Object(e);++n<s;){var a=r[n];a&&t(e,a,n,i)}return e}))}},5063:t=>{t.exports=function(t){return function(e,r,n){for(var o=-1,s=Object(e),i=n(e),u=i.length;u--;){var a=i[t?u:++o];if(!1===r(s[a],a,s))break}return e}}},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,e,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},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,u=n?n.toStringTag:void 0;t.exports=function(t){var e=s.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var o=i.call(t);return n&&(e?t[u]=r:delete t[u]),o}},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 u=typeof e;return!!("number"==u?o(r)&&s(e,r.length):"string"==u&&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,u=function(){try{return s&&s.require&&s.require("util").types||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=u},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,u=o(s.length-e,0),a=Array(u);++i<u;)a[i]=s[e+i];i=-1;for(var c=Array(e+1);++i<e;)c[i]=s[i];return c[e]=r(a),n(t,this,c)}}},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,u=s.propertyIsEnumerable,a=n(function(){return arguments}())?n:function(t){return o(t)&&i.call(t,"callee")&&!u.call(t,"callee")};t.exports=a},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,u=i&&i.exports===s?n.Buffer:void 0,a=(u?u.isBuffer:void 0)||o;t.exports=a},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,u=Object.prototype,a=i.toString,c=u.hasOwnProperty,h=a.call(Object);t.exports=function(t){if(!s(t)||"[object Object]"!=n(t))return!1;var e=o(t);if(null===e)return!0;var r=c.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&a.call(r)==h}},6719:(t,e,r)=>{var n=r(8749),o=r(1717),s=r(1167),i=s&&s.isTypedArray,u=i?o(i):n;t.exports=u},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))}}},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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),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={};return(()=>{"use strict";r.r(n),r.d(n,{default:()=>Z});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 u(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 a(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=u("/admins");function f(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 p={requestNewTokens:async function(){const t=f.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=f.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=f.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=f.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:f},d=u("/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=u("/controllers"),m={post:function(t){return this.post("/commands",t)}},y=u("/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=u("/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 x=b,$=u("/hotel-rooms");$.Room={getAll:function(t){const e=`/hotel-rooms/${t}/rooms`;return this.get(e)},add:function(t,e){const r=`/hotel-rooms/${t}/rooms`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/rooms`;return this.delete(r,e)}},$.Guest={getAll:function(t){const e=`/hotel-rooms/${t}/guests`;return this.get(e)}},$.Scenes={getAll:function(t){const e=`/hotel-rooms/${t}/scenes`;return this.get(e)},get:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}`;return this.get(r)},trigger:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}/trigger`;return this.post(r,{})},update:function(t,e,r){const n=`/hotel-rooms/${t}/scenes/${e}`;return this.put(n,r)},add:function(t,e){const r=`/hotel-rooms/${t}/scenes`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/scenes/${e}`;return this.delete(r)}},$.Integrations={getAll:function(t){const e=`/hotel-rooms/${t}/integrations`;return this.get(e)},add:function(t,e){const r=`/hotel-rooms/${t}/integrations`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/integrations/${e}`;return this.delete(r)}},$.Alarms={getAll:function(t){const e=`/hotel-rooms/${t}/alarms`;return this.get(e)},get:function(t,e){const r=`/hotel-rooms/${t}/alarms/${e}`;return this.get(r)},add:function(t,e){const r=`/hotel-rooms/${t}/alarms`;return this.post(r,e)},delete:function(t,e){const r=`/hotel-rooms/${t}/alarms/${e}`;return this.delete(r)}};const w=$;let T="/integrations";const _={getAll:function(){return this.get(T)},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(T,t)}};_.Types={getAll:function(){return this.get("/integrations/types")}},_.RoomMap={add:function(t,e){return this.post(`/integrations/${t}/roomMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/roomMap`,e)}},_.Metadata={update:function(t,e){const r=`/integrations/${t}/metadata`;return this.post(r,e)}},_.DeviceMap={add:function(t,e){return this.post(`/integrations/${t}/deviceMap`,e)},delete:function(t,e){return this.delete(`/integrations/${t}/deviceMap`,e)}};const j=_,k=u("structure/images");k.uploadImage=async function(t,e){return await this.uploadFile("/structure/images/upload",t,e)};const R=k,S=a("lights"),A=a("privacy"),O=a("security/locks"),M=u("/managers"),P={get:function(){return this.get("/manifest.json")}},C=P,E=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)}}};E.getGenres=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/genres`;return this.http.get(r,{})},E.getStations=function(t,e){const r=`/rooms/${t}/media/sources/${e}/browse/stations`;return this.http.get(r,{})};const N=E,U=u("/notifications");U.Response=function(t){return this.http.post("/notifications/response",{params:t})},U.Send=function(t,e){const r=`/notifications/${t}`;return this.http.post(r,{params:e})};const L=U,I=u("/reports");I.getEnergyStats=function(t){return this.http.get("/reports/room/stats",{params:t})},I.getTicketStats=function(t){return this.http.get("/reports/ticket/stats",{params:t})};const B=I,q=u("/rooms");q.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)}},q.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)}},q.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 K=q,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)}},H=a("shades"),F=u("sources");F.updatePlayer=function(t){return this.post(`sources/${t}/player`,{})},F.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 D=F,G={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=G,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=a("thermostats"),X=u("/users");function Q(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=Q.bind(this);return this.put(r,e).then((e=>n(t,e)))},X.get=function(t){const e=`/users/${t}`,r=Q.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 Y=X,Z=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(p),this.Guest=this.bindMethods(x),this.User=this.bindMethods(Y),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(w),this.HotelRoom.Room=this.bindMethods(w.Room),this.HotelRoom.Guest=this.bindMethods(w.Guest),this.HotelRoom.Alarms=this.bindMethods(w.Alarms),this.HotelRoom.Scenes=this.bindMethods(w.Scenes),this.HotelRoom.Integrations=this.bindMethods(w.Integrations),this.Room=this.bindMethods(K),this.Room.Light=this.bindMethods(S),this.Room.Shade=this.bindMethods(H),this.Room.Thermostat=this.bindMethods(W),this.Room.Lock=this.bindMethods(O),this.Room.Privacy=this.bindMethods(A),this.Room.Scenes=this.bindMethods(K.Scenes),this.Room.Media=this.bindMethods(K.Media),this.Room.Security=this.bindMethods(K.Security),this.Room.Security.Locks=this.bindMethods(K.Security.Locks),this.Room.Security.Cameras=this.bindMethods(K.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(j),this.Integrations.Types=this.bindMethods(j.Types),this.Integrations.RoomMap=this.bindMethods(j.RoomMap),this.Integrations.Metadata=this.bindMethods(j.Metadata),this.Integrations.DeviceMap=this.bindMethods(j.DeviceMap),this.Concierge=this.bindMethods(l),this.Commands=this.bindMethods(m),this.Image=this.bindMethods(R),this.Source=this.bindMethods(D),this.Source.browse=this.bindMethods(D.browse),this.Source.browse.genres=this.bindMethods(D.browse.genres),this.Source.browse.stations=this.bindMethods(D.browse.stations),this.Structure=this.bindMethods(J),this.Structure.Images=this.bindMethods(R),this.Media=this.bindMethods(N),this.Manifest=this.bindMethods(C),this.Manager=this.bindMethods(M),this.Notifications=this.bindMethods(L),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}`}})}}})(),n})()}));
|