@lanyingim/lanying 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /*! License information can be found in floo-3.0.0.js.LICENSE */
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=366)}([function(e,t,n){"use strict";e.exports=n(333)},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return f}));n(36),n(40),n(2),n(21),n(122);var r="undefined"!=typeof window,o="undefined"!=typeof document,i=function(t){var n,r=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},o="__floo_".concat(t,"_storage__");return r[o]||(r[o]=(n=new Map,{get length(){return n.size},key:function(e){return Array.from(n.keys())[e]||null},getItem:function(e){var t=String(e);return n.has(t)?n.get(t):null},setItem:function(e,t){n.set(String(e),String(t))},removeItem:function(e){n.delete(String(e))},clear:function(){n.clear()}})),r[o]},s=function(e,t){return r&&window[e]?window[e]:i(t)},a=s("localStorage","local"),c=s("sessionStorage","session"),u=function(){return r&&window.location&&window.location.href?window.location.href:""},f=function(){r&&window.location&&"function"==typeof window.location.reload&&window.location.reload()}}).call(this,n(112))},function(e,t,n){for(var r=n(157),o=n(61),i=n(25),s=n(4),a=n(19),c=n(50),u=n(3),f=u("iterator"),l=u("toStringTag"),d=c.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(p),g=0;g<h.length;g++){var v,y=h[g],m=p[y],b=s[y],w=b&&b.prototype;if(w&&(w[f]||a(w,f,d),w[l]||a(w,l,y),c[y]=d,m))for(v in r)w[v]||i(w,v,r[v],!0)}},function(e,t,n){var r=n(74)("wks"),o=n(38),i=n(4).Symbol,s="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=s&&i[e]||(s?i:o)("Symbol."+e))}).store=r},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(4),o=n(47),i=n(19),s=n(25),a=n(39),c=function(e,t,n){var u,f,l,d,p=e&c.F,h=e&c.G,g=e&c.S,v=e&c.P,y=e&c.B,m=h?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?o:o[t]||(o[t]={}),w=b.prototype||(b.prototype={});for(u in h&&(n=t),n)l=((f=!p&&m&&void 0!==m[u])?m:n)[u],d=y&&f?a(l,r):v&&"function"==typeof l?a(Function.call,l):l,m&&s(m,u,l,e&c.U),b[u]!=l&&i(b,u,d),v&&w[u]!=l&&(w[u]=l)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){"use strict";var r,o,i=e.exports=n(27),s=n(213);i.codegen=n(344),i.fetch=n(345),i.path=n(346),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),n=new Array(t.length),r=0;r<t.length;)n[r]=e[t[r++]];return n}return[]},i.toObject=function(e){for(var t={},n=0;n<e.length;){var r=e[n++],o=e[n++];void 0!==o&&(t[r]=o)}return t};var a=/\\/g,c=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var u=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(u,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;r||(r=n(215));var o=new r(t||e.name);return i.decorateRoot.add(o),o.ctor=e,Object.defineProperty(e,"$type",{value:o,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:o,enumerable:!1}),o};var f=0;i.decorateEnum=function(e){if(e.$type)return e.$type;o||(o=n(28));var t=new o("Enum"+f++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,n){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,n,r){var o=n.shift();if(n.length>0)t[o]=e(t[o]||{},n,r);else{var i=t[o];i&&(r=[].concat(i).concat(r)),t[o]=r}return t}(e,t=t.split("."),n)},Object.defineProperty(i,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(n(223)))}})},function(e,t,n){var r,o,i;n(34);o=[n(0)],void 0===(i="function"==typeof(r=function(e){"use strict";return(e.roots.xsync||(e.roots.xsync=new e.Root)).addJSON({im:{nested:{floo:{nested:{protobuf:{nested:{Frame:{fields:{vsn:{type:"VSN",id:1},compress_method:{type:"CompressMethod",id:2},command:{type:"Command",id:3},payload:{type:"bytes",id:4},encrypt_method:{type:"EncryptMethod",id:5},encrypt_key:{type:"bytes",id:6},check_sum:{type:"uint32",id:7},tag:{type:"string",id:8}},nested:{VSN:{values:{XSYNC_V1:0,XSYNC_V2:1}},Command:{values:{UNREAD:0,SYNC:1,NOTICE:2,PROVISION:3}},CompressMethod:{values:{NONE:0,ZLIB:1}},EncryptMethod:{values:{ENCRYPT_NONE:0,AES_CBC_128:1,AES_CBC_256:2,CUSTOM:3}}}},Status:{fields:{code:{type:"ErrorCode",id:1},reason:{type:"string",id:2}},nested:{ErrorCode:{values:{UNKNOWN:0,OK:1,FAIL:2,UNKNOWN_COMMAND:3,PB_PARSER_ERROR:4,DECRYPT_FAILURE:5,PUBLIC_KEY_CHANGED:6,INVALID_TOKEN:7,INVALID_PARAMETER:8,UNAUTHORIZED:9,USER_FROZEN:10,USER_BANNED:11,WORD_CENSORED:12,TOO_MANY_DEVICES:13,ENCRYPT_METHOD_UNSUPPORTED:14,DEVICE_GUID_CONFLICT:15,CHECK_SUM_FAILURE:16,INVALID_LICENSE:17,LICENSE_LIMIT:18,APP_FROZEN:19,RATE_LIMIT_EXCEEDED:20}}}},ConversationUnread:{fields:{xid:{type:"XID",id:1},n:{type:"uint32",id:2},type:{type:"ConvType",id:3}},nested:{ConvType:{values:{UNKNOWN:0,CHAT:1,GROUPCHAT:2}}}},UnreadUL:{fields:{}},UnreadDL:{fields:{status:{type:"Status",id:1},unread:{rule:"repeated",type:"ConversationUnread",id:2}}},SyncUL:{fields:{xid:{type:"XID",id:1},key:{type:"uint64",id:2},meta:{type:"Meta",id:3},is_full_sync:{type:"bool",id:4},full_sync_num:{type:"sint32",id:5}}},SyncDL:{fields:{status:{type:"Status",id:1},metas:{rule:"repeated",type:"Meta",id:2},next_key:{type:"uint64",id:3},xid:{type:"XID",id:4},client_mid:{type:"uint64",id:5},server_mid:{type:"uint64",id:6},server_time:{type:"uint64",id:7},is_full_sync:{type:"bool",id:8},prev_mid:{type:"uint64",id:9},is_eager_sync:{type:"bool",id:10},edit_timestamp:{type:"uint64",id:11}}},Notice:{fields:{xid:{type:"XID",id:1}}},Provision:{fields:{status:{type:"Status",id:1},xid:{type:"XID",id:2},password:{type:"string",id:5},token:{type:"string",id:6},os_type:{type:"OsType",id:7},sdk_vsn:{type:"string",id:8},is_manual_login:{type:"bool",id:9},device_guid:{type:"string",id:10},device_notifier:{type:"string",id:11},device_token:{type:"string",id:12},device_info:{type:"string",id:13},last_login_time:{type:"uint64",id:14}},nested:{OsType:{values:{UNKNOWN:0,IOS:1,ANDR:2,WIN:3,OSX:4,LINUX:5,WEB:6}}}},Meta:{fields:{id:{type:"uint64",id:1},from:{type:"XID",id:2},to:{type:"XID",id:3},timestamp:{type:"uint64",id:4},ns:{type:"NameSpace",id:5},payload:{type:"bytes",id:6}},nested:{NameSpace:{values:{UNKNOWN:0,MESSAGE:1,GROUP_NOTICE:2,ROSTER_NOTICE:3,USER_NOTICE:4,INFO:5,CONVERSATION:6,PUSH:7,RTC_SIGNAL:8}}}},XID:{fields:{uid:{type:"uint64",id:1},deviceSN:{type:"uint32",id:2}}}}}}}}}})})?r.apply(t,o):r)||(e.exports=i)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(10),o=n(143),i=n(59),s=Object.defineProperty;t.f=n(11)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(17);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(8)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(30),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";var r=n(178),o=Object.prototype.toString;function i(e){return Array.isArray(e)}function s(e){return void 0===e}function a(e){return"[object ArrayBuffer]"===o.call(e)}function c(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function f(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:a,isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===o.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&a(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:c,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:f,isStream:function(e){return c(e)&&f(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===o.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):i(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(125)("wks"),o=n(89),i=n(14).Symbol,s="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=s&&i[e]||(s?i:o)("Symbol."+e))}).store=r},function(e,t){e.exports=r;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function o(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=o;var i={},s={};function a(e,t){var n,r,o;return t?(o=0<=(e>>>=0)&&e<256)&&(r=s[e])?r:(n=u(e,(0|e)<0?-1:0,!0),o&&(s[e]=n),n):(o=-128<=(e|=0)&&e<128)&&(r=i[e])?r:(n=u(e,e<0?-1:0,!1),o&&(i[e]=n),n)}function c(e,t){if(isNaN(e))return t?m:y;if(t){if(e<0)return m;if(e>=h)return C}else{if(e<=-g)return E;if(e+1>=g)return S}return e<0?c(-e,t).neg():u(e%p|0,e/p|0,t)}function u(e,t,n){return new r(e,t,n)}r.fromInt=a,r.fromNumber=c,r.fromBits=u;var f=Math.pow;function l(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return y;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return l(e.substring(1),t,n).neg();for(var o=c(f(n,8)),i=y,s=0;s<e.length;s+=8){var a=Math.min(8,e.length-s),u=parseInt(e.substring(s,s+a),n);if(a<8){var d=c(f(n,a));i=i.mul(d).add(c(u))}else i=(i=i.mul(o)).add(c(u))}return i.unsigned=t,i}function d(e,t){return"number"==typeof e?c(e,t):"string"==typeof e?l(e,t):u(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}r.fromString=l,r.fromValue=d;var p=4294967296,h=p*p,g=h/2,v=a(1<<24),y=a(0);r.ZERO=y;var m=a(0,!0);r.UZERO=m;var b=a(1);r.ONE=b;var w=a(1,!0);r.UONE=w;var _=a(-1);r.NEG_ONE=_;var S=u(-1,2147483647,!1);r.MAX_VALUE=S;var C=u(-1,-1,!0);r.MAX_UNSIGNED_VALUE=C;var E=u(0,-2147483648,!1);r.MIN_VALUE=E;var k=r.prototype;k.toInt=function(){return this.unsigned?this.low>>>0:this.low},k.toNumber=function(){return this.unsigned?(this.high>>>0)*p+(this.low>>>0):this.high*p+(this.low>>>0)},k.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(E)){var t=c(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=c(f(e,6),this.unsigned),i=this,s="";;){var a=i.div(o),u=(i.sub(a.mul(o)).toInt()>>>0).toString(e);if((i=a).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},k.getHighBits=function(){return this.high},k.getHighBitsUnsigned=function(){return this.high>>>0},k.getLowBits=function(){return this.low},k.getLowBitsUnsigned=function(){return this.low>>>0},k.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},k.isZero=function(){return 0===this.high&&0===this.low},k.eqz=k.isZero,k.isNegative=function(){return!this.unsigned&&this.high<0},k.isPositive=function(){return this.unsigned||this.high>=0},k.isOdd=function(){return 1==(1&this.low)},k.isEven=function(){return 0==(1&this.low)},k.equals=function(e){return o(e)||(e=d(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},k.eq=k.equals,k.notEquals=function(e){return!this.eq(e)},k.neq=k.notEquals,k.ne=k.notEquals,k.lessThan=function(e){return this.comp(e)<0},k.lt=k.lessThan,k.lessThanOrEqual=function(e){return this.comp(e)<=0},k.lte=k.lessThanOrEqual,k.le=k.lessThanOrEqual,k.greaterThan=function(e){return this.comp(e)>0},k.gt=k.greaterThan,k.greaterThanOrEqual=function(e){return this.comp(e)>=0},k.gte=k.greaterThanOrEqual,k.ge=k.greaterThanOrEqual,k.compare=function(e){if(o(e)||(e=d(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},k.comp=k.compare,k.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(b)},k.neg=k.negate,k.add=function(e){o(e)||(e=d(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,s=e.high>>>16,a=65535&e.high,c=e.low>>>16,f=0,l=0,p=0,h=0;return p+=(h+=i+(65535&e.low))>>>16,l+=(p+=r+c)>>>16,f+=(l+=n+a)>>>16,f+=t+s,u((p&=65535)<<16|(h&=65535),(f&=65535)<<16|(l&=65535),this.unsigned)},k.subtract=function(e){return o(e)||(e=d(e)),this.add(e.neg())},k.sub=k.subtract,k.multiply=function(e){if(this.isZero())return y;if(o(e)||(e=d(e)),n)return u(n.mul(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned);if(e.isZero())return y;if(this.eq(E))return e.isOdd()?E:y;if(e.eq(E))return this.isOdd()?E:y;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(v)&&e.lt(v))return c(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,r=65535&this.high,i=this.low>>>16,s=65535&this.low,a=e.high>>>16,f=65535&e.high,l=e.low>>>16,p=65535&e.low,h=0,g=0,m=0,b=0;return m+=(b+=s*p)>>>16,g+=(m+=i*p)>>>16,m&=65535,g+=(m+=s*l)>>>16,h+=(g+=r*p)>>>16,g&=65535,h+=(g+=i*l)>>>16,g&=65535,h+=(g+=s*f)>>>16,h+=t*p+r*l+i*f+s*a,u((m&=65535)<<16|(b&=65535),(h&=65535)<<16|(g&=65535),this.unsigned)},k.mul=k.multiply,k.divide=function(e){if(o(e)||(e=d(e)),e.isZero())throw Error("division by zero");var t,r,i;if(n)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?u((this.unsigned?n.div_u:n.div_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?m:y;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return m;if(e.gt(this.shru(1)))return w;i=m}else{if(this.eq(E))return e.eq(b)||e.eq(_)?E:e.eq(E)?b:(t=this.shr(1).div(e).shl(1)).eq(y)?e.isNegative()?b:_:(r=this.sub(e.mul(t)),i=t.add(r.div(e)));if(e.eq(E))return this.unsigned?m:y;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=y}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(t)/Math.LN2),a=s<=48?1:f(2,s-48),l=c(t),p=l.mul(e);p.isNegative()||p.gt(r);)p=(l=c(t-=a,this.unsigned)).mul(e);l.isZero()&&(l=b),i=i.add(l),r=r.sub(p)}return i},k.div=k.divide,k.modulo=function(e){return o(e)||(e=d(e)),n?u((this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},k.mod=k.modulo,k.rem=k.modulo,k.not=function(){return u(~this.low,~this.high,this.unsigned)},k.and=function(e){return o(e)||(e=d(e)),u(this.low&e.low,this.high&e.high,this.unsigned)},k.or=function(e){return o(e)||(e=d(e)),u(this.low|e.low,this.high|e.high,this.unsigned)},k.xor=function(e){return o(e)||(e=d(e)),u(this.low^e.low,this.high^e.high,this.unsigned)},k.shiftLeft=function(e){return o(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):u(0,this.low<<e-32,this.unsigned)},k.shl=k.shiftLeft,k.shiftRight=function(e){return o(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):u(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},k.shr=k.shiftRight,k.shiftRightUnsigned=function(e){if(o(e)&&(e=e.toInt()),0===(e&=63))return this;var t=this.high;return e<32?u(this.low>>>e|t<<32-e,t>>>e,this.unsigned):u(32===e?t:t>>>e-32,0,this.unsigned)},k.shru=k.shiftRightUnsigned,k.shr_u=k.shiftRightUnsigned,k.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},k.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},k.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},k.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},k.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(9),o=n(49);e.exports=n(11)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(29);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";var r=n(155)(!0);n(103)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(20),o=n(61);n(273)("keys",(function(){return function(e){return o(r(e))}}))},function(e,t,n){e.exports=n(296)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(4),o=n(19),i=n(24),s=n(38)("src"),a=n(239),c=(""+a).split("toString");n(47).inspectSource=function(e){return a.call(e)},(e.exports=function(e,t,n,a){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(u&&(i(n,s)||o(n,s,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:a?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[s]||a.call(this)}))},function(e,t,n){var r=n(33),o=n(187),i=n(124),s=Object.defineProperty;t.f=n(31)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";(function(e){var r=t;function o(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;++o)void 0!==e[r[o]]&&n||(e[r[o]]=t[r[o]]);return e}function i(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&o(this,n)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}r.asPromise=n(210),r.base64=n(335),r.EventEmitter=n(336),r.float=n(337),r.inquire=n(211),r.utf8=n(338),r.pool=n(339),r.LongBits=n(340),r.isNode=Boolean(void 0!==e&&e&&e.process&&e.process.versions&&e.process.versions.node),r.global=r.isNode&&e||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=o,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=i,r.ProtocolError=i("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}}).call(this,n(112))},function(e,t,n){"use strict";e.exports=s;var r=n(57);((s.prototype=Object.create(r.prototype)).constructor=s).className="Enum";var o=n(70),i=n(6);function s(e,t,n,o,i){if(r.call(this,e,n),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.reserved=void 0,t)for(var s=Object.keys(t),a=0;a<s.length;++a)"number"==typeof t[s[a]]&&(this.valuesById[this.values[s[a]]=t[s[a]]]=s[a])}s.fromJSON=function(e,t){var n=new s(e,t.values,t.options,t.comment,t.comments);return n.reserved=t.reserved,n},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},s.prototype.add=function(e,t,n){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=n||null,this},s.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},s.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){e.exports=!n(87)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(14),o=n(18),i=n(65),s=n(43),a=n(42),c=function(e,t,n){var u,f,l,d=e&c.F,p=e&c.G,h=e&c.S,g=e&c.P,v=e&c.B,y=e&c.W,m=p?o:o[t]||(o[t]={}),b=m.prototype,w=p?r:h?r[t]:(r[t]||{}).prototype;for(u in p&&(n=t),n)(f=!d&&w&&void 0!==w[u])&&a(m,u)||(l=f?w[u]:n[u],m[u]=p&&"function"!=typeof w[u]?n[u]:v&&f?i(l,r):y&&w[u]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):g&&"function"==typeof l?i(Function.call,l):l,g&&((m.virtual||(m.virtual={}))[u]=l,e&c.R&&b&&!b[u]&&s(b,u,l)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){var r=n(44);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(23),o=n(45);function i(t){return e.exports=i="function"==typeof r&&"symbol"==typeof o?function(e){return typeof e}:function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";const r={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};r.localCName=r.generateIdentifier(),r.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},r.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},r.getDescription=function(e){const t=r.splitSections(e);return t&&t[0]},r.getMediaSections=function(e){const t=r.splitSections(e);return t.shift(),t},r.matchPrefix=function(e,t){return r.splitLines(e).filter(e=>0===e.indexOf(t))},r.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},r.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},r.parseIceOptions=function(e){return e.substring(14).split(" ")},r.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},r.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},r.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},r.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},r.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n=r[e].trim().split("="),t[n[0].trim()]=n[1];return t},r.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},r.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},r.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},r.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},r.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},r.getMid=function(e){const t=r.matchPrefix(e,"a=mid:")[0];if(t)return t.substring(6)},r.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},r.getDtlsParameters=function(e,t){return{role:"auto",fingerprints:r.matchPrefix(e+t,"a=fingerprint:").map(r.parseFingerprint)}},r.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},r.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},r.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?r.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},r.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},r.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},r.getCryptoParameters=function(e,t){return r.matchPrefix(e+t,"a=crypto:").map(r.parseCryptoLine)},r.getIceParameters=function(e,t){const n=r.matchPrefix(e+t,"a=ice-ufrag:")[0],o=r.matchPrefix(e+t,"a=ice-pwd:")[0];return n&&o?{usernameFragment:n.substring(12),password:o.substring(10)}:null},r.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},r.parseRtpParameters=function(e){const t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(e)[0].split(" ");t.profile=n[2];for(let o=3;o<n.length;o++){const i=n[o],s=r.matchPrefix(e,"a=rtpmap:"+i+" ")[0];if(s){const n=r.parseRtpMap(s),o=r.matchPrefix(e,"a=fmtp:"+i+" ");switch(n.parameters=o.length?r.parseFmtp(o[0]):{},n.rtcpFeedback=r.matchPrefix(e,"a=rtcp-fb:"+i+" ").map(r.parseRtcpFb),t.codecs.push(n),n.name.toUpperCase()){case"RED":case"ULPFEC":t.fecMechanisms.push(n.name.toUpperCase())}}}r.matchPrefix(e,"a=extmap:").forEach(e=>{t.headerExtensions.push(r.parseExtmap(e))});const o=r.matchPrefix(e,"a=rtcp-fb:* ").map(r.parseRtcpFb);return t.codecs.forEach(e=>{o.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),t},r.writeRtpDescription=function(e,t){let n="";n+="m="+e+" ",n+=t.codecs.length>0?"9":"0",n+=" "+(t.profile||"UDP/TLS/RTP/SAVPF")+" ",n+=t.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach(e=>{n+=r.writeRtpMap(e),n+=r.writeFmtp(e),n+=r.writeRtcpFb(e)});let o=0;return t.codecs.forEach(e=>{e.maxptime>o&&(o=e.maxptime)}),o>0&&(n+="a=maxptime:"+o+"\r\n"),t.headerExtensions&&t.headerExtensions.forEach(e=>{n+=r.writeExtmap(e)}),n},r.parseRtpEncodingParameters=function(e){const t=[],n=r.parseRtpParameters(e),o=-1!==n.fecMechanisms.indexOf("RED"),i=-1!==n.fecMechanisms.indexOf("ULPFEC"),s=r.matchPrefix(e,"a=ssrc:").map(e=>r.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),a=s.length>0&&s[0].ssrc;let c;const u=r.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));u.length>0&&u[0].length>1&&u[0][0]===a&&(c=u[0][1]),n.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let n={ssrc:a,codecPayloadType:parseInt(e.parameters.apt,10)};a&&c&&(n.rtx={ssrc:c}),t.push(n),o&&(n=JSON.parse(JSON.stringify(n)),n.fec={ssrc:a,mechanism:i?"red+ulpfec":"red"},t.push(n))}}),0===t.length&&a&&t.push({ssrc:a});let f=r.matchPrefix(e,"b=");return f.length&&(f=0===f[0].indexOf("b=TIAS:")?parseInt(f[0].substring(7),10):0===f[0].indexOf("b=AS:")?1e3*parseInt(f[0].substring(5),10)*.95-16e3:void 0,t.forEach(e=>{e.maxBitrate=f})),t},r.parseRtcpParameters=function(e){const t={},n=r.matchPrefix(e,"a=ssrc:").map(e=>r.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];n&&(t.cname=n.value,t.ssrc=n.ssrc);const o=r.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=o.length>0,t.compound=0===o.length;const i=r.matchPrefix(e,"a=rtcp-mux");return t.mux=i.length>0,t},r.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},r.parseMsid=function(e){let t;const n=r.matchPrefix(e,"a=msid:");if(1===n.length)return t=n[0].substring(7).split(" "),{stream:t[0],track:t[1]};const o=r.matchPrefix(e,"a=ssrc:").map(e=>r.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);return o.length>0?(t=o[0].value.split(" "),{stream:t[0],track:t[1]}):void 0},r.parseSctpDescription=function(e){const t=r.parseMLine(e),n=r.matchPrefix(e,"a=max-message-size:");let o;n.length>0&&(o=parseInt(n[0].substring(19),10)),isNaN(o)&&(o=65536);const i=r.matchPrefix(e,"a=sctp-port:");if(i.length>0)return{port:parseInt(i[0].substring(12),10),protocol:t.fmt,maxMessageSize:o};const s=r.matchPrefix(e,"a=sctpmap:");if(s.length>0){const e=s[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:o}}},r.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},r.generateSessionId=function(){return Math.random().toString().substr(2,22)},r.writeSessionBoilerplate=function(e,t,n){let o;const i=void 0!==t?t:2;o=e||r.generateSessionId();return"v=0\r\no="+(n||"thisisadapterortc")+" "+o+" "+i+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},r.getDirection=function(e,t){const n=r.splitLines(e);for(let e=0;e<n.length;e++)switch(n[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return n[e].substring(2)}return t?r.getDirection(t):"sendrecv"},r.getKind=function(e){return r.splitLines(e)[0].split(" ")[0].substring(2)},r.isRejected=function(e){return"0"===e.split(" ",2)[1]},r.parseMLine=function(e){const t=r.splitLines(e)[0].substring(2).split(" ");return{kind:t[0],port:parseInt(t[1],10),protocol:t[2],fmt:t.slice(3).join(" ")}},r.parseOLine=function(e){const t=r.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:t[0],sessionId:t[1],sessionVersion:parseInt(t[2],10),netType:t[3],addressType:t[4],address:t[5]}},r.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const t=r.splitLines(e);for(let e=0;e<t.length;e++)if(t[e].length<2||"="!==t[e].charAt(1))return!1;return!0},e.exports=r},function(e,t,n){var r=n(9).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(11)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){var r=n(147),o=n(29);e.exports=function(e){return r(o(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(99);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var r=n(39),o=n(5),i=n(20),s=n(149),a=n(100),c=n(12),u=n(156),f=n(101);o(o.S+o.F*!n(106)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,o,l,d=i(e),p="function"==typeof this?this:Array,h=arguments.length,g=h>1?arguments[1]:void 0,v=void 0!==g,y=0,m=f(d);if(v&&(g=r(g,h>2?arguments[2]:void 0,2)),null==m||p==Array&&a(m))for(n=new p(t=c(d.length));t>y;y++)u(n,y,v?g(d[y],y):d[y]);else for(l=m.call(d),n=new p;!(o=l.next()).done;y++)u(n,y,v?s(l,g,[o.value,y],!0):o.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(10),o=n(20),i=n(12),s=n(30),a=n(116),c=n(117),u=Math.max,f=Math.min,l=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n(118)("replace",2,(function(e,t,n,h){return[function(r,o){var i=e(this),s=null==r?void 0:r[t];return void 0!==s?s.call(r,i,o):n.call(String(i),r,o)},function(e,t){var o=h(n,e,this,t);if(o.done)return o.value;var l=r(e),d=String(this),p="function"==typeof t;p||(t=String(t));var v=l.global;if(v){var y=l.unicode;l.lastIndex=0}for(var m=[];;){var b=c(l,d);if(null===b)break;if(m.push(b),!v)break;""===String(b[0])&&(l.lastIndex=a(d,i(l.lastIndex),y))}for(var w,_="",S=0,C=0;C<m.length;C++){b=m[C];for(var E=String(b[0]),k=u(f(s(b.index),d.length),0),x=[],T=1;T<b.length;T++)x.push(void 0===(w=b[T])?w:String(w));var A=b.groups;if(p){var R=[E].concat(x,k,d);void 0!==A&&R.push(A);var O=String(t.apply(void 0,R))}else O=g(E,d,k,x,A,t);k>=S&&(_+=d.slice(S,k)+O,S=k+E.length)}return _+d.slice(S)}];function g(e,t,r,i,s,a){var c=r+e.length,u=i.length,f=p;return void 0!==s&&(s=o(s),f=d),n.call(a,f,(function(n,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(c);case"<":a=s[o.slice(1,-1)];break;default:var f=+o;if(0===f)return n;if(f>u){var d=l(f/10);return 0===d?n:d<=u?void 0===i[d-1]?o.charAt(1):i[d-1]+o.charAt(1):n}a=i[f-1]}return void 0===a?"":a}))}}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(26),o=n(66);e.exports=n(31)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=n(308)},function(e,t,n){e.exports=n(274)},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=!1},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(e,t,n){var r=n(146),o=n(98).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){var r,o=n(259),i=n(169),s=n(261),a=n(262),c=n(263);"undefined"!=typeof ArrayBuffer&&(r=n(264));var u="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),f="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),l=u||f;t.protocol=3;var d=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=o(d),h={type:"error",data:"parser error"},g=n(265);function v(e,t,n){for(var r=new Array(e.length),o=a(e.length,n),i=function(e,n,o){t(n,(function(t,n){r[e]=n,o(t,r)}))},s=0;s<e.length;s++)i(s,e[s],o)}t.encodePacket=function(e,n,r,o){"function"==typeof n&&(o=n,n=!1),"function"==typeof r&&(o=r,r=null);var i=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&i instanceof ArrayBuffer)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=e.data,i=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=d[e.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return r(s.buffer)}(e,n,o);if(void 0!==g&&i instanceof g)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(l)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var o=new FileReader;return o.onload=function(){t.encodePacket({type:e.type,data:o.result},n,!0,r)},o.readAsArrayBuffer(e.data)}(e,n,r);var o=new Uint8Array(1);o[0]=d[e.type];var i=new g([o.buffer,e.data]);return r(i)}(e,n,o);if(i&&i.base64)return function(e,n){var r="b"+t.packets[e.type]+e.data.data;return n(r)}(e,o);var s=d[e.type];return void 0!==e.data&&(s+=r?c.encode(String(e.data),{strict:!1}):String(e.data)),o(""+s)},t.encodeBase64Packet=function(e,n){var r,o="b"+t.packets[e.type];if(void 0!==g&&e.data instanceof g){var i=new FileReader;return i.onload=function(){var e=i.result.split(",")[1];n(o+e)},i.readAsDataURL(e.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var s=new Uint8Array(e.data),a=new Array(s.length),c=0;c<s.length;c++)a[c]=s[c];r=String.fromCharCode.apply(null,a)}return o+=btoa(r),n(o)},t.decodePacket=function(e,n,r){if(void 0===e)return h;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=function(e){try{e=c.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return h;var o=e.charAt(0);return Number(o)==o&&p[o]?e.length>1?{type:p[o],data:e.substring(1)}:{type:p[o]}:h}o=new Uint8Array(e)[0];var i=s(e,1);return g&&"blob"===n&&(i=new g([i])),{type:p[o],data:i}},t.decodeBase64Packet=function(e,t){var n=p[e.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:e.substr(1)}};var o=r.decode(e.substr(1));return"blob"===t&&g&&(o=new g([o])),{type:n,data:o}},t.encodePayload=function(e,n,r){"function"==typeof n&&(r=n,n=null);var o=i(e);if(n&&o)return g&&!l?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r);if(!e.length)return r("0:");v(e,(function(e,r){t.encodePacket(e,!!o&&n,!1,(function(e){r(null,function(e){return e.length+":"+e}(e))}))}),(function(e,t){return r(t.join(""))}))},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);var o;if("function"==typeof n&&(r=n,n=null),""===e)return r(h,0,1);for(var i,s,a="",c=0,u=e.length;c<u;c++){var f=e.charAt(c);if(":"===f){if(""===a||a!=(i=Number(a)))return r(h,0,1);if(a!=(s=e.substr(c+1,i)).length)return r(h,0,1);if(s.length){if(o=t.decodePacket(s,n,!1),h.type===o.type&&h.data===o.data)return r(h,0,1);if(!1===r(o,c+i,u))return}c+=i,a=""}else a+=f}return""!==a?r(h,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));v(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){return n(null,e)}))}),(function(e,t){var r=t.reduce((function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2}),0),o=new Uint8Array(r),i=0;return t.forEach((function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),s=0;s<e.length;s++)r[s]=e.charCodeAt(s);n=r.buffer}o[i++]=t?0:1;var a=n.byteLength.toString();for(s=0;s<a.length;s++)o[i++]=parseInt(a[s]);o[i++]=255;for(r=new Uint8Array(n),s=0;s<r.length;s++)o[i++]=r[s]})),n(o.buffer)}))},t.encodePayloadAsBlob=function(e,n){v(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);e=r.buffer,t[0]=0}var i=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),s=new Uint8Array(i.length+1);for(o=0;o<i.length;o++)s[o]=parseInt(i[o]);if(s[i.length]=255,g){var a=new g([t.buffer,s.buffer,e]);n(null,a)}}))}),(function(e,t){return n(new g(t))}))},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var o=e,i=[];o.byteLength>0;){for(var a=new Uint8Array(o),c=0===a[0],u="",f=1;255!==a[f];f++){if(u.length>310)return r(h,0,1);u+=a[f]}o=s(o,2+u.length),u=parseInt(u);var l=s(o,0,u);if(c)try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(e){var d=new Uint8Array(l);l="";for(f=0;f<d.length;f++)l+=String.fromCharCode(d[f])}i.push(l),o=s(o,u)}var p=i.length;i.forEach((function(e,o){r(t.decodePacket(e,n,!0),o,p)}))}},function(e,t,n){"use strict";var r=n(5),o=n(108)(6),i="findIndex",s=!0;i in[]&&Array(1)[i]((function(){s=!1})),r(r.P+r.F*s,"Array",{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(77)(i)},function(e,t,n){"use strict";n(291);var r=n(10),o=n(120),i=n(11),s=/./.toString,a=function(e){n(25)(RegExp.prototype,"toString",e,!0)};n(8)((function(){return"/a/b"!=s.call({source:"a",flags:"b"})}))?a((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?o.call(e):void 0)})):"toString"!=s.name&&a((function(){return s.call(this)}))},function(e,t,n){var r=n(300),o=n(129);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";e.exports=i,i.className="ReflectionObject";var r,o=n(6);function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof r&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof r&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,n){return n&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,n){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(n){var i=r.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var s=i[e];o.setProperty(s,n,t)}else(i={})[e]=o.setProperty({},n,t),r.push(i)}else{var a={};a[e]=t,r.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var n=Object.keys(e),r=0;r<n.length;++r)this.setOption(n[r],e[n[r]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){r=e}},function(e,t,n){"use strict";e.exports=u;var r=n(57);((u.prototype=Object.create(r.prototype)).constructor=u).className="Field";var o,i=n(28),s=n(71),a=n(6),c=/^required|optional|repeated$/;function u(e,t,n,o,i,u,f){if(a.isObject(o)?(f=i,u=o,o=i=void 0):a.isObject(i)&&(f=u,u=i,i=void 0),r.call(this,e,u),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(n))throw TypeError("type must be a string");if(void 0!==o&&!c.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===o&&(o="optional"),this.rule=o&&"optional"!==o?o:void 0,this.type=n,this.id=t,this.extend=i||void 0,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[n],this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=f}u.fromJSON=function(e,t){return new u(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(e,t,n){return"packed"===e&&(this._packed=null),r.prototype.setOption.call(this,e,t,n)},u.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=s.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},u.d=function(e,t,n,r){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(o,i){a.decorateType(o.constructor).add(new u(i,e,t,n,{default:r}))}},u._configure=function(e){o=e}},function(e,t,n){var r=n(17);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(10),o=n(237),i=n(98),s=n(97)("IE_PROTO"),a=function(){},c=function(){var e,t=n(144)("iframe"),r=i.length;for(t.style.display="none",n(238).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c.prototype[i[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(a.prototype=r(e),n=new a,a.prototype=null,n[s]=e):n=c(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(146),o=n(98);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(9).f,o=n(24),i=n(3)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(107),o=n(49),i=n(37),s=n(59),a=n(24),c=n(143),u=Object.getOwnPropertyDescriptor;t.f=n(11)?u:function(e,t){if(e=i(e),t=s(t,!0),c)try{return u(e,t)}catch(e){}if(a(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(88);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=!0},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports={}},function(e,t,n){"use strict";e.exports=l;var r=n(57);((l.prototype=Object.create(r.prototype)).constructor=l).className="Namespace";var o,i,s,a=n(58),c=n(92),u=n(6);function f(e,t){if(e&&e.length){for(var n={},r=0;r<e.length;++r)n[e[r].name]=e[r].toJSON(t);return n}}function l(e,t){r.call(this,e,t),this.nested=void 0,this._nestedArray=null}function d(e){return e._nestedArray=null,e}l.fromJSON=function(e,t){return new l(e,t.options).addJSON(t.nested)},l.arrayToJSON=f,l.isReservedId=function(e,t){if(e)for(var n=0;n<e.length;++n)if("string"!=typeof e[n]&&e[n][0]<=t&&e[n][1]>t)return!0;return!1},l.isReservedName=function(e,t){if(e)for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1},Object.defineProperty(l.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=u.toArray(this.nested))}}),l.prototype.toJSON=function(e){return u.toObject(["options",this.options,"nested",f(this.nestedArray,e)])},l.prototype.addJSON=function(e){if(e)for(var t,n=Object.keys(e),r=0;r<n.length;++r)t=e[n[r]],this.add((void 0!==t.fields?o.fromJSON:void 0!==t.values?s.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?a.fromJSON:l.fromJSON)(n[r],t));return this},l.prototype.get=function(e){return this.nested&&this.nested[e]||null},l.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},l.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof o||e instanceof s||e instanceof i||e instanceof l||e instanceof c))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof l&&e instanceof l)||t instanceof o||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var n=t.nestedArray,r=0;r<n.length;++r)e.add(n[r]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),d(this)},l.prototype.remove=function(e){if(!(e instanceof r))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),d(this)},l.prototype.define=function(e,t){if(u.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var n=this;e.length>0;){var r=e.shift();if(n.nested&&n.nested[r]){if(!((n=n.nested[r])instanceof l))throw Error("path conflicts with non-namespace objects")}else n.add(n=new l(r))}return t&&n.addJSON(t),n},l.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof l?e[t++].resolveAll():e[t++].resolve();return this.resolve()},l.prototype.lookup=function(e,t,n){if("boolean"==typeof t?(n=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),u.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var r=this.get(e[0]);if(r){if(1===e.length){if(!t||t.indexOf(r.constructor)>-1)return r}else if(r instanceof l&&(r=r.lookup(e.slice(1),t,!0)))return r}else for(var o=0;o<this.nestedArray.length;++o)if(this._nestedArray[o]instanceof l&&(r=this._nestedArray[o].lookup(e,t,!0)))return r;return null===this.parent||n?null:this.parent.lookup(e,t)},l.prototype.lookupType=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such type: "+e);return t},l.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},l.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[o,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},l.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},l._configure=function(e,t,n){o=e,i=t,s=n}},function(e,t,n){"use strict";var r=t,o=n(6),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var n=0,r={};for(t|=0;n<e.length;)r[i[n+t]]=e[n++];return r}r.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),r.long=s([0,0,0,1,1],7),r.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])},function(e,t,n){"use strict";var r=n(145),o=n(105);e.exports=n(153)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(o(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){var r=n(30),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(47),o=n(4),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(48)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(25);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(3)("unscopables"),o=Array.prototype;null==o[r]&&n(19)(o,r,{}),e.exports=function(e){o[r][e]=!0}},function(e,t,n){n(242)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(248)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"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+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.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.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(80))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var c,u=[],f=!1,l=-1;function d(){f&&c&&(f=!1,c.length?u=c.concat(u):l=-1,u.length&&p())}function p(){if(!f){var e=a(d);f=!0;for(var t=u.length;t;){for(c=u,u=[];++l<t;)c&&c[l].run();l=-1,t=u.length}c=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||f||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(266)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"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+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.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.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(80))},function(e,t,n){"use strict";var r=n(5),o=n(96)(!0);r(r.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(77)("includes")},function(e,t,n){"use strict";var r=n(5),o=n(175);r(r.P+r.F*n(177)("includes"),"String",{includes:function(e){return!!~o(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(26).f,o=n(42),i=n(15)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(315).stringify,o=n(316);e.exports=function(e){return{parse:o(e),stringify:r}},e.exports.parse=o(),e.exports.stringify=r},function(e,t,n){"use strict";e.exports=s;var r=n(57);((s.prototype=Object.create(r.prototype)).constructor=s).className="OneOf";var o=n(58),i=n(6);function s(e,t,n,o){if(Array.isArray(t)||(n=t,t=void 0),r.call(this,e,n),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}s.fromJSON=function(e,t){return new s(e,t.oneof,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},s.prototype.add=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},s.prototype.remove=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){r.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var n=e.get(this.oneof[t]);n&&!n.partOf&&(n.partOf=this,this.fieldsArray.push(n))}a(this)},s.prototype.onRemove=function(e){for(var t,n=0;n<this.fieldsArray.length;++n)(t=this.fieldsArray[n]).parent&&t.parent.remove(t);r.prototype.onRemove.call(this,e)},s.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,n){i.decorateType(t.constructor).add(new s(n,e)),Object.defineProperty(t,n,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},function(e,t,n){e.exports=n(322)},function(e,t,n){e.exports=n(324)},function(e,t,n){"use strict";const r=n(329),o=n(330),i=n(331),s=n(332);function a(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function c(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function u(e,t){return t.decode?o(e):e}function f(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function l(e){const t=(e=f(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function d(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){a((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const o="string"==typeof n&&n.includes(e.arrayFormatSeparator),i="string"==typeof n&&!o&&u(n,e).includes(e.arrayFormatSeparator);n=i?u(n,e):n;const s=o||i?n.split(e.arrayFormatSeparator).map(t=>u(t,e)):null===n?n:u(n,e);r[t]=s};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const o of e.split("&")){if(""===o)continue;let[e,s]=i(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator"].includes(t.arrayFormat)?s:u(s,t),n(u(e,t),s,r)}for(const e of Object.keys(r)){const n=r[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=d(n[e],t);else r[e]=d(n,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}t.extract=l,t.parse=p,t.stringify=(e,t)=>{if(!e)return"";a((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const o=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[c(t,e),"[",o,"]"].join("")]:[...n,[c(t,e),"[",c(o,e),"]=",c(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[c(t,e),"[]"].join("")]:[...n,[c(t,e),"[]=",c(r,e)].join("")];case"comma":case"separator":return t=>(n,r)=>null==r||0===r.length?n:0===n.length?[[c(t,e),"=",c(r,e)].join("")]:[[n,c(r,e)].join(e.arrayFormatSeparator)];default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,c(t,e)]:[...n,[c(t,e),"=",c(r,e)].join("")]}}(t),o={};for(const t of Object.keys(e))n(t)||(o[t]=e[t]);const i=Object.keys(o);return!1!==t.sort&&i.sort(t.sort),i.map(n=>{const o=e[n];return void 0===o?"":null===o?c(n,t):Array.isArray(o)?o.reduce(r(n),[]).join("&"):c(n,t)+"="+c(o,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=i(e,"#");return Object.assign({url:n.split("?")[0]||"",query:p(l(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:u(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=f(e.url).split("?")[0]||"",o=t.extract(e.url),i=t.parse(o,{sort:!1}),s=Object.assign(i,e.query);let a=t.stringify(s,n);a&&(a="?"+a);let u=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(u="#"+c(e.fragmentIdentifier,n)),`${r}${a}${u}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:o,query:i,fragmentIdentifier:a}=t.parseUrl(e,r);return t.stringifyUrl({url:o,query:s(i,n),fragmentIdentifier:a},r)},t.exclude=(e,n,r)=>{const o=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,o,r)}},function(e,t,n){var r=n(37),o=n(12),i=n(73);e.exports=function(e){return function(t,n,s){var a,c=r(t),u=o(c.length),f=i(s,u);if(e&&n!=n){for(;u>f;)if((a=c[f++])!=a)return!0}else for(;u>f;f++)if((e||f in c)&&c[f]===n)return e||f||0;return!e&&-1}}},function(e,t,n){var r=n(74)("keys"),o=n(38);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(50),o=n(3)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(102),o=n(3)("iterator"),i=n(50);e.exports=n(47).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(62),o=n(3)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){"use strict";var r=n(48),o=n(5),i=n(25),s=n(19),a=n(50),c=n(240),u=n(63),f=n(150),l=n(3)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,h,g,v,y){c(n,t,h);var m,b,w,_=function(e){if(!d&&e in k)return k[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",C="values"==g,E=!1,k=e.prototype,x=k[l]||k["@@iterator"]||g&&k[g],T=x||_(g),A=g?C?_("entries"):T:void 0,R="Array"==t&&k.entries||x;if(R&&(w=f(R.call(new e)))!==Object.prototype&&w.next&&(u(w,S,!0),r||"function"==typeof w[l]||s(w,l,p)),C&&x&&"values"!==x.name&&(E=!0,T=function(){return x.call(this)}),r&&!y||!d&&!E&&k[l]||s(k,l,T),a[t]=T,a[S]=p,g)if(m={values:C?T:_("values"),keys:v?T:_("keys"),entries:A},y)for(b in m)b in k||i(k,b,m[b]);else o(o.P+o.F*(d||E),t,m);return m}},function(e,t,n){var r=n(38)("meta"),o=n(17),i=n(24),s=n(9).f,a=0,c=Object.isExtensible||function(){return!0},u=!n(8)((function(){return c(Object.preventExtensions({}))})),f=function(e){s(e,r,{value:{i:"O"+ ++a,w:{}}})},l=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!c(e))return"F";if(!t)return"E";f(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!c(e))return!0;if(!t)return!1;f(e)}return e[r].w},onFreeze:function(e){return u&&l.NEED&&c(e)&&!i(e,r)&&f(e),e}}},function(e,t,n){var r=n(17);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var r=n(3)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],s=i[r]();s.next=function(){return{done:n=!0}},i[r]=function(){return s},e(i)}catch(e){}return n}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(39),o=n(147),i=n(20),s=n(12),a=n(244);e.exports=function(e,t){var n=1==e,c=2==e,u=3==e,f=4==e,l=6==e,d=5==e||l,p=t||a;return function(t,a,h){for(var g,v,y=i(t),m=o(y),b=r(a,h,3),w=s(m.length),_=0,S=n?p(t,w):c?p(t,0):void 0;w>_;_++)if((d||_ in m)&&(v=b(g=m[_],_,y),e))if(n)S[_]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return _;case 2:S.push(g)}else if(f)return!1;return l?-1:u||f?f:S}}},function(e,t){var n=1e3,r=6e4,o=60*r,i=24*o;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===c&&!1===isNaN(e))return t.long?s(a=e,i,"day")||s(a,o,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=o)return Math.round(e/o)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(249)("socket.io-parser"),o=n(52),i=n(251),s=n(164),a=n(165);function c(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=c,t.Decoder=l;var u=t.ERROR+'"encode error"';function f(e){var n=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data){var o=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===o)return u;n+=o}return r("encoded %j as %s",e,n),n}function l(){this.reconstructor=null}function d(e){this.reconPack=e,this.buffers=[]}function p(e){return{type:t.ERROR,data:"parser error: "+e}}c.prototype.encode=function(e,n){(r("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)?function(e,t){i.removeBlobs(e,(function(e){var n=i.deconstructPacket(e),r=f(n.packet),o=n.buffers;o.unshift(r),t(o)}))}(e,n):n([f(e)])},o(l.prototype),l.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n=0,o={type:Number(e.charAt(0))};if(null==t.types[o.type])return p("unknown packet type "+o.type);if(t.BINARY_EVENT===o.type||t.BINARY_ACK===o.type){for(var i=n+1;"-"!==e.charAt(++n)&&n!=e.length;);var a=e.substring(i,n);if(a!=Number(a)||"-"!==e.charAt(n))throw new Error("Illegal attachments");o.attachments=Number(a)}if("/"===e.charAt(n+1)){for(i=n+1;++n;){if(","===(u=e.charAt(n)))break;if(n===e.length)break}o.nsp=e.substring(i,n)}else o.nsp="/";var c=e.charAt(n+1);if(""!==c&&Number(c)==c){for(i=n+1;++n;){var u;if(null==(u=e.charAt(n))||Number(u)!=u){--n;break}if(n===e.length)break}o.id=Number(e.substring(i,n+1))}if(e.charAt(++n)){var f=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n));if(!(!1!==f&&(o.type===t.ERROR||s(f))))return p("invalid payload");o.data=f}return r("decoded %s as %j",e,o),o}(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new d(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!a(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},l.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},d.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=i.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},d.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){"use strict";(function(e){var r=n(252),o=n(253),i=n(254);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=a(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(f(t),e=a(e,t<0?0:0|p(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|p(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return A(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,o){var i,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var f=-1;for(i=n;i<a;i++)if(u(e,i)===u(t,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===c)return f*s}else-1!==f&&(i-=i-f),f=-1}else for(n+c>a&&(n=a-c),i=n;i>=0;i--){for(var l=!0,d=0;d<c;d++)if(u(e,i+d)!==u(t,d)){l=!1;break}if(l)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function w(e,t,n,r){return q(B(t,e.length-n),e,n,r)}function _(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return _(e,t,n,r)}function C(e,t,n,r){return q(G(t),e,n,r)}function E(e,t,n,r){return q(function(e,t){for(var n,r,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function x(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,s,a,c,u=e[o],f=null,l=u>239?4:u>223?3:u>191?2:1;if(o+l<=n)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(f=c);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(c=(15&u)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return f(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return l(null,e)},c.allocUnsafeSlow=function(e){return l(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},c.byteLength=h,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):g.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(r,o),f=e.slice(t,n),l=0;l<a;++l)if(u[l]!==f[l]){i=u[l],s=f[l];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function A(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function R(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=F(e[i]);return o}function O(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function N(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function P(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var o=t-e;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var s=c.isBuffer(e)?e:B(new c(e,r).toString()),a=s.length;for(i=0;i<n-t;++i)this[i+t]=s[i%a]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function G(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(112))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(257),o=n(114);e.exports=function(e){var t=e.xdomain,n=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(e){}if(!t)try{return new(o[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},function(e,t){e.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},function(e,t,n){var r=n(53),o=n(52);function i(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=i,o(i.prototype),i.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},i.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},i.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},i.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},i.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},i.prototype.onData=function(e){var t=r.decodePacket(e,this.socket.binaryType);this.onPacket(t)},i.prototype.onPacket=function(e){this.emit("packet",e)},i.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){"use strict";var r=n(155)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(102),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){"use strict";n(272);var r=n(25),o=n(19),i=n(8),s=n(29),a=n(3),c=n(119),u=a("species"),f=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=a(e),p=!i((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),h=p?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[u]=function(){return n}),n[d](""),!t})):void 0;if(!p||!h||"replace"===e&&!f||"split"===e&&!l){var g=/./[d],v=n(s,d,""[e],(function(e,t,n,r,o){return t.exec===c?p&&!o?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),y=v[0],m=v[1];r(String.prototype,e,y),o(RegExp.prototype,d,2==t?function(e,t){return m.call(e,this,t)}:function(e){return m.call(e,this)})}}},function(e,t,n){"use strict";var r,o,i=n(120),s=RegExp.prototype.exec,a=String.prototype.replace,c=s,u=(r=/a/,o=/b*/g,s.call(r,"a"),s.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),f=void 0!==/()??/.exec("")[1];(u||f)&&(c=function(e){var t,n,r,o,c=this;return f&&(n=new RegExp("^"+c.source+"$(?!\\s)",i.call(c))),u&&(t=c.lastIndex),r=s.call(c,e),u&&r&&(c.lastIndex=c.global?r.index+r[0].length:t),f&&r&&r.length>1&&a.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r}),e.exports=c},function(e,t,n){"use strict";var r=n(10);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";(function(t){var r=n(13),o=n(279),i=n(180),s=n(181),a={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,f={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(u=n(182)),u),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(c(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||f.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){f.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){f.headers[e]=r.merge(a)})),e.exports=f}).call(this,n(80))},function(e,t,n){"use strict";var r=n(145),o=n(105);e.exports=n(153)("Map",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(o(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(o(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){var r=n(44),o=n(14).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(44);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(18),o=n(14),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(67)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){t.f=n(15)},function(e,t,n){var r=n(14),o=n(18),i=n(67),s=n(126),a=n(26).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},function(e,t,n){var r=n(189),o=n(133);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(131),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(125)("keys"),o=n(89);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(129);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";var r=n(309)(!0);n(196)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";e.exports=l;var r,o=n(27),i=o.LongBits,s=o.base64,a=o.utf8;function c(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function u(){}function f(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function l(){this.len=0,this.head=new c(u,0,0),this.tail=this.head,this.states=null}var d=function(){return o.Buffer?function(){return(l.create=function(){return new r})()}:function(){return new l}};function p(e,t,n){t[n]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function v(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}l.create=d(),l.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(l.alloc=o.pool(l.alloc,o.Array.prototype.subarray)),l.prototype._push=function(e,t,n){return this.tail=this.tail.next=new c(e,t,n),this.len+=t,this},h.prototype=Object.create(c.prototype),h.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},l.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},l.prototype.int32=function(e){return e<0?this._push(g,10,i.fromNumber(e)):this.uint32(e)},l.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},l.prototype.uint64=function(e){var t=i.from(e);return this._push(g,t.length(),t)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(g,t.length(),t)},l.prototype.bool=function(e){return this._push(p,1,e?1:0)},l.prototype.fixed32=function(e){return this._push(v,4,e>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(e){var t=i.from(e);return this._push(v,4,t.lo)._push(v,4,t.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},l.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var y=o.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};l.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(p,1,0);if(o.isString(e)){var n=l.alloc(t=s.length(e));s.decode(e,n,0),e=n}return this.uint32(t)._push(y,t,e)},l.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(p,1,0)},l.prototype.fork=function(){return this.states=new f(this),this.head=this.tail=new c(u,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new c(u,0,0),this.len=0),this},l.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},l.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},l._configure=function(e){r=e,l.create=d(),r._configure()}},function(e,t,n){"use strict";e.exports=c;var r,o=n(27),i=o.LongBits,s=o.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var u,f="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},l=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new r(e):f(e)})(e)}:f};function d(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function p(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw a(this,8);return new i(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}c.create=l(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|p(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},c.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){r=e,c.create=l(),r._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return d.call(this)[t](!1)},uint64:function(){return d.call(this)[t](!0)},sint64:function(){return d.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},function(e,t,n){"use strict";e.exports=o;var r=n(27);function o(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)this[t[n]]=e[t[n]]}o.create=function(e){return this.$type.create(e)},o.encode=function(e,t){return this.$type.encode(e,t)},o.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},o.decode=function(e){return this.$type.decode(e)},o.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},o.verify=function(e){return this.$type.verify(e)},o.fromObject=function(e){return this.$type.fromObject(e)},o.toObject=function(e,t){return this.$type.toObject(e,t)},o.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},function(e,t,n){"use strict";var r=n(88);function o(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new o(e)}},function(e,t,n){e.exports=n(353)},function(e,t,n){e.exports=!n(11)&&!n(8)((function(){return 7!=Object.defineProperty(n(144)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(17),o=n(4).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){"use strict";var r=n(9).f,o=n(60),i=n(75),s=n(39),a=n(76),c=n(148),u=n(103),f=n(151),l=n(152),d=n(11),p=n(104).fastKey,h=n(105),g=d?"_s":"size",v=function(e,t){var n,r=p(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var f=e((function(e,r){a(e,f,t,"_i"),e._t=t,e._i=o(null),e._f=void 0,e._l=void 0,e[g]=0,null!=r&&c(r,n,e[u],e)}));return i(f.prototype,{clear:function(){for(var e=h(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[g]=0},delete:function(e){var n=h(this,t),r=v(n,e);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[g]--}return!!r},forEach:function(e){h(this,t);for(var n,r=s(e,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(e){return!!v(h(this,t),e)}}),d&&r(f.prototype,"size",{get:function(){return h(this,t)[g]}}),f},def:function(e,t,n){var r,o,i=v(e,t);return i?i.v=n:(e._l=i={i:o=p(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=i),r&&(r.n=i),e[g]++,"F"!==o&&(e._i[o]=i)),e},getEntry:v,setStrong:function(e,t,n){u(e,t,(function(e,n){this._t=h(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?f(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,f(1))}),n?"entries":"values",!n,!0),l(t)}}},function(e,t,n){var r=n(24),o=n(37),i=n(96)(!1),s=n(97)("IE_PROTO");e.exports=function(e,t){var n,a=o(e),c=0,u=[];for(n in a)n!=s&&r(a,n)&&u.push(n);for(;t.length>c;)r(a,n=t[c++])&&(~i(u,n)||u.push(n));return u}},function(e,t,n){var r=n(62);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(39),o=n(149),i=n(100),s=n(10),a=n(12),c=n(101),u={},f={};(t=e.exports=function(e,t,n,l,d){var p,h,g,v,y=d?function(){return e}:c(e),m=r(n,l,t?2:1),b=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(i(y)){for(p=a(e.length);p>b;b++)if((v=t?m(s(h=e[b])[0],h[1]):m(e[b]))===u||v===f)return v}else for(g=y.call(e);!(h=g.next()).done;)if((v=o(g,m,h.value,t))===u||v===f)return v}).BREAK=u,t.RETURN=f},function(e,t,n){var r=n(10);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(24),o=n(20),i=n(97)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(4),o=n(9),i=n(11),s=n(3)("species");e.exports=function(e){var t=r[e];i&&t&&!t[s]&&o.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(25),s=n(75),a=n(104),c=n(148),u=n(76),f=n(17),l=n(8),d=n(106),p=n(63),h=n(154);e.exports=function(e,t,n,g,v,y){var m=r[e],b=m,w=v?"set":"add",_=b&&b.prototype,S={},C=function(e){var t=_[e];i(_,e,"delete"==e||"has"==e?function(e){return!(y&&!f(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!f(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(y||_.forEach&&!l((function(){(new b).entries().next()})))){var E=new b,k=E[w](y?{}:-0,1)!=E,x=l((function(){E.has(1)})),T=d((function(e){new b(e)})),A=!y&&l((function(){for(var e=new b,t=5;t--;)e[w](t,t);return!e.has(-0)}));T||((b=t((function(t,n){u(t,b,e);var r=h(new m,t,b);return null!=n&&c(n,v,r[w],r),r}))).prototype=_,_.constructor=b),(x||A)&&(C("delete"),C("has"),v&&C("get")),(A||k)&&C(w),y&&_.clear&&delete _.clear}else b=g.getConstructor(t,e,v,w),s(b.prototype,n),a.NEED=!0;return p(b,e),S[e]=b,o(o.G+o.W+o.F*(b!=m),S),y||g.setStrong(b,e,v),b}},function(e,t,n){var r=n(17),o=n(241).set;e.exports=function(e,t,n){var i,s=t.constructor;return s!==n&&"function"==typeof s&&(i=s.prototype)!==n.prototype&&r(i)&&o&&o(e,i),e}},function(e,t,n){var r=n(30),o=n(29);e.exports=function(e){return function(t,n){var i,s,a=String(o(t)),c=r(n),u=a.length;return c<0||c>=u?e?"":void 0:(i=a.charCodeAt(c))<55296||i>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?e?a.charAt(c):i:e?a.slice(c,c+2):s-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(9),o=n(49);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){"use strict";var r=n(77),o=n(151),i=n(50),s=n(37);e.exports=n(103)(Array,"Array",(function(e,t){this._t=s(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){for(var r,o=n(4),i=n(19),s=n(38),a=s("typed_array"),c=s("view"),u=!(!o.ArrayBuffer||!o.DataView),f=u,l=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=o[d[l++]])?(i(r.prototype,a,!0),i(r.prototype,c,!0)):f=!1;e.exports={ABV:u,CONSTR:f,TYPED:a,VIEW:c}},function(e,t,n){var r=n(30),o=n(12);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=o(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){"use strict";var r=n(20),o=n(73),i=n(12);e.exports=function(e){for(var t=r(this),n=i(t.length),s=arguments.length,a=o(s>1?arguments[1]:void 0,n),c=s>2?arguments[2]:void 0,u=void 0===c?n:o(c,n);u>a;)t[a++]=e;return t}},function(e,t,n){var r=n(62);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(10),o=n(99),i=n(3)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||null==(n=r(s)[i])?t:o(n)}},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,o=e.indexOf("["),i=e.indexOf("]");-1!=o&&-1!=i&&(e=e.substring(0,o)+e.substring(o,i).replace(/:/g,";")+e.substring(i,e.length));for(var s,a,c=n.exec(e||""),u={},f=14;f--;)u[r[f]]=c[f]||"";return-1!=o&&-1!=i&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=function(e,t){var n=t.replace(/\/{2,9}/g,"/").split("/");"/"!=t.substr(0,1)&&0!==t.length||n.splice(0,1);"/"==t.substr(t.length-1,1)&&n.splice(n.length-1,1);return n}(0,u.path),u.queryKey=(s=u.query,a={},s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(a[t]=n)})),a),u}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){e.exports=function(e){return n&&t.isBuffer(e)||r&&(e instanceof ArrayBuffer||function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}(e))};var n="function"==typeof t&&"function"==typeof t.isBuffer,r="function"==typeof ArrayBuffer}).call(this,n(111).Buffer)},function(e,t,n){var r=n(255),o=n(172),i=n(52),s=n(110),a=n(173),c=n(174),u=n(79)("socket.io-client:manager"),f=n(171),l=n(271),d=Object.prototype.hasOwnProperty;function p(e,t){if(!(this instanceof p))return new p(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new l({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=p,p.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)d.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},p.prototype.updateSocketIds=function(){for(var e in this.nsps)d.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},p.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},i(p.prototype),p.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},p.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},p.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},p.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},p.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},p.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},p.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},p.prototype.open=p.prototype.connect=function(e,t){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,o=this;this.readyState="opening",this.skipReconnect=!1;var i=a(n,"open",(function(){o.onopen(),e&&e()})),s=a(n,"error",(function(t){if(u("connect_error"),o.cleanup(),o.readyState="closed",o.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else o.maybeReconnectOnOpen()}));if(!1!==this._timeout){var c=this._timeout;u("connect attempt will timeout after %d",c),0===c&&i.destroy();var f=setTimeout((function(){u("connect attempt timed out after %d",c),i.destroy(),n.close(),n.emit("error","timeout"),o.emitAll("connect_timeout",c)}),c);this.subs.push({destroy:function(){clearTimeout(f)}})}return this.subs.push(i),this.subs.push(s),this},p.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",c(this,"ondata"))),this.subs.push(a(e,"ping",c(this,"onping"))),this.subs.push(a(e,"pong",c(this,"onpong"))),this.subs.push(a(e,"error",c(this,"onerror"))),this.subs.push(a(e,"close",c(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",c(this,"ondecoded")))},p.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},p.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},p.prototype.ondata=function(e){this.decoder.add(e)},p.prototype.ondecoded=function(e){this.emit("packet",e)},p.prototype.onerror=function(e){u("error",e),this.emitAll("error",e)},p.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new o(this,e,t),this.nsps[e]=n;var r=this;n.on("connecting",i),n.on("connect",(function(){n.id=r.generateId(e)})),this.autoConnect&&i()}function i(){~f(r.connecting,n)||r.connecting.push(n)}return n},p.prototype.destroy=function(e){var t=f(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},p.prototype.packet=function(e){u("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()})))},p.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},p.prototype.cleanup=function(){u("cleanup");for(var e=this.subs.length,t=0;t<e;t++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},p.prototype.close=p.prototype.disconnect=function(){u("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},p.prototype.onclose=function(e){u("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},p.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();u("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(u("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(u("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(u("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},p.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){var r=n(113),o=n(258),i=n(267),s=n(268);t.polling=function(e){var t=!1,n=!1,s=!1!==e.jsonp;if("undefined"!=typeof location){var a="https:"===location.protocol,c=location.port;c||(c=a?443:80),t=e.hostname!==location.hostname||c!==e.port,n=e.secure!==a}if(e.xdomain=t,e.xscheme=n,"open"in new r(e)&&!e.forceJSONP)return new o(e);if(!s)throw new Error("JSONP disabled");return new i(e)},t.websocket=s},function(e,t,n){var r=n(115),o=n(81),i=n(53),s=n(82),a=n(170),c=n(83)("engine.io-client:polling");e.exports=f;var u=null!=new(n(113))({xdomain:!1}).responseType;function f(e){var t=e&&e.forceBase64;u&&!t||(this.supportsBinary=!1),r.call(this,e)}s(f,r),f.prototype.name="polling",f.prototype.doOpen=function(){this.poll()},f.prototype.pause=function(e){var t=this;function n(){c("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(c("we are currently polling - waiting to pause"),r++,this.once("pollComplete",(function(){c("pre-pause polling complete"),--r||n()}))),this.writable||(c("we are currently writing - waiting to pause"),r++,this.once("drain",(function(){c("pre-pause writing complete"),--r||n()})))}else n()},f.prototype.poll=function(){c("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},f.prototype.onData=function(e){var t=this;c("polling got data %s",e);i.decodePayload(e,this.socket.binaryType,(function(e,n,r){if("opening"===t.readyState&&"open"===e.type&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():c('ignoring poll - transport state "%s"',this.readyState))},f.prototype.doClose=function(){var e=this;function t(){c("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(c("transport open - closing"),t()):(c("transport not open - deferring close"),this.once("open",t))},f.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};i.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},f.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=o.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){(function(t){var r=n(260),o=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);e.exports=function e(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var o=0,a=n.length;o<a;o++)if(e(n[o]))return!0;return!1}if("function"==typeof t&&t.isBuffer&&t.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||i&&n instanceof Blob||s&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return e(n.toJSON(),!0);for(var c in n)if(Object.prototype.hasOwnProperty.call(n,c)&&e(n[c]))return!0;return!1}}).call(this,n(111).Buffer)},function(e,t,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i={},s=0,a=0;function c(e){var t="";do{t=o[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function u(){var e=c(+new Date);return e!==r?(s=0,r=e):e+"."+c(s++)}for(;a<64;a++)i[o[a]]=a;u.encode=c,u.decode=function(e){var t=0;for(a=0;a<e.length;a++)t=64*t+i[e.charAt(a)];return t},e.exports=u},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(110),o=n(52),i=n(270),s=n(173),a=n(174),c=n(79)("socket.io-client:socket"),u=n(81),f=n(169);e.exports=p;var l={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},d=o.prototype.emit;function p(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}o(p.prototype),p.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",a(this,"onopen")),s(e,"packet",a(this,"onpacket")),s(e,"close",a(this,"onclose"))]}},p.prototype.open=p.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.reconnecting||this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},p.prototype.send=function(){var e=i(arguments);return e.unshift("message"),this.emit.apply(this,e),this},p.prototype.emit=function(e){if(l.hasOwnProperty(e))return d.apply(this,arguments),this;var t=i(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:f(t))?r.BINARY_EVENT:r.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},p.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},p.prototype.onopen=function(){if(c("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?u.encode(this.query):this.query;c("sending connect packet with query %s",e),this.packet({type:r.CONNECT,query:e})}else this.packet({type:r.CONNECT})},p.prototype.onclose=function(e){c("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},p.prototype.onpacket=function(e){var t=e.nsp===this.nsp,n=e.type===r.ERROR&&"/"===e.nsp;if(t||n)switch(e.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(e);break;case r.ACK:case r.BINARY_ACK:this.onack(e);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",e.data)}},p.prototype.onevent=function(e){var t=e.data||[];c("emitting event %j",t),null!=e.id&&(c("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?d.apply(this,t):this.receiveBuffer.push(t)},p.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var o=i(arguments);c("sending ack %j",o),t.packet({type:f(o)?r.BINARY_ACK:r.ACK,id:e,data:o})}}},p.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(c("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):c("bad ack %s",e.id)},p.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},p.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)d.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},p.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},p.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},p.prototype.close=p.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},p.prototype.compress=function(e){return this.flags.compress=e,this},p.prototype.binary=function(e){return this.flags.binary=e,this}},function(e,t){e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},function(e,t,n){var r=n(176),o=n(29);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},function(e,t,n){var r=n(17),o=n(62),i=n(3)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(3)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(13);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},function(e,t,n){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},function(e,t,n){"use strict";var r=n(13),o=n(280),i=n(281),s=n(179),a=n(282),c=n(285),u=n(286),f=n(183),l=n(181),d=n(86);e.exports=function(e){return new Promise((function(t,n){var p,h=e.data,g=e.headers,v=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(h)&&delete g["Content-Type"];var m=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+w)}var _=a(e.baseURL,e.url);function S(){if(m){var r="getAllResponseHeaders"in m?c(m.getAllResponseHeaders()):null,i={data:v&&"text"!==v&&"json"!==v?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m};o((function(e){t(e),y()}),(function(e){n(e),y()}),i),m=null}}if(m.open(e.method.toUpperCase(),s(_,e.params,e.paramsSerializer),!0),m.timeout=e.timeout,"onloadend"in m?m.onloadend=S:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(S)},m.onabort=function(){m&&(n(f("Request aborted",e,"ECONNABORTED",m)),m=null)},m.onerror=function(){n(f("Network Error",e,null,m)),m=null},m.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||l;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(f(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",m)),m=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||u(_))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;C&&(g[e.xsrfHeaderName]=C)}"setRequestHeader"in m&&r.forEach(g,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete g[t]:m.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),v&&"json"!==v&&(m.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&m.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&m.upload&&m.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){m&&(n(!e||e&&e.type?new d("canceled"):e),m.abort(),m=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),h||(h=null),m.send(h)}))}},function(e,t,n){"use strict";var r=n(180);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(13);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function s(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function c(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||i,o=t(e);r.isUndefined(o)&&t!==c||(n[e]=o)})),n}},function(e,t){e.exports={version:"0.26.1"}},function(e,t,n){e.exports=!n(31)&&!n(87)((function(){return 7!=Object.defineProperty(n(123)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){e.exports=n(43)},function(e,t,n){var r=n(42),o=n(56),i=n(301)(!1),s=n(132)("IE_PROTO");e.exports=function(e,t){var n,a=o(e),c=0,u=[];for(n in a)n!=s&&r(a,n)&&u.push(n);for(;t.length>c;)r(a,n=t[c++])&&(~i(u,n)||u.push(n));return u}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(68);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(33),o=n(303),i=n(133),s=n(132)("IE_PROTO"),a=function(){},c=function(){var e,t=n(123)("iframe"),r=i.length;for(t.style.display="none",n(193).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c.prototype[i[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(a.prototype=r(e),n=new a,a.prototype=null,n[s]=e):n=c(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(14).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(189),o=n(133).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t){},function(e,t,n){"use strict";var r=n(67),o=n(32),i=n(188),s=n(43),a=n(69),c=n(310),u=n(90),f=n(311),l=n(15)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,h,g,v,y){c(n,t,h);var m,b,w,_=function(e){if(!d&&e in k)return k[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",C="values"==g,E=!1,k=e.prototype,x=k[l]||k["@@iterator"]||g&&k[g],T=x||_(g),A=g?C?_("entries"):T:void 0,R="Array"==t&&k.entries||x;if(R&&(w=f(R.call(new e)))!==Object.prototype&&w.next&&(u(w,S,!0),r||"function"==typeof w[l]||s(w,l,p)),C&&x&&"values"!==x.name&&(E=!0,T=function(){return x.call(this)}),r&&!y||!d&&!E&&k[l]||s(k,l,T),a[t]=T,a[S]=p,g)if(m={values:C?T:_("values"),keys:v?T:_("keys"),entries:A},y)for(b in m)b in k||i(k,b,m[b]);else o(o.P+o.F*(d||E),t,m);return m}},function(e,t,n){n(312);for(var r=n(14),o=n(43),i=n(69),s=n(15)("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(","),c=0;c<a.length;c++){var u=a[c],f=r[u],l=f&&f.prototype;l&&!l[s]&&o(l,s,u),i[u]=i.Array}},function(e,t,n){var r;!function(o){"use strict";var i,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,c=Math.floor,u="[BigNumber Error] ",f=u+"Number primitive has more than 15 significant digits: ",l=1e14,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],p=1e9;function h(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,n,r=1,o=e.length,i=e[0]+"";r<o;){for(n=14-(t=e[r++]+"").length;n--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function v(e,t){var n,r,o=e.c,i=t.c,s=e.s,a=t.s,c=e.e,u=t.e;if(!s||!a)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=c==u,!o||!i)return r?0:!o^n?1:-1;if(!r)return c>u^n?1:-1;for(a=(c=o.length)<(u=i.length)?c:u,s=0;s<a;s++)if(o[s]!=i[s])return o[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function y(e,t,n,r){if(e<t||e>n||e!==c(e))throw Error(u+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function m(e){var t=e.c.length-1;return h(e.e/14)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function w(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(++t>(r=e.length)){for(o=n,t-=r;--t;o+=n);e+=o}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(i=function e(t){var n,r,o,i,_,S,C,E,k,x=B.prototype={constructor:B,toString:null,valueOf:null},T=new B(1),A=20,R=4,O=-7,N=21,I=-1e7,P=1e7,D=!1,M=1,j=0,L={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},U="0123456789abcdefghijklmnopqrstuvwxyz",F=!0;function B(e,t){var n,i,a,u,l,d,p,h,g=this;if(!(g instanceof B))return new B(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>P?g.c=g.e=null:e.e<I?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,l=e;l>=10;l/=10,u++);return void(u>P?g.c=g.e=null:(g.e=u,g.c=[e]))}h=String(e)}else{if(!s.test(h=String(e)))return o(g,h,d);g.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(u=h.indexOf("."))>-1&&(h=h.replace(".","")),(l=h.search(/e/i))>0?(u<0&&(u=l),u+=+h.slice(l+1),h=h.substring(0,l)):u<0&&(u=h.length)}else{if(y(t,2,U.length,"Base"),10==t&&F)return H(g=new B(e),A+g.e+1,R);if(h=String(e),d="number"==typeof e){if(0*e!=0)return o(g,h,d,t);if(g.s=1/e<0?(h=h.slice(1),-1):1,B.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else g.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(n=U.slice(0,t),u=l=0,p=h.length;l<p;l++)if(n.indexOf(i=h.charAt(l))<0){if("."==i){if(l>u){u=p;continue}}else if(!a&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){a=!0,l=-1,u=0;continue}return o(g,String(e),d,t)}d=!1,(u=(h=r(h,t,10,g.s)).indexOf("."))>-1?h=h.replace(".",""):u=h.length}for(l=0;48===h.charCodeAt(l);l++);for(p=h.length;48===h.charCodeAt(--p););if(h=h.slice(l,++p)){if(p-=l,d&&B.DEBUG&&p>15&&(e>9007199254740991||e!==c(e)))throw Error(f+g.s*e);if((u=u-l-1)>P)g.c=g.e=null;else if(u<I)g.c=[g.e=0];else{if(g.e=u,g.c=[],l=(u+1)%14,u<0&&(l+=14),l<p){for(l&&g.c.push(+h.slice(0,l)),p-=14;l<p;)g.c.push(+h.slice(l,l+=14));l=14-(h=h.slice(l)).length}else l-=p;for(;l--;h+="0");g.c.push(+h)}}else g.c=[g.e=0]}function G(e,t,n,r){var o,i,s,a,c;if(null==n?n=R:y(n,0,8),!e.c)return e.toString();if(o=e.c[0],s=e.e,null==t)c=g(e.c),c=1==r||2==r&&(s<=O||s>=N)?b(c,s):w(c,s,"0");else if(i=(e=H(new B(e),t,n)).e,a=(c=g(e.c)).length,1==r||2==r&&(t<=i||i<=O)){for(;a<t;c+="0",a++);c=b(c,i)}else if(t-=s,c=w(c,i,"0"),i+1>a){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-a)>0)for(i+1==a&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function q(e,t){for(var n,r=1,o=new B(e[0]);r<e.length;r++){if(!(n=new B(e[r])).s){o=n;break}t.call(o,n)&&(o=n)}return o}function V(e,t,n){for(var r=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,r++);return(n=r+14*n-1)>P?e.c=e.e=null:n<I?e.c=[e.e=0]:(e.e=n,e.c=t),e}function H(e,t,n,r){var o,i,s,u,f,p,h,g=e.c,v=d;if(g){e:{for(o=1,u=g[0];u>=10;u/=10,o++);if((i=t-o)<0)i+=14,s=t,h=(f=g[p=0])/v[o-s-1]%10|0;else if((p=a((i+1)/14))>=g.length){if(!r)break e;for(;g.length<=p;g.push(0));f=h=0,o=1,s=(i%=14)-14+1}else{for(f=u=g[p],o=1;u>=10;u/=10,o++);h=(s=(i%=14)-14+o)<0?0:f/v[o-s-1]%10|0}if(r=r||t<0||null!=g[p+1]||(s<0?f:f%v[o-s-1]),r=n<4?(h||r)&&(0==n||n==(e.s<0?3:2)):h>5||5==h&&(4==n||r||6==n&&(i>0?s>0?f/v[o-s]:0:g[p-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,r?(t-=e.e+1,g[0]=v[(14-t%14)%14],e.e=-t||0):g[0]=e.e=0,e;if(0==i?(g.length=p,u=1,p--):(g.length=p+1,u=v[14-i],g[p]=s>0?c(f/v[o-s]%v[s])*u:0),r)for(;;){if(0==p){for(i=1,s=g[0];s>=10;s/=10,i++);for(s=g[0]+=u,u=1;s>=10;s/=10,u++);i!=u&&(e.e++,g[0]==l&&(g[0]=1));break}if(g[p]+=u,g[p]!=l)break;g[p--]=0,u=1}for(i=g.length;0===g[--i];g.pop());}e.e>P?e.c=e.e=null:e.e<I&&(e.c=[e.e=0])}return e}function W(e){var t,n=e.e;return null===n?e.toString():(t=g(e.c),t=n<=O||n>=N?b(t,n):w(t,n,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(n=e[t],0,p,t),A=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(n=e[t],0,8,t),R=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(y(n[0],-p,0,t),y(n[1],0,p,t),O=n[0],N=n[1]):(y(n,-p,p,t),O=-(N=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)y(n[0],-p,-1,t),y(n[1],1,p,t),I=n[0],P=n[1];else{if(y(n,-p,p,t),!n)throw Error(u+t+" cannot be zero: "+n);I=-(P=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(u+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw D=!n,Error(u+"crypto unavailable");D=n}else D=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(n=e[t],0,9,t),M=n),e.hasOwnProperty(t="POW_PRECISION")&&(y(n=e[t],0,p,t),j=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(u+t+" not an object: "+n);L=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(u+t+" invalid: "+n);F="0123456789"==n.slice(0,10),U=n}}return{DECIMAL_PLACES:A,ROUNDING_MODE:R,EXPONENTIAL_AT:[O,N],RANGE:[I,P],CRYPTO:D,MODULO_MODE:M,POW_PRECISION:j,FORMAT:L,ALPHABET:U}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,n,r=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&o>=-p&&o<=p&&o===c(o)){if(0===r[0]){if(0===o&&1===r.length)return!0;break e}if((t=(o+1)%14)<1&&(t+=14),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=l||n!==c(n))break e;if(0!==n)return!0}}}else if(null===r&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(u+"Invalid BigNumber: "+e)},B.maximum=B.max=function(){return q(arguments,x.lt)},B.minimum=B.min=function(){return q(arguments,x.gt)},B.random=(i=9007199254740992*Math.random()&2097151?function(){return c(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,o,s,f=0,l=[],h=new B(T);if(null==e?e=A:y(e,0,p),o=a(e/14),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));f<o;)(s=131072*t[f]+(t[f+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[f]=n[0],t[f+1]=n[1]):(l.push(s%1e14),f+=2);f=o/2}else{if(!crypto.randomBytes)throw D=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(o*=7);f<o;)(s=281474976710656*(31&t[f])+1099511627776*t[f+1]+4294967296*t[f+2]+16777216*t[f+3]+(t[f+4]<<16)+(t[f+5]<<8)+t[f+6])>=9e15?crypto.randomBytes(7).copy(t,f):(l.push(s%1e14),f+=7);f=o/7}if(!D)for(;f<o;)(s=i())<9e15&&(l[f++]=s%1e14);for(e%=14,(o=l[--f])&&e&&(s=d[14-e],l[f]=c(o/s)*s);0===l[f];l.pop(),f--);if(f<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=14);for(f=1,s=l[0];s>=10;s/=10,f++);f<14&&(r-=14-f)}return h.e=r,h.c=l,h}),B.sum=function(){for(var e=1,t=arguments,n=new B(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){function e(e,t,n,r){for(var o,i,s=[0],a=0,c=e.length;a<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(a++)),o=0;o<s.length;o++)s[o]>n-1&&(null==s[o+1]&&(s[o+1]=0),s[o+1]+=s[o]/n|0,s[o]%=n)}return s.reverse()}return function(t,r,o,i,s){var a,c,u,f,l,d,p,h,v=t.indexOf("."),y=A,m=R;for(v>=0&&(f=j,j=0,t=t.replace(".",""),d=(h=new B(r)).pow(t.length-v),j=f,h.c=e(w(g(d.c),d.e,"0"),10,o,"0123456789"),h.e=h.c.length),u=f=(p=e(t,r,o,s?(a=U,"0123456789"):(a="0123456789",U))).length;0==p[--f];p.pop());if(!p[0])return a.charAt(0);if(v<0?--u:(d.c=p,d.e=u,d.s=i,p=(d=n(d,h,y,m,o)).c,l=d.r,u=d.e),v=p[c=u+y+1],f=o/2,l=l||c<0||null!=p[c+1],l=m<4?(null!=v||l)&&(0==m||m==(d.s<0?3:2)):v>f||v==f&&(4==m||l||6==m&&1&p[c-1]||m==(d.s<0?8:7)),c<1||!p[0])t=l?w(a.charAt(1),-y,a.charAt(0)):a.charAt(0);else{if(p.length=c,l)for(--o;++p[--c]>o;)p[c]=0,c||(++u,p=[1].concat(p));for(f=p.length;!p[--f];);for(v=0,t="";v<=f;t+=a.charAt(p[v++]));t=w(t,u,a.charAt(0))}return t}}(),n=function(){function e(e,t,n){var r,o,i,s,a=0,c=e.length,u=t%1e7,f=t/1e7|0;for(e=e.slice();c--;)a=((o=u*(i=e[c]%1e7)+(r=f*i+(s=e[c]/1e7|0)*u)%1e7*1e7+a)/n|0)+(r/1e7|0)+f*s,e[c]=o%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]<t[n]?1:0,e[n]=o*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,o,i,s,a){var u,f,d,p,g,v,y,m,b,w,_,S,C,E,k,x,T,A=r.s==o.s?1:-1,R=r.c,O=o.c;if(!(R&&R[0]&&O&&O[0]))return new B(r.s&&o.s&&(R?!O||R[0]!=O[0]:O)?R&&0==R[0]||!O?0*A:A/0:NaN);for(b=(m=new B(A)).c=[],A=i+(f=r.e-o.e)+1,a||(a=l,f=h(r.e/14)-h(o.e/14),A=A/14|0),d=0;O[d]==(R[d]||0);d++);if(O[d]>(R[d]||0)&&f--,A<0)b.push(1),p=!0;else{for(E=R.length,x=O.length,d=0,A+=2,(g=c(a/(O[0]+1)))>1&&(O=e(O,g,a),R=e(R,g,a),x=O.length,E=R.length),C=x,_=(w=R.slice(0,x)).length;_<x;w[_++]=0);T=O.slice(),T=[0].concat(T),k=O[0],O[1]>=a/2&&k++;do{if(g=0,(u=t(O,w,x,_))<0){if(S=w[0],x!=_&&(S=S*a+(w[1]||0)),(g=c(S/k))>1)for(g>=a&&(g=a-1),y=(v=e(O,g,a)).length,_=w.length;1==t(v,w,y,_);)g--,n(v,x<y?T:O,y,a),y=v.length,u=1;else 0==g&&(u=g=1),y=(v=O.slice()).length;if(y<_&&(v=[0].concat(v)),n(w,v,_,a),_=w.length,-1==u)for(;t(O,w,x,_)<1;)g++,n(w,x<_?T:O,_,a),_=w.length}else 0===u&&(g++,w=[0]);b[d++]=g,w[0]?w[_++]=R[C]||0:(w=[R[C]],_=1)}while((C++<E||null!=w[0])&&A--);p=null!=w[0],b[0]||b.splice(0,1)}if(a==l){for(d=1,A=b[0];A>=10;A/=10,d++);H(m,i+(m.e=d+14*f-1)+1,s,p)}else m.e=f,m.r=+p;return m}}(),_=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,C=/^\.([^.]+)$/,E=/^-?(Infinity|NaN)$/,k=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,n,r){var o,i=n?t:t.replace(k,"");if(E.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(_,(function(e,t,n){return o="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=o?e:t})),r&&(o=r,i=i.replace(S,"$1").replace(C,"0.$1")),t!=i))return new B(i,o);if(B.DEBUG)throw Error(u+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},x.absoluteValue=x.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},x.comparedTo=function(e,t){return v(this,new B(e,t))},x.decimalPlaces=x.dp=function(e,t){var n,r,o,i=this;if(null!=e)return y(e,0,p),null==t?t=R:y(t,0,8),H(new B(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=14*((o=n.length-1)-h(this.e/14)),o=n[o])for(;o%10==0;o/=10,r--);return r<0&&(r=0),r},x.dividedBy=x.div=function(e,t){return n(this,new B(e,t),A,R)},x.dividedToIntegerBy=x.idiv=function(e,t){return n(this,new B(e,t),0,1)},x.exponentiatedBy=x.pow=function(e,t){var n,r,o,i,s,f,l,d,p=this;if((e=new B(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+W(e));if(null!=t&&(t=new B(t)),s=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return d=new B(Math.pow(+W(p),s?e.s*(2-m(e)):+W(e))),t?d.mod(t):d;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(r=!f&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||s&&p.c[1]>=24e7:p.c[0]<8e13||s&&p.c[0]<=9999975e7)))return i=p.s<0&&m(e)?-0:0,p.e>-1&&(i=1/i),new B(f?1/i:i);j&&(i=a(j/14+2))}for(s?(n=new B(.5),f&&(e.s=1),l=m(e)):l=(o=Math.abs(+W(e)))%2,d=new B(T);;){if(l){if(!(d=d.times(p)).c)break;i?d.c.length>i&&(d.c.length=i):r&&(d=d.mod(t))}if(o){if(0===(o=c(o/2)))break;l=o%2}else if(H(e=e.times(n),e.e+1,1),e.e>14)l=m(e);else{if(0===(o=+W(e)))break;l=o%2}p=p.times(p),i?p.c&&p.c.length>i&&(p.c.length=i):r&&(p=p.mod(t))}return r?d:(f&&(d=T.div(d)),t?d.mod(t):i?H(d,j,R,void 0):d)},x.integerValue=function(e){var t=new B(this);return null==e?e=R:y(e,0,8),H(t,t.e+1,e)},x.isEqualTo=x.eq=function(e,t){return 0===v(this,new B(e,t))},x.isFinite=function(){return!!this.c},x.isGreaterThan=x.gt=function(e,t){return v(this,new B(e,t))>0},x.isGreaterThanOrEqualTo=x.gte=function(e,t){return 1===(t=v(this,new B(e,t)))||0===t},x.isInteger=function(){return!!this.c&&h(this.e/14)>this.c.length-2},x.isLessThan=x.lt=function(e,t){return v(this,new B(e,t))<0},x.isLessThanOrEqualTo=x.lte=function(e,t){return-1===(t=v(this,new B(e,t)))||0===t},x.isNaN=function(){return!this.s},x.isNegative=function(){return this.s<0},x.isPositive=function(){return this.s>0},x.isZero=function(){return!!this.c&&0==this.c[0]},x.minus=function(e,t){var n,r,o,i,s=this,a=s.s;if(t=(e=new B(e,t)).s,!a||!t)return new B(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/14,u=e.e/14,f=s.c,d=e.c;if(!c||!u){if(!f||!d)return f?(e.s=-t,e):new B(d?s:NaN);if(!f[0]||!d[0])return d[0]?(e.s=-t,e):new B(f[0]?s:3==R?-0:0)}if(c=h(c),u=h(u),f=f.slice(),a=c-u){for((i=a<0)?(a=-a,o=f):(u=c,o=d),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(r=(i=(a=f.length)<(t=d.length))?a:t,a=t=0;t<r;t++)if(f[t]!=d[t]){i=f[t]<d[t];break}if(i&&(o=f,f=d,d=o,e.s=-e.s),(t=(r=d.length)-(n=f.length))>0)for(;t--;f[n++]=0);for(t=l-1;r>a;){if(f[--r]<d[r]){for(n=r;n&&!f[--n];f[n]=t);--f[n],f[r]+=l}f[r]-=d[r]}for(;0==f[0];f.splice(0,1),--u);return f[0]?V(e,f,u):(e.s=3==R?-1:1,e.c=[e.e=0],e)},x.modulo=x.mod=function(e,t){var r,o,i=this;return e=new B(e,t),!i.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||i.c&&!i.c[0]?new B(i):(9==M?(o=e.s,e.s=1,r=n(i,e,0,3),e.s=o,r.s*=o):r=n(i,e,0,M),(e=i.minus(r.times(e))).c[0]||1!=M||(e.s=i.s),e)},x.multipliedBy=x.times=function(e,t){var n,r,o,i,s,a,c,u,f,d,p,g,v,y,m=this,b=m.c,w=(e=new B(e,t)).c;if(!(b&&w&&b[0]&&w[0]))return!m.s||!e.s||b&&!b[0]&&!w||w&&!w[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=h(m.e/14)+h(e.e/14),e.s*=m.s,(c=b.length)<(d=w.length)&&(v=b,b=w,w=v,o=c,c=d,d=o),o=c+d,v=[];o--;v.push(0));for(y=l,1e7,o=d;--o>=0;){for(n=0,p=w[o]%1e7,g=w[o]/1e7|0,i=o+(s=c);i>o;)n=((u=p*(u=b[--s]%1e7)+(a=g*u+(f=b[s]/1e7|0)*p)%1e7*1e7+v[i]+n)/y|0)+(a/1e7|0)+g*f,v[i--]=u%y;v[i]=n}return n?++r:v.splice(0,1),V(e,v,r)},x.negated=function(){var e=new B(this);return e.s=-e.s||null,e},x.plus=function(e,t){var n,r=this,o=r.s;if(t=(e=new B(e,t)).s,!o||!t)return new B(NaN);if(o!=t)return e.s=-t,r.minus(e);var i=r.e/14,s=e.e/14,a=r.c,c=e.c;if(!i||!s){if(!a||!c)return new B(o/0);if(!a[0]||!c[0])return c[0]?e:new B(a[0]?r:0*o)}if(i=h(i),s=h(s),a=a.slice(),o=i-s){for(o>0?(s=i,n=c):(o=-o,n=a),n.reverse();o--;n.push(0));n.reverse()}for((o=a.length)-(t=c.length)<0&&(n=c,c=a,a=n,t=o),o=0;t;)o=(a[--t]=a[t]+c[t]+o)/l|0,a[t]=l===a[t]?0:a[t]%l;return o&&(a=[o].concat(a),++s),V(e,a,s)},x.precision=x.sd=function(e,t){var n,r,o,i=this;if(null!=e&&e!==!!e)return y(e,1,p),null==t?t=R:y(t,0,8),H(new B(i),e,t);if(!(n=i.c))return null;if(r=14*(o=n.length-1)+1,o=n[o]){for(;o%10==0;o/=10,r--);for(o=n[0];o>=10;o/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},x.shiftedBy=function(e){return y(e,-9007199254740991,9007199254740991),this.times("1e"+e)},x.squareRoot=x.sqrt=function(){var e,t,r,o,i,s=this,a=s.c,c=s.s,u=s.e,f=A+4,l=new B("0.5");if(1!==c||!a||!a[0])return new B(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+W(s)))||c==1/0?(((t=g(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=h((u+1)/2)-(u<0||u%2),r=new B(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new B(c+""),r.c[0])for((c=(u=r.e)+f)<3&&(c=0);;)if(i=r,r=l.times(i.plus(n(s,i,f,1))),g(i.c).slice(0,c)===(t=g(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(H(r,r.e+A+2,1),e=!r.times(r).eq(s));break}if(!o&&(H(i,i.e+A+2,0),i.times(i).eq(s))){r=i;break}f+=4,c+=4,o=1}return H(r,r.e+A+1,R,e)},x.toExponential=function(e,t){return null!=e&&(y(e,0,p),e++),G(this,e,t,1)},x.toFixed=function(e,t){return null!=e&&(y(e,0,p),e=e+this.e+1),G(this,e,t)},x.toFormat=function(e,t,n){var r,o=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=L;else if("object"!=typeof n)throw Error(u+"Argument not an object: "+n);if(r=o.toFixed(e,t),o.c){var i,s=r.split("."),a=+n.groupSize,c=+n.secondaryGroupSize,f=n.groupSeparator||"",l=s[0],d=s[1],p=o.s<0,h=p?l.slice(1):l,g=h.length;if(c&&(i=a,a=c,c=i,g-=i),a>0&&g>0){for(i=g%a||a,l=h.substr(0,i);i<g;i+=a)l+=f+h.substr(i,a);c>0&&(l+=f+h.slice(i)),p&&(l="-"+l)}r=d?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):l}return(n.prefix||"")+r+(n.suffix||"")},x.toFraction=function(e){var t,r,o,i,s,a,c,f,l,p,h,v,y=this,m=y.c;if(null!=e&&(!(c=new B(e)).isInteger()&&(c.c||1!==c.s)||c.lt(T)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+W(c));if(!m)return new B(y);for(t=new B(T),l=r=new B(T),o=f=new B(T),v=g(m),s=t.e=v.length-y.e-1,t.c[0]=d[(a=s%14)<0?14+a:a],e=!e||c.comparedTo(t)>0?s>0?t:l:c,a=P,P=1/0,c=new B(v),f.c[0]=0;p=n(c,t,0,1),1!=(i=r.plus(p.times(o))).comparedTo(e);)r=o,o=i,l=f.plus(p.times(i=l)),f=i,t=c.minus(p.times(i=t)),c=i;return i=n(e.minus(r),o,0,1),f=f.plus(i.times(l)),r=r.plus(i.times(o)),f.s=l.s=y.s,h=n(l,o,s*=2,R).minus(y).abs().comparedTo(n(f,r,s,R).minus(y).abs())<1?[l,o]:[f,r],P=a,h},x.toNumber=function(){return+W(this)},x.toPrecision=function(e,t){return null!=e&&y(e,1,p),G(this,e,t,2)},x.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=O||i>=N?b(g(n.c),i):w(g(n.c),i,"0"):10===e&&F?t=w(g((n=H(new B(n),A+i+1,R)).c),n.e,"0"):(y(e,2,U.length,"Base"),t=r(w(g(n.c),i,"0"),10,e,o,!0)),o<0&&n.c[0]&&(t="-"+t)),t},x.valueOf=x.toJSON=function(){return W(this)},x._isBigNumber=!0,null!=t&&B.set(t),B}()).default=i.BigNumber=i,void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){n(200)("asyncIterator")},function(e,t,n){var r=n(4),o=n(47),i=n(48),s=n(201),a=n(9).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},function(e,t,n){t.f=n(3)},function(e,t,n){"use strict";var r=n(4),o=n(24),i=n(11),s=n(5),a=n(25),c=n(104).KEY,u=n(8),f=n(74),l=n(63),d=n(38),p=n(3),h=n(201),g=n(200),v=n(317),y=n(161),m=n(10),b=n(17),w=n(20),_=n(37),S=n(59),C=n(49),E=n(60),k=n(318),x=n(64),T=n(137),A=n(9),R=n(61),O=x.f,N=A.f,I=k.f,P=r.Symbol,D=r.JSON,M=D&&D.stringify,j=p("_hidden"),L=p("toPrimitive"),U={}.propertyIsEnumerable,F=f("symbol-registry"),B=f("symbols"),G=f("op-symbols"),q=Object.prototype,V="function"==typeof P&&!!T.f,H=r.QObject,W=!H||!H.prototype||!H.prototype.findChild,J=i&&u((function(){return 7!=E(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=O(q,t);r&&delete q[t],N(e,t,n),r&&e!==q&&N(q,t,r)}:N,z=function(e){var t=B[e]=E(P.prototype);return t._k=e,t},K=V&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},Y=function(e,t,n){return e===q&&Y(G,t,n),m(e),t=S(t,!0),m(n),o(B,t)?(n.enumerable?(o(e,j)&&e[j][t]&&(e[j][t]=!1),n=E(n,{enumerable:C(0,!1)})):(o(e,j)||N(e,j,C(1,{})),e[j][t]=!0),J(e,t,n)):N(e,t,n)},$=function(e,t){m(e);for(var n,r=v(t=_(t)),o=0,i=r.length;i>o;)Y(e,n=r[o++],t[n]);return e},X=function(e){var t=U.call(this,e=S(e,!0));return!(this===q&&o(B,e)&&!o(G,e))&&(!(t||!o(this,e)||!o(B,e)||o(this,j)&&this[j][e])||t)},Z=function(e,t){if(e=_(e),t=S(t,!0),e!==q||!o(B,t)||o(G,t)){var n=O(e,t);return!n||!o(B,t)||o(e,j)&&e[j][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=I(_(e)),r=[],i=0;n.length>i;)o(B,t=n[i++])||t==j||t==c||r.push(t);return r},ee=function(e){for(var t,n=e===q,r=I(n?G:_(e)),i=[],s=0;r.length>s;)!o(B,t=r[s++])||n&&!o(q,t)||i.push(B[t]);return i};V||(a((P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===q&&t.call(G,n),o(this,j)&&o(this[j],e)&&(this[j][e]=!1),J(this,e,C(1,n))};return i&&W&&J(q,e,{configurable:!0,set:t}),z(e)}).prototype,"toString",(function(){return this._k})),x.f=Z,A.f=Y,n(51).f=k.f=Q,n(107).f=X,T.f=ee,i&&!n(48)&&a(q,"propertyIsEnumerable",X,!0),h.f=function(e){return z(p(e))}),s(s.G+s.W+s.F*!V,{Symbol:P});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)p(te[ne++]);for(var re=R(p.store),oe=0;re.length>oe;)g(re[oe++]);s(s.S+s.F*!V,"Symbol",{for:function(e){return o(F,e+="")?F[e]:F[e]=P(e)},keyFor:function(e){if(!K(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),s(s.S+s.F*!V,"Object",{create:function(e,t){return void 0===t?E(e):$(E(e),t)},defineProperty:Y,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var ie=u((function(){T.f(1)}));s(s.S+s.F*ie,"Object",{getOwnPropertySymbols:function(e){return T.f(w(e))}}),D&&s(s.S+s.F*(!V||u((function(){var e=P();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(b(t)||void 0!==e)&&!K(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!K(t))return t}),r[1]=t,M.apply(D,r)}}),P.prototype[L]||n(19)(P.prototype,L,P.prototype.valueOf),l(P,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){var r=n(33);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(69),o=n(15)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(206),o=n(15)("iterator"),i=n(69);e.exports=n(18).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(68),o=n(15)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){var r=n(15)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],s=i[r]();s.next=function(){return{done:n=!0}},i[r]=function(){return s},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(5),o=n(12),i=n(175),s="".startsWith;r(r.P+r.F*n(177)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return s?s.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(5),o=n(108)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r(r.P+r.F*i,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(77)("find")},function(e,t,n){"use strict";e.exports=function(e,t){var n=new Array(arguments.length-1),r=0,o=2,i=!0;for(;o<arguments.length;)n[r++]=arguments[o++];return new Promise((function(o,s){n[r]=function(e){if(i)if(i=!1,e)s(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];o.apply(null,t)}};try{e.apply(t||null,n)}catch(e){i&&(i=!1,s(e))}}))}},function(module,exports,__webpack_require__){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},function(e,t,n){"use strict";t.Service=n(343)},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";e.exports=function(e){for(var t,n=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var u=a[c].resolve(),f=e._fieldsArray.indexOf(u),l=u.resolvedType instanceof r?"int32":u.type,d=o.basic[l];t="m"+i.safeProp(u.name),u.map?(n("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|o.mapKey[u.keyType],u.keyType),void 0===d?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",f,t):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|d,l,t),n("}")("}")):u.repeated?(n("if(%s!=null&&%s.length){",t,t),u.packed&&void 0!==o.packed[l]?n("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",l,t)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",t),void 0===d?s(n,u,f,t+"[i]"):n("w.uint32(%i).%s(%s[i])",(u.id<<3|d)>>>0,l,t)),n("}")):(u.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,u.name),void 0===d?s(n,u,f,t):n("w.uint32(%i).%s(%s)",(u.id<<3|d)>>>0,l,t))}return n("return w")};var r=n(28),o=n(71),i=n(6);function s(e,t,n,r){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(t.id<<3|2)>>>0)}},function(e,t,n){"use strict";e.exports=m;var r=n(70);((m.prototype=Object.create(r.prototype)).constructor=m).className="Type";var o=n(28),i=n(92),s=n(58),a=n(216),c=n(217),u=n(140),f=n(139),l=n(138),d=n(6),p=n(214),h=n(219),g=n(220),v=n(221),y=n(222);function m(e,t){r.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function b(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(m.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var n=this.fields[e[t]],r=n.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=n}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=d.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=d.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=m.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof u||((e.prototype=new u).constructor=e,d.merge(e.prototype,t)),e.$type=e.prototype.$type=this,d.merge(e,u,!0),this._ctor=e;for(var n=0;n<this.fieldsArray.length;++n)this._fieldsArray[n].resolve();var r={};for(n=0;n<this.oneofsArray.length;++n)r[this._oneofsArray[n].resolve().name]={get:d.oneOfGetter(this._oneofsArray[n].oneof),set:d.oneOfSetter(this._oneofsArray[n].oneof)};n&&Object.defineProperties(e.prototype,r)}}}),m.generateConstructor=function(e){for(var t,n=d.codegen(["p"],e.name),r=0;r<e.fieldsArray.length;++r)(t=e._fieldsArray[r]).map?n("this%s={}",d.safeProp(t.name)):t.repeated&&n("this%s=[]",d.safeProp(t.name));return n("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},m.fromJSON=function(e,t){var n=new m(e,t.options);n.extensions=t.extensions,n.reserved=t.reserved;for(var u=Object.keys(t.fields),f=0;f<u.length;++f)n.add((void 0!==t.fields[u[f]].keyType?a.fromJSON:s.fromJSON)(u[f],t.fields[u[f]]));if(t.oneofs)for(u=Object.keys(t.oneofs),f=0;f<u.length;++f)n.add(i.fromJSON(u[f],t.oneofs[u[f]]));if(t.nested)for(u=Object.keys(t.nested),f=0;f<u.length;++f){var l=t.nested[u[f]];n.add((void 0!==l.id?s.fromJSON:void 0!==l.fields?m.fromJSON:void 0!==l.values?o.fromJSON:void 0!==l.methods?c.fromJSON:r.fromJSON)(u[f],l))}return t.extensions&&t.extensions.length&&(n.extensions=t.extensions),t.reserved&&t.reserved.length&&(n.reserved=t.reserved),t.group&&(n.group=!0),t.comment&&(n.comment=t.comment),n},m.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return d.toObject(["options",t&&t.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,e),"fields",r.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",n?this.comment:void 0])},m.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var n=this.oneofsArray;for(t=0;t<n.length;)n[t++].resolve();return r.prototype.resolveAll.call(this)},m.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},m.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof s&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),b(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),b(this)):r.prototype.add.call(this,e)},m.prototype.remove=function(e){if(e instanceof s&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),b(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),b(this)}return r.prototype.remove.call(this,e)},m.prototype.isReservedId=function(e){return r.isReservedId(this.reserved,e)},m.prototype.isReservedName=function(e){return r.isReservedName(this.reserved,e)},m.prototype.create=function(e){return new this.ctor(e)},m.prototype.setup=function(){for(var e=this.fullName,t=[],n=0;n<this.fieldsArray.length;++n)t.push(this._fieldsArray[n].resolve().resolvedType);this.encode=p(this)({Writer:l,types:t,util:d}),this.decode=h(this)({Reader:f,types:t,util:d}),this.verify=g(this)({types:t,util:d}),this.fromObject=v.fromObject(this)({types:t,util:d}),this.toObject=v.toObject(this)({types:t,util:d});var r=y[e];if(r){var o=Object.create(this);o.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(o),o.toObject=this.toObject,this.toObject=r.toObject.bind(o)}return this},m.prototype.encode=function(e,t){return this.setup().encode(e,t)},m.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},m.prototype.decode=function(e,t){return this.setup().decode(e,t)},m.prototype.decodeDelimited=function(e){return e instanceof f||(e=f.create(e)),this.decode(e,e.uint32())},m.prototype.verify=function(e){return this.setup().verify(e)},m.prototype.fromObject=function(e){return this.setup().fromObject(e)},m.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},m.d=function(e){return function(t){d.decorateType(t,e)}}},function(e,t,n){"use strict";e.exports=s;var r=n(58);((s.prototype=Object.create(r.prototype)).constructor=s).className="MapField";var o=n(71),i=n(6);function s(e,t,n,o,s,a){if(r.call(this,e,t,o,void 0,void 0,s,a),!i.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){return new s(e,t.id,t.keyType,t.type,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},s.d=function(e,t,n){return"function"==typeof n?n=i.decorateType(n).name:n&&"object"==typeof n&&(n=i.decorateEnum(n).name),function(r,o){i.decorateType(r.constructor).add(new s(o,e,t,n))}}},function(e,t,n){"use strict";e.exports=a;var r=n(70);((a.prototype=Object.create(r.prototype)).constructor=a).className="Service";var o=n(218),i=n(6),s=n(212);function a(e,t){r.call(this,e,t),this.methods={},this._methodsArray=null}function c(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var n=new a(e,t.options);if(t.methods)for(var r=Object.keys(t.methods),i=0;i<r.length;++i)n.add(o.fromJSON(r[i],t.methods[r[i]]));return t.nested&&n.addJSON(t.nested),n.comment=t.comment,n},a.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",r.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",n?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||r.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return r.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof o?(this.methods[e.name]=e,e.parent=this,c(this)):r.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof o){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,c(this)}return r.prototype.remove.call(this,e)},a.prototype.create=function(e,t,n){for(var r,o=new s.Service(e,t,n),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((r=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");o[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return o}},function(e,t,n){"use strict";e.exports=i;var r=n(57);((i.prototype=Object.create(r.prototype)).constructor=i).className="Method";var o=n(6);function i(e,t,n,i,s,a,c,u,f){if(o.isObject(s)?(c=s,s=a=void 0):o.isObject(a)&&(c=a,a=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(n))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");r.call(this,e,c),this.type=t||"rpc",this.requestType=n,this.requestStream=!!s||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=f}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},function(e,t,n){"use strict";e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var n=0;n<e.fieldsArray.length;++n){var a=e._fieldsArray[n].resolve(),c=a.resolvedType instanceof r?"int32":a.type,u="m"+i.safeProp(a.name);t("case %i:",a.id),a.map?(t("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==o.defaults[a.keyType]?t("k=%j",o.defaults[a.keyType]):t("k=null"),void 0!==o.defaults[c]?t("value=%j",o.defaults[c]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===o.basic[c]?t("value=types[%i].decode(r,r.uint32())",n):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',u):t("%s[k]=value",u)):a.repeated?(t("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==o.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,c)("}else"),void 0===o.basic[c]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,n):t("%s.push(r.%s())",u,c)):void 0===o.basic[c]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,n):t("%s=r.%s()",u,c),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),n=0;n<e._fieldsArray.length;++n){var f=e._fieldsArray[n];f.required&&t("if(!m.hasOwnProperty(%j))",f.name)("throw util.ProtocolError(%j,{instance:m})",s(f))}return t("return m")};var r=n(28),o=n(71),i=n(6);function s(e){return"missing required '"+e.name+"'"}},function(e,t,n){"use strict";e.exports=function(e){var t=o.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),n=e.oneofsArray,r={};n.length&&t("var p={}");for(var c=0;c<e.fieldsArray.length;++c){var u=e._fieldsArray[c].resolve(),f="m"+o.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",f,u.name),u.map)t("if(!util.isObject(%s))",f)("return%j",i(u,"object"))("var k=Object.keys(%s)",f)("for(var i=0;i<k.length;++i){"),a(t,u,"k[i]"),s(t,u,c,f+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",f)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",f),s(t,u,c,f+"[i]")("}");else{if(u.partOf){var l=o.safeProp(u.partOf.name);1===r[u.partOf.name]&&t("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,t("p%s=1",l)}s(t,u,c,f)}u.optional&&t("}")}return t("return null")};var r=n(28),o=n(6);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function s(e,t,n,o){if(t.resolvedType)if(t.resolvedType instanceof r){e("switch(%s){",o)("default:")("return%j",i(t,"enum value"));for(var s=Object.keys(t.resolvedType.values),a=0;a<s.length;++a)e("case %i:",t.resolvedType.values[s[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",n,o)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",o)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',o)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',o)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",o)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",i(t,"buffer"))}return e}function a(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",n)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",n)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",n)("return%j",i(t,"boolean key"))}return e}},function(e,t,n){"use strict";var r=t,o=n(28),i=n(6);function s(e,t,n,r){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",r);for(var i=t.resolvedType.values,s=Object.keys(i),a=0;a<s.length;++a)t.repeated&&i[s[a]]===t.typeDefault&&e("default:"),e("case%j:",s[a])("case %i:",i[s[a]])("m%s=%j",r,i[s[a]])("break");e("}")}else e('if(typeof d%s!=="object")',r)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,n,r);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,c)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r)}}return e}function a(e,t,n,r){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,n,r,r):e("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:e("d%s=m%s",r,r)}}return e}r.fromObject=function(e){var t=e.fieldsArray,n=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;r<t.length;++r){var a=t[r].resolve(),c=i.safeProp(a.name);a.map?(n("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),s(n,a,r,c+"[ks[i]]")("}")("}")):a.repeated?(n("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),s(n,a,r,c+"[i]")("}")("}")):(a.resolvedType instanceof o||n("if(d%s!=null){",c),s(n,a,r,c),a.resolvedType instanceof o||n("}"))}return n("return m")},r.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var n=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],s=[],c=[],u=0;u<t.length;++u)t[u].partOf||(t[u].resolve().repeated?r:t[u].map?s:c).push(t[u]);if(r.length){for(n("if(o.arrays||o.defaults){"),u=0;u<r.length;++u)n("d%s=[]",i.safeProp(r[u].name));n("}")}if(s.length){for(n("if(o.objects||o.defaults){"),u=0;u<s.length;++u)n("d%s={}",i.safeProp(s[u].name));n("}")}if(c.length){for(n("if(o.defaults){"),u=0;u<c.length;++u){var f=c[u],l=i.safeProp(f.name);if(f.resolvedType instanceof o)n("d%s=o.enums===String?%j:%j",l,f.resolvedType.valuesById[f.typeDefault],f.typeDefault);else if(f.long)n("if(util.Long){")("var n=new util.Long(%i,%i,%j)",f.typeDefault.low,f.typeDefault.high,f.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,f.typeDefault.toString(),f.typeDefault.toNumber());else if(f.bytes){var d="["+Array.prototype.slice.call(f.typeDefault).join(",")+"]";n("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,f.typeDefault))("else{")("d%s=%s",l,d)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else n("d%s=%j",l,f.typeDefault)}n("}")}var p=!1;for(u=0;u<t.length;++u){f=t[u];var h=e._fieldsArray.indexOf(f);l=i.safeProp(f.name);f.map?(p||(p=!0,n("var ks2")),n("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),a(n,f,h,l+"[ks2[j]]")("}")):f.repeated?(n("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),a(n,f,h,l+"[j]")("}")):(n("if(m%s!=null&&m.hasOwnProperty(%j)){",l,f.name),a(n,f,h,l),f.partOf&&n("if(o.oneofs)")("d%s=%j",i.safeProp(f.partOf.name),f.name)),n("}")}return n("return d")}},function(e,t,n){"use strict";var r=t,o=n(140);r[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),n=this.lookup(t);if(n){var r="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:n.encode(n.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var n="",r="";if(t&&t.json&&e.type_url&&e.value){r=e.type_url.substring(e.type_url.lastIndexOf("/")+1),n=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(r);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof o){var s=e.$type.toObject(e,t);return""===n&&(n="type.googleapis.com/"),r=n+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),s["@type"]=r,s}return this.toObject(e,t)}}},function(e,t,n){"use strict";e.exports=l;var r=n(70);((l.prototype=Object.create(r.prototype)).constructor=l).className="Root";var o,i,s,a=n(58),c=n(28),u=n(92),f=n(6);function l(e){r.call(this,"",e),this.deferred=[],this.files=[]}function d(){}l.fromJSON=function(e,t){return t||(t=new l),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},l.prototype.resolvePath=f.path.resolve,l.prototype.fetch=f.fetch,l.prototype.load=function e(t,n,r){"function"==typeof n&&(r=n,n=void 0);var o=this;if(!r)return f.asPromise(e,o,t,n);var a=r===d;function c(e,t){if(r){var n=r;if(r=null,a)throw e;n(e,t)}}function u(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var n=e.substring(t);if(n in s)return n}return null}function l(e,t){try{if(f.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),f.isString(t)){i.filename=e;var r,s=i(t,o,n),l=0;if(s.imports)for(;l<s.imports.length;++l)(r=u(s.imports[l])||o.resolvePath(e,s.imports[l]))&&p(r);if(s.weakImports)for(l=0;l<s.weakImports.length;++l)(r=u(s.weakImports[l])||o.resolvePath(e,s.weakImports[l]))&&p(r,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){c(e)}a||h||c(null,o)}function p(e,t){if(!(o.files.indexOf(e)>-1))if(o.files.push(e),e in s)a?l(e,s[e]):(++h,setTimeout((function(){--h,l(e,s[e])})));else if(a){var n;try{n=f.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||c(e))}l(e,n)}else++h,o.fetch(e,(function(n,i){--h,r&&(n?t?h||c(null,o):c(n):l(e,i))}))}var h=0;f.isString(t)&&(t=[t]);for(var g,v=0;v<t.length;++v)(g=o.resolvePath("",t[v]))&&p(g);if(a)return o;h||c(null,o)},l.prototype.loadSync=function(e,t){if(!f.isNode)throw Error("not supported");return this.load(e,t,d)},l.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var p=/^[A-Z]/;function h(e,t){var n=t.parent.lookup(t.extend);if(n){var r=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.declaringField=t,t.extensionField=r,n.add(r),!0}return!1}l.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||h(0,e)||this.deferred.push(e);else if(e instanceof c)p.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof u)){if(e instanceof o)for(var t=0;t<this.deferred.length;)h(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var n=0;n<e.nestedArray.length;++n)this._handleAdd(e._nestedArray[n]);p.test(e.name)&&(e.parent[e.name]=e)}},l.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof c)p.test(e.name)&&delete e.parent[e.name];else if(e instanceof r){for(var n=0;n<e.nestedArray.length;++n)this._handleRemove(e._nestedArray[n]);p.test(e.name)&&delete e.parent[e.name]}},l._configure=function(e,t,n){o=e,i=t,s=n}},function(e,t,n){var r=n(33),o=n(88),i=n(15)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||null==(n=r(s)[i])?t:o(n)}},function(e,t,n){var r,o,i,s=n(65),a=n(357),c=n(193),u=n(123),f=n(14),l=f.process,d=f.setImmediate,p=f.clearImmediate,h=f.MessageChannel,g=f.Dispatch,v=0,y={},m=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},b=function(e){m.call(e.data)};d&&p||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++v]=function(){a("function"==typeof e?e:Function(e),t)},r(v),v},p=function(e){delete y[e]},"process"==n(68)(l)?r=function(e){l.nextTick(s(m,e,1))}:g&&g.now?r=function(e){g.now(s(m,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=b,r=s(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(e){f.postMessage(e+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(e){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),m.call(e)}}:function(e){setTimeout(s(m,e,1),0)}),e.exports={set:d,clear:p}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(33),o=n(44),i=n(141);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var r=n(247),o=n(110),i=n(166),s=n(79)("socket.io-client");e.exports=t=c;var a=t.managers={};function c(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,o=r(e),c=o.source,u=o.id,f=o.path,l=a[u]&&f in a[u].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||l?(s("ignoring socket cache for %s",c),n=i(c,t)):(a[u]||(s("new io instance for %s",c),a[u]=i(c,t)),n=a[u]),o.query&&!t.query&&(t.query=o.query),n.socket(o.path,t)}t.protocol=o.protocol,t.connect=c,t.Manager=n(166),t.Socket=n(172)},function(e,t,n){var r,o,i;n(34);o=[n(0)],void 0===(i="function"==typeof(r=function(e){"use strict";return(e.roots.messagebody||(e.roots.messagebody=new e.Root)).addJSON({im:{nested:{floo:{nested:{protobuf:{nested:{MessageOperation:{fields:{type:{type:"OpType",id:1},mid:{type:"uint64",id:2},xid:{type:"XID",id:3}},nested:{OpType:{values:{UNKNOWN:0,READ_ACK:1,READ_ALL:2,READ_CANCEL:3,DELIVER_ACK:4,RECALL:5,DELETE:6,PLAY_ACK:7,APPEND:8,REPLACE:9}}}},MessageBody:{fields:{type:{type:"Type",id:1},content:{type:"string",id:4},ctype:{type:"ContentType",id:5},operation:{type:"MessageOperation",id:6},config:{type:"string",id:7},attachment:{type:"string",id:8},ext:{type:"string",id:9},qos:{type:"QoS",id:10},sender_name:{type:"string",id:11},is_system:{type:"bool",id:12},priority:{type:"uint32",id:13},status:{type:"Status",id:14},edit_timestamp:{type:"uint64",id:15}},nested:{Type:{values:{NORMAL:0,OPER:1,CHAT:2,GROUPCHAT:3}},ContentType:{values:{TEXT:0,IMAGE:1,AUDIO:2,VIDEO:3,FILE:4,LOCATION:5,COMMAND:6,FORWARD:7,RTC:8}},QoS:{values:{AT_LEAST_ONCE:0,AT_MOST_ONCE:1,EXACTLY_ONCE:2}},Status:{values:{UNREAD:0,DELIVERED:1,READ:2}}}},XID:{fields:{uid:{type:"uint64",id:1},deviceSN:{type:"uint32",id:2}}}}}}}}}})})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){var r,o,i;n(34);o=[n(0)],void 0===(i="function"==typeof(r=function(e){"use strict";return(e.roots.groupnotice||(e.roots.groupnotice=new e.Root)).addJSON({im:{nested:{floo:{nested:{protobuf:{nested:{GroupNotice:{fields:{type:{type:"Type",id:1},gid:{type:"XID",id:2},from:{type:"XID",id:3},to:{rule:"repeated",type:"XID",id:4},content:{type:"string",id:5}},nested:{Type:{values:{UNKNOWN:0,PRESENCE:1,ABSENCE:2,CREATED:3,DESTROYED:4,JOINED:5,LEAVED:6,APPLYED:7,APPLY_ACCEPTED:8,APPLY_DECLINED:9,INVITED:10,INVITE_ACCEPTED:11,INVITE_DECLINED:12,KICKED:13,BLOCKED:14,UNBLOCKED:15,OWNER_ASSIGNED:16,ADMIN_GRANTED:17,ADMIN_REVOKED:18,MUTED:19,UNMUTED:20,BANNED:21,UNBANNED:22,INFO_UPDATED:23,ANNOUNCEMENT_UPDATED:24,MESSAGE_SETTING:25,FILE_UPLOADED:26,FILE_DELETED:27,FILE_UPDATED:28}}}},XID:{fields:{uid:{type:"uint64",id:1},deviceSN:{type:"uint32",id:2}}}}}}}}}})})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){var r,o,i;n(34);o=[n(0)],void 0===(i="function"==typeof(r=function(e){"use strict";return(e.roots.rosternotice||(e.roots.rosternotice=new e.Root)).addJSON({im:{nested:{floo:{nested:{protobuf:{nested:{RosterNotice:{fields:{type:{type:"Type",id:1},from:{type:"XID",id:2},to:{rule:"repeated",type:"XID",id:3},content:{type:"string",id:4},roster_vsn:{type:"string",id:5}},nested:{Type:{values:{UNKNOWN:0,ADDED:1,REMOVED:2,ACCEPTED:3,DECLINED:4,BLOCKED:5,UNBLOCKED:6,APPLIED:7,INFO_UPDATED:8,MUTED:9,UNMUTED:10}}}},XID:{fields:{uid:{type:"uint64",id:1},deviceSN:{type:"uint32",id:2}}}}}}}}}})})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){var r,o,i;n(34);o=[n(0)],void 0===(i="function"==typeof(r=function(e){"use strict";return(e.roots.usernotice||(e.roots.usernotice=new e.Root)).addJSON({im:{nested:{floo:{nested:{protobuf:{nested:{UserNotice:{fields:{type:{type:"Type",id:1},content:{type:"string",id:2}},nested:{Type:{values:{UNKNOWN:0,PASSWORD_CHANGED:1,FROZEN:2,REMOVED:3,KICK_BY_SAME_DEVICE:4,KICKED_BY_OTHER_DEVICE:5,INFO_UPDATED:6,DEVICE_LOGIN:7,DEVICE_LOGOUT:8,DEVICE_ADDED:9,DEVICE_REMOVED:10,CLUSTER_CHANGED:11,DNS_UPDATE:12,TRAFFIC_LIMIT_EXCEEDED:13}}}}}}}}}}})})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){var r,o,i;n(34);o=[n(0)],void 0===(i="function"==typeof(r=function(e){"use strict";return(e.roots.info||(e.roots.info=new e.Root)).addJSON({im:{nested:{floo:{nested:{protobuf:{nested:{Info:{fields:{sdk_vsn:{type:"string",id:1},network:{type:"Network",id:2},content:{type:"string",id:3}},nested:{Network:{values:{WIRE:0,WIFI:1,NET_2G:2,NET_3G:3,NET_4G:4,NET_5G:5,UNKNOWN:6}}}}}}}}}}})})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){var r,o,i;n(34);o=[n(0)],void 0===(i="function"==typeof(r=function(e){"use strict";return(e.roots.conversation||(e.roots.conversation=new e.Root)).addJSON({im:{nested:{floo:{nested:{protobuf:{nested:{Conversation:{fields:{type:{type:"Type",id:1},operation:{type:"ConversationOperation",id:2}},nested:{Type:{values:{UNKNOWN:0,OPER:1}}}},ConversationOperation:{fields:{type:{type:"OpType",id:1},xid:{type:"XID",id:2}},nested:{OpType:{values:{UNKNOWN:0,DELETE:1,DELETE_EVERYWHERE:2}}}},XID:{fields:{uid:{type:"uint64",id:1},deviceSN:{type:"uint32",id:2}}}}}}}}}})})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){var r,o,i;n(34);o=[n(0)],void 0===(i="function"==typeof(r=function(e){"use strict";return(e.roots.rtcsignal||(e.roots.rtcsignal=new e.Root)).addJSON({im:{nested:{floo:{nested:{protobuf:{nested:{RtcSignal:{fields:{type:{type:"Type",id:1},content:{type:"string",id:2},media_server:{type:"string",id:3}},nested:{Type:{values:{UNKNOWN:0,VIDEO_ROOM:1}}}}}}}}}}})})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){e.exports=n(349)},function(e,t,n){var r=n(9),o=n(10),i=n(61);e.exports=n(11)?Object.defineProperties:function(e,t){o(e);for(var n,s=i(t),a=s.length,c=0;a>c;)r.f(e,n=s[c++],t[n]);return e}},function(e,t,n){var r=n(4).document;e.exports=r&&r.documentElement},function(e,t,n){e.exports=n(74)("native-function-to-string",Function.toString)},function(e,t,n){"use strict";var r=n(60),o=n(49),i=n(63),s={};n(19)(s,n(3)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(s,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(17),o=n(10),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(39)(Function.call,n(64).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){"use strict";if(n(11)){var r=n(48),o=n(4),i=n(8),s=n(5),a=n(158),c=n(243),u=n(39),f=n(76),l=n(49),d=n(19),p=n(75),h=n(30),g=n(12),v=n(159),y=n(73),m=n(59),b=n(24),w=n(102),_=n(17),S=n(20),C=n(100),E=n(60),k=n(150),x=n(51).f,T=n(101),A=n(38),R=n(3),O=n(108),N=n(96),I=n(162),P=n(157),D=n(50),M=n(106),j=n(152),L=n(160),U=n(246),F=n(9),B=n(64),G=F.f,q=B.f,V=o.RangeError,H=o.TypeError,W=o.Uint8Array,J=Array.prototype,z=c.ArrayBuffer,K=c.DataView,Y=O(0),$=O(2),X=O(3),Z=O(4),Q=O(5),ee=O(6),te=N(!0),ne=N(!1),re=P.values,oe=P.keys,ie=P.entries,se=J.lastIndexOf,ae=J.reduce,ce=J.reduceRight,ue=J.join,fe=J.sort,le=J.slice,de=J.toString,pe=J.toLocaleString,he=R("iterator"),ge=R("toStringTag"),ve=A("typed_constructor"),ye=A("def_constructor"),me=a.CONSTR,be=a.TYPED,we=a.VIEW,_e=O(1,(function(e,t){return xe(I(e,e[ye]),t)})),Se=i((function(){return 1===new W(new Uint16Array([1]).buffer)[0]})),Ce=!!W&&!!W.prototype.set&&i((function(){new W(1).set({})})),Ee=function(e,t){var n=h(e);if(n<0||n%t)throw V("Wrong offset!");return n},ke=function(e){if(_(e)&&be in e)return e;throw H(e+" is not a typed array!")},xe=function(e,t){if(!_(e)||!(ve in e))throw H("It is not a typed array constructor!");return new e(t)},Te=function(e,t){return Ae(I(e,e[ye]),t)},Ae=function(e,t){for(var n=0,r=t.length,o=xe(e,r);r>n;)o[n]=t[n++];return o},Re=function(e,t,n){G(e,t,{get:function(){return this._d[n]}})},Oe=function(e){var t,n,r,o,i,s,a=S(e),c=arguments.length,f=c>1?arguments[1]:void 0,l=void 0!==f,d=T(a);if(null!=d&&!C(d)){for(s=d.call(a),r=[],t=0;!(i=s.next()).done;t++)r.push(i.value);a=r}for(l&&c>2&&(f=u(f,arguments[2],2)),t=0,n=g(a.length),o=xe(this,n);n>t;t++)o[t]=l?f(a[t],t):a[t];return o},Ne=function(){for(var e=0,t=arguments.length,n=xe(this,t);t>e;)n[e]=arguments[e++];return n},Ie=!!W&&i((function(){pe.call(new W(1))})),Pe=function(){return pe.apply(Ie?le.call(ke(this)):ke(this),arguments)},De={copyWithin:function(e,t){return U.call(ke(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Z(ke(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return L.apply(ke(this),arguments)},filter:function(e){return Te(this,$(ke(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(ke(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(ke(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Y(ke(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(ke(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(ke(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(ke(this),arguments)},lastIndexOf:function(e){return se.apply(ke(this),arguments)},map:function(e){return _e(ke(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ae.apply(ke(this),arguments)},reduceRight:function(e){return ce.apply(ke(this),arguments)},reverse:function(){for(var e,t=ke(this).length,n=Math.floor(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this},some:function(e){return X(ke(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return fe.call(ke(this),e)},subarray:function(e,t){var n=ke(this),r=n.length,o=y(e,r);return new(I(n,n[ye]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,g((void 0===t?r:y(t,r))-o))}},Me=function(e,t){return Te(this,le.call(ke(this),e,t))},je=function(e){ke(this);var t=Ee(arguments[1],1),n=this.length,r=S(e),o=g(r.length),i=0;if(o+t>n)throw V("Wrong length!");for(;i<o;)this[t+i]=r[i++]},Le={entries:function(){return ie.call(ke(this))},keys:function(){return oe.call(ke(this))},values:function(){return re.call(ke(this))}},Ue=function(e,t){return _(e)&&e[be]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},Fe=function(e,t){return Ue(e,t=m(t,!0))?l(2,e[t]):q(e,t)},Be=function(e,t,n){return!(Ue(e,t=m(t,!0))&&_(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?G(e,t,n):(e[t]=n.value,e)};me||(B.f=Fe,F.f=Be),s(s.S+s.F*!me,"Object",{getOwnPropertyDescriptor:Fe,defineProperty:Be}),i((function(){de.call({})}))&&(de=pe=function(){return ue.call(this)});var Ge=p({},De);p(Ge,Le),d(Ge,he,Le.values),p(Ge,{slice:Me,set:je,constructor:function(){},toString:de,toLocaleString:Pe}),Re(Ge,"buffer","b"),Re(Ge,"byteOffset","o"),Re(Ge,"byteLength","l"),Re(Ge,"length","e"),G(Ge,ge,{get:function(){return this[be]}}),e.exports=function(e,t,n,c){var u=e+((c=!!c)?"Clamped":"")+"Array",l="get"+e,p="set"+e,h=o[u],y=h||{},m=h&&k(h),b=!h||!a.ABV,S={},C=h&&h.prototype,T=function(e,n){G(e,n,{get:function(){return function(e,n){var r=e._d;return r.v[l](n*t+r.o,Se)}(this,n)},set:function(e){return function(e,n,r){var o=e._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[p](n*t+o.o,r,Se)}(this,n,e)},enumerable:!0})};b?(h=n((function(e,n,r,o){f(e,h,u,"_d");var i,s,a,c,l=0,p=0;if(_(n)){if(!(n instanceof z||"ArrayBuffer"==(c=w(n))||"SharedArrayBuffer"==c))return be in n?Ae(h,n):Oe.call(h,n);i=n,p=Ee(r,t);var y=n.byteLength;if(void 0===o){if(y%t)throw V("Wrong length!");if((s=y-p)<0)throw V("Wrong length!")}else if((s=g(o)*t)+p>y)throw V("Wrong length!");a=s/t}else a=v(n),i=new z(s=a*t);for(d(e,"_d",{b:i,o:p,l:s,e:a,v:new K(i)});l<a;)T(e,l++)})),C=h.prototype=E(Ge),d(C,"constructor",h)):i((function(){h(1)}))&&i((function(){new h(-1)}))&&M((function(e){new h,new h(null),new h(1.5),new h(e)}),!0)||(h=n((function(e,n,r,o){var i;return f(e,h,u),_(n)?n instanceof z||"ArrayBuffer"==(i=w(n))||"SharedArrayBuffer"==i?void 0!==o?new y(n,Ee(r,t),o):void 0!==r?new y(n,Ee(r,t)):new y(n):be in n?Ae(h,n):Oe.call(h,n):new y(v(n))})),Y(m!==Function.prototype?x(y).concat(x(m)):x(y),(function(e){e in h||d(h,e,y[e])})),h.prototype=C,r||(C.constructor=h));var A=C[he],R=!!A&&("values"==A.name||null==A.name),O=Le.values;d(h,ve,!0),d(C,be,u),d(C,we,!0),d(C,ye,h),(c?new h(1)[ge]==u:ge in C)||G(C,ge,{get:function(){return u}}),S[u]=h,s(s.G+s.W+s.F*(h!=y),S),s(s.S,u,{BYTES_PER_ELEMENT:t}),s(s.S+s.F*i((function(){y.of.call(h,1)})),u,{from:Oe,of:Ne}),"BYTES_PER_ELEMENT"in C||d(C,"BYTES_PER_ELEMENT",t),s(s.P,u,De),j(u),s(s.P+s.F*Ce,u,{set:je}),s(s.P+s.F*!R,u,Le),r||C.toString==de||(C.toString=de),s(s.P+s.F*i((function(){new h(1).slice()})),u,{slice:Me}),s(s.P+s.F*(i((function(){return[1,2].toLocaleString()!=new h([1,2]).toLocaleString()}))||!i((function(){C.toLocaleString.call([1,2])}))),u,{toLocaleString:Pe}),D[u]=R?A:O,r||R||d(C,he,O)}}else e.exports=function(){}},function(e,t,n){"use strict";var r=n(4),o=n(11),i=n(48),s=n(158),a=n(19),c=n(75),u=n(8),f=n(76),l=n(30),d=n(12),p=n(159),h=n(51).f,g=n(9).f,v=n(160),y=n(63),m=r.ArrayBuffer,b=r.DataView,w=r.Math,_=r.RangeError,S=r.Infinity,C=m,E=w.abs,k=w.pow,x=w.floor,T=w.log,A=w.LN2,R=o?"_b":"buffer",O=o?"_l":"byteLength",N=o?"_o":"byteOffset";function I(e,t,n){var r,o,i,s=new Array(n),a=8*n-t-1,c=(1<<a)-1,u=c>>1,f=23===t?k(2,-24)-k(2,-77):0,l=0,d=e<0||0===e&&1/e<0?1:0;for((e=E(e))!=e||e===S?(o=e!=e?1:0,r=c):(r=x(T(e)/A),e*(i=k(2,-r))<1&&(r--,i*=2),(e+=r+u>=1?f/i:f*k(2,1-u))*i>=2&&(r++,i/=2),r+u>=c?(o=0,r=c):r+u>=1?(o=(e*i-1)*k(2,t),r+=u):(o=e*k(2,u-1)*k(2,t),r=0));t>=8;s[l++]=255&o,o/=256,t-=8);for(r=r<<t|o,a+=t;a>0;s[l++]=255&r,r/=256,a-=8);return s[--l]|=128*d,s}function P(e,t,n){var r,o=8*n-t-1,i=(1<<o)-1,s=i>>1,a=o-7,c=n-1,u=e[c--],f=127&u;for(u>>=7;a>0;f=256*f+e[c],c--,a-=8);for(r=f&(1<<-a)-1,f>>=-a,a+=t;a>0;r=256*r+e[c],c--,a-=8);if(0===f)f=1-s;else{if(f===i)return r?NaN:u?-S:S;r+=k(2,t),f-=s}return(u?-1:1)*r*k(2,f-t)}function D(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function M(e){return[255&e]}function j(e){return[255&e,e>>8&255]}function L(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function U(e){return I(e,52,8)}function F(e){return I(e,23,4)}function B(e,t,n){g(e.prototype,t,{get:function(){return this[n]}})}function G(e,t,n,r){var o=p(+n);if(o+t>e[O])throw _("Wrong index!");var i=e[R]._b,s=o+e[N],a=i.slice(s,s+t);return r?a:a.reverse()}function q(e,t,n,r,o,i){var s=p(+n);if(s+t>e[O])throw _("Wrong index!");for(var a=e[R]._b,c=s+e[N],u=r(+o),f=0;f<t;f++)a[c+f]=u[i?f:t-f-1]}if(s.ABV){if(!u((function(){m(1)}))||!u((function(){new m(-1)}))||u((function(){return new m,new m(1.5),new m(NaN),"ArrayBuffer"!=m.name}))){for(var V,H=(m=function(e){return f(this,m),new C(p(e))}).prototype=C.prototype,W=h(C),J=0;W.length>J;)(V=W[J++])in m||a(m,V,C[V]);i||(H.constructor=m)}var z=new b(new m(2)),K=b.prototype.setInt8;z.setInt8(0,2147483648),z.setInt8(1,2147483649),!z.getInt8(0)&&z.getInt8(1)||c(b.prototype,{setInt8:function(e,t){K.call(this,e,t<<24>>24)},setUint8:function(e,t){K.call(this,e,t<<24>>24)}},!0)}else m=function(e){f(this,m,"ArrayBuffer");var t=p(e);this._b=v.call(new Array(t),0),this[O]=t},b=function(e,t,n){f(this,b,"DataView"),f(e,m,"DataView");var r=e[O],o=l(t);if(o<0||o>r)throw _("Wrong offset!");if(o+(n=void 0===n?r-o:d(n))>r)throw _("Wrong length!");this[R]=e,this[N]=o,this[O]=n},o&&(B(m,"byteLength","_l"),B(b,"buffer","_b"),B(b,"byteLength","_l"),B(b,"byteOffset","_o")),c(b.prototype,{getInt8:function(e){return G(this,1,e)[0]<<24>>24},getUint8:function(e){return G(this,1,e)[0]},getInt16:function(e){var t=G(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=G(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return D(G(this,4,e,arguments[1]))},getUint32:function(e){return D(G(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return P(G(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return P(G(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){q(this,1,e,M,t)},setUint8:function(e,t){q(this,1,e,M,t)},setInt16:function(e,t){q(this,2,e,j,t,arguments[2])},setUint16:function(e,t){q(this,2,e,j,t,arguments[2])},setInt32:function(e,t){q(this,4,e,L,t,arguments[2])},setUint32:function(e,t){q(this,4,e,L,t,arguments[2])},setFloat32:function(e,t){q(this,4,e,F,t,arguments[2])},setFloat64:function(e,t){q(this,8,e,U,t,arguments[2])}});y(m,"ArrayBuffer"),y(b,"DataView"),a(b.prototype,s.VIEW,!0),t.ArrayBuffer=m,t.DataView=b},function(e,t,n){var r=n(245);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(17),o=n(161),i=n(3)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(20),o=n(73),i=n(12);e.exports=[].copyWithin||function(e,t){var n=r(this),s=i(n.length),a=o(e,s),c=o(t,s),u=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===u?s:o(u,s))-c,s-a),l=1;for(c<a&&a<c+f&&(l=-1,c+=f-1,a+=f-1);f-- >0;)c in n?n[a]=n[c]:delete n[a],a+=l,c+=l;return n}},function(e,t,n){var r=n(163),o=n(79)("socket.io-client:url");e.exports=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host);"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(o("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),o("parse %s",e),n=r(e));n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443"));n.path=n.path||"/";var i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port,n.href=n.protocol+"://"+i+(t&&t.port===n.port?"":":"+n.port),n}},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var u=r.log||t.log||console.log.bind(console);u.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=o,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(109),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){(function(r){function o(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(250)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=o,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"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+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.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.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(o())}).call(this,n(80))},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var u=r.log||t.log||console.log.bind(console);u.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=o,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(109),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){var r=n(164),o=n(165),i=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);t.deconstructPacket=function(e){var t=[],n=e.data,i=e;return i.data=function e(t,n){if(!t)return t;if(o(t)){var i={_placeholder:!0,num:n.length};return n.push(t),i}if(r(t)){for(var s=new Array(t.length),a=0;a<t.length;a++)s[a]=e(t[a],n);return s}if("object"==typeof t&&!(t instanceof Date)){s={};for(var c in t)s[c]=e(t[c],n);return s}return t}(n,t),i.attachments=t.length,{packet:i,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(r(t))for(var o=0;o<t.length;o++)t[o]=e(t[o],n);else if("object"==typeof t)for(var i in t)t[i]=e(t[i],n);return t}(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,i=e;!function e(c,u,f){if(!c)return c;if(s&&c instanceof Blob||a&&c instanceof File){n++;var l=new FileReader;l.onload=function(){f?f[u]=this.result:i=this.result,--n||t(i)},l.readAsArrayBuffer(c)}else if(r(c))for(var d=0;d<c.length;d++)e(c[d],d,c);else if("object"==typeof c&&!o(c))for(var p in c)e(c[p],p,c)}(i),n||t(i)}},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),s=r[0],a=r[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),f=0,l=a>0?s-4:s;for(n=0;n<l;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],c[f++]=t>>16&255,c[f++]=t>>8&255,c[f++]=255&t;2===a&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,c[f++]=255&t);1===a&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(f(e,s,s+16383>a?a:s+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)r[a]=s[a],o[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function f(e,t,n){for(var o,i,s=[],a=t;a<n;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,c=(1<<a)-1,u=c>>1,f=-7,l=n?o-1:0,d=n?-1:1,p=e[t+l];for(l+=d,i=p&(1<<-f)-1,p>>=-f,f+=a;f>0;i=256*i+e[t+l],l+=d,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=r;f>0;s=256*s+e[t+l],l+=d,f-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=u}return(p?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var s,a,c,u=8*i-o-1,f=(1<<u)-1,l=f>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+l>=1?d/c:d*Math.pow(2,1-l))*c>=2&&(s++,c/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*c-1)*Math.pow(2,o),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&a,p+=h,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;e[n+p]=255&s,p+=h,s/=256,u-=8);e[n+p-h]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=n(256),e.exports.parser=n(53)},function(e,t,n){var r=n(167),o=n(52),i=n(83)("engine.io-client:socket"),s=n(171),a=n(53),c=n(163),u=n(81);function f(e,t){if(!(this instanceof f))return new f(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=c(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=c(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=u.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=!1!==t.withCredentials,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||void 0,this.key=t.key||void 0,this.passphrase=t.passphrase||void 0,this.cert=t.cert||void 0,this.ca=t.ca||void 0,this.ciphers=t.ciphers||void 0,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=f,f.priorWebsocketSuccess=!1,o(f.prototype),f.protocol=a.protocol,f.Socket=f,f.Transport=n(115),f.transports=n(167),f.parser=n(53),f.prototype.createTransport=function(e){i('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=a.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new r[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},f.prototype.open=function(){var e;if(this.rememberUpgrade&&f.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},f.prototype.setTransport=function(e){i("setting transport %s",e.name);var t=this;this.transport&&(i("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},f.prototype.probe=function(e){i('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,r=this;function o(){if(r.onlyBinaryUpgrades){var o=!this.supportsBinary&&r.transport.supportsBinary;n=n||o}n||(i('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(o){if(!n)if("pong"===o.type&&"probe"===o.data){if(i('probe transport "%s" pong',e),r.upgrading=!0,r.emit("upgrading",t),!t)return;f.priorWebsocketSuccess="websocket"===t.name,i('pausing current transport "%s"',r.transport.name),r.transport.pause((function(){n||"closed"!==r.readyState&&(i("changing transport and sending upgrade packet"),d(),r.setTransport(t),t.send([{type:"upgrade"}]),r.emit("upgrade",t),t=null,r.upgrading=!1,r.flush())}))}else{i('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,r.emit("upgradeError",s)}})))}function s(){n||(n=!0,d(),t.close(),t=null)}function a(n){var o=new Error("probe error: "+n);o.transport=t.name,s(),i('probe transport "%s" failed because of error: %s',e,n),r.emit("upgradeError",o)}function c(){a("transport closed")}function u(){a("socket closed")}function l(e){t&&e.name!==t.name&&(i('"%s" works - aborting "%s"',e.name,t.name),s())}function d(){t.removeListener("open",o),t.removeListener("error",a),t.removeListener("close",c),r.removeListener("close",u),r.removeListener("upgrading",l)}f.priorWebsocketSuccess=!1,t.once("open",o),t.once("error",a),t.once("close",c),this.once("close",u),this.once("upgrading",l),t.open()},f.prototype.onOpen=function(){if(i("socket open"),this.readyState="open",f.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},f.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(i('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else i('packet received with socket readyState "%s"',this.readyState)},f.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},f.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout((function(){"closed"!==t.readyState&&t.onClose("ping timeout")}),e||t.pingInterval+t.pingTimeout)},f.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout((function(){i("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)}),e.pingInterval)},f.prototype.ping=function(){var e=this;this.sendPacket("ping",(function(){e.emit("ping")}))},f.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},f.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(i("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},f.prototype.write=f.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},f.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:e,data:t,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},f.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?r():t()})):this.upgrading?r():t()}function t(){e.onClose("forced close"),i("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function r(){e.once("upgrade",n),e.once("upgradeError",n)}return this},f.prototype.onError=function(e){i("socket error %j",e),f.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},f.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){i('socket close with reason: "%s"',e);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0}},f.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;n<r;n++)~s(this.transports,e[n])&&t.push(e[n]);return t}},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){var r=n(113),o=n(168),i=n(52),s=n(82),a=n(83)("engine.io-client:polling-xhr"),c=n(114);function u(){}function f(e){if(o.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,"undefined"!=typeof location){var t="https:"===location.protocol,n=location.port;n||(n=t?443:80),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}}function l(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(e.exports=f,e.exports.Request=l,s(f,o),f.prototype.supportsBinary=!0,f.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new l(e)},f.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),o=this;r.on("success",t),r.on("error",(function(e){o.onError("xhr post error",e)})),this.sendXhr=r},f.prototype.doPoll=function(){a("xhr poll");var e=this.request(),t=this;e.on("data",(function(e){t.onData(e)})),e.on("error",(function(e){t.onError("xhr poll error",e)})),this.pollXhr=e},i(l.prototype),l.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new r(e),n=this;try{a("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var o in t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(o)&&t.setRequestHeader(o,this.extraHeaders[o])}catch(e){}if("POST"===this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=this.withCredentials),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){n.onLoad()},t.onerror=function(){n.onError(t.responseText)}):t.onreadystatechange=function(){if(2===t.readyState)try{var e=t.getResponseHeader("Content-Type");(n.supportsBinary&&"application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e)&&(t.responseType="arraybuffer")}catch(e){}4===t.readyState&&(200===t.status||1223===t.status?n.onLoad():setTimeout((function(){n.onError("number"==typeof t.status?t.status:0)}),0))},a("xhr data %s",this.data),t.send(this.data)}catch(e){return void setTimeout((function(){n.onError(e)}),0)}"undefined"!=typeof document&&(this.index=l.requestsCount++,l.requests[this.index]=this)},l.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},l.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},l.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},l.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=u:this.xhr.onreadystatechange=u,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete l.requests[this.index],this.xhr=null}},l.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e=("application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},l.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},l.prototype.abort=function(){this.cleanup()},l.requestsCount=0,l.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",d);else if("function"==typeof addEventListener){addEventListener("onpagehide"in c?"pagehide":"unload",d,!1)}function d(){for(var e in l.requests)l.requests.hasOwnProperty(e)&&l.requests[e].abort()}},function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var r in e)n.call(e,r)&&t.push(r);return t}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(t<0&&(t+=r),n<0&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(e),i=new Uint8Array(n-t),s=t,a=0;s<n;s++,a++)i[a]=o[s];return i.buffer}},function(e,t){function n(){}e.exports=function(e,t,r){var o=!1;return r=r||n,i.count=e,0===e?t():i;function i(e,n){if(i.count<=0)throw new Error("after called too many times");--i.count,e?(o=!0,t(e),t=r):0!==i.count||o||t(null,n)}}},function(e,t){var n,r,o,i=String.fromCharCode;function s(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function a(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function c(e,t){return i(e>>t&63|128)}function u(e,t){if(0==(4294967168&e))return i(e);var n="";return 0==(4294965248&e)?n=i(e>>6&31|192):0==(4294901760&e)?(a(e,t)||(e=65533),n=i(e>>12&15|224),n+=c(e,6)):0==(4292870144&e)&&(n=i(e>>18&7|240),n+=c(e,12),n+=c(e,6)),n+=i(63&e|128)}function f(){if(o>=r)throw Error("Invalid byte index");var e=255&n[o];if(o++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(e){var t,i;if(o>r)throw Error("Invalid byte index");if(o==r)return!1;if(t=255&n[o],o++,0==(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|f())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|f()<<6|f())>=2048)return a(i,e)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|f()<<12|f()<<6|f())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,r=s(e),o=r.length,i=-1,a="";++i<o;)a+=u(r[i],n);return a},decode:function(e,t){var a=!1!==(t=t||{}).strict;n=s(e),r=n.length,o=0;for(var c,u=[];!1!==(c=l(a));)u.push(c);return function(e){for(var t,n=e.length,r=-1,o="";++r<n;)(t=e[r])>65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(u)}}},function(e,t){!function(e){"use strict";t.encode=function(t){var n,r=new Uint8Array(t),o=r.length,i="";for(n=0;n<o;n+=3)i+=e[r[n]>>2],i+=e[(3&r[n])<<4|r[n+1]>>4],i+=e[(15&r[n+1])<<2|r[n+2]>>6],i+=e[63&r[n+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},t.decode=function(t){var n,r,o,i,s,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var f=new ArrayBuffer(a),l=new Uint8Array(f);for(n=0;n<c;n+=4)r=e.indexOf(t[n]),o=e.indexOf(t[n+1]),i=e.indexOf(t[n+2]),s=e.indexOf(t[n+3]),l[u++]=r<<2|o>>4,l[u++]=(15&o)<<4|i>>2,l[u++]=(3&i)<<6|63&s;return f}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(e,t){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),o=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),i=n&&n.prototype.append&&n.prototype.getBlob;function s(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function a(e,t){t=t||{};var r=new n;return s(e).forEach((function(e){r.append(e)})),t.type?r.getBlob(t.type):r.getBlob()}function c(e,t){return new Blob(s(e),t||{})}"undefined"!=typeof Blob&&(a.prototype=Blob.prototype,c.prototype=Blob.prototype),e.exports=r?o?Blob:c:i?a:void 0},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,o=+new Date,i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;c++;var o=t.formatters[r];if("function"==typeof o){var i=s[c];n=o.call(e,i),s.splice(c,1),c--}return n})),t.formatArgs.call(e,s);var u=r.log||t.log||console.log.bind(console);u.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=o,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var i=t.instances[n];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(109),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t,n){var r=n(168),o=n(82),i=n(114);e.exports=f;var s,a=/\n/g,c=/\\n/g;function u(){}function f(e){r.call(this,e),this.query=this.query||{},s||(s=i.___eio=i.___eio||[]),this.index=s.length;var t=this;s.push((function(e){t.onData(e)})),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",(function(){t.script&&(t.script.onerror=u)}),!1)}o(f,r),f.prototype.supportsBinary=!1,f.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},f.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)},f.prototype.doWrite=function(e,t){var n=this;if(!this.form){var r,o=document.createElement("form"),i=document.createElement("textarea"),s=this.iframeId="eio_iframe_"+this.index;o.className="socketio",o.style.position="absolute",o.style.top="-1000px",o.style.left="-1000px",o.target=s,o.method="POST",o.setAttribute("accept-charset","utf-8"),i.name="d",o.appendChild(i),document.body.appendChild(o),this.form=o,this.area=i}function u(){f(),t()}function f(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(e)}catch(e){(r=document.createElement("iframe")).name=n.iframeId,r.src="javascript:0"}r.id=n.iframeId,n.form.appendChild(r),n.iframe=r}this.form.action=this.uri(),f(),e=e.replace(c,"\\\n"),this.area.value=e.replace(a,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&u()}:this.iframe.onload=u}},function(e,t,n){(function(t){var r,o,i=n(115),s=n(53),a=n(81),c=n(82),u=n(170),f=n(83)("engine.io-client:websocket");if("undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof self&&(r=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{o=n(269)}catch(e){}var l=r||o;function d(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=r&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(l=o),i.call(this,e)}e.exports=d,c(d,i),d.prototype.name="websocket",d.prototype.supportsBinary=!0,d.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={};this.isReactNative||(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new l(e,t):new l(e):new l(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},d.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},d.prototype.write=function(e){var n=this;this.writable=!1;for(var r=e.length,o=0,i=r;o<i;o++)!function(e){s.encodePacket(e,n.supportsBinary,(function(o){if(!n.usingBrowserWebSocket){var i={};if(e.options&&(i.compress=e.options.compress),n.perMessageDeflate)("string"==typeof o?t.byteLength(o):o.length)<n.perMessageDeflate.threshold&&(i.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(o):n.ws.send(o,i)}catch(e){f("websocket closed before onclose event")}--r||a()}))}(e[o]);function a(){n.emit("flush"),setTimeout((function(){n.writable=!0,n.emit("drain")}),0)}},d.prototype.onClose=function(){i.prototype.onClose.call(this)},d.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},d.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=u()),this.supportsBinary||(e.b64=1),(e=a.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},d.prototype.check=function(){return!(!l||"__initialize"in l&&this.name===d.prototype.name)}}).call(this,n(111).Buffer)},function(e,t){},function(e,t){e.exports=function(e,t){for(var n=[],r=(t=t||0)||0;r<e.length;r++)n[r-t]=e[r];return n}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},function(e,t,n){"use strict";var r=n(119);n(5)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){var r=n(5),o=n(47),i=n(8);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],s={};s[e]=t(n),r(r.S+r.F*i((function(){n(1)})),"Object",s)}},function(e,t,n){"use strict";var r=n(13),o=n(178),i=n(275),s=n(185);var a=function e(t){var n=new i(t),a=o(i.prototype.request,n);return r.extend(a,i.prototype,n),r.extend(a,n),a.create=function(n){return e(s(t,n))},a}(n(121));a.Axios=i,a.Cancel=n(86),a.CancelToken=n(288),a.isCancel=n(184),a.VERSION=n(186).version,a.all=function(e){return Promise.all(e)},a.spread=n(289),a.isAxiosError=n(290),e.exports=a,e.exports.default=a},function(e,t,n){"use strict";var r=n(13),o=n(179),i=n(276),s=n(277),a=n(185),c=n(287),u=c.validators;function f(e){this.defaults=e,this.interceptors={request:new i,response:new i}}f.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var i,f=[];if(this.interceptors.response.forEach((function(e){f.push(e.fulfilled,e.rejected)})),!o){var l=[s,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(f),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var d=t;r.length;){var p=r.shift(),h=r.shift();try{d=p(d)}catch(e){h(e);break}}try{i=s(d)}catch(e){return Promise.reject(e)}for(;f.length;)i=i.then(f.shift(),f.shift());return i},f.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){f.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}})),e.exports=f},function(e,t,n){"use strict";var r=n(13);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,n){"use strict";var r=n(13),o=n(278),i=n(184),s=n(121),a=n(86);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(13),o=n(121);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},function(e,t,n){"use strict";var r=n(13);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(183);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(13);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(283),o=n(284);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(13),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},function(e,t,n){"use strict";var r=n(13);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(186).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],s=t[i];if(s){var a=e[i],c=void 0===a||s(a,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},function(e,t,n){"use strict";var r=n(86);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";var r=n(13);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},function(e,t,n){n(11)&&"g"!=/./g.flags&&n(9).f(RegExp.prototype,"flags",{configurable:!0,get:n(120)})},function(e,t,n){"use strict";var r=n(5),o=n(293),i=n(295),s=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*s,"String",{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){var r=n(12),o=n(294),i=n(29);e.exports=function(e,t,n,s){var a=String(i(e)),c=a.length,u=void 0===n?" ":String(n),f=r(t);if(f<=c||""==u)return a;var l=f-c,d=o.call(u,Math.ceil(l/u.length));return d.length>l&&(d=d.slice(0,l)),s?d+a:a+d}},function(e,t,n){"use strict";var r=n(30),o=n(29);e.exports=function(e){var t=String(o(this)),n="",i=r(e);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t,n){var r=n(4).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){n(297),n(195),n(306),n(307),e.exports=n(18).Symbol},function(e,t,n){"use strict";var r=n(14),o=n(42),i=n(31),s=n(32),a=n(188),c=n(298).KEY,u=n(87),f=n(125),l=n(90),d=n(89),p=n(15),h=n(126),g=n(127),v=n(299),y=n(191),m=n(33),b=n(44),w=n(135),_=n(56),S=n(124),C=n(66),E=n(192),k=n(304),x=n(305),T=n(190),A=n(26),R=n(128),O=x.f,N=A.f,I=k.f,P=r.Symbol,D=r.JSON,M=D&&D.stringify,j=p("_hidden"),L=p("toPrimitive"),U={}.propertyIsEnumerable,F=f("symbol-registry"),B=f("symbols"),G=f("op-symbols"),q=Object.prototype,V="function"==typeof P&&!!T.f,H=r.QObject,W=!H||!H.prototype||!H.prototype.findChild,J=i&&u((function(){return 7!=E(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=O(q,t);r&&delete q[t],N(e,t,n),r&&e!==q&&N(q,t,r)}:N,z=function(e){var t=B[e]=E(P.prototype);return t._k=e,t},K=V&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},Y=function(e,t,n){return e===q&&Y(G,t,n),m(e),t=S(t,!0),m(n),o(B,t)?(n.enumerable?(o(e,j)&&e[j][t]&&(e[j][t]=!1),n=E(n,{enumerable:C(0,!1)})):(o(e,j)||N(e,j,C(1,{})),e[j][t]=!0),J(e,t,n)):N(e,t,n)},$=function(e,t){m(e);for(var n,r=v(t=_(t)),o=0,i=r.length;i>o;)Y(e,n=r[o++],t[n]);return e},X=function(e){var t=U.call(this,e=S(e,!0));return!(this===q&&o(B,e)&&!o(G,e))&&(!(t||!o(this,e)||!o(B,e)||o(this,j)&&this[j][e])||t)},Z=function(e,t){if(e=_(e),t=S(t,!0),e!==q||!o(B,t)||o(G,t)){var n=O(e,t);return!n||!o(B,t)||o(e,j)&&e[j][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=I(_(e)),r=[],i=0;n.length>i;)o(B,t=n[i++])||t==j||t==c||r.push(t);return r},ee=function(e){for(var t,n=e===q,r=I(n?G:_(e)),i=[],s=0;r.length>s;)!o(B,t=r[s++])||n&&!o(q,t)||i.push(B[t]);return i};V||(a((P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===q&&t.call(G,n),o(this,j)&&o(this[j],e)&&(this[j][e]=!1),J(this,e,C(1,n))};return i&&W&&J(q,e,{configurable:!0,set:t}),z(e)}).prototype,"toString",(function(){return this._k})),x.f=Z,A.f=Y,n(194).f=k.f=Q,n(134).f=X,T.f=ee,i&&!n(67)&&a(q,"propertyIsEnumerable",X,!0),h.f=function(e){return z(p(e))}),s(s.G+s.W+s.F*!V,{Symbol:P});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)p(te[ne++]);for(var re=R(p.store),oe=0;re.length>oe;)g(re[oe++]);s(s.S+s.F*!V,"Symbol",{for:function(e){return o(F,e+="")?F[e]:F[e]=P(e)},keyFor:function(e){if(!K(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),s(s.S+s.F*!V,"Object",{create:function(e,t){return void 0===t?E(e):$(E(e),t)},defineProperty:Y,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var ie=u((function(){T.f(1)}));s(s.S+s.F*ie,"Object",{getOwnPropertySymbols:function(e){return T.f(w(e))}}),D&&s(s.S+s.F*(!V||u((function(){var e=P();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(b(t)||void 0!==e)&&!K(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!K(t))return t}),r[1]=t,M.apply(D,r)}}),P.prototype[L]||n(43)(P.prototype,L,P.prototype.valueOf),l(P,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){var r=n(89)("meta"),o=n(44),i=n(42),s=n(26).f,a=0,c=Object.isExtensible||function(){return!0},u=!n(87)((function(){return c(Object.preventExtensions({}))})),f=function(e){s(e,r,{value:{i:"O"+ ++a,w:{}}})},l=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!c(e))return"F";if(!t)return"E";f(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!c(e))return!0;if(!t)return!1;f(e)}return e[r].w},onFreeze:function(e){return u&&l.NEED&&c(e)&&!i(e,r)&&f(e),e}}},function(e,t,n){var r=n(128),o=n(190),i=n(134);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var s,a=n(e),c=i.f,u=0;a.length>u;)c.call(e,s=a[u++])&&t.push(s);return t}},function(e,t,n){var r=n(68);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(56),o=n(130),i=n(302);e.exports=function(e){return function(t,n,s){var a,c=r(t),u=o(c.length),f=i(s,u);if(e&&n!=n){for(;u>f;)if((a=c[f++])!=a)return!0}else for(;u>f;f++)if((e||f in c)&&c[f]===n)return e||f||0;return!e&&-1}}},function(e,t,n){var r=n(131),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(26),o=n(33),i=n(128);e.exports=n(31)?Object.defineProperties:function(e,t){o(e);for(var n,s=i(t),a=s.length,c=0;a>c;)r.f(e,n=s[c++],t[n]);return e}},function(e,t,n){var r=n(56),o=n(194).f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return s.slice()}}(e):o(r(e))}},function(e,t,n){var r=n(134),o=n(66),i=n(56),s=n(124),a=n(42),c=n(187),u=Object.getOwnPropertyDescriptor;t.f=n(31)?u:function(e,t){if(e=i(e),t=s(t,!0),c)try{return u(e,t)}catch(e){}if(a(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){n(127)("asyncIterator")},function(e,t,n){n(127)("observable")},function(e,t,n){n(136),n(197),e.exports=n(126).f("iterator")},function(e,t,n){var r=n(131),o=n(129);e.exports=function(e){return function(t,n){var i,s,a=String(o(t)),c=r(n),u=a.length;return c<0||c>=u?e?"":void 0:(i=a.charCodeAt(c))<55296||i>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?e?a.charAt(c):i:e?a.slice(c,c+2):s-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(192),o=n(66),i=n(90),s={};n(43)(s,n(15)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(s,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(42),o=n(135),i=n(132)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){"use strict";var r=n(313),o=n(314),i=n(69),s=n(56);e.exports=n(196)(Array,"Array",(function(e,t){this._t=s(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(198),o=e.exports;!function(){"use strict";var e,t,n,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}"function"!=typeof o.stringify&&(o.stringify=function(o,i,s){var c;if(e="",t="","number"==typeof s)for(c=0;c<s;c+=1)t+=" ";else"string"==typeof s&&(t=s);if(n=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return function o(i,s){var c,u,f,l,d,p=e,h=s[i],g=null!=h&&(h instanceof r||r.isBigNumber(h));switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(i)),"function"==typeof n&&(h=n.call(s,i,h)),typeof h){case"string":return g?h:a(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":case"bigint":return String(h);case"object":if(!h)return"null";if(e+=t,d=[],"[object Array]"===Object.prototype.toString.apply(h)){for(l=h.length,c=0;c<l;c+=1)d[c]=o(c,h)||"null";return f=0===d.length?"[]":e?"[\n"+e+d.join(",\n"+e)+"\n"+p+"]":"["+d.join(",")+"]",e=p,f}if(n&&"object"==typeof n)for(l=n.length,c=0;c<l;c+=1)"string"==typeof n[c]&&(f=o(u=n[c],h))&&d.push(a(u)+(e?": ":":")+f);else Object.keys(h).forEach((function(t){var n=o(t,h);n&&d.push(a(t)+(e?": ":":")+n)}));return f=0===d.length?"{}":e?"{\n"+e+d.join(",\n"+e)+"\n"+p+"}":"{"+d.join(",")+"}",e=p,f}}("",{"":o})})}()},function(e,t,n){var r=null;const o=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,i=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error('Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed '+e.constructorAction);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error('Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed '+e.protoAction);t.protoAction=e.protoAction}}var s,a,c,u,f={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},l=function(e){throw{name:"SyntaxError",message:e,at:s,text:c}},d=function(e){return e&&e!==a&&l("Expected '"+e+"' instead of '"+a+"'"),a=c.charAt(s),s+=1,a},p=function(){var e,o="";for("-"===a&&(o="-",d("-"));a>="0"&&a<="9";)o+=a,d();if("."===a)for(o+=".";d()&&a>="0"&&a<="9";)o+=a;if("e"===a||"E"===a)for(o+=a,d(),"-"!==a&&"+"!==a||(o+=a,d());a>="0"&&a<="9";)o+=a,d();if(e=+o,isFinite(e))return null==r&&(r=n(198)),o.length>15?t.storeAsString?o:t.useNativeBigInt?BigInt(o):new r(o):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;l("Bad number")},h=function(){var e,t,n,r="";if('"'===a)for(var o=s;d();){if('"'===a)return s-1>o&&(r+=c.substring(o,s-1)),d(),r;if("\\"===a){if(s-1>o&&(r+=c.substring(o,s-1)),d(),"u"===a){for(n=0,t=0;t<4&&(e=parseInt(d(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof f[a])break;r+=f[a]}o=s}}l("Bad string")},g=function(){for(;a&&a<=" ";)d()};return u=function(){switch(g(),a){case"{":return function(){var e,n=Object.create(null);if("{"===a){if(d("{"),g(),"}"===a)return d("}"),n;for(;a;){if(e=h(),g(),d(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&l('Duplicate key "'+e+'"'),!0===o.test(e)?"error"===t.protoAction?l("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===i.test(e)?"error"===t.constructorAction?l("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),g(),"}"===a)return d("}"),n;d(","),g()}}l("Bad object")}();case"[":return function(){var e=[];if("["===a){if(d("["),g(),"]"===a)return d("]"),e;for(;a;){if(e.push(u()),g(),"]"===a)return d("]"),e;d(","),g()}}l("Bad array")}();case'"':return h();case"-":return p();default:return a>="0"&&a<="9"?p():function(){switch(a){case"t":return d("t"),d("r"),d("u"),d("e"),!0;case"f":return d("f"),d("a"),d("l"),d("s"),d("e"),!1;case"n":return d("n"),d("u"),d("l"),d("l"),null}l("Unexpected '"+a+"'")}()}},function(e,t){var n;return c=e+"",s=0,a=" ",n=u(),g(),a&&l("Syntax error"),"function"==typeof t?function e(n,r){var o,i=n[r];return i&&"object"==typeof i&&Object.keys(i).forEach((function(t){void 0!==(o=e(i,t))?i[t]=o:delete i[t]})),t.call(n,r,i)}({"":n},""):n}}},function(e,t,n){var r=n(61),o=n(137),i=n(107);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var s,a=n(e),c=i.f,u=0;a.length>u;)c.call(e,s=a[u++])&&t.push(s);return t}},function(e,t,n){var r=n(37),o=n(51).f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return s.slice()}}(e):o(r(e))}},function(e,t,n){"use strict";var r=n(4),o=n(24),i=n(62),s=n(154),a=n(59),c=n(8),u=n(51).f,f=n(64).f,l=n(9).f,d=n(320).trim,p=r.Number,h=p,g=p.prototype,v="Number"==i(n(60)(g)),y="trim"in String.prototype,m=function(e){var t=a(e,!1);if("string"==typeof t&&t.length>2){var n,r,o,i=(t=y?t.trim():d(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+t}for(var s,c=t.slice(2),u=0,f=c.length;u<f;u++)if((s=c.charCodeAt(u))<48||s>o)return NaN;return parseInt(c,r)}}return+t};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof p&&(v?c((function(){g.valueOf.call(n)})):"Number"!=i(n))?s(new h(m(t)),n,p):m(t)};for(var b,w=n(11)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;w.length>_;_++)o(h,b=w[_])&&!o(p,b)&&l(p,b,f(h,b));p.prototype=g,g.constructor=p,n(25)(r,"Number",p)}},function(e,t,n){var r=n(5),o=n(29),i=n(8),s=n(321),a="["+s+"]",c=RegExp("^"+a+a+"*"),u=RegExp(a+a+"*$"),f=function(e,t,n){var o={},a=i((function(){return!!s[e]()||"​…"!="​…"[e]()})),c=o[e]=a?t(l):s[e];n&&(o[n]=c),r(r.P+r.F*a,"String",o)},l=f.trim=function(e,t){return e=String(o(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(u,"")),e};e.exports=f},function(e,t){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){n(323),e.exports=n(18).Array.isArray},function(e,t,n){var r=n(32);r(r.S,"Array",{isArray:n(191)})},function(e,t,n){n(136),n(325),e.exports=n(18).Array.from},function(e,t,n){"use strict";var r=n(65),o=n(32),i=n(135),s=n(203),a=n(204),c=n(130),u=n(326),f=n(205);o(o.S+o.F*!n(207)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,o,l,d=i(e),p="function"==typeof this?this:Array,h=arguments.length,g=h>1?arguments[1]:void 0,v=void 0!==g,y=0,m=f(d);if(v&&(g=r(g,h>2?arguments[2]:void 0,2)),null==m||p==Array&&a(m))for(n=new p(t=c(d.length));t>y;y++)u(n,y,v?g(d[y],y):d[y]);else for(l=m.call(d),n=new p;!(o=l.next()).done;y++)u(n,y,v?s(l,g,[o.value,y],!0):o.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(26),o=n(66);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){"use strict";var r=n(5),o=n(99),i=n(20),s=n(8),a=[].sort,c=[1,2,3];r(r.P+r.F*(s((function(){c.sort(void 0)}))||!s((function(){c.sort(null)}))||!n(328)(a)),"Array",{sort:function(e){return void 0===e?a.call(i(this)):a.call(i(this),o(e))}})},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function i(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],i(n),i(r))}function s(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=i(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=o.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=s(n[0]);r!==n[0]&&(t[n[0]]=r)}n=o.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),a=0;a<i.length;a++){var c=i[a];e=e.replace(new RegExp(c,"g"),t[c])}return e}(e)}}},function(e,t,n){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},function(e,t,n){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),o=Array.isArray(t),i=0;i<r.length;i++){var s=r[i],a=e[s];(o?-1!==t.indexOf(s):t(s,a,e))&&(n[s]=a)}return n}},function(e,t,n){"use strict";var r=e.exports=n(334);r.build="light",r.load=function(e,t,n){return"function"==typeof t?(n=t,t=new r.Root):t||(t=new r.Root),t.load(e,n)},r.loadSync=function(e,t){return t||(t=new r.Root),t.loadSync(e)},r.encoder=n(214),r.decoder=n(219),r.verifier=n(220),r.converter=n(221),r.ReflectionObject=n(57),r.Namespace=n(70),r.Root=n(223),r.Enum=n(28),r.Type=n(215),r.Field=n(58),r.OneOf=n(92),r.MapField=n(216),r.Service=n(217),r.Method=n(218),r.Message=n(140),r.wrappers=n(222),r.types=n(71),r.util=n(6),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},function(e,t,n){"use strict";var r=t;function o(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(138),r.BufferWriter=n(341),r.Reader=n(139),r.BufferReader=n(342),r.util=n(27),r.rpc=n(212),r.roots=n(213),r.configure=o,o()},function(e,t,n){"use strict";var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var o=new Array(64),i=new Array(123),s=0;s<64;)i[o[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;r.encode=function(e,t,n){for(var r,i=null,s=[],a=0,c=0;t<n;){var u=e[t++];switch(c){case 0:s[a++]=o[u>>2],r=(3&u)<<4,c=1;break;case 1:s[a++]=o[r|u>>4],r=(15&u)<<2,c=2;break;case 2:s[a++]=o[r|u>>6],s[a++]=o[63&u],c=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),a=0)}return c&&(s[a++]=o[r],s[a++]=61,1===c&&(s[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,s.slice(0,a))),i.join("")):String.fromCharCode.apply(String,s.slice(0,a))};r.decode=function(e,t,n){for(var r,o=n,s=0,a=0;a<e.length;){var c=e.charCodeAt(a++);if(61===c&&s>1)break;if(void 0===(c=i[c]))throw Error("invalid encoding");switch(s){case 0:r=c,s=1;break;case 1:t[n++]=r<<2|(48&c)>>4,r=c,s=2;break;case 2:t[n++]=(15&r)<<4|(60&c)>>2,r=c,s=3;break;case 3:t[n++]=(3&r)<<6|c,s=0}}if(1===s)throw Error("invalid encoding");return n-o},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},function(e,t,n){"use strict";function r(){this._listeners={}}e.exports=r,r.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},r.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},r.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}},function(e,t,n){"use strict";function r(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3]}function i(e,r,o){t[0]=e,r[o]=n[3],r[o+1]=n[2],r[o+2]=n[1],r[o+3]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function a(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?o:i,e.writeFloatBE=r?i:o,e.readFloatLE=r?s:a,e.readFloatBE=r?a:s}():function(){function t(e,t,n,r){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,n,r)}}function n(e,t,n){var r=e(t,n),o=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:o*(1/0):0===i?1401298464324817e-60*o*s:o*Math.pow(2,i-150)*(s+8388608)}e.writeFloatLE=t.bind(null,o),e.writeFloatBE=t.bind(null,i),e.readFloatLE=n.bind(null,s),e.readFloatBE=n.bind(null,a)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3],r[o+4]=n[4],r[o+5]=n[5],r[o+6]=n[6],r[o+7]=n[7]}function i(e,r,o){t[0]=e,r[o]=n[7],r[o+1]=n[6],r[o+2]=n[5],r[o+3]=n[4],r[o+4]=n[3],r[o+5]=n[2],r[o+6]=n[1],r[o+7]=n[0]}function s(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function a(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?o:i,e.writeDoubleBE=r?i:o,e.readDoubleLE=r?s:a,e.readDoubleBE=r?a:s}():function(){function t(e,t,n,r,o,i){var s=r<0?1:0;if(s&&(r=-r),0===r)e(0,o,i+t),e(1/r>0?0:2147483648,o,i+n);else if(isNaN(r))e(0,o,i+t),e(2146959360,o,i+n);else if(r>17976931348623157e292)e(0,o,i+t),e((s<<31|2146435072)>>>0,o,i+n);else{var a;if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,o,i+t),e((s<<31|a/4294967296)>>>0,o,i+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(a=r*Math.pow(2,-c))>>>0,o,i+t),e((s<<31|c+1023<<20|1048576*a&1048575)>>>0,o,i+n)}}}function n(e,t,n,r,o){var i=e(r,o+t),s=e(r,o+n),a=2*(s>>31)+1,c=s>>>20&2047,u=4294967296*(1048575&s)+i;return 2047===c?u?NaN:a*(1/0):0===c?5e-324*a*u:a*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,o,0,4),e.writeDoubleBE=t.bind(null,i,4,0),e.readDoubleLE=n.bind(null,s,0,4),e.readDoubleBE=n.bind(null,a,4,0)}(),e}function o(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function i(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function s(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function a(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=r(r)},function(e,t,n){"use strict";var r=t;r.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},r.read=function(e,t,n){if(n-t<1)return"";for(var r,o=null,i=[],s=0;t<n;)(r=e[t++])<128?i[s++]=r:r>191&&r<224?i[s++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[s++]=55296+(r>>10),i[s++]=56320+(1023&r)):i[s++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,i.slice(0,s))),o.join("")):String.fromCharCode.apply(String,i.slice(0,s))},r.write=function(e,t,n){for(var r,o,i=n,s=0;s<e.length;++s)(r=e.charCodeAt(s))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(o=e.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&o),++s,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=n||8192,o=r>>>1,i=null,s=r;return function(n){if(n<1||n>o)return e(n);s+n>r&&(i=e(r),s=0);var a=t.call(i,s,s+=n);return 7&s&&(s=1+(7|s)),a}}},function(e,t,n){"use strict";e.exports=o;var r=n(27);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new o(n,r)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(r.isString(e)){if(!r.Long)return o.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;o.fromHash=function(e){return e===s?i:new o((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},o.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},function(e,t,n){"use strict";e.exports=i;var r=n(138);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(27);function i(){r.call(this)}function s(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},i._configure()},function(e,t,n){"use strict";e.exports=i;var r=n(139);(i.prototype=Object.create(r.prototype)).constructor=i;var o=n(27);function i(e){r.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},function(e,t,n){"use strict";e.exports=o;var r=n(27);function o(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(o.prototype=Object.create(r.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,n,o,i,s){if(!i)throw TypeError("request must be specified");var a=this;if(!s)return r.asPromise(e,a,t,n,o,i);if(a.rpcImpl)try{return a.rpcImpl(t,n[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,n){if(e)return a.emit("error",e,t),s(e);if(null!==n){if(!(n instanceof o))try{n=o[a.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",n,t),s(null,n)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){s(e)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},function(e,t,n){"use strict";function r(e,t){"string"==typeof e&&(t=e,e=void 0);var n=[];function o(e){if("string"!=typeof e){var t=i();if(r.verbose&&console.log("codegen: "+t),t="return "+t,e){for(var s=Object.keys(e),a=new Array(s.length+1),c=new Array(s.length),u=0;u<s.length;)a[u]=s[u],c[u]=e[s[u++]];return a[u]=t,Function.apply(null,a).apply(null,c)}return Function(t)()}for(var f=new Array(arguments.length-1),l=0;l<f.length;)f[l]=arguments[++l];if(l=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var n=f[l++];switch(t){case"d":case"f":return String(Number(n));case"i":return String(Math.floor(n));case"j":return JSON.stringify(n);case"s":return String(n)}return"%"})),l!==f.length)throw Error("parameter count mismatch");return n.push(e),o}function i(r){return"function "+(r||t||"")+"("+(e&&e.join(",")||"")+"){\n "+n.join("\n ")+"\n}"}return o.toString=i,o}e.exports=r,r.verbose=!1},function(e,t,n){"use strict";e.exports=i;var r=n(210),o=n(211)("fs");function i(e,t,n){return"function"==typeof t?(n=t,t={}):t||(t={}),n?!t.xhr&&o&&o.readFile?o.readFile(e,(function(r,o){return r&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,n):r?n(r):n(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,n):r(i,this,e,t)}i.xhr=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState){if(0!==r.status&&200!==r.status)return n(Error("status "+r.status));if(t.binary){var e=r.response;if(!e){e=[];for(var o=0;o<r.responseText.length;++o)e.push(255&r.responseText.charCodeAt(o))}return n(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return n(null,r.responseText)}},t.binary&&("overrideMimeType"in r&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.responseType="arraybuffer"),r.open("GET",e),r.send()}},function(e,t,n){"use strict";var r=t,o=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},i=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=o(e),r="";n&&(r=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):n?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return r+t.join("/")};r.resolve=function(e,t,n){return n||(t=i(t)),o(t)?t:(n||(e=i(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?i(e+"/"+t):t)}},function(e,t,n){var r=n(5),o=n(348),i=n(37),s=n(64),a=n(156);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=i(e),c=s.f,u=o(r),f={},l=0;u.length>l;)void 0!==(n=c(r,t=u[l++]))&&a(f,t,n);return f}})},function(e,t,n){var r=n(51),o=n(137),i=n(10),s=n(4).Reflect;e.exports=s&&s.ownKeys||function(e){var t=r.f(i(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){n(350);var r=n(18).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(32);r(r.S+r.F*!n(31),"Object",{defineProperty:n(26).f})},function(e,t,n){"use strict";var r=n(176),o=n(10),i=n(162),s=n(116),a=n(12),c=n(117),u=n(119),f=n(8),l=Math.min,d=[].push,p="length",h=!f((function(){RegExp(4294967295,"y")}));n(118)("split",2,(function(e,t,n,f){var g;return g="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[p]||2!="ab".split(/(?:ab)*/)[p]||4!=".".split(/(.?)(.?)/)[p]||".".split(/()()/)[p]>1||"".split(/.?/)[p]?function(e,t){var o=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(o,e,t);for(var i,s,a,c=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,h=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,f+"g");(i=u.call(g,o))&&!((s=g.lastIndex)>l&&(c.push(o.slice(l,i.index)),i[p]>1&&i.index<o[p]&&d.apply(c,i.slice(1)),a=i[0][p],l=s,c[p]>=h));)g.lastIndex===i.index&&g.lastIndex++;return l===o[p]?!a&&g.test("")||c.push(""):c.push(o.slice(l)),c[p]>h?c.slice(0,h):c}:"0".split(void 0,0)[p]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var o=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):g.call(String(o),n,r)},function(e,t){var r=f(g,e,this,t,g!==n);if(r.done)return r.value;var u=o(e),d=String(this),p=i(u,RegExp),v=u.unicode,y=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(h?"y":"g"),m=new p(h?u:"^(?:"+u.source+")",y),b=void 0===t?4294967295:t>>>0;if(0===b)return[];if(0===d.length)return null===c(m,d)?[d]:[];for(var w=0,_=0,S=[];_<d.length;){m.lastIndex=h?_:0;var C,E=c(m,h?d:d.slice(_));if(null===E||(C=l(a(m.lastIndex+(h?0:_)),d.length))===w)_=s(d,_,v);else{if(S.push(d.slice(w,_)),S.length===b)return S;for(var k=1;k<=E.length-1;k++)if(S.push(E[k]),S.length===b)return S;_=w=C}}return S.push(d.slice(w)),S}]}))},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function a(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(e){a=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof l?t:l,i=Object.create(o.prototype),s=new C(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===f)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,s),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f={};function l(){}function d(){}function p(){}var h={};a(h,o,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(E([])));v&&v!==t&&n.call(v,o)&&(h=v);var y=p.prototype=l.prototype=Object.create(h);function m(e){["next","throw","return"].forEach((function(t){a(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(o,i){function s(){return new t((function(r,s){!function r(o,i,s,a){var c=u(e[o],e,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,s,a)}),(function(e){r("throw",e,s,a)})):t.resolve(l).then((function(e){f.value=e,s(f)}),(function(e){return r("throw",e,s,a)}))}a(c.arg)}(o,i,r,s)}))}return r=r?r.then(s,s):s()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=p,a(y,"constructor",p),a(p,"constructor",d),d.displayName=a(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,a(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},m(b.prototype),a(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var s=new b(c(t,n,r,o),i);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},m(y),a(y,s,"Generator"),a(y,o,(function(){return this})),a(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return s.type="throw",s.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}(e.exports);try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){n(195),n(136),n(197),n(354),n(362),n(363),e.exports=n(18).Promise},function(e,t,n){"use strict";var r,o,i,s,a=n(67),c=n(14),u=n(65),f=n(206),l=n(32),d=n(44),p=n(88),h=n(355),g=n(356),v=n(224),y=n(225).set,m=n(358)(),b=n(141),w=n(226),_=n(359),S=n(227),C=c.TypeError,E=c.process,k=E&&E.versions,x=k&&k.v8||"",T=c.Promise,A="process"==f(E),R=function(){},O=o=b.f,N=!!function(){try{var e=T.resolve(1),t=(e.constructor={})[n(15)("species")]=function(e){e(R,R)};return(A||"function"==typeof PromiseRejectionEvent)&&e.then(R)instanceof t&&0!==x.indexOf("6.6")&&-1===_.indexOf("Chrome/66")}catch(e){}}(),I=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},P=function(e,t){if(!e._n){e._n=!0;var n=e._c;m((function(){for(var r=e._v,o=1==e._s,i=0,s=function(t){var n,i,s,a=o?t.ok:t.fail,c=t.resolve,u=t.reject,f=t.domain;try{a?(o||(2==e._h&&j(e),e._h=1),!0===a?n=r:(f&&f.enter(),n=a(r),f&&(f.exit(),s=!0)),n===t.promise?u(C("Promise-chain cycle")):(i=I(n))?i.call(n,c,u):c(n)):u(r)}catch(e){f&&!s&&f.exit(),u(e)}};n.length>i;)s(n[i++]);e._c=[],e._n=!1,t&&!e._h&&D(e)}))}},D=function(e){y.call(c,(function(){var t,n,r,o=e._v,i=M(e);if(i&&(t=w((function(){A?E.emit("unhandledRejection",o,e):(n=c.onunhandledrejection)?n({promise:e,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)})),e._h=A||M(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},j=function(e){y.call(c,(function(){var t;A?E.emit("rejectionHandled",e):(t=c.onrejectionhandled)&&t({promise:e,reason:e._v})}))},L=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),P(t,!0))},U=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw C("Promise can't be resolved itself");(t=I(e))?m((function(){var r={_w:n,_d:!1};try{t.call(e,u(U,r,1),u(L,r,1))}catch(e){L.call(r,e)}})):(n._v=e,n._s=1,P(n,!1))}catch(e){L.call({_w:n,_d:!1},e)}}};N||(T=function(e){h(this,T,"Promise","_h"),p(e),r.call(this);try{e(u(U,this,1),u(L,this,1))}catch(e){L.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(360)(T.prototype,{then:function(e,t){var n=O(v(this,T));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=A?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&P(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=u(U,e,1),this.reject=u(L,e,1)},b.f=O=function(e){return e===T||e===s?new i(e):o(e)}),l(l.G+l.W+l.F*!N,{Promise:T}),n(90)(T,"Promise"),n(361)("Promise"),s=n(18).Promise,l(l.S+l.F*!N,"Promise",{reject:function(e){var t=O(this);return(0,t.reject)(e),t.promise}}),l(l.S+l.F*(a||!N),"Promise",{resolve:function(e){return S(a&&this===s?T:this,e)}}),l(l.S+l.F*!(N&&n(207)((function(e){T.all(e).catch(R)}))),"Promise",{all:function(e){var t=this,n=O(t),r=n.resolve,o=n.reject,i=w((function(){var n=[],i=0,s=1;g(e,!1,(function(e){var a=i++,c=!1;n.push(void 0),s++,t.resolve(e).then((function(e){c||(c=!0,n[a]=e,--s||r(n))}),o)})),--s||r(n)}));return i.e&&o(i.v),n.promise},race:function(e){var t=this,n=O(t),r=n.reject,o=w((function(){g(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(65),o=n(203),i=n(204),s=n(33),a=n(130),c=n(205),u={},f={};(t=e.exports=function(e,t,n,l,d){var p,h,g,v,y=d?function(){return e}:c(e),m=r(n,l,t?2:1),b=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(i(y)){for(p=a(e.length);p>b;b++)if((v=t?m(s(h=e[b])[0],h[1]):m(e[b]))===u||v===f)return v}else for(g=y.call(e);!(h=g.next()).done;)if((v=o(g,m,h.value,t))===u||v===f)return v}).BREAK=u,t.RETURN=f},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(14),o=n(225).set,i=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,c="process"==n(68)(s);e.exports=function(){var e,t,n,u=function(){var r,o;for(c&&(r=s.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(c)n=function(){s.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var f=a.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,d=document.createTextNode("");new i(u).observe(d,{characterData:!0}),n=function(){d.data=l=!l}}return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){var r=n(14).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){var r=n(43);e.exports=function(e,t,n){for(var o in t)n&&e[o]?e[o]=t[o]:r(e,o,t[o]);return e}},function(e,t,n){"use strict";var r=n(14),o=n(18),i=n(26),s=n(31),a=n(15)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:r[e];s&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(32),o=n(18),i=n(14),s=n(224),a=n(227);r(r.P+r.R,"Promise",{finally:function(e){var t=s(this,o.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return a(t,e()).then((function(){return n}))}:e,n?function(n){return a(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){"use strict";var r=n(32),o=n(141),i=n(226);r(r.S,"Promise",{try:function(e){var t=o.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){"use strict";var r=n(10),o=n(12),i=n(116),s=n(117);n(118)("match",1,(function(e,t,n,a){return[function(n){var r=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=a(n,e,this);if(t.done)return t.value;var c=r(e),u=String(this);if(!c.global)return s(c,u);var f=c.unicode;c.lastIndex=0;for(var l,d=[],p=0;null!==(l=s(c,u));){var h=String(l[0]);d[p]=h,""===h&&(c.lastIndex=i(u,o(c.lastIndex),f)),p++}return 0===p?null:d}]}))},function(e,t,n){var r;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,o){"use strict";var i=[],s=Object.getPrototypeOf,a=i.slice,c=i.flat?function(e){return i.flat.call(e)}:function(e){return i.concat.apply([],e)},u=i.push,f=i.indexOf,l={},d=l.toString,p=l.hasOwnProperty,h=p.toString,g=h.call(Object),v={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},m=function(e){return null!=e&&e===e.window},b=n.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function _(e,t,n){var r,o,i=(n=n||b).createElement("script");if(i.text=e,t)for(r in w)(o=t[r]||t.getAttribute&&t.getAttribute(r))&&i.setAttribute(r,o);n.head.appendChild(i).parentNode.removeChild(i)}function S(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[d.call(e)]||"object":typeof e}var C=function(e,t){return new C.fn.init(e,t)};function E(e){var t=!!e&&"length"in e&&e.length,n=S(e);return!y(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}C.fn=C.prototype={jquery:"3.6.1",constructor:C,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=C.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return C.each(this,e)},map:function(e){return this.pushStack(C.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(C.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:i.sort,splice:i.splice},C.extend=C.fn.extend=function(){var e,t,n,r,o,i,s=arguments[0]||{},a=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||y(s)||(s={}),a===c&&(s=this,a--);a<c;a++)if(null!=(e=arguments[a]))for(t in e)r=e[t],"__proto__"!==t&&s!==r&&(u&&r&&(C.isPlainObject(r)||(o=Array.isArray(r)))?(n=s[t],i=o&&!Array.isArray(n)?[]:o||C.isPlainObject(n)?n:{},o=!1,s[t]=C.extend(u,i,r)):void 0!==r&&(s[t]=r));return s},C.extend({expando:"jQuery"+("3.6.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==d.call(e))&&(!(t=s(e))||"function"==typeof(n=p.call(t,"constructor")&&t.constructor)&&h.call(n)===g)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){_(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(E(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(E(Object(e))?C.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:f.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r=[],o=0,i=e.length,s=!n;o<i;o++)!t(e[o],o)!==s&&r.push(e[o]);return r},map:function(e,t,n){var r,o,i=0,s=[];if(E(e))for(r=e.length;i<r;i++)null!=(o=t(e[i],i,n))&&s.push(o);else for(i in e)null!=(o=t(e[i],i,n))&&s.push(o);return c(s)},guid:1,support:v}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=i[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){l["[object "+t+"]"]=t.toLowerCase()}));var k=function(e){var t,n,r,o,i,s,a,c,u,f,l,d,p,h,g,v,y,m,b,w="sizzle"+1*new Date,_=e.document,S=0,C=0,E=ce(),k=ce(),x=ce(),T=ce(),A=function(e,t){return e===t&&(l=!0),0},R={}.hasOwnProperty,O=[],N=O.pop,I=O.push,P=O.push,D=O.slice,M=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",U="(?:\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",F="\\["+L+"*("+U+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+U+"))|)"+L+"*\\]",B=":("+U+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+F+")*)|.*)\\)|)",G=new RegExp(L+"+","g"),q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),V=new RegExp("^"+L+"*,"+L+"*"),H=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),W=new RegExp(L+"|>"),J=new RegExp(B),z=new RegExp("^"+U+"$"),K={ID:new RegExp("^#("+U+")"),CLASS:new RegExp("^\\.("+U+")"),TAG:new RegExp("^("+U+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,$=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,oe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){d()},se=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{P.apply(O=D.call(_.childNodes),_.childNodes),O[_.childNodes.length].nodeType}catch(e){P={apply:O.length?function(e,t){I.apply(e,D.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ae(e,t,r,o){var i,a,u,f,l,h,y,m=t&&t.ownerDocument,_=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==_&&9!==_&&11!==_)return r;if(!o&&(d(t),t=t||p,g)){if(11!==_&&(l=Q.exec(e)))if(i=l[1]){if(9===_){if(!(u=t.getElementById(i)))return r;if(u.id===i)return r.push(u),r}else if(m&&(u=m.getElementById(i))&&b(t,u)&&u.id===i)return r.push(u),r}else{if(l[2])return P.apply(r,t.getElementsByTagName(e)),r;if((i=l[3])&&n.getElementsByClassName&&t.getElementsByClassName)return P.apply(r,t.getElementsByClassName(i)),r}if(n.qsa&&!T[e+" "]&&(!v||!v.test(e))&&(1!==_||"object"!==t.nodeName.toLowerCase())){if(y=e,m=t,1===_&&(W.test(e)||H.test(e))){for((m=ee.test(e)&&ye(t.parentNode)||t)===t&&n.scope||((f=t.getAttribute("id"))?f=f.replace(re,oe):t.setAttribute("id",f=w)),a=(h=s(e)).length;a--;)h[a]=(f?"#"+f:":scope")+" "+be(h[a]);y=h.join(",")}try{return P.apply(r,m.querySelectorAll(y)),r}catch(t){T(e,!0)}finally{f===w&&t.removeAttribute("id")}}}return c(e.replace(q,"$1"),t,r,o)}function ce(){var e=[];return function t(n,o){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=o}}function ue(e){return e[w]=!0,e}function fe(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),o=n.length;o--;)r.attrHandle[n[o]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ve(e){return ue((function(t){return t=+t,ue((function(n,r){for(var o,i=e([],n.length,t),s=i.length;s--;)n[o=i[s]]&&(n[o]=!(r[o]=n[o]))}))}))}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},i=ae.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},d=ae.setDocument=function(e){var t,o,s=e?e.ownerDocument||e:_;return s!=p&&9===s.nodeType&&s.documentElement?(h=(p=s).documentElement,g=!i(p),_!=p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",ie,!1):o.attachEvent&&o.attachEvent("onunload",ie)),n.scope=fe((function(e){return h.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=fe((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=fe((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Z.test(p.getElementsByClassName),n.getById=fe((function(e){return h.appendChild(e).id=w,!p.getElementsByName||!p.getElementsByName(w).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],v=[],(n.qsa=Z.test(p.querySelectorAll))&&(fe((function(e){var t;h.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+L+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+L+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+w+"-]").length||v.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+L+"*name"+L+"*="+L+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),fe((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+L+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=Z.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&fe((function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",B)})),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),t=Z.test(h.compareDocumentPosition),b=t||Z.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return l=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==_&&b(_,e)?-1:t==p||t.ownerDocument==_&&b(_,t)?1:f?M(f,e)-M(f,t):0:4&r?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,s=[e],a=[t];if(!o||!i)return e==p?-1:t==p?1:o?-1:i?1:f?M(f,e)-M(f,t):0;if(o===i)return de(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?de(s[r],a[r]):s[r]==_?-1:a[r]==_?1:0},p):p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(d(e),n.matchesSelector&&g&&!T[t+" "]&&(!y||!y.test(t))&&(!v||!v.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){T(t,!0)}return ae(t,p,null,[e]).length>0},ae.contains=function(e,t){return(e.ownerDocument||e)!=p&&d(e),b(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!=p&&d(e);var o=r.attrHandle[t.toLowerCase()],i=o&&R.call(r.attrHandle,t.toLowerCase())?o(e,t,!g):void 0;return void 0!==i?i:n.attributes||!g?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},ae.escape=function(e){return(e+"").replace(re,oe)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,r=[],o=0,i=0;if(l=!n.detectDuplicates,f=!n.sortStable&&e.slice(0),e.sort(A),l){for(;t=e[i++];)t===e[i]&&(o=r.push(i));for(;o--;)e.splice(r[o],1)}return f=null,e},o=ae.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(r=ae.selectors={cacheLength:50,createPseudo:ue,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&J.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+L+")"+e+"("+L+"|$)"))&&E(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var o=ae.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace(G," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,c){var u,f,l,d,p,h,g=i!==s?"nextSibling":"previousSibling",v=t.parentNode,y=a&&t.nodeName.toLowerCase(),m=!c&&!a,b=!1;if(v){if(i){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?v.firstChild:v.lastChild],s&&m){for(b=(p=(u=(f=(l=(d=v)[w]||(d[w]={}))[d.uniqueID]||(l[d.uniqueID]={}))[e]||[])[0]===S&&u[1])&&u[2],d=p&&v.childNodes[p];d=++p&&d&&d[g]||(b=p=0)||h.pop();)if(1===d.nodeType&&++b&&d===t){f[e]=[S,p,b];break}}else if(m&&(b=p=(u=(f=(l=(d=t)[w]||(d[w]={}))[d.uniqueID]||(l[d.uniqueID]={}))[e]||[])[0]===S&&u[1]),!1===b)for(;(d=++p&&d&&d[g]||(b=p=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++b||(m&&((f=(l=d[w]||(d[w]={}))[d.uniqueID]||(l[d.uniqueID]={}))[e]=[S,b]),d!==t)););return(b-=o)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,o=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return o[w]?o(t):o.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ue((function(e,n){for(var r,i=o(e,t),s=i.length;s--;)e[r=M(e,i[s])]=!(n[r]=i[s])})):function(e){return o(e,0,n)}):o}},pseudos:{not:ue((function(e){var t=[],n=[],r=a(e.replace(q,"$1"));return r[w]?ue((function(e,t,n,o){for(var i,s=r(e,null,o,[]),a=e.length;a--;)(i=s[a])&&(e[a]=!(t[a]=i))})):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}})),has:ue((function(e){return function(t){return ae(e,t).length>0}})),contains:ue((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||o(t)).indexOf(e)>-1}})),lang:ue((function(e){return z.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return $.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve((function(){return[0]})),last:ve((function(e,t){return[t-1]})),eq:ve((function(e,t,n){return[n<0?n+t:n]})),even:ve((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ve((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ve((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ve((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=he(t);function me(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function we(e,t,n){var r=t.dir,o=t.next,i=o||r,s=n&&"parentNode"===i,a=C++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||s)return e(t,n,o);return!1}:function(t,n,c){var u,f,l,d=[S,a];if(c){for(;t=t[r];)if((1===t.nodeType||s)&&e(t,n,c))return!0}else for(;t=t[r];)if(1===t.nodeType||s)if(f=(l=t[w]||(t[w]={}))[t.uniqueID]||(l[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[r]||t;else{if((u=f[i])&&u[0]===S&&u[1]===a)return d[2]=u[2];if(f[i]=d,d[2]=e(t,n,c))return!0}return!1}}function _e(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function Se(e,t,n,r,o){for(var i,s=[],a=0,c=e.length,u=null!=t;a<c;a++)(i=e[a])&&(n&&!n(i,r,o)||(s.push(i),u&&t.push(a)));return s}function Ce(e,t,n,r,o,i){return r&&!r[w]&&(r=Ce(r)),o&&!o[w]&&(o=Ce(o,i)),ue((function(i,s,a,c){var u,f,l,d=[],p=[],h=s.length,g=i||function(e,t,n){for(var r=0,o=t.length;r<o;r++)ae(e,t[r],n);return n}(t||"*",a.nodeType?[a]:a,[]),v=!e||!i&&t?g:Se(g,d,e,a,c),y=n?o||(i?e:h||r)?[]:s:v;if(n&&n(v,y,a,c),r)for(u=Se(y,p),r(u,[],a,c),f=u.length;f--;)(l=u[f])&&(y[p[f]]=!(v[p[f]]=l));if(i){if(o||e){if(o){for(u=[],f=y.length;f--;)(l=y[f])&&u.push(v[f]=l);o(null,y=[],u,c)}for(f=y.length;f--;)(l=y[f])&&(u=o?M(i,l):d[f])>-1&&(i[u]=!(s[u]=l))}}else y=Se(y===s?y.splice(h,y.length):y),o?o(null,s,y,c):P.apply(s,y)}))}function Ee(e){for(var t,n,o,i=e.length,s=r.relative[e[0].type],a=s||r.relative[" "],c=s?1:0,f=we((function(e){return e===t}),a,!0),l=we((function(e){return M(t,e)>-1}),a,!0),d=[function(e,n,r){var o=!s&&(r||n!==u)||((t=n).nodeType?f(e,n,r):l(e,n,r));return t=null,o}];c<i;c++)if(n=r.relative[e[c].type])d=[we(_e(d),n)];else{if((n=r.filter[e[c].type].apply(null,e[c].matches))[w]){for(o=++c;o<i&&!r.relative[e[o].type];o++);return Ce(c>1&&_e(d),c>1&&be(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(q,"$1"),n,c<o&&Ee(e.slice(c,o)),o<i&&Ee(e=e.slice(o)),o<i&&be(e))}d.push(n)}return _e(d)}return me.prototype=r.filters=r.pseudos,r.setFilters=new me,s=ae.tokenize=function(e,t){var n,o,i,s,a,c,u,f=k[e+" "];if(f)return t?0:f.slice(0);for(a=e,c=[],u=r.preFilter;a;){for(s in n&&!(o=V.exec(a))||(o&&(a=a.slice(o[0].length)||a),c.push(i=[])),n=!1,(o=H.exec(a))&&(n=o.shift(),i.push({value:n,type:o[0].replace(q," ")}),a=a.slice(n.length)),r.filter)!(o=K[s].exec(a))||u[s]&&!(o=u[s](o))||(n=o.shift(),i.push({value:n,type:s,matches:o}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ae.error(e):k(e,c).slice(0)},a=ae.compile=function(e,t){var n,o=[],i=[],a=x[e+" "];if(!a){for(t||(t=s(e)),n=t.length;n--;)(a=Ee(t[n]))[w]?o.push(a):i.push(a);(a=x(e,function(e,t){var n=t.length>0,o=e.length>0,i=function(i,s,a,c,f){var l,h,v,y=0,m="0",b=i&&[],w=[],_=u,C=i||o&&r.find.TAG("*",f),E=S+=null==_?1:Math.random()||.1,k=C.length;for(f&&(u=s==p||s||f);m!==k&&null!=(l=C[m]);m++){if(o&&l){for(h=0,s||l.ownerDocument==p||(d(l),a=!g);v=e[h++];)if(v(l,s||p,a)){c.push(l);break}f&&(S=E)}n&&((l=!v&&l)&&y--,i&&b.push(l))}if(y+=m,n&&m!==y){for(h=0;v=t[h++];)v(b,w,s,a);if(i){if(y>0)for(;m--;)b[m]||w[m]||(w[m]=N.call(c));w=Se(w)}P.apply(c,w),f&&!i&&w.length>0&&y+t.length>1&&ae.uniqueSort(c)}return f&&(S=E,u=_),b};return n?ue(i):i}(i,o))).selector=e}return a},c=ae.select=function(e,t,n,o){var i,c,u,f,l,d="function"==typeof e&&e,p=!o&&s(e=d.selector||e);if(n=n||[],1===p.length){if((c=p[0]=p[0].slice(0)).length>2&&"ID"===(u=c[0]).type&&9===t.nodeType&&g&&r.relative[c[1].type]){if(!(t=(r.find.ID(u.matches[0].replace(te,ne),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(c.shift().value.length)}for(i=K.needsContext.test(e)?0:c.length;i--&&(u=c[i],!r.relative[f=u.type]);)if((l=r.find[f])&&(o=l(u.matches[0].replace(te,ne),ee.test(c[0].type)&&ye(t.parentNode)||t))){if(c.splice(i,1),!(e=o.length&&be(c)))return P.apply(n,o),n;break}}return(d||a(e,p))(o,t,!g,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},n.sortStable=w.split("").sort(A).join("")===w,n.detectDuplicates=!!l,d(),n.sortDetached=fe((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),fe((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||le("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&fe((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||le("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),fe((function(e){return null==e.getAttribute("disabled")}))||le(j,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),ae}(n);C.find=k,C.expr=k.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=k.uniqueSort,C.text=k.getText,C.isXMLDoc=k.isXML,C.contains=k.contains,C.escapeSelector=k.escape;var x=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&C(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},A=C.expr.match.needsContext;function R(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function N(e,t,n){return y(t)?C.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?C.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?C.grep(e,(function(e){return f.call(t,e)>-1!==n})):C.filter(t,e,n)}C.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?C.find.matchesSelector(r,e)?[r]:[]:C.find.matches(e,C.grep(t,(function(e){return 1===e.nodeType})))},C.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!=typeof e)return this.pushStack(C(e).filter((function(){for(t=0;t<r;t++)if(C.contains(o[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)C.find(e,o[t],n);return r>1?C.uniqueSort(n):n},filter:function(e){return this.pushStack(N(this,e||[],!1))},not:function(e){return this.pushStack(N(this,e||[],!0))},is:function(e){return!!N(this,"string"==typeof e&&A.test(e)?C(e):e||[],!1).length}});var I,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||I,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:P.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof C?t[0]:t,C.merge(this,C.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),O.test(r[1])&&C.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=b.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(C):C.makeArray(e,this)}).prototype=C.fn,I=C(b);var D=/^(?:parents|prev(?:Until|All))/,M={children:!0,contents:!0,next:!0,prev:!0};function j(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}C.fn.extend({has:function(e){var t=C(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(C.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,o=this.length,i=[],s="string"!=typeof e&&C(e);if(!A.test(e))for(;r<o;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&C.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?C.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?f.call(C(e),this[0]):f.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),C.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x(e,"parentNode")},parentsUntil:function(e,t,n){return x(e,"parentNode",n)},next:function(e){return j(e,"nextSibling")},prev:function(e){return j(e,"previousSibling")},nextAll:function(e){return x(e,"nextSibling")},prevAll:function(e){return x(e,"previousSibling")},nextUntil:function(e,t,n){return x(e,"nextSibling",n)},prevUntil:function(e,t,n){return x(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&s(e.contentDocument)?e.contentDocument:(R(e,"template")&&(e=e.content||e),C.merge([],e.childNodes))}},(function(e,t){C.fn[e]=function(n,r){var o=C.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=C.filter(r,o)),this.length>1&&(M[e]||C.uniqueSort(o),D.test(e)&&o.reverse()),this.pushStack(o)}}));var L=/[^\x20\t\r\n\f]+/g;function U(e){return e}function F(e){throw e}function B(e,t,n,r){var o;try{e&&y(o=e.promise)?o.call(e).done(t).fail(n):e&&y(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}C.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return C.each(e.match(L)||[],(function(e,n){t[n]=!0})),t}(e):C.extend({},e);var t,n,r,o,i=[],s=[],a=-1,c=function(){for(o=o||e.once,r=t=!0;s.length;a=-1)for(n=s.shift();++a<i.length;)!1===i[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=i.length,n=!1);e.memory||(n=!1),t=!1,o&&(i=n?[]:"")},u={add:function(){return i&&(n&&!t&&(a=i.length-1,s.push(n)),function t(n){C.each(n,(function(n,r){y(r)?e.unique&&u.has(r)||i.push(r):r&&r.length&&"string"!==S(r)&&t(r)}))}(arguments),n&&!t&&c()),this},remove:function(){return C.each(arguments,(function(e,t){for(var n;(n=C.inArray(t,i,n))>-1;)i.splice(n,1),n<=a&&a--})),this},has:function(e){return e?C.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=s=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=s=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},C.extend({Deferred:function(e){var t=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],r="pending",o={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return C.Deferred((function(n){C.each(t,(function(t,r){var o=y(e[r[4]])&&e[r[4]];i[r[1]]((function(){var e=o&&o.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,o){var i=0;function s(e,t,r,o){return function(){var a=this,c=arguments,u=function(){var n,u;if(!(e<i)){if((n=r.apply(a,c))===t.promise())throw new TypeError("Thenable self-resolution");u=n&&("object"==typeof n||"function"==typeof n)&&n.then,y(u)?o?u.call(n,s(i,t,U,o),s(i,t,F,o)):(i++,u.call(n,s(i,t,U,o),s(i,t,F,o),s(i,t,U,t.notifyWith))):(r!==U&&(a=void 0,c=[n]),(o||t.resolveWith)(a,c))}},f=o?u:function(){try{u()}catch(n){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(n,f.stackTrace),e+1>=i&&(r!==F&&(a=void 0,c=[n]),t.rejectWith(a,c))}};e?f():(C.Deferred.getStackHook&&(f.stackTrace=C.Deferred.getStackHook()),n.setTimeout(f))}}return C.Deferred((function(n){t[0][3].add(s(0,n,y(o)?o:U,n.notifyWith)),t[1][3].add(s(0,n,y(e)?e:U)),t[2][3].add(s(0,n,y(r)?r:F))})).promise()},promise:function(e){return null!=e?C.extend(e,o):o}},i={};return C.each(t,(function(e,n){var s=n[2],a=n[5];o[n[1]]=s.add,a&&s.add((function(){r=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(n[3].fire),i[n[0]]=function(){return i[n[0]+"With"](this===i?void 0:this,arguments),this},i[n[0]+"With"]=s.fireWith})),o.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),o=a.call(arguments),i=C.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?a.call(arguments):n,--t||i.resolveWith(r,o)}};if(t<=1&&(B(e,i.done(s(n)).resolve,i.reject,!t),"pending"===i.state()||y(o[n]&&o[n].then)))return i.then();for(;n--;)B(o[n],s(n),i.reject);return i.promise()}});var G=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&G.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},C.readyException=function(e){n.setTimeout((function(){throw e}))};var q=C.Deferred();function V(){b.removeEventListener("DOMContentLoaded",V),n.removeEventListener("load",V),C.ready()}C.fn.ready=function(e){return q.then(e).catch((function(e){C.readyException(e)})),this},C.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==e&&--C.readyWait>0||q.resolveWith(b,[C]))}}),C.ready.then=q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(C.ready):(b.addEventListener("DOMContentLoaded",V),n.addEventListener("load",V));var H=function(e,t,n,r,o,i,s){var a=0,c=e.length,u=null==n;if("object"===S(n))for(a in o=!0,n)H(e,t,a,n[a],!0,i,s);else if(void 0!==r&&(o=!0,y(r)||(s=!0),u&&(s?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(C(e),n)})),t))for(;a<c;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return o?e:u?t.call(e):c?t(e[0],n):i},W=/^-ms-/,J=/-([a-z])/g;function z(e,t){return t.toUpperCase()}function K(e){return e.replace(W,"ms-").replace(J,z)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function $(){this.expando=C.expando+$.uid++}$.uid=1,$.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,o=this.cache(e);if("string"==typeof t)o[K(t)]=n;else for(r in t)o[K(r)]=t[r];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][K(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(K):(t=K(t))in r?[t]:t.match(L)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||C.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!C.isEmptyObject(t)}};var X=new $,Z=new $,Q=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Q.test(e)?JSON.parse(e):e)}(n)}catch(e){}Z.set(e,t,n)}else n=void 0;return n}C.extend({hasData:function(e){return Z.hasData(e)||X.hasData(e)},data:function(e,t,n){return Z.access(e,t,n)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,n){return X.access(e,t,n)},_removeData:function(e,t){X.remove(e,t)}}),C.fn.extend({data:function(e,t){var n,r,o,i=this[0],s=i&&i.attributes;if(void 0===e){if(this.length&&(o=Z.get(i),1===i.nodeType&&!X.get(i,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(r=s[n].name).indexOf("data-")&&(r=K(r.slice(5)),te(i,r,o[r]));X.set(i,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each((function(){Z.set(this,e)})):H(this,(function(t){var n;if(i&&void 0===t)return void 0!==(n=Z.get(i,e))||void 0!==(n=te(i,e))?n:void 0;this.each((function(){Z.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),C.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=X.get(e,t),n&&(!r||Array.isArray(n)?r=X.access(e,t,C.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=C.queue(e,t),r=n.length,o=n.shift(),i=C._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,(function(){C.dequeue(e,t)}),i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return X.get(e,n)||X.access(e,n,{empty:C.Callbacks("once memory").add((function(){X.remove(e,[t+"queue",n])}))})}}),C.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?C.queue(this[0],e):void 0===t?this:this.each((function(){var n=C.queue(this,e,t);C._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&C.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){C.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,o=C.Deferred(),i=this,s=this.length,a=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=X.get(i[s],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),o.promise(t)}});var ne=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,re=new RegExp("^(?:([+-])=|)("+ne+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ie=b.documentElement,se=function(e){return C.contains(e.ownerDocument,e)},ae={composed:!0};ie.getRootNode&&(se=function(e){return C.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var ce=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===C.css(e,"display")};function ue(e,t,n,r){var o,i,s=20,a=r?function(){return r.cur()}:function(){return C.css(e,t,"")},c=a(),u=n&&n[3]||(C.cssNumber[t]?"":"px"),f=e.nodeType&&(C.cssNumber[t]||"px"!==u&&+c)&&re.exec(C.css(e,t));if(f&&f[3]!==u){for(c/=2,u=u||f[3],f=+c||1;s--;)C.style(e,t,f+u),(1-i)*(1-(i=a()/c||.5))<=0&&(s=0),f/=i;f*=2,C.style(e,t,f+u),n=n||[]}return n&&(f=+f||+c||0,o=n[1]?f+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=f,r.end=o)),o}var fe={};function le(e){var t,n=e.ownerDocument,r=e.nodeName,o=fe[r];return o||(t=n.body.appendChild(n.createElement(r)),o=C.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),fe[r]=o,o)}function de(e,t){for(var n,r,o=[],i=0,s=e.length;i<s;i++)(r=e[i]).style&&(n=r.style.display,t?("none"===n&&(o[i]=X.get(r,"display")||null,o[i]||(r.style.display="")),""===r.style.display&&ce(r)&&(o[i]=le(r))):"none"!==n&&(o[i]="none",X.set(r,"display",n)));for(i=0;i<s;i++)null!=o[i]&&(e[i].style.display=o[i]);return e}C.fn.extend({show:function(){return de(this,!0)},hide:function(){return de(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ce(this)?C(this).show():C(this).hide()}))}});var pe,he,ge=/^(?:checkbox|radio)$/i,ve=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;pe=b.createDocumentFragment().appendChild(b.createElement("div")),(he=b.createElement("input")).setAttribute("type","radio"),he.setAttribute("checked","checked"),he.setAttribute("name","t"),pe.appendChild(he),v.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="<option></option>",v.option=!!pe.lastChild;var me={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&R(e,t)?C.merge([e],n):n}function we(e,t){for(var n=0,r=e.length;n<r;n++)X.set(e[n],"globalEval",!t||X.get(t[n],"globalEval"))}me.tbody=me.tfoot=me.colgroup=me.caption=me.thead,me.th=me.td,v.option||(me.optgroup=me.option=[1,"<select multiple='multiple'>","</select>"]);var _e=/<|&#?\w+;/;function Se(e,t,n,r,o){for(var i,s,a,c,u,f,l=t.createDocumentFragment(),d=[],p=0,h=e.length;p<h;p++)if((i=e[p])||0===i)if("object"===S(i))C.merge(d,i.nodeType?[i]:i);else if(_e.test(i)){for(s=s||l.appendChild(t.createElement("div")),a=(ve.exec(i)||["",""])[1].toLowerCase(),c=me[a]||me._default,s.innerHTML=c[1]+C.htmlPrefilter(i)+c[2],f=c[0];f--;)s=s.lastChild;C.merge(d,s.childNodes),(s=l.firstChild).textContent=""}else d.push(t.createTextNode(i));for(l.textContent="",p=0;i=d[p++];)if(r&&C.inArray(i,r)>-1)o&&o.push(i);else if(u=se(i),s=be(l.appendChild(i),"script"),u&&we(s),n)for(f=0;i=s[f++];)ye.test(i.type||"")&&n.push(i);return l}var Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function xe(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function Te(e,t,n,r,o,i){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)Te(e,a,n,r,t[a],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=ke;else if(!o)return e;return 1===i&&(s=o,(o=function(e){return C().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=C.guid++)),e.each((function(){C.event.add(this,t,o,r,n)}))}function Ae(e,t,n){n?(X.set(e,t,!1),C.event.add(e,t,{namespace:!1,handler:function(e){var r,o,i=X.get(this,t);if(1&e.isTrigger&&this[t]){if(i.length)(C.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=a.call(arguments),X.set(this,t,i),r=n(this,t),this[t](),i!==(o=X.get(this,t))||r?X.set(this,t,!1):o={},i!==o)return e.stopImmediatePropagation(),e.preventDefault(),o&&o.value}else i.length&&(X.set(this,t,{value:C.event.trigger(C.extend(i[0],C.Event.prototype),i.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===X.get(e,t)&&C.event.add(e,t,Ee)}C.event={global:{},add:function(e,t,n,r,o){var i,s,a,c,u,f,l,d,p,h,g,v=X.get(e);if(Y(e))for(n.handler&&(n=(i=n).handler,o=i.selector),o&&C.find.matchesSelector(ie,o),n.guid||(n.guid=C.guid++),(c=v.events)||(c=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(t){return void 0!==C&&C.event.triggered!==t.type?C.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(L)||[""]).length;u--;)p=g=(a=Ce.exec(t[u])||[])[1],h=(a[2]||"").split(".").sort(),p&&(l=C.event.special[p]||{},p=(o?l.delegateType:l.bindType)||p,l=C.event.special[p]||{},f=C.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&C.expr.match.needsContext.test(o),namespace:h.join(".")},i),(d=c[p])||((d=c[p]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(e,r,h,s)||e.addEventListener&&e.addEventListener(p,s)),l.add&&(l.add.call(e,f),f.handler.guid||(f.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,f):d.push(f),C.event.global[p]=!0)},remove:function(e,t,n,r,o){var i,s,a,c,u,f,l,d,p,h,g,v=X.hasData(e)&&X.get(e);if(v&&(c=v.events)){for(u=(t=(t||"").match(L)||[""]).length;u--;)if(p=g=(a=Ce.exec(t[u])||[])[1],h=(a[2]||"").split(".").sort(),p){for(l=C.event.special[p]||{},d=c[p=(r?l.delegateType:l.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=i=d.length;i--;)f=d[i],!o&&g!==f.origType||n&&n.guid!==f.guid||a&&!a.test(f.namespace)||r&&r!==f.selector&&("**"!==r||!f.selector)||(d.splice(i,1),f.selector&&d.delegateCount--,l.remove&&l.remove.call(e,f));s&&!d.length&&(l.teardown&&!1!==l.teardown.call(e,h,v.handle)||C.removeEvent(e,p,v.handle),delete c[p])}else for(p in c)C.event.remove(e,p+t[u],n,r,!0);C.isEmptyObject(c)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,s,a=new Array(arguments.length),c=C.event.fix(e),u=(X.get(this,"events")||Object.create(null))[c.type]||[],f=C.event.special[c.type]||{};for(a[0]=c,t=1;t<arguments.length;t++)a[t]=arguments[t];if(c.delegateTarget=this,!f.preDispatch||!1!==f.preDispatch.call(this,c)){for(s=C.event.handlers.call(this,c,u),t=0;(o=s[t++])&&!c.isPropagationStopped();)for(c.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!c.isImmediatePropagationStopped();)c.rnamespace&&!1!==i.namespace&&!c.rnamespace.test(i.namespace)||(c.handleObj=i,c.data=i.data,void 0!==(r=((C.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,a))&&!1===(c.result=r)&&(c.preventDefault(),c.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,c),c.result}},handlers:function(e,t){var n,r,o,i,s,a=[],c=t.delegateCount,u=e.target;if(c&&u.nodeType&&!("click"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(i=[],s={},n=0;n<c;n++)void 0===s[o=(r=t[n]).selector+" "]&&(s[o]=r.needsContext?C(o,this).index(u)>-1:C.find(o,this,null,[u]).length),s[o]&&i.push(r);i.length&&a.push({elem:u,handlers:i})}return u=this,c<t.length&&a.push({elem:u,handlers:t.slice(c)}),a},addProp:function(e,t){Object.defineProperty(C.Event.prototype,e,{enumerable:!0,configurable:!0,get:y(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[C.expando]?e:new C.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ge.test(t.type)&&t.click&&R(t,"input")&&Ae(t,"click",Ee),!1},trigger:function(e){var t=this||e;return ge.test(t.type)&&t.click&&R(t,"input")&&Ae(t,"click"),!0},_default:function(e){var t=e.target;return ge.test(t.type)&&t.click&&R(t,"input")&&X.get(t,"click")||R(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},C.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},C.Event=function(e,t){if(!(this instanceof C.Event))return new C.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&C.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},C.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},(function(e,t){C.event.special[e]={setup:function(){return Ae(this,e,xe),!1},trigger:function(){return Ae(this,e),!0},_default:function(t){return X.get(t.target,e)},delegateType:t}})),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){C.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,o=e.relatedTarget,i=e.handleObj;return o&&(o===r||C.contains(r,o))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),C.fn.extend({on:function(e,t,n,r){return Te(this,e,t,n,r)},one:function(e,t,n,r){return Te(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,C(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ke),this.each((function(){C.event.remove(this,e,n,t)}))}});var Re=/<script|<style|<link/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ie(e,t){return R(e,"table")&&R(11!==t.nodeType?t:t.firstChild,"tr")&&C(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function De(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,o,i,s,a;if(1===t.nodeType){if(X.hasData(e)&&(a=X.get(e).events))for(o in X.remove(t,"handle events"),a)for(n=0,r=a[o].length;n<r;n++)C.event.add(t,o,a[o][n]);Z.hasData(e)&&(i=Z.access(e),s=C.extend({},i),Z.set(t,s))}}function je(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ge.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Le(e,t,n,r){t=c(t);var o,i,s,a,u,f,l=0,d=e.length,p=d-1,h=t[0],g=y(h);if(g||d>1&&"string"==typeof h&&!v.checkClone&&Oe.test(h))return e.each((function(o){var i=e.eq(o);g&&(t[0]=h.call(this,o,i.html())),Le(i,t,n,r)}));if(d&&(i=(o=Se(t,e[0].ownerDocument,!1,e,r)).firstChild,1===o.childNodes.length&&(o=i),i||r)){for(a=(s=C.map(be(o,"script"),Pe)).length;l<d;l++)u=o,l!==p&&(u=C.clone(u,!0,!0),a&&C.merge(s,be(u,"script"))),n.call(e[l],u,l);if(a)for(f=s[s.length-1].ownerDocument,C.map(s,De),l=0;l<a;l++)u=s[l],ye.test(u.type||"")&&!X.access(u,"globalEval")&&C.contains(f,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?C._evalUrl&&!u.noModule&&C._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},f):_(u.textContent.replace(Ne,""),u,f))}return e}function Ue(e,t,n){for(var r,o=t?C.filter(t,e):e,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||C.cleanData(be(r)),r.parentNode&&(n&&se(r)&&we(be(r,"script")),r.parentNode.removeChild(r));return e}C.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,o,i,s,a=e.cloneNode(!0),c=se(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||C.isXMLDoc(e)))for(s=be(a),r=0,o=(i=be(e)).length;r<o;r++)je(i[r],s[r]);if(t)if(n)for(i=i||be(e),s=s||be(a),r=0,o=i.length;r<o;r++)Me(i[r],s[r]);else Me(e,a);return(s=be(a,"script")).length>0&&we(s,!c&&be(e,"script")),a},cleanData:function(e){for(var t,n,r,o=C.event.special,i=0;void 0!==(n=e[i]);i++)if(Y(n)){if(t=n[X.expando]){if(t.events)for(r in t.events)o[r]?C.event.remove(n,r):C.removeEvent(n,r,t.handle);n[X.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),C.fn.extend({detach:function(e){return Ue(this,e,!0)},remove:function(e){return Ue(this,e)},text:function(e){return H(this,(function(e){return void 0===e?C.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Le(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ie(this,e).appendChild(e)}))},prepend:function(){return Le(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ie(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Le(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Le(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(C.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return C.clone(this,e,t)}))},html:function(e){return H(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Re.test(e)&&!me[(ve.exec(e)||["",""])[1].toLowerCase()]){e=C.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(C.cleanData(be(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Le(this,arguments,(function(t){var n=this.parentNode;C.inArray(this,e)<0&&(C.cleanData(be(this)),n&&n.replaceChild(t,this))}),e)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){C.fn[e]=function(e){for(var n,r=[],o=C(e),i=o.length-1,s=0;s<=i;s++)n=s===i?this:this.clone(!0),C(o[s])[t](n),u.apply(r,n.get());return this.pushStack(r)}}));var Fe=new RegExp("^("+ne+")(?!px)[a-z%]+$","i"),Be=/^--/,Ge=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},qe=function(e,t,n){var r,o,i={};for(o in t)i[o]=e.style[o],e.style[o]=t[o];for(o in r=n.call(e),t)e.style[o]=i[o];return r},Ve=new RegExp(oe.join("|"),"i"),He=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g");function We(e,t,n){var r,o,i,s,a=Be.test(t),c=e.style;return(n=n||Ge(e))&&(s=n.getPropertyValue(t)||n[t],a&&(s=s.replace(He,"$1")),""!==s||se(e)||(s=C.style(e,t)),!v.pixelBoxStyles()&&Fe.test(s)&&Ve.test(t)&&(r=c.width,o=c.minWidth,i=c.maxWidth,c.minWidth=c.maxWidth=c.width=s,s=n.width,c.width=r,c.minWidth=o,c.maxWidth=i)),void 0!==s?s+"":s}function Je(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(f){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",f.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ie.appendChild(u).appendChild(f);var e=n.getComputedStyle(f);r="1%"!==e.top,c=12===t(e.marginLeft),f.style.right="60%",s=36===t(e.right),o=36===t(e.width),f.style.position="absolute",i=12===t(f.offsetWidth/3),ie.removeChild(u),f=null}}function t(e){return Math.round(parseFloat(e))}var r,o,i,s,a,c,u=b.createElement("div"),f=b.createElement("div");f.style&&(f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===f.style.backgroundClip,C.extend(v,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),c},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,r,o;return null==a&&(e=b.createElement("table"),t=b.createElement("tr"),r=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",r.style.height="9px",r.style.display="block",ie.appendChild(e).appendChild(t).appendChild(r),o=n.getComputedStyle(t),a=parseInt(o.height,10)+parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)===t.offsetHeight,ie.removeChild(e)),a}}))}();var ze=["Webkit","Moz","ms"],Ke=b.createElement("div").style,Ye={};function $e(e){var t=C.cssProps[e]||Ye[e];return t||(e in Ke?e:Ye[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=ze.length;n--;)if((e=ze[n]+t)in Ke)return e}(e)||e)}var Xe=/^(none|table(?!-c[ea]).+)/,Ze={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function et(e,t,n){var r=re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function tt(e,t,n,r,o,i){var s="width"===t?1:0,a=0,c=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(c+=C.css(e,n+oe[s],!0,o)),r?("content"===n&&(c-=C.css(e,"padding"+oe[s],!0,o)),"margin"!==n&&(c-=C.css(e,"border"+oe[s]+"Width",!0,o))):(c+=C.css(e,"padding"+oe[s],!0,o),"padding"!==n?c+=C.css(e,"border"+oe[s]+"Width",!0,o):a+=C.css(e,"border"+oe[s]+"Width",!0,o));return!r&&i>=0&&(c+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-c-a-.5))||0),c}function nt(e,t,n){var r=Ge(e),o=(!v.boxSizingReliable()||n)&&"border-box"===C.css(e,"boxSizing",!1,r),i=o,s=We(e,t,r),a="offset"+t[0].toUpperCase()+t.slice(1);if(Fe.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&o||!v.reliableTrDimensions()&&R(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===C.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===C.css(e,"boxSizing",!1,r),(i=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+tt(e,t,n||(o?"border":"content"),i,r,s)+"px"}function rt(e,t,n,r,o){return new rt.prototype.init(e,t,n,r,o)}C.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,s,a=K(t),c=Be.test(t),u=e.style;if(c||(t=$e(a)),s=C.cssHooks[t]||C.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:u[t];"string"===(i=typeof n)&&(o=re.exec(n))&&o[1]&&(n=ue(e,t,o),i="number"),null!=n&&n==n&&("number"!==i||c||(n+=o&&o[3]||(C.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(c?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var o,i,s,a=K(t);return Be.test(t)||(t=$e(a)),(s=C.cssHooks[t]||C.cssHooks[a])&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=We(e,t,r)),"normal"===o&&t in Qe&&(o=Qe[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),C.each(["height","width"],(function(e,t){C.cssHooks[t]={get:function(e,n,r){if(n)return!Xe.test(C.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,r):qe(e,Ze,(function(){return nt(e,t,r)}))},set:function(e,n,r){var o,i=Ge(e),s=!v.scrollboxSize()&&"absolute"===i.position,a=(s||r)&&"border-box"===C.css(e,"boxSizing",!1,i),c=r?tt(e,t,r,a,i):0;return a&&s&&(c-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-tt(e,t,"border",!1,i)-.5)),c&&(o=re.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=C.css(e,t)),et(0,n,c)}}})),C.cssHooks.marginLeft=Je(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-qe(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),C.each({margin:"",padding:"",border:"Width"},(function(e,t){C.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];r<4;r++)o[e+oe[r]+t]=i[r]||i[r-2]||i[0];return o}},"margin"!==e&&(C.cssHooks[e+t].set=et)})),C.fn.extend({css:function(e,t){return H(this,(function(e,t,n){var r,o,i={},s=0;if(Array.isArray(t)){for(r=Ge(e),o=t.length;s<o;s++)i[t[s]]=C.css(e,t[s],!1,r);return i}return void 0!==n?C.style(e,t,n):C.css(e,t)}),e,t,arguments.length>1)}}),C.Tween=rt,rt.prototype={constructor:rt,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||C.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(C.cssNumber[n]?"":"px")},cur:function(){var e=rt.propHooks[this.prop];return e&&e.get?e.get(this):rt.propHooks._default.get(this)},run:function(e){var t,n=rt.propHooks[this.prop];return this.options.duration?this.pos=t=C.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rt.propHooks._default.set(this),this}},rt.prototype.init.prototype=rt.prototype,rt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=C.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){C.fx.step[e.prop]?C.fx.step[e.prop](e):1!==e.elem.nodeType||!C.cssHooks[e.prop]&&null==e.elem.style[$e(e.prop)]?e.elem[e.prop]=e.now:C.style(e.elem,e.prop,e.now+e.unit)}}},rt.propHooks.scrollTop=rt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},C.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},C.fx=rt.prototype.init,C.fx.step={};var ot,it,st=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function ct(){it&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ct):n.setTimeout(ct,C.fx.interval),C.fx.tick())}function ut(){return n.setTimeout((function(){ot=void 0})),ot=Date.now()}function ft(e,t){var n,r=0,o={height:e};for(t=t?1:0;r<4;r+=2-t)o["margin"+(n=oe[r])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function lt(e,t,n){for(var r,o=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),i=0,s=o.length;i<s;i++)if(r=o[i].call(n,t,e))return r}function dt(e,t,n){var r,o,i=0,s=dt.prefilters.length,a=C.Deferred().always((function(){delete c.elem})),c=function(){if(o)return!1;for(var t=ot||ut(),n=Math.max(0,u.startTime+u.duration-t),r=1-(n/u.duration||0),i=0,s=u.tweens.length;i<s;i++)u.tweens[i].run(r);return a.notifyWith(e,[u,r,n]),r<1&&s?n:(s||a.notifyWith(e,[u,1,0]),a.resolveWith(e,[u]),!1)},u=a.promise({elem:e,props:C.extend({},t),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},n),originalProperties:t,originalOptions:n,startTime:ot||ut(),duration:n.duration,tweens:[],createTween:function(t,n){var r=C.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(o)return this;for(o=!0;n<r;n++)u.tweens[n].run(1);return t?(a.notifyWith(e,[u,1,0]),a.resolveWith(e,[u,t])):a.rejectWith(e,[u,t]),this}}),f=u.props;for(!function(e,t){var n,r,o,i,s;for(n in e)if(o=t[r=K(n)],i=e[n],Array.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),(s=C.cssHooks[r])&&"expand"in s)for(n in i=s.expand(i),delete e[r],i)n in e||(e[n]=i[n],t[n]=o);else t[r]=o}(f,u.opts.specialEasing);i<s;i++)if(r=dt.prefilters[i].call(u,e,f,u.opts))return y(r.stop)&&(C._queueHooks(u.elem,u.opts.queue).stop=r.stop.bind(r)),r;return C.map(f,lt,u),y(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),C.fx.timer(C.extend(c,{elem:e,anim:u,queue:u.opts.queue})),u}C.Animation=C.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,re.exec(t),n),n}]},tweener:function(e,t){y(e)?(t=e,e=["*"]):e=e.match(L);for(var n,r=0,o=e.length;r<o;r++)n=e[r],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,o,i,s,a,c,u,f,l="width"in t||"height"in t,d=this,p={},h=e.style,g=e.nodeType&&ce(e),v=X.get(e,"fxshow");for(r in n.queue||(null==(s=C._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always((function(){d.always((function(){s.unqueued--,C.queue(e,"fx").length||s.empty.fire()}))}))),t)if(o=t[r],st.test(o)){if(delete t[r],i=i||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!v||void 0===v[r])continue;g=!0}p[r]=v&&v[r]||C.style(e,r)}if((c=!C.isEmptyObject(t))||!C.isEmptyObject(p))for(r in l&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(u=v&&v.display)&&(u=X.get(e,"display")),"none"===(f=C.css(e,"display"))&&(u?f=u:(de([e],!0),u=e.style.display||u,f=C.css(e,"display"),de([e]))),("inline"===f||"inline-block"===f&&null!=u)&&"none"===C.css(e,"float")&&(c||(d.done((function(){h.display=u})),null==u&&(f=h.display,u="none"===f?"":f)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",d.always((function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}))),c=!1,p)c||(v?"hidden"in v&&(g=v.hidden):v=X.access(e,"fxshow",{display:u}),i&&(v.hidden=!g),g&&de([e],!0),d.done((function(){for(r in g||de([e]),X.remove(e,"fxshow"),p)C.style(e,r,p[r])}))),c=lt(g?v[r]:0,r,d),r in v||(v[r]=c.start,g&&(c.end=c.start,c.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),C.speed=function(e,t,n){var r=e&&"object"==typeof e?C.extend({},e):{complete:n||!n&&t||y(e)&&e,duration:e,easing:n&&t||t&&!y(t)&&t};return C.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in C.fx.speeds?r.duration=C.fx.speeds[r.duration]:r.duration=C.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&C.dequeue(this,r.queue)},r},C.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ce).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=C.isEmptyObject(e),i=C.speed(t,n,r),s=function(){var t=dt(this,C.extend({},e),i);(o||X.get(this,"finish"))&&t.stop(!0)};return s.finish=s,o||!1===i.queue?this.each(s):this.queue(i.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,o=null!=e&&e+"queueHooks",i=C.timers,s=X.get(this);if(o)s[o]&&s[o].stop&&r(s[o]);else for(o in s)s[o]&&s[o].stop&&at.test(o)&&r(s[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));!t&&n||C.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=X.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=C.timers,s=r?r.length:0;for(n.finish=!0,C.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;t<s;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),C.each(["toggle","show","hide"],(function(e,t){var n=C.fn[t];C.fn[t]=function(e,r,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ft(t,!0),e,r,o)}})),C.each({slideDown:ft("show"),slideUp:ft("hide"),slideToggle:ft("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){C.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),C.timers=[],C.fx.tick=function(){var e,t=0,n=C.timers;for(ot=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||C.fx.stop(),ot=void 0},C.fx.timer=function(e){C.timers.push(e),C.fx.start()},C.fx.interval=13,C.fx.start=function(){it||(it=!0,ct())},C.fx.stop=function(){it=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(e,t){return e=C.fx&&C.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,r){var o=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(o)}}))},function(){var e=b.createElement("input"),t=b.createElement("select").appendChild(b.createElement("option"));e.type="checkbox",v.checkOn=""!==e.value,v.optSelected=t.selected,(e=b.createElement("input")).value="t",e.type="radio",v.radioValue="t"===e.value}();var pt,ht=C.expr.attrHandle;C.fn.extend({attr:function(e,t){return H(this,C.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){C.removeAttr(this,e)}))}}),C.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?C.prop(e,t,n):(1===i&&C.isXMLDoc(e)||(o=C.attrHooks[t.toLowerCase()]||(C.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void C.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:null==(r=C.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&R(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(L);if(o&&1===e.nodeType)for(;n=o[r++];)e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?C.removeAttr(e,n):e.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ht[t]||C.find.attr;ht[t]=function(e,t,r){var o,i,s=t.toLowerCase();return r||(i=ht[s],ht[s]=o,o=null!=n(e,t,r)?s:null,ht[s]=i),o}}));var gt=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;function yt(e){return(e.match(L)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(L)||[]}C.fn.extend({prop:function(e,t){return H(this,C.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[C.propFix[e]||e]}))}}),C.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&C.isXMLDoc(e)||(t=C.propFix[t]||t,o=C.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=C.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(C.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){C.propFix[this.toLowerCase()]=this})),C.fn.extend({addClass:function(e){var t,n,r,o,i,s;return y(e)?this.each((function(t){C(this).addClass(e.call(this,t,mt(this)))})):(t=bt(e)).length?this.each((function(){if(r=mt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(i=0;i<t.length;i++)o=t[i],n.indexOf(" "+o+" ")<0&&(n+=o+" ");s=yt(n),r!==s&&this.setAttribute("class",s)}})):this},removeClass:function(e){var t,n,r,o,i,s;return y(e)?this.each((function(t){C(this).removeClass(e.call(this,t,mt(this)))})):arguments.length?(t=bt(e)).length?this.each((function(){if(r=mt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(i=0;i<t.length;i++)for(o=t[i];n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");s=yt(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,o,i,s=typeof e,a="string"===s||Array.isArray(e);return y(e)?this.each((function(n){C(this).toggleClass(e.call(this,n,mt(this),t),t)})):"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):(n=bt(e),this.each((function(){if(a)for(i=C(this),o=0;o<n.length;o++)r=n[o],i.hasClass(r)?i.removeClass(r):i.addClass(r);else void 0!==e&&"boolean"!==s||((r=mt(this))&&X.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":X.get(this,"__className__")||""))})))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+yt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var wt=/\r/g;C.fn.extend({val:function(e){var t,n,r,o=this[0];return arguments.length?(r=y(e),this.each((function(n){var o;1===this.nodeType&&(null==(o=r?e.call(this,n,C(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=C.map(o,(function(e){return null==e?"":e+""}))),(t=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))}))):o?(t=C.valHooks[o.type]||C.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(wt,""):null==n?"":n:void 0}}),C.extend({valHooks:{option:{get:function(e){var t=C.find.attr(e,"value");return null!=t?t:yt(C.text(e))}},select:{get:function(e){var t,n,r,o=e.options,i=e.selectedIndex,s="select-one"===e.type,a=s?null:[],c=s?i+1:o.length;for(r=i<0?c:s?i:0;r<c;r++)if(((n=o[r]).selected||r===i)&&!n.disabled&&(!n.parentNode.disabled||!R(n.parentNode,"optgroup"))){if(t=C(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,r,o=e.options,i=C.makeArray(t),s=o.length;s--;)((r=o[s]).selected=C.inArray(C.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),C.each(["radio","checkbox"],(function(){C.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=C.inArray(C(e).val(),t)>-1}},v.checkOn||(C.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),v.focusin="onfocusin"in n;var _t=/^(?:focusinfocus|focusoutblur)$/,St=function(e){e.stopPropagation()};C.extend(C.event,{trigger:function(e,t,r,o){var i,s,a,c,u,f,l,d,h=[r||b],g=p.call(e,"type")?e.type:e,v=p.call(e,"namespace")?e.namespace.split("."):[];if(s=d=a=r=r||b,3!==r.nodeType&&8!==r.nodeType&&!_t.test(g+C.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),u=g.indexOf(":")<0&&"on"+g,(e=e[C.expando]?e:new C.Event(g,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:C.makeArray(t,[e]),l=C.event.special[g]||{},o||!l.trigger||!1!==l.trigger.apply(r,t))){if(!o&&!l.noBubble&&!m(r)){for(c=l.delegateType||g,_t.test(c+g)||(s=s.parentNode);s;s=s.parentNode)h.push(s),a=s;a===(r.ownerDocument||b)&&h.push(a.defaultView||a.parentWindow||n)}for(i=0;(s=h[i++])&&!e.isPropagationStopped();)d=s,e.type=i>1?c:l.bindType||g,(f=(X.get(s,"events")||Object.create(null))[e.type]&&X.get(s,"handle"))&&f.apply(s,t),(f=u&&s[u])&&f.apply&&Y(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=g,o||e.isDefaultPrevented()||l._default&&!1!==l._default.apply(h.pop(),t)||!Y(r)||u&&y(r[g])&&!m(r)&&((a=r[u])&&(r[u]=null),C.event.triggered=g,e.isPropagationStopped()&&d.addEventListener(g,St),r[g](),e.isPropagationStopped()&&d.removeEventListener(g,St),C.event.triggered=void 0,a&&(r[u]=a)),e.result}},simulate:function(e,t,n){var r=C.extend(new C.Event,n,{type:e,isSimulated:!0});C.event.trigger(r,null,t)}}),C.fn.extend({trigger:function(e,t){return this.each((function(){C.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return C.event.trigger(e,t,n,!0)}}),v.focusin||C.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){C.event.simulate(t,e.target,C.event.fix(e))};C.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,o=X.access(r,t);o||r.addEventListener(e,n,!0),X.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,o=X.access(r,t)-1;o?X.access(r,t,o):(r.removeEventListener(e,n,!0),X.remove(r,t))}}}));var Ct=n.location,Et={guid:Date.now()},kt=/\?/;C.parseXML=function(e){var t,r;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){}return r=t&&t.getElementsByTagName("parsererror")[0],t&&!r||C.error("Invalid XML: "+(r?C.map(r.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var xt=/\[\]$/,Tt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Rt=/^(?:input|select|textarea|keygen)/i;function Ot(e,t,n,r){var o;if(Array.isArray(t))C.each(t,(function(t,o){n||xt.test(e)?r(e,o):Ot(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,r)}));else if(n||"object"!==S(t))r(e,t);else for(o in t)Ot(e+"["+o+"]",t[o],n,r)}C.param=function(e,t){var n,r=[],o=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!C.isPlainObject(e))C.each(e,(function(){o(this.name,this.value)}));else for(n in e)Ot(n,e[n],t,o);return r.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=C.prop(this,"elements");return e?C.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!C(this).is(":disabled")&&Rt.test(this.nodeName)&&!At.test(e)&&(this.checked||!ge.test(e))})).map((function(e,t){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,(function(e){return{name:t.name,value:e.replace(Tt,"\r\n")}})):{name:t.name,value:n.replace(Tt,"\r\n")}})).get()}});var Nt=/%20/g,It=/#.*$/,Pt=/([?&])_=[^&]*/,Dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Mt=/^(?:GET|HEAD)$/,jt=/^\/\//,Lt={},Ut={},Ft="*/".concat("*"),Bt=b.createElement("a");function Gt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(L)||[];if(y(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qt(e,t,n,r){var o={},i=e===Ut;function s(a){var c;return o[a]=!0,C.each(e[a]||[],(function(e,a){var u=a(t,n,r);return"string"!=typeof u||i||o[u]?i?!(c=u):void 0:(t.dataTypes.unshift(u),s(u),!1)})),c}return s(t.dataTypes[0])||!o["*"]&&s("*")}function Vt(e,t){var n,r,o=C.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&C.extend(!0,e,r),e}Bt.href=Ct.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ft,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Vt(Vt(e,C.ajaxSettings),t):Vt(C.ajaxSettings,e)},ajaxPrefilter:Gt(Lt),ajaxTransport:Gt(Ut),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,o,i,s,a,c,u,f,l,d,p=C.ajaxSetup({},t),h=p.context||p,g=p.context&&(h.nodeType||h.jquery)?C(h):C.event,v=C.Deferred(),y=C.Callbacks("once memory"),m=p.statusCode||{},w={},_={},S="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(u){if(!s)for(s={};t=Dt.exec(i);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?i:null},setRequestHeader:function(e,t){return null==u&&(e=_[e.toLowerCase()]=_[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==u&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)E.always(e[E.status]);else for(t in e)m[t]=[m[t],e[t]];return this},abort:function(e){var t=e||S;return r&&r.abort(t),k(0,t),this}};if(v.promise(E),p.url=((e||p.url||Ct.href)+"").replace(jt,Ct.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(L)||[""],null==p.crossDomain){c=b.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=Bt.protocol+"//"+Bt.host!=c.protocol+"//"+c.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=C.param(p.data,p.traditional)),qt(Lt,p,t,E),u)return E;for(l in(f=C.event&&p.global)&&0==C.active++&&C.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Mt.test(p.type),o=p.url.replace(It,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Nt,"+")):(d=p.url.slice(o.length),p.data&&(p.processData||"string"==typeof p.data)&&(o+=(kt.test(o)?"&":"?")+p.data,delete p.data),!1===p.cache&&(o=o.replace(Pt,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et.guid+++d),p.url=o+d),p.ifModified&&(C.lastModified[o]&&E.setRequestHeader("If-Modified-Since",C.lastModified[o]),C.etag[o]&&E.setRequestHeader("If-None-Match",C.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&E.setRequestHeader("Content-Type",p.contentType),E.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ft+"; q=0.01":""):p.accepts["*"]),p.headers)E.setRequestHeader(l,p.headers[l]);if(p.beforeSend&&(!1===p.beforeSend.call(h,E,p)||u))return E.abort();if(S="abort",y.add(p.complete),E.done(p.success),E.fail(p.error),r=qt(Ut,p,t,E)){if(E.readyState=1,f&&g.trigger("ajaxSend",[E,p]),u)return E;p.async&&p.timeout>0&&(a=n.setTimeout((function(){E.abort("timeout")}),p.timeout));try{u=!1,r.send(w,k)}catch(e){if(u)throw e;k(-1,e)}}else k(-1,"No Transport");function k(e,t,s,c){var l,d,b,w,_,S=t;u||(u=!0,a&&n.clearTimeout(a),r=void 0,i=c||"",E.readyState=e>0?4:0,l=e>=200&&e<300||304===e,s&&(w=function(e,t,n){for(var r,o,i,s,a=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in a)if(a[o]&&a[o].test(r)){c.unshift(o);break}if(c[0]in n)i=c[0];else{for(o in n){if(!c[0]||e.converters[o+" "+c[0]]){i=o;break}s||(s=o)}i=i||s}if(i)return i!==c[0]&&c.unshift(i),n[i]}(p,E,s)),!l&&C.inArray("script",p.dataTypes)>-1&&C.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),w=function(e,t,n,r){var o,i,s,a,c,u={},f=e.dataTypes.slice();if(f[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(i=f.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!c&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=i,i=f.shift())if("*"===i)i=c;else if("*"!==c&&c!==i){if(!(s=u[c+" "+i]||u["* "+i]))for(o in u)if((a=o.split(" "))[1]===i&&(s=u[c+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[o]:!0!==u[o]&&(i=a[0],f.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+c+" to "+i}}}return{state:"success",data:t}}(p,w,E,l),l?(p.ifModified&&((_=E.getResponseHeader("Last-Modified"))&&(C.lastModified[o]=_),(_=E.getResponseHeader("etag"))&&(C.etag[o]=_)),204===e||"HEAD"===p.type?S="nocontent":304===e?S="notmodified":(S=w.state,d=w.data,l=!(b=w.error))):(b=S,!e&&S||(S="error",e<0&&(e=0))),E.status=e,E.statusText=(t||S)+"",l?v.resolveWith(h,[d,S,E]):v.rejectWith(h,[E,S,b]),E.statusCode(m),m=void 0,f&&g.trigger(l?"ajaxSuccess":"ajaxError",[E,p,l?d:b]),y.fireWith(h,[E,S]),f&&(g.trigger("ajaxComplete",[E,p]),--C.active||C.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return C.get(e,t,n,"json")},getScript:function(e,t){return C.get(e,void 0,t,"script")}}),C.each(["get","post"],(function(e,t){C[t]=function(e,n,r,o){return y(n)&&(o=o||r,r=n,n=void 0),C.ajax(C.extend({url:e,type:t,dataType:o,data:n,success:r},C.isPlainObject(e)&&e))}})),C.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),C._evalUrl=function(e,t,n){return C.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){C.globalEval(e,t,n)}})},C.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=C(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return y(e)?this.each((function(t){C(this).wrapInner(e.call(this,t))})):this.each((function(){var t=C(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(n){C(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){C(this).replaceWith(this.childNodes)})),this}}),C.expr.pseudos.hidden=function(e){return!C.expr.pseudos.visible(e)},C.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Ht={0:200,1223:204},Wt=C.ajaxSettings.xhr();v.cors=!!Wt&&"withCredentials"in Wt,v.ajax=Wt=!!Wt,C.ajaxTransport((function(e){var t,r;if(v.cors||Wt&&!e.crossDomain)return{send:function(o,i){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?i(0,"error"):i(a.status,a.statusText):i(Ht[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),C.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return C.globalEval(e),e}}}),C.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),C.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,o){t=C("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Jt,zt=[],Kt=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||C.expando+"_"+Et.guid++;return this[e]=!0,e}}),C.ajaxPrefilter("json jsonp",(function(e,t,r){var o,i,s,a=!1!==e.jsonp&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=y(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Kt,"$1"+o):!1!==e.jsonp&&(e.url+=(kt.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||C.error(o+" was not called"),s[0]},e.dataTypes[0]="json",i=n[o],n[o]=function(){s=arguments},r.always((function(){void 0===i?C(n).removeProp(o):n[o]=i,e[o]&&(e.jsonpCallback=t.jsonpCallback,zt.push(o)),s&&y(i)&&i(s[0]),s=i=void 0})),"script"})),v.createHTMLDocument=((Jt=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),C.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),i=!n&&[],(o=O.exec(e))?[t.createElement(o[1])]:(o=Se([e],t,i),i&&i.length&&C(i).remove(),C.merge([],o.childNodes)));var r,o,i},C.fn.load=function(e,t,n){var r,o,i,s=this,a=e.indexOf(" ");return a>-1&&(r=yt(e.slice(a)),e=e.slice(0,a)),y(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),s.length>0&&C.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done((function(e){i=arguments,s.html(r?C("<div>").append(C.parseHTML(e)).find(r):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,i||[e.responseText,t,e])}))}),this},C.expr.pseudos.animated=function(e){return C.grep(C.timers,(function(t){return e===t.elem})).length},C.offset={setOffset:function(e,t,n){var r,o,i,s,a,c,u=C.css(e,"position"),f=C(e),l={};"static"===u&&(e.style.position="relative"),a=f.offset(),i=C.css(e,"top"),c=C.css(e,"left"),("absolute"===u||"fixed"===u)&&(i+c).indexOf("auto")>-1?(s=(r=f.position()).top,o=r.left):(s=parseFloat(i)||0,o=parseFloat(c)||0),y(t)&&(t=t.call(e,n,C.extend({},a))),null!=t.top&&(l.top=t.top-a.top+s),null!=t.left&&(l.left=t.left-a.left+o),"using"in t?t.using.call(e,l):f.css(l)}},C.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){C.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],o={top:0,left:0};if("fixed"===C.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===C.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((o=C(e).offset()).top+=C.css(e,"borderTopWidth",!0),o.left+=C.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-C.css(r,"marginTop",!0),left:t.left-o.left-C.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===C.css(e,"position");)e=e.offsetParent;return e||ie}))}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;C.fn[e]=function(r){return H(this,(function(e,r,o){var i;if(m(e)?i=e:9===e.nodeType&&(i=e.defaultView),void 0===o)return i?i[t]:e[r];i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):e[r]=o}),e,r,arguments.length)}})),C.each(["top","left"],(function(e,t){C.cssHooks[t]=Je(v.pixelPosition,(function(e,n){if(n)return n=We(e,t),Fe.test(n)?C(e).position()[t]+"px":n}))})),C.each({Height:"height",Width:"width"},(function(e,t){C.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){C.fn[r]=function(o,i){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===i?"margin":"border");return H(this,(function(t,n,o){var i;return m(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===o?C.css(t,n,a):C.style(t,n,o,a)}),t,s?o:void 0,s)}}))})),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){C.fn[t]=function(e){return this.on(t,e)}})),C.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){C.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var Yt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;C.proxy=function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),y(e))return r=a.call(arguments,2),(o=function(){return e.apply(t||this,r.concat(a.call(arguments)))}).guid=e.guid=e.guid||C.guid++,o},C.holdReady=function(e){e?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=R,C.isFunction=y,C.isWindow=m,C.camelCase=K,C.type=S,C.now=Date.now,C.isNumeric=function(e){var t=C.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},C.trim=function(e){return null==e?"":(e+"").replace(Yt,"$1")},void 0===(r=function(){return C}.apply(t,[]))||(e.exports=r);var $t=n.jQuery,Xt=n.$;return C.noConflict=function(e){return n.$===C&&(n.$=Xt),e&&n.jQuery===C&&(n.jQuery=$t),C},void 0===o&&(n.jQuery=n.$=C),C}))},function(e,t,n){"use strict";n.r(t),n.d(t,"flooim",(function(){return Ea}));var r={};n.r(r),n.d(r,"STATIC_FRAME_VSN",(function(){return w})),n.d(r,"STATIC_FRAME_COMMAND",(function(){return _})),n.d(r,"STATIC_FRAME_COMPRESS_METHOD",(function(){return S})),n.d(r,"STATIC_FRAME_ERROR_STATUS",(function(){return C})),n.d(r,"STATIC_FRAME_OSTYPE",(function(){return E})),n.d(r,"STATIC_FRAME_ENCRYPTMETHOD",(function(){return k})),n.d(r,"STATIC_META_NAMESPACE",(function(){return x})),n.d(r,"STATIC_MESSAGE_OPTYPE",(function(){return A})),n.d(r,"STATIC_MESSAGE_TYPE",(function(){return T})),n.d(r,"STATIC_MESSAGE_CONTENT_TYPE",(function(){return R})),n.d(r,"STATIC_MESSAGE_QOS",(function(){return O})),n.d(r,"STATIC_GROUPNOTICE_TYPE",(function(){return N})),n.d(r,"STATIC_INFO_NETWORK",(function(){return I})),n.d(r,"STATIC_USERNOTICE_TYPE",(function(){return D})),n.d(r,"STATIC_ROSTERNONTICE_TYPE",(function(){return P})),n.d(r,"STATIC_CONVERSATION_TYPE",(function(){return M})),n.d(r,"STATIC_CONVERSATION_OPTYPE",(function(){return j})),n.d(r,"STATIC_RTC_SIGNAL_TYPE",(function(){return L})),n.d(r,"STATIC_MESSAGE_STATUS",(function(){return U}));var o={};n.r(o),n.d(o,"getServers",(function(){return Jt})),n.d(o,"getAppConfig",(function(){return zt})),n.d(o,"parseLink",(function(){return Kt})),n.d(o,"tokenUser",(function(){return Yt})),n.d(o,"tokenId",(function(){return $t})),n.d(o,"userRegister",(function(){return Xt})),n.d(o,"userRegisterAnonymous",(function(){return Zt})),n.d(o,"userBindMobile",(function(){return Qt})),n.d(o,"userGenerateSecretInfo",(function(){return tn})),n.d(o,"userSendSecretInfo",(function(){return nn})),n.d(o,"userSendSms",(function(){return rn})),n.d(o,"userNameCheck",(function(){return on})),n.d(o,"userMobileBind",(function(){return sn})),n.d(o,"userMobileBindSign",(function(){return an})),n.d(o,"userMobileLogin",(function(){return cn})),n.d(o,"userUpdateMobile",(function(){return en})),n.d(o,"captchaImagePost",(function(){return un})),n.d(o,"captchaSms",(function(){return fn})),n.d(o,"generateWXUrlLink",(function(){return hn})),n.d(o,"rosterAccept",(function(){return gn})),n.d(o,"rosterApply",(function(){return vn})),n.d(o,"rosterDecline",(function(){return yn})),n.d(o,"rosterDelete",(function(){return mn})),n.d(o,"rosterExt",(function(){return bn})),n.d(o,"rosterAlias",(function(){return wn})),n.d(o,"rosterId",(function(){return _n})),n.d(o,"rosterList",(function(){return Sn})),n.d(o,"rosterListPost",(function(){return Cn})),n.d(o,"rosterName",(function(){return En})),n.d(o,"rosterApplylist",(function(){return kn})),n.d(o,"rosterBlockedlist",(function(){return xn})),n.d(o,"rosterBlockedAdd",(function(){return Tn})),n.d(o,"rosterBlockeRemove",(function(){return An})),n.d(o,"groupAdminAdd",(function(){return Rn})),n.d(o,"groupAdminList",(function(){return On})),n.d(o,"groupAdminRemove",(function(){return Nn})),n.d(o,"groupAnnouncement",(function(){return In})),n.d(o,"groupAnnouncementDelete",(function(){return Pn})),n.d(o,"groupAnnouncementEdit",(function(){return Dn})),n.d(o,"groupAnnouncementList",(function(){return Mn})),n.d(o,"groupCreate",(function(){return jn})),n.d(o,"groupDestroy",(function(){return Ln})),n.d(o,"groupInfo",(function(){return Un})),n.d(o,"groupInfoAvatar",(function(){return Fn})),n.d(o,"groupInfoDdscription",(function(){return Bn})),n.d(o,"groupInfoExt",(function(){return Gn})),n.d(o,"groupInfoName",(function(){return qn})),n.d(o,"groupMemberlist",(function(){return Vn})),n.d(o,"groupMsgMutemode",(function(){return Hn})),n.d(o,"groupMsgNotdisturb",(function(){return Wn})),n.d(o,"groupPubliclist",(function(){return Jn})),n.d(o,"groupBannedList",(function(){return zn})),n.d(o,"groupBab",(function(){return Kn})),n.d(o,"groupUnban",(function(){return Yn})),n.d(o,"groupSettings",(function(){return $n})),n.d(o,"groupSettingsAllowmemberinvitation",(function(){return Xn})),n.d(o,"groupSettingsAllowmembermodify",(function(){return Zn})),n.d(o,"groupSettingsEnablereadack",(function(){return Qn})),n.d(o,"groupSettingsHistoryvisible",(function(){return er})),n.d(o,"groupSettingsHideMemberInfo",(function(){return tr})),n.d(o,"groupSettingsRequireadminapproval",(function(){return nr})),n.d(o,"groupSettingsBanAll",(function(){return rr})),n.d(o,"groupSettingsUnBanAll",(function(){return or})),n.d(o,"groupTransfer",(function(){return ir})),n.d(o,"groupUserjoined",(function(){return sr})),n.d(o,"groupApply",(function(){return ar})),n.d(o,"groupApplicationlist",(function(){return br})),n.d(o,"groupInvitationlist",(function(){return wr})),n.d(o,"groupApplyHandle",(function(){return cr})),n.d(o,"groupBockedlist",(function(){return ur})),n.d(o,"groupBlock",(function(){return fr})),n.d(o,"groupUnblock",(function(){return lr})),n.d(o,"groupKick",(function(){return dr})),n.d(o,"groupInvite",(function(){return pr})),n.d(o,"groupInviteHandle",(function(){return hr})),n.d(o,"groupInfoBatch",(function(){return gr})),n.d(o,"groupMembersDidpayname",(function(){return vr})),n.d(o,"groupLeave",(function(){return yr})),n.d(o,"groupDisplayname",(function(){return mr})),n.d(o,"groupFilelist",(function(){return _r})),n.d(o,"groupFiledelete",(function(){return Sr})),n.d(o,"groupFileupload",(function(){return Cr})),n.d(o,"userAuthmode",(function(){return Er})),n.d(o,"userAvatar",(function(){return kr})),n.d(o,"userMobile",(function(){return xr})),n.d(o,"userNickname",(function(){return Tr})),n.d(o,"userProfile",(function(){return Ar})),n.d(o,"userProfilePost",(function(){return Rr})),n.d(o,"userPush",(function(){return Or})),n.d(o,"userPushDetail",(function(){return Nr})),n.d(o,"userPushLimit",(function(){return Ir})),n.d(o,"userPushNickname",(function(){return Pr})),n.d(o,"userSettings",(function(){return Dr})),n.d(o,"userSettingsPost",(function(){return Mr})),n.d(o,"userSounds",(function(){return jr})),n.d(o,"userVibratory",(function(){return Lr})),n.d(o,"userChangePassword",(function(){return Ur})),n.d(o,"bindDeviceToken",(function(){return Fr})),n.d(o,"unbindDeviceToken",(function(){return Br})),n.d(o,"userDelete",(function(){return Gr})),n.d(o,"userDeviceList",(function(){return qr})),n.d(o,"userKick",(function(){return Vr})),n.d(o,"fileForward",(function(){return Hr})),n.d(o,"asyncFileUpload",(function(){return Wr})),n.d(o,"fileUploadAvatarUrl",(function(){return Jr})),n.d(o,"fileUploadGroupAvatarUrl",(function(){return zr})),n.d(o,"fileUploadChatFileUrl",(function(){return Kr})),n.d(o,"fileDownloadChatFileUrl",(function(){return Yr})),n.d(o,"qrcode",(function(){return $r})),n.d(o,"qrlogin",(function(){return Xr})),n.d(o,"qrcodeGroupsign",(function(){return Zr})),n.d(o,"qrcodeGroupinvite",(function(){return Qr})),n.d(o,"woaqrcode",(function(){return eo})),n.d(o,"woaqrcodestatus",(function(){return to})),n.d(o,"woaqrlogin",(function(){return no})),n.d(o,"woaIsBind",(function(){return ro})),n.d(o,"wxbind",(function(){return oo})),n.d(o,"wxlogin",(function(){return io})),n.d(o,"getStaticContact",(function(){return so})),n.d(o,"wechatUnbind",(function(){return ao})),n.d(o,"wechatIsbind",(function(){return co})),n.d(o,"wechatBind",(function(){return uo})),n.d(o,"getUserVerification",(function(){return fo})),n.d(o,"userVerificationByMobile",(function(){return lo})),n.d(o,"userChangeMobileCheckPassword",(function(){return ln})),n.d(o,"userChangeMobileCheckMobile",(function(){return dn})),n.d(o,"userChangeMobile",(function(){return pn}));n(36),n(72),n(21),n(40),n(2),n(78);var i=n(228),s=n.n(i),a=(n(41),n(84),n(85),n(22),n(46)),c=n.n(a),u=(n(54),n(55),n(292),n(1)),f="debug";var l=function(){return"".concat((e=new Date).getFullYear()+"-"+(e.getMonth()+1).toString().padStart(2,"0")+"-"+e.getDate().toString().padStart(2,"0")+" "+e.getHours().toString().padStart(2,"0")+":"+e.getMinutes().toString().padStart(2,"0")+":"+e.getSeconds().toString().padStart(2,"0")+"."+e.getMilliseconds().toString().padStart(3,"0"));var e},d={error:function(){if("debug"==f||"info"==f||"warn"==f||"error"==f){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).error.apply(e,[l(),"[error]"].concat(n))}},log:function(){if("debug"==f){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).log.apply(e,[l(),"[debug]"].concat(n))}},info:function(){if("debug"==f||"info"==f){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).info.apply(e,[l(),"[info]"].concat(n))}},warn:function(){if("debug"==f||"info"==f||"warn"==f){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).warn.apply(e,[l(),"[warn]"].concat(n))}},dir:function(){if("debug"==f){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).dir.apply(e,[l(),"[dir]"].concat(n))}},req:function(){},setLogLevel:function(e){f=e}},p=n(23),h=n.n(p),g=n(45),v=n.n(g);function y(e){return(y="function"==typeof h.a&&"symbol"==typeof v.a?function(e){return typeof e}:function(e){return e&&"function"==typeof h.a&&e.constructor===h.a&&e!==h.a.prototype?"symbol":typeof e})(e)}var m=n(16),b=n.n(m),w={XSYNC_V1:0,XSYNC_V2:1},_={UNREAD:0,SYNC:1,NOTICE:2,PROVISION:3},S={NONE:0,ZLIB:1},C={UNKNOWN:0,OK:1,FAIL:2,UNKNOWN_COMMAND:3,PB_PARSER_ERROR:4,DECRYPT_FAILURE:5,PUBLIC_KEY_CHANGED:6,INVALID_TOKEN:7,INVALID_PARAMETER:8,UNAUTHORIZED:9,USER_FROZEN:10,USER_BANNED:11,WORD_CENSORED:12,TOO_MANY_DEVICES:13,ENCRYPT_METHOD_UNSUPPORTED:14,DEVICE_GUID_CONFLICT:15,CHECK_SUM_FAILURE:16,INVALID_LICENSE:17,LICENSE_LIMIT:18,APP_FROZEN:19,RATE_LIMIT_EXCEEDED:20},E={UNKNOWN:0,IOS:1,ANDR:2,WIN:3,OSX:4,LINUX:5,WEB:6},k={ENCRYPT_NONE:0,AES_CBC_128:1,AES_CBC_256:2,CUSTOM:3},x={UNKNOWN:0,MESSAGE:1,GROUP_NOTICE:2,ROSTER_NOTICE:3,USER_NOTICE:4,INFO:5,CONVERSATION:6,PUSH:7,RTC_SIGNAL:8},T={NORMAL:0,OPER:1,CHAT:2,GROUPCHAT:3},A={UNKNOWN:0,READ_ACK:1,READ_ALL:2,READ_CANCEL:3,DELIVER_ACK:4,RECALL:5,DELETE:6,PLAY_ACK:7,APPEND:8,REPLACE:9},R={TEXT:0,IMAGE:1,AUDIO:2,VIDEO:3,FILE:4,LOCATION:5,COMMAND:6,FORWARD:7,RTC:8},O={AT_LEAST_ONCE:0,AT_MOST_ONCE:1,EXACTLY_ONCE:2},N={UNKNOWN:0,PRESENCE:1,ABSENCE:2,CREATED:3,DESTROYED:4,JOINED:5,LEAVED:6,APPLYED:7,APPLY_ACCEPTED:8,APPLY_DECLINED:9,INVITED:10,INVITE_ACCEPTED:11,INVITE_DECLINED:12,KICKED:13,BLOCKED:14,UNBLOCKED:15,OWNER_ASSIGNED:16,ADMIN_GRANTED:17,ADMIN_REVOKED:18,MUTED:19,UNMUTED:20,BANNED:21,UNBANNED:22,INFO_UPDATED:23,ANNOUNCEMENT_UPDATED:24,MESSAGE_SETTING:25,FILE_UPLOADED:26,FILE_DELETED:27,FILE_UPDATED:28},I={WIRE:0,WIFI:1,NET_2G:2,NET_3G:3,NET_4G:4,NET_5G:5,UNKNOWN:6},P={UNKNOWN:0,ADDED:1,REMOVED:2,ACCEPTED:3,DECLINED:4,BLOCKED:5,UNBLOCKED:6,APPLIED:7,INFO_UPDATED:8,MUTED:9,UNMUTED:10},D={UNKNOWN:0,PASSWORD_CHANGED:1,FROZEN:2,REMOVED:3,KICK_BY_SAME_DEVICE:4,KICKED_BY_OTHER_DEVICE:5,INFO_UPDATED:6,DEVICE_LOGIN:7,DEVICE_LOGOUT:8,DEVICE_ADDED:9,DEVICE_REMOVED:10,CLUSTER_CHANGED:11,DNS_UPDATE:12,TRAFFIC_LIMIT_EXCEEDED:13},M={UNKNOWN:0,OPER:1},j={UNKNOWN:0,DELETE:1,DELETE_EVERYWHERE:2},L={UNKNOWN:0,VIDEO_ROOM:1},U={UNREAD:0,DELIVERED:1,READ:2},F=n(91),B=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t instanceof b.a;if(n)return t.toString();if(null==t)return t;var r=t.low,o=t.high,i=t.unsigned,s=void 0===i||i;if(void 0!==r&&void 0!==o){var a=new b.a(r,o,s);return a.toString()}var c=y(t);if("boolean"===c||"string"===c||"number"===c)return t;if(Array.isArray(t)){var u=[];return t.forEach((function(t){void 0!==t&&u.push(e(t))})),u}var f={},l=Object.keys(t);return l.forEach((function(n){void 0!==t[n]&&(f[n]=e(t[n]))})),f},G=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(null==t)return t;var n=t.low,r=t.high,o=t.unsigned;if(void 0!==n&&void 0!==r){var i=new b.a(n,r,o);return i}var s=y(t);if("boolean"===s||"string"===s||"number"===s)return t;if(Array.isArray(t)){var a=[];return t.forEach((function(t){a.push(e(t))})),a}var c={},u=Object.keys(t);return u.forEach((function(n){c[n]=e(t[n])})),c},q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if("string"==typeof e)return e-0;if("number"==typeof e)return e;var t=e.low,n=e.high,r=e.unsigned,o=void 0===r||r;return void 0!==t&&"undefined"!==n?new b.a(t,n,o).toNumber():void 0},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if("string"==typeof e)return b.a.fromString(e);var t=e.low,n=e.high,r=e.unsigned,o=void 0===r||r;return void 0!==t&&"undefined"!==n?new b.a(t,n,o):"number"==typeof e?b.a.fromNumber(e):new b.a},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return void 0===e?"":"string"==typeof e?e:"number"==typeof e?e+"":void 0!==e.low&&void 0!==e.high?new b.a(e.low,e.high,!0).toString():new b.a(e).toString()},W=function(e){if(!e.payload)return e;var t=e.payload,n=e.from,r=void 0===n?{}:n,o=e.to,i=void 0===o?{}:o,s=e.id,a=void 0===s?{}:s,c=e.status,u=e.timestamp,f=t.content,l=void 0===f?"":f,d=t.attachment,p=void 0===d?"":d,h=t.ctype,g=void 0===h?0:h,v=t.ext,y=t.config,m=t.type,b=t.edit_timestamp,w=null,_=null;try{w=JSON.parse(p)}catch(e){}try{_=F.parse(y)}catch(e){}var S=c||t.status,C={id:H(a),from:H(r.uid),to:H(i.uid),content:l,type:Object.keys(R)[g]?Object.keys(R)[g].toLowerCase():void 0,ext:v,status:S||U.UNREAD,timestamp:H(u||0),toType:2==m?"roster":"group",isHistory:!1,isNative:!1,isPlayed:!1,editTimestamp:H(b||0)};return w&&(C.attach=w),_&&(C.config=_),C},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=Array.from(Array(Math.ceil(e.length/t)),(function(e){return[]}));return e.forEach((function(e,r){n[Math.floor(r/t)].push(e)})),n},z=(n(199),n(202),n(319),n(93)),K=n.n(z);var Y=n(94),$=n.n(Y);function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Z(e,t){if(e){if("string"==typeof e)return X(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?$()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(e,t):void 0}}function Q(e,t){return function(e){if(K()(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==h.a&&e[v.a]||e["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||Z(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(e){return function(e){if(K()(e))return X(e)}(e)||function(e){if(void 0!==h.a&&null!=e[v.a]||null!=e["@@iterator"])return $()(e)}(e)||Z(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n(327),n(208),n(122);function te(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ne(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var re=function(e,t){oe(e,t,1)},oe=function e(t,n,r){try{u.c.setItem(t,n)}catch(o){if(!("QuotaExceededError"===o.name&&r<=5))throw o;se(fe(t,n),r),e(t,n,r+1)}},ie=function(){for(var e=new Map,t=0;t<u.c.length;t++){var n=u.c.key(t),r=u.c.getItem(n),o=le(n);if(o.startsWith("_")){var i=fe(n,r);e.set(o,(e.get(o)||0)+i)}}var s=ee(e.entries()).sort((function(e,t){return t[1]-e[1]})),a=0;return s.forEach((function(e){var t=Q(e,2),n=(t[0],t[1]);a+=n})),d.info("localStorage 已用大小:".concat((a/1024).toFixed(2)," KB")),d.info("localStorage 各 key 类型的存储占用情况(按大小降序):"),s.forEach((function(e){var t=Q(e,2),n=t[0],r=t[1];d.info('Key 类型: "'.concat(n,'" -> 占用 ').concat((r/1024).toFixed(2)," KB , ").concat(r/a))})),s},se=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;d.info("freeSpace start | needSize=".concat((e/1024).toFixed(2)," KB, times=").concat(t));var n=Date.now(),r=ie(),o=0,i=0;if(r.forEach((function(e){var t=Q(e,2),n=(t[0],t[1]);o+=n})),o<e||o<131072)return i;var s=.5,a=Math.min(.5,.1*Math.max(1,t));o*s*a<e&&(a=Math.max(a,e/(o*s)*.5));var c,u=0,f=te(r);try{for(f.s();!(c=f.n()).done;){var l=Q(c.value,2),p=l[0],h=l[1];if(i+=ae(p,a,t),(u+=h)>o*s)break}}catch(e){f.e(e)}finally{f.f()}var g=Date.now();return d.info("freeSpace finish | totalSize=".concat((o/1024).toFixed(2)," KB , freeSize=").concat((i/1024).toFixed(2)," KB, times=").concat(t,", totalTime=").concat(g-n," ms")),i},ae=function(e,t,n){switch(d.info("freeKeySpace start | keyType=".concat(e,", ratio=").concat(t,", times=").concat(n)),e){case"_key_roster_message_store_":case"_key_group_message_store_":case"_key_recent_store":return ue(e,t,n);default:return n>=5?ce(e,t,n):0}},ce=function(e,t,n){d.info("freeAllKey start | keyType=".concat(e,", ratio=").concat(t));for(var r=0,o=0;o<u.c.length;o++){var i=u.c.key(o),s=u.c.getItem(i);if(le(i)==e){var a=fe(i,s);a<32768||(u.c.removeItem(i),r+=a)}}return r},ue=function(e,t,n){d.info("freeMessageSpace start | keyType=".concat(e,", ratio=").concat(t));for(var r=[],o=0,i=0;i<u.c.length;i++){var s=u.c.key(i),a=u.c.getItem(s);if(le(s)==e)try{var c=JSON.parse(a);for(var f in c){var l=c[f];for(var p in l){var h=l[p];h.timestamp&&r.push({timestamp:h.timestamp?Number(h.timestamp):p,key:s,sub_key:f,id:h.id,index:p})}}}catch(e){d.error(e)}}if(0==r.length)return o;var g=Math.max(1,Math.round(r.length*t)),v=r.sort((function(e,t){return e.timestamp-t.timestamp})).slice(0,g),y=new Map;v.forEach((function(e){var t=y.get(e.key)||[];t.push(e),y.set(e.key,t)}));var m,b=te(y.entries());try{for(b.s();!(m=b.n()).done;){var w=Q(m.value,2),_=w[0],S=w[1],C=u.c.getItem(_);try{!function(){var e=JSON.parse(C),t=fe(_,C),n=new Set,r=new Set;S.forEach((function(e){n.add(e.id),r.add(e.sub_key)})),r.forEach((function(t){var r=e[t];if(r){var o=r.filter((function(e){return!n.has(e.id)}));e[t]=o}}));var i=JSON.stringify(e);u.c.setItem(_,i);var s=fe(_,i);o+=t-s}()}catch(e){d.error(e)}}}catch(e){b.e(e)}finally{b.f()}return d.info("freeMessageSpace finish | keyType=".concat(e,", ratio=").concat(t,", freeSize=").concat((o/1024).toFixed(2)," KB")),o},fe=function(e,t){return 2*(e.length+t.length)},le=function(e){return e.replace(/\d+/g,"")},de=function(){var e=u.e.getItem("key_user_id");return e||(e=u.c.getItem("key_user_id"))?e-0:void 0},pe=function(e){return e%31},he=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(void 0!==t&&void 0!==e){var i,s=e;if(n){var a=de();s=a+"_"+e}if(r>=0&&(s=s+"_"+pe(r)),"string"==typeof t)return o&&u.e.setItem(s,t),void re(s,t);i=Array.isArray(t)?{data:t}:t;try{var c=JSON.stringify(i);c&&(o&&u.e.setItem(s,c),re(s,c))}catch(e){d.error("stringify error:",e,s,t)}}else d.error("localstorage save error:",e,t)},ge=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var o=e;if(t){var i=de();o=i+"_"+e}n>=0&&(o=o+"_"+pe(n));var s=null;if(r&&(s=u.e.getItem(o))||(s=u.c.getItem(o)),s){var a=s;try{a=JSON.parse(s)}catch(e){}return(a=G(a)).data||a}}else d.error("localstorage get error:",e)},ve=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=e;if(t){var i=de();o=i+"_"+e}n>=0&&(o=o+"_"+pe(n)),r&&u.e.removeItem(o),u.c.removeItem(o)},ye=function(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];for(t=0;t<31;t++)ve(e,n,t);ve(e,n)},me={saveJoinedGroups:function(e){if(e){Array.isArray(e)||(e=[e]);var t=e.map((function(e){return e.group_id||e})),n=ge("key_group_lists")||[],r=Array.from(new Set(t.concat(n)));he("key_group_lists",r)}},removeGroup:function(e){var t=ge("key_group_lists")||[],n=t.findIndex((function(t){return t===e}));n>=0&&(t.splice(n,1),he("key_group_lists",t))},getJoinedGroups:function(){return ge("key_group_lists")},saveGroupInfo:function(e){Array.isArray(e)||(e=[e]);var t=ge("key_group_infos")||{};e.forEach((function(e){var n={},r=e.group_id;Object.keys(e).forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),t[r]=t[r]||{},Object.assign(t[r],n)})),he("key_group_infos",t)},getGroupInfo:function(e){var t=ge("key_group_infos")[e]||{};return Object.assign(t,{group_id:e})},getGroupInfoList:function(){var e=me.getJoinedGroups()||[],t=me.getAllGroupInfos()||{},n=[];return e.forEach((function(e){var r=t[e]||{};n.push(Object.assign({},r,{group_id:e}))})),n},getAllGroupInfos:function(){return ge("key_group_infos")||{}},saveGroupMembers:function(e,t,n){Array.isArray(t)||(t=[t]);var r=ge("key_group_members")||{},o=r[e]||[];if(n)return r[e]=t,void he("key_group_members",r);t.forEach((function(e){o.findIndex((function(t){return t===e}))<0&&o.push(e)})),r[e]=o},removeGroupMembers:function(e,t){var n=ge("key_group_members")||{},r=n[e]||[];t.forEach((function(e){var t=r.findIndex((function(t){return t===e}));t>=0&&r.splice(t,1)})),n[e]=r,he("key_group_members",n)},getGroupMembers:function(e){return(ge("key_group_members")||{})[e]||[]},clear:function(){ve("key_group_infos"),ve("key_group_members"),ve("key_group_lists")}},be=me,we=function(){var e=ge("key_user_id",!1,-1,!0);if(e)return e-0},_e=function(){ve("key_user_id")},Se=function(){ve("key_user_token",!0,-1,!0)},Ce=function(){ve("key_user_link_server")},Ee=function(){ve("key_user_aes_key")},ke=function(){ve("key_user_device_sn")},xe=function(){ve("key_user_device_guid")},Te=function(){ve("key_user_token_app_id")},Ae={saveToken:function(e){return he("key_user_token",e,!0,-1,!0)},getToken:function(){return ge("key_user_token",!0,-1,!0)},deleteToken:Se,saveTokenAppId:function(e){return he("key_user_token_app_id",e)},getTokenAppId:function(){return ge("key_user_token_app_id")},deleteTokenAppId:Te,saveLinkServer:function(e){return he("key_user_link_server",e)},getLinkServer:function(){return ge("key_user_link_server")},deleteLinkServer:Ce,getAesKey:function(){return ge("key_user_aes_key")},saveAesKey:function(e){return he("key_user_aes_key",e)},deleteAesKey:Ee,saveDeviceSN:function(e){return he("key_user_device_sn",e)},getDeviceSN:function(){var e=ge("key_user_device_sn");return e||(e=999999999+Math.floor(214e4*Math.random())+""),e-0},deleteDeviceSN:ke,saveUid:function(e){if(!e)throw d.error("uid error:",e),new Error("uid is error ...");he("key_user_id",e+"",!1,-1,!0)},getUid:we,removeUid:_e,getDeviceGuid:function(){if(!we())return"";var e=ge("key_user_device_guid");return e||(e=we()+"_"+Math.floor(2147483648*Math.random()),he("key_user_device_guid",e)),e},deleteDeviceGuid:xe,saveProfile:function(e){return he("key_user_profile",e)},getProfile:function(){return ge("key_user_profile")},clear:function(){ke(),Ee(),Se(),_e(),xe(),Te(),Ce()},saveAppid:function(e){if(!e)throw d.error("Invalid appid :",e),new Error("Invalid appid ...");he("key_app_id",e+"",!1,-1,!0)},getAppid:function(){return ge("key_app_id",!1,-1,!0)}},Re=(n(209),{}),Oe=function(e){return void 0===Re[e]&&(Re[e]=[]),Re[e]},Ne=function(e,t){var n=Oe(e).findIndex((function(e){return e.toString()===t.toString()}));n>-1&&Oe(e).splice(n,1),Oe(e).push(t)},Ie=function(e,t){var n=Oe(e).findIndex((function(e){return e.toString()===t.toString()}));n>=0&&Re[e].splice(n,1)},Pe=function(e,t){Oe(e).forEach((function(e){e(t)}))},De=function(e){var t=e.ext,n={};try{n=JSON.parse(t)}catch(e){}if(void 0!==n.input_status){n.input_status;return!0}return!1},Me={saveRecent:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!De(e)){var n=e.from,r=e.to,o=e.type,i=e.toType,s=e.attach,a=e.config,c=e.ext,u=e.timestamp,f=e.isHistory,l=e.content;if(l||s){if("text"!=o&&"rtc"!=o&&(l=o),"rtc"!==o||a&&a.action&&"record"===a.action){var d=q(r),p=Ae.getUid();d===p&&(d=q(n));var h=!1;a&&a.mentionList&&a.mentionList.indexOf(p)>=0&&!f&&(h=!0);var g=!1,v=ge("key_recent_store")||[],y=v.findIndex((function(e){return e.type===i&&e.id===d}));if(y>-1){var m=v[y];q(u)>q(m.timestamp)?(g=!0,v.splice(y,1)):t&&(g=!0,h=!1,v.splice(y,1)),!0===m.hasAt&&(h=!0)}else g=!0;g&&(v.unshift({type:i,id:d,content:l,ext:c,timestamp:u,hasAt:h}),he("key_recent_store",v),Pe("recentlistUpdate"))}}else c&&c.typing&&Pe("onInputStatusMessage",{from:n,to:r,ext:c})}},saveUnreadRecent:function(e,t){e.forEach((function(e){var n=t,r=ge("key_recent_store")||[],o="",i="",s=!1,a={},c=r.findIndex((function(t){return t.type===n&&t.id===e}));c>-1&&(o=r[c].content,a=r[c].ext,i=r[c].timestamp,s=r[c].hasAt,r.splice(c,1)),r.unshift({type:n,id:e,content:o,ext:a,timestamp:i,hasAt:s}),he("key_recent_store",r)})),Pe("recentlistUpdate")},updateRecentsAt:function(e,t){var n=ge("key_recent_store")||[],r=n.findIndex((function(t){return t.id+""==e+""}));if(r>-1){var o=n[r];o.hasAt!==t&&(n.splice(r,1),n.unshift({type:o.type,id:o.id,content:o.content,ext:o.ext,timestamp:o.timestamp,hasAt:t}),he("key_recent_store",n),Pe("recentlistUpdate"))}},getRecents:function(){var e=ge("key_recent_store")||[],t=e.filter((function(e){return"roster"==e.type})).map((function(e){return e.id}));return Pe("imGetRecent",t),e},getRecentById:function(e){var t=ge("key_recent_store")||[],n=t.findIndex((function(t){return t.id+""==e+""}));if(n<0)return{idx:n};var r=t[n].type;return{idx:n,id:e,type:r}},deleteRecentById:function(e){var t=Me.getRecentById(e).idx;if(!(t<0)){var n=ge("key_recent_store")||[];n.splice(t,1),he("key_recent_store",n)}},clear:function(){ve("key_recent_store")}},je=Me,Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.uid=e.uid||0;var t=void 0===e.deviceSN?Ae.getDeviceSN():e.deviceSN;this.deviceSN=t};Le.prototype.setUid=function(e){this.uid=e},Le.prototype.setDeviceSN=function(e){this.deviceSN=e};var Ue=Le;function Fe(e){var t=e.operation,n=void 0===t?{type:A.UNKNOWN,mid:0}:t;void 0!==(e=Object.assign({},{type:T.NORMAL,ctype:R.TEXT,content:"",operation:n},e)).type&&(this.type=e.type),void 0!==e.from&&(this.from=e.from),void 0!==e.to&&(this.to=e.to),void 0!==e.content&&(this.content=e.content),void 0!==e.ctype&&(this.ctype=e.ctype),void 0!==e.operation&&(this.operation=e.operation),void 0!==e.config&&(this.config=e.config),void 0!==e.attachment&&(this.attachment=e.attachment),void 0!==e.ext&&(this.ext=e.ext),void 0!==e.qos&&(this.qos=e.qos),void 0!==e.sender_name&&(this.sender_name=e.sender_name),void 0!==e.is_system&&(this.is_system=e.is_system),void 0!==e.priority&&(this.priority=e.priority),void 0!==e.status&&(this.status=e.status),void 0!==e.edit_timestamp&&(this.edit_timestamp=e.edit_timestamp)}Fe.prototype={setType:function(e){this.type=e},setFrom:function(e){this.from=e},setTo:function(e){this.to=e},setContent:function(e){this.content=e},setCtype:function(e){this.ctype=e},setOperation:function(e){this.operation=e},setConfig:function(e){this.config=e},setAttachment:function(e){this.attachment=e},setExt:function(e){this.ext=e},setQos:function(e){this.qos=e},setSendername:function(e){this.sender_name=e},setIssystem:function(e){this.is_system=e},setPriority:function(e){this.priority=e},setStatus:function(e){this.status=e},setEditTimestamp:function(e){this.edit_timestamp=e}};var Be=Fe;function Ge(e){void 0!==(e=Object.assign({},{vsn:w.XSYNC_V1,compress_method:S.NONE},e)).vsn&&(this.vsn=e.vsn),void 0!==e.compress_method&&(this.compress_method=e.compress_method),void 0!==e.command&&(this.command=e.command),void 0!==e.payload&&(this.payload=e.payload),void 0!==e.encrypt_method&&(this.encrypt_method=e.encrypt_method),void 0!==e.encrypt_key&&(this.encrypt_key=e.encrypt_key),void 0!==e.check_sum&&(this.check_sum=e.check_sum),void 0!==e.tag&&(this.tag=e.tag)}Ge.prototype={setVsn:function(e){this.vsn=e},setCompressmethod:function(e){this.compress_method=e},setCommond:function(e){this.command=e},setPayload:function(e){this.payload=e},setEncryptmethod:function(e){this.encrypt_method=e},setEncryptkey:function(e){this.encrypt_key=e},setChecksum:function(e){this.check_sum=e},setTag:function(e){this.tag=e}};var qe=Ge;function Ve(e){void 0!==(e=Object.assign({},{encrypt_method:k.ENCRYPT_NONE,os_type:E.WEB},e)).status&&(this.status=e.status),void 0!==e.xid&&(this.xid=e.xid),void 0!==e.encrypt_method&&(this.encrypt_method=e.encrypt_method),void 0!==e.encrypt_key&&(this.encrypt_key=e.encrypt_key),void 0!==e.password&&(this.password=e.password),void 0!==e.token&&(this.token=e.token),void 0!==e.os_type&&(this.os_type=e.os_type),void 0!==e.sdk_vsn&&(this.sdk_vsn=e.sdk_vsn),void 0!==e.is_manual_login&&(this.is_manual_login=e.is_manual_login),void 0!==e.device_guid&&(this.device_guid=e.device_guid),void 0!==e.device_notifier&&(this.device_notifier=e.device_notifier),void 0!==e.device_token&&(this.device_token=e.device_token),void 0!==e.device_info&&(this.device_info=e.device_info),void 0!==e.last_login_time&&(this.last_login_time=e.last_login_time)}Ve.prototype={setStatus:function(e){this.status=e},setXid:function(e){this.xid=e},setEncryptmethod:function(e){this.encrypt_method=e},setEncryptkey:function(e){this.encrypt_key=e},setPassword:function(e){this.password=e},setToken:function(e){this.token=e},setOstype:function(e){this.os_type=e},setSdkvsn:function(e){this.sdk_vsn=e},setIsmanuallogin:function(e){this.is_manual_login=e},setDeviceguid:function(e){this.device_guid=e},setDevicenotifier:function(e){this.device_notifier=e},setDevicetoken:function(e){this.device_token=e},setDeviceinfo:function(e){this.device_info=e},setLastlogintime:function(e){this.last_login_time=e}};var He=Ve;function We(e){void 0!==(e=Object.assign({},e)).status&&(this.status=e.status),void 0!==e.metas&&(this.metas=e.metas),void 0!==e.next_key&&(this.next_key=e.next_key),void 0!==e.xid&&(this.xid=e.xid),void 0!==e.client_mid&&(this.client_mid=e.client_mid),void 0!==e.server_mid&&(this.server_mid=e.server_mid),void 0!==e.server_time&&(this.server_time=e.server_time),void 0!==e.is_full_sync&&(this.is_full_sync=e.is_full_sync),void 0!==e.prev_mid&&(this.prev_mid=e.prev_mid),void 0!==e.is_eager_sync&&(this.is_eager_sync=e.is_eager_sync),void 0!==e.edit_timestamp&&(this.edit_timestamp=e.edit_timestamp)}We.prototype={setStatus:function(e){this.status=e},setMetas:function(e){this.metas=e},setNextkey:function(e){this.next_key=e},setXid:function(e){this.xid=e},setClientmid:function(e){this.client_mid=e},setServermid:function(e){this.server_mid=e},setServertime:function(e){this.server_time=e},setIsfullsync:function(e){this.is_full_sync=e},setPrevmid:function(e){this.prev_mid=e},setIseagersync:function(e){this.is_eager_sync=e},setEditTimestamp:function(e){this.edit_timestamp=e}};function Je(e){void 0!==(e=Object.assign({},e)).xid&&(this.xid=e.xid),void 0!==e.key&&(this.key=e.key),void 0!==e.meta&&(this.meta=e.meta),void 0!==e.is_full_sync&&(this.is_full_sync=e.is_full_sync),void 0!==e.full_sync_num&&(this.full_sync_num=e.full_sync_num)}Je.prototype={setXid:function(e){this.xid=e},setKey:function(e){this.key=e},setMeta:function(e){this.meta=e},setIsfullsync:function(e){this.is_full_sync=e},setFullsyncnum:function(e){this.full_sync_num=e}};var ze=Je;function Ke(e){void 0!==(e=Object.assign({},e)).id&&(this.id=e.id),void 0!==e.from&&(this.from=e.from),void 0!==e.to&&(this.to=e.to),void 0!==e.timestamp&&(this.timestamp=e.timestamp),void 0!==e.ns&&(this.ns=e.ns),void 0!==e.payload&&(this.payload=e.payload)}Ke.prototype={setId:function(e){this.id=e},setFrom:function(e){this.from=e},setTo:function(e){this.to=e},setTimestamp:function(e){this.timestamp=e},setNs:function(e){this.ns=e},setPayload:function(e){this.payload=e}};var Ye=Ke;function $e(e){void 0!==e.type&&(this.type=e.type),void 0!==e.operation&&(this.operation=e.operation)}$e.prototype={setType:function(e){this.type=e},setOperation:function(e){this.operation=e}};var Xe=$e;function Ze(e){void 0!==(e=Object.assign({},{type:L.VIDEO_ROOM,content:""},e)).type&&(this.type=e.type),void 0!==e.content&&(this.content=e.content),void 0!==e.media_server&&(this.media_server=e.media_server)}Ze.prototype={setType:function(e){this.type=e},setContent:function(e){this.content=e},setMediaServer:function(e){this.media_server=e}};var Qe=Ze,et=0,tt=Ae.getDeviceSN(),nt=Ae.getDeviceGuid();Ne("userKicked",(function(){d.log("user is kicked ... will new devicesn and guid, old Guid",nt),tt=0,nt=999999999+Math.floor(214e4*Math.random())+"",d.log("new Guid",nt)})),Ne("temporary_deviceSN",(function(e){tt=e}));var rt=function(e){var t=new qe;t.setCommond(_.SYNC);var n=new ze;return e.xid&&n.setXid(e.xid),e.next_key&&n.setKey(e.next_key),t.setPayload(n),t},ot=function(e){var t=e.gid,n=e.content,r=e.type,o=void 0===r?"text":r,i=e.attachment,s=e.ext,a=e.priority,c=Object.keys(R).indexOf(o.toUpperCase()),u=new Ue({uid:Ae.getUid()-0,deviceSN:tt}),f=new Ue({uid:t,deviceSN:0}),l=new qe;l.setCommond(_.SYNC);var d=new ze,p=new Be({from:u,to:f,content:n,ctype:c,type:T.GROUPCHAT,ext:s});a>0&&(p.priority=a),c>0&&i&&(p.attachment=JSON.stringify(i));var h=be.getGroupInfo(t);if(h&&!0===h.read_ack){var g=be.getGroupMembers(t)||[],v=Ae.getUid(),y=g.filter((function(e){return e.user_id!==v})).map((function(e){return e.user_id}));p.config=JSON.stringify({groupMemberList:y})}var m=new Ye({id:(new Date).getTime(),from:u,to:f,payload:p,ns:x.MESSAGE,timestamp:(new Date).getTime()});return d.setMeta(m),l.setPayload(d),l},it=function(e){var t=e.uid,n=e.content,r=e.type,o=void 0===r?"text":r,i=e.ext,s=e.config,a=e.attachment;Pe("imSendRosterSignal",e);var c=Object.keys(R).indexOf(o.toUpperCase()),u=new Ue({uid:Ae.getUid()-0,deviceSN:tt}),f=new Ue({uid:t-0,deviceSN:0}),l=new qe;l.setCommond(_.SYNC);var d=new ze,p=new Be({from:u,to:f,content:n,ctype:c,type:T.CHAT,ext:i,config:s});c>0&&a&&(p.attachment=JSON.stringify(a));var h=new Ye({id:(new Date).getTime(),from:u,to:f,payload:p,ns:x.MESSAGE,timestamp:(new Date).getTime()});return d.setMeta(h),l.setPayload(d),l},st=function(e,t){t=V(t);var n=new qe;n.setCommond(_.SYNC);var r=new Ue({uid:Ae.getUid(),deviceSN:tt}),o=new Ue({uid:q(e),deviceSN:0}),i=new ze,s=new Be({from:r,to:o,ctype:R.COMMAND,type:T.OPER,operation:{type:A.READ_ACK,mid:t}}),a=new Ye({id:(new Date).getTime()+Math.floor(256*Math.random()),from:r,to:o,payload:s,ns:x.MESSAGE});return i.setMeta(a),n.setPayload(i),n},at=function(e,t){t=V(t);var n=new qe;n.setCommond(_.SYNC);var r=new Ue({uid:Ae.getUid(),deviceSN:tt}),o=new Ue({uid:q(e),deviceSN:0}),i=new ze,s=new Be({ctype:R.COMMAND,type:T.OPER,operation:{type:A.RECALL,mid:t,xid:o}}),a=new Ye({id:parseInt((new Date).getTime()+""+Math.floor(256*Math.random())),from:r,to:o,payload:s,ns:x.MESSAGE});return i.setMeta(a),n.setPayload(i),n},ct=function(e,t){t=V(t);var n=new qe;n.setCommond(_.SYNC);var r=new Ue({uid:Ae.getUid(),deviceSN:tt}),o=new Ue({uid:q(e),deviceSN:0}),i=new ze,s=new Be({ctype:R.COMMAND,type:T.OPER,operation:{type:A.DELETE,mid:t,xid:o}}),a=new Ye({id:parseInt((new Date).getTime()+""+Math.floor(256*Math.random())),from:r,to:r,payload:s,ns:x.MESSAGE});return i.setMeta(a),n.setPayload(i),n},ut=function(e,t){var n=new qe;n.setCommond(_.SYNC);var r=new Ue({uid:Ae.getUid(),deviceSN:tt}),o=new Ue({uid:q(e),deviceSN:0}),i=new ze,s=new Be({from:r,to:r,ctype:R.COMMAND,type:T.OPER,operation:{type:A.READ_ALL,xid:o,mid:t}}),a=new Ye({id:parseInt((new Date).getTime()+""+Math.floor(256*Math.random())),from:r,to:r,payload:s,ns:x.MESSAGE});return i.setMeta(a),n.setPayload(i),n},ft=function(e,t,n){var r=new Ue({uid:Ae.getUid()-0,deviceSN:tt}),o=new Ue({uid:q(e),deviceSN:0}),i=new qe;i.setCommond(_.SYNC);var s=new ze,a=new Be({from:r,to:o,content:n,type:T.OPER,operation:{type:A.APPEND,mid:V(t)}}),c=new Ye({id:parseInt((new Date).getTime()+""+Math.floor(256*Math.random())),from:r,to:o,payload:a,ns:x.MESSAGE});return s.setMeta(c),i.setPayload(s),i},lt=function(e,t,n,r,o){var i=new Ue({uid:Ae.getUid()-0,deviceSN:tt}),s=new Ue({uid:q(e),deviceSN:0}),a=new qe;a.setCommond(_.SYNC);var c=new ze,u=new Be({from:i,to:s,content:n,config:JSON.stringify(r),ext:JSON.stringify(o),type:T.OPER,operation:{type:A.REPLACE,mid:V(t)}}),f=new Ye({id:parseInt((new Date).getTime()+""+Math.floor(256*Math.random())),from:i,to:s,payload:u,ns:x.MESSAGE});return c.setMeta(f),a.setPayload(c),a},dt=function(e,t,n){var r=n.content,o=n.attach,i=n.type;return e?it({uid:e,content:r,type:i,attachment:o}):ot({gid:t,content:r,type:i,attachment:o})},pt=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=j.DELETE;t&&(n=j.DELETE_EVERYWHERE);var r=new Ue({uid:Ae.getUid()-0,deviceSN:tt}),o=new Ue({uid:e}),i=new Xe({type:M.OPER,operation:{xid:o,type:n}}),s=new Ye({id:(new Date).getTime(),from:r,payload:i,ns:x.CONVERSATION}),a=new ze;a.setMeta(s);var c=new qe;return c.setCommond(_.SYNC),c.setPayload(a),c},ht=function(e){e.type="rtc";var t=it(e);return t.payload.meta.ns=x.MESSAGE,t},gt=function(e){var t=e.payload;if(!t)return!1;var n=t.type,r=t.operation,o=void 0===r?{}:r;if(!o||n!==T.OPER)return!1;var i=o.type;return i===A.READ_ACK||i==A.READ_ALL},vt=function(e,t){var n=V(t.id);if(0===e.length)e.push(t);else{var r=e[0],o=e[e.length-1];if(-1===n.comp(V(r.id)))e.unshift(t);else if(1===n.comp(V(o.id)))e.push(t);else{for(var i=0,s=0;i<e.length;){var a=e[i],c=n.comp(V(a.id));if(0===c&&(s=1),1!==c)break;i++}e.splice(i,s,t)}}return e},yt=function(e){var t=parseInt(e)/1e3,n=parseInt(t/3600/24),r=parseInt((t-24*n*3600)/3600),o=parseInt((t-24*n*3600-3600*r)/60),i=parseInt(t-24*n*3600-3600*r-60*o);return(r>0?r.toString():"00")+":"+(o>=10?o.toString():o>0?"0"+o.toString():"00")+":"+(i>=10?i.toString():i>0?"0"+i.toString():"00")},mt={saveRosterRTCContentHandleMessage:function(e){var t=e.config;t&&t.action&&"record"===t.action&&(e.content=function(e,t,n){var r="",o=!1;if(Ae.getUid()==q(e)&&(o=!0),n&&"record"===n.action)switch(t){case"busy":r=o?"对方忙":"忙线未接听";break;case"timeout":r=o?"对方未应答":"未应答";break;case"canceled":r=o?"通话已取消":"通话已被对方取消";break;case"rejected":r=o?"通话已被对方拒绝":"通话已拒绝";break;default:r=n.peerDrop?"通话中断 "+yt(t):"通话时长 "+yt(t)}else r=t;return r}(q(e.from),e.content,t))},saveSendingRosterMessage:function(e){var t=ge("key_roster_sending_message")||[];t.push(e);var n=t.length;n>100&&t.splice(0,n-100),he("key_roster_sending_message",t);var r=e.to,o=e.id;Pe("onSendingMessageStatusChanged",{status:"sending",uid:r.uid,mid:o,message:W(e)})},dealSendedRosterRTCMessage:function(e){var t=e.config,n=Ae.getUid();if(t&&t.action)if("call"===t.action&&t.initiator==n)he("key_rtc_in_call",!0);else if("pickup"===t.action&&t.initiator!=n)he("key_rtc_in_call",!0);else if("hangup"===t.action){if(t.callId&&(t.initiator==n||t.peerDrop)){var r=ht({uid:e.to,content:e.content,config:JSON.stringify({action:"record",callId:t.callId,initiator:t.initiator,peerDrop:t.peerDrop,pushMessageLocKey:t.pushMessageLocKey,pushMessageLocArgs:t.pushMessageLocArgs})}),o=r.payload.meta;mt.saveSendingRosterMessage(o),Pe("sendMessage",r),he("key_rtc_in_call",!1)}}else"record"===t.action&&t.initiator!=n&&(e.to=e.from,e.from=t.initiator)},dealSendedRosterMessage:function(e){var t=e.client_mid,n=e.server_mid,r=ge("key_roster_sending_message")||[];if(n){var o=r.findIndex((function(e){return q(e.id)===q(t)}));if(o>-1){var i=r[o];i.id=n;var s=W(i);s.status=U.UNREAD,"rtc"===s.type&&mt.saveRosterRTCContentHandleMessage(s),mt.saveRosterMessage(s),s.toType="roster",je.saveRecent(s),r.splice(o,1),he("key_roster_sending_message",r),"rtc"===s.type&&(mt.dealSendedRosterRTCMessage(s),s.isNative=!0,mt.saveRosterMessage(s),je.saveRecent(s),Pe("onRosterRTCMessage",s)),Pe("onRosterMessage",s),gt(s)||Pe("onSendingMessageStatusChanged",{status:"sent",mid:q(t),message:s})}}else{d.log("failed to send message due to: ",e.status.reason);var a=r.findIndex((function(e){return q(e.id)===q(t)}));a>-1&&(ge("key_roster_sending_message")||[]).splice(a,1)}},saveRosterMessage:function(e){var t=e.from,n=e.to,r=e.type;if("command"!=r&&"forward"!=r){var o=q(t),i=q(Ae.getUid()),s=q(n),a=o===i?s:o,c=ge("key_roster_message_store",!0,a)||{},u=c[a]||[];vt(u,e),u.length>100?c[a]=u.slice(u.length-100):c[a]=u,he("key_roster_message_store",c,!0,a)}},saveInCallStatus:function(e){he("key_rtc_in_call",e)},getInCallStatus:function(){return ge("key_rtc_in_call")||!1},getRosterMessage:function(e){return(ge("key_roster_message_store",!0,e)||{})[e]||[]},saveFormatedRosterMessage:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=ge("key_roster_message_store",!0,e)||{};n[e]=t,he("key_roster_message_store",n,!0,e)},getRosterUnreadMessageIdsByRosterid:function(e){var t=(ge("key_roster_message_store",!0,e)||{})[e]||[],n=[];return t.forEach((function(e){var t=e.status,r=void 0===t?U.READ:t,o=e.id;r==U.UNREAD&&n.push(o)})),n},deleteRosterMessageByRosterId:function(e){var t=ge("key_roster_message_store",!0,e)||{};t[e]&&delete t[e],he("key_roster_message_store",t,!0,e)},deleteSingleRosterMessage:function(e,t){var n=ge("key_roster_message_store",!0,e)||{},r=H(t),o=n[e]||[],i=o.findIndex((function(e){return H(e.id)===r}));i>-1&&(o.splice(i,1),n[e]=o,he("key_roster_message_store",n,!0,e))},saveSendingGroupMessage:function(e){var t=ge("key_group_sending_message")||[];t.push(e);var n=t.length;n>100&&t.splice(0,n-100),he("key_group_sending_message",t);var r=e.to,o=e.id;Pe("onSendingMessageStatusChanged",{status:"sending",uid:r.uid,mid:o,message:W(e)})},dealSendedGroupMessage:function(e){var t=e.client_mid,n=e.server_mid,r=ge("key_group_sending_message")||[],o=r.findIndex((function(e){return q(e.id)===q(t)}));if(o>-1){var i=r[o];i.id=n;var s=W(i);s.status=U.UNREAD,mt.saveGroupMessage(s),s.toType="group",je.saveRecent(s),r.splice(o,1),he("key_group_sending_message",r),Pe("onGroupMessage",s),gt(s)||Pe("onSendingMessageStatusChanged",{status:"sent",mid:q(t),message:s})}},saveGroupMessage:function(e){var t=e.to,n=e.type;if("command"!=n&&"forward"!=n){var r=q(t),o=ge("key_group_message_store",!0,r)||{},i=o[r]||[];vt(i,e),i.length>100?o[r]=i.slice(i.length-100):o[r]=i,he("key_group_message_store",o,!0,r)}},getGroupMessage:function(e){return(ge("key_group_message_store",!0,e)||{})[e]||[]},saveFormatedGroupMessage:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=ge("key_group_message_store",!0,e)||{};n[e]=t,he("key_group_message_store",n,!0,e)},getGroupUnreadMessageIdsByGid:function(e){var t=(ge("key_group_message_store",!0,e)||{})[e]||[],n=[];return t.forEach((function(e){var t=e.r,r=void 0!==t&&t,o=e.id;!r&&n.push(o)})),n},deleteGroupMessageByGid:function(e){var t=ge("key_group_message_store",!0,e)||{};t[e]&&delete t[e],he("key_group_message_store",t,!0,e)},deleteSingleGroupMessage:function(e,t){var n=ge("key_group_message_store",!0,e)||{};t=H(t);var r=n[e]||[],o=r.findIndex((function(e){return H(e.id)===t}));o>-1&&(r.splice(o,1),n[e]=r,he("key_group_message_store",n,!0,e))},getUnreadByRosterId:function(e){var t=mt.getRosterMessage(e)||[],n=0,r=Ae.getUid();return t.forEach((function(e){var t=e.from,o=e.status,i=e.type,s=e.config,a=e.ext,c=q(t);if(c>0&&c!==r&&o!==U.READ&&(n++,"rtc"===i&&s&&s.action&&"record"!==s.action&&n--,a)){var u={};try{u=JSON.parse(a)}catch(e){}"rtc"==i&&u&&u.callId&&n--}})),n},getUnreadByGroupId:function(e){var t=mt.getGroupMessage(e)||[],n=0,r=Ae.getUid();return t.forEach((function(e){var t=e.from,o=e.status,i=q(t);i>0&&i!==r&&o!==U.READ&&n++})),n},getRosterMessageById:function(e,t){var n=H(t),r=ge("key_roster_message_store",!0,e)||{};for(var o in r){var i=r[o];if(i&&i.length){var s=i.find((function(e){return e.id==n}));if(s)return s}}},getGroupMessageById:function(e,t){var n=H(t),r=ge("key_group_message_store",!0,e)||{};for(var o in r){var i=r[o];if(i&&i.length){var s=i.find((function(e){return e.id==n}));if(s)return s}}},clear:function(e,t){"group"==t?mt.deleteGroupMessageByGid(e):mt.deleteRosterMessageByRosterId(e)},clearAll:function(){ye("key_roster_message_store"),ye("key_group_message_store"),ve("key_group_sending_message"),ve("key_roster_sending_message"),ve("key_rtc_in_call")}},bt=mt,wt={saveNotice:function(){},getNotice:function(){return ge("key_notice_store")||[]},removeNotice:function(){}},_t={saveRosterList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(e)||(e=[e]);var t,n=e.map((function(e){return e.roster_user_id||e.user_id||e})),r=_t.getRosterList()||[];t=Array.isArray(r)?Array.from(new Set(r.concat(n))):n,he("key_roster_lists",t),_t.saveRosterInfo(e)},getRosterList:function(){return ge("key_roster_lists")},getRosterInfoList:function(){var e=_t.getRosterList()||[],t=_t.getAllRosterInfos()||{},n=[];return e.forEach((function(e){var r=t[e]||{};n.push(Object.assign({},r,{user_id:e}))})),n},removeRoster:function(e){var t=_t.getRosterList(),n=t.indexOf(e);n>=0&&t.splice(n,1),he("key_roster_lists",t)},removeRosterList:function(){return ve("key_roster_lists")},saveRosterInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(e)||(e=[e]);var t=_t.getAllRosterInfos()||{};e.forEach((function(e){var n=e.user_id,r={};Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)})),n&&(t[n]=t[n]||{},Object.assign(t[n],r))})),he("key_roster_infos",t)},getRosterInfo:function(e){var t=(ge("key_roster_infos")||{})[e]||{user_id:e};return t&&Object.assign(t,{user_id:e})},getAllRosterInfos:function(){return ge("key_roster_infos")},clear:function(){ve("key_roster_infos"),ve("key_roster_lists")}},St=_t,Ct=n(95),Et=n.n(Ct),kt={errTimer:null,errCount:0};Ne("refresh_ratel",(function(e){e&&(c.a.defaults.baseURL=e)}));var xt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return t.forEach((function(t){if("string"==typeof t&&void 0===e[t]&&n.push(t+" can not be null.."),Array.isArray(t)){var r=!1;t.forEach((function(t){void 0!==e[t]&&(r=!0)})),r||n.push(t.join("、")+" can not be all null")}})),n},Tt=["app_dns","info","app/captcha/image","app/captcha/sms","app/captcha/sms_web","app/user/info_pwd","app/wechat_login","mobile_bind_with_sign","qr_code","qr_login","token/id","token/user","user/register","/app/secret_info","/app/config"];c.a.defaults.timeout=2e4,c.a.interceptors.request.use((function(e){var t,n,r=Ae.getToken(),o=Ae.getAppid();if(o&&(e.headers.common.app_id=o),r&&(e.headers.common["access-token"]=r),t=e.url,n=!0,Tt.forEach((function(e){t.indexOf(e)>-1&&(n=!1)})),n&&!r)throw new Error("you should login ...");return e}),(function(e){return Promise.reject(e)}));var At=function(e){return e.group_id&&(e.group_id=e.group_id-0),e.user_id&&(e.user_id=e.user_id-0),e.new_owner&&(e.new_owner=e.new_owner-0),e.apply_approval&&(e.apply_approval=e.apply_approval-0),e.duration&&(e.duration=e.duration-0),e.limit&&(e.limit=e.limit-0),e.version&&(e.version=e.version-0),e.announcement_id&&(e.announcement_id=e.announcement_id-0),e.user_list&&Array.isArray(e.user_list)&&(e.user_list=e.user_list.map((function(e){return e-0}))),e.user_list&&Array.isArray(e.user_list)&&(e.user_list=e.user_list.map((function(e){return e-0}))),e.file_list&&Array.isArray(e.file_list)&&(e.file_list=e.file_list.map((function(e){return e-0}))),e},Rt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"get",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0;d.log("========request=============",e,t,n,r,o);var a=xt(n,r);if(a.length){var u=a.join(",");return Promise.reject(new Error(u))}var f={},l=t.toLowerCase();return"get"===l||"post"===l&&o?(e.indexOf("?")>0?e+="&":e+="?",e+=Et.a.stringify(n)):f=At(n),s&&(o?c.a.defaults.onDownloadProgress=function(e){e.lengthComputable&&s(e)}:c.a.defaults.onUploadProgress=function(e){e.lengthComputable&&s(e)}),c.a[l](e,f,i).then((function(t){Ot();var n=t.data,r=void 0===n?{}:n;if(0!==Object.keys(i).length){if("boolean"==typeof r.data&&r.data)return;if("string"==typeof r.Status&&"OK"===r.Status)return;return Promise.reject({config:i,url:e})}var o=r.data,s=r.code,a=r.message;return 200===s?(d.log("======request success, ",e,o),o):(402===s&&Pe("flooNotice",{category:"action",desc:"relogin"}),d.req(e+""==""+a),Promise.reject({url:e,code:s,message:a}))})).catch((function(e){return Nt(),Promise.reject(e)}))};function Ot(){kt.errTimer&&clearTimeout(kt.errTimer),kt.errTimer=null,kt.errCount=0}function Nt(){kt.errTimer&&clearTimeout(kt.errTimer),kt.errTimer=null,kt.errCount=kt.errCount+1,kt.errCount>=5?(kt.errCount=0,Pe("ratelError")):kt.errTimer=setTimeout((function(){kt.errCount=0}),18e5)}var It=function(e,t){return t&&e?e+"_"+t:""},Pt=function(e){if(!e)return{};var t=Lt("ws"),n=Mt(e),r=n.clusters,o=n.clusterIndex,i=n.ratelIndex,s=n.fireIndex,a=n.rtcIndex;if(!r||!r.length)return{};var c,u=r[o],f=u.ratel[i];c=u.webim?u.webim[s]:u.ws[s];var l=u.rtc[a];if(!f||!c||!l)return{};var d=f.protocol+"://"+f.host,p="https",h="https";return t?(p="https"===c.protocol?"wss":"ws",h="https"===l.protocol?"wss":"ws"):(p=c.protocol,h="https"===l.protocol?"wss":"ws"),{ratel:d,fireplace:p+"://"+c.host,rtc:h+"://"+l.host}};Ne("ratelError",(function(){d.log("Ratel error, should try next in list");var e=Lt("app_id");!function(e){var t=Mt(e),n=t.clusters,r=t.clusterIndex,o=t.ratelIndex,i=t.fireIndex,s=t.rtcIndex;n[r].ratel.length>o+1?(o++,jt(e,{clusters:n,clusterIndex:r,ratelIndex:o,fireIndex:i,rtcIndex:s})):Dt(e)}(e);var t=(Pt(e)||{}).ratel;Pe("refresh_ratel",t)}));Ne("fireplaceError",(function(){var e=Lt("app_id");d.log("Fireplace error, should try next in list, appid: ",e),function(e){var t=Mt(e),n=t.clusters,r=t.clusterIndex,o=t.ratelIndex,i=t.fireIndex,s=t.rtcIndex,a=n[r];(a.webim?a.webim:a.ws).length>i+1?(i++,jt(e,{clusters:n,clusterIndex:r,ratelIndex:o,fireIndex:i,rtcIndex:s})):Dt(e)}(e);var t=(Pt(e)||{}).fireplace;Pe("refresh_fireplace",t)}));var Dt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=Mt(e),r=n.clusters,o=n.clusterIndex;if(t>0){if(o==t)return;o=t-1}for(;r.length>o+1;){var i=r[++o];if((i.webim?i.webim:i.ws).length>=0)return void jt(e,{clusters:r,clusterIndex:o,ratelIndex:0,fireIndex:0,rtcIndex:0})}-1==t&&Pe("retrieve_dns")},Mt=function(e){return ge(It("key_dns_infos",e),!1,-1,!0)||{}},jt=function(e,t){he(It("key_dns_infos",e),t,!1,-1,!0)},Lt=function(e){return e?ge(It("key_dns_config",e),!1,-1,!0):""},Ut=function(e,t){e&&t&&he(It("key_dns_config",e),t,!1,-1,!0)},Ft=function(e){he("dns_server_list",e,!1,-1,!1)},Bt=function(e){he("link_server_list",e,!1,-1,!1)};Ne("retrieve_dns",(function(){var e=Lt("dns_servers"),t=Lt("app_id"),n=Lt("ws"),r=Lt("source"),o=Lt("path");d.warn("Retrieve DNS for appid: ",t),Gt(e,t,n,r,o)}));var Gt=function(e,t,n,r,o){Ut("dns_servers",e),Ut("app_id",t),Ut("ws",n),Ut("source",r),Ut("path",o);var i=Pt(t),s=function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/api/health",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e4;if(!Array.isArray(e)||0===e.length)return Promise.reject(new Error("endpoints 不能为空"));if(1===e.length)return Promise.resolve(e[0]);var o=!1,i=[],s=function(e,t){return new Promise((function(n,r){var o=new AbortController;i.push(o);var s=setTimeout((function(){o.abort(),r(new Error("Timeout"))}),t);fetch(e,{signal:o.signal}).then((function(e){clearTimeout(s),n(e)})).catch((function(e){clearTimeout(s),r(e)}))}))};return new Promise((function(a,c){var u=0,f=e.length,l=0;!function p(){if(!(o||u>=f)){var h=u,g=e[h].replace(/\/+$/,"")+t,v=e[h];u++;var y=Date.now();d.info("SpeedTest start ".concat(v)),s(g,r).then((function(e){if(!o&&200===e.status){o=!0;var t=Date.now()-y;d.info("SpeedTest success ".concat(v," in ").concat(t," ms")),i.forEach((function(e){return e.abort()})),a(v)}})).catch((function(){})).finally((function(){l++,o||l!==f||c(new Error("NoAvailableEndpoint"))})),!o&&u<f&&setTimeout((function(){p()}),n)}}()}))}(e,"/api/health",1e3,1e4)},a=function(e){return Jt(e+o,{app_id:t,source:r}).then((function(e){return d.info("DNS SUCCESS: ",e),function(e,t){if(!e)return{};var n=t.version,r=t.dns_list,o=t.app_status,i=void 0===o?"":o,s=t.account_verification,a=void 0===s?{}:s,c=t.dns_server_list,u=void 0===c?[]:c,f=t.link_server_list,l=void 0===f?[]:f,p=r.findIndex((function(e){return 0==e.group_level}));if(p<0)return d.error("DNS ERROR: no available clusters (version:",n,")"),jt(e,{clusters:[],clusterIndex:0,ratelIndex:0,fireIndex:0,rtcIndex:0,app_status:i,account_verification:a}),{};Ft(u),Bt(l);var h={clusters:r[p].clusters,clusterIndex:0,ratelIndex:0,fireIndex:0,rtcIndex:0,app_status:i,account_verification:a};jt(e,h)}(t,e),Vt(t).then((function(){zt({platform:6}).then((function(e){d.info("APP CONFIG SUCCESS: ",e),function(e,t){if(!e)return{};he(It("key_app_config",e),t,!1,-1,!0)}(t,e)}))})),Pt(t)}))};return i.ratel?(s().then((function(e){return a(e)})),Promise.resolve(i)):s().then((function(e){return a(e)}))},qt=function(e){return new Promise((function(t){return setTimeout(t,e)}))},Vt=function(e){var t=Mt(e),n=t.clusters,r=t.clusterIndex,o=n.map((function(e,t){return function(e,t){var n=Date.now();return fetch(e).then((function(){var r=Date.now()-n;return d.info("SpeedTest ".concat(e," took ").concat(r," ms")),{url:e,timeTaken:r,index:t}})).catch((function(n){return d.info("SpeedTest ".concat(e," got error")),qt(1e4).then((function(){return{url:e,timeTaken:1/0,index:t}}))}))}(e.ratel[0].protocol+"://"+e.ratel[0].host+"/",t)}));return Promise.race(o).then((function(t){d.info("SpeedTest The fastest server is: ".concat(JSON.stringify(t))),r!=t.index&&(d.info("SpeedTest change server: ".concat(JSON.stringify(t))),Dt(e,t.index));var n=Pt(e)||{},o=n.fireplace,i=n.ratel;Pe("refresh_ratel",i),Pe("refresh_fireplace",o)}))},Ht={asyncGetDns:Gt,getServers:Pt,getAppConfig:function(e){return e?ge(It("key_app_config",e),!1,-1,!0):""},getAppStatus:function(e){if(!e)return"";var t=Mt(e).app_status;return void 0===t?"":t},getAccountVerification:function(e){if(!e)return{};var t=Mt(e).account_verification;return void 0===t?{}:t},getServerIp:function(e){if(!e)return"";var t=Mt(e).clusters;if(!t||!t.length)return"";try{return t[0].ratel[0].ip_list[0]}catch(e){return""}},getDnsServerList:function(){return ge("dns_server_list",!1,-1,!1)||[]},getLinkServerList:function(){return ge("link_server_list",!1,-1,!1)||[]}},Wt=Ht,Jt=function(e,t){return Rt(e,"get",t,["app_id"],!0)},zt=function(e){return Rt("/app/config","get",e,["platform"])},Kt=function(e,t){return Rt(e,"get",t,["link"],!0)},Yt=function(e){return Rt("/token/user","post",e,[["mobile","name"],"password"])},$t=function(e){return Rt("/token/id","post",e,["user_id","password"])},Xt=function(e){return Rt("/user/register/v2","post",e,["username","password"])},Zt=function(e){return Rt("/user/register/anonymous","post",e,["username","password"])},Qt=function(e){return Rt("/app/user/mobile_bind","post",e,["captcha","mobile"])},en=function(e){return Rt("/app/user/mobile_update","post",e,["mobile"])},tn=function(e){return Rt("/app/secret_info","post",e,["expire_seconds","secret_text"])},nn=function(e){return Rt("/app/secret_info","get",e,[],!0)},rn=function(e){return Rt("/app/captcha/sms","get",e,["mobile"],!0)},on=function(e){return Rt("/app/user/name_check","get",e,["username"],!0)},sn=function(e){return Rt("/app/user/mobile_bind","post",e,["captcha","mobile"])},an=function(e){return Rt("/app/user/mobile_bind_with_sign","post",e,["sign","mobile"])},cn=function(e){return Rt("/app/user/info_pwd","get",e,["captcha","mobile"],!0)},un=function(e){return Rt("/app/captcha/image","post",e,[])},fn=function(e){return Rt("/app/captcha/sms_web","get",e,["captcha","image_id","mobile"],!0)},ln=function(e){return Rt("/app/user/mobile_prechange_by_password","post",e,["password"])},dn=function(e){return Rt("/app/user/mobile_prechange_by_mobile","post",e,["captcha","mobile"])},pn=function(e){return Rt("/app/user/mobile_change","post",e,["captcha","mobile","sign"])},hn=function(e){return Rt("/app/generate_url_link","post",e,["path","query"])},gn=function(e){return Rt("/roster/accept","post",e,["user_id"],!0)},vn=function(e){return Rt("/roster/apply","post",e,["user_id","alias"])},yn=function(e){return Rt("/roster/decline","post",e,["user_id"])},mn=function(e){return Rt("/roster/delete","post",e,["user_id"],!0)},bn=function(e){return Rt("/roster/ext","post",e,["user_id","ext"])},wn=function(e){return Rt("/roster/ext","post",e,["user_id","alias"])},_n=function(e){return Rt("/roster/id","get",e,["user_id"])},Sn=function(e){return Rt("/roster/list","get",e,[])},Cn=function(e){return Rt("/roster/list","post",e,["list"])},En=function(e){return Rt("/roster/name","get",e,["username"])},kn=function(e){return Rt("/roster/apply/list","get",e,["cursor"],!0)},xn=function(e){return Rt("/roster/blocked_list","get",e,[""],!0)},Tn=function(e){return Rt("/roster/block","post",e,["user_id"],!0)},An=function(e){return Rt("/roster/unblock","post",e,["user_id"],!0)},Rn=function(e){return Rt("/group/admin/add","post",e,["group_id","user_list"])},On=function(e){return Rt("/group/admin_list","get",e,["group_id"],!0)},Nn=function(e){return Rt("/group/admin/remove","post",e,["group_id","user_list"])},In=function(e){return Rt("/group/announcement","get",e,["announcement_id","group_id"])},Pn=function(e){return Rt("/group/announcement/delete","post",e,["announcement_id","group_id"],!0)},Dn=function(e){return Rt("/group/announcement/edit","post",e,["group_id","content","title"])},Mn=function(e){return Rt("/group/announcement/list","get",e,["group_id"],!0)},jn=function(e){return Rt("/group/create","post",e,["name"])},Ln=function(e){return Rt("/group/destroy","post",e,["group_id"],!0)},Un=function(e){return Rt("/group/info","get",e,["group_id"])},Fn=function(e){return Rt("/group/info/avatar","post",e,["group_id","value"])},Bn=function(e){return Rt("/group/info/description","post",e,["group_id","value"])},Gn=function(e){return Rt("/group/info/ext","post",e,["group_id","value"])},qn=function(e){return Rt("/group/info/name","post",e,["group_id","value"])},Vn=function(e){return Rt("/group/member_list","get",e,["group_id"])},Hn=function(e){return Rt("/group/msg/mute_mode","post",e,["group_id","msg_mute_mode"])},Wn=function(e){return Rt("/group/msg/not_disturb","post",e,["group_id","value"])},Jn=function(){return Rt("/group/public_list","get",{},[])},zn=function(e){return Rt("/group/banned_list","get",e,["group_id"])},Kn=function(e){return Rt("/group/ban","post",e,["group_id","duration","user_list"])},Yn=function(e){return Rt("/group/unban","post",e,["group_id","user_list"])},$n=function(e){return Rt("/group/settings","get",e,["group_id"])},Xn=function(e){return Rt("/group/settings/allow_member_invitation","post",e,["group_id","value"])},Zn=function(e){return Rt("/group/settings/allow_member_modify","post",e,["group_id","value"])},Qn=function(e){return Rt("/group/settings/enable_read_ack","post",e,["group_id","value"])},er=function(e){return Rt("/group/settings/history_visible","post",e,["group_id","value"])},tr=function(e){return Rt("/group/settings/hide_member_info","post",e,["group_id","value"])},nr=function(e){return Rt("/group/settings/require_admin_approval","post",e,["group_id","apply_approval"])},rr=function(e){return Rt("/group/settings/ban_all","post",e,["group_id","duration"])},or=function(e){return Rt("/group/settings/unban_all","post",e,["group_id"])},ir=function(e){return Rt("/group/transfer","post",e,["group_id","new_owner"])},sr=function(e){return Rt("/group/user_joined","get",e)},ar=function(e){return Rt("/group/apply","post",e,["group_id"])},cr=function(e){return Rt("/group/apply/handle","post",e,["approval","group_id","user_id"])},ur=function(e){return Rt("/group/blocked_list","get",e,["group_id"])},fr=function(e){return Rt("/group/block","post",e,["user_list","group_id"])},lr=function(e){return Rt("/group/unblock","post",e,["user_list","group_id"])},dr=function(e){return Rt("/group/kick","post",e,["user_list","group_id"])},pr=function(e){return Rt("/group/invite","post",e,["user_list","group_id"])},hr=function(e){return Rt("/group/invite/handle","post",e,["approval","user_id","group_id"])},gr=function(e){return Rt("/group/info/batch","post",e,["group_list"])},vr=function(e){return Rt("/group/members/display_name","post",e,["group_id","user_list"])},yr=function(e){return Rt("/group/leave","post",e,["group_id"],!0)},mr=function(e){return Rt("/group/display_name","post",e,["group_id","value"])},br=function(e){return Rt("/group/application_list","post",e,["group_list"])},wr=function(){return Rt("/group/invitation_list","get",{},[])},_r=function(e){return Rt("/group/file/list","get",e,["group_id"],!0)},Sr=function(e){return Rt("/group/file/delete","post",e,["file_list","group_id"])},Cr=function(e){return Rt("/group/file/upload","post",e,["name","size","url","group_id"])},Er=function(e){return Rt("/user/authmode","post",e,["value"],!0)},kr=function(e){return Rt("/user/avatar","post",e,["avatar"])},xr=function(e){return Rt("/user/mobile","post",e,["mobile"],!0)},Tr=function(e){return Rt("/user/nickname","post",e,["nick_name"],!0)},Ar=function(){return Rt("/user/profile","get",{},[])},Rr=function(e){return Rt("/user/profile","post",e,[])},Or=function(e){return Rt("/user/push","post",e,["value"])},Nr=function(e){return Rt("/user/push/detail","post",e,["value"])},Ir=function(e){return Rt("/user/push/limit","post",e,["no_push_end_hour","no_push_start_hour"])},Pr=function(e){return Rt("/user/push/nickname","post",e,["value"])},Dr=function(){return Rt("/user/settings","get",{},[])},Mr=function(e){return Rt("/user/settings","post",e,["user_id"])},jr=function(e){return Rt("/user/sounds","post",e,["value"])},Lr=function(e){return Rt("/user/vibratory","post",e,["value"])},Ur=function(e){return Rt("/user/change_password","post",e,["old_password","new_password"])},Fr=function(e){return Rt("/user/token/bind","post",e,["device_sn","device_token","notifier_name"])},Br=function(e){return Rt("/user/token/unbind","post",e,[],!0)},Gr=function(e){return Rt("/user/delete","post",e,["password"])},qr=function(e){return Rt("/user/device/list","get",e,[],!0)},Vr=function(e){return Rt("/user/kick","post",e,["device_sn"])},Hr=function(e){return ho(Rt("/file/upload/forward","get",e,["file_sign","access-token","to_id","to_type"],!0))},Wr=function(e,t,n,r){return ho(Rt(po(e),"post",t,[],!1,n,r))},Jr=function(e){return ho(Rt("/file/upload/avatar/user","get",e,[],!0))},zr=function(e){return ho(Rt("/file/upload/avatar/group","get",e,["group_id"],!0))},Kr=function(e){return ho(Rt("/file/upload/chat","get",e,["file_type","to_id","to_type"],!0))},Yr=function(e,t,n,r){return Rt(po(e),"get",t,[],!0,n,r)},$r=function(e){return Rt("/app/qr_code","get",e,[])},Xr=function(e){return Rt("/app/qr_login","get",e,["qr_code"])},Zr=function(e){return Rt("/app/qrcode/group_sign","get",e,["group_id"],!0)},Qr=function(e){return Rt("/app/qrcode/group_invite","get",e,["qr_info"],!0)},eo=function(e){return Rt("/app/official_account/qrcode","get",e,[],!0)},to=function(e){return Rt("/app/official_account/qrcode_status","get",e,["qrcode_id"],!0)},no=function(e){return Rt("/app/official_account/login","get",e,["code"],!0)},ro=function(){return Rt("/app/official_account/is_bind","get")},oo=function(e){return Rt("/user/bind_openid","get",e,["open_id"],!0)},io=function(e){return Rt("/app/wechat_login","get",e,["code"],!0)},so=function(e){return Rt("/app/support_staff","get",e,[],!0)},ao=function(){return Rt("/app/wechat/unbind","post")},co=function(){return Rt("/app/wechat/is_bind","get")},uo=function(e){return Rt("/app/wechat/bind","post",e,["open_id","type"])},fo=function(){return Rt("/app/user_verification","get")},lo=function(e){return Rt("/app/user_verification_by_mobile","post",e,["mobile","captcha"])},po=function(e){return e&&(e.includes("maximtop.com.cn")||e.includes("maximtop.cn"))?e.replace(/^https?:\/\/[^/]+/,""):e},ho=function(e){return new Promise((function(t,n){e.then((function(e){if(e&&e.download_url){var n=e.download_url,r=po(n);if(r!=n){var o=Ae.getAppid();r=Wt.getServers(o).ratel+r,e.download_url=r}}t(e)})).catch((function(e){n(e)}))}))},go={},vo=!1,yo=function(e){var t=e.status,n=void 0===t?{}:t,r=n.code,o=n.reason;if(r===C.OK)return!0;if(void 0===n.code)return!0;if((r===C.INVALID_TOKEN||r===C.UNAUTHORIZED&&"you must login first"===o)&&Pe("flooNotice",{category:"action",desc:"relogin"}),r!==C.USER_FROZEN&&r!==C.INVALID_LICENSE&&r!==C.LICENSE_LIMIT&&r!==C.APP_FROZEN||Pe("flooNotice",{category:"action",desc:"relogin_manually"}),r===C.USER_BANNED){Pe("flooError",{category:"USER_BANNED",desc:"用户被禁言"})}else if(r===C.USER_FROZEN){Pe("flooError",{category:"USER_FROZEN",desc:"用户被冻结,请联系App管理员。"})}else if(r===C.APP_FROZEN){Pe("flooError",{category:"APP_FROZEN",desc:"APP 被冻结,请登陆蓝莺IM控制台查看详情。"})}else if(r===C.INVALID_LICENSE){Pe("flooError",{category:"LICENSE",desc:"无效 LICENSE,请确认服务已按时付费。"})}else if(r===C.LICENSE_LIMIT){Pe("flooError",{category:"LICENSE",desc:"超出 LICENSE 用户数限制,请购买更高规格服务。"})}else if(r===C.FAIL){Pe("flooError",{category:"FAIL",desc:o})}else{Pe("flooError",{category:r,desc:o})}var i=e.client_mid;return i&&Pe("onSendingMessageStatusChanged",{status:"failed",mid:q(i),message:W(e)}),d.error("ret error ......code:",r,"...reason:",o),!1},mo=function(e){var t=e.unread,n=void 0===t?[]:t;Pe("imReceivedUnread",n);var r=0;n.forEach((function(e){var t=e.xid;e.n>0&&setTimeout((function(){Pe("sendMessage",rt({xid:t,next_key:0}))}),1e3*Math.ceil(r++/20))}))},bo=function e(t){var n=t.xid,r=n.uid,o=void 0===r?0:r;go[o+""]?setTimeout((function(){go[o]=!1,e(t)}),3e3):(go[o+""]=!0,Pe("sendMessage",function(e){e.uid=e.uid||0;var t=new qe;t.setCommond(_.SYNC);var n=new ze;return n.setXid(e),t.setPayload(n),t}(n)))},wo=function(e){if(!yo(e))return Pe("flooNotice",{category:"loginMessage",desc:"login socket failure ......"}),void Pe("loginFail","socket_failure");var t=e.xid,n=(void 0===t?{}:t).deviceSN;Pe("temporary_deviceSN",n),vo||n&&Ae.saveDeviceSN(n),Pe("flooNotice",{category:"loginMessage",desc:"login socket success....."}),Pe("loginSuccess",{}),Pe("sendMessage",{vsn:0,compress_method:0,command:0})},_o=function(e){if(yo(e)){var t=e.metas,n=void 0===t?[]:t,r=e.xid,o=e.is_full_sync,i=e.client_mid;e.edit_timestamp;if(!o&&i&&V(i).gt(0))return Pe("receivedSendMessage",i),void setTimeout((function(){bt.dealSendedRosterMessage(e),bt.dealSendedGroupMessage(e)}),20);var s=e.next_key,a=void 0===s?0:s;if(0===a||V(a).eq(0)){var c=r.uid;delete go[(void 0===c?0:c)+""]}o?(n&&n.length&&So(n.reverse(),o),Pe("onReceiveHistoryMsg",{next:a})):(n.length&&So(n),0===a||V(a).eq(0)||Pe("sendMessage",rt({xid:r,next_key:a})))}},So=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.forEach((function(e){var n=e.ns;n===x.UNKNOWN&&d.log("received unknown message ...",e),t&&(e.isHistory=!0),n===x.MESSAGE&&xo(e),n===x.GROUP_NOTICE&&To(e),n===x.ROSTER_NOTICE&&Ao(e),n===x.USER_NOTICE&&Ro(e),n===x.CONVERSATION&&ko(e),n===x.PUSH&&Eo(e),n===x.RTC_SIGNAL&&Co(e)}))},Co=function(e){var t=e.payload,n=(void 0===t?{}:t).type;n===L.UNKNOWN&&Pe("rtcSignalNormal",e),n===L.VIDEO_ROOM&&Pe("rtcVideoRoomSignal",e)},Eo=function(e){d.log("received online push: ",e)},ko=function(e){var t=e.payload,n=void 0===t?{}:t,r=n.type,o=n.operation;if(r===M.OPER)if(o.type==j.DELETE||o.type==j.DELETE_EVERYWHERE){var i=o.xid;Pe("deleteConversation",{id:i.uid,source:"other_operation"})}else d.log("received unknown conversation operation: ",o);else d.log("received unknown conversation: ",e)},xo=function(e){var t=e.payload,n=void 0===t?{}:t,r=n.type,o=n.operation;r===T.NORMAL&&Pe("messageNormal",e),r===T.CHAT&&Pe("imRosterMessage",e),r===T.GROUPCHAT&&Pe("imGroupMessage",e),r===T.OPER&&(o.type===A.UNKNOWN&&d.log("received unknown operation: ",e),e.isReceived=!0,Pe("onActionMessage",e))},To=function(e){var t=e.payload,n=(void 0===t?{}:t).type;n===N.UNKNOWN&&d.log("received unknown groupnotice: ",e),n===N.PRESENCE&&Pe("imGroupPresence",e),n===N.ABSENCE&&Pe("imGroupAbesence",e),n===N.CREATED&&Pe("imGroupCreated",e),n===N.DESTROYED&&Pe("imGroupDestoryed",e),n===N.JOINED&&Pe("imGroupJoined",e),n===N.APPLYED&&Pe("imGroupApplyed",e),n===N.APPLY_ACCEPTED&&Pe("imGroupApplyAccepted",e),n===N.APPLY_DECLINED&&Pe("imGroupApplyDeclined",e),n===N.INVITED&&Pe("imGroupInvited",e),n===N.INVITE_ACCEPTED&&Pe("imGroupInvitedAccepted",e),n===N.INVITE_DECLINED&&Pe("imGroupInvitedDeclined",e),n===N.KICKED&&Pe("imGroupKicked",e),n===N.LEAVED&&Pe("imGroupLeaved",e),n===N.BANNED&&Pe("imGroupBaned",e),n===N.UNBANNED&&Pe("imGroupUnbaned",e),n===N.OWNER_ASSIGNED&&Pe("imGroupOwnerAssigned",e),n===N.ADMIN_GRANTED&&Pe("imGroupAdminGranted",e),n===N.ADMIN_REVOKED&&Pe("imGroupAdminRevoked",e),n===N.BLOCKED&&Pe("imGroupBlocked",e),n===N.UNBLOCKED&&Pe("imGroupUnblocked",e),n===N.MUTED&&Pe("imGroupMuted",e),n===N.UNMUTED&&Pe("imGroupUnmuted",e),n===N.INFO_UPDATED&&Pe("imGroupInfoUpdated",e),n===N.ANNOUNCEMENT_UPDATED&&Pe("imGroupAnnouncementUpdated",e),n===N.MESSAGE_SETTING&&Pe("imGroupMessageSetting",e),n===N.FILE_UPLOADED&&Pe("imGroupFileUploaded",e),n===N.FILE_DELETED&&Pe("imGroupFileDeleted",e),n===N.FILE_UPDATED&&Pe("imGroupFileUpdated",e)},Ao=function(e){var t=e.payload,n=(void 0===t?{}:t).type;n===P.UNKNOWN&&d.log("received unknown rosterNotice: ",e),n===P.ADDED&&Pe("imRosterAdded",e),n===P.REMOVED&&Pe("imRosterRemoved",e),n===P.APPLIED&&Pe("imRosterApplied",e),n===P.ACCEPTED&&Pe("imRosterAccepted",e),n===P.DECLINED&&Pe("imRosterDeclined",e),n===P.BANNED&&Pe("imRosterBaned",e),n===P.UNBANNED&&Pe("imRosterUnbaned",e),n===P.INFO_UPDATED&&Pe("imRosterInfoUpdated",e),n===P.MUTED&&Pe("imRosterMuted",e),n===P.UNMUTED&&Pe("imRosterUnmuted",e)},Ro=function(e){var t=e.payload,n=(void 0===t?{}:t).type;n!==D.UNKNOWN&&n!==D.PASSWORD_CHANGED&&n!==D.FROZEN&&n!==D.REMOVED&&n!==D.KICKED_BY_OTHER_DEVICE&&n!==D.DEVICE_REMOVED||(Ae.deleteToken(),Ae.deleteDeviceSN(),Pe("flooNotice",{category:"action",desc:"relogin_manually"})),n!==D.CLUSTER_CHANGED&&n!==D.DNS_UPDATE||(Ae.deleteToken(),Pe("retrieve_dns"),setTimeout((function(){Pe("flooNotice",{category:"action",desc:"relogin"})}),2e3)),n===D.UNKNOWN&&d.log("received unknown userNotice: ",e),n===D.KICK_BY_SAME_DEVICE&&(vo=!0,Pe("userKicked")),Pe("flooNotice",{category:"userNotice",desc:Object.keys(D)[n]})},Oo=function(e){var t=e.command,n=void 0===t?0:t,r=e.payload;n===_.UNREAD&&mo(r),n===_.SYNC&&_o(r),n===_.NOTICE&&bo(r),n===_.PROVISION&&wo(r)},No=n(0),Io=n.n(No),Po=n(7),Do=n.n(Po),Mo=Io.a.Root.fromJSON(Do.a).lookupType("im.floo.protobuf.Provision"),jo=function(e){return Mo.encode(e).finish()},Lo=Io.a.Root.fromJSON(Do.a).lookupType("im.floo.protobuf.XID"),Uo=function(e){return Lo.encode(e).finish()},Fo=n(229),Bo=n.n(Fo),Go=Io.a.Root.fromJSON(Bo.a).lookupType("im.floo.protobuf.MessageBody"),qo=function(e){return Go.decode(e)},Vo=function(e){return Go.encode(e).finish()},Ho=n(230),Wo=n.n(Ho),Jo=Io.a.Root.fromJSON(Wo.a).lookupType("im.floo.protobuf.GroupNotice"),zo=function(e){return Jo.decode(e)},Ko=function(e){e.from=Uo(e.from);var t=[];return(e.to||[]).forEach((function(e){t.push(Uo(e))})),e.to=t,Jo.encode(e).finish()},Yo=n(231),$o=n.n(Yo),Xo=Io.a.Root.fromJSON($o.a).lookupType("im.floo.protobuf.RosterNotice"),Zo=function(e){return Xo.decode(e)},Qo=function(e){return Xo.encode(e).finish()},ei=n(232),ti=n.n(ei),ni=Io.a.Root.fromJSON(ti.a).lookupType("im.floo.protobuf.UserNotice"),ri=function(e){return ni.decode(e)},oi=function(e){return ni.encode(e).finish()},ii=n(233),si=n.n(ii),ai=Io.a.Root.fromJSON(si.a).lookupType("im.floo.protobuf.Info"),ci=function(e){return ai.decode(e)},ui=function(e){return ai.encode(e).finish()},fi=n(234),li=n.n(fi),di=Io.a.Root.fromJSON(li.a).lookupType("im.floo.protobuf.Conversation"),pi=function(e){return di.decode(e)},hi=function(e){return di.encode(e).finish()},gi=n(235),vi=n.n(gi),yi=Io.a.Root.fromJSON(vi.a).lookupType("im.floo.protobuf.RtcSignal"),mi=function(e){return yi.decode(e)},bi=function(e){return yi.encode(e).finish()},wi=Io.a.Root.fromJSON(Do.a).lookupType("im.floo.protobuf.Meta"),_i=Io.a.Root.fromJSON(Do.a).lookupType("im.floo.protobuf.SyncUL"),Si=function(e){return e.meta&&(e.meta=function(e){var t=e.ns,n=e.payload;return t===x.MESSAGE&&(e.payload=Vo(n)),t===x.GROUP_NOTICE&&(e.payload=Ko(n)),t===x.ROSTER_NOTICE&&(e.payload=Qo(n)),t===x.USER_NOTICE&&(e.payload=oi(n)),t===x.INFO&&(e.payload=ui(n)),t===x.CONVERSATION&&(e.payload=hi(n)),t===x.PUSH&&(e.payload=Vo(n)),t===x.RTC_SIGNAL&&(e.payload=bi(n)),wi.create(e)}(e.meta)),_i.encode(e).finish()},Ci=Io.a.Root.fromJSON(Do.a).lookupType("im.floo.protobuf.UnreadDL"),Ei=Io.a.Root.fromJSON(Do.a).lookupType("im.floo.protobuf.SyncDL"),ki=Io.a.Root.fromJSON(Do.a).lookupType("im.floo.protobuf.Notice"),xi=function(e){return{xid:function(e){return Lo.decode(e)}(e)}},Ti=Io.a.Root.fromJSON(Do.a).lookupType("im.floo.protobuf.Frame");Io.a.util.Long=b.a,Io.a.configure();var Ai=function(e){var t=e.payload,n=e.command;return t&&(n===_.UNREAD?e.payload=function(e){return Ci.encode(e).finish()}(t):n===_.SYNC?e.payload=Si(t):n===_.NOTICE?e.payload=function(e){return ki.encode(e).finish()}(t):n===_.PROVISION&&(e.payload=jo(t))),Ti.encode(e).finish()},Ri=function(e){e=new Uint8Array(e);var t=Ti.decode(e),n=t.command,r=t.payload;return n===_.UNREAD?t.payload=function(e){return Ci.decode(e)}(r):n===_.SYNC?t.payload=function(e){var t=Ei.decode(e),n=t.metas,r=[];return(void 0===n?[]:n).forEach((function(e){var t=e.ns,n=e.payload;t===x.MESSAGE&&(e.payload=qo(n)),t===x.GROUP_NOTICE&&(e.payload=zo(n)),t===x.ROSTER_NOTICE&&(e.payload=Zo(n)),t===x.USER_NOTICE&&(e.payload=ri(n)),t===x.INFO&&(e.payload=ci(n)),t===x.CONVERSATION&&(e.payload=pi(n)),t===x.PUSH&&(e.payload=qo(n)),t===x.RTC_SIGNAL&&(e.payload=mi(n)),r.push(e)})),t.metas=r,t}(r):n===_.NOTICE?t.payload=xi(r):n===_.PROVISION&&(t.payload=function(e){return Mo.decode(e)}(r)),t},Oi={},Ni=0,Ii=null,Pi="normal",Di=null;Ne("refresh_fireplace",(function(e){Oi=Object.assign({fireplace:e},Oi)})),Ne("loginSuccess",(function(){Ni=0,Ii&&clearInterval(Ii),Ii=setInterval((function(){Bi({vsn:0,compress_method:0,command:0})}),5e4)})),Ne("sendMessage",(function(e){Bi(e)})),Ne("userKicked",(function(){Pi="kick"})),Ne("reconnect",(function(e){var t=e.reason;d.warn("socket reconnect due to ",t),"normal"===Pi&&ji()}));var Mi=function(){Di&&Di.destroy();var e=Oi.fireplace;d.log("................................. will connect : ",e),Pe("flooNotice",{category:"loginMessage",desc:"socket connecting..."}),(Di=s()(e,{timeout:1e4+2e4*Ni,transports:["websocket"]})).on("connect",(function(){d.log("================= socket connected "),Pe("flooNotice",{category:"loginMessage",desc:"socket connect success..."}),Ui()})),Di.on("frame",(function(e){Fi(e)})),Di.on("disconnect",(function(e){d.log("================= socket disconnected due to ",e),Pe("reconnect",{reason:e})})),Di.on("error",(function(e){d.log("================= socket error: ",e),Pe("reconnect",{reason:"SocketError"})})),Di.on("reconnect_attempt",(function(e){d.log("================= socket reconnect_attempt: ",e),Di.io.opts.transports=["websocket"]}))},ji=function(){Ni>=5?(Ni=0,Pe("fireplaceError")):Ni++,Li()},Li=function(){var e=Math.floor(9e3*Math.random())+1e3;d.error("================= socket will reconnect in ",e," ms (",Ni,")"),setTimeout((function(){Di.connect()}),e)},Ui=function(){d.log("=============== sending proversion =========="),Pe("flooNotice",{category:"loginMessage",desc:"logining socket service..."}),Pe("sendMessage",function(e){var t=new Ue({uid:e.uid-0,deviceSN:tt}),n=new He;nt||(nt=Ae.getDeviceGuid()),n.setXid(t),n.setToken(e.token),n.setDeviceguid(nt),n.setSdkvsn("2.0.0"),n.setEncryptmethod(k.AES_CBC_128),n.setEncryptkey(Ae.getAesKey()),n.setDeviceinfo("Web");var r=new qe;return r.setCommond(_.PROVISION),r.setPayload(n),r}({token:Ae.getToken(),uid:Ae.getUid()}))},Fi=function(e){var t=function(e){return Ri(e)}(e);d.info("RECV :"+JSON.stringify(B(t))),Oo(t)},Bi=function(e){d.info("SEND :"+JSON.stringify(B(e)));var t=Ai(e),n=new ArrayBuffer(t.length),r=new Uint8Array(n);t.forEach((function(e,t){r[t]=e})),Di.emit("frame",n)},Gi=Object.assign(o,{connect:function(e){Oi=e,Ni=0,Pi="normal",Mi()},sendMessage:Bi,disConnect:function(){Pi="logout",Di&&Di.disconnect()}}),qi={asyncGetRosterIdList:function(e){return e?Gi.rosterList({}).then((function(e){return St.saveRosterList(e),e.map((function(e){return e.user_id||e}))})):Promise.resolve(St.getRosterList())},asyncGetRosterInfo:function(e,t){var n=St.getRosterInfo(e);return n&&n.username&&!t?Promise.resolve(n):Gi.rosterListPost({list:[e]}).then((function(t){return St.saveRosterInfo(t),Pe("onRosterInfoUpdate",[e]),t.length&&t[0]||{}}))},asyncRegester:function(e){return Gi.userRegister(e)},asnycGetRosterListDetailByIds:function(e){if(!e||!e.length)return Promise.resolve({});var t=St.getAllRosterInfos(),n=[];e.forEach((function(e){var r=t[e];r&&r.username||n.push(e)}));var r=Array.from(new Set(n));return r.length?Gi.rosterListPost({list:r}).then((function(e){return St.saveRosterInfo(e),Pe("onRosterInfoUpdate",r),e})):Promise.resolve()},asyncGetUserProfile:function(e){var t=Ae.getProfile();return t&&(t.name||t.mobile)&&!e?Promise.resolve(t):Gi.userProfile().then((function(e){return Ae.saveProfile(e),e}))},getRosterMessageByRid:function(e){return bt.getRosterMessage(e)},readRosterMessage:function(e,t){Pe("imReadRosterMessage",{roster_id:e,mid:t})},asyncDeleteRoster:function(e){return Gi.rosterDelete(e).then((function(t){return St.removeRoster(e.user_id),je.deleteRecentById(e.user_id),Pe("onRosterListUpdate"),t}))},getAllRosterDetail:function(){return St.getAllRosterInfos()},recallMessage:function(e,t){var n=at(e,t);Pe("swapSendMessage",B(n)),Pe("sendMessage",n)},deleteMessage:function(e,t){var n=ct(e,t);Pe("swapSendMessage",B(n)),Pe("sendMessage",n)},appendMessageContent:function(e,t,n){var r=ft(e,t,n);Pe("swapSendMessage",B(r)),Pe("sendMessage",r)},replaceMessage:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(n||r||o){var i=lt(e,t,n,r,o);Pe("swapSendMessage",B(i)),Pe("sendMessage",i)}else;},getUnreadCount:function(e){return bt.getUnreadByRosterId(e)},unreadMessage:function(e,t){var n=function(e,t){t=V(t);var n=new qe;n.setCommond(_.SYNC);var r=new Ue({uid:Ae.getUid(),deviceSN:tt}),o=new Ue({uid:q(e),deviceSN:0}),i=new ze,s=new Be({ctype:R.COMMAND,type:T.OPER,operation:{type:A.READ_CANCEL,mid:t,xid:o}}),a=new Ye({id:parseInt((new Date).getTime()+""+Math.floor(256*Math.random())),from:r,to:r,payload:s,ns:x.MESSAGE});return i.setMeta(a),n.setPayload(i),n}(e,t);Pe("swapSendMessage",B(n)),Pe("sendMessage",n)},getRosterInfo:function(e){return St.getRosterInfo(e)},asyncGetApplyList:Gi.rosterApplylist,asyncGetBlockedlist:Gi.rosterBlockedlist,asyncBlockeAdd:Gi.rosterBlockedAdd,asyncBlockeRemove:Gi.rosterBlockeRemove,asyncApply:Gi.rosterApply,asyncAccept:Gi.rosterAccept,asyncDecline:Gi.rosterDecline,asyncUpdateRosterExt:Gi.rosterExt,asyncUpdateRosterAlias:Gi.rosterAlias,asyncSearchRosterByName:Gi.rosterName,asyncSearchRosterById:Gi.rosterId},Vi=(n(347),n(236)),Hi=n.n(Vi);function Wi(e,t,n){return t in e?Hi()(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ji(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}Ne("imRostersGroupslistReady",(function(e){var t=e.rosters;St.saveRosterList([].concat(t)),t.push(Ae.getUid()),$i(t)}));var zi={},Ki=function(e){return(new Date).getTime()-(zi[e]||0)<1e3},Yi=function(e){var t=(new Date).getTime();zi[e]=t},$i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(e)||(e=[e]);var t=St.getAllRosterInfos()||{},n=[];e.forEach((function(e){if((e=e.user_id||e)>0){var r=t[e]||{},o=r.avatar,i=r.nick_name,s=r.username;o||i||s||e&&!Ki(e)&&n.push(e)&&Yi(e)}})),n.length&&Qi(n)},Xi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Array.isArray(e)||(e=[e]),t)es(e);else{var n=be.getAllGroupInfos()||{},r=[];e.forEach((function(e){var t=e.group_id||e;e>0&&((n[t]||{}).name||r.push(t))})),r.length&&es(r)}},Zi=[],Qi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.filter((function(e){return Zi.indexOf(e)<0}));t.length&&Cn({list:t}).then((function(e){t.forEach((function(t){e.findIndex((function(e){return e.user_id==t}))<0&&Zi.push(t)})),St.saveRosterInfo(e),Pe("onRosterListUpdate")}))},es=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.length&&gr({group_list:e}).then((function(e){be.saveGroupInfo(e),Pe("onGroupListUpdate")}))},ts=function(e,t,n,r){if(n){var o=be.getGroupMembers(e);if(!o||!o.length)return}void 0!==t&&(Array.isArray(t)||(t=[t]),vr({group_id:e,user_list:t}).then((function(t){if(t&&t.length){var n=[],o=St.getAllRosterInfos(),i=Ae.getUid();t.forEach((function(e){if(o[e.user_id]&&o[e.user_id].username){if(e.has_nick=!1,e.user_id!=i){var t=o[e.user_id].alias;(t||e.display_name||o[e.user_id].nick_name)&&(e.has_nick=!0),e.display_name=t||e.display_name||o[e.user_id].nick_name||o[e.user_id].username||o[e.user_id].user_id}else e.has_nick=!0,e.display_name=e.display_name||o[e.user_id].nick_name||o[e.user_id].username||o[e.user_id].user_id;e.username=o[e.user_id].username,e.avatar=o[e.user_id].avatar}else n.push(e.user_id)})),n.length?Cn({list:n}).then((function(n){St.saveRosterInfo(n);var o=St.getAllRosterInfos();t=t.map((function(e){if(o[e.user_id]||(o[e.user_id]={user_id:e.user_id}),!e.display_name)if(e.has_nick=!1,e.user_id!=i){var t=o[e.user_id].alias;(t||e.display_name||o[e.user_id].nick_name)&&(e.has_nick=!0),e.display_name=t||e.display_name||o[e.user_id].nick_name||o[e.user_id].username||o[e.user_id].user_id}else e.has_nick=!0,e.display_name=e.display_name||o[e.user_id].nick_name||o[e.user_id].username||o[e.user_id].user_id;return e.username=o[e.user_id].username,e.avatar=o[e.user_id].avatar,e})),be.saveGroupMembers(e,t,r),Pe("onGroupMemberChanged",e)})):(be.saveGroupMembers(e,t,r),Pe("onGroupMemberChanged",e))}})))},ns=function(e,t){be.removeGroupMembers(e,t),Pe("onGroupMemberChanged",e)};Ne("imRostersGroupslistReady",(function(e){var t=e.groups;be.saveJoinedGroups([].concat(t)),Xi(t)})),Ne("rtcVideoRoomSignal",(function(e){var t=function(e){if(!e.payload)return e;var t=e.payload.content;return void 0===t?"":t}(e);Pe("socketClsOnSignal",t)}));Ne("imRosterMessage",(function(e){var t=W(e);e.isHistory&&(t.isHistory=!0);var n=t.ext,r=void 0===n?"":n,o=t.from,i=t.to,s={};try{s=JSON.parse(r)}catch(e){}if(void 0!==s.input_status)o!=Ae.getUid()&&Pe("onInputStatusMessage",{ext:r,from:o,to:i});else if("rtc"===t.type&&bt.saveRosterRTCContentHandleMessage(t),bt.saveRosterMessage(t),t.toType="roster",je.saveRecent(t),"rtc"!==t.type){var a=Ae.getUid()==o?i:o;$i(a),Pe("onUnreadChange",a)}"rtc"===t.type&&(!function(e){var t=e.config,n=e.isHistory;if(t&&t.action){var r=bt.getInCallStatus(),o=Ae.getUid();if("hangup"===t.action){if(r&&o!=q(e.from)&&o==t.initiator)if(t.peerDrop&&1==t.peerDrop);else{var i=ht({uid:q(e.from),content:e.content,config:JSON.stringify({action:"record",callId:t.callId,initiator:t.initiator,peerDrop:t.peerDrop,pushMessageLocKey:t.pushMessageLocKey,pushMessageLocArgs:t.pushMessageLocArgs})}),s=i.payload.meta;bt.saveSendingRosterMessage(s),Pe("sendMessage",i)}}else"record"===t.action&&t.initiator==o&&e.from!=o&&(e.to=e.from,e.from=H(t.initiator));n||"hangup"!==t.action&&"record"!==t.action||bt.saveInCallStatus(!1)}}(t),bt.saveRosterMessage(t),je.saveRecent(t),Pe("onRosterRTCMessage",t)),Pe("onRosterMessage",t)})),Ne("imSendRosterSignal",(function(e){$i(e.uid)})),Ne("imGetRecent",(function(e){$i(e)})),Ne("imGroupMessage",(function(e){var t=W(e);e.isHistory&&(t.isHistory=!0),bt.saveGroupMessage(t),t.toType="group",je.saveRecent(t);var n=Ae.getUid(),r=t.config;r&&r.mentionList&&r.mentionList.indexOf(n)>=0&&Pe("onMentionMessage",t),Pe("onGroupMessage",t)})),Ne("imReceivedUnread",(function(e){var t=e.filter((function(e){return 1===e.type})).map((function(e){return q(e.xid.uid)})),n=e.filter((function(e){return 1===e.type&&e.n>0})).map((function(e){return q(e.xid.uid)})),r=e.filter((function(e){return 2===e.type})).map((function(e){return q(e.xid.uid)}));rs(t,n),os(r),Xi(r)}));var rs=function(e,t){var n=St.getAllRosterInfos()||{},r=[];if(e.forEach((function(e){var t=n[e]||{},o=t.avatar,i=t.nick_name,s=t.username;o||i||s||e&&!Ki(e)&&r.push(e)&&Yi(e)})),r.length){var o=J(r,100),i=0;o.forEach((function(e){setTimeout((function(){Cn({list:e}).then((function(n){St.saveRosterInfo(n),je.saveUnreadRecent(e.filter((function(e){return!t.includes(e)})),"roster")}))}),1e3*(i+=1))}));var s=e.filter((function(e){return!r.includes(e)}));Array.isArray(s)&&s.length&&je.saveUnreadRecent(s.filter((function(e){return!t.includes(e)})),"roster")}else je.saveUnreadRecent(e.filter((function(e){return!t.includes(e)})),"roster")},os=function(e){var t=be.getAllGroupInfos()||{},n=[];if(e.forEach((function(e){(t[e]||{}).name||e&&n.push(e)})),n.length){var r=J(n,20),o=0;r.forEach((function(e){setTimeout((function(){gr({group_list:e}).then((function(t){be.saveGroupInfo(t),Pe("onGroupListUpdate"),je.saveUnreadRecent(e,"group")}))}),1e3*(o+=1))}));var i=e.filter((function(e){return!n.includes(e)}));Array.isArray(i)&&i.length&&je.saveUnreadRecent(i,"group")}else je.saveUnreadRecent(e,"group")};Ne("imRosterAdded",(function(e){var t=e.payload,n=t.to,r=void 0===n?[]:n,o=t.from,i=Ae.getUid();1===r.length&&q(r[0].uid)===i&&($i([q(o.uid)]),St.saveRosterList(q(o.uid)),Pe("onRosterListUpdate",e))})),Ne("imRosterRemoved",(function(e){var t=e.payload,n=t.from,r=t.to,o=void 0===r?[]:r,i=Ae.getUid();if(q(n.uid)===i&&1===o.length){var s=q(o[0].uid);St.removeRoster(s),wt.saveNotice(e),je.deleteRecentById(s),bt.deleteRosterMessageByRosterId(s),Pe("onRosterRemoved",e)}})),Ne("imRosterApplied",(function(e){Pe("onRosterApplied",e)})),Ne("imRosterAccepted",(function(e){var t=e.payload,n=t.from,r=t.to,o=void 0===r?[]:r,i=Ae.getUid(),s=q(n.uid);if(1===o.length){var a=q(o[0].uid);s===i?(wt.removeNotice(e),St.saveRosterList(a),$i(a)):a===i&&(St.saveRosterList(s),$i(s)),Pe("onRosterAccepted",e)}})),Ne("imRosterDeclined",(function(e){var t=e.payload,n=t.from,r=t.to,o=void 0===r?[]:r,i=Ae.getUid(),s=q(n.uid);if(1===o.length){var a=q(o[0].uid);s===i?(wt.removeNotice(e),wt.saveNotice(e)):a===i&&wt.saveNotice(e),Pe("onRosterDeclined",e)}})),Ne("imRrosterBaned",(function(e){Pe("onRosterNotice",e)})),Ne("imRosterUnbaned",(function(e){Pe("onRosterNotice",e)})),Ne("imRosterInfoUpdated",(function(e){var t=e.payload,n=t.from,r=t.to,o=void 0===r?[]:r,i=t.content,s=void 0===i?"{}":i,a=Ae.getUid(),c=q(n.uid),u=0;u=c===a?q(o[0].uid):c;var f={};try{f=JSON.parse(s)}catch(e){}if(Object.keys(f).length){var l=Object.assign({},St.getRosterInfo(u),f);St.saveRosterInfo([l]),Pe("onRosterInfoUpdate",[c]),Pe("onRosterListUpdate")}})),Ne("imRosterMuted",(function(){})),Ne("imRosterUnmuted",(function(){})),Ne("imGroupCreated",(function(e){var t=e.payload,n=t.gid,r=t.from,o=Ae.getUid(),i=q(n.uid),s=q(r.uid);be.saveJoinedGroups(i),s!==o&&$i(s),Xi(i),Pe("onGroupListUpdate",e),Pe("onGroupCreated",e)})),Ne("imGroupDestoryed",(function(e){var t=e.payload,n=t.gid,r=t.from,o=Ae.getUid(),i=q(n.uid),s=q(r.uid);s!==o&&$i(s),be.removeGroup(i),wt.saveNotice(e),je.deleteRecentById(n),bt.deleteGroupMessageByGid(n),Pe("onGroupListUpdate"),Pe("onGroupDestoryed",e)})),Ne("imGroupJoined",(function(e){var t=e.payload,n=t.gid,r=t.from,o=t.to,i=void 0===o?[]:o,s=q(r.uid),a=Ae.getUid(),c=q(n.uid),u=[];i.forEach((function(e){u.push(q(e.uid))})),s===a?(be.saveJoinedGroups(c),Xi(c),Pe("onGroupListUpdate")):(ts(c,s,!0),$i(s),Pe("onGroupMemberChanged",c)),Pe("onGroupJoined",e)})),Ne("imGroupApplyed",(function(e){var t=e.payload.from,n=q(t.uid);n!==Ae.getUid()&&($i([n]),wt.saveNotice(e))})),Ne("imGroupApplyAccepted",(function(e){var t=e.payload,n=t.gid,r=t.from,o=t.to,i=void 0===o?[]:o,s=q(r.uid),a=Ae.getUid(),c=q(n.uid),u=[];i.forEach((function(e){u.push(q(e.uid))})),s===a?(wt.removeNotice(e),$i(u),ts(c,u,!0),Pe("onGroupMemberChanged",c)):(be.saveJoinedGroups(c),Xi(c),$i(s),Pe("onGroupListUpdate")),Pe("onGroupApplyAccepted",e)})),Ne("imGroupApplyDeclined",(function(e){var t=e.payload,n=t.from,r=t.to,o=q(n.uid),i=Ae.getUid(),s=[];r.forEach((function(e){s.push(q(e.uid))})),o===i?$i(s):wt.saveNotice(e),Pe("onGroupApplyDeclined",e)})),Ne("imGroupInvited",(function(e){var t=e.payload,n=t.gid,r=t.from,o=t.to,i=void 0===o?[]:o,s=q(r.uid),a=Ae.getUid(),c=q(n.uid),u=[];i.forEach((function(e){u.push(q(e.uid))})),s===a?$i(u):u.findIndex((function(e){return e===a}))>-1?($i(s),Xi(c),wt.saveNotice(e)):$i(u),Pe("onGroupNotice",e)})),Ne("imGroupInvitedAccepted",(function(e){var t=e.payload,n=t.gid,r=t.from,o=t.to,i=void 0===o?[]:o,s=q(r.uid),a=Ae.getUid(),c=q(n.uid),u=[];i.forEach((function(e){u.push(q(e.uid))})),s===a?(wt.removeNotice(e),be.saveJoinedGroups(c),Xi(c),Pe("onGroupListUpdate")):(ts(c,s,!0),$i(s),Pe("onGroupMemberChanged",c)),Pe("onGroupInvitedAccepted",e)})),Ne("imGroupInvitedDeclined",(function(e){var t=e.payload,n=t.gid,r=t.from,o=q(r.uid),i=Ae.getUid(),s=q(n.uid);o===i?(wt.removeNotice(e),wt.saveNotice(e),Xi(s)):$i(o),Pe("onGroupInvitedDeclined",e)})),Ne("imGroupKicked",(function(e){var t=(e=Object.assign({},e)).payload,n=t.gid,r=t.to,o=void 0===r?[]:r,i=Ae.getUid(),s=q(n.uid),a=[];o.forEach((function(e){a.push(q(e.uid))})),a.findIndex((function(e){return e===i}))>-1?(be.removeGroup(s),wt.saveNotice(e),je.deleteRecentById(n),bt.deleteGroupMessageByGid(n),Pe("onGroupListUpdate")):ns(s,a),Pe("onGroupKicked",e)})),Ne("imGroupLeaved",(function(e){var t=(e=Object.assign({},e)).payload,n=t.gid,r=t.from,o=q(r.uid),i=Ae.getUid(),s=q(n.uid),a=[o];o===i?(be.removeGroup(s),wt.saveNotice(e),je.deleteRecentById(n),bt.deleteGroupMessageByGid(n),Pe("onGroupListUpdate")):ns(s,a),Pe("onGroupLeaved",e)})),Ne("imGroupBlocked",(function(e){var t=e.payload,n=t.gid,r=t.to,o=void 0===r?[]:r,i=Ae.getUid(),s=q(n.uid),a=[];o.forEach((function(e){a.push(q(e.uid))})),a.findIndex((function(e){return e===i}))>-1?(be.removeGroup(s),wt.saveNotice(e),je.deleteRecentById(n),bt.deleteGroupMessageByGid(n),Pe("onGroupListUpdate")):($i(a),ns(s,a))})),Ne("imGroupUnblocked",(function(e){var t=e.payload.to,n=[];(void 0===t?[]:t).forEach((function(e){n.push(q(e.uid))})),$i(n)})),Ne("imGroupOwnerAssigned",(function(e){var t=e.payload,n=t.from,r=t.to,o=void 0===r?[]:r,i=q(n.uid),s=Ae.getUid(),a=[];o.forEach((function(e){a.push(q(e.uid))})),i!==s&&a.push(i),$i(a),Pe("onGroupOwnerAssigned",e)})),Ne("imGroupAdminGranted",(function(e){var t=e.payload,n=t.from,r=t.to,o=void 0===r?[]:r,i=q(n.uid),s=Ae.getUid(),a=[];o.forEach((function(e){a.push(q(e.uid))})),i!==s&&a.push(i),$i(a),Pe("onGroupAdminGranted",e)})),Ne("imGroupAdminRevoked",(function(e){var t=e.payload,n=t.from,r=t.to,o=void 0===r?[]:r,i=q(n.uid),s=Ae.getUid(),a=[];o.forEach((function(e){a.push(q(e.uid))})),i!==s&&a.push(i),$i(a),Pe("onGroupAdminRevoked",e)})),Ne("imGroupMuted",(function(e){Pe("onGroupMuted",e)})),Ne("imGroupUnmuted",(function(e){Pe("onGroupUnmuted",e)})),Ne("imGroupUnblocked",(function(e){Pe("onGroupUnblocked",e)})),Ne("imGroupBaned",(function(e){var t=e.payload,n=t.gid,r=t.to,o=void 0===r?[]:r,i=t.content,s=q(n.uid),a=[];o.forEach((function(e){a.push(q(e.uid))})),Pe("onGroupBaned",{groupId:s,toUids:a,content:i})})),Ne("imGroupUnbaned",(function(e){var t=e.payload,n=t.gid,r=t.to,o=void 0===r?[]:r,i=q(n.uid),s=[];o.forEach((function(e){s.push(q(e.uid))})),Pe("onGroupUnbaned",{groupId:i,toUids:s})})),Ne("imGroupInfoUpdated",(function(e){var t=e.payload,n=t.gid,r=t.from,o=t.content,i=void 0===o?"{}":o,s=q(r.uid),a=q(n.uid),c={};try{c=JSON.parse(i)}catch(e){}if(Object.keys(c).length)if("display_name"===c.property&&c.display_name)ts(a,s,!1);else if("ban_expire_time"===c.property){var u=Object.assign({},be.getGroupInfo(a),c);be.saveGroupInfo([u]),Pe("onGroupListUpdate"),-1===c.ban_expire_time?Pe("onGroupBaned",{groupId:a,toUids:[],content:c.ban_expire_time,all:!0}):0===c.ban_expire_time&&Pe("onGroupUnbaned",{groupId:a,toUids:[],all:!0})}else{var f=Object.assign({},be.getGroupInfo(a),c);be.saveGroupInfo([f]),Pe("onGroupListUpdate")}})),Ne("imGroupAnnouncementUpdated",(function(e){var t=e.payload.gid,n=q(t.uid);Xi(n,!0),Pe("onGroupAnnouncementUpdated",e)})),Ne("imGroupMessageSetting",(function(){})),Ne("imGroupFileUploaded",(function(){})),Ne("imGroupFileDeleted",(function(){})),Ne("imGroupFileUpdated",(function(){})),Ne("imReadRosterMessage",(function(e){var t=e.roster_id,n=e.mid,r=e.isReceived,o=!1;if(n){var i=bt.getRosterMessageById(t,n);if(as(i)&&!r){o=!0;var s=st(t,n);Pe("sendMessage",s)}}else{var a;if(bt.getRosterMessage(t).forEach((function(e){if(as(e)&&!r){o=!0;var n=st(t,e.id);Pe("sendMessage",n)}a=e.id})),!r&&o){var c=ut(t,a);Pe("sendMessage",c)}}o&&Pe("onUnreadChange",t)}));var is=function e(t,n){var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ji(Object(n),!0).forEach((function(t){Wi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ji(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&("object"!==y(n[o])||null===n[o]||Array.isArray(n[o])?r[o]=n[o]:"object"!==y(r[o])||null===r[o]||Array.isArray(r[o])?r[o]=e({},n[o]):r[o]=e(r[o],n[o]));return r},ss=function(e,t,n,r,o){var i=W(e);if(o&&(o<i.timestamp||o<i.editTimestamp))return null;if(i.editTimestamp=o,t&&(i.appendedContent=t.slice(i.content.length),i.content=t),n){var s={};try{s=JSON.parse(n)}catch(e){}i.config=is(i.config,s),i.replaceConfig=s}if(r){var a={},c={};try{a=JSON.parse(i.ext),c=JSON.parse(r)}catch(e){}i.ext=JSON.stringify(is(a,c)),i.replaceExt=r}return i},as=function(e){var t=!1,n=cs(e,U.READ);if(e&&n){var r=Ae.getUid(),o=q(e.from);o>0&&o!=r&&(t=!0)}return t},cs=function(e,t){var n=!1;if(e&&e.status!=t){var r=e;r.status=t,bt.saveRosterMessage(W(r)),n=!0}return n};Ne("imReadGroupMessage",(function(e){var t=e.group_id,n=e.mid,r=e.isReceived,o=!1;if(n){var i=bt.getGroupMessageById(t,n),s=us(i),a=s.needAck,c=s.changed;if(a&&!r){o=!0;var u=H(i.from),f=st(u,n);Pe("sendMessage",f)}o||(o=c)}else{var l,d=bt.getGroupMessage(t);if(d.forEach((function(e){var t=us(e),n=t.needAck,i=t.changed;if(n&&!r){o=!0;var s=H(e.from),a=st(s,e.id);Pe("sendMessage",a)}l=e.id,o||(o=i)})),bt.saveFormatedGroupMessage(t,d),!r&&o){var p=ut(t,l);Pe("sendMessage",p)}}o&&Pe("onUnreadChange",t)}));var us=function(e){var t=!1,n=fs(e,U.READ);if(e&&n){var r=Ae.getUid(),o=q(e.from);o>0&&o!=r&&e.config&&e.config.groupMemberList&&(t=!0)}return{needAck:t,changed:n}},fs=function(e,t){var n=!1;if(e&&e.status!=t){var r=e;r.status=t,bt.saveGroupMessage(W(r)),n=!0}return n},ls=function(e,t){var n=[];(n=t?bt.getGroupMessage(e):bt.getRosterMessage(e)).length>0?je.saveRecent(n[n.length-1],!0):je.deleteRecentById(e)};Ne("onActionMessage",(function(e){var t=e.payload,n=e.from,r=e.to,o=e.isReceived,i=t.type,s=t.operation,a=void 0===s?{}:s,c=t.content,u=void 0===c?"":c,f=t.config,l=void 0===f?"":f,d=t.ext,p=void 0===d?"":d,h=t.edit_timestamp,g=Ae.getUid()+"",v=r?H(r.uid):0,y=H(n.uid),m=be.getJoinedGroups(),b=!!Array.isArray(m)&&-1!=m.indexOf(v-0),w=b||g+""==y+""?v:y,_=H(h||0);if(i===T.OPER){var S,C=a.type,E=a.mid,k=a.xid;if(S=b?bt.getGroupMessageById(w,E):bt.getRosterMessageById(w,E),C===A.READ_ACK)!b&&as(S),b&&us(S);else if(C===A.DELIVER_ACK)!b&&cs(S,U.DELIVERED),b&&fs(S,U.DELIVERED);else if(C===A.RECALL)!b&&bt.deleteSingleRosterMessage(w,E),b&&bt.deleteSingleGroupMessage(w,E),ls(w,b),Pe("onMessageRecalled",{uid:w,mid:E});else if(C===A.DELETE){var x=!!Array.isArray(m)&&-1!=m.indexOf(k.uid-0);!x&&bt.deleteSingleRosterMessage(k.uid,E),x&&bt.deleteSingleGroupMessage(k.uid,E),ls(k.uid,x),Pe("onMessageDeleted",{uid:k.uid,mid:E})}else C===A.READ_CANCEL?(!b&&cs(S,U.UNREAD),b&&fs(S,U.UNREAD),Pe("onMessageCanceled",{uid:w,mid:E})):C===A.READ_ALL?b?Pe("imReadGroupMessage",{group_id:k.uid,mid:E,isReceived:o}):Pe("imReadRosterMessage",{roster_id:k.uid,mid:E,isReceived:o}):C===A.PLAY_ACK?(!b&&function(e){var t=!1;if(e){var n=W(e);n.isPlayed=!0,bt.saveRosterMessage(n),t=!0}}(S),b&&function(e){if(e){var t=W(e);t.isPlayed=!0,bt.saveGroupMessage(t)}}(S)):C===A.APPEND?b?(!function(e,t,n,r,o){var i=!1;if(e&&t&&o){var s=W(e);if(s.editTimestamp<=o){if(s.content+=t,s.appendedContent=t,s.editTimestamp=o,n){var a={};try{a=JSON.parse(n)}catch(e){}s.config=is(s.config,a),s.appendConfig=a}if(r){var c={},u={};try{c=JSON.parse(s.ext),u=JSON.parse(r)}catch(e){}s.ext=JSON.stringify(is(c,u)),s.appendExt=r}bt.saveGroupMessage(s),je.saveRecent(s),i=!0}}}(S,u,l,p,_),Pe("onGroupMessageContentAppend",S)):(!function(e,t,n,r,o){var i=!1;if(e&&t&&o){var s=W(e);if(o>=s.editTimestamp&&o>=s.timestamp){if(s.content+=t,s.appendedContent=t,s.editTimestamp=o,n){var a={};try{a=JSON.parse(n)}catch(e){}s.config=is(s.config,a),s.appendConfig=a}if(r){var c={},u={};try{c=JSON.parse(s.ext),u=JSON.parse(r)}catch(e){}s.ext=JSON.stringify(is(c,u)),s.appendExt=r}bt.saveRosterMessage(s),je.saveRecent(s),i=!0}}}(S,u,l,p,_),Pe("onRosterMessageContentAppend",S)):C===A.REPLACE&&(b?(!function(e,t,n,r,o){var i=!1;if(e&&(t||n||r)&&o){var s=ss(e,t,n,r,o);s&&(bt.saveGroupMessage(s),je.saveRecent(s),i=!0)}}(S,u,l,p,_),Pe("onGroupMessageReplace",S)):(!function(e,t,n,r,o){var i=!1;if(e&&(t||n||r)){var s=ss(e,t,n,r,o);s&&(bt.saveRosterMessage(s),je.saveRecent(s),i=!0)}}(S,u,l,p,_),Pe("onRosterMessageReplace",S)));var R=H(k&&k.uid?k.uid:w);Pe("onMessageStatusChanged",{uid:R,mid:H(E)}),Pe("onUnreadChange",R)}}));var ds={};Ne("swapSendMessage",(function(e){var t=e.payload.meta.id;ds[H(t)]=e})),Ne("receivedSendMessage",(function(e,t){e=H(e);var n=ds[e];if(n){var r=n.payload.meta,o=r.payload;o.edit_timestamp=t,o.type===T.OPER&&Pe("onActionMessage",r)}})),Ne("deleteConversation",(function(e){var t=e.id,n=e.source;Pe("flooNotice",{category:"conversation_deleted",desc:{id:t,source:n}});var r=je.getRecentById(t),o=r.idx,i=r.type;o<0||("group"==i?bt.deleteGroupMessageByGid(t):bt.deleteRosterMessageByRosterId(t),je.deleteRecentById(t))}));var ps=ts,hs={asyncGetGroupInfo:function(e,t){e-=0;var n=be.getGroupInfo(e)||{};return n.name&&!t?Promise.resolve(n):Gi.groupInfo({group_id:e}).then((function(e){return be.saveGroupInfo([e]),e}))},asyncGetJoinedGroups:function(e){return e?Gi.groupUserjoined({}).then((function(e){return Array.isArray(e)?e:be.getGroupInfoList()})):Promise.resolve(be.getGroupInfoList())},openGroup:function(e){Gi.groupMemberlist({group_id:e}).then((function(t){be.saveGroupMembers(e,t);var n=t.map((function(e){return e.user_id}));n.length&&ps(e,n,!1,!0),Pe("onGroupMemberChanged",e)}))},getAllGroupDetail:function(){return be.getAllGroupInfos()},asyncGetGroupMembers:function(e){return Gi.groupMemberlist({group_id:e}).then((function(t){be.saveGroupMembers(e,t);var n=t.map((function(e){return e.user_id}));return n.length&&ps(e,n,!1,!0),n}))},getGroupMembers:function(e){return be.getGroupMembers(e)||[]},asyncGetGroupListDetail:function(e){return e&&e.length?Gi.groupInfoBatch({group_list:e}).then((function(e){return be.saveGroupInfo(e),e})):Promise.resolve({})},getGruopMessage:function(e){return bt.getGroupMessage(e)},readGroupMessage:function(e,t){Pe("imReadGroupMessage",{group_id:e,mid:t})},recallMessage:function(e,t){var n=at(e,t);Pe("swapSendMessage",B(n)),Pe("sendMessage",n)},deleteMessage:function(e,t){var n=ct(e,t);Pe("swapSendMessage",B(n)),Pe("sendMessage",n)},appendMessageContent:function(e,t,n){var r=ft(e,t,n);Pe("swapSendMessage",B(r)),Pe("sendMessage",r)},replaceMessage:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(n||r||o){var i=lt(e,t,n,r,o);Pe("swapSendMessage",B(i)),Pe("sendMessage",i)}else;},getUnreadCount:function(e){return bt.getUnreadByGroupId(e)},consumeGroupAtStatus:function(e){return je.updateRecentsAt(e,!1)},asyncGetAdminList:Gi.groupAdminList,asyncAdminAdd:Gi.groupAdminAdd,asyncAdminRemove:Gi.groupAdminRemove,asyncGetAnouncementById:Gi.groupAnnouncement,asyncAnouncementDelete:Gi.groupAnnouncementDelete,asyncAnnouncementEdit:Gi.groupAnnouncementEdit,asyncGetAnnouncementList:Gi.groupAnnouncementList,asyncCreate:Gi.groupCreate,asyncDestroy:Gi.groupDestroy,asyncGetInfo:function(e){return e.group_id||(e={group_id:e}),Gi.groupInfo(e)},asyncUpdateAvatar:Gi.groupInfoAvatar,asyncUpdateDescription:Gi.groupInfoDdscription,asyncUpdateExt:Gi.groupInfoExt,asyncUpdateName:Gi.groupInfoName,asyncGetMemberList:function(e){return e.group_id||(e={group_id:e}),Gi.groupMemberlist(e)},asyncGroupMsgMutemode:Gi.groupMsgMutemode,asyncGetPublicList:Gi.groupPubliclist,asyncUpdateMsgNotDisturb:Gi.groupMsgNotdisturb,asyncGroupBannedList:Gi.groupBannedList,asyncGroupBab:Gi.groupBab,asyncGroupUnban:Gi.groupUnban,asyncGetSettings:Gi.groupSettings,asyncUpdateAllowMemberInvitation:Gi.groupSettingsAllowmemberinvitation,asyncUpdateAllowMemberModify:Gi.groupSettingsAllowmembermodify,asyncUpdateEnableReadack:Gi.groupSettingsEnablereadack,asyncUpdateHistoryVisible:Gi.groupSettingsHistoryvisible,asyncHideMemberInfo:Gi.groupSettingsHideMemberInfo,asyncUpdateRequireadminapproval:Gi.groupSettingsRequireadminapproval,asyncBanAll:Gi.groupSettingsBanAll,asyncUnBanAll:Gi.groupSettingsUnBanAll,asyncOwnerTransfer:Gi.groupTransfer,asyncGetUserJoined:Gi.groupUserjoined,asyncApply:Gi.groupApply,asyncApplyHandle:Gi.groupApplyHandle,asyncGroupBockedlist:Gi.groupBockedlist,asyncGroupBlock:Gi.groupBlock,asyncGroupUnblock:Gi.groupUnblock,asyncKick:Gi.groupKick,asyncGetInvitationList:Gi.groupInvitationlist,asyncInvite:Gi.groupInvite,asyncInviteHandle:Gi.groupInviteHandle,asyncGetMemberDisplayName:Gi.groupMembersDidpayname,asyncLeave:Gi.groupLeave,asyncUpdateDisplayName:Gi.groupDisplayname,asncGetApplicationList:Gi.groupApplicationlist,asyncGetFileList:Gi.groupFilelist,asyncFileDelete:Gi.groupFiledelete,asyncFileUpload:Gi.groupFileupload},gs={getToken:function(){return Ae.getToken()},getUid:function(){return Ae.getUid()},getAppid:function(){return Ae.getAppid()},getConversationList:function(){return je.getRecents()},deleteToken:Ae.deleteToken,getDeviceSN:function(){return Ae.getDeviceSN()},asyncGetDeviceList:Gi.userDeviceList,asyncKickDevice:Gi.userKick,asyncBindDeviceToken:Gi.bindDeviceToken,asyncUnbindDeviceToken:Gi.unbindDeviceToken,asyncDeleteUser:Gi.userDelete,asyncTokenUser:Gi.tokenUser,asyncTokenId:Gi.tokenId,asyncRegister:Gi.userRegister,asyncRegisterAnonymous:Gi.userRegisterAnonymous,asyncGenerateSecretInfo:Gi.userGenerateSecretInfo,asyncSendSecretInfo:Gi.userSendSecretInfo,asyncUserBindMobile:Gi.userBindMobile,asyncUserUpdateMobile:Gi.userUpdateMobile,asyncUserSendSms:Gi.userSendSms,asyncCaptchaSms:Gi.captchaSms,aysncGenerateWXUrlLink:Gi.generateWXUrlLink,asyncUserNameCheck:Gi.userNameCheck,asyncUserMobileBind:Gi.userMobileBind,asyncUserMobileBindSign:Gi.userMobileBindSign,asyncUserMobileLogin:Gi.userMobileLogin,asyncCaptchaImagePost:Gi.captchaImagePost,asyncUpdateAuthmode:Gi.userAuthmode,asyncUpdateAvatar:Gi.userAvatar,asyncUpdateMobile:Gi.userMobile,asyncUpdateNickName:Gi.userNickname,asyncUserChangePassword:Gi.userChangePassword,asyncGetProfile:Gi.userProfile,asyncUpdateProfile:Gi.userProfilePost,asyncGetSettings:Gi.userSettings,asyncUpdateSettings:Gi.userSettingsPost,asyncGetUserVerification:Gi.getUserVerification,userVerificationByMobile:Gi.userVerificationByMobile,userChangeMobileCheckPassword:Gi.userChangeMobileCheckPassword,userChangeMobileCheckMobile:Gi.userChangeMobileCheckMobile,userChangeMobile:Gi.userChangeMobile},vs=(n(351),function(e){var t=e.url,n=void 0===t?"":t,r=e.params,o=void 0===r?{}:r;if(!n)return"";var i=Ae.getToken(),s=Ae.getAppid();return o=Object.assign(o,{"access-token":i,app_id:s}),n.indexOf("?")>0?n+="&":n+="?",n+Et.a.stringify(o)}),ys=function(e){var t=e.url,n=void 0===t?"":t,r=e.type,o=void 0===r?"":r,i=e.params,s=void 0===i?{}:i,a=e.processCallback,c=void 0===a?void 0:a;if(console.log("Download chat file: ",o," ",n),!n)return"";return Gi.fileDownloadChatFileUrl(n,s,{operation:"download_file"},c)},ms=function(e,t,n){return new Promise((function(r,o){return"image"!=t&&"shareImage"!=t&&"rosterAvatar"!=n&&"groupAvatar"!=n?r(e):e.type.startsWith("image/")?void("image/webp"===e.type?bs(e).then((function(t){return t?ws(e):e})).then(r).catch(o):r(e)):r(e)}))},bs=function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(e){var n=new Uint8Array(e.target.result),r=String.fromCharCode.apply(String,ee(n.slice(8,16)));t("WEBPVP8X"===r)},r.onerror=n,r.readAsArrayBuffer(e)}))},ws=function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(r){var o=new Image;o.onload=function(){var n=document.createElement("canvas");n.width=o.width,n.height=o.height,n.getContext("2d").drawImage(o,0,0),n.toBlob((function(n){var r=new File([n],e.name.replace(/\.webp$/i,".png"),{type:"image/png"});t(r)}),"image/png")},o.onerror=n,o.src=r.target.result},r.onerror=n,r.readAsDataURL(e)}))},_s={getStaticVars:function(){return r},sendRosterMessage:function(e){var t=it(e),n=t.payload.meta;return bt.saveSendingRosterMessage(n),Gi.sendMessage(t),n.id},sendGroupMessage:function(e){var t=ot(e),n=t.payload.meta;return bt.saveSendingGroupMessage(n),Gi.sendMessage(t),n.id},sendMentionMessage:function(e){var t=function(e){var t=e.gid,n=e.txt,r=e.mentionAll,o=e.mentionList,i=e.mentionedMessage,s=e.pushMessage,a=e.senderNickname,c=R.TEXT,u=new Ue({uid:Ae.getUid()-0,deviceSN:tt}),f=new Ue({uid:t,deviceSN:0}),l=new qe;l.setCommond(_.SYNC);var d=new ze,p=new Be({from:u,to:f,content:n,ctype:c,type:T.GROUPCHAT});p.config=JSON.stringify({mentionAll:r,mentionList:o,mentionedMessage:i,pushMessage:s,senderNickname:a});var h=new Ye({id:(new Date).getTime(),from:u,to:f,payload:p,ns:x.MESSAGE});return d.setMeta(h),l.setPayload(d),l}(e),n=t.payload.meta;return bt.saveSendingGroupMessage(n),Gi.sendMessage(t),n.id},sendInputStatusMessage:function(e,t){var n=function(e,t){var n=R.TEXT,r=new Ue({uid:Ae.getUid()-0,deviceSN:tt}),o=new Ue({uid:e-0,deviceSN:0}),i=new qe;i.setCommond(_.SYNC);var s=new ze,a=new Be({from:r,to:o,ctype:n,type:T.CHAT,ext:JSON.stringify({input_status:t}),qos:O.AT_MOST_ONCE}),c=new Ye({id:(new Date).getTime(),from:r,to:o,payload:a,ns:x.MESSAGE});return s.setMeta(c),i.setPayload(s),i}(e,t),r=n.payload.meta;return Gi.sendMessage(n),r.id},sendMessage:Gi.sendMessage,getNoticeMessage:wt.getNotice(),getMessageStatus:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r={};if(r=n?bt.getGroupMessageById(e,t):bt.getRosterMessageById(e,t)){var o=Object.keys(U)[r.status||0];return o?o.toLowerCase():void 0}},forwardMessage:function(e){var t=e.uid,n=e.gid,r=e.message,o=r.attach;if(!o||!o.url){var i=dt(t,n,r),s=i.payload.meta;return t?bt.saveSendingRosterMessage(s):bt.saveSendingGroupMessage(s),Gi.sendMessage(i),s.id}var a=o.url.split("sign=")[1],c=Ae.getToken();Gi.fileForward({file_sign:a,"access-token":c,to_id:(t||n)-0,to_type:t?1:2}).then((function(e){r.attach.url=e;var o=dt(t,n,r),i=o.payload.meta;return t?bt.saveSendingRosterMessage(i):bt.saveSendingGroupMessage(i),Gi.sendMessage(o),i.id}))},asyncFileUpload:function(e){return new Promise((function(t,n){var r=e.group_id,o=e.to_id,i=e.toType,s=e.file,a=e.fileType,c=e.chatType,u=e.processCallback;ms(s,a,i).then((function(e){var s="";s="rosterAvatar"===i?"fileUploadAvatarUrl":"chat"==i?"fileUploadChatFileUrl":"fileUploadGroupAvatarUrl";var f={},l=Ae.getToken();"groupAvatar"===i&&(f["access-token"]=l);a&&(f.file_type=["file","audio","image","video","audio-mp3"].indexOf(a)+100),f<100&&(f.file_type=["shareFile","shareAudio","shareImage","shareVideo"].indexOf(a)+200),r&&(f.group_id=r),"group"==c&&(f.to_type=2),"roster"==c&&(f.to_type=1),o&&(f.to_id=o),Gi[s](f).then((function(n){var r=new FormData;n.oss_body_param&&n.oss_body_param.key&&(r.append("OSSAccessKeyId",n.oss_body_param.OSSAccessKeyId),r.append("policy",n.oss_body_param.policy),r.append("signature",n.oss_body_param.signature),r.append("callback",n.oss_body_param.callback),r.append("key",n.oss_body_param.key)),r.append("file",e);Gi.asyncFileUpload(n.upload_url,r,{headers:{"Content-Type":"multipart/form-data"}},u).then((function(){t({url:n.download_url})})).catch((function(e){d.error("Fail to upload file due to ",e)}))})).catch((function(e){n(e)}))})).catch(n)}))},requireHistoryMessage:function(e,t,n){var r=function(e,t,n){t=V(t);var r=new qe;r.setCommond(_.SYNC);var o=new Ue({uid:q(e),deviceSN:0}),i=new ze;return i.setXid(o),i.setKey(q(t)),i.setFullsyncnum(n),i.setIsfullsync(!0),r.setPayload(i),r}(e,t,n);Gi.sendMessage(r)},makeSearch:function(e){var t=[],n=[];return(St.getRosterInfoList()||[]).forEach((function(n){var r=!1,o=n.user_id,i=n.username,s=n.avatar;(bt.getRosterMessage(o)||[]).forEach((function(n){if(!r){var a=n.payload,c=(void 0===a?{}:a).content,u=void 0===c?"":c;u.indexOf(e)>=0&&(r=!0,t.push({user_id:o,username:i,avatar:s,content:u}))}})),r||i&&i.indexOf(e)>=0&&t.push({user_id:o,username:i,avatar:s})})),be.getGroupInfoList().forEach((function(t){var r=!1,o=t.group_id,i=t.name;(bt.getGroupMessage(o)||[]).forEach((function(t){if(!r){var s=t.payload,a=(void 0===s?{}:s).content,c=void 0===a?"":a;c.indexOf(e)>=0&&(r=!0,n.push({group_id:o,name:i,content:c}))}})),r||i&&i.indexOf(e)>=0&&n.push({group_id:o,name:i})})),{rosterArr:t,groupArr:n}},asyncGetUserAvatarUploadUrl:Gi.fileUploadAvatarUrl,asyncGetGroupAvatarUploadUrl:Gi.fileUploadGroupAvatarUrl,asyncGetFileUploadChatFileUrl:Gi.fileUploadChatFileUrl,asyncQrcode:Gi.qrcode,asyncQrlogin:Gi.qrlogin,asyncQrcodeGroupsign:Gi.qrcodeGroupsign,asyncQrcodeGroupinvite:Gi.qrcodeGroupinvite,asyncWoaQrcode:Gi.woaqrcode,asyncWoaQrcodeStatus:Gi.woaqrcodestatus,asyncWoaQrlogin:Gi.woaqrlogin,asyncWoaIsBind:Gi.woaIsBind,asyncWxlogin:Gi.wxlogin,asyncWxbind:Gi.wxbind,asyncGetStaticContact:Gi.getStaticContact,getImage:function(e){var t=e.avatar,n=void 0===t?"":t,r=e.type,o=void 0===r?"roster":r,i=e.thumbnail,s=void 0===i||i,a=e.sdefault,c=void 0===a?"":a;if(/^\//.test(n))return n;if(!n)return"roster"===o?c||"/image/roster.png":c||"/image/group.png";var u=n,f={};if(0!==n.indexOf("http")){var l=Ae.getAppid(),d=(Wt.getServers(l)||{}).ratel;!/\/$/.test(d)&&d.length>5&&(u=d+"/file/download/avatar"),f=Object.assign(f,{object_name:n})}return s&&(f=Object.assign(f,{image_type:2})),vs({url:u,type:"image",params:f})},getAudio:function(e){var t=e.url,n=e.type;return vs({url:t,type:void 0===n?"audio":n,params:{format:"mp3"}})},getChatFile:vs,downloadAudio:function(e){var t=e.url,n=void 0===t?"":t,r=e.type,o=void 0===r?"audio":r,i=e.processCallback;return ys({url:n,type:o,params:{format:"mp3"},processCallback:void 0===i?void 0:i})},getServers:Wt.getServers,getLinkServer:Ae.getLinkServer,getAppConfig:Wt.getAppConfig,getAppStatus:Wt.getAppStatus,getAccountVerification:Wt.getAccountVerification,getServerIp:Wt.getServerIp,asyncWechatUnbind:Gi.wechatUnbind,asyncWechatIsbind:Gi.wechatIsbind,asyncWechatBind:Gi.wechatBind,aysncParseLink:Gi.parseLink,aysncParseLinkV2:function(e){var t=Wt.getLinkServerList(),n=[];for(var r in t)n.push("https://"+t[r].domain+"/info");return 0==n.length&&n.push("https://lanyinglink.com/info"),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2e4;if(!Array.isArray(e)||0===e.length)return Promise.reject({code:"NO_URLS",message:"urls 不能为空"});if(1===e.length)return a(t(e[0]),r);var o=!1,i=0,s=null;function a(e,t){return new Promise((function(n,r){var o=setTimeout((function(){return r({code:"TIMEOUT",message:"timeout"})}),t);e.then((function(e){clearTimeout(o),n(e)})).catch((function(e){clearTimeout(o),e&&y(e),r(e)}))}))}return new Promise((function(c,u){e.forEach((function(f,l){setTimeout((function(){o||a(t(f),r).then((function(e){o||(o=!0,c(e))})).catch((function(t){o||(t&&"object"===y(t)&&"code"in t&&"message"in t?(o=!0,u(t)):(s=t,++i===e.length&&(o=!0,u(s))))}))}),l*n)}))}))}(n,(function(t){return Gi.parseLink(t,{link:e})}),1e3,2e4)},deleteConversation:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Pe("deleteConversation",{id:e,other_devices:t,source:"user_operation"});var n=pt(e,t);Gi.sendMessage(n)}},Ss=(n(352),n(142)),Cs=n.n(Ss);function Es(e,t,n,r,o,i,s){try{var a=e[i](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Cs.a.resolve(c).then(r,o)}function ks(e){return function(){var t=this,n=arguments;return new Cs.a((function(r,o){var i=e.apply(t,n);function s(e){Es(i,r,o,s,a,"next",e)}function a(e){Es(i,r,o,s,a,"throw",e)}s(void 0)}))}}n(364);function xs(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ts(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ts(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function Ts(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var As=n(367).default,Rs=n(365),Os=n(91);Is.sessions={},Is.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){var e=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),t=33;return window.navigator.userAgent.match("Linux")&&(t=35),e>=26&&e<=t||Is.extension.isInstalled()}return!0};var Ns={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(e){var t=window.setTimeout((function(){var t=new Error("NavigatorUserMediaError");return t.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',e(t)}),1e3);this.cache[t]=e,window.postMessage({type:"janusGetScreen",id:t},"*")},init:function(){var e={};this.cache=e,window.addEventListener("message",(function(t){if(t.origin==window.location.origin)if("janusGotScreen"==t.data.type&&e[t.data.id]){var n=e[t.data.id];if(delete e[t.data.id],""===t.data.sourceId){var r=new Error("NavigatorUserMediaError");r.name="You cancelled the request for permission, giving up...",n(r)}else n(null,t.data.sourceId)}else"janusGetScreenPending"==t.data.type&&(console.log("clearing ",t.data.id),window.clearTimeout(t.data.id))}))}};function Is(e){if((e=e||{}).success="function"==typeof e.success?e.success:Is.noop,e.error="function"==typeof e.error?e.error:Is.noop,e.destroyed="function"==typeof e.destroyed?e.destroyed:Is.noop,!Is.initDone)return e.error("Library not initialized"),{};if(!Is.isWebrtcSupported())return e.error("WebRTC not supported by this browser"),{};if(Is.log("Library initialized: "+Is.initDone),!e.server)return e.error("Invalid server url"),{};var t=!1,n=null,r={},o=null,i=null,s=0,a=e.server;Is.isArray(a)?(Is.log("Multiple servers provided ("+a.length+"), will use the first that works"),a=null,i=e.server,Is.debug(i)):0===a.indexOf("ws")?(t=!0,Is.log("Using WebSockets to contact Janus: "+a)):(t=!1,Is.log("Using REST API to contact Janus: "+a));var c=e.iceServers||[{urls:"stun:stun.maximtop.cn:3478"}],u=e.iceTransportPolicy,f=e.bundlePolicy,l=!1;void 0!==e.withCredentials&&null!==e.withCredentials&&(l=!0===e.withCredentials);var d=10;void 0!==e.max_poll_events&&null!==e.max_poll_events&&(d=e.max_poll_events),d<1&&(d=1);var p=null;void 0!==e.token&&null!==e.token&&(p=e.token);var h=null;void 0!==e.apisecret&&null!==e.apisecret&&(h=e.apisecret),this.destroyOnUnload=!0,void 0!==e.destroyOnUnload&&null!==e.destroyOnUnload&&(this.destroyOnUnload=!0===e.destroyOnUnload);var g=25e3;void 0!==e.keepAlivePeriod&&null!==e.keepAlivePeriod&&(g=e.keepAlivePeriod),isNaN(g)&&(g=25e3);var v=6e4;function m(e){var t={high:9e5,medium:3e5,low:1e5};return null!=e&&(e.high&&(t.high=e.high),e.medium&&(t.medium=e.medium),e.low&&(t.low=e.low)),t}void 0!==e.longPollTimeout&&null!==e.longPollTimeout&&(v=e.longPollTimeout),isNaN(v)&&(v=6e4);var b=!1,w=null,_={},S=this,C=0,E={};function k(){if(null!=w)if(Is.debug("Long poll..."),b){var t=a+"/"+w+"?rid="+(new Date).getTime();d&&(t=t+"&maxev="+d),p&&(t=t+"&token="+encodeURIComponent(p)),h&&(t=t+"&apisecret="+encodeURIComponent(h)),Is.httpAPICall(t,{verb:"GET",withCredentials:l,success:x,timeout:v,error:function(t,n){if(Is.error(t+":",n),++C>3)return b=!1,void e.error("Lost connection to the server (is it down?)");k()}})}else Is.warn("Is the server down? (connected=false)")}function x(e,r){if(C=0,t||null==w||!0===r||k(),t||!Is.isArray(e))if("keepalive"!==e.janus)if("server_info"!==e.janus)if("ack"!==e.janus)if("success"!==e.janus)if("trickle"===e.janus){var o=e.sender;if(!o)return void Is.warn("Missing sender...");var i=_[o];if(!i)return void Is.debug("This handle is not attached to this session");var s=e.candidate;Is.debug("Got a trickled candidate on session "+w),Is.debug(s);var a=i.webrtcStuff;a.pc&&a.remoteSdp?(Is.debug("Adding remote candidate:",s),s&&!0!==s.completed?a.pc.addIceCandidate(s):a.pc.addIceCandidate(Is.endOfCandidates)):(Is.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),a.candidates||(a.candidates=[]),a.candidates.push(s),Is.debug(a.candidates))}else{if("webrtcup"===e.janus){Is.debug("Got a webrtcup event on session "+w),Is.debug(e);var c=e.sender;if(!c)return void Is.warn("Missing sender...");var u=_[c];return u?void u.webrtcState(!0):void Is.debug("This handle is not attached to this session")}if("hangup"===e.janus){Is.debug("Got a hangup event on session "+w),Is.debug(e);var f=e.sender;if(!f)return void Is.warn("Missing sender...");var l=_[f];if(!l)return void Is.debug("This handle is not attached to this session");l.webrtcState(!1,e.reason),l.hangup()}else if("detached"===e.janus){Is.debug("Got a detached event on session "+w),Is.debug(e);var d=e.sender;if(!d)return void Is.warn("Missing sender...");var p=_[d];if(!p)return;p.ondetached(),p.detach()}else if("media"===e.janus){Is.debug("Got a media event on session "+w),Is.debug(e);var h=e.sender;if(!h)return void Is.warn("Missing sender...");var g=_[h];if(!g)return void Is.debug("This handle is not attached to this session");g.mediaState(e.type,e.receiving,e.mid)}else if("slowlink"===e.janus){Is.debug("Got a slowlink event on session "+w),Is.debug(e);var v=e.sender;if(!v)return void Is.warn("Missing sender...");var y=_[v];if(!y)return void Is.debug("This handle is not attached to this session");y.slowLink(e.uplink,e.lost,e.mid)}else{if("error"===e.janus){Is.error("Ooops: "+e.error.code+" "+e.error.reason),Is.debug(e);var m=e.transaction;if(m){var b=E[m];b&&b(e),delete E[m]}return}if("event"===e.janus){Is.debug("Got a plugin event on session "+w),Is.debug(e);var S=e.sender;if(!S)return void Is.warn("Missing sender...");var T=e.plugindata;if(!T)return void Is.warn("Missing plugindata...");Is.debug(" -- Event is coming from "+S+" ("+T.plugin+")");var A=T.data;Is.debug(A);var R=_[S];if(!R)return void Is.warn("This handle is not attached to this session");var O=e.jsep;O&&(Is.debug("Handling SDP as well..."),Is.debug(O));var N=R.onmessage;N?(Is.debug("Notifying application..."),N(A,O)):Is.debug("No provided notification callback")}else{if("timeout"===e.janus)return Is.error("Timeout on session "+w),Is.debug(e),void(t&&n.close(3504,"Gateway timeout"));Is.warn("Unknown message/event '"+e.janus+"' on session "+w),Is.debug(e)}}}else{Is.debug("Got a success on session "+w),Is.debug(e);var I=e.transaction;if(I){var P=E[I];P&&P(e),delete E[I]}}else{Is.debug("Got an ack on session "+w),Is.debug(e);var D=e.transaction;if(D){var M=E[D];M&&M(e),delete E[D]}}else{Is.debug("Got info on the Janus instance"),Is.debug(e);var j=e.transaction;if(j){var L=E[j];L&&L(e),delete E[j]}}else Is.vdebug("Got a keepalive on session "+w);else for(var U=0;U<e.length;U++)x(e[U],!0)}function T(){if(a&&t&&b){o=setTimeout(T,g);var e={janus:"keepalive",session_id:w,transaction:Is.randomString(12)};p&&(e.token=p),h&&(e.apisecret=h),n.send(e)}}function A(c){var u=Is.randomString(12),f={janus:"create",transaction:u};if(c.reconnect&&(b=!1,f.janus="claim",f.session_id=w,n&&(n.onopen=null,n.onerror=null,n.onclose=null,o&&(clearTimeout(o),o=null))),p&&(f.token=p),h&&(f.apisecret=h),!a&&Is.isArray(i)&&(0===(a=i[s]).indexOf("ws")?(t=!0,Is.log("Server #"+(s+1)+": trying WebSockets to contact Janus ("+a+")")):(t=!1,Is.log("Server #"+(s+1)+": trying REST API to contact Janus ("+a+")"))),t){for(var d in n=Is.newWebSocket(a,"janus-protocol"),r={error:function(){if(Is.error("Error connecting to the Janus WebSockets server... "+a),Is.isArray(i)&&!c.reconnect)return++s===i.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(a=null,void setTimeout((function(){A(c)}),200));c.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){E[u]=function(e){if(Is.debug(e),"success"!==e.janus)return Is.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);o=setTimeout(T,g),b=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?Is.log("Claimed session: "+w):Is.log("Created session: "+w),Is.sessions[w]=S,c.success()},n.send(f)},message:function(e){x(e)},close:function(){a&&b&&(b=!1,e.error("Lost connection to the server (is it down?)"))}})n.addEventListener(d,r[d]);0===n.readyState&&n.emit("open")}else Is.httpAPICall(a,{verb:"POST",withCredentials:l,body:f,success:function(e){if(Is.debug(e),"success"!==e.janus)return Is.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);b=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?Is.log("Claimed session: "+w):Is.log("Created session: "+w),Is.sessions[w]=S,k(),c.success()},error:function(e,t){if(Is.error(e+":",t),Is.isArray(i)&&!c.reconnect)return++s===i.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(a=null,void setTimeout((function(){A(c)}),200));""===t?c.error(e+": Is the server down?"):t&&t.error?c.error(e+": "+t.error.message):c.error(e+": "+t)}})}function R(e,r){if((r=r||{}).success="function"==typeof r.success?r.success:Is.noop,r.error="function"==typeof r.error?r.error:Is.noop,!b)return Is.warn("Is the server down? (connected=false)"),void r.error("Is the server down? (connected=false)");var o=_[e];if(!o||!o.webrtcStuff)return Is.warn("Invalid handle"),void r.error("Invalid handle");var i=r.message,s=r.jsep,c=Is.randomString(12),u={janus:"message",body:i,transaction:c};if(o.token&&(u.token=o.token),h&&(u.apisecret=h),s&&(u.jsep={type:s.type,sdp:s.sdp},s.e2ee&&(u.jsep.e2ee=!0),"hml"!==s.rid_order&&"lmh"!==s.rid_order||(u.jsep.rid_order=s.rid_order),s.force_relay&&(u.jsep.force_relay=!0)),Is.debug("Sending message to plugin (handle="+e+"):"),Is.debug(u),t)return u.session_id=w,u.handle_id=e,E[c]=function(e){if(Is.debug("Message sent!"),Is.debug(e),"success"===e.janus){var t=e.plugindata;if(!t)return Is.warn("Request succeeded, but missing plugindata..."),void r.success();Is.log("Synchronous transaction successful ("+t.plugin+")");var n=t.data;return Is.debug(n),void r.success(n)}"ack"===e.janus?r.success():e.error?(Is.error("Ooops: "+e.error.code+" "+e.error.reason),r.error(e.error.code+" "+e.error.reason)):(Is.error("Unknown error"),r.error("Unknown error"))},void n.send(u);Is.httpAPICall(a+"/"+w+"/"+e,{verb:"POST",withCredentials:l,body:u,success:function(e){if(Is.debug("Message sent!"),Is.debug(e),"success"===e.janus){var t=e.plugindata;if(!t)return Is.warn("Request succeeded, but missing plugindata..."),void r.success();Is.log("Synchronous transaction successful ("+t.plugin+")");var n=t.data;return Is.debug(n),void r.success(n)}"ack"===e.janus?r.success():e.error?(Is.error("Ooops: "+e.error.code+" "+e.error.reason),r.error(e.error.code+" "+e.error.reason)):(Is.error("Unknown error"),r.error("Unknown error"))},error:function(e,t){Is.error(e+":",t),r.error(e+": "+t)}})}function O(e,r){if(b){var o=_[e];if(o&&o.webrtcStuff){var i={janus:"trickle",candidate:r,transaction:Is.randomString(12)};if(o.token&&(i.token=o.token),h&&(i.apisecret=h),Is.vdebug("Sending trickle candidate (handle="+e+"):"),Is.vdebug(i),t)return i.session_id=w,i.handle_id=e,void n.send(i);Is.httpAPICall(a+"/"+w+"/"+e,{verb:"POST",withCredentials:l,body:i,success:function(e){Is.vdebug("Candidate sent!"),Is.vdebug(e),"ack"===e.janus||Is.error("Ooops: "+e.error.code+" "+e.error.reason)},error:function(e,t){Is.error(e+":",t)}})}else Is.warn("Invalid handle")}else Is.warn("Is the server down? (connected=false)")}function N(e,t,n,r,o){var i=_[e];if(i&&i.webrtcStuff){var s=i.webrtcStuff;if(s.pc){var a=function(e){Is.log("Received state change on data channel:",e);var t=e.target.label,n=e.target.protocol,r=s.dataChannel[t]?s.dataChannel[t].readyState:"null";if(Is.log("State change on <"+t+"> data channel: "+r),"open"===r){if(s.dataChannel[t].pending&&s.dataChannel[t].pending.length>0){Is.log("Sending pending messages on <"+t+">:",s.dataChannel[t].pending.length);var o,a=xs(s.dataChannel[t].pending);try{for(a.s();!(o=a.n()).done;){var c=o.value;Is.log("Sending data on data channel <"+t+">"),Is.debug(c),s.dataChannel[t].send(c)}}catch(e){a.e(e)}finally{a.f()}s.dataChannel[t].pending=[]}i.ondataopen(t,n)}};if(r)s.dataChannel[t]=r;else{var c=s.dataChannelOptions;n&&(c.protocol=n),s.dataChannel[t]=s.pc.createDataChannel(t,c)}s.dataChannel[t].onmessage=function(e){Is.log("Received message on data channel:",e);var t=e.target.label;i.ondata(e.data,t)},s.dataChannel[t].onopen=a,s.dataChannel[t].onclose=a,s.dataChannel[t].onerror=function(e){Is.error("Got error on data channel:",e)},s.dataChannel[t].pending=[],o&&s.dataChannel[t].pending.push(o)}else Is.warn("Invalid PeerConnection")}else Is.warn("Invalid handle")}function I(e,t){(t=t||{}).success="function"==typeof t.success?t.success:Is.noop,t.error="function"==typeof t.error?t.error:Is.noop;var n=_[e];if(!n||!n.webrtcStuff)return Is.warn("Invalid handle"),void t.error("Invalid handle");var r=n.webrtcStuff,o=t.text||t.data;if(!o)return Is.warn("Invalid data"),void t.error("Invalid data");var i=t.label?t.label:Is.dataChanDefaultLabel;return r.dataChannel[i]?"open"!==r.dataChannel[i].readyState?(r.dataChannel[i].pending.push(o),void t.success()):(Is.log("Sending data on data channel <"+i+">"),Is.debug(o),r.dataChannel[i].send(o),void t.success()):(N(e,i,t.protocol,!1,o,t.protocol),void t.success())}function P(e,t){(t=t||{}).success="function"==typeof t.success?t.success:Is.noop,t.error="function"==typeof t.error?t.error:Is.noop;var n=_[e];if(!n||!n.webrtcStuff)return Is.warn("Invalid handle"),void t.error("Invalid handle");var r=n.webrtcStuff;if(!r.dtmfSender){if(r.pc){var o=r.pc.getSenders().find((function(e){return e.track&&"audio"===e.track.kind}));if(!o)return Is.warn("Invalid DTMF configuration (no audio track)"),void t.error("Invalid DTMF configuration (no audio track)");r.dtmfSender=o.dtmf,r.dtmfSender&&(Is.log("Created DTMF Sender"),r.dtmfSender.ontonechange=function(e){Is.debug("Sent DTMF tone: "+e.tone)})}if(!r.dtmfSender)return Is.warn("Invalid DTMF configuration"),void t.error("Invalid DTMF configuration")}var i=t.dtmf;if(!i)return Is.warn("Invalid DTMF parameters"),void t.error("Invalid DTMF parameters");var s=i.tones;if(!s)return Is.warn("Invalid DTMF string"),void t.error("Invalid DTMF string");var a="number"==typeof i.duration?i.duration:500,c="number"==typeof i.gap?i.gap:50;Is.debug("Sending DTMF string "+s+" (duration "+a+"ms, gap "+c+"ms)"),r.dtmfSender.insertDTMF(s,a,c),t.success()}function D(e,r){(r=r||{}).success="function"==typeof r.success?r.success:Is.noop,r.error="function"==typeof r.error?r.error:Is.noop;var o=!0===r.noRequest;Is.log("Destroying handle "+e+" (only-locally="+o+")"),te(e);var i=_[e];if(!i||i.detached)return delete _[e],void r.success();if(i.detached=!0,o)return delete _[e],void r.success();if(!b)return Is.warn("Is the server down? (connected=false)"),void r.error("Is the server down? (connected=false)");var s={janus:"detach",transaction:Is.randomString(12)};if(i.token&&(s.token=i.token),h&&(s.apisecret=h),t)return s.session_id=w,s.handle_id=e,n.send(s),delete _[e],void r.success();Is.httpAPICall(a+"/"+w+"/"+e,{verb:"POST",withCredentials:l,body:s,success:function(t){Is.log("Destroyed handle:"),Is.debug(t),"success"!==t.janus&&Is.error("Ooops: "+t.error.code+" "+t.error.reason),delete _[e],r.success()},error:function(t,n){Is.error(t+":",n),delete _[e],r.success()}})}function M(e,t){var n=_[e];if(!n||!n.webrtcStuff)throw Is.warn("Invalid handle"),"Invalid handle";var r=n.webrtcStuff;if(!r.pc){var o={iceServers:c,iceTransportPolicy:u,bundlePolicy:f,sdpSemantics:"unified-plan"},i=!1;if(t.tracks){var s,a=xs(t.tracks);try{for(a.s();!(s=a.n()).done;){var l=s.value;if(l.transforms&&(l.transforms.sender||l.transforms.receiver)){i=!0;break}}}catch(e){a.e(e)}finally{a.f()}}RTCRtpSender&&(RTCRtpSender.prototype.createEncodedStreams||RTCRtpSender.prototype.createEncodedAudioStreams&&RTCRtpSender.prototype.createEncodedVideoStreams)&&i&&(r.insertableStreams=!0,o.forceEncodedAudioInsertableStreams=!0,o.forceEncodedVideoInsertableStreams=!0,o.encodedInsertableStreams=!0),Is.log("Creating PeerConnection"),r.pc=new RTCPeerConnection(o),Is.debug(r.pc),r.pc.getStats&&(r.volume={},r.bitrate.value="0 kbits/sec"),Is.log("Preparing local SDP and gathering candidates (trickle="+r.trickle+")"),r.pc.oniceconnectionstatechange=function(){r.pc&&n.iceState(r.pc.iceConnectionState)},r.pc.onicecandidate=function(n){if(!n.candidate||n.candidate.candidate&&n.candidate.candidate.indexOf("endOfCandidates")>0)Is.log("End of candidates."),r.iceDone=!0,!0===r.trickle?O(e,{completed:!0}):function(e,t){(t=t||{}).success="function"==typeof t.success?t.success:Is.noop,t.error="function"==typeof t.error?t.error:Is.noop;var n=_[e];if(!n||!n.webrtcStuff)return void Is.warn("Invalid handle, not sending anything");var r=n.webrtcStuff;if(Is.log("Sending offer/answer SDP..."),!r.mySdp)return void Is.warn("Local SDP instance is invalid, not sending anything...");r.mySdp={type:r.pc.localDescription.type,sdp:r.pc.localDescription.sdp},!1===r.trickle&&(r.mySdp.trickle=!1);Is.debug(t),r.sdpSent=!0,t.success(r.mySdp)}(e,t);else{var o={candidate:n.candidate.candidate,sdpMid:n.candidate.sdpMid,sdpMLineIndex:n.candidate.sdpMLineIndex};!0===r.trickle&&O(e,o)}},r.pc.ontrack=function(e){if(Is.log("Handling Remote Track",e),e.streams&&e.track){var t=e.transceiver?e.transceiver.mid:e.track.id;try{n.onremotetrack(e.track,t,!0)}catch(e){Is.error(e)}if(!e.track.onended){var o=null;Is.log("Adding onended callback to track:",e.track),e.track.onended=function(e){Is.log("Remote track removed:",e),clearTimeout(o);var t=r.pc.getTransceivers().find((function(t){return t.receiver.track===e.target})),i=t?t.mid:e.target.id;try{n.onremotetrack(e.target,i,!1)}catch(e){Is.error(e)}},e.track.onmute=function(e){Is.log("Remote track muted:",e),o||(o=setTimeout((function(){Is.log("Removing remote track");var t=r.pc.getTransceivers().find((function(t){return t.receiver.track===e.target})),i=t?t.mid:e.target.id;try{n.onremotetrack(e.target,i,!1)}catch(e){Is.error(e)}o=null}),2520))},e.track.onunmute=function(e){if(Is.log("Remote track flowing again:",e),null!=o)clearTimeout(o),o=null;else try{var t=r.pc.getTransceivers().find((function(t){return t.receiver.track===e.target})),i=t?t.mid:e.target.id;n.onremotetrack(e.target,i,!0)}catch(e){Is.error(e)}}}}}}}function j(e,t,n){return L.apply(this,arguments)}function L(){return(L=ks(regeneratorRuntime.mark((function e(t,n,r){var o,i,s,a,c,u,f,l,d,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=r||{}).success="function"==typeof r.success?r.success:Is.noop,r.error="function"==typeof r.error?r.error:ee,o=r.jsep,!n||!o){e.next=10;break}return Is.error("Provided a JSEP to a createOffer"),r.error("Provided a JSEP to a createOffer"),e.abrupt("return");case 10:if(n||o&&o.type&&o.sdp){e.next=14;break}return Is.error("A valid JSEP is required for createAnswer"),r.error("A valid JSEP is required for createAnswer"),e.abrupt("return");case 14:if(!r.media||r.tracks){e.next=36;break}if(r.tracks=Is.mediaToTracks(r.media),!0!==r.simulcast&&!0!==r.simulcast2&&!r.svc){e.next=35;break}i=xs(r.tracks),e.prev=18,i.s();case 20:if((s=i.n()).done){e.next=27;break}if("video"!==(a=s.value).type){e.next=25;break}return!0===r.simulcast||!0===r.simulcast2?a.simulcast=!0:r.svc&&(a.svc=r.svc),e.abrupt("break",27);case 25:e.next=20;break;case 27:e.next=32;break;case 29:e.prev=29,e.t0=e.catch(18),i.e(e.t0);case 32:return e.prev=32,i.f(),e.finish(32);case 35:Is.warn("Deprecated media object passed, use tracks instead. Automatically translated to:",r.tracks);case 36:if(!r.tracks||Array.isArray(r.tracks)){e.next=40;break}return Is.error("Tracks must be an array"),r.error("Tracks must be an array"),e.abrupt("return");case 40:if((c=_[t])&&c.webrtcStuff){e.next=45;break}return Is.warn("Invalid handle"),r.error("Invalid handle"),e.abrupt("return");case 45:if((u=c.webrtcStuff).trickle=ne(r.trickle),e.prev=47,M(t,r),!n){e.next=52;break}return e.next=52,W(t,r);case 52:if(o){e.next=59;break}return e.next=55,F(t,r);case 55:f=e.sent,r.success(f),e.next=70;break;case 59:return e.next=61,u.pc.setRemoteDescription(o);case 61:if(Is.log("Remote description accepted!"),u.remoteSdp=o.sdp,u.candidates&&u.candidates.length>0){for(l=0;l<u.candidates.length;l++)d=u.candidates[l],Is.debug("Adding remote candidate:",d),d&&!0!==d.completed?u.pc.addIceCandidate(d):u.pc.addIceCandidate(Is.endOfCandidates);u.candidates=[]}return e.next=66,W(t,r);case 66:return e.next=68,G(t,r);case 68:p=e.sent,r.success(p);case 70:e.next=76;break;case 72:e.prev=72,e.t1=e.catch(47),Is.error(e.t1),r.error(e.t1);case 76:case"end":return e.stop()}}),e,null,[[18,29,32,35],[47,72]])})))).apply(this,arguments)}function U(e,t){(t=t||{}).success="function"==typeof t.success?t.success:Is.noop,t.error="function"==typeof t.error?t.error:ee,t.customizeSdp="function"==typeof t.customizeSdp?t.customizeSdp:Is.noop;var n=t.jsep,r=_[e];if(!r||!r.webrtcStuff)return Is.warn("Invalid handle"),void t.error("Invalid handle");var o=r.webrtcStuff;if(n){if(!o.pc)return Is.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void t.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");t.customizeSdp(n),o.pc.setRemoteDescription(n).then((function(){if(Is.log("Remote description accepted!"),o.remoteSdp=n.sdp,o.candidates&&o.candidates.length>0){for(var e=0;e<o.candidates.length;e++){var r=o.candidates[e];Is.debug("Adding remote candidate:",r),r&&!0!==r.completed?o.pc.addIceCandidate(r):o.pc.addIceCandidate(Is.endOfCandidates)}o.candidates=[]}t.success()}),t.error)}else t.error("Invalid JSEP")}function F(e,t){return B.apply(this,arguments)}function B(){return(B=ks(regeneratorRuntime.mark((function e(t,n){var r,o,i,s,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=n||{}).customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:Is.noop,(r=_[t])&&r.webrtcStuff){e.next=6;break}throw Is.warn("Invalid handle"),"Invalid handle";case 6:return o=r.webrtcStuff,Is.log("Creating offer (iceDone="+o.iceDone+")"),i={},!0===n.iceRestart&&(i.iceRestart=!0),Is.debug(i),e.next=14,o.pc.createOffer(i);case 14:return s=e.sent,Is.debug(s),a={type:"offer",sdp:s.sdp},n.customizeSdp(a),s.sdp=a.sdp,Is.log("Setting local description"),o.mySdp={type:"offer",sdp:s.sdp},e.next=23,o.pc.setLocalDescription(s);case 23:if(o.mediaConstraints=i,o.iceDone||o.trickle){e.next=27;break}return Is.log("Waiting for all candidates..."),e.abrupt("return",null);case 27:return o.insertableStreams&&(s.e2ee=!0),e.abrupt("return",s);case 29:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e,t){return q.apply(this,arguments)}function q(){return(q=ks(regeneratorRuntime.mark((function e(t,n){var r,o,i,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=n||{}).customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:Is.noop,(r=_[t])&&r.webrtcStuff){e.next=6;break}throw Is.warn("Invalid handle"),"Invalid handle";case 6:return o=r.webrtcStuff,Is.log("Creating answer (iceDone="+o.iceDone+")"),e.next=10,o.pc.createAnswer();case 10:return i=e.sent,Is.debug(i),s={type:"answer",sdp:i.sdp},n.customizeSdp(s),i.sdp=s.sdp,Is.log("Setting local description"),o.mySdp={type:"answer",sdp:i.sdp},e.next=19,o.pc.setLocalDescription(i);case 19:if(o.iceDone||o.trickle){e.next=22;break}return Is.log("Waiting for all candidates..."),e.abrupt("return",null);case 22:return o.insertableStreams&&(i.e2ee=!0),e.abrupt("return",i);case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(e,t){return H.apply(this,arguments)}function H(){return(H=ks(regeneratorRuntime.mark((function e(t,n){var r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=n||{}).success="function"==typeof n.success?n.success:Is.noop,n.error="function"==typeof n.error?n.error:Is.noop,!n.tracks||Array.isArray(n.tracks)){e.next=7;break}return Is.error("Tracks must be an array"),n.error("Tracks must be an array"),e.abrupt("return");case 7:r=xs(n.tracks);try{for(r.s();!(o=r.n()).done;)((i=o.value).add||!i.replace&&!i.remove)&&(i.replace=!0)}catch(e){r.e(e)}finally{r.f()}return e.prev=9,e.next=12,W(t,n);case 12:n.success(),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(9),Is.error(e.t0),n.error(e.t0);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})))).apply(this,arguments)}function W(e,t){return J.apply(this,arguments)}function J(){return(J=ks(regeneratorRuntime.mark((function e(t,n){var r,o,i,s,a,c,u,f,l,d,p,h,g,v,y,b,w,S;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=_[t])&&r.webrtcStuff){e.next=4;break}throw Is.warn("Invalid handle, not sending anything"),"Invalid handle";case 4:if((o=r.webrtcStuff).pc){e.next=8;break}throw Is.warn("Invalid PeerConnection"),"Invalid PeerConnection";case 8:if((i=n.tracks)&&Array.isArray(i)&&0!==i.length){e.next=11;break}return e.abrupt("return");case 11:s=!1,a={},c=xs(i),e.prev=14,c.s();case 16:if((u=c.n()).done){e.next=31;break}if(delete(f=u.value).gumGroup,f.type&&["audio","video"].includes(f.type)){e.next=21;break}return e.abrupt("continue",29);case 21:if(f.capture&&!(f.capture instanceof MediaStreamTrack)){e.next=23;break}return e.abrupt("continue",29);case 23:if(l=f.group?f.group:"default",a[l]||(a[l]={}),!a[l][f.type]){e.next=27;break}return e.abrupt("continue",29);case 27:f.gumGroup=l,a[l][f.type]=f;case 29:e.next=16;break;case 31:e.next=36;break;case 33:e.prev=33,e.t0=e.catch(14),c.e(e.t0);case 36:return e.prev=36,c.f(),e.finish(36);case 39:for(d=Object.keys(a),p=0,h=d;p<h.length;p++)g=h[p],(v=a[g]).audio&&v.video||(v.audio&&delete v.audio.gumGroup,v.video&&delete v.video.gumGroup,delete a[g]);y=!!n.jsep,b=xs(i),e.prev=43,S=regeneratorRuntime.mark((function e(){var n,i,c,u,f,l,d,p,h,g,v,b,_,S,C,E,k,x,T,A,R,O,I,P,D,M,j,L,U,F,B,G,q;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=w.value).type){e.next=4;break}return Is.warn("Missing track type:",n),e.abrupt("return","continue");case 4:if("data"!==n.type){e.next=12;break}if(!o.pc.ondatachannel){e.next=8;break}return Is.warn("Data channel exists already, not creating another one"),e.abrupt("return","continue");case 8:return Is.log("Creating default data channel"),N(t,Is.dataChanDefaultLabel,null,!1),o.pc.ondatachannel=function(e){Is.log("Data channel created by Janus:",e),N(t,e.channel.label,e.channel.protocol,e.channel)},e.abrupt("return","continue");case 12:if(void 0===n.add&&null===n.add&&void 0===n.remove&&null===n.remove&&void 0===n.replace&&null===n.replace&&(n.add=!0),!(n.add&&n.remove||n.add&&n.remove&&n.replace)){e.next=16;break}return Is.warn("Conflicting actions for track, ignoring:",n),e.abrupt("return","continue");case 16:if(n.add&&n.replace?(Is.warn("Both add and replace provided, falling back to replace:",n),delete n.add):n.remove&&n.replace&&(Is.warn("Both remove and replace provided, falling back to remove:",n),delete n.replace),i=n.type,"screen"===n.type&&(i="video"),c=null,u=null,c=n.mid?o.pc.getTransceivers().find((function(e){return e.mid===n.mid&&e.receiver.track.kind===i})):o.pc.getTransceivers().find((function(e){return e.receiver.track.kind===i})),!n.replace&&!n.remove){e.next=29;break}if(c){e.next=25;break}return Is.warn("Couldn't find a transceiver for track:",n),e.abrupt("return","continue");case 25:if(c.sender){e.next=28;break}return Is.warn("No sender in the transceiver for track:",n),e.abrupt("return","continue");case 28:u=c.sender;case 29:if(!y||c){e.next=34;break}if(c=o.pc.getTransceivers().find((function(e){return e.receiver.track.kind===i}))){e.next=34;break}return Is.warn("Couldn't find a transceiver for track:",n),e.abrupt("return","continue");case 34:if(f=null,l=null,!n.remove){e.next=42;break}return Is.log("Removing track from PeerConnection",n),l=u.track?u.track.id:null,e.next=40,u.replaceTrack(null);case 40:e.next=120;break;case 42:if(!n.capture){e.next=120;break}if(!(n.gumGroup&&a[n.gumGroup]&&a[n.gumGroup].stream)){e.next=51;break}d=a[n.gumGroup].stream,f="audio"===n.type?d.getAudioTracks()[0]:d.getVideoTracks()[0],delete a[n.gumGroup].stream,delete a[n.gumGroup],delete n.gumGroup,e.next=70;break;case 51:if(!(n.capture instanceof MediaStreamTrack)){e.next=55;break}f=n.capture,e.next=70;break;case 55:if(s||(s=!0,r.consentDialog(!0)),p=Is.trackConstraints(n),h=null,"audio"!==n.type&&"video"!==n.type){e.next=66;break}return n.gumGroup&&(g="audio"===n.type?"video":"audio",a[n.gumGroup]&&a[n.gumGroup][g]&&(v=a[n.gumGroup][g],b=Is.trackConstraints(v),p[g]=b[g])),e.next=61,navigator.mediaDevices.getUserMedia(p);case 61:h=e.sent,window.stream=h,n.gumGroup&&p.audio&&p.video&&(a[n.gumGroup].stream=h,delete n.gumGroup),e.next=69;break;case 66:return e.next=68,navigator.mediaDevices.getDisplayMedia(p);case 68:h=e.sent;case 69:f="audio"===n.type?h.getAudioTracks()[0]:h.getVideoTracks()[0];case 70:if(!n.replace){e.next=78;break}return e.next=73,u.replaceTrack(f);case 73:_="sendrecv",!1!==n.recv&&"inactive"!==c.direction&&"sendonly"!==c.direction||(_="sendonly"),c.setDirection?c.setDirection(_):c.direction=_,e.next=119;break;case 78:if(o.myStream||(o.myStream=new MediaStream),"audio"===i||!n.simulcast&&!n.svc?(u=o.pc.addTrack(f,o.myStream),c=o.pc.getTransceivers().find((function(e){return e.sender===u}))):n.simulcast?"firefox"!==Is.webRTCAdapter.browserDetails.browser?(Is.log("Enabling rid-based simulcasting:",f),S=m(n.simulcastMaxBitrates),c=o.pc.addTransceiver(f,{direction:"sendrecv",streams:[o.myStream],sendEncodings:n.sendEncodings||[{rid:"h",active:!0,maxBitrate:S.high},{rid:"m",active:!0,maxBitrate:S.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:S.low,scaleResolutionDownBy:4}]})):(Is.log("Enabling Simulcasting for Firefox (RID)"),c=o.pc.addTransceiver(f,{direction:"sendrecv",streams:[o.myStream]}),(u=c?c.sender:null)&&((C=u.getParameters())||(C={}),E=m(n.simulcastMaxBitrates),C.encodings=n.sendEncodings||[{rid:"h",active:!0,maxBitrate:E.high},{rid:"m",active:!0,maxBitrate:E.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:E.low,scaleResolutionDownBy:4}],u.setParameters(C))):(Is.log("Enabling SVC ("+n.svc+"):",f),c=o.pc.addTransceiver(f,{direction:"sendrecv",streams:[o.myStream],sendEncodings:[{scalabilityMode:n.svc}]})),u||(u=c?c.sender:null),n.codec)if("firefox"===Is.webRTCAdapter.browserDetails.browser)Is.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)Is.warn("Invalid codec value, ignoring for track:",n);else if(k=i+"/"+n.codec.toLowerCase(),(x=RTCRtpReceiver.getCapabilities(i).codecs.filter((function(e){return e.mimeType.toLowerCase()===k})))&&0!==x.length){if(c)try{c.setCodecPreferences(x)}catch(e){Is.warn("Failed enforcing codec for this "+i+" track:",e)}}else Is.warn("Codec not supported in this browser for this track, ignoring:",n);if(!n.bitrate){e.next=100;break}if(!n.simulcast&&!n.svc){e.next=87;break}Is.warn("Ignoring bitrate for simulcast/SVC track, use sendEncodings for that"),e.next=100;break;case 87:if(!(isNaN(n.bitrate)||n.bitrate<0)){e.next=91;break}Is.warn("Ignoring invalid bitrate for track:",n),e.next=100;break;case 91:if(!u){e.next=100;break}if((T=u.getParameters())&&T.encodings&&0!==T.encodings.length){e.next=97;break}Is.warn("No encodings in the sender parameters, ignoring bitrate for track:",n),e.next=100;break;case 97:return T.encodings[0].maxBitrate=n.bitrate,e.next=100,u.setParameters(T);case 100:if("video"!==i||!n.framerate){e.next=118;break}if(!n.simulcast&&!n.svc){e.next=105;break}Is.warn("Ignoring framerate for simulcast/SVC track, use sendEncodings for that"),e.next=118;break;case 105:if(!(isNaN(n.framerate)||n.framerate<0)){e.next=109;break}Is.warn("Ignoring invalid framerate for track:",n),e.next=118;break;case 109:if(!u){e.next=118;break}if((A=u.getParameters())&&A.encodings&&0!==A.encodings.length){e.next=115;break}Is.warn("No encodings in the sender parameters, ignoring framerate for track:",n),e.next=118;break;case 115:return A.encodings[0].maxFramerate=n.framerate,e.next=118,u.setParameters(A);case 118:n.transforms&&(u&&n.transforms.sender&&(R=null,RTCRtpSender.prototype.createEncodedStreams?R=u.createEncodedStreams():(RTCRtpSender.prototype.createAudioEncodedStreams||RTCRtpSender.prototype.createEncodedVideoStreams)&&("audio"===i?R=u.createEncodedAudioStreams():"video"===i&&(R=u.createEncodedVideoStreams())),R&&(console.log("Insertable Streams sender transform:",R),R.readableStream&&R.writableStream?R.readableStream.pipeThrough(n.transforms.sender).pipeTo(R.writableStream):R.readable&&R.writable&&R.readable.pipeThrough(n.transforms.sender).pipeTo(R.writable))),c&&c.receiver&&n.transforms.receiver&&(O=null,RTCRtpReceiver.prototype.createEncodedStreams?O=c.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===i?O=c.receiver.createEncodedAudioStreams():"video"===i&&(O=c.receiver.createEncodedVideoStreams())),O&&(console.log("Insertable Streams receiver transform:",O),O.readableStream&&O.writableStream?O.readableStream.pipeThrough(n.transforms.receiver).pipeTo(O.writableStream):O.readable&&O.writable&&O.readable.pipeThrough(n.transforms.receiver).pipeTo(O.writable))));case 119:f&&!0===n.dontStop&&(f.dontStop=!0);case 120:if(l&&o.myStream){if(I=null,"audio"===i&&o.myStream.getAudioTracks()&&o.myStream.getAudioTracks().length){P=xs(o.myStream.getAudioTracks());try{for(P.s();!(D=P.n()).done;)(M=D.value).id===l&&(I=M,Is.log("Removing audio track:",I))}catch(e){P.e(e)}finally{P.f()}}else if("video"===i&&o.myStream.getVideoTracks()&&o.myStream.getVideoTracks().length){j=xs(o.myStream.getVideoTracks());try{for(j.s();!(L=j.n()).done;)(U=L.value).id===l&&(I=U,Is.log("Removing video track:",I))}catch(e){j.e(e)}finally{j.f()}}if(I){try{o.myStream.removeTrack(I),r.onlocaltrack(I,!1)}catch(e){Is.error(e)}if(!0!==I.dontStop)try{I.stop()}catch(e){Is.error(e)}}}if(f){o.myStream.addTrack(f),f.onended=function(e){Is.log("Local track removed:",e);try{r.onlocaltrack(e.target,!1)}catch(e){Is.error(e)}};try{r.onlocaltrack(f,!0)}catch(e){Is.error(e)}}c&&(F=c.direction,B=null,G=f&&c.sender.track,q=!1!==n.recv&&c.receiver.track,G&&q?B="sendrecv":G&&!q?B="sendonly":!G&&q?B="recvonly":G||q||(B="inactive"),B&&B!==F&&(Is.warn("Changing direction of transceiver to "+B+" (was "+F+")",n),c.setDirection?c.setDirection(B):c.direction=B));case 123:case"end":return e.stop()}}),e)})),b.s();case 46:if((w=b.n()).done){e.next=53;break}return e.delegateYield(S(),"t1",48);case 48:if("continue"!==e.t1){e.next=51;break}return e.abrupt("continue",51);case 51:e.next=46;break;case 53:e.next=58;break;case 55:e.prev=55,e.t2=e.catch(43),b.e(e.t2);case 58:return e.prev=58,b.f(),e.finish(58);case 61:s&&r.consentDialog(!1);case 62:case"end":return e.stop()}}),e,null,[[14,33,36,39],[43,55,58,61]])})))).apply(this,arguments)}function z(e){var t=_[e];if(!t||!t.webrtcStuff)return Is.warn("Invalid handle"),null;var n=t.webrtcStuff;if(!n.pc)return Is.warn("Invalid PeerConnection"),null;var r,o=[],i=xs(n.pc.getTransceivers());try{for(i.s();!(r=i.n()).done;){var s=r.value,a=null;s.sender&&s.sender.track&&((a={mid:s.mid}).type=s.sender.track.kind,a.id=s.sender.track.id,a.label=s.sender.track.label),a&&o.push(a)}}catch(e){i.e(e)}finally{i.f()}return o}function K(e){var t=_[e];if(!t||!t.webrtcStuff)return Is.warn("Invalid handle"),null;var n=t.webrtcStuff;if(!n.pc)return Is.warn("Invalid PeerConnection"),null;var r,o=[],i=xs(n.pc.getTransceivers());try{for(i.s();!(r=i.n()).done;){var s=r.value,a=null;s.receiver&&s.receiver.track&&((a={mid:s.mid}).type=s.receiver.track.kind,a.id=s.receiver.track.id,a.label=s.receiver.track.label),a&&o.push(a)}}catch(e){i.e(e)}finally{i.f()}return o}function Y(e,t,n,r){r="function"==typeof r?r:Is.noop;var o=_[e];if(!o||!o.webrtcStuff)return Is.warn("Invalid handle"),void r(0);var i=n?"remote":"local",s=o.webrtcStuff;if(s.volume[i]||(s.volume[i]={value:0}),!s.pc.getStats||"chrome"!==Is.webRTCAdapter.browserDetails.browser&&"safari"!==Is.webRTCAdapter.browserDetails.browser)return Is.warn("Getting the "+i+" volume unsupported by browser"),void r(0);var a=s.pc;if(t){var c=s.pc.getTransceivers().find((function(e){return e.mid===t&&"audio"===e.receiver.track.kind}));if(!c)return Is.warn("No audio transceiver with mid "+t),void r(0);if(n&&!c.receiver)return Is.warn("Remote transceiver track unavailable"),void r(0);if(!n&&!c.sender)return Is.warn("Local transceiver track unavailable"),void r(0);a=n?c.receiver:c.sender}return a.getStats().then((function(e){e.forEach((function(e){e&&"audio"===e.kind&&(n&&!e.remoteSource||!n&&"media-source"!==e.type||r(e.audioLevel?e.audioLevel:0))}))})),s.volume[i].value}function $(e,t,n){var r=_[e];if(!r||!r.webrtcStuff)return Is.warn("Invalid handle"),!0;var o=r.webrtcStuff;if(!o.pc)return Is.warn("Invalid PeerConnection"),!0;if(!o.myStream)return Is.warn("Invalid local MediaStream"),!0;if(n){if(!o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length)return Is.warn("No video track"),!0;if(t){var i=o.pc.getTransceivers().find((function(e){return e.mid===t&&"video"===e.receiver.track.kind}));return i?i.sender&&i.sender.track?!i.sender.track.enabled:(Is.warn("No video sender with mid "+t),!0):(Is.warn("No video transceiver with mid "+t),!0)}return!o.myStream.getVideoTracks()[0].enabled}if(!o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length)return Is.warn("No audio track"),!0;if(t){var s=o.pc.getTransceivers().find((function(e){return e.mid===t&&"audio"===e.receiver.track.kind}));return s?s.sender&&s.sender.track?!s.sender.track.enabled:(Is.warn("No audio sender with mid "+t),!0):(Is.warn("No audio transceiver with mid "+t),!0)}return!o.myStream.getAudioTracks()[0].enabled}function X(e,t,n,r){var o=_[e];if(!o||!o.webrtcStuff)return Is.warn("Invalid handle"),!1;var i=o.webrtcStuff;if(!i.pc)return Is.warn("Invalid PeerConnection"),!1;if(!i.myStream)return Is.warn("Invalid local MediaStream"),!1;if(n){if(!i.myStream.getVideoTracks()||0===i.myStream.getVideoTracks().length)return Is.warn("No video track"),!1;if(t){var s=i.pc.getTransceivers().find((function(e){return e.mid===t&&"video"===e.receiver.track.kind}));if(!s)return Is.warn("No video transceiver with mid "+t),!1;if(!s.sender||!s.sender.track)return Is.warn("No video sender with mid "+t),!1;s.sender.track.enabled=!r}else{var a,c=xs(i.myStream.getVideoTracks());try{for(c.s();!(a=c.n()).done;){a.value.enabled=!r}}catch(e){c.e(e)}finally{c.f()}}}else{if(!i.myStream.getAudioTracks()||0===i.myStream.getAudioTracks().length)return Is.warn("No audio track"),!1;if(t){var u=i.pc.getTransceivers().find((function(e){return e.mid===t&&"audio"===e.receiver.track.kind}));if(!u)return Is.warn("No audio transceiver with mid "+t),!1;if(!u.sender||!u.sender.track)return Is.warn("No audio sender with mid "+t),!1;u.sender.track.enabled=!r}else{var f,l=xs(i.myStream.getAudioTracks());try{for(l.s();!(f=l.n()).done;){f.value.enabled=!r}}catch(e){l.e(e)}finally{l.f()}}}return!0}function Z(e,t){var n=_[e];if(!n||!n.webrtcStuff)return Is.warn("Invalid handle"),"Invalid handle";var r=n.webrtcStuff;if(!r.pc)return"Invalid PeerConnection";if(r.pc.getStats){var o=r.pc,i=t||"default";if(t){var s=r.pc.getTransceivers().find((function(e){return e.mid===t&&"video"===e.receiver.track.kind}));if(!s)return Is.warn("No video transceiver with mid "+t),"No video transceiver with mid "+t;if(!s.receiver)return Is.warn("No video receiver with mid "+t),"No video receiver with mid "+t;o=s.receiver}return r.bitrate[i]||(r.bitrate[i]={timer:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,value:"0 kbits/sec"}),r.bitrate[i].timer?r.bitrate[i].value:(Is.log("Starting bitrate timer"+(t?" for mid "+t:"")+" (via getStats)"),r.bitrate[i].timer=setInterval((function(){o.getStats().then((function(e){e.forEach((function(e){if(e){var t=!1;if(("video"===e.mediaType||e.id.toLowerCase().indexOf("video")>-1)&&"inbound-rtp"===e.type&&e.id.indexOf("rtcp")<0?t=!0:"ssrc"!=e.type||!e.bytesReceived||"VP8"!==e.googCodecName&&""!==e.googCodecName||(t=!0),t)if(r.bitrate[i].bsnow=e.bytesReceived,r.bitrate[i].tsnow=e.timestamp,null===r.bitrate[i].bsbefore||null===r.bitrate[i].tsbefore)r.bitrate[i].bsbefore=r.bitrate[i].bsnow,r.bitrate[i].tsbefore=r.bitrate[i].tsnow;else{var n=r.bitrate[i].tsnow-r.bitrate[i].tsbefore;"safari"===Is.webRTCAdapter.browserDetails.browser&&(n/=1e3);var o=Math.round(8*(r.bitrate[i].bsnow-r.bitrate[i].bsbefore)/n);"safari"===Is.webRTCAdapter.browserDetails.browser&&(o=parseInt(o/1e3)),r.bitrate[i].value=o+" kbits/sec",r.bitrate[i].bsbefore=r.bitrate[i].bsnow,r.bitrate[i].tsbefore=r.bitrate[i].tsnow}}}))}))}),1e3),"0 kbits/sec")}return Is.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser"}function Q(e,t,n){var r=_[e];if(r&&r.webrtcStuff){var o=r.webrtcStuff;if(o.pc){var i=o.pc.getTransceivers().find((function(e){return e.mid===t}));if(i)if(i.sender){var s=i.sender.getParameters();s&&s.encodings&&0!==s.encodings.length?s.encodings.length>1?Is.warn("Ignoring bitrate for simulcast track, use sendEncodings for that"):isNaN(n)||n<0?Is.warn("Invalid bitrate (must be a positive integer)"):(s.encodings[0].maxBitrate=n,i.sender.setParameters(s)):Is.warn("No parameters encodings")}else Is.warn("No sender for transceiver with mid",t);else Is.warn("No transceiver with mid",t)}else Is.warn("Invalid PeerConnection")}else Is.warn("Invalid handle")}function ee(e){Is.error("WebRTC error:",e)}function te(e,r){Is.log("Cleaning WebRTC stuff");var o=_[e];if(o){var i=o.webrtcStuff;if(i){if(!0===r){var s={janus:"hangup",transaction:Is.randomString(12)};o.token&&(s.token=o.token),h&&(s.apisecret=h),Is.debug("Sending hangup request (handle="+e+"):"),Is.debug(s),t?(s.session_id=w,s.handle_id=e,n.send(s)):Is.httpAPICall(a+"/"+w+"/"+e,{verb:"POST",withCredentials:l,body:s})}for(var c in i.volume&&(i.volume.local&&i.volume.local.timer&&clearInterval(i.volume.local.timer),i.volume.remote&&i.volume.remote.timer&&clearInterval(i.volume.remote.timer)),i.bitrate)i.bitrate[c].timer&&clearInterval(i.bitrate[c].timer);i.bitrate={},!i.streamExternal&&i.myStream&&(Is.log("Stopping local stream tracks"),Is.stopAllTracks(i.myStream)),i.streamExternal=!1,i.myStream=null;try{i.pc.close()}catch(e){}i.pc=null,i.candidates=null,i.mySdp=null,i.remoteSdp=null,i.iceDone=!1,i.dataChannel={},i.dtmfSender=null,i.insertableStreams=!1}o.oncleanup()}}function ne(e){return Is.debug("isTrickleEnabled:",e),!1!==e}A(e),this.getServer=function(){return a},this.isConnected=function(){return b},this.reconnect=function(e){(e=e||{}).success="function"==typeof e.success?e.success:Is.noop,e.error="function"==typeof e.error?e.error:Is.noop,e.reconnect=!0,A(e)},this.getSessionId=function(){return w},this.getInfo=function(e){!function(e){if((e=e||{}).success="function"==typeof e.success?e.success:Is.noop,e.error="function"==typeof e.error?e.error:Is.noop,Is.log("Getting info on Janus instance"),!b)return Is.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");var r=Is.randomString(12),o={janus:"info",transaction:r};p&&(o.token=p);h&&(o.apisecret=h);if(t)return E[r]=function(t){Is.log("Server info:"),Is.debug(t),"server_info"!==t.janus&&Is.error("Ooops: "+t.error.code+" "+t.error.reason),e.success(t)},void n.send(o);Is.httpAPICall(a,{verb:"POST",withCredentials:l,body:o,success:function(t){Is.log("Server info:"),Is.debug(t),"server_info"!==t.janus&&Is.error("Ooops: "+t.error.code+" "+t.error.reason),e.success(t)},error:function(t,n){Is.error(t+":",n),""===n?e.error(t+": Is the server down?"):e.error(t+": "+n)}})}(e)},this.destroy=function(i){!function(i){(i=i||{}).success="function"==typeof i.success?i.success:Is.noop,i.error="function"==typeof i.error?i.error:Is.noop;var s=!0===i.unload,c=!0;void 0!==i.notifyDestroyed&&null!==i.notifyDestroyed&&(c=!0===i.notifyDestroyed);var u=!0===i.cleanupHandles;if(Is.log("Destroying session "+w+" (unload="+s+")"),!w)return Is.warn("No session to destroy"),i.success(),void(c&&e.destroyed());if(u)for(var f in _)D(f,{noRequest:!0});if(!b)return Is.warn("Is the server down? (connected=false)"),w=null,void i.success();var d={janus:"destroy",transaction:Is.randomString(12)};p&&(d.token=p);h&&(d.apisecret=h);if(s)return t?(n.onclose=null,n.close(),n=null):navigator.sendBeacon(a+"/"+w,JSON.stringify(d)),Is.log("Destroyed session:"),w=null,b=!1,i.success(),void(c&&e.destroyed());if(t){d.session_id=w;var g=function(){for(var e in r)n.removeEventListener(e,r[e]);n.removeEventListener("message",v),n.removeEventListener("error",m),o&&clearTimeout(o),n.close()},v=function(t){var n={};if("string"==typeof t)try{t=Os.parse(t)}catch(e){}if(t.data){if("object"===y(t.data))n=t.data;else try{n=Os.parse(t.data)}catch(e){}n.session_id==d.session_id&&n.transaction==d.transaction&&(g(),i.success(),c&&e.destroyed())}else g(),i.success(),c&&e.destroyed()},m=function(){g(),i.error("Failed to destroy the server: Is the server down?"),c&&e.destroyed()};return n.addEventListener("message",v),n.addEventListener("error",m),void(1===n.readyState?n.send(d):m())}Is.httpAPICall(a+"/"+w,{verb:"POST",withCredentials:l,body:d,success:function(t){Is.log("Destroyed session:"),Is.debug(t),w=null,b=!1,"success"!==t.janus&&Is.error("Ooops: "+t.error.code+" "+t.error.reason),i.success(),c&&e.destroyed()},error:function(t,n){Is.error(t+":",n),w=null,b=!1,i.success(),c&&e.destroyed()}})}(i)},this.attach=function(e){!function(e){if((e=e||{}).success="function"==typeof e.success?e.success:Is.noop,e.error="function"==typeof e.error?e.error:Is.noop,e.dataChannelOptions=e.dataChannelOptions||{ordered:!0},e.consentDialog="function"==typeof e.consentDialog?e.consentDialog:Is.noop,e.iceState="function"==typeof e.iceState?e.iceState:Is.noop,e.mediaState="function"==typeof e.mediaState?e.mediaState:Is.noop,e.webrtcState="function"==typeof e.webrtcState?e.webrtcState:Is.noop,e.slowLink="function"==typeof e.slowLink?e.slowLink:Is.noop,e.onmessage="function"==typeof e.onmessage?e.onmessage:Is.noop,e.onlocaltrack="function"==typeof e.onlocaltrack?e.onlocaltrack:Is.noop,e.onremotetrack="function"==typeof e.onremotetrack?e.onremotetrack:Is.noop,e.ondata="function"==typeof e.ondata?e.ondata:Is.noop,e.ondataopen="function"==typeof e.ondataopen?e.ondataopen:Is.noop,e.oncleanup="function"==typeof e.oncleanup?e.oncleanup:Is.noop,e.ondetached="function"==typeof e.ondetached?e.ondetached:Is.noop,!b)return Is.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");var r=e.plugin;if(!r)return Is.error("Invalid plugin"),void e.error("Invalid plugin");var o=e.opaqueId,i=e.loopIndex,s=e.token?e.token:p,c=Is.randomString(12),u={janus:"attach",plugin:r,opaque_id:o,loop_index:i,transaction:c};s&&(u.token=s);h&&(u.apisecret=h);if(t)return E[c]=function(t){if(Is.debug(t),"success"!==t.janus)return Is.error("Ooops: "+t.error.code+" "+t.error.reason),void e.error("Ooops: "+t.error.code+" "+t.error.reason);var n=t.data.id;Is.log("Created handle: "+n);var o={session:S,plugin:r,id:n,token:s,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return n},getPlugin:function(){return r},getVolume:function(e,t){return Y(n,e,!0,t)},getRemoteVolume:function(e,t){return Y(n,e,!0,t)},getLocalVolume:function(e,t){return Y(n,e,!1,t)},isAudioMuted:function(e){return $(n,e,!1)},muteAudio:function(e){return X(n,e,!1,!0)},unmuteAudio:function(e){return X(n,e,!1,!1)},isVideoMuted:function(e){return $(n,e,!0)},muteVideo:function(e){return X(n,e,!0,!0)},unmuteVideo:function(e){return X(n,e,!0,!1)},getBitrate:function(e){return Z(n,e)},setMaxBitrate:function(e,t){return Q(n,e,t)},send:function(e){R(n,e)},data:function(e){I(n,e)},dtmf:function(e){P(n,e)},consentDialog:e.consentDialog,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){j(n,!0,e)},createAnswer:function(e){j(n,!1,e)},handleRemoteJsep:function(e){U(n,e)},replaceTracks:function(e){V(n,e)},getLocalTracks:function(){return z(n)},getRemoteTracks:function(){return K(n)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){te(n,!0===e)},detach:function(e){D(n,e)}};_[n]=o,e.success(o)},u.session_id=w,void n.send(u);Is.httpAPICall(a+"/"+w,{verb:"POST",withCredentials:l,body:u,success:function(t){if(Is.debug(t),"success"!==t.janus)return Is.error("Ooops: "+t.error.code+" "+t.error.reason),void e.error("Ooops: "+t.error.code+" "+t.error.reason);var n=t.data.id;Is.log("Created handle: "+n);var o={session:S,plugin:r,id:n,token:s,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return n},getPlugin:function(){return r},getVolume:function(e,t){return Y(n,e,!0,t)},getRemoteVolume:function(e,t){return Y(n,e,!0,t)},getLocalVolume:function(e,t){return Y(n,e,!1,t)},isAudioMuted:function(e){return $(n,e,!1)},muteAudio:function(e){return X(n,e,!1,!0)},unmuteAudio:function(e){return X(n,e,!1,!1)},isVideoMuted:function(e){return $(n,e,!0)},muteVideo:function(e){return X(n,e,!0,!0)},unmuteVideo:function(e){return X(n,e,!0,!1)},getBitrate:function(e){return Z(n,e)},setMaxBitrate:function(e,t){return Q(n,e,t)},send:function(e){R(n,e)},data:function(e){I(n,e)},dtmf:function(e){P(n,e)},consentDialog:e.consentDialog,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){j(n,!0,e)},createAnswer:function(e){j(n,!1,e)},handleRemoteJsep:function(e){U(n,e)},replaceTracks:function(e){V(n,e)},getLocalTracks:function(){return z(n)},getRemoteTracks:function(){return K(n)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){te(n,!0===e)},detach:function(e){D(n,e)}};_[n]=o,e.success(o)},error:function(t,n){Is.error(t+":",n),""===n?e.error(t+": Is the server down?"):e.error(t+": "+n)}})}(e)}}Is.useDefaultDependencies=function(e){var t=e&&e.fetch||fetch,n=e&&e.Promise||Promise,r=e&&e.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new r(e,t)},extension:e&&e.extension||Ns,isArray:function(e){return Array.isArray(e)},webRTCAdapter:e&&e.adapter||As,httpAPICall:function(e,r){var o={method:r.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===r.verb&&(o.headers["Content-Type"]="application/json"),void 0!==r.withCredentials&&(o.credentials=!0===r.withCredentials?"include":r.withCredentials?r.withCredentials:"omit"),r.body&&(o.body=JSON.stringify(r.body));var i=t(e,o).catch((function(e){return n.reject({message:"Probably a network error, is the server down?",error:e})}));if(r.timeout){var s=new n((function(e,t){var n=setTimeout((function(){return clearTimeout(n),t({message:"Request timed out",timeout:r.timeout})}),r.timeout)}));i=n.race([i,s])}return i.then((function(e){return e.ok?y(r.success)===y(Is.noop)?e.json().then((function(e){try{r.success(e)}catch(e){Is.error("Unhandled httpAPICall success callback error",e)}}),(function(t){return n.reject({message:"Failed to parse response body",error:t,response:e})})):void 0:n.reject({message:"API call failed",response:e})})).catch((function(e){y(r.error)===y(Is.noop)&&r.error(e.message||"<< internal error >>",e)})),i}}},Is.useOldDependencies=function(e){var t=e&&e.jQuery||Rs,n=e&&e.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new n(e,t)},isArray:function(e){return t.isArray(e)},extension:e&&e.extension||Ns,webRTCAdapter:e&&e.adapter||As,httpAPICall:function(e,n){var r=void 0!==n.body?{contentType:"application/json",data:JSON.stringify(n.body)}:{},o=void 0!==n.withCredentials?{xhrFields:{withCredentials:n.withCredentials}}:{};return t.ajax(t.extend(r,o,{url:e,type:n.verb,cache:!1,dataType:"json",async:n.async,timeout:n.timeout,success:function(e){y(n.success)===y(Is.noop)&&n.success(e)},error:function(e,t,r){y(n.error)===y(Is.noop)&&n.error(t,r)}}))}}},Is.mediaToTracks=function(e){var t=[];if(e){if(!e.keepAudio&&!1!==e.audio&&(void 0===e.audio||e.audio||e.audioSend||e.audioRecv||e.addAudio||e.replaceAudio||e.removeAudio)){var n={type:"audio"};e.removeAudio?n.remove=!0:(e.addAudio?n.add=!0:e.replaceAudio&&(n.replace=!0),!1!==e.audioSend&&(n.capture=e.audio||!0),!1!==e.audioRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}if(!e.keepVideo&&!1!==e.video&&(void 0===e.video||e.video||e.videoSend||e.videoRecv||e.addVideo||e.replaceVideo||e.removeVideo)){var r={type:"video"};e.removeVideo?r.remove=!0:(e.addVideo?r.add=!0:e.replaceVideo&&(r.replace=!0),!1!==e.videoSend&&(r.capture=e.video||!0,["screen","window","desktop"].includes(r.capture)&&(r.type="screen",r.capture={video:{}},e.screenshareFrameRate&&(r.capture.frameRate=e.screenshareFrameRate),e.screenshareHeight&&(r.capture.height=e.screenshareHeight),e.screenshareWidth&&(r.capture.width=e.screenshareWidth))),!1!==e.videoRecv&&(r.recv=!0)),(r.remove||r.capture||r.recv)&&t.push(r)}e.data&&t.push({type:"data"})}else t.push({type:"audio",capture:!0,recv:!0}),t.push({type:"video",capture:!0,recv:!0});return t},Is.trackConstraints=function(e){var t={};if(!e||!e.capture)return t;if("audio"===e.type)t.audio=e.capture;else if("video"===e.type)if((e.simulcast||e.svc)&&!0===e.capture&&(e.capture="hires"),!0===e.capture||"object"===y(e.capture))t.video=e.capture;else{var n=0,r=0;"lowres"===e.capture?(n=320,r=240):"lowres-16:9"===e.capture?(n=320,r=180):"hires"===e.capture||"hires-16:9"===e.capture||"hdres"===e.capture?(n=1280,r=720):"fhdres"===e.capture?(n=1920,r=1080):"4kres"===e.capture?(n=3840,r=2160):"stdres"===e.capture?(n=640,r=480):"stdres-16:9"===e.capture?(n=640,r=360):(Is.log("Default video setting is stdres 4:3"),n=640,r=480),t.video={width:{min:2*n/3,ideal:n,max:1.5*n},height:{min:2*r/3,ideal:r,max:1.5*r},require:["width","height"],facingMode:"user"}}else"screen"===e.type&&(t.video=e.capture);return t},Is.noop=function(){},Is.dataChanDefaultLabel="JanusDataChannel",Is.endOfCandidates=null,Is.stopAllTracks=function(e){try{var t,n=xs(e.getTracks());try{for(n.s();!(t=n.n()).done;){var r=t.value;Is.log(r),r&&!0!==r.dontStop&&r.stop()}}catch(e){n.e(e)}finally{n.f()}}catch(e){}},Is.init=function(e){if((e=e||{}).callback="function"==typeof e.callback?e.callback:Is.noop,Is.initDone)e.callback();else{if(void 0===console.log&&(console.log=function(){}),Is.trace=Is.noop,Is.debug=Is.noop,Is.vdebug=Is.noop,Is.log=Is.noop,Is.warn=Is.noop,Is.error=Is.noop,!0===e.debug||"all"===e.debug)Is.trace=console.trace.bind(console),Is.debug=console.debug.bind(console),Is.vdebug=console.debug.bind(console),Is.log=console.log.bind(console),Is.warn=console.warn.bind(console),Is.error=console.error.bind(console);else if(Array.isArray(e.debug)){var t,n=xs(e.debug);try{for(n.s();!(t=n.n()).done;){var r=t.value;switch(r){case"trace":Is.trace=console.trace.bind(console);break;case"debug":Is.debug=console.debug.bind(console);break;case"vdebug":Is.vdebug=console.debug.bind(console);break;case"log":Is.log=console.log.bind(console);break;case"warn":Is.warn=console.warn.bind(console);break;case"error":Is.error=console.error.bind(console);break;default:console.error("Unknown debugging option '"+r+"' (supported: 'trace', 'debug', 'vdebug', 'log', warn', 'error')")}}}catch(e){n.e(e)}finally{n.f()}}Is.log("Initializing library");var o=e.dependencies||Is.useDefaultDependencies();Is.isArray=o.isArray,Is.webRTCAdapter=o.webRTCAdapter,Is.httpAPICall=o.httpAPICall,Is.newWebSocket=o.newWebSocket,Is.extension=o.extension,console.log(Is.extension),Is.extension.init(),Is.listDevices=function(e,t){e="function"==typeof e?e:Is.noop,t||(t={audio:!0,video:!0}),Is.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(t).then((function(t){navigator.mediaDevices.enumerateDevices().then((function(n){Is.debug(n),e(n),Is.stopAllTracks(t)}))})).catch((function(t){Is.error(t),e([])})):(Is.warn("navigator.mediaDevices unavailable"),e([]))},Is.attachMediaStream=function(e,t){try{e.srcObject=t}catch(r){try{var n=[];n.push(t),e.src=URL.createObjectURL(new Blob(n))}catch(e){Is.error("Error attaching stream to element",e)}}},Is.reattachMediaStream=function(e,t){try{e.srcObject=t.srcObject}catch(n){try{e.src=t.src}catch(e){Is.error("Error reattaching stream to element",e)}}};var i=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",s=window["on"+i];if(window.addEventListener(i,(function(){for(var e in Is.log("Closing window"),Is.sessions)Is.sessions[e]&&Is.sessions[e].destroyOnUnload&&(Is.log("Destroying session "+e),Is.sessions[e].destroy({unload:!0,notifyDestroyed:!1}));s&&"function"==typeof s&&s()})),Is.safariVp8=!1,"safari"===Is.webRTCAdapter.browserDetails.browser&&Is.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){var a,c=xs(RTCRtpSender.getCapabilities("video").codecs);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(u&&u.mimeType&&"video/vp8"===u.mimeType.toLowerCase()){Is.safariVp8=!0;break}}}catch(e){c.e(e)}finally{c.f()}Is.safariVp8?Is.log("This version of Safari supports VP8"):Is.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{var f=new RTCPeerConnection({});f.createOffer({offerToReceiveVideo:!0}).then((function(e){Is.safariVp8=-1!==e.sdp.indexOf("VP8"),Is.safariVp8?Is.log("This version of Safari supports VP8"):Is.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),f.close(),f=null}))}Is.initDone=!0,e.callback()}},Is.isWebrtcSupported=function(){return!!window.RTCPeerConnection},Is.isGetUserMediaAvailable=function(){return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia},Is.randomString=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="",r=0;r<e;r++){var o=Math.floor(Math.random()*t.length);n+=t.charAt(o)}return n};var Ps=Is,Ds=n(91),Ms=null,js=function(e,t){this.readyState=0,this.events=new Map,this.server=e,this.protocol=t,this.addEventListener("error",this.error),this.addEventListener("open",this.open),this.addEventListener("send",this.send),this.addEventListener("message",this.message),this.addEventListener("close",this.close),Ms=this};js.prototype.error=function(){this.close()},js.prototype.open=function(){this.readyState=1},js.prototype.send=function(e){if(1===this.readyState){e.session_id&&(e.session_id="###"+e.session_id+"###"),e.handle_id&&(e.handle_id="###"+e.handle_id+"###"),e.sender&&(e.sender="###"+e.sender+"###"),e.id&&(e.id="###"+e.id+"###"),e.body&&e.body.id&&(e.body.id="###"+e.body.id+"###"),e.body&&e.body.room&&(e.body.room="###"+e.body.room+"###"),e.body&&e.body.publishers&&(e.body.publishers=e.body.publishers.map((function(e){return e.id&&(e.id="###"+e.id+"###"),e}))),e.body&&e.body.streams&&(e.body.streams=e.body.streams.map((function(e){return e.feed&&(e.feed="###"+e.feed+"###"),e})));var t=JSON.stringify(e),n=function(e){var t=e.content,n=e.media_server;Pe("imSendRosterSignal",e);var r=new Ue({uid:Ae.getUid()-0,deviceSN:tt}),o=new Qe({type:L.VIDEO_ROOM,content:t,media_server:n}),i=new Ye({id:(et>1e3?et=0:et++,parseInt((new Date).getTime()+""+et)),from:r,to:0,payload:o,ns:x.RTC_SIGNAL}),s=new ze;s.setMeta(i);var a=new qe;return a.setCommond(_.SYNC),a.setPayload(s),a}({content:t=(t=t.replace(/"###/g,"")).replace(/###"/g,""),media_server:this.server}),r=n.payload.meta;return Gi.sendMessage(n),r.id}},Ne("socketClsOnSignal",(function(e){var t=null;if(1===Ms.readyState){try{t=Ds.parse(e)}catch(e){}t&&Ms.emit("message",t)}})),js.prototype.message=function(){},js.prototype.close=function(){this.readyState=0};var Ls=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{callback:e,once:t}};js.prototype.addEventListener=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.events.get(e);r?r&&"function"==typeof r.callback?this.events.set(e,[r,Ls(t,n)]):r.push(Ls(t,n)):this.events.set(e,Ls(t,n))},js.prototype.removeEventListener=function(e,t){var n=this.events.get(e);if(n){if(!Array.isArray(this.events)){if(n.callback!==t.callback)return;this.events.delete(e)}for(var r=0;r<n.length;r++){n[r].callback===t.callback&&(n.splice(r,1),r--,1==n.length&&this.events.set(e,n[0]))}}},js.prototype.once=function(e,t){this.addEventListener(e,t)},js.prototype.emit=function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=this.events.get(e);if(i)return Array.isArray(i)?i.forEach((function(n){n.callback.apply(t,r),n.once&&t.removeEventListener(e,n)})):(i.callback.apply(this,r),i.once&&this.events.delete(e)),!0},js.prototype.removeAllEventListener=function(e){this.events.get(e)&&this.events.delete(e)};var Us=js,Fs=n(91),Bs="videoroomtest-"+Ps.randomString(12),Gs=null,qs=null,Vs=null,Hs=null,Ws=null,Js={},zs=!1,Ks={},Ys={},$s={},Xs={},Zs={},Qs=null,ea=null,ta=!1,na=!1,ra=function(e){d.log("create room failure with reason: "+e),Zs&&Zs.hangupCall&&Zs.hangupCall(!1),qs&&qs.hangup(),Gs&&(Gs.destroy(),Gs=null)},oa=function(){setTimeout((function(){fa()&&Zs.hangupCall(!0,!1,!0)}),5e3)},ia=function(e){var t=ht(e),n=t.payload.meta;return bt.saveSendingRosterMessage(n),Gi.sendMessage(t),n.id},sa=function(){if(qs){var e={request:"join",room:Zs.roomId,ptype:"publisher",pin:Zs.pin};qs.send({message:e,success:function(){},error:ra})}},aa=function(e,t,n,r,o){d.log("publish now not support type : "+e);var i=[];n&&i.push({type:"audio",capture:!0,recv:!1}),t&&(r<=0&&(r=360),o<=0&&(o=640),i.push({type:"video",capture:{width:r,height:o},recv:!1})),qs&&qs.createOffer({tracks:i,success:function(e){var i={request:"configure",audio:n,video:t,width:r,height:o};qs.send({message:i,jsep:e})},error:function(e){d.log("publish error : "+e)}})},ca=function e(t){if(zs)setTimeout((function(){e(t)}),500);else if(null!=Qs&&(clearTimeout(Qs),Qs=null),null!=ea&&(clearTimeout(ea),ea=null),Vs){var n=[];for(var r in t){var o=t[r];for(var i in o){var s=o[i];("video"!==s.type||"safari"!==Ps.webRTCAdapter.browserDetails.browser||"vp9"!==s.codec&&("vp8"!==s.codec||Ps.safariVp8))&&(s.disabled||Ks[s.id]&&Ks[s.id][s.mid]||(n.push({feed:s.id,mid:s.mid}),Ks[s.id]||(Ks[s.id]={}),Ks[s.id][s.mid]=!0))}}if(0===n.length)return;Vs.send({message:{request:"subscribe",streams:n}})}else zs=!0,Gs.attach({plugin:"janus.plugin.videoroom",opaqueId:Bs,success:function(e){Vs=e;var n=[];for(var r in t){var o=t[r];for(var i in o){var s=o[i];("video"!==s.type||"safari"!==Ps.webRTCAdapter.browserDetails.browser||"vp9"!==s.codec&&("vp8"!==s.codec||Ps.safariVp8))&&(s.disabled||Ks[s.id]&&Ks[s.id][s.mid]||(n.push({feed:s.id,mid:s.mid}),Ks[s.id]||(Ks[s.id]={}),Ks[s.id][s.mid]=!0))}}var a={request:"join",room:Zs.roomId,ptype:"subscriber",streams:n,private_id:Ws,pin:Zs.pin};Vs.send({message:a})},error:function(e){d.log("janus.attach error : "+e)},onmessage:function(e,t){var n=e.videoroom;e.error?d.log("janus.attach onmessage error : "+e.error):n&&"attached"===n&&(zs=!1,d.log("Successfully attached to feed in room "+e.room)),t&&Vs&&Vs.createAnswer({jsep:t,tracks:[{type:"data"}],success:function(e){var t={request:"start",room:Zs.roomId};Vs.send({message:t,jsep:e})},error:function(e){d.log("janus.attach onmessage createAnswer error : "+e)}})},webrtcState:function(e){d.log("Janus says our WebRTC PeerConnection is "+(e?"up":"down")+" now"),e?(na=!0,ta&&na&&Zs.getThrough()):Zs.getHangUpStatus()||Zs.hangupCall()},onlocaltrack:function(e,t){d.log("janus.attach onlocaltrack track : "+e+" on : "+t)},onremotetrack:function(e,t,n){if(d.log("janus.attach onremotetrack track : "+e+" mid : "+t+" on : "+n),n){var r=new MediaStream([e]);Xs[t]=r,r&&("audio"===e.kind?Zs.attachStream(r,"audio",!1):"video"===e.kind&&Zs.attachStream(r,"video",!1))}else{var o=Xs[t];if(o)try{var i=o.getTracks();for(var s in i){var a=i[s];a&&a.stop()}}catch(e){d.log("error : "+e)}delete Xs[t]}},oncleanup:function(){}})},ua=function(e){if(Ys[e]){delete Ys[e];var t={request:"unsubscribe",streams:[{feed:e}]};null!=Vs&&Vs.send({message:t}),delete Ks[e]}},fa=function(){return bt.getInCallStatus()},la={initRTCEngine:function(e){Zs=e,d.log(e),Ps.init({debug:"all",dependencies:Ps.useDefaultDependencies({WebSocket:Us}),callback:function(){Ps.isWebrtcSupported()?Gs=new Ps({server:Zs.server,success:function(){Gs.attach({plugin:"janus.plugin.videoroom",opaqueId:Bs,success:function(e){if(qs=e,Zs.caller){var t={request:"create",permanent:!1,description:"videoroom_"+Zs.id+"_"+Zs.receiver,secret:Zs.secret,pin:Zs.pin};qs.send({message:t,success:function(e){Zs.roomId=e.room,ia({uid:Zs.receiver,content:"",config:Fs.stringify({action:"call",ios:{mutable_content:!0},type:Zs.hasVideo?1:0,roomId:Zs.roomId,initiator:Zs.id,callId:Zs.callId,roomType:0,pin:Zs.pin,pushMessageLocKey:"call_in"}),ext:JSON.stringify({rtc:"call"})}),Qs=setTimeout((function(){clearTimeout(Qs),Qs=null,Zs.hangupCall(!0,!0)}),6e4)},error:ra})}else ia({uid:Zs.receiver,content:"",config:JSON.stringify({action:"pickup",callId:Zs.callId})}),ea=setTimeout((function(){clearTimeout(ea),ea=null,Zs.hangupCall(!0,!0)}),6e4),sa()},error:ra,iceState:function(e){d.log("ICE state changed to "+e)},mediaState:function(e,t,n){d.log("Janus "+(t?"started":"stopped")+" receiving our "+e+" (mid="+n+")")},webrtcState:function(e){d.log("Janus says our WebRTC PeerConnection is "+(e?"up":"down")+" now"),e?(ta=!0)&&na&&Zs.getThrough():Zs.getHangUpStatus()||Zs.hangupCall()},slowLink:function(e,t,n){d.log("Janus reports problems "+(e?"sending":"receiving")+" packets on mid "+n+" ("+t+" lost packets)")},onmessage:function(e,t){var n=e.videoroom;if(null!=n&&null!=n)if("joined"===n)if(Hs=e.id,Ws=e.private_id,e.publishers){aa(null,Zs.hasVideo,Zs.hasAudio,Zs.width,Zs.height);var r=e.publishers,o=null;for(var i in r)if(!r[i].dummy){var s=r[i].id,a=r[i].display,c=r[i].streams;for(var u in c){var f=c[u];f.id=s,f.display=a}Ys[s]={id:s,display:a,streams:c},o||(o=[]),o.push(c)}o&&ca(o)}else Zs.caller||Zs.getHangUpStatus()||Zs.hangupCall();else if("event"===n)if(e.streams){var l=e.streams;for(var p in l){var h=l[p];h.id=Hs,h.display="lanyingIM-"+Hs}Js[Hs]={id:Hs,display:"lanyingIM-"+Hs,streams:l}}else if(e.publishers){var g=e.publishers,v=null;for(var y in g)if(!g[y].dummy){var m=g[y].id,b=g[y].display,w=g[y].streams;for(var _ in w){var S=w[_];S.id=m,S.display=b}Ys[m]={id:m,display:b,streams:w},v||(v=[]),v.push(w)}v&&ca(v)}else if(e.leaving){var C=e.leaving;ua(C),oa()}else if(e.unpublished){var E=e.unpublished;if("ok"===E)return void qs.hangup();ua(E),oa()}else e.error&&d.log("error : "+e.error);t&&qs&&qs.handleRemoteJsep({jsep:t})},onlocaltrack:function(e,t){if("video"===e.kind){var n=e.id.replace(/[{}]/g,"");if(!t){var r=$s[n];if(r)try{var o=r.getTracks();for(var i in o){var s=o[i];s&&s.stop()}}catch(e){d.log("error : "+e)}return void delete $s[n]}var a=new MediaStream([e]);$s[n]=a,a&&Zs.attachStream(a,"video",!0)}},onremotetrack:function(e,t,n){d.log("Janus onremotetrack "+e+" mid "+t+"on"+n)},oncleanup:function(){delete Js[Hs],$s={}}})},error:function(e){d.log("janus init error : "+e)},destroyed:function(){}}):d.log("Janus Webrtc not support!")}})},destroy:function(){Ps.stopAllTracks($s),Ps.stopAllTracks(Xs),"object"===y(window.stream)&&window.stream.getTracks().forEach((function(e){return e.stop()})),null!=Qs&&(clearTimeout(Qs),Qs=null),null!=ea&&(clearTimeout(ea),ea=null),$s={},Xs={},Js={},Ys={},Ks={},ta=!1,na=!1,qs=null,Vs=null,Gs&&(Gs.destroy(),Gs=null)},sendRTCMessage:ia,joinRoom:sa,leaveRoom:function(){if(qs){qs.send({message:{request:"leave"}}),d.log("leaveRoom message has send.")}},publish:aa,unPublish:function(){if(qs){qs.send({message:{request:"unpublish"}}),d.log("unPublish message has send.")}},subscribe:ca,unSubscribe:ua,muteLocalAudio:function(e){if(qs){var t=qs.isAudioMuted();d.log("muteLocalAudio local audio status : "+t),e!=t&&(e?qs.muteAudio():qs.unmuteAudio()),d.log("muteLocalAudio local audio status : "+e)}},muteLocalVideo:function(e){if(qs){var t=qs.isVideoMuted();d.log("muteLocalVideo local video status : "+t),e!=t&&(e?qs.muteVideo():qs.unmuteVideo()),d.log("muteLocalVideo local video status : "+e)}},muteRemoteAudio:function(e,t){var n=0;if(e&&(n=e.mid),null!=Vs){var r=Vs.isAudioMuted(n);d.log("muteRemoteAudio remote audio status : "+r),t!=r&&(t?Vs.muteAudio(n):Vs.unmuteAudio(n)),d.log("muteRemoteAudio remote audio status : "+t)}},muteRemoteVideo:function(e,t){var n=0;e&&(n=e.mid);var r=Vs.isVideoMuted(n);null!=Vs&&(d.log("muteRemoteVideo remote video status : "+r),t!=r&&(t?Vs.muteVideo(n):Vs.unmuteVideo(n)),d.log("muteRemoteVideo remote video status : "+t))},getJanusObject:function(){return Gs},getPublishHandler:function(){return qs},getSubscribeHandler:function(){return Vs},getInCallStatus:fa},da={},pa=null,ha=!1,ga=!1,va=!1,ya="",ma=!1,ba=function e(t){var n=t.autoLogin,r=void 0===n||n,o=t.dnsServer,i=t.appid,s=void 0===i?"welovemaxim":i,a=t.ws,c=void 0!==a&&a,f=t.logLevel,l=void 0===f?"debug":f,p=t.linkServer,h=void 0===p?"https://lanyinglink.com/info":p;ya="",ha=!1,d.setLogLevel(l);var g=_a(o),v=g.source,y=g.path,m=g.dnsServers;Ae.saveAppid(s),Ae.saveLinkServer(h),va=u.e.getItem("key_stop_auto_login")||!1,ma?d.log("window is reloading, stop init floo"):Wt.asyncGetDns(m,s,c,v,y).then((function(t){if("banned"!=(ya=Wt.getAppStatus(s)))if("frozen"!=ya)if("revoked"!=ya){var n=t.ratel,i=t.fireplace;if(!n||!i)return d.log("DNS error, check the server: ",o,"appStatus:",ya),void Pe("flooError",{category:"DNS_FAILED",desc:o});if(wa(s),e.baseUrl=(da={appid:s,baseUrl:n,autoLogin:!va&&r,fireplace:i}).baseUrl,ha=!0,pa){var a=pa.type;return"login"==a&&e.login(pa.opt),"qrlogin"==a&&e.qrlogin(pa.opt),void("tokenLogin"==a&&e.tokenLogin(pa.user_id,pa.token))}if(da.autoLogin){ga=!0;var c=Ae.getUid(),u=Ae.getToken(),f=Ae.getTokenAppId();if(c&&u&&f==s){Ae.saveUid(c);var l=qi.asyncGetRosterIdList(!0),p=hs.asyncGetJoinedGroups(!0);Promise.all([l,p]).then((function(e){var t=e[0],n=e[1];Pe("imRostersGroupslistReady",{rosters:t,groups:n}),d.log("get roster, group over .... will io connect"),Gi.connect(da)})).catch((function(e){Pe("flooNotice",{category:"loginMessage",desc:"get roster list failure:"+e.message})}))}}}else Pe("flooError",{category:"APP_REVOKED",desc:"app is revoked"});else Pe("flooError",{category:"APP_FROZEN",desc:"app is frozen"});else Pe("flooError",{category:"APP_BANNED",desc:"app is banned"})})).catch((function(e){console.log("flooim init error, please retry later: ",e),Pe("flooError",{category:"DNS_FAILED",desc:e.message,code:e.code?e.code:0})}))},wa=function(e){d.log("setup servers for app: ",e);var t=Wt.getServers(e)||{},n=t.ratel,r=t.fireplace;Pe("refresh_ratel",n),Pe("refresh_fireplace",r)},_a=function(e){if(e&&!e.includes("dns.lanyingim.com")&&!e.includes("dns.maximtop.com"))return{source:"sdk",path:"",dnsServers:[e]};var t=Wt.getDnsServerList(),n=[];for(var r in t){var o=t[r];o.domain&&n.push("https://"+o.domain)}var i=Sa();return 0==n.length&&("app"==i?n.push("https://dns-app.lanyingim.com","https://dns-app.maximtop.com"):n.push("https://dns.lanyingim.com","https://dns.maximtop.com")),n.includes("https://39.107.255.12")||n.push("https://39.107.255.12"),{source:i,path:"/v2/app_dns",dnsServers:n}},Sa=function(){var e=Object(u.a)();return e.includes("lanyingim.com")||e.includes("maximtop.com")||e.includes("%E8%93%9D%E8%8E%BAIM")||e.includes("蓝莺IM")||e.includes("lanying-im-pc")?"app":"sdk"};ba.login=function(e){console.log("webim.login",e,"sdkOk:",ha),ha?(Pe("flooNotice",{category:"loginMessage",desc:"getting token..."}),Gi.tokenUser(e).then((function(e){var t=e.token,n=e.user_id,r=e.public_key;Ae.saveUid(n),Ae.saveToken(t),Ae.saveTokenAppId(Ae.getAppid()),Ae.saveAesKey(r);var o=qi.asyncGetRosterIdList(!0),i=hs.asyncGetJoinedGroups(!0);console.log("Get token success"),ga=!0,Pe("flooNotice",{category:"loginMessage",desc:"token sucecc, getting roster lists.."}),Promise.all([o,i]).then((function(e){var r=e[0],o=e[1];Pe("imRostersGroupslistReady",{rosters:r,groups:o}),d.log("get roster, group over .... will io connect"),da=Object.assign({uid:n,token:t},da),Gi.connect(da),pa=null})).catch((function(e){Pe("flooNotice",{category:"loginMessage",desc:"get roster list failure:"+e.message})}))})).catch((function(e){Pe("loginFail","token failure:"+e.message)}))):pa={type:"login",opt:e}},ba.qrlogin=function(e){console.log("webim.qrlogin",e),ha?(Pe("flooNotice",{category:"loginMessage",desc:"getting token..."}),Gi.tokenId(e).then((function(e){var t=e.token,n=e.user_id,r=e.public_key;Ae.saveUid(n),Ae.saveToken(t),Ae.saveTokenAppId(Ae.getAppid()),Ae.saveAesKey(r);var o=qi.asyncGetRosterIdList(!0),i=hs.asyncGetJoinedGroups(!0);Pe("flooNotice",{category:"loginMessage",desc:"token sucecc, getting roster lists.."}),ga=!0,Promise.all([o,i]).then((function(e){var r=e[0],o=e[1];Pe("imRostersGroupslistReady",{rosters:r,groups:o}),d.log("get roster, group over .... will io connect"),da=Object.assign({uid:n,token:t},da),Gi.connect(da),pa=null})).catch((function(e){Pe("flooNotice",{category:"loginMessage",desc:"get roster list failure:"+e.message})}))})).catch((function(e){Pe("loginFail","token failure:"+e.message)}))):pa={type:"qrlogin",opt:e}},ba.tokenLogin=function(e,t,n){if(console.log("webim.tokenLogin",e),ha){Ae.saveUid(e),Ae.saveToken(t),Ae.saveTokenAppId(Ae.getAppid()),Ae.saveAesKey(n);var r=qi.asyncGetRosterIdList(!0),o=hs.asyncGetJoinedGroups(!0);Pe("flooNotice",{category:"loginMessage",desc:"token sucecc, getting roster lists.."}),ga=!0,Promise.all([r,o]).then((function(n){var r=n[0],o=n[1];Pe("imRostersGroupslistReady",{rosters:r,groups:o}),d.log("get roster, group over .... will io connect"),da=Object.assign({uid:e,token:t},da),Gi.connect(da),pa=null})).catch((function(e){Pe("flooNotice",{category:"loginMessage",desc:"get roster list failure:"+e.message})}))}else pa={type:"tokenLogin",user_id:e,token:t}},ba.idLogin=function(e){Gi.tokenId(e).then((function(e){var t=e.token,n=e.user_id,r=e.public_key;Ae.saveUid(n),Ae.saveToken(t),Ae.saveTokenAppId(Ae.getAppid()),Ae.saveAesKey(r);var o=qi.asyncGetRosterIdList(!0),i=hs.asyncGetJoinedGroups(!0);Pe("flooNotice",{category:"loginMessage",desc:"token success, getting roster lists.."}),ga=!0,Promise.all([o,i]).then((function(e){var r=e[0]||[];r.push(n);var o=e[1];Pe("imRostersGroupslistReady",{rosters:r,groups:o}),d.log("get roster, group over .... will io connect"),da=Object.assign({uid:n,token:t},da),Gi.connect(da),pa=null})).catch((function(e){Pe("flooNotice",{category:"loginMessage",desc:"get roster list failure:"+e.message})}))})).catch((function(e){Pe("loginFail","token failure:"+e.message)}))},ba.wxlogin=function(){},ba.cleanup=function(){d.log("FLOO: IM logout, cleanup the data."),je.clear(),St.clear(),be.clear(),Ae.clear(),bt.clearAll()},ba.isLogin=function(){return ga&&Ae.getUid()&&Ae.getToken()&&Ae.getAppid()==Ae.getTokenAppId()},ba.on=ba.listen=function(e,t){t?Ne(e,t):Object.keys(e).forEach((function(t){Ne(t,e[t])}))},ba.off=function(e,t){t?Ie(e,t):Object.keys(e).forEach((function(t){Ie(t,e[t])}))},ba.kickAllWeb=function(){gs.asyncGetDeviceList().then((function(e){if(e&&e.length)if(1===e.length)ba.cleanup(),ma=!0,Object(u.d)();else{var t=[];e.forEach((function(e){e.device_sn!=gs.getDeviceSN()&&6===e.platform&&t.push(new Promise((function(t,n){gs.asyncKickDevice({device_sn:e.device_sn}).then((function(){t()})).catch((function(e){n(e)}))})))})),Promise.all(t).then((function(){ba.cleanup(),ma=!0,Object(u.d)()}))}})).catch((function(e){console.log("flooim asyncGetDeviceList error: ",e)}))},ba.logout=function(e){Gi.disConnect(),u.e.setItem("key_stop_auto_login",!0),ga=!1,e?e.deleteUser||(e.quitAllWeb&&ba.kickAllWeb(),e.linkLogin||(ma=!0,Object(u.d)())):(ma=!0,Object(u.d)())},ba.isReady=function(){return ha},ba.isAppInfoReady=function(){return!!ya},ba.setLogLevel=function(e){d.setLogLevel(e)},ba.disConnect=Gi.disConnect;var Ca=ba;function Ea(e){return new Ca(e),Ca}Ca.rosterManage=qi,Ca.groupManage=hs,Ca.userManage=gs,Ca.sysManage=_s,Ca.rtcManage=la;t.default=Ea;"undefined"!=typeof window&&(window.flooIM=function(e){return Ea(e)})},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"shimGetUserMedia",(function(){return b})),n.d(r,"shimGetDisplayMedia",(function(){return w})),n.d(r,"shimMediaStream",(function(){return _})),n.d(r,"shimOnTrack",(function(){return S})),n.d(r,"shimGetSendersWithDtmf",(function(){return C})),n.d(r,"shimGetStats",(function(){return E})),n.d(r,"shimSenderReceiverGetStats",(function(){return k})),n.d(r,"shimAddTrackRemoveTrackWithNative",(function(){return x})),n.d(r,"shimAddTrackRemoveTrack",(function(){return T})),n.d(r,"shimPeerConnection",(function(){return A})),n.d(r,"fixNegotiationNeeded",(function(){return R}));var o={};n.r(o),n.d(o,"shimGetUserMedia",(function(){return O})),n.d(o,"shimGetDisplayMedia",(function(){return N})),n.d(o,"shimOnTrack",(function(){return I})),n.d(o,"shimPeerConnection",(function(){return P})),n.d(o,"shimSenderGetStats",(function(){return D})),n.d(o,"shimReceiverGetStats",(function(){return M})),n.d(o,"shimRemoveStream",(function(){return j})),n.d(o,"shimRTCDataChannel",(function(){return L})),n.d(o,"shimAddTransceiver",(function(){return U})),n.d(o,"shimGetParameters",(function(){return F})),n.d(o,"shimCreateOffer",(function(){return B})),n.d(o,"shimCreateAnswer",(function(){return G}));var i={};n.r(i),n.d(i,"shimLocalStreamsAPI",(function(){return q})),n.d(i,"shimRemoteStreamsAPI",(function(){return V})),n.d(i,"shimCallbacksAPI",(function(){return H})),n.d(i,"shimGetUserMedia",(function(){return W})),n.d(i,"shimConstraints",(function(){return J})),n.d(i,"shimRTCIceServerUrls",(function(){return z})),n.d(i,"shimTrackEventTransceiver",(function(){return K})),n.d(i,"shimCreateOfferLegacy",(function(){return Y})),n.d(i,"shimAudioContext",(function(){return $}));var s={};n.r(s),n.d(s,"shimRTCIceCandidate",(function(){return Q})),n.d(s,"shimRTCIceCandidateRelayProtocol",(function(){return ee})),n.d(s,"shimMaxMessageSize",(function(){return te})),n.d(s,"shimSendThrowTypeError",(function(){return ne})),n.d(s,"shimConnectionState",(function(){return re})),n.d(s,"removeExtmapAllowMixed",(function(){return oe})),n.d(s,"shimAddIceCandidateNullOrEmpty",(function(){return ie})),n.d(s,"shimParameterlessSetLocalDescription",(function(){return se}));let a=!0,c=!0;function u(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function f(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,o=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return o.apply(this,arguments);const i=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,i),o.apply(this,[e,i])};const i=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return i.apply(this,arguments);if(!this._eventMap[t].has(n))return i.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,i.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function l(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(a=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function d(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(c=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function p(){if("object"==typeof window){if(a)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function h(e,t){c&&console.warn(e+" is deprecated, please use "+t+" instead.")}function g(e){return"[object Object]"===Object.prototype.toString.call(e)}function v(e){return g(e)?Object.keys(e).reduce((function(t,n){const r=g(e[n]),o=r?v(e[n]):e[n],i=r&&!Object.keys(o).length;return void 0===o||i?t:Object.assign(t,{[n]:o})}),{}):e}function y(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",o=new Map;if(null===t)return o;const i=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&i.push(e)}),i.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&function e(t,n,r){n&&!r.has(n.id)&&(r.set(n.id,n),Object.keys(n).forEach(o=>{o.endsWith("Id")?e(t,t.get(n[o]),r):o.endsWith("Ids")&&n[o].forEach(n=>{e(t,t.get(n),r)})}))}(e,n,o)})}),o}const m=p;function b(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[o("min",n)]=r.ideal,t.optional.push(e),e={},e[o("max",n)]=r.ideal,t.optional.push(e)):(e[o("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},o=function(e,o){if(t.version>=61)return o(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let i=e.video.facingMode;i=i&&("object"==typeof i?i:{ideal:i});const s=t.version<66;if(i&&("user"===i.exact||"environment"===i.exact||"user"===i.ideal||"environment"===i.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||s)){let t;if(delete e.video.facingMode,"environment"===i.exact||"environment"===i.ideal?t=["back","rear"]:"user"!==i.exact&&"user"!==i.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let s=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!s&&n.length&&t.includes("back")&&(s=n[n.length-1]),s&&(e.video.deviceId=i.exact?{exact:s.deviceId}:{ideal:s.deviceId}),e.video=r(e.video),m("chrome: "+JSON.stringify(e)),o(e)})}e.video=r(e.video)}return m("chrome: "+JSON.stringify(e)),o(e)},i=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){o(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(i(e))})})}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return o(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(i(e))))}}}function w(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then(t=>{const r=n.video&&n.video.width,o=n.video&&n.video.height,i=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:i||3}},r&&(n.video.mandatory.maxWidth=r),o&&(n.video.mandatory.maxHeight=o),e.navigator.mediaDevices.getUserMedia(n)})}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}function _(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function S(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};const o=new Event("track");o.track=n.track,o.receiver=r,o.transceiver={receiver:r},o.streams=[t.stream],this.dispatchEvent(o)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};const o=new Event("track");o.track=n,o.receiver=r,o.transceiver={receiver:r},o.streams=[t.stream],this.dispatchEvent(o)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else f(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function C(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let o=n.apply(this,arguments);return o||(o=t(this,e),this._senders.push(o)),o};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function E(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,n,r]=arguments;if(arguments.length>0&&"function"==typeof e)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof e))return t.apply(this,[]);const o=function(e){const t={};return e.result().forEach(e=>{const n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach(t=>{n[t]=e.stat(t)}),t[n.id]=n}),t},i=function(e){return new Map(Object.keys(e).map(t=>[t,e[t]]))};if(arguments.length>=2){const r=function(e){n(i(o(e)))};return t.apply(this,[r,e])}return new Promise((e,n)=>{t.apply(this,[function(t){e(i(o(t)))},n])}).then(n,r)}}function k(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>y(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),f(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>y(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function x(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const o=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),o.apply(this,arguments)}}function T(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return x(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const o=e.RTCPeerConnection.prototype.removeStream;function i(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(o.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}function s(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),o.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");const o=this.getSenders().find(e=>e.track===t);if(o)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=i(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>i(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]}));const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=s(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=c.get.apply(this);return""===e.type?e:i(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function A(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]}))}function R(e,t){f(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}function O(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){h("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function N(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}function I(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function P(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]}));const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,o,i]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!o)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(o,i)}}function D(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function M(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),f(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function j(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){h("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function L(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function U(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function F(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function B(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function G(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function q(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function V(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function H(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,o=t.setLocalDescription,i=t.setRemoteDescription,s=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],o=n.apply(this,[r]);return t?(o.then(e,t),Promise.resolve()):o},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],o=r.apply(this,[n]);return t?(o.then(e,t),Promise.resolve()):o};let a=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=a,a=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=a,a=function(e,t,n){const r=s.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=a}function W(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(J(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function J(e){return e&&void 0!==e.video?Object.assign({},e,{video:v(e.video)}):e}function z(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(h("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function K(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Y(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function $(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var X=n(35),Z=n.n(X);function Q(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=Z.a.parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,f(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function ee(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||f(e,"icecandidate",e=>{if(e.candidate){const t=Z.a.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function te(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=function(e){if(!e||!e.sdp)return!1;const t=Z.a.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=Z.a.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})},r=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n},o=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n},i=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const o=Z.a.matchPrefix(e.sdp,"a=max-message-size:");return o.length>0?r=parseInt(o[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r},s=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){const e=r(arguments[0]),t=o(e),n=i(arguments[0],e);let s;s=0===t&&0===n?Number.POSITIVE_INFINITY:0===t||0===n?Math.max(t,n):Math.min(t,n);const a={};Object.defineProperty(a,"maxMessageSize",{get:()=>s}),this._sctp=a}return s.apply(this,arguments)}}function ne(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],o=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&o>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},f(e,"datachannel",e=>(t(e.channel,e.target),e))}function re(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function oe(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t.version>=605)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function ie(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function se(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);const t="offer"===e.type?this.createOffer:this.createAnswer;return t.apply(this).then(e=>n.apply(this,[e]))})}const ae=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=p,a=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.mozGetUserMedia)t.browser="firefox",t.version=u(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=u(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=u(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}(e),c={browserDetails:a,commonShim:s,extractVersion:u,disableLog:l,disableWarnings:d,sdp:X};switch(a.browser){case"chrome":if(!r||!A||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),c;if(null===a.version)return n("Chrome shim can not determine version, not shimming."),c;n("adapter.js shimming chrome."),c.browserShim=r,ie(e,a),se(e),b(e,a),_(e),A(e,a),S(e),T(e,a),C(e),E(e),k(e),R(e,a),Q(e),ee(e),re(e),te(e,a),ne(e),oe(e,a);break;case"firefox":if(!o||!P||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),c;n("adapter.js shimming firefox."),c.browserShim=o,ie(e,a),se(e),O(e,a),P(e,a),I(e),j(e),D(e),M(e),L(e),U(e),F(e),B(e),G(e),Q(e),re(e),te(e,a),ne(e);break;case"safari":if(!i||!t.shimSafari)return n("Safari shim is not included in this adapter release."),c;n("adapter.js shimming safari."),c.browserShim=i,ie(e,a),se(e),z(e),Y(e),H(e),q(e),V(e),K(e),W(e),$(e),Q(e),ee(e),te(e,a),ne(e),oe(e,a);break;default:n("Unsupported browser!")}return c}({window:"undefined"==typeof window?void 0:window});t.default=ae}])}));