smart-house-frontend
Version:
2 lines • 327 kB
JavaScript
webpackJsonp([4],{419:function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=n(3),s=n(420),a=function(){function e(e){this.devicesService=e}return e.prototype.resolve=function(){return this.devicesService.getSensors()},e=r([o.Injectable(),i("design:paramtypes",["function"==typeof(t="undefined"!=typeof s.DevicesService&&s.DevicesService)&&t||Object])],e);var t}();t.DeviceListResolver=a},420:function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=n(3),s=n(67),a=function(){function e(e){this.http=e}return e.prototype.getSensors=function(){return this.http.get("/sensors")},e.prototype.get=function(e){return void 0===e&&(e=""),this.http.get("/sensors/"+e)},e.prototype.save=function(e){return this.http.post("/sensors",e)},e.prototype.update=function(e){return this.http.put("/sensors/"+e._id,e)},e.prototype.delete=function(e){return this.http.delete("/sensors/"+e._id)},e=r([o.Injectable(),i("design:paramtypes",["function"==typeof(t="undefined"!=typeof s.ShHttpService&&s.ShHttpService)&&t||Object])],e);var t}();t.DevicesService=a},434:function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=n(3),s=n(29),a=n(389),c=n(387),l=n(435),u=n(438),f=n(442),d=n(420),p=n(419),h=n(445),v=n(499),g=n(504),m=n(507),y=function(){function t(){}return t=r([o.NgModule({id:e.id,imports:[s.RouterModule,a.FormsModule,c.SharedModule],declarations:[f.DeviceWidgetComponent,m.SensorWidgetComponent,g.SwitcherWidgetComponent,v.ServoWidgetComponent,l.DeviceListComponent,u.DeviceComponent],exports:[l.DeviceListComponent,u.DeviceComponent,f.DeviceWidgetComponent],providers:[d.DevicesService,p.DeviceListResolver,h.DeviceWidgetService]}),i("design:paramtypes",[])],t)}();t.DevicesModule=y},435:function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=n(3),s=n(29),a=n(420),c=n(398),l=[{topic:"mqttId",name:"ID",sortable:!0},{topic:"type",name:"Type",sortable:!0},{topic:"description",name:"Description",sortable:!0}],u=function(){function e(e,t,n,r){this.devicesService=e,this.dialogService=t,this.viewContainerRef=n,this.router=r,this.editOnItemClick=!0,this.showDeleteButton=!0,this.statisticLink="",this.sortBy="",this.reverse=!1,this._headers=[],this._headers=l}return e.prototype.setSortBy=function(e){var t=this;this.reverse=this.sortBy===e&&!this.reverse,this.sortBy=e,this.deviceList.sort(function(n,r){return n[e]<r[e]?t.reverse?1:-1:n[e]>r[e]?t.reverse?-1:1:0})},e.prototype.isActive=function(e){return e===this.sortBy},e.prototype.getItemEditLink=function(e){return this.editOnItemClick?["./",e]:[]},e.prototype.goToDeviceStatistic=function(e,t,n){n.stopPropagation(),this.router.navigate([this.statisticLink,e,"day",t])},e.prototype.removeSensor=function(e,t){var n=this,r={title:"",message:"Are you sure you want to delete this device?"};t.stopPropagation(),this.dialogService.confirm(this.viewContainerRef,r).filter(function(e){return e}).subscribe(function(){n.devicesService.delete(e).subscribe(function(e){n.deviceList=n.deviceList.filter(function(t){return t._id!==e._id})})})},Object.defineProperty(e.prototype,"headers",{get:function(){return this._headers},enumerable:!0,configurable:!0}),r([o.Input(),i("design:type",Object)],e.prototype,"deviceList",void 0),r([o.Input(),i("design:type",Boolean)],e.prototype,"editOnItemClick",void 0),r([o.Input(),i("design:type",Boolean)],e.prototype,"showDeleteButton",void 0),r([o.Input(),i("design:type",String)],e.prototype,"statisticLink",void 0),e=r([o.Component({selector:"sh-device-list",template:n(436),styles:[n(437)]}),i("design:paramtypes",["function"==typeof(t="undefined"!=typeof a.DevicesService&&a.DevicesService)&&t||Object,"function"==typeof(u="undefined"!=typeof c.DialogService&&c.DialogService)&&u||Object,"function"==typeof(f="undefined"!=typeof o.ViewContainerRef&&o.ViewContainerRef)&&f||Object,"function"==typeof(d="undefined"!=typeof s.Router&&s.Router)&&d||Object])],e);var t,u,f,d}();t.DeviceListComponent=u},436:function(e,t){e.exports='<div *ngIf="deviceList.length === 0" class="empty-list">\n <div class="container empty-list__container">\n <div class="empty-list__container__text">\n <h3 class="empty-list__container__text__main">There are no devices yet</h3>\n <h4 class="empty-list__container__text__additional">Once you connect your device to the system, it will be listed here.</h4>\n </div><!-- empty-list__container__text -->\n </div><!-- empty-list__container -->\n</div><!-- empty-list -->\n\n<div *ngIf="deviceList.length !== 0" class="sensors-list">\n <table class="highlight responsive-table sensors-list-table">\n <thead class="sensors-list-table__head">\n <th *ngFor="let header of headers"\n (click)="setSortBy(header.topic)"\n class="sensors-list-table__head__item"\n [class.active]="isActive(header.topic)"\n [class.sortable]="header.sortable">\n {{ header.name }}\n <div [class]="reverse ? \'up\' : \'down\'"></div>\n </th><!-- sensors-list-table__head__item -->\n </thead><!-- sensors-list-table__head -->\n <tbody class="sensors-list-table__body">\n <tr *ngFor="let item of deviceList"\n [routerLink]="getItemEditLink(item._id)"\n class="sensors-list-table__body__row">\n <td *ngFor="let header of headers"\n class="sensors-list-table__body__row__item">\n {{item[header.topic]}}\n </td><!-- sensors-list-table__body__row__item -->\n <td *ngIf="statisticLink">\n <div class="sensor-widget_statistic-button"\n (click)="goToDeviceStatistic(item.mqttId, item.type, $event)">\n </div>\n </td>\n <td *ngIf="showDeleteButton"\n class="sensors-list-table__body__row__actions">\n <button (click)="removeSensor(item, $event)"\n class="waves-effect waves-light btn sensors-list-table__body__row__actions__remove"\n name="remove-device"\n type="remove">\n <i class="material-icons sensors-list-table__body__row__actions__remove__icon">delete</i>\n </button><!-- sensors-list-table__body__row__actions__remove -->\n </td><!-- sensors-list-table__body__row__actions -->\n </tr><!-- sensors-list-table__body__row -->\n </tbody><!-- sensors-list-table__body -->\n </table><!-- sensors-list-table -->\n</div><!-- sensors-list -->\n'},437:function(e,t){e.exports=".sub-header__actions{vertical-align:middle;line-height:54px}.sensors-list-table__head__item.sortable{cursor:pointer}.sensors-list-table__head__item.sortable.active .up{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid black}.sensors-list-table__head__item.sortable.active .down{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid black}.sensors-list-table__body__row__actions__remove{padding:0 15px}.empty-list__container{padding:0px}.empty-list__container::before{content:'';display:block;background:url(\"./assets/empty-sensors-list.png\") no-repeat;background-size:150px;background-position:calc(100%/2);height:150px;margin:0 6px 0 0}.empty-list__container__text__main{font-family:Roboto-Regular;font-size:24px;text-align:center}.empty-list__container__text__additional{font-family:Roboto-Regular;font-size:15px;text-align:center}.sensor-widget_statistic-button{position:relative;display:block;float:left;cursor:pointer;width:24px;height:26px;margin-top:1px;background-color:#dedede;background-image:url(./assets/statistic.svg)}.sensor-widget_statistic-button:hover{box-shadow:0 2px 4px 0 rgba(0,0,0,0.5)}\n"},438:function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=n(3),s=n(439),a=function(){function e(){this.switcher=!1}return e.prototype.switchSensor=function(){this.device.executor=!this.device.executor},e.prototype.switcherImageUrl=function(){return this.device.executor?"url(assets/switcherON.svg)":"url(assets/switcherOFF.svg)"},r([o.Input(),i("design:type","function"==typeof(t="undefined"!=typeof s.Device&&s.Device)&&t||Object)],e.prototype,"device",void 0),e=r([o.Component({selector:"sh-device",template:n(440),styles:[n(441)]}),i("design:paramtypes",[])],e);var t}();t.DeviceComponent=a},439:function(e,t){"use strict";var n=function(){function e(e){void 0===e&&(e={}),Object.assign(this,{mqttId:"",type:"servo",subType:"socket",description:"",executor:!1,sensor:!1},e)}return e}();t.Device=n},440:function(e,t){e.exports='<div class="device">\n <div class="device__icon"\n [style.background-image]="\'url(assets/\' + device?.subType + \'.svg)\'">\n </div>\n <div *ngIf="device?.type === \'switcher\'"\n (click)="switchSensor()">\n <div class="device__switcher"\n [style.background-image]="switcherImageUrl()">\n </div>\n </div>\n</div>\n'},441:function(e,t){e.exports=".device{width:42px;height:42px;position:absolute;cursor:move}.device__icon{width:100%;height:100%}.device__switcher{position:absolute;left:42px;top:0;width:42px;height:42px;cursor:pointer}\n"},442:function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=n(3),s=function(){function e(){this.isEditMode=!1,this.onRemoveWidget=new o.EventEmitter}return e.prototype.removeWidget=function(){this.onRemoveWidget.emit(this.device)},r([o.Input(),i("design:type",Object)],e.prototype,"device",void 0),r([o.Input(),i("design:type",Boolean)],e.prototype,"isEditMode",void 0),r([o.Output(),i("design:type","function"==typeof(t="undefined"!=typeof o.EventEmitter&&o.EventEmitter)&&t||Object)],e.prototype,"onRemoveWidget",void 0),e=r([o.Component({selector:"sh-device-widget",template:n(443),styles:[n(444)]}),i("design:paramtypes",[])],e);var t}();t.DeviceWidgetComponent=s},443:function(e,t){e.exports='<div class="sensor-widget">\n <div class="sensor-widget_header">\n <div class="sensor-widget_button-statistics"\n [routerLink]="[\'../statistic/sensor-details\', device.mqttId, \'day\', device.type]">\n </div>\n <div class="sensor-widget_header_info">\n <span>{{device.description}}</span>\n </div>\n <button class="sensor-widget_button-close"\n *ngIf="isEditMode"\n (click)="removeWidget()">\n </button>\n </div>\n <div>\n <sh-sensor-widget\n [device]="device"\n *ngIf="!device.executor && !device.servo">\n </sh-sensor-widget>\n <sh-switcher-widget\n [device]="device"\n *ngIf="device.executor">\n </sh-switcher-widget>\n <sh-servo-widget\n [device]="device"\n *ngIf="device.servo">\n </sh-servo-widget>\n </div>\n</div>\n'},444:function(e,t){e.exports=".sensor-widget{position:relative;width:182px;height:182px;padding:2px;font-family:Roboto;text-align:center;color:white;background-color:#169eb1;border:solid 1px white;overflow:hidden}.sensor-widget_footer,.sensor-widget_header{position:absolute;width:100%;bottom:0;height:27px;max-height:27px;overflow:hidden}.sensor-widget_footer{bottom:0}.sensor-widget_header{top:0;z-index:1}.sensor-widget_button-close,.sensor-widget_button-statistics{position:absolute;top:0;width:27px;height:27px;border:none;box-shadow:none;cursor:pointer;background:transparent;background-repeat:no-repeat;background-position:center;opacity:0.5}.sensor-widget_button-close:hover,.sensor-widget_button-close:active,.sensor-widget_button-close:focus,.sensor-widget_button-statistics:hover,.sensor-widget_button-statistics:active,.sensor-widget_button-statistics:focus{opacity:1}.sensor-widget_button-close{right:0;background-image:url(./assets/close-icon.svg)}.sensor-widget_button-statistics{left:0;background-image:url(./assets/statistics-icon.svg)}.sensor-widget_header_info{line-height:27px;padding:0 27px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sensor-widget_info{margin-top:27px;padding:27px 27px;display:table;height:100%;width:100%}.sensor-widget_info_value{display:table-cell;vertical-align:middle;text-align:center;font-size:24px;line-height:1.5;font-weight:bold;width:100%}.sensor-widget_switcher-info{padding:27px 27px;display:table;height:100%;width:100%}\n"},445:function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=n(3),s=n(446),a=function(){function e(){this.io=s,this.setupSocket()}return e.prototype.setupSocket=function(){this.socket=this.io.connect({backEndUrl:"",backEndWebSocketUrl:""}.backEndWebSocketUrl)},e.prototype.subscribe=function(e,t){function n(){this.socket.on("event",t),e&&this.socket.emit("subscribe",{device:e})}var r=this;this.socket.connected?n.apply(this):this.socket.on("connect",function(){n.apply(r)})},e.prototype.unsubscribe=function(e){this.socket.emit("unsubscribe",{device:e})},e.prototype.pushEvent=function(e){this.socket.emit("pushEvent",e)},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.DeviceWidgetService=a},446:function(e,t,n){function r(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r=o(e),s=r.source,u=r.id,f=r.path,d=l[u]&&f in l[u].nsps,p=t.forceNew||t["force new connection"]||!1===t.multiplex||d;return p?(c("ignoring socket cache for %s",s),n=a(s,t)):(l[u]||(c("new io instance for %s",s),l[u]=a(s,t)),n=l[u]),r.query&&!t.query?t.query=r.query:t&&"object"==typeof t.query&&(t.query=i(t.query)),n.socket(r.path,t)}function i(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}var o=n(447),s=n(452),a=n(463),c=n(449)("socket.io-client");e.exports=t=r;var l=t.managers={};t.protocol=s.protocol,t.connect=r,t.Manager=n(463),t.Socket=n(493)},447:function(e,t,n){(function(t){function r(e,n){var r=e;n=n||t.location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(o("protocol-less url %s",e),e="undefined"!=typeof n?n.protocol+"//"+e:"https://"+e),o("parse %s",e),r=i(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var s=r.host.indexOf(":")!==-1,a=s?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}var i=n(448),o=n(449)("socket.io-client:url");e.exports=r}).call(t,function(){return this}())},448:function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,i=e.indexOf("["),o=e.indexOf("]");i!=-1&&o!=-1&&(e=e.substring(0,i)+e.substring(i,o).replace(/:/g,";")+e.substring(o,e.length));for(var s=n.exec(e||""),a={},c=14;c--;)a[r[c]]=s[c]||"";return i!=-1&&o!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},449:[963,450],450:function(e,t,n){function r(){return t.colors[u++%t.colors.length]}function i(e){function n(){}function i(){var e=i,n=+new Date,o=n-(l||n);e.diff=o,e.prev=l,e.curr=n,l=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var c=0;s[0]=s[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;c++;var i=t.formatters[r];if("function"==typeof i){var o=s[c];n=i.call(e,o),s.splice(c,1),c--}return n}),s=t.formatArgs.apply(e,s);var u=i.log||t.log||console.log.bind(console);u.apply(e,s)}n.enabled=!1,i.enabled=!0;var o=t.enabled(e)?i:n;return o.namespace=e,o}function o(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&(e=n[i].replace(/[\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function s(){t.enable("")}function a(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i.debug=i,t.coerce=c,t.disable=s,t.enable=o,t.enabled=a,t.humanize=n(451),t.names=[],t.skips=[],t.formatters={};var l,u=0},451:function(e,t){function n(e){if(e=String(e),!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*u;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=a?Math.round(e/a)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function i(e){return o(e,l,"day")||o(e,c,"hour")||o(e,a,"minute")||o(e,s,"second")||e+" ms"}function o(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var s=1e3,a=60*s,c=60*a,l=24*c,u=365.25*l;e.exports=function(e,t){t=t||{};var o=typeof e;if("string"===o&&e.length>0)return n(e);if("number"===o&&isNaN(e)===!1)return t.long?i(e):r(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},452:function(e,t,n){function r(){}function i(e){var n="",r=!1;return n+=e.type,t.BINARY_EVENT!=e.type&&t.BINARY_ACK!=e.type||(n+=e.attachments,n+="-"),e.nsp&&"/"!=e.nsp&&(r=!0,n+=e.nsp),null!=e.id&&(r&&(n+=",",r=!1),n+=e.id),null!=e.data&&(r&&(n+=","),n+=d.stringify(e.data)),f("encoded %j as %s",e,n),n}function o(e,t){function n(e){var n=h.deconstructPacket(e),r=i(n.packet),o=n.buffers;o.unshift(r),t(o)}h.removeBlobs(e,n)}function s(){this.reconstructor=null}function a(e){var n={},r=0;if(n.type=Number(e.charAt(0)),null==t.types[n.type])return u();if(t.BINARY_EVENT==n.type||t.BINARY_ACK==n.type){for(var i="";"-"!=e.charAt(++r)&&(i+=e.charAt(r),r!=e.length););if(i!=Number(i)||"-"!=e.charAt(r))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"==e.charAt(r+1))for(n.nsp="";++r;){var o=e.charAt(r);if(","==o)break;if(n.nsp+=o,r==e.length)break}else n.nsp="/";var s=e.charAt(r+1);if(""!==s&&Number(s)==s){for(n.id="";++r;){var o=e.charAt(r);if(null==o||Number(o)!=o){--r;break}if(n.id+=e.charAt(r),r==e.length)break}n.id=Number(n.id)}return e.charAt(++r)&&(n=c(n,e.substr(r))),f("decoded %s as %j",e,n),n}function c(e,t){try{e.data=d.parse(t)}catch(e){return u()}return e}function l(e){this.reconPack=e,this.buffers=[]}function u(e){return{type:t.ERROR,data:"parser error"}}var f=n(453)("socket.io-parser"),d=n(456),p=n(459),h=n(460),v=n(462);t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=r,t.Decoder=s,r.prototype.encode=function(e,n){if(f("encoding packet %j",e),t.BINARY_EVENT==e.type||t.BINARY_ACK==e.type)o(e,n);else{var r=i(e);n([r])}},p(s.prototype),s.prototype.add=function(e){var n;if("string"==typeof e)n=a(e),t.BINARY_EVENT==n.type||t.BINARY_ACK==n.type?(this.reconstructor=new l(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!v(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,this.emit("decoded",n))}},s.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},l.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length==this.reconPack.attachments){var t=h.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},l.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},453:function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var e=arguments,n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,r),e}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function a(){var e;try{e=t.storage.debug}catch(e){}return e}function c(){try{return window.localStorage}catch(e){}}t=e.exports=n(454),t.log=o,t.formatArgs=i,t.save=s,t.load=a,t.useColors=r,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(a())},454:function(e,t,n){function r(){return t.colors[u++%t.colors.length]}function i(e){function n(){}function i(){var e=i,n=+new Date,o=n-(l||n);e.diff=o,e.prev=l,e.curr=n,l=n,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=r());var s=Array.prototype.slice.call(arguments);s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;a++;var i=t.formatters[r];if("function"==typeof i){var o=s[a];n=i.call(e,o),s.splice(a,1),a--}return n}),"function"==typeof t.formatArgs&&(s=t.formatArgs.apply(e,s));var c=i.log||t.log||console.log.bind(console);c.apply(e,s)}n.enabled=!1,i.enabled=!0;var o=t.enabled(e)?i:n;return o.namespace=e,o}function o(e){t.save(e);for(var n=(e||"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&(e=n[i].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function s(){t.enable("")}function a(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i,t.coerce=c,t.disable=s,t.enable=o,t.enabled=a,t.humanize=n(455),t.names=[],t.skips=[],t.formatters={};var l,u=0},455:function(e,t){function n(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*u;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function r(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=a?Math.round(e/a)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function i(e){return o(e,l,"day")||o(e,c,"hour")||o(e,a,"minute")||o(e,s,"second")||e+" ms"}function o(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var s=1e3,a=60*s,c=60*a,l=24*c,u=365.25*l;e.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t.long?i(e):r(e)}},456:function(e,t,n){var r;(function(e,i){(function(){function o(e,t){function n(e){if(n[e]!==g)return n[e];var o;if("bug-string-char-index"==e)o="a"!="a"[0];else if("json"==e)o=n("json-stringify")&&n("json-parse");else{var s,a='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var l=t.stringify,u="function"==typeof l&&b;if(u){(s=function(){return 1}).toJSON=s;try{u="0"===l(0)&&"0"===l(new r)&&'""'==l(new i)&&l(y)===g&&l(g)===g&&l()===g&&"1"===l(s)&&"[1]"==l([s])&&"[null]"==l([g])&&"null"==l(null)&&"[null,null,null]"==l([g,y,null])&&l({a:[s,!0,!1,null,"\0\b\n\f\r\t"]})==a&&"1"===l(null,s)&&"[\n 1,\n 2\n]"==l([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==l(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==l(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==l(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==l(new c(-1))}catch(e){u=!1}}o=u}if("json-parse"==e){var f=t.parse;if("function"==typeof f)try{if(0===f("0")&&!f(!1)){s=f(a);var d=5==s.a.length&&1===s.a[0];if(d){try{d=!f('"\t"')}catch(e){}if(d)try{d=1!==f("01")}catch(e){}if(d)try{d=1!==f("1.")}catch(e){}}}}catch(e){d=!1}o=d}}return n[e]=!!o}e||(e=l.Object()),t||(t=l.Object());var r=e.Number||l.Number,i=e.String||l.String,s=e.Object||l.Object,c=e.Date||l.Date,u=e.SyntaxError||l.SyntaxError,f=e.TypeError||l.TypeError,d=e.Math||l.Math,p=e.JSON||l.JSON;"object"==typeof p&&p&&(t.stringify=p.stringify,t.parse=p.parse);var h,v,g,m=s.prototype,y=m.toString,b=new c(-0xc782b5b800cec);try{b=b.getUTCFullYear()==-109252&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}catch(e){}if(!n("json")){var w="[object Function]",x="[object Date]",C="[object Number]",k="[object String]",S="[object Array]",_="[object Boolean]",A=n("bug-string-char-index");if(!b)var M=d.floor,O=[0,31,59,90,120,151,181,212,243,273,304,334],T=function(e,t){return O[t]+365*(e-1970)+M((e-1969+(t=+(t>1)))/4)-M((e-1901+t)/100)+M((e-1601+t)/400)};if((h=m.hasOwnProperty)||(h=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=y?h=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,h=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,h.call(this,e)}),v=function(e,t){var n,r,i,o=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(i in r)h.call(r,i)&&o++;return n=r=null,o?v=2==o?function(e,t){var n,r={},i=y.call(e)==w;for(n in e)i&&"prototype"==n||h.call(r,n)||!(r[n]=1)||!h.call(e,n)||t(n)}:function(e,t){var n,r,i=y.call(e)==w;for(n in e)i&&"prototype"==n||!h.call(e,n)||(r="constructor"===n)||t(n);(r||h.call(e,n="constructor"))&&t(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(e,t){var n,i,o=y.call(e)==w,s=!o&&"function"!=typeof e.constructor&&a[typeof e.hasOwnProperty]&&e.hasOwnProperty||h;for(n in e)o&&"prototype"==n||!s.call(e,n)||t(n);for(i=r.length;n=r[--i];s.call(e,n)&&t(n));}),v(e,t)},!n("json-stringify")){var L={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},R="000000",E=function(e,t){return(R+(t||0)).slice(-e)},N="\\u00",D=function(e){for(var t='"',n=0,r=e.length,i=!A||r>10,o=i&&(A?e.split(""):e);n<r;n++){var s=e.charCodeAt(n);switch(s){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=L[s];break;default:if(s<32){t+=N+E(2,s.toString(16));break}t+=i?o[n]:e.charAt(n)}}return t+'"'},j=function(e,t,n,r,i,o,s){var a,c,l,u,d,p,m,b,w,A,O,L,R,N,P,B;try{a=t[e]}catch(e){}if("object"==typeof a&&a)if(c=y.call(a),c!=x||h.call(a,"toJSON"))"function"==typeof a.toJSON&&(c!=C&&c!=k&&c!=S||h.call(a,"toJSON"))&&(a=a.toJSON(e));else if(a>-1/0&&a<1/0){if(T){for(d=M(a/864e5),l=M(d/365.2425)+1970-1;T(l+1,0)<=d;l++);for(u=M((d-T(l,0))/30.42);T(l,u+1)<=d;u++);d=1+d-T(l,u),p=(a%864e5+864e5)%864e5,m=M(p/36e5)%24,b=M(p/6e4)%60,w=M(p/1e3)%60,A=p%1e3}else l=a.getUTCFullYear(),u=a.getUTCMonth(),d=a.getUTCDate(),m=a.getUTCHours(),b=a.getUTCMinutes(),w=a.getUTCSeconds(),A=a.getUTCMilliseconds();a=(l<=0||l>=1e4?(l<0?"-":"+")+E(6,l<0?-l:l):E(4,l))+"-"+E(2,u+1)+"-"+E(2,d)+"T"+E(2,m)+":"+E(2,b)+":"+E(2,w)+"."+E(3,A)+"Z"}else a=null;if(n&&(a=n.call(t,e,a)),null===a)return"null";if(c=y.call(a),c==_)return""+a;if(c==C)return a>-1/0&&a<1/0?""+a:"null";if(c==k)return D(""+a);if("object"==typeof a){for(N=s.length;N--;)if(s[N]===a)throw f();if(s.push(a),O=[],P=o,o+=i,c==S){for(R=0,N=a.length;R<N;R++)L=j(R,a,n,r,i,o,s),O.push(L===g?"null":L);
B=O.length?i?"[\n"+o+O.join(",\n"+o)+"\n"+P+"]":"["+O.join(",")+"]":"[]"}else v(r||a,function(e){var t=j(e,a,n,r,i,o,s);t!==g&&O.push(D(e)+":"+(i?" ":"")+t)}),B=O.length?i?"{\n"+o+O.join(",\n"+o)+"\n"+P+"}":"{"+O.join(",")+"}":"{}";return s.pop(),B}};t.stringify=function(e,t,n){var r,i,o,s;if(a[typeof t]&&t)if((s=y.call(t))==w)i=t;else if(s==S){o={};for(var c,l=0,u=t.length;l<u;c=t[l++],s=y.call(c),(s==k||s==C)&&(o[c]=1));}if(n)if((s=y.call(n))==C){if((n-=n%1)>0)for(r="",n>10&&(n=10);r.length<n;r+=" ");}else s==k&&(r=n.length<=10?n:n.slice(0,10));return j("",(c={},c[""]=e,c),i,o,r,"",[])}}if(!n("json-parse")){var P,B,I=i.fromCharCode,W={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},z=function(){throw P=B=null,u()},H=function(){for(var e,t,n,r,i,o=B,s=o.length;P<s;)switch(i=o.charCodeAt(P)){case 9:case 10:case 13:case 32:P++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=A?o.charAt(P):o[P],P++,e;case 34:for(e="@",P++;P<s;)if(i=o.charCodeAt(P),i<32)z();else if(92==i)switch(i=o.charCodeAt(++P)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=W[i],P++;break;case 117:for(t=++P,n=P+4;P<n;P++)i=o.charCodeAt(P),i>=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||z();e+=I("0x"+o.slice(t,P));break;default:z()}else{if(34==i)break;for(i=o.charCodeAt(P),t=P;i>=32&&92!=i&&34!=i;)i=o.charCodeAt(++P);e+=o.slice(t,P)}if(34==o.charCodeAt(P))return P++,e;z();default:if(t=P,45==i&&(r=!0,i=o.charCodeAt(++P)),i>=48&&i<=57){for(48==i&&(i=o.charCodeAt(P+1),i>=48&&i<=57)&&z(),r=!1;P<s&&(i=o.charCodeAt(P),i>=48&&i<=57);P++);if(46==o.charCodeAt(P)){for(n=++P;n<s&&(i=o.charCodeAt(n),i>=48&&i<=57);n++);n==P&&z(),P=n}if(i=o.charCodeAt(P),101==i||69==i){for(i=o.charCodeAt(++P),43!=i&&45!=i||P++,n=P;n<s&&(i=o.charCodeAt(n),i>=48&&i<=57);n++);n==P&&z(),P=n}return+o.slice(t,P)}if(r&&z(),"true"==o.slice(P,P+4))return P+=4,!0;if("false"==o.slice(P,P+5))return P+=5,!1;if("null"==o.slice(P,P+4))return P+=4,null;z()}return"$"},F=function(e){var t,n;if("$"==e&&z(),"string"==typeof e){if("@"==(A?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=H(),"]"!=e;n||(n=!0))n&&(","==e?(e=H(),"]"==e&&z()):z()),","==e&&z(),t.push(F(e));return t}if("{"==e){for(t={};e=H(),"}"!=e;n||(n=!0))n&&(","==e?(e=H(),"}"==e&&z()):z()),","!=e&&"string"==typeof e&&"@"==(A?e.charAt(0):e[0])&&":"==H()||z(),t[e.slice(1)]=F(H());return t}z()}return e},U=function(e,t,n){var r=V(e,t,n);r===g?delete e[t]:e[t]=r},V=function(e,t,n){var r,i=e[t];if("object"==typeof i&&i)if(y.call(i)==S)for(r=i.length;r--;)U(i,r,n);else v(i,function(e){U(i,e,n)});return n.call(e,t,i)};t.parse=function(e,t){var n,r;return P=0,B=""+e,n=F(H()),"$"!=H()&&z(),P=B=null,t&&y.call(t)==w?V((r={},r[""]=n,r),"",t):n}}}return t.runInContext=o,t}var s=n(458),a={function:!0,object:!0},c=a[typeof t]&&t&&!t.nodeType&&t,l=a[typeof window]&&window||this,u=c&&a[typeof e]&&e&&!e.nodeType&&"object"==typeof i&&i;if(!u||u.global!==u&&u.window!==u&&u.self!==u||(l=u),c&&!s)o(l,c);else{var f=l.JSON,d=l.JSON3,p=!1,h=o(l,l.JSON3={noConflict:function(){return p||(p=!0,l.JSON=f,l.JSON3=d,f=d=null),h}});l.JSON={parse:h.parse,stringify:h.stringify}}s&&(r=function(){return h}.call(t,n,t,e),!(void 0!==r&&(e.exports=r)))}).call(this)}).call(t,n(457)(e),function(){return this}())},457:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},458:function(e,t){(function(t){e.exports=t}).call(t,{})},459:function(e,t){function n(e){if(e)return r(e)}function r(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){r.off(e,n),t.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks[e];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},460:function(e,t,n){(function(e){var r=n(461),i=n(462);t.deconstructPacket=function(e){function t(e){if(!e)return e;if(i(e)){var o={_placeholder:!0,num:n.length};return n.push(e),o}if(r(e)){for(var s=new Array(e.length),a=0;a<e.length;a++)s[a]=t(e[a]);return s}if("object"==typeof e&&!(e instanceof Date)){var s={};for(var c in e)s[c]=t(e[c]);return s}return e}var n=[],o=e.data,s=e;return s.data=t(o),s.attachments=n.length,{packet:s,buffers:n}},t.reconstructPacket=function(e,t){function n(e){if(e&&e._placeholder){var i=t[e.num];return i}if(r(e)){for(var o=0;o<e.length;o++)e[o]=n(e[o]);return e}if(e&&"object"==typeof e){for(var s in e)e[s]=n(e[s]);return e}return e}return e.data=n(e.data),e.attachments=void 0,e},t.removeBlobs=function(t,n){function o(t,c,l){if(!t)return t;if(e.Blob&&t instanceof Blob||e.File&&t instanceof File){s++;var u=new FileReader;u.onload=function(){l?l[c]=this.result:a=this.result,--s||n(a)},u.readAsArrayBuffer(t)}else if(r(t))for(var f=0;f<t.length;f++)o(t[f],f,t);else if(t&&"object"==typeof t&&!i(t))for(var d in t)o(t[d],d,t)}var s=0,a=t;o(a),s||n(a)}}).call(t,function(){return this}())},461:function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},462:function(e,t){(function(t){function n(e){return t.Buffer&&t.Buffer.isBuffer(e)||t.ArrayBuffer&&e instanceof ArrayBuffer}e.exports=n}).call(t,function(){return this}())},463:function(e,t,n){function r(e,t){return this instanceof r?(e&&"object"==typeof e&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new d({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[],this.encoder=new a.Encoder,this.decoder=new a.Decoder,this.autoConnect=t.autoConnect!==!1,void(this.autoConnect&&this.open())):new r(e,t)}var i=n(464),o=n(493),s=n(494),a=n(452),c=n(496),l=n(497),u=n(449)("socket.io-client:manager"),f=n(491),d=n(498),p=Object.prototype.hasOwnProperty;e.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)p.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},r.prototype.updateSocketIds=function(){for(var e in this.nsps)p.call(this.nsps,e)&&(this.nsps[e].id=this.engine.id)},s(r.prototype),r.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},r.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},r.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},r.prototype.open=r.prototype.connect=function(e,t){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=i(this.uri,this.opts);var n=this.engine,r=this;this.readyState="opening",this.skipReconnect=!1;var o=c(n,"open",function(){r.onopen(),e&&e()}),s=c(n,"error",function(t){if(u("connect_error"),r.cleanup(),r.readyState="closed",r.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else r.maybeReconnectOnOpen()});if(!1!==this._timeout){var a=this._timeout;u("connect attempt will timeout after %d",a);var l=setTimeout(function(){u("connect attempt timed out after %d",a),o.destroy(),n.close(),n.emit("error","timeout"),r.emitAll("connect_timeout",a)},a);this.subs.push({destroy:function(){clearTimeout(l)}})}return this.subs.push(o),this.subs.push(s),this},r.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(c(e,"data",l(this,"ondata"))),this.subs.push(c(e,"ping",l(this,"onping"))),this.subs.push(c(e,"pong",l(this,"onpong"))),this.subs.push(c(e,"error",l(this,"onerror"))),this.subs.push(c(e,"close",l(this,"onclose"))),this.subs.push(c(this.decoder,"decoded",l(this,"ondecoded")))},r.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},r.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},r.prototype.ondata=function(e){this.decoder.add(e)},r.prototype.ondecoded=function(e){this.emit("packet",e)},r.prototype.onerror=function(e){u("error",e),this.emitAll("error",e)},r.prototype.socket=function(e,t){function n(){~f(i.connecting,r)||i.connecting.push(r)}var r=this.nsps[e];if(!r){r=new o(this,e,t),this.nsps[e]=r;var i=this;r.on("connecting",n),r.on("connect",function(){r.id=i.engine.id}),this.autoConnect&&n()}return r},r.prototype.destroy=function(e){var t=f(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},r.prototype.packet=function(e){u("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},r.prototype.cleanup=function(){u("cleanup");for(var e=this.subs.length,t=0;t<e;t++){var n=this.subs.shift();n.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){u("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(e){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();u("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout(function(){e.skipReconnect||(u("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(u("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(u("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},464:function(e,t,n){e.exports=n(465)},465:function(e,t,n){e.exports=n(466),e.exports.parser=n(473)},466:function(e,t,n){(function(t){function r(e,n){if(!(this instanceof r))return new r(e,n);n=n||{},e&&"object"==typeof e&&(n=e,e=null),e?(e=u(e),n.hostname=e.host,n.secure="https"===e.protocol||"wss"===e.protocol,n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=u(n.host).host),this.secure=null!=n.secure?n.secure:t.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(t.location?location.hostname:"localhost"),this.port=n.port||(t.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=d.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate&&(n.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized?null:n.rejectUnauthorized,this.forceNode=!!n.forceNode;var i="object"==typeof t&&t;i.global===i&&(n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),n.localAddress&&(this.localAddress=n.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function i(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var o=n(467),s=n(482),a=n(486)("engine.io-client:socket"),c=n(491),l=n(473),u=n(448),f=n(492),d=n(483);e.exports=r,r.priorWebsocketSuccess=!1,s(r.prototype),r.protocol=l.protocol,r.Socket=r,r.Transport=n(472),r.transports=n(467),r.parser=n(473),r.prototype.createTransport=function(e){a('creating transport "%s"',e);var t=i(this.query);t.EIO=l.protocol,t.transport=e,this.id&&(t.sid=this.id);var n=new o[e]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:t,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized,perMessageDeflate:this.perMessageDeflate,extraHeaders:this.extraHeaders,forceNode:this.forceNode,localAddress:this.localAddress});return n},r.prototype.open=function(){var e;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},r.prototype.setTransport=function(e){a("setting transport %s",e.name);var t=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},r.prototype.probe=function(e){function t(){if(d.onlyBinaryUpgrades){var t=!this.supportsBinary&&d.transport.supportsBinary;f=f||t}f||(a('probe transport "%s" opened',e),u.send([{type:"ping",data:"probe"}]),u.once("packet",function(t){if(!f)if("pong"===t.type&&"probe"===t.data){if(a('probe transport "%s" pong',e),d.upgrading=!0,d.emit("upgrading",u),!u)return;r.priorWebsocketSuccess="websocket"===u.name,a('pausing current transport "%s"',d.transport.name),d.transport.pause(function(){f||"closed"!==d.readyState&&(a("changing transport and sending upgrade packet"),l(),d.setTransport(u),u.send([{type:"upgrade"}]),d.emit("upgrade",u),u=null,d.upgrading=!1,d.flush())})}else{a('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=u.name,d.emit("upgradeError",n)}}))}function n(){f||(f=!0,l(),u.close(),u=null)}function i(t){var r=new Error("probe error: "+t);r.transport=u.name,n(),a('probe transport "%s" failed because of error: %s',e,t),d.emit("upgradeError",r)}function o(){i("transport closed")}function s(){i("socket closed")}function c(e){u&&e.name!==u.name&&(a('"%s" works - aborting "%s"',e.name,u.name),n())}function l(){u.removeListener("open",t),u.removeListener("error",i),u.removeListener("close",o),d.removeListener("close",s),d.removeListener("upgrading",c)}a('probing transport "%s"',e);var u=this.createTransport(e,{probe:1}),f=!1,d=this;r.priorWebsocketSuccess=!1,u.once("open",t),u.once("error",i),u.once("close",o),this.once("close",s),this.once("upgrading",c),u.open()},r.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("