UNPKG

400 kBJavaScriptView Raw
1!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AV=e():t.AV=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=212)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(229);n.d(e,"default",function(){return r.a});var i=n(92);n.d(e,"VERSION",function(){return i.VERSION}),n.d(e,"restArguments",function(){return i.restArguments}),n.d(e,"isObject",function(){return i.isObject}),n.d(e,"isNull",function(){return i.isNull}),n.d(e,"isUndefined",function(){return i.isUndefined}),n.d(e,"isBoolean",function(){return i.isBoolean}),n.d(e,"isElement",function(){return i.isElement}),n.d(e,"isString",function(){return i.isString}),n.d(e,"isNumber",function(){return i.isNumber}),n.d(e,"isDate",function(){return i.isDate}),n.d(e,"isRegExp",function(){return i.isRegExp}),n.d(e,"isError",function(){return i.isError}),n.d(e,"isSymbol",function(){return i.isSymbol}),n.d(e,"isArrayBuffer",function(){return i.isArrayBuffer}),n.d(e,"isDataView",function(){return i.isDataView}),n.d(e,"isArray",function(){return i.isArray}),n.d(e,"isFunction",function(){return i.isFunction}),n.d(e,"isArguments",function(){return i.isArguments}),n.d(e,"isFinite",function(){return i.isFinite}),n.d(e,"isNaN",function(){return i.isNaN}),n.d(e,"isTypedArray",function(){return i.isTypedArray}),n.d(e,"isEmpty",function(){return i.isEmpty}),n.d(e,"isMatch",function(){return i.isMatch}),n.d(e,"isEqual",function(){return i.isEqual}),n.d(e,"isMap",function(){return i.isMap}),n.d(e,"isWeakMap",function(){return i.isWeakMap}),n.d(e,"isSet",function(){return i.isSet}),n.d(e,"isWeakSet",function(){return i.isWeakSet}),n.d(e,"keys",function(){return i.keys}),n.d(e,"allKeys",function(){return i.allKeys}),n.d(e,"values",function(){return i.values}),n.d(e,"pairs",function(){return i.pairs}),n.d(e,"invert",function(){return i.invert}),n.d(e,"functions",function(){return i.functions}),n.d(e,"methods",function(){return i.methods}),n.d(e,"extend",function(){return i.extend}),n.d(e,"extendOwn",function(){return i.extendOwn}),n.d(e,"assign",function(){return i.assign}),n.d(e,"defaults",function(){return i.defaults}),n.d(e,"create",function(){return i.create}),n.d(e,"clone",function(){return i.clone}),n.d(e,"tap",function(){return i.tap}),n.d(e,"get",function(){return i.get}),n.d(e,"has",function(){return i.has}),n.d(e,"mapObject",function(){return i.mapObject}),n.d(e,"identity",function(){return i.identity}),n.d(e,"constant",function(){return i.constant}),n.d(e,"noop",function(){return i.noop}),n.d(e,"toPath",function(){return i.toPath}),n.d(e,"property",function(){return i.property}),n.d(e,"propertyOf",function(){return i.propertyOf}),n.d(e,"matcher",function(){return i.matcher}),n.d(e,"matches",function(){return i.matches}),n.d(e,"times",function(){return i.times}),n.d(e,"random",function(){return i.random}),n.d(e,"now",function(){return i.now}),n.d(e,"escape",function(){return i.escape}),n.d(e,"unescape",function(){return i.unescape}),n.d(e,"templateSettings",function(){return i.templateSettings}),n.d(e,"template",function(){return i.template}),n.d(e,"result",function(){return i.result}),n.d(e,"uniqueId",function(){return i.uniqueId}),n.d(e,"chain",function(){return i.chain}),n.d(e,"iteratee",function(){return i.iteratee}),n.d(e,"partial",function(){return i.partial}),n.d(e,"bind",function(){return i.bind}),n.d(e,"bindAll",function(){return i.bindAll}),n.d(e,"memoize",function(){return i.memoize}),n.d(e,"delay",function(){return i.delay}),n.d(e,"defer",function(){return i.defer}),n.d(e,"throttle",function(){return i.throttle}),n.d(e,"debounce",function(){return i.debounce}),n.d(e,"wrap",function(){return i.wrap}),n.d(e,"negate",function(){return i.negate}),n.d(e,"compose",function(){return i.compose}),n.d(e,"after",function(){return i.after}),n.d(e,"before",function(){return i.before}),n.d(e,"once",function(){return i.once}),n.d(e,"findKey",function(){return i.findKey}),n.d(e,"findIndex",function(){return i.findIndex}),n.d(e,"findLastIndex",function(){return i.findLastIndex}),n.d(e,"sortedIndex",function(){return i.sortedIndex}),n.d(e,"indexOf",function(){return i.indexOf}),n.d(e,"lastIndexOf",function(){return i.lastIndexOf}),n.d(e,"find",function(){return i.find}),n.d(e,"detect",function(){return i.detect}),n.d(e,"findWhere",function(){return i.findWhere}),n.d(e,"each",function(){return i.each}),n.d(e,"forEach",function(){return i.forEach}),n.d(e,"map",function(){return i.map}),n.d(e,"collect",function(){return i.collect}),n.d(e,"reduce",function(){return i.reduce}),n.d(e,"foldl",function(){return i.foldl}),n.d(e,"inject",function(){return i.inject}),n.d(e,"reduceRight",function(){return i.reduceRight}),n.d(e,"foldr",function(){return i.foldr}),n.d(e,"filter",function(){return i.filter}),n.d(e,"select",function(){return i.select}),n.d(e,"reject",function(){return i.reject}),n.d(e,"every",function(){return i.every}),n.d(e,"all",function(){return i.all}),n.d(e,"some",function(){return i.some}),n.d(e,"any",function(){return i.any}),n.d(e,"contains",function(){return i.contains}),n.d(e,"includes",function(){return i.includes}),n.d(e,"include",function(){return i.include}),n.d(e,"invoke",function(){return i.invoke}),n.d(e,"pluck",function(){return i.pluck}),n.d(e,"where",function(){return i.where}),n.d(e,"max",function(){return i.max}),n.d(e,"min",function(){return i.min}),n.d(e,"shuffle",function(){return i.shuffle}),n.d(e,"sample",function(){return i.sample}),n.d(e,"sortBy",function(){return i.sortBy}),n.d(e,"groupBy",function(){return i.groupBy}),n.d(e,"indexBy",function(){return i.indexBy}),n.d(e,"countBy",function(){return i.countBy}),n.d(e,"partition",function(){return i.partition}),n.d(e,"toArray",function(){return i.toArray}),n.d(e,"size",function(){return i.size}),n.d(e,"pick",function(){return i.pick}),n.d(e,"omit",function(){return i.omit}),n.d(e,"first",function(){return i.first}),n.d(e,"head",function(){return i.head}),n.d(e,"take",function(){return i.take}),n.d(e,"initial",function(){return i.initial}),n.d(e,"last",function(){return i.last}),n.d(e,"rest",function(){return i.rest}),n.d(e,"tail",function(){return i.tail}),n.d(e,"drop",function(){return i.drop}),n.d(e,"compact",function(){return i.compact}),n.d(e,"flatten",function(){return i.flatten}),n.d(e,"without",function(){return i.without}),n.d(e,"uniq",function(){return i.uniq}),n.d(e,"unique",function(){return i.unique}),n.d(e,"union",function(){return i.union}),n.d(e,"intersection",function(){return i.intersection}),n.d(e,"difference",function(){return i.difference}),n.d(e,"unzip",function(){return i.unzip}),n.d(e,"transpose",function(){return i.transpose}),n.d(e,"zip",function(){return i.zip}),n.d(e,"object",function(){return i.object}),n.d(e,"range",function(){return i.range}),n.d(e,"chunk",function(){return i.chunk}),n.d(e,"mixin",function(){return i.mixin})},function(t,e){var n=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";(function(t){n.d(e,"e",function(){return r}),n.d(e,"p",function(){return i}),n.d(e,"a",function(){return o}),n.d(e,"c",function(){return s}),n.d(e,"d",function(){return a}),n.d(e,"o",function(){return u}),n.d(e,"q",function(){return c}),n.d(e,"t",function(){return f}),n.d(e,"i",function(){return l}),n.d(e,"r",function(){return h}),n.d(e,"s",function(){return d}),n.d(e,"k",function(){return p}),n.d(e,"m",function(){return v}),n.d(e,"j",function(){return m}),n.d(e,"l",function(){return y}),n.d(e,"g",function(){return g}),n.d(e,"f",function(){return b}),n.d(e,"h",function(){return _}),n.d(e,"n",function(){return w}),n.d(e,"b",function(){return E});var r="1.12.1",i="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||Function("return this")()||{},o=Array.prototype,s=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,u=o.push,c=o.slice,f=s.toString,l=s.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,d="undefined"!=typeof DataView,p=Array.isArray,v=Object.keys,m=Object.create,y=h&&ArrayBuffer.isView,g=isNaN,b=isFinite,_=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],E=Math.pow(2,53)-1}).call(e,n(66))},function(t,e,n){t.exports={default:n(216),__esModule:!0}},function(t,e,n){var r=n(5),i=n(1),o=n(22),s=n(24),a=n(25),u=function(t,e,n){var c,f,l,h=t&u.F,d=t&u.G,p=t&u.S,v=t&u.P,m=t&u.B,y=t&u.W,g=d?i:i[e]||(i[e]={}),b=g.prototype,_=d?r:p?r[e]:(r[e]||{}).prototype;d&&(n=e);for(c in n)(f=!h&&_&&void 0!==_[c])&&a(g,c)||(l=f?_[c]:n[c],g[c]=d&&"function"!=typeof _[c]?n[c]:m&&f?o(l,r):y&&_[c]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((g.virtual||(g.virtual={}))[c]=l,t&u.R&&b&&!b[c]&&s(b,c,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){"use strict";function r(t){if(!Object(i.a)(t))return[];if(o.m)return Object(o.m)(t);var e=[];for(var n in t)Object(s.a)(t,n)&&e.push(n);return o.h&&Object(a.a)(t,e),e}e.a=r;var i=n(31),o=n(2),s=n(27),a=n(139)},function(t,e,n){"use strict";function r(t){var e="[object "+t+"]";return function(t){return i.t.call(t)===e}}e.a=r;var i=n(2)},function(t,e,n){var r=n(88)("wks"),i=n(62),o=n(5).Symbol,s="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=s&&o[t]||(s?o:i)("Symbol."+t))}).store=r},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";function r(t,e,n){return i.a.iteratee!==s.a?i.a.iteratee(t,e):Object(o.a)(t,e,n)}e.a=r;var i=n(12),o=n(149),s=n(150)},function(t,e,n){"use strict";function r(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+e];switch(e){case 0:return t.call(this,r);case 1:return t.call(this,arguments[0],r);case 2:return t.call(this,arguments[0],arguments[1],r)}var o=Array(e+1);for(i=0;i<e;i++)o[i]=arguments[i];return o[e]=r,t.apply(this,o)}}e.a=r},function(t,e,n){"use strict";function r(t){return t instanceof r?t:this instanceof r?void(this._wrapped=t):new r(t)}e.a=r;var i=n(2);r.VERSION=i.e,r.prototype.value=function(){return this._wrapped},r.prototype.valueOf=r.prototype.toJSON=r.prototype.value,r.prototype.toString=function(){return String(this._wrapped)}},function(t,e,n){"use strict";var r=n(137),i=n(18);e.a=Object(r.a)(i.a)},function(t,e,n){"use strict";var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(0),s=n(342),a=n(0),u=a.extend,c=n(42),f=n(28),l=n(19),h=l.getSessionToken,d=n(72),p=function(t,e){var n=(new Date).getTime(),r=s(n+t);return e?r+","+n+",master":r+","+n},v=function(t,e){e?t["X-LC-Sign"]=p(c.applicationKey):t["X-LC-Key"]=c.applicationKey},m=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n={"X-LC-Id":c.applicationId,"Content-Type":"application/json;charset=UTF-8"},r=!1;return"boolean"==typeof t.useMasterKey?r=t.useMasterKey:"boolean"==typeof c._config.useMasterKey&&(r=c._config.useMasterKey),r?c.masterKey?e?n["X-LC-Sign"]=p(c.masterKey,!0):n["X-LC-Key"]=c.masterKey+",master":(console.warn("masterKey is not set, fall back to use appKey"),v(n,e)):v(n,e),c.hookKey&&(n["X-LC-Hook-Key"]=c.hookKey),null!==c._config.production&&(n["X-LC-Prod"]=String(c._config.production)),n["X-LC-UA"]=c._sharedConfig.userAgent,i.default.resolve().then(function(){var e=h(t);if(e)n["X-LC-Session"]=e;else if(!c._config.disableCurrentUser)return c.User.currentAsync().then(function(t){return t&&t._sessionToken&&(n["X-LC-Session"]=t._sessionToken),n});return n})},y=function(t){var e=t.service,n=void 0===e?"api":e,r=t.version,i=void 0===r?"1.1":r,o=t.path,s=c._config.serverURLs[n];if(!s)throw new Error("undefined server URL for "+n);return"/"!==s.charAt(s.length-1)&&(s+="/"),s+=i,o&&(s+=o),s},g=function(t){var e=t.service,n=t.version,r=t.method,i=t.path,s=t.query,a=t.data,u=t.authOptions,l=t.signKey,h=void 0===l||l;if(!c.applicationId||!c.applicationKey&&!c.masterKey)throw new Error("Not initialized");c._appRouter&&c._appRouter.refresh();var p=c._config.requestTimeout,v=y({service:e,path:i,version:n});return m(u,h).then(function(t){return d({method:r,url:v,query:s,data:a,headers:t,timeout:p}).catch(function(t){var e={code:t.code||-1,error:t.message||t.responseText};if(t.response&&t.response.code)e=t.response;else if(t.responseText)try{e=JSON.parse(t.responseText)}catch(t){}e.rawMessage=e.rawMessage||e.error,c._sharedConfig.keepErrorRawMessage||(e.error+=" ["+(t.statusCode||"N/A")+" "+r+" "+v+"]");var n=new f(e.code,e.error);throw delete e.error,o.extend(n,e)})})},b=function(t,e,n,r,i,o,s){var a="";if(t&&(a+="/"+t),e&&(a+="/"+e),n&&(a+="/"+n),i&&i._fetchWhenSave)throw new Error("_fetchWhenSave should be in the query");if(i&&i._where)throw new Error("_where should be in the query");return r&&"get"===r.toLowerCase()&&(s=u({},s,i),i=null),g({method:r,path:a,query:s,data:i,authOptions:o})};c.request=g,t.exports={_request:b,request:g}},function(t,e,n){var r=n(9);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(29)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var r=n(7),i=n(2),o=Object(r.a)("Function"),s=i.p.document&&i.p.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof s&&(o=function(t){return"function"==typeof t||!1}),e.a=o},function(t,e,n){"use strict";var r=n(138);e.a=Object(r.a)("length")},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(3),o=r(i),s=n(178),a=r(s),u=n(0),c=function(t){return u.isNull(t)||u.isUndefined(t)},f=function(t){return u.isArray(t)?t:void 0===t||null===t?[]:[t]},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.keys,n=t.include,r=t.includeACL,i={};return e&&(i.keys=f(e).join(",")),n&&(i.include=f(n).join(",")),r&&(i.returnACL=r),i},h=function(t){return t.sessionToken?t.sessionToken:t.user&&"function"==typeof t.user.getSessionToken?t.user.getSessionToken():void 0},d=function(t){return function(e){return t(e),e}},p=function(){},v=function(t,e,n){var r;return r=e&&e.hasOwnProperty("constructor")?e.constructor:function(){t.apply(this,arguments)},u.extend(r,t),p.prototype=t.prototype,r.prototype=new p,e&&u.extend(r.prototype,e),n&&u.extend(r,n),r.prototype.constructor=r,r.__super__=t.prototype,r},m=function(t){return new Date(t)},y=function(t,e,n){var r=e.split("."),i=r.pop(),o=t;return r.forEach(function(t){void 0===o[t]&&(o[t]={}),o=o[t]}),o[i]=n,t},g=function(t,e){for(var n=e.split("."),r=n[0],i=n.pop(),o=t,s=0;s<n.length;s++)if(void 0===(o=o[n[s]]))return[void 0,void 0,i];return[o[i],o,i,r]},b=function(t){return u.isObject(t)&&(0,a.default)(t)===Object.prototype},_=function t(e,n){return e()?n().then(function(){return t(e,n)}):o.default.resolve()};t.exports={isNullOrUndefined:c,ensureArray:f,transformFetchOptions:l,getSessionToken:h,tap:d,inherits:v,parseDate:m,setValue:y,findValue:g,isPlainObject:b,continueWhile:_}},function(t,e,n){var r=n(15),i=n(115),o=n(84),s=Object.defineProperty;e.f=n(16)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports={default:n(301),__esModule:!0}},function(t,e,n){var r=n(47);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(73),o=r(i),s=n(44),a=r(s),u="function"==typeof a.default&&"symbol"==typeof o.default?function(t){return typeof t}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":typeof t};e.default="function"==typeof a.default&&"symbol"===u(o.default)?function(t){return void 0===t?"undefined":u(t)}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":void 0===t?"undefined":u(t)}},function(t,e,n){var r=n(20),i=n(48);t.exports=n(16)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(86),i=n(81);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";function r(t,e){return null!=t&&i.i.call(t,e)}e.a=r;var i=n(2)},function(t,e,n){"use strict";function r(t,e){var n=new Error(e);return n.code=t,n}n(0).extend(r,{OTHER_CAUSE:-1,INTERNAL_SERVER_ERROR:1,CONNECTION_FAILED:100,OBJECT_NOT_FOUND:101,INVALID_QUERY:102,INVALID_CLASS_NAME:103,MISSING_OBJECT_ID:104,INVALID_KEY_NAME:105,INVALID_POINTER:106,INVALID_JSON:107,COMMAND_UNAVAILABLE:108,NOT_INITIALIZED:109,INCORRECT_TYPE:111,INVALID_CHANNEL_NAME:112,PUSH_MISCONFIGURED:115,OBJECT_TOO_LARGE:116,OPERATION_FORBIDDEN:119,CACHE_MISS:120,INVALID_NESTED_KEY:121,INVALID_FILE_NAME:122,INVALID_ACL:123,TIMEOUT:124,INVALID_EMAIL_ADDRESS:125,MISSING_CONTENT_TYPE:126,MISSING_CONTENT_LENGTH:127,INVALID_CONTENT_LENGTH:128,FILE_TOO_LARGE:129,FILE_SAVE_ERROR:130,FILE_DELETE_ERROR:153,DUPLICATE_VALUE:137,INVALID_ROLE_NAME:139,EXCEEDED_QUOTA:140,SCRIPT_FAILED:141,VALIDATION_ERROR:142,INVALID_IMAGE_DATA:150,UNSAVED_FILE_ERROR:151,INVALID_PUSH_TIME_ERROR:152,USERNAME_MISSING:200,PASSWORD_MISSING:201,USERNAME_TAKEN:202,EMAIL_TAKEN:203,EMAIL_MISSING:204,EMAIL_NOT_FOUND:205,SESSION_MISSING:206,MUST_CREATE_USER_THROUGH_SIGNUP:207,ACCOUNT_ALREADY_LINKED:208,LINKED_ID_MISSING:250,INVALID_LINKED_SESSION:251,UNSUPPORTED_SERVICE:252,X_DOMAIN_REQUEST:602}),t.exports=r},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(81);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";function r(t){var e=typeof t;return"function"===e||"object"===e&&!!t}e.a=r},function(t,e,n){"use strict";var r=n(2),i=n(7);e.a=r.k||Object(i.a)("Array")},function(t,e,n){"use strict";function r(t,e,n){e=Object(i.a)(e,n);var r,a;if(Object(o.a)(t))for(r=0,a=t.length;r<a;r++)e(t[r],r,t);else{var u=Object(s.a)(t);for(r=0,a=u.length;r<a;r++)e(t[u[r]],u[r],t)}return t}e.a=r;var i=n(55),o=n(13),s=n(6)},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(r++,"%c"===t&&(i=r))}),e.splice(i,0,n)}}function s(){var t;return"object"===("undefined"==typeof console?"undefined":r(console))&&console.log&&(t=console).log.apply(t,arguments)}function a(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}}function u(){var t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t}e.log=s,e.formatArgs=o,e.save=a,e.load=u,e.useColors=i,e.storage=function(){try{return localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.exports=n(306)(e),t.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},function(t,e,n){"use strict";var r=n(217)(!0);n(82)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e){t.exports={}},function(t,e,n){n(221);for(var r=n(5),i=n(24),o=n(36),s=n(8)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<a.length;u++){var c=a[u],f=r[c],l=f&&f.prototype;l&&!l[s]&&i(l,s,c),o[c]=o.Array}},function(t,e,n){var r=n(22),i=n(121),o=n(122),s=n(15),a=n(61),u=n(90),c={},f={},e=t.exports=function(t,e,n,l,h){var d,p,v,m,y=h?function(){return t}:u(t),g=r(n,l,e?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(d=a(t.length);d>b;b++)if((m=e?g(s(p=t[b])[0],p[1]):g(t[b]))===c||m===f)return m}else for(v=y.call(t);!(p=v.next()).done;)if((m=i(v,g,p.value,e))===c||m===f)return m};e.BREAK=c,e.RETURN=f},function(t,e,n){"use strict";function r(t){for(var e=Object(i.a)(t),n=e.length,r=Array(n),o=0;o<n;o++)r[o]=t[e[o]];return r}e.a=r;var i=n(6)},function(t,e,n){"use strict";function r(t,e,n,u){if(u=u||[],e||0===e){if(e<=0)return u.concat(t)}else e=1/0;for(var c=u.length,f=0,l=Object(i.a)(t);f<l;f++){var h=t[f];if(Object(o.a)(h)&&(Object(s.a)(h)||Object(a.a)(h)))if(e>1)r(h,e-1,n,u),c=u.length;else for(var d=0,p=h.length;d<p;)u[c++]=h[d++];else n||(u[c++]=h)}return u}e.a=r;var i=n(18),o=n(13),s=n(32),a=n(95)},function(t,e,n){"use strict";function r(t,e,n){e=Object(i.a)(e,n);for(var r=!Object(o.a)(t)&&Object(s.a)(t),a=(r||t).length,u=Array(a),c=0;c<a;c++){var f=r?r[c]:c;u[c]=e(t[f],f,t)}return u}e.a=r;var i=n(10),o=n(13),s=n(6)},function(t,e,n){"use strict";(function(e){function r(t){return t&&t.__esModule?t:{default:t}}var i=n(21),o=r(i),s=n(107),a=r(s),u=n(3),c=r(u),f=n(0),l=n(177),h=n(34),d=n(19),p=d.inherits,v=d.parseDate,m=n(179),y=n(43),g=y.setAdapters,b=y.adapterManager,_=e.AV||{};_._config={serverURLs:{},useMasterKey:!1,production:null,realtime:null,requestTimeout:null};var w="LeanCloud-JS-SDK/"+m;_._sharedConfig={userAgent:w,liveQueryRealtime:null},b.on("platformInfo",function(t){var e=w;if(t)if(t.userAgent)e=t.userAgent;else{var n=t.name;t.version&&(n+="/"+t.version),t.extra&&(n+="; "+t.extra),e+=" ("+n+")"}_._sharedConfig.userAgent=e}),_._getAVPath=function(t){if(!_.applicationId)throw new Error("You need to call AV.initialize before using AV.");if(t||(t=""),!f.isString(t))throw new Error("Tried to get a localStorage path that wasn't a String.");return"/"===t[0]&&(t=t.substring(1)),"AV/"+_.applicationId+"/"+t},_._installationId=null,_._getInstallationId=function(){if(_._installationId)return c.default.resolve(_._installationId);var t=_._getAVPath("installationId");return _.localStorage.getItemAsync(t).then(function(e){return _._installationId=e,_._installationId?e:(_._installationId=e=l(),_.localStorage.setItemAsync(t,e).then(function(){return e}))})},_._subscriptionId=null,_._refreshSubscriptionId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_._getAVPath("subscriptionId"),e=_._subscriptionId=l();return _.localStorage.setItemAsync(t,e).then(function(){return e})},_._getSubscriptionId=function(){if(_._subscriptionId)return c.default.resolve(_._subscriptionId);var t=_._getAVPath("subscriptionId");return _.localStorage.getItemAsync(t).then(function(e){return _._subscriptionId=e,_._subscriptionId||(e=_._refreshSubscriptionId(t)),e})},_._parseDate=v,_._extend=function(t,e){var n=p(this,t,e);return n.extend=this.extend,n},_._encode=function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t instanceof _.Object){if(n)throw new Error("AV.Objects not allowed here");return e&&!f.include(e,t)&&t._hasData?t._toFullJSON(e.concat(t),r):t._toPointer()}if(t instanceof _.ACL)return t.toJSON();if(f.isDate(t))return r?{__type:"Date",iso:t.toJSON()}:t.toJSON();if(t instanceof _.GeoPoint)return t.toJSON();if(f.isArray(t))return f.map(t,function(t){return _._encode(t,e,n,r)});if(f.isRegExp(t))return t.source;if(t instanceof _.Relation)return t.toJSON();if(t instanceof _.Op)return t.toJSON();if(t instanceof _.File){if(!t.url()&&!t.id)throw new Error("Tried to save an object containing an unsaved file.");return t._toFullJSON(e,r)}return f.isObject(t)?f.mapObject(t,function(t,i){return _._encode(t,e,n,r)}):t},_._decode=function(t,e){if(!f.isObject(t)||f.isDate(t))return t;if(f.isArray(t))return f.map(t,function(t){return _._decode(t)});if(t instanceof _.Object)return t;if(t instanceof _.File)return t;if(t instanceof _.Op)return t;if(t instanceof _.GeoPoint)return t;if(t instanceof _.ACL)return t;if("ACL"===e)return new _.ACL(t);if(t.__op)return _.Op._decode(t);var n;if("Pointer"===t.__type){n=t.className;var r=_.Object._create(n);if((0,a.default)(t).length>3){var i=f.clone(t);delete i.__type,delete i.className,r._finishFetch(i,!0)}else r._finishFetch({objectId:t.objectId},!1);return r}if("Object"===t.__type){n=t.className;var o=f.clone(t);delete o.__type,delete o.className;var s=_.Object._create(n);return s._finishFetch(o,!0),s}if("Date"===t.__type)return _._parseDate(t.iso);if("GeoPoint"===t.__type)return new _.GeoPoint({latitude:t.latitude,longitude:t.longitude});if("Relation"===t.__type){if(!e)throw new Error("key missing decoding a Relation");var u=new _.Relation(null,e);return u.targetClassName=t.className,u}if("File"===t.__type){var c=new _.File(t.name),l=f.clone(t);return delete l.__type,c._finishFetch(l),c}return f.mapObject(t,_._decode)},_.parseJSON=_._decode,_.parse=function(t){return _.parseJSON(JSON.parse(t))},_.stringify=function(t){return(0,o.default)(_._encode(t,[],!1,!0))},_._encodeObjectOrArray=function(t){var e=function(t){return t&&t._toFullJSON&&(t=t._toFullJSON([])),f.mapObject(t,function(t){return _._encode(t,[])})};return f.isArray(t)?t.map(function(t){return e(t)}):e(t)},_._arrayEach=f.each,_._traverse=function(t,e,n){if(t instanceof _.Object){if(n=n||[],f.indexOf(n,t)>=0)return;return n.push(t),_._traverse(t.attributes,e,n),e(t)}return t instanceof _.Relation||t instanceof _.File?e(t):f.isArray(t)?(f.each(t,function(r,i){var o=_._traverse(r,e,n);o&&(t[i]=o)}),e(t)):f.isObject(t)?(_._each(t,function(r,i){var o=_._traverse(r,e,n);o&&(t[i]=o)}),e(t)):e(t)},_._objectEach=_._each=function(t,e){f.isObject(t)?f.each(f.keys(t),function(n){e(t[n],n)}):f.each(t,e)},_.debug={enable:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"leancloud*";return h.enable(t)},disable:h.disable},_.setAdapters=g,t.exports=_}).call(e,n(66))},function(t,e,n){"use strict";var r=n(0),i=n(180),o=n(19),s=o.inherits,a=s(i,{constructor:function(){i.apply(this),this._adapters={}},getAdapter:function(t){var e=this._adapters[t];if(void 0===e)throw new Error(t+" adapter is not configured");return e},setAdapters:function(t){var e=this;r.extend(this._adapters,t),r.keys(t).forEach(function(n){return e.emit(n,t[n])})}}),u=new a;t.exports={getAdapter:u.getAdapter.bind(u),setAdapters:u.setAdapters.bind(u),adapterManager:u}},function(t,e,n){t.exports={default:n(315),__esModule:!0}},function(t,e,n){var r=n(62)("meta"),i=n(9),o=n(25),s=n(20).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(29)(function(){return u(Object.preventExtensions({}))}),f=function(t){s(t,r,{value:{i:"O"+ ++a,w:{}}})},l=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[r].i},h=function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[r].w},d=function(t){return c&&p.NEED&&u(t)&&!o(t,r)&&f(t),t},p=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:h,onFreeze:d}},function(t,e){t.exports=!0},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(117),i=n(89);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(20).f,i=n(25),o=n(8)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return s});var r=n(2),i=n(235),o=r.s&&Object(i.a)(new DataView(new ArrayBuffer(8))),s="undefined"!=typeof Map&&Object(i.a)(new Map)},function(t,e,n){"use strict";function r(t){if(!Object(i.a)(t))return[];var e=[];for(var n in t)e.push(n);return o.h&&Object(s.a)(t,e),e}e.a=r;var i=n(31),o=n(2),s=n(139)},function(t,e,n){"use strict";function r(t){return i.a.toPath(t)}e.a=r;var i=n(12);n(148)},function(t,e,n){"use strict";function r(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}}e.a=r},function(t,e,n){"use strict";function r(t,e,n){var r=[];return e=Object(i.a)(e,n),Object(o.a)(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r}e.a=r;var i=n(10),o=n(33)},function(t,e,n){"use strict";function r(t,e,n,r){return Object(i.a)(t)||(t=Object(o.a)(t)),("number"!=typeof n||r)&&(n=0),Object(s.a)(t,e,n)>=0}e.a=r;var i=n(13),o=n(39),s=n(164)},function(t,e,n){var r=n(9);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e){},function(t,e,n){var r=n(15),i=n(116),o=n(89),s=n(87)("IE_PROTO"),a=function(){},u=function(){var t,e=n(83)("iframe"),r=o.length;for(e.style.display="none",n(118).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[s]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(80),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(50),i=n(8)("toStringTag"),o="Arguments"==r(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=s(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(24);t.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t){return t=Object(i.a)({},t),function(e){return Object(o.a)(e,t)}}e.a=r;var i=n(99),o=n(140)},function(t,e,n){"use strict";var r=n(11),i=n(156),o=n(12),s=Object(r.a)(function(t,e){var n=s.placeholder,r=function(){for(var o=0,s=e.length,a=Array(s),u=0;u<s;u++)a[u]=e[u]===n?arguments[o++]:e[u];for(;o<arguments.length;)a.push(arguments[o++]);return Object(i.a)(t,r,this,this,a)};return r});s.placeholder=o.a,e.a=s},function(t,e,n){"use strict";function r(t,e){return function(n,r,s){var a=e?[[],[]]:{};return r=Object(i.a)(r,s),Object(o.a)(n,function(e,i){var o=r(e,i,n);t(a,e,o)}),a}}e.a=r;var i=n(10),o=n(33)},function(t,e,n){var r=n(4),i=n(1),o=n(29);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],s={};s[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",s)}},function(t,e,n){t.exports={default:n(311),__esModule:!0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(21),o=r(i),s=n(23),a=r(s),u=n(107),c=r(u),f=(n(0),n(185)),l=f.timeout,h=n(34),d=h("leancloud:request"),p=h("leancloud:request:error"),v=n(43),m=v.getAdapter,y=0,g=function(t){var e=t.method,n=t.url,r=t.query,i=t.data,s=t.headers,u=void 0===s?{}:s,f=t.timeout,v=t.onprogress;if(r){var g=(0,c.default)(r).map(function(t){var e=r[t];if(void 0!==e){var n="object"===(void 0===e?"undefined":(0,a.default)(e))?(0,o.default)(e):e;return encodeURIComponent(t)+"="+encodeURIComponent(n)}}).filter(function(t){return t}).join("&");n=n+"?"+g}var b=y++;d("request(%d) %s %s %o %o %o",b,e,n,r,i,u);var _=m("request"),w=_(n,{method:e,headers:u,data:i,onprogress:v}).then(function(t){if(d("response(%d) %d %O %o",b,t.status,t.data||t.text,t.header),!1===t.ok){var e=new Error;throw e.response=t,e}return t.data}).catch(function(t){throw t.response&&(h.enabled("leancloud:request")||p("request(%d) %s %s %o %o %o",b,e,n,r,i,u),p("response(%d) %d %O %o",b,t.response.status,t.response.data||t.response.text,t.response.header),t.statusCode=t.response.status,t.responseText=t.response.text,t.response=t.response.data),t});return f?l(w,f):w};t.exports=g},function(t,e,n){t.exports={default:n(314),__esModule:!0}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(75),i=n(48),o=n(26),s=n(84),a=n(25),u=n(115),c=Object.getOwnPropertyDescriptor;e.f=n(16)?c:function(t,e){if(t=o(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(a(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e){},function(t,e,n){function r(t){return null==t?void 0===t?u:a:c&&c in Object(t)?o(t):s(t)}var i=n(205),o=n(437),s=n(438),a="[object Null]",u="[object Undefined]",c=i?i.toStringTag:void 0;t.exports=r},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var r=n(46),i=n(4),o=n(85),s=n(24),a=n(36),u=n(218),c=n(51),f=n(119),l=n(8)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,p,v,m,y){u(n,e,p);var g,b,_,w=function(t){if(!h&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",O="values"==v,T=!1,S=t.prototype,A=S[l]||S["@@iterator"]||v&&S[v],j=A||w(v),I=v?O?w("entries"):j:void 0,x="Array"==e?S.entries||A:A;if(x&&(_=f(x.call(new t)))!==Object.prototype&&_.next&&(c(_,E,!0),r||"function"==typeof _[l]||s(_,l,d)),O&&A&&"values"!==A.name&&(T=!0,j=function(){return A.call(this)}),r&&!y||!h&&!T&&S[l]||s(S,l,j),a[e]=j,a[E]=d,v)if(g={values:O?j:w("values"),keys:m?j:w("keys"),entries:I},y)for(b in g)b in S||o(S,b,g[b]);else i(i.P+i.F*(h||T),e,g);return g}},function(t,e,n){var r=n(9),i=n(5).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(9);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){t.exports=n(24)},function(t,e,n){var r=n(50);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(88)("keys"),i=n(62);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(1),i=n(5),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(46)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(63),i=n(8)("iterator"),o=n(36);t.exports=n(1).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=i(e),this.reject=i(n)}var i=n(47);t.exports.f=function(t){return new r(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2);n.d(e,"VERSION",function(){return r.e});var i=n(11);n.d(e,"restArguments",function(){return i.a});var o=n(31);n.d(e,"isObject",function(){return o.a});var s=n(230);n.d(e,"isNull",function(){return s.a});var a=n(129);n.d(e,"isUndefined",function(){return a.a});var u=n(130);n.d(e,"isBoolean",function(){return u.a});var c=n(231);n.d(e,"isElement",function(){return c.a});var f=n(93);n.d(e,"isString",function(){return f.a});var l=n(131);n.d(e,"isNumber",function(){return l.a});var h=n(232);n.d(e,"isDate",function(){return h.a});var d=n(233);n.d(e,"isRegExp",function(){return d.a});var p=n(234);n.d(e,"isError",function(){return p.a});var v=n(132);n.d(e,"isSymbol",function(){return v.a});var m=n(133);n.d(e,"isArrayBuffer",function(){return m.a});var y=n(94);n.d(e,"isDataView",function(){return y.a});var g=n(32);n.d(e,"isArray",function(){return g.a});var b=n(17);n.d(e,"isFunction",function(){return b.a});var _=n(95);n.d(e,"isArguments",function(){return _.a});var w=n(236);n.d(e,"isFinite",function(){return w.a});var E=n(134);n.d(e,"isNaN",function(){return E.a});var O=n(135);n.d(e,"isTypedArray",function(){return O.a});var T=n(238);n.d(e,"isEmpty",function(){return T.a});var S=n(140);n.d(e,"isMatch",function(){return S.a});var A=n(239);n.d(e,"isEqual",function(){return A.a});var j=n(241);n.d(e,"isMap",function(){return j.a});var I=n(242);n.d(e,"isWeakMap",function(){return I.a});var x=n(243);n.d(e,"isSet",function(){return x.a});var C=n(244);n.d(e,"isWeakSet",function(){return C.a});var N=n(6);n.d(e,"keys",function(){return N.a});var P=n(53);n.d(e,"allKeys",function(){return P.a});var R=n(39);n.d(e,"values",function(){return R.a});var k=n(245);n.d(e,"pairs",function(){return k.a});var L=n(141);n.d(e,"invert",function(){return L.a});var U=n(142);n.d(e,"functions",function(){return U.a}),n.d(e,"methods",function(){return U.a});var M=n(143);n.d(e,"extend",function(){return M.a});var D=n(99);n.d(e,"extendOwn",function(){return D.a}),n.d(e,"assign",function(){return D.a});var F=n(144);n.d(e,"defaults",function(){return F.a});var q=n(246);n.d(e,"create",function(){return q.a});var B=n(146);n.d(e,"clone",function(){return B.a});var V=n(247);n.d(e,"tap",function(){return V.a});var W=n(147);n.d(e,"get",function(){return W.a});var Y=n(248);n.d(e,"has",function(){return Y.a});var z=n(249);n.d(e,"mapObject",function(){return z.a});var Q=n(101);n.d(e,"identity",function(){return Q.a});var G=n(136);n.d(e,"constant",function(){return G.a});var J=n(151);n.d(e,"noop",function(){return J.a});var K=n(148);n.d(e,"toPath",function(){return K.a});var H=n(102);n.d(e,"property",function(){return H.a});var $=n(250);n.d(e,"propertyOf",function(){return $.a});var X=n(67);n.d(e,"matcher",function(){return X.a}),n.d(e,"matches",function(){return X.a});var Z=n(251);n.d(e,"times",function(){return Z.a});var tt=n(152);n.d(e,"random",function(){return tt.a});var et=n(103);n.d(e,"now",function(){return et.a});var nt=n(252);n.d(e,"escape",function(){return nt.a});var rt=n(253);n.d(e,"unescape",function(){return rt.a});var it=n(155);n.d(e,"templateSettings",function(){return it.a});var ot=n(255);n.d(e,"template",function(){return ot.a});var st=n(256);n.d(e,"result",function(){return st.a});var at=n(257);n.d(e,"uniqueId",function(){return at.a});var ut=n(258);n.d(e,"chain",function(){return ut.a});var ct=n(150);n.d(e,"iteratee",function(){return ct.a});var ft=n(68);n.d(e,"partial",function(){return ft.a});var lt=n(157);n.d(e,"bind",function(){return lt.a});var ht=n(259);n.d(e,"bindAll",function(){return ht.a});var dt=n(260);n.d(e,"memoize",function(){return dt.a});var pt=n(158);n.d(e,"delay",function(){return pt.a});var vt=n(261);n.d(e,"defer",function(){return vt.a});var mt=n(262);n.d(e,"throttle",function(){return mt.a});var yt=n(263);n.d(e,"debounce",function(){return yt.a});var gt=n(264);n.d(e,"wrap",function(){return gt.a});var bt=n(104);n.d(e,"negate",function(){return bt.a});var _t=n(265);n.d(e,"compose",function(){return _t.a});var wt=n(266);n.d(e,"after",function(){return wt.a});var Et=n(159);n.d(e,"before",function(){return Et.a});var Ot=n(267);n.d(e,"once",function(){return Ot.a});var Tt=n(160);n.d(e,"findKey",function(){return Tt.a});var St=n(105);n.d(e,"findIndex",function(){return St.a});var At=n(162);n.d(e,"findLastIndex",function(){return At.a});var jt=n(163);n.d(e,"sortedIndex",function(){return jt.a});var It=n(164);n.d(e,"indexOf",function(){return It.a});var xt=n(268);n.d(e,"lastIndexOf",function(){return xt.a});var Ct=n(166);n.d(e,"find",function(){return Ct.a}),n.d(e,"detect",function(){return Ct.a});var Nt=n(269);n.d(e,"findWhere",function(){return Nt.a});var Pt=n(33);n.d(e,"each",function(){return Pt.a}),n.d(e,"forEach",function(){return Pt.a});var Rt=n(41);n.d(e,"map",function(){return Rt.a}),n.d(e,"collect",function(){return Rt.a});var kt=n(270);n.d(e,"reduce",function(){return kt.a}),n.d(e,"foldl",function(){return kt.a}),n.d(e,"inject",function(){return kt.a});var Lt=n(271);n.d(e,"reduceRight",function(){return Lt.a}),n.d(e,"foldr",function(){return Lt.a});var Ut=n(56);n.d(e,"filter",function(){return Ut.a}),n.d(e,"select",function(){return Ut.a});var Mt=n(272);n.d(e,"reject",function(){return Mt.a});var Dt=n(273);n.d(e,"every",function(){return Dt.a}),n.d(e,"all",function(){return Dt.a});var Ft=n(274);n.d(e,"some",function(){return Ft.a}),n.d(e,"any",function(){return Ft.a});var qt=n(57);n.d(e,"contains",function(){return qt.a}),n.d(e,"includes",function(){return qt.a}),n.d(e,"include",function(){return qt.a});var Bt=n(275);n.d(e,"invoke",function(){return Bt.a});var Vt=n(106);n.d(e,"pluck",function(){return Vt.a});var Wt=n(276);n.d(e,"where",function(){return Wt.a});var Yt=n(168);n.d(e,"max",function(){return Yt.a});var zt=n(277);n.d(e,"min",function(){return zt.a});var Qt=n(278);n.d(e,"shuffle",function(){return Qt.a});var Gt=n(169);n.d(e,"sample",function(){return Gt.a});var Jt=n(279);n.d(e,"sortBy",function(){return Jt.a});var Kt=n(280);n.d(e,"groupBy",function(){return Kt.a});var Ht=n(281);n.d(e,"indexBy",function(){return Ht.a});var $t=n(282);n.d(e,"countBy",function(){return $t.a});var Xt=n(283);n.d(e,"partition",function(){return Xt.a});var Zt=n(284);n.d(e,"toArray",function(){return Zt.a});var te=n(285);n.d(e,"size",function(){return te.a});var ee=n(170);n.d(e,"pick",function(){return ee.a});var ne=n(287);n.d(e,"omit",function(){return ne.a});var re=n(288);n.d(e,"first",function(){return re.a}),n.d(e,"head",function(){return re.a}),n.d(e,"take",function(){return re.a});var ie=n(171);n.d(e,"initial",function(){return ie.a});var oe=n(289);n.d(e,"last",function(){return oe.a});var se=n(172);n.d(e,"rest",function(){return se.a}),n.d(e,"tail",function(){return se.a}),n.d(e,"drop",function(){return se.a});var ae=n(290);n.d(e,"compact",function(){return ae.a});var ue=n(291);n.d(e,"flatten",function(){return ue.a});var ce=n(292);n.d(e,"without",function(){return ce.a});var fe=n(174);n.d(e,"uniq",function(){return fe.a}),n.d(e,"unique",function(){return fe.a});var le=n(293);n.d(e,"union",function(){return le.a});var he=n(294);n.d(e,"intersection",function(){return he.a});var de=n(173);n.d(e,"difference",function(){return de.a});var pe=n(175);n.d(e,"unzip",function(){return pe.a}),n.d(e,"transpose",function(){return pe.a});var ve=n(295);n.d(e,"zip",function(){return ve.a});var me=n(296);n.d(e,"object",function(){return me.a});var ye=n(297);n.d(e,"range",function(){return ye.a});var ge=n(298);n.d(e,"chunk",function(){return ge.a});var be=n(299);n.d(e,"mixin",function(){return be.a});var _e=n(300);n.d(e,"default",function(){return _e.a})},function(t,e,n){"use strict";var r=n(7);e.a=Object(r.a)("String")},function(t,e,n){"use strict";function r(t){return null!=t&&Object(o.a)(t.getInt8)&&Object(s.a)(t.buffer)}var i=n(7),o=n(17),s=n(133),a=n(52),u=Object(i.a)("DataView");e.a=a.a?r:u},function(t,e,n){"use strict";var r=n(7),i=n(27),o=Object(r.a)("Arguments");!function(){o(arguments)||(o=function(t){return Object(i.a)(t,"callee")})}(),e.a=o},function(t,e,n){"use strict";var r=n(138);e.a=Object(r.a)("byteLength")},function(t,e,n){"use strict";function r(t){var e=Object(i.a)(t);return function(n){if(null==n)return!1;var r=Object(s.a)(n);if(Object(i.a)(r))return!1;for(var u=0;u<e;u++)if(!Object(o.a)(n[t[u]]))return!1;return t!==l||!Object(o.a)(n[a])}}e.a=r,n.d(e,"b",function(){return f}),n.d(e,"d",function(){return l}),n.d(e,"c",function(){return h});var i=n(18),o=n(17),s=n(53),a="forEach",u=["clear","delete"],c=["get","has","set"],f=u.concat(a,c),l=u.concat(c),h=["add"].concat(u,a,"has")},function(t,e,n){"use strict";function r(t,e){return function(n){var r=arguments.length;if(e&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],s=t(o),a=s.length,u=0;u<a;u++){var c=s[u];e&&void 0!==n[c]||(n[c]=o[c])}return n}}e.a=r},function(t,e,n){"use strict";var r=n(98),i=n(6);e.a=Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0}e.a=r},function(t,e,n){"use strict";function r(t){return t}e.a=r},function(t,e,n){"use strict";function r(t){return t=Object(o.a)(t),function(e){return Object(i.a)(e,t)}}e.a=r;var i=n(100),o=n(54)},function(t,e,n){"use strict";e.a=Date.now||function(){return(new Date).getTime()}},function(t,e,n){"use strict";function r(t){return function(){return!t.apply(this,arguments)}}e.a=r},function(t,e,n){"use strict";var r=n(161);e.a=Object(r.a)(1)},function(t,e,n){"use strict";function r(t,e){return Object(i.a)(t,Object(o.a)(e))}e.a=r;var i=n(41),o=n(102)},function(t,e,n){t.exports={default:n(302),__esModule:!0}},function(t,e,n){e.f=n(8)},function(t,e,n){var r=n(5),i=n(1),o=n(46),s=n(108),a=n(20).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){var r=n(117),i=n(89).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){t.exports={default:n(334),__esModule:!0}},function(t,e,n){t.exports={default:n(350),__esModule:!0}},function(t,e,n){"use strict";t.exports=n(379)},function(t,e,n){var r=n(22),i=n(86),o=n(30),s=n(61),a=n(383);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,f=4==t,l=6==t,h=5==t||l,d=e||a;return function(e,a,p){for(var v,m,y=o(e),g=i(y),b=r(a,p,3),_=s(g.length),w=0,E=n?d(e,_):u?d(e,0):void 0;_>w;w++)if((h||w in g)&&(v=g[w],m=b(v,w,y),t))if(n)E[w]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:E.push(v)}else if(f)return!1;return l?-1:c||f?f:E}}},function(t,e,n){t.exports=!n(16)&&!n(29)(function(){return 7!=Object.defineProperty(n(83)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(20),i=n(15),o=n(49);t.exports=n(16)?Object.defineProperties:function(t,e){i(t);for(var n,s=o(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var r=n(25),i=n(26),o=n(219)(!1),s=n(87)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,c=[];for(n in a)n!=s&&r(a,n)&&c.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(5).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(25),i=n(30),o=n(87)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(15);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(36),i=n(8)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(15),i=n(47),o=n(8)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||void 0==(n=r(s)[o])?e:i(n)}},function(t,e,n){var r,i,o,s=n(22),a=n(224),u=n(118),c=n(83),f=n(5),l=f.process,h=f.setImmediate,d=f.clearImmediate,p=f.MessageChannel,v=f.Dispatch,m=0,y={},g=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},b=function(t){g.call(t.data)};h&&d||(h=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++m]=function(){a("function"==typeof t?t:Function(t),e)},r(m),m},d=function(t){delete y[t]},"process"==n(50)(l)?r=function(t){l.nextTick(s(g,t,1))}:v&&v.now?r=function(t){v.now(s(g,t,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=b,r=s(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),g.call(t)}}:function(t){setTimeout(s(g,t,1),0)}),t.exports={set:h,clear:d}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(15),i=n(9),o=n(91);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(5),i=n(1),o=n(20),s=n(16),a=n(8)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];s&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(8)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(t){}return n}},function(t,e,n){"use strict";function r(t){return void 0===t}e.a=r},function(t,e,n){"use strict";function r(t){return!0===t||!1===t||"[object Boolean]"===i.t.call(t)}e.a=r;var i=n(2)},function(t,e,n){"use strict";var r=n(7);e.a=Object(r.a)("Number")},function(t,e,n){"use strict";var r=n(7);e.a=Object(r.a)("Symbol")},function(t,e,n){"use strict";var r=n(7);e.a=Object(r.a)("ArrayBuffer")},function(t,e,n){"use strict";function r(t){return Object(o.a)(t)&&Object(i.g)(t)}e.a=r;var i=n(2),o=n(131)},function(t,e,n){"use strict";function r(t){return i.l?Object(i.l)(t)&&!Object(o.a)(t):Object(a.a)(t)&&u.test(i.t.call(t))}var i=n(2),o=n(94),s=n(136),a=n(237),u=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;e.a=i.r?r:Object(s.a)(!1)},function(t,e,n){"use strict";function r(t){return function(){return t}}e.a=r},function(t,e,n){"use strict";function r(t){return function(e){var n=t(e);return"number"==typeof n&&n>=0&&n<=i.b}}e.a=r;var i=n(2)},function(t,e,n){"use strict";function r(t){return function(e){return null==e?void 0:e[t]}}e.a=r},function(t,e,n){"use strict";function r(t){for(var e={},n=t.length,r=0;r<n;++r)e[t[r]]=!0;return{contains:function(t){return e[t]},push:function(n){return e[n]=!0,t.push(n)}}}function i(t,e){e=r(e);var n=o.n.length,i=t.constructor,u=Object(s.a)(i)&&i.prototype||o.c,c="constructor";for(Object(a.a)(t,c)&&!e.contains(c)&&e.push(c);n--;)(c=o.n[n])in t&&t[c]!==u[c]&&!e.contains(c)&&e.push(c)}e.a=i;var o=n(2),s=n(17),a=n(27)},function(t,e,n){"use strict";function r(t,e){var n=Object(i.a)(e),r=n.length;if(null==t)return!r;for(var o=Object(t),s=0;s<r;s++){var a=n[s];if(e[a]!==o[a]||!(a in o))return!1}return!0}e.a=r;var i=n(6)},function(t,e,n){"use strict";function r(t){for(var e={},n=Object(i.a)(t),r=0,o=n.length;r<o;r++)e[t[n[r]]]=n[r];return e}e.a=r;var i=n(6)},function(t,e,n){"use strict";function r(t){var e=[];for(var n in t)Object(i.a)(t[n])&&e.push(n);return e.sort()}e.a=r;var i=n(17)},function(t,e,n){"use strict";var r=n(98),i=n(53);e.a=Object(r.a)(i.a)},function(t,e,n){"use strict";var r=n(98),i=n(53);e.a=Object(r.a)(i.a,!0)},function(t,e,n){"use strict";function r(){return function(){}}function i(t){if(!Object(o.a)(t))return{};if(s.j)return Object(s.j)(t);var e=r();e.prototype=t;var n=new e;return e.prototype=null,n}e.a=i;var o=n(31),s=n(2)},function(t,e,n){"use strict";function r(t){return Object(i.a)(t)?Object(o.a)(t)?t.slice():Object(s.a)({},t):t}e.a=r;var i=n(31),o=n(32),s=n(143)},function(t,e,n){"use strict";function r(t,e,n){var r=Object(o.a)(t,Object(i.a)(e));return Object(s.a)(r)?n:r}e.a=r;var i=n(54),o=n(100),s=n(129)},function(t,e,n){"use strict";function r(t){return Object(o.a)(t)?t:[t]}e.a=r;var i=n(12),o=n(32);i.a.toPath=r},function(t,e,n){"use strict";function r(t,e,n){return null==t?i.a:Object(o.a)(t)?Object(f.a)(t,e,n):Object(s.a)(t)&&!Object(a.a)(t)?Object(u.a)(t):Object(c.a)(t)}e.a=r;var i=n(101),o=n(17),s=n(31),a=n(32),u=n(67),c=n(102),f=n(55)},function(t,e,n){"use strict";function r(t,e){return Object(o.a)(t,e,1/0)}e.a=r;var i=n(12),o=n(149);i.a.iteratee=r},function(t,e,n){"use strict";function r(){}e.a=r},function(t,e,n){"use strict";function r(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}e.a=r},function(t,e,n){"use strict";function r(t){var e=function(e){return t[e]},n="(?:"+Object(i.a)(t).join("|")+")",r=RegExp(n),o=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(o,e):t}}e.a=r;var i=n(6)},function(t,e,n){"use strict";e.a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"}},function(t,e,n){"use strict";var r=n(12);e.a=r.a.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g}},function(t,e,n){"use strict";function r(t,e,n,r,s){if(!(r instanceof e))return t.apply(n,s);var a=Object(i.a)(t.prototype),u=t.apply(a,s);return Object(o.a)(u)?u:a}e.a=r;var i=n(145),o=n(31)},function(t,e,n){"use strict";var r=n(11),i=n(17),o=n(156);e.a=Object(r.a)(function(t,e,n){if(!Object(i.a)(t))throw new TypeError("Bind must be called on a function");var s=Object(r.a)(function(r){return Object(o.a)(t,s,e,this,n.concat(r))});return s})},function(t,e,n){"use strict";var r=n(11);e.a=Object(r.a)(function(t,e,n){return setTimeout(function(){return t.apply(null,n)},e)})},function(t,e,n){"use strict";function r(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}e.a=r},function(t,e,n){"use strict";function r(t,e,n){e=Object(i.a)(e,n);for(var r,s=Object(o.a)(t),a=0,u=s.length;a<u;a++)if(r=s[a],e(t[r],r,t))return r}e.a=r;var i=n(10),o=n(6)},function(t,e,n){"use strict";function r(t){return function(e,n,r){n=Object(i.a)(n,r);for(var s=Object(o.a)(e),a=t>0?0:s-1;a>=0&&a<s;a+=t)if(n(e[a],a,e))return a;return-1}}e.a=r;var i=n(10),o=n(18)},function(t,e,n){"use strict";var r=n(161);e.a=Object(r.a)(-1)},function(t,e,n){"use strict";function r(t,e,n,r){n=Object(i.a)(n,r,1);for(var s=n(e),a=0,u=Object(o.a)(t);a<u;){var c=Math.floor((a+u)/2);n(t[c])<s?a=c+1:u=c}return a}e.a=r;var i=n(10),o=n(18)},function(t,e,n){"use strict";var r=n(163),i=n(105),o=n(165);e.a=Object(o.a)(1,i.a,r.a)},function(t,e,n){"use strict";function r(t,e,n){return function(r,a,u){var c=0,f=Object(i.a)(r);if("number"==typeof u)t>0?c=u>=0?u:Math.max(u+f,c):f=u>=0?Math.min(u+1,f):u+f+1;else if(n&&u&&f)return u=n(r,a),r[u]===a?u:-1;if(a!==a)return u=e(o.q.call(r,c,f),s.a),u>=0?u+c:-1;for(u=t>0?c:f-1;u>=0&&u<f;u+=t)if(r[u]===a)return u;return-1}}e.a=r;var i=n(18),o=n(2),s=n(134)},function(t,e,n){"use strict";function r(t,e,n){var r=Object(i.a)(t)?o.a:s.a,a=r(t,e,n);if(void 0!==a&&-1!==a)return t[a]}e.a=r;var i=n(13),o=n(105),s=n(160)},function(t,e,n){"use strict";function r(t){var e=function(e,n,r,s){var a=!Object(i.a)(e)&&Object(o.a)(e),u=(a||e).length,c=t>0?0:u-1;for(s||(r=e[a?a[c]:c],c+=t);c>=0&&c<u;c+=t){var f=a?a[c]:c;r=n(r,e[f],f,e)}return r};return function(t,n,r,i){var o=arguments.length>=3;return e(t,Object(s.a)(n,i,4),r,o)}}e.a=r;var i=n(13),o=n(6),s=n(55)},function(t,e,n){"use strict";function r(t,e,n){var r,u,c=-1/0,f=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t){t=Object(i.a)(t)?t:Object(o.a)(t);for(var l=0,h=t.length;l<h;l++)null!=(r=t[l])&&r>c&&(c=r)}else e=Object(s.a)(e,n),Object(a.a)(t,function(t,n,r){((u=e(t,n,r))>f||u===-1/0&&c===-1/0)&&(c=t,f=u)});return c}e.a=r;var i=n(13),o=n(39),s=n(10),a=n(33)},function(t,e,n){"use strict";function r(t,e,n){if(null==e||n)return Object(i.a)(t)||(t=Object(s.a)(t)),t[Object(u.a)(t.length-1)];var r=Object(i.a)(t)?Object(o.a)(t):Object(s.a)(t),c=Object(a.a)(r);e=Math.max(Math.min(e,c),0);for(var f=c-1,l=0;l<e;l++){var h=Object(u.a)(l,f),d=r[l];r[l]=r[h],r[h]=d}return r.slice(0,e)}e.a=r;var i=n(13),o=n(146),s=n(39),a=n(18),u=n(152)},function(t,e,n){"use strict";var r=n(11),i=n(17),o=n(55),s=n(53),a=n(286),u=n(40);e.a=Object(r.a)(function(t,e){var n={},r=e[0];if(null==t)return n;Object(i.a)(r)?(e.length>1&&(r=Object(o.a)(r,e[1])),e=Object(s.a)(t)):(r=a.a,e=Object(u.a)(e,!1,!1),t=Object(t));for(var c=0,f=e.length;c<f;c++){var l=e[c],h=t[l];r(h,l,t)&&(n[l]=h)}return n})},function(t,e,n){"use strict";function r(t,e,n){return i.q.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}e.a=r;var i=n(2)},function(t,e,n){"use strict";function r(t,e,n){return i.q.call(t,null==e||n?1:e)}e.a=r;var i=n(2)},function(t,e,n){"use strict";var r=n(11),i=n(40),o=n(56),s=n(57);e.a=Object(r.a)(function(t,e){return e=Object(i.a)(e,!0,!0),Object(o.a)(t,function(t){return!Object(s.a)(e,t)})})},function(t,e,n){"use strict";function r(t,e,n,r){Object(i.a)(e)||(r=n,n=e,e=!1),null!=n&&(n=Object(o.a)(n,r));for(var u=[],c=[],f=0,l=Object(s.a)(t);f<l;f++){var h=t[f],d=n?n(h,f,t):h;e&&!n?(f&&c===d||u.push(h),c=d):n?Object(a.a)(c,d)||(c.push(d),u.push(h)):Object(a.a)(u,h)||u.push(h)}return u}e.a=r;var i=n(130),o=n(10),s=n(18),a=n(57)},function(t,e,n){"use strict";function r(t){for(var e=t&&Object(i.a)(t,o.a).length||0,n=Array(e),r=0;r<e;r++)n[r]=Object(s.a)(t,r);return n}e.a=r;var i=n(168),o=n(18),s=n(106)},function(t,e,n){"use strict";function r(t,e){return t._chain?Object(i.a)(e).chain():e}e.a=r;var i=n(12)},function(t,e,n){function r(t,e,n){var r=e&&n||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;a<16;++a)e[r+a]=s[a];return e||o(s)}var i=n(304),o=n(305);t.exports=r},function(t,e,n){t.exports={default:n(308),__esModule:!0}},function(t,e,n){"use strict";t.exports="4.12.3"},function(t,e,n){"use strict";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(){this._events=new r,this._eventsCount=0}var s=Object.prototype.hasOwnProperty,a="~";Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(a=!1)),o.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)s.call(t,e)&&n.push(a?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t,e){var n=a?a+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},o.prototype.emit=function(t,e,n,r,i,o){var s=a?a+t:t;if(!this._events[s])return!1;var u,c,f=this._events[s],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,e),!0;case 3:return f.fn.call(f.context,e,n),!0;case 4:return f.fn.call(f.context,e,n,r),!0;case 5:return f.fn.call(f.context,e,n,r,i),!0;case 6:return f.fn.call(f.context,e,n,r,i,o),!0}for(c=1,u=new Array(l-1);c<l;c++)u[c-1]=arguments[c];f.fn.apply(f.context,u)}else{var h,d=f.length;for(c=0;c<d;c++)switch(f[c].once&&this.removeListener(t,f[c].fn,void 0,!0),l){case 1:f[c].fn.call(f[c].context);break;case 2:f[c].fn.call(f[c].context,e);break;case 3:f[c].fn.call(f[c].context,e,n);break;case 4:f[c].fn.call(f[c].context,e,n,r);break;default:if(!u)for(h=1,u=new Array(l-1);h<l;h++)u[h-1]=arguments[h];f[c].fn.apply(f[c].context,u)}}return!0},o.prototype.on=function(t,e,n){var r=new i(e,n||this),o=a?a+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],r]:this._events[o].push(r):(this._events[o]=r,this._eventsCount++),this},o.prototype.once=function(t,e,n){var r=new i(e,n||this,!0),o=a?a+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],r]:this._events[o].push(r):(this._events[o]=r,this._eventsCount++),this},o.prototype.removeListener=function(t,e,n,i){var o=a?a+t:t;if(!this._events[o])return this;if(!e)return 0==--this._eventsCount?this._events=new r:delete this._events[o],this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||n&&s.context!==n||(0==--this._eventsCount?this._events=new r:delete this._events[o]);else{for(var u=0,c=[],f=s.length;u<f;u++)(s[u].fn!==e||i&&!s[u].once||n&&s[u].context!==n)&&c.push(s[u]);c.length?this._events[o]=1===c.length?c[0]:c:0==--this._eventsCount?this._events=new r:delete this._events[o]}return this},o.prototype.removeAllListeners=function(t){var e;return t?(e=a?a+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new r:delete this._events[e])):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prototype.setMaxListeners=function(){return this},o.prefixed=a,o.EventEmitter=o,t.exports=o},function(t,e,n){"use strict";var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(43),s=o.getAdapter,a=["getItem","setItem","removeItem","clear"],u={get async(){return s("storage").async}};a.forEach(function(t){u[t+"Async"]=function(){var e=s("storage");return i.default.resolve(e[t].apply(e,arguments))},u[t]=function(){var e=s("storage");if(!e.async)return e[t].apply(e,arguments);var n=new Error("Synchronous API ["+t+"] is not available in this runtime.");throw n.code="SYNC_API_NOT_AVAILABLE",n}}),t.exports=u},function(t,e,n){"use strict";var r=n(21),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(181),s=n(42),a=e.removeAsync=o.removeItemAsync.bind(o),u=function(t,e){try{t=JSON.parse(t)}catch(t){return null}if(t){return t.expiredAt&&t.expiredAt<Date.now()?a(e).then(function(){return null}):t.value}return null};e.getAsync=function(t){return t="AV/"+s.applicationId+"/"+t,o.getItemAsync(t).then(function(e){return u(e,t)})},e.setAsync=function(t,e,n){var r={value:e};return"number"==typeof n&&(r.expiredAt=Date.now()+n),o.setItemAsync("AV/"+s.applicationId+"/"+t,(0,i.default)(r))}},function(t,e,n){"use strict";var r=n(5),i=n(25),o=n(16),s=n(4),a=n(85),u=n(45).KEY,c=n(29),f=n(88),l=n(51),h=n(62),d=n(8),p=n(108),v=n(109),m=n(316),y=n(184),g=n(15),b=n(9),_=n(30),w=n(26),E=n(84),O=n(48),T=n(60),S=n(317),A=n(76),j=n(74),I=n(20),x=n(49),C=A.f,N=I.f,P=S.f,R=r.Symbol,k=r.JSON,L=k&&k.stringify,U=d("_hidden"),M=d("toPrimitive"),D={}.propertyIsEnumerable,F=f("symbol-registry"),q=f("symbols"),B=f("op-symbols"),V=Object.prototype,W="function"==typeof R&&!!j.f,Y=r.QObject,z=!Y||!Y.prototype||!Y.prototype.findChild,Q=o&&c(function(){return 7!=T(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=C(V,e);r&&delete V[e],N(t,e,n),r&&t!==V&&N(V,e,r)}:N,G=function(t){var e=q[t]=T(R.prototype);return e._k=t,e},J=W&&"symbol"==typeof R.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof R},K=function(t,e,n){return t===V&&K(B,e,n),g(t),e=E(e,!0),g(n),i(q,e)?(n.enumerable?(i(t,U)&&t[U][e]&&(t[U][e]=!1),n=T(n,{enumerable:O(0,!1)})):(i(t,U)||N(t,U,O(1,{})),t[U][e]=!0),Q(t,e,n)):N(t,e,n)},H=function(t,e){g(t);for(var n,r=m(e=w(e)),i=0,o=r.length;o>i;)K(t,n=r[i++],e[n]);return t},$=function(t,e){return void 0===e?T(t):H(T(t),e)},X=function(t){var e=D.call(this,t=E(t,!0));return!(this===V&&i(q,t)&&!i(B,t))&&(!(e||!i(this,t)||!i(q,t)||i(this,U)&&this[U][t])||e)},Z=function(t,e){if(t=w(t),e=E(e,!0),t!==V||!i(q,e)||i(B,e)){var n=C(t,e);return!n||!i(q,e)||i(t,U)&&t[U][e]||(n.enumerable=!0),n}},tt=function(t){for(var e,n=P(w(t)),r=[],o=0;n.length>o;)i(q,e=n[o++])||e==U||e==u||r.push(e);return r},et=function(t){for(var e,n=t===V,r=P(n?B:w(t)),o=[],s=0;r.length>s;)!i(q,e=r[s++])||n&&!i(V,e)||o.push(q[e]);return o};W||(R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===V&&e.call(B,n),i(this,U)&&i(this[U],t)&&(this[U][t]=!1),Q(this,t,O(1,n))};return o&&z&&Q(V,t,{configurable:!0,set:e}),G(t)},a(R.prototype,"toString",function(){return this._k}),A.f=Z,I.f=K,n(110).f=S.f=tt,n(75).f=X,j.f=et,o&&!n(46)&&a(V,"propertyIsEnumerable",X,!0),p.f=function(t){return G(d(t))}),s(s.G+s.W+s.F*!W,{Symbol:R});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;nt.length>rt;)d(nt[rt++]);for(var it=x(d.store),ot=0;it.length>ot;)v(it[ot++]);s(s.S+s.F*!W,"Symbol",{for:function(t){return i(F,t+="")?F[t]:F[t]=R(t)},keyFor:function(t){if(!J(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){z=!0},useSimple:function(){z=!1}}),s(s.S+s.F*!W,"Object",{create:$,defineProperty:K,defineProperties:H,getOwnPropertyDescriptor:Z,getOwnPropertyNames:tt,getOwnPropertySymbols:et});var st=c(function(){j.f(1)});s(s.S+s.F*st,"Object",{getOwnPropertySymbols:function(t){return j.f(_(t))}}),k&&s(s.S+s.F*(!W||c(function(){var t=R();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!J(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!J(e))return e}),r[1]=e,L.apply(k,r)}}),R.prototype[M]||n(24)(R.prototype,M,R.prototype.valueOf),l(R,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){var r=n(50);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";var r;t.exports.timeout=function(t,e){var n,i=new r;return Promise.race([t,new Promise(function(t,r){n=setTimeout(function(){r(i)},e)})]).then(function(t){return clearTimeout(n),t},function(t){throw clearTimeout(n),t})};r=t.exports.TimeoutError=function(){Error.call(this),this.stack=Error().stack,this.message="Timeout"},r.prototype=Object.create(Error.prototype),r.prototype.name="TimeoutError"},function(t,e,n){t.exports={default:n(338),__esModule:!0}},function(t,e){var n={utf8:{stringToBytes:function(t){return n.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(n.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e},bytesToString:function(t){for(var e=[],n=0;n<t.length;n++)e.push(String.fromCharCode(t[n]));return e.join("")}}};t.exports=n},function(t,e,n){t.exports={default:n(347),__esModule:!0}},function(t,e,n){"use strict";var r=n(366);t.exports=function(t){return t.setAdapters(r),t}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){"@babel/helpers - typeof";return(i="function"==typeof l.default&&"symbol"===(0,c.default)(a.default)?function(t){return void 0===t?"undefined":(0,c.default)(t)}:function(t){return t&&"function"==typeof l.default&&t.constructor===l.default&&t!==l.default.prototype?"symbol":void 0===t?"undefined":(0,c.default)(t)})(t)}function o(t){return null!==t&&"object"===i(t)}var s=n(73),a=r(s),u=n(23),c=r(u),f=n(44),l=r(f);t.exports=o},function(t,e,n){t.exports={default:n(376),__esModule:!0}},function(t,e,n){"use strict";var r=n(20),i=n(48);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){t.exports={default:n(380),__esModule:!0}},function(t,e,n){"use strict";var r=n(5),i=n(4),o=n(45),s=n(29),a=n(24),u=n(65),c=n(38),f=n(64),l=n(9),h=n(51),d=n(20).f,p=n(114)(0),v=n(16);t.exports=function(t,e,n,m,y,g){var b=r[t],_=b,w=y?"set":"add",E=_&&_.prototype,O={};return v&&"function"==typeof _&&(g||E.forEach&&!s(function(){(new _).entries().next()}))?(_=e(function(e,n){f(e,_,t,"_c"),e._c=new b,void 0!=n&&c(n,y,e[w],e)}),p("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(t){var e="add"==t||"set"==t;t in E&&(!g||"clear"!=t)&&a(_.prototype,t,function(n,r){if(f(this,_,t),!e&&g&&!l(n))return"get"==t&&void 0;var i=this._c[t](0===n?0:n,r);return e?this:i})}),g||d(_.prototype,"size",{get:function(){return this._c.size}})):(_=m.getConstructor(e,t,y,w),u(_.prototype,n),o.NEED=!0),h(_,t),O[t]=_,i(i.G+i.W+i.F,O),g||m.setStrong(_,t,y),_}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){"use strict";var r=n(4),i=n(47),o=n(22),s=n(38);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,a,u=arguments[1];return i(this),e=void 0!==u,e&&i(u),void 0==t?new this:(n=[],e?(r=0,a=o(u,arguments[2],2),s(t,!1,function(t){n.push(a(t,r++))})):s(t,!1,n.push,n),new this(n))}})}},function(t,e,n){"use strict";var r=n(16),i=n(49),o=n(74),s=n(75),a=n(30),u=n(86),c=Object.assign;t.exports=!c||n(29)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=a(t),c=arguments.length,f=1,l=o.f,h=s.f;c>f;)for(var d,p=u(arguments[f++]),v=l?i(p).concat(l(p)):i(p),m=v.length,y=0;m>y;)d=v[y++],r&&!h.call(p,d)||(n[d]=p[d]);return n}:c},function(t,e,n){t.exports={default:n(403),__esModule:!0}},function(t,e,n){t.exports={default:n(404),__esModule:!0}},function(t,e){function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}t.exports=n},function(t,e){function n(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}t.exports=n},function(t,e,n){function r(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}var i=n(200);t.exports=r},function(t,e,n){function r(t,e){var n=-1,r=t.length,o=r-1;for(e=void 0===e?r:e;++n<e;){var s=i(n,o),a=t[s];t[s]=t[n],t[n]=a}return t.length=e,t}var i=n(428);t.exports=r},function(t,e,n){function r(t){return null==t?[]:i(t,o(t))}var i=n(430),o=n(432);t.exports=r},function(t,e,n){var r=n(206),i=r.Symbol;t.exports=i},function(t,e,n){var r=n(207),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,n(66))},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}var r=9007199254740991;t.exports=n},function(t,e){function n(t,e){return function(n){return t(e(n))}}t.exports=n},function(t,e,n){"use strict";var r=n(213),i=n(378),o=n(189);t.exports=o(i(r))},function(t,e,n){"use strict";var r=n(214),i=n(189);t.exports=i(r)},function(t,e,n){"use strict";t.exports=n(215)},function(t,e,n){"use strict";var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(0),s=n(42);s._=o,s.version=n(179),s.Promise=i.default,s.localStorage=n(181),s.Cache=n(182),s.Error=n(28),n(310),n(320)(s),n(321)(s),n(322)(s),n(323)(s),n(324)(s),n(325)(s),n(346)(s),n(352)(s),n(353)(s),n(355)(s),n(356)(s),n(357)(s),n(358)(s),n(359)(s),n(360)(s),n(361)(s),n(362)(s),n(363)(s),s.Conversation=n(364),n(365),t.exports=s},function(t,e,n){n(59),n(35),n(37),n(223),n(227),n(228),t.exports=n(1).Promise},function(t,e,n){var r=n(80),i=n(81);t.exports=function(t){return function(e,n){var o,s,a=String(i(e)),u=r(n),c=a.length;return u<0||u>=c?t?"":void 0:(o=a.charCodeAt(u),o<55296||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):s-56320+(o-55296<<10)+65536)}}},function(t,e,n){"use strict";var r=n(60),i=n(48),o=n(51),s={};n(24)(s,n(8)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(26),i=n(61),o=n(220);t.exports=function(t){return function(e,n,s){var a,u=r(e),c=i(u.length),f=o(s,c);if(t&&n!=n){for(;c>f;)if((a=u[f++])!=a)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(80),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){"use strict";var r=n(222),i=n(120),o=n(36),s=n(26);t.exports=n(82)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e,n){"use strict";var r,i,o,s,a=n(46),u=n(5),c=n(22),f=n(63),l=n(4),h=n(9),d=n(47),p=n(64),v=n(38),m=n(123),y=n(124).set,g=n(225)(),b=n(91),_=n(125),w=n(226),E=n(126),O=u.TypeError,T=u.process,S=T&&T.versions,A=S&&S.v8||"",j=u.Promise,I="process"==f(T),x=function(){},C=i=b.f,N=!!function(){try{var t=j.resolve(1),e=(t.constructor={})[n(8)("species")]=function(t){t(x,x)};return(I||"function"==typeof PromiseRejectionEvent)&&t.then(x)instanceof e&&0!==A.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),P=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,i=1==t._s,o=0;n.length>o;)!function(e){var n,o,s,a=i?e.ok:e.fail,u=e.resolve,c=e.reject,f=e.domain;try{a?(i||(2==t._h&&U(t),t._h=1),!0===a?n=r:(f&&f.enter(),n=a(r),f&&(f.exit(),s=!0)),n===e.promise?c(O("Promise-chain cycle")):(o=P(n))?o.call(n,u,c):u(n)):c(r)}catch(t){f&&!s&&f.exit(),c(t)}}(n[o++]);t._c=[],t._n=!1,e&&!t._h&&k(t)})}},k=function(t){y.call(u,function(){var e,n,r,i=t._v,o=L(t);if(o&&(e=_(function(){I?T.emit("unhandledRejection",i,t):(n=u.onunhandledrejection)?n({promise:t,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=I||L(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},L=function(t){return 1!==t._h&&0===(t._a||t._c).length},U=function(t){y.call(u,function(){var e;I?T.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},M=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},D=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw O("Promise can't be resolved itself");(e=P(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,c(D,r,1),c(M,r,1))}catch(t){M.call(r,t)}}):(n._v=t,n._s=1,R(n,!1))}catch(t){M.call({_w:n,_d:!1},t)}}};N||(j=function(t){p(this,j,"Promise","_h"),d(t),r.call(this);try{t(c(D,this,1),c(M,this,1))}catch(t){M.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(65)(j.prototype,{then:function(t,e){var n=C(m(this,j));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=I?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=c(D,t,1),this.reject=c(M,t,1)},b.f=C=function(t){return t===j||t===s?new o(t):i(t)}),l(l.G+l.W+l.F*!N,{Promise:j}),n(51)(j,"Promise"),n(127)("Promise"),s=n(1).Promise,l(l.S+l.F*!N,"Promise",{reject:function(t){var e=C(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(a||!N),"Promise",{resolve:function(t){return E(a&&this===s?j:this,t)}}),l(l.S+l.F*!(N&&n(128)(function(t){j.all(t).catch(x)})),"Promise",{all:function(t){var e=this,n=C(e),r=n.resolve,i=n.reject,o=_(function(){var n=[],o=0,s=1;v(t,!1,function(t){var a=o++,u=!1;n.push(void 0),s++,e.resolve(t).then(function(t){u||(u=!0,n[a]=t,--s||r(n))},i)}),--s||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=C(e),r=n.reject,i=_(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(5),i=n(124).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,u="process"==n(50)(s);t.exports=function(){var t,e,n,c=function(){var r,i;for(u&&(r=s.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){s.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var f=a.resolve(void 0);n=function(){f.then(c)}}else n=function(){i.call(r,c)};else{var l=!0,h=document.createTextNode("");new o(c).observe(h,{characterData:!0}),n=function(){h.data=l=!l}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){var r=n(5),i=r.navigator;t.exports=i&&i.userAgent||""},function(t,e,n){"use strict";var r=n(4),i=n(1),o=n(5),s=n(123),a=n(126);r(r.P+r.R,"Promise",{finally:function(t){var e=s(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return a(e,t()).then(function(){return n})}:t,n?function(n){return a(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(4),i=n(91),o=n(125);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){"use strict";var r=n(92),i=Object(r.mixin)(r);i._=i,e.a=i},function(t,e,n){"use strict";function r(t){return null===t}e.a=r},function(t,e,n){"use strict";function r(t){return!(!t||1!==t.nodeType)}e.a=r},function(t,e,n){"use strict";var r=n(7);e.a=Object(r.a)("Date")},function(t,e,n){"use strict";var r=n(7);e.a=Object(r.a)("RegExp")},function(t,e,n){"use strict";var r=n(7);e.a=Object(r.a)("Error")},function(t,e,n){"use strict";var r=n(7);e.a=Object(r.a)("Object")},function(t,e,n){"use strict";function r(t){return!Object(o.a)(t)&&Object(i.f)(t)&&!isNaN(parseFloat(t))}e.a=r;var i=n(2),o=n(132)},function(t,e,n){"use strict";var r=n(137),i=n(96);e.a=Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t){if(null==t)return!0;var e=Object(i.a)(t);return"number"==typeof e&&(Object(o.a)(t)||Object(s.a)(t)||Object(a.a)(t))?0===e:0===Object(i.a)(Object(u.a)(t))}e.a=r;var i=n(18),o=n(32),s=n(93),a=n(95),u=n(6)},function(t,e,n){"use strict";function r(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!==t)return e!==e;var o=typeof t;return("function"===o||"object"===o||"object"==typeof e)&&i(t,e,n,r)}function i(t,e,n,o){t instanceof s.a&&(t=t._wrapped),e instanceof s.a&&(e=e._wrapped);var y=a.t.call(t);if(y!==a.t.call(e))return!1;if(l.a&&"[object Object]"==y&&Object(h.a)(t)){if(!Object(h.a)(e))return!1;y=m}switch(y){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return a.d.valueOf.call(t)===a.d.valueOf.call(e);case"[object ArrayBuffer]":case m:return i(Object(v.a)(t),Object(v.a)(e),n,o)}var g="[object Array]"===y;if(!g&&Object(c.a)(t)){if(Object(u.a)(t)!==Object(u.a)(e))return!1;if(t.buffer===e.buffer&&t.byteOffset===e.byteOffset)return!0;g=!0}if(!g){if("object"!=typeof t||"object"!=typeof e)return!1;var b=t.constructor,_=e.constructor;if(b!==_&&!(Object(f.a)(b)&&b instanceof b&&Object(f.a)(_)&&_ instanceof _)&&"constructor"in t&&"constructor"in e)return!1}n=n||[],o=o||[];for(var w=n.length;w--;)if(n[w]===t)return o[w]===e;if(n.push(t),o.push(e),g){if((w=t.length)!==e.length)return!1;for(;w--;)if(!r(t[w],e[w],n,o))return!1}else{var E,O=Object(d.a)(t);if(w=O.length,Object(d.a)(e).length!==w)return!1;for(;w--;)if(E=O[w],!Object(p.a)(e,E)||!r(t[E],e[E],n,o))return!1}return n.pop(),o.pop(),!0}function o(t,e){return r(t,e)}e.a=o;var s=n(12),a=n(2),u=n(96),c=n(135),f=n(17),l=n(52),h=n(94),d=n(6),p=n(27),v=n(240),m="[object DataView]"},function(t,e,n){"use strict";function r(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,Object(i.a)(t))}e.a=r;var i=n(96)},function(t,e,n){"use strict";var r=n(7),i=n(52),o=n(97);e.a=i.b?Object(o.a)(o.b):Object(r.a)("Map")},function(t,e,n){"use strict";var r=n(7),i=n(52),o=n(97);e.a=i.b?Object(o.a)(o.d):Object(r.a)("WeakMap")},function(t,e,n){"use strict";var r=n(7),i=n(52),o=n(97);e.a=i.b?Object(o.a)(o.c):Object(r.a)("Set")},function(t,e,n){"use strict";var r=n(7);e.a=Object(r.a)("WeakSet")},function(t,e,n){"use strict";function r(t){for(var e=Object(i.a)(t),n=e.length,r=Array(n),o=0;o<n;o++)r[o]=[e[o],t[e[o]]];return r}e.a=r;var i=n(6)},function(t,e,n){"use strict";function r(t,e){var n=Object(i.a)(t);return e&&Object(o.a)(n,e),n}e.a=r;var i=n(145),o=n(99)},function(t,e,n){"use strict";function r(t,e){return e(t),t}e.a=r},function(t,e,n){"use strict";function r(t,e){e=Object(o.a)(e);for(var n=e.length,r=0;r<n;r++){var s=e[r];if(!Object(i.a)(t,s))return!1;t=t[s]}return!!n}e.a=r;var i=n(27),o=n(54)},function(t,e,n){"use strict";function r(t,e,n){e=Object(i.a)(e,n);for(var r=Object(o.a)(t),s=r.length,a={},u=0;u<s;u++){var c=r[u];a[c]=e(t[c],c,t)}return a}e.a=r;var i=n(10),o=n(6)},function(t,e,n){"use strict";function r(t){return null==t?i.a:function(e){return Object(o.a)(t,e)}}e.a=r;var i=n(151),o=n(147)},function(t,e,n){"use strict";function r(t,e,n){var r=Array(Math.max(0,t));e=Object(i.a)(e,n,1);for(var o=0;o<t;o++)r[o]=e(o);return r}e.a=r;var i=n(55)},function(t,e,n){"use strict";var r=n(153),i=n(154);e.a=Object(r.a)(i.a)},function(t,e,n){"use strict";var r=n(153),i=n(254);e.a=Object(r.a)(i.a)},function(t,e,n){"use strict";var r=n(141),i=n(154);e.a=Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t){return"\\"+u[t]}function i(t,e,n){!e&&n&&(e=n),e=Object(o.a)({},e,s.a.templateSettings);var i=RegExp([(e.escape||a).source,(e.interpolate||a).source,(e.evaluate||a).source].join("|")+"|$","g"),u=0,l="__p+='";t.replace(i,function(e,n,i,o,s){return l+=t.slice(u,s).replace(c,r),u=s+e.length,n?l+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?l+="'+\n((__t=("+i+"))==null?'':__t)+\n'":o&&(l+="';\n"+o+"\n__p+='"),e}),l+="';\n";var h=e.variable;if(h){if(!f.test(h))throw new Error(h)}else l="with(obj||{}){\n"+l+"}\n",h="obj";l="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+l+"return __p;\n";var d;try{d=new Function(h,"_",l)}catch(t){throw t.source=l,t}var p=function(t){return d.call(this,t,s.a)};return p.source="function("+h+"){\n"+l+"}",p}e.a=i;var o=n(144),s=n(12),a=(n(155),/(.)^/),u={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},c=/\\|'|\r|\n|\u2028|\u2029/g,f=/^\s*(\w|\$)+\s*$/},function(t,e,n){"use strict";function r(t,e,n){e=Object(o.a)(e);var r=e.length;if(!r)return Object(i.a)(n)?n.call(t):n;for(var s=0;s<r;s++){var a=null==t?void 0:t[e[s]];void 0===a&&(a=n,s=r),t=Object(i.a)(a)?a.call(t):a}return t}e.a=r;var i=n(17),o=n(54)},function(t,e,n){"use strict";function r(t){var e=++i+"";return t?t+e:e}e.a=r;var i=0},function(t,e,n){"use strict";function r(t){var e=Object(i.a)(t);return e._chain=!0,e}e.a=r;var i=n(12)},function(t,e,n){"use strict";var r=n(11),i=n(40),o=n(157);e.a=Object(r.a)(function(t,e){e=Object(i.a)(e,!1,!1);var n=e.length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=Object(o.a)(t[r],t)}return t})},function(t,e,n){"use strict";function r(t,e){var n=function(r){var o=n.cache,s=""+(e?e.apply(this,arguments):r);return Object(i.a)(o,s)||(o[s]=t.apply(this,arguments)),o[s]};return n.cache={},n}e.a=r;var i=n(27)},function(t,e,n){"use strict";var r=n(68),i=n(158),o=n(12);e.a=Object(r.a)(i.a,o.a,1)},function(t,e,n){"use strict";function r(t,e,n){var r,o,s,a,u=0;n||(n={});var c=function(){u=!1===n.leading?0:Object(i.a)(),r=null,a=t.apply(o,s),r||(o=s=null)},f=function(){var f=Object(i.a)();u||!1!==n.leading||(u=f);var l=e-(f-u);return o=this,s=arguments,l<=0||l>e?(r&&(clearTimeout(r),r=null),u=f,a=t.apply(o,s),r||(o=s=null)):r||!1===n.trailing||(r=setTimeout(c,l)),a};return f.cancel=function(){clearTimeout(r),u=0,r=o=s=null},f}e.a=r;var i=n(103)},function(t,e,n){"use strict";function r(t,e,n){var r,s,a,u,c,f=function(){var i=Object(o.a)()-s;e>i?r=setTimeout(f,e-i):(r=null,n||(u=t.apply(c,a)),r||(a=c=null))},l=Object(i.a)(function(i){return c=this,a=i,s=Object(o.a)(),r||(r=setTimeout(f,e),n&&(u=t.apply(c,a))),u});return l.cancel=function(){clearTimeout(r),r=a=c=null},l}e.a=r;var i=n(11),o=n(103)},function(t,e,n){"use strict";function r(t,e){return Object(i.a)(e,t)}e.a=r;var i=n(68)},function(t,e,n){"use strict";function r(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}e.a=r},function(t,e,n){"use strict";function r(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}e.a=r},function(t,e,n){"use strict";var r=n(68),i=n(159);e.a=Object(r.a)(i.a,2)},function(t,e,n){"use strict";var r=n(162),i=n(165);e.a=Object(i.a)(-1,r.a)},function(t,e,n){"use strict";function r(t,e){return Object(i.a)(t,Object(o.a)(e))}e.a=r;var i=n(166),o=n(67)},function(t,e,n){"use strict";var r=n(167);e.a=Object(r.a)(1)},function(t,e,n){"use strict";var r=n(167);e.a=Object(r.a)(-1)},function(t,e,n){"use strict";function r(t,e,n){return Object(i.a)(t,Object(o.a)(Object(s.a)(e)),n)}e.a=r;var i=n(56),o=n(104),s=n(10)},function(t,e,n){"use strict";function r(t,e,n){e=Object(i.a)(e,n);for(var r=!Object(o.a)(t)&&Object(s.a)(t),a=(r||t).length,u=0;u<a;u++){var c=r?r[u]:u;if(!e(t[c],c,t))return!1}return!0}e.a=r;var i=n(10),o=n(13),s=n(6)},function(t,e,n){"use strict";function r(t,e,n){e=Object(i.a)(e,n);for(var r=!Object(o.a)(t)&&Object(s.a)(t),a=(r||t).length,u=0;u<a;u++){var c=r?r[u]:u;if(e(t[c],c,t))return!0}return!1}e.a=r;var i=n(10),o=n(13),s=n(6)},function(t,e,n){"use strict";var r=n(11),i=n(17),o=n(41),s=n(100),a=n(54);e.a=Object(r.a)(function(t,e,n){var r,u;return Object(i.a)(e)?u=e:(e=Object(a.a)(e),r=e.slice(0,-1),e=e[e.length-1]),Object(o.a)(t,function(t){var i=u;if(!i){if(r&&r.length&&(t=Object(s.a)(t,r)),null==t)return;i=t[e]}return null==i?i:i.apply(t,n)})})},function(t,e,n){"use strict";function r(t,e){return Object(i.a)(t,Object(o.a)(e))}e.a=r;var i=n(56),o=n(67)},function(t,e,n){"use strict";function r(t,e,n){var r,u,c=1/0,f=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t){t=Object(i.a)(t)?t:Object(o.a)(t);for(var l=0,h=t.length;l<h;l++)null!=(r=t[l])&&r<c&&(c=r)}else e=Object(s.a)(e,n),Object(a.a)(t,function(t,n,r){((u=e(t,n,r))<f||u===1/0&&c===1/0)&&(c=t,f=u)});return c}e.a=r;var i=n(13),o=n(39),s=n(10),a=n(33)},function(t,e,n){"use strict";function r(t){return Object(i.a)(t,1/0)}e.a=r;var i=n(169)},function(t,e,n){"use strict";function r(t,e,n){var r=0;return e=Object(i.a)(e,n),Object(o.a)(Object(s.a)(t,function(t,n,i){return{value:t,index:r++,criteria:e(t,n,i)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")}e.a=r;var i=n(10),o=n(106),s=n(41)},function(t,e,n){"use strict";var r=n(69),i=n(27);e.a=Object(r.a)(function(t,e,n){Object(i.a)(t,n)?t[n].push(e):t[n]=[e]})},function(t,e,n){"use strict";var r=n(69);e.a=Object(r.a)(function(t,e,n){t[n]=e})},function(t,e,n){"use strict";var r=n(69),i=n(27);e.a=Object(r.a)(function(t,e,n){Object(i.a)(t,n)?t[n]++:t[n]=1})},function(t,e,n){"use strict";var r=n(69);e.a=Object(r.a)(function(t,e,n){t[n?0:1].push(e)},!0)},function(t,e,n){"use strict";function r(t){return t?Object(i.a)(t)?o.q.call(t):Object(s.a)(t)?t.match(l):Object(a.a)(t)?Object(u.a)(t,c.a):Object(f.a)(t):[]}e.a=r;var i=n(32),o=n(2),s=n(93),a=n(13),u=n(41),c=n(101),f=n(39),l=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g},function(t,e,n){"use strict";function r(t){return null==t?0:Object(i.a)(t)?t.length:Object(o.a)(t).length}e.a=r;var i=n(13),o=n(6)},function(t,e,n){"use strict";function r(t,e,n){return e in n}e.a=r},function(t,e,n){"use strict";var r=n(11),i=n(17),o=n(104),s=n(41),a=n(40),u=n(57),c=n(170);e.a=Object(r.a)(function(t,e){var n,r=e[0];return Object(i.a)(r)?(r=Object(o.a)(r),e.length>1&&(n=e[1])):(e=Object(s.a)(Object(a.a)(e,!1,!1),String),r=function(t,n){return!Object(u.a)(e,n)}),Object(c.a)(t,r,n)})},function(t,e,n){"use strict";function r(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:Object(i.a)(t,t.length-e)}e.a=r;var i=n(171)},function(t,e,n){"use strict";function r(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:Object(i.a)(t,Math.max(0,t.length-e))}e.a=r;var i=n(172)},function(t,e,n){"use strict";function r(t){return Object(i.a)(t,Boolean)}e.a=r;var i=n(56)},function(t,e,n){"use strict";function r(t,e){return Object(i.a)(t,e,!1)}e.a=r;var i=n(40)},function(t,e,n){"use strict";var r=n(11),i=n(173);e.a=Object(r.a)(function(t,e){return Object(i.a)(t,e)})},function(t,e,n){"use strict";var r=n(11),i=n(174),o=n(40);e.a=Object(r.a)(function(t){return Object(i.a)(Object(o.a)(t,!0,!0))})},function(t,e,n){"use strict";function r(t){for(var e=[],n=arguments.length,r=0,s=Object(i.a)(t);r<s;r++){var a=t[r];if(!Object(o.a)(e,a)){var u;for(u=1;u<n&&Object(o.a)(arguments[u],a);u++);u===n&&e.push(a)}}return e}e.a=r;var i=n(18),o=n(57)},function(t,e,n){"use strict";var r=n(11),i=n(175);e.a=Object(r.a)(i.a)},function(t,e,n){"use strict";function r(t,e){for(var n={},r=0,o=Object(i.a)(t);r<o;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n}e.a=r;var i=n(18)},function(t,e,n){"use strict";function r(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i}e.a=r},function(t,e,n){"use strict";function r(t,e){if(null==e||e<1)return[];for(var n=[],r=0,o=t.length;r<o;)n.push(i.q.call(t,r,r+=e));return n}e.a=r;var i=n(2)},function(t,e,n){"use strict";function r(t){return Object(o.a)(Object(s.a)(t),function(e){var n=i.a[e]=t[e];i.a.prototype[e]=function(){var t=[this._wrapped];return a.o.apply(t,arguments),Object(u.a)(this,n.apply(i.a,t))}}),i.a}e.a=r;var i=n(12),o=n(33),s=n(142),a=n(2),u=n(176)},function(t,e,n){"use strict";var r=n(12),i=n(33),o=n(2),s=n(176);Object(i.a)(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o.a[t];r.a.prototype[t]=function(){var n=this._wrapped;return null!=n&&(e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),Object(s.a)(this,n)}}),Object(i.a)(["concat","join","slice"],function(t){var e=o.a[t];r.a.prototype[t]=function(){var t=this._wrapped;return null!=t&&(t=e.apply(t,arguments)),Object(s.a)(this,t)}}),e.a=r.a},function(t,e,n){var r=n(1),i=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return i.stringify.apply(i,arguments)}},function(t,e,n){n(303),t.exports=n(1).Object.keys},function(t,e,n){var r=n(30),i=n(49);n(70)("keys",function(){return function(t){return i(r(t))}})},function(t,e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);t.exports=function(){return n(r),r}}else{var i=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}}},function(t,e){function n(t,e){var n=e||0,i=r;return[i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]],"-",i[t[n++]],i[t[n++]],"-",i[t[n++]],i[t[n++]],"-",i[t[n++]],i[t[n++]],"-",i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]],i[t[n++]]].join("")}for(var r=[],i=0;i<256;++i)r[i]=(i+256).toString(16).substr(1);t.exports=n},function(t,e,n){"use strict";function r(t){function e(t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return r.colors[Math.abs(e)%r.colors.length]}function r(t){function n(){if(n.enabled){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var o=n,a=Number(new Date),u=a-(s||a);o.diff=u,o.prev=s,o.curr=a,s=a,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");var c=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,function(t,n){if("%%"===t)return t;c++;var i=r.formatters[n];if("function"==typeof i){var s=e[c];t=i.call(o,s),e.splice(c,1),c--}return t}),r.formatArgs.call(o,e);(o.log||r.log).apply(o,e)}}var s;return n.namespace=t,n.enabled=r.enabled(t),n.useColors=r.useColors(),n.color=e(t),n.destroy=i,n.extend=o,"function"==typeof r.init&&r.init(n),r.instances.push(n),n}function i(){var t=r.instances.indexOf(this);return-1!==t&&(r.instances.splice(t,1),!0)}function o(t,e){return r(this.namespace+(void 0===e?":":e)+t)}function s(t){r.save(t),r.names=[],r.skips=[];var e,n=("string"==typeof t?t:"").split(/[\s,]+/),i=n.length;for(e=0;e<i;e++)n[e]&&(t=n[e].replace(/\*/g,".*?"),"-"===t[0]?r.skips.push(new RegExp("^"+t.substr(1)+"$")):r.names.push(new RegExp("^"+t+"$")));for(e=0;e<r.instances.length;e++){var o=r.instances[e];o.enabled=r.enabled(o.namespace)}}function a(){r.enable("")}function u(t){if("*"===t[t.length-1])return!0;var e,n;for(e=0,n=r.skips.length;e<n;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;e<n;e++)if(r.names[e].test(t))return!0;return!1}function c(t){return t instanceof Error?t.stack||t.message:t}return r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=s,r.enabled=u,r.humanize=n(307),Object.keys(t).forEach(function(e){r[e]=t[e]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=e,r.enable(r.load()),r}t.exports=r},function(t,e){function n(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"weeks":case"week":case"w":return n*f;case"days":case"day":case"d":return n*c;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*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(t){var e=Math.abs(t);return e>=c?Math.round(t/c)+"d":e>=u?Math.round(t/u)+"h":e>=a?Math.round(t/a)+"m":e>=s?Math.round(t/s)+"s":t+"ms"}function i(t){var e=Math.abs(t);return e>=c?o(t,e,c,"day"):e>=u?o(t,e,u,"hour"):e>=a?o(t,e,a,"minute"):e>=s?o(t,e,s,"second"):t+" ms"}function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}var s=1e3,a=60*s,u=60*a,c=24*u,f=7*c,l=365.25*c;t.exports=function(t,e){e=e||{};var o=typeof t;if("string"===o&&t.length>0)return n(t);if("number"===o&&isFinite(t))return e.long?i(t):r(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){n(309),t.exports=n(1).Object.getPrototypeOf},function(t,e,n){var r=n(30),i=n(119);n(70)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){"use strict";function r(t){if(p(t))return{};var e=t.slice(0,8).toLowerCase(),n="lncldglobal.com";return{push:"https://"+e+".push."+n,stats:"https://"+e+".stats."+n,engine:"https://"+e+".engine."+n,api:"https://"+e+".api."+n,rtm:"https://"+e+".rtm."+n}}var i=n(71),o=function(t){return t&&t.__esModule?t:{default:t}}(i),s=n(42),a=n(313),u=n(19),c=u.isNullOrUndefined,f=n(0),l=f.extend,h=f.isObject,d=f.isEmpty,p=function(t){return"-MdYXbMMI"!==t.slice(-9)},v=function(t){return{push:t,stats:t,engine:t,api:t,rtm:t}},m=!1,y=!1;s.init=function(t){if(!h(t))return s.init({appId:t,appKey:arguments.length<=1?void 0:arguments[1],masterKey:arguments.length<=2?void 0:arguments[2]});var e=t.appId,n=t.appKey,i=t.masterKey,o=t.hookKey,u=t.serverURL,f=t.serverURLs,g=void 0===f?u:f,b=t.disableCurrentUser,_=t.production,w=t.realtime;if(y&&console.warn("Initializing LeanCloud Storage SDK which has already been initialized. Reinitializing the SDK might cause problems like unexpected cross-app data writing and invalid relations."),!e)throw new TypeError("appId must be a string");if(!n)throw new TypeError("appKey must be a string");if(i&&console.warn("MasterKey is not supposed to be used at client side."),p(e)&&!g&&d(s._config.serverURLs))throw new TypeError("serverURL option is required for apps from CN region");e!==s._config.applicationId?(s._config.masterKey=i,s._config.hookKey=o):(i&&(s._config.masterKey=i),o&&(s._config.hookKey=o)),s._config.applicationId=e,s._config.applicationKey=n,c(_)||s.setProduction(_),void 0!==b&&(s._config.disableCurrentUser=b);var E=m||void 0!==g;if(E||(s._appRouter=new a(s)),s._setServerURLs(l({},r(e),s._config.serverURLs,"string"==typeof g?v(g):g),E),w)s._config.realtime=w;else if(s._sharedConfig.liveQueryRealtime){var O=s._config.serverURLs,T=O.api,S=O.rtm;s._config.realtime=new s._sharedConfig.liveQueryRealtime({appId:e,appKey:n,server:{api:T,RTMRouter:S}})}y=!0},s.setProduction=function(t){c(t)?s._config.production=null:s._config.production=t?1:0},s._setServerURLs=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];"string"!=typeof t?l(s._config.serverURLs,t):s._config.serverURLs=v(t),e&&(s._appRouter?s._appRouter.disable():m=!0)},s.setServerURL=function(t){return s._setServerURLs(t)},s.setServerURLs=s.setServerURL,s.keepErrorRawMessage=function(t){s._sharedConfig.keepErrorRawMessage=t},s.setRequestTimeout=function(t){s._config.requestTimeout=t},s.initialize=s.init,["applicationId","applicationKey","masterKey","hookKey"].forEach(function(t){return(0,o.default)(s,t,{get:function(){return s._config[t]},set:function(e){s._config[t]=e}})})},function(t,e,n){n(312);var r=n(1).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(4);r(r.S+r.F*!n(16),"Object",{defineProperty:n(20).f})},function(t,e,n){"use strict";function r(t){var e=this;this.AV=t,this.lockedUntil=0,o.getAsync("serverURLs").then(function(t){if(!e.disabled){if(!t)return e.lock(0);var n=t.serverURLs,r=t.lockedUntil;e.AV._setServerURLs(n,!1),e.lockedUntil=r}}).catch(function(){return e.lock(0)})}var i=n(72),o=n(182);r.prototype.disable=function(){this.disabled=!0},r.prototype.lock=function(t){this.lockedUntil=Date.now()+t},r.prototype.refresh=function(){var t=this;if(!(this.disabled||Date.now()<this.lockedUntil)){this.lock(10);return i({method:"get",url:"https://app-router.com/2/route",query:{appId:this.AV.applicationId}}).then(function(e){if(!t.disabled){var n=e.ttl;if(!n)throw new Error("missing ttl");n*=1e3;var r={push:"https://"+e.push_server,stats:"https://"+e.stats_server,engine:"https://"+e.engine_server,api:"https://"+e.api_server};return t.AV._setServerURLs(r,!1),t.lock(n),o.setAsync("serverURLs",{serverURLs:r,lockedUntil:t.lockedUntil},n)}}).catch(function(e){console.warn("refresh server URLs failed: "+e.message),t.lock(600)})}},t.exports=r},function(t,e,n){n(35),n(37),t.exports=n(108).f("iterator")},function(t,e,n){n(183),n(59),n(318),n(319),t.exports=n(1).Symbol},function(t,e,n){var r=n(49),i=n(74),o=n(75);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var s,a=n(t),u=o.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){var r=n(26),i=n(110).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return i(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?a(t):i(r(t))}},function(t,e,n){n(109)("asyncIterator")},function(t,e,n){n(109)("observable")},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){var e=/\s+/,n=Array.prototype.slice;t.Events={on:function(t,n,r){var i,o,s,a,u;if(!n)return this;for(t=t.split(e),i=this._callbacks||(this._callbacks={}),o=t.shift();o;)u=i[o],s=u?u.tail:{},s.next=a={},s.context=r,s.callback=n,i[o]={tail:a,next:u?u.next:s},o=t.shift();return this},off:function(t,n,i){var o,s,a,u,c,f;if(s=this._callbacks){if(!(t||n||i))return delete this._callbacks,this;for(t=t?t.split(e):r.keys(s),o=t.shift();o;)if(a=s[o],delete s[o],a&&(n||i)){for(u=a.tail,a=a.next;a!==u;)c=a.callback,f=a.context,(n&&c!==n||i&&f!==i)&&this.on(o,c,f),a=a.next;o=t.shift()}return this}},trigger:function(t){var r,i,o,s,a,u,c;if(!(o=this._callbacks))return this;for(u=o.all,t=t.split(e),c=n.call(arguments,1),r=t.shift();r;){if(i=o[r])for(s=i.tail;(i=i.next)!==s;)i.callback.apply(i.context||this,c);if(i=u)for(s=i.tail,a=[r].concat(c);(i=i.next)!==s;)i.callback.apply(i.context||this,a);r=t.shift()}return this}},t.Events.bind=t.Events.on,t.Events.unbind=t.Events.off}},function(t,e,n){"use strict";var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(0);t.exports=function(t){t.GeoPoint=function(e,n){o.isArray(e)?(t.GeoPoint._validate(e[0],e[1]),this.latitude=e[0],this.longitude=e[1]):o.isObject(e)?(t.GeoPoint._validate(e.latitude,e.longitude),this.latitude=e.latitude,this.longitude=e.longitude):o.isNumber(e)&&o.isNumber(n)?(t.GeoPoint._validate(e,n),this.latitude=e,this.longitude=n):(this.latitude=0,this.longitude=0);var r=this;this.__defineGetter__&&this.__defineSetter__&&(this._latitude=this.latitude,this._longitude=this.longitude,this.__defineGetter__("latitude",function(){return r._latitude}),this.__defineGetter__("longitude",function(){return r._longitude}),this.__defineSetter__("latitude",function(e){t.GeoPoint._validate(e,r.longitude),r._latitude=e}),this.__defineSetter__("longitude",function(e){t.GeoPoint._validate(r.latitude,e),r._longitude=e}))},t.GeoPoint._validate=function(t,e){if(t<-90)throw new Error("AV.GeoPoint latitude "+t+" < -90.0.");if(t>90)throw new Error("AV.GeoPoint latitude "+t+" > 90.0.");if(e<-180)throw new Error("AV.GeoPoint longitude "+e+" < -180.0.");if(e>180)throw new Error("AV.GeoPoint longitude "+e+" > 180.0.")},t.GeoPoint.current=function(){return new i.default(function(e,n){navigator.geolocation.getCurrentPosition(function(n){e(new t.GeoPoint({latitude:n.coords.latitude,longitude:n.coords.longitude}))},n)})},o.extend(t.GeoPoint.prototype,{toJSON:function(){return t.GeoPoint._validate(this.latitude,this.longitude),{__type:"GeoPoint",latitude:this.latitude,longitude:this.longitude}},radiansTo:function(t){var e=Math.PI/180,n=this.latitude*e,r=this.longitude*e,i=t.latitude*e,o=t.longitude*e,s=n-i,a=r-o,u=Math.sin(s/2),c=Math.sin(a/2),f=u*u+Math.cos(n)*Math.cos(i)*c*c;return f=Math.min(1,f),2*Math.asin(Math.sqrt(f))},kilometersTo:function(t){return 6371*this.radiansTo(t)},milesTo:function(t){return 3958.8*this.radiansTo(t)}})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){t.ACL=function(e){var n=this;if(n.permissionsById={},r.isObject(e))if(e instanceof t.User)n.setReadAccess(e,!0),n.setWriteAccess(e,!0);else{if(r.isFunction(e))throw new Error("AV.ACL() called with a function. Did you forget ()?");t._objectEach(e,function(e,i){if(!r.isString(i))throw new Error("Tried to create an ACL with an invalid userId.");n.permissionsById[i]={},t._objectEach(e,function(t,e){if("read"!==e&&"write"!==e)throw new Error("Tried to create an ACL with an invalid permission type.");if(!r.isBoolean(t))throw new Error("Tried to create an ACL with an invalid permission value.");n.permissionsById[i][e]=t})})}},t.ACL.prototype.toJSON=function(){return r.clone(this.permissionsById)},t.ACL.prototype._setAccess=function(e,n,i){if(n instanceof t.User?n=n.id:n instanceof t.Role&&(n="role:"+n.getName()),!r.isString(n))throw new Error("userId must be a string.");if(!r.isBoolean(i))throw new Error("allowed must be either true or false.");var o=this.permissionsById[n];if(!o){if(!i)return;o={},this.permissionsById[n]=o}i?this.permissionsById[n][e]=!0:(delete o[e],r.isEmpty(o)&&delete this.permissionsById[n])},t.ACL.prototype._getAccess=function(e,n){n instanceof t.User?n=n.id:n instanceof t.Role&&(n="role:"+n.getName());var r=this.permissionsById[n];return!!r&&!!r[e]},t.ACL.prototype.setReadAccess=function(t,e){this._setAccess("read",t,e)},t.ACL.prototype.getReadAccess=function(t){return this._getAccess("read",t)},t.ACL.prototype.setWriteAccess=function(t,e){this._setAccess("write",t,e)},t.ACL.prototype.getWriteAccess=function(t){return this._getAccess("write",t)},t.ACL.prototype.setPublicReadAccess=function(t){this.setReadAccess("*",t)},t.ACL.prototype.getPublicReadAccess=function(){return this.getReadAccess("*")},t.ACL.prototype.setPublicWriteAccess=function(t){this.setWriteAccess("*",t)},t.ACL.prototype.getPublicWriteAccess=function(){return this.getWriteAccess("*")},t.ACL.prototype.getRoleReadAccess=function(e){if(e instanceof t.Role&&(e=e.getName()),r.isString(e))return this.getReadAccess("role:"+e);throw new Error("role must be a AV.Role or a String")},t.ACL.prototype.getRoleWriteAccess=function(e){if(e instanceof t.Role&&(e=e.getName()),r.isString(e))return this.getWriteAccess("role:"+e);throw new Error("role must be a AV.Role or a String")},t.ACL.prototype.setRoleReadAccess=function(e,n){if(e instanceof t.Role&&(e=e.getName()),r.isString(e))return void this.setReadAccess("role:"+e,n);throw new Error("role must be a AV.Role or a String")},t.ACL.prototype.setRoleWriteAccess=function(e,n){if(e instanceof t.Role&&(e=e.getName()),r.isString(e))return void this.setWriteAccess("role:"+e,n);throw new Error("role must be a AV.Role or a String")}}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){t.Op=function(){this._initialize.apply(this,arguments)},r.extend(t.Op.prototype,{_initialize:function(){}}),r.extend(t.Op,{_extend:t._extend,_opDecoderMap:{},_registerDecoder:function(e,n){t.Op._opDecoderMap[e]=n},_decode:function(e){var n=t.Op._opDecoderMap[e.__op];return n?n(e):void 0}}),t.Op._registerDecoder("Batch",function(e){var n=null;return t._arrayEach(e.ops,function(e){e=t.Op._decode(e),n=e._mergeWithPrevious(n)}),n}),t.Op.Set=t.Op._extend({_initialize:function(t){this._value=t},value:function(){return this._value},toJSON:function(){return t._encode(this.value())},_mergeWithPrevious:function(t){return this},_estimate:function(t){return this.value()}}),t.Op._UNSET={},t.Op.Unset=t.Op._extend({toJSON:function(){return{__op:"Delete"}},_mergeWithPrevious:function(t){return this},_estimate:function(e){return t.Op._UNSET}}),t.Op._registerDecoder("Delete",function(e){return new t.Op.Unset}),t.Op.Increment=t.Op._extend({_initialize:function(t){this._amount=t},amount:function(){return this._amount},toJSON:function(){return{__op:"Increment",amount:this._amount}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)return new t.Op.Set(this.amount());if(e instanceof t.Op.Set)return new t.Op.Set(e.value()+this.amount());if(e instanceof t.Op.Increment)return new t.Op.Increment(this.amount()+e.amount());throw new Error("Op is invalid after previous op.")}return this},_estimate:function(t){return t?t+this.amount():this.amount()}}),t.Op._registerDecoder("Increment",function(e){return new t.Op.Increment(e.amount)}),t.Op.BitAnd=t.Op._extend({_initialize:function(t){this._value=t},value:function(){return this._value},toJSON:function(){return{__op:"BitAnd",value:this.value()}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)return new t.Op.Set(0);if(e instanceof t.Op.Set)return new t.Op.Set(e.value()&this.value());throw new Error("Op is invalid after previous op.")}return this},_estimate:function(t){return t&this.value()}}),t.Op._registerDecoder("BitAnd",function(e){return new t.Op.BitAnd(e.value)}),t.Op.BitOr=t.Op._extend({_initialize:function(t){this._value=t},value:function(){return this._value},toJSON:function(){return{__op:"BitOr",value:this.value()}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)return new t.Op.Set(this.value());if(e instanceof t.Op.Set)return new t.Op.Set(e.value()|this.value());throw new Error("Op is invalid after previous op.")}return this},_estimate:function(t){return t|this.value()}}),t.Op._registerDecoder("BitOr",function(e){return new t.Op.BitOr(e.value)}),t.Op.BitXor=t.Op._extend({_initialize:function(t){this._value=t},value:function(){return this._value},toJSON:function(){return{__op:"BitXor",value:this.value()}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)return new t.Op.Set(this.value());if(e instanceof t.Op.Set)return new t.Op.Set(e.value()^this.value());throw new Error("Op is invalid after previous op.")}return this},_estimate:function(t){return t^this.value()}}),t.Op._registerDecoder("BitXor",function(e){return new t.Op.BitXor(e.value)}),t.Op.Add=t.Op._extend({_initialize:function(t){this._objects=t},objects:function(){return this._objects},toJSON:function(){return{__op:"Add",objects:t._encode(this.objects())}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)return new t.Op.Set(this.objects());if(e instanceof t.Op.Set)return new t.Op.Set(this._estimate(e.value()));if(e instanceof t.Op.Add)return new t.Op.Add(e.objects().concat(this.objects()));throw new Error("Op is invalid after previous op.")}return this},_estimate:function(t){return t?t.concat(this.objects()):r.clone(this.objects())}}),t.Op._registerDecoder("Add",function(e){return new t.Op.Add(t._decode(e.objects))}),t.Op.AddUnique=t.Op._extend({_initialize:function(t){this._objects=r.uniq(t)},objects:function(){return this._objects},toJSON:function(){return{__op:"AddUnique",objects:t._encode(this.objects())}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)return new t.Op.Set(this.objects());if(e instanceof t.Op.Set)return new t.Op.Set(this._estimate(e.value()));if(e instanceof t.Op.AddUnique)return new t.Op.AddUnique(this._estimate(e.objects()));throw new Error("Op is invalid after previous op.")}return this},_estimate:function(e){if(e){var n=r.clone(e);return t._arrayEach(this.objects(),function(e){if(e instanceof t.Object&&e.id){var i=r.find(n,function(n){return n instanceof t.Object&&n.id===e.id});if(i){var o=r.indexOf(n,i);n[o]=e}else n.push(e)}else r.contains(n,e)||n.push(e)}),n}return r.clone(this.objects())}}),t.Op._registerDecoder("AddUnique",function(e){return new t.Op.AddUnique(t._decode(e.objects))}),t.Op.Remove=t.Op._extend({_initialize:function(t){this._objects=r.uniq(t)},objects:function(){return this._objects},toJSON:function(){return{__op:"Remove",objects:t._encode(this.objects())}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)return e;if(e instanceof t.Op.Set)return new t.Op.Set(this._estimate(e.value()));if(e instanceof t.Op.Remove)return new t.Op.Remove(r.union(e.objects(),this.objects()));throw new Error("Op is invalid after previous op.")}return this},_estimate:function(e){if(e){var n=r.difference(e,this.objects());return t._arrayEach(this.objects(),function(e){e instanceof t.Object&&e.id&&(n=r.reject(n,function(n){return n instanceof t.Object&&n.id===e.id}))}),n}return[]}}),t.Op._registerDecoder("Remove",function(e){return new t.Op.Remove(t._decode(e.objects))}),t.Op.Relation=t.Op._extend({_initialize:function(e,n){this._targetClassName=null;var i=this,o=function(e){if(e instanceof t.Object){if(!e.id)throw new Error("You can't add an unsaved AV.Object to a relation.");if(i._targetClassName||(i._targetClassName=e.className),i._targetClassName!==e.className)throw new Error("Tried to create a AV.Relation with 2 different types: "+i._targetClassName+" and "+e.className+".");return e.id}return e};this.relationsToAdd=r.uniq(r.map(e,o)),this.relationsToRemove=r.uniq(r.map(n,o))},added:function(){var e=this;return r.map(this.relationsToAdd,function(n){var r=t.Object._create(e._targetClassName);return r.id=n,r})},removed:function(){var e=this;return r.map(this.relationsToRemove,function(n){var r=t.Object._create(e._targetClassName);return r.id=n,r})},toJSON:function(){var t=null,e=null,n=this,i=function(t){return{__type:"Pointer",className:n._targetClassName,objectId:t}},o=null;return this.relationsToAdd.length>0&&(o=r.map(this.relationsToAdd,i),t={__op:"AddRelation",objects:o}),this.relationsToRemove.length>0&&(o=r.map(this.relationsToRemove,i),e={__op:"RemoveRelation",objects:o}),t&&e?{__op:"Batch",ops:[t,e]}:t||e||{}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)throw new Error("You can't modify a relation after deleting it.");if(e instanceof t.Op.Relation){if(e._targetClassName&&e._targetClassName!==this._targetClassName)throw new Error("Related object must be of class "+e._targetClassName+", but "+this._targetClassName+" was passed in.");var n=r.union(r.difference(e.relationsToAdd,this.relationsToRemove),this.relationsToAdd),i=r.union(r.difference(e.relationsToRemove,this.relationsToAdd),this.relationsToRemove),o=new t.Op.Relation(n,i);return o._targetClassName=this._targetClassName,o}throw new Error("Op is invalid after previous op.")}return this},_estimate:function(e,n,r){if(e){if(e instanceof t.Relation){if(this._targetClassName)if(e.targetClassName){if(e.targetClassName!==this._targetClassName)throw new Error("Related object must be a "+e.targetClassName+", but a "+this._targetClassName+" was passed in.")}else e.targetClassName=this._targetClassName;return e}throw new Error("Op is invalid after previous op.")}new t.Relation(n,r).targetClassName=this._targetClassName}}),t.Op._registerDecoder("AddRelation",function(e){return new t.Op.Relation(t._decode(e.objects),[])}),t.Op._registerDecoder("RemoveRelation",function(e){return new t.Op.Relation([],t._decode(e.objects))})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){t.Relation=function(t,e){if(!r.isString(e))throw new TypeError("key must be a string");this.parent=t,this.key=e,this.targetClassName=null},t.Relation.reverseQuery=function(e,n,r){var i=new t.Query(e);return i.equalTo(n,r._toPointer()),i},r.extend(t.Relation.prototype,{_ensureParentAndKey:function(t,e){if(this.parent=this.parent||t,this.key=this.key||e,this.parent!==t)throw new Error("Internal Error. Relation retrieved from two different Objects.");if(this.key!==e)throw new Error("Internal Error. Relation retrieved from two different keys.")},add:function(e){r.isArray(e)||(e=[e]);var n=new t.Op.Relation(e,[]);this.parent.set(this.key,n),this.targetClassName=n._targetClassName},remove:function(e){r.isArray(e)||(e=[e]);var n=new t.Op.Relation([],e);this.parent.set(this.key,n),this.targetClassName=n._targetClassName},toJSON:function(){return{__type:"Relation",className:this.targetClassName}},query:function(){var e,n;return this.targetClassName?(e=t.Object._getSubclass(this.targetClassName),n=new t.Query(e)):(e=t.Object._getSubclass(this.parent.className),n=new t.Query(e),n._defaultParams.redirectClassNameForKey=this.key),n._addCondition("$relatedTo","object",this.parent._toPointer()),n._addCondition("$relatedTo","key",this.key),n}})}},function(t,e,n){"use strict";var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(0),s=n(326),a=n(327),u=n(341),c=n(28),f=n(14)._request,l=n(19),h=l.tap,d=l.transformFetchOptions,p=n(34)("leancloud:file"),v=n(345);t.exports=function(t){var e=function(t){return o.isString(t)?t.match(/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/)[4]:""},n=function(t){if(t<26)return String.fromCharCode(65+t);if(t<52)return String.fromCharCode(t-26+97);if(t<62)return String.fromCharCode(t-52+48);if(62===t)return"+";if(63===t)return"/";throw new Error("Tried to encode large digit "+t+" in base64.")},r=function(t){var e=[];return e.length=Math.ceil(t.length/3),o.times(e.length,function(r){var i=t[3*r],o=t[3*r+1]||0,s=t[3*r+2]||0,a=3*r+1<t.length,u=3*r+2<t.length;e[r]=[n(i>>2&63),n(i<<4&48|o>>4&15),a?n(o<<2&60|s>>6&3):"=",u?n(63&s):"="].join("")}),e.join("")};t.File=function(n,i,s){if(this.attributes={name:n,url:"",metaData:{},base64:""},o.isString(i))throw new TypeError("Creating an AV.File from a String is not yet supported.");o.isArray(i)&&(this.attributes.metaData.size=i.length,i={base64:r(i)}),this._extName="",this._data=i,this._uploadHeaders={},i&&i.blob&&"string"==typeof i.blob.uri&&(this._extName=e(i.blob.uri)),"undefined"!=typeof Blob&&i instanceof Blob&&(i.size&&(this.attributes.metaData.size=i.size),i.name&&(this._extName=e(i.name)));var a=void 0;if(i&&i.owner)a=i.owner;else if(!t._config.disableCurrentUser)try{a=t.User.current()}catch(t){if("SYNC_API_NOT_AVAILABLE"!==t.code)throw t}this.attributes.metaData.owner=a?a.id:"unknown",this.set("mime_type",s)},t.File.withURL=function(e,n,r,i){if(!e||!n)throw new Error("Please provide file name and url");var o=new t.File(e,null,i);if(r)for(var s in r)o.attributes.metaData[s]||(o.attributes.metaData[s]=r[s]);return o.attributes.url=n,o.attributes.metaData.__source="external",o.attributes.metaData.size=0,o},t.File.createWithoutData=function(e){if(!e)throw new TypeError("The objectId must be provided");var n=new t.File;return n.id=e,n},o.extend(t.File.prototype,{className:"_File",_toFullJSON:function(e){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=o.clone(this.attributes);return t._objectEach(i,function(n,o){i[o]=t._encode(n,e,void 0,r)}),t._objectEach(this._operations,function(t,e){i[e]=t}),o.has(this,"id")&&(i.objectId=this.id),["createdAt","updatedAt"].forEach(function(t){if(o.has(n,t)){var e=n[t];i[t]=o.isDate(e)?e.toJSON():e}}),r&&(i.__type="File"),i},toFullJSON:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this._toFullJSON(t)},toJSON:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[this];return this._toFullJSON(n,!1)},_toPointer:function(){return{__type:"Pointer",className:this.className,objectId:this.id}},getACL:function(){return this._acl},setACL:function(e){return e instanceof t.ACL?(this._acl=e,this):new c(c.OTHER_CAUSE,"ACL must be a AV.ACL.")},name:function(){return this.get("name")},url:function(){return this.get("url")},get:function(t){switch(t){case"objectId":return this.id;case"url":case"name":case"mime_type":case"metaData":case"createdAt":case"updatedAt":return this.attributes[t];default:return this.attributes.metaData[t]}},set:function(){for(var t=this,e=function(e,n){switch(e){case"name":case"url":case"mime_type":case"base64":case"metaData":t.attributes[e]=n;break;default:t.attributes.metaData[e]=n}},n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];switch(r.length){case 1:for(var o in r[0])e(o,r[0][o]);break;case 2:e(r[0],r[1])}return this},setUploadHeader:function(t,e){return this._uploadHeaders[t]=e,this},metaData:function(t,e){return t&&e?(this.attributes.metaData[t]=e,this):t&&!e?this.attributes.metaData[t]:this.attributes.metaData},thumbnailURL:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"png",o=this.attributes.url;if(!o)throw new Error("Invalid url.");if(!t||!e||t<=0||e<=0)throw new Error("Invalid width or height value.");if(n<=0||n>100)throw new Error("Invalid quality value.");return o+"?imageView/"+(r?2:1)+"/w/"+t+"/h/"+e+"/q/"+n+"/format/"+i},size:function(){return this.metaData().size},ownerId:function(){return this.metaData().owner},destroy:function(t){return this.id?f("files",null,this.id,"DELETE",null,t):i.default.reject(new Error("The file id does not eixst."))},_fileToken:function(t,n){var r=this.attributes.name,i=e(r);!i&&this._extName&&(r+=this._extName,i=this._extName);var o={name:r,keep_file_name:n.keepFileName,key:n.key,ACL:this._acl,mime_type:t,metaData:this.attributes.metaData};return f("fileTokens",null,null,"POST",o,n)},save:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.id)throw new Error("File is already saved.");if(!this._previousSave)if(this._data){var n=this.get("mime_type");this._previousSave=this._fileToken(n,e).then(function(r){return r.mime_type&&(n=r.mime_type,t.set("mime_type",n)),t._token=r.token,i.default.resolve().then(function(){var e=t._data;if(e&&e.base64)return v(e.base64,n);if(e&&e.blob)return!e.blob.type&&n&&(e.blob.type=n),e.blob.name||(e.blob.name=t.get("name")),e.blob;if("undefined"!=typeof Blob&&e instanceof Blob)return e;throw new TypeError("malformed file data")}).then(function(n){var i=o.extend({},e);switch(e.onprogress&&(i.onprogress=function(t){if("download"!==t.direction)return e.onprogress(t)}),r.provider){case"s3":return u(r,n,t,i);case"qcloud":return s(r,n,t,i);case"qiniu":default:return a(r,n,t,i)}}).then(h(function(){return t._callback(!0)}),function(e){throw t._callback(!1),e})})}else if(this.attributes.url&&"external"===this.attributes.metaData.__source){var r={name:this.attributes.name,ACL:this._acl,metaData:this.attributes.metaData,mime_type:this.mimeType,url:this.attributes.url};this._previousSave=f("files",null,null,"post",r,e).then(function(e){return t.id=e.objectId,t})}return this._previousSave},_callback:function(t){f("fileCallback",null,null,"post",{token:this._token,result:t}).catch(p),delete this._token,delete this._data},fetch:function(t,e){if(!this.id)throw new Error("Cannot fetch unsaved file");return f("files",null,this.id,"GET",d(t),e).then(this._finishFetch.bind(this))},_finishFetch:function(e){var n=t.Object.prototype.parse(e);return n.attributes={name:n.name,url:n.url,mime_type:n.mime_type,bucket:n.bucket},n.attributes.metaData=n.metaData||{},n.id=n.objectId,delete n.objectId,delete n.metaData,delete n.url,delete n.name,delete n.mime_type,delete n.bucket,o.extend(this,n),this}})}},function(t,e,n){"use strict";var r=n(43),i=r.getAdapter,o=n(34)("cos");t.exports=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=t.upload_url+"?sign="+encodeURIComponent(t.token),a={field:"fileContent",data:e,name:n.attributes.name},u={headers:n._uploadHeaders,data:{op:"upload"},onprogress:r.onprogress};return o("url: %s, file: %o, options: %o",s,a,u),i("upload")(s,a,u).then(function(e){if(o(e.status,e.data),!1===e.ok){var r=new Error(e.status);throw r.response=e,r}return n.attributes.url=t.url,n._bucket=t.bucket,n.id=t.objectId,n},function(t){var e=t.response;throw e&&(o(e.status,e.data),t.statusCode=e.status,t.response=e.data),t})}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=t.token,o=t.upload_url||"https://upload.qiniup.com",s={field:"file",data:e,name:n.attributes.name},a={headers:n._uploadHeaders,data:{name:n.attributes.name,key:t.key,token:i},onprogress:r.onprogress};return S("url: %s, file: %o, options: %o",o,s,a),T("upload")(o,s,a).then(function(e){if(S(e.status,e.data),!1===e.ok){var r=e.status;e.data&&(r=e.data.error?e.data.error:(0,E.default)(e.data));var i=new Error(r);throw i.response=e,i}return n.attributes.url=t.url,n._bucket=t.bucket,n.id=t.objectId,n},function(t){var e=t.response;throw e&&(S(e.status,e.data),t.statusCode=e.status,t.response=e.data),t})}function o(t){var e=j(unescape(encodeURIComponent(t))),n="",r=!0,i=!1,o=void 0;try{for(var s,a=(0,_.default)(e);!(r=(s=a.next()).done);r=!0){var u=s.value;switch(u){case"+":n+="-";break;case"/":n+="_";break;default:n+=u}}}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}function s(t){return"undefined"!=typeof Blob&&t instanceof Blob}var a=n(178),u=r(a),c=n(328),f=r(c),l=n(329),h=r(l),d=n(3),p=r(d),v=n(336),m=r(v),y=n(337),g=r(y),b=n(186),_=r(b),w=n(21),E=r(w),O=n(43),T=O.getAdapter,S=n(34)("leancloud:qiniu"),A=n(72),j=n(340),I=16777216,x=function(){function t(e,n,r,i){var s=this;(0,m.default)(this,t),this.uploadInfo=e,this.data=n,this.file=r,this.size=void 0,this.offset=0,this.uploadedChunks=0;var a=o(e.key),u=e.upload_url||"https://upload.qiniup.com";this.baseURL=u+"/buckets/"+e.bucket+"/objects/"+a+"/uploads",this.upToken="UpToken "+e.token,this.uploaded=0,i&&i.onprogress&&(this.onProgress=function(t){var e=t.loaded;(e+=s.uploadedChunks*I)<=s.uploaded||(s.size?i.onprogress({loaded:e,total:s.size,percent:e/s.size*100}):i.onprogress({loaded:e}),s.uploaded=e)})}return(0,g.default)(t,[{key:"getUploadId",value:function(){return A({method:"POST",url:this.baseURL,headers:{Authorization:this.upToken}}).then(function(t){return t.uploadId})}},{key:"getChunk",value:function(){throw new Error("Not implemented")}},{key:"uploadPart",value:function(t,e,n){return A({method:"PUT",url:this.baseURL+"/"+t+"/"+e,headers:{Authorization:this.upToken},data:n,onprogress:this.onProgress}).then(function(t){var n=t.etag;return{partNumber:e,etag:n}})}},{key:"stopUpload",value:function(t){return A({method:"DELETE",url:this.baseURL+"/"+t,headers:{Authorization:this.upToken}})}},{key:"upload",value:function(){var t=this,e=[];return this.getUploadId().then(function(n){return function r(){return p.default.resolve(t.getChunk()).then(function(i){if(i){var o=e.length+1;return t.uploadPart(n,o,i).then(function(n){return e.push(n),t.uploadedChunks++,r()})}}).catch(function(e){return t.stopUpload(n).then(function(){return p.default.reject(e)})})}().then(function(){return A({method:"POST",url:t.baseURL+"/"+n,headers:{Authorization:t.upToken},data:{parts:e,fname:t.file.attributes.name,mimeType:t.file.attributes.mime_type}})})}).then(function(){return t.file.attributes.url=t.uploadInfo.url,t.file._bucket=t.uploadInfo.bucket,t.file.id=t.uploadInfo.objectId,t.file})}}]),t}(),C=function(t){function e(t,n,r,i){(0,m.default)(this,e);var o=(0,f.default)(this,(e.__proto__||(0,u.default)(e)).call(this,t,n,r,i));return o.size=n.size,o}return(0,h.default)(e,t),(0,g.default)(e,[{key:"getChunk",value:function(){if(this.offset>=this.size)return null;var t=this.data.slice(this.offset,this.offset+I);return this.offset+=t.size,t}}]),e}(x);t.exports=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s(e)&&e.size>=67108864?new C(t,e,n,r).upload():i(t,e,n,r)}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(23),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,i.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(330),o=r(i),s=n(111),a=r(s),u=n(23),c=r(u);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,c.default)(e)));t.prototype=(0,a.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(o.default?(0,o.default)(t,e):t.__proto__=e)}},function(t,e,n){t.exports={default:n(331),__esModule:!0}},function(t,e,n){n(332),t.exports=n(1).Object.setPrototypeOf},function(t,e,n){var r=n(4);r(r.S,"Object",{setPrototypeOf:n(333).set})},function(t,e,n){var r=n(9),i=n(15),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(22)(Function.call,n(76).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){n(335);var r=n(1).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(4);r(r.S,"Object",{create:n(60)})},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(71),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},function(t,e,n){n(37),n(35),t.exports=n(339)},function(t,e,n){var r=n(15),i=n(90);t.exports=n(1).getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},function(t,e,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.exports=function(t){for(var e="",n=0;n<t.length;){var i=t.charCodeAt(n++),o=t.charCodeAt(n++),s=t.charCodeAt(n++);if(i>255||o>255||s>255)throw new TypeError("Failed to encode base64: The string to be encoded contains characters outside of the Latin1 range.");var a=i<<16|o<<8|s;e+=r.charAt(a>>18&63)+r.charAt(a>>12&63)+r.charAt(a>>6&63)+r.charAt(63&a)}var u=t.length%3;return u?e.slice(0,u-3)+"===".substring(u):e}},function(t,e,n){"use strict";var r=n(0),i=n(72);t.exports=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return i({url:t.upload_url,method:"PUT",data:e,headers:r.extend({"Content-Type":n.get("mime_type"),"Cache-Control":"public, max-age=31536000"},n._uploadHeaders),onprogress:o.onprogress}).then(function(){return n.attributes.url=t.url,n._bucket=t.bucket,n.id=t.objectId,n})}},function(t,e,n){!function(){var e=n(343),r=n(187).utf8,i=n(344),o=n(187).bin,s=function(t,n){t.constructor==String?t=n&&"binary"===n.encoding?o.stringToBytes(t):r.stringToBytes(t):i(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());for(var a=e.bytesToWords(t),u=8*t.length,c=1732584193,f=-271733879,l=-1732584194,h=271733878,d=0;d<a.length;d++)a[d]=16711935&(a[d]<<8|a[d]>>>24)|4278255360&(a[d]<<24|a[d]>>>8);a[u>>>5]|=128<<u%32,a[14+(u+64>>>9<<4)]=u;for(var p=s._ff,v=s._gg,m=s._hh,y=s._ii,d=0;d<a.length;d+=16){var g=c,b=f,_=l,w=h;c=p(c,f,l,h,a[d+0],7,-680876936),h=p(h,c,f,l,a[d+1],12,-389564586),l=p(l,h,c,f,a[d+2],17,606105819),f=p(f,l,h,c,a[d+3],22,-1044525330),c=p(c,f,l,h,a[d+4],7,-176418897),h=p(h,c,f,l,a[d+5],12,1200080426),l=p(l,h,c,f,a[d+6],17,-1473231341),f=p(f,l,h,c,a[d+7],22,-45705983),c=p(c,f,l,h,a[d+8],7,1770035416),h=p(h,c,f,l,a[d+9],12,-1958414417),l=p(l,h,c,f,a[d+10],17,-42063),f=p(f,l,h,c,a[d+11],22,-1990404162),c=p(c,f,l,h,a[d+12],7,1804603682),h=p(h,c,f,l,a[d+13],12,-40341101),l=p(l,h,c,f,a[d+14],17,-1502002290),f=p(f,l,h,c,a[d+15],22,1236535329),c=v(c,f,l,h,a[d+1],5,-165796510),h=v(h,c,f,l,a[d+6],9,-1069501632),l=v(l,h,c,f,a[d+11],14,643717713),f=v(f,l,h,c,a[d+0],20,-373897302),c=v(c,f,l,h,a[d+5],5,-701558691),h=v(h,c,f,l,a[d+10],9,38016083),l=v(l,h,c,f,a[d+15],14,-660478335),f=v(f,l,h,c,a[d+4],20,-405537848),c=v(c,f,l,h,a[d+9],5,568446438),h=v(h,c,f,l,a[d+14],9,-1019803690),l=v(l,h,c,f,a[d+3],14,-187363961),f=v(f,l,h,c,a[d+8],20,1163531501),c=v(c,f,l,h,a[d+13],5,-1444681467),h=v(h,c,f,l,a[d+2],9,-51403784),l=v(l,h,c,f,a[d+7],14,1735328473),f=v(f,l,h,c,a[d+12],20,-1926607734),c=m(c,f,l,h,a[d+5],4,-378558),h=m(h,c,f,l,a[d+8],11,-2022574463),l=m(l,h,c,f,a[d+11],16,1839030562),f=m(f,l,h,c,a[d+14],23,-35309556),c=m(c,f,l,h,a[d+1],4,-1530992060),h=m(h,c,f,l,a[d+4],11,1272893353),l=m(l,h,c,f,a[d+7],16,-155497632),f=m(f,l,h,c,a[d+10],23,-1094730640),c=m(c,f,l,h,a[d+13],4,681279174),h=m(h,c,f,l,a[d+0],11,-358537222),l=m(l,h,c,f,a[d+3],16,-722521979),f=m(f,l,h,c,a[d+6],23,76029189),c=m(c,f,l,h,a[d+9],4,-640364487),h=m(h,c,f,l,a[d+12],11,-421815835),l=m(l,h,c,f,a[d+15],16,530742520),f=m(f,l,h,c,a[d+2],23,-995338651),c=y(c,f,l,h,a[d+0],6,-198630844),h=y(h,c,f,l,a[d+7],10,1126891415),l=y(l,h,c,f,a[d+14],15,-1416354905),f=y(f,l,h,c,a[d+5],21,-57434055),c=y(c,f,l,h,a[d+12],6,1700485571),h=y(h,c,f,l,a[d+3],10,-1894986606),l=y(l,h,c,f,a[d+10],15,-1051523),f=y(f,l,h,c,a[d+1],21,-2054922799),c=y(c,f,l,h,a[d+8],6,1873313359),h=y(h,c,f,l,a[d+15],10,-30611744),l=y(l,h,c,f,a[d+6],15,-1560198380),f=y(f,l,h,c,a[d+13],21,1309151649),c=y(c,f,l,h,a[d+4],6,-145523070),h=y(h,c,f,l,a[d+11],10,-1120210379),l=y(l,h,c,f,a[d+2],15,718787259),f=y(f,l,h,c,a[d+9],21,-343485551),c=c+g>>>0,f=f+b>>>0,l=l+_>>>0,h=h+w>>>0}return e.endian([c,f,l,h])};s._ff=function(t,e,n,r,i,o,s){var a=t+(e&n|~e&r)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},s._gg=function(t,e,n,r,i,o,s){var a=t+(e&r|n&~r)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},s._hh=function(t,e,n,r,i,o,s){var a=t+(e^n^r)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},s._ii=function(t,e,n,r,i,o,s){var a=t+(n^(e|~r))+(i>>>0)+s;return(a<<o|a>>>32-o)+e},s._blocksize=16,s._digestsize=16,t.exports=function(t,n){if(void 0===t||null===t)throw new Error("Illegal argument "+t);var r=e.wordsToBytes(s(t,n));return n&&n.asBytes?r:n&&n.asString?o.bytesToString(r):e.bytesToHex(r)}}()},function(t,e){!function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n<t.length;n++,r+=8)e[r>>>5]|=t[n]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},bytesToHex:function(t){for(var e=[],n=0;n<t.length;n++)e.push((t[n]>>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(parseInt(t.substr(n,2),16));return e},bytesToBase64:function(t){for(var n=[],r=0;r<t.length;r+=3)for(var i=t[r]<<16|t[r+1]<<8|t[r+2],o=0;o<4;o++)8*r+6*o<=8*t.length?n.push(e.charAt(i>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r<t.length;i=++r%4)0!=i&&n.push((e.indexOf(t.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(r))>>>6-2*i);return n}};t.exports=n}()},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function r(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}/*!
2 * Determine if an object is a Buffer
3 *
4 * @author Feross Aboukhadijeh <https://feross.org>
5 * @license MIT
6 */
7t.exports=function(t){return null!=t&&(n(t)||r(t)||!!t._isBuffer)}},function(t,e,n){"use strict";var r=function(t,e){var n;t.indexOf("base64")<0?n=atob(t):t.split(",")[0].indexOf("base64")>=0?(e=e||t.split(",")[0].split(":")[1].split(";")[0],n=atob(t.split(",")[1])):n=unescape(t.split(",")[1]);for(var r=new Uint8Array(n.length),i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return new Blob([r],{type:e})};t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){return t&&t[e]?d.isFunction(t[e])?t[e]():t[e]:null}var o=n(188),s=r(o),a=n(21),u=r(a),c=n(349),f=r(c),l=n(3),h=r(l),d=n(0),p=n(28),v=n(14),m=v._request,y=n(19),g=y.isNullOrUndefined,b=y.ensureArray,_=y.transformFetchOptions,w=y.setValue,E=y.findValue,O=y.isPlainObject,T=y.continueWhile,S=function t(e){return d.isArray(e)?e.map(t):O(e)?d.mapObject(e,t):d.isObject(e)&&e._toPointer?e._toPointer():e},A=["objectId","createdAt","updatedAt"],j=function(t){if(-1!==A.indexOf(t))throw new Error("key["+t+"] is reserved")},I=function(t){var e=d.find(t,function(t){return t instanceof Error});if(!e)return t;var n=new p(e.code,e.message);throw n.results=t,n};t.exports=function(t){t.Object=function(e,n){if(d.isString(e))return t.Object._create.apply(this,arguments);e=e||{},n&&n.parse&&(e=this.parse(e),e=this._mergeMagicFields(e));var r=i(this,"defaults");r&&(e=d.extend({},r,e)),n&&n.collection&&(this.collection=n.collection),this._serverData={},this._opSetQueue=[{}],this._flags={},this.attributes={},this._hashedJSON={},this._escapedAttributes={},this.cid=d.uniqueId("c"),this.changed={},this._silent={},this._pending={},this.set(e,{silent:!0}),this.changed={},this._silent={},this._pending={},this._hasData=!0,this._previousAttributes=d.clone(this.attributes),this.initialize.apply(this,arguments)},t.Object.saveAll=function(e,n){return t.Object._deepSaveAsync(e,null,n)},t.Object.fetchAll=function(t,e){return h.default.resolve().then(function(){return m("batch",null,null,"POST",{requests:d.map(t,function(t){if(!t.className)throw new Error("object must have className to fetch");if(!t.id)throw new Error("object must have id to fetch");if(t.dirty())throw new Error("object is modified but not saved");return{method:"GET",path:"/1.1/classes/"+t.className+"/"+t.id}})},e)}).then(function(e){var n=d.map(t,function(t,n){if(e[n].success){var r=t.parse(e[n].success);return t._cleanupUnsetKeys(r),t._finishFetch(r),t}return null===e[n].success?new p(p.OBJECT_NOT_FOUND,"Object not found."):new p(e[n].error.code,e[n].error.error)});return I(n)})},d.extend(t.Object.prototype,t.Events,{_fetchWhenSave:!1,initialize:function(){},fetchWhenSave:function(t){if(console.warn("AV.Object#fetchWhenSave is deprecated, use AV.Object#save with options.fetchWhenSave instead."),!d.isBoolean(t))throw new Error("Expect boolean value for fetchWhenSave");this._fetchWhenSave=t},getObjectId:function(){return this.id},getCreatedAt:function(){return this.createdAt},getUpdatedAt:function(){return this.updatedAt},toJSON:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return this._toFullJSON(n,!1)},toFullJSON:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this._toFullJSON(t)},_toFullJSON:function(e){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=d.clone(this.attributes);if(d.isArray(e))var o=e.concat(this);return t._objectEach(i,function(e,n){i[n]=t._encode(e,o,void 0,r)}),t._objectEach(this._operations,function(t,e){i[e]=t}),d.has(this,"id")&&(i.objectId=this.id),["createdAt","updatedAt"].forEach(function(t){if(d.has(n,t)){var e=n[t];i[t]=d.isDate(e)?e.toJSON():e}}),r&&(i.__type="Object",d.isArray(e)&&e.length&&(i.__type="Pointer"),i.className=this.className),i},_refreshCache:function(){var e=this;e._refreshingCache||(e._refreshingCache=!0,t._objectEach(this.attributes,function(n,r){n instanceof t.Object?n._refreshCache():d.isObject(n)&&e._resetCacheForKey(r)&&e.set(r,new t.Op.Set(n),{silent:!0})}),delete e._refreshingCache)},dirty:function(t){this._refreshCache();var e=d.last(this._opSetQueue);return t?!!e[t]:!this.id||d.keys(e).length>0},dirtyKeys:function(){this._refreshCache();var t=d.last(this._opSetQueue);return d.keys(t)},_toPointer:function(){return{__type:"Pointer",className:this.className,objectId:this.id}},get:function(t){switch(t){case"objectId":return this.id;case"createdAt":case"updatedAt":return this[t];default:return this.attributes[t]}},relation:function(e){var n=this.get(e);if(n){if(!(n instanceof t.Relation))throw new Error("Called relation() on non-relation field "+e);return n._ensureParentAndKey(this,e),n}return new t.Relation(this,e)},escape:function(t){var e=this._escapedAttributes[t];if(e)return e;var n,r=this.attributes[t];return n=g(r)?"":d.escape(r.toString()),this._escapedAttributes[t]=n,n},has:function(t){return!g(this.attributes[t])},_mergeMagicFields:function(e){var n=this,r=["objectId","createdAt","updatedAt"];return t._arrayEach(r,function(r){e[r]&&("objectId"===r?n.id=e[r]:"createdAt"!==r&&"updatedAt"!==r||d.isDate(e[r])?n[r]=e[r]:n[r]=t._parseDate(e[r]),delete e[r])}),e},_startSave:function(){this._opSetQueue.push({})},_cancelSave:function(){var e=d.first(this._opSetQueue);this._opSetQueue=d.rest(this._opSetQueue);var n=d.first(this._opSetQueue);t._objectEach(e,function(t,r){var i=e[r],o=n[r];i&&o?n[r]=o._mergeWithPrevious(i):i&&(n[r]=i)}),this._saving=this._saving-1},_finishSave:function(e){var n={};t._traverse(this.attributes,function(e){e instanceof t.Object&&e.id&&e._hasData&&(n[e.id]=e)});var r=d.first(this._opSetQueue);this._opSetQueue=d.rest(this._opSetQueue),this._applyOpSet(r,this._serverData),this._mergeMagicFields(e);var i=this;t._objectEach(e,function(e,r){i._serverData[r]=t._decode(e,r);var o=t._traverse(i._serverData[r],function(e){if(e instanceof t.Object&&n[e.id])return n[e.id]});o&&(i._serverData[r]=o)}),this._rebuildAllEstimatedData();var o=this._opSetQueue.map(d.clone);this._refreshCache(),this._opSetQueue=o,this._saving=this._saving-1},_finishFetch:function(e,n){this._opSetQueue=[{}],this._mergeMagicFields(e);var r=this;t._objectEach(e,function(e,n){r._serverData[n]=t._decode(e,n)}),this._rebuildAllEstimatedData(),this._refreshCache(),this._opSetQueue=[{}],this._hasData=n},_applyOpSet:function(e,n){var r=this;t._objectEach(e,function(e,i){var o=E(n,i),s=(0,f.default)(o,3),a=s[0],u=s[1],c=s[2];w(n,i,e._estimate(a,r,i)),u&&u[c]===t.Op._UNSET&&delete u[c]})},_resetCacheForKey:function(e){var n=this.attributes[e];if(d.isObject(n)&&!(n instanceof t.Object)&&!(n instanceof t.File)){var r=(0,u.default)(S(n));if(this._hashedJSON[e]!==r){var i=!!this._hashedJSON[e];return this._hashedJSON[e]=r,i}}return!1},_rebuildEstimatedDataForKey:function(e){var n=this;delete this.attributes[e],this._serverData[e]&&(this.attributes[e]=this._serverData[e]),t._arrayEach(this._opSetQueue,function(r){var i=r[e];if(i){var o=E(n.attributes,e),s=(0,f.default)(o,4),a=s[0],u=s[1],c=s[2],l=s[3];w(n.attributes,e,i._estimate(a,n,e)),u&&u[c]===t.Op._UNSET&&delete u[c],n._resetCacheForKey(l)}})},_rebuildAllEstimatedData:function(){var e=this,n=d.clone(this.attributes);this.attributes=d.clone(this._serverData),t._arrayEach(this._opSetQueue,function(n){e._applyOpSet(n,e.attributes),t._objectEach(n,function(t,n){e._resetCacheForKey(n)})}),t._objectEach(n,function(t,n){e.attributes[n]!==t&&e.trigger("change:"+n,e,e.attributes[n],{})}),t._objectEach(this.attributes,function(t,r){d.has(n,r)||e.trigger("change:"+r,e,t,{})})},set:function(e,n,r){var i;if(d.isObject(e)||g(e)?(i=d.mapObject(e,function(e,n){return j(n),t._decode(e,n)}),r=n):(i={},j(e),i[e]=t._decode(n,e)),r=r||{},!i)return this;i instanceof t.Object&&(i=i.attributes),r.unset&&t._objectEach(i,function(e,n){i[n]=new t.Op.Unset});var o=d.clone(i),s=this;t._objectEach(o,function(e,n){e instanceof t.Op&&(o[n]=e._estimate(s.attributes[n],s,n),o[n]===t.Op._UNSET&&delete o[n])}),this._validate(i,r),r.changes={};var a=this._escapedAttributes;return t._arrayEach(d.keys(i),function(e){var n=i[e];n instanceof t.Relation&&(n.parent=s),n instanceof t.Op||(n=new t.Op.Set(n));var o=!0;n instanceof t.Op.Set&&d.isEqual(s.attributes[e],n.value)&&(o=!1),o&&(delete a[e],r.silent?s._silent[e]=!0:r.changes[e]=!0);var u=d.last(s._opSetQueue);u[e]=n._mergeWithPrevious(u[e]),s._rebuildEstimatedDataForKey(e),o?(s.changed[e]=s.attributes[e],r.silent||(s._pending[e]=!0)):(delete s.changed[e],delete s._pending[e])}),r.silent||this.change(r),this},unset:function(t,e){return e=e||{},e.unset=!0,this.set(t,null,e)},increment:function(e,n){return(d.isUndefined(n)||d.isNull(n))&&(n=1),this.set(e,new t.Op.Increment(n))},add:function(e,n){return this.set(e,new t.Op.Add(b(n)))},addUnique:function(e,n){return this.set(e,new t.Op.AddUnique(b(n)))},remove:function(e,n){return this.set(e,new t.Op.Remove(b(n)))},bitAnd:function(e,n){return this.set(e,new t.Op.BitAnd(n))},bitOr:function(e,n){return this.set(e,new t.Op.BitOr(n))},bitXor:function(e,n){return this.set(e,new t.Op.BitXor(n))},op:function(t){return d.last(this._opSetQueue)[t]},clear:function(t){t=t||{},t.unset=!0;var e=d.extend(this.attributes,this._operations);return this.set(e,t)},revert:function(t){var e=d.last(this._opSetQueue);return b(t||d.keys(e)).forEach(function(t){delete e[t]}),this._rebuildAllEstimatedData(),this},_getSaveJSON:function(){var e=d.clone(d.first(this._opSetQueue));return t._objectEach(e,function(t,n){e[n]=t.toJSON()}),e},_canBeSerialized:function(){return t.Object._canBeSerializedAsValue(this.attributes)},fetch:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(!this.id)throw new Error("Cannot fetch unsaved object");var n=this;return m("classes",this.className,this.id,"GET",_(t),e).then(function(e){var r=n.parse(e);return n._cleanupUnsetKeys(r,t.keys?b(t.keys).join(",").split(","):void 0),n._finishFetch(r,!0),n})},_cleanupUnsetKeys:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.keys(this._serverData);d.forEach(n,function(n){void 0===t[n]&&delete e._serverData[n]})},save:function(e,n,r){var i,o,s;d.isObject(e)||g(e)?(i=e,s=n):(i={},i[e]=n,s=r),s=d.clone(s)||{},s.wait&&(o=d.clone(this.attributes));var a=d.clone(s)||{};a.wait&&(a.silent=!0),i&&this.set(i,a);var u=this,c=[],f=[];return t.Object._findUnsavedChildren(u,c,f),c.length+f.length>1?t.Object._deepSaveAsync(this,u,s):(this._startSave(),this._saving=(this._saving||0)+1,this._allPreviousSaves=this._allPreviousSaves||h.default.resolve(),this._allPreviousSaves=this._allPreviousSaves.catch(function(t){}).then(function(){var t=u.id?"PUT":"POST",e=u._getSaveJSON(),n={};if((u._fetchWhenSave||s.fetchWhenSave)&&(n.new="true"),s._failOnNotExist&&(n.failOnNotExist="true"),s.query){var r;if("function"==typeof s.query._getParams&&(r=s.query._getParams())&&(n.where=r.where),!n.where){throw new Error("options.query is not an AV.Query")}}d.extend(e,u._flags);var c="classes",f=u.className;"_User"!==u.className||u.id||(c="users",f=null);var l=s._makeRequest||m,h=l(c,f,u.id,t,e,s,n);return h=h.then(function(t){var e=u.parse(t);return s.wait&&(e=d.extend(i||{},e)),u._finishSave(e),s.wait&&u.set(o,a),u},function(t){throw u._cancelSave(),t})}),this._allPreviousSaves)},destroy:function(t){t=t||{};var e=this,n=function(){e.trigger("destroy",e,e.collection,t)};return this.id?(t.wait||n(),m("classes",this.className,this.id,"DELETE",this._flags,t).then(function(){return t.wait&&n(),e})):n()},parse:function(e){var n=d.clone(e);return["createdAt","updatedAt"].forEach(function(e){n[e]&&(n[e]=t._parseDate(n[e]))}),n.createdAt&&!n.updatedAt&&(n.updatedAt=n.createdAt),n},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.id},change:function(e){e=e||{};var n=this._changing;this._changing=!0;var r=this;t._objectEach(this._silent,function(t){r._pending[t]=!0});var i=d.extend({},e.changes,this._silent);if(this._silent={},t._objectEach(i,function(t,n){r.trigger("change:"+n,r,r.get(n),e)}),n)return this;for(var o=function(t,e){r._pending[e]||r._silent[e]||delete r.changed[e]};!d.isEmpty(this._pending);)this._pending={},this.trigger("change",this,e),t._objectEach(this.changed,o),r._previousAttributes=d.clone(this.attributes);return this._changing=!1,this},previous:function(t){return arguments.length&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return d.clone(this._previousAttributes)},isValid:function(){try{this.validate(this.attributes)}catch(t){return!1}return!0},validate:function(e){if(d.has(e,"ACL")&&!(e.ACL instanceof t.ACL))throw new p(p.OTHER_CAUSE,"ACL must be a AV.ACL.")},_validate:function(t,e){!e.silent&&this.validate&&(t=d.extend({},this.attributes,t),this.validate(t))},getACL:function(){return this.get("ACL")},setACL:function(t,e){return this.set("ACL",t,e)},disableBeforeHook:function(){this.ignoreHook("beforeSave"),this.ignoreHook("beforeUpdate"),this.ignoreHook("beforeDelete")},disableAfterHook:function(){this.ignoreHook("afterSave"),this.ignoreHook("afterUpdate"),this.ignoreHook("afterDelete")},ignoreHook:function(e){if(!d.contains(["beforeSave","afterSave","beforeUpdate","afterUpdate","beforeDelete","afterDelete"],e))throw new Error("Unsupported hookName: "+e);if(!t.hookKey)throw new Error("ignoreHook required hookKey");this._flags.__ignore_hooks||(this._flags.__ignore_hooks=[]),this._flags.__ignore_hooks.push(e)}}),t.Object.createWithoutData=function(e,n,r){var i=void 0;if(d.isString(e))i=t.Object._getSubclass(e);else{if(!(e.prototype&&e.prototype instanceof t.Object))throw new Error("class must be a string or a subclass of AV.Object.");i=e}if(!n)throw new TypeError("The objectId must be provided");var o=new i;return o.id=n,o._hasData=r,o},t.Object.destroyAll=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||0===t.length)return h.default.resolve();var n=d.groupBy(t,function(t){return(0,u.default)({className:t.className,flags:t._flags})}),r={requests:d.map(n,function(t){var e=d.map(t,"id").join(",");return{method:"DELETE",path:"/1.1/classes/"+t[0].className+"/"+e,body:t[0]._flags}})};return m("batch",null,null,"POST",r,e).then(function(t){var e=d.find(t,function(t){return!t.success});if(e)throw new p(e.error.code,e.error.error)})},t.Object._getSubclass=function(e){if(!d.isString(e))throw new Error("AV.Object._getSubclass requires a string argument.");var n=t.Object._classMap[e];return n||(n=t.Object.extend(e),t.Object._classMap[e]=n),n},t.Object._create=function(e,n,r){return new(t.Object._getSubclass(e))(n,r)},t.Object._classMap={},t.Object._extend=t._extend,t.Object.new=function(e,n){return new t.Object(e,n)},t.Object.extend=function(e,n,r){if(!d.isString(e)){if(e&&d.has(e,"className"))return t.Object.extend(e.className,e,n);throw new Error("AV.Object.extend's first argument should be the className.")}"User"===e&&(e="_User");var i=null;if(d.has(t.Object._classMap,e)){var o=t.Object._classMap[e];if(!n&&!r)return o;i=o._extend(n,r)}else n=n||{},n._className=e,i=this._extend(n,r);return i.extend=function(n){if(d.isString(n)||n&&d.has(n,"className"))return t.Object.extend.apply(i,arguments);var r=[e].concat(d.toArray(arguments));return t.Object.extend.apply(i,r)},Object.defineProperty(i,"query",(0,s.default)(t.Object,"query")),i.new=function(t,e){return new i(t,e)},t.Object._classMap[e]=i,i},Object.defineProperty(t.Object.prototype,"className",{get:function(){var t=this._className||this.constructor._LCClassName||this.constructor.name;return"User"===t?"_User":t}}),t.Object.register=function(e,n){if(!(e.prototype instanceof t.Object))throw new Error("registered class is not a subclass of AV.Object");var r=n||e.name;if(!r.length)throw new Error("registered class must be named");n&&(e._LCClassName=n),t.Object._classMap[r]=e},Object.defineProperty(t.Object,"query",{get:function(){return new t.Query(this.prototype.className)}}),t.Object._findUnsavedChildren=function(e,n,r){t._traverse(e,function(e){return e instanceof t.Object?void(e.dirty()&&n.push(e)):e instanceof t.File?void(e.id||r.push(e)):void 0})},t.Object._canBeSerializedAsValue=function(e){var n=!0;return e instanceof t.Object||e instanceof t.File?n=!!e.id:d.isArray(e)?t._arrayEach(e,function(e){t.Object._canBeSerializedAsValue(e)||(n=!1)}):d.isObject(e)&&t._objectEach(e,function(e){t.Object._canBeSerializedAsValue(e)||(n=!1)}),n},t.Object._deepSaveAsync=function(e,n,r){var i=[],o=[];t.Object._findUnsavedChildren(e,i,o),o=d.uniq(o);var s=h.default.resolve();d.each(o,function(t){s=s.then(function(){return t.save()})});var a=d.uniq(i),u=d.uniq(a);return s.then(function(){return T(function(){return u.length>0},function(){var e=[],n=[];if(t._arrayEach(u,function(t){t._canBeSerialized()?e.push(t):n.push(t)}),u=n,0===e.length)return h.default.reject(new p(p.OTHER_CAUSE,"Tried to save a batch with a cycle."));var i=h.default.resolve(d.map(e,function(t){return t._allPreviousSaves||h.default.resolve()})),o=i.then(function(){return m("batch",null,null,"POST",{requests:d.map(e,function(t){var e=t.id?"PUT":"POST",n=t._getSaveJSON();d.extend(n,t._flags);var i=t.className,o="/classes/"+i;"_User"!==t.className||t.id||(o="/users");var o="/1.1"+o;return t.id&&(o=o+"/"+t.id),t._startSave(),{method:e,path:o,body:n,params:r&&r.fetchWhenSave?{fetchWhenSave:!0}:void 0}})},r).then(function(t){var n=d.map(e,function(e,n){return t[n].success?(e._finishSave(e.parse(t[n].success)),e):(e._cancelSave(),new p(t[n].error.code,t[n].error.error))});return I(n)})});return t._arrayEach(e,function(t){t._allPreviousSaves=o}),o})}).then(function(){return e})}}},function(t,e,n){n(348);var r=n(1).Object;t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}},function(t,e,n){var r=n(26),i=n(76).f;n(70)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(112),o=r(i),s=n(186),a=r(s);e.default=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=(0,a.default)(t);!(r=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if((0,o.default)(Object(e)))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(t,e,n){n(37),n(35),t.exports=n(351)},function(t,e,n){var r=n(63),i=n(8)("iterator"),o=n(36);t.exports=n(1).isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||o.hasOwnProperty(r(e))}},function(t,e,n){"use strict";var r=n(0),i=n(28);t.exports=function(t){t.Role=t.Object.extend("_Role",{constructor:function(e,n){if(r.isString(e)?(t.Object.prototype.constructor.call(this,null,null),this.setName(e)):t.Object.prototype.constructor.call(this,e,n),n){if(!(n instanceof t.ACL))throw new TypeError("acl must be an instance of AV.ACL");this.setACL(n)}},getName:function(){return this.get("name")},setName:function(t,e){return this.set("name",t,e)},getUsers:function(){return this.relation("users")},getRoles:function(){return this.relation("roles")},validate:function(e,n){if("name"in e&&e.name!==this.getName()){var o=e.name;if(this.id&&this.id!==e.objectId)return new i(i.OTHER_CAUSE,"A role's name can only be set before it has been saved.");if(!r.isString(o))return new i(i.OTHER_CAUSE,"A role's name must be a String.");if(!/^[0-9a-zA-Z\-_ ]+$/.test(o))return new i(i.OTHER_CAUSE,"A role's name can only contain alphanumeric characters, _, -, and spaces.")}return!!t.Object.prototype.validate&&t.Object.prototype.validate.call(this,e,n)}})}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(21),o=r(i),s=n(354),a=r(s),u=n(3),c=r(u),f=n(0),l=n(177),h=n(28),d=n(14),p=d._request,v=d.request,m=n(43),y=m.getAdapter,g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"weixin";return function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.unionIdPlatform,o=void 0===i?t:i,s=r.asMainAccount,a=void 0!==s&&s;if("string"!=typeof n)throw new h(h.OTHER_CAUSE,"unionId is not a string");if("string"!=typeof o)throw new h(h.OTHER_CAUSE,"unionIdPlatform is not a string");return f.extend({},e,{platform:o,unionid:n,main_account:Boolean(a)})}};t.exports=function(t){t.User=t.Object.extend("_User",{_isCurrentUser:!1,_mergeMagicFields:function(e){return e.sessionToken&&(this._sessionToken=e.sessionToken,delete e.sessionToken),t.User.__super__._mergeMagicFields.call(this,e)},_cleanupAuthData:function(){if(this.isCurrent()){var e=this.get("authData");e&&t._objectEach(this.get("authData"),function(t,n){e[n]||delete e[n]})}},_synchronizeAllAuthData:function(){if(this.get("authData")){var e=this;t._objectEach(this.get("authData"),function(t,n){e._synchronizeAuthData(n)})}},_synchronizeAuthData:function(e){if(this.isCurrent()){var n;f.isString(e)?(n=e,e=t.User._authProviders[n]):n=e.getAuthType();var r=this.get("authData");if(r&&e){e.restoreAuthentication(r[n])||this.dissociateAuthData(e)}}},_handleSaveResult:function(e){return e&&!t._config.disableCurrentUser&&(this._isCurrentUser=!0),this._cleanupAuthData(),this._synchronizeAllAuthData(),delete this._serverData.password,this._rebuildEstimatedDataForKey("password"),this._refreshCache(),!e&&!this.isCurrent()||t._config.disableCurrentUser?c.default.resolve():c.default.resolve(t.User._saveCurrentUser(this))},_linkWith:function(e,n){var r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=o.failOnNotExist,u=void 0!==s&&s;return f.isString(e)?(r=e,e=t.User._authProviders[e]):r=e.getAuthType(),n?this.save({authData:(0,a.default)({},r,n)},{fetchWhenSave:!!this.get("authData"),_failOnNotExist:u}).then(function(t){return t._handleSaveResult(!0).then(function(){return t})}):e.authenticate().then(function(t){return i._linkWith(e,t)})},associateWithAuthData:function(t,e){return this._linkWith(e,t)},associateWithAuthDataAndUnionId:function(t,e,n,r){return this._linkWith(e,g()(t,n,r))},associateWithMiniApp:function(t,e){var n=this;if(void 0===t){return y("getAuthInfo")().then(function(t){return n._linkWith(t.provider,t.authData,e)})}return this._linkWith(t.provider,t.authData,e)},associateWithQQApp:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.preferUnionId,r=void 0!==n&&n,i=e.unionIdPlatform,o=void 0===i?"qq":i,s=e.asMainAccount,a=void 0===s||s;return y("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(e){return e.provider="lc_qqapp",t.associateWithMiniApp(e)})},associateWithWeapp:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.preferUnionId,r=void 0!==n&&n,i=e.unionIdPlatform,o=void 0===i?"weixin":i,s=e.asMainAccount,a=void 0===s||s;return y("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(e){return t.associateWithMiniApp(e)})},linkWithWeapp:function(t){return console.warn("DEPRECATED: User#linkWithWeapp 已废弃,请使用 User#associateWithWeapp 代替"),this.associateWithWeapp(t)},associateWithQQAppWithUnionId:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"qq":i,s=r.asMainAccount,a=void 0!==s&&s;return y("getAuthInfo")({platform:o}).then(function(r){return r=t.User.mergeUnionId(r,e,{asMainAccount:a}),r.provider="lc_qqapp",n.associateWithMiniApp(r)})},associateWithWeappWithUnionId:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"weixin":i,s=r.asMainAccount,a=void 0!==s&&s;return y("getAuthInfo")({platform:o}).then(function(r){return r=t.User.mergeUnionId(r,e,{asMainAccount:a}),n.associateWithMiniApp(r)})},dissociateAuthData:function(t){return this.unset("authData."+t),this.save().then(function(t){return t._handleSaveResult(!0).then(function(){return t})})},_unlinkFrom:function(t){return console.warn("DEPRECATED: User#_unlinkFrom 已废弃,请使用 User#dissociateAuthData 代替"),this.dissociateAuthData(t)},_isLinked:function(t){var e;return e=f.isString(t)?t:t.getAuthType(),!!(this.get("authData")||{})[e]},isAnonymous:function(){return this._isLinked("anonymous")},logOut:function(){this._logOutWithAll(),this._isCurrentUser=!1},_logOutWithAll:function(){if(this.get("authData")){var e=this;t._objectEach(this.get("authData"),function(t,n){e._logOutWith(n)})}},_logOutWith:function(e){this.isCurrent()&&(f.isString(e)&&(e=t.User._authProviders[e]),e&&e.deauthenticate&&e.deauthenticate())},signUp:function(t,e){var n=t&&t.username||this.get("username");if(!n||""===n)throw new h(h.OTHER_CAUSE,"Cannot sign up user with an empty name.");var r=t&&t.password||this.get("password");if(!r||""===r)throw new h(h.OTHER_CAUSE,"Cannot sign up user with an empty password.");return this.save(t,e).then(function(t){return t.isAnonymous()&&(t.unset("authData.anonymous"),t._opSetQueue=[{}]),t._handleSaveResult(!0).then(function(){return t})})},signUpOrlogInWithMobilePhone:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t&&t.mobilePhoneNumber||this.get("mobilePhoneNumber");if(!n||""===n)throw new h(h.OTHER_CAUSE,"Cannot sign up or login user by mobilePhoneNumber with an empty mobilePhoneNumber.");var r=t&&t.smsCode||this.get("smsCode");if(!r||""===r)throw new h(h.OTHER_CAUSE,"Cannot sign up or login user by mobilePhoneNumber with an empty smsCode.");return e._makeRequest=function(t,e,n,r,i){return p("usersByMobilePhone",null,null,"POST",i)},this.save(t,e).then(function(t){return delete t.attributes.smsCode,delete t._serverData.smsCode,t._handleSaveResult(!0).then(function(){return t})})},loginWithAuthData:function(t,e,n){return this._linkWith(e,t,n)},loginWithAuthDataAndUnionId:function(t,e,n,r){return this.loginWithAuthData(g()(t,n,r),e,r)},loginWithWeapp:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.preferUnionId,r=void 0!==n&&n,i=e.unionIdPlatform,o=void 0===i?"weixin":i,s=e.asMainAccount,a=void 0===s||s,u=e.failOnNotExist,c=void 0!==u&&u;return y("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(e){return t.loginWithMiniApp(e,{failOnNotExist:c})})},loginWithWeappWithUnionId:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"weixin":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return y("getAuthInfo")({platform:o}).then(function(r){return r=t.User.mergeUnionId(r,e,{asMainAccount:a}),n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithQQApp:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.preferUnionId,r=void 0!==n&&n,i=e.unionIdPlatform,o=void 0===i?"qq":i,s=e.asMainAccount,a=void 0===s||s,u=e.failOnNotExist,c=void 0!==u&&u;return y("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(e){return e.provider="lc_qqapp",t.loginWithMiniApp(e,{failOnNotExist:c})})},loginWithQQAppWithUnionId:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"qq":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return y("getAuthInfo")({platform:o}).then(function(r){return r=t.User.mergeUnionId(r,e,{asMainAccount:a}),r.provider="lc_qqapp",n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithMiniApp:function(t,e){var n=this;if(void 0===t){return y("getAuthInfo")().then(function(t){return n.loginWithAuthData(t.authData,t.provider,e)})}return this.loginWithAuthData(t.authData,t.provider,e)},logIn:function(){var t=this;return p("login",null,null,"POST",this.toJSON()).then(function(e){var n=t.parse(e);return t._finishFetch(n),t._handleSaveResult(!0).then(function(){return n.smsCode||delete t.attributes.smsCode,t})})},save:function(e,n,r){var i,o;return f.isObject(e)||f.isNull(e)||f.isUndefined(e)?(i=e,o=n):(i={},i[e]=n,o=r),o=o||{},t.Object.prototype.save.call(this,i,o).then(function(t){return t._handleSaveResult(!1).then(function(){return t})})},follow:function(e,n){if(!this.id)throw new Error("Please signin.");var r=void 0,i=void 0;e.user?(r=e.user,i=e.attributes):r=e;var o=f.isString(r)?r:r.id;if(!o)throw new Error("Invalid target user.");var s="users/"+this.id+"/friendship/"+o;return p(s,null,null,"POST",t._encode(i),n)},unfollow:function(t,e){if(!this.id)throw new Error("Please signin.");var n=void 0;n=t.user?t.user:t;var r=f.isString(n)?n:n.id;if(!r)throw new Error("Invalid target user.");var i="users/"+this.id+"/friendship/"+r;return p(i,null,null,"DELETE",null,e)},getFollowersAndFollowees:function(e,n){if(!this.id)throw new Error("Please signin.");return v({method:"GET",path:"/users/"+this.id+"/followersAndFollowees",query:{skip:e&&e.skip,limit:e&&e.limit,include:"follower,followee",keys:"follower,followee"},authOptions:n}).then(function(e){var n=e.followers,r=e.followees;return{followers:n.map(function(e){var n=e.follower;return t._decode(n)}),followees:r.map(function(e){var n=e.followee;return t._decode(n)})}})},followerQuery:function(){return t.User.followerQuery(this.id)},followeeQuery:function(){return t.User.followeeQuery(this.id)},fetch:function(e,n){return t.Object.prototype.fetch.call(this,e,n).then(function(t){return t._handleSaveResult(!1).then(function(){return t})})},updatePassword:function(t,e,n){var r=this,i="users/"+this.id+"/updatePassword";return p(i,null,null,"PUT",{old_password:t,new_password:e},n).then(function(t){return r._finishFetch(r.parse(t)),r._handleSaveResult(!0).then(function(){return t})})},isCurrent:function(){return this._isCurrentUser},getUsername:function(){return this.get("username")},getMobilePhoneNumber:function(){return this.get("mobilePhoneNumber")},setMobilePhoneNumber:function(t,e){return this.set("mobilePhoneNumber",t,e)},setUsername:function(t,e){return this.set("username",t,e)},setPassword:function(t,e){return this.set("password",t,e)},getEmail:function(){return this.get("email")},setEmail:function(t,e){return this.set("email",t,e)},authenticated:function(){return console.warn("DEPRECATED: 如果要判断当前用户的登录状态是否有效,请使用 currentUser.isAuthenticated().then(),如果要判断该用户是否是当前登录用户,请使用 user.id === currentUser.id。"),!!this._sessionToken&&!t._config.disableCurrentUser&&t.User.current()&&t.User.current().id===this.id},isAuthenticated:function(){var e=this;return c.default.resolve().then(function(){return!!e._sessionToken&&t.User._fetchUserBySessionToken(e._sessionToken).then(function(){return!0},function(t){if(211===t.code)return!1;throw t})})},getSessionToken:function(){return this._sessionToken},refreshSessionToken:function(t){var e=this;return p("users/"+this.id+"/refreshSessionToken",null,null,"PUT",null,t).then(function(t){return e._finishFetch(t),e._handleSaveResult(!0).then(function(){return e})})},getRoles:function(e){return t.Relation.reverseQuery("_Role","users",this).find(e)}},{_currentUser:null,_currentUserMatchesDisk:!1,_CURRENT_USER_KEY:"currentUser",_authProviders:{},signUp:function(e,n,r,i){return r=r||{},r.username=e,r.password=n,t.Object._create("_User").signUp(r,i)},logIn:function(e,n){var r=t.Object._create("_User");return r._finishFetch({username:e,password:n}),r.logIn()},become:function(t){return this._fetchUserBySessionToken(t).then(function(t){return t._handleSaveResult(!0).then(function(){return t})})},_fetchUserBySessionToken:function(e){if(void 0===e)return c.default.reject(new Error("The sessionToken cannot be undefined"));var n=t.Object._create("_User");return v({method:"GET",path:"/users/me",authOptions:{sessionToken:e}}).then(function(t){var e=n.parse(t);return n._finishFetch(e),n})},logInWithMobilePhoneSmsCode:function(e,n){var r=t.Object._create("_User");return r._finishFetch({mobilePhoneNumber:e,smsCode:n}),r.logIn()},signUpOrlogInWithMobilePhone:function(e,n,r,i){return r=r||{},r.mobilePhoneNumber=e,r.smsCode=n,t.Object._create("_User").signUpOrlogInWithMobilePhone(r,i)},logInWithMobilePhone:function(e,n){var r=t.Object._create("_User");return r._finishFetch({mobilePhoneNumber:e,password:n}),r.logIn()},loginWithEmail:function(e,n){var r=t.Object._create("_User");return r._finishFetch({email:e,password:n}),r.logIn()},loginWithAuthData:function(e,n,r){return t.User._logInWith(n,e,r)},signUpOrlogInWithAuthData:function(){return console.warn("DEPRECATED: User.signUpOrlogInWithAuthData 已废弃,请使用 User#loginWithAuthData 代替"),this.loginWithAuthData.apply(this,arguments)},loginWithAuthDataAndUnionId:function(t,e,n,r){return this.loginWithAuthData(g()(t,n,r),e,r)},signUpOrlogInWithAuthDataAndUnionId:function(){return console.warn("DEPRECATED: User.signUpOrlogInWithAuthDataAndUnionId 已废弃,请使用 User#loginWithAuthDataAndUnionId 代替"),this.loginWithAuthDataAndUnionId.apply(this,arguments)},mergeUnionId:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.asMainAccount,i=void 0!==r&&r;t=JSON.parse((0,o.default)(t));var s=t,a=s.authData,u=s.platform;return a.platform=u,a.main_account=i,a.unionid=e,t},loginWithWeapp:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.preferUnionId,r=void 0!==n&&n,i=e.unionIdPlatform,o=void 0===i?"weixin":i,s=e.asMainAccount,a=void 0===s||s,u=e.failOnNotExist,c=void 0!==u&&u;return y("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(e){return t.loginWithMiniApp(e,{failOnNotExist:c})})},loginWithWeappWithUnionId:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"weixin":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return y("getAuthInfo")({platform:o}).then(function(r){return r=t.User.mergeUnionId(r,e,{asMainAccount:a}),n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithQQApp:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.preferUnionId,r=void 0!==n&&n,i=e.unionIdPlatform,o=void 0===i?"qq":i,s=e.asMainAccount,a=void 0===s||s,u=e.failOnNotExist,c=void 0!==u&&u;return y("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(e){return e.provider="lc_qqapp",t.loginWithMiniApp(e,{failOnNotExist:c})})},loginWithQQAppWithUnionId:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"qq":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return y("getAuthInfo")({platform:o}).then(function(r){return r=t.User.mergeUnionId(r,e,{asMainAccount:a}),r.provider="lc_qqapp",n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithMiniApp:function(t,e){var n=this;if(void 0===t){return y("getAuthInfo")().then(function(t){return n.loginWithAuthData(t.authData,t.provider,e)})}return this.loginWithAuthData(t.authData,t.provider,e)},_genId:function(){return l()},loginAnonymously:function(){return this.loginWithAuthData({id:t.User._genId()},"anonymous")},associateWithAuthData:function(t,e,n){return console.warn("DEPRECATED: User.associateWithAuthData 已废弃,请使用 User#associateWithAuthData 代替"),t._linkWith(e,n)},logOut:function(){return t._config.disableCurrentUser?(console.warn("AV.User.current() was disabled in multi-user environment, call logOut() from user object instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html"),c.default.resolve(null)):(null!==t.User._currentUser&&(t.User._currentUser._logOutWithAll(),t.User._currentUser._isCurrentUser=!1),t.User._currentUserMatchesDisk=!0,t.User._currentUser=null,t.localStorage.removeItemAsync(t._getAVPath(t.User._CURRENT_USER_KEY)).then(function(){return t._refreshSubscriptionId()}))},followerQuery:function(e){if(!e||!f.isString(e))throw new Error("Invalid user object id.");var n=new t.FriendShipQuery("_Follower");return n._friendshipTag="follower",n.equalTo("user",t.Object.createWithoutData("_User",e)),n},followeeQuery:function(e){if(!e||!f.isString(e))throw new Error("Invalid user object id.");var n=new t.FriendShipQuery("_Followee");return n._friendshipTag="followee",n.equalTo("user",t.Object.createWithoutData("_User",e)),n},requestPasswordReset:function(t){return p("requestPasswordReset",null,null,"POST",{email:t})},requestEmailVerify:function(t){return p("requestEmailVerify",null,null,"POST",{email:t})},requestMobilePhoneVerify:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:t};return e.validateToken&&(n.validate_token=e.validateToken),p("requestMobilePhoneVerify",null,null,"POST",n,e)},requestPasswordResetBySmsCode:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:t};return e.validateToken&&(n.validate_token=e.validateToken),p("requestPasswordResetBySmsCode",null,null,"POST",n,e)},requestChangePhoneNumber:function(t,e,n){var r={mobilePhoneNumber:t};return e&&(r.ttl=n.ttl),n&&n.validateToken&&(r.validate_token=n.validateToken),p("requestChangePhoneNumber",null,null,"POST",r,n)},changePhoneNumber:function(t,e){return p("changePhoneNumber",null,null,"POST",{mobilePhoneNumber:t,code:e})},resetPasswordBySmsCode:function(t,e){return p("resetPasswordBySmsCode",null,t,"PUT",{password:e})},verifyMobilePhone:function(t){return p("verifyMobilePhone",null,t,"POST",null)},requestLoginSmsCode:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:t};return e.validateToken&&(n.validate_token=e.validateToken),p("requestLoginSmsCode",null,null,"POST",n,e)},currentAsync:function(){return t._config.disableCurrentUser?(console.warn("AV.User.currentAsync() was disabled in multi-user environment, access user from request instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html"),c.default.resolve(null)):t.User._currentUser?c.default.resolve(t.User._currentUser):t.User._currentUserMatchesDisk?c.default.resolve(t.User._currentUser):t.localStorage.getItemAsync(t._getAVPath(t.User._CURRENT_USER_KEY)).then(function(e){if(!e)return null;t.User._currentUserMatchesDisk=!0,t.User._currentUser=t.Object._create("_User"),t.User._currentUser._isCurrentUser=!0;var n=JSON.parse(e);return t.User._currentUser.id=n._id,delete n._id,t.User._currentUser._sessionToken=n._sessionToken,delete n._sessionToken,t.User._currentUser._finishFetch(n),t.User._currentUser._synchronizeAllAuthData(),t.User._currentUser._refreshCache(),t.User._currentUser._opSetQueue=[{}],t.User._currentUser})},current:function(){if(t._config.disableCurrentUser)return console.warn("AV.User.current() was disabled in multi-user environment, access user from request instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html"),null;if(t.localStorage.async){var e=new Error("Synchronous API User.current() is not available in this runtime. Use User.currentAsync() instead.");throw e.code="SYNC_API_NOT_AVAILABLE",e}if(t.User._currentUser)return t.User._currentUser;if(t.User._currentUserMatchesDisk)return t.User._currentUser;t.User._currentUserMatchesDisk=!0;var n=t.localStorage.getItem(t._getAVPath(t.User._CURRENT_USER_KEY));if(!n)return null;t.User._currentUser=t.Object._create("_User"),t.User._currentUser._isCurrentUser=!0;var r=JSON.parse(n);return t.User._currentUser.id=r._id,delete r._id,t.User._currentUser._sessionToken=r._sessionToken,delete r._sessionToken,t.User._currentUser._finishFetch(r),t.User._currentUser._synchronizeAllAuthData(),t.User._currentUser._refreshCache(),t.User._currentUser._opSetQueue=[{}],t.User._currentUser},_saveCurrentUser:function(e){var n;return n=t.User._currentUser!==e?t.User.logOut():c.default.resolve(),n.then(function(){e._isCurrentUser=!0,t.User._currentUser=e;var n=e._toFullJSON();return n._id=e.id,n._sessionToken=e._sessionToken,t.localStorage.setItemAsync(t._getAVPath(t.User._CURRENT_USER_KEY),(0,o.default)(n)).then(function(){return t.User._currentUserMatchesDisk=!0,t._refreshSubscriptionId()})})},_registerAuthenticationProvider:function(e){t.User._authProviders[e.getAuthType()]=e,!t._config.disableCurrentUser&&t.User.current()&&t.User.current()._synchronizeAuthData(e.getAuthType())},_logInWith:function(e,n,r){return t.Object._create("_User")._linkWith(e,n,r)}})}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(71),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(t,e,n){return e in t?(0,i.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(21),o=r(i),s=n(3),a=r(s),u=n(0),c=n(34)("leancloud:query"),f=n(28),l=n(14),h=l._request,d=l.request,p=n(19),v=p.ensureArray,m=p.transformFetchOptions,y=p.continueWhile,g=function(t,e){if(void 0===t)throw new Error(e)};t.exports=function(t){t.Query=function(e){u.isString(e)&&(e=t.Object._getSubclass(e)),this.objectClass=e,this.className=e.prototype.className,this._where={},this._include=[],this._select=[],this._limit=-1,this._skip=0,this._defaultParams={}},t.Query.or=function(){var e=u.toArray(arguments),n=null;t._arrayEach(e,function(t){if(u.isNull(n)&&(n=t.className),n!==t.className)throw new Error("All queries must be for the same class")});var r=new t.Query(n);return r._orQuery(e),r},t.Query.and=function(){var e=u.toArray(arguments),n=null;t._arrayEach(e,function(t){if(u.isNull(n)&&(n=t.className),n!==t.className)throw new Error("All queries must be for the same class")});var r=new t.Query(n);return r._andQuery(e),r},t.Query.doCloudQuery=function(e,n,r){var i={cql:e};return u.isArray(n)?i.pvalues=n:r=n,h("cloudQuery",null,null,"GET",i,r).then(function(e){var n=new t.Query(e.className);return{results:u.map(e.results,function(t){var r=n._newObject(e);return r._finishFetch&&r._finishFetch(n._processResult(t),!0),r}),count:e.count,className:e.className}})},t.Query.fromJSON=function(e){var n=e.className,r=e.where,i=e.include,o=e.select,s=e.includeACL,a=e.limit,c=e.skip,f=e.order;if("string"!=typeof n)throw new TypeError("Invalid Query JSON, className must be a String.");var l=new t.Query(n);return u.extend(l,{_where:r,_include:i,_select:o,_includeACL:s,_limit:a,_skip:c,_order:f}),l},t.Query._extend=t._extend,u.extend(t.Query.prototype,{_processResult:function(t){return t},get:function(t,e){if(!u.isString(t))throw new Error("objectId must be a string");if(""===t)return a.default.reject(new f(f.OBJECT_NOT_FOUND,"Object not found."));var n=this._newObject();n.id=t;var r=this._getParams(),i={};return r.keys&&(i.keys=r.keys),r.include&&(i.include=r.include),r.includeACL&&(i.includeACL=r.includeACL),h("classes",this.className,t,"GET",m(i),e).then(function(t){if(u.isEmpty(t))throw new f(f.OBJECT_NOT_FOUND,"Object not found.");return n._finishFetch(n.parse(t),!0),n})},toJSON:function(){return{className:this.className,where:this._where,include:this._include,select:this._select,includeACL:this._includeACL,limit:this._limit,skip:this._skip,order:this._order}},_getParams:function(){var t=u.extend({},this._defaultParams,{where:this._where});return this._include.length>0&&(t.include=this._include.join(",")),this._select.length>0&&(t.keys=this._select.join(",")),void 0!==this._includeACL&&(t.returnACL=this._includeACL),this._limit>=0&&(t.limit=this._limit),this._skip>0&&(t.skip=this._skip),void 0!==this._order&&(t.order=this._order),t},_newObject:function(e){return e&&e.className?new t.Object(e.className):new this.objectClass},_createRequest:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getParams(),e=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/classes/"+this.className;if(encodeURIComponent((0,o.default)(t)).length>2e3){return d({path:"/batch",method:"POST",data:{requests:[{method:"GET",path:"/1.1"+n,params:t}]},authOptions:e}).then(function(t){var e=t[0];if(e.success)return e.success;throw new f(e.error.code,e.error.error||"Unknown batch error")})}return d({method:"GET",path:n,query:t,authOptions:e})},_parseResponse:function(t){var e=this;return u.map(t.results,function(n){var r=e._newObject(t);return r._finishFetch&&r._finishFetch(e._processResult(n),!0),r})},find:function(t){return this._createRequest(void 0,t).then(this._parseResponse.bind(this))},findAndCount:function(t){var e=this,n=this._getParams();return n.count=1,this._createRequest(n,t).then(function(t){return[e._parseResponse(t),t.count]})},scan:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.orderedBy,r=e.batchSize,i=arguments[1],o=this._getParams();c("scan %O",o),o.order&&(console.warn("The order of the query is ignored for Query#scan. Checkout the orderedBy option of Query#scan."),delete o.order),o.skip&&(console.warn("The skip option of the query is ignored for Query#scan."),delete o.skip),o.limit&&(console.warn("The limit option of the query is ignored for Query#scan."),delete o.limit),n&&(o.scan_key=n),r&&(o.limit=r);var s=a.default.resolve([]),f=void 0,l=!1;return{next:function(){return s=s.then(function(e){return l?[]:e.length>1?e:f||0===e.length?h("scan/classes",t.className,null,"GET",f?u.extend({},o,{cursor:f}):o,i).then(function(e){return f=e.cursor,t._parseResponse(e)}).then(function(t){return t.length||(l=!0),e.concat(t)}):(l=!0,e)}),s.then(function(t){return t.shift()}).then(function(t){return{value:t,done:void 0===t}})}}},destroyAll:function(e){return this.find(e).then(function(n){return t.Object.destroyAll(n,e)})},count:function(t){var e=this._getParams();return e.limit=0,e.count=1,this._createRequest(e,t).then(function(t){return t.count})},first:function(t){var e=this,n=this._getParams();return n.limit=1,this._createRequest(n,t).then(function(t){return u.map(t.results,function(t){var n=e._newObject();return n._finishFetch&&n._finishFetch(e._processResult(t),!0),n})[0]})},skip:function(t){return g(t,"undefined is not a valid skip value"),this._skip=t,this},limit:function(t){return g(t,"undefined is not a valid limit value"),this._limit=t,this},equalTo:function(e,n){return g(e,"undefined is not a valid key"),g(n,"undefined is not a valid value"),this._where[e]=t._encode(n),this},_addCondition:function(e,n,r){return g(e,"undefined is not a valid condition key"),g(n,"undefined is not a valid condition"),g(r,"undefined is not a valid condition value"),this._where[e]||(this._where[e]={}),this._where[e][n]=t._encode(r),this},sizeEqualTo:function(t,e){return this._addCondition(t,"$size",e),this},notEqualTo:function(t,e){return this._addCondition(t,"$ne",e),this},lessThan:function(t,e){return this._addCondition(t,"$lt",e),this},greaterThan:function(t,e){return this._addCondition(t,"$gt",e),this},lessThanOrEqualTo:function(t,e){return this._addCondition(t,"$lte",e),this},greaterThanOrEqualTo:function(t,e){return this._addCondition(t,"$gte",e),this},containedIn:function(t,e){return this._addCondition(t,"$in",e),this},notContainedIn:function(t,e){return this._addCondition(t,"$nin",e),this},containsAll:function(t,e){return this._addCondition(t,"$all",e),this},exists:function(t){return this._addCondition(t,"$exists",!0),this},doesNotExist:function(t){return this._addCondition(t,"$exists",!1),this},matches:function(t,e,n){return this._addCondition(t,"$regex",e),n||(n=""),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),n&&n.length&&this._addCondition(t,"$options",n),this},matchesQuery:function(t,e){var n=e._getParams();return n.className=e.className,this._addCondition(t,"$inQuery",n),this},doesNotMatchQuery:function(t,e){var n=e._getParams();return n.className=e.className,this._addCondition(t,"$notInQuery",n),this},matchesKeyInQuery:function(t,e,n){var r=n._getParams();return r.className=n.className,this._addCondition(t,"$select",{key:e,query:r}),this},doesNotMatchKeyInQuery:function(t,e,n){var r=n._getParams();return r.className=n.className,this._addCondition(t,"$dontSelect",{key:e,query:r}),this},_orQuery:function(t){var e=u.map(t,function(t){return t._getParams().where});return this._where.$or=e,this},_andQuery:function(t){var e=u.map(t,function(t){return t._getParams().where});return this._where.$and=e,this},_quote:function(t){return"\\Q"+t.replace("\\E","\\E\\\\E\\Q")+"\\E"},contains:function(t,e){return this._addCondition(t,"$regex",this._quote(e)),this},startsWith:function(t,e){return this._addCondition(t,"$regex","^"+this._quote(e)),this},endsWith:function(t,e){return this._addCondition(t,"$regex",this._quote(e)+"$"),this},ascending:function(t){return g(t,"undefined is not a valid key"),this._order=t,this},addAscending:function(t){return g(t,"undefined is not a valid key"),this._order?this._order+=","+t:this._order=t,this},descending:function(t){return g(t,"undefined is not a valid key"),this._order="-"+t,this},addDescending:function(t){return g(t,"undefined is not a valid key"),this._order?this._order+=",-"+t:this._order="-"+t,this},near:function(e,n){return n instanceof t.GeoPoint||(n=new t.GeoPoint(n)),this._addCondition(e,"$nearSphere",n),this},withinRadians:function(t,e,n){return this.near(t,e),this._addCondition(t,"$maxDistance",n),this},withinMiles:function(t,e,n){return this.withinRadians(t,e,n/3958.8)},withinKilometers:function(t,e,n){return this.withinRadians(t,e,n/6371)},withinGeoBox:function(e,n,r){return n instanceof t.GeoPoint||(n=new t.GeoPoint(n)),r instanceof t.GeoPoint||(r=new t.GeoPoint(r)),this._addCondition(e,"$within",{$box:[n,r]}),this},include:function(t){var e=this;return g(t,"undefined is not a valid key"),u.forEach(arguments,function(t){e._include=e._include.concat(v(t))}),this},includeACL:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._includeACL=t,this},select:function(t){var e=this;return g(t,"undefined is not a valid key"),u.forEach(arguments,function(t){e._select=e._select.concat(v(t))}),this},each:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._order||this._skip||this._limit>=0){var r=new Error("Cannot iterate on a query with sort, skip, or limit.");return a.default.reject(r)}var i=new t.Query(this.objectClass);i._limit=n.batchSize||100,i._where=u.clone(this._where),i._include=u.clone(this._include),i.ascending("objectId");var o=!1;return y(function(){return!o},function(){return i.find(n).then(function(t){var n=a.default.resolve();return u.each(t,function(t){n=n.then(function(){return e(t)})}),n.then(function(){t.length>=i._limit?i.greaterThan("objectId",t[t.length-1].id):o=!0})})})},subscribe:function(e){return t.LiveQuery.init(this,e)}}),t.FriendShipQuery=t.Query._extend({_newObject:function(){return new(t.Object._getSubclass("_User"))},_processResult:function(t){if(t&&t[this._friendshipTag]){var e=t[this._friendshipTag];return"Pointer"===e.__type&&"_User"===e.className&&(delete e.__type,delete e.className),e}return null}})}},function(t,e,n){"use strict";var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(0),s=n(180),a=n(19),u=a.inherits,c=n(14),f=c.request,l=function(t,e){return f({method:"POST",path:"/LiveQuery/subscribe",data:{query:t,id:e}})};t.exports=function(t){var e=function(){if(!t._config.realtime)throw new Error("LiveQuery not supported. Please use the LiveQuery bundle. https://url.leanapp.cn/enable-live-query")};t.LiveQuery=u(s,{constructor:function(t,e,n,r){var i=this;s.apply(this),this.id=t,this._client=e,this._client.register(this),this._queryJSON=n,this._subscriptionId=r,this._onMessage=this._dispatch.bind(this),this._onReconnect=function(){l(i._queryJSON,i._subscriptionId).catch(function(t){return console.error("LiveQuery resubscribe error: "+t.message)})},e.on("message",this._onMessage),e.on("reconnect",this._onReconnect)},_dispatch:function(e){var n=this;e.forEach(function(e){var r=e.op,i=e.object,s=e.query_id,a=e.updatedKeys;if(s===n.id){var u=t.parseJSON(o.extend({__type:"_File"===i.className?"File":"Object"},i));a?n.emit(r,u,a):n.emit(r,u)}})},unsubscribe:function(){var t=this._client;return t.off("message",this._onMessage),t.off("reconnect",this._onReconnect),t.deregister(this),f({method:"POST",path:"/LiveQuery/unsubscribe",data:{id:t.id,query_id:this.id}})}},{init:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.subscriptionId,s=void 0===o?t._getSubscriptionId():o;if(e(),!(n instanceof t.Query))throw new TypeError("LiveQuery must be inited with a Query");return i.default.resolve(s).then(function(e){return t._config.realtime.createLiveQueryClient(e).then(function(r){var i=n._getParams(),o=i.where,s=i.keys,a=i.returnACL,u={where:o,keys:s,returnACL:a,className:n.className},c=l(u,e).then(function(n){var i=n.query_id;return new t.LiveQuery(i,r,u,e)}).finally(function(){r.deregister(c)});return r.register(c),c})})},pause:function(){return e(),t._config.realtime.pause()},resume:function(){return e(),t._config.realtime.resume()}})}},function(t,e,n){"use strict";var r=n(0),i=n(19),o=i.tap;t.exports=function(t){t.Captcha=function(t,e){this._options=t,this._authOptions=e,this.url=void 0,this.captchaToken=void 0,this.validateToken=void 0},t.Captcha.prototype.refresh=function(){var e=this;return t.Cloud._requestCaptcha(this._options,this._authOptions).then(function(t){var n=t.captchaToken,i=t.url;return r.extend(e,{captchaToken:n,url:i}),i})},t.Captcha.prototype.verify=function(e){var n=this;return t.Cloud.verifyCaptcha(e,this.captchaToken).then(o(function(t){return n.validateToken=t}))},t.Captcha.prototype.bind=function(t,e){var n=this,r=t.textInput,i=t.image,o=t.verifyButton,s=e.success,a=e.error;if("string"==typeof r&&!(r=document.getElementById(r)))throw new Error("textInput with id "+r+" not found");if("string"==typeof i&&!(i=document.getElementById(i)))throw new Error("image with id "+i+" not found");if("string"==typeof o&&!(o=document.getElementById(o)))throw new Error("verifyButton with id "+o+" not found");this.__refresh=function(){return n.refresh().then(function(t){i.src=t,r&&(r.value="",r.focus())}).catch(function(t){return console.warn("refresh captcha fail: "+t.message)})},i&&(this.__image=i,i.src=this.url,i.addEventListener("click",this.__refresh)),this.__verify=function(){var t=r.value;n.verify(t).catch(function(t){throw n.__refresh(),t}).then(s,a).catch(function(t){return console.warn("verify captcha fail: "+t.message)})},r&&o&&(this.__verifyButton=o,o.addEventListener("click",this.__verify))},t.Captcha.prototype.unbind=function(){this.__image&&this.__image.removeEventListener("click",this.__refresh),this.__verifyButton&&this.__verifyButton.removeEventListener("click",this.__verify)},t.Captcha.request=function(e,n){var r=new t.Captcha(e,n);return r.refresh().then(function(){return r})}}},function(t,e,n){"use strict";var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(0),s=n(14),a=s._request,u=s.request;t.exports=function(t){t.Cloud=t.Cloud||{},o.extend(t.Cloud,{run:function(e,n,r){return u({service:"engine",method:"POST",path:"/functions/"+e,data:t._encode(n,null,!0),authOptions:r}).then(function(e){return t._decode(e).result})},rpc:function(e,n,r){return o.isArray(n)?i.default.reject(new Error("Can't pass Array as the param of rpc function in JavaScript SDK.")):u({service:"engine",method:"POST",path:"/call/"+e,data:t._encodeObjectOrArray(n),authOptions:r}).then(function(e){return t._decode(e).result})},getServerDate:function(){return a("date",null,null,"GET").then(function(e){return t._decode(e)})},requestSmsCode:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o.isString(t)&&(t={mobilePhoneNumber:t}),!t.mobilePhoneNumber)throw new Error("Missing mobilePhoneNumber.");return e.validateToken&&(t=o.extend({},t,{validate_token:e.validateToken})),a("requestSmsCode",null,null,"POST",t,e)},verifySmsCode:function(t,e){if(!t)throw new Error("Missing sms code.");var n={};return o.isString(e)&&(n.mobilePhoneNumber=e),a("verifySmsCode",t,null,"POST",n)},_requestCaptcha:function(t,e){return a("requestCaptcha",null,null,"GET",t,e).then(function(t){var e=t.captcha_url;return{captchaToken:t.captcha_token,url:e}})},requestCaptcha:t.Captcha.request,verifyCaptcha:function(t,e){return a("verifyCaptcha",null,null,"POST",{captcha_code:t,captcha_token:e}).then(function(t){return t.validate_token})}})}},function(t,e,n){"use strict";var r=n(14).request;t.exports=function(t){t.Installation=t.Object.extend("_Installation"),t.Push=t.Push||{},t.Push.send=function(t,e){if(t.where&&(t.where=t.where._getParams().where),t.where&&t.cql)throw new Error("Both where and cql can't be set");if(t.push_time&&(t.push_time=t.push_time.toJSON()),t.expiration_time&&(t.expiration_time=t.expiration_time.toJSON()),t.expiration_time&&t.expiration_interval)throw new Error("Both expiration_time and expiration_interval can't be set");return r({service:"push",method:"POST",path:"/push",data:t,authOptions:e})}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(3),o=r(i),s=n(23),a=r(s),u=n(0),c=n(14)._request,f=n(19),l=f.getSessionToken;t.exports=function(t){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(e)?t.User._fetchUserBySessionToken(l(e)):t.User.currentAsync()},n=function(n){return e(n).then(function(e){return t.Object.createWithoutData("_User",e.id)._toPointer()})};t.Status=function(t,e){return this.data={},this.inboxType="default",this.query=null,t&&"object"===(void 0===t?"undefined":(0,a.default)(t))?this.data=t:(t&&(this.data.image=t),e&&(this.data.message=e)),this},u.extend(t.Status.prototype,{get:function(t){return this.data[t]},set:function(t,e){return this.data[t]=e,this},destroy:function(t){return this.id?c("statuses",null,this.id,"DELETE",t):o.default.reject(new Error("The status id is not exists."))},toObject:function(){return this.id?t.Object.createWithoutData("_Status",this.id):null},_getDataJSON:function(){var e=u.clone(this.data);return t._encode(e)},send:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!l(r)&&!t.User.current())throw new Error("Please signin an user.");return this.query?n(r).then(function(t){var n=e.query._getParams();n.className=e.query.className;var i={};return i.query=n,e.data=e.data||{},e.data.source=e.data.source||t,i.data=e._getDataJSON(),i.inboxType=e.inboxType||"default",c("statuses",null,null,"POST",i,r)}).then(function(n){return e.id=n.objectId,e.createdAt=t._parseDate(n.createdAt),e}):t.Status.sendStatusToFollowers(this,r)},_finishFetch:function(e){this.id=e.objectId,this.createdAt=t._parseDate(e.createdAt),this.updatedAt=t._parseDate(e.updatedAt),this.messageId=e.messageId,delete e.messageId,delete e.objectId,delete e.createdAt,delete e.updatedAt,this.data=t._decode(e)}}),t.Status.sendStatusToFollowers=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!l(r)&&!t.User.current())throw new Error("Please signin an user.");return n(r).then(function(n){var i={};i.className="_Follower",i.keys="follower",i.where={user:n};var o={};return o.query=i,e.data=e.data||{},e.data.source=e.data.source||n,o.data=e._getDataJSON(),o.inboxType=e.inboxType||"default",c("statuses",null,null,"POST",o,r).then(function(n){return e.id=n.objectId,e.createdAt=t._parseDate(n.createdAt),e})})},t.Status.sendPrivateStatus=function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!l(i)&&!t.User.current())throw new Error("Please signin an user.");if(!r)throw new Error("Invalid target user.");var o=u.isString(r)?r:r.id;if(!o)throw new Error("Invalid target user.");return n(i).then(function(n){var r={};r.className="_User",r.where={objectId:o};var s={};return s.query=r,e.data=e.data||{},e.data.source=e.data.source||n,s.data=e._getDataJSON(),s.inboxType="private",e.inboxType="private",c("statuses",null,null,"POST",s,i).then(function(n){return e.id=n.objectId,e.createdAt=t._parseDate(n.createdAt),e})})},t.Status.countUnreadStatuses=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u.isString(r)||(i=r),!l(i)&&null==n&&!t.User.current())throw new Error("Please signin an user or pass the owner objectId.");return o.default.resolve(n||e(i)).then(function(e){var n={};return n.inboxType=t._encode(r),n.owner=t._encode(e),c("subscribe/statuses/count",null,null,"GET",n,i)})},t.Status.resetUnreadCount=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u.isString(r)||(i=r),!l(i)&&null==n&&!t.User.current())throw new Error("Please signin an user or pass the owner objectId.");return o.default.resolve(n||e(i)).then(function(e){var n={};return n.inboxType=t._encode(r),n.owner=t._encode(e),c("subscribe/statuses/resetUnreadCount",null,null,"POST",n,i)})},t.Status.statusQuery=function(e){var n=new t.Query("_Status");return e&&n.equalTo("source",e),n},t.InboxQuery=t.Query._extend({_objectClass:t.Status,_sinceId:0,_maxId:0,_inboxType:"default",_owner:null,_newObject:function(){return new t.Status},_createRequest:function(e,n){return t.InboxQuery.__super__._createRequest.call(this,e,n,"/subscribe/statuses")},sinceId:function(t){return this._sinceId=t,this},maxId:function(t){return this._maxId=t,this},owner:function(t){return this._owner=t,this},inboxType:function(t){return this._inboxType=t,this},_getParams:function(){var e=t.InboxQuery.__super__._getParams.call(this);return e.owner=t._encode(this._owner),e.inboxType=t._encode(this._inboxType),e.sinceId=t._encode(this._sinceId),e.maxId=t._encode(this._maxId),e}}),t.Status.inboxQuery=function(e,n){var r=new t.InboxQuery(t.Status);return e&&(r._owner=e),n&&(r._inboxType=n),r}}},function(t,e,n){"use strict";var r=n(21),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(0),s=n(14)._request;t.exports=function(t){t.SearchSortBuilder=function(){this._sortFields=[]},o.extend(t.SearchSortBuilder.prototype,{_addField:function(t,e,n,r){var i={};return i[t]={order:e||"asc",mode:n||"avg",missing:"_"+(r||"last")},this._sortFields.push(i),this},ascending:function(t,e,n){return this._addField(t,"asc",e,n)},descending:function(t,e,n){return this._addField(t,"desc",e,n)},whereNear:function(t,e,n){n=n||{};var r={},i={lat:e.latitude,lon:e.longitude},o={order:n.order||"asc",mode:n.mode||"avg",unit:n.unit||"km"};return o[t]=i,r._geo_distance=o,this._sortFields.push(r),this},build:function(){return(0,i.default)(t._encode(this._sortFields))}}),t.SearchQuery=t.Query._extend({_sid:null,_hits:0,_queryString:null,_highlights:null,_sortBuilder:null,_clazz:null,constructor:function(e){e?this._clazz=e:e="__INVALID_CLASS",t.Query.call(this,e)},_createRequest:function(t,e){return s("search/select",null,null,"GET",t||this._getParams(),e)},sid:function(t){return this._sid=t,this},queryString:function(t){return this._queryString=t,this},highlights:function(t){var e;return e=t&&o.isString(t)?o.toArray(arguments):t,this._highlights=e,this},sortBy:function(t){return this._sortBuilder=t,this},hits:function(){return this._hits||(this._hits=0),this._hits},_processResult:function(t){return delete t.className,delete t._app_url,delete t._deeplink,t},hasMore:function(){return!this._hitEnd},reset:function(){this._hitEnd=!1,this._sid=null,this._hits=0},find:function(t){var e=this;return this._createRequest(void 0,t).then(function(t){return t.sid?(e._oldSid=e._sid,e._sid=t.sid):(e._sid=null,e._hitEnd=!0),e._hits=t.hits||0,o.map(t.results,function(n){n.className&&(t.className=n.className);var r=e._newObject(t);return r.appURL=n._app_url,r._finishFetch(e._processResult(n),!0),r})})},_getParams:function(){var e=t.SearchQuery.__super__._getParams.call(this);if(delete e.where,this._clazz&&(e.clazz=this.className),this._sid&&(e.sid=this._sid),!this._queryString)throw new Error("Please set query string.");if(e.q=this._queryString,this._highlights&&(e.highlights=this._highlights.join(",")),this._sortBuilder&&e.order)throw new Error("sort and order can not be set at same time.");return this._sortBuilder&&(e.sort=this._sortBuilder.build()),e}})}},function(t,e,n){"use strict";var r=n(3),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(0),s=n(28),a=n(14),u=a.request;t.exports=function(t){t.Insight=t.Insight||{},o.extend(t.Insight,{startJob:function(e,n){if(!e||!e.sql)throw new Error("Please provide the sql to run the job.");var r={jobConfig:e,appId:t.applicationId};return u({path:"/bigquery/jobs",method:"POST",data:t._encode(r,null,!0),authOptions:n,signKey:!1}).then(function(e){return t._decode(e).id})},on:function(t,e){}}),t.Insight.JobQuery=function(t,e){if(!t)throw new Error("Please provide the job id.");this.id=t,this.className=e,this._skip=0,this._limit=100},o.extend(t.Insight.JobQuery.prototype,{skip:function(t){return this._skip=t,this},limit:function(t){return this._limit=t,this},find:function(t){var e={skip:this._skip,limit:this._limit};return u({path:"/bigquery/jobs/"+this.id,method:"GET",query:e,authOptions:t,signKey:!1}).then(function(t){return t.error?i.default.reject(new s(t.code,t.error)):i.default.resolve(t)})}})}},function(t,e,n){"use strict";var r=n(0),i=n(14),o=i.request,s=n(19),a=s.getSessionToken;t.exports=function(t){t.Friendship={request:function(e,n){if(!t.User.current())throw new Error("Please signin an user.");var i=void 0,s=void 0;e.friend?(i=e.friend,s=e.attributes):i=e;var a=r.isString(i)?t.Object.createWithoutData("_User",i):i;return o({method:"POST",path:"/users/friendshipRequests",data:t._encode({user:t.User.current(),friend:a,friendship:s}),authOptions:n})},acceptRequest:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a(n)&&!t.User.current())throw new Error("Please signin an user.");var i=void 0,s=void 0;e.request?(i=e.request,s=e.attributes):i=e;var u=r.isString(i)?i:i.id;return o({method:"PUT",path:"/users/friendshipRequests/"+u+"/accept",data:{friendship:t._encode(s)},authOptions:n})},declineRequest:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a(n)&&!t.User.current())throw new Error("Please signin an user.");var i=r.isString(e)?e:e.id;return o({method:"PUT",path:"/users/friendshipRequests/"+i+"/decline",authOptions:n})}}}},function(t,e,n){"use strict";var r=n(21),i=function(t){return t&&t.__esModule?t:{default:t}}(r),o=n(0),s=n(14),a=s._request,u=n(42),c=function(t){return"string"==typeof t?t:"function"==typeof t.getPayload?(0,i.default)(t.getPayload()):(0,i.default)(t)};t.exports=u.Object.extend("_Conversation",{constructor:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u.Object.prototype.constructor.call(this,null,null),this.set("name",t),void 0!==e.isSystem&&this.set("sys",!!e.isSystem),void 0!==e.isTransient&&this.set("tr",!!e.isTransient)},getCreator:function(){return this.get("c")},getLastMessageAt:function(){return this.get("lm")},getMembers:function(){return this.get("m")},addMember:function(t){return this.add("m",t)},getMutedMembers:function(){return this.get("mu")},getName:function(){return this.get("name")},isTransient:function(){return this.get("tr")},isSystem:function(){return this.get("sys")},send:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={from_peer:t,conv_id:this.id,transient:!1,message:c(e)};return void 0!==n.toClients&&(i.to_peers=n.toClients),void 0!==n.transient&&(i.transient=!!n.transient),void 0!==n.pushData&&(i.push_data=n.pushData),a("rtm","messages",null,"POST",i,r)},broadcast:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={from_peer:t,conv_id:this.id,message:c(e)};if(void 0!==n.pushData&&(i.push=n.pushData),void 0!==n.validTill){var s=n.validTill;o.isDate(s)&&(s=s.getTime()),n.valid_till=s}return a("rtm","broadcast",null,"POST",i,r)}})},function(t,e,n){"use strict";function r(t){var e=t.name,n=t.value,r=t.version;this.name=e,this.value=n,this.version=r}var i=n(3),o=function(t){return t&&t.__esModule?t:{default:t}}(i),s=n(0),a=n(14),u=a.request,c=n(19),f=c.ensureArray,l=c.parseDate,h=n(42);h.LeaderboardVersionChangeInterval={NEVER:"never",DAY:"day",WEEK:"week",MONTH:"month"},h.LeaderboardOrder={ASCENDING:"ascending",DESCENDING:"descending"},h.LeaderboardUpdateStrategy={BETTER:"better",LAST:"last",SUM:"sum"};var d=function(t){var e=h._decode(t);return new r({name:e.statisticName,value:e.statisticValue,version:e.version})};h.Leaderboard=function(t){this.statisticName=t,this.order=void 0,this.updateStrategy=void 0,this.versionChangeInterval=void 0,this.version=void 0,this.nextResetAt=void 0,this.createdAt=void 0};var p=h.Leaderboard;h.Leaderboard.createWithoutData=function(t){return new p(t)},h.Leaderboard.createLeaderboard=function(t,e){var n=t.statisticName,r=t.order,i=t.versionChangeInterval,o=t.updateStrategy;return u({method:"POST",path:"/leaderboard/leaderboards",data:{statisticName:n,order:r,versionChangeInterval:i,updateStrategy:o},authOptions:e}).then(function(t){return new p(n)._finishFetch(t)})},h.Leaderboard.getLeaderboard=function(t,e){return p.createWithoutData(t).fetch(e)},h.Leaderboard.getStatistics=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.statisticNames,r=arguments[2];return o.default.resolve().then(function(){if(!t||!t.id)throw new Error("user must be an AV.User");return u({method:"GET",path:"/leaderboard/users/"+t.id+"/statistics",query:{statistics:n?f(n).join(","):void 0},authOptions:r}).then(function(t){return t.results.map(d)})})},h.Leaderboard.updateStatistics=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o.default.resolve().then(function(){if(!t||!t.id)throw new Error("user must be an AV.User");var r=s.map(e,function(t,e){return{statisticName:e,statisticValue:t}}),i=n.overwrite;return u({method:"POST",path:"/leaderboard/users/"+t.id+"/statistics",query:{overwrite:i?1:void 0},data:r,authOptions:n}).then(function(t){return t.results.map(d)})})},h.Leaderboard.deleteStatistics=function(t,e,n){return o.default.resolve().then(function(){if(!t||!t.id)throw new Error("user must be an AV.User");return u({method:"DELETE",path:"/leaderboard/users/"+t.id+"/statistics",query:{statistics:f(e).join(",")},authOptions:n}).then(function(){})})},s.extend(p.prototype,{_finishFetch:function(t){var e=this;return s.forEach(t,function(t,n){"updatedAt"!==n&&"objectId"!==n&&("expiredAt"===n&&(n="nextResetAt"),"createdAt"===n&&(t=l(t)),t&&"Date"===t.__type&&(t=l(t.iso)),e[n]=t)}),this},fetch:function(t){var e=this;return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName,authOptions:t}).then(function(t){return e._finishFetch(t)})},count:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.version,n=arguments[1];return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName+"/ranks",query:{count:1,limit:0,version:e},authOptions:n}).then(function(t){return t.count})},_getResults:function(t,e,n){var r=t.skip,i=t.limit,o=t.selectUserKeys,a=t.includeUserKeys,c=t.includeStatistics,l=t.version;return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName+"/ranks"+(n?"/"+n:""),query:{skip:r,limit:i,selectUserKeys:s.union(f(o),f(a)).join(",")||void 0,includeUser:a?f(a).join(","):void 0,includeStatistics:c?f(c).join(","):void 0,version:l},authOptions:e}).then(function(t){return t.results.map(function(t){var e=h._decode(t),n=e.user,r=e.statisticValue,i=e.rank,o=e.statistics;return{user:n,value:r,rank:i,includedStatistics:(void 0===o?[]:o).map(d)}})})},getResults:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.skip,n=t.limit,r=t.selectUserKeys,i=t.includeUserKeys,o=t.includeStatistics,s=t.version,a=arguments[1];return this._getResults({skip:e,limit:n,selectUserKeys:r,includeUserKeys:i,includeStatistics:o,version:s},a)},getResultsAroundUser:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];if(t&&"string"!=typeof t.id)return this.getResultsAroundUser(void 0,t,e);var r=e.limit,i=e.selectUserKeys,o=e.includeUserKeys,s=e.includeStatistics,a=e.version;return this._getResults({limit:r,selectUserKeys:i,includeUserKeys:o,includeStatistics:s,version:a},n,t?t.id:"self")},_update:function(t,e){var n=this;return u({method:"PUT",path:"/leaderboard/leaderboards/"+this.statisticName,data:t,authOptions:e}).then(function(t){return n._finishFetch(t)})},updateVersionChangeInterval:function(t,e){return this._update({versionChangeInterval:t},e)},updateUpdateStrategy:function(t,e){return this._update({updateStrategy:t},e)},reset:function(t){var e=this;return u({method:"PUT",path:"/leaderboard/leaderboards/"+this.statisticName+"/incrementVersion",authOptions:t}).then(function(t){return e._finishFetch(t)})},destroy:function(t){return h.request({method:"DELETE",path:"/leaderboard/leaderboards/"+this.statisticName,authOptions:t}).then(function(){})},getArchives:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.skip,r=e.limit,i=arguments[1];return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName+"/archives",query:{skip:n,limit:r},authOptions:i}).then(function(e){return e.results.map(function(e){var n=e.version,r=e.status,i=e.url,o=e.activatedAt,s=e.deactivatedAt;return{statisticName:t.statisticName,version:n,status:r,url:i,activatedAt:l(o.iso),deactivatedAt:l(s.iso)}})})}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(367);Object.defineProperty(e,"request",{enumerable:!0,get:function(){return r.request}}),Object.defineProperty(e,"upload",{enumerable:!0,get:function(){return r.upload}});var i=window.localStorage,o=window.WebSocket,s={name:"Browser"};e.WebSocket=o,e.platformInfo=s,e.storage=i},function(t,e,n){"use strict";function r(t){return{ok:t.ok,status:t.status,headers:t.header,data:t.body}}Object.defineProperty(e,"__esModule",{value:!0}),e.upload=e.request=void 0;var i=n(368),o=n(369);e.request=function(t,e){void 0===e&&(e={});var n=e.method,s=void 0===n?"GET":n,a=e.data,u=e.headers,c=e.onprogress,f=e.signal;if(null===f||void 0===f?void 0:f.aborted)return Promise.reject(new i.AbortError("Request aborted"));var l=o(s,t);return u&&l.set(u),c&&l.on("progress",c),new Promise(function(t,e){var n=function(){e(new i.AbortError("Request aborted")),l.abort()};null===f||void 0===f||f.addEventListener("abort",n),l.send(a).then(function(e){return t(r(e))}).catch(function(n){n.response?t(r(n.response)):e(n)}).finally(function(){return null===f||void 0===f?void 0:f.removeEventListener("abort",n)})})},e.upload=function(t,e,n){void 0===n&&(n={});var s=n.method,a=void 0===s?"POST":s,u=n.data,c=n.headers,f=n.onprogress,l=n.signal;if(null===l||void 0===l?void 0:l.aborted)return Promise.reject(new i.AbortError("Request aborted"));var h=o(a,t).attach(e.field,e.data,e.name);return u&&h.field(u),c&&h.set(c),f&&h.on("progress",f),new Promise(function(t,e){var n=function(){e(new i.AbortError("Request aborted")),h.abort()};null===l||void 0===l||l.addEventListener("abort",n),h.then(function(e){return t(r(e))}).catch(function(n){n.response?t(r(n.response)):e(n)}).finally(function(){return null===l||void 0===l?void 0:l.removeEventListener("abort",n)})})}},function(t,e,n){"use strict";function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"AbortError",function(){return o});/*! *****************************************************************************
8Copyright (c) Microsoft Corporation.
9
10Permission to use, copy, modify, and/or distribute this software for any
11purpose with or without fee is hereby granted.
12
13THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19PERFORMANCE OF THIS SOFTWARE.
20***************************************************************************** */
21var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="AbortError",e}return r(e,t),e}(Error)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){"@babel/helpers - typeof";return(i="function"==typeof _.default&&"symbol"===(0,g.default)(m.default)?function(t){return void 0===t?"undefined":(0,g.default)(t)}:function(t){return t&&"function"==typeof _.default&&t.constructor===_.default&&t!==_.default.prototype?"symbol":void 0===t?"undefined":(0,g.default)(t)})(t)}function o(){}function s(t){if(!T(t))return t;var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&a(e,n,t[n]);return e.join("&")}function a(t,e,n){if(void 0!==n){if(null===n)return void t.push(encodeURI(e));if(Array.isArray(n))n.forEach(function(n){a(t,e,n)});else if(T(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&a(t,"".concat(e,"[").concat(r,"]"),n[r]);else t.push(encodeURI(e)+"="+encodeURIComponent(n))}}function u(t){for(var e,n,r={},i=t.split("&"),o=0,s=i.length;o<s;++o)e=i[o],n=e.indexOf("="),-1===n?r[decodeURIComponent(e)]="":r[decodeURIComponent(e.slice(0,n))]=decodeURIComponent(e.slice(n+1));return r}function c(t){for(var e,n,r,i,o=t.split(/\r?\n/),s={},a=0,u=o.length;a<u;++a)n=o[a],-1!==(e=n.indexOf(":"))&&(r=n.slice(0,e).toLowerCase(),i=I(n.slice(e+1)),s[r]=i);return s}function f(t){return/[\/+]json($|[^-\w])/.test(t)}function l(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=c(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function h(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 l(n)}catch(e){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",e);var r;try{n._isResponseOK(e)||(r=new Error(e.statusText||e.text||"Unsuccessful HTTP response"))}catch(t){r=t}r?(r.original=t,r.response=e,r.status=e.status,n.callback(r,e)):n.callback(null,e)})}function d(t,e,n){var r=j("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}var p,v=n(73),m=r(v),y=n(23),g=r(y),b=n(44),_=r(b);"undefined"!=typeof window?p=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),p=void 0):p=self;var w=n(370),E=n(371),O=n(372),T=n(190),S=n(373),A=n(375);t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1===arguments.length?new e.Request("GET",t):new e.Request(t,n)},e=t.exports;var j=e;e.Request=h,j.getXHR=function(){if(p.XMLHttpRequest&&(!p.location||"file:"!==p.location.protocol||!p.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 new Error("Browser-only version of superagent could not find XHR")};var I="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};j.serializeObject=s,j.parseString=u,j.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},j.serialize={"application/x-www-form-urlencoded":s,"application/json":E},j.parse={"application/x-www-form-urlencoded":u,"application/json":JSON.parse},S(l.prototype),l.prototype._parseBody=function(t){var e=j.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&f(this.type)&&(e=j.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},l.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot ".concat(e," ").concat(n," (").concat(this.status,")"),i=new Error(r);return i.status=this.status,i.method=e,i.url=n,i},j.Response=l,w(h.prototype),O(h.prototype),h.prototype.type=function(t){return this.set("Content-Type",j.types[t]||t),this},h.prototype.accept=function(t){return this.set("Accept",j.types[t]||t),this},h.prototype.auth=function(t,e,n){1===arguments.length&&(e=""),"object"===i(e)&&null!==e&&(n=e,e=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var r=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,n,r)},h.prototype.query=function(t){return"string"!=typeof t&&(t=s(t)),t&&this._query.push(t),this},h.prototype.attach=function(t,e,n){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},h.prototype._getFormData=function(){return this._formData||(this._formData=new p.FormData),this._formData},h.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},h.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)},h.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},h.prototype.ca=h.prototype.agent,h.prototype.buffer=h.prototype.ca,h.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},h.prototype.pipe=h.prototype.write,h.prototype._isHost=function(t){return t&&"object"===i(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},h.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||o,this._finalizeQueryString(),this._end()},h.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},h.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=j.getXHR();var e=this.xhr,n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(t._uploadTimeoutTimer)),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.addEventListener("progress",r.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",r.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],o=this._serializer||j.serialize[i?i.split(";")[0]:""];!o&&f(i)&&(o=j.serialize["application/json"]),o&&(n=o(n))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&e.setRequestHeader(s,this.header[s]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===n?null:n)},j.agent=function(){return new A},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(t){A.prototype[t.toLowerCase()]=function(e,n){var r=new j.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}}),A.prototype.del=A.prototype.delete,j.get=function(t,e,n){var r=j("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},j.head=function(t,e,n){var r=j("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},j.options=function(t,e,n){var r=j("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},j.del=d,j.delete=d,j.patch=function(t,e,n){var r=j("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},j.post=function(t,e,n){var r=j("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},j.put=function(t,e,n){var r=j("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},function(t,e,n){function r(t){if(t)return i(t)}function i(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}t.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,i=0;i<n.length;i++)if((r=n[i])===e||r.fn===e){n.splice(i,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++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}},function(t,e){function n(t,e,n){r(t,"",[],void 0);var i;for(i=0===c.length?JSON.stringify(t,e,n):JSON.stringify(t,a(e),n);0!==u.length;){var o=u.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return i}function r(t,e,n,i){var o;if("object"==typeof t&&null!==t){for(o=0;o<n.length;o++)if(n[o]===t){var s=Object.getOwnPropertyDescriptor(i,e);return void(void 0!==s.get?s.configurable?(Object.defineProperty(i,e,{value:"[Circular]"}),u.push([i,e,t,s])):c.push([t,e]):(i[e]="[Circular]",u.push([i,e,t])))}if(n.push(t),Array.isArray(t))for(o=0;o<t.length;o++)r(t[o],o,n,t);else{var a=Object.keys(t);for(o=0;o<a.length;o++){var f=a[o];r(t[f],f,n,t)}}n.pop()}}function i(t,e){return t<e?-1:t>e?1:0}function o(t,e,n){var r,i=s(t,"",[],void 0)||t;for(r=0===c.length?JSON.stringify(i,e,n):JSON.stringify(i,a(e),n);0!==u.length;){var o=u.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return r}function s(t,e,n,r){var o;if("object"==typeof t&&null!==t){for(o=0;o<n.length;o++)if(n[o]===t){var a=Object.getOwnPropertyDescriptor(r,e);return void(void 0!==a.get?a.configurable?(Object.defineProperty(r,e,{value:"[Circular]"}),u.push([r,e,t,a])):c.push([t,e]):(r[e]="[Circular]",u.push([r,e,t])))}if("function"==typeof t.toJSON)return;if(n.push(t),Array.isArray(t))for(o=0;o<t.length;o++)s(t[o],o,n,t);else{var f={},l=Object.keys(t).sort(i);for(o=0;o<l.length;o++){var h=l[o];s(t[h],h,n,t),f[h]=t[h]}if(void 0===r)return f;u.push([r,e,t]),r[e]=f}n.pop()}}function a(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(c.length>0)for(var r=0;r<c.length;r++){var i=c[r];if(i[1]===e&&i[0]===n){n="[Circular]",c.splice(r,1);break}}return t.call(this,e,n)}}t.exports=n,n.default=n,n.stable=o,n.stableStringify=o;var u=[],c=[]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){"@babel/helpers - typeof";return(i="function"==typeof p.default&&"symbol"===(0,h.default)(f.default)?function(t){return void 0===t?"undefined":(0,h.default)(t)}:function(t){return t&&"function"==typeof p.default&&t.constructor===p.default&&t!==p.default.prototype?"symbol":void 0===t?"undefined":(0,h.default)(t)})(t)}function o(t){if(t)return s(t)}function s(t){for(var e in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,e)&&(t[e]=o.prototype[e]);return t}var a=n(3),u=r(a),c=n(73),f=r(c),l=n(23),h=r(l),d=n(44),p=r(d),v=n(190);t.exports=o,o.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},o.prototype.parse=function(t){return this._parser=t,this},o.prototype.responseType=function(t){return this._responseType=t,this},o.prototype.serialize=function(t){return this._serializer=t,this},o.prototype.timeout=function(t){if(!t||"object"!==i(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},o.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var m=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];o.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!==e.status)return!0;if(t){if(t.code&&m.includes(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},o.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},o.prototype.then=function(t,e){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new u.default(function(t,e){r.on("abort",function(){if(!(n._maxRetries&&n._maxRetries>n._retries)){if(n.timedout&&n.timedoutError)return void e(n.timedoutError);var t=new Error("Aborted");t.code="ABORTED",t.status=n.status,t.method=n.method,t.url=n.url,e(t)}}),r.end(function(n,r){n?e(n):t(r)})})}return this._fullfilledPromise.then(t,e)},o.prototype.catch=function(t){return this.then(void 0,t)},o.prototype.use=function(t){return t(this),this},o.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},o.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},o.prototype.get=function(t){return this._header[t.toLowerCase()]},o.prototype.getHeader=o.prototype.get,o.prototype.set=function(t,e){if(v(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},o.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},o.prototype.field=function(t,e){if(null===t||void 0===t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(v(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(t,e[r]);return this}if(null===e||void 0===e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},o.prototype.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)},o.prototype._auth=function(t,e,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},o.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},o.prototype.redirects=function(t){return this._maxRedirects=t,this},o.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},o.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},o.prototype.send=function(t){var e=v(t),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&v(this._data))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._data[r]=t[r]);else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(n||this.type("json"),this)},o.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},o.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.slice(e+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,e)+"?"+n.join("&")}}},o.prototype._appendQueryString=function(){console.warn("Unsupported")},o.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},o.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(t,e,n){"use strict";function r(t){if(t)return i(t)}function i(t){for(var e in r.prototype)Object.prototype.hasOwnProperty.call(r.prototype,e)&&(t[e]=r.prototype[e]);return t}var o=n(374);t.exports=r,r.prototype.get=function(t){return this.header[t.toLowerCase()]},r.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=o.type(e);var n=o.params(e);for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(this[r]=n[r]);this.links={};try{t.link&&(this.links=o.parseLinks(t.link))}catch(t){}},r.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}},function(t,e,n){"use strict";e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){return t.split(/ *; */).reduce(function(t,e){var n=e.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(t[r]=i),t},{})},e.parseLinks=function(t){return t.split(/ *, */).reduce(function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t},{})},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){return u(t)||a(t)||s(t)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?(0,m.default)(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function a(t){if(void 0!==p.default&&(0,h.default)(Object(t)))return(0,m.default)(t)}function u(t){if(Array.isArray(t))return c(t)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(){this._defaults=[]}var l=n(112),h=r(l),d=n(44),p=r(d),v=n(191),m=r(v);["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach(function(t){f.prototype[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this._defaults.push({fn:t,args:n}),this}}),f.prototype._setDefaults=function(t){this._defaults.forEach(function(e){t[e.fn].apply(t,i(e.args))})},t.exports=f},function(t,e,n){n(35),n(377),t.exports=n(1).Array.from},function(t,e,n){"use strict";var r=n(22),i=n(4),o=n(30),s=n(121),a=n(122),u=n(61),c=n(192),f=n(90);i(i.S+i.F*!n(128)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,l,h=o(t),d="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,m=void 0!==v,y=0,g=f(h);if(m&&(v=r(v,p>2?arguments[2]:void 0,2)),void 0==g||d==Array&&a(g))for(e=u(h.length),n=new d(e);e>y;y++)c(n,y,m?v(h[y],y):h[y]);else for(l=g.call(h),n=new d;!(i=l.next()).done;y++)c(n,y,m?s(l,v,[i.value,y],!0):i.value);return n.length=y,n}})},function(t,e,n){"use strict";var r=n(113),i=r.Realtime,o=r.setAdapters,s=n(461),a=s.LiveQueryPlugin;i.__preRegisteredPlugins=[a],t.exports=function(t){t._sharedConfig.liveQueryRealtime=i;var e=t.setAdapters;return t.setAdapters=function(t){e(t),o(t)},t}},function(t,e,n){"use strict";(function(t){function r(t){return t&&t.__esModule?t:{default:t}}function i(t){return t&&"object"===(void 0===t?"undefined":(0,D.default)(t))&&"default"in t?t.default:t}function o(t,e){var n=(0,C.default)(t);if(I.default){var r=(0,I.default)(t);e&&(r=r.filter(function(e){return(0,A.default)(t,e).enumerable})),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){Y(t,e,n[e])}):T.default?(0,E.default)(t,(0,T.default)(n)):o(Object(n)).forEach(function(e){(0,_.default)(t,e,(0,A.default)(n,e))})}return t}function a(t,e){var n=(0,C.default)(t);if(I.default){var r=(0,I.default)(t);e&&(r=r.filter(function(e){return(0,A.default)(t,e).enumerable})),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){Y(t,e,n[e])}):T.default?(0,E.default)(t,(0,T.default)(n)):a(Object(n)).forEach(function(e){(0,_.default)(t,e,(0,A.default)(n,e))})}return t}function c(t,e){var n=(0,C.default)(t);if(I.default){var r=(0,I.default)(t);e&&(r=r.filter(function(e){return(0,A.default)(t,e).enumerable})),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach(function(e){Y(t,e,n[e])}):T.default?(0,E.default)(t,(0,T.default)(n)):c(Object(n)).forEach(function(e){(0,_.default)(t,e,(0,A.default)(n,e))})}return t}var l=n(193),h=r(l),d=n(21),p=r(d),v=n(390),m=r(v),y=n(3),g=r(y),b=n(71),_=r(b),w=n(396),E=r(w),O=n(399),T=r(O),S=n(188),A=r(S),j=n(198),I=r(j),x=n(107),C=r(x),N=n(44),P=r(N),R=n(199),k=r(R),L=n(406),U=r(L),M=n(23),D=r(M);Object.defineProperty(e,"__esModule",{value:!0});var F=i(n(409)),q=i(n(413)),B=i(n(414)),V=i(n(416)),W=i(n(417)),Y=i(n(420)),z=i(n(421)),Q=i(n(423)),G=i(n(424)),J=i(n(34)),K=i(n(425)),H=i(n(204)),$=i(n(452)),X=i(n(455)),Z=i(n(456)),tt=i(n(457)),et=i(n(458)),nt=i(n(459)),rt=n(185),it=F.newBuilder({}).import({package:"push_server.messages2",syntax:"proto2",options:{objc_class_prefix:"AVIM"},messages:[{name:"JsonObjectMessage",syntax:"proto2",fields:[{rule:"required",type:"string",name:"data",id:1}]},{name:"UnreadTuple",syntax:"proto2",fields:[{rule:"required",type:"string",name:"cid",id:1},{rule:"required",type:"int32",name:"unread",id:2},{rule:"optional",type:"string",name:"mid",id:3},{rule:"optional",type:"int64",name:"timestamp",id:4},{rule:"optional",type:"string",name:"from",id:5},{rule:"optional",type:"string",name:"data",id:6},{rule:"optional",type:"int64",name:"patchTimestamp",id:7},{rule:"optional",type:"bool",name:"mentioned",id:8},{rule:"optional",type:"bytes",name:"binaryMsg",id:9},{rule:"optional",type:"int32",name:"convType",id:10}]},{name:"LogItem",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"from",id:1},{rule:"optional",type:"string",name:"data",id:2},{rule:"optional",type:"int64",name:"timestamp",id:3},{rule:"optional",type:"string",name:"msgId",id:4},{rule:"optional",type:"int64",name:"ackAt",id:5},{rule:"optional",type:"int64",name:"readAt",id:6},{rule:"optional",type:"int64",name:"patchTimestamp",id:7},{rule:"optional",type:"bool",name:"mentionAll",id:8},{rule:"repeated",type:"string",name:"mentionPids",id:9},{rule:"optional",type:"bool",name:"bin",id:10},{rule:"optional",type:"int32",name:"convType",id:11}]},{name:"ConvMemberInfo",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"pid",id:1},{rule:"optional",type:"string",name:"role",id:2},{rule:"optional",type:"string",name:"infoId",id:3}]},{name:"DataCommand",syntax:"proto2",fields:[{rule:"repeated",type:"string",name:"ids",id:1},{rule:"repeated",type:"JsonObjectMessage",name:"msg",id:2},{rule:"optional",type:"bool",name:"offline",id:3}]},{name:"SessionCommand",syntax:"proto2",fields:[{rule:"optional",type:"int64",name:"t",id:1},{rule:"optional",type:"string",name:"n",id:2},{rule:"optional",type:"string",name:"s",id:3},{rule:"optional",type:"string",name:"ua",id:4},{rule:"optional",type:"bool",name:"r",id:5},{rule:"optional",type:"string",name:"tag",id:6},{rule:"optional",type:"string",name:"deviceId",id:7},{rule:"repeated",type:"string",name:"sessionPeerIds",id:8},{rule:"repeated",type:"string",name:"onlineSessionPeerIds",id:9},{rule:"optional",type:"string",name:"st",id:10},{rule:"optional",type:"int32",name:"stTtl",id:11},{rule:"optional",type:"int32",name:"code",id:12},{rule:"optional",type:"string",name:"reason",id:13},{rule:"optional",type:"string",name:"deviceToken",id:14},{rule:"optional",type:"bool",name:"sp",id:15},{rule:"optional",type:"string",name:"detail",id:16},{rule:"optional",type:"int64",name:"lastUnreadNotifTime",id:17},{rule:"optional",type:"int64",name:"lastPatchTime",id:18},{rule:"optional",type:"int64",name:"configBitmap",id:19}]},{name:"ErrorCommand",syntax:"proto2",fields:[{rule:"required",type:"int32",name:"code",id:1},{rule:"required",type:"string",name:"reason",id:2},{rule:"optional",type:"int32",name:"appCode",id:3},{rule:"optional",type:"string",name:"detail",id:4},{rule:"repeated",type:"string",name:"pids",id:5},{rule:"optional",type:"string",name:"appMsg",id:6}]},{name:"DirectCommand",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"msg",id:1},{rule:"optional",type:"string",name:"uid",id:2},{rule:"optional",type:"string",name:"fromPeerId",id:3},{rule:"optional",type:"int64",name:"timestamp",id:4},{rule:"optional",type:"bool",name:"offline",id:5},{rule:"optional",type:"bool",name:"hasMore",id:6},{rule:"repeated",type:"string",name:"toPeerIds",id:7},{rule:"optional",type:"bool",name:"r",id:10},{rule:"optional",type:"string",name:"cid",id:11},{rule:"optional",type:"string",name:"id",id:12},{rule:"optional",type:"bool",name:"transient",id:13},{rule:"optional",type:"string",name:"dt",id:14},{rule:"optional",type:"string",name:"roomId",id:15},{rule:"optional",type:"string",name:"pushData",id:16},{rule:"optional",type:"bool",name:"will",id:17},{rule:"optional",type:"int64",name:"patchTimestamp",id:18},{rule:"optional",type:"bytes",name:"binaryMsg",id:19},{rule:"repeated",type:"string",name:"mentionPids",id:20},{rule:"optional",type:"bool",name:"mentionAll",id:21},{rule:"optional",type:"int32",name:"convType",id:22}]},{name:"AckCommand",syntax:"proto2",fields:[{rule:"optional",type:"int32",name:"code",id:1},{rule:"optional",type:"string",name:"reason",id:2},{rule:"optional",type:"string",name:"mid",id:3},{rule:"optional",type:"string",name:"cid",id:4},{rule:"optional",type:"int64",name:"t",id:5},{rule:"optional",type:"string",name:"uid",id:6},{rule:"optional",type:"int64",name:"fromts",id:7},{rule:"optional",type:"int64",name:"tots",id:8},{rule:"optional",type:"string",name:"type",id:9},{rule:"repeated",type:"string",name:"ids",id:10},{rule:"optional",type:"int32",name:"appCode",id:11},{rule:"optional",type:"string",name:"appMsg",id:12}]},{name:"UnreadCommand",syntax:"proto2",fields:[{rule:"repeated",type:"UnreadTuple",name:"convs",id:1},{rule:"optional",type:"int64",name:"notifTime",id:2}]},{name:"ConvCommand",syntax:"proto2",fields:[{rule:"repeated",type:"string",name:"m",id:1},{rule:"optional",type:"bool",name:"transient",id:2},{rule:"optional",type:"bool",name:"unique",id:3},{rule:"optional",type:"string",name:"cid",id:4},{rule:"optional",type:"string",name:"cdate",id:5},{rule:"optional",type:"string",name:"initBy",id:6},{rule:"optional",type:"string",name:"sort",id:7},{rule:"optional",type:"int32",name:"limit",id:8},{rule:"optional",type:"int32",name:"skip",id:9},{rule:"optional",type:"int32",name:"flag",id:10},{rule:"optional",type:"int32",name:"count",id:11},{rule:"optional",type:"string",name:"udate",id:12},{rule:"optional",type:"int64",name:"t",id:13},{rule:"optional",type:"string",name:"n",id:14},{rule:"optional",type:"string",name:"s",id:15},{rule:"optional",type:"bool",name:"statusSub",id:16},{rule:"optional",type:"bool",name:"statusPub",id:17},{rule:"optional",type:"int32",name:"statusTTL",id:18},{rule:"optional",type:"string",name:"uniqueId",id:19},{rule:"optional",type:"string",name:"targetClientId",id:20},{rule:"optional",type:"int64",name:"maxReadTimestamp",id:21},{rule:"optional",type:"int64",name:"maxAckTimestamp",id:22},{rule:"optional",type:"bool",name:"queryAllMembers",id:23},{rule:"repeated",type:"MaxReadTuple",name:"maxReadTuples",id:24},{rule:"repeated",type:"string",name:"cids",id:25},{rule:"optional",type:"ConvMemberInfo",name:"info",id:26},{rule:"optional",type:"bool",name:"tempConv",id:27},{rule:"optional",type:"int32",name:"tempConvTTL",id:28},{rule:"repeated",type:"string",name:"tempConvIds",id:29},{rule:"repeated",type:"string",name:"allowedPids",id:30},{rule:"repeated",type:"ErrorCommand",name:"failedPids",id:31},{rule:"optional",type:"string",name:"next",id:40},{rule:"optional",type:"JsonObjectMessage",name:"results",id:100},{rule:"optional",type:"JsonObjectMessage",name:"where",id:101},{rule:"optional",type:"JsonObjectMessage",name:"attr",id:103},{rule:"optional",type:"JsonObjectMessage",name:"attrModified",id:104}]},{name:"RoomCommand",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"roomId",id:1},{rule:"optional",type:"string",name:"s",id:2},{rule:"optional",type:"int64",name:"t",id:3},{rule:"optional",type:"string",name:"n",id:4},{rule:"optional",type:"bool",name:"transient",id:5},{rule:"repeated",type:"string",name:"roomPeerIds",id:6},{rule:"optional",type:"string",name:"byPeerId",id:7}]},{name:"LogsCommand",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"cid",id:1},{rule:"optional",type:"int32",name:"l",id:2},{rule:"optional",type:"int32",name:"limit",id:3},{rule:"optional",type:"int64",name:"t",id:4},{rule:"optional",type:"int64",name:"tt",id:5},{rule:"optional",type:"string",name:"tmid",id:6},{rule:"optional",type:"string",name:"mid",id:7},{rule:"optional",type:"string",name:"checksum",id:8},{rule:"optional",type:"bool",name:"stored",id:9},{rule:"optional",type:"QueryDirection",name:"direction",id:10,options:{default:"OLD"}},{rule:"optional",type:"bool",name:"tIncluded",id:11},{rule:"optional",type:"bool",name:"ttIncluded",id:12},{rule:"optional",type:"int32",name:"lctype",id:13},{rule:"repeated",type:"LogItem",name:"logs",id:105}],enums:[{name:"QueryDirection",syntax:"proto2",values:[{name:"OLD",id:1},{name:"NEW",id:2}]}]},{name:"RcpCommand",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"id",id:1},{rule:"optional",type:"string",name:"cid",id:2},{rule:"optional",type:"int64",name:"t",id:3},{rule:"optional",type:"bool",name:"read",id:4},{rule:"optional",type:"string",name:"from",id:5}]},{name:"ReadTuple",syntax:"proto2",fields:[{rule:"required",type:"string",name:"cid",id:1},{rule:"optional",type:"int64",name:"timestamp",id:2},{rule:"optional",type:"string",name:"mid",id:3}]},{name:"MaxReadTuple",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"pid",id:1},{rule:"optional",type:"int64",name:"maxAckTimestamp",id:2},{rule:"optional",type:"int64",name:"maxReadTimestamp",id:3}]},{name:"ReadCommand",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"cid",id:1},{rule:"repeated",type:"string",name:"cids",id:2},{rule:"repeated",type:"ReadTuple",name:"convs",id:3}]},{name:"PresenceCommand",syntax:"proto2",fields:[{rule:"optional",type:"StatusType",name:"status",id:1},{rule:"repeated",type:"string",name:"sessionPeerIds",id:2},{rule:"optional",type:"string",name:"cid",id:3}]},{name:"ReportCommand",syntax:"proto2",fields:[{rule:"optional",type:"bool",name:"initiative",id:1},{rule:"optional",type:"string",name:"type",id:2},{rule:"optional",type:"string",name:"data",id:3}]},{name:"PatchItem",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"cid",id:1},{rule:"optional",type:"string",name:"mid",id:2},{rule:"optional",type:"int64",name:"timestamp",id:3},{rule:"optional",type:"bool",name:"recall",id:4},{rule:"optional",type:"string",name:"data",id:5},{rule:"optional",type:"int64",name:"patchTimestamp",id:6},{rule:"optional",type:"string",name:"from",id:7},{rule:"optional",type:"bytes",name:"binaryMsg",id:8},{rule:"optional",type:"bool",name:"mentionAll",id:9},{rule:"repeated",type:"string",name:"mentionPids",id:10},{rule:"optional",type:"int64",name:"patchCode",id:11},{rule:"optional",type:"string",name:"patchReason",id:12}]},{name:"PatchCommand",syntax:"proto2",fields:[{rule:"repeated",type:"PatchItem",name:"patches",id:1},{rule:"optional",type:"int64",name:"lastPatchTime",id:2}]},{name:"PubsubCommand",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"cid",id:1},{rule:"repeated",type:"string",name:"cids",id:2},{rule:"optional",type:"string",name:"topic",id:3},{rule:"optional",type:"string",name:"subtopic",id:4},{rule:"repeated",type:"string",name:"topics",id:5},{rule:"repeated",type:"string",name:"subtopics",id:6},{rule:"optional",type:"JsonObjectMessage",name:"results",id:7}]},{name:"BlacklistCommand",syntax:"proto2",fields:[{rule:"optional",type:"string",name:"srcCid",id:1},{rule:"repeated",type:"string",name:"toPids",id:2},{rule:"optional",type:"string",name:"srcPid",id:3},{rule:"repeated",type:"string",name:"toCids",id:4},{rule:"optional",type:"int32",name:"limit",id:5},{rule:"optional",type:"string",name:"next",id:6},{rule:"repeated",type:"string",name:"blockedPids",id:8},{rule:"repeated",type:"string",name:"blockedCids",id:9},{rule:"repeated",type:"string",name:"allowedPids",id:10},{rule:"repeated",type:"ErrorCommand",name:"failedPids",id:11},{rule:"optional",type:"int64",name:"t",id:12},{rule:"optional",type:"string",name:"n",id:13},{rule:"optional",type:"string",name:"s",id:14}]},{name:"GenericCommand",syntax:"proto2",fields:[{rule:"optional",type:"CommandType",name:"cmd",id:1},{rule:"optional",type:"OpType",name:"op",id:2},{rule:"optional",type:"string",name:"appId",id:3},{rule:"optional",type:"string",name:"peerId",id:4},{rule:"optional",type:"int32",name:"i",id:5},{rule:"optional",type:"string",name:"installationId",id:6},{rule:"optional",type:"int32",name:"priority",id:7},{rule:"optional",type:"int32",name:"service",id:8},{rule:"optional",type:"int64",name:"serverTs",id:9},{rule:"optional",type:"int64",name:"clientTs",id:10},{rule:"optional",type:"int32",name:"notificationType",id:11},{rule:"optional",type:"DataCommand",name:"dataMessage",id:101},{rule:"optional",type:"SessionCommand",name:"sessionMessage",id:102},{rule:"optional",type:"ErrorCommand",name:"errorMessage",id:103},{rule:"optional",type:"DirectCommand",name:"directMessage",id:104},{rule:"optional",type:"AckCommand",name:"ackMessage",id:105},{rule:"optional",type:"UnreadCommand",name:"unreadMessage",id:106},{rule:"optional",type:"ReadCommand",name:"readMessage",id:107},{rule:"optional",type:"RcpCommand",name:"rcpMessage",id:108},{rule:"optional",type:"LogsCommand",name:"logsMessage",id:109},{rule:"optional",type:"ConvCommand",name:"convMessage",id:110},{rule:"optional",type:"RoomCommand",name:"roomMessage",id:111},{rule:"optional",type:"PresenceCommand",name:"presenceMessage",id:112},{rule:"optional",type:"ReportCommand",name:"reportMessage",id:113},{rule:"optional",type:"PatchCommand",name:"patchMessage",id:114},{rule:"optional",type:"PubsubCommand",name:"pubsubMessage",id:115},{rule:"optional",type:"BlacklistCommand",name:"blacklistMessage",id:116}]}],enums:[{name:"CommandType",syntax:"proto2",values:[{name:"session",id:0},{name:"conv",id:1},{name:"direct",id:2},{name:"ack",id:3},{name:"rcp",id:4},{name:"unread",id:5},{name:"logs",id:6},{name:"error",id:7},{name:"login",id:8},{name:"data",id:9},{name:"room",id:10},{name:"read",id:11},{name:"presence",id:12},{name:"report",id:13},{name:"echo",id:14},{name:"loggedin",id:15},{name:"logout",id:16},{name:"loggedout",id:17},{name:"patch",id:18},{name:"pubsub",id:19},{name:"blacklist",id:20},{name:"goaway",id:21}]},{name:"OpType",syntax:"proto2",values:[{name:"open",id:1},{name:"add",id:2},{name:"remove",id:3},{name:"close",id:4},{name:"opened",id:5},{name:"closed",id:6},{name:"query",id:7},{name:"query_result",id:8},{name:"conflict",id:9},{name:"added",id:10},{name:"removed",id:11},{name:"refresh",id:12},{name:"refreshed",id:13},{name:"start",id:30},{name:"started",id:31},{name:"joined",id:32},{name:"members_joined",id:33},{name:"left",id:39},{name:"members_left",id:40},{name:"results",id:42},{name:"count",id:43},{name:"result",id:44},{name:"update",id:45},{name:"updated",id:46},{name:"mute",id:47},{name:"unmute",id:48},{name:"status",id:49},{name:"members",id:50},{name:"max_read",id:51},{name:"is_member",id:52},{name:"member_info_update",id:53},{name:"member_info_updated",id:54},{name:"member_info_changed",id:55},{name:"join",id:80},{name:"invite",id:81},{name:"leave",id:82},{name:"kick",id:83},{name:"reject",id:84},{name:"invited",id:85},{name:"kicked",id:86},{name:"upload",id:100},{name:"uploaded",id:101},{name:"subscribe",id:120},{name:"subscribed",id:121},{name:"unsubscribe",id:122},{name:"unsubscribed",id:123},{name:"is_subscribed",id:124},{name:"modify",id:150},{name:"modified",id:151},{name:"block",id:170},{name:"unblock",id:171},{name:"blocked",id:172},{name:"unblocked",id:173},{name:"members_blocked",id:174},{name:"members_unblocked",id:175},{name:"check_block",id:176},{name:"check_result",id:177},{name:"add_shutup",id:180},{name:"remove_shutup",id:181},{name:"query_shutup",id:182},{name:"shutup_added",id:183},{name:"shutup_removed",id:184},{name:"shutup_result",id:185},{name:"shutuped",id:186},{name:"unshutuped",id:187},{name:"members_shutuped",id:188},{name:"members_unshutuped",id:189},{name:"check_shutup",id:190}]},{name:"StatusType",syntax:"proto2",values:[{name:"on",id:1},{name:"off",id:2}]}],isNamespace:!0}).build(),ot=it.push_server.messages2,st=ot.JsonObjectMessage,at=ot.UnreadTuple,ut=ot.LogItem,ct=ot.DataCommand,ft=ot.SessionCommand,lt=ot.ErrorCommand,ht=ot.DirectCommand,dt=ot.AckCommand,pt=ot.UnreadCommand,vt=ot.ConvCommand,mt=ot.RoomCommand,yt=ot.LogsCommand,gt=ot.RcpCommand,bt=ot.ReadTuple,_t=ot.MaxReadTuple,wt=ot.ReadCommand,Et=ot.PresenceCommand,Ot=ot.ReportCommand,Tt=ot.GenericCommand,St=ot.BlacklistCommand,At=ot.PatchCommand,jt=ot.PatchItem,It=ot.ConvMemberInfo,xt=ot.CommandType,Ct=ot.OpType,Nt=ot.StatusType,Pt=(0,U.default)({__proto__:null,JsonObjectMessage:st,UnreadTuple:at,LogItem:ut,DataCommand:ct,SessionCommand:ft,ErrorCommand:lt,DirectCommand:ht,AckCommand:dt,UnreadCommand:pt,ConvCommand:vt,RoomCommand:mt,LogsCommand:yt,RcpCommand:gt,ReadTuple:bt,MaxReadTuple:_t,ReadCommand:wt,PresenceCommand:Et,ReportCommand:Ot,GenericCommand:Tt,BlacklistCommand:St,PatchCommand:At,PatchItem:jt,ConvMemberInfo:It,CommandType:xt,OpType:Ct,StatusType:Nt}),Rt={},kt=function(t){var e=Rt[t];if(void 0===e)throw new Error("".concat(t," adapter is not configured"));return e},Lt=function(t){(0,k.default)(Rt,t)},Ut=void 0!==t?t:"undefined"!=typeof window?window:{},Mt=(0,P.default)("expired"),Dt=J("LC:Expirable"),Ft=function(){function t(t,e){this.originalValue=t,"number"==typeof e&&(this.expiredAt=Date.now()+e)}return X(t,[{key:"value",get:function(){var t=this.expiredAt&&this.expiredAt<=Date.now();return t&&Dt("expired: ".concat(this.originalValue)),t?Mt:this.originalValue}}]),t}();Ft.EXPIRED=Mt;var qt,Bt=J("LC:Cache"),Vt=function(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"anonymous";this.name=t,this._map={}}var e=t.prototype;return e.get=function(t){var e=this._map[t];if(e){var n=e.value;if(n!==Ft.EXPIRED)return Bt("[%s] hit: %s",this.name,t),n;delete this._map[t]}return Bt("[".concat(this.name,"] missed: ").concat(t)),null},e.set=function(t,e,n){Bt("[%s] set: %s %d",this.name,t,n),this._map[t]=new Ft(e,n)},t}(),Wt={enable:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"LC*";return J.enable(t)},disable:J.disable},Yt=function t(e){var n=new g.default(e[0]);return 1===e.length?n:n.catch(function(){return t(e.slice(1))})},zt=function(t){return function(e){return t(e),e}},Qt=(Ut.navigator&&Ut.navigator.userAgent&&Ut.navigator.userAgent.indexOf("MSIE 10."),new m.default),Gt=function(t){return Qt.has(t)||Qt.set(t,{}),Qt.get(t)},Jt=function t(e,n){if(!nt(e))return e;var r=s({},e);return(0,C.default)(r).forEach(function(e){var i=r[e];i===n?delete r[e]:r[e]=t(i,n)}),r},Kt=function(t){return Jt(t,null)},Ht=function(t){return Kt(JSON.parse((0,p.default)(t)))},$t=function(t){return Array.isArray(t)?t:void 0===t||null===t?[]:[t]},Xt="object"===("undefined"==typeof wx?"undefined":et(wx))&&"function"==typeof wx.connectSocket,Zt=function(t){return"-MdYXbMMI"!==t.slice(-9)},te=function(t,e){if(!t||!e)return!1;if(t.byteLength!==e.byteLength)return!1;var n=new Uint8Array(t),r=new Uint8Array(e);return!n.some(function(t,e){return t!==r[e]})},ee=J("LC:WebSocketPlus"),ne=function(t){return Math.min(1e3*Math.pow(2,t),3e5)},re=function(t,e,n){return u(u({},n),{},{value:function(){var t;this.checkConnectionAvailability(e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=n.value).call.apply(t,[this].concat(i))}})},ie=(qt=function(t){function e(e,n){var r;return r=t.call(this)||this,r.init(),r._protocol=n,g.default.resolve("function"==typeof e?e():e).then($t).then(function(t){return r._urls=t,r._open()}).then(function(){r.__postponeTimeoutTimer=r._postponeTimeoutTimer.bind(Q(r)),Ut.addEventListener&&(r.__pause=function(){r.can("pause")&&r.pause()},r.__resume=function(){r.can("resume")&&r.resume()},Ut.addEventListener("offline",r.__pause),Ut.addEventListener("online",r.__resume)),r.open()}).catch(r.throw.bind(Q(r))),r}G(e,t),X(e,[{key:"urls",get:function(){return this._urls},set:function(t){this._urls=$t(t)}}]);var n=e.prototype;return n._open=function(){var t=this;return this._createWs(this._urls,this._protocol).then(function(e){var n=$(t._urls),r=n[0],i=n.slice(1);return t._urls=[].concat(W(i),[r]),e})},n._createWs=function(t,e){var n=this;return Yt(t.map(function(t){return function(r,i){ee("connect [".concat(t,"] ").concat(e));var o=kt("WebSocket"),s=e?new o(t,e):new o(t);s.binaryType=n.binaryType||"arraybuffer",s.onopen=function(){return r(s)},s.onclose=function(e){return i(e instanceof Error?e:new Error("Failed to connect [".concat(t,"]")))},s.onerror=s.onclose}})).then(function(t){return n._ws=t,n._ws.onclose=n._handleClose.bind(n),n._ws.onmessage=n._handleMessage.bind(n),t})},n._destroyWs=function(){var t=this._ws;t&&(t.onopen=null,t.onclose=null,t.onerror=null,t.onmessage=null,this._ws=null,t.close())},n.onbeforeevent=function(t,e,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];ee("".concat(t,": ").concat(e," -> ").concat(n," %o"),i)},n.onopen=function(){this.emit("open")},n.onconnected=function(){this._startConnectionKeeper()},n.onleaveconnected=function(t,e,n){this._stopConnectionKeeper(),this._destroyWs(),"offline"!==n&&"disconnected"!==n||this.emit("disconnect")},n.onpause=function(){this.emit("offline")},n.onbeforeresume=function(){this.emit("online")},n.onreconnect=function(){this.emit("reconnect")},n.ondisconnected=function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o="offline"===e?0:ne.call(null,i);ee("schedule attempt=".concat(i," delay=").concat(o)),this.emit("schedule",i,o),this.__scheduledRetry&&clearTimeout(this.__scheduledRetry),this.__scheduledRetry=setTimeout(function(){r.is("disconnected")&&r.retry(i)},o)},n.onretry=function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.emit("retry",i),this._open().then(function(){return r.can("reconnect")&&r.reconnect()},function(){return r.can("fail")&&r.fail(i+1)})},n.onerror=function(t,e,n,r){this.emit("error",r)},n.onclose=function(){Ut.removeEventListener&&(this.__pause&&Ut.removeEventListener("offline",this.__pause),this.__resume&&Ut.removeEventListener("online",this.__resume))},n.checkConnectionAvailability=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"API";if(!this.is("connected")){var e=this.current;throw console.warn("".concat(t," should not be called when the connection is ").concat(e)),(this.is("disconnected")||this.is("reconnecting"))&&console.warn("disconnect and reconnect event should be handled to avoid such calls."),new Error("Connection unavailable")}},n._ping=function(){ee("ping");try{this.ping()}catch(t){console.warn("websocket ping error: ".concat(t.message))}},n.ping=function(){this._ws.ping?this._ws.ping():console.warn("The WebSocket implement does not support sending ping frame.\n Override ping method to use application defined ping/pong mechanism.")},n._postponeTimeoutTimer=function(){var t=this;ee("_postponeTimeoutTimer"),this._clearTimeoutTimers(),this._timeoutTimer=setTimeout(function(){ee("timeout"),t.disconnect()},38e4)},n._clearTimeoutTimers=function(){this._timeoutTimer&&clearTimeout(this._timeoutTimer)},n._startConnectionKeeper=function(){ee("start connection keeper"),this._heartbeatTimer=setInterval(this._ping.bind(this),18e4);var t=this._ws.addListener||this._ws.addEventListener;if(!t)return void ee("connection keeper disabled due to the lack of #addEventListener.");t.call(this._ws,"message",this.__postponeTimeoutTimer),t.call(this._ws,"pong",this.__postponeTimeoutTimer),this._postponeTimeoutTimer()},n._stopConnectionKeeper=function(){ee("stop connection keeper");var t=this._ws.removeListener||this._ws.removeEventListener;t&&(t.call(this._ws,"message",this.__postponeTimeoutTimer),t.call(this._ws,"pong",this.__postponeTimeoutTimer),this._clearTimeoutTimers()),this._heartbeatTimer&&clearInterval(this._heartbeatTimer)},n._handleClose=function(t){ee("ws closed [".concat(t.code,"] ").concat(t.reason)),this.isFinished()||this.handleClose(t)},n.handleClose=function(){this.disconnect()},n.send=function(t){ee("send",t),this._ws.send(t)},n._handleMessage=function(t){ee("message",t.data),this.handleMessage(t.data)},n.handleMessage=function(t){this.emit("message",t)},e}(q),Z(qt.prototype,"_ping",[re],(0,A.default)(qt.prototype,"_ping"),qt.prototype),Z(qt.prototype,"send",[re],(0,A.default)(qt.prototype,"send"),qt.prototype),qt);tt.create({target:ie.prototype,initial:{state:"initialized",event:"init",defer:!0},terminal:"closed",events:[{name:"open",from:"initialized",to:"connected"},{name:"disconnect",from:"connected",to:"disconnected"},{name:"retry",from:"disconnected",to:"reconnecting"},{name:"fail",from:"reconnecting",to:"disconnected"},{name:"reconnect",from:"reconnecting",to:"connected"},{name:"pause",from:["connected","disconnected","reconnecting"],to:"offline"},{},{name:"resume",from:"offline",to:"disconnected"},{name:"close",from:["connected","disconnected","reconnecting","offline"],to:"closed"},{name:"throw",from:"*",to:"error"}]});var oe=(0,U.default)({1e3:{name:"CLOSE_NORMAL"},1006:{name:"CLOSE_ABNORMAL"},4100:{name:"APP_NOT_AVAILABLE",message:"App not exists or realtime message service is disabled."},4102:{name:"SIGNATURE_FAILED",message:"Login signature mismatch."},4103:{name:"INVALID_LOGIN",message:"Malformed clientId."},4105:{name:"SESSION_REQUIRED",message:"Message sent before session opened."},4107:{name:"READ_TIMEOUT"},4108:{name:"LOGIN_TIMEOUT"},4109:{name:"FRAME_TOO_LONG"},4110:{name:"INVALID_ORIGIN",message:"Access denied by domain whitelist."},4111:{name:"SESSION_CONFLICT"},4112:{name:"SESSION_TOKEN_EXPIRED"},4113:{name:"APP_QUOTA_EXCEEDED",message:"The daily active users limit exceeded."},4116:{name:"MESSAGE_SENT_QUOTA_EXCEEDED",message:"Command sent too fast."},4200:{name:"INTERNAL_ERROR",message:"Internal error, please contact LeanCloud for support."},4301:{name:"CONVERSATION_API_FAILED",message:"Upstream Conversatoin API failed, see error.detail for details."},4302:{name:"CONVERSATION_SIGNATURE_FAILED",message:"Conversation action signature mismatch."},4303:{name:"CONVERSATION_NOT_FOUND"},4304:{name:"CONVERSATION_FULL"},4305:{name:"CONVERSATION_REJECTED_BY_APP",message:"Conversation action rejected by hook."},4306:{name:"CONVERSATION_UPDATE_FAILED"},4307:{name:"CONVERSATION_READ_ONLY"},4308:{name:"CONVERSATION_NOT_ALLOWED"},4309:{name:"CONVERSATION_UPDATE_REJECTED",message:"Conversation update rejected because the client is not a member."},4310:{name:"CONVERSATION_QUERY_FAILED",message:"Conversation query failed because it is too expansive."},4311:{name:"CONVERSATION_LOG_FAILED"},4312:{name:"CONVERSATION_LOG_REJECTED",message:"Message query rejected because the client is not a member of the conversation."},4313:{name:"SYSTEM_CONVERSATION_REQUIRED"},4314:{name:"NORMAL_CONVERSATION_REQUIRED"},4315:{name:"CONVERSATION_BLACKLISTED",message:"Blacklisted in the conversation."},4316:{name:"TRANSIENT_CONVERSATION_REQUIRED"},4317:{name:"CONVERSATION_MEMBERSHIP_REQUIRED"},4318:{name:"CONVERSATION_API_QUOTA_EXCEEDED",message:"LeanCloud API quota exceeded. You may upgrade your plan."},4323:{name:"TEMPORARY_CONVERSATION_EXPIRED",message:"Temporary conversation expired or does not exist."},4401:{name:"INVALID_MESSAGING_TARGET",message:"Conversation does not exist or client is not a member."},4402:{name:"MESSAGE_REJECTED_BY_APP",message:"Message rejected by hook."},4403:{name:"MESSAGE_OWNERSHIP_REQUIRED"},4404:{name:"MESSAGE_NOT_FOUND"},4405:{name:"MESSAGE_UPDATE_REJECTED_BY_APP",message:"Message update rejected by hook."},4406:{name:"MESSAGE_EDIT_DISABLED"},4407:{name:"MESSAGE_RECALL_DISABLED"},5130:{name:"OWNER_PROMOTION_NOT_ALLOWED",message:"Updating a member's role to owner is not allowed."}}),se=(0,U.default)((0,C.default)(oe).reduce(function(t,e){return(0,k.default)(t,Y({},oe[e].name,Number(e)))},{})),ae=function(t){var e=t.code,n=t.reason,r=t.appCode,i=t.detail,o=t.error,s=n||i||o,a=n;!s&&oe[e]&&(a=oe[e].name,s=oe[e].message||a),s||(s="Unknow Error: ".concat(e));var u=new Error(s);return(0,k.default)(u,{code:e,appCode:r,detail:i,name:a})},ue=J("LC:Connection"),ce=(0,P.default)("expire"),fe=function(t){return!(t.cmd===xt.direct||t.cmd===xt.session&&t.op===Ct.open||t.cmd===xt.conv&&(t.op===Ct.start||t.op===Ct.update||t.op===Ct.members))},le=function(t){function e(e,n){var r,i=n.format,o=n.version;ue("initializing Connection");var s="lc.".concat(i,".").concat(o);return r=t.call(this,e,s)||this,r._protocolFormat=i,r._commands={},r._serialId=0,r}G(e,t);var n=e.prototype;return n.send=function(){function e(t){return n.apply(this,arguments)}var n=V(B.mark(function e(n){var r,i,o,s,a,u,c=this,f=arguments;return B.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=!(f.length>1&&void 0!==f[1])||f[1])){e.next=11;break}if(!fe(n)){e.next=8;break}if(i=n.toArrayBuffer(),!(s=H(this._commands).find(function(t){var e=t.buffer,r=t.command;return r.cmd===n.cmd&&r.op===n.op&&te(e,i)}))){e.next=8;break}return console.warn("Duplicated command [cmd:".concat(n.cmd," op:").concat(n.op,"] is throttled.")),e.abrupt("return",s.promise);case 8:this._serialId+=1,o=this._serialId,n.i=o;case 11:if(ue.enabled&&ue("↑ %O sent",Ht(n)),"proto2base64"===this._protocolFormat?a=n.toBase64():n.toArrayBuffer&&(a=n.toArrayBuffer()),a){e.next=15;break}throw new TypeError("".concat(n," is not a GenericCommand"));case 15:if(t.prototype.send.call(this,a),r){e.next=18;break}return e.abrupt("return",void 0);case 18:return u=new g.default(function(t,e){c._commands[o]={command:n,buffer:i,resolve:t,reject:e,timeout:setTimeout(function(){c._commands[o]&&(ue.enabled&&ue("✗ %O timeout",Ht(n)),e(ae({error:"Command Timeout [cmd:".concat(n.cmd," op:").concat(n.op,"]"),name:"COMMAND_TIMEOUT"})),delete c._commands[o])},2e4)}}),this._commands[o].promise=u,e.abrupt("return",u);case 21:case"end":return e.stop()}},e,this)}));return e}(),n.handleMessage=function(t){var e;try{e=Tt.decode(t),ue.enabled&&ue("↓ %O received",Ht(e))}catch(e){return void console.warn("Decode message failed:",e.message,t)}var n=e.i;if(n)this._commands[n]?(clearTimeout(this._commands[n].timeout),e.cmd===xt.error?this._commands[n].reject(ae(e.errorMessage)):this._commands[n].resolve(e),delete this._commands[n]):console.warn("Unexpected command received with serialId [".concat(n,"],\n which have timed out or never been requested."));else switch(e.cmd){case xt.error:return void this.emit("error",ae(e.errorMessage));case xt.goaway:return void this.emit(ce);default:this.emit("message",e)}},n.ping=function(){return this.send(new Tt({cmd:xt.echo})).catch(function(t){return ue("ping failed:",t)})},e}(ie),he=J("LC:request"),de=function(t){var e=t.method,n=void 0===e?"GET":e,r=t.url,i=t.query,o=t.headers,s=t.data,a=t.timeout,u=r;if(i){var c=(0,C.default)(i).map(function(t){var e=i[t];if(void 0!==e){var n=nt(e)?(0,p.default)(e):e;return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(n))}}).filter(function(t){return t}).join("&");u="".concat(u,"?").concat(c)}he("Req: %O %O %O",n,u,{headers:o,data:s});var f=kt("request"),l=f(u,{method:n,headers:o,data:s}).then(function(t){if(!1===t.ok){var e=ae(t.data);throw e.response=t,e}return he("Res: %O %O %O",u,t.status,t.data),t.data}).catch(function(t){throw t.response&&he("Error: %O %O %O",u,t.response.status,t.response.data),t});return a?rt.timeout(l,a):l},pe=function(t,e){t&&t.forEach(function(t){try{t(e)}catch(e){throw t._pluginName&&(e.message+="[".concat(t._pluginName,"]")),e}})},ve=function(t,e){return $t(t).reduce(function(t,n){return t.then(function(t){return!1!==t&&n.apply(void 0,W(e))}).catch(function(t){throw n._pluginName&&(t.message+="[".concat(n._pluginName,"]")),t})},g.default.resolve(!0))},me="5.0.0-rc.4",ye=J("LC:Realtime"),ge=new Vt("push-router"),be={},_e=function(t){function e(n){var r,i=n.plugins,o=z(n,["plugins"]);ye("initializing Realtime %s %O",me,o),r=t.call(this)||this;var s=o.appId;if("string"!=typeof s)throw new TypeError("appId [".concat(s,"] is not a string"));if(be[s])throw new Error("App [".concat(s,"] is aleady initialized."));if(be[s]=!0,"string"!=typeof o.appKey)throw new TypeError("appKey [".concat(o.appKey,"] is not a string"));if(Zt(s)&&!o.server)throw new TypeError("server option is required for apps from CN region");r._options=f({appId:void 0,appKey:void 0,pushOfflineMessages:!1,noBinary:!1,ssl:!0,RTMServerName:"undefined"!=typeof process?process.env.RTM_SERVER_NAME:void 0},o),r._cache=new Vt("endpoints");var a=Gt(Q(r));a.clients=new h.default,a.pendingClients=new h.default;var u=[].concat(W($t(e.__preRegisteredPlugins)),W($t(i)));return ye("Using plugins %o",u.map(function(t){return t.name})),r._plugins=u.reduce(function(t,e){return(0,C.default)(e).forEach(function(n){({}).hasOwnProperty.call(e,n)&&"name"!==n&&(e.name&&$t(e[n]).forEach(function(t){t._pluginName=e.name}),t[n]=$t(t[n]).concat(e[n]))}),t},{}),pe(r._plugins.onRealtimeCreate,Q(r)),r}G(e,t);var n=e.prototype;return n._request=function(){function t(t){return e.apply(this,arguments)}var e=V(B.mark(function t(e){var n,r,i,o,s,a,u,c,l,h,d,p,v,m;return B.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.method,r=e.url,i=e.version,o=void 0===i?"1.1":i,s=e.path,a=e.query,u=e.headers,c=e.data,l=r){t.next=9;break}return h=this._options,d=h.appId,p=h.server,t.next=6,this.constructor._getServerUrls({appId:d,server:p});case 6:v=t.sent,m=v.api,l="".concat(m,"/").concat(o).concat(s);case 9:return t.abrupt("return",de({url:l,method:n,query:a,headers:f({"X-LC-Id":this._options.appId,"X-LC-Key":this._options.appKey},u),data:c}));case 10:case"end":return t.stop()}},t,this)}));return t}(),n._open=function(){var t=this;if(this._openPromise)return this._openPromise;var e="protobuf2";this._options.noBinary&&(e="proto2base64");var n=3;this._options.pushOfflineMessages&&(n=1);var r={format:e,version:n};return this._openPromise=new g.default(function(e,n){ye("No connection established, create a new one.");var i=new le(function(){return t._getRTMServers(t._options)},r);i.on("open",function(){return e(i)}).on("error",n).on(ce,V(B.mark(function e(){return B.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return ye("Connection expired. Refresh endpoints."),t._cache.set("endpoints",null,0),e.next=4,t._getRTMServers(t._options);case 4:i.urls=e.sent,i.disconnect();case 6:case"end":return e.stop()}},e)}))).on("message",t._dispatchCommand.bind(t)),["disconnect","reconnect","retry","schedule","offline","online"].forEach(function(e){return i.on(e,function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];ye("".concat(e," event emitted. %o"),r),t.emit.apply(t,[e].concat(r)),"reconnect"!==e&&Gt(t).clients.forEach(function(t){t.emit.apply(t,[e].concat(r))})})}),i.handleClose=function(t){[se.APP_NOT_AVAILABLE,se.INVALID_LOGIN,se.INVALID_ORIGIN].some(function(e){return e===t.code})?this.throw(ae(t)):this.disconnect()},Gt(t).connection=i}),this._openPromise},n._getRTMServers=function(){function t(t){return e.apply(this,arguments)}var e=V(B.mark(function t(e){var n,r,i,o,s,a;return B.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.RTMServers){t.next=2;break}return t.abrupt("return",K($t(e.RTMServers)));case 2:if(!(r=this._cache.get("endpoints"))){t.next=7;break}n=r,t.next=14;break;case 7:return t.next=9,this.constructor._fetchRTMServers(e);case 9:if(n=t.sent,i=n,o=i.server,s=i.secondary,a=i.ttl,"string"==typeof o||"string"==typeof s||"number"==typeof a){t.next=13;break}throw new Error("malformed RTM route response: ".concat((0,p.default)(n)));case 13:this._cache.set("endpoints",n,1e3*n.ttl);case 14:return ye("endpoint info: %O",n),t.abrupt("return",[n.server,n.secondary]);case 16:case"end":return t.stop()}},t,this)}));return t}(),e._getServerUrls=function(){function t(t){return e.apply(this,arguments)}var e=V(B.mark(function t(e){var n,r,i,o;return B.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.appId,r=e.server,ye("fetch server urls"),!r){t.next=6;break}if("string"==typeof r){t.next=5;break}return t.abrupt("return",r);case 5:return t.abrupt("return",{RTMRouter:r,api:r});case 6:if(!(i=ge.get(n))){t.next=9;break}return t.abrupt("return",i);case 9:return o="https://",t.abrupt("return",de({url:"https://app-router.com/2/route",query:{appId:n},timeout:2e4}).then(zt(ye)).then(function(t){var e=t.rtm_router_server,r=t.api_server,i=t.ttl,s=void 0===i?3600:i;if(!e)throw new Error("rtm router not exists");var a={RTMRouter:"".concat(o).concat(e),api:"".concat(o).concat(r)};return ge.set(n,a,1e3*s),a}).catch(function(){var t=n.slice(0,8).toLowerCase();return{RTMRouter:"".concat(o).concat(t,".rtm.").concat("lncldglobal.com"),api:"".concat(o).concat(t,".api.").concat("lncldglobal.com")}}));case 11:case"end":return t.stop()}},t)}));return t}(),e._fetchRTMServers=function(t){var e=t.appId,n=t.ssl,r=t.server,i=t.RTMServerName;return ye("fetch endpoint info"),this._getServerUrls({appId:e,server:r}).then(zt(ye)).then(function(t){var r=t.RTMRouter;return de({url:"".concat(r,"/v1/route"),query:{appId:e,secure:n,features:Xt?"wechat":void 0,server:i,_t:Date.now()},timeout:2e4}).then(zt(ye))})},n._close=function(){this._openPromise&&this._openPromise.then(function(t){return t.close()}),delete this._openPromise},n.retry=function(){var t=Gt(this),e=t.connection;if(!e)throw new Error("no connection established");if(e.cannot("retry"))throw new Error("retrying not allowed when not disconnected. the connection is now ".concat(e.current));return e.retry()},n.pause=function(){var t=Gt(this),e=t.connection;e&&e.can("pause")&&e.pause()},n.resume=function(){var t=Gt(this),e=t.connection;e&&e.can("resume")&&e.resume()},n._registerPending=function(t){Gt(this).pendingClients.add(t)},n._deregisterPending=function(t){Gt(this).pendingClients.delete(t)},n._register=function(t){Gt(this).clients.add(t)},n._deregister=function(t){var e=Gt(this);e.clients.delete(t),e.clients.size+e.pendingClients.size===0&&this._close()},n._dispatchCommand=function(t){return ve(this._plugins.beforeCommandDispatch,[t,this]).then(function(e){return!!e&&ye("[WARN] Unexpected message received: %O",Ht(t))})},e}(q),we=g.default;e.EventEmitter=q,e.Promise=we,e.Protocals=Pt,e.Protocols=Pt,e.Realtime=_e,e.debug=Wt,e.getAdapter=kt,e.setAdapters=Lt}).call(e,n(66))},function(t,e,n){n(59),n(35),n(37),n(381),n(385),n(388),n(389),t.exports=n(1).Set},function(t,e,n){"use strict";var r=n(382),i=n(58);t.exports=n(194)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r=n(20).f,i=n(60),o=n(65),s=n(22),a=n(64),u=n(38),c=n(82),f=n(120),l=n(127),h=n(16),d=n(45).fastKey,p=n(58),v=h?"_s":"size",m=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var f=t(function(t,r){a(t,f,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,void 0!=r&&u(r,n,t[c],t)});return o(f.prototype,{clear:function(){for(var t=p(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=p(this,e),r=m(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[v]--}return!!r},forEach:function(t){p(this,e);for(var n,r=s(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!m(p(this,e),t)}}),h&&r(f.prototype,"size",{get:function(){return p(this,e)[v]}}),f},def:function(t,e,n){var r,i,o=m(t,e);return o?o.v=n:(t._l=o={i:i=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[v]++,"F"!==i&&(t._i[i]=o)),t},getEntry:m,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=p(t,e),this._k=n,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?f(0,n.k):"values"==e?f(0,n.v):f(0,[n.k,n.v]):(t._t=void 0,f(1))},n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){var r=n(384);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(9),i=n(184),o=n(8)("species");t.exports=function(t){var e;return i(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){var r=n(4);r(r.P+r.R,"Set",{toJSON:n(386)("Set")})},function(t,e,n){var r=n(63),i=n(387);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){var r=n(38);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e,n){n(195)("Set")},function(t,e,n){n(196)("Set")},function(t,e,n){t.exports={default:n(391),__esModule:!0}},function(t,e,n){n(59),n(37),n(392),n(394),n(395),t.exports=n(1).WeakMap},function(t,e,n){"use strict";var r,i=n(5),o=n(114)(0),s=n(85),a=n(45),u=n(197),c=n(393),f=n(9),l=n(58),h=n(58),d=!i.ActiveXObject&&"ActiveXObject"in i,p=a.getWeak,v=Object.isExtensible,m=c.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(t){if(f(t)){var e=p(t);return!0===e?m(l(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(l(this,"WeakMap"),t,e)}},b=t.exports=n(194)("WeakMap",y,g,c,!0,!0);h&&d&&(r=c.getConstructor(y,"WeakMap"),u(r.prototype,g),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=b.prototype,n=e[t];s(e,t,function(e,i){if(f(e)&&!v(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)})}))},function(t,e,n){"use strict";var r=n(65),i=n(45).getWeak,o=n(15),s=n(9),a=n(64),u=n(38),c=n(114),f=n(25),l=n(58),h=c(5),d=c(6),p=0,v=function(t){return t._l||(t._l=new m)},m=function(){this.a=[]},y=function(t,e){return h(t.a,function(t){return t[0]===e})};m.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=d(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var c=t(function(t,r){a(t,c,e,"_i"),t._t=e,t._i=p++,t._l=void 0,void 0!=r&&u(r,n,t[o],t)});return r(c.prototype,{delete:function(t){if(!s(t))return!1;var n=i(t);return!0===n?v(l(this,e)).delete(t):n&&f(n,this._i)&&delete n[this._i]},has:function(t){if(!s(t))return!1;var n=i(t);return!0===n?v(l(this,e)).has(t):n&&f(n,this._i)}}),c},def:function(t,e,n){var r=i(o(e),!0);return!0===r?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},function(t,e,n){n(195)("WeakMap")},function(t,e,n){n(196)("WeakMap")},function(t,e,n){t.exports={default:n(397),__esModule:!0}},function(t,e,n){n(398);var r=n(1).Object;t.exports=function(t,e){return r.defineProperties(t,e)}},function(t,e,n){var r=n(4);r(r.S+r.F*!n(16),"Object",{defineProperties:n(116)})},function(t,e,n){t.exports={default:n(400),__esModule:!0}},function(t,e,n){n(401),t.exports=n(1).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(4),i=n(402),o=n(26),s=n(76),a=n(192);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),u=s.f,c=i(r),f={},l=0;c.length>l;)void 0!==(n=u(r,e=c[l++]))&&a(f,e,n);return f}})},function(t,e,n){var r=n(110),i=n(74),o=n(15),s=n(5).Reflect;t.exports=s&&s.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){n(183),t.exports=n(1).Object.getOwnPropertySymbols},function(t,e,n){n(405),t.exports=n(1).Object.assign},function(t,e,n){var r=n(4);r(r.S+r.F,"Object",{assign:n(197)})},function(t,e,n){t.exports={default:n(407),__esModule:!0}},function(t,e,n){n(408),t.exports=n(1).Object.freeze},function(t,e,n){var r=n(9),i=n(45).onFreeze;n(70)("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r,i,o;/**
22 * @license protobuf.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
23 * Released under the Apache License, Version 2.0
24 * see: https://github.com/dcodeIO/protobuf.js for details
25 */
26!function(s,a){i=[n(410)],r=a,void 0!==(o="function"==typeof r?r.apply(e,i):r)&&(t.exports=o)}(0,function(t,e){"use strict";var r={};return r.ByteBuffer=t,r.Long=t.Long||null,r.VERSION="5.0.3",r.WIRE_TYPES={},r.WIRE_TYPES.VARINT=0,r.WIRE_TYPES.BITS64=1,r.WIRE_TYPES.LDELIM=2,r.WIRE_TYPES.STARTGROUP=3,r.WIRE_TYPES.ENDGROUP=4,r.WIRE_TYPES.BITS32=5,r.PACKABLE_WIRE_TYPES=[r.WIRE_TYPES.VARINT,r.WIRE_TYPES.BITS64,r.WIRE_TYPES.BITS32],r.TYPES={int32:{name:"int32",wireType:r.WIRE_TYPES.VARINT,defaultValue:0},uint32:{name:"uint32",wireType:r.WIRE_TYPES.VARINT,defaultValue:0},sint32:{name:"sint32",wireType:r.WIRE_TYPES.VARINT,defaultValue:0},int64:{name:"int64",wireType:r.WIRE_TYPES.VARINT,defaultValue:r.Long?r.Long.ZERO:void 0},uint64:{name:"uint64",wireType:r.WIRE_TYPES.VARINT,defaultValue:r.Long?r.Long.UZERO:void 0},sint64:{name:"sint64",wireType:r.WIRE_TYPES.VARINT,defaultValue:r.Long?r.Long.ZERO:void 0},bool:{name:"bool",wireType:r.WIRE_TYPES.VARINT,defaultValue:!1},double:{name:"double",wireType:r.WIRE_TYPES.BITS64,defaultValue:0},string:{name:"string",wireType:r.WIRE_TYPES.LDELIM,defaultValue:""},bytes:{name:"bytes",wireType:r.WIRE_TYPES.LDELIM,defaultValue:null},fixed32:{name:"fixed32",wireType:r.WIRE_TYPES.BITS32,defaultValue:0},sfixed32:{name:"sfixed32",wireType:r.WIRE_TYPES.BITS32,defaultValue:0},fixed64:{name:"fixed64",wireType:r.WIRE_TYPES.BITS64,defaultValue:r.Long?r.Long.UZERO:void 0},sfixed64:{name:"sfixed64",wireType:r.WIRE_TYPES.BITS64,defaultValue:r.Long?r.Long.ZERO:void 0},float:{name:"float",wireType:r.WIRE_TYPES.BITS32,defaultValue:0},enum:{name:"enum",wireType:r.WIRE_TYPES.VARINT,defaultValue:0},message:{name:"message",wireType:r.WIRE_TYPES.LDELIM,defaultValue:null},group:{name:"group",wireType:r.WIRE_TYPES.STARTGROUP,defaultValue:null}},r.MAP_KEY_TYPES=[r.TYPES.int32,r.TYPES.sint32,r.TYPES.sfixed32,r.TYPES.uint32,r.TYPES.fixed32,r.TYPES.int64,r.TYPES.sint64,r.TYPES.sfixed64,r.TYPES.uint64,r.TYPES.fixed64,r.TYPES.bool,r.TYPES.string,r.TYPES.bytes],r.ID_MIN=1,r.ID_MAX=536870911,r.convertFieldsToCamelCase=!1,r.populateAccessors=!0,r.populateDefaults=!0,r.Util=function(){var t={};return t.IS_NODE=!("object"!=typeof process||process+""!="[object process]"||process.browser),t.XHR=function(){for(var t=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],e=null,n=0;n<t.length;n++){try{e=t[n]()}catch(t){continue}break}if(!e)throw Error("XMLHttpRequest is not supported");return e},t.fetch=function(e,r){if(r&&"function"!=typeof r&&(r=null),t.IS_NODE){var i=n(412);if(r)i.readFile(e,function(t,e){r(t?null:""+e)});else try{return i.readFileSync(e)}catch(t){return null}}else{var o=t.XHR();if(o.open("GET",e,!!r),o.setRequestHeader("Accept","text/plain"),"function"==typeof o.overrideMimeType&&o.overrideMimeType("text/plain"),!r)return o.send(null),200==o.status||0==o.status&&"string"==typeof o.responseText?o.responseText:null;if(o.onreadystatechange=function(){4==o.readyState&&r(200==o.status||0==o.status&&"string"==typeof o.responseText?o.responseText:null)},4==o.readyState)return;o.send(null)}},t.toCamelCase=function(t){return t.replace(/_([a-zA-Z])/g,function(t,e){return e.toUpperCase()})},t}(),r.Lang={DELIM:/[\s\{\}=;:\[\],'"\(\)<>]/g,RULE:/^(?:required|optional|repeated|map)$/,TYPE:/^(?:double|float|int32|uint32|sint32|int64|uint64|sint64|fixed32|sfixed32|fixed64|sfixed64|bool|string|bytes)$/,NAME:/^[a-zA-Z_][a-zA-Z_0-9]*$/,TYPEDEF:/^[a-zA-Z][a-zA-Z_0-9]*$/,TYPEREF:/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,FQTYPEREF:/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/,NUMBER:/^-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+|([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?)|inf|nan)$/,NUMBER_DEC:/^(?:[1-9][0-9]*|0)$/,NUMBER_HEX:/^0[xX][0-9a-fA-F]+$/,NUMBER_OCT:/^0[0-7]+$/,NUMBER_FLT:/^([0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?|inf|nan)$/,BOOL:/^(?:true|false)$/i,ID:/^(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,NEGID:/^\-?(?:[1-9][0-9]*|0|0[xX][0-9a-fA-F]+|0[0-7]+)$/,WHITESPACE:/\s/,STRING:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")|(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,STRING_DQ:/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,STRING_SQ:/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},r.Reflect=function(e){function n(n){if("string"==typeof n&&(n=e.TYPES[n]),void 0===n.defaultValue)throw Error("default value for type "+n.name+" is not supported");return n==e.TYPES.bytes?new t(0):n.defaultValue}function r(t,n){if(t&&"number"==typeof t.low&&"number"==typeof t.high&&"boolean"==typeof t.unsigned&&t.low===t.low&&t.high===t.high)return new e.Long(t.low,t.high,void 0===n?t.unsigned:n);if("string"==typeof t)return e.Long.fromString(t,n||!1,10);if("number"==typeof t)return e.Long.fromNumber(t,n||!1);throw Error("not convertible to Long")}function i(t,n){var r=n.readVarint32(),o=7&r,s=r>>>3;switch(o){case e.WIRE_TYPES.VARINT:do{r=n.readUint8()}while(128==(128&r));break;case e.WIRE_TYPES.BITS64:n.offset+=8;break;case e.WIRE_TYPES.LDELIM:r=n.readVarint32(),n.offset+=r;break;case e.WIRE_TYPES.STARTGROUP:i(s,n);break;case e.WIRE_TYPES.ENDGROUP:if(s===t)return!1;throw Error("Illegal GROUPEND after unknown group: "+s+" ("+t+" expected)");case e.WIRE_TYPES.BITS32:n.offset+=4;break;default:throw Error("Illegal wire type in unknown group "+t+": "+o)}return!0}var o={},s=function(t,e,n){this.builder=t,this.parent=e,this.name=n,this.className},a=s.prototype;a.fqn=function(){for(var t=this.name,e=this;;){if(null==(e=e.parent))break;t=e.name+"."+t}return t},a.toString=function(t){return(t?this.className+" ":"")+this.fqn()},a.build=function(){throw Error(this.toString(!0)+" cannot be built directly")},o.T=s;var u=function(t,e,n,r,i){s.call(this,t,e,n),this.className="Namespace",this.children=[],this.options=r||{},this.syntax=i||"proto2"},c=u.prototype=Object.create(s.prototype);c.getChildren=function(t){if(null==(t=t||null))return this.children.slice();for(var e=[],n=0,r=this.children.length;n<r;++n)this.children[n]instanceof t&&e.push(this.children[n]);return e},c.addChild=function(t){var e;if(e=this.getChild(t.name))if(e instanceof h.Field&&e.name!==e.originalName&&null===this.getChild(e.originalName))e.name=e.originalName;else{if(!(t instanceof h.Field&&t.name!==t.originalName&&null===this.getChild(t.originalName)))throw Error("Duplicate name in namespace "+this.toString(!0)+": "+t.name);t.name=t.originalName}this.children.push(t)},c.getChild=function(t){for(var e="number"==typeof t?"id":"name",n=0,r=this.children.length;n<r;++n)if(this.children[n][e]===t)return this.children[n];return null},c.resolve=function(t,e){var n="string"==typeof t?t.split("."):t,r=this,i=0;if(""===n[i]){for(;null!==r.parent;)r=r.parent;i++}var s;do{do{if(!(r instanceof o.Namespace)){r=null;break}if(!(s=r.getChild(n[i]))||!(s instanceof o.T)||e&&!(s instanceof o.Namespace)){r=null;break}r=s,i++}while(i<n.length);if(null!=r)break;if(null!==this.parent)return this.parent.resolve(t,e)}while(null!=r);return r},c.qn=function(t){var e=[],n=t;do{e.unshift(n.name),n=n.parent}while(null!==n);for(var r=1;r<=e.length;r++){var i=e.slice(e.length-r);if(t===this.resolve(i,t instanceof o.Namespace))return i.join(".")}return t.fqn()},c.build=function(){for(var t,e={},n=this.children,r=0,i=n.length;r<i;++r)(t=n[r])instanceof u&&(e[t.name]=t.build());return Object.defineProperty&&Object.defineProperty(e,"$options",{value:this.buildOpt()}),e},c.buildOpt=function(){for(var t={},e=Object.keys(this.options),n=0,r=e.length;n<r;++n){var i=e[n],o=this.options[e[n]];t[i]=o}return t},c.getOption=function(t){return void 0===t?this.options:void 0!==this.options[t]?this.options[t]:null},o.Namespace=u;var f=function(t,n,r,i,o){if(this.type=t,this.resolvedType=n,this.isMapKey=r,this.syntax=i,this.name=o,r&&e.MAP_KEY_TYPES.indexOf(t)<0)throw Error("Invalid map key type: "+t.name)},l=f.prototype;f.defaultFieldValue=n,l.toString=function(){return(this.name||"")+(this.isMapKey?"map":"value")+" element"},l.verifyValue=function(n){function i(t,e){throw Error("Illegal value for "+o.toString(!0)+" of type "+o.type.name+": "+t+" ("+e+")")}var o=this;switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:return("number"!=typeof n||n===n&&n%1!=0)&&i(typeof n,"not an integer"),n>4294967295?0|n:n;case e.TYPES.uint32:case e.TYPES.fixed32:return("number"!=typeof n||n===n&&n%1!=0)&&i(typeof n,"not an integer"),n<0?n>>>0:n;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:if(e.Long)try{return r(n,!1)}catch(t){i(typeof n,t.message)}else i(typeof n,"requires Long.js");case e.TYPES.uint64:case e.TYPES.fixed64:if(e.Long)try{return r(n,!0)}catch(t){i(typeof n,t.message)}else i(typeof n,"requires Long.js");case e.TYPES.bool:return"boolean"!=typeof n&&i(typeof n,"not a boolean"),n;case e.TYPES.float:case e.TYPES.double:return"number"!=typeof n&&i(typeof n,"not a number"),n;case e.TYPES.string:return"string"==typeof n||n&&n instanceof String||i(typeof n,"not a string"),""+n;case e.TYPES.bytes:return t.isByteBuffer(n)?n:t.wrap(n,"base64");case e.TYPES.enum:var s=this.resolvedType.getChildren(e.Reflect.Enum.Value);for(u=0;u<s.length;u++){if(s[u].name==n)return s[u].id;if(s[u].id==n)return s[u].id}if("proto3"===this.syntax)return("number"!=typeof n||n===n&&n%1!=0)&&i(typeof n,"not an integer"),(n>4294967295||n<0)&&i(typeof n,"not in range for uint32"),n;i(n,"not a valid enum value");case e.TYPES.group:case e.TYPES.message:if(n&&"object"==typeof n||i(typeof n,"object expected"),n instanceof this.resolvedType.clazz)return n;if(n instanceof e.Builder.Message){var a={};for(var u in n)n.hasOwnProperty(u)&&(a[u]=n[u]);n=a}return new this.resolvedType.clazz(n)}throw Error("[INTERNAL] Illegal value for "+this.toString(!0)+": "+n+" (undefined type "+this.type+")")},l.calculateLength=function(n,r){if(null===r)return 0;var i;switch(this.type){case e.TYPES.int32:return r<0?t.calculateVarint64(r):t.calculateVarint32(r);case e.TYPES.uint32:return t.calculateVarint32(r);case e.TYPES.sint32:return t.calculateVarint32(t.zigZagEncode32(r));case e.TYPES.fixed32:case e.TYPES.sfixed32:case e.TYPES.float:return 4;case e.TYPES.int64:case e.TYPES.uint64:return t.calculateVarint64(r);case e.TYPES.sint64:return t.calculateVarint64(t.zigZagEncode64(r));case e.TYPES.fixed64:case e.TYPES.sfixed64:return 8;case e.TYPES.bool:return 1;case e.TYPES.enum:return t.calculateVarint32(r);case e.TYPES.double:return 8;case e.TYPES.string:return i=t.calculateUTF8Bytes(r),t.calculateVarint32(i)+i;case e.TYPES.bytes:if(r.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+r.remaining()+" bytes remaining");return t.calculateVarint32(r.remaining())+r.remaining();case e.TYPES.message:return i=this.resolvedType.calculate(r),t.calculateVarint32(i)+i;case e.TYPES.group:return(i=this.resolvedType.calculate(r))+t.calculateVarint32(n<<3|e.WIRE_TYPES.ENDGROUP)}throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+r+" (unknown type)")},l.encodeValue=function(n,r,i){if(null===r)return i;switch(this.type){case e.TYPES.int32:r<0?i.writeVarint64(r):i.writeVarint32(r);break;case e.TYPES.uint32:i.writeVarint32(r);break;case e.TYPES.sint32:i.writeVarint32ZigZag(r);break;case e.TYPES.fixed32:i.writeUint32(r);break;case e.TYPES.sfixed32:i.writeInt32(r);break;case e.TYPES.int64:case e.TYPES.uint64:i.writeVarint64(r);break;case e.TYPES.sint64:i.writeVarint64ZigZag(r);break;case e.TYPES.fixed64:i.writeUint64(r);break;case e.TYPES.sfixed64:i.writeInt64(r);break;case e.TYPES.bool:"string"==typeof r?i.writeVarint32("false"===r.toLowerCase()?0:!!r):i.writeVarint32(r?1:0);break;case e.TYPES.enum:i.writeVarint32(r);break;case e.TYPES.float:i.writeFloat32(r);break;case e.TYPES.double:i.writeFloat64(r);break;case e.TYPES.string:i.writeVString(r);break;case e.TYPES.bytes:if(r.remaining()<0)throw Error("Illegal value for "+this.toString(!0)+": "+r.remaining()+" bytes remaining");var o=r.offset;i.writeVarint32(r.remaining()),i.append(r),r.offset=o;break;case e.TYPES.message:var s=(new t).LE();this.resolvedType.encode(r,s),i.writeVarint32(s.offset),i.append(s.flip());break;case e.TYPES.group:this.resolvedType.encode(r,i),i.writeVarint32(n<<3|e.WIRE_TYPES.ENDGROUP);break;default:throw Error("[INTERNAL] Illegal value to encode in "+this.toString(!0)+": "+r+" (unknown type)")}return i},l.decode=function(t,n,r){if(n!=this.type.wireType)throw Error("Unexpected wire type for element");var i,o;switch(this.type){case e.TYPES.int32:return 0|t.readVarint32();case e.TYPES.uint32:return t.readVarint32()>>>0;case e.TYPES.sint32:return 0|t.readVarint32ZigZag();case e.TYPES.fixed32:return t.readUint32()>>>0;case e.TYPES.sfixed32:return 0|t.readInt32();case e.TYPES.int64:return t.readVarint64();case e.TYPES.uint64:return t.readVarint64().toUnsigned();case e.TYPES.sint64:return t.readVarint64ZigZag();case e.TYPES.fixed64:return t.readUint64();case e.TYPES.sfixed64:return t.readInt64();case e.TYPES.bool:return!!t.readVarint32();case e.TYPES.enum:return t.readVarint32();case e.TYPES.float:return t.readFloat();case e.TYPES.double:return t.readDouble();case e.TYPES.string:return t.readVString();case e.TYPES.bytes:if(o=t.readVarint32(),t.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+t.remaining());return i=t.clone(),i.limit=i.offset+o,t.offset+=o,i;case e.TYPES.message:return o=t.readVarint32(),this.resolvedType.decode(t,o);case e.TYPES.group:return this.resolvedType.decode(t,-1,r)}throw Error("[INTERNAL] Illegal decode type")},l.valueFromString=function(n){if(!this.isMapKey)throw Error("valueFromString() called on non-map-key element");switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return this.verifyValue(parseInt(n));case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return this.verifyValue(n);case e.TYPES.bool:return"true"===n;case e.TYPES.string:return this.verifyValue(n);case e.TYPES.bytes:return t.fromBinary(n)}},l.valueToString=function(t){if(!this.isMapKey)throw Error("valueToString() called on non-map-key element");return this.type===e.TYPES.bytes?t.toString("binary"):t.toString()},o.Element=f;var h=function(t,e,n,r,i,o){u.call(this,t,e,n,r,o),this.className="Message",this.extensions=void 0,this.clazz=null,this.isGroup=!!i,this._fields=null,this._fieldsById=null,this._fieldsByName=null},d=h.prototype=Object.create(u.prototype);d.build=function(n){if(this.clazz&&!n)return this.clazz;var r=function(e,n){function r(n,i,o,s){if(null===n||"object"!=typeof n){if(s&&s instanceof e.Reflect.Enum){var a=e.Reflect.Enum.getName(s.object,n);if(null!==a)return a}return n}if(t.isByteBuffer(n))return i?n.toBase64():n.toBuffer();if(e.Long.isLong(n))return o?n.toString():e.Long.fromValue(n);var u;if(Array.isArray(n))return u=[],n.forEach(function(t,e){u[e]=r(t,i,o,s)}),u;if(u={},n instanceof e.Map){for(var c=n.entries(),f=c.next();!f.done;f=c.next())u[n.keyElem.valueToString(f.value[0])]=r(f.value[1],i,o,n.valueElem.resolvedType);return u}var l=n.$type,h=void 0;for(var d in n)n.hasOwnProperty(d)&&(l&&(h=l.getChild(d))?u[d]=r(n[d],i,o,h.resolvedType):u[d]=r(n[d],i,o));return u}var i=n.getChildren(e.Reflect.Message.Field),o=n.getChildren(e.Reflect.Message.OneOf),s=function(r,a){e.Builder.Message.call(this);for(var u=0,c=o.length;u<c;++u)this[o[u].name]=null;for(u=0,c=i.length;u<c;++u){var f=i[u];this[f.name]=f.repeated?[]:f.map?new e.Map(f):null,!f.required&&"proto3"!==n.syntax||null===f.defaultValue||(this[f.name]=f.defaultValue)}if(arguments.length>0){var l;if(1!==arguments.length||null===r||"object"!=typeof r||!("function"!=typeof r.encode||r instanceof s)||Array.isArray(r)||r instanceof e.Map||t.isByteBuffer(r)||r instanceof ArrayBuffer||e.Long&&r instanceof e.Long)for(u=0,c=arguments.length;u<c;++u)void 0!==(l=arguments[u])&&this.$set(i[u].name,l);else this.$set(r)}},a=s.prototype=Object.create(e.Builder.Message.prototype);a.add=function(t,r,i){var o=n._fieldsByName[t];if(!i){if(!o)throw Error(this+"#"+t+" is undefined");if(!(o instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: "+o.toString(!0));if(!o.repeated)throw Error(this+"#"+t+" is not a repeated field");r=o.verifyValue(r,!0)}return null===this[t]&&(this[t]=[]),this[t].push(r),this},a.$add=a.add,a.set=function(t,r,i){if(t&&"object"==typeof t){i=r;for(var o in t)t.hasOwnProperty(o)&&void 0!==(r=t[o])&&void 0===n._oneofsByName[o]&&this.$set(o,r,i);return this}var s=n._fieldsByName[t];if(i)this[t]=r;else{if(!s)throw Error(this+"#"+t+" is not a field: undefined");if(!(s instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: "+s.toString(!0));this[s.name]=r=s.verifyValue(r)}if(s&&s.oneof){var a=this[s.oneof.name];null!==r?(null!==a&&a!==s.name&&(this[a]=null),this[s.oneof.name]=s.name):a===t&&(this[s.oneof.name]=null)}return this},a.$set=a.set,a.get=function(t,r){if(r)return this[t];var i=n._fieldsByName[t];if(!(i&&i instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: undefined");if(!(i instanceof e.Reflect.Message.Field))throw Error(this+"#"+t+" is not a field: "+i.toString(!0));return this[i.name]},a.$get=a.get;for(var u=0;u<i.length;u++){var c=i[u];c instanceof e.Reflect.Message.ExtensionField||n.builder.options.populateAccessors&&function(t){var e=t.originalName.replace(/(_[a-zA-Z])/g,function(t){return t.toUpperCase().replace("_","")});e=e.substring(0,1).toUpperCase()+e.substring(1);var r=t.originalName.replace(/([A-Z])/g,function(t){return"_"+t}),i=function(e,n){return this[t.name]=n?e:t.verifyValue(e),this},o=function(){return this[t.name]};null===n.getChild("set"+e)&&(a["set"+e]=i),null===n.getChild("set_"+r)&&(a["set_"+r]=i),null===n.getChild("get"+e)&&(a["get"+e]=o),null===n.getChild("get_"+r)&&(a["get_"+r]=o)}(c)}a.encode=function(e,r){"boolean"==typeof e&&(r=e,e=void 0);var i=!1;e||(e=new t,i=!0);var o=e.littleEndian;try{return n.encode(this,e.LE(),r),(i?e.flip():e).LE(o)}catch(t){throw e.LE(o),t}},s.encode=function(t,e,n){return new s(t).encode(e,n)},a.calculate=function(){return n.calculate(this)},a.encodeDelimited=function(e,r){var i=!1;e||(e=new t,i=!0);var o=(new t).LE();return n.encode(this,o,r).flip(),e.writeVarint32(o.remaining()),e.append(o),i?e.flip():e},a.encodeAB=function(){try{return this.encode().toArrayBuffer()}catch(t){throw t.encoded&&(t.encoded=t.encoded.toArrayBuffer()),t}},a.toArrayBuffer=a.encodeAB,a.encodeNB=function(){try{return this.encode().toBuffer()}catch(t){throw t.encoded&&(t.encoded=t.encoded.toBuffer()),t}},a.toBuffer=a.encodeNB,a.encode64=function(){try{return this.encode().toBase64()}catch(t){throw t.encoded&&(t.encoded=t.encoded.toBase64()),t}},a.toBase64=a.encode64,a.encodeHex=function(){try{return this.encode().toHex()}catch(t){throw t.encoded&&(t.encoded=t.encoded.toHex()),t}},a.toHex=a.encodeHex,a.toRaw=function(t,e){return r(this,!!t,!!e,this.$type)},a.encodeJSON=function(){return JSON.stringify(r(this,!0,!0,this.$type))},s.decode=function(e,r,i){"string"==typeof r&&(i=r,r=-1),"string"==typeof e?e=t.wrap(e,i||"base64"):t.isByteBuffer(e)||(e=t.wrap(e));var o=e.littleEndian;try{var s=n.decode(e.LE(),r);return e.LE(o),s}catch(t){throw e.LE(o),t}},s.decodeDelimited=function(e,r){if("string"==typeof e?e=t.wrap(e,r||"base64"):t.isByteBuffer(e)||(e=t.wrap(e)),e.remaining()<1)return null;var i=e.offset,o=e.readVarint32();if(e.remaining()<o)return e.offset=i,null;try{var s=n.decode(e.slice(e.offset,e.offset+o).LE());return e.offset+=o,s}catch(t){throw e.offset+=o,t}},s.decode64=function(t){return s.decode(t,"base64")},s.decodeHex=function(t){return s.decode(t,"hex")},s.decodeJSON=function(t){return new s(JSON.parse(t))},a.toString=function(){return n.toString()};return Object.defineProperty&&(Object.defineProperty(s,"$options",{value:n.buildOpt()}),Object.defineProperty(a,"$options",{value:s.$options}),Object.defineProperty(s,"$type",{value:n}),Object.defineProperty(a,"$type",{value:n})),s}(e,this);this._fields=[],this._fieldsById={},this._fieldsByName={},this._oneofsByName={};for(var i,o=0,s=this.children.length;o<s;o++)if((i=this.children[o])instanceof g||i instanceof h||i instanceof w){if(r.hasOwnProperty(i.name))throw Error("Illegal reflect child of "+this.toString(!0)+": "+i.toString(!0)+" cannot override static property '"+i.name+"'");r[i.name]=i.build()}else if(i instanceof h.Field)i.build(),this._fields.push(i),this._fieldsById[i.id]=i,this._fieldsByName[i.name]=i;else if(i instanceof h.OneOf)this._oneofsByName[i.name]=i;else if(!(i instanceof h.OneOf||i instanceof _))throw Error("Illegal reflect child of "+this.toString(!0)+": "+this.children[o].toString(!0));return this.clazz=r},d.encode=function(t,e,n){for(var r,i,o=null,s=0,a=this._fields.length;s<a;++s)r=this._fields[s],i=t[r.name],r.required&&null===i?null===o&&(o=r):r.encode(n?i:r.verifyValue(i),e,t);if(null!==o){var u=Error("Missing at least one required field for "+this.toString(!0)+": "+o);throw u.encoded=e,u}return e},d.calculate=function(t){for(var e,n,r=0,i=0,o=this._fields.length;i<o;++i){if(e=this._fields[i],n=t[e.name],e.required&&null===n)throw Error("Missing at least one required field for "+this.toString(!0)+": "+e);r+=e.calculate(n,t)}return r},d.decode=function(t,n,r){"number"!=typeof n&&(n=-1);for(var o,s,a,u,c=t.offset,f=new this.clazz;t.offset<c+n||-1===n&&t.remaining()>0;){if(o=t.readVarint32(),s=7&o,a=o>>>3,s===e.WIRE_TYPES.ENDGROUP){if(a!==r)throw Error("Illegal group end indicator for "+this.toString(!0)+": "+a+" ("+(r?r+" expected":"not a group")+")");break}if(u=this._fieldsById[a]){if(u.repeated&&!u.options.packed)f[u.name].push(u.decode(s,t));else if(u.map){var l=u.decode(s,t);f[u.name].set(l[0],l[1])}else if(f[u.name]=u.decode(s,t),u.oneof){var h=f[u.oneof.name];null!==h&&h!==u.name&&(f[h]=null),f[u.oneof.name]=u.name}}else switch(s){case e.WIRE_TYPES.VARINT:t.readVarint32();break;case e.WIRE_TYPES.BITS32:t.offset+=4;break;case e.WIRE_TYPES.BITS64:t.offset+=8;break;case e.WIRE_TYPES.LDELIM:var d=t.readVarint32();t.offset+=d;break;case e.WIRE_TYPES.STARTGROUP:for(;i(a,t););break;default:throw Error("Illegal wire type for unknown field "+a+" in "+this.toString(!0)+"#decode: "+s)}}for(var p=0,v=this._fields.length;p<v;++p)if(u=this._fields[p],null===f[u.name])if("proto3"===this.syntax)f[u.name]=u.defaultValue;else{if(u.required){var m=Error("Missing at least one required field for "+this.toString(!0)+": "+u.name);throw m.decoded=f,m}e.populateDefaults&&null!==u.defaultValue&&(f[u.name]=u.defaultValue)}return f},o.Message=h;var p=function(t,n,r,i,o,a,u,c,f,l){s.call(this,t,n,a),this.className="Message.Field",this.required="required"===r,this.repeated="repeated"===r,this.map="map"===r,this.keyType=i||null,this.type=o,this.resolvedType=null,this.id=u,this.options=c||{},this.defaultValue=null,this.oneof=f||null,this.syntax=l||"proto2",this.originalName=this.name,this.element=null,this.keyElement=null,!this.builder.options.convertFieldsToCamelCase||this instanceof h.ExtensionField||(this.name=e.Util.toCamelCase(this.name))},v=p.prototype=Object.create(s.prototype);v.build=function(){this.element=new f(this.type,this.resolvedType,!1,this.syntax,this.name),this.map&&(this.keyElement=new f(this.keyType,void 0,!0,this.syntax,this.name)),"proto3"!==this.syntax||this.repeated||this.map?void 0!==this.options.default&&(this.defaultValue=this.verifyValue(this.options.default)):this.defaultValue=f.defaultFieldValue(this.type)},v.verifyValue=function(t,n){function r(t,e){throw Error("Illegal value for "+i.toString(!0)+" of type "+i.type.name+": "+t+" ("+e+")")}n=n||!1;var i=this;if(null===t)return this.required&&r(typeof t,"required"),"proto3"===this.syntax&&this.type!==e.TYPES.message&&r(typeof t,"proto3 field without field presence cannot be null"),null;var o;if(this.repeated&&!n){Array.isArray(t)||(t=[t]);var s=[];for(o=0;o<t.length;o++)s.push(this.element.verifyValue(t[o]));return s}return this.map&&!n?t instanceof e.Map?t:(t instanceof Object||r(typeof t,"expected ProtoBuf.Map or raw object for map field"),new e.Map(this,t)):(!this.repeated&&Array.isArray(t)&&r(typeof t,"no array expected"),this.element.verifyValue(t))},v.hasWirePresence=function(t,n){if("proto3"!==this.syntax)return null!==t;if(this.oneof&&n[this.oneof.name]===this.name)return!0;switch(this.type){case e.TYPES.int32:case e.TYPES.sint32:case e.TYPES.sfixed32:case e.TYPES.uint32:case e.TYPES.fixed32:return 0!==t;case e.TYPES.int64:case e.TYPES.sint64:case e.TYPES.sfixed64:case e.TYPES.uint64:case e.TYPES.fixed64:return 0!==t.low||0!==t.high;case e.TYPES.bool:return t;case e.TYPES.float:case e.TYPES.double:return 0!==t;case e.TYPES.string:return t.length>0;case e.TYPES.bytes:return t.remaining()>0;case e.TYPES.enum:return 0!==t;case e.TYPES.message:return null!==t;default:return!0}},v.encode=function(n,r,i){if(null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===n||this.repeated&&0==n.length)return r;try{if(this.repeated){var o;if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){r.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),r.ensureCapacity(r.offset+=1);var s=r.offset;for(o=0;o<n.length;o++)this.element.encodeValue(this.id,n[o],r);var a=r.offset-s,u=t.calculateVarint32(a);if(u>1){var c=r.slice(s,r.offset);s+=u-1,r.offset=s,r.append(c)}r.writeVarint32(a,s-u)}else for(o=0;o<n.length;o++)r.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,n[o],r)}else this.map?n.forEach(function(n,i,o){var s=t.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,i)+t.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,n);r.writeVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),r.writeVarint32(s),r.writeVarint32(8|this.keyType.wireType),this.keyElement.encodeValue(1,i,r),r.writeVarint32(16|this.type.wireType),this.element.encodeValue(2,n,r)},this):this.hasWirePresence(n,i)&&(r.writeVarint32(this.id<<3|this.type.wireType),this.element.encodeValue(this.id,n,r))}catch(t){throw Error("Illegal value for "+this.toString(!0)+": "+n+" ("+t+")")}return r},v.calculate=function(n,r){if(n=this.verifyValue(n),null===this.type||"object"!=typeof this.type)throw Error("[INTERNAL] Unresolved type in "+this.toString(!0)+": "+this.type);if(null===n||this.repeated&&0==n.length)return 0;var i=0;try{if(this.repeated){var o,s;if(this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0){for(i+=t.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),s=0,o=0;o<n.length;o++)s+=this.element.calculateLength(this.id,n[o]);i+=t.calculateVarint32(s),i+=s}else for(o=0;o<n.length;o++)i+=t.calculateVarint32(this.id<<3|this.type.wireType),i+=this.element.calculateLength(this.id,n[o])}else this.map?n.forEach(function(n,r,o){var s=t.calculateVarint32(8|this.keyType.wireType)+this.keyElement.calculateLength(1,r)+t.calculateVarint32(16|this.type.wireType)+this.element.calculateLength(2,n);i+=t.calculateVarint32(this.id<<3|e.WIRE_TYPES.LDELIM),i+=t.calculateVarint32(s),i+=s},this):this.hasWirePresence(n,r)&&(i+=t.calculateVarint32(this.id<<3|this.type.wireType),i+=this.element.calculateLength(this.id,n))}catch(t){throw Error("Illegal value for "+this.toString(!0)+": "+n+" ("+t+")")}return i},v.decode=function(t,n,r){var i,o;if(!(!this.map&&t==this.type.wireType||!r&&this.repeated&&this.options.packed&&t==e.WIRE_TYPES.LDELIM||this.map&&t==e.WIRE_TYPES.LDELIM))throw Error("Illegal wire type for field "+this.toString(!0)+": "+t+" ("+this.type.wireType+" expected)");if(t==e.WIRE_TYPES.LDELIM&&this.repeated&&this.options.packed&&e.PACKABLE_WIRE_TYPES.indexOf(this.type.wireType)>=0&&!r){o=n.readVarint32(),o=n.offset+o;for(var s=[];n.offset<o;)s.push(this.decode(this.type.wireType,n,!0));return s}if(this.map){var a=f.defaultFieldValue(this.keyType);if(i=f.defaultFieldValue(this.type),o=n.readVarint32(),n.remaining()<o)throw Error("Illegal number of bytes for "+this.toString(!0)+": "+o+" required but got only "+n.remaining());var u=n.clone();for(u.limit=u.offset+o,n.offset+=o;u.remaining()>0;){var c=u.readVarint32();t=7&c;var l=c>>>3;if(1===l)a=this.keyElement.decode(u,t,l);else{if(2!==l)throw Error("Unexpected tag in map field key/value submessage");i=this.element.decode(u,t,l)}}return[a,i]}return this.element.decode(n,t,this.id)},o.Message.Field=p;var m=function(t,e,n,r,i,o,s){p.call(this,t,e,n,null,r,i,o,s),this.extension};m.prototype=Object.create(p.prototype),o.Message.ExtensionField=m;var y=function(t,e,n){s.call(this,t,e,n),this.fields=[]};o.Message.OneOf=y;var g=function(t,e,n,r,i){u.call(this,t,e,n,r,i),this.className="Enum",this.object=null};g.getName=function(t,e){for(var n,r=Object.keys(t),i=0;i<r.length;++i)if(t[n=r[i]]===e)return n;return null},(g.prototype=Object.create(u.prototype)).build=function(t){if(this.object&&!t)return this.object;for(var n=new e.Builder.Enum,r=this.getChildren(g.Value),i=0,o=r.length;i<o;++i)n[r[i].name]=r[i].id;return Object.defineProperty&&Object.defineProperty(n,"$options",{value:this.buildOpt(),enumerable:!1}),this.object=n},o.Enum=g;var b=function(t,e,n,r){s.call(this,t,e,n),this.className="Enum.Value",this.id=r};b.prototype=Object.create(s.prototype),o.Enum.Value=b;var _=function(t,e,n,r){s.call(this,t,e,n),this.field=r};_.prototype=Object.create(s.prototype),o.Extension=_;var w=function(t,e,n,r){u.call(this,t,e,n,r),this.className="Service",this.clazz=null};(w.prototype=Object.create(u.prototype)).build=function(n){return this.clazz&&!n?this.clazz:this.clazz=function(e,n){for(var r=function(t){e.Builder.Service.call(this),this.rpcImpl=t||function(t,e,n){setTimeout(n.bind(this,Error("Not implemented, see: https://github.com/dcodeIO/ProtoBuf.js/wiki/Services")),0)}},i=r.prototype=Object.create(e.Builder.Service.prototype),o=n.getChildren(e.Reflect.Service.RPCMethod),s=0;s<o.length;s++)!function(e){i[e.name]=function(r,i){try{try{r=e.resolvedRequestType.clazz.decode(t.wrap(r))}catch(t){if(!(t instanceof TypeError))throw t}if(null===r||"object"!=typeof r)throw Error("Illegal arguments");r instanceof e.resolvedRequestType.clazz||(r=new e.resolvedRequestType.clazz(r)),this.rpcImpl(e.fqn(),r,function(t,r){if(t)return void i(t);null===r&&(r="");try{r=e.resolvedResponseType.clazz.decode(r)}catch(t){}if(!(r&&r instanceof e.resolvedResponseType.clazz))return void i(Error("Illegal response type received in service method "+n.name+"#"+e.name));i(null,r)})}catch(t){setTimeout(i.bind(this,t),0)}},r[e.name]=function(t,n,i){new r(t)[e.name](n,i)},Object.defineProperty&&(Object.defineProperty(r[e.name],"$options",{value:e.buildOpt()}),Object.defineProperty(i[e.name],"$options",{value:r[e.name].$options}))}(o[s]);return Object.defineProperty&&(Object.defineProperty(r,"$options",{value:n.buildOpt()}),Object.defineProperty(i,"$options",{value:r.$options}),Object.defineProperty(r,"$type",{value:n}),Object.defineProperty(i,"$type",{value:n})),r}(e,this)},o.Service=w;var E=function(t,e,n,r){s.call(this,t,e,n),this.className="Service.Method",this.options=r||{}};(E.prototype=Object.create(s.prototype)).buildOpt=c.buildOpt,o.Service.Method=E;var O=function(t,e,n,r,i,o,s,a){E.call(this,t,e,n,a),this.className="Service.RPCMethod",this.requestName=r,this.responseName=i,this.requestStream=o,this.responseStream=s,this.resolvedRequestType=null,this.resolvedResponseType=null};return O.prototype=Object.create(E.prototype),o.Service.RPCMethod=O,o}(r),r.Builder=function(t,e,r){function i(t){t.messages&&t.messages.forEach(function(e){e.syntax=t.syntax,i(e)}),t.enums&&t.enums.forEach(function(e){e.syntax=t.syntax})}var o=function(t){this.ns=new r.Namespace(this,null,""),this.ptr=this.ns,this.resolved=!1,this.result=null,this.files={},this.importRoot=null,this.options=t||{}},s=o.prototype;return o.isMessage=function(t){return"string"==typeof t.name&&(void 0===t.values&&void 0===t.rpc)},o.isMessageField=function(t){return"string"==typeof t.rule&&"string"==typeof t.name&&"string"==typeof t.type&&void 0!==t.id},o.isEnum=function(t){return"string"==typeof t.name&&!(void 0===t.values||!Array.isArray(t.values)||0===t.values.length)},o.isService=function(t){return!("string"!=typeof t.name||"object"!=typeof t.rpc||!t.rpc)},o.isExtend=function(t){return"string"==typeof t.ref},s.reset=function(){return this.ptr=this.ns,this},s.define=function(t){if("string"!=typeof t||!e.TYPEREF.test(t))throw Error("illegal namespace: "+t);return t.split(".").forEach(function(t){var e=this.ptr.getChild(t);null===e&&this.ptr.addChild(e=new r.Namespace(this,this.ptr,t)),this.ptr=e},this),this},s.create=function(e){if(!e)return this;if(Array.isArray(e)){if(0===e.length)return this;e=e.slice()}else e=[e];for(var n=[e];n.length>0;){if(e=n.pop(),!Array.isArray(e))throw Error("not a valid namespace: "+JSON.stringify(e));for(;e.length>0;){var i=e.shift();if(o.isMessage(i)){var s=new r.Message(this,this.ptr,i.name,i.options,i.isGroup,i.syntax),a={};i.oneofs&&Object.keys(i.oneofs).forEach(function(t){s.addChild(a[t]=new r.Message.OneOf(this,s,t))},this),i.fields&&i.fields.forEach(function(t){if(null!==s.getChild(0|t.id))throw Error("duplicate or invalid field id in "+s.name+": "+t.id);if(t.options&&"object"!=typeof t.options)throw Error("illegal field options in "+s.name+"#"+t.name);var e=null;if("string"==typeof t.oneof&&!(e=a[t.oneof]))throw Error("illegal oneof in "+s.name+"#"+t.name+": "+t.oneof);t=new r.Message.Field(this,s,t.rule,t.keytype,t.type,t.name,t.id,t.options,e,i.syntax),e&&e.fields.push(t),s.addChild(t)},this);var u=[];if(i.enums&&i.enums.forEach(function(t){u.push(t)}),i.messages&&i.messages.forEach(function(t){u.push(t)}),i.services&&i.services.forEach(function(t){u.push(t)}),i.extensions&&("number"==typeof i.extensions[0]?s.extensions=[i.extensions]:s.extensions=i.extensions),this.ptr.addChild(s),u.length>0){n.push(e),e=u,u=null,this.ptr=s,s=null;continue}u=null}else if(o.isEnum(i))s=new r.Enum(this,this.ptr,i.name,i.options,i.syntax),i.values.forEach(function(t){s.addChild(new r.Enum.Value(this,s,t.name,t.id))},this),this.ptr.addChild(s);else if(o.isService(i))s=new r.Service(this,this.ptr,i.name,i.options),Object.keys(i.rpc).forEach(function(t){var e=i.rpc[t];s.addChild(new r.Service.RPCMethod(this,s,t,e.request,e.response,!!e.request_stream,!!e.response_stream,e.options))},this),this.ptr.addChild(s);else{if(!o.isExtend(i))throw Error("not a valid definition: "+JSON.stringify(i));if(s=this.ptr.resolve(i.ref,!0))i.fields.forEach(function(e){if(null!==s.getChild(0|e.id))throw Error("duplicate extended field id in "+s.name+": "+e.id);if(s.extensions){var n=!1;if(s.extensions.forEach(function(t){e.id>=t[0]&&e.id<=t[1]&&(n=!0)}),!n)throw Error("illegal extended field id in "+s.name+": "+e.id+" (not within valid ranges)")}var i=e.name;this.options.convertFieldsToCamelCase&&(i=t.Util.toCamelCase(i));var o=new r.Message.ExtensionField(this,s,e.rule,e.type,this.ptr.fqn()+"."+i,e.id,e.options),a=new r.Extension(this,this.ptr,e.name,o);o.extension=a,this.ptr.addChild(a),s.addChild(o)},this);else if(!/\.?google\.protobuf\./.test(i.ref))throw Error("extended message "+i.ref+" is not defined")}i=null,s=null}e=null,this.ptr=this.ptr.parent}return this.resolved=!1,this.result=null,this},s.import=function(e,r){var o="/";if("string"==typeof r){if(t.Util.IS_NODE&&(r=n(77).resolve(r)),!0===this.files[r])return this.reset();this.files[r]=!0}else if("object"==typeof r){var s=r.root;t.Util.IS_NODE&&(s=n(77).resolve(s)),(s.indexOf("\\")>=0||r.file.indexOf("\\")>=0)&&(o="\\");var a;if(a=t.Util.IS_NODE?n(77).join(s,r.file):s+o+r.file,!0===this.files[a])return this.reset();this.files[a]=!0}if(e.imports&&e.imports.length>0){var u,c=!1;"object"==typeof r?(this.importRoot=r.root,c=!0,u=this.importRoot,r=r.file,(u.indexOf("\\")>=0||r.indexOf("\\")>=0)&&(o="\\")):"string"==typeof r?this.importRoot?u=this.importRoot:r.indexOf("/")>=0?""===(u=r.replace(/\/[^\/]*$/,""))&&(u="/"):r.indexOf("\\")>=0?(u=r.replace(/\\[^\\]*$/,""),o="\\"):u=".":u=null;for(var f=0;f<e.imports.length;f++)if("string"==typeof e.imports[f]){if(!u)throw Error("cannot determine import root");var l=e.imports[f];if("google/protobuf/descriptor.proto"===l)continue;if(l=t.Util.IS_NODE?n(77).join(u,l):u+o+l,!0===this.files[l])continue;/\.proto$/i.test(l)&&!t.DotProto&&(l=l.replace(/\.proto$/,".json"));var h=t.Util.fetch(l);if(null===h)throw Error("failed to import '"+l+"' in '"+r+"': file not found");/\.json$/i.test(l)?this.import(JSON.parse(h+""),l):this.import(t.DotProto.Parser.parse(h),l)}else r?/\.(\w+)$/.test(r)?this.import(e.imports[f],r.replace(/^(.+)\.(\w+)$/,function(t,e,n){return e+"_import"+f+"."+n})):this.import(e.imports[f],r+"_import"+f):this.import(e.imports[f]);c&&(this.importRoot=null)}e.package&&this.define(e.package),e.syntax&&i(e);var d=this.ptr;return e.options&&Object.keys(e.options).forEach(function(t){d.options[t]=e.options[t]}),e.messages&&(this.create(e.messages),this.ptr=d),e.enums&&(this.create(e.enums),this.ptr=d),e.services&&(this.create(e.services),this.ptr=d),e.extends&&this.create(e.extends),this.reset()},s.resolveAll=function(){var n;if(null==this.ptr||"object"==typeof this.ptr.type)return this;if(this.ptr instanceof r.Namespace)this.ptr.children.forEach(function(t){this.ptr=t,this.resolveAll()},this);else if(this.ptr instanceof r.Message.Field){if(e.TYPE.test(this.ptr.type))this.ptr.type=t.TYPES[this.ptr.type];else{if(!e.TYPEREF.test(this.ptr.type))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(!(n=(this.ptr instanceof r.Message.ExtensionField?this.ptr.extension.parent:this.ptr.parent).resolve(this.ptr.type,!0)))throw Error("unresolvable type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);if(this.ptr.resolvedType=n,n instanceof r.Enum){if(this.ptr.type=t.TYPES.enum,"proto3"===this.ptr.syntax&&"proto3"!==n.syntax)throw Error("proto3 message cannot reference proto2 enum")}else{if(!(n instanceof r.Message))throw Error("illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.type);this.ptr.type=n.isGroup?t.TYPES.group:t.TYPES.message}}if(this.ptr.map){if(!e.TYPE.test(this.ptr.keyType))throw Error("illegal key type for map field in "+this.ptr.toString(!0)+": "+this.ptr.keyType);this.ptr.keyType=t.TYPES[this.ptr.keyType]}"proto3"===this.ptr.syntax&&this.ptr.repeated&&void 0===this.ptr.options.packed&&-1!==t.PACKABLE_WIRE_TYPES.indexOf(this.ptr.type.wireType)&&(this.ptr.options.packed=!0)}else if(this.ptr instanceof t.Reflect.Service.Method){if(!(this.ptr instanceof t.Reflect.Service.RPCMethod))throw Error("illegal service type in "+this.ptr.toString(!0));if(!((n=this.ptr.parent.resolve(this.ptr.requestName,!0))&&n instanceof t.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.requestName);if(this.ptr.resolvedRequestType=n,!((n=this.ptr.parent.resolve(this.ptr.responseName,!0))&&n instanceof t.Reflect.Message))throw Error("Illegal type reference in "+this.ptr.toString(!0)+": "+this.ptr.responseName);this.ptr.resolvedResponseType=n}else if(!(this.ptr instanceof t.Reflect.Message.OneOf||this.ptr instanceof t.Reflect.Extension||this.ptr instanceof t.Reflect.Enum.Value))throw Error("illegal object in namespace: "+typeof this.ptr+": "+this.ptr);return this.reset()},s.build=function(t){if(this.reset(),this.resolved||(this.resolveAll(),this.resolved=!0,this.result=null),null===this.result&&(this.result=this.ns.build()),!t)return this.result;for(var e="string"==typeof t?t.split("."):t,n=this.result,r=0;r<e.length;r++){if(!n[e[r]]){n=null;break}n=n[e[r]]}return n},s.lookup=function(t,e){return t?this.ns.resolve(t,e):this.ns},s.toString=function(){return"Builder"},o.Message=function(){},o.Enum=function(){},o.Service=function(){},o}(r,r.Lang,r.Reflect),r.Map=function(t,e){function n(t){var e=0;return{next:function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}}var r=function(t,n){if(!t.map)throw Error("field is not a map");if(this.field=t,this.keyElem=new e.Element(t.keyType,null,!0,t.syntax),this.valueElem=new e.Element(t.type,t.resolvedType,!1,t.syntax),this.map={},Object.defineProperty(this,"size",{get:function(){return Object.keys(this.map).length}}),n)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=this.keyElem.valueFromString(r[i]),s=this.valueElem.verifyValue(n[r[i]]);this.map[this.keyElem.valueToString(o)]={key:o,value:s}}},i=r.prototype;return i.clear=function(){this.map={}},i.delete=function(t){var e=this.keyElem.valueToString(this.keyElem.verifyValue(t)),n=e in this.map;return delete this.map[e],n},i.entries=function(){for(var t,e=[],r=Object.keys(this.map),i=0;i<r.length;i++)e.push([(t=this.map[r[i]]).key,t.value]);return n(e)},i.keys=function(){for(var t=[],e=Object.keys(this.map),r=0;r<e.length;r++)t.push(this.map[e[r]].key);return n(t)},i.values=function(){for(var t=[],e=Object.keys(this.map),r=0;r<e.length;r++)t.push(this.map[e[r]].value);return n(t)},i.forEach=function(t,e){for(var n,r=Object.keys(this.map),i=0;i<r.length;i++)t.call(e,(n=this.map[r[i]]).value,n.key,this)},i.set=function(t,e){var n=this.keyElem.verifyValue(t),r=this.valueElem.verifyValue(e);return this.map[this.keyElem.valueToString(n)]={key:n,value:r},this},i.get=function(t){var e=this.keyElem.valueToString(this.keyElem.verifyValue(t));if(e in this.map)return this.map[e].value},i.has=function(t){return this.keyElem.valueToString(this.keyElem.verifyValue(t))in this.map},r}(0,r.Reflect),r.newBuilder=function(t){return t=t||{},void 0===t.convertFieldsToCamelCase&&(t.convertFieldsToCamelCase=r.convertFieldsToCamelCase),void 0===t.populateAccessors&&(t.populateAccessors=r.populateAccessors),new r.Builder(t)},r.loadJson=function(t,e,n){return("string"==typeof e||e&&"string"==typeof e.file&&"string"==typeof e.root)&&(n=e,e=null),e&&"object"==typeof e||(e=r.newBuilder()),"string"==typeof t&&(t=JSON.parse(t)),e.import(t,n),e.resolveAll(),e},r.loadJsonFile=function(t,e,n){if(e&&"object"==typeof e?(n=e,e=null):e&&"function"==typeof e||(e=null),e)return r.Util.fetch("string"==typeof t?t:t.root+"/"+t.file,function(i){if(null===i)return void e(Error("Failed to fetch file"));try{e(null,r.loadJson(JSON.parse(i),n,t))}catch(t){e(t)}});var i=r.Util.fetch("object"==typeof t?t.root+"/"+t.file:t);return null===i?null:r.loadJson(JSON.parse(i),n,t)},r})},function(t,e,n){var r,i,o;/**
27 * @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
28 * Backing buffer: ArrayBuffer, Accessor: Uint8Array
29 * Released under the Apache License, Version 2.0
30 * see: https://github.com/dcodeIO/bytebuffer.js for details
31 */
32!function(s,a){i=[n(411)],r=a,void 0!==(o="function"==typeof r?r.apply(e,i):r)&&(t.exports=o)}(0,function(t){"use strict";function e(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function n(){var t=[],e=[];return function(){if(0===arguments.length)return e.join("")+u.apply(String,t);t.length+arguments.length>1024&&(e.push(u.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function r(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,f=-7,l=n?i-1:0,h=n?-1:1,d=t[e+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=c}return(d?-1:1)*s*Math.pow(2,o-r)}function i(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+l>=1?h/u:h*Math.pow(2,1-l),e*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[n+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+d]=255&s,d+=p,s/=256,c-=8);t[n+d-p]|=128*v}var o=function(t,e,n){if(void 0===t&&(t=o.DEFAULT_CAPACITY),void 0===e&&(e=o.DEFAULT_ENDIAN),void 0===n&&(n=o.DEFAULT_NOASSERT),!n){if((t|=0)<0)throw RangeError("Illegal capacity");e=!!e,n=!!n}this.buffer=0===t?a:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=e,this.noAssert=n};o.VERSION="5.0.1",o.LITTLE_ENDIAN=!0,o.BIG_ENDIAN=!1,o.DEFAULT_CAPACITY=16,o.DEFAULT_ENDIAN=o.BIG_ENDIAN,o.DEFAULT_NOASSERT=!1,o.Long=t||null;var s=o.prototype;s.__isByteBuffer__,Object.defineProperty(s,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var a=new ArrayBuffer(0),u=String.fromCharCode;o.accessor=function(){return Uint8Array},o.allocate=function(t,e,n){return new o(t,e,n)},o.concat=function(t,e,n,r){"boolean"!=typeof e&&"string"==typeof e||(r=n,n=e,e=void 0);for(var i,s=0,a=0,u=t.length;a<u;++a)o.isByteBuffer(t[a])||(t[a]=o.wrap(t[a],e)),(i=t[a].limit-t[a].offset)>0&&(s+=i);if(0===s)return new o(0,n,r);var c,f=new o(s,n,r);for(a=0;a<u;)c=t[a++],(i=c.limit-c.offset)<=0||(f.view.set(c.view.subarray(c.offset,c.limit),f.offset),f.offset+=i);return f.limit=f.offset,f.offset=0,f},o.isByteBuffer=function(t){return!0===(t&&t.__isByteBuffer__)},o.type=function(){return ArrayBuffer},o.wrap=function(t,e,n,r){if("string"!=typeof e&&(r=n,n=e,e=void 0),"string"==typeof t)switch(void 0===e&&(e="utf8"),e){case"base64":return o.fromBase64(t,n);case"hex":return o.fromHex(t,n);case"binary":return o.fromBinary(t,n);case"utf8":return o.fromUTF8(t,n);case"debug":return o.fromDebug(t,n);default:throw Error("Unsupported encoding: "+e)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var i;if(o.isByteBuffer(t))return i=s.clone.call(t),i.markedOffset=-1,i;if(t instanceof Uint8Array)i=new o(0,n,r),t.length>0&&(i.buffer=t.buffer,i.offset=t.byteOffset,i.limit=t.byteOffset+t.byteLength,i.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)i=new o(0,n,r),t.byteLength>0&&(i.buffer=t,i.offset=0,i.limit=t.byteLength,i.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");i=new o(t.length,n,r),i.limit=t.length;for(var a=0;a<t.length;++a)i.view[a]=t[a]}return i},s.writeBitSet=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if(!(t instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,i=e,o=t.length,s=o>>3,a=0;for(e+=this.writeVarint32(o,e);s--;)r=1&!!t[a++]|(1&!!t[a++])<<1|(1&!!t[a++])<<2|(1&!!t[a++])<<3|(1&!!t[a++])<<4|(1&!!t[a++])<<5|(1&!!t[a++])<<6|(1&!!t[a++])<<7,this.writeByte(r,e++);if(a<o){var u=0;for(r=0;a<o;)r|=(1&!!t[a++])<<u++;this.writeByte(r,e++)}return n?(this.offset=e,this):e-i},s.readBitSet=function(t){var e=void 0===t;e&&(t=this.offset);var n,r=this.readVarint32(t),i=r.value,o=i>>3,s=0,a=[];for(t+=r.length;o--;)n=this.readByte(t++),a[s++]=!!(1&n),a[s++]=!!(2&n),a[s++]=!!(4&n),a[s++]=!!(8&n),a[s++]=!!(16&n),a[s++]=!!(32&n),a[s++]=!!(64&n),a[s++]=!!(128&n);if(s<i){var u=0;for(n=this.readByte(t++);s<i;)a[s++]=!!(n>>u++&1)}return e&&(this.offset=t),a},s.readBytes=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var r=this.slice(e,e+t);return n&&(this.offset+=t),r},s.writeBytes=s.append,s.writeInt8=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,n&&(this.offset+=1),this},s.writeByte=s.writeInt8,s.readInt8=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=this.view[t];return 128==(128&n)&&(n=-(255-n+1)),e&&(this.offset+=1),n},s.readByte=s.readInt8,s.writeUint8=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,n&&(this.offset+=1),this},s.writeUInt8=s.writeUint8,s.readUint8=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=this.view[t];return e&&(this.offset+=1),n},s.readUInt8=s.readUint8,s.writeInt16=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),n&&(this.offset+=2),this},s.writeShort=s.writeInt16,s.readInt16=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[t],n|=this.view[t+1]<<8):(n=this.view[t]<<8,n|=this.view[t+1]),32768==(32768&n)&&(n=-(65535-n+1)),e&&(this.offset+=2),n},s.readShort=s.readInt16,s.writeUint16=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),n&&(this.offset+=2),this},s.writeUInt16=s.writeUint16,s.readUint16=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[t],n|=this.view[t+1]<<8):(n=this.view[t]<<8,n|=this.view[t+1]),e&&(this.offset+=2),n},s.readUInt16=s.readUint16,s.writeInt32=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),n&&(this.offset+=4),this},s.writeInt=s.writeInt32,s.readInt32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[t+2]<<16,n|=this.view[t+1]<<8,n|=this.view[t],n+=this.view[t+3]<<24>>>0):(n=this.view[t+1]<<16,n|=this.view[t+2]<<8,n|=this.view[t+3],n+=this.view[t]<<24>>>0),n|=0,e&&(this.offset+=4),n},s.readInt=s.readInt32,s.writeUint32=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),n&&(this.offset+=4),this},s.writeUInt32=s.writeUint32,s.readUint32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=0;return this.littleEndian?(n=this.view[t+2]<<16,n|=this.view[t+1]<<8,n|=this.view[t],n+=this.view[t+3]<<24>>>0):(n=this.view[t+1]<<16,n|=this.view[t+2]<<8,n|=this.view[t+3],n+=this.view[t]<<24>>>0),e&&(this.offset+=4),n},s.readUInt32=s.readUint32,t&&(s.writeInt64=function(e,n){var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),n+=8;var i=this.buffer.byteLength;n>i&&this.resize((i*=2)>n?i:n),n-=8;var o=e.low,s=e.high;return this.littleEndian?(this.view[n+3]=o>>>24&255,this.view[n+2]=o>>>16&255,this.view[n+1]=o>>>8&255,this.view[n]=255&o,n+=4,this.view[n+3]=s>>>24&255,this.view[n+2]=s>>>16&255,this.view[n+1]=s>>>8&255,this.view[n]=255&s):(this.view[n]=s>>>24&255,this.view[n+1]=s>>>16&255,this.view[n+2]=s>>>8&255,this.view[n+3]=255&s,n+=4,this.view[n]=o>>>24&255,this.view[n+1]=o>>>16&255,this.view[n+2]=o>>>8&255,this.view[n+3]=255&o),r&&(this.offset+=8),this},s.writeLong=s.writeInt64,s.readInt64=function(e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,i=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var o=new t(r,i,!1);return n&&(this.offset+=8),o},s.readLong=s.readInt64,s.writeUint64=function(e,n){var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),n+=8;var i=this.buffer.byteLength;n>i&&this.resize((i*=2)>n?i:n),n-=8;var o=e.low,s=e.high;return this.littleEndian?(this.view[n+3]=o>>>24&255,this.view[n+2]=o>>>16&255,this.view[n+1]=o>>>8&255,this.view[n]=255&o,n+=4,this.view[n+3]=s>>>24&255,this.view[n+2]=s>>>16&255,this.view[n+1]=s>>>8&255,this.view[n]=255&s):(this.view[n]=s>>>24&255,this.view[n+1]=s>>>16&255,this.view[n+2]=s>>>8&255,this.view[n+3]=255&s,n+=4,this.view[n]=o>>>24&255,this.view[n+1]=o>>>16&255,this.view[n+2]=o>>>8&255,this.view[n+3]=255&o),r&&(this.offset+=8),this},s.writeUInt64=s.writeUint64,s.readUint64=function(e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,i=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var o=new t(r,i,!0);return n&&(this.offset+=8),o},s.readUInt64=s.readUint64),s.writeFloat32=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,i(this.view,t,e,this.littleEndian,23,4),n&&(this.offset+=4),this},s.writeFloat=s.writeFloat32,s.readFloat32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=r(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),n},s.readFloat=s.readFloat32,s.writeFloat64=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=8,i(this.view,t,e,this.littleEndian,52,8),n&&(this.offset+=8),this},s.writeDouble=s.writeFloat64,s.readFloat64=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var n=r(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),n},s.readDouble=s.readFloat64,o.MAX_VARINT32_BYTES=5,o.calculateVarint32=function(t){return t>>>=0,t<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},o.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},o.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},s.writeVarint32=function(t,e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,i=o.calculateVarint32(t);e+=i;var s=this.buffer.byteLength;for(e>s&&this.resize((s*=2)>e?s:e),e-=i,t>>>=0;t>=128;)r=127&t|128,this.view[e++]=r,t>>>=7;return this.view[e++]=t,n?(this.offset=e,this):i},s.writeVarint32ZigZag=function(t,e){return this.writeVarint32(o.zigZagEncode32(t),e)},s.readVarint32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n,r=0,i=0;do{if(!this.noAssert&&t>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}n=this.view[t++],r<5&&(i|=(127&n)<<7*r),++r}while(0!=(128&n));return i|=0,e?(this.offset=t,i):{value:i,length:r}},s.readVarint32ZigZag=function(t){var e=this.readVarint32(t);return"object"==typeof e?e.value=o.zigZagDecode32(e.value):e=o.zigZagDecode32(e),e},t&&(o.MAX_VARINT64_BYTES=10,o.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var n=e.toInt()>>>0,r=e.shiftRightUnsigned(28).toInt()>>>0,i=e.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==r?n<16384?n<128?1:2:n<1<<21?3:4:r<16384?r<128?5:6:r<1<<21?7:8:i<128?9:10},o.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},o.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},s.writeVarint64=function(e,n){var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned());var i=o.calculateVarint64(e),s=e.toInt()>>>0,a=e.shiftRightUnsigned(28).toInt()>>>0,u=e.shiftRightUnsigned(56).toInt()>>>0;n+=i;var c=this.buffer.byteLength;switch(n>c&&this.resize((c*=2)>n?c:n),n-=i,i){case 10:this.view[n+9]=u>>>7&1;case 9:this.view[n+8]=9!==i?128|u:127&u;case 8:this.view[n+7]=8!==i?a>>>21|128:a>>>21&127;case 7:this.view[n+6]=7!==i?a>>>14|128:a>>>14&127;case 6:this.view[n+5]=6!==i?a>>>7|128:a>>>7&127;case 5:this.view[n+4]=5!==i?128|a:127&a;case 4:this.view[n+3]=4!==i?s>>>21|128:s>>>21&127;case 3:this.view[n+2]=3!==i?s>>>14|128:s>>>14&127;case 2:this.view[n+1]=2!==i?s>>>7|128:s>>>7&127;case 1:this.view[n]=1!==i?128|s:127&s}return r?(this.offset+=i,this):i},s.writeVarint64ZigZag=function(t,e){return this.writeVarint64(o.zigZagEncode64(t),e)},s.readVarint64=function(e){var n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r=e,i=0,o=0,s=0,a=0;if(a=this.view[e++],i=127&a,128&a&&(a=this.view[e++],i|=(127&a)<<7,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],i|=(127&a)<<14,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],i|=(127&a)<<21,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],o=127&a,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],o|=(127&a)<<7,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],o|=(127&a)<<14,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],o|=(127&a)<<21,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],s=127&a,(128&a||this.noAssert&&void 0===a)&&(a=this.view[e++],s|=(127&a)<<7,128&a||this.noAssert&&void 0===a))))))))))throw Error("Buffer overrun");var u=t.fromBits(i|o<<28,o>>>4|s<<24,!1);return n?(this.offset=e,u):{value:u,length:e-r}},s.readVarint64ZigZag=function(e){var n=this.readVarint64(e);return n&&n.value instanceof t?n.value=o.zigZagDecode64(n.value):n=o.zigZagDecode64(n),n}),s.writeCString=function(t,n){var r=void 0===n;r&&(n=this.offset);var i,o=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(i=0;i<o;++i)if(0===t.charCodeAt(i))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}o=f.calculateUTF16asUTF8(e(t))[1],n+=o+1;var s=this.buffer.byteLength;return n>s&&this.resize((s*=2)>n?s:n),n-=o+1,f.encodeUTF16toUTF8(e(t),function(t){this.view[n++]=t}.bind(this)),this.view[n++]=0,r?(this.offset=n,this):o},s.readCString=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,i=t,o=-1;return f.decodeUTF8toUTF16(function(){if(0===o)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return o=this.view[t++],0===o?null:o}.bind(this),r=n(),!0),e?(this.offset=t,r()):{string:r(),length:t-i}},s.writeIString=function(t,n){var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i,o=n;i=f.calculateUTF16asUTF8(e(t),this.noAssert)[1],n+=4+i;var s=this.buffer.byteLength;if(n>s&&this.resize((s*=2)>n?s:n),n-=4+i,this.littleEndian?(this.view[n+3]=i>>>24&255,this.view[n+2]=i>>>16&255,this.view[n+1]=i>>>8&255,this.view[n]=255&i):(this.view[n]=i>>>24&255,this.view[n+1]=i>>>16&255,this.view[n+2]=i>>>8&255,this.view[n+3]=255&i),n+=4,f.encodeUTF16toUTF8(e(t),function(t){this.view[n++]=t}.bind(this)),n!==o+4+i)throw RangeError("Illegal range: Truncated data, "+n+" == "+(n+4+i));return r?(this.offset=n,this):n-o},s.readIString=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=t,r=this.readUint32(t),i=this.readUTF8String(r,o.METRICS_BYTES,t+=4);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-n}},o.METRICS_CHARS="c",o.METRICS_BYTES="b",s.writeUTF8String=function(t,n){var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i,o=n;i=f.calculateUTF16asUTF8(e(t))[1],n+=i;var s=this.buffer.byteLength;return n>s&&this.resize((s*=2)>n?s:n),n-=i,f.encodeUTF16toUTF8(e(t),function(t){this.view[n++]=t}.bind(this)),r?(this.offset=n,this):n-o},s.writeString=s.writeUTF8String,o.calculateUTF8Chars=function(t){return f.calculateUTF16asUTF8(e(t))[0]},o.calculateUTF8Bytes=function(t){return f.calculateUTF16asUTF8(e(t))[1]},o.calculateString=o.calculateUTF8Bytes,s.readUTF8String=function(t,e,r){"number"==typeof e&&(r=e,e=void 0);var i=void 0===r;if(i&&(r=this.offset),void 0===e&&(e=o.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var s,a=0,u=r;if(e===o.METRICS_CHARS){if(s=n(),f.decodeUTF8(function(){return a<t&&r<this.limit?this.view[r++]:null}.bind(this),function(t){++a,f.UTF8toUTF16(t,s)}),a!==t)throw RangeError("Illegal range: Truncated data, "+a+" == "+t);return i?(this.offset=r,s()):{string:s(),length:r-u}}if(e===o.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+"+t+") <= "+this.buffer.byteLength)}var c=r+t;if(f.decodeUTF8toUTF16(function(){return r<c?this.view[r++]:null}.bind(this),s=n(),this.noAssert),r!==c)throw RangeError("Illegal range: Truncated data, "+r+" == "+c);return i?(this.offset=r,s()):{string:s(),length:r-u}}throw TypeError("Unsupported metrics: "+e)},s.readString=s.readUTF8String,s.writeVString=function(t,n){var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var i,s,a=n;i=f.calculateUTF16asUTF8(e(t),this.noAssert)[1],s=o.calculateVarint32(i),n+=s+i;var u=this.buffer.byteLength;if(n>u&&this.resize((u*=2)>n?u:n),n-=s+i,n+=this.writeVarint32(i,n),f.encodeUTF16toUTF8(e(t),function(t){this.view[n++]=t}.bind(this)),n!==a+i+s)throw RangeError("Illegal range: Truncated data, "+n+" == "+(n+i+s));return r?(this.offset=n,this):n-a},s.readVString=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=t,r=this.readVarint32(t),i=this.readUTF8String(r.value,o.METRICS_BYTES,t+=r.length);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-n}},s.append=function(t,e,n){"number"!=typeof e&&"string"==typeof e||(n=e,e=void 0);var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;n+=i;var s=this.buffer.byteLength;return n>s&&this.resize((s*=2)>n?s:n),n-=i,this.view.set(t.view.subarray(t.offset,t.limit),n),t.offset+=i,r&&(this.offset+=i),this},s.appendTo=function(t,e){return t.append(this,e),this},s.assert=function(t){return this.noAssert=!t,this},s.capacity=function(){return this.buffer.byteLength},s.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},s.clone=function(t){var e=new o(0,this.littleEndian,this.noAssert);return t?(e.buffer=new ArrayBuffer(this.buffer.byteLength),e.view=new Uint8Array(e.buffer)):(e.buffer=this.buffer,e.view=this.view),e.offset=this.offset,e.markedOffset=this.markedOffset,e.limit=this.limit,e},s.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(0===t&&e===this.buffer.byteLength)return this;var n=e-t;if(0===n)return this.buffer=a,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var r=new ArrayBuffer(n),i=new Uint8Array(r);return i.set(this.view.subarray(t,e)),this.buffer=r,this.view=i,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=n,this},s.copy=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(t===e)return new o(0,this.littleEndian,this.noAssert);var n=e-t,r=new o(n,this.littleEndian,this.noAssert);return r.offset=0,r.limit=n,r.markedOffset>=0&&(r.markedOffset-=t),this.copyTo(r,0,t,e),r},s.copyTo=function(t,e,n,r){var i,s;if(!this.noAssert&&!o.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(e=(s=void 0===e)?t.offset:0|e,n=(i=void 0===n)?this.offset:0|n,r=void 0===r?this.limit:0|r,e<0||e>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+e+" <= "+t.buffer.byteLength);if(n<0||r>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var a=r-n;return 0===a?t:(t.ensureCapacity(e+a),t.view.set(this.view.subarray(n,r),e),i&&(this.offset+=a),s&&(t.offset+=a),this)},s.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},s.fill=function(t,e,n){var r=void 0===e;if(r&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===n&&(n=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal end: Not an integer");if(n>>>=0,e<0||e>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+n+" <= "+this.buffer.byteLength)}if(e>=n)return this;for(;e<n;)this.view[e++]=t;return r&&(this.offset=e),this},s.flip=function(){return this.limit=this.offset,this.offset=0,this},s.mark=function(t){if(t=void 0===t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},s.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},s.LE=function(t){return this.littleEndian=void 0===t||!!t,this},s.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},s.prepend=function(t,e,n){"number"!=typeof e&&"string"==typeof e||(n=e,e=void 0);var r=void 0===n;if(r&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;var s=i-n;if(s>0){var a=new ArrayBuffer(this.buffer.byteLength+s),u=new Uint8Array(a);u.set(this.view.subarray(n,this.buffer.byteLength),i),this.buffer=a,this.view=u,this.offset+=s,this.markedOffset>=0&&(this.markedOffset+=s),this.limit+=s,n+=s}else{new Uint8Array(this.buffer)}return this.view.set(t.view.subarray(t.offset,t.limit),n-i),t.offset=t.limit,r&&(this.offset-=i),this},s.prependTo=function(t,e){return t.prepend(this,e),this},s.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},s.remaining=function(){return this.limit-this.offset},s.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},s.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength<t){var e=new ArrayBuffer(t),n=new Uint8Array(e);n.set(this.view),this.buffer=e,this.view=n}return this},s.reverse=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},s.skip=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal length: "+t+" (not an integer)");t|=0}var e=this.offset+t;if(!this.noAssert&&(e<0||e>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+t+" <= "+this.buffer.byteLength);return this.offset=e,this},s.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var n=this.clone();return n.offset=t,n.limit=e,n},s.toBuffer=function(t){var e=this.offset,n=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal limit: Not an integer");if(n>>>=0,e<0||e>n||n>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+n+" <= "+this.buffer.byteLength)}if(!t&&0===e&&n===this.buffer.byteLength)return this.buffer;if(e===n)return a;var r=new ArrayBuffer(n-e);return new Uint8Array(r).set(new Uint8Array(this.buffer).subarray(e,n),0),r},s.toArrayBuffer=s.toBuffer,s.toString=function(t,e,n){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(t="utf8",e=t,n=e),t){case"utf8":return this.toUTF8(e,n);case"base64":return this.toBase64(e,n);case"hex":return this.toHex(e,n);case"binary":return this.toBinary(e,n);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+t)}};var c=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],n=[],r=0,i=e.length;r<i;++r)n[e[r]]=r;return t.encode=function(t,n){for(var r,i;null!==(r=t());)n(e[r>>2&63]),i=(3&r)<<4,null!==(r=t())?(i|=r>>4&15,n(e[63&(i|r>>4&15)]),i=(15&r)<<2,null!==(r=t())?(n(e[63&(i|r>>6&3)]),n(e[63&r])):(n(e[63&i]),n(61))):(n(e[63&i]),n(61),n(61))},t.decode=function(t,e){function r(t){throw Error("Illegal character code: "+t)}for(var i,o,s;null!==(i=t());)if(o=n[i],void 0===o&&r(i),null!==(i=t())&&(s=n[i],void 0===s&&r(i),e(o<<2>>>0|(48&s)>>4),null!==(i=t()))){if(void 0===(o=n[i])){if(61===i)break;r(i)}if(e((15&s)<<4>>>0|(60&o)>>2),null!==(i=t())){if(void 0===(s=n[i])){if(61===i)break;r(i)}e((3&o)<<6>>>0|s)}}},t.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)},t}();s.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity||t>e)throw RangeError("begin, end");var r;return c.encode(function(){return t<e?this.view[t++]:null}.bind(this),r=n()),r()},o.fromBase64=function(t,n){if("string"!=typeof t)throw TypeError("str");var r=new o(t.length/4*3,n),i=0;return c.decode(e(t),function(t){r.view[i++]=t}),r.limit=i,r},o.btoa=function(t){return o.fromBinary(t).toBase64()},o.atob=function(t){return o.fromBase64(t).toBinary()},s.toBinary=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var n=[],r=[];t<e;)n.push(this.view[t++]),n.length>=1024&&(r.push(String.fromCharCode.apply(String,n)),n=[]);return r.join("")+String.fromCharCode.apply(String,n)},o.fromBinary=function(t,e){if("string"!=typeof t)throw TypeError("str");for(var n,r=0,i=t.length,s=new o(i,e);r<i;){if((n=t.charCodeAt(r))>255)throw RangeError("illegal char code: "+n);s.view[r++]=n}return s.limit=i,s},s.toDebug=function(t){for(var e,n=-1,r=this.buffer.byteLength,i="",o="",s="";n<r;){if(-1!==n&&(e=this.view[n],i+=e<16?"0"+e.toString(16).toUpperCase():e.toString(16).toUpperCase(),t&&(o+=e>32&&e<127?String.fromCharCode(e):".")),++n,t&&n>0&&n%16==0&&n!==r){for(;i.length<51;)i+=" ";s+=i+o+"\n",i=o=""}n===this.offset&&n===this.limit?i+=n===this.markedOffset?"!":"|":n===this.offset?i+=n===this.markedOffset?"[":"<":n===this.limit?i+=n===this.markedOffset?"]":">":i+=n===this.markedOffset?"'":t||0!==n&&n!==r?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";s+=i+o+"\n"}return t?s:i},o.fromDebug=function(t,e,n){for(var r,i,s=t.length,a=new o((s+1)/3|0,e,n),u=0,c=0,f=!1,l=!1,h=!1,d=!1,p=!1;u<s;){switch(r=t.charAt(u++)){case"!":if(!n){if(l||h||d){p=!0;break}l=h=d=!0}a.offset=a.markedOffset=a.limit=c,f=!1;break;case"|":if(!n){if(l||d){p=!0;break}l=d=!0}a.offset=a.limit=c,f=!1;break;case"[":if(!n){if(l||h){p=!0;break}l=h=!0}a.offset=a.markedOffset=c,f=!1;break;case"<":if(!n){if(l){p=!0;break}l=!0}a.offset=c,f=!1;break;case"]":if(!n){if(d||h){p=!0;break}d=h=!0}a.limit=a.markedOffset=c,f=!1;break;case">":if(!n){if(d){p=!0;break}d=!0}a.limit=c,f=!1;break;case"'":if(!n){if(h){p=!0;break}h=!0}a.markedOffset=c,f=!1;break;case" ":f=!1;break;default:if(!n&&f){p=!0;break}if(i=parseInt(r+t.charAt(u++),16),!n&&(isNaN(i)||i<0||i>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[c++]=i,f=!0}if(p)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!n){if(!l||!d)throw TypeError("Illegal str: Missing offset or limit");if(c<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+c+" < "+s)}return a},s.toHex=function(t,e){if(t=void 0===t?this.offset:t,e=void 0===e?this.limit:e,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}for(var n,r=new Array(e-t);t<e;)n=this.view[t++],n<16?r.push("0",n.toString(16)):r.push(n.toString(16));return r.join("")},o.fromHex=function(t,e,n){if(!n){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if(t.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var r,i=t.length,s=new o(i/2|0,e),a=0,u=0;a<i;a+=2){if(r=parseInt(t.substring(a,a+2),16),!n&&(!isFinite(r)||r<0||r>255))throw TypeError("Illegal str: Contains non-hex characters");s.view[u++]=r}return s.limit=u,s};var f=function(){var t={};return t.MAX_CODEPOINT=1114111,t.encodeUTF8=function(t,e){var n=null;for("number"==typeof t&&(n=t,t=function(){return null});null!==n||null!==(n=t());)n<128?e(127&n):n<2048?(e(n>>6&31|192),e(63&n|128)):n<65536?(e(n>>12&15|224),e(n>>6&63|128),e(63&n|128)):(e(n>>18&7|240),e(n>>12&63|128),e(n>>6&63|128),e(63&n|128)),n=null},t.decodeUTF8=function(t,e){for(var n,r,i,o,s=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(n=t());)if(0==(128&n))e(n);else if(192==(224&n))null===(r=t())&&s([n,r]),e((31&n)<<6|63&r);else if(224==(240&n))(null===(r=t())||null===(i=t()))&&s([n,r,i]),e((15&n)<<12|(63&r)<<6|63&i);else{if(240!=(248&n))throw RangeError("Illegal starting byte: "+n);(null===(r=t())||null===(i=t())||null===(o=t()))&&s([n,r,i,o]),e((7&n)<<18|(63&r)<<12|(63&i)<<6|63&o)}},t.UTF16toUTF8=function(t,e){for(var n,r=null;;){if(null===(n=null!==r?r:t()))break;n>=55296&&n<=57343&&null!==(r=t())&&r>=56320&&r<=57343?(e(1024*(n-55296)+r-56320+65536),r=null):e(n)}null!==r&&e(r)},t.UTF8toUTF16=function(t,e){var n=null;for("number"==typeof t&&(n=t,t=function(){return null});null!==n||null!==(n=t());)n<=65535?e(n):(n-=65536,e(55296+(n>>10)),e(n%1024+56320)),n=null},t.encodeUTF16toUTF8=function(e,n){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,n)})},t.decodeUTF8toUTF16=function(e,n){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,n)})},t.calculateCodePoint=function(t){return t<128?1:t<2048?2:t<65536?3:4},t.calculateUTF8=function(t){for(var e,n=0;null!==(e=t());)n+=e<128?1:e<2048?2:e<65536?3:4;return n},t.calculateUTF16asUTF8=function(e){var n=0,r=0;return t.UTF16toUTF8(e,function(t){++n,r+=t<128?1:t<2048?2:t<65536?3:4}),[n,r]},t}();return s.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var r;try{f.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),r=n())}catch(n){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return r()},o.fromUTF8=function(t,n,r){if(!r&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new o(f.calculateUTF16asUTF8(e(t),!0)[1],n,r),s=0;return f.encodeUTF16toUTF8(e(t),function(t){i.view[s++]=t}),i.limit=s,i},o})},function(t,e,n){var r,i,o;/**
33 * @license long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
34 * Released under the Apache License, Version 2.0
35 * see: https://github.com/dcodeIO/long.js for details
36 */
37!function(n,s){i=[],r=s,void 0!==(o="function"==typeof r?r.apply(e,i):r)&&(t.exports=o)}(0,function(){"use strict";function t(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function e(t){return!0===(t&&t.__isLong__)}function n(t,e){var n,r,o;return e?(t>>>=0,(o=0<=t&&t<256)&&(r=u[t])?r:(n=i(t,(0|t)<0?-1:0,!0),o&&(u[t]=n),n)):(t|=0,(o=-128<=t&&t<128)&&(r=a[t])?r:(n=i(t,t<0?-1:0,!1),o&&(a[t]=n),n))}function r(t,e){if(isNaN(t)||!isFinite(t))return e?v:p;if(e){if(t<0)return v;if(t>=l)return _}else{if(t<=-h)return w;if(t+1>=h)return b}return t<0?r(-t,e).neg():i(t%f|0,t/f|0,e)}function i(e,n,r){return new t(e,n,r)}function o(t,e,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return p;if("number"==typeof e?(n=e,e=!1):e=!!e,(n=n||10)<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return o(t.substring(1),e,n).neg();for(var s=r(c(n,8)),a=p,u=0;u<t.length;u+=8){var f=Math.min(8,t.length-u),l=parseInt(t.substring(u,u+f),n);if(f<8){var h=r(c(n,f));a=a.mul(h).add(r(l))}else a=a.mul(s),a=a.add(r(l))}return a.unsigned=e,a}function s(e){return e instanceof t?e:"number"==typeof e?r(e):"string"==typeof e?o(e):i(e.low,e.high,e.unsigned)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var a={},u={};t.fromInt=n,t.fromNumber=r,t.fromBits=i;var c=Math.pow;t.fromString=o,t.fromValue=s;var f=4294967296,l=f*f,h=l/2,d=n(1<<24),p=n(0);t.ZERO=p;var v=n(0,!0);t.UZERO=v;var m=n(1);t.ONE=m;var y=n(1,!0);t.UONE=y;var g=n(-1);t.NEG_ONE=g;var b=i(-1,2147483647,!1);t.MAX_VALUE=b;var _=i(-1,-1,!0);t.MAX_UNSIGNED_VALUE=_;var w=i(0,-2147483648,!1);t.MIN_VALUE=w;var E=t.prototype;return E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},E.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w)){var e=r(t),n=this.div(e),i=n.mul(e).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=r(c(t,6),this.unsigned),s=this,a="";;){var u=s.div(o),f=s.sub(u.mul(o)).toInt()>>>0,l=f.toString(t);if(s=u,s.isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<<e);e--);return 0!=this.high?e+33:e+1},E.isZero=function(){return 0===this.high&&0===this.low},E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return 1==(1&this.low)},E.isEven=function(){return 0==(1&this.low)},E.equals=function(t){return e(t)||(t=s(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},E.eq=E.equals,E.notEquals=function(t){return!this.eq(t)},E.neq=E.notEquals,E.lessThan=function(t){return this.comp(t)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(t){return this.comp(t)<=0},E.lte=E.lessThanOrEqual,E.greaterThan=function(t){return this.comp(t)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(t){return this.comp(t)>=0},E.gte=E.greaterThanOrEqual,E.compare=function(t){if(e(t)||(t=s(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(w)?w:this.not().add(m)},E.neg=E.negate,E.add=function(t){e(t)||(t=s(t));var n=this.high>>>16,r=65535&this.high,o=this.low>>>16,a=65535&this.low,u=t.high>>>16,c=65535&t.high,f=t.low>>>16,l=65535&t.low,h=0,d=0,p=0,v=0;return v+=a+l,p+=v>>>16,v&=65535,p+=o+f,d+=p>>>16,p&=65535,d+=r+c,h+=d>>>16,d&=65535,h+=n+u,h&=65535,i(p<<16|v,h<<16|d,this.unsigned)},E.subtract=function(t){return e(t)||(t=s(t)),this.add(t.neg())},E.sub=E.subtract,E.multiply=function(t){if(this.isZero())return p;if(e(t)||(t=s(t)),t.isZero())return p;if(this.eq(w))return t.isOdd()?w:p;if(t.eq(w))return this.isOdd()?w:p;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(d)&&t.lt(d))return r(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,o=65535&this.high,a=this.low>>>16,u=65535&this.low,c=t.high>>>16,f=65535&t.high,l=t.low>>>16,h=65535&t.low,v=0,m=0,y=0,g=0;return g+=u*h,y+=g>>>16,g&=65535,y+=a*h,m+=y>>>16,y&=65535,y+=u*l,m+=y>>>16,y&=65535,m+=o*h,v+=m>>>16,m&=65535,m+=a*l,v+=m>>>16,m&=65535,m+=u*f,v+=m>>>16,m&=65535,v+=n*h+o*l+a*f+u*c,v&=65535,i(y<<16|g,v<<16|m,this.unsigned)},E.mul=E.multiply,E.divide=function(t){if(e(t)||(t=s(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?v:p;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return v;if(t.gt(this.shru(1)))return y;o=v}else{if(this.eq(w)){if(t.eq(m)||t.eq(g))return w;if(t.eq(w))return m;return n=this.shr(1).div(t).shl(1),n.eq(p)?t.isNegative()?m:g:(i=this.sub(t.mul(n)),o=n.add(i.div(t)))}if(t.eq(w))return this.unsigned?v:p;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=p}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),u=a<=48?1:c(2,a-48),f=r(n),l=f.mul(t);l.isNegative()||l.gt(i);)n-=u,f=r(n,this.unsigned),l=f.mul(t);f.isZero()&&(f=m),o=o.add(f),i=i.sub(l)}return o},E.div=E.divide,E.modulo=function(t){return e(t)||(t=s(t)),this.sub(this.div(t).mul(t))},E.mod=E.modulo,E.not=function(){return i(~this.low,~this.high,this.unsigned)},E.and=function(t){return e(t)||(t=s(t)),i(this.low&t.low,this.high&t.high,this.unsigned)},E.or=function(t){return e(t)||(t=s(t)),i(this.low|t.low,this.high|t.high,this.unsigned)},E.xor=function(t){return e(t)||(t=s(t)),i(this.low^t.low,this.high^t.high,this.unsigned)},E.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?i(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):i(0,this.low<<t-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?i(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):i(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0===(t&=63))return this;var n=this.high;if(t<32){return i(this.low>>>t|n<<32-t,n>>>t,this.unsigned)}return 32===t?i(n,0,this.unsigned):i(n>>>t-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?i(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:i(this.low,this.high,!0)},E.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},E.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t})},function(t,e){},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,r||t,i),a=p?p+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function u(){this._events=new i,this._eventsCount=0}var c=n(198),f=r(c),l=n(111),h=r(l),d=Object.prototype.hasOwnProperty,p="~";h.default&&(i.prototype=(0,h.default)(null),(new i).__proto__||(p=!1)),u.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)d.call(t,e)&&n.push(p?e.slice(1):e);return f.default?n.concat((0,f.default)(t)):n},u.prototype.listeners=function(t){var e=p?p+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r<i;r++)o[r]=n[r].fn;return o},u.prototype.listenerCount=function(t){var e=p?p+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,r,i,o){var s=p?p+t:t;if(!this._events[s])return!1;var a,u,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,i),!0;case 6:return c.fn.call(c.context,e,n,r,i,o),!0}for(u=1,a=new Array(f-1);u<f;u++)a[u-1]=arguments[u];c.fn.apply(c.context,a)}else{var l,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),f){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,n);break;case 4:c[u].fn.call(c[u].context,e,n,r);break;default:if(!a)for(l=1,a=new Array(f-1);l<f;l++)a[l-1]=arguments[l];c[u].fn.apply(c[u].context,a)}}return!0},u.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},u.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},u.prototype.removeListener=function(t,e,n,r){var i=p?p+t:t;if(!this._events[i])return this;if(!e)return a(this,i),this;var o=this._events[i];if(o.fn)o.fn!==e||r&&!o.once||n&&o.context!==n||a(this,i);else{for(var s=0,u=[],c=o.length;s<c;s++)(o[s].fn!==e||r&&!o[s].once||n&&o[s].context!==n)&&u.push(o[s]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=p?p+t:t,this._events[e]&&a(this,e)):(this._events=new i,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=p,u.EventEmitter=u,t.exports=u},function(t,e,n){t.exports=n(415)},function(t,e,n){var r=function(t){"use strict";function e(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}function n(t,e,n,r){var o=e&&e.prototype instanceof i?e:i,s=Object.create(o.prototype),a=new d(r||[]);return s._invoke=c(t,n,a),s}function r(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function i(){}function o(){}function s(){}function a(t){["next","throw","return"].forEach(function(n){e(t,n,function(t){return this._invoke(n,t)})})}function u(t,e){function n(i,o,s,a){var u=r(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&g.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,s,a)},function(t){n("throw",t,s,a)}):e.resolve(f).then(function(t){c.value=t,s(c)},function(t){return n("throw",t,s,a)})}a(u.arg)}function i(t,r){function i(){return new e(function(e,i){n(t,r,e,i)})}return o=o?o.then(i,i):i()}var o;this._invoke=i}function c(t,e,n){var i=O;return function(o,s){if(i===S)throw new Error("Generator is already running");if(i===A){if("throw"===o)throw s;return v()}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var u=f(a,n);if(u){if(u===j)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===O)throw i=A,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=S;var c=r(t,e,n);if("normal"===c.type){if(i=n.done?A:T,c.arg===j)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=A,n.method="throw",n.arg=c.arg)}}}function f(t,e){var n=t.iterator[e.method];if(n===m){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=m,f(t,e),"throw"===e.method))return j;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return j}var i=r(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,j;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=m),e.delegate=null,j):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,j)}function l(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function h(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function d(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(l,this),this.reset(!0)}function p(t){if(t){var e=t[_];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(g.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=m,e.done=!0,e};return r.next=r}}return{next:v}}function v(){return{value:m,done:!0}}var m,y=Object.prototype,g=y.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},_=b.iterator||"@@iterator",w=b.asyncIterator||"@@asyncIterator",E=b.toStringTag||"@@toStringTag";try{e({},"")}catch(t){e=function(t,e,n){return t[e]=n}}t.wrap=n;var O="suspendedStart",T="suspendedYield",S="executing",A="completed",j={},I={};I[_]=function(){return this};var x=Object.getPrototypeOf,C=x&&x(x(p([])));C&&C!==y&&g.call(C,_)&&(I=C);var N=s.prototype=i.prototype=Object.create(I);return o.prototype=N.constructor=s,s.constructor=o,o.displayName=e(s,E,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===o||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,e(t,E,"GeneratorFunction")),t.prototype=Object.create(N),t},t.awrap=function(t){return{__await:t}},a(u.prototype),u.prototype[w]=function(){return this},t.AsyncIterator=u,t.async=function(e,r,i,o,s){void 0===s&&(s=Promise);var a=new u(n(e,r,i,o),s);return t.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},a(N),e(N,E,"Generator"),N[_]=function(){return this},N.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=p,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(h),!t)for(var e in this)"t"===e.charAt(0)&&g.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=m)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,r){return o.type="throw",o.arg=t,n.next=e,r&&(n.method="next",n.arg=m),!!r}if(this.done)throw t;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var s=g.call(i,"catchLoc"),a=g.call(i,"finallyLoc");if(s&&a){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,j):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),j},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),j}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;h(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:p(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=m),j}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){function n(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,i)}function r(t){return function(){var e=this,r=arguments;return new Promise(function(i,o){function s(t){n(u,i,o,s,a,"next",t)}function a(t){n(u,i,o,s,a,"throw",t)}var u=t.apply(e,r);s(void 0)})}}t.exports=r},function(t,e,n){function r(t){return i(t)||o(t)||s(t)||a()}var i=n(418),o=n(201),s=n(202),a=n(419);t.exports=r},function(t,e,n){function r(t){if(Array.isArray(t))return i(t)}var i=n(200);t.exports=r},function(t,e){function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t.exports=n},function(t,e){function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}t.exports=n},function(t,e,n){function r(t,e){if(null==t)return{};var n,r,o=i(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var i=n(422);t.exports=r},function(t,e){function n(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}t.exports=n},function(t,e){function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}t.exports=n},function(t,e){function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}t.exports=n},function(t,e,n){function r(t){return(s(t)?i:o)(t)}var i=n(426),o=n(429),s=n(208);t.exports=r},function(t,e,n){function r(t){return o(i(t))}var i=n(427),o=n(203);t.exports=r},function(t,e){function n(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}t.exports=n},function(t,e){function n(t,e){return t+r(i()*(e-t+1))}var r=Math.floor,i=Math.random;t.exports=n},function(t,e,n){function r(t){return i(o(t))}var i=n(203),o=n(204);t.exports=r},function(t,e,n){function r(t,e){return i(e,function(e){return t[e]})}var i=n(431);t.exports=r},function(t,e){function n(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}t.exports=n},function(t,e,n){function r(t){return s(t)?i(t):o(t)}var i=n(433),o=n(446),s=n(449);t.exports=r},function(t,e,n){function r(t,e){var n=s(t),r=!n&&o(t),f=!n&&!r&&a(t),h=!n&&!r&&!f&&c(t),d=n||r||f||h,p=d?i(t.length,String):[],v=p.length;for(var m in t)!e&&!l.call(t,m)||d&&("length"==m||f&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||u(m,v))||p.push(m);return p}var i=n(434),o=n(435),s=n(208),a=n(439),u=n(441),c=n(442),f=Object.prototype,l=f.hasOwnProperty;t.exports=r},function(t,e){function n(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}t.exports=n},function(t,e,n){var r=n(436),i=n(79),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},function(t,e,n){function r(t){return o(t)&&i(t)==s}var i=n(78),o=n(79),s="[object Arguments]";t.exports=r},function(t,e,n){function r(t){var e=s.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[u]=n:delete t[u]),i}var i=n(205),o=Object.prototype,s=o.hasOwnProperty,a=o.toString,u=i?i.toStringTag:void 0;t.exports=r},function(t,e){function n(t){return i.call(t)}var r=Object.prototype,i=r.toString;t.exports=n},function(t,e,n){(function(t){var r=n(206),i=n(440),o="object"==typeof e&&e&&!e.nodeType&&e,s=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===o,u=a?r.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||i;t.exports=f}).call(e,n(209)(t))},function(t,e){function n(){return!1}t.exports=n},function(t,e){function n(t,e){var n=typeof t;return!!(e=null==e?r:e)&&("number"==n||"symbol"!=n&&i.test(t))&&t>-1&&t%1==0&&t<e}var r=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,e,n){var r=n(443),i=n(444),o=n(445),s=o&&o.isTypedArray,a=s?i(s):r;t.exports=a},function(t,e,n){function r(t){return s(t)&&o(t.length)&&!!a[i(t)]}var i=n(78),o=n(210),s=n(79),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=r},function(t,e){function n(t){return function(e){return t(e)}}t.exports=n},function(t,e,n){(function(t){var r=n(207),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i,a=s&&r.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u}).call(e,n(209)(t))},function(t,e,n){function r(t){if(!i(t))return o(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}var i=n(447),o=n(448),s=Object.prototype,a=s.hasOwnProperty;t.exports=r},function(t,e){function n(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}var r=Object.prototype;t.exports=n},function(t,e,n){var r=n(211),i=r(Object.keys,Object);t.exports=i},function(t,e,n){function r(t){return null!=t&&o(t.length)&&!i(t)}var i=n(450),o=n(210);t.exports=r},function(t,e,n){function r(t){if(!o(t))return!1;var e=i(t);return e==a||e==u||e==s||e==c}var i=n(78),o=n(451),s="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";t.exports=r},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function r(t){return i(t)||o(t)||s(t)||a()}var i=n(453),o=n(201),s=n(202),a=n(454);t.exports=r},function(t,e){function n(t){if(Array.isArray(t))return t}t.exports=n},function(t,e){function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t.exports=n},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}t.exports=r},function(t,e){function n(t,e,n,r,i){var o={};return Object.keys(r).forEach(function(t){o[t]=r[t]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(t,e,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(t,e,o),o=null),o}t.exports=n},function(t,e,n){!function(){var n={VERSION:"2.4.0",Result:{SUCCEEDED:1,NOTRANSITION:2,CANCELLED:3,PENDING:4},Error:{INVALID_TRANSITION:100,PENDING_TRANSITION:200,INVALID_CALLBACK:300},WILDCARD:"*",ASYNC:"async",create:function(t,e){var r="string"==typeof t.initial?{state:t.initial}:t.initial,i=t.terminal||t.final,o=e||t.target||{},s=t.events||[],a=t.callbacks||{},u={},c={},f=function(t){var e=Array.isArray(t.from)?t.from:t.from?[t.from]:[n.WILDCARD];u[t.name]=u[t.name]||{};for(var r=0;r<e.length;r++)c[e[r]]=c[e[r]]||[],c[e[r]].push(t.name),u[t.name][e[r]]=t.to||e[r];t.to&&(c[t.to]=c[t.to]||[])};r&&(r.event=r.event||"startup",f({name:r.event,from:"none",to:r.state}));for(var l=0;l<s.length;l++)f(s[l]);for(var h in u)u.hasOwnProperty(h)&&(o[h]=n.buildEvent(h,u[h]));for(var h in a)a.hasOwnProperty(h)&&(o[h]=a[h]);return o.current="none",o.is=function(t){return Array.isArray(t)?t.indexOf(this.current)>=0:this.current===t},o.can=function(t){return!this.transition&&void 0!==u[t]&&(u[t].hasOwnProperty(this.current)||u[t].hasOwnProperty(n.WILDCARD))},o.cannot=function(t){return!this.can(t)},o.transitions=function(){return(c[this.current]||[]).concat(c[n.WILDCARD]||[])},o.isFinished=function(){return this.is(i)},o.error=t.error||function(t,e,n,r,i,o,s){throw s||o},o.states=function(){return Object.keys(c).sort()},r&&!r.defer&&o[r.event](),o},doCallback:function(t,e,r,i,o,s){if(e)try{return e.apply(t,[r,i,o].concat(s))}catch(e){return t.error(r,i,o,s,n.Error.INVALID_CALLBACK,"an exception occurred in a caller-provided callback function",e)}},beforeAnyEvent:function(t,e,r,i,o){return n.doCallback(t,t.onbeforeevent,e,r,i,o)},afterAnyEvent:function(t,e,r,i,o){return n.doCallback(t,t.onafterevent||t.onevent,e,r,i,o)},leaveAnyState:function(t,e,r,i,o){return n.doCallback(t,t.onleavestate,e,r,i,o)},enterAnyState:function(t,e,r,i,o){return n.doCallback(t,t.onenterstate||t.onstate,e,r,i,o)},changeState:function(t,e,r,i,o){return n.doCallback(t,t.onchangestate,e,r,i,o)},beforeThisEvent:function(t,e,r,i,o){return n.doCallback(t,t["onbefore"+e],e,r,i,o)},afterThisEvent:function(t,e,r,i,o){return n.doCallback(t,t["onafter"+e]||t["on"+e],e,r,i,o)},leaveThisState:function(t,e,r,i,o){return n.doCallback(t,t["onleave"+r],e,r,i,o)},enterThisState:function(t,e,r,i,o){return n.doCallback(t,t["onenter"+i]||t["on"+i],e,r,i,o)},beforeEvent:function(t,e,r,i,o){if(!1===n.beforeThisEvent(t,e,r,i,o)||!1===n.beforeAnyEvent(t,e,r,i,o))return!1},afterEvent:function(t,e,r,i,o){n.afterThisEvent(t,e,r,i,o),n.afterAnyEvent(t,e,r,i,o)},leaveState:function(t,e,r,i,o){var s=n.leaveThisState(t,e,r,i,o),a=n.leaveAnyState(t,e,r,i,o);return!1!==s&&!1!==a&&(n.ASYNC===s||n.ASYNC===a?n.ASYNC:void 0)},enterState:function(t,e,r,i,o){n.enterThisState(t,e,r,i,o),n.enterAnyState(t,e,r,i,o)},buildEvent:function(t,e){return function(){var r=this.current,i=e[r]||(e[n.WILDCARD]!=n.WILDCARD?e[n.WILDCARD]:r)||r,o=Array.prototype.slice.call(arguments);if(this.transition)return this.error(t,r,i,o,n.Error.PENDING_TRANSITION,"event "+t+" inappropriate because previous transition did not complete");if(this.cannot(t))return this.error(t,r,i,o,n.Error.INVALID_TRANSITION,"event "+t+" inappropriate in current state "+this.current);if(!1===n.beforeEvent(this,t,r,i,o))return n.Result.CANCELLED;if(r===i)return n.afterEvent(this,t,r,i,o),n.Result.NOTRANSITION;var s=this;this.transition=function(){return s.transition=null,s.current=i,n.enterState(s,t,r,i,o),n.changeState(s,t,r,i,o),n.afterEvent(s,t,r,i,o),n.Result.SUCCEEDED},this.transition.cancel=function(){s.transition=null,n.afterEvent(s,t,r,i,o)};var a=n.leaveState(this,t,r,i,o);return!1===a?(this.transition=null,n.Result.CANCELLED):n.ASYNC===a?n.Result.PENDING:this.transition?this.transition():void 0}}};void 0!==t&&t.exports&&(e=t.exports=n),e.StateMachine=n}()},function(t,e){function n(e){"@babel/helpers - typeof";return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(t,e,n){function r(t){if(!s(t)||i(t)!=a)return!1;var e=o(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&f.call(n)==h}var i=n(78),o=n(460),s=n(79),a="[object Object]",u=Function.prototype,c=Object.prototype,f=u.toString,l=c.hasOwnProperty,h=f.call(Object);t.exports=r},function(t,e,n){var r=n(211),i=r(Object.getPrototypeOf,Object);t.exports=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i,o,s,a=n(199),u=r(a),c=n(193),f=r(c),l=n(191),h=r(l),d=n(112),p=r(d),v=n(111),m=r(v),y=n(23),g=r(y);!function(r,a){"object"===(0,g.default)(e)&&void 0!==t?a(e,n(113)):(o=[e,n(113)],i=a,void 0!==(s="function"==typeof i?i.apply(e,o):i)&&(t.exports=s))}(0,function(t,e){function n(t,e){t.prototype=(0,m.default)(e.prototype),t.prototype.constructor=t,t.__proto__=e}function r(t){return i(t)||o(t)||s()}function i(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function o(t){if((0,p.default)(Object(t))||"[object Arguments]"===Object.prototype.toString.call(t))return(0,h.default)(t)}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance")}if(!e.Protocals)throw new Error("LeanCloud Realtime SDK not installed");var a=e.Protocals.CommandType,c=e.Protocals.GenericCommand,l=e.Protocals.AckCommand,d=function(t){return console.warn(t.message)},v=function(t){function r(n,r,i){var o;return o=t.call(this)||this,o._appId=n,o.id=r,o._connection=i,o._eventemitter=new e.EventEmitter,o._querys=new f.default,o}n(r,t);var i=r.prototype;return i._send=function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(e=this._connection).send.apply(e,[(0,u.default)(t,{appId:this._appId,installationId:this.id,service:1})].concat(r))},i._open=function(){return this._send(new c({cmd:a.login}))},i.close=function(){var t=this._eventemitter;return t.emit("beforeclose"),this._send(new c({cmd:a.logout})).then(function(){return t.emit("close")})},i.register=function(t){this._querys.add(t)},i.deregister=function(t){var e=this;this._querys.delete(t),setTimeout(function(){e._querys.size||e.close().catch(d)},0)},i._dispatchCommand=function(t){return t.cmd!==a.data?(this.emit("unhandledmessage",t),e.Promise.resolve()):this._dispatchDataCommand(t)},i._dispatchDataCommand=function(t){var e=t.dataMessage,n=e.ids,r=e.msg;this.emit("message",r.map(function(t){var e=t.data;return JSON.parse(e)}));var i=new c({cmd:a.ack,ackMessage:new l({ids:n})});return this._send(i,!1).catch(d)},r}(e.EventEmitter),y=function(t){return[function(e){return t(),e},function(e){throw t(),e}]},g=function(t){t._liveQueryClients={},t.createLiveQueryClient=function(n){var i;if(void 0!==t._liveQueryClients[n])return e.Promise.resolve(t._liveQueryClients[n]);var o=(i=t._open().then(function(e){var r=new v(t._options.appId,n,e);return e.on("reconnect",function(){return r._open().then(function(){return r.emit("reconnect")},function(t){return r.emit("reconnecterror",t)})}),r._eventemitter.on("beforeclose",function(){delete t._liveQueryClients[r.id]},t),r._eventemitter.on("close",function(){t._deregister(r)},t),r._open().then(function(){return t._liveQueryClients[r.id]=r,t._register(r),r})})).then.apply(i,r(y(function(){t._deregisterPending&&t._deregisterPending(o)})));return t._liveQueryClients[n]=o,t._registerPending&&t._registerPending(o),o}},b=function(t,e){if(!t.installationId||1!==t.service)return!0;var n=e._liveQueryClients[t.installationId];return n?n._dispatchCommand(t).catch(function(t){return console.warn(t)}):console.warn("Unexpected message received without any live client match: %O",t),!1},_={name:"leancloud-realtime-plugin-live-query",onRealtimeCreate:g,beforeCommandDispatch:b};t.LiveQueryPlugin=_,Object.defineProperty(t,"__esModule",{value:!0})})}])});
38//# sourceMappingURL=av-live-query-min.js.map
\No newline at end of file