-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebida-service-client-bundle.js
More file actions
46 lines (46 loc) · 262 KB
/
webida-service-client-bundle.js
File metadata and controls
46 lines (46 loc) · 262 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
define(function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){var r,o;r=[n(2),n(22),n(8),n(7),n(6),n(20),n(10),n(42),n(43)],o=function(t,e,n,r,o,i,s,a,c){"use strict";var u={VERSION:"0.7",api:t.api,info:{get serverUrl(){return t.serverUrl},get serverUri(){return t.serverUri},get accessToken(){var t=n.getTokenManager();return t.accessToken},get sessionId(){var t=u.info.accessToken;if(t)return t.sessionId}},controller:e,authService:n,sessionService:r,workspaceService:o,AbstractCredentialProvider:i,Logger:s,auth:a,fs:c,conf:{get fsServer(){return t.serverUrl},get connServer(){return t.serverUrl},get fsApiBaseUrl(){return t.serverUrl+"/wfs"}},getPluginSettingsPath:function(t){return t(window.location.href.indexOf("legacy=")>0?"plugins/plugin-setting.json":"plugins/plugin-settings-desktop.json")}};return Object.freeze(u),window.__webida=u,u}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o,i;!function(s,a){o=[n(46)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(){this.basePath="https://localhost/api".replace(/\/+$/,""),this.authentications={"webida-simple-auth":{type:"apiKey","in":"header",name:"Authorization"}},this.defaultHeaders={},this.timeout=6e4};return e.prototype.paramToString=function(t){return void 0==t||null==t?"":t instanceof Date?t.toJSON():t.toString()},e.prototype.buildUrl=function(t,e){t.match(/^\//)||(t="/"+t);var n=this.basePath+t,r=this;return n=n.replace(/\{([\w-]+)\}/g,function(t,n){var o;return o=e.hasOwnProperty(n)?r.paramToString(e[n]):t,encodeURIComponent(o)})},e.prototype.isJsonMime=function(t){return Boolean(null!=t&&t.match(/^application\/json(;.*)?$/i))},e.prototype.jsonPreferredMime=function(t){for(var e=0;e<t.length;e++)if(this.isJsonMime(t[e]))return t[e];return t[0]},e.prototype.isFileParam=function(t){return!!("undefined"==typeof window&&n(19)&&t instanceof n(19).ReadStream)||("function"==typeof Buffer&&t instanceof Buffer||("function"==typeof Blob&&t instanceof Blob||"function"==typeof File&&t instanceof File))},e.prototype.normalizeParams=function(t){var e={};for(var n in t)if(t.hasOwnProperty(n)&&void 0!=t[n]&&null!=t[n]){var r=t[n];this.isFileParam(r)||Array.isArray(r)?e[n]=r:e[n]=this.paramToString(r)}return e},e.CollectionFormatEnum={CSV:",",SSV:" ",TSV:"\t",PIPES:"|",MULTI:"multi"},e.prototype.buildCollectionParam=function(t,e){if(null==t)return null;switch(e){case"csv":return t.map(this.paramToString).join(",");case"ssv":return t.map(this.paramToString).join(" ");case"tsv":return t.map(this.paramToString).join("\t");case"pipes":return t.map(this.paramToString).join("|");case"multi":return t.map(this.paramToString);default:throw new Error("Unknown collection format: "+e)}},e.prototype.applyAuthToRequest=function(t,e){var n=this;e.forEach(function(e){var r=n.authentications[e];switch(r.type){case"basic":(r.username||r.password)&&t.auth(r.username||"",r.password||"");break;case"apiKey":if(r.apiKey){var o={};r.apiKeyPrefix?o[r.name]=r.apiKeyPrefix+" "+r.apiKey:o[r.name]=r.apiKey,"header"===r["in"]?t.set(o):t.query(o)}break;case"oauth2":r.accessToken&&t.set({Authorization:"Bearer "+r.accessToken});break;default:throw new Error("Unknown authentication type: "+r.type)}})},e.prototype.deserialize=function(t,n){if(null==t||null==n)return null;var r=t.body;return null==r&&(r=t.text),e.convertToType(r,n)},e.prototype.callApi=function(e,n,r,o,i,s,a,c,u,l,f,p){var h=this,d=this.buildUrl(e,r),v=t(n,d);this.applyAuthToRequest(v,c),v.query(this.normalizeParams(o)),v.set(this.defaultHeaders).set(this.normalizeParams(i)),v.timeout(this.timeout);var g=this.jsonPreferredMime(u);if("multipart/form-data"!==g&&(g?v.type(g):v.header["Content-Type"]||v.type("application/json")),"application/x-www-form-urlencoded"===g)v.send(this.normalizeParams(s));else if("multipart/form-data"==g){var m=this.normalizeParams(s);for(var y in m)m.hasOwnProperty(y)&&(this.isFileParam(m[y])?v.attach(y,m[y]):v.field(y,m[y]))}else a&&v.send(a);var w=this.jsonPreferredMime(l);return w&&v.accept(w),f===File&&p.responseType&&v.responseType(p.responseType),v.end(function(t,e){if(p){var n=null;t||(n=h.deserialize(e,f)),p(t,n,e)}}),v},e.parseDate=function(t){return new Date(t.replace(/T/i," "))},e.convertToType=function(t,n){switch(n){case"Boolean":return Boolean(t);case"Integer":return parseInt(t,10);case"Number":return parseFloat(t);case"String":return String(t);case"Date":return this.parseDate(String(t));default:if(n===Object||n===File)return t;if("function"==typeof n)return"function"!=typeof n.constructFromObject?t:n.constructFromObject(t);if(Array.isArray(n)){var r=n[0];return t.map(function(t){return e.convertToType(t,r)})}if("object"==typeof n){var o,i;for(var s in n)if(n.hasOwnProperty(s)){o=s,i=n[s];break}var a={};for(var s in t)if(t.hasOwnProperty(s)){var c=e.convertToType(s,o),u=e.convertToType(t[s],i);a[c]=u}return a}return t}},e.constructFromObject=function(t,n,r){if(Array.isArray(t))for(var o=0;o<t.length;o++)t.hasOwnProperty(o)&&(n[o]=e.convertToType(t[o],r));else for(var i in t)t.hasOwnProperty(i)&&(n[i]=e.convertToType(t[i],r))},e.instance=new e,e})},function(t,e,n){var r,o;r=[n(15),n(23),n(10),n(11)],o=function(t,e,n,r){"use strict";var o=new n("webida-service-client"),i={inDesktopApp:window.__ELECTRON_BROWSER__||window.nrequire,serverUri:null,serverUrl:null,masterToken:null,workspaceId:null,isRemoteServer:!1,parseLocationArgs:function(e){i.serverUri=new t(e.serverUrl).normalize().resource("").path(""),i.serverUrl=i.serverUri.toString().slice(0,-1),i.workspaceId=e.workspaceId,i.masterToken=e.masterToken,i.isRemoteServer=!!e.isRemoteServer},detectServerUrl:function(t){var e="",n=t.normalize().resource("").path("");switch(n.protocol()){case"http":case"https":e=n.toString().slice(0,-1);break;default:var r="cannot detect server url from location "+t.toString();throw o.fatal(r),new Error(r)}return o.debug("detected server url "+e),e},getSimpleAuthApiKey:function(){return r.accessToken?r.accessToken.text:(o.debug("has no access token yet"),"not-a-token")}},s={get logger(){return o},get api(){return e},get serverUri(){return i.serverUri},get serverUrl(){return i.serverUrl},get masterToken(){return i.masterToken},get workspaceId(){return i.workspaceId},get inDesktopApp(){return i.inDesktopApp},get isRemoteServer(){return i.isRemoteServer},init:function(n){var r=new t(window.location.href),o=n||r.query(!0);o.serverUrl||(o.serverUrl=i.detectServerUrl(r)),i.parseLocationArgs(o),s.initApiClientInstance(e.ApiClient.instance)},initApiClientInstance:function(t){t.basePath=i.serverUrl+"/api";var e=t.authentications["webida-simple-auth"];Object.defineProperty(e,"apiKey",{enumerable:!0,get:i.getSimpleAuthApiKey}),o.debug("swagger api client instance initialized",t)}};return s}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t){var e=this;e.message=t};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("code")&&(r.code=t.convertToType(n.code,"String")),n.hasOwnProperty("message")&&(r.message=t.convertToType(n.message,"String")),n.hasOwnProperty("errno")&&(r.errno=t.convertToType(n.errno,"String")),n.hasOwnProperty("stack")&&(r.stack=t.convertToType(n.stack,"String"))),r},e.prototype.code=void 0,e.prototype.message=void 0,e.prototype.errno=void 0,e.prototype.stack=void 0,e})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(){};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("message")&&(r.message=t.convertToType(n.message,"String"))),r},e.prototype.message=void 0,e})},function(t,e,n){var r,o;r=[n(15)],o=function(t){"use strict";function e(e,n){if("string"!=typeof e||"String"!==e.constructor.name||!e)throw new Error("wfs url must a truthy string");var r="";if(0!==e.indexOf("wfs://")){var o=new t("file:///"+e);r=o.normalize().path(!0).slice(1)}else{var s=i.parseLegacyUrl(e);r=s.wfsId!==n?i.createWfsUrl(s):s.wfsPath}return r.length>0&&"/"===r[length-1]&&(r=r.slice(0,-1)),r}function n(t,e){var n=e||{includeSelf:!0};if("/"===t||""===t)return n.includeSelf?[t]:[];var r="/"===t[0],o=[],i=t.split("/"),s="";for(i.length>1&&""===i[i.length-1]&&i.pop();i.length>=1;)n.includeSelf?(s=i.join("/"),i.pop()):(i.pop(),s=i.join("/")),s&&o.push(s);return n.includeRoot&&o.push(r?"/":""),o}function r(t,e){return t?"string"==typeof t||t instanceof String?Promise.resolve(t):new Promise(function(n,r){try{var o=new FileReader;o.onload=function(){n(o.result)},o.onerror=function(){r(o.error)},o.readAsText(t,e)}catch(i){r(i)}}):Promise.reject(new Error("invalid conversion input"))}function o(t){return function(){var e=t||"method",n=arguments[arguments.length-1],r=new Error(e+" is abstract");if("function"==typeof n)return n(r);throw r}}var i={createWfsUrl:function(e){var n=new t("").protocol("wfs").path(e.wfsId+"/"+e.wfsPath);return n.toString()},parseLegacyUrl:function(e){var n=new t(e),r=n.normalize().path(!0).split("/").slice(1),o=r[0];if(!o)throw new Error("no fsid part in wfs url"+e);var i=r.slice(1).join("/");if(!i||"/"===i)throw new Error("no path part in wfs url "+e);return{wfsId:o,wfsPath:i}}};return{normalizePath:e,getAncestors:n,blobToStringAsync:r,abstractify:o}}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(2),n(21),n(7),n(39),n(40)],o=function(t,e,n,r,o){"use strict";var i=t.logger.child("workspace-service"),s=new t.api.WorkspaceApi,a=6e5,c={workspace:null,mount:null,cache:null,cacheClienerTimer:null,createCache:function(){if(e.unavailable)return i.debug("caching is not supported for local storage, in this browser"),Promise.resolve(null);if(t.inDesktopApp&&!t.isRemoteServer)return i.debug("no need to cache wfs for local access"),Promise.resolve(null);var r=c.workspace,s=new o(r,n.getEventSource());return s.init().then(function(){return i.debug("cache created"),s})["catch"](function(t){return i.error("cache init error",t),null})},needCaching:function(){return!t.inDesktopApp||t.isRemoteServer},startCacheCleaner:function(){if(c.cache&&!c.cacheClienerTimer){var t=c.doCacheClean;c.cacheClenerTimer=window.setTimeout(t,a)}},doCacheClean:function(){c.cache&&c.cache.cleanOldItems()},stopCacheCleaner:function(){c.cacheClienerTimer&&(window.clearInterval(c.cacheClenerTimer),c.cacheClenerTimer=null)}},u={getCurrentWorkspace:function(){return c.workspace},getCacheDbManager:function(){return e},getFileSystemMount:function(){return c.mount},setCurrentWorkspace:function(t){c.workspace=t},start:function(){return t.workspaceId?new Promise(function(e,n){s.findWorkspaces(t.workspaceId,{},function(o,s){o?(i.error("service start failed",o),n(o)):s&&s.length>0?(c.workspace=s[0],c.mount=new r(c.workspace.id),c.createCache().then(function(t){c.cache=t,c.mount.cache=t,c.startCacheCleaner(),i.info("service start done"),e()})["catch"](function(t){n(t)})):(i.error("workspace not found "+t.workspaceId),n(o))})}):Promise.resolve()},stop:function(){return c.workspace||i.debug("service stopped already"),c.stopCacheCleaner(),c.workspace=null,c.mount=null,c.cache=null,i.info("service stop"),Promise.resolve(this)},openAsyncChannel:function(){throw new Error("not implemented yet")}};return u}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(2),n(34)],o=function(t,e){"use strict";var n=t.logger.child("session-service"),r={socketClient:null},o={getEventSource:function(){return r.socketClient},start:function(){return r.socketClient=new e,new Promise(function(t,e){function o(){n.info("service start done"),r.socketClient.removeAllListeners(),t()}function i(t){n.error("service start failed",t),r.socketClient.removeAllListeners(),e(t)}r.socketClient.once("connect",o),r.socketClient.once("connect_error",i),r.socketClient.connect()})},stop:function(){return r.socketClient?new Promise(function(t){var e=function(){r.socketClient.emit("disposed"),r.socketClient.removeAllListeners(),r.socketClient=null,n.info("service stop done"),t()};r.socketClient.once("disconnect",e)}):(n.debug("service stopped already"),Promise.resolve())}};return o}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(2),n(11)],o=function(t,e){"use strict";var n=t.logger.child("auth-service"),r="webida-service-client",o="bogus",i=5,s=new t.api.AuthApi,a={credentialProvider:null,getCredentialAsync:function(e){var n=new t.api.Credential(r,o);return t.masterToken?(n.masterToken=t.masterToken,Promise.resolve(n)):a.credentialProvider.getUserCredentialAsync(e).then(function(t){return n.loginPassword=t.loginPassword,n.loginId=t.loginId,delete n.masterToken,n})},loginAsync:function(t){var e=0;return new Promise(function(r,o){function c(t,u){if(e++,t)if(401===t.statusCode){if(!(e>i))return a.getCredentialAsync(t).then(function(t){s.login(t,c)})["catch"](function(t){n.error("cannot get login credential",t),o(t)});var l="too many failures "+e+"/"+i,t=new Error(l);n.error("gave up retry",t),o(t)}else n.error("login failed with unexpected error",e,t),o(t);else n.debug("login success",u),r(u)}s.login(t,c)})}},c={getTokenManager:function(){return e},createMasterTokenAsync:function(t){return new Promise(function(e,n){s.issueToken("MASTER",{workspaceId:t},function(t,r){t?n(t):e(r)})})},init:function(t){a.credentialProvider=t,e.on("lost",function(t){n.error("should login again",t)}),e.on("updated",function(t){n.debug("updated token",t)})},start:function(){return a.getCredentialAsync().then(function(t){return a.loginAsync(t)}).then(function(t){e.updateAccessToken(t),n.debug("service start done")})},stop:function(){return e.dispose(),n.debug("service stop done"),Promise.resolve()}};return c}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r;r=function(){"use strict";return{inherits:function(t,e,n){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,"object"==typeof n&&Object.keys(n).forEach(function(e){"constructor"!==e&&(t.prototype[e]=n[e])})},mixin:function(){for(var t,e={},n=0;n<arguments.length;n++){t=arguments[n];for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}return e}}}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))},function(t,e,n){var r,o;r=[],o=function(){"use strict";function t(e){this.name=e||"",this.logLevel=t.getLogLevel(this.name),this.count=0}var e={ALL:1,TRACE:5,DEBUG:10,INFO:20,WARN:30,ERROR:40,FATAL:50,OFF:Number.MAX_VALUE},n={1:"log",5:"trace",10:"log",20:"info",30:"warn",40:"error",50:"error"};t.prototype={debug:function(){this.log(e.DEBUG,arguments)},trace:function(){this.log(e.TRACE,arguments)},info:function(){this.log(e.INFO,arguments)},warn:function(){this.log(e.WARN,arguments)},error:function(){this.log(e.ERROR,arguments)},fatal:function(){this.log("fatal",arguments)},log:function(t,e){if(this.isEnabled(t)){var r=n[t];e=this.formatLog(e),console[r].apply(console,e)}},isEnabled:function(t){return t>=this.logLevel},child:function(e){var n;switch(typeof e){case"function":n=e.name||"";break;case"object":n="",t.nameProperties.some(function(t){if(e[t])return n=e[t],!0});break;case"string":n=e;break;default:throw new Error("invalid owner - should be string/object/constructor")}return new t(n?this.name+"/"+n:this.name)},getStackTrace:function(t){var e;try{throw new Error("")}catch(n){e=n.stack||""}return e=e.split("\n").map(function(t){return t.trim()}),e.splice("Error"===e[0]?t+2:t+1)},getTimestamp:function(t){function e(t,e){return Array(e-String(t).length+1).join("0")+t}var n=t||new Date,r=[n.getHours(),n.getMinutes(),n.getSeconds()];return r.map(function(t){return e(t,2)}).join(":")+"."+e(n.getMilliseconds(),3)},parseStackTraceLine:function(t){var e={fileName:"?",fileLine:"?",method:""},n=t.slice(t.lastIndexOf("/")+1),r=n.split(":");e.fileName=r[0],e.fileLine=r[1];var o=t.split(" ");if("at"==o[0]){var i=o[1];if(i.indexOf("://")>=0)e.method="";else{switch(i){case"new":i=o[2];break;case"Anonymous":i="";break;default:var s=i.split(".");s.length>1&&(i=s.pop())}e.method=i}}return e},formatLog:function(t){if(!Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);t=e}var r=this.count++,o=this.getTimestamp(),i="["+o+"] "+this.name+"["+r+"]";2===t.length&&"string"==typeof t[0]&&"%c"===t[0].substr(0,2)&&(i="%c"+i+" "+t[0].substr(2),[].shift.call(t));var s=this.getStackTrace(3),a=this.parseStackTraceLine(s[0]),c="<"+[a.fileName,a.fileLine,a.method].join(":")+">";return[].concat(i,t,c)}},t.LEVEL=e,t.nameProperties=["_id","id","_name","name"],t.config={defaultLogLevel:e.WARN,levels:{}},t.getLogLevel=function(e){for(var n,r=e.split("/"),o=r.length;o>0;o--)if(n=r.slice(0,o).join("/"),t.config.levels[n])return t.config.levels[n];return t.config.defaultLogLevel};try{var r=window.localStorage.getItem("webida-logger-config");r&&(t.config=JSON.parse(r))}catch(o){console.error("logger configuration loading error",o)}return t}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(23),n(14),n(9),n(10)],o=function(t,e,n,r){"use strict";function o(t){e.call(this),this._updateTimer=null,this.accessToken=null,t&&this.updateAccessToken(t)}var i=new r("webida-service-client/token-manager"),s=t.ApiClient.instance.timeout+3e4,a=5e3,c=new t.AuthApi;return n.inherits(o,e,{updateAccessToken:function(t){if(this.accessToken=t,this.accessToken){var e=this.getRemainingTTL();if(e<s)throw new Error("Token has too short expiration time "+e);this.emit("updated",this.accessToken),this._setUpdateTimer(e-s)}},_setUpdateTimer:function(t){null!==this._updateTimer&&(window.clearTimeout(this._updateTimer),this._updateTimer=null);var e=this.accessToken.expiresAt,n=this.getRemainingTTL();if(i.debug("token expires at "+e+" , ttl = "+n),n<t){var r=(new Date).getTime()+t;r=new Date(r);var o=new Error("cannot schedule next update time - time over : requested update time = "+r+" , expiration time = "+e);return i.debug(o),void this.emit("lost",o)}var s=new Date((new Date).getTime()+t);i.debug("next update will start after "+t+" msec ",s),this._updateTimer=window.setTimeout(this._doUpdate.bind(this),t)},_doUpdate:function(){i.debug("start updating tokens");var t=this;c.issueToken("ACCESS",{},function(e,n,r){if(e)i.debug("could not get new token ",e),e.timeout||503===r.status?(t.emit("retry",e),t._setUpdateTimer(a)):(i.debug("server refused to issue new token",e),t.emit("lost",e));else try{i.debug("new token arrived",n),t.updateAccessToken(n)}catch(o){i.debug("new token has serious error",o),t.emit("lost",o)}})},getRemainingTTL:function(){var t=this.accessToken.expiresAt.getTime(),e=(new Date).getTime();return t-e},dispose:function(){this._updateTimer&&(window.clearTimeout(this._updateTimer),this.accessToken=null)}}),new o}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[],o=function(){"use strict";function t(t,e,n){Object.defineProperty(this,"stats",{value:t,writable:!0,enumerable:!1,configurable:!1}),this.children=[],this.name=e,this._path=null,this.parent=n||null}return t.prototype={isRoot:function(){return!this.parent},isDetached:function(){return!this._path},detach:function(){this._path=null},get path(){return this.isRoot()?this._path||"/":this.parent._path+this.name},set path(t){if(this.isRoot()){if(!t||"/"===t)return;t.length>1&&"/"!==t[t.length-1]&&(t+="/"),"/"!==t[0]&&(t="/"+t),this._path=t}},get isFile(){return!this.isDirectory},get isDirectory(){return"DIRECTORY"===this.stats.type},hasChildren:function(){return this.children},getChildByName:function(t){var e=null;this.children.some(function(n){if(n.name===t)return e=n,!0})}},t.fromJson=function(e,n){var r=new t(e.stats,e.name,n);return r.children=e.children.map(function(e){var n=t.fromJson(e,r);return n}),r},t.clone=function e(n,r,o){var i=new t(new WfsStats(n.stats),n.name);return i.children=n.children.map(function(e){return t.clone(e,i)}),i.parent=r,o&&(e._path=n._path),i},t}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[],o=function(){"use strict";function t(t){this.size=t.size,this.mtime=t.mtime,this.birthtime=t.birthtime,this.mode=t.mode,this.nlink=t.nlink,this.type=t.type}return t.prorotype={get isFile(){return"FILE"===this.type},get isDirectory(){return"DIRECTORY"===this.type},get isBlockDevice(){return"BLOCK_DEVICE"===this.type},get isCharacterDevice(){return"CHARACTER_DEVICE"===this.type},get isSymbolicLink(){return"LINK"===this.type},get isFIFO(){return"FIFO"===this.type},get isSocket(){return"SOCKET"===this.type},getModeString:function(){for(var t=this.mode||0,e=[],n=2;n>=0;n--)e.push(t>>3*n&4?"r":"-"),e.push(t>>3*n&2?"w":"-"),e.push(t>>3*n&1?"x":"-");return t>>9&4&&(e[2]="x"===e[2]?"s":"S"),t>>9&2&&(e[5]="x"===e[5]?"s":"S"),t>>9&1&&(e[8]="x"===e[8]?"t":"T"),e.join("")}},t.createFakeStats=function(e,n){var r=new t({size:n.size||n.length||-1,mtime:e,birthtime:e,mode:0,nlink:0,type:"FILE"});return r},t}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){"use strict";function r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(){}var i=Object.prototype.hasOwnProperty,s="function"!=typeof Object.create&&"~";o.prototype._events=void 0,o.prototype.eventNames=function(){var t,e=this._events,n=[];if(!e)return n;for(t in e)i.call(e,t)&&n.push(s?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},o.prototype.listeners=function(t,e){var n=s?s+t:t,r=this._events&&this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},o.prototype.emit=function(t,e,n,r,o,i){var a=s?s+t:t;if(!this._events||!this._events[a])return!1;var c,u,l=this._events[a],f=arguments.length;if("function"==typeof l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,o),!0;case 6:return l.fn.call(l.context,e,n,r,o,i),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var p,h=l.length;for(u=0;u<h;u++)switch(l[u].once&&this.removeListener(t,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,e);break;case 3:l[u].fn.call(l[u].context,e,n);break;default:if(!c)for(p=1,c=new Array(f-1);p<f;p++)c[p-1]=arguments[p];l[u].fn.apply(l[u].context,c)}}return!0},o.prototype.on=function(t,e,n){var o=new r(e,n||this),i=s?s+t:t;return this._events||(this._events=s?{}:Object.create(null)),this._events[i]?this._events[i].fn?this._events[i]=[this._events[i],o]:this._events[i].push(o):this._events[i]=o,this},o.prototype.once=function(t,e,n){var o=new r(e,n||this,(!0)),i=s?s+t:t;return this._events||(this._events=s?{}:Object.create(null)),this._events[i]?this._events[i].fn?this._events[i]=[this._events[i],o]:this._events[i].push(o):this._events[i]=o,this},o.prototype.removeListener=function(t,e,n,r){var o=s?s+t:t;if(!this._events||!this._events[o])return this;var i=this._events[o],a=[];if(e)if(i.fn)(i.fn!==e||r&&!i.once||n&&i.context!==n)&&a.push(i);else for(var c=0,u=i.length;c<u;c++)(i[c].fn!==e||r&&!i[c].once||n&&i[c].context!==n)&&a.push(i[c]);return a.length?this._events[o]=1===a.length?a[0]:a:delete this._events[o],this},o.prototype.removeAllListeners=function(t){return this._events?(t?delete this._events[s?s+t:t]:this._events=s?{}:Object.create(null),this):this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prototype.setMaxListeners=function(){return this},o.prefixed=s,t.exports=o},function(t,e,n){/*!
* URI.js - Mutating URLs
*
* Version: 1.18.1
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/
!function(e,r){"use strict";t.exports=r(n(49),n(47),n(48))}(this,function(t,e,n,r){"use strict";function o(t,e){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof o))return n?r?new o(t,e):new o(t):new o;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}return this.href(t),void 0!==e?this.absoluteTo(e):this}function i(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function s(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function a(t){return"Array"===s(t)}function c(t,e){var n,r,o={};if("RegExp"===s(e))o=null;else if(a(e))for(n=0,r=e.length;n<r;n++)o[e[n]]=!0;else o[e]=!0;for(n=0,r=t.length;n<r;n++){var i=o&&void 0!==o[t[n]]||!o&&e.test(t[n]);i&&(t.splice(n,1),r--,n--)}return t}function u(t,e){var n,r;if(a(e)){for(n=0,r=e.length;n<r;n++)if(!u(t,e[n]))return!1;return!0}var o=s(e);for(n=0,r=t.length;n<r;n++)if("RegExp"===o){if("string"==typeof t[n]&&t[n].match(e))return!0}else if(t[n]===e)return!0;return!1}function l(t,e){if(!a(t)||!a(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function f(t){var e=/^\/+|\/+$/g;return t.replace(e,"")}function p(t){return escape(t)}function h(t){return encodeURIComponent(t).replace(/[!'()*]/g,p).replace(/\*/g,"%2A")}function d(t){return function(e,n){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!n),this)}}function v(t,e){return function(n,r){return void 0===n?this._parts[t]||"":(null!==n&&(n+="",n.charAt(0)===e&&(n=n.substring(1))),this._parts[t]=n,this.build(!r),this)}}var g=r&&r.URI;o.version="1.18.1";var m=o.prototype,y=Object.prototype.hasOwnProperty;o._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:o.duplicateQueryParameters,escapeQuerySpace:o.escapeQuerySpace}},o.duplicateQueryParameters=!1,o.escapeQuerySpace=!0,o.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,o.idn_expression=/[^a-z0-9\.-]/i,o.punycode_expression=/(xn--)/i,o.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,o.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,o.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/},o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return o.domAttributes[e]}},o.encode=h,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=h,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(t,e){var n=o.encode(t+"");return void 0===e&&(e=o.escapeQuerySpace),e?n.replace(/%20/g,"+"):n},o.decodeQuery=function(t,e){t+="",void 0===e&&(e=o.escapeQuerySpace);try{return o.decode(e?t.replace(/\+/g,"%20"):t)}catch(n){return t}};var w,b={encode:"encode",decode:"decode"},_=function(t,e){return function(n){try{return o[e](n+"").replace(o.characters[t][e].expression,function(n){return o.characters[t][e].map[n]})}catch(r){return n}}};for(w in b)o[w+"PathSegment"]=_("pathname",b[w]),o[w+"UrnPathSegment"]=_("urnpath",b[w]);var k=function(t,e,n){return function(r){var i;i=n?function(t){return o[e](o[n](t))}:o[e];for(var s=(r+"").split(t),a=0,c=s.length;a<c;a++)s[a]=i(s[a]);return s.join(t)}};o.decodePath=k("/","decodePathSegment"),o.decodeUrnPath=k(":","decodeUrnPathSegment"),o.recodePath=k("/","encodePathSegment","decode"),o.recodeUrnPath=k(":","encodeUrnPathSegment","decode"),o.encodeReserved=_("reserved","encode"),o.parse=function(t,e){var n;return e||(e={}),n=t.indexOf("#"),n>-1&&(e.fragment=t.substring(n+1)||null,t=t.substring(0,n)),n=t.indexOf("?"),n>-1&&(e.query=t.substring(n+1)||null,t=t.substring(0,n)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=o.parseAuthority(t,e)):(n=t.indexOf(":"),n>-1&&(e.protocol=t.substring(0,n)||null,e.protocol&&!e.protocol.match(o.protocol_expression)?e.protocol=void 0:"//"===t.substring(n+1,n+3)?(t=t.substring(n+3),t=o.parseAuthority(t,e)):(t=t.substring(n+1),e.urn=!0))),e.path=t,e},o.parseHost=function(t,e){t=t.replace(/\\/g,"/");var n,r,o=t.indexOf("/");if(o===-1&&(o=t.length),"["===t.charAt(0))n=t.indexOf("]"),e.hostname=t.substring(1,n)||null,e.port=t.substring(n+2,o)||null,"/"===e.port&&(e.port=null);else{var i=t.indexOf(":"),s=t.indexOf("/"),a=t.indexOf(":",i+1);a!==-1&&(s===-1||a<s)?(e.hostname=t.substring(0,o)||null,e.port=null):(r=t.substring(0,o).split(":"),e.hostname=r[0]||null,e.port=r[1]||null)}return e.hostname&&"/"!==t.substring(o).charAt(0)&&(o++,t="/"+t),t.substring(o)||"/"},o.parseAuthority=function(t,e){return t=o.parseUserinfo(t,e),o.parseHost(t,e)},o.parseUserinfo=function(t,e){var n,r=t.indexOf("/"),i=t.lastIndexOf("@",r>-1?r:t.length-1);return i>-1&&(r===-1||i<r)?(n=t.substring(0,i).split(":"),e.username=n[0]?o.decode(n[0]):null,n.shift(),e.password=n[0]?o.decode(n.join(":")):null,t=t.substring(i+1)):(e.username=null,e.password=null),t},o.parseQuery=function(t,e){if(!t)return{};if(t=t.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!t)return{};for(var n,r,i,s={},a=t.split("&"),c=a.length,u=0;u<c;u++)n=a[u].split("="),r=o.decodeQuery(n.shift(),e),i=n.length?o.decodeQuery(n.join("="),e):null,y.call(s,r)?("string"!=typeof s[r]&&null!==s[r]||(s[r]=[s[r]]),s[r].push(i)):s[r]=i;return s},o.build=function(t){var e="";return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//"),e+=o.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&"string"==typeof t.hostname&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e},o.buildHost=function(t){var e="";return t.hostname?(e+=o.ip6_expression.test(t.hostname)?"["+t.hostname+"]":t.hostname,t.port&&(e+=":"+t.port),e):""},o.buildAuthority=function(t){return o.buildUserinfo(t)+o.buildHost(t)},o.buildUserinfo=function(t){var e="";return t.username&&(e+=o.encode(t.username)),t.password&&(e+=":"+o.encode(t.password)),e&&(e+="@"),e},o.buildQuery=function(t,e,n){var r,i,s,c,u="";for(i in t)if(y.call(t,i)&&i)if(a(t[i]))for(r={},s=0,c=t[i].length;s<c;s++)void 0!==t[i][s]&&void 0===r[t[i][s]+""]&&(u+="&"+o.buildQueryParameter(i,t[i][s],n),e!==!0&&(r[t[i][s]+""]=!0));else void 0!==t[i]&&(u+="&"+o.buildQueryParameter(i,t[i],n));return u.substring(1)},o.buildQueryParameter=function(t,e,n){return o.encodeQuery(t,n)+(null!==e?"="+o.encodeQuery(e,n):"")},o.addQuery=function(t,e,n){if("object"==typeof e)for(var r in e)y.call(e,r)&&o.addQuery(t,r,e[r]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=n);"string"==typeof t[e]&&(t[e]=[t[e]]),a(n)||(n=[n]),t[e]=(t[e]||[]).concat(n)}},o.removeQuery=function(t,e,n){var r,i,u;if(a(e))for(r=0,i=e.length;r<i;r++)t[e[r]]=void 0;else if("RegExp"===s(e))for(u in t)e.test(u)&&(t[u]=void 0);else if("object"==typeof e)for(u in e)y.call(e,u)&&o.removeQuery(t,u,e[u]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==n?"RegExp"===s(n)?!a(t[e])&&n.test(t[e])?t[e]=void 0:t[e]=c(t[e],n):t[e]!==String(n)||a(n)&&1!==n.length?a(t[e])&&(t[e]=c(t[e],n)):t[e]=void 0:t[e]=void 0}},o.hasQuery=function(t,e,n,r){switch(s(e)){case"String":break;case"RegExp":for(var i in t)if(y.call(t,i)&&e.test(i)&&(void 0===n||o.hasQuery(t,i,n)))return!0;return!1;case"Object":for(var c in e)if(y.call(e,c)&&!o.hasQuery(t,c,e[c]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(s(n)){case"Undefined":return e in t;case"Boolean":var f=Boolean(a(t[e])?t[e].length:t[e]);return n===f;case"Function":return!!n(t[e],e,t);case"Array":if(!a(t[e]))return!1;var p=r?u:l;return p(t[e],n);case"RegExp":return a(t[e])?!!r&&u(t[e],n):Boolean(t[e]&&t[e].match(n));case"Number":n=String(n);case"String":return a(t[e])?!!r&&u(t[e],n):t[e]===n;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},o.joinPaths=function(){for(var t=[],e=[],n=0,r=0;r<arguments.length;r++){var i=new o(arguments[r]);t.push(i);for(var s=i.segment(),a=0;a<s.length;a++)"string"==typeof s[a]&&e.push(s[a]),s[a]&&n++}if(!e.length||!n)return new o("");var c=new o("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||c.path("/"+c.path()),c.normalize()},o.commonPath=function(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n++)if(t.charAt(n)!==e.charAt(n)){n--;break}return n<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(n)&&"/"===e.charAt(n)||(n=t.substring(0,n).lastIndexOf("/")),t.substring(0,n+1))},o.withinString=function(t,e,n){n||(n={});var r=n.start||o.findUri.start,i=n.end||o.findUri.end,s=n.trim||o.findUri.trim,a=/[a-z0-9-]=["']?$/i;for(r.lastIndex=0;;){var c=r.exec(t);if(!c)break;var u=c.index;if(n.ignoreHtml){var l=t.slice(Math.max(u-3,0),u);if(l&&a.test(l))continue}var f=u+t.slice(u).search(i),p=t.slice(u,f).replace(s,"");if(!n.ignore||!n.ignore.test(p)){f=u+p.length;var h=e(p,u,f,t);t=t.slice(0,u)+h+t.slice(f),r.lastIndex=u+h.length}}return r.lastIndex=0,t},o.ensureValidHostname=function(e){if(e.match(o.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(t.toASCII(e).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]')}},o.noConflict=function(t){if(t){var e={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(e.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(e.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=r.SecondLevelDomains.noConflict()),e}return r.URI===this&&(r.URI=g),this},m.build=function(t){return t===!0?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},m.clone=function(){return new o(this)},m.valueOf=m.toString=function(){return this.build(!1)._string},m.protocol=d("protocol"),m.username=d("username"),m.password=d("password"),m.hostname=d("hostname"),m.port=d("port"),m.query=v("query","?"),m.fragment=v("fragment","#"),m.search=function(t,e){var n=this.query(t,e);return"string"==typeof n&&n.length?"?"+n:n},m.hash=function(t,e){var n=this.fragment(t,e);return"string"==typeof n&&n.length?"#"+n:n},m.pathname=function(t,e){if(void 0===t||t===!0){var n=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?o.decodeUrnPath:o.decodePath)(n):n}return this._parts.urn?this._parts.path=t?o.recodeUrnPath(t):"":this._parts.path=t?o.recodePath(t):"/",this.build(!e),this},m.path=m.pathname,m.href=function(t,e){var n;if(void 0===t)return this.toString();this._string="",this._parts=o._parts();var r=t instanceof o,i="object"==typeof t&&(t.hostname||t.path||t.pathname);if(t.nodeName){var s=o.getDomAttribute(t);t=t[s]||"",i=!1}if(!r&&i&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=o.parse(String(t),this._parts);else{if(!r&&!i)throw new TypeError("invalid input");var a=r?t._parts:t;for(n in a)y.call(this._parts,n)&&(this._parts[n]=a[n])}return this.build(!e),this},m.is=function(t){var e=!1,r=!1,i=!1,s=!1,a=!1,c=!1,u=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,r=o.ip4_expression.test(this._parts.hostname),i=o.ip6_expression.test(this._parts.hostname),e=r||i,s=!e,a=s&&n&&n.has(this._parts.hostname),c=s&&o.idn_expression.test(this._parts.hostname),u=s&&o.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return s;case"sld":return a;case"ip":return e;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return i;case"idn":return c;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return u}return null};var x=m.protocol,A=m.port,T=m.hostname;m.protocol=function(t,e){if(void 0!==t&&t&&(t=t.replace(/:(\/\/)?$/,""),!t.match(o.protocol_expression)))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,t,e)},m.scheme=m.protocol,m.port=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t&&(0===t&&(t=null),t&&(t+="",":"===t.charAt(0)&&(t=t.substring(1)),t.match(/[^0-9]/))))throw new TypeError('Port "'+t+'" contains characters other than [0-9]');return A.call(this,t,e)},m.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var n={},r=o.parseHost(t,n);if("/"!==r)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=n.hostname}return T.call(this,t,e)},m.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=this.protocol(),r=this.authority();return r?(n?n+"://":"")+this.authority():""}var i=o(t);return this.protocol(i.protocol()).authority(i.authority()).build(!e),this},m.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildHost(this._parts):"";var n=o.parseHost(t,this._parts);if("/"!==n)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},m.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildAuthority(this._parts):"";var n=o.parseAuthority(t,this._parts);if("/"!==n)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},m.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=o.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==t[t.length-1]&&(t+="@"),o.parseUserinfo(t,this._parts),this.build(!e),this},m.resource=function(t,e){var n;return void 0===t?this.path()+this.search()+this.hash():(n=o.parse(t),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!e),this)},m.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,s=this._parts.hostname.substring(0,r),a=new RegExp("^"+i(s));return t&&"."!==t.charAt(t.length-1)&&(t+="."),t&&o.ensureValidHostname(t),this._parts.hostname=this._parts.hostname.replace(a,t),this.build(!e),this},m.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(e).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!t)throw new TypeError("cannot set domain empty");if(o.ensureValidHostname(t),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var s=new RegExp(i(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(s,t)}return this.build(!e),this},m.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(r+1);return e!==!0&&n&&n.list[o.toLowerCase()]?n.get(this._parts.hostname)||o:o}var s;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');s=new RegExp(i(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");s=new RegExp(i(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(s,t)}return this.build(!e),this},m.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||t===!0){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?o.decodePath(r):r}var s=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,s),c=new RegExp("^"+i(a));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=o.recodePath(t),this._parts.path=this._parts.path.replace(c,t),this.build(!e),this},m.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||t===!0){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return t?o.decodePathSegment(r):r}var s=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(s=!0);var a=new RegExp(i(this.filename())+"$");return t=o.recodePath(t),this._parts.path=this._parts.path.replace(a,t),s?this.normalizePath(e):this.build(!e),this},m.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||t===!0){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,s=this.filename(),a=s.lastIndexOf(".");return a===-1?"":(n=s.substring(a+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",t?o.decodePathSegment(r):r)}"."===t.charAt(0)&&(t=t.substring(1));var c,u=this.suffix();if(u)c=t?new RegExp(i(u)+"$"):new RegExp(i("."+u)+"$");else{if(!t)return this;this._parts.path+="."+o.recodePath(t)}return c&&(t=o.recodePath(t),this._parts.path=this._parts.path.replace(c,t)),this.build(!e),this},m.segment=function(t,e,n){var r=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),s=o.split(r);if(void 0!==t&&"number"!=typeof t&&(n=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(i&&s.shift(),t<0&&(t=Math.max(s.length+t,0)),void 0===e)return void 0===t?s:s[t];if(null===t||void 0===s[t])if(a(e)){s=[];for(var c=0,u=e.length;c<u;c++)(e[c].length||s.length&&s[s.length-1].length)&&(s.length&&!s[s.length-1].length&&s.pop(),s.push(f(e[c])))}else(e||"string"==typeof e)&&(e=f(e),""===s[s.length-1]?s[s.length-1]=e:s.push(e));else e?s[t]=f(e):s.splice(t,1);return i&&s.unshift(""),this.path(s.join(r),n)},m.segmentCoded=function(t,e,n){var r,i,s;if("number"!=typeof t&&(n=e,e=t,t=void 0),void 0===e){if(r=this.segment(t,e,n),a(r))for(i=0,s=r.length;i<s;i++)r[i]=o.decode(r[i]);else r=void 0!==r?o.decode(r):void 0;return r}if(a(e))for(i=0,s=e.length;i<s;i++)e[i]=o.encode(e[i]);else e="string"==typeof e||e instanceof String?o.encode(e):e;return this.segment(t,e,n)};var C=m.query;return m.query=function(t,e){if(t===!0)return o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace),r=t.call(this,n);return this._parts.query=o.buildQuery(r||n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this}return void 0!==t&&"string"!=typeof t?(this._parts.query=o.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):C.call(this,t,e)},m.setQuery=function(t,e,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)r[t]=void 0!==e?e:null;else{if("object"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var i in t)y.call(t,i)&&(r[i]=t[i])}return this._parts.query=o.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},m.addQuery=function(t,e,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.addQuery(r,t,void 0===e?null:e),this._parts.query=o.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},m.removeQuery=function(t,e,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.removeQuery(r,t,e),this._parts.query=o.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},m.hasQuery=function(t,e,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.hasQuery(r,t,e,n)},m.setSearch=m.setQuery,m.addSearch=m.addQuery,m.removeSearch=m.removeQuery,m.hasSearch=m.hasQuery,m.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},m.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this},m.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},m.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===o.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this},m.normalizePath=function(t){var e=this._parts.path;if(!e)return this;if(this._parts.urn)return this._parts.path=o.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;e=o.recodePath(e);var n,r,i,s="";for("/"!==e.charAt(0)&&(n=!0,e="/"+e),"/.."!==e.slice(-3)&&"/."!==e.slice(-2)||(e+="/"),e=e.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),n&&(s=e.substring(1).match(/^(\.\.\/)+/)||"",s&&(s=s[0]));;){if(r=e.search(/\/\.\.(\/|$)/),r===-1)break;0!==r?(i=e.substring(0,r).lastIndexOf("/"),i===-1&&(i=r),e=e.substring(0,i)+e.substring(r+3)):e=e.substring(3)}return n&&this.is("relative")&&(e=s+e.substring(1)),this._parts.path=e,this.build(!t),this},m.normalizePathname=m.normalizePath,m.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(o.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this},m.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this},m.normalizeSearch=m.normalizeQuery,m.normalizeHash=m.normalizeFragment,m.iso8859=function(){var t=o.encode,e=o.decode;o.encode=escape,o.decode=decodeURIComponent;try{this.normalize()}finally{o.encode=t,o.decode=e}return this},m.unicode=function(){var t=o.encode,e=o.decode;o.encode=h,o.decode=unescape;try{this.normalize()}finally{o.encode=t,o.decode=e}return this},m.readable=function(){var e=this.clone();e.username("").password("").normalize();var n="";if(e._parts.protocol&&(n+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(n+=t.toUnicode(e._parts.hostname),e._parts.port&&(n+=":"+e._parts.port)):n+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(n+="/"),n+=e.path(!0),e._parts.query){for(var r="",i=0,s=e._parts.query.split("&"),a=s.length;i<a;i++){var c=(s[i]||"").split("=");r+="&"+o.decodeQuery(c[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==c[1]&&(r+="="+o.decodeQuery(c[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}n+="?"+r.substring(1)}return n+=o.decodeQuery(e.hash(),!0)},m.absoluteTo=function(t){var e,n,r,i=this.clone(),s=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof o||(t=new o(t)),i._parts.protocol||(i._parts.protocol=t._parts.protocol),this._parts.hostname)return i;for(n=0;r=s[n];n++)i._parts[r]=t._parts[r];return i._parts.path?".."===i._parts.path.substring(-2)&&(i._parts.path+="/"):(i._parts.path=t._parts.path,i._parts.query||(i._parts.query=t._parts.query)),"/"!==i.path().charAt(0)&&(e=t.directory(),e=e?e:0===t.path().indexOf("/")?"/":"",i._parts.path=(e?e+"/":"")+i._parts.path,i.normalizePath()),i.build(),i},m.relativeTo=function(t){var e,n,r,i,s,a=this.clone().normalize();if(a._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new o(t).normalize(),e=a._parts,n=t._parts,i=a.path(),s=t.path(),"/"!==i.charAt(0))throw new Error("URI is already relative");if("/"!==s.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===n.protocol&&(e.protocol=null),e.username!==n.username||e.password!==n.password)return a.build();if(null!==e.protocol||null!==e.username||null!==e.password)return a.build();if(e.hostname!==n.hostname||e.port!==n.port)return a.build();if(e.hostname=null,e.port=null,i===s)return e.path="",a.build();if(r=o.commonPath(i,s),!r)return a.build();var c=n.path.substring(r.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return e.path=c+e.path.substring(r.length)||"./",a.build()},m.equals=function(t){var e,n,r,i=this.clone(),s=new o(t),c={},u={},f={};if(i.normalize(),s.normalize(),i.toString()===s.toString())return!0;if(e=i.query(),n=s.query(),i.query(""),s.query(""),i.toString()!==s.toString())return!1;if(e.length!==n.length)return!1;c=o.parseQuery(e,this._parts.escapeQuerySpace),u=o.parseQuery(n,this._parts.escapeQuerySpace);for(r in c)if(y.call(c,r)){if(a(c[r])){if(!l(c[r],u[r]))return!1}else if(c[r]!==u[r])return!1;f[r]=!0}for(r in u)if(y.call(u,r)&&!f[r])return!1;return!0},m.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this},m.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this},o})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1),n(16),n(17)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t,e,n){"use strict";var r=function(t,e,n){var r=this;r.name=t,r.stats=e,r.children=n};return r.constructFromObject=function(o,i){return o&&(i=i||new r,o.hasOwnProperty("name")&&(i.name=t.convertToType(o.name,"String")),o.hasOwnProperty("stats")&&(i.stats=n.constructFromObject(o.stats)),o.hasOwnProperty("children")&&(i.children=t.convertToType(o.children,[e]))),i},r.prototype.name=void 0,r.prototype.stats=void 0,r.prototype.children=void 0,r})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t,e,n,r,o,i){var s=this;s.type=t,s.birthtime=e,s.mtime=n,s.mode=r,s.size=o,s.nlink=i};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("type")&&(r.type=t.convertToType(n.type,"String")),n.hasOwnProperty("birthtime")&&(r.birthtime=t.convertToType(n.birthtime,"Date")),n.hasOwnProperty("mtime")&&(r.mtime=t.convertToType(n.mtime,"Date")),n.hasOwnProperty("mode")&&(r.mode=t.convertToType(n.mode,"Integer")),n.hasOwnProperty("size")&&(r.size=t.convertToType(n.size,"Integer")),n.hasOwnProperty("nlink")&&(r.nlink=t.convertToType(n.nlink,"Integer"))),r},e.prototype.type=void 0,e.prototype.birthtime=void 0,e.prototype.mtime=void 0,e.prototype.mode=void 0,e.prototype.size=void 0,e.prototype.nlink=void 0,e.TypeEnum={FILE:"FILE",DIRECTORY:"DIRECTORY",BLOCK_DEVICE:"BLOCK_DEVICE",CHARACTER_DEVICE:"CHARACTER_DEVICE",LINK:"LINK",FIFO:"FIFO",SOCKET:"SOCKET",DUMMY:"DUMMY"},e})},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){},function(t,e,n){var r,o;r=[n(2)],o=function(t){"use strict";function e(e){if(this.name=e||this.constructor.name,"AbstractCredentialProvider"===this.constructor.name)throw new TypeError("AbstractCredentialProvider is abstract class");this.logger=t.logger.child(this.name)}return e.prototype={getUserCredentialAsync:function(t){return this.logger.warn("getUserCredentialAsync is not implemented "),this.logger.debug("prev auth error",t),Promise.reject(new Error("not implemented"))}},e}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(2)],o=function(t){"use strict";function e(){return Promise.reject(new Error("local storage is not available"))}var n=t.logger.child("cache-db-manager"),r="webida-offline-cache-db",o=1,i="webida-offline-cache-",s="items",a="changes";if(!window.localStorage||!window.indexedDB)return n.error("cannot get localstore nore indexedDB factory from browser",window.localStorage,window.indexedDB),{unavailable:!0,catalog:{},open:e,clean:e};var c={catalog:null,loadCatalog:function(){var t=window.localStorage.getItem(r);return t?c.catalog=JSON.parse(t):(c.catalog={},c.saveCatalog()),c.catalog},saveCatalog:function(t){var e=t||c.catalog||{};window.localStorage.setItem(r,JSON.stringify(e))},getCacheDBName:function(t){return i+t},swear:function(t,e,r,o,i,s){t.onerror=function(o){s&&n.error(e+" "+r+" error",o),"function"==typeof i&&i(t.error)},t.onsuccess=function(i){s&&n.debug(e+" "+r+" success",i),"function"==typeof o&&o(t.result)},s&&(t.onblocked=function(t){n.debug(e+" "+r+" blocked",t),"function"==typeof i&&i(new Error(r+" request "+e+" is blocked"))})},createSchema:function(t,e){var r=t.createObjectStore("items",{keyPath:"wfsPath"});r.createIndex("timestamp","timestamp",{unique:!1});var o=t.createObjectStore("changes",{
keyPath:"wfsPath"});o.createIndex("timestamp","timestamp",{unique:!1}),n.info("created cache db schema for "+e)},upgradeSchema:function(t,e,n,r){if(r!==o)throw new Error("invalid db version "+r+" to "+e)},openDB:function(t){return new Promise(function(e,n){var r=c.getCacheDBName(t),i=window.indexedDB.open(r,o);i.onupgradeneeded=function(t){var e=t.target.result;t.oldVersion?c.upgradeSchema(e,r,t.oldVersion,t.newVersion):c.createSchema(e,r)},c.swear(i,r,"open",e,n,!0)})},removeDB:function(t){var e=c.getCacheDBName(t);return new Promise(function(t,n){var r=window.indexedDB.deleteDatabase(e);c.swear(r,e,"deleteDatabase",t,n,!0)})}},u={open:function(t){return c.openDB(t).then(function(e){var n=c.getCacheDBName(t);return c.catalog[n]||(c.catalog[n]=o,c.saveCatalog()),e})},clean:function(t){var e=[];return t.forEach(function(t){var n=c.getCacheDBName(t);e.push(c.removeDB(t).then(function(){c.catalog[n]&&(delete c.catalog[n],c.saveCatalog())}))}),Promise.all(e)},utils:{swear:function(){return c.swear.apply(null,arguments)},begin:function(t,e,r,o){var i=t.transaction(t.objectStoreNames,"readwrite");return i.__name=e,"function"==typeof r&&(i.oncomplete=function(t){n.debug(e+" complete",t),r()}),"function"==typeof o&&(i.onerror=function(t){n.debug(e+" error",t),o(i.error)}),i}},constants:{ITEM_STORE_NAME:s,CHANGE_STORE_NAME:a}};return c.loadCatalog(),window.addEventListener("storage",function(t){if(t.storageArea===window.localStorage){var e=t.newValue;n.debug("DB catalog change",t),c.catalog=e?JSON.parse(e):{}}}),u}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(14),n(2),n(8),n(7),n(6)],o=function(t,e,n,r,o){"use strict";var i=e.logger.child("controller"),s={emitter:new t,promiseSeries:function(t){return t.reduce(function(t,e){return t.then(e)},Promise.resolve())},issueMasterTokenAsync:function(t,e){n.issueToken(t)}},a={getLifecycleEventSource:function(){return s.emitter},init:function(t,r){try{e.init(r),n.init(t),i.info("webida-service-client init complete"),s.emitter.emit("init")}catch(o){throw i.error("webida-service-client init failed",o),s.emitter.emit("init-error",o),o}},start:function(){return n.start().then(r.start).then(o.start).then(function(){i.info("webida-service-client start complete"),s.emitter.emit("start")})["catch"](function(t){throw i.error("webida-service-client start failed",t),s.emitter.emit("start-error",t),t})},stop:function(){return o.stop().then(r.stop).then(o.stop).then(function(){i.info("webida-service-client stop complete"),s.emitter.emit("stop")})["catch"](function(t){throw i.error("webida-service-client stop failed",t),s.emitter.emit("stop-error",t),t})},restart:function(t){var r;return n.createMasterTokenAsync(t).then(function(t){return r=t.text,a.stop()}).then(function(){return e.init({serverUrl:e.serverUrl,workspaceId:t,masterToken:r,isRemoteServer:e.isRemoteServer}),a.start()}).then(function(){i.info("webida-service-client restart complete"),s.emitter.emit("restart")})["catch"](function(t){throw i.error("webida-service-client restart failed",t),s.emitter.emit("restart-error"),t})}};return a}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o,i;!function(s){o=[n(1),n(24),n(25),n(26),n(16),n(27),n(28),n(56),n(29),n(3),n(4),n(30),n(17),n(31),n(32),n(33),n(50),n(51),n(52),n(53),n(54),n(55)],r=s,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(function(t,e,n,r,o,i,s,a,c,u,l,f,p,h,d,v,g,m,y,w,b,_){"use strict";var k={ApiClient:t,Alias:e,ChildProcess:n,Credential:r,DirEntry:o,Execution:i,ExecutionResult:s,Match:a,RemoteAccess:c,RestError:u,RestOK:l,Session:f,Stats:p,Token:h,User:d,Workspace:v,AliasApi:g,AuthApi:m,RemotesApi:y,SessionApi:w,WfsApi:b,WorkspaceApi:_};return k})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t,e,n){var r=this;r.id=t,r.workspaceId=e,r.sourcePath=n};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("id")&&(r.id=t.convertToType(n.id,"String")),n.hasOwnProperty("workspaceId")&&(r.workspaceId=t.convertToType(n.workspaceId,"String")),n.hasOwnProperty("sourcePath")&&(r.sourcePath=t.convertToType(n.sourcePath,"String"))),r},e.prototype.id=void 0,e.prototype.workspaceId=void 0,e.prototype.sourcePath=void 0,e})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t,e,n,r,o,i,s){var a=this;a.pid=t,a.command=e,a.args=n,a.execId=r,a.state=o,a.foreground=i,a.startedAt=s};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("pid")&&(r.pid=t.convertToType(n.pid,"Integer")),n.hasOwnProperty("command")&&(r.command=t.convertToType(n.command,"String")),n.hasOwnProperty("args")&&(r.args=t.convertToType(n.args,["String"])),n.hasOwnProperty("execId")&&(r.execId=t.convertToType(n.execId,"String")),n.hasOwnProperty("state")&&(r.state=t.convertToType(n.state,"String")),n.hasOwnProperty("foreground")&&(r.foreground=t.convertToType(n.foreground,"Boolean")),n.hasOwnProperty("startedAt")&&(r.startedAt=t.convertToType(n.startedAt,"Date")),n.hasOwnProperty("exitCode")&&(r.exitCode=t.convertToType(n.exitCode,"Integer")),n.hasOwnProperty("exitSignal")&&(r.exitSignal=t.convertToType(n.exitSignal,"String"))),r},e.prototype.pid=void 0,e.prototype.command=void 0,e.prototype.args=void 0,e.prototype.execId=void 0,e.prototype.state=void 0,e.prototype.foreground=void 0,e.prototype.startedAt=void 0,e.prototype.exitCode=void 0,e.prototype.exitSignal=void 0,e.StateEnum={CREATED:"CREATED",WORKING:"WORKING",KILLING:"KILLING",EXITED:"EXITED"},e})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t,e){var n=this;n.loginId=t,n.loginPassword=e};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("loginId")&&(r.loginId=t.convertToType(n.loginId,"String")),n.hasOwnProperty("loginPassword")&&(r.loginPassword=t.convertToType(n.loginPassword,"String")),n.hasOwnProperty("masterToken")&&(r.masterToken=t.convertToType(n.masterToken,"String"))),r},e.prototype.loginId=void 0,e.prototype.loginPassword=void 0,e.prototype.masterToken=void 0,e})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t,e){var n=this;n.command=t,n.args=e};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("id")&&(r.id=t.convertToType(n.id,"String")),n.hasOwnProperty("command")&&(r.command=t.convertToType(n.command,"String")),n.hasOwnProperty("args")&&(r.args=t.convertToType(n.args,["String"])),n.hasOwnProperty("cwd")&&(r.cwd=t.convertToType(n.cwd,"String")),n.hasOwnProperty("timeout")&&(r.timeout=t.convertToType(n.timeout,"Integer")),n.hasOwnProperty("maxBuffer")&&(r.maxBuffer=t.convertToType(n.maxBuffer,"Integer"))),r},e.prototype.id=void 0,e.prototype.command=void 0,e.prototype.args=void 0,e.prototype.cwd=void 0,e.prototype.timeout=void 0,e.prototype.maxBuffer=void 0,e})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t,e){var n=this;n.stdout=t,n.stderr=e};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("error")&&(r.error=t.convertToType(n.error,"String")),n.hasOwnProperty("stdout")&&(r.stdout=t.convertToType(n.stdout,"String")),n.hasOwnProperty("stderr")&&(r.stderr=t.convertToType(n.stderr,"String"))),r},e.prototype.error=void 0,e.prototype.stdout=void 0,e.prototype.stderr=void 0,e})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t,e,n,r){var o=this;o.name=t,o.serverUrl=e,o.workspaceId=n,o.masterToken=r};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("name")&&(r.name=t.convertToType(n.name,"String")),n.hasOwnProperty("serverUrl")&&(r.serverUrl=t.convertToType(n.serverUrl,"String")),n.hasOwnProperty("workspaceId")&&(r.workspaceId=t.convertToType(n.workspaceId,"String")),n.hasOwnProperty("workspacePath")&&(r.workspacePath=t.convertToType(n.workspacePath,"String")),n.hasOwnProperty("masterToken")&&(r.masterToken=t.convertToType(n.masterToken,"String"))),r},e.prototype.name=void 0,e.prototype.serverUrl=void 0,e.prototype.workspaceId=void 0,e.prototype.workspacePath=void 0,e.prototype.masterToken=void 0,e})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t,e,n,r,o){var i=this;i.id=t,i.name=e,i.state=n,i.clientAddress=r,i.connectedAt=o};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("id")&&(r.id=t.convertToType(n.id,"String")),n.hasOwnProperty("name")&&(r.name=t.convertToType(n.name,"String")),n.hasOwnProperty("state")&&(r.state=t.convertToType(n.state,"String")),n.hasOwnProperty("workspaceId")&&(r.workspaceId=t.convertToType(n.workspaceId,"String")),n.hasOwnProperty("clientAddress")&&(r.clientAddress=t.convertToType(n.clientAddress,"String")),n.hasOwnProperty("connectedAt")&&(r.connectedAt=t.convertToType(n.connectedAt,"Date")),n.hasOwnProperty("willCloseAt")&&(r.willCloseAt=t.convertToType(n.willCloseAt,"Date"))),r},e.prototype.id=void 0,e.prototype.name=void 0,e.prototype.state=void 0,e.prototype.workspaceId=void 0,e.prototype.clientAddress=void 0,e.prototype.connectedAt=void 0,e.prototype.willCloseAt=void 0,e.StateEnum={NORMAL:"NORMAL",CLOSING:"CLOSING",TERMINATED:"TERMINATED"},e})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t,e,n,r){var o=this;o.text=t,o.tokenType=e,o.expiresAt=n,o.issuedAt=r};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("text")&&(r.text=t.convertToType(n.text,"String")),n.hasOwnProperty("tokenType")&&(r.tokenType=t.convertToType(n.tokenType,"String")),n.hasOwnProperty("expiresAt")&&(r.expiresAt=t.convertToType(n.expiresAt,"Date")),n.hasOwnProperty("issuedAt")&&(r.issuedAt=t.convertToType(n.issuedAt,"Date")),n.hasOwnProperty("sessionId")&&(r.sessionId=t.convertToType(n.sessionId,"String")),n.hasOwnProperty("workspaceId")&&(r.workspaceId=t.convertToType(n.workspaceId,"String"))),r},e.prototype.text=void 0,e.prototype.tokenType=void 0,e.prototype.expiresAt=void 0,e.prototype.issuedAt=void 0,e.prototype.sessionId=void 0,e.prototype.workspaceId=void 0,e.TokenTypeEnum={MASTER:"MASTER",ACCESS:"ACCESS"},e})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(){};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("id")&&(r.id=t.convertToType(n.id,"String")),n.hasOwnProperty("email")&&(r.email=t.convertToType(n.email,"String")),n.hasOwnProperty("name")&&(r.name=t.convertToType(n.name,"String"))),r},e.prototype.id=void 0,e.prototype.email=void 0,e.prototype.name=void 0,e})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t,e,n,r,o,i,s){var a=this;a.id=t,a.name=e,a.description=n,a.createdAt=r,a.workspacePath=o,a.excludedPaths=i,a.offlineCachePaths=s};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("id")&&(r.id=t.convertToType(n.id,"String")),n.hasOwnProperty("name")&&(r.name=t.convertToType(n.name,"String")),n.hasOwnProperty("description")&&(r.description=t.convertToType(n.description,"String")),n.hasOwnProperty("createdAt")&&(r.createdAt=t.convertToType(n.createdAt,"Date")),n.hasOwnProperty("accessedAt")&&(r.accessedAt=t.convertToType(n.accessedAt,"Date")),n.hasOwnProperty("workspacePath")&&(r.workspacePath=t.convertToType(n.workspacePath,"String")),n.hasOwnProperty("ephemeral")&&(r.ephemeral=t.convertToType(n.ephemeral,"Boolean")),n.hasOwnProperty("excludedPaths")&&(r.excludedPaths=t.convertToType(n.excludedPaths,["String"])),n.hasOwnProperty("offlineCachePaths")&&(r.offlineCachePaths=t.convertToType(n.offlineCachePaths,["String"]))),r},e.prototype.id=void 0,e.prototype.name=void 0,e.prototype.description=void 0,e.prototype.createdAt=void 0,e.prototype.accessedAt=void 0,e.prototype.workspacePath=void 0,e.prototype.ephemeral=void 0,e.prototype.excludedPaths=void 0,e.prototype.offlineCachePaths=void 0,e})},function(t,e,n){var r,o;r=[n(15),n(14),n(44),n(45),n(9),n(2),n(11)],o=function(t,e,n,r,o,i,s){"use strict";function a(){e.call(this),this._connectOptions=u,this.socket=null,this.isConnected=!1,this.reconnectingCount=0,this.disconnectedWhen=(new Date).getTime()}var c=i.logger.child("SocketClient"),u={multiplex:!0,timeout:5e3,transports:["websocket"],reconnection:!0,reconnectionDelay:500,reconnectionDelayMax:3e3,reconnectionAttempts:20};return o.inherits(a,e,{connect:function(){this._connectOptions.query=this._buildConnectQueryString(),c.debug(this.constructor.name+" connecting to "+i.serverUrl,this._connectOptions),this.socket=r(i.serverUrl,this._connectOptions),this._registerDefaultEventHandlers()},disconnect:function(){this.socket.disconnect()},registerEventHandlers:function(t){var e=this;n.forEach(t,function(t,n){e.socket.on(n,t)})},calculateRecoveryTime:function(){var t=this._connectOptions;if(!t.reconnect)return{best:0,worst:0};var e=t.reconnectionAttempts,n=t.timeout,r=t.reconnectionDelay,o=t.reconnectionDealyMax,i=o/r,s=o*(e-(i+1)/2),a=s+e*n;return{best:s,worst:a}},_onConnect:function(t,e){var n={isTimeout:e,took:(new Date).getTime()-this.disconnectedWhen+"msec"},r=!1;return t?0===this.reconnectingCount&&(c.error(this.constructor.name+" connect error ",t,n),r=!0):(c.debug(this.constructor.name+" connected to server",n),r=!0),r},_onDisconnect:function(){return c.debug(this.constructor.name+" disconnected from server"),this.isConnected=!1,!0},_onReconnect:function(t,e){var n=(new Date).getTime()-this.disconnectedWhen,r={reconnectingCount:this.reconnectingCount,reconnectingFor:n+" msec"},o=!1,i=this.constructor.name;return t?e?(c.error(i+" LOST CONNECTION",t,r),o=!0,this.reconnectingCount=0):c.warn(i+" reconnecting attempt failed",t,r):e?(c.debug(i+" recovered connection ",r),o=!0):c.debug(i+" is trying to recover connection",r),o},_buildConnectQueryString:function(){var e=new t,r=n.defaults({},u.query);return r.token=s.accessToken.text,r.workspaceId=i.workspaceId,r.sessionId=s.accessToken.sessionId,e.query(r).query()},_registerDefaultEventHandlers:function(){var t=this,e=this.socket;e.on("connect",function(){t.isConnected=!0,t.reconnectingCount=0;var e=t._onConnect();e&&t.emit("connect")}),e.on("connect_error",function(e){var n=t._onConnect(e);n&&t.emit("connect_error",e)}),e.on("connect_timeout",function(e){var n=t._onConnect(e,!0);n&&t.emit("connect_timeout",e)}),e.on("reconnect_attempt",function(e){t.reconnectingCount=e,t._onReconnect(null,!1)}),e.on("reconnect_error",function(e){t._onReconnect(e,!1)}),e.on("reconnect",function(){t.isConnected=!0,t._onReconnect(null,!0),t.disconnectedWhen=0,t.reconnectingCount=0,t.emit("reconnect")}),e.on("reconnect_failed",function(e){e=e||new Error("too much retry - reached to limit"),t._onReconnect(e,!0),t.emit("reconnect_failed",e)}),e.on("disconnect",function(){t.disconnectedWhen=(new Date).getTime(),t.isConnected=!1,t._onDisconnect(),t.emit("disconnect")}),e.on("session.announcement",function(e){t.emit("session.announcement",e)}),e.on("session.closing",function(e){t.emit("session.closing",e)}),e.on("workspace.watcher",function(e){c.debug("session got workspace.watcher",arguments),t.emit("workspace.watcher",e)})}}),a}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(2),n(36),n(12),n(5)],o=function(t,e,n,r){"use strict";function o(t,e){this.dirs={},this.wfsId=t;var n=this;e.forEach(function(t){n.dirs[t]=null})}var i=t.logger.child("WfsDirForest"),s=new t.api.WfsApi;return o.prototype={build:function(){var t=this,e=[];return Object.keys(this.dirs).forEach(function(n){e.push(t.addTreeAsync(n))}),Promise.all(e)},getTree:function(t){return this.dirs[t]},addTreeAsync:function(t){var o=this;return new Promise(function(a,c){try{if(o.dirs[t])a(this.dirs[t]);else{var u=r.normalizePath(t);s.dirTree(o.wfsId,u,-1,function(r,s){if(r)i.error("adding tree "+t+" failed ",r),c(r);else{var u=n.fromJson(s);u.path=t,o.dirs[t]=new e(u),a(o.dirs[t])}})}}catch(l){i.error("adding tree "+t+" failed ",l),c(l)}})},removeTree:function(t){delete this.dirs[t]},findTree:function(t){var e=null,n=this.dirs;return Object.keys(n).some(function(r){if(0===t.indexOf(r))return e=n[r],!0}),e}},o}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(12)],o=function(t){"use strict";function e(e,n,r){this.rootEntry=n?t.clone(e,null,r):e}return e.prototype={getEntryByPath:function(t){if("string"!=typeof t)return null;var e="/"!==t[0]?"/"+t:t,n=e.split("/");this.rootEntry.name&&(n=n.slice(1));var r=this.rootEntry;if(r.name!==n[0])return null;for(var o=0;o<n.length&&(r&&o!==n.length-1);o++)r=r.getChildByName(n[o+1]);return r},walk:function n(t,e,r){var o=e||this.rootEntry;return r(e)&&!t[o.path]&&(t[o.path]=e),e.children.forEach(function(e){t[e.path]||n(t,e,r)}),t}},e}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(2),n(38),n(13),n(5)],o=function(t,e,n,r){"use strict";function o(t,e){this.wfsId=e,this.session=t,this.masks={},this.holders={},this.pollTimer=null,this.eventSequence=0,this._pollEventsBound=this._pollEvents.bind(this),this._onWatcherEventBound=this._onWatcherEvent.bind(this),t.on("workspace.watcher",this._onWatcherEventBound)}var i=t.logger.child("WfsEventGate"),s=2,a=100;return o.prototype={stopListening:function(){this.session&&(this.session.off("workspace.watcher",this._onWatcherEventBound),i.debug("stopped listening event on wfs "+this.wfsId))},maskEvents:function(t,e){var n=this.holders[t];if(n)throw n.maskedBy?new Error(t+" is locked by other api call "+n.maskedBy):new Error(t+" is locked by other processes in server");var r=this.masks[t];if(r)throw new Error(t+"is locked by other api call "+r.apiName);this.masks[t]={apiName:e,holders:[]}},unmaskEvents:function(t,e,n){var r=this.masks[t],o=this;if(e||(n=!1),r){var s=function(){r.holders.forEach(function(t){t.unmask(e,n)}),delete o.masks[t]};this.holders[t]?s():(i.debug("postponed unmasking for final events has arrived yet"),setTimeout(s,a))}},_findMask:function(t){var e=r.getAncestors(t,{includeSelf:!0}),n=this,o=null;return e.some(function(t){return o=n.masks[t],!!o}),o},_addNewHolder:function(t){var n=this._findMask(t),r=null;return n?(r=new e(this.wfsId,t,n.apiName),n.holders.push(r)):r=new e(this.wfsId,t),this.holders[t]=r,r},_onWatcherEvent:function(t){var e=t.wfsId,n=t.type;if(e===this.wfsId){if("start"===n||"stop"===n||"ready"===n)return void i.debug("ignores watcher state change events",t);if("error"===n)return void i.warn("server watcher has some error",t.error);var r=t.wfsPath,o=t.stats,s=this.holders[r];s||(s=this._addNewHolder(r)),this.eventSequence++,s.holdServerEvent(n,o,this.eventSequence),this.pollTimer||(this.eventSequence=0,this.pollTimer=setInterval(this._pollEventsBound,a))}},_fireEvents:function(t,e){var r=this;t.forEach(function(t){var e=t.stats?new n(t.stats):void 0;r.session.emit("workspace.wfs",r.wfsId,t.type,t.path,e)});var o=(new Date).getTime()-e;o>=a&&i.warn("polling takes too long time ",{polled:t.length,elapsedTime:o})},_pollEvents:function(){var t=(new Date).getTime(),e=[],n=this,r=Object.keys(this.holders);r.forEach(function(t){var r=n.holders[t];r.poll(s)&&(r.missingEventsBefore?e.push({path:r.path,type:"__refresh",sequence:0}):r.getWfsEvents().forEach(function(t){e.push(t)}),delete n.holders[r.path])}),e.length>0&&(e.sort(function(t,e){return t.sequence-e.sequence}),this._fireEvents(e,t)),r.length<=0&&(clearInterval(this.pollTimer),this.pollTimer=null)}},o}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(2)],o=function(t){"use strict";function e(t,e,n){this.events=[],this.path=e,this.wfsId=t,this.discardEvents=!1,this.shouldFlipEventType=!1,this.maskedBy=n,this.missingEventsBefore=0,this.pollCounter=0}var n=t.logger.child("WfsEventHolder");return e.prototype={get latest(){return this.events.length>0?this.events[this.events.length-1]:null},poll:function(t){return!this.maskedBy&&(this.pollCounter++,this.pollCounter>=t)&&(this.pollCounter=-9999,!0)},unmask:function(t,e){this.maskedBy&&(this.discardEvents=e,this.shouldFlipEventType=t,this.maskedBy=!1)},getWfsEvents:function(){var t=this;return this.discardEvents?[]:this.events.map(function(e){return{path:t.path,type:t.shouldFlipEventType?"_"+e.type:e.type,stats:e.stats,sequence:e.sequence}})},holdServerEvent:function(t,e,r){var o=this.latest,i={type:t,stats:e,sequence:r};if(!o)return void this.events.push(i);switch(o.type){case"addDir":this._holdAfterAddDir(o,i);break;case"unlinkDir":this._holdAfterUnlinkDir(o,i);break;case"add":this._holdAfterAdd(o,i);break;case"change":this._holdAfterChange(o,i);break;case"unlink":this._holdAfterUnlink(o,i);break;default:n.error("unknown event type detected on "+this.path,o)}this.pollCounter=0},_holdAfterAddDir:function(t,e){switch(e.type){case"unlinkDir":this.events.pop();break;case"addDir":case"add":case"change":case"unlink":this._markMissingEvents(t,e),this.events.push(e);break;default:n.error("new event has invalid type",e)}},_holdAfterUnlinkDir:function(t,e){switch(e.type){case"add":case"addDir":this.events.push(e);break;case"unlinkDir":case"change":case"unlink":this._markMissingEvents(t,e),this.events.push(e);break;default:n.error("new event has invalid type",e)}},_holdAfterAdd:function(t,e){switch(e.type){case"change":t.stats=e.stats;break;case"unlink":this.events.pop();break;case"add":case"addDir":case"unlinkDir":this._markMissingEvents(t,e),this.events.push(e);break;default:n.error("new event has invalid type",e)}},_holdAfterChange:function(t,e){switch(e.type){case"change":t.stats=e.stats;break;case"unlink":this.events.pop(),this.events.push(e);break;case"add":case"addDir":case"unlinkDir":this._markMissingEvents(t,e),this.events.push(e);break;default:n.error("new event has invalid type",e)}},_holdAfterUnlink:function(t,e){switch(e.type){case"add":t.type="change",t.stats=e.stats,t.sequence=e.sequence;break;case"addDir":this.events.push(e);break;case"change":case"unlink":case"unlinkDir":this._markMissingEvents(t,e),this.events.push(e);break;default:n.error("new event has invalid type",e)}},_markMissingEvents:function(t,e){n.warn(this.path+" has lost some events between latest and current event",t,e),this.missingEventsBefore||(this.missingEventsBefore=e.sequence)}},e}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(2),n(7),n(6),n(13),n(12),n(37),n(5)],o=function(t,e,n,r,o,i,s){"use strict";function a(t){var n=this,r=e.getEventSource();this.wfsId=t,this.eventGate=new i(r,t),r.on("wfsWatcher",function(t,e){n.eventGate&&n.wfsId===t&&"stop"===e&&(n.eventGate.stopListening(),n.eventGate=null)})}var c=t.logger.child("WfsMount"),u=new t.api.WfsApi,l={text:"text",blob:"blob",arraybuffer:"arraybuffer",json:"json"};return a.prototype={_normalizePath:function(t,e){try{return s.normalizePath(t,e?this.wfsId:void 0)}catch(n){console.error("legacy path seems to be invalid : "+t)}},_invokeCallback:function(t,e,n,r){try{e(n,r)}catch(o){c.warn("Callback of WfsMount#"+t+"() threw error",o)}},_maskEvents:function(t,e){this.eventGate&&this.eventGate.maskEvents(t,e)},_unmaskEvents:function(t,e,n){this.eventGate&&this.eventGate.unmaskEvents(t,e,n)},createDir:function(t,e,n){var r=this._normalizePath(t),o=this;try{this._maskEvents(r,"createDir"),u.createDir(this.wfsId,r,{ensureParents:e},function(t,e){var i=!t;o._unmaskEvents(r,i,!1),o._invokeCallback("createDir",n,t,e)})}catch(i){o._invokeCallback("createDir",n,i)}},stat:function(t,e,n){var o=this._normalizePath(t),i=this;u.stat(this.wfsId,o,{dummyFor404:e},function(t,e){var s;t||(s=new r(e,o)),i._invokeCallback("stat",n,t,s)})},dirTree:function(t,e,n){var r=this._normalizePath(t),i=this;u.dirTree(this.wfsId,r,e,function(e,r){var s;e||(s=o.fromJson(r),s.path=t),i._invokeCallback("dirTree",n,e,s)})},remove:function(t,e,n){var r=this;try{var o=this._normalizePath(t);this._maskEvents(o,"remove"),u.remove(this.wfsId,o,{noRecursive:e},function(t,e){var i=!t;r._unmaskEvents(o,i,!1),r._invokeCallback("remove",n,t,e)})}catch(i){r._invokeCallback("remove",n,i)}},readFile:function(t,e,n){var r=e||"",o=this;if(r=r.toLowerCase(),r&&!l[r]){var i="unsupported response type "+r;return i+=", should be one of "+JSON.stringify(Object.keys(l)),o._invokeCallback("readFile",n,new Error(i))}var a=this._normalizePath(t),c=function(t,e,i){var a;if(!t){if(""===r||"text"===r)return s.blobToStringAsync(i.xhr.responseText).then(function(t){o._invokeCallback("readFile",n,null,t)})["catch"](function(t){o._invokeCallback("readFile",n,t)});a=e}o._invokeCallback("readFile",n,t,a)};r&&"text"!==r&&"json"!==r&&(c.responseType=r),u.readFile(this.wfsId,a,{},c)},writeFile:function(t,e,n){var r=this,o=null;try{switch(typeof e){case"string":e=new Blob([e],{type:"text/plain"});break;case"object":if(!(e instanceof Blob))return o=new Error("invalid data - should be string or Blob"),r._invokeCallback("writeFile",n,o);break;default:return o=new Error("invalid data type - should be string or Blob"),r._invokeCallback("remove",n,o)}var i=this._normalizePath(t);this._maskEvents(i,"writeFile"),u.writeFile(this.wfsId,i,e,{ensureParents:!0},function(t,e){var o=!t;r._unmaskEvents(i,o,!1),r._invokeCallback("writeFile",n,t,e)})}catch(s){r._invokeCallback("writeFile",n,s)}},copy:function(t,e,n,r){var o=this;"function"==typeof n&&(r=n,n={noOverwrite:!1,followSymbolicLinks:!1,preserveTimestamps:!1});try{var i=this._normalizePath(e),s=this._normalizePath(t);this._maskEvents(i,"copy"),u.copy(this.wfsId,i,s,n,function(t,e){var n=!t;o._unmaskEvents(i,n,!1),o._invokeCallback("copy",r,t,e)})}catch(a){o._invokeCallback("copy",r,a)}},move:function(t,e,n){var r=this;try{var o=this._normalizePath(e),i=this._normalizePath(t);this._maskEvents(o,"move"),this._maskEvents(i,"move"),u.move(this.wfsId,o,i,{noOverwrite:!1},function(t,e){var s=!t;r._unmaskEvents(o,s,!1),r._unmaskEvents(i,s,!1),r._invokeCallback("move",n,t,e)})}catch(s){r._invokeCallback("move",n,s)}},search:function(t,e,n,r){var o=this;try{var i=t.map(function(t){return this._normalizePath(t)});return u.search(this.wfsId,i,e,n,function(t,e){o._invokeCallback("search",r,t,e)})}catch(s){o._invokeCallback("search",r,s)}},replace:function(t,e,n,r,o){var i=this;try{var s=t.map(function(t){var e=this._normalizePath(t);return i._maskEvents(e,"replace"),e});return u.replace(this.wfsId,s,e,r,function(t,e){var n=!t;s.forEach(function(t){i._unmaskEvents(t,n,!1)}),i._invokeCallback("replace",o,t,e)})}catch(a){i._invokeCallback("replace",o,a)}},READ_AS:l},a.READ_AS=l,a}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(2),n(21),n(35),n(13),n(5)],o=function(t,e,n,r,o){"use strict";function i(t,e){this.wfsId=t.id,this.sessionClient=e,this.db=null,this.dirForest=null,this._offlineCachePaths=t.offlineCachePaths||[],this._initPromise=null,this._shouldEmitWfsEvents=!1,e.on("wfs",this._onWatcherEvent.bind(this)),e.on("disconnect",this._onDisconnected.bind(this)),e.on("connect",this._onConnected.bind(this))}var s=t.logger.child("WfsOfflineCache"),a=new t.api.WfsApi,c=e.utils,u=864e5;return i.prototype={_onWatcherEvent:function(t,e,n,r){t===this.wfsId&&s.debug("wfs event got",e,n,r)},_onConnected:function(){this.dirForest?this._uploadLocalChanges():this._initPromise||this.init().then(function(){s.debug("initialized by session connect event")}),this._shouldEmitWfsEvents=!1},_onDisconnected:function(){this._shouldEmitWfsEvents=!0},init:function(){var t=this,n=e.open(this.wfsId).then(function(e){return t.db=e,t._buildForest()}).then(function(){t._initPromise=null,t._prefetch(),t._uploadLocalChanges()});return this._initPromise=n,n},isAvailable:function(){return this.db&&this.dirForest},readFromCache:function(t){var e=this;return new Promise(function(n,r){var o=c.begin(e.db,"getItem"),i=o.objectStore("items"),s=i.get(t);c.swear(s,"items","getSingleItem",n,r)})},cleanOldItems:function(){var t=this;return new Promise(function(e,n){var r=c.begin(t.db,"getItem"),o=r.objectStore("items"),i=o.index("timestamp"),a=(new Date).getTime()-u,l=window.IDBKeyRange.upperBound(a,!0),f=i.openCursor(l);f.onsuccess=function(t){var e=t.target.result;e&&(s.debug("clean old item",e.value.wfsPath),e["delete"](),e["continue"]())},c.swear(r,"items","cleanOldItems",e,n)})},writeToCache:function(t,e){var n=this;return new Promise(function(o,i){var a=c.begin(n.db,"writeChange",o,i),u=a.objectStore("items"),l=a.objectStore("changes"),f=new Date;this.readFromCache(t).then(function(o){o?(o.stats.mtime=f,o.stats.size=e.size||e.length):o.stats=r.createFakeStats(f.getTime(),e),o.data=e,o.timestamp=f.getTime(),u.put(o),l.put({wfsPath:t,data:e,timestamp:f.getTime()}),n._shouldEmitWfsEvents&&n.socketClient.emit("wfs","_change",this.wfsId,o.stats)})["catch"](function(t){s.error("writeToCacache failed while reading existing cache item",t),i(t)})})},_buildForest:function(){var t=new n(this.wfsId,this._offlineCachePaths),e=this;return t.build().then(function(){e.dirForest=t})},_updateItem:function(t,e){var n=this;return new Promise(function(r,o){a.readFile(this.wfsId,this.wfsPath,function(i,a){if(i)return s.error("update cache item failed",i),o(i);var u=c.begin(n.db,"getItem"),l=u.objectStore("items"),f=l.put(t,{wfsPath:t,timestamp:(new Date).getTime(),data:a,stats:e.stats});c.swear(f,"items","updateItem",r,o)})})},_prefetch:function(){var t=this.dirForest.dirs,e=this;Object.keys(t).forEach(function(t){var n=e.dirForest.getTree(t),r=n.walk({},null,function(t){return t.isFile});e._prefetchFiles(r)})},_prefetchFiles:function(t){var e=this,n=[];return Object.keys(t).forEach(function(r){var i=t[r],a=o.normalizePath(r),c=e.readFromCache(a).then(function(t){return!t||t.stats.mtime<i.stats.mtime.getTime()?e._updateItem(a,i):void s.debug("skip prefetching fresh one "+a)})["catch"](function(t){return s.error(a+" prefetching failed",t),Promise.resolve()});n.push(c)}),Promise.all(n)},_getChanges:function(){var t=this,e=[];return new Promise(function(n,r){var o=c.begin(t.db,"getItem"),i=o.objectStore("changes"),s=i.index("timestamp"),a=s.openCursor(null);a.onsuccess=function(t){var r=t.target.result;r?(e.push(r.value),r["continue"]()):n(e)},a.onerror=function(t){r(t.target.error)}})},_removeChanges:function(t){var e=this;return new Promise(function(n,r){var o=c.begin(e.db,"removeChanges",n,r),i=o.objectStore("changes");t.forEach(function(t){i["delete"](t)})})},_uploadChangeIfNeeded:function(t){var e=this;return new Promise(function(n){a.stat(e.wfsId,t.wfsPath,{ignoreError:!0},function(r,o){return r?n(null):void("FILE"===o.type?a.writeFile(e.wfsId,t.wfsPath,{ensureParents:!0},t.data,function(e){e?(s.warn("uploading "+t.wfsPath+"failed",e),n(null)):n(t.wfsPath)}):n(t.wfsPath))})})},_uploadLocalChanges:function(){var t=this,e=[];return this._getChanges().then(function(e){var n=e.map(function(e){return t._uploadChangeIfNeeded(e)});return Promise.all(n)}).then(function(n){return e={},n.forEach(function(t){t&&(e[t]=!0)}),t._removeChanges(Object.keys(e))})}},i}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(2),n(6),n(5)],o=function(t,e,n){"use strict";function r(t){this.wfsMount=t}var o=t.logger.child("CompatibleMount"),i=n.abstractify,s=new t.api.WorkspaceApi;return r.prototype={_invokeCallback:function(t,e,n,r){try{e(n,r)}catch(i){o.warn("Callback of CompatibleMount#"+t+"() threw error",i)}},createDirectory:function(t,e,n){
return this.wfsMount.createDir(t,e,n)},exists:function(t,e){return this.wfsMount.stat(t,!0,e)},isDirectory:function(t,e){var n=this;this.wfsMount(t,!1,function(t,r){n._invokeCallback("isDirectory",e,t,r.isDirectory())})},isFile:function(t,e){var n=this;this.wfsMount.stat(t,function(t,r){n._invokeCallback("isFile",e,t,!r.isDirectory())})},isEmpty:function(t,e){var n=this;this.wfsMount.dirTree(t,1,function(t,r){n._invokeCallback("list",e,t,0===r.children.length)})},readFile:function(t,e,n){return e=e||"text",n||(n=e,e="text"),this.wfsMount.readFile(t,e,n)},writeFile:function(t,e,n){return this.wfsMount.writeFile(t,e,n)},copy:function(t,e,n,r){return this.wfsMount.copy(t,e,r)},move:function(t,e,n){return this.wfsMount.move(t,e,n)},list:function(t,e,n){n||(n=e,e=!1);var r=this;this.wfsMount.dirTree(t,e?-1:1,function(t,e){r._invokeCallback("list",n,t,e.children)})},"delete":function(t,e,n){return"function"==typeof e&&(n=e,e=!1),this.wfsMount.remove(t,!e,n)},exec:function(t,e,r){var i=this;"git.sh"===e.cmd&&(e.cmd="git");try{var a={command:e.cmd,args:e.args,cwd:n.normalizePath(t)};s.execute(this.wfsMount.wfsId,a,{},function(t,e){var n,i,s;"object"==typeof e&&(n=e.stdout,i=e.stderr,s=e.error);try{r(t||s,n,i)}catch(a){o.warn("Callback of CompatibleMount#exec() threw error",a)}})}catch(c){i._invokeCallback("exec",r,c)}},searchFiles:function(t,e,n,r){try{return n.wholeWord&&(t="\\b"+t+"\\b"),this.wfsMount.search([e],t,n,r)}catch(o){this._invokeCallback("searchFiles",r,o)}},replaceFiles:function(t,e,n,r,o){try{return r.wholeWord&&(t="\\b"+t+"\\b"),this.wfsMount.replace(n,t,e,r,o)}catch(i){this._invokeCallback("searchFiles",o,i)}},addAlias:i("addAlias")},r}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(9),n(2),n(22),n(8),n(20)],o=function(t,e,n,r,o){"use strict";function i(){o.call(this)}function s(t,e,r,o){Promise.resolve(n.init(f)).then(function(){return n.start()}).then(function(){return c.debug("initAuth complete, invoking callback with session id"),o(l.sessionId)})["catch"](function(t){c.error("initAuth met error",t),alert("This app client cannot start\n"+t.message||t)})}function a(t){u.getInfo(function(e,n){c.debug("AuthApi.getInfo callback with ",e,n),e?(c.debug("getMyInfo failed",e),t(e)):t(null,n)})}var c=e.logger.child("auth"),u=new e.api.AuthApi,l=r.getTokenManager();t.inherits(i,o,{getUserCredentialAsync:function(){var t={};return t.loginId=window.prompt("input login id"),t.loginPassword=window.prompt("input login password"),Promise.resolve(t)}});var f=new i;return{initAuth:s,getMyInfo:a,getTokenObj:function(){var t=l.accessToken;if(t)return{issueTime:t.issuedAt,data:t.text}},getToken:function(){var t=l.accessToken;if(t)return t.text},getSessionID:function(){var t=l.accessToken;if(t)return t.sessionId}}}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r,o;r=[n(6),n(41)],o=function(t,e){"use strict";function n(n){var o=t.getFileSystemMount();if(n!==o.wfsId)throw new Error("unavailable fsid "+n);return r.mounts[n]||(r.mounts[n]=new e(o)),r.mounts[n]}var r={mounts:{}};return{mountByFSID:n}}.apply(e,r),!(void 0!==o&&(t.exports=o))},function(t,e,n){var r;(function(t){(function(){function o(t,e){return t.set(e[0],e[1]),t}function i(t,e){return t.add(e),t}function s(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function a(t,e,n,r){for(var o=-1,i=t?t.length:0;++o<i;){var s=t[o];e(r,s,n(s),t)}return r}function c(t,e){for(var n=-1,r=t?t.length:0;++n<r&&e(t[n],n,t)!==!1;);return t}function u(t,e){for(var n=t?t.length:0;n--&&e(t[n],n,t)!==!1;);return t}function l(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(!e(t[n],n,t))return!1;return!0}function f(t,e){for(var n=-1,r=t?t.length:0,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}function p(t,e){var n=t?t.length:0;return!!n&&_(t,e,0)>-1}function h(t,e,n){for(var r=-1,o=t?t.length:0;++r<o;)if(n(e,t[r]))return!0;return!1}function d(t,e){for(var n=-1,r=t?t.length:0,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function v(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function g(t,e,n,r){var o=-1,i=t?t.length:0;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function m(t,e,n,r){var o=t?t.length:0;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function y(t,e){for(var n=-1,r=t?t.length:0;++n<r;)if(e(t[n],n,t))return!0;return!1}function w(t,e,n){var r;return n(t,function(t,n,o){if(e(t,n,o))return r=n,!1}),r}function b(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function _(t,e,n){if(e!==e)return b(t,x,n);for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}function k(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function x(t){return t!==t}function A(t,e){var n=t?t.length:0;return n?E(t,e)/n:At}function T(t){return function(e){return null==e?V:e[t]}}function C(t){return function(e){return null==t?V:t[e]}}function P(t,e,n,r,o){return o(t,function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)}),n}function j(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function E(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);i!==V&&(n=n===V?i:n+i)}return n}function S(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function O(t,e){return d(e,function(e){return[e,t[e]]})}function I(t){return function(e){return t(e)}}function R(t,e){return d(e,function(e){return t[e]})}function D(t,e){return t.has(e)}function B(t,e){for(var n=-1,r=t.length;++n<r&&_(e,t[n],0)>-1;);return n}function q(t,e){for(var n=t.length;n--&&_(e,t[n],0)>-1;);return n}function z(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&r++;return r}function M(t){return"\\"+Dn[t]}function U(t,e){return null==t?V:t[e]}function L(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}function F(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function N(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function W(t,e){return function(n){return t(e(n))}}function H(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n];s!==e&&s!==et||(t[n]=et,i[o++]=n)}return i}function Q(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function $(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function J(t){if(!t||!Tn.test(t))return t.length;for(var e=xn.lastIndex=0;xn.test(t);)e++;return e}function X(t){return t.match(xn)}function K(t){function e(t){if(Ba(t)&&!Ff(t)&&!(t instanceof C)){if(t instanceof r)return t;if(Hu.call(t,"__wrapped__"))return Si(t)}return new r(t)}function n(){}function r(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=V}function C(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Tt,this.__views__=[]}function ze(){var t=new C(this.__wrapped__);return t.__actions__=ko(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ko(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ko(this.__views__),t}function Me(){if(this.__filtered__){var t=new C(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Ue(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ff(t),r=e<0,o=n?t.length:0,i=ii(0,o,this.__views__),s=i.start,a=i.end,c=a-s,u=r?a:s-1,l=this.__iteratees__,f=l.length,p=0,h=ml(c,this.__takeCount__);if(!n||o<Y||o==c&&h==c)return no(t,this.__actions__);var d=[];t:for(;c--&&p<h;){u+=e;for(var v=-1,g=t[u];++v<f;){var m=l[v],y=m.iteratee,w=m.type,b=y(g);if(w==wt)g=b;else if(!b){if(w==yt)continue t;break t}}d[p++]=g}return d}function Le(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Fe(){this.__data__=jl?jl(null):{}}function Ne(t){return this.has(t)&&delete this.__data__[t]}function We(t){var e=this.__data__;if(jl){var n=e[t];return n===tt?V:n}return Hu.call(e,t)?e[t]:V}function He(t){var e=this.__data__;return jl?e[t]!==V:Hu.call(e,t)}function Qe(t,e){var n=this.__data__;return n[t]=jl&&e===V?tt:e,this}function $e(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Je(){this.__data__=[]}function Xe(t){var e=this.__data__,n=mn(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():ol.call(e,n,1),!0}function Ke(t){var e=this.__data__,n=mn(e,t);return n<0?V:e[n][1]}function Ve(t){return mn(this.__data__,t)>-1}function Ge(t,e){var n=this.__data__,r=mn(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function Ye(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ze(){this.__data__={hash:new Le,map:new(Al||$e),string:new Le}}function tn(t){return ni(this,t)["delete"](t)}function en(t){return ni(this,t).get(t)}function nn(t){return ni(this,t).has(t)}function rn(t,e){return ni(this,t).set(t,e),this}function on(t){var e=-1,n=t?t.length:0;for(this.__data__=new Ye;++e<n;)this.add(t[e])}function sn(t){return this.__data__.set(t,tt),this}function an(t){return this.__data__.has(t)}function cn(t){this.__data__=new $e(t)}function un(){this.__data__=new $e}function ln(t){return this.__data__["delete"](t)}function fn(t){return this.__data__.get(t)}function pn(t){return this.__data__.has(t)}function hn(t,e){var n=this.__data__;if(n instanceof $e){var r=n.__data__;if(!Al||r.length<Y-1)return r.push([t,e]),this;n=this.__data__=new Ye(r)}return n.set(t,e),this}function dn(t,e,n,r){return t===V||ba(t,Uu[n])&&!Hu.call(r,n)?e:t}function vn(t,e,n){(n===V||ba(t[e],n))&&("number"!=typeof e||n!==V||e in t)||(t[e]=n)}function gn(t,e,n){var r=t[e];Hu.call(t,e)&&ba(r,n)&&(n!==V||e in t)||(t[e]=n)}function mn(t,e){for(var n=t.length;n--;)if(ba(t[n][0],e))return n;return-1}function yn(t,e,n,r){return Fl(t,function(t,o,i){e(r,t,n(t),i)}),r}function wn(t,e){return t&&xo(e,gc(e),t)}function bn(t,e){for(var n=-1,r=null==t,o=e.length,i=Iu(o);++n<o;)i[n]=r?V:hc(t,e[n]);return i}function xn(t,e,n){return t===t&&(n!==V&&(t=t<=n?t:n),e!==V&&(t=t>=e?t:e)),t}function On(t,e,n,r,o,i,s){var a;if(r&&(a=i?r(t,o,i,s):r(t)),a!==V)return a;if(!Da(t))return t;var u=Ff(t);if(u){if(a=ci(t),!e)return ko(t,a)}else{var l=Zl(t),f=l==Dt||l==Bt;if(Wf(t))return uo(t,e);if(l==Mt||l==Et||f&&!i){if(L(t))return i?t:{};if(a=ui(f?{}:t),!e)return Ao(t,wn(a,t))}else{if(!Sn[l])return i?t:{};a=li(t,l,On,e)}}s||(s=new cn);var p=s.get(t);if(p)return p;if(s.set(t,a),!u)var h=n?Go(t):gc(t);return c(h||t,function(o,i){h&&(i=o,o=t[i]),gn(a,i,On(o,e,n,r,i,t,s))}),n||s["delete"](t),a}function In(t){var e=gc(t);return function(n){return Rn(n,t,e)}}function Rn(t,e,n){var r=n.length;if(null==t)return!r;for(var o=r;o--;){var i=n[o],s=e[i],a=t[i];if(a===V&&!(i in Object(t))||!s(a))return!1}return!0}function Dn(t){return Da(t)?nl(t):{}}function zn(t,e,n){if("function"!=typeof t)throw new zu(Z);return al(function(){t.apply(V,n)},e)}function Mn(t,e,n,r){var o=-1,i=p,s=!0,a=t.length,c=[],u=e.length;if(!a)return c;n&&(e=d(e,I(n))),r?(i=h,s=!1):e.length>=Y&&(i=D,s=!1,e=new on(e));t:for(;++o<a;){var l=t[o],f=n?n(l):l;if(l=r||0!==l?l:0,s&&f===f){for(var v=u;v--;)if(e[v]===f)continue t;c.push(l)}else i(e,f,r)||c.push(l)}return c}function Ln(t,e){var n=!0;return Fl(t,function(t,r,o){return n=!!e(t,r,o)}),n}function Fn(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],s=e(i);if(null!=s&&(a===V?s===s&&!$a(s):n(s,a)))var a=s,c=i}return c}function Wn(t,e,n,r){var o=t.length;for(n=Ya(n),n<0&&(n=-n>o?0:o+n),r=r===V||r>o?o:Ya(r),r<0&&(r+=o),r=n>r?0:Za(r);n<r;)t[n++]=e;return t}function Hn(t,e){var n=[];return Fl(t,function(t,r,o){e(t,r,o)&&n.push(t)}),n}function er(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=hi),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?er(a,e-1,n,r,o):v(o,a):r||(o[o.length]=a)}return o}function nr(t,e){return t&&Wl(t,e,gc)}function rr(t,e){return t&&Hl(t,e,gc)}function or(t,e){return f(e,function(e){return Oa(t[e])})}function ir(t,e){e=gi(e,t)?[e]:ao(e);for(var n=0,r=e.length;null!=t&&n<r;)t=t[Pi(e[n++])];return n&&n==r?t:V}function sr(t,e,n){var r=e(t);return Ff(t)?r:v(r,n(t))}function ar(t){return Ju.call(t)}function cr(t,e){return t>e}function ur(t,e){return null!=t&&(Hu.call(t,e)||"object"==typeof t&&e in t&&null===Vl(t))}function lr(t,e){return null!=t&&e in Object(t)}function fr(t,e,n){return t>=ml(e,n)&&t<gl(e,n)}function pr(t,e,n){for(var r=n?h:p,o=t[0].length,i=t.length,s=i,a=Iu(i),c=1/0,u=[];s--;){var l=t[s];s&&e&&(l=d(l,I(e))),c=ml(l.length,c),a[s]=!n&&(e||o>=120&&l.length>=120)?new on(s&&l):V}l=t[0];var f=-1,v=a[0];t:for(;++f<o&&u.length<c;){var g=l[f],m=e?e(g):g;if(g=n||0!==g?g:0,!(v?D(v,m):r(u,m,n))){for(s=i;--s;){var y=a[s];if(!(y?D(y,m):r(t[s],m,n)))continue t}v&&v.push(m),u.push(g)}}return u}function hr(t,e,n,r){return nr(t,function(t,o,i){e(r,n(t),o,i)}),r}function dr(t,e,n){gi(e,t)||(e=ao(e),t=Ti(t,e),e=Ki(e));var r=null==t?t:t[Pi(e)];return null==r?V:s(r,t,n)}function vr(t){return Ba(t)&&Ju.call(t)==$t}function gr(t){return Ba(t)&&Ju.call(t)==It}function mr(t,e,n,r,o){return t===e||(null==t||null==e||!Da(t)&&!Ba(e)?t!==t&&e!==e:yr(t,e,mr,n,r,o))}function yr(t,e,n,r,o,i){var s=Ff(t),a=Ff(e),c=St,u=St;s||(c=Zl(t),c=c==Et?Mt:c),a||(u=Zl(e),u=u==Et?Mt:u);var l=c==Mt&&!L(t),f=u==Mt&&!L(e),p=c==u;if(p&&!l)return i||(i=new cn),s||Xf(t)?Xo(t,e,n,r,o,i):Ko(t,e,c,n,r,o,i);if(!(o&ht)){var h=l&&Hu.call(t,"__wrapped__"),d=f&&Hu.call(e,"__wrapped__");if(h||d){var v=h?t.value():t,g=d?e.value():e;return i||(i=new cn),n(v,g,r,o,i)}}return!!p&&(i||(i=new cn),Vo(t,e,n,r,o,i))}function wr(t){return Ba(t)&&Zl(t)==qt}function br(t,e,n,r){var o=n.length,i=o,s=!r;if(null==t)return!i;for(t=Object(t);o--;){var a=n[o];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){a=n[o];var c=a[0],u=t[c],l=a[1];if(s&&a[2]){if(u===V&&!(c in t))return!1}else{var f=new cn;if(r)var p=r(u,l,c,t,e,f);if(!(p===V?mr(l,u,r,pt|ht,f):p))return!1}}return!0}function _r(t){if(!Da(t)||wi(t))return!1;var e=Oa(t)||L(t)?Ku:Oe;return e.test(ji(t))}function kr(t){return Da(t)&&Ju.call(t)==Lt}function xr(t){return Ba(t)&&Zl(t)==Ft}function Ar(t){return Ba(t)&&Ra(t.length)&&!!En[Ju.call(t)]}function Tr(t){return"function"==typeof t?t:null==t?su:"object"==typeof t?Ff(t)?Sr(t[0],t[1]):Er(t):du(t)}function Cr(t){t=null==t?t:Object(t);var e=[];for(var n in t)e.push(n);return e}function Pr(t,e){return t<e}function jr(t,e){var n=-1,r=ka(t)?Iu(t.length):[];return Fl(t,function(t,o,i){r[++n]=e(t,o,i)}),r}function Er(t){var e=ri(t);return 1==e.length&&e[0][2]?ki(e[0][0],e[0][1]):function(n){return n===t||br(n,t,e)}}function Sr(t,e){return gi(t)&&_i(e)?ki(Pi(t),e):function(n){var r=hc(n,t);return r===V&&r===e?vc(n,t):mr(e,r,V,pt|ht)}}function Or(t,e,n,r,o){if(t!==e){if(!Ff(e)&&!Xf(e))var i=mc(e);c(i||e,function(s,a){if(i&&(a=s,s=e[a]),Da(s))o||(o=new cn),Ir(t,e,a,n,Or,r,o);else{var c=r?r(t[a],s,a+"",t,e,o):V;c===V&&(c=s),vn(t,a,c)}})}}function Ir(t,e,n,r,o,i,s){var a=t[n],c=e[n],u=s.get(c);if(u)return void vn(t,n,u);var l=i?i(a,c,n+"",t,e,s):V,f=l===V;f&&(l=c,Ff(c)||Xf(c)?Ff(a)?l=a:xa(a)?l=ko(a):(f=!1,l=On(c,!0)):Wa(c)||_a(c)?_a(a)?l=ec(a):!Da(a)||r&&Oa(a)?(f=!1,l=On(c,!0)):l=a:f=!1),f&&(s.set(c,l),o(l,c,r,i,s),s["delete"](c)),vn(t,n,l)}function Rr(t,e){var n=t.length;if(n)return e+=e<0?n:0,di(e,n)?t[e]:V}function Dr(t,e,n){var r=-1;e=d(e.length?e:[su],I(ei()));var o=jr(t,function(t,n,o){var i=d(e,function(e){return e(t)});return{criteria:i,index:++r,value:t}});return j(o,function(t,e){return wo(t,e,n)})}function Br(t,e){return t=Object(t),qr(t,e,function(e,n){return n in t})}function qr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var s=e[r],a=t[s];n(a,s)&&(i[s]=a)}return i}function zr(t){return function(e){return ir(e,t)}}function Mr(t,e,n,r){var o=r?k:_,i=-1,s=e.length,a=t;for(t===e&&(e=ko(e)),n&&(a=d(t,I(n)));++i<s;)for(var c=0,u=e[i],l=n?n(u):u;(c=o(a,l,c,r))>-1;)a!==t&&ol.call(a,c,1),ol.call(t,c,1);return t}function Ur(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;if(di(o))ol.call(t,o,1);else if(gi(o,t))delete t[Pi(o)];else{var s=ao(o),a=Ti(t,s);null!=a&&delete a[Pi(Ki(s))]}}}return t}function Lr(t,e){return t+ul(wl()*(e-t+1))}function Fr(t,e,n,r){for(var o=-1,i=gl(cl((e-t)/(n||1)),0),s=Iu(i);i--;)s[r?i:++o]=t,t+=n;return s}function Nr(t,e){var n="";if(!t||e<1||e>kt)return n;do e%2&&(n+=t),e=ul(e/2),e&&(t+=t);while(e);return n}function Wr(t,e){return e=gl(e===V?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=gl(n.length-e,0),i=Iu(o);++r<o;)i[r]=n[e+r];r=-1;for(var a=Iu(e+1);++r<e;)a[r]=n[r];return a[e]=i,s(t,this,a)}}function Hr(t,e,n,r){e=gi(e,t)?[e]:ao(e);for(var o=-1,i=e.length,s=i-1,a=t;null!=a&&++o<i;){var c=Pi(e[o]);if(Da(a)){var u=n;if(o!=s){var l=a[c];u=r?r(l,c,a):V,u===V&&(u=null==l?di(e[o+1])?[]:{}:l)}gn(a,c,u)}a=a[c]}return t}function Qr(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),n=n>o?o:n,n<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Iu(o);++r<o;)i[r]=t[r+e];return i}function $r(t,e){var n;return Fl(t,function(t,r,o){return n=e(t,r,o),!n}),!!n}function Jr(t,e,n){var r=0,o=t?t.length:r;if("number"==typeof e&&e===e&&o<=Pt){for(;r<o;){var i=r+o>>>1,s=t[i];null!==s&&!$a(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return Xr(t,e,su,n)}function Xr(t,e,n,r){e=n(e);for(var o=0,i=t?t.length:0,s=e!==e,a=null===e,c=$a(e),u=e===V;o<i;){var l=ul((o+i)/2),f=n(t[l]),p=f!==V,h=null===f,d=f===f,v=$a(f);if(s)var g=r||d;else g=u?d&&(r||p):a?d&&p&&(r||!h):c?d&&p&&!h&&(r||!v):!h&&!v&&(r?f<=e:f<e);g?o=l+1:i=l}return ml(i,Ct)}function Kr(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n],a=e?e(s):s;if(!n||!ba(a,c)){var c=a;i[o++]=0===s?0:s}}return i}function Vr(t){return"number"==typeof t?t:$a(t)?At:+t}function Gr(t){if("string"==typeof t)return t;if($a(t))return Ll?Ll.call(t):"";var e=t+"";return"0"==e&&1/t==-_t?"-0":e}function Yr(t,e,n){var r=-1,o=p,i=t.length,s=!0,a=[],c=a;if(n)s=!1,o=h;else if(i>=Y){var u=e?null:Jl(t);if(u)return Q(u);s=!1,o=D,c=new on}else c=e?[]:a;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,s&&f===f){for(var d=c.length;d--;)if(c[d]===f)continue t;e&&c.push(f),a.push(l)}else o(c,f,n)||(c!==a&&c.push(f),a.push(l))}return a}function Zr(t,e){e=gi(e,t)?[e]:ao(e),t=Ti(t,e);var n=Pi(Ki(e));return!(null!=t&&ur(t,n))||delete t[n]}function to(t,e,n,r){return Hr(t,e,n(ir(t,e)),r)}function eo(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Qr(t,r?0:i,r?i+1:o):Qr(t,r?i+1:0,r?o:i)}function no(t,e){var n=t;return n instanceof C&&(n=n.value()),g(e,function(t,e){return e.func.apply(e.thisArg,v([t],e.args))},n)}function ro(t,e,n){for(var r=-1,o=t.length;++r<o;)var i=i?v(Mn(i,t[r],e,n),Mn(t[r],i,e,n)):t[r];return i&&i.length?Yr(i,e,n):[]}function oo(t,e,n){for(var r=-1,o=t.length,i=e.length,s={};++r<o;){var a=r<i?e[r]:V;n(s,t[r],a)}return s}function io(t){return xa(t)?t:[]}function so(t){return"function"==typeof t?t:su}function ao(t){return Ff(t)?t:rf(t)}function co(t,e,n){var r=t.length;return n=n===V?r:n,!e&&n>=r?t:Qr(t,e,n)}function uo(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}function lo(t){var e=new t.constructor(t.byteLength);return new Zu(e).set(new Zu(t)),e}function fo(t,e){var n=e?lo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function po(t,e,n){var r=e?n(N(t),!0):N(t);return g(r,o,new t.constructor)}function ho(t){var e=new t.constructor(t.source,Pe.exec(t));return e.lastIndex=t.lastIndex,e}function vo(t,e,n){var r=e?n(Q(t),!0):Q(t);return g(r,i,new t.constructor)}function go(t){return Ul?Object(Ul.call(t)):{}}function mo(t,e){var n=e?lo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function yo(t,e){if(t!==e){var n=t!==V,r=null===t,o=t===t,i=$a(t),s=e!==V,a=null===e,c=e===e,u=$a(e);if(!a&&!u&&!i&&t>e||i&&s&&c&&!a&&!u||r&&s&&c||!n&&c||!o)return 1;if(!r&&!i&&!u&&t<e||u&&n&&o&&!r&&!i||a&&n&&o||!s&&o||!c)return-1}return 0}function wo(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,s=o.length,a=n.length;++r<s;){var c=yo(o[r],i[r]);if(c){if(r>=a)return c;var u=n[r];return c*("desc"==u?-1:1)}}return t.index-e.index}function bo(t,e,n,r){for(var o=-1,i=t.length,s=n.length,a=-1,c=e.length,u=gl(i-s,0),l=Iu(c+u),f=!r;++a<c;)l[a]=e[a];for(;++o<s;)(f||o<i)&&(l[n[o]]=t[o]);for(;u--;)l[a++]=t[o++];return l}function _o(t,e,n,r){for(var o=-1,i=t.length,s=-1,a=n.length,c=-1,u=e.length,l=gl(i-a,0),f=Iu(l+u),p=!r;++o<l;)f[o]=t[o];for(var h=o;++c<u;)f[h+c]=e[c];for(;++s<a;)(p||o<i)&&(f[h+n[s]]=t[o++]);return f}function ko(t,e){var n=-1,r=t.length;for(e||(e=Iu(r));++n<r;)e[n]=t[n];return e}function xo(t,e,n,r){n||(n={});for(var o=-1,i=e.length;++o<i;){var s=e[o],a=r?r(n[s],t[s],s,n,t):V;gn(n,s,a===V?t[s]:a)}return n}function Ao(t,e){return xo(t,Gl(t),e)}function To(t,e){return function(n,r){var o=Ff(n)?a:yn,i=e?e():{};return o(n,t,ei(r,2),i)}}function Co(t){return Wr(function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:V,s=o>2?n[2]:V;for(i=t.length>3&&"function"==typeof i?(o--,i):V,s&&vi(n[0],n[1],s)&&(i=o<3?V:i,o=1),e=Object(e);++r<o;){var a=n[r];a&&t(e,a,r,i)}return e})}function Po(t,e){return function(n,r){if(null==n)return n;if(!ka(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Object(n);(e?i--:++i<o)&&r(s[i],i,s)!==!1;);return n}}function jo(t){return function(e,n,r){for(var o=-1,i=Object(e),s=r(e),a=s.length;a--;){var c=s[t?a:++o];if(n(i[c],c,i)===!1)break}return e}}function Eo(t,e,n){function r(){var e=this&&this!==Un&&this instanceof r?i:t;return e.apply(o?n:this,arguments)}var o=e&nt,i=Io(t);return r}function So(t){return function(e){e=rc(e);var n=Tn.test(e)?X(e):V,r=n?n[0]:e.charAt(0),o=n?co(n,1).join(""):e.slice(1);return r[t]()+o}}function Oo(t){return function(e){return g(eu(Bc(e).replace(_n,"")),t,"")}}function Io(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Dn(t.prototype),r=t.apply(n,e);return Da(r)?r:n}}function Ro(t,e,n){function r(){for(var i=arguments.length,a=Iu(i),c=i,u=ti(r);c--;)a[c]=arguments[c];var l=i<3&&a[0]!==u&&a[i-1]!==u?[]:H(a,u);if(i-=l.length,i<n)return Ho(t,e,qo,r.placeholder,V,a,l,V,V,n-i);var f=this&&this!==Un&&this instanceof r?o:t;return s(f,this,a)}var o=Io(t);return r}function Do(t){return function(e,n,r){var o=Object(e);if(!ka(e)){var i=ei(n,3);e=gc(e),n=function(t){return i(o[t],t,o)}}var s=t(e,n,r);return s>-1?o[i?e[s]:s]:V}}function Bo(t){return Wr(function(e){e=er(e,1);var n=e.length,o=n,i=r.prototype.thru;for(t&&e.reverse();o--;){var s=e[o];if("function"!=typeof s)throw new zu(Z);if(i&&!a&&"wrapper"==Zo(s))var a=new r([],(!0))}for(o=a?o:n;++o<n;){s=e[o];var c=Zo(s),u="wrapper"==c?Xl(s):V;a=u&&yi(u[0])&&u[1]==(ut|it|at|lt)&&!u[4].length&&1==u[9]?a[Zo(u[0])].apply(a,u[3]):1==s.length&&yi(s)?a[c]():a.thru(s)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Ff(r)&&r.length>=Y)return a.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}})}function qo(t,e,n,r,o,i,s,a,c,u){function l(){for(var m=arguments.length,y=Iu(m),w=m;w--;)y[w]=arguments[w];if(d)var b=ti(l),_=z(y,b);if(r&&(y=bo(y,r,o,d)),i&&(y=_o(y,i,s,d)),m-=_,d&&m<u){var k=H(y,b);return Ho(t,e,qo,l.placeholder,n,y,k,a,c,u-m)}var x=p?n:this,A=h?x[t]:t;return m=y.length,a?y=Ci(y,a):v&&m>1&&y.reverse(),f&&c<m&&(y.length=c),this&&this!==Un&&this instanceof l&&(A=g||Io(A)),A.apply(x,y)}var f=e&ut,p=e&nt,h=e&rt,d=e&(it|st),v=e&ft,g=h?V:Io(t);return l}function zo(t,e){return function(n,r){return hr(n,t,e(r),{})}}function Mo(t,e){return function(n,r){var o;if(n===V&&r===V)return e;if(n!==V&&(o=n),r!==V){if(o===V)return r;"string"==typeof n||"string"==typeof r?(n=Gr(n),r=Gr(r)):(n=Vr(n),r=Vr(r)),o=t(n,r)}return o}}function Uo(t){return Wr(function(e){return e=1==e.length&&Ff(e[0])?d(e[0],I(ei())):d(er(e,1),I(ei())),Wr(function(n){var r=this;return t(e,function(t){return s(t,r,n)})})})}function Lo(t,e){e=e===V?" ":Gr(e);var n=e.length;if(n<2)return n?Nr(e,t):e;var r=Nr(e,cl(t/J(e)));return Tn.test(e)?co(X(r),0,t).join(""):r.slice(0,t)}function Fo(t,e,n,r){function o(){for(var e=-1,c=arguments.length,u=-1,l=r.length,f=Iu(l+c),p=this&&this!==Un&&this instanceof o?a:t;++u<l;)f[u]=r[u];for(;c--;)f[u++]=arguments[++e];return s(p,i?n:this,f)}var i=e&nt,a=Io(t);return o}function No(t){return function(e,n,r){return r&&"number"!=typeof r&&vi(e,n,r)&&(n=r=V),e=tc(e),e=e===e?e:0,n===V?(n=e,e=0):n=tc(n)||0,r=r===V?e<n?1:-1:tc(r)||0,Fr(e,n,r,t)}}function Wo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=tc(e),n=tc(n)),t(e,n)}}function Ho(t,e,n,r,o,i,s,a,c,u){var l=e&it,f=l?s:V,p=l?V:s,h=l?i:V,d=l?V:i;e|=l?at:ct,e&=~(l?ct:at),e&ot||(e&=~(nt|rt));var v=[t,e,o,h,f,d,p,a,c,u],g=n.apply(V,v);return yi(t)&&ef(g,v),g.placeholder=r,nf(g,t,e)}function Qo(t){var e=Bu[t];return function(t,n){if(t=tc(t),n=ml(Ya(n),292)){var r=(rc(t)+"e").split("e"),o=e(r[0]+"e"+(+r[1]+n));return r=(rc(o)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return e(t)}}function $o(t){return function(e){var n=Zl(e);return n==qt?N(e):n==Ft?$(e):O(e,t(e))}}function Jo(t,e,n,r,o,i,s,a){var c=e&rt;if(!c&&"function"!=typeof t)throw new zu(Z);var u=r?r.length:0;if(u||(e&=~(at|ct),r=o=V),s=s===V?s:gl(Ya(s),0),a=a===V?a:Ya(a),u-=o?o.length:0,e&ct){var l=r,f=o;r=o=V}var p=c?V:Xl(t),h=[t,e,n,r,o,l,f,i,s,a];if(p&&xi(h,p),t=h[0],e=h[1],n=h[2],r=h[3],o=h[4],a=h[9]=null==h[9]?c?0:t.length:gl(h[9]-u,0),!a&&e&(it|st)&&(e&=~(it|st)),e&&e!=nt)d=e==it||e==st?Ro(t,e,a):e!=at&&e!=(nt|at)||o.length?qo.apply(V,h):Fo(t,e,n,r);else var d=Eo(t,e,n);var v=p?$l:ef;return nf(v(d,h),t,e)}function Xo(t,e,n,r,o,i){var s=o&ht,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(t);if(u&&i.get(e))return u==e;var l=-1,f=!0,p=o&pt?new on:V;for(i.set(t,e),i.set(e,t);++l<a;){var h=t[l],d=e[l];if(r)var v=s?r(d,h,l,e,t,i):r(h,d,l,t,e,i);if(v!==V){if(v)continue;f=!1;break}if(p){if(!y(e,function(t,e){if(!p.has(e)&&(h===t||n(h,t,r,o,i)))return p.add(e)})){f=!1;break}}else if(h!==d&&!n(h,d,r,o,i)){f=!1;break}}return i["delete"](t),f}function Ko(t,e,n,r,o,i,s){switch(n){case Jt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case $t:return!(t.byteLength!=e.byteLength||!r(new Zu(t),new Zu(e)));case Ot:case It:case zt:return ba(+t,+e);case Rt:return t.name==e.name&&t.message==e.message;case Lt:case Nt:return t==e+"";case qt:var a=N;case Ft:var c=i&ht;if(a||(a=Q),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;i|=pt,s.set(t,e);var l=Xo(a(t),a(e),r,o,i,s);return s["delete"](t),l;case Wt:if(Ul)return Ul.call(t)==Ul.call(e)}return!1}function Vo(t,e,n,r,o,i){var s=o&ht,a=gc(t),c=a.length,u=gc(e),l=u.length;if(c!=l&&!s)return!1;for(var f=c;f--;){var p=a[f];if(!(s?p in e:ur(e,p)))return!1}var h=i.get(t);if(h&&i.get(e))return h==e;var d=!0;i.set(t,e),i.set(e,t);for(var v=s;++f<c;){p=a[f];var g=t[p],m=e[p];if(r)var y=s?r(m,g,p,e,t,i):r(g,m,p,t,e,i);if(!(y===V?g===m||n(g,m,r,o,i):y)){d=!1;break}v||(v="constructor"==p)}if(d&&!v){var w=t.constructor,b=e.constructor;w!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b)&&(d=!1)}return i["delete"](t),d}function Go(t){return sr(t,gc,Gl)}function Yo(t){return sr(t,mc,Yl)}function Zo(t){for(var e=t.name+"",n=Il[e],r=Hu.call(Il,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ti(t){var n=Hu.call(e,"placeholder")?e:t;return n.placeholder}function ei(){var t=e.iteratee||au;return t=t===au?Tr:t,arguments.length?t(arguments[0],arguments[1]):t}function ni(t,e){var n=t.__data__;return mi(e)?n["string"==typeof e?"string":"hash"]:n.map}function ri(t){for(var e=gc(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,_i(o)]}return e}function oi(t,e){var n=U(t,e);return _r(n)?n:V}function ii(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],s=i.size;switch(i.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=ml(e,t+s);break;case"takeRight":t=gl(t,e-s)}}return{start:t,end:e}}function si(t){var e=t.match(ke);return e?e[1].split(xe):[]}function ai(t,e,n){e=gi(e,t)?[e]:ao(e);for(var r,o=-1,i=e.length;++o<i;){var s=Pi(e[o]);if(!(r=null!=t&&n(t,s)))break;t=t[s]}if(r)return r;var i=t?t.length:0;return!!i&&Ra(i)&&di(s,i)&&(Ff(t)||Qa(t)||_a(t))}function ci(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&Hu.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function ui(t){return"function"!=typeof t.constructor||bi(t)?{}:Dn(Vl(t))}function li(t,e,n,r){var o=t.constructor;switch(e){case $t:return lo(t);case Ot:case It:return new o((+t));case Jt:return fo(t,r);case Xt:case Kt:case Vt:case Gt:case Yt:case Zt:case te:case ee:case ne:return mo(t,r);case qt:return po(t,r,n);case zt:case Nt:return new o(t);case Lt:return ho(t);case Ft:return vo(t,r,n);case Wt:return go(t)}}function fi(t){var e=t?t.length:V;return Ra(e)&&(Ff(t)||Qa(t)||_a(t))?S(e,String):null}function pi(t,e){var n=e.length,r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(_e,"{\n/* [wrapped with "+e+"] */\n")}function hi(t){return Ff(t)||_a(t)||!!(il&&t&&t[il])}function di(t,e){return e=null==e?kt:e,!!e&&("number"==typeof t||Re.test(t))&&t>-1&&t%1==0&&t<e}function vi(t,e,n){if(!Da(n))return!1;var r=typeof e;return!!("number"==r?ka(n)&&di(e,n.length):"string"==r&&e in n)&&ba(n[e],t)}function gi(t,e){if(Ff(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!$a(t))||(de.test(t)||!he.test(t)||null!=e&&t in Object(e))}function mi(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function yi(t){var n=Zo(t),r=e[n];if("function"!=typeof r||!(n in C.prototype))return!1;if(t===r)return!0;var o=Xl(r);return!!o&&t===o[0]}function wi(t){return!!Nu&&Nu in t}function bi(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||Uu;return t===n}function _i(t){return t===t&&!Da(t)}function ki(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==V||t in Object(n)))}}function xi(t,e){var n=t[1],r=e[1],o=n|r,i=o<(nt|rt|ut),s=r==ut&&n==it||r==ut&&n==lt&&t[7].length<=e[8]||r==(ut|lt)&&e[7].length<=e[8]&&n==it;if(!i&&!s)return t;r&nt&&(t[2]=e[2],o|=n&nt?0:ot);var a=e[3];if(a){var c=t[3];t[3]=c?bo(c,a,e[4]):a,t[4]=c?H(t[3],et):e[4]}return a=e[5],a&&(c=t[5],t[5]=c?_o(c,a,e[6]):a,t[6]=c?H(t[5],et):e[6]),a=e[7],a&&(t[7]=a),r&ut&&(t[8]=null==t[8]?e[8]:ml(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o,t}function Ai(t,e,n,r,o,i){return Da(t)&&Da(e)&&(i.set(e,t),Or(t,e,V,Ai,i),i["delete"](e)),t}function Ti(t,e){return 1==e.length?t:ir(t,Qr(e,0,-1))}function Ci(t,e){for(var n=t.length,r=ml(e.length,n),o=ko(t);r--;){var i=e[r];t[r]=di(i,n)?o[i]:V}return t}function Pi(t){if("string"==typeof t||$a(t))return t;var e=t+"";return"0"==e&&1/t==-_t?"-0":e}function ji(t){if(null!=t){try{return Wu.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Ei(t,e){return c(jt,function(n){var r="_."+n[0];e&n[1]&&!p(t,r)&&t.push(r)}),t.sort()}function Si(t){if(t instanceof C)return t.clone();var e=new r(t.__wrapped__,t.__chain__);return e.__actions__=ko(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Oi(t,e,n){e=(n?vi(t,e,n):e===V)?1:gl(Ya(e),0);var r=t?t.length:0;if(!r||e<1)return[];for(var o=0,i=0,s=Iu(cl(r/e));o<r;)s[i++]=Qr(t,o,o+=e);return s}function Ii(t){for(var e=-1,n=t?t.length:0,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o}function Ri(){for(var t=arguments.length,e=Iu(t?t-1:0),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return t?v(Ff(n)?ko(n):[n],er(e,1)):[]}function Di(t,e,n){var r=t?t.length:0;return r?(e=n||e===V?1:Ya(e),Qr(t,e<0?0:e,r)):[]}function Bi(t,e,n){var r=t?t.length:0;return r?(e=n||e===V?1:Ya(e),e=r-e,Qr(t,0,e<0?0:e)):[]}function qi(t,e){return t&&t.length?eo(t,ei(e,3),!0,!0):[]}function zi(t,e){return t&&t.length?eo(t,ei(e,3),!0):[]}function Mi(t,e,n,r){var o=t?t.length:0;return o?(n&&"number"!=typeof n&&vi(t,e,n)&&(n=0,
r=o),Wn(t,e,n,r)):[]}function Ui(t,e,n){var r=t?t.length:0;if(!r)return-1;var o=null==n?0:Ya(n);return o<0&&(o=gl(r+o,0)),b(t,ei(e,3),o)}function Li(t,e,n){var r=t?t.length:0;if(!r)return-1;var o=r-1;return n!==V&&(o=Ya(n),o=n<0?gl(r+o,0):ml(o,r-1)),b(t,ei(e,3),o,!0)}function Fi(t){var e=t?t.length:0;return e?er(t,1):[]}function Ni(t){var e=t?t.length:0;return e?er(t,_t):[]}function Wi(t,e){var n=t?t.length:0;return n?(e=e===V?1:Ya(e),er(t,e)):[]}function Hi(t){for(var e=-1,n=t?t.length:0,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r}function Qi(t){return t&&t.length?t[0]:V}function $i(t,e,n){var r=t?t.length:0;if(!r)return-1;var o=null==n?0:Ya(n);return o<0&&(o=gl(r+o,0)),_(t,e,o)}function Ji(t){return Bi(t,1)}function Xi(t,e){return t?dl.call(t,e):""}function Ki(t){var e=t?t.length:0;return e?t[e-1]:V}function Vi(t,e,n){var r=t?t.length:0;if(!r)return-1;var o=r;if(n!==V&&(o=Ya(n),o=(o<0?gl(r+o,0):ml(o,r-1))+1),e!==e)return b(t,x,o-1,!0);for(;o--;)if(t[o]===e)return o;return-1}function Gi(t,e){return t&&t.length?Rr(t,Ya(e)):V}function Yi(t,e){return t&&t.length&&e&&e.length?Mr(t,e):t}function Zi(t,e,n){return t&&t.length&&e&&e.length?Mr(t,e,ei(n,2)):t}function ts(t,e,n){return t&&t.length&&e&&e.length?Mr(t,e,V,n):t}function es(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=ei(e,3);++r<i;){var s=t[r];e(s,r,t)&&(n.push(s),o.push(r))}return Ur(t,o),n}function ns(t){return t?_l.call(t):t}function rs(t,e,n){var r=t?t.length:0;return r?(n&&"number"!=typeof n&&vi(t,e,n)?(e=0,n=r):(e=null==e?0:Ya(e),n=n===V?r:Ya(n)),Qr(t,e,n)):[]}function os(t,e){return Jr(t,e)}function is(t,e,n){return Xr(t,e,ei(n,2))}function ss(t,e){var n=t?t.length:0;if(n){var r=Jr(t,e);if(r<n&&ba(t[r],e))return r}return-1}function as(t,e){return Jr(t,e,!0)}function cs(t,e,n){return Xr(t,e,ei(n,2),!0)}function us(t,e){var n=t?t.length:0;if(n){var r=Jr(t,e,!0)-1;if(ba(t[r],e))return r}return-1}function ls(t){return t&&t.length?Kr(t):[]}function fs(t,e){return t&&t.length?Kr(t,ei(e,2)):[]}function ps(t){return Di(t,1)}function hs(t,e,n){return t&&t.length?(e=n||e===V?1:Ya(e),Qr(t,0,e<0?0:e)):[]}function ds(t,e,n){var r=t?t.length:0;return r?(e=n||e===V?1:Ya(e),e=r-e,Qr(t,e<0?0:e,r)):[]}function vs(t,e){return t&&t.length?eo(t,ei(e,3),!1,!0):[]}function gs(t,e){return t&&t.length?eo(t,ei(e,3)):[]}function ms(t){return t&&t.length?Yr(t):[]}function ys(t,e){return t&&t.length?Yr(t,ei(e,2)):[]}function ws(t,e){return t&&t.length?Yr(t,V,e):[]}function bs(t){if(!t||!t.length)return[];var e=0;return t=f(t,function(t){if(xa(t))return e=gl(t.length,e),!0}),S(e,function(e){return d(t,T(e))})}function _s(t,e){if(!t||!t.length)return[];var n=bs(t);return null==e?n:d(n,function(t){return s(e,V,t)})}function ks(t,e){return oo(t||[],e||[],gn)}function xs(t,e){return oo(t||[],e||[],Hr)}function As(t){var n=e(t);return n.__chain__=!0,n}function Ts(t,e){return e(t),t}function Cs(t,e){return e(t)}function Ps(){return As(this)}function js(){return new r(this.value(),this.__chain__)}function Es(){this.__values__===V&&(this.__values__=Va(this.value()));var t=this.__index__>=this.__values__.length,e=t?V:this.__values__[this.__index__++];return{done:t,value:e}}function Ss(){return this}function Os(t){for(var e,r=this;r instanceof n;){var o=Si(r);o.__index__=0,o.__values__=V,e?i.__wrapped__=o:e=o;var i=o;r=r.__wrapped__}return i.__wrapped__=t,e}function Is(){var t=this.__wrapped__;if(t instanceof C){var e=t;return this.__actions__.length&&(e=new C(this)),e=e.reverse(),e.__actions__.push({func:Cs,args:[ns],thisArg:V}),new r(e,this.__chain__)}return this.thru(ns)}function Rs(){return no(this.__wrapped__,this.__actions__)}function Ds(t,e,n){var r=Ff(t)?l:Ln;return n&&vi(t,e,n)&&(e=V),r(t,ei(e,3))}function Bs(t,e){var n=Ff(t)?f:Hn;return n(t,ei(e,3))}function qs(t,e){return er(Ns(t,e),1)}function zs(t,e){return er(Ns(t,e),_t)}function Ms(t,e,n){return n=n===V?1:Ya(n),er(Ns(t,e),n)}function Us(t,e){var n=Ff(t)?c:Fl;return n(t,ei(e,3))}function Ls(t,e){var n=Ff(t)?u:Nl;return n(t,ei(e,3))}function Fs(t,e,n,r){t=ka(t)?t:Ec(t),n=n&&!r?Ya(n):0;var o=t.length;return n<0&&(n=gl(o+n,0)),Qa(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&_(t,e,n)>-1}function Ns(t,e){var n=Ff(t)?d:jr;return n(t,ei(e,3))}function Ws(t,e,n,r){return null==t?[]:(Ff(e)||(e=null==e?[]:[e]),n=r?V:n,Ff(n)||(n=null==n?[]:[n]),Dr(t,e,n))}function Hs(t,e,n){var r=Ff(t)?g:P,o=arguments.length<3;return r(t,ei(e,4),n,o,Fl)}function Qs(t,e,n){var r=Ff(t)?m:P,o=arguments.length<3;return r(t,ei(e,4),n,o,Nl)}function $s(t,e){var n=Ff(t)?f:Hn;return n(t,aa(ei(e,3)))}function Js(t){var e=ka(t)?t:Ec(t),n=e.length;return n>0?e[Lr(0,n-1)]:V}function Xs(t,e,n){var r=-1,o=Va(t),i=o.length,s=i-1;for(e=(n?vi(t,e,n):e===V)?1:xn(Ya(e),0,i);++r<e;){var a=Lr(r,s),c=o[a];o[a]=o[r],o[r]=c}return o.length=e,o}function Ks(t){return Xs(t,Tt)}function Vs(t){if(null==t)return 0;if(ka(t)){var e=t.length;return e&&Qa(t)?J(t):e}if(Ba(t)){var n=Zl(t);if(n==qt||n==Ft)return t.size}return gc(t).length}function Gs(t,e,n){var r=Ff(t)?y:$r;return n&&vi(t,e,n)&&(e=V),r(t,ei(e,3))}function Ys(){return Ru.now()}function Zs(t,e){if("function"!=typeof e)throw new zu(Z);return t=Ya(t),function(){if(--t<1)return e.apply(this,arguments)}}function ta(t,e,n){return e=n?V:e,e=t&&null==e?t.length:e,Jo(t,ut,V,V,V,V,e)}function ea(t,e){var n;if("function"!=typeof e)throw new zu(Z);return t=Ya(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=V),n}}function na(t,e,n){e=n?V:e;var r=Jo(t,it,V,V,V,V,V,e);return r.placeholder=na.placeholder,r}function ra(t,e,n){e=n?V:e;var r=Jo(t,st,V,V,V,V,V,e);return r.placeholder=ra.placeholder,r}function oa(t,e,n){function r(e){var n=p,r=h;return p=h=V,y=e,v=t.apply(r,n)}function o(t){return y=t,g=al(a,e),w?r(t):v}function i(t){var n=t-m,r=t-y,o=e-n;return b?ml(o,d-r):o}function s(t){var n=t-m,r=t-y;return m===V||n>=e||n<0||b&&r>=d}function a(){var t=Ys();return s(t)?c(t):void(g=al(a,i(t)))}function c(t){return g=V,_&&p?r(t):(p=h=V,v)}function u(){g!==V&&sl(g),y=0,p=m=h=g=V}function l(){return g===V?v:c(Ys())}function f(){var t=Ys(),n=s(t);if(p=arguments,h=this,m=t,n){if(g===V)return o(m);if(b)return g=al(a,e),r(m)}return g===V&&(g=al(a,e)),v}var p,h,d,v,g,m,y=0,w=!1,b=!1,_=!0;if("function"!=typeof t)throw new zu(Z);return e=tc(e)||0,Da(n)&&(w=!!n.leading,b="maxWait"in n,d=b?gl(tc(n.maxWait)||0,e):d,_="trailing"in n?!!n.trailing:_),f.cancel=u,f.flush=l,f}function ia(t){return Jo(t,ft)}function sa(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new zu(Z);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new(sa.Cache||Ye),n}function aa(t){if("function"!=typeof t)throw new zu(Z);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function ca(t){return ea(2,t)}function ua(t,e){if("function"!=typeof t)throw new zu(Z);return e=e===V?e:Ya(e),Wr(t,e)}function la(t,e){if("function"!=typeof t)throw new zu(Z);return e=e===V?0:gl(Ya(e),0),Wr(function(n){var r=n[e],o=co(n,0,e);return r&&v(o,r),s(t,this,o)})}function fa(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new zu(Z);return Da(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),oa(t,e,{leading:r,maxWait:e,trailing:o})}function pa(t){return ta(t,1)}function ha(t,e){return e=null==e?su:e,qf(e,t)}function da(){if(!arguments.length)return[];var t=arguments[0];return Ff(t)?t:[t]}function va(t){return On(t,!1,!0)}function ga(t,e){return On(t,!1,!0,e)}function ma(t){return On(t,!0,!0)}function ya(t,e){return On(t,!0,!0,e)}function wa(t,e){return null==e||Rn(t,e,gc(e))}function ba(t,e){return t===e||t!==t&&e!==e}function _a(t){return xa(t)&&Hu.call(t,"callee")&&(!rl.call(t,"callee")||Ju.call(t)==Et)}function ka(t){return null!=t&&Ra(Kl(t))&&!Oa(t)}function xa(t){return Ba(t)&&ka(t)}function Aa(t){return t===!0||t===!1||Ba(t)&&Ju.call(t)==Ot}function Ta(t){return!!t&&1===t.nodeType&&Ba(t)&&!Wa(t)}function Ca(t){if(ka(t)&&(Ff(t)||Qa(t)||Oa(t.splice)||_a(t)||Wf(t)))return!t.length;if(Ba(t)){var e=Zl(t);if(e==qt||e==Ft)return!t.size}for(var n in t)if(Hu.call(t,n))return!1;return!(Ol&&gc(t).length)}function Pa(t,e){return mr(t,e)}function ja(t,e,n){n="function"==typeof n?n:V;var r=n?n(t,e):V;return r===V?mr(t,e,n):!!r}function Ea(t){return!!Ba(t)&&(Ju.call(t)==Rt||"string"==typeof t.message&&"string"==typeof t.name)}function Sa(t){return"number"==typeof t&&hl(t)}function Oa(t){var e=Da(t)?Ju.call(t):"";return e==Dt||e==Bt}function Ia(t){return"number"==typeof t&&t==Ya(t)}function Ra(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=kt}function Da(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Ba(t){return!!t&&"object"==typeof t}function qa(t,e){return t===e||br(t,e,ri(e))}function za(t,e,n){return n="function"==typeof n?n:V,br(t,e,ri(e),n)}function Ma(t){return Na(t)&&t!=+t}function Ua(t){if(tf(t))throw new Du("This method is not supported with core-js. Try https://github.com/es-shims.");return _r(t)}function La(t){return null===t}function Fa(t){return null==t}function Na(t){return"number"==typeof t||Ba(t)&&Ju.call(t)==zt}function Wa(t){if(!Ba(t)||Ju.call(t)!=Mt||L(t))return!1;var e=Vl(t);if(null===e)return!0;var n=Hu.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Wu.call(n)==$u}function Ha(t){return Ia(t)&&t>=-kt&&t<=kt}function Qa(t){return"string"==typeof t||!Ff(t)&&Ba(t)&&Ju.call(t)==Nt}function $a(t){return"symbol"==typeof t||Ba(t)&&Ju.call(t)==Wt}function Ja(t){return t===V}function Xa(t){return Ba(t)&&Zl(t)==Ht}function Ka(t){return Ba(t)&&Ju.call(t)==Qt}function Va(t){if(!t)return[];if(ka(t))return Qa(t)?X(t):ko(t);if(el&&t[el])return F(t[el]());var e=Zl(t),n=e==qt?N:e==Ft?Q:Ec;return n(t)}function Ga(t){if(!t)return 0===t?t:0;if(t=tc(t),t===_t||t===-_t){var e=t<0?-1:1;return e*xt}return t===t?t:0}function Ya(t){var e=Ga(t),n=e%1;return e===e?n?e-n:e:0}function Za(t){return t?xn(Ya(t),0,Tt):0}function tc(t){if("number"==typeof t)return t;if($a(t))return At;if(Da(t)){var e=Oa(t.valueOf)?t.valueOf():t;t=Da(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ye,"");var n=Se.test(t);return n||Ie.test(t)?qn(t.slice(2),n?2:8):Ee.test(t)?At:+t}function ec(t){return xo(t,mc(t))}function nc(t){return xn(Ya(t),-kt,kt)}function rc(t){return null==t?"":Gr(t)}function oc(t,e){var n=Dn(t);return e?wn(n,e):n}function ic(t,e){return w(t,ei(e,3),nr)}function sc(t,e){return w(t,ei(e,3),rr)}function ac(t,e){return null==t?t:Wl(t,ei(e,3),mc)}function cc(t,e){return null==t?t:Hl(t,ei(e,3),mc)}function uc(t,e){return t&&nr(t,ei(e,3))}function lc(t,e){return t&&rr(t,ei(e,3))}function fc(t){return null==t?[]:or(t,gc(t))}function pc(t){return null==t?[]:or(t,mc(t))}function hc(t,e,n){var r=null==t?V:ir(t,e);return r===V?n:r}function dc(t,e){return null!=t&&ai(t,e,ur)}function vc(t,e){return null!=t&&ai(t,e,lr)}function gc(t){var e=bi(t);if(!e&&!ka(t))return Ql(t);var n=fi(t),r=!!n,o=n||[],i=o.length;for(var s in t)!ur(t,s)||r&&("length"==s||di(s,i))||e&&"constructor"==s||o.push(s);return o}function mc(t){for(var e=-1,n=bi(t),r=Cr(t),o=r.length,i=fi(t),s=!!i,a=i||[],c=a.length;++e<o;){var u=r[e];s&&("length"==u||di(u,c))||"constructor"==u&&(n||!Hu.call(t,u))||a.push(u)}return a}function yc(t,e){var n={};return e=ei(e,3),nr(t,function(t,r,o){n[e(t,r,o)]=t}),n}function wc(t,e){var n={};return e=ei(e,3),nr(t,function(t,r,o){n[r]=e(t,r,o)}),n}function bc(t,e){return _c(t,aa(ei(e)))}function _c(t,e){return null==t?{}:qr(t,Yo(t),ei(e))}function kc(t,e,n){e=gi(e,t)?[e]:ao(e);var r=-1,o=e.length;for(o||(t=V,o=1);++r<o;){var i=null==t?V:t[Pi(e[r])];i===V&&(r=o,i=n),t=Oa(i)?i.call(t):i}return t}function xc(t,e,n){return null==t?t:Hr(t,e,n)}function Ac(t,e,n,r){return r="function"==typeof r?r:V,null==t?t:Hr(t,e,n,r)}function Tc(t,e,n){var r=Ff(t)||Xf(t);if(e=ei(e,4),null==n)if(r||Da(t)){var o=t.constructor;n=r?Ff(t)?new o:[]:Oa(o)?Dn(Vl(t)):{}}else n={};return(r?c:nr)(t,function(t,r,o){return e(n,t,r,o)}),n}function Cc(t,e){return null==t||Zr(t,e)}function Pc(t,e,n){return null==t?t:to(t,e,so(n))}function jc(t,e,n,r){return r="function"==typeof r?r:V,null==t?t:to(t,e,so(n),r)}function Ec(t){return t?R(t,gc(t)):[]}function Sc(t){return null==t?[]:R(t,mc(t))}function Oc(t,e,n){return n===V&&(n=e,e=V),n!==V&&(n=tc(n),n=n===n?n:0),e!==V&&(e=tc(e),e=e===e?e:0),xn(tc(t),e,n)}function Ic(t,e,n){return e=tc(e)||0,n===V?(n=e,e=0):n=tc(n)||0,t=tc(t),fr(t,e,n)}function Rc(t,e,n){if(n&&"boolean"!=typeof n&&vi(t,e,n)&&(e=n=V),n===V&&("boolean"==typeof e?(n=e,e=V):"boolean"==typeof t&&(n=t,t=V)),t===V&&e===V?(t=0,e=1):(t=tc(t)||0,e===V?(e=t,t=0):e=tc(e)||0),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=wl();return ml(t+o*(e-t+Bn("1e-"+((o+"").length-1))),e)}return Lr(t,e)}function Dc(t){return bp(rc(t).toLowerCase())}function Bc(t){return t=rc(t),t&&t.replace(De,Gn).replace(kn,"")}function qc(t,e,n){t=rc(t),e=Gr(e);var r=t.length;n=n===V?r:xn(Ya(n),0,r);var o=n;return n-=e.length,n>=0&&t.slice(n,o)==e}function zc(t){return t=rc(t),t&&ue.test(t)?t.replace(ae,Yn):t}function Mc(t){return t=rc(t),t&&me.test(t)?t.replace(ge,"\\$&"):t}function Uc(t,e,n){t=rc(t),e=Ya(e);var r=e?J(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Lo(ul(o),n)+t+Lo(cl(o),n)}function Lc(t,e,n){t=rc(t),e=Ya(e);var r=e?J(t):0;return e&&r<e?t+Lo(e-r,n):t}function Fc(t,e,n){t=rc(t),e=Ya(e);var r=e?J(t):0;return e&&r<e?Lo(e-r,n)+t:t}function Nc(t,e,n){return n||null==e?e=0:e&&(e=+e),t=rc(t).replace(ye,""),yl(t,e||(je.test(t)?16:10))}function Wc(t,e,n){return e=(n?vi(t,e,n):e===V)?1:Ya(e),Nr(rc(t),e)}function Hc(){var t=arguments,e=rc(t[0]);return t.length<3?e:bl.call(e,t[1],t[2])}function Qc(t,e,n){return n&&"number"!=typeof n&&vi(t,e,n)&&(e=n=V),(n=n===V?Tt:n>>>0)?(t=rc(t),t&&("string"==typeof e||null!=e&&!$f(e))&&(e=Gr(e),""==e&&Tn.test(t))?co(X(t),0,n):kl.call(t,e,n)):[]}function $c(t,e,n){return t=rc(t),n=xn(Ya(n),0,t.length),e=Gr(e),t.slice(n,n+e.length)==e}function Jc(t,n,r){var o=e.templateSettings;r&&vi(t,n,r)&&(n=V),t=rc(t),n=Zf({},n,o,dn);var i,s,a=Zf({},n.imports,o.imports,dn),c=gc(a),u=R(a,c),l=0,f=n.interpolate||Be,p="__p += '",h=qu((n.escape||Be).source+"|"+f.source+"|"+(f===pe?Ce:Be).source+"|"+(n.evaluate||Be).source+"|$","g"),d="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++jn+"]")+"\n";t.replace(h,function(e,n,r,o,a,c){return r||(r=o),p+=t.slice(l,c).replace(qe,M),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e}),p+="';\n";var v=n.variable;v||(p="with (obj) {\n"+p+"\n}\n"),p=(s?p.replace(re,""):p).replace(oe,"$1").replace(ie,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=_p(function(){return Function(c,d+"return "+p).apply(V,u)});if(g.source=p,Ea(g))throw g;return g}function Xc(t){return rc(t).toLowerCase()}function Kc(t){return rc(t).toUpperCase()}function Vc(t,e,n){if(t=rc(t),t&&(n||e===V))return t.replace(ye,"");if(!t||!(e=Gr(e)))return t;var r=X(t),o=X(e),i=B(r,o),s=q(r,o)+1;return co(r,i,s).join("")}function Gc(t,e,n){if(t=rc(t),t&&(n||e===V))return t.replace(be,"");if(!t||!(e=Gr(e)))return t;var r=X(t),o=q(r,X(e))+1;return co(r,0,o).join("")}function Yc(t,e,n){if(t=rc(t),t&&(n||e===V))return t.replace(we,"");if(!t||!(e=Gr(e)))return t;var r=X(t),o=B(r,X(e));return co(r,o).join("")}function Zc(t,e){var n=dt,r=vt;if(Da(e)){var o="separator"in e?e.separator:o;n="length"in e?Ya(e.length):n,r="omission"in e?Gr(e.omission):r}t=rc(t);var i=t.length;if(Tn.test(t)){var s=X(t);i=s.length}if(n>=i)return t;var a=n-J(r);if(a<1)return r;var c=s?co(s,0,a).join(""):t.slice(0,a);if(o===V)return c+r;if(s&&(a+=c.length-a),$f(o)){if(t.slice(a).search(o)){var u,l=c;for(o.global||(o=qu(o.source,rc(Pe.exec(o))+"g")),o.lastIndex=0;u=o.exec(l);)var f=u.index;c=c.slice(0,f===V?a:f)}}else if(t.indexOf(Gr(o),a)!=a){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+r}function tu(t){return t=rc(t),t&&ce.test(t)?t.replace(se,Zn):t}function eu(t,e,n){return t=rc(t),e=n?V:e,e===V&&(e=Cn.test(t)?An:Ae),t.match(e)||[]}function nu(t){var e=t?t.length:0,n=ei();return t=e?d(t,function(t){if("function"!=typeof t[1])throw new zu(Z);return[n(t[0]),t[1]]}):[],Wr(function(n){for(var r=-1;++r<e;){var o=t[r];if(s(o[0],this,n))return s(o[1],this,n)}})}function ru(t){return In(On(t,!0))}function ou(t){return function(){return t}}function iu(t,e){return null==t||t!==t?e:t}function su(t){return t}function au(t){return Tr("function"==typeof t?t:On(t,!0))}function cu(t){return Er(On(t,!0))}function uu(t,e){return Sr(t,On(e,!0))}function lu(t,e,n){var r=gc(e),o=or(e,r);null!=n||Da(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=or(e,gc(e)));var i=!(Da(n)&&"chain"in n&&!n.chain),s=Oa(t);return c(o,function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=ko(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,v([this.value()],arguments))})}),t}function fu(){return Un._===this&&(Un._=Xu),this}function pu(){}function hu(t){return t=Ya(t),Wr(function(e){return Rr(e,t)})}function du(t){return gi(t)?T(Pi(t)):zr(t)}function vu(t){return function(e){return null==t?V:ir(t,e)}}function gu(){return[]}function mu(){return!1}function yu(){return{}}function wu(){return""}function bu(){return!0}function _u(t,e){if(t=Ya(t),t<1||t>kt)return[];var n=Tt,r=ml(t,Tt);e=ei(e),t-=Tt;for(var o=S(r,e);++n<t;)e(n);return o}function ku(t){return Ff(t)?d(t,Pi):$a(t)?[t]:ko(rf(t))}function xu(t){var e=++Qu;return rc(t)+e}function Au(t){return t&&t.length?Fn(t,su,cr):V}function Tu(t,e){return t&&t.length?Fn(t,ei(e,2),cr):V}function Cu(t){return A(t,su)}function Pu(t,e){return A(t,ei(e,2))}function ju(t){return t&&t.length?Fn(t,su,Pr):V}function Eu(t,e){return t&&t.length?Fn(t,ei(e,2),Pr):V}function Su(t){return t&&t.length?E(t,su):0}function Ou(t,e){return t&&t.length?E(t,ei(e,2)):0}t=t?tr.defaults({},t,tr.pick(Un,Pn)):Un;var Iu=t.Array,Ru=t.Date,Du=t.Error,Bu=t.Math,qu=t.RegExp,zu=t.TypeError,Mu=t.Array.prototype,Uu=t.Object.prototype,Lu=t.String.prototype,Fu=t["__core-js_shared__"],Nu=function(){var t=/[^.]+$/.exec(Fu&&Fu.keys&&Fu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Wu=t.Function.prototype.toString,Hu=Uu.hasOwnProperty,Qu=0,$u=Wu.call(Object),Ju=Uu.toString,Xu=Un._,Ku=qu("^"+Wu.call(Hu).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vu=Nn?t.Buffer:V,Gu=t.Reflect,Yu=t.Symbol,Zu=t.Uint8Array,tl=Gu?Gu.enumerate:V,el=Yu?Yu.iterator:V,nl=t.Object.create,rl=Uu.propertyIsEnumerable,ol=Mu.splice,il=Yu?Yu.isConcatSpreadable:V,sl=function(e){return t.clearTimeout.call(Un,e)},al=function(e,n){return t.setTimeout.call(Un,e,n)},cl=Bu.ceil,ul=Bu.floor,ll=Object.getPrototypeOf,fl=Object.getOwnPropertySymbols,pl=Vu?Vu.isBuffer:V,hl=t.isFinite,dl=Mu.join,vl=Object.keys,gl=Bu.max,ml=Bu.min,yl=t.parseInt,wl=Bu.random,bl=Lu.replace,_l=Mu.reverse,kl=Lu.split,xl=oi(t,"DataView"),Al=oi(t,"Map"),Tl=oi(t,"Promise"),Cl=oi(t,"Set"),Pl=oi(t,"WeakMap"),jl=oi(t.Object,"create"),El=function(){var e=oi(t.Object,"defineProperty"),n=oi.name;return n&&n.length>2?e:V}(),Sl=Pl&&new Pl,Ol=!rl.call({valueOf:1},"valueOf"),Il={},Rl=ji(xl),Dl=ji(Al),Bl=ji(Tl),ql=ji(Cl),zl=ji(Pl),Ml=Yu?Yu.prototype:V,Ul=Ml?Ml.valueOf:V,Ll=Ml?Ml.toString:V;e.templateSettings={escape:le,evaluate:fe,interpolate:pe,variable:"",imports:{_:e}},e.prototype=n.prototype,e.prototype.constructor=e,r.prototype=Dn(n.prototype),r.prototype.constructor=r,C.prototype=Dn(n.prototype),C.prototype.constructor=C,Le.prototype.clear=Fe,Le.prototype["delete"]=Ne,Le.prototype.get=We,Le.prototype.has=He,Le.prototype.set=Qe,$e.prototype.clear=Je,$e.prototype["delete"]=Xe,$e.prototype.get=Ke,$e.prototype.has=Ve,$e.prototype.set=Ge,Ye.prototype.clear=Ze,Ye.prototype["delete"]=tn,Ye.prototype.get=en,Ye.prototype.has=nn,Ye.prototype.set=rn,on.prototype.add=on.prototype.push=sn,on.prototype.has=an,cn.prototype.clear=un,cn.prototype["delete"]=ln,cn.prototype.get=fn,cn.prototype.has=pn,cn.prototype.set=hn;var Fl=Po(nr),Nl=Po(rr,!0),Wl=jo(),Hl=jo(!0),Ql=W(vl,Object);tl&&!rl.call({valueOf:1},"valueOf")&&(Cr=function(t){return F(tl(t))});var $l=Sl?function(t,e){return Sl.set(t,e),t}:su,Jl=Cl&&1/Q(new Cl([,-0]))[1]==_t?function(t){return new Cl(t)}:pu,Xl=Sl?function(t){return Sl.get(t)}:pu,Kl=T("length"),Vl=W(ll,Object),Gl=fl?W(fl,Object):gu,Yl=fl?function(t){for(var e=[];t;)v(e,Gl(t)),t=Vl(t);return e}:Gl,Zl=ar;(xl&&Zl(new xl(new ArrayBuffer(1)))!=Jt||Al&&Zl(new Al)!=qt||Tl&&Zl(Tl.resolve())!=Ut||Cl&&Zl(new Cl)!=Ft||Pl&&Zl(new Pl)!=Ht)&&(Zl=function(t){var e=Ju.call(t),n=e==Mt?t.constructor:V,r=n?ji(n):V;if(r)switch(r){case Rl:return Jt;case Dl:return qt;case Bl:return Ut;case ql:return Ft;case zl:return Ht}return e});var tf=Fu?Oa:mu,ef=function(){var t=0,e=0;return function(n,r){var o=Ys(),i=mt-(o-e);if(e=o,i>0){if(++t>=gt)return n}else t=0;return $l(n,r)}}(),nf=El?function(t,e,n){var r=e+"";return El(t,"toString",{configurable:!0,enumerable:!1,value:ou(pi(r,Ei(si(r),n)))})}:su,rf=sa(function(t){var e=[];return rc(t).replace(ve,function(t,n,r,o){e.push(r?o.replace(Te,"$1"):n||t)}),e}),of=Wr(function(t,e){return xa(t)?Mn(t,er(e,1,xa,!0)):[]}),sf=Wr(function(t,e){var n=Ki(e);return xa(n)&&(n=V),xa(t)?Mn(t,er(e,1,xa,!0),ei(n,2)):[]}),af=Wr(function(t,e){var n=Ki(e);return xa(n)&&(n=V),xa(t)?Mn(t,er(e,1,xa,!0),V,n):[]}),cf=Wr(function(t){var e=d(t,io);return e.length&&e[0]===t[0]?pr(e):[]}),uf=Wr(function(t){var e=Ki(t),n=d(t,io);return e===Ki(n)?e=V:n.pop(),n.length&&n[0]===t[0]?pr(n,ei(e,2)):[]}),lf=Wr(function(t){var e=Ki(t),n=d(t,io);return e===Ki(n)?e=V:n.pop(),n.length&&n[0]===t[0]?pr(n,V,e):[]}),ff=Wr(Yi),pf=Wr(function(t,e){e=er(e,1);var n=t?t.length:0,r=bn(t,e);return Ur(t,d(e,function(t){return di(t,n)?+t:t}).sort(yo)),r}),hf=Wr(function(t){return Yr(er(t,1,xa,!0))}),df=Wr(function(t){var e=Ki(t);return xa(e)&&(e=V),Yr(er(t,1,xa,!0),ei(e,2))}),vf=Wr(function(t){var e=Ki(t);return xa(e)&&(e=V),Yr(er(t,1,xa,!0),V,e)}),gf=Wr(function(t,e){return xa(t)?Mn(t,e):[]}),mf=Wr(function(t){return ro(f(t,xa))}),yf=Wr(function(t){var e=Ki(t);return xa(e)&&(e=V),ro(f(t,xa),ei(e,2))}),wf=Wr(function(t){var e=Ki(t);return xa(e)&&(e=V),ro(f(t,xa),V,e)}),bf=Wr(bs),_f=Wr(function(t){var e=t.length,n=e>1?t[e-1]:V;return n="function"==typeof n?(t.pop(),n):V,_s(t,n)}),kf=Wr(function(t){t=er(t,1);var e=t.length,n=e?t[0]:0,o=this.__wrapped__,i=function(e){return bn(e,t)};return!(e>1||this.__actions__.length)&&o instanceof C&&di(n)?(o=o.slice(n,+n+(e?1:0)),o.__actions__.push({func:Cs,args:[i],thisArg:V}),new r(o,this.__chain__).thru(function(t){return e&&!t.length&&t.push(V),t})):this.thru(i)}),xf=To(function(t,e,n){Hu.call(t,n)?++t[n]:t[n]=1}),Af=Do(Ui),Tf=Do(Li),Cf=To(function(t,e,n){Hu.call(t,n)?t[n].push(e):t[n]=[e]}),Pf=Wr(function(t,e,n){var r=-1,o="function"==typeof e,i=gi(e),a=ka(t)?Iu(t.length):[];return Fl(t,function(t){var c=o?e:i&&null!=t?t[e]:V;a[++r]=c?s(c,t,n):dr(t,e,n)}),a}),jf=To(function(t,e,n){t[n]=e}),Ef=To(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),Sf=Wr(function(t,e){if(null==t)return[];var n=e.length;return n>1&&vi(t,e[0],e[1])?e=[]:n>2&&vi(e[0],e[1],e[2])&&(e=[e[0]]),Dr(t,er(e,1),[])}),Of=Wr(function(t,e,n){var r=nt;if(n.length){var o=H(n,ti(Of));r|=at}return Jo(t,r,e,n,o)}),If=Wr(function(t,e,n){var r=nt|rt;if(n.length){var o=H(n,ti(If));r|=at}return Jo(e,r,t,n,o)}),Rf=Wr(function(t,e){return zn(t,1,e)}),Df=Wr(function(t,e,n){return zn(t,tc(e)||0,n)});sa.Cache=Ye;var Bf=Wr(function(t,e){e=1==e.length&&Ff(e[0])?d(e[0],I(ei())):d(er(e,1),I(ei()));var n=e.length;return Wr(function(r){for(var o=-1,i=ml(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return s(t,this,r)})}),qf=Wr(function(t,e){var n=H(e,ti(qf));return Jo(t,at,V,e,n)}),zf=Wr(function(t,e){var n=H(e,ti(zf));return Jo(t,ct,V,e,n)}),Mf=Wr(function(t,e){return Jo(t,lt,V,V,V,er(e,1))}),Uf=Wo(cr),Lf=Wo(function(t,e){return t>=e}),Ff=Iu.isArray,Nf=Qn?I(Qn):vr,Wf=pl||mu,Hf=$n?I($n):gr,Qf=Jn?I(Jn):wr,$f=Xn?I(Xn):kr,Jf=Kn?I(Kn):xr,Xf=Vn?I(Vn):Ar,Kf=Wo(Pr),Vf=Wo(function(t,e){return t<=e}),Gf=Co(function(t,e){if(Ol||bi(e)||ka(e))return void xo(e,gc(e),t);for(var n in e)Hu.call(e,n)&&gn(t,n,e[n])}),Yf=Co(function(t,e){if(Ol||bi(e)||ka(e))return void xo(e,mc(e),t);for(var n in e)gn(t,n,e[n])}),Zf=Co(function(t,e,n,r){xo(e,mc(e),t,r)}),tp=Co(function(t,e,n,r){xo(e,gc(e),t,r)}),ep=Wr(function(t,e){return bn(t,er(e,1))}),np=Wr(function(t){return t.push(V,dn),s(Zf,V,t)}),rp=Wr(function(t){return t.push(V,Ai),s(cp,V,t)}),op=zo(function(t,e,n){t[e]=n},ou(su)),ip=zo(function(t,e,n){Hu.call(t,e)?t[e].push(n):t[e]=[n]},ei),sp=Wr(dr),ap=Co(function(t,e,n){Or(t,e,n)}),cp=Co(function(t,e,n,r){Or(t,e,n,r)}),up=Wr(function(t,e){return null==t?{}:(e=d(er(e,1),Pi),Br(t,Mn(Yo(t),e)))}),lp=Wr(function(t,e){return null==t?{}:Br(t,d(er(e,1),Pi))}),fp=$o(gc),pp=$o(mc),hp=Oo(function(t,e,n){return e=e.toLowerCase(),t+(n?Dc(e):e)}),dp=Oo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),vp=Oo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),gp=So("toLowerCase"),mp=Oo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),yp=Oo(function(t,e,n){return t+(n?" ":"")+bp(e)}),wp=Oo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),bp=So("toUpperCase"),_p=Wr(function(t,e){try{return s(t,V,e)}catch(n){return Ea(n)?n:new Du(n)}}),kp=Wr(function(t,e){return c(er(e,1),function(e){e=Pi(e),t[e]=Of(t[e],t)}),t}),xp=Bo(),Ap=Bo(!0),Tp=Wr(function(t,e){return function(n){return dr(n,t,e)}}),Cp=Wr(function(t,e){return function(n){return dr(t,n,e)}}),Pp=Uo(d),jp=Uo(l),Ep=Uo(y),Sp=No(),Op=No(!0),Ip=Mo(function(t,e){return t+e},0),Rp=Qo("ceil"),Dp=Mo(function(t,e){return t/e},1),Bp=Qo("floor"),qp=Mo(function(t,e){return t*e},1),zp=Qo("round"),Mp=Mo(function(t,e){return t-e},0);return e.after=Zs,e.ary=ta,e.assign=Gf,e.assignIn=Yf,e.assignInWith=Zf,e.assignWith=tp,e.at=ep,e.before=ea,e.bind=Of,e.bindAll=kp,e.bindKey=If,e.castArray=da,e.chain=As,e.chunk=Oi,e.compact=Ii,e.concat=Ri,e.cond=nu,e.conforms=ru,e.constant=ou,e.countBy=xf,e.create=oc,e.curry=na,e.curryRight=ra,e.debounce=oa,e.defaults=np,e.defaultsDeep=rp,e.defer=Rf,e.delay=Df,e.difference=of,e.differenceBy=sf,e.differenceWith=af,e.drop=Di,e.dropRight=Bi,e.dropRightWhile=qi,e.dropWhile=zi,e.fill=Mi,e.filter=Bs,e.flatMap=qs,e.flatMapDeep=zs,e.flatMapDepth=Ms,e.flatten=Fi,e.flattenDeep=Ni,e.flattenDepth=Wi,e.flip=ia,e.flow=xp,e.flowRight=Ap,e.fromPairs=Hi,e.functions=fc,e.functionsIn=pc,e.groupBy=Cf,e.initial=Ji,e.intersection=cf,e.intersectionBy=uf,e.intersectionWith=lf,e.invert=op,e.invertBy=ip,e.invokeMap=Pf,e.iteratee=au,e.keyBy=jf,e.keys=gc,e.keysIn=mc,e.map=Ns,e.mapKeys=yc,e.mapValues=wc,e.matches=cu,e.matchesProperty=uu,e.memoize=sa,e.merge=ap,e.mergeWith=cp,e.method=Tp,e.methodOf=Cp,e.mixin=lu,e.negate=aa,e.nthArg=hu,e.omit=up,e.omitBy=bc,e.once=ca,e.orderBy=Ws,e.over=Pp,e.overArgs=Bf,e.overEvery=jp,e.overSome=Ep,e.partial=qf,e.partialRight=zf,e.partition=Ef,e.pick=lp,e.pickBy=_c,e.property=du,e.propertyOf=vu,e.pull=ff,e.pullAll=Yi,e.pullAllBy=Zi,e.pullAllWith=ts,e.pullAt=pf,e.range=Sp,e.rangeRight=Op,e.rearg=Mf,e.reject=$s,e.remove=es,e.rest=ua,e.reverse=ns,e.sampleSize=Xs,e.set=xc,e.setWith=Ac,e.shuffle=Ks,e.slice=rs,e.sortBy=Sf,e.sortedUniq=ls,e.sortedUniqBy=fs,e.split=Qc,e.spread=la,e.tail=ps,e.take=hs,e.takeRight=ds,e.takeRightWhile=vs,e.takeWhile=gs,e.tap=Ts,e.throttle=fa,e.thru=Cs,e.toArray=Va,e.toPairs=fp,e.toPairsIn=pp,e.toPath=ku,e.toPlainObject=ec,e.transform=Tc,e.unary=pa,e.union=hf,e.unionBy=df,e.unionWith=vf,e.uniq=ms,e.uniqBy=ys,e.uniqWith=ws,e.unset=Cc,e.unzip=bs,e.unzipWith=_s,e.update=Pc,e.updateWith=jc,e.values=Ec,e.valuesIn=Sc,e.without=gf,e.words=eu,e.wrap=ha,e.xor=mf,e.xorBy=yf,e.xorWith=wf,e.zip=bf,e.zipObject=ks,e.zipObjectDeep=xs,e.zipWith=_f,e.entries=fp,e.entriesIn=pp,e.extend=Yf,e.extendWith=Zf,lu(e,e),e.add=Ip,e.attempt=_p,e.camelCase=hp,e.capitalize=Dc,e.ceil=Rp,e.clamp=Oc,e.clone=va,e.cloneDeep=ma,e.cloneDeepWith=ya,e.cloneWith=ga,e.conformsTo=wa,e.deburr=Bc,e.defaultTo=iu,e.divide=Dp,e.endsWith=qc,e.eq=ba,e.escape=zc,e.escapeRegExp=Mc,e.every=Ds,e.find=Af,e.findIndex=Ui,e.findKey=ic,e.findLast=Tf,e.findLastIndex=Li,e.findLastKey=sc,e.floor=Bp,e.forEach=Us,e.forEachRight=Ls,e.forIn=ac,e.forInRight=cc,e.forOwn=uc,e.forOwnRight=lc,e.get=hc,e.gt=Uf,e.gte=Lf,e.has=dc,e.hasIn=vc,e.head=Qi,e.identity=su,e.includes=Fs,e.indexOf=$i,e.inRange=Ic,e.invoke=sp,e.isArguments=_a,e.isArray=Ff,e.isArrayBuffer=Nf,e.isArrayLike=ka,e.isArrayLikeObject=xa,e.isBoolean=Aa,e.isBuffer=Wf,e.isDate=Hf,e.isElement=Ta,e.isEmpty=Ca,e.isEqual=Pa,e.isEqualWith=ja,e.isError=Ea,e.isFinite=Sa,e.isFunction=Oa,e.isInteger=Ia,e.isLength=Ra,e.isMap=Qf,e.isMatch=qa,e.isMatchWith=za,e.isNaN=Ma,e.isNative=Ua,e.isNil=Fa,e.isNull=La,e.isNumber=Na,e.isObject=Da,e.isObjectLike=Ba,e.isPlainObject=Wa,e.isRegExp=$f,e.isSafeInteger=Ha,e.isSet=Jf,e.isString=Qa,e.isSymbol=$a,e.isTypedArray=Xf,e.isUndefined=Ja,e.isWeakMap=Xa,e.isWeakSet=Ka,e.join=Xi,e.kebabCase=dp,e.last=Ki,e.lastIndexOf=Vi,e.lowerCase=vp,e.lowerFirst=gp,e.lt=Kf,e.lte=Vf,e.max=Au,e.maxBy=Tu,e.mean=Cu,e.meanBy=Pu,e.min=ju,e.minBy=Eu,e.stubArray=gu,e.stubFalse=mu,e.stubObject=yu,e.stubString=wu,e.stubTrue=bu,e.multiply=qp,e.nth=Gi,e.noConflict=fu,e.noop=pu,e.now=Ys,e.pad=Uc,e.padEnd=Lc,e.padStart=Fc,e.parseInt=Nc,e.random=Rc,e.reduce=Hs,e.reduceRight=Qs,e.repeat=Wc,e.replace=Hc,e.result=kc,e.round=zp,e.runInContext=K,e.sample=Js,e.size=Vs,e.snakeCase=mp,e.some=Gs,e.sortedIndex=os,e.sortedIndexBy=is,e.sortedIndexOf=ss,e.sortedLastIndex=as,e.sortedLastIndexBy=cs,e.sortedLastIndexOf=us,e.startCase=yp,e.startsWith=$c,e.subtract=Mp,e.sum=Su,e.sumBy=Ou,e.template=Jc,e.times=_u,e.toFinite=Ga,e.toInteger=Ya,e.toLength=Za,e.toLower=Xc,e.toNumber=tc,e.toSafeInteger=nc,e.toString=rc,e.toUpper=Kc,e.trim=Vc,e.trimEnd=Gc,e.trimStart=Yc,e.truncate=Zc,e.unescape=tu,e.uniqueId=xu,e.upperCase=wp,e.upperFirst=bp,e.each=Us,e.eachRight=Ls,e.first=Qi,lu(e,function(){var t={};return nr(e,function(n,r){Hu.call(e.prototype,r)||(t[r]=n)}),t}(),{chain:!1}),e.VERSION=G,c(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),c(["drop","take"],function(t,e){C.prototype[t]=function(n){var r=this.__filtered__;if(r&&!e)return new C(this);n=n===V?1:gl(Ya(n),0);var o=this.clone();return r?o.__takeCount__=ml(n,o.__takeCount__):o.__views__.push({size:ml(n,Tt),type:t+(o.__dir__<0?"Right":"")}),o},C.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),c(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==yt||n==bt;C.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ei(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),c(["head","last"],function(t,e){var n="take"+(e?"Right":"");C.prototype[t]=function(){return this[n](1).value()[0]}}),c(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");C.prototype[t]=function(){return this.__filtered__?new C(this):this[n](1)}}),C.prototype.compact=function(){return this.filter(su)},C.prototype.find=function(t){return this.filter(t).head()},C.prototype.findLast=function(t){return this.reverse().find(t)},C.prototype.invokeMap=Wr(function(t,e){return"function"==typeof t?new C(this):this.map(function(n){return dr(n,t,e)})}),C.prototype.reject=function(t){return this.filter(aa(ei(t)))},C.prototype.slice=function(t,e){t=Ya(t);var n=this;return n.__filtered__&&(t>0||e<0)?new C(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==V&&(e=Ya(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)},C.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},C.prototype.toArray=function(){return this.take(Tt)},nr(C.prototype,function(t,n){var o=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),s=e[i?"take"+("last"==n?"Right":""):n],a=i||/^find/.test(n);
s&&(e.prototype[n]=function(){var n=this.__wrapped__,c=i?[1]:arguments,u=n instanceof C,l=c[0],f=u||Ff(n),p=function(t){var n=s.apply(e,v([t],c));return i&&h?n[0]:n};f&&o&&"function"==typeof l&&1!=l.length&&(u=f=!1);var h=this.__chain__,d=!!this.__actions__.length,g=a&&!h,m=u&&!d;if(!a&&f){n=m?n:new C(this);var y=t.apply(n,c);return y.__actions__.push({func:Cs,args:[p],thisArg:V}),new r(y,h)}return g&&m?t.apply(this,c):(y=this.thru(p),g?i?y.value()[0]:y.value():y)})}),c(["pop","push","shift","sort","splice","unshift"],function(t){var n=Mu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",o=/^(?:pop|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;if(o&&!this.__chain__){var e=this.value();return n.apply(Ff(e)?e:[],t)}return this[r](function(e){return n.apply(Ff(e)?e:[],t)})}}),nr(C.prototype,function(t,n){var r=e[n];if(r){var o=r.name+"",i=Il[o]||(Il[o]=[]);i.push({name:n,func:r})}}),Il[qo(V,rt).name]=[{name:"wrapper",func:V}],C.prototype.clone=ze,C.prototype.reverse=Me,C.prototype.value=Ue,e.prototype.at=kf,e.prototype.chain=Ps,e.prototype.commit=js,e.prototype.next=Es,e.prototype.plant=Os,e.prototype.reverse=Is,e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=Rs,e.prototype.first=e.prototype.head,el&&(e.prototype[el]=Ss),e}var V,G="4.14.0",Y=200,Z="Expected a function",tt="__lodash_hash_undefined__",et="__lodash_placeholder__",nt=1,rt=2,ot=4,it=8,st=16,at=32,ct=64,ut=128,lt=256,ft=512,pt=1,ht=2,dt=30,vt="...",gt=150,mt=16,yt=1,wt=2,bt=3,_t=1/0,kt=9007199254740991,xt=1.7976931348623157e308,At=NaN,Tt=4294967295,Ct=Tt-1,Pt=Tt>>>1,jt=[["ary",ut],["bind",nt],["bindKey",rt],["curry",it],["curryRight",st],["flip",ft],["partial",at],["partialRight",ct],["rearg",lt]],Et="[object Arguments]",St="[object Array]",Ot="[object Boolean]",It="[object Date]",Rt="[object Error]",Dt="[object Function]",Bt="[object GeneratorFunction]",qt="[object Map]",zt="[object Number]",Mt="[object Object]",Ut="[object Promise]",Lt="[object RegExp]",Ft="[object Set]",Nt="[object String]",Wt="[object Symbol]",Ht="[object WeakMap]",Qt="[object WeakSet]",$t="[object ArrayBuffer]",Jt="[object DataView]",Xt="[object Float32Array]",Kt="[object Float64Array]",Vt="[object Int8Array]",Gt="[object Int16Array]",Yt="[object Int32Array]",Zt="[object Uint8Array]",te="[object Uint8ClampedArray]",ee="[object Uint16Array]",ne="[object Uint32Array]",re=/\b__p \+= '';/g,oe=/\b(__p \+=) '' \+/g,ie=/(__e\(.*?\)|\b__t\)) \+\n'';/g,se=/&(?:amp|lt|gt|quot|#39|#96);/g,ae=/[&<>"'`]/g,ce=RegExp(se.source),ue=RegExp(ae.source),le=/<%-([\s\S]+?)%>/g,fe=/<%([\s\S]+?)%>/g,pe=/<%=([\s\S]+?)%>/g,he=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,de=/^\w*$/,ve=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,ge=/[\\^$.*+?()[\]{}|]/g,me=RegExp(ge.source),ye=/^\s+|\s+$/g,we=/^\s+/,be=/\s+$/,_e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ke=/\{\n\/\* \[wrapped with (.+)\] \*/,xe=/,? & /,Ae=/[a-zA-Z0-9]+/g,Te=/\\(\\)?/g,Ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pe=/\w*$/,je=/^0x/i,Ee=/^[-+]0x[0-9a-f]+$/i,Se=/^0b[01]+$/i,Oe=/^\[object .+?Constructor\]$/,Ie=/^0o[0-7]+$/i,Re=/^(?:0|[1-9]\d*)$/,De=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Be=/($^)/,qe=/['\n\r\u2028\u2029\\]/g,ze="\\ud800-\\udfff",Me="\\u0300-\\u036f\\ufe20-\\ufe23",Ue="\\u20d0-\\u20f0",Le="\\u2700-\\u27bf",Fe="a-z\\xdf-\\xf6\\xf8-\\xff",Ne="\\xac\\xb1\\xd7\\xf7",We="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",He="\\u2000-\\u206f",Qe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$e="A-Z\\xc0-\\xd6\\xd8-\\xde",Je="\\ufe0e\\ufe0f",Xe=Ne+We+He+Qe,Ke="['’]",Ve="["+ze+"]",Ge="["+Xe+"]",Ye="["+Me+Ue+"]",Ze="\\d+",tn="["+Le+"]",en="["+Fe+"]",nn="[^"+ze+Xe+Ze+Le+Fe+$e+"]",rn="\\ud83c[\\udffb-\\udfff]",on="(?:"+Ye+"|"+rn+")",sn="[^"+ze+"]",an="(?:\\ud83c[\\udde6-\\uddff]){2}",cn="[\\ud800-\\udbff][\\udc00-\\udfff]",un="["+$e+"]",ln="\\u200d",fn="(?:"+en+"|"+nn+")",pn="(?:"+un+"|"+nn+")",hn="(?:"+Ke+"(?:d|ll|m|re|s|t|ve))?",dn="(?:"+Ke+"(?:D|LL|M|RE|S|T|VE))?",vn=on+"?",gn="["+Je+"]?",mn="(?:"+ln+"(?:"+[sn,an,cn].join("|")+")"+gn+vn+")*",yn=gn+vn+mn,wn="(?:"+[tn,an,cn].join("|")+")"+yn,bn="(?:"+[sn+Ye+"?",Ye,an,cn,Ve].join("|")+")",_n=RegExp(Ke,"g"),kn=RegExp(Ye,"g"),xn=RegExp(rn+"(?="+rn+")|"+bn+yn,"g"),An=RegExp([un+"?"+en+"+"+hn+"(?="+[Ge,un,"$"].join("|")+")",pn+"+"+dn+"(?="+[Ge,un+fn,"$"].join("|")+")",un+"?"+fn+"+"+hn,un+"+"+dn,Ze,wn].join("|"),"g"),Tn=RegExp("["+ln+ze+Me+Ue+Je+"]"),Cn=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jn=-1,En={};En[Xt]=En[Kt]=En[Vt]=En[Gt]=En[Yt]=En[Zt]=En[te]=En[ee]=En[ne]=!0,En[Et]=En[St]=En[$t]=En[Ot]=En[Jt]=En[It]=En[Rt]=En[Dt]=En[qt]=En[zt]=En[Mt]=En[Lt]=En[Ft]=En[Nt]=En[Ht]=!1;var Sn={};Sn[Et]=Sn[St]=Sn[$t]=Sn[Jt]=Sn[Ot]=Sn[It]=Sn[Xt]=Sn[Kt]=Sn[Vt]=Sn[Gt]=Sn[Yt]=Sn[qt]=Sn[zt]=Sn[Mt]=Sn[Lt]=Sn[Ft]=Sn[Nt]=Sn[Wt]=Sn[Zt]=Sn[te]=Sn[ee]=Sn[ne]=!0,Sn[Rt]=Sn[Dt]=Sn[Ht]=!1;var On={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},In={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Rn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Dn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Bn=parseFloat,qn=parseInt,zn="object"==typeof global&&global&&global.Object===Object&&global,Mn="object"==typeof self&&self&&self.Object===Object&&self,Un=zn||Mn||Function("return this")(),Ln=zn&&"object"==typeof e&&e,Fn=Ln&&"object"==typeof t&&t,Nn=Fn&&Fn.exports===Ln,Wn=Nn&&zn.process,Hn=function(){try{return Wn&&Wn.binding("util")}catch(t){}}(),Qn=Hn&&Hn.isArrayBuffer,$n=Hn&&Hn.isDate,Jn=Hn&&Hn.isMap,Xn=Hn&&Hn.isRegExp,Kn=Hn&&Hn.isSet,Vn=Hn&&Hn.isTypedArray,Gn=C(On),Yn=C(In),Zn=C(Rn),tr=K();Un._=tr,r=function(){return tr}.call(e,n,e,t),!(r!==V&&(t.exports=r))}).call(this)}).call(e,n(18)(t))},function(t,e){!function(n){if("object"==typeof e&&"undefined"!=typeof t)t.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.io=n()}}(function(){var t;return function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e,n){function r(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,r=o(t),i=r.source,u=r.id,l=r.path,f=c[u]&&l in c[u].nsps,p=e.forceNew||e["force new connection"]||!1===e.multiplex||f;return p?(a("ignoring socket cache for %s",i),n=s(i,e)):(c[u]||(a("new io instance for %s",i),c[u]=s(i,e)),n=c[u]),n.socket(r.path)}var o=t("./url"),i=t("socket.io-parser"),s=t("./manager"),a=t("debug")("socket.io-client");e.exports=n=r;var c=n.managers={};n.protocol=i.protocol,n.connect=r,n.Manager=t("./manager"),n.Socket=t("./socket")},{"./manager":2,"./socket":4,"./url":5,debug:14,"socket.io-parser":40}],2:[function(t,e,n){function r(t,e){return this instanceof r?(t&&"object"==typeof t&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[],this.encoder=new a.Encoder,this.decoder=new a.Decoder,this.autoConnect=e.autoConnect!==!1,void(this.autoConnect&&this.open())):new r(t,e)}var o=t("engine.io-client"),i=t("./socket"),s=t("component-emitter"),a=t("socket.io-parser"),c=t("./on"),u=t("component-bind"),l=t("debug")("socket.io-client:manager"),f=t("indexof"),p=t("backo2"),h=Object.prototype.hasOwnProperty;e.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var t in this.nsps)h.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},r.prototype.updateSocketIds=function(){for(var t in this.nsps)h.call(this.nsps,t)&&(this.nsps[t].id=this.engine.id)},s(r.prototype),r.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},r.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},r.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},r.prototype.open=r.prototype.connect=function(t){if(l("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;l("opening %s",this.uri),this.engine=o(this.uri,this.opts);var e=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var r=c(e,"open",function(){n.onopen(),t&&t()}),i=c(e,"error",function(e){if(l("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",e),t){var r=new Error("Connection error");r.data=e,t(r)}else n.maybeReconnectOnOpen()});if(!1!==this._timeout){var s=this._timeout;l("connect attempt will timeout after %d",s);var a=setTimeout(function(){l("connect attempt timed out after %d",s),r.destroy(),e.close(),e.emit("error","timeout"),n.emitAll("connect_timeout",s)},s);this.subs.push({destroy:function(){clearTimeout(a)}})}return this.subs.push(r),this.subs.push(i),this},r.prototype.onopen=function(){l("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(c(t,"data",u(this,"ondata"))),this.subs.push(c(t,"ping",u(this,"onping"))),this.subs.push(c(t,"pong",u(this,"onpong"))),this.subs.push(c(t,"error",u(this,"onerror"))),this.subs.push(c(t,"close",u(this,"onclose"))),this.subs.push(c(this.decoder,"decoded",u(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(t){this.decoder.add(t)},r.prototype.ondecoded=function(t){this.emit("packet",t)},r.prototype.onerror=function(t){l("error",t),this.emitAll("error",t)},r.prototype.socket=function(t){function e(){~f(r.connecting,n)||r.connecting.push(n)}var n=this.nsps[t];if(!n){n=new i(this,t),this.nsps[t]=n;var r=this;n.on("connecting",e),n.on("connect",function(){n.id=r.engine.id}),this.autoConnect&&e()}return n},r.prototype.destroy=function(t){var e=f(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},r.prototype.packet=function(t){l("writing packet %j",t);var e=this;e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(n){for(var r=0;r<n.length;r++)e.engine.write(n[r],t.options);e.encoding=!1,e.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},r.prototype.cleanup=function(){l("cleanup");for(var t;t=this.subs.shift();)t.destroy();this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){l("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(t){l("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)l("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();l("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(l("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(l("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(l("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},{"./on":3,"./socket":4,backo2:8,"component-bind":11,"component-emitter":12,debug:14,"engine.io-client":16,indexof:32,"socket.io-parser":40}],3:[function(t,e,n){function r(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}e.exports=r},{}],4:[function(t,e,n){function r(t,e){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.io.autoConnect&&this.open()}var o=t("socket.io-parser"),i=t("component-emitter"),s=t("to-array"),a=t("./on"),c=t("component-bind"),u=t("debug")("socket.io-client:socket"),l=t("has-binary");e.exports=n=r;var f={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},p=i.prototype.emit;i(r.prototype),r.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[a(t,"open",c(this,"onopen")),a(t,"packet",c(this,"onpacket")),a(t,"close",c(this,"onclose"))]}},r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"==this.io.readyState&&this.onopen(),this.emit("connecting"),this)},r.prototype.send=function(){var t=s(arguments);return t.unshift("message"),this.emit.apply(this,t),this},r.prototype.emit=function(t){if(f.hasOwnProperty(t))return p.apply(this,arguments),this;var e=s(arguments),n=o.EVENT;l(e)&&(n=o.BINARY_EVENT);var r={type:n,data:e};return r.options={},r.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),r.id=this.ids++),this.connected?this.packet(r):this.sendBuffer.push(r),delete this.flags,this},r.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},r.prototype.onopen=function(){u("transport is open - connecting"),"/"!=this.nsp&&this.packet({type:o.CONNECT})},r.prototype.onclose=function(t){u("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},r.prototype.onpacket=function(t){if(t.nsp==this.nsp)switch(t.type){case o.CONNECT:this.onconnect();break;case o.EVENT:this.onevent(t);break;case o.BINARY_EVENT:this.onevent(t);break;case o.ACK:this.onack(t);break;case o.BINARY_ACK:this.onack(t);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",t.data)}},r.prototype.onevent=function(t){var e=t.data||[];u("emitting event %j",e),null!=t.id&&(u("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?p.apply(this,e):this.receiveBuffer.push(e)},r.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var r=s(arguments);u("sending ack %j",r);var i=l(r)?o.BINARY_ACK:o.ACK;e.packet({type:i,id:t,data:r})}}},r.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(u("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):u("bad ack %s",t.id)},r.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},r.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)p.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},r.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},r.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},r.prototype.close=r.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},r.prototype.compress=function(t){return this.flags=this.flags||{},this.flags.compress=t,this}},{"./on":3,"component-bind":11,"component-emitter":12,debug:14,"has-binary":30,"socket.io-parser":40,"to-array":43}],5:[function(t,e,n){(function(n){function r(t,e){var r=t,e=e||n.location;null==t&&(t=e.protocol+"//"+e.host),"string"==typeof t&&("/"==t.charAt(0)&&(t="/"==t.charAt(1)?e.protocol+t:e.host+t),/^(https?|wss?):\/\//.test(t)||(i("protocol-less url %s",t),t="undefined"!=typeof e?e.protocol+"//"+t:"https://"+t),i("parse %s",t),r=o(t)),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+(e&&e.port==r.port?"":":"+r.port),r}var o=t("parseuri"),i=t("debug")("socket.io-client:url");e.exports=r}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{debug:14,parseuri:38}],6:[function(t,e,n){function r(t,e,n){function r(t,o){if(r.count<=0)throw new Error("after called too many times");--r.count,t?(i=!0,e(t),e=n):0!==r.count||i||e(null,o)}var i=!1;return n=n||o,r.count=t,0===t?e():r}function o(){}e.exports=r},{}],7:[function(t,e,n){e.exports=function(t,e,n){var r=t.byteLength;if(e=e||0,n=n||r,t.slice)return t.slice(e,n);if(e<0&&(e+=r),n<0&&(n+=r),n>r&&(n=r),e>=r||e>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(n-e),s=e,a=0;s<n;s++,a++)i[a]=o[s];return i.buffer}},{}],8:[function(t,e,n){function r(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}e.exports=r,r.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},r.prototype.reset=function(){this.attempts=0},r.prototype.setMin=function(t){this.ms=t},r.prototype.setMax=function(t){this.max=t},r.prototype.setJitter=function(t){this.jitter=t}},{}],9:[function(t,e,n){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Uint8Array(256),r=0;r<t.length;r++)e[t.charCodeAt(r)]=r;n.encode=function(e){var n,r=new Uint8Array(e),o=r.length,i="";for(n=0;n<o;n+=3)i+=t[r[n]>>2],i+=t[(3&r[n])<<4|r[n+1]>>4],i+=t[(15&r[n+1])<<2|r[n+2]>>6],i+=t[63&r[n+2]];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},n.decode=function(t){var n,r,o,i,s,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var l=new ArrayBuffer(a),f=new Uint8Array(l);for(n=0;n<c;n+=4)r=e[t.charCodeAt(n)],o=e[t.charCodeAt(n+1)],i=e[t.charCodeAt(n+2)],s=e[t.charCodeAt(n+3)],f[u++]=r<<2|o>>4,f[u++]=(15&o)<<4|i>>2,f[u++]=(3&i)<<6|63&s;return l}}()},{}],10:[function(t,e,n){(function(t){function n(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.buffer instanceof ArrayBuffer){var r=n.buffer;if(n.byteLength!==r.byteLength){var o=new Uint8Array(n.byteLength);o.set(new Uint8Array(r,n.byteOffset,n.byteLength)),r=o.buffer}t[e]=r}}}function r(t,e){e=e||{};var r=new i;n(t);for(var o=0;o<t.length;o++)r.append(t[o]);return e.type?r.getBlob(e.type):r.getBlob()}function o(t,e){return n(t),new Blob(t,e||{})}var i=t.BlobBuilder||t.WebKitBlobBuilder||t.MSBlobBuilder||t.MozBlobBuilder,s=function(){try{var t=new Blob(["hi"]);return 2===t.size}catch(e){return!1}}(),a=s&&function(){try{var t=new Blob([new Uint8Array([1,2])]);return 2===t.size}catch(e){return!1}}(),c=i&&i.prototype.append&&i.prototype.getBlob;e.exports=function(){return s?a?t.Blob:o:c?r:void 0}()}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{}],11:[function(t,e,n){var r=[].slice;e.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var n=r.call(arguments,2);return function(){return e.apply(t,n.concat(r.call(arguments)))}}},{}],12:[function(t,e,n){function r(t){if(t)return o(t)}function o(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},{}],13:[function(t,e,n){e.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},{}],14:[function(t,e,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 o(){var t=arguments,e=this.useColors;if(t[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+t[0]+(e?"%c ":" ")+"+"+n.humanize(this.diff),!e)return t;var r="color: "+this.color;t=[t[0],r,"color: inherit"].concat(Array.prototype.slice.call(t,1));var o=0,i=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))}),t.splice(i,0,r),t}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?n.storage.removeItem("debug"):n.storage.debug=t}catch(e){}}function a(){var t;try{t=n.storage.debug}catch(e){}return t}function c(){try{return window.localStorage}catch(t){}}n=e.exports=t("./debug"),n.log=i,n.formatArgs=o,n.save=s,n.load=a,n.useColors=r,n.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(t){return JSON.stringify(t)},n.enable(a())},{"./debug":15}],15:[function(t,e,n){function r(){return n.colors[l++%n.colors.length]}function o(t){function e(){}function o(){var t=o,e=+new Date,i=e-(u||e);t.diff=i,t.prev=u,t.curr=e,u=e,null==t.useColors&&(t.useColors=n.useColors()),null==t.color&&t.useColors&&(t.color=r());var s=Array.prototype.slice.call(arguments);s[0]=n.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(e,r){if("%%"===e)return e;a++;var o=n.formatters[r];if("function"==typeof o){var i=s[a];e=o.call(t,i),s.splice(a,1),a--}return e}),"function"==typeof n.formatArgs&&(s=n.formatArgs.apply(t,s));var c=o.log||n.log||console.log.bind(console);c.apply(t,s)}e.enabled=!1,o.enabled=!0;var i=n.enabled(t)?o:e;return i.namespace=t,i}function i(t){n.save(t);for(var e=(t||"").split(/[\s,]+/),r=e.length,o=0;o<r;o++)e[o]&&(t=e[o].replace(/\*/g,".*?"),"-"===t[0]?n.skips.push(new RegExp("^"+t.substr(1)+"$")):n.names.push(new RegExp("^"+t+"$")))}function s(){n.enable("")}function a(t){var e,r;for(e=0,r=n.skips.length;e<r;e++)if(n.skips[e].test(t))return!1;for(e=0,r=n.names.length;e<r;e++)if(n.names[e].test(t))return!0;return!1}function c(t){return t instanceof Error?t.stack||t.message:t}n=e.exports=o,n.coerce=c,n.disable=s,n.enable=i,n.enabled=a,n.humanize=t("ms"),n.names=[],n.skips=[],n.formatters={};var u,l=0},{ms:35}],16:[function(t,e,n){e.exports=t("./lib/")},{"./lib/":17}],17:[function(t,e,n){e.exports=t("./socket"),e.exports.parser=t("engine.io-parser")},{"./socket":18,"engine.io-parser":27}],18:[function(t,e,n){(function(n){function r(t,e){if(!(this instanceof r))return new r(t,e);e=e||{},t&&"object"==typeof t&&(e=t,t=null),t?(t=l(t),e.hostname=t.host,e.secure="https"==t.protocol||"wss"==t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=l(e.host).host),this.secure=null!=e.secure?e.secure:n.location&&"https:"==location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.agent=e.agent||!1,this.hostname=e.hostname||(n.location?location.hostname:"localhost"),this.port=e.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=e.query||{},"string"==typeof this.query&&(this.query=p.decode(this.query)),this.upgrade=!1!==e.upgrade,this.path=(e.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!e.forceJSONP,this.jsonp=!1!==e.jsonp,this.forceBase64=!!e.forceBase64,this.enablesXDR=!!e.enablesXDR,this.timestampParam=e.timestampParam||"t",this.timestampRequests=e.timestampRequests,this.transports=e.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.policyPort=e.policyPort||843,this.rememberUpgrade=e.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=e.onlyBinaryUpgrades,this.perMessageDeflate=!1!==e.perMessageDeflate&&(e.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=e.pfx||null,this.key=e.key||null,this.passphrase=e.passphrase||null,this.cert=e.cert||null,this.ca=e.ca||null,this.ciphers=e.ciphers||null,this.rejectUnauthorized=void 0===e.rejectUnauthorized||e.rejectUnauthorized;var o="object"==typeof n&&n;o.global===o&&e.extraHeaders&&Object.keys(e.extraHeaders).length>0&&(this.extraHeaders=e.extraHeaders),this.open()}function o(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var i=t("./transports"),s=t("component-emitter"),a=t("debug")("engine.io-client:socket"),c=t("indexof"),u=t("engine.io-parser"),l=t("parseuri"),f=t("parsejson"),p=t("parseqs");e.exports=r,r.priorWebsocketSuccess=!1,s(r.prototype),r.protocol=u.protocol,r.Socket=r,r.Transport=t("./transport"),r.transports=t("./transports"),r.parser=t("engine.io-parser"),r.prototype.createTransport=function(t){a('creating transport "%s"',t);var e=o(this.query);e.EIO=u.protocol,e.transport=t,this.id&&(e.sid=this.id);var n=new i[t]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:e,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});return n},r.prototype.open=function(){var t;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(n){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},r.prototype.setTransport=function(t){a("setting transport %s",t.name);var e=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},r.prototype.probe=function(t){function e(){if(p.onlyBinaryUpgrades){var e=!this.supportsBinary&&p.transport.supportsBinary;f=f||e}f||(a('probe transport "%s" opened',t),l.send([{type:"ping",data:"probe"}]),l.once("packet",function(e){if(!f)if("pong"==e.type&&"probe"==e.data){if(a('probe transport "%s" pong',t),p.upgrading=!0,p.emit("upgrading",l),!l)return;r.priorWebsocketSuccess="websocket"==l.name,a('pausing current transport "%s"',p.transport.name),p.transport.pause(function(){f||"closed"!=p.readyState&&(a("changing transport and sending upgrade packet"),u(),p.setTransport(l),l.send([{type:"upgrade"}]),p.emit("upgrade",l),l=null,p.upgrading=!1,p.flush())})}else{a('probe transport "%s" failed',t);var n=new Error("probe error");n.transport=l.name,p.emit("upgradeError",n)}}))}function n(){f||(f=!0,u(),l.close(),l=null)}function o(e){var r=new Error("probe error: "+e);r.transport=l.name,n(),a('probe transport "%s" failed because of error: %s',t,e),p.emit("upgradeError",r)}function i(){o("transport closed")}function s(){o("socket closed")}function c(t){l&&t.name!=l.name&&(a('"%s" works - aborting "%s"',t.name,l.name),n())}function u(){l.removeListener("open",e),l.removeListener("error",o),l.removeListener("close",i),p.removeListener("close",s),p.removeListener("upgrading",c)}a('probing transport "%s"',t);var l=this.createTransport(t,{probe:1}),f=!1,p=this;r.priorWebsocketSuccess=!1,l.once("open",e),l.once("error",o),l.once("close",i),this.once("close",s),this.once("upgrading",c),l.open()},r.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},r.prototype.onPacket=function(t){if("opening"==this.readyState||"open"==this.readyState)switch(a('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),
this.emit("heartbeat"),t.type){case"open":this.onHandshake(f(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else a('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!=this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!=e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},r.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){a("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},r.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},r.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},r.prototype.flush=function(){"closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},r.prototype.write=r.prototype.send=function(t,e,n){return this.sendPacket("message",t,e,n),this},r.prototype.sendPacket=function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!=this.readyState&&"closed"!=this.readyState){n=n||{},n.compress=!1!==n.compress;var o={type:t,data:e,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},r.prototype.close=function(){function t(){r.onClose("forced close"),a("socket closing - telling transport to close"),r.transport.close()}function e(){r.removeListener("upgrade",e),r.removeListener("upgradeError",e),t()}function n(){r.once("upgrade",e),r.once("upgradeError",e)}if("opening"==this.readyState||"open"==this.readyState){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():t()}):this.upgrading?n():t()}return this},r.prototype.onError=function(t){a("socket error %j",t),r.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},r.prototype.onClose=function(t,e){if("opening"==this.readyState||"open"==this.readyState||"closing"==this.readyState){a('socket close with reason: "%s"',t);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e),n.writeBuffer=[],n.prevBufferLen=0}},r.prototype.filterUpgrades=function(t){for(var e=[],n=0,r=t.length;n<r;n++)~c(this.transports,t[n])&&e.push(t[n]);return e}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{"./transport":19,"./transports":20,"component-emitter":26,debug:14,"engine.io-parser":27,indexof:32,parsejson:36,parseqs:37,parseuri:38}],19:[function(t,e,n){function r(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders}var o=t("engine.io-parser"),i=t("component-emitter");e.exports=r,i(r.prototype),r.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},r.prototype.open=function(){return"closed"!=this.readyState&&""!=this.readyState||(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return"opening"!=this.readyState&&"open"!=this.readyState||(this.doClose(),this.onClose()),this},r.prototype.send=function(t){if("open"!=this.readyState)throw new Error("Transport not open");this.write(t)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(t){var e=o.decodePacket(t,this.socket.binaryType);this.onPacket(e)},r.prototype.onPacket=function(t){this.emit("packet",t)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":26,"engine.io-parser":27}],20:[function(t,e,n){(function(e){function r(t){var n,r=!1,a=!1,c=!1!==t.jsonp;if(e.location){var u="https:"==location.protocol,l=location.port;l||(l=u?443:80),r=t.hostname!=location.hostname||l!=t.port,a=t.secure!=u}if(t.xdomain=r,t.xscheme=a,n=new o(t),"open"in n&&!t.forceJSONP)return new i(t);if(!c)throw new Error("JSONP disabled");return new s(t)}var o=t("xmlhttprequest-ssl"),i=t("./polling-xhr"),s=t("./polling-jsonp"),a=t("./websocket");n.polling=r,n.websocket=a}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{"./polling-jsonp":21,"./polling-xhr":22,"./websocket":24,"xmlhttprequest-ssl":25}],21:[function(t,e,n){(function(n){function r(){}function o(t){i.call(this,t),this.query=this.query||{},a||(n.___eio||(n.___eio=[]),a=n.___eio),this.index=a.length;var e=this;a.push(function(t){e.onData(t)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){e.script&&(e.script.onerror=r)},!1)}var i=t("./polling"),s=t("component-inherit");e.exports=o;var a,c=/\n/g,u=/\\n/g;s(o,i),o.prototype.supportsBinary=!1,o.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),i.prototype.doClose.call(this)},o.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(e,n):(document.head||document.body).appendChild(e),this.script=e;var r="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);r&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},o.prototype.doWrite=function(t,e){function n(){r(),e()}function r(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(t){o.onError("jsonp polling iframe removal error",t)}try{var e='<iframe src="javascript:0" name="'+o.iframeId+'">';i=document.createElement(e)}catch(t){i=document.createElement("iframe"),i.name=o.iframeId,i.src="javascript:0"}i.id=o.iframeId,o.form.appendChild(i),o.iframe=i}var o=this;if(!this.form){var i,s=document.createElement("form"),a=document.createElement("textarea"),l=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=l,s.method="POST",s.setAttribute("accept-charset","utf-8"),a.name="d",s.appendChild(a),document.body.appendChild(s),this.form=s,this.area=a}this.form.action=this.uri(),r(),t=t.replace(u,"\\\n"),this.area.value=t.replace(c,"\\n");try{this.form.submit()}catch(f){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"==o.iframe.readyState&&n()}:this.iframe.onload=n}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{"./polling":23,"component-inherit":13}],22:[function(t,e,n){(function(n){function r(){}function o(t){if(c.call(this,t),n.location){var e="https:"==location.protocol,r=location.port;r||(r=e?443:80),this.xd=t.hostname!=n.location.hostname||r!=t.port,this.xs=t.secure!=e}else this.extraHeaders=t.extraHeaders}function i(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!=t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}function s(){for(var t in i.requests)i.requests.hasOwnProperty(t)&&i.requests[t].abort()}var a=t("xmlhttprequest-ssl"),c=t("./polling"),u=t("component-emitter"),l=t("component-inherit"),f=t("debug")("engine.io-client:polling-xhr");e.exports=o,e.exports.Request=i,l(o,c),o.prototype.supportsBinary=!0,o.prototype.request=function(t){return t=t||{},t.uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.extraHeaders=this.extraHeaders,new i(t)},o.prototype.doWrite=function(t,e){var n="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:n}),o=this;r.on("success",e),r.on("error",function(t){o.onError("xhr post error",t)}),this.sendXhr=r},o.prototype.doPoll=function(){f("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},u(i.prototype),i.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var e=this.xhr=new a(t),r=this;try{f("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.extraHeaders){e.setDisableHeaderCheck(!0);for(var o in this.extraHeaders)this.extraHeaders.hasOwnProperty(o)&&e.setRequestHeader(o,this.extraHeaders[o])}}catch(s){}if(this.supportsBinary&&(e.responseType="arraybuffer"),"POST"==this.method)try{this.isBinary?e.setRequestHeader("Content-type","application/octet-stream"):e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}"withCredentials"in e&&(e.withCredentials=!0),this.hasXDR()?(e.onload=function(){r.onLoad()},e.onerror=function(){r.onError(e.responseText)}):e.onreadystatechange=function(){4==e.readyState&&(200==e.status||1223==e.status?r.onLoad():setTimeout(function(){r.onError(e.status)},0))},f("xhr data %s",this.data),e.send(this.data)}catch(s){return void setTimeout(function(){r.onError(s)},0)}n.document&&(this.index=i.requestsCount++,i.requests[this.index]=this)},i.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},i.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},i.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},i.prototype.cleanup=function(t){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=r:this.xhr.onreadystatechange=r,t)try{this.xhr.abort()}catch(e){}n.document&&delete i.requests[this.index],this.xhr=null}},i.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(n){}if("application/octet-stream"===e)t=this.xhr.response;else if(this.supportsBinary)try{t=String.fromCharCode.apply(null,new Uint8Array(this.xhr.response))}catch(n){for(var r=new Uint8Array(this.xhr.response),o=[],i=0,s=r.length;i<s;i++)o.push(r[i]);t=String.fromCharCode.apply(null,o)}else t=this.xhr.responseText}catch(n){this.onError(n)}null!=t&&this.onData(t)},i.prototype.hasXDR=function(){return"undefined"!=typeof n.XDomainRequest&&!this.xs&&this.enablesXDR},i.prototype.abort=function(){this.cleanup()},n.document&&(i.requestsCount=0,i.requests={},n.attachEvent?n.attachEvent("onunload",s):n.addEventListener&&n.addEventListener("beforeunload",s,!1))}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{"./polling":23,"component-emitter":26,"component-inherit":13,debug:14,"xmlhttprequest-ssl":25}],23:[function(t,e,n){function r(t){var e=t&&t.forceBase64;l&&!e||(this.supportsBinary=!1),o.call(this,t)}var o=t("../transport"),i=t("parseqs"),s=t("engine.io-parser"),a=t("component-inherit"),c=t("yeast"),u=t("debug")("engine.io-client:polling");e.exports=r;var l=function(){var e=t("xmlhttprequest-ssl"),n=new e({xdomain:!1});return null!=n.responseType}();a(r,o),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(t){function e(){u("paused"),n.readyState="paused",t()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(u("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){u("pre-pause polling complete"),--r||e()})),this.writable||(u("we are currently writing - waiting to pause"),r++,this.once("drain",function(){u("pre-pause writing complete"),--r||e()}))}else e()},r.prototype.poll=function(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(t){var e=this;u("polling got data %s",t);var n=function(t,n,r){return"opening"==e.readyState&&e.onOpen(),"close"==t.type?(e.onClose(),!1):void e.onPacket(t)};s.decodePayload(t,this.socket.binaryType,n),"closed"!=this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"==this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function t(){u("writing close packet"),e.write([{type:"close"}])}var e=this;"open"==this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))},r.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")},e=this;s.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,n)})},r.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",n="";!1!==this.timestampRequests&&(t[this.timestampParam]=c()),this.supportsBinary||t.sid||(t.b64=1),t=i.encode(t),this.port&&("https"==e&&443!=this.port||"http"==e&&80!=this.port)&&(n=":"+this.port),t.length&&(t="?"+t);var r=this.hostname.indexOf(":")!==-1;return e+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+t}},{"../transport":19,"component-inherit":13,debug:14,"engine.io-parser":27,parseqs:37,"xmlhttprequest-ssl":25,yeast:45}],24:[function(t,e,n){(function(n){function r(t){var e=t&&t.forceBase64;e&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,o.call(this,t)}var o=t("../transport"),i=t("engine.io-parser"),s=t("parseqs"),a=t("component-inherit"),c=t("yeast"),u=t("debug")("engine.io-client:websocket"),l=n.WebSocket||n.MozWebSocket,f=l;if(!f&&"undefined"==typeof window)try{f=t("ws")}catch(p){}e.exports=r,a(r,o),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=void 0,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.ws=l?new f(t):new f(t,e,n),void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="buffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},"undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(r.prototype.onData=function(t){var e=this;setTimeout(function(){o.prototype.onData.call(e,t)},0)}),r.prototype.write=function(t){function e(){r.emit("flush"),setTimeout(function(){r.writable=!0,r.emit("drain")},0)}var r=this;this.writable=!1;for(var o=t.length,s=0,a=o;s<a;s++)!function(t){i.encodePacket(t,r.supportsBinary,function(i){if(!l){var s={};if(t.options&&(s.compress=t.options.compress),r.perMessageDeflate){var a="string"==typeof i?n.Buffer.byteLength(i):i.length;a<r.perMessageDeflate.threshold&&(s.compress=!1)}}try{l?r.ws.send(i):r.ws.send(i,s)}catch(c){u("websocket closed before onclose event")}--o||e()})}(t[s])},r.prototype.onClose=function(){o.prototype.onClose.call(this)},r.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},r.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",n="";this.port&&("wss"==e&&443!=this.port||"ws"==e&&80!=this.port)&&(n=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=c()),this.supportsBinary||(t.b64=1),t=s.encode(t),t.length&&(t="?"+t);var r=this.hostname.indexOf(":")!==-1;return e+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+t},r.prototype.check=function(){return!(!f||"__initialize"in f&&this.name===r.prototype.name)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{"../transport":19,"component-inherit":13,debug:14,"engine.io-parser":27,parseqs:37,ws:void 0,yeast:45}],25:[function(t,e,n){var r=t("has-cors");e.exports=function(t){var e=t.xdomain,n=t.xscheme,o=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r))return new XMLHttpRequest}catch(i){}try{if("undefined"!=typeof XDomainRequest&&!n&&o)return new XDomainRequest}catch(i){}if(!e)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(i){}}},{"has-cors":31}],26:[function(t,e,n){function r(t){if(t)return o(t)}function o(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){r.off(t,n),e.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks[t];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},{}],27:[function(t,e,n){(function(e){function r(t,e){var r="b"+n.packets[t.type]+t.data.data;return e(r)}function o(t,e,r){if(!e)return n.encodeBase64Packet(t,r);var o=t.data,i=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=m[t.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return r(s.buffer)}function i(t,e,r){if(!e)return n.encodeBase64Packet(t,r);var o=new FileReader;return o.onload=function(){t.data=o.result,n.encodePacket(t,e,!0,r)},o.readAsArrayBuffer(t.data)}function s(t,e,r){if(!e)return n.encodeBase64Packet(t,r);if(g)return i(t,e,r);var o=new Uint8Array(1);o[0]=m[t.type];var s=new b([o.buffer,t.data]);return r(s)}function a(t,e,n){for(var r=new Array(t.length),o=p(t.length,n),i=function(t,n,o){e(n,function(e,n){r[t]=n,o(e,r)})},s=0;s<t.length;s++)i(s,t[s],o)}var c=t("./keys"),u=t("has-binary"),l=t("arraybuffer.slice"),f=t("base64-arraybuffer"),p=t("after"),h=t("utf8"),d=navigator.userAgent.match(/Android/i),v=/PhantomJS/i.test(navigator.userAgent),g=d||v;n.protocol=3;var m=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},y=c(m),w={type:"error",data:"parser error"},b=t("blob");n.encodePacket=function(t,n,i,a){"function"==typeof n&&(a=n,n=!1),"function"==typeof i&&(a=i,i=null);var c=void 0===t.data?void 0:t.data.buffer||t.data;if(e.ArrayBuffer&&c instanceof ArrayBuffer)return o(t,n,a);if(b&&c instanceof e.Blob)return s(t,n,a);if(c&&c.base64)return r(t,a);var u=m[t.type];return void 0!==t.data&&(u+=i?h.encode(String(t.data)):String(t.data)),a(""+u)},n.encodeBase64Packet=function(t,r){var o="b"+n.packets[t.type];if(b&&t.data instanceof e.Blob){var i=new FileReader;return i.onload=function(){var t=i.result.split(",")[1];r(o+t)},i.readAsDataURL(t.data)}var s;try{s=String.fromCharCode.apply(null,new Uint8Array(t.data))}catch(a){for(var c=new Uint8Array(t.data),u=new Array(c.length),l=0;l<c.length;l++)u[l]=c[l];s=String.fromCharCode.apply(null,u)}return o+=e.btoa(s),r(o)},n.decodePacket=function(t,e,r){if("string"==typeof t||void 0===t){if("b"==t.charAt(0))return n.decodeBase64Packet(t.substr(1),e);if(r)try{t=h.decode(t)}catch(o){return w}var i=t.charAt(0);return Number(i)==i&&y[i]?t.length>1?{type:y[i],data:t.substring(1)}:{type:y[i]}:w}var s=new Uint8Array(t),i=s[0],a=l(t,1);return b&&"blob"===e&&(a=new b([a])),{type:y[i],data:a}},n.decodeBase64Packet=function(t,n){var r=y[t.charAt(0)];if(!e.ArrayBuffer)return{type:r,data:{base64:!0,data:t.substr(1)}};var o=f.decode(t.substr(1));return"blob"===n&&b&&(o=new b([o])),{type:r,data:o}},n.encodePayload=function(t,e,r){function o(t){return t.length+":"+t}function i(t,r){n.encodePacket(t,!!s&&e,!0,function(t){r(null,o(t))})}"function"==typeof e&&(r=e,e=null);var s=u(t);return e&&s?b&&!g?n.encodePayloadAsBlob(t,r):n.encodePayloadAsArrayBuffer(t,r):t.length?void a(t,i,function(t,e){return r(e.join(""))}):r("0:")},n.decodePayload=function(t,e,r){if("string"!=typeof t)return n.decodePayloadAsBinary(t,e,r);"function"==typeof e&&(r=e,e=null);var o;if(""==t)return r(w,0,1);for(var i,s,a="",c=0,u=t.length;c<u;c++){var l=t.charAt(c);if(":"!=l)a+=l;else{if(""==a||a!=(i=Number(a)))return r(w,0,1);if(s=t.substr(c+1,i),a!=s.length)return r(w,0,1);if(s.length){if(o=n.decodePacket(s,e,!0),w.type==o.type&&w.data==o.data)return r(w,0,1);var f=r(o,c+i,u);if(!1===f)return}c+=i,a=""}}return""!=a?r(w,0,1):void 0},n.encodePayloadAsArrayBuffer=function(t,e){function r(t,e){n.encodePacket(t,!0,!0,function(t){return e(null,t)})}return t.length?void a(t,r,function(t,n){var r=n.reduce(function(t,e){var n;return n="string"==typeof e?e.length:e.byteLength,t+n.toString().length+n+2},0),o=new Uint8Array(r),i=0;return n.forEach(function(t){var e="string"==typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),s=0;s<t.length;s++)r[s]=t.charCodeAt(s);n=r.buffer}e?o[i++]=0:o[i++]=1;for(var a=n.byteLength.toString(),s=0;s<a.length;s++)o[i++]=parseInt(a[s]);o[i++]=255;for(var r=new Uint8Array(n),s=0;s<r.length;s++)o[i++]=r[s]}),e(o.buffer)}):e(new ArrayBuffer(0))},n.encodePayloadAsBlob=function(t,e){function r(t,e){n.encodePacket(t,!0,!0,function(t){var n=new Uint8Array(1);if(n[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);t=r.buffer,n[0]=0}for(var i=t instanceof ArrayBuffer?t.byteLength:t.size,s=i.toString(),a=new Uint8Array(s.length+1),o=0;o<s.length;o++)a[o]=parseInt(s[o]);if(a[s.length]=255,b){var c=new b([n.buffer,a.buffer,t]);e(null,c)}})}a(t,r,function(t,n){return e(new b(n))})},n.decodePayloadAsBinary=function(t,e,r){"function"==typeof e&&(r=e,e=null);for(var o=t,i=[],s=!1;o.byteLength>0;){for(var a=new Uint8Array(o),c=0===a[0],u="",f=1;255!=a[f];f++){if(u.length>310){s=!0;break}u+=a[f]}if(s)return r(w,0,1);o=l(o,2+u.length),u=parseInt(u);var p=l(o,0,u);if(c)try{p=String.fromCharCode.apply(null,new Uint8Array(p))}catch(h){var d=new Uint8Array(p);p="";for(var f=0;f<d.length;f++)p+=String.fromCharCode(d[f])}i.push(p),o=l(o,u)}var v=i.length;i.forEach(function(t,o){r(n.decodePacket(t,e,!0),o,v)})}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{"./keys":28,after:6,"arraybuffer.slice":7,"base64-arraybuffer":9,blob:10,"has-binary":29,utf8:44}],28:[function(t,e,n){e.exports=Object.keys||function(t){var e=[],n=Object.prototype.hasOwnProperty;for(var r in t)n.call(t,r)&&e.push(r);return e}},{}],29:[function(t,e,n){(function(n){function r(t){function e(t){if(!t)return!1;if(n.Buffer&&n.Buffer.isBuffer(t)||n.ArrayBuffer&&t instanceof ArrayBuffer||n.Blob&&t instanceof Blob||n.File&&t instanceof File)return!0;if(o(t)){for(var r=0;r<t.length;r++)if(e(t[r]))return!0}else if(t&&"object"==typeof t){t.toJSON&&(t=t.toJSON());for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return!0}return!1}return e(t)}var o=t("isarray");e.exports=r}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{isarray:33}],30:[function(t,e,n){(function(n){function r(t){function e(t){if(!t)return!1;if(n.Buffer&&n.Buffer.isBuffer&&n.Buffer.isBuffer(t)||n.ArrayBuffer&&t instanceof ArrayBuffer||n.Blob&&t instanceof Blob||n.File&&t instanceof File)return!0;if(o(t)){for(var r=0;r<t.length;r++)if(e(t[r]))return!0}else if(t&&"object"==typeof t){t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON());for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return!0}return!1}return e(t)}var o=t("isarray");e.exports=r}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{isarray:33}],31:[function(t,e,n){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(r){e.exports=!1}},{}],32:[function(t,e,n){var r=[].indexOf;e.exports=function(t,e){if(r)return t.indexOf(e);for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}},{}],33:[function(t,e,n){e.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},{}],34:[function(e,n,r){(function(e){(function(){function o(t,e){function n(t){if(n[t]!==g)return n[t];var o;if("bug-string-char-index"==t)o="a"!="a"[0];else if("json"==t)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"==t){var c=e.stringify,l="function"==typeof c&&w;if(l){(s=function(){return 1}).toJSON=s;try{l="0"===c(0)&&"0"===c(new r)&&'""'==c(new i)&&c(y)===g&&c(g)===g&&c()===g&&"1"===c(s)&&"[1]"==c([s])&&"[null]"==c([g])&&"null"==c(null)&&"[null,null,null]"==c([g,y,null])&&c({a:[s,!0,!1,null,"\0\b\n\f\r\t"]})==a&&"1"===c(null,s)&&"[\n 1,\n 2\n]"==c([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==c(new u((-864e13)))&&'"+275760-09-13T00:00:00.000Z"'==c(new u(864e13))&&'"-000001-01-01T00:00:00.000Z"'==c(new u((-621987552e5)))&&'"1969-12-31T23:59:59.999Z"'==c(new u((-1)))}catch(f){l=!1}}o=l}if("json-parse"==t){var p=e.parse;if("function"==typeof p)try{if(0===p("0")&&!p(!1)){s=p(a);var h=5==s.a.length&&1===s.a[0];if(h){try{h=!p('"\t"')}catch(f){}if(h)try{h=1!==p("01")}catch(f){}if(h)try{h=1!==p("1.")}catch(f){}}}}catch(f){h=!1}o=h}}return n[t]=!!o}t||(t=c.Object()),e||(e=c.Object());var r=t.Number||c.Number,i=t.String||c.String,a=t.Object||c.Object,u=t.Date||c.Date,l=t.SyntaxError||c.SyntaxError,f=t.TypeError||c.TypeError,p=t.Math||c.Math,h=t.JSON||c.JSON;"object"==typeof h&&h&&(e.stringify=h.stringify,e.parse=h.parse);var d,v,g,m=a.prototype,y=m.toString,w=new u((-0xc782b5b800cec));try{w=w.getUTCFullYear()==-109252&&0===w.getUTCMonth()&&1===w.getUTCDate()&&10==w.getUTCHours()&&37==w.getUTCMinutes()&&6==w.getUTCSeconds()&&708==w.getUTCMilliseconds()}catch(b){}if(!n("json")){var _="[object Function]",k="[object Date]",x="[object Number]",A="[object String]",T="[object Array]",C="[object Boolean]",P=n("bug-string-char-index");if(!w)var j=p.floor,E=[0,31,59,90,120,151,181,212,243,273,304,334],S=function(t,e){return E[e]+365*(t-1970)+j((t-1969+(e=+(e>1)))/4)-j((t-1901+e)/100)+j((t-1601+e)/400)};if((d=m.hasOwnProperty)||(d=function(t){var e,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=y?d=function(t){var e=this.__proto__,n=t in(this.__proto__=null,this);return this.__proto__=e,n}:(e=n.constructor,d=function(t){var n=(this.constructor||e).prototype;return t in this&&!(t in n&&this[t]===n[t])}),n=null,d.call(this,t)}),v=function(t,e){var n,r,o,i=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(o in r)d.call(r,o)&&i++;return n=r=null,i?v=2==i?function(t,e){var n,r={},o=y.call(t)==_;for(n in t)o&&"prototype"==n||d.call(r,n)||!(r[n]=1)||!d.call(t,n)||e(n)}:function(t,e){var n,r,o=y.call(t)==_;for(n in t)o&&"prototype"==n||!d.call(t,n)||(r="constructor"===n)||e(n);(r||d.call(t,n="constructor"))&&e(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(t,e){var n,o,i=y.call(t)==_,a=!i&&"function"!=typeof t.constructor&&s[typeof t.hasOwnProperty]&&t.hasOwnProperty||d;for(n in t)i&&"prototype"==n||!a.call(t,n)||e(n);for(o=r.length;n=r[--o];a.call(t,n)&&e(n));}),v(t,e)},!n("json-stringify")){var O={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},I="000000",R=function(t,e){return(I+(e||0)).slice(-t)},D="\\u00",B=function(t){for(var e='"',n=0,r=t.length,o=!P||r>10,i=o&&(P?t.split(""):t);n<r;n++){var s=t.charCodeAt(n);switch(s){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=O[s];break;default:if(s<32){e+=D+R(2,s.toString(16));break}e+=o?i[n]:t.charAt(n)}}return e+'"'},q=function(t,e,n,r,o,i,s){var a,c,u,l,p,h,m,w,b,_,P,E,O,I,D,z;try{a=e[t]}catch(M){}if("object"==typeof a&&a)if(c=y.call(a),c!=k||d.call(a,"toJSON"))"function"==typeof a.toJSON&&(c!=x&&c!=A&&c!=T||d.call(a,"toJSON"))&&(a=a.toJSON(t));else if(a>-1/0&&a<1/0){if(S){for(p=j(a/864e5),u=j(p/365.2425)+1970-1;S(u+1,0)<=p;u++);for(l=j((p-S(u,0))/30.42);S(u,l+1)<=p;l++);p=1+p-S(u,l),h=(a%864e5+864e5)%864e5,m=j(h/36e5)%24,w=j(h/6e4)%60,b=j(h/1e3)%60,_=h%1e3}else u=a.getUTCFullYear(),l=a.getUTCMonth(),p=a.getUTCDate(),m=a.getUTCHours(),w=a.getUTCMinutes(),b=a.getUTCSeconds(),_=a.getUTCMilliseconds();a=(u<=0||u>=1e4?(u<0?"-":"+")+R(6,u<0?-u:u):R(4,u))+"-"+R(2,l+1)+"-"+R(2,p)+"T"+R(2,m)+":"+R(2,w)+":"+R(2,b)+"."+R(3,_)+"Z"}else a=null;if(n&&(a=n.call(e,t,a)),null===a)return"null";if(c=y.call(a),c==C)return""+a;if(c==x)return a>-1/0&&a<1/0?""+a:"null";if(c==A)return B(""+a);if("object"==typeof a){for(I=s.length;I--;)if(s[I]===a)throw f();if(s.push(a),P=[],D=i,i+=o,c==T){for(O=0,I=a.length;O<I;O++)E=q(O,a,n,r,o,i,s),P.push(E===g?"null":E);z=P.length?o?"[\n"+i+P.join(",\n"+i)+"\n"+D+"]":"["+P.join(",")+"]":"[]"}else v(r||a,function(t){var e=q(t,a,n,r,o,i,s);e!==g&&P.push(B(t)+":"+(o?" ":"")+e)}),z=P.length?o?"{\n"+i+P.join(",\n"+i)+"\n"+D+"}":"{"+P.join(",")+"}":"{}";return s.pop(),z}};e.stringify=function(t,e,n){var r,o,i,a;if(s[typeof e]&&e)if((a=y.call(e))==_)o=e;else if(a==T){i={};for(var c,u=0,l=e.length;u<l;c=e[u++],a=y.call(c),(a==A||a==x)&&(i[c]=1));}if(n)if((a=y.call(n))==x){if((n-=n%1)>0)for(r="",n>10&&(n=10);r.length<n;r+=" ");}else a==A&&(r=n.length<=10?n:n.slice(0,10));return q("",(c={},c[""]=t,c),o,i,r,"",[])}}if(!n("json-parse")){var z,M,U=i.fromCharCode,L={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},F=function(){throw z=M=null,l()},N=function(){for(var t,e,n,r,o,i=M,s=i.length;z<s;)switch(o=i.charCodeAt(z)){case 9:case 10:case 13:case 32:z++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=P?i.charAt(z):i[z],z++,t;case 34:for(t="@",z++;z<s;)if(o=i.charCodeAt(z),o<32)F();else if(92==o)switch(o=i.charCodeAt(++z)){case 92:case 34:case 47:case 98:
case 116:case 110:case 102:case 114:t+=L[o],z++;break;case 117:for(e=++z,n=z+4;z<n;z++)o=i.charCodeAt(z),o>=48&&o<=57||o>=97&&o<=102||o>=65&&o<=70||F();t+=U("0x"+i.slice(e,z));break;default:F()}else{if(34==o)break;for(o=i.charCodeAt(z),e=z;o>=32&&92!=o&&34!=o;)o=i.charCodeAt(++z);t+=i.slice(e,z)}if(34==i.charCodeAt(z))return z++,t;F();default:if(e=z,45==o&&(r=!0,o=i.charCodeAt(++z)),o>=48&&o<=57){for(48==o&&(o=i.charCodeAt(z+1),o>=48&&o<=57)&&F(),r=!1;z<s&&(o=i.charCodeAt(z),o>=48&&o<=57);z++);if(46==i.charCodeAt(z)){for(n=++z;n<s&&(o=i.charCodeAt(n),o>=48&&o<=57);n++);n==z&&F(),z=n}if(o=i.charCodeAt(z),101==o||69==o){for(o=i.charCodeAt(++z),43!=o&&45!=o||z++,n=z;n<s&&(o=i.charCodeAt(n),o>=48&&o<=57);n++);n==z&&F(),z=n}return+i.slice(e,z)}if(r&&F(),"true"==i.slice(z,z+4))return z+=4,!0;if("false"==i.slice(z,z+5))return z+=5,!1;if("null"==i.slice(z,z+4))return z+=4,null;F()}return"$"},W=function(t){var e,n;if("$"==t&&F(),"string"==typeof t){if("@"==(P?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=N(),"]"!=t;n||(n=!0))n&&(","==t?(t=N(),"]"==t&&F()):F()),","==t&&F(),e.push(W(t));return e}if("{"==t){for(e={};t=N(),"}"!=t;n||(n=!0))n&&(","==t?(t=N(),"}"==t&&F()):F()),","!=t&&"string"==typeof t&&"@"==(P?t.charAt(0):t[0])&&":"==N()||F(),e[t.slice(1)]=W(N());return e}F()}return t},H=function(t,e,n){var r=Q(t,e,n);r===g?delete t[e]:t[e]=r},Q=function(t,e,n){var r,o=t[e];if("object"==typeof o&&o)if(y.call(o)==T)for(r=o.length;r--;)H(o,r,n);else v(o,function(t){H(o,t,n)});return n.call(t,e,o)};e.parse=function(t,e){var n,r;return z=0,M=""+t,n=W(N()),"$"!=N()&&F(),z=M=null,e&&y.call(e)==_?Q((r={},r[""]=n,r),"",e):n}}}return e.runInContext=o,e}var i="function"==typeof t&&t.amd,s={"function":!0,object:!0},a=s[typeof r]&&r&&!r.nodeType&&r,c=s[typeof window]&&window||this,u=a&&s[typeof n]&&n&&!n.nodeType&&"object"==typeof e&&e;if(!u||u.global!==u&&u.window!==u&&u.self!==u||(c=u),a&&!i)o(c,a);else{var l=c.JSON,f=c.JSON3,p=!1,h=o(c,c.JSON3={noConflict:function(){return p||(p=!0,c.JSON=l,c.JSON3=f,l=f=null),h}});c.JSON={parse:h.parse,stringify:h.stringify}}i&&t(function(){return h})}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{}],35:[function(t,e,n){function r(t){if(t=""+t,!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"hrs":case"hr":case"h":return n*u;case"minutes":case"minute":case"mins":case"min":case"m":return n*c;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function o(t){return t>=l?Math.round(t/l)+"d":t>=u?Math.round(t/u)+"h":t>=c?Math.round(t/c)+"m":t>=a?Math.round(t/a)+"s":t+"ms"}function i(t){return s(t,l,"day")||s(t,u,"hour")||s(t,c,"minute")||s(t,a,"second")||t+" ms"}function s(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}var a=1e3,c=60*a,u=60*c,l=24*u,f=365.25*l;e.exports=function(t,e){return e=e||{},"string"==typeof t?r(t):e["long"]?i(t):o(t)}},{}],36:[function(t,e,n){(function(t){var n=/^[\],:{}\s]*$/,r=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,o=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,i=/(?:^|:|,)(?:\s*\[)+/g,s=/^\s+/,a=/\s+$/;e.exports=function(e){return"string"==typeof e&&e?(e=e.replace(s,"").replace(a,""),t.JSON&&JSON.parse?JSON.parse(e):n.test(e.replace(r,"@").replace(o,"]").replace(i,""))?new Function("return "+e)():void 0):null}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{}],37:[function(t,e,n){n.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},n.decode=function(t){for(var e={},n=t.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},{}],38:[function(t,e,n){var r=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,o=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(t){var e=t,n=t.indexOf("["),i=t.indexOf("]");n!=-1&&i!=-1&&(t=t.substring(0,n)+t.substring(n,i).replace(/:/g,";")+t.substring(i,t.length));for(var s=r.exec(t||""),a={},c=14;c--;)a[o[c]]=s[c]||"";return n!=-1&&i!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},{}],39:[function(t,e,n){(function(e){var r=t("isarray"),o=t("./is-buffer");n.deconstructPacket=function(t){function e(t){if(!t)return t;if(o(t)){var i={_placeholder:!0,num:n.length};return n.push(t),i}if(r(t)){for(var s=new Array(t.length),a=0;a<t.length;a++)s[a]=e(t[a]);return s}if("object"==typeof t&&!(t instanceof Date)){var s={};for(var c in t)s[c]=e(t[c]);return s}return t}var n=[],i=t.data,s=t;return s.data=e(i),s.attachments=n.length,{packet:s,buffers:n}},n.reconstructPacket=function(t,e){function n(t){if(t&&t._placeholder){var o=e[t.num];return o}if(r(t)){for(var i=0;i<t.length;i++)t[i]=n(t[i]);return t}if(t&&"object"==typeof t){for(var s in t)t[s]=n(t[s]);return t}return t}return t.data=n(t.data),t.attachments=void 0,t},n.removeBlobs=function(t,n){function i(t,c,u){if(!t)return t;if(e.Blob&&t instanceof Blob||e.File&&t instanceof File){s++;var l=new FileReader;l.onload=function(){u?u[c]=this.result:a=this.result,--s||n(a)},l.readAsArrayBuffer(t)}else if(r(t))for(var f=0;f<t.length;f++)i(t[f],f,t);else if(t&&"object"==typeof t&&!o(t))for(var p in t)i(t[p],p,t)}var s=0,a=t;i(a),s||n(a)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{"./is-buffer":41,isarray:33}],40:[function(t,e,n){function r(){}function o(t){var e="",r=!1;return e+=t.type,n.BINARY_EVENT!=t.type&&n.BINARY_ACK!=t.type||(e+=t.attachments,e+="-"),t.nsp&&"/"!=t.nsp&&(r=!0,e+=t.nsp),null!=t.id&&(r&&(e+=",",r=!1),e+=t.id),null!=t.data&&(r&&(e+=","),e+=f.stringify(t.data)),l("encoded %j as %s",t,e),e}function i(t,e){function n(t){var n=h.deconstructPacket(t),r=o(n.packet),i=n.buffers;i.unshift(r),e(i)}h.removeBlobs(t,n)}function s(){this.reconstructor=null}function a(t){var e={},r=0;if(e.type=Number(t.charAt(0)),null==n.types[e.type])return u();if(n.BINARY_EVENT==e.type||n.BINARY_ACK==e.type){for(var o="";"-"!=t.charAt(++r)&&(o+=t.charAt(r),r!=t.length););if(o!=Number(o)||"-"!=t.charAt(r))throw new Error("Illegal attachments");e.attachments=Number(o)}if("/"==t.charAt(r+1))for(e.nsp="";++r;){var i=t.charAt(r);if(","==i)break;if(e.nsp+=i,r==t.length)break}else e.nsp="/";var s=t.charAt(r+1);if(""!==s&&Number(s)==s){for(e.id="";++r;){var i=t.charAt(r);if(null==i||Number(i)!=i){--r;break}if(e.id+=t.charAt(r),r==t.length)break}e.id=Number(e.id)}if(t.charAt(++r))try{e.data=f.parse(t.substr(r))}catch(a){return u()}return l("decoded %s as %j",t,e),e}function c(t){this.reconPack=t,this.buffers=[]}function u(t){return{type:n.ERROR,data:"parser error"}}var l=t("debug")("socket.io-parser"),f=t("json3"),p=(t("isarray"),t("component-emitter")),h=t("./binary"),d=t("./is-buffer");n.protocol=4,n.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],n.CONNECT=0,n.DISCONNECT=1,n.EVENT=2,n.ACK=3,n.ERROR=4,n.BINARY_EVENT=5,n.BINARY_ACK=6,n.Encoder=r,n.Decoder=s,r.prototype.encode=function(t,e){if(l("encoding packet %j",t),n.BINARY_EVENT==t.type||n.BINARY_ACK==t.type)i(t,e);else{var r=o(t);e([r])}},p(s.prototype),s.prototype.add=function(t){var e;if("string"==typeof t)e=a(t),n.BINARY_EVENT==e.type||n.BINARY_ACK==e.type?(this.reconstructor=new c(e),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",e)):this.emit("decoded",e);else{if(!d(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,this.emit("decoded",e))}},s.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},c.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length==this.reconPack.attachments){var e=h.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},c.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":39,"./is-buffer":41,"component-emitter":42,debug:14,isarray:33,json3:34}],41:[function(t,e,n){(function(t){function n(e){return t.Buffer&&t.Buffer.isBuffer(e)||t.ArrayBuffer&&e instanceof ArrayBuffer}e.exports=n}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{}],42:[function(t,e,n){arguments[4][26][0].apply(n,arguments)},{dup:26}],43:[function(t,e,n){function r(t,e){var n=[];e=e||0;for(var r=e||0;r<t.length;r++)n[r-e]=t[r];return n}e.exports=r},{}],44:[function(e,n,r){(function(e){!function(o){function i(t){for(var e,n,r=[],o=0,i=t.length;o<i;)e=t.charCodeAt(o++),e>=55296&&e<=56319&&o<i?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function s(t){for(var e,n=t.length,r=-1,o="";++r<n;)e=t[r],e>65535&&(e-=65536,o+=b(e>>>10&1023|55296),e=56320|1023&e),o+=b(e);return o}function a(t){if(t>=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function c(t,e){return b(t>>e&63|128)}function u(t){if(0==(4294967168&t))return b(t);var e="";return 0==(4294965248&t)?e=b(t>>6&31|192):0==(4294901760&t)?(a(t),e=b(t>>12&15|224),e+=c(t,6)):0==(4292870144&t)&&(e=b(t>>18&7|240),e+=c(t,12),e+=c(t,6)),e+=b(63&t|128)}function l(t){for(var e,n=i(t),r=n.length,o=-1,s="";++o<r;)e=n[o],s+=u(e);return s}function f(){if(w>=y)throw Error("Invalid byte index");var t=255&m[w];if(w++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function p(){var t,e,n,r,o;if(w>y)throw Error("Invalid byte index");if(w==y)return!1;if(t=255&m[w],w++,0==(128&t))return t;if(192==(224&t)){var e=f();if(o=(31&t)<<6|e,o>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){if(e=f(),n=f(),o=(15&t)<<12|e<<6|n,o>=2048)return a(o),o;throw Error("Invalid continuation byte")}if(240==(248&t)&&(e=f(),n=f(),r=f(),o=(15&t)<<18|e<<12|n<<6|r,o>=65536&&o<=1114111))return o;throw Error("Invalid UTF-8 detected")}function h(t){m=i(t),y=m.length,w=0;for(var e,n=[];(e=p())!==!1;)n.push(e);return s(n)}var d="object"==typeof r&&r,v="object"==typeof n&&n&&n.exports==d&&n,g="object"==typeof e&&e;g.global!==g&&g.window!==g||(o=g);var m,y,w,b=String.fromCharCode,_={version:"2.0.0",encode:l,decode:h};if("function"==typeof t&&"object"==typeof t.amd&&t.amd)t(function(){return _});else if(d&&!d.nodeType)if(v)v.exports=_;else{var k={},x=k.hasOwnProperty;for(var A in _)x.call(_,A)&&(d[A]=_[A])}else o.utf8=_}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})},{}],45:[function(t,e,n){"use strict";function r(t){var e="";do e=a[t%c]+e,t=Math.floor(t/c);while(t>0);return e}function o(t){var e=0;for(f=0;f<t.length;f++)e=e*c+u[t.charAt(f)];return e}function i(){var t=r(+new Date);return t!==s?(l=0,s=t):t+"."+r(l++)}for(var s,a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),c=64,u={},l=0,f=0;f<c;f++)u[a[f]]=f;i.encode=r,i.decode=o,e.exports=i},{}]},{},[1])(1)})},function(t,e){!function(n){if("object"==typeof e&&"undefined"!=typeof t)t.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.superagent=n()}}(function(){return function t(e,n,r){function o(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e,n){function r(t){return null!==t&&"object"==typeof t}e.exports=r},{}],2:[function(t,e,n){var r=t("./is-object");n.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},n.parse=function(t){return this._parser=t,this},n.serialize=function(t){return this._serializer=t,this},n.timeout=function(t){return this._timeout=t,this},n.then=function(t,e){if(!this._fullfilledPromise){var n=this;this._fullfilledPromise=new Promise(function(t,e){n.end(function(n,r){n?e(n):t(r)})})}return this._fullfilledPromise.then(t,e)},n.use=function(t){return t(this),this},n.get=function(t){return this._header[t.toLowerCase()]},n.getHeader=n.get,n.set=function(t,e){if(r(t)){for(var n in t)this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},n.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},n.field=function(t,e){return this._getFormData().append(t,e),this},n.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},n.withCredentials=function(){return this._withCredentials=!0,this},n.redirects=function(t){return this._maxRedirects=t,this},n.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},n._isHost=function(t){var e={}.toString.call(t);switch(e){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}},n.send=function(t){var e=r(t),n=this._header["content-type"];if(e&&r(this._data))for(var o in t)this._data[o]=t[o];else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],"application/x-www-form-urlencoded"==n?this._data=this._data?this._data+"&"+t:t:this._data=(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(n||this.type("json"),this)}},{"./is-object":1}],3:[function(t,e,n){function r(t,e,n){return"function"==typeof n?new t("GET",e).end(n):2==arguments.length?new t("GET",e):new t(e,n)}e.exports=r},{}],4:[function(t,e,n){function r(t){if(t)return o(t)}function o(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}"undefined"!=typeof e&&(e.exports=r),r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},{}],5:[function(t,e,n){function r(){}function o(t){if(!m(t))return t;var e=[];for(var n in t)null!=t[n]&&i(e,n,t[n]);return e.join("&")}function i(t,e,n){if(Array.isArray(n))return n.forEach(function(n){i(t,e,n)});if(m(n))for(var r in n)i(t,e+"["+r+"]",n[r]);else t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}function s(t){for(var e,n,r={},o=t.split("&"),i=0,s=o.length;i<s;++i)e=o[i],n=e.indexOf("="),n==-1?r[decodeURIComponent(e)]="":r[decodeURIComponent(e.slice(0,n))]=decodeURIComponent(e.slice(n+1));return r}function a(t){var e,n,r,o,i=t.split(/\r?\n/),s={};i.pop();for(var a=0,c=i.length;a<c;++a)n=i[a],e=n.indexOf(":"),r=n.slice(0,e).toLowerCase(),o=w(n.slice(e+1)),s[r]=o;return s}function c(t){return/[\/+]json\b/.test(t)}function u(t){return t.split(/ *; */).shift()}function l(t){return t.split(/ *; */).reduce(function(t,e){var n=e.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(t[r]=o),t},{})}function f(t,e){e=e||{},this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this._setStatusProperties(this.xhr.status),this.header=this.headers=a(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function p(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var t=null,e=null;try{e=new f(n)}catch(r){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=r,t.rawResponse=n.xhr&&n.xhr.responseText?n.xhr.responseText:null,t.statusCode=n.xhr&&n.xhr.status?n.xhr.status:null,n.callback(t)}n.emit("response",e);var o;try{(e.status<200||e.status>=300)&&(o=new Error(e.statusText||"Unsuccessful HTTP response"),o.original=t,o.response=e,o.status=e.status)}catch(r){o=r}o?n.callback(o,e):n.callback(null,e)})}function h(t,e){var n=y("DELETE",t);return e&&n.end(e),n}var d;"undefined"!=typeof window?d=window:"undefined"!=typeof self?d=self:(console.warn("Using browser-only version of superagent in non-browser environment"),d=this);var v=t("emitter"),g=t("./request-base"),m=t("./is-object"),y=e.exports=t("./request").bind(null,p);y.getXHR=function(){if(!(!d.XMLHttpRequest||d.location&&"file:"==d.location.protocol&&d.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw Error("Browser-only verison of superagent could not find XHR")};var w="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};y.serializeObject=o,y.parseString=s,y.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},y.serialize={"application/x-www-form-urlencoded":o,"application/json":JSON.stringify},y.parse={"application/x-www-form-urlencoded":s,"application/json":JSON.parse},f.prototype.get=function(t){return this.header[t.toLowerCase()]},f.prototype._setHeaderProperties=function(t){var e=this.header["content-type"]||"";this.type=u(e);var n=l(e);for(var r in n)this[r]=n[r]},f.prototype._parseBody=function(t){var e=y.parse[this.type];return!e&&c(this.type)&&(e=y.parse["application/json"]),e&&t&&(t.length||t instanceof Object)?e(t):null},f.prototype._setStatusProperties=function(t){1223===t&&(t=204);var e=t/100|0;this.status=this.statusCode=t,this.statusType=e,this.info=1==e,this.ok=2==e,this.clientError=4==e,this.serverError=5==e,this.error=(4==e||5==e)&&this.toError(),this.accepted=202==t,this.noContent=204==t,this.badRequest=400==t,this.unauthorized=401==t,this.notAcceptable=406==t,this.notFound=404==t,this.forbidden=403==t},f.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot "+e+" "+n+" ("+this.status+")",o=new Error(r);return o.status=this.status,o.method=e,o.url=n,o},y.Response=f,v(p.prototype);for(var b in g)p.prototype[b]=g[b];p.prototype.type=function(t){return this.set("Content-Type",y.types[t]||t),this},p.prototype.responseType=function(t){return this._responseType=t,this},p.prototype.accept=function(t){return this.set("Accept",y.types[t]||t),this},p.prototype.auth=function(t,e,n){switch(n||(n={type:"basic"}),n.type){case"basic":var r=btoa(t+":"+e);this.set("Authorization","Basic "+r);break;case"auto":this.username=t,this.password=e}return this},p.prototype.query=function(t){return"string"!=typeof t&&(t=o(t)),t&&this._query.push(t),this},p.prototype.attach=function(t,e,n){return this._getFormData().append(t,e,n||e.name),this},p.prototype._getFormData=function(){return this._formData||(this._formData=new d.FormData),this._formData},p.prototype.callback=function(t,e){var n=this._callback;this.clearTimeout(),n(t,e)},p.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},p.prototype._timeoutError=function(){var t=this._timeout,e=new Error("timeout of "+t+"ms exceeded");e.timeout=t,this.callback(e)},p.prototype._appendQueryString=function(){var t=this._query.join("&");t&&(this.url+=~this.url.indexOf("?")?"&"+t:"?"+t)},p.prototype.end=function(t){var e=this,n=this.xhr=y.getXHR(),o=this._timeout,i=this._formData||this._data;this._callback=t||r,n.onreadystatechange=function(){if(4==n.readyState){var t;try{t=n.status}catch(r){t=0}if(0==t){if(e.timedout)return e._timeoutError();if(e._aborted)return;return e.crossDomainError()}e.emit("end")}};var s=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),t.direction="download",e.emit("progress",t)};this.hasListeners("progress")&&(n.onprogress=s);try{n.upload&&this.hasListeners("progress")&&(n.upload.onprogress=s)}catch(a){}if(o&&!this._timer&&(this._timer=setTimeout(function(){e.timedout=!0,e.abort()},o)),this._appendQueryString(),this.username&&this.password?n.open(this.method,this.url,!0,this.username,this.password):n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof i&&!this._isHost(i)){var u=this._header["content-type"],l=this._serializer||y.serialize[u?u.split(";")[0]:""];!l&&c(u)&&(l=y.serialize["application/json"]),l&&(i=l(i))}for(var f in this.header)null!=this.header[f]&&n.setRequestHeader(f,this.header[f]);return this._responseType&&(n.responseType=this._responseType),this.emit("request",this),n.send("undefined"!=typeof i?i:null),this},y.Request=p,y.get=function(t,e,n){var r=y("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},y.head=function(t,e,n){var r=y("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},y.options=function(t,e,n){var r=y("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},y.del=h,y["delete"]=h,y.patch=function(t,e,n){var r=y("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},y.post=function(t,e,n){var r=y("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},y.put=function(t,e,n){var r=y("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},{"./is-object":1,"./request":3,"./request-base":2,emitter:4}]},{},[5])(5)})},function(t,e,n){/*!
* URI.js - Mutating URLs
* IPv6 Support
*
* Version: 1.18.1
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/
!function(e,n){"use strict";t.exports=n()}(this,function(t){"use strict";function e(t){var e=t.toLowerCase(),n=e.split(":"),r=n.length,o=8;""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[r-1]&&""===n[r-2]&&n.pop(),r=n.length,n[r-1].indexOf(".")!==-1&&(o=7);var i;for(i=0;i<r&&""!==n[i];i++);if(i<o)for(n.splice(i,1,"0000");n.length<o;)n.splice(i,0,"0000");for(var s,a=0;a<o;a++){s=n[a].split("");for(var c=0;c<3&&("0"===s[0]&&s.length>1);c++)s.splice(0,1);n[a]=s.join("")}var u=-1,l=0,f=0,p=-1,h=!1;for(a=0;a<o;a++)h?"0"===n[a]?f+=1:(h=!1,f>l&&(u=p,l=f)):"0"===n[a]&&(h=!0,p=a,f=1);f>l&&(u=p,l=f),l>1&&n.splice(u,l,""),r=n.length;var d="";for(""===n[0]&&(d=":"),a=0;a<r&&(d+=n[a],a!==r-1);a++)d+=":";return""===n[r-1]&&(d+=":"),d}function n(){return t.IPv6===this&&(t.IPv6=r),this}var r=t&&t.IPv6;return{best:e,noConflict:n}})},function(t,e,n){/*!
* URI.js - Mutating URLs
* Second Level Domain (SLD) Support
*
* Version: 1.18.1
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/
!function(e,n){"use strict";t.exports=n()}(this,function(t){"use strict";var e=t&&t.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ","do":" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ","in":" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return!1;var o=n.list[t.slice(e+1)];return!!o&&o.indexOf(" "+t.slice(r+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r>=0)return!1;var o=n.list[t.slice(e+1)];return!!o&&o.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return null;var o=n.list[t.slice(e+1)];return o?o.indexOf(" "+t.slice(r+1,e)+" ")<0?null:t.slice(r+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n})},function(t,e,n){var r;(function(t){!function(o){function i(t){throw new RangeError(O[t])}function s(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function a(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(S,".");var o=t.split("."),i=s(o,e).join(".");return r+i}function c(t){for(var e,n,r=[],o=0,i=t.length;o<i;)e=t.charCodeAt(o++),e>=55296&&e<=56319&&o<i?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function u(t){return s(t,function(t){var e="";return t>65535&&(t-=65536,e+=D(t>>>10&1023|55296),t=56320|1023&t),e+=D(t)}).join("")}function l(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:b}function f(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function p(t,e,n){var r=0;for(t=n?R(t/A):t>>1,t+=R(t/e);t>I*k>>1;r+=b)t=R(t/I);return R(r+(I+1)*t/(t+x))}function h(t){var e,n,r,o,s,a,c,f,h,d,v=[],g=t.length,m=0,y=C,x=T;for(n=t.lastIndexOf(P),n<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&i("not-basic"),v.push(t.charCodeAt(r));for(o=n>0?n+1:0;o<g;){for(s=m,a=1,c=b;o>=g&&i("invalid-input"),f=l(t.charCodeAt(o++)),(f>=b||f>R((w-m)/a))&&i("overflow"),m+=f*a,h=c<=x?_:c>=x+k?k:c-x,!(f<h);c+=b)d=b-h,a>R(w/d)&&i("overflow"),a*=d;e=v.length+1,x=p(m-s,e,0==s),R(m/e)>w-y&&i("overflow"),y+=R(m/e),m%=e,v.splice(m++,0,y)}return u(v)}function d(t){var e,n,r,o,s,a,u,l,h,d,v,g,m,y,x,A=[];for(t=c(t),g=t.length,e=C,n=0,s=T,a=0;a<g;++a)v=t[a],v<128&&A.push(D(v));for(r=o=A.length,o&&A.push(P);r<g;){for(u=w,a=0;a<g;++a)v=t[a],v>=e&&v<u&&(u=v);for(m=r+1,u-e>R((w-n)/m)&&i("overflow"),n+=(u-e)*m,e=u,a=0;a<g;++a)if(v=t[a],v<e&&++n>w&&i("overflow"),v==e){for(l=n,h=b;d=h<=s?_:h>=s+k?k:h-s,!(l<d);h+=b)x=l-d,y=b-d,A.push(D(f(d+x%y,0))),l=R(x/y);A.push(D(f(l,0))),s=p(n,m,r==o),n=0,++r}++n,++e}return A.join("")}function v(t){return a(t,function(t){return j.test(t)?h(t.slice(4).toLowerCase()):t})}function g(t){return a(t,function(t){return E.test(t)?"xn--"+d(t):t})}var m=("object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof global&&global);m.global!==m&&m.window!==m&&m.self!==m||(o=m);var y,w=2147483647,b=36,_=1,k=26,x=38,A=700,T=72,C=128,P="-",j=/^xn--/,E=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=b-_,R=Math.floor,D=String.fromCharCode;y={version:"1.3.2",ucs2:{decode:c,encode:u},decode:h,encode:d,toASCII:g,toUnicode:v},r=function(){return y}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))}(this)}).call(e,n(18)(t))},function(t,e,n){var r,o,i;!function(s,a){o=[n(1),n(24),n(3),n(4)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t,e,n,r){"use strict";var o=function(n){this.apiClient=n||t.instance,this.findAliases=function(t,n,r,o){var i=null;if(void 0==t||null==t)throw"Missing the required parameter 'aliasId' when calling findAliases";if(void 0==n||null==n)throw"Missing the required parameter 'workspaceId' when calling findAliases";if(void 0==r||null==r)throw"Missing the required parameter 'srcPath' when calling findAliases";var s={aliasId:t},a={workspaceId:n,srcPath:r},c={},u={},l=["webida-simple-auth"],f=["application/json"],p=["application/json","application/octet-stream"],h=[e];return this.apiClient.callApi("/aliass/{aliasId}","GET",s,a,c,u,i,l,f,p,h,o)},this.putAlias=function(t,e,n){var o=e;if(void 0==t||null==t)throw"Missing the required parameter 'aliasId' when calling putAlias";if(void 0==e||null==e)throw"Missing the required parameter 'body' when calling putAlias";var i={aliasId:t},s={},a={},c={},u=["webida-simple-auth"],l=["application/json"],f=["application/json","application/octet-stream"],p=r;return this.apiClient.callApi("/aliass/{aliasId}","PUT",i,s,a,c,o,u,l,f,p,n)},this.removeAliases=function(t,e,n,o){var i=null;if(void 0==t||null==t)throw"Missing the required parameter 'aliasId' when calling removeAliases";if(void 0==e||null==e)throw"Missing the required parameter 'workspaceId' when calling removeAliases";if(void 0==n||null==n)throw"Missing the required parameter 'srcPath' when calling removeAliases";var s={aliasId:t},a={workspaceId:e,srcPath:n},c={},u={},l=["webida-simple-auth"],f=["application/json"],p=["application/json","application/octet-stream"],h=r;return this.apiClient.callApi("/aliass/{aliasId}","DELETE",s,a,c,u,i,l,f,p,h,o)}};return o})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1),n(32),n(3),n(31),n(26)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t,e,n,r,o){"use strict";var i=function(n){this.apiClient=n||t.instance,this.getInfo=function(t){var n=null,r={},o={},i={},s={},a=["webida-simple-auth"],c=["application/json"],u=["application/json","application/octet-stream"],l=e;return this.apiClient.callApi("/auth/info","GET",r,o,i,s,n,a,c,u,l,t)},this.issueToken=function(t,e,n){e=e||{};var o=null;if(void 0==t||null==t)throw"Missing the required parameter 'type' when calling issueToken";var i={},s={type:t,workspaceId:e.workspaceId},a={},c={},u=["webida-simple-auth"],l=["application/json"],f=["application/json","application/octet-stream"],p=r;return this.apiClient.callApi("/auth/token","POST",i,s,a,c,o,u,l,f,p,n)},this.login=function(t,e){var n=t;if(void 0==t||null==t)throw"Missing the required parameter 'body' when calling login";var o={},i={},s={},a={},c=[],u=["application/json"],l=["application/json","application/octet-stream"],f=r;return this.apiClient.callApi("/auth/login","POST",o,i,s,a,n,c,u,l,f,e)}};return i})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1),n(3),n(29),n(4)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t,e,n,r){"use strict";var o=function(e){this.apiClient=e||t.instance,this.findRemoteAccesses=function(t){var e=null,r={},o={},i={},s={},a=["webida-simple-auth"],c=["application/json"],u=["application/json","application/octet-stream"],l=[n];return this.apiClient.callApi("/remotes","GET",r,o,i,s,e,a,c,u,l,t)},this.putRemoteAccess=function(t,e){var n=t;if(void 0==t||null==t)throw"Missing the required parameter 'body' when calling putRemoteAccess";var o={},i={},s={},a={},c=["webida-simple-auth"],u=["application/json"],l=["application/json","application/octet-stream"],f=r;return this.apiClient.callApi("/remotes","PUT",o,i,s,a,n,c,u,l,f,e)},this.removeRemoteAccess=function(t,e){var r=null;if(void 0==t||null==t)throw"Missing the required parameter 'workspaceId' when calling removeRemoteAccess";var o={},i={workspaceId:t},s={},a={},c=["webida-simple-auth"],u=["application/json"],l=["application/json","application/octet-stream"],f=n;return this.apiClient.callApi("/remotes","DELETE",o,i,s,a,r,c,u,l,f,e)}};return o})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1),n(4),n(3),n(30)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t,e,n,r){"use strict";var o=function(n){this.apiClient=n||t.instance,this.closeSessions=function(t,n,r,o){var i=null;if(void 0==t||null==t)throw"Missing the required parameter 'sessionId' when calling closeSessions";if(void 0==n||null==n)throw"Missing the required parameter 'workspaceId' when calling closeSessions";if(void 0==r||null==r)throw"Missing the required parameter 'closeAfter' when calling closeSessions";var s={sessionId:t},a={workspaceId:n,closeAfter:r},c={},u={},l=["webida-simple-auth"],f=["application/json"],p=["application/json","application/octet-stream"],h=e;return this.apiClient.callApi("/sessions/{sessionId}","DELETE",s,a,c,u,i,l,f,p,h,o)},this.findSessions=function(t,e,n){var o=null;if(void 0==t||null==t)throw"Missing the required parameter 'sessionId' when calling findSessions";if(void 0==e||null==e)throw"Missing the required parameter 'workspaceId' when calling findSessions";var i={sessionId:t},s={workspaceId:e},a={},c={},u=["webida-simple-auth"],l=["application/json"],f=["application/json","application/octet-stream"],p=[r];return this.apiClient.callApi("/sessions/{sessionId}","GET",i,s,a,c,o,u,l,f,p,n)}};return o})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1),n(4),n(3),n(16),n(17)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t,e,n,r,o){"use strict";var i=function(n){this.apiClient=n||t.instance,this.copy=function(t,n,r,o,i){o=o||{};var s=null;if(void 0==t||null==t)throw"Missing the required parameter 'wfsId' when calling copy";if(void 0==n||null==n)throw"Missing the required parameter 'wfsPath' when calling copy";if(void 0==r||null==r)throw"Missing the required parameter 'srcPath' when calling copy";var a={wfsId:t,wfsPath:n},c={srcPath:r,noOverwrite:o.noOverwrite,followSymbolicLinks:o.followSymbolicLinks,preserveTimestamps:o.preserveTimestamps},u={},l={},f=["webida-simple-auth"],p=["application/json"],h=["application/json","application/octet-stream"],d=e;return this.apiClient.callApi("/wfs/{wfsId}/any/{wfsPath}","PUT",a,c,u,l,s,f,p,h,d,i)},this.createDir=function(t,n,r){var o=null;if(void 0==t||null==t)throw"Missing the required parameter 'wfsId' when calling createDir";if(void 0==n||null==n)throw"Missing the required parameter 'wfsPath' when calling createDir";var i={wfsId:t,wfsPath:n},s={},a={},c={},u=["webida-simple-auth"],l=["application/json"],f=["application/json","application/octet-stream"],p=e;return this.apiClient.callApi("/wfs/{wfsId}/dir/{wfsPath}","PUT",i,s,a,c,o,u,l,f,p,r)},this.dirTree=function(t,e,n,o){var i=null;if(void 0==t||null==t)throw"Missing the required parameter 'wfsId' when calling dirTree";if(void 0==e||null==e)throw"Missing the required parameter 'wfsPath' when calling dirTree";if(void 0==n||null==n)throw"Missing the required parameter 'maxDepth' when calling dirTree";var s={wfsId:t,wfsPath:e},a={maxDepth:n},c={},u={},l=["webida-simple-auth"],f=["application/json"],p=["application/json","application/octet-stream"],h=r;return this.apiClient.callApi("/wfs/{wfsId}/dir/{wfsPath}","GET",s,a,c,u,i,l,f,p,h,o)},this.move=function(t,n,r,o,i){o=o||{};var s=null;if(void 0==t||null==t)throw"Missing the required parameter 'wfsId' when calling move";if(void 0==n||null==n)throw"Missing the required parameter 'wfsPath' when calling move";if(void 0==r||null==r)throw"Missing the required parameter 'srcPath' when calling move";var a={wfsId:t,wfsPath:n},c={srcPath:r,noOverwrite:o.noOverwrite},u={},l={},f=["webida-simple-auth"],p=["application/json"],h=["application/json","application/octet-stream"],d=e;return this.apiClient.callApi("/wfs/{wfsId}/any/{wfsPath}","POST",a,c,u,l,s,f,p,h,d,i)},this.readFile=function(t,e,n,r){n=n||{};var o=null;if(void 0==t||null==t)throw"Missing the required parameter 'wfsId' when calling readFile";if(void 0==e||null==e)throw"Missing the required parameter 'wfsPath' when calling readFile";var i={wfsId:t,wfsPath:e},s={},a={"If-Modified-Since":n.ifModifiedSince,"If-None-Match":n.ifNoneMatch},c={},u=["webida-simple-auth"],l=["application/json"],f=["application/json","application/octet-stream"],p=File;return this.apiClient.callApi("/wfs/{wfsId}/file/{wfsPath}","GET",i,s,a,c,o,u,l,f,p,r)},this.remove=function(t,n,r,o){r=r||{};var i=null;if(void 0==t||null==t)throw"Missing the required parameter 'wfsId' when calling remove";if(void 0==n||null==n)throw"Missing the required parameter 'wfsPath' when calling remove";var s={wfsId:t,wfsPath:n},a={noRecursive:r.noRecursive},c={},u={},l=["webida-simple-auth"],f=["application/json"],p=["application/json","application/octet-stream"],h=e;return this.apiClient.callApi("/wfs/{wfsId}/any/{wfsPath}","DELETE",s,a,c,u,i,l,f,p,h,o)},this.replace=function(t,n,r,o,i,s){i=i||{};var a=null;if(void 0==t||null==t)throw"Missing the required parameter 'wfsId' when calling replace";if(void 0==n||null==n)throw"Missing the required parameter 'wfsPathList' when calling replace";if(void 0==r||null==r)throw"Missing the required parameter 'pattern' when calling replace";if(void 0==o||null==o)throw"Missing the required parameter 'replaceTo' when calling replace";var c={wfsId:t},u={wfsPathList:this.apiClient.buildCollectionParam(n,"multi"),pattern:r,ignoreCase:i.ignoreCase,replaceTo:o},l={},f={},p=["webida-simple-auth"],h=["application/json"],d=["application/json","application/octet-stream"],v=e;return this.apiClient.callApi("/wfs/{wfsId}/ops/replace","POST",c,u,l,f,a,p,h,d,v,s)},this.search=function(t,e,n,r,o){r=r||{};var i=null;if(void 0==t||null==t)throw"Missing the required parameter 'wfsId' when calling search";if(void 0==e||null==e)throw"Missing the required parameter 'wfsPathList' when calling search";if(void 0==n||null==n)throw"Missing the required parameter 'pattern' when calling search";var s={wfsId:t},a={wfsPathList:this.apiClient.buildCollectionParam(e,"multi"),pattern:n,ignoreCase:r.ignoreCase},c={},u={},l=["webida-simple-auth"],f=["application/json"],p=["application/json","application/octet-stream"],h={String:[Match]};return this.apiClient.callApi("/wfs/{wfsId}/ops/search","GET",s,a,c,u,i,l,f,p,h,o)},this.stat=function(t,e,n,r){n=n||{};var i=null;if(void 0==t||null==t)throw"Missing the required parameter 'wfsId' when calling stat";if(void 0==e||null==e)throw"Missing the required parameter 'wfsPath' when calling stat";var s={wfsId:t,wfsPath:e},a={dummyFor404:n.dummyFor404},c={},u={},l=["webida-simple-auth"],f=["application/json"],p=["application/json","application/octet-stream"],h=o;return this.apiClient.callApi("/wfs/{wfsId}/any/{wfsPath}","GET",s,a,c,u,i,l,f,p,h,r)},this.writeFile=function(t,n,r,o,i){o=o||{};var s=null;if(void 0==t||null==t)throw"Missing the required parameter 'wfsId' when calling writeFile";if(void 0==n||null==n)throw"Missing the required parameter 'wfsPath' when calling writeFile";if(void 0==r||null==r)throw"Missing the required parameter 'data' when calling writeFile";var a={wfsId:t,wfsPath:n},c={ensureParents:o.ensureParents},u={},l={data:r},f=["webida-simple-auth"],p=["multipart/form-data"],h=["application/json","application/octet-stream"],d=e;return this.apiClient.callApi("/wfs/{wfsId}/file/{wfsPath}","PUT",a,c,u,l,s,f,p,h,d,i)}};return i})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1),n(4),n(3),n(33),n(25),n(27),n(28)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t,e,n,r,o,i,s){"use strict";var a=function(n){this.apiClient=n||t.instance,this.cancel=function(t,n,r){var o=null;if(void 0==t||null==t)throw"Missing the required parameter 'workspaceId' when calling cancel";if(void 0==n||null==n)throw"Missing the required parameter 'execId' when calling cancel";var i={workspaceId:t},s={execId:n},a={},c={},u=["webida-simple-auth"],l=["application/json"],f=["application/json","application/octet-stream"],p=e;return this.apiClient.callApi("/workspaces/{workspaceId}/procs","DELETE",i,s,a,c,o,u,l,f,p,r)},this.createWorkspace=function(t,e,n,o,i){var s=null;if(void 0==t||null==t)throw"Missing the required parameter 'workspaceId' when calling createWorkspace";if(void 0==e||null==e)throw"Missing the required parameter 'localPath' when calling createWorkspace";if(void 0==n||null==n)throw"Missing the required parameter 'name' when calling createWorkspace";if(void 0==o||null==o)throw"Missing the required parameter 'description' when calling createWorkspace";var a={workspaceId:t},c={localPath:e,name:n,description:o},u={},l={},f=["webida-simple-auth"],p=["application/json"],h=["application/json","application/octet-stream"],d=r;return this.apiClient.callApi("/workspaces/{workspaceId}","POST",a,c,u,l,s,f,p,h,d,i)},this.execute=function(t,e,n,r){n=n||{};var o=e;if(void 0==t||null==t)throw"Missing the required parameter 'workspaceId' when calling execute";if(void 0==e||null==e)throw"Missing the required parameter 'body' when calling execute";var i={workspaceId:t},a={async:n.async},c={},u={},l=["webida-simple-auth"],f=["application/json"],p=["application/json","application/octet-stream"],h=s;return this.apiClient.callApi("/workspaces/{workspaceId}/procs","POST",i,a,c,u,o,l,f,p,h,r)},this.findProcs=function(t,e,n,r){n=n||{};var i=null;if(void 0==t||null==t)throw"Missing the required parameter 'workspaceId' when calling findProcs";if(void 0==e||null==e)throw"Missing the required parameter 'execId' when calling findProcs";var s={workspaceId:t},a={execId:e,includeForeground:n.includeForeground},c={},u={},l=[],f=["application/json"],p=["application/json","application/octet-stream"],h=[o];return this.apiClient.callApi("/workspaces/{workspaceId}/procs","GET",s,a,c,u,i,l,f,p,h,r)},this.findWorkspaces=function(t,e,n){e=e||{};var o=null;if(void 0==t||null==t)throw"Missing the required parameter 'workspaceId' when calling findWorkspaces";var i={workspaceId:t},s={includeEphemeral:e.includeEphemeral},a={},c={},u=["webida-simple-auth"],l=["application/json"],f=["application/json","application/octet-stream"],p=[r];return this.apiClient.callApi("/workspaces/{workspaceId}","GET",i,s,a,c,o,u,l,f,p,n)},this.removeWorkspace=function(t,n,r){n=n||{};var o=null;if(void 0==t||null==t)throw"Missing the required parameter 'workspaceId' when calling removeWorkspace";var i={workspaceId:t},s={closeAfter:n.closeAfter,removeDir:n.removeDir},a={},c={},u=["webida-simple-auth"],l=["application/json"],f=["application/json","application/octet-stream"],p=e;return this.apiClient.callApi("/workspaces/{workspaceId}","DELETE",i,s,a,c,o,u,l,f,p,r)},this.updateWorkspace=function(t,e,n){var o=e;if(void 0==t||null==t)throw"Missing the required parameter 'workspaceId' when calling updateWorkspace";if(void 0==e||null==e)throw"Missing the required parameter 'body' when calling updateWorkspace";var i={workspaceId:t},s={},a={},c={},u=["webida-simple-auth"],l=["application/json"],f=["application/json","application/octet-stream"],p=r;return this.apiClient.callApi("/workspaces/{workspaceId}","PUT",i,s,a,c,o,u,l,f,p,n)}};return a})},function(t,e,n){var r,o,i;!function(s,a){o=[n(1)],r=a,i="function"==typeof r?r.apply(e,o):r,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";var e=function(t,e){var n=this;n.line=t,n.text=e};return e.constructFromObject=function(n,r){return n&&(r=r||new e,n.hasOwnProperty("line")&&(r.line=t.convertToType(n.line,"Integer")),n.hasOwnProperty("text")&&(r.text=t.convertToType(n.text,"String"))),r},e.prototype.line=void 0,e.prototype.text=void 0,e})}])});
//# sourceMappingURL=webida-service-client-bundle.js.map