(window.webpackJsonp=window.webpackJsonp||[]).push([[2],[function(module,exports){var g;g=function(){return this}();try{g=g||new Function("return this")()}catch(e){"object"==typeof window&&(g=window)}module.exports=g},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(803)},function(module,exports,__webpack_require__){"use strict";var _interopRequireDefault=__webpack_require__(32);Object.defineProperty(exports,"__esModule",{value:!0}),exports.logger=void 0;var _loglevel=_interopRequireDefault(__webpack_require__(885));const logger=_loglevel.default.getLogger("matrix");exports.logger=logger,logger.setLevel(_loglevel.default.levels.DEBUG)},function(module,exports,__webpack_require__){var global=__webpack_require__(6),getOwnPropertyDescriptor=__webpack_require__(66).f,createNonEnumerableProperty=__webpack_require__(25),redefine=__webpack_require__(26),setGlobal=__webpack_require__(181),copyConstructorProperties=__webpack_require__(298),isForced=__webpack_require__(114);module.exports=function(options,source){var target,key,targetProperty,sourceProperty,descriptor,TARGET=options.target,GLOBAL=options.global,STATIC=options.stat;if(target=GLOBAL?global:STATIC?global[TARGET]||setGlobal(TARGET,{}):(global[TARGET]||{}).prototype)for(key in source){if(sourceProperty=source[key],targetProperty=options.noTargetGet?(descriptor=getOwnPropertyDescriptor(target,key))&&descriptor.value:target[key],!isForced(GLOBAL?key:TARGET+(STATIC?".":"#")+key,options.forced)&&void 0!==targetProperty){if(typeof sourceProperty==typeof targetProperty)continue;copyConstructorProperties(sourceProperty,targetProperty)}(options.sham||targetProperty&&targetProperty.sham)&&createNonEnumerableProperty(sourceProperty,"sham",!0),redefine(target,key,sourceProperty,options)}}},function(module,exports,__webpack_require__){var _typeof=__webpack_require__(884);function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var cache=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return cache},cache}module.exports=function _interopRequireWildcard(obj){if(obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache();if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&&cache.set(obj,newObj),newObj}},function(module,exports,__webpack_require__){"use strict";var _interopRequireDefault=__webpack_require__(32);Object.defineProperty(exports,"__esModule",{value:!0}),exports.encodeParams=function encodeParams(params){let qs="";for(const key in params)params.hasOwnProperty(key)&&(qs+="&"+encodeURIComponent(key)+"="+encodeURIComponent(params[key]));return qs.substring(1)},exports.encodeUri=function encodeUri(pathTemplate,variables){for(const key in variables)variables.hasOwnProperty(key)&&(pathTemplate=pathTemplate.replace(key,encodeURIComponent(variables[key])));return pathTemplate},exports.map=function map(array,fn){const results=new Array(array.length);for(let i=0;i=0;i--)if(fn(array[i],i,array))return array[i]}else for(i=0;i=0;i--)if(fn(array[i],i,array))return removed=array[i],array.splice(i,1),removed}else for(i=0;i>>0;if("function"!=typeof fun)throw new TypeError;const res=[],thisArg=arguments.length>=2?arguments[1]:void 0;for(let i=0;i>>0;if("function"!=typeof callback)throw new TypeError(callback+" is not a function");arguments.length>1&&(T=thisArg);const A=new Array(len);for(k=0;k>>0;if("function"!=typeof callback)throw new TypeError(callback+" is not a function");for(arguments.length>1&&(T=thisArg),k=0;k{setTimeout(resolve,ms,value)})},exports.isNullOrUndefined=function isNullOrUndefined(val){return null==val},exports.defer=function defer(){let resolve,reject;const promise=new Promise((_resolve,_reject)=>{resolve=_resolve,reject=_reject});return{resolve:resolve,reject:reject,promise:promise}},exports.promiseMapSeries=async function promiseMapSeries(promises,fn){for(const o of await promises)await fn(await o)},exports.promiseTry=function promiseTry(fn){return new Promise(resolve=>resolve(fn()))};var _unhomoglyph=_interopRequireDefault(__webpack_require__(886));const removeHiddenCharsRegex=/[\u2000-\u200F\u202A-\u202F\u0300-\u036f\uFEFF\s]/g;function escapeRegExp(string){return string.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},function(module,exports,__webpack_require__){(function(global){var check=function(it){return it&&it.Math==Math&&it};module.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||Function("return this")()}).call(this,__webpack_require__(0))},function(module,exports){module.exports=function(exec){try{return!!exec()}catch(error){return!0}}},function(module,exports,__webpack_require__){"use strict";var keys=__webpack_require__(38),hasSymbols="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),toStr=Object.prototype.toString,concat=Array.prototype.concat,origDefineProperty=Object.defineProperty,supportsDescriptors=origDefineProperty&&function(){var obj={};try{for(var _ in origDefineProperty(obj,"x",{enumerable:!1,value:obj}),obj)return!1;return obj.x===obj}catch(e){return!1}}(),defineProperty=function(object,name,value,predicate){var fn;name in object&&("function"!=typeof(fn=predicate)||"[object Function]"!==toStr.call(fn)||!predicate())||(supportsDescriptors?origDefineProperty(object,name,{configurable:!0,enumerable:!1,value:value,writable:!0}):object[name]=value)},defineProperties=function(object,map){var predicates=arguments.length>2?arguments[2]:{},props=keys(map);hasSymbols&&(props=concat.call(props,Object.getOwnPropertySymbols(map)));for(var i=0;i1&&"boolean"!=typeof allowMissing)throw new TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name);if(0===parts.length)return getBaseIntrinsic(name,allowMissing);for(var value=getBaseIntrinsic("%"+parts[0]+"%",allowMissing),i=1;i1&&"boolean"!=typeof allowMissing)throw new TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name);if(0===parts.length)return getBaseIntrinsic(name,allowMissing);for(var value=getBaseIntrinsic("%"+parts[0]+"%",allowMissing),i=1;i1&&"boolean"!=typeof allowMissing)throw new TypeError('"allowMissing" argument must be a boolean');var parts=stringToPath(name);if(0===parts.length)return getBaseIntrinsic(name,allowMissing);for(var value=getBaseIntrinsic("%"+parts[0]+"%",allowMissing),i=1;i0&&existing.length>m&&!existing.warned){existing.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+" "+String(type)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=target,w.type=type,w.count=existing.length,function ProcessEmitWarning(warning){console&&console.warn&&console.warn(warning)}(w)}return target}function _onceWrap(target,type,listener){var state={fired:!1,wrapFn:void 0,target:target,type:type,listener:listener},wrapped=function onceWrapper(){for(var args=[],i=0;i0&&(er=args[0]),er instanceof Error)throw er;var err=new Error("Unhandled error."+(er?" ("+er.message+")":""));throw err.context=er,err}var handler=events[type];if(void 0===handler)return!1;if("function"==typeof handler)ReflectApply(handler,this,args);else{var len=handler.length,listeners=arrayClone(handler,len);for(i=0;i=0;i--)if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener,position=i;break}if(position<0)return this;0===position?list.shift():function spliceOne(list,index){for(;index+1=0;i--)this.removeListener(type,listeners[i]);return this},EventEmitter.prototype.listeners=function listeners(type){return _listeners(this,type,!0)},EventEmitter.prototype.rawListeners=function rawListeners(type){return _listeners(this,type,!1)},EventEmitter.listenerCount=function(emitter,type){return"function"==typeof emitter.listenerCount?emitter.listenerCount(type):listenerCount.call(emitter,type)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]}},function(module,exports,__webpack_require__){var fails=__webpack_require__(7);module.exports=!fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},function(module,exports,__webpack_require__){var DESCRIPTORS=__webpack_require__(19),IE8_DOM_DEFINE=__webpack_require__(296),anObject=__webpack_require__(17),toPrimitive=__webpack_require__(83),nativeDefineProperty=Object.defineProperty;exports.f=DESCRIPTORS?nativeDefineProperty:function defineProperty(O,P,Attributes){if(anObject(O),P=toPrimitive(P,!0),anObject(Attributes),IE8_DOM_DEFINE)try{return nativeDefineProperty(O,P,Attributes)}catch(error){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported");return"value"in Attributes&&(O[P]=Attributes.value),O}},function(module,exports,__webpack_require__){"use strict";var fnToStr=Function.prototype.toString,constructorRegex=/^\s*class\b/,isES6ClassFn=function isES6ClassFunction(value){try{var fnStr=fnToStr.call(value);return constructorRegex.test(fnStr)}catch(e){return!1}},toStr=Object.prototype.toString,hasToStringTag="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;module.exports=function isCallable(value){if(!value)return!1;if("function"!=typeof value&&"object"!=typeof value)return!1;if("function"==typeof value&&!value.prototype)return!0;if(hasToStringTag)return function tryFunctionToStr(value){try{return!isES6ClassFn(value)&&(fnToStr.call(value),!0)}catch(e){return!1}}(value);if(isES6ClassFn(value))return!1;var strClass=toStr.call(value);return"[object Function]"===strClass||"[object GeneratorFunction]"===strClass}},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),fails=__webpack_require__(7),isArray=__webpack_require__(85),isObject=__webpack_require__(12),toObject=__webpack_require__(28),toLength=__webpack_require__(27),createProperty=__webpack_require__(187),arraySpeciesCreate=__webpack_require__(301),arrayMethodHasSpeciesSupport=__webpack_require__(115),wellKnownSymbol=__webpack_require__(10),V8_VERSION=__webpack_require__(189),IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION>=51||!fails(function(){var array=[];return array[IS_CONCAT_SPREADABLE]=!1,array.concat()[0]!==array}),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(O){if(!isObject(O))return!1;var spreadable=O[IS_CONCAT_SPREADABLE];return void 0!==spreadable?!!spreadable:isArray(O)};$({target:"Array",proto:!0,forced:!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT},{concat:function concat(arg){var i,k,length,len,E,O=toObject(this),A=arraySpeciesCreate(O,0),n=0;for(i=-1,length=arguments.length;i9007199254740991)throw TypeError("Maximum allowed index exceeded");for(k=0;k=9007199254740991)throw TypeError("Maximum allowed index exceeded");createProperty(A,n++,E)}return A.length=n,A}})},function(module,exports,__webpack_require__){var TO_STRING_TAG_SUPPORT=__webpack_require__(190),redefine=__webpack_require__(26),toString=__webpack_require__(552);TO_STRING_TAG_SUPPORT||redefine(Object.prototype,"toString",toString,{unsafe:!0})},function(module,exports,__webpack_require__){var DESCRIPTORS=__webpack_require__(19),definePropertyModule=__webpack_require__(21),createPropertyDescriptor=__webpack_require__(82);module.exports=DESCRIPTORS?function(object,key,value){return definePropertyModule.f(object,key,createPropertyDescriptor(1,value))}:function(object,key,value){return object[key]=value,object}},function(module,exports,__webpack_require__){var global=__webpack_require__(6),createNonEnumerableProperty=__webpack_require__(25),has=__webpack_require__(20),setGlobal=__webpack_require__(181),inspectSource=__webpack_require__(182),InternalStateModule=__webpack_require__(52),getInternalState=InternalStateModule.get,enforceInternalState=InternalStateModule.enforce,TEMPLATE=String(String).split("String");(module.exports=function(O,key,value,options){var unsafe=!!options&&!!options.unsafe,simple=!!options&&!!options.enumerable,noTargetGet=!!options&&!!options.noTargetGet;"function"==typeof value&&("string"!=typeof key||has(value,"name")||createNonEnumerableProperty(value,"name",key),enforceInternalState(value).source=TEMPLATE.join("string"==typeof key?key:"")),O!==global?(unsafe?!noTargetGet&&O[key]&&(simple=!0):delete O[key],simple?O[key]=value:createNonEnumerableProperty(O,key,value)):simple?O[key]=value:setGlobal(key,value)})(Function.prototype,"toString",function toString(){return"function"==typeof this&&getInternalState(this).source||inspectSource(this)})},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(113),min=Math.min;module.exports=function(argument){return argument>0?min(toInteger(argument),9007199254740991):0}},function(module,exports,__webpack_require__){var requireObjectCoercible=__webpack_require__(33);module.exports=function(argument){return Object(requireObjectCoercible(argument))}},function(module,exports,__webpack_require__){"use strict";var toIndexedObject=__webpack_require__(51),addToUnscopables=__webpack_require__(191),Iterators=__webpack_require__(89),InternalStateModule=__webpack_require__(52),defineIterator=__webpack_require__(192),setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor("Array Iterator");module.exports=defineIterator(Array,"Array",function(iterated,kind){setInternalState(this,{type:"Array Iterator",target:toIndexedObject(iterated),index:0,kind:kind})},function(){var state=getInternalState(this),target=state.target,kind=state.kind,index=state.index++;return!target||index>=target.length?(state.target=void 0,{value:void 0,done:!0}):"keys"==kind?{value:index,done:!1}:"values"==kind?{value:target[index],done:!1}:{value:[index,target[index]],done:!1}},"values"),Iterators.Arguments=Iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries")},function(module,exports,__webpack_require__){(function(global){var check=function(it){return it&&it.Math==Math&&it};module.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||Function("return this")()}).call(this,__webpack_require__(0))},function(module,exports,__webpack_require__){var freeGlobal=__webpack_require__(354),freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();module.exports=root},function(module,exports){module.exports=function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}},function(module,exports){module.exports=function(it){if(null==it)throw TypeError("Can't call method on "+it);return it}},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),global=__webpack_require__(6),getBuiltIn=__webpack_require__(68),IS_PURE=__webpack_require__(67),DESCRIPTORS=__webpack_require__(19),NATIVE_SYMBOL=__webpack_require__(188),USE_SYMBOL_AS_UID=__webpack_require__(302),fails=__webpack_require__(7),has=__webpack_require__(20),isArray=__webpack_require__(85),isObject=__webpack_require__(12),anObject=__webpack_require__(17),toObject=__webpack_require__(28),toIndexedObject=__webpack_require__(51),toPrimitive=__webpack_require__(83),createPropertyDescriptor=__webpack_require__(82),nativeObjectCreate=__webpack_require__(69),objectKeys=__webpack_require__(86),getOwnPropertyNamesModule=__webpack_require__(112),getOwnPropertyNamesExternal=__webpack_require__(553),getOwnPropertySymbolsModule=__webpack_require__(186),getOwnPropertyDescriptorModule=__webpack_require__(66),definePropertyModule=__webpack_require__(21),propertyIsEnumerableModule=__webpack_require__(107),createNonEnumerableProperty=__webpack_require__(25),redefine=__webpack_require__(26),shared=__webpack_require__(109),sharedKey=__webpack_require__(110),hiddenKeys=__webpack_require__(84),uid=__webpack_require__(111),wellKnownSymbol=__webpack_require__(10),wrappedWellKnownSymbolModule=__webpack_require__(307),defineWellKnownSymbol=__webpack_require__(13),setToStringTag=__webpack_require__(56),InternalStateModule=__webpack_require__(52),$forEach=__webpack_require__(57).forEach,HIDDEN=sharedKey("hidden"),TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor("Symbol"),ObjectPrototype=Object.prototype,$Symbol=global.Symbol,$stringify=getBuiltIn("JSON","stringify"),nativeGetOwnPropertyDescriptor=getOwnPropertyDescriptorModule.f,nativeDefineProperty=definePropertyModule.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule.f,AllSymbols=shared("symbols"),ObjectPrototypeSymbols=shared("op-symbols"),StringToSymbolRegistry=shared("string-to-symbol-registry"),SymbolToStringRegistry=shared("symbol-to-string-registry"),WellKnownSymbolsStore=shared("wks"),QObject=global.QObject,USE_SETTER=!QObject||!QObject.prototype||!QObject.prototype.findChild,setSymbolDescriptor=DESCRIPTORS&&fails(function(){return 7!=nativeObjectCreate(nativeDefineProperty({},"a",{get:function(){return nativeDefineProperty(this,"a",{value:7}).a}})).a})?function(O,P,Attributes){var ObjectPrototypeDescriptor=nativeGetOwnPropertyDescriptor(ObjectPrototype,P);ObjectPrototypeDescriptor&&delete ObjectPrototype[P],nativeDefineProperty(O,P,Attributes),ObjectPrototypeDescriptor&&O!==ObjectPrototype&&nativeDefineProperty(ObjectPrototype,P,ObjectPrototypeDescriptor)}:nativeDefineProperty,wrap=function(tag,description){var symbol=AllSymbols[tag]=nativeObjectCreate($Symbol.prototype);return setInternalState(symbol,{type:"Symbol",tag:tag,description:description}),DESCRIPTORS||(symbol.description=description),symbol},isSymbol=NATIVE_SYMBOL&&"symbol"==typeof $Symbol.iterator?function(it){return"symbol"==typeof it}:function(it){return Object(it)instanceof $Symbol},$defineProperty=function defineProperty(O,P,Attributes){O===ObjectPrototype&&$defineProperty(ObjectPrototypeSymbols,P,Attributes),anObject(O);var key=toPrimitive(P,!0);return anObject(Attributes),has(AllSymbols,key)?(Attributes.enumerable?(has(O,HIDDEN)&&O[HIDDEN][key]&&(O[HIDDEN][key]=!1),Attributes=nativeObjectCreate(Attributes,{enumerable:createPropertyDescriptor(0,!1)})):(has(O,HIDDEN)||nativeDefineProperty(O,HIDDEN,createPropertyDescriptor(1,{})),O[HIDDEN][key]=!0),setSymbolDescriptor(O,key,Attributes)):nativeDefineProperty(O,key,Attributes)},$defineProperties=function defineProperties(O,Properties){anObject(O);var properties=toIndexedObject(Properties),keys=objectKeys(properties).concat($getOwnPropertySymbols(properties));return $forEach(keys,function(key){DESCRIPTORS&&!$propertyIsEnumerable.call(properties,key)||$defineProperty(O,key,properties[key])}),O},$propertyIsEnumerable=function propertyIsEnumerable(V){var P=toPrimitive(V,!0),enumerable=nativePropertyIsEnumerable.call(this,P);return!(this===ObjectPrototype&&has(AllSymbols,P)&&!has(ObjectPrototypeSymbols,P))&&(!(enumerable||!has(this,P)||!has(AllSymbols,P)||has(this,HIDDEN)&&this[HIDDEN][P])||enumerable)},$getOwnPropertyDescriptor=function getOwnPropertyDescriptor(O,P){var it=toIndexedObject(O),key=toPrimitive(P,!0);if(it!==ObjectPrototype||!has(AllSymbols,key)||has(ObjectPrototypeSymbols,key)){var descriptor=nativeGetOwnPropertyDescriptor(it,key);return!descriptor||!has(AllSymbols,key)||has(it,HIDDEN)&&it[HIDDEN][key]||(descriptor.enumerable=!0),descriptor}},$getOwnPropertyNames=function getOwnPropertyNames(O){var names=nativeGetOwnPropertyNames(toIndexedObject(O)),result=[];return $forEach(names,function(key){has(AllSymbols,key)||has(hiddenKeys,key)||result.push(key)}),result},$getOwnPropertySymbols=function getOwnPropertySymbols(O){var IS_OBJECT_PROTOTYPE=O===ObjectPrototype,names=nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE?ObjectPrototypeSymbols:toIndexedObject(O)),result=[];return $forEach(names,function(key){!has(AllSymbols,key)||IS_OBJECT_PROTOTYPE&&!has(ObjectPrototype,key)||result.push(AllSymbols[key])}),result};(NATIVE_SYMBOL||(redefine(($Symbol=function Symbol(){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor");var description=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,tag=uid(description),setter=function(value){this===ObjectPrototype&&setter.call(ObjectPrototypeSymbols,value),has(this,HIDDEN)&&has(this[HIDDEN],tag)&&(this[HIDDEN][tag]=!1),setSymbolDescriptor(this,tag,createPropertyDescriptor(1,value))};return DESCRIPTORS&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype,tag,{configurable:!0,set:setter}),wrap(tag,description)}).prototype,"toString",function toString(){return getInternalState(this).tag}),propertyIsEnumerableModule.f=$propertyIsEnumerable,definePropertyModule.f=$defineProperty,getOwnPropertyDescriptorModule.f=$getOwnPropertyDescriptor,getOwnPropertyNamesModule.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames,getOwnPropertySymbolsModule.f=$getOwnPropertySymbols,DESCRIPTORS&&(nativeDefineProperty($Symbol.prototype,"description",{configurable:!0,get:function description(){return getInternalState(this).description}}),IS_PURE||redefine(ObjectPrototype,"propertyIsEnumerable",$propertyIsEnumerable,{unsafe:!0}))),USE_SYMBOL_AS_UID||(wrappedWellKnownSymbolModule.f=function(name){return wrap(wellKnownSymbol(name),name)}),$({global:!0,wrap:!0,forced:!NATIVE_SYMBOL,sham:!NATIVE_SYMBOL},{Symbol:$Symbol}),$forEach(objectKeys(WellKnownSymbolsStore),function(name){defineWellKnownSymbol(name)}),$({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL},{for:function(key){var string=String(key);if(has(StringToSymbolRegistry,string))return StringToSymbolRegistry[string];var symbol=$Symbol(string);return StringToSymbolRegistry[string]=symbol,SymbolToStringRegistry[symbol]=string,symbol},keyFor:function keyFor(sym){if(!isSymbol(sym))throw TypeError(sym+" is not a symbol");if(has(SymbolToStringRegistry,sym))return SymbolToStringRegistry[sym]},useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),$({target:"Object",stat:!0,forced:!NATIVE_SYMBOL,sham:!DESCRIPTORS},{create:function create(O,Properties){return void 0===Properties?nativeObjectCreate(O):$defineProperties(nativeObjectCreate(O),Properties)},defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),$({target:"Object",stat:!0,forced:!NATIVE_SYMBOL},{getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols}),$({target:"Object",stat:!0,forced:fails(function(){getOwnPropertySymbolsModule.f(1)})},{getOwnPropertySymbols:function getOwnPropertySymbols(it){return getOwnPropertySymbolsModule.f(toObject(it))}}),$stringify)&&$({target:"JSON",stat:!0,forced:!NATIVE_SYMBOL||fails(function(){var symbol=$Symbol();return"[null]"!=$stringify([symbol])||"{}"!=$stringify({a:symbol})||"{}"!=$stringify(Object(symbol))})},{stringify:function stringify(it,replacer,space){for(var $replacer,args=[it],index=1;arguments.length>index;)args.push(arguments[index++]);if($replacer=replacer,(isObject(replacer)||void 0!==it)&&!isSymbol(it))return isArray(replacer)||(replacer=function(key,value){if("function"==typeof $replacer&&(value=$replacer.call(this,key,value)),!isSymbol(value))return value}),args[1]=replacer,$stringify.apply(null,args)}});$Symbol.prototype[TO_PRIMITIVE]||createNonEnumerableProperty($Symbol.prototype,TO_PRIMITIVE,$Symbol.prototype.valueOf),setToStringTag($Symbol,"Symbol"),hiddenKeys[HIDDEN]=!0},function(module,exports,__webpack_require__){var global=__webpack_require__(6),DOMIterables=__webpack_require__(311),ArrayIteratorMethods=__webpack_require__(29),createNonEnumerableProperty=__webpack_require__(25),wellKnownSymbol=__webpack_require__(10),ITERATOR=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=ArrayIteratorMethods.values;for(var COLLECTION_NAME in DOMIterables){var Collection=global[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype){if(CollectionPrototype[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(CollectionPrototype,ITERATOR,ArrayValues)}catch(error){CollectionPrototype[ITERATOR]=ArrayValues}if(CollectionPrototype[TO_STRING_TAG]||createNonEnumerableProperty(CollectionPrototype,TO_STRING_TAG,COLLECTION_NAME),DOMIterables[COLLECTION_NAME])for(var METHOD_NAME in ArrayIteratorMethods)if(CollectionPrototype[METHOD_NAME]!==ArrayIteratorMethods[METHOD_NAME])try{createNonEnumerableProperty(CollectionPrototype,METHOD_NAME,ArrayIteratorMethods[METHOD_NAME])}catch(error){CollectionPrototype[METHOD_NAME]=ArrayIteratorMethods[METHOD_NAME]}}}},function(module,exports,__webpack_require__){(function(global){var check=function(it){return it&&it.Math==Math&&it};module.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||Function("return this")()}).call(this,__webpack_require__(0))},function(module,exports){module.exports=function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}},function(module,exports,__webpack_require__){"use strict";var slice=Array.prototype.slice,isArgs=__webpack_require__(241),origKeys=Object.keys,keysShim=origKeys?function keys(o){return origKeys(o)}:__webpack_require__(424),originalKeys=Object.keys;keysShim.shim=function shimObjectKeys(){Object.keys?function(){var args=Object.keys(arguments);return args&&args.length===arguments.length}(1,2)||(Object.keys=function keys(object){return isArgs(object)?originalKeys(slice.call(object)):originalKeys(object)}):Object.keys=keysShim;return Object.keys||keysShim},module.exports=keysShim},function(module,exports,__webpack_require__){"use strict";var GetIntrinsic=__webpack_require__(14),callBind=__webpack_require__(106),$indexOf=callBind(GetIntrinsic("String.prototype.indexOf"));module.exports=function callBoundIntrinsic(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);return"function"==typeof intrinsic&&$indexOf(name,".prototype.")?callBind(intrinsic):intrinsic}},function(module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),DESCRIPTORS=__webpack_require__(19),global=__webpack_require__(6),has=__webpack_require__(20),isObject=__webpack_require__(12),defineProperty=__webpack_require__(21).f,copyConstructorProperties=__webpack_require__(298),NativeSymbol=global.Symbol;if(DESCRIPTORS&&"function"==typeof NativeSymbol&&(!("description"in NativeSymbol.prototype)||void 0!==NativeSymbol().description)){var EmptyStringDescriptionStore={},SymbolWrapper=function Symbol(){var description=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),result=this instanceof SymbolWrapper?new NativeSymbol(description):void 0===description?NativeSymbol():NativeSymbol(description);return""===description&&(EmptyStringDescriptionStore[result]=!0),result};copyConstructorProperties(SymbolWrapper,NativeSymbol);var symbolPrototype=SymbolWrapper.prototype=NativeSymbol.prototype;symbolPrototype.constructor=SymbolWrapper;var symbolToString=symbolPrototype.toString,native="Symbol(test)"==String(NativeSymbol("test")),regexp=/^Symbol\((.*)\)[^)]+$/;defineProperty(symbolPrototype,"description",{configurable:!0,get:function description(){var symbol=isObject(this)?this.valueOf():this,string=symbolToString.call(symbol);if(has(EmptyStringDescriptionStore,symbol))return"";var desc=native?string.slice(7,-1):string.replace(regexp,"$1");return""===desc?void 0:desc}}),$({global:!0,forced:!0},{Symbol:SymbolWrapper})}},function(module,exports,__webpack_require__){__webpack_require__(13)("iterator")},function(module,exports,__webpack_require__){(function(global){var win;win="undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:{},module.exports=win}).call(this,__webpack_require__(0))},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),forEach=__webpack_require__(308);$({target:"Array",proto:!0,forced:[].forEach!=forEach},{forEach:forEach})},function(module,exports,__webpack_require__){var global=__webpack_require__(6),DOMIterables=__webpack_require__(311),forEach=__webpack_require__(308),createNonEnumerableProperty=__webpack_require__(25);for(var COLLECTION_NAME in DOMIterables){var Collection=global[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype&&CollectionPrototype.forEach!==forEach)try{createNonEnumerableProperty(CollectionPrototype,"forEach",forEach)}catch(error){CollectionPrototype.forEach=forEach}}},function(module,exports,__webpack_require__){"use strict";var charAt=__webpack_require__(319).charAt,InternalStateModule=__webpack_require__(52),defineIterator=__webpack_require__(192),setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor("String Iterator");defineIterator(String,"String",function(iterated){setInternalState(this,{type:"String Iterator",string:String(iterated),index:0})},function next(){var point,state=getInternalState(this),string=state.string,index=state.index;return index>=string.length?{value:void 0,done:!0}:(point=charAt(string,index),state.index+=point.length,{value:point,done:!1})})},function(module,exports){module.exports=function isObject(value){var type=typeof value;return null!=value&&("object"==type||"function"==type)}},function(module,exports){module.exports=function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}},function(module,exports,__webpack_require__){"use strict";var GetIntrinsic=__webpack_require__(15),callBind=__webpack_require__(104),$indexOf=callBind(GetIntrinsic("String.prototype.indexOf"));module.exports=function callBoundIntrinsic(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);return"function"==typeof intrinsic&&$indexOf(name,".prototype.")?callBind(intrinsic):intrinsic}},function(module,exports,__webpack_require__){"use strict";var GetIntrinsic=__webpack_require__(16),callBind=__webpack_require__(105),$indexOf=callBind(GetIntrinsic("String.prototype.indexOf"));module.exports=function callBoundIntrinsic(name,allowMissing){var intrinsic=GetIntrinsic(name,!!allowMissing);return"function"==typeof intrinsic&&$indexOf(name,".prototype.")?callBind(intrinsic):intrinsic}},function(module,exports,__webpack_require__){var IndexedObject=__webpack_require__(108),requireObjectCoercible=__webpack_require__(33);module.exports=function(it){return IndexedObject(requireObjectCoercible(it))}},function(module,exports,__webpack_require__){var set,get,has,NATIVE_WEAK_MAP=__webpack_require__(297),global=__webpack_require__(6),isObject=__webpack_require__(12),createNonEnumerableProperty=__webpack_require__(25),objectHas=__webpack_require__(20),sharedKey=__webpack_require__(110),hiddenKeys=__webpack_require__(84),WeakMap=global.WeakMap;if(NATIVE_WEAK_MAP){var store=new WeakMap,wmget=store.get,wmhas=store.has,wmset=store.set;set=function(it,metadata){return wmset.call(store,it,metadata),metadata},get=function(it){return wmget.call(store,it)||{}},has=function(it){return wmhas.call(store,it)}}else{var STATE=sharedKey("state");hiddenKeys[STATE]=!0,set=function(it,metadata){return createNonEnumerableProperty(it,STATE,metadata),metadata},get=function(it){return objectHas(it,STATE)?it[STATE]:{}},has=function(it){return objectHas(it,STATE)}}module.exports={set:set,get:get,has:has,enforce:function(it){return has(it)?get(it):set(it,{})},getterFor:function(TYPE){return function(it){var state;if(!isObject(it)||(state=get(it)).type!==TYPE)throw TypeError("Incompatible receiver, "+TYPE+" required");return state}}}},function(module,exports,__webpack_require__){var redefine=__webpack_require__(26),DatePrototype=Date.prototype,nativeDateToString=DatePrototype.toString,getTime=DatePrototype.getTime;new Date(NaN)+""!="Invalid Date"&&redefine(DatePrototype,"toString",function toString(){var value=getTime.call(this);return value==value?nativeDateToString.call(this):"Invalid Date"})},function(module,exports,__webpack_require__){"use strict";var _interopRequireWildcard=__webpack_require__(4);Object.defineProperty(exports,"__esModule",{value:!0}),exports.MatrixEvent=exports.EventStatus=void 0;var _events=__webpack_require__(18),utils=_interopRequireWildcard(__webpack_require__(5)),_logger=__webpack_require__(2);exports.EventStatus={NOT_SENT:"not_sent",ENCRYPTING:"encrypting",SENDING:"sending",QUEUED:"queued",SENT:"sent",CANCELLED:"cancelled"};const interns={};function intern(str){return interns[str]||(interns[str]=str),interns[str]}const MatrixEvent=function(event){["state_key","type","sender","room_id","membership"].forEach(prop=>{event[prop]&&(event[prop]=intern(event[prop]))}),["membership","avatar_url","displayname"].forEach(prop=>{event.content&&event.content[prop]&&(event.content[prop]=intern(event.content[prop]))}),["rel_type"].forEach(prop=>{event.content&&event.content["m.relates_to"]&&event.content["m.relates_to"][prop]&&(event.content["m.relates_to"][prop]=intern(event.content["m.relates_to"][prop]))}),this.event=event||{},this.sender=null,this.target=null,this.status=null,this.error=null,this.forwardLooking=!0,this._pushActions=null,this._replacingEvent=null,this._localRedactionEvent=null,this._isCancelled=!1,this._clearEvent={},this._senderCurve25519Key=null,this._claimedEd25519Key=null,this._forwardingCurve25519KeyChain=[],this._decryptionPromise=null,this._retryDecryption=!1};exports.MatrixEvent=MatrixEvent,utils.inherits(MatrixEvent,_events.EventEmitter),utils.extend(MatrixEvent.prototype,{getId:function(){return this.event.event_id},getSender:function(){return this.event.sender||this.event.user_id},getType:function(){return this._clearEvent.type||this.event.type},getWireType:function(){return this.event.type},getRoomId:function(){return this.event.room_id},getTs:function(){return this.event.origin_server_ts},getDate:function(){return this.event.origin_server_ts?new Date(this.event.origin_server_ts):null},getOriginalContent:function(){return this._localRedactionEvent?{}:this._clearEvent.content||this.event.content||{}},getContent:function(){return this._localRedactionEvent?{}:this._replacingEvent?this._replacingEvent.getContent()["m.new_content"]||{}:this.getOriginalContent()},getWireContent:function(){return this.event.content||{}},getPrevContent:function(){return this.getUnsigned().prev_content||this.event.prev_content||{}},getDirectionalContent:function(){return this.forwardLooking?this.getContent():this.getPrevContent()},getAge:function(){return this.getUnsigned().age||this.event.age},getLocalAge:function(){return Date.now()-this.getTs()},getStateKey:function(){return this.event.state_key},isState:function(){return void 0!==this.event.state_key},makeEncrypted:function(crypto_type,crypto_content,senderCurve25519Key,claimedEd25519Key){this._clearEvent={type:this.event.type,content:this.event.content},this.event.type=crypto_type,this.event.content=crypto_content,this._senderCurve25519Key=senderCurve25519Key,this._claimedEd25519Key=claimedEd25519Key},isBeingDecrypted:function(){return null!=this._decryptionPromise},isDecryptionFailure:function(){return this._clearEvent&&this._clearEvent.content&&"m.bad.encrypted"===this._clearEvent.content.msgtype},attemptDecryption:async function(crypto){if(!this.isEncrypted())throw new Error("Attempt to decrypt event which isn't encrypted");if(this._clearEvent&&this._clearEvent.content&&"m.bad.encrypted"!==this._clearEvent.content.msgtype)throw new Error("Attempt to decrypt event which has already been encrypted");return this._decryptionPromise?(_logger.logger.log(`Event ${this.getId()} already being decrypted; queueing a retry`),this._retryDecryption=!0,this._decryptionPromise):(this._decryptionPromise=this._decryptionLoop(crypto),this._decryptionPromise)},cancelAndResendKeyRequest:function(crypto,userId){const wireContent=this.getWireContent();return crypto.requestRoomKey({algorithm:wireContent.algorithm,room_id:this.getRoomId(),session_id:wireContent.session_id,sender_key:wireContent.sender_key},this.getKeyRequestRecipients(userId),!0)},getKeyRequestRecipients:function(userId){const wireContent=this.getWireContent(),recipients=[{userId:userId,deviceId:"*"}],sender=this.getSender();return sender!==userId&&recipients.push({userId:sender,deviceId:wireContent.device_id}),recipients},_decryptionLoop:async function(crypto){for(await Promise.resolve();;){let res,err;this._retryDecryption=!1;try{res=crypto?await crypto.decryptEvent(this):this._badEncryptedMessage("Encryption not enabled")}catch(e){if("DecryptionError"!==e.name)return _logger.logger.error(`Error decrypting event (id=${this.getId()}): ${e.stack||e}`),this._decryptionPromise=null,void(this._retryDecryption=!1);if(err=e,this._retryDecryption){_logger.logger.log(`Got error decrypting event (id=${this.getId()}: `+`${e}), but retrying`);continue}_logger.logger.warn(`Error decrypting event (id=${this.getId()}): ${e.detailedString}`),res=this._badEncryptedMessage(e.message)}return this._decryptionPromise=null,this._retryDecryption=!1,this._setClearData(res),this.setPushActions(null),void this.emit("Event.decrypted",this,err)}},_badEncryptedMessage:function(reason){return{clearEvent:{type:"m.room.message",content:{msgtype:"m.bad.encrypted",body:"** Unable to decrypt: "+reason+" **"}}}},_setClearData:function(decryptionResult){this._clearEvent=decryptionResult.clearEvent,this._senderCurve25519Key=decryptionResult.senderCurve25519Key||null,this._claimedEd25519Key=decryptionResult.claimedEd25519Key||null,this._forwardingCurve25519KeyChain=decryptionResult.forwardingCurve25519KeyChain||[]},getClearContent:function(){const ev=this._clearEvent;return ev&&ev.content?ev.content:null},isEncrypted:function(){return"m.room.encrypted"===this.event.type},getSenderKey:function(){return this._senderCurve25519Key},getKeysClaimed:function(){return{ed25519:this._claimedEd25519Key}},getClaimedEd25519Key:function(){return this._claimedEd25519Key},getForwardingCurve25519KeyChain:function(){return this._forwardingCurve25519KeyChain},getUnsigned:function(){return this.event.unsigned||{}},unmarkLocallyRedacted:function(){const value=this._localRedactionEvent;return this._localRedactionEvent=null,this.event.unsigned&&(this.event.unsigned.redacted_because=null),!!value},markLocallyRedacted:function(redactionEvent){this._localRedactionEvent||(this.emit("Event.beforeRedaction",this,redactionEvent),this._localRedactionEvent=redactionEvent,this.event.unsigned||(this.event.unsigned={}),this.event.unsigned.redacted_because=redactionEvent.event)},makeRedacted:function(redaction_event){if(!redaction_event.event)throw new Error("invalid redaction_event in makeRedacted");let key;for(key in this._localRedactionEvent=null,this.emit("Event.beforeRedaction",this,redaction_event),this._replacingEvent=null,this.event.unsigned||(this.event.unsigned={}),this.event.unsigned.redacted_because=redaction_event.event,this.event)this.event.hasOwnProperty(key)&&(_REDACT_KEEP_KEY_MAP[key]||delete this.event[key]);const keeps=_REDACT_KEEP_CONTENT_MAP[this.getType()]||{},content=this.getContent();for(key in content)content.hasOwnProperty(key)&&(keeps[key]||delete content[key])},isRedacted:function(){return Boolean(this.getUnsigned().redacted_because)},isRedaction:function(){return"m.room.redaction"===this.getType()},getPushActions:function(){return this._pushActions},setPushActions:function(pushActions){this._pushActions=pushActions},handleRemoteEcho:function(event){const oldUnsigned=this.getUnsigned(),oldId=this.getId();this.event=event,oldUnsigned.redacted_because&&(this.event.unsigned||(this.event.unsigned={}),this.event.unsigned.redacted_because=oldUnsigned.redacted_because),this.setStatus(null),this.getId()!==oldId&&this.emit("Event.localEventIdReplaced",this)},isSending(){return!!this.status},setStatus(status){this.status=status,this.emit("Event.status",this,status)},replaceLocalEventId(eventId){this.event.event_id=eventId,this.emit("Event.localEventIdReplaced",this)},isRelation(relType){const content=this.getWireContent(),relation=content&&content["m.relates_to"];return relation&&relation.rel_type&&relation.event_id&&(relType&&relation.rel_type===relType||!relType)},getRelation(){return this.isRelation()?this.getWireContent()["m.relates_to"]:null},makeReplaced(newEvent){this.isRedacted()&&newEvent||this._replacingEvent!==newEvent&&(this._replacingEvent=newEvent,this.emit("Event.replaced",this))},getAssociatedStatus(){return this._replacingEvent?this._replacingEvent.status:this._localRedactionEvent?this._localRedactionEvent.status:this.status},getServerAggregatedRelation(relType){const relations=this.getUnsigned()["m.relations"];if(relations)return relations[relType]},replacingEventId(){const replaceRelation=this.getServerAggregatedRelation("m.replace");return replaceRelation?replaceRelation.event_id:this._replacingEvent?this._replacingEvent.getId():void 0},replacingEvent(){return this._replacingEvent},replacingEventDate(){const replaceRelation=this.getServerAggregatedRelation("m.replace");if(replaceRelation){const ts=replaceRelation.origin_server_ts;if(Number.isFinite(ts))return new Date(ts)}else if(this._replacingEvent)return this._replacingEvent.getDate()},localRedactionEvent(){return this._localRedactionEvent},getAssociatedId(){const relation=this.getRelation();return relation?relation.event_id:this.isRedaction()?this.event.redacts:void 0},hasAssocation(){return!!this.getAssociatedId()},updateAssociatedId(eventId){const relation=this.getRelation();relation?relation.event_id=eventId:this.isRedaction()&&(this.event.redacts=eventId)},flagCancelled(cancelled=!0){this._isCancelled=cancelled},isCancelled(){return this._isCancelled},toJSON(){const event={type:this.getType(),sender:this.getSender(),content:this.getContent(),event_id:this.getId(),origin_server_ts:this.getTs(),unsigned:this.getUnsigned(),room_id:this.getRoomId()};return this.isRedaction()&&(event.redacts=this.event.redacts),this.isEncrypted()?{decrypted:event,encrypted:this.event}:event}});const _REDACT_KEEP_KEY_MAP=["event_id","type","room_id","user_id","sender","state_key","prev_state","content","unsigned","origin_server_ts"].reduce(function(ret,val){return ret[val]=1,ret},{}),_REDACT_KEEP_CONTENT_MAP={"m.room.member":{membership:1},"m.room.create":{creator:1},"m.room.join_rules":{join_rule:1},"m.room.power_levels":{ban:1,events:1,events_default:1,kick:1,redact:1,state_default:1,users:1,users_default:1},"m.room.aliases":{aliases:1}}},function(module,exports,__webpack_require__){"use strict";(function(global){var origSymbol=global.Symbol,hasSymbolSham=__webpack_require__(435);module.exports=function hasNativeSymbols(){return"function"==typeof origSymbol&&("function"==typeof Symbol&&("symbol"==typeof origSymbol("foo")&&("symbol"==typeof Symbol("bar")&&hasSymbolSham())))}}).call(this,__webpack_require__(0))},function(module,exports,__webpack_require__){var defineProperty=__webpack_require__(21).f,has=__webpack_require__(20),TO_STRING_TAG=__webpack_require__(10)("toStringTag");module.exports=function(it,TAG,STATIC){it&&!has(it=STATIC?it:it.prototype,TO_STRING_TAG)&&defineProperty(it,TO_STRING_TAG,{configurable:!0,value:TAG})}},function(module,exports,__webpack_require__){var bind=__webpack_require__(87),IndexedObject=__webpack_require__(108),toObject=__webpack_require__(28),toLength=__webpack_require__(27),arraySpeciesCreate=__webpack_require__(301),push=[].push,createMethod=function(TYPE){var IS_MAP=1==TYPE,IS_FILTER=2==TYPE,IS_SOME=3==TYPE,IS_EVERY=4==TYPE,IS_FIND_INDEX=6==TYPE,NO_HOLES=5==TYPE||IS_FIND_INDEX;return function($this,callbackfn,that,specificCreate){for(var value,result,O=toObject($this),self=IndexedObject(O),boundFunction=bind(callbackfn,that,3),length=toLength(self.length),index=0,create=specificCreate||arraySpeciesCreate,target=IS_MAP?create($this,length):IS_FILTER?create($this,0):void 0;length>index;index++)if((NO_HOLES||index in self)&&(result=boundFunction(value=self[index],index,O),TYPE))if(IS_MAP)target[index]=result;else if(result)switch(TYPE){case 3:return!0;case 5:return value;case 6:return index;case 2:push.call(target,value)}else if(IS_EVERY)return!1;return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:target}};module.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6)}},function(module,exports){module.exports=function(it){if("function"!=typeof it)throw TypeError(String(it)+" is not a function");return it}},function(module,exports,__webpack_require__){__webpack_require__(3)({target:"Array",stat:!0},{isArray:__webpack_require__(85)})},function(module,exports,__webpack_require__){"use strict";var redefine=__webpack_require__(26),anObject=__webpack_require__(17),fails=__webpack_require__(7),flags=__webpack_require__(318),RegExpPrototype=RegExp.prototype,nativeToString=RegExpPrototype.toString,NOT_GENERIC=fails(function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})}),INCORRECT_NAME="toString"!=nativeToString.name;(NOT_GENERIC||INCORRECT_NAME)&&redefine(RegExp.prototype,"toString",function toString(){var R=anObject(this),p=String(R.source),rf=R.flags;return"/"+p+"/"+String(void 0===rf&&R instanceof RegExp&&!("flags"in RegExpPrototype)?flags.call(R):rf)},{unsafe:!0})},function(module,exports,__webpack_require__){var baseIsNative=__webpack_require__(676),getValue=__webpack_require__(681);module.exports=function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:void 0}},function(module,exports){module.exports=function isObjectLike(value){return null!=value&&"object"==typeof value}},function(module,exports){var isArray=Array.isArray;module.exports=isArray},function(module,exports,__webpack_require__){"use strict";(function(global,Buffer){var _interopRequireDefault=__webpack_require__(32),_interopRequireWildcard=__webpack_require__(4);Object.defineProperty(exports,"__esModule",{value:!0}),exports.encryptMessageForDevice=async function encryptMessageForDevice(resultsObject,ourUserId,ourDeviceId,olmDevice,recipientUserId,recipientDevice,payloadFields){const deviceKey=recipientDevice.getIdentityKey(),sessionId=await olmDevice.getSessionIdForDevice(deviceKey);if(null===sessionId)return;_logger.logger.log("Using sessionid "+sessionId+" for device "+recipientUserId+":"+recipientDevice.deviceId);const payload={sender:ourUserId,sender_device:ourDeviceId,keys:{ed25519:olmDevice.deviceEd25519Key},recipient:recipientUserId,recipient_keys:{ed25519:recipientDevice.getFingerprint()}};utils.extend(payload,payloadFields),resultsObject[deviceKey]=await olmDevice.encryptMessage(deviceKey,sessionId,JSON.stringify(payload))},exports.ensureOlmSessionsForDevices=async function ensureOlmSessionsForDevices(olmDevice,baseApis,devicesByUser,force){const devicesWithoutSession=[],result={},resolveSession={};for(const userId in devicesByUser){if(!devicesByUser.hasOwnProperty(userId))continue;result[userId]={};const devices=devicesByUser[userId];for(let j=0;j{resolveSession[key]={resolve:(...args)=>{delete olmDevice._sessionsInProgress[key],resolve(...args)},reject:(...args)=>{delete olmDevice._sessionsInProgress[key],reject(...args)}}}));const sessionId=await olmDevice.getSessionIdForDevice(key,resolveSession[key]);null!==sessionId&&resolveSession[key]&&(delete olmDevice._sessionsInProgress[key],resolveSession[key].resolve(),delete resolveSession[key]),(null===sessionId||force)&&devicesWithoutSession.push([userId,deviceId]),result[userId][deviceId]={device:deviceInfo,sessionId:sessionId}}}if(0===devicesWithoutSession.length)return result;let res;try{res=await baseApis.claimOneTimeKeys(devicesWithoutSession,"signed_curve25519")}catch(e){for(const resolver of Object.values(resolveSession))resolver.resolve();throw _logger.logger.log("failed to claim one-time keys",e,devicesWithoutSession),e}const otk_res=res.one_time_keys||{},promises=[];for(const userId in devicesByUser){if(!devicesByUser.hasOwnProperty(userId))continue;const userRes=otk_res[userId]||{},devices=devicesByUser[userId];for(let j=0;j{resolveSession[key]&&resolveSession[key].resolve(sid),result[userId][deviceId].sessionId=sid},e=>{throw resolveSession[key]&&resolveSession[key].resolve(),e}));else{const msg="No one-time keys (alg=signed_curve25519) for device "+userId+":"+deviceId;_logger.logger.warn(msg),resolveSession[key]&&resolveSession[key].resolve()}}}return await Promise.all(promises),result},exports.verifySignature=verifySignature,exports.pkSign=function pkSign(obj,key,userId,pubkey){let createdKey=!1;if(key instanceof Uint8Array){const keyObj=new global.Olm.PkSigning;pubkey=keyObj.init_with_seed(key),key=keyObj,createdKey=!0}const sigs=obj.signatures||{};delete obj.signatures;const unsigned=obj.unsigned;obj.unsigned&&delete obj.unsigned;try{const mysigs=sigs[userId]||{};return sigs[userId]=mysigs,mysigs["ed25519:"+pubkey]=key.sign(_anotherJson.default.stringify(obj))}finally{obj.signatures=sigs,unsigned&&(obj.unsigned=unsigned),createdKey&&key.free()}},exports.pkVerify=function pkVerify(obj,pubkey,userId){const keyId="ed25519:"+pubkey;if(!(obj.signatures&&obj.signatures[userId]&&obj.signatures[userId][keyId]))throw new Error("No signature");const signature=obj.signatures[userId][keyId],util=new global.Olm.Utility,sigs=obj.signatures;delete obj.signatures;const unsigned=obj.unsigned;obj.unsigned&&delete obj.unsigned;try{util.ed25519_verify(pubkey,_anotherJson.default.stringify(obj),signature)}finally{obj.signatures=sigs,unsigned&&(obj.unsigned=unsigned),util.free()}},exports.encodeBase64=function encodeBase64(uint8Array){return Buffer.from(uint8Array).toString("base64")},exports.decodeBase64=function decodeBase64(base64){return Buffer.from(base64,"base64")},exports.MEGOLM_BACKUP_ALGORITHM=exports.MEGOLM_ALGORITHM=exports.OLM_ALGORITHM=void 0;var _logger=__webpack_require__(2),utils=_interopRequireWildcard(__webpack_require__(5)),_anotherJson=_interopRequireDefault(__webpack_require__(235));exports.OLM_ALGORITHM="m.olm.v1.curve25519-aes-sha2";exports.MEGOLM_ALGORITHM="m.megolm.v1.aes-sha2";async function _verifyKeyAndStartSession(olmDevice,oneTimeKey,userId,deviceInfo){const deviceId=deviceInfo.deviceId;try{await verifySignature(olmDevice,oneTimeKey,userId,deviceId,deviceInfo.getFingerprint())}catch(e){return _logger.logger.error("Unable to verify signature on one-time key for device "+userId+":"+deviceId+":",e),null}let sid;try{sid=await olmDevice.createOutboundSession(deviceInfo.getIdentityKey(),oneTimeKey.key)}catch(e){return _logger.logger.error("Error starting olm session with device "+userId+":"+deviceId+": "+e),null}return _logger.logger.log("Started new olm sessionid "+sid+" for device "+userId+":"+deviceId),sid}async function verifySignature(olmDevice,obj,signingUserId,signingDeviceId,signingKey){const signKeyId="ed25519:"+signingDeviceId,signature=((obj.signatures||{})[signingUserId]||{})[signKeyId];if(!signature)throw Error("No signature");const mangledObj=Object.assign({},obj);delete mangledObj.unsigned,delete mangledObj.signatures;const json=_anotherJson.default.stringify(mangledObj);olmDevice.verifySignature(signingKey,json,signature)}exports.MEGOLM_BACKUP_ALGORITHM="m.megolm_backup.v1.curve25519-aes-sha2"}).call(this,__webpack_require__(0),__webpack_require__(234).Buffer)},function(module,exports,__webpack_require__){"use strict";var ThrowTypeError=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new TypeError},hasSymbols="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,getProto=Object.getPrototypeOf||function(x){return x.__proto__},asyncGenIterator=void 0,TypedArray="undefined"==typeof Uint8Array?void 0:getProto(Uint8Array),INTRINSICS={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":hasSymbols?getProto([][Symbol.iterator]()):void 0,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":void 0,"$ %AsyncFunction%":void 0,"$ %AsyncFunctionPrototype%":void 0,"$ %AsyncGenerator%":void 0,"$ %AsyncGeneratorFunction%":void 0,"$ %AsyncGeneratorPrototype%":void 0,"$ %AsyncIteratorPrototype%":asyncGenIterator&&hasSymbols&&Symbol.asyncIterator?asyncGenIterator[Symbol.asyncIterator]():void 0,"$ %Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?void 0:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":void 0,"$ %GeneratorFunction%":void 0,"$ %GeneratorPrototype%":void 0,"$ %Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":hasSymbols?getProto(getProto([][Symbol.iterator]())):void 0,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?void 0:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols?getProto((new Map)[Symbol.iterator]()):void 0,"$ %MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"==typeof Promise?void 0:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?void 0:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols?getProto((new Set)[Symbol.iterator]()):void 0,"$ %SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":hasSymbols?getProto(""[Symbol.iterator]()):void 0,"$ %StringPrototype%":String.prototype,"$ %Symbol%":hasSymbols?Symbol:void 0,"$ %SymbolPrototype%":hasSymbols?Symbol.prototype:void 0,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":ThrowTypeError,"$ %TypedArray%":TypedArray,"$ %TypedArrayPrototype%":TypedArray?TypedArray.prototype:void 0,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype};module.exports=function GetIntrinsic(name,allowMissing){if(arguments.length>1&&"boolean"!=typeof allowMissing)throw new TypeError('"allowMissing" argument must be a boolean');var key="$ "+name;if(!(key in INTRINSICS))throw new SyntaxError("intrinsic "+name+" does not exist!");if(void 0===INTRINSICS[key]&&!allowMissing)throw new TypeError("intrinsic "+name+" exists, but is not available. Please file an issue!");return INTRINSICS[key]}},function(module,exports,__webpack_require__){var DESCRIPTORS=__webpack_require__(19),propertyIsEnumerableModule=__webpack_require__(107),createPropertyDescriptor=__webpack_require__(82),toIndexedObject=__webpack_require__(51),toPrimitive=__webpack_require__(83),has=__webpack_require__(20),IE8_DOM_DEFINE=__webpack_require__(296),nativeGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;exports.f=DESCRIPTORS?nativeGetOwnPropertyDescriptor:function getOwnPropertyDescriptor(O,P){if(O=toIndexedObject(O),P=toPrimitive(P,!0),IE8_DOM_DEFINE)try{return nativeGetOwnPropertyDescriptor(O,P)}catch(error){}if(has(O,P))return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O,P),O[P])}},function(module,exports){module.exports=!1},function(module,exports,__webpack_require__){var path=__webpack_require__(183),global=__webpack_require__(6),aFunction=function(variable){return"function"==typeof variable?variable:void 0};module.exports=function(namespace,method){return arguments.length<2?aFunction(path[namespace])||aFunction(global[namespace]):path[namespace]&&path[namespace][method]||global[namespace]&&global[namespace][method]}},function(module,exports,__webpack_require__){var anObject=__webpack_require__(17),defineProperties=__webpack_require__(305),enumBugKeys=__webpack_require__(185),hiddenKeys=__webpack_require__(84),html=__webpack_require__(306),documentCreateElement=__webpack_require__(180),IE_PROTO=__webpack_require__(110)("IE_PROTO"),Empty=function(){},createDict=function(){var iframeDocument,iframe=documentCreateElement("iframe"),length=enumBugKeys.length;for(iframe.style.display="none",html.appendChild(iframe),iframe.src=String("javascript:"),(iframeDocument=iframe.contentWindow.document).open(),iframeDocument.write("